blob: a04e1c2d3942c603ba63b5fcf1a4f5d25487879d [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" or (not $jitTests and $architecture =~ /(^arm$)|mips/ and $hostOS == "linux") # added by mark-jsc-stress-test.py
let glob = 0
function doTest(number, bit) {
glob -= 1
if ((number>>bit)&1)
glob += 1
if (((~number)>>(bit+1))&1)
glob += 1
if (number & (1<<(bit-1)))
glob += 1
}
noInline(doTest);
for (let i=0; i<(1<<30); ++i)
doTest(i, 15)
if (glob != 536870912)
throw "Error: bad result: " + glob;