diff options
author | Richard Osborne <richard@xmos.com> | 2012-12-17 12:29:31 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2012-12-17 12:29:31 +0000 |
commit | 1ffe48a84b398e8cebbdc7a47bedb57e1e67e63f (patch) | |
tree | a020a503df18b88f6a91b16cc5a306b2acbffcd4 /lib/Target/XCore/XCoreInstrFormats.td | |
parent | dd78daa199f653b64b997fdee46db8964e5c50cc (diff) | |
download | llvm-1ffe48a84b398e8cebbdc7a47bedb57e1e67e63f.tar.gz llvm-1ffe48a84b398e8cebbdc7a47bedb57e1e67e63f.tar.bz2 llvm-1ffe48a84b398e8cebbdc7a47bedb57e1e67e63f.tar.xz |
Add instruction encodings / disassembly support for 2r instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreInstrFormats.td')
-rw-r--r-- | lib/Target/XCore/XCoreInstrFormats.td | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/Target/XCore/XCoreInstrFormats.td b/lib/Target/XCore/XCoreInstrFormats.td index c120240d6e..f5724da27b 100644 --- a/lib/Target/XCore/XCoreInstrFormats.td +++ b/lib/Target/XCore/XCoreInstrFormats.td @@ -73,8 +73,23 @@ class _FLU10<dag outs, dag ins, string asmstr, list<dag> pattern> : InstXCore<4, outs, ins, asmstr, pattern> { } -class _F2R<dag outs, dag ins, string asmstr, list<dag> pattern> +class _F2R<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 = "Decode2RInstruction"; +} + +// 2R with first operand as both a source and a destination. +class _F2RSrcDst<bits<6> opc, dag outs, dag ins, string asmstr, + list<dag> pattern> : _F2R<opc, outs, ins, asmstr, pattern> { + let DecoderMethod = "Decode2RSrcDstInstruction"; +} + +// Same as 2R with last two operands swapped +class _FR2R<bits<6> opc, dag outs, dag ins, string asmstr, list<dag> pattern> + : _F2R<opc, outs, ins, asmstr, pattern> { + let DecoderMethod = "DecodeR2RInstruction"; } class _FRUS<dag outs, dag ins, string asmstr, list<dag> pattern> |