Zig 0.17.0-dev (Split by item)

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 library itself.

toCoffMachine

Target.toCoffMachine
pub fn toCoffMachine(target: *const Target) std.coff.IMAGE.FILE.MACHINE

File

lib/std/Target.zig:1130

Code

pub fn toCoffMachine(target: *const Target) std.coff.IMAGE.FILE.MACHINE {
    return switch (target.cpu.arch) {
        .alpha => .ALPHA64,
        .arm => .ARM,
        .thumb => .ARMNT,
        .aarch64 => .ARM64,
        .loongarch32 => .LOONGARCH32,
        .loongarch64 => .LOONGARCH64,
        .mips => .R3000BE,
        .mipsel => .R3000,
        .mips64el => .R4000,
        .powerpcle => .POWERPC,
        .riscv32 => .RISCV32,
        .riscv64 => .RISCV64,
        .sh => .SH3,
        .x86 => .I386,
        .x86_64 => .AMD64,

        .aarch64_be,
        .amdgcn,
        .arc,
        .arceb,
        .armeb,
        .avr,
        .bpfeb,
        .bpfel,
        .csky,
        .ez80,
        .hexagon,
        .hppa,
        .hppa64,
        .kalimba,
        .kvx,
        .lanai,
        .m88k,
        .m68k,
        .microblaze,
        .microblazeel,
        .mips64,
        .msp430,
        .nvptx,
        .nvptx64,
        .or1k,
        .powerpc,
        .powerpc64,
        .powerpc64le,
        .propeller,
        .riscv32be,
        .riscv64be,
        .s390x,
        .sheb,
        .sparc,
        .sparc64,
        .spirv32,
        .spirv64,
        .thumbeb,
        .ve,
        .wasm32,
        .wasm64,
        .x86_16,
        .xcore,
        .xtensa,
        .xtensaeb,
        => .UNKNOWN,
    };
}