Module std::intrinsicsUnstable
[-] [+]
[src]
rustc compiler intrinsics.
The corresponding definitions are in librustc_trans/trans/intrinsic.rs.
Volatiles
The volatile intrinsics provide operations intended to act on I/O memory, which are guaranteed to not be reordered by the compiler across other volatile intrinsics. See the LLVM documentation on [volatile].
Atomics
The atomic intrinsics provide common atomic operations on machine words, with multiple possible memory orderings. They obey the same semantics as C++11. See the LLVM documentation on [atomics].
A quick refresher on memory ordering:
- Acquire - a barrier for acquiring a lock. Subsequent reads and writes take place after the barrier.
- Release - a barrier for releasing a lock. Preceding reads and writes take place before the barrier.
- Sequentially consistent - sequentially consistent operations are
guaranteed to happen in order. This is the standard mode for working
with atomic types and is equivalent to Java's
volatile
.
Structs
TyDesc |
Functions
abort | Abort the execution of the process. |
assume | Inform the optimizer that a condition is always true. If the condition is false, the behavior is undefined. |
atomic_and | |
atomic_and_acq | |
atomic_and_acqrel | |
atomic_and_rel | |
atomic_and_relaxed | |
atomic_cxchg | |
atomic_cxchg_acq | |
atomic_cxchg_acqrel | |
atomic_cxchg_rel | |
atomic_cxchg_relaxed | |
atomic_fence | |
atomic_fence_acq | |
atomic_fence_acqrel | |
atomic_fence_rel | |
atomic_load | |
atomic_load_acq | |
atomic_load_relaxed | |
atomic_load_unordered | |
atomic_max | |
atomic_max_acq | |
atomic_max_acqrel | |
atomic_max_rel | |
atomic_max_relaxed | |
atomic_min | |
atomic_min_acq | |
atomic_min_acqrel | |
atomic_min_rel | |
atomic_min_relaxed | |
atomic_nand | |
atomic_nand_acq | |
atomic_nand_acqrel | |
atomic_nand_rel | |
atomic_nand_relaxed | |
atomic_or | |
atomic_or_acq | |
atomic_or_acqrel | |
atomic_or_rel | |
atomic_or_relaxed | |
atomic_store | |
atomic_store_rel | |
atomic_store_relaxed | |
atomic_store_unordered | |
atomic_umax | |
atomic_umax_acq | |
atomic_umax_acqrel | |
atomic_umax_rel | |
atomic_umax_relaxed | |
atomic_umin | |
atomic_umin_acq | |
atomic_umin_acqrel | |
atomic_umin_rel | |
atomic_umin_relaxed | |
atomic_xadd | |
atomic_xadd_acq | |
atomic_xadd_acqrel | |
atomic_xadd_rel | |
atomic_xadd_relaxed | |
atomic_xchg | |
atomic_xchg_acq | |
atomic_xchg_acqrel | |
atomic_xchg_rel | |
atomic_xchg_relaxed | |
atomic_xor | |
atomic_xor_acq | |
atomic_xor_acqrel | |
atomic_xor_rel | |
atomic_xor_relaxed | |
atomic_xsub | |
atomic_xsub_acq | |
atomic_xsub_acqrel | |
atomic_xsub_rel | |
atomic_xsub_relaxed | |
breakpoint | Execute a breakpoint trap, for inspection by a debugger. |
bswap16 | Reverses the bytes in a |
bswap32 | Reverses the bytes in a |
bswap64 | Reverses the bytes in a |
ceilf32 | Returns the smallest integer greater than or equal to an |
ceilf64 | Returns the smallest integer greater than or equal to an |
copy_memory | Copies |
copy_nonoverlapping_memory | Copies |
copysignf32 | Copies the sign from |
copysignf64 | Copies the sign from |
cosf32 | Returns the cosine of an |
cosf64 | Returns the cosine of an |
ctlz16 | Returns the number of leading bits unset in a |
ctlz32 | Returns the number of leading bits unset in a |
ctlz64 | Returns the number of leading bits unset in a |
ctlz8 | Returns the number of leading bits unset in a |
ctpop16 | Returns the number of bits set in a |
ctpop32 | Returns the number of bits set in a |
ctpop64 | Returns the number of bits set in a |
ctpop8 | Returns the number of bits set in a |
cttz16 | Returns the number of trailing bits unset in a |
cttz32 | Returns the number of trailing bits unset in a |
cttz64 | Returns the number of trailing bits unset in a |
cttz8 | Returns the number of trailing bits unset in a |
exp2f32 | Returns 2 raised to the power of an |
exp2f64 | Returns 2 raised to the power of an |
expf32 | Returns the exponential of an |
expf64 | Returns the exponential of an |
fabsf32 | Returns the absolute value of an |
fabsf64 | Returns the absolute value of an |
floorf32 | Returns the largest integer less than or equal to an |
floorf64 | Returns the largest integer less than or equal to an |
fmaf32 | Returns |
fmaf64 | Returns |
forget | Move a value out of scope without running drop glue. |
get_tydesc | Get a static pointer to a type descriptor. |
i16_add_with_overflow | Performs checked |
i16_mul_with_overflow | Performs checked |
i16_sub_with_overflow | Performs checked |
i32_add_with_overflow | Performs checked |
i32_mul_with_overflow | Performs checked |
i32_sub_with_overflow | Performs checked |
i64_add_with_overflow | Performs checked |
i64_mul_with_overflow | Performs checked |
i64_sub_with_overflow | Performs checked |
i8_add_with_overflow | Performs checked |
i8_mul_with_overflow | Performs checked |
i8_sub_with_overflow | Performs checked |
init | Create a value initialized to zero. |
log10f32 | Returns the base 10 logarithm of an |
log10f64 | Returns the base 10 logarithm of an |
log2f32 | Returns the base 2 logarithm of an |
log2f64 | Returns the base 2 logarithm of an |
logf32 | Returns the natural logarithm of an |
logf64 | Returns the natural logarithm of an |
min_align_of | |
move_val_init | Move a value to an uninitialized memory location. |
nearbyintf32 | Returns the nearest integer to an |
nearbyintf64 | Returns the nearest integer to an |
needs_drop | Returns |
offset | Calculates the offset from a pointer. The offset must be in-bounds of the object, or one-byte-past-the-end. An arithmetic overflow is also undefined behaviour. |
owns_managed | Returns |
powf32 | Raises an |
powf64 | Raises an |
powif32 | Raises an |
powif64 | Raises an |
pref_align_of | |
return_address | Gives the address for the return value of the enclosing function. |
rintf32 | Returns the nearest integer to an |
rintf64 | Returns the nearest integer to an |
roundf32 | Returns the nearest integer to an |
roundf64 | Returns the nearest integer to an |
set_memory | Invokes memset on the specified pointer, setting |
sinf32 | Returns the sine of an |
sinf64 | Returns the sine of an |
size_of | The size of a type in bytes. |
sqrtf32 | Returns the square root of an |
sqrtf64 | Returns the square root of an |
transmute | Unsafely transforms a value of one type into a value of another type. |
truncf32 | Returns the integer part of an |
truncf64 | Returns the integer part of an |
type_id | Gets an identifier which is globally unique to the specified type. This function will return the same value for a type regardless of whichever crate it is invoked in. |
u16_add_with_overflow | Performs checked |
u16_mul_with_overflow | Performs checked |
u16_sub_with_overflow | Performs checked |
u32_add_with_overflow | Performs checked |
u32_mul_with_overflow | Performs checked |
u32_sub_with_overflow | Performs checked |
u64_add_with_overflow | Performs checked |
u64_mul_with_overflow | Performs checked |
u64_sub_with_overflow | Performs checked |
u8_add_with_overflow | Performs checked |
u8_mul_with_overflow | Performs checked |
u8_sub_with_overflow | Performs checked |
uninit | Create an uninitialized value. |
unreachable | Tell LLVM that this point in the code is not reachable, enabling further optimizations. |
volatile_copy_memory | Equivalent to the appropriate |
volatile_copy_nonoverlapping_memory | Equivalent to the appropriate |
volatile_load | Perform a volatile load from the |
volatile_set_memory | Equivalent to the appropriate |
volatile_store | Perform a volatile store to the |
Type Definitions
GlueFn |