Generation

generate functionSun, 13 Nov 2022

Execute a riscv add immediate instruction

void execute(Instruction &instruction, Processor &processor) { processor.registers.set(instruction.rd(), processor.registers.get(instruction.rs1()) + instruction.imm()); }

Questions about programming?Chat with your personal AI assistant