* sh.c (gen_ashift_hi): Don't make SUBREG of a SUBREG.

From-SVN: r19432
This commit is contained in:
J"orn Rennecke 1998-04-27 12:25:51 +00:00 committed by Joern Rennecke
parent 5645adf0a2
commit 97d6fd65f3
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,7 @@
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):

View File

@ -922,8 +922,16 @@ gen_ashift_hi (type, n, reg)
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;