Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 1 | //===-- X86.td - Target definition file for the Intel X86 --*- tablegen -*-===// |
Michael J. Spencer | b88784c | 2011-04-14 14:33:36 +0000 | [diff] [blame] | 2 | // |
John Criswell | 29265fe | 2003-10-21 15:17:13 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | f3ebc3f | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Michael J. Spencer | b88784c | 2011-04-14 14:33:36 +0000 | [diff] [blame] | 7 | // |
John Criswell | 29265fe | 2003-10-21 15:17:13 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Chris Lattner | 5da8e80 | 2003-08-03 15:47:49 +0000 | [diff] [blame] | 9 | // |
Craig Topper | 271064e | 2011-10-11 06:44:02 +0000 | [diff] [blame] | 10 | // This is a target description file for the Intel i386 architecture, referred |
| 11 | // to here as the "X86" architecture. |
Chris Lattner | 5da8e80 | 2003-08-03 15:47:49 +0000 | [diff] [blame] | 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Chris Lattner | 2551080 | 2003-08-04 04:59:56 +0000 | [diff] [blame] | 15 | // Get the target-independent interfaces which we are implementing... |
Chris Lattner | 5da8e80 | 2003-08-03 15:47:49 +0000 | [diff] [blame] | 16 | // |
Evan Cheng | 977e7be | 2008-11-24 07:34:46 +0000 | [diff] [blame] | 17 | include "llvm/Target/Target.td" |
Chris Lattner | 5da8e80 | 2003-08-03 15:47:49 +0000 | [diff] [blame] | 18 | |
| 19 | //===----------------------------------------------------------------------===// |
Anitha Boyapati | 426feb6 | 2012-08-16 03:50:04 +0000 | [diff] [blame] | 20 | // X86 Subtarget state |
Evan Cheng | 13bcc6c | 2011-07-07 21:06:52 +0000 | [diff] [blame] | 21 | // |
| 22 | |
| 23 | def Mode64Bit : SubtargetFeature<"64bit-mode", "In64BitMode", "true", |
| 24 | "64-bit mode (x86_64)">; |
Craig Topper | 3c80d62 | 2014-01-06 04:55:54 +0000 | [diff] [blame] | 25 | def Mode32Bit : SubtargetFeature<"32bit-mode", "In32BitMode", "true", |
| 26 | "32-bit mode (80386)">; |
| 27 | def Mode16Bit : SubtargetFeature<"16bit-mode", "In16BitMode", "true", |
| 28 | "16-bit mode (i8086)">; |
Evan Cheng | 13bcc6c | 2011-07-07 21:06:52 +0000 | [diff] [blame] | 29 | |
| 30 | //===----------------------------------------------------------------------===// |
Anitha Boyapati | 426feb6 | 2012-08-16 03:50:04 +0000 | [diff] [blame] | 31 | // X86 Subtarget features |
Bill Wendling | e618226 | 2007-05-04 20:38:40 +0000 | [diff] [blame] | 32 | //===----------------------------------------------------------------------===// |
Chris Lattner | cc8c581 | 2009-09-02 05:53:04 +0000 | [diff] [blame] | 33 | |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 34 | def FeatureX87 : SubtargetFeature<"x87","HasX87", "true", |
| 35 | "Enable X87 float instructions">; |
| 36 | |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 37 | def FeatureNOPL : SubtargetFeature<"nopl", "HasNOPL", "true", |
| 38 | "Enable NOPL instruction">; |
| 39 | |
Chris Lattner | cc8c581 | 2009-09-02 05:53:04 +0000 | [diff] [blame] | 40 | def FeatureCMOV : SubtargetFeature<"cmov","HasCMov", "true", |
| 41 | "Enable conditional move instructions">; |
| 42 | |
Benjamin Kramer | 2f48923 | 2010-12-04 20:32:23 +0000 | [diff] [blame] | 43 | def FeaturePOPCNT : SubtargetFeature<"popcnt", "HasPOPCNT", "true", |
| 44 | "Support POPCNT instruction">; |
| 45 | |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 46 | def FeatureFXSR : SubtargetFeature<"fxsr", "HasFXSR", "true", |
| 47 | "Support fxsave/fxrestore instructions">; |
| 48 | |
Amjad Aboud | 1db6d7a | 2015-10-12 11:47:46 +0000 | [diff] [blame] | 49 | def FeatureXSAVE : SubtargetFeature<"xsave", "HasXSAVE", "true", |
| 50 | "Support xsave instructions">; |
| 51 | |
| 52 | def FeatureXSAVEOPT: SubtargetFeature<"xsaveopt", "HasXSAVEOPT", "true", |
| 53 | "Support xsaveopt instructions">; |
| 54 | |
| 55 | def FeatureXSAVEC : SubtargetFeature<"xsavec", "HasXSAVEC", "true", |
| 56 | "Support xsavec instructions">; |
| 57 | |
| 58 | def FeatureXSAVES : SubtargetFeature<"xsaves", "HasXSAVES", "true", |
| 59 | "Support xsaves instructions">; |
| 60 | |
Bill Wendling | e618226 | 2007-05-04 20:38:40 +0000 | [diff] [blame] | 61 | def FeatureSSE1 : SubtargetFeature<"sse", "X86SSELevel", "SSE1", |
| 62 | "Enable SSE instructions", |
Chris Lattner | cc8c581 | 2009-09-02 05:53:04 +0000 | [diff] [blame] | 63 | // SSE codegen depends on cmovs, and all |
Michael J. Spencer | b88784c | 2011-04-14 14:33:36 +0000 | [diff] [blame] | 64 | // SSE1+ processors support them. |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 65 | [FeatureCMOV]>; |
Bill Wendling | e618226 | 2007-05-04 20:38:40 +0000 | [diff] [blame] | 66 | def FeatureSSE2 : SubtargetFeature<"sse2", "X86SSELevel", "SSE2", |
| 67 | "Enable SSE2 instructions", |
| 68 | [FeatureSSE1]>; |
| 69 | def FeatureSSE3 : SubtargetFeature<"sse3", "X86SSELevel", "SSE3", |
| 70 | "Enable SSE3 instructions", |
| 71 | [FeatureSSE2]>; |
| 72 | def FeatureSSSE3 : SubtargetFeature<"ssse3", "X86SSELevel", "SSSE3", |
| 73 | "Enable SSSE3 instructions", |
| 74 | [FeatureSSE3]>; |
Rafael Espindola | 94a2c56 | 2013-08-23 20:21:34 +0000 | [diff] [blame] | 75 | def FeatureSSE41 : SubtargetFeature<"sse4.1", "X86SSELevel", "SSE41", |
Nate Begeman | e14fdfa | 2008-02-03 07:18:54 +0000 | [diff] [blame] | 76 | "Enable SSE 4.1 instructions", |
| 77 | [FeatureSSSE3]>; |
Rafael Espindola | 94a2c56 | 2013-08-23 20:21:34 +0000 | [diff] [blame] | 78 | def FeatureSSE42 : SubtargetFeature<"sse4.2", "X86SSELevel", "SSE42", |
Nate Begeman | e14fdfa | 2008-02-03 07:18:54 +0000 | [diff] [blame] | 79 | "Enable SSE 4.2 instructions", |
Craig Topper | 7bd3305 | 2011-12-29 15:51:45 +0000 | [diff] [blame] | 80 | [FeatureSSE41]>; |
Eric Christopher | 57a6e13 | 2015-11-14 03:04:00 +0000 | [diff] [blame] | 81 | // The MMX subtarget feature is separate from the rest of the SSE features |
| 82 | // because it's important (for odd compatibility reasons) to be able to |
| 83 | // turn it off explicitly while allowing SSE+ to be on. |
| 84 | def FeatureMMX : SubtargetFeature<"mmx","X863DNowLevel", "MMX", |
| 85 | "Enable MMX instructions">; |
Bill Wendling | e618226 | 2007-05-04 20:38:40 +0000 | [diff] [blame] | 86 | def Feature3DNow : SubtargetFeature<"3dnow", "X863DNowLevel", "ThreeDNow", |
Michael J. Spencer | 30088ba | 2011-04-15 00:32:41 +0000 | [diff] [blame] | 87 | "Enable 3DNow! instructions", |
| 88 | [FeatureMMX]>; |
Bill Wendling | e618226 | 2007-05-04 20:38:40 +0000 | [diff] [blame] | 89 | def Feature3DNowA : SubtargetFeature<"3dnowa", "X863DNowLevel", "ThreeDNowA", |
Bill Wendling | f985c49 | 2007-05-06 07:56:19 +0000 | [diff] [blame] | 90 | "Enable 3DNow! Athlon instructions", |
| 91 | [Feature3DNow]>; |
Dan Gohman | 7403751 | 2009-02-03 00:04:43 +0000 | [diff] [blame] | 92 | // All x86-64 hardware has SSE2, but we don't mark SSE2 as an implied |
| 93 | // feature, because SSE2 can be disabled (e.g. for compiling OS kernels) |
| 94 | // without disabling 64-bit mode. |
Bill Wendling | f985c49 | 2007-05-06 07:56:19 +0000 | [diff] [blame] | 95 | def Feature64Bit : SubtargetFeature<"64bit", "HasX86_64", "true", |
Chris Lattner | 77f7dba | 2010-03-14 22:24:34 +0000 | [diff] [blame] | 96 | "Support 64-bit instructions", |
| 97 | [FeatureCMOV]>; |
Nick Lewycky | 3be42b8 | 2013-10-05 20:11:44 +0000 | [diff] [blame] | 98 | def FeatureCMPXCHG16B : SubtargetFeature<"cx16", "HasCmpxchg16b", "true", |
Eli Friedman | 5e57042 | 2011-08-26 21:21:21 +0000 | [diff] [blame] | 99 | "64-bit with cmpxchg16b", |
| 100 | [Feature64Bit]>; |
Ekaterina Romanova | d5fa554 | 2013-11-21 23:21:26 +0000 | [diff] [blame] | 101 | def FeatureSlowSHLD : SubtargetFeature<"slow-shld", "IsSHLDSlow", "true", |
| 102 | "SHLD instruction is slow">; |
Zvi Rackover | 8bc7e4d | 2016-12-06 19:35:20 +0000 | [diff] [blame] | 103 | def FeatureSlowPMULLD : SubtargetFeature<"slow-pmulld", "IsPMULLDSlow", "true", |
| 104 | "PMULLD instruction is slow">; |
Sanjay Patel | 3014567 | 2015-09-01 20:51:51 +0000 | [diff] [blame] | 105 | // FIXME: This should not apply to CPUs that do not have SSE. |
| 106 | def FeatureSlowUAMem16 : SubtargetFeature<"slow-unaligned-mem-16", |
| 107 | "IsUAMem16Slow", "true", |
| 108 | "Slow unaligned 16-byte memory access">; |
Sanjay Patel | 501890e | 2014-11-21 17:40:04 +0000 | [diff] [blame] | 109 | def FeatureSlowUAMem32 : SubtargetFeature<"slow-unaligned-mem-32", |
Sanjay Patel | 9e916dc | 2015-08-21 20:17:26 +0000 | [diff] [blame] | 110 | "IsUAMem32Slow", "true", |
| 111 | "Slow unaligned 32-byte memory access">; |
Stefanus Du Toit | 96180b5 | 2009-05-26 21:04:35 +0000 | [diff] [blame] | 112 | def FeatureSSE4A : SubtargetFeature<"sse4a", "HasSSE4A", "true", |
Craig Topper | a5d1fc2 | 2011-12-30 07:16:00 +0000 | [diff] [blame] | 113 | "Support SSE 4a instructions", |
| 114 | [FeatureSSE3]>; |
Evan Cheng | ff1beda | 2006-10-06 09:17:41 +0000 | [diff] [blame] | 115 | |
Craig Topper | f287a45 | 2012-01-09 09:02:13 +0000 | [diff] [blame] | 116 | def FeatureAVX : SubtargetFeature<"avx", "X86SSELevel", "AVX", |
| 117 | "Enable AVX instructions", |
| 118 | [FeatureSSE42]>; |
| 119 | def FeatureAVX2 : SubtargetFeature<"avx2", "X86SSELevel", "AVX2", |
Craig Topper | 228d913 | 2011-10-30 19:57:21 +0000 | [diff] [blame] | 120 | "Enable AVX2 instructions", |
| 121 | [FeatureAVX]>; |
Craig Topper | cb6c386 | 2017-11-06 22:49:01 +0000 | [diff] [blame] | 122 | def FeatureFMA : SubtargetFeature<"fma", "HasFMA", "true", |
| 123 | "Enable three-operand fused multiple-add", |
| 124 | [FeatureAVX]>; |
Craig Topper | 428a4e6 | 2017-11-06 22:49:04 +0000 | [diff] [blame] | 125 | def FeatureF16C : SubtargetFeature<"f16c", "HasF16C", "true", |
| 126 | "Support 16-bit floating point conversion instructions", |
| 127 | [FeatureAVX]>; |
Craig Topper | 5c94bb8 | 2013-08-21 03:57:57 +0000 | [diff] [blame] | 128 | def FeatureAVX512 : SubtargetFeature<"avx512f", "X86SSELevel", "AVX512F", |
Elena Demikhovsky | 8cfb43f | 2013-07-24 11:02:47 +0000 | [diff] [blame] | 129 | "Enable AVX-512 instructions", |
Craig Topper | 428a4e6 | 2017-11-06 22:49:04 +0000 | [diff] [blame] | 130 | [FeatureAVX2, FeatureFMA, FeatureF16C]>; |
Craig Topper | 5c94bb8 | 2013-08-21 03:57:57 +0000 | [diff] [blame] | 131 | def FeatureERI : SubtargetFeature<"avx512er", "HasERI", "true", |
Elena Demikhovsky | 003e7d7 | 2013-07-28 08:28:38 +0000 | [diff] [blame] | 132 | "Enable AVX-512 Exponential and Reciprocal Instructions", |
| 133 | [FeatureAVX512]>; |
Craig Topper | 5c94bb8 | 2013-08-21 03:57:57 +0000 | [diff] [blame] | 134 | def FeatureCDI : SubtargetFeature<"avx512cd", "HasCDI", "true", |
Elena Demikhovsky | 003e7d7 | 2013-07-28 08:28:38 +0000 | [diff] [blame] | 135 | "Enable AVX-512 Conflict Detection Instructions", |
| 136 | [FeatureAVX512]>; |
Oren Ben Simhon | 7bf27f0 | 2017-05-25 13:45:23 +0000 | [diff] [blame] | 137 | def FeatureVPOPCNTDQ : SubtargetFeature<"avx512vpopcntdq", "HasVPOPCNTDQ", |
| 138 | "true", "Enable AVX-512 Population Count Instructions", |
| 139 | [FeatureAVX512]>; |
Craig Topper | 5c94bb8 | 2013-08-21 03:57:57 +0000 | [diff] [blame] | 140 | def FeaturePFI : SubtargetFeature<"avx512pf", "HasPFI", "true", |
Elena Demikhovsky | 003e7d7 | 2013-07-28 08:28:38 +0000 | [diff] [blame] | 141 | "Enable AVX-512 PreFetch Instructions", |
| 142 | [FeatureAVX512]>; |
Craig Topper | e268598 | 2017-12-22 02:30:30 +0000 | [diff] [blame] | 143 | def FeaturePREFETCHWT1 : SubtargetFeature<"prefetchwt1", "HasPREFETCHWT1", |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 144 | "true", |
| 145 | "Prefetch with Intent to Write and T1 Hint">; |
Robert Khasanov | bfa0131 | 2014-07-21 14:54:21 +0000 | [diff] [blame] | 146 | def FeatureDQI : SubtargetFeature<"avx512dq", "HasDQI", "true", |
| 147 | "Enable AVX-512 Doubleword and Quadword Instructions", |
| 148 | [FeatureAVX512]>; |
| 149 | def FeatureBWI : SubtargetFeature<"avx512bw", "HasBWI", "true", |
| 150 | "Enable AVX-512 Byte and Word Instructions", |
| 151 | [FeatureAVX512]>; |
| 152 | def FeatureVLX : SubtargetFeature<"avx512vl", "HasVLX", "true", |
| 153 | "Enable AVX-512 Vector Length eXtensions", |
| 154 | [FeatureAVX512]>; |
Michael Zuckerman | 97b6a692 | 2016-01-17 13:42:12 +0000 | [diff] [blame] | 155 | def FeatureVBMI : SubtargetFeature<"avx512vbmi", "HasVBMI", "true", |
Craig Topper | 5c842be | 2016-11-09 04:50:48 +0000 | [diff] [blame] | 156 | "Enable AVX-512 Vector Byte Manipulation Instructions", |
| 157 | [FeatureBWI]>; |
Coby Tayree | 71e37cc | 2017-11-21 09:48:44 +0000 | [diff] [blame] | 158 | def FeatureVBMI2 : SubtargetFeature<"avx512vbmi2", "HasVBMI2", "true", |
| 159 | "Enable AVX-512 further Vector Byte Manipulation Instructions", |
| 160 | [FeatureBWI]>; |
Craig Topper | 3bb3f73 | 2016-02-08 01:23:15 +0000 | [diff] [blame] | 161 | def FeatureIFMA : SubtargetFeature<"avx512ifma", "HasIFMA", "true", |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 162 | "Enable AVX-512 Integer Fused Multiple-Add", |
| 163 | [FeatureAVX512]>; |
Asaf Badouh | 5acf66f | 2015-12-15 13:35:29 +0000 | [diff] [blame] | 164 | def FeaturePKU : SubtargetFeature<"pku", "HasPKU", "true", |
| 165 | "Enable protection keys">; |
Coby Tayree | 3880f2a | 2017-11-21 10:04:28 +0000 | [diff] [blame] | 166 | def FeatureVNNI : SubtargetFeature<"avx512vnni", "HasVNNI", "true", |
| 167 | "Enable AVX-512 Vector Neural Network Instructions", |
| 168 | [FeatureAVX512]>; |
Coby Tayree | 5c7fe5d | 2017-11-21 10:32:42 +0000 | [diff] [blame] | 169 | def FeatureBITALG : SubtargetFeature<"avx512bitalg", "HasBITALG", "true", |
| 170 | "Enable AVX-512 Bit Algorithms", |
| 171 | [FeatureBWI]>; |
Benjamin Kramer | a0396e4 | 2012-05-31 14:34:17 +0000 | [diff] [blame] | 172 | def FeaturePCLMUL : SubtargetFeature<"pclmul", "HasPCLMUL", "true", |
| 173 | "Enable packed carry-less multiplication instructions", |
Craig Topper | 29dd148 | 2012-05-01 05:28:32 +0000 | [diff] [blame] | 174 | [FeatureSSE2]>; |
Coby Tayree | d8b17be | 2017-11-26 09:36:41 +0000 | [diff] [blame] | 175 | def FeatureGFNI : SubtargetFeature<"gfni", "HasGFNI", "true", |
| 176 | "Enable Galois Field Arithmetic Instructions", |
| 177 | [FeatureSSE2]>; |
Coby Tayree | 7ca5e587 | 2017-11-21 09:30:33 +0000 | [diff] [blame] | 178 | def FeatureVPCLMULQDQ : SubtargetFeature<"vpclmulqdq", "HasVPCLMULQDQ", "true", |
| 179 | "Enable vpclmulqdq instructions", |
| 180 | [FeatureAVX, FeaturePCLMUL]>; |
David Greene | 8f6f72c | 2009-06-26 22:46:54 +0000 | [diff] [blame] | 181 | def FeatureFMA4 : SubtargetFeature<"fma4", "HasFMA4", "true", |
Craig Topper | a5d1fc2 | 2011-12-30 07:16:00 +0000 | [diff] [blame] | 182 | "Enable four-operand fused multiple-add", |
Craig Topper | bae0e9e | 2012-05-01 06:54:48 +0000 | [diff] [blame] | 183 | [FeatureAVX, FeatureSSE4A]>; |
Craig Topper | a5d1fc2 | 2011-12-30 07:16:00 +0000 | [diff] [blame] | 184 | def FeatureXOP : SubtargetFeature<"xop", "HasXOP", "true", |
Craig Topper | 43518cc | 2012-05-01 05:41:41 +0000 | [diff] [blame] | 185 | "Enable XOP instructions", |
Anitha Boyapati | af3e983 | 2012-08-16 04:04:02 +0000 | [diff] [blame] | 186 | [FeatureFMA4]>; |
Sanjay Patel | ffd039b | 2015-02-03 17:13:04 +0000 | [diff] [blame] | 187 | def FeatureSSEUnalignedMem : SubtargetFeature<"sse-unaligned-mem", |
| 188 | "HasSSEUnalignedMem", "true", |
| 189 | "Allow unaligned memory operands with SSE instructions">; |
Eric Christopher | 2ef6318 | 2010-04-02 21:54:27 +0000 | [diff] [blame] | 190 | def FeatureAES : SubtargetFeature<"aes", "HasAES", "true", |
Craig Topper | 29dd148 | 2012-05-01 05:28:32 +0000 | [diff] [blame] | 191 | "Enable AES instructions", |
| 192 | [FeatureSSE2]>; |
Coby Tayree | 2a1c02f | 2017-11-21 09:11:41 +0000 | [diff] [blame] | 193 | def FeatureVAES : SubtargetFeature<"vaes", "HasVAES", "true", |
| 194 | "Promote selected AES instructions to AVX512/AVX registers", |
| 195 | [FeatureAVX, FeatureAES]>; |
Yunzhong Gao | dd36e93 | 2013-09-24 18:21:52 +0000 | [diff] [blame] | 196 | def FeatureTBM : SubtargetFeature<"tbm", "HasTBM", "true", |
| 197 | "Enable TBM instructions">; |
Simon Pilgrim | 99b925b | 2017-05-03 15:51:39 +0000 | [diff] [blame] | 198 | def FeatureLWP : SubtargetFeature<"lwp", "HasLWP", "true", |
| 199 | "Enable LWP instructions">; |
Craig Topper | 786bdb9 | 2011-10-03 17:28:23 +0000 | [diff] [blame] | 200 | def FeatureMOVBE : SubtargetFeature<"movbe", "HasMOVBE", "true", |
| 201 | "Support MOVBE instruction">; |
Rafael Espindola | 94a2c56 | 2013-08-23 20:21:34 +0000 | [diff] [blame] | 202 | def FeatureRDRAND : SubtargetFeature<"rdrnd", "HasRDRAND", "true", |
Craig Topper | 786bdb9 | 2011-10-03 17:28:23 +0000 | [diff] [blame] | 203 | "Support RDRAND instruction">; |
Craig Topper | 228d913 | 2011-10-30 19:57:21 +0000 | [diff] [blame] | 204 | def FeatureFSGSBase : SubtargetFeature<"fsgsbase", "HasFSGSBase", "true", |
| 205 | "Support FS/GS Base instructions">; |
Craig Topper | 271064e | 2011-10-11 06:44:02 +0000 | [diff] [blame] | 206 | def FeatureLZCNT : SubtargetFeature<"lzcnt", "HasLZCNT", "true", |
| 207 | "Support LZCNT instruction">; |
Craig Topper | 3657fe4 | 2011-10-14 03:21:46 +0000 | [diff] [blame] | 208 | def FeatureBMI : SubtargetFeature<"bmi", "HasBMI", "true", |
| 209 | "Support BMI instructions">; |
Craig Topper | aea148c | 2011-10-16 07:55:05 +0000 | [diff] [blame] | 210 | def FeatureBMI2 : SubtargetFeature<"bmi2", "HasBMI2", "true", |
| 211 | "Support BMI2 instructions">; |
Michael Liao | 73cffdd | 2012-11-08 07:28:54 +0000 | [diff] [blame] | 212 | def FeatureRTM : SubtargetFeature<"rtm", "HasRTM", "true", |
| 213 | "Support RTM instructions">; |
Kay Tiong Khoo | f809c64 | 2013-02-14 19:08:21 +0000 | [diff] [blame] | 214 | def FeatureADX : SubtargetFeature<"adx", "HasADX", "true", |
| 215 | "Support ADX instructions">; |
Ben Langmuir | 1650175 | 2013-09-12 15:51:31 +0000 | [diff] [blame] | 216 | def FeatureSHA : SubtargetFeature<"sha", "HasSHA", "true", |
| 217 | "Enable SHA instructions", |
| 218 | [FeatureSSE2]>; |
Oren Ben Simhon | fa582b0 | 2017-11-26 13:02:45 +0000 | [diff] [blame] | 219 | def FeatureSHSTK : SubtargetFeature<"shstk", "HasSHSTK", "true", |
| 220 | "Support CET Shadow-Stack instructions">; |
Michael Liao | 5173ee0 | 2013-03-26 17:47:11 +0000 | [diff] [blame] | 221 | def FeaturePRFCHW : SubtargetFeature<"prfchw", "HasPRFCHW", "true", |
| 222 | "Support PRFCHW instructions">; |
Michael Liao | a486a11 | 2013-03-28 23:41:26 +0000 | [diff] [blame] | 223 | def FeatureRDSEED : SubtargetFeature<"rdseed", "HasRDSEED", "true", |
| 224 | "Support RDSEED instruction">; |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 225 | def FeatureLAHFSAHF : SubtargetFeature<"sahf", "HasLAHFSAHF", "true", |
| 226 | "Support LAHF and SAHF instructions">; |
Ashutosh Nema | 348af9c | 2016-05-18 11:59:12 +0000 | [diff] [blame] | 227 | def FeatureMWAITX : SubtargetFeature<"mwaitx", "HasMWAITX", "true", |
| 228 | "Enable MONITORX/MWAITX timer functionality">; |
Craig Topper | 50f3d14 | 2017-02-09 04:27:34 +0000 | [diff] [blame] | 229 | def FeatureCLZERO : SubtargetFeature<"clzero", "HasCLZERO", "true", |
| 230 | "Enable Cache Line Zero">; |
Gabor Buella | 604be44 | 2018-04-13 07:35:08 +0000 | [diff] [blame] | 231 | def FeatureCLDEMOTE : SubtargetFeature<"cldemote", "HasCLDEMOTE", "true", |
| 232 | "Enable Cache Demote">; |
Gabor Buella | a832b22 | 2018-05-10 07:26:05 +0000 | [diff] [blame] | 233 | def FeaturePTWRITE : SubtargetFeature<"ptwrite", "HasPTWRITE", "true", |
| 234 | "Support ptwrite instruction">; |
Elena Demikhovsky | f7e641c | 2015-06-03 10:30:57 +0000 | [diff] [blame] | 235 | def FeatureMPX : SubtargetFeature<"mpx", "HasMPX", "true", |
| 236 | "Support MPX instructions">; |
Sanjay Patel | 53d1d8b | 2015-10-12 15:24:01 +0000 | [diff] [blame] | 237 | def FeatureLEAForSP : SubtargetFeature<"lea-sp", "UseLeaForSP", "true", |
Evan Cheng | 1b81fdd | 2012-02-07 22:50:41 +0000 | [diff] [blame] | 238 | "Use LEA for adjusting the stack pointer">; |
Alexey Volkov | fd1731d | 2014-11-21 11:19:34 +0000 | [diff] [blame] | 239 | def FeatureSlowDivide32 : SubtargetFeature<"idivl-to-divb", |
| 240 | "HasSlowDivide32", "true", |
| 241 | "Use 8-bit divide for positive values less than 256">; |
Nikolai Bozhenov | 6bdf92c | 2017-01-12 19:34:15 +0000 | [diff] [blame] | 242 | def FeatureSlowDivide64 : SubtargetFeature<"idivq-to-divl", |
Alexey Volkov | fd1731d | 2014-11-21 11:19:34 +0000 | [diff] [blame] | 243 | "HasSlowDivide64", "true", |
Nikolai Bozhenov | 6bdf92c | 2017-01-12 19:34:15 +0000 | [diff] [blame] | 244 | "Use 32-bit divide for positive values less than 2^32">; |
Preston Gurd | a01daac | 2013-01-08 18:27:24 +0000 | [diff] [blame] | 245 | def FeaturePadShortFunctions : SubtargetFeature<"pad-short-functions", |
| 246 | "PadShortFunctions", "true", |
| 247 | "Pad short functions">; |
Gabor Buella | d2f1ab1 | 2018-05-25 06:32:05 +0000 | [diff] [blame] | 248 | def FeatureINVPCID : SubtargetFeature<"invpcid", "HasINVPCID", "true", |
| 249 | "Invalidate Process-Context Identifier">; |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 250 | def FeatureSGX : SubtargetFeature<"sgx", "HasSGX", "true", |
| 251 | "Enable Software Guard Extensions">; |
| 252 | def FeatureCLFLUSHOPT : SubtargetFeature<"clflushopt", "HasCLFLUSHOPT", "true", |
| 253 | "Flush A Cache Line Optimized">; |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 254 | def FeatureCLWB : SubtargetFeature<"clwb", "HasCLWB", "true", |
| 255 | "Cache Line Write Back">; |
Gabor Buella | 2ef36f3 | 2018-04-11 20:01:57 +0000 | [diff] [blame] | 256 | def FeatureWBNOINVD : SubtargetFeature<"wbnoinvd", "HasWBNOINVD", "true", |
| 257 | "Write Back No Invalidate">; |
Craig Topper | 84b26b9 | 2018-01-18 23:52:31 +0000 | [diff] [blame] | 258 | def FeatureRDPID : SubtargetFeature<"rdpid", "HasRDPID", "true", |
| 259 | "Support RDPID instructions">; |
Gabor Buella | 31fa802 | 2018-04-20 18:42:47 +0000 | [diff] [blame] | 260 | def FeatureWAITPKG : SubtargetFeature<"waitpkg", "HasWAITPKG", "true", |
| 261 | "Wait and pause enhancements">; |
Craig Topper | 62c47a2 | 2017-08-29 05:14:27 +0000 | [diff] [blame] | 262 | // On some processors, instructions that implicitly take two memory operands are |
| 263 | // slow. In practice, this means that CALL, PUSH, and POP with memory operands |
| 264 | // should be avoided in favor of a MOV + register CALL/PUSH/POP. |
| 265 | def FeatureSlowTwoMemOps : SubtargetFeature<"slow-two-mem-ops", |
| 266 | "SlowTwoMemOps", "true", |
| 267 | "Two memory operand instructions are slow">; |
Preston Gurd | 8b7ab4b | 2013-04-25 20:29:37 +0000 | [diff] [blame] | 268 | def FeatureLEAUsesAG : SubtargetFeature<"lea-uses-ag", "LEAUsesAG", "true", |
| 269 | "LEA instruction needs inputs at AG stage">; |
Alexey Volkov | 6226de6 | 2014-05-20 08:55:50 +0000 | [diff] [blame] | 270 | def FeatureSlowLEA : SubtargetFeature<"slow-lea", "SlowLEA", "true", |
| 271 | "LEA instruction with certain arguments is slow">; |
Lama Saba | 2ea271b | 2017-05-18 08:11:50 +0000 | [diff] [blame] | 272 | def FeatureSlow3OpsLEA : SubtargetFeature<"slow-3ops-lea", "Slow3OpsLEA", "true", |
| 273 | "LEA instruction with 3 ops or certain registers is slow">; |
Alexey Volkov | 5260dba | 2014-06-09 11:40:41 +0000 | [diff] [blame] | 274 | def FeatureSlowIncDec : SubtargetFeature<"slow-incdec", "SlowIncDec", "true", |
| 275 | "INC and DEC instructions are slower than ADD and SUB">; |
Eric Christopher | 824f42f | 2015-05-12 01:26:05 +0000 | [diff] [blame] | 276 | def FeatureSoftFloat |
| 277 | : SubtargetFeature<"soft-float", "UseSoftFloat", "true", |
| 278 | "Use software floating point features.">; |
Marina Yatsina | 77a21db | 2018-01-22 10:07:01 +0000 | [diff] [blame] | 279 | def FeaturePOPCNTFalseDeps : SubtargetFeature<"false-deps-popcnt", |
| 280 | "HasPOPCNTFalseDeps", "true", |
| 281 | "POPCNT has a false dependency on dest register">; |
| 282 | def FeatureLZCNTFalseDeps : SubtargetFeature<"false-deps-lzcnt-tzcnt", |
| 283 | "HasLZCNTFalseDeps", "true", |
| 284 | "LZCNT/TZCNT have a false dependency on dest register">; |
Gabor Buella | 2b5e960 | 2018-05-08 06:47:36 +0000 | [diff] [blame] | 285 | def FeaturePCONFIG : SubtargetFeature<"pconfig", "HasPCONFIG", "true", |
| 286 | "platform configuration instruction">; |
Simon Pilgrim | fd5df63 | 2017-12-19 13:16:43 +0000 | [diff] [blame] | 287 | // On recent X86 (port bound) processors, its preferable to combine to a single shuffle |
| 288 | // using a variable mask over multiple fixed shuffles. |
| 289 | def FeatureFastVariableShuffle |
| 290 | : SubtargetFeature<"fast-variable-shuffle", |
| 291 | "HasFastVariableShuffle", |
| 292 | "true", "Shuffles with variable masks are fast">; |
Amjad Aboud | 4f97751 | 2017-03-03 09:03:24 +0000 | [diff] [blame] | 293 | // On some X86 processors, there is no performance hazard to writing only the |
| 294 | // lower parts of a YMM or ZMM register without clearing the upper part. |
| 295 | def FeatureFastPartialYMMorZMMWrite |
| 296 | : SubtargetFeature<"fast-partial-ymm-or-zmm-write", |
| 297 | "HasFastPartialYMMorZMMWrite", |
| 298 | "true", "Partial writes to YMM/ZMM registers are fast">; |
Nikolai Bozhenov | f679530 | 2016-08-04 12:47:28 +0000 | [diff] [blame] | 299 | // FeatureFastScalarFSQRT should be enabled if scalar FSQRT has shorter latency |
| 300 | // than the corresponding NR code. FeatureFastVectorFSQRT should be enabled if |
| 301 | // vector FSQRT has higher throughput than the corresponding NR code. |
| 302 | // The idea is that throughput bound code is likely to be vectorized, so for |
| 303 | // vectorized code we should care about the throughput of SQRT operations. |
| 304 | // But if the code is scalar that probably means that the code has some kind of |
| 305 | // dependency and we should care more about reducing the latency. |
| 306 | def FeatureFastScalarFSQRT |
| 307 | : SubtargetFeature<"fast-scalar-fsqrt", "HasFastScalarFSQRT", |
| 308 | "true", "Scalar SQRT is fast (disable Newton-Raphson)">; |
| 309 | def FeatureFastVectorFSQRT |
| 310 | : SubtargetFeature<"fast-vector-fsqrt", "HasFastVectorFSQRT", |
| 311 | "true", "Vector SQRT is fast (disable Newton-Raphson)">; |
Pierre Gousseau | b6d652a | 2016-10-14 16:41:38 +0000 | [diff] [blame] | 312 | // If lzcnt has equivalent latency/throughput to most simple integer ops, it can |
| 313 | // be used to replace test/set sequences. |
| 314 | def FeatureFastLZCNT |
| 315 | : SubtargetFeature< |
| 316 | "fast-lzcnt", "HasFastLZCNT", "true", |
| 317 | "LZCNT instructions are as fast as most simple integer ops">; |
Simon Pilgrim | 02bdac5 | 2018-01-29 21:24:31 +0000 | [diff] [blame] | 318 | // If the target can efficiently decode NOPs upto 11-bytes in length. |
| 319 | def FeatureFast11ByteNOP |
| 320 | : SubtargetFeature< |
| 321 | "fast-11bytenop", "HasFast11ByteNOP", "true", |
| 322 | "Target can quickly decode up to 11 byte NOPs">; |
| 323 | // If the target can efficiently decode NOPs upto 15-bytes in length. |
| 324 | def FeatureFast15ByteNOP |
| 325 | : SubtargetFeature< |
| 326 | "fast-15bytenop", "HasFast15ByteNOP", "true", |
| 327 | "Target can quickly decode up to 15 byte NOPs">; |
Craig Topper | d88389a | 2017-02-21 06:39:13 +0000 | [diff] [blame] | 328 | // Sandy Bridge and newer processors can use SHLD with the same source on both |
| 329 | // inputs to implement rotate to avoid the partial flag update of the normal |
| 330 | // rotate instructions. |
| 331 | def FeatureFastSHLDRotate |
| 332 | : SubtargetFeature< |
| 333 | "fast-shld-rotate", "HasFastSHLDRotate", "true", |
| 334 | "SHLD can be used as a faster rotate">; |
| 335 | |
Clement Courbet | 203fc17 | 2017-04-21 09:20:50 +0000 | [diff] [blame] | 336 | // Ivy Bridge and newer processors have enhanced REP MOVSB and STOSB (aka |
| 337 | // "string operations"). See "REP String Enhancement" in the Intel Software |
Clement Courbet | 41b4333 | 2017-04-21 09:21:05 +0000 | [diff] [blame] | 338 | // Development Manual. This feature essentially means that REP MOVSB will copy |
Clement Courbet | 203fc17 | 2017-04-21 09:20:50 +0000 | [diff] [blame] | 339 | // using the largest available size instead of copying bytes one by one, making |
| 340 | // it at least as fast as REPMOVS{W,D,Q}. |
| 341 | def FeatureERMSB |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 342 | : SubtargetFeature< |
Clement Courbet | 203fc17 | 2017-04-21 09:20:50 +0000 | [diff] [blame] | 343 | "ermsb", "HasERMSB", "true", |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 344 | "REP MOVS/STOS are fast">; |
| 345 | |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 346 | // Sandy Bridge and newer processors have many instructions that can be |
| 347 | // fused with conditional branches and pass through the CPU as a single |
| 348 | // operation. |
| 349 | def FeatureMacroFusion |
| 350 | : SubtargetFeature<"macrofusion", "HasMacroFusion", "true", |
| 351 | "Various instructions can be fused with conditional branches">; |
| 352 | |
Craig Topper | ea37e20 | 2017-11-25 18:09:37 +0000 | [diff] [blame] | 353 | // Gather is available since Haswell (AVX2 set). So technically, we can |
| 354 | // generate Gathers on all AVX2 processors. But the overhead on HSW is high. |
| 355 | // Skylake Client processor has faster Gathers than HSW and performance is |
| 356 | // similar to Skylake Server (AVX-512). |
| 357 | def FeatureHasFastGather |
| 358 | : SubtargetFeature<"fast-gather", "HasFastGather", "true", |
| 359 | "Indicates if gather is reasonably fast.">; |
| 360 | |
Craig Topper | 0d797a3 | 2018-01-20 00:26:08 +0000 | [diff] [blame] | 361 | def FeaturePrefer256Bit |
| 362 | : SubtargetFeature<"prefer-256-bit", "Prefer256Bit", "true", |
| 363 | "Prefer 256-bit AVX instructions">; |
| 364 | |
Chandler Carruth | c58f216 | 2018-01-22 22:05:25 +0000 | [diff] [blame] | 365 | // Enable mitigation of some aspects of speculative execution related |
| 366 | // vulnerabilities by removing speculatable indirect branches. This disables |
| 367 | // jump-table formation, rewrites explicit `indirectbr` instructions into |
| 368 | // `switch` instructions, and uses a special construct called a "retpoline" to |
| 369 | // prevent speculation of the remaining indirect branches (indirect calls and |
| 370 | // tail calls). |
| 371 | def FeatureRetpoline |
| 372 | : SubtargetFeature<"retpoline", "UseRetpoline", "true", |
| 373 | "Remove speculation of indirect branches from the " |
| 374 | "generated code, either by avoiding them entirely or " |
| 375 | "lowering them with a speculation blocking construct.">; |
| 376 | |
| 377 | // Rely on external thunks for the emitted retpoline calls. This allows users |
| 378 | // to provide their own custom thunk definitions in highly specialized |
| 379 | // environments such as a kernel that does boot-time hot patching. |
| 380 | def FeatureRetpolineExternalThunk |
| 381 | : SubtargetFeature< |
| 382 | "retpoline-external-thunk", "UseRetpolineExternalThunk", "true", |
| 383 | "Enable retpoline, but with an externally provided thunk.", |
| 384 | [FeatureRetpoline]>; |
| 385 | |
Gabor Buella | c8ded04 | 2018-05-01 10:01:16 +0000 | [diff] [blame] | 386 | // Direct Move instructions. |
| 387 | def FeatureMOVDIRI : SubtargetFeature<"movdiri", "HasMOVDIRI", "true", |
| 388 | "Support movdiri instruction">; |
| 389 | def FeatureMOVDIR64B : SubtargetFeature<"movdir64b", "HasMOVDIR64B", "true", |
| 390 | "Support movdir64b instruction">; |
| 391 | |
Evan Cheng | ff1beda | 2006-10-06 09:17:41 +0000 | [diff] [blame] | 392 | //===----------------------------------------------------------------------===// |
Craig Topper | 57c2815 | 2017-12-10 17:42:36 +0000 | [diff] [blame] | 393 | // Register File Description |
| 394 | //===----------------------------------------------------------------------===// |
| 395 | |
| 396 | include "X86RegisterInfo.td" |
| 397 | include "X86RegisterBanks.td" |
| 398 | |
| 399 | //===----------------------------------------------------------------------===// |
| 400 | // Instruction Descriptions |
Evan Cheng | ff1beda | 2006-10-06 09:17:41 +0000 | [diff] [blame] | 401 | //===----------------------------------------------------------------------===// |
| 402 | |
Andrew Trick | 8523b16 | 2012-02-01 23:20:51 +0000 | [diff] [blame] | 403 | include "X86Schedule.td" |
Craig Topper | 57c2815 | 2017-12-10 17:42:36 +0000 | [diff] [blame] | 404 | include "X86InstrInfo.td" |
Andrea Di Biagio | b6022aa | 2018-07-19 16:42:15 +0000 | [diff] [blame^] | 405 | include "X86SchedPredicates.td" |
Craig Topper | 57c2815 | 2017-12-10 17:42:36 +0000 | [diff] [blame] | 406 | |
| 407 | def X86InstrInfo : InstrInfo; |
| 408 | |
| 409 | //===----------------------------------------------------------------------===// |
| 410 | // X86 processors supported. |
| 411 | //===----------------------------------------------------------------------===// |
| 412 | |
| 413 | include "X86ScheduleAtom.td" |
| 414 | include "X86SchedSandyBridge.td" |
| 415 | include "X86SchedHaswell.td" |
| 416 | include "X86SchedBroadwell.td" |
| 417 | include "X86ScheduleSLM.td" |
| 418 | include "X86ScheduleZnver1.td" |
| 419 | include "X86ScheduleBtVer2.td" |
| 420 | include "X86SchedSkylakeClient.td" |
| 421 | include "X86SchedSkylakeServer.td" |
Andrew Trick | 8523b16 | 2012-02-01 23:20:51 +0000 | [diff] [blame] | 422 | |
| 423 | def ProcIntelAtom : SubtargetFeature<"atom", "X86ProcFamily", "IntelAtom", |
| 424 | "Intel Atom processors">; |
Preston Gurd | 3fe264d | 2013-09-13 19:23:28 +0000 | [diff] [blame] | 425 | def ProcIntelSLM : SubtargetFeature<"slm", "X86ProcFamily", "IntelSLM", |
| 426 | "Intel Silvermont processors">; |
Michael Zuckerman | 4bcb9c3 | 2017-06-29 10:00:33 +0000 | [diff] [blame] | 427 | def ProcIntelGLM : SubtargetFeature<"glm", "X86ProcFamily", "IntelGLM", |
| 428 | "Intel Goldmont processors">; |
Gabor Buella | 8f1646b | 2018-04-16 07:47:35 +0000 | [diff] [blame] | 429 | def ProcIntelGLP : SubtargetFeature<"glp", "X86ProcFamily", "IntelGLP", |
| 430 | "Intel Goldmont Plus processors">; |
| 431 | def ProcIntelTRM : SubtargetFeature<"tremont", "X86ProcFamily", "IntelTRM", |
| 432 | "Intel Tremont processors">; |
Mohammed Agabaria | e9aebf2 | 2017-09-13 09:00:27 +0000 | [diff] [blame] | 433 | def ProcIntelHSW : SubtargetFeature<"haswell", "X86ProcFamily", |
| 434 | "IntelHaswell", "Intel Haswell processors">; |
| 435 | def ProcIntelBDW : SubtargetFeature<"broadwell", "X86ProcFamily", |
| 436 | "IntelBroadwell", "Intel Broadwell processors">; |
| 437 | def ProcIntelSKL : SubtargetFeature<"skylake", "X86ProcFamily", |
| 438 | "IntelSkylake", "Intel Skylake processors">; |
| 439 | def ProcIntelKNL : SubtargetFeature<"knl", "X86ProcFamily", |
| 440 | "IntelKNL", "Intel Knights Landing processors">; |
| 441 | def ProcIntelSKX : SubtargetFeature<"skx", "X86ProcFamily", |
| 442 | "IntelSKX", "Intel Skylake Server processors">; |
| 443 | def ProcIntelCNL : SubtargetFeature<"cannonlake", "X86ProcFamily", |
| 444 | "IntelCannonlake", "Intel Cannonlake processors">; |
Gabor Buella | 213edc4 | 2018-04-10 18:59:13 +0000 | [diff] [blame] | 445 | def ProcIntelICL : SubtargetFeature<"icelake-client", "X86ProcFamily", |
| 446 | "IntelIcelakeClient", "Intel Icelake processors">; |
| 447 | def ProcIntelICX : SubtargetFeature<"icelake-server", "X86ProcFamily", |
| 448 | "IntelIcelakeServer", "Intel Icelake Server processors">; |
Andrew Trick | 8523b16 | 2012-02-01 23:20:51 +0000 | [diff] [blame] | 449 | |
Evan Cheng | ff1beda | 2006-10-06 09:17:41 +0000 | [diff] [blame] | 450 | class Proc<string Name, list<SubtargetFeature> Features> |
Andrew Trick | 87255e3 | 2012-07-07 04:00:00 +0000 | [diff] [blame] | 451 | : ProcessorModel<Name, GenericModel, Features>; |
Andrew Trick | 8523b16 | 2012-02-01 23:20:51 +0000 | [diff] [blame] | 452 | |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 453 | def : Proc<"generic", [FeatureX87, FeatureSlowUAMem16]>; |
| 454 | def : Proc<"i386", [FeatureX87, FeatureSlowUAMem16]>; |
| 455 | def : Proc<"i486", [FeatureX87, FeatureSlowUAMem16]>; |
| 456 | def : Proc<"i586", [FeatureX87, FeatureSlowUAMem16]>; |
| 457 | def : Proc<"pentium", [FeatureX87, FeatureSlowUAMem16]>; |
| 458 | def : Proc<"pentium-mmx", [FeatureX87, FeatureSlowUAMem16, FeatureMMX]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 459 | |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 460 | def : Proc<"i686", [FeatureX87, FeatureSlowUAMem16, FeatureCMOV]>; |
| 461 | def : Proc<"pentiumpro", [FeatureX87, FeatureSlowUAMem16, FeatureCMOV, |
| 462 | FeatureNOPL]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 463 | |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 464 | def : Proc<"pentium2", [FeatureX87, FeatureSlowUAMem16, FeatureMMX, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 465 | FeatureCMOV, FeatureFXSR, FeatureNOPL]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 466 | |
| 467 | foreach P = ["pentium3", "pentium3m"] in { |
| 468 | def : Proc<P, [FeatureX87, FeatureSlowUAMem16, FeatureMMX, FeatureSSE1, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 469 | FeatureFXSR, FeatureNOPL]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 470 | } |
Mitch Bodart | e60465d | 2016-04-27 22:52:35 +0000 | [diff] [blame] | 471 | |
| 472 | // Enable the PostRAScheduler for SSE2 and SSE3 class cpus. |
| 473 | // The intent is to enable it for pentium4 which is the current default |
| 474 | // processor in a vanilla 32-bit clang compilation when no specific |
| 475 | // architecture is specified. This generally gives a nice performance |
| 476 | // increase on silvermont, with largely neutral behavior on other |
| 477 | // contemporary large core processors. |
| 478 | // pentium-m, pentium4m, prescott and nocona are included as a preventative |
| 479 | // measure to avoid performance surprises, in case clang's default cpu |
| 480 | // changes slightly. |
| 481 | |
| 482 | def : ProcessorModel<"pentium-m", GenericPostRAModel, |
| 483 | [FeatureX87, FeatureSlowUAMem16, FeatureMMX, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 484 | FeatureSSE2, FeatureFXSR, FeatureNOPL]>; |
Mitch Bodart | e60465d | 2016-04-27 22:52:35 +0000 | [diff] [blame] | 485 | |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 486 | foreach P = ["pentium4", "pentium4m"] in { |
| 487 | def : ProcessorModel<P, GenericPostRAModel, |
| 488 | [FeatureX87, FeatureSlowUAMem16, FeatureMMX, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 489 | FeatureSSE2, FeatureFXSR, FeatureNOPL]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 490 | } |
Chandler Carruth | 32908d7 | 2014-05-07 17:37:03 +0000 | [diff] [blame] | 491 | |
Andrey Turetskiy | 958eb46 | 2016-04-01 10:16:15 +0000 | [diff] [blame] | 492 | // Intel Quark. |
| 493 | def : Proc<"lakemont", []>; |
| 494 | |
Jakob Stoklund Olesen | 1ac7e66 | 2013-03-26 22:19:12 +0000 | [diff] [blame] | 495 | // Intel Core Duo. |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 496 | def : ProcessorModel<"yonah", SandyBridgeModel, |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 497 | [FeatureX87, FeatureSlowUAMem16, FeatureMMX, FeatureSSE3, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 498 | FeatureFXSR, FeatureNOPL]>; |
Jakob Stoklund Olesen | 1ac7e66 | 2013-03-26 22:19:12 +0000 | [diff] [blame] | 499 | |
| 500 | // NetBurst. |
Mitch Bodart | e60465d | 2016-04-27 22:52:35 +0000 | [diff] [blame] | 501 | def : ProcessorModel<"prescott", GenericPostRAModel, |
| 502 | [FeatureX87, FeatureSlowUAMem16, FeatureMMX, FeatureSSE3, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 503 | FeatureFXSR, FeatureNOPL]>; |
Mitch Bodart | e60465d | 2016-04-27 22:52:35 +0000 | [diff] [blame] | 504 | def : ProcessorModel<"nocona", GenericPostRAModel, [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 505 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 506 | FeatureSlowUAMem16, |
| 507 | FeatureMMX, |
| 508 | FeatureSSE3, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 509 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 510 | FeatureNOPL, |
Craig Topper | 2738117 | 2017-10-15 16:57:33 +0000 | [diff] [blame] | 511 | FeatureCMPXCHG16B |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 512 | ]>; |
Jakob Stoklund Olesen | 1ac7e66 | 2013-03-26 22:19:12 +0000 | [diff] [blame] | 513 | |
| 514 | // Intel Core 2 Solo/Duo. |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 515 | def : ProcessorModel<"core2", SandyBridgeModel, [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 516 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 517 | FeatureSlowUAMem16, |
| 518 | FeatureMMX, |
| 519 | FeatureSSSE3, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 520 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 521 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 522 | FeatureCMPXCHG16B, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 523 | FeatureLAHFSAHF, |
| 524 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 525 | ]>; |
| 526 | def : ProcessorModel<"penryn", SandyBridgeModel, [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 527 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 528 | FeatureSlowUAMem16, |
| 529 | FeatureMMX, |
| 530 | FeatureSSE41, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 531 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 532 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 533 | FeatureCMPXCHG16B, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 534 | FeatureLAHFSAHF, |
| 535 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 536 | ]>; |
Jakob Stoklund Olesen | 1ac7e66 | 2013-03-26 22:19:12 +0000 | [diff] [blame] | 537 | |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 538 | // Atom CPUs. |
| 539 | class BonnellProc<string Name> : ProcessorModel<Name, AtomModel, [ |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 540 | ProcIntelAtom, |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 541 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 542 | FeatureSlowUAMem16, |
| 543 | FeatureMMX, |
| 544 | FeatureSSSE3, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 545 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 546 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 547 | FeatureCMPXCHG16B, |
| 548 | FeatureMOVBE, |
Sanjay Patel | 53d1d8b | 2015-10-12 15:24:01 +0000 | [diff] [blame] | 549 | FeatureLEAForSP, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 550 | FeatureSlowDivide32, |
| 551 | FeatureSlowDivide64, |
Craig Topper | 62c47a2 | 2017-08-29 05:14:27 +0000 | [diff] [blame] | 552 | FeatureSlowTwoMemOps, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 553 | FeatureLEAUsesAG, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 554 | FeaturePadShortFunctions, |
| 555 | FeatureLAHFSAHF |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 556 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 557 | def : BonnellProc<"bonnell">; |
| 558 | def : BonnellProc<"atom">; // Pin the generic name to the baseline. |
Jakob Stoklund Olesen | 1ac7e66 | 2013-03-26 22:19:12 +0000 | [diff] [blame] | 559 | |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 560 | class SilvermontProc<string Name> : ProcessorModel<Name, SLMModel, [ |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 561 | ProcIntelSLM, |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 562 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 563 | FeatureMMX, |
| 564 | FeatureSSE42, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 565 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 566 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 567 | FeatureCMPXCHG16B, |
| 568 | FeatureMOVBE, |
| 569 | FeaturePOPCNT, |
| 570 | FeaturePCLMUL, |
| 571 | FeatureAES, |
| 572 | FeatureSlowDivide64, |
Craig Topper | 62c47a2 | 2017-08-29 05:14:27 +0000 | [diff] [blame] | 573 | FeatureSlowTwoMemOps, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 574 | FeaturePRFCHW, |
| 575 | FeatureSlowLEA, |
| 576 | FeatureSlowIncDec, |
Zvi Rackover | 8bc7e4d | 2016-12-06 19:35:20 +0000 | [diff] [blame] | 577 | FeatureSlowPMULLD, |
Craig Topper | b207dd6 | 2018-01-26 19:34:14 +0000 | [diff] [blame] | 578 | FeatureRDRAND, |
Craig Topper | bc895a3 | 2018-04-19 19:25:24 +0000 | [diff] [blame] | 579 | FeatureLAHFSAHF, |
| 580 | FeaturePOPCNTFalseDeps |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 581 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 582 | def : SilvermontProc<"silvermont">; |
| 583 | def : SilvermontProc<"slm">; // Legacy alias. |
| 584 | |
Gabor Buella | 8f1646b | 2018-04-16 07:47:35 +0000 | [diff] [blame] | 585 | class ProcessorFeatures<list<SubtargetFeature> Inherited, |
| 586 | list<SubtargetFeature> NewFeatures> { |
| 587 | list<SubtargetFeature> Value = !listconcat(Inherited, NewFeatures); |
| 588 | } |
| 589 | |
| 590 | class ProcModel<string Name, SchedMachineModel Model, |
| 591 | list<SubtargetFeature> ProcFeatures, |
| 592 | list<SubtargetFeature> OtherFeatures> : |
| 593 | ProcessorModel<Name, Model, !listconcat(ProcFeatures, OtherFeatures)>; |
| 594 | |
| 595 | def GLMFeatures : ProcessorFeatures<[], [ |
Michael Zuckerman | 4bcb9c3 | 2017-06-29 10:00:33 +0000 | [diff] [blame] | 596 | FeatureX87, |
| 597 | FeatureMMX, |
| 598 | FeatureSSE42, |
| 599 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 600 | FeatureNOPL, |
Michael Zuckerman | 4bcb9c3 | 2017-06-29 10:00:33 +0000 | [diff] [blame] | 601 | FeatureCMPXCHG16B, |
| 602 | FeatureMOVBE, |
| 603 | FeaturePOPCNT, |
| 604 | FeaturePCLMUL, |
| 605 | FeatureAES, |
| 606 | FeaturePRFCHW, |
Craig Topper | 62c47a2 | 2017-08-29 05:14:27 +0000 | [diff] [blame] | 607 | FeatureSlowTwoMemOps, |
Michael Zuckerman | 4bcb9c3 | 2017-06-29 10:00:33 +0000 | [diff] [blame] | 608 | FeatureSlowLEA, |
| 609 | FeatureSlowIncDec, |
Michael Zuckerman | 4bcb9c3 | 2017-06-29 10:00:33 +0000 | [diff] [blame] | 610 | FeatureLAHFSAHF, |
| 611 | FeatureMPX, |
| 612 | FeatureSHA, |
Craig Topper | a4c5caf | 2017-07-04 05:33:19 +0000 | [diff] [blame] | 613 | FeatureRDRAND, |
Michael Zuckerman | 4bcb9c3 | 2017-06-29 10:00:33 +0000 | [diff] [blame] | 614 | FeatureRDSEED, |
| 615 | FeatureXSAVE, |
| 616 | FeatureXSAVEOPT, |
| 617 | FeatureXSAVEC, |
| 618 | FeatureXSAVES, |
Michael Zuckerman | ac1d20d | 2017-09-25 13:45:31 +0000 | [diff] [blame] | 619 | FeatureCLFLUSHOPT, |
| 620 | FeatureFSGSBase |
Michael Zuckerman | 4bcb9c3 | 2017-06-29 10:00:33 +0000 | [diff] [blame] | 621 | ]>; |
Gabor Buella | 8f1646b | 2018-04-16 07:47:35 +0000 | [diff] [blame] | 622 | |
| 623 | class GoldmontProc<string Name> : ProcModel<Name, SLMModel, |
Craig Topper | bc895a3 | 2018-04-19 19:25:24 +0000 | [diff] [blame] | 624 | GLMFeatures.Value, [ |
| 625 | ProcIntelGLM, |
| 626 | FeaturePOPCNTFalseDeps |
| 627 | ]>; |
Michael Zuckerman | 4bcb9c3 | 2017-06-29 10:00:33 +0000 | [diff] [blame] | 628 | def : GoldmontProc<"goldmont">; |
| 629 | |
Gabor Buella | a832b22 | 2018-05-10 07:26:05 +0000 | [diff] [blame] | 630 | def GLPFeatures : ProcessorFeatures<GLMFeatures.Value, [ |
| 631 | FeaturePTWRITE, |
Gabor Buella | 8f1646b | 2018-04-16 07:47:35 +0000 | [diff] [blame] | 632 | FeatureRDPID, |
| 633 | FeatureSGX |
| 634 | ]>; |
Gabor Buella | a832b22 | 2018-05-10 07:26:05 +0000 | [diff] [blame] | 635 | |
| 636 | class GoldmontPlusProc<string Name> : ProcModel<Name, SLMModel, |
| 637 | GLPFeatures.Value, [ |
| 638 | ProcIntelGLP |
| 639 | ]>; |
Gabor Buella | 8f1646b | 2018-04-16 07:47:35 +0000 | [diff] [blame] | 640 | def : GoldmontPlusProc<"goldmont-plus">; |
| 641 | |
| 642 | class TremontProc<string Name> : ProcModel<Name, SLMModel, |
Gabor Buella | a832b22 | 2018-05-10 07:26:05 +0000 | [diff] [blame] | 643 | GLPFeatures.Value, [ |
Gabor Buella | 8f1646b | 2018-04-16 07:47:35 +0000 | [diff] [blame] | 644 | ProcIntelTRM, |
| 645 | FeatureCLDEMOTE, |
| 646 | FeatureGFNI, |
Gabor Buella | c8ded04 | 2018-05-01 10:01:16 +0000 | [diff] [blame] | 647 | FeatureMOVDIRI, |
| 648 | FeatureMOVDIR64B, |
Gabor Buella | 31fa802 | 2018-04-20 18:42:47 +0000 | [diff] [blame] | 649 | FeatureWAITPKG |
Gabor Buella | 8f1646b | 2018-04-16 07:47:35 +0000 | [diff] [blame] | 650 | ]>; |
| 651 | def : TremontProc<"tremont">; |
| 652 | |
Eric Christopher | 2ef6318 | 2010-04-02 21:54:27 +0000 | [diff] [blame] | 653 | // "Arrandale" along with corei3 and corei5 |
Craig Topper | 3611d9b | 2015-03-30 06:31:11 +0000 | [diff] [blame] | 654 | class NehalemProc<string Name> : ProcessorModel<Name, SandyBridgeModel, [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 655 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 656 | FeatureMMX, |
| 657 | FeatureSSE42, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 658 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 659 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 660 | FeatureCMPXCHG16B, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 661 | FeaturePOPCNT, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 662 | FeatureLAHFSAHF, |
| 663 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 664 | ]>; |
Craig Topper | 3611d9b | 2015-03-30 06:31:11 +0000 | [diff] [blame] | 665 | def : NehalemProc<"nehalem">; |
| 666 | def : NehalemProc<"corei7">; |
Jakob Stoklund Olesen | 1ac7e66 | 2013-03-26 22:19:12 +0000 | [diff] [blame] | 667 | |
Eric Christopher | 2ef6318 | 2010-04-02 21:54:27 +0000 | [diff] [blame] | 668 | // Westmere is a similar machine to nehalem with some additional features. |
| 669 | // Westmere is the corei3/i5/i7 path from nehalem to sandybridge |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 670 | class WestmereProc<string Name> : ProcessorModel<Name, SandyBridgeModel, [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 671 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 672 | FeatureMMX, |
| 673 | FeatureSSE42, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 674 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 675 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 676 | FeatureCMPXCHG16B, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 677 | FeaturePOPCNT, |
| 678 | FeatureAES, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 679 | FeaturePCLMUL, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 680 | FeatureLAHFSAHF, |
| 681 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 682 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 683 | def : WestmereProc<"westmere">; |
| 684 | |
Nate Begeman | 8b08f52 | 2010-12-10 00:26:57 +0000 | [diff] [blame] | 685 | // SSE is not listed here since llvm treats AVX as a reimplementation of SSE, |
| 686 | // rather than a superset. |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 687 | def SNBFeatures : ProcessorFeatures<[], [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 688 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 689 | FeatureMMX, |
| 690 | FeatureAVX, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 691 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 692 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 693 | FeatureCMPXCHG16B, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 694 | FeaturePOPCNT, |
| 695 | FeatureAES, |
Nikolai Bozhenov | 6bdf92c | 2017-01-12 19:34:15 +0000 | [diff] [blame] | 696 | FeatureSlowDivide64, |
Craig Topper | 0ee3569 | 2015-10-14 05:37:38 +0000 | [diff] [blame] | 697 | FeaturePCLMUL, |
| 698 | FeatureXSAVE, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 699 | FeatureXSAVEOPT, |
Nikolai Bozhenov | f679530 | 2016-08-04 12:47:28 +0000 | [diff] [blame] | 700 | FeatureLAHFSAHF, |
Lama Saba | 2ea271b | 2017-05-18 08:11:50 +0000 | [diff] [blame] | 701 | FeatureSlow3OpsLEA, |
Craig Topper | d88389a | 2017-02-21 06:39:13 +0000 | [diff] [blame] | 702 | FeatureFastScalarFSQRT, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 703 | FeatureFastSHLDRotate, |
Craig Topper | ef1f716 | 2017-08-30 05:00:35 +0000 | [diff] [blame] | 704 | FeatureSlowIncDec, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 705 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 706 | ]>; |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 707 | |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 708 | class SandyBridgeProc<string Name> : ProcModel<Name, SandyBridgeModel, |
| 709 | SNBFeatures.Value, [ |
Marina Yatsina | 77a21db | 2018-01-22 10:07:01 +0000 | [diff] [blame] | 710 | FeatureSlowUAMem32, |
| 711 | FeaturePOPCNTFalseDeps |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 712 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 713 | def : SandyBridgeProc<"sandybridge">; |
| 714 | def : SandyBridgeProc<"corei7-avx">; // Legacy alias. |
Evan Cheng | ff1beda | 2006-10-06 09:17:41 +0000 | [diff] [blame] | 715 | |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 716 | def IVBFeatures : ProcessorFeatures<SNBFeatures.Value, [ |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 717 | FeatureRDRAND, |
| 718 | FeatureF16C, |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 719 | FeatureFSGSBase |
| 720 | ]>; |
| 721 | |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 722 | class IvyBridgeProc<string Name> : ProcModel<Name, SandyBridgeModel, |
| 723 | IVBFeatures.Value, [ |
Marina Yatsina | 77a21db | 2018-01-22 10:07:01 +0000 | [diff] [blame] | 724 | FeatureSlowUAMem32, |
| 725 | FeaturePOPCNTFalseDeps |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 726 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 727 | def : IvyBridgeProc<"ivybridge">; |
| 728 | def : IvyBridgeProc<"core-avx-i">; // Legacy alias. |
Craig Topper | 3657fe4 | 2011-10-14 03:21:46 +0000 | [diff] [blame] | 729 | |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 730 | def HSWFeatures : ProcessorFeatures<IVBFeatures.Value, [ |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 731 | FeatureAVX2, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 732 | FeatureBMI, |
| 733 | FeatureBMI2, |
Clement Courbet | 203fc17 | 2017-04-21 09:20:50 +0000 | [diff] [blame] | 734 | FeatureERMSB, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 735 | FeatureFMA, |
Gabor Buella | d2f1ab1 | 2018-05-25 06:32:05 +0000 | [diff] [blame] | 736 | FeatureINVPCID, |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 737 | FeatureLZCNT, |
Simon Pilgrim | fd5df63 | 2017-12-19 13:16:43 +0000 | [diff] [blame] | 738 | FeatureMOVBE, |
| 739 | FeatureFastVariableShuffle |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 740 | ]>; |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 741 | |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 742 | class HaswellProc<string Name> : ProcModel<Name, HaswellModel, |
Mohammed Agabaria | e9aebf2 | 2017-09-13 09:00:27 +0000 | [diff] [blame] | 743 | HSWFeatures.Value, [ |
Marina Yatsina | 77a21db | 2018-01-22 10:07:01 +0000 | [diff] [blame] | 744 | ProcIntelHSW, |
| 745 | FeaturePOPCNTFalseDeps, |
| 746 | FeatureLZCNTFalseDeps |
Craig Topper | 54541c4 | 2017-10-13 16:04:08 +0000 | [diff] [blame] | 747 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 748 | def : HaswellProc<"haswell">; |
| 749 | def : HaswellProc<"core-avx2">; // Legacy alias. |
| 750 | |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 751 | def BDWFeatures : ProcessorFeatures<HSWFeatures.Value, [ |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 752 | FeatureADX, |
Craig Topper | 67885f5 | 2017-12-22 02:41:12 +0000 | [diff] [blame] | 753 | FeatureRDSEED, |
| 754 | FeaturePRFCHW |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 755 | ]>; |
Gadi Haber | 323f2e1 | 2017-10-24 20:19:47 +0000 | [diff] [blame] | 756 | class BroadwellProc<string Name> : ProcModel<Name, BroadwellModel, |
Craig Topper | 54541c4 | 2017-10-13 16:04:08 +0000 | [diff] [blame] | 757 | BDWFeatures.Value, [ |
Marina Yatsina | 77a21db | 2018-01-22 10:07:01 +0000 | [diff] [blame] | 758 | ProcIntelBDW, |
| 759 | FeaturePOPCNTFalseDeps, |
| 760 | FeatureLZCNTFalseDeps |
Craig Topper | 54541c4 | 2017-10-13 16:04:08 +0000 | [diff] [blame] | 761 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 762 | def : BroadwellProc<"broadwell">; |
| 763 | |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 764 | def SKLFeatures : ProcessorFeatures<BDWFeatures.Value, [ |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 765 | FeatureMPX, |
Eric Christopher | 5829741 | 2017-03-29 07:40:44 +0000 | [diff] [blame] | 766 | FeatureRTM, |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 767 | FeatureXSAVEC, |
| 768 | FeatureXSAVES, |
Nikolai Bozhenov | f679530 | 2016-08-04 12:47:28 +0000 | [diff] [blame] | 769 | FeatureCLFLUSHOPT, |
| 770 | FeatureFastVectorFSQRT |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 771 | ]>; |
| 772 | |
Gadi Haber | 6f8fbf4 | 2017-09-19 06:19:27 +0000 | [diff] [blame] | 773 | class SkylakeClientProc<string Name> : ProcModel<Name, SkylakeClientModel, |
Mohammed Agabaria | e9aebf2 | 2017-09-13 09:00:27 +0000 | [diff] [blame] | 774 | SKLFeatures.Value, [ |
Craig Topper | ea37e20 | 2017-11-25 18:09:37 +0000 | [diff] [blame] | 775 | ProcIntelSKL, |
Marina Yatsina | 77a21db | 2018-01-22 10:07:01 +0000 | [diff] [blame] | 776 | FeatureHasFastGather, |
Gabor Buella | 3eab22d | 2018-04-10 13:58:57 +0000 | [diff] [blame] | 777 | FeaturePOPCNTFalseDeps, |
| 778 | FeatureSGX |
Craig Topper | 5805fb3 | 2017-10-13 16:06:06 +0000 | [diff] [blame] | 779 | ]>; |
Sanjoy Das | aa63dc0 | 2016-02-21 17:12:03 +0000 | [diff] [blame] | 780 | def : SkylakeClientProc<"skylake">; |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 781 | |
Craig Topper | 5d69291 | 2017-10-13 18:10:17 +0000 | [diff] [blame] | 782 | def KNLFeatures : ProcessorFeatures<IVBFeatures.Value, [ |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 783 | FeatureAVX512, |
| 784 | FeatureERI, |
| 785 | FeatureCDI, |
| 786 | FeaturePFI, |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 787 | FeaturePREFETCHWT1, |
| 788 | FeatureADX, |
| 789 | FeatureRDSEED, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 790 | FeatureMOVBE, |
| 791 | FeatureLZCNT, |
| 792 | FeatureBMI, |
| 793 | FeatureBMI2, |
Craig Topper | 67885f5 | 2017-12-22 02:41:12 +0000 | [diff] [blame] | 794 | FeatureFMA, |
| 795 | FeaturePRFCHW |
Craig Topper | 5d69291 | 2017-10-13 18:10:17 +0000 | [diff] [blame] | 796 | ]>; |
| 797 | |
| 798 | // FIXME: define KNL model |
| 799 | class KnightsLandingProc<string Name> : ProcModel<Name, HaswellModel, |
| 800 | KNLFeatures.Value, [ |
| 801 | ProcIntelKNL, |
Craig Topper | 62c47a2 | 2017-08-29 05:14:27 +0000 | [diff] [blame] | 802 | FeatureSlowTwoMemOps, |
Craig Topper | ea37e20 | 2017-11-25 18:09:37 +0000 | [diff] [blame] | 803 | FeatureFastPartialYMMorZMMWrite, |
| 804 | FeatureHasFastGather |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 805 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 806 | def : KnightsLandingProc<"knl">; |
Elena Demikhovsky | 8cfb43f | 2013-07-24 11:02:47 +0000 | [diff] [blame] | 807 | |
Craig Topper | 5d69291 | 2017-10-13 18:10:17 +0000 | [diff] [blame] | 808 | class KnightsMillProc<string Name> : ProcModel<Name, HaswellModel, |
| 809 | KNLFeatures.Value, [ |
| 810 | ProcIntelKNL, |
| 811 | FeatureSlowTwoMemOps, |
Craig Topper | 6fae2ee | 2017-10-25 17:10:32 +0000 | [diff] [blame] | 812 | FeatureFastPartialYMMorZMMWrite, |
Craig Topper | ea37e20 | 2017-11-25 18:09:37 +0000 | [diff] [blame] | 813 | FeatureHasFastGather, |
Craig Topper | 6fae2ee | 2017-10-25 17:10:32 +0000 | [diff] [blame] | 814 | FeatureVPOPCNTDQ |
Craig Topper | 5d69291 | 2017-10-13 18:10:17 +0000 | [diff] [blame] | 815 | ]>; |
| 816 | def : KnightsMillProc<"knm">; // TODO Add AVX5124FMAPS/AVX5124VNNIW features |
| 817 | |
Craig Topper | f730a6b | 2016-02-13 21:35:37 +0000 | [diff] [blame] | 818 | def SKXFeatures : ProcessorFeatures<SKLFeatures.Value, [ |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 819 | FeatureAVX512, |
| 820 | FeatureCDI, |
| 821 | FeatureDQI, |
| 822 | FeatureBWI, |
| 823 | FeatureVLX, |
Asaf Badouh | 5acf66f | 2015-12-15 13:35:29 +0000 | [diff] [blame] | 824 | FeaturePKU, |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 825 | FeatureCLWB |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 826 | ]>; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 827 | |
Gadi Haber | 684944b | 2017-10-08 12:52:54 +0000 | [diff] [blame] | 828 | class SkylakeServerProc<string Name> : ProcModel<Name, SkylakeServerModel, |
Mohammed Agabaria | e9aebf2 | 2017-09-13 09:00:27 +0000 | [diff] [blame] | 829 | SKXFeatures.Value, [ |
Craig Topper | ea37e20 | 2017-11-25 18:09:37 +0000 | [diff] [blame] | 830 | ProcIntelSKX, |
Craig Topper | a8f87a3 | 2018-01-29 21:56:48 +0000 | [diff] [blame] | 831 | FeatureHasFastGather, |
| 832 | FeaturePOPCNTFalseDeps |
Craig Topper | a1f9c9dd | 2017-10-15 16:41:15 +0000 | [diff] [blame] | 833 | ]>; |
Sanjoy Das | aa63dc0 | 2016-02-21 17:12:03 +0000 | [diff] [blame] | 834 | def : SkylakeServerProc<"skylake-avx512">; |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 835 | def : SkylakeServerProc<"skx">; // Legacy alias. |
| 836 | |
Craig Topper | d710ada | 2018-02-21 00:15:48 +0000 | [diff] [blame] | 837 | def CNLFeatures : ProcessorFeatures<SKLFeatures.Value, [ |
| 838 | FeatureAVX512, |
| 839 | FeatureCDI, |
| 840 | FeatureDQI, |
| 841 | FeatureBWI, |
| 842 | FeatureVLX, |
| 843 | FeaturePKU, |
Elena Demikhovsky | 9242ea8 | 2016-01-18 13:00:31 +0000 | [diff] [blame] | 844 | FeatureVBMI, |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 845 | FeatureIFMA, |
Gabor Buella | 3eab22d | 2018-04-10 13:58:57 +0000 | [diff] [blame] | 846 | FeatureSHA, |
| 847 | FeatureSGX |
Elena Demikhovsky | 9242ea8 | 2016-01-18 13:00:31 +0000 | [diff] [blame] | 848 | ]>; |
Elena Demikhovsky | 29cde35 | 2016-01-24 10:41:28 +0000 | [diff] [blame] | 849 | |
Craig Topper | 9a94dfc | 2017-11-19 01:25:30 +0000 | [diff] [blame] | 850 | class CannonlakeProc<string Name> : ProcModel<Name, SkylakeServerModel, |
Mohammed Agabaria | e9aebf2 | 2017-09-13 09:00:27 +0000 | [diff] [blame] | 851 | CNLFeatures.Value, [ |
Craig Topper | ea37e20 | 2017-11-25 18:09:37 +0000 | [diff] [blame] | 852 | ProcIntelCNL, |
| 853 | FeatureHasFastGather |
Craig Topper | 5805fb3 | 2017-10-13 16:06:06 +0000 | [diff] [blame] | 854 | ]>; |
Elena Demikhovsky | 9242ea8 | 2016-01-18 13:00:31 +0000 | [diff] [blame] | 855 | def : CannonlakeProc<"cannonlake">; |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 856 | |
Craig Topper | 81037f3 | 2017-11-19 01:12:00 +0000 | [diff] [blame] | 857 | def ICLFeatures : ProcessorFeatures<CNLFeatures.Value, [ |
Craig Topper | a890570 | 2017-11-21 21:05:18 +0000 | [diff] [blame] | 858 | FeatureBITALG, |
| 859 | FeatureVAES, |
| 860 | FeatureVBMI2, |
| 861 | FeatureVNNI, |
| 862 | FeatureVPCLMULQDQ, |
Coby Tayree | d8b17be | 2017-11-26 09:36:41 +0000 | [diff] [blame] | 863 | FeatureVPOPCNTDQ, |
Craig Topper | 55cfa89 | 2017-12-27 22:04:04 +0000 | [diff] [blame] | 864 | FeatureGFNI, |
Craig Topper | 84b26b9 | 2018-01-18 23:52:31 +0000 | [diff] [blame] | 865 | FeatureCLWB, |
| 866 | FeatureRDPID |
Craig Topper | 81037f3 | 2017-11-19 01:12:00 +0000 | [diff] [blame] | 867 | ]>; |
| 868 | |
Gabor Buella | 213edc4 | 2018-04-10 18:59:13 +0000 | [diff] [blame] | 869 | class IcelakeClientProc<string Name> : ProcModel<Name, SkylakeServerModel, |
| 870 | ICLFeatures.Value, [ |
Craig Topper | ea37e20 | 2017-11-25 18:09:37 +0000 | [diff] [blame] | 871 | ProcIntelICL, |
| 872 | FeatureHasFastGather |
Craig Topper | 81037f3 | 2017-11-19 01:12:00 +0000 | [diff] [blame] | 873 | ]>; |
Gabor Buella | 213edc4 | 2018-04-10 18:59:13 +0000 | [diff] [blame] | 874 | def : IcelakeClientProc<"icelake-client">; |
| 875 | |
| 876 | class IcelakeServerProc<string Name> : ProcModel<Name, SkylakeServerModel, |
| 877 | ICLFeatures.Value, [ |
| 878 | ProcIntelICX, |
Gabor Buella | 2b5e960 | 2018-05-08 06:47:36 +0000 | [diff] [blame] | 879 | FeaturePCONFIG, |
Gabor Buella | 2ef36f3 | 2018-04-11 20:01:57 +0000 | [diff] [blame] | 880 | FeatureWBNOINVD, |
Gabor Buella | 213edc4 | 2018-04-10 18:59:13 +0000 | [diff] [blame] | 881 | FeatureHasFastGather |
| 882 | ]>; |
| 883 | def : IcelakeServerProc<"icelake-server">; |
Craig Topper | 81037f3 | 2017-11-19 01:12:00 +0000 | [diff] [blame] | 884 | |
Chandler Carruth | af892403 | 2014-12-09 10:58:36 +0000 | [diff] [blame] | 885 | // AMD CPUs. |
Robert Khasanov | bfa0131 | 2014-07-21 14:54:21 +0000 | [diff] [blame] | 886 | |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 887 | def : Proc<"k6", [FeatureX87, FeatureSlowUAMem16, FeatureMMX]>; |
| 888 | def : Proc<"k6-2", [FeatureX87, FeatureSlowUAMem16, Feature3DNow]>; |
| 889 | def : Proc<"k6-3", [FeatureX87, FeatureSlowUAMem16, Feature3DNow]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 890 | |
| 891 | foreach P = ["athlon", "athlon-tbird"] in { |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 892 | def : Proc<P, [FeatureX87, FeatureSlowUAMem16, Feature3DNowA, |
| 893 | FeatureNOPL, FeatureSlowSHLD]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 894 | } |
| 895 | |
| 896 | foreach P = ["athlon-4", "athlon-xp", "athlon-mp"] in { |
| 897 | def : Proc<P, [FeatureX87, FeatureSlowUAMem16, FeatureSSE1, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 898 | Feature3DNowA, FeatureFXSR, FeatureNOPL, FeatureSlowSHLD]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 899 | } |
| 900 | |
| 901 | foreach P = ["k8", "opteron", "athlon64", "athlon-fx"] in { |
| 902 | def : Proc<P, [FeatureX87, FeatureSlowUAMem16, FeatureSSE2, Feature3DNowA, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 903 | FeatureFXSR, FeatureNOPL, Feature64Bit, FeatureSlowSHLD]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 904 | } |
| 905 | |
| 906 | foreach P = ["k8-sse3", "opteron-sse3", "athlon64-sse3"] in { |
| 907 | def : Proc<P, [FeatureX87, FeatureSlowUAMem16, FeatureSSE3, Feature3DNowA, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 908 | FeatureFXSR, FeatureNOPL, FeatureCMPXCHG16B, FeatureSlowSHLD]>; |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 909 | } |
| 910 | |
| 911 | foreach P = ["amdfam10", "barcelona"] in { |
| 912 | def : Proc<P, [FeatureX87, FeatureSSE4A, Feature3DNowA, FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 913 | FeatureNOPL, FeatureCMPXCHG16B, FeatureLZCNT, FeaturePOPCNT, |
Craig Topper | 3837322 | 2017-11-01 22:15:49 +0000 | [diff] [blame] | 914 | FeatureSlowSHLD, FeatureLAHFSAHF]>; |
| 915 | } |
Sanjay Patel | 9e916dc | 2015-08-21 20:17:26 +0000 | [diff] [blame] | 916 | |
Benjamin Kramer | 077ae1d | 2012-01-10 11:50:02 +0000 | [diff] [blame] | 917 | // Bobcat |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 918 | def : Proc<"btver1", [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 919 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 920 | FeatureMMX, |
| 921 | FeatureSSSE3, |
| 922 | FeatureSSE4A, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 923 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 924 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 925 | FeatureCMPXCHG16B, |
| 926 | FeaturePRFCHW, |
| 927 | FeatureLZCNT, |
| 928 | FeaturePOPCNT, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 929 | FeatureSlowSHLD, |
Simon Pilgrim | 02bdac5 | 2018-01-29 21:24:31 +0000 | [diff] [blame] | 930 | FeatureLAHFSAHF, |
| 931 | FeatureFast15ByteNOP |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 932 | ]>; |
Sanjay Patel | 1191adf | 2014-09-09 20:07:07 +0000 | [diff] [blame] | 933 | |
Benjamin Kramer | b44c427 | 2013-05-03 10:20:08 +0000 | [diff] [blame] | 934 | // Jaguar |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 935 | def : ProcessorModel<"btver2", BtVer2Model, [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 936 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 937 | FeatureMMX, |
| 938 | FeatureAVX, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 939 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 940 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 941 | FeatureSSE4A, |
| 942 | FeatureCMPXCHG16B, |
| 943 | FeaturePRFCHW, |
| 944 | FeatureAES, |
| 945 | FeaturePCLMUL, |
| 946 | FeatureBMI, |
| 947 | FeatureF16C, |
| 948 | FeatureMOVBE, |
| 949 | FeatureLZCNT, |
Pierre Gousseau | b6d652a | 2016-10-14 16:41:38 +0000 | [diff] [blame] | 950 | FeatureFastLZCNT, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 951 | FeaturePOPCNT, |
Craig Topper | 0ee3569 | 2015-10-14 05:37:38 +0000 | [diff] [blame] | 952 | FeatureXSAVE, |
| 953 | FeatureXSAVEOPT, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 954 | FeatureSlowSHLD, |
Yunzhong Gao | 0de36ec | 2016-02-12 23:37:57 +0000 | [diff] [blame] | 955 | FeatureLAHFSAHF, |
Simon Pilgrim | 02bdac5 | 2018-01-29 21:24:31 +0000 | [diff] [blame] | 956 | FeatureFast15ByteNOP, |
Amjad Aboud | 4f97751 | 2017-03-03 09:03:24 +0000 | [diff] [blame] | 957 | FeatureFastPartialYMMorZMMWrite |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 958 | ]>; |
Sanjay Patel | e57f3c0 | 2014-11-28 18:40:18 +0000 | [diff] [blame] | 959 | |
Benjamin Kramer | 077ae1d | 2012-01-10 11:50:02 +0000 | [diff] [blame] | 960 | // Bulldozer |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 961 | def : Proc<"bdver1", [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 962 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 963 | FeatureXOP, |
| 964 | FeatureFMA4, |
| 965 | FeatureCMPXCHG16B, |
| 966 | FeatureAES, |
| 967 | FeaturePRFCHW, |
| 968 | FeaturePCLMUL, |
| 969 | FeatureMMX, |
| 970 | FeatureAVX, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 971 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 972 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 973 | FeatureSSE4A, |
| 974 | FeatureLZCNT, |
| 975 | FeaturePOPCNT, |
Craig Topper | 0ee3569 | 2015-10-14 05:37:38 +0000 | [diff] [blame] | 976 | FeatureXSAVE, |
Simon Pilgrim | 99b925b | 2017-05-03 15:51:39 +0000 | [diff] [blame] | 977 | FeatureLWP, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 978 | FeatureSlowSHLD, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 979 | FeatureLAHFSAHF, |
Simon Pilgrim | 02bdac5 | 2018-01-29 21:24:31 +0000 | [diff] [blame] | 980 | FeatureFast11ByteNOP, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 981 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 982 | ]>; |
Benjamin Kramer | b44c427 | 2013-05-03 10:20:08 +0000 | [diff] [blame] | 983 | // Piledriver |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 984 | def : Proc<"bdver2", [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 985 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 986 | FeatureXOP, |
| 987 | FeatureFMA4, |
| 988 | FeatureCMPXCHG16B, |
| 989 | FeatureAES, |
| 990 | FeaturePRFCHW, |
| 991 | FeaturePCLMUL, |
| 992 | FeatureMMX, |
| 993 | FeatureAVX, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 994 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 995 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 996 | FeatureSSE4A, |
| 997 | FeatureF16C, |
| 998 | FeatureLZCNT, |
| 999 | FeaturePOPCNT, |
Craig Topper | 0ee3569 | 2015-10-14 05:37:38 +0000 | [diff] [blame] | 1000 | FeatureXSAVE, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1001 | FeatureBMI, |
| 1002 | FeatureTBM, |
Simon Pilgrim | 99b925b | 2017-05-03 15:51:39 +0000 | [diff] [blame] | 1003 | FeatureLWP, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1004 | FeatureFMA, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 1005 | FeatureSlowSHLD, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 1006 | FeatureLAHFSAHF, |
Simon Pilgrim | 02bdac5 | 2018-01-29 21:24:31 +0000 | [diff] [blame] | 1007 | FeatureFast11ByteNOP, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 1008 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1009 | ]>; |
Benjamin Kramer | d114def | 2013-11-04 10:29:20 +0000 | [diff] [blame] | 1010 | |
| 1011 | // Steamroller |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1012 | def : Proc<"bdver3", [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 1013 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1014 | FeatureXOP, |
| 1015 | FeatureFMA4, |
| 1016 | FeatureCMPXCHG16B, |
| 1017 | FeatureAES, |
| 1018 | FeaturePRFCHW, |
| 1019 | FeaturePCLMUL, |
| 1020 | FeatureMMX, |
| 1021 | FeatureAVX, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 1022 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 1023 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1024 | FeatureSSE4A, |
| 1025 | FeatureF16C, |
| 1026 | FeatureLZCNT, |
| 1027 | FeaturePOPCNT, |
Craig Topper | 0ee3569 | 2015-10-14 05:37:38 +0000 | [diff] [blame] | 1028 | FeatureXSAVE, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1029 | FeatureBMI, |
| 1030 | FeatureTBM, |
Simon Pilgrim | 99b925b | 2017-05-03 15:51:39 +0000 | [diff] [blame] | 1031 | FeatureLWP, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1032 | FeatureFMA, |
Craig Topper | 0ee3569 | 2015-10-14 05:37:38 +0000 | [diff] [blame] | 1033 | FeatureXSAVEOPT, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1034 | FeatureSlowSHLD, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 1035 | FeatureFSGSBase, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 1036 | FeatureLAHFSAHF, |
Simon Pilgrim | 02bdac5 | 2018-01-29 21:24:31 +0000 | [diff] [blame] | 1037 | FeatureFast11ByteNOP, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 1038 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1039 | ]>; |
Benjamin Kramer | d114def | 2013-11-04 10:29:20 +0000 | [diff] [blame] | 1040 | |
Benjamin Kramer | 6004573 | 2014-05-02 15:47:07 +0000 | [diff] [blame] | 1041 | // Excavator |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1042 | def : Proc<"bdver4", [ |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 1043 | FeatureX87, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1044 | FeatureMMX, |
| 1045 | FeatureAVX2, |
Craig Topper | 09b6598 | 2015-10-16 06:03:09 +0000 | [diff] [blame] | 1046 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 1047 | FeatureNOPL, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1048 | FeatureXOP, |
| 1049 | FeatureFMA4, |
| 1050 | FeatureCMPXCHG16B, |
| 1051 | FeatureAES, |
| 1052 | FeaturePRFCHW, |
| 1053 | FeaturePCLMUL, |
| 1054 | FeatureF16C, |
| 1055 | FeatureLZCNT, |
| 1056 | FeaturePOPCNT, |
Craig Topper | 0ee3569 | 2015-10-14 05:37:38 +0000 | [diff] [blame] | 1057 | FeatureXSAVE, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1058 | FeatureBMI, |
| 1059 | FeatureBMI2, |
| 1060 | FeatureTBM, |
Simon Pilgrim | 99b925b | 2017-05-03 15:51:39 +0000 | [diff] [blame] | 1061 | FeatureLWP, |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1062 | FeatureFMA, |
Craig Topper | 0ee3569 | 2015-10-14 05:37:38 +0000 | [diff] [blame] | 1063 | FeatureXSAVEOPT, |
Simon Pilgrim | 381a0ad | 2016-07-24 16:00:53 +0000 | [diff] [blame] | 1064 | FeatureSlowSHLD, |
Hans Wennborg | 5000ce8 | 2015-12-04 23:00:33 +0000 | [diff] [blame] | 1065 | FeatureFSGSBase, |
Ashutosh Nema | 348af9c | 2016-05-18 11:59:12 +0000 | [diff] [blame] | 1066 | FeatureLAHFSAHF, |
Simon Pilgrim | 02bdac5 | 2018-01-29 21:24:31 +0000 | [diff] [blame] | 1067 | FeatureFast11ByteNOP, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 1068 | FeatureMWAITX, |
| 1069 | FeatureMacroFusion |
Eric Christopher | 11e5983 | 2015-10-08 20:10:06 +0000 | [diff] [blame] | 1070 | ]>; |
Benjamin Kramer | 6004573 | 2014-05-02 15:47:07 +0000 | [diff] [blame] | 1071 | |
Craig Topper | 106b5b6 | 2017-07-19 02:45:14 +0000 | [diff] [blame] | 1072 | // Znver1 |
| 1073 | def: ProcessorModel<"znver1", Znver1Model, [ |
Craig Topper | d55b831 | 2017-01-10 06:01:16 +0000 | [diff] [blame] | 1074 | FeatureADX, |
| 1075 | FeatureAES, |
| 1076 | FeatureAVX2, |
| 1077 | FeatureBMI, |
| 1078 | FeatureBMI2, |
| 1079 | FeatureCLFLUSHOPT, |
Craig Topper | 50f3d14 | 2017-02-09 04:27:34 +0000 | [diff] [blame] | 1080 | FeatureCLZERO, |
Craig Topper | d55b831 | 2017-01-10 06:01:16 +0000 | [diff] [blame] | 1081 | FeatureCMPXCHG16B, |
| 1082 | FeatureF16C, |
| 1083 | FeatureFMA, |
| 1084 | FeatureFSGSBase, |
| 1085 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 1086 | FeatureNOPL, |
Craig Topper | d55b831 | 2017-01-10 06:01:16 +0000 | [diff] [blame] | 1087 | FeatureFastLZCNT, |
| 1088 | FeatureLAHFSAHF, |
| 1089 | FeatureLZCNT, |
Simon Pilgrim | 02bdac5 | 2018-01-29 21:24:31 +0000 | [diff] [blame] | 1090 | FeatureFast15ByteNOP, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 1091 | FeatureMacroFusion, |
Craig Topper | d55b831 | 2017-01-10 06:01:16 +0000 | [diff] [blame] | 1092 | FeatureMMX, |
| 1093 | FeatureMOVBE, |
| 1094 | FeatureMWAITX, |
| 1095 | FeaturePCLMUL, |
| 1096 | FeaturePOPCNT, |
| 1097 | FeaturePRFCHW, |
| 1098 | FeatureRDRAND, |
| 1099 | FeatureRDSEED, |
| 1100 | FeatureSHA, |
Craig Topper | d55b831 | 2017-01-10 06:01:16 +0000 | [diff] [blame] | 1101 | FeatureSSE4A, |
| 1102 | FeatureSlowSHLD, |
| 1103 | FeatureX87, |
| 1104 | FeatureXSAVE, |
| 1105 | FeatureXSAVEC, |
| 1106 | FeatureXSAVEOPT, |
| 1107 | FeatureXSAVES]>; |
| 1108 | |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 1109 | def : Proc<"geode", [FeatureX87, FeatureSlowUAMem16, Feature3DNowA]>; |
Evan Cheng | ff1beda | 2006-10-06 09:17:41 +0000 | [diff] [blame] | 1110 | |
Andrey Turetskiy | 6a3d561 | 2016-03-23 11:13:54 +0000 | [diff] [blame] | 1111 | def : Proc<"winchip-c6", [FeatureX87, FeatureSlowUAMem16, FeatureMMX]>; |
| 1112 | def : Proc<"winchip2", [FeatureX87, FeatureSlowUAMem16, Feature3DNow]>; |
| 1113 | def : Proc<"c3", [FeatureX87, FeatureSlowUAMem16, Feature3DNow]>; |
| 1114 | def : Proc<"c3-2", [FeatureX87, FeatureSlowUAMem16, FeatureMMX, |
| 1115 | FeatureSSE1, FeatureFXSR]>; |
Evan Cheng | ff1beda | 2006-10-06 09:17:41 +0000 | [diff] [blame] | 1116 | |
Chandler Carruth | 32908d7 | 2014-05-07 17:37:03 +0000 | [diff] [blame] | 1117 | // We also provide a generic 64-bit specific x86 processor model which tries to |
| 1118 | // be good for modern chips without enabling instruction set encodings past the |
| 1119 | // basic SSE2 and 64-bit ones. It disables slow things from any mainstream and |
| 1120 | // modern 64-bit x86 chip, and enables features that are generally beneficial. |
Michael Liao | 5bf9578 | 2014-12-04 05:20:33 +0000 | [diff] [blame] | 1121 | // |
Chandler Carruth | 32908d7 | 2014-05-07 17:37:03 +0000 | [diff] [blame] | 1122 | // We currently use the Sandy Bridge model as the default scheduling model as |
| 1123 | // we use it across Nehalem, Westmere, Sandy Bridge, and Ivy Bridge which |
| 1124 | // covers a huge swath of x86 processors. If there are specific scheduling |
| 1125 | // knobs which need to be tuned differently for AMD chips, we might consider |
| 1126 | // forming a common base for them. |
Chandler Carruth | 98c51cb | 2017-08-21 08:45:22 +0000 | [diff] [blame] | 1127 | def : ProcessorModel<"x86-64", SandyBridgeModel, [ |
| 1128 | FeatureX87, |
| 1129 | FeatureMMX, |
| 1130 | FeatureSSE2, |
| 1131 | FeatureFXSR, |
Craig Topper | 505f38a | 2018-01-10 22:07:16 +0000 | [diff] [blame] | 1132 | FeatureNOPL, |
Chandler Carruth | 98c51cb | 2017-08-21 08:45:22 +0000 | [diff] [blame] | 1133 | Feature64Bit, |
| 1134 | FeatureSlow3OpsLEA, |
Craig Topper | 641e2af | 2017-08-30 04:34:48 +0000 | [diff] [blame] | 1135 | FeatureSlowIncDec, |
| 1136 | FeatureMacroFusion |
Chandler Carruth | 98c51cb | 2017-08-21 08:45:22 +0000 | [diff] [blame] | 1137 | ]>; |
Chandler Carruth | 32908d7 | 2014-05-07 17:37:03 +0000 | [diff] [blame] | 1138 | |
Evan Cheng | ff1beda | 2006-10-06 09:17:41 +0000 | [diff] [blame] | 1139 | //===----------------------------------------------------------------------===// |
Chris Lattner | 5d00a0b | 2007-02-26 18:17:14 +0000 | [diff] [blame] | 1140 | // Calling Conventions |
| 1141 | //===----------------------------------------------------------------------===// |
| 1142 | |
| 1143 | include "X86CallingConv.td" |
| 1144 | |
| 1145 | |
| 1146 | //===----------------------------------------------------------------------===// |
Jim Grosbach | 4cf25f5 | 2010-10-30 13:48:28 +0000 | [diff] [blame] | 1147 | // Assembly Parser |
Chris Lattner | 5d00a0b | 2007-02-26 18:17:14 +0000 | [diff] [blame] | 1148 | //===----------------------------------------------------------------------===// |
| 1149 | |
Devang Patel | 85d684a | 2012-01-09 19:13:28 +0000 | [diff] [blame] | 1150 | def ATTAsmParserVariant : AsmParserVariant { |
Daniel Dunbar | 0033199 | 2009-07-29 00:02:19 +0000 | [diff] [blame] | 1151 | int Variant = 0; |
Daniel Dunbar | e431871 | 2009-08-11 20:59:47 +0000 | [diff] [blame] | 1152 | |
Chad Rosier | 9f7a221 | 2013-04-18 22:35:36 +0000 | [diff] [blame] | 1153 | // Variant name. |
| 1154 | string Name = "att"; |
| 1155 | |
Daniel Dunbar | e431871 | 2009-08-11 20:59:47 +0000 | [diff] [blame] | 1156 | // Discard comments in assembly strings. |
| 1157 | string CommentDelimiter = "#"; |
| 1158 | |
| 1159 | // Recognize hard coded registers. |
| 1160 | string RegisterPrefix = "%"; |
Daniel Dunbar | 0033199 | 2009-07-29 00:02:19 +0000 | [diff] [blame] | 1161 | } |
| 1162 | |
Devang Patel | 67bf992a | 2012-01-10 17:51:54 +0000 | [diff] [blame] | 1163 | def IntelAsmParserVariant : AsmParserVariant { |
| 1164 | int Variant = 1; |
| 1165 | |
Chad Rosier | 9f7a221 | 2013-04-18 22:35:36 +0000 | [diff] [blame] | 1166 | // Variant name. |
| 1167 | string Name = "intel"; |
| 1168 | |
Devang Patel | 67bf992a | 2012-01-10 17:51:54 +0000 | [diff] [blame] | 1169 | // Discard comments in assembly strings. |
| 1170 | string CommentDelimiter = ";"; |
| 1171 | |
| 1172 | // Recognize hard coded registers. |
| 1173 | string RegisterPrefix = ""; |
| 1174 | } |
| 1175 | |
Jim Grosbach | 4cf25f5 | 2010-10-30 13:48:28 +0000 | [diff] [blame] | 1176 | //===----------------------------------------------------------------------===// |
| 1177 | // Assembly Printers |
| 1178 | //===----------------------------------------------------------------------===// |
| 1179 | |
Chris Lattner | 5683260 | 2004-10-03 20:36:57 +0000 | [diff] [blame] | 1180 | // The X86 target supports two different syntaxes for emitting machine code. |
| 1181 | // This is controlled by the -x86-asm-syntax={att|intel} |
| 1182 | def ATTAsmWriter : AsmWriter { |
Chris Lattner | 1cbd3de | 2009-09-13 19:30:11 +0000 | [diff] [blame] | 1183 | string AsmWriterClassName = "ATTInstPrinter"; |
Chris Lattner | 5683260 | 2004-10-03 20:36:57 +0000 | [diff] [blame] | 1184 | int Variant = 0; |
| 1185 | } |
| 1186 | def IntelAsmWriter : AsmWriter { |
Chris Lattner | 13306a1 | 2009-09-20 07:47:59 +0000 | [diff] [blame] | 1187 | string AsmWriterClassName = "IntelInstPrinter"; |
Chris Lattner | 5683260 | 2004-10-03 20:36:57 +0000 | [diff] [blame] | 1188 | int Variant = 1; |
| 1189 | } |
| 1190 | |
Chris Lattner | a8c3cff | 2003-08-03 18:19:37 +0000 | [diff] [blame] | 1191 | def X86 : Target { |
Chris Lattner | a8c3cff | 2003-08-03 18:19:37 +0000 | [diff] [blame] | 1192 | // Information about the instructions... |
Chris Lattner | 2551080 | 2003-08-04 04:59:56 +0000 | [diff] [blame] | 1193 | let InstructionSet = X86InstrInfo; |
Devang Patel | 67bf992a | 2012-01-10 17:51:54 +0000 | [diff] [blame] | 1194 | let AssemblyParserVariants = [ATTAsmParserVariant, IntelAsmParserVariant]; |
Chris Lattner | 5683260 | 2004-10-03 20:36:57 +0000 | [diff] [blame] | 1195 | let AssemblyWriters = [ATTAsmWriter, IntelAsmWriter]; |
Geoff Berry | f8bf2ec | 2018-02-23 18:25:08 +0000 | [diff] [blame] | 1196 | let AllowRegisterRenaming = 1; |
Chris Lattner | a8c3cff | 2003-08-03 18:19:37 +0000 | [diff] [blame] | 1197 | } |
Clement Courbet | b449379 | 2018-04-10 08:16:37 +0000 | [diff] [blame] | 1198 | |
| 1199 | //===----------------------------------------------------------------------===// |
| 1200 | // Pfm Counters |
| 1201 | //===----------------------------------------------------------------------===// |
| 1202 | |
| 1203 | include "X86PfmCounters.td" |