Sign in
third-party-mirror
/
mingw-w64
/
0290618ceaeb1087e7f396809c929b79cbc255d0
/
.
/
mingw-w64-crt
/
intrincs
/
readfsword.c
blob: 850083fd037f4e6fe3d2cc3e55de970afce939ba [
file
] [
log
] [
blame
]
#include
<intrin.h>
/* for x86 only */
unsigned
short
__readfsword
(
unsigned
__LONG32
Offset
)
{
unsigned
short
ret
;
__asm__
volatile
(
"movw %%fs:%1,%0"
:
"=r"
(
ret
)
,
"=m"
((*(
volatile
__LONG32
*)
Offset
)));
return
ret
;
}