Code: Select all
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86
Macro rax_rax
!xor eax,eax
EndMacro
CompilerElse
Macro rax_rax
!xor rax,rax
EndMacro
Macro edx : rdx : EndMacro
CompilerEndIf

Code: Select all
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86
Macro rax_rax
!xor eax,eax
EndMacro
CompilerElse
Macro rax_rax
!xor rax,rax
EndMacro
Macro edx : rdx : EndMacro
CompilerEndIf
Code: Select all
-2
-1
OK
2147483647
4294967294
2147483647
4294967294
4294967292
4294967294
-2
-1
Code: Select all
-2
-1
OK
2147483647
0
0
0
-2
0
0
0
Code: Select all
;5.42 Win x64
-2
-1
OK
2147483647
4294967294
2147483647
4294967294
4294967292
4294967294
-2
-1
;5.42 Win x86
-2
-1
OK
2147483647
-2147340288
1073813504
-2147340288
-2147340290
-2147340288
-2147340288
-1073670144
x86 it will only handle longs and integers. Quads are done via function calls-2
-1
OK
7FFFFFFF 2147483647
FFFFFFFE 4294967294
7FFFFFFF 2147483647
FFFFFFFE 4294967294
FFFFFFFC 4294967292
FFFFFFFE 4294967294
FFFFFFFF -1
FFFFFFFE -2
Code: Select all
CompilerIf SizeOf(integer) = 4
Macro EnableUnsigned()
!macro IDIV var
!{
!mov edx,0
!div var
!}
!macro IMUL reg,var
!{
!mov eax,reg
!mul var
!mov reg,eax
!}
!macro SAR reg,var
!{
!shr reg,var
!}
!macro SAL reg,var
!{
!shl reg,var
!}
!macro CDQ {}
EndMacro
Macro DisableUnsigned()
!purge IDIV
!purge IMUL
!purge SAR
!purge SAL
!purge CDQ
UndefineMacro EnableUnsigned
EndMacro
Procedure Unsigned(arg1.i,op1.l,arg2.i)
EnableASM
Select op1
Case '<'
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!setb al
ProcedureReturn
Case '<='
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!setbe al
ProcedureReturn
Case '>'
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!seta al
ProcedureReturn
Case '>='
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!setae al
ProcedureReturn
Case '='
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!sete al
ProcedureReturn
Case '<>'
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!setne al
ProcedureReturn
EndSelect
EndProcedure
CompilerElse
Macro EnableUnsigned()
!macro IDIV var
!{
!mov rdx,0
!div var
!}
!macro IMUL reg,var
!{
!match =qword x , var
!\{ mov rax, reg
!mov r15, var
!\}
!mul reg
!mov reg,rax
!}
!macro SAR reg,var
!{
!shr reg,var
!}
!macro SAL reg,var
!{
!shl reg,var
!}
!macro MOVSXD reg,var
!{
!match =dword x , var
!\{ mov eax, var
!mov reg,rax \}
!}
!macro CQO {}
!macro CDO {}
!macro CWD {}
!macro CBW {}
!macro CWDE{}
!macro CDQE {}
!macro CDQ {}
EndMacro
Macro DisableUnsigned()
!purge IDIV
!purge IMUL
!purge SAR
!purge SAL
!purge MOVSXD
!purge CQO
!purge CDO
!purge CWD
!purge CBW
!purge CWDE
!purge CDQE
!purge CDQ
UndefineMacro EnableUnsigned
EndMacro
Procedure Unsigned(arg1.i,op1.l,arg2.i)
EnableASM
Select op1
Case '<'
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!setb al
ProcedureReturn
Case '<='
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!setbe al
ProcedureReturn
Case '>'
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!seta al
ProcedureReturn
Case '>='
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!setae al
ProcedureReturn
Case '='
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!sete al
ProcedureReturn
Case '<>'
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!setne al
ProcedureReturn
EndSelect
EndProcedure
CompilerEndIf
Global x.l,y.l
x=2
y=$FFFFFFFE
Debug y
y / 2
Debug y
EnableUnsigned()
y=$FFFFFFFE
If Unsigned(x,'<=',y) ; unsigned comparison.
Debug "OK"
y / 2
Debug Hex(y,#PB_Long) + " " + Str(y) ;7FFFFFFF
y * x
Debug Hex(y,#PB_Long) + " " + Str(y) ;FFFFFFFE
y >> 1
Debug Hex(y,#PB_Long) + " " + Str(y) ;7FFFFFFF
y << 1
Debug Hex(y,#PB_Long) + " " + Str(y) ;FFFFFFFE
y - x
Debug Hex(y,#PB_Long) + " " + Str(y) ;FFFFFFFC
y + x
Debug Hex(y,#PB_Long) + " " + Str(y) ;FFFFFFFE
DisableUnsigned()
y / 2
Debug Hex(y,#PB_Long) + " " + Str(y) ;FFFFFFFF
y * x
Debug Hex(y,#PB_Long) + " " + Str(y) ;FFFFFFFE -
EndIf
Code: Select all
-2
-1
OK
7FFFFFFF 2147483647
FFFFFFFE 4294967294
7FFFFFFF 2147483647
FFFFFFFE 4294967294
FFFFFFFC 4294967292
FFFFFFFE 4294967294
FFFFFFFF -1
FFFFFFFE -2
Code: Select all
-2
-1
OK
7FFFFFFF -2147483649
FFFFFFFE -2
7FFFFFFF -2147483649
FFFFFFFE -2
FFFFFFFC -4
FFFFFFFE -2
FFFFFFFF -1
FFFFFFFE -2
Code: Select all
OK
raw-y = 2147483647
7FFFFFFF 2147483647
raw-y * x = 4294967294
FFFFFFFF 4294967295
7FFFFFFF 2147483647
FFFFFFFE 4294967294
FFFFFFFC 4294967292
FFFFFFFE 4294967294
FFFFFFFF -1
FFFFFFFE -2
Code: Select all
OK
raw-y = 113816633343
7FFFFFFF 311385128959
raw-y * x = 545460846590
FFFFFFFF 743029342207
7FFFFFFF 938450354175
FFFFFFFE 1138166333438
FFFFFFFC 1344324763644
FFFFFFFE 1550483193854
FFFFFFFF -1
FFFFFFFE -2
Code: Select all
CompilerIf SizeOf(integer) = 4
Macro EnableUnsigned()
!macro IDIV var
!{
!mov edx,0
!div var
!}
!macro IMUL reg,var
!{
!mov eax,reg
!mul var
!mov reg,eax
!}
!macro SAR reg,var
!{
!shr reg,var
!}
!macro SAL reg,var
!{
!shl reg,var
!}
!macro CDQ {}
EndMacro
Macro DisableUnsigned()
!purge IDIV
!purge IMUL
!purge SAR
!purge SAL
!purge CDQ
EndMacro
Procedure Unsigned(arg1.i,op1.l,arg2.i)
EnableASM
Select op1
Case '<'
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!setb al
ProcedureReturn
Case '<='
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!setbe al
ProcedureReturn
Case '>'
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!seta al
ProcedureReturn
Case '>='
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!setae al
ProcedureReturn
Case '='
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!sete al
ProcedureReturn
Case '<>'
!xor eax , eax
!mov edx, [p.v_arg1]
!cmp edx, [p.v_arg2]
!setne al
ProcedureReturn
EndSelect
EndProcedure
CompilerElse
Macro EnableUnsigned()
!macro IDIV var
!{
!mov rdx,0
!div var
!}
!macro IMUL reg,var
!{
!match =qword x , var
!\{ mov rax, reg
!mov r15, var
!\}
!mul reg
!mov reg,rax
!}
!macro SAR reg,var
!{
!shr reg,var
!}
!macro SAL reg,var
!{
!shl reg,var
!}
!macro MOVSXD reg,var
!{
!match =dword x , var
!\{ mov eax, var
!mov reg,rax \}
!}
!macro CQO {}
!macro CDO {}
!macro CWD {}
!macro CBW {}
!macro CWDE{}
!macro CDQE {}
!macro CDQ {}
EndMacro
Macro DisableUnsigned()
!purge IDIV
!purge IMUL
!purge SAR
!purge SAL
!purge MOVSXD
!purge CQO
!purge CDO
!purge CWD
!purge CBW
!purge CWDE
!purge CDQE
!purge CDQ
EndMacro
Procedure Unsigned(arg1.i,op1.l,arg2.i)
EnableASM
Select op1
Case '<'
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!setb al
ProcedureReturn
Case '<='
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!setbe al
ProcedureReturn
Case '>'
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!seta al
ProcedureReturn
Case '>='
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!setae al
ProcedureReturn
Case '='
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!sete al
ProcedureReturn
Case '<>'
!xor rax,rax
!mov rdx, [p.v_arg1]
!cmp rdx, [p.v_arg2]
!setne al
ProcedureReturn
EndSelect
EndProcedure
CompilerEndIf
Global x.l,y.l
x=2
y=$FFFFFFFE
Debug y
y / 2
Debug y
EnableUnsigned()
y=$FFFFFFFE
If Unsigned(x,'<=',y) ; unsigned comparison.
Debug "OK"
y / 2
Debug Hex(y,#PB_Long) + " " + StrU(y) ;7FFFFFFF
y * x
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFE
y >> 1
Debug Hex(y,#PB_Long) + " " + StrU(y) ;7FFFFFFF
y << 1
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFE
y - x
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFC
y + x
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFE
DisableUnsigned()
y / 2
Debug Hex(y,#PB_Long) + " " + StrU(y) + " should be 7FFFFFFF if unsigned was used "
y * x
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFE -
EndIf
CompilerIf SizeOf(Integer) = 8;
;
Global xx.q,yy.q
xx=2
yy=$FFFFFFFFFFFFFFFE
Debug yy
yy / 2
Debug yy
EnableUnsigned()
xx=2
y=$FFFFFFFFFFFFFFFE
If Unsigned(xx,'<=',yy) ; unsigned comparison.
Debug "OK"
yy / 2
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;7FFFFFFFFFFFFFFF
yy * xx
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFFFFFFFFFE
yy >> 1
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;7FFFFFFFFFFFFFFF
yy << 1
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFFFFFFFFFE
yy - xx
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFFFFFFFFFC
yy + xx
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFFFFFFFFFE
DisableUnsigned()
yy / 2
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) + " should be 7FFFFFFFFFFFFFFF if unsigned was used "
yy * xx
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFE -
EndIf
CompilerEndIf
Code: Select all
;5.42 Win x86 on x86:
; -2
; -1
; OK
; 7FFFFFFF 18446744071562067967
; FFFFFFFE 18446744073709551614
; 7FFFFFFF 18446744071562067967
; FFFFFFFE 18446744073709551614
; FFFFFFFC 18446744073709551612
; FFFFFFFE 18446744073709551614
; FFFFFFFF 18446744073709551615 should be 7FFFFFFF If unsigned was used
; FFFFFFFE 18446744073709551614
;5.42 Win x64 on x64:
; -2
; -1
; OK
; 7FFFFFFF 2147483647
; FFFFFFFE 4294967294
; 7FFFFFFF 2147483647
; FFFFFFFE 4294967294
; FFFFFFFC 4294967292
; FFFFFFFE 4294967294
; FFFFFFFF 18446744073709551615 should be 7FFFFFFF If unsigned was used
; FFFFFFFE 18446744073709551614
; -2
; -1
; OK
; 7FFFFFFFFFFFFFFF 9223372036854775807
; FFFFFFFFFFFFFFFE 18446744073709551614
; 7FFFFFFFFFFFFFFF 9223372036854775807
; FFFFFFFFFFFFFFFE 18446744073709551614
; FFFFFFFFFFFFFFFC 18446744073709551612
; FFFFFFFFFFFFFFFE 18446744073709551614
; FFFFFFFFFFFFFFFF 18446744073709551615 should be 7FFFFFFFFFFFFFFF If unsigned was used
; FFFFFFFFFFFFFFFE 18446744073709551614
;5.41 Linux x64 on x64
; -2
; -1
; OK
; 7FFFFFFF 2147483647
; FFFFFFFE 4294967294
; 7FFFFFFF 2147483647
; FFFFFFFE 4294967294
; FFFFFFFC 4294967292
; FFFFFFFE 4294967294
; FFFFFFFF 18446744073709551615 should be 7FFFFFFF If unsigned was used
; FFFFFFFE 18446744073709551614
; -2
; -1
; OK
; 7FFFFFFFFFFFFFFF 9223372036854775807
; FFFFFFFFFFFFFFFE 18446744073709551614
; 7FFFFFFFFFFFFFFF 9223372036854775807
; FFFFFFFFFFFFFFFE 18446744073709551614
; FFFFFFFFFFFFFFFC 18446744073709551612
; FFFFFFFFFFFFFFFE 18446744073709551614
; FFFFFFFFFFFFFFFF 18446744073709551615 should be 7FFFFFFFFFFFFFFF If unsigned was used
; FFFFFFFFFFFFFFFE 18446744073709551614
Code: Select all
PBx86 under Win-x64
-2
-1
OK
7FFFFFFF 18446744071562067967
FFFFFFFE 18446744073709551614
7FFFFFFF 18446744071562067967
FFFFFFFE 18446744073709551614
FFFFFFFC 18446744073709551612
FFFFFFFE 18446744073709551614
FFFFFFFF 18446744073709551615 should be 7FFFFFFF if unsigned was used
FFFFFFFE 18446744073709551614
PBx64
-2
-1
OK
7FFFFFFF 2147483647
FFFFFFFE 4294967294
7FFFFFFF 2147483647
FFFFFFFE 4294967294
FFFFFFFC 4294967292
FFFFFFFE 4294967294
FFFFFFFF 18446744073709551615 should be 7FFFFFFF if unsigned was used
FFFFFFFE 18446744073709551614
-2
-1
OK
7FFFFFFFFFFFFFFF 9223372036854775807
FFFFFFFFFFFFFFFE 18446744073709551614
7FFFFFFFFFFFFFFF 9223372036854775807
FFFFFFFFFFFFFFFE 18446744073709551614
FFFFFFFFFFFFFFFC 18446744073709551612
FFFFFFFFFFFFFFFE 18446744073709551614
FFFFFFFFFFFFFFFF 18446744073709551615 should be 7FFFFFFFFFFFFFFF if unsigned was used
FFFFFFFFFFFFFFFE 18446744073709551614
Code: Select all
PBx86 under Win-x64
OK
7FFFFFFF 130996502527
FFFFFFFE 330712481790
7FFFFFFF 526133493759
FFFFFFFE 725849473022
FFFFFFFC 923417968636
FFFFFFFE 1120986464254
FFFFFFFF 18446744073709551615 should be 7FFFFFFF if unsigned was used
FFFFFFFE 18446744073709551614
PBx64
OK
7FFFFFFF 2147483647
FFFFFFFE 4294967294
7FFFFFFF 2147483647
FFFFFFFE 4294967294
FFFFFFFC 4294967292
FFFFFFFE 4294967294
FFFFFFFF 18446744073709551615 should be 7FFFFFFF if unsigned was used
FFFFFFFE 18446744073709551614
OK
7FFFFFFFFFFFFFFF 9223372036854775807
FFFFFFFFFFFFFFFE 18446744073709551614
7FFFFFFFFFFFFFFF 9223372036854775807
FFFFFFFFFFFFFFFE 18446744073709551614
FFFFFFFFFFFFFFFC 18446744073709551612
FFFFFFFFFFFFFFFE 18446744073709551614
FFFFFFFFFFFFFFFF 18446744073709551615 should be 7FFFFFFFFFFFFFFF if unsigned was used
FFFFFFFFFFFFFFFE 18446744073709551614
Code: Select all
;unsigned Long Integer Quads for windows and linux x64 / x86 (Long Integer only)
;PB 5.24 LTS final
;Scope unsigned arithmatic and ifs in EnableUnsigned() DisableUnsigned() blocks
CompilerIf SizeOf(integer) = 4
Macro EnableUnsigned()
!macro IDIV var
!{
!mov edx,0
!div var
!}
!macro IMUL reg,var
!{
!mov eax,reg
!mul var
!mov reg,eax
!}
!macro SAR reg,var
!{
!shr reg,var
!}
!macro SAL reg,var
!{
!shl reg,var
!}
!macro CDQ {}
!macro JG arg
!{
!JA arg
!}
!macro JGE arg
!{
!JAE arg
!}
!macro JL arg
!{
!JB arg
!}
!macro JLE arg
!{
!JBE arg
!}
EndMacro
Macro DisableUnsigned()
!purge IDIV
!purge IMUL
!purge SAR
!purge SAL
!purge CDQ
!purge JG
!purge JGE
!purge JL
!purge JLE
EndMacro
CompilerElse
Macro EnableUnsigned()
!macro IDIV var
!{
!mov rdx,0
!div var
!}
!macro IMUL reg,var
!{
!match =qword x , var
!\{ mov rax, reg
!mov r15, var
!\}
!mul reg
!mov reg,rax
!}
!macro SAR reg,var
!{
!shr reg,var
!}
!macro SAL reg,var
!{
!shl reg,var
!}
!macro MOVSXD reg,var
!{
!match =dword x , var
!\{ mov eax, var
!mov reg,rax \}
!}
!macro CQO {}
!macro CDO {}
!macro CWD {}
!macro CBW {}
!macro CWDE{}
!macro CDQE {}
!macro CDQ {}
!macro JG arg
!{
!JA arg
!}
!macro JGE arg
!{
!JAE arg
!}
!macro JL arg
!{
!JB arg
!}
!macro JLE arg
!{
!JBE arg
!}
EndMacro
Macro DisableUnsigned()
!purge IDIV
!purge IMUL
!purge SAR
!purge SAL
!purge MOVSXD
!purge CQO
!purge CDO
!purge CWD
!purge CBW
!purge CWDE
!purge CDQE
!purge CDQ
!purge JG
!purge JGE
!purge JL
!purge JLE
EndMacro
CompilerEndIf
Global x.l,y.l
x=2
y=$FFFFFFFC
If x > y
Debug "Result not unsigned, activating EnableUnsigned()"
EnableUnsigned()
EndIf
If y >= x
Debug "OK Unsigned Enabled "
EndIf
y=$FFFFFFFE
x=2
If x < y ;Unsigned(x,'<=',y) ; unsigned comparison.
Debug "OK x <= y"
y / 2
Debug Hex(y,#PB_Long) + " " + StrU(y) ;7FFFFFFF
y * x
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFE
y >> 1
Debug Hex(y,#PB_Long) + " " + StrU(y) ;7FFFFFFF
y << 1
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFE
y - x
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFC
y + x
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFE
DisableUnsigned()
y / 2
Debug Hex(y,#PB_Long) + " " + StrU(y) + " should be 7FFFFFFF if unsigned was used "
y * x
Debug Hex(y,#PB_Long) + " " + StrU(y) ;FFFFFFFE -
EndIf
CompilerIf SizeOf(Integer) = 8;
;
Global xx.q,yy.q
xx=2
yy=$FFFFFFFFFFFFFFFC
Debug yy
If xx > yy
Debug "Result not unsigned, activating EnableUnsigned()"
EnableUnsigned()
EndIf
If yy >= xx
Debug "OK Unsigned Enabled "
EndIf
If xx <= yy
Debug "OK xx <= yy"
yy / 2
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;7FFFFFFFFFFFFFFF
yy * xx
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFFFFFFFFFE
yy >> 1
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;7FFFFFFFFFFFFFFF
yy << 1
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFFFFFFFFFE
yy - xx
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFFFFFFFFFC
yy + xx
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFFFFFFFFFE
DisableUnsigned()
yy / 2
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) + " should be 7FFFFFFFFFFFFFFF if unsigned was used "
yy * xx
Debug Hex(yy,#PB_Quad) + " " + StrU(yy) ;FFFFFFFE -
EndIf
CompilerEndIf
Code: Select all
5.42 Win x86 on x86
; Result not unsigned, activating EnableUnsigned()
; OK Unsigned Enabled
; OK x <= y
; 7FFFFFFF 18446744071562067967
; FFFFFFFE 18446744073709551614
; 7FFFFFFF 18446744071562067967
; FFFFFFFE 18446744073709551614
; FFFFFFFC 18446744073709551612
; FFFFFFFE 18446744073709551614
; FFFFFFFF 18446744073709551615 should be 7FFFFFFF if unsigned was used
; FFFFFFFE 18446744073709551614
5.42 Win x64 on x64
; Result Not unsigned, activating EnableUnsigned()
; OK Unsigned Enabled
; OK x <= y
; 7FFFFFFF 2147483647
; FFFFFFFE 4294967294
; 7FFFFFFF 2147483647
; FFFFFFFE 4294967294
; FFFFFFFC 4294967292
; FFFFFFFE 4294967294
; FFFFFFFF 18446744073709551615 should be 7FFFFFFF If unsigned was used
; FFFFFFFE 18446744073709551614
; -4
; Result Not unsigned, activating EnableUnsigned()
; OK Unsigned Enabled
; OK xx <= yy
; 7FFFFFFFFFFFFFFE 9223372036854775806
; FFFFFFFFFFFFFFFC 18446744073709551612
; 7FFFFFFFFFFFFFFE 9223372036854775806
; FFFFFFFFFFFFFFFC 18446744073709551612
; FFFFFFFFFFFFFFFA 18446744073709551610
; FFFFFFFFFFFFFFFC 18446744073709551612
; FFFFFFFFFFFFFFFE 18446744073709551614 should be 7FFFFFFFFFFFFFFF If unsigned was used
; FFFFFFFFFFFFFFFC 18446744073709551612
5.41 Linux x64 on x64
; Result Not unsigned, activating EnableUnsigned()
; OK Unsigned Enabled
; OK x <= y
; 7FFFFFFF 2147483647
; FFFFFFFE 4294967294
; 7FFFFFFF 2147483647
; FFFFFFFE 4294967294
; FFFFFFFC 4294967292
; FFFFFFFE 4294967294
; FFFFFFFF 18446744073709551615 should be 7FFFFFFF If unsigned was used
; FFFFFFFE 18446744073709551614
; -4
; Result Not unsigned, activating EnableUnsigned()
; OK Unsigned Enabled
; OK xx <= yy
; 7FFFFFFFFFFFFFFE 9223372036854775806
; FFFFFFFFFFFFFFFC 18446744073709551612
; 7FFFFFFFFFFFFFFE 9223372036854775806
; FFFFFFFFFFFFFFFC 18446744073709551612
; FFFFFFFFFFFFFFFA 18446744073709551610
; FFFFFFFFFFFFFFFC 18446744073709551612
; FFFFFFFFFFFFFFFE 18446744073709551614 should be 7FFFFFFFFFFFFFFF If unsigned was used
; FFFFFFFFFFFFFFFC 18446744073709551612
Code: Select all
Result not unsigned, activating EnableUnsigned()
OK Unsigned Enabled
OK x <= y
7FFFFFFF 2147483647
FFFFFFFE 4294967294
7FFFFFFF 2147483647
FFFFFFFE 4294967294
FFFFFFFC 4294967292
FFFFFFFE 4294967294
FFFFFFFF 18446744073709551615 should be 7FFFFFFF if unsigned was used
FFFFFFFE 18446744073709551614
-4
Result not unsigned, activating EnableUnsigned()
OK Unsigned Enabled
OK xx <= yy
7FFFFFFFFFFFFFFE 9223372036854775806
FFFFFFFFFFFFFFFC 18446744073709551612
7FFFFFFFFFFFFFFE 9223372036854775806
FFFFFFFFFFFFFFFC 18446744073709551612
FFFFFFFFFFFFFFFA 18446744073709551610
FFFFFFFFFFFFFFFC 18446744073709551612
FFFFFFFFFFFFFFFE 18446744073709551614 should be 7FFFFFFFFFFFFFFF if unsigned was used
FFFFFFFFFFFFFFFC 18446744073709551612
Code: Select all
Result not unsigned, activating EnableUnsigned()
OK Unsigned Enabled
OK x <= y
7FFFFFFF 18446744071562067967
FFFFFFFE 18446744073709551614
7FFFFFFF 18446744071562067967
FFFFFFFE 18446744073709551614
FFFFFFFC 18446744073709551612
FFFFFFFE 18446744073709551614
FFFFFFFF 18446744073709551615 should be 7FFFFFFF if unsigned was used
FFFFFFFE 18446744073709551614