8000 comment · sha0coder/libscemu@f075c3c · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit f075c3c

Browse files
committed
comment
1 parent 25df7f6 commit f075c3c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/emu/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4672,21 +4672,20 @@ impl Emu {
46724672
}
46734673
}
46744674

4675+
// repe and repe are the same on x86 (0xf3) so you have to check if it is movement or comparison
46754676
let is_string_movement = matches!(
46764677
ins.mnemonic(),
46774678
Mnemonic::Movsb | Mnemonic::Movsw | Mnemonic::Movsd | Mnemonic::Movsq |
46784679
Mnemonic::Stosb | Mnemonic::Stosw | Mnemonic::Stosd | Mnemonic::Stosq |
46794680
Mnemonic::Lodsb | Mnemonic::Lodsw | Mnemonic::Lodsd | Mnemonic::Lodsq
46804681
);
4681-
46824682
let is_string_comparison = matches!(
46834683
ins.mnemonic(),
46844684
Mnemonic::Cmpsb | Mnemonic::Cmpsw | Mnemonic::Cmpsd | Mnemonic::Cmpsq |
46854685
Mnemonic::Scasb | Mnemonic::Scasw | Mnemonic::Scasd | Mnemonic::Scasq
46864686
);
4687-
46884687
if is_string_movement {
4689-
4688+
// do not clear rep if it is a string movement
46904689
} else if is_string_comparison {
46914690
if ins.has_repe_prefix() && !self.flags.f_zf {
46924691
self.rep = None;

0 commit comments

Comments
 (0)
0