aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/XCore/XCoreInstrFormats.td
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2012-12-17 13:50:04 +0000
committerRichard Osborne <richard@xmos.com>2012-12-17 13:50:04 +0000
commit35150cbf4166ae8d69032d355f1e8d83b4a6eb3c (patch)
treec2e54c7213d750760d601f6d230c784464d05993 /lib/Target/XCore/XCoreInstrFormats.td
parent7f7d201d737ecb354abd683d63ab8abbf83158c3 (diff)
downloadexternal_llvm-35150cbf4166ae8d69032d355f1e8d83b4a6eb3c.zip
external_llvm-35150cbf4166ae8d69032d355f1e8d83b4a6eb3c.tar.gz
external_llvm-35150cbf4166ae8d69032d355f1e8d83b4a6eb3c.tar.bz2
Add instruction encodings / disassembly support for rus instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreInstrFormats.td')
-rw-r--r--lib/Target/XCore/XCoreInstrFormats.td20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/Target/XCore/XCoreInstrFormats.td b/lib/Target/XCore/XCoreInstrFormats.td
index f5724da..cccadae 100644
--- a/lib/Target/XCore/XCoreInstrFormats.td
+++ b/lib/Target/XCore/XCoreInstrFormats.td
@@ -92,8 +92,26 @@ class _FR2R<bits<6> opc, dag outs, dag ins, string asmstr, list<dag> pattern>
let DecoderMethod = "DecodeR2RInstruction";
}
-class _FRUS<dag outs, dag ins, string asmstr, list<dag> pattern>
+class _FRUS<bits<6> opc, dag outs, dag ins, string asmstr, list<dag> pattern>
: InstXCore<2, outs, ins, asmstr, pattern> {
+ let Inst{15-11} = opc{5-1};
+ let Inst{4} = opc{0};
+ let DecoderMethod = "DecodeRUSInstruction";
+}
+
+// RUS with bitp operand
+class _FRUSBitp<bits<6> opc, dag outs, dag ins, string asmstr,
+ list<dag> pattern>
+ : _FRUS<opc, outs, ins, asmstr, pattern> {
+ let DecoderMethod = "DecodeRUSBitpInstruction";
+}
+
+// RUS with first operand as both a source and a destination and a bitp second
+// operand
+class _FRUSSrcDstBitp<bits<6> opc, dag outs, dag ins, string asmstr,
+ list<dag> pattern>
+ : _FRUS<opc, outs, ins, asmstr, pattern> {
+ let DecoderMethod = "DecodeRUSSrcDstBitpInstruction";
}
class _FL2R<dag outs, dag ins, string asmstr, list<dag> pattern>