zig/lib/std/target/nvptx.zig
Andrew Kelley d55d98919d update CPU features to LLVM 14
Notable changes:

`_i386`, `_i486`, and `_i686` are renamed to `i386`, `i486`,
and `i686` respectively. `std.zig.fmtId` is enhanced to support
formatting `i386` as `@"i386"`.

Some CPU features which are actually CPU models have been
properly flattened, such as `apple_a12`, `apple_a13`, `apple_a7`,
`cortex_a78c`, `exynos_m4`, `neoverse_e1`, `neoverse_n1`,
`neoverse_n2`, `neoverse_v1`.

Some CPU features have been added and some have been removed, following
LLVM's lead.

CSky CPU features support is added.
2022-07-01 21:35:19 -07:00

365 lines
10 KiB
Zig

//! This file is auto-generated by tools/update_cpu_features.zig.
const std = @import("../std.zig");
const CpuFeature = std.Target.Cpu.Feature;
const CpuModel = std.Target.Cpu.Model;
pub const Feature = enum {
ptx32,
ptx40,
ptx41,
ptx42,
ptx43,
ptx50,
ptx60,
ptx61,
ptx63,
ptx64,
ptx65,
ptx70,
ptx71,
ptx72,
ptx73,
ptx74,
ptx75,
sm_20,
sm_21,
sm_30,
sm_32,
sm_35,
sm_37,
sm_50,
sm_52,
sm_53,
sm_60,
sm_61,
sm_62,
sm_70,
sm_72,
sm_75,
sm_80,
sm_86,
};
pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet;
pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas;
pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny;
pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll;
pub const all_features = blk: {
const len = @typeInfo(Feature).Enum.fields.len;
std.debug.assert(len <= CpuFeature.Set.needed_bit_count);
var result: [len]CpuFeature = undefined;
result[@enumToInt(Feature.ptx32)] = .{
.llvm_name = "ptx32",
.description = "Use PTX version 3.2",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx40)] = .{
.llvm_name = "ptx40",
.description = "Use PTX version 4.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx41)] = .{
.llvm_name = "ptx41",
.description = "Use PTX version 4.1",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx42)] = .{
.llvm_name = "ptx42",
.description = "Use PTX version 4.2",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx43)] = .{
.llvm_name = "ptx43",
.description = "Use PTX version 4.3",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx50)] = .{
.llvm_name = "ptx50",
.description = "Use PTX version 5.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx60)] = .{
.llvm_name = "ptx60",
.description = "Use PTX version 6.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx61)] = .{
.llvm_name = "ptx61",
.description = "Use PTX version 6.1",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx63)] = .{
.llvm_name = "ptx63",
.description = "Use PTX version 6.3",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx64)] = .{
.llvm_name = "ptx64",
.description = "Use PTX version 6.4",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx65)] = .{
.llvm_name = "ptx65",
.description = "Use PTX version 6.5",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx70)] = .{
.llvm_name = "ptx70",
.description = "Use PTX version 7.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx71)] = .{
.llvm_name = "ptx71",
.description = "Use PTX version 7.1",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx72)] = .{
.llvm_name = "ptx72",
.description = "Use PTX version 7.2",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx73)] = .{
.llvm_name = "ptx73",
.description = "Use PTX version 7.3",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx74)] = .{
.llvm_name = "ptx74",
.description = "Use PTX version 7.4",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.ptx75)] = .{
.llvm_name = "ptx75",
.description = "Use PTX version 7.5",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_20)] = .{
.llvm_name = "sm_20",
.description = "Target SM 2.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_21)] = .{
.llvm_name = "sm_21",
.description = "Target SM 2.1",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_30)] = .{
.llvm_name = "sm_30",
.description = "Target SM 3.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_32)] = .{
.llvm_name = "sm_32",
.description = "Target SM 3.2",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_35)] = .{
.llvm_name = "sm_35",
.description = "Target SM 3.5",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_37)] = .{
.llvm_name = "sm_37",
.description = "Target SM 3.7",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_50)] = .{
.llvm_name = "sm_50",
.description = "Target SM 5.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_52)] = .{
.llvm_name = "sm_52",
.description = "Target SM 5.2",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_53)] = .{
.llvm_name = "sm_53",
.description = "Target SM 5.3",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_60)] = .{
.llvm_name = "sm_60",
.description = "Target SM 6.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_61)] = .{
.llvm_name = "sm_61",
.description = "Target SM 6.1",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_62)] = .{
.llvm_name = "sm_62",
.description = "Target SM 6.2",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_70)] = .{
.llvm_name = "sm_70",
.description = "Target SM 7.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_72)] = .{
.llvm_name = "sm_72",
.description = "Target SM 7.2",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_75)] = .{
.llvm_name = "sm_75",
.description = "Target SM 7.5",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_80)] = .{
.llvm_name = "sm_80",
.description = "Target SM 8.0",
.dependencies = featureSet(&[_]Feature{}),
};
result[@enumToInt(Feature.sm_86)] = .{
.llvm_name = "sm_86",
.description = "Target SM 8.6",
.dependencies = featureSet(&[_]Feature{}),
};
const ti = @typeInfo(Feature);
for (result) |*elem, i| {
elem.index = i;
elem.name = ti.Enum.fields[i].name;
}
break :blk result;
};
pub const cpu = struct {
pub const sm_20 = CpuModel{
.name = "sm_20",
.llvm_name = "sm_20",
.features = featureSet(&[_]Feature{
.sm_20,
}),
};
pub const sm_21 = CpuModel{
.name = "sm_21",
.llvm_name = "sm_21",
.features = featureSet(&[_]Feature{
.sm_21,
}),
};
pub const sm_30 = CpuModel{
.name = "sm_30",
.llvm_name = "sm_30",
.features = featureSet(&[_]Feature{
.sm_30,
}),
};
pub const sm_32 = CpuModel{
.name = "sm_32",
.llvm_name = "sm_32",
.features = featureSet(&[_]Feature{
.ptx40,
.sm_32,
}),
};
pub const sm_35 = CpuModel{
.name = "sm_35",
.llvm_name = "sm_35",
.features = featureSet(&[_]Feature{
.sm_35,
}),
};
pub const sm_37 = CpuModel{
.name = "sm_37",
.llvm_name = "sm_37",
.features = featureSet(&[_]Feature{
.ptx41,
.sm_37,
}),
};
pub const sm_50 = CpuModel{
.name = "sm_50",
.llvm_name = "sm_50",
.features = featureSet(&[_]Feature{
.ptx40,
.sm_50,
}),
};
pub const sm_52 = CpuModel{
.name = "sm_52",
.llvm_name = "sm_52",
.features = featureSet(&[_]Feature{
.ptx41,
.sm_52,
}),
};
pub const sm_53 = CpuModel{
.name = "sm_53",
.llvm_name = "sm_53",
.features = featureSet(&[_]Feature{
.ptx42,
.sm_53,
}),
};
pub const sm_60 = CpuModel{
.name = "sm_60",
.llvm_name = "sm_60",
.features = featureSet(&[_]Feature{
.ptx50,
.sm_60,
}),
};
pub const sm_61 = CpuModel{
.name = "sm_61",
.llvm_name = "sm_61",
.features = featureSet(&[_]Feature{
.ptx50,
.sm_61,
}),
};
pub const sm_62 = CpuModel{
.name = "sm_62",
.llvm_name = "sm_62",
.features = featureSet(&[_]Feature{
.ptx50,
.sm_62,
}),
};
pub const sm_70 = CpuModel{
.name = "sm_70",
.llvm_name = "sm_70",
.features = featureSet(&[_]Feature{
.ptx60,
.sm_70,
}),
};
pub const sm_72 = CpuModel{
.name = "sm_72",
.llvm_name = "sm_72",
.features = featureSet(&[_]Feature{
.ptx61,
.sm_72,
}),
};
pub const sm_75 = CpuModel{
.name = "sm_75",
.llvm_name = "sm_75",
.features = featureSet(&[_]Feature{
.ptx63,
.sm_75,
}),
};
pub const sm_80 = CpuModel{
.name = "sm_80",
.llvm_name = "sm_80",
.features = featureSet(&[_]Feature{
.ptx70,
.sm_80,
}),
};
pub const sm_86 = CpuModel{
.name = "sm_86",
.llvm_name = "sm_86",
.features = featureSet(&[_]Feature{
.ptx71,
.sm_86,
}),
};
};