[PATCH] D116645: [RISCV][llvm] Update CSRs

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 01:24:37 PST 2022


asb added a comment.

Thanks for the update - just two more minor issues I noticed, then I think this is good to go.



================
Comment at: llvm/lib/Target/RISCV/RISCVSystemOperands.td:256
+let isRV32Only = 1 in
+def : SysReg<"htimedeltah", 0x615>;
+
----------------
The isRV32Only property isn't tested in a *-csr-names-invalid.s file.


================
Comment at: llvm/test/MC/RISCV/user-csr-names-invalid.s:39
 csrrs t1, hpmcounter31h, zero # CHECK-NEED-RV32: :[[@LINE]]:11: error: system register use requires an option to be enabled
+
+csrrs t1, henvcfgh, zero # CHECK-NEED-RV32: :[[@LINE]]:11: error: system register use requires an option to be enabled
----------------
As this file is called user-csr-names-invalid.s, the tests below should arguably move into separate files.

Though I'm not sure there's a huge amount of value in spreading it out across multiple files, so perhaps it would make sense to rename this file to `rv32-only-csr-names.s` or similar and adjust the comment at the top about this only covering user mode CSR names.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116645



More information about the llvm-commits mailing list