[mips][wasm-c-api] Fix offset when calling WasmCapiFunction
In WasmCapiCallWrappers, the address is passed in a register instead
of as an immediate, so we reduced 3 instructions to load the address
to t9;
before: lui + ori + dsll + ori;
after: mov;
Port: 54d84cf385
Bug: v8:11774
Change-Id: I423e54216ff65f1c12128c2b26443e1838b68003
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2914771
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#74720}
This commit is contained in:
parent
f4135ff5b3
commit
6156aecd3a
@ -778,7 +778,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
bool isWasmCapiFunction =
|
||||
linkage()->GetIncomingDescriptor()->IsWasmCapiFunction();
|
||||
// from start_call to return address.
|
||||
int offset = __ root_array_available() ? 68 : 80;
|
||||
int offset = __ root_array_available() ? 64 : 88;
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
#if V8_HOST_ARCH_MIPS
|
||||
if (FLAG_debug_code) {
|
||||
|
@ -743,7 +743,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
||||
bool isWasmCapiFunction =
|
||||
linkage()->GetIncomingDescriptor()->IsWasmCapiFunction();
|
||||
// from start_call to return address.
|
||||
int offset = __ root_array_available() ? 76 : 88;
|
||||
int offset = __ root_array_available() ? 64 : 112;
|
||||
#endif // V8_ENABLE_WEBASSEMBLY
|
||||
#if V8_HOST_ARCH_MIPS64
|
||||
if (FLAG_debug_code) {
|
||||
|
Loading…
Reference in New Issue
Block a user