diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-05-20 02:44:52 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-05-20 10:23:16 +0200 |
| commit | 999777e73aa1bd06b05cbe53f8c2488877e18874 (patch) | |
| tree | 2a12be70cf488ace84478c9f9f583dc50bfa9717 /src/codegen.zig | |
| parent | d000e53b291afc40da7d676553f1c9685a38f169 (diff) | |
| download | zig-999777e73aa1bd06b05cbe53f8c2488877e18874.tar.gz zig-999777e73aa1bd06b05cbe53f8c2488877e18874.zip | |
compiler: Scaffold stage2_powerpc backend.
Nothing interesting here; literally just the bare minimum so I can work on this
on and off in a branch without worrying about merge conflicts in the non-backend
code.
Diffstat (limited to 'src/codegen.zig')
| -rw-r--r-- | src/codegen.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/codegen.zig b/src/codegen.zig index fb06d7a240..c3be335acc 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -37,6 +37,7 @@ fn importBackend(comptime backend: std.builtin.CompilerBackend) type { return switch (backend) { .stage2_aarch64 => @import("arch/aarch64/CodeGen.zig"), .stage2_arm => @import("arch/arm/CodeGen.zig"), + .stage2_powerpc => @import("arch/powerpc/CodeGen.zig"), .stage2_riscv64 => @import("arch/riscv64/CodeGen.zig"), .stage2_sparc64 => @import("arch/sparc64/CodeGen.zig"), .stage2_x86_64 => @import("arch/x86_64/CodeGen.zig"), @@ -61,6 +62,7 @@ pub fn generateFunction( else => unreachable, inline .stage2_aarch64, .stage2_arm, + .stage2_powerpc, .stage2_riscv64, .stage2_sparc64, .stage2_x86_64, @@ -86,7 +88,10 @@ pub fn generateLazyFunction( zcu.getTarget(); switch (target_util.zigBackend(target, false)) { else => unreachable, - inline .stage2_x86_64, .stage2_riscv64 => |backend| { + inline .stage2_powerpc, + .stage2_riscv64, + .stage2_x86_64, + => |backend| { dev.check(devFeatureForBackend(backend)); return importBackend(backend).generateLazy(lf, pt, src_loc, lazy_sym, code, debug_output); }, |
