[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Illegal instruction `mrs x0, id_aa64isar0_el1` on aarch64 on older Linux kernels (Issue #608)
notifications at github.com
Mon Nov 29 15:51:18 UTC 2021
I'm running Cog on aarch64, and because I have an old linux kernel (v3.18.140) which I cannot upgrade (it's a repurposed PostmarketOS Android device), Cog yields illegal instruction trying to execute `mrs x0, id_aa64isar0_el1`. This instruction is privileged, but later linux kernels trap and emulate it for userspace.
Given that it's currently only being used to detect presence of atomic instructions (`self setHasAtomicInstructions: (idISAR0 >> 20 bitAnd: 2r1111) = 2r10`), and there's a kernel API for retrieving that specific bit of information (<https://www.kernel.org/doc/html/latest/arm64/elf_hwcaps.html> suggests HWCAP_ATOMICS), perhaps instead of using the instruction directly Cog could call the relevant `getauxval` variant?
For now, I have the Stack VM running well on aarch64, so I can make progress, even if it is a little slower than it could be :-)
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev