28 #ifndef KJK_INTRIN_ARM_H_ 29 #define KJK_INTRIN_ARM_H_ 32 #error Unsupported compiler 35 #define _ReturnAddress() (__builtin_return_address(0)) 36 #define _ReadWriteBarrier() __sync_synchronize() 49 return Mask ? __builtin_clz(
Mask) : 32;
54 return Mask ? __builtin_ctz(
Mask) : 32;
65 return __sync_val_compare_and_swap(
Destination, Comperand, Exchange);
76 "swp %0, %3, [%2]\n\t" 78 "swpne %3, %0, [%2]\n\t" 81 :
"=&r" (
a),
"=&r" (
b)
82 :
"r" (
Destination),
"r" (Exchange),
"r" (Comperand)
95 "swp %2, %1, [%3]\n\t" 97 "swpne %1, %2, [%3]\n\t" 99 :
"=&r" (
a),
"=&r" (
b),
"=&r" (
c)
110 __asm__ __volatile__ (
"0:\n\t" 114 "swp %0, %3, [%2]\n\t" 116 "swpne %3, %0, [%2]\n\t" 119 :
"=&r" (
a),
"=&r" (
b)
120 :
"r" (
dest),
"r" (exch),
"r" (comp)
147 __asm__ __volatile__ (
"0:\n\t" 150 "swp %2, %1, [%3]\n\t" 152 "swpne %1, %2, [%3]\n\t" 154 :
"=&r" (
a),
"=&r" (
b),
"=&r" (
c)
155 :
"r" (
dest),
"r" (add)
165 __asm__ __volatile__ (
"swp %0, %2, [%1]" 167 :
"r" (
dest),
"r" (exch));
369 "cpsid i @ __cli" : : :
"memory",
"cc" 377 "cpsie i @ __sti" : : :
"memory",
"cc" 399 ({ ULONG __value, __arg = (a); \ 400 asm ("clz\t%0, %1": "=r" (__value): "r" (__arg)); \ __INTRIN_INLINE unsigned int _rotl(const unsigned int value, int shift)
__INTRIN_INLINE short _InterlockedAnd16(volatile short *const value, const short mask)
__INTRIN_INLINE void _enable(void)
__INTRIN_INLINE void * _InterlockedExchangePointer(void *volatile *const Target, void *const Value)
__INTRIN_INLINE short _InterlockedXor16(volatile short *const value, const short mask)
__INTRIN_INLINE long _InterlockedOr(volatile long *const value, const long mask)
__INTRIN_INLINE unsigned _CountLeadingZeros(long Mask)
GLint GLint GLint GLint GLint x
__INTRIN_INLINE void __break(unsigned int value)
__asm__("\n\t \
NewInt3Handler:\n\t \
pushl $" STR(REASON_INT3) "\n\t \
// call debugger loop\n\t \
jmp NewInt31Handler\n\t \
")
__INTRIN_INLINE char _InterlockedXor8(volatile char *const value, const char mask)
__INTRIN_INLINE char _InterlockedAnd8(volatile char *const value, const char mask)
__INTRIN_INLINE unsigned char _interlockedbittestandset(volatile long *a, const long b)
__INTRIN_INLINE long _InterlockedExchangeAdd(volatile long *const dest, const long add)
__INTRIN_INLINE long _InterlockedExchange(volatile long *const dest, const long exch)
__INTRIN_INLINE long _InterlockedIncrement16(volatile short *const lpAddend)
__INTRIN_INLINE void __yield(void)
__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void *volatile *const Destination, void *const Exchange, void *const Comperand)
__INTRIN_INLINE char _InterlockedCompareExchange8(volatile char *const Destination, const char Exchange, const char Comperand)
__INTRIN_INLINE long _InterlockedAddLargeStatistic(volatile long long *const Addend, const long Value)
__INTRIN_INLINE long _InterlockedCompareExchange(volatile long *const dest, const long exch, const long comp)
__INTRIN_INLINE short _InterlockedExchangeAdd16(volatile short *const Addend, const short Value)
__INTRIN_INLINE long long _InterlockedCompareExchange64(volatile long long *const dest, const long long exch, const long long comp)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
__INTRIN_INLINE unsigned _CountTrailingZeros(long Mask)
GLboolean GLboolean GLboolean b
__INTRIN_INLINE long _InterlockedXor(volatile long *const value, const long mask)
__INTRIN_INLINE long _InterlockedAnd(volatile long *const value, const long mask)
__INTRIN_INLINE unsigned char _BitScanReverse(unsigned long *const Index, const unsigned long Mask)
_In_ WDFCOLLECTION _In_ ULONG Index
__INTRIN_INLINE unsigned char _BitScanForward(unsigned long *const Index, const unsigned long Mask)
__INTRIN_INLINE char _InterlockedOr8(volatile char *const value, const char mask)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
__INTRIN_INLINE long _InterlockedDecrement(volatile long *const lpAddend)
__INTRIN_INLINE long _InterlockedDecrement16(volatile short *const lpAddend)
GLsizei const GLfloat * value
__INTRIN_INLINE unsigned char _interlockedbittestandreset(volatile long *a, const long b)
__INTRIN_INLINE short _InterlockedOr16(volatile short *const value, const short mask)
GLint GLint GLint GLint GLint GLint y
__INTRIN_INLINE unsigned short _byteswap_ushort(unsigned short value)
__INTRIN_INLINE short _InterlockedCompareExchange16(volatile short *const Destination, const short Exchange, const short Comperand)
__INTRIN_INLINE void _disable(void)
GLboolean GLboolean GLboolean GLboolean a
__INTRIN_INLINE long _InterlockedIncrement(volatile long *const lpAddend)