aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-09-24 22:49:59 -0700
committerJim Wilson <wilson@gcc.gnu.org>1992-09-24 22:49:59 -0700
commit1f9844c451fc517d31a044ffef6f8d07795c9b0d (patch)
tree634e9d89047262797c0c2e770979f2e80317dbbc
parent8d02144cd854ffbc8695d94d1a73a49a41546fd7 (diff)
downloadgcc-1f9844c451fc517d31a044ffef6f8d07795c9b0d.zip
gcc-1f9844c451fc517d31a044ffef6f8d07795c9b0d.tar.gz
gcc-1f9844c451fc517d31a044ffef6f8d07795c9b0d.tar.bz2
(nonlocal_goto): Force operands[0] to be a register.
From-SVN: r2243
-rw-r--r--gcc/config/sparc/sparc.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index db76d57..034d6ea 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -2632,12 +2632,16 @@
""
"
{
- rtx temp;
/* Trap instruction to flush all the registers window. */
emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode,
gen_rtvec (1, const0_rtx), 0));
/* Load the fp value for the containing fn into %fp.
- This is needed because operands[2] refers to %fp. */
+ This is needed because operands[2] refers to %fp.
+ Virtual register instantiation fails if the virtual %fp isn't set from a
+ register. Thus we must copy operands[0] into a register if it isn't
+ already one. */
+ if (GET_CODE (operands[0]) != REG)
+ operands[0] = force_reg (SImode, operands[0]);
emit_move_insn (virtual_stack_vars_rtx, operands[0]);
/* Find the containing function's current nonlocal goto handler,
which will do any cleanups and then jump to the label. */