diff options
author | Eric Christopher <echristo@apple.com> | 2010-08-24 22:03:02 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-08-24 22:03:02 +0000 |
commit | 6c99ebf5b06d00671b5cc14e796643b92705abb7 (patch) | |
tree | 76f15cfb8e822ce5da7df92283aad5a6b455917a /llvm/lib/Target/ARM/ARMFastISel.cpp | |
parent | a10000006efceb945ae37f420a039680cb6db845 (diff) | |
download | bcm5719-llvm-6c99ebf5b06d00671b5cc14e796643b92705abb7.tar.gz bcm5719-llvm-6c99ebf5b06d00671b5cc14e796643b92705abb7.zip |
Fix thumb2 mode loads to have the correct operand ordering. Add a todo
to fix this in the port.
llvm-svn: 111973
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMFastISel.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp index 55fb7c26d5a..81ecdb50edf 100644 --- a/llvm/lib/Target/ARM/ARMFastISel.cpp +++ b/llvm/lib/Target/ARM/ARMFastISel.cpp @@ -419,10 +419,15 @@ bool ARMFastISel::ARMSelectLoad(const Instruction *I) { // TODO: Verify the additions above work, otherwise we'll need to add the // offset instead of 0 and do all sorts of operand munging. unsigned ResultReg = createResultReg(FixedRC); - unsigned Opc = AFI->isThumb2Function() ? ARM::tLDR : ARM::LDR; - AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, - TII.get(Opc), ResultReg) - .addReg(Reg).addReg(0).addImm(0)); + // TODO: Fix the Addressing modes so that these can share some code. + if (AFI->isThumb2Function()) + AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, + TII.get(ARM::tLDR), ResultReg) + .addReg(Reg).addImm(0).addReg(0)); + else + AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, + TII.get(ARM::LDR), ResultReg) + .addReg(Reg).addReg(0).addImm(0)); UpdateValueMap(I, ResultReg); return true; |