summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-06-24 11:02:19 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-06-24 11:02:19 +0000
commitd20e91edad13091ad69544780ab863d45cfaca48 (patch)
tree1ef54a0c53fb267535a3cd60b92c945e3d319942 /llvm/lib/Target/PowerPC
parent1847bb811e826fab3976cb960f812a2722c05989 (diff)
downloadbcm5719-llvm-d20e91edad13091ad69544780ab863d45cfaca48.tar.gz
bcm5719-llvm-d20e91edad13091ad69544780ab863d45cfaca48.zip
[PowerPC] Support b(cond)l in the asm parser
This patch adds support for the conditional variants of bl. The pattern is currently used by the asm parser only. llvm-svn: 184719
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCInstrInfo.td9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
index 534327056b0..8f896ad7a2e 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -916,6 +916,10 @@ let isCall = 1, PPC970_Unit = 7, Defs = [LR] in {
"bl $func", BrB, []>; // See Pat patterns below.
def BLA : IForm<18, 1, 1, (outs), (ins aaddr:$func),
"bla $func", BrB, [(PPCcall (i32 imm:$func))]>;
+
+ let isCodeGenOnly = 1 in
+ def BCCL : BForm<16, 0, 1, (outs), (ins pred:$cond, condbrtarget:$dst),
+ "b${cond:cc}l ${cond:reg}, $dst">;
}
let Uses = [CTR, RM] in {
def BCTRL : XLForm_2_ext<19, 528, 20, 0, 1, (outs), (ins),
@@ -2191,6 +2195,11 @@ multiclass BranchExtendedMnemonic<string name, int bibo> {
def : InstAlias<"b"#name#"ctr",
(BCCTR bibo, CR0)>;
+ def : InstAlias<"b"#name#"l $cc, $dst",
+ (BCCL bibo, crrc:$cc, condbrtarget:$dst)>;
+ def : InstAlias<"b"#name#"l $dst",
+ (BCCL bibo, CR0, condbrtarget:$dst)>;
+
def : InstAlias<"b"#name#"lrl $cc",
(BCLRL bibo, crrc:$cc)>;
def : InstAlias<"b"#name#"lrl",
OpenPOWER on IntegriCloud