std.Target: Move the elfiamcu check under the x86 prong in toElfMachine().

This commit is contained in:
Alex Rønne Petersen 2024-10-08 06:35:18 +02:00
parent 6201031e05
commit 482759079f
No known key found for this signature in database

View File

@ -925,8 +925,6 @@ pub const ObjectFormat = enum {
};
pub fn toElfMachine(target: Target) std.elf.EM {
if (target.os.tag == .elfiamcu) return .IAMCU;
return switch (target.cpu.arch) {
.amdgcn => .AMDGPU,
.arc => .ARC_COMPACT,
@ -950,7 +948,7 @@ pub fn toElfMachine(target: Target) std.elf.EM {
.sparc64 => .SPARCV9,
.spu_2 => .SPU_2,
.ve => .VE,
.x86 => .@"386",
.x86 => if (target.os.tag == .elfiamcu) .IAMCU else .@"386",
.x86_64 => .X86_64,
.xcore => .XCORE,
.xtensa => .XTENSA,