Sign in
mingw
/
mingw-w64
/
6f07ecd9dd1d6f2f1e642e9983e186684489764a
/
.
/
mingw-w64-crt
/
intrincs
/
bittest.c
blob: 576470f3e472762d93704b95639fb822b345d0bf [
file
] [
log
] [
blame
]
#include
<intrin.h>
unsigned
char
_bittest
(
__LONG32
const
*
Base
,
__LONG32
Offset
)
{
int
old
=
0
;
__asm__ __volatile__
(
"btl %2,%1\n\tsbbl %0,%0 "
:
"=r"
(
old
),
"=m"
((*(
volatile
__LONG32
*)
Base
))
:
"Ir"
(
Offset
)
:
"memory"
);
return
(
old
!=
0
);
}