riscv-non-isa / riscv-c-api-doc

Documentation of the RISC-V C API
https://lf-riscv.atlassian.net/browse/RVG-4
Creative Commons Attribution 4.0 International
75 stars 41 forks source link

Why were the __riscv_m, ... macros deprecated, will there be an alternative? #71

Closed camel-cdr closed 8 months ago

camel-cdr commented 8 months ago

I'd like to select between different instructions depending on the extensions enabled by the compiler. This would've worked using the __riscv_m, ... macros, but they were deprecated. Are there plans to allow compiletime extension discovery, or is this already a thing and I just missed something?

topperc commented 8 months ago

They weren't deprecated. They were removed from the table because the table wasn't updated as each new extension was ratified. There is now a generic section https://github.com/riscv-non-isa/riscv-c-api-doc/blob/master/riscv-c-api.md#architecture-extension-test-macros

camel-cdr commented 8 months ago

Ah, thanks a lot.