aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/MBlaze/MBlaze.td
blob: c2888553c5e38de893a212aa632bcf5dd5d4fb4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//===-- MBlaze.td - Describe the MBlaze Target Machine -----*- tablegen -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// This is the top level entry point for the MBlaze target.
//===----------------------------------------------------------------------===//

//===----------------------------------------------------------------------===//
// Target-independent interfaces
//===----------------------------------------------------------------------===//

include "llvm/Target/Target.td"

//===----------------------------------------------------------------------===//
// Register File, Calling Conv, Instruction Descriptions
//===----------------------------------------------------------------------===//

include "MBlazeRegisterInfo.td"
include "MBlazeSchedule.td"
include "MBlazeIntrinsics.td"
include "MBlazeInstrInfo.td"
include "MBlazeCallingConv.td"

def MBlazeInstrInfo : InstrInfo;

//===----------------------------------------------------------------------===//
// Microblaze Subtarget features                                              //
//===----------------------------------------------------------------------===//

def FeatureBarrel      : SubtargetFeature<"barrel", "HasBarrel", "true",
                                "Implements barrel shifter">;
def FeatureDiv         : SubtargetFeature<"div", "HasDiv", "true",
                                "Implements hardware divider">;
def FeatureMul         : SubtargetFeature<"mul", "HasMul", "true",
                                "Implements hardware multiplier">;
def FeaturePatCmp      : SubtargetFeature<"patcmp", "HasPatCmp", "true",
                                "Implements pattern compare instruction">;
def FeatureFPU         : SubtargetFeature<"fpu", "HasFPU", "true",
                                "Implements floating point unit">;
def FeatureMul64       : SubtargetFeature<"mul64", "HasMul64", "true",
                                "Implements multiplier with 64-bit result">;
def FeatureSqrt        : SubtargetFeature<"sqrt", "HasSqrt", "true",
                                "Implements sqrt and floating point convert">;

//===----------------------------------------------------------------------===//
// MBlaze processors supported.
//===----------------------------------------------------------------------===//

def : Processor<"mblaze",  NoItineraries, []>;
def : Processor<"mblaze3", MBlazePipe3Itineraries, []>;
def : Processor<"mblaze5", MBlazePipe5Itineraries, []>;

//===----------------------------------------------------------------------===//
// Instruction Descriptions
//===----------------------------------------------------------------------===//

def MBlazeAsmWriter : AsmWriter {
  string AsmWriterClassName  = "InstPrinter";
  bit isMCAsmWriter = 1;
}

//===----------------------------------------------------------------------===//
// Target Declaration
//===----------------------------------------------------------------------===//

def MBlaze : Target {
  let InstructionSet = MBlazeInstrInfo;
  let AssemblyWriters = [MBlazeAsmWriter];
}