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

Function add

crates/virtual-machine/tests/vm_pipeline.rs:51–53  ·  view source on GitHub ↗

add rd, rs1, rs2 -> opcode=0x33, funct3=0, funct7=0

(rd: u32, rs1: u32, rs2: u32)

Source from the content-addressed store, hash-verified

49
50// add rd, rs1, rs2 -> opcode=0x33, funct3=0, funct7=0
51fn add(rd: u32, rs1: u32, rs2: u32) -> u32 {
52 (rs2 << 20) | (rs1 << 15) | (rd << 7) | 0x33
53}
54
55// sw rs2, imm(rs1) -> opcode=0x23, funct3=2
56fn sw(rs1: u32, rs2: u32, imm: i32) -> u32 {

Callers 4

pipeline_load_use_stallFunction · 0.70
pipeline_loop_sum_1_to_5Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected