aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips/MipsInstrFormats.td
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-12-21 22:43:58 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-12-21 22:43:58 +0000
commit35242e27c578da3915451079b5bdd7b9a89ed77c (patch)
tree8d9ce6cfd27ec45b8d3ac95ed7a2725f0b7e4068 /lib/Target/Mips/MipsInstrFormats.td
parent8aaed99a99fcb879be2ed9bbc25a68c2e8558960 (diff)
downloadexternal_llvm-35242e27c578da3915451079b5bdd7b9a89ed77c.zip
external_llvm-35242e27c578da3915451079b5bdd7b9a89ed77c.tar.gz
external_llvm-35242e27c578da3915451079b5bdd7b9a89ed77c.tar.bz2
[mips] Refactor count leading zero or one instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170942 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 89bcd38..8dad6c2 100644
--- a/lib/Target/Mips/MipsInstrFormats.td
+++ b/lib/Target/Mips/MipsInstrFormats.td
@@ -340,6 +340,22 @@ class SEB_FM<bits<5> funct> {
let Inst{5-0} = 0x20;
}
+class CLO_FM<bits<6> funct> {
+ bits<5> rd;
+ bits<5> rs;
+ bits<5> rt;
+
+ bits<32> Inst;
+
+ let Inst{31-26} = 0x1c;
+ let Inst{25-21} = rs;
+ let Inst{20-16} = rt;
+ let Inst{15-11} = rd;
+ let Inst{10-6} = 0;
+ let Inst{5-0} = funct;
+ let rt = rd;
+}
+
//===----------------------------------------------------------------------===//
//
// FLOATING POINT INSTRUCTION FORMATS