diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-11-01 22:04:35 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-11-01 22:04:35 +0000 |
commit | e3ce8aab0a6de939f8cfa4f8cb2e3a3bf4e1fe21 (patch) | |
tree | 78f31984510abd2c6d8b7eed597b8aae26c26ec8 /lib/Target/ARM/Thumb1InstrInfo.cpp | |
parent | 48d8afab73d72418cf9505a020f621014920463c (diff) | |
download | external_llvm-e3ce8aab0a6de939f8cfa4f8cb2e3a3bf4e1fe21.zip external_llvm-e3ce8aab0a6de939f8cfa4f8cb2e3a3bf4e1fe21.tar.gz external_llvm-e3ce8aab0a6de939f8cfa4f8cb2e3a3bf4e1fe21.tar.bz2 |
Fix a couple more places where we are creating ld / st instructions without memoperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Thumb1InstrInfo.cpp')
-rw-r--r-- | lib/Target/ARM/Thumb1InstrInfo.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/Target/ARM/Thumb1InstrInfo.cpp b/lib/Target/ARM/Thumb1InstrInfo.cpp index 51119da..6943036 100644 --- a/lib/Target/ARM/Thumb1InstrInfo.cpp +++ b/lib/Target/ARM/Thumb1InstrInfo.cpp @@ -17,6 +17,8 @@ #include "ARMMachineFunctionInfo.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/CodeGen/MachineMemOperand.h" +#include "llvm/CodeGen/PseudoSourceValue.h" #include "llvm/ADT/SmallVector.h" #include "Thumb1InstrInfo.h" @@ -122,9 +124,16 @@ storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, isARMLowRegister(SrcReg))) && "Unknown regclass!"); if (RC == ARM::tGPRRegisterClass) { + MachineFunction &MF = *MBB.getParent(); + MachineFrameInfo &MFI = *MF.getFrameInfo(); + MachineMemOperand *MMO = + MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FI), + MachineMemOperand::MOStore, 0, + MFI.getObjectSize(FI), + MFI.getObjectAlignment(FI)); AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::tSpill)) .addReg(SrcReg, getKillRegState(isKill)) - .addFrameIndex(FI).addImm(0)); + .addFrameIndex(FI).addImm(0).addMemOperand(MMO)); } } @@ -140,8 +149,15 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, isARMLowRegister(DestReg))) && "Unknown regclass!"); if (RC == ARM::tGPRRegisterClass) { + MachineFunction &MF = *MBB.getParent(); + MachineFrameInfo &MFI = *MF.getFrameInfo(); + MachineMemOperand *MMO = + MF.getMachineMemOperand(PseudoSourceValue::getFixedStack(FI), + MachineMemOperand::MOLoad, 0, + MFI.getObjectSize(FI), + MFI.getObjectAlignment(FI)); AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::tRestore), DestReg) - .addFrameIndex(FI).addImm(0)); + .addFrameIndex(FI).addImm(0).addMemOperand(MMO)); } } |