From bf140c1bb58424de19ca860db5874088e4aab970 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 cc8a6b5ea79..9c003a5612f 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 @@ -121,6 +121,8 @@ struct Hw::Tsc "rdtsc;" "lfence;" : "=a"(low), "=d"(high) + : + : "memory" ); return (Genode::uint64_t)(high) << 32 | low; }