aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Target/XCore/XCoreInstrInfo.td7
-rw-r--r--test/MC/Disassembler/XCore/xcore.txt6
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/Target/XCore/XCoreInstrInfo.td b/lib/Target/XCore/XCoreInstrInfo.td
index 9bb61c8..2be1ce2 100644
--- a/lib/Target/XCore/XCoreInstrInfo.td
+++ b/lib/Target/XCore/XCoreInstrInfo.td
@@ -169,6 +169,9 @@ def ldawb : PatFrag<(ops node:$addr, node:$offset),
// 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), (ins calltarget:$a), "bl $a",
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,
diff --git a/test/MC/Disassembler/XCore/xcore.txt b/test/MC/Disassembler/XCore/xcore.txt
index d509aff..311ca16 100644
--- a/test/MC/Disassembler/XCore/xcore.txt
+++ b/test/MC/Disassembler/XCore/xcore.txt
@@ -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