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

Function parse_two_fields

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

Split `"rd, rest"` into `(rd_str, rest_str)`.

(operands: &str)

Source from the content-addressed store, hash-verified

440 use crate::riscv::rv64i::Lw;
441 match mnemonic {
442 "lb" => AsmToken::Real(RealInstruction::Lb(Lb::new(rd, rs1, imm))),
443 "lbu" => AsmToken::Real(RealInstruction::Lbu(Lbu::new(rd, rs1, imm))),
444 "lw" => AsmToken::Real(RealInstruction::Lw(Lw::new(rd, rs1, imm))),
445 "ld" => AsmToken::Real(RealInstruction::Ld(Ld::new(rd, rs1, imm))),
446 _ => unreachable!(),
447 }
448}

Callers 2

try_parse_liFunction · 0.85
parse_two_regsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected