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