blob: 451e56206e60c231432bf7213d2f540e7db709e7 [file] [log] [blame]
Jia Liu31d157a2012-02-18 12:03:15 +00001//===-- Hexagon.td - Describe the Hexagon Target Machine --*- tablegen -*--===//
Tony Linthicumb4b54152011-12-12 21:14:40 +00002//
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//
Jia Liu31d157a2012-02-18 12:03:15 +000010// This is the top level entry point for the Hexagon target.
Tony Linthicumb4b54152011-12-12 21:14:40 +000011//
12//===----------------------------------------------------------------------===//
13
14//===----------------------------------------------------------------------===//
15// Target-independent interfaces which we are implementing
16//===----------------------------------------------------------------------===//
17
18include "llvm/Target/Target.td"
19
20//===----------------------------------------------------------------------===//
21// Hexagon Subtarget features.
Jia Liu31d157a2012-02-18 12:03:15 +000022//===----------------------------------------------------------------------===//
Tony Linthicumb4b54152011-12-12 21:14:40 +000023
24// Hexagon Archtectures
25def ArchV2 : SubtargetFeature<"v2", "HexagonArchVersion", "V2",
26 "Hexagon v2">;
27def ArchV3 : SubtargetFeature<"v3", "HexagonArchVersion", "V3",
28 "Hexagon v3">;
29def ArchV4 : SubtargetFeature<"v4", "HexagonArchVersion", "V4",
30 "Hexagon v4">;
Sirish Pande7517bbc2012-05-10 20:20:25 +000031def ArchV5 : SubtargetFeature<"v5", "HexagonArchVersion", "V5",
32 "Hexagon v5">;
Tony Linthicumb4b54152011-12-12 21:14:40 +000033
34//===----------------------------------------------------------------------===//
35// Register File, Calling Conv, Instruction Descriptions
36//===----------------------------------------------------------------------===//
37include "HexagonSchedule.td"
38include "HexagonRegisterInfo.td"
39include "HexagonCallingConv.td"
40include "HexagonInstrInfo.td"
41include "HexagonIntrinsics.td"
42include "HexagonIntrinsicsDerived.td"
43
Evandro Menezese5041e62012-04-12 17:55:53 +000044def HexagonInstrInfo : InstrInfo;
Tony Linthicumb4b54152011-12-12 21:14:40 +000045
46//===----------------------------------------------------------------------===//
47// Hexagon processors supported.
48//===----------------------------------------------------------------------===//
49
Andrew Trick2661b412012-07-07 04:00:00 +000050class Proc<string Name, SchedMachineModel Model,
Tony Linthicumb4b54152011-12-12 21:14:40 +000051 list<SubtargetFeature> Features>
Andrew Trick2661b412012-07-07 04:00:00 +000052 : ProcessorModel<Name, Model, Features>;
Tony Linthicumb4b54152011-12-12 21:14:40 +000053
Andrew Trick2661b412012-07-07 04:00:00 +000054def : Proc<"hexagonv2", HexagonModel, [ArchV2]>;
55def : Proc<"hexagonv3", HexagonModel, [ArchV2, ArchV3]>;
56def : Proc<"hexagonv4", HexagonModelV4, [ArchV2, ArchV3, ArchV4]>;
57def : Proc<"hexagonv5", HexagonModelV4, [ArchV2, ArchV3, ArchV4, ArchV5]>;
Sirish Pande7517bbc2012-05-10 20:20:25 +000058
Tony Linthicumb4b54152011-12-12 21:14:40 +000059
Evandro Menezese5041e62012-04-12 17:55:53 +000060// Hexagon Uses the MC printer for assembler output, so make sure the TableGen
61// AsmWriter bits get associated with the correct class.
62def HexagonAsmWriter : AsmWriter {
63 string AsmWriterClassName = "InstPrinter";
64 bit isMCAsmWriter = 1;
65}
66
Tony Linthicumb4b54152011-12-12 21:14:40 +000067//===----------------------------------------------------------------------===//
68// Declare the target which we are implementing
69//===----------------------------------------------------------------------===//
70
71def Hexagon : Target {
72 // Pull in Instruction Info:
73 let InstructionSet = HexagonInstrInfo;
Evandro Menezese5041e62012-04-12 17:55:53 +000074
75 let AssemblyWriters = [HexagonAsmWriter];
Tony Linthicumb4b54152011-12-12 21:14:40 +000076}