Commit 7a414800 authored by Victor Gomes's avatar Victor Gomes Committed by Commit Bot

[wasm] Fix access first parameter in GenericJSToWasmWrapper

Adapt GenericJSToWasmWrapper to support reversed arguments stack.

Change-Id: I46f6492cd8a933a7670eb2ad436a1ac84b055e60
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2366702
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69504}
parent 94453a62
...@@ -3286,7 +3286,12 @@ void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) { ...@@ -3286,7 +3286,12 @@ void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) {
// Param handling. // Param handling.
Register param = rax; Register param = rax;
const int firstParamOffset = 16; #ifdef V8_REVERSE_JSARGS
const int firstParamOffset = kFPOnStackSize + kPCOnStackSize +
kSystemPointerSize; // Skips the receiver.
#else
const int firstParamOffset = kFPOnStackSize + kPCOnStackSize;
#endif
__ movq(param, MemOperand(rbp, firstParamOffset)); __ movq(param, MemOperand(rbp, firstParamOffset));
Label not_smi; Label not_smi;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment