summaryrefslogtreecommitdiff
path: root/deps/v8/src/baseline/x64/baseline-assembler-x64-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/baseline/x64/baseline-assembler-x64-inl.h')
-rw-r--r--deps/v8/src/baseline/x64/baseline-assembler-x64-inl.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/deps/v8/src/baseline/x64/baseline-assembler-x64-inl.h b/deps/v8/src/baseline/x64/baseline-assembler-x64-inl.h
index f18ac84eae..aa9564dcea 100644
--- a/deps/v8/src/baseline/x64/baseline-assembler-x64-inl.h
+++ b/deps/v8/src/baseline/x64/baseline-assembler-x64-inl.h
@@ -468,16 +468,21 @@ void BaselineAssembler::EmitReturn(MacroAssembler* masm) {
__ masm()->LeaveFrame(StackFrame::BASELINE);
// Drop receiver + arguments.
- Register return_pc = scratch;
- __ masm()->PopReturnAddressTo(return_pc);
- __ masm()->leaq(rsp, MemOperand(rsp, params_size, times_system_pointer_size,
- kSystemPointerSize));
- __ masm()->PushReturnAddressFrom(return_pc);
+ __ masm()->DropArguments(
+ params_size, scratch, TurboAssembler::kCountIsInteger,
+ kJSArgcIncludesReceiver ? TurboAssembler::kCountIncludesReceiver
+ : TurboAssembler::kCountExcludesReceiver);
__ masm()->Ret();
}
#undef __
+inline void EnsureAccumulatorPreservedScope::AssertEqualToAccumulator(
+ Register reg) {
+ assembler_->masm()->cmp_tagged(reg, kInterpreterAccumulatorRegister);
+ assembler_->masm()->Assert(equal, AbortReason::kUnexpectedValue);
+}
+
} // namespace baseline
} // namespace internal
} // namespace v8