Commit f2531eb6 by Richard Sandiford Committed by Richard Sandiford

mips.c (dump_constants_1): Generalize to include fractional and accumulator modes.

gcc/
	* config/mips/mips.c (dump_constants_1): Generalize to include
	fractional and accumulator modes.

From-SVN: r128684
parent 254d1646
2007-09-23 Richard Sandiford <rsandifo@nildram.co.uk>
* config/mips/mips.c (dump_constants_1): Generalize to include
fractional and accumulator modes.
2007-09-23 Richard Sandiford <rsandifo@nildram.co.uk>
* config/mips/mips.h (ISA_HAS_DSP, ISA_HAS_DSPR2): New macros.
* config/mips/mips.c (mips_set_mips16_mode): Don't clear the DSP
flags for MIPS16.
......@@ -10218,30 +10218,28 @@ add_constant (struct mips16_constant_pool *pool,
static rtx
dump_constants_1 (enum machine_mode mode, rtx value, rtx insn)
{
switch (GET_MODE_CLASS (mode))
if (SCALAR_INT_MODE_P (mode)
|| ALL_SCALAR_FRACT_MODE_P (mode)
|| ALL_SCALAR_ACCUM_MODE_P (mode))
{
case MODE_INT:
{
rtx size = GEN_INT (GET_MODE_SIZE (mode));
return emit_insn_after (gen_consttable_int (value, size), insn);
}
rtx size = GEN_INT (GET_MODE_SIZE (mode));
return emit_insn_after (gen_consttable_int (value, size), insn);
}
case MODE_FLOAT:
return emit_insn_after (gen_consttable_float (value), insn);
if (SCALAR_FLOAT_MODE_P (mode))
return emit_insn_after (gen_consttable_float (value), insn);
case MODE_VECTOR_FLOAT:
case MODE_VECTOR_INT:
{
int i;
for (i = 0; i < CONST_VECTOR_NUNITS (value); i++)
insn = dump_constants_1 (GET_MODE_INNER (mode),
CONST_VECTOR_ELT (value, i), insn);
return insn;
}
if (VECTOR_MODE_P (mode))
{
int i;
default:
gcc_unreachable ();
for (i = 0; i < CONST_VECTOR_NUNITS (value); i++)
insn = dump_constants_1 (GET_MODE_INNER (mode),
CONST_VECTOR_ELT (value, i), insn);
return insn;
}
gcc_unreachable ();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment