[PATCH, x86_64]: Use soft-fp for TFmode (128bit) FP.
Uros Bizjak
ubizjak@gmail.com
Thu Apr 12 20:48:00 GMT 2007
Hello!
This patch implements TFmode (128bit) floating point by using soft-fp
for x86_64 targets. To support TImode FP-int conversions, a bunch of
support files is added to soft-fp directory (+ a couple of small
bugfixes, as can be seen in attached soft-fp diff).
The bulk of sfp-machine.h is taken from libc and is further extended to
support TImode integers. Perhaps somebody will be interested in the
fact, that sfp-machine.h from libc can't be compiled due to the
definition of _FP_NANFRAC_Q and 64bit _FP_W_TYPE_SIZE. The attached
sfp-machine.h compiles OK.
The patch was bootstrapped on x86_64 and regression tested for all
default languages.
Following ChangeLog is without config/soft-fp changes:
2007-04-12 Uros Bizjak <ubizjak@gmail.com>
* config.gcc (x86_64-*-linux*, x86_64-*-kfreebsd*-gnu,
x86_64-*-knetbsd*-gnu): Add i386/t-fprules-softfp64
and soft-fp/t-softfp to tmake_file.
* config/i386/t-fprules-softfp64: New file.
* config/i386/sfp-machine.h: New file.
* config/i386/t-linux64 (softfp_wrap_start): New.
(softfp_wrap_end): New.
* config/i386/i386.c (ix86_scalar_mode_supported): TFmode is
supported for TARGET_64BIT.
Results, obtained with patched gcc are:
XPASS: gcc.dg/torture/fp-int-convert-float128-timode.c -O0 (test for
excess errors)
XPASS: gcc.dg/torture/fp-int-convert-float128-timode.c -O1 (test for
excess errors)
XPASS: gcc.dg/torture/fp-int-convert-float128-timode.c -O2 (test for
excess errors)
XPASS: gcc.dg/torture/fp-int-convert-float128-timode.c -O3
-fomit-frame-pointer (test for excess errors)
XPASS: gcc.dg/torture/fp-int-convert-float128-timode.c -O3 -g (test
for excess errors)
XPASS: gcc.dg/torture/fp-int-convert-float128-timode.c -Os (test for
excess errors)
XPASS: gcc.dg/torture/fp-int-convert-float128.c -O0 (test for excess
errors)
XPASS: gcc.dg/torture/fp-int-convert-float128.c -O1 (test for excess
errors)
XPASS: gcc.dg/torture/fp-int-convert-float128.c -O2 (test for excess
errors)
XPASS: gcc.dg/torture/fp-int-convert-float128.c -O3
-fomit-frame-pointer (test for excess errors)
XPASS: gcc.dg/torture/fp-int-convert-float128.c -O3 -g (test for
excess errors)
XPASS: gcc.dg/torture/fp-int-convert-float128.c -Os (test for excess
errors)
BTW: It is possible to support TFmode on SSE 32bit targets, but what
does ABI says for argument/result passing of __float128?
Uros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i386-fp128.diff
Type: text/x-patch
Size: 4463 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070412/9140196c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: soft-fp.diff
Type: text/x-patch
Size: 24207 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070412/9140196c/attachment-0001.bin>
More information about the Gcc-patches
mailing list