x86 0.0.8

Library to program x86 (amd64) hardware. Contains x86 specific data structure descriptions, as well as convenience function to call assembly instructions typically not exposed in higher level languages.
1
2
3
4
5
6
7
8
9
/// Read the time stamp counter.
pub unsafe fn rdtsc() -> u64 {
    let mut low: u64 = 0;
    let mut high: u64 = 0;

    asm!("rdtsc" : "={eax}" (low), "={edx}" (high));
    (high << 32) | low
}