Commit a6e8d113 by Kazu Hirata Committed by Kazu Hirata

h8300.c (output_logical_op): Use extu.w if we are clearing the most significant byte.

	* config/h8300/h8300.c (output_logical_op): Use extu.w if we
	are clearing the most significant byte.
	(compute_logical_op_length): Update to reflect the change in
	output_logical_op.
	(compute_logical_op_cc): Likewise.

From-SVN: r60632
parent 37bc6ca2
2002-12-30 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.c (output_logical_op): Use extu.w if we
are clearing the most significant byte.
(compute_logical_op_length): Update to reflect the change in
output_logical_op.
(compute_logical_op_cc): Likewise.
2002-12-29 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md: Give internal names to anonymous
......
......@@ -2151,7 +2151,9 @@ output_logical_op (mode, operands)
&& ((det & 0x0000ffff) != 0)
&& ((det & 0xffff0000) != 0)
&& (code == IOR || det != 0xffffff00)
&& (code == IOR || det != 0xffff00ff))
&& (code == IOR || det != 0xffff00ff)
&& (code != AND || det != 0xff00ff00)
&& (code != AND || det != 0xff0000ff))
{
sprintf (insn_buf, "%s.l\t%%S2,%%S0", opname);
output_asm_insn (insn_buf, operands);
......@@ -2195,6 +2197,13 @@ output_logical_op (mode, operands)
output_asm_insn ((code == AND)
? "sub.w\t%e0,%e0" : "not.w\t%e0",
operands);
else if ((TARGET_H8300H || TARGET_H8300S)
&& code == AND
&& (det & 0xffff0000) == 0xff000000)
{
sprintf (insn_buf, "extu.w\t%%e0", opname);
output_asm_insn (insn_buf, operands);
}
else if (TARGET_H8300H || TARGET_H8300S)
{
if ((det & 0xffff0000) != 0)
......@@ -2275,7 +2284,9 @@ compute_logical_op_length (mode, operands)
&& ((det & 0x0000ffff) != 0)
&& ((det & 0xffff0000) != 0)
&& (code == IOR || det != 0xffffff00)
&& (code == IOR || det != 0xffff00ff))
&& (code == IOR || det != 0xffff00ff)
&& (code != AND || det != 0xff00ff00)
&& (code != AND || det != 0xff0000ff))
{
if (REG_P (operands[2]))
length += 4;
......@@ -2315,6 +2326,12 @@ compute_logical_op_length (mode, operands)
{
length += 2;
}
else if ((TARGET_H8300H || TARGET_H8300S)
&& code == AND
&& (det & 0xffff0000) == 0xff000000)
{
length += 2;
}
else if (TARGET_H8300H || TARGET_H8300S)
{
if ((det & 0xffff0000) != 0)
......@@ -2374,7 +2391,9 @@ compute_logical_op_cc (mode, operands)
&& ((det & 0x0000ffff) != 0)
&& ((det & 0xffff0000) != 0)
&& (code == IOR || det != 0xffffff00)
&& (code == IOR || det != 0xffff00ff))
&& (code == IOR || det != 0xffff00ff)
&& (code != AND || det != 0xff00ff00)
&& (code != AND || det != 0xff0000ff))
{
cc = CC_SET_ZNV;
}
......
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