Jia Liu | 31d157a | 2012-02-18 12:03:15 +0000 | [diff] [blame] | 1 | //===-- ARM.td - Describe the ARM Target Machine -----------*- tablegen -*-===// |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
Rafael Espindola | 7bc59bc | 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 | 027fdbe | 2008-11-24 07:34:46 +0000 | [diff] [blame] | 17 | include "llvm/Target/Target.td" |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 18 | |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 19 | //===----------------------------------------------------------------------===// |
| 20 | // ARM Subtarget state. |
| 21 | // |
| 22 | |
Evan Cheng | 963b03c | 2011-07-07 19:05:12 +0000 | [diff] [blame] | 23 | def ModeThumb : SubtargetFeature<"thumb-mode", "InThumbMode", "true", |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 24 | "Thumb mode">; |
Jim Grosbach | 2317e40 | 2010-09-30 01:57:53 +0000 | [diff] [blame] | 25 | |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 26 | //===----------------------------------------------------------------------===// |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 27 | // ARM Subtarget features. |
| 28 | // |
| 29 | |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 30 | def FeatureVFP2 : SubtargetFeature<"vfp2", "HasVFPv2", "true", |
Anton Korobeynikov | d4022c3 | 2009-05-29 23:41:08 +0000 | [diff] [blame] | 31 | "Enable VFP2 instructions">; |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 32 | def FeatureVFP3 : SubtargetFeature<"vfp3", "HasVFPv3", "true", |
| 33 | "Enable VFP3 instructions", |
| 34 | [FeatureVFP2]>; |
| 35 | def FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true", |
| 36 | "Enable NEON instructions", |
| 37 | [FeatureVFP3]>; |
Evan Cheng | 94ca42f | 2011-07-07 00:08:19 +0000 | [diff] [blame] | 38 | def FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true", |
Anton Korobeynikov | d4022c3 | 2009-05-29 23:41:08 +0000 | [diff] [blame] | 39 | "Enable Thumb2 instructions">; |
Evan Cheng | 7b4d311 | 2010-08-11 07:17:46 +0000 | [diff] [blame] | 40 | def FeatureNoARM : SubtargetFeature<"noarm", "NoARM", "true", |
| 41 | "Does not support ARM mode execution">; |
Anton Korobeynikov | 631379e | 2010-03-14 18:42:38 +0000 | [diff] [blame] | 42 | def FeatureFP16 : SubtargetFeature<"fp16", "HasFP16", "true", |
| 43 | "Enable half-precision floating point">; |
Bob Wilson | eb1641d | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 44 | def FeatureVFP4 : SubtargetFeature<"vfp4", "HasVFPv4", "true", |
| 45 | "Enable VFP4 instructions", |
| 46 | [FeatureVFP3, FeatureFP16]>; |
Bob Wilson | 77f42b5 | 2010-10-12 16:22:47 +0000 | [diff] [blame] | 47 | def FeatureD16 : SubtargetFeature<"d16", "HasD16", "true", |
| 48 | "Restrict VFP3 to 16 double registers">; |
Jim Grosbach | 2940213 | 2010-05-05 23:44:43 +0000 | [diff] [blame] | 49 | def FeatureHWDiv : SubtargetFeature<"hwdiv", "HasHardwareDivide", "true", |
| 50 | "Enable divide instructions">; |
Bob Wilson | eb1641d | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 51 | def FeatureHWDivARM : SubtargetFeature<"hwdiv-arm", |
| 52 | "HasHardwareDivideInARM", "true", |
| 53 | "Enable divide instructions in ARM mode">; |
Evan Cheng | d6b4632 | 2010-08-11 06:51:54 +0000 | [diff] [blame] | 54 | def FeatureT2XtPk : SubtargetFeature<"t2xtpk", "HasT2ExtractPack", "true", |
Jim Grosbach | 2940213 | 2010-05-05 23:44:43 +0000 | [diff] [blame] | 55 | "Enable Thumb2 extract and pack instructions">; |
Evan Cheng | d6b4632 | 2010-08-11 06:51:54 +0000 | [diff] [blame] | 56 | def FeatureDB : SubtargetFeature<"db", "HasDataBarrier", "true", |
| 57 | "Has data barrier (dmb / dsb) instructions">; |
Evan Cheng | 7a41599 | 2010-07-13 19:21:50 +0000 | [diff] [blame] | 58 | def FeatureSlowFPBrcc : SubtargetFeature<"slow-fp-brcc", "SlowFPBrcc", "true", |
| 59 | "FP compare + branch is slow">; |
Jim Grosbach | fcba5e6 | 2010-08-11 15:44:15 +0000 | [diff] [blame] | 60 | def FeatureVFPOnlySP : SubtargetFeature<"fp-only-sp", "FPOnlySP", "true", |
| 61 | "Floating point unit supports single precision only">; |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 62 | |
Evan Cheng | 48575f6 | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 63 | // Some processors have FP multiply-accumulate instructions that don't |
| 64 | // play nicely with other VFP / NEON instructions, and it's generally better |
Jim Grosbach | 6b2e8dc | 2010-03-25 23:11:16 +0000 | [diff] [blame] | 65 | // to just not use them. |
Evan Cheng | 48575f6 | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 66 | def FeatureHasSlowFPVMLx : SubtargetFeature<"slowfpvmlx", "SlowFPVMLx", "true", |
| 67 | "Disable VFP / NEON MAC instructions">; |
Evan Cheng | 463d358 | 2011-03-31 19:38:48 +0000 | [diff] [blame] | 68 | |
| 69 | // Cortex-A8 / A9 Advanced SIMD has multiplier accumulator forwarding. |
| 70 | def FeatureVMLxForwarding : SubtargetFeature<"vmlx-forwarding", |
| 71 | "HasVMLxForwarding", "true", |
| 72 | "Has multiplier accumulator forwarding">; |
| 73 | |
Jim Grosbach | 7ec7a0e | 2010-03-25 23:47:34 +0000 | [diff] [blame] | 74 | // Some processors benefit from using NEON instructions for scalar |
| 75 | // single-precision FP operations. |
Jim Grosbach | c5ed013 | 2010-08-17 18:39:16 +0000 | [diff] [blame] | 76 | def FeatureNEONForFP : SubtargetFeature<"neonfp", "UseNEONForSinglePrecisionFP", |
| 77 | "true", |
| 78 | "Use NEON for single precision FP">; |
Jim Grosbach | 7ec7a0e | 2010-03-25 23:47:34 +0000 | [diff] [blame] | 79 | |
Evan Cheng | e44be63 | 2010-08-09 18:35:19 +0000 | [diff] [blame] | 80 | // Disable 32-bit to 16-bit narrowing for experimentation. |
| 81 | def FeaturePref32BitThumb : SubtargetFeature<"32bit", "Pref32BitThumb", "true", |
| 82 | "Prefer 32-bit Thumb instrs">; |
Jim Grosbach | 6b2e8dc | 2010-03-25 23:11:16 +0000 | [diff] [blame] | 83 | |
Bob Wilson | 5dde893 | 2011-04-19 18:11:49 +0000 | [diff] [blame] | 84 | /// Some instructions update CPSR partially, which can add false dependency for |
| 85 | /// out-of-order implementation, e.g. Cortex-A9, unless each individual bit is |
| 86 | /// mapped to a separate physical register. Avoid partial CPSR update for these |
| 87 | /// processors. |
| 88 | def FeatureAvoidPartialCPSR : SubtargetFeature<"avoid-partial-cpsr", |
| 89 | "AvoidCPSRPartialUpdate", "true", |
| 90 | "Avoid CPSR partial update for OOO execution">; |
| 91 | |
Evan Cheng | 139e407 | 2012-12-20 19:59:30 +0000 | [diff] [blame] | 92 | def FeatureAvoidMOVsShOp : SubtargetFeature<"avoid-movs-shop", |
| 93 | "AvoidMOVsShifterOperand", "true", |
| 94 | "Avoid movs instructions with shifter operand">; |
| 95 | |
Evan Cheng | 4bfcd4a | 2012-02-28 18:51:51 +0000 | [diff] [blame] | 96 | // Some processors perform return stack prediction. CodeGen should avoid issue |
| 97 | // "normal" call instructions to callees which do not return. |
| 98 | def FeatureHasRAS : SubtargetFeature<"ras", "HasRAS", "true", |
| 99 | "Has return address stack">; |
| 100 | |
Jim Grosbach | a760398 | 2011-07-01 21:12:19 +0000 | [diff] [blame] | 101 | /// Some M architectures don't have the DSP extension (v7E-M vs. v7M) |
| 102 | def FeatureDSPThumb2 : SubtargetFeature<"t2dsp", "Thumb2DSP", "true", |
Nick Lewycky | b210cbf | 2011-08-25 21:46:20 +0000 | [diff] [blame] | 103 | "Supports v7 DSP instructions in Thumb2">; |
Jim Grosbach | a760398 | 2011-07-01 21:12:19 +0000 | [diff] [blame] | 104 | |
Evan Cheng | dfed19f | 2010-11-03 06:34:55 +0000 | [diff] [blame] | 105 | // Multiprocessing extension. |
| 106 | def FeatureMP : SubtargetFeature<"mp", "HasMPExtension", "true", |
| 107 | "Supports Multiprocessing extension">; |
Evan Cheng | d6b4632 | 2010-08-11 06:51:54 +0000 | [diff] [blame] | 108 | |
James Molloy | acad68d | 2011-09-28 14:21:38 +0000 | [diff] [blame] | 109 | // M-series ISA? |
| 110 | def FeatureMClass : SubtargetFeature<"mclass", "IsMClass", "true", |
| 111 | "Is microcontroller profile ('M' series)">; |
| 112 | |
Eli Bendersky | 0f156af | 2013-01-30 16:30:19 +0000 | [diff] [blame] | 113 | // Special TRAP encoding for NaCl, which looks like a TRAP in Thumb too. |
| 114 | // See ARMInstrInfo.td for details. |
| 115 | def FeatureNaClTrap : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true", |
| 116 | "NaCl trap">; |
| 117 | |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 118 | // ARM ISAs. |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 119 | def HasV4TOps : SubtargetFeature<"v4t", "HasV4TOps", "true", |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 120 | "Support ARM v4T instructions">; |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 121 | def HasV5TOps : SubtargetFeature<"v5t", "HasV5TOps", "true", |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 122 | "Support ARM v5T instructions", |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 123 | [HasV4TOps]>; |
| 124 | def HasV5TEOps : SubtargetFeature<"v5te", "HasV5TEOps", "true", |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 125 | "Support ARM v5TE, v5TEj, and v5TExp instructions", |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 126 | [HasV5TOps]>; |
| 127 | def HasV6Ops : SubtargetFeature<"v6", "HasV6Ops", "true", |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 128 | "Support ARM v6 instructions", |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 129 | [HasV5TEOps]>; |
| 130 | def HasV6T2Ops : SubtargetFeature<"v6t2", "HasV6T2Ops", "true", |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 131 | "Support ARM v6t2 instructions", |
Evan Cheng | 0d18174 | 2011-09-20 21:38:18 +0000 | [diff] [blame] | 132 | [HasV6Ops, FeatureThumb2]>; |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 133 | def HasV7Ops : SubtargetFeature<"v7", "HasV7Ops", "true", |
Evan Cheng | db06873 | 2011-07-07 08:26:46 +0000 | [diff] [blame] | 134 | "Support ARM v7 instructions", |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 135 | [HasV6T2Ops]>; |
Evan Cheng | d6b4632 | 2010-08-11 06:51:54 +0000 | [diff] [blame] | 136 | |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 137 | //===----------------------------------------------------------------------===// |
| 138 | // ARM Processors supported. |
| 139 | // |
| 140 | |
Evan Cheng | 8557c2b | 2009-06-19 01:51:50 +0000 | [diff] [blame] | 141 | include "ARMSchedule.td" |
| 142 | |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 143 | // ARM processor families. |
Quentin Colombet | 8facb9e | 2012-11-29 19:48:01 +0000 | [diff] [blame] | 144 | def ProcA5 : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5", |
| 145 | "Cortex-A5 ARM processors", |
Renato Golin | 3382a84 | 2013-03-21 18:47:47 +0000 | [diff] [blame] | 146 | [FeatureSlowFPBrcc, FeatureHasSlowFPVMLx, |
| 147 | FeatureVMLxForwarding, FeatureT2XtPk]>; |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 148 | def ProcA8 : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8", |
| 149 | "Cortex-A8 ARM processors", |
Renato Golin | 3382a84 | 2013-03-21 18:47:47 +0000 | [diff] [blame] | 150 | [FeatureSlowFPBrcc, FeatureHasSlowFPVMLx, |
| 151 | FeatureVMLxForwarding, FeatureT2XtPk]>; |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 152 | def ProcA9 : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9", |
Evan Cheng | 167be80 | 2010-12-05 23:03:45 +0000 | [diff] [blame] | 153 | "Cortex-A9 ARM processors", |
Bob Wilson | 84c5eed | 2011-04-19 18:11:57 +0000 | [diff] [blame] | 154 | [FeatureVMLxForwarding, |
Bob Wilson | 5dde893 | 2011-04-19 18:11:49 +0000 | [diff] [blame] | 155 | FeatureT2XtPk, FeatureFP16, |
| 156 | FeatureAvoidPartialCPSR]>; |
Bob Wilson | eb1641d | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 157 | def ProcSwift : SubtargetFeature<"swift", "ARMProcFamily", "Swift", |
| 158 | "Swift ARM processors", |
| 159 | [FeatureNEONForFP, FeatureT2XtPk, |
| 160 | FeatureVFP4, FeatureMP, FeatureHWDiv, |
| 161 | FeatureHWDivARM, FeatureAvoidPartialCPSR, |
Evan Cheng | 139e407 | 2012-12-20 19:59:30 +0000 | [diff] [blame] | 162 | FeatureAvoidMOVsShOp, |
Bob Wilson | eb1641d | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 163 | FeatureHasSlowFPVMLx]>; |
| 164 | |
Silviu Baranga | 616471d | 2012-09-13 15:05:10 +0000 | [diff] [blame] | 165 | // FIXME: It has not been determined if A15 has these features. |
| 166 | def ProcA15 : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15", |
| 167 | "Cortex-A15 ARM processors", |
Silviu Baranga | c8bf0f8 | 2012-09-17 14:10:54 +0000 | [diff] [blame] | 168 | [FeatureT2XtPk, FeatureFP16, |
Silviu Baranga | 616471d | 2012-09-13 15:05:10 +0000 | [diff] [blame] | 169 | FeatureAvoidPartialCPSR]>; |
Quentin Colombet | e0f1d71 | 2012-12-21 04:35:05 +0000 | [diff] [blame] | 170 | def ProcR5 : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5", |
| 171 | "Cortex-R5 ARM processors", |
| 172 | [FeatureSlowFPBrcc, FeatureHWDivARM, |
| 173 | FeatureHasSlowFPVMLx, |
| 174 | FeatureAvoidPartialCPSR, |
| 175 | FeatureT2XtPk]>; |
Evan Cheng | 3ef1c87 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 176 | |
Evan Cheng | 8557c2b | 2009-06-19 01:51:50 +0000 | [diff] [blame] | 177 | class ProcNoItin<string Name, list<SubtargetFeature> Features> |
Andrew Trick | d85934b | 2012-06-22 03:58:51 +0000 | [diff] [blame] | 178 | : Processor<Name, NoItineraries, Features>; |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 179 | |
| 180 | // V4 Processors. |
Evan Cheng | 8557c2b | 2009-06-19 01:51:50 +0000 | [diff] [blame] | 181 | def : ProcNoItin<"generic", []>; |
| 182 | def : ProcNoItin<"arm8", []>; |
| 183 | def : ProcNoItin<"arm810", []>; |
| 184 | def : ProcNoItin<"strongarm", []>; |
| 185 | def : ProcNoItin<"strongarm110", []>; |
| 186 | def : ProcNoItin<"strongarm1100", []>; |
| 187 | def : ProcNoItin<"strongarm1110", []>; |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 188 | |
| 189 | // V4T Processors. |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 190 | def : ProcNoItin<"arm7tdmi", [HasV4TOps]>; |
| 191 | def : ProcNoItin<"arm7tdmi-s", [HasV4TOps]>; |
| 192 | def : ProcNoItin<"arm710t", [HasV4TOps]>; |
| 193 | def : ProcNoItin<"arm720t", [HasV4TOps]>; |
| 194 | def : ProcNoItin<"arm9", [HasV4TOps]>; |
| 195 | def : ProcNoItin<"arm9tdmi", [HasV4TOps]>; |
| 196 | def : ProcNoItin<"arm920", [HasV4TOps]>; |
| 197 | def : ProcNoItin<"arm920t", [HasV4TOps]>; |
| 198 | def : ProcNoItin<"arm922t", [HasV4TOps]>; |
| 199 | def : ProcNoItin<"arm940t", [HasV4TOps]>; |
| 200 | def : ProcNoItin<"ep9312", [HasV4TOps]>; |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 201 | |
| 202 | // V5T Processors. |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 203 | def : ProcNoItin<"arm10tdmi", [HasV5TOps]>; |
| 204 | def : ProcNoItin<"arm1020t", [HasV5TOps]>; |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 205 | |
| 206 | // V5TE Processors. |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 207 | def : ProcNoItin<"arm9e", [HasV5TEOps]>; |
| 208 | def : ProcNoItin<"arm926ej-s", [HasV5TEOps]>; |
| 209 | def : ProcNoItin<"arm946e-s", [HasV5TEOps]>; |
| 210 | def : ProcNoItin<"arm966e-s", [HasV5TEOps]>; |
| 211 | def : ProcNoItin<"arm968e-s", [HasV5TEOps]>; |
| 212 | def : ProcNoItin<"arm10e", [HasV5TEOps]>; |
| 213 | def : ProcNoItin<"arm1020e", [HasV5TEOps]>; |
| 214 | def : ProcNoItin<"arm1022e", [HasV5TEOps]>; |
| 215 | def : ProcNoItin<"xscale", [HasV5TEOps]>; |
| 216 | def : ProcNoItin<"iwmmxt", [HasV5TEOps]>; |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 217 | |
| 218 | // V6 Processors. |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 219 | def : Processor<"arm1136j-s", ARMV6Itineraries, [HasV6Ops]>; |
| 220 | def : Processor<"arm1136jf-s", ARMV6Itineraries, [HasV6Ops, FeatureVFP2, |
Evan Cheng | 48575f6 | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 221 | FeatureHasSlowFPVMLx]>; |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 222 | def : Processor<"arm1176jz-s", ARMV6Itineraries, [HasV6Ops]>; |
| 223 | def : Processor<"arm1176jzf-s", ARMV6Itineraries, [HasV6Ops, FeatureVFP2, |
Evan Cheng | 48575f6 | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 224 | FeatureHasSlowFPVMLx]>; |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 225 | def : Processor<"mpcorenovfp", ARMV6Itineraries, [HasV6Ops]>; |
| 226 | def : Processor<"mpcore", ARMV6Itineraries, [HasV6Ops, FeatureVFP2, |
Evan Cheng | 48575f6 | 2010-12-05 22:04:16 +0000 | [diff] [blame] | 227 | FeatureHasSlowFPVMLx]>; |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 228 | |
Evan Cheng | c7569ed | 2010-08-11 06:30:38 +0000 | [diff] [blame] | 229 | // V6M Processors. |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 230 | def : Processor<"cortex-m0", ARMV6Itineraries, [HasV6Ops, FeatureNoARM, |
James Molloy | acad68d | 2011-09-28 14:21:38 +0000 | [diff] [blame] | 231 | FeatureDB, FeatureMClass]>; |
Evan Cheng | c7569ed | 2010-08-11 06:30:38 +0000 | [diff] [blame] | 232 | |
Anton Korobeynikov | fbbf1ee | 2009-06-08 21:20:36 +0000 | [diff] [blame] | 233 | // V6T2 Processors. |
Evan Cheng | 0d18174 | 2011-09-20 21:38:18 +0000 | [diff] [blame] | 234 | def : Processor<"arm1156t2-s", ARMV6Itineraries, [HasV6T2Ops, |
| 235 | FeatureDSPThumb2]>; |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 236 | def : Processor<"arm1156t2f-s", ARMV6Itineraries, [HasV6T2Ops, FeatureVFP2, |
Evan Cheng | 0d18174 | 2011-09-20 21:38:18 +0000 | [diff] [blame] | 237 | FeatureHasSlowFPVMLx, |
| 238 | FeatureDSPThumb2]>; |
Anton Korobeynikov | d4022c3 | 2009-05-29 23:41:08 +0000 | [diff] [blame] | 239 | |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 240 | // V7a Processors. |
Quentin Colombet | 8facb9e | 2012-11-29 19:48:01 +0000 | [diff] [blame] | 241 | // FIXME: A5 has currently the same Schedule model as A8 |
| 242 | def : ProcessorModel<"cortex-a5", CortexA8Model, |
| 243 | [ProcA5, HasV7Ops, FeatureNEON, FeatureDB, |
| 244 | FeatureVFP4, FeatureDSPThumb2, |
| 245 | FeatureHasRAS]>; |
Andrew Trick | 2661b41 | 2012-07-07 04:00:00 +0000 | [diff] [blame] | 246 | def : ProcessorModel<"cortex-a8", CortexA8Model, |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 247 | [ProcA8, HasV7Ops, FeatureNEON, FeatureDB, |
Evan Cheng | 4bfcd4a | 2012-02-28 18:51:51 +0000 | [diff] [blame] | 248 | FeatureDSPThumb2, FeatureHasRAS]>; |
Andrew Trick | 2661b41 | 2012-07-07 04:00:00 +0000 | [diff] [blame] | 249 | def : ProcessorModel<"cortex-a9", CortexA9Model, |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 250 | [ProcA9, HasV7Ops, FeatureNEON, FeatureDB, |
Evan Cheng | 4bfcd4a | 2012-02-28 18:51:51 +0000 | [diff] [blame] | 251 | FeatureDSPThumb2, FeatureHasRAS]>; |
Andrew Trick | 2661b41 | 2012-07-07 04:00:00 +0000 | [diff] [blame] | 252 | def : ProcessorModel<"cortex-a9-mp", CortexA9Model, |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 253 | [ProcA9, HasV7Ops, FeatureNEON, FeatureDB, |
Evan Cheng | 4bfcd4a | 2012-02-28 18:51:51 +0000 | [diff] [blame] | 254 | FeatureDSPThumb2, FeatureMP, |
| 255 | FeatureHasRAS]>; |
Silviu Baranga | 616471d | 2012-09-13 15:05:10 +0000 | [diff] [blame] | 256 | // FIXME: A15 has currently the same ProcessorModel as A9. |
| 257 | def : ProcessorModel<"cortex-a15", CortexA9Model, |
| 258 | [ProcA15, HasV7Ops, FeatureNEON, FeatureDB, |
| 259 | FeatureDSPThumb2, FeatureHasRAS]>; |
Quentin Colombet | e0f1d71 | 2012-12-21 04:35:05 +0000 | [diff] [blame] | 260 | // FIXME: R5 has currently the same ProcessorModel as A8. |
| 261 | def : ProcessorModel<"cortex-r5", CortexA8Model, |
| 262 | [ProcR5, HasV7Ops, FeatureDB, |
| 263 | FeatureVFP3, FeatureDSPThumb2, |
| 264 | FeatureHasRAS]>; |
Evan Cheng | c7569ed | 2010-08-11 06:30:38 +0000 | [diff] [blame] | 265 | |
| 266 | // V7M Processors. |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 267 | def : ProcNoItin<"cortex-m3", [HasV7Ops, |
| 268 | FeatureThumb2, FeatureNoARM, FeatureDB, |
James Molloy | acad68d | 2011-09-28 14:21:38 +0000 | [diff] [blame] | 269 | FeatureHWDiv, FeatureMClass]>; |
Evan Cheng | 39dfb0f | 2011-07-07 03:55:05 +0000 | [diff] [blame] | 270 | |
| 271 | // V7EM Processors. |
| 272 | def : ProcNoItin<"cortex-m4", [HasV7Ops, |
| 273 | FeatureThumb2, FeatureNoARM, FeatureDB, |
| 274 | FeatureHWDiv, FeatureDSPThumb2, |
Jiangning Liu | 1c37814 | 2012-08-02 08:35:55 +0000 | [diff] [blame] | 275 | FeatureT2XtPk, FeatureVFP4, |
James Molloy | acad68d | 2011-09-28 14:21:38 +0000 | [diff] [blame] | 276 | FeatureVFPOnlySP, FeatureMClass]>; |
Anton Korobeynikov | 6d7d2aa | 2009-05-23 19:51:43 +0000 | [diff] [blame] | 277 | |
Bob Wilson | eb1641d | 2012-09-29 21:43:49 +0000 | [diff] [blame] | 278 | // Swift uArch Processors. |
| 279 | def : ProcessorModel<"swift", SwiftModel, |
| 280 | [ProcSwift, HasV7Ops, FeatureNEON, |
| 281 | FeatureDB, FeatureDSPThumb2, |
| 282 | FeatureHasRAS]>; |
| 283 | |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 284 | //===----------------------------------------------------------------------===// |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 285 | // Register File Description |
| 286 | //===----------------------------------------------------------------------===// |
| 287 | |
| 288 | include "ARMRegisterInfo.td" |
| 289 | |
Bob Wilson | 1f595bb | 2009-04-17 19:07:39 +0000 | [diff] [blame] | 290 | include "ARMCallingConv.td" |
| 291 | |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 292 | //===----------------------------------------------------------------------===// |
| 293 | // Instruction Descriptions |
| 294 | //===----------------------------------------------------------------------===// |
| 295 | |
| 296 | include "ARMInstrInfo.td" |
| 297 | |
Jakob Stoklund Olesen | fddb766 | 2010-04-05 03:10:20 +0000 | [diff] [blame] | 298 | def ARMInstrInfo : InstrInfo; |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 299 | |
Jim Grosbach | 2317e40 | 2010-09-30 01:57:53 +0000 | [diff] [blame] | 300 | |
| 301 | //===----------------------------------------------------------------------===// |
| 302 | // Assembly printer |
| 303 | //===----------------------------------------------------------------------===// |
| 304 | // ARM Uses the MC printer for asm output, so make sure the TableGen |
| 305 | // AsmWriter bits get associated with the correct class. |
| 306 | def ARMAsmWriter : AsmWriter { |
| 307 | string AsmWriterClassName = "InstPrinter"; |
| 308 | bit isMCAsmWriter = 1; |
| 309 | } |
| 310 | |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 311 | //===----------------------------------------------------------------------===// |
| 312 | // Declare the target which we are implementing |
| 313 | //===----------------------------------------------------------------------===// |
| 314 | |
| 315 | def ARM : Target { |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 316 | // Pull in Instruction Info: |
| 317 | let InstructionSet = ARMInstrInfo; |
Jim Grosbach | 2317e40 | 2010-09-30 01:57:53 +0000 | [diff] [blame] | 318 | |
| 319 | let AssemblyWriters = [ARMAsmWriter]; |
Rafael Espindola | 7bc59bc | 2006-05-14 22:18:28 +0000 | [diff] [blame] | 320 | } |