diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-18 21:37:37 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-18 21:37:37 +0000 |
commit | cbc0ce7d635a8cd53666a9e0e163594b230edce8 (patch) | |
tree | 5e6df2b61d7151afdaea936370baf4ec0b1d6d21 /gcc/function.c | |
parent | 55cacb58569cd5a0f71f5167294b38f649c4cbb2 (diff) | |
download | gcc-cbc0ce7d635a8cd53666a9e0e163594b230edce8.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index 969887fe94f..f05711487b6 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); |