diff options
| author | Meghan Denny <hello@nektro.net> | 2021-08-30 00:31:40 -0700 |
|---|---|---|
| committer | Meghan Denny <hello@nektro.net> | 2021-08-30 00:31:40 -0700 |
| commit | e878a6633f2447666217a5f9247af7c34507dca0 (patch) | |
| tree | 86c3c8bb4e817ef9c09ca353c6b7481f73e0bf61 /src/codegen/c.zig | |
| parent | 56845082bc6fb88a27c18cc3403216f93dc8ba42 (diff) | |
| download | zig-e878a6633f2447666217a5f9247af7c34507dca0.tar.gz zig-e878a6633f2447666217a5f9247af7c34507dca0.zip | |
stage2: implement runtime `%` and `@rem`
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 2084b1e1ce..fd964f2829 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -858,6 +858,7 @@ fn genBody(o: *Object, body: []const Air.Inst.Index) error{ AnalysisFail, OutOfM // TODO use a different strategy for div that communicates to the optimizer // that wrapping is UB. .div => try airBinOp( o, inst, " / "), + .rem => try airBinOp( o, inst, " % "), .cmp_eq => try airBinOp(o, inst, " == "), .cmp_gt => try airBinOp(o, inst, " > "), |
