| ... | @@ -1317,7 +1317,6 @@ fn airWrapOp( | ... | @@ -1317,7 +1317,6 @@ fn airWrapOp( |
| 1317 | fn airSatOp( | 1317 | fn airSatOp( |
| 1318 | o: *Object, | 1318 | o: *Object, |
| 1319 | inst: Air.Inst.Index, | 1319 | inst: Air.Inst.Index, |
| 1320 | str_op: [*:0]const u8, | | |
| 1321 | fn_op: [*:0]const u8, | 1320 | fn_op: [*:0]const u8, |
| 1322 | ) !CValue { | 1321 | ) !CValue { |
| 1323 | if (o.liveness.isUnused(inst)) | 1322 | if (o.liveness.isUnused(inst)) |
| ... | @@ -1328,12 +1327,12 @@ fn airSatOp( | ... | @@ -1328,12 +1327,12 @@ fn airSatOp( |
| 1328 | const int_info = inst_ty.intInfo(o.dg.module.getTarget()); | 1327 | const int_info = inst_ty.intInfo(o.dg.module.getTarget()); |
| 1329 | const bits = int_info.bits; | 1328 | const bits = int_info.bits; |
| 1330 | | 1329 | |
| 1331 | // if it's an unsigned int with non-arbitrary bit size then we can just add | 1330 | switch (bits) { |
| 1332 | const ok_bits = switch (bits) { | 1331 | 8, 16, 32, 64, 128 => {}, |
| 1333 | 8, 16, 32, 64, 128 => true, | 1332 | else => return o.dg.fail("TODO: C backend: airSatOp for non power of 2 integers", .{}), |
| 1334 | else => false, | 1333 | } |
| 1335 | }; | | |
| 1336 | | 1334 | |
| | 1335 | // if it's an unsigned int with non-arbitrary bit size then we can just add |
| 1337 | if (bits > 64) { | 1336 | if (bits > 64) { |
| 1338 | return f.fail("TODO: C backend: airSatOp for large integers", .{}); | 1337 | return f.fail("TODO: C backend: airSatOp for large integers", .{}); |
| 1339 | } | 1338 | } |