[llvm] [X86][AsmParser] Improve rel8 validation (PR #126073)

Evgenii Kudriashov via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 11:32:34 PST 2025


================
@@ -416,8 +416,16 @@ struct X86Operand final : public MCParsedAsmOperand {
       return isImm();
   }
 
-  bool isAbsMem16() const {
-    return isAbsMem() && Mem.ModeSize == 16;
+  bool isAbsMemMode16() const { return isAbsMem() && Mem.ModeSize == 16; }
+
+  bool isDispImm8() const {
+    if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getMemDisp()))
----------------
e-kud wrote:

Thanks! Done.

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


More information about the llvm-commits mailing list