1//===- Xtensa.td - Describe the Xtensa Target Machine ------*- tablegen -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 6// See https://llvm.org/LICENSE.txt for license information. 7// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 8// 9//===----------------------------------------------------------------------===// 10 11//===----------------------------------------------------------------------===// 12// Target-independent interfaces 13//===----------------------------------------------------------------------===// 14 15include "llvm/Target/Target.td" 16 17//===----------------------------------------------------------------------===// 18// Subtarget Features. 19//===----------------------------------------------------------------------===// 20def FeatureDensity : SubtargetFeature<"density", "HasDensity", "true", 21 "Enable Density instructions">; 22def HasDensity : Predicate<"Subtarget->hasDensity()">, 23 AssemblerPredicate<(all_of FeatureDensity)>; 24//===----------------------------------------------------------------------===// 25// Xtensa supported processors. 26//===----------------------------------------------------------------------===// 27class Proc<string Name, list<SubtargetFeature> Features> 28 : Processor<Name, NoItineraries, Features>; 29 30def : Proc<"generic", []>; 31 32//===----------------------------------------------------------------------===// 33// Register File Description 34//===----------------------------------------------------------------------===// 35 36include "XtensaRegisterInfo.td" 37 38//===----------------------------------------------------------------------===// 39// Calling Convention Description 40//===----------------------------------------------------------------------===// 41 42include "XtensaCallingConv.td" 43 44//===----------------------------------------------------------------------===// 45// Instruction Descriptions 46//===----------------------------------------------------------------------===// 47 48include "XtensaInstrInfo.td" 49 50def XtensaInstrInfo : InstrInfo; 51 52//===----------------------------------------------------------------------===// 53// Target Declaration 54//===----------------------------------------------------------------------===// 55 56def XtensaAsmParser : AsmParser { 57 let ShouldEmitMatchRegisterAltName = 1; 58} 59 60def XtensaInstPrinter : AsmWriter { 61 string AsmWriterClassName = "InstPrinter"; 62} 63 64def Xtensa : Target { 65 let InstructionSet = XtensaInstrInfo; 66 let AssemblyWriters = [XtensaInstPrinter]; 67 let AssemblyParsers = [XtensaAsmParser]; 68} 69 70