1  /* Macro helpers for VEC_{type}({vec_num})
       2     All versions must be listed in ifunc-impl-list.c.
       3     Copyright (C) 2022-2023 Free Software Foundation, Inc.
       4     This file is part of the GNU C Library.
       5  
       6     The GNU C Library is free software; you can redistribute it and/or
       7     modify it under the terms of the GNU Lesser General Public
       8     License as published by the Free Software Foundation; either
       9     version 2.1 of the License, or (at your option) any later version.
      10  
      11     The GNU C Library is distributed in the hope that it will be useful,
      12     but WITHOUT ANY WARRANTY; without even the implied warranty of
      13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      14     Lesser General Public License for more details.
      15  
      16     You should have received a copy of the GNU Lesser General Public
      17     License along with the GNU C Library; if not, see
      18     <https://www.gnu.org/licenses/>.  */
      19  
      20  #ifndef _X86_VEC_MACROS_H
      21  #define _X86_VEC_MACROS_H			1
      22  
      23  #ifndef VEC_SIZE
      24  # error "Never include this file directly. Always include a vector config."
      25  #endif
      26  
      27  /* Defines so we can use SSE2 / AVX2 / EVEX / EVEX512 encoding with same
      28     VMM(N) values.  */
      29  #define VMM_hi_xmm0				xmm16
      30  #define VMM_hi_xmm1				xmm17
      31  #define VMM_hi_xmm2				xmm18
      32  #define VMM_hi_xmm3				xmm19
      33  #define VMM_hi_xmm4				xmm20
      34  #define VMM_hi_xmm5				xmm21
      35  #define VMM_hi_xmm6				xmm22
      36  #define VMM_hi_xmm7				xmm23
      37  #define VMM_hi_xmm8				xmm24
      38  #define VMM_hi_xmm9				xmm25
      39  #define VMM_hi_xmm10			xmm26
      40  #define VMM_hi_xmm11			xmm27
      41  #define VMM_hi_xmm12			xmm28
      42  #define VMM_hi_xmm13			xmm29
      43  #define VMM_hi_xmm14			xmm30
      44  #define VMM_hi_xmm15			xmm31
      45  
      46  #define VMM_hi_ymm0				ymm16
      47  #define VMM_hi_ymm1				ymm17
      48  #define VMM_hi_ymm2				ymm18
      49  #define VMM_hi_ymm3				ymm19
      50  #define VMM_hi_ymm4				ymm20
      51  #define VMM_hi_ymm5				ymm21
      52  #define VMM_hi_ymm6				ymm22
      53  #define VMM_hi_ymm7				ymm23
      54  #define VMM_hi_ymm8				ymm24
      55  #define VMM_hi_ymm9				ymm25
      56  #define VMM_hi_ymm10			ymm26
      57  #define VMM_hi_ymm11			ymm27
      58  #define VMM_hi_ymm12			ymm28
      59  #define VMM_hi_ymm13			ymm29
      60  #define VMM_hi_ymm14			ymm30
      61  #define VMM_hi_ymm15			ymm31
      62  
      63  #define VMM_hi_zmm0				zmm16
      64  #define VMM_hi_zmm1				zmm17
      65  #define VMM_hi_zmm2				zmm18
      66  #define VMM_hi_zmm3				zmm19
      67  #define VMM_hi_zmm4				zmm20
      68  #define VMM_hi_zmm5				zmm21
      69  #define VMM_hi_zmm6				zmm22
      70  #define VMM_hi_zmm7				zmm23
      71  #define VMM_hi_zmm8				zmm24
      72  #define VMM_hi_zmm9				zmm25
      73  #define VMM_hi_zmm10			zmm26
      74  #define VMM_hi_zmm11			zmm27
      75  #define VMM_hi_zmm12			zmm28
      76  #define VMM_hi_zmm13			zmm29
      77  #define VMM_hi_zmm14			zmm30
      78  #define VMM_hi_zmm15			zmm31
      79  
      80  #define PRIMITIVE_VMM(vec, num)		vec##num
      81  
      82  #define VMM_any_xmm(i)			PRIMITIVE_VMM(xmm, i)
      83  #define VMM_any_ymm(i)			PRIMITIVE_VMM(ymm, i)
      84  #define VMM_any_zmm(i)			PRIMITIVE_VMM(zmm, i)
      85  
      86  #define VMM_hi_xmm(i)			PRIMITIVE_VMM(VMM_hi_xmm, i)
      87  #define VMM_hi_ymm(i)			PRIMITIVE_VMM(VMM_hi_ymm, i)
      88  #define VMM_hi_zmm(i)			PRIMITIVE_VMM(VMM_hi_zmm, i)
      89  
      90  #endif