disabled.js (1218B)
1 // |jit-test| skip-if: wasmSimdEnabled() 2 3 // ../binary.js checks that all SIMD extended opcodes in the 0..255 range are 4 // rejected if !wasmSimdEnabled, so no need to check that here. 5 6 // Non-opcode cases that should also be rejected, lest feature sniffing may 7 // erroneously conclude that simd is available when it's not. The error message 8 // may differ depending on ENABLE_WASM_SIMD: if SIMD is compiled in we usually 9 // get a sensible error about v128; if not, we get something generic. 10 11 wasmFailValidateText(`(module (func (param v128)))`, 12 /(v128 not enabled)|(bad type)/); 13 14 wasmFailValidateText(`(module (func (result v128)))`, 15 /(v128 not enabled)|(bad type)/); 16 17 wasmFailValidateText(`(module (func (local v128)))`, 18 /(v128 not enabled)|(bad type)|(SIMD support is not enabled)/); 19 20 wasmFailValidateText(`(module (global (import "m" "g") v128))`, 21 /expected global type/); 22 23 wasmFailValidateText(`(module (global (import "m" "g") (mut v128)))`, 24 /expected global type/); 25 26 wasmFailValidateText(`(module (global i32 (v128.const i32x4 0 0 0 0)))`, 27 /(v128 not enabled)|(unrecognized opcode)/);