Commit adbc694a authored by Jakob Kummerow's avatar Jakob Kummerow Committed by V8 LUCI CQ

[wasm-gc][fuzzer] Fix call_ref with immediate

Use the correct helper function to emit an immediate.

Fixed: chromium:1358909
Change-Id: I2f2ae7819f40009b3f9c22067cdf11885d3347ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3869265Reviewed-by: 's avatarMatthias Liedtke <mliedtke@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82924}
parent f165b310
...@@ -651,8 +651,7 @@ class WasmGenerator { ...@@ -651,8 +651,7 @@ class WasmGenerator {
builder_->EmitByte(0); // Table index. builder_->EmitByte(0); // Table index.
} else { } else {
GenerateRef(HeapType(sig_index), data); GenerateRef(HeapType(sig_index), data);
builder_->Emit(kExprReturnCallRef); builder_->EmitWithU32V(kExprReturnCallRef, sig_index);
builder_->EmitI32Const(sig_index);
} }
return; return;
} else { } else {
...@@ -667,8 +666,7 @@ class WasmGenerator { ...@@ -667,8 +666,7 @@ class WasmGenerator {
builder_->EmitByte(0); // Table index. builder_->EmitByte(0); // Table index.
} else { } else {
GenerateRef(HeapType(sig_index), data); GenerateRef(HeapType(sig_index), data);
builder_->Emit(kExprCallRef); builder_->EmitWithU32V(kExprCallRef, sig_index);
builder_->EmitI32Const(sig_index);
} }
} }
if (sig->return_count() == 0 && wanted_kind != kWasmVoid) { if (sig->return_count() == 0 && wanted_kind != kWasmVoid) {
......
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