diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-06-24 23:07:53 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-06-25 19:14:03 -0400 |
| commit | 8d30cb3f22792a3efdf2c8020b9716e69efbaefc (patch) | |
| tree | 2510a964599e35d8bda0b427747648b4d2cdf1b2 /src/arch | |
| parent | b18a72ec35978109186444506cd9791425af632b (diff) | |
| download | zig-8d30cb3f22792a3efdf2c8020b9716e69efbaefc.tar.gz zig-8d30cb3f22792a3efdf2c8020b9716e69efbaefc.zip | |
x86_64: turn `f80` operation crashes into errors
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/x86_64/CodeGen.zig | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index b1e5265815..da09a3165d 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -4886,6 +4886,9 @@ fn airFloatSign(self: *Self, inst: Air.Inst.Index) !void { }), }; const scalar_bits = ty.scalarType(mod).floatBits(self.target.*); + if (scalar_bits == 80) return self.fail("TODO implement airFloatSign for {}", .{ + ty.fmt(mod), + }); const src_mcv = try self.resolveInst(un_op); const src_lock = if (src_mcv.getReg()) |reg| self.register_manager.lockReg(reg) else null; @@ -6342,7 +6345,12 @@ fn genBinOp( const mod = self.bin_file.options.module.?; const lhs_ty = self.typeOf(lhs_air); const rhs_ty = self.typeOf(rhs_air); - const abi_size = @as(u32, @intCast(lhs_ty.abiSize(mod))); + const abi_size: u32 = @intCast(lhs_ty.abiSize(mod)); + if (lhs_ty.scalarType(mod).isRuntimeFloat() and + lhs_ty.scalarType(mod).floatBits(self.target.*) == 80) + return self.fail("TODO implement genBinOp for {s} {}", .{ + @tagName(air_tag), lhs_ty.fmt(mod), + }); const maybe_mask_reg = switch (air_tag) { else => null, |
