===================================================================
@@ -281,7 +281,7 @@ #define assemble_aligned_integer(SIZE, V
/* Assemble the floating-point constant D into an object of size MODE. ALIGN
is the alignment of the constant in bits. If REVERSE is true, D is output
in reverse storage order. */
-extern void assemble_real (REAL_VALUE_TYPE, machine_mode, unsigned,
+extern void assemble_real (REAL_VALUE_TYPE, scalar_float_mode, unsigned,
bool = false);
/* Write the address of the entity given by SYMBOL to SEC. */
===================================================================
@@ -22664,8 +22664,9 @@ arm_assemble_integer (rtx x, unsigned in
for (i = 0; i < units; i++)
{
rtx elt = CONST_VECTOR_ELT (x, i);
- assemble_real
- (*CONST_DOUBLE_REAL_VALUE (elt), GET_MODE_INNER (mode),
+ assemble_real
+ (*CONST_DOUBLE_REAL_VALUE (elt),
+ as_a <scalar_float_mode> (GET_MODE_INNER (mode)),
i == 0 ? BIGGEST_ALIGNMENT : size * BITS_PER_UNIT);
}
===================================================================
@@ -11232,13 +11232,11 @@ (define_insn "consttable_4"
{
rtx x = operands[0];
making_const_table = TRUE;
- switch (GET_MODE_CLASS (GET_MODE (x)))
+ scalar_float_mode float_mode;
+ if (is_a <scalar_float_mode> (GET_MODE (x), &float_mode))
+ assemble_real (*CONST_DOUBLE_REAL_VALUE (x), float_mode, BITS_PER_WORD);
+ else
{
- case MODE_FLOAT:
- 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
load into a VFP register. We know this will always be used in
@@ -11248,7 +11246,6 @@ (define_insn "consttable_4"
x = XEXP (x, 0);
assemble_integer (x, 4, BITS_PER_WORD, 1);
mark_symbol_refs_as_used (x);
- break;
}
return \"\";
}"
@@ -11262,16 +11259,12 @@ (define_insn "consttable_8"
"*
{
making_const_table = TRUE;
- switch (GET_MODE_CLASS (GET_MODE (operands[0])))
- {
- 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;
- }
+ scalar_float_mode float_mode;
+ if (is_a <scalar_float_mode> (GET_MODE (operands[0]), &float_mode))
+ assemble_real (*CONST_DOUBLE_REAL_VALUE (operands[0]),
+ float_mode, BITS_PER_WORD);
+ else
+ assemble_integer (operands[0], 8, BITS_PER_WORD, 1);
return \"\";
}"
[(set_attr "length" "8")
@@ -11284,16 +11277,12 @@ (define_insn "consttable_16"
"*
{
making_const_table = TRUE;
- switch (GET_MODE_CLASS (GET_MODE (operands[0])))
- {
- 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;
- }
+ scalar_float_mode float_mode;
+ if (is_a <scalar_float_mode> (GET_MODE (operands[0]), &float_mode))
+ assemble_real (*CONST_DOUBLE_REAL_VALUE (operands[0]),
+ float_mode, BITS_PER_WORD);
+ else
+ assemble_integer (operands[0], 16, BITS_PER_WORD, 1);
return \"\";
}"
[(set_attr "length" "16")
===================================================================
@@ -7358,7 +7358,7 @@ (define_insn "consttable_float"
{
gcc_assert (GET_CODE (operands[0]) == CONST_DOUBLE);
assemble_real (*CONST_DOUBLE_REAL_VALUE (operands[0]),
- GET_MODE (operands[0]),
+ as_a <scalar_float_mode> (GET_MODE (operands[0])),
GET_MODE_BITSIZE (GET_MODE (operands[0])));
return "";
}
===================================================================
@@ -9494,7 +9494,8 @@ s390_output_pool_entry (rtx exp, machine
case MODE_DECIMAL_FLOAT:
gcc_assert (GET_CODE (exp) == CONST_DOUBLE);
- assemble_real (*CONST_DOUBLE_REAL_VALUE (exp), mode, align);
+ assemble_real (*CONST_DOUBLE_REAL_VALUE (exp),
+ as_a <scalar_float_mode> (mode), align);
break;
case MODE_INT:
===================================================================
@@ -2759,7 +2759,7 @@ assemble_integer (rtx x, unsigned int si
in reverse storage order. */
void
-assemble_real (REAL_VALUE_TYPE d, machine_mode mode, unsigned int align,
+assemble_real (REAL_VALUE_TYPE d, scalar_float_mode mode, unsigned int align,
bool reverse)
{
long data[4] = {0, 0, 0, 0};
@@ -3829,7 +3829,8 @@ output_constant_pool_2 (machine_mode mod
case MODE_DECIMAL_FLOAT:
{
gcc_assert (CONST_DOUBLE_AS_FLOAT_P (x));
- assemble_real (*CONST_DOUBLE_REAL_VALUE (x), mode, align, false);
+ assemble_real (*CONST_DOUBLE_REAL_VALUE (x),
+ as_a <scalar_float_mode> (mode), align, false);
break;
}
@@ -4811,7 +4812,8 @@ output_constant (tree exp, unsigned HOST
if (TREE_CODE (exp) != REAL_CST)
error ("initializer for floating value is not a floating constant");
else
- assemble_real (TREE_REAL_CST (exp), TYPE_MODE (TREE_TYPE (exp)),
+ assemble_real (TREE_REAL_CST (exp),
+ SCALAR_FLOAT_TYPE_MODE (TREE_TYPE (exp)),
align, reverse);
break;