[llvm] [RISCV]Enable framework to resolve encoding conflicts among vendor-specific CSRs (PR #97287)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 09:08:51 PDT 2024


================
@@ -1860,11 +1860,18 @@ ParseStatus RISCVAsmParser::parseCSRSystemRegister(OperandVector &Operands) {
     if (CE) {
       int64_t Imm = CE->getValue();
       if (isUInt<12>(Imm)) {
-        auto SysReg = RISCVSysReg::lookupSysRegByEncoding(Imm);
-        // Accept an immediate representing a named or un-named Sys Reg
-        // if the range is valid, regardless of the required features.
-        Operands.push_back(
-            RISCVOperand::createSysReg(SysReg ? SysReg->Name : "", S, Imm));
+        auto Range = RISCVSysReg::lookupSysRegByEncoding(Imm);
+        // Accept an immediate representing a named Sys Reg if it satisfies the
+        // the requried features.
----------------
topperc wrote:

required*

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


More information about the llvm-commits mailing list