summaryrefslogtreecommitdiff
path: root/rdtsc.S
diff options
context:
space:
mode:
authorrebeccadoth <rebeccadoth@disroot.org>2026-11-08 21:48:41 +0100
committerrebeccadoth <rebeccadoth@disroot.org>2026-11-08 21:48:41 +0100
commit60f60fa1a9b40863cf325cca1447ec36d6108701 (patch)
tree24697bcde2c86c6da77950f32819cd5584ac4487 /rdtsc.S
inital commitHEADmaster
Diffstat (limited to 'rdtsc.S')
-rw-r--r--rdtsc.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/rdtsc.S b/rdtsc.S
new file mode 100644
index 0000000..fcac04d
--- /dev/null
+++ b/rdtsc.S
@@ -0,0 +1,13 @@
+global rdtsc
+
+section .text
+rdtsc:
+ mfence
+ lfence
+ rdtsc
+ lfence
+ shl rdx, 32
+ mov edx, eax
+ mov rax, rdx
+ ret
+