Update stdsimd-verify to print out instruction differences
Too many to deal with for now...
This commit is contained in:
parent
30694efc68
commit
73794e5035
4 changed files with 22 additions and 28 deletions
|
|
@ -2009,7 +2009,7 @@ pub unsafe fn _mm_storel_pd(mem_addr: *mut f64, a: __m128d) {
|
|||
/// into both elements of returned vector.
|
||||
#[inline(always)]
|
||||
#[target_feature(enable = "sse2")]
|
||||
//#[cfg_attr(test, assert_instr(movapd))] FIXME movapd expected
|
||||
// #[cfg_attr(test, assert_instr(movapd))] // FIXME LLVM uses different codegen
|
||||
pub unsafe fn _mm_load1_pd(mem_addr: *const f64) -> __m128d {
|
||||
let d = *mem_addr;
|
||||
_mm_setr_pd(d, d)
|
||||
|
|
@ -2019,10 +2019,9 @@ pub unsafe fn _mm_load1_pd(mem_addr: *const f64) -> __m128d {
|
|||
/// into both elements of returned vector.
|
||||
#[inline(always)]
|
||||
#[target_feature(enable = "sse2")]
|
||||
//#[cfg_attr(test, assert_instr(movapd))] FIXME movapd expected
|
||||
// #[cfg_attr(test, assert_instr(movapd))] // FIXME same as _mm_load1_pd
|
||||
pub unsafe fn _mm_load_pd1(mem_addr: *const f64) -> __m128d {
|
||||
let d = *mem_addr;
|
||||
_mm_setr_pd(d, d)
|
||||
_mm_load1_pd(mem_addr)
|
||||
}
|
||||
|
||||
/// Load 2 double-precision (64-bit) floating-point elements from memory into
|
||||
|
|
|
|||
|
|
@ -53,8 +53,7 @@ pub unsafe fn _mm_cvttsd_si64x(a: __m128d) -> i64 {
|
|||
/// used again soon).
|
||||
#[inline(always)]
|
||||
#[target_feature(enable = "sse2")]
|
||||
// FIXME movnti on windows and linux x86_64
|
||||
//#[cfg_attr(test, assert_instr(movntiq))]
|
||||
#[cfg_attr(test, assert_instr(movnti))]
|
||||
pub unsafe fn _mm_stream_si64(mem_addr: *mut i64, a: i64) {
|
||||
::core::intrinsics::nontemporal_store(mem_addr, a);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ fn find_instrs(attrs: &[syn::Attribute]) -> Vec<syn::Ident> {
|
|||
.filter_map(|a| match a {
|
||||
syn::Meta::List(i) => {
|
||||
if i.ident == "cfg_attr" {
|
||||
i.nested.into_iter().next()
|
||||
i.nested.into_iter().nth(1)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ struct Parameter {
|
|||
#[serde(rename = "type")] type_: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Deserialize, Debug)]
|
||||
struct Instruction {
|
||||
name: String,
|
||||
}
|
||||
|
|
@ -166,27 +166,23 @@ fn verify_all_signatures() {
|
|||
);
|
||||
}
|
||||
|
||||
// TODO: we should test this, but it generates too many failures right
|
||||
// now
|
||||
if false {
|
||||
if rust.instrs.is_empty() {
|
||||
assert_eq!(
|
||||
intel.instruction.len(),
|
||||
0,
|
||||
"instruction not listed for {}",
|
||||
rust.name
|
||||
);
|
||||
if rust.instrs.is_empty() {
|
||||
if intel.instruction.len() > 0 {
|
||||
println!("instruction not listed for `{}`, but intel lists {:?}",
|
||||
rust.name, intel.instruction);
|
||||
}
|
||||
|
||||
// If intel doesn't list any instructions and we do then don't
|
||||
// bother trying to look for instructions in intel, we've just got
|
||||
// some extra assertions on our end.
|
||||
} else if !intel.instruction.is_empty() {
|
||||
for instr in rust.instrs {
|
||||
assert!(
|
||||
intel
|
||||
.instruction
|
||||
.iter()
|
||||
.any(|a| a.name.starts_with(instr)),
|
||||
// If intel doesn't list any instructions and we do then don't
|
||||
// bother trying to look for instructions in intel, we've just got
|
||||
// some extra assertions on our end.
|
||||
} else if !intel.instruction.is_empty() {
|
||||
for instr in rust.instrs {
|
||||
let asserting = intel
|
||||
.instruction
|
||||
.iter()
|
||||
.any(|a| a.name.starts_with(instr));
|
||||
if !asserting {
|
||||
println!(
|
||||
"intel failed to list `{}` as an instruction for `{}`",
|
||||
instr,
|
||||
rust.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue