Sign in
third-party-mirror
/
mingw-w64
/
d569207498ba0b21c6a6db8af9cef11ecd9a83e8
/
.
/
mingw-w64-crt
/
intrincs
/
readgsqword.c
blob: 7510913f0273030586986634f57a15a88d3bca68 [
file
] [
log
] [
blame
]
#include
<intrin.h>
/* for __x86_64 only */
unsigned
__int64 __readgsqword
(
unsigned
long
Offset
)
{
void
*
ret
;
__asm__
volatile
(
"movq %%gs:%1,%0"
:
"=r"
(
ret
)
,
"=m"
((*(
volatile
long
*)
(
unsigned
__int64
)
Offset
)));
return
(
unsigned
__int64
)
ret
;
}