MCPcopy Create free account
hub / github.com/ClementNerma/LRVM / encode

Method encode

lrvm_tools/src/exceptions/native.rs:126–128  ·  view source on GitHub ↗

Encode the exception on 24-bits

(&self)

Source from the content-addressed store, hash-verified

124
125 /// Encode the exception on 24-bits
126 pub fn encode(&self) -> u32 {
127 ((self.code() as u32) << 16) + self.associated_data().unwrap_or(0) as u32
128 }
129
130 /// Encode the exception with supervisor informations on 32-bits.
131 /// `was_sv` indicates if the error occurred in supervisor mode (else it was on userland mode).

Callers 2

associated_dataMethod · 0.45
encode_with_modeMethod · 0.45

Calls 2

codeMethod · 0.45
associated_dataMethod · 0.45

Tested by

no test coverage detected