summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-08-24 01:10:04 +0000
committerEric Christopher <echristo@apple.com>2010-08-24 01:10:04 +0000
commitc0c00ca33fadb4a51a4b1ebf15511e73f3c9f064 (patch)
tree43e811b0eab1b87378aaf94f2276f1b4b2c3eaf6 /llvm/lib/Target
parent99fa264a67500d66ff2fe8eb57c4703a0e88835c (diff)
downloadbcm5719-llvm-c0c00ca33fadb4a51a4b1ebf15511e73f3c9f064.tar.gz
bcm5719-llvm-c0c00ca33fadb4a51a4b1ebf15511e73f3c9f064.zip
Fix the opcode and the operands for the load instruction.
llvm-svn: 111885
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index 2247b8549e0..a1b9eb480ce 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -415,10 +415,13 @@ bool ARMFastISel::ARMSelectLoad(const Instruction *I) {
}
// FIXME: There is more than one register class in the world...
+ // 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(ARM::LDR), ResultReg)
- .addImm(0).addReg(Reg).addImm(Offset));
+ TII.get(Opc), ResultReg)
+ .addReg(Reg).addReg(0).addImm(0));
UpdateValueMap(I, ResultReg);
return true;
OpenPOWER on IntegriCloud