From c3f1cd87d7d504841e0221309c53f4d009bf2b22 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 17 Mar 2024 08:56:24 +0000 Subject: fix uxtb/uxth alias being incorrectly applied with x-size registers --- tests/armv8/a64.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/armv8') diff --git a/tests/armv8/a64.rs b/tests/armv8/a64.rs index 74bb89f..0e76ef6 100644 --- a/tests/armv8/a64.rs +++ b/tests/armv8/a64.rs @@ -4931,3 +4931,19 @@ fn test_misc() { assert!(errs.is_empty()); } + +#[test] +fn test_bitfield() { + const TESTS: &[([u8; 4], &'static str)] = &[ + ([0x00, 0x1c, 0x40, 0xd3], "ubfx x0, x0, #0x0, #0x8"), + ([0x1f, 0x1c, 0x00, 0x53], "uxtb wzr, w0"), + ]; + + let errs = run_tests(TESTS); + + for err in errs.iter() { + println!("{}", err); + } + + assert!(errs.is_empty()); +} -- cgit v1.1