From 94815c838cecaa84d15599dd54f5125fb1645fdc Mon Sep 17 00:00:00 2001 From: sBubshait Date: Thu, 30 May 2024 15:24:28 +0100 Subject: [PATCH] Add execute.c, w/ T --- src/execute.c | 23 +++++++++++++++++++++++ src/execute.h | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 src/execute.c create mode 100644 src/execute.h diff --git a/src/execute.c b/src/execute.c new file mode 100644 index 0000000..e1ebbf9 --- /dev/null +++ b/src/execute.c @@ -0,0 +1,23 @@ +#include "execute.h" + +void execute(a64inst_instruction inst) { + + switch (inst.type) { + case a64inst_Halt: + // Halt the program + break; + case a64inst_DPImmediate: + // Execute a data processing immediate instruction + break; + case a64inst_Branch: + // Execute a branch instruction + break; + case a64inst_DPRegister: + // Execute a data processing register instruction + break; + default: + // Unknown instruction + break; + } + +} \ No newline at end of file diff --git a/src/execute.h b/src/execute.h new file mode 100644 index 0000000..fd9da37 --- /dev/null +++ b/src/execute.h @@ -0,0 +1,3 @@ +#include "a64instruction.h" + +void execute(a64inst_instruction inst); \ No newline at end of file