summaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-19 16:42:26 +0000
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-19 16:42:26 +0000
commit460ec7e66693f66038e4ad12f482f69a3205ef06 (patch)
tree34279d24ff4fd38531af3992c0fe6c7fd25209d0 /gcc/recog.c
parent3ad55f6801b1f6b60d655acb3bbdf6955e1390fa (diff)
downloadgcc-460ec7e66693f66038e4ad12f482f69a3205ef06.tar.gz
2014-09-19 Segher Boessenkool <segher@kernel.crashing.org>
* recog.c (scratch_operand): Do not simply allow all hard registers: only allow those that are allocatable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215399 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index b1838094cc1..5ee3816c7cf 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -1143,7 +1143,9 @@ scratch_operand (rtx op, enum machine_mode mode)
return (GET_CODE (op) == SCRATCH
|| (REG_P (op)
- && (lra_in_progress || REGNO (op) < FIRST_PSEUDO_REGISTER)));
+ && (lra_in_progress
+ || (REGNO (op) < FIRST_PSEUDO_REGISTER
+ && REGNO_REG_CLASS (REGNO (op)) != NO_REGS))));
}
/* Return 1 if OP is a valid immediate operand for mode MODE.