Follow up on new support for memory operands in ARM inline assembly.
authorBob Wilson <bob.wilson@apple.com>
Tue, 19 May 2009 18:33:02 +0000 (18:33 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 19 May 2009 18:33:02 +0000 (18:33 +0000)
This fixes pr4233.

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

lib/Target/ARM/ARMRegisterInfo.cpp

index 693d12ee1f3f306155006979245e9a66e2678b9a..964f50a2708953f371d901a880cb60730dd94036 100644 (file)
@@ -688,6 +688,10 @@ void ARMRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
   unsigned AddrMode = (Desc.TSFlags & ARMII::AddrModeMask);
   bool isSub = false;
 
+  // Memory operands in inline assembly always use AddrMode2.
+  if (Opcode == ARM::INLINEASM)
+    AddrMode = ARMII::AddrMode2;
+
   if (Opcode == ARM::ADDri) {
     Offset += MI.getOperand(i+1).getImm();
     if (Offset == 0) {