mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
Emit low/high immediate loads properly for Linux/PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34871 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c739cd6d07
commit
f54949dc49
@ -215,24 +215,28 @@ namespace {
|
|||||||
if (MI->getOperand(OpNo).isImmediate()) {
|
if (MI->getOperand(OpNo).isImmediate()) {
|
||||||
printS16ImmOperand(MI, OpNo);
|
printS16ImmOperand(MI, OpNo);
|
||||||
} else {
|
} else {
|
||||||
O << "ha16(";
|
if (Subtarget.isDarwin()) O << "ha16(";
|
||||||
printOp(MI->getOperand(OpNo));
|
printOp(MI->getOperand(OpNo));
|
||||||
if (TM.getRelocationModel() == Reloc::PIC_)
|
if (TM.getRelocationModel() == Reloc::PIC_)
|
||||||
O << "-\"L" << getFunctionNumber() << "$pb\")";
|
O << "-\"L" << getFunctionNumber() << "$pb\"";
|
||||||
else
|
if (Subtarget.isDarwin())
|
||||||
O << ')';
|
O << ')';
|
||||||
|
else
|
||||||
|
O << "@ha";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void printSymbolLo(const MachineInstr *MI, unsigned OpNo) {
|
void printSymbolLo(const MachineInstr *MI, unsigned OpNo) {
|
||||||
if (MI->getOperand(OpNo).isImmediate()) {
|
if (MI->getOperand(OpNo).isImmediate()) {
|
||||||
printS16ImmOperand(MI, OpNo);
|
printS16ImmOperand(MI, OpNo);
|
||||||
} else {
|
} else {
|
||||||
O << "lo16(";
|
if (Subtarget.isDarwin()) O << "lo16(";
|
||||||
printOp(MI->getOperand(OpNo));
|
printOp(MI->getOperand(OpNo));
|
||||||
if (TM.getRelocationModel() == Reloc::PIC_)
|
if (TM.getRelocationModel() == Reloc::PIC_)
|
||||||
O << "-\"L" << getFunctionNumber() << "$pb\")";
|
O << "-\"L" << getFunctionNumber() << "$pb\"";
|
||||||
else
|
if (Subtarget.isDarwin())
|
||||||
O << ')';
|
O << ')';
|
||||||
|
else
|
||||||
|
O << "@l";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void printcrbitm(const MachineInstr *MI, unsigned OpNo) {
|
void printcrbitm(const MachineInstr *MI, unsigned OpNo) {
|
||||||
|
Loading…
Reference in New Issue
Block a user