From 0ff948af3d65150f44c9fe801ada806ce0637fe1 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 9 Sep 2024 20:48:08 -0400 Subject: relocation table hell --- include/mips32.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/mips32.h') 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; -- cgit v1.2.3-freya