fn setFeature(comptime Feature: type, cpu: *Target.Cpu, feature: Feature, enabled: bool) void
Feature: type
cpu: *Target.Cpu
feature: Feature
enabled: bool
190 191 192 193 194
fn setFeature(comptime Feature: type, cpu: *Target.Cpu, feature: Feature, enabled: bool) void { const idx = @as(Target.Cpu.Feature.Set.Index, @backingInt(feature)); if (enabled) cpu.features.addFeature(idx) else cpu.features.removeFeature(idx); }