+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.
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);
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)
{
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)
{
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)
{