The new LDR* instruction patterns should handle the necessary encoding of
authorJim Grosbach <grosbach@apple.com>
Wed, 27 Oct 2010 17:52:51 +0000 (17:52 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 27 Oct 2010 17:52:51 +0000 (17:52 +0000)
operands in the TableGen'erated bits, so we don't need to do the additional
magic explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117461 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMCodeEmitter.cpp

index edb9c906b1f814c3ba0776df8ba869778e512070..0ff0d5142a0a1d7038ba73297cc325132cd58d15 100644 (file)
@@ -946,6 +946,13 @@ void ARMCodeEmitter::emitLoadStoreInstruction(const MachineInstr &MI,
   // Part of binary is determined by TableGn.
   unsigned Binary = getBinaryCodeForInstr(MI);
 
+  // If this is an LDRi12, LDRrs, or LDRcp, nothing more needs be done.
+  if (MI.getOpcode() == ARM::LDRi12 || MI.getOpcode() == ARM::LDRrs
+      || MI.getOpcode() == ARM::LDRcp) {
+    emitWordLE(Binary);
+    return;
+  }
+
   // Set the conditional execution predicate
   Binary |= II->getPredicate(&MI) << ARMII::CondShift;