Add attribute name and type to SubtargetFeatures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey 2005-10-26 17:28:23 +00:00
parent e9f15e538a
commit f0c2be4d2b
3 changed files with 18 additions and 8 deletions

View File

@ -20,8 +20,10 @@ include "../Target.td"
// Subtarget Features
//===----------------------------------------------------------------------===//
def FeatureCIX : SubtargetFeature<"CIX", "Enable CIX extentions">;
def FeatureFIX : SubtargetFeature<"FIX", "Enable FIX extentions">;
def FeatureCIX : SubtargetFeature<"CIX", "bool", "HasCT",
"Enable CIX extentions">;
def FeatureFIX : SubtargetFeature<"FIX", "bool", "HasF2I",
"Enable FIX extentions">;
//===----------------------------------------------------------------------===//
// Register File Description

View File

@ -19,15 +19,15 @@ include "../Target.td"
// PowerPC Subtarget features.
//
def Feature64Bit : SubtargetFeature<"64bit",
def Feature64Bit : SubtargetFeature<"64bit", "bool", "Is64Bit",
"Enable 64-bit instructions">;
def Feature64BitRegs : SubtargetFeature<"64bitregs",
def Feature64BitRegs : SubtargetFeature<"64bitregs", "bool", "Has64BitRegs",
"Enable 64-bit registers [beta]">;
def FeatureAltivec : SubtargetFeature<"altivec",
def FeatureAltivec : SubtargetFeature<"altivec", "bool", "HasAltivec",
"Enable Altivec instructions">;
def FeatureGPUL : SubtargetFeature<"gpul",
def FeatureGPUL : SubtargetFeature<"gpul", "bool", "IsGigaProcessor",
"Enable GPUL instructions">;
def FeatureFSqrt : SubtargetFeature<"fsqrt",
def FeatureFSqrt : SubtargetFeature<"fsqrt", "bool", "HasFSQRT",
"Enable the fsqrt instruction">;
//===----------------------------------------------------------------------===//

View File

@ -252,12 +252,20 @@ class Target {
//===----------------------------------------------------------------------===//
// SubtargetFeature - A characteristic of the chip set.
//
class SubtargetFeature<string n, string d> {
class SubtargetFeature<string n, string t, string a, string d> {
// Name - Feature name. Used by command line (-mattr=) to determine the
// appropriate target chip.
//
string Name = n;
// Type - Type of attribute to be set by feature.
//
string Type = t;
// Attribute - Attribute to be set by feature.
//
string Attribute = a;
// Desc - Feature description. Used by command line (-mattr=) to display help
// information.
//