diff options
author | Jan Hubicka <jh@suse.cz> | 2003-12-30 02:21:50 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-12-30 01:21:50 +0000 |
commit | af9fb8ab08852b461447e7af6d8f50edb6e16ef9 (patch) | |
tree | 4b65f21a1036dfdc24c4d8f9897eb33c4d00ae38 | |
parent | 21b75a730aa1fe6d449a9114fca0f6c98d9b7653 (diff) | |
download | gcc-af9fb8ab08852b461447e7af6d8f50edb6e16ef9.zip gcc-af9fb8ab08852b461447e7af6d8f50edb6e16ef9.tar.gz gcc-af9fb8ab08852b461447e7af6d8f50edb6e16ef9.tar.bz2 |
i386.md (allocate_stack_worker): Use different pattern for pre and post reload expansion.
* 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
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 38 |
2 files changed, 42 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9541d659..a33a7c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 0eff393..8b32c5e 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -17168,33 +17168,61 @@ [(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) |