From c1afe154bb30b49313612f9180c796fbc280d238 Mon Sep 17 00:00:00 2001 From: Jan Potocki Date: Wed, 20 May 2026 15:51:26 +0200 Subject: [PATCH] fibb_tsc: poprawka timestamp(), zabezpieczenie EBX/RBX --- fibb_tsc/timestamp32.s | 3 +++ fibb_tsc/timestamp64.s | 3 +++ 2 files changed, 6 insertions(+) diff --git a/fibb_tsc/timestamp32.s b/fibb_tsc/timestamp32.s index ba269a7..d24c06e 100644 --- a/fibb_tsc/timestamp32.s +++ b/fibb_tsc/timestamp32.s @@ -6,8 +6,11 @@ .text timestamp: +push %ebx + xor %eax, %eax cpuid rdtsc +pop %ebx ret diff --git a/fibb_tsc/timestamp64.s b/fibb_tsc/timestamp64.s index b7705ff..48d64c2 100644 --- a/fibb_tsc/timestamp64.s +++ b/fibb_tsc/timestamp64.s @@ -6,6 +6,8 @@ .text timestamp: +push %rbx + xor %rax, %rax cpuid rdtsc @@ -13,4 +15,5 @@ rdtsc shl $32, %rdx or %rdx, %rax +pop %rbx ret