mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 17:32:49 +00:00
Don't need the extra register here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d9a7316f9a
commit
1dfb4d31e0
@ -370,23 +370,21 @@ bool ARMFastISel::ARMSelectLoad(const Instruction *I) {
|
|||||||
// Since the offset may be too large for the load instruction
|
// Since the offset may be too large for the load instruction
|
||||||
// get the reg+offset into a register.
|
// get the reg+offset into a register.
|
||||||
// TODO: Optimize this somewhat.
|
// TODO: Optimize this somewhat.
|
||||||
// FIXME: There is more than one register class in the world...
|
|
||||||
unsigned ScratchReg
|
|
||||||
= FuncInfo.MF->getRegInfo().createVirtualRegister(ARM::GPRRegisterClass);
|
|
||||||
ARMCC::CondCodes Pred = ARMCC::AL;
|
ARMCC::CondCodes Pred = ARMCC::AL;
|
||||||
unsigned PredReg = 0;
|
unsigned PredReg = 0;
|
||||||
|
|
||||||
if (!AFI->isThumbFunction())
|
if (!AFI->isThumbFunction())
|
||||||
emitARMRegPlusImmediate(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
emitARMRegPlusImmediate(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||||
ScratchReg, Reg, Offset, Pred, PredReg,
|
Reg, Reg, Offset, Pred, PredReg,
|
||||||
static_cast<const ARMBaseInstrInfo&>(TII));
|
static_cast<const ARMBaseInstrInfo&>(TII));
|
||||||
else {
|
else {
|
||||||
assert(AFI->isThumb2Function());
|
assert(AFI->isThumb2Function());
|
||||||
emitT2RegPlusImmediate(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
emitT2RegPlusImmediate(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||||
ScratchReg, Reg, Offset, Pred, PredReg,
|
Reg, Reg, Offset, Pred, PredReg,
|
||||||
static_cast<const ARMBaseInstrInfo&>(TII));
|
static_cast<const ARMBaseInstrInfo&>(TII));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: There is more than one register class in the world...
|
||||||
unsigned ResultReg = createResultReg(ARM::GPRRegisterClass);
|
unsigned ResultReg = createResultReg(ARM::GPRRegisterClass);
|
||||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||||
TII.get(ARM::LDR), ResultReg)
|
TII.get(ARM::LDR), ResultReg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user