diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js')
-rw-r--r-- | js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js new file mode 100644 index 0000000000..253beba410 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/splat-x64-ion-codegen.js @@ -0,0 +1,29 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration().x64; include:codegen-x64-test.js + +// Test that there are no extraneous moves or other instructions for splat and +// other splat-like operations that can reuse its input for its output and/or +// has a specializable code path. See README-codegen.md for general information +// about this type of test case. + +codegenTestX64_PTYPE_v128( + [['f32x4.splat', 'f32', `0f c6 c0 00 shufps \\$0x00, %xmm0, %xmm0`], + ['f64x2.splat', 'f64', `66 0f c6 c0 00 shufpd \\$0x00, %xmm0, %xmm0`]] ); + +// Skip these on Win64 because the ABI differs and there's a different parameter +// register, this changes not just the name slightly but the binary encoding in +// larger ways. + +if (!getBuildConfiguration().windows) { + codegenTestX64_PTYPE_v128( + [['v128.load32_splat', 'i32', ` +f3 41 0f 10 04 3f movssl \\(%r15,%rdi,1\\), %xmm0 +0f c6 c0 00 shufps \\$0x00, %xmm0, %xmm0`], + ['v128.load64_splat', 'i32', `f2 41 0f 12 04 3f movddupq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load8x8_s', 'i32', `66 41 0f 38 20 04 3f pmovsxbwq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load8x8_u', 'i32', `66 41 0f 38 30 04 3f pmovzxbwq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load16x4_s', 'i32', `66 41 0f 38 23 04 3f pmovsxwdq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load16x4_u', 'i32', `66 41 0f 38 33 04 3f pmovzxwdq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load32x2_s', 'i32', `66 41 0f 38 25 04 3f pmovsxdqq \\(%r15,%rdi,1\\), %xmm0`], + ['v128.load32x2_u', 'i32', `66 41 0f 38 35 04 3f pmovzxdqq \\(%r15,%rdi,1\\), %xmm0`]], + {memory:1}); +} |