Function generic [src]
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.
Prototype
pub fn generic(arch: Arch) *const Model Parameters
arch: Arch Source
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, .riscv32be => &riscv.cpu.generic_rv32,
.riscv64, .riscv64be => &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,
};
}