Aborts the execution of the process.
Performs checked integer addition.
Calculates the offset from a pointer, potentially wrapping.
A guard for unsafe functions that cannot ever be executed if T
is uninhabited:
This will statically either panic, or do nothing.
A guard for unsafe functions that cannot ever be executed if T
has invalid
bit patterns: This will statically either panic, or do nothing.
A guard for unsafe functions that cannot ever be executed if T
does not permit
zero-initialization: This will statically either panic, or do nothing.
Informs the optimizer that a condition is always true.
If the condition is false, the behavior is undefined.
Bitwise and with the current value, returning the previous value.
Bitwise and with the current value, returning the previous value.
Bitwise and with the current value, returning the previous value.
Bitwise and with the current value, returning the previous value.
Bitwise and with the current value, returning the previous value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Stores a value if the current value is the same as the old
value.
Loads the current value of the pointer.
Loads the current value of the pointer.
Loads the current value of the pointer.
Maximum with the current value using a signed comparison.
Maximum with the current value using a signed comparison.
Maximum with the current value.
Maximum with the current value using a signed comparison.
Maximum with the current value using a signed comparison.
Minimum with the current value using a signed comparison.
Minimum with the current value using a signed comparison.
Minimum with the current value using a signed comparison.
Minimum with the current value using a signed comparison.
Minimum with the current value using a signed comparison.
Bitwise nand with the current value, returning the previous value.
Bitwise nand with the current value, returning the previous value.
Bitwise nand with the current value, returning the previous value.
Bitwise nand with the current value, returning the previous value.
Bitwise nand with the current value, returning the previous value.
Bitwise or with the current value, returning the previous value.
Bitwise or with the current value, returning the previous value.
Bitwise or with the current value, returning the previous value.
Bitwise or with the current value, returning the previous value.
Bitwise or with the current value, returning the previous value.
A compiler-only memory barrier.
A compiler-only memory barrier.
A compiler-only memory barrier.
A compiler-only memory barrier.
Stores the value at the specified memory location.
Stores the value at the specified memory location.
Stores the value at the specified memory location.
Maximum with the current value using an unsigned comparison.
Maximum with the current value using an unsigned comparison.
Maximum with the current value using an unsigned comparison.
Maximum with the current value using an unsigned comparison.
Maximum with the current value using an unsigned comparison.
Minimum with the current value using an unsigned comparison.
Minimum with the current value using an unsigned comparison.
Minimum with the current value using an unsigned comparison.
Minimum with the current value using an unsigned comparison.
Minimum with the current value using an unsigned comparison.
Adds to the current value, returning the previous value.
Adds to the current value, returning the previous value.
Adds to the current value, returning the previous value.
Adds to the current value, returning the previous value.
Adds to the current value, returning the previous value.
Stores the value at the specified memory location, returning the old value.
Stores the value at the specified memory location, returning the old value.
Stores the value at the specified memory location, returning the old value.
Stores the value at the specified memory location, returning the old value.
Stores the value at the specified memory location, returning the old value.
Bitwise xor with the current value, returning the previous value.
Bitwise xor with the current value, returning the previous value.
Bitwise xor with the current value, returning the previous value.
Bitwise xor with the current value, returning the previous value.
Bitwise xor with the current value, returning the previous value.
Subtract from the current value, returning the previous value.
Subtract from the current value, returning the previous value.
Subtract from the current value, returning the previous value.
Subtract from the current value, returning the previous value.
Subtract from the current value, returning the previous value.
Reverses the bits in an integer type T
.
Executes a breakpoint trap, for inspection by a debugger.
Reverses the bytes in an integer type T
.
Gets a reference to a static Location
indicating where it was called.
Returns the smallest integer greater than or equal to an f32
.
Returns the smallest integer greater than or equal to an f64
.
Allocates a block of memory at compile time.
At runtime, just returns a null pointer.
Deallocates a memory which allocated by intrinsics::const_allocate
at compile time.
At runtime, does nothing.
Selects which function to call depending on the context.
Copies the sign from y
to x
for f32
values.
Copies the sign from y
to x
for f64
values.
Returns the cosine of an f32
.
Returns the cosine of an f64
.
Returns the number of leading unset bits (zeroes) in an integer type T
.
Like ctlz
, but extra-unsafe as it returns undef
when
given an x
with value 0
.
Returns the number of bits set in an integer type T
Returns the number of trailing unset bits (zeroes) in an integer type T
.
Like cttz
, but extra-unsafe as it returns undef
when
given an x
with value 0
.
Returns the value of the discriminant for the variant in ‘v’;
if T
has no discriminant, returns 0
.
Performs an exact division, resulting in undefined behavior where
x % y != 0
or y == 0
or x == T::MIN && y == -1
Returns 2 raised to the power of an f32
.
Returns 2 raised to the power of an f64
.
Returns the exponential of an f32
.
Returns the exponential of an f64
.
Returns the absolute value of an f32
.
Returns the absolute value of an f64
.
Float addition that allows optimizations based on algebraic rules.
May assume inputs are finite.
Float division that allows optimizations based on algebraic rules.
May assume inputs are finite.
Returns the largest integer less than or equal to an f32
.
Returns the largest integer less than or equal to an f64
.
Returns a * b + c
for f32
values.
Returns a * b + c
for f64
values.
Float multiplication that allows optimizations based on algebraic rules.
May assume inputs are finite.
Moves a value out of scope without running drop glue.
Float remainder that allows optimizations based on algebraic rules.
May assume inputs are finite.
Float subtraction that allows optimizations based on algebraic rules.
May assume inputs are finite.
Hints to the compiler that branch condition is likely to be true.
Returns the value passed to it.
Returns the base 2 logarithm of an f32
.
Returns the base 2 logarithm of an f64
.
Returns the base 10 logarithm of an f32
.
Returns the base 10 logarithm of an f64
.
Returns the natural logarithm of an f32
.
Returns the natural logarithm of an f64
.
Returns the maximum of two f32
values.
Returns the maximum of two f64
values.
The minimum alignment of a type.
The required alignment of the referenced value.
Returns the minimum of two f32
values.
Returns the minimum of two f64
values.
Performs checked integer multiplication
Returns the nearest integer to an f32
.
Returns the nearest integer to an f64
.
Returns true
if the actual type given as T
requires drop
glue; returns false
if the actual type provided for T
implements Copy
.
Emits a !nontemporal
store according to LLVM (see their docs).
Probably will never become stable.
Calculates the offset from a pointer.
Raises an f32
to an f32
power.
Raises an f64
to an f64
power.
Raises an f32
to an integer power.
Raises an f64
to an integer power.
The preferred alignment of a type.
The prefetch
intrinsic is a hint to the code generator to insert a prefetch instruction
if supported; otherwise, it is a no-op.
Prefetches have no effect on the behavior of the program but can change its performance
characteristics.
The prefetch
intrinsic is a hint to the code generator to insert a prefetch instruction
if supported; otherwise, it is a no-op.
Prefetches have no effect on the behavior of the program but can change its performance
characteristics.
The prefetch
intrinsic is a hint to the code generator to insert a prefetch instruction
if supported; otherwise, it is a no-op.
Prefetches have no effect on the behavior of the program but can change its performance
characteristics.
The prefetch
intrinsic is a hint to the code generator to insert a prefetch instruction
if supported; otherwise, it is a no-op.
Prefetches have no effect on the behavior of the program but can change its performance
characteristics.
See documentation of <*const T>::guaranteed_eq
for details.
Returns 2
if the result is unknown.
Returns 1
if the pointers are guaranteed equal
Returns 0
if the pointers are guaranteed inequal
Masks out bits of the pointer according to a mask.
See documentation of <*const T>::offset_from
for details.
See documentation of <*const T>::sub_ptr
for details.
Determines whether the raw bytes of the two values are equal.
Returns the nearest integer to an f32
. May raise an inexact floating-point exception
if the argument is not an integer.
Returns the nearest integer to an f64
. May raise an inexact floating-point exception
if the argument is not an integer.
Returns the nearest integer to an f32
. Rounds half-way cases away from zero.
Returns the nearest integer to an f64
. Rounds half-way cases away from zero.
Magic intrinsic that derives its meaning from attributes
attached to the function.
Computes a + b
, saturating at numeric bounds.
Computes a - b
, saturating at numeric bounds.
Returns the sine of an f32
.
Returns the sine of an f64
.
The size of a type in bytes.
The size of the referenced value in bytes.
Returns the square root of an f32
Returns the square root of an f64
Performs checked integer subtraction
Returns the integer part of an f32
.
Returns the integer part of an f64
.
Rust’s “try catch” construct which invokes the function pointer try_fn
with the data pointer data
.
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.
Gets a static string slice containing the name of a type.
Performs a volatile load from the src
pointer
The pointer is not required to be aligned.
Performs a volatile store to the dst
pointer.
The pointer is not required to be aligned.
Returns the result of an unchecked addition, resulting in
undefined behavior when x + y > T::MAX
or x + y < T::MIN
.
Performs an unchecked division, resulting in undefined behavior
where y == 0
or x == T::MIN && y == -1
Returns the result of an unchecked multiplication, resulting in
undefined behavior when x * y > T::MAX
or x * y < T::MIN
.
Returns the remainder of an unchecked division, resulting in
undefined behavior when y == 0
or x == T::MIN && y == -1
Performs an unchecked left shift, resulting in undefined behavior when
y < 0
or y >= N
, where N is the width of T in bits.
Performs an unchecked right shift, resulting in undefined behavior when
y < 0
or y >= N
, where N is the width of T in bits.
Returns the result of an unchecked subtraction, resulting in
undefined behavior when x - y > T::MAX
or x - y < T::MIN
.
Hints to the compiler that branch condition is likely to be false.
Returns the value passed to it.
Informs the optimizer that this point in the code is not reachable,
enabling further optimizations.
Returns the number of variants of the type T
cast to a usize
;
if T
has no variants, returns 0
. Uninhabited variants will be counted.
Equivalent to the appropriate llvm.memmove.p0i8.0i8.*
intrinsic, with
a size of count * size_of::<T>()
and an alignment of
min_align_of::<T>()
Equivalent to the appropriate llvm.memcpy.p0i8.0i8.*
intrinsic, with
a size of count
* size_of::<T>()
and an alignment of
min_align_of::<T>()
Performs a volatile load from the src
pointer.
Equivalent to the appropriate llvm.memset.p0i8.*
intrinsic, with a
size of count * size_of::<T>()
and an alignment of
min_align_of::<T>()
.
Performs a volatile store to the dst
pointer.
ptr
must point to a vtable.
The intrinsic will return the alignment stored in that vtable.
ptr
must point to a vtable.
The intrinsic will return the size stored in that vtable.
Returns (a + b) mod 2N, where N is the width of T in bits.
Returns (a * b) mod 2N, where N is the width of T in bits.
Returns (a - b) mod 2N, where N is the width of T in bits.
Copies count * size_of::<T>()
bytes from src
to dst
. The source
and destination may overlap.
Copies count * size_of::<T>()
bytes from src
to dst
. The source
and destination must not overlap.
Reinterprets the bits of a value of one type as another type.
Sets count * size_of::<T>()
bytes of memory starting at dst
to
val
.