36#define __L4UTIL_BITOPS_HAVE_ARCH_SET_BIT
42 "lock; btsq %1,%0 \n\t"
53#define __L4UTIL_BITOPS_HAVE_ARCH_CLEAR_BIT
59 "lock; btrq %1,%0 \n\t"
70#define __L4UTIL_BITOPS_HAVE_ARCH_COMPLEMENT_BIT
72l4util_complement_bit(
int b,
volatile l4_umword_t * dest)
76 "lock; btcq %1,%0 \n\t"
87#define __L4UTIL_BITOPS_HAVE_ARCH_TEST_BIT
89l4util_test_bit(
int b,
const volatile l4_umword_t * dest)
109#define __L4UTIL_BITOPS_HAVE_ARCH_BIT_TEST_AND_SET
117 "lock; btsq %2,%1 \n\t"
131#define __L4UTIL_BITOPS_HAVE_ARCH_BIT_TEST_AND_RESET
139 "lock; btrq %2,%1 \n\t"
153#define __L4UTIL_BITOPS_HAVE_ARCH_BIT_TEST_AND_COMPLEMENT
161 "lock; btcq %2,%1 \n\t"
175#define __L4UTIL_BITOPS_HAVE_ARCH_BIT_SCAN_REVERSE
197#define __L4UTIL_BITOPS_HAVE_ARCH_BIT_SCAN_FORWARD
218#define __L4UTIL_BITOPS_HAVE_ARCH_FIND_FIRST_SET_BIT
220l4util_find_first_set_bit(
const void * dest,
l4_size_t size)
228 "lea -8(%%rdi),%%rdi \n\t"
229 "bsf (%%rdi),%%rax \n"
231 "sub %%rbx,%%rdi \n\t"
233 "add %%rdi,%%rax \n\t"
235 "=a" (res),
"=c" (dummy0),
"=D" (dummy1)
237 "a" (0),
"b" (dest),
"c" ((size + 63) >> 6),
"D" (dest)
244#define __L4UTIL_BITOPS_HAVE_ARCH_FIND_FIRST_ZERO_BIT
246l4util_find_first_zero_bit(
const void * dest,
l4_size_t size)
257 "xor -8(%%rdi),%%rax \n\t"
261 "sub %%rsi,%%rdi \n\t"
263 "add %%rdi,%%rdx \n\t"
265 "=a" (dummy0),
"=c" (dummy1),
"=d" (res),
"=D" (dummy2)
267 "a" (~0UL),
"c" ((size + 63) >> 6),
"d" (0),
"D" (dest),
"S" (dest)
unsigned int l4_size_t
Unsigned size type.
unsigned long l4_umword_t
Unsigned machine word.
signed long l4_mword_t
Signed machine word.
signed char l4_int8_t
Signed 8bit value.
#define L4_UNLIKELY(x)
Expression is unlikely to execute.
#define L4_INLINE
L4 Inline function attribute.
#define EXTERN_C_BEGIN
Start section with C types and functions.
#define EXTERN_C_END
End section with C types and functions.