wa-lang.org/wazero@v1.0.2/internal/integration_test/spectest/v2/testdata/simd_i16x8_q15mulr_sat_s.wast (about) 1 ;; Tests for i16x8 arithmetic operations on major boundary values and all special values. 2 3 4 (module 5 (func (export "i16x8.q15mulr_sat_s") (param v128 v128) (result v128) (i16x8.q15mulr_sat_s (local.get 0) (local.get 1))) 6 ) 7 8 9 ;; i16x8.q15mulr_sat_s 10 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 11 (v128.const i16x8 0 0 0 0 0 0 0 0)) 12 (v128.const i16x8 0 0 0 0 0 0 0 0)) 13 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 14 (v128.const i16x8 1 1 1 1 1 1 1 1)) 15 (v128.const i16x8 0 0 0 0 0 0 0 0)) 16 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 17 (v128.const i16x8 1 1 1 1 1 1 1 1)) 18 (v128.const i16x8 0 0 0 0 0 0 0 0)) 19 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 0 0 0 0 0 0 0 0) 20 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 21 (v128.const i16x8 0 0 0 0 0 0 0 0)) 22 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 1 1 1 1 1 1 1 1) 23 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 24 (v128.const i16x8 0 0 0 0 0 0 0 0)) 25 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1) 26 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 27 (v128.const i16x8 0 0 0 0 0 0 0 0)) 28 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 16383 16383 16383 16383 16383 16383 16383 16383) 29 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 30 (v128.const i16x8 8192 8192 8192 8192 8192 8192 8192 8192)) 31 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384) 32 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)) 33 (v128.const i16x8 8192 8192 8192 8192 8192 8192 8192 8192)) 34 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -16383 -16383 -16383 -16383 -16383 -16383 -16383 -16383) 35 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 36 (v128.const i16x8 8192 8192 8192 8192 8192 8192 8192 8192)) 37 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384) 38 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 39 (v128.const i16x8 8192 8192 8192 8192 8192 8192 8192 8192)) 40 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -16385 -16385 -16385 -16385 -16385 -16385 -16385 -16385) 41 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)) 42 (v128.const i16x8 8193 8193 8193 8193 8193 8193 8193 8193)) 43 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 32765 32765 32765 32765 32765 32765 32765 32765) 44 (v128.const i16x8 1 1 1 1 1 1 1 1)) 45 (v128.const i16x8 1 1 1 1 1 1 1 1)) 46 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766) 47 (v128.const i16x8 1 1 1 1 1 1 1 1)) 48 (v128.const i16x8 1 1 1 1 1 1 1 1)) 49 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768) 50 (v128.const i16x8 1 1 1 1 1 1 1 1)) 51 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 52 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -32766 -32766 -32766 -32766 -32766 -32766 -32766 -32766) 53 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 54 (v128.const i16x8 1 1 1 1 1 1 1 1)) 55 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767) 56 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 57 (v128.const i16x8 1 1 1 1 1 1 1 1)) 58 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 59 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 60 (v128.const i16x8 1 1 1 1 1 1 1 1)) 61 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767) 62 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 63 (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766)) 64 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 65 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 66 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 67 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) 68 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)) 69 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 70 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 71 (v128.const i16x8 0 0 0 0 0 0 0 0)) 72 (v128.const i16x8 0 0 0 0 0 0 0 0)) 73 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 74 (v128.const i16x8 1 1 1 1 1 1 1 1)) 75 (v128.const i16x8 0 0 0 0 0 0 0 0)) 76 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 77 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 78 (v128.const i16x8 0 0 0 0 0 0 0 0)) 79 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 80 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)) 81 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)) 82 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 83 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)) 84 (v128.const i16x8 1 1 1 1 1 1 1 1)) 85 (assert_return (invoke "i16x8.q15mulr_sat_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) 86 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)) 87 (v128.const i16x8 0 0 0 0 0 0 0 0)) 88 89 ;; type check 90 (assert_invalid (module (func (result v128) (i16x8.q15mulr_sat_s (i32.const 0) (f32.const 0.0)))) "type mismatch") 91 92 ;; Test operation with empty argument 93 94 (assert_invalid 95 (module 96 (func $i16x8.q15mulr_sat_s-1st-arg-empty (result v128) 97 (i16x8.q15mulr_sat_s (v128.const i16x8 0 0 0 0 0 0 0 0)) 98 ) 99 ) 100 "type mismatch" 101 ) 102 (assert_invalid 103 (module 104 (func $i16x8.q15mulr_sat_s-arg-empty (result v128) 105 (i16x8.q15mulr_sat_s) 106 ) 107 ) 108 "type mismatch" 109 ) 110