PPC: [turbofan] Turn Math.clz32 into an inlinable builtin.
Port 3aa206b865
Original commit message:
R=dcarney@chromium.org, yangguo@chromium.org
BUG=v8:3952
LOG=n
R=mbrandy@us.ibm.com, svenpanne@chromium.org, danno@chromium.org, jkummerow@chromium.org
Review URL: https://codereview.chromium.org/1028313003
Cr-Commit-Position: refs/heads/master@{#27391}
This commit is contained in:
parent
833364a7de
commit
b051c7aabe
@ -839,6 +839,10 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
||||
case kPPC_NegFloat64:
|
||||
ASSEMBLE_FLOAT_UNOP_RC(fneg);
|
||||
break;
|
||||
case kPPC_Cntlz32:
|
||||
__ cntlzw_(i.OutputRegister(), i.InputRegister(0));
|
||||
DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
||||
break;
|
||||
case kPPC_Cmp32:
|
||||
ASSEMBLE_COMPARE(cmpw, cmplw);
|
||||
break;
|
||||
|
@ -69,6 +69,7 @@ namespace compiler {
|
||||
V(PPC_RoundFloat64) \
|
||||
V(PPC_MaxFloat64) \
|
||||
V(PPC_MinFloat64) \
|
||||
V(PPC_Cntlz32) \
|
||||
V(PPC_Cmp32) \
|
||||
V(PPC_Cmp64) \
|
||||
V(PPC_CmpFloat64) \
|
||||
|
@ -737,6 +737,12 @@ void InstructionSelector::VisitWord64Ror(Node* node) {
|
||||
#endif
|
||||
|
||||
|
||||
void InstructionSelector::VisitWord32Clz(Node* node) {
|
||||
PPCOperandGenerator g(this);
|
||||
Emit(kPPC_Cntlz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
|
||||
}
|
||||
|
||||
|
||||
void InstructionSelector::VisitInt32Add(Node* node) {
|
||||
VisitBinop<Int32BinopMatcher>(this, node, kPPC_Add32, kInt16Imm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user