diff options
author | Freya Murphy <freya@freyacat.org> | 2024-09-09 20:48:08 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-09-09 20:48:08 -0400 |
commit | 0ff948af3d65150f44c9fe801ada806ce0637fe1 (patch) | |
tree | ba766d33d12bf1063660c2144af2d5f5c36b4c87 /include/mips32.h | |
parent | i forgor syscall (diff) | |
download | mips-0ff948af3d65150f44c9fe801ada806ce0637fe1.tar.gz mips-0ff948af3d65150f44c9fe801ada806ce0637fe1.tar.bz2 mips-0ff948af3d65150f44c9fe801ada806ce0637fe1.zip |
relocation table hell
Diffstat (limited to 'include/mips32.h')
-rw-r--r-- | include/mips32.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mips32.h b/include/mips32.h index ce0e997..228e213 100644 --- a/include/mips32.h +++ b/include/mips32.h @@ -117,6 +117,7 @@ enum mips32_instruction_type { MIPS32_INS_SRLV, MIPS32_INS_SUB, MIPS32_INS_SUBU, + MIPS32_INS_SYSCALL, MIPS32_INS_OR, MIPS32_INS_ORI, MIPS32_INS_NOR, @@ -447,6 +448,10 @@ MIPS32_INS(SUB, R, .op = MIPS32_OP_SPECIAL, .funct = MIPS32_FUNCT_SUB) #define MIPS32_FUNCT_SUBU 0b100011 MIPS32_INS(SUBU, R, .op = MIPS32_OP_SPECIAL, .funct = MIPS32_FUNCT_SUBU) +/* SYSCALL - syscall */ +#define MIPS32_FUNCT_SYSCALL 0b001100 +MIPS32_INS(SYSCALL, R, .op = MIPS32_OP_SPECIAL, .funct = MIPS32_FUNCT_SYSCALL) + /* OR - or */ #define MIPS32_FUNCT_OR 0b100101 MIPS32_INS(OR, R, .op = MIPS32_OP_SPECIAL, .funct = MIPS32_FUNCT_OR) @@ -478,11 +483,14 @@ enum mips32_directive_type { MIPS32_DIRECTIVE_HALF, MIPS32_DIRECTIVE_BYTE, MIPS32_DIRECTIVE_SECTION, + MIPS32_DIRECTIVE_EXTERN, + MIPS32_DIRECTIVE_GLOBL, }; /* mip32 directive */ struct mips32_directive { enum mips32_directive_type type; + uint32_t len; // used for words, halfs, bytes union { uint16_t align; uint16_t space; |