diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index 83fe41ad63ee..288019687284 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -396,6 +396,11 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) { } O << Name; + if (MO.getOffset() > 0) + O << "+" << MO.getOffset(); + else if (MO.getOffset() < 0) + O << MO.getOffset(); + if (GV->hasExternalWeakLinkage()) ExtWeakSymbols.insert(GV); return; diff --git a/llvm/lib/Target/PowerPC/PPCCallingConv.td b/llvm/lib/Target/PowerPC/PPCCallingConv.td index 9e31b5a6690c..d33b5574d1d4 100644 --- a/llvm/lib/Target/PowerPC/PPCCallingConv.td +++ b/llvm/lib/Target/PowerPC/PPCCallingConv.td @@ -35,7 +35,7 @@ def RetCC_PPC : CallingConv<[ //===----------------------------------------------------------------------===// // PowerPC Argument Calling Conventions //===----------------------------------------------------------------------===// -/* + def CC_PPC : CallingConv<[ // The first 8 integer arguments are passed in integer registers. CCIfType<[i32], CCAssignToReg<[R3, R4, R5, R6, R7, R8, R9, R10]>>, @@ -61,5 +61,3 @@ def CC_PPC : CallingConv<[ CCAssignToStack<16, 16>>*/ ]>; -*/ -