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

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

Issue 1384483004: PPC: [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/ppc/builtins-ppc.cc ('k') | src/ppc/interface-descriptors-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/code-stubs-ppc.cc
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc
index 290159a3e757b1d0f1cda6fa78c47aa941b1974a..02177e2b8c9ce636c78e3391bb2e29acde20cbfe 100644
--- a/src/ppc/code-stubs-ppc.cc
+++ b/src/ppc/code-stubs-ppc.cc
@@ -1034,15 +1034,22 @@ void CEntryStub::Generate(MacroAssembler* masm) {
// fp: frame pointer (restored after C call)
// sp: stack pointer (restored as callee's sp after C call)
// cp: current context (C callee-saved)
-
+ //
+ // If argv_in_register():
+ // r5: pointer to the first argument
ProfileEntryHookStub::MaybeCallEntryHook(masm);
__ mr(r15, r4);
- // Compute the argv pointer.
- __ ShiftLeftImm(r4, r3, Operand(kPointerSizeLog2));
- __ add(r4, r4, sp);
- __ subi(r4, r4, Operand(kPointerSize));
+ if (argv_in_register()) {
+ // Move argv into the correct register.
+ __ mr(r4, r5);
+ } else {
+ // Compute the argv pointer.
+ __ ShiftLeftImm(r4, r3, Operand(kPointerSizeLog2));
+ __ add(r4, r4, sp);
+ __ subi(r4, r4, Operand(kPointerSize));
+ }
// Enter the exit frame that transitions from JavaScript to C++.
FrameScope scope(masm, StackFrame::MANUAL);
@@ -1141,8 +1148,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
// r3:r4: result
// sp: stack pointer
// fp: frame pointer
- // r14: still holds argc (callee-saved).
- __ LeaveExitFrame(save_doubles(), r14, true);
+ Register argc;
+ if (argv_in_register()) {
+ // We don't want to pop arguments so set argc to no_reg.
+ argc = no_reg;
+ } else {
+ // r14: still holds argc (callee-saved).
+ argc = r14;
+ }
+ __ LeaveExitFrame(save_doubles(), argc, true);
__ blr();
// Handling of exception.
« no previous file with comments | « src/ppc/builtins-ppc.cc ('k') | src/ppc/interface-descriptors-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698