topperc 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,
Wouldn't the assembler error check the constant? Diagnostic is probably a bit uglier, but its not nothing. > 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.). You mean if they write a generic write_csr or read_csr function? If they use a `write_frm` or `read_fcsr` function then there is no constant propagation issue and they get to refer to the CSR by name in the assembly string instead of maintaining a constant in their code. 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