diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js')
-rw-r--r-- | js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js b/js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js new file mode 100644 index 0000000000..bd59f30632 --- /dev/null +++ b/js/src/jit-test/tests/wasm/simd/reduce-x64-ion-codegen.js @@ -0,0 +1,46 @@ +// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration().x64 || getBuildConfiguration().simulator || isAvxPresent(); include:codegen-x64-test.js + +// Test encoding of the all_true, and any_true operations. + +codegenTestX64_v128_i32( + [['v128.any_true', ` +66 0f 38 17 c0 ptest %xmm0, %xmm0 +0f 95 c0 setnz %al +0f b6 c0 movzx %al, %eax`], + ['i8x16.all_true', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 74 f8 pcmpeqb %xmm0, %xmm15 +66 45 0f 38 17 ff ptest %xmm15, %xmm15 +0f 94 c0 setz %al +0f b6 c0 movzx %al, %eax`], + ['i16x8.all_true', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 75 f8 pcmpeqw %xmm0, %xmm15 +66 45 0f 38 17 ff ptest %xmm15, %xmm15 +0f 94 c0 setz %al +0f b6 c0 movzx %al, %eax`], + ['i32x4.all_true', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 76 f8 pcmpeqd %xmm0, %xmm15 +66 45 0f 38 17 ff ptest %xmm15, %xmm15 +0f 94 c0 setz %al +0f b6 c0 movzx %al, %eax`], + ['i64x2.all_true', ` +66 45 0f ef ff pxor %xmm15, %xmm15 +66 44 0f 38 29 f8 pcmpeqq %xmm0, %xmm15 +66 45 0f 38 17 ff ptest %xmm15, %xmm15 +0f 94 c0 setz %al +0f b6 c0 movzx %al, %eax`]], {} +) + +// Utils. +function codegenTestX64_v128_i32(inputs, options = {}) { + for ( let [op, expected] of inputs ) { + codegenTestX64_adhoc(wrap(options, ` + (func (export "f") (param v128) (result i32) + (${op} (local.get 0)))`), + 'f', + expected, + options); + } + } |