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:
Kazu Hirata 2002-12-20 04:05:14 +00:00 committed by Kazu Hirata
parent 7a163ec05c
commit 539dbd15f3
2 changed files with 24 additions and 21 deletions

View File

@ -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.

View File

@ -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 "";