Le mardi 4 février 2014, 15:52:18 Thomas Preud'homme a écrit :
> On February 4, 2014 8:09:12 AM GMT+08:00, Austin English
<[email protected]> wrote:
> > FWIW, I see the same failures on Gentoo amd64, at
> > 4e5f15c6851c69c4cc5da18209218eb918dbee77 (also tested against
> > 2eb844f8b5ea0ae159eb3fcec78aa50bd8c03f11, but the problem is there as
> > well
>
> [...]
>
> > -ulltof: 18446744073709551616.000000
> > +ulltof: 2334.000000
>
> [...]
>
> > -ulltof: 18446744073709549568.000000
> > +ulltof: 2334.000000
>
> [...]
>
> > -ulltof: 18446744073709549282.000000
> > +ulltof: 2334.000000
Can you try with the attached patch applied?
Best regards,
Thomas
diff --git a/lib/libtcc1.c b/lib/libtcc1.c
index 44208cd..0c8e3bc 100644
--- a/lib/libtcc1.c
+++ b/lib/libtcc1.c
@@ -540,6 +540,8 @@ unsigned long long __fixunssfdi (float a1)
exp = EXP (fl1.l) - EXCESS - 24;
l = MANT(fl1.l);
+ if (SIGN(fl1.l))
+ l = -l;
if (exp >= 41)
return (unsigned long long)-1;
else if (exp >= 0)
@@ -565,6 +567,8 @@ unsigned long long __fixunsdfdi (double a1)
l = MANTD_LL(dl1);
+ if (SIGND(dl1.l))
+ l = -l;
if (exp >= 12)
return (unsigned long long)-1;
else if (exp >= 0)
@@ -590,6 +594,8 @@ unsigned long long __fixunsxfdi (long double a1)
l = dl1.l.lower;
+ if (SIGNLD(dl1.l))
+ l = -l;
if (exp > 0)
return (unsigned long long)-1;
else if (exp >= -63)
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel