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.
This commit is contained in:
Gunnar Beutner 2021-08-11 08:37:11 +02:00 committed by Andreas Kling
parent 8545bd5fdb
commit 9964c106ad
Notes: sideshowbarker 2024-07-18 07:07:16 +09:00

View file

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