mirror of
https://github.com/tuz358/cpu-emulator.git
synced 2025-12-18 21:14:35 +03:00
set_flag: Fix bug due to mistake processing order
This commit is contained in:
@@ -308,9 +308,9 @@ void Instructions::cmp_rm32_imm8(){
|
|||||||
|
|
||||||
void Instructions::set_flag(int flag, uint32_t flag_type){
|
void Instructions::set_flag(int flag, uint32_t flag_type){
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this->eflags &= ~flag_type;
|
|
||||||
} else {
|
|
||||||
this->eflags |= flag_type;
|
this->eflags |= flag_type;
|
||||||
|
} else {
|
||||||
|
this->eflags &= ~flag_type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user