diff options
author | Akira Hatanaka <ahatanak@gmail.com> | 2011-08-17 02:05:42 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanak@gmail.com> | 2011-08-17 02:05:42 +0000 |
commit | bb15e117d328bd991b0723dd1b586c8437d9dced (patch) | |
tree | 87780965eb2b837e47dc2a2e17763b2de7277350 /lib/Target/Mips/MipsInstrFormats.td | |
parent | a69179d7689bf302f3c7e04ee83c460e69b96b94 (diff) | |
download | llvm-bb15e117d328bd991b0723dd1b586c8437d9dced.tar.gz llvm-bb15e117d328bd991b0723dd1b586c8437d9dced.tar.bz2 llvm-bb15e117d328bd991b0723dd1b586c8437d9dced.tar.xz |
Add support for ext and ins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrFormats.td')
-rw-r--r-- | lib/Target/Mips/MipsInstrFormats.td | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsInstrFormats.td b/lib/Target/Mips/MipsInstrFormats.td index 9f55fb38b9..fd6422048d 100644 --- a/lib/Target/Mips/MipsInstrFormats.td +++ b/lib/Target/Mips/MipsInstrFormats.td @@ -102,6 +102,28 @@ class FJ<bits<6> op, dag outs, dag ins, string asmstr, list<dag> pattern, let Inst{25-0} = addr; } +// Ext and Ins +class ExtIns<bits<6> _funct, string instr_asm, dag Outs, dag Ins, + list<dag> pattern, InstrItinClass itin>: + MipsInst<Outs, Ins, !strconcat(instr_asm, "\t$dst, $src, $pos, $size"), + pattern, itin> +{ + bits<5> rt; + bits<5> rs; + bits<5> sz; + bits<5> pos; + bits<6> funct; + + let opcode = 0x1f; + let funct = _funct; + + let Inst{25-21} = rs; + let Inst{20-16} = rt; + let Inst{15-11} = sz; + let Inst{10-6} = pos; + let Inst{5-0} = funct; +} + //===----------------------------------------------------------------------===// // // FLOATING POINT INSTRUCTION FORMATS |