| ... | ... | @@ -11470,9 +11470,13 @@ fn airFloatFromInt(self: *Self, inst: Air.Inst.Index) !void { |
| 11470 | 11470 | const result = result: { |
| 11471 | 11471 | if (switch (dst_bits) { |
| 11472 | 11472 | 16, 80, 128 => true, |
| 11473 | | 32, 64 => src_size > 8 and src_size < 16, |
| 11473 | 32, 64 => src_size > 8, |
| 11474 | 11474 | else => unreachable, |
| 11475 | 11475 | }) { |
| 11476 | if (src_bits > 128) return self.fail("TODO implement airFloatFromInt from {} to {}", .{ |
| 11477 | src_ty.fmt(mod), dst_ty.fmt(mod), |
| 11478 | }); |
| 11479 | |
| 11476 | 11480 | var callee: ["__floatun?i?f".len]u8 = undefined; |
| 11477 | 11481 | break :result try self.genCall(.{ .lib = .{ |
| 11478 | 11482 | .return_type = dst_ty.toIntern(), |
| ... | ... | @@ -11488,10 +11492,6 @@ fn airFloatFromInt(self: *Self, inst: Air.Inst.Index) !void { |
| 11488 | 11492 | } }, &.{src_ty}, &.{.{ .air_ref = ty_op.operand }}); |
| 11489 | 11493 | } |
| 11490 | 11494 | |
| 11491 | | if (src_size > 8) return self.fail("TODO implement airFloatFromInt from {} to {}", .{ |
| 11492 | | src_ty.fmt(mod), dst_ty.fmt(mod), |
| 11493 | | }); |
| 11494 | | |
| 11495 | 11495 | const src_mcv = try self.resolveInst(ty_op.operand); |
| 11496 | 11496 | const src_reg = if (src_mcv.isRegister()) |
| 11497 | 11497 | src_mcv.getReg().? |
| ... | ... | @@ -11549,9 +11549,13 @@ fn airIntFromFloat(self: *Self, inst: Air.Inst.Index) !void { |
| 11549 | 11549 | const result = result: { |
| 11550 | 11550 | if (switch (src_bits) { |
| 11551 | 11551 | 16, 80, 128 => true, |
| 11552 | | 32, 64 => dst_size > 8 and dst_size < 16, |
| 11552 | 32, 64 => dst_size > 8, |
| 11553 | 11553 | else => unreachable, |
| 11554 | 11554 | }) { |
| 11555 | if (dst_bits > 128) return self.fail("TODO implement airIntFromFloat from {} to {}", .{ |
| 11556 | src_ty.fmt(mod), dst_ty.fmt(mod), |
| 11557 | }); |
| 11558 | |
| 11555 | 11559 | var callee: ["__fixuns?f?i".len]u8 = undefined; |
| 11556 | 11560 | break :result try self.genCall(.{ .lib = .{ |
| 11557 | 11561 | .return_type = dst_ty.toIntern(), |
| ... | ... | @@ -11567,10 +11571,6 @@ fn airIntFromFloat(self: *Self, inst: Air.Inst.Index) !void { |
| 11567 | 11571 | } }, &.{src_ty}, &.{.{ .air_ref = ty_op.operand }}); |
| 11568 | 11572 | } |
| 11569 | 11573 | |
| 11570 | | if (dst_size > 8) return self.fail("TODO implement airIntFromFloat from {} to {}", .{ |
| 11571 | | src_ty.fmt(mod), dst_ty.fmt(mod), |
| 11572 | | }); |
| 11573 | | |
| 11574 | 11574 | const src_mcv = try self.resolveInst(ty_op.operand); |
| 11575 | 11575 | const src_reg = if (src_mcv.isRegister()) |
| 11576 | 11576 | src_mcv.getReg().? |