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

Unified Diff: src/arm/code-stubs-arm.cc

Issue 6170001: Direct call api functions (arm implementation) (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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
Index: src/arm/code-stubs-arm.cc
===================================================================
--- src/arm/code-stubs-arm.cc (revision 6213)
+++ src/arm/code-stubs-arm.cc (working copy)
@@ -2704,9 +2704,24 @@
// this by performing a garbage collection and retrying the
// builtin once.
+ // r0 is argc.
+ // Compute callee's stack pointer before making changes and save it as
+ // ip register so that it is restored as sp register on exit, thereby
+ // popping the args.
antonm 2011/01/21 17:56:36 I think you should add a reference to EnterExitFra
Zaheer 2011/01/24 09:43:31 Done.
+
+ // ip = sp + kPointerSize * #args;
+ __ add(ip, sp, Operand(r0, LSL, kPointerSizeLog2));
+
+ // Compute the argv pointer and keep it in a callee-saved register.
+ __ sub(r6, ip, Operand(kPointerSize));
+
// Enter the exit frame that transitions from JavaScript to C++.
- __ EnterExitFrame(save_doubles_);
+ __ EnterExitFrame(save_doubles_, 1); // 1 pending push after this call.
+ // Setup argc and the builtin function in callee-saved registers.
+ __ mov(r4, Operand(r0));
+ __ mov(r5, Operand(r1));
Erik Corry 2011/01/21 14:28:40 I don't see the benefit of moving this outside the
Zaheer 2011/01/24 09:43:31 Updated comment in macro-assembler-arm.h.
+
// r4: number of arguments (C callee-saved)
// r5: pointer to builtin function (C callee-saved)
// r6: pointer to first argument (C callee-saved)
@@ -4981,6 +4996,9 @@
__ Jump(r2);
}
+void DirectCEntryStub::Generate(MacroAssembler* masm) {
+ __ ldr(pc, MemOperand(fp, ExitFrameConstants::kPCOffset));
+}
#undef __

Powered by Google App Engine
This is Rietveld 408576698