From: Uros Bizjak Date: Thu, 23 Jul 2009 10:23:43 +0000 (+0200) Subject: re PR target/40832 (gfortran 4.4.0 generates invalid .s file on solaris-x86 using... X-Git-Tag: releases/gcc-4.3.4~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17e4c6535ab9aacf9f0ae59034d94bb307d094f3;p=thirdparty%2Fgcc.git re PR target/40832 (gfortran 4.4.0 generates invalid .s file on solaris-x86 using -march=k8 for 130.socorro) PR target/40832 * config/i386/i386.c (output_387_ffreep): Rewrite to return ASM_SHORT instead of .word. * config/i386/i386.md (*tls_global_dynamic_64): Use ASM_SHORT instead of .word in asm template. From-SVN: r149996 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd7aed79ce6a..04b556f9573b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-07-23 Uros Bizjak + + PR target/40832 + * config/i386/i386.c (output_387_ffreep): Rewrite to return + ASM_SHORT instead of .word. + * config/i386/i386.md (*tls_global_dynamic_64): Use ASM_SHORT + instead of .word in asm template. + 2009-07-21 Uros Bizjak Backport from mainline: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d5950fec44a5..2b66975cc455 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -9934,16 +9934,18 @@ static const char * output_387_ffreep (rtx *operands ATTRIBUTE_UNUSED, int opno) { if (TARGET_USE_FFREEP) -#if HAVE_AS_IX86_FFREEP +#ifdef HAVE_AS_IX86_FFREEP return opno ? "ffreep\t%y1" : "ffreep\t%y0"; #else { - static char retval[] = ".word\t0xc_df"; + static char retval[32]; int regno = REGNO (operands[opno]); gcc_assert (FP_REGNO_P (regno)); - retval[9] = '0' + (regno - FIRST_STACK_REG); + regno -= FIRST_STACK_REG; + + snprintf (retval, sizeof (retval), ASM_SHORT "0xc%ddf", regno); return retval; } #endif diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index ceb212ad6b9e..1053d47e4b53 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -15620,7 +15620,7 @@ (unspec:DI [(match_operand:DI 1 "tls_symbolic_operand" "")] UNSPEC_TLS_GD)] "TARGET_64BIT" - ".byte\t0x66\;lea{q}\t{%a1@TLSGD(%%rip), %%rdi|rdi, %a1@TLSGD[rip]}\;.word\t0x6666\;rex64\;call\t%P2" + { return ".byte\t0x66\n\tlea{q}\t{%a1@TLSGD(%%rip), %%rdi|rdi, %a1@TLSGD[rip]}\n" ASM_SHORT "0x6666\n\trex64\n\tcall\t%P2"; } [(set_attr "type" "multi") (set_attr "length" "16")])