ppc64-fp.c (__floatunditf): New function.
* config/rs6000/ppc64-fp.c (__floatunditf): New function. (__floatundidf, __floatundisf): Likewise. From-SVN: r107494
This commit is contained in:
parent
66f788b0b3
commit
3f231c2937
|
@ -1,3 +1,8 @@
|
|||
2005-11-25 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* config/rs6000/ppc64-fp.c (__floatunditf): New function.
|
||||
(__floatundidf, __floatundisf): Likewise.
|
||||
|
||||
2005-11-25 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
* config/rs6000/rs6000.c (rs6000_sr_alias_set): Delete.
|
||||
|
|
|
@ -39,8 +39,11 @@ extern DItype __fixsfdi (SFtype);
|
|||
extern USItype __fixunsdfsi (DFtype);
|
||||
extern USItype __fixunssfsi (SFtype);
|
||||
extern TFtype __floatditf (DItype);
|
||||
extern TFtype __floatunditf (UDItype);
|
||||
extern DFtype __floatdidf (DItype);
|
||||
extern DFtype __floatundidf (UDItype);
|
||||
extern SFtype __floatdisf (DItype);
|
||||
extern SFtype __floatundisf (UDItype);
|
||||
extern DItype __fixunstfdi (TFtype);
|
||||
|
||||
static DItype local_fixunssfdi (SFtype);
|
||||
|
@ -100,6 +103,18 @@ __floatditf (DItype u)
|
|||
return (TFtype) dh + (TFtype) dl;
|
||||
}
|
||||
|
||||
TFtype
|
||||
__floatunditf (UDItype u)
|
||||
{
|
||||
DFtype dh, dl;
|
||||
|
||||
dh = (USItype) (u >> (sizeof (SItype) * 8));
|
||||
dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1));
|
||||
dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1));
|
||||
|
||||
return (TFtype) dh + (TFtype) dl;
|
||||
}
|
||||
|
||||
DFtype
|
||||
__floatdidf (DItype u)
|
||||
{
|
||||
|
@ -112,6 +127,18 @@ __floatdidf (DItype u)
|
|||
return d;
|
||||
}
|
||||
|
||||
DFtype
|
||||
__floatundidf (UDItype u)
|
||||
{
|
||||
DFtype d;
|
||||
|
||||
d = (USItype) (u >> (sizeof (SItype) * 8));
|
||||
d *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1));
|
||||
d += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1));
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
SFtype
|
||||
__floatdisf (DItype u)
|
||||
{
|
||||
|
@ -137,6 +164,30 @@ __floatdisf (DItype u)
|
|||
return (SFtype) f;
|
||||
}
|
||||
|
||||
SFtype
|
||||
__floatundisf (UDItype u)
|
||||
{
|
||||
DFtype f;
|
||||
|
||||
if (53 < (sizeof (DItype) * 8)
|
||||
&& 53 > ((sizeof (DItype) * 8) - 53 + 24))
|
||||
{
|
||||
if (u >= ((UDItype) 1 << 53))
|
||||
{
|
||||
if ((UDItype) u & (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1))
|
||||
{
|
||||
u &= ~ (((UDItype) 1 << ((sizeof (DItype) * 8) - 53)) - 1);
|
||||
u |= ((UDItype) 1 << ((sizeof (DItype) * 8) - 53));
|
||||
}
|
||||
}
|
||||
}
|
||||
f = (USItype) (u >> (sizeof (SItype) * 8));
|
||||
f *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1));
|
||||
f += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1));
|
||||
|
||||
return (SFtype) f;
|
||||
}
|
||||
|
||||
DItype
|
||||
__fixunstfdi (TFtype a)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue