tor-browser

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

inline-code.js (901B)


      1 // |jit-test| skip-if: !hasDisassembler() || wasmCompileMode() != "ion" || !getBuildConfiguration("arm64"); include:codegen-arm64-test.js
      2 
      3 setJitCompilerOption("jit.full-debug-checks", 0);
      4 
      5 codegenTestARM64_adhoc(`
      6  (func $testImp
      7    (import "wasm:js-string" "test")
      8    (param externref)
      9    (result i32)
     10  )
     11  (export "test" (func $testImp))`,
     12  'test',
     13  `and     x1, x0, #0x3
     14  cmp     w1, #0x2 \\(2\\)
     15  b\\.eq    #\\+0xc \\(addr .*\\)
     16  mov     w0, #0x0
     17  b       #\\+0x8 \\(addr .*\\)
     18  mov     w0, #0x1`,
     19  {features: {builtins: ["js-string"]}}
     20 );
     21 
     22 codegenTestARM64_adhoc(`
     23  (func $castImp
     24    (import "wasm:js-string" "cast")
     25    (param externref)
     26    (result (ref extern))
     27  )
     28  (export "cast" (func $castImp))`,
     29  'cast',
     30  `and     x1, x0, #0x3
     31  cmp     w1, #0x2 \\(2\\)
     32  b.eq    #\\+0x8 \\(addr .*\\)
     33  dcps0   \\{#0x0\\} \\(Wasm Trap\\)`,
     34  {features: {builtins: ["js-string"]}}
     35 );