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

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

Issue 860593002: X87: 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/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/macro-assembler-x87.cc
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc
index 96a05908a4cdde9eafcb2ed4a9f85cb6d964e7a8..2cf6afd239ad62c111d85f1aa04e7345f45ade15 100644
--- a/src/x87/macro-assembler-x87.cc
+++ b/src/x87/macro-assembler-x87.cc
@@ -2062,12 +2062,9 @@ void MacroAssembler::PrepareCallApiFunction(int argc) {
void MacroAssembler::CallApiFunctionAndReturn(
- Register function_address,
- ExternalReference thunk_ref,
- Operand thunk_last_arg,
- int stack_space,
- Operand return_value_operand,
- Operand* context_restore_operand) {
+ Register function_address, ExternalReference thunk_ref,
+ Operand thunk_last_arg, int stack_space, Operand* stack_space_operand,
+ Operand return_value_operand, Operand* context_restore_operand) {
ExternalReference next_address =
ExternalReference::handle_scope_next_address(isolate());
ExternalReference limit_address =
@@ -2186,8 +2183,18 @@ void MacroAssembler::CallApiFunctionAndReturn(
if (restore_context) {
mov(esi, *context_restore_operand);
}
+ if (stack_space_operand != nullptr) {
+ mov(ebx, *stack_space_operand);
+ }
LeaveApiExitFrame(!restore_context);
- ret(stack_space * kPointerSize);
+ if (stack_space_operand != nullptr) {
+ DCHECK_EQ(0, stack_space);
+ pop(ecx);
+ add(esp, ebx);
+ jmp(ecx);
+ } else {
+ ret(stack_space * kPointerSize);
+ }
bind(&promote_scheduled_exception);
{
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698