Index: src/x87/macro-assembler-x87.cc |
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc |
index af286d9809e382cb99e39d9571696e3480b1938a..6c5ba5d3d82d3b02ddba7932018175553e473fa8 100644 |
--- a/src/x87/macro-assembler-x87.cc |
+++ b/src/x87/macro-assembler-x87.cc |
@@ -6,6 +6,7 @@ |
#if V8_TARGET_ARCH_X87 |
+#include "src/base/bits.h" |
#include "src/bootstrapper.h" |
#include "src/codegen.h" |
#include "src/cpu-profiler.h" |
@@ -895,7 +896,7 @@ void MacroAssembler::EnterExitFrameEpilogue(int argc) { |
// Get the required frame alignment for the OS. |
const int kFrameAlignment = base::OS::ActivationFrameAlignment(); |
if (kFrameAlignment > 0) { |
- DCHECK(IsPowerOf2(kFrameAlignment)); |
+ DCHECK(base::bits::IsPowerOfTwo32(kFrameAlignment)); |
and_(esp, -kFrameAlignment); |
} |
@@ -1827,7 +1828,7 @@ void MacroAssembler::BooleanBitTest(Register object, |
int field_offset, |
int bit_index) { |
bit_index += kSmiTagSize + kSmiShiftSize; |
- DCHECK(IsPowerOf2(kBitsPerByte)); |
+ DCHECK(base::bits::IsPowerOfTwo32(kBitsPerByte)); |
int byte_index = bit_index / kBitsPerByte; |
int byte_bit_index = bit_index & (kBitsPerByte - 1); |
test_b(FieldOperand(object, field_offset + byte_index), |
@@ -2668,7 +2669,7 @@ void MacroAssembler::CheckStackAlignment() { |
int frame_alignment = base::OS::ActivationFrameAlignment(); |
int frame_alignment_mask = frame_alignment - 1; |
if (frame_alignment > kPointerSize) { |
- DCHECK(IsPowerOf2(frame_alignment)); |
+ DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); |
Label alignment_as_expected; |
test(esp, Immediate(frame_alignment_mask)); |
j(zero, &alignment_as_expected); |
@@ -2898,7 +2899,7 @@ void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) { |
// and the original value of esp. |
mov(scratch, esp); |
sub(esp, Immediate((num_arguments + 1) * kPointerSize)); |
- DCHECK(IsPowerOf2(frame_alignment)); |
+ DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); |
and_(esp, -frame_alignment); |
mov(Operand(esp, num_arguments * kPointerSize), scratch); |
} else { |