mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Fix fpscr <-> GPR latency info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d179886f05
commit
e09206d4d7
@ -1914,9 +1914,16 @@ ARMBaseInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
|
||||
|
||||
const TargetInstrDesc &UseTID = UseMI->getDesc();
|
||||
const MachineOperand &DefMO = DefMI->getOperand(DefIdx);
|
||||
if (DefMO.getReg() == ARM::CPSR && UseTID.isBranch())
|
||||
if (DefMO.getReg() == ARM::CPSR) {
|
||||
if (DefMI->getOpcode() == ARM::FMSTAT) {
|
||||
// fpscr -> cpsr stalls over 20 cycles on A8 (and earlier?)
|
||||
return Subtarget.isCortexA9() ? 1 : 20;
|
||||
}
|
||||
|
||||
// CPSR set and branch can be paired in the same cycle.
|
||||
return 0;
|
||||
if (UseTID.isBranch())
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned DefAlign = DefMI->hasOneMemOperand()
|
||||
? (*DefMI->memoperands_begin())->getAlignment() : 0;
|
||||
|
@ -237,7 +237,7 @@ def CortexA8Itineraries : ProcessorItineraries<
|
||||
//
|
||||
// FP Special Register to Integer Register File Move
|
||||
InstrItinData<IIC_fpSTAT , [InstrStage<1, [A8_Pipe0, A8_Pipe1]>,
|
||||
InstrStage<1, [A8_NLSPipe]>]>,
|
||||
InstrStage<1, [A8_NLSPipe]>], [20]>,
|
||||
//
|
||||
// Single-precision FP Unary
|
||||
InstrItinData<IIC_fpUNA32 , [InstrStage<1, [A8_Pipe0, A8_Pipe1]>,
|
||||
|
@ -431,7 +431,8 @@ def CortexA9Itineraries : ProcessorItineraries<
|
||||
InstrStage<1, [A9_MUX0], 0>,
|
||||
InstrStage<1, [A9_DRegsVFP], 0, Required>,
|
||||
InstrStage<2, [A9_DRegsN], 0, Reserved>,
|
||||
InstrStage<1, [A9_NPipe]>]>,
|
||||
InstrStage<1, [A9_NPipe]>],
|
||||
[1]>,
|
||||
//
|
||||
// Single-precision FP Unary
|
||||
InstrItinData<IIC_fpUNA32 , [InstrStage<1, [A9_Issue0, A9_Issue1], 0>,
|
||||
|
Loading…
Reference in New Issue
Block a user