From 35150cbf4166ae8d69032d355f1e8d83b4a6eb3c Mon Sep 17 00:00:00 2001 From: Richard Osborne Date: Mon, 17 Dec 2012 13:50:04 +0000 Subject: 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 --- lib/Target/XCore/XCoreInstrFormats.td | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'lib/Target/XCore/XCoreInstrFormats.td') 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 opc, dag outs, dag ins, string asmstr, list pattern> let DecoderMethod = "DecodeR2RInstruction"; } -class _FRUS pattern> +class _FRUS opc, dag outs, dag ins, string asmstr, list 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 opc, dag outs, dag ins, string asmstr, + list pattern> + : _FRUS { + let DecoderMethod = "DecodeRUSBitpInstruction"; +} + +// RUS with first operand as both a source and a destination and a bitp second +// operand +class _FRUSSrcDstBitp opc, dag outs, dag ins, string asmstr, + list pattern> + : _FRUS { + let DecoderMethod = "DecodeRUSSrcDstBitpInstruction"; } class _FL2R pattern> -- cgit v1.1