mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-25 23:31:34 +08:00
h8300.md (output_a_shift): Clean up the code to output shifts using rotation.
* config/h8300/h8300.md (output_a_shift): Clean up the code to output shifts using rotation. From-SVN: r60353
This commit is contained in:
parent
7a163ec05c
commit
539dbd15f3
@ -1,3 +1,8 @@
|
||||
2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* config/h8300/h8300.md (output_a_shift): Clean up the code to
|
||||
output shifts using rotation.
|
||||
|
||||
2002-12-20 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
|
||||
|
||||
* flow.c (allocate_reg_life_data): Reset REG_FREQ.
|
||||
|
@ -3026,30 +3026,28 @@ output_a_shift (operands)
|
||||
output_asm_insn (info.shift1, operands);
|
||||
|
||||
/* Now mask off the high bits. */
|
||||
if (TARGET_H8300)
|
||||
switch (mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case QImode:
|
||||
sprintf (insn_buf, "and\t#%d,%%X0", mask);
|
||||
cc_status.value1 = operands[0];
|
||||
cc_status.flags |= CC_NO_CARRY;
|
||||
break;
|
||||
case HImode:
|
||||
sprintf (insn_buf, "and\t#%d,%%s0\n\tand\t#%d,%%t0",
|
||||
mask & 255, mask >> 8);
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf (insn_buf, "and.%c\t#%d,%%%c0",
|
||||
"bwl"[shift_mode], mask,
|
||||
mode == QImode ? 'X' : mode == HImode ? 'T' : 'S');
|
||||
case QImode:
|
||||
sprintf (insn_buf, "and\t#%d,%%X0", mask);
|
||||
cc_status.value1 = operands[0];
|
||||
cc_status.flags |= CC_NO_CARRY;
|
||||
break;
|
||||
case HImode:
|
||||
if (TARGET_H8300)
|
||||
{
|
||||
sprintf (insn_buf, "and\t#%d,%%s0\n\tand\t#%d,%%t0",
|
||||
mask & 255, mask >> 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf (insn_buf, "and.w\t#%d,%%T0", mask);
|
||||
cc_status.value1 = operands[0];
|
||||
cc_status.flags |= CC_NO_CARRY;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
output_asm_insn (insn_buf, operands);
|
||||
return "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user