|
|
|
|
|
by solarexplorer
1591 days ago
|
|
I wonder if RISC-V has a standard way to handle these custom instructions. Is there an easy way to trap these custom instructions and emulate them in software, or is there something like CPUID, or do you just don't distribute the binaries with the custom instructions? |
|
Conceivably, you could trap, look up something like the mvendor/march CSRs to triangulate CPUID, and Do the Right Thing, but you usually added a custom opcode because you believe your performance/use-case depends on it.
Basically, your Option #3: "don't distribute binaries with custom instructions." If it's so important, it should get pushed through the standards process and then the binaries can be portable.