aboutsummaryrefslogtreecommitdiff
path: root/src/real_mode
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-12-19 09:06:12 -0800
committeriximeow <me@iximeow.net>2021-12-19 09:09:20 -0800
commitd13d8ebfad98b3d547f455ec9d73dab98f0899c3 (patch)
tree7abee6076688c087a2a45a84ae562f0cb59a8c94 /src/real_mode
parent060fb29180f354e04ec8d48f0128433b634fa3c5 (diff)
test that invalid RegSpec constructions panic as expected
in the process, fix 64-bit rex-byte limit, 32/16-bit mode mask reg limit
Diffstat (limited to 'src/real_mode')
-rw-r--r--src/real_mode/mod.rs2
1 files changed, 1 insertions, 1 deletions
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);
}