diff --git a/lib/compiler_rt/x86_cpu_model.zig b/lib/compiler_rt/x86_cpu_model.zig index 22d0f4aeec7e..7d3bf0d5b205 100644 --- a/lib/compiler_rt/x86_cpu_model.zig +++ b/lib/compiler_rt/x86_cpu_model.zig @@ -31,9 +31,9 @@ comptime { const linkage: std.builtin.GlobalLinkage = common.linkage; const visibility: std.builtin.SymbolVisibility = if (linkage != .internal) .hidden else .default; - @export(cpu, .{ .name = "__cpu_model", .linkage = linkage, .visibility = visibility }); - @export(cpu_extra_features, .{ .name = "__cpu_features2", .linkage = linkage, .visibility = visibility }); - @export(init, .{ .name = "__cpu_indicator_init", .linkage = linkage, .visibility = visibility }); + @export(&cpu, .{ .name = "__cpu_model", .linkage = linkage, .visibility = visibility }); + @export(&cpu_extra_features, .{ .name = "__cpu_features2", .linkage = linkage, .visibility = visibility }); + @export(&init, .{ .name = "__cpu_indicator_init", .linkage = linkage, .visibility = visibility }); } var cpu: Model = .{}; @@ -55,7 +55,7 @@ fn init() callconv(.C) c_int { x86.detectNativeFeatures(&detected, builtin.os.tag); var features = std.mem.zeroes(FeatureSet); - inline for (@typeInfo(Target.x86.Feature).Enum.fields) |f| { + inline for (@typeInfo(Target.x86.Feature).@"enum".fields) |f| { const index: Target.Cpu.Feature.Set.Index = f.value; if (comptime !@hasField(Feature, f.name)) continue; if (detected.isEnabled(index)) setFeature(&features, @field(Feature, f.name)); @@ -120,7 +120,7 @@ const Model = extern struct { const FeatureSet = [feature_set_size]u32; comptime { - for (@typeInfo(Feature).Enum.fields) |f| { + for (@typeInfo(Feature).@"enum".fields) |f| { if (f.value >= @bitSizeOf(FeatureSet)) @compileError(@import("std").fmt.comptimePrint("Feature.{s} ({}) bitindex too large", .{ f.name, f.value })); } @@ -143,7 +143,7 @@ const Feature = @import("cpu_model/x86.zig").Feature; const feature_set_size = blk: { var max_index: comptime_int = 0; - for (@typeInfo(Feature).Enum.fields) |f| { + for (@typeInfo(Feature).@"enum".fields) |f| { if (f.value > max_index) max_index = f.value; } break :blk (max_index + 32) / 32; @@ -169,7 +169,7 @@ comptime { var errors: []const u8 = ""; - for (@typeInfo(Feature).Enum.fields) |field| { + for (@typeInfo(Feature).@"enum".fields) |field| { if (ignored.has(field.name)) { if (@hasField(Target.x86.Feature, field.name)) errors = errors ++ std.fmt.comptimePrint( "\n feature `{s}' present in std.Target.x86.Feature but marked for ignore in compiler-rt",