From: Takayuki 'January June' Suwa <jjsuwa_sys3...@yahoo.co.jp>

gcc/ChangeLog:

        * config/xtensa/xtensa.md (set_frame_ptr): Fix to reflect
        TARGET_DENSITY.
---
 gcc/config/xtensa/xtensa.md | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index a77d3285bad1..e72fd9ac3f61 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -2562,12 +2562,15 @@
   ""
 {
   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
-- 
2.30.2

Reply via email to