arc: fix accumulator first register.

gcc/
2021-01-05  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (maddsidi4_split): Use ACC_REG_FIRST.
	(umaddsidi4_split): Likewise.

Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
This commit is contained in:
Claudiu Zissulescu 2021-01-05 14:19:27 +02:00
parent bea984814c
commit b679559385

View File

@ -6177,12 +6177,12 @@ core_3, archs4x, archs4xd, archs4xd_slow"
rtx acc_reg = gen_rtx_REG (DImode, ACC_REG_FIRST);
emit_move_insn (acc_reg, operands[3]);
if (TARGET_PLUS_MACD && even_register_operand (operands[0], DImode)
&& REGNO (operands[0]) != ACCL_REGNO)
&& REGNO (operands[0]) != ACC_REG_FIRST)
emit_insn (gen_macd (operands[0], operands[1], operands[2]));
else
{
emit_insn (gen_mac (operands[1], operands[2]));
if (REGNO (operands[0]) != ACCL_REGNO)
if (REGNO (operands[0]) != ACC_REG_FIRST)
emit_move_insn (operands[0], acc_reg);
}
DONE;
@ -6279,12 +6279,12 @@ core_3, archs4x, archs4xd, archs4xd_slow"
rtx acc_reg = gen_rtx_REG (DImode, ACC_REG_FIRST);
emit_move_insn (acc_reg, operands[3]);
if (TARGET_PLUS_MACD && even_register_operand (operands[0], DImode)
&& REGNO (operands[0]) != ACCL_REGNO)
&& REGNO (operands[0]) != ACC_REG_FIRST)
emit_insn (gen_macdu (operands[0], operands[1], operands[2]));
else
{
emit_insn (gen_macu (operands[1], operands[2]));
if (REGNO (operands[0]) != ACCL_REGNO)
if (REGNO (operands[0]) != ACC_REG_FIRST)
emit_move_insn (operands[0], acc_reg);
}
DONE;