LLVM: lib/Target/CSKY/CSKYSubtarget.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_LIB_TARGET_CSKY_CSKYSUBTARGET_H
14#define LLVM_LIB_TARGET_CSKY_CSKYSUBTARGET_H
15
22
23#define GET_SUBTARGETINFO_HEADER
24#include "CSKYGenSubtargetInfo.inc"
25
26namespace llvm {
27class StringRef;
28
30 virtual void anchor();
31
36 std::unique_ptr TSInfo;
37
38 enum CSKYProcFamilyEnum {
39 Others,
40
41 CK801,
42 CK802,
43 CK803,
44 CK803S,
45 CK804,
46 CK805,
47 CK807,
48 CK810,
49 CK810V,
50 CK860,
51 CK860V
52 };
53
54
55 CSKYProcFamilyEnum CSKYProcFamily = Others;
56
57 bool UseHardFloat;
58 bool UseHardFloatABI;
59 bool HasFPUv2SingleFloat;
60 bool HasFPUv2DoubleFloat;
61 bool HasFPUv3HalfWord;
62 bool HasFPUv3HalfFloat;
63 bool HasFPUv3SingleFloat;
64 bool HasFPUv3DoubleFloat;
65 bool HasFdivdu;
66 bool HasFLOATE1;
67 bool HasFLOAT1E2;
68 bool HasFLOAT1E3;
69 bool HasFLOAT3E4;
70 bool HasFLOAT7E60;
71 bool HasBTST16;
72 bool HasExtendLrw;
73 bool HasTrust;
74 bool HasJAVA;
75 bool HasCache;
76 bool HasNVIC;
77 bool HasDSP;
78 bool HasDSP1E2;
79 bool HasDSPE60;
80 bool HasDSPV2;
81 bool HasDSP_Silan;
82 bool HasDoloop;
83 bool HasHardwareDivide;
84 bool HasHighRegisters;
85 bool HasVDSPV2;
86 bool HasVDSP2E3;
87 bool HasVDSP2E60F;
88 bool ReadTPHard;
89 bool HasVDSPV1_128;
90 bool UseCCRT;
91 bool DumpConstPool;
92 bool EnableInterruptAttribute;
93 bool HasPushPop;
94 bool HasSTM;
95 bool SmartMode;
96 bool EnableStackSize;
97
98 bool HasE1;
99 bool HasE2;
100 bool Has2E3;
101 bool HasMP;
102 bool Has3E3r1;
103 bool Has3r1E3r2;
104 bool Has3r2E3r3;
105 bool Has3E7;
106 bool HasMP1E2;
107 bool Has7E10;
108 bool Has10E60;
109
110public:
113
115
117 return &FrameLowering;
118 }
122 return &TLInfo;
123 }
124
126
127
128
133
134
136
141 bool hasFPUv2() const { return HasFPUv2SingleFloat || HasFPUv2DoubleFloat; }
147 return HasFPUv3HalfFloat || HasFPUv3SingleFloat || HasFPUv3DoubleFloat;
148 }
158 bool hasTrust() const { return HasTrust; }
159 bool hasJAVA() const { return HasJAVA; }
160 bool hasCache() const { return HasCache; }
161 bool hasNVIC() const { return HasNVIC; }
162 bool hasDSP() const { return HasDSP; }
165 bool hasDSPV2() const { return HasDSPV2; }
172 return HasVDSPV2 && UseHardFloat && HasFPUv3HalfFloat;
173 }
178 bool useCCRT() const { return UseCCRT; }
182 bool hasSTM() const { return HasSTM; }
185
186 bool hasE1() const { return HasE1; }
187 bool hasE2() const { return HasE2; }
188 bool has2E3() const { return Has2E3; }
191 bool has3E3r1() const { return Has3E3r1; }
192 bool has3E7() const { return Has3E7; }
193 bool hasMP() const { return HasMP; }
194 bool hasMP1E2() const { return HasMP1E2; }
195 bool has7E10() const { return Has7E10; }
196 bool has10E60() const { return Has10E60; }
197
198 bool isCK801() const { return CSKYProcFamily == CK801; }
199 bool isCK802() const { return CSKYProcFamily == CK802; }
200 bool isCK803() const { return CSKYProcFamily == CK803; }
201 bool isCK803S() const { return CSKYProcFamily == CK803S; }
202 bool isCK804() const { return CSKYProcFamily == CK804; }
203 bool isCK805() const { return CSKYProcFamily == CK805; }
204 bool isCK807() const { return CSKYProcFamily == CK807; }
205 bool isCK810() const { return CSKYProcFamily == CK810; }
206 bool isCK810V() const { return CSKYProcFamily == CK810V; }
207 bool isCK860() const { return CSKYProcFamily == CK860; }
208 bool isCK860V() const { return CSKYProcFamily == CK860V; }
209
211};
212}
213
214#endif
Definition CSKYSubtarget.h:29
bool hasHighRegisters() const
Definition CSKYSubtarget.h:168
bool isCK860V() const
Definition CSKYSubtarget.h:208
bool hasDSP1E2() const
Definition CSKYSubtarget.h:163
bool hasMP() const
Definition CSKYSubtarget.h:193
bool hasJAVA() const
Definition CSKYSubtarget.h:159
bool hasFPUv2SingleFloat() const
Definition CSKYSubtarget.h:139
bool has3E7() const
Definition CSKYSubtarget.h:192
const CSKYFrameLowering * getFrameLowering() const override
Definition CSKYSubtarget.h:116
bool hasFLOAT1E2() const
Definition CSKYSubtarget.h:152
bool hasVDSPV2_HALF() const
Definition CSKYSubtarget.h:171
bool hasFdivdu() const
Definition CSKYSubtarget.h:150
bool hasFPUv3SingleFloat() const
Definition CSKYSubtarget.h:144
bool hasDSP() const
Definition CSKYSubtarget.h:162
bool hasCache() const
Definition CSKYSubtarget.h:160
CSKYSubtarget & initializeSubtargetDependencies(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS)
Initializes using the passed in CPU and feature strings so that we can use initializer lists for subt...
bool isCK807() const
Definition CSKYSubtarget.h:204
bool hasVDSPV2() const
Definition CSKYSubtarget.h:169
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
const CSKYRegisterInfo * getRegisterInfo() const override
Definition CSKYSubtarget.h:120
const unsigned XLen
Definition CSKYSubtarget.h:210
bool dumpConstPool() const
Definition CSKYSubtarget.h:179
bool isCK801() const
Definition CSKYSubtarget.h:198
bool hasFLOAT7E60() const
Definition CSKYSubtarget.h:155
bool hasE2() const
Definition CSKYSubtarget.h:187
bool isCK803() const
Definition CSKYSubtarget.h:200
bool enableInterruptAttribute() const
Definition CSKYSubtarget.h:180
bool hasMP1E2() const
Definition CSKYSubtarget.h:194
bool hasFPUv2DoubleFloat() const
Definition CSKYSubtarget.h:140
bool hasAnyFloatExt() const
Definition CSKYSubtarget.h:149
bool hasDSP_Silan() const
Definition CSKYSubtarget.h:166
bool hasVDSPV1_128() const
Definition CSKYSubtarget.h:177
bool readTPHard() const
Definition CSKYSubtarget.h:176
bool hasBTST16() const
Definition CSKYSubtarget.h:157
bool hasFLOATE1() const
Definition CSKYSubtarget.h:151
bool hasNVIC() const
Definition CSKYSubtarget.h:161
bool hasExtendLrw() const
Definition CSKYSubtarget.h:156
bool hasFPUv3HalfWord() const
Definition CSKYSubtarget.h:142
bool smartMode() const
Definition CSKYSubtarget.h:183
bool isCK804() const
Definition CSKYSubtarget.h:202
bool hasDoloop() const
Definition CSKYSubtarget.h:167
bool has7E10() const
Definition CSKYSubtarget.h:195
bool useHardFloatABI() const
bool useHardFloat() const
Definition CSKYSubtarget.h:138
bool isCK810() const
Definition CSKYSubtarget.h:205
bool has3r2E3r3() const
Definition CSKYSubtarget.h:190
bool hasVDSP2E60F() const
Definition CSKYSubtarget.h:175
CSKYSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, const TargetMachine &TM)
bool has10E60() const
Definition CSKYSubtarget.h:196
bool hasDSPE60() const
Definition CSKYSubtarget.h:164
bool isCK860() const
Definition CSKYSubtarget.h:207
bool hasSTM() const
Definition CSKYSubtarget.h:182
bool hasPushPop() const
Definition CSKYSubtarget.h:181
bool isCK805() const
Definition CSKYSubtarget.h:203
~CSKYSubtarget() override
const CSKYTargetLowering * getTargetLowering() const override
Definition CSKYSubtarget.h:121
bool hasFPUv2() const
Definition CSKYSubtarget.h:141
bool useCCRT() const
Definition CSKYSubtarget.h:178
bool has3E3r1() const
Definition CSKYSubtarget.h:191
bool hasFPUv3HalfFloat() const
Definition CSKYSubtarget.h:143
bool hasFLOAT3E4() const
Definition CSKYSubtarget.h:154
bool enableStackSize() const
Definition CSKYSubtarget.h:184
bool isCK803S() const
Definition CSKYSubtarget.h:201
bool hasFPUv3DoubleFloat() const
Definition CSKYSubtarget.h:145
bool hasE1() const
Definition CSKYSubtarget.h:186
const CSKYInstrInfo * getInstrInfo() const override
Definition CSKYSubtarget.h:119
bool hasFPUv3() const
Definition CSKYSubtarget.h:146
bool isCK810V() const
Definition CSKYSubtarget.h:206
bool hasVDSP2E3() const
Definition CSKYSubtarget.h:174
bool hasTrust() const
Definition CSKYSubtarget.h:158
bool hasVDSPV2_FLOAT() const
Definition CSKYSubtarget.h:170
bool hasFLOAT1E3() const
Definition CSKYSubtarget.h:153
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
bool has3r1E3r2() const
Definition CSKYSubtarget.h:189
bool isCK802() const
Definition CSKYSubtarget.h:199
bool hasDSPV2() const
Definition CSKYSubtarget.h:165
bool has2E3() const
Definition CSKYSubtarget.h:188
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
StringRef - Represent a constant reference to a string, i.e.
Primary interface to the complete machine description for the target machine.
Triple - Helper class for working with autoconf configuration names.
This is an optimization pass for GlobalISel generic memory operations.