clang 20.0.0git
|
Go to the source code of this file.
Macros | |
#define | __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) |
#define | __DEFAULT_FN_ATTRS_CRC32 __attribute__((__always_inline__, __nodebug__, __target__("crc32"))) |
#define | __DEFAULT_FN_ATTRS_CAST __attribute__((__always_inline__)) |
#define | __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS |
#define | _bit_scan_forward(A) __bsfd((A)) |
Finds the first set bit starting from the least significant bit. | |
#define | _bit_scan_reverse(A) __bsrd((A)) |
Finds the first set bit starting from the most significant bit. | |
#define | _popcnt32(A) __popcntd((A)) |
Counts the number of bits in the source operand having a value of 1. | |
#define | _rdtsc() __rdtsc() |
Reads the processor's time-stamp counter. | |
#define | _rdpmc(A) __rdpmc(A) |
Reads the specified performance monitoring counter. | |
#define | _lrotl(a, b) __rold((a), (b)) |
Rotates a 32-bit value to the left by the specified number of bits. | |
#define | _lrotr(a, b) __rord((a), (b)) |
Rotates a 32-bit value to the right by the specified number of bits. | |
#define | _rotl(a, b) __rold((a), (b)) |
Rotates a 32-bit value to the left by the specified number of bits. | |
#define | _rotr(a, b) __rord((a), (b)) |
Rotates a 32-bit value to the right by the specified number of bits. | |
#define | _rotwl(a, b) __rolw((a), (b)) |
Rotates a 16-bit value to the left by the specified number of bits. | |
#define | _rotwr(a, b) __rorw((a), (b)) |
Rotates a 16-bit value to the right by the specified number of bits. | |
Functions | |
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | __bsfd (int __A) |
Finds the first set bit starting from the least significant bit. | |
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | __bsrd (int __A) |
Finds the first set bit starting from the most significant bit. | |
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | __bswapd (int __A) |
Swaps the bytes in the input, converting little endian to big endian or vice versa. | |
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | _bswap (int __A) |
Swaps the bytes in the input, converting little endian to big endian or vice versa. | |
static __inline__ int __DEFAULT_FN_ATTRS_CONSTEXPR | __popcntd (unsigned int __A) |
Counts the number of bits in the source operand having a value of 1. | |
static __inline__ unsigned int __DEFAULT_FN_ATTRS | __readeflags (void) |
Returns the program status-and-control EFLAGS register with the VM and RF flags cleared. | |
static __inline__ void __DEFAULT_FN_ATTRS | __writeeflags (unsigned int __f) |
Writes the specified value to the program status-and-control EFLAGS register. | |
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CAST | _castf32_u32 (float __A) |
Casts a 32-bit float value to a 32-bit unsigned integer value. | |
static __inline__ unsigned long long __DEFAULT_FN_ATTRS_CAST | _castf64_u64 (double __A) |
Casts a 64-bit float value to a 64-bit unsigned integer value. | |
static __inline__ float __DEFAULT_FN_ATTRS_CAST | _castu32_f32 (unsigned int __A) |
Casts a 32-bit unsigned integer value to a 32-bit float value. | |
static __inline__ double __DEFAULT_FN_ATTRS_CAST | _castu64_f64 (unsigned long long __A) |
Casts a 64-bit unsigned integer value to a 64-bit float value. | |
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32 | __crc32b (unsigned int __C, unsigned char __D) |
Adds the unsigned integer operand to the CRC-32C checksum of the unsigned char operand. | |
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32 | __crc32w (unsigned int __C, unsigned short __D) |
Adds the unsigned integer operand to the CRC-32C checksum of the unsigned short operand. | |
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CRC32 | __crc32d (unsigned int __C, unsigned int __D) |
Adds the unsigned integer operand to the CRC-32C checksum of the second unsigned integer operand. | |
static __inline__ unsigned long long __DEFAULT_FN_ATTRS | __rdpmc (int __A) |
Reads the specified performance-monitoring counter. | |
static __inline__ unsigned long long __DEFAULT_FN_ATTRS | __rdtscp (unsigned int *__A) |
Reads the processor's time-stamp counter and the IA32_TSC_AUX MSR (0xc0000103). | |
static __inline__ void __DEFAULT_FN_ATTRS | _wbinvd (void) |
static __inline__ unsigned char __DEFAULT_FN_ATTRS_CONSTEXPR | __rolb (unsigned char __X, int __C) |
Rotates an 8-bit value to the left by the specified number of bits. | |
static __inline__ unsigned char __DEFAULT_FN_ATTRS_CONSTEXPR | __rorb (unsigned char __X, int __C) |
Rotates an 8-bit value to the right by the specified number of bits. | |
static __inline__ unsigned short __DEFAULT_FN_ATTRS_CONSTEXPR | __rolw (unsigned short __X, int __C) |
Rotates a 16-bit value to the left by the specified number of bits. | |
static __inline__ unsigned short __DEFAULT_FN_ATTRS_CONSTEXPR | __rorw (unsigned short __X, int __C) |
Rotates a 16-bit value to the right by the specified number of bits. | |
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CONSTEXPR | __rold (unsigned int __X, int __C) |
Rotates a 32-bit value to the left by the specified number of bits. | |
static __inline__ unsigned int __DEFAULT_FN_ATTRS_CONSTEXPR | __rord (unsigned int __X, int __C) |
Rotates a 32-bit value to the right by the specified number of bits. | |
#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) |
Definition at line 18 of file ia32intrin.h.
#define __DEFAULT_FN_ATTRS_CAST __attribute__((__always_inline__)) |
Definition at line 25 of file ia32intrin.h.
#define __DEFAULT_FN_ATTRS_CONSTEXPR __DEFAULT_FN_ATTRS |
Definition at line 26 of file ia32intrin.h.
#define __DEFAULT_FN_ATTRS_CRC32 __attribute__((__always_inline__, __nodebug__, __target__("crc32"))) |
Definition at line 19 of file ia32intrin.h.
#define _bit_scan_forward | ( | A | ) | __bsfd((A)) |
Finds the first set bit starting from the least significant bit.
The result is undefined if the input is 0.
This intrinsic corresponds to the BSF
instruction or the TZCNT
instruction.
A | A 32-bit integer operand. |
Definition at line 109 of file ia32intrin.h.
#define _bit_scan_reverse | ( | A | ) | __bsrd((A)) |
Finds the first set bit starting from the most significant bit.
The result is undefined if the input is 0.
This intrinsic corresponds to the BSR
instruction or the LZCNT
instruction and an XOR
.
A | A 32-bit integer operand. |
Definition at line 127 of file ia32intrin.h.
Rotates a 32-bit value to the left by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROL
instruction.
a | The unsigned 32-bit value to be rotated. |
b | The number of bits to rotate the value. |
Definition at line 753 of file ia32intrin.h.
Rotates a 32-bit value to the right by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROR
instruction.
a | The unsigned 32-bit value to be rotated. |
b | The number of bits to rotate the value. |
Definition at line 773 of file ia32intrin.h.
#define _popcnt32 | ( | A | ) | __popcntd((A)) |
Counts the number of bits in the source operand having a value of 1.
This intrinsic corresponds to the POPCNT
instruction or a sequence of arithmetic and logic operations to calculate it.
A | An unsigned 32-bit integer operand. |
Definition at line 230 of file ia32intrin.h.
#define _rdpmc | ( | A | ) | __rdpmc(A) |
Reads the specified performance monitoring counter.
Refer to your processor's documentation to determine which performance counters are supported.
This intrinsic corresponds to the RDPMC
instruction.
A | The performance counter to read. |
Definition at line 534 of file ia32intrin.h.
#define _rdtsc | ( | ) | __rdtsc() |
Reads the processor's time-stamp counter.
This intrinsic corresponds to the RDTSC
instruction.
Definition at line 516 of file ia32intrin.h.
Rotates a 32-bit value to the left by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROL
instruction.
a | The unsigned 32-bit value to be rotated. |
b | The number of bits to rotate the value. |
Definition at line 794 of file ia32intrin.h.
Rotates a 32-bit value to the right by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROR
instruction.
a | The unsigned 32-bit value to be rotated. |
b | The number of bits to rotate the value. |
Definition at line 814 of file ia32intrin.h.
Rotates a 16-bit value to the left by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROL
instruction.
a | The unsigned 16-bit value to be rotated. |
b | The number of bits to rotate the value. |
Definition at line 836 of file ia32intrin.h.
Rotates a 16-bit value to the right by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROR
instruction.
a | The unsigned 16-bit value to be rotated. |
b | The number of bits to rotate the value. |
Definition at line 856 of file ia32intrin.h.
|
static |
Finds the first set bit starting from the least significant bit.
The result is undefined if the input is 0.
This intrinsic corresponds to the BSF
instruction or the TZCNT
instruction.
__A | A 32-bit integer operand. |
Definition at line 42 of file ia32intrin.h.
|
static |
Finds the first set bit starting from the most significant bit.
The result is undefined if the input is 0.
This intrinsic corresponds to the BSR
instruction or the LZCNT
instruction and an XOR
.
__A | A 32-bit integer operand. |
Definition at line 59 of file ia32intrin.h.
|
static |
Swaps the bytes in the input, converting little endian to big endian or vice versa.
This intrinsic corresponds to the BSWAP
instruction.
__A | A 32-bit integer operand. |
Definition at line 74 of file ia32intrin.h.
|
static |
Adds the unsigned integer operand to the CRC-32C checksum of the unsigned char operand.
This intrinsic corresponds to the CRC32B
instruction.
__C | An unsigned integer operand to add to the CRC-32C checksum of operand __D. |
__D | An unsigned 8-bit integer operand used to compute the CRC-32C checksum. |
Definition at line 406 of file ia32intrin.h.
References __D.
|
static |
Adds the unsigned integer operand to the CRC-32C checksum of the second unsigned integer operand.
This intrinsic corresponds to the CRC32D
instruction.
__C | An unsigned integer operand to add to the CRC-32C checksum of operand __D. |
__D | An unsigned 32-bit integer operand used to compute the CRC-32C checksum. |
Definition at line 446 of file ia32intrin.h.
References __D.
|
static |
Adds the unsigned integer operand to the CRC-32C checksum of the unsigned short operand.
This intrinsic corresponds to the CRC32W
instruction.
__C | An unsigned integer operand to add to the CRC-32C checksum of operand __D. |
__D | An unsigned 16-bit integer operand used to compute the CRC-32C checksum. |
Definition at line 426 of file ia32intrin.h.
References __D.
|
static |
Counts the number of bits in the source operand having a value of 1.
This intrinsic corresponds to the POPCNT
instruction or a sequence of arithmetic and logic operations to calculate it.
__A | An unsigned 32-bit integer operand. |
Definition at line 209 of file ia32intrin.h.
|
static |
Reads the specified performance-monitoring counter.
Refer to your processor's documentation to determine which performance counters are supported.
This intrinsic corresponds to the RDPMC
instruction.
__A | The performance counter to read. |
Definition at line 486 of file ia32intrin.h.
|
static |
Reads the processor's time-stamp counter and the IA32_TSC_AUX
MSR (0xc0000103).
This intrinsic corresponds to the RDTSCP
instruction.
__A | The address of where to store the 32-bit IA32_TSC_AUX value. |
Definition at line 501 of file ia32intrin.h.
|
static |
Returns the program status-and-control EFLAGS
register with the VM
and RF
flags cleared.
This intrinsic corresponds to the PUSHFD
+ POP
instruction sequence.
Definition at line 310 of file ia32intrin.h.
|
static |
Rotates an 8-bit value to the left by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROL
instruction.
__X | The unsigned 8-bit value to be rotated. |
__C | The number of bits to rotate the value. |
Definition at line 555 of file ia32intrin.h.
|
static |
Rotates a 32-bit value to the left by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROL
instruction.
__X | The unsigned 32-bit value to be rotated. |
__C | The number of bits to rotate the value. |
Definition at line 630 of file ia32intrin.h.
|
static |
Rotates a 16-bit value to the left by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROL
instruction.
__X | The unsigned 16-bit value to be rotated. |
__C | The number of bits to rotate the value. |
Definition at line 592 of file ia32intrin.h.
|
static |
Rotates an 8-bit value to the right by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROR
instruction.
__X | The unsigned 8-bit value to be rotated. |
__C | The number of bits to rotate the value. |
Definition at line 573 of file ia32intrin.h.
|
static |
Rotates a 32-bit value to the right by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROR
instruction.
__X | The unsigned 32-bit value to be rotated. |
__C | The number of bits to rotate the value. |
Definition at line 649 of file ia32intrin.h.
|
static |
Rotates a 16-bit value to the right by the specified number of bits.
This operation is undefined if the number of bits exceeds the size of the value.
This intrinsic corresponds to the ROR
instruction.
__X | The unsigned 16-bit value to be rotated. |
__C | The number of bits to rotate the value. |
Definition at line 611 of file ia32intrin.h.
|
static |
Writes the specified value to the program status-and-control EFLAGS
register.
Reserved bits are not affected.
This intrinsic corresponds to the PUSH
+ POPFD
instruction sequence.
__f | The 32-bit value to write to EFLAGS . |
Definition at line 325 of file ia32intrin.h.
|
static |
Swaps the bytes in the input, converting little endian to big endian or vice versa.
This intrinsic corresponds to the BSWAP
instruction.
__A | A 32-bit integer operand. |
Definition at line 89 of file ia32intrin.h.
|
static |
Casts a 32-bit float value to a 32-bit unsigned integer value.
This intrinsic corresponds to the VMOVD
/ MOVD
instruction in x86_64, and corresponds to the VMOVL
/ MOVL
instruction in ia32.
__A | A 32-bit float value. |
Definition at line 342 of file ia32intrin.h.
|
static |
Casts a 64-bit float value to a 64-bit unsigned integer value.
This intrinsic corresponds to the VMOVQ
/ MOVQ
instruction in x86_64, and corresponds to the VMOVL
/ MOVL
instruction in ia32.
__A | A 64-bit float value. |
Definition at line 357 of file ia32intrin.h.
|
static |
Casts a 32-bit unsigned integer value to a 32-bit float value.
This intrinsic corresponds to the VMOVQ
/ MOVQ
instruction in x86_64, and corresponds to the FLDS
instruction in ia32.
__A | A 32-bit unsigned integer value. |
Definition at line 372 of file ia32intrin.h.
|
static |
Casts a 64-bit unsigned integer value to a 64-bit float value.
This intrinsic corresponds to the VMOVQ
/ MOVQ
instruction in x86_64, and corresponds to the FLDL
instruction in ia32.
__A | A 64-bit unsigned integer value. |
Definition at line 387 of file ia32intrin.h.
|
static |
Definition at line 537 of file ia32intrin.h.