1*0b57cec5SDimitry Andric//===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===// 2*0b57cec5SDimitry Andric// 3*0b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 5*0b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0b57cec5SDimitry Andric// 7*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 8*0b57cec5SDimitry Andric// 9*0b57cec5SDimitry Andric// Feature definitions. 10*0b57cec5SDimitry Andric// 11*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12*0b57cec5SDimitry Andric 13*0b57cec5SDimitry Andricclass SystemZFeature<string extname, string intname, string desc> 14*0b57cec5SDimitry Andric : Predicate<"Subtarget->has"##intname##"()">, 15*0b57cec5SDimitry Andric AssemblerPredicate<"Feature"##intname, extname>, 16*0b57cec5SDimitry Andric SubtargetFeature<extname, "Has"##intname, "true", desc>; 17*0b57cec5SDimitry Andric 18*0b57cec5SDimitry Andricclass SystemZMissingFeature<string intname> 19*0b57cec5SDimitry Andric : Predicate<"!Subtarget->has"##intname##"()">; 20*0b57cec5SDimitry Andric 21*0b57cec5SDimitry Andricclass SystemZFeatureList<list<SystemZFeature> x> { 22*0b57cec5SDimitry Andric list<SystemZFeature> List = x; 23*0b57cec5SDimitry Andric} 24*0b57cec5SDimitry Andric 25*0b57cec5SDimitry Andricclass SystemZFeatureAdd<list<SystemZFeature> x, list<SystemZFeature> y> 26*0b57cec5SDimitry Andric : SystemZFeatureList<!listconcat(x, y)>; 27*0b57cec5SDimitry Andric 28*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 29*0b57cec5SDimitry Andric// 30*0b57cec5SDimitry Andric// New features added in the Ninth Edition of the z/Architecture 31*0b57cec5SDimitry Andric// 32*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 33*0b57cec5SDimitry Andric 34*0b57cec5SDimitry Andricdef FeatureDistinctOps : SystemZFeature< 35*0b57cec5SDimitry Andric "distinct-ops", "DistinctOps", 36*0b57cec5SDimitry Andric "Assume that the distinct-operands facility is installed" 37*0b57cec5SDimitry Andric>; 38*0b57cec5SDimitry Andric 39*0b57cec5SDimitry Andricdef FeatureFastSerialization : SystemZFeature< 40*0b57cec5SDimitry Andric "fast-serialization", "FastSerialization", 41*0b57cec5SDimitry Andric "Assume that the fast-serialization facility is installed" 42*0b57cec5SDimitry Andric>; 43*0b57cec5SDimitry Andric 44*0b57cec5SDimitry Andricdef FeatureFPExtension : SystemZFeature< 45*0b57cec5SDimitry Andric "fp-extension", "FPExtension", 46*0b57cec5SDimitry Andric "Assume that the floating-point extension facility is installed" 47*0b57cec5SDimitry Andric>; 48*0b57cec5SDimitry Andric 49*0b57cec5SDimitry Andricdef FeatureHighWord : SystemZFeature< 50*0b57cec5SDimitry Andric "high-word", "HighWord", 51*0b57cec5SDimitry Andric "Assume that the high-word facility is installed" 52*0b57cec5SDimitry Andric>; 53*0b57cec5SDimitry Andric 54*0b57cec5SDimitry Andricdef FeatureInterlockedAccess1 : SystemZFeature< 55*0b57cec5SDimitry Andric "interlocked-access1", "InterlockedAccess1", 56*0b57cec5SDimitry Andric "Assume that interlocked-access facility 1 is installed" 57*0b57cec5SDimitry Andric>; 58*0b57cec5SDimitry Andricdef FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">; 59*0b57cec5SDimitry Andric 60*0b57cec5SDimitry Andricdef FeatureLoadStoreOnCond : SystemZFeature< 61*0b57cec5SDimitry Andric "load-store-on-cond", "LoadStoreOnCond", 62*0b57cec5SDimitry Andric "Assume that the load/store-on-condition facility is installed" 63*0b57cec5SDimitry Andric>; 64*0b57cec5SDimitry Andricdef FeatureNoLoadStoreOnCond : SystemZMissingFeature<"LoadStoreOnCond">; 65*0b57cec5SDimitry Andric 66*0b57cec5SDimitry Andricdef FeaturePopulationCount : SystemZFeature< 67*0b57cec5SDimitry Andric "population-count", "PopulationCount", 68*0b57cec5SDimitry Andric "Assume that the population-count facility is installed" 69*0b57cec5SDimitry Andric>; 70*0b57cec5SDimitry Andric 71*0b57cec5SDimitry Andricdef FeatureMessageSecurityAssist3 : SystemZFeature< 72*0b57cec5SDimitry Andric "message-security-assist-extension3", "MessageSecurityAssist3", 73*0b57cec5SDimitry Andric "Assume that the message-security-assist extension facility 3 is installed" 74*0b57cec5SDimitry Andric>; 75*0b57cec5SDimitry Andric 76*0b57cec5SDimitry Andricdef FeatureMessageSecurityAssist4 : SystemZFeature< 77*0b57cec5SDimitry Andric "message-security-assist-extension4", "MessageSecurityAssist4", 78*0b57cec5SDimitry Andric "Assume that the message-security-assist extension facility 4 is installed" 79*0b57cec5SDimitry Andric>; 80*0b57cec5SDimitry Andric 81*0b57cec5SDimitry Andricdef FeatureResetReferenceBitsMultiple : SystemZFeature< 82*0b57cec5SDimitry Andric "reset-reference-bits-multiple", "ResetReferenceBitsMultiple", 83*0b57cec5SDimitry Andric "Assume that the reset-reference-bits-multiple facility is installed" 84*0b57cec5SDimitry Andric>; 85*0b57cec5SDimitry Andric 86*0b57cec5SDimitry Andricdef Arch9NewFeatures : SystemZFeatureList<[ 87*0b57cec5SDimitry Andric FeatureDistinctOps, 88*0b57cec5SDimitry Andric FeatureFastSerialization, 89*0b57cec5SDimitry Andric FeatureFPExtension, 90*0b57cec5SDimitry Andric FeatureHighWord, 91*0b57cec5SDimitry Andric FeatureInterlockedAccess1, 92*0b57cec5SDimitry Andric FeatureLoadStoreOnCond, 93*0b57cec5SDimitry Andric FeaturePopulationCount, 94*0b57cec5SDimitry Andric FeatureMessageSecurityAssist3, 95*0b57cec5SDimitry Andric FeatureMessageSecurityAssist4, 96*0b57cec5SDimitry Andric FeatureResetReferenceBitsMultiple 97*0b57cec5SDimitry Andric]>; 98*0b57cec5SDimitry Andric 99*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 100*0b57cec5SDimitry Andric// 101*0b57cec5SDimitry Andric// New features added in the Tenth Edition of the z/Architecture 102*0b57cec5SDimitry Andric// 103*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 104*0b57cec5SDimitry Andric 105*0b57cec5SDimitry Andricdef FeatureExecutionHint : SystemZFeature< 106*0b57cec5SDimitry Andric "execution-hint", "ExecutionHint", 107*0b57cec5SDimitry Andric "Assume that the execution-hint facility is installed" 108*0b57cec5SDimitry Andric>; 109*0b57cec5SDimitry Andric 110*0b57cec5SDimitry Andricdef FeatureLoadAndTrap : SystemZFeature< 111*0b57cec5SDimitry Andric "load-and-trap", "LoadAndTrap", 112*0b57cec5SDimitry Andric "Assume that the load-and-trap facility is installed" 113*0b57cec5SDimitry Andric>; 114*0b57cec5SDimitry Andric 115*0b57cec5SDimitry Andricdef FeatureMiscellaneousExtensions : SystemZFeature< 116*0b57cec5SDimitry Andric "miscellaneous-extensions", "MiscellaneousExtensions", 117*0b57cec5SDimitry Andric "Assume that the miscellaneous-extensions facility is installed" 118*0b57cec5SDimitry Andric>; 119*0b57cec5SDimitry Andric 120*0b57cec5SDimitry Andricdef FeatureProcessorAssist : SystemZFeature< 121*0b57cec5SDimitry Andric "processor-assist", "ProcessorAssist", 122*0b57cec5SDimitry Andric "Assume that the processor-assist facility is installed" 123*0b57cec5SDimitry Andric>; 124*0b57cec5SDimitry Andric 125*0b57cec5SDimitry Andricdef FeatureTransactionalExecution : SystemZFeature< 126*0b57cec5SDimitry Andric "transactional-execution", "TransactionalExecution", 127*0b57cec5SDimitry Andric "Assume that the transactional-execution facility is installed" 128*0b57cec5SDimitry Andric>; 129*0b57cec5SDimitry Andric 130*0b57cec5SDimitry Andricdef FeatureDFPZonedConversion : SystemZFeature< 131*0b57cec5SDimitry Andric "dfp-zoned-conversion", "DFPZonedConversion", 132*0b57cec5SDimitry Andric "Assume that the DFP zoned-conversion facility is installed" 133*0b57cec5SDimitry Andric>; 134*0b57cec5SDimitry Andric 135*0b57cec5SDimitry Andricdef FeatureEnhancedDAT2 : SystemZFeature< 136*0b57cec5SDimitry Andric "enhanced-dat-2", "EnhancedDAT2", 137*0b57cec5SDimitry Andric "Assume that the enhanced-DAT facility 2 is installed" 138*0b57cec5SDimitry Andric>; 139*0b57cec5SDimitry Andric 140*0b57cec5SDimitry Andricdef Arch10NewFeatures : SystemZFeatureList<[ 141*0b57cec5SDimitry Andric FeatureExecutionHint, 142*0b57cec5SDimitry Andric FeatureLoadAndTrap, 143*0b57cec5SDimitry Andric FeatureMiscellaneousExtensions, 144*0b57cec5SDimitry Andric FeatureProcessorAssist, 145*0b57cec5SDimitry Andric FeatureTransactionalExecution, 146*0b57cec5SDimitry Andric FeatureDFPZonedConversion, 147*0b57cec5SDimitry Andric FeatureEnhancedDAT2 148*0b57cec5SDimitry Andric]>; 149*0b57cec5SDimitry Andric 150*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 151*0b57cec5SDimitry Andric// 152*0b57cec5SDimitry Andric// New features added in the Eleventh Edition of the z/Architecture 153*0b57cec5SDimitry Andric// 154*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 155*0b57cec5SDimitry Andric 156*0b57cec5SDimitry Andricdef FeatureLoadAndZeroRightmostByte : SystemZFeature< 157*0b57cec5SDimitry Andric "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte", 158*0b57cec5SDimitry Andric "Assume that the load-and-zero-rightmost-byte facility is installed" 159*0b57cec5SDimitry Andric>; 160*0b57cec5SDimitry Andric 161*0b57cec5SDimitry Andricdef FeatureLoadStoreOnCond2 : SystemZFeature< 162*0b57cec5SDimitry Andric "load-store-on-cond-2", "LoadStoreOnCond2", 163*0b57cec5SDimitry Andric "Assume that the load/store-on-condition facility 2 is installed" 164*0b57cec5SDimitry Andric>; 165*0b57cec5SDimitry Andric 166*0b57cec5SDimitry Andricdef FeatureMessageSecurityAssist5 : SystemZFeature< 167*0b57cec5SDimitry Andric "message-security-assist-extension5", "MessageSecurityAssist5", 168*0b57cec5SDimitry Andric "Assume that the message-security-assist extension facility 5 is installed" 169*0b57cec5SDimitry Andric>; 170*0b57cec5SDimitry Andric 171*0b57cec5SDimitry Andricdef FeatureDFPPackedConversion : SystemZFeature< 172*0b57cec5SDimitry Andric "dfp-packed-conversion", "DFPPackedConversion", 173*0b57cec5SDimitry Andric "Assume that the DFP packed-conversion facility is installed" 174*0b57cec5SDimitry Andric>; 175*0b57cec5SDimitry Andric 176*0b57cec5SDimitry Andricdef FeatureVector : SystemZFeature< 177*0b57cec5SDimitry Andric "vector", "Vector", 178*0b57cec5SDimitry Andric "Assume that the vectory facility is installed" 179*0b57cec5SDimitry Andric>; 180*0b57cec5SDimitry Andricdef FeatureNoVector : SystemZMissingFeature<"Vector">; 181*0b57cec5SDimitry Andric 182*0b57cec5SDimitry Andricdef Arch11NewFeatures : SystemZFeatureList<[ 183*0b57cec5SDimitry Andric FeatureLoadAndZeroRightmostByte, 184*0b57cec5SDimitry Andric FeatureLoadStoreOnCond2, 185*0b57cec5SDimitry Andric FeatureMessageSecurityAssist5, 186*0b57cec5SDimitry Andric FeatureDFPPackedConversion, 187*0b57cec5SDimitry Andric FeatureVector 188*0b57cec5SDimitry Andric]>; 189*0b57cec5SDimitry Andric 190*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 191*0b57cec5SDimitry Andric// 192*0b57cec5SDimitry Andric// New features added in the Twelvth Edition of the z/Architecture 193*0b57cec5SDimitry Andric// 194*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 195*0b57cec5SDimitry Andric 196*0b57cec5SDimitry Andricdef FeatureMiscellaneousExtensions2 : SystemZFeature< 197*0b57cec5SDimitry Andric "miscellaneous-extensions-2", "MiscellaneousExtensions2", 198*0b57cec5SDimitry Andric "Assume that the miscellaneous-extensions facility 2 is installed" 199*0b57cec5SDimitry Andric>; 200*0b57cec5SDimitry Andric 201*0b57cec5SDimitry Andricdef FeatureGuardedStorage : SystemZFeature< 202*0b57cec5SDimitry Andric "guarded-storage", "GuardedStorage", 203*0b57cec5SDimitry Andric "Assume that the guarded-storage facility is installed" 204*0b57cec5SDimitry Andric>; 205*0b57cec5SDimitry Andric 206*0b57cec5SDimitry Andricdef FeatureMessageSecurityAssist7 : SystemZFeature< 207*0b57cec5SDimitry Andric "message-security-assist-extension7", "MessageSecurityAssist7", 208*0b57cec5SDimitry Andric "Assume that the message-security-assist extension facility 7 is installed" 209*0b57cec5SDimitry Andric>; 210*0b57cec5SDimitry Andric 211*0b57cec5SDimitry Andricdef FeatureMessageSecurityAssist8 : SystemZFeature< 212*0b57cec5SDimitry Andric "message-security-assist-extension8", "MessageSecurityAssist8", 213*0b57cec5SDimitry Andric "Assume that the message-security-assist extension facility 8 is installed" 214*0b57cec5SDimitry Andric>; 215*0b57cec5SDimitry Andric 216*0b57cec5SDimitry Andricdef FeatureVectorEnhancements1 : SystemZFeature< 217*0b57cec5SDimitry Andric "vector-enhancements-1", "VectorEnhancements1", 218*0b57cec5SDimitry Andric "Assume that the vector enhancements facility 1 is installed" 219*0b57cec5SDimitry Andric>; 220*0b57cec5SDimitry Andricdef FeatureNoVectorEnhancements1 : SystemZMissingFeature<"VectorEnhancements1">; 221*0b57cec5SDimitry Andric 222*0b57cec5SDimitry Andricdef FeatureVectorPackedDecimal : SystemZFeature< 223*0b57cec5SDimitry Andric "vector-packed-decimal", "VectorPackedDecimal", 224*0b57cec5SDimitry Andric "Assume that the vector packed decimal facility is installed" 225*0b57cec5SDimitry Andric>; 226*0b57cec5SDimitry Andric 227*0b57cec5SDimitry Andricdef FeatureInsertReferenceBitsMultiple : SystemZFeature< 228*0b57cec5SDimitry Andric "insert-reference-bits-multiple", "InsertReferenceBitsMultiple", 229*0b57cec5SDimitry Andric "Assume that the insert-reference-bits-multiple facility is installed" 230*0b57cec5SDimitry Andric>; 231*0b57cec5SDimitry Andric 232*0b57cec5SDimitry Andricdef Arch12NewFeatures : SystemZFeatureList<[ 233*0b57cec5SDimitry Andric FeatureMiscellaneousExtensions2, 234*0b57cec5SDimitry Andric FeatureGuardedStorage, 235*0b57cec5SDimitry Andric FeatureMessageSecurityAssist7, 236*0b57cec5SDimitry Andric FeatureMessageSecurityAssist8, 237*0b57cec5SDimitry Andric FeatureVectorEnhancements1, 238*0b57cec5SDimitry Andric FeatureVectorPackedDecimal, 239*0b57cec5SDimitry Andric FeatureInsertReferenceBitsMultiple 240*0b57cec5SDimitry Andric]>; 241*0b57cec5SDimitry Andric 242*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 243*0b57cec5SDimitry Andric// 244*0b57cec5SDimitry Andric// New features added in the Thirteenth Edition of the z/Architecture 245*0b57cec5SDimitry Andric// 246*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 247*0b57cec5SDimitry Andric 248*0b57cec5SDimitry Andricdef FeatureMiscellaneousExtensions3 : SystemZFeature< 249*0b57cec5SDimitry Andric "miscellaneous-extensions-3", "MiscellaneousExtensions3", 250*0b57cec5SDimitry Andric "Assume that the miscellaneous-extensions facility 3 is installed" 251*0b57cec5SDimitry Andric>; 252*0b57cec5SDimitry Andric 253*0b57cec5SDimitry Andricdef FeatureMessageSecurityAssist9 : SystemZFeature< 254*0b57cec5SDimitry Andric "message-security-assist-extension9", "MessageSecurityAssist9", 255*0b57cec5SDimitry Andric "Assume that the message-security-assist extension facility 9 is installed" 256*0b57cec5SDimitry Andric>; 257*0b57cec5SDimitry Andric 258*0b57cec5SDimitry Andricdef FeatureVectorEnhancements2 : SystemZFeature< 259*0b57cec5SDimitry Andric "vector-enhancements-2", "VectorEnhancements2", 260*0b57cec5SDimitry Andric "Assume that the vector enhancements facility 2 is installed" 261*0b57cec5SDimitry Andric>; 262*0b57cec5SDimitry Andric 263*0b57cec5SDimitry Andricdef FeatureVectorPackedDecimalEnhancement : SystemZFeature< 264*0b57cec5SDimitry Andric "vector-packed-decimal-enhancement", "VectorPackedDecimalEnhancement", 265*0b57cec5SDimitry Andric "Assume that the vector packed decimal enhancement facility is installed" 266*0b57cec5SDimitry Andric>; 267*0b57cec5SDimitry Andric 268*0b57cec5SDimitry Andricdef FeatureEnhancedSort : SystemZFeature< 269*0b57cec5SDimitry Andric "enhanced-sort", "EnhancedSort", 270*0b57cec5SDimitry Andric "Assume that the enhanced-sort facility is installed" 271*0b57cec5SDimitry Andric>; 272*0b57cec5SDimitry Andric 273*0b57cec5SDimitry Andricdef FeatureDeflateConversion : SystemZFeature< 274*0b57cec5SDimitry Andric "deflate-conversion", "DeflateConversion", 275*0b57cec5SDimitry Andric "Assume that the deflate-conversion facility is installed" 276*0b57cec5SDimitry Andric>; 277*0b57cec5SDimitry Andric 278*0b57cec5SDimitry Andricdef Arch13NewFeatures : SystemZFeatureList<[ 279*0b57cec5SDimitry Andric FeatureMiscellaneousExtensions3, 280*0b57cec5SDimitry Andric FeatureMessageSecurityAssist9, 281*0b57cec5SDimitry Andric FeatureVectorEnhancements2, 282*0b57cec5SDimitry Andric FeatureVectorPackedDecimalEnhancement, 283*0b57cec5SDimitry Andric FeatureEnhancedSort, 284*0b57cec5SDimitry Andric FeatureDeflateConversion 285*0b57cec5SDimitry Andric]>; 286*0b57cec5SDimitry Andric 287*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 288*0b57cec5SDimitry Andric// 289*0b57cec5SDimitry Andric// Cumulative supported and unsupported feature sets 290*0b57cec5SDimitry Andric// 291*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 292*0b57cec5SDimitry Andric 293*0b57cec5SDimitry Andricdef Arch8SupportedFeatures 294*0b57cec5SDimitry Andric : SystemZFeatureList<[]>; 295*0b57cec5SDimitry Andricdef Arch9SupportedFeatures 296*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch8SupportedFeatures.List, Arch9NewFeatures.List>; 297*0b57cec5SDimitry Andricdef Arch10SupportedFeatures 298*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch9SupportedFeatures.List, Arch10NewFeatures.List>; 299*0b57cec5SDimitry Andricdef Arch11SupportedFeatures 300*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch10SupportedFeatures.List, Arch11NewFeatures.List>; 301*0b57cec5SDimitry Andricdef Arch12SupportedFeatures 302*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch11SupportedFeatures.List, Arch12NewFeatures.List>; 303*0b57cec5SDimitry Andricdef Arch13SupportedFeatures 304*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch12SupportedFeatures.List, Arch13NewFeatures.List>; 305*0b57cec5SDimitry Andric 306*0b57cec5SDimitry Andricdef Arch13UnsupportedFeatures 307*0b57cec5SDimitry Andric : SystemZFeatureList<[]>; 308*0b57cec5SDimitry Andricdef Arch12UnsupportedFeatures 309*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch13UnsupportedFeatures.List, Arch13NewFeatures.List>; 310*0b57cec5SDimitry Andricdef Arch11UnsupportedFeatures 311*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch12UnsupportedFeatures.List, Arch12NewFeatures.List>; 312*0b57cec5SDimitry Andricdef Arch10UnsupportedFeatures 313*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch11UnsupportedFeatures.List, Arch11NewFeatures.List>; 314*0b57cec5SDimitry Andricdef Arch9UnsupportedFeatures 315*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch10UnsupportedFeatures.List, Arch10NewFeatures.List>; 316*0b57cec5SDimitry Andricdef Arch8UnsupportedFeatures 317*0b57cec5SDimitry Andric : SystemZFeatureAdd<Arch9UnsupportedFeatures.List, Arch9NewFeatures.List>; 318*0b57cec5SDimitry Andric 319