Skip to content

Commit

Permalink
Use correct macro to detect ZMM regs.
Browse files Browse the repository at this point in the history
  • Loading branch information
yugr committed Apr 9, 2024
1 parent 2e9cc63 commit ab20082
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86_64/table.S.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ab20082

Please sign in to comment.