Fixed Some Issues Related With Overflow Flag

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Fixed Some Issues Related With Overflow Flag

Unread post by spark2k06 »

One of the issues that were opened involved incorrect operation of some instructions in very specific cases, the CPU LandMark System Speed 6.0 test:

https://github.com/MiSTer-devel/PCXT_MiSTer/issues/26

Well, after several days of debugging, and with the help of @MicroCoreLabs, I have managed to get it working:

LM60.png
LM60.png (226.64 KiB) Viewed 1104 times

The problem was due to the fact that in certain scenarios, the CMP instruction did not set the overflow flag correctly. Actually, it was related to the SUB instruction.

MicroCoreLabs had already detected this problem with the ADC/SBB instructions... and had a solution for it:

https://github.com/MiSTer-devel/PCXT_Mi ... e8437fe186

to which I have added the ADD/SUB solution:

https://github.com/MiSTer-devel/PCXT_Mi ... 5c7302f7c1

I attach a corresponding binary for testing purposes, before sending a general update to everyone.

It may also be that this fix will solve other problems. Any feedback is welcome.

Attachments
PCXT_FIXOF_01.zip
(1.23 MiB) Downloaded 119 times
Post Reply