Commit 9246c88031
Changed files (1)
lib
std
lib/std/Target.zig
@@ -1210,51 +1210,43 @@ pub const Cpu = struct {
pub fn toElfMachine(arch: Arch) std.elf.EM {
return switch (arch) {
- .avr => .AVR,
- .msp430 => .MSP430,
+ .amdgcn => .AMDGPU,
.arc => .ARC,
- .arm => .ARM,
- .armeb => .ARM,
+ .arm, .armeb, .thumb, .thumbeb => .ARM,
+ .aarch64, .aarch64_be => .AARCH64,
+ .avr => .AVR,
+ .bpfel, .bpfeb => .BPF,
+ .csky => .CSKY,
.hexagon => .HEXAGON,
- .dxil => .NONE,
+ .kalimba => .CSR_KALIMBA,
+ .lanai => .LANAI,
+ .loongarch32, .loongarch64 => .LOONGARCH,
.m68k => .@"68K",
- .mips => .MIPS,
- .mipsel => .MIPS_RS3_LE,
+ .mips, .mips64 => .MIPS,
+ .mipsel, .mips64el => .MIPS_RS3_LE,
+ .msp430 => .MSP430,
.powerpc, .powerpcle => .PPC,
- .riscv32 => .RISCV,
- .sparc => .SPARC,
- .thumb => .ARM,
- .thumbeb => .ARM,
+ .powerpc64, .powerpc64le => .PPC64,
+ .riscv32, .riscv64 => .RISCV,
+ .s390x => .S390,
+ .sparc => .SPARC, // TODO: Should be SPARC32PLUS when targeting 32-bit v9.
+ .sparc64 => .SPARCV9,
+ .spu_2 => .SPU_2,
.x86 => .@"386",
+ .x86_64 => .X86_64,
.xcore => .XCORE,
.xtensa => .XTENSA,
- .nvptx => .NONE,
- .kalimba => .CSR_KALIMBA,
- .lanai => .LANAI,
- .wasm32 => .NONE,
- .aarch64 => .AARCH64,
- .aarch64_be => .AARCH64,
- .mips64 => .MIPS,
- .mips64el => .MIPS_RS3_LE,
- .powerpc64 => .PPC64,
- .powerpc64le => .PPC64,
- .riscv64 => .RISCV,
- .x86_64 => .X86_64,
- .nvptx64 => .NONE,
- .wasm64 => .NONE,
- .amdgcn => .AMDGPU,
- .bpfel => .BPF,
- .bpfeb => .BPF,
- .csky => .CSKY,
- .sparc64 => .SPARCV9,
- .s390x => .S390,
- .ve => .NONE,
- .spu_2 => .SPU_2,
- .spirv => .NONE,
- .spirv32 => .NONE,
- .spirv64 => .NONE,
- .loongarch32 => .LOONGARCH,
- .loongarch64 => .LOONGARCH,
+
+ .dxil,
+ .nvptx,
+ .nvptx64,
+ .spirv,
+ .spirv32,
+ .spirv64,
+ .ve,
+ .wasm32,
+ .wasm64,
+ => .NONE,
};
}