summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog37
-rw-r--r--gcc/config/c6x/c6x.md4
-rw-r--r--gcc/config/epiphany/epiphany.md2
-rw-r--r--gcc/config/i386/i386.c12
-rw-r--r--gcc/config/ia64/ia64.c2
-rw-r--r--gcc/config/mips/mips.md8
-rw-r--r--gcc/config/pa/pa.c2
-rw-r--r--gcc/config/rs6000/rs6000.c8
-rw-r--r--gcc/config/rs6000/rs6000.md4
-rw-r--r--gcc/config/s390/s390.md12
-rw-r--r--gcc/config/s390/vx-builtins.md8
-rw-r--r--gcc/config/sparc/sparc.c2
-rw-r--r--gcc/config/spu/spu.c4
-rw-r--r--gcc/config/spu/spu.md4
-rw-r--r--gcc/cse.c2
-rw-r--r--gcc/emit-rtl.c6
-rw-r--r--gcc/expr.c6
-rw-r--r--gcc/optabs.c4
-rw-r--r--gcc/real.h4
-rw-r--r--gcc/reg-stack.c2
-rw-r--r--gcc/simplify-rtx.c18
21 files changed, 93 insertions, 58 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d2567008e55..853c728657c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,42 @@
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.
+ * config/c6x/c6x.md (divsf3, divdf3): Use const_double_from_real_value
+ instead of CONST_DOUBLE_FROM_REAL_VALUE.
+ * config/epiphany/epiphany.md (fixuns_truncsfsi2): Likewise.
+ * config/i386/i386.c (standard_80387_constant_rtx): Likewise.
+ (ix86_expand_builtin, ix86_emit_i387_log1p, ix86_emit_i387_round)
+ (ix86_emit_swsqrtsf): Likewise.
+ * config/ia64/ia64.c (ia64_expand_builtin): Likewise.
+ * config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
+ (fixuns_truncsfsi2, fixuns_truncsfdi2): Likewise.
+ * config/pa/pa.c (pa_expand_builtin): Likewise.
+ * config/rs6000/rs6000.c (rs6000_load_constant_and_splat): Likewise.
+ (rs6000_scale_v2df): Likewise.
+ * config/rs6000/rs6000.md (*cmptf_internal2): Likewise.
+ * config/s390/s390.md (fixuns_truncdddi2, fixuns_trunctddi2)
+ (fixuns_trunc<BFP:mode><GPR:mode>2): Likewise.
+ * config/s390/vx-builtins.md (vec_ctd_s64, vec_ctd_u64, vec_ctsl)
+ (vec_ctul): Likewise.
+ * config/sparc/sparc.c (sparc_emit_fixunsdi): Likewise.
+ * config/spu/spu.c (hwint_to_const_double, spu_float_const): Likewise.
+ * config/spu/spu.md (floatunsdisf2, floatunstisf2): Likewise.
+ * cse.c (fold_rtx): Likewise.
+ * emit-rtl.c (immed_double_const): Likewise (in comments).
+ (init_emit_once): Likewise.
+ * expr.c (compress_float_constant, expand_expr_real_1)
+ (const_vector_from_tree): Likewise.
+ * optabs.c (expand_float, expand_fix): Likewise.
+ * reg-stack.c (reg_to_stack): Likewise.
+ * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
+ (simplify_const_unary_operation, simplify_binary_operation_1)
+ (simplify_const_binary_operation, simplify_relational_operation)
+ (simplify_immed_subreg): Likewise.
+
+2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
+
* doc/tm.texi.in (REAL_ARITHMETIC): Delete.
* doc/tm.texi: Regenerate.
* real.h (REAL_ARITHMETIC): Delete.
diff --git a/gcc/config/c6x/c6x.md b/gcc/config/c6x/c6x.md
index 075968d9892..692d83fceba 100644
--- a/gcc/config/c6x/c6x.md
+++ b/gcc/config/c6x/c6x.md
@@ -2811,7 +2811,7 @@
"TARGET_FP && flag_reciprocal_math"
{
operands[3] = force_reg (SFmode,
- CONST_DOUBLE_FROM_REAL_VALUE (dconst2, SFmode));
+ const_double_from_real_value (dconst2, SFmode));
operands[4] = gen_reg_rtx (SFmode);
operands[5] = gen_reg_rtx (SFmode);
operands[6] = gen_reg_rtx (SFmode);
@@ -2836,7 +2836,7 @@
"TARGET_FP && flag_reciprocal_math"
{
operands[3] = force_reg (DFmode,
- CONST_DOUBLE_FROM_REAL_VALUE (dconst2, DFmode));
+ const_double_from_real_value (dconst2, DFmode));
operands[4] = gen_reg_rtx (DFmode);
operands[5] = gen_reg_rtx (DFmode);
operands[6] = gen_reg_rtx (DFmode);
diff --git a/gcc/config/epiphany/epiphany.md b/gcc/config/epiphany/epiphany.md
index 428092601c0..4c8b5d6af83 100644
--- a/gcc/config/epiphany/epiphany.md
+++ b/gcc/config/epiphany/epiphany.md
@@ -982,7 +982,7 @@
rtx cmp = gen_rtx_LT (VOIDmode, cc1, CONST0_RTX (SFmode));
real_2expN (&offset, 31, SFmode);
- limit = CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode);
+ limit = const_double_from_real_value (offset, SFmode);
limit = force_reg (SFmode, limit);
emit_insn (gen_fix_truncsfsi2 (operands[0], operands[1]));
emit_insn (gen_subsf3_f (tmp, operands[1], limit));
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 44847b4d5ec..ff5277996b9 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -10573,7 +10573,7 @@ standard_80387_constant_rtx (int idx)
gcc_unreachable ();
}
- return CONST_DOUBLE_FROM_REAL_VALUE (ext_80387_constants_table[i],
+ return const_double_from_real_value (ext_80387_constants_table[i],
XFmode);
}
@@ -40143,7 +40143,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
rtx tmp;
real_inf (&inf);
- tmp = CONST_DOUBLE_FROM_REAL_VALUE (inf, mode);
+ tmp = const_double_from_real_value (inf, mode);
tmp = validize_mem (force_const_mem (mode, tmp));
@@ -47021,7 +47021,7 @@ void ix86_emit_i387_log1p (rtx op0, rtx op1)
emit_insn (gen_absxf2 (tmp, op1));
test = gen_rtx_GE (VOIDmode, tmp,
- CONST_DOUBLE_FROM_REAL_VALUE (
+ const_double_from_real_value (
REAL_VALUE_ATOF ("0.29289321881345247561810596348408353", XFmode),
XFmode));
emit_jump_insn (gen_cbranchxf4 (test, XEXP (test, 0), XEXP (test, 1), label1));
@@ -47095,7 +47095,7 @@ void ix86_emit_i387_round (rtx op0, rtx op1)
e2 = gen_reg_rtx (inmode);
res = gen_reg_rtx (outmode);
- half = CONST_DOUBLE_FROM_REAL_VALUE (dconsthalf, inmode);
+ half = const_double_from_real_value (dconsthalf, inmode);
/* round(a) = sgn(a) * floor(fabs(a) + 0.5) */
@@ -47227,10 +47227,10 @@ void ix86_emit_swsqrtsf (rtx res, rtx a, machine_mode mode,
e3 = gen_reg_rtx (mode);
real_from_integer (&r, VOIDmode, -3, SIGNED);
- mthree = CONST_DOUBLE_FROM_REAL_VALUE (r, SFmode);
+ mthree = const_double_from_real_value (r, SFmode);
real_arithmetic (&r, NEGATE_EXPR, &dconsthalf, NULL);
- mhalf = CONST_DOUBLE_FROM_REAL_VALUE (r, SFmode);
+ mhalf = const_double_from_real_value (r, SFmode);
unspec = UNSPEC_RSQRT;
if (VECTOR_MODE_P (mode))
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 779fc58789f..99c965ab7c0 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -10473,7 +10473,7 @@ ia64_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
rtx tmp;
real_inf (&inf);
- tmp = CONST_DOUBLE_FROM_REAL_VALUE (inf, target_mode);
+ tmp = const_double_from_real_value (inf, target_mode);
tmp = validize_mem (force_const_mem (target_mode, tmp));
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 1d1c42bf5f5..3ad41c6dd8a 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -3976,7 +3976,7 @@
if (reg1) /* Turn off complaints about unreached code. */
{
- mips_emit_move (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, DFmode));
+ mips_emit_move (reg1, const_double_from_real_value (offset, DFmode));
do_pending_stack_adjust ();
test = gen_rtx_GE (VOIDmode, operands[1], reg1);
@@ -4020,7 +4020,7 @@
real_2expN (&offset, 63, DFmode);
- mips_emit_move (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, DFmode));
+ mips_emit_move (reg1, const_double_from_real_value (offset, DFmode));
do_pending_stack_adjust ();
test = gen_rtx_GE (VOIDmode, operands[1], reg1);
@@ -4062,7 +4062,7 @@
real_2expN (&offset, 31, SFmode);
- mips_emit_move (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode));
+ mips_emit_move (reg1, const_double_from_real_value (offset, SFmode));
do_pending_stack_adjust ();
test = gen_rtx_GE (VOIDmode, operands[1], reg1);
@@ -4104,7 +4104,7 @@
real_2expN (&offset, 63, SFmode);
- mips_emit_move (reg1, CONST_DOUBLE_FROM_REAL_VALUE (offset, SFmode));
+ mips_emit_move (reg1, const_double_from_real_value (offset, SFmode));
do_pending_stack_adjust ();
test = gen_rtx_GE (VOIDmode, operands[1], reg1);
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 38daa5fec71..0dc09318d47 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -652,7 +652,7 @@ pa_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
rtx tmp;
real_inf (&inf);
- tmp = CONST_DOUBLE_FROM_REAL_VALUE (inf, target_mode);
+ tmp = const_double_from_real_value (inf, target_mode);
tmp = validize_mem (force_const_mem (target_mode, tmp));
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index e4082959992..3b4820bd82b 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -31849,19 +31849,19 @@ rs6000_load_constant_and_splat (machine_mode mode, REAL_VALUE_TYPE dconst)
if (mode == SFmode || mode == DFmode)
{
- rtx d = CONST_DOUBLE_FROM_REAL_VALUE (dconst, mode);
+ rtx d = const_double_from_real_value (dconst, mode);
reg = force_reg (mode, d);
}
else if (mode == V4SFmode)
{
- rtx d = CONST_DOUBLE_FROM_REAL_VALUE (dconst, SFmode);
+ rtx d = const_double_from_real_value (dconst, SFmode);
rtvec v = gen_rtvec (4, d, d, d, d);
reg = gen_reg_rtx (mode);
rs6000_expand_vector_init (reg, gen_rtx_PARALLEL (mode, v));
}
else if (mode == V2DFmode)
{
- rtx d = CONST_DOUBLE_FROM_REAL_VALUE (dconst, DFmode);
+ rtx d = const_double_from_real_value (dconst, DFmode);
rtvec v = gen_rtvec (2, d, d);
reg = gen_reg_rtx (mode);
rs6000_expand_vector_init (reg, gen_rtx_PARALLEL (mode, v));
@@ -32699,7 +32699,7 @@ rs6000_scale_v2df (rtx tgt, rtx src, int scale)
rtx elt;
rtx scale_vec = gen_reg_rtx (V2DFmode);
(void)real_powi (&r_pow, DFmode, &dconst2, hwi_scale);
- elt = CONST_DOUBLE_FROM_REAL_VALUE (r_pow, DFmode);
+ elt = const_double_from_real_value (r_pow, DFmode);
RTVEC_ELT (v, 0) = elt;
RTVEC_ELT (v, 1) = elt;
rs6000_expand_vector_init (scale_vec, gen_rtx_PARALLEL (V2DFmode, v));
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 8c53c40aba7..df9d48e7ef5 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -10582,9 +10582,9 @@
operands[13] = gen_label_rtx ();
real_inf (&rv);
operands[14] = force_const_mem (DFmode,
- CONST_DOUBLE_FROM_REAL_VALUE (rv, DFmode));
+ const_double_from_real_value (rv, DFmode));
operands[15] = force_const_mem (DFmode,
- CONST_DOUBLE_FROM_REAL_VALUE (dconst0,
+ const_double_from_real_value (dconst0,
DFmode));
if (TARGET_TOC)
{
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 2be7653d713..18224592881 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -4437,10 +4437,10 @@
emit_insn (gen_extendddtd2 (temp, operands[1]));
temp = force_reg (TDmode, temp);
emit_cmp_and_jump_insns (temp,
- CONST_DOUBLE_FROM_REAL_VALUE (cmp, TDmode),
+ const_double_from_real_value (cmp, TDmode),
LT, NULL_RTX, VOIDmode, 0, label1);
emit_insn (gen_subtd3 (temp, temp,
- CONST_DOUBLE_FROM_REAL_VALUE (sub, TDmode)));
+ const_double_from_real_value (sub, TDmode)));
emit_insn (gen_fix_trunctddi2_dfp (operands[0], temp, GEN_INT (11)));
emit_jump (label2);
@@ -4472,10 +4472,10 @@
decimal_real_from_string (&sub, "18446744073709551616.0"); /* 2^64 */
emit_cmp_and_jump_insns (operands[1],
- CONST_DOUBLE_FROM_REAL_VALUE (cmp, TDmode),
+ const_double_from_real_value (cmp, TDmode),
LT, NULL_RTX, VOIDmode, 0, label1);
emit_insn (gen_subtd3 (temp, operands[1],
- CONST_DOUBLE_FROM_REAL_VALUE (sub, TDmode)));
+ const_double_from_real_value (sub, TDmode)));
emit_insn (gen_fix_trunctddi2_dfp (operands[0], temp, GEN_INT (11)));
emit_jump (label2);
@@ -4511,10 +4511,10 @@
real_2expN (&sub, <GPR:bitsize>, <BFP:MODE>mode);
emit_cmp_and_jump_insns (operands[1],
- CONST_DOUBLE_FROM_REAL_VALUE (cmp, <BFP:MODE>mode),
+ const_double_from_real_value (cmp, <BFP:MODE>mode),
LT, NULL_RTX, VOIDmode, 0, label1);
emit_insn (gen_sub<BFP:mode>3 (temp, operands[1],
- CONST_DOUBLE_FROM_REAL_VALUE (sub, <BFP:MODE>mode)));
+ const_double_from_real_value (sub, <BFP:MODE>mode)));
emit_insn (gen_fix_trunc<BFP:mode><GPR:mode>2_bfp (operands[0], temp,
GEN_INT (7)));
emit_jump (label2);
diff --git a/gcc/config/s390/vx-builtins.md b/gcc/config/s390/vx-builtins.md
index 7e20d2b6986..ff7408a919f 100644
--- a/gcc/config/s390/vx-builtins.md
+++ b/gcc/config/s390/vx-builtins.md
@@ -1669,7 +1669,7 @@
rtx c;
real_2expN (&f, -INTVAL (operands[2]), DFmode);
- c = CONST_DOUBLE_FROM_REAL_VALUE (f, DFmode);
+ c = const_double_from_real_value (f, DFmode);
operands[3] = gen_rtx_CONST_VECTOR (V2DFmode, gen_rtvec (2, c, c));
operands[3] = force_reg (V2DFmode, operands[3]);
@@ -1699,7 +1699,7 @@
rtx c;
real_2expN (&f, -INTVAL (operands[2]), DFmode);
- c = CONST_DOUBLE_FROM_REAL_VALUE (f, DFmode);
+ c = const_double_from_real_value (f, DFmode);
operands[3] = gen_rtx_CONST_VECTOR (V2DFmode, gen_rtvec (2, c, c));
operands[3] = force_reg (V2DFmode, operands[3]);
@@ -1730,7 +1730,7 @@
rtx c;
real_2expN (&f, INTVAL (operands[2]), DFmode);
- c = CONST_DOUBLE_FROM_REAL_VALUE (f, DFmode);
+ c = const_double_from_real_value (f, DFmode);
operands[3] = gen_rtx_CONST_VECTOR (V2DFmode, gen_rtvec (2, c, c));
operands[3] = force_reg (V2DFmode, operands[3]);
@@ -1761,7 +1761,7 @@
rtx c;
real_2expN (&f, INTVAL (operands[2]), DFmode);
- c = CONST_DOUBLE_FROM_REAL_VALUE (f, DFmode);
+ c = const_double_from_real_value (f, DFmode);
operands[3] = gen_rtx_CONST_VECTOR (V2DFmode, gen_rtvec (2, c, c));
operands[3] = force_reg (V2DFmode, operands[3]);
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 43f0170ecc1..a7fe54662b9 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -8067,7 +8067,7 @@ sparc_emit_fixunsdi (rtx *operands, machine_mode mode)
f0 = gen_reg_rtx (mode);
emit_move_insn (limit,
- CONST_DOUBLE_FROM_REAL_VALUE (
+ const_double_from_real_value (
REAL_VALUE_ATOF ("9223372036854775808.0", mode), mode));
emit_cmp_and_jump_insns (in, limit, GE, NULL_RTX, mode, 0, neglab);
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index bdedecc7ad9..62faff625b7 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -1031,7 +1031,7 @@ hwint_to_const_double (machine_mode mode, HOST_WIDE_INT v)
tv[0] = v >> 32;
}
real_from_target (&rv, tv, mode);
- return CONST_DOUBLE_FROM_REAL_VALUE (rv, mode);
+ return const_double_from_real_value (rv, mode);
}
void
@@ -3075,7 +3075,7 @@ spu_float_const (const char *string, machine_mode mode)
{
REAL_VALUE_TYPE value;
value = REAL_VALUE_ATOF (string, mode);
- return CONST_DOUBLE_FROM_REAL_VALUE (value, mode);
+ return const_double_from_real_value (value, mode);
}
int
diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md
index 14167063636..761dbc86c8c 100644
--- a/gcc/config/spu/spu.md
+++ b/gcc/config/spu/spu.md
@@ -751,7 +751,7 @@
emit_insn (gen_shlqby_ti (op3_ti, op2_ti, GEN_INT (4)));
emit_move_insn (operands[4],
- CONST_DOUBLE_FROM_REAL_VALUE (scale, SFmode));
+ const_double_from_real_value (scale, SFmode));
emit_insn (gen_fmasf4 (operands[0],
operands[2], operands[4], operands[3]));
DONE;
@@ -810,7 +810,7 @@
emit_insn (gen_shlqby_ti (op3_ti, op2_ti, GEN_INT (4)));
emit_move_insn (operands[4],
- CONST_DOUBLE_FROM_REAL_VALUE (scale, SFmode));
+ const_double_from_real_value (scale, SFmode));
emit_insn (gen_fmasf4 (operands[2],
operands[2], operands[4], operands[3]));
diff --git a/gcc/cse.c b/gcc/cse.c
index ef375791d48..a9cc26a3124 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3342,7 +3342,7 @@ fold_rtx (rtx x, rtx_insn *insn)
if (SCALAR_FLOAT_MODE_P (mode))
{
#ifdef FLOAT_STORE_FLAG_VALUE
- true_rtx = (CONST_DOUBLE_FROM_REAL_VALUE
+ true_rtx = (const_double_from_real_value
(FLOAT_STORE_FLAG_VALUE (mode), mode));
#else
true_rtx = NULL_RTX;
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index a6ef154f3de..c418c240184 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -648,7 +648,7 @@ immed_wide_int_const (const wide_int_ref &v, machine_mode mode)
implied upper bits are copies of the high bit of i1. The value
itself is neither signed nor unsigned. Do not use this routine for
non-integer modes; convert to REAL_VALUE_TYPE and use
- CONST_DOUBLE_FROM_REAL_VALUE. */
+ const_double_from_real_value. */
rtx
immed_double_const (HOST_WIDE_INT i0, HOST_WIDE_INT i1, machine_mode mode)
@@ -5936,13 +5936,13 @@ init_emit_once (void)
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
const_tiny_rtx[i][(int) mode] =
- CONST_DOUBLE_FROM_REAL_VALUE (*r, mode);
+ const_double_from_real_value (*r, mode);
for (mode = GET_CLASS_NARROWEST_MODE (MODE_DECIMAL_FLOAT);
mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode))
const_tiny_rtx[i][(int) mode] =
- CONST_DOUBLE_FROM_REAL_VALUE (*r, mode);
+ const_double_from_real_value (*r, mode);
const_tiny_rtx[i][(int) VOIDmode] = GEN_INT (i);
diff --git a/gcc/expr.c b/gcc/expr.c
index 0bbfccd4650..6bb24c02934 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3654,7 +3654,7 @@ compress_float_constant (rtx x, rtx y)
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))
{
@@ -9708,7 +9708,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
many insns, so we'd end up copying it to a register in any case.
Now, we do the copying in expand_binop, if appropriate. */
- return CONST_DOUBLE_FROM_REAL_VALUE (TREE_REAL_CST (exp),
+ return const_double_from_real_value (TREE_REAL_CST (exp),
TYPE_MODE (TREE_TYPE (exp)));
case FIXED_CST:
@@ -11339,7 +11339,7 @@ const_vector_from_tree (tree exp)
elt = VECTOR_CST_ELT (exp, i);
if (TREE_CODE (elt) == REAL_CST)
- RTVEC_ELT (v, i) = CONST_DOUBLE_FROM_REAL_VALUE (TREE_REAL_CST (elt),
+ RTVEC_ELT (v, i) = const_double_from_real_value (TREE_REAL_CST (elt),
inner);
else if (TREE_CODE (elt) == FIXED_CST)
RTVEC_ELT (v, i) = CONST_FIXED_FROM_FIXED_VALUE (TREE_FIXED_CST (elt),
diff --git a/gcc/optabs.c b/gcc/optabs.c
index c49d66b5a0e..223daf744ee 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -4605,7 +4605,7 @@ expand_float (rtx to, rtx from, int unsignedp)
real_2expN (&offset, GET_MODE_PRECISION (GET_MODE (from)), fmode);
temp = expand_binop (fmode, add_optab, target,
- CONST_DOUBLE_FROM_REAL_VALUE (offset, fmode),
+ const_double_from_real_value (offset, fmode),
target, 0, OPTAB_LIB_WIDEN);
if (temp != target)
emit_move_insn (target, temp);
@@ -4748,7 +4748,7 @@ expand_fix (rtx to, rtx from, int unsignedp)
bitsize = GET_MODE_PRECISION (GET_MODE (to));
real_2expN (&offset, bitsize - 1, fmode);
- limit = CONST_DOUBLE_FROM_REAL_VALUE (offset, fmode);
+ limit = const_double_from_real_value (offset, fmode);
lab1 = gen_label_rtx ();
lab2 = gen_label_rtx ();
diff --git a/gcc/real.h b/gcc/real.h
index 3fff0c57233..2e23b896900 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -382,7 +382,7 @@ extern REAL_VALUE_TYPE real_from_string2 (const char *, machine_mode);
real_from_string2 (s, m)
#define CONST_DOUBLE_ATOF(s, m) \
- CONST_DOUBLE_FROM_REAL_VALUE (real_from_string2 (s, m), m)
+ const_double_from_real_value (real_from_string2 (s, m), m)
#define REAL_VALUE_FIX(r) \
real_to_integer (&(r))
@@ -431,8 +431,6 @@ REAL_VALUE_TYPE real_value_from_int_cst (const_tree, const_tree);
((to) = *CONST_DOUBLE_REAL_VALUE (from))
/* Return a CONST_DOUBLE with value R and mode M. */
-#define CONST_DOUBLE_FROM_REAL_VALUE(r, m) \
- const_double_from_real_value (r, m)
extern rtx const_double_from_real_value (REAL_VALUE_TYPE, machine_mode);
/* Replace R by 1/R in the given machine mode, if the result is exact. */
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 3944041d0df..3ff81738954 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -3241,7 +3241,7 @@ reg_to_stack (void)
REAL_VALUE_TYPE r;
real_nan (&r, "", 1, SFmode);
- not_a_num = CONST_DOUBLE_FROM_REAL_VALUE (r, SFmode);
+ not_a_num = const_double_from_real_value (r, SFmode);
not_a_num = force_const_mem (SFmode, not_a_num);
}
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 96eaae71324..84a4bad68d5 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -228,7 +228,7 @@ avoid_constant_pool_reference (rtx x)
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 (d, GET_MODE (x));
}
return x;
@@ -1684,7 +1684,7 @@ simplify_const_unary_operation (enum rtx_code code, machine_mode mode,
real_from_integer (&d, mode, std::make_pair (op, op_mode), SIGNED);
d = real_value_truncate (mode, d);
- return CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
+ return const_double_from_real_value (d, mode);
}
else if (code == UNSIGNED_FLOAT && CONST_SCALAR_INT_P (op))
{
@@ -1702,7 +1702,7 @@ simplify_const_unary_operation (enum rtx_code code, machine_mode mode,
real_from_integer (&d, mode, std::make_pair (op, op_mode), UNSIGNED);
d = real_value_truncate (mode, d);
- return CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
+ return const_double_from_real_value (d, mode);
}
if (CONST_SCALAR_INT_P (op) && width > 0)
@@ -1832,7 +1832,7 @@ simplify_const_unary_operation (enum rtx_code code, machine_mode mode,
default:
gcc_unreachable ();
}
- return CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
+ return const_double_from_real_value (d, mode);
}
else if (CONST_DOUBLE_AS_FLOAT_P (op)
&& SCALAR_FLOAT_MODE_P (GET_MODE (op))
@@ -3112,7 +3112,7 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode,
&& !real_equal (&d, &dconst0))
{
real_arithmetic (&d, RDIV_EXPR, &dconst1, &d);
- tem = CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
+ tem = const_double_from_real_value (d, mode);
return simplify_gen_binary (MULT, mode, op0, tem);
}
}
@@ -3855,7 +3855,7 @@ simplify_const_binary_operation (enum rtx_code code, machine_mode mode,
}
}
real_from_target (&r, tmp0, mode);
- return CONST_DOUBLE_FROM_REAL_VALUE (r, mode);
+ return const_double_from_real_value (r, mode);
}
else
{
@@ -3936,7 +3936,7 @@ simplify_const_binary_operation (enum rtx_code code, machine_mode mode,
&& (inexact || !real_identical (&result, &value)))
return NULL_RTX;
- return CONST_DOUBLE_FROM_REAL_VALUE (result, mode);
+ return const_double_from_real_value (result, mode);
}
}
@@ -4462,7 +4462,7 @@ simplify_relational_operation (enum rtx_code code, machine_mode mode,
{
REAL_VALUE_TYPE val;
val = FLOAT_STORE_FLAG_VALUE (mode);
- return CONST_DOUBLE_FROM_REAL_VALUE (val, mode);
+ return const_double_from_real_value (val, mode);
}
#else
return NULL_RTX;
@@ -5760,7 +5760,7 @@ simplify_immed_subreg (machine_mode outermode, rtx op,
}
real_from_target (&r, tmp, outer_submode);
- elems[elem] = CONST_DOUBLE_FROM_REAL_VALUE (r, outer_submode);
+ elems[elem] = const_double_from_real_value (r, outer_submode);
}
break;