mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 04:10:07 +00:00
Add rdtsc.odin
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
//+build i386, amd64
|
||||||
|
package simd_x86
|
||||||
|
|
||||||
|
_rdtsc :: #force_inline proc "c" () -> u64 {
|
||||||
|
return rdtsc()
|
||||||
|
}
|
||||||
|
|
||||||
|
__rdtscp :: #force_inline proc "c" (aux: ^u32) -> u64 {
|
||||||
|
return rdtscp(aux)
|
||||||
|
}
|
||||||
|
|
||||||
|
@(default_calling_convention="c")
|
||||||
|
@(private)
|
||||||
|
foreign _ {
|
||||||
|
@(link_name="llvm.x86.rdtsc")
|
||||||
|
rdtsc :: proc() -> u64 ---
|
||||||
|
@(link_name="llvm.x86.rdtscp")
|
||||||
|
rdtscp :: proc(aux: rawptr) -> u64 ---
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user