std: Delete a hack in the feature set code

Now that bitwise not works on vectors we can simplify the code.
This commit is contained in:
LemonBoy 2020-03-14 20:01:42 +01:00 committed by Andrew Kelley
parent d2d97e55cc
commit eff7555d5d
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -501,11 +501,8 @@ pub const Target = struct {
/// Removes the specified feature but not its dependents.
pub fn removeFeatureSet(set: *Set, other_set: Set) void {
// TODO should be able to use binary not on @Vector type.
// https://github.com/ziglang/zig/issues/903
for (set.ints) |*int, i| {
int.* &= ~other_set.ints[i];
}
set.ints = @as(@Vector(usize_count, usize), set.ints) &
~@as(@Vector(usize_count, usize), other_set.ints);
}
pub fn populateDependencies(set: *Set, all_features_list: []const Cpu.Feature) void {