Skip to content

Commit

Permalink
Adapt automatic-verification for the _rdtsc intrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg committed Apr 23, 2019
1 parent ff1c144 commit 78f4810
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/stdsimd-verify/tests/x86-intel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,11 @@ fn equate(t: &Type, intel: &str, intrinsic: &str, is_const: bool) -> Result<(),
// as we're not exposing it as a macro.
(&Type::Ptr(&Type::M128), "__m128") if intrinsic == "_MM_TRANSPOSE4_PS" => {}

// The _rdtsc intrinsic uses a __int64 return type, but this is a bug in
// the intrinsics guide: https://github.com/rust-lang-nursery/stdsimd/issues/559
// We have manually fixed the bug by changing the return type to `u64`.
(&Type::PrimUnsigned(64), "__int64") if intrinsic == "_rdtsc" => {}

_ => bail!(
"failed to equate: `{}` and {:?} for {}",
intel,
Expand Down

0 comments on commit 78f4810

Please sign in to comment.