mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std: reenable vectorized code with the C backend
This commit is contained in:
parent
c29c4c6f70
commit
2770159606
@ -200,7 +200,7 @@ const CompressGeneric = struct {
|
||||
}
|
||||
};
|
||||
|
||||
const compress = if (builtin.cpu.arch == .x86_64 and builtin.zig_backend != .stage2_c)
|
||||
const compress = if (builtin.cpu.arch == .x86_64)
|
||||
CompressVectorized.compress
|
||||
else
|
||||
CompressGeneric.compress;
|
||||
|
||||
@ -152,7 +152,7 @@ pub const State = struct {
|
||||
self.endianSwap();
|
||||
}
|
||||
|
||||
pub const permute = if (builtin.cpu.arch == .x86_64 and builtin.zig_backend != .stage2_c) impl: {
|
||||
pub const permute = if (builtin.cpu.arch == .x86_64) impl: {
|
||||
break :impl permute_vectorized;
|
||||
} else if (builtin.mode == .ReleaseSmall) impl: {
|
||||
break :impl permute_small;
|
||||
|
||||
@ -719,11 +719,7 @@ pub const Target = struct {
|
||||
|
||||
/// Adds the specified feature set but not its dependencies.
|
||||
pub fn addFeatureSet(set: *Set, other_set: Set) void {
|
||||
if (builtin.zig_backend == .stage2_c) {
|
||||
for (&set.ints, 0..) |*int, i| int.* |= other_set.ints[i];
|
||||
} else {
|
||||
set.ints = @as(@Vector(usize_count, usize), set.ints) | @as(@Vector(usize_count, usize), other_set.ints);
|
||||
}
|
||||
set.ints = @as(@Vector(usize_count, usize), set.ints) | @as(@Vector(usize_count, usize), other_set.ints);
|
||||
}
|
||||
|
||||
/// Removes the specified feature but not its dependents.
|
||||
@ -735,11 +731,7 @@ pub const Target = struct {
|
||||
|
||||
/// Removes the specified feature but not its dependents.
|
||||
pub fn removeFeatureSet(set: *Set, other_set: Set) void {
|
||||
if (builtin.zig_backend == .stage2_c) {
|
||||
for (&set.ints, 0..) |*int, i| int.* &= ~other_set.ints[i];
|
||||
} else {
|
||||
set.ints = @as(@Vector(usize_count, usize), set.ints) & ~@as(@Vector(usize_count, usize), other_set.ints);
|
||||
}
|
||||
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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user