diff options
author | iximeow <me@iximeow.net> | 2024-03-17 06:25:11 +0000 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2024-03-17 06:25:11 +0000 |
commit | b0ad39339b8ad835248e5e9368392163012ecb07 (patch) | |
tree | 73513b79513b0f308e94db1a030cdb2fadb5bb41 | |
parent | 8aa29bd23ff62de807c444cb8a1f9c316c5bf76a (diff) |
disassembling sb is fine, tests ensure it happens now
-rw-r--r-- | differential-tests/tests/capstone-differential.rs | 10 | ||||
-rw-r--r-- | tests/armv8/a64.rs | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/differential-tests/tests/capstone-differential.rs b/differential-tests/tests/capstone-differential.rs index 826320a..ef17bd1 100644 --- a/differential-tests/tests/capstone-differential.rs +++ b/differential-tests/tests/capstone-differential.rs @@ -390,6 +390,12 @@ fn capstone_differential() { return true; } + if parsed_yax.opcode == "sb" && parsed_cs.opcode == "msr" { + // capstone doesn't report the `sb` speculation barrier, for whatever + // reason? + return true; + } + if false { eprintln!("yax: {} -> {:?}", yax_text, parsed_yax); eprintln!("cs: {} -> {:?}", cs_text, parsed_cs); @@ -513,10 +519,6 @@ fn capstone_differential() { return true; } - if cs_text.starts_with("msr ") { - return true; - } - // yax does not handle aliases for msr instructions yet if yax_text.starts_with("msr ") { return true; diff --git a/tests/armv8/a64.rs b/tests/armv8/a64.rs index 00f53e6..38080ef 100644 --- a/tests/armv8/a64.rs +++ b/tests/armv8/a64.rs @@ -75,6 +75,8 @@ fn test_barrier() { test_display([0xbf, 0x3d, 0x03, 0xd5], "dmb ld"); test_display([0xbf, 0x3e, 0x03, 0xd5], "dmb st"); test_display([0xbf, 0x3f, 0x03, 0xd5], "dmb sy"); + // only with FEAT_SB + test_display([0xff, 0x30, 0x03, 0xd5], "sb"); } #[test] |