| ... | ... | @@ -3235,6 +3235,7 @@ fn airMulDivBinOp(self: *Self, inst: Air.Inst.Index) !void { |
| 3235 | 3235 | var callee_buf: ["__udiv?i3".len]u8 = undefined; |
| 3236 | 3236 | const signed_div_floor_state: struct { |
| 3237 | 3237 | frame_index: FrameIndex, |
| 3238 | state: State, |
| 3238 | 3239 | reloc: Mir.Inst.Index, |
| 3239 | 3240 | } = if (signed and tag == .div_floor) state: { |
| 3240 | 3241 | const frame_index = try self.allocFrameIndex(FrameAlloc.initType(Type.usize, mod)); |
| ... | ... | @@ -3295,9 +3296,10 @@ fn airMulDivBinOp(self: *Self, inst: Air.Inst.Index) !void { |
| 3295 | 3296 | tmp_reg, |
| 3296 | 3297 | mat_rhs_mcv.register_pair[1], |
| 3297 | 3298 | ); |
| 3299 | const state = try self.saveState(); |
| 3298 | 3300 | const reloc = try self.asmJccReloc(.ns, undefined); |
| 3299 | 3301 | |
| 3300 | | break :state .{ .frame_index = frame_index, .reloc = reloc }; |
| 3302 | break :state .{ .frame_index = frame_index, .state = state, .reloc = reloc }; |
| 3301 | 3303 | } else undefined; |
| 3302 | 3304 | const call_mcv = try self.genCall( |
| 3303 | 3305 | .{ .lib = .{ |
| ... | ... | @@ -3328,6 +3330,12 @@ fn airMulDivBinOp(self: *Self, inst: Air.Inst.Index) !void { |
| 3328 | 3330 | .base = .{ .frame = signed_div_floor_state.frame_index }, |
| 3329 | 3331 | .mod = .{ .rm = .{ .size = .byte } }, |
| 3330 | 3332 | }); |
| 3333 | try self.restoreState(signed_div_floor_state.state, &.{}, .{ |
| 3334 | .emit_instructions = true, |
| 3335 | .update_tracking = true, |
| 3336 | .resurrect = true, |
| 3337 | .close_scope = true, |
| 3338 | }); |
| 3331 | 3339 | try self.performReloc(signed_div_floor_state.reloc); |
| 3332 | 3340 | const dst_mcv = try self.genCall( |
| 3333 | 3341 | .{ .lib = .{ |