diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-23 05:35:21 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-23 05:35:21 +0000 |
commit | 9a8a3ff4860ad16b9ae93ba9c77d469a992d1e9a (patch) | |
tree | 75833789f320d2e562420bdc9a087314652e72bd /gcc/simplify-rtx.c | |
parent | b9612c3603157aade02680868438aa9672eb8e85 (diff) | |
download | gcc-9a8a3ff4860ad16b9ae93ba9c77d469a992d1e9a.tar.gz |
* simplify-rtx.c (simplify_subreg): Adjust REG_OFFSET for
big-endian paradoxical subregs.
* var-tracking.c (struct micro_operation_def): Document that,
for modify micro operations, insn is the subsequent instruction.
(var_reg_delete_and_set, var_mem_delete_and_set): Split into...
(var_reg_set, var_mem_set): ... new functions.
(add_stores): Record subsequent insn.
(compute_bb_dataflow): Use new functions for MO_USE.
(emit_notes_in_bb): Use new functions for MO_USE. Emit use
notes after the insn, and modify notes before the insn known
to be the subsequent one.
(vt_initialize): Invert sorting of MO_CLOBBERs and MO_SETs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114013 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 6ab5cb753c6..71993164fb8 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -4552,7 +4552,22 @@ simplify_subreg (enum machine_mode outermode, rtx op, if (HARD_REGNO_MODE_OK (final_regno, outermode) || ! HARD_REGNO_MODE_OK (regno, innermode)) { - rtx x = gen_rtx_REG_offset (op, outermode, final_regno, byte); + rtx x; + int final_offset = byte; + + /* Adjust offset for paradoxical subregs. */ + if (byte == 0 + && GET_MODE_SIZE (innermode) < GET_MODE_SIZE (outermode)) + { + int difference = (GET_MODE_SIZE (innermode) + - GET_MODE_SIZE (outermode)); + if (WORDS_BIG_ENDIAN) + final_offset += (difference / UNITS_PER_WORD) * UNITS_PER_WORD; + if (BYTES_BIG_ENDIAN) + final_offset += difference % UNITS_PER_WORD; + } + + x = gen_rtx_REG_offset (op, outermode, final_regno, final_offset); /* Propagate original regno. We don't have any way to specify the offset inside original regno, so do so only for lowpart. |