REPNE prefix not handled
mmozeiko opened this issue · comments
$ sim86_clang_debug.exe repne.binary.txt
; repne.binary.txt disassembly:
bits 16
rep cmpsb
rep scasb
rep cmpsw
rep scasw
rep cmpsb
rep scasb
rep movsw
rep cmpsw
rep scasw
$ ndisasm.exe repne.binary.txt
00000000 F3A6 repe cmpsb
00000002 F3AE repe scasb
00000004 F3A7 repe cmpsw
00000006 F3AF repe scasw
00000008 F2A6 repne cmpsb
0000000A F2AE repne scasb
0000000C F2A5 repne movsw
0000000E F2A7 repne cmpsw
00000010 F2AF repne scasw
REPE is same as REP for cmps/scas instruction.
Basically movs/stos/lods use REP prefix.
cmps/scas use REPE/REPZ (which has same encoding as REP) or REPNE/REPNZ.
I fixed this in my local version, Martins, but I was not planning on updating to the github here until after the sim section. Is this something that is causing problems for you at the moment? If so, I can go ahead and merge just the (small) changes that add proper printout for this (we were not checking the Z bit when printing REP prefixes).
- Casey
Oh, I don't need it at all. Just letting you know about this in case full coverage is needed/wanted by you or somebody.
I believe this should now be fixed?
- Casey