PPC64: Implemented the Word64Clz TurboFan operator.
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com BUG= Review URL: https://codereview.chromium.org/1433733002 Cr-Commit-Position: refs/heads/master@{#31903}
This commit is contained in:
parent
96baec278c
commit
dba4dfb2b0
@ -944,6 +944,12 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
||||
__ cntlzw_(i.OutputRegister(), i.InputRegister(0));
|
||||
DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
||||
break;
|
||||
#if V8_TARGET_ARCH_PPC64
|
||||
case kPPC_Cntlz64:
|
||||
__ cntlzd_(i.OutputRegister(), i.InputRegister(0));
|
||||
DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
||||
break;
|
||||
#endif
|
||||
case kPPC_Popcnt32:
|
||||
__ popcntw(i.OutputRegister(), i.InputRegister(0));
|
||||
DCHECK_EQ(LeaveRC, i.OutputRCBit());
|
||||
|
@ -62,6 +62,7 @@ namespace compiler {
|
||||
V(PPC_MinDouble) \
|
||||
V(PPC_AbsDouble) \
|
||||
V(PPC_Cntlz32) \
|
||||
V(PPC_Cntlz64) \
|
||||
V(PPC_Popcnt32) \
|
||||
V(PPC_Cmp32) \
|
||||
V(PPC_Cmp64) \
|
||||
|
@ -737,6 +737,14 @@ void InstructionSelector::VisitWord32Clz(Node* node) {
|
||||
}
|
||||
|
||||
|
||||
#if V8_TARGET_ARCH_PPC64
|
||||
void InstructionSelector::VisitWord64Clz(Node* node) {
|
||||
PPCOperandGenerator g(this);
|
||||
Emit(kPPC_Cntlz64, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void InstructionSelector::VisitWord32Popcnt(Node* node) {
|
||||
PPCOperandGenerator g(this);
|
||||
Emit(kPPC_Popcnt32, g.DefineAsRegister(node),
|
||||
|
Loading…
Reference in New Issue
Block a user