Message ID | 201412231905.sBNJ5c3C004622@farm-0002.internal.tilera.com |
---|---|
State | New |
Headers | show |
On Tue, 23 Dec 2014, Chris Metcalf wrote: > I missed this during the initial port. Some testing shows that > enabling this mode does, unsurprisingly, yield some nice speedups > on the math functions in question. I take it that the ABI on tilegx32 allows the lround alias to llround (that is, the upper 32 bits of a return value are unspecified, so that when an out-of-range value is passed in the return value always acts consistently like some value of type long rather than causing undefined behavior in the caller as it would if the ABI requires sign extension or zero extension but the result isn't properly extended)? (That alias wouldn't be valid on MIPS n32, as all 32-bit values have to be sign-extended in registers - it's architecturally undefined how 32-bit instructions behave on 64-bit MIPS when given registers that aren't properly sign-extended.)
On 12/23/2014 3:06 PM, Joseph Myers wrote:
> I take it that the ABI on tilegx32 allows the lround alias to llround
No, it doesn't - I missed this possibility. I assume the best fix is to
provide an lround override in sysdeps/tile/tilegx/tilegx32/s_lround.c
that invokes llround() and then sign-extends the result?
But, why doesn't MIPS itself use this approach?
Thanks for catching this!
On Tue, 23 Dec 2014, Chris Metcalf wrote:
> But, why doesn't MIPS itself use this approach?
Use of sysdeps/ieee754/dbl-64/wordsize-64 for MIPS (to the extent
possible) is on the wiki todo list.
diff --git a/ChangeLog b/ChangeLog index 9ed06fd0ff4e..f7bfe913720a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-12-23 Chris Metcalf <cmetcalf@ezchip.com> + + * sysdeps/tile/tilegx/Implies: New file. + 2014-12-23 Richard Earnshaw <rearnsha@arm.com> * string/stpcpy.c (__stpcpy): Rewrite using strlen and memcpy. diff --git a/sysdeps/tile/tilegx/Implies b/sysdeps/tile/tilegx/Implies new file mode 100644 index 000000000000..ade71c1957e8 --- /dev/null +++ b/sysdeps/tile/tilegx/Implies @@ -0,0 +1 @@ +ieee754/dbl-64/wordsize-64