aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-07-08 01:58:58 +0000
committerJeff Law <law@gcc.gnu.org>1998-07-07 19:58:58 -0600
commitb98b49ac727f969a64be0dcd20d5493cdd325ac8 (patch)
treea9d248d08ea5c8ed84300784f2a81fc120b1d6e0 /gcc
parent67a00b49d6b636472ade6a137e818bdc2c003f5f (diff)
downloadgcc-b98b49ac727f969a64be0dcd20d5493cdd325ac8.zip
gcc-b98b49ac727f969a64be0dcd20d5493cdd325ac8.tar.gz
gcc-b98b49ac727f969a64be0dcd20d5493cdd325ac8.tar.bz2
rtlanal.c (reg_overlap_mentioned_p): Handle STRICT_LOW_PART.
* rtlanal.c (reg_overlap_mentioned_p): Handle STRICT_LOW_PART. If either argument is CONSTANT_P, then return zero. * reload.c (reg_overlap_mentioned_for_reload_p): Similarly. From-SVN: r21005
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/reload.c11
-rw-r--r--gcc/rtlanal.c11
3 files changed, 20 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9b3a8ef..ecce7d2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
Wed Jul 8 02:43:34 1998 Jeffrey A Law (law@cygnus.com)
+ * rtlanal.c (reg_overlap_mentioned_p): Handle STRICT_LOW_PART. If
+ either argument is CONSTANT_P, then return zero.
+ * reload.c (reg_overlap_mentioned_for_reload_p): Similarly.
+
* configure.in: Also look at $srcdir/gas/configure to find a
gas version #.
diff --git a/gcc/reload.c b/gcc/reload.c
index 0520554..0b76bb7 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -5822,7 +5822,14 @@ reg_overlap_mentioned_for_reload_p (x, in)
{
int regno, endregno;
- if (GET_CODE (x) == SUBREG)
+ /* Overly conservative. */
+ if (GET_CODE (x) == STRICT_LOW_PART)
+ x = XEXP (x, 0);
+
+ /* If either argument is a constant, then modifying X can not affect IN. */
+ if (CONSTANT_P (x) || CONSTANT_P (in))
+ return 0;
+ else if (GET_CODE (x) == SUBREG)
{
regno = REGNO (SUBREG_REG (x));
if (regno < FIRST_PSEUDO_REGISTER)
@@ -5844,8 +5851,6 @@ reg_overlap_mentioned_for_reload_p (x, in)
abort ();
}
}
- else if (CONSTANT_P (x))
- return 0;
else if (GET_CODE (x) == MEM)
return refers_to_mem_for_reload_p (in);
else if (GET_CODE (x) == SCRATCH || GET_CODE (x) == PC
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index b410553..8f42391 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -817,7 +817,14 @@ reg_overlap_mentioned_p (x, in)
{
int regno, endregno;
- if (GET_CODE (x) == SUBREG)
+ /* Overly conservative. */
+ if (GET_CODE (x) == STRICT_LOW_PART)
+ x = XEXP (x, 0);
+
+ /* If either argument is a constant, then modifying X can not affect IN. */
+ if (CONSTANT_P (x) || CONSTANT_P (in))
+ return 0;
+ else if (GET_CODE (x) == SUBREG)
{
regno = REGNO (SUBREG_REG (x));
if (regno < FIRST_PSEUDO_REGISTER)
@@ -825,8 +832,6 @@ reg_overlap_mentioned_p (x, in)
}
else if (GET_CODE (x) == REG)
regno = REGNO (x);
- else if (CONSTANT_P (x))
- return 0;
else if (GET_CODE (x) == MEM)
{
char *fmt;