+Mon Apr 27 20:22:08 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.c (gen_ashift_hi): Don't make SUBREG of a SUBREG.
+
Mon Apr 27 18:23:51 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.c (sh_expand_prologue, sh_expand_epilogue):
zero/sign extension.
gen_ashift_hi is only called in contexts where we know that the
sign extension works out correctly. */
- gen_ashift (type, n, gen_rtx_SUBREG (SImode, reg, 0));
- break;
+ {
+ int word = 0;
+ if (GET_CODE (reg) == SUBREG)
+ {
+ word = SUBREG_WORD (reg);
+ reg = SUBREG_REG (reg);
+ }
+ gen_ashift (type, n, gen_rtx_SUBREG (SImode, reg, word));
+ break;
+ }
case ASHIFT:
emit_insn (gen_ashlhi3_k (reg, reg, GEN_INT (n)));
break;