aboutsummaryrefslogtreecommitdiff
path: root/minias.h
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-09 22:05:15 +1300
committerAndrew Chambers <[email protected]>2021-10-09 22:05:15 +1300
commitc726740a3882ebdc85c0d06c922dfaf5c6532c69 (patch)
tree78e74a25dd09238ef4967cea29c150af2215d6dd /minias.h
parenta439d4004379cc73dd6b2bf330130733396f9d61 (diff)
Add section directive.
Diffstat (limited to 'minias.h')
-rw-r--r--minias.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/minias.h b/minias.h
index 68df579..78d478a 100644
--- a/minias.h
+++ b/minias.h
@@ -49,6 +49,7 @@ typedef enum {
ASM_MEMARG,
// Directives
ASM_DIR_GLOBL,
+ ASM_DIR_SECTION,
ASM_DIR_ASCII,
ASM_DIR_ASCIIZ,
ASM_DIR_DATA,
@@ -164,6 +165,13 @@ typedef struct {
typedef struct {
AsmKind kind;
+ const char *name;
+ const char *flags;
+ int type;
+} DirSection;
+
+typedef struct {
+ AsmKind kind;
uint8_t b;
} Byte;
@@ -231,6 +239,7 @@ union Parsev {
AsmKind kind;
Label label;
Globl globl;
+ DirSection section;
Balign balign;
Ascii ascii;
Asciiz asciiz;
@@ -244,6 +253,9 @@ union Parsev {
Ident ident;
Number number;
String string;
+ // Temporary values.
+ const char *charptr;
+ int64_t i64;
};
typedef struct AsmLine AsmLine;