1 //===-- Nios2.td - Describe the Nios2 Target Machine -------*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
11 // Calling Conv, Instruction Descriptions
12 //===----------------------------------------------------------------------===//
14 include "llvm/Target/Target.td"
15 include "Nios2RegisterInfo.td"
16 include "Nios2Schedule.td"
17 include "Nios2InstrInfo.td"
18 include "Nios2CallingConv.td"
20 //===----------------------------------------------------------------------===//
21 // Nios2 Subtarget features
22 //===----------------------------------------------------------------------===//
23 def FeatureNios2r1 : SubtargetFeature<"nios2r1", "Nios2ArchVersion",
24 "Nios2r1", "Nios2 R1 ISA Support">;
25 def FeatureNios2r2 : SubtargetFeature<"nios2r2", "Nios2ArchVersion",
26 "Nios2r2", "Nios2 R2 ISA Support">;
28 //===----------------------------------------------------------------------===//
29 // Nios2 processors supported.
30 //===----------------------------------------------------------------------===//
32 class Proc<string Name, list<SubtargetFeature> Features>
33 : Processor<Name, Nios2GenericItineraries, Features>;
35 def : Proc<"nios2r1", [FeatureNios2r1]>;
36 def : Proc<"nios2r2", [FeatureNios2r2]>;
38 def Nios2InstrInfo : InstrInfo;
40 def Nios2AsmParser : AsmParser {
41 let ShouldEmitMatchRegisterName = 0;
44 //===----------------------------------------------------------------------===//
45 // Declare the target which we are implementing
46 //===----------------------------------------------------------------------===//
48 def Nios2AsmWriter : AsmWriter {
49 string AsmWriterClassName = "InstPrinter";
50 int PassSubtarget = 1;
55 // def Nios2InstrInfo : InstrInfo as before.
56 let InstructionSet = Nios2InstrInfo;
57 let AssemblyParsers = [Nios2AsmParser];
58 let AssemblyWriters = [Nios2AsmWriter];