Bitdefender Hypervisor Memory Introspection
intrinsics.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define _mm_prefetch(p, i)   __builtin_prefetch(p, 0, i)
 

Functions

static uint8_t _rotl8 (uint8_t Value, uint8_t Shift)
 
static uint8_t _rotr8 (uint8_t Value, uint8_t Shift)
 
static uint16_t _rtol16 (uint16_t Value, uint8_t Shift)
 
static uint16_t _rotr16 (uint16_t Value, uint8_t Shift)
 
static uint8_t _BitScanForward (uint32_t *Index, uint32_t Mask)
 
static uint8_t _BitScanReverse (uint32_t *Index, uint32_t Mask)
 
static uint32_t _mm_popcnt_u32 (uint32_t Value)
 
static uint8_t _bittest (int32_t const *BitBase, int32_t BitPos)
 
static uint8_t _bittestandcomplement (int32_t *BitBase, int32_t BitPos)
 
static uint8_t _bittestandreset (int32_t *BitBase, int32_t BitPos)
 
static uint8_t _bittestandset (int32_t *BitBase, int32_t BitPos)
 
static uint8_t _BitScanForward64 (uint32_t *Index, uint64_t Mask)
 
static uint8_t _BitScanReverse64 (uint32_t *Index, uint64_t Mask)
 
static uint64_t _mm_popcnt_u64 (uint64_t Value)
 
static uint8_t _bittest64 (int64_t const *BitBase, int64_t BitPos)
 
static uint8_t _bittestandcomplement64 (int64_t *BitBase, int64_t BitPos)
 
static uint8_t _bittestandreset64 (int64_t *BitBase, int64_t BitPos)
 
static uint8_t _bittestandset64 (int64_t *BitBase, int64_t BitPos)
 
static void __movsb (uint8_t *dst, uint8_t const *src, size_t n)
 
static void __movsd (uint32_t *dst, uint32_t const *src, size_t n)
 
static void __movsw (uint16_t *dst, uint16_t const *src, size_t n)
 
static void __stosb (uint8_t *dst, uint8_t x, size_t n)
 
static void __stosd (uint32_t *dst, uint32_t x, size_t n)
 
static void __stosw (uint16_t *dst, uint16_t x, size_t n)
 
static void __movsq (uint64_t *dst, uint64_t const *src, size_t n)
 
static void __stosq (uint64_t *dst, uint64_t x, size_t n)
 
static void * _AddressOfReturnAddress (void)
 
static void * _ReturnAddress (void)
 
static void __cpuid (int32_t info[4], int32_t level)
 
static void __cpuidex (int32_t info[4], int32_t level, int32_t ecx)
 
static uint64_t _xgetbv (uint32_t xcr_no)
 
static void __halt (void)
 
static void _mm_pause (void)
 
static uint64_t __rdtsc (void)
 
static uint64_t __readmsr (uint32_t reg)
 
static uint64_t __readcr0 (void)
 
static uint64_t __readcr3 (void)
 
static uint64_t __readcr4 (void)
 
static uint64_t __readcr8 (void)
 
static void __writecr0 (uint64_t cr0_val)
 
static void __writecr3 (uint64_t cr3_val)
 
static void __writecr4 (uint64_t cr4_val)
 
static void __writecr8 (uint64_t cr8_val)
 
static void __invlpg (void *Address)
 
static uint8_t _interlockedbittestandset (int32_t volatile *BitBase, int32_t BitPos)
 
static uint8_t _interlockedbittestandreset (int32_t volatile *BitBase, int32_t BitPos)
 
static uint8_t _interlockedbittestandset64 (int64_t volatile *BitBase, int64_t BitPos)
 
static int8_t _InterlockedExchangeAdd8 (int8_t volatile *Addend, int8_t Value)
 
static int16_t _InterlockedExchangeAdd16 (int16_t volatile *Addend, int16_t Value)
 
static int64_t _InterlockedExchangeAdd64 (int64_t volatile *Addend, int64_t Value)
 
static int32_t _InterlockedIncrement (int32_t volatile *Value)
 
static int16_t _InterlockedIncrement16 (int16_t volatile *Value)
 
static int64_t _InterlockedIncrement64 (int64_t volatile *Value)
 
static int32_t _InterlockedDecrement (int32_t volatile *Value)
 
static int16_t _InterlockedDecrement16 (int16_t volatile *Value)
 
static int64_t _InterlockedDecrement64 (int64_t volatile *Value)
 
static int8_t _InterlockedAnd8 (int8_t volatile *Value, int8_t Mask)
 
static int16_t _InterlockedAnd16 (int16_t volatile *Value, int16_t Mask)
 
static int32_t _InterlockedAnd (int32_t volatile *Value, int32_t Mask)
 
static int64_t _InterlockedAnd64 (int64_t volatile *Value, int64_t Mask)
 
static int8_t _InterlockedOr8 (int8_t volatile *Value, int8_t Mask)
 
static int16_t _InterlockedOr16 (int16_t volatile *Value, int16_t Mask)
 
static int32_t _InterlockedOr (int32_t volatile *Value, int32_t Mask)
 
static int64_t _InterlockedOr64 (int64_t volatile *Value, int64_t Mask)
 
static int8_t _InterlockedXor8 (int8_t volatile *Value, int8_t Mask)
 
static int16_t _InterlockedXor16 (int16_t volatile *Value, int16_t Mask)
 
static int32_t _InterlockedXor (int32_t volatile *Value, int32_t Mask)
 
static int64_t _InterlockedXor64 (int64_t volatile *Value, int64_t Mask)
 
static int32_t _InterlockedExchange (int32_t volatile *Target, int32_t Value)
 
static int8_t _InterlockedExchange8 (int8_t volatile *Target, int8_t Value)
 
static int16_t _InterlockedExchange16 (int16_t volatile *Target, int16_t Value)
 
static int64_t _InterlockedExchange64 (int64_t volatile *Target, int64_t Value)
 
static int8_t _InterlockedCompareExchange8 (int8_t volatile *Destination, int8_t Exchange, int8_t Comparand)
 
static int16_t _InterlockedCompareExchange16 (int16_t volatile *Destination, int16_t Exchange, int16_t Comparand)
 
static int32_t _InterlockedCompareExchange (int32_t volatile *Destination, int32_t Exchange, int32_t Comparand)
 
static int64_t _InterlockedCompareExchange64 (int64_t volatile *Destination, int64_t Exchange, int64_t Comparand)
 
static void * _InterlockedCompareExchangePointer (void volatile **Destination, void *Exchange, void *Comparand)
 
static void _ReadWriteBarrier (void)
 
static void _ReadBarrier (void)
 
static void _WriteBarrier (void)
 
static void __faststorefence (void)
 

Macro Definition Documentation

◆ _mm_prefetch

#define _mm_prefetch (   p,
 
)    __builtin_prefetch(p, 0, i)

Function Documentation

◆ __cpuid()

static void __cpuid ( int32_t  info[4],
int32_t  level 
)
inlinestatic

Definition at line 263 of file intrinsics.h.

Referenced by IsSse42Supported().

◆ __cpuidex()

static void __cpuidex ( int32_t  info[4],
int32_t  level,
int32_t  ecx 
)
inlinestatic

Definition at line 270 of file intrinsics.h.

Referenced by IntDecGetSetSseRegValue().

◆ __faststorefence()

static void __faststorefence ( void  )
inlinestatic

Definition at line 666 of file intrinsics.h.

◆ __halt()

static void __halt ( void  )
inlinestatic

Definition at line 285 of file intrinsics.h.

◆ __invlpg()

static void __invlpg ( void *  Address)
inlinestatic

Definition at line 389 of file intrinsics.h.

Referenced by IntPhysMemFastMap(), and IntPhysMemUnmap().

◆ __movsb()

static void __movsb ( uint8_t *  dst,
uint8_t const *  src,
size_t  n 
)
inlinestatic

Definition at line 200 of file intrinsics.h.

Referenced by nd_memset().

◆ __movsd()

static void __movsd ( uint32_t *  dst,
uint32_t const *  src,
size_t  n 
)
inlinestatic

Definition at line 206 of file intrinsics.h.

◆ __movsq()

static void __movsq ( uint64_t *  dst,
uint64_t const *  src,
size_t  n 
)
inlinestatic

Definition at line 236 of file intrinsics.h.

◆ __movsw()

static void __movsw ( uint16_t *  dst,
uint16_t const *  src,
size_t  n 
)
inlinestatic

Definition at line 212 of file intrinsics.h.

◆ __rdtsc()

◆ __readcr0()

static uint64_t __readcr0 ( void  )
inlinestatic

Definition at line 333 of file intrinsics.h.

◆ __readcr3()

static uint64_t __readcr3 ( void  )
inlinestatic

Definition at line 341 of file intrinsics.h.

◆ __readcr4()

static uint64_t __readcr4 ( void  )
inlinestatic

Definition at line 349 of file intrinsics.h.

◆ __readcr8()

static uint64_t __readcr8 ( void  )
inlinestatic

Definition at line 357 of file intrinsics.h.

◆ __readmsr()

static uint64_t __readmsr ( uint32_t  reg)
inlinestatic

Definition at line 318 of file intrinsics.h.

Referenced by IntLbrRead(), and IntLerRead().

◆ __stosb()

static void __stosb ( uint8_t *  dst,
uint8_t  x,
size_t  n 
)
inlinestatic

Definition at line 218 of file intrinsics.h.

Referenced by nd_memset().

◆ __stosd()

static void __stosd ( uint32_t *  dst,
uint32_t  x,
size_t  n 
)
inlinestatic

Definition at line 224 of file intrinsics.h.

◆ __stosq()

static void __stosq ( uint64_t *  dst,
uint64_t  x,
size_t  n 
)
inlinestatic

Definition at line 242 of file intrinsics.h.

◆ __stosw()

static void __stosw ( uint16_t *  dst,
uint16_t  x,
size_t  n 
)
inlinestatic

Definition at line 230 of file intrinsics.h.

◆ __writecr0()

static void __writecr0 ( uint64_t  cr0_val)
inlinestatic

Definition at line 365 of file intrinsics.h.

◆ __writecr3()

static void __writecr3 ( uint64_t  cr3_val)
inlinestatic

Definition at line 371 of file intrinsics.h.

◆ __writecr4()

static void __writecr4 ( uint64_t  cr4_val)
inlinestatic

Definition at line 377 of file intrinsics.h.

◆ __writecr8()

static void __writecr8 ( uint64_t  cr8_val)
inlinestatic

Definition at line 383 of file intrinsics.h.

◆ _AddressOfReturnAddress()

static void* _AddressOfReturnAddress ( void  )
inlinestatic

Definition at line 251 of file intrinsics.h.

◆ _BitScanForward()

static uint8_t _BitScanForward ( uint32_t *  Index,
uint32_t  Mask 
)
inlinestatic

Definition at line 49 of file intrinsics.h.

◆ _BitScanForward64()

static uint8_t _BitScanForward64 ( uint32_t *  Index,
uint64_t  Mask 
)
inlinestatic

Definition at line 104 of file intrinsics.h.

Referenced by BitMaskScanForward(), and IntPhysMemFastMap().

◆ _BitScanReverse()

static uint8_t _BitScanReverse ( uint32_t *  Index,
uint32_t  Mask 
)
inlinestatic

Definition at line 58 of file intrinsics.h.

◆ _BitScanReverse64()

static uint8_t _BitScanReverse64 ( uint32_t *  Index,
uint64_t  Mask 
)
inlinestatic

Definition at line 113 of file intrinsics.h.

◆ _bittest()

static uint8_t _bittest ( int32_t const *  BitBase,
int32_t  BitPos 
)
inlinestatic

Definition at line 73 of file intrinsics.h.

◆ _bittest64()

static uint8_t _bittest64 ( int64_t const *  BitBase,
int64_t  BitPos 
)
inlinestatic

Definition at line 128 of file intrinsics.h.

◆ _bittestandcomplement()

static uint8_t _bittestandcomplement ( int32_t *  BitBase,
int32_t  BitPos 
)
inlinestatic

Definition at line 79 of file intrinsics.h.

◆ _bittestandcomplement64()

static uint8_t _bittestandcomplement64 ( int64_t *  BitBase,
int64_t  BitPos 
)
inlinestatic

Definition at line 134 of file intrinsics.h.

◆ _bittestandreset()

static uint8_t _bittestandreset ( int32_t *  BitBase,
int32_t  BitPos 
)
inlinestatic

Definition at line 87 of file intrinsics.h.

◆ _bittestandreset64()

static uint8_t _bittestandreset64 ( int64_t *  BitBase,
int64_t  BitPos 
)
inlinestatic

Definition at line 142 of file intrinsics.h.

◆ _bittestandset()

static uint8_t _bittestandset ( int32_t *  BitBase,
int32_t  BitPos 
)
inlinestatic

Definition at line 95 of file intrinsics.h.

◆ _bittestandset64()

static uint8_t _bittestandset64 ( int64_t *  BitBase,
int64_t  BitPos 
)
inlinestatic

Definition at line 150 of file intrinsics.h.

Referenced by DbgVaSpaceIterationCallbackCount().

◆ _InterlockedAnd()

static int32_t _InterlockedAnd ( int32_t volatile *  Value,
int32_t  Mask 
)
inlinestatic

Definition at line 499 of file intrinsics.h.

◆ _InterlockedAnd16()

static int16_t _InterlockedAnd16 ( int16_t volatile *  Value,
int16_t  Mask 
)
inlinestatic

Definition at line 493 of file intrinsics.h.

◆ _InterlockedAnd64()

static int64_t _InterlockedAnd64 ( int64_t volatile *  Value,
int64_t  Mask 
)
inlinestatic

Definition at line 505 of file intrinsics.h.

◆ _InterlockedAnd8()

static int8_t _InterlockedAnd8 ( int8_t volatile *  Value,
int8_t  Mask 
)
inlinestatic

Definition at line 487 of file intrinsics.h.

◆ _interlockedbittestandreset()

static uint8_t _interlockedbittestandreset ( int32_t volatile *  BitBase,
int32_t  BitPos 
)
inlinestatic

Definition at line 402 of file intrinsics.h.

◆ _interlockedbittestandset()

static uint8_t _interlockedbittestandset ( int32_t volatile *  BitBase,
int32_t  BitPos 
)
inlinestatic

Definition at line 395 of file intrinsics.h.

◆ _interlockedbittestandset64()

static uint8_t _interlockedbittestandset64 ( int64_t volatile *  BitBase,
int64_t  BitPos 
)
inlinestatic

Definition at line 409 of file intrinsics.h.

◆ _InterlockedCompareExchange()

static int32_t _InterlockedCompareExchange ( int32_t volatile *  Destination,
int32_t  Exchange,
int32_t  Comparand 
)
inlinestatic

Definition at line 619 of file intrinsics.h.

Referenced by IntDecAtomicStore().

◆ _InterlockedCompareExchange16()

static int16_t _InterlockedCompareExchange16 ( int16_t volatile *  Destination,
int16_t  Exchange,
int16_t  Comparand 
)
inlinestatic

Definition at line 611 of file intrinsics.h.

Referenced by IntDecAtomicStore(), and IntWinPfnModifyRefCount().

◆ _InterlockedCompareExchange64()

static int64_t _InterlockedCompareExchange64 ( int64_t volatile *  Destination,
int64_t  Exchange,
int64_t  Comparand 
)
inlinestatic

◆ _InterlockedCompareExchange8()

static int8_t _InterlockedCompareExchange8 ( int8_t volatile *  Destination,
int8_t  Exchange,
int8_t  Comparand 
)
inlinestatic

◆ _InterlockedCompareExchangePointer()

static void* _InterlockedCompareExchangePointer ( void volatile **  Destination,
void *  Exchange,
void *  Comparand 
)
inlinestatic

Definition at line 635 of file intrinsics.h.

◆ _InterlockedDecrement()

static int32_t _InterlockedDecrement ( int32_t volatile *  Value)
inlinestatic

Definition at line 465 of file intrinsics.h.

◆ _InterlockedDecrement16()

static int16_t _InterlockedDecrement16 ( int16_t volatile *  Value)
inlinestatic

Definition at line 471 of file intrinsics.h.

◆ _InterlockedDecrement64()

static int64_t _InterlockedDecrement64 ( int64_t volatile *  Value)
inlinestatic

Definition at line 477 of file intrinsics.h.

◆ _InterlockedExchange()

static int32_t _InterlockedExchange ( int32_t volatile *  Target,
int32_t  Value 
)
inlinestatic

Definition at line 571 of file intrinsics.h.

Referenced by IntWinHalHandleDispatchTableWrite().

◆ _InterlockedExchange16()

static int16_t _InterlockedExchange16 ( int16_t volatile *  Target,
int16_t  Value 
)
inlinestatic

Definition at line 585 of file intrinsics.h.

◆ _InterlockedExchange64()

static int64_t _InterlockedExchange64 ( int64_t volatile *  Target,
int64_t  Value 
)
inlinestatic

Definition at line 592 of file intrinsics.h.

Referenced by IntWinHalHandleDispatchTableWrite().

◆ _InterlockedExchange8()

static int8_t _InterlockedExchange8 ( int8_t volatile *  Target,
int8_t  Value 
)
inlinestatic

Definition at line 578 of file intrinsics.h.

◆ _InterlockedExchangeAdd16()

static int16_t _InterlockedExchangeAdd16 ( int16_t volatile *  Addend,
int16_t  Value 
)
inlinestatic

Definition at line 426 of file intrinsics.h.

◆ _InterlockedExchangeAdd64()

static int64_t _InterlockedExchangeAdd64 ( int64_t volatile *  Addend,
int64_t  Value 
)
inlinestatic

Definition at line 433 of file intrinsics.h.

◆ _InterlockedExchangeAdd8()

static int8_t _InterlockedExchangeAdd8 ( int8_t volatile *  Addend,
int8_t  Value 
)
inlinestatic

Definition at line 420 of file intrinsics.h.

◆ _InterlockedIncrement()

static int32_t _InterlockedIncrement ( int32_t volatile *  Value)
inlinestatic

Definition at line 443 of file intrinsics.h.

◆ _InterlockedIncrement16()

static int16_t _InterlockedIncrement16 ( int16_t volatile *  Value)
inlinestatic

Definition at line 449 of file intrinsics.h.

◆ _InterlockedIncrement64()

static int64_t _InterlockedIncrement64 ( int64_t volatile *  Value)
inlinestatic

Definition at line 455 of file intrinsics.h.

◆ _InterlockedOr()

static int32_t _InterlockedOr ( int32_t volatile *  Value,
int32_t  Mask 
)
inlinestatic

Definition at line 527 of file intrinsics.h.

◆ _InterlockedOr16()

static int16_t _InterlockedOr16 ( int16_t volatile *  Value,
int16_t  Mask 
)
inlinestatic

Definition at line 521 of file intrinsics.h.

◆ _InterlockedOr64()

static int64_t _InterlockedOr64 ( int64_t volatile *  Value,
int64_t  Mask 
)
inlinestatic

Definition at line 533 of file intrinsics.h.

◆ _InterlockedOr8()

static int8_t _InterlockedOr8 ( int8_t volatile *  Value,
int8_t  Mask 
)
inlinestatic

Definition at line 515 of file intrinsics.h.

◆ _InterlockedXor()

static int32_t _InterlockedXor ( int32_t volatile *  Value,
int32_t  Mask 
)
inlinestatic

Definition at line 555 of file intrinsics.h.

◆ _InterlockedXor16()

static int16_t _InterlockedXor16 ( int16_t volatile *  Value,
int16_t  Mask 
)
inlinestatic

Definition at line 549 of file intrinsics.h.

◆ _InterlockedXor64()

static int64_t _InterlockedXor64 ( int64_t volatile *  Value,
int64_t  Mask 
)
inlinestatic

Definition at line 561 of file intrinsics.h.

◆ _InterlockedXor8()

static int8_t _InterlockedXor8 ( int8_t volatile *  Value,
int8_t  Mask 
)
inlinestatic

Definition at line 543 of file intrinsics.h.

◆ _mm_pause()

static void _mm_pause ( void  )
inlinestatic

Definition at line 300 of file intrinsics.h.

◆ _mm_popcnt_u32()

static uint32_t _mm_popcnt_u32 ( uint32_t  Value)
inlinestatic

Definition at line 67 of file intrinsics.h.

◆ _mm_popcnt_u64()

static uint64_t _mm_popcnt_u64 ( uint64_t  Value)
inlinestatic

Definition at line 122 of file intrinsics.h.

◆ _ReadBarrier()

static void _ReadBarrier ( void  )
inlinestatic

Definition at line 653 of file intrinsics.h.

◆ _ReadWriteBarrier()

static void _ReadWriteBarrier ( void  )
inlinestatic

Definition at line 646 of file intrinsics.h.

◆ _ReturnAddress()

static void* _ReturnAddress ( void  )
inlinestatic

Definition at line 257 of file intrinsics.h.

◆ _rotl8()

static uint8_t _rotl8 ( uint8_t  Value,
uint8_t  Shift 
)
inlinestatic

Definition at line 17 of file intrinsics.h.

◆ _rotr16()

static uint16_t _rotr16 ( uint16_t  Value,
uint8_t  Shift 
)
inlinestatic

Definition at line 38 of file intrinsics.h.

◆ _rotr8()

static uint8_t _rotr8 ( uint8_t  Value,
uint8_t  Shift 
)
inlinestatic

Definition at line 24 of file intrinsics.h.

◆ _rtol16()

static uint16_t _rtol16 ( uint16_t  Value,
uint8_t  Shift 
)
inlinestatic

Definition at line 31 of file intrinsics.h.

◆ _WriteBarrier()

static void _WriteBarrier ( void  )
inlinestatic

Definition at line 660 of file intrinsics.h.

◆ _xgetbv()

static uint64_t _xgetbv ( uint32_t  xcr_no)
inlinestatic

Definition at line 277 of file intrinsics.h.