diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-10-05 11:37:49 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-10-05 11:37:49 +0000 |
commit | 34a72c3348688368e2a1b2184dbd05669cacbc75 (patch) | |
tree | 485a3faa34e28a49425e690f198aba8a995f7684 /gcc | |
parent | 555affd7a4f447571131895d618c42073d0dd973 (diff) | |
download | gcc-34a72c3348688368e2a1b2184dbd05669cacbc75.zip gcc-34a72c3348688368e2a1b2184dbd05669cacbc75.tar.gz gcc-34a72c3348688368e2a1b2184dbd05669cacbc75.tar.bz2 |
Remove REAL_VALUE_FROM_CONST_DOUBLE
To maintain symmetry after the previous removal of
CONST_DOUBLE_FROM_REAL_VALUE, this patch also gets rid of
REAL_VALUE_FROM_CONST_DOUBLE. All the macro did was copy the
contents of CONST_DOUBLE_REAL_VALUE into a temporary real_value
structure. In many cases there was no need for this temporary
and we could simply use the CONST_DOUBLE_REAL_VALUE directly.
For that reason this patch is less automatic than the others.
Bootstrapped & regression-tested on x86_64-linux-gnu. Also tested by
building one target per CPU directory and checking that there were
no new warnings and no changes in testsuite output at -O2.
gcc/
* real.h (REAL_VALUE_FROM_CONST_DOUBLE): Delete.
* config/aarch64/aarch64.c (aarch64_float_const_zero_rtx_p)
(aarch64_print_operand, aarch64_float_const_representable_p)
(aarch64_output_simd_mov_immediate): Use CONST_DOUBLE_REAL_VALUE
instead of REAL_VALUE_FROM_CONST_DOUBLE.
* config/arc/arc.c (arc_print_operand): Likewise.
* config/arm/arm.c (arm_const_double_rtx, vfp3_const_double_index)
(neon_valid_immediate, arm_print_operand, arm_emit_fp16_const)
(vfp3_const_double_for_fract_bits, vfp3_const_double_for_bits):
Likewise.
* config/arm/arm.md (*arm32_movhf, consttable_4, consttable_8)
(consttable_16): Likewise.
* config/arm/vfp.md (*movhf_vfp_neon, *movhf_vfp): Likewise.
* config/avr/avr.c (avr_print_operand): Likewise.
* config/bfin/bfin.md: Likewise (in a define_split).
* config/c6x/c6x.md: Likewise (in a define_split).
* config/cr16/cr16.c (cr16_const_double_ok): Likewise.
(cr16_print_operand): Likewise.
* config/cris/cris.c (cris_print_operand): Likewise.
* config/epiphany/epiphany.c (epiphany_print_operand): Likewise.
* config/fr30/fr30.c (fr30_print_operand): Likewise.
(fr30_const_double_is_zero): Likewise.
* config/frv/frv.c (frv_print_operand, output_move_single): Likewise.
* config/frv/frv.md: Likewise (in a define_split).
* config/frv/predicates.md (int_2word_operand): Likewise.
* config/h8300/h8300.c (h8300_print_operand): Likewise.
* config/i386/i386.c (standard_80387_constant_p): Likewise.
(ix86_print_operand, ix86_split_to_parts): Likewise.
* config/i386/i386.md: Likewise (in a define_split).
* config/ia64/ia64.c (ia64_split_tmode, ia64_print_operand): Likewise.
* config/iq2000/iq2000.md (movsf_lo_sum, movsf_high): Likewise.
* config/m32r/m32r.c (easy_df_const, m32r_print_operand): Likewise.
* config/m68k/m68k.c (handle_move_double, standard_68881_constant_p)
(print_operand): Likewise.
* config/m68k/m68k.md (movsf_cf_hard, movdf_cf_hard): Likewise.
* config/mep/mep.md: Likewise (in define_split).
* config/microblaze/microblaze.c (microblaze_const_double_ok)
(print_operand): Likewise.
* config/mips/mips.md (consttable_float): Likewise.
* config/mmix/mmix.c (mmix_intval): Likewise.
* config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
* config/nvptx/nvptx.c (nvptx_print_operand): Likewise.
* config/pa/pa.c (pa_singlemove_string): Likewise.
* config/pdp11/pdp11.c (pdp11_expand_operands): Likewise.
(pdp11_asm_print_operand, legitimate_const_double_p): Likewise.
* config/rs6000/rs6000.c (num_insns_constant, rs6000_emit_cmove)
(output_toc): Likewise.
* config/rs6000/rs6000.md: Likewise (in define_splits).
* config/rx/rx.c (rx_print_operand): Likewise.
* config/s390/s390.c (s390_output_pool_entry): Likewise.
* config/sh/sh.c (fp_zero_operand, fp_one_operand): Likewise.
* config/sh/sh.md (consttable_sf, consttable_df): Likewise
(and also in define_splits).
* config/sparc/sparc.c (fp_sethi_p, fp_mov_p): Likewise.
(fp_high_losum_p): Likewise.
* config/sparc/sparc.md (*movsf_insn, *movsf_lo_sum): Likewise.
(*movsf_high): Likewise.
* config/spu/spu.c (const_double_to_hwint): Likewise.
* config/v850/v850.c (const_double_split): Likewise.
* config/vax/vax.c (vax_float_literal): Likewise.
* config/visium/visium.c (visium_expand_copysign): Likewise.
* config/visium/visium.md: Likewise (in define_split).
* config/xtensa/predicates.md (const_float_1_operand): Likewise.
* config/xtensa/xtensa.c (print_operand): Likewise.
(xtensa_output_literal): Likewise.
* cprop.c (implicit_set_cond_p): Likewise.
* dwarf2out.c (insert_float): Likewise.
* expmed.c (expand_mult, make_tree): Likewise.
* expr.c (compress_float_constant): Likewise.
* rtlanal.c (split_double): Likewise.
* simplify-rtx.c (avoid_constant_pool_reference): Likewise.
(simplify_const_unary_operation, simplify_binary_operation_1)
(simplify_const_binary_operation): Likewise.
(simplify_const_relational_operation): Likewise.
* varasm.c (output_constant_pool_2): Likewise.
From-SVN: r228478
Diffstat (limited to 'gcc')
55 files changed, 294 insertions, 443 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 853c728..aade459 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,83 @@ 2015-10-05 Richard Sandiford <richard.sandiford@arm.com> + * real.h (REAL_VALUE_FROM_CONST_DOUBLE): Delete. + * config/aarch64/aarch64.c (aarch64_float_const_zero_rtx_p) + (aarch64_print_operand, aarch64_float_const_representable_p) + (aarch64_output_simd_mov_immediate): Use CONST_DOUBLE_REAL_VALUE + instead of REAL_VALUE_FROM_CONST_DOUBLE. + * config/arc/arc.c (arc_print_operand): Likewise. + * config/arm/arm.c (arm_const_double_rtx, vfp3_const_double_index) + (neon_valid_immediate, arm_print_operand, arm_emit_fp16_const) + (vfp3_const_double_for_fract_bits, vfp3_const_double_for_bits): + Likewise. + * config/arm/arm.md (*arm32_movhf, consttable_4, consttable_8) + (consttable_16): Likewise. + * config/arm/vfp.md (*movhf_vfp_neon, *movhf_vfp): Likewise. + * config/avr/avr.c (avr_print_operand): Likewise. + * config/bfin/bfin.md: Likewise (in a define_split). + * config/c6x/c6x.md: Likewise (in a define_split). + * config/cr16/cr16.c (cr16_const_double_ok): Likewise. + (cr16_print_operand): Likewise. + * config/cris/cris.c (cris_print_operand): Likewise. + * config/epiphany/epiphany.c (epiphany_print_operand): Likewise. + * config/fr30/fr30.c (fr30_print_operand): Likewise. + (fr30_const_double_is_zero): Likewise. + * config/frv/frv.c (frv_print_operand, output_move_single): Likewise. + * config/frv/frv.md: Likewise (in a define_split). + * config/frv/predicates.md (int_2word_operand): Likewise. + * config/h8300/h8300.c (h8300_print_operand): Likewise. + * config/i386/i386.c (standard_80387_constant_p): Likewise. + (ix86_print_operand, ix86_split_to_parts): Likewise. + * config/i386/i386.md: Likewise (in a define_split). + * config/ia64/ia64.c (ia64_split_tmode, ia64_print_operand): Likewise. + * config/iq2000/iq2000.md (movsf_lo_sum, movsf_high): Likewise. + * config/m32r/m32r.c (easy_df_const, m32r_print_operand): Likewise. + * config/m68k/m68k.c (handle_move_double, standard_68881_constant_p) + (print_operand): Likewise. + * config/m68k/m68k.md (movsf_cf_hard, movdf_cf_hard): Likewise. + * config/mep/mep.md: Likewise (in define_split). + * config/microblaze/microblaze.c (microblaze_const_double_ok) + (print_operand): Likewise. + * config/mips/mips.md (consttable_float): Likewise. + * config/mmix/mmix.c (mmix_intval): Likewise. + * config/mn10300/mn10300.c (mn10300_print_operand): Likewise. + * config/nvptx/nvptx.c (nvptx_print_operand): Likewise. + * config/pa/pa.c (pa_singlemove_string): Likewise. + * config/pdp11/pdp11.c (pdp11_expand_operands): Likewise. + (pdp11_asm_print_operand, legitimate_const_double_p): Likewise. + * config/rs6000/rs6000.c (num_insns_constant, rs6000_emit_cmove) + (output_toc): Likewise. + * config/rs6000/rs6000.md: Likewise (in define_splits). + * config/rx/rx.c (rx_print_operand): Likewise. + * config/s390/s390.c (s390_output_pool_entry): Likewise. + * config/sh/sh.c (fp_zero_operand, fp_one_operand): Likewise. + * config/sh/sh.md (consttable_sf, consttable_df): Likewise + (and also in define_splits). + * config/sparc/sparc.c (fp_sethi_p, fp_mov_p): Likewise. + (fp_high_losum_p): Likewise. + * config/sparc/sparc.md (*movsf_insn, *movsf_lo_sum): Likewise. + (*movsf_high): Likewise. + * config/spu/spu.c (const_double_to_hwint): Likewise. + * config/v850/v850.c (const_double_split): Likewise. + * config/vax/vax.c (vax_float_literal): Likewise. + * config/visium/visium.c (visium_expand_copysign): Likewise. + * config/visium/visium.md: Likewise (in define_split). + * config/xtensa/predicates.md (const_float_1_operand): Likewise. + * config/xtensa/xtensa.c (print_operand): Likewise. + (xtensa_output_literal): Likewise. + * cprop.c (implicit_set_cond_p): Likewise. + * dwarf2out.c (insert_float): Likewise. + * expmed.c (expand_mult, make_tree): Likewise. + * expr.c (compress_float_constant): Likewise. + * rtlanal.c (split_double): Likewise. + * simplify-rtx.c (avoid_constant_pool_reference): Likewise. + (simplify_const_unary_operation, simplify_binary_operation_1) + (simplify_const_binary_operation): Likewise. + (simplify_const_relational_operation): Likewise. + * varasm.c (output_constant_pool_2): Likewise. + +2015-10-05 Richard Sandiford <richard.sandiford@arm.com> + * real.h (CONST_DOUBLE_ATOF): Use const_double_from_real_value instead of CONST_DOUBLE_FROM_REAL_VALUE. (CONST_DOUBLE_FROM_REAL_VALUE): Delete. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index a1057c9..c9fe368 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -3763,15 +3763,12 @@ aarch64_legitimate_address_p (machine_mode mode, rtx x, bool aarch64_float_const_zero_rtx_p (rtx x) { - REAL_VALUE_TYPE r; - if (GET_MODE (x) == VOIDmode) return false; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - if (REAL_VALUE_MINUS_ZERO (r)) + if (REAL_VALUE_MINUS_ZERO (*CONST_DOUBLE_REAL_VALUE (x))) return !HONOR_SIGNED_ZEROS (GET_MODE (x)); - return real_equal (&r, &dconst0); + return real_equal (CONST_DOUBLE_REAL_VALUE (x), &dconst0); } /* Return the fixed registers used for condition codes. */ @@ -4401,9 +4398,8 @@ aarch64_print_operand (FILE *f, rtx x, char code) { #define buf_size 20 char float_buf[buf_size] = {'\0'}; - REAL_VALUE_TYPE r; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - real_to_decimal_for_mode (float_buf, &r, + real_to_decimal_for_mode (float_buf, + CONST_DOUBLE_REAL_VALUE (x), buf_size, buf_size, 1, GET_MODE (x)); asm_fprintf (asm_out_file, "%s", float_buf); @@ -11309,7 +11305,7 @@ aarch64_float_const_representable_p (rtx x) if (GET_MODE (x) == VOIDmode || GET_MODE (x) == HFmode) return false; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); + r = *CONST_DOUBLE_REAL_VALUE (x); /* We cannot represent infinities, NaNs or +/-zero. We won't know if we have +zero until we analyse the mantissa, but we @@ -11401,10 +11397,10 @@ aarch64_output_simd_mov_immediate (rtx const_vector, else { #define buf_size 20 - REAL_VALUE_TYPE r; - REAL_VALUE_FROM_CONST_DOUBLE (r, info.value); char float_buf[buf_size] = {'\0'}; - real_to_decimal_for_mode (float_buf, &r, buf_size, buf_size, 1, mode); + real_to_decimal_for_mode (float_buf, + CONST_DOUBLE_REAL_VALUE (info.value), + buf_size, buf_size, 1, mode); #undef buf_size if (lane_count == 1) diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index a6a1921..1f4bfed 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -3178,11 +3178,9 @@ arc_print_operand (FILE *file, rtx x, int code) /* We handle SFmode constants here as output_addr_const doesn't. */ if (GET_MODE (x) == SFmode) { - REAL_VALUE_TYPE d; long l; - REAL_VALUE_FROM_CONST_DOUBLE (d, x); - REAL_VALUE_TO_TARGET_SINGLE (d, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); fprintf (file, "0x%08lx", l); break; } diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 184ce50..87e55e9 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -12098,16 +12098,16 @@ init_fp_table (void) int arm_const_double_rtx (rtx x) { - REAL_VALUE_TYPE r; + const REAL_VALUE_TYPE *r; if (!fp_consts_inited) init_fp_table (); - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - if (REAL_VALUE_MINUS_ZERO (r)) + r = CONST_DOUBLE_REAL_VALUE (x); + if (REAL_VALUE_MINUS_ZERO (*r)) return 0; - if (real_equal (&r, &value_fp0)) + if (real_equal (r, &value_fp0)) return 1; return 0; @@ -12144,7 +12144,7 @@ vfp3_const_double_index (rtx x) if (!TARGET_VFP3 || !CONST_DOUBLE_P (x)) return -1; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); + r = *CONST_DOUBLE_REAL_VALUE (x); /* We can't represent these things, so detect them first. */ if (REAL_VALUE_ISINF (r) || REAL_VALUE_ISNAN (r) || REAL_VALUE_MINUS_ZERO (r)) @@ -12305,21 +12305,17 @@ neon_valid_immediate (rtx op, machine_mode mode, int inverse, if (GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT) { rtx el0 = CONST_VECTOR_ELT (op, 0); - REAL_VALUE_TYPE r0; + const REAL_VALUE_TYPE *r0; if (!vfp3_const_double_rtx (el0) && el0 != CONST0_RTX (GET_MODE (el0))) return -1; - REAL_VALUE_FROM_CONST_DOUBLE (r0, el0); + r0 = CONST_DOUBLE_REAL_VALUE (el0); for (i = 1; i < n_elts; i++) { rtx elt = CONST_VECTOR_ELT (op, i); - REAL_VALUE_TYPE re; - - REAL_VALUE_FROM_CONST_DOUBLE (re, elt); - - if (!real_equal (&r0, &re)) + if (!real_equal (r0, CONST_DOUBLE_REAL_VALUE (elt))) return -1; } @@ -21843,8 +21839,7 @@ arm_print_operand (FILE *stream, rtx x, int code) case 'N': { REAL_VALUE_TYPE r; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - r = real_value_negate (&r); + r = real_value_negate (CONST_DOUBLE_REAL_VALUE (x)); fprintf (stream, "%s", fp_const_from_val (&r)); } return; @@ -22638,13 +22633,9 @@ arm_assemble_integer (rtx x, unsigned int size, int aligned_p) for (i = 0; i < units; i++) { rtx elt = CONST_VECTOR_ELT (x, i); - REAL_VALUE_TYPE rval; - - REAL_VALUE_FROM_CONST_DOUBLE (rval, elt); - assemble_real - (rval, GET_MODE_INNER (mode), - i == 0 ? BIGGEST_ALIGNMENT : size * BITS_PER_UNIT); + (*CONST_DOUBLE_REAL_VALUE (elt), GET_MODE_INNER (mode), + i == 0 ? BIGGEST_ALIGNMENT : size * BITS_PER_UNIT); } return true; @@ -26251,11 +26242,9 @@ arm_emit_vector_const (FILE *file, rtx x) void arm_emit_fp16_const (rtx c) { - REAL_VALUE_TYPE r; long bits; - REAL_VALUE_FROM_CONST_DOUBLE (r, c); - bits = real_to_target (NULL, &r, HFmode); + bits = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (c), HFmode); if (WORDS_BIG_ENDIAN) assemble_zeros (2); assemble_integer (GEN_INT (bits), 2, BITS_PER_WORD, 1); @@ -27729,7 +27718,7 @@ vfp3_const_double_for_fract_bits (rtx operand) if (!CONST_DOUBLE_P (operand)) return 0; - REAL_VALUE_FROM_CONST_DOUBLE (r0, operand); + r0 = *CONST_DOUBLE_REAL_VALUE (operand); if (exact_real_inverse (DFmode, &r0) && !REAL_VALUE_NEGATIVE (r0)) { @@ -27747,15 +27736,15 @@ vfp3_const_double_for_fract_bits (rtx operand) int vfp3_const_double_for_bits (rtx operand) { - REAL_VALUE_TYPE r0; + const REAL_VALUE_TYPE *r0; if (!CONST_DOUBLE_P (operand)) return 0; - REAL_VALUE_FROM_CONST_DOUBLE (r0, operand); - if (exact_real_truncate (DFmode, &r0)) + r0 = CONST_DOUBLE_REAL_VALUE (operand); + if (exact_real_truncate (DFmode, r0)) { - HOST_WIDE_INT value = real_to_integer (&r0); + HOST_WIDE_INT value = real_to_integer (r0); value = value & 0xffffffff; if ((value != 0) && ( (value & (value - 1)) == 0)) return int_log2 (value); diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index ad5b02e..b4c555b 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -6634,12 +6634,11 @@ return \"mov%?\\t%0, %1\\t%@ __fp16\"; case 3: /* ARM register from constant */ { - REAL_VALUE_TYPE r; long bits; rtx ops[4]; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - bits = real_to_target (NULL, &r, HFmode); + bits = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (operands[1]), + HFmode); ops[0] = operands[0]; ops[1] = GEN_INT (bits); ops[2] = GEN_INT (bits & 0xff00); @@ -10854,12 +10853,9 @@ switch (GET_MODE_CLASS (GET_MODE (x))) { case MODE_FLOAT: - { - REAL_VALUE_TYPE r; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - assemble_real (r, GET_MODE (x), BITS_PER_WORD); - break; - } + assemble_real (*CONST_DOUBLE_REAL_VALUE (x), GET_MODE (x), + BITS_PER_WORD); + break; default: /* XXX: Sometimes gcc does something really dumb and ends up with a HIGH in a constant pool entry, usually because it's trying to @@ -10886,13 +10882,10 @@ making_const_table = TRUE; switch (GET_MODE_CLASS (GET_MODE (operands[0]))) { - case MODE_FLOAT: - { - REAL_VALUE_TYPE r; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[0]); - assemble_real (r, GET_MODE (operands[0]), BITS_PER_WORD); - break; - } + case MODE_FLOAT: + assemble_real (*CONST_DOUBLE_REAL_VALUE (operands[0]), + GET_MODE (operands[0]), BITS_PER_WORD); + break; default: assemble_integer (operands[0], 8, BITS_PER_WORD, 1); break; @@ -10911,13 +10904,10 @@ making_const_table = TRUE; switch (GET_MODE_CLASS (GET_MODE (operands[0]))) { - case MODE_FLOAT: - { - REAL_VALUE_TYPE r; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[0]); - assemble_real (r, GET_MODE (operands[0]), BITS_PER_WORD); - break; - } + case MODE_FLOAT: + assemble_real (*CONST_DOUBLE_REAL_VALUE (operands[0]), + GET_MODE (operands[0]), BITS_PER_WORD); + break; default: assemble_integer (operands[0], 16, BITS_PER_WORD, 1); break; diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index 081aab2..baeac62 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -238,12 +238,11 @@ return \"vmov\\t%0, %1\"; case 8: /* ARM register from constant */ { - REAL_VALUE_TYPE r; long bits; rtx ops[4]; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - bits = real_to_target (NULL, &r, HFmode); + bits = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (operands[1]), + HFmode); ops[0] = operands[0]; ops[1] = GEN_INT (bits); ops[2] = GEN_INT (bits & 0xff00); @@ -289,12 +288,11 @@ return \"vmov\\t%0, %1\"; case 6: /* ARM register from constant */ { - REAL_VALUE_TYPE r; long bits; rtx ops[4]; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - bits = real_to_target (NULL, &r, HFmode); + bits = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (operands[1]), + HFmode); ops[0] = operands[0]; ops[1] = GEN_INT (bits); ops[2] = GEN_INT (bits & 0xff00); diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 9f5bc88..4963488 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -2431,11 +2431,9 @@ avr_print_operand (FILE *file, rtx x, int code) else if (GET_CODE (x) == CONST_DOUBLE) { long val; - REAL_VALUE_TYPE rv; if (GET_MODE (x) != SFmode) fatal_insn ("internal compiler error. Unknown mode:", x); - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, val); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), val); fprintf (file, "0x%lx", val); } else if (GET_CODE (x) == CONST_STRING) diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index 1d45535..18152ee 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -848,12 +848,10 @@ (set (match_dup 2) (lo_sum:SI (match_dup 2) (match_dup 3)))] { long values; - REAL_VALUE_TYPE value; gcc_assert (GET_CODE (operands[1]) == CONST_DOUBLE); - REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (value, values); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), values); operands[2] = gen_rtx_REG (SImode, true_regnum (operands[0])); operands[3] = GEN_INT (trunc_int_for_mode (values, SImode)); diff --git a/gcc/config/c6x/c6x.md b/gcc/config/c6x/c6x.md index 692d83f..fa89587 100644 --- a/gcc/config/c6x/c6x.md +++ b/gcc/config/c6x/c6x.md @@ -549,12 +549,10 @@ (ashift:SI (match_dup 4) (const_int 16))))] { long values; - REAL_VALUE_TYPE value; gcc_assert (GET_CODE (operands[1]) == CONST_DOUBLE); - REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (value, values); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), values); operands[2] = gen_rtx_REG (SImode, true_regnum (operands[0])); operands[3] = GEN_INT (trunc_int_for_mode (values, HImode)); diff --git a/gcc/config/cr16/cr16.c b/gcc/config/cr16/cr16.c index 7b3b6ef..accb605 100644 --- a/gcc/config/cr16/cr16.c +++ b/gcc/config/cr16/cr16.c @@ -1386,10 +1386,8 @@ cr16_const_double_ok (rtx op) { if (GET_MODE (op) == SFmode) { - REAL_VALUE_TYPE r; long l; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - REAL_VALUE_TO_TARGET_SINGLE (r, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), l); return UNSIGNED_INT_FITS_N_BITS (l, 4) ? 1 : 0; } @@ -1521,11 +1519,9 @@ cr16_print_operand (FILE * file, rtx x, int code) case CONST_DOUBLE: { - REAL_VALUE_TYPE r; long l; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - REAL_VALUE_TO_TARGET_SINGLE (r, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); fprintf (file, "$0x%lx", l); return; diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 70f3442..e4ab65f 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -1154,14 +1154,11 @@ cris_print_operand (FILE *file, rtx x, int code) else { /* Only single precision is allowed as plain operands the - moment. FIXME: REAL_VALUE_FROM_CONST_DOUBLE isn't - documented. */ - REAL_VALUE_TYPE r; + moment. */ long l; /* FIXME: Perhaps check overflow of the "single". */ - REAL_VALUE_FROM_CONST_DOUBLE (r, operand); - REAL_VALUE_TO_TARGET_SINGLE (r, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operand), l); fprintf (file, "0x%lx", l); } diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index 593c9a1..a87c98f 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -1362,11 +1362,9 @@ epiphany_print_operand (FILE *file, rtx x, int code) /* We handle SFmode constants here as output_addr_const doesn't. */ if (GET_MODE (x) == SFmode) { - REAL_VALUE_TYPE d; long l; - REAL_VALUE_FROM_CONST_DOUBLE (d, x); - REAL_VALUE_TO_TARGET_SINGLE (d, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); fprintf (file, "%s0x%08lx", IMMEDIATE_PREFIX, l); break; } diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c index 0cac6ce..6afd5d4 100644 --- a/gcc/config/fr30/fr30.c +++ b/gcc/config/fr30/fr30.c @@ -699,11 +699,9 @@ fr30_print_operand (FILE *file, rtx x, int code) /* We handle SFmode constants here as output_addr_const doesn't. */ if (GET_MODE (x) == SFmode) { - REAL_VALUE_TYPE d; long l; - REAL_VALUE_FROM_CONST_DOUBLE (d, x); - REAL_VALUE_TO_TARGET_SINGLE (d, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); fprintf (file, "0x%08lx", l); break; } @@ -888,14 +886,10 @@ fr30_check_multiple_regs (rtx *operands, int num_operands, int descending) int fr30_const_double_is_zero (rtx operand) { - REAL_VALUE_TYPE d; - if (operand == NULL || GET_CODE (operand) != CONST_DOUBLE) return 0; - REAL_VALUE_FROM_CONST_DOUBLE (d, operand); - - return real_equal (&d, &dconst0); + return real_equal (CONST_DOUBLE_REAL_VALUE (operand), &dconst0); } /*}}}*/ diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 15de223..9e355b2 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -2767,11 +2767,9 @@ frv_print_operand (FILE * file, rtx x, int code) { if (GET_MODE (x) == SFmode) { - REAL_VALUE_TYPE rv; long l; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); value = l; } @@ -4290,11 +4288,10 @@ output_move_single (rtx operands[], rtx insn) else if (mode == SFmode) { - REAL_VALUE_TYPE rv; long l; - REAL_VALUE_FROM_CONST_DOUBLE (rv, src); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); + REAL_VALUE_TO_TARGET_SINGLE + (*CONST_DOUBLE_REAL_VALUE (src), l); value = l; } diff --git a/gcc/config/frv/frv.md b/gcc/config/frv/frv.md index 96f78b1..0604b23 100644 --- a/gcc/config/frv/frv.md +++ b/gcc/config/frv/frv.md @@ -1870,11 +1870,9 @@ { rtx op0 = operands[0]; rtx op1 = operands[1]; - REAL_VALUE_TYPE rv; long l[2]; - REAL_VALUE_FROM_CONST_DOUBLE (rv, op1); - REAL_VALUE_TO_TARGET_DOUBLE (rv, l); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op1), l); operands[2] = gen_highpart (SImode, op0); operands[3] = gen_lowpart (SImode, op0); diff --git a/gcc/config/frv/predicates.md b/gcc/config/frv/predicates.md index 3c27d72..ad834a5 100644 --- a/gcc/config/frv/predicates.md +++ b/gcc/config/frv/predicates.md @@ -504,7 +504,6 @@ (match_code "const_int,const_double,symbol_ref,label_ref,const") { HOST_WIDE_INT value; - REAL_VALUE_TYPE rv; long l; switch (GET_CODE (op)) @@ -540,8 +539,7 @@ case CONST_DOUBLE: if (GET_MODE (op) == SFmode) { - REAL_VALUE_FROM_CONST_DOUBLE (rv, op); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), l); value = l; return ! IN_RANGE (value, -32768, 32767); } diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 63a7adb..1eef7bf 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -1596,9 +1596,7 @@ h8300_print_operand (FILE *file, rtx x, int code) case CONST_DOUBLE: { long val; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, val); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), val); fprintf (file, "#%ld", ((val >> 16) & 0xffff)); break; } @@ -1626,9 +1624,7 @@ h8300_print_operand (FILE *file, rtx x, int code) case CONST_DOUBLE: { long val; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, val); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), val); fprintf (file, "#%ld", (val & 0xffff)); break; } @@ -1785,9 +1781,7 @@ h8300_print_operand (FILE *file, rtx x, int code) case CONST_DOUBLE: { long val; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, val); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), val); fprintf (file, "#%ld", val); break; } diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ff52779..d59b59b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10480,7 +10480,7 @@ standard_80387_constant_p (rtx x) { machine_mode mode = GET_MODE (x); - REAL_VALUE_TYPE r; + const REAL_VALUE_TYPE *r; if (!(CONST_DOUBLE_P (x) && X87_FLOAT_MODE_P (mode))) return -1; @@ -10490,7 +10490,7 @@ standard_80387_constant_p (rtx x) if (x == CONST1_RTX (mode)) return 2; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); + r = CONST_DOUBLE_REAL_VALUE (x); /* For XFmode constants, try to find a special 80387 instruction when optimizing for size or on those CPUs that benefit from them. */ @@ -10503,15 +10503,15 @@ standard_80387_constant_p (rtx x) init_ext_80387_constants (); for (i = 0; i < 5; i++) - if (real_identical (&r, &ext_80387_constants_table[i])) + if (real_identical (r, &ext_80387_constants_table[i])) return i + 3; } /* Load of the constant -0.0 or -1.0 will be split as fldz;fchs or fld1;fchs sequence. */ - if (real_isnegzero (&r)) + if (real_isnegzero (r)) return 8; - if (real_identical (&r, &dconstm1)) + if (real_identical (r, &dconstm1)) return 9; return 0; @@ -17023,11 +17023,9 @@ ix86_print_operand (FILE *file, rtx x, int code) else if (CONST_DOUBLE_P (x) && GET_MODE (x) == SFmode) { - REAL_VALUE_TYPE r; long l; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - REAL_VALUE_TO_TARGET_SINGLE (r, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); if (ASSEMBLER_DIALECT == ASM_ATT) putc ('$', file); @@ -17041,11 +17039,9 @@ ix86_print_operand (FILE *file, rtx x, int code) else if (CONST_DOUBLE_P (x) && GET_MODE (x) == DFmode) { - REAL_VALUE_TYPE r; long l[2]; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - REAL_VALUE_TO_TARGET_DOUBLE (r, l); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), l); if (ASSEMBLER_DIALECT == ASM_ATT) putc ('$', file); @@ -23749,25 +23745,25 @@ ix86_split_to_parts (rtx operand, rtx *parts, machine_mode mode) } else if (CONST_DOUBLE_P (operand)) { - REAL_VALUE_TYPE r; + const REAL_VALUE_TYPE *r; long l[4]; - REAL_VALUE_FROM_CONST_DOUBLE (r, operand); + r = CONST_DOUBLE_REAL_VALUE (operand); switch (mode) { case TFmode: - real_to_target (l, &r, mode); + real_to_target (l, r, mode); parts[3] = gen_int_mode (l[3], SImode); parts[2] = gen_int_mode (l[2], SImode); break; case XFmode: /* We can't use REAL_VALUE_TO_TARGET_LONG_DOUBLE since long double may not be 80-bit. */ - real_to_target (l, &r, mode); + real_to_target (l, r, mode); parts[2] = gen_int_mode (l[2], SImode); break; case DFmode: - REAL_VALUE_TO_TARGET_DOUBLE (r, l); + REAL_VALUE_TO_TARGET_DOUBLE (*r, l); break; default: gcc_unreachable (); @@ -23800,11 +23796,9 @@ ix86_split_to_parts (rtx operand, rtx *parts, machine_mode mode) } else if (CONST_DOUBLE_P (operand)) { - REAL_VALUE_TYPE r; long l[4]; - REAL_VALUE_FROM_CONST_DOUBLE (r, operand); - real_to_target (l, &r, mode); + real_to_target (l, CONST_DOUBLE_REAL_VALUE (operand), mode); /* real_to_target puts 32-bit pieces in each long. */ parts[0] = diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 8c2ed60..5fcebb5 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -3577,10 +3577,7 @@ (set (match_dup 0) (neg:X87MODEF (match_dup 0)))] { - REAL_VALUE_TYPE r; - - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - if (real_isnegzero (&r)) + if (real_isnegzero (CONST_DOUBLE_REAL_VALUE (operands[1]))) operands[1] = CONST0_RTX (<MODE>mode); else operands[1] = CONST1_RTX (<MODE>mode); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 99c965a..b495ac1 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -1415,12 +1415,10 @@ ia64_split_tmode (rtx out[2], rtx in, bool reversed, bool dead) /* split_double does not understand how to split a TFmode quantity into a pair of DImode constants. */ { - REAL_VALUE_TYPE r; unsigned HOST_WIDE_INT p[2]; long l[4]; /* TFmode is 128 bits */ - REAL_VALUE_FROM_CONST_DOUBLE (r, in); - real_to_target (l, &r, TFmode); + real_to_target (l, CONST_DOUBLE_REAL_VALUE (in), TFmode); if (FLOAT_WORDS_BIG_ENDIAN) { @@ -5362,9 +5360,7 @@ ia64_print_operand (FILE * file, rtx x, int code) case 'G': { long val[4]; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - real_to_target (val, &rv, GET_MODE (x)); + real_to_target (val, CONST_DOUBLE_REAL_VALUE (x), GET_MODE (x)); if (GET_MODE (x) == SFmode) fprintf (file, "0x%08lx", val[0] & 0xffffffff); else if (GET_MODE (x) == DFmode) diff --git a/gcc/config/iq2000/iq2000.md b/gcc/config/iq2000/iq2000.md index bba6760..a030661 100644 --- a/gcc/config/iq2000/iq2000.md +++ b/gcc/config/iq2000/iq2000.md @@ -849,11 +849,9 @@ "" "* { - REAL_VALUE_TYPE r; long i; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[2]); - REAL_VALUE_TO_TARGET_SINGLE (r, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[2]), i); operands[2] = GEN_INT (i); return \"addiu\\t%0,%1,%%lo(%2) # low\"; }" @@ -866,11 +864,9 @@ "" "* { - REAL_VALUE_TYPE r; long i; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (r, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), i); operands[1] = GEN_INT (i); return \"lui\\t%0,%%hi(%1) # high\"; }" diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 341f24a..80fceb5 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -650,11 +650,9 @@ easy_di_const (rtx op) int easy_df_const (rtx op) { - REAL_VALUE_TYPE r; long l[2]; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - REAL_VALUE_TO_TARGET_DOUBLE (r, l); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l); if (l[0] == 0 && l[1] == 0) return 1; if ((l[0] & 0xffff) == 0 && l[1] == 0) @@ -2280,11 +2278,9 @@ m32r_print_operand (FILE * file, rtx x, int code) /* We handle SFmode constants here as output_addr_const doesn't. */ if (GET_MODE (x) == SFmode) { - REAL_VALUE_TYPE d; long l; - REAL_VALUE_FROM_CONST_DOUBLE (d, x); - REAL_VALUE_TO_TARGET_SINGLE (d, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); fprintf (file, "0x%08lx", l); break; } diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 74de983..bfc19f3 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -3295,11 +3295,10 @@ handle_move_double (rtx operands[2], { if (GET_CODE (operands[1]) == CONST_DOUBLE) { - REAL_VALUE_TYPE r; long l[3]; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l); + REAL_VALUE_TO_TARGET_LONG_DOUBLE + (*CONST_DOUBLE_REAL_VALUE (operands[1]), l); operands[1] = GEN_INT (l[0]); middlehalf[1] = GEN_INT (l[1]); latehalf[1] = GEN_INT (l[2]); @@ -4323,7 +4322,7 @@ init_68881_table (void) int standard_68881_constant_p (rtx x) { - REAL_VALUE_TYPE r; + const REAL_VALUE_TYPE *r; int i; /* fmovecr must be emulated on the 68040 and 68060, so it shouldn't be @@ -4334,19 +4333,19 @@ standard_68881_constant_p (rtx x) if (! inited_68881_table) init_68881_table (); - REAL_VALUE_FROM_CONST_DOUBLE (r, x); + r = CONST_DOUBLE_REAL_VALUE (x); /* Use real_identical instead of real_equal so that -0.0 is rejected. */ for (i = 0; i < 6; i++) { - if (real_identical (&r, &values_68881[i])) + if (real_identical (r, &values_68881[i])) return (codes_68881[i]); } if (GET_MODE (x) == SFmode) return 0; - if (real_equal (&r, &values_68881[6])) + if (real_equal (r, &values_68881[6])) return (codes_68881[6]); /* larger powers of ten in the constants ram are not used @@ -4360,17 +4359,18 @@ standard_68881_constant_p (rtx x) int floating_exact_log2 (rtx x) { - REAL_VALUE_TYPE r, r1; + const REAL_VALUE_TYPE *r; + REAL_VALUE_TYPE r1; int exp; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); + r = CONST_DOUBLE_REAL_VALUE (x); - if (real_less (&r, &dconst1)) + if (real_less (r, &dconst1)) return 0; - exp = real_exponent (&r); + exp = real_exponent (r); real_2expN (&r1, exp, DFmode); - if (real_equal (&r1, &r)) + if (real_equal (&r1, r)) return exp; return 0; @@ -4480,27 +4480,21 @@ print_operand (FILE *file, rtx op, int letter) } else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == SFmode) { - REAL_VALUE_TYPE r; long l; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - REAL_VALUE_TO_TARGET_SINGLE (r, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), l); asm_fprintf (file, "%I0x%lx", l & 0xFFFFFFFF); } else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == XFmode) { - REAL_VALUE_TYPE r; long l[3]; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l); + REAL_VALUE_TO_TARGET_LONG_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l); asm_fprintf (file, "%I0x%lx%08lx%08lx", l[0] & 0xFFFFFFFF, l[1] & 0xFFFFFFFF, l[2] & 0xFFFFFFFF); } else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == DFmode) { - REAL_VALUE_TYPE r; long l[2]; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - REAL_VALUE_TO_TARGET_DOUBLE (r, l); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l); asm_fprintf (file, "%I0x%lx%08lx", l[0] & 0xFFFFFFFF, l[1] & 0xFFFFFFFF); } else diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 463c827..1eaf58f 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -1218,10 +1218,8 @@ { if (which_alternative == 4 || which_alternative == 5) { rtx xoperands[2]; - REAL_VALUE_TYPE r; long l; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (r, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), l); xoperands[0] = operands[0]; xoperands[1] = GEN_INT (l); if (which_alternative == 5) { @@ -1360,7 +1358,6 @@ "TARGET_COLDFIRE_FPU" { rtx xoperands[3]; - REAL_VALUE_TYPE r; long l[2]; switch (which_alternative) @@ -1376,8 +1373,7 @@ case 4: case 5: case 6: return output_move_double (operands); case 7: - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - REAL_VALUE_TO_TARGET_DOUBLE (r, l); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), l); xoperands[0] = operands[0]; xoperands[1] = GEN_INT (l[0]); xoperands[2] = GEN_INT (l[1]); diff --git a/gcc/config/mep/mep.md b/gcc/config/mep/mep.md index 39d1d63..bcaab56 100644 --- a/gcc/config/mep/mep.md +++ b/gcc/config/mep/mep.md @@ -760,13 +760,11 @@ [(const_int 0)] " { - REAL_VALUE_TYPE rv; HOST_WIDE_INT value; HOST_WIDE_INT lo, hi; rtx out; - REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (rv, value); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), value); lo = value & 0xffff; hi = trunc_int_for_mode (value & 0xffff0000, SImode); diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index 9efa739..43c01d1 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -270,7 +270,7 @@ microblaze_const_double_ok (rtx op, machine_mode mode) if (op == CONST0_RTX (mode)) return 1; - REAL_VALUE_FROM_CONST_DOUBLE (d, op); + d = *CONST_DOUBLE_REAL_VALUE (op); if (REAL_VALUE_ISNAN (d)) return FALSE; @@ -2354,11 +2354,7 @@ print_operand (FILE * file, rtx op, int letter) if (code == CONST_DOUBLE) { if (GET_MODE (op) == DFmode) - { - REAL_VALUE_TYPE value; - REAL_VALUE_FROM_CONST_DOUBLE (value, op); - REAL_VALUE_TO_TARGET_DOUBLE (value, val); - } + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), val); else { val[0] = CONST_DOUBLE_HIGH (op); @@ -2380,9 +2376,8 @@ print_operand (FILE * file, rtx op, int letter) if (letter == 'F') { unsigned long value_long; - REAL_VALUE_TYPE value; - REAL_VALUE_FROM_CONST_DOUBLE (value, op); - REAL_VALUE_TO_TARGET_SINGLE (value, value_long); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), + value_long); fprintf (file, HOST_WIDE_INT_PRINT_HEX, value_long); } else diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 3ad41c6..d24dcfe 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -7304,11 +7304,9 @@ UNSPEC_CONSTTABLE_FLOAT)] "TARGET_MIPS16" { - REAL_VALUE_TYPE d; - gcc_assert (GET_CODE (operands[0]) == CONST_DOUBLE); - REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]); - assemble_real (d, GET_MODE (operands[0]), + assemble_real (*CONST_DOUBLE_REAL_VALUE (operands[0]), + GET_MODE (operands[0]), GET_MODE_BITSIZE (GET_MODE (operands[0]))); return ""; } diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 16e734c..a341e3a 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -2710,16 +2710,11 @@ mmix_intval (const_rtx x) if (GET_CODE (x) == CONST_DOUBLE) { - REAL_VALUE_TYPE value; - - /* FIXME: This macro is not in the manual but should be. */ - REAL_VALUE_FROM_CONST_DOUBLE (value, x); - if (GET_MODE (x) == DFmode) { long bits[2]; - REAL_VALUE_TO_TARGET_DOUBLE (value, bits); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), bits); /* The double cast is necessary to avoid getting the long sign-extended to unsigned long long(!) when they're of @@ -2732,7 +2727,7 @@ mmix_intval (const_rtx x) else if (GET_MODE (x) == SFmode) { long bits; - REAL_VALUE_TO_TARGET_SINGLE (value, bits); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), bits); return (unsigned long) bits; } diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index fd527ab..31bf103 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -285,18 +285,17 @@ mn10300_print_operand (FILE *file, rtx x, int code) case CONST_DOUBLE: { long val[2]; - REAL_VALUE_TYPE rv; switch (GET_MODE (x)) { case DFmode: - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_DOUBLE (rv, val); + REAL_VALUE_TO_TARGET_DOUBLE + (*CONST_DOUBLE_REAL_VALUE (x), val); fprintf (file, "0x%lx", val[0]); break;; case SFmode: - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, val[0]); + REAL_VALUE_TO_TARGET_SINGLE + (*CONST_DOUBLE_REAL_VALUE (x), val[0]); fprintf (file, "0x%lx", val[0]); break;; case VOIDmode: @@ -345,13 +344,12 @@ mn10300_print_operand (FILE *file, rtx x, int code) case CONST_DOUBLE: { long val[2]; - REAL_VALUE_TYPE rv; switch (GET_MODE (x)) { case DFmode: - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_DOUBLE (rv, val); + REAL_VALUE_TO_TARGET_DOUBLE + (*CONST_DOUBLE_REAL_VALUE (x), val); fprintf (file, "0x%lx", val[1]); break;; case SFmode: @@ -436,10 +434,8 @@ mn10300_print_operand (FILE *file, rtx x, int code) case CONST_DOUBLE: { unsigned long val; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, val); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), val); fprintf (file, "0x%lx", val); break; } diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index a7fdd92..e9177dc 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -1857,9 +1857,7 @@ nvptx_print_operand (FILE *file, rtx x, int code) case CONST_DOUBLE: long vals[2]; - REAL_VALUE_TYPE real; - REAL_VALUE_FROM_CONST_DOUBLE (real, x); - real_to_target (vals, &real, GET_MODE (x)); + real_to_target (vals, CONST_DOUBLE_REAL_VALUE (x), GET_MODE (x)); vals[0] &= 0xffffffff; vals[1] &= 0xffffffff; if (GET_MODE (x) == SFmode) diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 0dc0931..b995d10 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -2346,14 +2346,12 @@ pa_singlemove_string (rtx *operands) if (GET_CODE (operands[1]) == CONST_DOUBLE) { long i; - REAL_VALUE_TYPE d; gcc_assert (GET_MODE (operands[1]) == SFmode); /* Translate the CONST_DOUBLE to a CONST_INT with the same target bit pattern. */ - REAL_VALUE_FROM_CONST_DOUBLE (d, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (d, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), i); operands[1] = GEN_INT (i); /* Fall through to CONST_INT case. */ diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 8eb37c6..7f0f06f 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -488,7 +488,6 @@ pdp11_expand_operands (rtx *operands, rtx exops[][2], int opcount, pdp11_partorder useorder; bool sameoff = false; enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype; - REAL_VALUE_TYPE r; long sval[2]; words = GET_MODE_BITSIZE (GET_MODE (operands[0])) / 16; @@ -602,10 +601,8 @@ pdp11_expand_operands (rtx *operands, rtx exops[][2], int opcount, } if (GET_CODE (operands[op]) == CONST_DOUBLE) - { - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[op]); - REAL_VALUE_TO_TARGET_DOUBLE (r, sval); - } + REAL_VALUE_TO_TARGET_DOUBLE + (*CONST_DOUBLE_REAL_VALUE (operands[op]), sval); for (i = 0; i < words; i++) { @@ -729,7 +726,6 @@ pdp11_asm_output_var (FILE *file, const char *name, int size, static void pdp11_asm_print_operand (FILE *file, rtx x, int code) { - REAL_VALUE_TYPE r; long sval[2]; if (code == '#') @@ -747,8 +743,7 @@ pdp11_asm_print_operand (FILE *file, rtx x, int code) output_address (XEXP (x, 0)); else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != SImode) { - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - REAL_VALUE_TO_TARGET_DOUBLE (r, sval); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), sval); fprintf (file, "$%#lo", sval[0] >> 16); } else @@ -1366,10 +1361,8 @@ output_block_move(rtx *operands) int legitimate_const_double_p (rtx address) { - REAL_VALUE_TYPE r; long sval[2]; - REAL_VALUE_FROM_CONST_DOUBLE (r, address); - REAL_VALUE_TO_TARGET_DOUBLE (r, sval); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (address), sval); if ((sval[0] & 0xffff) == 0 && sval[1] == 0) return 1; return 0; diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 3b4820b..c00d730 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5325,24 +5325,20 @@ num_insns_constant (rtx op, machine_mode mode) if (mode == SFmode || mode == SDmode) { long l; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, op); if (DECIMAL_FLOAT_MODE_P (mode)) - REAL_VALUE_TO_TARGET_DECIMAL32 (rv, l); + REAL_VALUE_TO_TARGET_DECIMAL32 + (*CONST_DOUBLE_REAL_VALUE (op), l); else - REAL_VALUE_TO_TARGET_SINGLE (rv, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), l); return num_insns_constant_wide ((HOST_WIDE_INT) l); } long l[2]; - REAL_VALUE_TYPE rv; - - REAL_VALUE_FROM_CONST_DOUBLE (rv, op); if (DECIMAL_FLOAT_MODE_P (mode)) - REAL_VALUE_TO_TARGET_DECIMAL64 (rv, l); + REAL_VALUE_TO_TARGET_DECIMAL64 (*CONST_DOUBLE_REAL_VALUE (op), l); else - REAL_VALUE_TO_TARGET_DOUBLE (rv, l); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l); high = l[WORDS_BIG_ENDIAN == 0]; low = l[WORDS_BIG_ENDIAN != 0]; @@ -20731,7 +20727,6 @@ rs6000_emit_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond) enum rtx_code code = GET_CODE (op); rtx op0 = XEXP (op, 0); rtx op1 = XEXP (op, 1); - REAL_VALUE_TYPE c1; machine_mode compare_mode = GET_MODE (op0); machine_mode result_mode = GET_MODE (dest); rtx temp; @@ -20792,9 +20787,6 @@ rs6000_emit_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond) if (code == UNEQ && HONOR_NANS (compare_mode)) return 0; - if (GET_CODE (op1) == CONST_DOUBLE) - REAL_VALUE_FROM_CONST_DOUBLE (c1, op1); - /* We're going to try to implement comparisons by performing a subtract, then comparing against zero. Unfortunately, Inf - Inf is NaN which is not zero, and so if we don't @@ -20802,7 +20794,8 @@ rs6000_emit_cmove (rtx dest, rtx op, rtx true_cond, rtx false_cond) would treat EQ different to UNORDERED, we can't do it. */ if (HONOR_INFINITIES (compare_mode) && code != GT && code != UNGE - && (GET_CODE (op1) != CONST_DOUBLE || real_isinf (&c1)) + && (GET_CODE (op1) != CONST_DOUBLE + || real_isinf (CONST_DOUBLE_REAL_VALUE (op1))) /* Constructs of the form (a OP b ? a : b) are safe. */ && ((! rtx_equal_p (op0, false_cond) && ! rtx_equal_p (op1, false_cond)) || (! rtx_equal_p (op0, true_cond) @@ -27103,14 +27096,12 @@ output_toc (FILE *file, rtx x, int labelno, machine_mode mode) (GET_MODE (x) == TFmode || GET_MODE (x) == TDmode || GET_MODE (x) == IFmode || GET_MODE (x) == KFmode)) { - REAL_VALUE_TYPE rv; long k[4]; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); if (DECIMAL_FLOAT_MODE_P (GET_MODE (x))) - REAL_VALUE_TO_TARGET_DECIMAL128 (rv, k); + REAL_VALUE_TO_TARGET_DECIMAL128 (*CONST_DOUBLE_REAL_VALUE (x), k); else - REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, k); + REAL_VALUE_TO_TARGET_LONG_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), k); if (TARGET_64BIT) { @@ -27144,15 +27135,12 @@ output_toc (FILE *file, rtx x, int labelno, machine_mode mode) else if (GET_CODE (x) == CONST_DOUBLE && (GET_MODE (x) == DFmode || GET_MODE (x) == DDmode)) { - REAL_VALUE_TYPE rv; long k[2]; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - if (DECIMAL_FLOAT_MODE_P (GET_MODE (x))) - REAL_VALUE_TO_TARGET_DECIMAL64 (rv, k); + REAL_VALUE_TO_TARGET_DECIMAL64 (*CONST_DOUBLE_REAL_VALUE (x), k); else - REAL_VALUE_TO_TARGET_DOUBLE (rv, k); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), k); if (TARGET_64BIT) { @@ -27181,14 +27169,12 @@ output_toc (FILE *file, rtx x, int labelno, machine_mode mode) else if (GET_CODE (x) == CONST_DOUBLE && (GET_MODE (x) == SFmode || GET_MODE (x) == SDmode)) { - REAL_VALUE_TYPE rv; long l; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); if (DECIMAL_FLOAT_MODE_P (GET_MODE (x))) - REAL_VALUE_TO_TARGET_DECIMAL32 (rv, l); + REAL_VALUE_TO_TARGET_DECIMAL32 (*CONST_DOUBLE_REAL_VALUE (x), l); else - REAL_VALUE_TO_TARGET_SINGLE (rv, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); if (TARGET_64BIT) { diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index df9d48e..cf40f10 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -6172,10 +6172,8 @@ " { long l; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); - <real_value_to_target> (rv, l); + <real_value_to_target> (*CONST_DOUBLE_REAL_VALUE (operands[1]), l); if (! TARGET_POWERPC64) operands[2] = operand_subword (operands[0], 0, 0, <MODE>mode); @@ -6274,10 +6272,8 @@ { int endian = (WORDS_BIG_ENDIAN == 0); long l[2]; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); - <real_value_to_target> (rv, l); + <real_value_to_target> (*CONST_DOUBLE_REAL_VALUE (operands[1]), l); operands[2] = operand_subword (operands[0], endian, 0, <MODE>mode); operands[3] = operand_subword (operands[0], 1 - endian, 0, <MODE>mode); @@ -6298,11 +6294,9 @@ { int endian = (WORDS_BIG_ENDIAN == 0); long l[2]; - REAL_VALUE_TYPE rv; HOST_WIDE_INT val; - REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); - <real_value_to_target> (rv, l); + <real_value_to_target> (*CONST_DOUBLE_REAL_VALUE (operands[1]), l); operands[2] = gen_lowpart (DImode, operands[0]); /* HIGHPART is lower memory address when WORDS_BIG_ENDIAN. */ diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 6d911d2..cee8c99 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -886,10 +886,8 @@ rx_print_operand (FILE * file, rtx op, int letter) case CONST_DOUBLE: { unsigned long val; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, op); - REAL_VALUE_TO_TARGET_SINGLE (rv, val); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), val); if (print_hash) fprintf (file, "#"); fprintf (file, TARGET_AS100_SYNTAX ? "0%lxH" : "0x%lx", val); diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index ad3132f..5ab6ce7 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -8719,16 +8719,13 @@ s390_chunkify_cancel (struct constant_pool *pool_list) void s390_output_pool_entry (rtx exp, machine_mode mode, unsigned int align) { - REAL_VALUE_TYPE r; - switch (GET_MODE_CLASS (mode)) { case MODE_FLOAT: case MODE_DECIMAL_FLOAT: gcc_assert (GET_CODE (exp) == CONST_DOUBLE); - REAL_VALUE_FROM_CONST_DOUBLE (r, exp); - assemble_real (r, mode, align); + assemble_real (*CONST_DOUBLE_REAL_VALUE (exp), mode, align); break; case MODE_INT: diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index a0d2e16..92e9f9f 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -10000,26 +10000,23 @@ system_reg_operand (rtx op, machine_mode mode ATTRIBUTE_UNUSED) bool fp_zero_operand (rtx op) { - REAL_VALUE_TYPE r; + const REAL_VALUE_TYPE *r; if (GET_MODE (op) != SFmode) return false; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - return real_equal (&r, &dconst0) && ! REAL_VALUE_MINUS_ZERO (r); + r = CONST_DOUBLE_REAL_VALUE (op); + return real_equal (r, &dconst0) && ! REAL_VALUE_MINUS_ZERO (*r); } /* Returns true if OP is a floating point value with value 1.0. */ bool fp_one_operand (rtx op) { - REAL_VALUE_TYPE r; - if (GET_MODE (op) != SFmode) return false; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - return real_equal (&r, &dconst1); + return real_equal (CONST_DOUBLE_REAL_VALUE (op), &dconst1); } /* Return the TLS type for TLS symbols. */ diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 3b56afb..e8d3e51 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -8011,10 +8011,8 @@ label: { int endian = WORDS_BIG_ENDIAN ? 1 : 0; long values[2]; - REAL_VALUE_TYPE value; - REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]); - REAL_VALUE_TO_TARGET_DOUBLE (value, values); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), values); if (HOST_BITS_PER_WIDE_INT >= 64) operands[2] = immed_double_const ((unsigned long) values[endian] @@ -8718,10 +8716,8 @@ label: [(set (match_dup 3) (match_dup 2))] { long values; - REAL_VALUE_TYPE value; - REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (value, values); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), values); operands[2] = GEN_INT (values); operands[3] = gen_rtx_REG (DImode, true_regnum (operands[0])); @@ -12454,11 +12450,8 @@ label: "" { if (operands[1] != const0_rtx) - { - REAL_VALUE_TYPE d; - REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]); - assemble_real (d, SFmode, GET_MODE_ALIGNMENT (SFmode)); - } + assemble_real (*CONST_DOUBLE_REAL_VALUE (operands[0]), + SFmode, GET_MODE_ALIGNMENT (SFmode)); return ""; } [(set_attr "length" "4") @@ -12472,11 +12465,8 @@ label: "" { if (operands[1] != const0_rtx) - { - REAL_VALUE_TYPE d; - REAL_VALUE_FROM_CONST_DOUBLE (d, operands[0]); - assemble_real (d, DFmode, GET_MODE_ALIGNMENT (DFmode)); - } + assemble_real (*CONST_DOUBLE_REAL_VALUE (operands[0]), + DFmode, GET_MODE_ALIGNMENT (DFmode)); return ""; } [(set_attr "length" "8") diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index a7fe546..a0adf22 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -1650,11 +1650,9 @@ fp_sethi_p (rtx op) { if (GET_CODE (op) == CONST_DOUBLE) { - REAL_VALUE_TYPE r; long i; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - REAL_VALUE_TO_TARGET_SINGLE (r, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), i); return !SPARC_SIMM13_P (i) && SPARC_SETHI_P (i); } @@ -1670,11 +1668,9 @@ fp_mov_p (rtx op) { if (GET_CODE (op) == CONST_DOUBLE) { - REAL_VALUE_TYPE r; long i; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - REAL_VALUE_TO_TARGET_SINGLE (r, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), i); return SPARC_SIMM13_P (i); } @@ -1693,11 +1689,9 @@ fp_high_losum_p (rtx op) be moved using a single insn will do. */ if (GET_CODE (op) == CONST_DOUBLE) { - REAL_VALUE_TYPE r; long i; - REAL_VALUE_FROM_CONST_DOUBLE (r, op); - REAL_VALUE_TO_TARGET_SINGLE (r, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), i); return !SPARC_SIMM13_P (i) && !SPARC_SETHI_P (i); } diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index e01db51..de65cc6 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -2218,11 +2218,9 @@ || which_alternative == 4 || which_alternative == 5)) { - REAL_VALUE_TYPE r; long i; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (r, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), i); operands[1] = GEN_INT (i); } @@ -2265,11 +2263,9 @@ (match_operand:SF 2 "fp_const_high_losum_operand" "S")))] "" { - REAL_VALUE_TYPE r; long i; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[2]); - REAL_VALUE_TO_TARGET_SINGLE (r, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[2]), i); operands[2] = GEN_INT (i); return "or\t%1, %%lo(%a2), %0"; }) @@ -2279,11 +2275,9 @@ (high:SF (match_operand:SF 1 "fp_const_high_losum_operand" "S")))] "" { - REAL_VALUE_TYPE r; long i; - REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (r, i); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), i); operands[1] = GEN_INT (i); return "sethi\t%%hi(%1), %0"; }) diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 62faff6..0ec9209 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -997,17 +997,12 @@ HOST_WIDE_INT const_double_to_hwint (rtx x) { HOST_WIDE_INT val; - REAL_VALUE_TYPE rv; if (GET_MODE (x) == SFmode) - { - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, val); - } + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), val); else if (GET_MODE (x) == DFmode) { long l[2]; - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_DOUBLE (rv, l); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), l); val = l[0]; val = (val << 32) | (l[1] & 0xffffffff); } diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index a03f5e2..839e42f 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -277,20 +277,17 @@ const_double_split (rtx x, HOST_WIDE_INT * p_high, HOST_WIDE_INT * p_low) if (GET_CODE (x) == CONST_DOUBLE) { long t[2]; - REAL_VALUE_TYPE rv; switch (GET_MODE (x)) { case DFmode: - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_DOUBLE (rv, t); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), t); *p_high = t[1]; /* since v850 is little endian */ *p_low = t[0]; /* high is second word */ return; case SFmode: - REAL_VALUE_FROM_CONST_DOUBLE (rv, x); - REAL_VALUE_TO_TARGET_SINGLE (rv, *p_high); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), *p_high); *p_low = 0; return; diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index 2ad0e0ad..5ab6ab1 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -640,7 +640,8 @@ static bool vax_float_literal (rtx c) { machine_mode mode; - REAL_VALUE_TYPE r, s; + const REAL_VALUE_TYPE *r; + REAL_VALUE_TYPE s; int i; if (GET_CODE (c) != CONST_DOUBLE) @@ -653,7 +654,7 @@ vax_float_literal (rtx c) || c == const_tiny_rtx[(int) mode][2]) return true; - REAL_VALUE_FROM_CONST_DOUBLE (r, c); + r = CONST_DOUBLE_REAL_VALUE (c); for (i = 0; i < 7; i++) { @@ -661,11 +662,11 @@ vax_float_literal (rtx c) bool ok; real_from_integer (&s, mode, x, SIGNED); - if (real_equal (&r, &s)) + if (real_equal (r, &s)) return true; ok = exact_real_inverse (mode, &s); gcc_assert (ok); - if (real_equal (&r, &s)) + if (real_equal (r, &s)) return true; } return false; diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index 41b7964..d399a63 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -2039,9 +2039,7 @@ visium_expand_copysign (rtx *operands, enum machine_mode mode) if (op0 != CONST0_RTX (mode)) { long l; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, op0); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op0), l); op0 = force_reg (SImode, GEN_INT (trunc_int_for_mode (l, SImode))); } } diff --git a/gcc/config/visium/visium.md b/gcc/config/visium/visium.md index 370b6a4..dab265d 100644 --- a/gcc/config/visium/visium.md +++ b/gcc/config/visium/visium.md @@ -687,10 +687,8 @@ [(set (match_dup 2) (match_dup 3))] { long l; - REAL_VALUE_TYPE rv; - REAL_VALUE_FROM_CONST_DOUBLE (rv, operands[1]); - REAL_VALUE_TO_TARGET_SINGLE (rv, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (operands[1]), l); operands[2] = operand_subword (operands[0], 0, 0, SFmode); operands[3] = GEN_INT (trunc_int_for_mode (l, SImode)); diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md index e297b82..00f2370 100644 --- a/gcc/config/xtensa/predicates.md +++ b/gcc/config/xtensa/predicates.md @@ -150,9 +150,7 @@ (define_predicate "const_float_1_operand" (match_code "const_double") { - REAL_VALUE_TYPE d; - REAL_VALUE_FROM_CONST_DOUBLE (d, op); - return real_equal (&d, &dconst1); + return real_equal (CONST_DOUBLE_REAL_VALUE (op), &dconst1); }) (define_predicate "fpmem_offset_operand" diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 1e1ac6b..1d58311 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -2397,12 +2397,10 @@ print_operand (FILE *file, rtx x, int letter) } else if (GET_CODE (x) == CONST_DOUBLE) { - REAL_VALUE_TYPE r; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); if (GET_MODE (x) == SFmode) { long l; - REAL_VALUE_TO_TARGET_SINGLE (r, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); fprintf (file, "0x%08lx@%c", l, letter == 't' ? 'h' : 'l'); } else @@ -2436,10 +2434,8 @@ print_operand (FILE *file, rtx x, int letter) if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == SFmode) { - REAL_VALUE_TYPE r; long l; - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - REAL_VALUE_TO_TARGET_SINGLE (r, l); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), l); fprintf (file, "0x%08lx", l); break; } @@ -2555,7 +2551,6 @@ void xtensa_output_literal (FILE *file, rtx x, machine_mode mode, int labelno) { long value_long[2]; - REAL_VALUE_TYPE r; int size; rtx first, second; @@ -2566,18 +2561,19 @@ xtensa_output_literal (FILE *file, rtx x, machine_mode mode, int labelno) case MODE_FLOAT: gcc_assert (GET_CODE (x) == CONST_DOUBLE); - REAL_VALUE_FROM_CONST_DOUBLE (r, x); switch (mode) { case SFmode: - REAL_VALUE_TO_TARGET_SINGLE (r, value_long[0]); + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (x), + value_long[0]); if (HOST_BITS_PER_LONG > 32) value_long[0] &= 0xffffffff; fprintf (file, "0x%08lx\n", value_long[0]); break; case DFmode: - REAL_VALUE_TO_TARGET_DOUBLE (r, value_long); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (x), + value_long); if (HOST_BITS_PER_LONG > 32) { value_long[0] &= 0xffffffff; diff --git a/gcc/cprop.c b/gcc/cprop.c index aa23a07..4cb8586 100644 --- a/gcc/cprop.c +++ b/gcc/cprop.c @@ -1351,13 +1351,9 @@ implicit_set_cond_p (const_rtx cond) the optimization can't be performed. */ /* ??? The complex and vector checks are not implemented yet. We just always return zero for them. */ - if (CONST_DOUBLE_AS_FLOAT_P (cst)) - { - REAL_VALUE_TYPE d; - REAL_VALUE_FROM_CONST_DOUBLE (d, cst); - if (real_equal (&d, &dconst0)) - return 0; - } + if (CONST_DOUBLE_AS_FLOAT_P (cst) + && real_equal (CONST_DOUBLE_REAL_VALUE (cst), &dconst0)) + return 0; else return 0; } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4edc2ae..c1b7c7b 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -15575,12 +15575,10 @@ insert_wide_int (const wide_int &val, unsigned char *dest, int elt_size) static void insert_float (const_rtx rtl, unsigned char *array) { - REAL_VALUE_TYPE rv; long val[4]; int i; - REAL_VALUE_FROM_CONST_DOUBLE (rv, rtl); - real_to_target (val, &rv, GET_MODE (rtl)); + real_to_target (val, CONST_DOUBLE_REAL_VALUE (rtl), GET_MODE (rtl)); /* real_to_target puts 32-bit pieces in each long. Pack them. */ for (i = 0; i < GET_MODE_SIZE (GET_MODE (rtl)) / 4; i++) diff --git a/gcc/expmed.c b/gcc/expmed.c index 07578e7..93cf508 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -3234,17 +3234,12 @@ expand_mult (machine_mode mode, rtx op0, rtx op1, rtx target, skip_synth: /* Expand x*2.0 as x+x. */ - if (CONST_DOUBLE_AS_FLOAT_P (scalar_op1)) + if (CONST_DOUBLE_AS_FLOAT_P (scalar_op1) + && real_equal (CONST_DOUBLE_REAL_VALUE (scalar_op1), &dconst2)) { - REAL_VALUE_TYPE d; - REAL_VALUE_FROM_CONST_DOUBLE (d, scalar_op1); - - if (real_equal (&d, &dconst2)) - { - op0 = force_reg (GET_MODE (op0), op0); - return expand_binop (mode, add_optab, op0, op0, - target, unsignedp, OPTAB_LIB_WIDEN); - } + op0 = force_reg (GET_MODE (op0), op0); + return expand_binop (mode, add_optab, op0, op0, + target, unsignedp, OPTAB_LIB_WIDEN); } /* This used to use umul_optab if unsigned, but for non-widening multiply @@ -4997,12 +4992,7 @@ make_tree (tree type, rtx x) wide_int::from_array (&CONST_DOUBLE_LOW (x), 2, HOST_BITS_PER_WIDE_INT * 2)); else - { - REAL_VALUE_TYPE d; - - REAL_VALUE_FROM_CONST_DOUBLE (d, x); - t = build_real (type, d); - } + t = build_real (type, *CONST_DOUBLE_REAL_VALUE (x)); return t; @@ -3626,11 +3626,11 @@ compress_float_constant (rtx x, rtx y) machine_mode dstmode = GET_MODE (x); machine_mode orig_srcmode = GET_MODE (y); machine_mode srcmode; - REAL_VALUE_TYPE r; + const REAL_VALUE_TYPE *r; int oldcost, newcost; bool speed = optimize_insn_for_speed_p (); - REAL_VALUE_FROM_CONST_DOUBLE (r, y); + r = CONST_DOUBLE_REAL_VALUE (y); if (targetm.legitimate_constant_p (dstmode, y)) oldcost = set_src_cost (y, orig_srcmode, speed); @@ -3651,10 +3651,10 @@ compress_float_constant (rtx x, rtx y) continue; /* Skip if the narrowed value isn't exact. */ - if (! exact_real_truncate (srcmode, &r)) + if (! exact_real_truncate (srcmode, r)) continue; - trunc_y = const_double_from_real_value (r, srcmode); + trunc_y = const_double_from_real_value (*r, srcmode); if (targetm.legitimate_constant_p (srcmode, trunc_y)) { @@ -426,10 +426,6 @@ extern const REAL_VALUE_TYPE * dconst_sqrt2_ptr (void); from a given integer constant. */ REAL_VALUE_TYPE real_value_from_int_cst (const_tree, const_tree); -/* Given a CONST_DOUBLE in FROM, store into TO the value it represents. */ -#define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \ - ((to) = *CONST_DOUBLE_REAL_VALUE (from)) - /* Return a CONST_DOUBLE with value R and mode M. */ extern rtx const_double_from_real_value (REAL_VALUE_TYPE, machine_mode); diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 815fc49..23b2c45 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -5785,15 +5785,13 @@ split_double (rtx value, rtx *first, rtx *second) } else { - REAL_VALUE_TYPE r; long l[2]; - REAL_VALUE_FROM_CONST_DOUBLE (r, value); /* Note, this converts the REAL_VALUE_TYPE to the target's format, splits up the floating point double and outputs exactly 32 bits of it into each of l[0] and l[1] -- not necessarily BITS_PER_WORD bits. */ - REAL_VALUE_TO_TARGET_DOUBLE (r, l); + REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (value), l); /* If 32 bits is an entire word for the target, but not for the host, then sign-extend on the host so that the number will look the same diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 84a4bad..1f91afc 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -224,12 +224,8 @@ avoid_constant_pool_reference (rtx x) tmp = XEXP (x, 0); c = avoid_constant_pool_reference (tmp); if (c != tmp && CONST_DOUBLE_AS_FLOAT_P (c)) - { - REAL_VALUE_TYPE d; - - REAL_VALUE_FROM_CONST_DOUBLE (d, c); - return const_double_from_real_value (d, GET_MODE (x)); - } + return const_double_from_real_value (*CONST_DOUBLE_REAL_VALUE (c), + GET_MODE (x)); return x; default: @@ -1793,9 +1789,7 @@ simplify_const_unary_operation (enum rtx_code code, machine_mode mode, && SCALAR_FLOAT_MODE_P (mode) && SCALAR_FLOAT_MODE_P (GET_MODE (op))) { - REAL_VALUE_TYPE d; - REAL_VALUE_FROM_CONST_DOUBLE (d, op); - + REAL_VALUE_TYPE d = *CONST_DOUBLE_REAL_VALUE (op); switch (code) { case SQRT: @@ -1846,8 +1840,8 @@ simplify_const_unary_operation (enum rtx_code code, machine_mode mode, /* This was formerly used only for non-IEEE float. eggert@twinsun.com says it is safe for IEEE also. */ - REAL_VALUE_TYPE x, t; - REAL_VALUE_FROM_CONST_DOUBLE (x, op); + REAL_VALUE_TYPE t; + const REAL_VALUE_TYPE *x = CONST_DOUBLE_REAL_VALUE (op); wide_int wmax, wmin; /* This is part of the abi to real_to_integer, but we check things before making this call. */ @@ -1856,37 +1850,36 @@ simplify_const_unary_operation (enum rtx_code code, machine_mode mode, switch (code) { case FIX: - if (REAL_VALUE_ISNAN (x)) + if (REAL_VALUE_ISNAN (*x)) return const0_rtx; /* Test against the signed upper bound. */ wmax = wi::max_value (width, SIGNED); real_from_integer (&t, VOIDmode, wmax, SIGNED); - if (real_less (&t, &x)) + if (real_less (&t, x)) return immed_wide_int_const (wmax, mode); /* Test against the signed lower bound. */ wmin = wi::min_value (width, SIGNED); real_from_integer (&t, VOIDmode, wmin, SIGNED); - if (real_less (&x, &t)) + if (real_less (x, &t)) return immed_wide_int_const (wmin, mode); - return immed_wide_int_const (real_to_integer (&x, &fail, width), mode); - break; + return immed_wide_int_const (real_to_integer (x, &fail, width), + mode); case UNSIGNED_FIX: - if (REAL_VALUE_ISNAN (x) || REAL_VALUE_NEGATIVE (x)) + if (REAL_VALUE_ISNAN (*x) || REAL_VALUE_NEGATIVE (*x)) return const0_rtx; /* Test against the unsigned upper bound. */ wmax = wi::max_value (width, UNSIGNED); real_from_integer (&t, VOIDmode, wmax, UNSIGNED); - if (real_less (&t, &x)) + if (real_less (&t, x)) return immed_wide_int_const (wmax, mode); - return immed_wide_int_const (real_to_integer (&x, &fail, width), + return immed_wide_int_const (real_to_integer (x, &fail, width), mode); - break; default: gcc_unreachable (); @@ -2469,14 +2462,13 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode, && !DECIMAL_FLOAT_MODE_P (GET_MODE (trueop1)) && GET_MODE (op0) == mode) { - REAL_VALUE_TYPE d; - REAL_VALUE_FROM_CONST_DOUBLE (d, trueop1); + const REAL_VALUE_TYPE *d1 = CONST_DOUBLE_REAL_VALUE (trueop1); - if (real_equal (&d, &dconst2)) + if (real_equal (d1, &dconst2)) return simplify_gen_binary (PLUS, mode, op0, copy_rtx (op0)); if (!HONOR_SNANS (mode) - && real_equal (&d, &dconstm1)) + && real_equal (d1, &dconstm1)) return simplify_gen_unary (NEG, mode, op0, mode); } @@ -3098,20 +3090,20 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode, if (CONST_DOUBLE_AS_FLOAT_P (trueop1) && trueop1 != CONST0_RTX (mode)) { - REAL_VALUE_TYPE d; - REAL_VALUE_FROM_CONST_DOUBLE (d, trueop1); + const REAL_VALUE_TYPE *d1 = CONST_DOUBLE_REAL_VALUE (trueop1); /* x/-1.0 is -x. */ - if (real_equal (&d, &dconstm1) + if (real_equal (d1, &dconstm1) && !HONOR_SNANS (mode)) return simplify_gen_unary (NEG, mode, op0, mode); /* Change FP division by a constant into multiplication. Only do this with -freciprocal-math. */ if (flag_reciprocal_math - && !real_equal (&d, &dconst0)) + && !real_equal (d1, &dconst0)) { - real_arithmetic (&d, RDIV_EXPR, &dconst1, &d); + REAL_VALUE_TYPE d; + real_arithmetic (&d, RDIV_EXPR, &dconst1, d1); tem = const_double_from_real_value (d, mode); return simplify_gen_binary (MULT, mode, op0, tem); } @@ -3862,10 +3854,8 @@ simplify_const_binary_operation (enum rtx_code code, machine_mode mode, REAL_VALUE_TYPE f0, f1, value, result; bool inexact; - REAL_VALUE_FROM_CONST_DOUBLE (f0, op0); - REAL_VALUE_FROM_CONST_DOUBLE (f1, op1); - real_convert (&f0, mode, &f0); - real_convert (&f1, mode, &f1); + real_convert (&f0, mode, CONST_DOUBLE_REAL_VALUE (op0)); + real_convert (&f1, mode, CONST_DOUBLE_REAL_VALUE (op1)); if (HONOR_SNANS (mode) && (REAL_VALUE_ISNAN (f0) || REAL_VALUE_ISNAN (f1))) @@ -4912,13 +4902,11 @@ simplify_const_relational_operation (enum rtx_code code, && CONST_DOUBLE_AS_FLOAT_P (trueop1) && SCALAR_FLOAT_MODE_P (GET_MODE (trueop0))) { - REAL_VALUE_TYPE d0, d1; - - REAL_VALUE_FROM_CONST_DOUBLE (d0, trueop0); - REAL_VALUE_FROM_CONST_DOUBLE (d1, trueop1); + const REAL_VALUE_TYPE *d0 = CONST_DOUBLE_REAL_VALUE (trueop0); + const REAL_VALUE_TYPE *d1 = CONST_DOUBLE_REAL_VALUE (trueop1); /* Comparisons are unordered iff at least one of the values is NaN. */ - if (REAL_VALUE_ISNAN (d0) || REAL_VALUE_ISNAN (d1)) + if (REAL_VALUE_ISNAN (*d0) || REAL_VALUE_ISNAN (*d1)) switch (code) { case UNEQ: @@ -4942,8 +4930,8 @@ simplify_const_relational_operation (enum rtx_code code, } return comparison_result (code, - (real_equal (&d0, &d1) ? CMP_EQ : - real_less (&d0, &d1) ? CMP_LT : CMP_GT)); + (real_equal (d0, d1) ? CMP_EQ : + real_less (d0, d1) ? CMP_LT : CMP_GT)); } /* Otherwise, see if the operands are both integers. */ diff --git a/gcc/varasm.c b/gcc/varasm.c index a5bb2b5..48c3662 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3841,11 +3841,8 @@ output_constant_pool_2 (machine_mode mode, rtx x, unsigned int align) case MODE_FLOAT: case MODE_DECIMAL_FLOAT: { - REAL_VALUE_TYPE r; - gcc_assert (CONST_DOUBLE_AS_FLOAT_P (x)); - REAL_VALUE_FROM_CONST_DOUBLE (r, x); - assemble_real (r, mode, align); + assemble_real (*CONST_DOUBLE_REAL_VALUE (x), mode, align); break; } |