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

Function try_parse_li

crates/asm-to-binary/src/assembler/parser.rs:367–372  ·  view source on GitHub ↗

Try to parse `li rd, imm` and return the expanded instruction tokens.

(rest: &str)

Source from the content-addressed store, hash-verified

365 }
366 }
367}
368
369// --- Instruction constructors (per-format dispatch helpers) ---
370
371fn store_inst(mnemonic: &str, rs1: u8, rs2: u8, imm: i32) -> AsmToken {
372 use crate::riscv::rv64i::Sw;
373 match mnemonic {
374 "sb" => AsmToken::Real(RealInstruction::Sb(Sb::new(rs1, rs2, imm))),
375 "sw" => AsmToken::Real(RealInstruction::Sw(Sw::new(rs1, rs2, imm))),

Callers 1

parse_instruction_lineFunction · 0.85

Calls 4

parse_two_fieldsFunction · 0.85
parse_int_regFunction · 0.85
parse_imm_i64Function · 0.85
expand_liFunction · 0.70

Tested by

no test coverage detected