summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-13 02:03:36 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-13 02:03:36 +0000
commitedc4f1e8fb6339f13606d8c66973d7bd3887f469 (patch)
tree1b39819b157fcddeed86c2fa50b7e410dac867f8 /gcc/expmed.c
parentab1a776d37a0cdc57aed410ec50097abf3c42a48 (diff)
downloadgcc-edc4f1e8fb6339f13606d8c66973d7bd3887f469.tar.gz
2002-03-13 Aldy Hernandez <aldyh@redhat.com>
* expmed.c (store_bit_field): Reset alias set for memory. (extract_bit_field): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50706 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 6d58ea9957e..48a3ef60278 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -392,6 +392,15 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, total_size)
}
}
+ /* We may be accessing data outside the field, which means
+ we can alias adjacent data. */
+ if (GET_CODE (op0) == MEM)
+ {
+ op0 = shallow_copy_rtx (op0);
+ set_mem_alias_set (op0, 0);
+ set_mem_expr (op0, 0);
+ }
+
/* If OP0 is a register, BITPOS must count within a word.
But as we have it, it counts within whatever size OP0 now has.
On a bigendian machine, these are not the same, so convert. */
@@ -1069,6 +1078,15 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
}
}
+ /* We may be accessing data outside the field, which means
+ we can alias adjacent data. */
+ if (GET_CODE (op0) == MEM)
+ {
+ op0 = shallow_copy_rtx (op0);
+ set_mem_alias_set (op0, 0);
+ set_mem_expr (op0, 0);
+ }
+
/* ??? We currently assume TARGET is at least as big as BITSIZE.
If that's wrong, the solution is to test for it and set TARGET to 0
if needed. */