From eff7555d5d62fc8c701529a9540fb296646d348e Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sat, 14 Mar 2020 20:01:42 +0100 Subject: std: Delete a hack in the feature set code Now that bitwise not works on vectors we can simplify the code. --- lib/std/target.zig | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/std') diff --git a/lib/std/target.zig b/lib/std/target.zig index 3f18791eb9..f920845d0d 100644 --- a/lib/std/target.zig +++ b/lib/std/target.zig @@ -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 { -- cgit v1.2.3