Richard Sandiford | 27d1cfe | 2013-07-19 16:09:03 +0000 | [diff] [blame] | 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 | // Processor and feature definitions. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | class SystemZFeature<string extname, string intname, string desc> |
Eric Christopher | a673417 | 2015-01-31 00:06:45 +0000 | [diff] [blame] | 15 | : Predicate<"Subtarget->has"##intname##"()">, |
Richard Sandiford | 27d1cfe | 2013-07-19 16:09:03 +0000 | [diff] [blame] | 16 | AssemblerPredicate<"Feature"##intname, extname>, |
| 17 | SubtargetFeature<extname, "Has"##intname, "true", desc>; |
| 18 | |
Richard Sandiford | 41350a5 | 2013-12-24 15:18:04 +0000 | [diff] [blame] | 19 | class SystemZMissingFeature<string intname> |
Eric Christopher | a673417 | 2015-01-31 00:06:45 +0000 | [diff] [blame] | 20 | : Predicate<"!Subtarget->has"##intname##"()">; |
Richard Sandiford | 41350a5 | 2013-12-24 15:18:04 +0000 | [diff] [blame] | 21 | |
Richard Sandiford | 27d1cfe | 2013-07-19 16:09:03 +0000 | [diff] [blame] | 22 | def FeatureDistinctOps : SystemZFeature< |
| 23 | "distinct-ops", "DistinctOps", |
| 24 | "Assume that the distinct-operands facility is installed" |
| 25 | >; |
| 26 | |
Richard Sandiford | a68e6f5 | 2013-07-25 08:57:02 +0000 | [diff] [blame] | 27 | def FeatureLoadStoreOnCond : SystemZFeature< |
| 28 | "load-store-on-cond", "LoadStoreOnCond", |
| 29 | "Assume that the load/store-on-condition facility is installed" |
| 30 | >; |
| 31 | |
Richard Sandiford | 6cf80b3 | 2013-07-31 11:17:35 +0000 | [diff] [blame] | 32 | def FeatureHighWord : SystemZFeature< |
| 33 | "high-word", "HighWord", |
| 34 | "Assume that the high-word facility is installed" |
| 35 | >; |
| 36 | |
Richard Sandiford | 8e92c38 | 2013-08-21 08:58:08 +0000 | [diff] [blame] | 37 | def FeatureFPExtension : SystemZFeature< |
| 38 | "fp-extension", "FPExtension", |
| 39 | "Assume that the floating-point extension facility is installed" |
| 40 | >; |
| 41 | |
Ulrich Weigand | b401218 | 2015-03-31 12:56:33 +0000 | [diff] [blame] | 42 | def FeaturePopulationCount : SystemZFeature< |
| 43 | "population-count", "PopulationCount", |
| 44 | "Assume that the population-count facility is installed" |
| 45 | >; |
| 46 | |
Richard Sandiford | 9afe613 | 2013-12-10 10:36:34 +0000 | [diff] [blame] | 47 | def FeatureFastSerialization : SystemZFeature< |
| 48 | "fast-serialization", "FastSerialization", |
| 49 | "Assume that the fast-serialization facility is installed" |
| 50 | >; |
| 51 | |
Richard Sandiford | 45645a2 | 2013-12-24 15:14:05 +0000 | [diff] [blame] | 52 | def FeatureInterlockedAccess1 : SystemZFeature< |
| 53 | "interlocked-access1", "InterlockedAccess1", |
| 54 | "Assume that interlocked-access facility 1 is installed" |
| 55 | >; |
Richard Sandiford | 41350a5 | 2013-12-24 15:18:04 +0000 | [diff] [blame] | 56 | def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">; |
Richard Sandiford | 45645a2 | 2013-12-24 15:14:05 +0000 | [diff] [blame] | 57 | |
Ulrich Weigand | 371d10a | 2015-03-31 12:58:17 +0000 | [diff] [blame] | 58 | def FeatureMiscellaneousExtensions : SystemZFeature< |
| 59 | "miscellaneous-extensions", "MiscellaneousExtensions", |
| 60 | "Assume that the miscellaneous-extensions facility is installed" |
| 61 | >; |
| 62 | |
Ulrich Weigand | 57c85f5 | 2015-04-01 12:51:43 +0000 | [diff] [blame] | 63 | def FeatureTransactionalExecution : SystemZFeature< |
| 64 | "transactional-execution", "TransactionalExecution", |
| 65 | "Assume that the transactional-execution facility is installed" |
| 66 | >; |
| 67 | |
| 68 | def FeatureProcessorAssist : SystemZFeature< |
| 69 | "processor-assist", "ProcessorAssist", |
| 70 | "Assume that the processor-assist facility is installed" |
| 71 | >; |
| 72 | |
Ulrich Weigand | a8b04e1 | 2015-05-05 19:23:40 +0000 | [diff] [blame] | 73 | def FeatureVector : SystemZFeature< |
| 74 | "vector", "Vector", |
| 75 | "Assume that the vectory facility is installed" |
| 76 | >; |
| 77 | def FeatureNoVector : SystemZMissingFeature<"Vector">; |
| 78 | |
Richard Sandiford | f834ea1 | 2013-10-31 12:14:17 +0000 | [diff] [blame] | 79 | def : Processor<"generic", NoItineraries, []>; |
| 80 | def : Processor<"z10", NoItineraries, []>; |
| 81 | def : Processor<"z196", NoItineraries, |
Richard Sandiford | 8e92c38 | 2013-08-21 08:58:08 +0000 | [diff] [blame] | 82 | [FeatureDistinctOps, FeatureLoadStoreOnCond, FeatureHighWord, |
Ulrich Weigand | b401218 | 2015-03-31 12:56:33 +0000 | [diff] [blame] | 83 | FeatureFPExtension, FeaturePopulationCount, |
| 84 | FeatureFastSerialization, FeatureInterlockedAccess1]>; |
Richard Sandiford | a68e6f5 | 2013-07-25 08:57:02 +0000 | [diff] [blame] | 85 | def : Processor<"zEC12", NoItineraries, |
Richard Sandiford | 8e92c38 | 2013-08-21 08:58:08 +0000 | [diff] [blame] | 86 | [FeatureDistinctOps, FeatureLoadStoreOnCond, FeatureHighWord, |
Ulrich Weigand | b401218 | 2015-03-31 12:56:33 +0000 | [diff] [blame] | 87 | FeatureFPExtension, FeaturePopulationCount, |
Ulrich Weigand | 371d10a | 2015-03-31 12:58:17 +0000 | [diff] [blame] | 88 | FeatureFastSerialization, FeatureInterlockedAccess1, |
Ulrich Weigand | 57c85f5 | 2015-04-01 12:51:43 +0000 | [diff] [blame] | 89 | FeatureMiscellaneousExtensions, |
| 90 | FeatureTransactionalExecution, FeatureProcessorAssist]>; |
Ulrich Weigand | a8b04e1 | 2015-05-05 19:23:40 +0000 | [diff] [blame] | 91 | def : Processor<"z13", NoItineraries, |
| 92 | [FeatureDistinctOps, FeatureLoadStoreOnCond, FeatureHighWord, |
| 93 | FeatureFPExtension, FeaturePopulationCount, |
| 94 | FeatureFastSerialization, FeatureInterlockedAccess1, |
| 95 | FeatureTransactionalExecution, FeatureProcessorAssist, |
| 96 | FeatureVector]>; |