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()); }

Want to kickstart your project?Use the new AI Studio to create your code