The reason is, that when using "Debug" to do a quick check, you sometimes get wrong values on overflow condition.
Code: Select all
l.l = 1
q.q = 1
a.q = 1 << 63
b.q = l << 63
c.q = q << 63
Debug a ; output always correct
Debug b ; output always correct
Debug c ; output always correct
Debug ""
Debug 1 << 63 ; output always correct
Debug l << 63 ; output only correct on x64 ASM backend
Debug q << 63 ; output wrong on x86 C backend (Windows)
; debug output - x64 ASM backend (Windows)
;
; [20:19:55] -9223372036854775808
; [20:19:55] -9223372036854775808
; [20:19:55] -9223372036854775808
; [20:19:55]
; [20:19:55] -9223372036854775808
; [20:19:55] -9223372036854775808
; [20:19:55] -9223372036854775808
; debug output - x64 C backend (Windows)
;
; -9223372036854775808
; -9223372036854775808
; -9223372036854775808
;
; -9223372036854775808
; 0
; -9223372036854775808
; debug output - x86 ASM backend (Windows)
;
; -9223372036854775808
; -9223372036854775808
; -9223372036854775808
;
; -9223372036854775808
; ["maximum <<31" compiler error]
; -9223372036854775808
; debug output - x86 C backend (Windows)
;
; -9223372036854775808
; -9223372036854775808
; -9223372036854775808
;
; -9223372036854775808
; 0
; 0