From c3e3a5ee8d1ac94147504a11c4c0b255cc5d85ea Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 3 May 2016 17:40:41 +0200 Subject: [PATCH] remove memory in the clobber list because rdtsp is a serializing instr. --- hermit/arch/x86/include/asm/processor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hermit/arch/x86/include/asm/processor.h b/hermit/arch/x86/include/asm/processor.h index 860199736..4ba69b18b 100644 --- a/hermit/arch/x86/include/asm/processor.h +++ b/hermit/arch/x86/include/asm/processor.h @@ -401,7 +401,7 @@ inline static uint64_t rdtsc(void) { uint32_t lo, hi; - asm volatile ("rdtsc" : "=a"(lo), "=d"(hi) ); + asm volatile ("rdtsc" : "=a"(lo), "=d"(hi) :: "memory"); return ((uint64_t)hi << 32ULL | (uint64_t)lo); } @@ -418,7 +418,7 @@ inline static uint64_t rdtscp(uint32_t* cpu_id) uint32_t lo, hi; uint32_t id; - asm volatile ("rdtscp" : "=a"(lo), "=c"(id), "=d"(hi) :: "memory"); + asm volatile ("rdtscp" : "=a"(lo), "=c"(id), "=d"(hi)); if (cpu_id) *cpu_id = id;