summaryrefslogtreecommitdiff
path: root/lib/Target/MSP430/MSP430InstrInfo.td
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2010-05-01 12:04:22 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2010-05-01 12:04:22 +0000
commit650a8e49f9f1984017b8995fc4a13058e553e6ce (patch)
treef8858925ddb178ccbdddb8487c56fb9089f5437d /lib/Target/MSP430/MSP430InstrInfo.td
parent1b4a38646f6bbeb32a125a1f2316a7b2d27916d7 (diff)
downloadllvm-650a8e49f9f1984017b8995fc4a13058e553e6ce.tar.gz
llvm-650a8e49f9f1984017b8995fc4a13058e553e6ce.tar.bz2
llvm-650a8e49f9f1984017b8995fc4a13058e553e6ce.tar.xz
Long branch target oparands are not pc-rel.
This should fix PR6603. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430/MSP430InstrInfo.td')
-rw-r--r--lib/Target/MSP430/MSP430InstrInfo.td10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/MSP430/MSP430InstrInfo.td b/lib/Target/MSP430/MSP430InstrInfo.td
index 144ba26cfe..37129e37ef 100644
--- a/lib/Target/MSP430/MSP430InstrInfo.td
+++ b/lib/Target/MSP430/MSP430InstrInfo.td
@@ -77,7 +77,10 @@ def memdst : Operand<i16> {
}
// Branch targets have OtherVT type.
-def brtarget : Operand<OtherVT> {
+def brtarget : Operand<OtherVT>;
+
+// Short jump targets have OtherVT type and are printed as pcrel imm values.
+def jmptarget : Operand<OtherVT> {
let PrintMethod = "printPCRelImmOperand";
}
@@ -169,8 +172,7 @@ let isBranch = 1, isTerminator = 1 in {
// Direct branch
let isBarrier = 1 in {
// Short branch
- def JMP : CJForm<0, 0,
- (outs), (ins brtarget:$dst),
+ def JMP : CJForm<0, 0, (outs), (ins jmptarget:$dst),
"jmp\t$dst",
[(br bb:$dst)]>;
// Long branch
@@ -183,7 +185,7 @@ let isBarrier = 1 in {
// Conditional branches
let Uses = [SRW] in
def JCC : CJForm<0, 0,
- (outs), (ins brtarget:$dst, cc:$cc),
+ (outs), (ins jmptarget:$dst, cc:$cc),
"j$cc\t$dst",
[(MSP430brcc bb:$dst, imm:$cc)]>;
} // isBranch, isTerminator