Closed barotto closed 2 years ago
When IBMulator is compiled with GCC version 6 and later and with optimizations turned on (so not -O0), test386.asm fails the NEG D test for EAX=0x80000000:
-O0
NEG D
EAX=0x80000000
17413,17414c17413,17414 < F7 NEG D EAX=80000000 EDX=00000000 PS=0091 EAX=80000000 EDX=00000000 PS=0805 < F7 NEG D EAX=80000001 EDX=00000000 PS=0805 EAX=7FFFFFFF EDX=00000000 PS=0015 --- > F7 NEG D EAX=80000000 EDX=00000000 PS=0091 EAX=80000000 EDX=00000000 PS=0885 > F7 NEG D EAX=80000001 EDX=00000000 PS=0885 EAX=7FFFFFFF EDX=00000000 PS=0015
The SF is wrongly cleared.
SF
This is the result of UB code.
See this Stack Overflow discussion for details.
When IBMulator is compiled with GCC version 6 and later and with optimizations turned on (so not
-O0
), test386.asm fails theNEG D
test forEAX=0x80000000
:The
SF
is wrongly cleared.This is the result of UB code.
See this Stack Overflow discussion for details.