[llvm] [Xtensa] Implement Windowed Register Option. (PR #121118)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 25 19:33:29 PST 2024


================
@@ -198,6 +200,11 @@ struct XtensaOperand : public MCParsedAsmOperand {
 
   bool isImm32n_95() const { return isImm(-32, 95); }
 
+  bool isImm64n_4n() const {
+    return isImm(-64, -4) &&
+           ((dyn_cast<MCConstantExpr>(getImm())->getValue() & 0x3) == 0);
----------------
arsenm wrote:

Unchecked dyn_cast. Should  be cast? But I don't understand the usage. How can "getImm" return an MCConstantExpr?

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


More information about the llvm-commits mailing list