Explorar el Código

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.
Gunnar Beutner hace 4 años
padre
commit
9964c106ad
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Kernel/Arch/x86/ASM_wrapper.h

+ 1 - 1
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");
 }