Define preprocessor directives for zicsr and zifencei
hasheddan opened this issue · 3 comments
I believe when this document was first created, zicsr
and zifencei
instructions were still part of the integer base instruction set. Now that they are not, it would be helpful to define preprocessor directives which indicate whether they are being targeted or not. I would be happy to add them here if folks are aligned.
Those macro are maintained at riscv-c-api-doc, and it included Architecture Extension Test Macro, and both clang and gcc has followed that rule, which means __riscv_zicsr
and __riscv_zifencei
will defined if they are available/enabled.
However we just didn't list every extension on the table, but welcome to send PR, I am happy to review and approve :P
Thanks @kito-cheng! PR opened here; riscv-non-isa/riscv-c-api-doc#55
Closing this issue, since #55 got merged a few months ago.