[llvm-commits] [llvm] r163005 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Chad Rosier mcrosier at apple.com
Fri Aug 31 10:24:10 PDT 2012


Author: mcrosier
Date: Fri Aug 31 12:24:10 2012
New Revision: 163005

URL: http://llvm.org/viewvc/llvm-project?rev=163005&view=rev
Log:
Add a comment to explain what's really going on.

Modified:
    llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=163005&r1=163004&r2=163005&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Fri Aug 31 12:24:10 2012
@@ -5347,6 +5347,12 @@
   case ARM::tMUL: {
     // The second source operand must be the same register as the destination
     // operand.
+    //
+    // In this case, we must directly check the parsed operands because the
+    // cvtThumbMultiply() function is written in such a way that it guarantees
+    // this first statement is always true for the new Inst.  Essentially, the
+    // destination is unconditionally copied into the second source operand
+    // without checking to see if it matches what we actually parsed.
     if (Operands.size() == 6 &&
         (((ARMOperand*)Operands[3])->getReg() !=
          ((ARMOperand*)Operands[5])->getReg()) &&





More information about the llvm-commits mailing list