mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
Large code model support for PowerPC.
Large code model is identical to medium code model except that the addis/addi sequence for "local" accesses is never used. All accesses use the addis/ld sequence. The coding changes are straightforward; most of the patch is taken up with creating variants of the medium model tests for large model. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175767 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -464,12 +464,15 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
// associated TOC entry. Otherwise reference the symbol directly.
|
||||
TmpInst.setOpcode(PPC::LDrs);
|
||||
const MachineOperand &MO = MI->getOperand(1);
|
||||
assert((MO.isGlobal() || MO.isJTI()) && "Invalid operand for LDtocL!");
|
||||
assert((MO.isGlobal() || MO.isJTI() || MO.isCPI()) &&
|
||||
"Invalid operand for LDtocL!");
|
||||
MCSymbol *MOSymbol = 0;
|
||||
|
||||
if (MO.isJTI())
|
||||
MOSymbol = lookUpOrCreateTOCEntry(GetJTISymbol(MO.getIndex()));
|
||||
else {
|
||||
else if (MO.isCPI())
|
||||
MOSymbol = GetCPISymbol(MO.getIndex());
|
||||
else if (MO.isGlobal()) {
|
||||
const GlobalValue *GValue = MO.getGlobal();
|
||||
const GlobalAlias *GAlias = dyn_cast<GlobalAlias>(GValue);
|
||||
const GlobalValue *RealGValue = GAlias ?
|
||||
|
||||
Reference in New Issue
Block a user