diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-10-09 07:29:23 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-10-09 07:29:23 -0400 |
commit | 26ecfc761475c40d3de6aa7eca1595722888937e (patch) | |
tree | 0d90eab07162fdfa28e7736d43bc11c87f0234f0 | |
parent | d9983d6c52ac3af3045ebff7d52de5f47979ac07 (diff) | |
download | gcc-26ecfc761475c40d3de6aa7eca1595722888937e.zip gcc-26ecfc761475c40d3de6aa7eca1595722888937e.tar.gz gcc-26ecfc761475c40d3de6aa7eca1595722888937e.tar.bz2 |
(subst, case SUBREG): Don't make a new REG for stack, frame, or arg
pointer.
From-SVN: r2381
-rw-r--r-- | gcc/combine.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 0442860..cc7f8f8 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -2900,10 +2900,16 @@ subst (x, from, to, in_dest, unique_copy) /* SUBREG of a hard register => just change the register number and/or mode. If the hard register is not valid in that mode, - suppress this combination. */ + suppress this combination. If the hard register is the stack, + frame, or argument pointer, leave this as a SUBREG. */ if (GET_CODE (SUBREG_REG (x)) == REG - && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER) + && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER + && REGNO (SUBREG_REG (x)) != FRAME_POINTER_REGNUM +#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM + && REGNO (SUBREG_REG (x)) != ARG_POINTER_REGNUM +#endif + && REGNO (SUBREG_REG (x)) != STACK_POINTER_REGNUM) { if (HARD_REGNO_MODE_OK (REGNO (SUBREG_REG (x)) + SUBREG_WORD (x), mode)) |