mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Pasto. Lots of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33762 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -311,12 +311,10 @@ void ARMConstantIslands::InitialFunctionScan(MachineFunction &Fn,
|
|||||||
Scale = 4; // Taking the address of a CP entry.
|
Scale = 4; // Taking the address of a CP entry.
|
||||||
break;
|
break;
|
||||||
case ARMII::AddrMode2:
|
case ARMII::AddrMode2:
|
||||||
Bits = 12;
|
Bits = 12; // +-offset_12
|
||||||
Scale = 2; // +-offset_12
|
|
||||||
break;
|
break;
|
||||||
case ARMII::AddrMode3:
|
case ARMII::AddrMode3:
|
||||||
Bits = 8;
|
Bits = 8; // +-offset_8
|
||||||
Scale = 2; // +-offset_8
|
|
||||||
break;
|
break;
|
||||||
// addrmode4 has no immediate offset.
|
// addrmode4 has no immediate offset.
|
||||||
case ARMII::AddrMode5:
|
case ARMII::AddrMode5:
|
||||||
@@ -342,7 +340,7 @@ void ARMConstantIslands::InitialFunctionScan(MachineFunction &Fn,
|
|||||||
|
|
||||||
// Remember that this is a user of a CP entry.
|
// Remember that this is a user of a CP entry.
|
||||||
MachineInstr *CPEMI =CPEMIs[I->getOperand(op).getConstantPoolIndex()];
|
MachineInstr *CPEMI =CPEMIs[I->getOperand(op).getConstantPoolIndex()];
|
||||||
unsigned MaxOffs = (1 << (Bits-1)) * Scale;
|
unsigned MaxOffs = ((1 << Bits)-1) * Scale;
|
||||||
CPUsers.push_back(CPUser(I, CPEMI, MaxOffs));
|
CPUsers.push_back(CPUser(I, CPEMI, MaxOffs));
|
||||||
|
|
||||||
// Instructions can only use one CP entry, don't bother scanning the
|
// Instructions can only use one CP entry, don't bother scanning the
|
||||||
|
Reference in New Issue
Block a user