10b57cec5SDimitry Andric//=- AArch64.td - Describe the AArch64 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//===----------------------------------------------------------------------===// 19*0fca6ea1SDimitry Andric// Subtarget features. 200b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 21*0fca6ea1SDimitry Andricinclude "AArch64Features.td" 22*0fca6ea1SDimitry Andricinclude "AArch64FMV.td" 23e8d8bef9SDimitry Andric 240b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 250b57cec5SDimitry Andric// Register File Description 260b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 270b57cec5SDimitry Andric 280b57cec5SDimitry Andricinclude "AArch64RegisterInfo.td" 290b57cec5SDimitry Andricinclude "AArch64RegisterBanks.td" 300b57cec5SDimitry Andricinclude "AArch64CallingConvention.td" 310b57cec5SDimitry Andric 320b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 330b57cec5SDimitry Andric// Instruction Descriptions 340b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 350b57cec5SDimitry Andric 360b57cec5SDimitry Andricinclude "AArch64Schedule.td" 370b57cec5SDimitry Andricinclude "AArch64InstrInfo.td" 380b57cec5SDimitry Andricinclude "AArch64SchedPredicates.td" 390b57cec5SDimitry Andricinclude "AArch64SchedPredExynos.td" 4006c3fb27SDimitry Andricinclude "AArch64SchedPredNeoverse.td" 418bcb0991SDimitry Andricinclude "AArch64Combine.td" 420b57cec5SDimitry Andric 430b57cec5SDimitry Andricdef AArch64InstrInfo : InstrInfo; 440b57cec5SDimitry Andric 450b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 460b57cec5SDimitry Andric// Named operands for MRS/MSR/TLBI/... 470b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 480b57cec5SDimitry Andric 490b57cec5SDimitry Andricinclude "AArch64SystemOperands.td" 500b57cec5SDimitry Andric 510b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 520b57cec5SDimitry Andric// AArch64 Processors supported. 530b57cec5SDimitry Andric// 540b57cec5SDimitry Andric 550b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 560b57cec5SDimitry Andric// Unsupported features to disable for scheduling models 570b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 580b57cec5SDimitry Andric 590b57cec5SDimitry Andricclass AArch64Unsupported { list<Predicate> F; } 600b57cec5SDimitry Andric 6106c3fb27SDimitry Andriclet F = [HasSVE2p1, HasSVE2p1_or_HasSME2, HasSVE2p1_or_HasSME2p1] in 6206c3fb27SDimitry Andricdef SVE2p1Unsupported : AArch64Unsupported; 6306c3fb27SDimitry Andric 6406c3fb27SDimitry Andricdef SVE2Unsupported : AArch64Unsupported { 65cb14a3feSDimitry Andric let F = !listconcat([HasSVE2, HasSVE2orSME, HasSVE2orSME2, HasSSVE_FP8FMA, HasSMEF8F16, 665f757f3fSDimitry Andric HasSMEF8F32, HasSVE2AES, HasSVE2SHA3, HasSVE2SM4, HasSVE2BitPerm], 6706c3fb27SDimitry Andric SVE2p1Unsupported.F); 680b57cec5SDimitry Andric} 690b57cec5SDimitry Andric 7006c3fb27SDimitry Andricdef SVEUnsupported : AArch64Unsupported { 7106c3fb27SDimitry Andric let F = !listconcat([HasSVE, HasSVEorSME], 7206c3fb27SDimitry Andric SVE2Unsupported.F); 7306c3fb27SDimitry Andric} 7406c3fb27SDimitry Andric 7506c3fb27SDimitry Andriclet F = [HasSME2p1, HasSVE2p1_or_HasSME2p1] in 7606c3fb27SDimitry Andricdef SME2p1Unsupported : AArch64Unsupported; 7706c3fb27SDimitry Andric 7806c3fb27SDimitry Andricdef SME2Unsupported : AArch64Unsupported { 79cb14a3feSDimitry Andric let F = !listconcat([HasSME2, HasSVE2orSME2, HasSVE2p1_or_HasSME2, HasSSVE_FP8FMA, 80*0fca6ea1SDimitry Andric HasSMEF8F16, HasSMEF8F32, HasSMEF16F16orSMEF8F16], 8106c3fb27SDimitry Andric SME2p1Unsupported.F); 82e837bb5cSDimitry Andric} 83e837bb5cSDimitry Andric 84fe6060f1SDimitry Andricdef SMEUnsupported : AArch64Unsupported { 855f757f3fSDimitry Andric let F = !listconcat([HasSME, HasSMEI16I64, HasSMEF16F16, HasSMEF64F64, HasSMEFA64], 8606c3fb27SDimitry Andric SME2Unsupported.F); 87fe6060f1SDimitry Andric} 88fe6060f1SDimitry Andric 89*0fca6ea1SDimitry Andricdef MTEUnsupported : AArch64Unsupported { 90*0fca6ea1SDimitry Andric let F = [HasMTE]; 91*0fca6ea1SDimitry Andric} 92*0fca6ea1SDimitry Andric 93cb14a3feSDimitry Andriclet F = [HasPAuth, HasPAuthLR] in 9406c3fb27SDimitry Andricdef PAUnsupported : AArch64Unsupported; 9506c3fb27SDimitry Andric 960b57cec5SDimitry Andricinclude "AArch64SchedA53.td" 97e8d8bef9SDimitry Andricinclude "AArch64SchedA55.td" 9806c3fb27SDimitry Andricinclude "AArch64SchedA510.td" 990b57cec5SDimitry Andricinclude "AArch64SchedA57.td" 1000b57cec5SDimitry Andricinclude "AArch64SchedCyclone.td" 1010b57cec5SDimitry Andricinclude "AArch64SchedFalkor.td" 1020b57cec5SDimitry Andricinclude "AArch64SchedKryo.td" 1030b57cec5SDimitry Andricinclude "AArch64SchedExynosM3.td" 1040b57cec5SDimitry Andricinclude "AArch64SchedExynosM4.td" 105480093f4SDimitry Andricinclude "AArch64SchedExynosM5.td" 1060b57cec5SDimitry Andricinclude "AArch64SchedThunderX.td" 1070b57cec5SDimitry Andricinclude "AArch64SchedThunderX2T99.td" 108e8d8bef9SDimitry Andricinclude "AArch64SchedA64FX.td" 109e837bb5cSDimitry Andricinclude "AArch64SchedThunderX3T110.td" 110e8d8bef9SDimitry Andricinclude "AArch64SchedTSV110.td" 1112a66634dSDimitry Andricinclude "AArch64SchedAmpere1.td" 1124c2d3b02SDimitry Andricinclude "AArch64SchedAmpere1B.td" 11306c3fb27SDimitry Andricinclude "AArch64SchedNeoverseN1.td" 114753f127fSDimitry Andricinclude "AArch64SchedNeoverseN2.td" 11506c3fb27SDimitry Andricinclude "AArch64SchedNeoverseV1.td" 11606c3fb27SDimitry Andricinclude "AArch64SchedNeoverseV2.td" 117*0fca6ea1SDimitry Andricinclude "AArch64SchedOryon.td" 1180b57cec5SDimitry Andric 119*0fca6ea1SDimitry Andricinclude "AArch64Processors.td" 1204c2d3b02SDimitry Andric 1210b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 1220b57cec5SDimitry Andric// Assembly parser 1230b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 1240b57cec5SDimitry Andric 1250b57cec5SDimitry Andricdef GenericAsmParserVariant : AsmParserVariant { 1260b57cec5SDimitry Andric int Variant = 0; 1270b57cec5SDimitry Andric string Name = "generic"; 1280b57cec5SDimitry Andric string BreakCharacters = "."; 1290b57cec5SDimitry Andric string TokenizingCharacters = "[]*!/"; 1300b57cec5SDimitry Andric} 1310b57cec5SDimitry Andric 1320b57cec5SDimitry Andricdef AppleAsmParserVariant : AsmParserVariant { 1330b57cec5SDimitry Andric int Variant = 1; 1340b57cec5SDimitry Andric string Name = "apple-neon"; 1350b57cec5SDimitry Andric string BreakCharacters = "."; 1360b57cec5SDimitry Andric string TokenizingCharacters = "[]*!/"; 1370b57cec5SDimitry Andric} 1380b57cec5SDimitry Andric 1390b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 1400b57cec5SDimitry Andric// Assembly printer 1410b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 1420b57cec5SDimitry Andric// AArch64 Uses the MC printer for asm output, so make sure the TableGen 1430b57cec5SDimitry Andric// AsmWriter bits get associated with the correct class. 1440b57cec5SDimitry Andricdef GenericAsmWriter : AsmWriter { 1450b57cec5SDimitry Andric string AsmWriterClassName = "InstPrinter"; 1460b57cec5SDimitry Andric int PassSubtarget = 1; 1470b57cec5SDimitry Andric int Variant = 0; 1480b57cec5SDimitry Andric bit isMCAsmWriter = 1; 1490b57cec5SDimitry Andric} 1500b57cec5SDimitry Andric 1510b57cec5SDimitry Andricdef AppleAsmWriter : AsmWriter { 1520b57cec5SDimitry Andric let AsmWriterClassName = "AppleInstPrinter"; 1530b57cec5SDimitry Andric int PassSubtarget = 1; 1540b57cec5SDimitry Andric int Variant = 1; 1550b57cec5SDimitry Andric int isMCAsmWriter = 1; 1560b57cec5SDimitry Andric} 1570b57cec5SDimitry Andric 1580b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 1590b57cec5SDimitry Andric// Target Declaration 1600b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 1610b57cec5SDimitry Andric 1620b57cec5SDimitry Andricdef AArch64 : Target { 1630b57cec5SDimitry Andric let InstructionSet = AArch64InstrInfo; 1640b57cec5SDimitry Andric let AssemblyParserVariants = [GenericAsmParserVariant, AppleAsmParserVariant]; 1650b57cec5SDimitry Andric let AssemblyWriters = [GenericAsmWriter, AppleAsmWriter]; 1660b57cec5SDimitry Andric let AllowRegisterRenaming = 1; 1670b57cec5SDimitry Andric} 1680b57cec5SDimitry Andric 1690b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 1700b57cec5SDimitry Andric// Pfm Counters 1710b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 1720b57cec5SDimitry Andric 1730b57cec5SDimitry Andricinclude "AArch64PfmCounters.td" 174