[clang] [llvm] [RISC-V] Add CSR read/write builtins (PR #85091)

Nemanja Ivanovic via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 15 07:09:15 PDT 2024


nemanjai wrote:

> > Should we use strings like ARM does so we can get register by name?
> 
> Good point! We may provide two kinds of builtins: one by name, and another by CSR number. We should continue @lenary's proposal and discuss it in https://github.com/riscv-non-isa/riscv-toolchain-conventions or https://github.com/riscv-non-isa/riscv-c-api-doc.

My personal preference would be to not use strings, but I think a close analog could be pre-defined macro names for existing named CSR's. I just find string matching to be tedious.

https://github.com/llvm/llvm-project/pull/85091


More information about the cfe-commits mailing list