summaryrefslogtreecommitdiff
path: root/gcc/caller-save.c
diff options
context:
space:
mode:
authorrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-17 18:20:44 +0000
committerrearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-17 18:20:44 +0000
commit074d3abfc29528889ff1b5255164dd3c6674f8bb (patch)
tree3b8f3128870804afa995de3969a976ec511b144c /gcc/caller-save.c
parentcc4faf1247448daa00b26b6212ff71f515b1d803 (diff)
downloadgcc-074d3abfc29528889ff1b5255164dd3c6674f8bb.tar.gz
PR optimization/10592
* caller-save.c (mark_referenced_regs): Don't short-circuit a reg or subreg in SET_DEST if it isn't a hard register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r--gcc/caller-save.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 9a0a4e3fbfd..6eaa533d433 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -568,8 +568,10 @@ mark_referenced_regs (rtx x)
{
x = SET_DEST (x);
code = GET_CODE (x);
- if (code == REG || code == PC || code == CC0
+ if ((code == REG && REGNO (x) < FIRST_PSEUDO_REGISTER)
+ || code == PC || code == CC0
|| (code == SUBREG && GET_CODE (SUBREG_REG (x)) == REG
+ && REGNO (SUBREG_REG (x)) < FIRST_PSEUDO_REGISTER
/* If we're setting only part of a multi-word register,
we shall mark it as referenced, because the words
that are not being set should be restored. */