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

Function shift_inst

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

Build a shift-immediate `AsmToken` (slli, srli, srai).

(mnemonic: &str, rd: u8, rs1: u8, shamt: u8)

Source from the content-addressed store, hash-verified

353 } else {
354 asm_warn!(out, "unrecognised bnez: {line}");
355 }
356 }
357
358 // --- R-type fallback ---
359 _ => {
360 if let Some(tok) = parse_r_type(mnemonic, rest) {
361 out.push(tok);
362 } else {
363 asm_warn!(out, "unrecognised instruction: {line}");
364 }
365 }

Callers 1

parse_instruction_lineFunction · 0.85

Calls 3

SlliClass · 0.85
SrliClass · 0.85
SraiClass · 0.85

Tested by

no test coverage detected