From d13d8ebfad98b3d547f455ec9d73dab98f0899c3 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 19 Dec 2021 09:06:12 -0800 Subject: test that invalid RegSpec constructions panic as expected in the process, fix 64-bit rex-byte limit, 32/16-bit mode mask reg limit --- src/long_mode/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/long_mode') 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); } -- cgit v1.1