| ... | ... | @@ -3342,7 +3342,7 @@ fn airDivFloor(cg: *CodeGen, inst: Air.Inst.Index) !?Id { |
| 3342 | 3342 | |
| 3343 | 3343 | const info = cg.arithmeticTypeInfo(lhs.ty); |
| 3344 | 3344 | switch (info.class) { |
| 3345 | | .composite_integer => unreachable, // TODO |
| 3345 | .composite_integer => return cg.todo("div_floor for composite integers", .{}), |
| 3346 | 3346 | .integer, .strange_integer => { |
| 3347 | 3347 | switch (info.signedness) { |
| 3348 | 3348 | .unsigned => { |
| ... | ... | @@ -3381,7 +3381,7 @@ fn airDivTrunc(cg: *CodeGen, inst: Air.Inst.Index) !?Id { |
| 3381 | 3381 | const rhs = try cg.temporary(bin_op.rhs); |
| 3382 | 3382 | const info = cg.arithmeticTypeInfo(lhs.ty); |
| 3383 | 3383 | switch (info.class) { |
| 3384 | | .composite_integer => unreachable, // TODO |
| 3384 | .composite_integer => return cg.todo("div_trunc for composite integers", .{}), |
| 3385 | 3385 | .integer, .strange_integer => switch (info.signedness) { |
| 3386 | 3386 | .unsigned => { |
| 3387 | 3387 | const result = try cg.buildBinary(.OpUDiv, lhs, rhs); |
| ... | ... | @@ -3420,7 +3420,7 @@ fn airArithOp( |
| 3420 | 3420 | const rhs = try cg.temporary(bin_op.rhs); |
| 3421 | 3421 | const info = cg.arithmeticTypeInfo(lhs.ty); |
| 3422 | 3422 | const result = switch (info.class) { |
| 3423 | | .composite_integer => unreachable, // TODO |
| 3423 | .composite_integer => return cg.todo("arith op for composite integers", .{}), |
| 3424 | 3424 | .integer, .strange_integer => res: { |
| 3425 | 3425 | const raw = switch (info.signedness) { |
| 3426 | 3426 | .signed => try cg.buildBinary(sop, lhs, rhs), |
| ... | ... | @@ -3461,7 +3461,7 @@ fn abs(cg: *CodeGen, result_ty: Type, value: Temporary) !Temporary { |
| 3461 | 3461 | } |
| 3462 | 3462 | return try cg.normalize(abs_value, cg.arithmeticTypeInfo(result_ty)); |
| 3463 | 3463 | }, |
| 3464 | | .composite_integer => unreachable, // TODO |
| 3464 | .composite_integer => return cg.todo("@abs for composite integers", .{}), |
| 3465 | 3465 | .bool => unreachable, |
| 3466 | 3466 | } |
| 3467 | 3467 | } |
| ... | ... | @@ -3489,7 +3489,7 @@ fn airAddSubOverflow( |
| 3489 | 3489 | |
| 3490 | 3490 | const info = cg.arithmeticTypeInfo(lhs.ty); |
| 3491 | 3491 | switch (info.class) { |
| 3492 | | .composite_integer => unreachable, // TODO |
| 3492 | .composite_integer => return cg.todo("add/sub-with-overflow for composite integers", .{}), |
| 3493 | 3493 | .strange_integer, .integer => {}, |
| 3494 | 3494 | .float, .bool => unreachable, |
| 3495 | 3495 | } |
| ... | ... | @@ -3539,7 +3539,7 @@ fn airMulOverflow(cg: *CodeGen, inst: Air.Inst.Index) !?Id { |
| 3539 | 3539 | |
| 3540 | 3540 | const info = cg.arithmeticTypeInfo(lhs.ty); |
| 3541 | 3541 | switch (info.class) { |
| 3542 | | .composite_integer => unreachable, // TODO |
| 3542 | .composite_integer => return cg.todo("mul-with-overflow for composite integers", .{}), |
| 3543 | 3543 | .strange_integer, .integer => {}, |
| 3544 | 3544 | .float, .bool => unreachable, |
| 3545 | 3545 | } |
| ... | ... | @@ -3710,7 +3710,7 @@ fn airShlOverflow(cg: *CodeGen, inst: Air.Inst.Index) !?Id { |
| 3710 | 3710 | |
| 3711 | 3711 | const info = cg.arithmeticTypeInfo(base.ty); |
| 3712 | 3712 | switch (info.class) { |
| 3713 | | .composite_integer => unreachable, // TODO |
| 3713 | .composite_integer => return cg.todo("shl-with-overflow for composite integers", .{}), |
| 3714 | 3714 | .integer, .strange_integer => {}, |
| 3715 | 3715 | .float, .bool => unreachable, |
| 3716 | 3716 | } |
| ... | ... | @@ -3761,7 +3761,7 @@ fn airClzCtz(cg: *CodeGen, inst: Air.Inst.Index, op: UnaryOp) !?Id { |
| 3761 | 3761 | |
| 3762 | 3762 | const info = cg.arithmeticTypeInfo(operand.ty); |
| 3763 | 3763 | switch (info.class) { |
| 3764 | | .composite_integer => unreachable, // TODO |
| 3764 | .composite_integer => return cg.todo("@clz/@ctz for composite integers", .{}), |
| 3765 | 3765 | .integer, .strange_integer => {}, |
| 3766 | 3766 | .float, .bool => unreachable, |
| 3767 | 3767 | } |
| ... | ... | @@ -3846,7 +3846,7 @@ fn airReduce(cg: *CodeGen, inst: Air.Inst.Index) !?Id { |
| 3846 | 3846 | .Mul => .OpFMul, |
| 3847 | 3847 | else => unreachable, |
| 3848 | 3848 | }, |
| 3849 | | .composite_integer => unreachable, // TODO |
| 3849 | .composite_integer => return cg.todo("@reduce for composite integers", .{}), |
| 3850 | 3850 | }; |
| 3851 | 3851 | |
| 3852 | 3852 | const needs_normalize = info.class == .strange_integer and |
| ... | ... | @@ -4181,7 +4181,7 @@ fn cmp( |
| 4181 | 4181 | |
| 4182 | 4182 | const info = cg.arithmeticTypeInfo(scalar_ty); |
| 4183 | 4183 | const pred: Opcode = switch (info.class) { |
| 4184 | | .composite_integer => unreachable, // TODO |
| 4184 | .composite_integer => return cg.todo("comparison for composite integers", .{}), |
| 4185 | 4185 | .float => switch (op) { |
| 4186 | 4186 | .eq => .OpFOrdEqual, |
| 4187 | 4187 | .neq => .OpFUnordNotEqual, |
| ... | ... | @@ -4449,7 +4449,7 @@ fn airNot(cg: *CodeGen, inst: Air.Inst.Index) !?Id { |
| 4449 | 4449 | const result = switch (info.class) { |
| 4450 | 4450 | .bool => try cg.buildUnary(.l_not, operand), |
| 4451 | 4451 | .float => unreachable, |
| 4452 | | .composite_integer => unreachable, // TODO |
| 4452 | .composite_integer => return cg.todo("bitwise not for composite integers", .{}), |
| 4453 | 4453 | .strange_integer, .integer => blk: { |
| 4454 | 4454 | const complement = try cg.buildUnary(.bit_not, operand); |
| 4455 | 4455 | break :blk try cg.normalize(complement, info); |