diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2002-03-03 21:10:09 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2002-03-03 21:10:09 +0000 |
commit | ba31d94ee642e435d03ba73be3db027b362edd1b (patch) | |
tree | 95ce10820dcdc63db9f1448b54fe058ae5559247 /gcc/simplify-rtx.c | |
parent | e98f0f5c1310aef9c628db762adc220b7521c027 (diff) | |
download | gcc-ba31d94ee642e435d03ba73be3db027b362edd1b.zip gcc-ba31d94ee642e435d03ba73be3db027b362edd1b.tar.gz gcc-ba31d94ee642e435d03ba73be3db027b362edd1b.tar.bz2 |
emit-rtl.c, [...]: Remove all #ifndef REAL_ARITHMETIC blocks...
* 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.
From-SVN: r50263
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 80 |
1 files changed, 1 insertions, 79 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 55cbfc6..5596e0c 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -102,10 +102,8 @@ static rtx simplify_plus_minus PARAMS ((enum rtx_code, enum machine_mode, rtx, rtx, int)); static void check_fold_consts PARAMS ((PTR)); -#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) static void simplify_unary_real PARAMS ((PTR)); static void simplify_binary_real PARAMS ((PTR)); -#endif static void simplify_binary_is2orm1 PARAMS ((PTR)); @@ -339,7 +337,6 @@ simplify_replace_rtx (x, old, new) return x; } -#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) /* Subroutine of simplify_unary_operation, called via do_float_handler. Handles simplification of unary ops on floating point values. */ struct simplify_unary_real_args @@ -398,7 +395,6 @@ simplify_unary_real (p) args->result = CONST_DOUBLE_FROM_REAL_VALUE (d, args->mode); } } -#endif /* Try to simplify a unary operation CODE whose output mode is to be MODE with input operand OP whose mode was originally OP_MODE. @@ -417,8 +413,6 @@ simplify_unary_operation (code, mode, op, op_mode) check the wrong mode (input vs. output) for a conversion operation, such as FIX. At some point, this should be simplified. */ -#if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC) - if (code == FLOAT && GET_MODE (trueop) == VOIDmode && (GET_CODE (trueop) == CONST_DOUBLE || GET_CODE (trueop) == CONST_INT)) { @@ -430,25 +424,7 @@ simplify_unary_operation (code, mode, op, op_mode) else lv = CONST_DOUBLE_LOW (trueop), hv = CONST_DOUBLE_HIGH (trueop); -#ifdef REAL_ARITHMETIC REAL_VALUE_FROM_INT (d, lv, hv, mode); -#else - if (hv < 0) - { - d = (double) (~ hv); - d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) - * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))); - d += (double) (unsigned HOST_WIDE_INT) (~ lv); - d = (- d - 1.0); - } - else - { - d = (double) hv; - d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) - * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))); - d += (double) (unsigned HOST_WIDE_INT) lv; - } -#endif /* REAL_ARITHMETIC */ d = real_value_truncate (mode, d); return CONST_DOUBLE_FROM_REAL_VALUE (d, mode); } @@ -476,19 +452,10 @@ simplify_unary_operation (code, mode, op, op_mode) else hv = 0, lv &= GET_MODE_MASK (op_mode); -#ifdef REAL_ARITHMETIC REAL_VALUE_FROM_UNSIGNED_INT (d, lv, hv, mode); -#else - - d = (double) (unsigned HOST_WIDE_INT) hv; - d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) - * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))); - d += (double) (unsigned HOST_WIDE_INT) lv; -#endif /* REAL_ARITHMETIC */ d = real_value_truncate (mode, d); return CONST_DOUBLE_FROM_REAL_VALUE (d, mode); } -#endif if (GET_CODE (trueop) == CONST_INT && width <= HOST_BITS_PER_WIDE_INT && width > 0) @@ -664,7 +631,6 @@ simplify_unary_operation (code, mode, op, op_mode) return immed_double_const (lv, hv, mode); } -#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) else if (GET_CODE (trueop) == CONST_DOUBLE && GET_MODE_CLASS (mode) == MODE_FLOAT) { @@ -696,7 +662,7 @@ simplify_unary_operation (code, mode, op, op_mode) return 0; } -#endif + /* This was formerly used only for non-IEEE float. eggert@twinsun.com says it is safe for IEEE also. */ else @@ -770,7 +736,6 @@ simplify_unary_operation (code, mode, op, op_mode) } } -#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) /* Subroutine of simplify_binary_operation, called via do_float_handler. Handles simplification of binary ops on floating point values. */ struct simplify_binary_real_args @@ -794,7 +759,6 @@ simplify_binary_real (p) f0 = real_value_truncate (args->mode, f0); f1 = real_value_truncate (args->mode, f1); -#ifdef REAL_ARITHMETIC #ifndef REAL_INFINITY if (args->code == DIV && REAL_VALUES_EQUAL (f1, dconst0)) { @@ -803,40 +767,10 @@ simplify_binary_real (p) } #endif REAL_ARITHMETIC (value, rtx_to_tree_code (args->code), f0, f1); -#else - switch (args->code) - { - case PLUS: - value = f0 + f1; - break; - case MINUS: - value = f0 - f1; - break; - case MULT: - value = f0 * f1; - break; - case DIV: -#ifndef REAL_INFINITY - if (f1 == 0) - return 0; -#endif - value = f0 / f1; - break; - case SMIN: - value = MIN (f0, f1); - break; - case SMAX: - value = MAX (f0, f1); - break; - default: - abort (); - } -#endif value = real_value_truncate (args->mode, value); args->result = CONST_DOUBLE_FROM_REAL_VALUE (value, args->mode); } -#endif /* Another subroutine called via do_float_handler. This one tests the floating point value given against 2. and -1. */ @@ -894,7 +828,6 @@ simplify_binary_operation (code, mode, op0, op1) tem = trueop0, trueop0 = trueop1, trueop1 = tem; } -#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) if (GET_MODE_CLASS (mode) == MODE_FLOAT && GET_CODE (trueop0) == CONST_DOUBLE && GET_CODE (trueop1) == CONST_DOUBLE @@ -910,7 +843,6 @@ simplify_binary_operation (code, mode, op0, op1) return args.result; return 0; } -#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ /* We can fold some multi-word operations. */ if (GET_MODE_CLASS (mode) == MODE_INT @@ -1432,7 +1364,6 @@ simplify_binary_operation (code, mode, op0, op1) && ! side_effects_p (op1)) return op0; -#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) /* Change division by a constant into multiplication. Only do this with -funsafe-math-optimizations. */ else if (GET_CODE (trueop1) == CONST_DOUBLE @@ -1445,18 +1376,11 @@ simplify_binary_operation (code, mode, op0, op1) if (! REAL_VALUES_EQUAL (d, dconst0)) { -#if defined (REAL_ARITHMETIC) REAL_ARITHMETIC (d, rtx_to_tree_code (DIV), dconst1, d); return gen_rtx_MULT (mode, op0, CONST_DOUBLE_FROM_REAL_VALUE (d, mode)); -#else - return - gen_rtx_MULT (mode, op0, - CONST_DOUBLE_FROM_REAL_VALUE (1./d, mode)); -#endif } } -#endif break; case UMOD: @@ -2102,7 +2026,6 @@ simplify_relational_operation (code, mode, op0, op1) /* If the operands are floating-point constants, see if we can fold the result. */ -#if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) else if (GET_CODE (trueop0) == CONST_DOUBLE && GET_CODE (trueop1) == CONST_DOUBLE && GET_MODE_CLASS (GET_MODE (trueop0)) == MODE_FLOAT) @@ -2145,7 +2068,6 @@ simplify_relational_operation (code, mode, op0, op1) op0lt = op0ltu = args.op0lt; op1lt = op1ltu = args.op1lt; } -#endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ /* Otherwise, see if the operands are both integers. */ else if ((GET_MODE_CLASS (mode) == MODE_INT || mode == VOIDmode) |