Ignore int3 instructions when counting instructions in tests

These are generated as padding and are not actually part of the
function.
This commit is contained in:
Amanieu d'Antras
2024-06-07 17:54:26 +01:00
parent da09b47285
commit 860145884d
@@ -71,7 +71,7 @@ pub fn assert(shim_addr: usize, fnname: &str, expected: &str) {
//eprintln!(" function: {:?}", function);
let mut instrs = &function.instrs[..];
while instrs.last().map_or(false, |s| s == "nop") {
while instrs.last().map_or(false, |s| s == "nop" || s == "int3") {
instrs = &instrs[..instrs.len() - 1];
}