arm.md (stack_tie): New insn.
authorRichard Earnshaw <rearnsha@arm.com>
Tue, 16 Jul 2002 15:14:22 +0000 (15:14 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Tue, 16 Jul 2002 15:14:22 +0000 (15:14 +0000)
* arm.md (stack_tie): New insn.  Use an idiom that the alias code
understands to be a memory clobber.
* arm.c (arm_expand_prologue): Use it.

From-SVN: r55486

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.md

index 1005b8c69a197834e7fe33119293fc842df869a7..ea6617b36f6f483e9f6eb6d0f87759bd72a30c24 100644 (file)
@@ -1,3 +1,9 @@
+2002-07-16  Richard Earnshaw  <rearnsha@arm.com>
+
+       * arm.md (stack_tie): New insn.  Use an idiom that the alias code
+       understands to be a memory clobber.
+       * arm.c (arm_expand_prologue): Use it.
+
 2002-07-16  Daniel Berlin  <dberlin@dberlin.org>
 
        * ra-rewrite.c: #include reload.h, insn-config.h
index 17d77507f60cd4c8a49eb4be06310616f719c05c..0632397a3f017cb6f24edf04bed6f00b89005c34 100644 (file)
@@ -8387,15 +8387,8 @@ arm_expand_prologue ()
         will prevent the scheduler from moving stores to the frame
         before the stack adjustment.  */
       if (frame_pointer_needed)
-       {
-         rtx unspec = gen_rtx_UNSPEC (SImode,
-                                      gen_rtvec (2, stack_pointer_rtx,
-                                                 hard_frame_pointer_rtx),
-                                      UNSPEC_PRLG_STK);
-
-         insn = emit_insn (gen_rtx_CLOBBER (VOIDmode,
-                                     gen_rtx_MEM (BLKmode, unspec)));
-       }
+       insn = emit_insn (gen_stack_tie (stack_pointer_rtx,
+                                        hard_frame_pointer_rtx));
     }
 
   /* If we are profiling, make sure no instructions are scheduled before
index 8b45862bac0d45585e947448aef49097e446acce..8e4b9c06d13a8080800b69891b6235226244cfe7 100644 (file)
   [(set_attr "type" "store4")]
 )
 
+(define_insn "stack_tie"
+  [(set (mem:BLK (scratch))
+       (unspec:BLK [(match_operand:SI 0 "s_register_operand" "r")
+                    (match_operand:SI 1 "s_register_operand" "r")]
+                   UNSPEC_PRLG_STK))]
+  ""
+  ""
+  [(set_attr "length" "0")]
+)
+
 ;; Similarly for the floating point registers
 (define_insn "*push_fp_multi"
   [(match_parallel 2 "multi_register_push"