[llvm] [RISCV]Add support for resolving encoding conflicts among vendor specific CSRs (PR #96174)

Ana Pazos via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 09:36:10 PDT 2024


apazos wrote:

It is fine to add the variables to GenericTable and SearchIndex to control the API being generated. 

When upstreaming the framework the values of those variables will be set to false by default, since upstream RISC-V does not have vendor CSRs that can conflict. 

Downstream users who have custom/vendor CSRs will set them to true but will require additional changes to call the proper API in RISCVAsmParser::parseCSRSystemRegister and RISCVInstPrinter::printCSRSystemRegister. 

Maybe we can consider a separate patch that sets the variables to true for RISC-V and modifies parser/printer to use the new API. This way downstream users of RISC-V backend do not have the burden to maintain those changes. I think most downstream users have vendor/custom CSRs that have encoding conflict. Would that be acceptable?

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


More information about the llvm-commits mailing list