Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: src/arm/codegen-arm.cc

Issue 181019: Move stack check into AllocateStackSlots so the load delay can be... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/virtual-frame-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/codegen-arm.cc
===================================================================
--- src/arm/codegen-arm.cc (revision 2780)
+++ src/arm/codegen-arm.cc (working copy)
@@ -176,7 +176,8 @@
}
#endif
- // Allocate space for locals and initialize them.
+ // Allocate space for locals and initialize them. This also checks
+ // for stack overflow.
frame_->AllocateStackSlots();
// Initialize the function return target after the locals are set
// up, because it needs the expected frame height from the frame.
@@ -278,7 +279,6 @@
frame_->CallRuntime(Runtime::kTraceEnter, 0);
// Ignore the return value.
}
- CheckStack();
// Compile the body of the function in a vanilla state. Don't
// bother compiling all the code if the scope has an illegal
@@ -1111,9 +1111,18 @@
if (FLAG_check_stack) {
Comment cmnt(masm_, "[ check stack");
__ LoadRoot(ip, Heap::kStackLimitRootIndex);
- __ cmp(sp, Operand(ip));
+ // Put the lr setup insn in the delay slot. The '4' is added to the
Mads Ager (chromium) 2009/08/31 09:33:10 insn -> instruction
+ // implicit 8 that always apples to operations with pc and gives a return
Mads Ager (chromium) 2009/08/31 09:33:10 applies?
+ // address 12 bytes down.
+ masm_->add(lr, pc, Operand(4));
Mads Ager (chromium) 2009/08/31 09:33:10 Is this just 4 bytes or is it really kPointerSize?
Erik Corry 2009/08/31 11:07:57 Fixed to be sizeof(Instr). If we move to thumb2 w
+ masm_->cmp(sp, Operand(ip));
StackCheckStub stub;
- __ CallStub(&stub, lo); // Call the stub if lower.
+ // Call the stub if lower.
+ masm_->mov(pc,
+ Operand(reinterpret_cast<intptr_t>(stub.GetCode().location()),
+ RelocInfo::CODE_TARGET),
+ LeaveCC,
+ lo);
}
}
« no previous file with comments | « no previous file | src/arm/virtual-frame-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698