summary refs log tree commit diff
path: root/tests/assembly/x86_64-sse_crc.rs
blob: bde58955a21469f63e59ed4eff9b99fe699bd54f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ only-x86_64
//@ assembly-output: emit-asm
//@ compile-flags: --crate-type staticlib -Ctarget-feature=+sse4.2

// CHECK-LABEL: banana
// CHECK: crc32
#[no_mangle]
pub unsafe fn banana(v: u8) -> u32 {
    use std::arch::x86_64::*;
    let out = !0u32;
    _mm_crc32_u8(out, v)
}