diff options
author | Lars Brinkhoff <lars@nocrew.org> | 2001-07-25 01:19:23 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-07-24 18:19:23 -0700 |
commit | 0c23768840a3f167b1bd5a7659c640fb0bb59033 (patch) | |
tree | f1df0ac597914393101a30e742c277cec9f14f44 /gcc/stor-layout.c | |
parent | 5a2aa3bd76f62ded8be6d373beb0987181b15a7d (diff) | |
download | gcc-0c23768840a3f167b1bd5a7659c640fb0bb59033.zip gcc-0c23768840a3f167b1bd5a7659c640fb0bb59033.tar.gz gcc-0c23768840a3f167b1bd5a7659c640fb0bb59033.tar.bz2 |
stor-layout.c (get_mode_alignment): make it work when BITS_PER_UNIT is not a power of two.
* stor-layout.c (get_mode_alignment): make it work when
BITS_PER_UNIT is not a power of two.
* builtins.c (get_pointer_alignment): Likewise.
From-SVN: r44322
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 3e7fb19..2ac72e3 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1866,10 +1866,11 @@ unsigned int get_mode_alignment (mode) enum machine_mode mode; { - unsigned int alignment = GET_MODE_UNIT_SIZE (mode) * BITS_PER_UNIT; + unsigned int alignment = GET_MODE_UNIT_SIZE (mode); /* Extract the LSB of the size. */ alignment = alignment & -alignment; + alignment *= BITS_PER_UNIT; alignment = MIN (BIGGEST_ALIGNMENT, MAX (1, alignment)); return alignment; |