Forráskód Böngészése

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 4 éve
szülő
commit
9964c106ad
1 módosított fájl, 1 hozzáadás és 1 törlés
  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)
 ALWAYS_INLINE void write_gs_ptr(u32 offset, FlatPtr val)
 {
 {
     asm volatile(
     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");
         : "memory");
 }
 }