diff options
| author | Andrew Chambers <[email protected]> | 2021-10-10 20:59:58 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-10 20:59:58 +1300 |
| commit | 455ad9e979015cde50cd1f89a028aa0dd165b8b3 (patch) | |
| tree | 68d024930b7c5068955530cb13493efba7637f56 /minias.h | |
| parent | 6c881983cad0ac9b8896d41e2335f63c416325d4 (diff) | |
Add more directives and some simple opcodes.
Diffstat (limited to 'minias.h')
| -rw-r--r-- | minias.h | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -53,6 +53,8 @@ typedef enum { ASM_DIR_DATA, ASM_DIR_TEXT, ASM_DIR_BYTE, + ASM_DIR_INT, + ASM_DIR_QUAD, ASM_DIR_BALIGN, // Instructions ASM_NOP, @@ -60,6 +62,8 @@ typedef enum { ASM_PUSH, ASM_POP, ASM_CALL, + ASM_CLTD, + ASM_CQTO, ASM_JMP, ASM_LEAVE, ASM_ADD, @@ -181,11 +185,21 @@ typedef struct { typedef struct { AsmKind kind; - uint8_t b; + int64_t v; } Byte; typedef struct { AsmKind kind; + int64_t v; +} Int; + +typedef struct { + AsmKind kind; + int64_t v; +} Quad; + +typedef struct { + AsmKind kind; uint64_t align; } Balign; @@ -242,7 +256,9 @@ union Parsev { Instr instr; Call call; Jmp jmp; - Byte byte; + Byte dirbyte; + Int dirint; + Quad dirquad; Imm imm; String string; // Temporary values. |
