diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-11-27 01:01:12 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-11-26 20:01:12 -0500 |
commit | 360e353587b4c3f654598babb476aed69f760b51 (patch) | |
tree | 8d0dff310443267538186659b8b0d591fe1694bc /gcc/expmed.c | |
parent | 23d5143200c72cf31613060bd22b5abc12fad0c2 (diff) | |
download | gcc-360e353587b4c3f654598babb476aed69f760b51.zip gcc-360e353587b4c3f654598babb476aed69f760b51.tar.gz gcc-360e353587b4c3f654598babb476aed69f760b51.tar.bz2 |
expmed.c (extract_bit_field): When extracting from non-integer mode...
* expmed.c (extract_bit_field): When extracting from non-integer mode,
force a SUBREG into a register because we may be taking a further
SUBREG of it.
From-SVN: r91361
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index eeab02f..37d6768 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1163,13 +1163,12 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, enum machine_mode imode = int_mode_for_mode (GET_MODE (op0)); if (imode != GET_MODE (op0)) { - if (MEM_P (op0)) - op0 = adjust_address (op0, imode, 0); - else - { - gcc_assert (imode != BLKmode); - op0 = gen_lowpart (imode, op0); - } + op0 = gen_lowpart (imode, op0); + + /* If we got a SUBREG, force it into a register since we aren't going + to be able to do another SUBREG on it. */ + if (GET_CODE (op0) == SUBREG) + op0 = force_reg (imode, op0); } } |