[PATCH] D125875: [RISCV] Add vread_csr and vwrite_csr to riscv_vector.h

Wang Pengcheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 18 21:22:08 PDT 2022


pcwang-thead added inline comments.


================
Comment at: clang/include/clang/Basic/riscv_vector.td:1512
+__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
+unsigned long vread_csr(enum RVV_CSR csr) {
+  unsigned long rv = 0;
----------------
craig.topper wrote:
> pcwang-thead wrote:
> > craig.topper wrote:
> > > X86 and arm_neon.h uses double underscore prefixes on all variables in intrinsic headers to reduce the chance of a collision with a user having a macro with the same name.
> > The function prototypes have already been defined in RVV intrinsics doc (https://github.com/riscv-non-isa/rvv-intrinsic-doc/blob/master/rvv-intrinsic-api.md#readwrite-urw-vector-csrs).
> I'm only refering to `csr`, `rv` and `value`. Those don't need to match the intrinsics doc. They aren't visible to code using the header.
Oh I get it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125875/new/

https://reviews.llvm.org/D125875



More information about the cfe-commits mailing list