Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8ef0ee9

Browse files
committedJul 8, 2024·
Fix name to be INTERP_SIMD_INTRINSIC_V128_INSTANCE_EQUALS_R8
1 parent 6085a5d commit 8ef0ee9

File tree

3 files changed

+4
-31
lines changed

3 files changed

+4
-31
lines changed
 

‎src/mono/browser/runtime/jiterpreter-trace-generator.ts

-27
Original file line numberDiff line numberDiff line change
@@ -3748,33 +3748,6 @@ function emit_simd_3 (builder: WasmBuilder, ip: MintOpcodePtr, index: SimdIntrin
37483748
builder.appendU8(WasmOpcode.i32_eqz);
37493749
append_stloc_tail(builder, getArgU16(ip, 1), WasmOpcode.i32_store);
37503750
return true;
3751-
case SimdIntrinsic3.V128_R4_FLOAT_EQUALITY:
3752-
case SimdIntrinsic3.V128_R8_FLOAT_EQUALITY: {
3753-
/*
3754-
Vector128<T> result = Vector128.Equals(lhs, rhs) | ~(Vector128.Equals(lhs, lhs) | Vector128.Equals(rhs, rhs));
3755-
return result.AsInt32() == Vector128<int>.AllBitsSet;
3756-
*/
3757-
const isR8 = index === SimdIntrinsic3.V128_R8_FLOAT_EQUALITY,
3758-
eqOpcode = isR8 ? WasmSimdOpcode.f64x2_eq : WasmSimdOpcode.f32x4_eq;
3759-
builder.local("pLocals");
3760-
append_ldloc(builder, getArgU16(ip, 2), WasmOpcode.PREFIX_simd, WasmSimdOpcode.v128_load);
3761-
builder.local("math_lhs128", WasmOpcode.tee_local);
3762-
append_ldloc(builder, getArgU16(ip, 3), WasmOpcode.PREFIX_simd, WasmSimdOpcode.v128_load);
3763-
builder.local("math_rhs128", WasmOpcode.tee_local);
3764-
builder.appendSimd(eqOpcode);
3765-
builder.local("math_lhs128");
3766-
builder.local("math_lhs128");
3767-
builder.appendSimd(eqOpcode);
3768-
builder.local("math_rhs128");
3769-
builder.local("math_rhs128");
3770-
builder.appendSimd(eqOpcode);
3771-
builder.appendSimd(WasmSimdOpcode.v128_or);
3772-
builder.appendSimd(WasmSimdOpcode.v128_not);
3773-
builder.appendSimd(WasmSimdOpcode.v128_or);
3774-
builder.appendSimd(isR8 ? WasmSimdOpcode.i64x2_all_true : WasmSimdOpcode.i32x4_all_true);
3775-
append_stloc_tail(builder, getArgU16(ip, 1), WasmOpcode.i32_store);
3776-
return true;
3777-
}
37783751
case SimdIntrinsic3.V128_I1_SHUFFLE: {
37793752
// Detect a constant indices vector and turn it into a const. This allows
37803753
// v8 to use a more optimized implementation of the swizzle opcode

‎src/mono/mono/mini/interp/interp-simd-intrins.def

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V128_BITWISE_INEQUALITY, inter
6161
INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V128_INSTANCE_EQUALS_R4, interp_v128_instance_equals_r4, -1)
6262
INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V2_INSTANCE_EQUALS_R4, interp_v2_instance_equals_r4, -1)
6363
INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V3_INSTANCE_EQUALS_R4, interp_v3_instance_equals_r4, -1)
64-
INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V128_INSTANCE_EQUALS_R4, interp_v128_instance_equals_r8, -1)
65-
INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V128_INSTANCE_EQUALS_BITIWSE, interp_v128_instance_equals_bitwise, -1)
64+
INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V128_INSTANCE_EQUALS_R8, interp_v128_instance_equals_r8, -1)
65+
INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V128_INSTANCE_EQUALS_BITWISE, interp_v128_instance_equals_bitwise, -1)
6666

6767
INTERP_SIMD_INTRINSIC_P_PP (INTERP_SIMD_INTRINSIC_V128_EXCLUSIVE_OR, interp_v128_op_exclusive_or, 81)
6868

‎src/mono/mono/mini/interp/interp-simd.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ interp_v128_op_bitwise_inequality (gpointer res, gpointer v1, gpointer v2)
197197
static void
198198
interp_v128_instance_equals_r4 (gpointer res, gpointer v1, gpointer v2)
199199
{
200-
v128_r4 v1_cast = *(*(v128_r4**))v1;
200+
v128_r4 v1_cast = **(v128_r4**)v1;
201201
v128_r4 v2_cast = *(v128_r4*)v2;
202202
v128_r4 result = (v1_cast == v2_cast) | ~((v1_cast == v1_cast) | (v2_cast == v2_cast));
203203
memset (&v1_cast, 0xff, SIZEOF_V128);
@@ -235,7 +235,7 @@ interp_v3_instance_equals_r4 (gpointer res, gpointer v1, gpointer v2)
235235
static void
236236
interp_v128_instance_equals_r8 (gpointer res, gpointer v1, gpointer v2)
237237
{
238-
v128_r8 v1_cast = *(*(v128_r8**))v1;
238+
v128_r8 v1_cast = **(v128_r8**)v1;
239239
v128_r8 v2_cast = *(v128_r8*)v2;
240240
v128_r8 result = (v1_cast == v2_cast) | ~((v1_cast == v1_cast) | (v2_cast == v2_cast));
241241
memset (&v1_cast, 0xff, SIZEOF_V128);

0 commit comments

Comments
 (0)
Please sign in to comment.