diff options
author | jfc <jfc@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-01 16:47:41 +0000 |
---|---|---|
committer | jfc <jfc@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-01 16:47:41 +0000 |
commit | 33685f56cd53281fb097a7b47ae866dd2b529c41 (patch) | |
tree | d9bf3be339a2978253909ce15a9dede99fd49e66 /gcc/rtl.c | |
parent | a821813a77e293802b6aab756a37a69d5be25125 (diff) | |
download | gcc-33685f56cd53281fb097a7b47ae866dd2b529c41.tar.gz |
* dwarf2out.c (expand_builtin_dwarf_reg_size): Fix to work
with more than three size ranges.
* flow.c (sbitmap_copy): Use bcopy to copy bitmap.
* rtl.c (mode_name): Add a null string at the end of the array.
(mode_wider_mode): Change type to unsigned char.
(mode_mask_array): New variable.
(init_rtl): Update for mode_wider_mode type change.
* rtl.h (mode_wider_mode): Change type to unsigned char.
(mode_mask_array): Declare.
(GET_MODE_MASK): Use mode_mask_array.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22717 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c index 26ffc9a2a10..1929459a8ff 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -58,13 +58,15 @@ char *rtx_name[] = { #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) NAME, -char *mode_name[(int) MAX_MACHINE_MODE] = { +char *mode_name[(int) MAX_MACHINE_MODE + 1] = { #include "machmode.def" #ifdef EXTRA_CC_MODES - EXTRA_CC_NAMES + EXTRA_CC_NAMES, #endif - + /* Add an extra field to avoid a core dump if someone tries to convert + MAX_MACHINE_MODE to a string. */ + "" }; #undef DEF_MACHMODE @@ -107,14 +109,23 @@ int mode_unit_size[(int) MAX_MACHINE_MODE] = { use this. */ #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) \ - (enum machine_mode) WIDER, + (unsigned char) WIDER, -enum machine_mode mode_wider_mode[(int) MAX_MACHINE_MODE] = { +unsigned char mode_wider_mode[(int) MAX_MACHINE_MODE] = { #include "machmode.def" /* machine modes are documented here */ }; #undef DEF_MACHMODE +#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) \ + ((SIZE) * BITS_PER_UNIT >= HOST_BITS_PER_WIDE_INT) ? ~(unsigned HOST_WIDE_INT)0 : ((unsigned HOST_WIDE_INT) 1 << (SIZE) * BITS_PER_UNIT) - 1, + +/* Indexed by machine mode, gives mask of significant bits in mode. */ + +const unsigned HOST_WIDE_INT mode_mask_array[(int) MAX_MACHINE_MODE] = { +#include "machmode.def" +}; + /* Indexed by mode class, gives the narrowest mode for each class. */ enum machine_mode class_narrowest_mode[(int) MAX_MODE_CLASS]; @@ -892,8 +903,8 @@ init_rtl () mode_class[i] = MODE_CC; mode_size[i] = mode_size[(int) CCmode]; mode_unit_size[i] = mode_unit_size[(int) CCmode]; - mode_wider_mode[i - 1] = (enum machine_mode) i; - mode_wider_mode[i] = VOIDmode; + mode_wider_mode[i - 1] = i; + mode_wider_mode[i] = (unsigned char)VOIDmode; } #endif |