Skip to content

Commit 443063a

Browse files
committed
Ignore int3 instructions when counting instructions in tests
These are generated as padding and are not actually part of the function.
1 parent df3618d commit 443063a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/stdarch-test/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn assert(shim_addr: usize, fnname: &str, expected: &str) {
7171
//eprintln!(" function: {:?}", function);
7272

7373
let mut instrs = &function.instrs[..];
74-
while instrs.last().map_or(false, |s| s == "nop") {
74+
while instrs.last().map_or(false, |s| s == "nop" || s == "int3") {
7575
instrs = &instrs[..instrs.len() - 1];
7676
}
7777

0 commit comments

Comments
 (0)