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/protected_mode/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/protected_mode') 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); } -- cgit v1.1