Try to parse `li rd, imm` and return the expanded instruction tokens.
(rest: &str)
| 365 | } |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | // --- Instruction constructors (per-format dispatch helpers) --- |
| 370 | |
| 371 | fn 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))), |
no test coverage detected