| ... | @@ -2935,6 +2935,10 @@ fn airAddSat(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -2935,6 +2935,10 @@ fn airAddSat(self: *Self, inst: Air.Inst.Index) !void { |
| 2935 | const mod = self.bin_file.options.module.?; | 2935 | const mod = self.bin_file.options.module.?; |
| 2936 | const bin_op = self.air.instructions.items(.data)[inst].bin_op; | 2936 | const bin_op = self.air.instructions.items(.data)[inst].bin_op; |
| 2937 | const ty = self.typeOf(bin_op.lhs); | 2937 | const ty = self.typeOf(bin_op.lhs); |
| | 2938 | if (ty.zigTypeTag(mod) == .Vector or ty.abiSize(mod) > 8) return self.fail( |
| | 2939 | "TODO implement addMulSat for {}", |
| | 2940 | .{ty.fmt(mod)}, |
| | 2941 | ); |
| 2938 | | 2942 | |
| 2939 | const lhs_mcv = try self.resolveInst(bin_op.lhs); | 2943 | const lhs_mcv = try self.resolveInst(bin_op.lhs); |
| 2940 | const dst_mcv = if (lhs_mcv.isRegister() and self.reuseOperand(inst, bin_op.lhs, 0, lhs_mcv)) | 2944 | const dst_mcv = if (lhs_mcv.isRegister() and self.reuseOperand(inst, bin_op.lhs, 0, lhs_mcv)) |
| ... | @@ -3014,6 +3018,10 @@ fn airSubSat(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3014,6 +3018,10 @@ fn airSubSat(self: *Self, inst: Air.Inst.Index) !void { |
| 3014 | const mod = self.bin_file.options.module.?; | 3018 | const mod = self.bin_file.options.module.?; |
| 3015 | const bin_op = self.air.instructions.items(.data)[inst].bin_op; | 3019 | const bin_op = self.air.instructions.items(.data)[inst].bin_op; |
| 3016 | const ty = self.typeOf(bin_op.lhs); | 3020 | const ty = self.typeOf(bin_op.lhs); |
| | 3021 | if (ty.zigTypeTag(mod) == .Vector or ty.abiSize(mod) > 8) return self.fail( |
| | 3022 | "TODO implement addMulSat for {}", |
| | 3023 | .{ty.fmt(mod)}, |
| | 3024 | ); |
| 3017 | | 3025 | |
| 3018 | const lhs_mcv = try self.resolveInst(bin_op.lhs); | 3026 | const lhs_mcv = try self.resolveInst(bin_op.lhs); |
| 3019 | const dst_mcv = if (lhs_mcv.isRegister() and self.reuseOperand(inst, bin_op.lhs, 0, lhs_mcv)) | 3027 | const dst_mcv = if (lhs_mcv.isRegister() and self.reuseOperand(inst, bin_op.lhs, 0, lhs_mcv)) |
| ... | @@ -3086,6 +3094,10 @@ fn airMulSat(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3086,6 +3094,10 @@ fn airMulSat(self: *Self, inst: Air.Inst.Index) !void { |
| 3086 | const mod = self.bin_file.options.module.?; | 3094 | const mod = self.bin_file.options.module.?; |
| 3087 | const bin_op = self.air.instructions.items(.data)[inst].bin_op; | 3095 | const bin_op = self.air.instructions.items(.data)[inst].bin_op; |
| 3088 | const ty = self.typeOf(bin_op.lhs); | 3096 | const ty = self.typeOf(bin_op.lhs); |
| | 3097 | if (ty.zigTypeTag(mod) == .Vector or ty.abiSize(mod) > 8) return self.fail( |
| | 3098 | "TODO implement addMulSat for {}", |
| | 3099 | .{ty.fmt(mod)}, |
| | 3100 | ); |
| 3089 | | 3101 | |
| 3090 | try self.spillRegisters(&.{ .rax, .rdx }); | 3102 | try self.spillRegisters(&.{ .rax, .rdx }); |
| 3091 | const reg_locks = self.register_manager.lockRegs(2, .{ .rax, .rdx }); | 3103 | const reg_locks = self.register_manager.lockRegs(2, .{ .rax, .rdx }); |
| ... | @@ -6346,8 +6358,9 @@ fn genBinOp( | ... | @@ -6346,8 +6358,9 @@ fn genBinOp( |
| 6346 | const lhs_ty = self.typeOf(lhs_air); | 6358 | const lhs_ty = self.typeOf(lhs_air); |
| 6347 | const rhs_ty = self.typeOf(rhs_air); | 6359 | const rhs_ty = self.typeOf(rhs_air); |
| 6348 | const abi_size: u32 = @intCast(lhs_ty.abiSize(mod)); | 6360 | const abi_size: u32 = @intCast(lhs_ty.abiSize(mod)); |
| 6349 | if (lhs_ty.scalarType(mod).isRuntimeFloat() and | 6361 | if ((lhs_ty.scalarType(mod).isRuntimeFloat() and |
| 6350 | lhs_ty.scalarType(mod).floatBits(self.target.*) == 80) | 6362 | lhs_ty.scalarType(mod).floatBits(self.target.*) == 80) or |
| | 6363 | lhs_ty.abiSize(mod) > @as(u6, if (self.hasFeature(.avx)) 32 else 16)) |
| 6351 | return self.fail("TODO implement genBinOp for {s} {}", .{ | 6364 | return self.fail("TODO implement genBinOp for {s} {}", .{ |
| 6352 | @tagName(air_tag), lhs_ty.fmt(mod), | 6365 | @tagName(air_tag), lhs_ty.fmt(mod), |
| 6353 | }); | 6366 | }); |