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

Function fmac

crates/virtual-machine/src/cpu/decoder.rs:844–854  ·  view source on GitHub ↗
(word: u32, op: FMacOp)

Source from the content-addressed store, hash-verified

842 }
843}
844
845// --- Field extraction helpers ---
846
847// Extract bits [hi..lo] (inclusive) from `word`.
848fn field(word: u32, hi: u32, lo: u32) -> u32 {
849 let width = hi - lo + 1;
850 if width >= 32 {
851 word
852 } else {
853 (word >> lo) & ((1u32 << width) - 1)
854 }
855}
856
857#[inline]

Callers 1

decodeFunction · 0.85

Calls 5

fieldFunction · 0.85
funct3Function · 0.85
rdFunction · 0.85
rs1Function · 0.85
rs2Function · 0.85

Tested by

no test coverage detected