summaryrefslogtreecommitdiff
path: root/masm/parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'masm/parse.h')
-rw-r--r--masm/parse.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/masm/parse.h b/masm/parse.h
index 9181899..3052d51 100644
--- a/masm/parse.h
+++ b/masm/parse.h
@@ -9,9 +9,33 @@
#include <mips.h>
#include <stdint.h>
-///
-/// reference
-///
+/* mips directive types */
+enum mips_directive_type {
+ MIPS_DIRECTIVE_ALIGN,
+ MIPS_DIRECTIVE_SPACE,
+ MIPS_DIRECTIVE_WORD,
+ MIPS_DIRECTIVE_HALF,
+ MIPS_DIRECTIVE_BYTE,
+ MIPS_DIRECTIVE_SECTION,
+ MIPS_DIRECTIVE_EXTERN,
+ MIPS_DIRECTIVE_GLOBL,
+ MIPS_DIRECTIVE_ASCII,
+ MIPS_DIRECTIVE_ASCIIZ,
+};
+
+/* mip32 directive */
+struct mips_directive {
+ enum mips_directive_type type;
+ uint32_t len; // used for words, halfs, bytes
+ union {
+ uint16_t align;
+ uint16_t space;
+ uint32_t words[MAX_ARG_LENGTH];
+ uint16_t halfs[MAX_ARG_LENGTH];
+ uint8_t bytes[MAX_ARG_LENGTH];
+ char name[MAX_ARG_LENGTH];
+ };
+};
enum reference_type {
REF_NONE,