| ... | @@ -1240,13 +1240,10 @@ pub const Cpu = struct { | ... | @@ -1240,13 +1240,10 @@ pub const Cpu = struct { |
| 1240 | | 1240 | |
| 1241 | /// Adds the specified feature set but not its dependencies. | 1241 | /// Adds the specified feature set but not its dependencies. |
| 1242 | pub fn addFeatureSet(set: *Set, other_set: Set) void { | 1242 | pub fn addFeatureSet(set: *Set, other_set: Set) void { |
| 1243 | switch (builtin.zig_backend) { | 1243 | if (builtin.zig_backend == .stage2_x86_64 and builtin.object_format == .coff) { |
| 1244 | .stage2_x86_64 => { | 1244 | for (&set.ints, other_set.ints) |*set_int, other_set_int| set_int.* |= other_set_int; |
| 1245 | for (&set.ints, other_set.ints) |*set_int, other_set_int| set_int.* |= other_set_int; | 1245 | } else { |
| 1246 | }, | 1246 | set.ints = @as(@Vector(usize_count, usize), set.ints) | @as(@Vector(usize_count, usize), other_set.ints); |
| 1247 | else => { | | |
| 1248 | set.ints = @as(@Vector(usize_count, usize), set.ints) | @as(@Vector(usize_count, usize), other_set.ints); | | |
| 1249 | }, | | |
| 1250 | } | 1247 | } |
| 1251 | } | 1248 | } |
| 1252 | | 1249 | |
| ... | @@ -1259,13 +1256,10 @@ pub const Cpu = struct { | ... | @@ -1259,13 +1256,10 @@ pub const Cpu = struct { |
| 1259 | | 1256 | |
| 1260 | /// Removes the specified feature but not its dependents. | 1257 | /// Removes the specified feature but not its dependents. |
| 1261 | pub fn removeFeatureSet(set: *Set, other_set: Set) void { | 1258 | pub fn removeFeatureSet(set: *Set, other_set: Set) void { |
| 1262 | switch (builtin.zig_backend) { | 1259 | if (builtin.zig_backend == .stage2_x86_64 and builtin.object_format == .coff) { |
| 1263 | .stage2_x86_64 => { | 1260 | for (&set.ints, other_set.ints) |*set_int, other_set_int| set_int.* &= ~other_set_int; |
| 1264 | for (&set.ints, other_set.ints) |*set_int, other_set_int| set_int.* &= ~other_set_int; | 1261 | } else { |
| 1265 | }, | 1262 | set.ints = @as(@Vector(usize_count, usize), set.ints) & ~@as(@Vector(usize_count, usize), other_set.ints); |
| 1266 | else => { | | |
| 1267 | set.ints = @as(@Vector(usize_count, usize), set.ints) & ~@as(@Vector(usize_count, usize), other_set.ints); | | |
| 1268 | }, | | |
| 1269 | } | 1263 | } |
| 1270 | } | 1264 | } |
| 1271 | | 1265 | |
| ... | @@ -1295,19 +1289,16 @@ pub const Cpu = struct { | ... | @@ -1295,19 +1289,16 @@ pub const Cpu = struct { |
| 1295 | } | 1289 | } |
| 1296 | | 1290 | |
| 1297 | pub fn isSuperSetOf(set: Set, other_set: Set) bool { | 1291 | pub fn isSuperSetOf(set: Set, other_set: Set) bool { |
| 1298 | switch (builtin.zig_backend) { | 1292 | if (builtin.zig_backend == .stage2_x86_64 and builtin.object_format == .coff) { |
| 1299 | .stage2_x86_64 => { | 1293 | var result = true; |
| 1300 | var result = true; | 1294 | for (&set.ints, other_set.ints) |*set_int, other_set_int| |
| 1301 | for (&set.ints, other_set.ints) |*set_int, other_set_int| | 1295 | result = result and (set_int.* & other_set_int) == other_set_int; |
| 1302 | result = result and (set_int.* & other_set_int) == other_set_int; | 1296 | return result; |
| 1303 | return result; | 1297 | } else { |
| 1304 | }, | 1298 | const V = @Vector(usize_count, usize); |
| 1305 | else => { | 1299 | const set_v: V = set.ints; |
| 1306 | const V = @Vector(usize_count, usize); | 1300 | const other_v: V = other_set.ints; |
| 1307 | const set_v: V = set.ints; | 1301 | return @reduce(.And, (set_v & other_v) == other_v); |
| 1308 | const other_v: V = other_set.ints; | | |
| 1309 | return @reduce(.And, (set_v & other_v) == other_v); | | |
| 1310 | }, | | |
| 1311 | } | 1302 | } |
| 1312 | } | 1303 | } |
| 1313 | }; | 1304 | }; |