diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2010-05-01 12:04:22 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2010-05-01 12:04:22 +0000 |
commit | 6fbff448932b7e1861a135b441e1ecc777adf990 (patch) | |
tree | 44c286bf85059cbca4412a95df1641a0bf39d718 /llvm/lib | |
parent | 9eecafa480ac52afdda1a6761111c694a26d92d6 (diff) | |
download | bcm5719-llvm-6fbff448932b7e1861a135b441e1ecc777adf990.tar.gz bcm5719-llvm-6fbff448932b7e1861a135b441e1ecc777adf990.zip |
Long branch target oparands are not pc-rel.
This should fix PR6603.
llvm-svn: 102834
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/MSP430/MSP430InstrInfo.td | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Target/MSP430/MSP430InstrInfo.td b/llvm/lib/Target/MSP430/MSP430InstrInfo.td index 144ba26cfeb..37129e37ef8 100644 --- a/llvm/lib/Target/MSP430/MSP430InstrInfo.td +++ b/llvm/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 |