aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsInstrFormats.td
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-12-21 23:21:32 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-12-21 23:21:32 +0000
commitdbf51ee4596791d8cf38538b80805b2c3a577836 (patch)
tree37e32fca4ebc224a7c9c6ceab9b5ae2f171486d0 /lib/Target/Mips/MipsInstrFormats.td
parente8bc10b902f15eb4a12b810d5ab06a2755e7f990 (diff)
[mips] Refactor subword-swap, EXT/INS, load-effective-address and read-hardware
instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrFormats.td')
-rw-r--r--lib/Target/Mips/MipsInstrFormats.td34
1 files changed, 32 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsInstrFormats.td b/lib/Target/Mips/MipsInstrFormats.td
index b21b107180..5edaf18fc4 100644
--- a/lib/Target/Mips/MipsInstrFormats.td
+++ b/lib/Target/Mips/MipsInstrFormats.td
@@ -326,7 +326,7 @@ class MTLO_FM<bits<6> funct> {
let Inst{5-0} = funct;
}
-class SEB_FM<bits<5> funct> {
+class SEB_FM<bits<5> funct, bits<6> funct2> {
bits<5> rd;
bits<5> rt;
@@ -337,7 +337,7 @@ class SEB_FM<bits<5> funct> {
let Inst{20-16} = rt;
let Inst{15-11} = rd;
let Inst{10-6} = funct;
- let Inst{5-0} = 0x20;
+ let Inst{5-0} = funct2;
}
class CLO_FM<bits<6> funct> {
@@ -433,6 +433,36 @@ class MULT_FM<bits<6> op, bits<6> funct> {
let Inst{5-0} = funct;
}
+class EXT_FM<bits<6> funct> {
+ bits<5> rt;
+ bits<5> rs;
+ bits<5> pos;
+ bits<5> size;
+
+ bits<32> Inst;
+
+ let Inst{31-26} = 0x1f;
+ let Inst{25-21} = rs;
+ let Inst{20-16} = rt;
+ let Inst{15-11} = size;
+ let Inst{10-6} = pos;
+ let Inst{5-0} = funct;
+}
+
+class RDHWR_FM {
+ bits<5> rt;
+ bits<5> rd;
+
+ bits<32> Inst;
+
+ let Inst{31-26} = 0x1f;
+ let Inst{25-21} = 0;
+ let Inst{20-16} = rt;
+ let Inst{15-11} = rd;
+ let Inst{10-6} = 0;
+ let Inst{5-0} = 0x3b;
+}
+
//===----------------------------------------------------------------------===//
//
// FLOATING POINT INSTRUCTION FORMATS