diff options
author | Richard Sandiford <rsandifo@nildram.co.uk> | 2007-09-23 09:29:02 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-09-23 09:29:02 +0000 |
commit | f2531eb6e5d9c62379284931f9994e69718015b2 (patch) | |
tree | 149ca91c984f87e9c3a779cadd232e24ddc4cae4 /gcc | |
parent | 254d164615d2c3c3225626fe7ee6d70802bafe5e (diff) | |
download | gcc-f2531eb6e5d9c62379284931f9994e69718015b2.zip gcc-f2531eb6e5d9c62379284931f9994e69718015b2.tar.gz gcc-f2531eb6e5d9c62379284931f9994e69718015b2.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 36 |
2 files changed, 22 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 350b9ba..3d7faf5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 1d72056..5e939d1 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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 (); } |