authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-09 21:03:34+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-15 10:55:46+02:00
logb24fc35eeb417e660f4fed017d45c534bd794469
tree0baacf126479e801962301cfef9b54bf3f169911
parent8516a6ab571238527e460423dac30671c6380880
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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.

1 files changed, 6 insertions(+), 3 deletions(-)

lib/std/Target.zig+6-3
...@@ -1253,11 +1253,11 @@ pub const Cpu = struct {...@@ -1253,11 +1253,11 @@ pub const Cpu = struct {
1253 pub fn toCoffMachine(arch: Arch) std.coff.MachineType {1253 pub fn toCoffMachine(arch: Arch) std.coff.MachineType {
1254 return switch (arch) {1254 return switch (arch) {
1255 .arm => .ARM,1255 .arm => .ARM,
1256 .thumb, .thumbeb => .Thumb,1256 .thumb => .Thumb,
1257 .aarch64, .aarch64_be => .ARM64,1257 .aarch64 => .ARM64,
1258 .loongarch32 => .LOONGARCH32,1258 .loongarch32 => .LOONGARCH32,
1259 .loongarch64 => .LOONGARCH64,1259 .loongarch64 => .LOONGARCH64,
1260 .powerpc, .powerpcle => .POWERPC,1260 .powerpcle => .POWERPC,
1261 .riscv32 => .RISCV32,1261 .riscv32 => .RISCV32,
1262 .riscv64 => .RISCV64,1262 .riscv64 => .RISCV64,
1263 .x86 => .I386,1263 .x86 => .I386,
...@@ -1266,6 +1266,8 @@ pub const Cpu = struct {...@@ -1266,6 +1266,8 @@ pub const Cpu = struct {
1266 .amdgcn,1266 .amdgcn,
1267 .arc,1267 .arc,
1268 .armeb,1268 .armeb,
1269 .thumbeb,
1270 .aarch64_be,
1269 .avr,1271 .avr,
1270 .bpfel,1272 .bpfel,
1271 .bpfeb,1273 .bpfeb,
...@@ -1282,6 +1284,7 @@ pub const Cpu = struct {...@@ -1282,6 +1284,7 @@ pub const Cpu = struct {
1282 .msp430,1284 .msp430,
1283 .nvptx,1285 .nvptx,
1284 .nvptx64,1286 .nvptx64,
1287 .powerpc,
1285 .powerpc64,1288 .powerpc64,
1286 .powerpc64le,1289 .powerpc64le,
1287 .s390x,1290 .s390x,