aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>2000-09-18 21:37:37 +0000
committerJim Wilson <wilson@gcc.gnu.org>2000-09-18 14:37:37 -0700
commit226ed43f1efcc6a69e7d1762260918f699485f37 (patch)
tree5e6df2b61d7151afdaea936370baf4ec0b1d6d21 /gcc
parentb542c0fb1184f77f2da855959ae59a850d467a45 (diff)
downloadgcc-226ed43f1efcc6a69e7d1762260918f699485f37.zip
gcc-226ed43f1efcc6a69e7d1762260918f699485f37.tar.gz
gcc-226ed43f1efcc6a69e7d1762260918f699485f37.tar.bz2
Fix ia64-linux kernel fn_hash() miscompilation.
* function.c (fixup_var_refs_1, case ZERO_EXTRACT): If we have a paradoxical subreg, then directly substitute the replacement and return. From-SVN: r36515
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/function.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bd55ea6..da57400 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2000-09-18 Jim Wilson <wilson@cygnus.com>
+
+ * function.c (fixup_var_refs_1, case ZERO_EXTRACT): If we have a
+ paradoxical subreg, then directly substitute the replacement and
+ return.
+
Mon 18-Sep-2000 22:12:44 BST Neil Booth <NeilB@earthling.net>
* cpp.texi: Update documentation, including some clarifications,
diff --git a/gcc/function.c b/gcc/function.c
index 969887f..f057114 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2015,6 +2015,14 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
if (replacement->new == 0)
replacement->new = gen_reg_rtx (GET_MODE (var));
SUBREG_REG (tem) = replacement->new;
+
+ /* The following code works only if we have a MEM, so we
+ need to handle the subreg here. We directly substitute
+ it assuming that a subreg must be OK here. We already
+ scheduled a replacement to copy the mem into the
+ subreg. */
+ XEXP (x, 0) = tem;
+ return;
}
else
tem = fixup_memory_subreg (tem, insn, 0);