public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/12749] New: i386 LP64 bug.
@ 2003-10-23 20:42 matt at 3am-software dot com
  2003-10-23 21:27 ` [Bug target/12749] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: matt at 3am-software dot com @ 2003-10-23 20:42 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12749

           Summary: i386 LP64 bug.
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: matt at 3am-software dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64--netbsd
  GCC host triplet: x86_64--netbsd
GCC target triplet: i386--netbsdelf

The attached program will emit assembly that gas will complain about:
e_sinhf.s:134: Error: missing or invalid immediate expression 
`0xffffffffbf000000' taken as 0
e_sinhf.s:134: Error: suffix or operands invalid for `mov'

--- i386.c      18 Oct 2003 11:10:38 -0000      1.1.1.2
+++ i386.c      23 Oct 2003 20:39:10 -0000
@@ -7076,21 +7076,21 @@
   else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == SFmode)
     {
       REAL_VALUE_TYPE r;
       long l;
 
       REAL_VALUE_FROM_CONST_DOUBLE (r, x);
       REAL_VALUE_TO_TARGET_SINGLE (r, l);
 
       if (ASSEMBLER_DIALECT == ASM_ATT)
        putc ('$', file);
-      fprintf (file, "0x%lx", l);
+      fprintf (file, "0x%lx", l & 0xffffffff);
     }
 
  /* These float cases don't actually occur as immediate operands.  */
  else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == DFmode)
     {
       char dstr[30];
 
       real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (x), sizeof (dstr), 0, 1);
       fprintf (file, "%s", dstr);
     }





float fabsf (float);
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef union
{
  float value;
  __uint32_t word;
} ieee_float_shape_type;
extern float __ieee754_expf (float);
extern float __ieee754_sinhf (float);
static const float one = 1.0, shuge = 1.0e37;
float
__ieee754_sinhf(float x)
{
        float t,w,h;
        __int32_t ix,jx;
        do { ieee_float_shape_type gf_u; gf_u.value = (x); (jx) = gf_u.word; } w
hile (0);
        ix = jx&0x7fffffff;
        if(ix>=0x7f800000) return x+x;
        h = 0.5;
        if (jx<0) h = -h;
        if (ix < 0x41b00000) {
            if (ix<0x31800000)
                if(shuge+x>one) return x;
            t = expm1f(fabsf(x));
            if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one));
            return h*(t+t/(t+one));
        }
        if (ix < 0x42b17180) return h*__ieee754_expf(fabsf(x));
        if (ix<=0x42b2d4fc) {
            w = __ieee754_expf((float)0.5*fabsf(x));
            t = h*w;
            return t*w;
        }
        return x*shuge;
}


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

end of thread, other threads:[~2003-12-20 21:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-23 20:42 [Bug target/12749] New: i386 LP64 bug matt at 3am-software dot com
2003-10-23 21:27 ` [Bug target/12749] " pinskia at gcc dot gnu dot org
2003-12-20  8:36 ` pinskia at gcc dot gnu dot org
2003-12-20 23:17 ` cvs-commit at gcc dot gnu dot org
2003-12-20 23:32 ` pinskia at gcc dot gnu dot 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).