Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Public Constant

all_features

Public Constant
std.Target.sparc.all_features
pub const all_features = blk:

File

Target/sparc.zig:74
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
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.@"64bit")] = .{
        .llvm_name = "64bit",
        .description = "Enable 64-bit mode",
        .dependencies = featureSet(&[_]Feature{
            .v9,
        }),
    };
    result[@backingInt(Feature.crypto)] = .{
        .llvm_name = "crypto",
        .description = "Enable cryptographic extensions",
        .dependencies = featureSet(&[_]Feature{
            .osa2011,
        }),
    };
    result[@backingInt(Feature.deprecated_v8)] = .{
        .llvm_name = "deprecated-v8",
        .description = "Enable deprecated V8 instructions in V9 mode",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.detectroundchange)] = .{
        .llvm_name = "detectroundchange",
        .description = "LEON3 erratum detection: Detects any rounding mode change request: use only the round-to-nearest rounding mode",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.fix_tn0009)] = .{
        .llvm_name = "fix-tn0009",
        .description = "Enable workaround for errata described in GRLIB-TN-0009",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.fix_tn0010)] = .{
        .llvm_name = "fix-tn0010",
        .description = "Enable workaround for errata described in GRLIB-TN-0010",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.fix_tn0011)] = .{
        .llvm_name = "fix-tn0011",
        .description = "Enable workaround for errata described in GRLIB-TN-0011",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.fix_tn0012)] = .{
        .llvm_name = "fix-tn0012",
        .description = "Enable workaround for errata described in GRLIB-TN-0012",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.fix_tn0013)] = .{
        .llvm_name = "fix-tn0013",
        .description = "Enable workaround for errata described in GRLIB-TN-0013",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.fixallfdivsqrt)] = .{
        .llvm_name = "fixallfdivsqrt",
        .description = "LEON erratum fix: Fix FDIVS/FDIVD/FSQRTS/FSQRTD instructions with NOPs and floating-point store",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.hard_quad_float)] = .{
        .llvm_name = "hard-quad-float",
        .description = "Enable quad-word floating point instructions",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.hasleoncasa)] = .{
        .llvm_name = "hasleoncasa",
        .description = "Enable CASA instruction for LEON3 and LEON4 processors",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.hasumacsmac)] = .{
        .llvm_name = "hasumacsmac",
        .description = "Enable UMAC and SMAC for LEON3 and LEON4 processors",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.insertnopload)] = .{
        .llvm_name = "insertnopload",
        .description = "LEON3 erratum fix: Insert a NOP instruction after every single-cycle load instruction when the next instruction is another load/store instruction",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.leon)] = .{
        .llvm_name = "leon",
        .description = "Enable LEON extensions",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.leoncyclecounter)] = .{
        .llvm_name = "leoncyclecounter",
        .description = "Use the Leon cycle counter register",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.leonpwrpsr)] = .{
        .llvm_name = "leonpwrpsr",
        .description = "Enable the PWRPSR instruction",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.no_fmuls)] = .{
        .llvm_name = "no-fmuls",
        .description = "Disable the fmuls instruction.",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.no_fsmuld)] = .{
        .llvm_name = "no-fsmuld",
        .description = "Disable the fsmuld instruction.",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.no_predictor)] = .{
        .llvm_name = "no-predictor",
        .description = "Processor has no branch predictor, branches stall execution",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.osa2011)] = .{
        .llvm_name = "osa2011",
        .description = "Enable Oracle SPARC Architecture 2011 extensions",
        .dependencies = featureSet(&[_]Feature{
            .vis,
            .vis2,
            .vis3,
        }),
    };
    result[@backingInt(Feature.popc)] = .{
        .llvm_name = "popc",
        .description = "Use the popc (population count) instruction",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_g1)] = .{
        .llvm_name = "reserve-g1",
        .description = "Reserve G1, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_g2)] = .{
        .llvm_name = "reserve-g2",
        .description = "Reserve G2, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_g3)] = .{
        .llvm_name = "reserve-g3",
        .description = "Reserve G3, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_g4)] = .{
        .llvm_name = "reserve-g4",
        .description = "Reserve G4, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_g5)] = .{
        .llvm_name = "reserve-g5",
        .description = "Reserve G5, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_g6)] = .{
        .llvm_name = "reserve-g6",
        .description = "Reserve G6, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_g7)] = .{
        .llvm_name = "reserve-g7",
        .description = "Reserve G7, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_i0)] = .{
        .llvm_name = "reserve-i0",
        .description = "Reserve I0, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_i1)] = .{
        .llvm_name = "reserve-i1",
        .description = "Reserve I1, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_i2)] = .{
        .llvm_name = "reserve-i2",
        .description = "Reserve I2, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_i3)] = .{
        .llvm_name = "reserve-i3",
        .description = "Reserve I3, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_i4)] = .{
        .llvm_name = "reserve-i4",
        .description = "Reserve I4, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_i5)] = .{
        .llvm_name = "reserve-i5",
        .description = "Reserve I5, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_l0)] = .{
        .llvm_name = "reserve-l0",
        .description = "Reserve L0, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_l1)] = .{
        .llvm_name = "reserve-l1",
        .description = "Reserve L1, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_l2)] = .{
        .llvm_name = "reserve-l2",
        .description = "Reserve L2, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_l3)] = .{
        .llvm_name = "reserve-l3",
        .description = "Reserve L3, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_l4)] = .{
        .llvm_name = "reserve-l4",
        .description = "Reserve L4, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_l5)] = .{
        .llvm_name = "reserve-l5",
        .description = "Reserve L5, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_l6)] = .{
        .llvm_name = "reserve-l6",
        .description = "Reserve L6, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_l7)] = .{
        .llvm_name = "reserve-l7",
        .description = "Reserve L7, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_o0)] = .{
        .llvm_name = "reserve-o0",
        .description = "Reserve O0, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_o1)] = .{
        .llvm_name = "reserve-o1",
        .description = "Reserve O1, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_o2)] = .{
        .llvm_name = "reserve-o2",
        .description = "Reserve O2, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_o3)] = .{
        .llvm_name = "reserve-o3",
        .description = "Reserve O3, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_o4)] = .{
        .llvm_name = "reserve-o4",
        .description = "Reserve O4, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.reserve_o5)] = .{
        .llvm_name = "reserve-o5",
        .description = "Reserve O5, making it unavailable as a GPR",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.slow_rdpc)] = .{
        .llvm_name = "slow-rdpc",
        .description = "rd %pc, %XX is slow",
        .dependencies = featureSet(&[_]Feature{
            .v9,
        }),
    };
    result[@backingInt(Feature.soft_float)] = .{
        .llvm_name = "soft-float",
        .description = "Use software emulation for floating point",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.soft_mul_div)] = .{
        .llvm_name = "soft-mul-div",
        .description = "Use software emulation for integer multiply and divide",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.ua2005)] = .{
        .llvm_name = "ua2005",
        .description = "Enable UltraSPARC Architecture 2005 extensions",
        .dependencies = featureSet(&[_]Feature{
            .vis,
            .vis2,
        }),
    };
    result[@backingInt(Feature.ua2007)] = .{
        .llvm_name = "ua2007",
        .description = "Enable UltraSPARC Architecture 2007 extensions",
        .dependencies = featureSet(&[_]Feature{
            .vis,
            .vis2,
        }),
    };
    result[@backingInt(Feature.v8plus)] = .{
        .llvm_name = "v8plus",
        .description = "Enable V8+ mode, allowing use of 64-bit V9 instructions in 32-bit code",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.v9)] = .{
        .llvm_name = "v9",
        .description = "Enable SPARC-V9 instructions",
        .dependencies = featureSet(&[_]Feature{}),
    };
    result[@backingInt(Feature.vis)] = .{
        .llvm_name = "vis",
        .description = "Enable UltraSPARC Visual Instruction Set extensions",
        .dependencies = featureSet(&[_]Feature{
            .v9,
        }),
    };
    result[@backingInt(Feature.vis2)] = .{
        .llvm_name = "vis2",
        .description = "Enable Visual Instruction Set extensions II",
        .dependencies = featureSet(&[_]Feature{
            .v9,
        }),
    };
    result[@backingInt(Feature.vis3)] = .{
        .llvm_name = "vis3",
        .description = "Enable Visual Instruction Set extensions III",
        .dependencies = featureSet(&[_]Feature{
            .v9,
        }),
    };
    const ti = @typeInfo(Feature);
    for (&result, 0..) |*elem, i| {
        elem.index = i;
        elem.name = ti.@"enum".field_names[i];
    }
    break :blk result;
}