diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/long_mode/mod.rs | 2 | ||||
-rw-r--r-- | src/protected_mode/mod.rs | 2 | ||||
-rw-r--r-- | src/real_mode/mod.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 866eb8f..7e8dff7 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -232,7 +232,7 @@ impl RegSpec { /// construct a `RegSpec` for non-rex byte reg `num` #[inline] pub fn rb(num: u8) -> RegSpec { - if num >= 18 { + if num >= 16 { panic!("invalid x86 rex-byte reg {}", num); } diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs index 232284d..9c03faf 100644 --- a/src/protected_mode/mod.rs +++ b/src/protected_mode/mod.rs @@ -179,7 +179,7 @@ impl RegSpec { /// construct a `RegSpec` for mask reg `num` #[inline] pub fn mask(num: u8) -> RegSpec { - if num >= 32 { + if num >= 8 { panic!("invalid x86 mask reg {}", num); } diff --git a/src/real_mode/mod.rs b/src/real_mode/mod.rs index 92c0592..74e1c37 100644 --- a/src/real_mode/mod.rs +++ b/src/real_mode/mod.rs @@ -179,7 +179,7 @@ impl RegSpec { /// construct a `RegSpec` for mask reg `num` #[inline] pub fn mask(num: u8) -> RegSpec { - if num >= 32 { + if num >= 8 { panic!("invalid x86 mask reg {}", num); } |