diff options
author | Mike Stump <mikestump@comcast.net> | 2013-10-30 03:02:00 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2013-10-30 03:02:00 +0000 |
commit | d8487c949ad5f1fac62020ab22544422490b37d2 (patch) | |
tree | 3e4d8c33a6e93f29e60f5b1a8bb6ff6874206439 /gcc/genmodes.c | |
parent | f0be72ea222f22adc00c57472fcd9ebfde003cb1 (diff) | |
download | gcc-d8487c949ad5f1fac62020ab22544422490b37d2.zip gcc-d8487c949ad5f1fac62020ab22544422490b37d2.tar.gz gcc-d8487c949ad5f1fac62020ab22544422490b37d2.tar.bz2 |
machmode.def (PARTIAL_INT_MODE): Add precision and name.
* machmode.def (PARTIAL_INT_MODE): Add precision and name.
* genmodes.c (PARTIAL_INT_MODE): Add precision and name.
(make_vector_mode): Increase namebuf to 16.
(emit_insn_modes_h): When processing BImode, don't
also match partial int modes.
(emit_class_narrowest_mode): Likewise.
* config/bfin/bfin-modes.def: Add precision to PDI.
* config/m32c/m32c-modes.def: Add precision to PSI.
* config/msp430/msp430-modes.def: Add precision to PSI.
* config/rs6000/rs6000-modes.def: Add precision to PTI.
* config/sh/sh-modes.def: Add precision to PSI and PDI.
From-SVN: r204193
Diffstat (limited to 'gcc/genmodes.c')
-rw-r--r-- | gcc/genmodes.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/genmodes.c b/gcc/genmodes.c index 0aa5de6..12a98f3 100644 --- a/gcc/genmodes.c +++ b/gcc/genmodes.c @@ -644,10 +644,10 @@ reset_float_format (const char *name, const char *format, m->format = format; } -/* Partial integer modes are specified by relation to a full integer mode. - For now, we do not attempt to narrow down their bit sizes. */ -#define PARTIAL_INT_MODE(M) \ - make_partial_integer_mode (#M, "P" #M, -1U, __FILE__, __LINE__) +/* Partial integer modes are specified by relation to a full integer + mode. */ +#define PARTIAL_INT_MODE(M,PREC,NAME) \ + make_partial_integer_mode (#M, #NAME, PREC, __FILE__, __LINE__) static void ATTRIBUTE_UNUSED make_partial_integer_mode (const char *base, const char *name, unsigned int precision, @@ -684,7 +684,7 @@ make_vector_mode (enum mode_class bclass, struct mode_data *v; enum mode_class vclass = vector_class (bclass); struct mode_data *component = find_mode (base); - char namebuf[8]; + char namebuf[16]; if (vclass == MODE_RANDOM) return; @@ -932,7 +932,7 @@ enum machine_mode\n{"); end will try to use it for bitfields in structures and the like, which we do not want. Only the target md file should generate BImode widgets. */ - if (first && first->precision == 1) + if (first && first->precision == 1 && c == MODE_INT) first = first->next; if (first && last) @@ -1202,7 +1202,7 @@ emit_class_narrowest_mode (void) /* Bleah, all this to get the comment right for MIN_MODE_INT. */ tagged_printf ("MIN_%s", mode_class_names[c], modes[c] - ? (modes[c]->precision != 1 + ? ((c != MODE_INT || modes[c]->precision != 1) ? modes[c]->name : (modes[c]->next ? modes[c]->next->name |