Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/Target/PowerPC/P10InstrResources.td
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def : InstRW<[P10W_BR_2C, P10W_DISP_ANY, P10BR_Read],
(instrs
B, BCC, BCCA, BCCCTR, BCCCTR8, BCCCTRL, BCCCTRL8, BCCL, BCCLA, BCCLR, BCCLRL, CTRL_DEP, TAILB, TAILB8,
BA, TAILBA, TAILBA8, BCCTR, BCCTR8, gBCCTR,
BCCTRL, BCCTRL8, gBCCTRL, BCLR, gBCLR, BCLRL, gBCLRL,
BCCTRL, BCCTRL8, gBCCTRL, gBCTAR, gBCTARL, BCLR, gBCLR, BCLRL, gBCLRL,
BL, BL8, BL8_NOP, BL8_NOP_RM, BL8_NOP_TLS, BL8_NOTOC, BL8_NOTOC_RM, BL8_NOTOC_TLS, BL8_RM, BL8_TLS, BL8_TLS_, BLR, BLR8, BLRL, BL_NOP, BL_NOP_RM, BL_RM, BL_TLS,
BLA, BLA8, BLA8_NOP, BLA8_NOP_RM, BLA8_RM, BLA_RM
)>;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/PowerPC/P9InstrResources.td
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ def : InstRW<[P9_BR_2C, DISP_BR_1C],
(instregex "BLR(8|L)?$"),
(instregex "TAILB(A)?(8)?$"),
(instregex "TAILBCTR(8)?$"),
(instregex "gBC(A|Aat|CTR|CTRL|L|LA|LAat|LR|LRL|Lat|at)?$"),
(instregex "gBC(A|Aat|CTR|CTRL|L|LA|LAat|LR|LRL|Lat|TAR|TARL|at)?$"),
(instregex "BCLR(L)?(n)?$"),
(instregex "BCTR(L)?(8)?(_RM)?$"),
B,
Expand Down
15 changes: 14 additions & 1 deletion llvm/lib/Target/PowerPC/PPCInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ def HasExtDiv : Predicate<"Subtarget->hasExtDiv()">,
def IsISA2_06 : Predicate<"Subtarget->isISA2_06()">,
AssemblerPredicate<(all_of FeatureBPERMD), "bpermd">;
def IsISA2_07 : Predicate<"Subtarget->isISA2_07()">,
AssemblerPredicate<(all_of FeatureExtDiv), "extdiv">;
AssemblerPredicate<(all_of FeatureISA2_07), "isa2_07">;
def IsISA3_0 : Predicate<"Subtarget->isISA3_0()">,
AssemblerPredicate<(all_of FeatureISA2_06), "isa2_06">;
def HasFPU : Predicate<"Subtarget->hasFPU()">,
Expand Down Expand Up @@ -4835,6 +4835,15 @@ let PPC970_Unit = 7, isBranch = 1, hasSideEffects = 0 in {
def gBCCTRL : XLForm_2<19, 528, 1, (outs),
(ins u5imm:$BO, crbitrc:$BI, i32imm:$BH),
"bcctrl $BO, $BI, $BH", IIC_BrB, []>;
let Predicates = [IsISA2_07], Uses = [TAR], isIndirectBranch = 1 in {
def gBCTAR : XLForm_2<19, 560, 0, (outs),
(ins u5imm:$BO, crbitrc:$BI, u2imm:$BH),
"bctar $BO, $BI, $BH", IIC_BrB, []>;
let Defs = [LR], isCall = 1 in
def gBCTARL : XLForm_2<19, 560, 1, (outs),
(ins u5imm:$BO, crbitrc:$BI, u2imm:$BH),
"bctarl $BO, $BI, $BH", IIC_BrB, []>;
}
}

multiclass BranchSimpleMnemonicAT<string pm, int at> {
Expand Down Expand Up @@ -4915,6 +4924,10 @@ def : InstAlias<"blr", (gBCLR 20, CR0LT, 0)>;
def : InstAlias<"blrl", (gBCLRL 20, CR0LT, 0)>;
def : InstAlias<"bctr", (gBCCTR 20, CR0LT, 0)>;
def : InstAlias<"bctrl", (gBCCTRL 20, CR0LT, 0)>;
let Predicates = [IsISA2_07] in {
def : InstAlias<"btar", (gBCTAR 20, CR0LT, 0)>;
def : InstAlias<"btarl", (gBCTARL 20, CR0LT, 0)>;
}

multiclass BranchExtendedMnemonicPM<string name, string pm, int bibo> {
def : InstAlias<"b"#name#pm#" $cc, $dst",
Expand Down
4 changes: 4 additions & 0 deletions llvm/lib/Target/PowerPC/PPCRegisterInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ def CTR8 : SPR<9, "ctr">, DwarfRegNum<[66, -2]> {
let Aliases = [CTR];
}

def TAR : SPR<815, "tar"> {
let PositionOrder = 1;
}

// VRsave register
def VRSAVE: SPR<256, "vrsave">, DwarfRegNum<[109]>;

Expand Down