fix(interpreter): fix jg jump condition
This commit is contained in:
@@ -431,7 +431,7 @@ impl Interpreter {
|
|||||||
Mnemonic::JL(_) => flags.sf != flags.of,
|
Mnemonic::JL(_) => flags.sf != flags.of,
|
||||||
Mnemonic::JLE(_) => flags.zf || (flags.sf != flags.of),
|
Mnemonic::JLE(_) => flags.zf || (flags.sf != flags.of),
|
||||||
Mnemonic::JGE(_) => flags.sf == flags.of,
|
Mnemonic::JGE(_) => flags.sf == flags.of,
|
||||||
Mnemonic::JG(_) => !flags.zf || (flags.sf == flags.of),
|
Mnemonic::JG(_) => !flags.zf && (flags.sf == flags.of),
|
||||||
Mnemonic::JMP_b(_) | Mnemonic::JMP_v(_) => true,
|
Mnemonic::JMP_b(_) | Mnemonic::JMP_v(_) => true,
|
||||||
_ => panic!("unreachable"),
|
_ => panic!("unreachable"),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user