Bug 1854009 - wasm: Use load32 for loading subtyping depth. r=bvisness

The subtyping depth field on STV is 32-bits, we should use load32.

The hardcoded subtyping depth limit and LEB byte order currently
save us here, but we shouldn't rely on that.

Differential Revision: https://phabricator.services.mozilla.com/D188643
This commit is contained in:
Ryan Hunt 2023-09-20 14:19:09 +00:00
Родитель 0bc3a1faa0
Коммит 306d3033f7
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -723,7 +723,7 @@ void wasm::GenerateFunctionPrologue(MacroAssembler& masm,
// Load the subtyping depth of the expected function type. Re-use the
// index register, as it's no longer needed.
Register subTypingDepth = WasmTableCallIndexReg;
masm.load8ZeroExtend(
masm.load32(
Address(WasmTableCallSigReg,
int32_t(SuperTypeVector::offsetOfSubTypingDepth())),
subTypingDepth);