LLVM API Documentation

AlphaGenSubtarget.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   FA =  1 << 0,
00014   FM =  1 << 1,
00015   FST0 =  1 << 2,
00016   FST1 =  1 << 3,
00017   L0 =  1 << 4,
00018   L1 =  1 << 5,
00019   U0 =  1 << 6,
00020   U1 =  1 << 7
00021 };
00022 
00023 enum {
00024   FeatureCIX =  1 << 0,
00025   FeatureFIX =  1 << 1
00026 };
00027 
00028 // Sorted (by key) array of values for CPU features.
00029 static llvm::SubtargetFeatureKV FeatureKV[] = {
00030   { "CIX", "Enable CIX extentions", FeatureCIX },
00031   { "FIX", "Enable FIX extentions", FeatureFIX }
00032 };
00033 
00034 enum {
00035   FeatureKVSize = sizeof(FeatureKV)/sizeof(llvm::SubtargetFeatureKV)
00036 };
00037 
00038 // Sorted (by key) array of values for CPU subtype.
00039 static const llvm::SubtargetFeatureKV SubTypeKV[] = {
00040   { "ev56", "Select the ev56 processor", 0 },
00041   { "ev6", "Select the ev6 processor", FeatureFIX },
00042   { "ev67", "Select the ev67 processor", FeatureFIX | FeatureCIX },
00043   { "generic", "Select the generic processor", 0 },
00044   { "pca56", "Select the pca56 processor", 0 }
00045 };
00046 
00047 enum {
00048   SubTypeKVSize = sizeof(SubTypeKV)/sizeof(llvm::SubtargetFeatureKV)
00049 };
00050 
00051 
00052 enum {
00053   ItinClassesSize = 29
00054 };
00055 static llvm::InstrStage Stages[] = {
00056   { 0, 0 }, // No itinerary
00057   { 3, L0 | L1 }, // 1
00058   { 4, L0 | L1 }, // 2
00059   { 0, L0 | L1 }, // 3
00060   { 0, FST0 | FST1 | L0 | L1 }, // 4
00061   { 1, L0 | L1 | U0 | U1 }, // 5
00062   { 1, L1 }, // 6
00063   { 1, L0 | L1 }, // 7
00064   { 0, U0 | U1 }, // 8
00065   { 3, U0 | U1 }, // 9
00066   { 3, L0 }, // 10
00067   { 1, L0 | U0 | L1 | U1 }, // 11
00068   { 1, U0 | U1 }, // 12
00069   { 7, U1 }, // 13
00070   { 3, U0 }, // 14
00071   { 0, FA }, // 15
00072   { 6, FA }, // 16
00073   { 6, FM }, // 17
00074   { 12, FA }, // 18
00075   { 15, FA }, // 19
00076   { 18, FA }, // 20
00077   { 33, FA }, // 21
00078   { 3, FST0 | FST1 | L0 | L1 }, // 22
00079   { 0, 0 } // End itinerary
00080 };
00081 
00082 enum {
00083   StagesSize = sizeof(Stages)/sizeof(llvm::InstrStage)
00084 };
00085 
00086 static llvm::InstrItinerary Alpha21264Itineraries[] = {
00087   { 0, 0 }, // 0
00088   { 11, 12 }, // 1
00089   { 16, 17 }, // 2
00090   { 15, 16 }, // 3
00091   { 16, 17 }, // 4
00092   { 18, 19 }, // 5
00093   { 19, 20 }, // 6
00094   { 2, 3 }, // 7
00095   { 17, 18 }, // 8
00096   { 20, 21 }, // 9
00097   { 21, 22 }, // 10
00098   { 4, 5 }, // 11
00099   { 22, 23 }, // 12
00100   { 11, 12 }, // 13
00101   { 8, 9 }, // 14
00102   { 1, 2 }, // 15
00103   { 11, 12 }, // 16
00104   { 14, 15 }, // 17
00105   { 13, 14 }, // 18
00106   { 12, 13 }, // 19
00107   { 3, 4 }, // 20
00108   { 2, 3 }, // 21
00109   { 10, 11 }, // 22
00110   { 5, 6 }, // 23
00111   { 7, 8 }, // 24
00112   { 0, 0 }, // 25
00113   { 6, 7 }, // 26
00114   { 6, 7 }, // 27
00115   { 9, 10 } // 28
00116 };
00117 
00118 static llvm::InstrItinerary NoItineraries[] = {};
00119 
00120 // Sorted (by key) array of itineraries for CPU subtype.
00121 static const llvm::SubtargetInfoKV ProcItinKV[] = {
00122   { "ev56", (void *)&Alpha21264Itineraries },
00123   { "ev6", (void *)&Alpha21264Itineraries },
00124   { "ev67", (void *)&Alpha21264Itineraries },
00125   { "generic", (void *)&Alpha21264Itineraries },
00126   { "pca56", (void *)&Alpha21264Itineraries }
00127 };
00128 
00129 enum {
00130   ProcItinKVSize = sizeof(ProcItinKV)/sizeof(llvm::SubtargetInfoKV)
00131 };
00132 
00133 // ParseSubtargetFeatures - Parses features string setting specified
00134 // subtarget options.
00135 void llvm::AlphaSubtarget::ParseSubtargetFeatures(const std::string &FS,
00136                                   const std::string &CPU) {
00137   SubtargetFeatures Features(FS);
00138   Features.setCPUIfNone(CPU);
00139   uint32_t Bits =  Features.getBits(SubTypeKV, SubTypeKVSize,
00140                                     FeatureKV, FeatureKVSize);
00141   if ((Bits & FeatureCIX) != 0) HasCT = true;
00142   if ((Bits & FeatureFIX) != 0) HasF2I = true;
00143 
00144   InstrItinerary *Itinerary = (InstrItinerary *)Features.getInfo(ProcItinKV, ProcItinKVSize);
00145   InstrItins = InstrItineraryData(Stages, Itinerary);
00146 }