Skip to content

Commit aacbae3

Browse files
committed
Adapt automatic-verification for the _rdtsc intrinsic
1 parent a7e72c5 commit aacbae3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/stdsimd-verify/tests/x86-intel.rs

+5
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ fn equate(t: &Type, intel: &str, intrinsic: &str, is_const: bool) -> Result<(),
481481
// as we're not exposing it as a macro.
482482
(&Type::Ptr(&Type::M128), "__m128") if intrinsic == "_MM_TRANSPOSE4_PS" => {}
483483

484+
// The _rdtsc intrinsic uses a __int64 return type, but this is a bug in
485+
// the intrinsics guide: https://github.com/rust-lang-nursery/stdsimd/issues/559
486+
// We have manually fixed the bug by changing the return type to `u64`.
487+
(&Type::PrimUnsigned(64), "__int64") if intrinsic == "_rdtsc" => {}
488+
484489
_ => bail!(
485490
"failed to equate: `{}` and {:?} for {}",
486491
intel,

0 commit comments

Comments
 (0)