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

Function parse_csrw

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

Parse `csr, rs` for `csrw` (pseudo: csrrw x0, csr, rs).

(operands: &str)

Source from the content-addressed store, hash-verified

607 "bgez" => (BranchKind::Bge, rs, 0),
608 "bltz" => (BranchKind::Blt, rs, 0),
609 "bgtz" => (BranchKind::Blt, 0, rs), // rs > 0 == 0 < rs
610 _ => return None,
611 };
612 Some(AsmToken::Branch {
613 kind,
614 rs1,
615 rs2,
616 target,
617 })
618}
619

Callers 1

parse_instruction_lineFunction · 0.85

Calls 2

parse_csr_nameFunction · 0.85
parse_int_regFunction · 0.85

Tested by

no test coverage detected