summaryrefslogtreecommitdiff
path: root/opcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'opcode.h')
-rw-r--r--opcode.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/opcode.h b/opcode.h
index f5aeb0d..1e5d820 100644
--- a/opcode.h
+++ b/opcode.h
@@ -58,11 +58,25 @@ struct sux {
union reg ps; /* The processor status register. */
uint64_t a, b, y, x; /* Registers A, B, X, and Y. */
uint64_t e; /* Effective address register. */
+ uint64_t c, d, s, f; /* Registers C, D, S, and F. */;
uint64_t pc; /* Program counter. */
uint64_t sp; /* Stack pointer. */
+ uint64_t bp; /* Base pointer. */
+ uint64_t r11, r12, r13, r14, r15; /* Registers R11-R15. */;
uint64_t clk; /* Number of clock cycles. */
};
+typedef struct op operand;
+
+struct op {
+ uint8_t type; /* Operand Type. 0 = register, 1 = memory. */
+ uint8_t id; /* Operand Type ID 1. 4 bits. */
+ uint8_t rind[2]; /* Register(s) used for register indirect. */
+ uint8_t scale; /* Scale used for SIB. */
+ int is_ind : 1; /* Flag used to determine if this operand is an indirect mode. */
+ uint64_t value; /* Value of operand (used only by memory operands). */
+};
+
extern int asmmon();
enum sw_type {RS, AM, BYTE};