diff options
author | iximeow <me@iximeow.net> | 2025-05-25 05:27:44 +0000 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2025-05-25 05:41:28 +0000 |
commit | 614d7e8bc6325dd3e632b3e83da627fa6ff9f31a (patch) | |
tree | 1a1e7cc69db5865182b0a0c0c7978d5db514250e /tests/armv8 | |
parent | 99fa3b9ad8094a726f2137a717ba7eb9e4118194 (diff) |
support the rest of PAC instructions. compare to a more recent capstone
capstone-rs currently binds an old capstone (4.0), where capstone 5.0 is
where much of the armv8.2+ implementation was ported over from LLVM. so,
differential testing is now pointed to a capstone-rs fork pending the
merge of https://github.com/capstone-rust/capstone-rs/pull/172
Diffstat (limited to 'tests/armv8')
-rw-r--r-- | tests/armv8/a64.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/armv8/a64.rs b/tests/armv8/a64.rs index ae0f108..baf841b 100644 --- a/tests/armv8/a64.rs +++ b/tests/armv8/a64.rs @@ -4832,6 +4832,45 @@ fn test_pac() { ([0x00, 0x04, 0xf0, 0xf8], "ldrab x0, [x0, #-0x800]"), ([0x00, 0x14, 0x20, 0xf8], "ldraa x0, [x0, #0x8]"), ([0x00, 0x04, 0xa4, 0xf8], "ldrab x0, [x0, #0x200]"), + + ([0x3f, 0x23, 0x03, 0xd5], "paciasp"), + ([0x1f, 0x23, 0x03, 0xd5], "paciaz"), + ([0x1f, 0x21, 0x03, 0xd5], "pacia1716"), + ([0x7f, 0x23, 0x03, 0xd5], "pacibsp"), + ([0x5f, 0x23, 0x03, 0xd5], "pacibz"), + ([0x5f, 0x21, 0x03, 0xd5], "pacib1716"), + + ([0xbf, 0x23, 0x03, 0xd5], "autiasp"), + ([0x9f, 0x23, 0x03, 0xd5], "autiaz"), + ([0x9f, 0x21, 0x03, 0xd5], "autia1716"), + ([0xff, 0x23, 0x03, 0xd5], "autibsp"), + ([0xdf, 0x23, 0x03, 0xd5], "autibz"), + ([0xdf, 0x21, 0x03, 0xd5], "autib1716"), + + ([0xfe, 0x83, 0xc1, 0xda], "pacnbiasppc"), + ([0xfe, 0x87, 0xc1, 0xda], "pacnbibsppc"), + ([0xfe, 0x8b, 0xc1, 0xda], "pacia171615"), + ([0xfe, 0x8f, 0xc1, 0xda], "pacib171615"), + ([0x7e, 0x92, 0xc1, 0xda], "autiasppcr x19"), + ([0x7e, 0x96, 0xc1, 0xda], "autibsppcr x19"), + ([0xfe, 0xa3, 0xc1, 0xda], "paciasppc"), + ([0xfe, 0xa7, 0xc1, 0xda], "pacibsppc"), + ([0xfe, 0xbb, 0xc1, 0xda], "autia171615"), + ([0xfe, 0xbf, 0xc1, 0xda], "autib171615"), + + ([0xff, 0x24, 0x03, 0xd5], "pacm"), + ([0xff, 0x20, 0x03, 0xd5], "xpaclri"), + ([0x1f, 0x00, 0x00, 0x55], "retaasppc $-0x3fffc"), + ([0x1f, 0x00, 0x20, 0x55], "retabsppc $-0x3fffc"), + ([0xff, 0xff, 0x1f, 0x55], "retaasppc $+0x0"), + ([0xff, 0xff, 0x3f, 0x55], "retabsppc $+0x0"), + ([0xf0, 0x0b, 0x5f, 0xd6], "retaasppcr x16"), + ([0xf0, 0x0f, 0x5f, 0xd6], "retabsppcr x16"), + + ([0x1f, 0x00, 0x80, 0xf3], "autiasppc $-0x3fffc"), + ([0x1f, 0x00, 0xa0, 0xf3], "autibsppc $-0x3fffc"), + ([0xff, 0xff, 0x9f, 0xf3], "autiasppc $+0x0"), + ([0xff, 0xff, 0xbf, 0xf3], "autibsppc $+0x0"), ]; let errs = run_tests(TESTS); |