Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 70a968e8a2dfc789d20298767ccd309b5713a068..bd117e3982e3094e67cb8efa22c89cabcc47b63e 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -106,12 +106,14 @@ static void EmitStackCheck(MacroAssembler* masm_, |
Register scratch = esp) { |
Label ok; |
Isolate* isolate = masm_->isolate(); |
- ExternalReference stack_limit = |
- ExternalReference::address_of_stack_limit(isolate); |
ASSERT(scratch.is(esp) == (pointers == 0)); |
+ ExternalReference stack_limit; |
if (pointers != 0) { |
__ mov(scratch, esp); |
__ sub(scratch, Immediate(pointers * kPointerSize)); |
+ stack_limit = ExternalReference::address_of_real_stack_limit(isolate); |
+ } else { |
+ stack_limit = ExternalReference::address_of_stack_limit(isolate); |
} |
__ cmp(scratch, Operand::StaticVariable(stack_limit)); |
__ j(above_equal, &ok, Label::kNear); |