DoxigAlpha

generic

Returns the most bare-bones CPU model that is valid for arch. Note that this function can return CPU models that are understood by LLVM, but not understood by Clang. If Clang compatibility is important, consider using baseline instead.

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 generic(arch: Arch) *const Model {
    return switch (arch) {
        .amdgcn => &amdgcn.cpu.gfx600,
        .avr => &avr.cpu.avr1,
        .loongarch32 => &loongarch.cpu.generic_la32,
        .loongarch64 => &loongarch.cpu.generic_la64,
        .mips, .mipsel => &mips.cpu.mips32,
        .mips64, .mips64el => &mips.cpu.mips64,
        .nvptx, .nvptx64 => &nvptx.cpu.sm_20,
        .powerpc, .powerpcle => &powerpc.cpu.ppc,
        .powerpc64, .powerpc64le => &powerpc.cpu.ppc64,
        .propeller => &propeller.cpu.p1,
        .riscv32 => &riscv.cpu.generic_rv32,
        .riscv64 => &riscv.cpu.generic_rv64,
        .sparc64 => &sparc.cpu.v9, // SPARC can only be 64-bit from v9 and up.
        .wasm32, .wasm64 => &wasm.cpu.mvp,
        .x86 => &x86.cpu.i386,
        .x86_64 => &x86.cpu.x86_64,
        inline else => |a| &@field(Target, @tagName(a.family())).cpu.generic,
    };
}