LLVM API Documentation

SparcGenSubtarget.inc

Go to the documentation of this file.
00001 //===- TableGen'erated file -------------------------------------*- C++ -*-===//
00002 //
00003 // Subtarget Enumeration Source Fragment
00004 //
00005 // Automatically generated file, do not edit!
00006 //
00007 //===----------------------------------------------------------------------===//
00008 
00009 #include "llvm/Target/SubtargetFeature.h"
00010 #include "llvm/Target/TargetInstrItineraries.h"
00011 
00012 enum {
00013 };
00014 
00015 enum {
00016   FeatureV8Deprecated =  1 << 0,
00017   FeatureV9 =  1 << 1,
00018   FeatureVIS =  1 << 2
00019 };
00020 
00021 // Sorted (by key) array of values for CPU features.
00022 static llvm::SubtargetFeatureKV FeatureKV[] = {
00023   { "deprecated-v8", "Enable deprecated V8 instructions in V9 mode", FeatureV8Deprecated },
00024   { "v9", "Enable SPARC-V9 instructions", FeatureV9 },
00025   { "vis", "Enable UltraSPARC Visual Instruction Set extensions", FeatureVIS }
00026 };
00027 
00028 enum {
00029   FeatureKVSize = sizeof(FeatureKV)/sizeof(llvm::SubtargetFeatureKV)
00030 };
00031 
00032 // Sorted (by key) array of values for CPU subtype.
00033 static const llvm::SubtargetFeatureKV SubTypeKV[] = {
00034   { "f934", "Select the f934 processor", 0 },
00035   { "generic", "Select the generic processor", 0 },
00036   { "hypersparc", "Select the hypersparc processor", 0 },
00037   { "sparclet", "Select the sparclet processor", 0 },
00038   { "sparclite", "Select the sparclite processor", 0 },
00039   { "sparclite86x", "Select the sparclite86x processor", 0 },
00040   { "supersparc", "Select the supersparc processor", 0 },
00041   { "tsc701", "Select the tsc701 processor", 0 },
00042   { "ultrasparc", "Select the ultrasparc processor", FeatureV9 | FeatureV8Deprecated },
00043   { "ultrasparc3", "Select the ultrasparc3 processor", FeatureV9 | FeatureV8Deprecated },
00044   { "ultrasparc3-vis", "Select the ultrasparc3-vis processor", FeatureV9 | FeatureV8Deprecated | FeatureVIS },
00045   { "v8", "Select the v8 processor", 0 },
00046   { "v9", "Select the v9 processor", FeatureV9 }
00047 };
00048 
00049 enum {
00050   SubTypeKVSize = sizeof(SubTypeKV)/sizeof(llvm::SubtargetFeatureKV)
00051 };
00052 
00053 
00054 enum {
00055   ItinClassesSize = 1
00056 };
00057 
00058 // ParseSubtargetFeatures - Parses features string setting specified
00059 // subtarget options.
00060 void llvm::SparcSubtarget::ParseSubtargetFeatures(const std::string &FS,
00061                                   const std::string &CPU) {
00062   SubtargetFeatures Features(FS);
00063   Features.setCPUIfNone(CPU);
00064   uint32_t Bits =  Features.getBits(SubTypeKV, SubTypeKVSize,
00065                                     FeatureKV, FeatureKVSize);
00066   if ((Bits & FeatureV8Deprecated) != 0) V8DeprecatedInsts = true;
00067   if ((Bits & FeatureV9) != 0) IsV9 = true;
00068   if ((Bits & FeatureVIS) != 0) IsVIS = true;
00069 }