diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-14 13:28:44 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-14 13:28:44 +0000 |
commit | 2d0fd66d982886cf217f7127f2d906fed5df9374 (patch) | |
tree | 5c32661073d991fc5ce315762062115ab0af337c /gcc/expr.h | |
parent | 9579a4b96330010a9a9b327eec8dfd4be1d3524d (diff) | |
download | gcc-2d0fd66d982886cf217f7127f2d906fed5df9374.tar.gz |
PR rtl-optimization/44194
* calls.c (expand_call): In the PARALLEL case, copy the return value
into pseudos instead of spilling it onto the stack.
* emit-rtl.c (adjust_address_1): Rename ADJUST into ADJUST_ADDRESS and
add new ADJUST_OBJECT parameter.
If ADJUST_OBJECT is set, drop the underlying object if it cannot be
proved that the adjusted memory access is still within its bounds.
(adjust_automodify_address_1): Adjust call to adjust_address_1.
(widen_memory_access): Likewise.
* expmed.c (store_bit_field_1): Call adjust_bitfield_address instead
of adjust_address. Do not drop the underlying object of a MEM.
(store_fixed_bit_field): Likewise.
(extract_bit_field_1): Likewise. Fix oversight in recursion.
(extract_fixed_bit_field): Likewise.
* expr.h (adjust_address_1): Adjust prototype.
(adjust_address): Adjust call to adjust_address_1.
(adjust_address_nv): Likewise.
(adjust_bitfield_address): New macro.
(adjust_bitfield_address_nv): Likewise.
* expr.c (expand_assignment): Handle a PARALLEL in more cases.
(store_expr): Likewise.
(store_field): Likewise.
* dse.c: Fix typos in the head comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191302 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gcc/expr.h b/gcc/expr.h index f63b8f3052d..154648e7bff 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -557,11 +557,22 @@ extern rtx change_address (rtx, enum machine_mode, rtx); /* Return a memory reference like MEMREF, but with its mode changed to MODE and its address offset by OFFSET bytes. */ #define adjust_address(MEMREF, MODE, OFFSET) \ - adjust_address_1 (MEMREF, MODE, OFFSET, 1, 1) + adjust_address_1 (MEMREF, MODE, OFFSET, 1, 1, 0) /* Likewise, but the reference is not required to be valid. */ #define adjust_address_nv(MEMREF, MODE, OFFSET) \ - adjust_address_1 (MEMREF, MODE, OFFSET, 0, 1) + adjust_address_1 (MEMREF, MODE, OFFSET, 0, 1, 0) + +/* Return a memory reference like MEMREF, but with its mode changed + to MODE and its address offset by OFFSET bytes. Assume that it's + for a bitfield and conservatively drop the underlying object if we + cannot be sure to stay within its bounds. */ +#define adjust_bitfield_address(MEMREF, MODE, OFFSET) \ + adjust_address_1 (MEMREF, MODE, OFFSET, 1, 1, 1) + +/* Likewise, but the reference is not required to be valid. */ +#define adjust_bitfield_address_nv(MEMREF, MODE, OFFSET) \ + adjust_address_1 (MEMREF, MODE, OFFSET, 0, 1, 1) /* Return a memory reference like MEMREF, but with its mode changed to MODE and its address changed to ADDR, which is assumed to be @@ -573,7 +584,8 @@ extern rtx change_address (rtx, enum machine_mode, rtx); #define adjust_automodify_address_nv(MEMREF, MODE, ADDR, OFFSET) \ adjust_automodify_address_1 (MEMREF, MODE, ADDR, OFFSET, 0) -extern rtx adjust_address_1 (rtx, enum machine_mode, HOST_WIDE_INT, int, int); +extern rtx adjust_address_1 (rtx, enum machine_mode, HOST_WIDE_INT, int, int, + int); extern rtx adjust_automodify_address_1 (rtx, enum machine_mode, rtx, HOST_WIDE_INT, int); |