Enum wasmtime_environ::ir::LibCall
source · [−]pub enum LibCall {
Show 20 variants
Probestack,
UdivI64,
SdivI64,
UremI64,
SremI64,
IshlI64,
UshrI64,
SshrI64,
CeilF32,
CeilF64,
FloorF32,
FloorF64,
TruncF32,
TruncF64,
NearestF32,
NearestF64,
Memcpy,
Memset,
Memmove,
ElfTlsGetAddr,
}
Expand description
The name of a runtime library routine.
Runtime library calls are generated for Cranelift IR instructions that don’t have an equivalent
ISA instruction or an easy macro expansion. A LibCall
is used as a well-known name to refer to
the runtime library routine. This way, Cranelift doesn’t have to know about the naming
convention in the embedding VM’s runtime library.
This list is likely to grow over time.
Variants
Probestack
probe for stack overflow. These are emitted for functions which need
when the enable_probestack
setting is true.
UdivI64
udiv.i64
SdivI64
sdiv.i64
UremI64
urem.i64
SremI64
srem.i64
IshlI64
ishl.i64
UshrI64
ushr.i64
SshrI64
sshr.i64
CeilF32
ceil.f32
CeilF64
ceil.f64
FloorF32
floor.f32
FloorF64
floor.f64
TruncF32
trunc.f32
TruncF64
frunc.f64
NearestF32
nearest.f32
NearestF64
nearest.f64
Memcpy
libc.memcpy
Memset
libc.memset
Memmove
libc.memmove
ElfTlsGetAddr
Elf __tls_get_addr
Implementations
sourceimpl LibCall
impl LibCall
sourcepub fn for_inst(opcode: Opcode, ctrl_type: Type) -> Option<LibCall>
pub fn for_inst(opcode: Opcode, ctrl_type: Type) -> Option<LibCall>
Get the well-known library call name to use as a replacement for an instruction with the given opcode and controlling type variable.
Returns None
if no well-known library routine name exists for that instruction.
sourcepub fn all_libcalls() -> &'static [LibCall]
pub fn all_libcalls() -> &'static [LibCall]
Get a list of all known LibCall
’s.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for LibCall
impl<'de> Deserialize<'de> for LibCall
sourcepub fn deserialize<__D>(
__deserializer: __D
) -> Result<LibCall, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<LibCall, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for LibCall
impl Serialize for LibCall
sourcepub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for LibCall
impl Eq for LibCall
impl StructuralEq for LibCall
impl StructuralPartialEq for LibCall
Auto Trait Implementations
impl RefUnwindSafe for LibCall
impl Send for LibCall
impl Sync for LibCall
impl Unpin for LibCall
impl UnwindSafe for LibCall
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more