Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index d40e74aa275401eb53c8da8b166982517b206709..df14dad767389b15d3140041ea7ae1c5bdd29978 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); |