Skip to content

Commit

Permalink
AArch64: Fix mulConstant32/64 to use correct instrutions
Browse files Browse the repository at this point in the history
Fix `mulConstant32` and `mulConstant64` to use correct 32bit/64bit variant
of `mov` and `neg` instructions.

Signed-off-by: Akira Saitoh <saiaki@jp.ibm.com>
  • Loading branch information
Akira1Saitoh committed Aug 31, 2021
1 parent 039175f commit 9422643
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/aarch64/codegen/BinaryEvaluator.cpp
Expand Up @@ -636,11 +636,11 @@ static void mulConstant32(TR::Node *node, TR::Register *treg, TR::Register *sreg
}
else if (value == 1)
{
generateMovInstruction(cg, node, treg, sreg);
generateMovInstruction(cg, node, treg, sreg, false);
}
else if (value == -1)
{
generateNegInstruction(cg, node, treg, sreg);
generateNegInstruction(cg, node, treg, sreg, false);
}
else
{
Expand All @@ -660,11 +660,11 @@ static void mulConstant64(TR::Node *node, TR::Register *treg, TR::Register *sreg
}
else if (value == 1)
{
generateMovInstruction(cg, node, treg, sreg);
generateMovInstruction(cg, node, treg, sreg, true);
}
else if (value == -1)
{
generateNegInstruction(cg, node, treg, sreg);
generateNegInstruction(cg, node, treg, sreg, true);
}
else
{
Expand Down

0 comments on commit 9422643

Please sign in to comment.