aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-03-17 06:25:49 +0000
committeriximeow <me@iximeow.net>2024-03-17 06:25:49 +0000
commit2ea9ea69b3c6fe033c82df16b310acd6aa8a6728 (patch)
treedbc3c45e392eb861d93ea27433e40d5af3255f11 /tests
parentb0ad39339b8ad835248e5e9368392163012ecb07 (diff)
when decoding invalid opcodes, return errors. better testing for this circumstance.
Diffstat (limited to 'tests')
-rw-r--r--tests/armv8/a64.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/armv8/a64.rs b/tests/armv8/a64.rs
index 38080ef..74bb89f 100644
--- a/tests/armv8/a64.rs
+++ b/tests/armv8/a64.rs
@@ -4757,10 +4757,14 @@ fn test_vec_shift() {
#[test]
fn test_reserved() {
test_err([0x00, 0x00, 0x20, 0xd5], DecodeError::InvalidOpcode);
+ test_err([0x00, 0x00, 0x00, 0xd5], DecodeError::InvalidOpcode);
}
#[test]
fn test_system() {
+ // capstone says `msr s0_0_c2_c0_0, xzr`, but this looks like an unallocated encoding?
+ test_err([0x1f, 0x20, 0x00, 0xd5], DecodeError::InvalidOpcode);
+
const TESTS: &[([u8; 4], &'static str)] = &[
([0x00, 0x00, 0x08, 0xd5], "sys #0x0, c0, c0, #0x0, x0"),
([0x00, 0x00, 0x28, 0xd5], "sysl x0, #0x0, c0, c0, #0x0"),