diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-09-22 00:06:06 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-09-22 00:06:06 +0000 |
commit | 67032b27cddbb07134e128074bd23ae95384367c (patch) | |
tree | 10bcb8bbdaddec097c25552307fff4fca862f002 /lib/Target | |
parent | b430cecc0eeaa3f916b396b9f5fdee04cf306658 (diff) |
MIPS DSP: Add predicates and instruction template.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/Mips/MipsDSPInstrFormats.td | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsDSPInstrFormats.td b/lib/Target/Mips/MipsDSPInstrFormats.td new file mode 100644 index 0000000000..d9bcccc617 --- /dev/null +++ b/lib/Target/Mips/MipsDSPInstrFormats.td @@ -0,0 +1,25 @@ +//===- MipsDSPInstrFormats.td - Mips Instruction Formats ---*- tablegen -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +def HasDSP : Predicate<"Subtarget.hasDSP()">, + AssemblerPredicate<"FeatureDSP">; +def HasDSPR2 : Predicate<"Subtarget.hasDSPR2()">, + AssemblerPredicate<"FeatureDSPR2">; + +// Fields. +class Field6<bits<6> val> { + bits<6> V = val; +} + +def SPECIAL3_OPCODE : Field6<0b011111>; +def REGIMM_OPCODE : Field6<0b000001>; + +class DSPInst : MipsInst<(outs), (ins), "", [], NoItinerary, FrmOther> { + let Predicates = [HasDSP]; +} |