| author | |
| committer | |
| log | 78fb9c0a177eeb8f5a103eb54c46b367082cfc75 |
| tree | f89af6432920631a0290c972a62b1e8bcb3fd943 |
| parent | eb7f318ea897d51082b70c84591242735c8a2c53 |
| parent | 4ef956ef140a1c8cf606cd9b6a9606c0a85bf934 |
| signature |
std.Target: Function naming cleanup35 files changed, 206 insertions(+), 206 deletions(-)
lib/compiler/aro/aro/Parser.zig+3-3| ... | @@ -5631,15 +5631,15 @@ pub const Result = struct { | ... | @@ -5631,15 +5631,15 @@ pub const Result = struct { |
| 5631 | }; | 5631 | }; |
| 5632 | const a_spec = a.ty.canonicalize(.standard).specifier; | 5632 | const a_spec = a.ty.canonicalize(.standard).specifier; |
| 5633 | const b_spec = b.ty.canonicalize(.standard).specifier; | 5633 | const b_spec = b.ty.canonicalize(.standard).specifier; |
| 5634 | if (p.comp.target.c_type_bit_size(.longdouble) == 128) { | 5634 | if (p.comp.target.cTypeBitSize(.longdouble) == 128) { |
| 5635 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | 5635 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; |
| 5636 | } | 5636 | } |
| 5637 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[1])) return; | 5637 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[1])) return; |
| 5638 | if (p.comp.target.c_type_bit_size(.longdouble) == 80) { | 5638 | if (p.comp.target.cTypeBitSize(.longdouble) == 80) { |
| 5639 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | 5639 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; |
| 5640 | } | 5640 | } |
| 5641 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[2])) return; | 5641 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[2])) return; |
| 5642 | if (p.comp.target.c_type_bit_size(.longdouble) == 64) { | 5642 | if (p.comp.target.cTypeBitSize(.longdouble) == 64) { |
| 5643 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | 5643 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; |
| 5644 | } | 5644 | } |
| 5645 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[3])) return; | 5645 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[3])) return; |
lib/compiler/aro/aro/Type.zig+23-23| ... | @@ -991,19 +991,19 @@ pub fn sizeof(ty: Type, comp: *const Compilation) ?u64 { | ... | @@ -991,19 +991,19 @@ pub fn sizeof(ty: Type, comp: *const Compilation) ?u64 { |
| 991 | .incomplete_array => return if (comp.langopts.emulate == .msvc) @as(?u64, 0) else null, | 991 | .incomplete_array => return if (comp.langopts.emulate == .msvc) @as(?u64, 0) else null, |
| 992 | .func, .var_args_func, .old_style_func, .void, .bool => 1, | 992 | .func, .var_args_func, .old_style_func, .void, .bool => 1, |
| 993 | .char, .schar, .uchar => 1, | 993 | .char, .schar, .uchar => 1, |
| 994 | .short => comp.target.c_type_byte_size(.short), | 994 | .short => comp.target.cTypeByteSize(.short), |
| 995 | .ushort => comp.target.c_type_byte_size(.ushort), | 995 | .ushort => comp.target.cTypeByteSize(.ushort), |
| 996 | .int => comp.target.c_type_byte_size(.int), | 996 | .int => comp.target.cTypeByteSize(.int), |
| 997 | .uint => comp.target.c_type_byte_size(.uint), | 997 | .uint => comp.target.cTypeByteSize(.uint), |
| 998 | .long => comp.target.c_type_byte_size(.long), | 998 | .long => comp.target.cTypeByteSize(.long), |
| 999 | .ulong => comp.target.c_type_byte_size(.ulong), | 999 | .ulong => comp.target.cTypeByteSize(.ulong), |
| 1000 | .long_long => comp.target.c_type_byte_size(.longlong), | 1000 | .long_long => comp.target.cTypeByteSize(.longlong), |
| 1001 | .ulong_long => comp.target.c_type_byte_size(.ulonglong), | 1001 | .ulong_long => comp.target.cTypeByteSize(.ulonglong), |
| 1002 | .long_double => comp.target.c_type_byte_size(.longdouble), | 1002 | .long_double => comp.target.cTypeByteSize(.longdouble), |
| 1003 | .int128, .uint128 => 16, | 1003 | .int128, .uint128 => 16, |
| 1004 | .fp16, .float16 => 2, | 1004 | .fp16, .float16 => 2, |
| 1005 | .float => comp.target.c_type_byte_size(.float), | 1005 | .float => comp.target.cTypeByteSize(.float), |
| 1006 | .double => comp.target.c_type_byte_size(.double), | 1006 | .double => comp.target.cTypeByteSize(.double), |
| 1007 | .float80 => 16, | 1007 | .float80 => 16, |
| 1008 | .float128 => 16, | 1008 | .float128 => 16, |
| 1009 | .bit_int => { | 1009 | .bit_int => { |
| ... | @@ -1049,7 +1049,7 @@ pub fn bitSizeof(ty: Type, comp: *const Compilation) ?u64 { | ... | @@ -1049,7 +1049,7 @@ pub fn bitSizeof(ty: Type, comp: *const Compilation) ?u64 { |
| 1049 | .typeof_expr => ty.data.expr.ty.bitSizeof(comp), | 1049 | .typeof_expr => ty.data.expr.ty.bitSizeof(comp), |
| 1050 | .attributed => ty.data.attributed.base.bitSizeof(comp), | 1050 | .attributed => ty.data.attributed.base.bitSizeof(comp), |
| 1051 | .bit_int => return ty.data.int.bits, | 1051 | .bit_int => return ty.data.int.bits, |
| 1052 | .long_double => comp.target.c_type_bit_size(.longdouble), | 1052 | .long_double => comp.target.cTypeBitSize(.longdouble), |
| 1053 | .float80 => return 80, | 1053 | .float80 => return 80, |
| 1054 | else => 8 * (ty.sizeof(comp) orelse return null), | 1054 | else => 8 * (ty.sizeof(comp) orelse return null), |
| 1055 | }; | 1055 | }; |
| ... | @@ -1104,24 +1104,24 @@ pub fn alignof(ty: Type, comp: *const Compilation) u29 { | ... | @@ -1104,24 +1104,24 @@ pub fn alignof(ty: Type, comp: *const Compilation) u29 { |
| 1104 | => return ty.makeReal().alignof(comp), | 1104 | => return ty.makeReal().alignof(comp), |
| 1105 | // zig fmt: on | 1105 | // zig fmt: on |
| 1106 | 1106 | ||
| 1107 | .short => comp.target.c_type_alignment(.short), | 1107 | .short => comp.target.cTypeAlignment(.short), |
| 1108 | .ushort => comp.target.c_type_alignment(.ushort), | 1108 | .ushort => comp.target.cTypeAlignment(.ushort), |
| 1109 | .int => comp.target.c_type_alignment(.int), | 1109 | .int => comp.target.cTypeAlignment(.int), |
| 1110 | .uint => comp.target.c_type_alignment(.uint), | 1110 | .uint => comp.target.cTypeAlignment(.uint), |
| 1111 | 1111 | ||
| 1112 | .long => comp.target.c_type_alignment(.long), | 1112 | .long => comp.target.cTypeAlignment(.long), |
| 1113 | .ulong => comp.target.c_type_alignment(.ulong), | 1113 | .ulong => comp.target.cTypeAlignment(.ulong), |
| 1114 | .long_long => comp.target.c_type_alignment(.longlong), | 1114 | .long_long => comp.target.cTypeAlignment(.longlong), |
| 1115 | .ulong_long => comp.target.c_type_alignment(.ulonglong), | 1115 | .ulong_long => comp.target.cTypeAlignment(.ulonglong), |
| 1116 | 1116 | ||
| 1117 | .bit_int => @min( | 1117 | .bit_int => @min( |
| 1118 | std.math.ceilPowerOfTwoPromote(u16, (ty.data.int.bits + 7) / 8), | 1118 | std.math.ceilPowerOfTwoPromote(u16, (ty.data.int.bits + 7) / 8), |
| 1119 | 16, // comp.target.maxIntAlignment(), please use your own logic for this value as it is implementation-defined | 1119 | 16, // comp.target.maxIntAlignment(), please use your own logic for this value as it is implementation-defined |
| 1120 | ), | 1120 | ), |
| 1121 | 1121 | ||
| 1122 | .float => comp.target.c_type_alignment(.float), | 1122 | .float => comp.target.cTypeAlignment(.float), |
| 1123 | .double => comp.target.c_type_alignment(.double), | 1123 | .double => comp.target.cTypeAlignment(.double), |
| 1124 | .long_double => comp.target.c_type_alignment(.longdouble), | 1124 | .long_double => comp.target.cTypeAlignment(.longdouble), |
| 1125 | 1125 | ||
| 1126 | .int128, .uint128 => if (comp.target.cpu.arch == .s390x and comp.target.os.tag == .linux and comp.target.isGnu()) 8 else 16, | 1126 | .int128, .uint128 => if (comp.target.cpu.arch == .s390x and comp.target.os.tag == .linux and comp.target.isGnu()) 8 else 16, |
| 1127 | .fp16, .float16 => 2, | 1127 | .fp16, .float16 => 2, |
lib/compiler/aro/aro/target.zig+2-2| ... | @@ -306,7 +306,7 @@ pub const FPSemantics = enum { | ... | @@ -306,7 +306,7 @@ pub const FPSemantics = enum { |
| 306 | /// Only intended for generating float.h macros for the preprocessor | 306 | /// Only intended for generating float.h macros for the preprocessor |
| 307 | pub fn forType(ty: std.Target.CType, target: std.Target) FPSemantics { | 307 | pub fn forType(ty: std.Target.CType, target: std.Target) FPSemantics { |
| 308 | std.debug.assert(ty == .float or ty == .double or ty == .longdouble); | 308 | std.debug.assert(ty == .float or ty == .double or ty == .longdouble); |
| 309 | return switch (target.c_type_bit_size(ty)) { | 309 | return switch (target.cTypeBitSize(ty)) { |
| 310 | 32 => .IEEESingle, | 310 | 32 => .IEEESingle, |
| 311 | 64 => .IEEEDouble, | 311 | 64 => .IEEEDouble, |
| 312 | 80 => .x87ExtendedDouble, | 312 | 80 => .x87ExtendedDouble, |
| ... | @@ -350,7 +350,7 @@ pub const FPSemantics = enum { | ... | @@ -350,7 +350,7 @@ pub const FPSemantics = enum { |
| 350 | }; | 350 | }; |
| 351 | 351 | ||
| 352 | pub fn isLP64(target: std.Target) bool { | 352 | pub fn isLP64(target: std.Target) bool { |
| 353 | return target.c_type_bit_size(.int) == 32 and target.ptrBitWidth() == 64; | 353 | return target.cTypeBitSize(.int) == 32 and target.ptrBitWidth() == 64; |
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | pub fn isKnownWindowsMSVCEnvironment(target: std.Target) bool { | 356 | pub fn isKnownWindowsMSVCEnvironment(target: std.Target) bool { |
lib/std/Target.zig+10-10| ... | @@ -964,7 +964,7 @@ pub const Cpu = struct { | ... | @@ -964,7 +964,7 @@ pub const Cpu = struct { |
| 964 | } | 964 | } |
| 965 | }; | 965 | }; |
| 966 | 966 | ||
| 967 | pub fn feature_set_fns(comptime F: type) type { | 967 | pub fn FeatureSetFns(comptime F: type) type { |
| 968 | return struct { | 968 | return struct { |
| 969 | /// Populates only the feature bits specified. | 969 | /// Populates only the feature bits specified. |
| 970 | pub fn featureSet(features: []const F) Set { | 970 | pub fn featureSet(features: []const F) Set { |
| ... | @@ -2017,7 +2017,7 @@ pub const CType = enum { | ... | @@ -2017,7 +2017,7 @@ pub const CType = enum { |
| 2017 | longdouble, | 2017 | longdouble, |
| 2018 | }; | 2018 | }; |
| 2019 | 2019 | ||
| 2020 | pub fn c_type_byte_size(t: Target, c_type: CType) u16 { | 2020 | pub fn cTypeByteSize(t: Target, c_type: CType) u16 { |
| 2021 | return switch (c_type) { | 2021 | return switch (c_type) { |
| 2022 | .char, | 2022 | .char, |
| 2023 | .short, | 2023 | .short, |
| ... | @@ -2030,20 +2030,20 @@ pub fn c_type_byte_size(t: Target, c_type: CType) u16 { | ... | @@ -2030,20 +2030,20 @@ pub fn c_type_byte_size(t: Target, c_type: CType) u16 { |
| 2030 | .ulonglong, | 2030 | .ulonglong, |
| 2031 | .float, | 2031 | .float, |
| 2032 | .double, | 2032 | .double, |
| 2033 | => @divExact(c_type_bit_size(t, c_type), 8), | 2033 | => @divExact(cTypeBitSize(t, c_type), 8), |
| 2034 | 2034 | ||
| 2035 | .longdouble => switch (c_type_bit_size(t, c_type)) { | 2035 | .longdouble => switch (cTypeBitSize(t, c_type)) { |
| 2036 | 16 => 2, | 2036 | 16 => 2, |
| 2037 | 32 => 4, | 2037 | 32 => 4, |
| 2038 | 64 => 8, | 2038 | 64 => 8, |
| 2039 | 80 => @intCast(std.mem.alignForward(usize, 10, c_type_alignment(t, .longdouble))), | 2039 | 80 => @intCast(std.mem.alignForward(usize, 10, cTypeAlignment(t, .longdouble))), |
| 2040 | 128 => 16, | 2040 | 128 => 16, |
| 2041 | else => unreachable, | 2041 | else => unreachable, |
| 2042 | }, | 2042 | }, |
| 2043 | }; | 2043 | }; |
| 2044 | } | 2044 | } |
| 2045 | 2045 | ||
| 2046 | pub fn c_type_bit_size(target: Target, c_type: CType) u16 { | 2046 | pub fn cTypeBitSize(target: Target, c_type: CType) u16 { |
| 2047 | switch (target.os.tag) { | 2047 | switch (target.os.tag) { |
| 2048 | .freestanding, .other => switch (target.cpu.arch) { | 2048 | .freestanding, .other => switch (target.cpu.arch) { |
| 2049 | .msp430 => switch (c_type) { | 2049 | .msp430 => switch (c_type) { |
| ... | @@ -2340,7 +2340,7 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 { | ... | @@ -2340,7 +2340,7 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 { |
| 2340 | } | 2340 | } |
| 2341 | } | 2341 | } |
| 2342 | 2342 | ||
| 2343 | pub fn c_type_alignment(target: Target, c_type: CType) u16 { | 2343 | pub fn cTypeAlignment(target: Target, c_type: CType) u16 { |
| 2344 | // Overrides for unusual alignments | 2344 | // Overrides for unusual alignments |
| 2345 | switch (target.cpu.arch) { | 2345 | switch (target.cpu.arch) { |
| 2346 | .avr => return 1, | 2346 | .avr => return 1, |
| ... | @@ -2360,7 +2360,7 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 { | ... | @@ -2360,7 +2360,7 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 { |
| 2360 | 2360 | ||
| 2361 | // Next-power-of-two-aligned, up to a maximum. | 2361 | // Next-power-of-two-aligned, up to a maximum. |
| 2362 | return @min( | 2362 | return @min( |
| 2363 | std.math.ceilPowerOfTwoAssert(u16, (c_type_bit_size(target, c_type) + 7) / 8), | 2363 | std.math.ceilPowerOfTwoAssert(u16, (cTypeBitSize(target, c_type) + 7) / 8), |
| 2364 | @as(u16, switch (target.cpu.arch) { | 2364 | @as(u16, switch (target.cpu.arch) { |
| 2365 | .arm, .armeb, .thumb, .thumbeb => switch (target.os.tag) { | 2365 | .arm, .armeb, .thumb, .thumbeb => switch (target.os.tag) { |
| 2366 | .netbsd => switch (target.abi) { | 2366 | .netbsd => switch (target.abi) { |
| ... | @@ -2432,7 +2432,7 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 { | ... | @@ -2432,7 +2432,7 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 { |
| 2432 | ); | 2432 | ); |
| 2433 | } | 2433 | } |
| 2434 | 2434 | ||
| 2435 | pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 { | 2435 | pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 { |
| 2436 | // Overrides for unusual alignments | 2436 | // Overrides for unusual alignments |
| 2437 | switch (target.cpu.arch) { | 2437 | switch (target.cpu.arch) { |
| 2438 | .arm, .armeb, .thumb, .thumbeb => switch (target.os.tag) { | 2438 | .arm, .armeb, .thumb, .thumbeb => switch (target.os.tag) { |
| ... | @@ -2485,7 +2485,7 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 { | ... | @@ -2485,7 +2485,7 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 { |
| 2485 | 2485 | ||
| 2486 | // Next-power-of-two-aligned, up to a maximum. | 2486 | // Next-power-of-two-aligned, up to a maximum. |
| 2487 | return @min( | 2487 | return @min( |
| 2488 | std.math.ceilPowerOfTwoAssert(u16, (c_type_bit_size(target, c_type) + 7) / 8), | 2488 | std.math.ceilPowerOfTwoAssert(u16, (cTypeBitSize(target, c_type) + 7) / 8), |
| 2489 | @as(u16, switch (target.cpu.arch) { | 2489 | @as(u16, switch (target.cpu.arch) { |
| 2490 | .msp430 => 2, | 2490 | .msp430 => 2, |
| 2491 | 2491 |
lib/std/Target/aarch64.zig+4-4| ... | @@ -235,10 +235,10 @@ pub const Feature = enum { | ... | @@ -235,10 +235,10 @@ pub const Feature = enum { |
| 235 | zcz_gp, | 235 | zcz_gp, |
| 236 | }; | 236 | }; |
| 237 | 237 | ||
| 238 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 238 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 239 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 239 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 240 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 240 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 241 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 241 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 242 | 242 | ||
| 243 | pub const all_features = blk: { | 243 | pub const all_features = blk: { |
| 244 | @setEvalBranchQuota(2000); | 244 | @setEvalBranchQuota(2000); |
lib/std/Target/amdgpu.zig+4-4| ... | @@ -177,10 +177,10 @@ pub const Feature = enum { | ... | @@ -177,10 +177,10 @@ pub const Feature = enum { |
| 177 | xnack_support, | 177 | xnack_support, |
| 178 | }; | 178 | }; |
| 179 | 179 | ||
| 180 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 180 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 181 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 181 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 182 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 182 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 183 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 183 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 184 | 184 | ||
| 185 | pub const all_features = blk: { | 185 | pub const all_features = blk: { |
| 186 | const len = @typeInfo(Feature).Enum.fields.len; | 186 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/arc.zig+4-4| ... | @@ -8,10 +8,10 @@ pub const Feature = enum { | ... | @@ -8,10 +8,10 @@ pub const Feature = enum { |
| 8 | norm, | 8 | norm, |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 11 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 12 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 12 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 13 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 13 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 14 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 14 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 15 | 15 | ||
| 16 | pub const all_features = blk: { | 16 | pub const all_features = blk: { |
| 17 | const len = @typeInfo(Feature).Enum.fields.len; | 17 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/arm.zig+4-4| ... | @@ -208,10 +208,10 @@ pub const Feature = enum { | ... | @@ -208,10 +208,10 @@ pub const Feature = enum { |
| 208 | zcz, | 208 | zcz, |
| 209 | }; | 209 | }; |
| 210 | 210 | ||
| 211 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 211 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 212 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 212 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 213 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 213 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 214 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 214 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 215 | 215 | ||
| 216 | pub const all_features = blk: { | 216 | pub const all_features = blk: { |
| 217 | @setEvalBranchQuota(10000); | 217 | @setEvalBranchQuota(10000); |
lib/std/Target/avr.zig+4-4| ... | @@ -43,10 +43,10 @@ pub const Feature = enum { | ... | @@ -43,10 +43,10 @@ pub const Feature = enum { |
| 43 | xmegau, | 43 | xmegau, |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 46 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 47 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 47 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 48 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 48 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 49 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 49 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 50 | 50 | ||
| 51 | pub const all_features = blk: { | 51 | pub const all_features = blk: { |
| 52 | const len = @typeInfo(Feature).Enum.fields.len; | 52 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/bpf.zig+4-4| ... | @@ -10,10 +10,10 @@ pub const Feature = enum { | ... | @@ -10,10 +10,10 @@ pub const Feature = enum { |
| 10 | dwarfris, | 10 | dwarfris, |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 13 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 14 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 14 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 15 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 15 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 16 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 16 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 17 | 17 | ||
| 18 | pub const all_features = blk: { | 18 | pub const all_features = blk: { |
| 19 | const len = @typeInfo(Feature).Enum.fields.len; | 19 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/csky.zig+4-4| ... | @@ -70,10 +70,10 @@ pub const Feature = enum { | ... | @@ -70,10 +70,10 @@ pub const Feature = enum { |
| 70 | vdspv2, | 70 | vdspv2, |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 73 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 74 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 74 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 75 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 75 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 76 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 76 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 77 | 77 | ||
| 78 | pub const all_features = blk: { | 78 | pub const all_features = blk: { |
| 79 | const len = @typeInfo(Feature).Enum.fields.len; | 79 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/hexagon.zig+4-4| ... | @@ -49,10 +49,10 @@ pub const Feature = enum { | ... | @@ -49,10 +49,10 @@ pub const Feature = enum { |
| 49 | zreg, | 49 | zreg, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 52 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 53 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 53 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 54 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 54 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 55 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 55 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 56 | 56 | ||
| 57 | pub const all_features = blk: { | 57 | pub const all_features = blk: { |
| 58 | const len = @typeInfo(Feature).Enum.fields.len; | 58 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/loongarch.zig+4-4| ... | @@ -22,10 +22,10 @@ pub const Feature = enum { | ... | @@ -22,10 +22,10 @@ pub const Feature = enum { |
| 22 | ual, | 22 | ual, |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 25 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 26 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 26 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 27 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 27 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 28 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 28 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 29 | 29 | ||
| 30 | pub const all_features = blk: { | 30 | pub const all_features = blk: { |
| 31 | const len = @typeInfo(Feature).Enum.fields.len; | 31 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/m68k.zig+4-4| ... | @@ -30,10 +30,10 @@ pub const Feature = enum { | ... | @@ -30,10 +30,10 @@ pub const Feature = enum { |
| 30 | reserve_d7, | 30 | reserve_d7, |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 33 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 34 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 34 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 35 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 35 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 36 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 36 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 37 | 37 | ||
| 38 | pub const all_features = blk: { | 38 | pub const all_features = blk: { |
| 39 | const len = @typeInfo(Feature).Enum.fields.len; | 39 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/mips.zig+4-4| ... | @@ -59,10 +59,10 @@ pub const Feature = enum { | ... | @@ -59,10 +59,10 @@ pub const Feature = enum { |
| 59 | xgot, | 59 | xgot, |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 62 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 63 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 63 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 64 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 64 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 65 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 65 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 66 | 66 | ||
| 67 | pub const all_features = blk: { | 67 | pub const all_features = blk: { |
| 68 | const len = @typeInfo(Feature).Enum.fields.len; | 68 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/msp430.zig+4-4| ... | @@ -11,10 +11,10 @@ pub const Feature = enum { | ... | @@ -11,10 +11,10 @@ pub const Feature = enum { |
| 11 | hwmultf5, | 11 | hwmultf5, |
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 14 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 15 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 15 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 16 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 16 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 17 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 17 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 18 | 18 | ||
| 19 | pub const all_features = blk: { | 19 | pub const all_features = blk: { |
| 20 | const len = @typeInfo(Feature).Enum.fields.len; | 20 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/nvptx.zig+4-4| ... | @@ -52,10 +52,10 @@ pub const Feature = enum { | ... | @@ -52,10 +52,10 @@ pub const Feature = enum { |
| 52 | sm_90a, | 52 | sm_90a, |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 55 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 56 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 56 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 57 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 57 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 58 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 58 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 59 | 59 | ||
| 60 | pub const all_features = blk: { | 60 | pub const all_features = blk: { |
| 61 | const len = @typeInfo(Feature).Enum.fields.len; | 61 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/powerpc.zig+4-4| ... | @@ -89,10 +89,10 @@ pub const Feature = enum { | ... | @@ -89,10 +89,10 @@ pub const Feature = enum { |
| 89 | vsx, | 89 | vsx, |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| 92 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 92 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 93 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 93 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 94 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 94 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 95 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 95 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 96 | 96 | ||
| 97 | pub const all_features = blk: { | 97 | pub const all_features = blk: { |
| 98 | const len = @typeInfo(Feature).Enum.fields.len; | 98 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/riscv.zig+4-4| ... | @@ -195,10 +195,10 @@ pub const Feature = enum { | ... | @@ -195,10 +195,10 @@ pub const Feature = enum { |
| 195 | zvl8192b, | 195 | zvl8192b, |
| 196 | }; | 196 | }; |
| 197 | 197 | ||
| 198 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 198 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 199 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 199 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 200 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 200 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 201 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 201 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 202 | 202 | ||
| 203 | pub const all_features = blk: { | 203 | pub const all_features = blk: { |
| 204 | const len = @typeInfo(Feature).Enum.fields.len; | 204 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/s390x.zig+4-4| ... | @@ -49,10 +49,10 @@ pub const Feature = enum { | ... | @@ -49,10 +49,10 @@ pub const Feature = enum { |
| 49 | vector_packed_decimal_enhancement_2, | 49 | vector_packed_decimal_enhancement_2, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 52 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 53 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 53 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 54 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 54 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 55 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 55 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 56 | 56 | ||
| 57 | pub const all_features = blk: { | 57 | pub const all_features = blk: { |
| 58 | const len = @typeInfo(Feature).Enum.fields.len; | 58 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/sparc.zig+4-4| ... | @@ -54,10 +54,10 @@ pub const Feature = enum { | ... | @@ -54,10 +54,10 @@ pub const Feature = enum { |
| 54 | vis3, | 54 | vis3, |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 57 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 58 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 58 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 59 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 59 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 60 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 60 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 61 | 61 | ||
| 62 | pub const all_features = blk: { | 62 | pub const all_features = blk: { |
| 63 | const len = @typeInfo(Feature).Enum.fields.len; | 63 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/spirv.zig+4-4| ... | @@ -294,10 +294,10 @@ pub const Feature = enum { | ... | @@ -294,10 +294,10 @@ pub const Feature = enum { |
| 294 | LongConstantCompositeINTEL, | 294 | LongConstantCompositeINTEL, |
| 295 | }; | 295 | }; |
| 296 | 296 | ||
| 297 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 297 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 298 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 298 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 299 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 299 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 300 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 300 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 301 | 301 | ||
| 302 | pub const all_features = blk: { | 302 | pub const all_features = blk: { |
| 303 | @setEvalBranchQuota(2000); | 303 | @setEvalBranchQuota(2000); |
lib/std/Target/ve.zig+4-4| ... | @@ -8,10 +8,10 @@ pub const Feature = enum { | ... | @@ -8,10 +8,10 @@ pub const Feature = enum { |
| 8 | vpu, | 8 | vpu, |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 11 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 12 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 12 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 13 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 13 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 14 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 14 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 15 | 15 | ||
| 16 | pub const all_features = blk: { | 16 | pub const all_features = blk: { |
| 17 | const len = @typeInfo(Feature).Enum.fields.len; | 17 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/wasm.zig+4-4| ... | @@ -20,10 +20,10 @@ pub const Feature = enum { | ... | @@ -20,10 +20,10 @@ pub const Feature = enum { |
| 20 | tail_call, | 20 | tail_call, |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 23 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 24 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 24 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 25 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 25 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 26 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 26 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 27 | 27 | ||
| 28 | pub const all_features = blk: { | 28 | pub const all_features = blk: { |
| 29 | const len = @typeInfo(Feature).Enum.fields.len; | 29 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/x86.zig+4-4| ... | @@ -193,10 +193,10 @@ pub const Feature = enum { | ... | @@ -193,10 +193,10 @@ pub const Feature = enum { |
| 193 | xsaves, | 193 | xsaves, |
| 194 | }; | 194 | }; |
| 195 | 195 | ||
| 196 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 196 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 197 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 197 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 198 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 198 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 199 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 199 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 200 | 200 | ||
| 201 | pub const all_features = blk: { | 201 | pub const all_features = blk: { |
| 202 | const len = @typeInfo(Feature).Enum.fields.len; | 202 | const len = @typeInfo(Feature).Enum.fields.len; |
lib/std/Target/xtensa.zig+4-4| ... | @@ -8,10 +8,10 @@ pub const Feature = enum { | ... | @@ -8,10 +8,10 @@ pub const Feature = enum { |
| 8 | density, | 8 | density, |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 11 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 12 | pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 12 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 13 | pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 13 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 14 | pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 14 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 15 | 15 | ||
| 16 | pub const all_features = blk: { | 16 | pub const all_features = blk: { |
| 17 | const len = @typeInfo(Feature).Enum.fields.len; | 17 | const len = @typeInfo(Feature).Enum.fields.len; |
src/Sema.zig+4-4| ... | @@ -30943,7 +30943,7 @@ fn coerceVarArgParam( | ... | @@ -30943,7 +30943,7 @@ fn coerceVarArgParam( |
| 30943 | .Array => return sema.fail(block, inst_src, "arrays must be passed by reference to variadic function", .{}), | 30943 | .Array => return sema.fail(block, inst_src, "arrays must be passed by reference to variadic function", .{}), |
| 30944 | .Float => float: { | 30944 | .Float => float: { |
| 30945 | const target = zcu.getTarget(); | 30945 | const target = zcu.getTarget(); |
| 30946 | const double_bits = target.c_type_bit_size(.double); | 30946 | const double_bits = target.cTypeBitSize(.double); |
| 30947 | const inst_bits = uncasted_ty.floatBits(target); | 30947 | const inst_bits = uncasted_ty.floatBits(target); |
| 30948 | if (inst_bits >= double_bits) break :float inst; | 30948 | if (inst_bits >= double_bits) break :float inst; |
| 30949 | switch (double_bits) { | 30949 | switch (double_bits) { |
| ... | @@ -30956,21 +30956,21 @@ fn coerceVarArgParam( | ... | @@ -30956,21 +30956,21 @@ fn coerceVarArgParam( |
| 30956 | if (!try sema.validateExternType(uncasted_ty, .param_ty)) break :int inst; | 30956 | if (!try sema.validateExternType(uncasted_ty, .param_ty)) break :int inst; |
| 30957 | const target = zcu.getTarget(); | 30957 | const target = zcu.getTarget(); |
| 30958 | const uncasted_info = uncasted_ty.intInfo(zcu); | 30958 | const uncasted_info = uncasted_ty.intInfo(zcu); |
| 30959 | if (uncasted_info.bits <= target.c_type_bit_size(switch (uncasted_info.signedness) { | 30959 | if (uncasted_info.bits <= target.cTypeBitSize(switch (uncasted_info.signedness) { |
| 30960 | .signed => .int, | 30960 | .signed => .int, |
| 30961 | .unsigned => .uint, | 30961 | .unsigned => .uint, |
| 30962 | })) break :int try sema.coerce(block, switch (uncasted_info.signedness) { | 30962 | })) break :int try sema.coerce(block, switch (uncasted_info.signedness) { |
| 30963 | .signed => Type.c_int, | 30963 | .signed => Type.c_int, |
| 30964 | .unsigned => Type.c_uint, | 30964 | .unsigned => Type.c_uint, |
| 30965 | }, inst, inst_src); | 30965 | }, inst, inst_src); |
| 30966 | if (uncasted_info.bits <= target.c_type_bit_size(switch (uncasted_info.signedness) { | 30966 | if (uncasted_info.bits <= target.cTypeBitSize(switch (uncasted_info.signedness) { |
| 30967 | .signed => .long, | 30967 | .signed => .long, |
| 30968 | .unsigned => .ulong, | 30968 | .unsigned => .ulong, |
| 30969 | })) break :int try sema.coerce(block, switch (uncasted_info.signedness) { | 30969 | })) break :int try sema.coerce(block, switch (uncasted_info.signedness) { |
| 30970 | .signed => Type.c_long, | 30970 | .signed => Type.c_long, |
| 30971 | .unsigned => Type.c_ulong, | 30971 | .unsigned => Type.c_ulong, |
| 30972 | }, inst, inst_src); | 30972 | }, inst, inst_src); |
| 30973 | if (uncasted_info.bits <= target.c_type_bit_size(switch (uncasted_info.signedness) { | 30973 | if (uncasted_info.bits <= target.cTypeBitSize(switch (uncasted_info.signedness) { |
| 30974 | .signed => .longlong, | 30974 | .signed => .longlong, |
| 30975 | .unsigned => .ulonglong, | 30975 | .unsigned => .ulonglong, |
| 30976 | })) break :int try sema.coerce(block, switch (uncasted_info.signedness) { | 30976 | })) break :int try sema.coerce(block, switch (uncasted_info.signedness) { |
src/Type.zig+36-36| ... | @@ -1005,15 +1005,15 @@ pub fn abiAlignmentAdvanced( | ... | @@ -1005,15 +1005,15 @@ pub fn abiAlignmentAdvanced( |
| 1005 | 1005 | ||
| 1006 | .f16 => return .{ .scalar = .@"2" }, | 1006 | .f16 => return .{ .scalar = .@"2" }, |
| 1007 | .f32 => return .{ .scalar = cTypeAlign(target, .float) }, | 1007 | .f32 => return .{ .scalar = cTypeAlign(target, .float) }, |
| 1008 | .f64 => switch (target.c_type_bit_size(.double)) { | 1008 | .f64 => switch (target.cTypeBitSize(.double)) { |
| 1009 | 64 => return .{ .scalar = cTypeAlign(target, .double) }, | 1009 | 64 => return .{ .scalar = cTypeAlign(target, .double) }, |
| 1010 | else => return .{ .scalar = .@"8" }, | 1010 | else => return .{ .scalar = .@"8" }, |
| 1011 | }, | 1011 | }, |
| 1012 | .f80 => switch (target.c_type_bit_size(.longdouble)) { | 1012 | .f80 => switch (target.cTypeBitSize(.longdouble)) { |
| 1013 | 80 => return .{ .scalar = cTypeAlign(target, .longdouble) }, | 1013 | 80 => return .{ .scalar = cTypeAlign(target, .longdouble) }, |
| 1014 | else => return .{ .scalar = Type.u80.abiAlignment(pt) }, | 1014 | else => return .{ .scalar = Type.u80.abiAlignment(pt) }, |
| 1015 | }, | 1015 | }, |
| 1016 | .f128 => switch (target.c_type_bit_size(.longdouble)) { | 1016 | .f128 => switch (target.cTypeBitSize(.longdouble)) { |
| 1017 | 128 => return .{ .scalar = cTypeAlign(target, .longdouble) }, | 1017 | 128 => return .{ .scalar = cTypeAlign(target, .longdouble) }, |
| 1018 | else => return .{ .scalar = .@"16" }, | 1018 | else => return .{ .scalar = .@"16" }, |
| 1019 | }, | 1019 | }, |
| ... | @@ -1366,8 +1366,8 @@ pub fn abiSizeAdvanced( | ... | @@ -1366,8 +1366,8 @@ pub fn abiSizeAdvanced( |
| 1366 | .f32 => return .{ .scalar = 4 }, | 1366 | .f32 => return .{ .scalar = 4 }, |
| 1367 | .f64 => return .{ .scalar = 8 }, | 1367 | .f64 => return .{ .scalar = 8 }, |
| 1368 | .f128 => return .{ .scalar = 16 }, | 1368 | .f128 => return .{ .scalar = 16 }, |
| 1369 | .f80 => switch (target.c_type_bit_size(.longdouble)) { | 1369 | .f80 => switch (target.cTypeBitSize(.longdouble)) { |
| 1370 | 80 => return .{ .scalar = target.c_type_byte_size(.longdouble) }, | 1370 | 80 => return .{ .scalar = target.cTypeByteSize(.longdouble) }, |
| 1371 | else => return .{ .scalar = Type.u80.abiSize(pt) }, | 1371 | else => return .{ .scalar = Type.u80.abiSize(pt) }, |
| 1372 | }, | 1372 | }, |
| 1373 | 1373 | ||
| ... | @@ -1375,16 +1375,16 @@ pub fn abiSizeAdvanced( | ... | @@ -1375,16 +1375,16 @@ pub fn abiSizeAdvanced( |
| 1375 | .isize, | 1375 | .isize, |
| 1376 | => return .{ .scalar = @divExact(target.ptrBitWidth(), 8) }, | 1376 | => return .{ .scalar = @divExact(target.ptrBitWidth(), 8) }, |
| 1377 | 1377 | ||
| 1378 | .c_char => return .{ .scalar = target.c_type_byte_size(.char) }, | 1378 | .c_char => return .{ .scalar = target.cTypeByteSize(.char) }, |
| 1379 | .c_short => return .{ .scalar = target.c_type_byte_size(.short) }, | 1379 | .c_short => return .{ .scalar = target.cTypeByteSize(.short) }, |
| 1380 | .c_ushort => return .{ .scalar = target.c_type_byte_size(.ushort) }, | 1380 | .c_ushort => return .{ .scalar = target.cTypeByteSize(.ushort) }, |
| 1381 | .c_int => return .{ .scalar = target.c_type_byte_size(.int) }, | 1381 | .c_int => return .{ .scalar = target.cTypeByteSize(.int) }, |
| 1382 | .c_uint => return .{ .scalar = target.c_type_byte_size(.uint) }, | 1382 | .c_uint => return .{ .scalar = target.cTypeByteSize(.uint) }, |
| 1383 | .c_long => return .{ .scalar = target.c_type_byte_size(.long) }, | 1383 | .c_long => return .{ .scalar = target.cTypeByteSize(.long) }, |
| 1384 | .c_ulong => return .{ .scalar = target.c_type_byte_size(.ulong) }, | 1384 | .c_ulong => return .{ .scalar = target.cTypeByteSize(.ulong) }, |
| 1385 | .c_longlong => return .{ .scalar = target.c_type_byte_size(.longlong) }, | 1385 | .c_longlong => return .{ .scalar = target.cTypeByteSize(.longlong) }, |
| 1386 | .c_ulonglong => return .{ .scalar = target.c_type_byte_size(.ulonglong) }, | 1386 | .c_ulonglong => return .{ .scalar = target.cTypeByteSize(.ulonglong) }, |
| 1387 | .c_longdouble => return .{ .scalar = target.c_type_byte_size(.longdouble) }, | 1387 | .c_longdouble => return .{ .scalar = target.cTypeByteSize(.longdouble) }, |
| 1388 | 1388 | ||
| 1389 | .anyopaque, | 1389 | .anyopaque, |
| 1390 | .void, | 1390 | .void, |
| ... | @@ -1724,16 +1724,16 @@ pub fn bitSizeAdvanced( | ... | @@ -1724,16 +1724,16 @@ pub fn bitSizeAdvanced( |
| 1724 | .isize, | 1724 | .isize, |
| 1725 | => return target.ptrBitWidth(), | 1725 | => return target.ptrBitWidth(), |
| 1726 | 1726 | ||
| 1727 | .c_char => return target.c_type_bit_size(.char), | 1727 | .c_char => return target.cTypeBitSize(.char), |
| 1728 | .c_short => return target.c_type_bit_size(.short), | 1728 | .c_short => return target.cTypeBitSize(.short), |
| 1729 | .c_ushort => return target.c_type_bit_size(.ushort), | 1729 | .c_ushort => return target.cTypeBitSize(.ushort), |
| 1730 | .c_int => return target.c_type_bit_size(.int), | 1730 | .c_int => return target.cTypeBitSize(.int), |
| 1731 | .c_uint => return target.c_type_bit_size(.uint), | 1731 | .c_uint => return target.cTypeBitSize(.uint), |
| 1732 | .c_long => return target.c_type_bit_size(.long), | 1732 | .c_long => return target.cTypeBitSize(.long), |
| 1733 | .c_ulong => return target.c_type_bit_size(.ulong), | 1733 | .c_ulong => return target.cTypeBitSize(.ulong), |
| 1734 | .c_longlong => return target.c_type_bit_size(.longlong), | 1734 | .c_longlong => return target.cTypeBitSize(.longlong), |
| 1735 | .c_ulonglong => return target.c_type_bit_size(.ulonglong), | 1735 | .c_ulonglong => return target.cTypeBitSize(.ulonglong), |
| 1736 | .c_longdouble => return target.c_type_bit_size(.longdouble), | 1736 | .c_longdouble => return target.cTypeBitSize(.longdouble), |
| 1737 | 1737 | ||
| 1738 | .bool => return 1, | 1738 | .bool => return 1, |
| 1739 | .void => return 0, | 1739 | .void => return 0, |
| ... | @@ -2310,15 +2310,15 @@ pub fn intInfo(starting_ty: Type, mod: *Module) InternPool.Key.IntType { | ... | @@ -2310,15 +2310,15 @@ pub fn intInfo(starting_ty: Type, mod: *Module) InternPool.Key.IntType { |
| 2310 | }, | 2310 | }, |
| 2311 | .usize_type => return .{ .signedness = .unsigned, .bits = target.ptrBitWidth() }, | 2311 | .usize_type => return .{ .signedness = .unsigned, .bits = target.ptrBitWidth() }, |
| 2312 | .isize_type => return .{ .signedness = .signed, .bits = target.ptrBitWidth() }, | 2312 | .isize_type => return .{ .signedness = .signed, .bits = target.ptrBitWidth() }, |
| 2313 | .c_char_type => return .{ .signedness = mod.getTarget().charSignedness(), .bits = target.c_type_bit_size(.char) }, | 2313 | .c_char_type => return .{ .signedness = mod.getTarget().charSignedness(), .bits = target.cTypeBitSize(.char) }, |
| 2314 | .c_short_type => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.short) }, | 2314 | .c_short_type => return .{ .signedness = .signed, .bits = target.cTypeBitSize(.short) }, |
| 2315 | .c_ushort_type => return .{ .signedness = .unsigned, .bits = target.c_type_bit_size(.ushort) }, | 2315 | .c_ushort_type => return .{ .signedness = .unsigned, .bits = target.cTypeBitSize(.ushort) }, |
| 2316 | .c_int_type => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.int) }, | 2316 | .c_int_type => return .{ .signedness = .signed, .bits = target.cTypeBitSize(.int) }, |
| 2317 | .c_uint_type => return .{ .signedness = .unsigned, .bits = target.c_type_bit_size(.uint) }, | 2317 | .c_uint_type => return .{ .signedness = .unsigned, .bits = target.cTypeBitSize(.uint) }, |
| 2318 | .c_long_type => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.long) }, | 2318 | .c_long_type => return .{ .signedness = .signed, .bits = target.cTypeBitSize(.long) }, |
| 2319 | .c_ulong_type => return .{ .signedness = .unsigned, .bits = target.c_type_bit_size(.ulong) }, | 2319 | .c_ulong_type => return .{ .signedness = .unsigned, .bits = target.cTypeBitSize(.ulong) }, |
| 2320 | .c_longlong_type => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.longlong) }, | 2320 | .c_longlong_type => return .{ .signedness = .signed, .bits = target.cTypeBitSize(.longlong) }, |
| 2321 | .c_ulonglong_type => return .{ .signedness = .unsigned, .bits = target.c_type_bit_size(.ulonglong) }, | 2321 | .c_ulonglong_type => return .{ .signedness = .unsigned, .bits = target.cTypeBitSize(.ulonglong) }, |
| 2322 | else => switch (ip.indexToKey(ty.toIntern())) { | 2322 | else => switch (ip.indexToKey(ty.toIntern())) { |
| 2323 | .int_type => |int_type| return int_type, | 2323 | .int_type => |int_type| return int_type, |
| 2324 | .struct_type => ty = Type.fromInterned(ip.loadStructType(ty.toIntern()).backingIntTypeUnordered(ip)), | 2324 | .struct_type => ty = Type.fromInterned(ip.loadStructType(ty.toIntern()).backingIntTypeUnordered(ip)), |
| ... | @@ -2427,7 +2427,7 @@ pub fn floatBits(ty: Type, target: Target) u16 { | ... | @@ -2427,7 +2427,7 @@ pub fn floatBits(ty: Type, target: Target) u16 { |
| 2427 | .f64_type => 64, | 2427 | .f64_type => 64, |
| 2428 | .f80_type => 80, | 2428 | .f80_type => 80, |
| 2429 | .f128_type, .comptime_float_type => 128, | 2429 | .f128_type, .comptime_float_type => 128, |
| 2430 | .c_longdouble_type => target.c_type_bit_size(.longdouble), | 2430 | .c_longdouble_type => target.cTypeBitSize(.longdouble), |
| 2431 | 2431 | ||
| 2432 | else => unreachable, | 2432 | else => unreachable, |
| 2433 | }; | 2433 | }; |
| ... | @@ -4025,5 +4025,5 @@ pub fn smallestUnsignedBits(max: u64) u16 { | ... | @@ -4025,5 +4025,5 @@ pub fn smallestUnsignedBits(max: u64) u16 { |
| 4025 | pub const packed_struct_layout_version = 2; | 4025 | pub const packed_struct_layout_version = 2; |
| 4026 | 4026 | ||
| 4027 | fn cTypeAlign(target: Target, c_type: Target.CType) Alignment { | 4027 | fn cTypeAlign(target: Target, c_type: Target.CType) Alignment { |
| 4028 | return Alignment.fromByteUnits(target.c_type_alignment(c_type)); | 4028 | return Alignment.fromByteUnits(target.cTypeAlignment(c_type)); |
| 4029 | } | 4029 | } |
src/arch/riscv64/CodeGen.zig+1-1| ... | @@ -8304,7 +8304,7 @@ fn promoteVarArg(func: *Func, ty: Type) Type { | ... | @@ -8304,7 +8304,7 @@ fn promoteVarArg(func: *Func, ty: Type) Type { |
| 8304 | switch (ty.floatBits(func.target.*)) { | 8304 | switch (ty.floatBits(func.target.*)) { |
| 8305 | 32, 64 => return Type.f64, | 8305 | 32, 64 => return Type.f64, |
| 8306 | else => |float_bits| { | 8306 | else => |float_bits| { |
| 8307 | assert(float_bits == func.target.c_type_bit_size(.longdouble)); | 8307 | assert(float_bits == func.target.cTypeBitSize(.longdouble)); |
| 8308 | return Type.c_longdouble; | 8308 | return Type.c_longdouble; |
| 8309 | }, | 8309 | }, |
| 8310 | } | 8310 | } |
src/arch/x86_64/CodeGen.zig+1-1| ... | @@ -19374,7 +19374,7 @@ fn promoteVarArg(self: *Self, ty: Type) Type { | ... | @@ -19374,7 +19374,7 @@ fn promoteVarArg(self: *Self, ty: Type) Type { |
| 19374 | switch (ty.floatBits(self.target.*)) { | 19374 | switch (ty.floatBits(self.target.*)) { |
| 19375 | 32, 64 => return Type.f64, | 19375 | 32, 64 => return Type.f64, |
| 19376 | else => |float_bits| { | 19376 | else => |float_bits| { |
| 19377 | assert(float_bits == self.target.c_type_bit_size(.longdouble)); | 19377 | assert(float_bits == self.target.cTypeBitSize(.longdouble)); |
| 19378 | return Type.c_longdouble; | 19378 | return Type.c_longdouble; |
| 19379 | }, | 19379 | }, |
| 19380 | } | 19380 | } |
src/codegen/c/Type.zig+17-17| ... | @@ -326,9 +326,9 @@ pub fn renderLiteralSuffix(ctype: CType, writer: anytype, pool: *const Pool) @Ty | ... | @@ -326,9 +326,9 @@ pub fn renderLiteralSuffix(ctype: CType, writer: anytype, pool: *const Pool) @Ty |
| 326 | pub fn floatActiveBits(ctype: CType, mod: *Module) u16 { | 326 | pub fn floatActiveBits(ctype: CType, mod: *Module) u16 { |
| 327 | const target = &mod.resolved_target.result; | 327 | const target = &mod.resolved_target.result; |
| 328 | return switch (ctype.index) { | 328 | return switch (ctype.index) { |
| 329 | .float => target.c_type_bit_size(.float), | 329 | .float => target.cTypeBitSize(.float), |
| 330 | .double => target.c_type_bit_size(.double), | 330 | .double => target.cTypeBitSize(.double), |
| 331 | .@"long double", .zig_c_longdouble => target.c_type_bit_size(.longdouble), | 331 | .@"long double", .zig_c_longdouble => target.cTypeBitSize(.longdouble), |
| 332 | .zig_f16 => 16, | 332 | .zig_f16 => 16, |
| 333 | .zig_f32 => 32, | 333 | .zig_f32 => 32, |
| 334 | .zig_f64 => 64, | 334 | .zig_f64 => 64, |
| ... | @@ -344,17 +344,17 @@ pub fn byteSize(ctype: CType, pool: *const Pool, mod: *Module) u64 { | ... | @@ -344,17 +344,17 @@ pub fn byteSize(ctype: CType, pool: *const Pool, mod: *Module) u64 { |
| 344 | .basic => |basic_info| switch (basic_info) { | 344 | .basic => |basic_info| switch (basic_info) { |
| 345 | .void => 0, | 345 | .void => 0, |
| 346 | .char, .@"signed char", ._Bool, .@"unsigned char", .bool, .uint8_t, .int8_t => 1, | 346 | .char, .@"signed char", ._Bool, .@"unsigned char", .bool, .uint8_t, .int8_t => 1, |
| 347 | .short => target.c_type_byte_size(.short), | 347 | .short => target.cTypeByteSize(.short), |
| 348 | .int => target.c_type_byte_size(.int), | 348 | .int => target.cTypeByteSize(.int), |
| 349 | .long => target.c_type_byte_size(.long), | 349 | .long => target.cTypeByteSize(.long), |
| 350 | .@"long long" => target.c_type_byte_size(.longlong), | 350 | .@"long long" => target.cTypeByteSize(.longlong), |
| 351 | .@"unsigned short" => target.c_type_byte_size(.ushort), | 351 | .@"unsigned short" => target.cTypeByteSize(.ushort), |
| 352 | .@"unsigned int" => target.c_type_byte_size(.uint), | 352 | .@"unsigned int" => target.cTypeByteSize(.uint), |
| 353 | .@"unsigned long" => target.c_type_byte_size(.ulong), | 353 | .@"unsigned long" => target.cTypeByteSize(.ulong), |
| 354 | .@"unsigned long long" => target.c_type_byte_size(.ulonglong), | 354 | .@"unsigned long long" => target.cTypeByteSize(.ulonglong), |
| 355 | .float => target.c_type_byte_size(.float), | 355 | .float => target.cTypeByteSize(.float), |
| 356 | .double => target.c_type_byte_size(.double), | 356 | .double => target.cTypeByteSize(.double), |
| 357 | .@"long double" => target.c_type_byte_size(.longdouble), | 357 | .@"long double" => target.cTypeByteSize(.longdouble), |
| 358 | .size_t, | 358 | .size_t, |
| 359 | .ptrdiff_t, | 359 | .ptrdiff_t, |
| 360 | .uintptr_t, | 360 | .uintptr_t, |
| ... | @@ -364,11 +364,11 @@ pub fn byteSize(ctype: CType, pool: *const Pool, mod: *Module) u64 { | ... | @@ -364,11 +364,11 @@ pub fn byteSize(ctype: CType, pool: *const Pool, mod: *Module) u64 { |
| 364 | .uint32_t, .int32_t, .zig_f32 => 4, | 364 | .uint32_t, .int32_t, .zig_f32 => 4, |
| 365 | .uint64_t, .int64_t, .zig_f64 => 8, | 365 | .uint64_t, .int64_t, .zig_f64 => 8, |
| 366 | .zig_u128, .zig_i128, .zig_f128 => 16, | 366 | .zig_u128, .zig_i128, .zig_f128 => 16, |
| 367 | .zig_f80 => if (target.c_type_bit_size(.longdouble) == 80) | 367 | .zig_f80 => if (target.cTypeBitSize(.longdouble) == 80) |
| 368 | target.c_type_byte_size(.longdouble) | 368 | target.cTypeByteSize(.longdouble) |
| 369 | else | 369 | else |
| 370 | 16, | 370 | 16, |
| 371 | .zig_c_longdouble => target.c_type_byte_size(.longdouble), | 371 | .zig_c_longdouble => target.cTypeByteSize(.longdouble), |
| 372 | .va_list => unreachable, | 372 | .va_list => unreachable, |
| 373 | _ => unreachable, | 373 | _ => unreachable, |
| 374 | }, | 374 | }, |
src/codegen/llvm.zig+6-6| ... | @@ -564,9 +564,9 @@ const DataLayoutBuilder = struct { | ... | @@ -564,9 +564,9 @@ const DataLayoutBuilder = struct { |
| 564 | .float => &.{ .float, .double, .longdouble }, | 564 | .float => &.{ .float, .double, .longdouble }, |
| 565 | .vector, .aggregate => &.{}, | 565 | .vector, .aggregate => &.{}, |
| 566 | })) |cty| { | 566 | })) |cty| { |
| 567 | if (self.target.c_type_bit_size(cty) != size) continue; | 567 | if (self.target.cTypeBitSize(cty) != size) continue; |
| 568 | abi = self.target.c_type_alignment(cty) * 8; | 568 | abi = self.target.cTypeAlignment(cty) * 8; |
| 569 | pref = self.target.c_type_preferred_alignment(cty) * 8; | 569 | pref = self.target.cTypePreferredAlignment(cty) * 8; |
| 570 | break; | 570 | break; |
| 571 | } | 571 | } |
| 572 | switch (kind) { | 572 | switch (kind) { |
| ... | @@ -3122,7 +3122,7 @@ pub const Object = struct { | ... | @@ -3122,7 +3122,7 @@ pub const Object = struct { |
| 3122 | .c_ulong_type, | 3122 | .c_ulong_type, |
| 3123 | .c_longlong_type, | 3123 | .c_longlong_type, |
| 3124 | .c_ulonglong_type, | 3124 | .c_ulonglong_type, |
| 3125 | => |tag| try o.builder.intType(target.c_type_bit_size( | 3125 | => |tag| try o.builder.intType(target.cTypeBitSize( |
| 3126 | @field(std.Target.CType, @tagName(tag)["c_".len .. @tagName(tag).len - "_type".len]), | 3126 | @field(std.Target.CType, @tagName(tag)["c_".len .. @tagName(tag).len - "_type".len]), |
| 3127 | )), | 3127 | )), |
| 3128 | .c_longdouble_type, | 3128 | .c_longdouble_type, |
| ... | @@ -11799,8 +11799,8 @@ fn backendSupportsF128(target: std.Target) bool { | ... | @@ -11799,8 +11799,8 @@ fn backendSupportsF128(target: std.Target) bool { |
| 11799 | fn intrinsicsAllowed(scalar_ty: Type, target: std.Target) bool { | 11799 | fn intrinsicsAllowed(scalar_ty: Type, target: std.Target) bool { |
| 11800 | return switch (scalar_ty.toIntern()) { | 11800 | return switch (scalar_ty.toIntern()) { |
| 11801 | .f16_type => backendSupportsF16(target), | 11801 | .f16_type => backendSupportsF16(target), |
| 11802 | .f80_type => (target.c_type_bit_size(.longdouble) == 80) and backendSupportsF80(target), | 11802 | .f80_type => (target.cTypeBitSize(.longdouble) == 80) and backendSupportsF80(target), |
| 11803 | .f128_type => (target.c_type_bit_size(.longdouble) == 128) and backendSupportsF128(target), | 11803 | .f128_type => (target.cTypeBitSize(.longdouble) == 128) and backendSupportsF128(target), |
| 11804 | else => true, | 11804 | else => true, |
| 11805 | }; | 11805 | }; |
| 11806 | } | 11806 | } |
tools/generate_c_size_and_align_checks.zig+7-7| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | ||
| 9 | const std = @import("std"); | 9 | const std = @import("std"); |
| 10 | 10 | ||
| 11 | fn c_name(ty: std.Target.CType) []const u8 { | 11 | fn cName(ty: std.Target.CType) []const u8 { |
| 12 | return switch (ty) { | 12 | return switch (ty) { |
| 13 | .char => "char", | 13 | .char => "char", |
| 14 | .short => "short", | 14 | .short => "short", |
| ... | @@ -46,16 +46,16 @@ pub fn main() !void { | ... | @@ -46,16 +46,16 @@ pub fn main() !void { |
| 46 | inline for (@typeInfo(std.Target.CType).Enum.fields) |field| { | 46 | inline for (@typeInfo(std.Target.CType).Enum.fields) |field| { |
| 47 | const c_type: std.Target.CType = @enumFromInt(field.value); | 47 | const c_type: std.Target.CType = @enumFromInt(field.value); |
| 48 | try stdout.print("_Static_assert(sizeof({0s}) == {1d}, \"sizeof({0s}) == {1d}\");\n", .{ | 48 | try stdout.print("_Static_assert(sizeof({0s}) == {1d}, \"sizeof({0s}) == {1d}\");\n", .{ |
| 49 | c_name(c_type), | 49 | cName(c_type), |
| 50 | target.c_type_byte_size(c_type), | 50 | target.cTypeByteSize(c_type), |
| 51 | }); | 51 | }); |
| 52 | try stdout.print("_Static_assert(_Alignof({0s}) == {1d}, \"_Alignof({0s}) == {1d}\");\n", .{ | 52 | try stdout.print("_Static_assert(_Alignof({0s}) == {1d}, \"_Alignof({0s}) == {1d}\");\n", .{ |
| 53 | c_name(c_type), | 53 | cName(c_type), |
| 54 | target.c_type_alignment(c_type), | 54 | target.cTypeAlignment(c_type), |
| 55 | }); | 55 | }); |
| 56 | try stdout.print("_Static_assert(__alignof({0s}) == {1d}, \"__alignof({0s}) == {1d}\");\n\n", .{ | 56 | try stdout.print("_Static_assert(__alignof({0s}) == {1d}, \"__alignof({0s}) == {1d}\");\n\n", .{ |
| 57 | c_name(c_type), | 57 | cName(c_type), |
| 58 | target.c_type_preferred_alignment(c_type), | 58 | target.cTypePreferredAlignment(c_type), |
| 59 | }); | 59 | }); |
| 60 | } | 60 | } |
| 61 | } | 61 | } |
tools/update_cpu_features.zig+4-4| ... | @@ -1336,10 +1336,10 @@ fn processOneTarget(job: Job) anyerror!void { | ... | @@ -1336,10 +1336,10 @@ fn processOneTarget(job: Job) anyerror!void { |
| 1336 | try w.writeAll( | 1336 | try w.writeAll( |
| 1337 | \\}; | 1337 | \\}; |
| 1338 | \\ | 1338 | \\ |
| 1339 | \\pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 1339 | \\pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 1340 | \\pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 1340 | \\pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 1341 | \\pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 1341 | \\pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 1342 | \\pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 1342 | \\pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 1343 | \\ | 1343 | \\ |
| 1344 | \\pub const all_features = blk: { | 1344 | \\pub const all_features = blk: { |
| 1345 | \\ | 1345 | \\ |
tools/update_spirv_features.zig+4-4| ... | @@ -122,10 +122,10 @@ pub fn main() !void { | ... | @@ -122,10 +122,10 @@ pub fn main() !void { |
| 122 | try w.writeAll( | 122 | try w.writeAll( |
| 123 | \\}; | 123 | \\}; |
| 124 | \\ | 124 | \\ |
| 125 | \\pub const featureSet = CpuFeature.feature_set_fns(Feature).featureSet; | 125 | \\pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; |
| 126 | \\pub const featureSetHas = CpuFeature.feature_set_fns(Feature).featureSetHas; | 126 | \\pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; |
| 127 | \\pub const featureSetHasAny = CpuFeature.feature_set_fns(Feature).featureSetHasAny; | 127 | \\pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; |
| 128 | \\pub const featureSetHasAll = CpuFeature.feature_set_fns(Feature).featureSetHasAll; | 128 | \\pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; |
| 129 | \\ | 129 | \\ |
| 130 | \\pub const all_features = blk: { | 130 | \\pub const all_features = blk: { |
| 131 | \\ @setEvalBranchQuota(2000); | 131 | \\ @setEvalBranchQuota(2000); |