From dd65ed38db2b8289f0f55fe83e2a5a893dcd8a94 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 31 Jul 2019 11:22:45 +0200 Subject: [PATCH] Require prefix of instruction line to be the expected instruction `rsqrtps %xmm0,%xmm1` used to match `sqrtps` without leading `r`. --- library/stdarch/crates/stdarch-test/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/stdarch/crates/stdarch-test/src/lib.rs b/library/stdarch/crates/stdarch-test/src/lib.rs index a0bc0f773029..4e25d2a02d9d 100644 --- a/library/stdarch/crates/stdarch-test/src/lib.rs +++ b/library/stdarch/crates/stdarch-test/src/lib.rs @@ -90,7 +90,7 @@ pub fn assert(_fnptr: usize, fnname: &str, expected: &str) { // Look for `expected` as the first part of any instruction in this // function, e.g., tzcntl in tzcntl %rax,%rax. - let found = instrs.iter().any(|s| s.contains(expected)); + let found = instrs.iter().any(|s| s.starts_with(expected)); // Look for `call` instructions in the disassembly to detect whether // inlining failed: all intrinsics are `#[inline(always)]`, so