Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 6d1e956aad1178698920737015b92080ab15430e..97cd460eeba0de2b8525c7866fa7f84a9d7090fe 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -107,11 +107,15 @@ static void EmitStackCheck(MacroAssembler* masm_, |
Isolate* isolate = masm_->isolate(); |
Label ok; |
ASSERT(scratch.is(rsp) == (pointers == 0)); |
+ Heap::RootListIndex index; |
if (pointers != 0) { |
__ movp(scratch, rsp); |
__ subp(scratch, Immediate(pointers * kPointerSize)); |
+ index = Heap::kRealStackLimitRootIndex; |
+ } else { |
+ index = Heap::kStackLimitRootIndex; |
} |
- __ CompareRoot(scratch, Heap::kStackLimitRootIndex); |
+ __ CompareRoot(scratch, index); |
__ j(above_equal, &ok, Label::kNear); |
__ call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); |
__ bind(&ok); |