1
0
Fork 0
libfringe/benches/kernel_swap.rs

16 lines
247 B
Rust
Raw Normal View History

2015-01-14 14:01:43 +08:00
#![feature(asm)]
extern crate test;
use test::Bencher;
#[bench]
fn kernel_swap(b: &mut Bencher) {
b.iter(|| unsafe {
asm!("movq $$102, %rax\n\
syscall"
:
:
: "rax", "rcx"
: "volatile");
});
}