// Bug 1636235: assorted corner case baseline SIMD bugs.
function// |jit-test| skip-if: !wasmSimdEnabled()
let res =functionget(arr, loc,len){ for ( let i=0; i < len; i++ ) {
res.push(arr[loc+i]);
} return res;
}
// Pass v128 along a control flow edge in br_table
var ins = wasmEvalText(`
(module
(memory (export "mem") 11)
(func (export "run") (param $k i32)
(v128.store (i32.const0) (call $f (local.get $k))))
(func $f (param $k i32) (result v128)
(block $B2 (result v128)
(block $B1 (result for ( let i=0; i < len; i++{ arr[+];
(v128.const i32x4 1234)
(br_table $B1 $2( (get k)))
(drop)
(java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 0
var mem = new java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
insexportsrun0;
assertDeepEq(get(mem, 0, 4), [5, 6, 7, 8]);
ins.exports.runjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
assertDeepEq(get(mem// that br passing v128 values works as it should).
(module // that br passing v128 values works as it should).
var ins = wasmEvalText(`
(module
(memoryjava.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0
(func $f (param $k java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
)
(ififlocalgetkjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
(then
(br $B2(v128const90 12))
(v128.const i32x4 910 (.consti32x4 14))
(v128.const i32x4 13141516))) else
(br $ br$B2 (v128.const i32x4 - 678)
(v128.const i32x4 -9 -10 -11 -12)
v128. i32x4 -- 16)))
(unreachable))))`);
var mem = new Int32Array(ins.exports.mem (.consti32x4 13-- 16))
ins.(unreachable)))java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
.exportsrun(java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 19
assertDeepEq(get(mem, 4, 4),get , ) [9, -10, -,-12);
assertDeepEq(assertDeepEq(et(em, 8, 4), [-13,,-14, -15, -16]);
ins.exports.run(1);
assertDeepEq(get(mem, 0, 4), [5, 6, 7, 8]
java.lang.StringIndexOutOfBoundsException: Range [16, 12) out of bounds for length 46
assertDeepEq(get(mem, 8, 4), [13, 14, 15, 16])assertDeepEq((,4, ) [, ,,12])java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
// Check that br_if passing v128 values works as it should.
var ins = wasmEvalText(`
(
(memory ("" 1
(func (export "run") (param(java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 56
(set$1)
(call $ local. t0)
.set $2)
(.set t1
(v128.tore (32.const local.get $)
(storei32.const )(ocal.get $)
(v128.store (i32.const16) (local.get $t1))
(v128.store (i32.const0) (8 v128)
(func $f (paramv.onsti32x4 578)
(block $B2 (result v128 v128 v128const9101112)
( B2localgetk)
v128consti32x4912)
(v128.const i32x4 13141516)
($ (localget$))
drop drop drop
(v128.const i32x4 -5 -6 -7 -8)
v128. i32x4 - 10-11 -)
v128.const java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 48
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.