News for hackers. Stuff that matters.
Re:Welcome Debian riscv64 by viraptor on Monday July 24, 2023 @03:11AM (#36844071)
But specific instructions should be testable anyway, right? Try to execute with an exception handler and you'll know.
Re:Welcome Debian riscv64 by pm215 on Monday July 24, 2023 @05:51AM (#36845246)
On Arm this is generally a bad idea -- there are, or were, some corner cases where the kernel can know that an extension shouldn't be used, but it doesn't have a mechanism for "make the instructions UNDEF". The example I know about is ancient history now -- on the Cortex-A8 I think you could build a kernel without Neon support or perhaps the kernel might find there was a Neon-related erratum, but there was no way to disable Neon to force the UNDEFs.

The recommended approach is to use HWCAPs, or else to use the kernel's "emulated ID register accesses" functionality.