| 1 |
//===-- ARM.td - Describe the ARM Target Machine -----------*- tablegen -*-===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
// |
| 9 |
// |
| 10 |
//===----------------------------------------------------------------------===// |
| 11 |
|
| 12 |
//===----------------------------------------------------------------------===// |
| 13 |
// Target-independent interfaces which we are implementing |
| 14 |
//===----------------------------------------------------------------------===// |
| 15 |
|
| 16 |
include "llvm/Target/Target.td" |
| 17 |
|
| 18 |
//===----------------------------------------------------------------------===// |
| 19 |
// ARM Subtarget state. |
| 20 |
// |
| 21 |
|
| 22 |
def ModeThumb : SubtargetFeature<"thumb-mode", "InThumbMode", |
| 23 |
"true", "Thumb mode">; |
| 24 |
|
| 25 |
def ModeSoftFloat : SubtargetFeature<"soft-float","UseSoftFloat", |
| 26 |
"true", "Use software floating " |
| 27 |
"point features.">; |
| 28 |
|
| 29 |
|
| 30 |
//===----------------------------------------------------------------------===// |
| 31 |
// ARM Subtarget features. |
| 32 |
// |
| 33 |
|
| 34 |
// Floating Point, HW Division and Neon Support |
| 35 |
|
| 36 |
// FP loads/stores/moves, shared between VFP and MVE (even in the integer-only |
| 37 |
// version). |
| 38 |
def FeatureFPRegs : SubtargetFeature<"fpregs", "HasFPRegs", "true", |
| 39 |
"Enable FP registers">; |
| 40 |
|
| 41 |
// 16-bit FP loads/stores/moves, shared between VFP (with the v8.2A FP16 |
| 42 |
// extension) and MVE (even in the integer-only version). |
| 43 |
def FeatureFPRegs16 : SubtargetFeature<"fpregs16", "HasFPRegs16", "true", |
| 44 |
"Enable 16-bit FP registers", |
| 45 |
[FeatureFPRegs]>; |
| 46 |
|
| 47 |
def FeatureFPRegs64 : SubtargetFeature<"fpregs64", "HasFPRegs64", "true", |
| 48 |
"Enable 64-bit FP registers", |
| 49 |
[FeatureFPRegs]>; |
| 50 |
|
| 51 |
def FeatureFP64 : SubtargetFeature<"fp64", "HasFP64", "true", |
| 52 |
"Floating point unit supports " |
| 53 |
"double precision", |
| 54 |
[FeatureFPRegs64]>; |
| 55 |
|
| 56 |
def FeatureD32 : SubtargetFeature<"d32", "HasD32", "true", |
| 57 |
"Extend FP to 32 double registers">; |
| 58 |
|
| 59 |
multiclass VFPver<string name, string query, string description, |
| 60 |
list<SubtargetFeature> prev, |
| 61 |
list<SubtargetFeature> otherimplies, |
| 62 |
list<SubtargetFeature> vfp2prev = []> { |
| 63 |
def _D16_SP: SubtargetFeature< |
| 64 |
name#"d16sp", query#"D16SP", "true", |
| 65 |
description#" with only 16 d-registers and no double precision", |
| 66 |
!foreach(v, prev, !cast<SubtargetFeature>(v # "_D16_SP")) # |
| 67 |
!foreach(v, vfp2prev, !cast<SubtargetFeature>(v # "_SP")) # |
| 68 |
otherimplies>; |
| 69 |
def _SP: SubtargetFeature< |
| 70 |
name#"sp", query#"SP", "true", |
| 71 |
description#" with no double precision", |
| 72 |
!foreach(v, prev, !cast<SubtargetFeature>(v # "_SP")) # |
| 73 |
otherimplies # [FeatureD32, !cast<SubtargetFeature>(NAME # "_D16_SP")]>; |
| 74 |
def _D16: SubtargetFeature< |
| 75 |
name#"d16", query#"D16", "true", |
| 76 |
description#" with only 16 d-registers", |
| 77 |
!foreach(v, prev, !cast<SubtargetFeature>(v # "_D16")) # |
| 78 |
vfp2prev # |
| 79 |
otherimplies # [FeatureFP64, !cast<SubtargetFeature>(NAME # "_D16_SP")]>; |
| 80 |
def "": SubtargetFeature< |
| 81 |
name, query, "true", description, |
| 82 |
prev # otherimplies # [ |
| 83 |
!cast<SubtargetFeature>(NAME # "_D16"), |
| 84 |
!cast<SubtargetFeature>(NAME # "_SP")]>; |
| 85 |
} |
| 86 |
|
| 87 |
def FeatureVFP2_SP : SubtargetFeature<"vfp2sp", "HasVFPv2SP", "true", |
| 88 |
"Enable VFP2 instructions with " |
| 89 |
"no double precision", |
| 90 |
[FeatureFPRegs]>; |
| 91 |
|
| 92 |
def FeatureVFP2 : SubtargetFeature<"vfp2", "HasVFPv2", "true", |
| 93 |
"Enable VFP2 instructions", |
| 94 |
[FeatureFP64, FeatureVFP2_SP]>; |
| 95 |
|
| 96 |
defm FeatureVFP3: VFPver<"vfp3", "HasVFPv3", "Enable VFP3 instructions", |
| 97 |
[], [], [FeatureVFP2]>; |
| 98 |
|
| 99 |
def FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true", |
| 100 |
"Enable NEON instructions", |
| 101 |
[FeatureVFP3]>; |
| 102 |
|
| 103 |
def FeatureFP16 : SubtargetFeature<"fp16", "HasFP16", "true", |
| 104 |
"Enable half-precision " |
| 105 |
"floating point">; |
| 106 |
|
| 107 |
defm FeatureVFP4: VFPver<"vfp4", "HasVFPv4", "Enable VFP4 instructions", |
| 108 |
[FeatureVFP3], [FeatureFP16]>; |
| 109 |
|
| 110 |
defm FeatureFPARMv8: VFPver<"fp-armv8", "HasFPARMv8", "Enable ARMv8 FP", |
| 111 |
[FeatureVFP4], []>; |
| 112 |
|
| 113 |
def FeatureFullFP16 : SubtargetFeature<"fullfp16", "HasFullFP16", "true", |
| 114 |
"Enable full half-precision " |
| 115 |
"floating point", |
| 116 |
[FeatureFPARMv8_D16_SP, FeatureFPRegs16]>; |
| 117 |
|
| 118 |
def FeatureFP16FML : SubtargetFeature<"fp16fml", "HasFP16FML", "true", |
| 119 |
"Enable full half-precision " |
| 120 |
"floating point fml instructions", |
| 121 |
[FeatureFullFP16]>; |
| 122 |
|
| 123 |
def FeatureHWDivThumb : SubtargetFeature<"hwdiv", |
| 124 |
"HasHardwareDivideInThumb", "true", |
| 125 |
"Enable divide instructions in Thumb">; |
| 126 |
|
| 127 |
def FeatureHWDivARM : SubtargetFeature<"hwdiv-arm", |
| 128 |
"HasHardwareDivideInARM", "true", |
| 129 |
"Enable divide instructions in ARM mode">; |
| 130 |
|
| 131 |
// Atomic Support |
| 132 |
def FeatureDB : SubtargetFeature<"db", "HasDataBarrier", "true", |
| 133 |
"Has data barrier (dmb/dsb) instructions">; |
| 134 |
|
| 135 |
def FeatureV7Clrex : SubtargetFeature<"v7clrex", "HasV7Clrex", "true", |
| 136 |
"Has v7 clrex instruction">; |
| 137 |
|
| 138 |
def FeatureDFB : SubtargetFeature<"dfb", "HasFullDataBarrier", "true", |
| 139 |
"Has full data barrier (dfb) instruction">; |
| 140 |
|
| 141 |
def FeatureAcquireRelease : SubtargetFeature<"acquire-release", |
| 142 |
"HasAcquireRelease", "true", |
| 143 |
"Has v8 acquire/release (lda/ldaex " |
| 144 |
" etc) instructions">; |
| 145 |
|
| 146 |
|
| 147 |
def FeatureSlowFPBrcc : SubtargetFeature<"slow-fp-brcc", "SlowFPBrcc", "true", |
| 148 |
"FP compare + branch is slow">; |
| 149 |
|
| 150 |
def FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true", |
| 151 |
"Enable support for Performance " |
| 152 |
"Monitor extensions">; |
| 153 |
|
| 154 |
|
| 155 |
// TrustZone Security Extensions |
| 156 |
def FeatureTrustZone : SubtargetFeature<"trustzone", "HasTrustZone", "true", |
| 157 |
"Enable support for TrustZone " |
| 158 |
"security extensions">; |
| 159 |
|
| 160 |
def Feature8MSecExt : SubtargetFeature<"8msecext", "Has8MSecExt", "true", |
| 161 |
"Enable support for ARMv8-M " |
| 162 |
"Security Extensions">; |
| 163 |
|
| 164 |
def FeatureSHA2 : SubtargetFeature<"sha2", "HasSHA2", "true", |
| 165 |
"Enable SHA1 and SHA256 support", [FeatureNEON]>; |
| 166 |
|
| 167 |
def FeatureAES : SubtargetFeature<"aes", "HasAES", "true", |
| 168 |
"Enable AES support", [FeatureNEON]>; |
| 169 |
|
| 170 |
def FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true", |
| 171 |
"Enable support for " |
| 172 |
"Cryptography extensions", |
| 173 |
[FeatureNEON, FeatureSHA2, FeatureAES]>; |
| 174 |
|
| 175 |
def FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true", |
| 176 |
"Enable support for CRC instructions">; |
| 177 |
|
| 178 |
def FeatureDotProd : SubtargetFeature<"dotprod", "HasDotProd", "true", |
| 179 |
"Enable support for dot product instructions", |
| 180 |
[FeatureNEON]>; |
| 181 |
|
| 182 |
// Not to be confused with FeatureHasRetAddrStack (return address stack) |
| 183 |
def FeatureRAS : SubtargetFeature<"ras", "HasRAS", "true", |
| 184 |
"Enable Reliability, Availability " |
| 185 |
"and Serviceability extensions">; |
| 186 |
|
| 187 |
// Fast computation of non-negative address offsets |
| 188 |
def FeatureFPAO : SubtargetFeature<"fpao", "HasFPAO", "true", |
| 189 |
"Enable fast computation of " |
| 190 |
"positive address offsets">; |
| 191 |
|
| 192 |
// Fast execution of AES crypto operations |
| 193 |
def FeatureFuseAES : SubtargetFeature<"fuse-aes", "HasFuseAES", "true", |
| 194 |
"CPU fuses AES crypto operations">; |
| 195 |
|
| 196 |
// Fast execution of bottom and top halves of literal generation |
| 197 |
def FeatureFuseLiterals : SubtargetFeature<"fuse-literals", "HasFuseLiterals", "true", |
| 198 |
"CPU fuses literal generation operations">; |
| 199 |
|
| 200 |
// The way of reading thread pointer |
| 201 |
def FeatureReadTp : SubtargetFeature<"read-tp-hard", "ReadTPHard", "true", |
| 202 |
"Reading thread pointer from register">; |
| 203 |
|
| 204 |
// Cyclone can zero VFP registers in 0 cycles. |
| 205 |
def FeatureZCZeroing : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true", |
| 206 |
"Has zero-cycle zeroing instructions">; |
| 207 |
|
| 208 |
// Whether it is profitable to unpredicate certain instructions during if-conversion |
| 209 |
def FeatureProfUnpredicate : SubtargetFeature<"prof-unpr", |
| 210 |
"IsProfitableToUnpredicate", "true", |
| 211 |
"Is profitable to unpredicate">; |
| 212 |
|
| 213 |
// Some targets (e.g. Swift) have microcoded VGETLNi32. |
| 214 |
def FeatureSlowVGETLNi32 : SubtargetFeature<"slow-vgetlni32", |
| 215 |
"HasSlowVGETLNi32", "true", |
| 216 |
"Has slow VGETLNi32 - prefer VMOV">; |
| 217 |
|
| 218 |
// Some targets (e.g. Swift) have microcoded VDUP32. |
| 219 |
def FeatureSlowVDUP32 : SubtargetFeature<"slow-vdup32", "HasSlowVDUP32", |
| 220 |
"true", |
| 221 |
"Has slow VDUP32 - prefer VMOV">; |
| 222 |
|
| 223 |
// Some targets (e.g. Cortex-A9) prefer VMOVSR to VMOVDRR even when using NEON |
| 224 |
// for scalar FP, as this allows more effective execution domain optimization. |
| 225 |
def FeaturePreferVMOVSR : SubtargetFeature<"prefer-vmovsr", "PreferVMOVSR", |
| 226 |
"true", "Prefer VMOVSR">; |
| 227 |
|
| 228 |
// Swift has ISHST barriers compatible with Atomic Release semantics but weaker |
| 229 |
// than ISH |
| 230 |
def FeaturePrefISHSTBarrier : SubtargetFeature<"prefer-ishst", "PreferISHST", |
| 231 |
"true", "Prefer ISHST barriers">; |
| 232 |
|
| 233 |
// Some targets (e.g. Cortex-A9) have muxed AGU and NEON/FPU. |
| 234 |
def FeatureMuxedUnits : SubtargetFeature<"muxed-units", "HasMuxedUnits", |
| 235 |
"true", |
| 236 |
"Has muxed AGU and NEON/FPU">; |
| 237 |
|
| 238 |
// Whether VLDM/VSTM starting with odd register number need more microops |
| 239 |
// than single VLDRS |
| 240 |
def FeatureSlowOddRegister : SubtargetFeature<"slow-odd-reg", "SlowOddRegister", |
| 241 |
"true", "VLDM/VSTM starting " |
| 242 |
"with an odd register is slow">; |
| 243 |
|
| 244 |
// Some targets have a renaming dependency when loading into D subregisters. |
| 245 |
def FeatureSlowLoadDSubreg : SubtargetFeature<"slow-load-D-subreg", |
| 246 |
"SlowLoadDSubregister", "true", |
| 247 |
"Loading into D subregs is slow">; |
| 248 |
|
| 249 |
def FeatureUseWideStrideVFP : SubtargetFeature<"wide-stride-vfp", |
| 250 |
"UseWideStrideVFP", "true", |
| 251 |
"Use a wide stride when allocating VFP registers">; |
| 252 |
|
| 253 |
// Some targets (e.g. Cortex-A15) never want VMOVS to be widened to VMOVD. |
| 254 |
def FeatureDontWidenVMOVS : SubtargetFeature<"dont-widen-vmovs", |
| 255 |
"DontWidenVMOVS", "true", |
| 256 |
"Don't widen VMOVS to VMOVD">; |
| 257 |
|
| 258 |
// Some targets (e.g. Cortex-A15) prefer to avoid mixing operations on different |
| 259 |
// VFP register widths. |
| 260 |
def FeatureSplatVFPToNeon : SubtargetFeature<"splat-vfp-neon", |
| 261 |
"SplatVFPToNeon", "true", |
| 262 |
"Splat register from VFP to NEON", |
| 263 |
[FeatureDontWidenVMOVS]>; |
| 264 |
|
| 265 |
// Whether or not it is profitable to expand VFP/NEON MLA/MLS instructions. |
| 266 |
def FeatureExpandMLx : SubtargetFeature<"expand-fp-mlx", |
| 267 |
"ExpandMLx", "true", |
| 268 |
"Expand VFP/NEON MLA/MLS instructions">; |
| 269 |
|
| 270 |
// Some targets have special RAW hazards for VFP/NEON VMLA/VMLS. |
| 271 |
def FeatureHasVMLxHazards : SubtargetFeature<"vmlx-hazards", "HasVMLxHazards", |
| 272 |
"true", "Has VMLx hazards">; |
| 273 |
|
| 274 |
// Some targets (e.g. Cortex-A9) want to convert VMOVRS, VMOVSR and VMOVS from |
| 275 |
// VFP to NEON, as an execution domain optimization. |
| 276 |
def FeatureNEONForFPMovs : SubtargetFeature<"neon-fpmovs", |
| 277 |
"UseNEONForFPMovs", "true", |
| 278 |
"Convert VMOVSR, VMOVRS, " |
| 279 |
"VMOVS to NEON">; |
| 280 |
|
| 281 |
// Some processors benefit from using NEON instructions for scalar |
| 282 |
// single-precision FP operations. This affects instruction selection and should |
| 283 |
// only be enabled if the handling of denormals is not important. |
| 284 |
def FeatureNEONForFP : SubtargetFeature<"neonfp", |
| 285 |
"UseNEONForSinglePrecisionFP", |
| 286 |
"true", |
| 287 |
"Use NEON for single precision FP">; |
| 288 |
|
| 289 |
// On some processors, VLDn instructions that access unaligned data take one |
| 290 |
// extra cycle. Take that into account when computing operand latencies. |
| 291 |
def FeatureCheckVLDnAlign : SubtargetFeature<"vldn-align", "CheckVLDnAlign", |
| 292 |
"true", |
| 293 |
"Check for VLDn unaligned access">; |
| 294 |
|
| 295 |
// Some processors have a nonpipelined VFP coprocessor. |
| 296 |
def FeatureNonpipelinedVFP : SubtargetFeature<"nonpipelined-vfp", |
| 297 |
"NonpipelinedVFP", "true", |
| 298 |
"VFP instructions are not pipelined">; |
| 299 |
|
| 300 |
// Some processors have FP multiply-accumulate instructions that don't |
| 301 |
// play nicely with other VFP / NEON instructions, and it's generally better |
| 302 |
// to just not use them. |
| 303 |
def FeatureHasSlowFPVMLx : SubtargetFeature<"slowfpvmlx", "SlowFPVMLx", "true", |
| 304 |
"Disable VFP / NEON MAC instructions">; |
| 305 |
|
| 306 |
// VFPv4 added VFMA instructions that can similar be fast or slow. |
| 307 |
def FeatureHasSlowFPVFMx : SubtargetFeature<"slowfpvfmx", "SlowFPVFMx", "true", |
| 308 |
"Disable VFP / NEON FMA instructions">; |
| 309 |
|
| 310 |
// Cortex-A8 / A9 Advanced SIMD has multiplier accumulator forwarding. |
| 311 |
def FeatureVMLxForwarding : SubtargetFeature<"vmlx-forwarding", |
| 312 |
"HasVMLxForwarding", "true", |
| 313 |
"Has multiplier accumulator forwarding">; |
| 314 |
|
| 315 |
// Disable 32-bit to 16-bit narrowing for experimentation. |
| 316 |
def FeaturePref32BitThumb : SubtargetFeature<"32bit", "Pref32BitThumb", "true", |
| 317 |
"Prefer 32-bit Thumb instrs">; |
| 318 |
|
| 319 |
def FeaturePrefLoopAlign32 : SubtargetFeature<"loop-align", "PrefLoopLogAlignment","2", |
| 320 |
"Prefer 32-bit alignment for loops">; |
| 321 |
|
| 322 |
def FeatureMVEVectorCostFactor1 : SubtargetFeature<"mve1beat", "MVEVectorCostFactor", "1", |
| 323 |
"Model MVE instructions as a 1 beat per tick architecture">; |
| 324 |
|
| 325 |
def FeatureMVEVectorCostFactor2 : SubtargetFeature<"mve2beat", "MVEVectorCostFactor", "2", |
| 326 |
"Model MVE instructions as a 2 beats per tick architecture">; |
| 327 |
|
| 328 |
def FeatureMVEVectorCostFactor4 : SubtargetFeature<"mve4beat", "MVEVectorCostFactor", "4", |
| 329 |
"Model MVE instructions as a 4 beats per tick architecture">; |
| 330 |
|
| 331 |
/// Some instructions update CPSR partially, which can add false dependency for |
| 332 |
/// out-of-order implementation, e.g. Cortex-A9, unless each individual bit is |
| 333 |
/// mapped to a separate physical register. Avoid partial CPSR update for these |
| 334 |
/// processors. |
| 335 |
def FeatureAvoidPartialCPSR : SubtargetFeature<"avoid-partial-cpsr", |
| 336 |
"AvoidCPSRPartialUpdate", "true", |
| 337 |
"Avoid CPSR partial update for OOO execution">; |
| 338 |
|
| 339 |
/// Disable +1 predication cost for instructions updating CPSR. |
| 340 |
/// Enabled for Cortex-A57. |
| 341 |
def FeatureCheapPredicableCPSR : SubtargetFeature<"cheap-predicable-cpsr", |
| 342 |
"CheapPredicableCPSRDef", |
| 343 |
"true", |
| 344 |
"Disable +1 predication cost for instructions updating CPSR">; |
| 345 |
|
| 346 |
def FeatureAvoidMOVsShOp : SubtargetFeature<"avoid-movs-shop", |
| 347 |
"AvoidMOVsShifterOperand", "true", |
| 348 |
"Avoid movs instructions with " |
| 349 |
"shifter operand">; |
| 350 |
|
| 351 |
// Some processors perform return stack prediction. CodeGen should avoid issue |
| 352 |
// "normal" call instructions to callees which do not return. |
| 353 |
def FeatureHasRetAddrStack : SubtargetFeature<"ret-addr-stack", |
| 354 |
"HasRetAddrStack", "true", |
| 355 |
"Has return address stack">; |
| 356 |
|
| 357 |
// Some processors have no branch predictor, which changes the expected cost of |
| 358 |
// taking a branch which affects the choice of whether to use predicated |
| 359 |
// instructions. |
| 360 |
def FeatureHasNoBranchPredictor : SubtargetFeature<"no-branch-predictor", |
| 361 |
"HasBranchPredictor", "false", |
| 362 |
"Has no branch predictor">; |
| 363 |
|
| 364 |
/// DSP extension. |
| 365 |
def FeatureDSP : SubtargetFeature<"dsp", "HasDSP", "true", |
| 366 |
"Supports DSP instructions in " |
| 367 |
"ARM and/or Thumb2">; |
| 368 |
|
| 369 |
// Multiprocessing extension. |
| 370 |
def FeatureMP : SubtargetFeature<"mp", "HasMPExtension", "true", |
| 371 |
"Supports Multiprocessing extension">; |
| 372 |
|
| 373 |
// Virtualization extension - requires HW divide (ARMv7-AR ARMARM - 4.4.8). |
| 374 |
def FeatureVirtualization : SubtargetFeature<"virtualization", |
| 375 |
"HasVirtualization", "true", |
| 376 |
"Supports Virtualization extension", |
| 377 |
[FeatureHWDivThumb, FeatureHWDivARM]>; |
| 378 |
|
| 379 |
// Special TRAP encoding for NaCl, which looks like a TRAP in Thumb too. |
| 380 |
// See ARMInstrInfo.td for details. |
| 381 |
def FeatureNaClTrap : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true", |
| 382 |
"NaCl trap">; |
| 383 |
|
| 384 |
def FeatureStrictAlign : SubtargetFeature<"strict-align", |
| 385 |
"StrictAlign", "true", |
| 386 |
"Disallow all unaligned memory " |
| 387 |
"access">; |
| 388 |
|
| 389 |
def FeatureLongCalls : SubtargetFeature<"long-calls", "GenLongCalls", "true", |
| 390 |
"Generate calls via indirect call " |
| 391 |
"instructions">; |
| 392 |
|
| 393 |
def FeatureExecuteOnly : SubtargetFeature<"execute-only", |
| 394 |
"GenExecuteOnly", "true", |
| 395 |
"Enable the generation of " |
| 396 |
"execute only code.">; |
| 397 |
|
| 398 |
def FeatureReserveR9 : SubtargetFeature<"reserve-r9", "ReserveR9", "true", |
| 399 |
"Reserve R9, making it unavailable" |
| 400 |
" as GPR">; |
| 401 |
|
| 402 |
def FeatureNoMovt : SubtargetFeature<"no-movt", "NoMovt", "true", |
| 403 |
"Don't use movt/movw pairs for " |
| 404 |
"32-bit imms">; |
| 405 |
|
| 406 |
def FeatureNoNegativeImmediates |
| 407 |
: SubtargetFeature<"no-neg-immediates", |
| 408 |
"NegativeImmediates", "false", |
| 409 |
"Convert immediates and instructions " |
| 410 |
"to their negated or complemented " |
| 411 |
"equivalent when the immediate does " |
| 412 |
"not fit in the encoding.">; |
| 413 |
|
| 414 |
// Use the MachineScheduler for instruction scheduling for the subtarget. |
| 415 |
def FeatureUseMISched: SubtargetFeature<"use-misched", "UseMISched", "true", |
| 416 |
"Use the MachineScheduler">; |
| 417 |
|
| 418 |
def FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler", |
| 419 |
"DisablePostRAScheduler", "true", |
| 420 |
"Don't schedule again after register allocation">; |
| 421 |
|
| 422 |
// Armv8.5-A extensions |
| 423 |
|
| 424 |
def FeatureSB : SubtargetFeature<"sb", "HasSB", "true", |
| 425 |
"Enable v8.5a Speculation Barrier" >; |
| 426 |
|
| 427 |
// Armv8.6-A extensions |
| 428 |
def FeatureBF16 : SubtargetFeature<"bf16", "HasBF16", "true", |
| 429 |
"Enable support for BFloat16 instructions", [FeatureNEON]>; |
| 430 |
|
| 431 |
def FeatureMatMulInt8 : SubtargetFeature<"i8mm", "HasMatMulInt8", |
| 432 |
"true", "Enable Matrix Multiply Int8 Extension", [FeatureNEON]>; |
| 433 |
|
| 434 |
// Armv8.1-M extensions |
| 435 |
|
| 436 |
def FeatureLOB : SubtargetFeature<"lob", "HasLOB", "true", |
| 437 |
"Enable Low Overhead Branch " |
| 438 |
"extensions">; |
| 439 |
|
| 440 |
def FeatureFixCMSE_CVE_2021_35465 : SubtargetFeature<"fix-cmse-cve-2021-35465", |
| 441 |
"FixCMSE_CVE_2021_35465", "true", |
| 442 |
"Mitigate against the cve-2021-35465 " |
| 443 |
"security vulnurability">; |
| 444 |
|
| 445 |
def FeaturePACBTI : SubtargetFeature<"pacbti", "HasPACBTI", "true", |
| 446 |
"Enable Pointer Authentication and Branch " |
| 447 |
"Target Identification">; |
| 448 |
|
| 449 |
def FeatureNoBTIAtReturnTwice : SubtargetFeature<"no-bti-at-return-twice", |
| 450 |
"NoBTIAtReturnTwice", "true", |
| 451 |
"Don't place a BTI instruction " |
| 452 |
"after a return-twice">; |
| 453 |
|
| 454 |
//===----------------------------------------------------------------------===// |
| 455 |
// ARM architecture class |
| 456 |
// |
| 457 |
|
| 458 |
// A-series ISA |
| 459 |
def FeatureAClass : SubtargetFeature<"aclass", "ARMProcClass", "AClass", |
| 460 |
"Is application profile ('A' series)">; |
| 461 |
|
| 462 |
// R-series ISA |
| 463 |
def FeatureRClass : SubtargetFeature<"rclass", "ARMProcClass", "RClass", |
| 464 |
"Is realtime profile ('R' series)">; |
| 465 |
|
| 466 |
// M-series ISA |
| 467 |
def FeatureMClass : SubtargetFeature<"mclass", "ARMProcClass", "MClass", |
| 468 |
"Is microcontroller profile ('M' series)">; |
| 469 |
|
| 470 |
|
| 471 |
def FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true", |
| 472 |
"Enable Thumb2 instructions">; |
| 473 |
|
| 474 |
def FeatureNoARM : SubtargetFeature<"noarm", "NoARM", "true", |
| 475 |
"Does not support ARM mode execution">; |
| 476 |
|
| 477 |
//===----------------------------------------------------------------------===// |
| 478 |
// ARM ISAa. |
| 479 |
// |
| 480 |
|
| 481 |
def HasV4TOps : SubtargetFeature<"v4t", "HasV4TOps", "true", |
| 482 |
"Support ARM v4T instructions">; |
| 483 |
|
| 484 |
def HasV5TOps : SubtargetFeature<"v5t", "HasV5TOps", "true", |
| 485 |
"Support ARM v5T instructions", |
| 486 |
[HasV4TOps]>; |
| 487 |
|
| 488 |
def HasV5TEOps : SubtargetFeature<"v5te", "HasV5TEOps", "true", |
| 489 |
"Support ARM v5TE, v5TEj, and " |
| 490 |
"v5TExp instructions", |
| 491 |
[HasV5TOps]>; |
| 492 |
|
| 493 |
def HasV6Ops : SubtargetFeature<"v6", "HasV6Ops", "true", |
| 494 |
"Support ARM v6 instructions", |
| 495 |
[HasV5TEOps]>; |
| 496 |
|
| 497 |
def HasV6MOps : SubtargetFeature<"v6m", "HasV6MOps", "true", |
| 498 |
"Support ARM v6M instructions", |
| 499 |
[HasV6Ops]>; |
| 500 |
|
| 501 |
def HasV8MBaselineOps : SubtargetFeature<"v8m", "HasV8MBaselineOps", "true", |
| 502 |
"Support ARM v8M Baseline instructions", |
| 503 |
[HasV6MOps]>; |
| 504 |
|
| 505 |
def HasV6KOps : SubtargetFeature<"v6k", "HasV6KOps", "true", |
| 506 |
"Support ARM v6k instructions", |
| 507 |
[HasV6Ops]>; |
| 508 |
|
| 509 |
def HasV6T2Ops : SubtargetFeature<"v6t2", "HasV6T2Ops", "true", |
| 510 |
"Support ARM v6t2 instructions", |
| 511 |
[HasV8MBaselineOps, HasV6KOps, FeatureThumb2]>; |
| 512 |
|
| 513 |
def HasV7Ops : SubtargetFeature<"v7", "HasV7Ops", "true", |
| 514 |
"Support ARM v7 instructions", |
| 515 |
[HasV6T2Ops, FeaturePerfMon, |
| 516 |
FeatureV7Clrex]>; |
| 517 |
|
| 518 |
def HasV8MMainlineOps : |
| 519 |
SubtargetFeature<"v8m.main", "HasV8MMainlineOps", "true", |
| 520 |
"Support ARM v8M Mainline instructions", |
| 521 |
[HasV7Ops]>; |
| 522 |
|
| 523 |
def HasV8Ops : SubtargetFeature<"v8", "HasV8Ops", "true", |
| 524 |
"Support ARM v8 instructions", |
| 525 |
[HasV7Ops, FeatureAcquireRelease]>; |
| 526 |
|
| 527 |
def HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true", |
| 528 |
"Support ARM v8.1a instructions", |
| 529 |
[HasV8Ops]>; |
| 530 |
|
| 531 |
def HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true", |
| 532 |
"Support ARM v8.2a instructions", |
| 533 |
[HasV8_1aOps]>; |
| 534 |
|
| 535 |
def HasV8_3aOps : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true", |
| 536 |
"Support ARM v8.3a instructions", |
| 537 |
[HasV8_2aOps]>; |
| 538 |
|
| 539 |
def HasV8_4aOps : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true", |
| 540 |
"Support ARM v8.4a instructions", |
| 541 |
[HasV8_3aOps, FeatureDotProd]>; |
| 542 |
|
| 543 |
def HasV8_5aOps : SubtargetFeature<"v8.5a", "HasV8_5aOps", "true", |
| 544 |
"Support ARM v8.5a instructions", |
| 545 |
[HasV8_4aOps, FeatureSB]>; |
| 546 |
|
| 547 |
def HasV8_6aOps : SubtargetFeature<"v8.6a", "HasV8_6aOps", "true", |
| 548 |
"Support ARM v8.6a instructions", |
| 549 |
[HasV8_5aOps, FeatureBF16, |
| 550 |
FeatureMatMulInt8]>; |
| 551 |
|
| 552 |
def HasV8_7aOps : SubtargetFeature<"v8.7a", "HasV8_7aOps", "true", |
| 553 |
"Support ARM v8.7a instructions", |
| 554 |
[HasV8_6aOps]>; |
| 555 |
|
| 556 |
def HasV9_0aOps : SubtargetFeature<"v9a", "HasV9_0aOps", "true", |
| 557 |
"Support ARM v9a instructions", |
| 558 |
[HasV8_5aOps]>; |
| 559 |
|
| 560 |
def HasV9_1aOps : SubtargetFeature<"v9.1a", "HasV9_1aOps", "true", |
| 561 |
"Support ARM v9.1a instructions", |
| 562 |
[HasV8_6aOps, HasV9_0aOps]>; |
| 563 |
|
| 564 |
def HasV9_2aOps : SubtargetFeature<"v9.2a", "HasV9_2aOps", "true", |
| 565 |
"Support ARM v9.2a instructions", |
| 566 |
[HasV8_7aOps, HasV9_1aOps]>; |
| 567 |
|
| 568 |
def HasV8_1MMainlineOps : SubtargetFeature< |
| 569 |
"v8.1m.main", "HasV8_1MMainlineOps", "true", |
| 570 |
"Support ARM v8-1M Mainline instructions", |
| 571 |
[HasV8MMainlineOps]>; |
| 572 |
def HasMVEIntegerOps : SubtargetFeature< |
| 573 |
"mve", "HasMVEIntegerOps", "true", |
| 574 |
"Support M-Class Vector Extension with integer ops", |
| 575 |
[HasV8_1MMainlineOps, FeatureDSP, FeatureFPRegs16, FeatureFPRegs64]>; |
| 576 |
def HasMVEFloatOps : SubtargetFeature< |
| 577 |
"mve.fp", "HasMVEFloatOps", "true", |
| 578 |
"Support M-Class Vector Extension with integer and floating ops", |
| 579 |
[HasMVEIntegerOps, FeatureFPARMv8_D16_SP, FeatureFullFP16]>; |
| 580 |
|
| 581 |
def HasCDEOps : SubtargetFeature<"cde", "HasCDEOps", "true", |
| 582 |
"Support CDE instructions", |
| 583 |
[HasV8MMainlineOps]>; |
| 584 |
|
| 585 |
foreach i = {0-7} in |
| 586 |
def FeatureCoprocCDE#i : SubtargetFeature<"cdecp"#i, |
| 587 |
"CoprocCDE["#i#"]", "true", |
| 588 |
"Coprocessor "#i#" ISA is CDEv1", |
| 589 |
[HasCDEOps]>; |
| 590 |
|
| 591 |
//===----------------------------------------------------------------------===// |
| 592 |
// Control codegen mitigation against Straight Line Speculation vulnerability. |
| 593 |
//===----------------------------------------------------------------------===// |
| 594 |
|
| 595 |
def FeatureHardenSlsRetBr : SubtargetFeature<"harden-sls-retbr", |
| 596 |
"HardenSlsRetBr", "true", |
| 597 |
"Harden against straight line speculation across RETurn and BranchRegister " |
| 598 |
"instructions">; |
| 599 |
def FeatureHardenSlsBlr : SubtargetFeature<"harden-sls-blr", |
| 600 |
"HardenSlsBlr", "true", |
| 601 |
"Harden against straight line speculation across indirect calls">; |
| 602 |
def FeatureHardenSlsNoComdat : SubtargetFeature<"harden-sls-nocomdat", |
| 603 |
"HardenSlsNoComdat", "true", |
| 604 |
"Generate thunk code for SLS mitigation in the normal text section">; |
| 605 |
|
| 606 |
//===----------------------------------------------------------------------===// |
| 607 |
// ARM Processor subtarget features. |
| 608 |
// |
| 609 |
|
| 610 |
def ProcA5 : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5", |
| 611 |
"Cortex-A5 ARM processors", []>; |
| 612 |
def ProcA7 : SubtargetFeature<"a7", "ARMProcFamily", "CortexA7", |
| 613 |
"Cortex-A7 ARM processors", []>; |
| 614 |
def ProcA8 : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8", |
| 615 |
"Cortex-A8 ARM processors", []>; |
| 616 |
def ProcA9 : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9", |
| 617 |
"Cortex-A9 ARM processors", []>; |
| 618 |
def ProcA12 : SubtargetFeature<"a12", "ARMProcFamily", "CortexA12", |
| 619 |
"Cortex-A12 ARM processors", []>; |
| 620 |
def ProcA15 : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15", |
| 621 |
"Cortex-A15 ARM processors", []>; |
| 622 |
def ProcA17 : SubtargetFeature<"a17", "ARMProcFamily", "CortexA17", |
| 623 |
"Cortex-A17 ARM processors", []>; |
| 624 |
def ProcA32 : SubtargetFeature<"a32", "ARMProcFamily", "CortexA32", |
| 625 |
"Cortex-A32 ARM processors", []>; |
| 626 |
def ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35", |
| 627 |
"Cortex-A35 ARM processors", []>; |
| 628 |
def ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53", |
| 629 |
"Cortex-A53 ARM processors", []>; |
| 630 |
def ProcA55 : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55", |
| 631 |
"Cortex-A55 ARM processors", []>; |
| 632 |
def ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57", |
| 633 |
"Cortex-A57 ARM processors", []>; |
| 634 |
def ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72", |
| 635 |
"Cortex-A72 ARM processors", []>; |
| 636 |
def ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73", |
| 637 |
"Cortex-A73 ARM processors", []>; |
| 638 |
def ProcA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75", |
| 639 |
"Cortex-A75 ARM processors", []>; |
| 640 |
def ProcA76 : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76", |
| 641 |
"Cortex-A76 ARM processors", []>; |
| 642 |
def ProcA77 : SubtargetFeature<"a77", "ARMProcFamily", "CortexA77", |
| 643 |
"Cortex-A77 ARM processors", []>; |
| 644 |
def ProcA78 : SubtargetFeature<"cortex-a78", "ARMProcFamily", "CortexA78", |
| 645 |
"Cortex-A78 ARM processors", []>; |
| 646 |
def ProcA78C : SubtargetFeature<"a78c", "ARMProcFamily", "CortexA78C", |
| 647 |
"Cortex-A78C ARM processors", []>; |
| 648 |
def ProcA710 : SubtargetFeature<"cortex-a710", "ARMProcFamily", |
| 649 |
"CortexA710", "Cortex-A710 ARM processors", []>; |
| 650 |
def ProcX1 : SubtargetFeature<"cortex-x1", "ARMProcFamily", "CortexX1", |
| 651 |
"Cortex-X1 ARM processors", []>; |
| 652 |
|
| 653 |
def ProcV1 : SubtargetFeature<"neoverse-v1", "ARMProcFamily", |
| 654 |
"NeoverseV1", "Neoverse-V1 ARM processors", []>; |
| 655 |
|
| 656 |
def ProcKrait : SubtargetFeature<"krait", "ARMProcFamily", "Krait", |
| 657 |
"Qualcomm Krait processors", []>; |
| 658 |
def ProcKryo : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo", |
| 659 |
"Qualcomm Kryo processors", []>; |
| 660 |
def ProcSwift : SubtargetFeature<"swift", "ARMProcFamily", "Swift", |
| 661 |
"Swift ARM processors", []>; |
| 662 |
|
| 663 |
def ProcExynos : SubtargetFeature<"exynos", "ARMProcFamily", "Exynos", |
| 664 |
"Samsung Exynos processors", |
| 665 |
[FeatureZCZeroing, |
| 666 |
FeatureUseWideStrideVFP, |
| 667 |
FeatureSplatVFPToNeon, |
| 668 |
FeatureSlowVGETLNi32, |
| 669 |
FeatureSlowVDUP32, |
| 670 |
FeatureSlowFPBrcc, |
| 671 |
FeatureProfUnpredicate, |
| 672 |
FeatureHWDivThumb, |
| 673 |
FeatureHWDivARM, |
| 674 |
FeatureHasSlowFPVMLx, |
| 675 |
FeatureHasSlowFPVFMx, |
| 676 |
FeatureHasRetAddrStack, |
| 677 |
FeatureFuseLiterals, |
| 678 |
FeatureFuseAES, |
| 679 |
FeatureExpandMLx, |
| 680 |
FeatureCrypto, |
| 681 |
FeatureCRC]>; |
| 682 |
|
| 683 |
def ProcR4 : SubtargetFeature<"r4", "ARMProcFamily", "CortexR4", |
| 684 |
"Cortex-R4 ARM processors", []>; |
| 685 |
def ProcR5 : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5", |
| 686 |
"Cortex-R5 ARM processors", []>; |
| 687 |
def ProcR7 : SubtargetFeature<"r7", "ARMProcFamily", "CortexR7", |
| 688 |
"Cortex-R7 ARM processors", []>; |
| 689 |
def ProcR52 : SubtargetFeature<"r52", "ARMProcFamily", "CortexR52", |
| 690 |
"Cortex-R52 ARM processors", []>; |
| 691 |
|
| 692 |
def ProcM3 : SubtargetFeature<"m3", "ARMProcFamily", "CortexM3", |
| 693 |
"Cortex-M3 ARM processors", []>; |
| 694 |
def ProcM7 : SubtargetFeature<"m7", "ARMProcFamily", "CortexM7", |
| 695 |
"Cortex-M7 ARM processors", []>; |
| 696 |
|
| 697 |
//===----------------------------------------------------------------------===// |
| 698 |
// ARM Helper classes. |
| 699 |
// |
| 700 |
|
| 701 |
class Architecture<string fname, string aname, list<SubtargetFeature> features> |
| 702 |
: SubtargetFeature<fname, "ARMArch", aname, |
| 703 |
!strconcat(aname, " architecture"), features>; |
| 704 |
|
| 705 |
class ProcNoItin<string Name, list<SubtargetFeature> Features> |
| 706 |
: Processor<Name, NoItineraries, Features>; |
| 707 |
|
| 708 |
|
| 709 |
//===----------------------------------------------------------------------===// |
| 710 |
// ARM architectures |
| 711 |
// |
| 712 |
|
| 713 |
def ARMv2 : Architecture<"armv2", "ARMv2", []>; |
| 714 |
|
| 715 |
def ARMv2a : Architecture<"armv2a", "ARMv2a", []>; |
| 716 |
|
| 717 |
def ARMv3 : Architecture<"armv3", "ARMv3", []>; |
| 718 |
|
| 719 |
def ARMv3m : Architecture<"armv3m", "ARMv3m", []>; |
| 720 |
|
| 721 |
def ARMv4 : Architecture<"armv4", "ARMv4", []>; |
| 722 |
|
| 723 |
def ARMv4t : Architecture<"armv4t", "ARMv4t", [HasV4TOps]>; |
| 724 |
|
| 725 |
def ARMv5t : Architecture<"armv5t", "ARMv5t", [HasV5TOps]>; |
| 726 |
|
| 727 |
def ARMv5te : Architecture<"armv5te", "ARMv5te", [HasV5TEOps]>; |
| 728 |
|
| 729 |
def ARMv5tej : Architecture<"armv5tej", "ARMv5tej", [HasV5TEOps]>; |
| 730 |
|
| 731 |
def ARMv6 : Architecture<"armv6", "ARMv6", [HasV6Ops, |
| 732 |
FeatureDSP]>; |
| 733 |
|
| 734 |
def ARMv6t2 : Architecture<"armv6t2", "ARMv6t2", [HasV6T2Ops, |
| 735 |
FeatureDSP]>; |
| 736 |
|
| 737 |
def ARMv6k : Architecture<"armv6k", "ARMv6k", [HasV6KOps]>; |
| 738 |
|
| 739 |
def ARMv6kz : Architecture<"armv6kz", "ARMv6kz", [HasV6KOps, |
| 740 |
FeatureTrustZone]>; |
| 741 |
|
| 742 |
def ARMv6m : Architecture<"armv6-m", "ARMv6m", [HasV6MOps, |
| 743 |
FeatureNoARM, |
| 744 |
ModeThumb, |
| 745 |
FeatureDB, |
| 746 |
FeatureMClass, |
| 747 |
FeatureStrictAlign]>; |
| 748 |
|
| 749 |
def ARMv6sm : Architecture<"armv6s-m", "ARMv6sm", [HasV6MOps, |
| 750 |
FeatureNoARM, |
| 751 |
ModeThumb, |
| 752 |
FeatureDB, |
| 753 |
FeatureMClass, |
| 754 |
FeatureStrictAlign]>; |
| 755 |
|
| 756 |
def ARMv7a : Architecture<"armv7-a", "ARMv7a", [HasV7Ops, |
| 757 |
FeatureNEON, |
| 758 |
FeatureDB, |
| 759 |
FeatureDSP, |
| 760 |
FeatureAClass]>; |
| 761 |
|
| 762 |
def ARMv7ve : Architecture<"armv7ve", "ARMv7ve", [HasV7Ops, |
| 763 |
FeatureNEON, |
| 764 |
FeatureDB, |
| 765 |
FeatureDSP, |
| 766 |
FeatureTrustZone, |
| 767 |
FeatureMP, |
| 768 |
FeatureVirtualization, |
| 769 |
FeatureAClass]>; |
| 770 |
|
| 771 |
def ARMv7r : Architecture<"armv7-r", "ARMv7r", [HasV7Ops, |
| 772 |
FeatureDB, |
| 773 |
FeatureDSP, |
| 774 |
FeatureHWDivThumb, |
| 775 |
FeatureRClass]>; |
| 776 |
|
| 777 |
def ARMv7m : Architecture<"armv7-m", "ARMv7m", [HasV7Ops, |
| 778 |
FeatureThumb2, |
| 779 |
FeatureNoARM, |
| 780 |
ModeThumb, |
| 781 |
FeatureDB, |
| 782 |
FeatureHWDivThumb, |
| 783 |
FeatureMClass]>; |
| 784 |
|
| 785 |
def ARMv7em : Architecture<"armv7e-m", "ARMv7em", [HasV7Ops, |
| 786 |
FeatureThumb2, |
| 787 |
FeatureNoARM, |
| 788 |
ModeThumb, |
| 789 |
FeatureDB, |
| 790 |
FeatureHWDivThumb, |
| 791 |
FeatureMClass, |
| 792 |
FeatureDSP]>; |
| 793 |
|
| 794 |
def ARMv8a : Architecture<"armv8-a", "ARMv8a", [HasV8Ops, |
| 795 |
FeatureAClass, |
| 796 |
FeatureDB, |
| 797 |
FeatureFPARMv8, |
| 798 |
FeatureNEON, |
| 799 |
FeatureDSP, |
| 800 |
FeatureTrustZone, |
| 801 |
FeatureMP, |
| 802 |
FeatureVirtualization, |
| 803 |
FeatureCrypto, |
| 804 |
FeatureCRC]>; |
| 805 |
|
| 806 |
def ARMv81a : Architecture<"armv8.1-a", "ARMv81a", [HasV8_1aOps, |
| 807 |
FeatureAClass, |
| 808 |
FeatureDB, |
| 809 |
FeatureFPARMv8, |
| 810 |
FeatureNEON, |
| 811 |
FeatureDSP, |
| 812 |
FeatureTrustZone, |
| 813 |
FeatureMP, |
| 814 |
FeatureVirtualization, |
| 815 |
FeatureCrypto, |
| 816 |
FeatureCRC]>; |
| 817 |
|
| 818 |
def ARMv82a : Architecture<"armv8.2-a", "ARMv82a", [HasV8_2aOps, |
| 819 |
FeatureAClass, |
| 820 |
FeatureDB, |
| 821 |
FeatureFPARMv8, |
| 822 |
FeatureNEON, |
| 823 |
FeatureDSP, |
| 824 |
FeatureTrustZone, |
| 825 |
FeatureMP, |
| 826 |
FeatureVirtualization, |
| 827 |
FeatureCrypto, |
| 828 |
FeatureCRC, |
| 829 |
FeatureRAS]>; |
| 830 |
|
| 831 |
def ARMv83a : Architecture<"armv8.3-a", "ARMv83a", [HasV8_3aOps, |
| 832 |
FeatureAClass, |
| 833 |
FeatureDB, |
| 834 |
FeatureFPARMv8, |
| 835 |
FeatureNEON, |
| 836 |
FeatureDSP, |
| 837 |
FeatureTrustZone, |
| 838 |
FeatureMP, |
| 839 |
FeatureVirtualization, |
| 840 |
FeatureCrypto, |
| 841 |
FeatureCRC, |
| 842 |
FeatureRAS]>; |
| 843 |
|
| 844 |
def ARMv84a : Architecture<"armv8.4-a", "ARMv84a", [HasV8_4aOps, |
| 845 |
FeatureAClass, |
| 846 |
FeatureDB, |
| 847 |
FeatureFPARMv8, |
| 848 |
FeatureNEON, |
| 849 |
FeatureDSP, |
| 850 |
FeatureTrustZone, |
| 851 |
FeatureMP, |
| 852 |
FeatureVirtualization, |
| 853 |
FeatureCrypto, |
| 854 |
FeatureCRC, |
| 855 |
FeatureRAS, |
| 856 |
FeatureDotProd]>; |
| 857 |
|
| 858 |
def ARMv85a : Architecture<"armv8.5-a", "ARMv85a", [HasV8_5aOps, |
| 859 |
FeatureAClass, |
| 860 |
FeatureDB, |
| 861 |
FeatureFPARMv8, |
| 862 |
FeatureNEON, |
| 863 |
FeatureDSP, |
| 864 |
FeatureTrustZone, |
| 865 |
FeatureMP, |
| 866 |
FeatureVirtualization, |
| 867 |
FeatureCrypto, |
| 868 |
FeatureCRC, |
| 869 |
FeatureRAS, |
| 870 |
FeatureDotProd]>; |
| 871 |
def ARMv86a : Architecture<"armv8.6-a", "ARMv86a", [HasV8_6aOps, |
| 872 |
FeatureAClass, |
| 873 |
FeatureDB, |
| 874 |
FeatureFPARMv8, |
| 875 |
FeatureNEON, |
| 876 |
FeatureDSP, |
| 877 |
FeatureTrustZone, |
| 878 |
FeatureMP, |
| 879 |
FeatureVirtualization, |
| 880 |
FeatureCrypto, |
| 881 |
FeatureCRC, |
| 882 |
FeatureRAS, |
| 883 |
FeatureDotProd]>; |
| 884 |
def ARMv87a : Architecture<"armv8.7-a", "ARMv87a", [HasV8_7aOps, |
| 885 |
FeatureAClass, |
| 886 |
FeatureDB, |
| 887 |
FeatureFPARMv8, |
| 888 |
FeatureNEON, |
| 889 |
FeatureDSP, |
| 890 |
FeatureTrustZone, |
| 891 |
FeatureMP, |
| 892 |
FeatureVirtualization, |
| 893 |
FeatureCrypto, |
| 894 |
FeatureCRC, |
| 895 |
FeatureRAS, |
| 896 |
FeatureDotProd]>; |
| 897 |
|
| 898 |
def ARMv9a : Architecture<"armv9-a", "ARMv9a", [HasV9_0aOps, |
| 899 |
FeatureAClass, |
| 900 |
FeatureDB, |
| 901 |
FeatureFPARMv8, |
| 902 |
FeatureNEON, |
| 903 |
FeatureDSP, |
| 904 |
FeatureTrustZone, |
| 905 |
FeatureMP, |
| 906 |
FeatureVirtualization, |
| 907 |
FeatureCRC, |
| 908 |
FeatureRAS, |
| 909 |
FeatureDotProd]>; |
| 910 |
def ARMv91a : Architecture<"armv9.1-a", "ARMv91a", [HasV9_1aOps, |
| 911 |
FeatureAClass, |
| 912 |
FeatureDB, |
| 913 |
FeatureFPARMv8, |
| 914 |
FeatureNEON, |
| 915 |
FeatureDSP, |
| 916 |
FeatureTrustZone, |
| 917 |
FeatureMP, |
| 918 |
FeatureVirtualization, |
| 919 |
FeatureCRC, |
| 920 |
FeatureRAS, |
| 921 |
FeatureDotProd]>; |
| 922 |
def ARMv92a : Architecture<"armv9.2-a", "ARMv92a", [HasV9_2aOps, |
| 923 |
FeatureAClass, |
| 924 |
FeatureDB, |
| 925 |
FeatureFPARMv8, |
| 926 |
FeatureNEON, |
| 927 |
FeatureDSP, |
| 928 |
FeatureTrustZone, |
| 929 |
FeatureMP, |
| 930 |
FeatureVirtualization, |
| 931 |
FeatureCRC, |
| 932 |
FeatureRAS, |
| 933 |
FeatureDotProd]>; |
| 934 |
|
| 935 |
def ARMv8r : Architecture<"armv8-r", "ARMv8r", [HasV8Ops, |
| 936 |
FeatureRClass, |
| 937 |
FeatureDB, |
| 938 |
FeatureDFB, |
| 939 |
FeatureDSP, |
| 940 |
FeatureCRC, |
| 941 |
FeatureMP, |
| 942 |
FeatureVirtualization, |
| 943 |
FeatureFPARMv8, |
| 944 |
FeatureNEON]>; |
| 945 |
|
| 946 |
def ARMv8mBaseline : Architecture<"armv8-m.base", "ARMv8mBaseline", |
| 947 |
[HasV8MBaselineOps, |
| 948 |
FeatureNoARM, |
| 949 |
ModeThumb, |
| 950 |
FeatureDB, |
| 951 |
FeatureHWDivThumb, |
| 952 |
FeatureV7Clrex, |
| 953 |
Feature8MSecExt, |
| 954 |
FeatureAcquireRelease, |
| 955 |
FeatureMClass, |
| 956 |
FeatureStrictAlign]>; |
| 957 |
|
| 958 |
def ARMv8mMainline : Architecture<"armv8-m.main", "ARMv8mMainline", |
| 959 |
[HasV8MMainlineOps, |
| 960 |
FeatureNoARM, |
| 961 |
ModeThumb, |
| 962 |
FeatureDB, |
| 963 |
FeatureHWDivThumb, |
| 964 |
Feature8MSecExt, |
| 965 |
FeatureAcquireRelease, |
| 966 |
FeatureMClass]>; |
| 967 |
|
| 968 |
def ARMv81mMainline : Architecture<"armv8.1-m.main", "ARMv81mMainline", |
| 969 |
[HasV8_1MMainlineOps, |
| 970 |
FeatureNoARM, |
| 971 |
ModeThumb, |
| 972 |
FeatureDB, |
| 973 |
FeatureHWDivThumb, |
| 974 |
Feature8MSecExt, |
| 975 |
FeatureAcquireRelease, |
| 976 |
FeatureMClass, |
| 977 |
FeatureRAS, |
| 978 |
FeatureLOB]>; |
| 979 |
|
| 980 |
// Aliases |
| 981 |
def IWMMXT : Architecture<"iwmmxt", "ARMv5te", [ARMv5te]>; |
| 982 |
def IWMMXT2 : Architecture<"iwmmxt2", "ARMv5te", [ARMv5te]>; |
| 983 |
def XScale : Architecture<"xscale", "ARMv5te", [ARMv5te]>; |
| 984 |
def ARMv6j : Architecture<"armv6j", "ARMv7a", [ARMv6]>; |
| 985 |
def ARMv7k : Architecture<"armv7k", "ARMv7a", [ARMv7a]>; |
| 986 |
def ARMv7s : Architecture<"armv7s", "ARMv7a", [ARMv7a]>; |
| 987 |
|
| 988 |
//===----------------------------------------------------------------------===// |
| 989 |
// Register File Description |
| 990 |
//===----------------------------------------------------------------------===// |
| 991 |
|
| 992 |
include "ARMRegisterInfo.td" |
| 993 |
include "ARMRegisterBanks.td" |
| 994 |
include "ARMCallingConv.td" |
| 995 |
|
| 996 |
//===----------------------------------------------------------------------===// |
| 997 |
// ARM schedules. |
| 998 |
//===----------------------------------------------------------------------===// |
| 999 |
// |
| 1000 |
include "ARMPredicates.td" |
| 1001 |
include "ARMSchedule.td" |
| 1002 |
|
| 1003 |
//===----------------------------------------------------------------------===// |
| 1004 |
// Instruction Descriptions |
| 1005 |
//===----------------------------------------------------------------------===// |
| 1006 |
|
| 1007 |
include "ARMInstrInfo.td" |
| 1008 |
def ARMInstrInfo : InstrInfo; |
| 1009 |
|
| 1010 |
//===----------------------------------------------------------------------===// |
| 1011 |
// ARM schedules |
| 1012 |
// |
| 1013 |
include "ARMScheduleV6.td" |
| 1014 |
include "ARMScheduleA8.td" |
| 1015 |
include "ARMScheduleA9.td" |
| 1016 |
include "ARMScheduleSwift.td" |
| 1017 |
include "ARMScheduleR52.td" |
| 1018 |
include "ARMScheduleA57.td" |
| 1019 |
include "ARMScheduleM4.td" |
| 1020 |
include "ARMScheduleM7.td" |
| 1021 |
|
| 1022 |
//===----------------------------------------------------------------------===// |
| 1023 |
// ARM processors |
| 1024 |
// |
| 1025 |
// Dummy CPU, used to target architectures |
| 1026 |
def : ProcessorModel<"generic", CortexA8Model, []>; |
| 1027 |
|
| 1028 |
// FIXME: Several processors below are not using their own scheduler |
| 1029 |
// model, but one of similar/previous processor. These should be fixed. |
| 1030 |
|
| 1031 |
def : ProcNoItin<"arm8", [ARMv4]>; |
| 1032 |
def : ProcNoItin<"arm810", [ARMv4]>; |
| 1033 |
def : ProcNoItin<"strongarm", [ARMv4]>; |
| 1034 |
def : ProcNoItin<"strongarm110", [ARMv4]>; |
| 1035 |
def : ProcNoItin<"strongarm1100", [ARMv4]>; |
| 1036 |
def : ProcNoItin<"strongarm1110", [ARMv4]>; |
| 1037 |
|
| 1038 |
def : ProcNoItin<"arm7tdmi", [ARMv4t]>; |
| 1039 |
def : ProcNoItin<"arm7tdmi-s", [ARMv4t]>; |
| 1040 |
def : ProcNoItin<"arm710t", [ARMv4t]>; |
| 1041 |
def : ProcNoItin<"arm720t", [ARMv4t]>; |
| 1042 |
def : ProcNoItin<"arm9", [ARMv4t]>; |
| 1043 |
def : ProcNoItin<"arm9tdmi", [ARMv4t]>; |
| 1044 |
def : ProcNoItin<"arm920", [ARMv4t]>; |
| 1045 |
def : ProcNoItin<"arm920t", [ARMv4t]>; |
| 1046 |
def : ProcNoItin<"arm922t", [ARMv4t]>; |
| 1047 |
def : ProcNoItin<"arm940t", [ARMv4t]>; |
| 1048 |
def : ProcNoItin<"ep9312", [ARMv4t]>; |
| 1049 |
|
| 1050 |
def : ProcNoItin<"arm10tdmi", [ARMv5t]>; |
| 1051 |
def : ProcNoItin<"arm1020t", [ARMv5t]>; |
| 1052 |
|
| 1053 |
def : ProcNoItin<"arm9e", [ARMv5te]>; |
| 1054 |
def : ProcNoItin<"arm926ej-s", [ARMv5te]>; |
| 1055 |
def : ProcNoItin<"arm946e-s", [ARMv5te]>; |
| 1056 |
def : ProcNoItin<"arm966e-s", [ARMv5te]>; |
| 1057 |
def : ProcNoItin<"arm968e-s", [ARMv5te]>; |
| 1058 |
def : ProcNoItin<"arm10e", [ARMv5te]>; |
| 1059 |
def : ProcNoItin<"arm1020e", [ARMv5te]>; |
| 1060 |
def : ProcNoItin<"arm1022e", [ARMv5te]>; |
| 1061 |
def : ProcNoItin<"xscale", [ARMv5te]>; |
| 1062 |
def : ProcNoItin<"iwmmxt", [ARMv5te]>; |
| 1063 |
|
| 1064 |
def : Processor<"arm1136j-s", ARMV6Itineraries, [ARMv6]>; |
| 1065 |
def : Processor<"arm1136jf-s", ARMV6Itineraries, [ARMv6, |
| 1066 |
FeatureVFP2, |
| 1067 |
FeatureHasSlowFPVMLx]>; |
| 1068 |
|
| 1069 |
def : Processor<"cortex-m0", ARMV6Itineraries, [ARMv6m, |
| 1070 |
FeatureHasNoBranchPredictor]>; |
| 1071 |
def : Processor<"cortex-m0plus", ARMV6Itineraries, [ARMv6m, |
| 1072 |
FeatureHasNoBranchPredictor]>; |
| 1073 |
def : Processor<"cortex-m1", ARMV6Itineraries, [ARMv6m, |
| 1074 |
FeatureHasNoBranchPredictor]>; |
| 1075 |
def : Processor<"sc000", ARMV6Itineraries, [ARMv6m, |
| 1076 |
FeatureHasNoBranchPredictor]>; |
| 1077 |
|
| 1078 |
def : Processor<"arm1176jz-s", ARMV6Itineraries, [ARMv6kz]>; |
| 1079 |
def : Processor<"arm1176jzf-s", ARMV6Itineraries, [ARMv6kz, |
| 1080 |
FeatureVFP2, |
| 1081 |
FeatureHasSlowFPVMLx]>; |
| 1082 |
|
| 1083 |
def : Processor<"mpcorenovfp", ARMV6Itineraries, [ARMv6k]>; |
| 1084 |
def : Processor<"mpcore", ARMV6Itineraries, [ARMv6k, |
| 1085 |
FeatureVFP2, |
| 1086 |
FeatureHasSlowFPVMLx]>; |
| 1087 |
|
| 1088 |
def : Processor<"arm1156t2-s", ARMV6Itineraries, [ARMv6t2]>; |
| 1089 |
def : Processor<"arm1156t2f-s", ARMV6Itineraries, [ARMv6t2, |
| 1090 |
FeatureVFP2, |
| 1091 |
FeatureHasSlowFPVMLx]>; |
| 1092 |
|
| 1093 |
def : ProcessorModel<"cortex-a5", CortexA8Model, [ARMv7a, ProcA5, |
| 1094 |
FeatureHasRetAddrStack, |
| 1095 |
FeatureTrustZone, |
| 1096 |
FeatureSlowFPBrcc, |
| 1097 |
FeatureHasSlowFPVMLx, |
| 1098 |
FeatureHasSlowFPVFMx, |
| 1099 |
FeatureVMLxForwarding, |
| 1100 |
FeatureMP, |
| 1101 |
FeatureVFP4]>; |
| 1102 |
|
| 1103 |
def : ProcessorModel<"cortex-a7", CortexA8Model, [ARMv7a, ProcA7, |
| 1104 |
FeatureHasRetAddrStack, |
| 1105 |
FeatureTrustZone, |
| 1106 |
FeatureSlowFPBrcc, |
| 1107 |
FeatureHasVMLxHazards, |
| 1108 |
FeatureHasSlowFPVMLx, |
| 1109 |
FeatureHasSlowFPVFMx, |
| 1110 |
FeatureVMLxForwarding, |
| 1111 |
FeatureMP, |
| 1112 |
FeatureVFP4, |
| 1113 |
FeatureVirtualization]>; |
| 1114 |
|
| 1115 |
def : ProcessorModel<"cortex-a8", CortexA8Model, [ARMv7a, ProcA8, |
| 1116 |
FeatureHasRetAddrStack, |
| 1117 |
FeatureNonpipelinedVFP, |
| 1118 |
FeatureTrustZone, |
| 1119 |
FeatureSlowFPBrcc, |
| 1120 |
FeatureHasVMLxHazards, |
| 1121 |
FeatureHasSlowFPVMLx, |
| 1122 |
FeatureHasSlowFPVFMx, |
| 1123 |
FeatureVMLxForwarding]>; |
| 1124 |
|
| 1125 |
def : ProcessorModel<"cortex-a9", CortexA9Model, [ARMv7a, ProcA9, |
| 1126 |
FeatureHasRetAddrStack, |
| 1127 |
FeatureTrustZone, |
| 1128 |
FeatureHasVMLxHazards, |
| 1129 |
FeatureVMLxForwarding, |
| 1130 |
FeatureFP16, |
| 1131 |
FeatureAvoidPartialCPSR, |
| 1132 |
FeatureExpandMLx, |
| 1133 |
FeaturePreferVMOVSR, |
| 1134 |
FeatureMuxedUnits, |
| 1135 |
FeatureNEONForFPMovs, |
| 1136 |
FeatureCheckVLDnAlign, |
| 1137 |
FeatureMP]>; |
| 1138 |
|
| 1139 |
def : ProcessorModel<"cortex-a12", CortexA9Model, [ARMv7a, ProcA12, |
| 1140 |
FeatureHasRetAddrStack, |
| 1141 |
FeatureTrustZone, |
| 1142 |
FeatureVMLxForwarding, |
| 1143 |
FeatureVFP4, |
| 1144 |
FeatureAvoidPartialCPSR, |
| 1145 |
FeatureVirtualization, |
| 1146 |
FeatureMP]>; |
| 1147 |
|
| 1148 |
def : ProcessorModel<"cortex-a15", CortexA9Model, [ARMv7a, ProcA15, |
| 1149 |
FeatureDontWidenVMOVS, |
| 1150 |
FeatureSplatVFPToNeon, |
| 1151 |
FeatureHasRetAddrStack, |
| 1152 |
FeatureMuxedUnits, |
| 1153 |
FeatureTrustZone, |
| 1154 |
FeatureVFP4, |
| 1155 |
FeatureMP, |
| 1156 |
FeatureCheckVLDnAlign, |
| 1157 |
FeatureAvoidPartialCPSR, |
| 1158 |
FeatureVirtualization]>; |
| 1159 |
|
| 1160 |
def : ProcessorModel<"cortex-a17", CortexA9Model, [ARMv7a, ProcA17, |
| 1161 |
FeatureHasRetAddrStack, |
| 1162 |
FeatureTrustZone, |
| 1163 |
FeatureMP, |
| 1164 |
FeatureVMLxForwarding, |
| 1165 |
FeatureVFP4, |
| 1166 |
FeatureAvoidPartialCPSR, |
| 1167 |
FeatureVirtualization]>; |
| 1168 |
|
| 1169 |
// FIXME: krait has currently the same features as A9 plus VFP4 and HWDiv |
| 1170 |
def : ProcessorModel<"krait", CortexA9Model, [ARMv7a, ProcKrait, |
| 1171 |
FeatureHasRetAddrStack, |
| 1172 |
FeatureMuxedUnits, |
| 1173 |
FeatureCheckVLDnAlign, |
| 1174 |
FeatureVMLxForwarding, |
| 1175 |
FeatureFP16, |
| 1176 |
FeatureAvoidPartialCPSR, |
| 1177 |
FeatureVFP4, |
| 1178 |
FeatureHWDivThumb, |
| 1179 |
FeatureHWDivARM]>; |
| 1180 |
|
| 1181 |
def : ProcessorModel<"swift", SwiftModel, [ARMv7a, ProcSwift, |
| 1182 |
FeatureHasRetAddrStack, |
| 1183 |
FeatureNEONForFP, |
| 1184 |
FeatureVFP4, |
| 1185 |
FeatureUseWideStrideVFP, |
| 1186 |
FeatureMP, |
| 1187 |
FeatureHWDivThumb, |
| 1188 |
FeatureHWDivARM, |
| 1189 |
FeatureAvoidPartialCPSR, |
| 1190 |
FeatureAvoidMOVsShOp, |
| 1191 |
FeatureHasSlowFPVMLx, |
| 1192 |
FeatureHasSlowFPVFMx, |
| 1193 |
FeatureHasVMLxHazards, |
| 1194 |
FeatureProfUnpredicate, |
| 1195 |
FeaturePrefISHSTBarrier, |
| 1196 |
FeatureSlowOddRegister, |
| 1197 |
FeatureSlowLoadDSubreg, |
| 1198 |
FeatureSlowVGETLNi32, |
| 1199 |
FeatureSlowVDUP32, |
| 1200 |
FeatureUseMISched, |
| 1201 |
FeatureNoPostRASched]>; |
| 1202 |
|
| 1203 |
def : ProcessorModel<"cortex-r4", CortexA8Model, [ARMv7r, ProcR4, |
| 1204 |
FeatureHasRetAddrStack, |
| 1205 |
FeatureAvoidPartialCPSR]>; |
| 1206 |
|
| 1207 |
def : ProcessorModel<"cortex-r4f", CortexA8Model, [ARMv7r, ProcR4, |
| 1208 |
FeatureHasRetAddrStack, |
| 1209 |
FeatureSlowFPBrcc, |
| 1210 |
FeatureHasSlowFPVMLx, |
| 1211 |
FeatureHasSlowFPVFMx, |
| 1212 |
FeatureVFP3_D16, |
| 1213 |
FeatureAvoidPartialCPSR]>; |
| 1214 |
|
| 1215 |
def : ProcessorModel<"cortex-r5", CortexA8Model, [ARMv7r, ProcR5, |
| 1216 |
FeatureHasRetAddrStack, |
| 1217 |
FeatureVFP3_D16, |
| 1218 |
FeatureSlowFPBrcc, |
| 1219 |
FeatureHWDivARM, |
| 1220 |
FeatureHasSlowFPVMLx, |
| 1221 |
FeatureHasSlowFPVFMx, |
| 1222 |
FeatureAvoidPartialCPSR]>; |
| 1223 |
|
| 1224 |
def : ProcessorModel<"cortex-r7", CortexA8Model, [ARMv7r, ProcR7, |
| 1225 |
FeatureHasRetAddrStack, |
| 1226 |
FeatureVFP3_D16, |
| 1227 |
FeatureFP16, |
| 1228 |
FeatureMP, |
| 1229 |
FeatureSlowFPBrcc, |
| 1230 |
FeatureHWDivARM, |
| 1231 |
FeatureHasSlowFPVMLx, |
| 1232 |
FeatureHasSlowFPVFMx, |
| 1233 |
FeatureAvoidPartialCPSR]>; |
| 1234 |
|
| 1235 |
def : ProcessorModel<"cortex-r8", CortexA8Model, [ARMv7r, |
| 1236 |
FeatureHasRetAddrStack, |
| 1237 |
FeatureVFP3_D16, |
| 1238 |
FeatureFP16, |
| 1239 |
FeatureMP, |
| 1240 |
FeatureSlowFPBrcc, |
| 1241 |
FeatureHWDivARM, |
| 1242 |
FeatureHasSlowFPVMLx, |
| 1243 |
FeatureHasSlowFPVFMx, |
| 1244 |
FeatureAvoidPartialCPSR]>; |
| 1245 |
|
| 1246 |
def : ProcessorModel<"cortex-m3", CortexM4Model, [ARMv7m, |
| 1247 |
ProcM3, |
| 1248 |
FeaturePrefLoopAlign32, |
| 1249 |
FeatureUseMISched, |
| 1250 |
FeatureHasNoBranchPredictor]>; |
| 1251 |
|
| 1252 |
def : ProcessorModel<"sc300", CortexM4Model, [ARMv7m, |
| 1253 |
ProcM3, |
| 1254 |
FeatureUseMISched, |
| 1255 |
FeatureHasNoBranchPredictor]>; |
| 1256 |
|
| 1257 |
def : ProcessorModel<"cortex-m4", CortexM4Model, [ARMv7em, |
| 1258 |
FeatureVFP4_D16_SP, |
| 1259 |
FeaturePrefLoopAlign32, |
| 1260 |
FeatureHasSlowFPVMLx, |
| 1261 |
FeatureHasSlowFPVFMx, |
| 1262 |
FeatureUseMISched, |
| 1263 |
FeatureHasNoBranchPredictor]>; |
| 1264 |
|
| 1265 |
def : ProcessorModel<"cortex-m7", CortexM7Model, [ARMv7em, |
| 1266 |
ProcM7, |
| 1267 |
FeatureFPARMv8_D16, |
| 1268 |
FeatureUseMISched]>; |
| 1269 |
|
| 1270 |
def : ProcNoItin<"cortex-m23", [ARMv8mBaseline, |
| 1271 |
FeatureNoMovt, |
| 1272 |
FeatureHasNoBranchPredictor]>; |
| 1273 |
|
| 1274 |
def : ProcessorModel<"cortex-m33", CortexM4Model, [ARMv8mMainline, |
| 1275 |
FeatureDSP, |
| 1276 |
FeatureFPARMv8_D16_SP, |
| 1277 |
FeaturePrefLoopAlign32, |
| 1278 |
FeatureHasSlowFPVMLx, |
| 1279 |
FeatureHasSlowFPVFMx, |
| 1280 |
FeatureUseMISched, |
| 1281 |
FeatureHasNoBranchPredictor, |
| 1282 |
FeatureFixCMSE_CVE_2021_35465]>; |
| 1283 |
|
| 1284 |
def : ProcessorModel<"cortex-m35p", CortexM4Model, [ARMv8mMainline, |
| 1285 |
FeatureDSP, |
| 1286 |
FeatureFPARMv8_D16_SP, |
| 1287 |
FeaturePrefLoopAlign32, |
| 1288 |
FeatureHasSlowFPVMLx, |
| 1289 |
FeatureHasSlowFPVFMx, |
| 1290 |
FeatureUseMISched, |
| 1291 |
FeatureHasNoBranchPredictor, |
| 1292 |
FeatureFixCMSE_CVE_2021_35465]>; |
| 1293 |
|
| 1294 |
def : ProcessorModel<"cortex-m55", CortexM4Model, [ARMv81mMainline, |
| 1295 |
FeatureDSP, |
| 1296 |
FeatureFPARMv8_D16, |
| 1297 |
FeatureUseMISched, |
| 1298 |
FeatureHasNoBranchPredictor, |
| 1299 |
FeaturePrefLoopAlign32, |
| 1300 |
FeatureHasSlowFPVMLx, |
| 1301 |
HasMVEFloatOps, |
| 1302 |
FeatureFixCMSE_CVE_2021_35465]>; |
| 1303 |
|
| 1304 |
def : ProcNoItin<"cortex-a32", [ARMv8a, |
| 1305 |
FeatureHWDivThumb, |
| 1306 |
FeatureHWDivARM, |
| 1307 |
FeatureCrypto, |
| 1308 |
FeatureCRC]>; |
| 1309 |
|
| 1310 |
def : ProcNoItin<"cortex-a35", [ARMv8a, ProcA35, |
| 1311 |
FeatureHWDivThumb, |
| 1312 |
FeatureHWDivARM, |
| 1313 |
FeatureCrypto, |
| 1314 |
FeatureCRC]>; |
| 1315 |
|
| 1316 |
def : ProcNoItin<"cortex-a53", [ARMv8a, ProcA53, |
| 1317 |
FeatureHWDivThumb, |
| 1318 |
FeatureHWDivARM, |
| 1319 |
FeatureCrypto, |
| 1320 |
FeatureCRC, |
| 1321 |
FeatureFPAO]>; |
| 1322 |
|
| 1323 |
def : ProcNoItin<"cortex-a55", [ARMv82a, ProcA55, |
| 1324 |
FeatureHWDivThumb, |
| 1325 |
FeatureHWDivARM, |
| 1326 |
FeatureDotProd]>; |
| 1327 |
|
| 1328 |
def : ProcessorModel<"cortex-a57", CortexA57Model, [ARMv8a, ProcA57, |
| 1329 |
FeatureHWDivThumb, |
| 1330 |
FeatureHWDivARM, |
| 1331 |
FeatureCrypto, |
| 1332 |
FeatureCRC, |
| 1333 |
FeatureFPAO, |
| 1334 |
FeatureAvoidPartialCPSR, |
| 1335 |
FeatureCheapPredicableCPSR]>; |
| 1336 |
|
| 1337 |
def : ProcessorModel<"cortex-a72", CortexA57Model, [ARMv8a, ProcA72, |
| 1338 |
FeatureHWDivThumb, |
| 1339 |
FeatureHWDivARM, |
| 1340 |
FeatureCrypto, |
| 1341 |
FeatureCRC]>; |
| 1342 |
|
| 1343 |
def : ProcNoItin<"cortex-a73", [ARMv8a, ProcA73, |
| 1344 |
FeatureHWDivThumb, |
| 1345 |
FeatureHWDivARM, |
| 1346 |
FeatureCrypto, |
| 1347 |
FeatureCRC]>; |
| 1348 |
|
| 1349 |
def : ProcNoItin<"cortex-a75", [ARMv82a, ProcA75, |
| 1350 |
FeatureHWDivThumb, |
| 1351 |
FeatureHWDivARM, |
| 1352 |
FeatureDotProd]>; |
| 1353 |
|
| 1354 |
def : ProcNoItin<"cortex-a76", [ARMv82a, ProcA76, |
| 1355 |
FeatureHWDivThumb, |
| 1356 |
FeatureHWDivARM, |
| 1357 |
FeatureCrypto, |
| 1358 |
FeatureCRC, |
| 1359 |
FeatureFullFP16, |
| 1360 |
FeatureDotProd]>; |
| 1361 |
|
| 1362 |
def : ProcNoItin<"cortex-a76ae", [ARMv82a, ProcA76, |
| 1363 |
FeatureHWDivThumb, |
| 1364 |
FeatureHWDivARM, |
| 1365 |
FeatureCrypto, |
| 1366 |
FeatureCRC, |
| 1367 |
FeatureFullFP16, |
| 1368 |
FeatureDotProd]>; |
| 1369 |
|
| 1370 |
def : ProcNoItin<"cortex-a77", [ARMv82a, ProcA77, |
| 1371 |
FeatureHWDivThumb, |
| 1372 |
FeatureHWDivARM, |
| 1373 |
FeatureCrypto, |
| 1374 |
FeatureCRC, |
| 1375 |
FeatureFullFP16, |
| 1376 |
FeatureDotProd]>; |
| 1377 |
|
| 1378 |
def : ProcNoItin<"cortex-a78", [ARMv82a, ProcA78, |
| 1379 |
FeatureHWDivThumb, |
| 1380 |
FeatureHWDivARM, |
| 1381 |
FeatureCrypto, |
| 1382 |
FeatureCRC, |
| 1383 |
FeatureFullFP16, |
| 1384 |
FeatureDotProd]>; |
| 1385 |
|
| 1386 |
def : ProcNoItin<"cortex-a78c", [ARMv82a, ProcA78C, |
| 1387 |
FeatureHWDivThumb, |
| 1388 |
FeatureHWDivARM, |
| 1389 |
FeatureCrypto, |
| 1390 |
FeatureCRC, |
| 1391 |
FeatureDotProd, |
| 1392 |
FeatureFullFP16]>; |
| 1393 |
|
| 1394 |
def : ProcNoItin<"cortex-a710", [ARMv9a, ProcA710, |
| 1395 |
FeatureHWDivThumb, |
| 1396 |
FeatureHWDivARM, |
| 1397 |
FeatureFP16FML, |
| 1398 |
FeatureBF16, |
| 1399 |
FeatureMatMulInt8, |
| 1400 |
FeatureSB]>; |
| 1401 |
|
| 1402 |
def : ProcNoItin<"cortex-x1", [ARMv82a, ProcX1, |
| 1403 |
FeatureHWDivThumb, |
| 1404 |
FeatureHWDivARM, |
| 1405 |
FeatureCrypto, |
| 1406 |
FeatureCRC, |
| 1407 |
FeatureFullFP16, |
| 1408 |
FeatureDotProd]>; |
| 1409 |
|
| 1410 |
def : ProcNoItin<"neoverse-v1", [ARMv84a, |
| 1411 |
FeatureHWDivThumb, |
| 1412 |
FeatureHWDivARM, |
| 1413 |
FeatureCrypto, |
| 1414 |
FeatureCRC, |
| 1415 |
FeatureFullFP16, |
| 1416 |
FeatureBF16, |
| 1417 |
FeatureMatMulInt8]>; |
| 1418 |
|
| 1419 |
def : ProcNoItin<"neoverse-n1", [ARMv82a, |
| 1420 |
FeatureHWDivThumb, |
| 1421 |
FeatureHWDivARM, |
| 1422 |
FeatureCrypto, |
| 1423 |
FeatureCRC, |
| 1424 |
FeatureDotProd]>; |
| 1425 |
|
| 1426 |
def : ProcNoItin<"neoverse-n2", [ARMv85a, |
| 1427 |
FeatureBF16, |
| 1428 |
FeatureMatMulInt8, |
| 1429 |
FeaturePerfMon]>; |
| 1430 |
|
| 1431 |
def : ProcessorModel<"cyclone", SwiftModel, [ARMv8a, ProcSwift, |
| 1432 |
FeatureHasRetAddrStack, |
| 1433 |
FeatureNEONForFP, |
| 1434 |
FeatureVFP4, |
| 1435 |
FeatureMP, |
| 1436 |
FeatureHWDivThumb, |
| 1437 |
FeatureHWDivARM, |
| 1438 |
FeatureAvoidPartialCPSR, |
| 1439 |
FeatureAvoidMOVsShOp, |
| 1440 |
FeatureHasSlowFPVMLx, |
| 1441 |
FeatureHasSlowFPVFMx, |
| 1442 |
FeatureCrypto, |
| 1443 |
FeatureUseMISched, |
| 1444 |
FeatureZCZeroing, |
| 1445 |
FeatureNoPostRASched]>; |
| 1446 |
|
| 1447 |
def : ProcNoItin<"exynos-m3", [ARMv8a, ProcExynos]>; |
| 1448 |
def : ProcNoItin<"exynos-m4", [ARMv82a, ProcExynos, |
| 1449 |
FeatureFullFP16, |
| 1450 |
FeatureDotProd]>; |
| 1451 |
def : ProcNoItin<"exynos-m5", [ARMv82a, ProcExynos, |
| 1452 |
FeatureFullFP16, |
| 1453 |
FeatureDotProd]>; |
| 1454 |
|
| 1455 |
def : ProcNoItin<"kryo", [ARMv8a, ProcKryo, |
| 1456 |
FeatureHWDivThumb, |
| 1457 |
FeatureHWDivARM, |
| 1458 |
FeatureCrypto, |
| 1459 |
FeatureCRC]>; |
| 1460 |
|
| 1461 |
def : ProcessorModel<"cortex-r52", CortexR52Model, [ARMv8r, ProcR52, |
| 1462 |
FeatureUseMISched, |
| 1463 |
FeatureFPAO]>; |
| 1464 |
|
| 1465 |
//===----------------------------------------------------------------------===// |
| 1466 |
// Declare the target which we are implementing |
| 1467 |
//===----------------------------------------------------------------------===// |
| 1468 |
|
| 1469 |
def ARMAsmWriter : AsmWriter { |
| 1470 |
string AsmWriterClassName = "InstPrinter"; |
| 1471 |
int PassSubtarget = 1; |
| 1472 |
int Variant = 0; |
| 1473 |
bit isMCAsmWriter = 1; |
| 1474 |
} |
| 1475 |
|
| 1476 |
def ARMAsmParser : AsmParser { |
| 1477 |
bit ReportMultipleNearMisses = 1; |
| 1478 |
} |
| 1479 |
|
| 1480 |
def ARMAsmParserVariant : AsmParserVariant { |
| 1481 |
int Variant = 0; |
| 1482 |
string Name = "ARM"; |
| 1483 |
string BreakCharacters = "."; |
| 1484 |
} |
| 1485 |
|
| 1486 |
def ARM : Target { |
| 1487 |
// Pull in Instruction Info. |
| 1488 |
let InstructionSet = ARMInstrInfo; |
| 1489 |
let AssemblyWriters = [ARMAsmWriter]; |
| 1490 |
let AssemblyParsers = [ARMAsmParser]; |
| 1491 |
let AssemblyParserVariants = [ARMAsmParserVariant]; |
| 1492 |
let AllowRegisterRenaming = 1; |
| 1493 |
} |