diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2003-10-10 20:33:07 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2003-10-10 20:33:07 +0000 |
commit | 0974c7d70d3b8e9c9bf4d4cd3f86c86bb124a694 (patch) | |
tree | f9be992652ecd68b01a301007bfe03ceccd94dc6 /gcc/stor-layout.c | |
parent | 51e73d5737418298d1814d11e5b1a2c71fb6623c (diff) | |
download | gcc-0974c7d70d3b8e9c9bf4d4cd3f86c86bb124a694.tar.gz |
genmodes.c, [...]: New files.
* genmodes.c, mode-classes.def: New files.
* machmode.def: Rewritten to genmodes.c interface.
* Makefile.in (extra_modes_file): New substitution variable.
(MACHMODE_H): No longer includes machmode.def or
@extra_modes_file@; instead, mode-classes.def and insn-modes.h.
(BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o.
(OBJS-common): Add insn-modes.o.
(STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and
genmodes$(build_exeext).
(insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o,
genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets.
(s-genrtl): Don't depend on $(RTL_BASE_H).
(gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h,
or $(RTL_BASE_H); just rtl.def.
* gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or
real.h. Give fake definition of CONST_DOUBLE_FORMAT and
substitute definition of NUM_RTX_CODE. Add casts to avoid
warnings.
* machmode.h: Include insn-modes.h, not machmode.def. Include
mode-classes.def to define enum mode_class. Tweak definitions
of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK,
GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE.
(inner_mode_array): Renamed mode_inner.
(mode_base_align): New.
* rtl.c (mode_name, mode_class, mode_bitsize, mode_size,
mode_unit_size, mode_wider_mode, mode_mask_array,
inner_mode_array, class_narrowest_mode): Delete definitions.
* stor-layout.c (get_mode_alignment): Use mode_base_align.
* real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode
and TFmode, in real_format_for_mode and REAL_MODE_FORMAT.
* config/ip2k/ip2k.h, config/iq2000/iq2000.h:
No need to define BITS_PER_UNIT.
From-SVN: r72313
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index a7ffd4cb6d8..dcdca573a8c 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -298,20 +298,7 @@ int_mode_for_mode (enum machine_mode mode) unsigned int get_mode_alignment (enum machine_mode mode) { - unsigned int alignment; - - if (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT - || GET_MODE_CLASS (mode) == MODE_COMPLEX_INT) - alignment = GET_MODE_UNIT_SIZE (mode); - else - alignment = GET_MODE_SIZE (mode); - - /* Extract the LSB of the size. */ - alignment = alignment & -alignment; - alignment *= BITS_PER_UNIT; - - alignment = MIN (BIGGEST_ALIGNMENT, MAX (1, alignment)); - return alignment; + return MIN (BIGGEST_ALIGNMENT, MAX (1, mode_base_align[mode]*BITS_PER_UNIT)); } /* Return the value of VALUE, rounded up to a multiple of DIVISOR. |