Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › Target › msp430 Public Namespace msp430 Doc Source Public Namespace Namespaces Structs Types Values File Target/msp430.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70 //! 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" .field_names .len ;
std .debug .assert (len <= CpuFeature .Set .needed_bit_count );
var result : [len ]CpuFeature = undefined ;
result [@backingInt (Feature .ext )] = .{
.llvm_name = "ext" ,
.description = "Enable MSP430-X extensions" ,
.dependencies = featureSet (&[_ ]Feature {}),
};
result [@backingInt (Feature .hwmult16 )] = .{
.llvm_name = "hwmult16" ,
.description = "Enable 16-bit hardware multiplier" ,
.dependencies = featureSet (&[_ ]Feature {}),
};
result [@backingInt (Feature .hwmult32 )] = .{
.llvm_name = "hwmult32" ,
.description = "Enable 32-bit hardware multiplier" ,
.dependencies = featureSet (&[_ ]Feature {}),
};
result [@backingInt (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" .field_names [i ];
}
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 ,
}),
};
};
This file is auto-generated by tools/update_cpu_features.zig.