authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-03-14 20:01:42+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-04-05 18:34:31-04:00
logeff7555d5d62fc8c701529a9540fb296646d348e
tree4401dc8ab2b2ea2c6c2f41a698e6ac5415c6bf99
parentd2d97e55ccd2d7c992d01bd05ea52a52fe36776e
signaturelock-open Commit is signed but in an unrecognized format.

std: Delete a hack in the feature set code

Now that bitwise not works on vectors we can simplify the code.

1 files changed, 2 insertions(+), 5 deletions(-)

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