summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsInstrFormats.td
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-12-20 03:48:24 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-12-20 03:48:24 +0000
commitcdc0c59d1ed5ac6c616b8899222d1e102ccd9f8d (patch)
tree5ae6b951369743d61bb912a2b66cc2b65ea5414f /lib/Target/Mips/MipsInstrFormats.td
parent0dad34a9bf850132e9ec84397f13604143c3aeff (diff)
downloadllvm-cdc0c59d1ed5ac6c616b8899222d1e102ccd9f8d.tar.gz
llvm-cdc0c59d1ed5ac6c616b8899222d1e102ccd9f8d.tar.bz2
llvm-cdc0c59d1ed5ac6c616b8899222d1e102ccd9f8d.tar.xz
[mips] Refactor shift instructions with register operands. Separate encoding
information from the rest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrFormats.td')
-rw-r--r--lib/Target/Mips/MipsInstrFormats.td16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsInstrFormats.td b/lib/Target/Mips/MipsInstrFormats.td
index 585b63b7e6..512dcff28f 100644
--- a/lib/Target/Mips/MipsInstrFormats.td
+++ b/lib/Target/Mips/MipsInstrFormats.td
@@ -236,6 +236,22 @@ class SRA_FM<bits<6> funct, bit rotate> {
let Inst{5-0} = funct;
}
+class SRLV_FM<bits<6> funct, bit rotate> {
+ bits<5> rd;
+ bits<5> rt;
+ bits<5> rs;
+
+ bits<32> Inst;
+
+ let Inst{31-26} = 0;
+ let Inst{25-21} = rs;
+ let Inst{20-16} = rt;
+ let Inst{15-11} = rd;
+ let Inst{10-7} = 0;
+ let Inst{6} = rotate;
+ let Inst{5-0} = funct;
+}
+
//===----------------------------------------------------------------------===//
//
// FLOATING POINT INSTRUCTION FORMATS