diff options
| author | Cody Tapscott <topolarity@tapscott.me> | 2022-02-13 15:04:46 -0700 |
|---|---|---|
| committer | Cody Tapscott <topolarity@tapscott.me> | 2022-02-18 14:28:32 -0700 |
| commit | ef417f19e147ebfa46035dac5ad800723c8fed94 (patch) | |
| tree | 147e7ec763440694c208a482b38f25c08b2b9de9 /src/codegen/c.zig | |
| parent | dee96e2e2f464c3b8edc8ec3a63cd3b1860e3a9d (diff) | |
| download | zig-ef417f19e147ebfa46035dac5ad800723c8fed94.tar.gz zig-ef417f19e147ebfa46035dac5ad800723c8fed94.zip | |
stage2: Implement `@bitReverse` and `@byteSwap`
This change implements the above built-ins for Sema and the LLVM
backend. Other backends have had placeholders added for lowering.
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 0391fa4c84..5fd3bd92ca 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -1709,6 +1709,8 @@ fn genBody(f: *Function, body: []const Air.Inst.Index) error{ AnalysisFail, OutO .clz => try airBuiltinCall(f, inst, "clz"), .ctz => try airBuiltinCall(f, inst, "ctz"), .popcount => try airBuiltinCall(f, inst, "popcount"), + .byte_swap => try airBuiltinCall(f, inst, "byte_swap"), + .bit_reverse => try airBuiltinCall(f, inst, "bit_reverse"), .tag_name => try airTagName(f, inst), .error_name => try airErrorName(f, inst), .splat => try airSplat(f, inst), |
