| ... | @@ -7324,8 +7324,8 @@ fn airStructFieldVal(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -7324,8 +7324,8 @@ fn airStructFieldVal(self: *Self, inst: Air.Inst.Index) !void { |
| 7324 | .load_frame => |frame_addr| { | 7324 | .load_frame => |frame_addr| { |
| 7325 | const field_abi_size: u32 = @intCast(field_ty.abiSize(mod)); | 7325 | const field_abi_size: u32 = @intCast(field_ty.abiSize(mod)); |
| 7326 | if (field_off % 8 == 0) { | 7326 | if (field_off % 8 == 0) { |
| 7327 | const off_mcv = | 7327 | const field_byte_off = @divExact(field_off, 8); |
| 7328 | src_mcv.address().offset(@intCast(@divExact(field_off, 8))).deref(); | 7328 | const off_mcv = src_mcv.address().offset(@intCast(field_byte_off)).deref(); |
| 7329 | const field_bit_size = field_ty.bitSize(mod); | 7329 | const field_bit_size = field_ty.bitSize(mod); |
| 7330 | | 7330 | |
| 7331 | if (field_abi_size <= 8) { | 7331 | if (field_abi_size <= 8) { |
| ... | @@ -7350,7 +7350,9 @@ fn airStructFieldVal(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -7350,7 +7350,9 @@ fn airStructFieldVal(self: *Self, inst: Air.Inst.Index) !void { |
| 7350 | try self.copyToRegisterWithInstTracking(inst, field_ty, dst_mcv); | 7350 | try self.copyToRegisterWithInstTracking(inst, field_ty, dst_mcv); |
| 7351 | } | 7351 | } |
| 7352 | | 7352 | |
| 7353 | const dst_mcv = if (self.reuseOperand(inst, operand, 0, src_mcv)) | 7353 | const container_abi_size: u32 = @intCast(container_ty.abiSize(mod)); |
| | 7354 | const dst_mcv = if (field_byte_off + field_abi_size <= container_abi_size and |
| | 7355 | self.reuseOperand(inst, operand, 0, src_mcv)) |
| 7354 | off_mcv | 7356 | off_mcv |
| 7355 | else dst: { | 7357 | else dst: { |
| 7356 | const dst_mcv = try self.allocRegOrMem(inst, true); | 7358 | const dst_mcv = try self.allocRegOrMem(inst, true); |