From 406dfbe86d3a5541e22b67c6f45562ae0debf869 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 15 Jun 2026 14:29:14 +0100 Subject: [PATCH] Minimize mips Instruction and Operand --- core/rexcode/mips/instructions.odin | 2 +- core/rexcode/mips/operands.odin | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/rexcode/mips/instructions.odin b/core/rexcode/mips/instructions.odin index 26a4e5357..8ee7cc46e 100644 --- a/core/rexcode/mips/instructions.odin +++ b/core/rexcode/mips/instructions.odin @@ -22,7 +22,7 @@ Instruction :: struct #packed { length: u8, // 1 byte — always 4 for now; will be 2 for future μMIPS / MIPS16e _: [3]u8, // 3 bytes } -#assert(size_of(Instruction) == 72) +#assert(size_of(Instruction) == 48) // ============================================================================= // Builders (mirror x86's `inst_*` shapes; per the cross-arch contract) diff --git a/core/rexcode/mips/operands.odin b/core/rexcode/mips/operands.odin index a4619efbe..2fc273b77 100644 --- a/core/rexcode/mips/operands.odin +++ b/core/rexcode/mips/operands.odin @@ -64,9 +64,8 @@ Operand :: struct #packed { }, kind: Operand_Kind, // 1 byte size: u8, // 1 byte — width hint in bytes (4 = word, 8 = dword, etc.) - _: [6]u8, // 6 bytes } -#assert(size_of(Operand) == 16) +#assert(size_of(Operand) == 10) // ----------------------------------------------------------------------------- // Generic operand constructors