| 1 |
// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x64-test.js |
| 2 |
|
| 3 |
// Test that there are no extraneous moves or other instructions for splat and |
| 4 |
// other splat-like operations that can reuse its input for its output and/or |
| 5 |
// has a specializable code path. See README-codegen.md for general information |
| 6 |
// about this type of test case. |
| 7 |
|
| 8 |
codegenTestX64_PTYPE_v128( |
| 9 |
[['f32x4.splat', 'f32', `0f c6 c0 00 shufps \\$0x00, %xmm0, %xmm0`], |
| 10 |
['f64x2.splat', 'f64', `f2 0f 12 c0 movddup %xmm0, %xmm0`]] , {log:true}); |
| 11 |
|
| 12 |
// Skip these on Win64 because the ABI differs and there's a different parameter |
| 13 |
// register, this changes not just the name slightly but the binary encoding in |
| 14 |
// larger ways. |
| 15 |
|
| 16 |
if (!getBuildConfiguration("windows")) { |
| 17 |
codegenTestX64_PTYPE_v128( |
| 18 |
[['v128.load32_splat', 'i32', ` |
| 19 |
f3 41 0f 10 04 3f movssl \\(%r15,%rdi,1\\), %xmm0 |
| 20 |
0f c6 c0 00 shufps \\$0x00, %xmm0, %xmm0`], |
| 21 |
['v128.load64_splat', 'i32', `f2 41 0f 12 04 3f movddupq \\(%r15,%rdi,1\\), %xmm0`], |
| 22 |
['v128.load8x8_s', 'i32', `66 41 0f 38 20 04 3f pmovsxbwq \\(%r15,%rdi,1\\), %xmm0`], |
| 23 |
['v128.load8x8_u', 'i32', `66 41 0f 38 30 04 3f pmovzxbwq \\(%r15,%rdi,1\\), %xmm0`], |
| 24 |
['v128.load16x4_s', 'i32', `66 41 0f 38 23 04 3f pmovsxwdq \\(%r15,%rdi,1\\), %xmm0`], |
| 25 |
['v128.load16x4_u', 'i32', `66 41 0f 38 33 04 3f pmovzxwdq \\(%r15,%rdi,1\\), %xmm0`], |
| 26 |
['v128.load32x2_s', 'i32', `66 41 0f 38 25 04 3f pmovsxdqq \\(%r15,%rdi,1\\), %xmm0`], |
| 27 |
['v128.load32x2_u', 'i32', `66 41 0f 38 35 04 3f pmovzxdqq \\(%r15,%rdi,1\\), %xmm0`]], |
| 28 |
{memory:1}); |
| 29 |
} |