[llvm-commits] [llvm] r102834 - /llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td
Anton Korobeynikov
asl at math.spbu.ru
Sat May 1 05:04:22 PDT 2010
Author: asl
Date: Sat May 1 07:04:22 2010
New Revision: 102834
URL: http://llvm.org/viewvc/llvm-project?rev=102834&view=rev
Log:
Long branch target oparands are not pc-rel.
This should fix PR6603.
Modified:
llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td
Modified: llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td?rev=102834&r1=102833&r2=102834&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430InstrInfo.td Sat May 1 07:04:22 2010
@@ -77,7 +77,10 @@
}
// 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 @@
// 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 @@
// 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
More information about the llvm-commits
mailing list