aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/mod.rs
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/long_mode/mod.rs
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/long_mode/mod.rs')
-rw-r--r--src/long_mode/mod.rs2
1 files changed, 1 insertions, 1 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);
}