ZyanU32
static ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination,
ZyanU32 comparand, ZyanU32 value);
static ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination);
static ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination);
ZyanU32 volatile value;
ZYAN_INLINE ZYAN_DECLARE_EQUALITY_COMPARISON(ZyanEqualsNumeric32, ZyanU32)
ZYAN_INLINE ZYAN_DECLARE_COMPARISON(ZyanCompareNumeric32, ZyanU32)
ZYAN_INLINE ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination,
ZyanU32 comparand, ZyanU32 value)
return (ZyanU32)(__sync_val_compare_and_swap(&destination->value, comparand, value,
ZYAN_INLINE ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination)
return (ZyanU32)(__sync_fetch_and_add(&destination->value, 1, &destination->value)) + 1;
ZYAN_INLINE ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination)
return (ZyanU32)(__sync_sub_and_fetch(&destination->value, 1, &destination->value));
static ZYAN_INLINE ZyanU32 ZyanAtomicIncrement32(ZyanAtomic32* destination)
return (ZyanU32)(_InterlockedIncrement((volatile LONG*)&(destination->value)));
static ZYAN_INLINE ZyanU32 ZyanAtomicDecrement32(ZyanAtomic32* destination)
return (ZyanU32)(_InterlockedDecrement((volatile LONG*)&(destination->value)));
static ZYAN_INLINE ZyanU32 ZyanAtomicCompareExchange32(ZyanAtomic32* destination,
ZyanU32 comparand, ZyanU32 value)
return (ZyanU32)(_InterlockedCompareExchange((volatile LONG*)&(destination->value),
typedef ZyanU32 ZyanStatus;
ZYAN_STATIC_ASSERT(sizeof(ZyanU32 ) == 4 );
ZYAN_STATIC_ASSERT((ZyanI32)-1 >> 1 < (ZyanI32)((ZyanU32)-1 >> 1));
typedef ZyanU32 ZyanUSize;
typedef ZyanU32 ZyanUPointer;
ZyanU32 decoder_mode;
ZyanU32 offset;
typedef ZyanU32 ZydisAccessedFlagsMask;
ZyanU32 ZydisFormatterHelperGetExplicitSize(const ZydisFormatter* formatter,
const ZyanU32 bytes = ZYAN_BITSET_BITS_TO_BYTES(count);
const ZyanU32 bytes = ZYAN_BITSET_BITS_TO_BYTES(count);
(((x) == ((ZyanU32)(x))) ? (ZyanU32)(x) : ((ZyanU32)(x)) + 1)
ZyanStatus ZyanStringAppendHexU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length,
return ZyanStringAppendDecU32(string, (ZyanU32)value, padding_length);
return ZyanStringAppendHexU32(string, (ZyanU32)value, padding_length, uppercase);
ZyanStatus ZyanStringAppendDecU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length)
const ZyanU32 value_old = value;
operands[i].ptr.offset = (ZyanU32)instruction->raw.imm[0].value.u;
static const ZyanU32 decoder_modes =
ZyanU32 value;
ZyanU32 value;
ZyanU32 size = 0;
address = (ZyanU32)address;
address = (ZyanU32)address;
value = (ZyanU32)context->operand->imm.value.u;
ZyanU32 ZydisFormatterHelperGetExplicitSize(const ZydisFormatter* formatter,
address = (ZyanU32)address;
static ZyanStatus ZydisStringAppendHexU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length,
ZYAN_CHECK(ZydisStringAppendDecU32(string, (ZyanU32)value, padding_length));
ZYAN_CHECK(ZydisStringAppendHexU32(string, (ZyanU32)value, padding_length,
static ZyanStatus ZydisStringAppendDecU32(ZyanString* string, ZyanU32 value, ZyanU8 padding_length)
const ZyanU32 value_old = value;
*result_address = ((ZyanU32)runtime_address + instruction->length +
(ZyanU32)operand->mem.disp.value);