Commit 6357135a by Ulrich Weigand Committed by Ulrich Weigand

reload.c (find_reloads_subreg_address): Use correct offset for paradoxical MEM…

reload.c (find_reloads_subreg_address): Use correct offset for paradoxical MEM subregs on big-endian targets.

	* reload.c (find_reloads_subreg_address): Use correct offset for
	paradoxical MEM subregs on big-endian targets.

From-SVN: r72153
parent fffeb871
2003-10-06 Ulrich Weigand <uweigand@de.ibm.com>
* reload.c (find_reloads_subreg_address): Use correct offset for
paradoxical MEM subregs on big-endian targets.
2003-10-06 Andrew Haley <aph@redhat.com>
* tree.c (get_callee_fndecl): Call
......
......@@ -5806,9 +5806,16 @@ find_reloads_subreg_address (rtx x, int force_replace, int opnum,
if (force_replace
|| ! rtx_equal_p (tem, reg_equiv_mem[regno]))
{
int offset = SUBREG_BYTE (x);
unsigned outer_size = GET_MODE_SIZE (GET_MODE (x));
unsigned inner_size = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)));
int offset;
/* For big-endian paradoxical subregs, SUBREG_BYTE does not
hold the correct (negative) byte offset. */
if (BYTES_BIG_ENDIAN && outer_size > inner_size)
offset = inner_size - outer_size;
else
offset = SUBREG_BYTE (x);
XEXP (tem, 0) = plus_constant (XEXP (tem, 0), offset);
PUT_MODE (tem, GET_MODE (x));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment