4 ms·
> There are a lot of OSes. Maybe, but right now there are only a couple OSes that run on RISC-V, where you would care to detect these things at runtime. As of
by microcolonel 6y ago
> There are a lot of OSes.
Maybe, but right now there are only a couple OSes that run on RISC-V, where you would care to detect these things at runtime. As of now, I think FreeBSD has an AT_HWCAP, which exposes RISC-V standard extension information. (though yes, it will be some platform code, one #ifdef and a couple lines to call either getauxval or elf_aux_info).
> ...or even memcpy()
P.S. memcpy goes in libc, the same place that implements these functions, so I think probably choosing the right memcpy is not an issue.