[PowerPC] Support bd(n)zl and bd(n)zlrl
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 24 Jun 2013 11:02:38 +0000 (11:02 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 24 Jun 2013 11:02:38 +0000 (11:02 +0000)
This adds support for the bd(n)zl and bd(n)zlrl instructions.
The patterns are currently used for the asm parser only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184720 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCInstrInfo.td
test/MC/PowerPC/ppc64-encoding-ext.s

index 8f896ad7a2ed3853afd2884e0aeff86572cc139f..700875a083079f318b69629abbb304c7655f7319 100644 (file)
@@ -938,6 +938,18 @@ let isCall = 1, PPC970_Unit = 7, Defs = [LR] in {
     def BCLRL : XLForm_2_br<19, 16, 1, (outs), (ins pred:$cond),
                             "b${cond:cc}lrl ${cond:reg}", BrB, []>;
   }
+  let Defs = [CTR], Uses = [CTR, RM] in {
+    def BDZL  : BForm_1<16, 18, 0, 1, (outs), (ins condbrtarget:$dst),
+                        "bdzl $dst">;
+    def BDNZL : BForm_1<16, 16, 0, 1, (outs), (ins condbrtarget:$dst),
+                        "bdnzl $dst">;
+  }
+  let Defs = [CTR], Uses = [CTR, LR, RM] in {
+    def BDZLRL  : XLForm_2_ext<19, 16, 18, 0, 1, (outs), (ins),
+                               "bdzlrl", BrB, []>;
+    def BDNZLRL : XLForm_2_ext<19, 16, 16, 0, 1, (outs), (ins),
+                               "bdnzlrl", BrB, []>;
+  }
 }
 
 let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1, Uses = [RM] in
index 31525c777193cce956efe384cca42c68ef634adb..9ca8199de9d6443b2d942a4e8d3bb2bfe07f1877 100644 (file)
 # FIXME: bdnza target
 # CHECK: bdnzlr                          # encoding: [0x4e,0x00,0x00,0x20]
          bdnzlr
-# FIXME: bdnzl target
+# CHECK: bdnzl target                    # encoding: [0x42,0x00,A,0bAAAAAA01]
+# CHECK-NEXT:                            #   fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
+         bdnzl target
 # FIXME: bdnzla target
-# FIXME: bdnzlrl
+# CHECK: bdnzlrl                         # encoding: [0x4e,0x00,0x00,0x21]
+         bdnzlrl
 
 # FIXME: bdnzt 2, target
 # FIXME: bdnzt target
 # FIXME: bdza target
 # CHECK: bdzlr                           # encoding: [0x4e,0x40,0x00,0x20]
          bdzlr
-# FIXME: bdzl target
+# CHECK: bdzl target                     # encoding: [0x42,0x40,A,0bAAAAAA01]
+# CHECK-NEXT:                            #   fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
+         bdzl target
 # FIXME: bdzla target
-# FIXME: bdzlrl
+# CHECK: bdzlrl                          # encoding: [0x4e,0x40,0x00,0x21]
+         bdzlrl
 
 # FIXME: bdzt 2, target
 # FIXME: bdzt target