This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Powerpc64 long double support
Alan Modra <amodra@bigpond.net.au> writes:
> On Wed, Mar 10, 2004 at 09:42:36AM +0000, Richard Sandiford wrote:
>> when compiled with MIPSpro cc.
>
> Does MIPSpro correctly convert a long double -0.0 to double -0.0? Does
> mips gcc?
Seems like it. The attached program prints the expected:
-0 : 80000000 00000000
when compiled with either MIPSpro or gcc 3.4.
Richard
#include <float.h>
void print_it (const char *fmt, double d)
{
union { double d; unsigned int i[2]; } u;
u.d = d;
printf ("%8s : %08x %08x\n", fmt, u.i[0], u.i[1]);
}
long double f () { return -LDBL_MIN / 1e100L; }
int main ()
{
print_it ("-0", f ());
return 0;
}