aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1997-10-16 15:06:43 -0700
committerRichard Henderson <rth@gcc.gnu.org>1997-10-16 15:06:43 -0700
commitb79ee7eb70cf8d352424531e73fdc14398d233ab (patch)
treef7106aca95b69b471bb0493600b7fc23327305f4 /gcc
parent5c19a35643bd0c7d5a2766a5b91f6b6b4cb7242d (diff)
downloadgcc-b79ee7eb70cf8d352424531e73fdc14398d233ab.zip
gcc-b79ee7eb70cf8d352424531e73fdc14398d233ab.tar.gz
gcc-b79ee7eb70cf8d352424531e73fdc14398d233ab.tar.bz2
combine.c (can_combine_p): Don't combine with an asm whose output is a hard register.
* combine.c (can_combine_p): Don't combine with an asm whose output is a hard register. From-SVN: r15940
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 32a3239..fb1218f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 16 15:07:51 1997 Richard Henderson <rth@cygnus.com>
+
+ * combine.c (can_combine_p): Don't combine with an asm whose
+ output is a hard register.
+
Thu Oct 16 15:43:26 1997 Mike Stump (mrs@wrs.com)
* c-decl.c (start_struct): Ensure that structs with forward
diff --git a/gcc/combine.c b/gcc/combine.c
index 2ef88c0..3626e48 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. */