diff options
author | Kenneth Zadeck <zadeck@naturalbridge.com> | 2013-12-13 16:38:53 +0000 |
---|---|---|
committer | Kenneth Zadeck <zadeck@gcc.gnu.org> | 2013-12-13 16:38:53 +0000 |
commit | 8fd05f4d87084929be12624d3f21000ef593d2c3 (patch) | |
tree | 974155cc0ff2cb4d9b49bd4bd46084ad9e23ce18 /gcc/genmodes.c | |
parent | 62c6e26e3326d13b47fba3b4375b261a8431d422 (diff) | |
download | gcc-8fd05f4d87084929be12624d3f21000ef593d2c3.tar.gz |
arc.h (BITS_PER_UNIT): Removed.
2013-12-13 Kenneth Zadeck <zadeck@naturalbridge.com>
* config/arc/arc.h (BITS_PER_UNIT): Removed.
* config/bfin/bfin.h (BITS_PER_UNIT): Removed.
* config/lm32/lm32.h (BITS_PER_UNIT): Removed.
* config/m32c/m32c.h (BITS_PER_UNIT): Removed.
* config/microblaze/microblaze.h (BITS_PER_UNIT): Removed.
* config/picochip/picochip.h (BITS_PER_UNIT): Removed.
* config/spu/spu.h (BITS_PER_UNIT): Removed.
* defaults.h (BITS_PER_UNIT): Removed.
* config/i386/i386-modes.def (MAX_BITSIZE_MODE_ANY_INT): New.
* doc/rtl (BITS_PER_UNIT): Moved from tm.texi.
(MAX_BITSIZE_MODE_ANY_INT): Updated.
* doc/tm.texi (BITS_PER_UNIT): Removed.
* doc/tm.texi.in (BITS_PER_UNIT): Removed.
* genmodes.c (bits_per_unit, max_bitsize_mode_any_int): New.
(create_modes): Added code to set bits_per_unit and
max_bitsize_mode_any_int.
(emit_max_int): Changed code generation.
* mkconfig.sh: Added insn-modes.h.
From-SVN: r205964
Diffstat (limited to 'gcc/genmodes.c')
-rw-r--r-- | gcc/genmodes.c | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/gcc/genmodes.c b/gcc/genmodes.c index 3c1ce0e9301..641623d385e 100644 --- a/gcc/genmodes.c +++ b/gcc/genmodes.c @@ -711,10 +711,27 @@ make_vector_mode (enum mode_class bclass, #define ADJUST_IBIT(M, X) _ADD_ADJUST (ibit, M, X, ACCUM, UACCUM) #define ADJUST_FBIT(M, X) _ADD_ADJUST (fbit, M, X, FRACT, UACCUM) +static int bits_per_unit; +static int max_bitsize_mode_any_int; + static void create_modes (void) { #include "machmode.def" + + /* So put the default value unless the target needs a non standard + value. */ +#ifdef BITS_PER_UNIT + bits_per_unit = BITS_PER_UNIT; +#else + bits_per_unit = 8; +#endif + +#ifdef MAX_BITSIZE_MODE_ANY_INT + max_bitsize_mode_any_int = MAX_BITSIZE_MODE_ANY_INT; +#else + max_bitsize_mode_any_int = 0; +#endif } /* Processing. */ @@ -860,16 +877,24 @@ emit_max_int (void) int j; puts (""); - for (max = 1, i = modes[MODE_INT]; i; i = i->next) - if (max < i->bytesize) - max = i->bytesize; - mmax = max; - for (max = 1, i = modes[MODE_PARTIAL_INT]; i; i = i->next) - if (max < i->bytesize) - max = i->bytesize; - if (max > mmax) - mmax = max; - printf ("#define MAX_BITSIZE_MODE_ANY_INT %d*BITS_PER_UNIT\n", mmax); + + printf ("#define BITS_PER_UNIT (%d)\n", bits_per_unit); + + if (max_bitsize_mode_any_int == 0) + { + for (max = 1, i = modes[MODE_INT]; i; i = i->next) + if (max < i->bytesize) + max = i->bytesize; + mmax = max; + for (max = 1, i = modes[MODE_PARTIAL_INT]; i; i = i->next) + if (max < i->bytesize) + max = i->bytesize; + if (max > mmax) + mmax = max; + printf ("#define MAX_BITSIZE_MODE_ANY_INT %d*BITS_PER_UNIT\n", mmax); + } + else + printf ("#define MAX_BITSIZE_MODE_ANY_INT %d\n", max_bitsize_mode_any_int); mmax = 0; for (j = 0; j < MAX_MODE_CLASS; j++) |