aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-12-20 18:32:06 +0200
committerVeikka Tuominen <git@vexu.eu>2022-12-20 18:34:33 +0200
commit9f23702c21645aeddd64bcf203bc8b62a328f75f (patch)
tree5305f31f4a4bfa34630cbab71f20c6f76e34f659 /src
parent6da070c5ac1707f2f5370e2e26124a3e114e25ea (diff)
downloadzig-9f23702c21645aeddd64bcf203bc8b62a328f75f.tar.gz
zig-9f23702c21645aeddd64bcf203bc8b62a328f75f.zip
llvm: fix C ABI for <=256 bit vectors
Closes #13918
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86_64/abi.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/x86_64/abi.zig b/src/arch/x86_64/abi.zig
index 393d4db3d5..54c08e4aa9 100644
--- a/src/arch/x86_64/abi.zig
+++ b/src/arch/x86_64/abi.zig
@@ -143,7 +143,8 @@ pub fn classifySystemV(ty: Type, target: Target, ctx: Context) [8]Class {
.integer, .integer, .integer, .integer,
.integer, .integer, .integer, .integer,
};
- if (has_avx512 and bit_size <= 256) return .{
+ const has_avx = target.cpu.features.isEnabled(@enumToInt(std.Target.x86.Feature.avx));
+ if (has_avx and bit_size <= 256) return .{
.integer, .integer, .integer, .integer,
.none, .none, .none, .none,
};