aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2021-12-20 02:06:09 +0100
committerRobin Voetter <robin@voetter.nl>2021-12-21 01:41:51 +0100
commitc47ed0c912d2f445710fe4486fa071dd63601989 (patch)
tree3272549828e1ca5fbb65b43a6cad1ea6e200cbd4 /src/codegen/c.zig
parentddd2ef822f99979d3ea61583a91ab236942e6367 (diff)
downloadzig-c47ed0c912d2f445710fe4486fa071dd63601989.tar.gz
zig-c47ed0c912d2f445710fe4486fa071dd63601989.zip
stage2: @mulWithOverflow
Diffstat (limited to 'src/codegen/c.zig')
-rw-r--r--src/codegen/c.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index 070aa0a238..f6a3105760 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),
+ .mul_with_overflow => try airMulWithOverflow(f, inst),
.min => try airMinMax(f, inst, "<"),
.max => try airMinMax(f, inst, ">"),
@@ -1873,6 +1874,12 @@ fn airAddWithOverflow(f: *Function, inst: Air.Inst.Index) !CValue {
return f.fail("TODO add with overflow", .{});
}
+fn airMulWithOverflow(f: *Function, inst: Air.Inst.Index) !CValue {
+ _ = f;
+ _ = inst;
+ return f.fail("TODO mul with overflow", .{});
+}
+
fn airNot(f: *Function, inst: Air.Inst.Index) !CValue {
if (f.liveness.isUnused(inst))
return CValue.none;