We can examine
/proc/cpuinfo on Intel and ARM machines to learn cpu features, like AES and SHA. I need to do the same for PowerPC under both AIX and Linux.
$ cat /proc/cpuinfo processor : 0 cpu : POWER8E (raw), altivec supported clock : 2061.000000MHz revision : 2.1 (pvr 004b 0201) ... processor : 159 cpu : POWER8E (raw), altivec supported clock : 2061.000000MHz revision : 2.1 (pvr 004b 0201) timebase : 512000000 platform : PowerNV model : 8247-22L machine : PowerNV 8247-22L firmware : OPAL v3
GCC112 is a Power 8 machine. I should be seeing flags like VMX, AES, SHA, PMULL, etc. VMX is roughly the PowerPC equivalent to Intel SSE and ARM NEON.
I've found some related discussions like /proc/cpuinfo on comp.os.linux.powerpc. I also found What do we check on a new system?, but it lacks useful details like cpu features. Finally, there's a related question at What do the flags in /proc/cpuinfo mean?, but it does not discuss PowerPC.
GCC appears to provide the information to C programs through its use of built-ins. For example, there's a
vsx test and a
vcrypto test. The problem is, I'm working from a Bash script and not a C program.
How do I get the PowerPC cpu features on AIX and Linux?