Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 1a7d828c92d9e336bcad5de9fb54e49ac81cfb88..c3c1bda77185263bf16e184a56981240ca43eeda 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); |