LLVM: lib/Target/VE/VE.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_LIB_TARGET_VE_VE_H
15#define LLVM_LIB_TARGET_VE_VE_H
16
21
22namespace llvm {
29
34
37}
38
39namespace llvm {
40
41
72
73
85
87 switch (CC) {
110 default:
112 }
113}
114
128
150
154
156 switch (CC) {
158 return 1;
160 return 2;
162 return 3;
164 return 4;
166 return 5;
168 return 6;
170 return 0;
172 return 1;
174 return 2;
176 return 3;
178 return 4;
180 return 5;
182 return 6;
184 return 7;
186 return 8;
188 return 9;
190 return 10;
192 return 11;
194 return 12;
196 return 13;
198 return 14;
200 return 15;
201 default:
203 }
204}
205
207 if (IsInteger) {
208 switch (Val) {
209 case 0:
211 case 1:
213 case 2:
215 case 3:
217 case 4:
219 case 5:
221 case 6:
223 case 15:
225 }
226 } else {
227 switch (Val) {
228 case 0:
230 case 1:
232 case 2:
234 case 3:
236 case 4:
238 case 5:
240 case 6:
242 case 7:
244 case 8:
246 case 9:
248 case 10:
250 case 11:
252 case 12:
254 case 13:
256 case 14:
258 case 15:
260 }
261 }
263}
264
266 switch (R) {
268 return "";
270 return ".rz";
272 return ".rp";
274 return ".rm";
276 return ".rn";
278 return ".ra";
279 default:
281 }
282}
283
294
296 switch (R) {
303 return static_cast<unsigned>(R);
304 default:
305 break;
306 }
308}
309
311 switch (Val) {
324 default:
325 break;
326 }
328}
329
330
331
333 if (Val == 0) {
334
335 return true;
336 }
338
339 return true;
340 }
341
343}
344
346 if (Val == 0) {
347
348 return true;
349 }
351
352 return true;
353 }
354
356}
357
358
360 if (Val == 0)
361 return 0;
362 if (Val & (UINT64_C(1) << 63))
365}
366
367
369 if (Val == 0)
370 return 0;
371 if ((Val & 0x40) == 0)
372 return (uint64_t)((INT64_C(1) << 63) >> (Val & 0x3f));
373 return ((uint64_t)INT64_C(-1) >> (Val & 0x3f));
374}
375
376inline unsigned M0(unsigned Val) { return Val + 64; }
377inline unsigned M1(unsigned Val) { return Val; }
378
381
382}
383#endif
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
This class is intended to be used as a driving class for all asm writers.
FunctionPass class - This class is used to implement most global optimizations.
Instances of this class represent a single low-level machine instruction.
Representation of each machine instruction.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
StringRef - Represent a constant reference to a string, i.e.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
CondCode
Definition VE.h:43
@ CC_GENAN
Definition VE.h:66
@ CC_EQNAN
Definition VE.h:65
@ CC_NENAN
Definition VE.h:64
@ CC_LE
Definition VE.h:59
@ CC_LENAN
Definition VE.h:67
@ CC_ILE
Definition VE.h:50
@ CC_NUM
Definition VE.h:60
@ CC_EQ
Definition VE.h:57
@ CC_GNAN
Definition VE.h:62
@ CC_IG
Definition VE.h:45
@ CC_INE
Definition VE.h:47
@ CC_AF
Definition VE.h:53
@ CC_GE
Definition VE.h:58
@ CC_NE
Definition VE.h:56
@ CC_LNAN
Definition VE.h:63
@ CC_IEQ
Definition VE.h:48
@ UNKNOWN
Definition VE.h:69
@ CC_AT
Definition VE.h:68
@ CC_NAN
Definition VE.h:61
@ CC_IGE
Definition VE.h:49
@ CC_IL
Definition VE.h:46
RoundingMode
Definition VE.h:75
@ UNKNOWN
Definition VE.h:82
@ RD_RP
Definition VE.h:78
@ RD_NONE
Definition VE.h:76
@ RD_RN
Definition VE.h:80
@ RD_RZ
Definition VE.h:77
@ RD_RM
Definition VE.h:79
@ RD_RA
Definition VE.h:81
This is an optimization pass for GlobalISel generic memory operations.
static bool isIntVECondCode(VECC::CondCode CC)
Definition VE.h:151
void initializeVEDAGToDAGISelLegacyPass(PassRegistry &)
constexpr bool isMask_32(uint32_t Value)
Return true if the argument is a non-empty sequence of ones starting at the least significant bit wit...
FunctionPass * createLVLGenPass()
FunctionPass * createVEISelDag(VETargetMachine &TM)
createVEISelDag - This pass converts a legalized DAG into a VE-specific DAG, ready for instruction sc...
void LowerVEMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, AsmPrinter &AP)
constexpr bool isShiftedMask_32(uint32_t Value)
Return true if the argument contains a non-empty sequence of ones with the remainder zero (32 bit ver...
constexpr bool isShiftedMask_64(uint64_t Value)
Return true if the argument contains a non-empty sequence of ones with the remainder zero (64 bit ver...
unsigned M1(unsigned Val)
Definition VE.h:377
static const unsigned StandardVectorWidth
Definition VE.h:379
int countl_zero(T Val)
Count number of 0's from the most significant bit to the least stopping at the first 1.
static VECC::CondCode VEValToCondCode(unsigned Val, bool IsInteger)
Definition VE.h:206
static const unsigned PackedVectorWidth
Definition VE.h:380
static VECC::CondCode stringToVEFCondCode(StringRef S)
Definition VE.h:129
static const char * VECondCodeToString(VECC::CondCode CC)
Definition VE.h:86
static unsigned VECondCodeToVal(VECC::CondCode CC)
Definition VE.h:155
constexpr bool isMask_64(uint64_t Value)
Return true if the argument is a non-empty sequence of ones starting at the least significant bit wit...
static uint64_t val2MImm(uint64_t Val)
val2MImm - Convert an integer immediate value to target MImm immediate.
Definition VE.h:359
int countl_one(T Value)
Count the number of ones from the most significant bit to the first zero bit.
static unsigned VERDToVal(VERD::RoundingMode R)
Definition VE.h:295
static uint64_t mimm2Val(uint64_t Val)
mimm2Val - Convert a target MImm immediate to an integer immediate value.
Definition VE.h:368
unsigned M0(unsigned Val)
Definition VE.h:376
static VERD::RoundingMode VEValToRD(unsigned Val)
Definition VE.h:310
void initializeVEAsmPrinterPass(PassRegistry &)
static bool isMImmVal(uint64_t Val)
Definition VE.h:332
static const char * VERDToString(VERD::RoundingMode R)
Definition VE.h:265
static VERD::RoundingMode stringToVERD(StringRef S)
Definition VE.h:284
static bool isMImm32Val(uint32_t Val)
Definition VE.h:345
static VECC::CondCode stringToVEICondCode(StringRef S)
Definition VE.h:115