From 9964c106ad5d240b388badc8bb785ba63a3d6496 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 11 Aug 2021 08:37:11 +0200 Subject: [PATCH] Kernel: Disambiguate instruction size for mov in read_gs_ptr Previously we allowed using immediate values here which is ambiguous as to which specific mov instruction the compiler should choose. --- Kernel/Arch/x86/ASM_wrapper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Arch/x86/ASM_wrapper.h b/Kernel/Arch/x86/ASM_wrapper.h index 1df759d7a09..9bb508d515b 100644 --- a/Kernel/Arch/x86/ASM_wrapper.h +++ b/Kernel/Arch/x86/ASM_wrapper.h @@ -75,7 +75,7 @@ ALWAYS_INLINE FlatPtr read_gs_ptr(FlatPtr offset) ALWAYS_INLINE void write_gs_ptr(u32 offset, FlatPtr val) { asm volatile( - "mov %[val], %%gs:%a[off]" ::[off] "ir"(offset), [val] "ir"(val) + "mov %[val], %%gs:%a[off]" ::[off] "ir"(offset), [val] "r"(val) : "memory"); }