1//===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// Feature definitions. 11// 12//===----------------------------------------------------------------------===// 13 14class SystemZFeature<string extname, string intname, string desc> 15 : Predicate<"Subtarget->has"##intname##"()">, 16 AssemblerPredicate<"Feature"##intname, extname>, 17 SubtargetFeature<extname, "Has"##intname, "true", desc>; 18 19class SystemZMissingFeature<string intname> 20 : Predicate<"!Subtarget->has"##intname##"()">; 21 22class SystemZFeatureList<list<SystemZFeature> x> { 23 list<SystemZFeature> List = x; 24} 25 26class SystemZFeatureAdd<list<SystemZFeature> x, list<SystemZFeature> y> 27 : SystemZFeatureList<!listconcat(x, y)>; 28 29//===----------------------------------------------------------------------===// 30// 31// New features added in the Ninth Edition of the z/Architecture 32// 33//===----------------------------------------------------------------------===// 34 35def FeatureDistinctOps : SystemZFeature< 36 "distinct-ops", "DistinctOps", 37 "Assume that the distinct-operands facility is installed" 38>; 39 40def FeatureFastSerialization : SystemZFeature< 41 "fast-serialization", "FastSerialization", 42 "Assume that the fast-serialization facility is installed" 43>; 44 45def FeatureFPExtension : SystemZFeature< 46 "fp-extension", "FPExtension", 47 "Assume that the floating-point extension facility is installed" 48>; 49 50def FeatureHighWord : SystemZFeature< 51 "high-word", "HighWord", 52 "Assume that the high-word facility is installed" 53>; 54 55def FeatureInterlockedAccess1 : SystemZFeature< 56 "interlocked-access1", "InterlockedAccess1", 57 "Assume that interlocked-access facility 1 is installed" 58>; 59def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">; 60 61def FeatureLoadStoreOnCond : SystemZFeature< 62 "load-store-on-cond", "LoadStoreOnCond", 63 "Assume that the load/store-on-condition facility is installed" 64>; 65 66def FeaturePopulationCount : SystemZFeature< 67 "population-count", "PopulationCount", 68 "Assume that the population-count facility is installed" 69>; 70 71def FeatureMessageSecurityAssist4 : SystemZFeature< 72 "message-security-assist-extension4", "MessageSecurityAssist4", 73 "Assume that the message-security-assist extension facility 4 is installed" 74>; 75 76def Arch9NewFeatures : SystemZFeatureList<[ 77 FeatureDistinctOps, 78 FeatureFastSerialization, 79 FeatureFPExtension, 80 FeatureHighWord, 81 FeatureInterlockedAccess1, 82 FeatureLoadStoreOnCond, 83 FeaturePopulationCount, 84 FeatureMessageSecurityAssist4 85]>; 86 87//===----------------------------------------------------------------------===// 88// 89// New features added in the Tenth Edition of the z/Architecture 90// 91//===----------------------------------------------------------------------===// 92 93def FeatureExecutionHint : SystemZFeature< 94 "execution-hint", "ExecutionHint", 95 "Assume that the execution-hint facility is installed" 96>; 97 98def FeatureLoadAndTrap : SystemZFeature< 99 "load-and-trap", "LoadAndTrap", 100 "Assume that the load-and-trap facility is installed" 101>; 102 103def FeatureMiscellaneousExtensions : SystemZFeature< 104 "miscellaneous-extensions", "MiscellaneousExtensions", 105 "Assume that the miscellaneous-extensions facility is installed" 106>; 107 108def FeatureProcessorAssist : SystemZFeature< 109 "processor-assist", "ProcessorAssist", 110 "Assume that the processor-assist facility is installed" 111>; 112 113def FeatureTransactionalExecution : SystemZFeature< 114 "transactional-execution", "TransactionalExecution", 115 "Assume that the transactional-execution facility is installed" 116>; 117 118def FeatureDFPZonedConversion : SystemZFeature< 119 "dfp-zoned-conversion", "DFPZonedConversion", 120 "Assume that the DFP zoned-conversion facility is installed" 121>; 122 123def Arch10NewFeatures : SystemZFeatureList<[ 124 FeatureExecutionHint, 125 FeatureLoadAndTrap, 126 FeatureMiscellaneousExtensions, 127 FeatureProcessorAssist, 128 FeatureTransactionalExecution, 129 FeatureDFPZonedConversion 130]>; 131 132//===----------------------------------------------------------------------===// 133// 134// New features added in the Eleventh Edition of the z/Architecture 135// 136//===----------------------------------------------------------------------===// 137 138def FeatureLoadAndZeroRightmostByte : SystemZFeature< 139 "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte", 140 "Assume that the load-and-zero-rightmost-byte facility is installed" 141>; 142 143def FeatureLoadStoreOnCond2 : SystemZFeature< 144 "load-store-on-cond-2", "LoadStoreOnCond2", 145 "Assume that the load/store-on-condition facility 2 is installed" 146>; 147 148def FeatureMessageSecurityAssist5 : SystemZFeature< 149 "message-security-assist-extension5", "MessageSecurityAssist5", 150 "Assume that the message-security-assist extension facility 5 is installed" 151>; 152 153def FeatureDFPPackedConversion : SystemZFeature< 154 "dfp-packed-conversion", "DFPPackedConversion", 155 "Assume that the DFP packed-conversion facility is installed" 156>; 157 158def FeatureVector : SystemZFeature< 159 "vector", "Vector", 160 "Assume that the vectory facility is installed" 161>; 162def FeatureNoVector : SystemZMissingFeature<"Vector">; 163 164def Arch11NewFeatures : SystemZFeatureList<[ 165 FeatureLoadAndZeroRightmostByte, 166 FeatureLoadStoreOnCond2, 167 FeatureMessageSecurityAssist5, 168 FeatureDFPPackedConversion, 169 FeatureVector 170]>; 171 172//===----------------------------------------------------------------------===// 173// 174// Cumulative supported and unsupported feature sets 175// 176//===----------------------------------------------------------------------===// 177 178def Arch8SupportedFeatures 179 : SystemZFeatureList<[]>; 180def Arch9SupportedFeatures 181 : SystemZFeatureAdd<Arch8SupportedFeatures.List, Arch9NewFeatures.List>; 182def Arch10SupportedFeatures 183 : SystemZFeatureAdd<Arch9SupportedFeatures.List, Arch10NewFeatures.List>; 184def Arch11SupportedFeatures 185 : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>; 186 187def Arch11UnsupportedFeatures 188 : SystemZFeatureList<[]>; 189def Arch10UnsupportedFeatures 190 : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>; 191def Arch9UnsupportedFeatures 192 : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>; 193def Arch8UnsupportedFeatures 194 : SystemZFeatureAdd<Arch9UnsupportedFeatures.List, Arch9NewFeatures.List>; 195 196