Which is just one line... A basic arithmetic operation...
This commit is contained in:
parent
52882cb6a6
commit
53d03b32e0
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ int execute_instruction_on_cpu(CPU *cpu, uint32_t instruction) { // TODO conside
|
|||
imm |= (instruction >> 12) & 0xFF << 12; // Extract imm[19:12]*/
|
||||
|
||||
registers[rd] = cpu->programCounter + 4;
|
||||
cpu->programCounter += imm;
|
||||
cpu->programCounter += imm - 4; // program counter is incremented after this, and we have to execute the function we point to
|
||||
|
||||
printf("JAL: Jumped to %u + %d = 0x%X (inst %d)", registers[rd], imm, cpu->programCounter, cpu->programCounter / 4);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue