Commit 3f071e3e authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

PPC: Optimize clearing higher bits of mulhw/mulhwu

Change-Id: Ie3e14a6ef4531349e81a8ae741bc7470c7e547ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349468Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#69343}
parent f6af044d
......@@ -1515,18 +1515,14 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
break;
case kPPC_MulHigh32:
__ mulhw(ip, i.InputRegister(0), i.InputRegister(1), i.OutputRCBit());
__ mulhw(r0, i.InputRegister(0), i.InputRegister(1), i.OutputRCBit());
// High 32 bits are undefined and need to be cleared.
__ li(r0, Operand(-1));
__ clrldi(r0, r0, Operand(32));
__ and_(i.OutputRegister(), ip, r0);
__ clrldi(i.OutputRegister(), r0, Operand(32));
break;
case kPPC_MulHighU32:
__ mulhwu(ip, i.InputRegister(0), i.InputRegister(1), i.OutputRCBit());
__ mulhwu(r0, i.InputRegister(0), i.InputRegister(1), i.OutputRCBit());
// High 32 bits are undefined and need to be cleared.
__ li(r0, Operand(-1));
__ clrldi(r0, r0, Operand(32));
__ and_(i.OutputRegister(), ip, r0);
__ clrldi(i.OutputRegister(), r0, Operand(32));
break;
case kPPC_MulDouble:
ASSEMBLE_FLOAT_BINOP_RC(fmul, MiscField::decode(instr->opcode()));
......
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