cpu-features
cpu-features copied to clipboard
Bump the bundled cpu_features to v0.9.0 for loong64 & riscv support
Tested on x64, loong64 and riscv64.
Example output on loong64
{
arch: 'loong64',
flags: {
LAM: true,
UAL: true,
FPU: true,
LSX: true,
LASX: true,
CRC32: true,
LVZ: true,
LBT_X86: true,
LBT_ARM: true,
LBT_MIPS: true
}
}
Example output on riscv64
{
arch: 'riscv64',
uarch: '',
vendor: '',
flags: { RV64I: true, M: true, A: true, F: true, D: true, C: true, V: true }
}
Question: I see mips, ppc and x86 are not differentiated for their bitness, but arm and aarch64 are. And aarch64 deviates from the Node arch name arm64. So how do we approach this for the 2 new architectures being added here?
Currently, the cpu_features macros header probes for 64-bit LoongArch only, but the bitness isn't otherwise represented by the cpu_features output, so we must invent a key for that or put the bitness info in arch. RISC-V bitness is deducible from the flags.RVxxI key so I'm not sure if its arch can stay just riscv.