]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Update VEC macros to complete API for evex/evex512 impls
authorNoah Goldstein <goldstein.w.n@gmail.com>
Sat, 15 Oct 2022 03:00:25 +0000 (22:00 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Sat, 15 Oct 2022 04:21:58 +0000 (21:21 -0700)
commit52ab7604db35e0421bc3d2468a3af52b2c513a7b
tree2763b19062339644b3a747ad81ca38d253bd8ce7
parent2c42257314536b94cc8d52edede86e94e98c1436
x86: Update VEC macros to complete API for evex/evex512 impls

1) Copy so that backport will be easier.
2) Make section only define if there is not a previous definition
3) Add `VEC_lo` definition for proper reg-width but in the
   ymm/zmm0-15 range.
4) Add macros for accessing GPRs based on VEC_SIZE
        This is to make it easier to do think like:
        ```
            vpcmpb %VEC(0), %VEC(1), %k0
            kmov{d|q} %k0, %{eax|rax}
            test %{eax|rax}
        ```
        It adds macro s.t any GPR can get the proper width with:
            `V{upcase_GPR_name}`

        and any mask insn can get the proper width with:
            `{upcase_mask_insn_without_postfix}`

This commit does not change libc.so

Tested build on x86-64
sysdeps/x86_64/multiarch/reg-macros.h [new file with mode: 0644]
sysdeps/x86_64/multiarch/scripts/gen-reg-macros.py [new file with mode: 0644]
sysdeps/x86_64/multiarch/x86-avx-rtm-vecs.h [new file with mode: 0644]
sysdeps/x86_64/multiarch/x86-avx-vecs.h [new file with mode: 0644]
sysdeps/x86_64/multiarch/x86-evex-vecs-common.h [new file with mode: 0644]
sysdeps/x86_64/multiarch/x86-evex256-vecs.h [new file with mode: 0644]
sysdeps/x86_64/multiarch/x86-evex512-vecs.h [new file with mode: 0644]
sysdeps/x86_64/multiarch/x86-sse2-vecs.h [new file with mode: 0644]
sysdeps/x86_64/multiarch/x86-vec-macros.h [new file with mode: 0644]