tor-browser

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

cvt-x64-ion-codegen.js (967B)


      1 // |jit-test| skip-if: !wasmSimdEnabled() || !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("x64") || getBuildConfiguration("simulator") || isAvxPresent(); include:codegen-x64-test.js
      2 
      3 // Test that there are no extraneous moves for various SIMD conversion
      4 // operations. See README-codegen.md for general information about this type of
      5 // test case.
      6 
      7 // Note, these tests test the beginning of the output but not the end.
      8 
      9 codegenTestX64_v128_v128(
     10    [['i32x4.trunc_sat_f32x4_s',
     11     // The movaps is dest -> scratch and needs to be here.  The test is
     12     // asserting that there is not an additional (redundant) move here.
     13 `
     14 movaps %xmm0, %xmm15
     15 cmpps \\$0x00, %xmm15, %xmm15
     16 pand %xmm15, %xmm0`],
     17     ['i32x4.trunc_sat_f32x4_u', `
     18 xorps %xmm15, %xmm15
     19 maxps %xmm15, %xmm0`],
     20     ['f32x4.convert_i32x4_u', `
     21 pxor %xmm15, %xmm15
     22 pblendw \\$0x55, %xmm0, %xmm15
     23 psubd %xmm15, %xmm0
     24 cvtdq2ps %xmm15, %xmm15`]],
     25    {no_suffix:true});