nemanjai wrote: Individual implementations will provide different sets of CSR's and need a way to read/write them. Of course, this can be done with inline asm, but doing such things with inline asm has its limitations (no error checking, if a user attempts to wrap the asm in a function, they won't be able to build code that calls those functions with -O0 as inlining/constant propagation is required, etc.).
Providing builtins to do this allows the compiler to do range checking and ensure CSR # is a literal. https://github.com/llvm/llvm-project/pull/85091 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits