blob: f4740f6612eddf2db082ba0a536e4d0d53f37304 [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;