[assert-instr] simplify
This commit is contained in:
@@ -246,13 +246,11 @@ pub fn assert(fnptr: usize, expected: &str) {
|
|||||||
if let Some(part) = instr.parts.get(0) {
|
if let Some(part) = instr.parts.get(0) {
|
||||||
// Truncates the instruction with the length of the expected
|
// Truncates the instruction with the length of the expected
|
||||||
// instruction: tzcntl => tzcnt and compares that.
|
// instruction: tzcntl => tzcnt and compares that.
|
||||||
if let Some(part) = part.get(0..expected.len()) {
|
if part.starts_with(expected) {
|
||||||
if part == expected {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Help debug by printing out the found disassembly, and then panic as we
|
// Help debug by printing out the found disassembly, and then panic as we
|
||||||
// didn't find the instruction.
|
// didn't find the instruction.
|
||||||
|
|||||||
Reference in New Issue
Block a user