Commit 539dbd15 by Kazu Hirata Committed by Kazu Hirata

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
parent 7a163ec0
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:
if (TARGET_H8300)
{
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');
cc_status.value1 = operands[0];
cc_status.flags |= CC_NO_CARRY;
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 "";
......
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