10b57cec5SDimitry Andric//===-- ARM.td - Describe the ARM Target Machine -----------*- tablegen -*-===// 20b57cec5SDimitry Andric// 30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric// 70b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric// 90b57cec5SDimitry Andric// 100b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 130b57cec5SDimitry Andric// Target-independent interfaces which we are implementing 140b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 150b57cec5SDimitry Andric 160b57cec5SDimitry Andricinclude "llvm/Target/Target.td" 170b57cec5SDimitry Andric 180b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 190b57cec5SDimitry Andric// ARM Subtarget state. 200b57cec5SDimitry Andric// 210b57cec5SDimitry Andric 220b57cec5SDimitry Andricdef ModeThumb : SubtargetFeature<"thumb-mode", "InThumbMode", 230b57cec5SDimitry Andric "true", "Thumb mode">; 240b57cec5SDimitry Andric 250b57cec5SDimitry Andricdef ModeSoftFloat : SubtargetFeature<"soft-float","UseSoftFloat", 260b57cec5SDimitry Andric "true", "Use software floating " 270b57cec5SDimitry Andric "point features.">; 280b57cec5SDimitry Andric 290b57cec5SDimitry Andric 300b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 310b57cec5SDimitry Andric// ARM Subtarget features. 320b57cec5SDimitry Andric// 330b57cec5SDimitry Andric 340b57cec5SDimitry Andric// Floating Point, HW Division and Neon Support 350b57cec5SDimitry Andric 360b57cec5SDimitry Andric// FP loads/stores/moves, shared between VFP and MVE (even in the integer-only 370b57cec5SDimitry Andric// version). 380b57cec5SDimitry Andricdef FeatureFPRegs : SubtargetFeature<"fpregs", "HasFPRegs", "true", 390b57cec5SDimitry Andric "Enable FP registers">; 400b57cec5SDimitry Andric 410b57cec5SDimitry Andric// 16-bit FP loads/stores/moves, shared between VFP (with the v8.2A FP16 420b57cec5SDimitry Andric// extension) and MVE (even in the integer-only version). 430b57cec5SDimitry Andricdef FeatureFPRegs16 : SubtargetFeature<"fpregs16", "HasFPRegs16", "true", 440b57cec5SDimitry Andric "Enable 16-bit FP registers", 450b57cec5SDimitry Andric [FeatureFPRegs]>; 460b57cec5SDimitry Andric 470b57cec5SDimitry Andricdef FeatureFPRegs64 : SubtargetFeature<"fpregs64", "HasFPRegs64", "true", 480b57cec5SDimitry Andric "Enable 64-bit FP registers", 490b57cec5SDimitry Andric [FeatureFPRegs]>; 500b57cec5SDimitry Andric 510b57cec5SDimitry Andricdef FeatureFP64 : SubtargetFeature<"fp64", "HasFP64", "true", 520b57cec5SDimitry Andric "Floating point unit supports " 530b57cec5SDimitry Andric "double precision", 540b57cec5SDimitry Andric [FeatureFPRegs64]>; 550b57cec5SDimitry Andric 560b57cec5SDimitry Andricdef FeatureD32 : SubtargetFeature<"d32", "HasD32", "true", 570b57cec5SDimitry Andric "Extend FP to 32 double registers">; 580b57cec5SDimitry Andric 590b57cec5SDimitry Andricmulticlass VFPver<string name, string query, string description, 600b57cec5SDimitry Andric list<SubtargetFeature> prev, 610b57cec5SDimitry Andric list<SubtargetFeature> otherimplies, 620b57cec5SDimitry Andric list<SubtargetFeature> vfp2prev = []> { 630b57cec5SDimitry Andric def _D16_SP: SubtargetFeature< 640b57cec5SDimitry Andric name#"d16sp", query#"D16SP", "true", 650b57cec5SDimitry Andric description#" with only 16 d-registers and no double precision", 660b57cec5SDimitry Andric !foreach(v, prev, !cast<SubtargetFeature>(v # "_D16_SP")) # 670b57cec5SDimitry Andric !foreach(v, vfp2prev, !cast<SubtargetFeature>(v # "_SP")) # 680b57cec5SDimitry Andric otherimplies>; 690b57cec5SDimitry Andric def _SP: SubtargetFeature< 700b57cec5SDimitry Andric name#"sp", query#"SP", "true", 710b57cec5SDimitry Andric description#" with no double precision", 720b57cec5SDimitry Andric !foreach(v, prev, !cast<SubtargetFeature>(v # "_SP")) # 730b57cec5SDimitry Andric otherimplies # [FeatureD32, !cast<SubtargetFeature>(NAME # "_D16_SP")]>; 740b57cec5SDimitry Andric def _D16: SubtargetFeature< 750b57cec5SDimitry Andric name#"d16", query#"D16", "true", 760b57cec5SDimitry Andric description#" with only 16 d-registers", 770b57cec5SDimitry Andric !foreach(v, prev, !cast<SubtargetFeature>(v # "_D16")) # 780b57cec5SDimitry Andric vfp2prev # 790b57cec5SDimitry Andric otherimplies # [FeatureFP64, !cast<SubtargetFeature>(NAME # "_D16_SP")]>; 800b57cec5SDimitry Andric def "": SubtargetFeature< 810b57cec5SDimitry Andric name, query, "true", description, 820b57cec5SDimitry Andric prev # otherimplies # [ 830b57cec5SDimitry Andric !cast<SubtargetFeature>(NAME # "_D16"), 840b57cec5SDimitry Andric !cast<SubtargetFeature>(NAME # "_SP")]>; 850b57cec5SDimitry Andric} 860b57cec5SDimitry Andric 87*c14a5a88SDimitry Andricdef FeatureVFP2_D16_SP : SubtargetFeature<"vfp2d16sp", "HasVFPv2D16SP", "true", 880b57cec5SDimitry Andric "Enable VFP2 instructions with " 890b57cec5SDimitry Andric "no double precision", 900b57cec5SDimitry Andric [FeatureFPRegs]>; 91*c14a5a88SDimitry Andricdef FeatureVFP2_SP : SubtargetFeature<"vfp2sp", "HasVFPv2SP", "true", 92*c14a5a88SDimitry Andric "Enable VFP2 instructions with " 93*c14a5a88SDimitry Andric "no double precision", 94*c14a5a88SDimitry Andric [FeatureVFP2_D16_SP]>; 95*c14a5a88SDimitry Andricdef FeatureVFP2_D16 : SubtargetFeature<"vfp2d16", "HasVFPv2D16", "true", 96*c14a5a88SDimitry Andric "Enable VFP2 instructions", 97*c14a5a88SDimitry Andric [FeatureFP64, FeatureVFP2_D16_SP]>; 980b57cec5SDimitry Andricdef FeatureVFP2 : SubtargetFeature<"vfp2", "HasVFPv2", "true", 990b57cec5SDimitry Andric "Enable VFP2 instructions", 100*c14a5a88SDimitry Andric [FeatureVFP2_D16, FeatureVFP2_SP]>; 1010b57cec5SDimitry Andric 1020b57cec5SDimitry Andricdefm FeatureVFP3: VFPver<"vfp3", "HasVFPv3", "Enable VFP3 instructions", 1030b57cec5SDimitry Andric [], [], [FeatureVFP2]>; 1040b57cec5SDimitry Andric 1050b57cec5SDimitry Andricdef FeatureNEON : SubtargetFeature<"neon", "HasNEON", "true", 1060b57cec5SDimitry Andric "Enable NEON instructions", 1070b57cec5SDimitry Andric [FeatureVFP3]>; 1080b57cec5SDimitry Andric 1090b57cec5SDimitry Andricdef FeatureFP16 : SubtargetFeature<"fp16", "HasFP16", "true", 1100b57cec5SDimitry Andric "Enable half-precision " 1110b57cec5SDimitry Andric "floating point">; 1120b57cec5SDimitry Andric 1130b57cec5SDimitry Andricdefm FeatureVFP4: VFPver<"vfp4", "HasVFPv4", "Enable VFP4 instructions", 1140b57cec5SDimitry Andric [FeatureVFP3], [FeatureFP16]>; 1150b57cec5SDimitry Andric 1160b57cec5SDimitry Andricdefm FeatureFPARMv8: VFPver<"fp-armv8", "HasFPARMv8", "Enable ARMv8 FP", 1170b57cec5SDimitry Andric [FeatureVFP4], []>; 1180b57cec5SDimitry Andric 1190b57cec5SDimitry Andricdef FeatureFullFP16 : SubtargetFeature<"fullfp16", "HasFullFP16", "true", 1200b57cec5SDimitry Andric "Enable full half-precision " 1210b57cec5SDimitry Andric "floating point", 1220b57cec5SDimitry Andric [FeatureFPARMv8_D16_SP, FeatureFPRegs16]>; 1230b57cec5SDimitry Andric 1240b57cec5SDimitry Andricdef FeatureFP16FML : SubtargetFeature<"fp16fml", "HasFP16FML", "true", 1250b57cec5SDimitry Andric "Enable full half-precision " 1260b57cec5SDimitry Andric "floating point fml instructions", 1270b57cec5SDimitry Andric [FeatureFullFP16]>; 1280b57cec5SDimitry Andric 1290b57cec5SDimitry Andricdef FeatureHWDivThumb : SubtargetFeature<"hwdiv", 1300b57cec5SDimitry Andric "HasHardwareDivideInThumb", "true", 1310b57cec5SDimitry Andric "Enable divide instructions in Thumb">; 1320b57cec5SDimitry Andric 1330b57cec5SDimitry Andricdef FeatureHWDivARM : SubtargetFeature<"hwdiv-arm", 1340b57cec5SDimitry Andric "HasHardwareDivideInARM", "true", 1350b57cec5SDimitry Andric "Enable divide instructions in ARM mode">; 1360b57cec5SDimitry Andric 1370b57cec5SDimitry Andric// Atomic Support 1380b57cec5SDimitry Andricdef FeatureDB : SubtargetFeature<"db", "HasDataBarrier", "true", 1390b57cec5SDimitry Andric "Has data barrier (dmb/dsb) instructions">; 1400b57cec5SDimitry Andric 1410b57cec5SDimitry Andricdef FeatureV7Clrex : SubtargetFeature<"v7clrex", "HasV7Clrex", "true", 1420b57cec5SDimitry Andric "Has v7 clrex instruction">; 1430b57cec5SDimitry Andric 1440b57cec5SDimitry Andricdef FeatureDFB : SubtargetFeature<"dfb", "HasFullDataBarrier", "true", 1450b57cec5SDimitry Andric "Has full data barrier (dfb) instruction">; 1460b57cec5SDimitry Andric 1470b57cec5SDimitry Andricdef FeatureAcquireRelease : SubtargetFeature<"acquire-release", 1480b57cec5SDimitry Andric "HasAcquireRelease", "true", 1490b57cec5SDimitry Andric "Has v8 acquire/release (lda/ldaex " 1500b57cec5SDimitry Andric " etc) instructions">; 1510b57cec5SDimitry Andric 1520b57cec5SDimitry Andric 1530b57cec5SDimitry Andricdef FeatureSlowFPBrcc : SubtargetFeature<"slow-fp-brcc", "SlowFPBrcc", "true", 1540b57cec5SDimitry Andric "FP compare + branch is slow">; 1550b57cec5SDimitry Andric 1560b57cec5SDimitry Andricdef FeaturePerfMon : SubtargetFeature<"perfmon", "HasPerfMon", "true", 1570b57cec5SDimitry Andric "Enable support for Performance " 1580b57cec5SDimitry Andric "Monitor extensions">; 1590b57cec5SDimitry Andric 1600b57cec5SDimitry Andric 1610b57cec5SDimitry Andric// TrustZone Security Extensions 1620b57cec5SDimitry Andricdef FeatureTrustZone : SubtargetFeature<"trustzone", "HasTrustZone", "true", 1630b57cec5SDimitry Andric "Enable support for TrustZone " 1640b57cec5SDimitry Andric "security extensions">; 1650b57cec5SDimitry Andric 1660b57cec5SDimitry Andricdef Feature8MSecExt : SubtargetFeature<"8msecext", "Has8MSecExt", "true", 1670b57cec5SDimitry Andric "Enable support for ARMv8-M " 1680b57cec5SDimitry Andric "Security Extensions">; 1690b57cec5SDimitry Andric 1700b57cec5SDimitry Andricdef FeatureSHA2 : SubtargetFeature<"sha2", "HasSHA2", "true", 1710b57cec5SDimitry Andric "Enable SHA1 and SHA256 support", [FeatureNEON]>; 1720b57cec5SDimitry Andric 1730b57cec5SDimitry Andricdef FeatureAES : SubtargetFeature<"aes", "HasAES", "true", 1740b57cec5SDimitry Andric "Enable AES support", [FeatureNEON]>; 1750b57cec5SDimitry Andric 1760b57cec5SDimitry Andricdef FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true", 1770b57cec5SDimitry Andric "Enable support for " 1780b57cec5SDimitry Andric "Cryptography extensions", 1790b57cec5SDimitry Andric [FeatureNEON, FeatureSHA2, FeatureAES]>; 1800b57cec5SDimitry Andric 1810b57cec5SDimitry Andricdef FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true", 1820b57cec5SDimitry Andric "Enable support for CRC instructions">; 1830b57cec5SDimitry Andric 1840b57cec5SDimitry Andricdef FeatureDotProd : SubtargetFeature<"dotprod", "HasDotProd", "true", 1850b57cec5SDimitry Andric "Enable support for dot product instructions", 1860b57cec5SDimitry Andric [FeatureNEON]>; 1870b57cec5SDimitry Andric 1880b57cec5SDimitry Andric// Not to be confused with FeatureHasRetAddrStack (return address stack) 1890b57cec5SDimitry Andricdef FeatureRAS : SubtargetFeature<"ras", "HasRAS", "true", 1900b57cec5SDimitry Andric "Enable Reliability, Availability " 1910b57cec5SDimitry Andric "and Serviceability extensions">; 1920b57cec5SDimitry Andric 1930b57cec5SDimitry Andric// Fast computation of non-negative address offsets 1940b57cec5SDimitry Andricdef FeatureFPAO : SubtargetFeature<"fpao", "HasFPAO", "true", 1950b57cec5SDimitry Andric "Enable fast computation of " 1960b57cec5SDimitry Andric "positive address offsets">; 1970b57cec5SDimitry Andric 1980b57cec5SDimitry Andric// Fast execution of AES crypto operations 1990b57cec5SDimitry Andricdef FeatureFuseAES : SubtargetFeature<"fuse-aes", "HasFuseAES", "true", 2000b57cec5SDimitry Andric "CPU fuses AES crypto operations">; 2010b57cec5SDimitry Andric 2020b57cec5SDimitry Andric// Fast execution of bottom and top halves of literal generation 2030b57cec5SDimitry Andricdef FeatureFuseLiterals : SubtargetFeature<"fuse-literals", "HasFuseLiterals", "true", 2040b57cec5SDimitry Andric "CPU fuses literal generation operations">; 2050b57cec5SDimitry Andric 2060b57cec5SDimitry Andric// The way of reading thread pointer 2070b57cec5SDimitry Andricdef FeatureReadTp : SubtargetFeature<"read-tp-hard", "ReadTPHard", "true", 2080b57cec5SDimitry Andric "Reading thread pointer from register">; 2090b57cec5SDimitry Andric 2100b57cec5SDimitry Andric// Cyclone can zero VFP registers in 0 cycles. 2110b57cec5SDimitry Andricdef FeatureZCZeroing : SubtargetFeature<"zcz", "HasZeroCycleZeroing", "true", 2120b57cec5SDimitry Andric "Has zero-cycle zeroing instructions">; 2130b57cec5SDimitry Andric 2140b57cec5SDimitry Andric// Whether it is profitable to unpredicate certain instructions during if-conversion 2150b57cec5SDimitry Andricdef FeatureProfUnpredicate : SubtargetFeature<"prof-unpr", 2160b57cec5SDimitry Andric "IsProfitableToUnpredicate", "true", 2170b57cec5SDimitry Andric "Is profitable to unpredicate">; 2180b57cec5SDimitry Andric 2190b57cec5SDimitry Andric// Some targets (e.g. Swift) have microcoded VGETLNi32. 2200b57cec5SDimitry Andricdef FeatureSlowVGETLNi32 : SubtargetFeature<"slow-vgetlni32", 2210b57cec5SDimitry Andric "HasSlowVGETLNi32", "true", 2220b57cec5SDimitry Andric "Has slow VGETLNi32 - prefer VMOV">; 2230b57cec5SDimitry Andric 2240b57cec5SDimitry Andric// Some targets (e.g. Swift) have microcoded VDUP32. 2250b57cec5SDimitry Andricdef FeatureSlowVDUP32 : SubtargetFeature<"slow-vdup32", "HasSlowVDUP32", 2260b57cec5SDimitry Andric "true", 2270b57cec5SDimitry Andric "Has slow VDUP32 - prefer VMOV">; 2280b57cec5SDimitry Andric 2290b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) prefer VMOVSR to VMOVDRR even when using NEON 2300b57cec5SDimitry Andric// for scalar FP, as this allows more effective execution domain optimization. 2310b57cec5SDimitry Andricdef FeaturePreferVMOVSR : SubtargetFeature<"prefer-vmovsr", "PreferVMOVSR", 2320b57cec5SDimitry Andric "true", "Prefer VMOVSR">; 2330b57cec5SDimitry Andric 2340b57cec5SDimitry Andric// Swift has ISHST barriers compatible with Atomic Release semantics but weaker 2350b57cec5SDimitry Andric// than ISH 2360b57cec5SDimitry Andricdef FeaturePrefISHSTBarrier : SubtargetFeature<"prefer-ishst", "PreferISHST", 2370b57cec5SDimitry Andric "true", "Prefer ISHST barriers">; 2380b57cec5SDimitry Andric 2390b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) have muxed AGU and NEON/FPU. 2400b57cec5SDimitry Andricdef FeatureMuxedUnits : SubtargetFeature<"muxed-units", "HasMuxedUnits", 2410b57cec5SDimitry Andric "true", 2420b57cec5SDimitry Andric "Has muxed AGU and NEON/FPU">; 2430b57cec5SDimitry Andric 2440b57cec5SDimitry Andric// Whether VLDM/VSTM starting with odd register number need more microops 2450b57cec5SDimitry Andric// than single VLDRS 2460b57cec5SDimitry Andricdef FeatureSlowOddRegister : SubtargetFeature<"slow-odd-reg", "SlowOddRegister", 2470b57cec5SDimitry Andric "true", "VLDM/VSTM starting " 2480b57cec5SDimitry Andric "with an odd register is slow">; 2490b57cec5SDimitry Andric 2500b57cec5SDimitry Andric// Some targets have a renaming dependency when loading into D subregisters. 2510b57cec5SDimitry Andricdef FeatureSlowLoadDSubreg : SubtargetFeature<"slow-load-D-subreg", 2520b57cec5SDimitry Andric "SlowLoadDSubregister", "true", 2530b57cec5SDimitry Andric "Loading into D subregs is slow">; 2540b57cec5SDimitry Andric 2550b57cec5SDimitry Andricdef FeatureUseWideStrideVFP : SubtargetFeature<"wide-stride-vfp", 2560b57cec5SDimitry Andric "UseWideStrideVFP", "true", 2570b57cec5SDimitry Andric "Use a wide stride when allocating VFP registers">; 2580b57cec5SDimitry Andric 2590b57cec5SDimitry Andric// Some targets (e.g. Cortex-A15) never want VMOVS to be widened to VMOVD. 2600b57cec5SDimitry Andricdef FeatureDontWidenVMOVS : SubtargetFeature<"dont-widen-vmovs", 2610b57cec5SDimitry Andric "DontWidenVMOVS", "true", 2620b57cec5SDimitry Andric "Don't widen VMOVS to VMOVD">; 2630b57cec5SDimitry Andric 2640b57cec5SDimitry Andric// Some targets (e.g. Cortex-A15) prefer to avoid mixing operations on different 2650b57cec5SDimitry Andric// VFP register widths. 2660b57cec5SDimitry Andricdef FeatureSplatVFPToNeon : SubtargetFeature<"splat-vfp-neon", 2670b57cec5SDimitry Andric "SplatVFPToNeon", "true", 2680b57cec5SDimitry Andric "Splat register from VFP to NEON", 2690b57cec5SDimitry Andric [FeatureDontWidenVMOVS]>; 2700b57cec5SDimitry Andric 2710b57cec5SDimitry Andric// Whether or not it is profitable to expand VFP/NEON MLA/MLS instructions. 2720b57cec5SDimitry Andricdef FeatureExpandMLx : SubtargetFeature<"expand-fp-mlx", 2730b57cec5SDimitry Andric "ExpandMLx", "true", 2740b57cec5SDimitry Andric "Expand VFP/NEON MLA/MLS instructions">; 2750b57cec5SDimitry Andric 2760b57cec5SDimitry Andric// Some targets have special RAW hazards for VFP/NEON VMLA/VMLS. 2770b57cec5SDimitry Andricdef FeatureHasVMLxHazards : SubtargetFeature<"vmlx-hazards", "HasVMLxHazards", 2780b57cec5SDimitry Andric "true", "Has VMLx hazards">; 2790b57cec5SDimitry Andric 2800b57cec5SDimitry Andric// Some targets (e.g. Cortex-A9) want to convert VMOVRS, VMOVSR and VMOVS from 2810b57cec5SDimitry Andric// VFP to NEON, as an execution domain optimization. 2820b57cec5SDimitry Andricdef FeatureNEONForFPMovs : SubtargetFeature<"neon-fpmovs", 2830b57cec5SDimitry Andric "UseNEONForFPMovs", "true", 2840b57cec5SDimitry Andric "Convert VMOVSR, VMOVRS, " 2850b57cec5SDimitry Andric "VMOVS to NEON">; 2860b57cec5SDimitry Andric 2870b57cec5SDimitry Andric// Some processors benefit from using NEON instructions for scalar 2880b57cec5SDimitry Andric// single-precision FP operations. This affects instruction selection and should 2890b57cec5SDimitry Andric// only be enabled if the handling of denormals is not important. 2900b57cec5SDimitry Andricdef FeatureNEONForFP : SubtargetFeature<"neonfp", 2910b57cec5SDimitry Andric "UseNEONForSinglePrecisionFP", 2920b57cec5SDimitry Andric "true", 2930b57cec5SDimitry Andric "Use NEON for single precision FP">; 2940b57cec5SDimitry Andric 2950b57cec5SDimitry Andric// On some processors, VLDn instructions that access unaligned data take one 2960b57cec5SDimitry Andric// extra cycle. Take that into account when computing operand latencies. 2970b57cec5SDimitry Andricdef FeatureCheckVLDnAlign : SubtargetFeature<"vldn-align", "CheckVLDnAlign", 2980b57cec5SDimitry Andric "true", 2990b57cec5SDimitry Andric "Check for VLDn unaligned access">; 3000b57cec5SDimitry Andric 3010b57cec5SDimitry Andric// Some processors have a nonpipelined VFP coprocessor. 3020b57cec5SDimitry Andricdef FeatureNonpipelinedVFP : SubtargetFeature<"nonpipelined-vfp", 3030b57cec5SDimitry Andric "NonpipelinedVFP", "true", 3040b57cec5SDimitry Andric "VFP instructions are not pipelined">; 3050b57cec5SDimitry Andric 3060b57cec5SDimitry Andric// Some processors have FP multiply-accumulate instructions that don't 3070b57cec5SDimitry Andric// play nicely with other VFP / NEON instructions, and it's generally better 3080b57cec5SDimitry Andric// to just not use them. 3090b57cec5SDimitry Andricdef FeatureHasSlowFPVMLx : SubtargetFeature<"slowfpvmlx", "SlowFPVMLx", "true", 3100b57cec5SDimitry Andric "Disable VFP / NEON MAC instructions">; 3110b57cec5SDimitry Andric 3120b57cec5SDimitry Andric// Cortex-A8 / A9 Advanced SIMD has multiplier accumulator forwarding. 3130b57cec5SDimitry Andricdef FeatureVMLxForwarding : SubtargetFeature<"vmlx-forwarding", 3140b57cec5SDimitry Andric "HasVMLxForwarding", "true", 3150b57cec5SDimitry Andric "Has multiplier accumulator forwarding">; 3160b57cec5SDimitry Andric 3170b57cec5SDimitry Andric// Disable 32-bit to 16-bit narrowing for experimentation. 3180b57cec5SDimitry Andricdef FeaturePref32BitThumb : SubtargetFeature<"32bit", "Pref32BitThumb", "true", 3190b57cec5SDimitry Andric "Prefer 32-bit Thumb instrs">; 3200b57cec5SDimitry Andric 3210b57cec5SDimitry Andricdef FeaturePrefLoopAlign32 : SubtargetFeature<"loop-align", "PrefLoopAlignment","2", 3220b57cec5SDimitry Andric "Prefer 32-bit alignment for loops">; 3230b57cec5SDimitry Andric 3240b57cec5SDimitry Andric/// Some instructions update CPSR partially, which can add false dependency for 3250b57cec5SDimitry Andric/// out-of-order implementation, e.g. Cortex-A9, unless each individual bit is 3260b57cec5SDimitry Andric/// mapped to a separate physical register. Avoid partial CPSR update for these 3270b57cec5SDimitry Andric/// processors. 3280b57cec5SDimitry Andricdef FeatureAvoidPartialCPSR : SubtargetFeature<"avoid-partial-cpsr", 3290b57cec5SDimitry Andric "AvoidCPSRPartialUpdate", "true", 3300b57cec5SDimitry Andric "Avoid CPSR partial update for OOO execution">; 3310b57cec5SDimitry Andric 3320b57cec5SDimitry Andric/// Disable +1 predication cost for instructions updating CPSR. 3330b57cec5SDimitry Andric/// Enabled for Cortex-A57. 3340b57cec5SDimitry Andricdef FeatureCheapPredicableCPSR : SubtargetFeature<"cheap-predicable-cpsr", 3350b57cec5SDimitry Andric "CheapPredicableCPSRDef", 3360b57cec5SDimitry Andric "true", 3370b57cec5SDimitry Andric "Disable +1 predication cost for instructions updating CPSR">; 3380b57cec5SDimitry Andric 3390b57cec5SDimitry Andricdef FeatureAvoidMOVsShOp : SubtargetFeature<"avoid-movs-shop", 3400b57cec5SDimitry Andric "AvoidMOVsShifterOperand", "true", 3410b57cec5SDimitry Andric "Avoid movs instructions with " 3420b57cec5SDimitry Andric "shifter operand">; 3430b57cec5SDimitry Andric 3440b57cec5SDimitry Andric// Some processors perform return stack prediction. CodeGen should avoid issue 3450b57cec5SDimitry Andric// "normal" call instructions to callees which do not return. 3460b57cec5SDimitry Andricdef FeatureHasRetAddrStack : SubtargetFeature<"ret-addr-stack", 3470b57cec5SDimitry Andric "HasRetAddrStack", "true", 3480b57cec5SDimitry Andric "Has return address stack">; 3490b57cec5SDimitry Andric 3500b57cec5SDimitry Andric// Some processors have no branch predictor, which changes the expected cost of 3510b57cec5SDimitry Andric// taking a branch which affects the choice of whether to use predicated 3520b57cec5SDimitry Andric// instructions. 3530b57cec5SDimitry Andricdef FeatureHasNoBranchPredictor : SubtargetFeature<"no-branch-predictor", 3540b57cec5SDimitry Andric "HasBranchPredictor", "false", 3550b57cec5SDimitry Andric "Has no branch predictor">; 3560b57cec5SDimitry Andric 3570b57cec5SDimitry Andric/// DSP extension. 3580b57cec5SDimitry Andricdef FeatureDSP : SubtargetFeature<"dsp", "HasDSP", "true", 3590b57cec5SDimitry Andric "Supports DSP instructions in " 3600b57cec5SDimitry Andric "ARM and/or Thumb2">; 3610b57cec5SDimitry Andric 3620b57cec5SDimitry Andric// Multiprocessing extension. 3630b57cec5SDimitry Andricdef FeatureMP : SubtargetFeature<"mp", "HasMPExtension", "true", 3640b57cec5SDimitry Andric "Supports Multiprocessing extension">; 3650b57cec5SDimitry Andric 3660b57cec5SDimitry Andric// Virtualization extension - requires HW divide (ARMv7-AR ARMARM - 4.4.8). 3670b57cec5SDimitry Andricdef FeatureVirtualization : SubtargetFeature<"virtualization", 3680b57cec5SDimitry Andric "HasVirtualization", "true", 3690b57cec5SDimitry Andric "Supports Virtualization extension", 3700b57cec5SDimitry Andric [FeatureHWDivThumb, FeatureHWDivARM]>; 3710b57cec5SDimitry Andric 3720b57cec5SDimitry Andric// Special TRAP encoding for NaCl, which looks like a TRAP in Thumb too. 3730b57cec5SDimitry Andric// See ARMInstrInfo.td for details. 3740b57cec5SDimitry Andricdef FeatureNaClTrap : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true", 3750b57cec5SDimitry Andric "NaCl trap">; 3760b57cec5SDimitry Andric 3770b57cec5SDimitry Andricdef FeatureStrictAlign : SubtargetFeature<"strict-align", 3780b57cec5SDimitry Andric "StrictAlign", "true", 3790b57cec5SDimitry Andric "Disallow all unaligned memory " 3800b57cec5SDimitry Andric "access">; 3810b57cec5SDimitry Andric 3820b57cec5SDimitry Andricdef FeatureLongCalls : SubtargetFeature<"long-calls", "GenLongCalls", "true", 3830b57cec5SDimitry Andric "Generate calls via indirect call " 3840b57cec5SDimitry Andric "instructions">; 3850b57cec5SDimitry Andric 3860b57cec5SDimitry Andricdef FeatureExecuteOnly : SubtargetFeature<"execute-only", 3870b57cec5SDimitry Andric "GenExecuteOnly", "true", 3880b57cec5SDimitry Andric "Enable the generation of " 3890b57cec5SDimitry Andric "execute only code.">; 3900b57cec5SDimitry Andric 3910b57cec5SDimitry Andricdef FeatureReserveR9 : SubtargetFeature<"reserve-r9", "ReserveR9", "true", 3920b57cec5SDimitry Andric "Reserve R9, making it unavailable" 3930b57cec5SDimitry Andric " as GPR">; 3940b57cec5SDimitry Andric 3950b57cec5SDimitry Andricdef FeatureNoMovt : SubtargetFeature<"no-movt", "NoMovt", "true", 3960b57cec5SDimitry Andric "Don't use movt/movw pairs for " 3970b57cec5SDimitry Andric "32-bit imms">; 3980b57cec5SDimitry Andric 3990b57cec5SDimitry Andricdef FeatureNoNegativeImmediates 4000b57cec5SDimitry Andric : SubtargetFeature<"no-neg-immediates", 4010b57cec5SDimitry Andric "NegativeImmediates", "false", 4020b57cec5SDimitry Andric "Convert immediates and instructions " 4030b57cec5SDimitry Andric "to their negated or complemented " 4040b57cec5SDimitry Andric "equivalent when the immediate does " 4050b57cec5SDimitry Andric "not fit in the encoding.">; 4060b57cec5SDimitry Andric 4070b57cec5SDimitry Andric// Use the MachineScheduler for instruction scheduling for the subtarget. 4080b57cec5SDimitry Andricdef FeatureUseMISched: SubtargetFeature<"use-misched", "UseMISched", "true", 4090b57cec5SDimitry Andric "Use the MachineScheduler">; 4100b57cec5SDimitry Andric 4110b57cec5SDimitry Andricdef FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler", 4120b57cec5SDimitry Andric "DisablePostRAScheduler", "true", 4130b57cec5SDimitry Andric "Don't schedule again after register allocation">; 4140b57cec5SDimitry Andric 4150b57cec5SDimitry Andric// Enable use of alias analysis during code generation 4160b57cec5SDimitry Andricdef FeatureUseAA : SubtargetFeature<"use-aa", "UseAA", "true", 4170b57cec5SDimitry Andric "Use alias analysis during codegen">; 4180b57cec5SDimitry Andric 4190b57cec5SDimitry Andric// Armv8.5-A extensions 4200b57cec5SDimitry Andric 4210b57cec5SDimitry Andricdef FeatureSB : SubtargetFeature<"sb", "HasSB", "true", 4220b57cec5SDimitry Andric "Enable v8.5a Speculation Barrier" >; 4230b57cec5SDimitry Andric 4240b57cec5SDimitry Andric// Armv8.1-M extensions 4250b57cec5SDimitry Andric 4260b57cec5SDimitry Andricdef FeatureLOB : SubtargetFeature<"lob", "HasLOB", "true", 4270b57cec5SDimitry Andric "Enable Low Overhead Branch " 4280b57cec5SDimitry Andric "extensions">; 4290b57cec5SDimitry Andric 4300b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4310b57cec5SDimitry Andric// ARM architecture class 4320b57cec5SDimitry Andric// 4330b57cec5SDimitry Andric 4340b57cec5SDimitry Andric// A-series ISA 4350b57cec5SDimitry Andricdef FeatureAClass : SubtargetFeature<"aclass", "ARMProcClass", "AClass", 4360b57cec5SDimitry Andric "Is application profile ('A' series)">; 4370b57cec5SDimitry Andric 4380b57cec5SDimitry Andric// R-series ISA 4390b57cec5SDimitry Andricdef FeatureRClass : SubtargetFeature<"rclass", "ARMProcClass", "RClass", 4400b57cec5SDimitry Andric "Is realtime profile ('R' series)">; 4410b57cec5SDimitry Andric 4420b57cec5SDimitry Andric// M-series ISA 4430b57cec5SDimitry Andricdef FeatureMClass : SubtargetFeature<"mclass", "ARMProcClass", "MClass", 4440b57cec5SDimitry Andric "Is microcontroller profile ('M' series)">; 4450b57cec5SDimitry Andric 4460b57cec5SDimitry Andric 4470b57cec5SDimitry Andricdef FeatureThumb2 : SubtargetFeature<"thumb2", "HasThumb2", "true", 4480b57cec5SDimitry Andric "Enable Thumb2 instructions">; 4490b57cec5SDimitry Andric 4500b57cec5SDimitry Andricdef FeatureNoARM : SubtargetFeature<"noarm", "NoARM", "true", 4510b57cec5SDimitry Andric "Does not support ARM mode execution">; 4520b57cec5SDimitry Andric 4530b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 4540b57cec5SDimitry Andric// ARM ISAa. 4550b57cec5SDimitry Andric// 4560b57cec5SDimitry Andric 4570b57cec5SDimitry Andricdef HasV4TOps : SubtargetFeature<"v4t", "HasV4TOps", "true", 4580b57cec5SDimitry Andric "Support ARM v4T instructions">; 4590b57cec5SDimitry Andric 4600b57cec5SDimitry Andricdef HasV5TOps : SubtargetFeature<"v5t", "HasV5TOps", "true", 4610b57cec5SDimitry Andric "Support ARM v5T instructions", 4620b57cec5SDimitry Andric [HasV4TOps]>; 4630b57cec5SDimitry Andric 4640b57cec5SDimitry Andricdef HasV5TEOps : SubtargetFeature<"v5te", "HasV5TEOps", "true", 4650b57cec5SDimitry Andric "Support ARM v5TE, v5TEj, and " 4660b57cec5SDimitry Andric "v5TExp instructions", 4670b57cec5SDimitry Andric [HasV5TOps]>; 4680b57cec5SDimitry Andric 4690b57cec5SDimitry Andricdef HasV6Ops : SubtargetFeature<"v6", "HasV6Ops", "true", 4700b57cec5SDimitry Andric "Support ARM v6 instructions", 4710b57cec5SDimitry Andric [HasV5TEOps]>; 4720b57cec5SDimitry Andric 4730b57cec5SDimitry Andricdef HasV6MOps : SubtargetFeature<"v6m", "HasV6MOps", "true", 4740b57cec5SDimitry Andric "Support ARM v6M instructions", 4750b57cec5SDimitry Andric [HasV6Ops]>; 4760b57cec5SDimitry Andric 4770b57cec5SDimitry Andricdef HasV8MBaselineOps : SubtargetFeature<"v8m", "HasV8MBaselineOps", "true", 4780b57cec5SDimitry Andric "Support ARM v8M Baseline instructions", 4790b57cec5SDimitry Andric [HasV6MOps]>; 4800b57cec5SDimitry Andric 4810b57cec5SDimitry Andricdef HasV6KOps : SubtargetFeature<"v6k", "HasV6KOps", "true", 4820b57cec5SDimitry Andric "Support ARM v6k instructions", 4830b57cec5SDimitry Andric [HasV6Ops]>; 4840b57cec5SDimitry Andric 4850b57cec5SDimitry Andricdef HasV6T2Ops : SubtargetFeature<"v6t2", "HasV6T2Ops", "true", 4860b57cec5SDimitry Andric "Support ARM v6t2 instructions", 4870b57cec5SDimitry Andric [HasV8MBaselineOps, HasV6KOps, FeatureThumb2]>; 4880b57cec5SDimitry Andric 4890b57cec5SDimitry Andricdef HasV7Ops : SubtargetFeature<"v7", "HasV7Ops", "true", 4900b57cec5SDimitry Andric "Support ARM v7 instructions", 4910b57cec5SDimitry Andric [HasV6T2Ops, FeaturePerfMon, 4920b57cec5SDimitry Andric FeatureV7Clrex]>; 4930b57cec5SDimitry Andric 4940b57cec5SDimitry Andricdef HasV8MMainlineOps : 4950b57cec5SDimitry Andric SubtargetFeature<"v8m.main", "HasV8MMainlineOps", "true", 4960b57cec5SDimitry Andric "Support ARM v8M Mainline instructions", 4970b57cec5SDimitry Andric [HasV7Ops]>; 4980b57cec5SDimitry Andric 4990b57cec5SDimitry Andricdef HasV8Ops : SubtargetFeature<"v8", "HasV8Ops", "true", 5000b57cec5SDimitry Andric "Support ARM v8 instructions", 5010b57cec5SDimitry Andric [HasV7Ops, FeatureAcquireRelease]>; 5020b57cec5SDimitry Andric 5030b57cec5SDimitry Andricdef HasV8_1aOps : SubtargetFeature<"v8.1a", "HasV8_1aOps", "true", 5040b57cec5SDimitry Andric "Support ARM v8.1a instructions", 5050b57cec5SDimitry Andric [HasV8Ops]>; 5060b57cec5SDimitry Andric 5070b57cec5SDimitry Andricdef HasV8_2aOps : SubtargetFeature<"v8.2a", "HasV8_2aOps", "true", 5080b57cec5SDimitry Andric "Support ARM v8.2a instructions", 5090b57cec5SDimitry Andric [HasV8_1aOps]>; 5100b57cec5SDimitry Andric 5110b57cec5SDimitry Andricdef HasV8_3aOps : SubtargetFeature<"v8.3a", "HasV8_3aOps", "true", 5120b57cec5SDimitry Andric "Support ARM v8.3a instructions", 5130b57cec5SDimitry Andric [HasV8_2aOps]>; 5140b57cec5SDimitry Andric 5150b57cec5SDimitry Andricdef HasV8_4aOps : SubtargetFeature<"v8.4a", "HasV8_4aOps", "true", 5160b57cec5SDimitry Andric "Support ARM v8.4a instructions", 5170b57cec5SDimitry Andric [HasV8_3aOps, FeatureDotProd]>; 5180b57cec5SDimitry Andric 5190b57cec5SDimitry Andricdef HasV8_5aOps : SubtargetFeature<"v8.5a", "HasV8_5aOps", "true", 5200b57cec5SDimitry Andric "Support ARM v8.5a instructions", 5210b57cec5SDimitry Andric [HasV8_4aOps, FeatureSB]>; 5220b57cec5SDimitry Andric 5230b57cec5SDimitry Andricdef HasV8_1MMainlineOps : SubtargetFeature< 5240b57cec5SDimitry Andric "v8.1m.main", "HasV8_1MMainlineOps", "true", 5250b57cec5SDimitry Andric "Support ARM v8-1M Mainline instructions", 5260b57cec5SDimitry Andric [HasV8MMainlineOps]>; 5270b57cec5SDimitry Andricdef HasMVEIntegerOps : SubtargetFeature< 5280b57cec5SDimitry Andric "mve", "HasMVEIntegerOps", "true", 5290b57cec5SDimitry Andric "Support M-Class Vector Extension with integer ops", 5300b57cec5SDimitry Andric [HasV8_1MMainlineOps, FeatureDSP, FeatureFPRegs16, FeatureFPRegs64]>; 5310b57cec5SDimitry Andricdef HasMVEFloatOps : SubtargetFeature< 5320b57cec5SDimitry Andric "mve.fp", "HasMVEFloatOps", "true", 5330b57cec5SDimitry Andric "Support M-Class Vector Extension with integer and floating ops", 5340b57cec5SDimitry Andric [HasMVEIntegerOps, FeatureFPARMv8_D16_SP, FeatureFullFP16]>; 5350b57cec5SDimitry Andric 5360b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 5370b57cec5SDimitry Andric// ARM Processor subtarget features. 5380b57cec5SDimitry Andric// 5390b57cec5SDimitry Andric 5400b57cec5SDimitry Andricdef ProcA5 : SubtargetFeature<"a5", "ARMProcFamily", "CortexA5", 5410b57cec5SDimitry Andric "Cortex-A5 ARM processors", []>; 5420b57cec5SDimitry Andricdef ProcA7 : SubtargetFeature<"a7", "ARMProcFamily", "CortexA7", 5430b57cec5SDimitry Andric "Cortex-A7 ARM processors", []>; 5440b57cec5SDimitry Andricdef ProcA8 : SubtargetFeature<"a8", "ARMProcFamily", "CortexA8", 5450b57cec5SDimitry Andric "Cortex-A8 ARM processors", []>; 5460b57cec5SDimitry Andricdef ProcA9 : SubtargetFeature<"a9", "ARMProcFamily", "CortexA9", 5470b57cec5SDimitry Andric "Cortex-A9 ARM processors", []>; 5480b57cec5SDimitry Andricdef ProcA12 : SubtargetFeature<"a12", "ARMProcFamily", "CortexA12", 5490b57cec5SDimitry Andric "Cortex-A12 ARM processors", []>; 5500b57cec5SDimitry Andricdef ProcA15 : SubtargetFeature<"a15", "ARMProcFamily", "CortexA15", 5510b57cec5SDimitry Andric "Cortex-A15 ARM processors", []>; 5520b57cec5SDimitry Andricdef ProcA17 : SubtargetFeature<"a17", "ARMProcFamily", "CortexA17", 5530b57cec5SDimitry Andric "Cortex-A17 ARM processors", []>; 5540b57cec5SDimitry Andricdef ProcA32 : SubtargetFeature<"a32", "ARMProcFamily", "CortexA32", 5550b57cec5SDimitry Andric "Cortex-A32 ARM processors", []>; 5560b57cec5SDimitry Andricdef ProcA35 : SubtargetFeature<"a35", "ARMProcFamily", "CortexA35", 5570b57cec5SDimitry Andric "Cortex-A35 ARM processors", []>; 5580b57cec5SDimitry Andricdef ProcA53 : SubtargetFeature<"a53", "ARMProcFamily", "CortexA53", 5590b57cec5SDimitry Andric "Cortex-A53 ARM processors", []>; 5600b57cec5SDimitry Andricdef ProcA55 : SubtargetFeature<"a55", "ARMProcFamily", "CortexA55", 5610b57cec5SDimitry Andric "Cortex-A55 ARM processors", []>; 5620b57cec5SDimitry Andricdef ProcA57 : SubtargetFeature<"a57", "ARMProcFamily", "CortexA57", 5630b57cec5SDimitry Andric "Cortex-A57 ARM processors", []>; 5640b57cec5SDimitry Andricdef ProcA72 : SubtargetFeature<"a72", "ARMProcFamily", "CortexA72", 5650b57cec5SDimitry Andric "Cortex-A72 ARM processors", []>; 5660b57cec5SDimitry Andricdef ProcA73 : SubtargetFeature<"a73", "ARMProcFamily", "CortexA73", 5670b57cec5SDimitry Andric "Cortex-A73 ARM processors", []>; 5680b57cec5SDimitry Andricdef ProcA75 : SubtargetFeature<"a75", "ARMProcFamily", "CortexA75", 5690b57cec5SDimitry Andric "Cortex-A75 ARM processors", []>; 5700b57cec5SDimitry Andricdef ProcA76 : SubtargetFeature<"a76", "ARMProcFamily", "CortexA76", 5710b57cec5SDimitry Andric "Cortex-A76 ARM processors", []>; 5720b57cec5SDimitry Andric 5730b57cec5SDimitry Andricdef ProcKrait : SubtargetFeature<"krait", "ARMProcFamily", "Krait", 5740b57cec5SDimitry Andric "Qualcomm Krait processors", []>; 5750b57cec5SDimitry Andricdef ProcKryo : SubtargetFeature<"kryo", "ARMProcFamily", "Kryo", 5760b57cec5SDimitry Andric "Qualcomm Kryo processors", []>; 5770b57cec5SDimitry Andricdef ProcSwift : SubtargetFeature<"swift", "ARMProcFamily", "Swift", 5780b57cec5SDimitry Andric "Swift ARM processors", []>; 5790b57cec5SDimitry Andric 5800b57cec5SDimitry Andricdef ProcExynos : SubtargetFeature<"exynos", "ARMProcFamily", "Exynos", 5810b57cec5SDimitry Andric "Samsung Exynos processors", 5820b57cec5SDimitry Andric [FeatureZCZeroing, 5830b57cec5SDimitry Andric FeatureUseWideStrideVFP, 5840b57cec5SDimitry Andric FeatureUseAA, 5850b57cec5SDimitry Andric FeatureSplatVFPToNeon, 5860b57cec5SDimitry Andric FeatureSlowVGETLNi32, 5870b57cec5SDimitry Andric FeatureSlowVDUP32, 5880b57cec5SDimitry Andric FeatureSlowFPBrcc, 5890b57cec5SDimitry Andric FeatureProfUnpredicate, 5900b57cec5SDimitry Andric FeatureHWDivThumb, 5910b57cec5SDimitry Andric FeatureHWDivARM, 5920b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 5930b57cec5SDimitry Andric FeatureHasRetAddrStack, 5940b57cec5SDimitry Andric FeatureFuseLiterals, 5950b57cec5SDimitry Andric FeatureFuseAES, 5960b57cec5SDimitry Andric FeatureExpandMLx, 5970b57cec5SDimitry Andric FeatureCrypto, 5980b57cec5SDimitry Andric FeatureCRC]>; 5990b57cec5SDimitry Andric 6000b57cec5SDimitry Andricdef ProcR4 : SubtargetFeature<"r4", "ARMProcFamily", "CortexR4", 6010b57cec5SDimitry Andric "Cortex-R4 ARM processors", []>; 6020b57cec5SDimitry Andricdef ProcR5 : SubtargetFeature<"r5", "ARMProcFamily", "CortexR5", 6030b57cec5SDimitry Andric "Cortex-R5 ARM processors", []>; 6040b57cec5SDimitry Andricdef ProcR7 : SubtargetFeature<"r7", "ARMProcFamily", "CortexR7", 6050b57cec5SDimitry Andric "Cortex-R7 ARM processors", []>; 6060b57cec5SDimitry Andricdef ProcR52 : SubtargetFeature<"r52", "ARMProcFamily", "CortexR52", 6070b57cec5SDimitry Andric "Cortex-R52 ARM processors", []>; 6080b57cec5SDimitry Andric 6090b57cec5SDimitry Andricdef ProcM3 : SubtargetFeature<"m3", "ARMProcFamily", "CortexM3", 6100b57cec5SDimitry Andric "Cortex-M3 ARM processors", []>; 6110b57cec5SDimitry Andric 6120b57cec5SDimitry Andric 6130b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 6140b57cec5SDimitry Andric// ARM Helper classes. 6150b57cec5SDimitry Andric// 6160b57cec5SDimitry Andric 6170b57cec5SDimitry Andricclass Architecture<string fname, string aname, list<SubtargetFeature> features> 6180b57cec5SDimitry Andric : SubtargetFeature<fname, "ARMArch", aname, 6190b57cec5SDimitry Andric !strconcat(aname, " architecture"), features>; 6200b57cec5SDimitry Andric 6210b57cec5SDimitry Andricclass ProcNoItin<string Name, list<SubtargetFeature> Features> 6220b57cec5SDimitry Andric : Processor<Name, NoItineraries, Features>; 6230b57cec5SDimitry Andric 6240b57cec5SDimitry Andric 6250b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 6260b57cec5SDimitry Andric// ARM architectures 6270b57cec5SDimitry Andric// 6280b57cec5SDimitry Andric 6290b57cec5SDimitry Andricdef ARMv2 : Architecture<"armv2", "ARMv2", []>; 6300b57cec5SDimitry Andric 6310b57cec5SDimitry Andricdef ARMv2a : Architecture<"armv2a", "ARMv2a", []>; 6320b57cec5SDimitry Andric 6330b57cec5SDimitry Andricdef ARMv3 : Architecture<"armv3", "ARMv3", []>; 6340b57cec5SDimitry Andric 6350b57cec5SDimitry Andricdef ARMv3m : Architecture<"armv3m", "ARMv3m", []>; 6360b57cec5SDimitry Andric 6370b57cec5SDimitry Andricdef ARMv4 : Architecture<"armv4", "ARMv4", []>; 6380b57cec5SDimitry Andric 6390b57cec5SDimitry Andricdef ARMv4t : Architecture<"armv4t", "ARMv4t", [HasV4TOps]>; 6400b57cec5SDimitry Andric 6410b57cec5SDimitry Andricdef ARMv5t : Architecture<"armv5t", "ARMv5t", [HasV5TOps]>; 6420b57cec5SDimitry Andric 6430b57cec5SDimitry Andricdef ARMv5te : Architecture<"armv5te", "ARMv5te", [HasV5TEOps]>; 6440b57cec5SDimitry Andric 6450b57cec5SDimitry Andricdef ARMv5tej : Architecture<"armv5tej", "ARMv5tej", [HasV5TEOps]>; 6460b57cec5SDimitry Andric 6470b57cec5SDimitry Andricdef ARMv6 : Architecture<"armv6", "ARMv6", [HasV6Ops, 6480b57cec5SDimitry Andric FeatureDSP]>; 6490b57cec5SDimitry Andric 6500b57cec5SDimitry Andricdef ARMv6t2 : Architecture<"armv6t2", "ARMv6t2", [HasV6T2Ops, 6510b57cec5SDimitry Andric FeatureDSP]>; 6520b57cec5SDimitry Andric 6530b57cec5SDimitry Andricdef ARMv6k : Architecture<"armv6k", "ARMv6k", [HasV6KOps]>; 6540b57cec5SDimitry Andric 6550b57cec5SDimitry Andricdef ARMv6kz : Architecture<"armv6kz", "ARMv6kz", [HasV6KOps, 6560b57cec5SDimitry Andric FeatureTrustZone]>; 6570b57cec5SDimitry Andric 6580b57cec5SDimitry Andricdef ARMv6m : Architecture<"armv6-m", "ARMv6m", [HasV6MOps, 6590b57cec5SDimitry Andric FeatureNoARM, 6600b57cec5SDimitry Andric ModeThumb, 6610b57cec5SDimitry Andric FeatureDB, 6620b57cec5SDimitry Andric FeatureMClass, 6630b57cec5SDimitry Andric FeatureStrictAlign]>; 6640b57cec5SDimitry Andric 6650b57cec5SDimitry Andricdef ARMv6sm : Architecture<"armv6s-m", "ARMv6sm", [HasV6MOps, 6660b57cec5SDimitry Andric FeatureNoARM, 6670b57cec5SDimitry Andric ModeThumb, 6680b57cec5SDimitry Andric FeatureDB, 6690b57cec5SDimitry Andric FeatureMClass, 6700b57cec5SDimitry Andric FeatureStrictAlign]>; 6710b57cec5SDimitry Andric 6720b57cec5SDimitry Andricdef ARMv7a : Architecture<"armv7-a", "ARMv7a", [HasV7Ops, 6730b57cec5SDimitry Andric FeatureNEON, 6740b57cec5SDimitry Andric FeatureDB, 6750b57cec5SDimitry Andric FeatureDSP, 6760b57cec5SDimitry Andric FeatureAClass]>; 6770b57cec5SDimitry Andric 6780b57cec5SDimitry Andricdef ARMv7ve : Architecture<"armv7ve", "ARMv7ve", [HasV7Ops, 6790b57cec5SDimitry Andric FeatureNEON, 6800b57cec5SDimitry Andric FeatureDB, 6810b57cec5SDimitry Andric FeatureDSP, 6820b57cec5SDimitry Andric FeatureTrustZone, 6830b57cec5SDimitry Andric FeatureMP, 6840b57cec5SDimitry Andric FeatureVirtualization, 6850b57cec5SDimitry Andric FeatureAClass]>; 6860b57cec5SDimitry Andric 6870b57cec5SDimitry Andricdef ARMv7r : Architecture<"armv7-r", "ARMv7r", [HasV7Ops, 6880b57cec5SDimitry Andric FeatureDB, 6890b57cec5SDimitry Andric FeatureDSP, 6900b57cec5SDimitry Andric FeatureHWDivThumb, 6910b57cec5SDimitry Andric FeatureRClass]>; 6920b57cec5SDimitry Andric 6930b57cec5SDimitry Andricdef ARMv7m : Architecture<"armv7-m", "ARMv7m", [HasV7Ops, 6940b57cec5SDimitry Andric FeatureThumb2, 6950b57cec5SDimitry Andric FeatureNoARM, 6960b57cec5SDimitry Andric ModeThumb, 6970b57cec5SDimitry Andric FeatureDB, 6980b57cec5SDimitry Andric FeatureHWDivThumb, 6990b57cec5SDimitry Andric FeatureMClass]>; 7000b57cec5SDimitry Andric 7010b57cec5SDimitry Andricdef ARMv7em : Architecture<"armv7e-m", "ARMv7em", [HasV7Ops, 7020b57cec5SDimitry Andric FeatureThumb2, 7030b57cec5SDimitry Andric FeatureNoARM, 7040b57cec5SDimitry Andric ModeThumb, 7050b57cec5SDimitry Andric FeatureDB, 7060b57cec5SDimitry Andric FeatureHWDivThumb, 7070b57cec5SDimitry Andric FeatureMClass, 7080b57cec5SDimitry Andric FeatureDSP]>; 7090b57cec5SDimitry Andric 7100b57cec5SDimitry Andricdef ARMv8a : Architecture<"armv8-a", "ARMv8a", [HasV8Ops, 7110b57cec5SDimitry Andric FeatureAClass, 7120b57cec5SDimitry Andric FeatureDB, 7130b57cec5SDimitry Andric FeatureFPARMv8, 7140b57cec5SDimitry Andric FeatureNEON, 7150b57cec5SDimitry Andric FeatureDSP, 7160b57cec5SDimitry Andric FeatureTrustZone, 7170b57cec5SDimitry Andric FeatureMP, 7180b57cec5SDimitry Andric FeatureVirtualization, 7190b57cec5SDimitry Andric FeatureCrypto, 7200b57cec5SDimitry Andric FeatureCRC]>; 7210b57cec5SDimitry Andric 7220b57cec5SDimitry Andricdef ARMv81a : Architecture<"armv8.1-a", "ARMv81a", [HasV8_1aOps, 7230b57cec5SDimitry Andric FeatureAClass, 7240b57cec5SDimitry Andric FeatureDB, 7250b57cec5SDimitry Andric FeatureFPARMv8, 7260b57cec5SDimitry Andric FeatureNEON, 7270b57cec5SDimitry Andric FeatureDSP, 7280b57cec5SDimitry Andric FeatureTrustZone, 7290b57cec5SDimitry Andric FeatureMP, 7300b57cec5SDimitry Andric FeatureVirtualization, 7310b57cec5SDimitry Andric FeatureCrypto, 7320b57cec5SDimitry Andric FeatureCRC]>; 7330b57cec5SDimitry Andric 7340b57cec5SDimitry Andricdef ARMv82a : Architecture<"armv8.2-a", "ARMv82a", [HasV8_2aOps, 7350b57cec5SDimitry Andric FeatureAClass, 7360b57cec5SDimitry Andric FeatureDB, 7370b57cec5SDimitry Andric FeatureFPARMv8, 7380b57cec5SDimitry Andric FeatureNEON, 7390b57cec5SDimitry Andric FeatureDSP, 7400b57cec5SDimitry Andric FeatureTrustZone, 7410b57cec5SDimitry Andric FeatureMP, 7420b57cec5SDimitry Andric FeatureVirtualization, 7430b57cec5SDimitry Andric FeatureCrypto, 7440b57cec5SDimitry Andric FeatureCRC, 7450b57cec5SDimitry Andric FeatureRAS]>; 7460b57cec5SDimitry Andric 7470b57cec5SDimitry Andricdef ARMv83a : Architecture<"armv8.3-a", "ARMv83a", [HasV8_3aOps, 7480b57cec5SDimitry Andric FeatureAClass, 7490b57cec5SDimitry Andric FeatureDB, 7500b57cec5SDimitry Andric FeatureFPARMv8, 7510b57cec5SDimitry Andric FeatureNEON, 7520b57cec5SDimitry Andric FeatureDSP, 7530b57cec5SDimitry Andric FeatureTrustZone, 7540b57cec5SDimitry Andric FeatureMP, 7550b57cec5SDimitry Andric FeatureVirtualization, 7560b57cec5SDimitry Andric FeatureCrypto, 7570b57cec5SDimitry Andric FeatureCRC, 7580b57cec5SDimitry Andric FeatureRAS]>; 7590b57cec5SDimitry Andric 7600b57cec5SDimitry Andricdef ARMv84a : Architecture<"armv8.4-a", "ARMv84a", [HasV8_4aOps, 7610b57cec5SDimitry Andric FeatureAClass, 7620b57cec5SDimitry Andric FeatureDB, 7630b57cec5SDimitry Andric FeatureFPARMv8, 7640b57cec5SDimitry Andric FeatureNEON, 7650b57cec5SDimitry Andric FeatureDSP, 7660b57cec5SDimitry Andric FeatureTrustZone, 7670b57cec5SDimitry Andric FeatureMP, 7680b57cec5SDimitry Andric FeatureVirtualization, 7690b57cec5SDimitry Andric FeatureCrypto, 7700b57cec5SDimitry Andric FeatureCRC, 7710b57cec5SDimitry Andric FeatureRAS, 7720b57cec5SDimitry Andric FeatureDotProd]>; 7730b57cec5SDimitry Andric 7740b57cec5SDimitry Andricdef ARMv85a : Architecture<"armv8.5-a", "ARMv85a", [HasV8_5aOps, 7750b57cec5SDimitry Andric FeatureAClass, 7760b57cec5SDimitry Andric FeatureDB, 7770b57cec5SDimitry Andric FeatureFPARMv8, 7780b57cec5SDimitry Andric FeatureNEON, 7790b57cec5SDimitry Andric FeatureDSP, 7800b57cec5SDimitry Andric FeatureTrustZone, 7810b57cec5SDimitry Andric FeatureMP, 7820b57cec5SDimitry Andric FeatureVirtualization, 7830b57cec5SDimitry Andric FeatureCrypto, 7840b57cec5SDimitry Andric FeatureCRC, 7850b57cec5SDimitry Andric FeatureRAS, 7860b57cec5SDimitry Andric FeatureDotProd]>; 7870b57cec5SDimitry Andric 7880b57cec5SDimitry Andricdef ARMv8r : Architecture<"armv8-r", "ARMv8r", [HasV8Ops, 7890b57cec5SDimitry Andric FeatureRClass, 7900b57cec5SDimitry Andric FeatureDB, 7910b57cec5SDimitry Andric FeatureDFB, 7920b57cec5SDimitry Andric FeatureDSP, 7930b57cec5SDimitry Andric FeatureCRC, 7940b57cec5SDimitry Andric FeatureMP, 7950b57cec5SDimitry Andric FeatureVirtualization, 7960b57cec5SDimitry Andric FeatureFPARMv8, 7970b57cec5SDimitry Andric FeatureNEON]>; 7980b57cec5SDimitry Andric 7990b57cec5SDimitry Andricdef ARMv8mBaseline : Architecture<"armv8-m.base", "ARMv8mBaseline", 8000b57cec5SDimitry Andric [HasV8MBaselineOps, 8010b57cec5SDimitry Andric FeatureNoARM, 8020b57cec5SDimitry Andric ModeThumb, 8030b57cec5SDimitry Andric FeatureDB, 8040b57cec5SDimitry Andric FeatureHWDivThumb, 8050b57cec5SDimitry Andric FeatureV7Clrex, 8060b57cec5SDimitry Andric Feature8MSecExt, 8070b57cec5SDimitry Andric FeatureAcquireRelease, 8080b57cec5SDimitry Andric FeatureMClass, 8090b57cec5SDimitry Andric FeatureStrictAlign]>; 8100b57cec5SDimitry Andric 8110b57cec5SDimitry Andricdef ARMv8mMainline : Architecture<"armv8-m.main", "ARMv8mMainline", 8120b57cec5SDimitry Andric [HasV8MMainlineOps, 8130b57cec5SDimitry Andric FeatureNoARM, 8140b57cec5SDimitry Andric ModeThumb, 8150b57cec5SDimitry Andric FeatureDB, 8160b57cec5SDimitry Andric FeatureHWDivThumb, 8170b57cec5SDimitry Andric Feature8MSecExt, 8180b57cec5SDimitry Andric FeatureAcquireRelease, 8190b57cec5SDimitry Andric FeatureMClass]>; 8200b57cec5SDimitry Andric 8210b57cec5SDimitry Andricdef ARMv81mMainline : Architecture<"armv8.1-m.main", "ARMv81mMainline", 8220b57cec5SDimitry Andric [HasV8_1MMainlineOps, 8230b57cec5SDimitry Andric FeatureNoARM, 8240b57cec5SDimitry Andric ModeThumb, 8250b57cec5SDimitry Andric FeatureDB, 8260b57cec5SDimitry Andric FeatureHWDivThumb, 8270b57cec5SDimitry Andric Feature8MSecExt, 8280b57cec5SDimitry Andric FeatureAcquireRelease, 8290b57cec5SDimitry Andric FeatureMClass, 8300b57cec5SDimitry Andric FeatureRAS, 8310b57cec5SDimitry Andric FeatureLOB]>; 8320b57cec5SDimitry Andric 8330b57cec5SDimitry Andric// Aliases 8340b57cec5SDimitry Andricdef IWMMXT : Architecture<"iwmmxt", "ARMv5te", [ARMv5te]>; 8350b57cec5SDimitry Andricdef IWMMXT2 : Architecture<"iwmmxt2", "ARMv5te", [ARMv5te]>; 8360b57cec5SDimitry Andricdef XScale : Architecture<"xscale", "ARMv5te", [ARMv5te]>; 8370b57cec5SDimitry Andricdef ARMv6j : Architecture<"armv6j", "ARMv7a", [ARMv6]>; 8380b57cec5SDimitry Andricdef ARMv7k : Architecture<"armv7k", "ARMv7a", [ARMv7a]>; 8390b57cec5SDimitry Andricdef ARMv7s : Architecture<"armv7s", "ARMv7a", [ARMv7a]>; 8400b57cec5SDimitry Andric 8410b57cec5SDimitry Andric 8420b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 8430b57cec5SDimitry Andric// ARM schedules. 8440b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 8450b57cec5SDimitry Andric// 8460b57cec5SDimitry Andricinclude "ARMPredicates.td" 8470b57cec5SDimitry Andricinclude "ARMSchedule.td" 8480b57cec5SDimitry Andric 8490b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 8500b57cec5SDimitry Andric// ARM processors 8510b57cec5SDimitry Andric// 8520b57cec5SDimitry Andric 8530b57cec5SDimitry Andric// Dummy CPU, used to target architectures 8540b57cec5SDimitry Andricdef : ProcessorModel<"generic", CortexA8Model, []>; 8550b57cec5SDimitry Andric 8560b57cec5SDimitry Andric// FIXME: Several processors below are not using their own scheduler 8570b57cec5SDimitry Andric// model, but one of similar/previous processor. These should be fixed. 8580b57cec5SDimitry Andric 8590b57cec5SDimitry Andricdef : ProcNoItin<"arm8", [ARMv4]>; 8600b57cec5SDimitry Andricdef : ProcNoItin<"arm810", [ARMv4]>; 8610b57cec5SDimitry Andricdef : ProcNoItin<"strongarm", [ARMv4]>; 8620b57cec5SDimitry Andricdef : ProcNoItin<"strongarm110", [ARMv4]>; 8630b57cec5SDimitry Andricdef : ProcNoItin<"strongarm1100", [ARMv4]>; 8640b57cec5SDimitry Andricdef : ProcNoItin<"strongarm1110", [ARMv4]>; 8650b57cec5SDimitry Andric 8660b57cec5SDimitry Andricdef : ProcNoItin<"arm7tdmi", [ARMv4t]>; 8670b57cec5SDimitry Andricdef : ProcNoItin<"arm7tdmi-s", [ARMv4t]>; 8680b57cec5SDimitry Andricdef : ProcNoItin<"arm710t", [ARMv4t]>; 8690b57cec5SDimitry Andricdef : ProcNoItin<"arm720t", [ARMv4t]>; 8700b57cec5SDimitry Andricdef : ProcNoItin<"arm9", [ARMv4t]>; 8710b57cec5SDimitry Andricdef : ProcNoItin<"arm9tdmi", [ARMv4t]>; 8720b57cec5SDimitry Andricdef : ProcNoItin<"arm920", [ARMv4t]>; 8730b57cec5SDimitry Andricdef : ProcNoItin<"arm920t", [ARMv4t]>; 8740b57cec5SDimitry Andricdef : ProcNoItin<"arm922t", [ARMv4t]>; 8750b57cec5SDimitry Andricdef : ProcNoItin<"arm940t", [ARMv4t]>; 8760b57cec5SDimitry Andricdef : ProcNoItin<"ep9312", [ARMv4t]>; 8770b57cec5SDimitry Andric 8780b57cec5SDimitry Andricdef : ProcNoItin<"arm10tdmi", [ARMv5t]>; 8790b57cec5SDimitry Andricdef : ProcNoItin<"arm1020t", [ARMv5t]>; 8800b57cec5SDimitry Andric 8810b57cec5SDimitry Andricdef : ProcNoItin<"arm9e", [ARMv5te]>; 8820b57cec5SDimitry Andricdef : ProcNoItin<"arm926ej-s", [ARMv5te]>; 8830b57cec5SDimitry Andricdef : ProcNoItin<"arm946e-s", [ARMv5te]>; 8840b57cec5SDimitry Andricdef : ProcNoItin<"arm966e-s", [ARMv5te]>; 8850b57cec5SDimitry Andricdef : ProcNoItin<"arm968e-s", [ARMv5te]>; 8860b57cec5SDimitry Andricdef : ProcNoItin<"arm10e", [ARMv5te]>; 8870b57cec5SDimitry Andricdef : ProcNoItin<"arm1020e", [ARMv5te]>; 8880b57cec5SDimitry Andricdef : ProcNoItin<"arm1022e", [ARMv5te]>; 8890b57cec5SDimitry Andricdef : ProcNoItin<"xscale", [ARMv5te]>; 8900b57cec5SDimitry Andricdef : ProcNoItin<"iwmmxt", [ARMv5te]>; 8910b57cec5SDimitry Andric 8920b57cec5SDimitry Andricdef : Processor<"arm1136j-s", ARMV6Itineraries, [ARMv6]>; 8930b57cec5SDimitry Andricdef : Processor<"arm1136jf-s", ARMV6Itineraries, [ARMv6, 8940b57cec5SDimitry Andric FeatureVFP2, 8950b57cec5SDimitry Andric FeatureHasSlowFPVMLx]>; 8960b57cec5SDimitry Andric 8970b57cec5SDimitry Andricdef : Processor<"cortex-m0", ARMV6Itineraries, [ARMv6m]>; 8980b57cec5SDimitry Andricdef : Processor<"cortex-m0plus", ARMV6Itineraries, [ARMv6m]>; 8990b57cec5SDimitry Andricdef : Processor<"cortex-m1", ARMV6Itineraries, [ARMv6m]>; 9000b57cec5SDimitry Andricdef : Processor<"sc000", ARMV6Itineraries, [ARMv6m]>; 9010b57cec5SDimitry Andric 9020b57cec5SDimitry Andricdef : Processor<"arm1176j-s", ARMV6Itineraries, [ARMv6kz]>; 9030b57cec5SDimitry Andricdef : Processor<"arm1176jz-s", ARMV6Itineraries, [ARMv6kz]>; 9040b57cec5SDimitry Andricdef : Processor<"arm1176jzf-s", ARMV6Itineraries, [ARMv6kz, 9050b57cec5SDimitry Andric FeatureVFP2, 9060b57cec5SDimitry Andric FeatureHasSlowFPVMLx]>; 9070b57cec5SDimitry Andric 9080b57cec5SDimitry Andricdef : Processor<"mpcorenovfp", ARMV6Itineraries, [ARMv6k]>; 9090b57cec5SDimitry Andricdef : Processor<"mpcore", ARMV6Itineraries, [ARMv6k, 9100b57cec5SDimitry Andric FeatureVFP2, 9110b57cec5SDimitry Andric FeatureHasSlowFPVMLx]>; 9120b57cec5SDimitry Andric 9130b57cec5SDimitry Andricdef : Processor<"arm1156t2-s", ARMV6Itineraries, [ARMv6t2]>; 9140b57cec5SDimitry Andricdef : Processor<"arm1156t2f-s", ARMV6Itineraries, [ARMv6t2, 9150b57cec5SDimitry Andric FeatureVFP2, 9160b57cec5SDimitry Andric FeatureHasSlowFPVMLx]>; 9170b57cec5SDimitry Andric 9180b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a5", CortexA8Model, [ARMv7a, ProcA5, 9190b57cec5SDimitry Andric FeatureHasRetAddrStack, 9200b57cec5SDimitry Andric FeatureTrustZone, 9210b57cec5SDimitry Andric FeatureSlowFPBrcc, 9220b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 9230b57cec5SDimitry Andric FeatureVMLxForwarding, 9240b57cec5SDimitry Andric FeatureMP, 9250b57cec5SDimitry Andric FeatureVFP4]>; 9260b57cec5SDimitry Andric 9270b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a7", CortexA8Model, [ARMv7a, ProcA7, 9280b57cec5SDimitry Andric FeatureHasRetAddrStack, 9290b57cec5SDimitry Andric FeatureTrustZone, 9300b57cec5SDimitry Andric FeatureSlowFPBrcc, 9310b57cec5SDimitry Andric FeatureHasVMLxHazards, 9320b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 9330b57cec5SDimitry Andric FeatureVMLxForwarding, 9340b57cec5SDimitry Andric FeatureMP, 9350b57cec5SDimitry Andric FeatureVFP4, 9360b57cec5SDimitry Andric FeatureVirtualization]>; 9370b57cec5SDimitry Andric 9380b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a8", CortexA8Model, [ARMv7a, ProcA8, 9390b57cec5SDimitry Andric FeatureHasRetAddrStack, 9400b57cec5SDimitry Andric FeatureNonpipelinedVFP, 9410b57cec5SDimitry Andric FeatureTrustZone, 9420b57cec5SDimitry Andric FeatureSlowFPBrcc, 9430b57cec5SDimitry Andric FeatureHasVMLxHazards, 9440b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 9450b57cec5SDimitry Andric FeatureVMLxForwarding]>; 9460b57cec5SDimitry Andric 9470b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a9", CortexA9Model, [ARMv7a, ProcA9, 9480b57cec5SDimitry Andric FeatureHasRetAddrStack, 9490b57cec5SDimitry Andric FeatureTrustZone, 9500b57cec5SDimitry Andric FeatureHasVMLxHazards, 9510b57cec5SDimitry Andric FeatureVMLxForwarding, 9520b57cec5SDimitry Andric FeatureFP16, 9530b57cec5SDimitry Andric FeatureAvoidPartialCPSR, 9540b57cec5SDimitry Andric FeatureExpandMLx, 9550b57cec5SDimitry Andric FeaturePreferVMOVSR, 9560b57cec5SDimitry Andric FeatureMuxedUnits, 9570b57cec5SDimitry Andric FeatureNEONForFPMovs, 9580b57cec5SDimitry Andric FeatureCheckVLDnAlign, 9590b57cec5SDimitry Andric FeatureMP]>; 9600b57cec5SDimitry Andric 9610b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a12", CortexA9Model, [ARMv7a, ProcA12, 9620b57cec5SDimitry Andric FeatureHasRetAddrStack, 9630b57cec5SDimitry Andric FeatureTrustZone, 9640b57cec5SDimitry Andric FeatureVMLxForwarding, 9650b57cec5SDimitry Andric FeatureVFP4, 9660b57cec5SDimitry Andric FeatureAvoidPartialCPSR, 9670b57cec5SDimitry Andric FeatureVirtualization, 9680b57cec5SDimitry Andric FeatureMP]>; 9690b57cec5SDimitry Andric 9700b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a15", CortexA9Model, [ARMv7a, ProcA15, 9710b57cec5SDimitry Andric FeatureDontWidenVMOVS, 9720b57cec5SDimitry Andric FeatureSplatVFPToNeon, 9730b57cec5SDimitry Andric FeatureHasRetAddrStack, 9740b57cec5SDimitry Andric FeatureMuxedUnits, 9750b57cec5SDimitry Andric FeatureTrustZone, 9760b57cec5SDimitry Andric FeatureVFP4, 9770b57cec5SDimitry Andric FeatureMP, 9780b57cec5SDimitry Andric FeatureCheckVLDnAlign, 9790b57cec5SDimitry Andric FeatureAvoidPartialCPSR, 9800b57cec5SDimitry Andric FeatureVirtualization]>; 9810b57cec5SDimitry Andric 9820b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a17", CortexA9Model, [ARMv7a, ProcA17, 9830b57cec5SDimitry Andric FeatureHasRetAddrStack, 9840b57cec5SDimitry Andric FeatureTrustZone, 9850b57cec5SDimitry Andric FeatureMP, 9860b57cec5SDimitry Andric FeatureVMLxForwarding, 9870b57cec5SDimitry Andric FeatureVFP4, 9880b57cec5SDimitry Andric FeatureAvoidPartialCPSR, 9890b57cec5SDimitry Andric FeatureVirtualization]>; 9900b57cec5SDimitry Andric 9910b57cec5SDimitry Andric// FIXME: krait has currently the same features as A9 plus VFP4 and HWDiv 9920b57cec5SDimitry Andricdef : ProcessorModel<"krait", CortexA9Model, [ARMv7a, ProcKrait, 9930b57cec5SDimitry Andric FeatureHasRetAddrStack, 9940b57cec5SDimitry Andric FeatureMuxedUnits, 9950b57cec5SDimitry Andric FeatureCheckVLDnAlign, 9960b57cec5SDimitry Andric FeatureVMLxForwarding, 9970b57cec5SDimitry Andric FeatureFP16, 9980b57cec5SDimitry Andric FeatureAvoidPartialCPSR, 9990b57cec5SDimitry Andric FeatureVFP4, 10000b57cec5SDimitry Andric FeatureHWDivThumb, 10010b57cec5SDimitry Andric FeatureHWDivARM]>; 10020b57cec5SDimitry Andric 10030b57cec5SDimitry Andricdef : ProcessorModel<"swift", SwiftModel, [ARMv7a, ProcSwift, 10040b57cec5SDimitry Andric FeatureHasRetAddrStack, 10050b57cec5SDimitry Andric FeatureNEONForFP, 10060b57cec5SDimitry Andric FeatureVFP4, 10070b57cec5SDimitry Andric FeatureUseWideStrideVFP, 10080b57cec5SDimitry Andric FeatureMP, 10090b57cec5SDimitry Andric FeatureHWDivThumb, 10100b57cec5SDimitry Andric FeatureHWDivARM, 10110b57cec5SDimitry Andric FeatureAvoidPartialCPSR, 10120b57cec5SDimitry Andric FeatureAvoidMOVsShOp, 10130b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 10140b57cec5SDimitry Andric FeatureHasVMLxHazards, 10150b57cec5SDimitry Andric FeatureProfUnpredicate, 10160b57cec5SDimitry Andric FeaturePrefISHSTBarrier, 10170b57cec5SDimitry Andric FeatureSlowOddRegister, 10180b57cec5SDimitry Andric FeatureSlowLoadDSubreg, 10190b57cec5SDimitry Andric FeatureSlowVGETLNi32, 10200b57cec5SDimitry Andric FeatureSlowVDUP32, 10210b57cec5SDimitry Andric FeatureUseMISched, 10220b57cec5SDimitry Andric FeatureNoPostRASched]>; 10230b57cec5SDimitry Andric 10240b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r4", CortexA8Model, [ARMv7r, ProcR4, 10250b57cec5SDimitry Andric FeatureHasRetAddrStack, 10260b57cec5SDimitry Andric FeatureAvoidPartialCPSR]>; 10270b57cec5SDimitry Andric 10280b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r4f", CortexA8Model, [ARMv7r, ProcR4, 10290b57cec5SDimitry Andric FeatureHasRetAddrStack, 10300b57cec5SDimitry Andric FeatureSlowFPBrcc, 10310b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 10320b57cec5SDimitry Andric FeatureVFP3_D16, 10330b57cec5SDimitry Andric FeatureAvoidPartialCPSR]>; 10340b57cec5SDimitry Andric 10350b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r5", CortexA8Model, [ARMv7r, ProcR5, 10360b57cec5SDimitry Andric FeatureHasRetAddrStack, 10370b57cec5SDimitry Andric FeatureVFP3_D16, 10380b57cec5SDimitry Andric FeatureSlowFPBrcc, 10390b57cec5SDimitry Andric FeatureHWDivARM, 10400b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 10410b57cec5SDimitry Andric FeatureAvoidPartialCPSR]>; 10420b57cec5SDimitry Andric 10430b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r7", CortexA8Model, [ARMv7r, ProcR7, 10440b57cec5SDimitry Andric FeatureHasRetAddrStack, 10450b57cec5SDimitry Andric FeatureVFP3_D16, 10460b57cec5SDimitry Andric FeatureFP16, 10470b57cec5SDimitry Andric FeatureMP, 10480b57cec5SDimitry Andric FeatureSlowFPBrcc, 10490b57cec5SDimitry Andric FeatureHWDivARM, 10500b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 10510b57cec5SDimitry Andric FeatureAvoidPartialCPSR]>; 10520b57cec5SDimitry Andric 10530b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r8", CortexA8Model, [ARMv7r, 10540b57cec5SDimitry Andric FeatureHasRetAddrStack, 10550b57cec5SDimitry Andric FeatureVFP3_D16, 10560b57cec5SDimitry Andric FeatureFP16, 10570b57cec5SDimitry Andric FeatureMP, 10580b57cec5SDimitry Andric FeatureSlowFPBrcc, 10590b57cec5SDimitry Andric FeatureHWDivARM, 10600b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 10610b57cec5SDimitry Andric FeatureAvoidPartialCPSR]>; 10620b57cec5SDimitry Andric 10630b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m3", CortexM4Model, [ARMv7m, 10640b57cec5SDimitry Andric ProcM3, 10650b57cec5SDimitry Andric FeaturePrefLoopAlign32, 10660b57cec5SDimitry Andric FeatureUseMISched, 10670b57cec5SDimitry Andric FeatureUseAA, 10680b57cec5SDimitry Andric FeatureHasNoBranchPredictor]>; 10690b57cec5SDimitry Andric 10700b57cec5SDimitry Andricdef : ProcessorModel<"sc300", CortexM4Model, [ARMv7m, 10710b57cec5SDimitry Andric ProcM3, 10720b57cec5SDimitry Andric FeatureUseMISched, 10730b57cec5SDimitry Andric FeatureUseAA, 10740b57cec5SDimitry Andric FeatureHasNoBranchPredictor]>; 10750b57cec5SDimitry Andric 10760b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m4", CortexM4Model, [ARMv7em, 10770b57cec5SDimitry Andric FeatureVFP4_D16_SP, 10780b57cec5SDimitry Andric FeaturePrefLoopAlign32, 10790b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 10800b57cec5SDimitry Andric FeatureUseMISched, 10810b57cec5SDimitry Andric FeatureUseAA, 10820b57cec5SDimitry Andric FeatureHasNoBranchPredictor]>; 10830b57cec5SDimitry Andric 10840b57cec5SDimitry Andricdef : ProcNoItin<"cortex-m7", [ARMv7em, 10850b57cec5SDimitry Andric FeatureFPARMv8_D16]>; 10860b57cec5SDimitry Andric 10870b57cec5SDimitry Andricdef : ProcNoItin<"cortex-m23", [ARMv8mBaseline, 10880b57cec5SDimitry Andric FeatureNoMovt]>; 10890b57cec5SDimitry Andric 10900b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m33", CortexM4Model, [ARMv8mMainline, 10910b57cec5SDimitry Andric FeatureDSP, 10920b57cec5SDimitry Andric FeatureFPARMv8_D16_SP, 10930b57cec5SDimitry Andric FeaturePrefLoopAlign32, 10940b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 10950b57cec5SDimitry Andric FeatureUseMISched, 10960b57cec5SDimitry Andric FeatureUseAA, 10970b57cec5SDimitry Andric FeatureHasNoBranchPredictor]>; 10980b57cec5SDimitry Andric 10990b57cec5SDimitry Andricdef : ProcessorModel<"cortex-m35p", CortexM4Model, [ARMv8mMainline, 11000b57cec5SDimitry Andric FeatureDSP, 11010b57cec5SDimitry Andric FeatureFPARMv8_D16_SP, 11020b57cec5SDimitry Andric FeaturePrefLoopAlign32, 11030b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 11040b57cec5SDimitry Andric FeatureUseMISched, 11050b57cec5SDimitry Andric FeatureUseAA, 11060b57cec5SDimitry Andric FeatureHasNoBranchPredictor]>; 11070b57cec5SDimitry Andric 11080b57cec5SDimitry Andric 11090b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a32", [ARMv8a, 11100b57cec5SDimitry Andric FeatureHWDivThumb, 11110b57cec5SDimitry Andric FeatureHWDivARM, 11120b57cec5SDimitry Andric FeatureCrypto, 11130b57cec5SDimitry Andric FeatureCRC]>; 11140b57cec5SDimitry Andric 11150b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a35", [ARMv8a, ProcA35, 11160b57cec5SDimitry Andric FeatureHWDivThumb, 11170b57cec5SDimitry Andric FeatureHWDivARM, 11180b57cec5SDimitry Andric FeatureCrypto, 11190b57cec5SDimitry Andric FeatureCRC]>; 11200b57cec5SDimitry Andric 11210b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a53", [ARMv8a, ProcA53, 11220b57cec5SDimitry Andric FeatureHWDivThumb, 11230b57cec5SDimitry Andric FeatureHWDivARM, 11240b57cec5SDimitry Andric FeatureCrypto, 11250b57cec5SDimitry Andric FeatureCRC, 11260b57cec5SDimitry Andric FeatureFPAO]>; 11270b57cec5SDimitry Andric 11280b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a55", [ARMv82a, ProcA55, 11290b57cec5SDimitry Andric FeatureHWDivThumb, 11300b57cec5SDimitry Andric FeatureHWDivARM, 11310b57cec5SDimitry Andric FeatureDotProd]>; 11320b57cec5SDimitry Andric 11330b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a57", CortexA57Model, [ARMv8a, ProcA57, 11340b57cec5SDimitry Andric FeatureHWDivThumb, 11350b57cec5SDimitry Andric FeatureHWDivARM, 11360b57cec5SDimitry Andric FeatureCrypto, 11370b57cec5SDimitry Andric FeatureCRC, 11380b57cec5SDimitry Andric FeatureFPAO, 11390b57cec5SDimitry Andric FeatureAvoidPartialCPSR, 11400b57cec5SDimitry Andric FeatureCheapPredicableCPSR]>; 11410b57cec5SDimitry Andric 11420b57cec5SDimitry Andricdef : ProcessorModel<"cortex-a72", CortexA57Model, [ARMv8a, ProcA72, 11430b57cec5SDimitry Andric FeatureHWDivThumb, 11440b57cec5SDimitry Andric FeatureHWDivARM, 11450b57cec5SDimitry Andric FeatureCrypto, 11460b57cec5SDimitry Andric FeatureCRC]>; 11470b57cec5SDimitry Andric 11480b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a73", [ARMv8a, ProcA73, 11490b57cec5SDimitry Andric FeatureHWDivThumb, 11500b57cec5SDimitry Andric FeatureHWDivARM, 11510b57cec5SDimitry Andric FeatureCrypto, 11520b57cec5SDimitry Andric FeatureCRC]>; 11530b57cec5SDimitry Andric 11540b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a75", [ARMv82a, ProcA75, 11550b57cec5SDimitry Andric FeatureHWDivThumb, 11560b57cec5SDimitry Andric FeatureHWDivARM, 11570b57cec5SDimitry Andric FeatureDotProd]>; 11580b57cec5SDimitry Andric 11590b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a76", [ARMv82a, ProcA76, 11600b57cec5SDimitry Andric FeatureHWDivThumb, 11610b57cec5SDimitry Andric FeatureHWDivARM, 11620b57cec5SDimitry Andric FeatureCrypto, 11630b57cec5SDimitry Andric FeatureCRC, 11640b57cec5SDimitry Andric FeatureFullFP16, 11650b57cec5SDimitry Andric FeatureDotProd]>; 11660b57cec5SDimitry Andric 11670b57cec5SDimitry Andricdef : ProcNoItin<"cortex-a76ae", [ARMv82a, ProcA76, 11680b57cec5SDimitry Andric FeatureHWDivThumb, 11690b57cec5SDimitry Andric FeatureHWDivARM, 11700b57cec5SDimitry Andric FeatureCrypto, 11710b57cec5SDimitry Andric FeatureCRC, 11720b57cec5SDimitry Andric FeatureFullFP16, 11730b57cec5SDimitry Andric FeatureDotProd]>; 11740b57cec5SDimitry Andric 11750b57cec5SDimitry Andricdef : ProcessorModel<"cyclone", SwiftModel, [ARMv8a, ProcSwift, 11760b57cec5SDimitry Andric FeatureHasRetAddrStack, 11770b57cec5SDimitry Andric FeatureNEONForFP, 11780b57cec5SDimitry Andric FeatureVFP4, 11790b57cec5SDimitry Andric FeatureMP, 11800b57cec5SDimitry Andric FeatureHWDivThumb, 11810b57cec5SDimitry Andric FeatureHWDivARM, 11820b57cec5SDimitry Andric FeatureAvoidPartialCPSR, 11830b57cec5SDimitry Andric FeatureAvoidMOVsShOp, 11840b57cec5SDimitry Andric FeatureHasSlowFPVMLx, 11850b57cec5SDimitry Andric FeatureCrypto, 11860b57cec5SDimitry Andric FeatureUseMISched, 11870b57cec5SDimitry Andric FeatureZCZeroing, 11880b57cec5SDimitry Andric FeatureNoPostRASched]>; 11890b57cec5SDimitry Andric 11900b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m1", [ARMv8a, ProcExynos]>; 11910b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m2", [ARMv8a, ProcExynos]>; 11920b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m3", [ARMv8a, ProcExynos]>; 11930b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m4", [ARMv82a, ProcExynos, 11940b57cec5SDimitry Andric FeatureFullFP16, 11950b57cec5SDimitry Andric FeatureDotProd]>; 11960b57cec5SDimitry Andricdef : ProcNoItin<"exynos-m5", [ARMv82a, ProcExynos, 11970b57cec5SDimitry Andric FeatureFullFP16, 11980b57cec5SDimitry Andric FeatureDotProd]>; 11990b57cec5SDimitry Andric 12000b57cec5SDimitry Andricdef : ProcNoItin<"kryo", [ARMv8a, ProcKryo, 12010b57cec5SDimitry Andric FeatureHWDivThumb, 12020b57cec5SDimitry Andric FeatureHWDivARM, 12030b57cec5SDimitry Andric FeatureCrypto, 12040b57cec5SDimitry Andric FeatureCRC]>; 12050b57cec5SDimitry Andric 12060b57cec5SDimitry Andricdef : ProcessorModel<"cortex-r52", CortexR52Model, [ARMv8r, ProcR52, 12070b57cec5SDimitry Andric FeatureUseMISched, 12080b57cec5SDimitry Andric FeatureFPAO, 12090b57cec5SDimitry Andric FeatureUseAA]>; 12100b57cec5SDimitry Andric 12110b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12120b57cec5SDimitry Andric// Register File Description 12130b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12140b57cec5SDimitry Andric 12150b57cec5SDimitry Andricinclude "ARMRegisterInfo.td" 12160b57cec5SDimitry Andricinclude "ARMRegisterBanks.td" 12170b57cec5SDimitry Andricinclude "ARMCallingConv.td" 12180b57cec5SDimitry Andric 12190b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12200b57cec5SDimitry Andric// Instruction Descriptions 12210b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12220b57cec5SDimitry Andric 12230b57cec5SDimitry Andricinclude "ARMInstrInfo.td" 12240b57cec5SDimitry Andricdef ARMInstrInfo : InstrInfo; 12250b57cec5SDimitry Andric 12260b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12270b57cec5SDimitry Andric// Declare the target which we are implementing 12280b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 12290b57cec5SDimitry Andric 12300b57cec5SDimitry Andricdef ARMAsmWriter : AsmWriter { 12310b57cec5SDimitry Andric string AsmWriterClassName = "InstPrinter"; 12320b57cec5SDimitry Andric int PassSubtarget = 1; 12330b57cec5SDimitry Andric int Variant = 0; 12340b57cec5SDimitry Andric bit isMCAsmWriter = 1; 12350b57cec5SDimitry Andric} 12360b57cec5SDimitry Andric 12370b57cec5SDimitry Andricdef ARMAsmParser : AsmParser { 12380b57cec5SDimitry Andric bit ReportMultipleNearMisses = 1; 12390b57cec5SDimitry Andric} 12400b57cec5SDimitry Andric 12410b57cec5SDimitry Andricdef ARMAsmParserVariant : AsmParserVariant { 12420b57cec5SDimitry Andric int Variant = 0; 12430b57cec5SDimitry Andric string Name = "ARM"; 12440b57cec5SDimitry Andric string BreakCharacters = "."; 12450b57cec5SDimitry Andric} 12460b57cec5SDimitry Andric 12470b57cec5SDimitry Andricdef ARM : Target { 12480b57cec5SDimitry Andric // Pull in Instruction Info. 12490b57cec5SDimitry Andric let InstructionSet = ARMInstrInfo; 12500b57cec5SDimitry Andric let AssemblyWriters = [ARMAsmWriter]; 12510b57cec5SDimitry Andric let AssemblyParsers = [ARMAsmParser]; 12520b57cec5SDimitry Andric let AssemblyParserVariants = [ARMAsmParserVariant]; 12530b57cec5SDimitry Andric let AllowRegisterRenaming = 1; 12540b57cec5SDimitry Andric} 1255