forked from OSchip/llvm-project
Fix the opcode and the operands for the load instruction.
llvm-svn: 111885
This commit is contained in:
parent
99fa264a67
commit
c0c00ca33f
|
|
@ -415,10 +415,13 @@ bool ARMFastISel::ARMSelectLoad(const Instruction *I) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: There is more than one register class in the world...
|
// 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 ResultReg = createResultReg(FixedRC);
|
||||||
|
unsigned Opc = AFI->isThumb2Function() ? ARM::tLDR : ARM::LDR;
|
||||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||||
TII.get(ARM::LDR), ResultReg)
|
TII.get(Opc), ResultReg)
|
||||||
.addImm(0).addReg(Reg).addImm(Offset));
|
.addReg(Reg).addReg(0).addImm(0));
|
||||||
UpdateValueMap(I, ResultReg);
|
UpdateValueMap(I, ResultReg);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue