From 004aaf023519567925d00247246398424e64719d Mon Sep 17 00:00:00 2001 From: Benjamin Lamowski Date: Wed, 22 Jan 2025 09:57:44 +0100 Subject: [PATCH] fixup; hw: always serialize rdtsc reads Since rdtsc() provides ordered timestamps now, we should reordering of statements by the compiler too. Issues #5215, #5430 --- repos/base-hw/src/include/hw/spec/x86_64/x86_64.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repos/base-hw/src/include/hw/spec/x86_64/x86_64.h b/repos/base-hw/src/include/hw/spec/x86_64/x86_64.h index 91817ad5f9..6bca48fe9a 100644 --- a/repos/base-hw/src/include/hw/spec/x86_64/x86_64.h +++ b/repos/base-hw/src/include/hw/spec/x86_64/x86_64.h @@ -122,6 +122,8 @@ struct Hw::Tsc "rdtsc;" "lfence;" : "=a"(low), "=d"(high) + : + : "memory" ); return (Genode::uint64_t)(high) << 32 | low; }