xtensa.md (set_frame_ptr): Change rtl to set reg a7.
authorBob Wilson <bob.wilson@acm.org>
Tue, 11 Feb 2003 21:42:31 +0000 (21:42 +0000)
committerBob Wilson <bwilson@gcc.gnu.org>
Tue, 11 Feb 2003 21:42:31 +0000 (21:42 +0000)
        * config/xtensa/xtensa.md (set_frame_ptr): Change rtl to set reg a7.
        * config/xtensa/xtensa.c (xtensa_reorg): Search for UNSPECV_SET_FP
        as a SET pattern.

From-SVN: r62730

gcc/ChangeLog
gcc/config/xtensa/xtensa.c
gcc/config/xtensa/xtensa.md

index edf66be3c8d8e063aed0957239dffa9631165c26..69ef14413a676a5854b4948dd1d1fc1d96115727 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-11  Bob Wilson  <bob.wilson@acm.org>
+
+       * config/xtensa/xtensa.md (set_frame_ptr): Change rtl to set reg a7.
+       * config/xtensa/xtensa.c (xtensa_reorg): Search for UNSPECV_SET_FP
+       as a SET pattern.
+
 2003-02-11  Roger Sayle  <roger@eyesopen.com>
 
        * builtins.c:  Fix failure caused by commiting wrong patch.
index cb7d7e5e9cbaeccf60c830b970586a05178400c1..f2546288ed9123b522463b2061033cf8a20fa682 100644 (file)
@@ -2241,8 +2241,9 @@ xtensa_reorg (first)
        continue;
 
       pat = PATTERN (insn);
-      if (GET_CODE (pat) == UNSPEC_VOLATILE
-         && (XINT (pat, 1) == UNSPECV_SET_FP))
+      if (GET_CODE (pat) == SET
+         && GET_CODE (SET_SRC (pat)) == UNSPEC_VOLATILE
+         && (XINT (SET_SRC (pat), 1) == UNSPECV_SET_FP))
        {
          set_frame_ptr_insn = insn;
          break;
index 5db5c0ca487dfd6191562f27283e4ed1bcba1ac8..cbda342917b38361fcd06aa9636c607c5184b9c8 100644 (file)
 ;; to set up the frame pointer.
 
 (define_insn "set_frame_ptr"
-  [(unspec_volatile [(const_int 0)] UNSPECV_SET_FP)]
+  [(set (reg:SI A7_REG) (unspec_volatile [(const_int 0)] UNSPECV_SET_FP))]
   ""
   "*
 {
 
 ;; Post-reload splitter to remove fp assignment when it's not needed.
 (define_split
-  [(unspec_volatile [(const_int 0)] UNSPECV_SET_FP)]
+  [(set (reg:SI A7_REG) (unspec_volatile [(const_int 0)] UNSPECV_SET_FP))]
   "reload_completed && !frame_pointer_needed"
   [(unspec [(const_int 0)] UNSPEC_NOP)]
   "")