From b3de915473ed4082fec1e9e464b86ee058cb9b2a Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Wed, 10 Jul 2024 14:03:10 -0700 Subject: [PATCH] Ensure mono wasm jiterpreter handles v128_bitcast --- src/mono/browser/runtime/jiterpreter-trace-generator.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mono/browser/runtime/jiterpreter-trace-generator.ts b/src/mono/browser/runtime/jiterpreter-trace-generator.ts index e81c9b6683cbcf..f1b75fa8b6b983 100644 --- a/src/mono/browser/runtime/jiterpreter-trace-generator.ts +++ b/src/mono/browser/runtime/jiterpreter-trace-generator.ts @@ -3652,6 +3652,13 @@ function emit_simd_2 (builder: WasmBuilder, ip: MintOpcodePtr, index: SimdIntrin } switch (index) { + case SimdIntrinsic2.V128_BITCAST: { + // BitCast is a no-op and so we just load the value and return it "as is" + append_ldloc(builder, getArgU16(ip, 2), WasmOpcode.PREFIX_simd, WasmSimdOpcode.v128_load); + append_simd_store(builder, ip); + return true; + } + case SimdIntrinsic2.V128_I1_CREATE_SCALAR: case SimdIntrinsic2.V128_I2_CREATE_SCALAR: case SimdIntrinsic2.V128_I4_CREATE_SCALAR: