Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/SystemZ/SystemZFeatures.td
//===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===// | //===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// Feature definitions. | // Feature definitions. | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
class SystemZFeature<string extname, string intname, string desc> | class SystemZFeature<string extname, string intname, dag featdag, string desc> | ||||
: Predicate<"Subtarget->has"##intname##"()">, | : Predicate<"Subtarget->has"##intname##"()">, | ||||
AssemblerPredicate<"Feature"##intname, extname>, | AssemblerPredicate<featdag, extname>, | ||||
SubtargetFeature<extname, "Has"##intname, "true", desc>; | SubtargetFeature<extname, "Has"##intname, "true", desc>; | ||||
class SystemZMissingFeature<string intname> | class SystemZMissingFeature<string intname> | ||||
: Predicate<"!Subtarget->has"##intname##"()">; | : Predicate<"!Subtarget->has"##intname##"()">; | ||||
class SystemZFeatureList<list<SystemZFeature> x> { | class SystemZFeatureList<list<SystemZFeature> x> { | ||||
list<SystemZFeature> List = x; | list<SystemZFeature> List = x; | ||||
} | } | ||||
class SystemZFeatureAdd<list<SystemZFeature> x, list<SystemZFeature> y> | class SystemZFeatureAdd<list<SystemZFeature> x, list<SystemZFeature> y> | ||||
: SystemZFeatureList<!listconcat(x, y)>; | : SystemZFeatureList<!listconcat(x, y)>; | ||||
// This feature is added as a subtarget feature whenever the function is | // This feature is added as a subtarget feature whenever the function is | ||||
// compiled to use soft-float. | // compiled to use soft-float. | ||||
def FeatureSoftFloat : SystemZFeature< | def FeatureSoftFloat : SystemZFeature< | ||||
"soft-float", "SoftFloat", | "soft-float", "SoftFloat", (all_of FeatureSoftFloat), | ||||
"Use software emulation for floating point" | "Use software emulation for floating point" | ||||
>; | >; | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// New features added in the Ninth Edition of the z/Architecture | // New features added in the Ninth Edition of the z/Architecture | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
def FeatureDistinctOps : SystemZFeature< | def FeatureDistinctOps : SystemZFeature< | ||||
"distinct-ops", "DistinctOps", | "distinct-ops", "DistinctOps", (all_of FeatureDistinctOps), | ||||
"Assume that the distinct-operands facility is installed" | "Assume that the distinct-operands facility is installed" | ||||
>; | >; | ||||
def FeatureFastSerialization : SystemZFeature< | def FeatureFastSerialization : SystemZFeature< | ||||
"fast-serialization", "FastSerialization", | "fast-serialization", "FastSerialization", (all_of FeatureFastSerialization), | ||||
"Assume that the fast-serialization facility is installed" | "Assume that the fast-serialization facility is installed" | ||||
>; | >; | ||||
def FeatureFPExtension : SystemZFeature< | def FeatureFPExtension : SystemZFeature< | ||||
"fp-extension", "FPExtension", | "fp-extension", "FPExtension", (all_of FeatureFPExtension), | ||||
"Assume that the floating-point extension facility is installed" | "Assume that the floating-point extension facility is installed" | ||||
>; | >; | ||||
def FeatureHighWord : SystemZFeature< | def FeatureHighWord : SystemZFeature< | ||||
"high-word", "HighWord", | "high-word", "HighWord", (all_of FeatureHighWord), | ||||
"Assume that the high-word facility is installed" | "Assume that the high-word facility is installed" | ||||
>; | >; | ||||
def FeatureInterlockedAccess1 : SystemZFeature< | def FeatureInterlockedAccess1 : SystemZFeature< | ||||
"interlocked-access1", "InterlockedAccess1", | "interlocked-access1", "InterlockedAccess1", (all_of FeatureInterlockedAccess1), | ||||
"Assume that interlocked-access facility 1 is installed" | "Assume that interlocked-access facility 1 is installed" | ||||
>; | >; | ||||
def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">; | def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">; | ||||
def FeatureLoadStoreOnCond : SystemZFeature< | def FeatureLoadStoreOnCond : SystemZFeature< | ||||
"load-store-on-cond", "LoadStoreOnCond", | "load-store-on-cond", "LoadStoreOnCond", (all_of FeatureLoadStoreOnCond), | ||||
"Assume that the load/store-on-condition facility is installed" | "Assume that the load/store-on-condition facility is installed" | ||||
>; | >; | ||||
def FeatureNoLoadStoreOnCond : SystemZMissingFeature<"LoadStoreOnCond">; | def FeatureNoLoadStoreOnCond : SystemZMissingFeature<"LoadStoreOnCond">; | ||||
def FeaturePopulationCount : SystemZFeature< | def FeaturePopulationCount : SystemZFeature< | ||||
"population-count", "PopulationCount", | "population-count", "PopulationCount", (all_of FeaturePopulationCount), | ||||
"Assume that the population-count facility is installed" | "Assume that the population-count facility is installed" | ||||
>; | >; | ||||
def FeatureMessageSecurityAssist3 : SystemZFeature< | def FeatureMessageSecurityAssist3 : SystemZFeature< | ||||
"message-security-assist-extension3", "MessageSecurityAssist3", | "message-security-assist-extension3", "MessageSecurityAssist3", (all_of FeatureMessageSecurityAssist3), | ||||
"Assume that the message-security-assist extension facility 3 is installed" | "Assume that the message-security-assist extension facility 3 is installed" | ||||
>; | >; | ||||
def FeatureMessageSecurityAssist4 : SystemZFeature< | def FeatureMessageSecurityAssist4 : SystemZFeature< | ||||
"message-security-assist-extension4", "MessageSecurityAssist4", | "message-security-assist-extension4", "MessageSecurityAssist4", (all_of FeatureMessageSecurityAssist4), | ||||
"Assume that the message-security-assist extension facility 4 is installed" | "Assume that the message-security-assist extension facility 4 is installed" | ||||
>; | >; | ||||
def FeatureResetReferenceBitsMultiple : SystemZFeature< | def FeatureResetReferenceBitsMultiple : SystemZFeature< | ||||
"reset-reference-bits-multiple", "ResetReferenceBitsMultiple", | "reset-reference-bits-multiple", "ResetReferenceBitsMultiple", (all_of FeatureResetReferenceBitsMultiple), | ||||
"Assume that the reset-reference-bits-multiple facility is installed" | "Assume that the reset-reference-bits-multiple facility is installed" | ||||
>; | >; | ||||
def Arch9NewFeatures : SystemZFeatureList<[ | def Arch9NewFeatures : SystemZFeatureList<[ | ||||
FeatureDistinctOps, | FeatureDistinctOps, | ||||
FeatureFastSerialization, | FeatureFastSerialization, | ||||
FeatureFPExtension, | FeatureFPExtension, | ||||
FeatureHighWord, | FeatureHighWord, | ||||
FeatureInterlockedAccess1, | FeatureInterlockedAccess1, | ||||
FeatureLoadStoreOnCond, | FeatureLoadStoreOnCond, | ||||
FeaturePopulationCount, | FeaturePopulationCount, | ||||
FeatureMessageSecurityAssist3, | FeatureMessageSecurityAssist3, | ||||
FeatureMessageSecurityAssist4, | FeatureMessageSecurityAssist4, | ||||
FeatureResetReferenceBitsMultiple | FeatureResetReferenceBitsMultiple | ||||
]>; | ]>; | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// New features added in the Tenth Edition of the z/Architecture | // New features added in the Tenth Edition of the z/Architecture | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
def FeatureExecutionHint : SystemZFeature< | def FeatureExecutionHint : SystemZFeature< | ||||
"execution-hint", "ExecutionHint", | "execution-hint", "ExecutionHint", (all_of FeatureExecutionHint), | ||||
"Assume that the execution-hint facility is installed" | "Assume that the execution-hint facility is installed" | ||||
>; | >; | ||||
def FeatureLoadAndTrap : SystemZFeature< | def FeatureLoadAndTrap : SystemZFeature< | ||||
"load-and-trap", "LoadAndTrap", | "load-and-trap", "LoadAndTrap", (all_of FeatureLoadAndTrap), | ||||
"Assume that the load-and-trap facility is installed" | "Assume that the load-and-trap facility is installed" | ||||
>; | >; | ||||
def FeatureMiscellaneousExtensions : SystemZFeature< | def FeatureMiscellaneousExtensions : SystemZFeature< | ||||
"miscellaneous-extensions", "MiscellaneousExtensions", | "miscellaneous-extensions", "MiscellaneousExtensions", (all_of FeatureMiscellaneousExtensions), | ||||
"Assume that the miscellaneous-extensions facility is installed" | "Assume that the miscellaneous-extensions facility is installed" | ||||
>; | >; | ||||
def FeatureProcessorAssist : SystemZFeature< | def FeatureProcessorAssist : SystemZFeature< | ||||
"processor-assist", "ProcessorAssist", | "processor-assist", "ProcessorAssist", (all_of FeatureProcessorAssist), | ||||
"Assume that the processor-assist facility is installed" | "Assume that the processor-assist facility is installed" | ||||
>; | >; | ||||
def FeatureTransactionalExecution : SystemZFeature< | def FeatureTransactionalExecution : SystemZFeature< | ||||
"transactional-execution", "TransactionalExecution", | "transactional-execution", "TransactionalExecution", (all_of FeatureTransactionalExecution), | ||||
"Assume that the transactional-execution facility is installed" | "Assume that the transactional-execution facility is installed" | ||||
>; | >; | ||||
def FeatureDFPZonedConversion : SystemZFeature< | def FeatureDFPZonedConversion : SystemZFeature< | ||||
"dfp-zoned-conversion", "DFPZonedConversion", | "dfp-zoned-conversion", "DFPZonedConversion", (all_of FeatureDFPZonedConversion), | ||||
"Assume that the DFP zoned-conversion facility is installed" | "Assume that the DFP zoned-conversion facility is installed" | ||||
>; | >; | ||||
def FeatureEnhancedDAT2 : SystemZFeature< | def FeatureEnhancedDAT2 : SystemZFeature< | ||||
"enhanced-dat-2", "EnhancedDAT2", | "enhanced-dat-2", "EnhancedDAT2", (all_of FeatureEnhancedDAT2), | ||||
"Assume that the enhanced-DAT facility 2 is installed" | "Assume that the enhanced-DAT facility 2 is installed" | ||||
>; | >; | ||||
def Arch10NewFeatures : SystemZFeatureList<[ | def Arch10NewFeatures : SystemZFeatureList<[ | ||||
FeatureExecutionHint, | FeatureExecutionHint, | ||||
FeatureLoadAndTrap, | FeatureLoadAndTrap, | ||||
FeatureMiscellaneousExtensions, | FeatureMiscellaneousExtensions, | ||||
FeatureProcessorAssist, | FeatureProcessorAssist, | ||||
FeatureTransactionalExecution, | FeatureTransactionalExecution, | ||||
FeatureDFPZonedConversion, | FeatureDFPZonedConversion, | ||||
FeatureEnhancedDAT2 | FeatureEnhancedDAT2 | ||||
]>; | ]>; | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// New features added in the Eleventh Edition of the z/Architecture | // New features added in the Eleventh Edition of the z/Architecture | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
def FeatureLoadAndZeroRightmostByte : SystemZFeature< | def FeatureLoadAndZeroRightmostByte : SystemZFeature< | ||||
"load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte", | "load-and-zero-rightmost-byte", "LoadAndZeroRightmostByte", (all_of FeatureLoadAndZeroRightmostByte), | ||||
"Assume that the load-and-zero-rightmost-byte facility is installed" | "Assume that the load-and-zero-rightmost-byte facility is installed" | ||||
>; | >; | ||||
def FeatureLoadStoreOnCond2 : SystemZFeature< | def FeatureLoadStoreOnCond2 : SystemZFeature< | ||||
"load-store-on-cond-2", "LoadStoreOnCond2", | "load-store-on-cond-2", "LoadStoreOnCond2", (all_of FeatureLoadStoreOnCond2), | ||||
"Assume that the load/store-on-condition facility 2 is installed" | "Assume that the load/store-on-condition facility 2 is installed" | ||||
>; | >; | ||||
def FeatureMessageSecurityAssist5 : SystemZFeature< | def FeatureMessageSecurityAssist5 : SystemZFeature< | ||||
"message-security-assist-extension5", "MessageSecurityAssist5", | "message-security-assist-extension5", "MessageSecurityAssist5", (all_of FeatureMessageSecurityAssist5), | ||||
"Assume that the message-security-assist extension facility 5 is installed" | "Assume that the message-security-assist extension facility 5 is installed" | ||||
>; | >; | ||||
def FeatureDFPPackedConversion : SystemZFeature< | def FeatureDFPPackedConversion : SystemZFeature< | ||||
"dfp-packed-conversion", "DFPPackedConversion", | "dfp-packed-conversion", "DFPPackedConversion", (all_of FeatureDFPPackedConversion), | ||||
"Assume that the DFP packed-conversion facility is installed" | "Assume that the DFP packed-conversion facility is installed" | ||||
>; | >; | ||||
def FeatureVector : SystemZFeature< | def FeatureVector : SystemZFeature< | ||||
"vector", "Vector", | "vector", "Vector", (all_of FeatureVector), | ||||
"Assume that the vectory facility is installed" | "Assume that the vectory facility is installed" | ||||
>; | >; | ||||
def FeatureNoVector : SystemZMissingFeature<"Vector">; | def FeatureNoVector : SystemZMissingFeature<"Vector">; | ||||
def Arch11NewFeatures : SystemZFeatureList<[ | def Arch11NewFeatures : SystemZFeatureList<[ | ||||
FeatureLoadAndZeroRightmostByte, | FeatureLoadAndZeroRightmostByte, | ||||
FeatureLoadStoreOnCond2, | FeatureLoadStoreOnCond2, | ||||
FeatureMessageSecurityAssist5, | FeatureMessageSecurityAssist5, | ||||
FeatureDFPPackedConversion, | FeatureDFPPackedConversion, | ||||
FeatureVector | FeatureVector | ||||
]>; | ]>; | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// New features added in the Twelvth Edition of the z/Architecture | // New features added in the Twelvth Edition of the z/Architecture | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
def FeatureMiscellaneousExtensions2 : SystemZFeature< | def FeatureMiscellaneousExtensions2 : SystemZFeature< | ||||
"miscellaneous-extensions-2", "MiscellaneousExtensions2", | "miscellaneous-extensions-2", "MiscellaneousExtensions2", (all_of FeatureMiscellaneousExtensions2), | ||||
"Assume that the miscellaneous-extensions facility 2 is installed" | "Assume that the miscellaneous-extensions facility 2 is installed" | ||||
>; | >; | ||||
def FeatureGuardedStorage : SystemZFeature< | def FeatureGuardedStorage : SystemZFeature< | ||||
"guarded-storage", "GuardedStorage", | "guarded-storage", "GuardedStorage", (all_of FeatureGuardedStorage), | ||||
"Assume that the guarded-storage facility is installed" | "Assume that the guarded-storage facility is installed" | ||||
>; | >; | ||||
def FeatureMessageSecurityAssist7 : SystemZFeature< | def FeatureMessageSecurityAssist7 : SystemZFeature< | ||||
"message-security-assist-extension7", "MessageSecurityAssist7", | "message-security-assist-extension7", "MessageSecurityAssist7", (all_of FeatureMessageSecurityAssist7), | ||||
"Assume that the message-security-assist extension facility 7 is installed" | "Assume that the message-security-assist extension facility 7 is installed" | ||||
>; | >; | ||||
def FeatureMessageSecurityAssist8 : SystemZFeature< | def FeatureMessageSecurityAssist8 : SystemZFeature< | ||||
"message-security-assist-extension8", "MessageSecurityAssist8", | "message-security-assist-extension8", "MessageSecurityAssist8", (all_of FeatureMessageSecurityAssist8), | ||||
"Assume that the message-security-assist extension facility 8 is installed" | "Assume that the message-security-assist extension facility 8 is installed" | ||||
>; | >; | ||||
def FeatureVectorEnhancements1 : SystemZFeature< | def FeatureVectorEnhancements1 : SystemZFeature< | ||||
"vector-enhancements-1", "VectorEnhancements1", | "vector-enhancements-1", "VectorEnhancements1", (all_of FeatureVectorEnhancements1), | ||||
"Assume that the vector enhancements facility 1 is installed" | "Assume that the vector enhancements facility 1 is installed" | ||||
>; | >; | ||||
def FeatureNoVectorEnhancements1 : SystemZMissingFeature<"VectorEnhancements1">; | def FeatureNoVectorEnhancements1 : SystemZMissingFeature<"VectorEnhancements1">; | ||||
def FeatureVectorPackedDecimal : SystemZFeature< | def FeatureVectorPackedDecimal : SystemZFeature< | ||||
"vector-packed-decimal", "VectorPackedDecimal", | "vector-packed-decimal", "VectorPackedDecimal", (all_of FeatureVectorPackedDecimal), | ||||
"Assume that the vector packed decimal facility is installed" | "Assume that the vector packed decimal facility is installed" | ||||
>; | >; | ||||
def FeatureInsertReferenceBitsMultiple : SystemZFeature< | def FeatureInsertReferenceBitsMultiple : SystemZFeature< | ||||
"insert-reference-bits-multiple", "InsertReferenceBitsMultiple", | "insert-reference-bits-multiple", "InsertReferenceBitsMultiple", (all_of FeatureInsertReferenceBitsMultiple), | ||||
"Assume that the insert-reference-bits-multiple facility is installed" | "Assume that the insert-reference-bits-multiple facility is installed" | ||||
>; | >; | ||||
def Arch12NewFeatures : SystemZFeatureList<[ | def Arch12NewFeatures : SystemZFeatureList<[ | ||||
FeatureMiscellaneousExtensions2, | FeatureMiscellaneousExtensions2, | ||||
FeatureGuardedStorage, | FeatureGuardedStorage, | ||||
FeatureMessageSecurityAssist7, | FeatureMessageSecurityAssist7, | ||||
FeatureMessageSecurityAssist8, | FeatureMessageSecurityAssist8, | ||||
FeatureVectorEnhancements1, | FeatureVectorEnhancements1, | ||||
FeatureVectorPackedDecimal, | FeatureVectorPackedDecimal, | ||||
FeatureInsertReferenceBitsMultiple | FeatureInsertReferenceBitsMultiple | ||||
]>; | ]>; | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// | // | ||||
// New features added in the Thirteenth Edition of the z/Architecture | // New features added in the Thirteenth Edition of the z/Architecture | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
def FeatureMiscellaneousExtensions3 : SystemZFeature< | def FeatureMiscellaneousExtensions3 : SystemZFeature< | ||||
"miscellaneous-extensions-3", "MiscellaneousExtensions3", | "miscellaneous-extensions-3", "MiscellaneousExtensions3", (all_of FeatureMiscellaneousExtensions3), | ||||
"Assume that the miscellaneous-extensions facility 3 is installed" | "Assume that the miscellaneous-extensions facility 3 is installed" | ||||
>; | >; | ||||
def FeatureMessageSecurityAssist9 : SystemZFeature< | def FeatureMessageSecurityAssist9 : SystemZFeature< | ||||
"message-security-assist-extension9", "MessageSecurityAssist9", | "message-security-assist-extension9", "MessageSecurityAssist9", (all_of FeatureMessageSecurityAssist9), | ||||
"Assume that the message-security-assist extension facility 9 is installed" | "Assume that the message-security-assist extension facility 9 is installed" | ||||
>; | >; | ||||
def FeatureVectorEnhancements2 : SystemZFeature< | def FeatureVectorEnhancements2 : SystemZFeature< | ||||
"vector-enhancements-2", "VectorEnhancements2", | "vector-enhancements-2", "VectorEnhancements2", (all_of FeatureVectorEnhancements2), | ||||
"Assume that the vector enhancements facility 2 is installed" | "Assume that the vector enhancements facility 2 is installed" | ||||
>; | >; | ||||
def FeatureVectorPackedDecimalEnhancement : SystemZFeature< | def FeatureVectorPackedDecimalEnhancement : SystemZFeature< | ||||
"vector-packed-decimal-enhancement", "VectorPackedDecimalEnhancement", | "vector-packed-decimal-enhancement", "VectorPackedDecimalEnhancement", (all_of FeatureVectorPackedDecimalEnhancement), | ||||
"Assume that the vector packed decimal enhancement facility is installed" | "Assume that the vector packed decimal enhancement facility is installed" | ||||
>; | >; | ||||
def FeatureEnhancedSort : SystemZFeature< | def FeatureEnhancedSort : SystemZFeature< | ||||
"enhanced-sort", "EnhancedSort", | "enhanced-sort", "EnhancedSort", (all_of FeatureEnhancedSort), | ||||
"Assume that the enhanced-sort facility is installed" | "Assume that the enhanced-sort facility is installed" | ||||
>; | >; | ||||
def FeatureDeflateConversion : SystemZFeature< | def FeatureDeflateConversion : SystemZFeature< | ||||
"deflate-conversion", "DeflateConversion", | "deflate-conversion", "DeflateConversion", (all_of FeatureDeflateConversion), | ||||
"Assume that the deflate-conversion facility is installed" | "Assume that the deflate-conversion facility is installed" | ||||
>; | >; | ||||
def Arch13NewFeatures : SystemZFeatureList<[ | def Arch13NewFeatures : SystemZFeatureList<[ | ||||
FeatureMiscellaneousExtensions3, | FeatureMiscellaneousExtensions3, | ||||
FeatureMessageSecurityAssist9, | FeatureMessageSecurityAssist9, | ||||
FeatureVectorEnhancements2, | FeatureVectorEnhancements2, | ||||
FeatureVectorPackedDecimalEnhancement, | FeatureVectorPackedDecimalEnhancement, | ||||
Show All 36 Lines |