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

Method assemble

crates/asm-to-binary/src/assembler/mod.rs:43–47  ·  view source on GitHub ↗

Assemble tokens into machine code. Errors on undefined labels or out-of-range branches.

(tokens: &[RvInstruction])

Source from the content-addressed store, hash-verified

41
42impl Assembler {
43 /// Assemble tokens into machine code. Errors on undefined labels or out-of-range branches.
44 pub fn assemble(tokens: &[RvInstruction]) -> Result<AssembledOutput, AssemblerError> {
45 let asm_tokens = parser::parse(tokens)?;
46 let layout = layout::compute_layout(&asm_tokens)?;
47 encode::encode(&asm_tokens, &layout)
48 }
49}
50

Callers

nothing calls this directly

Calls 3

compute_layoutFunction · 0.85
encodeFunction · 0.85
parseFunction · 0.70

Tested by

no test coverage detected