aboutsummaryrefslogtreecommitdiff
path: root/src/inst.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inst.h')
-rw-r--r--src/inst.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/inst.h b/src/inst.h
index df4e2e1..d510118 100644
--- a/src/inst.h
+++ b/src/inst.h
@@ -69,6 +69,11 @@ const char *opcode_as_cstr(opcode_t);
#define OPCODE_IS_TYPE(OPCODE, OP_TYPE) \
(((OPCODE) >= OP_TYPE##_BYTE) && ((OPCODE) <= OP_TYPE##_WORD))
+#define OPCODE_DATA_TYPE(OPCODE, OP_TYPE) \
+ ((OPCODE) == OP_TYPE##_BYTE ? DATA_TYPE_BYTE \
+ : ((OPCODE) == OP_TYPE##_HWORD) ? DATA_TYPE_HWORD \
+ : DATA_TYPE_WORD)
+
typedef struct
{
opcode_t opcode;