mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
std.crypto.hash.sha2: require avx2 on x86_64
according to https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=vpalignr&ig_expand=283,283,284,283,283&techs=AVX_ALL the vpalignr instruction requires AVX2 support
This commit is contained in:
parent
0c1bfe271e
commit
82520a214c
@ -238,7 +238,7 @@ fn Sha2x32(comptime params: Sha2Params32) type {
|
||||
return;
|
||||
},
|
||||
// C backend doesn't currently support passing vectors to inline asm.
|
||||
.x86_64 => if (builtin.zig_backend != .stage2_c and comptime std.Target.x86.featureSetHas(builtin.cpu.features, .sha)) {
|
||||
.x86_64 => if (builtin.zig_backend != .stage2_c and comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .sha, .avx2 })) {
|
||||
var x: v4u32 = [_]u32{ d.s[5], d.s[4], d.s[1], d.s[0] };
|
||||
var y: v4u32 = [_]u32{ d.s[7], d.s[6], d.s[3], d.s[2] };
|
||||
const s_v = @as(*[16]v4u32, @ptrCast(&s));
|
||||
|
Loading…
Reference in New Issue
Block a user