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 FeatureMessageSecurityAssist3 : SystemZFeature< 72 "message-security-assist-extension3", "MessageSecurityAssist3", 73 "Assume that the message-security-assist extension facility 3 is installed" 74>; 75 76def FeatureMessageSecurityAssist4 : SystemZFeature< 77 "message-security-assist-extension4", "MessageSecurityAssist4", 78 "Assume that the message-security-assist extension facility 4 is installed" 79>; 80 81def FeatureResetReferenceBitsMultiple : SystemZFeature< 82 "reset-reference-bits-multiple", "ResetReferenceBitsMultiple", 83 "Assume that the reset-reference-bits-multiple facility is installed" 84>; 85 86def Arch9NewFeatures : SystemZFeatureList<[ 87 FeatureDistinctOps, 88 FeatureFastSerialization, 89 FeatureFPExtension, 90 FeatureHighWord, 91 FeatureInterlockedAccess1, 92 FeatureLoadStoreOnCond, 93 FeaturePopulationCount, 94 FeatureMessageSecurityAssist3, 95 FeatureMessageSecurityAssist4, 96 FeatureResetReferenceBitsMultiple 97]>; 98 99//===----------------------------------------------------------------------===// 100// 101// New features added in the Tenth Edition of the z/Architecture 102// 103//===----------------------------------------------------------------------===// 104 105def FeatureExecutionHint : SystemZFeature< 106 "execution-hint", "ExecutionHint", 107 "Assume that the execution-hint facility is installed" 108>; 109 110def FeatureLoadAndTrap : SystemZFeature< 111 "load-and-trap", "LoadAndTrap", 112 "Assume that the load-and-trap facility is installed" 113>; 114 115def FeatureMiscellaneousExtensions : SystemZFeature< 116 "miscellaneous-extensions", "MiscellaneousExtensions", 117 "Assume that the miscellaneous-extensions facility is installed" 118>; 119 120def FeatureProcessorAssist : SystemZFeature< 121 "processor-assist", "ProcessorAssist", 122 "Assume that the processor-assist facility is installed" 123>; 124 125def FeatureTransactionalExecution : SystemZFeature< 126 "transactional-execution", "TransactionalExecution", 127 "Assume that the transactional-execution facility is installed" 128>; 129 130def FeatureDFPZonedConversion : SystemZFeature< 131 "dfp-zoned-conversion", "DFPZonedConversion", 132 "Assume that the DFP zoned-conversion facility is installed" 133>; 134 135def FeatureEnhancedDAT2 : SystemZFeature< 136 "enhanced-dat-2", "EnhancedDAT2", 137 "Assume that the enhanced-DAT facility 2 is installed" 138>; 139 140def Arch10NewFeatures : SystemZFeatureList<[ 141 FeatureExecutionHint, 142 FeatureLoadAndTrap, 143 FeatureMiscellaneousExtensions, 144 FeatureProcessorAssist, 145 FeatureTransactionalExecution, 146 FeatureDFPZonedConversion, 147 FeatureEnhancedDAT2 148]>; 149 150//===----------------------------------------------------------------------===// 151// 152// New features added in the Eleventh Edition of the z/Architecture 153// 154//===----------------------------------------------------------------------===// 155 156def FeatureLoadAndZeroRightmostByte : SystemZFeature< 157 "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte", 158 "Assume that the load-and-zero-rightmost-byte facility is installed" 159>; 160 161def FeatureLoadStoreOnCond2 : SystemZFeature< 162 "load-store-on-cond-2", "LoadStoreOnCond2", 163 "Assume that the load/store-on-condition facility 2 is installed" 164>; 165 166def FeatureMessageSecurityAssist5 : SystemZFeature< 167 "message-security-assist-extension5", "MessageSecurityAssist5", 168 "Assume that the message-security-assist extension facility 5 is installed" 169>; 170 171def FeatureDFPPackedConversion : SystemZFeature< 172 "dfp-packed-conversion", "DFPPackedConversion", 173 "Assume that the DFP packed-conversion facility is installed" 174>; 175 176def FeatureVector : SystemZFeature< 177 "vector", "Vector", 178 "Assume that the vectory facility is installed" 179>; 180def FeatureNoVector : SystemZMissingFeature<"Vector">; 181 182def Arch11NewFeatures : SystemZFeatureList<[ 183 FeatureLoadAndZeroRightmostByte, 184 FeatureLoadStoreOnCond2, 185 FeatureMessageSecurityAssist5, 186 FeatureDFPPackedConversion, 187 FeatureVector 188]>; 189 190//===----------------------------------------------------------------------===// 191// 192// Cumulative supported and unsupported feature sets 193// 194//===----------------------------------------------------------------------===// 195 196def Arch8SupportedFeatures 197 : SystemZFeatureList<[]>; 198def Arch9SupportedFeatures 199 : SystemZFeatureAdd<Arch8SupportedFeatures.List, Arch9NewFeatures.List>; 200def Arch10SupportedFeatures 201 : SystemZFeatureAdd<Arch9SupportedFeatures.List, Arch10NewFeatures.List>; 202def Arch11SupportedFeatures 203 : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>; 204 205def Arch11UnsupportedFeatures 206 : SystemZFeatureList<[]>; 207def Arch10UnsupportedFeatures 208 : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>; 209def Arch9UnsupportedFeatures 210 : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>; 211def Arch8UnsupportedFeatures 212 : SystemZFeatureAdd<Arch9UnsupportedFeatures.List, Arch9NewFeatures.List>; 213 214