diff --git a/core/rexcode/riscv/instructions.odin b/core/rexcode/riscv/instructions.odin index ccc5e8123..574d16256 100644 --- a/core/rexcode/riscv/instructions.odin +++ b/core/rexcode/riscv/instructions.odin @@ -15,14 +15,14 @@ Instruction_Flags :: bit_field u8 { } Instruction :: struct #packed { - ops: [4]Operand `fmt:"v,operand_count"`, // 64 bytes + ops: [4]Operand `fmt:"v,operand_count"`, // 40 bytes mnemonic: Mnemonic, // 2 operand_count: u8, // 1 flags: Instruction_Flags, // 1 length: u8, // 1 -- always 4 for non-C _: [3]u8, // 3 } -#assert(size_of(Instruction) == 72) +#assert(size_of(Instruction) == 48) // ============================================================================= // Builders (shape spelled out, comma-separated) diff --git a/core/rexcode/riscv/operands.odin b/core/rexcode/riscv/operands.odin index 2a244a5f1..946432464 100644 --- a/core/rexcode/riscv/operands.odin +++ b/core/rexcode/riscv/operands.odin @@ -44,9 +44,8 @@ Operand :: struct #packed { }, kind: Operand_Kind, size: u8, - _: [6]u8, } -#assert(size_of(Operand) == 16) +#assert(size_of(Operand) == 10) @(require_results) op_reg :: #force_inline proc "contextless" (r: Register) -> Operand { return Operand{reg = r, kind = .REGISTER, size = 4} }