[clang] [llvm] [RISC-V][MC] Introduce initial support for RVY (CHERI) (PR #199771)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Tue May 26 18:22:25 PDT 2026
================
@@ -809,6 +819,17 @@ struct RISCVOperand final : public MCParsedAsmOperand {
return IsConstantImm && isInt<N>(fixImmediateForRV32(Imm, isRV64Expr()));
}
+ bool isYBNDSWImm() const {
+ if (!isExpr())
+ return false;
+
+ int64_t Imm;
+ bool IsConstantImm = evaluateConstantExpr(getExpr(), Imm);
+ if (!IsConstantImm)
+ return false;
+ return RISCV::isValidYBNDSWImm(Imm);
----------------
topperc wrote:
```suggestion
return IsConstantImm && RISCV::isValidYBNDSWImm(Imm);
```
https://github.com/llvm/llvm-project/pull/199771
More information about the cfe-commits
mailing list