authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-02 14:34:56-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-02 14:35:13-07:00
log80a9b8f326c8f2203bfd6452e9bd1c5eff0c9fe9
treebf0ef9049c2ea3b872393c6f1ba7d036db61cf69
parentedf785db0f30842b958f540a3aaf7205b8b82493

compiler: delete powerpc backend stub

nobody is currently working on this

3 files changed, 3 insertions(+), 64 deletions(-)

CMakeLists.txt-1
......@@ -559,7 +559,6 @@ set(ZIG_STAGE2_SOURCES
559559 src/arch/arm/Mir.zig
560560 src/arch/arm/abi.zig
561561 src/arch/arm/bits.zig
562 src/arch/powerpc/CodeGen.zig
563562 src/arch/riscv64/abi.zig
564563 src/arch/riscv64/bits.zig
565564 src/arch/riscv64/CodeGen.zig
src/arch/powerpc/CodeGen.zig deleted-51
......@@ -1,51 +0,0 @@
1const builtin = @import("builtin");
2const std = @import("std");
3
4const Air = @import("../../Air.zig");
5const codegen = @import("../../codegen.zig");
6const InternPool = @import("../../InternPool.zig");
7const link = @import("../../link.zig");
8const Zcu = @import("../../Zcu.zig");
9
10const assert = std.debug.assert;
11const log = std.log.scoped(.codegen);
12
13pub fn legalizeFeatures(_: *const std.Target) ?*const Air.Legalize.Features {
14 return null;
15}
16
17pub fn generate(
18 bin_file: *link.File,
19 pt: Zcu.PerThread,
20 src_loc: Zcu.LazySrcLoc,
21 func_index: InternPool.Index,
22 air: *const Air,
23 liveness: *const Air.Liveness,
24) codegen.CodeGenError!noreturn {
25 _ = bin_file;
26 _ = pt;
27 _ = src_loc;
28 _ = func_index;
29 _ = air;
30 _ = liveness;
31
32 unreachable;
33}
34
35pub fn generateLazy(
36 bin_file: *link.File,
37 pt: Zcu.PerThread,
38 src_loc: Zcu.LazySrcLoc,
39 lazy_sym: link.File.LazySymbol,
40 code: *std.ArrayListUnmanaged(u8),
41 debug_output: link.File.DebugInfoOutput,
42) codegen.CodeGenError!void {
43 _ = bin_file;
44 _ = pt;
45 _ = src_loc;
46 _ = lazy_sym;
47 _ = code;
48 _ = debug_output;
49
50 unreachable;
51}
src/codegen.zig+3-12
......@@ -34,7 +34,7 @@ fn devFeatureForBackend(backend: std.builtin.CompilerBackend) dev.Feature {
3434 .stage2_arm => .arm_backend,
3535 .stage2_c => .c_backend,
3636 .stage2_llvm => .llvm_backend,
37 .stage2_powerpc => .powerpc_backend,
37 .stage2_powerpc => unreachable,
3838 .stage2_riscv64 => .riscv64_backend,
3939 .stage2_sparc64 => .sparc64_backend,
4040 .stage2_spirv => .spirv_backend,
......@@ -52,7 +52,7 @@ fn importBackend(comptime backend: std.builtin.CompilerBackend) type {
5252 .stage2_arm => @import("arch/arm/CodeGen.zig"),
5353 .stage2_c => @import("codegen/c.zig"),
5454 .stage2_llvm => @import("codegen/llvm.zig"),
55 .stage2_powerpc => @import("arch/powerpc/CodeGen.zig"),
55 .stage2_powerpc => unreachable,
5656 .stage2_riscv64 => @import("arch/riscv64/CodeGen.zig"),
5757 .stage2_sparc64 => @import("arch/sparc64/CodeGen.zig"),
5858 .stage2_spirv => @import("codegen/spirv.zig"),
......@@ -77,7 +77,6 @@ pub fn legalizeFeatures(pt: Zcu.PerThread, nav_index: InternPool.Nav.Index) ?*co
7777 .stage2_riscv64,
7878 .stage2_sparc64,
7979 .stage2_spirv,
80 .stage2_powerpc,
8180 => |backend| {
8281 dev.check(devFeatureForBackend(backend));
8382 return importBackend(backend).legalizeFeatures(target);
......@@ -91,7 +90,6 @@ pub fn legalizeFeatures(pt: Zcu.PerThread, nav_index: InternPool.Nav.Index) ?*co
9190pub const AnyMir = union {
9291 aarch64: @import("arch/aarch64/Mir.zig"),
9392 arm: @import("arch/arm/Mir.zig"),
94 powerpc: noreturn, //@import("arch/powerpc/Mir.zig"),
9593 riscv64: @import("arch/riscv64/Mir.zig"),
9694 sparc64: @import("arch/sparc64/Mir.zig"),
9795 x86_64: @import("arch/x86_64/Mir.zig"),
......@@ -102,7 +100,6 @@ pub const AnyMir = union {
102100 return switch (backend) {
103101 .stage2_aarch64 => "aarch64",
104102 .stage2_arm => "arm",
105 .stage2_powerpc => "powerpc",
106103 .stage2_riscv64 => "riscv64",
107104 .stage2_sparc64 => "sparc64",
108105 .stage2_x86_64 => "x86_64",
......@@ -119,7 +116,6 @@ pub const AnyMir = union {
119116 else => unreachable,
120117 inline .stage2_aarch64,
121118 .stage2_arm,
122 .stage2_powerpc,
123119 .stage2_riscv64,
124120 .stage2_sparc64,
125121 .stage2_x86_64,
......@@ -150,7 +146,6 @@ pub fn generateFunction(
150146 else => unreachable,
151147 inline .stage2_aarch64,
152148 .stage2_arm,
153 .stage2_powerpc,
154149 .stage2_riscv64,
155150 .stage2_sparc64,
156151 .stage2_x86_64,
......@@ -188,7 +183,6 @@ pub fn emitFunction(
188183 else => unreachable,
189184 inline .stage2_aarch64,
190185 .stage2_arm,
191 .stage2_powerpc,
192186 .stage2_riscv64,
193187 .stage2_sparc64,
194188 .stage2_x86_64,
......@@ -215,10 +209,7 @@ pub fn generateLazyFunction(
215209 zcu.getTarget();
216210 switch (target_util.zigBackend(target, zcu.comp.config.use_llvm)) {
217211 else => unreachable,
218 inline .stage2_powerpc,
219 .stage2_riscv64,
220 .stage2_x86_64,
221 => |backend| {
212 inline .stage2_riscv64, .stage2_x86_64 => |backend| {
222213 dev.check(devFeatureForBackend(backend));
223214 return importBackend(backend).generateLazy(lf, pt, src_loc, lazy_sym, code, debug_output);
224215 },