Minimize mips Instruction and Operand

This commit is contained in:
gingerBill
2026-06-15 14:29:14 +01:00
parent 6527f90181
commit 406dfbe86d
2 changed files with 2 additions and 3 deletions

View File

@@ -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)

View File

@@ -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