diff options
author | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-23 15:45:03 +0000 |
---|---|---|
committer | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-23 15:45:03 +0000 |
commit | 05b481dffd9c3b7b44b7181d16f248b04a81ab41 (patch) | |
tree | 84e9fb8c32865e229b5d07b01784d8d73cbd761c /gcc/expmed.c | |
parent | 78624f54126e08b382f81829ee419c20e884254d (diff) | |
download | gcc-05b481dffd9c3b7b44b7181d16f248b04a81ab41.tar.gz |
* expmed.c (extract_bit_field): Always use adjust_address for MEM.
* gcc.c-torture/execute/20080222-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132573 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 09a58dedba2..04071d375ed 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1339,18 +1339,15 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, || (offset * BITS_PER_UNIT % bitsize == 0 && MEM_ALIGN (op0) % bitsize == 0))))) { - if (mode1 != GET_MODE (op0)) + if (MEM_P (op0)) + op0 = adjust_address (op0, mode1, offset); + else if (mode1 != GET_MODE (op0)) { - if (MEM_P (op0)) - op0 = adjust_address (op0, mode1, offset); - else - { - rtx sub = simplify_gen_subreg (mode1, op0, GET_MODE (op0), - byte_offset); - if (sub == NULL) - goto no_subreg_mode_swap; - op0 = sub; - } + rtx sub = simplify_gen_subreg (mode1, op0, GET_MODE (op0), + byte_offset); + if (sub == NULL) + goto no_subreg_mode_swap; + op0 = sub; } if (mode1 != mode) return convert_to_mode (tmode, op0, unsignedp); |