mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
First part of refactoring ARM addrmode2 (load/store) instructions to be more
explicit about the operands. Split out the different variants into separate instructions. This gives us the ability to, among other things, assign different scheduling itineraries to the variants. rdar://8477752. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -449,7 +449,7 @@ unsigned ARMFastISel::ARMMaterializeInt(const Constant *C, EVT VT) {
|
||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||
TII.get(ARM::LDRcp), DestReg)
|
||||
.addConstantPoolIndex(Idx)
|
||||
.addReg(0).addImm(0));
|
||||
.addImm(0));
|
||||
|
||||
return DestReg;
|
||||
}
|
||||
@ -750,7 +750,7 @@ bool ARMFastISel::ARMEmitLoad(EVT VT, unsigned &ResultReg,
|
||||
RC = ARM::GPRRegisterClass;
|
||||
break;
|
||||
case MVT::i32:
|
||||
Opc = isThumb ? ARM::t2LDRi12 : ARM::LDR;
|
||||
Opc = isThumb ? ARM::t2LDRi12 : ARM::LDRi12;
|
||||
RC = ARM::GPRRegisterClass;
|
||||
break;
|
||||
case MVT::f32:
|
||||
@ -776,14 +776,9 @@ bool ARMFastISel::ARMEmitLoad(EVT VT, unsigned &ResultReg,
|
||||
|
||||
// The thumb and floating point instructions both take 2 operands, ARM takes
|
||||
// another register.
|
||||
if (isFloat || isThumb)
|
||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||
TII.get(Opc), ResultReg)
|
||||
.addReg(Base).addImm(Offset));
|
||||
else
|
||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||
TII.get(Opc), ResultReg)
|
||||
.addReg(Base).addReg(0).addImm(Offset));
|
||||
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
|
||||
TII.get(Opc), ResultReg)
|
||||
.addReg(Base).addImm(Offset));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user