MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / to_le

Method to_le

cranelift/codegen/src/data_value.rs:145–151  ·  view source on GitHub ↗

Converts `self` to little endian from target's endianness.

(self)

Source from the content-addressed store, hash-verified

143
144 /// Converts `self` to little endian from target's endianness.
145 pub fn to_le(self) -> Self {
146 if cfg!(target_endian = "little") {
147 self
148 } else {
149 self.swap_bytes()
150 }
151 }
152
153 /// Write a [DataValue] to a slice in native-endian byte order.
154 ///

Callers 15

write_to_slice_leMethod · 0.80
read_from_slice_leMethod · 0.80
set_i32Method · 0.80
set_u32Method · 0.80
set_i64Method · 0.80
set_u64Method · 0.80
set_ptrMethod · 0.80
set_u128Method · 0.80
set_i8x16Method · 0.80
set_u8x16Method · 0.80
set_i16x8Method · 0.80
set_u16x8Method · 0.80

Calls 1

swap_bytesMethod · 0.45

Tested by 2

xload32le_o32Function · 0.64
xload64le_o32Function · 0.64