Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index 4ecc434b23ac17a620a635fa2a8ba7461144c4f9..9161aaf1f2258cb0fdea8eff0fd2c2163bacccf4 100644 |
--- a/src/arm64/lithium-codegen-arm64.cc |
+++ b/src/arm64/lithium-codegen-arm64.cc |
@@ -4677,14 +4677,27 @@ void LCodeGen::DoParameter(LParameter* instr) { |
} |
-void LCodeGen::DoPushArgument(LPushArgument* instr) { |
- LOperand* argument = instr->value(); |
- if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) { |
- Abort(kDoPushArgumentNotImplementedForDoubleType); |
- } else { |
- __ Push(ToRegister(argument)); |
- after_push_argument_ = true; |
+void LCodeGen::DoPreparePushArguments(LPreparePushArguments* instr) { |
+ __ PushPreamble(instr->argc(), kPointerSize); |
+} |
+ |
+ |
+void LCodeGen::DoPushArguments(LPushArguments* instr) { |
+ MacroAssembler::PushPopQueue args(masm()); |
+ |
+ for (int i = 0; i < instr->ArgumentCount(); ++i) { |
+ LOperand* arg = instr->argument(i); |
+ if (arg->IsDoubleRegister() || arg->IsDoubleStackSlot()) { |
+ Abort(kDoPushArgumentNotImplementedForDoubleType); |
+ return; |
+ } |
+ args.Queue(ToRegister(arg)); |
} |
+ |
+ // The preamble was done by LPreparePushArguments. |
+ args.PushQueued(MacroAssembler::PushPopQueue::SKIP_PREAMBLE); |
+ |
+ after_push_argument_ = true; |
} |