[llvm] r184720 - [PowerPC] Support bd(n)zl and bd(n)zlrl
Ulrich Weigand
ulrich.weigand at de.ibm.com
Mon Jun 24 04:02:38 PDT 2013
Author: uweigand
Date: Mon Jun 24 06:02:38 2013
New Revision: 184720
URL: http://llvm.org/viewvc/llvm-project?rev=184720&view=rev
Log:
[PowerPC] Support bd(n)zl and bd(n)zlrl
This adds support for the bd(n)zl and bd(n)zlrl instructions.
The patterns are currently used for the asm parser only.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?rev=184720&r1=184719&r2=184720&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Mon Jun 24 06:02:38 2013
@@ -938,6 +938,18 @@ let isCall = 1, PPC970_Unit = 7, Defs =
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
Modified: llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s?rev=184720&r1=184719&r2=184720&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s Mon Jun 24 06:02:38 2013
@@ -54,9 +54,12 @@
# 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
@@ -89,9 +92,12 @@
# 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
More information about the llvm-commits
mailing list