Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 655ae2c3e2f129615c9a3f7ccd60f6308fd76590..42f6f56846b334186df7ceef702c192a9b53b9bc 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -8,6 +8,7 @@ |
#if V8_TARGET_ARCH_MIPS |
+#include "src/base/bits.h" |
#include "src/bootstrapper.h" |
#include "src/codegen.h" |
#include "src/cpu-profiler.h" |
@@ -4961,7 +4962,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, |
// The stack must be allign to 0 modulo 8 for stores with sdc1. |
DCHECK(kDoubleSize == frame_alignment); |
if (frame_alignment > 0) { |
- DCHECK(IsPowerOf2(frame_alignment)); |
+ DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); |
And(sp, sp, Operand(-frame_alignment)); // Align stack. |
} |
int space = FPURegister::kMaxNumRegisters * kDoubleSize; |
@@ -4979,7 +4980,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, |
DCHECK(stack_space >= 0); |
Subu(sp, sp, Operand((stack_space + 2) * kPointerSize)); |
if (frame_alignment > 0) { |
- DCHECK(IsPowerOf2(frame_alignment)); |
+ DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); |
And(sp, sp, Operand(-frame_alignment)); // Align stack. |
} |
@@ -5074,7 +5075,7 @@ void MacroAssembler::AssertStackIsAligned() { |
if (frame_alignment > kPointerSize) { |
Label alignment_as_expected; |
- DCHECK(IsPowerOf2(frame_alignment)); |
+ DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); |
andi(at, sp, frame_alignment_mask); |
Branch(&alignment_as_expected, eq, at, Operand(zero_reg)); |
// Don't use Check here, as it will call Runtime_Abort re-entering here. |
@@ -5475,7 +5476,7 @@ void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, |
// and the original value of sp. |
mov(scratch, sp); |
Subu(sp, sp, Operand((stack_passed_arguments + 1) * kPointerSize)); |
- DCHECK(IsPowerOf2(frame_alignment)); |
+ DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); |
And(sp, sp, Operand(-frame_alignment)); |
sw(scratch, MemOperand(sp, stack_passed_arguments * kPointerSize)); |
} else { |
@@ -5532,7 +5533,7 @@ void MacroAssembler::CallCFunctionHelper(Register function, |
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; |
And(at, sp, Operand(frame_alignment_mask)); |
Branch(&alignment_as_expected, eq, at, Operand(zero_reg)); |