forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Note rust intrinsics
Eric Holk edited this page Jun 21, 2012
·
3 revisions
Rust provides several intrinsic functions. These are called like normal functions, but are translated directly into LLVM code by trans. These are meant to implement low-level, unsafe things in the core libraries. This page attempts to list all the intrinsics, what they do, how to use them, and why they exist. The intrinsics are currently implemented in src/rustc/middle/trans/native.rs.
-
fn addr_of<T>(val: T) -> *T- Returns the address of a thing. Used to imlpementptr::addr_ofandptr::mut_addr_of. Use these functions instead. fn atomic_add(&dst: int, src: int) -> intfn atomic_add_acq(&dst: int, src: int) -> intfn atomic_add_rel(&dst: int, src: int) -> intfn atomic_sub(&dst: int, src: int) -> intfn atomic_sub_acq(&dst: int, src: int) -> intfn atomic_sub_rel(&dst: int, src: int) -> intfn atomic_xchng(&dst: int, src: int) -> intfn atomic_xchng_acq(&dst: int, src: int) -> intfn atomic_xchng_rel(&dst: int, src: int) -> intforgetframe_addressget_tydescinitmin_align_ofmove_valmove_val_initneeds_droppref_align_ofreinterpret_castsize_ofvisit_ty