Skip to content

Commit

Permalink
Make assert_instr stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
sayantn committed Dec 20, 2024
1 parent a514252 commit 01231c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
name: Test
runs-on: ${{ matrix.target.os }}
strategy:
fail-fast: false
matrix:
profile:
- dev
Expand Down
2 changes: 1 addition & 1 deletion crates/stdarch-test/src/disassembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ fn parse(output: &str) -> HashSet<Function> {
instruction
.split_whitespace()
.skip(1)
.skip_while(|s| *s == "lock" || *s == "{evex}") // skip x86-specific prefix
.skip_while(|s| *s == "lock" || *s == "{evex}" || *s == "{vex}") // skip x86-specific prefix
.map(std::string::ToString::to_string)
.collect::<Vec<String>>()
};
Expand Down
2 changes: 1 addition & 1 deletion crates/stdarch-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn assert(shim_addr: usize, fnname: &str, expected: &str) {
// 2. It is a mark, indicating that the instruction will be
// compiled into other instructions - mainly because of llvm
// optimization.
let found = expected == "nop" || instrs.iter().any(|s| s.contains(expected));
let found = expected == "nop" || instrs.iter().any(|s| s == expected);

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

0 comments on commit 01231c6

Please sign in to comment.