expr.c (emit_move_insn_1): Handle arbitrary moves that are the same size as a word.

* expr.c (emit_move_insn_1): Handle arbitrary moves that are
	the same size as a word.

	* regrename.c (find_oldest_value_reg): Take WORDS_BIG_ENDIAN /
	BYTES_BIG_ENDIAN into account.

From-SVN: r55482
This commit is contained in:
J"orn Rennecke 2002-07-16 10:59:15 +00:00 committed by Joern Rennecke
parent 052c96b1b0
commit cffa218913
3 changed files with 26 additions and 6 deletions

View File

@ -1,3 +1,11 @@
Tue Jul 16 11:57:45 2002 J"orn Rennecke <joern.rennecke@superh.com>
* expr.c (emit_move_insn_1): Handle arbitrary moves that are
the same size as a word.
* regrename.c (find_oldest_value_reg): Take WORDS_BIG_ENDIAN /
BYTES_BIG_ENDIAN into account.
Tue Jul 16 12:22:44 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.md (prefetch): Fix for 64bit mode.

View File

@ -3058,10 +3058,10 @@ emit_move_insn_1 (x, y)
return get_last_insn ();
}
/* This will handle any multi-word mode that lacks a move_insn pattern.
However, you will get better code if you define such patterns,
/* This will handle any multi-word or full-word mode that lacks a move_insn
pattern. However, you will get better code if you define such patterns,
even if they must turn into multiple assembler instructions. */
else if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
else if (GET_MODE_SIZE (mode) >= UNITS_PER_WORD)
{
rtx last_insn = 0;
rtx seq, inner;

View File

@ -1335,14 +1335,26 @@ find_oldest_value_reg (class, reg, vd)
}
for (i = vd->e[regno].oldest_regno; i != regno; i = vd->e[i].next_regno)
{
enum machine_mode oldmode = vd->e[i].mode;
if (TEST_HARD_REG_BIT (reg_class_contents[class], i)
&& (vd->e[i].mode == mode
|| mode_change_ok (vd->e[i].mode, mode, i)))
&& (oldmode == mode
|| mode_change_ok (oldmode, mode, i)))
{
rtx new = gen_rtx_raw_REG (mode, i);
int offset = GET_MODE_SIZE (oldmode) - GET_MODE_SIZE (mode);
int byteoffset = offset % UNITS_PER_WORD;
int wordoffset = offset - byteoffset;
rtx new;
offset = ((WORDS_BIG_ENDIAN ? wordoffset : 0)
+ (BYTES_BIG_ENDIAN ? byteoffset : 0));
new = (gen_rtx_raw_REG
(mode, i + subreg_regno_offset (i, oldmode, offset, mode)));
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg);
return new;
}
}
return NULL_RTX;
}