(config)
| 35 | // a single result. |
| 36 | // - sig: The signature of the `simd` and `expected` functions. |
| 37 | function ShuffleTest(config) { |
| 38 | print(config.name); |
| 39 | const builder = new WasmModuleBuilder(); |
| 40 | const simd = [ |
| 41 | ...wasmS128Const(val01), |
| 42 | ...wasmS128Const(val02), |
| 43 | kSimdPrefix, kExprI8x16Shuffle, |
| 44 | ...config.shuffle, |
| 45 | ...dummy, |
| 46 | ...config.epilogue, |
| 47 | ]; |
| 48 | const expected = [ |
| 49 | ...wasmS128Const([...config.shuffle, ...dummy]), |
| 50 | ...config.epilogue, |
| 51 | ]; |
| 52 | builder.addFunction("simd", config.sig) |
| 53 | .addLocals(kWasmS128, 1).addBody(simd).exportFunc(); |
| 54 | builder.addFunction("expected", config.sig) |
| 55 | .addLocals(kWasmS128, 1).addBody(expected).exportFunc(); |
| 56 | const wasm = builder.instantiate().exports; |
| 57 | assertEquals(wasm.simd(), wasm.expected()); |
| 58 | } |
| 59 | |
| 60 | const shuffle_64x1_tests = [ |
| 61 | { |
no test coverage detected