authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-08-01 01:32:32-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-08-01 01:32:32-07:00
log8f7cbaa4c0cebc22613a33d212569cf221d6a3df
tree69f542e4fbe140e088924af02c731402f947c4d8
parentf17f73b4fa5640b7f070b80ada5e52e28e93608d
parent62a01851d9c433ea3f2e98cc986e75d32aece443
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #20870 from alexrp/target-cleanup-3

`std.Target`: Remove more dead OS/architecture tags

21 files changed, 42 insertions(+), 110 deletions(-)

lib/compiler/aro/aro/Compilation.zig+2-2
......@@ -363,7 +363,7 @@ fn generateSystemDefines(comp: *Compilation, w: anytype) !void {
363363 \\#define __sparc_v9__ 1
364364 \\
365365 ),
366 .sparc, .sparcel => try w.writeAll(
366 .sparc => try w.writeAll(
367367 \\#define __sparc__ 1
368368 \\#define __sparc 1
369369 \\
......@@ -534,7 +534,7 @@ pub fn generateBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefi
534534
535535 if (system_defines_mode == .include_system_defines) {
536536 try buf.appendSlice(
537 \\#define __VERSION__ "Aro
537 \\#define __VERSION__ "Aro
538538 ++ @import("../backend.zig").version_str ++ "\"\n" ++
539539 \\#define __Aro__
540540 \\
lib/compiler/aro/aro/Driver/GCCDetector.zig+1-1
......@@ -376,7 +376,7 @@ fn collectLibDirsAndTriples(
376376 biarch_libdirs.appendSliceAssumeCapacity(&RISCV32LibDirs);
377377 biarch_triple_aliases.appendSliceAssumeCapacity(&RISCV32Triples);
378378 },
379 .sparc, .sparcel => {
379 .sparc => {
380380 lib_dirs.appendSliceAssumeCapacity(&SPARCv8LibDirs);
381381 triple_aliases.appendSliceAssumeCapacity(&SPARCv8Triples);
382382 biarch_libdirs.appendSliceAssumeCapacity(&SPARCv9LibDirs);
lib/compiler/aro/aro/target.zig+3-15
......@@ -53,13 +53,12 @@ pub fn intPtrType(target: std.Target) Type {
5353 .xcore,
5454 .hexagon,
5555 .m68k,
56 .spir,
5756 .spirv32,
5857 .arc,
5958 .avr,
6059 => return .{ .specifier = .int },
6160
62 .sparc, .sparcel => switch (target.os.tag) {
61 .sparc => switch (target.os.tag) {
6362 .netbsd, .openbsd => {},
6463 else => return .{ .specifier = .int },
6564 },
......@@ -133,7 +132,7 @@ pub fn defaultFunctionAlignment(target: std.Target) u8 {
133132 return switch (target.cpu.arch) {
134133 .arm, .armeb => 4,
135134 .aarch64, .aarch64_be => 4,
136 .sparc, .sparcel, .sparc64 => 4,
135 .sparc, .sparc64 => 4,
137136 .riscv64 => 2,
138137 else => 1,
139138 };
......@@ -427,7 +426,7 @@ pub fn ldEmulationOption(target: std.Target, arm_endianness: ?std.builtin.Endian
427426 .powerpc64le => "elf64lppc",
428427 .riscv32 => "elf32lriscv",
429428 .riscv64 => "elf64lriscv",
430 .sparc, .sparcel => "elf32_sparc",
429 .sparc => "elf32_sparc",
431430 .sparc64 => "elf64_sparc",
432431 .loongarch32 => "elf32loongarch",
433432 .loongarch64 => "elf64loongarch",
......@@ -467,13 +466,11 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
467466 .powerpcle,
468467 .riscv32,
469468 .sparc,
470 .sparcel,
471469 .thumb,
472470 .thumbeb,
473471 .x86,
474472 .xcore,
475473 .nvptx,
476 .spir,
477474 .kalimba,
478475 .lanai,
479476 .wasm32,
......@@ -487,7 +484,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
487484 .aarch64_be => copy.cpu.arch = .armeb,
488485 .nvptx64 => copy.cpu.arch = .nvptx,
489486 .wasm64 => copy.cpu.arch = .wasm32,
490 .spir64 => copy.cpu.arch = .spir,
491487 .spirv64 => copy.cpu.arch = .spirv32,
492488 .loongarch64 => copy.cpu.arch = .loongarch32,
493489 .mips64 => copy.cpu.arch = .mips,
......@@ -513,7 +509,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
513509 .lanai,
514510 .m68k,
515511 .msp430,
516 .sparcel,
517512 .spu_2,
518513 .xcore,
519514 .xtensa,
......@@ -526,7 +521,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
526521 .bpfel,
527522 .nvptx64,
528523 .wasm64,
529 .spir64,
530524 .spirv64,
531525 .loongarch64,
532526 .mips64,
......@@ -550,7 +544,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
550544 .powerpcle => copy.cpu.arch = .powerpc64le,
551545 .riscv32 => copy.cpu.arch = .riscv64,
552546 .sparc => copy.cpu.arch = .sparc64,
553 .spir => copy.cpu.arch = .spir64,
554547 .spirv32 => copy.cpu.arch = .spirv64,
555548 .thumb => copy.cpu.arch = .aarch64,
556549 .thumbeb => copy.cpu.arch = .aarch64_be,
......@@ -597,7 +590,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
597590 .riscv64 => "riscv64",
598591 .sparc => "sparc",
599592 .sparc64 => "sparc64",
600 .sparcel => "sparcel",
601593 .s390x => "s390x",
602594 .thumb => "thumb",
603595 .thumbeb => "thumbeb",
......@@ -607,8 +599,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
607599 .xtensa => "xtensa",
608600 .nvptx => "nvptx",
609601 .nvptx64 => "nvptx64",
610 .spir => "spir",
611 .spir64 => "spir64",
612602 .spirv32 => "spirv32",
613603 .spirv64 => "spirv64",
614604 .kalimba => "kalimba",
......@@ -624,8 +614,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
624614
625615 const llvm_os = switch (target.os.tag) {
626616 .freestanding => "unknown",
627 .ananas => "ananas",
628 .cloudabi => "cloudabi",
629617 .dragonfly => "dragonfly",
630618 .freebsd => "freebsd",
631619 .fuchsia => "fuchsia",
lib/compiler/aro/aro/toolchains/Linux.zig-1
......@@ -357,7 +357,6 @@ fn getOSLibDir(target: std.Target) []const u8 {
357357 .powerpc,
358358 .powerpcle,
359359 .sparc,
360 .sparcel,
361360 => return "lib32",
362361 else => {},
363362 }
lib/compiler_rt/atomics.zig+1-1
......@@ -30,7 +30,7 @@ const largest_atomic_size = switch (arch) {
3030 // On SPARC systems that lacks CAS and/or swap instructions, the only
3131 // available atomic operation is a test-and-set (`ldstub`), so we force
3232 // every atomic memory access to go through the lock.
33 .sparc, .sparcel => if (cpu.features.featureSetHas(.hasleoncasa)) @sizeOf(usize) else 0,
33 .sparc => if (cpu.features.featureSetHas(.hasleoncasa)) @sizeOf(usize) else 0,
3434
3535 // XXX: On x86/x86_64 we could check the presence of cmpxchg8b/cmpxchg16b
3636 // and set this parameter accordingly.
lib/compiler_rt/clear_cache.zig+1-1
......@@ -41,7 +41,7 @@ fn clear_cache(start: usize, end: usize) callconv(.C) void {
4141 else => false,
4242 };
4343 const sparc = switch (arch) {
44 .sparc, .sparc64, .sparcel => true,
44 .sparc, .sparc64 => true,
4545 else => false,
4646 };
4747 const apple = switch (os) {
lib/std/Target.zig+12-48
......@@ -17,8 +17,6 @@ pub const Os = struct {
1717
1818 pub const Tag = enum {
1919 freestanding,
20 ananas,
21 cloudabi,
2220 dragonfly,
2321 freebsd,
2422 fuchsia,
......@@ -140,8 +138,6 @@ pub const Os = struct {
140138 pub inline fn getVersionRangeTag(tag: Tag) @typeInfo(TaggedVersionRange).Union.tag_type.? {
141139 return switch (tag) {
142140 .freestanding,
143 .ananas,
144 .cloudabi,
145141 .fuchsia,
146142 .ps3,
147143 .zos,
......@@ -202,7 +198,7 @@ pub const Os = struct {
202198 .mips, .mipsel, .mips64, .mips64el => "mips",
203199 .powerpc, .powerpcle, .powerpc64, .powerpc64le => "powerpc",
204200 .riscv32, .riscv64 => "riscv",
205 .sparc, .sparcel, .sparc64 => "sparc",
201 .sparc, .sparc64 => "sparc",
206202 .x86, .x86_64 => "x86",
207203 else => @tagName(arch),
208204 },
......@@ -373,8 +369,6 @@ pub const Os = struct {
373369 pub fn default(tag: Tag, arch: Cpu.Arch) VersionRange {
374370 return switch (tag) {
375371 .freestanding,
376 .ananas,
377 .cloudabi,
378372 .fuchsia,
379373 .ps3,
380374 .zos,
......@@ -560,8 +554,6 @@ pub const Os = struct {
560554 .linux,
561555 .windows,
562556 .freestanding,
563 .ananas,
564 .cloudabi,
565557 .fuchsia,
566558 .ps3,
567559 .zos,
......@@ -667,8 +659,6 @@ pub const Abi = enum {
667659 pub fn default(arch: Cpu.Arch, os: Os) Abi {
668660 return if (arch.isWasm()) .musl else switch (os.tag) {
669661 .freestanding,
670 .ananas,
671 .cloudabi,
672662 .dragonfly,
673663 .ps3,
674664 .zos,
......@@ -1018,7 +1008,6 @@ pub const Cpu = struct {
10181008 riscv64,
10191009 sparc,
10201010 sparc64,
1021 sparcel,
10221011 s390x,
10231012 thumb,
10241013 thumbeb,
......@@ -1028,8 +1017,6 @@ pub const Cpu = struct {
10281017 xtensa,
10291018 nvptx,
10301019 nvptx64,
1031 spir,
1032 spir64,
10331020 spirv,
10341021 spirv32,
10351022 spirv64,
......@@ -1043,12 +1030,17 @@ pub const Cpu = struct {
10431030 // LLVM tags deliberately omitted:
10441031 // - aarch64_32
10451032 // - r600
1033 // - sparcel
1034 // - tce
1035 // - tcele
10461036 // - le32
10471037 // - le64
10481038 // - amdil
10491039 // - amdil64
10501040 // - hsail
10511041 // - hsail64
1042 // - spir
1043 // - spir64
10521044 // - shave
10531045 // - renderscript32
10541046 // - renderscript64
......@@ -1122,7 +1114,7 @@ pub const Cpu = struct {
11221114
11231115 pub inline fn isSPARC(arch: Arch) bool {
11241116 return switch (arch) {
1125 .sparc, .sparcel, .sparc64 => true,
1117 .sparc, .sparc64 => true,
11261118 else => false,
11271119 };
11281120 }
......@@ -1172,14 +1164,12 @@ pub const Cpu = struct {
11721164 .powerpc, .powerpcle => .PPC,
11731165 .riscv32 => .RISCV,
11741166 .sparc => .SPARC,
1175 .sparcel => .SPARC,
11761167 .thumb => .ARM,
11771168 .thumbeb => .ARM,
11781169 .x86 => .@"386",
11791170 .xcore => .XCORE,
11801171 .xtensa => .XTENSA,
11811172 .nvptx => .NONE,
1182 .spir => .NONE,
11831173 .kalimba => .CSR_KALIMBA,
11841174 .lanai => .LANAI,
11851175 .wasm32 => .NONE,
......@@ -1192,7 +1182,6 @@ pub const Cpu = struct {
11921182 .riscv64 => .RISCV,
11931183 .x86_64 => .X86_64,
11941184 .nvptx64 => .NONE,
1195 .spir64 => .NONE,
11961185 .wasm64 => .NONE,
11971186 .amdgcn => .AMDGPU,
11981187 .bpfel => .BPF,
......@@ -1225,14 +1214,12 @@ pub const Cpu = struct {
12251214 .powerpc, .powerpcle => .POWERPC,
12261215 .riscv32 => .RISCV32,
12271216 .sparc => .Unknown,
1228 .sparcel => .Unknown,
12291217 .thumb => .Thumb,
12301218 .thumbeb => .Thumb,
12311219 .x86 => .I386,
12321220 .xcore => .Unknown,
12331221 .xtensa => .Unknown,
12341222 .nvptx => .Unknown,
1235 .spir => .Unknown,
12361223 .kalimba => .Unknown,
12371224 .lanai => .Unknown,
12381225 .wasm32 => .Unknown,
......@@ -1245,7 +1232,6 @@ pub const Cpu = struct {
12451232 .riscv64 => .RISCV64,
12461233 .x86_64 => .X64,
12471234 .nvptx64 => .Unknown,
1248 .spir64 => .Unknown,
12491235 .wasm64 => .Unknown,
12501236 .amdgcn => .Unknown,
12511237 .bpfel => .Unknown,
......@@ -1279,7 +1265,6 @@ pub const Cpu = struct {
12791265 .msp430,
12801266 .nvptx,
12811267 .nvptx64,
1282 .sparcel,
12831268 .powerpcle,
12841269 .powerpc64le,
12851270 .riscv32,
......@@ -1290,8 +1275,6 @@ pub const Cpu = struct {
12901275 .wasm64,
12911276 .xcore,
12921277 .thumb,
1293 .spir,
1294 .spir64,
12951278 .ve,
12961279 .spu_2,
12971280 // GPU bitness is opaque. For now, assume little endian.
......@@ -1348,7 +1331,7 @@ pub const Cpu = struct {
13481331 .powerpc, .powerpcle, .powerpc64, .powerpc64le => "powerpc",
13491332 .amdgcn => "amdgpu",
13501333 .riscv32, .riscv64 => "riscv",
1351 .sparc, .sparc64, .sparcel => "sparc",
1334 .sparc, .sparc64 => "sparc",
13521335 .s390x => "s390x",
13531336 .x86, .x86_64 => "x86",
13541337 .nvptx, .nvptx64 => "nvptx",
......@@ -1375,7 +1358,7 @@ pub const Cpu = struct {
13751358 .powerpc, .powerpcle, .powerpc64, .powerpc64le => &powerpc.all_features,
13761359 .amdgcn => &amdgpu.all_features,
13771360 .riscv32, .riscv64 => &riscv.all_features,
1378 .sparc, .sparc64, .sparcel => &sparc.all_features,
1361 .sparc, .sparc64 => &sparc.all_features,
13791362 .spirv32, .spirv64 => &spirv.all_features,
13801363 .s390x => &s390x.all_features,
13811364 .x86, .x86_64 => &x86.all_features,
......@@ -1405,7 +1388,7 @@ pub const Cpu = struct {
14051388 .powerpc, .powerpcle, .powerpc64, .powerpc64le => comptime allCpusFromDecls(powerpc.cpu),
14061389 .amdgcn => comptime allCpusFromDecls(amdgpu.cpu),
14071390 .riscv32, .riscv64 => comptime allCpusFromDecls(riscv.cpu),
1408 .sparc, .sparc64, .sparcel => comptime allCpusFromDecls(sparc.cpu),
1391 .sparc, .sparc64 => comptime allCpusFromDecls(sparc.cpu),
14091392 .spirv32, .spirv64 => comptime allCpusFromDecls(spirv.cpu),
14101393 .s390x => comptime allCpusFromDecls(s390x.cpu),
14111394 .x86, .x86_64 => comptime allCpusFromDecls(x86.cpu),
......@@ -1497,7 +1480,7 @@ pub const Cpu = struct {
14971480 .riscv32 => &riscv.cpu.generic_rv32,
14981481 .riscv64 => &riscv.cpu.generic_rv64,
14991482 .spirv32, .spirv64 => &spirv.cpu.generic,
1500 .sparc, .sparcel => &sparc.cpu.generic,
1483 .sparc => &sparc.cpu.generic,
15011484 .sparc64 => &sparc.cpu.v9, // 64-bit SPARC needs v9 as the baseline
15021485 .s390x => &s390x.cpu.generic,
15031486 .x86 => &x86.cpu.i386,
......@@ -1519,7 +1502,7 @@ pub const Cpu = struct {
15191502 .x86 => &x86.cpu.pentium4,
15201503 .nvptx, .nvptx64 => &nvptx.cpu.sm_20,
15211504 .s390x => &s390x.cpu.arch8,
1522 .sparc, .sparcel => &sparc.cpu.v8,
1505 .sparc => &sparc.cpu.v8,
15231506 .loongarch64 => &loongarch.cpu.loongarch64,
15241507
15251508 else => generic(arch),
......@@ -1704,7 +1687,6 @@ pub const DynamicLinker = struct {
17041687 .linux => switch (cpu.arch) {
17051688 .x86,
17061689 .sparc,
1707 .sparcel,
17081690 => init("/lib/ld-linux.so.2"),
17091691
17101692 .aarch64 => init("/lib/ld-linux-aarch64.so.1"),
......@@ -1773,8 +1755,6 @@ pub const DynamicLinker = struct {
17731755 .msp430,
17741756 .amdgcn,
17751757 .xcore,
1776 .spir,
1777 .spir64,
17781758 .kalimba,
17791759 .lanai,
17801760 .ve,
......@@ -1811,8 +1791,6 @@ pub const DynamicLinker = struct {
18111791
18121792 // TODO go over each item in this list and either move it to the above list, or
18131793 // implement the standard dynamic linker path code for it.
1814 .ananas,
1815 .cloudabi,
18161794 .fuchsia,
18171795 .ps3,
18181796 .zos,
......@@ -1865,13 +1843,11 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 {
18651843 .powerpc,
18661844 .powerpcle,
18671845 .riscv32,
1868 .sparcel,
18691846 .thumb,
18701847 .thumbeb,
18711848 .x86,
18721849 .xcore,
18731850 .nvptx,
1874 .spir,
18751851 .kalimba,
18761852 .lanai,
18771853 .wasm32,
......@@ -1890,7 +1866,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 {
18901866 .riscv64,
18911867 .x86_64,
18921868 .nvptx64,
1893 .spir64,
18941869 .wasm64,
18951870 .amdgcn,
18961871 .bpfel,
......@@ -1927,7 +1902,6 @@ pub fn stackAlignment(target: Target) u16 {
19271902 .mips,
19281903 .mipsel,
19291904 .sparc,
1930 .sparcel,
19311905 => 8,
19321906 .aarch64,
19331907 .aarch64_be,
......@@ -2088,7 +2062,6 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 {
20882062 .s390x,
20892063 .sparc,
20902064 .sparc64,
2091 .sparcel,
20922065 .wasm32,
20932066 .wasm64,
20942067 .loongarch32,
......@@ -2111,7 +2084,6 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 {
21112084 .solaris,
21122085 .illumos,
21132086 .haiku,
2114 .ananas,
21152087 .fuchsia,
21162088 .minix,
21172089 => switch (target.cpu.arch) {
......@@ -2195,7 +2167,6 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 {
21952167 .mips64el,
21962168 .sparc,
21972169 .sparc64,
2198 .sparcel,
21992170 .wasm32,
22002171 .wasm64,
22012172 .loongarch32,
......@@ -2307,7 +2278,6 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 {
23072278 .longdouble => return 80,
23082279 },
23092280
2310 .cloudabi,
23112281 .ps3,
23122282 .zos,
23132283 .rtems,
......@@ -2375,7 +2345,6 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 {
23752345 .xcore,
23762346 .dxil,
23772347 .loongarch32,
2378 .spir,
23792348 .spirv32,
23802349 .kalimba,
23812350 .ve,
......@@ -2392,13 +2361,11 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 {
23922361 .mips,
23932362 .mipsel,
23942363 .sparc,
2395 .sparcel,
23962364 .sparc64,
23972365 .lanai,
23982366 .nvptx,
23992367 .nvptx64,
24002368 .s390x,
2401 .spir64,
24022369 .spirv64,
24032370 => 8,
24042371
......@@ -2483,7 +2450,6 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 {
24832450 .xcore,
24842451 .dxil,
24852452 .loongarch32,
2486 .spir,
24872453 .spirv32,
24882454 .kalimba,
24892455 .ve,
......@@ -2507,13 +2473,11 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 {
25072473 .mips,
25082474 .mipsel,
25092475 .sparc,
2510 .sparcel,
25112476 .sparc64,
25122477 .lanai,
25132478 .nvptx,
25142479 .nvptx64,
25152480 .s390x,
2516 .spir64,
25172481 .spirv64,
25182482 => 8,
25192483
lib/std/atomic.zig-1
......@@ -478,7 +478,6 @@ pub const cache_line = switch (builtin.cpu.arch) {
478478 .riscv32,
479479 .riscv64,
480480 .sparc,
481 .sparcel,
482481 .sparc64,
483482 => 32,
484483
lib/std/builtin.zig+1-1
......@@ -615,7 +615,7 @@ pub const VaList = switch (builtin.cpu.arch) {
615615 else => VaListPowerPc,
616616 },
617617 .powerpc64, .powerpc64le => *u8,
618 .sparc, .sparcel, .sparc64 => *anyopaque,
618 .sparc, .sparc64 => *anyopaque,
619619 .spirv32, .spirv64 => *anyopaque,
620620 .s390x => VaListS390x,
621621 .wasm32, .wasm64 => *anyopaque,
lib/std/c.zig+3-3
......@@ -5779,7 +5779,7 @@ pub const ucontext_t = switch (native_os) {
57795779 .x86 => 4,
57805780 .mips, .mipsel, .mips64, .mips64el => 14,
57815781 .arm, .armeb, .thumb, .thumbeb => 1,
5782 .sparc, .sparcel, .sparc64 => if (@sizeOf(usize) == 4) 43 else 8,
5782 .sparc, .sparc64 => if (@sizeOf(usize) == 4) 43 else 8,
57835783 else => 0,
57845784 }
57855785 ]u32,
......@@ -6821,7 +6821,7 @@ pub const pthread_key_t = switch (native_os) {
68216821pub const padded_pthread_spin_t = switch (native_os) {
68226822 .netbsd => switch (builtin.cpu.arch) {
68236823 .x86, .x86_64 => u32,
6824 .sparc, .sparcel, .sparc64 => u32,
6824 .sparc, .sparc64 => u32,
68256825 else => pthread_spin_t,
68266826 },
68276827 else => void,
......@@ -6834,7 +6834,7 @@ pub const pthread_spin_t = switch (native_os) {
68346834 .powerpc, .powerpc64, .powerpc64le => i32,
68356835 .x86, .x86_64 => u8,
68366836 .arm, .armeb, .thumb, .thumbeb => i32,
6837 .sparc, .sparcel, .sparc64 => u8,
6837 .sparc, .sparc64 => u8,
68386838 .riscv32, .riscv64 => u32,
68396839 else => @compileError("undefined pthread_spin_t for this arch"),
68406840 },
lib/std/os/linux.zig+1-3
......@@ -2496,7 +2496,7 @@ pub const E = switch (native_arch) {
24962496
24972497 pub const init = errnoFromSyscall;
24982498 },
2499 .sparc, .sparcel, .sparc64 => enum(u16) {
2499 .sparc, .sparc64 => enum(u16) {
25002500 /// No error occurred.
25012501 SUCCESS = 0,
25022502
......@@ -4843,7 +4843,6 @@ pub const MINSIGSTKSZ = switch (native_arch) {
48434843 => 2048,
48444844 .loongarch64,
48454845 .sparc,
4846 .sparcel,
48474846 .sparc64,
48484847 => 4096,
48494848 .aarch64,
......@@ -4880,7 +4879,6 @@ pub const SIGSTKSZ = switch (native_arch) {
48804879 .aarch64_be,
48814880 .loongarch64,
48824881 .sparc,
4883 .sparcel,
48844882 .sparc64,
48854883 => 16384,
48864884 .powerpc64,
lib/std/os/linux/ioctl.zig-1
......@@ -11,7 +11,6 @@ const bits = switch (@import("builtin").cpu.arch) {
1111 .powerpc64le,
1212 .sparc,
1313 .sparc64,
14 .sparcel,
1514 => .{ .size = 13, .dir = 3, .none = 1, .read = 2, .write = 4 },
1615 else => .{ .size = 14, .dir = 2, .none = 0, .read = 2, .write = 1 },
1716};
src/Type.zig-3
......@@ -1602,7 +1602,6 @@ pub fn maxIntAlignment(target: std.Target, use_llvm: bool) u16 {
16021602 .amdgcn,
16031603 .riscv32,
16041604 .sparc,
1605 .sparcel,
16061605 .s390x,
16071606 .lanai,
16081607 .wasm32,
......@@ -1647,11 +1646,9 @@ pub fn maxIntAlignment(target: std.Target, use_llvm: bool) u16 {
16471646 .csky,
16481647 .arc,
16491648 .m68k,
1650 .spir,
16511649 .kalimba,
16521650 .spirv,
16531651 .spirv32,
1654 .spir64,
16551652 .ve,
16561653 .spirv64,
16571654 .dxil,
src/Zcu.zig-3
......@@ -3248,12 +3248,10 @@ pub fn atomicPtrAlignment(
32483248 .powerpcle,
32493249 .riscv32,
32503250 .sparc,
3251 .sparcel,
32523251 .thumb,
32533252 .thumbeb,
32543253 .x86,
32553254 .xcore,
3256 .spir,
32573255 .kalimba,
32583256 .lanai,
32593257 .wasm32,
......@@ -3275,7 +3273,6 @@ pub fn atomicPtrAlignment(
32753273 .riscv64,
32763274 .sparc64,
32773275 .s390x,
3278 .spir64,
32793276 .wasm64,
32803277 .ve,
32813278 .spirv64,
src/codegen/llvm.zig+1-14
......@@ -69,7 +69,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
6969 .riscv64 => "riscv64",
7070 .sparc => "sparc",
7171 .sparc64 => "sparc64",
72 .sparcel => "sparcel",
7372 .s390x => "s390x",
7473 .thumb => "thumb",
7574 .thumbeb => "thumbeb",
......@@ -79,8 +78,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
7978 .xtensa => "xtensa",
8079 .nvptx => "nvptx",
8180 .nvptx64 => "nvptx64",
82 .spir => "spir",
83 .spir64 => "spir64",
8481 .spirv => "spirv",
8582 .spirv32 => "spirv32",
8683 .spirv64 => "spirv64",
......@@ -136,8 +133,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
136133 .opencl,
137134 .glsl450,
138135 .plan9,
139 .ananas,
140 .cloudabi,
141136 .minix,
142137 .contiki,
143138 .other,
......@@ -208,8 +203,6 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType {
208203 .opencl,
209204 .glsl450,
210205 .plan9,
211 .ananas,
212 .cloudabi,
213206 .minix,
214207 .contiki,
215208 => .UnknownOS,
......@@ -282,7 +275,6 @@ pub fn targetArch(arch_tag: std.Target.Cpu.Arch) llvm.ArchType {
282275 .riscv64 => .riscv64,
283276 .sparc => .sparc,
284277 .sparc64 => .sparcv9, // In LLVM, sparc64 == sparcv9.
285 .sparcel => .sparcel,
286278 .s390x => .systemz,
287279 .thumb => .thumb,
288280 .thumbeb => .thumbeb,
......@@ -292,8 +284,6 @@ pub fn targetArch(arch_tag: std.Target.Cpu.Arch) llvm.ArchType {
292284 .xtensa => .xtensa,
293285 .nvptx => .nvptx,
294286 .nvptx64 => .nvptx64,
295 .spir => .spir,
296 .spir64 => .spir64,
297287 .spirv => .spirv,
298288 .spirv32 => .spirv32,
299289 .spirv64 => .spirv64,
......@@ -473,7 +463,6 @@ const DataLayoutBuilder = struct {
473463 .powerpcle,
474464 .riscv32,
475465 .sparc,
476 .sparcel,
477466 .thumb,
478467 .thumbeb,
479468 .xtensa,
......@@ -12008,7 +11997,7 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void {
1200811997 llvm.LLVMInitializeRISCVAsmPrinter();
1200911998 llvm.LLVMInitializeRISCVAsmParser();
1201011999 },
12011 .sparc, .sparc64, .sparcel => {
12000 .sparc, .sparc64 => {
1201212001 llvm.LLVMInitializeSparcTarget();
1201312002 llvm.LLVMInitializeSparcTargetInfo();
1201412003 llvm.LLVMInitializeSparcTargetMC();
......@@ -12095,8 +12084,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void {
1209512084 },
1209612085
1209712086 // LLVM backends that have no initialization functions.
12098 .spir,
12099 .spir64,
1210012087 .spirv,
1210112088 .spirv32,
1210212089 .spirv64,
src/glibc.zig+13-2
......@@ -122,6 +122,17 @@ pub fn loadMetaData(gpa: Allocator, contents: []const u8) LoadMetaDataError!*ABI
122122 return error.ZigInstallationCorrupt;
123123 };
124124 const arch_tag = std.meta.stringToEnum(std.Target.Cpu.Arch, arch_name) orelse {
125 // TODO: Remove this on the next glibc abilists update.
126 if (mem.eql(u8, arch_name, "sparcel")) {
127 targets[i] = .{
128 .arch = .sparc,
129 .os = .linux,
130 .abi = .gnu,
131 };
132
133 continue;
134 }
135
125136 log.err("abilists: unrecognized arch: '{s}'", .{arch_name});
126137 return error.ZigInstallationCorrupt;
127138 };
......@@ -394,7 +405,7 @@ fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![
394405 const arch = comp.getTarget().cpu.arch;
395406 const is_ppc = arch == .powerpc or arch == .powerpc64 or arch == .powerpc64le;
396407 const is_aarch64 = arch == .aarch64 or arch == .aarch64_be;
397 const is_sparc = arch == .sparc or arch == .sparcel or arch == .sparc64;
408 const is_sparc = arch == .sparc or arch == .sparc64;
398409 const is_64 = comp.getTarget().ptrBitWidth() == 64;
399410
400411 const s = path.sep_str;
......@@ -532,7 +543,7 @@ fn add_include_dirs_arch(
532543 const is_x86 = arch == .x86 or arch == .x86_64;
533544 const is_aarch64 = arch == .aarch64 or arch == .aarch64_be;
534545 const is_ppc = arch == .powerpc or arch == .powerpc64 or arch == .powerpc64le;
535 const is_sparc = arch == .sparc or arch == .sparcel or arch == .sparc64;
546 const is_sparc = arch == .sparc or arch == .sparc64;
536547 const is_64 = target.ptrBitWidth() == 64;
537548
538549 const s = path.sep_str;
src/link/Elf.zig+1-1
......@@ -4901,7 +4901,7 @@ fn getLDMOption(target: std.Target) ?[]const u8 {
49014901 .powerpc => return "elf32ppclinux",
49024902 .powerpc64 => return "elf64ppc",
49034903 .powerpc64le => return "elf64lppc",
4904 .sparc, .sparcel => return "elf32_sparc",
4904 .sparc => return "elf32_sparc",
49054905 .sparc64 => return "elf64_sparc",
49064906 .mips => return "elf32btsmip",
49074907 .mipsel => return "elf32ltsmip",
src/link/Plan9/aout.zig+1-1
......@@ -110,7 +110,7 @@ pub const R_MAGIC = _MAGIC(HDR_MAGIC, 28); // arm64
110110pub fn magicFromArch(arch: std.Target.Cpu.Arch) !u32 {
111111 return switch (arch) {
112112 .x86 => I_MAGIC,
113 .sparc => K_MAGIC, // TODO should sparc64 and sparcel go here?
113 .sparc => K_MAGIC, // TODO should sparc64 go here?
114114 .mips => V_MAGIC,
115115 .arm => E_MAGIC,
116116 .aarch64 => R_MAGIC,
src/target.zig+1-5
......@@ -138,7 +138,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
138138 .riscv64,
139139 .sparc,
140140 .sparc64,
141 .sparcel,
142141 .s390x,
143142 .thumb,
144143 .thumbeb,
......@@ -148,8 +147,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool {
148147 .xtensa,
149148 .nvptx,
150149 .nvptx64,
151 .spir,
152 .spir64,
153150 .spirv,
154151 .spirv32,
155152 .spirv64,
......@@ -410,7 +407,7 @@ pub fn defaultFunctionAlignment(target: std.Target) Alignment {
410407 return switch (target.cpu.arch) {
411408 .arm, .armeb => .@"4",
412409 .aarch64, .aarch64_be => .@"4",
413 .sparc, .sparcel, .sparc64 => .@"4",
410 .sparc, .sparc64 => .@"4",
414411 .riscv64 => .@"2",
415412 else => .@"1",
416413 };
......@@ -425,7 +422,6 @@ pub fn minFunctionAlignment(target: std.Target) Alignment {
425422 .riscv32,
426423 .riscv64,
427424 .sparc,
428 .sparcel,
429425 .sparc64,
430426 => .@"2",
431427 else => .@"1",
test/behavior/align.zig-1
......@@ -95,7 +95,6 @@ test "alignment and size of structs with 128-bit fields" {
9595 .amdgcn,
9696 .riscv32,
9797 .sparc,
98 .sparcel,
9998 .s390x,
10099 .lanai,
101100 .wasm32,
test/llvm_targets.zig-2
......@@ -87,8 +87,6 @@ const targets = [_]std.Target.Query{
8787 .{ .cpu_arch = .sparc, .os_tag = .freestanding, .abi = .none },
8888 .{ .cpu_arch = .sparc, .os_tag = .linux, .abi = .gnu },
8989 .{ .cpu_arch = .sparc, .os_tag = .linux, .abi = .none },
90 .{ .cpu_arch = .sparcel, .os_tag = .freestanding, .abi = .none },
91 .{ .cpu_arch = .sparcel, .os_tag = .linux, .abi = .gnu },
9290 .{ .cpu_arch = .sparc64, .os_tag = .freestanding, .abi = .none },
9391 .{ .cpu_arch = .sparc64, .os_tag = .linux, .abi = .gnu },
9492 //.{ .cpu_arch = .spirv32, .os_tag = .opencl, .abi = .none },