aboutsummaryrefslogtreecommitdiff
path: root/src/protected_mode/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/protected_mode/mod.rs')
-rw-r--r--src/protected_mode/mod.rs28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs
index cf72fda..482a921 100644
--- a/src/protected_mode/mod.rs
+++ b/src/protected_mode/mod.rs
@@ -968,7 +968,16 @@ pub enum Opcode {
NOT = 0x1019,
XADD = 0x101a,
XCHG = 0x101b,
- Invalid = 0x1c,
+
+ CMPS = 0x201c,
+ SCAS = 0x201d,
+ MOVS = 0x201e,
+ LODS = 0x201f,
+ STOS = 0x2020,
+ INS = 0x2021,
+ OUTS = 0x2022,
+
+ Invalid = 0x23,
// XADD,
BT,
// BTS,
@@ -1053,17 +1062,10 @@ pub enum Opcode {
CWD,
CDQ,
CQO,
- LODS,
- STOS,
LAHF,
SAHF,
- CMPS,
- SCAS,
- MOVS,
TEST,
- INS,
IN,
- OUTS,
OUT,
IMUL,
JO,
@@ -4217,6 +4219,16 @@ impl Opcode {
_ => None,
}
}
+
+ #[inline(always)]
+ fn can_lock(&self) -> bool {
+ (*self as u32) & 0x1000 != 0
+ }
+
+ #[inline(always)]
+ fn can_rep(&self) -> bool {
+ (*self as u32) & 0x2000 != 0
+ }
}
impl Default for Instruction {