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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 13 10:00:11 PDT 2024


================
@@ -20,6 +20,12 @@ class RISCVBuiltin<string prototype, string features = ""> : TargetBuiltin {
 
 let Attributes = [NoThrow, Const] in {
 //===----------------------------------------------------------------------===//
+// Zicsr extension.
+//===----------------------------------------------------------------------===//
+def csrr : RISCVBuiltin<"unsigned long int(unsigned long int)", "zicsr">;
----------------
efriedma-quic wrote:

If you want "size_t" or "uintptr_t", please use that, not "unsigned long".

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


More information about the cfe-commits mailing list