+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
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. */
{
#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);
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
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)
/* 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;
}
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;
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))
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;
}
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;
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;
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);
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))
{
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);
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);
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
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;
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;
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);
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);
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)
(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));
(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));
{
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;
}
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;
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);
}
/* 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;
}
/* 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;
}
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);
}
/*}}}*/
{
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;
}
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;
}
{
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);
(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))
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);
}
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;
}
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;
}
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;
}
{
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;
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. */
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;
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);
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);
}
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 ();
}
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] =
(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);
/* 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)
{
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)
""
"*
{
- 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\";
}"
""
"*
{
- 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\";
}"
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)
/* 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;
}
{
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]);
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
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
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;
}
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
{
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) {
"TARGET_COLDFIRE_FPU"
{
rtx xoperands[3];
- REAL_VALUE_TYPE r;
long l[2];
switch (which_alternative)
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]);
[(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);
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;
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);
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
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 "";
}
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
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;
}
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:
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:
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;
}
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)
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. */
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;
}
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++)
{
static void
pdp11_asm_print_operand (FILE *file, rtx x, int code)
{
- REAL_VALUE_TYPE r;
long sval[2];
if (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
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;
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];
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;
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
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)
(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)
{
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)
{
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)
{
"
{
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);
{
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);
{
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. */
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);
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:
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. */
{
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]
[(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]));
""
{
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")
""
{
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")
{
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);
}
{
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);
}
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);
}
|| 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);
}
(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";
})
(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";
})
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);
}
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;
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)
|| 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++)
{
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;
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)));
}
}
[(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));
(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"
}
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
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;
}
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;
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;
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;
}
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++)
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
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;
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);
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))
{
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);
}
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
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:
&& 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:
/* 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. */
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 ();
&& !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);
}
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);
}
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)))
&& 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:
}
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. */
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;
}