Debian Codegraph @

js/src/jit-test/tests/wasm/regress/bug1678785.js

raw
1
2 // This exposed a bug in CL's aarch64 isel, in which the -4098 was
3 // incorrectly sign-extended out to 64 bits.
4
5 let { exports } = new WebAssembly.Instance(new WebAssembly.Module(
6 wasmTextToBinary(`
7 (module
8 (type (;0;) (func))
9 (type (;1;) (func (result i32)))
10 (type (;2;) (func (result i64)))
11 (func (;0;) (type 0)
12 i32.const -4098
13 i32.load16_s offset=1
14 drop)
15 (memory (;0;) 1)
16 (export "g" (func 0)))` )));
17 try {
18 exports.g();
19 } catch (e) {}
20