http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50061
Bug #: 50061 Summary: [4.7 regression] emit_library_call_value_1 change broke SF->TI conversion on MIPS Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: r...@gcc.gnu.org CC: rdsandif...@googlemail.com Host: mips-sgi-irix6.5 Target: mips-sgi-irix6.5 Build: mips-sgi-irix6.5 Julian, your patch 2011-08-01 Julian Brown <jul...@codesourcery.com> * calls.c (emit_library_call_value_1): Support padding for libcall arguments and return values. * config/arm/arm.c (arm_pad_arg_upward): Pad half-float values downwards in big-endian mode. introduced several testsuite regressions on IRIX 6.5. Initially, I suspected that my fp-bit move to toplevel gcc had been the culprit, but a reghunt identified your patch. I've used the following testcase, derived from gcc.dg/torture/fp-int-convert-timode.c. It aborts with your patch: extern void abort (void); extern void exit (int); typedef int TItype __attribute__ ((mode (TI))); int main (void) { static volatile TItype ivin, ivout; static volatile float fv1, fv2; ivin = (TItype)1; fv1 = (TItype)1; fv2 = ivin; ivout = fv2; if (ivin != ((TItype)1) || ivout != ivin || ivout != (TItype)1 || fv1 != (TItype)1 || fv2 != (TItype)1 || fv1 != fv2) abort (); exit (0); } Comparing gcc -O3 -save-temps output before and after the patch, I find that it introduced a wrong shift of one __fixsfti arg: ld $25,%call16(__fixsfti)($28) + dmfc1 $2,$f12 + nop + dsll $2,$2,32 + dmtc1 $2,$f12 jalr $25 Please fix. Rainer