LICENSE | ||
README.md |
ruapu
Detect cpu ISA features with single-file
CPU | ✅ x86, x86-64 ✅ arm, aarch64 |
|
OS | ✅ Windows ✅ Linux ✅ macOS ✅ Android ✅ iOS | |
Compiler | ✅ GCC ✅ Clang ✅ MSVC ✅ MinGW |
Let's ruapu
Compile ruapu test program
|
Run ruapu in command line
|
Techniques inside ruapu
ruapu is implemented in C language to ensure the widest possible portability.
ruapu determines whether the CPU supports certain instruction sets by trying to execute instructions and detecting whether an Illegal Instruction
exception occurs. ruapu does not rely on the cpuid instructions and registers related to the CPU architecture, nor does it rely on the MISA
information and system calls of the operating system. This can help us get more detailed CPU ISA information.
- Detect vendor extended ISA, apple
amx
, risc-v vendor ISA, etc. - Checking for richer isa on Windows ARM,
IsProcessorFeaturePresent()
can only get little ISA information - Correctly detect
x86-avx512
for macOS, macOS hides it incpuid
- Detect new cpu's ISA on older systems, they are usually not exposed in
auxv
orMISA
- Detect CPU hidden ISA,
x86-fma4
on zen1, ISA in hypervisor, etc.