Reviewers: Lasse Reichstein,
Description:
Implement DoStackCheck in x64 crankshaft
Please review this at http://codereview.chromium.org/6257002/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/x64/lithium-codegen-x64.cc
Index: src/x64/lithium-codegen-x64.cc
===================================================================
--- src/x64/lithium-codegen-x64.cc (revision 6307)
+++ src/x64/lithium-codegen-x64.cc (working copy)
@@ -1153,7 +1153,15 @@
void LCodeGen::DoStackCheck(LStackCheck* instr) {
- Abort("Unimplemented: %s", "DoStackCheck");
+ // Perform stack overflow check.
+ NearLabel done;
+ ExternalReference stack_limit =
ExternalReference::address_of_stack_limit();
+ __ CompareRoot(rsp, Heap::kStackLimitRootIndex);
+ __ j(above_equal, &done);
+
+ StackCheckStub stub;
+ CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
+ __ bind(&done);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev