mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 05:36:10 +00:00
i386 kernel __storeload_barrier: quiet gcc -Warray-bounds
Use a constant input operand instead of an output operand to tell the compiler about __OFFSETOF_MONITORBUF. If we tell it we are writing to *(u_int *)__OFFSETOF_MONITORBUF, it rightly complains, but we aren't. The memory clobber already covers the necessary semantics for the compiler. Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D45695
This commit is contained in:
parent
6095f4b04c
commit
88478cc02a
|
@ -49,8 +49,8 @@ static __inline void
|
|||
__mbk(void)
|
||||
{
|
||||
|
||||
__asm __volatile("lock; addl $0,%%fs:%0"
|
||||
: "+m" (*(u_int *)__OFFSETOF_MONITORBUF) : : "memory", "cc");
|
||||
__asm __volatile("lock; addl $0,%%fs:%c0"
|
||||
: : "i" (__OFFSETOF_MONITORBUF) : "memory", "cc");
|
||||
}
|
||||
|
||||
static __inline void
|
||||
|
|
Loading…
Reference in a new issue