Skip to content

Commit 47fb609

Browse files
committed
Make assert_instr stricter
1 parent a514252 commit 47fb609

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/stdarch-test/src/disassembly.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fn parse(output: &str) -> HashSet<Function> {
150150
instruction
151151
.split_whitespace()
152152
.skip(1)
153-
.skip_while(|s| *s == "lock" || *s == "{evex}") // skip x86-specific prefix
153+
.skip_while(|s| *s == "lock" || *s == "{evex}" || *s == "{vex}") // skip x86-specific prefix
154154
.map(std::string::ToString::to_string)
155155
.collect::<Vec<String>>()
156156
};

crates/stdarch-test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub fn assert(shim_addr: usize, fnname: &str, expected: &str) {
8484
// 2. It is a mark, indicating that the instruction will be
8585
// compiled into other instructions - mainly because of llvm
8686
// optimization.
87-
let found = expected == "nop" || instrs.iter().any(|s| s.contains(expected));
87+
let found = expected == "nop" || instrs.iter().any(|s| s.starts_with(expected));
8888

8989
// Look for subroutine call instructions in the disassembly to detect whether
9090
// inlining failed: all intrinsics are `#[inline(always)]`, so calling one

0 commit comments

Comments
 (0)