zig/lib/std/Target/msp430.zig
mlugg 0fe3fd01dd
std: update std.builtin.Type fields to follow naming conventions
The compiler actually doesn't need any functional changes for this: Sema
does reification based on the tag indices of `std.builtin.Type` already!
So, no zig1.wasm update is necessary.

This change is necessary to disallow name clashes between fields and
decls on a type, which is a prerequisite of #9938.
2024-08-28 08:39:59 +01:00

70 lines
2.2 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 {
ext,
hwmult16,
hwmult32,
hwmultf5,
};
pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet;
pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas;
pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny;
pub const featureSetHasAll = CpuFeature.FeatureSetFns(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[@intFromEnum(Feature.ext)] = .{
.llvm_name = "ext",
.description = "Enable MSP430-X extensions",
.dependencies = featureSet(&[_]Feature{}),
};
result[@intFromEnum(Feature.hwmult16)] = .{
.llvm_name = "hwmult16",
.description = "Enable 16-bit hardware multiplier",
.dependencies = featureSet(&[_]Feature{}),
};
result[@intFromEnum(Feature.hwmult32)] = .{
.llvm_name = "hwmult32",
.description = "Enable 32-bit hardware multiplier",
.dependencies = featureSet(&[_]Feature{}),
};
result[@intFromEnum(Feature.hwmultf5)] = .{
.llvm_name = "hwmultf5",
.description = "Enable F5 series hardware multiplier",
.dependencies = featureSet(&[_]Feature{}),
};
const ti = @typeInfo(Feature);
for (&result, 0..) |*elem, i| {
elem.index = i;
elem.name = ti.@"enum".fields[i].name;
}
break :blk result;
};
pub const cpu = struct {
pub const generic = CpuModel{
.name = "generic",
.llvm_name = "generic",
.features = featureSet(&[_]Feature{}),
};
pub const msp430 = CpuModel{
.name = "msp430",
.llvm_name = "msp430",
.features = featureSet(&[_]Feature{}),
};
pub const msp430x = CpuModel{
.name = "msp430x",
.llvm_name = "msp430x",
.features = featureSet(&[_]Feature{
.ext,
}),
};
};