i386.md (allocate_stack_worker): Use different pattern for pre and post reload expansion.
authorJan Hubicka <jh@suse.cz>
Tue, 30 Dec 2003 01:21:50 +0000 (02:21 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 30 Dec 2003 01:21:50 +0000 (01:21 +0000)
* i386.md (allocate_stack_worker):  Use different pattern for pre and
post reload expansion.
(allocate_stack_worker_1, allocate_stack_worker_rex64): Use
match_scratch.
(allocate_stack_worder_1_postreload,
allocate_stack_worker_rex64_postreload): New.

From-SVN: r75220

gcc/ChangeLog
gcc/config/i386/i386.md

index 9541d659244775d3273cfa46e88df38f2f96f044..a33a7c57bba242f97ec48d058e6f82f9886ac367 100644 (file)
@@ -1,3 +1,12 @@
+2003-12-30  Jan Hubicka  <jh@suse.cz>
+
+       * i386.md (allocate_stack_worker):  Use different pattern for pre and
+       post reload expansion.
+       (allocate_stack_worker_1, allocate_stack_worker_rex64): Use
+       match_scratch.
+       (allocate_stack_worder_1_postreload,
+       allocate_stack_worker_rex64_postreload): New.
+
 2003-12-29  Nathan Sidwell  <nathan@codesourcery.com>
 
        * builtins.c (expand_builtin_apply_args_1): Add pretend args size
index 0eff393bf5fcb65d6d8282ecf28caa341c2a8c41..8b32c5e014c9253375b590b8b77def91b0037334 100644 (file)
   [(match_operand:SI 0 "register_operand" "")]
   "TARGET_STACK_PROBE"
 {
-  if (TARGET_64BIT)
-    emit_insn (gen_allocate_stack_worker_rex64 (operands[0]));
+  if (reload_completed)
+    {
+      if (TARGET_64BIT)
+       emit_insn (gen_allocate_stack_worker_rex64_postreload (operands[0]));
+      else
+       emit_insn (gen_allocate_stack_worker_postreload (operands[0]));
+    }
   else
-    emit_insn (gen_allocate_stack_worker_1 (operands[0]));
+    {
+      if (TARGET_64BIT)
+       emit_insn (gen_allocate_stack_worker_rex64 (operands[0]));
+      else
+       emit_insn (gen_allocate_stack_worker_1 (operands[0]));
+    }
   DONE;
 })
 
 (define_insn "allocate_stack_worker_1"
   [(unspec:SI [(match_operand:SI 0 "register_operand" "a")] UNSPEC_STACK_PROBE)
    (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0)))
-   (clobber (match_dup 0))
+   (clobber (match_scratch:SI 1 "=0"))
    (clobber (reg:CC 17))]
   "!TARGET_64BIT && TARGET_STACK_PROBE"
   "call\t__alloca"
   [(set_attr "type" "multi")
    (set_attr "length" "5")])
 
+(define_expand "allocate_stack_worker_postreload"
+  [(parallel [(unspec:SI [(match_operand:SI 0 "register_operand" "a")]
+                          UNSPEC_STACK_PROBE)
+             (set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0)))
+             (clobber (match_dup 0))
+             (clobber (reg:CC 17))])]
+  ""
+  "")
+
 (define_insn "allocate_stack_worker_rex64"
   [(unspec:DI [(match_operand:DI 0 "register_operand" "a")] UNSPEC_STACK_PROBE)
    (set (reg:DI 7) (minus:DI (reg:DI 7) (match_dup 0)))
-   (clobber (match_dup 0))
+   (clobber (match_scratch:DI 1 "=0"))
    (clobber (reg:CC 17))]
   "TARGET_64BIT && TARGET_STACK_PROBE"
   "call\t__alloca"
   [(set_attr "type" "multi")
    (set_attr "length" "5")])
 
+(define_expand "allocate_stack_worker_rex64_postreload"
+  [(parallel [(unspec:DI [(match_operand:DI 0 "register_operand" "a")]
+                          UNSPEC_STACK_PROBE)
+             (set (reg:DI 7) (minus:DI (reg:DI 7) (match_dup 0)))
+             (clobber (match_dup 0))
+             (clobber (reg:CC 17))])]
+  ""
+  "")
+
 (define_expand "allocate_stack"
   [(parallel [(set (match_operand:SI 0 "register_operand" "=r")
                   (minus:SI (reg:SI 7)