summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/simd/pairwise-x64-ion-codegen.js
blob: 6d8d9956954b37a671516210cef41843cb62a3e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js

// Tests for SIMD add pairwise instructions.

if (!isAvxPresent()) {

     codegenTestX64_IGNOREDxv128_v128(
          [['i16x8.extadd_pairwise_i8x16_s', `
66 0f 6f 05 ${RIPRADDR}    movdqax ${RIPR}, %xmm0
66 0f 38 04 c1             pmaddubsw %xmm1, %xmm0`],
           ['i16x8.extadd_pairwise_i8x16_u', `
66 0f 6f c1                movdqa %xmm1, %xmm0
66 0f 38 04 05 ${RIPRADDR} pmaddubswx ${RIPR}, %xmm0`],
           ['i32x4.extadd_pairwise_i16x8_s', `
66 0f 6f c1                movdqa %xmm1, %xmm0
66 0f f5 05 ${RIPRADDR}    pmaddwdx ${RIPR}, %xmm0`],
           ['i32x4.extadd_pairwise_i16x8_u', `
66 0f 6f c1                movdqa %xmm1, %xmm0
66 0f ef 05 ${RIPRADDR}    pxorx ${RIPR}, %xmm0
66 0f f5 05 ${RIPRADDR}    pmaddwdx ${RIPR}, %xmm0
66 0f fe 05 ${RIPRADDR}    padddx ${RIPR}, %xmm0`]]);

} else {

     codegenTestX64_IGNOREDxv128_v128(
          [['i16x8.extadd_pairwise_i8x16_s', `
66 0f 6f 05 ${RIPRADDR}    movdqax ${RIPR}, %xmm0
66 0f 38 04 c1             pmaddubsw %xmm1, %xmm0`],
           ['i16x8.extadd_pairwise_i8x16_u', `
c4 e2 71 04 05 ${RIPRADDR} vpmaddubswx ${RIPR}, %xmm1, %xmm0`],
           ['i32x4.extadd_pairwise_i16x8_s', `
c5 f1 f5 05 ${RIPRADDR}    vpmaddwdx ${RIPR}, %xmm1, %xmm0`],
           ['i32x4.extadd_pairwise_i16x8_u', `
c5 f1 ef 05 ${RIPRADDR}    vpxorx ${RIPR}, %xmm1, %xmm0
66 0f f5 05 ${RIPRADDR}    pmaddwdx ${RIPR}, %xmm0
66 0f fe 05 ${RIPRADDR}    padddx ${RIPR}, %xmm0`]]);

}