From f6ddf131f0afe5a45af7ae248dcb3f1d38da5aaf Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sat, 7 Aug 2010 22:32:30 +0200 Subject: [PATCH] re PR target/45213 ("suffix or operands invalid for `push'" triggered by optimisations on x86_64) PR target/45213 * config/i386/i386.c (ix86_print_operand): Handle 'q' operand modifier to output 32bit SFmode immediate as 8 byte sign extended value. testsuite/ChangeLog: PR target/45213 * gcc.target/i386/pr45213.c: New test. From-SVN: r162983 --- gcc/ChangeLog | 27 ++++++++++++++++--------- gcc/config/i386/i386.c | 6 +++++- gcc/testsuite/ChangeLog | 11 +++++++--- gcc/testsuite/gcc.target/i386/pr45213.c | 9 +++++++++ 4 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr45213.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 53f24f1b8c4..6516544f8d5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-08-07 Uros Bizjak + H.J. Lu + + PR target/45213 + * config/i386/i386.c (ix86_print_operand): Handle 'q' operand modifier + to output 32bit SFmode immediate as 8 byte sign extended value. + 2010-08-07 Marcus Shawcroft * config/arm/linux-atomic.c (SUBWORD_VAL_CAS): Instantiate with @@ -11,16 +18,16 @@ 2010-08-07 Ramana Radhakrishnan - * config/arm/cortex-a9.md: Rewrite VFP Pipeline description. - * config/arm/arm.c (arm_xscale_tune): Initialize sched_adjust_cost. - (arm_fastmul_tune,arm_slowmul_tune, arm_9e_tune): Likewise. - (arm_adjust_cost): Split into xscale_sched_adjust_cost and a - generic part. - (cortex_a9_sched_adjust_cost): New function. - (xscale_sched_adjust_cost): New function. - * config/arm/arm-protos.h (struct tune_params): New field - sched_adjust_cost. - * config/arm/arm-cores.def: Adjust costs for cortex-a9. + * config/arm/cortex-a9.md: Rewrite VFP Pipeline description. + * config/arm/arm.c (arm_xscale_tune): Initialize sched_adjust_cost. + (arm_fastmul_tune,arm_slowmul_tune, arm_9e_tune): Likewise. + (arm_adjust_cost): Split into xscale_sched_adjust_cost and a + generic part. + (cortex_a9_sched_adjust_cost): New function. + (xscale_sched_adjust_cost): New function. + * config/arm/arm-protos.h (struct tune_params): New field + sched_adjust_cost. + * config/arm/arm-cores.def: Adjust costs for cortex-a9. 2010-08-06 Eric Botcazou diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 204211a6bfc..1877730bc03 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -12921,7 +12921,11 @@ ix86_print_operand (FILE *file, rtx x, int code) if (ASSEMBLER_DIALECT == ASM_ATT) putc ('$', file); - fprintf (file, "0x%08lx", (long unsigned int) l); + /* Sign extend 32bit SFmode immediate to 8 bytes. */ + if (code == 'q') + fprintf (file, "0x%08llx", (unsigned long long) (int) l); + else + fprintf (file, "0x%08x", (unsigned int) l); } /* These float cases don't actually occur as immediate operands. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e7f4524d744..18f42a43fbf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-08-07 Uros Bizjak + + PR target/45213 + * gcc.target/i386/pr45213.c: New test. + 2010-08-07 Jerry DeLisle PR libfortran/45143 @@ -5,9 +10,9 @@ 2010-08-07 Marcus Shawcroft - * lib/target-supports.exp: (check_effective_target_sync_int_long): - Add arm*-*-linux-gnueabi. - (check_effective_target_sync_char_short): Likewise. + * lib/target-supports.exp (check_effective_target_sync_int_long): + Add arm*-*-linux-gnueabi. + (check_effective_target_sync_char_short): Likewise. 2010-08-06 Thomas Koenig diff --git a/gcc/testsuite/gcc.target/i386/pr45213.c b/gcc/testsuite/gcc.target/i386/pr45213.c new file mode 100644 index 00000000000..c575fb55052 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr45213.c @@ -0,0 +1,9 @@ +/* { dg-do assemble } */ +/* { dg-options "-Os -fno-omit-frame-pointer" } */ + +void f (float, float, float, float, float, float, float, float, float, float); + +void g (void) +{ + f (0, 0, 0, 0, 0, 0, 0, 0, -1, 1); +}