diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-08 23:09:38 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-08 23:09:38 +0000 |
commit | ecbe6271cf193533d55f641b6ab892084e708b6d (patch) | |
tree | 9acd07cb03001cf82fde8716c9b81dcec93213bd /gcc/gengenrtl.c | |
parent | ff897acc1ec2a69226de0c61f485485100af6142 (diff) | |
download | gcc-ecbe6271cf193533d55f641b6ab892084e708b6d.tar.gz |
* gengenrtl.c (CONST_DOUBLE_FORMAT): Take the size REAL_ARITHMETIC
will use into account. Expand the max width to 5.
* rtl.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29216 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gengenrtl.c')
-rw-r--r-- | gcc/gengenrtl.c | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c index e6d932cbd46..e1addb64007 100644 --- a/gcc/gengenrtl.c +++ b/gcc/gengenrtl.c @@ -30,19 +30,45 @@ Boston, MA 02111-1307, USA. */ /* Calculate the format for CONST_DOUBLE. This depends on the relative widths of HOST_WIDE_INT and REAL_VALUE_TYPE. - We only need to go out to e0wwww, since min(HOST_WIDE_INT)==32 and - max(LONG_DOUBLE_TYPE_SIZE)==128. - This is duplicated in rtl.c. + + We need to go out to e0wwwww, since REAL_ARITHMETIC assumes 16-bits + per element in REAL_VALUE_TYPE. + + This is duplicated in rtl.c. + A number of places assume that there are always at least two 'w' slots in a CONST_DOUBLE, so we provide them even if one would suffice. */ -#if HOST_BITS_PER_WIDE_INT >= LONG_DOUBLE_TYPE_SIZE + +#ifdef REAL_ARITHMETIC +#if LONG_DOUBLE_TYPE_SIZE == 96 +#define REAL_WIDTH (11*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT +#elif LONG_DOUBLE_TYPE_SIZE == 128 +#define REAL_WIDTH (19*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT +#elif HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT +#define REAL_WIDTH (7*8 + HOST_BITS_PER_WIDE_INT)/HOST_BITS_PER_WIDE_INT +#endif +#endif /* REAL_ARITHMETIC */ + +#ifndef REAL_WIDTH +#if HOST_BITS_PER_WIDE_INT*2 >= LONG_DOUBLE_TYPE_SIZE +#define REAL_WIDTH 2 +#elif HOST_BITS_PER_WIDE_INT*3 >= LONG_DOUBLE_TYPE_SIZE +#define REAL_WIDTH 3 +#elif HOST_BITS_PER_WIDE_INT*4 >= LONG_DOUBLE_TYPE_SIZE +#define REAL_WIDTH 4 +#endif +#endif /* REAL_WIDTH */ + +#if REAL_WIDTH == 1 #define CONST_DOUBLE_FORMAT "e0ww" -#elif HOST_BITS_PER_WIDE_INT*2 >= LONG_DOUBLE_TYPE_SIZE +#elif REAL_WIDTH == 2 #define CONST_DOUBLE_FORMAT "e0ww" -#elif HOST_BITS_PER_WIDE_INT*3 >= LONG_DOUBLE_TYPE_SIZE +#elif REAL_WIDTH == 3 #define CONST_DOUBLE_FORMAT "e0www" -#elif HOST_BITS_PER_WIDE_INT*4 >= LONG_DOUBLE_TYPE_SIZE +#elif REAL_WIDTH == 4 #define CONST_DOUBLE_FORMAT "e0wwww" +#elif REAL_WIDTH == 5 +#define CONST_DOUBLE_FORMAT "e0wwwww" #else #define CONST_DOUBLE_FORMAT /* nothing - will cause syntax error */ #endif |