[llvm] [PowerPC] Add error for incorrect use of memory operands (PR #114277)

Hubert Tong via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 20:23:56 PST 2024


================
@@ -1259,13 +1259,17 @@ void PPCAsmParser::processInstruction(MCInst &Inst,
 static std::string PPCMnemonicSpellCheck(StringRef S, const FeatureBitset &FBS,
                                          unsigned VariantID = 0);
 
-static bool hasMemOp(const OperandVector &Operands) {
-  for (const auto &Operand : Operands) {
-    const PPCOperand &Op = static_cast<const PPCOperand &>(*Operand);
-    if (Op.isMemOpBase())
-      return true;
+// Check that the register+immediate memory operand is in the right position and
+// is expected by the instruction
----------------
hubert-reinterpretcast wrote:

Explain what `true` and `false` mean as a return value in the comment here.

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


More information about the llvm-commits mailing list