ReactOS 0.4.15-dev-8102-g108db8f
intrin.h File Reference
#include <crtdefs.h>
#include <setjmp.h>
#include <stddef.h>
Include dependency graph for intrin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __INTRIN_H_
 

Functions

void_AddressOfReturnAddress (void)
 
unsigned char _BitScanForward (unsigned long *_Index, unsigned long _Mask)
 
unsigned char _BitScanReverse (unsigned long *_Index, unsigned long _Mask)
 
long _InterlockedAnd (_Interlocked_operand_ long volatile *_Value, long _Mask)
 
short _InterlockedAnd16 (_Interlocked_operand_ short volatile *_Value, short _Mask)
 
char _InterlockedAnd8 (_Interlocked_operand_ char volatile *_Value, char _Mask)
 
long __cdecl _InterlockedCompareExchange (_Interlocked_operand_ long volatile *_Destination, long _Exchange, long _Comparand)
 
short _InterlockedCompareExchange16 (_Interlocked_operand_ short volatile *_Destination, short _Exchange, short _Comparand)
 
__int64 _InterlockedCompareExchange64 (_Interlocked_operand_ __int64 volatile *_Destination, __int64 _Exchange, __int64 _Comparand)
 
char _InterlockedCompareExchange8 (_Interlocked_operand_ char volatile *_Destination, char _Exchange, char _Comparand)
 
void_InterlockedCompareExchangePointer (_Interlocked_operand_ void *volatile *_Destination, void *_Exchange, void *_Comparand)
 
long __cdecl _InterlockedDecrement (_Interlocked_operand_ long volatile *_Addend)
 
short _InterlockedDecrement16 (_Interlocked_operand_ short volatile *_Addend)
 
long __cdecl _InterlockedExchange (_Interlocked_operand_ long volatile *_Target, long _Value)
 
short _InterlockedExchange16 (_Interlocked_operand_ short volatile *_Target, short _Value)
 
char _InterlockedExchange8 (_Interlocked_operand_ char volatile *_Target, char _Value)
 
long __cdecl _InterlockedExchangeAdd (_Interlocked_operand_ long volatile *_Addend, long _Value)
 
short _InterlockedExchangeAdd16 (_Interlocked_operand_ short volatile *_Addend, short _Value)
 
char _InterlockedExchangeAdd8 (_Interlocked_operand_ char volatile *_Addend, char _Value)
 
void_InterlockedExchangePointer (_Interlocked_operand_ void *volatile *_Target, void *_Value)
 
long __cdecl _InterlockedIncrement (_Interlocked_operand_ long volatile *_Addend)
 
short _InterlockedIncrement16 (_Interlocked_operand_ short volatile *_Addend)
 
long _InterlockedOr (_Interlocked_operand_ long volatile *_Value, long _Mask)
 
short _InterlockedOr16 (_Interlocked_operand_ short volatile *_Value, short _Mask)
 
char _InterlockedOr8 (_Interlocked_operand_ char volatile *_Value, char _Mask)
 
long _InterlockedXor (_Interlocked_operand_ long volatile *_Value, long _Mask)
 
short _InterlockedXor16 (_Interlocked_operand_ short volatile *_Value, short _Mask)
 
char _InterlockedXor8 (_Interlocked_operand_ char volatile *_Value, char _Mask)
 
void _ReadBarrier (void)
 
void _ReadWriteBarrier (void)
 
void_ReturnAddress (void)
 
void _WriteBarrier (void)
 
void __code_seg (const char *)
 
void __cdecl __debugbreak (void)
 
 __declspec (noreturn) void __fastfail(unsigned int)
 
void __nop (void)
 
__int64 __cdecl _abs64 (__int64)
 
unsigned char _bittest (long const *, long)
 
unsigned char _bittestandcomplement (long *, long)
 
unsigned char _bittestandreset (long *, long)
 
unsigned char _bittestandset (long *, long)
 
_Check_return_ unsigned __int64 __cdecl _byteswap_uint64 (_In_ unsigned __int64)
 
_Check_return_ unsigned long __cdecl _byteswap_ulong (_In_ unsigned long)
 
_Check_return_ unsigned short __cdecl _byteswap_ushort (_In_ unsigned short)
 
void __cdecl _disable (void)
 
void __cdecl _enable (void)
 
unsigned char _interlockedbittestandreset (long volatile *, long)
 
unsigned char _interlockedbittestandset (long volatile *, long)
 
_Check_return_ unsigned long __cdecl _lrotl (_In_ unsigned long, _In_ int)
 
_Check_return_ unsigned long __cdecl _lrotr (_In_ unsigned long, _In_ int)
 
_Check_return_ unsigned int __cdecl _rotl (_In_ unsigned int _Value, _In_ int _Shift)
 
_Check_return_ unsigned short __cdecl _rotl16 (_In_ unsigned short _Value, _In_ unsigned char _Shift)
 
_Check_return_ unsigned __int64 __cdecl _rotl64 (_In_ unsigned __int64 _Value, _In_ int _Shift)
 
_Check_return_ unsigned char __cdecl _rotl8 (_In_ unsigned char _Value, _In_ unsigned char _Shift)
 
_Check_return_ unsigned int __cdecl _rotr (_In_ unsigned int _Value, _In_ int _Shift)
 
_Check_return_ unsigned short __cdecl _rotr16 (_In_ unsigned short _Value, _In_ unsigned char _Shift)
 
_Check_return_ unsigned __int64 __cdecl _rotr64 (_In_ unsigned __int64 _Value, _In_ int _Shift)
 
_Check_return_ unsigned char __cdecl _rotr8 (_In_ unsigned char _Value, _In_ unsigned char _Shift)
 

Macro Definition Documentation

◆ __INTRIN_H_

#define __INTRIN_H_

Definition at line 3 of file intrin.h.

Function Documentation

◆ __code_seg()

void __code_seg ( const char )

◆ __debugbreak()

◆ __declspec()

__declspec ( noreturn  )

Definition at line 19 of file noreturn.cpp.

21{
22 throw 1;
23}

◆ __nop()

void __nop ( void  )

Definition at line 2042 of file intrin_x86.h.

2043{
2044 __asm__ __volatile__("nop");
2045}
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")

Referenced by HalpRead8254Value().

◆ _abs64()

__int64 __cdecl _abs64 ( __int64  )

◆ _AddressOfReturnAddress()

void * _AddressOfReturnAddress ( void  )

◆ _BitScanForward()

unsigned char _BitScanForward ( unsigned long _Index,
unsigned long  _Mask 
)

Definition at line 57 of file intrin_arm.h.

58{
59 *Index = __builtin_ctz(Mask);
60 return Mask ? 1 : 0;
61}
unsigned int Mask
Definition: fpcontrol.c:82
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by GetBestRoute(), MmMakeSegmentResident(), and NvNetAddWakeUpPattern().

◆ _BitScanReverse()

unsigned char _BitScanReverse ( unsigned long _Index,
unsigned long  _Mask 
)

Definition at line 180 of file intrin_arm.h.

181{
182 *Index = 31 - __builtin_clz(Mask);
183 return Mask ? 1 : 0;
184}

Referenced by BIT_highbit32(), MediaGprNextMedia(), MediaInitDefaultMedia(), and ZSTD_highbit32().

◆ _bittest()

unsigned char _bittest ( long const a,
long  b 
)

Definition at line 464 of file intrin_ppc.h.

465{
466 return ((*a) & (1<<b)) != 0;
467}
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ _bittestandcomplement()

unsigned char _bittestandcomplement ( long a,
long  b 
)

Definition at line 469 of file intrin_ppc.h.

470{
471 unsigned char ret = ((*a) & (1<<b)) != 0;
472 (*a) ^= (1<<b);
473 return ret;
474}
#define b
Definition: ke_i.h:79
int ret

◆ _bittestandreset()

unsigned char _bittestandreset ( long a,
long  b 
)

Definition at line 476 of file intrin_ppc.h.

477{
478 unsigned char ret = ((*a) & (1<<b)) != 0;
479 (*a) &= ~(1<<b);
480 return ret;
481}

◆ _bittestandset()

unsigned char _bittestandset ( long a,
long  b 
)

Definition at line 483 of file intrin_ppc.h.

484{
485 unsigned char ret = ((*a) & (1<<b)) != 0;
486 (*a) |= (1<<b);
487 return ret;
488}

◆ _byteswap_uint64()

_Check_return_ unsigned __int64 __cdecl _byteswap_uint64 ( _In_ unsigned  __int64)

Referenced by RtlUlonglongByteSwap().

◆ _byteswap_ulong()

◆ _byteswap_ushort()

◆ _disable()

void __cdecl _disable ( void  )

Definition at line 365 of file intrin_arm.h.

366{
367 __asm__ __volatile__
368 (
369 "cpsid i @ __cli" : : : "memory", "cc"
370 );
371}

Referenced by _HalpApcInterruptHandler(), _HalpDispatchInterruptHandler(), _Requires_lock_not_held_(), acpi_suspend(), ApicRequestGlobalInterrupt(), ApicRequestSelfInterrupt(), ArchSwitchContext(), BlpArchEnableTranslation(), CloseBitPlane(), ExAcquireResourceLock(), FrLdrBugCheckEx(), FrLdrBugCheckWithMessage(), HalCalibratePerformanceCounter(), HalDisableSystemInterrupt(), HalEnableSystemInterrupt(), HaliHaltSystem(), HalpAcquireCmosSpinLock(), HalpApcInterruptHandler(), HalpBiosDisplayReset(), HalpDispatchInterruptHandler(), HalpFlushTLB(), HalpFreezeSystem(), HalpInitializeClock(), HalpInitializePICs(), HalpInitializeTsc(), HalpLowerIrql(), HalpReboot(), HalpSetTimerRollOver(), HalpXboxPowerAction(), HalRequestSoftwareInterrupt(), KdbEnterDebuggerException(), KdbpCliInit(), KeBugCheckWithTf(), KeDisableInterrupts(), KeEnterKernelDebugger(), KeGetCurrentIrql(), KeRestoreFloatingPointState(), KeSaveFloatingPointState(), KeSetCurrentIrql(), KfLowerIrql(), KfRaiseIrql(), Ki386AdjustEsp0(), Ki386VdmEnablePentiumExtentions(), KiApcInterrupt(), KiCheckForApcDelivery(), KiCommonExit(), KiDispatchExceptionToUser(), KiDispatchInterrupt(), KiEndInterrupt(), KiEnterV86Mode(), KiExitInterrupt(), KiExitSystemCallDebugChecks(), KiExitV86Trap(), KiFlushNPXState(), KiI386PentiumLockErrataFixup(), KiIdleLoop(), KiPrepareUserDebugData(), KiRetireDpcList(), KiSwapContextEntry(), KiSwitchKernelStack(), KiSystemService(), KiTimerExpiration(), KiTrap02Handler(), KiTrap06Handler(), KiTrap07Handler(), KiTrap08Handler(), KiTrap0DHandler(), KiUserModeCallout(), MachInit(), MpsTimerHandler(), NtCallbackReturn(), OpenBitPlane(), PopShutdownHandler(), sb16_play(), ScrAcquireOwnership(), ScrSetCursor(), ScrSetCursorShape(), and WinLdrSetProcessorContext().

◆ _enable()

void __cdecl _enable ( void  )

Definition at line 373 of file intrin_arm.h.

374{
375 __asm__ __volatile__
376 (
377 "cpsie i @ __sti" : : : "memory", "cc"
378 );
379}

Referenced by _HalpApcInterruptHandler(), _HalpDismissIrqGeneric(), _HalpDismissIrqLevel(), _HalpDispatchInterruptHandler(), _Requires_lock_not_held_(), acpi_suspend(), ApicRequestGlobalInterrupt(), ApicRequestSelfInterrupt(), ArchSwitchContext(), CloseBitPlane(), ExpInitializeExecutive(), ExReleaseResourceLock(), HalBeginSystemInterrupt(), HalDisableSystemInterrupt(), HalEnableSystemInterrupt(), HalpApcInterruptHandler(), HalpDispatchInterruptHandler(), HalpInitializeTsc(), HalpLowerIrql(), HalProcessorIdle(), KeGetCurrentIrql(), KeRemoveQueueDpc(), KeRestoreFloatingPointState(), KeRestoreInterrupts(), KeSaveFloatingPointState(), KeSetCurrentIrql(), KfLowerIrql(), KfRaiseIrql(), KiApcInterrupt(), KiCheckForApcDelivery(), KiDebugHandler(), KiDispatchExceptionToUser(), KiDispatchInterrupt(), KiEnterV86Mode(), KiExitV86Mode(), KiExitV86Trap(), KiI386PentiumLockErrataFixup(), KiIdleLoop(), KiInitializeSystem(), KiInterruptHandler(), KiNpxHandler(), KiPrepareUserDebugData(), KiRetireDpcList(), KiSwapContextEntry(), KiSystemCallHandler(), KiSystemService(), KiSystemServiceHandler(), KiSystemStartupBootStack(), KiTimerExpiration(), KiTrap00Handler(), KiTrap01Handler(), KiTrap04Handler(), KiTrap05Handler(), KiTrap06Handler(), KiTrap07Handler(), KiTrap09Handler(), KiTrap0DHandler(), KiTrap0EHandler(), KiTrap10Handler(), KiTrap11Handler(), KiTrap13Handler(), KiUserModeCallout(), MpsTimerHandler(), NtCallbackReturn(), OpenBitPlane(), sb16_play(), ScrAcquireOwnership(), ScrSetCursor(), and ScrSetCursorShape().

◆ _InterlockedAnd()

long _InterlockedAnd ( _Interlocked_operand_ long volatile _Value,
long  _Mask 
)

◆ _InterlockedAnd16()

short _InterlockedAnd16 ( _Interlocked_operand_ short volatile _Value,
short  _Mask 
)

◆ _InterlockedAnd8()

char _InterlockedAnd8 ( _Interlocked_operand_ char volatile _Value,
char  _Mask 
)

◆ _interlockedbittestandreset()

unsigned char _interlockedbittestandreset ( long volatile a,
long  b 
)

Definition at line 386 of file intrin_arm.h.

387{
388 return (_InterlockedAnd(a, ~(1 << b)) >> b) & 1;
389}
volatile char *const const char modify _InterlockedAnd
Definition: intrin_ppc.h:267

◆ _interlockedbittestandset()

unsigned char _interlockedbittestandset ( long volatile a,
long  b 
)

Definition at line 381 of file intrin_arm.h.

382{
383 return (_InterlockedOr(a, 1 << b) >> b) & 1;
384}
__INTRIN_INLINE long _InterlockedOr(volatile long *const value, const long mask)
Definition: intrin_arm.h:271

◆ _InterlockedCompareExchange()

◆ _InterlockedCompareExchange16()

short _InterlockedCompareExchange16 ( _Interlocked_operand_ short volatile _Destination,
short  _Exchange,
short  _Comparand 
)

◆ _InterlockedCompareExchange64()

__int64 _InterlockedCompareExchange64 ( _Interlocked_operand_ __int64 volatile _Destination,
__int64  _Exchange,
__int64  _Comparand 
)

◆ _InterlockedCompareExchange8()

char _InterlockedCompareExchange8 ( _Interlocked_operand_ char volatile _Destination,
char  _Exchange,
char  _Comparand 
)

◆ _InterlockedCompareExchangePointer()

void * _InterlockedCompareExchangePointer ( _Interlocked_operand_ void *volatile _Destination,
void _Exchange,
void _Comparand 
)

Referenced by _CrtGetMessageBox(), and _CrtGetUser32().

◆ _InterlockedDecrement()

◆ _InterlockedDecrement16()

short _InterlockedDecrement16 ( _Interlocked_operand_ short volatile _Addend)

◆ _InterlockedExchange()

◆ _InterlockedExchange16()

short _InterlockedExchange16 ( _Interlocked_operand_ short volatile _Target,
short  _Value 
)

Referenced by GetSelectionBeginEnd().

◆ _InterlockedExchange8()

char _InterlockedExchange8 ( _Interlocked_operand_ char volatile _Target,
char  _Value 
)

Referenced by ClientThreadSetupHelper().

◆ _InterlockedExchangeAdd()

◆ _InterlockedExchangeAdd16()

short _InterlockedExchangeAdd16 ( _Interlocked_operand_ short volatile _Addend,
short  _Value 
)

◆ _InterlockedExchangeAdd8()

char _InterlockedExchangeAdd8 ( _Interlocked_operand_ char volatile _Addend,
char  _Value 
)

◆ _InterlockedExchangePointer()

void * _InterlockedExchangePointer ( _Interlocked_operand_ void *volatile _Target,
void _Value 
)

◆ _InterlockedIncrement()

◆ _InterlockedIncrement16()

short _InterlockedIncrement16 ( _Interlocked_operand_ short volatile _Addend)

◆ _InterlockedOr()

long _InterlockedOr ( _Interlocked_operand_ long volatile _Value,
long  _Mask 
)

Referenced by MiniportISR().

◆ _InterlockedOr16()

short _InterlockedOr16 ( _Interlocked_operand_ short volatile _Value,
short  _Mask 
)

◆ _InterlockedOr8()

char _InterlockedOr8 ( _Interlocked_operand_ char volatile _Value,
char  _Mask 
)

◆ _InterlockedXor()

long _InterlockedXor ( _Interlocked_operand_ long volatile _Value,
long  _Mask 
)

◆ _InterlockedXor16()

short _InterlockedXor16 ( _Interlocked_operand_ short volatile _Value,
short  _Mask 
)

◆ _InterlockedXor8()

char _InterlockedXor8 ( _Interlocked_operand_ char volatile _Value,
char  _Mask 
)

◆ _lrotl()

◆ _lrotr()

◆ _ReadBarrier()

void _ReadBarrier ( void  )

◆ _ReadWriteBarrier()

void _ReadWriteBarrier ( void  )

Definition at line 88 of file intrin_x86.h.

89{
90 __asm__ __volatile__("" : : : "memory");
91}

◆ _ReturnAddress()

void * _ReturnAddress ( void  )

◆ _rotl()

◆ _rotl16()

Referenced by MmArchInitialize().

◆ _rotl64()

_Check_return_ unsigned __int64 __cdecl _rotl64 ( _In_ unsigned __int64  _Value,
_In_ int  _Shift 
)

◆ _rotl8()

◆ _rotr()

_Check_return_ unsigned int __cdecl _rotr ( _In_ unsigned int  _Value,
_In_ int  _Shift 
)

◆ _rotr16()

◆ _rotr64()

_Check_return_ unsigned __int64 __cdecl _rotr64 ( _In_ unsigned __int64  _Value,
_In_ int  _Shift 
)

◆ _rotr8()

Referenced by BltMask().

◆ _WriteBarrier()

void _WriteBarrier ( void  )