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

Method encode

crates/asm-to-binary/src/riscv/rv64i.rs:180–190  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

178}
179impl Instruction for Slli {
180 fn encode(&self) -> u32 {
181 let imm = self.shamt as i32; // funct7 = 0x00
182 IType {
183 opcode: 0x13,
184 rd: self.rd,
185 funct3: 1,
186 rs1: self.rs1,
187 imm,
188 }
189 .encode()
190 }
191 fn to_asm(&self) -> String {
192 format!(
193 "slli {}, {}, {}",

Callers 7

encode_lineFunction · 0.45
encodeFunction · 0.45
encode_branchFunction · 0.45
encode_jalFunction · 0.45
encode_callFunction · 0.45
encode_tailFunction · 0.45
encode_laFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected