Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the bundled cpu_features to v0.9.0 for loong64 & riscv support #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xen0n
Copy link

@xen0n xen0n commented Oct 29, 2024

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 }
}

Upstream has removed the GYP definitions, so we have to retain it and
sync relevant changes (addition of loong64 and riscv64).

Signed-off-by: WANG Xuerui <[email protected]>
Signed-off-by: WANG Xuerui <[email protected]>
@xen0n
Copy link
Author

xen0n commented Oct 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant