add relocation support for ppc64 branches.
authorChris Lattner <sabre@nondot.org>
Wed, 6 Dec 2006 19:40:04 +0000 (19:40 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 6 Dec 2006 19:40:04 +0000 (19:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32284 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCCodeEmitter.cpp

index cc874af039add5640a9cb7a2f7ef2604a55454e1..5e5f2cda6a400dcc90f482b9baf6f9a670dc9cdb 100644 (file)
@@ -127,11 +127,11 @@ int PPCCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) {
   } else if (MO.isGlobalAddress() || MO.isExternalSymbol() ||
              MO.isConstantPoolIndex() || MO.isJumpTableIndex()) {
     unsigned Reloc = 0;
-    if (MI.getOpcode() == PPC::BL)
+    if (MI.getOpcode() == PPC::BL || MI.getOpcode() == PPC::BL8)
       Reloc = PPC::reloc_pcrel_bx;
     else {
       switch (MI.getOpcode()) {
-      default: DEBUG(MI.dump()); assert(0 && "Unknown instruction for relocation!");
+      default: MI.dump(); assert(0 && "Unknown instruction for relocation!");
       case PPC::LIS:
       case PPC::LIS8:
       case PPC::ADDIS: