aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2012-03-19 23:16:45 +0100
committerUros Bizjak <uros@gcc.gnu.org>2012-03-19 23:16:45 +0100
commit5ef4f6095ebf7adad02f08d7d2f29d9e05363bf4 (patch)
treee59d77a44964629a7705afb4fb6ca181a782b0f6
parentfa7548481a0fa6dc43c23c6b7f3afa4d6fd3e628 (diff)
downloadgcc-5ef4f6095ebf7adad02f08d7d2f29d9e05363bf4.zip
gcc-5ef4f6095ebf7adad02f08d7d2f29d9e05363bf4.tar.gz
gcc-5ef4f6095ebf7adad02f08d7d2f29d9e05363bf4.tar.bz2
i386.md (allocate_stack): Simplify.
* config/i386/i386.md (allocate_stack): Simplify. From-SVN: r185545
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.md31
2 files changed, 20 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 67a1119..258bda9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2012-03-19 Uros Bizjak <ubizjak@gmail.com>
+ * config/i386/i386.md (allocate_stack): Simplify.
+
+2012-03-19 Uros Bizjak <ubizjak@gmail.com>
+
* builtins.c (expand_builtin_cexpi): Use copy_addr_to_reg instead of
copy_to_mode_reg (Pmode, ...).
(expand_builtin_frame_address): Ditto.
@@ -10,7 +14,6 @@
(ix86_expand_setmem): Ditto.
(ix86_trampoline_init): DItto.
* config/i386/i386.md (cmpstrnsi): Ditto.
- (allocate_stack): Ditto.
2012-03-19 Sandra Loosemore <sandra@codesourcery.com>
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 0db0222..4bcb7d2 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -16729,25 +16729,26 @@
if (CHECK_STACK_LIMIT && CONST_INT_P (operands[1])
&& INTVAL (operands[1]) < CHECK_STACK_LIMIT)
- {
- x = expand_simple_binop (Pmode, MINUS, stack_pointer_rtx, operands[1],
- stack_pointer_rtx, 0, OPTAB_DIRECT);
- if (x != stack_pointer_rtx)
- emit_move_insn (stack_pointer_rtx, x);
- }
+ x = operands[1];
else
{
- x = copy_addr_to_reg (operands[1]);
- if (TARGET_64BIT)
- emit_insn (gen_allocate_stack_worker_probe_di (x, x));
- else
- emit_insn (gen_allocate_stack_worker_probe_si (x, x));
- x = expand_simple_binop (Pmode, MINUS, stack_pointer_rtx, x,
- stack_pointer_rtx, 0, OPTAB_DIRECT);
- if (x != stack_pointer_rtx)
- emit_move_insn (stack_pointer_rtx, x);
+ rtx (*insn) (rtx, rtx);
+
+ x = copy_to_mode_reg (Pmode, operands[1]);
+
+ insn = (TARGET_64BIT
+ ? gen_allocate_stack_worker_probe_di
+ : gen_allocate_stack_worker_probe_si);
+
+ emit_insn (insn (x, x));
}
+ x = expand_simple_binop (Pmode, MINUS, stack_pointer_rtx, x,
+ stack_pointer_rtx, 0, OPTAB_DIRECT);
+
+ if (x != stack_pointer_rtx)
+ emit_move_insn (stack_pointer_rtx, x);
+
emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
DONE;
})