From 2e8bd8950345b0857130dd0f4068222a79c103f2 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 24 Jun 2013 16:52:04 +0000 Subject: [PATCH] [PowerPC] Add predicted forms of branches This adds support for the predicted forms of branches (+/-). There are three cases to consider: - Branches using a PPC::Predicate code For these, I've added new PPC::Predicate codes corresponding to the BO values for predicted branch forms, and updated insn printing to print them correctly. I've also added new aliases for the asm parser matching the new forms. - bt/bf I've added new aliases matching to gBC etc. - bd(n)z variants I've added new instruction patterns for the predicted forms. In all cases, the new patterns are used for the asm parser only. (The new infrastructure ought to be sufficient to allow use by the compiler too at some point.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184754 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp | 16 + lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp | 88 +- lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp | 32 + lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h | 32 +- lib/Target/PowerPC/PPCInstr64Bit.td | 4 +- lib/Target/PowerPC/PPCInstrInfo.td | 155 ++- test/MC/PowerPC/ppc64-encoding-ext.s | 1136 +++++++++++++++++++++ 7 files changed, 1395 insertions(+), 68 deletions(-) diff --git a/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp b/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp index 999c6778248..6803d664bc4 100644 --- a/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp +++ b/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp @@ -747,6 +747,22 @@ bool PPCAsmParser:: ParseInstruction(ParseInstructionInfo &Info, StringRef Name, SMLoc NameLoc, SmallVectorImpl &Operands) { // The first operand is the token for the instruction name. + // If the next character is a '+' or '-', we need to add it to the + // instruction name, to match what TableGen is doing. + if (getLexer().is(AsmToken::Plus)) { + getLexer().Lex(); + char *NewOpcode = new char[Name.size() + 1]; + memcpy(NewOpcode, Name.data(), Name.size()); + NewOpcode[Name.size()] = '+'; + Name = StringRef(NewOpcode, Name.size() + 1); + } + if (getLexer().is(AsmToken::Minus)) { + getLexer().Lex(); + char *NewOpcode = new char[Name.size() + 1]; + memcpy(NewOpcode, Name.data(), Name.size()); + NewOpcode[Name.size()] = '-'; + Name = StringRef(NewOpcode, Name.size() + 1); + } // If the instruction ends in a '.', we need to create a separate // token for it, to match what TableGen is doing. size_t Dot = Name.find('.'); diff --git a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp index 9af5e535cea..920cda9a9e8 100644 --- a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp +++ b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp @@ -90,19 +90,89 @@ void PPCInstPrinter::printPredicateOperand(const MCInst *MI, unsigned OpNo, if (StringRef(Modifier) == "cc") { switch ((PPC::Predicate)Code) { - case PPC::PRED_LT: O << "lt"; return; - case PPC::PRED_LE: O << "le"; return; - case PPC::PRED_EQ: O << "eq"; return; - case PPC::PRED_GE: O << "ge"; return; - case PPC::PRED_GT: O << "gt"; return; - case PPC::PRED_NE: O << "ne"; return; - case PPC::PRED_UN: O << "un"; return; - case PPC::PRED_NU: O << "nu"; return; + case PPC::PRED_LT_MINUS: + case PPC::PRED_LT_PLUS: + case PPC::PRED_LT: + O << "lt"; + return; + case PPC::PRED_LE_MINUS: + case PPC::PRED_LE_PLUS: + case PPC::PRED_LE: + O << "le"; + return; + case PPC::PRED_EQ_MINUS: + case PPC::PRED_EQ_PLUS: + case PPC::PRED_EQ: + O << "eq"; + return; + case PPC::PRED_GE_MINUS: + case PPC::PRED_GE_PLUS: + case PPC::PRED_GE: + O << "ge"; + return; + case PPC::PRED_GT_MINUS: + case PPC::PRED_GT_PLUS: + case PPC::PRED_GT: + O << "gt"; + return; + case PPC::PRED_NE_MINUS: + case PPC::PRED_NE_PLUS: + case PPC::PRED_NE: + O << "ne"; + return; + case PPC::PRED_UN_MINUS: + case PPC::PRED_UN_PLUS: + case PPC::PRED_UN: + O << "un"; + return; + case PPC::PRED_NU_MINUS: + case PPC::PRED_NU_PLUS: + case PPC::PRED_NU: + O << "nu"; + return; + default: + llvm_unreachable("Invalid predicate code"); + } + } + + if (StringRef(Modifier) == "pm") { + switch ((PPC::Predicate)Code) { + case PPC::PRED_LT: + case PPC::PRED_LE: + case PPC::PRED_EQ: + case PPC::PRED_GE: + case PPC::PRED_GT: + case PPC::PRED_NE: + case PPC::PRED_UN: + case PPC::PRED_NU: + return; + case PPC::PRED_LT_MINUS: + case PPC::PRED_LE_MINUS: + case PPC::PRED_EQ_MINUS: + case PPC::PRED_GE_MINUS: + case PPC::PRED_GT_MINUS: + case PPC::PRED_NE_MINUS: + case PPC::PRED_UN_MINUS: + case PPC::PRED_NU_MINUS: + O << "-"; + return; + case PPC::PRED_LT_PLUS: + case PPC::PRED_LE_PLUS: + case PPC::PRED_EQ_PLUS: + case PPC::PRED_GE_PLUS: + case PPC::PRED_GT_PLUS: + case PPC::PRED_NE_PLUS: + case PPC::PRED_UN_PLUS: + case PPC::PRED_NU_PLUS: + O << "+"; + return; + default: + llvm_unreachable("Invalid predicate code"); } } assert(StringRef(Modifier) == "reg" && - "Need to specify 'cc' or 'reg' as predicate op modifier!"); + "Need to specify 'cc', 'pm' or 'reg' as predicate op modifier!"); printOperand(MI, OpNo+1, O); } diff --git a/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp b/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp index 853e5053956..63facc5446d 100644 --- a/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp +++ b/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp @@ -26,6 +26,22 @@ PPC::Predicate PPC::InvertPredicate(PPC::Predicate Opcode) { case PPC::PRED_LE: return PPC::PRED_GT; case PPC::PRED_NU: return PPC::PRED_UN; case PPC::PRED_UN: return PPC::PRED_NU; + case PPC::PRED_EQ_MINUS: return PPC::PRED_NE_PLUS; + case PPC::PRED_NE_MINUS: return PPC::PRED_EQ_PLUS; + case PPC::PRED_LT_MINUS: return PPC::PRED_GE_PLUS; + case PPC::PRED_GE_MINUS: return PPC::PRED_LT_PLUS; + case PPC::PRED_GT_MINUS: return PPC::PRED_LE_PLUS; + case PPC::PRED_LE_MINUS: return PPC::PRED_GT_PLUS; + case PPC::PRED_NU_MINUS: return PPC::PRED_UN_PLUS; + case PPC::PRED_UN_MINUS: return PPC::PRED_NU_PLUS; + case PPC::PRED_EQ_PLUS: return PPC::PRED_NE_MINUS; + case PPC::PRED_NE_PLUS: return PPC::PRED_EQ_MINUS; + case PPC::PRED_LT_PLUS: return PPC::PRED_GE_MINUS; + case PPC::PRED_GE_PLUS: return PPC::PRED_LT_MINUS; + case PPC::PRED_GT_PLUS: return PPC::PRED_LE_MINUS; + case PPC::PRED_LE_PLUS: return PPC::PRED_GT_MINUS; + case PPC::PRED_NU_PLUS: return PPC::PRED_UN_MINUS; + case PPC::PRED_UN_PLUS: return PPC::PRED_NU_MINUS; } llvm_unreachable("Unknown PPC branch opcode!"); } @@ -40,6 +56,22 @@ PPC::Predicate PPC::getSwappedPredicate(PPC::Predicate Opcode) { case PPC::PRED_LE: return PPC::PRED_GE; case PPC::PRED_NU: return PPC::PRED_NU; case PPC::PRED_UN: return PPC::PRED_UN; + case PPC::PRED_EQ_MINUS: return PPC::PRED_EQ_MINUS; + case PPC::PRED_NE_MINUS: return PPC::PRED_NE_MINUS; + case PPC::PRED_LT_MINUS: return PPC::PRED_GT_MINUS; + case PPC::PRED_GE_MINUS: return PPC::PRED_LE_MINUS; + case PPC::PRED_GT_MINUS: return PPC::PRED_LT_MINUS; + case PPC::PRED_LE_MINUS: return PPC::PRED_GE_MINUS; + case PPC::PRED_NU_MINUS: return PPC::PRED_NU_MINUS; + case PPC::PRED_UN_MINUS: return PPC::PRED_UN_MINUS; + case PPC::PRED_EQ_PLUS: return PPC::PRED_EQ_PLUS; + case PPC::PRED_NE_PLUS: return PPC::PRED_NE_PLUS; + case PPC::PRED_LT_PLUS: return PPC::PRED_GT_PLUS; + case PPC::PRED_GE_PLUS: return PPC::PRED_LE_PLUS; + case PPC::PRED_GT_PLUS: return PPC::PRED_LT_PLUS; + case PPC::PRED_LE_PLUS: return PPC::PRED_GE_PLUS; + case PPC::PRED_NU_PLUS: return PPC::PRED_NU_PLUS; + case PPC::PRED_UN_PLUS: return PPC::PRED_UN_PLUS; } llvm_unreachable("Unknown PPC branch opcode!"); } diff --git a/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h b/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h index 444758cc8b6..d498c2f8f44 100644 --- a/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h +++ b/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h @@ -25,14 +25,30 @@ namespace llvm { namespace PPC { /// Predicate - These are "(BI << 5) | BO" for various predicates. enum Predicate { - PRED_LT = (0 << 5) | 12, - PRED_LE = (1 << 5) | 4, - PRED_EQ = (2 << 5) | 12, - PRED_GE = (0 << 5) | 4, - PRED_GT = (1 << 5) | 12, - PRED_NE = (2 << 5) | 4, - PRED_UN = (3 << 5) | 12, - PRED_NU = (3 << 5) | 4 + PRED_LT = (0 << 5) | 12, + PRED_LE = (1 << 5) | 4, + PRED_EQ = (2 << 5) | 12, + PRED_GE = (0 << 5) | 4, + PRED_GT = (1 << 5) | 12, + PRED_NE = (2 << 5) | 4, + PRED_UN = (3 << 5) | 12, + PRED_NU = (3 << 5) | 4, + PRED_LT_MINUS = (0 << 5) | 14, + PRED_LE_MINUS = (1 << 5) | 6, + PRED_EQ_MINUS = (2 << 5) | 14, + PRED_GE_MINUS = (0 << 5) | 6, + PRED_GT_MINUS = (1 << 5) | 14, + PRED_NE_MINUS = (2 << 5) | 6, + PRED_UN_MINUS = (3 << 5) | 14, + PRED_NU_MINUS = (3 << 5) | 6, + PRED_LT_PLUS = (0 << 5) | 15, + PRED_LE_PLUS = (1 << 5) | 7, + PRED_EQ_PLUS = (2 << 5) | 15, + PRED_GE_PLUS = (0 << 5) | 7, + PRED_GT_PLUS = (1 << 5) | 15, + PRED_NE_PLUS = (2 << 5) | 7, + PRED_UN_PLUS = (3 << 5) | 15, + PRED_NU_PLUS = (3 << 5) | 7 }; /// Invert the specified predicate. != -> ==, < -> >=. diff --git a/lib/Target/PowerPC/PPCInstr64Bit.td b/lib/Target/PowerPC/PPCInstr64Bit.td index 89883e23f84..cab1a20b327 100644 --- a/lib/Target/PowerPC/PPCInstr64Bit.td +++ b/lib/Target/PowerPC/PPCInstr64Bit.td @@ -69,7 +69,7 @@ let isTerminator = 1, isBarrier = 1, PPC970_Unit = 7 in { let isCodeGenOnly = 1 in def BCCTR8 : XLForm_2_br<19, 528, 0, (outs), (ins pred:$cond), - "b${cond:cc}ctr ${cond:reg}", BrB, []>, + "b${cond:cc}ctr${cond:pm} ${cond:reg}", BrB, []>, Requires<[In64BitMode]>; } } @@ -130,7 +130,7 @@ let isCall = 1, PPC970_Unit = 7, Defs = [LR8] in { let isCodeGenOnly = 1 in def BCCTRL8 : XLForm_2_br<19, 528, 1, (outs), (ins pred:$cond), - "b${cond:cc}ctrl ${cond:reg}", BrB, []>, + "b${cond:cc}ctrl${cond:pm} ${cond:reg}", BrB, []>, Requires<[In64BitMode]>; } } diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index df01baabc88..34336964066 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -883,7 +883,7 @@ let isTerminator = 1, isBarrier = 1, PPC970_Unit = 7 in { let isCodeGenOnly = 1 in def BCCTR : XLForm_2_br<19, 528, 0, (outs), (ins pred:$cond), - "b${cond:cc}ctr ${cond:reg}", BrB, []>; + "b${cond:cc}ctr${cond:pm} ${cond:reg}", BrB, []>; } } @@ -905,21 +905,29 @@ let isBranch = 1, isTerminator = 1, hasCtrlDep = 1, PPC970_Unit = 7 in { // a two-value operand where a dag node expects two operands. :( let isCodeGenOnly = 1 in { def BCC : BForm<16, 0, 0, (outs), (ins pred:$cond, condbrtarget:$dst), - "b${cond:cc} ${cond:reg}, $dst" + "b${cond:cc}${cond:pm} ${cond:reg}, $dst" /*[(PPCcondbranch crrc:$crS, imm:$opc, bb:$dst)]*/>; def BCCA : BForm<16, 1, 0, (outs), (ins pred:$cond, abscondbrtarget:$dst), - "b${cond:cc}a ${cond:reg}, $dst">; + "b${cond:cc}a${cond:pm} ${cond:reg}, $dst">; let isReturn = 1, Uses = [LR, RM] in def BCLR : XLForm_2_br<19, 16, 0, (outs), (ins pred:$cond), - "b${cond:cc}lr ${cond:reg}", BrB, []>; + "b${cond:cc}lr${cond:pm} ${cond:reg}", BrB, []>; + } - let isReturn = 1, Defs = [CTR], Uses = [CTR, LR, RM] in { - def BDZLR : XLForm_2_ext<19, 16, 18, 0, 0, (outs), (ins), + let isReturn = 1, Defs = [CTR], Uses = [CTR, LR, RM] in { + def BDZLR : XLForm_2_ext<19, 16, 18, 0, 0, (outs), (ins), "bdzlr", BrB, []>; - def BDNZLR : XLForm_2_ext<19, 16, 16, 0, 0, (outs), (ins), + def BDNZLR : XLForm_2_ext<19, 16, 16, 0, 0, (outs), (ins), "bdnzlr", BrB, []>; - } + def BDZLRp : XLForm_2_ext<19, 16, 27, 0, 0, (outs), (ins), + "bdzlr+", BrB, []>; + def BDNZLRp: XLForm_2_ext<19, 16, 25, 0, 0, (outs), (ins), + "bdnzlr+", BrB, []>; + def BDZLRm : XLForm_2_ext<19, 16, 26, 0, 0, (outs), (ins), + "bdzlr-", BrB, []>; + def BDNZLRm: XLForm_2_ext<19, 16, 24, 0, 0, (outs), (ins), + "bdnzlr-", BrB, []>; } let Defs = [CTR], Uses = [CTR] in { @@ -931,6 +939,22 @@ let isBranch = 1, isTerminator = 1, hasCtrlDep = 1, PPC970_Unit = 7 in { "bdza $dst">; def BDNZA : BForm_1<16, 16, 1, 0, (outs), (ins abscondbrtarget:$dst), "bdnza $dst">; + def BDZp : BForm_1<16, 27, 0, 0, (outs), (ins condbrtarget:$dst), + "bdz+ $dst">; + def BDNZp: BForm_1<16, 25, 0, 0, (outs), (ins condbrtarget:$dst), + "bdnz+ $dst">; + def BDZAp : BForm_1<16, 27, 1, 0, (outs), (ins abscondbrtarget:$dst), + "bdza+ $dst">; + def BDNZAp: BForm_1<16, 25, 1, 0, (outs), (ins abscondbrtarget:$dst), + "bdnza+ $dst">; + def BDZm : BForm_1<16, 26, 0, 0, (outs), (ins condbrtarget:$dst), + "bdz- $dst">; + def BDNZm: BForm_1<16, 24, 0, 0, (outs), (ins condbrtarget:$dst), + "bdnz- $dst">; + def BDZAm : BForm_1<16, 26, 1, 0, (outs), (ins abscondbrtarget:$dst), + "bdza- $dst">; + def BDNZAm: BForm_1<16, 24, 1, 0, (outs), (ins abscondbrtarget:$dst), + "bdnza- $dst">; } } @@ -952,9 +976,9 @@ let isCall = 1, PPC970_Unit = 7, Defs = [LR] in { let isCodeGenOnly = 1 in { def BCCL : BForm<16, 0, 1, (outs), (ins pred:$cond, condbrtarget:$dst), - "b${cond:cc}l ${cond:reg}, $dst">; + "b${cond:cc}l${cond:pm} ${cond:reg}, $dst">; def BCCLA : BForm<16, 1, 1, (outs), (ins pred:$cond, abscondbrtarget:$dst), - "b${cond:cc}la ${cond:reg}, $dst">; + "b${cond:cc}la${cond:pm} ${cond:reg}, $dst">; } } let Uses = [CTR, RM] in { @@ -964,7 +988,7 @@ let isCall = 1, PPC970_Unit = 7, Defs = [LR] in { let isCodeGenOnly = 1 in def BCCTRL : XLForm_2_br<19, 528, 1, (outs), (ins pred:$cond), - "b${cond:cc}ctrl ${cond:reg}", BrB, []>; + "b${cond:cc}ctrl${cond:pm} ${cond:reg}", BrB, []>; } let Uses = [LR, RM] in { def BLRL : XLForm_2_ext<19, 16, 20, 0, 1, (outs), (ins), @@ -972,7 +996,7 @@ let isCall = 1, PPC970_Unit = 7, Defs = [LR] in { let isCodeGenOnly = 1 in def BCLRL : XLForm_2_br<19, 16, 1, (outs), (ins pred:$cond), - "b${cond:cc}lrl ${cond:reg}", BrB, []>; + "b${cond:cc}lrl${cond:pm} ${cond:reg}", BrB, []>; } let Defs = [CTR], Uses = [CTR, RM] in { def BDZL : BForm_1<16, 18, 0, 1, (outs), (ins condbrtarget:$dst), @@ -983,12 +1007,36 @@ let isCall = 1, PPC970_Unit = 7, Defs = [LR] in { "bdzla $dst">; def BDNZLA : BForm_1<16, 16, 1, 1, (outs), (ins abscondbrtarget:$dst), "bdnzla $dst">; + def BDZLp : BForm_1<16, 27, 0, 1, (outs), (ins condbrtarget:$dst), + "bdzl+ $dst">; + def BDNZLp: BForm_1<16, 25, 0, 1, (outs), (ins condbrtarget:$dst), + "bdnzl+ $dst">; + def BDZLAp : BForm_1<16, 27, 1, 1, (outs), (ins abscondbrtarget:$dst), + "bdzla+ $dst">; + def BDNZLAp: BForm_1<16, 25, 1, 1, (outs), (ins abscondbrtarget:$dst), + "bdnzla+ $dst">; + def BDZLm : BForm_1<16, 26, 0, 1, (outs), (ins condbrtarget:$dst), + "bdzl- $dst">; + def BDNZLm: BForm_1<16, 24, 0, 1, (outs), (ins condbrtarget:$dst), + "bdnzl- $dst">; + def BDZLAm : BForm_1<16, 26, 1, 1, (outs), (ins abscondbrtarget:$dst), + "bdzla- $dst">; + def BDNZLAm: BForm_1<16, 24, 1, 1, (outs), (ins abscondbrtarget:$dst), + "bdnzla- $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, []>; + def BDZLRLp : XLForm_2_ext<19, 16, 27, 0, 1, (outs), (ins), + "bdzlrl+", BrB, []>; + def BDNZLRLp: XLForm_2_ext<19, 16, 25, 0, 1, (outs), (ins), + "bdnzlrl+", BrB, []>; + def BDZLRLm : XLForm_2_ext<19, 16, 26, 0, 1, (outs), (ins), + "bdzlrl-", BrB, []>; + def BDNZLRLm: XLForm_2_ext<19, 16, 24, 0, 1, (outs), (ins), + "bdnzlrl-", BrB, []>; } } @@ -2270,67 +2318,76 @@ def : InstAlias<"bclrl $bo, $bi", (gBCLRL u5imm:$bo, crbitrc:$bi, 0)>; def : InstAlias<"bcctr $bo, $bi", (gBCCTR u5imm:$bo, crbitrc:$bi, 0)>; def : InstAlias<"bcctrl $bo, $bi", (gBCCTRL u5imm:$bo, crbitrc:$bi, 0)>; -multiclass BranchSimpleMnemonic1 { - def : InstAlias<"b"#name#" $bi, $dst", (gBC bo, crbitrc:$bi, condbrtarget:$dst)>; - def : InstAlias<"b"#name#"a $bi, $dst", (gBCA bo, crbitrc:$bi, abscondbrtarget:$dst)>; - def : InstAlias<"b"#name#"lr $bi", (gBCLR bo, crbitrc:$bi, 0)>; - def : InstAlias<"b"#name#"l $bi, $dst", (gBCL bo, crbitrc:$bi, condbrtarget:$dst)>; - def : InstAlias<"b"#name#"la $bi, $dst", (gBCLA bo, crbitrc:$bi, abscondbrtarget:$dst)>; - def : InstAlias<"b"#name#"lrl $bi", (gBCLRL bo, crbitrc:$bi, 0)>; -} -multiclass BranchSimpleMnemonic2 - : BranchSimpleMnemonic1 { - def : InstAlias<"b"#name#"ctr $bi", (gBCCTR bo, crbitrc:$bi, 0)>; - def : InstAlias<"b"#name#"ctrl $bi", (gBCCTRL bo, crbitrc:$bi, 0)>; -} -defm : BranchSimpleMnemonic2<"t", 12>; -defm : BranchSimpleMnemonic2<"f", 4>; -defm : BranchSimpleMnemonic1<"dnzt", 8>; -defm : BranchSimpleMnemonic1<"dnzf", 0>; -defm : BranchSimpleMnemonic1<"dzt", 10>; -defm : BranchSimpleMnemonic1<"dzf", 2>; - -multiclass BranchExtendedMnemonic { - def : InstAlias<"b"#name#" $cc, $dst", +multiclass BranchSimpleMnemonic1 { + def : InstAlias<"b"#name#pm#" $bi, $dst", (gBC bo, crbitrc:$bi, condbrtarget:$dst)>; + def : InstAlias<"b"#name#"a"#pm#" $bi, $dst", (gBCA bo, crbitrc:$bi, abscondbrtarget:$dst)>; + def : InstAlias<"b"#name#"lr"#pm#" $bi", (gBCLR bo, crbitrc:$bi, 0)>; + def : InstAlias<"b"#name#"l"#pm#" $bi, $dst", (gBCL bo, crbitrc:$bi, condbrtarget:$dst)>; + def : InstAlias<"b"#name#"la"#pm#" $bi, $dst", (gBCLA bo, crbitrc:$bi, abscondbrtarget:$dst)>; + def : InstAlias<"b"#name#"lrl"#pm#" $bi", (gBCLRL bo, crbitrc:$bi, 0)>; +} +multiclass BranchSimpleMnemonic2 + : BranchSimpleMnemonic1 { + def : InstAlias<"b"#name#"ctr"#pm#" $bi", (gBCCTR bo, crbitrc:$bi, 0)>; + def : InstAlias<"b"#name#"ctrl"#pm#" $bi", (gBCCTRL bo, crbitrc:$bi, 0)>; +} +defm : BranchSimpleMnemonic2<"t", "", 12>; +defm : BranchSimpleMnemonic2<"f", "", 4>; +defm : BranchSimpleMnemonic2<"t", "-", 14>; +defm : BranchSimpleMnemonic2<"f", "-", 6>; +defm : BranchSimpleMnemonic2<"t", "+", 15>; +defm : BranchSimpleMnemonic2<"f", "+", 7>; +defm : BranchSimpleMnemonic1<"dnzt", "", 8>; +defm : BranchSimpleMnemonic1<"dnzf", "", 0>; +defm : BranchSimpleMnemonic1<"dzt", "", 10>; +defm : BranchSimpleMnemonic1<"dzf", "", 2>; + +multiclass BranchExtendedMnemonicPM { + def : InstAlias<"b"#name#pm#" $cc, $dst", (BCC bibo, crrc:$cc, condbrtarget:$dst)>; - def : InstAlias<"b"#name#" $dst", + def : InstAlias<"b"#name#pm#" $dst", (BCC bibo, CR0, condbrtarget:$dst)>; - def : InstAlias<"b"#name#"a $cc, $dst", + def : InstAlias<"b"#name#"a"#pm#" $cc, $dst", (BCCA bibo, crrc:$cc, abscondbrtarget:$dst)>; - def : InstAlias<"b"#name#"a $dst", + def : InstAlias<"b"#name#"a"#pm#" $dst", (BCCA bibo, CR0, abscondbrtarget:$dst)>; - def : InstAlias<"b"#name#"lr $cc", + def : InstAlias<"b"#name#"lr"#pm#" $cc", (BCLR bibo, crrc:$cc)>; - def : InstAlias<"b"#name#"lr", + def : InstAlias<"b"#name#"lr"#pm, (BCLR bibo, CR0)>; - def : InstAlias<"b"#name#"ctr $cc", + def : InstAlias<"b"#name#"ctr"#pm#" $cc", (BCCTR bibo, crrc:$cc)>; - def : InstAlias<"b"#name#"ctr", + def : InstAlias<"b"#name#"ctr"#pm, (BCCTR bibo, CR0)>; - def : InstAlias<"b"#name#"l $cc, $dst", + def : InstAlias<"b"#name#"l"#pm#" $cc, $dst", (BCCL bibo, crrc:$cc, condbrtarget:$dst)>; - def : InstAlias<"b"#name#"l $dst", + def : InstAlias<"b"#name#"l"#pm#" $dst", (BCCL bibo, CR0, condbrtarget:$dst)>; - def : InstAlias<"b"#name#"la $cc, $dst", + def : InstAlias<"b"#name#"la"#pm#" $cc, $dst", (BCCLA bibo, crrc:$cc, abscondbrtarget:$dst)>; - def : InstAlias<"b"#name#"la $dst", + def : InstAlias<"b"#name#"la"#pm#" $dst", (BCCLA bibo, CR0, abscondbrtarget:$dst)>; - def : InstAlias<"b"#name#"lrl $cc", + def : InstAlias<"b"#name#"lrl"#pm#" $cc", (BCLRL bibo, crrc:$cc)>; - def : InstAlias<"b"#name#"lrl", + def : InstAlias<"b"#name#"lrl"#pm, (BCLRL bibo, CR0)>; - def : InstAlias<"b"#name#"ctrl $cc", + def : InstAlias<"b"#name#"ctrl"#pm#" $cc", (BCCTRL bibo, crrc:$cc)>; - def : InstAlias<"b"#name#"ctrl", + def : InstAlias<"b"#name#"ctrl"#pm, (BCCTRL bibo, CR0)>; } +multiclass BranchExtendedMnemonic { + defm : BranchExtendedMnemonicPM; + defm : BranchExtendedMnemonicPM; + defm : BranchExtendedMnemonicPM; +} defm : BranchExtendedMnemonic<"lt", 12>; defm : BranchExtendedMnemonic<"gt", 44>; defm : BranchExtendedMnemonic<"eq", 76>; diff --git a/test/MC/PowerPC/ppc64-encoding-ext.s b/test/MC/PowerPC/ppc64-encoding-ext.s index fd5d2a1ecfc..694f8149bcd 100644 --- a/test/MC/PowerPC/ppc64-encoding-ext.s +++ b/test/MC/PowerPC/ppc64-encoding-ext.s @@ -35,6 +35,48 @@ # CHECK: bcctrl 12, 2, 0 # encoding: [0x4d,0x82,0x04,0x21] btctrl 2 +# CHECK: bc 15, 2, target # encoding: [0x41,0xe2,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bt+ 2, target +# CHECK: bca 15, 2, target # encoding: [0x41,0xe2,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bta+ 2, target +# CHECK: bclr 15, 2, 0 # encoding: [0x4d,0xe2,0x00,0x20] + btlr+ 2 +# CHECK: bcctr 15, 2, 0 # encoding: [0x4d,0xe2,0x04,0x20] + btctr+ 2 +# CHECK: bcl 15, 2, target # encoding: [0x41,0xe2,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + btl+ 2, target +# CHECK: bcla 15, 2, target # encoding: [0x41,0xe2,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + btla+ 2, target +# CHECK: bclrl 15, 2, 0 # encoding: [0x4d,0xe2,0x00,0x21] + btlrl+ 2 +# CHECK: bcctrl 15, 2, 0 # encoding: [0x4d,0xe2,0x04,0x21] + btctrl+ 2 + +# CHECK: bc 14, 2, target # encoding: [0x41,0xc2,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bt- 2, target +# CHECK: bca 14, 2, target # encoding: [0x41,0xc2,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bta- 2, target +# CHECK: bclr 14, 2, 0 # encoding: [0x4d,0xc2,0x00,0x20] + btlr- 2 +# CHECK: bcctr 14, 2, 0 # encoding: [0x4d,0xc2,0x04,0x20] + btctr- 2 +# CHECK: bcl 14, 2, target # encoding: [0x41,0xc2,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + btl- 2, target +# CHECK: bcla 14, 2, target # encoding: [0x41,0xc2,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + btla- 2, target +# CHECK: bclrl 14, 2, 0 # encoding: [0x4d,0xc2,0x00,0x21] + btlrl- 2 +# CHECK: bcctrl 14, 2, 0 # encoding: [0x4d,0xc2,0x04,0x21] + btctrl- 2 + # CHECK: bc 4, 2, target # encoding: [0x40,0x82,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bf 2, target @@ -56,6 +98,48 @@ # CHECK: bcctrl 4, 2, 0 # encoding: [0x4c,0x82,0x04,0x21] bfctrl 2 +# CHECK: bc 7, 2, target # encoding: [0x40,0xe2,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bf+ 2, target +# CHECK: bca 7, 2, target # encoding: [0x40,0xe2,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bfa+ 2, target +# CHECK: bclr 7, 2, 0 # encoding: [0x4c,0xe2,0x00,0x20] + bflr+ 2 +# CHECK: bcctr 7, 2, 0 # encoding: [0x4c,0xe2,0x04,0x20] + bfctr+ 2 +# CHECK: bcl 7, 2, target # encoding: [0x40,0xe2,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bfl+ 2, target +# CHECK: bcla 7, 2, target # encoding: [0x40,0xe2,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bfla+ 2, target +# CHECK: bclrl 7, 2, 0 # encoding: [0x4c,0xe2,0x00,0x21] + bflrl+ 2 +# CHECK: bcctrl 7, 2, 0 # encoding: [0x4c,0xe2,0x04,0x21] + bfctrl+ 2 + +# CHECK: bc 6, 2, target # encoding: [0x40,0xc2,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bf- 2, target +# CHECK: bca 6, 2, target # encoding: [0x40,0xc2,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bfa- 2, target +# CHECK: bclr 6, 2, 0 # encoding: [0x4c,0xc2,0x00,0x20] + bflr- 2 +# CHECK: bcctr 6, 2, 0 # encoding: [0x4c,0xc2,0x04,0x20] + bfctr- 2 +# CHECK: bcl 6, 2, target # encoding: [0x40,0xc2,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bfl- 2, target +# CHECK: bcla 6, 2, target # encoding: [0x40,0xc2,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bfla- 2, target +# CHECK: bclrl 6, 2, 0 # encoding: [0x4c,0xc2,0x00,0x21] + bflrl- 2 +# CHECK: bcctrl 6, 2, 0 # encoding: [0x4c,0xc2,0x04,0x21] + bfctrl- 2 + # CHECK: bdnz target # encoding: [0x42,0x00,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bdnz target @@ -73,6 +157,40 @@ # CHECK: bdnzlrl # encoding: [0x4e,0x00,0x00,0x21] bdnzlrl +# CHECK: bdnz+ target # encoding: [0x43,0x20,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdnz+ target +# CHECK: bdnza+ target # encoding: [0x43,0x20,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bdnza+ target +# CHECK: bdnzlr+ # encoding: [0x4f,0x20,0x00,0x20] + bdnzlr+ +# CHECK: bdnzl+ target # encoding: [0x43,0x20,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdnzl+ target +# CHECK: bdnzla+ target # encoding: [0x43,0x20,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bdnzla+ target +# CHECK: bdnzlrl+ # encoding: [0x4f,0x20,0x00,0x21] + bdnzlrl+ + +# CHECK: bdnz- target # encoding: [0x43,0x00,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdnz- target +# CHECK: bdnza- target # encoding: [0x43,0x00,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bdnza- target +# CHECK: bdnzlr- # encoding: [0x4f,0x00,0x00,0x20] + bdnzlr- +# CHECK: bdnzl- target # encoding: [0x43,0x00,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdnzl- target +# CHECK: bdnzla- target # encoding: [0x43,0x00,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bdnzla- target +# CHECK: bdnzlrl- # encoding: [0x4f,0x00,0x00,0x21] + bdnzlrl- + # CHECK: bc 8, 2, target # encoding: [0x41,0x02,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bdnzt 2, target @@ -124,6 +242,40 @@ # CHECK: bdzlrl # encoding: [0x4e,0x40,0x00,0x21] bdzlrl +# CHECK: bdz+ target # encoding: [0x43,0x60,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdz+ target +# CHECK: bdza+ target # encoding: [0x43,0x60,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bdza+ target +# CHECK: bdzlr+ # encoding: [0x4f,0x60,0x00,0x20] + bdzlr+ +# CHECK: bdzl+ target # encoding: [0x43,0x60,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdzl+ target +# CHECK: bdzla+ target # encoding: [0x43,0x60,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bdzla+ target +# CHECK: bdzlrl+ # encoding: [0x4f,0x60,0x00,0x21] + bdzlrl+ + +# CHECK: bdz- target # encoding: [0x43,0x40,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdz- target +# CHECK: bdza- target # encoding: [0x43,0x40,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bdza- target +# CHECK: bdzlr- # encoding: [0x4f,0x40,0x00,0x20] + bdzlr- +# CHECK: bdzl- target # encoding: [0x43,0x40,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bdzl- target +# CHECK: bdzla- target # encoding: [0x43,0x40,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bdzla- target +# CHECK: bdzlrl- # encoding: [0x4f,0x40,0x00,0x21] + bdzlrl- + # CHECK: bc 10, 2, target # encoding: [0x41,0x42,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bdzt 2, target @@ -199,6 +351,88 @@ # CHECK: bltctrl 0 # encoding: [0x4d,0x80,0x04,0x21] bltctrl +# CHECK: blt+ 2, target # encoding: [0x41,0xe8,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blt+ 2, target +# CHECK: blt+ 0, target # encoding: [0x41,0xe0,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blt+ target +# CHECK: blta+ 2, target # encoding: [0x41,0xe8,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blta+ 2, target +# CHECK: blta+ 0, target # encoding: [0x41,0xe0,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blta+ target +# CHECK: bltlr+ 2 # encoding: [0x4d,0xe8,0x00,0x20] + bltlr+ 2 +# CHECK: bltlr+ 0 # encoding: [0x4d,0xe0,0x00,0x20] + bltlr+ +# CHECK: bltctr+ 2 # encoding: [0x4d,0xe8,0x04,0x20] + bltctr+ 2 +# CHECK: bltctr+ 0 # encoding: [0x4d,0xe0,0x04,0x20] + bltctr+ +# CHECK: bltl+ 2, target # encoding: [0x41,0xe8,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bltl+ 2, target +# CHECK: bltl+ 0, target # encoding: [0x41,0xe0,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bltl+ target +# CHECK: bltla+ 2, target # encoding: [0x41,0xe8,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bltla+ 2, target +# CHECK: bltla+ 0, target # encoding: [0x41,0xe0,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bltla+ target +# CHECK: bltlrl+ 2 # encoding: [0x4d,0xe8,0x00,0x21] + bltlrl+ 2 +# CHECK: bltlrl+ 0 # encoding: [0x4d,0xe0,0x00,0x21] + bltlrl+ +# CHECK: bltctrl+ 2 # encoding: [0x4d,0xe8,0x04,0x21] + bltctrl+ 2 +# CHECK: bltctrl+ 0 # encoding: [0x4d,0xe0,0x04,0x21] + bltctrl+ + +# CHECK: blt- 2, target # encoding: [0x41,0xc8,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blt- 2, target +# CHECK: blt- 0, target # encoding: [0x41,0xc0,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blt- target +# CHECK: blta- 2, target # encoding: [0x41,0xc8,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blta- 2, target +# CHECK: blta- 0, target # encoding: [0x41,0xc0,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blta- target +# CHECK: bltlr- 2 # encoding: [0x4d,0xc8,0x00,0x20] + bltlr- 2 +# CHECK: bltlr- 0 # encoding: [0x4d,0xc0,0x00,0x20] + bltlr- +# CHECK: bltctr- 2 # encoding: [0x4d,0xc8,0x04,0x20] + bltctr- 2 +# CHECK: bltctr- 0 # encoding: [0x4d,0xc0,0x04,0x20] + bltctr- +# CHECK: bltl- 2, target # encoding: [0x41,0xc8,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bltl- 2, target +# CHECK: bltl- 0, target # encoding: [0x41,0xc0,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bltl- target +# CHECK: bltla- 2, target # encoding: [0x41,0xc8,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bltla- 2, target +# CHECK: bltla- 0, target # encoding: [0x41,0xc0,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bltla- target +# CHECK: bltlrl- 2 # encoding: [0x4d,0xc8,0x00,0x21] + bltlrl- 2 +# CHECK: bltlrl- 0 # encoding: [0x4d,0xc0,0x00,0x21] + bltlrl- +# CHECK: bltctrl- 2 # encoding: [0x4d,0xc8,0x04,0x21] + bltctrl- 2 +# CHECK: bltctrl- 0 # encoding: [0x4d,0xc0,0x04,0x21] + bltctrl- + # CHECK: ble 2, target # encoding: [0x40,0x89,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 ble 2, target @@ -240,6 +474,88 @@ # CHECK: blectrl 0 # encoding: [0x4c,0x81,0x04,0x21] blectrl +# CHECK: ble+ 2, target # encoding: [0x40,0xe9,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + ble+ 2, target +# CHECK: ble+ 0, target # encoding: [0x40,0xe1,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + ble+ target +# CHECK: blea+ 2, target # encoding: [0x40,0xe9,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blea+ 2, target +# CHECK: blea+ 0, target # encoding: [0x40,0xe1,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blea+ target +# CHECK: blelr+ 2 # encoding: [0x4c,0xe9,0x00,0x20] + blelr+ 2 +# CHECK: blelr+ 0 # encoding: [0x4c,0xe1,0x00,0x20] + blelr+ +# CHECK: blectr+ 2 # encoding: [0x4c,0xe9,0x04,0x20] + blectr+ 2 +# CHECK: blectr+ 0 # encoding: [0x4c,0xe1,0x04,0x20] + blectr+ +# CHECK: blel+ 2, target # encoding: [0x40,0xe9,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blel+ 2, target +# CHECK: blel+ 0, target # encoding: [0x40,0xe1,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blel+ target +# CHECK: blela+ 2, target # encoding: [0x40,0xe9,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blela+ 2, target +# CHECK: blela+ 0, target # encoding: [0x40,0xe1,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blela+ target +# CHECK: blelrl+ 2 # encoding: [0x4c,0xe9,0x00,0x21] + blelrl+ 2 +# CHECK: blelrl+ 0 # encoding: [0x4c,0xe1,0x00,0x21] + blelrl+ +# CHECK: blectrl+ 2 # encoding: [0x4c,0xe9,0x04,0x21] + blectrl+ 2 +# CHECK: blectrl+ 0 # encoding: [0x4c,0xe1,0x04,0x21] + blectrl+ + +# CHECK: ble- 2, target # encoding: [0x40,0xc9,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + ble- 2, target +# CHECK: ble- 0, target # encoding: [0x40,0xc1,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + ble- target +# CHECK: blea- 2, target # encoding: [0x40,0xc9,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blea- 2, target +# CHECK: blea- 0, target # encoding: [0x40,0xc1,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blea- target +# CHECK: blelr- 2 # encoding: [0x4c,0xc9,0x00,0x20] + blelr- 2 +# CHECK: blelr- 0 # encoding: [0x4c,0xc1,0x00,0x20] + blelr- +# CHECK: blectr- 2 # encoding: [0x4c,0xc9,0x04,0x20] + blectr- 2 +# CHECK: blectr- 0 # encoding: [0x4c,0xc1,0x04,0x20] + blectr- +# CHECK: blel- 2, target # encoding: [0x40,0xc9,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blel- 2, target +# CHECK: blel- 0, target # encoding: [0x40,0xc1,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + blel- target +# CHECK: blela- 2, target # encoding: [0x40,0xc9,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blela- 2, target +# CHECK: blela- 0, target # encoding: [0x40,0xc1,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + blela- target +# CHECK: blelrl- 2 # encoding: [0x4c,0xc9,0x00,0x21] + blelrl- 2 +# CHECK: blelrl- 0 # encoding: [0x4c,0xc1,0x00,0x21] + blelrl- +# CHECK: blectrl- 2 # encoding: [0x4c,0xc9,0x04,0x21] + blectrl- 2 +# CHECK: blectrl- 0 # encoding: [0x4c,0xc1,0x04,0x21] + blectrl- + # CHECK: beq 2, target # encoding: [0x41,0x8a,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 beq 2, target @@ -281,6 +597,88 @@ # CHECK: beqctrl 0 # encoding: [0x4d,0x82,0x04,0x21] beqctrl +# CHECK: beq+ 2, target # encoding: [0x41,0xea,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beq+ 2, target +# CHECK: beq+ 0, target # encoding: [0x41,0xe2,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beq+ target +# CHECK: beqa+ 2, target # encoding: [0x41,0xea,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + beqa+ 2, target +# CHECK: beqa+ 0, target # encoding: [0x41,0xe2,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + beqa+ target +# CHECK: beqlr+ 2 # encoding: [0x4d,0xea,0x00,0x20] + beqlr+ 2 +# CHECK: beqlr+ 0 # encoding: [0x4d,0xe2,0x00,0x20] + beqlr+ +# CHECK: beqctr+ 2 # encoding: [0x4d,0xea,0x04,0x20] + beqctr+ 2 +# CHECK: beqctr+ 0 # encoding: [0x4d,0xe2,0x04,0x20] + beqctr+ +# CHECK: beql+ 2, target # encoding: [0x41,0xea,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beql+ 2, target +# CHECK: beql+ 0, target # encoding: [0x41,0xe2,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beql+ target +# CHECK: beqla+ 2, target # encoding: [0x41,0xea,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + beqla+ 2, target +# CHECK: beqla+ 0, target # encoding: [0x41,0xe2,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + beqla+ target +# CHECK: beqlrl+ 2 # encoding: [0x4d,0xea,0x00,0x21] + beqlrl+ 2 +# CHECK: beqlrl+ 0 # encoding: [0x4d,0xe2,0x00,0x21] + beqlrl+ +# CHECK: beqctrl+ 2 # encoding: [0x4d,0xea,0x04,0x21] + beqctrl+ 2 +# CHECK: beqctrl+ 0 # encoding: [0x4d,0xe2,0x04,0x21] + beqctrl+ + +# CHECK: beq- 2, target # encoding: [0x41,0xca,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beq- 2, target +# CHECK: beq- 0, target # encoding: [0x41,0xc2,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beq- target +# CHECK: beqa- 2, target # encoding: [0x41,0xca,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + beqa- 2, target +# CHECK: beqa- 0, target # encoding: [0x41,0xc2,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + beqa- target +# CHECK: beqlr- 2 # encoding: [0x4d,0xca,0x00,0x20] + beqlr- 2 +# CHECK: beqlr- 0 # encoding: [0x4d,0xc2,0x00,0x20] + beqlr- +# CHECK: beqctr- 2 # encoding: [0x4d,0xca,0x04,0x20] + beqctr- 2 +# CHECK: beqctr- 0 # encoding: [0x4d,0xc2,0x04,0x20] + beqctr- +# CHECK: beql- 2, target # encoding: [0x41,0xca,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beql- 2, target +# CHECK: beql- 0, target # encoding: [0x41,0xc2,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + beql- target +# CHECK: beqla- 2, target # encoding: [0x41,0xca,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + beqla- 2, target +# CHECK: beqla- 0, target # encoding: [0x41,0xc2,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + beqla- target +# CHECK: beqlrl- 2 # encoding: [0x4d,0xca,0x00,0x21] + beqlrl- 2 +# CHECK: beqlrl- 0 # encoding: [0x4d,0xc2,0x00,0x21] + beqlrl- +# CHECK: beqctrl- 2 # encoding: [0x4d,0xca,0x04,0x21] + beqctrl- 2 +# CHECK: beqctrl- 0 # encoding: [0x4d,0xc2,0x04,0x21] + beqctrl- + # CHECK: bge 2, target # encoding: [0x40,0x88,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bge 2, target @@ -322,6 +720,88 @@ # CHECK: bgectrl 0 # encoding: [0x4c,0x80,0x04,0x21] bgectrl +# CHECK: bge+ 2, target # encoding: [0x40,0xe8,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bge+ 2, target +# CHECK: bge+ 0, target # encoding: [0x40,0xe0,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bge+ target +# CHECK: bgea+ 2, target # encoding: [0x40,0xe8,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgea+ 2, target +# CHECK: bgea+ 0, target # encoding: [0x40,0xe0,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgea+ target +# CHECK: bgelr+ 2 # encoding: [0x4c,0xe8,0x00,0x20] + bgelr+ 2 +# CHECK: bgelr+ 0 # encoding: [0x4c,0xe0,0x00,0x20] + bgelr+ +# CHECK: bgectr+ 2 # encoding: [0x4c,0xe8,0x04,0x20] + bgectr+ 2 +# CHECK: bgectr+ 0 # encoding: [0x4c,0xe0,0x04,0x20] + bgectr+ +# CHECK: bgel+ 2, target # encoding: [0x40,0xe8,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgel+ 2, target +# CHECK: bgel+ 0, target # encoding: [0x40,0xe0,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgel+ target +# CHECK: bgela+ 2, target # encoding: [0x40,0xe8,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgela+ 2, target +# CHECK: bgela+ 0, target # encoding: [0x40,0xe0,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgela+ target +# CHECK: bgelrl+ 2 # encoding: [0x4c,0xe8,0x00,0x21] + bgelrl+ 2 +# CHECK: bgelrl+ 0 # encoding: [0x4c,0xe0,0x00,0x21] + bgelrl+ +# CHECK: bgectrl+ 2 # encoding: [0x4c,0xe8,0x04,0x21] + bgectrl+ 2 +# CHECK: bgectrl+ 0 # encoding: [0x4c,0xe0,0x04,0x21] + bgectrl+ + +# CHECK: bge- 2, target # encoding: [0x40,0xc8,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bge- 2, target +# CHECK: bge- 0, target # encoding: [0x40,0xc0,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bge- target +# CHECK: bgea- 2, target # encoding: [0x40,0xc8,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgea- 2, target +# CHECK: bgea- 0, target # encoding: [0x40,0xc0,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgea- target +# CHECK: bgelr- 2 # encoding: [0x4c,0xc8,0x00,0x20] + bgelr- 2 +# CHECK: bgelr- 0 # encoding: [0x4c,0xc0,0x00,0x20] + bgelr- +# CHECK: bgectr- 2 # encoding: [0x4c,0xc8,0x04,0x20] + bgectr- 2 +# CHECK: bgectr- 0 # encoding: [0x4c,0xc0,0x04,0x20] + bgectr- +# CHECK: bgel- 2, target # encoding: [0x40,0xc8,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgel- 2, target +# CHECK: bgel- 0, target # encoding: [0x40,0xc0,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgel- target +# CHECK: bgela- 2, target # encoding: [0x40,0xc8,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgela- 2, target +# CHECK: bgela- 0, target # encoding: [0x40,0xc0,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgela- target +# CHECK: bgelrl- 2 # encoding: [0x4c,0xc8,0x00,0x21] + bgelrl- 2 +# CHECK: bgelrl- 0 # encoding: [0x4c,0xc0,0x00,0x21] + bgelrl- +# CHECK: bgectrl- 2 # encoding: [0x4c,0xc8,0x04,0x21] + bgectrl- 2 +# CHECK: bgectrl- 0 # encoding: [0x4c,0xc0,0x04,0x21] + bgectrl- + # CHECK: bgt 2, target # encoding: [0x41,0x89,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bgt 2, target @@ -363,6 +843,88 @@ # CHECK: bgtctrl 0 # encoding: [0x4d,0x81,0x04,0x21] bgtctrl +# CHECK: bgt+ 2, target # encoding: [0x41,0xe9,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgt+ 2, target +# CHECK: bgt+ 0, target # encoding: [0x41,0xe1,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgt+ target +# CHECK: bgta+ 2, target # encoding: [0x41,0xe9,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgta+ 2, target +# CHECK: bgta+ 0, target # encoding: [0x41,0xe1,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgta+ target +# CHECK: bgtlr+ 2 # encoding: [0x4d,0xe9,0x00,0x20] + bgtlr+ 2 +# CHECK: bgtlr+ 0 # encoding: [0x4d,0xe1,0x00,0x20] + bgtlr+ +# CHECK: bgtctr+ 2 # encoding: [0x4d,0xe9,0x04,0x20] + bgtctr+ 2 +# CHECK: bgtctr+ 0 # encoding: [0x4d,0xe1,0x04,0x20] + bgtctr+ +# CHECK: bgtl+ 2, target # encoding: [0x41,0xe9,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgtl+ 2, target +# CHECK: bgtl+ 0, target # encoding: [0x41,0xe1,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgtl+ target +# CHECK: bgtla+ 2, target # encoding: [0x41,0xe9,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgtla+ 2, target +# CHECK: bgtla+ 0, target # encoding: [0x41,0xe1,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgtla+ target +# CHECK: bgtlrl+ 2 # encoding: [0x4d,0xe9,0x00,0x21] + bgtlrl+ 2 +# CHECK: bgtlrl+ 0 # encoding: [0x4d,0xe1,0x00,0x21] + bgtlrl+ +# CHECK: bgtctrl+ 2 # encoding: [0x4d,0xe9,0x04,0x21] + bgtctrl+ 2 +# CHECK: bgtctrl+ 0 # encoding: [0x4d,0xe1,0x04,0x21] + bgtctrl+ + +# CHECK: bgt- 2, target # encoding: [0x41,0xc9,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgt- 2, target +# CHECK: bgt- 0, target # encoding: [0x41,0xc1,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgt- target +# CHECK: bgta- 2, target # encoding: [0x41,0xc9,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgta- 2, target +# CHECK: bgta- 0, target # encoding: [0x41,0xc1,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgta- target +# CHECK: bgtlr- 2 # encoding: [0x4d,0xc9,0x00,0x20] + bgtlr- 2 +# CHECK: bgtlr- 0 # encoding: [0x4d,0xc1,0x00,0x20] + bgtlr- +# CHECK: bgtctr- 2 # encoding: [0x4d,0xc9,0x04,0x20] + bgtctr- 2 +# CHECK: bgtctr- 0 # encoding: [0x4d,0xc1,0x04,0x20] + bgtctr- +# CHECK: bgtl- 2, target # encoding: [0x41,0xc9,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgtl- 2, target +# CHECK: bgtl- 0, target # encoding: [0x41,0xc1,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bgtl- target +# CHECK: bgtla- 2, target # encoding: [0x41,0xc9,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgtla- 2, target +# CHECK: bgtla- 0, target # encoding: [0x41,0xc1,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bgtla- target +# CHECK: bgtlrl- 2 # encoding: [0x4d,0xc9,0x00,0x21] + bgtlrl- 2 +# CHECK: bgtlrl- 0 # encoding: [0x4d,0xc1,0x00,0x21] + bgtlrl- +# CHECK: bgtctrl- 2 # encoding: [0x4d,0xc9,0x04,0x21] + bgtctrl- 2 +# CHECK: bgtctrl- 0 # encoding: [0x4d,0xc1,0x04,0x21] + bgtctrl- + # CHECK: bge 2, target # encoding: [0x40,0x88,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bnl 2, target @@ -404,6 +966,88 @@ # CHECK: bgectrl 0 # encoding: [0x4c,0x80,0x04,0x21] bnlctrl +# CHECK: bge+ 2, target # encoding: [0x40,0xe8,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnl+ 2, target +# CHECK: bge+ 0, target # encoding: [0x40,0xe0,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnl+ target +# CHECK: bgea+ 2, target # encoding: [0x40,0xe8,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnla+ 2, target +# CHECK: bgea+ 0, target # encoding: [0x40,0xe0,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnla+ target +# CHECK: bgelr+ 2 # encoding: [0x4c,0xe8,0x00,0x20] + bnllr+ 2 +# CHECK: bgelr+ 0 # encoding: [0x4c,0xe0,0x00,0x20] + bnllr+ +# CHECK: bgectr+ 2 # encoding: [0x4c,0xe8,0x04,0x20] + bnlctr+ 2 +# CHECK: bgectr+ 0 # encoding: [0x4c,0xe0,0x04,0x20] + bnlctr+ +# CHECK: bgel+ 2, target # encoding: [0x40,0xe8,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnll+ 2, target +# CHECK: bgel+ 0, target # encoding: [0x40,0xe0,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnll+ target +# CHECK: bgela+ 2, target # encoding: [0x40,0xe8,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnlla+ 2, target +# CHECK: bgela+ 0, target # encoding: [0x40,0xe0,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnlla+ target +# CHECK: bgelrl+ 2 # encoding: [0x4c,0xe8,0x00,0x21] + bnllrl+ 2 +# CHECK: bgelrl+ 0 # encoding: [0x4c,0xe0,0x00,0x21] + bnllrl+ +# CHECK: bgectrl+ 2 # encoding: [0x4c,0xe8,0x04,0x21] + bnlctrl+ 2 +# CHECK: bgectrl+ 0 # encoding: [0x4c,0xe0,0x04,0x21] + bnlctrl+ + +# CHECK: bge- 2, target # encoding: [0x40,0xc8,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnl- 2, target +# CHECK: bge- 0, target # encoding: [0x40,0xc0,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnl- target +# CHECK: bgea- 2, target # encoding: [0x40,0xc8,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnla- 2, target +# CHECK: bgea- 0, target # encoding: [0x40,0xc0,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnla- target +# CHECK: bgelr- 2 # encoding: [0x4c,0xc8,0x00,0x20] + bnllr- 2 +# CHECK: bgelr- 0 # encoding: [0x4c,0xc0,0x00,0x20] + bnllr- +# CHECK: bgectr- 2 # encoding: [0x4c,0xc8,0x04,0x20] + bnlctr- 2 +# CHECK: bgectr- 0 # encoding: [0x4c,0xc0,0x04,0x20] + bnlctr- +# CHECK: bgel- 2, target # encoding: [0x40,0xc8,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnll- 2, target +# CHECK: bgel- 0, target # encoding: [0x40,0xc0,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnll- target +# CHECK: bgela- 2, target # encoding: [0x40,0xc8,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnlla- 2, target +# CHECK: bgela- 0, target # encoding: [0x40,0xc0,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnlla- target +# CHECK: bgelrl- 2 # encoding: [0x4c,0xc8,0x00,0x21] + bnllrl- 2 +# CHECK: bgelrl- 0 # encoding: [0x4c,0xc0,0x00,0x21] + bnllrl- +# CHECK: bgectrl- 2 # encoding: [0x4c,0xc8,0x04,0x21] + bnlctrl- 2 +# CHECK: bgectrl- 0 # encoding: [0x4c,0xc0,0x04,0x21] + bnlctrl- + # CHECK: bne 2, target # encoding: [0x40,0x8a,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bne 2, target @@ -445,6 +1089,88 @@ # CHECK: bnectrl 0 # encoding: [0x4c,0x82,0x04,0x21] bnectrl +# CHECK: bne+ 2, target # encoding: [0x40,0xea,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bne+ 2, target +# CHECK: bne+ 0, target # encoding: [0x40,0xe2,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bne+ target +# CHECK: bnea+ 2, target # encoding: [0x40,0xea,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnea+ 2, target +# CHECK: bnea+ 0, target # encoding: [0x40,0xe2,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnea+ target +# CHECK: bnelr+ 2 # encoding: [0x4c,0xea,0x00,0x20] + bnelr+ 2 +# CHECK: bnelr+ 0 # encoding: [0x4c,0xe2,0x00,0x20] + bnelr+ +# CHECK: bnectr+ 2 # encoding: [0x4c,0xea,0x04,0x20] + bnectr+ 2 +# CHECK: bnectr+ 0 # encoding: [0x4c,0xe2,0x04,0x20] + bnectr+ +# CHECK: bnel+ 2, target # encoding: [0x40,0xea,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnel+ 2, target +# CHECK: bnel+ 0, target # encoding: [0x40,0xe2,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnel+ target +# CHECK: bnela+ 2, target # encoding: [0x40,0xea,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnela+ 2, target +# CHECK: bnela+ 0, target # encoding: [0x40,0xe2,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnela+ target +# CHECK: bnelrl+ 2 # encoding: [0x4c,0xea,0x00,0x21] + bnelrl+ 2 +# CHECK: bnelrl+ 0 # encoding: [0x4c,0xe2,0x00,0x21] + bnelrl+ +# CHECK: bnectrl+ 2 # encoding: [0x4c,0xea,0x04,0x21] + bnectrl+ 2 +# CHECK: bnectrl+ 0 # encoding: [0x4c,0xe2,0x04,0x21] + bnectrl+ + +# CHECK: bne- 2, target # encoding: [0x40,0xca,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bne- 2, target +# CHECK: bne- 0, target # encoding: [0x40,0xc2,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bne- target +# CHECK: bnea- 2, target # encoding: [0x40,0xca,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnea- 2, target +# CHECK: bnea- 0, target # encoding: [0x40,0xc2,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnea- target +# CHECK: bnelr- 2 # encoding: [0x4c,0xca,0x00,0x20] + bnelr- 2 +# CHECK: bnelr- 0 # encoding: [0x4c,0xc2,0x00,0x20] + bnelr- +# CHECK: bnectr- 2 # encoding: [0x4c,0xca,0x04,0x20] + bnectr- 2 +# CHECK: bnectr- 0 # encoding: [0x4c,0xc2,0x04,0x20] + bnectr- +# CHECK: bnel- 2, target # encoding: [0x40,0xca,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnel- 2, target +# CHECK: bnel- 0, target # encoding: [0x40,0xc2,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnel- target +# CHECK: bnela- 2, target # encoding: [0x40,0xca,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnela- 2, target +# CHECK: bnela- 0, target # encoding: [0x40,0xc2,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnela- target +# CHECK: bnelrl- 2 # encoding: [0x4c,0xca,0x00,0x21] + bnelrl- 2 +# CHECK: bnelrl- 0 # encoding: [0x4c,0xc2,0x00,0x21] + bnelrl- +# CHECK: bnectrl- 2 # encoding: [0x4c,0xca,0x04,0x21] + bnectrl- 2 +# CHECK: bnectrl- 0 # encoding: [0x4c,0xc2,0x04,0x21] + bnectrl- + # CHECK: ble 2, target # encoding: [0x40,0x89,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bng 2, target @@ -486,6 +1212,88 @@ # CHECK: blectrl 0 # encoding: [0x4c,0x81,0x04,0x21] bngctrl +# CHECK: ble+ 2, target # encoding: [0x40,0xe9,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bng+ 2, target +# CHECK: ble+ 0, target # encoding: [0x40,0xe1,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bng+ target +# CHECK: blea+ 2, target # encoding: [0x40,0xe9,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnga+ 2, target +# CHECK: blea+ 0, target # encoding: [0x40,0xe1,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnga+ target +# CHECK: blelr+ 2 # encoding: [0x4c,0xe9,0x00,0x20] + bnglr+ 2 +# CHECK: blelr+ 0 # encoding: [0x4c,0xe1,0x00,0x20] + bnglr+ +# CHECK: blectr+ 2 # encoding: [0x4c,0xe9,0x04,0x20] + bngctr+ 2 +# CHECK: blectr+ 0 # encoding: [0x4c,0xe1,0x04,0x20] + bngctr+ +# CHECK: blel+ 2, target # encoding: [0x40,0xe9,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bngl+ 2, target +# CHECK: blel+ 0, target # encoding: [0x40,0xe1,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bngl+ target +# CHECK: blela+ 2, target # encoding: [0x40,0xe9,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bngla+ 2, target +# CHECK: blela+ 0, target # encoding: [0x40,0xe1,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bngla+ target +# CHECK: blelrl+ 2 # encoding: [0x4c,0xe9,0x00,0x21] + bnglrl+ 2 +# CHECK: blelrl+ 0 # encoding: [0x4c,0xe1,0x00,0x21] + bnglrl+ +# CHECK: blectrl+ 2 # encoding: [0x4c,0xe9,0x04,0x21] + bngctrl+ 2 +# CHECK: blectrl+ 0 # encoding: [0x4c,0xe1,0x04,0x21] + bngctrl+ + +# CHECK: ble- 2, target # encoding: [0x40,0xc9,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bng- 2, target +# CHECK: ble- 0, target # encoding: [0x40,0xc1,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bng- target +# CHECK: blea- 2, target # encoding: [0x40,0xc9,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnga- 2, target +# CHECK: blea- 0, target # encoding: [0x40,0xc1,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnga- target +# CHECK: blelr- 2 # encoding: [0x4c,0xc9,0x00,0x20] + bnglr- 2 +# CHECK: blelr- 0 # encoding: [0x4c,0xc1,0x00,0x20] + bnglr- +# CHECK: blectr- 2 # encoding: [0x4c,0xc9,0x04,0x20] + bngctr- 2 +# CHECK: blectr- 0 # encoding: [0x4c,0xc1,0x04,0x20] + bngctr- +# CHECK: blel- 2, target # encoding: [0x40,0xc9,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bngl- 2, target +# CHECK: blel- 0, target # encoding: [0x40,0xc1,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bngl- target +# CHECK: blela- 2, target # encoding: [0x40,0xc9,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bngla- 2, target +# CHECK: blela- 0, target # encoding: [0x40,0xc1,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bngla- target +# CHECK: blelrl- 2 # encoding: [0x4c,0xc9,0x00,0x21] + bnglrl- 2 +# CHECK: blelrl- 0 # encoding: [0x4c,0xc1,0x00,0x21] + bnglrl- +# CHECK: blectrl- 2 # encoding: [0x4c,0xc9,0x04,0x21] + bngctrl- 2 +# CHECK: blectrl- 0 # encoding: [0x4c,0xc1,0x04,0x21] + bngctrl- + # CHECK: bun 2, target # encoding: [0x41,0x8b,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bso 2, target @@ -527,6 +1335,88 @@ # CHECK: bunctrl 0 # encoding: [0x4d,0x83,0x04,0x21] bsoctrl +# CHECK: bun+ 2, target # encoding: [0x41,0xeb,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bso+ 2, target +# CHECK: bun+ 0, target # encoding: [0x41,0xe3,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bso+ target +# CHECK: buna+ 2, target # encoding: [0x41,0xeb,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bsoa+ 2, target +# CHECK: buna+ 0, target # encoding: [0x41,0xe3,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bsoa+ target +# CHECK: bunlr+ 2 # encoding: [0x4d,0xeb,0x00,0x20] + bsolr+ 2 +# CHECK: bunlr+ 0 # encoding: [0x4d,0xe3,0x00,0x20] + bsolr+ +# CHECK: bunctr+ 2 # encoding: [0x4d,0xeb,0x04,0x20] + bsoctr+ 2 +# CHECK: bunctr+ 0 # encoding: [0x4d,0xe3,0x04,0x20] + bsoctr+ +# CHECK: bunl+ 2, target # encoding: [0x41,0xeb,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bsol+ 2, target +# CHECK: bunl+ 0, target # encoding: [0x41,0xe3,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bsol+ target +# CHECK: bunla+ 2, target # encoding: [0x41,0xeb,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bsola+ 2, target +# CHECK: bunla+ 0, target # encoding: [0x41,0xe3,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bsola+ target +# CHECK: bunlrl+ 2 # encoding: [0x4d,0xeb,0x00,0x21] + bsolrl+ 2 +# CHECK: bunlrl+ 0 # encoding: [0x4d,0xe3,0x00,0x21] + bsolrl+ +# CHECK: bunctrl+ 2 # encoding: [0x4d,0xeb,0x04,0x21] + bsoctrl+ 2 +# CHECK: bunctrl+ 0 # encoding: [0x4d,0xe3,0x04,0x21] + bsoctrl+ + +# CHECK: bun- 2, target # encoding: [0x41,0xcb,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bso- 2, target +# CHECK: bun- 0, target # encoding: [0x41,0xc3,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bso- target +# CHECK: buna- 2, target # encoding: [0x41,0xcb,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bsoa- 2, target +# CHECK: buna- 0, target # encoding: [0x41,0xc3,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bsoa- target +# CHECK: bunlr- 2 # encoding: [0x4d,0xcb,0x00,0x20] + bsolr- 2 +# CHECK: bunlr- 0 # encoding: [0x4d,0xc3,0x00,0x20] + bsolr- +# CHECK: bunctr- 2 # encoding: [0x4d,0xcb,0x04,0x20] + bsoctr- 2 +# CHECK: bunctr- 0 # encoding: [0x4d,0xc3,0x04,0x20] + bsoctr- +# CHECK: bunl- 2, target # encoding: [0x41,0xcb,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bsol- 2, target +# CHECK: bunl- 0, target # encoding: [0x41,0xc3,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bsol- target +# CHECK: bunla- 2, target # encoding: [0x41,0xcb,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bsola- 2, target +# CHECK: bunla- 0, target # encoding: [0x41,0xc3,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bsola- target +# CHECK: bunlrl- 2 # encoding: [0x4d,0xcb,0x00,0x21] + bsolrl- 2 +# CHECK: bunlrl- 0 # encoding: [0x4d,0xc3,0x00,0x21] + bsolrl- +# CHECK: bunctrl- 2 # encoding: [0x4d,0xcb,0x04,0x21] + bsoctrl- 2 +# CHECK: bunctrl- 0 # encoding: [0x4d,0xc3,0x04,0x21] + bsoctrl- + # CHECK: bnu 2, target # encoding: [0x40,0x8b,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bns 2, target @@ -568,6 +1458,88 @@ # CHECK: bnuctrl 0 # encoding: [0x4c,0x83,0x04,0x21] bnsctrl +# CHECK: bnu+ 2, target # encoding: [0x40,0xeb,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bns+ 2, target +# CHECK: bnu+ 0, target # encoding: [0x40,0xe3,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bns+ target +# CHECK: bnua+ 2, target # encoding: [0x40,0xeb,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnsa+ 2, target +# CHECK: bnua+ 0, target # encoding: [0x40,0xe3,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnsa+ target +# CHECK: bnulr+ 2 # encoding: [0x4c,0xeb,0x00,0x20] + bnslr+ 2 +# CHECK: bnulr+ 0 # encoding: [0x4c,0xe3,0x00,0x20] + bnslr+ +# CHECK: bnuctr+ 2 # encoding: [0x4c,0xeb,0x04,0x20] + bnsctr+ 2 +# CHECK: bnuctr+ 0 # encoding: [0x4c,0xe3,0x04,0x20] + bnsctr+ +# CHECK: bnul+ 2, target # encoding: [0x40,0xeb,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnsl+ 2, target +# CHECK: bnul+ 0, target # encoding: [0x40,0xe3,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnsl+ target +# CHECK: bnula+ 2, target # encoding: [0x40,0xeb,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnsla+ 2, target +# CHECK: bnula+ 0, target # encoding: [0x40,0xe3,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnsla+ target +# CHECK: bnulrl+ 2 # encoding: [0x4c,0xeb,0x00,0x21] + bnslrl+ 2 +# CHECK: bnulrl+ 0 # encoding: [0x4c,0xe3,0x00,0x21] + bnslrl+ +# CHECK: bnuctrl+ 2 # encoding: [0x4c,0xeb,0x04,0x21] + bnsctrl+ 2 +# CHECK: bnuctrl+ 0 # encoding: [0x4c,0xe3,0x04,0x21] + bnsctrl+ + +# CHECK: bnu- 2, target # encoding: [0x40,0xcb,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bns- 2, target +# CHECK: bnu- 0, target # encoding: [0x40,0xc3,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bns- target +# CHECK: bnua- 2, target # encoding: [0x40,0xcb,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnsa- 2, target +# CHECK: bnua- 0, target # encoding: [0x40,0xc3,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnsa- target +# CHECK: bnulr- 2 # encoding: [0x4c,0xcb,0x00,0x20] + bnslr- 2 +# CHECK: bnulr- 0 # encoding: [0x4c,0xc3,0x00,0x20] + bnslr- +# CHECK: bnuctr- 2 # encoding: [0x4c,0xcb,0x04,0x20] + bnsctr- 2 +# CHECK: bnuctr- 0 # encoding: [0x4c,0xc3,0x04,0x20] + bnsctr- +# CHECK: bnul- 2, target # encoding: [0x40,0xcb,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnsl- 2, target +# CHECK: bnul- 0, target # encoding: [0x40,0xc3,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnsl- target +# CHECK: bnula- 2, target # encoding: [0x40,0xcb,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnsla- 2, target +# CHECK: bnula- 0, target # encoding: [0x40,0xc3,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnsla- target +# CHECK: bnulrl- 2 # encoding: [0x4c,0xcb,0x00,0x21] + bnslrl- 2 +# CHECK: bnulrl- 0 # encoding: [0x4c,0xc3,0x00,0x21] + bnslrl- +# CHECK: bnuctrl- 2 # encoding: [0x4c,0xcb,0x04,0x21] + bnsctrl- 2 +# CHECK: bnuctrl- 0 # encoding: [0x4c,0xc3,0x04,0x21] + bnsctrl- + # CHECK: bun 2, target # encoding: [0x41,0x8b,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bun 2, target @@ -609,6 +1581,88 @@ # CHECK: bunctrl 0 # encoding: [0x4d,0x83,0x04,0x21] bunctrl +# CHECK: bun+ 2, target # encoding: [0x41,0xeb,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bun+ 2, target +# CHECK: bun+ 0, target # encoding: [0x41,0xe3,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bun+ target +# CHECK: buna+ 2, target # encoding: [0x41,0xeb,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + buna+ 2, target +# CHECK: buna+ 0, target # encoding: [0x41,0xe3,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + buna+ target +# CHECK: bunlr+ 2 # encoding: [0x4d,0xeb,0x00,0x20] + bunlr+ 2 +# CHECK: bunlr+ 0 # encoding: [0x4d,0xe3,0x00,0x20] + bunlr+ +# CHECK: bunctr+ 2 # encoding: [0x4d,0xeb,0x04,0x20] + bunctr+ 2 +# CHECK: bunctr+ 0 # encoding: [0x4d,0xe3,0x04,0x20] + bunctr+ +# CHECK: bunl+ 2, target # encoding: [0x41,0xeb,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bunl+ 2, target +# CHECK: bunl+ 0, target # encoding: [0x41,0xe3,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bunl+ target +# CHECK: bunla+ 2, target # encoding: [0x41,0xeb,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bunla+ 2, target +# CHECK: bunla+ 0, target # encoding: [0x41,0xe3,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bunla+ target +# CHECK: bunlrl+ 2 # encoding: [0x4d,0xeb,0x00,0x21] + bunlrl+ 2 +# CHECK: bunlrl+ 0 # encoding: [0x4d,0xe3,0x00,0x21] + bunlrl+ +# CHECK: bunctrl+ 2 # encoding: [0x4d,0xeb,0x04,0x21] + bunctrl+ 2 +# CHECK: bunctrl+ 0 # encoding: [0x4d,0xe3,0x04,0x21] + bunctrl+ + +# CHECK: bun- 2, target # encoding: [0x41,0xcb,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bun- 2, target +# CHECK: bun- 0, target # encoding: [0x41,0xc3,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bun- target +# CHECK: buna- 2, target # encoding: [0x41,0xcb,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + buna- 2, target +# CHECK: buna- 0, target # encoding: [0x41,0xc3,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + buna- target +# CHECK: bunlr- 2 # encoding: [0x4d,0xcb,0x00,0x20] + bunlr- 2 +# CHECK: bunlr- 0 # encoding: [0x4d,0xc3,0x00,0x20] + bunlr- +# CHECK: bunctr- 2 # encoding: [0x4d,0xcb,0x04,0x20] + bunctr- 2 +# CHECK: bunctr- 0 # encoding: [0x4d,0xc3,0x04,0x20] + bunctr- +# CHECK: bunl- 2, target # encoding: [0x41,0xcb,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bunl- 2, target +# CHECK: bunl- 0, target # encoding: [0x41,0xc3,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bunl- target +# CHECK: bunla- 2, target # encoding: [0x41,0xcb,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bunla- 2, target +# CHECK: bunla- 0, target # encoding: [0x41,0xc3,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bunla- target +# CHECK: bunlrl- 2 # encoding: [0x4d,0xcb,0x00,0x21] + bunlrl- 2 +# CHECK: bunlrl- 0 # encoding: [0x4d,0xc3,0x00,0x21] + bunlrl- +# CHECK: bunctrl- 2 # encoding: [0x4d,0xcb,0x04,0x21] + bunctrl- 2 +# CHECK: bunctrl- 0 # encoding: [0x4d,0xc3,0x04,0x21] + bunctrl- + # CHECK: bnu 2, target # encoding: [0x40,0x8b,A,0bAAAAAA00] # CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 bnu 2, target @@ -650,6 +1704,88 @@ # CHECK: bnuctrl 0 # encoding: [0x4c,0x83,0x04,0x21] bnuctrl +# CHECK: bnu+ 2, target # encoding: [0x40,0xeb,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnu+ 2, target +# CHECK: bnu+ 0, target # encoding: [0x40,0xe3,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnu+ target +# CHECK: bnua+ 2, target # encoding: [0x40,0xeb,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnua+ 2, target +# CHECK: bnua+ 0, target # encoding: [0x40,0xe3,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnua+ target +# CHECK: bnulr+ 2 # encoding: [0x4c,0xeb,0x00,0x20] + bnulr+ 2 +# CHECK: bnulr+ 0 # encoding: [0x4c,0xe3,0x00,0x20] + bnulr+ +# CHECK: bnuctr+ 2 # encoding: [0x4c,0xeb,0x04,0x20] + bnuctr+ 2 +# CHECK: bnuctr+ 0 # encoding: [0x4c,0xe3,0x04,0x20] + bnuctr+ +# CHECK: bnul+ 2, target # encoding: [0x40,0xeb,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnul+ 2, target +# CHECK: bnul+ 0, target # encoding: [0x40,0xe3,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnul+ target +# CHECK: bnula+ 2, target # encoding: [0x40,0xeb,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnula+ 2, target +# CHECK: bnula+ 0, target # encoding: [0x40,0xe3,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnula+ target +# CHECK: bnulrl+ 2 # encoding: [0x4c,0xeb,0x00,0x21] + bnulrl+ 2 +# CHECK: bnulrl+ 0 # encoding: [0x4c,0xe3,0x00,0x21] + bnulrl+ +# CHECK: bnuctrl+ 2 # encoding: [0x4c,0xeb,0x04,0x21] + bnuctrl+ 2 +# CHECK: bnuctrl+ 0 # encoding: [0x4c,0xe3,0x04,0x21] + bnuctrl+ + +# CHECK: bnu- 2, target # encoding: [0x40,0xcb,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnu- 2, target +# CHECK: bnu- 0, target # encoding: [0x40,0xc3,A,0bAAAAAA00] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnu- target +# CHECK: bnua- 2, target # encoding: [0x40,0xcb,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnua- 2, target +# CHECK: bnua- 0, target # encoding: [0x40,0xc3,A,0bAAAAAA10] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnua- target +# CHECK: bnulr- 2 # encoding: [0x4c,0xcb,0x00,0x20] + bnulr- 2 +# CHECK: bnulr- 0 # encoding: [0x4c,0xc3,0x00,0x20] + bnulr- +# CHECK: bnuctr- 2 # encoding: [0x4c,0xcb,0x04,0x20] + bnuctr- 2 +# CHECK: bnuctr- 0 # encoding: [0x4c,0xc3,0x04,0x20] + bnuctr- +# CHECK: bnul- 2, target # encoding: [0x40,0xcb,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnul- 2, target +# CHECK: bnul- 0, target # encoding: [0x40,0xc3,A,0bAAAAAA01] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14 + bnul- target +# CHECK: bnula- 2, target # encoding: [0x40,0xcb,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnula- 2, target +# CHECK: bnula- 0, target # encoding: [0x40,0xc3,A,0bAAAAAA11] +# CHECK-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs + bnula- target +# CHECK: bnulrl- 2 # encoding: [0x4c,0xcb,0x00,0x21] + bnulrl- 2 +# CHECK: bnulrl- 0 # encoding: [0x4c,0xc3,0x00,0x21] + bnulrl- +# CHECK: bnuctrl- 2 # encoding: [0x4c,0xcb,0x04,0x21] + bnuctrl- 2 +# CHECK: bnuctrl- 0 # encoding: [0x4c,0xc3,0x04,0x21] + bnuctrl- + # FIXME: Condition register logical mnemonics # FIXME: Subtract mnemonics -- 2.11.0