summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-16 22:06:43 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-16 22:06:43 +0000
commit5ba0e4da0ed90514c968eb0730b4a24bbb611740 (patch)
treef7106aca95b69b471bb0493600b7fc23327305f4 /gcc/combine.c
parent3af966eb115278ae073932614bf42328941970a4 (diff)
downloadgcc-5ba0e4da0ed90514c968eb0730b4a24bbb611740.tar.gz
* combine.c (can_combine_p): Don't combine with an asm whose
output is a hard register. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15940 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 2ef88c09f52..3626e48e975 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1003,6 +1003,13 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
&& p != succ && volatile_refs_p (PATTERN (p)))
return 0;
+ /* If INSN is an asm, and DEST is a hard register, reject, since it has
+ to be an explicit register variable, and was chosen for a reason. */
+
+ if (GET_CODE (src) == ASM_OPERANDS
+ && GET_CODE (dest) == REG && REGNO (dest) < FIRST_PSEUDO_REGISTER)
+ return 0;
+
/* If there are any volatile insns between INSN and I3, reject, because
they might affect machine state. */