neg-abs-not-x64-ion-codegen.js (1237B)
1 // |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator"); include:codegen-x64-test.js 2 3 // Test that there are no extraneous moves for variable SIMD negate, abs, and 4 // not instructions. See README-codegen.md for general information about this 5 // type of test case. 6 7 // Integer negates don't have to reuse the input for the output, and prefer for 8 // the registers to be different. So use parameter 1 and ignore parameter 0. 9 10 codegenTestX64_IGNOREDxv128_v128( 11 [['i8x16.neg', ` 12 pxor %xmm0, %xmm0 13 psubb %xmm1, %xmm0`], 14 ['i16x8.neg', ` 15 pxor %xmm0, %xmm0 16 psubw %xmm1, %xmm0`], 17 ['i32x4.neg', ` 18 pxor %xmm0, %xmm0 19 psubd %xmm1, %xmm0`], 20 ['i64x2.neg', ` 21 pxor %xmm0, %xmm0 22 psubq %xmm1, %xmm0`]] ); 23 24 // Floating point negate and absolute value, and bitwise not, prefer for the 25 // registers to be the same and guarantee that no move is inserted if so. 26 27 codegenTestX64_v128_v128( 28 [['f32x4.neg', `pxorx ${RIPR}, %xmm0`], 29 ['f64x2.neg', `pxorx ${RIPR}, %xmm0`], 30 ['f32x4.abs', `pandx ${RIPR}, %xmm0`], 31 ['f64x2.abs', `pandx ${RIPR}, %xmm0`], 32 ['v128.not', ` 33 pcmpeqw %xmm15, %xmm15 34 pxor %xmm15, %xmm0`]] );