mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-19 16:42:33 +00:00
Minimize mips Instruction and Operand
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user