diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2006-05-23 05:35:21 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2006-05-23 05:35:21 +0000 |
commit | dedc1e6d9ee0a0d5f28fcaef4200b6ba5c95f783 (patch) | |
tree | 75833789f320d2e562420bdc9a087314652e72bd /gcc/simplify-rtx.c | |
parent | 546be53558e5305b16b6239c6014d776a3d7a742 (diff) | |
download | gcc-dedc1e6d9ee0a0d5f28fcaef4200b6ba5c95f783.zip gcc-dedc1e6d9ee0a0d5f28fcaef4200b6ba5c95f783.tar.gz gcc-dedc1e6d9ee0a0d5f28fcaef4200b6ba5c95f783.tar.bz2 |
simplify-rtx.c (simplify_subreg): Adjust REG_OFFSET for big-endian paradoxical subregs.
* 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.
From-SVN: r114013
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 6ab5cb7..7199316 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. |