Do not set the `link' bit when branching to the first BB of a function, as it
will cause an infinite loop.  The link bit is only used for calling functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14466 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PowerPC/PowerPCAsmPrinter.cpp b/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
index c5825a7..636b1c4 100644
--- a/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
@@ -423,7 +423,7 @@
   }
   case MachineOperand::MO_PCRelativeDisp:
     std::cerr << "Shouldn't use addPCDisp() when building PPC MachineInstrs";
-    abort ();
+    abort();
     return;
   case MachineOperand::MO_GlobalAddress:
     if (!elideOffsetKeyword) {
@@ -507,7 +507,7 @@
 
   if (Opcode == PPC32::MovePCtoLR) {
     O << "mflr r0\n";
-    O << "\tbcl 20,31,L" << CurrentFnName << "$pb\n";
+    O << "\tbc 20,31,L" << CurrentFnName << "$pb\n";
     O << "L" << CurrentFnName << "$pb:\n";
     return;
   }