Irix6 long doubles implemented wrong? (27_io/ostream_inserter_arith)

Alexandre Oliva aoliva@redhat.com
Sun Dec 22 10:24:00 GMT 2002


On Dec 21, 2002, Alexandre Oliva <aoliva@redhat.com> wrote:

> The other has to do with some gcse problems that, because of some
> gratuitous copying introduced inside such libcalls when PARALLELs
> are used, it ends up replacing uses of the REG_RETVAL of the libcall
> with uses of a pseudo internal to the libcall.  Then, the RETVAL
> ends up dead, and we delete the entire libcall sequence.  Oops :-)

It turned out that it wasn't gcse's fault, but rather a problem in
open-coded add/sub operations for wide types that failed to store the
result of a wide add/sub computation in the target without returning
the location of the result to the caller.  Oops.

>> I definitely support fixing the ABI, perhaps even on the 3.3 branch if
>> the patch is not too invasive.

> None of the patches seem risky, and they actually do fix real bugs,
> but, the more code I have to tweak, the less likely I fell this will
> find its way into the 3.3 branch :-(

s/fell/feel/

Anyway, I'm more confident about being able to get this patch in than
what I had last night, since I could revert the most intrusive parts
after fixing the aforementioned bug.  The result is almost pretty.
Tested in the 3.3 branch with a mips-sgi-irix6.5 bootstrap, as well as
by visual inspection of the assembly code emitted for some of the
attached source programs, as well as by execution of the programs that
contained main().

I feel I may be missing some additional rounding in the code that
packs back to the native long double format of irix, but I've now idea
of how to tell whether it's actually necessary.  Do any FP experts
care to comment?

Oh, it would probably be appropriate for us to use the native long
double function calls on IRIX, but since I was implementing this for a
different operating system, and I wanted to make sure the
implementation was compatible with that of IRIX, I didn't make the
effort to use the native IRIX library.  I'll leave that as an exercise
for those who actually care about long double performance on IRIX.
The performance of the current implementation is probably awful,
especially on multiplies and divides.  Get it right first, optimize
later, if ever :-D

Ok to install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-mips-tfmode-emul.patch
Type: text/x-patch
Size: 40952 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20021222/f72a815e/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


More information about the Gcc mailing list