diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-03 21:10:09 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-03 21:10:09 +0000 |
commit | 4268f174a342afb4108ba0718c302c349d53128f (patch) | |
tree | 95ce10820dcdc63db9f1448b54fe058ae5559247 /gcc/emit-rtl.c | |
parent | ba403b8ee3c4394c51bfdf6539169e5c79957bed (diff) | |
download | gcc-4268f174a342afb4108ba0718c302c349d53128f.tar.gz |
* emit-rtl.c, final.c, fold-const.c, gengenrtl.c, optabs.c,
print-tree.c, real.c, real.h, recog.c, rtl.c, simplify-rtx.c,
tree.c, config/m68k/m68k.c, f/com.c, f/target.h, java/expr.c,
java/jcf-parse.c, java/lex.c:
Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
REAL_ARITHMETIC blocks unconditional. Delete some further
#ifdef blocks predicated on REAL_ARITHMETIC.
* flags.h, toplev.c: Delete remaining references to
flag_pretend_float.
* doc/invoke.texi: Remove documentation of -fpretend-float.
* doc/tm.texi: Describe the various REAL_* macros as provided by
real.h, not by the target configuration files.
* config/alpha/alpha.h, config/alpha/unicosmk.h, config/arm/arm.h,
config/avr/avr.h, config/c4x/c4x.h, config/convex/convex.h,
config/cris/cris.h, config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i370/i370.h, config/i386/i386.h,
config/i386/osf1elf.h, config/i960/i960.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/dpx2.h,
config/m68k/linux-aout.h, config/m68k/linux.h, config/m68k/m68k.h,
config/m68k/sun3.h, config/m68k/vxm68k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/mn10200/mn10200.h,
config/mn10300/mn10300.h, config/pa/pa.h, config/pj/pj.h,
config/rs6000/rs6000.h, config/s390/s390.h, config/sh/sh.h,
config/sparc/freebsd.h, config/sparc/linux.h, config/sparc/linux64.h,
config/sparc/sol2.h, config/sparc/sparc.h, config/sparc/vxsim.h,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h,
config/xtensa/xtensa.h:
Do not define, undefine, or mention in comments any of
REAL_ARITHMETIC, REAL_VALUE_ATOF, REAL_VALUE_HTOF,
REAL_VALUE_ISNAN, REAL_VALUE_ISINF,
REAL_VALUE_TO_TARGET_SINGLE, REAL_VALUE_TO_TARGET_DOUBLE,
REAL_VALUE_TO_TARGET_LONG_DOUBLE, REAL_VALUE_TO_DECIMAL,
REAL_VALUE_TYPE, REAL_VALUES_EQUAL, REAL_VALUES_LESS,
REAL_VALUE_LDEXP, REAL_VALUE_FIX, REAL_VALUE_UNSIGNED_FIX,
REAL_VALUE_RNDZINT, REAL_VALUE_UNSIGNED_RNDZINT,
REAL_INFINITY, REAL_VALUE_NEGATE, REAL_VALUE_TRUNCATE,
REAL_VALUE_TO_INT, or REAL_VALUE_FROM_INT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 147 |
1 files changed, 1 insertions, 146 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 6b3a9cb0288..ae3ab5f070e 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -887,94 +887,7 @@ gen_lowpart_common (mode, x) } } -#ifndef REAL_ARITHMETIC - /* If X is an integral constant but we want it in floating-point, it - must be the case that we have a union of an integer and a floating-point - value. If the machine-parameters allow it, simulate that union here - and return the result. The two-word and single-word cases are - different. */ - - else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT - && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) - || flag_pretend_float) - && GET_MODE_CLASS (mode) == MODE_FLOAT - && GET_MODE_SIZE (mode) == UNITS_PER_WORD - && GET_CODE (x) == CONST_INT - && sizeof (float) * HOST_BITS_PER_CHAR == HOST_BITS_PER_WIDE_INT) - { - union {HOST_WIDE_INT i; float d; } u; - - u.i = INTVAL (x); - return CONST_DOUBLE_FROM_REAL_VALUE (u.d, mode); - } - else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT - && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) - || flag_pretend_float) - && GET_MODE_CLASS (mode) == MODE_FLOAT - && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD - && (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE) - && GET_MODE (x) == VOIDmode - && (sizeof (double) * HOST_BITS_PER_CHAR - == 2 * HOST_BITS_PER_WIDE_INT)) - { - union {HOST_WIDE_INT i[2]; double d; } u; - HOST_WIDE_INT low, high; - - if (GET_CODE (x) == CONST_INT) - low = INTVAL (x), high = low >> (HOST_BITS_PER_WIDE_INT -1); - else - low = CONST_DOUBLE_LOW (x), high = CONST_DOUBLE_HIGH (x); -#ifdef HOST_WORDS_BIG_ENDIAN - u.i[0] = high, u.i[1] = low; -#else - u.i[0] = low, u.i[1] = high; -#endif - return CONST_DOUBLE_FROM_REAL_VALUE (u.d, mode); - } - - /* Similarly, if this is converting a floating-point value into a - single-word integer. Only do this is the host and target parameters are - compatible. */ - - else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT - && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) - || flag_pretend_float) - && (GET_MODE_CLASS (mode) == MODE_INT - || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT) - && GET_CODE (x) == CONST_DOUBLE - && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT - && GET_MODE_BITSIZE (mode) == BITS_PER_WORD) - return constant_subword (x, (offset / UNITS_PER_WORD), GET_MODE (x)); - - /* Similarly, if this is converting a floating-point value into a - two-word integer, we can do this one word at a time and make an - integer. Only do this is the host and target parameters are - compatible. */ - - else if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT - && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) - || flag_pretend_float) - && (GET_MODE_CLASS (mode) == MODE_INT - || GET_MODE_CLASS (mode) == MODE_PARTIAL_INT) - && GET_CODE (x) == CONST_DOUBLE - && GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT - && GET_MODE_BITSIZE (mode) == 2 * BITS_PER_WORD) - { - rtx lowpart, highpart; - - lowpart = constant_subword (x, - (offset / UNITS_PER_WORD) + WORDS_BIG_ENDIAN, - GET_MODE (x)); - highpart = constant_subword (x, - (offset / UNITS_PER_WORD) + (! WORDS_BIG_ENDIAN), - GET_MODE (x)); - if (lowpart && GET_CODE (lowpart) == CONST_INT - && highpart && GET_CODE (highpart) == CONST_INT) - return immed_double_const (INTVAL (lowpart), INTVAL (highpart), mode); - } -#else /* ifndef REAL_ARITHMETIC */ - - /* When we have a FP emulator, we can handle all conversions between + /* The floating-point emulator can handle all conversions between FP and integer operands. This simplifies reload because it doesn't have to deal with constructs like (subreg:DI (const_double:SF ...)) or (subreg:DF (const_int ...)). */ @@ -1076,7 +989,6 @@ gen_lowpart_common (mode, x) mode); #endif } -#endif /* ifndef REAL_ARITHMETIC */ /* Otherwise, we can't do this. */ return 0; @@ -1310,7 +1222,6 @@ constant_subword (op, offset, mode) && GET_MODE_SIZE (mode) == UNITS_PER_WORD) return op; -#ifdef REAL_ARITHMETIC /* The output is some bits, the width of the target machine's word. A wider-word host can surely hold them in a CONST_INT. A narrower-word host can't. */ @@ -1389,32 +1300,10 @@ constant_subword (op, offset, mode) else abort (); } -#else /* no REAL_ARITHMETIC */ - if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT - && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) - || flag_pretend_float) - && GET_MODE_CLASS (mode) == MODE_FLOAT - && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD - && GET_CODE (op) == CONST_DOUBLE) - { - /* The constant is stored in the host's word-ordering, - but we want to access it in the target's word-ordering. Some - compilers don't like a conditional inside macro args, so we have two - copies of the return. */ -#ifdef HOST_WORDS_BIG_ENDIAN - return GEN_INT (offset == WORDS_BIG_ENDIAN - ? CONST_DOUBLE_HIGH (op) : CONST_DOUBLE_LOW (op)); -#else - return GEN_INT (offset != WORDS_BIG_ENDIAN - ? CONST_DOUBLE_HIGH (op) : CONST_DOUBLE_LOW (op)); -#endif - } -#endif /* no REAL_ARITHMETIC */ /* Single word float is a little harder, since single- and double-word values often do not have the same high-order bits. We have already verified that we want the only defined word of the single-word value. */ -#ifdef REAL_ARITHMETIC if (GET_MODE_CLASS (mode) == MODE_FLOAT && GET_MODE_BITSIZE (mode) == 32 && GET_CODE (op) == CONST_DOUBLE) @@ -1438,40 +1327,6 @@ constant_subword (op, offset, mode) return GEN_INT (val); } -#else - if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT - && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) - || flag_pretend_float) - && sizeof (float) * 8 == HOST_BITS_PER_WIDE_INT - && GET_MODE_CLASS (mode) == MODE_FLOAT - && GET_MODE_SIZE (mode) == UNITS_PER_WORD - && GET_CODE (op) == CONST_DOUBLE) - { - double d; - union {float f; HOST_WIDE_INT i; } u; - - REAL_VALUE_FROM_CONST_DOUBLE (d, op); - - u.f = d; - return GEN_INT (u.i); - } - if (((HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT - && HOST_BITS_PER_WIDE_INT == BITS_PER_WORD) - || flag_pretend_float) - && sizeof (double) * 8 == HOST_BITS_PER_WIDE_INT - && GET_MODE_CLASS (mode) == MODE_FLOAT - && GET_MODE_SIZE (mode) == UNITS_PER_WORD - && GET_CODE (op) == CONST_DOUBLE) - { - double d; - union {double d; HOST_WIDE_INT i; } u; - - REAL_VALUE_FROM_CONST_DOUBLE (d, op); - - u.d = d; - return GEN_INT (u.i); - } -#endif /* no REAL_ARITHMETIC */ /* The only remaining cases that we can handle are integers. Convert to proper endianness now since these cases need it. |