32 bit fixes (#10608)

This commit is contained in:
Arne Döring 2019-02-12 22:00:31 +01:00 • committed by Andreas Rumpf
commit 28394153ab
26 changed files with 165 additions and 135 deletions

View file

@ -13,14 +13,14 @@ proc get_values(): (seq[int8], seq[int16], seq[int32]) =
result[0] = @[]; result[1] = @[]; result[2] = @[]
for offset in RANGE:
let i8 = -(1 shl 9) + offset
let i16 = -(1 shl 17) + offset
let i32 = -(1 shl 33) + offset
let i8 = -(1'i64 shl 9) + offset
let i16 = -(1'i64 shl 17) + offset
let i32 = -(1'i64 shl 33) + offset
# higher bits are masked. these should be exactly equal to offset.
result[0].add i8.toU8
result[1].add i16.toU16
result[2].add i32.toU32
result[0].add cast[int8 ](uint8 cast[uint64](i8 ))
result[1].add cast[int16](uint16 cast[uint64](i16))
result[2].add cast[int32](uint32 cast[uint64](i32))
# these values this computed by VM