~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/PPCGenSubtarget.inc

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===- TableGen'erated file -------------------------------------*- C++ -*-===//
 
2
//
 
3
// Subtarget Enumeration Source Fragment
 
4
//
 
5
// Automatically generated file, do not edit!
 
6
//
 
7
//===----------------------------------------------------------------------===//
 
8
 
 
9
#include "llvm/Support/Debug.h"
 
10
#include "llvm/Support/raw_ostream.h"
 
11
#include "llvm/Target/SubtargetFeature.h"
 
12
#include "llvm/Target/TargetInstrItineraries.h"
 
13
 
 
14
enum {
 
15
  BPU =  1 << 0,
 
16
  FPU1 =  1 << 1,
 
17
  FPU2 =  1 << 2,
 
18
  IU1 =  1 << 3,
 
19
  IU2 =  1 << 4,
 
20
  IU3 =  1 << 5,
 
21
  IU4 =  1 << 6,
 
22
  SLU =  1 << 7,
 
23
  SRU =  1 << 8,
 
24
  VFPU =  1 << 9,
 
25
  VIU1 =  1 << 10,
 
26
  VIU2 =  1 << 11,
 
27
  VPU =  1 << 12
 
28
};
 
29
 
 
30
enum {
 
31
  Directive32 =  1 << 0,
 
32
  Directive601 =  1 << 1,
 
33
  Directive602 =  1 << 2,
 
34
  Directive603 =  1 << 3,
 
35
  Directive604 =  1 << 4,
 
36
  Directive620 =  1 << 5,
 
37
  Directive64 =  1 << 6,
 
38
  Directive7400 =  1 << 7,
 
39
  Directive750 =  1 << 8,
 
40
  Directive970 =  1 << 9,
 
41
  Feature64Bit =  1 << 10,
 
42
  Feature64BitRegs =  1 << 11,
 
43
  FeatureAltivec =  1 << 12,
 
44
  FeatureFSqrt =  1 << 13,
 
45
  FeatureGPUL =  1 << 14,
 
46
  FeatureSTFIWX =  1 << 15
 
47
};
 
48
 
 
49
// Sorted (by key) array of values for CPU features.
 
50
static const llvm::SubtargetFeatureKV FeatureKV[] = {
 
51
  { "64bit", "Enable 64-bit instructions", Feature64Bit, 0 },
 
52
  { "64bitregs", "Enable 64-bit registers usage for ppc32 [beta]", Feature64BitRegs, 0 },
 
53
  { "altivec", "Enable Altivec instructions", FeatureAltivec, 0 },
 
54
  { "fsqrt", "Enable the fsqrt instruction", FeatureFSqrt, 0 },
 
55
  { "gpul", "Enable GPUL instructions", FeatureGPUL, 0 },
 
56
  { "stfiwx", "Enable the stfiwx instruction", FeatureSTFIWX, 0 }
 
57
};
 
58
 
 
59
enum {
 
60
  FeatureKVSize = sizeof(FeatureKV)/sizeof(llvm::SubtargetFeatureKV)
 
61
};
 
62
 
 
63
// Sorted (by key) array of values for CPU subtype.
 
64
static const llvm::SubtargetFeatureKV SubTypeKV[] = {
 
65
  { "601", "Select the 601 processor", Directive601, 0 },
 
66
  { "602", "Select the 602 processor", Directive602, 0 },
 
67
  { "603", "Select the 603 processor", Directive603, 0 },
 
68
  { "603e", "Select the 603e processor", Directive603, 0 },
 
69
  { "603ev", "Select the 603ev processor", Directive603, 0 },
 
70
  { "604", "Select the 604 processor", Directive604, 0 },
 
71
  { "604e", "Select the 604e processor", Directive604, 0 },
 
72
  { "620", "Select the 620 processor", Directive620, 0 },
 
73
  { "7400", "Select the 7400 processor", Directive7400 | FeatureAltivec, 0 },
 
74
  { "7450", "Select the 7450 processor", Directive7400 | FeatureAltivec, 0 },
 
75
  { "750", "Select the 750 processor", Directive750 | FeatureAltivec, 0 },
 
76
  { "970", "Select the 970 processor", Directive970 | FeatureAltivec | FeatureGPUL | FeatureFSqrt | FeatureSTFIWX | Feature64Bit, 0 },
 
77
  { "g3", "Select the g3 processor", Directive7400, 0 },
 
78
  { "g4", "Select the g4 processor", Directive7400 | FeatureAltivec, 0 },
 
79
  { "g4+", "Select the g4+ processor", Directive750 | FeatureAltivec, 0 },
 
80
  { "g5", "Select the g5 processor", Directive970 | FeatureAltivec | FeatureGPUL | FeatureFSqrt | FeatureSTFIWX | Feature64Bit, 0 },
 
81
  { "generic", "Select the generic processor", Directive32, 0 },
 
82
  { "ppc", "Select the ppc processor", Directive32, 0 },
 
83
  { "ppc64", "Select the ppc64 processor", Directive64 | FeatureAltivec | FeatureGPUL | FeatureFSqrt | FeatureSTFIWX | Feature64Bit, 0 }
 
84
};
 
85
 
 
86
enum {
 
87
  SubTypeKVSize = sizeof(SubTypeKV)/sizeof(llvm::SubtargetFeatureKV)
 
88
};
 
89
 
 
90
 
 
91
enum {
 
92
  ItinClassesSize = 74
 
93
};
 
94
static const llvm::InstrStage Stages[] = {
 
95
  { 0, 0, 0 }, // No itinerary
 
96
  { 1, IU1 | IU2, -1 }, // 1
 
97
  { 19, IU1, -1 }, // 2
 
98
  { 1, FPU1, -1 }, // 3
 
99
  { 3, FPU1, -1 }, // 4
 
100
  { 5, IU1, -1 }, // 5
 
101
  { 6, IU1, -1 }, // 6
 
102
  { 3, IU1, -1 }, // 7
 
103
  { 2, IU1 | IU2, -1 }, // 8
 
104
  { 1, BPU, -1 }, // 9
 
105
  { 1, SRU, -1 }, // 10
 
106
  { 2, SLU, -1 }, // 11
 
107
  { 3, SLU, -1 }, // 12
 
108
  { 34, SLU, -1 }, // 13
 
109
  { 8, SLU, -1 }, // 14
 
110
  { 2, SRU, -1 }, // 15
 
111
  { 3, SRU, -1 }, // 16
 
112
  { 31, FPU1, -1 }, // 17
 
113
  { 17, FPU1, -1 }, // 18
 
114
  { 2, FPU1, -1 }, // 19
 
115
  { 10, FPU1, -1 }, // 20
 
116
  { 1, VIU1, -1 }, // 21
 
117
  { 5, SLU, -1 }, // 22
 
118
  { 8, SRU, -1 }, // 23
 
119
  { 4, VFPU, -1 }, // 24
 
120
  { 3, VIU2, -1 }, // 25
 
121
  { 1, VPU, -1 }, // 26
 
122
  { 1, IU1 | IU2 | IU3 | IU4, -1 }, // 27
 
123
  { 23, IU2, -1 }, // 28
 
124
  { 5, FPU1, -1 }, // 29
 
125
  { 2, VFPU, -1 }, // 30
 
126
  { 4, IU2, -1 }, // 31
 
127
  { 3, IU2, -1 }, // 32
 
128
  { 2, IU1 | IU2 | IU3 | IU4, -1 }, // 33
 
129
  { 2, IU2, -1 }, // 34
 
130
  { 4, SLU, -1 }, // 35
 
131
  { 37, SLU, -1 }, // 36
 
132
  { 35, SLU, -1 }, // 37
 
133
  { 0, IU1 | IU2 | IU3 | IU4, -1 }, // 38
 
134
  { 5, IU2, -1 }, // 39
 
135
  { 35, FPU1, -1 }, // 40
 
136
  { 21, FPU1, -1 }, // 41
 
137
  { 14, FPU1, -1 }, // 42
 
138
  { 4, VIU2, -1 }, // 43
 
139
  { 2, VPU, -1 }, // 44
 
140
  { 4, VIU1, -1 }, // 45
 
141
  { 3, IU1 | IU2, -1 }, // 46
 
142
  { 68, IU1, -1 }, // 47
 
143
  { 36, IU1, -1 }, // 48
 
144
  { 6, IU2, -1 }, // 49
 
145
  { 1, VFPU, -1 }, // 50
 
146
  { 6, FPU1 | FPU2, -1 }, // 51
 
147
  { 7, IU1 | IU2, -1 }, // 52
 
148
  { 5, IU1 | IU2, -1 }, // 53
 
149
  { 4, IU1 | IU2, -1 }, // 54
 
150
  { 1, IU2, -1 }, // 55
 
151
  { 4, BPU, -1 }, // 56
 
152
  { 2, BPU, -1 }, // 57
 
153
  { 3, BPU, -1 }, // 58
 
154
  { 10, SLU, -1 }, // 59
 
155
  { 40, SLU, -1 }, // 60
 
156
  { 11, SLU, -1 }, // 61
 
157
  { 64, SLU, -1 }, // 62
 
158
  { 10, IU2, -1 }, // 63
 
159
  { 8, IU2, -1 }, // 64
 
160
  { 8, FPU1 | FPU2, -1 }, // 65
 
161
  { 33, FPU1 | FPU2, -1 }, // 66
 
162
  { 40, FPU1 | FPU2, -1 }, // 67
 
163
  { 2, VIU1, -1 }, // 68
 
164
  { 8, VFPU, -1 }, // 69
 
165
  { 5, VIU2, -1 }, // 70
 
166
  { 3, VPU, -1 }, // 71
 
167
  { 0, 0, 0 } // End itinerary
 
168
};
 
169
static const unsigned OperandCycles[] = {
 
170
  0, // No itinerary
 
171
  0 // End itinerary
 
172
};
 
173
 
 
174
enum {
 
175
  StagesSize = sizeof(Stages)/sizeof(llvm::InstrStage),
 
176
  OperandCyclesSize = sizeof(OperandCycles)/sizeof(unsigned)
 
177
};
 
178
 
 
179
static const llvm::InstrItinerary G3Itineraries[] = {
 
180
  { 9, 10, 0, 0 }, // 0
 
181
  { 10, 11, 0, 0 }, // 1
 
182
  { 10, 11, 0, 0 }, // 2
 
183
  { 10, 11, 0, 0 }, // 3
 
184
  { 3, 4, 0, 0 }, // 4
 
185
  { 17, 18, 0, 0 }, // 5
 
186
  { 18, 19, 0, 0 }, // 6
 
187
  { 19, 20, 0, 0 }, // 7
 
188
  { 3, 4, 0, 0 }, // 8
 
189
  { 20, 21, 0, 0 }, // 9
 
190
  { 0, 0, 0, 0 }, // 10
 
191
  { 1, 2, 0, 0 }, // 11
 
192
  { 0, 0, 0, 0 }, // 12
 
193
  { 2, 3, 0, 0 }, // 13
 
194
  { 1, 2, 0, 0 }, // 14
 
195
  { 3, 4, 0, 0 }, // 15
 
196
  { 0, 0, 0, 0 }, // 16
 
197
  { 4, 5, 0, 0 }, // 17
 
198
  { 0, 0, 0, 0 }, // 18
 
199
  { 0, 0, 0, 0 }, // 19
 
200
  { 5, 6, 0, 0 }, // 20
 
201
  { 6, 7, 0, 0 }, // 21
 
202
  { 7, 8, 0, 0 }, // 22
 
203
  { 0, 0, 0, 0 }, // 23
 
204
  { 1, 2, 0, 0 }, // 24
 
205
  { 0, 0, 0, 0 }, // 25
 
206
  { 1, 2, 0, 0 }, // 26
 
207
  { 0, 0, 0, 0 }, // 27
 
208
  { 8, 9, 0, 0 }, // 28
 
209
  { 11, 12, 0, 0 }, // 29
 
210
  { 12, 13, 0, 0 }, // 30
 
211
  { 12, 13, 0, 0 }, // 31
 
212
  { 0, 0, 0, 0 }, // 32
 
213
  { 11, 12, 0, 0 }, // 33
 
214
  { 12, 13, 0, 0 }, // 34
 
215
  { 0, 0, 0, 0 }, // 35
 
216
  { 0, 0, 0, 0 }, // 36
 
217
  { 11, 12, 0, 0 }, // 37
 
218
  { 11, 12, 0, 0 }, // 38
 
219
  { 11, 12, 0, 0 }, // 39
 
220
  { 13, 14, 0, 0 }, // 40
 
221
  { 0, 0, 0, 0 }, // 41
 
222
  { 0, 0, 0, 0 }, // 42
 
223
  { 12, 13, 0, 0 }, // 43
 
224
  { 0, 0, 0, 0 }, // 44
 
225
  { 0, 0, 0, 0 }, // 45
 
226
  { 0, 0, 0, 0 }, // 46
 
227
  { 0, 0, 0, 0 }, // 47
 
228
  { 0, 0, 0, 0 }, // 48
 
229
  { 14, 15, 0, 0 }, // 49
 
230
  { 12, 13, 0, 0 }, // 50
 
231
  { 11, 12, 0, 0 }, // 51
 
232
  { 0, 0, 0, 0 }, // 52
 
233
  { 15, 16, 0, 0 }, // 53
 
234
  { 10, 11, 0, 0 }, // 54
 
235
  { 10, 11, 0, 0 }, // 55
 
236
  { 16, 17, 0, 0 }, // 56
 
237
  { 16, 17, 0, 0 }, // 57
 
238
  { 16, 17, 0, 0 }, // 58
 
239
  { 10, 11, 0, 0 }, // 59
 
240
  { 15, 16, 0, 0 }, // 60
 
241
  { 15, 16, 0, 0 }, // 61
 
242
  { 15, 16, 0, 0 }, // 62
 
243
  { 15, 16, 0, 0 }, // 63
 
244
  { 15, 16, 0, 0 }, // 64
 
245
  { 16, 17, 0, 0 }, // 65
 
246
  { 0, 0, 0, 0 }, // 66
 
247
  { 0, 0, 0, 0 }, // 67
 
248
  { 0, 0, 0, 0 }, // 68
 
249
  { 0, 0, 0, 0 }, // 69
 
250
  { 0, 0, 0, 0 }, // 70
 
251
  { 0, 0, 0, 0 }, // 71
 
252
  { 0, 0, 0, 0 }, // 72
 
253
  { 0, 0, 0, 0 }, // 73
 
254
  { ~0U, ~0U, ~0U, ~0U } // end marker
 
255
};
 
256
 
 
257
static const llvm::InstrItinerary G4Itineraries[] = {
 
258
  { 9, 10, 0, 0 }, // 0
 
259
  { 10, 11, 0, 0 }, // 1
 
260
  { 10, 11, 0, 0 }, // 2
 
261
  { 10, 11, 0, 0 }, // 3
 
262
  { 3, 4, 0, 0 }, // 4
 
263
  { 17, 18, 0, 0 }, // 5
 
264
  { 18, 19, 0, 0 }, // 6
 
265
  { 3, 4, 0, 0 }, // 7
 
266
  { 3, 4, 0, 0 }, // 8
 
267
  { 20, 21, 0, 0 }, // 9
 
268
  { 0, 0, 0, 0 }, // 10
 
269
  { 1, 2, 0, 0 }, // 11
 
270
  { 0, 0, 0, 0 }, // 12
 
271
  { 2, 3, 0, 0 }, // 13
 
272
  { 1, 2, 0, 0 }, // 14
 
273
  { 4, 5, 0, 0 }, // 15
 
274
  { 21, 22, 0, 0 }, // 16
 
275
  { 4, 5, 0, 0 }, // 17
 
276
  { 0, 0, 0, 0 }, // 18
 
277
  { 0, 0, 0, 0 }, // 19
 
278
  { 5, 6, 0, 0 }, // 20
 
279
  { 6, 7, 0, 0 }, // 21
 
280
  { 7, 8, 0, 0 }, // 22
 
281
  { 0, 0, 0, 0 }, // 23
 
282
  { 1, 2, 0, 0 }, // 24
 
283
  { 0, 0, 0, 0 }, // 25
 
284
  { 1, 2, 0, 0 }, // 26
 
285
  { 0, 0, 0, 0 }, // 27
 
286
  { 8, 9, 0, 0 }, // 28
 
287
  { 0, 0, 0, 0 }, // 29
 
288
  { 11, 12, 0, 0 }, // 30
 
289
  { 11, 12, 0, 0 }, // 31
 
290
  { 11, 12, 0, 0 }, // 32
 
291
  { 11, 12, 0, 0 }, // 33
 
292
  { 11, 12, 0, 0 }, // 34
 
293
  { 0, 0, 0, 0 }, // 35
 
294
  { 0, 0, 0, 0 }, // 36
 
295
  { 11, 12, 0, 0 }, // 37
 
296
  { 11, 12, 0, 0 }, // 38
 
297
  { 11, 12, 0, 0 }, // 39
 
298
  { 13, 14, 0, 0 }, // 40
 
299
  { 11, 12, 0, 0 }, // 41
 
300
  { 0, 0, 0, 0 }, // 42
 
301
  { 12, 13, 0, 0 }, // 43
 
302
  { 0, 0, 0, 0 }, // 44
 
303
  { 0, 0, 0, 0 }, // 45
 
304
  { 0, 0, 0, 0 }, // 46
 
305
  { 0, 0, 0, 0 }, // 47
 
306
  { 11, 12, 0, 0 }, // 48
 
307
  { 22, 23, 0, 0 }, // 49
 
308
  { 14, 15, 0, 0 }, // 50
 
309
  { 11, 12, 0, 0 }, // 51
 
310
  { 0, 0, 0, 0 }, // 52
 
311
  { 15, 16, 0, 0 }, // 53
 
312
  { 10, 11, 0, 0 }, // 54
 
313
  { 10, 11, 0, 0 }, // 55
 
314
  { 16, 17, 0, 0 }, // 56
 
315
  { 16, 17, 0, 0 }, // 57
 
316
  { 10, 11, 0, 0 }, // 58
 
317
  { 10, 11, 0, 0 }, // 59
 
318
  { 15, 16, 0, 0 }, // 60
 
319
  { 15, 16, 0, 0 }, // 61
 
320
  { 15, 16, 0, 0 }, // 62
 
321
  { 15, 16, 0, 0 }, // 63
 
322
  { 15, 16, 0, 0 }, // 64
 
323
  { 23, 24, 0, 0 }, // 65
 
324
  { 25, 26, 0, 0 }, // 66
 
325
  { 24, 25, 0, 0 }, // 67
 
326
  { 21, 22, 0, 0 }, // 68
 
327
  { 24, 25, 0, 0 }, // 69
 
328
  { 21, 22, 0, 0 }, // 70
 
329
  { 26, 27, 0, 0 }, // 71
 
330
  { 21, 22, 0, 0 }, // 72
 
331
  { 21, 22, 0, 0 }, // 73
 
332
  { ~0U, ~0U, ~0U, ~0U } // end marker
 
333
};
 
334
 
 
335
static const llvm::InstrItinerary G4PlusItineraries[] = {
 
336
  { 9, 10, 0, 0 }, // 0
 
337
  { 34, 35, 0, 0 }, // 1
 
338
  { 34, 35, 0, 0 }, // 2
 
339
  { 34, 35, 0, 0 }, // 3
 
340
  { 29, 30, 0, 0 }, // 4
 
341
  { 40, 41, 0, 0 }, // 5
 
342
  { 41, 42, 0, 0 }, // 6
 
343
  { 29, 30, 0, 0 }, // 7
 
344
  { 29, 30, 0, 0 }, // 8
 
345
  { 42, 43, 0, 0 }, // 9
 
346
  { 0, 0, 0, 0 }, // 10
 
347
  { 27, 28, 0, 0 }, // 11
 
348
  { 0, 0, 0, 0 }, // 12
 
349
  { 28, 29, 0, 0 }, // 13
 
350
  { 27, 28, 0, 0 }, // 14
 
351
  { 29, 30, 0, 0 }, // 15
 
352
  { 30, 31, 0, 0 }, // 16
 
353
  { 29, 30, 0, 0 }, // 17
 
354
  { 0, 0, 0, 0 }, // 18
 
355
  { 0, 0, 0, 0 }, // 19
 
356
  { 31, 32, 0, 0 }, // 20
 
357
  { 31, 32, 0, 0 }, // 21
 
358
  { 32, 33, 0, 0 }, // 22
 
359
  { 0, 0, 0, 0 }, // 23
 
360
  { 27, 28, 0, 0 }, // 24
 
361
  { 0, 0, 0, 0 }, // 25
 
362
  { 33, 34, 0, 0 }, // 26
 
363
  { 0, 0, 0, 0 }, // 27
 
364
  { 33, 34, 0, 0 }, // 28
 
365
  { 0, 0, 0, 0 }, // 29
 
366
  { 12, 13, 0, 0 }, // 30
 
367
  { 12, 13, 0, 0 }, // 31
 
368
  { 12, 13, 0, 0 }, // 32
 
369
  { 12, 13, 0, 0 }, // 33
 
370
  { 32, 33, 0, 0 }, // 34
 
371
  { 0, 0, 0, 0 }, // 35
 
372
  { 0, 0, 0, 0 }, // 36
 
373
  { 35, 36, 0, 0 }, // 37
 
374
  { 35, 36, 0, 0 }, // 38
 
375
  { 12, 13, 0, 0 }, // 39
 
376
  { 36, 37, 0, 0 }, // 40
 
377
  { 12, 13, 0, 0 }, // 41
 
378
  { 12, 13, 0, 0 }, // 42
 
379
  { 12, 13, 0, 0 }, // 43
 
380
  { 0, 0, 0, 0 }, // 44
 
381
  { 0, 0, 0, 0 }, // 45
 
382
  { 12, 13, 0, 0 }, // 46
 
383
  { 12, 13, 0, 0 }, // 47
 
384
  { 12, 13, 0, 0 }, // 48
 
385
  { 12, 13, 0, 0 }, // 49
 
386
  { 37, 38, 0, 0 }, // 50
 
387
  { 12, 13, 0, 0 }, // 51
 
388
  { 0, 0, 0, 0 }, // 52
 
389
  { 38, 39, 0, 0 }, // 53
 
390
  { 34, 35, 0, 0 }, // 54
 
391
  { 32, 33, 0, 0 }, // 55
 
392
  { 31, 32, 0, 0 }, // 56
 
393
  { 31, 32, 0, 0 }, // 57
 
394
  { 39, 40, 0, 0 }, // 58
 
395
  { 34, 35, 0, 0 }, // 59
 
396
  { 34, 35, 0, 0 }, // 60
 
397
  { 34, 35, 0, 0 }, // 61
 
398
  { 34, 35, 0, 0 }, // 62
 
399
  { 27, 28, 0, 0 }, // 63
 
400
  { 38, 39, 0, 0 }, // 64
 
401
  { 12, 13, 0, 0 }, // 65
 
402
  { 43, 44, 0, 0 }, // 66
 
403
  { 24, 25, 0, 0 }, // 67
 
404
  { 30, 31, 0, 0 }, // 68
 
405
  { 45, 46, 0, 0 }, // 69
 
406
  { 21, 22, 0, 0 }, // 70
 
407
  { 44, 45, 0, 0 }, // 71
 
408
  { 44, 45, 0, 0 }, // 72
 
409
  { 44, 45, 0, 0 }, // 73
 
410
  { ~0U, ~0U, ~0U, ~0U } // end marker
 
411
};
 
412
 
 
413
static const llvm::InstrItinerary G5Itineraries[] = {
 
414
  { 9, 10, 0, 0 }, // 0
 
415
  { 56, 57, 0, 0 }, // 1
 
416
  { 57, 58, 0, 0 }, // 2
 
417
  { 58, 59, 0, 0 }, // 3
 
418
  { 65, 66, 0, 0 }, // 4
 
419
  { 66, 67, 0, 0 }, // 5
 
420
  { 66, 67, 0, 0 }, // 6
 
421
  { 51, 52, 0, 0 }, // 7
 
422
  { 51, 52, 0, 0 }, // 8
 
423
  { 51, 52, 0, 0 }, // 9
 
424
  { 67, 68, 0, 0 }, // 10
 
425
  { 46, 47, 0, 0 }, // 11
 
426
  { 47, 48, 0, 0 }, // 12
 
427
  { 48, 49, 0, 0 }, // 13
 
428
  { 8, 9, 0, 0 }, // 14
 
429
  { 49, 50, 0, 0 }, // 15
 
430
  { 50, 51, 0, 0 }, // 16
 
431
  { 51, 52, 0, 0 }, // 17
 
432
  { 0, 0, 0, 0 }, // 18
 
433
  { 52, 53, 0, 0 }, // 19
 
434
  { 53, 54, 0, 0 }, // 20
 
435
  { 53, 54, 0, 0 }, // 21
 
436
  { 54, 55, 0, 0 }, // 22
 
437
  { 55, 56, 0, 0 }, // 23
 
438
  { 54, 55, 0, 0 }, // 24
 
439
  { 8, 9, 0, 0 }, // 25
 
440
  { 8, 9, 0, 0 }, // 26
 
441
  { 1, 2, 0, 0 }, // 27
 
442
  { 1, 2, 0, 0 }, // 28
 
443
  { 0, 0, 0, 0 }, // 29
 
444
  { 12, 13, 0, 0 }, // 30
 
445
  { 0, 0, 0, 0 }, // 31
 
446
  { 59, 60, 0, 0 }, // 32
 
447
  { 12, 13, 0, 0 }, // 33
 
448
  { 60, 61, 0, 0 }, // 34
 
449
  { 12, 13, 0, 0 }, // 35
 
450
  { 61, 62, 0, 0 }, // 36
 
451
  { 12, 13, 0, 0 }, // 37
 
452
  { 22, 23, 0, 0 }, // 38
 
453
  { 22, 23, 0, 0 }, // 39
 
454
  { 62, 63, 0, 0 }, // 40
 
455
  { 12, 13, 0, 0 }, // 41
 
456
  { 22, 23, 0, 0 }, // 42
 
457
  { 61, 62, 0, 0 }, // 43
 
458
  { 60, 61, 0, 0 }, // 44
 
459
  { 11, 12, 0, 0 }, // 45
 
460
  { 12, 13, 0, 0 }, // 46
 
461
  { 61, 62, 0, 0 }, // 47
 
462
  { 22, 23, 0, 0 }, // 48
 
463
  { 61, 62, 0, 0 }, // 49
 
464
  { 37, 38, 0, 0 }, // 50
 
465
  { 35, 36, 0, 0 }, // 51
 
466
  { 0, 0, 0, 0 }, // 52
 
467
  { 60, 61, 0, 0 }, // 53
 
468
  { 34, 35, 0, 0 }, // 54
 
469
  { 32, 33, 0, 0 }, // 55
 
470
  { 32, 33, 0, 0 }, // 56
 
471
  { 12, 13, 0, 0 }, // 57
 
472
  { 63, 64, 0, 0 }, // 58
 
473
  { 12, 13, 0, 0 }, // 59
 
474
  { 64, 65, 0, 0 }, // 60
 
475
  { 12, 13, 0, 0 }, // 61
 
476
  { 0, 0, 0, 0 }, // 62
 
477
  { 0, 0, 0, 0 }, // 63
 
478
  { 55, 56, 0, 0 }, // 64
 
479
  { 12, 13, 0, 0 }, // 65
 
480
  { 70, 71, 0, 0 }, // 66
 
481
  { 69, 70, 0, 0 }, // 67
 
482
  { 30, 31, 0, 0 }, // 68
 
483
  { 69, 70, 0, 0 }, // 69
 
484
  { 68, 69, 0, 0 }, // 70
 
485
  { 71, 72, 0, 0 }, // 71
 
486
  { 68, 69, 0, 0 }, // 72
 
487
  { 71, 72, 0, 0 }, // 73
 
488
  { ~0U, ~0U, ~0U, ~0U } // end marker
 
489
};
 
490
 
 
491
// Sorted (by key) array of itineraries for CPU subtype.
 
492
static const llvm::SubtargetInfoKV ProcItinKV[] = {
 
493
  { "601", (void *)&G3Itineraries },
 
494
  { "602", (void *)&G3Itineraries },
 
495
  { "603", (void *)&G3Itineraries },
 
496
  { "603e", (void *)&G3Itineraries },
 
497
  { "603ev", (void *)&G3Itineraries },
 
498
  { "604", (void *)&G3Itineraries },
 
499
  { "604e", (void *)&G3Itineraries },
 
500
  { "620", (void *)&G3Itineraries },
 
501
  { "7400", (void *)&G4Itineraries },
 
502
  { "7450", (void *)&G4PlusItineraries },
 
503
  { "750", (void *)&G4Itineraries },
 
504
  { "970", (void *)&G5Itineraries },
 
505
  { "g3", (void *)&G3Itineraries },
 
506
  { "g4", (void *)&G4Itineraries },
 
507
  { "g4+", (void *)&G4PlusItineraries },
 
508
  { "g5", (void *)&G5Itineraries },
 
509
  { "generic", (void *)&G3Itineraries },
 
510
  { "ppc", (void *)&G3Itineraries },
 
511
  { "ppc64", (void *)&G5Itineraries }
 
512
};
 
513
 
 
514
enum {
 
515
  ProcItinKVSize = sizeof(ProcItinKV)/sizeof(llvm::SubtargetInfoKV)
 
516
};
 
517
 
 
518
// ParseSubtargetFeatures - Parses features string setting specified
 
519
// subtarget options.
 
520
std::string llvm::PPCSubtarget::ParseSubtargetFeatures(const std::string &FS,
 
521
                                  const std::string &CPU) {
 
522
  DEBUG(dbgs() << "\nFeatures:" << FS);
 
523
  DEBUG(dbgs() << "\nCPU:" << CPU);
 
524
  SubtargetFeatures Features(FS);
 
525
  Features.setCPUIfNone(CPU);
 
526
  uint32_t Bits =  Features.getBits(SubTypeKV, SubTypeKVSize,
 
527
                                    FeatureKV, FeatureKVSize);
 
528
  if ((Bits & Directive32) != 0 && DarwinDirective < PPC::DIR_32) DarwinDirective = PPC::DIR_32;
 
529
  if ((Bits & Directive601) != 0 && DarwinDirective < PPC::DIR_601) DarwinDirective = PPC::DIR_601;
 
530
  if ((Bits & Directive602) != 0 && DarwinDirective < PPC::DIR_602) DarwinDirective = PPC::DIR_602;
 
531
  if ((Bits & Directive603) != 0 && DarwinDirective < PPC::DIR_603) DarwinDirective = PPC::DIR_603;
 
532
  if ((Bits & Directive604) != 0 && DarwinDirective < PPC::DIR_603) DarwinDirective = PPC::DIR_603;
 
533
  if ((Bits & Directive620) != 0 && DarwinDirective < PPC::DIR_603) DarwinDirective = PPC::DIR_603;
 
534
  if ((Bits & Directive64) != 0 && DarwinDirective < PPC::DIR_64) DarwinDirective = PPC::DIR_64;
 
535
  if ((Bits & Directive7400) != 0 && DarwinDirective < PPC::DIR_7400) DarwinDirective = PPC::DIR_7400;
 
536
  if ((Bits & Directive750) != 0 && DarwinDirective < PPC::DIR_750) DarwinDirective = PPC::DIR_750;
 
537
  if ((Bits & Directive970) != 0 && DarwinDirective < PPC::DIR_970) DarwinDirective = PPC::DIR_970;
 
538
  if ((Bits & Feature64Bit) != 0) Has64BitSupport = true;
 
539
  if ((Bits & Feature64BitRegs) != 0) Use64BitRegs = true;
 
540
  if ((Bits & FeatureAltivec) != 0) HasAltivec = true;
 
541
  if ((Bits & FeatureFSqrt) != 0) HasFSQRT = true;
 
542
  if ((Bits & FeatureGPUL) != 0) IsGigaProcessor = true;
 
543
  if ((Bits & FeatureSTFIWX) != 0) HasSTFIWX = true;
 
544
 
 
545
  InstrItinerary *Itinerary = (InstrItinerary *)Features.getInfo(ProcItinKV, ProcItinKVSize);
 
546
  InstrItins = InstrItineraryData(Stages, OperandCycles, Itinerary);
 
547
  return Features.getCPU();
 
548
}