121
|
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
|
|
14 include "llvm/Target/Target.td"
|
|
15 include "Nios2RegisterInfo.td"
|
134
|
16 include "Nios2Schedule.td"
|
121
|
17 include "Nios2InstrInfo.td"
|
134
|
18 include "Nios2CallingConv.td"
|
121
|
19
|
|
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">;
|
|
27
|
|
28 //===----------------------------------------------------------------------===//
|
|
29 // Nios2 processors supported.
|
|
30 //===----------------------------------------------------------------------===//
|
|
31
|
|
32 class Proc<string Name, list<SubtargetFeature> Features>
|
|
33 : Processor<Name, Nios2GenericItineraries, Features>;
|
|
34
|
|
35 def : Proc<"nios2r1", [FeatureNios2r1]>;
|
|
36 def : Proc<"nios2r2", [FeatureNios2r2]>;
|
134
|
37
|
|
38 def Nios2InstrInfo : InstrInfo;
|
|
39
|
|
40 def Nios2AsmParser : AsmParser {
|
|
41 let ShouldEmitMatchRegisterName = 0;
|
|
42 }
|
|
43
|
|
44 //===----------------------------------------------------------------------===//
|
|
45 // Declare the target which we are implementing
|
|
46 //===----------------------------------------------------------------------===//
|
|
47
|
|
48 def Nios2AsmWriter : AsmWriter {
|
|
49 string AsmWriterClassName = "InstPrinter";
|
|
50 int PassSubtarget = 1;
|
|
51 int Variant = 0;
|
|
52 }
|
|
53
|
|
54 def Nios2 : Target {
|
|
55 // def Nios2InstrInfo : InstrInfo as before.
|
|
56 let InstructionSet = Nios2InstrInfo;
|
|
57 let AssemblyParsers = [Nios2AsmParser];
|
|
58 let AssemblyWriters = [Nios2AsmWriter];
|
|
59 }
|