@@ -162,7 +162,7 @@ pub fn ignoreNonZeroSizedBitfieldTypeAlignment(target: std.Target) bool {
162162 switch (target .cpu .arch ) {
163163 .avr = > return true ,
164164 .arm = > {
165- if (std . Target . arm . featureSetHas ( target .cpu .features , .has_v7 )) {
165+ if (target .cpu .has ( .arm , .has_v7 )) {
166166 switch (target .os .tag ) {
167167 .ios = > return true ,
168168 else = > return false ,
@@ -185,7 +185,7 @@ pub fn minZeroWidthBitfieldAlignment(target: std.Target) ?u29 {
185185 switch (target .cpu .arch ) {
186186 .avr = > return 8 ,
187187 .arm = > {
188- if (std . Target . arm . featureSetHas ( target .cpu .features , .has_v7 )) {
188+ if (target .cpu .has ( .arm , .has_v7 )) {
189189 switch (target .os .tag ) {
190190 .ios = > return 32 ,
191191 else = > return null ,
@@ -203,7 +203,7 @@ pub fn unnamedFieldAffectsAlignment(target: std.Target) bool {
203203 return true ;
204204 },
205205 .armeb = > {
206- if (std . Target . arm . featureSetHas ( target .cpu .features , .has_v7 )) {
206+ if (target .cpu .has ( .arm , .has_v7 )) {
207207 if (std .Target .Abi .default (target .cpu .arch , target .os .tag ) == .eabi ) return true ;
208208 }
209209 },
@@ -230,7 +230,7 @@ pub fn defaultAlignment(target: std.Target) u29 {
230230 switch (target .cpu .arch ) {
231231 .avr = > return 1 ,
232232 .arm = > if (target .abi .isAndroid () or target .os .tag == .ios ) return 16 else return 8 ,
233- .sparc = > if (std . Target . sparc . featureSetHas ( target .cpu .features , .v9 )) return 16 else return 8 ,
233+ .sparc = > if (target .cpu .has ( .sparc , .v9 )) return 16 else return 8 ,
234234 .mips , .mipsel = > switch (target .abi ) {
235235 .none , .gnuabi64 = > return 16 ,
236236 else = > return 8 ,
@@ -268,7 +268,7 @@ pub fn systemCompiler(target: std.Target) LangOpts.Compiler {
268268pub fn hasFloat128 (target : std.Target ) bool {
269269 if (target .cpu .arch .isWasm ()) return true ;
270270 if (target .os .tag .isDarwin ()) return false ;
271- if (target .cpu .arch .isPowerPC ()) return std . Target . powerpc . featureSetHas ( target .cpu .features , .float128 );
271+ if (target .cpu .arch .isPowerPC ()) return target .cpu .has ( .powerpc , .float128 );
272272 return switch (target .os .tag ) {
273273 .dragonfly ,
274274 .haiku ,
@@ -334,7 +334,7 @@ pub const FPSemantics = enum {
334334 .spirv32 ,
335335 .spirv64 ,
336336 = > return .IEEEHalf ,
337- .x86 , .x86_64 = > if (std . Target . x86 . featureSetHas ( target .cpu .features , .sse2 )) return .IEEEHalf ,
337+ .x86 , .x86_64 = > if (target .cpu .has ( .x86 , .sse2 )) return .IEEEHalf ,
338338 else = > {},
339339 }
340340 return null ;
@@ -399,7 +399,7 @@ pub fn defaultFpEvalMethod(target: std.Target) LangOpts.FPEvalMethod {
399399 return .double ;
400400 }
401401 }
402- if (std . Target . x86 . featureSetHas ( target .cpu .features , .sse )) {
402+ if (target .cpu .has ( .x86 , .sse )) {
403403 return .source ;
404404 }
405405 return .extended ;
@@ -765,7 +765,7 @@ test "target size/align tests" {
765765 .specifier = .char ,
766766 };
767767
768- try std .testing .expectEqual (true , std . Target . arm . featureSetHas ( comp .target .cpu .features , .has_v7 ));
768+ try std .testing .expectEqual (true , comp .target .cpu .has ( .arm , .has_v7 ));
769769 try std .testing .expectEqual (@as (u64 , 1 ), ct .sizeof (& comp ).? );
770770 try std .testing .expectEqual (@as (u64 , 1 ), ct .alignof (& comp ));
771771 try std .testing .expectEqual (true , ignoreNonZeroSizedBitfieldTypeAlignment (comp .target ));
0 commit comments