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

Unified Diff: src/mips64/macro-assembler-mips64.cc

Issue 853323002: MIPS: split api call stubs into accessor and function call stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc
index 2de1c2a1a9edf33c66a4497c3b63759018a9d7e3..f011454d484d8fdcfd5f227add33dc0ed5ca3857 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -4367,10 +4367,8 @@ static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
void MacroAssembler::CallApiFunctionAndReturn(
- Register function_address,
- ExternalReference thunk_ref,
- int stack_space,
- MemOperand return_value_operand,
+ Register function_address, ExternalReference thunk_ref, int stack_space,
+ MemOperand* stack_space_operand, MemOperand return_value_operand,
MemOperand* context_restore_operand) {
ExternalReference next_address =
ExternalReference::handle_scope_next_address(isolate());
@@ -4464,9 +4462,13 @@ void MacroAssembler::CallApiFunctionAndReturn(
if (restore_context) {
ld(cp, *context_restore_operand);
}
- li(s0, Operand(stack_space));
- LeaveExitFrame(false, s0, !restore_context, EMIT_RETURN);
-
+ if (stack_space_operand != NULL) {
+ lw(s0, *stack_space_operand);
+ } else {
+ li(s0, Operand(stack_space));
+ }
+ LeaveExitFrame(false, s0, !restore_context, EMIT_RETURN,
+ stack_space_operand != NULL);
bind(&promote_scheduled_exception);
{
FrameScope frame(this, StackFrame::INTERNAL);
@@ -5116,10 +5118,9 @@ void MacroAssembler::EnterExitFrame(bool save_doubles,
}
-void MacroAssembler::LeaveExitFrame(bool save_doubles,
- Register argument_count,
- bool restore_context,
- bool do_return) {
+void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count,
+ bool restore_context, bool do_return,
+ bool argument_count_is_length) {
// Optionally restore all double registers.
if (save_doubles) {
// Remember: we only need to restore every 2nd double FPU value.
@@ -5152,8 +5153,12 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles,
ld(ra, MemOperand(sp, ExitFrameConstants::kCallerPCOffset));
if (argument_count.is_valid()) {
- dsll(t8, argument_count, kPointerSizeLog2);
- daddu(sp, sp, t8);
+ if (argument_count_is_length) {
+ daddu(sp, sp, argument_count);
+ } else {
+ dsll(t8, argument_count, kPointerSizeLog2);
+ daddu(sp, sp, t8);
+ }
}
if (do_return) {
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698