Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index d8f140254e0de0eb92893580a275f604aac415ba..f2c69b32f2f3f6b65e3736e5703d536fb82f8fbc 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -117,10 +117,14 @@ static void EmitStackCheck(MacroAssembler* masm_, |
Label ok; |
ASSERT(jssp.Is(__ StackPointer())); |
ASSERT(scratch.Is(jssp) == (pointers == 0)); |
+ Heap::RootListIndex index; |
if (pointers != 0) { |
__ Sub(scratch, jssp, pointers * kPointerSize); |
+ index = Heap::kRealStackLimitRootIndex; |
+ } else { |
+ index = Heap::kStackLimitRootIndex; |
} |
- __ CompareRoot(scratch, Heap::kStackLimitRootIndex); |
+ __ CompareRoot(scratch, index); |
__ B(hs, &ok); |
PredictableCodeSizeScope predictable(masm_, |
Assembler::kCallSizeWithRelocation); |