]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
xtensa: Generate density instructions in set_frame_ptr
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Tue, 27 Dec 2022 06:30:12 +0000 (15:30 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 27 Dec 2022 15:38:39 +0000 (07:38 -0800)
gcc/ChangeLog:

* config/xtensa/xtensa.md (set_frame_ptr): Fix to reflect
TARGET_DENSITY.

gcc/config/xtensa/xtensa.md

index a77d3285bad129fe63ac91c36a22778e91dd6eb1..e72fd9ac3f61b361496dadbaeba2070482800181 100644 (file)
   ""
 {
   if (frame_pointer_needed)
-    return "mov\ta7, sp";
+    return (TARGET_DENSITY ? "mov.n\ta7, sp" : "mov\ta7, sp");
   return "";
 }
   [(set_attr "type"    "move")
    (set_attr "mode"    "SI")
-   (set_attr "length"  "3")])
+   (set (attr "length")
+       (if_then_else (match_test "TARGET_DENSITY")
+                     (const_int 2)
+                     (const_int 3)))])
 
 ;; Post-reload splitter to remove fp assignment when it's not needed.
 (define_split