public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/50061] New: [4.7 regression] emit_library_call_value_1 change broke SF->TI conversion on MIPS
@ 2011-08-12 18:02 ro at gcc dot gnu.org
  2011-08-12 20:34 ` [Bug middle-end/50061] " rsandifo at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2011-08-12 18:02 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
                CC: rdsandiford@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  <julian@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-02 17:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-12 18:02 [Bug middle-end/50061] New: [4.7 regression] emit_library_call_value_1 change broke SF->TI conversion on MIPS ro at gcc dot gnu.org
2011-08-12 20:34 ` [Bug middle-end/50061] " rsandifo at gcc dot gnu.org
2011-08-14  9:58 ` rguenth at gcc dot gnu.org
2011-08-17 14:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-09-22 13:39 ` rsandifo at gcc dot gnu.org
2011-10-02 17:50 ` rsandifo at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).