tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

select.js (953B)


      1 // |jit-test| skip-if: !wasmSimdEnabled()
      2 
      3 wasmAssert(`
      4 (module
      5 (func $f (param i32) (result v128)
      6  (select ;; no type
      7   (v128.const i32x4 1 2 3 4)
      8   (v128.const i32x4 4 3 2 1)
      9   (local.get 0)
     10  )
     11 )
     12 (export "" (func 0))
     13 )`, [
     14    { type: 'v128', func: '$f', args: ['i32.const  0'], expected: 'i32x4 4 3 2 1' },
     15    { type: 'v128', func: '$f', args: ['i32.const  1'], expected: 'i32x4 1 2 3 4' },
     16    { type: 'v128', func: '$f', args: ['i32.const -1'], expected: 'i32x4 1 2 3 4' },
     17 ], {});
     18 
     19 wasmAssert(`
     20 (module
     21 (func $f (param i32) (result v128)
     22  (select (result v128)
     23   (v128.const i32x4 1 2 3 4)
     24   (v128.const i32x4 4 3 2 1)
     25   (local.get 0)
     26  )
     27 )
     28 (export "" (func 0))
     29 )`, [
     30    { type: 'v128', func: '$f', args: ['i32.const  0'], expected: 'i32x4 4 3 2 1' },
     31    { type: 'v128', func: '$f', args: ['i32.const  1'], expected: 'i32x4 1 2 3 4' },
     32    { type: 'v128', func: '$f', args: ['i32.const -1'], expected: 'i32x4 1 2 3 4' },
     33 ], {});