From 86c212e8945410c34455619a58b15a9e02ec8e0d Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Tue, 19 May 2009 18:33:02 +0000 Subject: [PATCH] Follow up on new support for memory operands in ARM inline assembly. 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp index 693d12ee1f3..964f50a2708 100644 --- a/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/lib/Target/ARM/ARMRegisterInfo.cpp @@ -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) {