summaryrefslogtreecommitdiff
path: root/gcc/lower-subreg.c
diff options
context:
space:
mode:
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-10 17:16:57 +0000
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-10 17:16:57 +0000
commit4d8ad352b51335a6eeb36452e4a92cb5e11842e7 (patch)
tree76efbc1ba058c1f5b70c4eac5eb34f35ad71c7a6 /gcc/lower-subreg.c
parent657801e96383b15b1bd3b3d63d3cca82119152ba (diff)
downloadgcc-4d8ad352b51335a6eeb36452e4a92cb5e11842e7.tar.gz
2007-08-10 Andreas Krebbel <krebbel1@de.ibm.com>
* lower-subreg.c (resolve_shift_zext): Don't adjust src_reg_num for wordmode operands. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127342 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lower-subreg.c')
-rw-r--r--gcc/lower-subreg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index c61a8b7759e..4354640a701 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -1043,11 +1043,12 @@ resolve_shift_zext (rtx insn)
endian machines this is register 0. */
src_reg_num = GET_CODE (op) == LSHIFTRT ? 1 : 0;
- if (WORDS_BIG_ENDIAN)
+ if (WORDS_BIG_ENDIAN
+ && GET_MODE_SIZE (GET_MODE (op_operand)) > UNITS_PER_WORD)
src_reg_num = 1 - src_reg_num;
if (GET_CODE (op) == ZERO_EXTEND)
- dest_reg_num = src_reg_num;
+ dest_reg_num = WORDS_BIG_ENDIAN ? 1 : 0;
else
dest_reg_num = 1 - src_reg_num;