| ... | ... | @@ -1699,7 +1699,7 @@ fn structFieldPtr(self: *Self, inst: Air.Inst.Index, operand: Air.Inst.Ref, inde |
| 1699 | 1699 | |
| 1700 | 1700 | switch (mcv) { |
| 1701 | 1701 | .ptr_stack_offset => |off| { |
| 1702 | | const ptr_stack_offset = off - struct_size + struct_field_offset + struct_field_size; |
| 1702 | const ptr_stack_offset = off + struct_size - struct_field_offset - struct_field_size; |
| 1703 | 1703 | break :result MCValue{ .ptr_stack_offset = ptr_stack_offset }; |
| 1704 | 1704 | }, |
| 1705 | 1705 | else => return self.fail("TODO implement codegen struct_field_ptr for {}", .{mcv}), |
| ... | ... | @@ -1722,7 +1722,7 @@ fn airStructFieldVal(self: *Self, inst: Air.Inst.Index) !void { |
| 1722 | 1722 | |
| 1723 | 1723 | switch (mcv) { |
| 1724 | 1724 | .stack_offset => |off| { |
| 1725 | | const stack_offset = off - struct_size + struct_field_offset + struct_field_size; |
| 1725 | const stack_offset = off + struct_size - struct_field_offset - struct_field_size; |
| 1726 | 1726 | break :result MCValue{ .stack_offset = stack_offset }; |
| 1727 | 1727 | }, |
| 1728 | 1728 | else => return self.fail("TODO implement codegen struct_field_val for {}", .{mcv}), |