summaryrefslogtreecommitdiff
path: root/opcode.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-05-04 12:57:36 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2020-05-04 12:57:36 -0400
commit9ccba5e624319becd9a85822e60b15b6355f19cd (patch)
treec12efdd4d15986e04edac36439668fa4843c89b7 /opcode.h
parent1c622005c289ef1cd9feea277bd0ff46b19d15f0 (diff)
Made all address decoding, and memory reads/writes be
done with a union, in order to make it more readable.
Diffstat (limited to 'opcode.h')
-rw-r--r--opcode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/opcode.h b/opcode.h
index 81bffa4..b9d1817 100644
--- a/opcode.h
+++ b/opcode.h
@@ -203,6 +203,13 @@
uint8_t *addr; /* Address Space. */
+union reg {
+ uint8_t u8[8];
+ uint16_t u16[4];
+ uint32_t u32[2];
+ uint64_t u64;
+};
+
struct sux {
uint64_t ps; /* The processor status register. */
uint64_t a[8], b[8], y[8], x[8]; /* Registers A, B, X, and Y. */