Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

toElfMachine

Public Function
std.Target.toElfMachine
pub fn toElfMachine(target: *const Target) std.elf.EM

Params

File

Target.zig:1091
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
pub fn toElfMachine(target: *const Target) std.elf.EM {
    return switch (target.cpu.arch) {
        .aarch64, .aarch64_be => .AARCH64,
        .alpha => .ALPHA,
        .amdgcn => .AMDGPU,
        .arc, .arceb => .ARC_COMPACT2,
        .arm, .armeb, .thumb, .thumbeb => .ARM,
        .avr => .AVR,
        .bpfeb, .bpfel => .BPF,
        .csky => .CSKY,
        .ez80 => .Z80,
        .hexagon => .QDSP6,
        .hppa, .hppa64 => .PARISC,
        .kalimba => .CSR_KALIMBA,
        .kvx => .KVX,
        .lanai => .LANAI,
        .loongarch32, .loongarch64 => .LOONGARCH,
        .m88k => .@"88K",
        .m68k => .@"68K",
        .microblaze, .microblazeel => .MICROBLAZE,
        .mips, .mips64, .mipsel, .mips64el => .MIPS,
        .msp430 => .MSP430,
        .or1k => .OR1K,
        .powerpc, .powerpcle => .PPC,
        .powerpc64, .powerpc64le => .PPC64,
        .propeller => .PROPELLER,
        .riscv32, .riscv32be, .riscv64, .riscv64be => .RISCV,
        .s390x => .S390,
        .sh, .sheb => .SH,
        .sparc => if (target.cpu.hasAny(.sparc, &.{ .v8plus, .v9 })) .SPARC32PLUS else .SPARC,
        .sparc64 => .SPARCV9,
        .ve => .VE,
        .x86_16, .x86 => .@"386",
        .x86_64 => .X86_64,
        .xcore => .XCORE,
        .xtensa, .xtensaeb => .XTENSA,

        .nvptx,
        .nvptx64,
        .spirv32,
        .spirv64,
        .wasm32,
        .wasm64,
        .spork8,
        => .NONE,
    };
}