diff options
author | Richard Osborne <richard@xmos.com> | 2013-01-25 21:55:32 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2013-01-25 21:55:32 +0000 |
commit | c47bd9899b639c3384268f871009259c2a94fba4 (patch) | |
tree | d5bf626d2c49ebd3db8ef4478b9f1e532ed26367 /lib/Target/XCore/XCoreInstrFormats.td | |
parent | c655c43ba54990535cf7f374ed78f4fd5bdee093 (diff) | |
download | llvm-c47bd9899b639c3384268f871009259c2a94fba4.tar.gz llvm-c47bd9899b639c3384268f871009259c2a94fba4.tar.bz2 llvm-c47bd9899b639c3384268f871009259c2a94fba4.tar.xz |
Add instruction encodings / disassembly support for l4r instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreInstrFormats.td')
-rw-r--r-- | lib/Target/XCore/XCoreInstrFormats.td | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/Target/XCore/XCoreInstrFormats.td b/lib/Target/XCore/XCoreInstrFormats.td index 624036205c..8dceb30b0d 100644 --- a/lib/Target/XCore/XCoreInstrFormats.td +++ b/lib/Target/XCore/XCoreInstrFormats.td @@ -218,8 +218,29 @@ class _F0R<bits<10> opc, dag outs, dag ins, string asmstr, list<dag> pattern> let Inst{4-0} = opc{4-0}; } -class _L4R<dag outs, dag ins, string asmstr, list<dag> pattern> +class _FL4R<bits<6> opc, dag outs, dag ins, string asmstr, list<dag> pattern> : InstXCore<4, outs, ins, asmstr, pattern> { + bits<4> d; + + let Inst{31-27} = opc{5-1}; + let Inst{26-21} = 0b111111; + let Inst{20} = opc{0}; + let Inst{19-16} = d; + let Inst{15-11} = 0b11111; +} + +// L4R with 4th operand as both a source and a destination. +class _FL4RSrcDst<bits<6> opc, dag outs, dag ins, string asmstr, + list<dag> pattern> + : _FL4R<opc, outs, ins, asmstr, pattern> { + let DecoderMethod = "DecodeL4RSrcDstInstruction"; +} + +// L4R with 1st and 4th operand as both a source and a destination. +class _FL4RSrcDstSrcDst<bits<6> opc, dag outs, dag ins, string asmstr, + list<dag> pattern> + : _FL4R<opc, outs, ins, asmstr, pattern> { + let DecoderMethod = "DecodeL4RSrcDstSrcDstInstruction"; } class _FL5R<bits<6> opc, dag outs, dag ins, string asmstr, list<dag> pattern> |