diff options
| author | Jacob G-W <jacoblevgw@gmail.com> | 2021-08-18 22:22:12 -0400 |
|---|---|---|
| committer | Jacob G-W <jacoblevgw@gmail.com> | 2021-08-19 16:18:40 -0400 |
| commit | 2e6ce11eb29434231102c00fddd0a1b3e0ba5608 (patch) | |
| tree | e2cec62c094336d3582cb7b5d5c851dcbb04fe18 /src/codegen/c.zig | |
| parent | 7e7d67d8eed45bcf3908edd2f4ca864144fffad5 (diff) | |
| download | zig-2e6ce11eb29434231102c00fddd0a1b3e0ba5608.tar.gz zig-2e6ce11eb29434231102c00fddd0a1b3e0ba5608.zip | |
stage2: implement shr and boilerplate for shl
This implements it in the llvm and c backends.
x86_64 will have to be a little more work.
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index a67e2438c2..d3417d1567 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -871,6 +871,9 @@ fn genBody(o: *Object, body: []const Air.Inst.Index) error{ AnalysisFail, OutOfM .bit_or => try airBinOp(o, inst, " | "), .xor => try airBinOp(o, inst, " ^ "), + .shr => try airBinOp(o, inst, " >> "), + .shl => try airBinOp(o, inst, " << "), + .not => try airNot( o, inst), .optional_payload => try airOptionalPayload(o, inst), |
