blob: 9f6992de2f132a8aa282a59b44a141dc93fc7c59 [file] [log] [blame]
Jia Liub22310f2012-02-18 12:03:15 +00001//===-- Sparc.td - Describe the Sparc Target Machine -------*- tablegen -*-===//
2//
Chris Lattner158e1f52006-02-05 05:50:24 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Jia Liub22310f2012-02-18 12:03:15 +00007//
Chris Lattner158e1f52006-02-05 05:50:24 +00008//===----------------------------------------------------------------------===//
9//
10//
11//===----------------------------------------------------------------------===//
12
13//===----------------------------------------------------------------------===//
14// Target-independent interfaces which we are implementing
15//===----------------------------------------------------------------------===//
16
Evan Cheng977e7be2008-11-24 07:34:46 +000017include "llvm/Target/Target.td"
Chris Lattner158e1f52006-02-05 05:50:24 +000018
19//===----------------------------------------------------------------------===//
20// SPARC Subtarget features.
21//
Venkatraman Govindarajua54533ed2013-06-04 18:33:25 +000022
Chris Lattner158e1f52006-02-05 05:50:24 +000023def FeatureV9
24 : SubtargetFeature<"v9", "IsV9", "true",
25 "Enable SPARC-V9 instructions">;
26def FeatureV8Deprecated
27 : SubtargetFeature<"deprecated-v8", "V8DeprecatedInsts", "true",
28 "Enable deprecated V8 instructions in V9 mode">;
29def FeatureVIS
30 : SubtargetFeature<"vis", "IsVIS", "true",
31 "Enable UltraSPARC Visual Instruction Set extensions">;
32
Venkatraman Govindaraju35e0c382013-08-25 18:30:06 +000033def FeatureHardQuad
34 : SubtargetFeature<"hard-quad-float", "HasHardQuad", "true",
35 "Enable quad-word floating point instructions">;
36
Chris Lattner158e1f52006-02-05 05:50:24 +000037//===----------------------------------------------------------------------===//
Chris Lattner49b269d2008-03-17 05:41:48 +000038// Register File, Calling Conv, Instruction Descriptions
Chris Lattner158e1f52006-02-05 05:50:24 +000039//===----------------------------------------------------------------------===//
40
41include "SparcRegisterInfo.td"
Chris Lattner49b269d2008-03-17 05:41:48 +000042include "SparcCallingConv.td"
Chris Lattner158e1f52006-02-05 05:50:24 +000043include "SparcInstrInfo.td"
44
Jakob Stoklund Olesenb93331f2010-04-05 03:10:20 +000045def SparcInstrInfo : InstrInfo;
Chris Lattner158e1f52006-02-05 05:50:24 +000046
Venkatraman Govindarajuc2dee7d2014-01-04 11:30:13 +000047def SparcAsmParser : AsmParser {
48 bit ShouldEmitMatchRegisterName = 0;
49}
50
Chris Lattner158e1f52006-02-05 05:50:24 +000051//===----------------------------------------------------------------------===//
52// SPARC processors supported.
53//===----------------------------------------------------------------------===//
54
55class Proc<string Name, list<SubtargetFeature> Features>
56 : Processor<Name, NoItineraries, Features>;
57
58def : Proc<"generic", []>;
Venkatraman Govindarajua66b3142014-01-11 23:56:13 +000059def : Proc<"v7", []>;
Chris Lattner158e1f52006-02-05 05:50:24 +000060def : Proc<"v8", []>;
61def : Proc<"supersparc", []>;
62def : Proc<"sparclite", []>;
63def : Proc<"f934", []>;
64def : Proc<"hypersparc", []>;
65def : Proc<"sparclite86x", []>;
66def : Proc<"sparclet", []>;
67def : Proc<"tsc701", []>;
68def : Proc<"v9", [FeatureV9]>;
69def : Proc<"ultrasparc", [FeatureV9, FeatureV8Deprecated]>;
70def : Proc<"ultrasparc3", [FeatureV9, FeatureV8Deprecated]>;
Venkatraman Govindarajua66b3142014-01-11 23:56:13 +000071def : Proc<"niagara", [FeatureV9, FeatureV8Deprecated]>;
72def : Proc<"niagara2", [FeatureV9, FeatureV8Deprecated]>;
73def : Proc<"niagara3", [FeatureV9, FeatureV8Deprecated]>;
74def : Proc<"niagara4", [FeatureV9, FeatureV8Deprecated]>;
Chris Lattner158e1f52006-02-05 05:50:24 +000075
76
77//===----------------------------------------------------------------------===//
78// Declare the target which we are implementing
79//===----------------------------------------------------------------------===//
80
81def Sparc : Target {
Chris Lattner158e1f52006-02-05 05:50:24 +000082 // Pull in Instruction Info:
83 let InstructionSet = SparcInstrInfo;
Venkatraman Govindarajuc2dee7d2014-01-04 11:30:13 +000084 let AssemblyParsers = [SparcAsmParser];
Chris Lattner158e1f52006-02-05 05:50:24 +000085}