aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2010-09-24 08:10:35 +0200
committerUros Bizjak <uros@gcc.gnu.org>2010-09-24 08:10:35 +0200
commit6fd71fde8bf08fdbd7220791b0b411f1595bf810 (patch)
tree4698c452d4e231b033445ba98af1ba4303d5a7f0
parentbe1f1ed97b2e41073dc1775d6f13e7597eb22664 (diff)
downloadgcc-6fd71fde8bf08fdbd7220791b0b411f1595bf810.zip
gcc-6fd71fde8bf08fdbd7220791b0b411f1595bf810.tar.gz
gcc-6fd71fde8bf08fdbd7220791b0b411f1595bf810.tar.bz2
i386.md (ix86_code_end): Move the initialization of xops array near the consumer.
* config/i386/i386.md (ix86_code_end): Move the initialization of xops array near the consumer. Use AX_REG and SP_REG instead of numerical constants. From-SVN: r164583
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/i386/i386.c10
-rw-r--r--gcc/config/i386/i386.md4
3 files changed, 16 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d23732f..152c0c2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,9 +1,14 @@
+2010-09-24 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (ix86_code_end): Move the initialization of
+ xops array near the consumer. Use AX_REG and SP_REG instead of
+ numerical constants.
+
2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
- * c-typeck.c (convert_arguments): Use warning 'too many arguments
- to method [methodname]' for an Objective-C method instead of the
- less satisfactory 'too many arguments to function' (with no method
- name).
+ * c-typeck.c (convert_arguments): Use warning 'too many arguments to
+ method [methodname]' for an Objective-C method instead of the less
+ satisfactory 'too many arguments to function' (with no method name).
2010-09-23 Eric Botcazou <ebotcazou@adacore.com>
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b258521..eb7f65f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -7964,12 +7964,12 @@ ix86_code_end (void)
rtx xops[2];
int regno;
- for (regno = 0; regno < 8; ++regno)
+ for (regno = AX_REG; regno <= SP_REG; regno++)
{
char name[32];
tree decl;
- if (! ((pic_labels_used >> regno) & 1))
+ if (!(pic_labels_used & (1 << regno)))
continue;
get_pc_thunk_name (name, regno);
@@ -8022,10 +8022,8 @@ ix86_code_end (void)
/* Make sure unwind info is emitted for the thunk if needed. */
final_start_function (emit_barrier (), asm_out_file, 1);
- xops[0] = gen_rtx_REG (Pmode, regno);
- xops[1] = gen_rtx_MEM (Pmode, stack_pointer_rtx);
/* Pad stack IP move with 4 instructions (two NOPs count
- as one instruction.) */
+ as one instruction). */
if (TARGET_PAD_SHORT_FUNCTION)
{
int i = 8;
@@ -8034,6 +8032,8 @@ ix86_code_end (void)
fputs ("\tnop\n", asm_out_file);
}
+ xops[0] = gen_rtx_REG (Pmode, regno);
+ xops[1] = gen_rtx_MEM (Pmode, stack_pointer_rtx);
output_asm_insn ("mov%z0\t{%1, %0|%0, %1}", xops);
fputs ("\tret\n", asm_out_file);
final_end_function ();
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 55086f3..adf528f 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -11515,7 +11515,7 @@
(unspec:SI [(const_int 0)] UNSPEC_SET_GOT))
(clobber (reg:CC FLAGS_REG))]
"!TARGET_64BIT"
- { return output_set_got (operands[0], NULL_RTX); }
+ "* return output_set_got (operands[0], NULL_RTX);"
[(set_attr "type" "multi")
(set_attr "length" "12")])
@@ -11525,7 +11525,7 @@
UNSPEC_SET_GOT))
(clobber (reg:CC FLAGS_REG))]
"!TARGET_64BIT"
- { return output_set_got (operands[0], operands[1]); }
+ "* return output_set_got (operands[0], operands[1]);"
[(set_attr "type" "multi")
(set_attr "length" "12")])