• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // only-x86_64
2 // compile-flags: -Copt-level=3
3 
4 #![crate_type = "lib"]
5 
6 #[cfg(target_arch = "x86_64")]
7 #[target_feature(enable = "sse4.2")]
8 #[no_mangle]
crc32sse(v: u8) -> u329 pub unsafe fn crc32sse(v: u8) -> u32 {
10     use std::arch::x86_64::*;
11     let out = !0u32;
12     _mm_crc32_u8(out, v)
13 }
14 
15 // CHECK: attributes #0 {{.*"target-features"="\+sse4.2,\+crc32"}}
16