From 40b4d52e905227849785f6520d0381f19657820a Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 12 May 2024 11:24:16 +0200 Subject: Reorganize all this shit --- emulator/hart.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 emulator/hart.h (limited to 'emulator/hart.h') diff --git a/emulator/hart.h b/emulator/hart.h new file mode 100644 index 0000000..5e9d451 --- /dev/null +++ b/emulator/hart.h @@ -0,0 +1,16 @@ +#pragma once + +#include + +struct Hart +{ + uint32_t pc; + uint32_t regs[32]; + char* mem; + uint32_t mem_size; +}; +typedef struct Hart Hart; + +void execute(Hart* hart, uint32_t instruction); +void execute_from(Hart* hart, uint32_t start_address); + -- cgit