| Jia Liu | b22310f | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 1 | //===-- ARM.td - Describe the ARM Target Machine -----------*- tablegen -*-===// |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 2 | // |
| 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 |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | // Target-independent interfaces which we are implementing |
| 15 | //===----------------------------------------------------------------------===// |
| 16 | |
| Evan Cheng | 977e7be | 2008-11-24 07:34:46 +0000 | [diff] [blame] | 17 | include "llvm/Target/Target.td" |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 18 | |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 19 | //===----------------------------------------------------------------------===// |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 20 | // ARM Helper classes. |
| 21 | // |
| 22 | |
| 23 | class ProcNoItin<string Name, list<SubtargetFeature> Features> |
| 24 | : Processor<Name, NoItineraries, Features>; |
| 25 | |
| 26 | class Architecture<string fname, string aname, list<SubtargetFeature> features > |
| 27 | : SubtargetFeature<fname, "ARMArch", aname, |
| 28 | !strconcat(aname, " architecture"), features>; |
| 29 | |
| 30 | //===----------------------------------------------------------------------===// |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 31 | // ARM Subtarget state. |
| 32 | // |
| 33 | |
| Evan Cheng | 1834f5d | 2011-07-07 19:05:12 +0000 | [diff] [blame] | 34 | def ModeThumb : SubtargetFeature<"thumb-mode", "InThumbMode", "true", |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 35 | "Thumb mode">; |
| Jim Grosbach | 080fdf4 | 2010-09-30 01:57:53 +0000 | [diff] [blame] | 36 | |
| Eric Christopher | 824f42f | 2015-05-12 01:26:05 +0000 | [diff] [blame] | 37 | def ModeSoftFloat : SubtargetFeature<"soft-float", "UseSoftFloat", "true", |
| 38 | "Use software floating point features.">; |
| 39 | |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 40 | //===----------------------------------------------------------------------===// |
| Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 41 | // ARM Subtarget features. |
| 42 | // |
| 43 | |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 44 | def FeatureVFP2 : SubtargetFeature<"vfp2", "HasVFPv2", "true", |
| Anton Korobeynikov | b6f4538 | 2009-05-29 23:41:08 +0000 | [diff] [blame] | 45 | "Enable VFP2 instructions">; |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 46 | def FeatureVFP3 : SubtargetFeature<"vfp3", "HasVFPv3", "true", |
| 47 | "Enable VFP3 instructions", |
| 48 | [FeatureVFP2]>; |
| 49 | def FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true", |
| 50 | "Enable NEON instructions", |
| 51 | [FeatureVFP3]>; |
| Evan Cheng | 2bd6536 | 2011-07-07 00:08:19 +0000 | [diff] [blame] | 52 | def FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true", |
| Anton Korobeynikov | b6f4538 | 2009-05-29 23:41:08 +0000 | [diff] [blame] | 53 | "Enable Thumb2 instructions">; |
| Evan Cheng | 5190f09 | 2010-08-11 07:17:46 +0000 | [diff] [blame] | 54 | def FeatureNoARM : SubtargetFeature<"noarm", "NoARM", "true", |
| Tim Northover | a2292d0 | 2013-06-10 23:20:58 +0000 | [diff] [blame] | 55 | "Does not support ARM mode execution", |
| 56 | [ModeThumb]>; |
| Anton Korobeynikov | 0a65a37 | 2010-03-14 18:42:38 +0000 | [diff] [blame] | 57 | def FeatureFP16 : SubtargetFeature<"fp16", "HasFP16", "true", |
| 58 | "Enable half-precision floating point">; |
| Bob Wilson | e8a549c | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 59 | def FeatureVFP4 : SubtargetFeature<"vfp4", "HasVFPv4", "true", |
| 60 | "Enable VFP4 instructions", |
| 61 | [FeatureVFP3, FeatureFP16]>; |
| Joey Gouly | ccd0489 | 2013-09-13 13:46:57 +0000 | [diff] [blame] | 62 | def FeatureFPARMv8 : SubtargetFeature<"fp-armv8", "HasFPARMv8", |
| Joey Gouly | b1b0dd8 | 2013-06-27 11:49:26 +0000 | [diff] [blame] | 63 | "true", "Enable ARMv8 FP", |
| 64 | [FeatureVFP4]>; |
| Oliver Stannard | 8addbf4 | 2015-12-01 10:23:06 +0000 | [diff] [blame] | 65 | def FeatureFullFP16 : SubtargetFeature<"fullfp16", "HasFullFP16", "true", |
| 66 | "Enable full half-precision floating point", |
| 67 | [FeatureFPARMv8]>; |
| Bob Wilson | dd6eb5b | 2010-10-12 16:22:47 +0000 | [diff] [blame] | 68 | def FeatureD16 : SubtargetFeature<"d16", "HasD16", "true", |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 69 | "Restrict FP to 16 double registers">; |
| Jim Grosbach | 151cd8f | 2010-05-05 23:44:43 +0000 | [diff] [blame] | 70 | def FeatureHWDiv : SubtargetFeature<"hwdiv", "HasHardwareDivide", "true", |
| 71 | "Enable divide instructions">; |
| Bob Wilson | e8a549c | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 72 | def FeatureHWDivARM : SubtargetFeature<"hwdiv-arm", |
| 73 | "HasHardwareDivideInARM", "true", |
| 74 | "Enable divide instructions in ARM mode">; |
| Evan Cheng | 40921a4 | 2010-08-11 06:51:54 +0000 | [diff] [blame] | 75 | def FeatureT2XtPk : SubtargetFeature<"t2xtpk", "HasT2ExtractPack", "true", |
| Jim Grosbach | 151cd8f | 2010-05-05 23:44:43 +0000 | [diff] [blame] | 76 | "Enable Thumb2 extract and pack instructions">; |
| Evan Cheng | 40921a4 | 2010-08-11 06:51:54 +0000 | [diff] [blame] | 77 | def FeatureDB : SubtargetFeature<"db", "HasDataBarrier", "true", |
| 78 | "Has data barrier (dmb / dsb) instructions">; |
| Bradley Smith | 4c21cba | 2016-01-15 10:23:46 +0000 | [diff] [blame] | 79 | def FeatureV7Clrex : SubtargetFeature<"v7clrex", "HasV7Clrex", "true", |
| 80 | "Has v7 clrex instruction">; |
| 81 | def FeatureAcquireRelease : SubtargetFeature<"acquire-release", |
| 82 | "HasAcquireRelease", "true", |
| 83 | "Has v8 acquire/release (lda/ldaex etc) instructions">; |
| Evan Cheng | 58066e3 | 2010-07-13 19:21:50 +0000 | [diff] [blame] | 84 | def FeatureSlowFPBrcc : SubtargetFeature<"slow-fp-brcc", "SlowFPBrcc", "true", |
| 85 | "FP compare + branch is slow">; |
| Jim Grosbach | 4d5dc3e | 2010-08-11 15:44:15 +0000 | [diff] [blame] | 86 | def FeatureVFPOnlySP : SubtargetFeature<"fp-only-sp", "FPOnlySP", "true", |
| 87 | "Floating point unit supports single precision only">; |
| Tim Northover | cedd481 | 2013-05-23 19:11:14 +0000 | [diff] [blame] | 88 | def FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true", |
| 89 | "Enable support for Performance Monitor extensions">; |
| Tim Northover | c604765 | 2013-04-10 12:08:35 +0000 | [diff] [blame] | 90 | def FeatureTrustZone : SubtargetFeature<"trustzone", "HasTrustZone", "true", |
| 91 | "Enable support for TrustZone security extensions">; |
| Bradley Smith | fed3e4a | 2016-01-25 11:24:47 +0000 | [diff] [blame] | 92 | def Feature8MSecExt : SubtargetFeature<"8msecext", "Has8MSecExt", "true", |
| 93 | "Enable support for ARMv8-M Security Extensions">; |
| Amara Emerson | 3308909 | 2013-09-19 11:59:01 +0000 | [diff] [blame] | 94 | def FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true", |
| 95 | "Enable support for Cryptography extensions", |
| 96 | [FeatureNEON]>; |
| Bernard Ogden | ee87e85 | 2013-10-29 09:47:35 +0000 | [diff] [blame] | 97 | def FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true", |
| 98 | "Enable support for CRC instructions">; |
| Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 99 | |
| Tim Northover | 1351030 | 2014-04-01 13:22:02 +0000 | [diff] [blame] | 100 | // Cyclone has preferred instructions for zeroing VFP registers, which can |
| 101 | // execute in 0 cycles. |
| 102 | def FeatureZCZeroing : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true", |
| 103 | "Has zero-cycle zeroing instructions">; |
| 104 | |
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 105 | // Some processors have FP multiply-accumulate instructions that don't |
| 106 | // play nicely with other VFP / NEON instructions, and it's generally better |
| Jim Grosbach | a43386b | 2010-03-25 23:11:16 +0000 | [diff] [blame] | 107 | // to just not use them. |
| Evan Cheng | 62c7b5b | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 108 | def FeatureHasSlowFPVMLx : SubtargetFeature<"slowfpvmlx", "SlowFPVMLx", "true", |
| 109 | "Disable VFP / NEON MAC instructions">; |
| Evan Cheng | 38bf5ad | 2011-03-31 19:38:48 +0000 | [diff] [blame] | 110 | |
| 111 | // Cortex-A8 / A9 Advanced SIMD has multiplier accumulator forwarding. |
| 112 | def FeatureVMLxForwarding : SubtargetFeature<"vmlx-forwarding", |
| 113 | "HasVMLxForwarding", "true", |
| 114 | "Has multiplier accumulator forwarding">; |
| 115 | |
| Jim Grosbach | 71fcb4f | 2010-03-25 23:47:34 +0000 | [diff] [blame] | 116 | // Some processors benefit from using NEON instructions for scalar |
| 117 | // single-precision FP operations. |
| Jim Grosbach | 62800a9 | 2010-08-17 18:39:16 +0000 | [diff] [blame] | 118 | def FeatureNEONForFP : SubtargetFeature<"neonfp", "UseNEONForSinglePrecisionFP", |
| 119 | "true", |
| 120 | "Use NEON for single precision FP">; |
| Jim Grosbach | 71fcb4f | 2010-03-25 23:47:34 +0000 | [diff] [blame] | 121 | |
| Evan Cheng | ce8fb68 | 2010-08-09 18:35:19 +0000 | [diff] [blame] | 122 | // Disable 32-bit to 16-bit narrowing for experimentation. |
| 123 | def FeaturePref32BitThumb : SubtargetFeature<"32bit", "Pref32BitThumb", "true", |
| 124 | "Prefer 32-bit Thumb instrs">; |
| Jim Grosbach | a43386b | 2010-03-25 23:11:16 +0000 | [diff] [blame] | 125 | |
| Bob Wilson | a2881ee | 2011-04-19 18:11:49 +0000 | [diff] [blame] | 126 | /// Some instructions update CPSR partially, which can add false dependency for |
| 127 | /// out-of-order implementation, e.g. Cortex-A9, unless each individual bit is |
| 128 | /// mapped to a separate physical register. Avoid partial CPSR update for these |
| 129 | /// processors. |
| 130 | def FeatureAvoidPartialCPSR : SubtargetFeature<"avoid-partial-cpsr", |
| 131 | "AvoidCPSRPartialUpdate", "true", |
| 132 | "Avoid CPSR partial update for OOO execution">; |
| 133 | |
| Evan Cheng | ddc0cb6 | 2012-12-20 19:59:30 +0000 | [diff] [blame] | 134 | def FeatureAvoidMOVsShOp : SubtargetFeature<"avoid-movs-shop", |
| 135 | "AvoidMOVsShifterOperand", "true", |
| 136 | "Avoid movs instructions with shifter operand">; |
| 137 | |
| Evan Cheng | 65f9d19 | 2012-02-28 18:51:51 +0000 | [diff] [blame] | 138 | // Some processors perform return stack prediction. CodeGen should avoid issue |
| 139 | // "normal" call instructions to callees which do not return. |
| 140 | def FeatureHasRAS : SubtargetFeature<"ras", "HasRAS", "true", |
| 141 | "Has return address stack">; |
| 142 | |
| Artyom Skrobov | 5a6e394 | 2015-10-23 17:19:19 +0000 | [diff] [blame] | 143 | /// DSP extension. |
| 144 | def FeatureDSP : SubtargetFeature<"dsp", "HasDSP", "true", |
| Artyom Skrobov | cf29644 | 2015-09-24 17:31:16 +0000 | [diff] [blame] | 145 | "Supports DSP instructions in ARM and/or Thumb2">; |
| Jim Grosbach | cf1464d | 2011-07-01 21:12:19 +0000 | [diff] [blame] | 146 | |
| Evan Cheng | 8740ee3 | 2010-11-03 06:34:55 +0000 | [diff] [blame] | 147 | // Multiprocessing extension. |
| 148 | def FeatureMP : SubtargetFeature<"mp", "HasMPExtension", "true", |
| 149 | "Supports Multiprocessing extension">; |
| Evan Cheng | 40921a4 | 2010-08-11 06:51:54 +0000 | [diff] [blame] | 150 | |
| Bradley Smith | 2521975 | 2013-11-01 13:27:35 +0000 | [diff] [blame] | 151 | // Virtualization extension - requires HW divide (ARMv7-AR ARMARM - 4.4.8). |
| 152 | def FeatureVirtualization : SubtargetFeature<"virtualization", |
| 153 | "HasVirtualization", "true", |
| 154 | "Supports Virtualization extension", |
| 155 | [FeatureHWDiv, FeatureHWDivARM]>; |
| 156 | |
| Amara Emerson | 330afb5 | 2013-09-23 14:26:15 +0000 | [diff] [blame] | 157 | // M-series ISA |
| 158 | def FeatureMClass : SubtargetFeature<"mclass", "ARMProcClass", "MClass", |
| James Molloy | 21efa7d | 2011-09-28 14:21:38 +0000 | [diff] [blame] | 159 | "Is microcontroller profile ('M' series)">; |
| 160 | |
| Amara Emerson | 330afb5 | 2013-09-23 14:26:15 +0000 | [diff] [blame] | 161 | // R-series ISA |
| 162 | def FeatureRClass : SubtargetFeature<"rclass", "ARMProcClass", "RClass", |
| 163 | "Is realtime profile ('R' series)">; |
| 164 | |
| 165 | // A-series ISA |
| 166 | def FeatureAClass : SubtargetFeature<"aclass", "ARMProcClass", "AClass", |
| 167 | "Is application profile ('A' series)">; |
| 168 | |
| Eli Bendersky | 2e2ce49 | 2013-01-30 16:30:19 +0000 | [diff] [blame] | 169 | // Special TRAP encoding for NaCl, which looks like a TRAP in Thumb too. |
| 170 | // See ARMInstrInfo.td for details. |
| 171 | def FeatureNaClTrap : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true", |
| 172 | "NaCl trap">; |
| 173 | |
| Akira Hatanaka | 2670f4a | 2015-07-28 22:44:28 +0000 | [diff] [blame] | 174 | def FeatureStrictAlign : SubtargetFeature<"strict-align", |
| 175 | "StrictAlign", "true", |
| 176 | "Disallow all unaligned memory " |
| 177 | "access">; |
| 178 | |
| Akira Hatanaka | 1bc8af7 | 2015-07-07 06:54:42 +0000 | [diff] [blame] | 179 | def FeatureLongCalls : SubtargetFeature<"long-calls", "GenLongCalls", "true", |
| 180 | "Generate calls via indirect call " |
| 181 | "instructions">; |
| 182 | |
| Akira Hatanaka | 2858152 | 2015-07-21 01:42:02 +0000 | [diff] [blame] | 183 | def FeatureReserveR9 : SubtargetFeature<"reserve-r9", "ReserveR9", "true", |
| 184 | "Reserve R9, making it unavailable as " |
| 185 | "GPR">; |
| 186 | |
| Akira Hatanaka | 024d91a | 2015-07-16 00:58:23 +0000 | [diff] [blame] | 187 | def FeatureNoMovt : SubtargetFeature<"no-movt", "NoMovt", "true", |
| 188 | "Don't use movt/movw pairs for 32-bit " |
| 189 | "imms">; |
| 190 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 191 | |
| 192 | //===----------------------------------------------------------------------===// |
| 193 | // ARM ISAa. |
| 194 | // |
| 195 | |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 196 | def HasV4TOps : SubtargetFeature<"v4t", "HasV4TOps", "true", |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 197 | "Support ARM v4T instructions">; |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 198 | def HasV5TOps : SubtargetFeature<"v5t", "HasV5TOps", "true", |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 199 | "Support ARM v5T instructions", |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 200 | [HasV4TOps]>; |
| 201 | def HasV5TEOps : SubtargetFeature<"v5te", "HasV5TEOps", "true", |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 202 | "Support ARM v5TE, v5TEj, and v5TExp instructions", |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 203 | [HasV5TOps]>; |
| 204 | def HasV6Ops : SubtargetFeature<"v6", "HasV6Ops", "true", |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 205 | "Support ARM v6 instructions", |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 206 | [HasV5TEOps]>; |
| Tim Northover | f86d1f0 | 2013-10-07 11:10:47 +0000 | [diff] [blame] | 207 | def HasV6MOps : SubtargetFeature<"v6m", "HasV6MOps", "true", |
| 208 | "Support ARM v6M instructions", |
| 209 | [HasV6Ops]>; |
| Bradley Smith | e26f799 | 2016-01-15 10:24:39 +0000 | [diff] [blame] | 210 | def HasV8MBaselineOps : SubtargetFeature<"v8m", "HasV8MBaselineOps", "true", |
| 211 | "Support ARM v8M Baseline instructions", |
| 212 | [HasV6MOps]>; |
| Renato Golin | 1235060 | 2015-03-17 11:55:28 +0000 | [diff] [blame] | 213 | def HasV6KOps : SubtargetFeature<"v6k", "HasV6KOps", "true", |
| 214 | "Support ARM v6k instructions", |
| 215 | [HasV6Ops]>; |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 216 | def HasV6T2Ops : SubtargetFeature<"v6t2", "HasV6T2Ops", "true", |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 217 | "Support ARM v6t2 instructions", |
| Bradley Smith | e26f799 | 2016-01-15 10:24:39 +0000 | [diff] [blame] | 218 | [HasV8MBaselineOps, HasV6KOps, FeatureThumb2]>; |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 219 | def HasV7Ops : SubtargetFeature<"v7", "HasV7Ops", "true", |
| Evan Cheng | f2c2616 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 220 | "Support ARM v7 instructions", |
| Bradley Smith | 4c21cba | 2016-01-15 10:23:46 +0000 | [diff] [blame] | 221 | [HasV6T2Ops, FeaturePerfMon, |
| 222 | FeatureV7Clrex]>; |
| Joey Gouly | b3f550e | 2013-06-26 16:58:26 +0000 | [diff] [blame] | 223 | def HasV8Ops : SubtargetFeature<"v8", "HasV8Ops", "true", |
| 224 | "Support ARM v8 instructions", |
| Bradley Smith | 4c21cba | 2016-01-15 10:23:46 +0000 | [diff] [blame] | 225 | [HasV7Ops, FeatureAcquireRelease]>; |
| Vladimir Sukharev | 2afdb32 | 2015-04-01 14:54:56 +0000 | [diff] [blame] | 226 | def HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true", |
| Vladimir Sukharev | c632cda | 2015-03-26 17:05:54 +0000 | [diff] [blame] | 227 | "Support ARM v8.1a instructions", |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 228 | [HasV8Ops]>; |
| Oliver Stannard | 8addbf4 | 2015-12-01 10:23:06 +0000 | [diff] [blame] | 229 | def HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true", |
| 230 | "Support ARM v8.2a instructions", |
| 231 | [HasV8_1aOps]>; |
| Bradley Smith | e26f799 | 2016-01-15 10:24:39 +0000 | [diff] [blame] | 232 | def HasV8MMainlineOps : SubtargetFeature<"v8m.main", "HasV8MMainlineOps", "true", |
| 233 | "Support ARM v8M Mainline instructions", |
| 234 | [HasV7Ops]>; |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 235 | |
| Evan Cheng | 40921a4 | 2010-08-11 06:51:54 +0000 | [diff] [blame] | 236 | |
| Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 237 | //===----------------------------------------------------------------------===// |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 238 | // ARM Processor subtarget features. |
| 239 | // |
| 240 | |
| 241 | def ProcA5 : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5", |
| 242 | "Cortex-A5 ARM processors", []>; |
| 243 | def ProcA7 : SubtargetFeature<"a7", "ARMProcFamily", "CortexA7", |
| 244 | "Cortex-A7 ARM processors", []>; |
| 245 | def ProcA8 : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8", |
| 246 | "Cortex-A8 ARM processors", []>; |
| 247 | def ProcA9 : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9", |
| 248 | "Cortex-A9 ARM processors", []>; |
| 249 | def ProcA12 : SubtargetFeature<"a12", "ARMProcFamily", "CortexA12", |
| 250 | "Cortex-A12 ARM processors", []>; |
| 251 | def ProcA15 : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15", |
| 252 | "Cortex-A15 ARM processors", []>; |
| 253 | def ProcA17 : SubtargetFeature<"a17", "ARMProcFamily", "CortexA17", |
| 254 | "Cortex-A17 ARM processors", []>; |
| Renato Golin | 2b6b7ff | 2016-03-21 17:29:01 +0000 | [diff] [blame] | 255 | def ProcA32 : SubtargetFeature<"a32", "ARMProcFamily", "CortexA32", |
| 256 | "Cortex-A32 ARM processors", []>; |
| Christof Douma | 8b5dc2c | 2015-12-02 11:53:44 +0000 | [diff] [blame] | 257 | def ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35", |
| 258 | "Cortex-A35 ARM processors", []>; |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 259 | def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53", |
| 260 | "Cortex-A53 ARM processors", []>; |
| 261 | def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57", |
| 262 | "Cortex-A57 ARM processors", []>; |
| 263 | def ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72", |
| 264 | "Cortex-A72 ARM processors", []>; |
| 265 | |
| 266 | def ProcKrait : SubtargetFeature<"krait", "ARMProcFamily", "Krait", |
| 267 | "Qualcomm ARM processors", []>; |
| 268 | def ProcSwift : SubtargetFeature<"swift", "ARMProcFamily", "Swift", |
| 269 | "Swift ARM processors", []>; |
| 270 | |
| MinSeong Kim | a7385eb | 2016-01-05 12:51:59 +0000 | [diff] [blame] | 271 | def ProcExynosM1 : SubtargetFeature<"exynosm1", "ARMProcFamily", "ExynosM1", |
| 272 | "Samsung Exynos-M1 processors", []>; |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 273 | |
| 274 | def ProcR4 : SubtargetFeature<"r4", "ARMProcFamily", "CortexR4", |
| Bradley Smith | 4c21cba | 2016-01-15 10:23:46 +0000 | [diff] [blame] | 275 | "Cortex-R4 ARM processors", []>; |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 276 | def ProcR5 : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5", |
| 277 | "Cortex-R5 ARM processors", []>; |
| 278 | def ProcR7 : SubtargetFeature<"r7", "ARMProcFamily", "CortexR7", |
| 279 | "Cortex-R7 ARM processors", []>; |
| 280 | |
| 281 | |
| 282 | //===----------------------------------------------------------------------===// |
| 283 | // ARM schedules. |
| Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 284 | // |
| 285 | |
| Evan Cheng | 4e712de | 2009-06-19 01:51:50 +0000 | [diff] [blame] | 286 | include "ARMSchedule.td" |
| 287 | |
| Richard Barton | c31078c | 2013-11-22 11:53:16 +0000 | [diff] [blame] | 288 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 289 | //===----------------------------------------------------------------------===// |
| 290 | // ARM architectures |
| 291 | // |
| Bob Wilson | e8a549c | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 292 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 293 | def ARMv2 : Architecture<"armv2", "ARMv2", []>; |
| Bernard Ogden | 4400cde | 2013-10-14 13:16:57 +0000 | [diff] [blame] | 294 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 295 | def ARMv2a : Architecture<"armv2a", "ARMv2a", []>; |
| Renato Golin | 16ea8ba | 2014-10-13 10:22:19 +0000 | [diff] [blame] | 296 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 297 | def ARMv3 : Architecture<"armv3", "ARMv3", []>; |
| Bernard Ogden | 4400cde | 2013-10-14 13:16:57 +0000 | [diff] [blame] | 298 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 299 | def ARMv3m : Architecture<"armv3m", "ARMv3m", []>; |
| Bernard Ogden | 5316976 | 2013-10-14 13:17:07 +0000 | [diff] [blame] | 300 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 301 | def ARMv4 : Architecture<"armv4", "ARMv4", []>; |
| Javed Absar | 5c5e3c5 | 2015-04-09 14:07:28 +0000 | [diff] [blame] | 302 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 303 | def ARMv4t : Architecture<"armv4t", "ARMv4t", [HasV4TOps]>; |
| Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 304 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 305 | def ARMv5t : Architecture<"armv5t", "ARMv5t", [HasV5TOps]>; |
| Ana Pazos | 93a07c2 | 2013-12-06 22:48:17 +0000 | [diff] [blame] | 306 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 307 | def ARMv5te : Architecture<"armv5te", "ARMv5te", [HasV5TEOps]>; |
| Rafael Espindola | d89b16d | 2014-01-02 13:40:08 +0000 | [diff] [blame] | 308 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 309 | def ARMv5tej : Architecture<"armv5tej", "ARMv5tej", [HasV5TEOps]>; |
| Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 310 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 311 | def ARMv6 : Architecture<"armv6", "ARMv6", [HasV6Ops]>; |
| Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 312 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 313 | def ARMv6t2 : Architecture<"armv6t2", "ARMv6t2", [HasV6T2Ops, |
| Artyom Skrobov | cf29644 | 2015-09-24 17:31:16 +0000 | [diff] [blame] | 314 | FeatureDSP]>; |
| Anton Korobeynikov | b6f4538 | 2009-05-29 23:41:08 +0000 | [diff] [blame] | 315 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 316 | def ARMv6k : Architecture<"armv6k", "ARMv6k", [HasV6KOps]>; |
| 317 | |
| Artyom Skrobov | f187a65 | 2015-11-16 14:05:32 +0000 | [diff] [blame] | 318 | def ARMv6kz : Architecture<"armv6kz", "ARMv6kz", [HasV6KOps, |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 319 | FeatureTrustZone]>; |
| 320 | |
| 321 | def ARMv6m : Architecture<"armv6-m", "ARMv6m", [HasV6MOps, |
| 322 | FeatureNoARM, |
| 323 | FeatureDB, |
| 324 | FeatureMClass]>; |
| 325 | |
| 326 | def ARMv6sm : Architecture<"armv6s-m", "ARMv6sm", [HasV6MOps, |
| 327 | FeatureNoARM, |
| 328 | FeatureDB, |
| 329 | FeatureMClass]>; |
| 330 | |
| 331 | def ARMv7a : Architecture<"armv7-a", "ARMv7a", [HasV7Ops, |
| 332 | FeatureNEON, |
| 333 | FeatureDB, |
| 334 | FeatureDSP, |
| 335 | FeatureAClass]>; |
| 336 | |
| 337 | def ARMv7r : Architecture<"armv7-r", "ARMv7r", [HasV7Ops, |
| 338 | FeatureDB, |
| 339 | FeatureDSP, |
| 340 | FeatureHWDiv, |
| 341 | FeatureRClass]>; |
| 342 | |
| 343 | def ARMv7m : Architecture<"armv7-m", "ARMv7m", [HasV7Ops, |
| 344 | FeatureThumb2, |
| 345 | FeatureNoARM, |
| 346 | FeatureDB, |
| 347 | FeatureHWDiv, |
| 348 | FeatureMClass]>; |
| 349 | |
| 350 | def ARMv7em : Architecture<"armv7e-m", "ARMv7em", [HasV7Ops, |
| 351 | FeatureThumb2, |
| 352 | FeatureNoARM, |
| 353 | FeatureDB, |
| 354 | FeatureHWDiv, |
| 355 | FeatureMClass, |
| 356 | FeatureDSP, |
| 357 | FeatureT2XtPk]>; |
| 358 | |
| 359 | def ARMv8a : Architecture<"armv8-a", "ARMv8a", [HasV8Ops, |
| 360 | FeatureAClass, |
| 361 | FeatureDB, |
| 362 | FeatureFPARMv8, |
| 363 | FeatureNEON, |
| 364 | FeatureDSP, |
| 365 | FeatureTrustZone, |
| 366 | FeatureMP, |
| 367 | FeatureVirtualization, |
| 368 | FeatureCrypto, |
| 369 | FeatureCRC]>; |
| 370 | |
| 371 | def ARMv81a : Architecture<"armv8.1-a", "ARMv81a", [HasV8_1aOps, |
| 372 | FeatureAClass, |
| 373 | FeatureDB, |
| 374 | FeatureFPARMv8, |
| 375 | FeatureNEON, |
| 376 | FeatureDSP, |
| 377 | FeatureTrustZone, |
| 378 | FeatureMP, |
| 379 | FeatureVirtualization, |
| 380 | FeatureCrypto, |
| 381 | FeatureCRC]>; |
| 382 | |
| Oliver Stannard | 4667071 | 2015-12-01 10:33:56 +0000 | [diff] [blame] | 383 | def ARMv82a : Architecture<"armv8.2-a", "ARMv82a", [HasV8_2aOps, |
| 384 | FeatureAClass, |
| 385 | FeatureDB, |
| 386 | FeatureFPARMv8, |
| 387 | FeatureNEON, |
| 388 | FeatureDSP, |
| 389 | FeatureTrustZone, |
| 390 | FeatureMP, |
| 391 | FeatureVirtualization, |
| 392 | FeatureCrypto, |
| 393 | FeatureCRC]>; |
| 394 | |
| Bradley Smith | e26f799 | 2016-01-15 10:24:39 +0000 | [diff] [blame] | 395 | def ARMv8mBaseline : Architecture<"armv8-m.base", "ARMv8mBaseline", |
| 396 | [HasV8MBaselineOps, |
| 397 | FeatureNoARM, |
| 398 | FeatureDB, |
| 399 | FeatureHWDiv, |
| Bradley Smith | 433c22e | 2016-01-15 10:26:51 +0000 | [diff] [blame] | 400 | FeatureV7Clrex, |
| Bradley Smith | fed3e4a | 2016-01-25 11:24:47 +0000 | [diff] [blame] | 401 | Feature8MSecExt, |
| Bradley Smith | e26f799 | 2016-01-15 10:24:39 +0000 | [diff] [blame] | 402 | FeatureAcquireRelease, |
| 403 | FeatureMClass]>; |
| 404 | |
| 405 | def ARMv8mMainline : Architecture<"armv8-m.main", "ARMv8mMainline", |
| 406 | [HasV8MMainlineOps, |
| 407 | FeatureNoARM, |
| 408 | FeatureDB, |
| 409 | FeatureHWDiv, |
| Bradley Smith | fed3e4a | 2016-01-25 11:24:47 +0000 | [diff] [blame] | 410 | Feature8MSecExt, |
| Bradley Smith | e26f799 | 2016-01-15 10:24:39 +0000 | [diff] [blame] | 411 | FeatureAcquireRelease, |
| 412 | FeatureMClass]>; |
| 413 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 414 | // Aliases |
| 415 | def IWMMXT : Architecture<"iwmmxt", "ARMv5te", [ARMv5te]>; |
| 416 | def IWMMXT2 : Architecture<"iwmmxt2", "ARMv5te", [ARMv5te]>; |
| 417 | def XScale : Architecture<"xscale", "ARMv5te", [ARMv5te]>; |
| 418 | def ARMv6j : Architecture<"armv6j", "ARMv7a", [ARMv6]>; |
| 419 | def ARMv7k : Architecture<"armv7k", "ARMv7a", [ARMv7a]>; |
| 420 | def ARMv7s : Architecture<"armv7s", "ARMv7a", [ARMv7a]>; |
| 421 | |
| 422 | |
| 423 | //===----------------------------------------------------------------------===// |
| 424 | // ARM processors |
| 425 | // |
| 426 | |
| 427 | // Dummy CPU, used to target architectures |
| 428 | def : ProcNoItin<"generic", []>; |
| 429 | |
| 430 | def : ProcNoItin<"arm8", [ARMv4]>; |
| 431 | def : ProcNoItin<"arm810", [ARMv4]>; |
| 432 | def : ProcNoItin<"strongarm", [ARMv4]>; |
| 433 | def : ProcNoItin<"strongarm110", [ARMv4]>; |
| 434 | def : ProcNoItin<"strongarm1100", [ARMv4]>; |
| 435 | def : ProcNoItin<"strongarm1110", [ARMv4]>; |
| 436 | |
| 437 | def : ProcNoItin<"arm7tdmi", [ARMv4t]>; |
| 438 | def : ProcNoItin<"arm7tdmi-s", [ARMv4t]>; |
| 439 | def : ProcNoItin<"arm710t", [ARMv4t]>; |
| 440 | def : ProcNoItin<"arm720t", [ARMv4t]>; |
| 441 | def : ProcNoItin<"arm9", [ARMv4t]>; |
| 442 | def : ProcNoItin<"arm9tdmi", [ARMv4t]>; |
| 443 | def : ProcNoItin<"arm920", [ARMv4t]>; |
| 444 | def : ProcNoItin<"arm920t", [ARMv4t]>; |
| 445 | def : ProcNoItin<"arm922t", [ARMv4t]>; |
| 446 | def : ProcNoItin<"arm940t", [ARMv4t]>; |
| 447 | def : ProcNoItin<"ep9312", [ARMv4t]>; |
| 448 | |
| 449 | def : ProcNoItin<"arm10tdmi", [ARMv5t]>; |
| 450 | def : ProcNoItin<"arm1020t", [ARMv5t]>; |
| 451 | |
| 452 | def : ProcNoItin<"arm9e", [ARMv5te]>; |
| 453 | def : ProcNoItin<"arm926ej-s", [ARMv5te]>; |
| 454 | def : ProcNoItin<"arm946e-s", [ARMv5te]>; |
| 455 | def : ProcNoItin<"arm966e-s", [ARMv5te]>; |
| 456 | def : ProcNoItin<"arm968e-s", [ARMv5te]>; |
| 457 | def : ProcNoItin<"arm10e", [ARMv5te]>; |
| 458 | def : ProcNoItin<"arm1020e", [ARMv5te]>; |
| 459 | def : ProcNoItin<"arm1022e", [ARMv5te]>; |
| 460 | def : ProcNoItin<"xscale", [ARMv5te]>; |
| 461 | def : ProcNoItin<"iwmmxt", [ARMv5te]>; |
| 462 | |
| 463 | def : Processor<"arm1136j-s", ARMV6Itineraries, [ARMv6]>; |
| 464 | def : Processor<"arm1136jf-s", ARMV6Itineraries, [ARMv6, |
| 465 | FeatureVFP2, |
| 466 | FeatureHasSlowFPVMLx]>; |
| 467 | |
| 468 | def : Processor<"cortex-m0", ARMV6Itineraries, [ARMv6m]>; |
| 469 | def : Processor<"cortex-m0plus", ARMV6Itineraries, [ARMv6m]>; |
| 470 | def : Processor<"cortex-m1", ARMV6Itineraries, [ARMv6m]>; |
| 471 | def : Processor<"sc000", ARMV6Itineraries, [ARMv6m]>; |
| 472 | |
| Artyom Skrobov | f187a65 | 2015-11-16 14:05:32 +0000 | [diff] [blame] | 473 | def : Processor<"arm1176jz-s", ARMV6Itineraries, [ARMv6kz]>; |
| 474 | def : Processor<"arm1176jzf-s", ARMV6Itineraries, [ARMv6kz, |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 475 | FeatureVFP2, |
| 476 | FeatureHasSlowFPVMLx]>; |
| 477 | |
| 478 | def : Processor<"mpcorenovfp", ARMV6Itineraries, [ARMv6k]>; |
| 479 | def : Processor<"mpcore", ARMV6Itineraries, [ARMv6k, |
| 480 | FeatureVFP2, |
| 481 | FeatureHasSlowFPVMLx]>; |
| 482 | |
| 483 | def : Processor<"arm1156t2-s", ARMV6Itineraries, [ARMv6t2]>; |
| 484 | def : Processor<"arm1156t2f-s", ARMV6Itineraries, [ARMv6t2, |
| 485 | FeatureVFP2, |
| 486 | FeatureHasSlowFPVMLx]>; |
| 487 | |
| Quentin Colombet | 13cd521 | 2012-11-29 19:48:01 +0000 | [diff] [blame] | 488 | // FIXME: A5 has currently the same Schedule model as A8 |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 489 | def : ProcessorModel<"cortex-a5", CortexA8Model, [ARMv7a, ProcA5, |
| 490 | FeatureHasRAS, |
| 491 | FeatureTrustZone, |
| 492 | FeatureSlowFPBrcc, |
| 493 | FeatureHasSlowFPVMLx, |
| 494 | FeatureVMLxForwarding, |
| 495 | FeatureT2XtPk, |
| 496 | FeatureMP, |
| 497 | FeatureVFP4]>; |
| 498 | |
| 499 | def : ProcessorModel<"cortex-a7", CortexA8Model, [ARMv7a, ProcA7, |
| 500 | FeatureHasRAS, |
| 501 | FeatureTrustZone, |
| 502 | FeatureSlowFPBrcc, |
| 503 | FeatureHasSlowFPVMLx, |
| 504 | FeatureVMLxForwarding, |
| 505 | FeatureT2XtPk, |
| 506 | FeatureMP, |
| 507 | FeatureVFP4, |
| 508 | FeatureHWDiv, |
| 509 | FeatureHWDivARM, |
| 510 | FeatureVirtualization]>; |
| 511 | |
| 512 | def : ProcessorModel<"cortex-a8", CortexA8Model, [ARMv7a, ProcA8, |
| 513 | FeatureHasRAS, |
| 514 | FeatureTrustZone, |
| 515 | FeatureSlowFPBrcc, |
| 516 | FeatureHasSlowFPVMLx, |
| 517 | FeatureVMLxForwarding, |
| 518 | FeatureT2XtPk]>; |
| 519 | |
| 520 | def : ProcessorModel<"cortex-a9", CortexA9Model, [ARMv7a, ProcA9, |
| 521 | FeatureHasRAS, |
| 522 | FeatureTrustZone, |
| 523 | FeatureVMLxForwarding, |
| 524 | FeatureT2XtPk, |
| 525 | FeatureFP16, |
| 526 | FeatureAvoidPartialCPSR, |
| 527 | FeatureMP]>; |
| Richard Barton | c31078c | 2013-11-22 11:53:16 +0000 | [diff] [blame] | 528 | |
| 529 | // FIXME: A12 has currently the same Schedule model as A9 |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 530 | def : ProcessorModel<"cortex-a12", CortexA9Model, [ARMv7a, ProcA12, |
| 531 | FeatureHasRAS, |
| 532 | FeatureTrustZone, |
| 533 | FeatureVMLxForwarding, |
| 534 | FeatureT2XtPk, |
| 535 | FeatureVFP4, |
| 536 | FeatureHWDiv, |
| 537 | FeatureHWDivARM, |
| 538 | FeatureAvoidPartialCPSR, |
| 539 | FeatureVirtualization, |
| 540 | FeatureMP]>; |
| Richard Barton | c31078c | 2013-11-22 11:53:16 +0000 | [diff] [blame] | 541 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 542 | // FIXME: A15 has currently the same Schedule model as A9. |
| 543 | def : ProcessorModel<"cortex-a15", CortexA9Model, [ARMv7a, ProcA15, |
| 544 | FeatureHasRAS, |
| 545 | FeatureTrustZone, |
| 546 | FeatureT2XtPk, |
| 547 | FeatureVFP4, |
| 548 | FeatureMP, |
| 549 | FeatureHWDiv, |
| 550 | FeatureHWDivARM, |
| 551 | FeatureAvoidPartialCPSR, |
| 552 | FeatureVirtualization]>; |
| Richard Barton | c31078c | 2013-11-22 11:53:16 +0000 | [diff] [blame] | 553 | |
| Renato Golin | 16ea8ba | 2014-10-13 10:22:19 +0000 | [diff] [blame] | 554 | // FIXME: A17 has currently the same Schedule model as A9 |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 555 | def : ProcessorModel<"cortex-a17", CortexA9Model, [ARMv7a, ProcA17, |
| 556 | FeatureHasRAS, |
| 557 | FeatureTrustZone, |
| 558 | FeatureMP, |
| 559 | FeatureVMLxForwarding, |
| 560 | FeatureT2XtPk, |
| 561 | FeatureVFP4, |
| 562 | FeatureHWDiv, |
| 563 | FeatureHWDivARM, |
| 564 | FeatureAvoidPartialCPSR, |
| 565 | FeatureVirtualization]>; |
| Renato Golin | 16ea8ba | 2014-10-13 10:22:19 +0000 | [diff] [blame] | 566 | |
| Tim Northover | 1351030 | 2014-04-01 13:22:02 +0000 | [diff] [blame] | 567 | // FIXME: krait has currently the same Schedule model as A9 |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 568 | // FIXME: krait has currently the same features as A9 plus VFP4 and hardware |
| 569 | // division features. |
| 570 | def : ProcessorModel<"krait", CortexA9Model, [ARMv7a, ProcKrait, |
| 571 | FeatureHasRAS, |
| 572 | FeatureVMLxForwarding, |
| 573 | FeatureT2XtPk, |
| 574 | FeatureFP16, |
| 575 | FeatureAvoidPartialCPSR, |
| 576 | FeatureVFP4, |
| 577 | FeatureHWDiv, |
| 578 | FeatureHWDivARM]>; |
| 579 | |
| 580 | def : ProcessorModel<"swift", SwiftModel, [ARMv7a, ProcSwift, |
| 581 | FeatureHasRAS, |
| 582 | FeatureNEONForFP, |
| 583 | FeatureT2XtPk, |
| 584 | FeatureVFP4, |
| 585 | FeatureMP, |
| 586 | FeatureHWDiv, |
| 587 | FeatureHWDivARM, |
| 588 | FeatureAvoidPartialCPSR, |
| 589 | FeatureAvoidMOVsShOp, |
| 590 | FeatureHasSlowFPVMLx]>; |
| Tim Northover | 1351030 | 2014-04-01 13:22:02 +0000 | [diff] [blame] | 591 | |
| Javed Absar | 5c5e3c5 | 2015-04-09 14:07:28 +0000 | [diff] [blame] | 592 | // FIXME: R4 has currently the same ProcessorModel as A8. |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 593 | def : ProcessorModel<"cortex-r4", CortexA8Model, [ARMv7r, ProcR4, |
| 594 | FeatureHasRAS, |
| 595 | FeatureAvoidPartialCPSR, |
| 596 | FeatureT2XtPk]>; |
| Javed Absar | 5c5e3c5 | 2015-04-09 14:07:28 +0000 | [diff] [blame] | 597 | |
| 598 | // FIXME: R4F has currently the same ProcessorModel as A8. |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 599 | def : ProcessorModel<"cortex-r4f", CortexA8Model, [ARMv7r, ProcR4, |
| 600 | FeatureHasRAS, |
| 601 | FeatureSlowFPBrcc, |
| 602 | FeatureHasSlowFPVMLx, |
| 603 | FeatureVFP3, |
| 604 | FeatureD16, |
| 605 | FeatureAvoidPartialCPSR, |
| 606 | FeatureT2XtPk]>; |
| Javed Absar | 5c5e3c5 | 2015-04-09 14:07:28 +0000 | [diff] [blame] | 607 | |
| Quentin Colombet | b1b66e7 | 2012-12-21 04:35:05 +0000 | [diff] [blame] | 608 | // FIXME: R5 has currently the same ProcessorModel as A8. |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 609 | def : ProcessorModel<"cortex-r5", CortexA8Model, [ARMv7r, ProcR5, |
| 610 | FeatureHasRAS, |
| 611 | FeatureVFP3, |
| 612 | FeatureD16, |
| 613 | FeatureSlowFPBrcc, |
| 614 | FeatureHWDivARM, |
| 615 | FeatureHasSlowFPVMLx, |
| 616 | FeatureAvoidPartialCPSR, |
| 617 | FeatureT2XtPk]>; |
| Evan Cheng | 49e02fc | 2010-08-11 06:30:38 +0000 | [diff] [blame] | 618 | |
| Bradley Smith | 26c9922 | 2015-02-18 10:33:30 +0000 | [diff] [blame] | 619 | // FIXME: R7 has currently the same ProcessorModel as A8 and is modelled as R5. |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 620 | def : ProcessorModel<"cortex-r7", CortexA8Model, [ARMv7r, ProcR7, |
| 621 | FeatureHasRAS, |
| 622 | FeatureVFP3, |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 623 | FeatureD16, |
| Bradley Smith | d5a1f47 | 2015-12-07 10:54:36 +0000 | [diff] [blame] | 624 | FeatureFP16, |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 625 | FeatureMP, |
| 626 | FeatureSlowFPBrcc, |
| 627 | FeatureHWDivARM, |
| 628 | FeatureHasSlowFPVMLx, |
| 629 | FeatureAvoidPartialCPSR, |
| 630 | FeatureT2XtPk]>; |
| Bradley Smith | 26c9922 | 2015-02-18 10:33:30 +0000 | [diff] [blame] | 631 | |
| Alexandros Lamprineas | 8431642 | 2016-03-10 17:38:41 +0000 | [diff] [blame] | 632 | def : ProcessorModel<"cortex-r8", CortexA8Model, [ARMv7r, |
| 633 | FeatureHasRAS, |
| 634 | FeatureVFP3, |
| 635 | FeatureD16, |
| 636 | FeatureFP16, |
| 637 | FeatureMP, |
| 638 | FeatureSlowFPBrcc, |
| 639 | FeatureHWDivARM, |
| 640 | FeatureHasSlowFPVMLx, |
| 641 | FeatureAvoidPartialCPSR, |
| 642 | FeatureT2XtPk]>; |
| 643 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 644 | def : ProcNoItin<"cortex-m3", [ARMv7m]>; |
| 645 | def : ProcNoItin<"sc300", [ARMv7m]>; |
| Evan Cheng | 8b2bda0 | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 646 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 647 | def : ProcNoItin<"cortex-m4", [ARMv7em, |
| 648 | FeatureVFP4, |
| 649 | FeatureVFPOnlySP, |
| 650 | FeatureD16]>; |
| 651 | |
| 652 | def : ProcNoItin<"cortex-m7", [ARMv7em, |
| 653 | FeatureFPARMv8, |
| 654 | FeatureD16]>; |
| Oliver Stannard | 37e4daa | 2014-10-01 09:02:17 +0000 | [diff] [blame] | 655 | |
| Renato Golin | 2b6b7ff | 2016-03-21 17:29:01 +0000 | [diff] [blame] | 656 | def : ProcNoItin<"cortex-a32", [ARMv8a, |
| 657 | FeatureHWDiv, |
| 658 | FeatureHWDivARM, |
| 659 | FeatureT2XtPk, |
| 660 | FeatureCrypto, |
| 661 | FeatureCRC]>; |
| Anton Korobeynikov | 0b91cc4 | 2009-05-23 19:51:43 +0000 | [diff] [blame] | 662 | |
| Christof Douma | 8b5dc2c | 2015-12-02 11:53:44 +0000 | [diff] [blame] | 663 | def : ProcNoItin<"cortex-a35", [ARMv8a, ProcA35, |
| 664 | FeatureHWDiv, |
| 665 | FeatureHWDivARM, |
| 666 | FeatureT2XtPk, |
| 667 | FeatureCrypto, |
| 668 | FeatureCRC]>; |
| 669 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 670 | def : ProcNoItin<"cortex-a53", [ARMv8a, ProcA53, |
| 671 | FeatureHWDiv, |
| 672 | FeatureHWDivARM, |
| 673 | FeatureT2XtPk, |
| 674 | FeatureCrypto, |
| 675 | FeatureCRC]>; |
| Bob Wilson | e8a549c | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 676 | |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 677 | def : ProcNoItin<"cortex-a57", [ARMv8a, ProcA57, |
| 678 | FeatureHWDiv, |
| 679 | FeatureHWDivARM, |
| 680 | FeatureT2XtPk, |
| 681 | FeatureCrypto, |
| 682 | FeatureCRC]>; |
| 683 | |
| 684 | def : ProcNoItin<"cortex-a72", [ARMv8a, ProcA72, |
| 685 | FeatureHWDiv, |
| 686 | FeatureHWDivARM, |
| 687 | FeatureT2XtPk, |
| 688 | FeatureCrypto, |
| 689 | FeatureCRC]>; |
| Joey Gouly | b3f550e | 2013-06-26 16:58:26 +0000 | [diff] [blame] | 690 | |
| Tim Northover | 1351030 | 2014-04-01 13:22:02 +0000 | [diff] [blame] | 691 | // Cyclone is very similar to swift |
| Bradley Smith | 323fee1 | 2015-11-16 11:10:19 +0000 | [diff] [blame] | 692 | def : ProcessorModel<"cyclone", SwiftModel, [ARMv8a, ProcSwift, |
| 693 | FeatureHasRAS, |
| 694 | FeatureNEONForFP, |
| 695 | FeatureT2XtPk, |
| 696 | FeatureVFP4, |
| 697 | FeatureMP, |
| 698 | FeatureHWDiv, |
| 699 | FeatureHWDivARM, |
| 700 | FeatureAvoidPartialCPSR, |
| 701 | FeatureAvoidMOVsShOp, |
| 702 | FeatureHasSlowFPVMLx, |
| 703 | FeatureCrypto, |
| 704 | FeatureZCZeroing]>; |
| 705 | |
| MinSeong Kim | a7385eb | 2016-01-05 12:51:59 +0000 | [diff] [blame] | 706 | def : ProcNoItin<"exynos-m1", [ARMv8a, ProcExynosM1, |
| 707 | FeatureHWDiv, |
| 708 | FeatureHWDivARM, |
| 709 | FeatureT2XtPk, |
| 710 | FeatureCrypto, |
| 711 | FeatureCRC]>; |
| Ana Pazos | 93a07c2 | 2013-12-06 22:48:17 +0000 | [diff] [blame] | 712 | |
| Evan Cheng | 10043e2 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 713 | //===----------------------------------------------------------------------===// |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 714 | // Register File Description |
| 715 | //===----------------------------------------------------------------------===// |
| 716 | |
| 717 | include "ARMRegisterInfo.td" |
| 718 | |
| Bob Wilson | a4c2290 | 2009-04-17 19:07:39 +0000 | [diff] [blame] | 719 | include "ARMCallingConv.td" |
| 720 | |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 721 | //===----------------------------------------------------------------------===// |
| 722 | // Instruction Descriptions |
| 723 | //===----------------------------------------------------------------------===// |
| 724 | |
| 725 | include "ARMInstrInfo.td" |
| 726 | |
| Jakob Stoklund Olesen | b93331f | 2010-04-05 03:10:20 +0000 | [diff] [blame] | 727 | def ARMInstrInfo : InstrInfo; |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 728 | |
| 729 | //===----------------------------------------------------------------------===// |
| 730 | // Declare the target which we are implementing |
| 731 | //===----------------------------------------------------------------------===// |
| 732 | |
| Akira Hatanaka | ee97475 | 2015-03-27 23:41:42 +0000 | [diff] [blame] | 733 | def ARMAsmWriter : AsmWriter { |
| 734 | string AsmWriterClassName = "InstPrinter"; |
| 735 | int PassSubtarget = 1; |
| 736 | int Variant = 0; |
| 737 | bit isMCAsmWriter = 1; |
| 738 | } |
| 739 | |
| Colin LeMahieu | 8a0453e | 2015-11-09 00:31:07 +0000 | [diff] [blame] | 740 | def ARMAsmParserVariant : AsmParserVariant { |
| 741 | int Variant = 0; |
| 742 | string Name = "ARM"; |
| 743 | string BreakCharacters = "."; |
| 744 | } |
| 745 | |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 746 | def ARM : Target { |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 747 | // Pull in Instruction Info: |
| 748 | let InstructionSet = ARMInstrInfo; |
| Akira Hatanaka | ee97475 | 2015-03-27 23:41:42 +0000 | [diff] [blame] | 749 | let AssemblyWriters = [ARMAsmWriter]; |
| Colin LeMahieu | 8a0453e | 2015-11-09 00:31:07 +0000 | [diff] [blame] | 750 | let AssemblyParserVariants = [ARMAsmParserVariant]; |
| Rafael Espindola | ffdc24b | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 751 | } |