aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen/c.zig')
-rw-r--r--src/codegen/c.zig11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index 9ded6fe0e8..37e19d9e1a 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -1317,7 +1317,6 @@ fn airWrapOp(
fn airSatOp(
o: *Object,
inst: Air.Inst.Index,
- str_op: [*:0]const u8,
fn_op: [*:0]const u8,
) !CValue {
if (o.liveness.isUnused(inst))
@@ -1328,12 +1327,12 @@ fn airSatOp(
const int_info = inst_ty.intInfo(o.dg.module.getTarget());
const bits = int_info.bits;
- // if it's an unsigned int with non-arbitrary bit size then we can just add
- const ok_bits = switch (bits) {
- 8, 16, 32, 64, 128 => true,
- else => false,
- };
+ switch (bits) {
+ 8, 16, 32, 64, 128 => {},
+ else => return o.dg.fail("TODO: C backend: airSatOp for non power of 2 integers", .{}),
+ }
+ // if it's an unsigned int with non-arbitrary bit size then we can just add
if (bits > 64) {
return f.fail("TODO: C backend: airSatOp for large integers", .{});
}