arch\x86\boot\boot.h
static
inline
u16 gs(
void
)
{
u16 seg;
asm
volatile
(
"movw %%gs,%0"
:
"=rm"
(seg));
return
seg;
}