MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / word_at

Function word_at

crates/asm-to-binary/tests/object_linker.rs:5–7  ·  view source on GitHub ↗
(bytes: &[u8], off: usize)

Source from the content-addressed store, hash-verified

3use asm_to_binary::rv_instruction::RvInstruction;
4
5fn word_at(bytes: &[u8], off: usize) -> u32 {
6 u32::from_le_bytes(bytes[off..off + 4].try_into().expect("4-byte word"))
7}
8
9fn sign_extend_12(v: u32) -> i64 {
10 let raw = (v & 0x0FFF).cast_signed();

Callers 1

word_at_linked_addressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected