DoxigAlpha

endian

Function parameters

Parameters

#

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
requiresLibC
Does this target require linking libc? This may be the case if the target has an unstable
cCharSignedness
Default signedness of `char` for the native C compiler for this target

Source

Implementation

#
pub fn endian(arch: Arch) std.builtin.Endian {
    return switch (arch) {
        .avr,
        .arm,
        .aarch64,
        .amdgcn,
        .bpfel,
        .csky,
        .xtensa,
        .hexagon,
        .kalimba,
        .mipsel,
        .mips64el,
        .msp430,
        .nvptx,
        .nvptx64,
        .powerpcle,
        .powerpc64le,
        .riscv32,
        .riscv64,
        .x86,
        .x86_64,
        .wasm32,
        .wasm64,
        .xcore,
        .thumb,
        .ve,
        // GPU bitness is opaque. For now, assume little endian.
        .spirv32,
        .spirv64,
        .loongarch32,
        .loongarch64,
        .arc,
        .propeller,
        => .little,

        .armeb,
        .aarch64_be,
        .bpfeb,
        .m68k,
        .mips,
        .mips64,
        .or1k,
        .powerpc,
        .powerpc64,
        .thumbeb,
        .sparc,
        .sparc64,
        .lanai,
        .s390x,
        => .big,
    };
}