diff options
author | Richard Henderson <rth@redhat.com> | 2002-09-16 09:36:39 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-09-16 09:36:39 -0700 |
commit | efdc7e19ca67331ae7f0061c76964299db27242d (patch) | |
tree | e6577420306f750f19abf6c590eb0d8987ca7485 /gcc/emit-rtl.c | |
parent | 1f73c622253e00cd295fe09e07d6acee7c943e4e (diff) | |
download | gcc-efdc7e19ca67331ae7f0061c76964299db27242d.zip gcc-efdc7e19ca67331ae7f0061c76964299db27242d.tar.gz gcc-efdc7e19ca67331ae7f0061c76964299db27242d.tar.bz2 |
real.c, real.h: Rewrite from scratch.
gcc/
* real.c, real.h: Rewrite from scratch.
* Makefile.in (simplify-rtx.o): Depend on TREE_H.
(paranoia): New target.
* builtins.c (fold_builtin_inf): Use new real.h interface.
* c-common.c (builtin_define_with_hex_fp_value): Likewise.
* c-lex.c (interpret_float): Likewise.
* emit-rtl.c (gen_lowpart_common): Likewise.
* optabs.c (expand_float): Use real_2expN.
* config/ia64/ia64.md (divsi3, udivsi3): Likewise.
* defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New.
(FLOAT_WORDS_BIG_ENDIAN): New.
* cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE
directly to REAL_VALUE_NEGATIVE.
* loop.c (canonicalize_condition): Likewise.
* simplify-rtx.c: Include tree.h.
(simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX
with floating-point result modes.
* toplev.c (backend_init): Call init_real_once.
* fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE.
* tree.c (build_real): Likewise.
* config/alpha/alpha.c, config/vax/vax.c (float_strings,
float_values, inited_float_values, check_float_value): Remove.
* config/alpha/alpha.h, config/m68hc11/m68hc11.h,
config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove.
* doc/tm.texi (CHECK_FLOAT_VALUE): Remove.
gcc/f/
* target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_
directly to ffetarget_make_real1.
(ffetarget_real2): Similarly.
* target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_,
ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify.
gcc/java/
* jcf-parse.c (get_constant): Runtime check for IEEE format;
use new real.h interface.
* jcf-write.c (find_constant_index): Use new real.h interface.
* lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
contrib/
* paranoia.cc: New file.
From-SVN: r57198
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index b8297a8..70a1228 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1042,10 +1042,9 @@ gen_lowpart_common (mode, x) && GET_CODE (x) == CONST_INT) { REAL_VALUE_TYPE r; - HOST_WIDE_INT i; + long i = INTVAL (x); - i = INTVAL (x); - r = REAL_VALUE_FROM_TARGET_SINGLE (i); + real_from_target (&r, &i, mode); return CONST_DOUBLE_FROM_REAL_VALUE (r, mode); } else if (GET_MODE_CLASS (mode) == MODE_FLOAT @@ -1054,8 +1053,8 @@ gen_lowpart_common (mode, x) && GET_MODE (x) == VOIDmode) { REAL_VALUE_TYPE r; - HOST_WIDE_INT i[2]; HOST_WIDE_INT low, high; + long i[2]; if (GET_CODE (x) == CONST_INT) { @@ -1068,18 +1067,17 @@ gen_lowpart_common (mode, x) high = CONST_DOUBLE_HIGH (x); } -#if HOST_BITS_PER_WIDE_INT == 32 + if (HOST_BITS_PER_WIDE_INT > 32) + high = low >> 31 >> 1; + /* REAL_VALUE_TARGET_DOUBLE takes the addressing order of the target machine. */ if (WORDS_BIG_ENDIAN) i[0] = high, i[1] = low; else i[0] = low, i[1] = high; -#else - i[0] = low; -#endif - r = REAL_VALUE_FROM_TARGET_DOUBLE (i); + real_from_target (&r, i, mode); return CONST_DOUBLE_FROM_REAL_VALUE (r, mode); } else if ((GET_MODE_CLASS (mode) == MODE_INT |