From ab200827a88fb60b8c53756b4b9c7b0886a6e742 Mon Sep 17 00:00:00 2001 From: Yury Gribov Date: Tue, 9 Apr 2024 21:51:35 +0300 Subject: [PATCH] Use correct macro to detect ZMM regs. --- arch/x86_64/table.S.tpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86_64/table.S.tpl b/arch/x86_64/table.S.tpl index 95b4809..dea458c 100644 --- a/arch/x86_64/table.S.tpl +++ b/arch/x86_64/table.S.tpl @@ -72,7 +72,8 @@ _${lib_suffix}_save_regs_and_resolve: PUSH_REG(r14) PUSH_REG(r15) // 16 -#ifdef __AVX2__ + // Maybe use cpuid instead of macro to detect current vector size... +#ifdef __AVX512F__ PUSH_ZMM_REG(zmm0) PUSH_ZMM_REG(zmm1) PUSH_ZMM_REG(zmm2) @@ -106,7 +107,7 @@ _${lib_suffix}_save_regs_and_resolve: // Stack is just 8-byte aligned but callee will re-align to 16 call _${lib_suffix}_tramp_resolve -#ifdef __AVX2__ +#ifdef __AVX512F__ POP_ZMM_REG(zmm7) POP_ZMM_REG(zmm6) POP_ZMM_REG(zmm5)