[llvm] r181152 - [XCore] Add BLRB instructions.
Richard Osborne
richard at xmos.com
Sun May 5 06:24:16 PDT 2013
Author: friedgold
Date: Sun May 5 08:24:16 2013
New Revision: 181152
URL: http://llvm.org/viewvc/llvm-project?rev=181152&view=rev
Log:
[XCore] Add BLRB instructions.
Modified:
llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td
llvm/trunk/test/MC/Disassembler/XCore/xcore.txt
Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td?rev=181152&r1=181151&r2=181152&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td (original)
+++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Sun May 5 08:24:16 2013
@@ -169,6 +169,9 @@ def ldawb : PatFrag<(ops node:$addr, nod
// Instruction operand types
def calltarget : Operand<i32>;
+def calltarget_neg : Operand<i32> {
+ let DecoderMethod = "DecodeNegImmOperand";
+}
def brtarget : Operand<OtherVT>;
def brtarget_neg : Operand<OtherVT> {
let DecoderMethod = "DecodeNegImmOperand";
@@ -677,6 +680,10 @@ def BLRF_u10 : _FU10<0b110100, (outs), (
def BLRF_lu10 : _FLU10<0b110100, (outs), (ins calltarget:$a), "bl $a",
[(XCoreBranchLink immU20:$a)]>;
+
+def BLRB_u10 : _FU10<0b110101, (outs), (ins calltarget_neg:$a), "bl $a", []>;
+
+def BLRB_lu10 : _FLU10<0b110101, (outs), (ins calltarget_neg:$a), "bl $a", []>;
}
let Defs = [R11], mayLoad = 1, isReMaterializable = 1,
Modified: llvm/trunk/test/MC/Disassembler/XCore/xcore.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/XCore/xcore.txt?rev=181152&r1=181151&r2=181152&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/XCore/xcore.txt (original)
+++ llvm/trunk/test/MC/Disassembler/XCore/xcore.txt Sun May 5 08:24:16 2013
@@ -654,6 +654,12 @@
# CHECK: bl 38631
0x25 0xf0 0xe7 0xd2
+# CHECK: bl -222
+0xde 0xd4
+
+# CHECK: bl -55132
+0x35 0xf0 0x5c 0xd7
+
# CHECK: bla cp[500]
0xf4 0xe1
More information about the llvm-commits
mailing list