tor-browser

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

lazy-tiering-codegen.js (1486B)


      1 // |jit-test| skip-if: !wasmLazyTieringEnabled() || !getBuildConfiguration("x64") || !hasDisassembler() || getBuildConfiguration("simulator"); test-also=-P wasm_lazy_tiering --setpref=wasm_lazy_tiering_synchronous; include:codegen-x64-test.js
      2 
      3 assertEq(hasDisassembler(), true);
      4 
      5 // Test the compiled result of this function, but be very careful not to run
      6 // it, because we don't want it to tier-up.  This is close to being the
      7 // smallest wasm function whose entry-point tier-up check will have a down-step
      8 // of 3, which is what we check for below.
      9 let t = `
     10 (module
     11   (func $f (export "f") (param i32) (result i32)
     12      (local.get 0)
     13      (i32.const 1)
     14      i32.add
     15      (i32.const 2)
     16      i32.and
     17      (i32.const 3)
     18      i32.or
     19      (i32.const 4)
     20      i32.xor
     21      (i32.const 5)
     22      i32.add
     23      (i32.const 6)
     24      i32.and
     25      (i32.const 7)
     26      i32.or
     27      (i32.const 8)
     28      i32.xor
     29      (i32.const 9)
     30      i32.add
     31      (i32.const 10)
     32      i32.and
     33      (i32.const 11)
     34      i32.or
     35      (i32.const 12)
     36      i32.xor
     37      (i32.const 13)
     38      i32.add
     39      (i32.const 14)
     40      i32.and
     41      (i32.const 15)
     42      i32.or
     43      (i32.const 16)
     44      i32.xor
     45      (i32.const 17)
     46      i32.add
     47      (i32.const 18)
     48      i32.and
     49      (i32.const 19)
     50      i32.or
     51   )
     52 )
     53 `;
     54 
     55 let expected =
     56 `subl \\$0x03, 0x...\\(%r14\\)
     57 js 0x000000000000....`;
     58 
     59 codegenTestX64_adhoc(t, "f", expected,
     60                     {no_prefix:true, no_suffix:true, baseline:true});