• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* POWER feature check
2  * Copyright (C) 2020 Matheus Castanho <msc@linux.ibm.com>, IBM
3  * For conditions of distribution and use, see copyright notice in zlib.h
4  */
5 
6 #include <sys/auxv.h>
7 #include "../../zutil.h"
8 
9 Z_INTERNAL int power_cpu_has_arch_2_07;
10 
power_check_features(void)11 void Z_INTERNAL power_check_features(void) {
12     unsigned long hwcap2;
13     hwcap2 = getauxval(AT_HWCAP2);
14 
15 #ifdef POWER8
16     if (hwcap2 & PPC_FEATURE2_ARCH_2_07)
17       power_cpu_has_arch_2_07 = 1;
18 #endif
19 }
20