Added resource, fixed memaccess

This commit is contained in:
2023-10-17 13:25:31 +02:00
parent 43d22052e5
commit c404defb42
2 changed files with 4 additions and 1 deletions

View File

@@ -698,7 +698,7 @@ void cpu_loop(rv32_cpu_t* cpu)
fprintf(stderr, "Error: instruction fetch: pc is out of addressable memory\n");
exit(EXIT_FAILURE);
}
raw_instruction.data = *((uint32_t*) (&memory[cpu->pc]));
raw_instruction.data = mem_read32(cpu->pc);
// Decode
instruction_t instruction;