From eafdc290c23eace1e390fb7a4d956c4d2e13a1f0 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 17 Aug 2015 13:51:23 +0200 Subject: [PATCH] some code cleanups --- 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 277cf883d..2701e2aff 100644 --- a/hermit/arch/x86/include/asm/processor.h +++ b/hermit/arch/x86/include/asm/processor.h @@ -368,10 +368,10 @@ inline static uint64_t rdmsr(uint32_t msr) { */ inline static void wrmsr(uint32_t msr, uint64_t value) { - uint32_t low = (uint32_t) (value & 0xFFFFFFFFULL); + uint32_t low = (uint32_t) value; uint32_t high = (uint32_t) (value >> 32); - asm volatile("wrmsr" :: "a"(low), "c"(msr), "d"(high)); + asm volatile("wrmsr" :: "c"(msr), "a"(low), "d"(high) : "memory"); } /** @brief Read cr0 register