aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-08-02 21:44:23 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1992-08-02 21:44:23 -0400
commit600a5d8863b1800e2dbf85e62baae61d0b4178c3 (patch)
tree70e1465f49809808aa2b16e84219bde54be78a88
parent0782cd717f3e48c2f3a5c84a6ad7a7bc6beef1f5 (diff)
downloadgcc-600a5d8863b1800e2dbf85e62baae61d0b4178c3.zip
gcc-600a5d8863b1800e2dbf85e62baae61d0b4178c3.tar.gz
gcc-600a5d8863b1800e2dbf85e62baae61d0b4178c3.tar.bz2
(gen_rtx, case REG): Don't use frame_pointer_rtx or arg_pointer_rtx if
reload is in progress. From-SVN: r1758
-rw-r--r--gcc/emit-rtl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index f4d898a..a540ef7 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -271,15 +271,21 @@ gen_rtx (va_alist)
If we have eliminated the frame pointer or arg pointer, we will
be using it as a normal register, for example as a spill register.
In such cases, we might be accessing it in a mode that is not
- Pmode and therefore cannot use the pre-allocated rtx. */
+ Pmode and therefore cannot use the pre-allocated rtx.
- if (frame_pointer_rtx && regno == FRAME_POINTER_REGNUM && mode == Pmode)
+ Also don't do this when we are making new REGs in reload,
+ since we don't want to get confused with the real pointers. */
+
+ if (frame_pointer_rtx && regno == FRAME_POINTER_REGNUM && mode == Pmode
+ && ! reload_in_progress)
return frame_pointer_rtx;
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
- if (arg_pointer_rtx && regno == ARG_POINTER_REGNUM && mode == Pmode)
+ if (arg_pointer_rtx && regno == ARG_POINTER_REGNUM && mode == Pmode
+ && ! reload_in_progress)
return arg_pointer_rtx;
#endif
- if (stack_pointer_rtx && regno == STACK_POINTER_REGNUM && mode == Pmode)
+ if (stack_pointer_rtx && regno == STACK_POINTER_REGNUM && mode == Pmode
+ && ! reload_in_progress)
return stack_pointer_rtx;
else
{