std.Target: Don't match big endian architectures in Arch.toCoffMachine().

All of these were mapping to types that are little endian. In fact, I can find
no evidence that either Windows or UEFI have ever been used on big endian
systems.
This commit is contained in:
Alex Rønne Petersen 2024-08-09 21:03:34 +02:00
parent 8516a6ab57
commit b24fc35eeb
No known key found for this signature in database

View File

@ -1253,11 +1253,11 @@ pub const Cpu = struct {
pub fn toCoffMachine(arch: Arch) std.coff.MachineType { pub fn toCoffMachine(arch: Arch) std.coff.MachineType {
return switch (arch) { return switch (arch) {
.arm => .ARM, .arm => .ARM,
.thumb, .thumbeb => .Thumb, .thumb => .Thumb,
.aarch64, .aarch64_be => .ARM64, .aarch64 => .ARM64,
.loongarch32 => .LOONGARCH32, .loongarch32 => .LOONGARCH32,
.loongarch64 => .LOONGARCH64, .loongarch64 => .LOONGARCH64,
.powerpc, .powerpcle => .POWERPC, .powerpcle => .POWERPC,
.riscv32 => .RISCV32, .riscv32 => .RISCV32,
.riscv64 => .RISCV64, .riscv64 => .RISCV64,
.x86 => .I386, .x86 => .I386,
@ -1266,6 +1266,8 @@ pub const Cpu = struct {
.amdgcn, .amdgcn,
.arc, .arc,
.armeb, .armeb,
.thumbeb,
.aarch64_be,
.avr, .avr,
.bpfel, .bpfel,
.bpfeb, .bpfeb,
@ -1282,6 +1284,7 @@ pub const Cpu = struct {
.msp430, .msp430,
.nvptx, .nvptx,
.nvptx64, .nvptx64,
.powerpc,
.powerpc64, .powerpc64,
.powerpc64le, .powerpc64le,
.s390x, .s390x,