aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCInstrInfo.td
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-11-16 00:48:01 +0000
committerNate Begeman <natebegeman@mac.com>2005-11-16 00:48:01 +0000
commit422b0cee7a32636303398d8788f98a59bf15381c (patch)
treeded4c66bb7c76b6ac954d1a5cbea8fb7d316b7b1 /lib/Target/PowerPC/PPCInstrInfo.td
parent427189ad5108f34126316cd475ff236ab0fb41f8 (diff)
downloadexternal_llvm-422b0cee7a32636303398d8788f98a59bf15381c.zip
external_llvm-422b0cee7a32636303398d8788f98a59bf15381c.tar.gz
external_llvm-422b0cee7a32636303398d8788f98a59bf15381c.tar.bz2
Patch to clean up function call pseudos and support the BLA instruction,
which branches to an absolute address. This is required to support objc direct dispatch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrInfo.td')
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td
index 73362a9..f65de61 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/lib/Target/PowerPC/PPCInstrInfo.td
@@ -128,6 +128,9 @@ def s16immX4 : Operand<i32> { // Multiply imm by 4 before printing.
def target : Operand<i32> {
let PrintMethod = "printBranchOperand";
}
+def aaddr : Operand<i32> {
+ let PrintMethod = "printAbsAddrOperand";
+}
def piclabel: Operand<i32> {
let PrintMethod = "printPICLabel";
}
@@ -186,9 +189,6 @@ let isBranch = 1, isTerminator = 1 in {
target:$true, target:$false),
"; COND_BRANCH", []>;
def B : IForm<18, 0, 0, (ops target:$func), "b $func", BrB>;
-//def BA : IForm<18, 1, 0, (ops target:$func), "ba $func", BrB>;
- def BL : IForm<18, 0, 1, (ops target:$func), "bl $func", BrB>;
-//def BLA : IForm<18, 1, 1, (ops target:$func), "bla $func", BrB>;
// FIXME: 4*CR# needs to be added to the BI field!
// This will only work for CR0 as it stands now
@@ -217,10 +217,9 @@ let isCall = 1,
LR,CTR,
CR0,CR1,CR5,CR6,CR7] in {
// Convenient aliases for call instructions
- def CALLpcrel : IForm<18, 0, 1, (ops target:$func, variable_ops),
- "bl $func", BrB>;
- def CALLindirect : XLForm_2_ext<19, 528, 20, 0, 1,
- (ops variable_ops), "bctrl", BrB>;
+ def BL : IForm<18, 0, 1, (ops target:$func, variable_ops), "bl $func", BrB>;
+ def BLA : IForm<18, 1, 1, (ops aaddr:$func, variable_ops), "bla $func", BrB>;
+ def BCTRL : XLForm_2_ext<19, 528, 20, 0, 1, (ops variable_ops), "bctrl", BrB>;
}
// D-Form instructions. Most instructions that perform an operation on a