(root)/
glibc-2.38/
sysdeps/
s390/
cpu-features.h
       1  /* Initialize cpu feature data.  s390x version.
       2     Copyright (C) 2023 Free Software Foundation, Inc.
       3  
       4     The GNU C Library is free software; you can redistribute it and/or
       5     modify it under the terms of the GNU Lesser General Public
       6     License as published by the Free Software Foundation; either
       7     version 2.1 of the License, or (at your option) any later version.
       8  
       9     The GNU C Library is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      12     Lesser General Public License for more details.
      13  
      14     You should have received a copy of the GNU Lesser General Public
      15     License along with the GNU C Library; if not, see
      16     <https://www.gnu.org/licenses/>.  */
      17  
      18  #ifndef __CPU_FEATURES_S390X_H
      19  # define __CPU_FEATURES_S390X_H
      20  
      21  #define S390_STFLE_BITS_Z10  34 /* General instructions extension */
      22  #define S390_STFLE_BITS_Z196 45 /* Distinct operands, pop ... */
      23  #define S390_STFLE_BITS_ARCH13_MIE3 61 /* Miscellaneous-Instruction-Extensions
      24  					  Facility 3, e.g. mvcrl.  */
      25  
      26  #define S390_STFLE_MASK_ARCH13_MIE3 (1ULL << (63 - S390_STFLE_BITS_ARCH13_MIE3))
      27  
      28  
      29  #define S390_IS_ARCH13_MIE3(STFLE_BITS_ARRAY)			\
      30    (((STFLE_BITS_ARRAY)[0] & S390_STFLE_MASK_ARCH13_MIE3) != 0)
      31  
      32  #define S390_IS_Z196(STFLE_BITS_ARRAY)			\
      33    (((STFLE_BITS_ARRAY)[0] & (1ULL << (63 - S390_STFLE_BITS_Z196))) != 0)
      34  
      35  #define S390_IS_Z10(STFLE_BITS_ARRAY)				\
      36    (((STFLE_BITS_ARRAY)[0] & (1ULL << (63 - S390_STFLE_BITS_Z10))) != 0)
      37  
      38  struct cpu_features
      39  {
      40    unsigned long int hwcap;
      41    unsigned long int __reserved_hwcap2;
      42    unsigned long long stfle_bits[3];
      43    unsigned long long __reserved[11];
      44  };
      45  
      46  #endif /* __CPU_FEATURES_S390X_H  */