diff options
| author | Robin Voetter <robin@voetter.nl> | 2021-12-20 21:53:40 +0100 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2021-12-21 01:41:51 +0100 |
| commit | 964dbeb82623515b8392c8c7cb9317246812174e (patch) | |
| tree | 8bedd9ddf607ce6b3ca983702934c3c950959185 /src/codegen/c.zig | |
| parent | 58d67a6718d5d0673389fa19f5bb20812b4bb22a (diff) | |
| download | zig-964dbeb82623515b8392c8c7cb9317246812174e.tar.gz zig-964dbeb82623515b8392c8c7cb9317246812174e.zip | |
stage2: @subWithOverflow
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index f6a3105760..68b700db17 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -1157,6 +1157,7 @@ fn genBody(f: *Function, body: []const Air.Inst.Index) error{ AnalysisFail, OutO .shl_sat => try airSatOp(f, inst, "shls_"), .add_with_overflow => try airAddWithOverflow(f, inst), + .sub_with_overflow => try airSubWithOverflow(f, inst), .mul_with_overflow => try airMulWithOverflow(f, inst), .min => try airMinMax(f, inst, "<"), @@ -1874,6 +1875,12 @@ fn airAddWithOverflow(f: *Function, inst: Air.Inst.Index) !CValue { return f.fail("TODO add with overflow", .{}); } +fn airSubWithOverflow(f: *Function, inst: Air.Inst.Index) !CValue { + _ = f; + _ = inst; + return f.fail("TODO sub with overflow", .{}); +} + fn airMulWithOverflow(f: *Function, inst: Air.Inst.Index) !CValue { _ = f; _ = inst; |
