Commit b728ad81 authored by evih's avatar evih Committed by Commit Bot

[wasm] Use proper load in the generic js-to-wasm wrapper

When loading from the exported function data without pointer
compression, wrong load was used before.

Bug: v8:10701, chromium:1130385
Change-Id: If66913bcd5284eeb6fb7b795357f1512682a062f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2426383
Commit-Queue: Eva Herencsárová <evih@google.com>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70124}
parent 230da091
......@@ -3556,7 +3556,7 @@ void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) {
thread_in_wasm_flag_addr = no_reg;
Register jump_table_offset = function_data;
__ DecompressTaggedSigned(
__ LoadAnyTaggedField(
jump_table_offset,
MemOperand(
function_data,
......
......@@ -409,7 +409,6 @@ let kSig_v_liilliiil = makeSig([kWasmI64, kWasmI32, kWasmI32, kWasmI64,
assertEquals(0.5, instance.exports.main());
})();
(function testGenericWrapper1F64Return() {
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
......@@ -429,3 +428,19 @@ let kSig_v_liilliiil = makeSig([kWasmI64, kWasmI32, kWasmI32, kWasmI64,
let instance = builder.instantiate({ mod: { func: import_func } });
assertEquals(0.25, instance.exports.main());
})();
(function Regression1130385() {
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
let sig_index = builder.addType(kSig_i_v);
builder.addFunction("f0", sig_index)
.addBody([kExprI32Const, 12])
.exportFunc();
builder.addFunction("f1", sig_index)
.addBody([kExprI32Const, 15])
.exportFunc();
let instance = builder.instantiate();
assertEquals(15, instance.exports.f1());
})();
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