diff options
author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-20 00:42:29 +0000 |
---|---|---|
committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-20 00:42:29 +0000 |
commit | dc83e3a13b917c0c92e71dbe6a384cff18ae9ad6 (patch) | |
tree | f6f5efb500cbb0ac5e1911492d4637b9e6fd58d5 /gcc/libgcc2.c | |
parent | a6a5a20faf3d1146c61016a4739790abe1173e20 (diff) | |
download | gcc-dc83e3a13b917c0c92e71dbe6a384cff18ae9ad6.tar.gz |
* libgcc2.c (__floatdisf, __floatdidf): Don't use IBM Extended
Double TFmode.
(__floatundisf, __floatundidf): Likewise.
* libgcc2.h (IS_IBM_EXTENDED): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110004 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r-- | gcc/libgcc2.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 03cc448cab3..97717a428c9 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -1371,7 +1371,14 @@ __floatunditf (UDWtype u) #if (defined(L_floatdisf) && LIBGCC2_HAS_SF_MODE) \ || (defined(L_floatdidf) && LIBGCC2_HAS_DF_MODE) #define DI_SIZE (W_TYPE_SIZE * 2) -#define F_MODE_OK(SIZE) (SIZE < DI_SIZE && SIZE > (DI_SIZE - SIZE + FSSIZE)) +#define F_MODE_OK(SIZE) \ + (SIZE < DI_SIZE \ + && SIZE > (DI_SIZE - SIZE + FSSIZE) \ + /* Don't use IBM Extended Double TFmode for TI->SF calculations. \ + The conversion from long double to float suffers from double \ + rounding, because we convert via double. In any case, the \ + fallback code is faster. */ \ + && !IS_IBM_EXTENDED (SIZE)) #if defined(L_floatdisf) #define FUNC __floatdisf #define FSTYPE SFtype @@ -1476,7 +1483,14 @@ FUNC (DWtype u) #if (defined(L_floatundisf) && LIBGCC2_HAS_SF_MODE) \ || (defined(L_floatundidf) && LIBGCC2_HAS_DF_MODE) #define DI_SIZE (W_TYPE_SIZE * 2) -#define F_MODE_OK(SIZE) (SIZE < DI_SIZE && SIZE > (DI_SIZE - SIZE + FSSIZE)) +#define F_MODE_OK(SIZE) \ + (SIZE < DI_SIZE \ + && SIZE > (DI_SIZE - SIZE + FSSIZE) \ + /* Don't use IBM Extended Double TFmode for TI->SF calculations. \ + The conversion from long double to float suffers from double \ + rounding, because we convert via double. In any case, the \ + fallback code is faster. */ \ + && !IS_IBM_EXTENDED (SIZE)) #if defined(L_floatundisf) #define FUNC __floatundisf #define FSTYPE SFtype |