| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 1bd31b32ecd27e21ebf0b53a0a67b9ffe143d18a..f388abd3959a32c65a411f4ebd28a1d1d151a677 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -2450,7 +2450,11 @@ void MacroAssembler::Pinsrd(XMMRegister dst, const Operand& src, int8_t imm8) {
|
|
|
|
|
| void MacroAssembler::Lzcnt(Register dst, const Operand& src) {
|
| - // TODO(intel): Add support for LZCNT (with ABM/BMI1).
|
| + if (CpuFeatures::IsSupported(LZCNT)) {
|
| + CpuFeatureScope scope(this, LZCNT);
|
| + lzcnt(dst, src);
|
| + return;
|
| + }
|
| Label not_zero_src;
|
| bsr(dst, src);
|
| j(not_zero, ¬_zero_src, Label::kNear);
|
|
|