[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Nick Lewycky
nicholas at mxc.ca
Fri Mar 2 21:30:08 PST 2007
Changes in directory llvm/lib/Target/PowerPC:
PPCAsmPrinter.cpp updated: 1.234 -> 1.235
---
Log message:
Emit low/high immediate loads properly for Linux/PPC.
---
Diffs of the changes: (+10 -6)
PPCAsmPrinter.cpp | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.234 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.235
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.234 Wed Feb 21 16:47:38 2007
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Fri Mar 2 23:29:51 2007
@@ -215,24 +215,28 @@
if (MI->getOperand(OpNo).isImmediate()) {
printS16ImmOperand(MI, OpNo);
} else {
- O << "ha16(";
+ if (Subtarget.isDarwin()) O << "ha16(";
printOp(MI->getOperand(OpNo));
if (TM.getRelocationModel() == Reloc::PIC_)
- O << "-\"L" << getFunctionNumber() << "$pb\")";
- else
+ O << "-\"L" << getFunctionNumber() << "$pb\"";
+ if (Subtarget.isDarwin())
O << ')';
+ else
+ O << "@ha";
}
}
void printSymbolLo(const MachineInstr *MI, unsigned OpNo) {
if (MI->getOperand(OpNo).isImmediate()) {
printS16ImmOperand(MI, OpNo);
} else {
- O << "lo16(";
+ if (Subtarget.isDarwin()) O << "lo16(";
printOp(MI->getOperand(OpNo));
if (TM.getRelocationModel() == Reloc::PIC_)
- O << "-\"L" << getFunctionNumber() << "$pb\")";
- else
+ O << "-\"L" << getFunctionNumber() << "$pb\"";
+ if (Subtarget.isDarwin())
O << ')';
+ else
+ O << "@l";
}
}
void printcrbitm(const MachineInstr *MI, unsigned OpNo) {
More information about the llvm-commits
mailing list