0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-25 04:06:55 +01:00
rust/tests/assembly/x86_64-sse_crc.rs

13 lines
281 B
Rust

//@ 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)
}