[llvm-branch-commits] [llvm-branch] r164508 - in /llvm/branches/R600/lib/Target/Mips: Mips.td MipsSubtarget.h

Tom Stellard thomas.stellard at amd.com
Mon Sep 24 08:53:35 PDT 2012


Author: tstellar
Date: Mon Sep 24 10:51:53 2012
New Revision: 164508

URL: http://llvm.org/viewvc/llvm-project?rev=164508&view=rev
Log:
Add flags and feature bits for mips dsp.

Modified:
    llvm/branches/R600/lib/Target/Mips/Mips.td
    llvm/branches/R600/lib/Target/Mips/MipsSubtarget.h

Modified: llvm/branches/R600/lib/Target/Mips/Mips.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/Target/Mips/Mips.td?rev=164508&r1=164507&r2=164508&view=diff
==============================================================================
--- llvm/branches/R600/lib/Target/Mips/Mips.td (original)
+++ llvm/branches/R600/lib/Target/Mips/Mips.td Mon Sep 24 10:51:53 2012
@@ -77,6 +77,10 @@
 def FeatureMips16  : SubtargetFeature<"mips16", "InMips16Mode", "true",
                                       "Mips16 mode">;
 
+def FeatureDSP : SubtargetFeature<"dsp", "HasDSP", "true", "Mips DSP ASE">;
+def FeatureDSPR2 : SubtargetFeature<"dspr2", "HasDSPR2", "true",
+                                    "Mips DSP-R2 ASE", [FeatureDSP]>;
+
 //===----------------------------------------------------------------------===//
 // Mips processors supported.
 //===----------------------------------------------------------------------===//

Modified: llvm/branches/R600/lib/Target/Mips/MipsSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/Target/Mips/MipsSubtarget.h?rev=164508&r1=164507&r2=164508&view=diff
==============================================================================
--- llvm/branches/R600/lib/Target/Mips/MipsSubtarget.h (original)
+++ llvm/branches/R600/lib/Target/Mips/MipsSubtarget.h Mon Sep 24 10:51:53 2012
@@ -92,6 +92,9 @@
   // InMips16 -- can process Mips16 instructions
   bool InMips16Mode;
 
+  // HasDSP, HasDSPR2 -- supports DSP ASE.
+  bool HasDSP, HasDSPR2;
+
   // IsAndroid -- target is android
   bool IsAndroid;
 
@@ -134,6 +137,8 @@
   bool isNotSingleFloat() const { return !IsSingleFloat; }
   bool hasVFPU() const { return HasVFPU; }
   bool inMips16Mode() const { return InMips16Mode; }
+  bool hasDSP() const { return HasDSP; }
+  bool hasDSPR2() const { return HasDSPR2; }
   bool isAndroid() const { return IsAndroid; }
   bool isLinux() const { return IsLinux; }
   bool useSmallSection() const { return UseSmallSection; }





More information about the llvm-branch-commits mailing list