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

Method to_bits

pulley/src/regs.rs:193–198  ·  view source on GitHub ↗

Convert to dense 16 bit encoding.

(self)

Source from the content-addressed store, hash-verified

191impl<D: Reg, S1: Reg, S2: Reg> BinaryOperands<D, S1, S2> {
192 /// Convert to dense 16 bit encoding.
193 pub fn to_bits(self) -> u16 {
194 let dst = self.dst.to_u8();
195 let src1 = self.src1.to_u8();
196 let src2 = self.src2.to_u8();
197 (dst as u16) | ((src1 as u16) << 5) | ((src2 as u16) << 10)
198 }
199
200 /// Convert from dense 16 bit encoding. The topmost bit is ignored.
201 pub fn from_bits(bits: u16) -> Self {

Callers 15

fmtMethod · 0.45
set_f64x2Method · 0.45
set_f32x4Method · 0.45
fstore32le_o32Method · 0.45
fstore64le_o32Method · 0.45
fstore32be_o32Method · 0.45
fstore64be_o32Method · 0.45
fstore32le_zMethod · 0.45
fstore64le_zMethod · 0.45
fstore32le_g32Method · 0.45
fstore64le_g32Method · 0.45

Calls 1

fromFunction · 0.85

Tested by 6

assert_oneFunction · 0.36
call_wrapped_funcFunction · 0.36