1 | #ifdef GET_OPCODE_NAMES |
2 | OP_AddSint8, |
3 | OP_AddUint8, |
4 | OP_AddSint16, |
5 | OP_AddUint16, |
6 | OP_AddSint32, |
7 | OP_AddUint32, |
8 | OP_AddSint64, |
9 | OP_AddUint64, |
10 | OP_AddIntAP, |
11 | OP_AddIntAPS, |
12 | OP_AddBool, |
13 | OP_AddFixedPoint, |
14 | #endif |
15 | #ifdef GET_INTERP |
16 | case OP_AddSint8: { |
17 | if (!Add<PT_Sint8>(S, OpPC)) |
18 | return false; |
19 | continue; |
20 | } |
21 | case OP_AddUint8: { |
22 | if (!Add<PT_Uint8>(S, OpPC)) |
23 | return false; |
24 | continue; |
25 | } |
26 | case OP_AddSint16: { |
27 | if (!Add<PT_Sint16>(S, OpPC)) |
28 | return false; |
29 | continue; |
30 | } |
31 | case OP_AddUint16: { |
32 | if (!Add<PT_Uint16>(S, OpPC)) |
33 | return false; |
34 | continue; |
35 | } |
36 | case OP_AddSint32: { |
37 | if (!Add<PT_Sint32>(S, OpPC)) |
38 | return false; |
39 | continue; |
40 | } |
41 | case OP_AddUint32: { |
42 | if (!Add<PT_Uint32>(S, OpPC)) |
43 | return false; |
44 | continue; |
45 | } |
46 | case OP_AddSint64: { |
47 | if (!Add<PT_Sint64>(S, OpPC)) |
48 | return false; |
49 | continue; |
50 | } |
51 | case OP_AddUint64: { |
52 | if (!Add<PT_Uint64>(S, OpPC)) |
53 | return false; |
54 | continue; |
55 | } |
56 | case OP_AddIntAP: { |
57 | if (!Add<PT_IntAP>(S, OpPC)) |
58 | return false; |
59 | continue; |
60 | } |
61 | case OP_AddIntAPS: { |
62 | if (!Add<PT_IntAPS>(S, OpPC)) |
63 | return false; |
64 | continue; |
65 | } |
66 | case OP_AddBool: { |
67 | if (!Add<PT_Bool>(S, OpPC)) |
68 | return false; |
69 | continue; |
70 | } |
71 | case OP_AddFixedPoint: { |
72 | if (!Add<PT_FixedPoint>(S, OpPC)) |
73 | return false; |
74 | continue; |
75 | } |
76 | #endif |
77 | #ifdef GET_DISASM |
78 | case OP_AddSint8: |
79 | Text.Op = PrintName("AddSint8" ); |
80 | break; |
81 | case OP_AddUint8: |
82 | Text.Op = PrintName("AddUint8" ); |
83 | break; |
84 | case OP_AddSint16: |
85 | Text.Op = PrintName("AddSint16" ); |
86 | break; |
87 | case OP_AddUint16: |
88 | Text.Op = PrintName("AddUint16" ); |
89 | break; |
90 | case OP_AddSint32: |
91 | Text.Op = PrintName("AddSint32" ); |
92 | break; |
93 | case OP_AddUint32: |
94 | Text.Op = PrintName("AddUint32" ); |
95 | break; |
96 | case OP_AddSint64: |
97 | Text.Op = PrintName("AddSint64" ); |
98 | break; |
99 | case OP_AddUint64: |
100 | Text.Op = PrintName("AddUint64" ); |
101 | break; |
102 | case OP_AddIntAP: |
103 | Text.Op = PrintName("AddIntAP" ); |
104 | break; |
105 | case OP_AddIntAPS: |
106 | Text.Op = PrintName("AddIntAPS" ); |
107 | break; |
108 | case OP_AddBool: |
109 | Text.Op = PrintName("AddBool" ); |
110 | break; |
111 | case OP_AddFixedPoint: |
112 | Text.Op = PrintName("AddFixedPoint" ); |
113 | break; |
114 | #endif |
115 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
116 | bool emitAddSint8(const SourceInfo &); |
117 | bool emitAddUint8(const SourceInfo &); |
118 | bool emitAddSint16(const SourceInfo &); |
119 | bool emitAddUint16(const SourceInfo &); |
120 | bool emitAddSint32(const SourceInfo &); |
121 | bool emitAddUint32(const SourceInfo &); |
122 | bool emitAddSint64(const SourceInfo &); |
123 | bool emitAddUint64(const SourceInfo &); |
124 | bool emitAddIntAP(const SourceInfo &); |
125 | bool emitAddIntAPS(const SourceInfo &); |
126 | bool emitAddBool(const SourceInfo &); |
127 | bool emitAddFixedPoint(const SourceInfo &); |
128 | #endif |
129 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
130 | [[nodiscard]] bool emitAdd(PrimType, const SourceInfo &I); |
131 | #endif |
132 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
133 | bool |
134 | #if defined(GET_EVAL_IMPL) |
135 | EvalEmitter |
136 | #else |
137 | ByteCodeEmitter |
138 | #endif |
139 | ::emitAdd(PrimType T0, const SourceInfo &I) { |
140 | switch (T0) { |
141 | case PT_Sint8: |
142 | return emitAddSint8(I); |
143 | case PT_Uint8: |
144 | return emitAddUint8(I); |
145 | case PT_Sint16: |
146 | return emitAddSint16(I); |
147 | case PT_Uint16: |
148 | return emitAddUint16(I); |
149 | case PT_Sint32: |
150 | return emitAddSint32(I); |
151 | case PT_Uint32: |
152 | return emitAddUint32(I); |
153 | case PT_Sint64: |
154 | return emitAddSint64(I); |
155 | case PT_Uint64: |
156 | return emitAddUint64(I); |
157 | case PT_IntAP: |
158 | return emitAddIntAP(I); |
159 | case PT_IntAPS: |
160 | return emitAddIntAPS(I); |
161 | case PT_Bool: |
162 | return emitAddBool(I); |
163 | case PT_FixedPoint: |
164 | return emitAddFixedPoint(I); |
165 | default: llvm_unreachable("invalid type: emitAdd" ); |
166 | } |
167 | llvm_unreachable("invalid enum value" ); |
168 | } |
169 | #endif |
170 | #ifdef GET_LINK_IMPL |
171 | bool ByteCodeEmitter::emitAddSint8(const SourceInfo &L) { |
172 | return emitOp<>(OP_AddSint8, L); |
173 | } |
174 | bool ByteCodeEmitter::emitAddUint8(const SourceInfo &L) { |
175 | return emitOp<>(OP_AddUint8, L); |
176 | } |
177 | bool ByteCodeEmitter::emitAddSint16(const SourceInfo &L) { |
178 | return emitOp<>(OP_AddSint16, L); |
179 | } |
180 | bool ByteCodeEmitter::emitAddUint16(const SourceInfo &L) { |
181 | return emitOp<>(OP_AddUint16, L); |
182 | } |
183 | bool ByteCodeEmitter::emitAddSint32(const SourceInfo &L) { |
184 | return emitOp<>(OP_AddSint32, L); |
185 | } |
186 | bool ByteCodeEmitter::emitAddUint32(const SourceInfo &L) { |
187 | return emitOp<>(OP_AddUint32, L); |
188 | } |
189 | bool ByteCodeEmitter::emitAddSint64(const SourceInfo &L) { |
190 | return emitOp<>(OP_AddSint64, L); |
191 | } |
192 | bool ByteCodeEmitter::emitAddUint64(const SourceInfo &L) { |
193 | return emitOp<>(OP_AddUint64, L); |
194 | } |
195 | bool ByteCodeEmitter::emitAddIntAP(const SourceInfo &L) { |
196 | return emitOp<>(OP_AddIntAP, L); |
197 | } |
198 | bool ByteCodeEmitter::emitAddIntAPS(const SourceInfo &L) { |
199 | return emitOp<>(OP_AddIntAPS, L); |
200 | } |
201 | bool ByteCodeEmitter::emitAddBool(const SourceInfo &L) { |
202 | return emitOp<>(OP_AddBool, L); |
203 | } |
204 | bool ByteCodeEmitter::emitAddFixedPoint(const SourceInfo &L) { |
205 | return emitOp<>(OP_AddFixedPoint, L); |
206 | } |
207 | #endif |
208 | #ifdef GET_EVAL_IMPL |
209 | bool EvalEmitter::emitAddSint8(const SourceInfo &L) { |
210 | if (!isActive()) return true; |
211 | CurrentSource = L; |
212 | return Add<PT_Sint8>(S, OpPC); |
213 | } |
214 | bool EvalEmitter::emitAddUint8(const SourceInfo &L) { |
215 | if (!isActive()) return true; |
216 | CurrentSource = L; |
217 | return Add<PT_Uint8>(S, OpPC); |
218 | } |
219 | bool EvalEmitter::emitAddSint16(const SourceInfo &L) { |
220 | if (!isActive()) return true; |
221 | CurrentSource = L; |
222 | return Add<PT_Sint16>(S, OpPC); |
223 | } |
224 | bool EvalEmitter::emitAddUint16(const SourceInfo &L) { |
225 | if (!isActive()) return true; |
226 | CurrentSource = L; |
227 | return Add<PT_Uint16>(S, OpPC); |
228 | } |
229 | bool EvalEmitter::emitAddSint32(const SourceInfo &L) { |
230 | if (!isActive()) return true; |
231 | CurrentSource = L; |
232 | return Add<PT_Sint32>(S, OpPC); |
233 | } |
234 | bool EvalEmitter::emitAddUint32(const SourceInfo &L) { |
235 | if (!isActive()) return true; |
236 | CurrentSource = L; |
237 | return Add<PT_Uint32>(S, OpPC); |
238 | } |
239 | bool EvalEmitter::emitAddSint64(const SourceInfo &L) { |
240 | if (!isActive()) return true; |
241 | CurrentSource = L; |
242 | return Add<PT_Sint64>(S, OpPC); |
243 | } |
244 | bool EvalEmitter::emitAddUint64(const SourceInfo &L) { |
245 | if (!isActive()) return true; |
246 | CurrentSource = L; |
247 | return Add<PT_Uint64>(S, OpPC); |
248 | } |
249 | bool EvalEmitter::emitAddIntAP(const SourceInfo &L) { |
250 | if (!isActive()) return true; |
251 | CurrentSource = L; |
252 | return Add<PT_IntAP>(S, OpPC); |
253 | } |
254 | bool EvalEmitter::emitAddIntAPS(const SourceInfo &L) { |
255 | if (!isActive()) return true; |
256 | CurrentSource = L; |
257 | return Add<PT_IntAPS>(S, OpPC); |
258 | } |
259 | bool EvalEmitter::emitAddBool(const SourceInfo &L) { |
260 | if (!isActive()) return true; |
261 | CurrentSource = L; |
262 | return Add<PT_Bool>(S, OpPC); |
263 | } |
264 | bool EvalEmitter::emitAddFixedPoint(const SourceInfo &L) { |
265 | if (!isActive()) return true; |
266 | CurrentSource = L; |
267 | return Add<PT_FixedPoint>(S, OpPC); |
268 | } |
269 | #endif |
270 | #ifdef GET_OPCODE_NAMES |
271 | OP_AddOffsetSint8, |
272 | OP_AddOffsetUint8, |
273 | OP_AddOffsetSint16, |
274 | OP_AddOffsetUint16, |
275 | OP_AddOffsetSint32, |
276 | OP_AddOffsetUint32, |
277 | OP_AddOffsetSint64, |
278 | OP_AddOffsetUint64, |
279 | OP_AddOffsetIntAP, |
280 | OP_AddOffsetIntAPS, |
281 | OP_AddOffsetBool, |
282 | OP_AddOffsetFixedPoint, |
283 | #endif |
284 | #ifdef GET_INTERP |
285 | case OP_AddOffsetSint8: { |
286 | if (!AddOffset<PT_Sint8>(S, OpPC)) |
287 | return false; |
288 | continue; |
289 | } |
290 | case OP_AddOffsetUint8: { |
291 | if (!AddOffset<PT_Uint8>(S, OpPC)) |
292 | return false; |
293 | continue; |
294 | } |
295 | case OP_AddOffsetSint16: { |
296 | if (!AddOffset<PT_Sint16>(S, OpPC)) |
297 | return false; |
298 | continue; |
299 | } |
300 | case OP_AddOffsetUint16: { |
301 | if (!AddOffset<PT_Uint16>(S, OpPC)) |
302 | return false; |
303 | continue; |
304 | } |
305 | case OP_AddOffsetSint32: { |
306 | if (!AddOffset<PT_Sint32>(S, OpPC)) |
307 | return false; |
308 | continue; |
309 | } |
310 | case OP_AddOffsetUint32: { |
311 | if (!AddOffset<PT_Uint32>(S, OpPC)) |
312 | return false; |
313 | continue; |
314 | } |
315 | case OP_AddOffsetSint64: { |
316 | if (!AddOffset<PT_Sint64>(S, OpPC)) |
317 | return false; |
318 | continue; |
319 | } |
320 | case OP_AddOffsetUint64: { |
321 | if (!AddOffset<PT_Uint64>(S, OpPC)) |
322 | return false; |
323 | continue; |
324 | } |
325 | case OP_AddOffsetIntAP: { |
326 | if (!AddOffset<PT_IntAP>(S, OpPC)) |
327 | return false; |
328 | continue; |
329 | } |
330 | case OP_AddOffsetIntAPS: { |
331 | if (!AddOffset<PT_IntAPS>(S, OpPC)) |
332 | return false; |
333 | continue; |
334 | } |
335 | case OP_AddOffsetBool: { |
336 | if (!AddOffset<PT_Bool>(S, OpPC)) |
337 | return false; |
338 | continue; |
339 | } |
340 | case OP_AddOffsetFixedPoint: { |
341 | if (!AddOffset<PT_FixedPoint>(S, OpPC)) |
342 | return false; |
343 | continue; |
344 | } |
345 | #endif |
346 | #ifdef GET_DISASM |
347 | case OP_AddOffsetSint8: |
348 | Text.Op = PrintName("AddOffsetSint8" ); |
349 | break; |
350 | case OP_AddOffsetUint8: |
351 | Text.Op = PrintName("AddOffsetUint8" ); |
352 | break; |
353 | case OP_AddOffsetSint16: |
354 | Text.Op = PrintName("AddOffsetSint16" ); |
355 | break; |
356 | case OP_AddOffsetUint16: |
357 | Text.Op = PrintName("AddOffsetUint16" ); |
358 | break; |
359 | case OP_AddOffsetSint32: |
360 | Text.Op = PrintName("AddOffsetSint32" ); |
361 | break; |
362 | case OP_AddOffsetUint32: |
363 | Text.Op = PrintName("AddOffsetUint32" ); |
364 | break; |
365 | case OP_AddOffsetSint64: |
366 | Text.Op = PrintName("AddOffsetSint64" ); |
367 | break; |
368 | case OP_AddOffsetUint64: |
369 | Text.Op = PrintName("AddOffsetUint64" ); |
370 | break; |
371 | case OP_AddOffsetIntAP: |
372 | Text.Op = PrintName("AddOffsetIntAP" ); |
373 | break; |
374 | case OP_AddOffsetIntAPS: |
375 | Text.Op = PrintName("AddOffsetIntAPS" ); |
376 | break; |
377 | case OP_AddOffsetBool: |
378 | Text.Op = PrintName("AddOffsetBool" ); |
379 | break; |
380 | case OP_AddOffsetFixedPoint: |
381 | Text.Op = PrintName("AddOffsetFixedPoint" ); |
382 | break; |
383 | #endif |
384 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
385 | bool emitAddOffsetSint8(const SourceInfo &); |
386 | bool emitAddOffsetUint8(const SourceInfo &); |
387 | bool emitAddOffsetSint16(const SourceInfo &); |
388 | bool emitAddOffsetUint16(const SourceInfo &); |
389 | bool emitAddOffsetSint32(const SourceInfo &); |
390 | bool emitAddOffsetUint32(const SourceInfo &); |
391 | bool emitAddOffsetSint64(const SourceInfo &); |
392 | bool emitAddOffsetUint64(const SourceInfo &); |
393 | bool emitAddOffsetIntAP(const SourceInfo &); |
394 | bool emitAddOffsetIntAPS(const SourceInfo &); |
395 | bool emitAddOffsetBool(const SourceInfo &); |
396 | bool emitAddOffsetFixedPoint(const SourceInfo &); |
397 | #endif |
398 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
399 | [[nodiscard]] bool emitAddOffset(PrimType, const SourceInfo &I); |
400 | #endif |
401 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
402 | bool |
403 | #if defined(GET_EVAL_IMPL) |
404 | EvalEmitter |
405 | #else |
406 | ByteCodeEmitter |
407 | #endif |
408 | ::emitAddOffset(PrimType T0, const SourceInfo &I) { |
409 | switch (T0) { |
410 | case PT_Sint8: |
411 | return emitAddOffsetSint8(I); |
412 | case PT_Uint8: |
413 | return emitAddOffsetUint8(I); |
414 | case PT_Sint16: |
415 | return emitAddOffsetSint16(I); |
416 | case PT_Uint16: |
417 | return emitAddOffsetUint16(I); |
418 | case PT_Sint32: |
419 | return emitAddOffsetSint32(I); |
420 | case PT_Uint32: |
421 | return emitAddOffsetUint32(I); |
422 | case PT_Sint64: |
423 | return emitAddOffsetSint64(I); |
424 | case PT_Uint64: |
425 | return emitAddOffsetUint64(I); |
426 | case PT_IntAP: |
427 | return emitAddOffsetIntAP(I); |
428 | case PT_IntAPS: |
429 | return emitAddOffsetIntAPS(I); |
430 | case PT_Bool: |
431 | return emitAddOffsetBool(I); |
432 | case PT_FixedPoint: |
433 | return emitAddOffsetFixedPoint(I); |
434 | default: llvm_unreachable("invalid type: emitAddOffset" ); |
435 | } |
436 | llvm_unreachable("invalid enum value" ); |
437 | } |
438 | #endif |
439 | #ifdef GET_LINK_IMPL |
440 | bool ByteCodeEmitter::emitAddOffsetSint8(const SourceInfo &L) { |
441 | return emitOp<>(OP_AddOffsetSint8, L); |
442 | } |
443 | bool ByteCodeEmitter::emitAddOffsetUint8(const SourceInfo &L) { |
444 | return emitOp<>(OP_AddOffsetUint8, L); |
445 | } |
446 | bool ByteCodeEmitter::emitAddOffsetSint16(const SourceInfo &L) { |
447 | return emitOp<>(OP_AddOffsetSint16, L); |
448 | } |
449 | bool ByteCodeEmitter::emitAddOffsetUint16(const SourceInfo &L) { |
450 | return emitOp<>(OP_AddOffsetUint16, L); |
451 | } |
452 | bool ByteCodeEmitter::emitAddOffsetSint32(const SourceInfo &L) { |
453 | return emitOp<>(OP_AddOffsetSint32, L); |
454 | } |
455 | bool ByteCodeEmitter::emitAddOffsetUint32(const SourceInfo &L) { |
456 | return emitOp<>(OP_AddOffsetUint32, L); |
457 | } |
458 | bool ByteCodeEmitter::emitAddOffsetSint64(const SourceInfo &L) { |
459 | return emitOp<>(OP_AddOffsetSint64, L); |
460 | } |
461 | bool ByteCodeEmitter::emitAddOffsetUint64(const SourceInfo &L) { |
462 | return emitOp<>(OP_AddOffsetUint64, L); |
463 | } |
464 | bool ByteCodeEmitter::emitAddOffsetIntAP(const SourceInfo &L) { |
465 | return emitOp<>(OP_AddOffsetIntAP, L); |
466 | } |
467 | bool ByteCodeEmitter::emitAddOffsetIntAPS(const SourceInfo &L) { |
468 | return emitOp<>(OP_AddOffsetIntAPS, L); |
469 | } |
470 | bool ByteCodeEmitter::emitAddOffsetBool(const SourceInfo &L) { |
471 | return emitOp<>(OP_AddOffsetBool, L); |
472 | } |
473 | bool ByteCodeEmitter::emitAddOffsetFixedPoint(const SourceInfo &L) { |
474 | return emitOp<>(OP_AddOffsetFixedPoint, L); |
475 | } |
476 | #endif |
477 | #ifdef GET_EVAL_IMPL |
478 | bool EvalEmitter::emitAddOffsetSint8(const SourceInfo &L) { |
479 | if (!isActive()) return true; |
480 | CurrentSource = L; |
481 | return AddOffset<PT_Sint8>(S, OpPC); |
482 | } |
483 | bool EvalEmitter::emitAddOffsetUint8(const SourceInfo &L) { |
484 | if (!isActive()) return true; |
485 | CurrentSource = L; |
486 | return AddOffset<PT_Uint8>(S, OpPC); |
487 | } |
488 | bool EvalEmitter::emitAddOffsetSint16(const SourceInfo &L) { |
489 | if (!isActive()) return true; |
490 | CurrentSource = L; |
491 | return AddOffset<PT_Sint16>(S, OpPC); |
492 | } |
493 | bool EvalEmitter::emitAddOffsetUint16(const SourceInfo &L) { |
494 | if (!isActive()) return true; |
495 | CurrentSource = L; |
496 | return AddOffset<PT_Uint16>(S, OpPC); |
497 | } |
498 | bool EvalEmitter::emitAddOffsetSint32(const SourceInfo &L) { |
499 | if (!isActive()) return true; |
500 | CurrentSource = L; |
501 | return AddOffset<PT_Sint32>(S, OpPC); |
502 | } |
503 | bool EvalEmitter::emitAddOffsetUint32(const SourceInfo &L) { |
504 | if (!isActive()) return true; |
505 | CurrentSource = L; |
506 | return AddOffset<PT_Uint32>(S, OpPC); |
507 | } |
508 | bool EvalEmitter::emitAddOffsetSint64(const SourceInfo &L) { |
509 | if (!isActive()) return true; |
510 | CurrentSource = L; |
511 | return AddOffset<PT_Sint64>(S, OpPC); |
512 | } |
513 | bool EvalEmitter::emitAddOffsetUint64(const SourceInfo &L) { |
514 | if (!isActive()) return true; |
515 | CurrentSource = L; |
516 | return AddOffset<PT_Uint64>(S, OpPC); |
517 | } |
518 | bool EvalEmitter::emitAddOffsetIntAP(const SourceInfo &L) { |
519 | if (!isActive()) return true; |
520 | CurrentSource = L; |
521 | return AddOffset<PT_IntAP>(S, OpPC); |
522 | } |
523 | bool EvalEmitter::emitAddOffsetIntAPS(const SourceInfo &L) { |
524 | if (!isActive()) return true; |
525 | CurrentSource = L; |
526 | return AddOffset<PT_IntAPS>(S, OpPC); |
527 | } |
528 | bool EvalEmitter::emitAddOffsetBool(const SourceInfo &L) { |
529 | if (!isActive()) return true; |
530 | CurrentSource = L; |
531 | return AddOffset<PT_Bool>(S, OpPC); |
532 | } |
533 | bool EvalEmitter::emitAddOffsetFixedPoint(const SourceInfo &L) { |
534 | if (!isActive()) return true; |
535 | CurrentSource = L; |
536 | return AddOffset<PT_FixedPoint>(S, OpPC); |
537 | } |
538 | #endif |
539 | #ifdef GET_OPCODE_NAMES |
540 | OP_Addf, |
541 | #endif |
542 | #ifdef GET_INTERP |
543 | case OP_Addf: { |
544 | const auto V0 = ReadArg<uint32_t>(S, PC); |
545 | if (!Addf(S, OpPC, V0)) |
546 | return false; |
547 | continue; |
548 | } |
549 | #endif |
550 | #ifdef GET_DISASM |
551 | case OP_Addf: |
552 | Text.Op = PrintName("Addf" ); |
553 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
554 | break; |
555 | #endif |
556 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
557 | bool emitAddf( uint32_t , const SourceInfo &); |
558 | #endif |
559 | #ifdef GET_LINK_IMPL |
560 | bool ByteCodeEmitter::emitAddf( uint32_t A0, const SourceInfo &L) { |
561 | return emitOp<uint32_t>(OP_Addf, A0, L); |
562 | } |
563 | #endif |
564 | #ifdef GET_EVAL_IMPL |
565 | bool EvalEmitter::emitAddf( uint32_t A0, const SourceInfo &L) { |
566 | if (!isActive()) return true; |
567 | CurrentSource = L; |
568 | return Addf(S, OpPC, A0); |
569 | } |
570 | #endif |
571 | #ifdef GET_OPCODE_NAMES |
572 | OP_Alloc, |
573 | #endif |
574 | #ifdef GET_INTERP |
575 | case OP_Alloc: { |
576 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
577 | if (!Alloc(S, OpPC, V0)) |
578 | return false; |
579 | continue; |
580 | } |
581 | #endif |
582 | #ifdef GET_DISASM |
583 | case OP_Alloc: |
584 | Text.Op = PrintName("Alloc" ); |
585 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
586 | break; |
587 | #endif |
588 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
589 | bool emitAlloc( const Descriptor * , const SourceInfo &); |
590 | #endif |
591 | #ifdef GET_LINK_IMPL |
592 | bool ByteCodeEmitter::emitAlloc( const Descriptor * A0, const SourceInfo &L) { |
593 | return emitOp<const Descriptor *>(OP_Alloc, A0, L); |
594 | } |
595 | #endif |
596 | #ifdef GET_EVAL_IMPL |
597 | bool EvalEmitter::emitAlloc( const Descriptor * A0, const SourceInfo &L) { |
598 | if (!isActive()) return true; |
599 | CurrentSource = L; |
600 | return Alloc(S, OpPC, A0); |
601 | } |
602 | #endif |
603 | #ifdef GET_OPCODE_NAMES |
604 | OP_AllocCNSint8, |
605 | OP_AllocCNUint8, |
606 | OP_AllocCNSint16, |
607 | OP_AllocCNUint16, |
608 | OP_AllocCNSint32, |
609 | OP_AllocCNUint32, |
610 | OP_AllocCNSint64, |
611 | OP_AllocCNUint64, |
612 | OP_AllocCNIntAP, |
613 | OP_AllocCNIntAPS, |
614 | #endif |
615 | #ifdef GET_INTERP |
616 | case OP_AllocCNSint8: { |
617 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
618 | const auto V1 = ReadArg<bool>(S, PC); |
619 | if (!AllocCN<PT_Sint8>(S, OpPC, V0, V1)) |
620 | return false; |
621 | continue; |
622 | } |
623 | case OP_AllocCNUint8: { |
624 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
625 | const auto V1 = ReadArg<bool>(S, PC); |
626 | if (!AllocCN<PT_Uint8>(S, OpPC, V0, V1)) |
627 | return false; |
628 | continue; |
629 | } |
630 | case OP_AllocCNSint16: { |
631 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
632 | const auto V1 = ReadArg<bool>(S, PC); |
633 | if (!AllocCN<PT_Sint16>(S, OpPC, V0, V1)) |
634 | return false; |
635 | continue; |
636 | } |
637 | case OP_AllocCNUint16: { |
638 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
639 | const auto V1 = ReadArg<bool>(S, PC); |
640 | if (!AllocCN<PT_Uint16>(S, OpPC, V0, V1)) |
641 | return false; |
642 | continue; |
643 | } |
644 | case OP_AllocCNSint32: { |
645 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
646 | const auto V1 = ReadArg<bool>(S, PC); |
647 | if (!AllocCN<PT_Sint32>(S, OpPC, V0, V1)) |
648 | return false; |
649 | continue; |
650 | } |
651 | case OP_AllocCNUint32: { |
652 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
653 | const auto V1 = ReadArg<bool>(S, PC); |
654 | if (!AllocCN<PT_Uint32>(S, OpPC, V0, V1)) |
655 | return false; |
656 | continue; |
657 | } |
658 | case OP_AllocCNSint64: { |
659 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
660 | const auto V1 = ReadArg<bool>(S, PC); |
661 | if (!AllocCN<PT_Sint64>(S, OpPC, V0, V1)) |
662 | return false; |
663 | continue; |
664 | } |
665 | case OP_AllocCNUint64: { |
666 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
667 | const auto V1 = ReadArg<bool>(S, PC); |
668 | if (!AllocCN<PT_Uint64>(S, OpPC, V0, V1)) |
669 | return false; |
670 | continue; |
671 | } |
672 | case OP_AllocCNIntAP: { |
673 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
674 | const auto V1 = ReadArg<bool>(S, PC); |
675 | if (!AllocCN<PT_IntAP>(S, OpPC, V0, V1)) |
676 | return false; |
677 | continue; |
678 | } |
679 | case OP_AllocCNIntAPS: { |
680 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
681 | const auto V1 = ReadArg<bool>(S, PC); |
682 | if (!AllocCN<PT_IntAPS>(S, OpPC, V0, V1)) |
683 | return false; |
684 | continue; |
685 | } |
686 | #endif |
687 | #ifdef GET_DISASM |
688 | case OP_AllocCNSint8: |
689 | Text.Op = PrintName("AllocCNSint8" ); |
690 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
691 | Text.Args.push_back(printArg<bool>(P, PC)); |
692 | break; |
693 | case OP_AllocCNUint8: |
694 | Text.Op = PrintName("AllocCNUint8" ); |
695 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
696 | Text.Args.push_back(printArg<bool>(P, PC)); |
697 | break; |
698 | case OP_AllocCNSint16: |
699 | Text.Op = PrintName("AllocCNSint16" ); |
700 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
701 | Text.Args.push_back(printArg<bool>(P, PC)); |
702 | break; |
703 | case OP_AllocCNUint16: |
704 | Text.Op = PrintName("AllocCNUint16" ); |
705 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
706 | Text.Args.push_back(printArg<bool>(P, PC)); |
707 | break; |
708 | case OP_AllocCNSint32: |
709 | Text.Op = PrintName("AllocCNSint32" ); |
710 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
711 | Text.Args.push_back(printArg<bool>(P, PC)); |
712 | break; |
713 | case OP_AllocCNUint32: |
714 | Text.Op = PrintName("AllocCNUint32" ); |
715 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
716 | Text.Args.push_back(printArg<bool>(P, PC)); |
717 | break; |
718 | case OP_AllocCNSint64: |
719 | Text.Op = PrintName("AllocCNSint64" ); |
720 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
721 | Text.Args.push_back(printArg<bool>(P, PC)); |
722 | break; |
723 | case OP_AllocCNUint64: |
724 | Text.Op = PrintName("AllocCNUint64" ); |
725 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
726 | Text.Args.push_back(printArg<bool>(P, PC)); |
727 | break; |
728 | case OP_AllocCNIntAP: |
729 | Text.Op = PrintName("AllocCNIntAP" ); |
730 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
731 | Text.Args.push_back(printArg<bool>(P, PC)); |
732 | break; |
733 | case OP_AllocCNIntAPS: |
734 | Text.Op = PrintName("AllocCNIntAPS" ); |
735 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
736 | Text.Args.push_back(printArg<bool>(P, PC)); |
737 | break; |
738 | #endif |
739 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
740 | bool emitAllocCNSint8( const Descriptor * , bool , const SourceInfo &); |
741 | bool emitAllocCNUint8( const Descriptor * , bool , const SourceInfo &); |
742 | bool emitAllocCNSint16( const Descriptor * , bool , const SourceInfo &); |
743 | bool emitAllocCNUint16( const Descriptor * , bool , const SourceInfo &); |
744 | bool emitAllocCNSint32( const Descriptor * , bool , const SourceInfo &); |
745 | bool emitAllocCNUint32( const Descriptor * , bool , const SourceInfo &); |
746 | bool emitAllocCNSint64( const Descriptor * , bool , const SourceInfo &); |
747 | bool emitAllocCNUint64( const Descriptor * , bool , const SourceInfo &); |
748 | bool emitAllocCNIntAP( const Descriptor * , bool , const SourceInfo &); |
749 | bool emitAllocCNIntAPS( const Descriptor * , bool , const SourceInfo &); |
750 | #endif |
751 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
752 | [[nodiscard]] bool emitAllocCN(PrimType, const Descriptor *, bool, const SourceInfo &I); |
753 | #endif |
754 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
755 | bool |
756 | #if defined(GET_EVAL_IMPL) |
757 | EvalEmitter |
758 | #else |
759 | ByteCodeEmitter |
760 | #endif |
761 | ::emitAllocCN(PrimType T0, const Descriptor * A0, bool A1, const SourceInfo &I) { |
762 | switch (T0) { |
763 | case PT_Sint8: |
764 | return emitAllocCNSint8(A0, A1, I); |
765 | case PT_Uint8: |
766 | return emitAllocCNUint8(A0, A1, I); |
767 | case PT_Sint16: |
768 | return emitAllocCNSint16(A0, A1, I); |
769 | case PT_Uint16: |
770 | return emitAllocCNUint16(A0, A1, I); |
771 | case PT_Sint32: |
772 | return emitAllocCNSint32(A0, A1, I); |
773 | case PT_Uint32: |
774 | return emitAllocCNUint32(A0, A1, I); |
775 | case PT_Sint64: |
776 | return emitAllocCNSint64(A0, A1, I); |
777 | case PT_Uint64: |
778 | return emitAllocCNUint64(A0, A1, I); |
779 | case PT_IntAP: |
780 | return emitAllocCNIntAP(A0, A1, I); |
781 | case PT_IntAPS: |
782 | return emitAllocCNIntAPS(A0, A1, I); |
783 | default: llvm_unreachable("invalid type: emitAllocCN" ); |
784 | } |
785 | llvm_unreachable("invalid enum value" ); |
786 | } |
787 | #endif |
788 | #ifdef GET_LINK_IMPL |
789 | bool ByteCodeEmitter::emitAllocCNSint8( const Descriptor * A0, bool A1, const SourceInfo &L) { |
790 | return emitOp<const Descriptor *, bool>(OP_AllocCNSint8, A0, A1, L); |
791 | } |
792 | bool ByteCodeEmitter::emitAllocCNUint8( const Descriptor * A0, bool A1, const SourceInfo &L) { |
793 | return emitOp<const Descriptor *, bool>(OP_AllocCNUint8, A0, A1, L); |
794 | } |
795 | bool ByteCodeEmitter::emitAllocCNSint16( const Descriptor * A0, bool A1, const SourceInfo &L) { |
796 | return emitOp<const Descriptor *, bool>(OP_AllocCNSint16, A0, A1, L); |
797 | } |
798 | bool ByteCodeEmitter::emitAllocCNUint16( const Descriptor * A0, bool A1, const SourceInfo &L) { |
799 | return emitOp<const Descriptor *, bool>(OP_AllocCNUint16, A0, A1, L); |
800 | } |
801 | bool ByteCodeEmitter::emitAllocCNSint32( const Descriptor * A0, bool A1, const SourceInfo &L) { |
802 | return emitOp<const Descriptor *, bool>(OP_AllocCNSint32, A0, A1, L); |
803 | } |
804 | bool ByteCodeEmitter::emitAllocCNUint32( const Descriptor * A0, bool A1, const SourceInfo &L) { |
805 | return emitOp<const Descriptor *, bool>(OP_AllocCNUint32, A0, A1, L); |
806 | } |
807 | bool ByteCodeEmitter::emitAllocCNSint64( const Descriptor * A0, bool A1, const SourceInfo &L) { |
808 | return emitOp<const Descriptor *, bool>(OP_AllocCNSint64, A0, A1, L); |
809 | } |
810 | bool ByteCodeEmitter::emitAllocCNUint64( const Descriptor * A0, bool A1, const SourceInfo &L) { |
811 | return emitOp<const Descriptor *, bool>(OP_AllocCNUint64, A0, A1, L); |
812 | } |
813 | bool ByteCodeEmitter::emitAllocCNIntAP( const Descriptor * A0, bool A1, const SourceInfo &L) { |
814 | return emitOp<const Descriptor *, bool>(OP_AllocCNIntAP, A0, A1, L); |
815 | } |
816 | bool ByteCodeEmitter::emitAllocCNIntAPS( const Descriptor * A0, bool A1, const SourceInfo &L) { |
817 | return emitOp<const Descriptor *, bool>(OP_AllocCNIntAPS, A0, A1, L); |
818 | } |
819 | #endif |
820 | #ifdef GET_EVAL_IMPL |
821 | bool EvalEmitter::emitAllocCNSint8( const Descriptor * A0, bool A1, const SourceInfo &L) { |
822 | if (!isActive()) return true; |
823 | CurrentSource = L; |
824 | return AllocCN<PT_Sint8>(S, OpPC, A0, A1); |
825 | } |
826 | bool EvalEmitter::emitAllocCNUint8( const Descriptor * A0, bool A1, const SourceInfo &L) { |
827 | if (!isActive()) return true; |
828 | CurrentSource = L; |
829 | return AllocCN<PT_Uint8>(S, OpPC, A0, A1); |
830 | } |
831 | bool EvalEmitter::emitAllocCNSint16( const Descriptor * A0, bool A1, const SourceInfo &L) { |
832 | if (!isActive()) return true; |
833 | CurrentSource = L; |
834 | return AllocCN<PT_Sint16>(S, OpPC, A0, A1); |
835 | } |
836 | bool EvalEmitter::emitAllocCNUint16( const Descriptor * A0, bool A1, const SourceInfo &L) { |
837 | if (!isActive()) return true; |
838 | CurrentSource = L; |
839 | return AllocCN<PT_Uint16>(S, OpPC, A0, A1); |
840 | } |
841 | bool EvalEmitter::emitAllocCNSint32( const Descriptor * A0, bool A1, const SourceInfo &L) { |
842 | if (!isActive()) return true; |
843 | CurrentSource = L; |
844 | return AllocCN<PT_Sint32>(S, OpPC, A0, A1); |
845 | } |
846 | bool EvalEmitter::emitAllocCNUint32( const Descriptor * A0, bool A1, const SourceInfo &L) { |
847 | if (!isActive()) return true; |
848 | CurrentSource = L; |
849 | return AllocCN<PT_Uint32>(S, OpPC, A0, A1); |
850 | } |
851 | bool EvalEmitter::emitAllocCNSint64( const Descriptor * A0, bool A1, const SourceInfo &L) { |
852 | if (!isActive()) return true; |
853 | CurrentSource = L; |
854 | return AllocCN<PT_Sint64>(S, OpPC, A0, A1); |
855 | } |
856 | bool EvalEmitter::emitAllocCNUint64( const Descriptor * A0, bool A1, const SourceInfo &L) { |
857 | if (!isActive()) return true; |
858 | CurrentSource = L; |
859 | return AllocCN<PT_Uint64>(S, OpPC, A0, A1); |
860 | } |
861 | bool EvalEmitter::emitAllocCNIntAP( const Descriptor * A0, bool A1, const SourceInfo &L) { |
862 | if (!isActive()) return true; |
863 | CurrentSource = L; |
864 | return AllocCN<PT_IntAP>(S, OpPC, A0, A1); |
865 | } |
866 | bool EvalEmitter::emitAllocCNIntAPS( const Descriptor * A0, bool A1, const SourceInfo &L) { |
867 | if (!isActive()) return true; |
868 | CurrentSource = L; |
869 | return AllocCN<PT_IntAPS>(S, OpPC, A0, A1); |
870 | } |
871 | #endif |
872 | #ifdef GET_OPCODE_NAMES |
873 | OP_AllocNSint8, |
874 | OP_AllocNUint8, |
875 | OP_AllocNSint16, |
876 | OP_AllocNUint16, |
877 | OP_AllocNSint32, |
878 | OP_AllocNUint32, |
879 | OP_AllocNSint64, |
880 | OP_AllocNUint64, |
881 | OP_AllocNIntAP, |
882 | OP_AllocNIntAPS, |
883 | #endif |
884 | #ifdef GET_INTERP |
885 | case OP_AllocNSint8: { |
886 | const auto V0 = ReadArg<PrimType>(S, PC); |
887 | const auto V1 = ReadArg<const Expr *>(S, PC); |
888 | const auto V2 = ReadArg<bool>(S, PC); |
889 | if (!AllocN<PT_Sint8>(S, OpPC, V0, V1, V2)) |
890 | return false; |
891 | continue; |
892 | } |
893 | case OP_AllocNUint8: { |
894 | const auto V0 = ReadArg<PrimType>(S, PC); |
895 | const auto V1 = ReadArg<const Expr *>(S, PC); |
896 | const auto V2 = ReadArg<bool>(S, PC); |
897 | if (!AllocN<PT_Uint8>(S, OpPC, V0, V1, V2)) |
898 | return false; |
899 | continue; |
900 | } |
901 | case OP_AllocNSint16: { |
902 | const auto V0 = ReadArg<PrimType>(S, PC); |
903 | const auto V1 = ReadArg<const Expr *>(S, PC); |
904 | const auto V2 = ReadArg<bool>(S, PC); |
905 | if (!AllocN<PT_Sint16>(S, OpPC, V0, V1, V2)) |
906 | return false; |
907 | continue; |
908 | } |
909 | case OP_AllocNUint16: { |
910 | const auto V0 = ReadArg<PrimType>(S, PC); |
911 | const auto V1 = ReadArg<const Expr *>(S, PC); |
912 | const auto V2 = ReadArg<bool>(S, PC); |
913 | if (!AllocN<PT_Uint16>(S, OpPC, V0, V1, V2)) |
914 | return false; |
915 | continue; |
916 | } |
917 | case OP_AllocNSint32: { |
918 | const auto V0 = ReadArg<PrimType>(S, PC); |
919 | const auto V1 = ReadArg<const Expr *>(S, PC); |
920 | const auto V2 = ReadArg<bool>(S, PC); |
921 | if (!AllocN<PT_Sint32>(S, OpPC, V0, V1, V2)) |
922 | return false; |
923 | continue; |
924 | } |
925 | case OP_AllocNUint32: { |
926 | const auto V0 = ReadArg<PrimType>(S, PC); |
927 | const auto V1 = ReadArg<const Expr *>(S, PC); |
928 | const auto V2 = ReadArg<bool>(S, PC); |
929 | if (!AllocN<PT_Uint32>(S, OpPC, V0, V1, V2)) |
930 | return false; |
931 | continue; |
932 | } |
933 | case OP_AllocNSint64: { |
934 | const auto V0 = ReadArg<PrimType>(S, PC); |
935 | const auto V1 = ReadArg<const Expr *>(S, PC); |
936 | const auto V2 = ReadArg<bool>(S, PC); |
937 | if (!AllocN<PT_Sint64>(S, OpPC, V0, V1, V2)) |
938 | return false; |
939 | continue; |
940 | } |
941 | case OP_AllocNUint64: { |
942 | const auto V0 = ReadArg<PrimType>(S, PC); |
943 | const auto V1 = ReadArg<const Expr *>(S, PC); |
944 | const auto V2 = ReadArg<bool>(S, PC); |
945 | if (!AllocN<PT_Uint64>(S, OpPC, V0, V1, V2)) |
946 | return false; |
947 | continue; |
948 | } |
949 | case OP_AllocNIntAP: { |
950 | const auto V0 = ReadArg<PrimType>(S, PC); |
951 | const auto V1 = ReadArg<const Expr *>(S, PC); |
952 | const auto V2 = ReadArg<bool>(S, PC); |
953 | if (!AllocN<PT_IntAP>(S, OpPC, V0, V1, V2)) |
954 | return false; |
955 | continue; |
956 | } |
957 | case OP_AllocNIntAPS: { |
958 | const auto V0 = ReadArg<PrimType>(S, PC); |
959 | const auto V1 = ReadArg<const Expr *>(S, PC); |
960 | const auto V2 = ReadArg<bool>(S, PC); |
961 | if (!AllocN<PT_IntAPS>(S, OpPC, V0, V1, V2)) |
962 | return false; |
963 | continue; |
964 | } |
965 | #endif |
966 | #ifdef GET_DISASM |
967 | case OP_AllocNSint8: |
968 | Text.Op = PrintName("AllocNSint8" ); |
969 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
970 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
971 | Text.Args.push_back(printArg<bool>(P, PC)); |
972 | break; |
973 | case OP_AllocNUint8: |
974 | Text.Op = PrintName("AllocNUint8" ); |
975 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
976 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
977 | Text.Args.push_back(printArg<bool>(P, PC)); |
978 | break; |
979 | case OP_AllocNSint16: |
980 | Text.Op = PrintName("AllocNSint16" ); |
981 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
982 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
983 | Text.Args.push_back(printArg<bool>(P, PC)); |
984 | break; |
985 | case OP_AllocNUint16: |
986 | Text.Op = PrintName("AllocNUint16" ); |
987 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
988 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
989 | Text.Args.push_back(printArg<bool>(P, PC)); |
990 | break; |
991 | case OP_AllocNSint32: |
992 | Text.Op = PrintName("AllocNSint32" ); |
993 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
994 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
995 | Text.Args.push_back(printArg<bool>(P, PC)); |
996 | break; |
997 | case OP_AllocNUint32: |
998 | Text.Op = PrintName("AllocNUint32" ); |
999 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
1000 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
1001 | Text.Args.push_back(printArg<bool>(P, PC)); |
1002 | break; |
1003 | case OP_AllocNSint64: |
1004 | Text.Op = PrintName("AllocNSint64" ); |
1005 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
1006 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
1007 | Text.Args.push_back(printArg<bool>(P, PC)); |
1008 | break; |
1009 | case OP_AllocNUint64: |
1010 | Text.Op = PrintName("AllocNUint64" ); |
1011 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
1012 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
1013 | Text.Args.push_back(printArg<bool>(P, PC)); |
1014 | break; |
1015 | case OP_AllocNIntAP: |
1016 | Text.Op = PrintName("AllocNIntAP" ); |
1017 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
1018 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
1019 | Text.Args.push_back(printArg<bool>(P, PC)); |
1020 | break; |
1021 | case OP_AllocNIntAPS: |
1022 | Text.Op = PrintName("AllocNIntAPS" ); |
1023 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
1024 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
1025 | Text.Args.push_back(printArg<bool>(P, PC)); |
1026 | break; |
1027 | #endif |
1028 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1029 | bool emitAllocNSint8( PrimType , const Expr * , bool , const SourceInfo &); |
1030 | bool emitAllocNUint8( PrimType , const Expr * , bool , const SourceInfo &); |
1031 | bool emitAllocNSint16( PrimType , const Expr * , bool , const SourceInfo &); |
1032 | bool emitAllocNUint16( PrimType , const Expr * , bool , const SourceInfo &); |
1033 | bool emitAllocNSint32( PrimType , const Expr * , bool , const SourceInfo &); |
1034 | bool emitAllocNUint32( PrimType , const Expr * , bool , const SourceInfo &); |
1035 | bool emitAllocNSint64( PrimType , const Expr * , bool , const SourceInfo &); |
1036 | bool emitAllocNUint64( PrimType , const Expr * , bool , const SourceInfo &); |
1037 | bool emitAllocNIntAP( PrimType , const Expr * , bool , const SourceInfo &); |
1038 | bool emitAllocNIntAPS( PrimType , const Expr * , bool , const SourceInfo &); |
1039 | #endif |
1040 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1041 | [[nodiscard]] bool emitAllocN(PrimType, PrimType, const Expr *, bool, const SourceInfo &I); |
1042 | #endif |
1043 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
1044 | bool |
1045 | #if defined(GET_EVAL_IMPL) |
1046 | EvalEmitter |
1047 | #else |
1048 | ByteCodeEmitter |
1049 | #endif |
1050 | ::emitAllocN(PrimType T0, PrimType A0, const Expr * A1, bool A2, const SourceInfo &I) { |
1051 | switch (T0) { |
1052 | case PT_Sint8: |
1053 | return emitAllocNSint8(A0, A1, A2, I); |
1054 | case PT_Uint8: |
1055 | return emitAllocNUint8(A0, A1, A2, I); |
1056 | case PT_Sint16: |
1057 | return emitAllocNSint16(A0, A1, A2, I); |
1058 | case PT_Uint16: |
1059 | return emitAllocNUint16(A0, A1, A2, I); |
1060 | case PT_Sint32: |
1061 | return emitAllocNSint32(A0, A1, A2, I); |
1062 | case PT_Uint32: |
1063 | return emitAllocNUint32(A0, A1, A2, I); |
1064 | case PT_Sint64: |
1065 | return emitAllocNSint64(A0, A1, A2, I); |
1066 | case PT_Uint64: |
1067 | return emitAllocNUint64(A0, A1, A2, I); |
1068 | case PT_IntAP: |
1069 | return emitAllocNIntAP(A0, A1, A2, I); |
1070 | case PT_IntAPS: |
1071 | return emitAllocNIntAPS(A0, A1, A2, I); |
1072 | default: llvm_unreachable("invalid type: emitAllocN" ); |
1073 | } |
1074 | llvm_unreachable("invalid enum value" ); |
1075 | } |
1076 | #endif |
1077 | #ifdef GET_LINK_IMPL |
1078 | bool ByteCodeEmitter::emitAllocNSint8( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1079 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNSint8, A0, A1, A2, L); |
1080 | } |
1081 | bool ByteCodeEmitter::emitAllocNUint8( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1082 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNUint8, A0, A1, A2, L); |
1083 | } |
1084 | bool ByteCodeEmitter::emitAllocNSint16( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1085 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNSint16, A0, A1, A2, L); |
1086 | } |
1087 | bool ByteCodeEmitter::emitAllocNUint16( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1088 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNUint16, A0, A1, A2, L); |
1089 | } |
1090 | bool ByteCodeEmitter::emitAllocNSint32( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1091 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNSint32, A0, A1, A2, L); |
1092 | } |
1093 | bool ByteCodeEmitter::emitAllocNUint32( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1094 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNUint32, A0, A1, A2, L); |
1095 | } |
1096 | bool ByteCodeEmitter::emitAllocNSint64( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1097 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNSint64, A0, A1, A2, L); |
1098 | } |
1099 | bool ByteCodeEmitter::emitAllocNUint64( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1100 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNUint64, A0, A1, A2, L); |
1101 | } |
1102 | bool ByteCodeEmitter::emitAllocNIntAP( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1103 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNIntAP, A0, A1, A2, L); |
1104 | } |
1105 | bool ByteCodeEmitter::emitAllocNIntAPS( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1106 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNIntAPS, A0, A1, A2, L); |
1107 | } |
1108 | #endif |
1109 | #ifdef GET_EVAL_IMPL |
1110 | bool EvalEmitter::emitAllocNSint8( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1111 | if (!isActive()) return true; |
1112 | CurrentSource = L; |
1113 | return AllocN<PT_Sint8>(S, OpPC, A0, A1, A2); |
1114 | } |
1115 | bool EvalEmitter::emitAllocNUint8( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1116 | if (!isActive()) return true; |
1117 | CurrentSource = L; |
1118 | return AllocN<PT_Uint8>(S, OpPC, A0, A1, A2); |
1119 | } |
1120 | bool EvalEmitter::emitAllocNSint16( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1121 | if (!isActive()) return true; |
1122 | CurrentSource = L; |
1123 | return AllocN<PT_Sint16>(S, OpPC, A0, A1, A2); |
1124 | } |
1125 | bool EvalEmitter::emitAllocNUint16( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1126 | if (!isActive()) return true; |
1127 | CurrentSource = L; |
1128 | return AllocN<PT_Uint16>(S, OpPC, A0, A1, A2); |
1129 | } |
1130 | bool EvalEmitter::emitAllocNSint32( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1131 | if (!isActive()) return true; |
1132 | CurrentSource = L; |
1133 | return AllocN<PT_Sint32>(S, OpPC, A0, A1, A2); |
1134 | } |
1135 | bool EvalEmitter::emitAllocNUint32( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1136 | if (!isActive()) return true; |
1137 | CurrentSource = L; |
1138 | return AllocN<PT_Uint32>(S, OpPC, A0, A1, A2); |
1139 | } |
1140 | bool EvalEmitter::emitAllocNSint64( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1141 | if (!isActive()) return true; |
1142 | CurrentSource = L; |
1143 | return AllocN<PT_Sint64>(S, OpPC, A0, A1, A2); |
1144 | } |
1145 | bool EvalEmitter::emitAllocNUint64( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1146 | if (!isActive()) return true; |
1147 | CurrentSource = L; |
1148 | return AllocN<PT_Uint64>(S, OpPC, A0, A1, A2); |
1149 | } |
1150 | bool EvalEmitter::emitAllocNIntAP( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1151 | if (!isActive()) return true; |
1152 | CurrentSource = L; |
1153 | return AllocN<PT_IntAP>(S, OpPC, A0, A1, A2); |
1154 | } |
1155 | bool EvalEmitter::emitAllocNIntAPS( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1156 | if (!isActive()) return true; |
1157 | CurrentSource = L; |
1158 | return AllocN<PT_IntAPS>(S, OpPC, A0, A1, A2); |
1159 | } |
1160 | #endif |
1161 | #ifdef GET_OPCODE_NAMES |
1162 | OP_ArrayDecay, |
1163 | #endif |
1164 | #ifdef GET_INTERP |
1165 | case OP_ArrayDecay: { |
1166 | if (!ArrayDecay(S, OpPC)) |
1167 | return false; |
1168 | continue; |
1169 | } |
1170 | #endif |
1171 | #ifdef GET_DISASM |
1172 | case OP_ArrayDecay: |
1173 | Text.Op = PrintName("ArrayDecay" ); |
1174 | break; |
1175 | #endif |
1176 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1177 | bool emitArrayDecay(const SourceInfo &); |
1178 | #endif |
1179 | #ifdef GET_LINK_IMPL |
1180 | bool ByteCodeEmitter::emitArrayDecay(const SourceInfo &L) { |
1181 | return emitOp<>(OP_ArrayDecay, L); |
1182 | } |
1183 | #endif |
1184 | #ifdef GET_EVAL_IMPL |
1185 | bool EvalEmitter::emitArrayDecay(const SourceInfo &L) { |
1186 | if (!isActive()) return true; |
1187 | CurrentSource = L; |
1188 | return ArrayDecay(S, OpPC); |
1189 | } |
1190 | #endif |
1191 | #ifdef GET_OPCODE_NAMES |
1192 | OP_ArrayElemSint8, |
1193 | OP_ArrayElemUint8, |
1194 | OP_ArrayElemSint16, |
1195 | OP_ArrayElemUint16, |
1196 | OP_ArrayElemSint32, |
1197 | OP_ArrayElemUint32, |
1198 | OP_ArrayElemSint64, |
1199 | OP_ArrayElemUint64, |
1200 | OP_ArrayElemIntAP, |
1201 | OP_ArrayElemIntAPS, |
1202 | OP_ArrayElemBool, |
1203 | OP_ArrayElemFixedPoint, |
1204 | OP_ArrayElemPtr, |
1205 | OP_ArrayElemMemberPtr, |
1206 | OP_ArrayElemFloat, |
1207 | #endif |
1208 | #ifdef GET_INTERP |
1209 | case OP_ArrayElemSint8: { |
1210 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1211 | if (!ArrayElem<PT_Sint8>(S, OpPC, V0)) |
1212 | return false; |
1213 | continue; |
1214 | } |
1215 | case OP_ArrayElemUint8: { |
1216 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1217 | if (!ArrayElem<PT_Uint8>(S, OpPC, V0)) |
1218 | return false; |
1219 | continue; |
1220 | } |
1221 | case OP_ArrayElemSint16: { |
1222 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1223 | if (!ArrayElem<PT_Sint16>(S, OpPC, V0)) |
1224 | return false; |
1225 | continue; |
1226 | } |
1227 | case OP_ArrayElemUint16: { |
1228 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1229 | if (!ArrayElem<PT_Uint16>(S, OpPC, V0)) |
1230 | return false; |
1231 | continue; |
1232 | } |
1233 | case OP_ArrayElemSint32: { |
1234 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1235 | if (!ArrayElem<PT_Sint32>(S, OpPC, V0)) |
1236 | return false; |
1237 | continue; |
1238 | } |
1239 | case OP_ArrayElemUint32: { |
1240 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1241 | if (!ArrayElem<PT_Uint32>(S, OpPC, V0)) |
1242 | return false; |
1243 | continue; |
1244 | } |
1245 | case OP_ArrayElemSint64: { |
1246 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1247 | if (!ArrayElem<PT_Sint64>(S, OpPC, V0)) |
1248 | return false; |
1249 | continue; |
1250 | } |
1251 | case OP_ArrayElemUint64: { |
1252 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1253 | if (!ArrayElem<PT_Uint64>(S, OpPC, V0)) |
1254 | return false; |
1255 | continue; |
1256 | } |
1257 | case OP_ArrayElemIntAP: { |
1258 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1259 | if (!ArrayElem<PT_IntAP>(S, OpPC, V0)) |
1260 | return false; |
1261 | continue; |
1262 | } |
1263 | case OP_ArrayElemIntAPS: { |
1264 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1265 | if (!ArrayElem<PT_IntAPS>(S, OpPC, V0)) |
1266 | return false; |
1267 | continue; |
1268 | } |
1269 | case OP_ArrayElemBool: { |
1270 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1271 | if (!ArrayElem<PT_Bool>(S, OpPC, V0)) |
1272 | return false; |
1273 | continue; |
1274 | } |
1275 | case OP_ArrayElemFixedPoint: { |
1276 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1277 | if (!ArrayElem<PT_FixedPoint>(S, OpPC, V0)) |
1278 | return false; |
1279 | continue; |
1280 | } |
1281 | case OP_ArrayElemPtr: { |
1282 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1283 | if (!ArrayElem<PT_Ptr>(S, OpPC, V0)) |
1284 | return false; |
1285 | continue; |
1286 | } |
1287 | case OP_ArrayElemMemberPtr: { |
1288 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1289 | if (!ArrayElem<PT_MemberPtr>(S, OpPC, V0)) |
1290 | return false; |
1291 | continue; |
1292 | } |
1293 | case OP_ArrayElemFloat: { |
1294 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1295 | if (!ArrayElem<PT_Float>(S, OpPC, V0)) |
1296 | return false; |
1297 | continue; |
1298 | } |
1299 | #endif |
1300 | #ifdef GET_DISASM |
1301 | case OP_ArrayElemSint8: |
1302 | Text.Op = PrintName("ArrayElemSint8" ); |
1303 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1304 | break; |
1305 | case OP_ArrayElemUint8: |
1306 | Text.Op = PrintName("ArrayElemUint8" ); |
1307 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1308 | break; |
1309 | case OP_ArrayElemSint16: |
1310 | Text.Op = PrintName("ArrayElemSint16" ); |
1311 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1312 | break; |
1313 | case OP_ArrayElemUint16: |
1314 | Text.Op = PrintName("ArrayElemUint16" ); |
1315 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1316 | break; |
1317 | case OP_ArrayElemSint32: |
1318 | Text.Op = PrintName("ArrayElemSint32" ); |
1319 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1320 | break; |
1321 | case OP_ArrayElemUint32: |
1322 | Text.Op = PrintName("ArrayElemUint32" ); |
1323 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1324 | break; |
1325 | case OP_ArrayElemSint64: |
1326 | Text.Op = PrintName("ArrayElemSint64" ); |
1327 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1328 | break; |
1329 | case OP_ArrayElemUint64: |
1330 | Text.Op = PrintName("ArrayElemUint64" ); |
1331 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1332 | break; |
1333 | case OP_ArrayElemIntAP: |
1334 | Text.Op = PrintName("ArrayElemIntAP" ); |
1335 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1336 | break; |
1337 | case OP_ArrayElemIntAPS: |
1338 | Text.Op = PrintName("ArrayElemIntAPS" ); |
1339 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1340 | break; |
1341 | case OP_ArrayElemBool: |
1342 | Text.Op = PrintName("ArrayElemBool" ); |
1343 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1344 | break; |
1345 | case OP_ArrayElemFixedPoint: |
1346 | Text.Op = PrintName("ArrayElemFixedPoint" ); |
1347 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1348 | break; |
1349 | case OP_ArrayElemPtr: |
1350 | Text.Op = PrintName("ArrayElemPtr" ); |
1351 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1352 | break; |
1353 | case OP_ArrayElemMemberPtr: |
1354 | Text.Op = PrintName("ArrayElemMemberPtr" ); |
1355 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1356 | break; |
1357 | case OP_ArrayElemFloat: |
1358 | Text.Op = PrintName("ArrayElemFloat" ); |
1359 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1360 | break; |
1361 | #endif |
1362 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1363 | bool emitArrayElemSint8( uint32_t , const SourceInfo &); |
1364 | bool emitArrayElemUint8( uint32_t , const SourceInfo &); |
1365 | bool emitArrayElemSint16( uint32_t , const SourceInfo &); |
1366 | bool emitArrayElemUint16( uint32_t , const SourceInfo &); |
1367 | bool emitArrayElemSint32( uint32_t , const SourceInfo &); |
1368 | bool emitArrayElemUint32( uint32_t , const SourceInfo &); |
1369 | bool emitArrayElemSint64( uint32_t , const SourceInfo &); |
1370 | bool emitArrayElemUint64( uint32_t , const SourceInfo &); |
1371 | bool emitArrayElemIntAP( uint32_t , const SourceInfo &); |
1372 | bool emitArrayElemIntAPS( uint32_t , const SourceInfo &); |
1373 | bool emitArrayElemBool( uint32_t , const SourceInfo &); |
1374 | bool emitArrayElemFixedPoint( uint32_t , const SourceInfo &); |
1375 | bool emitArrayElemPtr( uint32_t , const SourceInfo &); |
1376 | bool emitArrayElemMemberPtr( uint32_t , const SourceInfo &); |
1377 | bool emitArrayElemFloat( uint32_t , const SourceInfo &); |
1378 | #endif |
1379 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1380 | [[nodiscard]] bool emitArrayElem(PrimType, uint32_t, const SourceInfo &I); |
1381 | #endif |
1382 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
1383 | bool |
1384 | #if defined(GET_EVAL_IMPL) |
1385 | EvalEmitter |
1386 | #else |
1387 | ByteCodeEmitter |
1388 | #endif |
1389 | ::emitArrayElem(PrimType T0, uint32_t A0, const SourceInfo &I) { |
1390 | switch (T0) { |
1391 | case PT_Sint8: |
1392 | return emitArrayElemSint8(A0, I); |
1393 | case PT_Uint8: |
1394 | return emitArrayElemUint8(A0, I); |
1395 | case PT_Sint16: |
1396 | return emitArrayElemSint16(A0, I); |
1397 | case PT_Uint16: |
1398 | return emitArrayElemUint16(A0, I); |
1399 | case PT_Sint32: |
1400 | return emitArrayElemSint32(A0, I); |
1401 | case PT_Uint32: |
1402 | return emitArrayElemUint32(A0, I); |
1403 | case PT_Sint64: |
1404 | return emitArrayElemSint64(A0, I); |
1405 | case PT_Uint64: |
1406 | return emitArrayElemUint64(A0, I); |
1407 | case PT_IntAP: |
1408 | return emitArrayElemIntAP(A0, I); |
1409 | case PT_IntAPS: |
1410 | return emitArrayElemIntAPS(A0, I); |
1411 | case PT_Bool: |
1412 | return emitArrayElemBool(A0, I); |
1413 | case PT_FixedPoint: |
1414 | return emitArrayElemFixedPoint(A0, I); |
1415 | case PT_Ptr: |
1416 | return emitArrayElemPtr(A0, I); |
1417 | case PT_MemberPtr: |
1418 | return emitArrayElemMemberPtr(A0, I); |
1419 | case PT_Float: |
1420 | return emitArrayElemFloat(A0, I); |
1421 | } |
1422 | llvm_unreachable("invalid enum value" ); |
1423 | } |
1424 | #endif |
1425 | #ifdef GET_LINK_IMPL |
1426 | bool ByteCodeEmitter::emitArrayElemSint8( uint32_t A0, const SourceInfo &L) { |
1427 | return emitOp<uint32_t>(OP_ArrayElemSint8, A0, L); |
1428 | } |
1429 | bool ByteCodeEmitter::emitArrayElemUint8( uint32_t A0, const SourceInfo &L) { |
1430 | return emitOp<uint32_t>(OP_ArrayElemUint8, A0, L); |
1431 | } |
1432 | bool ByteCodeEmitter::emitArrayElemSint16( uint32_t A0, const SourceInfo &L) { |
1433 | return emitOp<uint32_t>(OP_ArrayElemSint16, A0, L); |
1434 | } |
1435 | bool ByteCodeEmitter::emitArrayElemUint16( uint32_t A0, const SourceInfo &L) { |
1436 | return emitOp<uint32_t>(OP_ArrayElemUint16, A0, L); |
1437 | } |
1438 | bool ByteCodeEmitter::emitArrayElemSint32( uint32_t A0, const SourceInfo &L) { |
1439 | return emitOp<uint32_t>(OP_ArrayElemSint32, A0, L); |
1440 | } |
1441 | bool ByteCodeEmitter::emitArrayElemUint32( uint32_t A0, const SourceInfo &L) { |
1442 | return emitOp<uint32_t>(OP_ArrayElemUint32, A0, L); |
1443 | } |
1444 | bool ByteCodeEmitter::emitArrayElemSint64( uint32_t A0, const SourceInfo &L) { |
1445 | return emitOp<uint32_t>(OP_ArrayElemSint64, A0, L); |
1446 | } |
1447 | bool ByteCodeEmitter::emitArrayElemUint64( uint32_t A0, const SourceInfo &L) { |
1448 | return emitOp<uint32_t>(OP_ArrayElemUint64, A0, L); |
1449 | } |
1450 | bool ByteCodeEmitter::emitArrayElemIntAP( uint32_t A0, const SourceInfo &L) { |
1451 | return emitOp<uint32_t>(OP_ArrayElemIntAP, A0, L); |
1452 | } |
1453 | bool ByteCodeEmitter::emitArrayElemIntAPS( uint32_t A0, const SourceInfo &L) { |
1454 | return emitOp<uint32_t>(OP_ArrayElemIntAPS, A0, L); |
1455 | } |
1456 | bool ByteCodeEmitter::emitArrayElemBool( uint32_t A0, const SourceInfo &L) { |
1457 | return emitOp<uint32_t>(OP_ArrayElemBool, A0, L); |
1458 | } |
1459 | bool ByteCodeEmitter::emitArrayElemFixedPoint( uint32_t A0, const SourceInfo &L) { |
1460 | return emitOp<uint32_t>(OP_ArrayElemFixedPoint, A0, L); |
1461 | } |
1462 | bool ByteCodeEmitter::emitArrayElemPtr( uint32_t A0, const SourceInfo &L) { |
1463 | return emitOp<uint32_t>(OP_ArrayElemPtr, A0, L); |
1464 | } |
1465 | bool ByteCodeEmitter::emitArrayElemMemberPtr( uint32_t A0, const SourceInfo &L) { |
1466 | return emitOp<uint32_t>(OP_ArrayElemMemberPtr, A0, L); |
1467 | } |
1468 | bool ByteCodeEmitter::emitArrayElemFloat( uint32_t A0, const SourceInfo &L) { |
1469 | return emitOp<uint32_t>(OP_ArrayElemFloat, A0, L); |
1470 | } |
1471 | #endif |
1472 | #ifdef GET_EVAL_IMPL |
1473 | bool EvalEmitter::emitArrayElemSint8( uint32_t A0, const SourceInfo &L) { |
1474 | if (!isActive()) return true; |
1475 | CurrentSource = L; |
1476 | return ArrayElem<PT_Sint8>(S, OpPC, A0); |
1477 | } |
1478 | bool EvalEmitter::emitArrayElemUint8( uint32_t A0, const SourceInfo &L) { |
1479 | if (!isActive()) return true; |
1480 | CurrentSource = L; |
1481 | return ArrayElem<PT_Uint8>(S, OpPC, A0); |
1482 | } |
1483 | bool EvalEmitter::emitArrayElemSint16( uint32_t A0, const SourceInfo &L) { |
1484 | if (!isActive()) return true; |
1485 | CurrentSource = L; |
1486 | return ArrayElem<PT_Sint16>(S, OpPC, A0); |
1487 | } |
1488 | bool EvalEmitter::emitArrayElemUint16( uint32_t A0, const SourceInfo &L) { |
1489 | if (!isActive()) return true; |
1490 | CurrentSource = L; |
1491 | return ArrayElem<PT_Uint16>(S, OpPC, A0); |
1492 | } |
1493 | bool EvalEmitter::emitArrayElemSint32( uint32_t A0, const SourceInfo &L) { |
1494 | if (!isActive()) return true; |
1495 | CurrentSource = L; |
1496 | return ArrayElem<PT_Sint32>(S, OpPC, A0); |
1497 | } |
1498 | bool EvalEmitter::emitArrayElemUint32( uint32_t A0, const SourceInfo &L) { |
1499 | if (!isActive()) return true; |
1500 | CurrentSource = L; |
1501 | return ArrayElem<PT_Uint32>(S, OpPC, A0); |
1502 | } |
1503 | bool EvalEmitter::emitArrayElemSint64( uint32_t A0, const SourceInfo &L) { |
1504 | if (!isActive()) return true; |
1505 | CurrentSource = L; |
1506 | return ArrayElem<PT_Sint64>(S, OpPC, A0); |
1507 | } |
1508 | bool EvalEmitter::emitArrayElemUint64( uint32_t A0, const SourceInfo &L) { |
1509 | if (!isActive()) return true; |
1510 | CurrentSource = L; |
1511 | return ArrayElem<PT_Uint64>(S, OpPC, A0); |
1512 | } |
1513 | bool EvalEmitter::emitArrayElemIntAP( uint32_t A0, const SourceInfo &L) { |
1514 | if (!isActive()) return true; |
1515 | CurrentSource = L; |
1516 | return ArrayElem<PT_IntAP>(S, OpPC, A0); |
1517 | } |
1518 | bool EvalEmitter::emitArrayElemIntAPS( uint32_t A0, const SourceInfo &L) { |
1519 | if (!isActive()) return true; |
1520 | CurrentSource = L; |
1521 | return ArrayElem<PT_IntAPS>(S, OpPC, A0); |
1522 | } |
1523 | bool EvalEmitter::emitArrayElemBool( uint32_t A0, const SourceInfo &L) { |
1524 | if (!isActive()) return true; |
1525 | CurrentSource = L; |
1526 | return ArrayElem<PT_Bool>(S, OpPC, A0); |
1527 | } |
1528 | bool EvalEmitter::emitArrayElemFixedPoint( uint32_t A0, const SourceInfo &L) { |
1529 | if (!isActive()) return true; |
1530 | CurrentSource = L; |
1531 | return ArrayElem<PT_FixedPoint>(S, OpPC, A0); |
1532 | } |
1533 | bool EvalEmitter::emitArrayElemPtr( uint32_t A0, const SourceInfo &L) { |
1534 | if (!isActive()) return true; |
1535 | CurrentSource = L; |
1536 | return ArrayElem<PT_Ptr>(S, OpPC, A0); |
1537 | } |
1538 | bool EvalEmitter::emitArrayElemMemberPtr( uint32_t A0, const SourceInfo &L) { |
1539 | if (!isActive()) return true; |
1540 | CurrentSource = L; |
1541 | return ArrayElem<PT_MemberPtr>(S, OpPC, A0); |
1542 | } |
1543 | bool EvalEmitter::emitArrayElemFloat( uint32_t A0, const SourceInfo &L) { |
1544 | if (!isActive()) return true; |
1545 | CurrentSource = L; |
1546 | return ArrayElem<PT_Float>(S, OpPC, A0); |
1547 | } |
1548 | #endif |
1549 | #ifdef GET_OPCODE_NAMES |
1550 | OP_ArrayElemPopSint8, |
1551 | OP_ArrayElemPopUint8, |
1552 | OP_ArrayElemPopSint16, |
1553 | OP_ArrayElemPopUint16, |
1554 | OP_ArrayElemPopSint32, |
1555 | OP_ArrayElemPopUint32, |
1556 | OP_ArrayElemPopSint64, |
1557 | OP_ArrayElemPopUint64, |
1558 | OP_ArrayElemPopIntAP, |
1559 | OP_ArrayElemPopIntAPS, |
1560 | OP_ArrayElemPopBool, |
1561 | OP_ArrayElemPopFixedPoint, |
1562 | OP_ArrayElemPopPtr, |
1563 | OP_ArrayElemPopMemberPtr, |
1564 | OP_ArrayElemPopFloat, |
1565 | #endif |
1566 | #ifdef GET_INTERP |
1567 | case OP_ArrayElemPopSint8: { |
1568 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1569 | if (!ArrayElemPop<PT_Sint8>(S, OpPC, V0)) |
1570 | return false; |
1571 | continue; |
1572 | } |
1573 | case OP_ArrayElemPopUint8: { |
1574 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1575 | if (!ArrayElemPop<PT_Uint8>(S, OpPC, V0)) |
1576 | return false; |
1577 | continue; |
1578 | } |
1579 | case OP_ArrayElemPopSint16: { |
1580 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1581 | if (!ArrayElemPop<PT_Sint16>(S, OpPC, V0)) |
1582 | return false; |
1583 | continue; |
1584 | } |
1585 | case OP_ArrayElemPopUint16: { |
1586 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1587 | if (!ArrayElemPop<PT_Uint16>(S, OpPC, V0)) |
1588 | return false; |
1589 | continue; |
1590 | } |
1591 | case OP_ArrayElemPopSint32: { |
1592 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1593 | if (!ArrayElemPop<PT_Sint32>(S, OpPC, V0)) |
1594 | return false; |
1595 | continue; |
1596 | } |
1597 | case OP_ArrayElemPopUint32: { |
1598 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1599 | if (!ArrayElemPop<PT_Uint32>(S, OpPC, V0)) |
1600 | return false; |
1601 | continue; |
1602 | } |
1603 | case OP_ArrayElemPopSint64: { |
1604 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1605 | if (!ArrayElemPop<PT_Sint64>(S, OpPC, V0)) |
1606 | return false; |
1607 | continue; |
1608 | } |
1609 | case OP_ArrayElemPopUint64: { |
1610 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1611 | if (!ArrayElemPop<PT_Uint64>(S, OpPC, V0)) |
1612 | return false; |
1613 | continue; |
1614 | } |
1615 | case OP_ArrayElemPopIntAP: { |
1616 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1617 | if (!ArrayElemPop<PT_IntAP>(S, OpPC, V0)) |
1618 | return false; |
1619 | continue; |
1620 | } |
1621 | case OP_ArrayElemPopIntAPS: { |
1622 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1623 | if (!ArrayElemPop<PT_IntAPS>(S, OpPC, V0)) |
1624 | return false; |
1625 | continue; |
1626 | } |
1627 | case OP_ArrayElemPopBool: { |
1628 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1629 | if (!ArrayElemPop<PT_Bool>(S, OpPC, V0)) |
1630 | return false; |
1631 | continue; |
1632 | } |
1633 | case OP_ArrayElemPopFixedPoint: { |
1634 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1635 | if (!ArrayElemPop<PT_FixedPoint>(S, OpPC, V0)) |
1636 | return false; |
1637 | continue; |
1638 | } |
1639 | case OP_ArrayElemPopPtr: { |
1640 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1641 | if (!ArrayElemPop<PT_Ptr>(S, OpPC, V0)) |
1642 | return false; |
1643 | continue; |
1644 | } |
1645 | case OP_ArrayElemPopMemberPtr: { |
1646 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1647 | if (!ArrayElemPop<PT_MemberPtr>(S, OpPC, V0)) |
1648 | return false; |
1649 | continue; |
1650 | } |
1651 | case OP_ArrayElemPopFloat: { |
1652 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1653 | if (!ArrayElemPop<PT_Float>(S, OpPC, V0)) |
1654 | return false; |
1655 | continue; |
1656 | } |
1657 | #endif |
1658 | #ifdef GET_DISASM |
1659 | case OP_ArrayElemPopSint8: |
1660 | Text.Op = PrintName("ArrayElemPopSint8" ); |
1661 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1662 | break; |
1663 | case OP_ArrayElemPopUint8: |
1664 | Text.Op = PrintName("ArrayElemPopUint8" ); |
1665 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1666 | break; |
1667 | case OP_ArrayElemPopSint16: |
1668 | Text.Op = PrintName("ArrayElemPopSint16" ); |
1669 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1670 | break; |
1671 | case OP_ArrayElemPopUint16: |
1672 | Text.Op = PrintName("ArrayElemPopUint16" ); |
1673 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1674 | break; |
1675 | case OP_ArrayElemPopSint32: |
1676 | Text.Op = PrintName("ArrayElemPopSint32" ); |
1677 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1678 | break; |
1679 | case OP_ArrayElemPopUint32: |
1680 | Text.Op = PrintName("ArrayElemPopUint32" ); |
1681 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1682 | break; |
1683 | case OP_ArrayElemPopSint64: |
1684 | Text.Op = PrintName("ArrayElemPopSint64" ); |
1685 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1686 | break; |
1687 | case OP_ArrayElemPopUint64: |
1688 | Text.Op = PrintName("ArrayElemPopUint64" ); |
1689 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1690 | break; |
1691 | case OP_ArrayElemPopIntAP: |
1692 | Text.Op = PrintName("ArrayElemPopIntAP" ); |
1693 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1694 | break; |
1695 | case OP_ArrayElemPopIntAPS: |
1696 | Text.Op = PrintName("ArrayElemPopIntAPS" ); |
1697 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1698 | break; |
1699 | case OP_ArrayElemPopBool: |
1700 | Text.Op = PrintName("ArrayElemPopBool" ); |
1701 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1702 | break; |
1703 | case OP_ArrayElemPopFixedPoint: |
1704 | Text.Op = PrintName("ArrayElemPopFixedPoint" ); |
1705 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1706 | break; |
1707 | case OP_ArrayElemPopPtr: |
1708 | Text.Op = PrintName("ArrayElemPopPtr" ); |
1709 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1710 | break; |
1711 | case OP_ArrayElemPopMemberPtr: |
1712 | Text.Op = PrintName("ArrayElemPopMemberPtr" ); |
1713 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1714 | break; |
1715 | case OP_ArrayElemPopFloat: |
1716 | Text.Op = PrintName("ArrayElemPopFloat" ); |
1717 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
1718 | break; |
1719 | #endif |
1720 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1721 | bool emitArrayElemPopSint8( uint32_t , const SourceInfo &); |
1722 | bool emitArrayElemPopUint8( uint32_t , const SourceInfo &); |
1723 | bool emitArrayElemPopSint16( uint32_t , const SourceInfo &); |
1724 | bool emitArrayElemPopUint16( uint32_t , const SourceInfo &); |
1725 | bool emitArrayElemPopSint32( uint32_t , const SourceInfo &); |
1726 | bool emitArrayElemPopUint32( uint32_t , const SourceInfo &); |
1727 | bool emitArrayElemPopSint64( uint32_t , const SourceInfo &); |
1728 | bool emitArrayElemPopUint64( uint32_t , const SourceInfo &); |
1729 | bool emitArrayElemPopIntAP( uint32_t , const SourceInfo &); |
1730 | bool emitArrayElemPopIntAPS( uint32_t , const SourceInfo &); |
1731 | bool emitArrayElemPopBool( uint32_t , const SourceInfo &); |
1732 | bool emitArrayElemPopFixedPoint( uint32_t , const SourceInfo &); |
1733 | bool emitArrayElemPopPtr( uint32_t , const SourceInfo &); |
1734 | bool emitArrayElemPopMemberPtr( uint32_t , const SourceInfo &); |
1735 | bool emitArrayElemPopFloat( uint32_t , const SourceInfo &); |
1736 | #endif |
1737 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1738 | [[nodiscard]] bool emitArrayElemPop(PrimType, uint32_t, const SourceInfo &I); |
1739 | #endif |
1740 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
1741 | bool |
1742 | #if defined(GET_EVAL_IMPL) |
1743 | EvalEmitter |
1744 | #else |
1745 | ByteCodeEmitter |
1746 | #endif |
1747 | ::emitArrayElemPop(PrimType T0, uint32_t A0, const SourceInfo &I) { |
1748 | switch (T0) { |
1749 | case PT_Sint8: |
1750 | return emitArrayElemPopSint8(A0, I); |
1751 | case PT_Uint8: |
1752 | return emitArrayElemPopUint8(A0, I); |
1753 | case PT_Sint16: |
1754 | return emitArrayElemPopSint16(A0, I); |
1755 | case PT_Uint16: |
1756 | return emitArrayElemPopUint16(A0, I); |
1757 | case PT_Sint32: |
1758 | return emitArrayElemPopSint32(A0, I); |
1759 | case PT_Uint32: |
1760 | return emitArrayElemPopUint32(A0, I); |
1761 | case PT_Sint64: |
1762 | return emitArrayElemPopSint64(A0, I); |
1763 | case PT_Uint64: |
1764 | return emitArrayElemPopUint64(A0, I); |
1765 | case PT_IntAP: |
1766 | return emitArrayElemPopIntAP(A0, I); |
1767 | case PT_IntAPS: |
1768 | return emitArrayElemPopIntAPS(A0, I); |
1769 | case PT_Bool: |
1770 | return emitArrayElemPopBool(A0, I); |
1771 | case PT_FixedPoint: |
1772 | return emitArrayElemPopFixedPoint(A0, I); |
1773 | case PT_Ptr: |
1774 | return emitArrayElemPopPtr(A0, I); |
1775 | case PT_MemberPtr: |
1776 | return emitArrayElemPopMemberPtr(A0, I); |
1777 | case PT_Float: |
1778 | return emitArrayElemPopFloat(A0, I); |
1779 | } |
1780 | llvm_unreachable("invalid enum value" ); |
1781 | } |
1782 | #endif |
1783 | #ifdef GET_LINK_IMPL |
1784 | bool ByteCodeEmitter::emitArrayElemPopSint8( uint32_t A0, const SourceInfo &L) { |
1785 | return emitOp<uint32_t>(OP_ArrayElemPopSint8, A0, L); |
1786 | } |
1787 | bool ByteCodeEmitter::emitArrayElemPopUint8( uint32_t A0, const SourceInfo &L) { |
1788 | return emitOp<uint32_t>(OP_ArrayElemPopUint8, A0, L); |
1789 | } |
1790 | bool ByteCodeEmitter::emitArrayElemPopSint16( uint32_t A0, const SourceInfo &L) { |
1791 | return emitOp<uint32_t>(OP_ArrayElemPopSint16, A0, L); |
1792 | } |
1793 | bool ByteCodeEmitter::emitArrayElemPopUint16( uint32_t A0, const SourceInfo &L) { |
1794 | return emitOp<uint32_t>(OP_ArrayElemPopUint16, A0, L); |
1795 | } |
1796 | bool ByteCodeEmitter::emitArrayElemPopSint32( uint32_t A0, const SourceInfo &L) { |
1797 | return emitOp<uint32_t>(OP_ArrayElemPopSint32, A0, L); |
1798 | } |
1799 | bool ByteCodeEmitter::emitArrayElemPopUint32( uint32_t A0, const SourceInfo &L) { |
1800 | return emitOp<uint32_t>(OP_ArrayElemPopUint32, A0, L); |
1801 | } |
1802 | bool ByteCodeEmitter::emitArrayElemPopSint64( uint32_t A0, const SourceInfo &L) { |
1803 | return emitOp<uint32_t>(OP_ArrayElemPopSint64, A0, L); |
1804 | } |
1805 | bool ByteCodeEmitter::emitArrayElemPopUint64( uint32_t A0, const SourceInfo &L) { |
1806 | return emitOp<uint32_t>(OP_ArrayElemPopUint64, A0, L); |
1807 | } |
1808 | bool ByteCodeEmitter::emitArrayElemPopIntAP( uint32_t A0, const SourceInfo &L) { |
1809 | return emitOp<uint32_t>(OP_ArrayElemPopIntAP, A0, L); |
1810 | } |
1811 | bool ByteCodeEmitter::emitArrayElemPopIntAPS( uint32_t A0, const SourceInfo &L) { |
1812 | return emitOp<uint32_t>(OP_ArrayElemPopIntAPS, A0, L); |
1813 | } |
1814 | bool ByteCodeEmitter::emitArrayElemPopBool( uint32_t A0, const SourceInfo &L) { |
1815 | return emitOp<uint32_t>(OP_ArrayElemPopBool, A0, L); |
1816 | } |
1817 | bool ByteCodeEmitter::emitArrayElemPopFixedPoint( uint32_t A0, const SourceInfo &L) { |
1818 | return emitOp<uint32_t>(OP_ArrayElemPopFixedPoint, A0, L); |
1819 | } |
1820 | bool ByteCodeEmitter::emitArrayElemPopPtr( uint32_t A0, const SourceInfo &L) { |
1821 | return emitOp<uint32_t>(OP_ArrayElemPopPtr, A0, L); |
1822 | } |
1823 | bool ByteCodeEmitter::emitArrayElemPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
1824 | return emitOp<uint32_t>(OP_ArrayElemPopMemberPtr, A0, L); |
1825 | } |
1826 | bool ByteCodeEmitter::emitArrayElemPopFloat( uint32_t A0, const SourceInfo &L) { |
1827 | return emitOp<uint32_t>(OP_ArrayElemPopFloat, A0, L); |
1828 | } |
1829 | #endif |
1830 | #ifdef GET_EVAL_IMPL |
1831 | bool EvalEmitter::emitArrayElemPopSint8( uint32_t A0, const SourceInfo &L) { |
1832 | if (!isActive()) return true; |
1833 | CurrentSource = L; |
1834 | return ArrayElemPop<PT_Sint8>(S, OpPC, A0); |
1835 | } |
1836 | bool EvalEmitter::emitArrayElemPopUint8( uint32_t A0, const SourceInfo &L) { |
1837 | if (!isActive()) return true; |
1838 | CurrentSource = L; |
1839 | return ArrayElemPop<PT_Uint8>(S, OpPC, A0); |
1840 | } |
1841 | bool EvalEmitter::emitArrayElemPopSint16( uint32_t A0, const SourceInfo &L) { |
1842 | if (!isActive()) return true; |
1843 | CurrentSource = L; |
1844 | return ArrayElemPop<PT_Sint16>(S, OpPC, A0); |
1845 | } |
1846 | bool EvalEmitter::emitArrayElemPopUint16( uint32_t A0, const SourceInfo &L) { |
1847 | if (!isActive()) return true; |
1848 | CurrentSource = L; |
1849 | return ArrayElemPop<PT_Uint16>(S, OpPC, A0); |
1850 | } |
1851 | bool EvalEmitter::emitArrayElemPopSint32( uint32_t A0, const SourceInfo &L) { |
1852 | if (!isActive()) return true; |
1853 | CurrentSource = L; |
1854 | return ArrayElemPop<PT_Sint32>(S, OpPC, A0); |
1855 | } |
1856 | bool EvalEmitter::emitArrayElemPopUint32( uint32_t A0, const SourceInfo &L) { |
1857 | if (!isActive()) return true; |
1858 | CurrentSource = L; |
1859 | return ArrayElemPop<PT_Uint32>(S, OpPC, A0); |
1860 | } |
1861 | bool EvalEmitter::emitArrayElemPopSint64( uint32_t A0, const SourceInfo &L) { |
1862 | if (!isActive()) return true; |
1863 | CurrentSource = L; |
1864 | return ArrayElemPop<PT_Sint64>(S, OpPC, A0); |
1865 | } |
1866 | bool EvalEmitter::emitArrayElemPopUint64( uint32_t A0, const SourceInfo &L) { |
1867 | if (!isActive()) return true; |
1868 | CurrentSource = L; |
1869 | return ArrayElemPop<PT_Uint64>(S, OpPC, A0); |
1870 | } |
1871 | bool EvalEmitter::emitArrayElemPopIntAP( uint32_t A0, const SourceInfo &L) { |
1872 | if (!isActive()) return true; |
1873 | CurrentSource = L; |
1874 | return ArrayElemPop<PT_IntAP>(S, OpPC, A0); |
1875 | } |
1876 | bool EvalEmitter::emitArrayElemPopIntAPS( uint32_t A0, const SourceInfo &L) { |
1877 | if (!isActive()) return true; |
1878 | CurrentSource = L; |
1879 | return ArrayElemPop<PT_IntAPS>(S, OpPC, A0); |
1880 | } |
1881 | bool EvalEmitter::emitArrayElemPopBool( uint32_t A0, const SourceInfo &L) { |
1882 | if (!isActive()) return true; |
1883 | CurrentSource = L; |
1884 | return ArrayElemPop<PT_Bool>(S, OpPC, A0); |
1885 | } |
1886 | bool EvalEmitter::emitArrayElemPopFixedPoint( uint32_t A0, const SourceInfo &L) { |
1887 | if (!isActive()) return true; |
1888 | CurrentSource = L; |
1889 | return ArrayElemPop<PT_FixedPoint>(S, OpPC, A0); |
1890 | } |
1891 | bool EvalEmitter::emitArrayElemPopPtr( uint32_t A0, const SourceInfo &L) { |
1892 | if (!isActive()) return true; |
1893 | CurrentSource = L; |
1894 | return ArrayElemPop<PT_Ptr>(S, OpPC, A0); |
1895 | } |
1896 | bool EvalEmitter::emitArrayElemPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
1897 | if (!isActive()) return true; |
1898 | CurrentSource = L; |
1899 | return ArrayElemPop<PT_MemberPtr>(S, OpPC, A0); |
1900 | } |
1901 | bool EvalEmitter::emitArrayElemPopFloat( uint32_t A0, const SourceInfo &L) { |
1902 | if (!isActive()) return true; |
1903 | CurrentSource = L; |
1904 | return ArrayElemPop<PT_Float>(S, OpPC, A0); |
1905 | } |
1906 | #endif |
1907 | #ifdef GET_OPCODE_NAMES |
1908 | OP_ArrayElemPtrSint8, |
1909 | OP_ArrayElemPtrUint8, |
1910 | OP_ArrayElemPtrSint16, |
1911 | OP_ArrayElemPtrUint16, |
1912 | OP_ArrayElemPtrSint32, |
1913 | OP_ArrayElemPtrUint32, |
1914 | OP_ArrayElemPtrSint64, |
1915 | OP_ArrayElemPtrUint64, |
1916 | OP_ArrayElemPtrIntAP, |
1917 | OP_ArrayElemPtrIntAPS, |
1918 | OP_ArrayElemPtrBool, |
1919 | OP_ArrayElemPtrFixedPoint, |
1920 | #endif |
1921 | #ifdef GET_INTERP |
1922 | case OP_ArrayElemPtrSint8: { |
1923 | if (!ArrayElemPtr<PT_Sint8>(S, OpPC)) |
1924 | return false; |
1925 | continue; |
1926 | } |
1927 | case OP_ArrayElemPtrUint8: { |
1928 | if (!ArrayElemPtr<PT_Uint8>(S, OpPC)) |
1929 | return false; |
1930 | continue; |
1931 | } |
1932 | case OP_ArrayElemPtrSint16: { |
1933 | if (!ArrayElemPtr<PT_Sint16>(S, OpPC)) |
1934 | return false; |
1935 | continue; |
1936 | } |
1937 | case OP_ArrayElemPtrUint16: { |
1938 | if (!ArrayElemPtr<PT_Uint16>(S, OpPC)) |
1939 | return false; |
1940 | continue; |
1941 | } |
1942 | case OP_ArrayElemPtrSint32: { |
1943 | if (!ArrayElemPtr<PT_Sint32>(S, OpPC)) |
1944 | return false; |
1945 | continue; |
1946 | } |
1947 | case OP_ArrayElemPtrUint32: { |
1948 | if (!ArrayElemPtr<PT_Uint32>(S, OpPC)) |
1949 | return false; |
1950 | continue; |
1951 | } |
1952 | case OP_ArrayElemPtrSint64: { |
1953 | if (!ArrayElemPtr<PT_Sint64>(S, OpPC)) |
1954 | return false; |
1955 | continue; |
1956 | } |
1957 | case OP_ArrayElemPtrUint64: { |
1958 | if (!ArrayElemPtr<PT_Uint64>(S, OpPC)) |
1959 | return false; |
1960 | continue; |
1961 | } |
1962 | case OP_ArrayElemPtrIntAP: { |
1963 | if (!ArrayElemPtr<PT_IntAP>(S, OpPC)) |
1964 | return false; |
1965 | continue; |
1966 | } |
1967 | case OP_ArrayElemPtrIntAPS: { |
1968 | if (!ArrayElemPtr<PT_IntAPS>(S, OpPC)) |
1969 | return false; |
1970 | continue; |
1971 | } |
1972 | case OP_ArrayElemPtrBool: { |
1973 | if (!ArrayElemPtr<PT_Bool>(S, OpPC)) |
1974 | return false; |
1975 | continue; |
1976 | } |
1977 | case OP_ArrayElemPtrFixedPoint: { |
1978 | if (!ArrayElemPtr<PT_FixedPoint>(S, OpPC)) |
1979 | return false; |
1980 | continue; |
1981 | } |
1982 | #endif |
1983 | #ifdef GET_DISASM |
1984 | case OP_ArrayElemPtrSint8: |
1985 | Text.Op = PrintName("ArrayElemPtrSint8" ); |
1986 | break; |
1987 | case OP_ArrayElemPtrUint8: |
1988 | Text.Op = PrintName("ArrayElemPtrUint8" ); |
1989 | break; |
1990 | case OP_ArrayElemPtrSint16: |
1991 | Text.Op = PrintName("ArrayElemPtrSint16" ); |
1992 | break; |
1993 | case OP_ArrayElemPtrUint16: |
1994 | Text.Op = PrintName("ArrayElemPtrUint16" ); |
1995 | break; |
1996 | case OP_ArrayElemPtrSint32: |
1997 | Text.Op = PrintName("ArrayElemPtrSint32" ); |
1998 | break; |
1999 | case OP_ArrayElemPtrUint32: |
2000 | Text.Op = PrintName("ArrayElemPtrUint32" ); |
2001 | break; |
2002 | case OP_ArrayElemPtrSint64: |
2003 | Text.Op = PrintName("ArrayElemPtrSint64" ); |
2004 | break; |
2005 | case OP_ArrayElemPtrUint64: |
2006 | Text.Op = PrintName("ArrayElemPtrUint64" ); |
2007 | break; |
2008 | case OP_ArrayElemPtrIntAP: |
2009 | Text.Op = PrintName("ArrayElemPtrIntAP" ); |
2010 | break; |
2011 | case OP_ArrayElemPtrIntAPS: |
2012 | Text.Op = PrintName("ArrayElemPtrIntAPS" ); |
2013 | break; |
2014 | case OP_ArrayElemPtrBool: |
2015 | Text.Op = PrintName("ArrayElemPtrBool" ); |
2016 | break; |
2017 | case OP_ArrayElemPtrFixedPoint: |
2018 | Text.Op = PrintName("ArrayElemPtrFixedPoint" ); |
2019 | break; |
2020 | #endif |
2021 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2022 | bool emitArrayElemPtrSint8(const SourceInfo &); |
2023 | bool emitArrayElemPtrUint8(const SourceInfo &); |
2024 | bool emitArrayElemPtrSint16(const SourceInfo &); |
2025 | bool emitArrayElemPtrUint16(const SourceInfo &); |
2026 | bool emitArrayElemPtrSint32(const SourceInfo &); |
2027 | bool emitArrayElemPtrUint32(const SourceInfo &); |
2028 | bool emitArrayElemPtrSint64(const SourceInfo &); |
2029 | bool emitArrayElemPtrUint64(const SourceInfo &); |
2030 | bool emitArrayElemPtrIntAP(const SourceInfo &); |
2031 | bool emitArrayElemPtrIntAPS(const SourceInfo &); |
2032 | bool emitArrayElemPtrBool(const SourceInfo &); |
2033 | bool emitArrayElemPtrFixedPoint(const SourceInfo &); |
2034 | #endif |
2035 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2036 | [[nodiscard]] bool emitArrayElemPtr(PrimType, const SourceInfo &I); |
2037 | #endif |
2038 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
2039 | bool |
2040 | #if defined(GET_EVAL_IMPL) |
2041 | EvalEmitter |
2042 | #else |
2043 | ByteCodeEmitter |
2044 | #endif |
2045 | ::emitArrayElemPtr(PrimType T0, const SourceInfo &I) { |
2046 | switch (T0) { |
2047 | case PT_Sint8: |
2048 | return emitArrayElemPtrSint8(I); |
2049 | case PT_Uint8: |
2050 | return emitArrayElemPtrUint8(I); |
2051 | case PT_Sint16: |
2052 | return emitArrayElemPtrSint16(I); |
2053 | case PT_Uint16: |
2054 | return emitArrayElemPtrUint16(I); |
2055 | case PT_Sint32: |
2056 | return emitArrayElemPtrSint32(I); |
2057 | case PT_Uint32: |
2058 | return emitArrayElemPtrUint32(I); |
2059 | case PT_Sint64: |
2060 | return emitArrayElemPtrSint64(I); |
2061 | case PT_Uint64: |
2062 | return emitArrayElemPtrUint64(I); |
2063 | case PT_IntAP: |
2064 | return emitArrayElemPtrIntAP(I); |
2065 | case PT_IntAPS: |
2066 | return emitArrayElemPtrIntAPS(I); |
2067 | case PT_Bool: |
2068 | return emitArrayElemPtrBool(I); |
2069 | case PT_FixedPoint: |
2070 | return emitArrayElemPtrFixedPoint(I); |
2071 | default: llvm_unreachable("invalid type: emitArrayElemPtr" ); |
2072 | } |
2073 | llvm_unreachable("invalid enum value" ); |
2074 | } |
2075 | #endif |
2076 | #ifdef GET_LINK_IMPL |
2077 | bool ByteCodeEmitter::emitArrayElemPtrSint8(const SourceInfo &L) { |
2078 | return emitOp<>(OP_ArrayElemPtrSint8, L); |
2079 | } |
2080 | bool ByteCodeEmitter::emitArrayElemPtrUint8(const SourceInfo &L) { |
2081 | return emitOp<>(OP_ArrayElemPtrUint8, L); |
2082 | } |
2083 | bool ByteCodeEmitter::emitArrayElemPtrSint16(const SourceInfo &L) { |
2084 | return emitOp<>(OP_ArrayElemPtrSint16, L); |
2085 | } |
2086 | bool ByteCodeEmitter::emitArrayElemPtrUint16(const SourceInfo &L) { |
2087 | return emitOp<>(OP_ArrayElemPtrUint16, L); |
2088 | } |
2089 | bool ByteCodeEmitter::emitArrayElemPtrSint32(const SourceInfo &L) { |
2090 | return emitOp<>(OP_ArrayElemPtrSint32, L); |
2091 | } |
2092 | bool ByteCodeEmitter::emitArrayElemPtrUint32(const SourceInfo &L) { |
2093 | return emitOp<>(OP_ArrayElemPtrUint32, L); |
2094 | } |
2095 | bool ByteCodeEmitter::emitArrayElemPtrSint64(const SourceInfo &L) { |
2096 | return emitOp<>(OP_ArrayElemPtrSint64, L); |
2097 | } |
2098 | bool ByteCodeEmitter::emitArrayElemPtrUint64(const SourceInfo &L) { |
2099 | return emitOp<>(OP_ArrayElemPtrUint64, L); |
2100 | } |
2101 | bool ByteCodeEmitter::emitArrayElemPtrIntAP(const SourceInfo &L) { |
2102 | return emitOp<>(OP_ArrayElemPtrIntAP, L); |
2103 | } |
2104 | bool ByteCodeEmitter::emitArrayElemPtrIntAPS(const SourceInfo &L) { |
2105 | return emitOp<>(OP_ArrayElemPtrIntAPS, L); |
2106 | } |
2107 | bool ByteCodeEmitter::emitArrayElemPtrBool(const SourceInfo &L) { |
2108 | return emitOp<>(OP_ArrayElemPtrBool, L); |
2109 | } |
2110 | bool ByteCodeEmitter::emitArrayElemPtrFixedPoint(const SourceInfo &L) { |
2111 | return emitOp<>(OP_ArrayElemPtrFixedPoint, L); |
2112 | } |
2113 | #endif |
2114 | #ifdef GET_EVAL_IMPL |
2115 | bool EvalEmitter::emitArrayElemPtrSint8(const SourceInfo &L) { |
2116 | if (!isActive()) return true; |
2117 | CurrentSource = L; |
2118 | return ArrayElemPtr<PT_Sint8>(S, OpPC); |
2119 | } |
2120 | bool EvalEmitter::emitArrayElemPtrUint8(const SourceInfo &L) { |
2121 | if (!isActive()) return true; |
2122 | CurrentSource = L; |
2123 | return ArrayElemPtr<PT_Uint8>(S, OpPC); |
2124 | } |
2125 | bool EvalEmitter::emitArrayElemPtrSint16(const SourceInfo &L) { |
2126 | if (!isActive()) return true; |
2127 | CurrentSource = L; |
2128 | return ArrayElemPtr<PT_Sint16>(S, OpPC); |
2129 | } |
2130 | bool EvalEmitter::emitArrayElemPtrUint16(const SourceInfo &L) { |
2131 | if (!isActive()) return true; |
2132 | CurrentSource = L; |
2133 | return ArrayElemPtr<PT_Uint16>(S, OpPC); |
2134 | } |
2135 | bool EvalEmitter::emitArrayElemPtrSint32(const SourceInfo &L) { |
2136 | if (!isActive()) return true; |
2137 | CurrentSource = L; |
2138 | return ArrayElemPtr<PT_Sint32>(S, OpPC); |
2139 | } |
2140 | bool EvalEmitter::emitArrayElemPtrUint32(const SourceInfo &L) { |
2141 | if (!isActive()) return true; |
2142 | CurrentSource = L; |
2143 | return ArrayElemPtr<PT_Uint32>(S, OpPC); |
2144 | } |
2145 | bool EvalEmitter::emitArrayElemPtrSint64(const SourceInfo &L) { |
2146 | if (!isActive()) return true; |
2147 | CurrentSource = L; |
2148 | return ArrayElemPtr<PT_Sint64>(S, OpPC); |
2149 | } |
2150 | bool EvalEmitter::emitArrayElemPtrUint64(const SourceInfo &L) { |
2151 | if (!isActive()) return true; |
2152 | CurrentSource = L; |
2153 | return ArrayElemPtr<PT_Uint64>(S, OpPC); |
2154 | } |
2155 | bool EvalEmitter::emitArrayElemPtrIntAP(const SourceInfo &L) { |
2156 | if (!isActive()) return true; |
2157 | CurrentSource = L; |
2158 | return ArrayElemPtr<PT_IntAP>(S, OpPC); |
2159 | } |
2160 | bool EvalEmitter::emitArrayElemPtrIntAPS(const SourceInfo &L) { |
2161 | if (!isActive()) return true; |
2162 | CurrentSource = L; |
2163 | return ArrayElemPtr<PT_IntAPS>(S, OpPC); |
2164 | } |
2165 | bool EvalEmitter::emitArrayElemPtrBool(const SourceInfo &L) { |
2166 | if (!isActive()) return true; |
2167 | CurrentSource = L; |
2168 | return ArrayElemPtr<PT_Bool>(S, OpPC); |
2169 | } |
2170 | bool EvalEmitter::emitArrayElemPtrFixedPoint(const SourceInfo &L) { |
2171 | if (!isActive()) return true; |
2172 | CurrentSource = L; |
2173 | return ArrayElemPtr<PT_FixedPoint>(S, OpPC); |
2174 | } |
2175 | #endif |
2176 | #ifdef GET_OPCODE_NAMES |
2177 | OP_ArrayElemPtrPopSint8, |
2178 | OP_ArrayElemPtrPopUint8, |
2179 | OP_ArrayElemPtrPopSint16, |
2180 | OP_ArrayElemPtrPopUint16, |
2181 | OP_ArrayElemPtrPopSint32, |
2182 | OP_ArrayElemPtrPopUint32, |
2183 | OP_ArrayElemPtrPopSint64, |
2184 | OP_ArrayElemPtrPopUint64, |
2185 | OP_ArrayElemPtrPopIntAP, |
2186 | OP_ArrayElemPtrPopIntAPS, |
2187 | OP_ArrayElemPtrPopBool, |
2188 | OP_ArrayElemPtrPopFixedPoint, |
2189 | #endif |
2190 | #ifdef GET_INTERP |
2191 | case OP_ArrayElemPtrPopSint8: { |
2192 | if (!ArrayElemPtrPop<PT_Sint8>(S, OpPC)) |
2193 | return false; |
2194 | continue; |
2195 | } |
2196 | case OP_ArrayElemPtrPopUint8: { |
2197 | if (!ArrayElemPtrPop<PT_Uint8>(S, OpPC)) |
2198 | return false; |
2199 | continue; |
2200 | } |
2201 | case OP_ArrayElemPtrPopSint16: { |
2202 | if (!ArrayElemPtrPop<PT_Sint16>(S, OpPC)) |
2203 | return false; |
2204 | continue; |
2205 | } |
2206 | case OP_ArrayElemPtrPopUint16: { |
2207 | if (!ArrayElemPtrPop<PT_Uint16>(S, OpPC)) |
2208 | return false; |
2209 | continue; |
2210 | } |
2211 | case OP_ArrayElemPtrPopSint32: { |
2212 | if (!ArrayElemPtrPop<PT_Sint32>(S, OpPC)) |
2213 | return false; |
2214 | continue; |
2215 | } |
2216 | case OP_ArrayElemPtrPopUint32: { |
2217 | if (!ArrayElemPtrPop<PT_Uint32>(S, OpPC)) |
2218 | return false; |
2219 | continue; |
2220 | } |
2221 | case OP_ArrayElemPtrPopSint64: { |
2222 | if (!ArrayElemPtrPop<PT_Sint64>(S, OpPC)) |
2223 | return false; |
2224 | continue; |
2225 | } |
2226 | case OP_ArrayElemPtrPopUint64: { |
2227 | if (!ArrayElemPtrPop<PT_Uint64>(S, OpPC)) |
2228 | return false; |
2229 | continue; |
2230 | } |
2231 | case OP_ArrayElemPtrPopIntAP: { |
2232 | if (!ArrayElemPtrPop<PT_IntAP>(S, OpPC)) |
2233 | return false; |
2234 | continue; |
2235 | } |
2236 | case OP_ArrayElemPtrPopIntAPS: { |
2237 | if (!ArrayElemPtrPop<PT_IntAPS>(S, OpPC)) |
2238 | return false; |
2239 | continue; |
2240 | } |
2241 | case OP_ArrayElemPtrPopBool: { |
2242 | if (!ArrayElemPtrPop<PT_Bool>(S, OpPC)) |
2243 | return false; |
2244 | continue; |
2245 | } |
2246 | case OP_ArrayElemPtrPopFixedPoint: { |
2247 | if (!ArrayElemPtrPop<PT_FixedPoint>(S, OpPC)) |
2248 | return false; |
2249 | continue; |
2250 | } |
2251 | #endif |
2252 | #ifdef GET_DISASM |
2253 | case OP_ArrayElemPtrPopSint8: |
2254 | Text.Op = PrintName("ArrayElemPtrPopSint8" ); |
2255 | break; |
2256 | case OP_ArrayElemPtrPopUint8: |
2257 | Text.Op = PrintName("ArrayElemPtrPopUint8" ); |
2258 | break; |
2259 | case OP_ArrayElemPtrPopSint16: |
2260 | Text.Op = PrintName("ArrayElemPtrPopSint16" ); |
2261 | break; |
2262 | case OP_ArrayElemPtrPopUint16: |
2263 | Text.Op = PrintName("ArrayElemPtrPopUint16" ); |
2264 | break; |
2265 | case OP_ArrayElemPtrPopSint32: |
2266 | Text.Op = PrintName("ArrayElemPtrPopSint32" ); |
2267 | break; |
2268 | case OP_ArrayElemPtrPopUint32: |
2269 | Text.Op = PrintName("ArrayElemPtrPopUint32" ); |
2270 | break; |
2271 | case OP_ArrayElemPtrPopSint64: |
2272 | Text.Op = PrintName("ArrayElemPtrPopSint64" ); |
2273 | break; |
2274 | case OP_ArrayElemPtrPopUint64: |
2275 | Text.Op = PrintName("ArrayElemPtrPopUint64" ); |
2276 | break; |
2277 | case OP_ArrayElemPtrPopIntAP: |
2278 | Text.Op = PrintName("ArrayElemPtrPopIntAP" ); |
2279 | break; |
2280 | case OP_ArrayElemPtrPopIntAPS: |
2281 | Text.Op = PrintName("ArrayElemPtrPopIntAPS" ); |
2282 | break; |
2283 | case OP_ArrayElemPtrPopBool: |
2284 | Text.Op = PrintName("ArrayElemPtrPopBool" ); |
2285 | break; |
2286 | case OP_ArrayElemPtrPopFixedPoint: |
2287 | Text.Op = PrintName("ArrayElemPtrPopFixedPoint" ); |
2288 | break; |
2289 | #endif |
2290 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2291 | bool emitArrayElemPtrPopSint8(const SourceInfo &); |
2292 | bool emitArrayElemPtrPopUint8(const SourceInfo &); |
2293 | bool emitArrayElemPtrPopSint16(const SourceInfo &); |
2294 | bool emitArrayElemPtrPopUint16(const SourceInfo &); |
2295 | bool emitArrayElemPtrPopSint32(const SourceInfo &); |
2296 | bool emitArrayElemPtrPopUint32(const SourceInfo &); |
2297 | bool emitArrayElemPtrPopSint64(const SourceInfo &); |
2298 | bool emitArrayElemPtrPopUint64(const SourceInfo &); |
2299 | bool emitArrayElemPtrPopIntAP(const SourceInfo &); |
2300 | bool emitArrayElemPtrPopIntAPS(const SourceInfo &); |
2301 | bool emitArrayElemPtrPopBool(const SourceInfo &); |
2302 | bool emitArrayElemPtrPopFixedPoint(const SourceInfo &); |
2303 | #endif |
2304 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2305 | [[nodiscard]] bool emitArrayElemPtrPop(PrimType, const SourceInfo &I); |
2306 | #endif |
2307 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
2308 | bool |
2309 | #if defined(GET_EVAL_IMPL) |
2310 | EvalEmitter |
2311 | #else |
2312 | ByteCodeEmitter |
2313 | #endif |
2314 | ::emitArrayElemPtrPop(PrimType T0, const SourceInfo &I) { |
2315 | switch (T0) { |
2316 | case PT_Sint8: |
2317 | return emitArrayElemPtrPopSint8(I); |
2318 | case PT_Uint8: |
2319 | return emitArrayElemPtrPopUint8(I); |
2320 | case PT_Sint16: |
2321 | return emitArrayElemPtrPopSint16(I); |
2322 | case PT_Uint16: |
2323 | return emitArrayElemPtrPopUint16(I); |
2324 | case PT_Sint32: |
2325 | return emitArrayElemPtrPopSint32(I); |
2326 | case PT_Uint32: |
2327 | return emitArrayElemPtrPopUint32(I); |
2328 | case PT_Sint64: |
2329 | return emitArrayElemPtrPopSint64(I); |
2330 | case PT_Uint64: |
2331 | return emitArrayElemPtrPopUint64(I); |
2332 | case PT_IntAP: |
2333 | return emitArrayElemPtrPopIntAP(I); |
2334 | case PT_IntAPS: |
2335 | return emitArrayElemPtrPopIntAPS(I); |
2336 | case PT_Bool: |
2337 | return emitArrayElemPtrPopBool(I); |
2338 | case PT_FixedPoint: |
2339 | return emitArrayElemPtrPopFixedPoint(I); |
2340 | default: llvm_unreachable("invalid type: emitArrayElemPtrPop" ); |
2341 | } |
2342 | llvm_unreachable("invalid enum value" ); |
2343 | } |
2344 | #endif |
2345 | #ifdef GET_LINK_IMPL |
2346 | bool ByteCodeEmitter::emitArrayElemPtrPopSint8(const SourceInfo &L) { |
2347 | return emitOp<>(OP_ArrayElemPtrPopSint8, L); |
2348 | } |
2349 | bool ByteCodeEmitter::emitArrayElemPtrPopUint8(const SourceInfo &L) { |
2350 | return emitOp<>(OP_ArrayElemPtrPopUint8, L); |
2351 | } |
2352 | bool ByteCodeEmitter::emitArrayElemPtrPopSint16(const SourceInfo &L) { |
2353 | return emitOp<>(OP_ArrayElemPtrPopSint16, L); |
2354 | } |
2355 | bool ByteCodeEmitter::emitArrayElemPtrPopUint16(const SourceInfo &L) { |
2356 | return emitOp<>(OP_ArrayElemPtrPopUint16, L); |
2357 | } |
2358 | bool ByteCodeEmitter::emitArrayElemPtrPopSint32(const SourceInfo &L) { |
2359 | return emitOp<>(OP_ArrayElemPtrPopSint32, L); |
2360 | } |
2361 | bool ByteCodeEmitter::emitArrayElemPtrPopUint32(const SourceInfo &L) { |
2362 | return emitOp<>(OP_ArrayElemPtrPopUint32, L); |
2363 | } |
2364 | bool ByteCodeEmitter::emitArrayElemPtrPopSint64(const SourceInfo &L) { |
2365 | return emitOp<>(OP_ArrayElemPtrPopSint64, L); |
2366 | } |
2367 | bool ByteCodeEmitter::emitArrayElemPtrPopUint64(const SourceInfo &L) { |
2368 | return emitOp<>(OP_ArrayElemPtrPopUint64, L); |
2369 | } |
2370 | bool ByteCodeEmitter::emitArrayElemPtrPopIntAP(const SourceInfo &L) { |
2371 | return emitOp<>(OP_ArrayElemPtrPopIntAP, L); |
2372 | } |
2373 | bool ByteCodeEmitter::emitArrayElemPtrPopIntAPS(const SourceInfo &L) { |
2374 | return emitOp<>(OP_ArrayElemPtrPopIntAPS, L); |
2375 | } |
2376 | bool ByteCodeEmitter::emitArrayElemPtrPopBool(const SourceInfo &L) { |
2377 | return emitOp<>(OP_ArrayElemPtrPopBool, L); |
2378 | } |
2379 | bool ByteCodeEmitter::emitArrayElemPtrPopFixedPoint(const SourceInfo &L) { |
2380 | return emitOp<>(OP_ArrayElemPtrPopFixedPoint, L); |
2381 | } |
2382 | #endif |
2383 | #ifdef GET_EVAL_IMPL |
2384 | bool EvalEmitter::emitArrayElemPtrPopSint8(const SourceInfo &L) { |
2385 | if (!isActive()) return true; |
2386 | CurrentSource = L; |
2387 | return ArrayElemPtrPop<PT_Sint8>(S, OpPC); |
2388 | } |
2389 | bool EvalEmitter::emitArrayElemPtrPopUint8(const SourceInfo &L) { |
2390 | if (!isActive()) return true; |
2391 | CurrentSource = L; |
2392 | return ArrayElemPtrPop<PT_Uint8>(S, OpPC); |
2393 | } |
2394 | bool EvalEmitter::emitArrayElemPtrPopSint16(const SourceInfo &L) { |
2395 | if (!isActive()) return true; |
2396 | CurrentSource = L; |
2397 | return ArrayElemPtrPop<PT_Sint16>(S, OpPC); |
2398 | } |
2399 | bool EvalEmitter::emitArrayElemPtrPopUint16(const SourceInfo &L) { |
2400 | if (!isActive()) return true; |
2401 | CurrentSource = L; |
2402 | return ArrayElemPtrPop<PT_Uint16>(S, OpPC); |
2403 | } |
2404 | bool EvalEmitter::emitArrayElemPtrPopSint32(const SourceInfo &L) { |
2405 | if (!isActive()) return true; |
2406 | CurrentSource = L; |
2407 | return ArrayElemPtrPop<PT_Sint32>(S, OpPC); |
2408 | } |
2409 | bool EvalEmitter::emitArrayElemPtrPopUint32(const SourceInfo &L) { |
2410 | if (!isActive()) return true; |
2411 | CurrentSource = L; |
2412 | return ArrayElemPtrPop<PT_Uint32>(S, OpPC); |
2413 | } |
2414 | bool EvalEmitter::emitArrayElemPtrPopSint64(const SourceInfo &L) { |
2415 | if (!isActive()) return true; |
2416 | CurrentSource = L; |
2417 | return ArrayElemPtrPop<PT_Sint64>(S, OpPC); |
2418 | } |
2419 | bool EvalEmitter::emitArrayElemPtrPopUint64(const SourceInfo &L) { |
2420 | if (!isActive()) return true; |
2421 | CurrentSource = L; |
2422 | return ArrayElemPtrPop<PT_Uint64>(S, OpPC); |
2423 | } |
2424 | bool EvalEmitter::emitArrayElemPtrPopIntAP(const SourceInfo &L) { |
2425 | if (!isActive()) return true; |
2426 | CurrentSource = L; |
2427 | return ArrayElemPtrPop<PT_IntAP>(S, OpPC); |
2428 | } |
2429 | bool EvalEmitter::emitArrayElemPtrPopIntAPS(const SourceInfo &L) { |
2430 | if (!isActive()) return true; |
2431 | CurrentSource = L; |
2432 | return ArrayElemPtrPop<PT_IntAPS>(S, OpPC); |
2433 | } |
2434 | bool EvalEmitter::emitArrayElemPtrPopBool(const SourceInfo &L) { |
2435 | if (!isActive()) return true; |
2436 | CurrentSource = L; |
2437 | return ArrayElemPtrPop<PT_Bool>(S, OpPC); |
2438 | } |
2439 | bool EvalEmitter::emitArrayElemPtrPopFixedPoint(const SourceInfo &L) { |
2440 | if (!isActive()) return true; |
2441 | CurrentSource = L; |
2442 | return ArrayElemPtrPop<PT_FixedPoint>(S, OpPC); |
2443 | } |
2444 | #endif |
2445 | #ifdef GET_OPCODE_NAMES |
2446 | OP_Assume, |
2447 | #endif |
2448 | #ifdef GET_INTERP |
2449 | case OP_Assume: { |
2450 | if (!Assume(S, OpPC)) |
2451 | return false; |
2452 | continue; |
2453 | } |
2454 | #endif |
2455 | #ifdef GET_DISASM |
2456 | case OP_Assume: |
2457 | Text.Op = PrintName("Assume" ); |
2458 | break; |
2459 | #endif |
2460 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2461 | bool emitAssume(const SourceInfo &); |
2462 | #endif |
2463 | #ifdef GET_LINK_IMPL |
2464 | bool ByteCodeEmitter::emitAssume(const SourceInfo &L) { |
2465 | return emitOp<>(OP_Assume, L); |
2466 | } |
2467 | #endif |
2468 | #ifdef GET_EVAL_IMPL |
2469 | bool EvalEmitter::emitAssume(const SourceInfo &L) { |
2470 | if (!isActive()) return true; |
2471 | CurrentSource = L; |
2472 | return Assume(S, OpPC); |
2473 | } |
2474 | #endif |
2475 | #ifdef GET_OPCODE_NAMES |
2476 | OP_BCP, |
2477 | #endif |
2478 | #ifdef GET_INTERP |
2479 | case OP_BCP: { |
2480 | const auto V0 = ReadArg<int32_t>(S, PC); |
2481 | const auto V1 = ReadArg<PrimType>(S, PC); |
2482 | if (!BCP(S, PC, V0, V1)) |
2483 | return false; |
2484 | continue; |
2485 | } |
2486 | #endif |
2487 | #ifdef GET_DISASM |
2488 | case OP_BCP: |
2489 | Text.Op = PrintName("BCP" ); |
2490 | Text.Args.push_back(printArg<int32_t>(P, PC)); |
2491 | Text.Args.push_back(printArg<PrimType>(P, PC)); |
2492 | break; |
2493 | #endif |
2494 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2495 | bool emitBCP( int32_t , PrimType , const SourceInfo &); |
2496 | #endif |
2497 | #ifdef GET_LINK_IMPL |
2498 | bool ByteCodeEmitter::emitBCP( int32_t A0, PrimType A1, const SourceInfo &L) { |
2499 | return emitOp<int32_t, PrimType>(OP_BCP, A0, A1, L); |
2500 | } |
2501 | #endif |
2502 | #ifdef GET_OPCODE_NAMES |
2503 | OP_BitAndSint8, |
2504 | OP_BitAndUint8, |
2505 | OP_BitAndSint16, |
2506 | OP_BitAndUint16, |
2507 | OP_BitAndSint32, |
2508 | OP_BitAndUint32, |
2509 | OP_BitAndSint64, |
2510 | OP_BitAndUint64, |
2511 | OP_BitAndIntAP, |
2512 | OP_BitAndIntAPS, |
2513 | OP_BitAndFixedPoint, |
2514 | #endif |
2515 | #ifdef GET_INTERP |
2516 | case OP_BitAndSint8: { |
2517 | if (!BitAnd<PT_Sint8>(S, OpPC)) |
2518 | return false; |
2519 | continue; |
2520 | } |
2521 | case OP_BitAndUint8: { |
2522 | if (!BitAnd<PT_Uint8>(S, OpPC)) |
2523 | return false; |
2524 | continue; |
2525 | } |
2526 | case OP_BitAndSint16: { |
2527 | if (!BitAnd<PT_Sint16>(S, OpPC)) |
2528 | return false; |
2529 | continue; |
2530 | } |
2531 | case OP_BitAndUint16: { |
2532 | if (!BitAnd<PT_Uint16>(S, OpPC)) |
2533 | return false; |
2534 | continue; |
2535 | } |
2536 | case OP_BitAndSint32: { |
2537 | if (!BitAnd<PT_Sint32>(S, OpPC)) |
2538 | return false; |
2539 | continue; |
2540 | } |
2541 | case OP_BitAndUint32: { |
2542 | if (!BitAnd<PT_Uint32>(S, OpPC)) |
2543 | return false; |
2544 | continue; |
2545 | } |
2546 | case OP_BitAndSint64: { |
2547 | if (!BitAnd<PT_Sint64>(S, OpPC)) |
2548 | return false; |
2549 | continue; |
2550 | } |
2551 | case OP_BitAndUint64: { |
2552 | if (!BitAnd<PT_Uint64>(S, OpPC)) |
2553 | return false; |
2554 | continue; |
2555 | } |
2556 | case OP_BitAndIntAP: { |
2557 | if (!BitAnd<PT_IntAP>(S, OpPC)) |
2558 | return false; |
2559 | continue; |
2560 | } |
2561 | case OP_BitAndIntAPS: { |
2562 | if (!BitAnd<PT_IntAPS>(S, OpPC)) |
2563 | return false; |
2564 | continue; |
2565 | } |
2566 | case OP_BitAndFixedPoint: { |
2567 | if (!BitAnd<PT_FixedPoint>(S, OpPC)) |
2568 | return false; |
2569 | continue; |
2570 | } |
2571 | #endif |
2572 | #ifdef GET_DISASM |
2573 | case OP_BitAndSint8: |
2574 | Text.Op = PrintName("BitAndSint8" ); |
2575 | break; |
2576 | case OP_BitAndUint8: |
2577 | Text.Op = PrintName("BitAndUint8" ); |
2578 | break; |
2579 | case OP_BitAndSint16: |
2580 | Text.Op = PrintName("BitAndSint16" ); |
2581 | break; |
2582 | case OP_BitAndUint16: |
2583 | Text.Op = PrintName("BitAndUint16" ); |
2584 | break; |
2585 | case OP_BitAndSint32: |
2586 | Text.Op = PrintName("BitAndSint32" ); |
2587 | break; |
2588 | case OP_BitAndUint32: |
2589 | Text.Op = PrintName("BitAndUint32" ); |
2590 | break; |
2591 | case OP_BitAndSint64: |
2592 | Text.Op = PrintName("BitAndSint64" ); |
2593 | break; |
2594 | case OP_BitAndUint64: |
2595 | Text.Op = PrintName("BitAndUint64" ); |
2596 | break; |
2597 | case OP_BitAndIntAP: |
2598 | Text.Op = PrintName("BitAndIntAP" ); |
2599 | break; |
2600 | case OP_BitAndIntAPS: |
2601 | Text.Op = PrintName("BitAndIntAPS" ); |
2602 | break; |
2603 | case OP_BitAndFixedPoint: |
2604 | Text.Op = PrintName("BitAndFixedPoint" ); |
2605 | break; |
2606 | #endif |
2607 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2608 | bool emitBitAndSint8(const SourceInfo &); |
2609 | bool emitBitAndUint8(const SourceInfo &); |
2610 | bool emitBitAndSint16(const SourceInfo &); |
2611 | bool emitBitAndUint16(const SourceInfo &); |
2612 | bool emitBitAndSint32(const SourceInfo &); |
2613 | bool emitBitAndUint32(const SourceInfo &); |
2614 | bool emitBitAndSint64(const SourceInfo &); |
2615 | bool emitBitAndUint64(const SourceInfo &); |
2616 | bool emitBitAndIntAP(const SourceInfo &); |
2617 | bool emitBitAndIntAPS(const SourceInfo &); |
2618 | bool emitBitAndFixedPoint(const SourceInfo &); |
2619 | #endif |
2620 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2621 | [[nodiscard]] bool emitBitAnd(PrimType, const SourceInfo &I); |
2622 | #endif |
2623 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
2624 | bool |
2625 | #if defined(GET_EVAL_IMPL) |
2626 | EvalEmitter |
2627 | #else |
2628 | ByteCodeEmitter |
2629 | #endif |
2630 | ::emitBitAnd(PrimType T0, const SourceInfo &I) { |
2631 | switch (T0) { |
2632 | case PT_Sint8: |
2633 | return emitBitAndSint8(I); |
2634 | case PT_Uint8: |
2635 | return emitBitAndUint8(I); |
2636 | case PT_Sint16: |
2637 | return emitBitAndSint16(I); |
2638 | case PT_Uint16: |
2639 | return emitBitAndUint16(I); |
2640 | case PT_Sint32: |
2641 | return emitBitAndSint32(I); |
2642 | case PT_Uint32: |
2643 | return emitBitAndUint32(I); |
2644 | case PT_Sint64: |
2645 | return emitBitAndSint64(I); |
2646 | case PT_Uint64: |
2647 | return emitBitAndUint64(I); |
2648 | case PT_IntAP: |
2649 | return emitBitAndIntAP(I); |
2650 | case PT_IntAPS: |
2651 | return emitBitAndIntAPS(I); |
2652 | case PT_FixedPoint: |
2653 | return emitBitAndFixedPoint(I); |
2654 | default: llvm_unreachable("invalid type: emitBitAnd" ); |
2655 | } |
2656 | llvm_unreachable("invalid enum value" ); |
2657 | } |
2658 | #endif |
2659 | #ifdef GET_LINK_IMPL |
2660 | bool ByteCodeEmitter::emitBitAndSint8(const SourceInfo &L) { |
2661 | return emitOp<>(OP_BitAndSint8, L); |
2662 | } |
2663 | bool ByteCodeEmitter::emitBitAndUint8(const SourceInfo &L) { |
2664 | return emitOp<>(OP_BitAndUint8, L); |
2665 | } |
2666 | bool ByteCodeEmitter::emitBitAndSint16(const SourceInfo &L) { |
2667 | return emitOp<>(OP_BitAndSint16, L); |
2668 | } |
2669 | bool ByteCodeEmitter::emitBitAndUint16(const SourceInfo &L) { |
2670 | return emitOp<>(OP_BitAndUint16, L); |
2671 | } |
2672 | bool ByteCodeEmitter::emitBitAndSint32(const SourceInfo &L) { |
2673 | return emitOp<>(OP_BitAndSint32, L); |
2674 | } |
2675 | bool ByteCodeEmitter::emitBitAndUint32(const SourceInfo &L) { |
2676 | return emitOp<>(OP_BitAndUint32, L); |
2677 | } |
2678 | bool ByteCodeEmitter::emitBitAndSint64(const SourceInfo &L) { |
2679 | return emitOp<>(OP_BitAndSint64, L); |
2680 | } |
2681 | bool ByteCodeEmitter::emitBitAndUint64(const SourceInfo &L) { |
2682 | return emitOp<>(OP_BitAndUint64, L); |
2683 | } |
2684 | bool ByteCodeEmitter::emitBitAndIntAP(const SourceInfo &L) { |
2685 | return emitOp<>(OP_BitAndIntAP, L); |
2686 | } |
2687 | bool ByteCodeEmitter::emitBitAndIntAPS(const SourceInfo &L) { |
2688 | return emitOp<>(OP_BitAndIntAPS, L); |
2689 | } |
2690 | bool ByteCodeEmitter::emitBitAndFixedPoint(const SourceInfo &L) { |
2691 | return emitOp<>(OP_BitAndFixedPoint, L); |
2692 | } |
2693 | #endif |
2694 | #ifdef GET_EVAL_IMPL |
2695 | bool EvalEmitter::emitBitAndSint8(const SourceInfo &L) { |
2696 | if (!isActive()) return true; |
2697 | CurrentSource = L; |
2698 | return BitAnd<PT_Sint8>(S, OpPC); |
2699 | } |
2700 | bool EvalEmitter::emitBitAndUint8(const SourceInfo &L) { |
2701 | if (!isActive()) return true; |
2702 | CurrentSource = L; |
2703 | return BitAnd<PT_Uint8>(S, OpPC); |
2704 | } |
2705 | bool EvalEmitter::emitBitAndSint16(const SourceInfo &L) { |
2706 | if (!isActive()) return true; |
2707 | CurrentSource = L; |
2708 | return BitAnd<PT_Sint16>(S, OpPC); |
2709 | } |
2710 | bool EvalEmitter::emitBitAndUint16(const SourceInfo &L) { |
2711 | if (!isActive()) return true; |
2712 | CurrentSource = L; |
2713 | return BitAnd<PT_Uint16>(S, OpPC); |
2714 | } |
2715 | bool EvalEmitter::emitBitAndSint32(const SourceInfo &L) { |
2716 | if (!isActive()) return true; |
2717 | CurrentSource = L; |
2718 | return BitAnd<PT_Sint32>(S, OpPC); |
2719 | } |
2720 | bool EvalEmitter::emitBitAndUint32(const SourceInfo &L) { |
2721 | if (!isActive()) return true; |
2722 | CurrentSource = L; |
2723 | return BitAnd<PT_Uint32>(S, OpPC); |
2724 | } |
2725 | bool EvalEmitter::emitBitAndSint64(const SourceInfo &L) { |
2726 | if (!isActive()) return true; |
2727 | CurrentSource = L; |
2728 | return BitAnd<PT_Sint64>(S, OpPC); |
2729 | } |
2730 | bool EvalEmitter::emitBitAndUint64(const SourceInfo &L) { |
2731 | if (!isActive()) return true; |
2732 | CurrentSource = L; |
2733 | return BitAnd<PT_Uint64>(S, OpPC); |
2734 | } |
2735 | bool EvalEmitter::emitBitAndIntAP(const SourceInfo &L) { |
2736 | if (!isActive()) return true; |
2737 | CurrentSource = L; |
2738 | return BitAnd<PT_IntAP>(S, OpPC); |
2739 | } |
2740 | bool EvalEmitter::emitBitAndIntAPS(const SourceInfo &L) { |
2741 | if (!isActive()) return true; |
2742 | CurrentSource = L; |
2743 | return BitAnd<PT_IntAPS>(S, OpPC); |
2744 | } |
2745 | bool EvalEmitter::emitBitAndFixedPoint(const SourceInfo &L) { |
2746 | if (!isActive()) return true; |
2747 | CurrentSource = L; |
2748 | return BitAnd<PT_FixedPoint>(S, OpPC); |
2749 | } |
2750 | #endif |
2751 | #ifdef GET_OPCODE_NAMES |
2752 | OP_BitCast, |
2753 | #endif |
2754 | #ifdef GET_INTERP |
2755 | case OP_BitCast: { |
2756 | if (!BitCast(S, OpPC)) |
2757 | return false; |
2758 | continue; |
2759 | } |
2760 | #endif |
2761 | #ifdef GET_DISASM |
2762 | case OP_BitCast: |
2763 | Text.Op = PrintName("BitCast" ); |
2764 | break; |
2765 | #endif |
2766 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2767 | bool emitBitCast(const SourceInfo &); |
2768 | #endif |
2769 | #ifdef GET_LINK_IMPL |
2770 | bool ByteCodeEmitter::emitBitCast(const SourceInfo &L) { |
2771 | return emitOp<>(OP_BitCast, L); |
2772 | } |
2773 | #endif |
2774 | #ifdef GET_EVAL_IMPL |
2775 | bool EvalEmitter::emitBitCast(const SourceInfo &L) { |
2776 | if (!isActive()) return true; |
2777 | CurrentSource = L; |
2778 | return BitCast(S, OpPC); |
2779 | } |
2780 | #endif |
2781 | #ifdef GET_OPCODE_NAMES |
2782 | OP_BitCastPrimUint8, |
2783 | OP_BitCastPrimSint8, |
2784 | OP_BitCastPrimUint16, |
2785 | OP_BitCastPrimSint16, |
2786 | OP_BitCastPrimUint32, |
2787 | OP_BitCastPrimSint32, |
2788 | OP_BitCastPrimUint64, |
2789 | OP_BitCastPrimSint64, |
2790 | OP_BitCastPrimIntAP, |
2791 | OP_BitCastPrimIntAPS, |
2792 | OP_BitCastPrimBool, |
2793 | OP_BitCastPrimFloat, |
2794 | OP_BitCastPrimPtr, |
2795 | #endif |
2796 | #ifdef GET_INTERP |
2797 | case OP_BitCastPrimUint8: { |
2798 | const auto V0 = ReadArg<bool>(S, PC); |
2799 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2800 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2801 | if (!BitCastPrim<PT_Uint8>(S, OpPC, V0, V1, V2)) |
2802 | return false; |
2803 | continue; |
2804 | } |
2805 | case OP_BitCastPrimSint8: { |
2806 | const auto V0 = ReadArg<bool>(S, PC); |
2807 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2808 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2809 | if (!BitCastPrim<PT_Sint8>(S, OpPC, V0, V1, V2)) |
2810 | return false; |
2811 | continue; |
2812 | } |
2813 | case OP_BitCastPrimUint16: { |
2814 | const auto V0 = ReadArg<bool>(S, PC); |
2815 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2816 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2817 | if (!BitCastPrim<PT_Uint16>(S, OpPC, V0, V1, V2)) |
2818 | return false; |
2819 | continue; |
2820 | } |
2821 | case OP_BitCastPrimSint16: { |
2822 | const auto V0 = ReadArg<bool>(S, PC); |
2823 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2824 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2825 | if (!BitCastPrim<PT_Sint16>(S, OpPC, V0, V1, V2)) |
2826 | return false; |
2827 | continue; |
2828 | } |
2829 | case OP_BitCastPrimUint32: { |
2830 | const auto V0 = ReadArg<bool>(S, PC); |
2831 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2832 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2833 | if (!BitCastPrim<PT_Uint32>(S, OpPC, V0, V1, V2)) |
2834 | return false; |
2835 | continue; |
2836 | } |
2837 | case OP_BitCastPrimSint32: { |
2838 | const auto V0 = ReadArg<bool>(S, PC); |
2839 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2840 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2841 | if (!BitCastPrim<PT_Sint32>(S, OpPC, V0, V1, V2)) |
2842 | return false; |
2843 | continue; |
2844 | } |
2845 | case OP_BitCastPrimUint64: { |
2846 | const auto V0 = ReadArg<bool>(S, PC); |
2847 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2848 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2849 | if (!BitCastPrim<PT_Uint64>(S, OpPC, V0, V1, V2)) |
2850 | return false; |
2851 | continue; |
2852 | } |
2853 | case OP_BitCastPrimSint64: { |
2854 | const auto V0 = ReadArg<bool>(S, PC); |
2855 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2856 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2857 | if (!BitCastPrim<PT_Sint64>(S, OpPC, V0, V1, V2)) |
2858 | return false; |
2859 | continue; |
2860 | } |
2861 | case OP_BitCastPrimIntAP: { |
2862 | const auto V0 = ReadArg<bool>(S, PC); |
2863 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2864 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2865 | if (!BitCastPrim<PT_IntAP>(S, OpPC, V0, V1, V2)) |
2866 | return false; |
2867 | continue; |
2868 | } |
2869 | case OP_BitCastPrimIntAPS: { |
2870 | const auto V0 = ReadArg<bool>(S, PC); |
2871 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2872 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2873 | if (!BitCastPrim<PT_IntAPS>(S, OpPC, V0, V1, V2)) |
2874 | return false; |
2875 | continue; |
2876 | } |
2877 | case OP_BitCastPrimBool: { |
2878 | const auto V0 = ReadArg<bool>(S, PC); |
2879 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2880 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2881 | if (!BitCastPrim<PT_Bool>(S, OpPC, V0, V1, V2)) |
2882 | return false; |
2883 | continue; |
2884 | } |
2885 | case OP_BitCastPrimFloat: { |
2886 | const auto V0 = ReadArg<bool>(S, PC); |
2887 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2888 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2889 | if (!BitCastPrim<PT_Float>(S, OpPC, V0, V1, V2)) |
2890 | return false; |
2891 | continue; |
2892 | } |
2893 | case OP_BitCastPrimPtr: { |
2894 | const auto V0 = ReadArg<bool>(S, PC); |
2895 | const auto V1 = ReadArg<uint32_t>(S, PC); |
2896 | const auto V2 = ReadArg<const llvm::fltSemantics *>(S, PC); |
2897 | if (!BitCastPrim<PT_Ptr>(S, OpPC, V0, V1, V2)) |
2898 | return false; |
2899 | continue; |
2900 | } |
2901 | #endif |
2902 | #ifdef GET_DISASM |
2903 | case OP_BitCastPrimUint8: |
2904 | Text.Op = PrintName("BitCastPrimUint8" ); |
2905 | Text.Args.push_back(printArg<bool>(P, PC)); |
2906 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2907 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2908 | break; |
2909 | case OP_BitCastPrimSint8: |
2910 | Text.Op = PrintName("BitCastPrimSint8" ); |
2911 | Text.Args.push_back(printArg<bool>(P, PC)); |
2912 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2913 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2914 | break; |
2915 | case OP_BitCastPrimUint16: |
2916 | Text.Op = PrintName("BitCastPrimUint16" ); |
2917 | Text.Args.push_back(printArg<bool>(P, PC)); |
2918 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2919 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2920 | break; |
2921 | case OP_BitCastPrimSint16: |
2922 | Text.Op = PrintName("BitCastPrimSint16" ); |
2923 | Text.Args.push_back(printArg<bool>(P, PC)); |
2924 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2925 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2926 | break; |
2927 | case OP_BitCastPrimUint32: |
2928 | Text.Op = PrintName("BitCastPrimUint32" ); |
2929 | Text.Args.push_back(printArg<bool>(P, PC)); |
2930 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2931 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2932 | break; |
2933 | case OP_BitCastPrimSint32: |
2934 | Text.Op = PrintName("BitCastPrimSint32" ); |
2935 | Text.Args.push_back(printArg<bool>(P, PC)); |
2936 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2937 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2938 | break; |
2939 | case OP_BitCastPrimUint64: |
2940 | Text.Op = PrintName("BitCastPrimUint64" ); |
2941 | Text.Args.push_back(printArg<bool>(P, PC)); |
2942 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2943 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2944 | break; |
2945 | case OP_BitCastPrimSint64: |
2946 | Text.Op = PrintName("BitCastPrimSint64" ); |
2947 | Text.Args.push_back(printArg<bool>(P, PC)); |
2948 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2949 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2950 | break; |
2951 | case OP_BitCastPrimIntAP: |
2952 | Text.Op = PrintName("BitCastPrimIntAP" ); |
2953 | Text.Args.push_back(printArg<bool>(P, PC)); |
2954 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2955 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2956 | break; |
2957 | case OP_BitCastPrimIntAPS: |
2958 | Text.Op = PrintName("BitCastPrimIntAPS" ); |
2959 | Text.Args.push_back(printArg<bool>(P, PC)); |
2960 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2961 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2962 | break; |
2963 | case OP_BitCastPrimBool: |
2964 | Text.Op = PrintName("BitCastPrimBool" ); |
2965 | Text.Args.push_back(printArg<bool>(P, PC)); |
2966 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2967 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2968 | break; |
2969 | case OP_BitCastPrimFloat: |
2970 | Text.Op = PrintName("BitCastPrimFloat" ); |
2971 | Text.Args.push_back(printArg<bool>(P, PC)); |
2972 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2973 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2974 | break; |
2975 | case OP_BitCastPrimPtr: |
2976 | Text.Op = PrintName("BitCastPrimPtr" ); |
2977 | Text.Args.push_back(printArg<bool>(P, PC)); |
2978 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
2979 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
2980 | break; |
2981 | #endif |
2982 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2983 | bool emitBitCastPrimUint8( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2984 | bool emitBitCastPrimSint8( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2985 | bool emitBitCastPrimUint16( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2986 | bool emitBitCastPrimSint16( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2987 | bool emitBitCastPrimUint32( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2988 | bool emitBitCastPrimSint32( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2989 | bool emitBitCastPrimUint64( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2990 | bool emitBitCastPrimSint64( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2991 | bool emitBitCastPrimIntAP( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2992 | bool emitBitCastPrimIntAPS( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2993 | bool emitBitCastPrimBool( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2994 | bool emitBitCastPrimFloat( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2995 | bool emitBitCastPrimPtr( bool , uint32_t , const llvm::fltSemantics * , const SourceInfo &); |
2996 | #endif |
2997 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2998 | [[nodiscard]] bool emitBitCastPrim(PrimType, bool, uint32_t, const llvm::fltSemantics *, const SourceInfo &I); |
2999 | #endif |
3000 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
3001 | bool |
3002 | #if defined(GET_EVAL_IMPL) |
3003 | EvalEmitter |
3004 | #else |
3005 | ByteCodeEmitter |
3006 | #endif |
3007 | ::emitBitCastPrim(PrimType T0, bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &I) { |
3008 | switch (T0) { |
3009 | case PT_Uint8: |
3010 | return emitBitCastPrimUint8(A0, A1, A2, I); |
3011 | case PT_Sint8: |
3012 | return emitBitCastPrimSint8(A0, A1, A2, I); |
3013 | case PT_Uint16: |
3014 | return emitBitCastPrimUint16(A0, A1, A2, I); |
3015 | case PT_Sint16: |
3016 | return emitBitCastPrimSint16(A0, A1, A2, I); |
3017 | case PT_Uint32: |
3018 | return emitBitCastPrimUint32(A0, A1, A2, I); |
3019 | case PT_Sint32: |
3020 | return emitBitCastPrimSint32(A0, A1, A2, I); |
3021 | case PT_Uint64: |
3022 | return emitBitCastPrimUint64(A0, A1, A2, I); |
3023 | case PT_Sint64: |
3024 | return emitBitCastPrimSint64(A0, A1, A2, I); |
3025 | case PT_IntAP: |
3026 | return emitBitCastPrimIntAP(A0, A1, A2, I); |
3027 | case PT_IntAPS: |
3028 | return emitBitCastPrimIntAPS(A0, A1, A2, I); |
3029 | case PT_Bool: |
3030 | return emitBitCastPrimBool(A0, A1, A2, I); |
3031 | case PT_Float: |
3032 | return emitBitCastPrimFloat(A0, A1, A2, I); |
3033 | case PT_Ptr: |
3034 | return emitBitCastPrimPtr(A0, A1, A2, I); |
3035 | default: llvm_unreachable("invalid type: emitBitCastPrim" ); |
3036 | } |
3037 | llvm_unreachable("invalid enum value" ); |
3038 | } |
3039 | #endif |
3040 | #ifdef GET_LINK_IMPL |
3041 | bool ByteCodeEmitter::emitBitCastPrimUint8( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3042 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimUint8, A0, A1, A2, L); |
3043 | } |
3044 | bool ByteCodeEmitter::emitBitCastPrimSint8( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3045 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimSint8, A0, A1, A2, L); |
3046 | } |
3047 | bool ByteCodeEmitter::emitBitCastPrimUint16( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3048 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimUint16, A0, A1, A2, L); |
3049 | } |
3050 | bool ByteCodeEmitter::emitBitCastPrimSint16( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3051 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimSint16, A0, A1, A2, L); |
3052 | } |
3053 | bool ByteCodeEmitter::emitBitCastPrimUint32( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3054 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimUint32, A0, A1, A2, L); |
3055 | } |
3056 | bool ByteCodeEmitter::emitBitCastPrimSint32( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3057 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimSint32, A0, A1, A2, L); |
3058 | } |
3059 | bool ByteCodeEmitter::emitBitCastPrimUint64( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3060 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimUint64, A0, A1, A2, L); |
3061 | } |
3062 | bool ByteCodeEmitter::emitBitCastPrimSint64( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3063 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimSint64, A0, A1, A2, L); |
3064 | } |
3065 | bool ByteCodeEmitter::emitBitCastPrimIntAP( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3066 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimIntAP, A0, A1, A2, L); |
3067 | } |
3068 | bool ByteCodeEmitter::emitBitCastPrimIntAPS( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3069 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimIntAPS, A0, A1, A2, L); |
3070 | } |
3071 | bool ByteCodeEmitter::emitBitCastPrimBool( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3072 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimBool, A0, A1, A2, L); |
3073 | } |
3074 | bool ByteCodeEmitter::emitBitCastPrimFloat( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3075 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimFloat, A0, A1, A2, L); |
3076 | } |
3077 | bool ByteCodeEmitter::emitBitCastPrimPtr( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3078 | return emitOp<bool, uint32_t, const llvm::fltSemantics *>(OP_BitCastPrimPtr, A0, A1, A2, L); |
3079 | } |
3080 | #endif |
3081 | #ifdef GET_EVAL_IMPL |
3082 | bool EvalEmitter::emitBitCastPrimUint8( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3083 | if (!isActive()) return true; |
3084 | CurrentSource = L; |
3085 | return BitCastPrim<PT_Uint8>(S, OpPC, A0, A1, A2); |
3086 | } |
3087 | bool EvalEmitter::emitBitCastPrimSint8( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3088 | if (!isActive()) return true; |
3089 | CurrentSource = L; |
3090 | return BitCastPrim<PT_Sint8>(S, OpPC, A0, A1, A2); |
3091 | } |
3092 | bool EvalEmitter::emitBitCastPrimUint16( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3093 | if (!isActive()) return true; |
3094 | CurrentSource = L; |
3095 | return BitCastPrim<PT_Uint16>(S, OpPC, A0, A1, A2); |
3096 | } |
3097 | bool EvalEmitter::emitBitCastPrimSint16( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3098 | if (!isActive()) return true; |
3099 | CurrentSource = L; |
3100 | return BitCastPrim<PT_Sint16>(S, OpPC, A0, A1, A2); |
3101 | } |
3102 | bool EvalEmitter::emitBitCastPrimUint32( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3103 | if (!isActive()) return true; |
3104 | CurrentSource = L; |
3105 | return BitCastPrim<PT_Uint32>(S, OpPC, A0, A1, A2); |
3106 | } |
3107 | bool EvalEmitter::emitBitCastPrimSint32( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3108 | if (!isActive()) return true; |
3109 | CurrentSource = L; |
3110 | return BitCastPrim<PT_Sint32>(S, OpPC, A0, A1, A2); |
3111 | } |
3112 | bool EvalEmitter::emitBitCastPrimUint64( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3113 | if (!isActive()) return true; |
3114 | CurrentSource = L; |
3115 | return BitCastPrim<PT_Uint64>(S, OpPC, A0, A1, A2); |
3116 | } |
3117 | bool EvalEmitter::emitBitCastPrimSint64( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3118 | if (!isActive()) return true; |
3119 | CurrentSource = L; |
3120 | return BitCastPrim<PT_Sint64>(S, OpPC, A0, A1, A2); |
3121 | } |
3122 | bool EvalEmitter::emitBitCastPrimIntAP( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3123 | if (!isActive()) return true; |
3124 | CurrentSource = L; |
3125 | return BitCastPrim<PT_IntAP>(S, OpPC, A0, A1, A2); |
3126 | } |
3127 | bool EvalEmitter::emitBitCastPrimIntAPS( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3128 | if (!isActive()) return true; |
3129 | CurrentSource = L; |
3130 | return BitCastPrim<PT_IntAPS>(S, OpPC, A0, A1, A2); |
3131 | } |
3132 | bool EvalEmitter::emitBitCastPrimBool( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3133 | if (!isActive()) return true; |
3134 | CurrentSource = L; |
3135 | return BitCastPrim<PT_Bool>(S, OpPC, A0, A1, A2); |
3136 | } |
3137 | bool EvalEmitter::emitBitCastPrimFloat( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3138 | if (!isActive()) return true; |
3139 | CurrentSource = L; |
3140 | return BitCastPrim<PT_Float>(S, OpPC, A0, A1, A2); |
3141 | } |
3142 | bool EvalEmitter::emitBitCastPrimPtr( bool A0, uint32_t A1, const llvm::fltSemantics * A2, const SourceInfo &L) { |
3143 | if (!isActive()) return true; |
3144 | CurrentSource = L; |
3145 | return BitCastPrim<PT_Ptr>(S, OpPC, A0, A1, A2); |
3146 | } |
3147 | #endif |
3148 | #ifdef GET_OPCODE_NAMES |
3149 | OP_BitOrSint8, |
3150 | OP_BitOrUint8, |
3151 | OP_BitOrSint16, |
3152 | OP_BitOrUint16, |
3153 | OP_BitOrSint32, |
3154 | OP_BitOrUint32, |
3155 | OP_BitOrSint64, |
3156 | OP_BitOrUint64, |
3157 | OP_BitOrIntAP, |
3158 | OP_BitOrIntAPS, |
3159 | OP_BitOrFixedPoint, |
3160 | #endif |
3161 | #ifdef GET_INTERP |
3162 | case OP_BitOrSint8: { |
3163 | if (!BitOr<PT_Sint8>(S, OpPC)) |
3164 | return false; |
3165 | continue; |
3166 | } |
3167 | case OP_BitOrUint8: { |
3168 | if (!BitOr<PT_Uint8>(S, OpPC)) |
3169 | return false; |
3170 | continue; |
3171 | } |
3172 | case OP_BitOrSint16: { |
3173 | if (!BitOr<PT_Sint16>(S, OpPC)) |
3174 | return false; |
3175 | continue; |
3176 | } |
3177 | case OP_BitOrUint16: { |
3178 | if (!BitOr<PT_Uint16>(S, OpPC)) |
3179 | return false; |
3180 | continue; |
3181 | } |
3182 | case OP_BitOrSint32: { |
3183 | if (!BitOr<PT_Sint32>(S, OpPC)) |
3184 | return false; |
3185 | continue; |
3186 | } |
3187 | case OP_BitOrUint32: { |
3188 | if (!BitOr<PT_Uint32>(S, OpPC)) |
3189 | return false; |
3190 | continue; |
3191 | } |
3192 | case OP_BitOrSint64: { |
3193 | if (!BitOr<PT_Sint64>(S, OpPC)) |
3194 | return false; |
3195 | continue; |
3196 | } |
3197 | case OP_BitOrUint64: { |
3198 | if (!BitOr<PT_Uint64>(S, OpPC)) |
3199 | return false; |
3200 | continue; |
3201 | } |
3202 | case OP_BitOrIntAP: { |
3203 | if (!BitOr<PT_IntAP>(S, OpPC)) |
3204 | return false; |
3205 | continue; |
3206 | } |
3207 | case OP_BitOrIntAPS: { |
3208 | if (!BitOr<PT_IntAPS>(S, OpPC)) |
3209 | return false; |
3210 | continue; |
3211 | } |
3212 | case OP_BitOrFixedPoint: { |
3213 | if (!BitOr<PT_FixedPoint>(S, OpPC)) |
3214 | return false; |
3215 | continue; |
3216 | } |
3217 | #endif |
3218 | #ifdef GET_DISASM |
3219 | case OP_BitOrSint8: |
3220 | Text.Op = PrintName("BitOrSint8" ); |
3221 | break; |
3222 | case OP_BitOrUint8: |
3223 | Text.Op = PrintName("BitOrUint8" ); |
3224 | break; |
3225 | case OP_BitOrSint16: |
3226 | Text.Op = PrintName("BitOrSint16" ); |
3227 | break; |
3228 | case OP_BitOrUint16: |
3229 | Text.Op = PrintName("BitOrUint16" ); |
3230 | break; |
3231 | case OP_BitOrSint32: |
3232 | Text.Op = PrintName("BitOrSint32" ); |
3233 | break; |
3234 | case OP_BitOrUint32: |
3235 | Text.Op = PrintName("BitOrUint32" ); |
3236 | break; |
3237 | case OP_BitOrSint64: |
3238 | Text.Op = PrintName("BitOrSint64" ); |
3239 | break; |
3240 | case OP_BitOrUint64: |
3241 | Text.Op = PrintName("BitOrUint64" ); |
3242 | break; |
3243 | case OP_BitOrIntAP: |
3244 | Text.Op = PrintName("BitOrIntAP" ); |
3245 | break; |
3246 | case OP_BitOrIntAPS: |
3247 | Text.Op = PrintName("BitOrIntAPS" ); |
3248 | break; |
3249 | case OP_BitOrFixedPoint: |
3250 | Text.Op = PrintName("BitOrFixedPoint" ); |
3251 | break; |
3252 | #endif |
3253 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3254 | bool emitBitOrSint8(const SourceInfo &); |
3255 | bool emitBitOrUint8(const SourceInfo &); |
3256 | bool emitBitOrSint16(const SourceInfo &); |
3257 | bool emitBitOrUint16(const SourceInfo &); |
3258 | bool emitBitOrSint32(const SourceInfo &); |
3259 | bool emitBitOrUint32(const SourceInfo &); |
3260 | bool emitBitOrSint64(const SourceInfo &); |
3261 | bool emitBitOrUint64(const SourceInfo &); |
3262 | bool emitBitOrIntAP(const SourceInfo &); |
3263 | bool emitBitOrIntAPS(const SourceInfo &); |
3264 | bool emitBitOrFixedPoint(const SourceInfo &); |
3265 | #endif |
3266 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3267 | [[nodiscard]] bool emitBitOr(PrimType, const SourceInfo &I); |
3268 | #endif |
3269 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
3270 | bool |
3271 | #if defined(GET_EVAL_IMPL) |
3272 | EvalEmitter |
3273 | #else |
3274 | ByteCodeEmitter |
3275 | #endif |
3276 | ::emitBitOr(PrimType T0, const SourceInfo &I) { |
3277 | switch (T0) { |
3278 | case PT_Sint8: |
3279 | return emitBitOrSint8(I); |
3280 | case PT_Uint8: |
3281 | return emitBitOrUint8(I); |
3282 | case PT_Sint16: |
3283 | return emitBitOrSint16(I); |
3284 | case PT_Uint16: |
3285 | return emitBitOrUint16(I); |
3286 | case PT_Sint32: |
3287 | return emitBitOrSint32(I); |
3288 | case PT_Uint32: |
3289 | return emitBitOrUint32(I); |
3290 | case PT_Sint64: |
3291 | return emitBitOrSint64(I); |
3292 | case PT_Uint64: |
3293 | return emitBitOrUint64(I); |
3294 | case PT_IntAP: |
3295 | return emitBitOrIntAP(I); |
3296 | case PT_IntAPS: |
3297 | return emitBitOrIntAPS(I); |
3298 | case PT_FixedPoint: |
3299 | return emitBitOrFixedPoint(I); |
3300 | default: llvm_unreachable("invalid type: emitBitOr" ); |
3301 | } |
3302 | llvm_unreachable("invalid enum value" ); |
3303 | } |
3304 | #endif |
3305 | #ifdef GET_LINK_IMPL |
3306 | bool ByteCodeEmitter::emitBitOrSint8(const SourceInfo &L) { |
3307 | return emitOp<>(OP_BitOrSint8, L); |
3308 | } |
3309 | bool ByteCodeEmitter::emitBitOrUint8(const SourceInfo &L) { |
3310 | return emitOp<>(OP_BitOrUint8, L); |
3311 | } |
3312 | bool ByteCodeEmitter::emitBitOrSint16(const SourceInfo &L) { |
3313 | return emitOp<>(OP_BitOrSint16, L); |
3314 | } |
3315 | bool ByteCodeEmitter::emitBitOrUint16(const SourceInfo &L) { |
3316 | return emitOp<>(OP_BitOrUint16, L); |
3317 | } |
3318 | bool ByteCodeEmitter::emitBitOrSint32(const SourceInfo &L) { |
3319 | return emitOp<>(OP_BitOrSint32, L); |
3320 | } |
3321 | bool ByteCodeEmitter::emitBitOrUint32(const SourceInfo &L) { |
3322 | return emitOp<>(OP_BitOrUint32, L); |
3323 | } |
3324 | bool ByteCodeEmitter::emitBitOrSint64(const SourceInfo &L) { |
3325 | return emitOp<>(OP_BitOrSint64, L); |
3326 | } |
3327 | bool ByteCodeEmitter::emitBitOrUint64(const SourceInfo &L) { |
3328 | return emitOp<>(OP_BitOrUint64, L); |
3329 | } |
3330 | bool ByteCodeEmitter::emitBitOrIntAP(const SourceInfo &L) { |
3331 | return emitOp<>(OP_BitOrIntAP, L); |
3332 | } |
3333 | bool ByteCodeEmitter::emitBitOrIntAPS(const SourceInfo &L) { |
3334 | return emitOp<>(OP_BitOrIntAPS, L); |
3335 | } |
3336 | bool ByteCodeEmitter::emitBitOrFixedPoint(const SourceInfo &L) { |
3337 | return emitOp<>(OP_BitOrFixedPoint, L); |
3338 | } |
3339 | #endif |
3340 | #ifdef GET_EVAL_IMPL |
3341 | bool EvalEmitter::emitBitOrSint8(const SourceInfo &L) { |
3342 | if (!isActive()) return true; |
3343 | CurrentSource = L; |
3344 | return BitOr<PT_Sint8>(S, OpPC); |
3345 | } |
3346 | bool EvalEmitter::emitBitOrUint8(const SourceInfo &L) { |
3347 | if (!isActive()) return true; |
3348 | CurrentSource = L; |
3349 | return BitOr<PT_Uint8>(S, OpPC); |
3350 | } |
3351 | bool EvalEmitter::emitBitOrSint16(const SourceInfo &L) { |
3352 | if (!isActive()) return true; |
3353 | CurrentSource = L; |
3354 | return BitOr<PT_Sint16>(S, OpPC); |
3355 | } |
3356 | bool EvalEmitter::emitBitOrUint16(const SourceInfo &L) { |
3357 | if (!isActive()) return true; |
3358 | CurrentSource = L; |
3359 | return BitOr<PT_Uint16>(S, OpPC); |
3360 | } |
3361 | bool EvalEmitter::emitBitOrSint32(const SourceInfo &L) { |
3362 | if (!isActive()) return true; |
3363 | CurrentSource = L; |
3364 | return BitOr<PT_Sint32>(S, OpPC); |
3365 | } |
3366 | bool EvalEmitter::emitBitOrUint32(const SourceInfo &L) { |
3367 | if (!isActive()) return true; |
3368 | CurrentSource = L; |
3369 | return BitOr<PT_Uint32>(S, OpPC); |
3370 | } |
3371 | bool EvalEmitter::emitBitOrSint64(const SourceInfo &L) { |
3372 | if (!isActive()) return true; |
3373 | CurrentSource = L; |
3374 | return BitOr<PT_Sint64>(S, OpPC); |
3375 | } |
3376 | bool EvalEmitter::emitBitOrUint64(const SourceInfo &L) { |
3377 | if (!isActive()) return true; |
3378 | CurrentSource = L; |
3379 | return BitOr<PT_Uint64>(S, OpPC); |
3380 | } |
3381 | bool EvalEmitter::emitBitOrIntAP(const SourceInfo &L) { |
3382 | if (!isActive()) return true; |
3383 | CurrentSource = L; |
3384 | return BitOr<PT_IntAP>(S, OpPC); |
3385 | } |
3386 | bool EvalEmitter::emitBitOrIntAPS(const SourceInfo &L) { |
3387 | if (!isActive()) return true; |
3388 | CurrentSource = L; |
3389 | return BitOr<PT_IntAPS>(S, OpPC); |
3390 | } |
3391 | bool EvalEmitter::emitBitOrFixedPoint(const SourceInfo &L) { |
3392 | if (!isActive()) return true; |
3393 | CurrentSource = L; |
3394 | return BitOr<PT_FixedPoint>(S, OpPC); |
3395 | } |
3396 | #endif |
3397 | #ifdef GET_OPCODE_NAMES |
3398 | OP_BitXorSint8, |
3399 | OP_BitXorUint8, |
3400 | OP_BitXorSint16, |
3401 | OP_BitXorUint16, |
3402 | OP_BitXorSint32, |
3403 | OP_BitXorUint32, |
3404 | OP_BitXorSint64, |
3405 | OP_BitXorUint64, |
3406 | OP_BitXorIntAP, |
3407 | OP_BitXorIntAPS, |
3408 | OP_BitXorFixedPoint, |
3409 | #endif |
3410 | #ifdef GET_INTERP |
3411 | case OP_BitXorSint8: { |
3412 | if (!BitXor<PT_Sint8>(S, OpPC)) |
3413 | return false; |
3414 | continue; |
3415 | } |
3416 | case OP_BitXorUint8: { |
3417 | if (!BitXor<PT_Uint8>(S, OpPC)) |
3418 | return false; |
3419 | continue; |
3420 | } |
3421 | case OP_BitXorSint16: { |
3422 | if (!BitXor<PT_Sint16>(S, OpPC)) |
3423 | return false; |
3424 | continue; |
3425 | } |
3426 | case OP_BitXorUint16: { |
3427 | if (!BitXor<PT_Uint16>(S, OpPC)) |
3428 | return false; |
3429 | continue; |
3430 | } |
3431 | case OP_BitXorSint32: { |
3432 | if (!BitXor<PT_Sint32>(S, OpPC)) |
3433 | return false; |
3434 | continue; |
3435 | } |
3436 | case OP_BitXorUint32: { |
3437 | if (!BitXor<PT_Uint32>(S, OpPC)) |
3438 | return false; |
3439 | continue; |
3440 | } |
3441 | case OP_BitXorSint64: { |
3442 | if (!BitXor<PT_Sint64>(S, OpPC)) |
3443 | return false; |
3444 | continue; |
3445 | } |
3446 | case OP_BitXorUint64: { |
3447 | if (!BitXor<PT_Uint64>(S, OpPC)) |
3448 | return false; |
3449 | continue; |
3450 | } |
3451 | case OP_BitXorIntAP: { |
3452 | if (!BitXor<PT_IntAP>(S, OpPC)) |
3453 | return false; |
3454 | continue; |
3455 | } |
3456 | case OP_BitXorIntAPS: { |
3457 | if (!BitXor<PT_IntAPS>(S, OpPC)) |
3458 | return false; |
3459 | continue; |
3460 | } |
3461 | case OP_BitXorFixedPoint: { |
3462 | if (!BitXor<PT_FixedPoint>(S, OpPC)) |
3463 | return false; |
3464 | continue; |
3465 | } |
3466 | #endif |
3467 | #ifdef GET_DISASM |
3468 | case OP_BitXorSint8: |
3469 | Text.Op = PrintName("BitXorSint8" ); |
3470 | break; |
3471 | case OP_BitXorUint8: |
3472 | Text.Op = PrintName("BitXorUint8" ); |
3473 | break; |
3474 | case OP_BitXorSint16: |
3475 | Text.Op = PrintName("BitXorSint16" ); |
3476 | break; |
3477 | case OP_BitXorUint16: |
3478 | Text.Op = PrintName("BitXorUint16" ); |
3479 | break; |
3480 | case OP_BitXorSint32: |
3481 | Text.Op = PrintName("BitXorSint32" ); |
3482 | break; |
3483 | case OP_BitXorUint32: |
3484 | Text.Op = PrintName("BitXorUint32" ); |
3485 | break; |
3486 | case OP_BitXorSint64: |
3487 | Text.Op = PrintName("BitXorSint64" ); |
3488 | break; |
3489 | case OP_BitXorUint64: |
3490 | Text.Op = PrintName("BitXorUint64" ); |
3491 | break; |
3492 | case OP_BitXorIntAP: |
3493 | Text.Op = PrintName("BitXorIntAP" ); |
3494 | break; |
3495 | case OP_BitXorIntAPS: |
3496 | Text.Op = PrintName("BitXorIntAPS" ); |
3497 | break; |
3498 | case OP_BitXorFixedPoint: |
3499 | Text.Op = PrintName("BitXorFixedPoint" ); |
3500 | break; |
3501 | #endif |
3502 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3503 | bool emitBitXorSint8(const SourceInfo &); |
3504 | bool emitBitXorUint8(const SourceInfo &); |
3505 | bool emitBitXorSint16(const SourceInfo &); |
3506 | bool emitBitXorUint16(const SourceInfo &); |
3507 | bool emitBitXorSint32(const SourceInfo &); |
3508 | bool emitBitXorUint32(const SourceInfo &); |
3509 | bool emitBitXorSint64(const SourceInfo &); |
3510 | bool emitBitXorUint64(const SourceInfo &); |
3511 | bool emitBitXorIntAP(const SourceInfo &); |
3512 | bool emitBitXorIntAPS(const SourceInfo &); |
3513 | bool emitBitXorFixedPoint(const SourceInfo &); |
3514 | #endif |
3515 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3516 | [[nodiscard]] bool emitBitXor(PrimType, const SourceInfo &I); |
3517 | #endif |
3518 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
3519 | bool |
3520 | #if defined(GET_EVAL_IMPL) |
3521 | EvalEmitter |
3522 | #else |
3523 | ByteCodeEmitter |
3524 | #endif |
3525 | ::emitBitXor(PrimType T0, const SourceInfo &I) { |
3526 | switch (T0) { |
3527 | case PT_Sint8: |
3528 | return emitBitXorSint8(I); |
3529 | case PT_Uint8: |
3530 | return emitBitXorUint8(I); |
3531 | case PT_Sint16: |
3532 | return emitBitXorSint16(I); |
3533 | case PT_Uint16: |
3534 | return emitBitXorUint16(I); |
3535 | case PT_Sint32: |
3536 | return emitBitXorSint32(I); |
3537 | case PT_Uint32: |
3538 | return emitBitXorUint32(I); |
3539 | case PT_Sint64: |
3540 | return emitBitXorSint64(I); |
3541 | case PT_Uint64: |
3542 | return emitBitXorUint64(I); |
3543 | case PT_IntAP: |
3544 | return emitBitXorIntAP(I); |
3545 | case PT_IntAPS: |
3546 | return emitBitXorIntAPS(I); |
3547 | case PT_FixedPoint: |
3548 | return emitBitXorFixedPoint(I); |
3549 | default: llvm_unreachable("invalid type: emitBitXor" ); |
3550 | } |
3551 | llvm_unreachable("invalid enum value" ); |
3552 | } |
3553 | #endif |
3554 | #ifdef GET_LINK_IMPL |
3555 | bool ByteCodeEmitter::emitBitXorSint8(const SourceInfo &L) { |
3556 | return emitOp<>(OP_BitXorSint8, L); |
3557 | } |
3558 | bool ByteCodeEmitter::emitBitXorUint8(const SourceInfo &L) { |
3559 | return emitOp<>(OP_BitXorUint8, L); |
3560 | } |
3561 | bool ByteCodeEmitter::emitBitXorSint16(const SourceInfo &L) { |
3562 | return emitOp<>(OP_BitXorSint16, L); |
3563 | } |
3564 | bool ByteCodeEmitter::emitBitXorUint16(const SourceInfo &L) { |
3565 | return emitOp<>(OP_BitXorUint16, L); |
3566 | } |
3567 | bool ByteCodeEmitter::emitBitXorSint32(const SourceInfo &L) { |
3568 | return emitOp<>(OP_BitXorSint32, L); |
3569 | } |
3570 | bool ByteCodeEmitter::emitBitXorUint32(const SourceInfo &L) { |
3571 | return emitOp<>(OP_BitXorUint32, L); |
3572 | } |
3573 | bool ByteCodeEmitter::emitBitXorSint64(const SourceInfo &L) { |
3574 | return emitOp<>(OP_BitXorSint64, L); |
3575 | } |
3576 | bool ByteCodeEmitter::emitBitXorUint64(const SourceInfo &L) { |
3577 | return emitOp<>(OP_BitXorUint64, L); |
3578 | } |
3579 | bool ByteCodeEmitter::emitBitXorIntAP(const SourceInfo &L) { |
3580 | return emitOp<>(OP_BitXorIntAP, L); |
3581 | } |
3582 | bool ByteCodeEmitter::emitBitXorIntAPS(const SourceInfo &L) { |
3583 | return emitOp<>(OP_BitXorIntAPS, L); |
3584 | } |
3585 | bool ByteCodeEmitter::emitBitXorFixedPoint(const SourceInfo &L) { |
3586 | return emitOp<>(OP_BitXorFixedPoint, L); |
3587 | } |
3588 | #endif |
3589 | #ifdef GET_EVAL_IMPL |
3590 | bool EvalEmitter::emitBitXorSint8(const SourceInfo &L) { |
3591 | if (!isActive()) return true; |
3592 | CurrentSource = L; |
3593 | return BitXor<PT_Sint8>(S, OpPC); |
3594 | } |
3595 | bool EvalEmitter::emitBitXorUint8(const SourceInfo &L) { |
3596 | if (!isActive()) return true; |
3597 | CurrentSource = L; |
3598 | return BitXor<PT_Uint8>(S, OpPC); |
3599 | } |
3600 | bool EvalEmitter::emitBitXorSint16(const SourceInfo &L) { |
3601 | if (!isActive()) return true; |
3602 | CurrentSource = L; |
3603 | return BitXor<PT_Sint16>(S, OpPC); |
3604 | } |
3605 | bool EvalEmitter::emitBitXorUint16(const SourceInfo &L) { |
3606 | if (!isActive()) return true; |
3607 | CurrentSource = L; |
3608 | return BitXor<PT_Uint16>(S, OpPC); |
3609 | } |
3610 | bool EvalEmitter::emitBitXorSint32(const SourceInfo &L) { |
3611 | if (!isActive()) return true; |
3612 | CurrentSource = L; |
3613 | return BitXor<PT_Sint32>(S, OpPC); |
3614 | } |
3615 | bool EvalEmitter::emitBitXorUint32(const SourceInfo &L) { |
3616 | if (!isActive()) return true; |
3617 | CurrentSource = L; |
3618 | return BitXor<PT_Uint32>(S, OpPC); |
3619 | } |
3620 | bool EvalEmitter::emitBitXorSint64(const SourceInfo &L) { |
3621 | if (!isActive()) return true; |
3622 | CurrentSource = L; |
3623 | return BitXor<PT_Sint64>(S, OpPC); |
3624 | } |
3625 | bool EvalEmitter::emitBitXorUint64(const SourceInfo &L) { |
3626 | if (!isActive()) return true; |
3627 | CurrentSource = L; |
3628 | return BitXor<PT_Uint64>(S, OpPC); |
3629 | } |
3630 | bool EvalEmitter::emitBitXorIntAP(const SourceInfo &L) { |
3631 | if (!isActive()) return true; |
3632 | CurrentSource = L; |
3633 | return BitXor<PT_IntAP>(S, OpPC); |
3634 | } |
3635 | bool EvalEmitter::emitBitXorIntAPS(const SourceInfo &L) { |
3636 | if (!isActive()) return true; |
3637 | CurrentSource = L; |
3638 | return BitXor<PT_IntAPS>(S, OpPC); |
3639 | } |
3640 | bool EvalEmitter::emitBitXorFixedPoint(const SourceInfo &L) { |
3641 | if (!isActive()) return true; |
3642 | CurrentSource = L; |
3643 | return BitXor<PT_FixedPoint>(S, OpPC); |
3644 | } |
3645 | #endif |
3646 | #ifdef GET_OPCODE_NAMES |
3647 | OP_CMP3Sint8, |
3648 | OP_CMP3Uint8, |
3649 | OP_CMP3Sint16, |
3650 | OP_CMP3Uint16, |
3651 | OP_CMP3Sint32, |
3652 | OP_CMP3Uint32, |
3653 | OP_CMP3Sint64, |
3654 | OP_CMP3Uint64, |
3655 | OP_CMP3IntAP, |
3656 | OP_CMP3IntAPS, |
3657 | OP_CMP3Bool, |
3658 | OP_CMP3FixedPoint, |
3659 | OP_CMP3Ptr, |
3660 | OP_CMP3Float, |
3661 | #endif |
3662 | #ifdef GET_INTERP |
3663 | case OP_CMP3Sint8: { |
3664 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3665 | if (!CMP3<PT_Sint8>(S, OpPC, V0)) |
3666 | return false; |
3667 | continue; |
3668 | } |
3669 | case OP_CMP3Uint8: { |
3670 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3671 | if (!CMP3<PT_Uint8>(S, OpPC, V0)) |
3672 | return false; |
3673 | continue; |
3674 | } |
3675 | case OP_CMP3Sint16: { |
3676 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3677 | if (!CMP3<PT_Sint16>(S, OpPC, V0)) |
3678 | return false; |
3679 | continue; |
3680 | } |
3681 | case OP_CMP3Uint16: { |
3682 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3683 | if (!CMP3<PT_Uint16>(S, OpPC, V0)) |
3684 | return false; |
3685 | continue; |
3686 | } |
3687 | case OP_CMP3Sint32: { |
3688 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3689 | if (!CMP3<PT_Sint32>(S, OpPC, V0)) |
3690 | return false; |
3691 | continue; |
3692 | } |
3693 | case OP_CMP3Uint32: { |
3694 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3695 | if (!CMP3<PT_Uint32>(S, OpPC, V0)) |
3696 | return false; |
3697 | continue; |
3698 | } |
3699 | case OP_CMP3Sint64: { |
3700 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3701 | if (!CMP3<PT_Sint64>(S, OpPC, V0)) |
3702 | return false; |
3703 | continue; |
3704 | } |
3705 | case OP_CMP3Uint64: { |
3706 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3707 | if (!CMP3<PT_Uint64>(S, OpPC, V0)) |
3708 | return false; |
3709 | continue; |
3710 | } |
3711 | case OP_CMP3IntAP: { |
3712 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3713 | if (!CMP3<PT_IntAP>(S, OpPC, V0)) |
3714 | return false; |
3715 | continue; |
3716 | } |
3717 | case OP_CMP3IntAPS: { |
3718 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3719 | if (!CMP3<PT_IntAPS>(S, OpPC, V0)) |
3720 | return false; |
3721 | continue; |
3722 | } |
3723 | case OP_CMP3Bool: { |
3724 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3725 | if (!CMP3<PT_Bool>(S, OpPC, V0)) |
3726 | return false; |
3727 | continue; |
3728 | } |
3729 | case OP_CMP3FixedPoint: { |
3730 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3731 | if (!CMP3<PT_FixedPoint>(S, OpPC, V0)) |
3732 | return false; |
3733 | continue; |
3734 | } |
3735 | case OP_CMP3Ptr: { |
3736 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3737 | if (!CMP3<PT_Ptr>(S, OpPC, V0)) |
3738 | return false; |
3739 | continue; |
3740 | } |
3741 | case OP_CMP3Float: { |
3742 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3743 | if (!CMP3<PT_Float>(S, OpPC, V0)) |
3744 | return false; |
3745 | continue; |
3746 | } |
3747 | #endif |
3748 | #ifdef GET_DISASM |
3749 | case OP_CMP3Sint8: |
3750 | Text.Op = PrintName("CMP3Sint8" ); |
3751 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3752 | break; |
3753 | case OP_CMP3Uint8: |
3754 | Text.Op = PrintName("CMP3Uint8" ); |
3755 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3756 | break; |
3757 | case OP_CMP3Sint16: |
3758 | Text.Op = PrintName("CMP3Sint16" ); |
3759 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3760 | break; |
3761 | case OP_CMP3Uint16: |
3762 | Text.Op = PrintName("CMP3Uint16" ); |
3763 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3764 | break; |
3765 | case OP_CMP3Sint32: |
3766 | Text.Op = PrintName("CMP3Sint32" ); |
3767 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3768 | break; |
3769 | case OP_CMP3Uint32: |
3770 | Text.Op = PrintName("CMP3Uint32" ); |
3771 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3772 | break; |
3773 | case OP_CMP3Sint64: |
3774 | Text.Op = PrintName("CMP3Sint64" ); |
3775 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3776 | break; |
3777 | case OP_CMP3Uint64: |
3778 | Text.Op = PrintName("CMP3Uint64" ); |
3779 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3780 | break; |
3781 | case OP_CMP3IntAP: |
3782 | Text.Op = PrintName("CMP3IntAP" ); |
3783 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3784 | break; |
3785 | case OP_CMP3IntAPS: |
3786 | Text.Op = PrintName("CMP3IntAPS" ); |
3787 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3788 | break; |
3789 | case OP_CMP3Bool: |
3790 | Text.Op = PrintName("CMP3Bool" ); |
3791 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3792 | break; |
3793 | case OP_CMP3FixedPoint: |
3794 | Text.Op = PrintName("CMP3FixedPoint" ); |
3795 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3796 | break; |
3797 | case OP_CMP3Ptr: |
3798 | Text.Op = PrintName("CMP3Ptr" ); |
3799 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3800 | break; |
3801 | case OP_CMP3Float: |
3802 | Text.Op = PrintName("CMP3Float" ); |
3803 | Text.Args.push_back(printArg<const ComparisonCategoryInfo *>(P, PC)); |
3804 | break; |
3805 | #endif |
3806 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3807 | bool emitCMP3Sint8( const ComparisonCategoryInfo * , const SourceInfo &); |
3808 | bool emitCMP3Uint8( const ComparisonCategoryInfo * , const SourceInfo &); |
3809 | bool emitCMP3Sint16( const ComparisonCategoryInfo * , const SourceInfo &); |
3810 | bool emitCMP3Uint16( const ComparisonCategoryInfo * , const SourceInfo &); |
3811 | bool emitCMP3Sint32( const ComparisonCategoryInfo * , const SourceInfo &); |
3812 | bool emitCMP3Uint32( const ComparisonCategoryInfo * , const SourceInfo &); |
3813 | bool emitCMP3Sint64( const ComparisonCategoryInfo * , const SourceInfo &); |
3814 | bool emitCMP3Uint64( const ComparisonCategoryInfo * , const SourceInfo &); |
3815 | bool emitCMP3IntAP( const ComparisonCategoryInfo * , const SourceInfo &); |
3816 | bool emitCMP3IntAPS( const ComparisonCategoryInfo * , const SourceInfo &); |
3817 | bool emitCMP3Bool( const ComparisonCategoryInfo * , const SourceInfo &); |
3818 | bool emitCMP3FixedPoint( const ComparisonCategoryInfo * , const SourceInfo &); |
3819 | bool emitCMP3Ptr( const ComparisonCategoryInfo * , const SourceInfo &); |
3820 | bool emitCMP3Float( const ComparisonCategoryInfo * , const SourceInfo &); |
3821 | #endif |
3822 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3823 | [[nodiscard]] bool emitCMP3(PrimType, const ComparisonCategoryInfo *, const SourceInfo &I); |
3824 | #endif |
3825 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
3826 | bool |
3827 | #if defined(GET_EVAL_IMPL) |
3828 | EvalEmitter |
3829 | #else |
3830 | ByteCodeEmitter |
3831 | #endif |
3832 | ::emitCMP3(PrimType T0, const ComparisonCategoryInfo * A0, const SourceInfo &I) { |
3833 | switch (T0) { |
3834 | case PT_Sint8: |
3835 | return emitCMP3Sint8(A0, I); |
3836 | case PT_Uint8: |
3837 | return emitCMP3Uint8(A0, I); |
3838 | case PT_Sint16: |
3839 | return emitCMP3Sint16(A0, I); |
3840 | case PT_Uint16: |
3841 | return emitCMP3Uint16(A0, I); |
3842 | case PT_Sint32: |
3843 | return emitCMP3Sint32(A0, I); |
3844 | case PT_Uint32: |
3845 | return emitCMP3Uint32(A0, I); |
3846 | case PT_Sint64: |
3847 | return emitCMP3Sint64(A0, I); |
3848 | case PT_Uint64: |
3849 | return emitCMP3Uint64(A0, I); |
3850 | case PT_IntAP: |
3851 | return emitCMP3IntAP(A0, I); |
3852 | case PT_IntAPS: |
3853 | return emitCMP3IntAPS(A0, I); |
3854 | case PT_Bool: |
3855 | return emitCMP3Bool(A0, I); |
3856 | case PT_FixedPoint: |
3857 | return emitCMP3FixedPoint(A0, I); |
3858 | case PT_Ptr: |
3859 | return emitCMP3Ptr(A0, I); |
3860 | case PT_Float: |
3861 | return emitCMP3Float(A0, I); |
3862 | default: llvm_unreachable("invalid type: emitCMP3" ); |
3863 | } |
3864 | llvm_unreachable("invalid enum value" ); |
3865 | } |
3866 | #endif |
3867 | #ifdef GET_LINK_IMPL |
3868 | bool ByteCodeEmitter::emitCMP3Sint8( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3869 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Sint8, A0, L); |
3870 | } |
3871 | bool ByteCodeEmitter::emitCMP3Uint8( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3872 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Uint8, A0, L); |
3873 | } |
3874 | bool ByteCodeEmitter::emitCMP3Sint16( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3875 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Sint16, A0, L); |
3876 | } |
3877 | bool ByteCodeEmitter::emitCMP3Uint16( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3878 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Uint16, A0, L); |
3879 | } |
3880 | bool ByteCodeEmitter::emitCMP3Sint32( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3881 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Sint32, A0, L); |
3882 | } |
3883 | bool ByteCodeEmitter::emitCMP3Uint32( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3884 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Uint32, A0, L); |
3885 | } |
3886 | bool ByteCodeEmitter::emitCMP3Sint64( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3887 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Sint64, A0, L); |
3888 | } |
3889 | bool ByteCodeEmitter::emitCMP3Uint64( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3890 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Uint64, A0, L); |
3891 | } |
3892 | bool ByteCodeEmitter::emitCMP3IntAP( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3893 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3IntAP, A0, L); |
3894 | } |
3895 | bool ByteCodeEmitter::emitCMP3IntAPS( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3896 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3IntAPS, A0, L); |
3897 | } |
3898 | bool ByteCodeEmitter::emitCMP3Bool( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3899 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Bool, A0, L); |
3900 | } |
3901 | bool ByteCodeEmitter::emitCMP3FixedPoint( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3902 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3FixedPoint, A0, L); |
3903 | } |
3904 | bool ByteCodeEmitter::emitCMP3Ptr( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3905 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Ptr, A0, L); |
3906 | } |
3907 | bool ByteCodeEmitter::emitCMP3Float( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3908 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Float, A0, L); |
3909 | } |
3910 | #endif |
3911 | #ifdef GET_EVAL_IMPL |
3912 | bool EvalEmitter::emitCMP3Sint8( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3913 | if (!isActive()) return true; |
3914 | CurrentSource = L; |
3915 | return CMP3<PT_Sint8>(S, OpPC, A0); |
3916 | } |
3917 | bool EvalEmitter::emitCMP3Uint8( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3918 | if (!isActive()) return true; |
3919 | CurrentSource = L; |
3920 | return CMP3<PT_Uint8>(S, OpPC, A0); |
3921 | } |
3922 | bool EvalEmitter::emitCMP3Sint16( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3923 | if (!isActive()) return true; |
3924 | CurrentSource = L; |
3925 | return CMP3<PT_Sint16>(S, OpPC, A0); |
3926 | } |
3927 | bool EvalEmitter::emitCMP3Uint16( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3928 | if (!isActive()) return true; |
3929 | CurrentSource = L; |
3930 | return CMP3<PT_Uint16>(S, OpPC, A0); |
3931 | } |
3932 | bool EvalEmitter::emitCMP3Sint32( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3933 | if (!isActive()) return true; |
3934 | CurrentSource = L; |
3935 | return CMP3<PT_Sint32>(S, OpPC, A0); |
3936 | } |
3937 | bool EvalEmitter::emitCMP3Uint32( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3938 | if (!isActive()) return true; |
3939 | CurrentSource = L; |
3940 | return CMP3<PT_Uint32>(S, OpPC, A0); |
3941 | } |
3942 | bool EvalEmitter::emitCMP3Sint64( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3943 | if (!isActive()) return true; |
3944 | CurrentSource = L; |
3945 | return CMP3<PT_Sint64>(S, OpPC, A0); |
3946 | } |
3947 | bool EvalEmitter::emitCMP3Uint64( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3948 | if (!isActive()) return true; |
3949 | CurrentSource = L; |
3950 | return CMP3<PT_Uint64>(S, OpPC, A0); |
3951 | } |
3952 | bool EvalEmitter::emitCMP3IntAP( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3953 | if (!isActive()) return true; |
3954 | CurrentSource = L; |
3955 | return CMP3<PT_IntAP>(S, OpPC, A0); |
3956 | } |
3957 | bool EvalEmitter::emitCMP3IntAPS( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3958 | if (!isActive()) return true; |
3959 | CurrentSource = L; |
3960 | return CMP3<PT_IntAPS>(S, OpPC, A0); |
3961 | } |
3962 | bool EvalEmitter::emitCMP3Bool( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3963 | if (!isActive()) return true; |
3964 | CurrentSource = L; |
3965 | return CMP3<PT_Bool>(S, OpPC, A0); |
3966 | } |
3967 | bool EvalEmitter::emitCMP3FixedPoint( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3968 | if (!isActive()) return true; |
3969 | CurrentSource = L; |
3970 | return CMP3<PT_FixedPoint>(S, OpPC, A0); |
3971 | } |
3972 | bool EvalEmitter::emitCMP3Ptr( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3973 | if (!isActive()) return true; |
3974 | CurrentSource = L; |
3975 | return CMP3<PT_Ptr>(S, OpPC, A0); |
3976 | } |
3977 | bool EvalEmitter::emitCMP3Float( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3978 | if (!isActive()) return true; |
3979 | CurrentSource = L; |
3980 | return CMP3<PT_Float>(S, OpPC, A0); |
3981 | } |
3982 | #endif |
3983 | #ifdef GET_OPCODE_NAMES |
3984 | OP_Call, |
3985 | #endif |
3986 | #ifdef GET_INTERP |
3987 | case OP_Call: { |
3988 | const auto V0 = ReadArg<const Function *>(S, PC); |
3989 | const auto V1 = ReadArg<uint32_t>(S, PC); |
3990 | if (!Call(S, OpPC, V0, V1)) |
3991 | return false; |
3992 | continue; |
3993 | } |
3994 | #endif |
3995 | #ifdef GET_DISASM |
3996 | case OP_Call: |
3997 | Text.Op = PrintName("Call" ); |
3998 | Text.Args.push_back(printArg<const Function *>(P, PC)); |
3999 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
4000 | break; |
4001 | #endif |
4002 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
4003 | bool emitCall( const Function * , uint32_t , const SourceInfo &); |
4004 | #endif |
4005 | #ifdef GET_LINK_IMPL |
4006 | bool ByteCodeEmitter::emitCall( const Function * A0, uint32_t A1, const SourceInfo &L) { |
4007 | return emitOp<const Function *, uint32_t>(OP_Call, A0, A1, L); |
4008 | } |
4009 | #endif |
4010 | #ifdef GET_EVAL_IMPL |
4011 | bool EvalEmitter::emitCall( const Function * A0, uint32_t A1, const SourceInfo &L) { |
4012 | if (!isActive()) return true; |
4013 | CurrentSource = L; |
4014 | return Call(S, OpPC, A0, A1); |
4015 | } |
4016 | #endif |
4017 | #ifdef GET_OPCODE_NAMES |
4018 | OP_CallBI, |
4019 | #endif |
4020 | #ifdef GET_INTERP |
4021 | case OP_CallBI: { |
4022 | const auto V0 = ReadArg<const CallExpr *>(S, PC); |
4023 | const auto V1 = ReadArg<uint32_t>(S, PC); |
4024 | if (!CallBI(S, OpPC, V0, V1)) |
4025 | return false; |
4026 | continue; |
4027 | } |
4028 | #endif |
4029 | #ifdef GET_DISASM |
4030 | case OP_CallBI: |
4031 | Text.Op = PrintName("CallBI" ); |
4032 | Text.Args.push_back(printArg<const CallExpr *>(P, PC)); |
4033 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
4034 | break; |
4035 | #endif |
4036 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
4037 | bool emitCallBI( const CallExpr * , uint32_t , const SourceInfo &); |
4038 | #endif |
4039 | #ifdef GET_LINK_IMPL |
4040 | bool ByteCodeEmitter::emitCallBI( const CallExpr * A0, uint32_t A1, const SourceInfo &L) { |
4041 | return emitOp<const CallExpr *, uint32_t>(OP_CallBI, A0, A1, L); |
4042 | } |
4043 | #endif |
4044 | #ifdef GET_EVAL_IMPL |
4045 | bool EvalEmitter::emitCallBI( const CallExpr * A0, uint32_t A1, const SourceInfo &L) { |
4046 | if (!isActive()) return true; |
4047 | CurrentSource = L; |
4048 | return CallBI(S, OpPC, A0, A1); |
4049 | } |
4050 | #endif |
4051 | #ifdef GET_OPCODE_NAMES |
4052 | OP_CallPtr, |
4053 | #endif |
4054 | #ifdef GET_INTERP |
4055 | case OP_CallPtr: { |
4056 | const auto V0 = ReadArg<uint32_t>(S, PC); |
4057 | const auto V1 = ReadArg<const CallExpr *>(S, PC); |
4058 | if (!CallPtr(S, OpPC, V0, V1)) |
4059 | return false; |
4060 | continue; |
4061 | } |
4062 | #endif |
4063 | #ifdef GET_DISASM |
4064 | case OP_CallPtr: |
4065 | Text.Op = PrintName("CallPtr" ); |
4066 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
4067 | Text.Args.push_back(printArg<const CallExpr *>(P, PC)); |
4068 | break; |
4069 | #endif |
4070 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
4071 | bool emitCallPtr( uint32_t , const CallExpr * , const SourceInfo &); |
4072 | #endif |
4073 | #ifdef GET_LINK_IMPL |
4074 | bool ByteCodeEmitter::emitCallPtr( uint32_t A0, const CallExpr * A1, const SourceInfo &L) { |
4075 | return emitOp<uint32_t, const CallExpr *>(OP_CallPtr, A0, A1, L); |
4076 | } |
4077 | #endif |
4078 | #ifdef GET_EVAL_IMPL |
4079 | bool EvalEmitter::emitCallPtr( uint32_t A0, const CallExpr * A1, const SourceInfo &L) { |
4080 | if (!isActive()) return true; |
4081 | CurrentSource = L; |
4082 | return CallPtr(S, OpPC, A0, A1); |
4083 | } |
4084 | #endif |
4085 | #ifdef GET_OPCODE_NAMES |
4086 | OP_CallVar, |
4087 | #endif |
4088 | #ifdef GET_INTERP |
4089 | case OP_CallVar: { |
4090 | const auto V0 = ReadArg<const Function *>(S, PC); |
4091 | const auto V1 = ReadArg<uint32_t>(S, PC); |
4092 | if (!CallVar(S, OpPC, V0, V1)) |
4093 | return false; |
4094 | continue; |
4095 | } |
4096 | #endif |
4097 | #ifdef GET_DISASM |
4098 | case OP_CallVar: |
4099 | Text.Op = PrintName("CallVar" ); |
4100 | Text.Args.push_back(printArg<const Function *>(P, PC)); |
4101 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
4102 | break; |
4103 | #endif |
4104 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
4105 | bool emitCallVar( const Function * , uint32_t , const SourceInfo &); |
4106 | #endif |
4107 | #ifdef GET_LINK_IMPL |
4108 | bool ByteCodeEmitter::emitCallVar( const Function * A0, uint32_t A1, const SourceInfo &L) { |
4109 | return emitOp<const Function *, uint32_t>(OP_CallVar, A0, A1, L); |
4110 | } |
4111 | #endif |
4112 | #ifdef GET_EVAL_IMPL |
4113 | bool EvalEmitter::emitCallVar( const Function * A0, uint32_t A1, const SourceInfo &L) { |
4114 | if (!isActive()) return true; |
4115 | CurrentSource = L; |
4116 | return CallVar(S, OpPC, A0, A1); |
4117 | } |
4118 | #endif |
4119 | #ifdef GET_OPCODE_NAMES |
4120 | OP_CallVirt, |
4121 | #endif |
4122 | #ifdef GET_INTERP |
4123 | case OP_CallVirt: { |
4124 | const auto V0 = ReadArg<const Function *>(S, PC); |
4125 | const auto V1 = ReadArg<uint32_t>(S, PC); |
4126 | if (!CallVirt(S, OpPC, V0, V1)) |
4127 | return false; |
4128 | continue; |
4129 | } |
4130 | #endif |
4131 | #ifdef GET_DISASM |
4132 | case OP_CallVirt: |
4133 | Text.Op = PrintName("CallVirt" ); |
4134 | Text.Args.push_back(printArg<const Function *>(P, PC)); |
4135 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
4136 | break; |
4137 | #endif |
4138 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
4139 | bool emitCallVirt( const Function * , uint32_t , const SourceInfo &); |
4140 | #endif |
4141 | #ifdef GET_LINK_IMPL |
4142 | bool ByteCodeEmitter::emitCallVirt( const Function * A0, uint32_t A1, const SourceInfo &L) { |
4143 | return emitOp<const Function *, uint32_t>(OP_CallVirt, A0, A1, L); |
4144 | } |
4145 | #endif |
4146 | #ifdef GET_EVAL_IMPL |
4147 | bool EvalEmitter::emitCallVirt( const Function * A0, uint32_t A1, const SourceInfo &L) { |
4148 | if (!isActive()) return true; |
4149 | CurrentSource = L; |
4150 | return CallVirt(S, OpPC, A0, A1); |
4151 | } |
4152 | #endif |
4153 | #ifdef GET_OPCODE_NAMES |
4154 | OP_CastUint8Uint8, |
4155 | OP_CastUint8Sint8, |
4156 | OP_CastUint8Uint16, |
4157 | OP_CastUint8Sint16, |
4158 | OP_CastUint8Uint32, |
4159 | OP_CastUint8Sint32, |
4160 | OP_CastUint8Uint64, |
4161 | OP_CastUint8Sint64, |
4162 | OP_CastUint8Bool, |
4163 | OP_CastSint8Uint8, |
4164 | OP_CastSint8Sint8, |
4165 | OP_CastSint8Uint16, |
4166 | OP_CastSint8Sint16, |
4167 | OP_CastSint8Uint32, |
4168 | OP_CastSint8Sint32, |
4169 | OP_CastSint8Uint64, |
4170 | OP_CastSint8Sint64, |
4171 | OP_CastSint8Bool, |
4172 | OP_CastUint16Uint8, |
4173 | OP_CastUint16Sint8, |
4174 | OP_CastUint16Uint16, |
4175 | OP_CastUint16Sint16, |
4176 | OP_CastUint16Uint32, |
4177 | OP_CastUint16Sint32, |
4178 | OP_CastUint16Uint64, |
4179 | OP_CastUint16Sint64, |
4180 | OP_CastUint16Bool, |
4181 | OP_CastSint16Uint8, |
4182 | OP_CastSint16Sint8, |
4183 | OP_CastSint16Uint16, |
4184 | OP_CastSint16Sint16, |
4185 | OP_CastSint16Uint32, |
4186 | OP_CastSint16Sint32, |
4187 | OP_CastSint16Uint64, |
4188 | OP_CastSint16Sint64, |
4189 | OP_CastSint16Bool, |
4190 | OP_CastUint32Uint8, |
4191 | OP_CastUint32Sint8, |
4192 | OP_CastUint32Uint16, |
4193 | OP_CastUint32Sint16, |
4194 | OP_CastUint32Uint32, |
4195 | OP_CastUint32Sint32, |
4196 | OP_CastUint32Uint64, |
4197 | OP_CastUint32Sint64, |
4198 | OP_CastUint32Bool, |
4199 | OP_CastSint32Uint8, |
4200 | OP_CastSint32Sint8, |
4201 | OP_CastSint32Uint16, |
4202 | OP_CastSint32Sint16, |
4203 | OP_CastSint32Uint32, |
4204 | OP_CastSint32Sint32, |
4205 | OP_CastSint32Uint64, |
4206 | OP_CastSint32Sint64, |
4207 | OP_CastSint32Bool, |
4208 | OP_CastUint64Uint8, |
4209 | OP_CastUint64Sint8, |
4210 | OP_CastUint64Uint16, |
4211 | OP_CastUint64Sint16, |
4212 | OP_CastUint64Uint32, |
4213 | OP_CastUint64Sint32, |
4214 | OP_CastUint64Uint64, |
4215 | OP_CastUint64Sint64, |
4216 | OP_CastUint64Bool, |
4217 | OP_CastSint64Uint8, |
4218 | OP_CastSint64Sint8, |
4219 | OP_CastSint64Uint16, |
4220 | OP_CastSint64Sint16, |
4221 | OP_CastSint64Uint32, |
4222 | OP_CastSint64Sint32, |
4223 | OP_CastSint64Uint64, |
4224 | OP_CastSint64Sint64, |
4225 | OP_CastSint64Bool, |
4226 | OP_CastBoolUint8, |
4227 | OP_CastBoolSint8, |
4228 | OP_CastBoolUint16, |
4229 | OP_CastBoolSint16, |
4230 | OP_CastBoolUint32, |
4231 | OP_CastBoolSint32, |
4232 | OP_CastBoolUint64, |
4233 | OP_CastBoolSint64, |
4234 | OP_CastBoolBool, |
4235 | OP_CastIntAPUint8, |
4236 | OP_CastIntAPSint8, |
4237 | OP_CastIntAPUint16, |
4238 | OP_CastIntAPSint16, |
4239 | OP_CastIntAPUint32, |
4240 | OP_CastIntAPSint32, |
4241 | OP_CastIntAPUint64, |
4242 | OP_CastIntAPSint64, |
4243 | OP_CastIntAPBool, |
4244 | OP_CastIntAPSUint8, |
4245 | OP_CastIntAPSSint8, |
4246 | OP_CastIntAPSUint16, |
4247 | OP_CastIntAPSSint16, |
4248 | OP_CastIntAPSUint32, |
4249 | OP_CastIntAPSSint32, |
4250 | OP_CastIntAPSUint64, |
4251 | OP_CastIntAPSSint64, |
4252 | OP_CastIntAPSBool, |
4253 | OP_CastFixedPointUint8, |
4254 | OP_CastFixedPointSint8, |
4255 | OP_CastFixedPointUint16, |
4256 | OP_CastFixedPointSint16, |
4257 | OP_CastFixedPointUint32, |
4258 | OP_CastFixedPointSint32, |
4259 | OP_CastFixedPointUint64, |
4260 | OP_CastFixedPointSint64, |
4261 | OP_CastFixedPointBool, |
4262 | #endif |
4263 | #ifdef GET_INTERP |
4264 | case OP_CastUint8Uint8: { |
4265 | if (!Cast<PT_Uint8, PT_Uint8>(S, OpPC)) |
4266 | return false; |
4267 | continue; |
4268 | } |
4269 | case OP_CastUint8Sint8: { |
4270 | if (!Cast<PT_Uint8, PT_Sint8>(S, OpPC)) |
4271 | return false; |
4272 | continue; |
4273 | } |
4274 | case OP_CastUint8Uint16: { |
4275 | if (!Cast<PT_Uint8, PT_Uint16>(S, OpPC)) |
4276 | return false; |
4277 | continue; |
4278 | } |
4279 | case OP_CastUint8Sint16: { |
4280 | if (!Cast<PT_Uint8, PT_Sint16>(S, OpPC)) |
4281 | return false; |
4282 | continue; |
4283 | } |
4284 | case OP_CastUint8Uint32: { |
4285 | if (!Cast<PT_Uint8, PT_Uint32>(S, OpPC)) |
4286 | return false; |
4287 | continue; |
4288 | } |
4289 | case OP_CastUint8Sint32: { |
4290 | if (!Cast<PT_Uint8, PT_Sint32>(S, OpPC)) |
4291 | return false; |
4292 | continue; |
4293 | } |
4294 | case OP_CastUint8Uint64: { |
4295 | if (!Cast<PT_Uint8, PT_Uint64>(S, OpPC)) |
4296 | return false; |
4297 | continue; |
4298 | } |
4299 | case OP_CastUint8Sint64: { |
4300 | if (!Cast<PT_Uint8, PT_Sint64>(S, OpPC)) |
4301 | return false; |
4302 | continue; |
4303 | } |
4304 | case OP_CastUint8Bool: { |
4305 | if (!Cast<PT_Uint8, PT_Bool>(S, OpPC)) |
4306 | return false; |
4307 | continue; |
4308 | } |
4309 | case OP_CastSint8Uint8: { |
4310 | if (!Cast<PT_Sint8, PT_Uint8>(S, OpPC)) |
4311 | return false; |
4312 | continue; |
4313 | } |
4314 | case OP_CastSint8Sint8: { |
4315 | if (!Cast<PT_Sint8, PT_Sint8>(S, OpPC)) |
4316 | return false; |
4317 | continue; |
4318 | } |
4319 | case OP_CastSint8Uint16: { |
4320 | if (!Cast<PT_Sint8, PT_Uint16>(S, OpPC)) |
4321 | return false; |
4322 | continue; |
4323 | } |
4324 | case OP_CastSint8Sint16: { |
4325 | if (!Cast<PT_Sint8, PT_Sint16>(S, OpPC)) |
4326 | return false; |
4327 | continue; |
4328 | } |
4329 | case OP_CastSint8Uint32: { |
4330 | if (!Cast<PT_Sint8, PT_Uint32>(S, OpPC)) |
4331 | return false; |
4332 | continue; |
4333 | } |
4334 | case OP_CastSint8Sint32: { |
4335 | if (!Cast<PT_Sint8, PT_Sint32>(S, OpPC)) |
4336 | return false; |
4337 | continue; |
4338 | } |
4339 | case OP_CastSint8Uint64: { |
4340 | if (!Cast<PT_Sint8, PT_Uint64>(S, OpPC)) |
4341 | return false; |
4342 | continue; |
4343 | } |
4344 | case OP_CastSint8Sint64: { |
4345 | if (!Cast<PT_Sint8, PT_Sint64>(S, OpPC)) |
4346 | return false; |
4347 | continue; |
4348 | } |
4349 | case OP_CastSint8Bool: { |
4350 | if (!Cast<PT_Sint8, PT_Bool>(S, OpPC)) |
4351 | return false; |
4352 | continue; |
4353 | } |
4354 | case OP_CastUint16Uint8: { |
4355 | if (!Cast<PT_Uint16, PT_Uint8>(S, OpPC)) |
4356 | return false; |
4357 | continue; |
4358 | } |
4359 | case OP_CastUint16Sint8: { |
4360 | if (!Cast<PT_Uint16, PT_Sint8>(S, OpPC)) |
4361 | return false; |
4362 | continue; |
4363 | } |
4364 | case OP_CastUint16Uint16: { |
4365 | if (!Cast<PT_Uint16, PT_Uint16>(S, OpPC)) |
4366 | return false; |
4367 | continue; |
4368 | } |
4369 | case OP_CastUint16Sint16: { |
4370 | if (!Cast<PT_Uint16, PT_Sint16>(S, OpPC)) |
4371 | return false; |
4372 | continue; |
4373 | } |
4374 | case OP_CastUint16Uint32: { |
4375 | if (!Cast<PT_Uint16, PT_Uint32>(S, OpPC)) |
4376 | return false; |
4377 | continue; |
4378 | } |
4379 | case OP_CastUint16Sint32: { |
4380 | if (!Cast<PT_Uint16, PT_Sint32>(S, OpPC)) |
4381 | return false; |
4382 | continue; |
4383 | } |
4384 | case OP_CastUint16Uint64: { |
4385 | if (!Cast<PT_Uint16, PT_Uint64>(S, OpPC)) |
4386 | return false; |
4387 | continue; |
4388 | } |
4389 | case OP_CastUint16Sint64: { |
4390 | if (!Cast<PT_Uint16, PT_Sint64>(S, OpPC)) |
4391 | return false; |
4392 | continue; |
4393 | } |
4394 | case OP_CastUint16Bool: { |
4395 | if (!Cast<PT_Uint16, PT_Bool>(S, OpPC)) |
4396 | return false; |
4397 | continue; |
4398 | } |
4399 | case OP_CastSint16Uint8: { |
4400 | if (!Cast<PT_Sint16, PT_Uint8>(S, OpPC)) |
4401 | return false; |
4402 | continue; |
4403 | } |
4404 | case OP_CastSint16Sint8: { |
4405 | if (!Cast<PT_Sint16, PT_Sint8>(S, OpPC)) |
4406 | return false; |
4407 | continue; |
4408 | } |
4409 | case OP_CastSint16Uint16: { |
4410 | if (!Cast<PT_Sint16, PT_Uint16>(S, OpPC)) |
4411 | return false; |
4412 | continue; |
4413 | } |
4414 | case OP_CastSint16Sint16: { |
4415 | if (!Cast<PT_Sint16, PT_Sint16>(S, OpPC)) |
4416 | return false; |
4417 | continue; |
4418 | } |
4419 | case OP_CastSint16Uint32: { |
4420 | if (!Cast<PT_Sint16, PT_Uint32>(S, OpPC)) |
4421 | return false; |
4422 | continue; |
4423 | } |
4424 | case OP_CastSint16Sint32: { |
4425 | if (!Cast<PT_Sint16, PT_Sint32>(S, OpPC)) |
4426 | return false; |
4427 | continue; |
4428 | } |
4429 | case OP_CastSint16Uint64: { |
4430 | if (!Cast<PT_Sint16, PT_Uint64>(S, OpPC)) |
4431 | return false; |
4432 | continue; |
4433 | } |
4434 | case OP_CastSint16Sint64: { |
4435 | if (!Cast<PT_Sint16, PT_Sint64>(S, OpPC)) |
4436 | return false; |
4437 | continue; |
4438 | } |
4439 | case OP_CastSint16Bool: { |
4440 | if (!Cast<PT_Sint16, PT_Bool>(S, OpPC)) |
4441 | return false; |
4442 | continue; |
4443 | } |
4444 | case OP_CastUint32Uint8: { |
4445 | if (!Cast<PT_Uint32, PT_Uint8>(S, OpPC)) |
4446 | return false; |
4447 | continue; |
4448 | } |
4449 | case OP_CastUint32Sint8: { |
4450 | if (!Cast<PT_Uint32, PT_Sint8>(S, OpPC)) |
4451 | return false; |
4452 | continue; |
4453 | } |
4454 | case OP_CastUint32Uint16: { |
4455 | if (!Cast<PT_Uint32, PT_Uint16>(S, OpPC)) |
4456 | return false; |
4457 | continue; |
4458 | } |
4459 | case OP_CastUint32Sint16: { |
4460 | if (!Cast<PT_Uint32, PT_Sint16>(S, OpPC)) |
4461 | return false; |
4462 | continue; |
4463 | } |
4464 | case OP_CastUint32Uint32: { |
4465 | if (!Cast<PT_Uint32, PT_Uint32>(S, OpPC)) |
4466 | return false; |
4467 | continue; |
4468 | } |
4469 | case OP_CastUint32Sint32: { |
4470 | if (!Cast<PT_Uint32, PT_Sint32>(S, OpPC)) |
4471 | return false; |
4472 | continue; |
4473 | } |
4474 | case OP_CastUint32Uint64: { |
4475 | if (!Cast<PT_Uint32, PT_Uint64>(S, OpPC)) |
4476 | return false; |
4477 | continue; |
4478 | } |
4479 | case OP_CastUint32Sint64: { |
4480 | if (!Cast<PT_Uint32, PT_Sint64>(S, OpPC)) |
4481 | return false; |
4482 | continue; |
4483 | } |
4484 | case OP_CastUint32Bool: { |
4485 | if (!Cast<PT_Uint32, PT_Bool>(S, OpPC)) |
4486 | return false; |
4487 | continue; |
4488 | } |
4489 | case OP_CastSint32Uint8: { |
4490 | if (!Cast<PT_Sint32, PT_Uint8>(S, OpPC)) |
4491 | return false; |
4492 | continue; |
4493 | } |
4494 | case OP_CastSint32Sint8: { |
4495 | if (!Cast<PT_Sint32, PT_Sint8>(S, OpPC)) |
4496 | return false; |
4497 | continue; |
4498 | } |
4499 | case OP_CastSint32Uint16: { |
4500 | if (!Cast<PT_Sint32, PT_Uint16>(S, OpPC)) |
4501 | return false; |
4502 | continue; |
4503 | } |
4504 | case OP_CastSint32Sint16: { |
4505 | if (!Cast<PT_Sint32, PT_Sint16>(S, OpPC)) |
4506 | return false; |
4507 | continue; |
4508 | } |
4509 | case OP_CastSint32Uint32: { |
4510 | if (!Cast<PT_Sint32, PT_Uint32>(S, OpPC)) |
4511 | return false; |
4512 | continue; |
4513 | } |
4514 | case OP_CastSint32Sint32: { |
4515 | if (!Cast<PT_Sint32, PT_Sint32>(S, OpPC)) |
4516 | return false; |
4517 | continue; |
4518 | } |
4519 | case OP_CastSint32Uint64: { |
4520 | if (!Cast<PT_Sint32, PT_Uint64>(S, OpPC)) |
4521 | return false; |
4522 | continue; |
4523 | } |
4524 | case OP_CastSint32Sint64: { |
4525 | if (!Cast<PT_Sint32, PT_Sint64>(S, OpPC)) |
4526 | return false; |
4527 | continue; |
4528 | } |
4529 | case OP_CastSint32Bool: { |
4530 | if (!Cast<PT_Sint32, PT_Bool>(S, OpPC)) |
4531 | return false; |
4532 | continue; |
4533 | } |
4534 | case OP_CastUint64Uint8: { |
4535 | if (!Cast<PT_Uint64, PT_Uint8>(S, OpPC)) |
4536 | return false; |
4537 | continue; |
4538 | } |
4539 | case OP_CastUint64Sint8: { |
4540 | if (!Cast<PT_Uint64, PT_Sint8>(S, OpPC)) |
4541 | return false; |
4542 | continue; |
4543 | } |
4544 | case OP_CastUint64Uint16: { |
4545 | if (!Cast<PT_Uint64, PT_Uint16>(S, OpPC)) |
4546 | return false; |
4547 | continue; |
4548 | } |
4549 | case OP_CastUint64Sint16: { |
4550 | if (!Cast<PT_Uint64, PT_Sint16>(S, OpPC)) |
4551 | return false; |
4552 | continue; |
4553 | } |
4554 | case OP_CastUint64Uint32: { |
4555 | if (!Cast<PT_Uint64, PT_Uint32>(S, OpPC)) |
4556 | return false; |
4557 | continue; |
4558 | } |
4559 | case OP_CastUint64Sint32: { |
4560 | if (!Cast<PT_Uint64, PT_Sint32>(S, OpPC)) |
4561 | return false; |
4562 | continue; |
4563 | } |
4564 | case OP_CastUint64Uint64: { |
4565 | if (!Cast<PT_Uint64, PT_Uint64>(S, OpPC)) |
4566 | return false; |
4567 | continue; |
4568 | } |
4569 | case OP_CastUint64Sint64: { |
4570 | if (!Cast<PT_Uint64, PT_Sint64>(S, OpPC)) |
4571 | return false; |
4572 | continue; |
4573 | } |
4574 | case OP_CastUint64Bool: { |
4575 | if (!Cast<PT_Uint64, PT_Bool>(S, OpPC)) |
4576 | return false; |
4577 | continue; |
4578 | } |
4579 | case OP_CastSint64Uint8: { |
4580 | if (!Cast<PT_Sint64, PT_Uint8>(S, OpPC)) |
4581 | return false; |
4582 | continue; |
4583 | } |
4584 | case OP_CastSint64Sint8: { |
4585 | if (!Cast<PT_Sint64, PT_Sint8>(S, OpPC)) |
4586 | return false; |
4587 | continue; |
4588 | } |
4589 | case OP_CastSint64Uint16: { |
4590 | if (!Cast<PT_Sint64, PT_Uint16>(S, OpPC)) |
4591 | return false; |
4592 | continue; |
4593 | } |
4594 | case OP_CastSint64Sint16: { |
4595 | if (!Cast<PT_Sint64, PT_Sint16>(S, OpPC)) |
4596 | return false; |
4597 | continue; |
4598 | } |
4599 | case OP_CastSint64Uint32: { |
4600 | if (!Cast<PT_Sint64, PT_Uint32>(S, OpPC)) |
4601 | return false; |
4602 | continue; |
4603 | } |
4604 | case OP_CastSint64Sint32: { |
4605 | if (!Cast<PT_Sint64, PT_Sint32>(S, OpPC)) |
4606 | return false; |
4607 | continue; |
4608 | } |
4609 | case OP_CastSint64Uint64: { |
4610 | if (!Cast<PT_Sint64, PT_Uint64>(S, OpPC)) |
4611 | return false; |
4612 | continue; |
4613 | } |
4614 | case OP_CastSint64Sint64: { |
4615 | if (!Cast<PT_Sint64, PT_Sint64>(S, OpPC)) |
4616 | return false; |
4617 | continue; |
4618 | } |
4619 | case OP_CastSint64Bool: { |
4620 | if (!Cast<PT_Sint64, PT_Bool>(S, OpPC)) |
4621 | return false; |
4622 | continue; |
4623 | } |
4624 | case OP_CastBoolUint8: { |
4625 | if (!Cast<PT_Bool, PT_Uint8>(S, OpPC)) |
4626 | return false; |
4627 | continue; |
4628 | } |
4629 | case OP_CastBoolSint8: { |
4630 | if (!Cast<PT_Bool, PT_Sint8>(S, OpPC)) |
4631 | return false; |
4632 | continue; |
4633 | } |
4634 | case OP_CastBoolUint16: { |
4635 | if (!Cast<PT_Bool, PT_Uint16>(S, OpPC)) |
4636 | return false; |
4637 | continue; |
4638 | } |
4639 | case OP_CastBoolSint16: { |
4640 | if (!Cast<PT_Bool, PT_Sint16>(S, OpPC)) |
4641 | return false; |
4642 | continue; |
4643 | } |
4644 | case OP_CastBoolUint32: { |
4645 | if (!Cast<PT_Bool, PT_Uint32>(S, OpPC)) |
4646 | return false; |
4647 | continue; |
4648 | } |
4649 | case OP_CastBoolSint32: { |
4650 | if (!Cast<PT_Bool, PT_Sint32>(S, OpPC)) |
4651 | return false; |
4652 | continue; |
4653 | } |
4654 | case OP_CastBoolUint64: { |
4655 | if (!Cast<PT_Bool, PT_Uint64>(S, OpPC)) |
4656 | return false; |
4657 | continue; |
4658 | } |
4659 | case OP_CastBoolSint64: { |
4660 | if (!Cast<PT_Bool, PT_Sint64>(S, OpPC)) |
4661 | return false; |
4662 | continue; |
4663 | } |
4664 | case OP_CastBoolBool: { |
4665 | if (!Cast<PT_Bool, PT_Bool>(S, OpPC)) |
4666 | return false; |
4667 | continue; |
4668 | } |
4669 | case OP_CastIntAPUint8: { |
4670 | if (!Cast<PT_IntAP, PT_Uint8>(S, OpPC)) |
4671 | return false; |
4672 | continue; |
4673 | } |
4674 | case OP_CastIntAPSint8: { |
4675 | if (!Cast<PT_IntAP, PT_Sint8>(S, OpPC)) |
4676 | return false; |
4677 | continue; |
4678 | } |
4679 | case OP_CastIntAPUint16: { |
4680 | if (!Cast<PT_IntAP, PT_Uint16>(S, OpPC)) |
4681 | return false; |
4682 | continue; |
4683 | } |
4684 | case OP_CastIntAPSint16: { |
4685 | if (!Cast<PT_IntAP, PT_Sint16>(S, OpPC)) |
4686 | return false; |
4687 | continue; |
4688 | } |
4689 | case OP_CastIntAPUint32: { |
4690 | if (!Cast<PT_IntAP, PT_Uint32>(S, OpPC)) |
4691 | return false; |
4692 | continue; |
4693 | } |
4694 | case OP_CastIntAPSint32: { |
4695 | if (!Cast<PT_IntAP, PT_Sint32>(S, OpPC)) |
4696 | return false; |
4697 | continue; |
4698 | } |
4699 | case OP_CastIntAPUint64: { |
4700 | if (!Cast<PT_IntAP, PT_Uint64>(S, OpPC)) |
4701 | return false; |
4702 | continue; |
4703 | } |
4704 | case OP_CastIntAPSint64: { |
4705 | if (!Cast<PT_IntAP, PT_Sint64>(S, OpPC)) |
4706 | return false; |
4707 | continue; |
4708 | } |
4709 | case OP_CastIntAPBool: { |
4710 | if (!Cast<PT_IntAP, PT_Bool>(S, OpPC)) |
4711 | return false; |
4712 | continue; |
4713 | } |
4714 | case OP_CastIntAPSUint8: { |
4715 | if (!Cast<PT_IntAPS, PT_Uint8>(S, OpPC)) |
4716 | return false; |
4717 | continue; |
4718 | } |
4719 | case OP_CastIntAPSSint8: { |
4720 | if (!Cast<PT_IntAPS, PT_Sint8>(S, OpPC)) |
4721 | return false; |
4722 | continue; |
4723 | } |
4724 | case OP_CastIntAPSUint16: { |
4725 | if (!Cast<PT_IntAPS, PT_Uint16>(S, OpPC)) |
4726 | return false; |
4727 | continue; |
4728 | } |
4729 | case OP_CastIntAPSSint16: { |
4730 | if (!Cast<PT_IntAPS, PT_Sint16>(S, OpPC)) |
4731 | return false; |
4732 | continue; |
4733 | } |
4734 | case OP_CastIntAPSUint32: { |
4735 | if (!Cast<PT_IntAPS, PT_Uint32>(S, OpPC)) |
4736 | return false; |
4737 | continue; |
4738 | } |
4739 | case OP_CastIntAPSSint32: { |
4740 | if (!Cast<PT_IntAPS, PT_Sint32>(S, OpPC)) |
4741 | return false; |
4742 | continue; |
4743 | } |
4744 | case OP_CastIntAPSUint64: { |
4745 | if (!Cast<PT_IntAPS, PT_Uint64>(S, OpPC)) |
4746 | return false; |
4747 | continue; |
4748 | } |
4749 | case OP_CastIntAPSSint64: { |
4750 | if (!Cast<PT_IntAPS, PT_Sint64>(S, OpPC)) |
4751 | return false; |
4752 | continue; |
4753 | } |
4754 | case OP_CastIntAPSBool: { |
4755 | if (!Cast<PT_IntAPS, PT_Bool>(S, OpPC)) |
4756 | return false; |
4757 | continue; |
4758 | } |
4759 | case OP_CastFixedPointUint8: { |
4760 | if (!Cast<PT_FixedPoint, PT_Uint8>(S, OpPC)) |
4761 | return false; |
4762 | continue; |
4763 | } |
4764 | case OP_CastFixedPointSint8: { |
4765 | if (!Cast<PT_FixedPoint, PT_Sint8>(S, OpPC)) |
4766 | return false; |
4767 | continue; |
4768 | } |
4769 | case OP_CastFixedPointUint16: { |
4770 | if (!Cast<PT_FixedPoint, PT_Uint16>(S, OpPC)) |
4771 | return false; |
4772 | continue; |
4773 | } |
4774 | case OP_CastFixedPointSint16: { |
4775 | if (!Cast<PT_FixedPoint, PT_Sint16>(S, OpPC)) |
4776 | return false; |
4777 | continue; |
4778 | } |
4779 | case OP_CastFixedPointUint32: { |
4780 | if (!Cast<PT_FixedPoint, PT_Uint32>(S, OpPC)) |
4781 | return false; |
4782 | continue; |
4783 | } |
4784 | case OP_CastFixedPointSint32: { |
4785 | if (!Cast<PT_FixedPoint, PT_Sint32>(S, OpPC)) |
4786 | return false; |
4787 | continue; |
4788 | } |
4789 | case OP_CastFixedPointUint64: { |
4790 | if (!Cast<PT_FixedPoint, PT_Uint64>(S, OpPC)) |
4791 | return false; |
4792 | continue; |
4793 | } |
4794 | case OP_CastFixedPointSint64: { |
4795 | if (!Cast<PT_FixedPoint, PT_Sint64>(S, OpPC)) |
4796 | return false; |
4797 | continue; |
4798 | } |
4799 | case OP_CastFixedPointBool: { |
4800 | if (!Cast<PT_FixedPoint, PT_Bool>(S, OpPC)) |
4801 | return false; |
4802 | continue; |
4803 | } |
4804 | #endif |
4805 | #ifdef GET_DISASM |
4806 | case OP_CastUint8Uint8: |
4807 | Text.Op = PrintName("CastUint8Uint8" ); |
4808 | break; |
4809 | case OP_CastUint8Sint8: |
4810 | Text.Op = PrintName("CastUint8Sint8" ); |
4811 | break; |
4812 | case OP_CastUint8Uint16: |
4813 | Text.Op = PrintName("CastUint8Uint16" ); |
4814 | break; |
4815 | case OP_CastUint8Sint16: |
4816 | Text.Op = PrintName("CastUint8Sint16" ); |
4817 | break; |
4818 | case OP_CastUint8Uint32: |
4819 | Text.Op = PrintName("CastUint8Uint32" ); |
4820 | break; |
4821 | case OP_CastUint8Sint32: |
4822 | Text.Op = PrintName("CastUint8Sint32" ); |
4823 | break; |
4824 | case OP_CastUint8Uint64: |
4825 | Text.Op = PrintName("CastUint8Uint64" ); |
4826 | break; |
4827 | case OP_CastUint8Sint64: |
4828 | Text.Op = PrintName("CastUint8Sint64" ); |
4829 | break; |
4830 | case OP_CastUint8Bool: |
4831 | Text.Op = PrintName("CastUint8Bool" ); |
4832 | break; |
4833 | case OP_CastSint8Uint8: |
4834 | Text.Op = PrintName("CastSint8Uint8" ); |
4835 | break; |
4836 | case OP_CastSint8Sint8: |
4837 | Text.Op = PrintName("CastSint8Sint8" ); |
4838 | break; |
4839 | case OP_CastSint8Uint16: |
4840 | Text.Op = PrintName("CastSint8Uint16" ); |
4841 | break; |
4842 | case OP_CastSint8Sint16: |
4843 | Text.Op = PrintName("CastSint8Sint16" ); |
4844 | break; |
4845 | case OP_CastSint8Uint32: |
4846 | Text.Op = PrintName("CastSint8Uint32" ); |
4847 | break; |
4848 | case OP_CastSint8Sint32: |
4849 | Text.Op = PrintName("CastSint8Sint32" ); |
4850 | break; |
4851 | case OP_CastSint8Uint64: |
4852 | Text.Op = PrintName("CastSint8Uint64" ); |
4853 | break; |
4854 | case OP_CastSint8Sint64: |
4855 | Text.Op = PrintName("CastSint8Sint64" ); |
4856 | break; |
4857 | case OP_CastSint8Bool: |
4858 | Text.Op = PrintName("CastSint8Bool" ); |
4859 | break; |
4860 | case OP_CastUint16Uint8: |
4861 | Text.Op = PrintName("CastUint16Uint8" ); |
4862 | break; |
4863 | case OP_CastUint16Sint8: |
4864 | Text.Op = PrintName("CastUint16Sint8" ); |
4865 | break; |
4866 | case OP_CastUint16Uint16: |
4867 | Text.Op = PrintName("CastUint16Uint16" ); |
4868 | break; |
4869 | case OP_CastUint16Sint16: |
4870 | Text.Op = PrintName("CastUint16Sint16" ); |
4871 | break; |
4872 | case OP_CastUint16Uint32: |
4873 | Text.Op = PrintName("CastUint16Uint32" ); |
4874 | break; |
4875 | case OP_CastUint16Sint32: |
4876 | Text.Op = PrintName("CastUint16Sint32" ); |
4877 | break; |
4878 | case OP_CastUint16Uint64: |
4879 | Text.Op = PrintName("CastUint16Uint64" ); |
4880 | break; |
4881 | case OP_CastUint16Sint64: |
4882 | Text.Op = PrintName("CastUint16Sint64" ); |
4883 | break; |
4884 | case OP_CastUint16Bool: |
4885 | Text.Op = PrintName("CastUint16Bool" ); |
4886 | break; |
4887 | case OP_CastSint16Uint8: |
4888 | Text.Op = PrintName("CastSint16Uint8" ); |
4889 | break; |
4890 | case OP_CastSint16Sint8: |
4891 | Text.Op = PrintName("CastSint16Sint8" ); |
4892 | break; |
4893 | case OP_CastSint16Uint16: |
4894 | Text.Op = PrintName("CastSint16Uint16" ); |
4895 | break; |
4896 | case OP_CastSint16Sint16: |
4897 | Text.Op = PrintName("CastSint16Sint16" ); |
4898 | break; |
4899 | case OP_CastSint16Uint32: |
4900 | Text.Op = PrintName("CastSint16Uint32" ); |
4901 | break; |
4902 | case OP_CastSint16Sint32: |
4903 | Text.Op = PrintName("CastSint16Sint32" ); |
4904 | break; |
4905 | case OP_CastSint16Uint64: |
4906 | Text.Op = PrintName("CastSint16Uint64" ); |
4907 | break; |
4908 | case OP_CastSint16Sint64: |
4909 | Text.Op = PrintName("CastSint16Sint64" ); |
4910 | break; |
4911 | case OP_CastSint16Bool: |
4912 | Text.Op = PrintName("CastSint16Bool" ); |
4913 | break; |
4914 | case OP_CastUint32Uint8: |
4915 | Text.Op = PrintName("CastUint32Uint8" ); |
4916 | break; |
4917 | case OP_CastUint32Sint8: |
4918 | Text.Op = PrintName("CastUint32Sint8" ); |
4919 | break; |
4920 | case OP_CastUint32Uint16: |
4921 | Text.Op = PrintName("CastUint32Uint16" ); |
4922 | break; |
4923 | case OP_CastUint32Sint16: |
4924 | Text.Op = PrintName("CastUint32Sint16" ); |
4925 | break; |
4926 | case OP_CastUint32Uint32: |
4927 | Text.Op = PrintName("CastUint32Uint32" ); |
4928 | break; |
4929 | case OP_CastUint32Sint32: |
4930 | Text.Op = PrintName("CastUint32Sint32" ); |
4931 | break; |
4932 | case OP_CastUint32Uint64: |
4933 | Text.Op = PrintName("CastUint32Uint64" ); |
4934 | break; |
4935 | case OP_CastUint32Sint64: |
4936 | Text.Op = PrintName("CastUint32Sint64" ); |
4937 | break; |
4938 | case OP_CastUint32Bool: |
4939 | Text.Op = PrintName("CastUint32Bool" ); |
4940 | break; |
4941 | case OP_CastSint32Uint8: |
4942 | Text.Op = PrintName("CastSint32Uint8" ); |
4943 | break; |
4944 | case OP_CastSint32Sint8: |
4945 | Text.Op = PrintName("CastSint32Sint8" ); |
4946 | break; |
4947 | case OP_CastSint32Uint16: |
4948 | Text.Op = PrintName("CastSint32Uint16" ); |
4949 | break; |
4950 | case OP_CastSint32Sint16: |
4951 | Text.Op = PrintName("CastSint32Sint16" ); |
4952 | break; |
4953 | case OP_CastSint32Uint32: |
4954 | Text.Op = PrintName("CastSint32Uint32" ); |
4955 | break; |
4956 | case OP_CastSint32Sint32: |
4957 | Text.Op = PrintName("CastSint32Sint32" ); |
4958 | break; |
4959 | case OP_CastSint32Uint64: |
4960 | Text.Op = PrintName("CastSint32Uint64" ); |
4961 | break; |
4962 | case OP_CastSint32Sint64: |
4963 | Text.Op = PrintName("CastSint32Sint64" ); |
4964 | break; |
4965 | case OP_CastSint32Bool: |
4966 | Text.Op = PrintName("CastSint32Bool" ); |
4967 | break; |
4968 | case OP_CastUint64Uint8: |
4969 | Text.Op = PrintName("CastUint64Uint8" ); |
4970 | break; |
4971 | case OP_CastUint64Sint8: |
4972 | Text.Op = PrintName("CastUint64Sint8" ); |
4973 | break; |
4974 | case OP_CastUint64Uint16: |
4975 | Text.Op = PrintName("CastUint64Uint16" ); |
4976 | break; |
4977 | case OP_CastUint64Sint16: |
4978 | Text.Op = PrintName("CastUint64Sint16" ); |
4979 | break; |
4980 | case OP_CastUint64Uint32: |
4981 | Text.Op = PrintName("CastUint64Uint32" ); |
4982 | break; |
4983 | case OP_CastUint64Sint32: |
4984 | Text.Op = PrintName("CastUint64Sint32" ); |
4985 | break; |
4986 | case OP_CastUint64Uint64: |
4987 | Text.Op = PrintName("CastUint64Uint64" ); |
4988 | break; |
4989 | case OP_CastUint64Sint64: |
4990 | Text.Op = PrintName("CastUint64Sint64" ); |
4991 | break; |
4992 | case OP_CastUint64Bool: |
4993 | Text.Op = PrintName("CastUint64Bool" ); |
4994 | break; |
4995 | case OP_CastSint64Uint8: |
4996 | Text.Op = PrintName("CastSint64Uint8" ); |
4997 | break; |
4998 | case OP_CastSint64Sint8: |
4999 | Text.Op = PrintName("CastSint64Sint8" ); |
5000 | break; |
5001 | case OP_CastSint64Uint16: |
5002 | Text.Op = PrintName("CastSint64Uint16" ); |
5003 | break; |
5004 | case OP_CastSint64Sint16: |
5005 | Text.Op = PrintName("CastSint64Sint16" ); |
5006 | break; |
5007 | case OP_CastSint64Uint32: |
5008 | Text.Op = PrintName("CastSint64Uint32" ); |
5009 | break; |
5010 | case OP_CastSint64Sint32: |
5011 | Text.Op = PrintName("CastSint64Sint32" ); |
5012 | break; |
5013 | case OP_CastSint64Uint64: |
5014 | Text.Op = PrintName("CastSint64Uint64" ); |
5015 | break; |
5016 | case OP_CastSint64Sint64: |
5017 | Text.Op = PrintName("CastSint64Sint64" ); |
5018 | break; |
5019 | case OP_CastSint64Bool: |
5020 | Text.Op = PrintName("CastSint64Bool" ); |
5021 | break; |
5022 | case OP_CastBoolUint8: |
5023 | Text.Op = PrintName("CastBoolUint8" ); |
5024 | break; |
5025 | case OP_CastBoolSint8: |
5026 | Text.Op = PrintName("CastBoolSint8" ); |
5027 | break; |
5028 | case OP_CastBoolUint16: |
5029 | Text.Op = PrintName("CastBoolUint16" ); |
5030 | break; |
5031 | case OP_CastBoolSint16: |
5032 | Text.Op = PrintName("CastBoolSint16" ); |
5033 | break; |
5034 | case OP_CastBoolUint32: |
5035 | Text.Op = PrintName("CastBoolUint32" ); |
5036 | break; |
5037 | case OP_CastBoolSint32: |
5038 | Text.Op = PrintName("CastBoolSint32" ); |
5039 | break; |
5040 | case OP_CastBoolUint64: |
5041 | Text.Op = PrintName("CastBoolUint64" ); |
5042 | break; |
5043 | case OP_CastBoolSint64: |
5044 | Text.Op = PrintName("CastBoolSint64" ); |
5045 | break; |
5046 | case OP_CastBoolBool: |
5047 | Text.Op = PrintName("CastBoolBool" ); |
5048 | break; |
5049 | case OP_CastIntAPUint8: |
5050 | Text.Op = PrintName("CastIntAPUint8" ); |
5051 | break; |
5052 | case OP_CastIntAPSint8: |
5053 | Text.Op = PrintName("CastIntAPSint8" ); |
5054 | break; |
5055 | case OP_CastIntAPUint16: |
5056 | Text.Op = PrintName("CastIntAPUint16" ); |
5057 | break; |
5058 | case OP_CastIntAPSint16: |
5059 | Text.Op = PrintName("CastIntAPSint16" ); |
5060 | break; |
5061 | case OP_CastIntAPUint32: |
5062 | Text.Op = PrintName("CastIntAPUint32" ); |
5063 | break; |
5064 | case OP_CastIntAPSint32: |
5065 | Text.Op = PrintName("CastIntAPSint32" ); |
5066 | break; |
5067 | case OP_CastIntAPUint64: |
5068 | Text.Op = PrintName("CastIntAPUint64" ); |
5069 | break; |
5070 | case OP_CastIntAPSint64: |
5071 | Text.Op = PrintName("CastIntAPSint64" ); |
5072 | break; |
5073 | case OP_CastIntAPBool: |
5074 | Text.Op = PrintName("CastIntAPBool" ); |
5075 | break; |
5076 | case OP_CastIntAPSUint8: |
5077 | Text.Op = PrintName("CastIntAPSUint8" ); |
5078 | break; |
5079 | case OP_CastIntAPSSint8: |
5080 | Text.Op = PrintName("CastIntAPSSint8" ); |
5081 | break; |
5082 | case OP_CastIntAPSUint16: |
5083 | Text.Op = PrintName("CastIntAPSUint16" ); |
5084 | break; |
5085 | case OP_CastIntAPSSint16: |
5086 | Text.Op = PrintName("CastIntAPSSint16" ); |
5087 | break; |
5088 | case OP_CastIntAPSUint32: |
5089 | Text.Op = PrintName("CastIntAPSUint32" ); |
5090 | break; |
5091 | case OP_CastIntAPSSint32: |
5092 | Text.Op = PrintName("CastIntAPSSint32" ); |
5093 | break; |
5094 | case OP_CastIntAPSUint64: |
5095 | Text.Op = PrintName("CastIntAPSUint64" ); |
5096 | break; |
5097 | case OP_CastIntAPSSint64: |
5098 | Text.Op = PrintName("CastIntAPSSint64" ); |
5099 | break; |
5100 | case OP_CastIntAPSBool: |
5101 | Text.Op = PrintName("CastIntAPSBool" ); |
5102 | break; |
5103 | case OP_CastFixedPointUint8: |
5104 | Text.Op = PrintName("CastFixedPointUint8" ); |
5105 | break; |
5106 | case OP_CastFixedPointSint8: |
5107 | Text.Op = PrintName("CastFixedPointSint8" ); |
5108 | break; |
5109 | case OP_CastFixedPointUint16: |
5110 | Text.Op = PrintName("CastFixedPointUint16" ); |
5111 | break; |
5112 | case OP_CastFixedPointSint16: |
5113 | Text.Op = PrintName("CastFixedPointSint16" ); |
5114 | break; |
5115 | case OP_CastFixedPointUint32: |
5116 | Text.Op = PrintName("CastFixedPointUint32" ); |
5117 | break; |
5118 | case OP_CastFixedPointSint32: |
5119 | Text.Op = PrintName("CastFixedPointSint32" ); |
5120 | break; |
5121 | case OP_CastFixedPointUint64: |
5122 | Text.Op = PrintName("CastFixedPointUint64" ); |
5123 | break; |
5124 | case OP_CastFixedPointSint64: |
5125 | Text.Op = PrintName("CastFixedPointSint64" ); |
5126 | break; |
5127 | case OP_CastFixedPointBool: |
5128 | Text.Op = PrintName("CastFixedPointBool" ); |
5129 | break; |
5130 | #endif |
5131 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
5132 | bool emitCastUint8Uint8(const SourceInfo &); |
5133 | bool emitCastUint8Sint8(const SourceInfo &); |
5134 | bool emitCastUint8Uint16(const SourceInfo &); |
5135 | bool emitCastUint8Sint16(const SourceInfo &); |
5136 | bool emitCastUint8Uint32(const SourceInfo &); |
5137 | bool emitCastUint8Sint32(const SourceInfo &); |
5138 | bool emitCastUint8Uint64(const SourceInfo &); |
5139 | bool emitCastUint8Sint64(const SourceInfo &); |
5140 | bool emitCastUint8Bool(const SourceInfo &); |
5141 | bool emitCastSint8Uint8(const SourceInfo &); |
5142 | bool emitCastSint8Sint8(const SourceInfo &); |
5143 | bool emitCastSint8Uint16(const SourceInfo &); |
5144 | bool emitCastSint8Sint16(const SourceInfo &); |
5145 | bool emitCastSint8Uint32(const SourceInfo &); |
5146 | bool emitCastSint8Sint32(const SourceInfo &); |
5147 | bool emitCastSint8Uint64(const SourceInfo &); |
5148 | bool emitCastSint8Sint64(const SourceInfo &); |
5149 | bool emitCastSint8Bool(const SourceInfo &); |
5150 | bool emitCastUint16Uint8(const SourceInfo &); |
5151 | bool emitCastUint16Sint8(const SourceInfo &); |
5152 | bool emitCastUint16Uint16(const SourceInfo &); |
5153 | bool emitCastUint16Sint16(const SourceInfo &); |
5154 | bool emitCastUint16Uint32(const SourceInfo &); |
5155 | bool emitCastUint16Sint32(const SourceInfo &); |
5156 | bool emitCastUint16Uint64(const SourceInfo &); |
5157 | bool emitCastUint16Sint64(const SourceInfo &); |
5158 | bool emitCastUint16Bool(const SourceInfo &); |
5159 | bool emitCastSint16Uint8(const SourceInfo &); |
5160 | bool emitCastSint16Sint8(const SourceInfo &); |
5161 | bool emitCastSint16Uint16(const SourceInfo &); |
5162 | bool emitCastSint16Sint16(const SourceInfo &); |
5163 | bool emitCastSint16Uint32(const SourceInfo &); |
5164 | bool emitCastSint16Sint32(const SourceInfo &); |
5165 | bool emitCastSint16Uint64(const SourceInfo &); |
5166 | bool emitCastSint16Sint64(const SourceInfo &); |
5167 | bool emitCastSint16Bool(const SourceInfo &); |
5168 | bool emitCastUint32Uint8(const SourceInfo &); |
5169 | bool emitCastUint32Sint8(const SourceInfo &); |
5170 | bool emitCastUint32Uint16(const SourceInfo &); |
5171 | bool emitCastUint32Sint16(const SourceInfo &); |
5172 | bool emitCastUint32Uint32(const SourceInfo &); |
5173 | bool emitCastUint32Sint32(const SourceInfo &); |
5174 | bool emitCastUint32Uint64(const SourceInfo &); |
5175 | bool emitCastUint32Sint64(const SourceInfo &); |
5176 | bool emitCastUint32Bool(const SourceInfo &); |
5177 | bool emitCastSint32Uint8(const SourceInfo &); |
5178 | bool emitCastSint32Sint8(const SourceInfo &); |
5179 | bool emitCastSint32Uint16(const SourceInfo &); |
5180 | bool emitCastSint32Sint16(const SourceInfo &); |
5181 | bool emitCastSint32Uint32(const SourceInfo &); |
5182 | bool emitCastSint32Sint32(const SourceInfo &); |
5183 | bool emitCastSint32Uint64(const SourceInfo &); |
5184 | bool emitCastSint32Sint64(const SourceInfo &); |
5185 | bool emitCastSint32Bool(const SourceInfo &); |
5186 | bool emitCastUint64Uint8(const SourceInfo &); |
5187 | bool emitCastUint64Sint8(const SourceInfo &); |
5188 | bool emitCastUint64Uint16(const SourceInfo &); |
5189 | bool emitCastUint64Sint16(const SourceInfo &); |
5190 | bool emitCastUint64Uint32(const SourceInfo &); |
5191 | bool emitCastUint64Sint32(const SourceInfo &); |
5192 | bool emitCastUint64Uint64(const SourceInfo &); |
5193 | bool emitCastUint64Sint64(const SourceInfo &); |
5194 | bool emitCastUint64Bool(const SourceInfo &); |
5195 | bool emitCastSint64Uint8(const SourceInfo &); |
5196 | bool emitCastSint64Sint8(const SourceInfo &); |
5197 | bool emitCastSint64Uint16(const SourceInfo &); |
5198 | bool emitCastSint64Sint16(const SourceInfo &); |
5199 | bool emitCastSint64Uint32(const SourceInfo &); |
5200 | bool emitCastSint64Sint32(const SourceInfo &); |
5201 | bool emitCastSint64Uint64(const SourceInfo &); |
5202 | bool emitCastSint64Sint64(const SourceInfo &); |
5203 | bool emitCastSint64Bool(const SourceInfo &); |
5204 | bool emitCastBoolUint8(const SourceInfo &); |
5205 | bool emitCastBoolSint8(const SourceInfo &); |
5206 | bool emitCastBoolUint16(const SourceInfo &); |
5207 | bool emitCastBoolSint16(const SourceInfo &); |
5208 | bool emitCastBoolUint32(const SourceInfo &); |
5209 | bool emitCastBoolSint32(const SourceInfo &); |
5210 | bool emitCastBoolUint64(const SourceInfo &); |
5211 | bool emitCastBoolSint64(const SourceInfo &); |
5212 | bool emitCastBoolBool(const SourceInfo &); |
5213 | bool emitCastIntAPUint8(const SourceInfo &); |
5214 | bool emitCastIntAPSint8(const SourceInfo &); |
5215 | bool emitCastIntAPUint16(const SourceInfo &); |
5216 | bool emitCastIntAPSint16(const SourceInfo &); |
5217 | bool emitCastIntAPUint32(const SourceInfo &); |
5218 | bool emitCastIntAPSint32(const SourceInfo &); |
5219 | bool emitCastIntAPUint64(const SourceInfo &); |
5220 | bool emitCastIntAPSint64(const SourceInfo &); |
5221 | bool emitCastIntAPBool(const SourceInfo &); |
5222 | bool emitCastIntAPSUint8(const SourceInfo &); |
5223 | bool emitCastIntAPSSint8(const SourceInfo &); |
5224 | bool emitCastIntAPSUint16(const SourceInfo &); |
5225 | bool emitCastIntAPSSint16(const SourceInfo &); |
5226 | bool emitCastIntAPSUint32(const SourceInfo &); |
5227 | bool emitCastIntAPSSint32(const SourceInfo &); |
5228 | bool emitCastIntAPSUint64(const SourceInfo &); |
5229 | bool emitCastIntAPSSint64(const SourceInfo &); |
5230 | bool emitCastIntAPSBool(const SourceInfo &); |
5231 | bool emitCastFixedPointUint8(const SourceInfo &); |
5232 | bool emitCastFixedPointSint8(const SourceInfo &); |
5233 | bool emitCastFixedPointUint16(const SourceInfo &); |
5234 | bool emitCastFixedPointSint16(const SourceInfo &); |
5235 | bool emitCastFixedPointUint32(const SourceInfo &); |
5236 | bool emitCastFixedPointSint32(const SourceInfo &); |
5237 | bool emitCastFixedPointUint64(const SourceInfo &); |
5238 | bool emitCastFixedPointSint64(const SourceInfo &); |
5239 | bool emitCastFixedPointBool(const SourceInfo &); |
5240 | #endif |
5241 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
5242 | [[nodiscard]] bool emitCast(PrimType, PrimType, const SourceInfo &I); |
5243 | #endif |
5244 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
5245 | bool |
5246 | #if defined(GET_EVAL_IMPL) |
5247 | EvalEmitter |
5248 | #else |
5249 | ByteCodeEmitter |
5250 | #endif |
5251 | ::emitCast(PrimType T0, PrimType T1, const SourceInfo &I) { |
5252 | switch (T0) { |
5253 | case PT_Uint8: |
5254 | switch (T1) { |
5255 | case PT_Uint8: |
5256 | return emitCastUint8Uint8(I); |
5257 | case PT_Sint8: |
5258 | return emitCastUint8Sint8(I); |
5259 | case PT_Uint16: |
5260 | return emitCastUint8Uint16(I); |
5261 | case PT_Sint16: |
5262 | return emitCastUint8Sint16(I); |
5263 | case PT_Uint32: |
5264 | return emitCastUint8Uint32(I); |
5265 | case PT_Sint32: |
5266 | return emitCastUint8Sint32(I); |
5267 | case PT_Uint64: |
5268 | return emitCastUint8Uint64(I); |
5269 | case PT_Sint64: |
5270 | return emitCastUint8Sint64(I); |
5271 | case PT_Bool: |
5272 | return emitCastUint8Bool(I); |
5273 | default: llvm_unreachable("invalid type: emitCast" ); |
5274 | } |
5275 | llvm_unreachable("invalid enum value" ); |
5276 | case PT_Sint8: |
5277 | switch (T1) { |
5278 | case PT_Uint8: |
5279 | return emitCastSint8Uint8(I); |
5280 | case PT_Sint8: |
5281 | return emitCastSint8Sint8(I); |
5282 | case PT_Uint16: |
5283 | return emitCastSint8Uint16(I); |
5284 | case PT_Sint16: |
5285 | return emitCastSint8Sint16(I); |
5286 | case PT_Uint32: |
5287 | return emitCastSint8Uint32(I); |
5288 | case PT_Sint32: |
5289 | return emitCastSint8Sint32(I); |
5290 | case PT_Uint64: |
5291 | return emitCastSint8Uint64(I); |
5292 | case PT_Sint64: |
5293 | return emitCastSint8Sint64(I); |
5294 | case PT_Bool: |
5295 | return emitCastSint8Bool(I); |
5296 | default: llvm_unreachable("invalid type: emitCast" ); |
5297 | } |
5298 | llvm_unreachable("invalid enum value" ); |
5299 | case PT_Uint16: |
5300 | switch (T1) { |
5301 | case PT_Uint8: |
5302 | return emitCastUint16Uint8(I); |
5303 | case PT_Sint8: |
5304 | return emitCastUint16Sint8(I); |
5305 | case PT_Uint16: |
5306 | return emitCastUint16Uint16(I); |
5307 | case PT_Sint16: |
5308 | return emitCastUint16Sint16(I); |
5309 | case PT_Uint32: |
5310 | return emitCastUint16Uint32(I); |
5311 | case PT_Sint32: |
5312 | return emitCastUint16Sint32(I); |
5313 | case PT_Uint64: |
5314 | return emitCastUint16Uint64(I); |
5315 | case PT_Sint64: |
5316 | return emitCastUint16Sint64(I); |
5317 | case PT_Bool: |
5318 | return emitCastUint16Bool(I); |
5319 | default: llvm_unreachable("invalid type: emitCast" ); |
5320 | } |
5321 | llvm_unreachable("invalid enum value" ); |
5322 | case PT_Sint16: |
5323 | switch (T1) { |
5324 | case PT_Uint8: |
5325 | return emitCastSint16Uint8(I); |
5326 | case PT_Sint8: |
5327 | return emitCastSint16Sint8(I); |
5328 | case PT_Uint16: |
5329 | return emitCastSint16Uint16(I); |
5330 | case PT_Sint16: |
5331 | return emitCastSint16Sint16(I); |
5332 | case PT_Uint32: |
5333 | return emitCastSint16Uint32(I); |
5334 | case PT_Sint32: |
5335 | return emitCastSint16Sint32(I); |
5336 | case PT_Uint64: |
5337 | return emitCastSint16Uint64(I); |
5338 | case PT_Sint64: |
5339 | return emitCastSint16Sint64(I); |
5340 | case PT_Bool: |
5341 | return emitCastSint16Bool(I); |
5342 | default: llvm_unreachable("invalid type: emitCast" ); |
5343 | } |
5344 | llvm_unreachable("invalid enum value" ); |
5345 | case PT_Uint32: |
5346 | switch (T1) { |
5347 | case PT_Uint8: |
5348 | return emitCastUint32Uint8(I); |
5349 | case PT_Sint8: |
5350 | return emitCastUint32Sint8(I); |
5351 | case PT_Uint16: |
5352 | return emitCastUint32Uint16(I); |
5353 | case PT_Sint16: |
5354 | return emitCastUint32Sint16(I); |
5355 | case PT_Uint32: |
5356 | return emitCastUint32Uint32(I); |
5357 | case PT_Sint32: |
5358 | return emitCastUint32Sint32(I); |
5359 | case PT_Uint64: |
5360 | return emitCastUint32Uint64(I); |
5361 | case PT_Sint64: |
5362 | return emitCastUint32Sint64(I); |
5363 | case PT_Bool: |
5364 | return emitCastUint32Bool(I); |
5365 | default: llvm_unreachable("invalid type: emitCast" ); |
5366 | } |
5367 | llvm_unreachable("invalid enum value" ); |
5368 | case PT_Sint32: |
5369 | switch (T1) { |
5370 | case PT_Uint8: |
5371 | return emitCastSint32Uint8(I); |
5372 | case PT_Sint8: |
5373 | return emitCastSint32Sint8(I); |
5374 | case PT_Uint16: |
5375 | return emitCastSint32Uint16(I); |
5376 | case PT_Sint16: |
5377 | return emitCastSint32Sint16(I); |
5378 | case PT_Uint32: |
5379 | return emitCastSint32Uint32(I); |
5380 | case PT_Sint32: |
5381 | return emitCastSint32Sint32(I); |
5382 | case PT_Uint64: |
5383 | return emitCastSint32Uint64(I); |
5384 | case PT_Sint64: |
5385 | return emitCastSint32Sint64(I); |
5386 | case PT_Bool: |
5387 | return emitCastSint32Bool(I); |
5388 | default: llvm_unreachable("invalid type: emitCast" ); |
5389 | } |
5390 | llvm_unreachable("invalid enum value" ); |
5391 | case PT_Uint64: |
5392 | switch (T1) { |
5393 | case PT_Uint8: |
5394 | return emitCastUint64Uint8(I); |
5395 | case PT_Sint8: |
5396 | return emitCastUint64Sint8(I); |
5397 | case PT_Uint16: |
5398 | return emitCastUint64Uint16(I); |
5399 | case PT_Sint16: |
5400 | return emitCastUint64Sint16(I); |
5401 | case PT_Uint32: |
5402 | return emitCastUint64Uint32(I); |
5403 | case PT_Sint32: |
5404 | return emitCastUint64Sint32(I); |
5405 | case PT_Uint64: |
5406 | return emitCastUint64Uint64(I); |
5407 | case PT_Sint64: |
5408 | return emitCastUint64Sint64(I); |
5409 | case PT_Bool: |
5410 | return emitCastUint64Bool(I); |
5411 | default: llvm_unreachable("invalid type: emitCast" ); |
5412 | } |
5413 | llvm_unreachable("invalid enum value" ); |
5414 | case PT_Sint64: |
5415 | switch (T1) { |
5416 | case PT_Uint8: |
5417 | return emitCastSint64Uint8(I); |
5418 | case PT_Sint8: |
5419 | return emitCastSint64Sint8(I); |
5420 | case PT_Uint16: |
5421 | return emitCastSint64Uint16(I); |
5422 | case PT_Sint16: |
5423 | return emitCastSint64Sint16(I); |
5424 | case PT_Uint32: |
5425 | return emitCastSint64Uint32(I); |
5426 | case PT_Sint32: |
5427 | return emitCastSint64Sint32(I); |
5428 | case PT_Uint64: |
5429 | return emitCastSint64Uint64(I); |
5430 | case PT_Sint64: |
5431 | return emitCastSint64Sint64(I); |
5432 | case PT_Bool: |
5433 | return emitCastSint64Bool(I); |
5434 | default: llvm_unreachable("invalid type: emitCast" ); |
5435 | } |
5436 | llvm_unreachable("invalid enum value" ); |
5437 | case PT_Bool: |
5438 | switch (T1) { |
5439 | case PT_Uint8: |
5440 | return emitCastBoolUint8(I); |
5441 | case PT_Sint8: |
5442 | return emitCastBoolSint8(I); |
5443 | case PT_Uint16: |
5444 | return emitCastBoolUint16(I); |
5445 | case PT_Sint16: |
5446 | return emitCastBoolSint16(I); |
5447 | case PT_Uint32: |
5448 | return emitCastBoolUint32(I); |
5449 | case PT_Sint32: |
5450 | return emitCastBoolSint32(I); |
5451 | case PT_Uint64: |
5452 | return emitCastBoolUint64(I); |
5453 | case PT_Sint64: |
5454 | return emitCastBoolSint64(I); |
5455 | case PT_Bool: |
5456 | return emitCastBoolBool(I); |
5457 | default: llvm_unreachable("invalid type: emitCast" ); |
5458 | } |
5459 | llvm_unreachable("invalid enum value" ); |
5460 | case PT_IntAP: |
5461 | switch (T1) { |
5462 | case PT_Uint8: |
5463 | return emitCastIntAPUint8(I); |
5464 | case PT_Sint8: |
5465 | return emitCastIntAPSint8(I); |
5466 | case PT_Uint16: |
5467 | return emitCastIntAPUint16(I); |
5468 | case PT_Sint16: |
5469 | return emitCastIntAPSint16(I); |
5470 | case PT_Uint32: |
5471 | return emitCastIntAPUint32(I); |
5472 | case PT_Sint32: |
5473 | return emitCastIntAPSint32(I); |
5474 | case PT_Uint64: |
5475 | return emitCastIntAPUint64(I); |
5476 | case PT_Sint64: |
5477 | return emitCastIntAPSint64(I); |
5478 | case PT_Bool: |
5479 | return emitCastIntAPBool(I); |
5480 | default: llvm_unreachable("invalid type: emitCast" ); |
5481 | } |
5482 | llvm_unreachable("invalid enum value" ); |
5483 | case PT_IntAPS: |
5484 | switch (T1) { |
5485 | case PT_Uint8: |
5486 | return emitCastIntAPSUint8(I); |
5487 | case PT_Sint8: |
5488 | return emitCastIntAPSSint8(I); |
5489 | case PT_Uint16: |
5490 | return emitCastIntAPSUint16(I); |
5491 | case PT_Sint16: |
5492 | return emitCastIntAPSSint16(I); |
5493 | case PT_Uint32: |
5494 | return emitCastIntAPSUint32(I); |
5495 | case PT_Sint32: |
5496 | return emitCastIntAPSSint32(I); |
5497 | case PT_Uint64: |
5498 | return emitCastIntAPSUint64(I); |
5499 | case PT_Sint64: |
5500 | return emitCastIntAPSSint64(I); |
5501 | case PT_Bool: |
5502 | return emitCastIntAPSBool(I); |
5503 | default: llvm_unreachable("invalid type: emitCast" ); |
5504 | } |
5505 | llvm_unreachable("invalid enum value" ); |
5506 | case PT_FixedPoint: |
5507 | switch (T1) { |
5508 | case PT_Uint8: |
5509 | return emitCastFixedPointUint8(I); |
5510 | case PT_Sint8: |
5511 | return emitCastFixedPointSint8(I); |
5512 | case PT_Uint16: |
5513 | return emitCastFixedPointUint16(I); |
5514 | case PT_Sint16: |
5515 | return emitCastFixedPointSint16(I); |
5516 | case PT_Uint32: |
5517 | return emitCastFixedPointUint32(I); |
5518 | case PT_Sint32: |
5519 | return emitCastFixedPointSint32(I); |
5520 | case PT_Uint64: |
5521 | return emitCastFixedPointUint64(I); |
5522 | case PT_Sint64: |
5523 | return emitCastFixedPointSint64(I); |
5524 | case PT_Bool: |
5525 | return emitCastFixedPointBool(I); |
5526 | default: llvm_unreachable("invalid type: emitCast" ); |
5527 | } |
5528 | llvm_unreachable("invalid enum value" ); |
5529 | default: llvm_unreachable("invalid type: emitCast" ); |
5530 | } |
5531 | llvm_unreachable("invalid enum value" ); |
5532 | } |
5533 | #endif |
5534 | #ifdef GET_LINK_IMPL |
5535 | bool ByteCodeEmitter::emitCastUint8Uint8(const SourceInfo &L) { |
5536 | return emitOp<>(OP_CastUint8Uint8, L); |
5537 | } |
5538 | bool ByteCodeEmitter::emitCastUint8Sint8(const SourceInfo &L) { |
5539 | return emitOp<>(OP_CastUint8Sint8, L); |
5540 | } |
5541 | bool ByteCodeEmitter::emitCastUint8Uint16(const SourceInfo &L) { |
5542 | return emitOp<>(OP_CastUint8Uint16, L); |
5543 | } |
5544 | bool ByteCodeEmitter::emitCastUint8Sint16(const SourceInfo &L) { |
5545 | return emitOp<>(OP_CastUint8Sint16, L); |
5546 | } |
5547 | bool ByteCodeEmitter::emitCastUint8Uint32(const SourceInfo &L) { |
5548 | return emitOp<>(OP_CastUint8Uint32, L); |
5549 | } |
5550 | bool ByteCodeEmitter::emitCastUint8Sint32(const SourceInfo &L) { |
5551 | return emitOp<>(OP_CastUint8Sint32, L); |
5552 | } |
5553 | bool ByteCodeEmitter::emitCastUint8Uint64(const SourceInfo &L) { |
5554 | return emitOp<>(OP_CastUint8Uint64, L); |
5555 | } |
5556 | bool ByteCodeEmitter::emitCastUint8Sint64(const SourceInfo &L) { |
5557 | return emitOp<>(OP_CastUint8Sint64, L); |
5558 | } |
5559 | bool ByteCodeEmitter::emitCastUint8Bool(const SourceInfo &L) { |
5560 | return emitOp<>(OP_CastUint8Bool, L); |
5561 | } |
5562 | bool ByteCodeEmitter::emitCastSint8Uint8(const SourceInfo &L) { |
5563 | return emitOp<>(OP_CastSint8Uint8, L); |
5564 | } |
5565 | bool ByteCodeEmitter::emitCastSint8Sint8(const SourceInfo &L) { |
5566 | return emitOp<>(OP_CastSint8Sint8, L); |
5567 | } |
5568 | bool ByteCodeEmitter::emitCastSint8Uint16(const SourceInfo &L) { |
5569 | return emitOp<>(OP_CastSint8Uint16, L); |
5570 | } |
5571 | bool ByteCodeEmitter::emitCastSint8Sint16(const SourceInfo &L) { |
5572 | return emitOp<>(OP_CastSint8Sint16, L); |
5573 | } |
5574 | bool ByteCodeEmitter::emitCastSint8Uint32(const SourceInfo &L) { |
5575 | return emitOp<>(OP_CastSint8Uint32, L); |
5576 | } |
5577 | bool ByteCodeEmitter::emitCastSint8Sint32(const SourceInfo &L) { |
5578 | return emitOp<>(OP_CastSint8Sint32, L); |
5579 | } |
5580 | bool ByteCodeEmitter::emitCastSint8Uint64(const SourceInfo &L) { |
5581 | return emitOp<>(OP_CastSint8Uint64, L); |
5582 | } |
5583 | bool ByteCodeEmitter::emitCastSint8Sint64(const SourceInfo &L) { |
5584 | return emitOp<>(OP_CastSint8Sint64, L); |
5585 | } |
5586 | bool ByteCodeEmitter::emitCastSint8Bool(const SourceInfo &L) { |
5587 | return emitOp<>(OP_CastSint8Bool, L); |
5588 | } |
5589 | bool ByteCodeEmitter::emitCastUint16Uint8(const SourceInfo &L) { |
5590 | return emitOp<>(OP_CastUint16Uint8, L); |
5591 | } |
5592 | bool ByteCodeEmitter::emitCastUint16Sint8(const SourceInfo &L) { |
5593 | return emitOp<>(OP_CastUint16Sint8, L); |
5594 | } |
5595 | bool ByteCodeEmitter::emitCastUint16Uint16(const SourceInfo &L) { |
5596 | return emitOp<>(OP_CastUint16Uint16, L); |
5597 | } |
5598 | bool ByteCodeEmitter::emitCastUint16Sint16(const SourceInfo &L) { |
5599 | return emitOp<>(OP_CastUint16Sint16, L); |
5600 | } |
5601 | bool ByteCodeEmitter::emitCastUint16Uint32(const SourceInfo &L) { |
5602 | return emitOp<>(OP_CastUint16Uint32, L); |
5603 | } |
5604 | bool ByteCodeEmitter::emitCastUint16Sint32(const SourceInfo &L) { |
5605 | return emitOp<>(OP_CastUint16Sint32, L); |
5606 | } |
5607 | bool ByteCodeEmitter::emitCastUint16Uint64(const SourceInfo &L) { |
5608 | return emitOp<>(OP_CastUint16Uint64, L); |
5609 | } |
5610 | bool ByteCodeEmitter::emitCastUint16Sint64(const SourceInfo &L) { |
5611 | return emitOp<>(OP_CastUint16Sint64, L); |
5612 | } |
5613 | bool ByteCodeEmitter::emitCastUint16Bool(const SourceInfo &L) { |
5614 | return emitOp<>(OP_CastUint16Bool, L); |
5615 | } |
5616 | bool ByteCodeEmitter::emitCastSint16Uint8(const SourceInfo &L) { |
5617 | return emitOp<>(OP_CastSint16Uint8, L); |
5618 | } |
5619 | bool ByteCodeEmitter::emitCastSint16Sint8(const SourceInfo &L) { |
5620 | return emitOp<>(OP_CastSint16Sint8, L); |
5621 | } |
5622 | bool ByteCodeEmitter::emitCastSint16Uint16(const SourceInfo &L) { |
5623 | return emitOp<>(OP_CastSint16Uint16, L); |
5624 | } |
5625 | bool ByteCodeEmitter::emitCastSint16Sint16(const SourceInfo &L) { |
5626 | return emitOp<>(OP_CastSint16Sint16, L); |
5627 | } |
5628 | bool ByteCodeEmitter::emitCastSint16Uint32(const SourceInfo &L) { |
5629 | return emitOp<>(OP_CastSint16Uint32, L); |
5630 | } |
5631 | bool ByteCodeEmitter::emitCastSint16Sint32(const SourceInfo &L) { |
5632 | return emitOp<>(OP_CastSint16Sint32, L); |
5633 | } |
5634 | bool ByteCodeEmitter::emitCastSint16Uint64(const SourceInfo &L) { |
5635 | return emitOp<>(OP_CastSint16Uint64, L); |
5636 | } |
5637 | bool ByteCodeEmitter::emitCastSint16Sint64(const SourceInfo &L) { |
5638 | return emitOp<>(OP_CastSint16Sint64, L); |
5639 | } |
5640 | bool ByteCodeEmitter::emitCastSint16Bool(const SourceInfo &L) { |
5641 | return emitOp<>(OP_CastSint16Bool, L); |
5642 | } |
5643 | bool ByteCodeEmitter::emitCastUint32Uint8(const SourceInfo &L) { |
5644 | return emitOp<>(OP_CastUint32Uint8, L); |
5645 | } |
5646 | bool ByteCodeEmitter::emitCastUint32Sint8(const SourceInfo &L) { |
5647 | return emitOp<>(OP_CastUint32Sint8, L); |
5648 | } |
5649 | bool ByteCodeEmitter::emitCastUint32Uint16(const SourceInfo &L) { |
5650 | return emitOp<>(OP_CastUint32Uint16, L); |
5651 | } |
5652 | bool ByteCodeEmitter::emitCastUint32Sint16(const SourceInfo &L) { |
5653 | return emitOp<>(OP_CastUint32Sint16, L); |
5654 | } |
5655 | bool ByteCodeEmitter::emitCastUint32Uint32(const SourceInfo &L) { |
5656 | return emitOp<>(OP_CastUint32Uint32, L); |
5657 | } |
5658 | bool ByteCodeEmitter::emitCastUint32Sint32(const SourceInfo &L) { |
5659 | return emitOp<>(OP_CastUint32Sint32, L); |
5660 | } |
5661 | bool ByteCodeEmitter::emitCastUint32Uint64(const SourceInfo &L) { |
5662 | return emitOp<>(OP_CastUint32Uint64, L); |
5663 | } |
5664 | bool ByteCodeEmitter::emitCastUint32Sint64(const SourceInfo &L) { |
5665 | return emitOp<>(OP_CastUint32Sint64, L); |
5666 | } |
5667 | bool ByteCodeEmitter::emitCastUint32Bool(const SourceInfo &L) { |
5668 | return emitOp<>(OP_CastUint32Bool, L); |
5669 | } |
5670 | bool ByteCodeEmitter::emitCastSint32Uint8(const SourceInfo &L) { |
5671 | return emitOp<>(OP_CastSint32Uint8, L); |
5672 | } |
5673 | bool ByteCodeEmitter::emitCastSint32Sint8(const SourceInfo &L) { |
5674 | return emitOp<>(OP_CastSint32Sint8, L); |
5675 | } |
5676 | bool ByteCodeEmitter::emitCastSint32Uint16(const SourceInfo &L) { |
5677 | return emitOp<>(OP_CastSint32Uint16, L); |
5678 | } |
5679 | bool ByteCodeEmitter::emitCastSint32Sint16(const SourceInfo &L) { |
5680 | return emitOp<>(OP_CastSint32Sint16, L); |
5681 | } |
5682 | bool ByteCodeEmitter::emitCastSint32Uint32(const SourceInfo &L) { |
5683 | return emitOp<>(OP_CastSint32Uint32, L); |
5684 | } |
5685 | bool ByteCodeEmitter::emitCastSint32Sint32(const SourceInfo &L) { |
5686 | return emitOp<>(OP_CastSint32Sint32, L); |
5687 | } |
5688 | bool ByteCodeEmitter::emitCastSint32Uint64(const SourceInfo &L) { |
5689 | return emitOp<>(OP_CastSint32Uint64, L); |
5690 | } |
5691 | bool ByteCodeEmitter::emitCastSint32Sint64(const SourceInfo &L) { |
5692 | return emitOp<>(OP_CastSint32Sint64, L); |
5693 | } |
5694 | bool ByteCodeEmitter::emitCastSint32Bool(const SourceInfo &L) { |
5695 | return emitOp<>(OP_CastSint32Bool, L); |
5696 | } |
5697 | bool ByteCodeEmitter::emitCastUint64Uint8(const SourceInfo &L) { |
5698 | return emitOp<>(OP_CastUint64Uint8, L); |
5699 | } |
5700 | bool ByteCodeEmitter::emitCastUint64Sint8(const SourceInfo &L) { |
5701 | return emitOp<>(OP_CastUint64Sint8, L); |
5702 | } |
5703 | bool ByteCodeEmitter::emitCastUint64Uint16(const SourceInfo &L) { |
5704 | return emitOp<>(OP_CastUint64Uint16, L); |
5705 | } |
5706 | bool ByteCodeEmitter::emitCastUint64Sint16(const SourceInfo &L) { |
5707 | return emitOp<>(OP_CastUint64Sint16, L); |
5708 | } |
5709 | bool ByteCodeEmitter::emitCastUint64Uint32(const SourceInfo &L) { |
5710 | return emitOp<>(OP_CastUint64Uint32, L); |
5711 | } |
5712 | bool ByteCodeEmitter::emitCastUint64Sint32(const SourceInfo &L) { |
5713 | return emitOp<>(OP_CastUint64Sint32, L); |
5714 | } |
5715 | bool ByteCodeEmitter::emitCastUint64Uint64(const SourceInfo &L) { |
5716 | return emitOp<>(OP_CastUint64Uint64, L); |
5717 | } |
5718 | bool ByteCodeEmitter::emitCastUint64Sint64(const SourceInfo &L) { |
5719 | return emitOp<>(OP_CastUint64Sint64, L); |
5720 | } |
5721 | bool ByteCodeEmitter::emitCastUint64Bool(const SourceInfo &L) { |
5722 | return emitOp<>(OP_CastUint64Bool, L); |
5723 | } |
5724 | bool ByteCodeEmitter::emitCastSint64Uint8(const SourceInfo &L) { |
5725 | return emitOp<>(OP_CastSint64Uint8, L); |
5726 | } |
5727 | bool ByteCodeEmitter::emitCastSint64Sint8(const SourceInfo &L) { |
5728 | return emitOp<>(OP_CastSint64Sint8, L); |
5729 | } |
5730 | bool ByteCodeEmitter::emitCastSint64Uint16(const SourceInfo &L) { |
5731 | return emitOp<>(OP_CastSint64Uint16, L); |
5732 | } |
5733 | bool ByteCodeEmitter::emitCastSint64Sint16(const SourceInfo &L) { |
5734 | return emitOp<>(OP_CastSint64Sint16, L); |
5735 | } |
5736 | bool ByteCodeEmitter::emitCastSint64Uint32(const SourceInfo &L) { |
5737 | return emitOp<>(OP_CastSint64Uint32, L); |
5738 | } |
5739 | bool ByteCodeEmitter::emitCastSint64Sint32(const SourceInfo &L) { |
5740 | return emitOp<>(OP_CastSint64Sint32, L); |
5741 | } |
5742 | bool ByteCodeEmitter::emitCastSint64Uint64(const SourceInfo &L) { |
5743 | return emitOp<>(OP_CastSint64Uint64, L); |
5744 | } |
5745 | bool ByteCodeEmitter::emitCastSint64Sint64(const SourceInfo &L) { |
5746 | return emitOp<>(OP_CastSint64Sint64, L); |
5747 | } |
5748 | bool ByteCodeEmitter::emitCastSint64Bool(const SourceInfo &L) { |
5749 | return emitOp<>(OP_CastSint64Bool, L); |
5750 | } |
5751 | bool ByteCodeEmitter::emitCastBoolUint8(const SourceInfo &L) { |
5752 | return emitOp<>(OP_CastBoolUint8, L); |
5753 | } |
5754 | bool ByteCodeEmitter::emitCastBoolSint8(const SourceInfo &L) { |
5755 | return emitOp<>(OP_CastBoolSint8, L); |
5756 | } |
5757 | bool ByteCodeEmitter::emitCastBoolUint16(const SourceInfo &L) { |
5758 | return emitOp<>(OP_CastBoolUint16, L); |
5759 | } |
5760 | bool ByteCodeEmitter::emitCastBoolSint16(const SourceInfo &L) { |
5761 | return emitOp<>(OP_CastBoolSint16, L); |
5762 | } |
5763 | bool ByteCodeEmitter::emitCastBoolUint32(const SourceInfo &L) { |
5764 | return emitOp<>(OP_CastBoolUint32, L); |
5765 | } |
5766 | bool ByteCodeEmitter::emitCastBoolSint32(const SourceInfo &L) { |
5767 | return emitOp<>(OP_CastBoolSint32, L); |
5768 | } |
5769 | bool ByteCodeEmitter::emitCastBoolUint64(const SourceInfo &L) { |
5770 | return emitOp<>(OP_CastBoolUint64, L); |
5771 | } |
5772 | bool ByteCodeEmitter::emitCastBoolSint64(const SourceInfo &L) { |
5773 | return emitOp<>(OP_CastBoolSint64, L); |
5774 | } |
5775 | bool ByteCodeEmitter::emitCastBoolBool(const SourceInfo &L) { |
5776 | return emitOp<>(OP_CastBoolBool, L); |
5777 | } |
5778 | bool ByteCodeEmitter::emitCastIntAPUint8(const SourceInfo &L) { |
5779 | return emitOp<>(OP_CastIntAPUint8, L); |
5780 | } |
5781 | bool ByteCodeEmitter::emitCastIntAPSint8(const SourceInfo &L) { |
5782 | return emitOp<>(OP_CastIntAPSint8, L); |
5783 | } |
5784 | bool ByteCodeEmitter::emitCastIntAPUint16(const SourceInfo &L) { |
5785 | return emitOp<>(OP_CastIntAPUint16, L); |
5786 | } |
5787 | bool ByteCodeEmitter::emitCastIntAPSint16(const SourceInfo &L) { |
5788 | return emitOp<>(OP_CastIntAPSint16, L); |
5789 | } |
5790 | bool ByteCodeEmitter::emitCastIntAPUint32(const SourceInfo &L) { |
5791 | return emitOp<>(OP_CastIntAPUint32, L); |
5792 | } |
5793 | bool ByteCodeEmitter::emitCastIntAPSint32(const SourceInfo &L) { |
5794 | return emitOp<>(OP_CastIntAPSint32, L); |
5795 | } |
5796 | bool ByteCodeEmitter::emitCastIntAPUint64(const SourceInfo &L) { |
5797 | return emitOp<>(OP_CastIntAPUint64, L); |
5798 | } |
5799 | bool ByteCodeEmitter::emitCastIntAPSint64(const SourceInfo &L) { |
5800 | return emitOp<>(OP_CastIntAPSint64, L); |
5801 | } |
5802 | bool ByteCodeEmitter::emitCastIntAPBool(const SourceInfo &L) { |
5803 | return emitOp<>(OP_CastIntAPBool, L); |
5804 | } |
5805 | bool ByteCodeEmitter::emitCastIntAPSUint8(const SourceInfo &L) { |
5806 | return emitOp<>(OP_CastIntAPSUint8, L); |
5807 | } |
5808 | bool ByteCodeEmitter::emitCastIntAPSSint8(const SourceInfo &L) { |
5809 | return emitOp<>(OP_CastIntAPSSint8, L); |
5810 | } |
5811 | bool ByteCodeEmitter::emitCastIntAPSUint16(const SourceInfo &L) { |
5812 | return emitOp<>(OP_CastIntAPSUint16, L); |
5813 | } |
5814 | bool ByteCodeEmitter::emitCastIntAPSSint16(const SourceInfo &L) { |
5815 | return emitOp<>(OP_CastIntAPSSint16, L); |
5816 | } |
5817 | bool ByteCodeEmitter::emitCastIntAPSUint32(const SourceInfo &L) { |
5818 | return emitOp<>(OP_CastIntAPSUint32, L); |
5819 | } |
5820 | bool ByteCodeEmitter::emitCastIntAPSSint32(const SourceInfo &L) { |
5821 | return emitOp<>(OP_CastIntAPSSint32, L); |
5822 | } |
5823 | bool ByteCodeEmitter::emitCastIntAPSUint64(const SourceInfo &L) { |
5824 | return emitOp<>(OP_CastIntAPSUint64, L); |
5825 | } |
5826 | bool ByteCodeEmitter::emitCastIntAPSSint64(const SourceInfo &L) { |
5827 | return emitOp<>(OP_CastIntAPSSint64, L); |
5828 | } |
5829 | bool ByteCodeEmitter::emitCastIntAPSBool(const SourceInfo &L) { |
5830 | return emitOp<>(OP_CastIntAPSBool, L); |
5831 | } |
5832 | bool ByteCodeEmitter::emitCastFixedPointUint8(const SourceInfo &L) { |
5833 | return emitOp<>(OP_CastFixedPointUint8, L); |
5834 | } |
5835 | bool ByteCodeEmitter::emitCastFixedPointSint8(const SourceInfo &L) { |
5836 | return emitOp<>(OP_CastFixedPointSint8, L); |
5837 | } |
5838 | bool ByteCodeEmitter::emitCastFixedPointUint16(const SourceInfo &L) { |
5839 | return emitOp<>(OP_CastFixedPointUint16, L); |
5840 | } |
5841 | bool ByteCodeEmitter::emitCastFixedPointSint16(const SourceInfo &L) { |
5842 | return emitOp<>(OP_CastFixedPointSint16, L); |
5843 | } |
5844 | bool ByteCodeEmitter::emitCastFixedPointUint32(const SourceInfo &L) { |
5845 | return emitOp<>(OP_CastFixedPointUint32, L); |
5846 | } |
5847 | bool ByteCodeEmitter::emitCastFixedPointSint32(const SourceInfo &L) { |
5848 | return emitOp<>(OP_CastFixedPointSint32, L); |
5849 | } |
5850 | bool ByteCodeEmitter::emitCastFixedPointUint64(const SourceInfo &L) { |
5851 | return emitOp<>(OP_CastFixedPointUint64, L); |
5852 | } |
5853 | bool ByteCodeEmitter::emitCastFixedPointSint64(const SourceInfo &L) { |
5854 | return emitOp<>(OP_CastFixedPointSint64, L); |
5855 | } |
5856 | bool ByteCodeEmitter::emitCastFixedPointBool(const SourceInfo &L) { |
5857 | return emitOp<>(OP_CastFixedPointBool, L); |
5858 | } |
5859 | #endif |
5860 | #ifdef GET_EVAL_IMPL |
5861 | bool EvalEmitter::emitCastUint8Uint8(const SourceInfo &L) { |
5862 | if (!isActive()) return true; |
5863 | CurrentSource = L; |
5864 | return Cast<PT_Uint8, PT_Uint8>(S, OpPC); |
5865 | } |
5866 | bool EvalEmitter::emitCastUint8Sint8(const SourceInfo &L) { |
5867 | if (!isActive()) return true; |
5868 | CurrentSource = L; |
5869 | return Cast<PT_Uint8, PT_Sint8>(S, OpPC); |
5870 | } |
5871 | bool EvalEmitter::emitCastUint8Uint16(const SourceInfo &L) { |
5872 | if (!isActive()) return true; |
5873 | CurrentSource = L; |
5874 | return Cast<PT_Uint8, PT_Uint16>(S, OpPC); |
5875 | } |
5876 | bool EvalEmitter::emitCastUint8Sint16(const SourceInfo &L) { |
5877 | if (!isActive()) return true; |
5878 | CurrentSource = L; |
5879 | return Cast<PT_Uint8, PT_Sint16>(S, OpPC); |
5880 | } |
5881 | bool EvalEmitter::emitCastUint8Uint32(const SourceInfo &L) { |
5882 | if (!isActive()) return true; |
5883 | CurrentSource = L; |
5884 | return Cast<PT_Uint8, PT_Uint32>(S, OpPC); |
5885 | } |
5886 | bool EvalEmitter::emitCastUint8Sint32(const SourceInfo &L) { |
5887 | if (!isActive()) return true; |
5888 | CurrentSource = L; |
5889 | return Cast<PT_Uint8, PT_Sint32>(S, OpPC); |
5890 | } |
5891 | bool EvalEmitter::emitCastUint8Uint64(const SourceInfo &L) { |
5892 | if (!isActive()) return true; |
5893 | CurrentSource = L; |
5894 | return Cast<PT_Uint8, PT_Uint64>(S, OpPC); |
5895 | } |
5896 | bool EvalEmitter::emitCastUint8Sint64(const SourceInfo &L) { |
5897 | if (!isActive()) return true; |
5898 | CurrentSource = L; |
5899 | return Cast<PT_Uint8, PT_Sint64>(S, OpPC); |
5900 | } |
5901 | bool EvalEmitter::emitCastUint8Bool(const SourceInfo &L) { |
5902 | if (!isActive()) return true; |
5903 | CurrentSource = L; |
5904 | return Cast<PT_Uint8, PT_Bool>(S, OpPC); |
5905 | } |
5906 | bool EvalEmitter::emitCastSint8Uint8(const SourceInfo &L) { |
5907 | if (!isActive()) return true; |
5908 | CurrentSource = L; |
5909 | return Cast<PT_Sint8, PT_Uint8>(S, OpPC); |
5910 | } |
5911 | bool EvalEmitter::emitCastSint8Sint8(const SourceInfo &L) { |
5912 | if (!isActive()) return true; |
5913 | CurrentSource = L; |
5914 | return Cast<PT_Sint8, PT_Sint8>(S, OpPC); |
5915 | } |
5916 | bool EvalEmitter::emitCastSint8Uint16(const SourceInfo &L) { |
5917 | if (!isActive()) return true; |
5918 | CurrentSource = L; |
5919 | return Cast<PT_Sint8, PT_Uint16>(S, OpPC); |
5920 | } |
5921 | bool EvalEmitter::emitCastSint8Sint16(const SourceInfo &L) { |
5922 | if (!isActive()) return true; |
5923 | CurrentSource = L; |
5924 | return Cast<PT_Sint8, PT_Sint16>(S, OpPC); |
5925 | } |
5926 | bool EvalEmitter::emitCastSint8Uint32(const SourceInfo &L) { |
5927 | if (!isActive()) return true; |
5928 | CurrentSource = L; |
5929 | return Cast<PT_Sint8, PT_Uint32>(S, OpPC); |
5930 | } |
5931 | bool EvalEmitter::emitCastSint8Sint32(const SourceInfo &L) { |
5932 | if (!isActive()) return true; |
5933 | CurrentSource = L; |
5934 | return Cast<PT_Sint8, PT_Sint32>(S, OpPC); |
5935 | } |
5936 | bool EvalEmitter::emitCastSint8Uint64(const SourceInfo &L) { |
5937 | if (!isActive()) return true; |
5938 | CurrentSource = L; |
5939 | return Cast<PT_Sint8, PT_Uint64>(S, OpPC); |
5940 | } |
5941 | bool EvalEmitter::emitCastSint8Sint64(const SourceInfo &L) { |
5942 | if (!isActive()) return true; |
5943 | CurrentSource = L; |
5944 | return Cast<PT_Sint8, PT_Sint64>(S, OpPC); |
5945 | } |
5946 | bool EvalEmitter::emitCastSint8Bool(const SourceInfo &L) { |
5947 | if (!isActive()) return true; |
5948 | CurrentSource = L; |
5949 | return Cast<PT_Sint8, PT_Bool>(S, OpPC); |
5950 | } |
5951 | bool EvalEmitter::emitCastUint16Uint8(const SourceInfo &L) { |
5952 | if (!isActive()) return true; |
5953 | CurrentSource = L; |
5954 | return Cast<PT_Uint16, PT_Uint8>(S, OpPC); |
5955 | } |
5956 | bool EvalEmitter::emitCastUint16Sint8(const SourceInfo &L) { |
5957 | if (!isActive()) return true; |
5958 | CurrentSource = L; |
5959 | return Cast<PT_Uint16, PT_Sint8>(S, OpPC); |
5960 | } |
5961 | bool EvalEmitter::emitCastUint16Uint16(const SourceInfo &L) { |
5962 | if (!isActive()) return true; |
5963 | CurrentSource = L; |
5964 | return Cast<PT_Uint16, PT_Uint16>(S, OpPC); |
5965 | } |
5966 | bool EvalEmitter::emitCastUint16Sint16(const SourceInfo &L) { |
5967 | if (!isActive()) return true; |
5968 | CurrentSource = L; |
5969 | return Cast<PT_Uint16, PT_Sint16>(S, OpPC); |
5970 | } |
5971 | bool EvalEmitter::emitCastUint16Uint32(const SourceInfo &L) { |
5972 | if (!isActive()) return true; |
5973 | CurrentSource = L; |
5974 | return Cast<PT_Uint16, PT_Uint32>(S, OpPC); |
5975 | } |
5976 | bool EvalEmitter::emitCastUint16Sint32(const SourceInfo &L) { |
5977 | if (!isActive()) return true; |
5978 | CurrentSource = L; |
5979 | return Cast<PT_Uint16, PT_Sint32>(S, OpPC); |
5980 | } |
5981 | bool EvalEmitter::emitCastUint16Uint64(const SourceInfo &L) { |
5982 | if (!isActive()) return true; |
5983 | CurrentSource = L; |
5984 | return Cast<PT_Uint16, PT_Uint64>(S, OpPC); |
5985 | } |
5986 | bool EvalEmitter::emitCastUint16Sint64(const SourceInfo &L) { |
5987 | if (!isActive()) return true; |
5988 | CurrentSource = L; |
5989 | return Cast<PT_Uint16, PT_Sint64>(S, OpPC); |
5990 | } |
5991 | bool EvalEmitter::emitCastUint16Bool(const SourceInfo &L) { |
5992 | if (!isActive()) return true; |
5993 | CurrentSource = L; |
5994 | return Cast<PT_Uint16, PT_Bool>(S, OpPC); |
5995 | } |
5996 | bool EvalEmitter::emitCastSint16Uint8(const SourceInfo &L) { |
5997 | if (!isActive()) return true; |
5998 | CurrentSource = L; |
5999 | return Cast<PT_Sint16, PT_Uint8>(S, OpPC); |
6000 | } |
6001 | bool EvalEmitter::emitCastSint16Sint8(const SourceInfo &L) { |
6002 | if (!isActive()) return true; |
6003 | CurrentSource = L; |
6004 | return Cast<PT_Sint16, PT_Sint8>(S, OpPC); |
6005 | } |
6006 | bool EvalEmitter::emitCastSint16Uint16(const SourceInfo &L) { |
6007 | if (!isActive()) return true; |
6008 | CurrentSource = L; |
6009 | return Cast<PT_Sint16, PT_Uint16>(S, OpPC); |
6010 | } |
6011 | bool EvalEmitter::emitCastSint16Sint16(const SourceInfo &L) { |
6012 | if (!isActive()) return true; |
6013 | CurrentSource = L; |
6014 | return Cast<PT_Sint16, PT_Sint16>(S, OpPC); |
6015 | } |
6016 | bool EvalEmitter::emitCastSint16Uint32(const SourceInfo &L) { |
6017 | if (!isActive()) return true; |
6018 | CurrentSource = L; |
6019 | return Cast<PT_Sint16, PT_Uint32>(S, OpPC); |
6020 | } |
6021 | bool EvalEmitter::emitCastSint16Sint32(const SourceInfo &L) { |
6022 | if (!isActive()) return true; |
6023 | CurrentSource = L; |
6024 | return Cast<PT_Sint16, PT_Sint32>(S, OpPC); |
6025 | } |
6026 | bool EvalEmitter::emitCastSint16Uint64(const SourceInfo &L) { |
6027 | if (!isActive()) return true; |
6028 | CurrentSource = L; |
6029 | return Cast<PT_Sint16, PT_Uint64>(S, OpPC); |
6030 | } |
6031 | bool EvalEmitter::emitCastSint16Sint64(const SourceInfo &L) { |
6032 | if (!isActive()) return true; |
6033 | CurrentSource = L; |
6034 | return Cast<PT_Sint16, PT_Sint64>(S, OpPC); |
6035 | } |
6036 | bool EvalEmitter::emitCastSint16Bool(const SourceInfo &L) { |
6037 | if (!isActive()) return true; |
6038 | CurrentSource = L; |
6039 | return Cast<PT_Sint16, PT_Bool>(S, OpPC); |
6040 | } |
6041 | bool EvalEmitter::emitCastUint32Uint8(const SourceInfo &L) { |
6042 | if (!isActive()) return true; |
6043 | CurrentSource = L; |
6044 | return Cast<PT_Uint32, PT_Uint8>(S, OpPC); |
6045 | } |
6046 | bool EvalEmitter::emitCastUint32Sint8(const SourceInfo &L) { |
6047 | if (!isActive()) return true; |
6048 | CurrentSource = L; |
6049 | return Cast<PT_Uint32, PT_Sint8>(S, OpPC); |
6050 | } |
6051 | bool EvalEmitter::emitCastUint32Uint16(const SourceInfo &L) { |
6052 | if (!isActive()) return true; |
6053 | CurrentSource = L; |
6054 | return Cast<PT_Uint32, PT_Uint16>(S, OpPC); |
6055 | } |
6056 | bool EvalEmitter::emitCastUint32Sint16(const SourceInfo &L) { |
6057 | if (!isActive()) return true; |
6058 | CurrentSource = L; |
6059 | return Cast<PT_Uint32, PT_Sint16>(S, OpPC); |
6060 | } |
6061 | bool EvalEmitter::emitCastUint32Uint32(const SourceInfo &L) { |
6062 | if (!isActive()) return true; |
6063 | CurrentSource = L; |
6064 | return Cast<PT_Uint32, PT_Uint32>(S, OpPC); |
6065 | } |
6066 | bool EvalEmitter::emitCastUint32Sint32(const SourceInfo &L) { |
6067 | if (!isActive()) return true; |
6068 | CurrentSource = L; |
6069 | return Cast<PT_Uint32, PT_Sint32>(S, OpPC); |
6070 | } |
6071 | bool EvalEmitter::emitCastUint32Uint64(const SourceInfo &L) { |
6072 | if (!isActive()) return true; |
6073 | CurrentSource = L; |
6074 | return Cast<PT_Uint32, PT_Uint64>(S, OpPC); |
6075 | } |
6076 | bool EvalEmitter::emitCastUint32Sint64(const SourceInfo &L) { |
6077 | if (!isActive()) return true; |
6078 | CurrentSource = L; |
6079 | return Cast<PT_Uint32, PT_Sint64>(S, OpPC); |
6080 | } |
6081 | bool EvalEmitter::emitCastUint32Bool(const SourceInfo &L) { |
6082 | if (!isActive()) return true; |
6083 | CurrentSource = L; |
6084 | return Cast<PT_Uint32, PT_Bool>(S, OpPC); |
6085 | } |
6086 | bool EvalEmitter::emitCastSint32Uint8(const SourceInfo &L) { |
6087 | if (!isActive()) return true; |
6088 | CurrentSource = L; |
6089 | return Cast<PT_Sint32, PT_Uint8>(S, OpPC); |
6090 | } |
6091 | bool EvalEmitter::emitCastSint32Sint8(const SourceInfo &L) { |
6092 | if (!isActive()) return true; |
6093 | CurrentSource = L; |
6094 | return Cast<PT_Sint32, PT_Sint8>(S, OpPC); |
6095 | } |
6096 | bool EvalEmitter::emitCastSint32Uint16(const SourceInfo &L) { |
6097 | if (!isActive()) return true; |
6098 | CurrentSource = L; |
6099 | return Cast<PT_Sint32, PT_Uint16>(S, OpPC); |
6100 | } |
6101 | bool EvalEmitter::emitCastSint32Sint16(const SourceInfo &L) { |
6102 | if (!isActive()) return true; |
6103 | CurrentSource = L; |
6104 | return Cast<PT_Sint32, PT_Sint16>(S, OpPC); |
6105 | } |
6106 | bool EvalEmitter::emitCastSint32Uint32(const SourceInfo &L) { |
6107 | if (!isActive()) return true; |
6108 | CurrentSource = L; |
6109 | return Cast<PT_Sint32, PT_Uint32>(S, OpPC); |
6110 | } |
6111 | bool EvalEmitter::emitCastSint32Sint32(const SourceInfo &L) { |
6112 | if (!isActive()) return true; |
6113 | CurrentSource = L; |
6114 | return Cast<PT_Sint32, PT_Sint32>(S, OpPC); |
6115 | } |
6116 | bool EvalEmitter::emitCastSint32Uint64(const SourceInfo &L) { |
6117 | if (!isActive()) return true; |
6118 | CurrentSource = L; |
6119 | return Cast<PT_Sint32, PT_Uint64>(S, OpPC); |
6120 | } |
6121 | bool EvalEmitter::emitCastSint32Sint64(const SourceInfo &L) { |
6122 | if (!isActive()) return true; |
6123 | CurrentSource = L; |
6124 | return Cast<PT_Sint32, PT_Sint64>(S, OpPC); |
6125 | } |
6126 | bool EvalEmitter::emitCastSint32Bool(const SourceInfo &L) { |
6127 | if (!isActive()) return true; |
6128 | CurrentSource = L; |
6129 | return Cast<PT_Sint32, PT_Bool>(S, OpPC); |
6130 | } |
6131 | bool EvalEmitter::emitCastUint64Uint8(const SourceInfo &L) { |
6132 | if (!isActive()) return true; |
6133 | CurrentSource = L; |
6134 | return Cast<PT_Uint64, PT_Uint8>(S, OpPC); |
6135 | } |
6136 | bool EvalEmitter::emitCastUint64Sint8(const SourceInfo &L) { |
6137 | if (!isActive()) return true; |
6138 | CurrentSource = L; |
6139 | return Cast<PT_Uint64, PT_Sint8>(S, OpPC); |
6140 | } |
6141 | bool EvalEmitter::emitCastUint64Uint16(const SourceInfo &L) { |
6142 | if (!isActive()) return true; |
6143 | CurrentSource = L; |
6144 | return Cast<PT_Uint64, PT_Uint16>(S, OpPC); |
6145 | } |
6146 | bool EvalEmitter::emitCastUint64Sint16(const SourceInfo &L) { |
6147 | if (!isActive()) return true; |
6148 | CurrentSource = L; |
6149 | return Cast<PT_Uint64, PT_Sint16>(S, OpPC); |
6150 | } |
6151 | bool EvalEmitter::emitCastUint64Uint32(const SourceInfo &L) { |
6152 | if (!isActive()) return true; |
6153 | CurrentSource = L; |
6154 | return Cast<PT_Uint64, PT_Uint32>(S, OpPC); |
6155 | } |
6156 | bool EvalEmitter::emitCastUint64Sint32(const SourceInfo &L) { |
6157 | if (!isActive()) return true; |
6158 | CurrentSource = L; |
6159 | return Cast<PT_Uint64, PT_Sint32>(S, OpPC); |
6160 | } |
6161 | bool EvalEmitter::emitCastUint64Uint64(const SourceInfo &L) { |
6162 | if (!isActive()) return true; |
6163 | CurrentSource = L; |
6164 | return Cast<PT_Uint64, PT_Uint64>(S, OpPC); |
6165 | } |
6166 | bool EvalEmitter::emitCastUint64Sint64(const SourceInfo &L) { |
6167 | if (!isActive()) return true; |
6168 | CurrentSource = L; |
6169 | return Cast<PT_Uint64, PT_Sint64>(S, OpPC); |
6170 | } |
6171 | bool EvalEmitter::emitCastUint64Bool(const SourceInfo &L) { |
6172 | if (!isActive()) return true; |
6173 | CurrentSource = L; |
6174 | return Cast<PT_Uint64, PT_Bool>(S, OpPC); |
6175 | } |
6176 | bool EvalEmitter::emitCastSint64Uint8(const SourceInfo &L) { |
6177 | if (!isActive()) return true; |
6178 | CurrentSource = L; |
6179 | return Cast<PT_Sint64, PT_Uint8>(S, OpPC); |
6180 | } |
6181 | bool EvalEmitter::emitCastSint64Sint8(const SourceInfo &L) { |
6182 | if (!isActive()) return true; |
6183 | CurrentSource = L; |
6184 | return Cast<PT_Sint64, PT_Sint8>(S, OpPC); |
6185 | } |
6186 | bool EvalEmitter::emitCastSint64Uint16(const SourceInfo &L) { |
6187 | if (!isActive()) return true; |
6188 | CurrentSource = L; |
6189 | return Cast<PT_Sint64, PT_Uint16>(S, OpPC); |
6190 | } |
6191 | bool EvalEmitter::emitCastSint64Sint16(const SourceInfo &L) { |
6192 | if (!isActive()) return true; |
6193 | CurrentSource = L; |
6194 | return Cast<PT_Sint64, PT_Sint16>(S, OpPC); |
6195 | } |
6196 | bool EvalEmitter::emitCastSint64Uint32(const SourceInfo &L) { |
6197 | if (!isActive()) return true; |
6198 | CurrentSource = L; |
6199 | return Cast<PT_Sint64, PT_Uint32>(S, OpPC); |
6200 | } |
6201 | bool EvalEmitter::emitCastSint64Sint32(const SourceInfo &L) { |
6202 | if (!isActive()) return true; |
6203 | CurrentSource = L; |
6204 | return Cast<PT_Sint64, PT_Sint32>(S, OpPC); |
6205 | } |
6206 | bool EvalEmitter::emitCastSint64Uint64(const SourceInfo &L) { |
6207 | if (!isActive()) return true; |
6208 | CurrentSource = L; |
6209 | return Cast<PT_Sint64, PT_Uint64>(S, OpPC); |
6210 | } |
6211 | bool EvalEmitter::emitCastSint64Sint64(const SourceInfo &L) { |
6212 | if (!isActive()) return true; |
6213 | CurrentSource = L; |
6214 | return Cast<PT_Sint64, PT_Sint64>(S, OpPC); |
6215 | } |
6216 | bool EvalEmitter::emitCastSint64Bool(const SourceInfo &L) { |
6217 | if (!isActive()) return true; |
6218 | CurrentSource = L; |
6219 | return Cast<PT_Sint64, PT_Bool>(S, OpPC); |
6220 | } |
6221 | bool EvalEmitter::emitCastBoolUint8(const SourceInfo &L) { |
6222 | if (!isActive()) return true; |
6223 | CurrentSource = L; |
6224 | return Cast<PT_Bool, PT_Uint8>(S, OpPC); |
6225 | } |
6226 | bool EvalEmitter::emitCastBoolSint8(const SourceInfo &L) { |
6227 | if (!isActive()) return true; |
6228 | CurrentSource = L; |
6229 | return Cast<PT_Bool, PT_Sint8>(S, OpPC); |
6230 | } |
6231 | bool EvalEmitter::emitCastBoolUint16(const SourceInfo &L) { |
6232 | if (!isActive()) return true; |
6233 | CurrentSource = L; |
6234 | return Cast<PT_Bool, PT_Uint16>(S, OpPC); |
6235 | } |
6236 | bool EvalEmitter::emitCastBoolSint16(const SourceInfo &L) { |
6237 | if (!isActive()) return true; |
6238 | CurrentSource = L; |
6239 | return Cast<PT_Bool, PT_Sint16>(S, OpPC); |
6240 | } |
6241 | bool EvalEmitter::emitCastBoolUint32(const SourceInfo &L) { |
6242 | if (!isActive()) return true; |
6243 | CurrentSource = L; |
6244 | return Cast<PT_Bool, PT_Uint32>(S, OpPC); |
6245 | } |
6246 | bool EvalEmitter::emitCastBoolSint32(const SourceInfo &L) { |
6247 | if (!isActive()) return true; |
6248 | CurrentSource = L; |
6249 | return Cast<PT_Bool, PT_Sint32>(S, OpPC); |
6250 | } |
6251 | bool EvalEmitter::emitCastBoolUint64(const SourceInfo &L) { |
6252 | if (!isActive()) return true; |
6253 | CurrentSource = L; |
6254 | return Cast<PT_Bool, PT_Uint64>(S, OpPC); |
6255 | } |
6256 | bool EvalEmitter::emitCastBoolSint64(const SourceInfo &L) { |
6257 | if (!isActive()) return true; |
6258 | CurrentSource = L; |
6259 | return Cast<PT_Bool, PT_Sint64>(S, OpPC); |
6260 | } |
6261 | bool EvalEmitter::emitCastBoolBool(const SourceInfo &L) { |
6262 | if (!isActive()) return true; |
6263 | CurrentSource = L; |
6264 | return Cast<PT_Bool, PT_Bool>(S, OpPC); |
6265 | } |
6266 | bool EvalEmitter::emitCastIntAPUint8(const SourceInfo &L) { |
6267 | if (!isActive()) return true; |
6268 | CurrentSource = L; |
6269 | return Cast<PT_IntAP, PT_Uint8>(S, OpPC); |
6270 | } |
6271 | bool EvalEmitter::emitCastIntAPSint8(const SourceInfo &L) { |
6272 | if (!isActive()) return true; |
6273 | CurrentSource = L; |
6274 | return Cast<PT_IntAP, PT_Sint8>(S, OpPC); |
6275 | } |
6276 | bool EvalEmitter::emitCastIntAPUint16(const SourceInfo &L) { |
6277 | if (!isActive()) return true; |
6278 | CurrentSource = L; |
6279 | return Cast<PT_IntAP, PT_Uint16>(S, OpPC); |
6280 | } |
6281 | bool EvalEmitter::emitCastIntAPSint16(const SourceInfo &L) { |
6282 | if (!isActive()) return true; |
6283 | CurrentSource = L; |
6284 | return Cast<PT_IntAP, PT_Sint16>(S, OpPC); |
6285 | } |
6286 | bool EvalEmitter::emitCastIntAPUint32(const SourceInfo &L) { |
6287 | if (!isActive()) return true; |
6288 | CurrentSource = L; |
6289 | return Cast<PT_IntAP, PT_Uint32>(S, OpPC); |
6290 | } |
6291 | bool EvalEmitter::emitCastIntAPSint32(const SourceInfo &L) { |
6292 | if (!isActive()) return true; |
6293 | CurrentSource = L; |
6294 | return Cast<PT_IntAP, PT_Sint32>(S, OpPC); |
6295 | } |
6296 | bool EvalEmitter::emitCastIntAPUint64(const SourceInfo &L) { |
6297 | if (!isActive()) return true; |
6298 | CurrentSource = L; |
6299 | return Cast<PT_IntAP, PT_Uint64>(S, OpPC); |
6300 | } |
6301 | bool EvalEmitter::emitCastIntAPSint64(const SourceInfo &L) { |
6302 | if (!isActive()) return true; |
6303 | CurrentSource = L; |
6304 | return Cast<PT_IntAP, PT_Sint64>(S, OpPC); |
6305 | } |
6306 | bool EvalEmitter::emitCastIntAPBool(const SourceInfo &L) { |
6307 | if (!isActive()) return true; |
6308 | CurrentSource = L; |
6309 | return Cast<PT_IntAP, PT_Bool>(S, OpPC); |
6310 | } |
6311 | bool EvalEmitter::emitCastIntAPSUint8(const SourceInfo &L) { |
6312 | if (!isActive()) return true; |
6313 | CurrentSource = L; |
6314 | return Cast<PT_IntAPS, PT_Uint8>(S, OpPC); |
6315 | } |
6316 | bool EvalEmitter::emitCastIntAPSSint8(const SourceInfo &L) { |
6317 | if (!isActive()) return true; |
6318 | CurrentSource = L; |
6319 | return Cast<PT_IntAPS, PT_Sint8>(S, OpPC); |
6320 | } |
6321 | bool EvalEmitter::emitCastIntAPSUint16(const SourceInfo &L) { |
6322 | if (!isActive()) return true; |
6323 | CurrentSource = L; |
6324 | return Cast<PT_IntAPS, PT_Uint16>(S, OpPC); |
6325 | } |
6326 | bool EvalEmitter::emitCastIntAPSSint16(const SourceInfo &L) { |
6327 | if (!isActive()) return true; |
6328 | CurrentSource = L; |
6329 | return Cast<PT_IntAPS, PT_Sint16>(S, OpPC); |
6330 | } |
6331 | bool EvalEmitter::emitCastIntAPSUint32(const SourceInfo &L) { |
6332 | if (!isActive()) return true; |
6333 | CurrentSource = L; |
6334 | return Cast<PT_IntAPS, PT_Uint32>(S, OpPC); |
6335 | } |
6336 | bool EvalEmitter::emitCastIntAPSSint32(const SourceInfo &L) { |
6337 | if (!isActive()) return true; |
6338 | CurrentSource = L; |
6339 | return Cast<PT_IntAPS, PT_Sint32>(S, OpPC); |
6340 | } |
6341 | bool EvalEmitter::emitCastIntAPSUint64(const SourceInfo &L) { |
6342 | if (!isActive()) return true; |
6343 | CurrentSource = L; |
6344 | return Cast<PT_IntAPS, PT_Uint64>(S, OpPC); |
6345 | } |
6346 | bool EvalEmitter::emitCastIntAPSSint64(const SourceInfo &L) { |
6347 | if (!isActive()) return true; |
6348 | CurrentSource = L; |
6349 | return Cast<PT_IntAPS, PT_Sint64>(S, OpPC); |
6350 | } |
6351 | bool EvalEmitter::emitCastIntAPSBool(const SourceInfo &L) { |
6352 | if (!isActive()) return true; |
6353 | CurrentSource = L; |
6354 | return Cast<PT_IntAPS, PT_Bool>(S, OpPC); |
6355 | } |
6356 | bool EvalEmitter::emitCastFixedPointUint8(const SourceInfo &L) { |
6357 | if (!isActive()) return true; |
6358 | CurrentSource = L; |
6359 | return Cast<PT_FixedPoint, PT_Uint8>(S, OpPC); |
6360 | } |
6361 | bool EvalEmitter::emitCastFixedPointSint8(const SourceInfo &L) { |
6362 | if (!isActive()) return true; |
6363 | CurrentSource = L; |
6364 | return Cast<PT_FixedPoint, PT_Sint8>(S, OpPC); |
6365 | } |
6366 | bool EvalEmitter::emitCastFixedPointUint16(const SourceInfo &L) { |
6367 | if (!isActive()) return true; |
6368 | CurrentSource = L; |
6369 | return Cast<PT_FixedPoint, PT_Uint16>(S, OpPC); |
6370 | } |
6371 | bool EvalEmitter::emitCastFixedPointSint16(const SourceInfo &L) { |
6372 | if (!isActive()) return true; |
6373 | CurrentSource = L; |
6374 | return Cast<PT_FixedPoint, PT_Sint16>(S, OpPC); |
6375 | } |
6376 | bool EvalEmitter::emitCastFixedPointUint32(const SourceInfo &L) { |
6377 | if (!isActive()) return true; |
6378 | CurrentSource = L; |
6379 | return Cast<PT_FixedPoint, PT_Uint32>(S, OpPC); |
6380 | } |
6381 | bool EvalEmitter::emitCastFixedPointSint32(const SourceInfo &L) { |
6382 | if (!isActive()) return true; |
6383 | CurrentSource = L; |
6384 | return Cast<PT_FixedPoint, PT_Sint32>(S, OpPC); |
6385 | } |
6386 | bool EvalEmitter::emitCastFixedPointUint64(const SourceInfo &L) { |
6387 | if (!isActive()) return true; |
6388 | CurrentSource = L; |
6389 | return Cast<PT_FixedPoint, PT_Uint64>(S, OpPC); |
6390 | } |
6391 | bool EvalEmitter::emitCastFixedPointSint64(const SourceInfo &L) { |
6392 | if (!isActive()) return true; |
6393 | CurrentSource = L; |
6394 | return Cast<PT_FixedPoint, PT_Sint64>(S, OpPC); |
6395 | } |
6396 | bool EvalEmitter::emitCastFixedPointBool(const SourceInfo &L) { |
6397 | if (!isActive()) return true; |
6398 | CurrentSource = L; |
6399 | return Cast<PT_FixedPoint, PT_Bool>(S, OpPC); |
6400 | } |
6401 | #endif |
6402 | #ifdef GET_OPCODE_NAMES |
6403 | OP_CastAPSint8, |
6404 | OP_CastAPUint8, |
6405 | OP_CastAPSint16, |
6406 | OP_CastAPUint16, |
6407 | OP_CastAPSint32, |
6408 | OP_CastAPUint32, |
6409 | OP_CastAPSint64, |
6410 | OP_CastAPUint64, |
6411 | OP_CastAPIntAP, |
6412 | OP_CastAPIntAPS, |
6413 | OP_CastAPBool, |
6414 | OP_CastAPFixedPoint, |
6415 | #endif |
6416 | #ifdef GET_INTERP |
6417 | case OP_CastAPSint8: { |
6418 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6419 | if (!CastAP<PT_Sint8>(S, OpPC, V0)) |
6420 | return false; |
6421 | continue; |
6422 | } |
6423 | case OP_CastAPUint8: { |
6424 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6425 | if (!CastAP<PT_Uint8>(S, OpPC, V0)) |
6426 | return false; |
6427 | continue; |
6428 | } |
6429 | case OP_CastAPSint16: { |
6430 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6431 | if (!CastAP<PT_Sint16>(S, OpPC, V0)) |
6432 | return false; |
6433 | continue; |
6434 | } |
6435 | case OP_CastAPUint16: { |
6436 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6437 | if (!CastAP<PT_Uint16>(S, OpPC, V0)) |
6438 | return false; |
6439 | continue; |
6440 | } |
6441 | case OP_CastAPSint32: { |
6442 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6443 | if (!CastAP<PT_Sint32>(S, OpPC, V0)) |
6444 | return false; |
6445 | continue; |
6446 | } |
6447 | case OP_CastAPUint32: { |
6448 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6449 | if (!CastAP<PT_Uint32>(S, OpPC, V0)) |
6450 | return false; |
6451 | continue; |
6452 | } |
6453 | case OP_CastAPSint64: { |
6454 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6455 | if (!CastAP<PT_Sint64>(S, OpPC, V0)) |
6456 | return false; |
6457 | continue; |
6458 | } |
6459 | case OP_CastAPUint64: { |
6460 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6461 | if (!CastAP<PT_Uint64>(S, OpPC, V0)) |
6462 | return false; |
6463 | continue; |
6464 | } |
6465 | case OP_CastAPIntAP: { |
6466 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6467 | if (!CastAP<PT_IntAP>(S, OpPC, V0)) |
6468 | return false; |
6469 | continue; |
6470 | } |
6471 | case OP_CastAPIntAPS: { |
6472 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6473 | if (!CastAP<PT_IntAPS>(S, OpPC, V0)) |
6474 | return false; |
6475 | continue; |
6476 | } |
6477 | case OP_CastAPBool: { |
6478 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6479 | if (!CastAP<PT_Bool>(S, OpPC, V0)) |
6480 | return false; |
6481 | continue; |
6482 | } |
6483 | case OP_CastAPFixedPoint: { |
6484 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6485 | if (!CastAP<PT_FixedPoint>(S, OpPC, V0)) |
6486 | return false; |
6487 | continue; |
6488 | } |
6489 | #endif |
6490 | #ifdef GET_DISASM |
6491 | case OP_CastAPSint8: |
6492 | Text.Op = PrintName("CastAPSint8" ); |
6493 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6494 | break; |
6495 | case OP_CastAPUint8: |
6496 | Text.Op = PrintName("CastAPUint8" ); |
6497 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6498 | break; |
6499 | case OP_CastAPSint16: |
6500 | Text.Op = PrintName("CastAPSint16" ); |
6501 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6502 | break; |
6503 | case OP_CastAPUint16: |
6504 | Text.Op = PrintName("CastAPUint16" ); |
6505 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6506 | break; |
6507 | case OP_CastAPSint32: |
6508 | Text.Op = PrintName("CastAPSint32" ); |
6509 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6510 | break; |
6511 | case OP_CastAPUint32: |
6512 | Text.Op = PrintName("CastAPUint32" ); |
6513 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6514 | break; |
6515 | case OP_CastAPSint64: |
6516 | Text.Op = PrintName("CastAPSint64" ); |
6517 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6518 | break; |
6519 | case OP_CastAPUint64: |
6520 | Text.Op = PrintName("CastAPUint64" ); |
6521 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6522 | break; |
6523 | case OP_CastAPIntAP: |
6524 | Text.Op = PrintName("CastAPIntAP" ); |
6525 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6526 | break; |
6527 | case OP_CastAPIntAPS: |
6528 | Text.Op = PrintName("CastAPIntAPS" ); |
6529 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6530 | break; |
6531 | case OP_CastAPBool: |
6532 | Text.Op = PrintName("CastAPBool" ); |
6533 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6534 | break; |
6535 | case OP_CastAPFixedPoint: |
6536 | Text.Op = PrintName("CastAPFixedPoint" ); |
6537 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6538 | break; |
6539 | #endif |
6540 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6541 | bool emitCastAPSint8( uint32_t , const SourceInfo &); |
6542 | bool emitCastAPUint8( uint32_t , const SourceInfo &); |
6543 | bool emitCastAPSint16( uint32_t , const SourceInfo &); |
6544 | bool emitCastAPUint16( uint32_t , const SourceInfo &); |
6545 | bool emitCastAPSint32( uint32_t , const SourceInfo &); |
6546 | bool emitCastAPUint32( uint32_t , const SourceInfo &); |
6547 | bool emitCastAPSint64( uint32_t , const SourceInfo &); |
6548 | bool emitCastAPUint64( uint32_t , const SourceInfo &); |
6549 | bool emitCastAPIntAP( uint32_t , const SourceInfo &); |
6550 | bool emitCastAPIntAPS( uint32_t , const SourceInfo &); |
6551 | bool emitCastAPBool( uint32_t , const SourceInfo &); |
6552 | bool emitCastAPFixedPoint( uint32_t , const SourceInfo &); |
6553 | #endif |
6554 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6555 | [[nodiscard]] bool emitCastAP(PrimType, uint32_t, const SourceInfo &I); |
6556 | #endif |
6557 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
6558 | bool |
6559 | #if defined(GET_EVAL_IMPL) |
6560 | EvalEmitter |
6561 | #else |
6562 | ByteCodeEmitter |
6563 | #endif |
6564 | ::emitCastAP(PrimType T0, uint32_t A0, const SourceInfo &I) { |
6565 | switch (T0) { |
6566 | case PT_Sint8: |
6567 | return emitCastAPSint8(A0, I); |
6568 | case PT_Uint8: |
6569 | return emitCastAPUint8(A0, I); |
6570 | case PT_Sint16: |
6571 | return emitCastAPSint16(A0, I); |
6572 | case PT_Uint16: |
6573 | return emitCastAPUint16(A0, I); |
6574 | case PT_Sint32: |
6575 | return emitCastAPSint32(A0, I); |
6576 | case PT_Uint32: |
6577 | return emitCastAPUint32(A0, I); |
6578 | case PT_Sint64: |
6579 | return emitCastAPSint64(A0, I); |
6580 | case PT_Uint64: |
6581 | return emitCastAPUint64(A0, I); |
6582 | case PT_IntAP: |
6583 | return emitCastAPIntAP(A0, I); |
6584 | case PT_IntAPS: |
6585 | return emitCastAPIntAPS(A0, I); |
6586 | case PT_Bool: |
6587 | return emitCastAPBool(A0, I); |
6588 | case PT_FixedPoint: |
6589 | return emitCastAPFixedPoint(A0, I); |
6590 | default: llvm_unreachable("invalid type: emitCastAP" ); |
6591 | } |
6592 | llvm_unreachable("invalid enum value" ); |
6593 | } |
6594 | #endif |
6595 | #ifdef GET_LINK_IMPL |
6596 | bool ByteCodeEmitter::emitCastAPSint8( uint32_t A0, const SourceInfo &L) { |
6597 | return emitOp<uint32_t>(OP_CastAPSint8, A0, L); |
6598 | } |
6599 | bool ByteCodeEmitter::emitCastAPUint8( uint32_t A0, const SourceInfo &L) { |
6600 | return emitOp<uint32_t>(OP_CastAPUint8, A0, L); |
6601 | } |
6602 | bool ByteCodeEmitter::emitCastAPSint16( uint32_t A0, const SourceInfo &L) { |
6603 | return emitOp<uint32_t>(OP_CastAPSint16, A0, L); |
6604 | } |
6605 | bool ByteCodeEmitter::emitCastAPUint16( uint32_t A0, const SourceInfo &L) { |
6606 | return emitOp<uint32_t>(OP_CastAPUint16, A0, L); |
6607 | } |
6608 | bool ByteCodeEmitter::emitCastAPSint32( uint32_t A0, const SourceInfo &L) { |
6609 | return emitOp<uint32_t>(OP_CastAPSint32, A0, L); |
6610 | } |
6611 | bool ByteCodeEmitter::emitCastAPUint32( uint32_t A0, const SourceInfo &L) { |
6612 | return emitOp<uint32_t>(OP_CastAPUint32, A0, L); |
6613 | } |
6614 | bool ByteCodeEmitter::emitCastAPSint64( uint32_t A0, const SourceInfo &L) { |
6615 | return emitOp<uint32_t>(OP_CastAPSint64, A0, L); |
6616 | } |
6617 | bool ByteCodeEmitter::emitCastAPUint64( uint32_t A0, const SourceInfo &L) { |
6618 | return emitOp<uint32_t>(OP_CastAPUint64, A0, L); |
6619 | } |
6620 | bool ByteCodeEmitter::emitCastAPIntAP( uint32_t A0, const SourceInfo &L) { |
6621 | return emitOp<uint32_t>(OP_CastAPIntAP, A0, L); |
6622 | } |
6623 | bool ByteCodeEmitter::emitCastAPIntAPS( uint32_t A0, const SourceInfo &L) { |
6624 | return emitOp<uint32_t>(OP_CastAPIntAPS, A0, L); |
6625 | } |
6626 | bool ByteCodeEmitter::emitCastAPBool( uint32_t A0, const SourceInfo &L) { |
6627 | return emitOp<uint32_t>(OP_CastAPBool, A0, L); |
6628 | } |
6629 | bool ByteCodeEmitter::emitCastAPFixedPoint( uint32_t A0, const SourceInfo &L) { |
6630 | return emitOp<uint32_t>(OP_CastAPFixedPoint, A0, L); |
6631 | } |
6632 | #endif |
6633 | #ifdef GET_EVAL_IMPL |
6634 | bool EvalEmitter::emitCastAPSint8( uint32_t A0, const SourceInfo &L) { |
6635 | if (!isActive()) return true; |
6636 | CurrentSource = L; |
6637 | return CastAP<PT_Sint8>(S, OpPC, A0); |
6638 | } |
6639 | bool EvalEmitter::emitCastAPUint8( uint32_t A0, const SourceInfo &L) { |
6640 | if (!isActive()) return true; |
6641 | CurrentSource = L; |
6642 | return CastAP<PT_Uint8>(S, OpPC, A0); |
6643 | } |
6644 | bool EvalEmitter::emitCastAPSint16( uint32_t A0, const SourceInfo &L) { |
6645 | if (!isActive()) return true; |
6646 | CurrentSource = L; |
6647 | return CastAP<PT_Sint16>(S, OpPC, A0); |
6648 | } |
6649 | bool EvalEmitter::emitCastAPUint16( uint32_t A0, const SourceInfo &L) { |
6650 | if (!isActive()) return true; |
6651 | CurrentSource = L; |
6652 | return CastAP<PT_Uint16>(S, OpPC, A0); |
6653 | } |
6654 | bool EvalEmitter::emitCastAPSint32( uint32_t A0, const SourceInfo &L) { |
6655 | if (!isActive()) return true; |
6656 | CurrentSource = L; |
6657 | return CastAP<PT_Sint32>(S, OpPC, A0); |
6658 | } |
6659 | bool EvalEmitter::emitCastAPUint32( uint32_t A0, const SourceInfo &L) { |
6660 | if (!isActive()) return true; |
6661 | CurrentSource = L; |
6662 | return CastAP<PT_Uint32>(S, OpPC, A0); |
6663 | } |
6664 | bool EvalEmitter::emitCastAPSint64( uint32_t A0, const SourceInfo &L) { |
6665 | if (!isActive()) return true; |
6666 | CurrentSource = L; |
6667 | return CastAP<PT_Sint64>(S, OpPC, A0); |
6668 | } |
6669 | bool EvalEmitter::emitCastAPUint64( uint32_t A0, const SourceInfo &L) { |
6670 | if (!isActive()) return true; |
6671 | CurrentSource = L; |
6672 | return CastAP<PT_Uint64>(S, OpPC, A0); |
6673 | } |
6674 | bool EvalEmitter::emitCastAPIntAP( uint32_t A0, const SourceInfo &L) { |
6675 | if (!isActive()) return true; |
6676 | CurrentSource = L; |
6677 | return CastAP<PT_IntAP>(S, OpPC, A0); |
6678 | } |
6679 | bool EvalEmitter::emitCastAPIntAPS( uint32_t A0, const SourceInfo &L) { |
6680 | if (!isActive()) return true; |
6681 | CurrentSource = L; |
6682 | return CastAP<PT_IntAPS>(S, OpPC, A0); |
6683 | } |
6684 | bool EvalEmitter::emitCastAPBool( uint32_t A0, const SourceInfo &L) { |
6685 | if (!isActive()) return true; |
6686 | CurrentSource = L; |
6687 | return CastAP<PT_Bool>(S, OpPC, A0); |
6688 | } |
6689 | bool EvalEmitter::emitCastAPFixedPoint( uint32_t A0, const SourceInfo &L) { |
6690 | if (!isActive()) return true; |
6691 | CurrentSource = L; |
6692 | return CastAP<PT_FixedPoint>(S, OpPC, A0); |
6693 | } |
6694 | #endif |
6695 | #ifdef GET_OPCODE_NAMES |
6696 | OP_CastAPSSint8, |
6697 | OP_CastAPSUint8, |
6698 | OP_CastAPSSint16, |
6699 | OP_CastAPSUint16, |
6700 | OP_CastAPSSint32, |
6701 | OP_CastAPSUint32, |
6702 | OP_CastAPSSint64, |
6703 | OP_CastAPSUint64, |
6704 | OP_CastAPSIntAP, |
6705 | OP_CastAPSIntAPS, |
6706 | OP_CastAPSBool, |
6707 | OP_CastAPSFixedPoint, |
6708 | #endif |
6709 | #ifdef GET_INTERP |
6710 | case OP_CastAPSSint8: { |
6711 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6712 | if (!CastAPS<PT_Sint8>(S, OpPC, V0)) |
6713 | return false; |
6714 | continue; |
6715 | } |
6716 | case OP_CastAPSUint8: { |
6717 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6718 | if (!CastAPS<PT_Uint8>(S, OpPC, V0)) |
6719 | return false; |
6720 | continue; |
6721 | } |
6722 | case OP_CastAPSSint16: { |
6723 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6724 | if (!CastAPS<PT_Sint16>(S, OpPC, V0)) |
6725 | return false; |
6726 | continue; |
6727 | } |
6728 | case OP_CastAPSUint16: { |
6729 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6730 | if (!CastAPS<PT_Uint16>(S, OpPC, V0)) |
6731 | return false; |
6732 | continue; |
6733 | } |
6734 | case OP_CastAPSSint32: { |
6735 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6736 | if (!CastAPS<PT_Sint32>(S, OpPC, V0)) |
6737 | return false; |
6738 | continue; |
6739 | } |
6740 | case OP_CastAPSUint32: { |
6741 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6742 | if (!CastAPS<PT_Uint32>(S, OpPC, V0)) |
6743 | return false; |
6744 | continue; |
6745 | } |
6746 | case OP_CastAPSSint64: { |
6747 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6748 | if (!CastAPS<PT_Sint64>(S, OpPC, V0)) |
6749 | return false; |
6750 | continue; |
6751 | } |
6752 | case OP_CastAPSUint64: { |
6753 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6754 | if (!CastAPS<PT_Uint64>(S, OpPC, V0)) |
6755 | return false; |
6756 | continue; |
6757 | } |
6758 | case OP_CastAPSIntAP: { |
6759 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6760 | if (!CastAPS<PT_IntAP>(S, OpPC, V0)) |
6761 | return false; |
6762 | continue; |
6763 | } |
6764 | case OP_CastAPSIntAPS: { |
6765 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6766 | if (!CastAPS<PT_IntAPS>(S, OpPC, V0)) |
6767 | return false; |
6768 | continue; |
6769 | } |
6770 | case OP_CastAPSBool: { |
6771 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6772 | if (!CastAPS<PT_Bool>(S, OpPC, V0)) |
6773 | return false; |
6774 | continue; |
6775 | } |
6776 | case OP_CastAPSFixedPoint: { |
6777 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6778 | if (!CastAPS<PT_FixedPoint>(S, OpPC, V0)) |
6779 | return false; |
6780 | continue; |
6781 | } |
6782 | #endif |
6783 | #ifdef GET_DISASM |
6784 | case OP_CastAPSSint8: |
6785 | Text.Op = PrintName("CastAPSSint8" ); |
6786 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6787 | break; |
6788 | case OP_CastAPSUint8: |
6789 | Text.Op = PrintName("CastAPSUint8" ); |
6790 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6791 | break; |
6792 | case OP_CastAPSSint16: |
6793 | Text.Op = PrintName("CastAPSSint16" ); |
6794 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6795 | break; |
6796 | case OP_CastAPSUint16: |
6797 | Text.Op = PrintName("CastAPSUint16" ); |
6798 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6799 | break; |
6800 | case OP_CastAPSSint32: |
6801 | Text.Op = PrintName("CastAPSSint32" ); |
6802 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6803 | break; |
6804 | case OP_CastAPSUint32: |
6805 | Text.Op = PrintName("CastAPSUint32" ); |
6806 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6807 | break; |
6808 | case OP_CastAPSSint64: |
6809 | Text.Op = PrintName("CastAPSSint64" ); |
6810 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6811 | break; |
6812 | case OP_CastAPSUint64: |
6813 | Text.Op = PrintName("CastAPSUint64" ); |
6814 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6815 | break; |
6816 | case OP_CastAPSIntAP: |
6817 | Text.Op = PrintName("CastAPSIntAP" ); |
6818 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6819 | break; |
6820 | case OP_CastAPSIntAPS: |
6821 | Text.Op = PrintName("CastAPSIntAPS" ); |
6822 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6823 | break; |
6824 | case OP_CastAPSBool: |
6825 | Text.Op = PrintName("CastAPSBool" ); |
6826 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6827 | break; |
6828 | case OP_CastAPSFixedPoint: |
6829 | Text.Op = PrintName("CastAPSFixedPoint" ); |
6830 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
6831 | break; |
6832 | #endif |
6833 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6834 | bool emitCastAPSSint8( uint32_t , const SourceInfo &); |
6835 | bool emitCastAPSUint8( uint32_t , const SourceInfo &); |
6836 | bool emitCastAPSSint16( uint32_t , const SourceInfo &); |
6837 | bool emitCastAPSUint16( uint32_t , const SourceInfo &); |
6838 | bool emitCastAPSSint32( uint32_t , const SourceInfo &); |
6839 | bool emitCastAPSUint32( uint32_t , const SourceInfo &); |
6840 | bool emitCastAPSSint64( uint32_t , const SourceInfo &); |
6841 | bool emitCastAPSUint64( uint32_t , const SourceInfo &); |
6842 | bool emitCastAPSIntAP( uint32_t , const SourceInfo &); |
6843 | bool emitCastAPSIntAPS( uint32_t , const SourceInfo &); |
6844 | bool emitCastAPSBool( uint32_t , const SourceInfo &); |
6845 | bool emitCastAPSFixedPoint( uint32_t , const SourceInfo &); |
6846 | #endif |
6847 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6848 | [[nodiscard]] bool emitCastAPS(PrimType, uint32_t, const SourceInfo &I); |
6849 | #endif |
6850 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
6851 | bool |
6852 | #if defined(GET_EVAL_IMPL) |
6853 | EvalEmitter |
6854 | #else |
6855 | ByteCodeEmitter |
6856 | #endif |
6857 | ::emitCastAPS(PrimType T0, uint32_t A0, const SourceInfo &I) { |
6858 | switch (T0) { |
6859 | case PT_Sint8: |
6860 | return emitCastAPSSint8(A0, I); |
6861 | case PT_Uint8: |
6862 | return emitCastAPSUint8(A0, I); |
6863 | case PT_Sint16: |
6864 | return emitCastAPSSint16(A0, I); |
6865 | case PT_Uint16: |
6866 | return emitCastAPSUint16(A0, I); |
6867 | case PT_Sint32: |
6868 | return emitCastAPSSint32(A0, I); |
6869 | case PT_Uint32: |
6870 | return emitCastAPSUint32(A0, I); |
6871 | case PT_Sint64: |
6872 | return emitCastAPSSint64(A0, I); |
6873 | case PT_Uint64: |
6874 | return emitCastAPSUint64(A0, I); |
6875 | case PT_IntAP: |
6876 | return emitCastAPSIntAP(A0, I); |
6877 | case PT_IntAPS: |
6878 | return emitCastAPSIntAPS(A0, I); |
6879 | case PT_Bool: |
6880 | return emitCastAPSBool(A0, I); |
6881 | case PT_FixedPoint: |
6882 | return emitCastAPSFixedPoint(A0, I); |
6883 | default: llvm_unreachable("invalid type: emitCastAPS" ); |
6884 | } |
6885 | llvm_unreachable("invalid enum value" ); |
6886 | } |
6887 | #endif |
6888 | #ifdef GET_LINK_IMPL |
6889 | bool ByteCodeEmitter::emitCastAPSSint8( uint32_t A0, const SourceInfo &L) { |
6890 | return emitOp<uint32_t>(OP_CastAPSSint8, A0, L); |
6891 | } |
6892 | bool ByteCodeEmitter::emitCastAPSUint8( uint32_t A0, const SourceInfo &L) { |
6893 | return emitOp<uint32_t>(OP_CastAPSUint8, A0, L); |
6894 | } |
6895 | bool ByteCodeEmitter::emitCastAPSSint16( uint32_t A0, const SourceInfo &L) { |
6896 | return emitOp<uint32_t>(OP_CastAPSSint16, A0, L); |
6897 | } |
6898 | bool ByteCodeEmitter::emitCastAPSUint16( uint32_t A0, const SourceInfo &L) { |
6899 | return emitOp<uint32_t>(OP_CastAPSUint16, A0, L); |
6900 | } |
6901 | bool ByteCodeEmitter::emitCastAPSSint32( uint32_t A0, const SourceInfo &L) { |
6902 | return emitOp<uint32_t>(OP_CastAPSSint32, A0, L); |
6903 | } |
6904 | bool ByteCodeEmitter::emitCastAPSUint32( uint32_t A0, const SourceInfo &L) { |
6905 | return emitOp<uint32_t>(OP_CastAPSUint32, A0, L); |
6906 | } |
6907 | bool ByteCodeEmitter::emitCastAPSSint64( uint32_t A0, const SourceInfo &L) { |
6908 | return emitOp<uint32_t>(OP_CastAPSSint64, A0, L); |
6909 | } |
6910 | bool ByteCodeEmitter::emitCastAPSUint64( uint32_t A0, const SourceInfo &L) { |
6911 | return emitOp<uint32_t>(OP_CastAPSUint64, A0, L); |
6912 | } |
6913 | bool ByteCodeEmitter::emitCastAPSIntAP( uint32_t A0, const SourceInfo &L) { |
6914 | return emitOp<uint32_t>(OP_CastAPSIntAP, A0, L); |
6915 | } |
6916 | bool ByteCodeEmitter::emitCastAPSIntAPS( uint32_t A0, const SourceInfo &L) { |
6917 | return emitOp<uint32_t>(OP_CastAPSIntAPS, A0, L); |
6918 | } |
6919 | bool ByteCodeEmitter::emitCastAPSBool( uint32_t A0, const SourceInfo &L) { |
6920 | return emitOp<uint32_t>(OP_CastAPSBool, A0, L); |
6921 | } |
6922 | bool ByteCodeEmitter::emitCastAPSFixedPoint( uint32_t A0, const SourceInfo &L) { |
6923 | return emitOp<uint32_t>(OP_CastAPSFixedPoint, A0, L); |
6924 | } |
6925 | #endif |
6926 | #ifdef GET_EVAL_IMPL |
6927 | bool EvalEmitter::emitCastAPSSint8( uint32_t A0, const SourceInfo &L) { |
6928 | if (!isActive()) return true; |
6929 | CurrentSource = L; |
6930 | return CastAPS<PT_Sint8>(S, OpPC, A0); |
6931 | } |
6932 | bool EvalEmitter::emitCastAPSUint8( uint32_t A0, const SourceInfo &L) { |
6933 | if (!isActive()) return true; |
6934 | CurrentSource = L; |
6935 | return CastAPS<PT_Uint8>(S, OpPC, A0); |
6936 | } |
6937 | bool EvalEmitter::emitCastAPSSint16( uint32_t A0, const SourceInfo &L) { |
6938 | if (!isActive()) return true; |
6939 | CurrentSource = L; |
6940 | return CastAPS<PT_Sint16>(S, OpPC, A0); |
6941 | } |
6942 | bool EvalEmitter::emitCastAPSUint16( uint32_t A0, const SourceInfo &L) { |
6943 | if (!isActive()) return true; |
6944 | CurrentSource = L; |
6945 | return CastAPS<PT_Uint16>(S, OpPC, A0); |
6946 | } |
6947 | bool EvalEmitter::emitCastAPSSint32( uint32_t A0, const SourceInfo &L) { |
6948 | if (!isActive()) return true; |
6949 | CurrentSource = L; |
6950 | return CastAPS<PT_Sint32>(S, OpPC, A0); |
6951 | } |
6952 | bool EvalEmitter::emitCastAPSUint32( uint32_t A0, const SourceInfo &L) { |
6953 | if (!isActive()) return true; |
6954 | CurrentSource = L; |
6955 | return CastAPS<PT_Uint32>(S, OpPC, A0); |
6956 | } |
6957 | bool EvalEmitter::emitCastAPSSint64( uint32_t A0, const SourceInfo &L) { |
6958 | if (!isActive()) return true; |
6959 | CurrentSource = L; |
6960 | return CastAPS<PT_Sint64>(S, OpPC, A0); |
6961 | } |
6962 | bool EvalEmitter::emitCastAPSUint64( uint32_t A0, const SourceInfo &L) { |
6963 | if (!isActive()) return true; |
6964 | CurrentSource = L; |
6965 | return CastAPS<PT_Uint64>(S, OpPC, A0); |
6966 | } |
6967 | bool EvalEmitter::emitCastAPSIntAP( uint32_t A0, const SourceInfo &L) { |
6968 | if (!isActive()) return true; |
6969 | CurrentSource = L; |
6970 | return CastAPS<PT_IntAP>(S, OpPC, A0); |
6971 | } |
6972 | bool EvalEmitter::emitCastAPSIntAPS( uint32_t A0, const SourceInfo &L) { |
6973 | if (!isActive()) return true; |
6974 | CurrentSource = L; |
6975 | return CastAPS<PT_IntAPS>(S, OpPC, A0); |
6976 | } |
6977 | bool EvalEmitter::emitCastAPSBool( uint32_t A0, const SourceInfo &L) { |
6978 | if (!isActive()) return true; |
6979 | CurrentSource = L; |
6980 | return CastAPS<PT_Bool>(S, OpPC, A0); |
6981 | } |
6982 | bool EvalEmitter::emitCastAPSFixedPoint( uint32_t A0, const SourceInfo &L) { |
6983 | if (!isActive()) return true; |
6984 | CurrentSource = L; |
6985 | return CastAPS<PT_FixedPoint>(S, OpPC, A0); |
6986 | } |
6987 | #endif |
6988 | #ifdef GET_OPCODE_NAMES |
6989 | OP_CastFP, |
6990 | #endif |
6991 | #ifdef GET_INTERP |
6992 | case OP_CastFP: { |
6993 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6994 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6995 | if (!CastFP(S, OpPC, V0, V1)) |
6996 | return false; |
6997 | continue; |
6998 | } |
6999 | #endif |
7000 | #ifdef GET_DISASM |
7001 | case OP_CastFP: |
7002 | Text.Op = PrintName("CastFP" ); |
7003 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7004 | Text.Args.push_back(printArg<llvm::RoundingMode>(P, PC)); |
7005 | break; |
7006 | #endif |
7007 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7008 | bool emitCastFP( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
7009 | #endif |
7010 | #ifdef GET_LINK_IMPL |
7011 | bool ByteCodeEmitter::emitCastFP( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
7012 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastFP, A0, A1, L); |
7013 | } |
7014 | #endif |
7015 | #ifdef GET_EVAL_IMPL |
7016 | bool EvalEmitter::emitCastFP( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
7017 | if (!isActive()) return true; |
7018 | CurrentSource = L; |
7019 | return CastFP(S, OpPC, A0, A1); |
7020 | } |
7021 | #endif |
7022 | #ifdef GET_OPCODE_NAMES |
7023 | OP_CastFixedPoint, |
7024 | #endif |
7025 | #ifdef GET_INTERP |
7026 | case OP_CastFixedPoint: { |
7027 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7028 | if (!CastFixedPoint(S, OpPC, V0)) |
7029 | return false; |
7030 | continue; |
7031 | } |
7032 | #endif |
7033 | #ifdef GET_DISASM |
7034 | case OP_CastFixedPoint: |
7035 | Text.Op = PrintName("CastFixedPoint" ); |
7036 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7037 | break; |
7038 | #endif |
7039 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7040 | bool emitCastFixedPoint( uint32_t , const SourceInfo &); |
7041 | #endif |
7042 | #ifdef GET_LINK_IMPL |
7043 | bool ByteCodeEmitter::emitCastFixedPoint( uint32_t A0, const SourceInfo &L) { |
7044 | return emitOp<uint32_t>(OP_CastFixedPoint, A0, L); |
7045 | } |
7046 | #endif |
7047 | #ifdef GET_EVAL_IMPL |
7048 | bool EvalEmitter::emitCastFixedPoint( uint32_t A0, const SourceInfo &L) { |
7049 | if (!isActive()) return true; |
7050 | CurrentSource = L; |
7051 | return CastFixedPoint(S, OpPC, A0); |
7052 | } |
7053 | #endif |
7054 | #ifdef GET_OPCODE_NAMES |
7055 | OP_CastFixedPointFloating, |
7056 | #endif |
7057 | #ifdef GET_INTERP |
7058 | case OP_CastFixedPointFloating: { |
7059 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7060 | if (!CastFixedPointFloating(S, OpPC, V0)) |
7061 | return false; |
7062 | continue; |
7063 | } |
7064 | #endif |
7065 | #ifdef GET_DISASM |
7066 | case OP_CastFixedPointFloating: |
7067 | Text.Op = PrintName("CastFixedPointFloating" ); |
7068 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7069 | break; |
7070 | #endif |
7071 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7072 | bool emitCastFixedPointFloating( const llvm::fltSemantics * , const SourceInfo &); |
7073 | #endif |
7074 | #ifdef GET_LINK_IMPL |
7075 | bool ByteCodeEmitter::emitCastFixedPointFloating( const llvm::fltSemantics * A0, const SourceInfo &L) { |
7076 | return emitOp<const llvm::fltSemantics *>(OP_CastFixedPointFloating, A0, L); |
7077 | } |
7078 | #endif |
7079 | #ifdef GET_EVAL_IMPL |
7080 | bool EvalEmitter::emitCastFixedPointFloating( const llvm::fltSemantics * A0, const SourceInfo &L) { |
7081 | if (!isActive()) return true; |
7082 | CurrentSource = L; |
7083 | return CastFixedPointFloating(S, OpPC, A0); |
7084 | } |
7085 | #endif |
7086 | #ifdef GET_OPCODE_NAMES |
7087 | OP_CastFixedPointIntegralSint8, |
7088 | OP_CastFixedPointIntegralUint8, |
7089 | OP_CastFixedPointIntegralSint16, |
7090 | OP_CastFixedPointIntegralUint16, |
7091 | OP_CastFixedPointIntegralSint32, |
7092 | OP_CastFixedPointIntegralUint32, |
7093 | OP_CastFixedPointIntegralSint64, |
7094 | OP_CastFixedPointIntegralUint64, |
7095 | #endif |
7096 | #ifdef GET_INTERP |
7097 | case OP_CastFixedPointIntegralSint8: { |
7098 | if (!CastFixedPointIntegral<PT_Sint8>(S, OpPC)) |
7099 | return false; |
7100 | continue; |
7101 | } |
7102 | case OP_CastFixedPointIntegralUint8: { |
7103 | if (!CastFixedPointIntegral<PT_Uint8>(S, OpPC)) |
7104 | return false; |
7105 | continue; |
7106 | } |
7107 | case OP_CastFixedPointIntegralSint16: { |
7108 | if (!CastFixedPointIntegral<PT_Sint16>(S, OpPC)) |
7109 | return false; |
7110 | continue; |
7111 | } |
7112 | case OP_CastFixedPointIntegralUint16: { |
7113 | if (!CastFixedPointIntegral<PT_Uint16>(S, OpPC)) |
7114 | return false; |
7115 | continue; |
7116 | } |
7117 | case OP_CastFixedPointIntegralSint32: { |
7118 | if (!CastFixedPointIntegral<PT_Sint32>(S, OpPC)) |
7119 | return false; |
7120 | continue; |
7121 | } |
7122 | case OP_CastFixedPointIntegralUint32: { |
7123 | if (!CastFixedPointIntegral<PT_Uint32>(S, OpPC)) |
7124 | return false; |
7125 | continue; |
7126 | } |
7127 | case OP_CastFixedPointIntegralSint64: { |
7128 | if (!CastFixedPointIntegral<PT_Sint64>(S, OpPC)) |
7129 | return false; |
7130 | continue; |
7131 | } |
7132 | case OP_CastFixedPointIntegralUint64: { |
7133 | if (!CastFixedPointIntegral<PT_Uint64>(S, OpPC)) |
7134 | return false; |
7135 | continue; |
7136 | } |
7137 | #endif |
7138 | #ifdef GET_DISASM |
7139 | case OP_CastFixedPointIntegralSint8: |
7140 | Text.Op = PrintName("CastFixedPointIntegralSint8" ); |
7141 | break; |
7142 | case OP_CastFixedPointIntegralUint8: |
7143 | Text.Op = PrintName("CastFixedPointIntegralUint8" ); |
7144 | break; |
7145 | case OP_CastFixedPointIntegralSint16: |
7146 | Text.Op = PrintName("CastFixedPointIntegralSint16" ); |
7147 | break; |
7148 | case OP_CastFixedPointIntegralUint16: |
7149 | Text.Op = PrintName("CastFixedPointIntegralUint16" ); |
7150 | break; |
7151 | case OP_CastFixedPointIntegralSint32: |
7152 | Text.Op = PrintName("CastFixedPointIntegralSint32" ); |
7153 | break; |
7154 | case OP_CastFixedPointIntegralUint32: |
7155 | Text.Op = PrintName("CastFixedPointIntegralUint32" ); |
7156 | break; |
7157 | case OP_CastFixedPointIntegralSint64: |
7158 | Text.Op = PrintName("CastFixedPointIntegralSint64" ); |
7159 | break; |
7160 | case OP_CastFixedPointIntegralUint64: |
7161 | Text.Op = PrintName("CastFixedPointIntegralUint64" ); |
7162 | break; |
7163 | #endif |
7164 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7165 | bool emitCastFixedPointIntegralSint8(const SourceInfo &); |
7166 | bool emitCastFixedPointIntegralUint8(const SourceInfo &); |
7167 | bool emitCastFixedPointIntegralSint16(const SourceInfo &); |
7168 | bool emitCastFixedPointIntegralUint16(const SourceInfo &); |
7169 | bool emitCastFixedPointIntegralSint32(const SourceInfo &); |
7170 | bool emitCastFixedPointIntegralUint32(const SourceInfo &); |
7171 | bool emitCastFixedPointIntegralSint64(const SourceInfo &); |
7172 | bool emitCastFixedPointIntegralUint64(const SourceInfo &); |
7173 | #endif |
7174 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7175 | [[nodiscard]] bool emitCastFixedPointIntegral(PrimType, const SourceInfo &I); |
7176 | #endif |
7177 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
7178 | bool |
7179 | #if defined(GET_EVAL_IMPL) |
7180 | EvalEmitter |
7181 | #else |
7182 | ByteCodeEmitter |
7183 | #endif |
7184 | ::emitCastFixedPointIntegral(PrimType T0, const SourceInfo &I) { |
7185 | switch (T0) { |
7186 | case PT_Sint8: |
7187 | return emitCastFixedPointIntegralSint8(I); |
7188 | case PT_Uint8: |
7189 | return emitCastFixedPointIntegralUint8(I); |
7190 | case PT_Sint16: |
7191 | return emitCastFixedPointIntegralSint16(I); |
7192 | case PT_Uint16: |
7193 | return emitCastFixedPointIntegralUint16(I); |
7194 | case PT_Sint32: |
7195 | return emitCastFixedPointIntegralSint32(I); |
7196 | case PT_Uint32: |
7197 | return emitCastFixedPointIntegralUint32(I); |
7198 | case PT_Sint64: |
7199 | return emitCastFixedPointIntegralSint64(I); |
7200 | case PT_Uint64: |
7201 | return emitCastFixedPointIntegralUint64(I); |
7202 | default: llvm_unreachable("invalid type: emitCastFixedPointIntegral" ); |
7203 | } |
7204 | llvm_unreachable("invalid enum value" ); |
7205 | } |
7206 | #endif |
7207 | #ifdef GET_LINK_IMPL |
7208 | bool ByteCodeEmitter::emitCastFixedPointIntegralSint8(const SourceInfo &L) { |
7209 | return emitOp<>(OP_CastFixedPointIntegralSint8, L); |
7210 | } |
7211 | bool ByteCodeEmitter::emitCastFixedPointIntegralUint8(const SourceInfo &L) { |
7212 | return emitOp<>(OP_CastFixedPointIntegralUint8, L); |
7213 | } |
7214 | bool ByteCodeEmitter::emitCastFixedPointIntegralSint16(const SourceInfo &L) { |
7215 | return emitOp<>(OP_CastFixedPointIntegralSint16, L); |
7216 | } |
7217 | bool ByteCodeEmitter::emitCastFixedPointIntegralUint16(const SourceInfo &L) { |
7218 | return emitOp<>(OP_CastFixedPointIntegralUint16, L); |
7219 | } |
7220 | bool ByteCodeEmitter::emitCastFixedPointIntegralSint32(const SourceInfo &L) { |
7221 | return emitOp<>(OP_CastFixedPointIntegralSint32, L); |
7222 | } |
7223 | bool ByteCodeEmitter::emitCastFixedPointIntegralUint32(const SourceInfo &L) { |
7224 | return emitOp<>(OP_CastFixedPointIntegralUint32, L); |
7225 | } |
7226 | bool ByteCodeEmitter::emitCastFixedPointIntegralSint64(const SourceInfo &L) { |
7227 | return emitOp<>(OP_CastFixedPointIntegralSint64, L); |
7228 | } |
7229 | bool ByteCodeEmitter::emitCastFixedPointIntegralUint64(const SourceInfo &L) { |
7230 | return emitOp<>(OP_CastFixedPointIntegralUint64, L); |
7231 | } |
7232 | #endif |
7233 | #ifdef GET_EVAL_IMPL |
7234 | bool EvalEmitter::emitCastFixedPointIntegralSint8(const SourceInfo &L) { |
7235 | if (!isActive()) return true; |
7236 | CurrentSource = L; |
7237 | return CastFixedPointIntegral<PT_Sint8>(S, OpPC); |
7238 | } |
7239 | bool EvalEmitter::emitCastFixedPointIntegralUint8(const SourceInfo &L) { |
7240 | if (!isActive()) return true; |
7241 | CurrentSource = L; |
7242 | return CastFixedPointIntegral<PT_Uint8>(S, OpPC); |
7243 | } |
7244 | bool EvalEmitter::emitCastFixedPointIntegralSint16(const SourceInfo &L) { |
7245 | if (!isActive()) return true; |
7246 | CurrentSource = L; |
7247 | return CastFixedPointIntegral<PT_Sint16>(S, OpPC); |
7248 | } |
7249 | bool EvalEmitter::emitCastFixedPointIntegralUint16(const SourceInfo &L) { |
7250 | if (!isActive()) return true; |
7251 | CurrentSource = L; |
7252 | return CastFixedPointIntegral<PT_Uint16>(S, OpPC); |
7253 | } |
7254 | bool EvalEmitter::emitCastFixedPointIntegralSint32(const SourceInfo &L) { |
7255 | if (!isActive()) return true; |
7256 | CurrentSource = L; |
7257 | return CastFixedPointIntegral<PT_Sint32>(S, OpPC); |
7258 | } |
7259 | bool EvalEmitter::emitCastFixedPointIntegralUint32(const SourceInfo &L) { |
7260 | if (!isActive()) return true; |
7261 | CurrentSource = L; |
7262 | return CastFixedPointIntegral<PT_Uint32>(S, OpPC); |
7263 | } |
7264 | bool EvalEmitter::emitCastFixedPointIntegralSint64(const SourceInfo &L) { |
7265 | if (!isActive()) return true; |
7266 | CurrentSource = L; |
7267 | return CastFixedPointIntegral<PT_Sint64>(S, OpPC); |
7268 | } |
7269 | bool EvalEmitter::emitCastFixedPointIntegralUint64(const SourceInfo &L) { |
7270 | if (!isActive()) return true; |
7271 | CurrentSource = L; |
7272 | return CastFixedPointIntegral<PT_Uint64>(S, OpPC); |
7273 | } |
7274 | #endif |
7275 | #ifdef GET_OPCODE_NAMES |
7276 | OP_CastFloatingFixedPoint, |
7277 | #endif |
7278 | #ifdef GET_INTERP |
7279 | case OP_CastFloatingFixedPoint: { |
7280 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7281 | if (!CastFloatingFixedPoint(S, OpPC, V0)) |
7282 | return false; |
7283 | continue; |
7284 | } |
7285 | #endif |
7286 | #ifdef GET_DISASM |
7287 | case OP_CastFloatingFixedPoint: |
7288 | Text.Op = PrintName("CastFloatingFixedPoint" ); |
7289 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7290 | break; |
7291 | #endif |
7292 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7293 | bool emitCastFloatingFixedPoint( uint32_t , const SourceInfo &); |
7294 | #endif |
7295 | #ifdef GET_LINK_IMPL |
7296 | bool ByteCodeEmitter::emitCastFloatingFixedPoint( uint32_t A0, const SourceInfo &L) { |
7297 | return emitOp<uint32_t>(OP_CastFloatingFixedPoint, A0, L); |
7298 | } |
7299 | #endif |
7300 | #ifdef GET_EVAL_IMPL |
7301 | bool EvalEmitter::emitCastFloatingFixedPoint( uint32_t A0, const SourceInfo &L) { |
7302 | if (!isActive()) return true; |
7303 | CurrentSource = L; |
7304 | return CastFloatingFixedPoint(S, OpPC, A0); |
7305 | } |
7306 | #endif |
7307 | #ifdef GET_OPCODE_NAMES |
7308 | OP_CastFloatingIntegralSint8, |
7309 | OP_CastFloatingIntegralUint8, |
7310 | OP_CastFloatingIntegralSint16, |
7311 | OP_CastFloatingIntegralUint16, |
7312 | OP_CastFloatingIntegralSint32, |
7313 | OP_CastFloatingIntegralUint32, |
7314 | OP_CastFloatingIntegralSint64, |
7315 | OP_CastFloatingIntegralUint64, |
7316 | OP_CastFloatingIntegralBool, |
7317 | #endif |
7318 | #ifdef GET_INTERP |
7319 | case OP_CastFloatingIntegralSint8: { |
7320 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7321 | if (!CastFloatingIntegral<PT_Sint8>(S, OpPC, V0)) |
7322 | return false; |
7323 | continue; |
7324 | } |
7325 | case OP_CastFloatingIntegralUint8: { |
7326 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7327 | if (!CastFloatingIntegral<PT_Uint8>(S, OpPC, V0)) |
7328 | return false; |
7329 | continue; |
7330 | } |
7331 | case OP_CastFloatingIntegralSint16: { |
7332 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7333 | if (!CastFloatingIntegral<PT_Sint16>(S, OpPC, V0)) |
7334 | return false; |
7335 | continue; |
7336 | } |
7337 | case OP_CastFloatingIntegralUint16: { |
7338 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7339 | if (!CastFloatingIntegral<PT_Uint16>(S, OpPC, V0)) |
7340 | return false; |
7341 | continue; |
7342 | } |
7343 | case OP_CastFloatingIntegralSint32: { |
7344 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7345 | if (!CastFloatingIntegral<PT_Sint32>(S, OpPC, V0)) |
7346 | return false; |
7347 | continue; |
7348 | } |
7349 | case OP_CastFloatingIntegralUint32: { |
7350 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7351 | if (!CastFloatingIntegral<PT_Uint32>(S, OpPC, V0)) |
7352 | return false; |
7353 | continue; |
7354 | } |
7355 | case OP_CastFloatingIntegralSint64: { |
7356 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7357 | if (!CastFloatingIntegral<PT_Sint64>(S, OpPC, V0)) |
7358 | return false; |
7359 | continue; |
7360 | } |
7361 | case OP_CastFloatingIntegralUint64: { |
7362 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7363 | if (!CastFloatingIntegral<PT_Uint64>(S, OpPC, V0)) |
7364 | return false; |
7365 | continue; |
7366 | } |
7367 | case OP_CastFloatingIntegralBool: { |
7368 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7369 | if (!CastFloatingIntegral<PT_Bool>(S, OpPC, V0)) |
7370 | return false; |
7371 | continue; |
7372 | } |
7373 | #endif |
7374 | #ifdef GET_DISASM |
7375 | case OP_CastFloatingIntegralSint8: |
7376 | Text.Op = PrintName("CastFloatingIntegralSint8" ); |
7377 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7378 | break; |
7379 | case OP_CastFloatingIntegralUint8: |
7380 | Text.Op = PrintName("CastFloatingIntegralUint8" ); |
7381 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7382 | break; |
7383 | case OP_CastFloatingIntegralSint16: |
7384 | Text.Op = PrintName("CastFloatingIntegralSint16" ); |
7385 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7386 | break; |
7387 | case OP_CastFloatingIntegralUint16: |
7388 | Text.Op = PrintName("CastFloatingIntegralUint16" ); |
7389 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7390 | break; |
7391 | case OP_CastFloatingIntegralSint32: |
7392 | Text.Op = PrintName("CastFloatingIntegralSint32" ); |
7393 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7394 | break; |
7395 | case OP_CastFloatingIntegralUint32: |
7396 | Text.Op = PrintName("CastFloatingIntegralUint32" ); |
7397 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7398 | break; |
7399 | case OP_CastFloatingIntegralSint64: |
7400 | Text.Op = PrintName("CastFloatingIntegralSint64" ); |
7401 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7402 | break; |
7403 | case OP_CastFloatingIntegralUint64: |
7404 | Text.Op = PrintName("CastFloatingIntegralUint64" ); |
7405 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7406 | break; |
7407 | case OP_CastFloatingIntegralBool: |
7408 | Text.Op = PrintName("CastFloatingIntegralBool" ); |
7409 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7410 | break; |
7411 | #endif |
7412 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7413 | bool emitCastFloatingIntegralSint8( uint32_t , const SourceInfo &); |
7414 | bool emitCastFloatingIntegralUint8( uint32_t , const SourceInfo &); |
7415 | bool emitCastFloatingIntegralSint16( uint32_t , const SourceInfo &); |
7416 | bool emitCastFloatingIntegralUint16( uint32_t , const SourceInfo &); |
7417 | bool emitCastFloatingIntegralSint32( uint32_t , const SourceInfo &); |
7418 | bool emitCastFloatingIntegralUint32( uint32_t , const SourceInfo &); |
7419 | bool emitCastFloatingIntegralSint64( uint32_t , const SourceInfo &); |
7420 | bool emitCastFloatingIntegralUint64( uint32_t , const SourceInfo &); |
7421 | bool emitCastFloatingIntegralBool( uint32_t , const SourceInfo &); |
7422 | #endif |
7423 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7424 | [[nodiscard]] bool emitCastFloatingIntegral(PrimType, uint32_t, const SourceInfo &I); |
7425 | #endif |
7426 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
7427 | bool |
7428 | #if defined(GET_EVAL_IMPL) |
7429 | EvalEmitter |
7430 | #else |
7431 | ByteCodeEmitter |
7432 | #endif |
7433 | ::emitCastFloatingIntegral(PrimType T0, uint32_t A0, const SourceInfo &I) { |
7434 | switch (T0) { |
7435 | case PT_Sint8: |
7436 | return emitCastFloatingIntegralSint8(A0, I); |
7437 | case PT_Uint8: |
7438 | return emitCastFloatingIntegralUint8(A0, I); |
7439 | case PT_Sint16: |
7440 | return emitCastFloatingIntegralSint16(A0, I); |
7441 | case PT_Uint16: |
7442 | return emitCastFloatingIntegralUint16(A0, I); |
7443 | case PT_Sint32: |
7444 | return emitCastFloatingIntegralSint32(A0, I); |
7445 | case PT_Uint32: |
7446 | return emitCastFloatingIntegralUint32(A0, I); |
7447 | case PT_Sint64: |
7448 | return emitCastFloatingIntegralSint64(A0, I); |
7449 | case PT_Uint64: |
7450 | return emitCastFloatingIntegralUint64(A0, I); |
7451 | case PT_Bool: |
7452 | return emitCastFloatingIntegralBool(A0, I); |
7453 | default: llvm_unreachable("invalid type: emitCastFloatingIntegral" ); |
7454 | } |
7455 | llvm_unreachable("invalid enum value" ); |
7456 | } |
7457 | #endif |
7458 | #ifdef GET_LINK_IMPL |
7459 | bool ByteCodeEmitter::emitCastFloatingIntegralSint8( uint32_t A0, const SourceInfo &L) { |
7460 | return emitOp<uint32_t>(OP_CastFloatingIntegralSint8, A0, L); |
7461 | } |
7462 | bool ByteCodeEmitter::emitCastFloatingIntegralUint8( uint32_t A0, const SourceInfo &L) { |
7463 | return emitOp<uint32_t>(OP_CastFloatingIntegralUint8, A0, L); |
7464 | } |
7465 | bool ByteCodeEmitter::emitCastFloatingIntegralSint16( uint32_t A0, const SourceInfo &L) { |
7466 | return emitOp<uint32_t>(OP_CastFloatingIntegralSint16, A0, L); |
7467 | } |
7468 | bool ByteCodeEmitter::emitCastFloatingIntegralUint16( uint32_t A0, const SourceInfo &L) { |
7469 | return emitOp<uint32_t>(OP_CastFloatingIntegralUint16, A0, L); |
7470 | } |
7471 | bool ByteCodeEmitter::emitCastFloatingIntegralSint32( uint32_t A0, const SourceInfo &L) { |
7472 | return emitOp<uint32_t>(OP_CastFloatingIntegralSint32, A0, L); |
7473 | } |
7474 | bool ByteCodeEmitter::emitCastFloatingIntegralUint32( uint32_t A0, const SourceInfo &L) { |
7475 | return emitOp<uint32_t>(OP_CastFloatingIntegralUint32, A0, L); |
7476 | } |
7477 | bool ByteCodeEmitter::emitCastFloatingIntegralSint64( uint32_t A0, const SourceInfo &L) { |
7478 | return emitOp<uint32_t>(OP_CastFloatingIntegralSint64, A0, L); |
7479 | } |
7480 | bool ByteCodeEmitter::emitCastFloatingIntegralUint64( uint32_t A0, const SourceInfo &L) { |
7481 | return emitOp<uint32_t>(OP_CastFloatingIntegralUint64, A0, L); |
7482 | } |
7483 | bool ByteCodeEmitter::emitCastFloatingIntegralBool( uint32_t A0, const SourceInfo &L) { |
7484 | return emitOp<uint32_t>(OP_CastFloatingIntegralBool, A0, L); |
7485 | } |
7486 | #endif |
7487 | #ifdef GET_EVAL_IMPL |
7488 | bool EvalEmitter::emitCastFloatingIntegralSint8( uint32_t A0, const SourceInfo &L) { |
7489 | if (!isActive()) return true; |
7490 | CurrentSource = L; |
7491 | return CastFloatingIntegral<PT_Sint8>(S, OpPC, A0); |
7492 | } |
7493 | bool EvalEmitter::emitCastFloatingIntegralUint8( uint32_t A0, const SourceInfo &L) { |
7494 | if (!isActive()) return true; |
7495 | CurrentSource = L; |
7496 | return CastFloatingIntegral<PT_Uint8>(S, OpPC, A0); |
7497 | } |
7498 | bool EvalEmitter::emitCastFloatingIntegralSint16( uint32_t A0, const SourceInfo &L) { |
7499 | if (!isActive()) return true; |
7500 | CurrentSource = L; |
7501 | return CastFloatingIntegral<PT_Sint16>(S, OpPC, A0); |
7502 | } |
7503 | bool EvalEmitter::emitCastFloatingIntegralUint16( uint32_t A0, const SourceInfo &L) { |
7504 | if (!isActive()) return true; |
7505 | CurrentSource = L; |
7506 | return CastFloatingIntegral<PT_Uint16>(S, OpPC, A0); |
7507 | } |
7508 | bool EvalEmitter::emitCastFloatingIntegralSint32( uint32_t A0, const SourceInfo &L) { |
7509 | if (!isActive()) return true; |
7510 | CurrentSource = L; |
7511 | return CastFloatingIntegral<PT_Sint32>(S, OpPC, A0); |
7512 | } |
7513 | bool EvalEmitter::emitCastFloatingIntegralUint32( uint32_t A0, const SourceInfo &L) { |
7514 | if (!isActive()) return true; |
7515 | CurrentSource = L; |
7516 | return CastFloatingIntegral<PT_Uint32>(S, OpPC, A0); |
7517 | } |
7518 | bool EvalEmitter::emitCastFloatingIntegralSint64( uint32_t A0, const SourceInfo &L) { |
7519 | if (!isActive()) return true; |
7520 | CurrentSource = L; |
7521 | return CastFloatingIntegral<PT_Sint64>(S, OpPC, A0); |
7522 | } |
7523 | bool EvalEmitter::emitCastFloatingIntegralUint64( uint32_t A0, const SourceInfo &L) { |
7524 | if (!isActive()) return true; |
7525 | CurrentSource = L; |
7526 | return CastFloatingIntegral<PT_Uint64>(S, OpPC, A0); |
7527 | } |
7528 | bool EvalEmitter::emitCastFloatingIntegralBool( uint32_t A0, const SourceInfo &L) { |
7529 | if (!isActive()) return true; |
7530 | CurrentSource = L; |
7531 | return CastFloatingIntegral<PT_Bool>(S, OpPC, A0); |
7532 | } |
7533 | #endif |
7534 | #ifdef GET_OPCODE_NAMES |
7535 | OP_CastFloatingIntegralAP, |
7536 | #endif |
7537 | #ifdef GET_INTERP |
7538 | case OP_CastFloatingIntegralAP: { |
7539 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7540 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7541 | if (!CastFloatingIntegralAP(S, OpPC, V0, V1)) |
7542 | return false; |
7543 | continue; |
7544 | } |
7545 | #endif |
7546 | #ifdef GET_DISASM |
7547 | case OP_CastFloatingIntegralAP: |
7548 | Text.Op = PrintName("CastFloatingIntegralAP" ); |
7549 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7550 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7551 | break; |
7552 | #endif |
7553 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7554 | bool emitCastFloatingIntegralAP( uint32_t , uint32_t , const SourceInfo &); |
7555 | #endif |
7556 | #ifdef GET_LINK_IMPL |
7557 | bool ByteCodeEmitter::emitCastFloatingIntegralAP( uint32_t A0, uint32_t A1, const SourceInfo &L) { |
7558 | return emitOp<uint32_t, uint32_t>(OP_CastFloatingIntegralAP, A0, A1, L); |
7559 | } |
7560 | #endif |
7561 | #ifdef GET_EVAL_IMPL |
7562 | bool EvalEmitter::emitCastFloatingIntegralAP( uint32_t A0, uint32_t A1, const SourceInfo &L) { |
7563 | if (!isActive()) return true; |
7564 | CurrentSource = L; |
7565 | return CastFloatingIntegralAP(S, OpPC, A0, A1); |
7566 | } |
7567 | #endif |
7568 | #ifdef GET_OPCODE_NAMES |
7569 | OP_CastFloatingIntegralAPS, |
7570 | #endif |
7571 | #ifdef GET_INTERP |
7572 | case OP_CastFloatingIntegralAPS: { |
7573 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7574 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7575 | if (!CastFloatingIntegralAPS(S, OpPC, V0, V1)) |
7576 | return false; |
7577 | continue; |
7578 | } |
7579 | #endif |
7580 | #ifdef GET_DISASM |
7581 | case OP_CastFloatingIntegralAPS: |
7582 | Text.Op = PrintName("CastFloatingIntegralAPS" ); |
7583 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7584 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7585 | break; |
7586 | #endif |
7587 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7588 | bool emitCastFloatingIntegralAPS( uint32_t , uint32_t , const SourceInfo &); |
7589 | #endif |
7590 | #ifdef GET_LINK_IMPL |
7591 | bool ByteCodeEmitter::emitCastFloatingIntegralAPS( uint32_t A0, uint32_t A1, const SourceInfo &L) { |
7592 | return emitOp<uint32_t, uint32_t>(OP_CastFloatingIntegralAPS, A0, A1, L); |
7593 | } |
7594 | #endif |
7595 | #ifdef GET_EVAL_IMPL |
7596 | bool EvalEmitter::emitCastFloatingIntegralAPS( uint32_t A0, uint32_t A1, const SourceInfo &L) { |
7597 | if (!isActive()) return true; |
7598 | CurrentSource = L; |
7599 | return CastFloatingIntegralAPS(S, OpPC, A0, A1); |
7600 | } |
7601 | #endif |
7602 | #ifdef GET_OPCODE_NAMES |
7603 | OP_CastIntegralFixedPointSint8, |
7604 | OP_CastIntegralFixedPointUint8, |
7605 | OP_CastIntegralFixedPointSint16, |
7606 | OP_CastIntegralFixedPointUint16, |
7607 | OP_CastIntegralFixedPointSint32, |
7608 | OP_CastIntegralFixedPointUint32, |
7609 | OP_CastIntegralFixedPointSint64, |
7610 | OP_CastIntegralFixedPointUint64, |
7611 | OP_CastIntegralFixedPointBool, |
7612 | #endif |
7613 | #ifdef GET_INTERP |
7614 | case OP_CastIntegralFixedPointSint8: { |
7615 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7616 | if (!CastIntegralFixedPoint<PT_Sint8>(S, OpPC, V0)) |
7617 | return false; |
7618 | continue; |
7619 | } |
7620 | case OP_CastIntegralFixedPointUint8: { |
7621 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7622 | if (!CastIntegralFixedPoint<PT_Uint8>(S, OpPC, V0)) |
7623 | return false; |
7624 | continue; |
7625 | } |
7626 | case OP_CastIntegralFixedPointSint16: { |
7627 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7628 | if (!CastIntegralFixedPoint<PT_Sint16>(S, OpPC, V0)) |
7629 | return false; |
7630 | continue; |
7631 | } |
7632 | case OP_CastIntegralFixedPointUint16: { |
7633 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7634 | if (!CastIntegralFixedPoint<PT_Uint16>(S, OpPC, V0)) |
7635 | return false; |
7636 | continue; |
7637 | } |
7638 | case OP_CastIntegralFixedPointSint32: { |
7639 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7640 | if (!CastIntegralFixedPoint<PT_Sint32>(S, OpPC, V0)) |
7641 | return false; |
7642 | continue; |
7643 | } |
7644 | case OP_CastIntegralFixedPointUint32: { |
7645 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7646 | if (!CastIntegralFixedPoint<PT_Uint32>(S, OpPC, V0)) |
7647 | return false; |
7648 | continue; |
7649 | } |
7650 | case OP_CastIntegralFixedPointSint64: { |
7651 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7652 | if (!CastIntegralFixedPoint<PT_Sint64>(S, OpPC, V0)) |
7653 | return false; |
7654 | continue; |
7655 | } |
7656 | case OP_CastIntegralFixedPointUint64: { |
7657 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7658 | if (!CastIntegralFixedPoint<PT_Uint64>(S, OpPC, V0)) |
7659 | return false; |
7660 | continue; |
7661 | } |
7662 | case OP_CastIntegralFixedPointBool: { |
7663 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7664 | if (!CastIntegralFixedPoint<PT_Bool>(S, OpPC, V0)) |
7665 | return false; |
7666 | continue; |
7667 | } |
7668 | #endif |
7669 | #ifdef GET_DISASM |
7670 | case OP_CastIntegralFixedPointSint8: |
7671 | Text.Op = PrintName("CastIntegralFixedPointSint8" ); |
7672 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7673 | break; |
7674 | case OP_CastIntegralFixedPointUint8: |
7675 | Text.Op = PrintName("CastIntegralFixedPointUint8" ); |
7676 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7677 | break; |
7678 | case OP_CastIntegralFixedPointSint16: |
7679 | Text.Op = PrintName("CastIntegralFixedPointSint16" ); |
7680 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7681 | break; |
7682 | case OP_CastIntegralFixedPointUint16: |
7683 | Text.Op = PrintName("CastIntegralFixedPointUint16" ); |
7684 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7685 | break; |
7686 | case OP_CastIntegralFixedPointSint32: |
7687 | Text.Op = PrintName("CastIntegralFixedPointSint32" ); |
7688 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7689 | break; |
7690 | case OP_CastIntegralFixedPointUint32: |
7691 | Text.Op = PrintName("CastIntegralFixedPointUint32" ); |
7692 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7693 | break; |
7694 | case OP_CastIntegralFixedPointSint64: |
7695 | Text.Op = PrintName("CastIntegralFixedPointSint64" ); |
7696 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7697 | break; |
7698 | case OP_CastIntegralFixedPointUint64: |
7699 | Text.Op = PrintName("CastIntegralFixedPointUint64" ); |
7700 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7701 | break; |
7702 | case OP_CastIntegralFixedPointBool: |
7703 | Text.Op = PrintName("CastIntegralFixedPointBool" ); |
7704 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7705 | break; |
7706 | #endif |
7707 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7708 | bool emitCastIntegralFixedPointSint8( uint32_t , const SourceInfo &); |
7709 | bool emitCastIntegralFixedPointUint8( uint32_t , const SourceInfo &); |
7710 | bool emitCastIntegralFixedPointSint16( uint32_t , const SourceInfo &); |
7711 | bool emitCastIntegralFixedPointUint16( uint32_t , const SourceInfo &); |
7712 | bool emitCastIntegralFixedPointSint32( uint32_t , const SourceInfo &); |
7713 | bool emitCastIntegralFixedPointUint32( uint32_t , const SourceInfo &); |
7714 | bool emitCastIntegralFixedPointSint64( uint32_t , const SourceInfo &); |
7715 | bool emitCastIntegralFixedPointUint64( uint32_t , const SourceInfo &); |
7716 | bool emitCastIntegralFixedPointBool( uint32_t , const SourceInfo &); |
7717 | #endif |
7718 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7719 | [[nodiscard]] bool emitCastIntegralFixedPoint(PrimType, uint32_t, const SourceInfo &I); |
7720 | #endif |
7721 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
7722 | bool |
7723 | #if defined(GET_EVAL_IMPL) |
7724 | EvalEmitter |
7725 | #else |
7726 | ByteCodeEmitter |
7727 | #endif |
7728 | ::emitCastIntegralFixedPoint(PrimType T0, uint32_t A0, const SourceInfo &I) { |
7729 | switch (T0) { |
7730 | case PT_Sint8: |
7731 | return emitCastIntegralFixedPointSint8(A0, I); |
7732 | case PT_Uint8: |
7733 | return emitCastIntegralFixedPointUint8(A0, I); |
7734 | case PT_Sint16: |
7735 | return emitCastIntegralFixedPointSint16(A0, I); |
7736 | case PT_Uint16: |
7737 | return emitCastIntegralFixedPointUint16(A0, I); |
7738 | case PT_Sint32: |
7739 | return emitCastIntegralFixedPointSint32(A0, I); |
7740 | case PT_Uint32: |
7741 | return emitCastIntegralFixedPointUint32(A0, I); |
7742 | case PT_Sint64: |
7743 | return emitCastIntegralFixedPointSint64(A0, I); |
7744 | case PT_Uint64: |
7745 | return emitCastIntegralFixedPointUint64(A0, I); |
7746 | case PT_Bool: |
7747 | return emitCastIntegralFixedPointBool(A0, I); |
7748 | default: llvm_unreachable("invalid type: emitCastIntegralFixedPoint" ); |
7749 | } |
7750 | llvm_unreachable("invalid enum value" ); |
7751 | } |
7752 | #endif |
7753 | #ifdef GET_LINK_IMPL |
7754 | bool ByteCodeEmitter::emitCastIntegralFixedPointSint8( uint32_t A0, const SourceInfo &L) { |
7755 | return emitOp<uint32_t>(OP_CastIntegralFixedPointSint8, A0, L); |
7756 | } |
7757 | bool ByteCodeEmitter::emitCastIntegralFixedPointUint8( uint32_t A0, const SourceInfo &L) { |
7758 | return emitOp<uint32_t>(OP_CastIntegralFixedPointUint8, A0, L); |
7759 | } |
7760 | bool ByteCodeEmitter::emitCastIntegralFixedPointSint16( uint32_t A0, const SourceInfo &L) { |
7761 | return emitOp<uint32_t>(OP_CastIntegralFixedPointSint16, A0, L); |
7762 | } |
7763 | bool ByteCodeEmitter::emitCastIntegralFixedPointUint16( uint32_t A0, const SourceInfo &L) { |
7764 | return emitOp<uint32_t>(OP_CastIntegralFixedPointUint16, A0, L); |
7765 | } |
7766 | bool ByteCodeEmitter::emitCastIntegralFixedPointSint32( uint32_t A0, const SourceInfo &L) { |
7767 | return emitOp<uint32_t>(OP_CastIntegralFixedPointSint32, A0, L); |
7768 | } |
7769 | bool ByteCodeEmitter::emitCastIntegralFixedPointUint32( uint32_t A0, const SourceInfo &L) { |
7770 | return emitOp<uint32_t>(OP_CastIntegralFixedPointUint32, A0, L); |
7771 | } |
7772 | bool ByteCodeEmitter::emitCastIntegralFixedPointSint64( uint32_t A0, const SourceInfo &L) { |
7773 | return emitOp<uint32_t>(OP_CastIntegralFixedPointSint64, A0, L); |
7774 | } |
7775 | bool ByteCodeEmitter::emitCastIntegralFixedPointUint64( uint32_t A0, const SourceInfo &L) { |
7776 | return emitOp<uint32_t>(OP_CastIntegralFixedPointUint64, A0, L); |
7777 | } |
7778 | bool ByteCodeEmitter::emitCastIntegralFixedPointBool( uint32_t A0, const SourceInfo &L) { |
7779 | return emitOp<uint32_t>(OP_CastIntegralFixedPointBool, A0, L); |
7780 | } |
7781 | #endif |
7782 | #ifdef GET_EVAL_IMPL |
7783 | bool EvalEmitter::emitCastIntegralFixedPointSint8( uint32_t A0, const SourceInfo &L) { |
7784 | if (!isActive()) return true; |
7785 | CurrentSource = L; |
7786 | return CastIntegralFixedPoint<PT_Sint8>(S, OpPC, A0); |
7787 | } |
7788 | bool EvalEmitter::emitCastIntegralFixedPointUint8( uint32_t A0, const SourceInfo &L) { |
7789 | if (!isActive()) return true; |
7790 | CurrentSource = L; |
7791 | return CastIntegralFixedPoint<PT_Uint8>(S, OpPC, A0); |
7792 | } |
7793 | bool EvalEmitter::emitCastIntegralFixedPointSint16( uint32_t A0, const SourceInfo &L) { |
7794 | if (!isActive()) return true; |
7795 | CurrentSource = L; |
7796 | return CastIntegralFixedPoint<PT_Sint16>(S, OpPC, A0); |
7797 | } |
7798 | bool EvalEmitter::emitCastIntegralFixedPointUint16( uint32_t A0, const SourceInfo &L) { |
7799 | if (!isActive()) return true; |
7800 | CurrentSource = L; |
7801 | return CastIntegralFixedPoint<PT_Uint16>(S, OpPC, A0); |
7802 | } |
7803 | bool EvalEmitter::emitCastIntegralFixedPointSint32( uint32_t A0, const SourceInfo &L) { |
7804 | if (!isActive()) return true; |
7805 | CurrentSource = L; |
7806 | return CastIntegralFixedPoint<PT_Sint32>(S, OpPC, A0); |
7807 | } |
7808 | bool EvalEmitter::emitCastIntegralFixedPointUint32( uint32_t A0, const SourceInfo &L) { |
7809 | if (!isActive()) return true; |
7810 | CurrentSource = L; |
7811 | return CastIntegralFixedPoint<PT_Uint32>(S, OpPC, A0); |
7812 | } |
7813 | bool EvalEmitter::emitCastIntegralFixedPointSint64( uint32_t A0, const SourceInfo &L) { |
7814 | if (!isActive()) return true; |
7815 | CurrentSource = L; |
7816 | return CastIntegralFixedPoint<PT_Sint64>(S, OpPC, A0); |
7817 | } |
7818 | bool EvalEmitter::emitCastIntegralFixedPointUint64( uint32_t A0, const SourceInfo &L) { |
7819 | if (!isActive()) return true; |
7820 | CurrentSource = L; |
7821 | return CastIntegralFixedPoint<PT_Uint64>(S, OpPC, A0); |
7822 | } |
7823 | bool EvalEmitter::emitCastIntegralFixedPointBool( uint32_t A0, const SourceInfo &L) { |
7824 | if (!isActive()) return true; |
7825 | CurrentSource = L; |
7826 | return CastIntegralFixedPoint<PT_Bool>(S, OpPC, A0); |
7827 | } |
7828 | #endif |
7829 | #ifdef GET_OPCODE_NAMES |
7830 | OP_CastIntegralFloatingSint8, |
7831 | OP_CastIntegralFloatingUint8, |
7832 | OP_CastIntegralFloatingSint16, |
7833 | OP_CastIntegralFloatingUint16, |
7834 | OP_CastIntegralFloatingSint32, |
7835 | OP_CastIntegralFloatingUint32, |
7836 | OP_CastIntegralFloatingSint64, |
7837 | OP_CastIntegralFloatingUint64, |
7838 | OP_CastIntegralFloatingIntAP, |
7839 | OP_CastIntegralFloatingIntAPS, |
7840 | OP_CastIntegralFloatingBool, |
7841 | OP_CastIntegralFloatingFixedPoint, |
7842 | #endif |
7843 | #ifdef GET_INTERP |
7844 | case OP_CastIntegralFloatingSint8: { |
7845 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7846 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7847 | if (!CastIntegralFloating<PT_Sint8>(S, OpPC, V0, V1)) |
7848 | return false; |
7849 | continue; |
7850 | } |
7851 | case OP_CastIntegralFloatingUint8: { |
7852 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7853 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7854 | if (!CastIntegralFloating<PT_Uint8>(S, OpPC, V0, V1)) |
7855 | return false; |
7856 | continue; |
7857 | } |
7858 | case OP_CastIntegralFloatingSint16: { |
7859 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7860 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7861 | if (!CastIntegralFloating<PT_Sint16>(S, OpPC, V0, V1)) |
7862 | return false; |
7863 | continue; |
7864 | } |
7865 | case OP_CastIntegralFloatingUint16: { |
7866 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7867 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7868 | if (!CastIntegralFloating<PT_Uint16>(S, OpPC, V0, V1)) |
7869 | return false; |
7870 | continue; |
7871 | } |
7872 | case OP_CastIntegralFloatingSint32: { |
7873 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7874 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7875 | if (!CastIntegralFloating<PT_Sint32>(S, OpPC, V0, V1)) |
7876 | return false; |
7877 | continue; |
7878 | } |
7879 | case OP_CastIntegralFloatingUint32: { |
7880 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7881 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7882 | if (!CastIntegralFloating<PT_Uint32>(S, OpPC, V0, V1)) |
7883 | return false; |
7884 | continue; |
7885 | } |
7886 | case OP_CastIntegralFloatingSint64: { |
7887 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7888 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7889 | if (!CastIntegralFloating<PT_Sint64>(S, OpPC, V0, V1)) |
7890 | return false; |
7891 | continue; |
7892 | } |
7893 | case OP_CastIntegralFloatingUint64: { |
7894 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7895 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7896 | if (!CastIntegralFloating<PT_Uint64>(S, OpPC, V0, V1)) |
7897 | return false; |
7898 | continue; |
7899 | } |
7900 | case OP_CastIntegralFloatingIntAP: { |
7901 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7902 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7903 | if (!CastIntegralFloating<PT_IntAP>(S, OpPC, V0, V1)) |
7904 | return false; |
7905 | continue; |
7906 | } |
7907 | case OP_CastIntegralFloatingIntAPS: { |
7908 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7909 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7910 | if (!CastIntegralFloating<PT_IntAPS>(S, OpPC, V0, V1)) |
7911 | return false; |
7912 | continue; |
7913 | } |
7914 | case OP_CastIntegralFloatingBool: { |
7915 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7916 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7917 | if (!CastIntegralFloating<PT_Bool>(S, OpPC, V0, V1)) |
7918 | return false; |
7919 | continue; |
7920 | } |
7921 | case OP_CastIntegralFloatingFixedPoint: { |
7922 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
7923 | const auto V1 = ReadArg<uint32_t>(S, PC); |
7924 | if (!CastIntegralFloating<PT_FixedPoint>(S, OpPC, V0, V1)) |
7925 | return false; |
7926 | continue; |
7927 | } |
7928 | #endif |
7929 | #ifdef GET_DISASM |
7930 | case OP_CastIntegralFloatingSint8: |
7931 | Text.Op = PrintName("CastIntegralFloatingSint8" ); |
7932 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7933 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7934 | break; |
7935 | case OP_CastIntegralFloatingUint8: |
7936 | Text.Op = PrintName("CastIntegralFloatingUint8" ); |
7937 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7938 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7939 | break; |
7940 | case OP_CastIntegralFloatingSint16: |
7941 | Text.Op = PrintName("CastIntegralFloatingSint16" ); |
7942 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7943 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7944 | break; |
7945 | case OP_CastIntegralFloatingUint16: |
7946 | Text.Op = PrintName("CastIntegralFloatingUint16" ); |
7947 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7948 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7949 | break; |
7950 | case OP_CastIntegralFloatingSint32: |
7951 | Text.Op = PrintName("CastIntegralFloatingSint32" ); |
7952 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7953 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7954 | break; |
7955 | case OP_CastIntegralFloatingUint32: |
7956 | Text.Op = PrintName("CastIntegralFloatingUint32" ); |
7957 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7958 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7959 | break; |
7960 | case OP_CastIntegralFloatingSint64: |
7961 | Text.Op = PrintName("CastIntegralFloatingSint64" ); |
7962 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7963 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7964 | break; |
7965 | case OP_CastIntegralFloatingUint64: |
7966 | Text.Op = PrintName("CastIntegralFloatingUint64" ); |
7967 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7968 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7969 | break; |
7970 | case OP_CastIntegralFloatingIntAP: |
7971 | Text.Op = PrintName("CastIntegralFloatingIntAP" ); |
7972 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7973 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7974 | break; |
7975 | case OP_CastIntegralFloatingIntAPS: |
7976 | Text.Op = PrintName("CastIntegralFloatingIntAPS" ); |
7977 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7978 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7979 | break; |
7980 | case OP_CastIntegralFloatingBool: |
7981 | Text.Op = PrintName("CastIntegralFloatingBool" ); |
7982 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7983 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7984 | break; |
7985 | case OP_CastIntegralFloatingFixedPoint: |
7986 | Text.Op = PrintName("CastIntegralFloatingFixedPoint" ); |
7987 | Text.Args.push_back(printArg<const llvm::fltSemantics *>(P, PC)); |
7988 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
7989 | break; |
7990 | #endif |
7991 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7992 | bool emitCastIntegralFloatingSint8( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
7993 | bool emitCastIntegralFloatingUint8( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
7994 | bool emitCastIntegralFloatingSint16( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
7995 | bool emitCastIntegralFloatingUint16( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
7996 | bool emitCastIntegralFloatingSint32( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
7997 | bool emitCastIntegralFloatingUint32( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
7998 | bool emitCastIntegralFloatingSint64( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
7999 | bool emitCastIntegralFloatingUint64( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
8000 | bool emitCastIntegralFloatingIntAP( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
8001 | bool emitCastIntegralFloatingIntAPS( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
8002 | bool emitCastIntegralFloatingBool( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
8003 | bool emitCastIntegralFloatingFixedPoint( const llvm::fltSemantics * , uint32_t , const SourceInfo &); |
8004 | #endif |
8005 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8006 | [[nodiscard]] bool emitCastIntegralFloating(PrimType, const llvm::fltSemantics *, uint32_t, const SourceInfo &I); |
8007 | #endif |
8008 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
8009 | bool |
8010 | #if defined(GET_EVAL_IMPL) |
8011 | EvalEmitter |
8012 | #else |
8013 | ByteCodeEmitter |
8014 | #endif |
8015 | ::emitCastIntegralFloating(PrimType T0, const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &I) { |
8016 | switch (T0) { |
8017 | case PT_Sint8: |
8018 | return emitCastIntegralFloatingSint8(A0, A1, I); |
8019 | case PT_Uint8: |
8020 | return emitCastIntegralFloatingUint8(A0, A1, I); |
8021 | case PT_Sint16: |
8022 | return emitCastIntegralFloatingSint16(A0, A1, I); |
8023 | case PT_Uint16: |
8024 | return emitCastIntegralFloatingUint16(A0, A1, I); |
8025 | case PT_Sint32: |
8026 | return emitCastIntegralFloatingSint32(A0, A1, I); |
8027 | case PT_Uint32: |
8028 | return emitCastIntegralFloatingUint32(A0, A1, I); |
8029 | case PT_Sint64: |
8030 | return emitCastIntegralFloatingSint64(A0, A1, I); |
8031 | case PT_Uint64: |
8032 | return emitCastIntegralFloatingUint64(A0, A1, I); |
8033 | case PT_IntAP: |
8034 | return emitCastIntegralFloatingIntAP(A0, A1, I); |
8035 | case PT_IntAPS: |
8036 | return emitCastIntegralFloatingIntAPS(A0, A1, I); |
8037 | case PT_Bool: |
8038 | return emitCastIntegralFloatingBool(A0, A1, I); |
8039 | case PT_FixedPoint: |
8040 | return emitCastIntegralFloatingFixedPoint(A0, A1, I); |
8041 | default: llvm_unreachable("invalid type: emitCastIntegralFloating" ); |
8042 | } |
8043 | llvm_unreachable("invalid enum value" ); |
8044 | } |
8045 | #endif |
8046 | #ifdef GET_LINK_IMPL |
8047 | bool ByteCodeEmitter::emitCastIntegralFloatingSint8( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8048 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingSint8, A0, A1, L); |
8049 | } |
8050 | bool ByteCodeEmitter::emitCastIntegralFloatingUint8( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8051 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingUint8, A0, A1, L); |
8052 | } |
8053 | bool ByteCodeEmitter::emitCastIntegralFloatingSint16( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8054 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingSint16, A0, A1, L); |
8055 | } |
8056 | bool ByteCodeEmitter::emitCastIntegralFloatingUint16( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8057 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingUint16, A0, A1, L); |
8058 | } |
8059 | bool ByteCodeEmitter::emitCastIntegralFloatingSint32( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8060 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingSint32, A0, A1, L); |
8061 | } |
8062 | bool ByteCodeEmitter::emitCastIntegralFloatingUint32( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8063 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingUint32, A0, A1, L); |
8064 | } |
8065 | bool ByteCodeEmitter::emitCastIntegralFloatingSint64( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8066 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingSint64, A0, A1, L); |
8067 | } |
8068 | bool ByteCodeEmitter::emitCastIntegralFloatingUint64( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8069 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingUint64, A0, A1, L); |
8070 | } |
8071 | bool ByteCodeEmitter::emitCastIntegralFloatingIntAP( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8072 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingIntAP, A0, A1, L); |
8073 | } |
8074 | bool ByteCodeEmitter::emitCastIntegralFloatingIntAPS( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8075 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingIntAPS, A0, A1, L); |
8076 | } |
8077 | bool ByteCodeEmitter::emitCastIntegralFloatingBool( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8078 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingBool, A0, A1, L); |
8079 | } |
8080 | bool ByteCodeEmitter::emitCastIntegralFloatingFixedPoint( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8081 | return emitOp<const llvm::fltSemantics *, uint32_t>(OP_CastIntegralFloatingFixedPoint, A0, A1, L); |
8082 | } |
8083 | #endif |
8084 | #ifdef GET_EVAL_IMPL |
8085 | bool EvalEmitter::emitCastIntegralFloatingSint8( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8086 | if (!isActive()) return true; |
8087 | CurrentSource = L; |
8088 | return CastIntegralFloating<PT_Sint8>(S, OpPC, A0, A1); |
8089 | } |
8090 | bool EvalEmitter::emitCastIntegralFloatingUint8( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8091 | if (!isActive()) return true; |
8092 | CurrentSource = L; |
8093 | return CastIntegralFloating<PT_Uint8>(S, OpPC, A0, A1); |
8094 | } |
8095 | bool EvalEmitter::emitCastIntegralFloatingSint16( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8096 | if (!isActive()) return true; |
8097 | CurrentSource = L; |
8098 | return CastIntegralFloating<PT_Sint16>(S, OpPC, A0, A1); |
8099 | } |
8100 | bool EvalEmitter::emitCastIntegralFloatingUint16( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8101 | if (!isActive()) return true; |
8102 | CurrentSource = L; |
8103 | return CastIntegralFloating<PT_Uint16>(S, OpPC, A0, A1); |
8104 | } |
8105 | bool EvalEmitter::emitCastIntegralFloatingSint32( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8106 | if (!isActive()) return true; |
8107 | CurrentSource = L; |
8108 | return CastIntegralFloating<PT_Sint32>(S, OpPC, A0, A1); |
8109 | } |
8110 | bool EvalEmitter::emitCastIntegralFloatingUint32( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8111 | if (!isActive()) return true; |
8112 | CurrentSource = L; |
8113 | return CastIntegralFloating<PT_Uint32>(S, OpPC, A0, A1); |
8114 | } |
8115 | bool EvalEmitter::emitCastIntegralFloatingSint64( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8116 | if (!isActive()) return true; |
8117 | CurrentSource = L; |
8118 | return CastIntegralFloating<PT_Sint64>(S, OpPC, A0, A1); |
8119 | } |
8120 | bool EvalEmitter::emitCastIntegralFloatingUint64( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8121 | if (!isActive()) return true; |
8122 | CurrentSource = L; |
8123 | return CastIntegralFloating<PT_Uint64>(S, OpPC, A0, A1); |
8124 | } |
8125 | bool EvalEmitter::emitCastIntegralFloatingIntAP( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8126 | if (!isActive()) return true; |
8127 | CurrentSource = L; |
8128 | return CastIntegralFloating<PT_IntAP>(S, OpPC, A0, A1); |
8129 | } |
8130 | bool EvalEmitter::emitCastIntegralFloatingIntAPS( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8131 | if (!isActive()) return true; |
8132 | CurrentSource = L; |
8133 | return CastIntegralFloating<PT_IntAPS>(S, OpPC, A0, A1); |
8134 | } |
8135 | bool EvalEmitter::emitCastIntegralFloatingBool( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8136 | if (!isActive()) return true; |
8137 | CurrentSource = L; |
8138 | return CastIntegralFloating<PT_Bool>(S, OpPC, A0, A1); |
8139 | } |
8140 | bool EvalEmitter::emitCastIntegralFloatingFixedPoint( const llvm::fltSemantics * A0, uint32_t A1, const SourceInfo &L) { |
8141 | if (!isActive()) return true; |
8142 | CurrentSource = L; |
8143 | return CastIntegralFloating<PT_FixedPoint>(S, OpPC, A0, A1); |
8144 | } |
8145 | #endif |
8146 | #ifdef GET_OPCODE_NAMES |
8147 | OP_CastMemberPtrPtr, |
8148 | #endif |
8149 | #ifdef GET_INTERP |
8150 | case OP_CastMemberPtrPtr: { |
8151 | if (!CastMemberPtrPtr(S, OpPC)) |
8152 | return false; |
8153 | continue; |
8154 | } |
8155 | #endif |
8156 | #ifdef GET_DISASM |
8157 | case OP_CastMemberPtrPtr: |
8158 | Text.Op = PrintName("CastMemberPtrPtr" ); |
8159 | break; |
8160 | #endif |
8161 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8162 | bool emitCastMemberPtrPtr(const SourceInfo &); |
8163 | #endif |
8164 | #ifdef GET_LINK_IMPL |
8165 | bool ByteCodeEmitter::emitCastMemberPtrPtr(const SourceInfo &L) { |
8166 | return emitOp<>(OP_CastMemberPtrPtr, L); |
8167 | } |
8168 | #endif |
8169 | #ifdef GET_EVAL_IMPL |
8170 | bool EvalEmitter::emitCastMemberPtrPtr(const SourceInfo &L) { |
8171 | if (!isActive()) return true; |
8172 | CurrentSource = L; |
8173 | return CastMemberPtrPtr(S, OpPC); |
8174 | } |
8175 | #endif |
8176 | #ifdef GET_OPCODE_NAMES |
8177 | OP_CastPointerIntegralSint8, |
8178 | OP_CastPointerIntegralUint8, |
8179 | OP_CastPointerIntegralSint16, |
8180 | OP_CastPointerIntegralUint16, |
8181 | OP_CastPointerIntegralSint32, |
8182 | OP_CastPointerIntegralUint32, |
8183 | OP_CastPointerIntegralSint64, |
8184 | OP_CastPointerIntegralUint64, |
8185 | OP_CastPointerIntegralBool, |
8186 | #endif |
8187 | #ifdef GET_INTERP |
8188 | case OP_CastPointerIntegralSint8: { |
8189 | if (!CastPointerIntegral<PT_Sint8>(S, OpPC)) |
8190 | return false; |
8191 | continue; |
8192 | } |
8193 | case OP_CastPointerIntegralUint8: { |
8194 | if (!CastPointerIntegral<PT_Uint8>(S, OpPC)) |
8195 | return false; |
8196 | continue; |
8197 | } |
8198 | case OP_CastPointerIntegralSint16: { |
8199 | if (!CastPointerIntegral<PT_Sint16>(S, OpPC)) |
8200 | return false; |
8201 | continue; |
8202 | } |
8203 | case OP_CastPointerIntegralUint16: { |
8204 | if (!CastPointerIntegral<PT_Uint16>(S, OpPC)) |
8205 | return false; |
8206 | continue; |
8207 | } |
8208 | case OP_CastPointerIntegralSint32: { |
8209 | if (!CastPointerIntegral<PT_Sint32>(S, OpPC)) |
8210 | return false; |
8211 | continue; |
8212 | } |
8213 | case OP_CastPointerIntegralUint32: { |
8214 | if (!CastPointerIntegral<PT_Uint32>(S, OpPC)) |
8215 | return false; |
8216 | continue; |
8217 | } |
8218 | case OP_CastPointerIntegralSint64: { |
8219 | if (!CastPointerIntegral<PT_Sint64>(S, OpPC)) |
8220 | return false; |
8221 | continue; |
8222 | } |
8223 | case OP_CastPointerIntegralUint64: { |
8224 | if (!CastPointerIntegral<PT_Uint64>(S, OpPC)) |
8225 | return false; |
8226 | continue; |
8227 | } |
8228 | case OP_CastPointerIntegralBool: { |
8229 | if (!CastPointerIntegral<PT_Bool>(S, OpPC)) |
8230 | return false; |
8231 | continue; |
8232 | } |
8233 | #endif |
8234 | #ifdef GET_DISASM |
8235 | case OP_CastPointerIntegralSint8: |
8236 | Text.Op = PrintName("CastPointerIntegralSint8" ); |
8237 | break; |
8238 | case OP_CastPointerIntegralUint8: |
8239 | Text.Op = PrintName("CastPointerIntegralUint8" ); |
8240 | break; |
8241 | case OP_CastPointerIntegralSint16: |
8242 | Text.Op = PrintName("CastPointerIntegralSint16" ); |
8243 | break; |
8244 | case OP_CastPointerIntegralUint16: |
8245 | Text.Op = PrintName("CastPointerIntegralUint16" ); |
8246 | break; |
8247 | case OP_CastPointerIntegralSint32: |
8248 | Text.Op = PrintName("CastPointerIntegralSint32" ); |
8249 | break; |
8250 | case OP_CastPointerIntegralUint32: |
8251 | Text.Op = PrintName("CastPointerIntegralUint32" ); |
8252 | break; |
8253 | case OP_CastPointerIntegralSint64: |
8254 | Text.Op = PrintName("CastPointerIntegralSint64" ); |
8255 | break; |
8256 | case OP_CastPointerIntegralUint64: |
8257 | Text.Op = PrintName("CastPointerIntegralUint64" ); |
8258 | break; |
8259 | case OP_CastPointerIntegralBool: |
8260 | Text.Op = PrintName("CastPointerIntegralBool" ); |
8261 | break; |
8262 | #endif |
8263 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8264 | bool emitCastPointerIntegralSint8(const SourceInfo &); |
8265 | bool emitCastPointerIntegralUint8(const SourceInfo &); |
8266 | bool emitCastPointerIntegralSint16(const SourceInfo &); |
8267 | bool emitCastPointerIntegralUint16(const SourceInfo &); |
8268 | bool emitCastPointerIntegralSint32(const SourceInfo &); |
8269 | bool emitCastPointerIntegralUint32(const SourceInfo &); |
8270 | bool emitCastPointerIntegralSint64(const SourceInfo &); |
8271 | bool emitCastPointerIntegralUint64(const SourceInfo &); |
8272 | bool emitCastPointerIntegralBool(const SourceInfo &); |
8273 | #endif |
8274 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8275 | [[nodiscard]] bool emitCastPointerIntegral(PrimType, const SourceInfo &I); |
8276 | #endif |
8277 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
8278 | bool |
8279 | #if defined(GET_EVAL_IMPL) |
8280 | EvalEmitter |
8281 | #else |
8282 | ByteCodeEmitter |
8283 | #endif |
8284 | ::emitCastPointerIntegral(PrimType T0, const SourceInfo &I) { |
8285 | switch (T0) { |
8286 | case PT_Sint8: |
8287 | return emitCastPointerIntegralSint8(I); |
8288 | case PT_Uint8: |
8289 | return emitCastPointerIntegralUint8(I); |
8290 | case PT_Sint16: |
8291 | return emitCastPointerIntegralSint16(I); |
8292 | case PT_Uint16: |
8293 | return emitCastPointerIntegralUint16(I); |
8294 | case PT_Sint32: |
8295 | return emitCastPointerIntegralSint32(I); |
8296 | case PT_Uint32: |
8297 | return emitCastPointerIntegralUint32(I); |
8298 | case PT_Sint64: |
8299 | return emitCastPointerIntegralSint64(I); |
8300 | case PT_Uint64: |
8301 | return emitCastPointerIntegralUint64(I); |
8302 | case PT_Bool: |
8303 | return emitCastPointerIntegralBool(I); |
8304 | default: llvm_unreachable("invalid type: emitCastPointerIntegral" ); |
8305 | } |
8306 | llvm_unreachable("invalid enum value" ); |
8307 | } |
8308 | #endif |
8309 | #ifdef GET_LINK_IMPL |
8310 | bool ByteCodeEmitter::emitCastPointerIntegralSint8(const SourceInfo &L) { |
8311 | return emitOp<>(OP_CastPointerIntegralSint8, L); |
8312 | } |
8313 | bool ByteCodeEmitter::emitCastPointerIntegralUint8(const SourceInfo &L) { |
8314 | return emitOp<>(OP_CastPointerIntegralUint8, L); |
8315 | } |
8316 | bool ByteCodeEmitter::emitCastPointerIntegralSint16(const SourceInfo &L) { |
8317 | return emitOp<>(OP_CastPointerIntegralSint16, L); |
8318 | } |
8319 | bool ByteCodeEmitter::emitCastPointerIntegralUint16(const SourceInfo &L) { |
8320 | return emitOp<>(OP_CastPointerIntegralUint16, L); |
8321 | } |
8322 | bool ByteCodeEmitter::emitCastPointerIntegralSint32(const SourceInfo &L) { |
8323 | return emitOp<>(OP_CastPointerIntegralSint32, L); |
8324 | } |
8325 | bool ByteCodeEmitter::emitCastPointerIntegralUint32(const SourceInfo &L) { |
8326 | return emitOp<>(OP_CastPointerIntegralUint32, L); |
8327 | } |
8328 | bool ByteCodeEmitter::emitCastPointerIntegralSint64(const SourceInfo &L) { |
8329 | return emitOp<>(OP_CastPointerIntegralSint64, L); |
8330 | } |
8331 | bool ByteCodeEmitter::emitCastPointerIntegralUint64(const SourceInfo &L) { |
8332 | return emitOp<>(OP_CastPointerIntegralUint64, L); |
8333 | } |
8334 | bool ByteCodeEmitter::emitCastPointerIntegralBool(const SourceInfo &L) { |
8335 | return emitOp<>(OP_CastPointerIntegralBool, L); |
8336 | } |
8337 | #endif |
8338 | #ifdef GET_EVAL_IMPL |
8339 | bool EvalEmitter::emitCastPointerIntegralSint8(const SourceInfo &L) { |
8340 | if (!isActive()) return true; |
8341 | CurrentSource = L; |
8342 | return CastPointerIntegral<PT_Sint8>(S, OpPC); |
8343 | } |
8344 | bool EvalEmitter::emitCastPointerIntegralUint8(const SourceInfo &L) { |
8345 | if (!isActive()) return true; |
8346 | CurrentSource = L; |
8347 | return CastPointerIntegral<PT_Uint8>(S, OpPC); |
8348 | } |
8349 | bool EvalEmitter::emitCastPointerIntegralSint16(const SourceInfo &L) { |
8350 | if (!isActive()) return true; |
8351 | CurrentSource = L; |
8352 | return CastPointerIntegral<PT_Sint16>(S, OpPC); |
8353 | } |
8354 | bool EvalEmitter::emitCastPointerIntegralUint16(const SourceInfo &L) { |
8355 | if (!isActive()) return true; |
8356 | CurrentSource = L; |
8357 | return CastPointerIntegral<PT_Uint16>(S, OpPC); |
8358 | } |
8359 | bool EvalEmitter::emitCastPointerIntegralSint32(const SourceInfo &L) { |
8360 | if (!isActive()) return true; |
8361 | CurrentSource = L; |
8362 | return CastPointerIntegral<PT_Sint32>(S, OpPC); |
8363 | } |
8364 | bool EvalEmitter::emitCastPointerIntegralUint32(const SourceInfo &L) { |
8365 | if (!isActive()) return true; |
8366 | CurrentSource = L; |
8367 | return CastPointerIntegral<PT_Uint32>(S, OpPC); |
8368 | } |
8369 | bool EvalEmitter::emitCastPointerIntegralSint64(const SourceInfo &L) { |
8370 | if (!isActive()) return true; |
8371 | CurrentSource = L; |
8372 | return CastPointerIntegral<PT_Sint64>(S, OpPC); |
8373 | } |
8374 | bool EvalEmitter::emitCastPointerIntegralUint64(const SourceInfo &L) { |
8375 | if (!isActive()) return true; |
8376 | CurrentSource = L; |
8377 | return CastPointerIntegral<PT_Uint64>(S, OpPC); |
8378 | } |
8379 | bool EvalEmitter::emitCastPointerIntegralBool(const SourceInfo &L) { |
8380 | if (!isActive()) return true; |
8381 | CurrentSource = L; |
8382 | return CastPointerIntegral<PT_Bool>(S, OpPC); |
8383 | } |
8384 | #endif |
8385 | #ifdef GET_OPCODE_NAMES |
8386 | OP_CastPointerIntegralAP, |
8387 | #endif |
8388 | #ifdef GET_INTERP |
8389 | case OP_CastPointerIntegralAP: { |
8390 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8391 | if (!CastPointerIntegralAP(S, OpPC, V0)) |
8392 | return false; |
8393 | continue; |
8394 | } |
8395 | #endif |
8396 | #ifdef GET_DISASM |
8397 | case OP_CastPointerIntegralAP: |
8398 | Text.Op = PrintName("CastPointerIntegralAP" ); |
8399 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
8400 | break; |
8401 | #endif |
8402 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8403 | bool emitCastPointerIntegralAP( uint32_t , const SourceInfo &); |
8404 | #endif |
8405 | #ifdef GET_LINK_IMPL |
8406 | bool ByteCodeEmitter::emitCastPointerIntegralAP( uint32_t A0, const SourceInfo &L) { |
8407 | return emitOp<uint32_t>(OP_CastPointerIntegralAP, A0, L); |
8408 | } |
8409 | #endif |
8410 | #ifdef GET_EVAL_IMPL |
8411 | bool EvalEmitter::emitCastPointerIntegralAP( uint32_t A0, const SourceInfo &L) { |
8412 | if (!isActive()) return true; |
8413 | CurrentSource = L; |
8414 | return CastPointerIntegralAP(S, OpPC, A0); |
8415 | } |
8416 | #endif |
8417 | #ifdef GET_OPCODE_NAMES |
8418 | OP_CastPointerIntegralAPS, |
8419 | #endif |
8420 | #ifdef GET_INTERP |
8421 | case OP_CastPointerIntegralAPS: { |
8422 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8423 | if (!CastPointerIntegralAPS(S, OpPC, V0)) |
8424 | return false; |
8425 | continue; |
8426 | } |
8427 | #endif |
8428 | #ifdef GET_DISASM |
8429 | case OP_CastPointerIntegralAPS: |
8430 | Text.Op = PrintName("CastPointerIntegralAPS" ); |
8431 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
8432 | break; |
8433 | #endif |
8434 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8435 | bool emitCastPointerIntegralAPS( uint32_t , const SourceInfo &); |
8436 | #endif |
8437 | #ifdef GET_LINK_IMPL |
8438 | bool ByteCodeEmitter::emitCastPointerIntegralAPS( uint32_t A0, const SourceInfo &L) { |
8439 | return emitOp<uint32_t>(OP_CastPointerIntegralAPS, A0, L); |
8440 | } |
8441 | #endif |
8442 | #ifdef GET_EVAL_IMPL |
8443 | bool EvalEmitter::emitCastPointerIntegralAPS( uint32_t A0, const SourceInfo &L) { |
8444 | if (!isActive()) return true; |
8445 | CurrentSource = L; |
8446 | return CastPointerIntegralAPS(S, OpPC, A0); |
8447 | } |
8448 | #endif |
8449 | #ifdef GET_OPCODE_NAMES |
8450 | OP_CheckAllocations, |
8451 | #endif |
8452 | #ifdef GET_INTERP |
8453 | case OP_CheckAllocations: { |
8454 | if (!CheckAllocations(S, OpPC)) |
8455 | return false; |
8456 | continue; |
8457 | } |
8458 | #endif |
8459 | #ifdef GET_DISASM |
8460 | case OP_CheckAllocations: |
8461 | Text.Op = PrintName("CheckAllocations" ); |
8462 | break; |
8463 | #endif |
8464 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8465 | bool emitCheckAllocations(const SourceInfo &); |
8466 | #endif |
8467 | #ifdef GET_LINK_IMPL |
8468 | bool ByteCodeEmitter::emitCheckAllocations(const SourceInfo &L) { |
8469 | return emitOp<>(OP_CheckAllocations, L); |
8470 | } |
8471 | #endif |
8472 | #ifdef GET_EVAL_IMPL |
8473 | bool EvalEmitter::emitCheckAllocations(const SourceInfo &L) { |
8474 | if (!isActive()) return true; |
8475 | CurrentSource = L; |
8476 | return CheckAllocations(S, OpPC); |
8477 | } |
8478 | #endif |
8479 | #ifdef GET_OPCODE_NAMES |
8480 | OP_CheckArraySize, |
8481 | #endif |
8482 | #ifdef GET_INTERP |
8483 | case OP_CheckArraySize: { |
8484 | const auto V0 = ReadArg<uint64_t>(S, PC); |
8485 | if (!CheckArraySize(S, OpPC, V0)) |
8486 | return false; |
8487 | continue; |
8488 | } |
8489 | #endif |
8490 | #ifdef GET_DISASM |
8491 | case OP_CheckArraySize: |
8492 | Text.Op = PrintName("CheckArraySize" ); |
8493 | Text.Args.push_back(printArg<uint64_t>(P, PC)); |
8494 | break; |
8495 | #endif |
8496 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8497 | bool emitCheckArraySize( uint64_t , const SourceInfo &); |
8498 | #endif |
8499 | #ifdef GET_LINK_IMPL |
8500 | bool ByteCodeEmitter::emitCheckArraySize( uint64_t A0, const SourceInfo &L) { |
8501 | return emitOp<uint64_t>(OP_CheckArraySize, A0, L); |
8502 | } |
8503 | #endif |
8504 | #ifdef GET_EVAL_IMPL |
8505 | bool EvalEmitter::emitCheckArraySize( uint64_t A0, const SourceInfo &L) { |
8506 | if (!isActive()) return true; |
8507 | CurrentSource = L; |
8508 | return CheckArraySize(S, OpPC, A0); |
8509 | } |
8510 | #endif |
8511 | #ifdef GET_OPCODE_NAMES |
8512 | OP_CheckDecl, |
8513 | #endif |
8514 | #ifdef GET_INTERP |
8515 | case OP_CheckDecl: { |
8516 | const auto V0 = ReadArg<const VarDecl*>(S, PC); |
8517 | if (!CheckDecl(S, OpPC, V0)) |
8518 | return false; |
8519 | continue; |
8520 | } |
8521 | #endif |
8522 | #ifdef GET_DISASM |
8523 | case OP_CheckDecl: |
8524 | Text.Op = PrintName("CheckDecl" ); |
8525 | Text.Args.push_back(printArg<const VarDecl*>(P, PC)); |
8526 | break; |
8527 | #endif |
8528 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8529 | bool emitCheckDecl( const VarDecl* , const SourceInfo &); |
8530 | #endif |
8531 | #ifdef GET_LINK_IMPL |
8532 | bool ByteCodeEmitter::emitCheckDecl( const VarDecl* A0, const SourceInfo &L) { |
8533 | return emitOp<const VarDecl*>(OP_CheckDecl, A0, L); |
8534 | } |
8535 | #endif |
8536 | #ifdef GET_EVAL_IMPL |
8537 | bool EvalEmitter::emitCheckDecl( const VarDecl* A0, const SourceInfo &L) { |
8538 | if (!isActive()) return true; |
8539 | CurrentSource = L; |
8540 | return CheckDecl(S, OpPC, A0); |
8541 | } |
8542 | #endif |
8543 | #ifdef GET_OPCODE_NAMES |
8544 | OP_CheckDestruction, |
8545 | #endif |
8546 | #ifdef GET_INTERP |
8547 | case OP_CheckDestruction: { |
8548 | if (!CheckDestruction(S, OpPC)) |
8549 | return false; |
8550 | continue; |
8551 | } |
8552 | #endif |
8553 | #ifdef GET_DISASM |
8554 | case OP_CheckDestruction: |
8555 | Text.Op = PrintName("CheckDestruction" ); |
8556 | break; |
8557 | #endif |
8558 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8559 | bool emitCheckDestruction(const SourceInfo &); |
8560 | #endif |
8561 | #ifdef GET_LINK_IMPL |
8562 | bool ByteCodeEmitter::emitCheckDestruction(const SourceInfo &L) { |
8563 | return emitOp<>(OP_CheckDestruction, L); |
8564 | } |
8565 | #endif |
8566 | #ifdef GET_EVAL_IMPL |
8567 | bool EvalEmitter::emitCheckDestruction(const SourceInfo &L) { |
8568 | if (!isActive()) return true; |
8569 | CurrentSource = L; |
8570 | return CheckDestruction(S, OpPC); |
8571 | } |
8572 | #endif |
8573 | #ifdef GET_OPCODE_NAMES |
8574 | OP_CheckEnumValueSint8, |
8575 | OP_CheckEnumValueUint8, |
8576 | OP_CheckEnumValueSint16, |
8577 | OP_CheckEnumValueUint16, |
8578 | OP_CheckEnumValueSint32, |
8579 | OP_CheckEnumValueUint32, |
8580 | OP_CheckEnumValueSint64, |
8581 | OP_CheckEnumValueUint64, |
8582 | OP_CheckEnumValueBool, |
8583 | #endif |
8584 | #ifdef GET_INTERP |
8585 | case OP_CheckEnumValueSint8: { |
8586 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8587 | if (!CheckEnumValue<PT_Sint8>(S, OpPC, V0)) |
8588 | return false; |
8589 | continue; |
8590 | } |
8591 | case OP_CheckEnumValueUint8: { |
8592 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8593 | if (!CheckEnumValue<PT_Uint8>(S, OpPC, V0)) |
8594 | return false; |
8595 | continue; |
8596 | } |
8597 | case OP_CheckEnumValueSint16: { |
8598 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8599 | if (!CheckEnumValue<PT_Sint16>(S, OpPC, V0)) |
8600 | return false; |
8601 | continue; |
8602 | } |
8603 | case OP_CheckEnumValueUint16: { |
8604 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8605 | if (!CheckEnumValue<PT_Uint16>(S, OpPC, V0)) |
8606 | return false; |
8607 | continue; |
8608 | } |
8609 | case OP_CheckEnumValueSint32: { |
8610 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8611 | if (!CheckEnumValue<PT_Sint32>(S, OpPC, V0)) |
8612 | return false; |
8613 | continue; |
8614 | } |
8615 | case OP_CheckEnumValueUint32: { |
8616 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8617 | if (!CheckEnumValue<PT_Uint32>(S, OpPC, V0)) |
8618 | return false; |
8619 | continue; |
8620 | } |
8621 | case OP_CheckEnumValueSint64: { |
8622 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8623 | if (!CheckEnumValue<PT_Sint64>(S, OpPC, V0)) |
8624 | return false; |
8625 | continue; |
8626 | } |
8627 | case OP_CheckEnumValueUint64: { |
8628 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8629 | if (!CheckEnumValue<PT_Uint64>(S, OpPC, V0)) |
8630 | return false; |
8631 | continue; |
8632 | } |
8633 | case OP_CheckEnumValueBool: { |
8634 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
8635 | if (!CheckEnumValue<PT_Bool>(S, OpPC, V0)) |
8636 | return false; |
8637 | continue; |
8638 | } |
8639 | #endif |
8640 | #ifdef GET_DISASM |
8641 | case OP_CheckEnumValueSint8: |
8642 | Text.Op = PrintName("CheckEnumValueSint8" ); |
8643 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8644 | break; |
8645 | case OP_CheckEnumValueUint8: |
8646 | Text.Op = PrintName("CheckEnumValueUint8" ); |
8647 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8648 | break; |
8649 | case OP_CheckEnumValueSint16: |
8650 | Text.Op = PrintName("CheckEnumValueSint16" ); |
8651 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8652 | break; |
8653 | case OP_CheckEnumValueUint16: |
8654 | Text.Op = PrintName("CheckEnumValueUint16" ); |
8655 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8656 | break; |
8657 | case OP_CheckEnumValueSint32: |
8658 | Text.Op = PrintName("CheckEnumValueSint32" ); |
8659 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8660 | break; |
8661 | case OP_CheckEnumValueUint32: |
8662 | Text.Op = PrintName("CheckEnumValueUint32" ); |
8663 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8664 | break; |
8665 | case OP_CheckEnumValueSint64: |
8666 | Text.Op = PrintName("CheckEnumValueSint64" ); |
8667 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8668 | break; |
8669 | case OP_CheckEnumValueUint64: |
8670 | Text.Op = PrintName("CheckEnumValueUint64" ); |
8671 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8672 | break; |
8673 | case OP_CheckEnumValueBool: |
8674 | Text.Op = PrintName("CheckEnumValueBool" ); |
8675 | Text.Args.push_back(printArg<const EnumDecl *>(P, PC)); |
8676 | break; |
8677 | #endif |
8678 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8679 | bool emitCheckEnumValueSint8( const EnumDecl * , const SourceInfo &); |
8680 | bool emitCheckEnumValueUint8( const EnumDecl * , const SourceInfo &); |
8681 | bool emitCheckEnumValueSint16( const EnumDecl * , const SourceInfo &); |
8682 | bool emitCheckEnumValueUint16( const EnumDecl * , const SourceInfo &); |
8683 | bool emitCheckEnumValueSint32( const EnumDecl * , const SourceInfo &); |
8684 | bool emitCheckEnumValueUint32( const EnumDecl * , const SourceInfo &); |
8685 | bool emitCheckEnumValueSint64( const EnumDecl * , const SourceInfo &); |
8686 | bool emitCheckEnumValueUint64( const EnumDecl * , const SourceInfo &); |
8687 | bool emitCheckEnumValueBool( const EnumDecl * , const SourceInfo &); |
8688 | #endif |
8689 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8690 | [[nodiscard]] bool emitCheckEnumValue(PrimType, const EnumDecl *, const SourceInfo &I); |
8691 | #endif |
8692 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
8693 | bool |
8694 | #if defined(GET_EVAL_IMPL) |
8695 | EvalEmitter |
8696 | #else |
8697 | ByteCodeEmitter |
8698 | #endif |
8699 | ::emitCheckEnumValue(PrimType T0, const EnumDecl * A0, const SourceInfo &I) { |
8700 | switch (T0) { |
8701 | case PT_Sint8: |
8702 | return emitCheckEnumValueSint8(A0, I); |
8703 | case PT_Uint8: |
8704 | return emitCheckEnumValueUint8(A0, I); |
8705 | case PT_Sint16: |
8706 | return emitCheckEnumValueSint16(A0, I); |
8707 | case PT_Uint16: |
8708 | return emitCheckEnumValueUint16(A0, I); |
8709 | case PT_Sint32: |
8710 | return emitCheckEnumValueSint32(A0, I); |
8711 | case PT_Uint32: |
8712 | return emitCheckEnumValueUint32(A0, I); |
8713 | case PT_Sint64: |
8714 | return emitCheckEnumValueSint64(A0, I); |
8715 | case PT_Uint64: |
8716 | return emitCheckEnumValueUint64(A0, I); |
8717 | case PT_Bool: |
8718 | return emitCheckEnumValueBool(A0, I); |
8719 | default: llvm_unreachable("invalid type: emitCheckEnumValue" ); |
8720 | } |
8721 | llvm_unreachable("invalid enum value" ); |
8722 | } |
8723 | #endif |
8724 | #ifdef GET_LINK_IMPL |
8725 | bool ByteCodeEmitter::emitCheckEnumValueSint8( const EnumDecl * A0, const SourceInfo &L) { |
8726 | return emitOp<const EnumDecl *>(OP_CheckEnumValueSint8, A0, L); |
8727 | } |
8728 | bool ByteCodeEmitter::emitCheckEnumValueUint8( const EnumDecl * A0, const SourceInfo &L) { |
8729 | return emitOp<const EnumDecl *>(OP_CheckEnumValueUint8, A0, L); |
8730 | } |
8731 | bool ByteCodeEmitter::emitCheckEnumValueSint16( const EnumDecl * A0, const SourceInfo &L) { |
8732 | return emitOp<const EnumDecl *>(OP_CheckEnumValueSint16, A0, L); |
8733 | } |
8734 | bool ByteCodeEmitter::emitCheckEnumValueUint16( const EnumDecl * A0, const SourceInfo &L) { |
8735 | return emitOp<const EnumDecl *>(OP_CheckEnumValueUint16, A0, L); |
8736 | } |
8737 | bool ByteCodeEmitter::emitCheckEnumValueSint32( const EnumDecl * A0, const SourceInfo &L) { |
8738 | return emitOp<const EnumDecl *>(OP_CheckEnumValueSint32, A0, L); |
8739 | } |
8740 | bool ByteCodeEmitter::emitCheckEnumValueUint32( const EnumDecl * A0, const SourceInfo &L) { |
8741 | return emitOp<const EnumDecl *>(OP_CheckEnumValueUint32, A0, L); |
8742 | } |
8743 | bool ByteCodeEmitter::emitCheckEnumValueSint64( const EnumDecl * A0, const SourceInfo &L) { |
8744 | return emitOp<const EnumDecl *>(OP_CheckEnumValueSint64, A0, L); |
8745 | } |
8746 | bool ByteCodeEmitter::emitCheckEnumValueUint64( const EnumDecl * A0, const SourceInfo &L) { |
8747 | return emitOp<const EnumDecl *>(OP_CheckEnumValueUint64, A0, L); |
8748 | } |
8749 | bool ByteCodeEmitter::emitCheckEnumValueBool( const EnumDecl * A0, const SourceInfo &L) { |
8750 | return emitOp<const EnumDecl *>(OP_CheckEnumValueBool, A0, L); |
8751 | } |
8752 | #endif |
8753 | #ifdef GET_EVAL_IMPL |
8754 | bool EvalEmitter::emitCheckEnumValueSint8( const EnumDecl * A0, const SourceInfo &L) { |
8755 | if (!isActive()) return true; |
8756 | CurrentSource = L; |
8757 | return CheckEnumValue<PT_Sint8>(S, OpPC, A0); |
8758 | } |
8759 | bool EvalEmitter::emitCheckEnumValueUint8( const EnumDecl * A0, const SourceInfo &L) { |
8760 | if (!isActive()) return true; |
8761 | CurrentSource = L; |
8762 | return CheckEnumValue<PT_Uint8>(S, OpPC, A0); |
8763 | } |
8764 | bool EvalEmitter::emitCheckEnumValueSint16( const EnumDecl * A0, const SourceInfo &L) { |
8765 | if (!isActive()) return true; |
8766 | CurrentSource = L; |
8767 | return CheckEnumValue<PT_Sint16>(S, OpPC, A0); |
8768 | } |
8769 | bool EvalEmitter::emitCheckEnumValueUint16( const EnumDecl * A0, const SourceInfo &L) { |
8770 | if (!isActive()) return true; |
8771 | CurrentSource = L; |
8772 | return CheckEnumValue<PT_Uint16>(S, OpPC, A0); |
8773 | } |
8774 | bool EvalEmitter::emitCheckEnumValueSint32( const EnumDecl * A0, const SourceInfo &L) { |
8775 | if (!isActive()) return true; |
8776 | CurrentSource = L; |
8777 | return CheckEnumValue<PT_Sint32>(S, OpPC, A0); |
8778 | } |
8779 | bool EvalEmitter::emitCheckEnumValueUint32( const EnumDecl * A0, const SourceInfo &L) { |
8780 | if (!isActive()) return true; |
8781 | CurrentSource = L; |
8782 | return CheckEnumValue<PT_Uint32>(S, OpPC, A0); |
8783 | } |
8784 | bool EvalEmitter::emitCheckEnumValueSint64( const EnumDecl * A0, const SourceInfo &L) { |
8785 | if (!isActive()) return true; |
8786 | CurrentSource = L; |
8787 | return CheckEnumValue<PT_Sint64>(S, OpPC, A0); |
8788 | } |
8789 | bool EvalEmitter::emitCheckEnumValueUint64( const EnumDecl * A0, const SourceInfo &L) { |
8790 | if (!isActive()) return true; |
8791 | CurrentSource = L; |
8792 | return CheckEnumValue<PT_Uint64>(S, OpPC, A0); |
8793 | } |
8794 | bool EvalEmitter::emitCheckEnumValueBool( const EnumDecl * A0, const SourceInfo &L) { |
8795 | if (!isActive()) return true; |
8796 | CurrentSource = L; |
8797 | return CheckEnumValue<PT_Bool>(S, OpPC, A0); |
8798 | } |
8799 | #endif |
8800 | #ifdef GET_OPCODE_NAMES |
8801 | OP_CheckLiteralType, |
8802 | #endif |
8803 | #ifdef GET_INTERP |
8804 | case OP_CheckLiteralType: { |
8805 | const auto V0 = ReadArg<const Type *>(S, PC); |
8806 | if (!CheckLiteralType(S, OpPC, V0)) |
8807 | return false; |
8808 | continue; |
8809 | } |
8810 | #endif |
8811 | #ifdef GET_DISASM |
8812 | case OP_CheckLiteralType: |
8813 | Text.Op = PrintName("CheckLiteralType" ); |
8814 | Text.Args.push_back(printArg<const Type *>(P, PC)); |
8815 | break; |
8816 | #endif |
8817 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8818 | bool emitCheckLiteralType( const Type * , const SourceInfo &); |
8819 | #endif |
8820 | #ifdef GET_LINK_IMPL |
8821 | bool ByteCodeEmitter::emitCheckLiteralType( const Type * A0, const SourceInfo &L) { |
8822 | return emitOp<const Type *>(OP_CheckLiteralType, A0, L); |
8823 | } |
8824 | #endif |
8825 | #ifdef GET_EVAL_IMPL |
8826 | bool EvalEmitter::emitCheckLiteralType( const Type * A0, const SourceInfo &L) { |
8827 | if (!isActive()) return true; |
8828 | CurrentSource = L; |
8829 | return CheckLiteralType(S, OpPC, A0); |
8830 | } |
8831 | #endif |
8832 | #ifdef GET_OPCODE_NAMES |
8833 | OP_CheckNewTypeMismatch, |
8834 | #endif |
8835 | #ifdef GET_INTERP |
8836 | case OP_CheckNewTypeMismatch: { |
8837 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8838 | if (!CheckNewTypeMismatch(S, OpPC, V0)) |
8839 | return false; |
8840 | continue; |
8841 | } |
8842 | #endif |
8843 | #ifdef GET_DISASM |
8844 | case OP_CheckNewTypeMismatch: |
8845 | Text.Op = PrintName("CheckNewTypeMismatch" ); |
8846 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8847 | break; |
8848 | #endif |
8849 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8850 | bool emitCheckNewTypeMismatch( const Expr * , const SourceInfo &); |
8851 | #endif |
8852 | #ifdef GET_LINK_IMPL |
8853 | bool ByteCodeEmitter::emitCheckNewTypeMismatch( const Expr * A0, const SourceInfo &L) { |
8854 | return emitOp<const Expr *>(OP_CheckNewTypeMismatch, A0, L); |
8855 | } |
8856 | #endif |
8857 | #ifdef GET_EVAL_IMPL |
8858 | bool EvalEmitter::emitCheckNewTypeMismatch( const Expr * A0, const SourceInfo &L) { |
8859 | if (!isActive()) return true; |
8860 | CurrentSource = L; |
8861 | return CheckNewTypeMismatch(S, OpPC, A0); |
8862 | } |
8863 | #endif |
8864 | #ifdef GET_OPCODE_NAMES |
8865 | OP_CheckNewTypeMismatchArraySint8, |
8866 | OP_CheckNewTypeMismatchArrayUint8, |
8867 | OP_CheckNewTypeMismatchArraySint16, |
8868 | OP_CheckNewTypeMismatchArrayUint16, |
8869 | OP_CheckNewTypeMismatchArraySint32, |
8870 | OP_CheckNewTypeMismatchArrayUint32, |
8871 | OP_CheckNewTypeMismatchArraySint64, |
8872 | OP_CheckNewTypeMismatchArrayUint64, |
8873 | OP_CheckNewTypeMismatchArrayIntAP, |
8874 | OP_CheckNewTypeMismatchArrayIntAPS, |
8875 | #endif |
8876 | #ifdef GET_INTERP |
8877 | case OP_CheckNewTypeMismatchArraySint8: { |
8878 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8879 | if (!CheckNewTypeMismatchArray<PT_Sint8>(S, OpPC, V0)) |
8880 | return false; |
8881 | continue; |
8882 | } |
8883 | case OP_CheckNewTypeMismatchArrayUint8: { |
8884 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8885 | if (!CheckNewTypeMismatchArray<PT_Uint8>(S, OpPC, V0)) |
8886 | return false; |
8887 | continue; |
8888 | } |
8889 | case OP_CheckNewTypeMismatchArraySint16: { |
8890 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8891 | if (!CheckNewTypeMismatchArray<PT_Sint16>(S, OpPC, V0)) |
8892 | return false; |
8893 | continue; |
8894 | } |
8895 | case OP_CheckNewTypeMismatchArrayUint16: { |
8896 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8897 | if (!CheckNewTypeMismatchArray<PT_Uint16>(S, OpPC, V0)) |
8898 | return false; |
8899 | continue; |
8900 | } |
8901 | case OP_CheckNewTypeMismatchArraySint32: { |
8902 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8903 | if (!CheckNewTypeMismatchArray<PT_Sint32>(S, OpPC, V0)) |
8904 | return false; |
8905 | continue; |
8906 | } |
8907 | case OP_CheckNewTypeMismatchArrayUint32: { |
8908 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8909 | if (!CheckNewTypeMismatchArray<PT_Uint32>(S, OpPC, V0)) |
8910 | return false; |
8911 | continue; |
8912 | } |
8913 | case OP_CheckNewTypeMismatchArraySint64: { |
8914 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8915 | if (!CheckNewTypeMismatchArray<PT_Sint64>(S, OpPC, V0)) |
8916 | return false; |
8917 | continue; |
8918 | } |
8919 | case OP_CheckNewTypeMismatchArrayUint64: { |
8920 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8921 | if (!CheckNewTypeMismatchArray<PT_Uint64>(S, OpPC, V0)) |
8922 | return false; |
8923 | continue; |
8924 | } |
8925 | case OP_CheckNewTypeMismatchArrayIntAP: { |
8926 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8927 | if (!CheckNewTypeMismatchArray<PT_IntAP>(S, OpPC, V0)) |
8928 | return false; |
8929 | continue; |
8930 | } |
8931 | case OP_CheckNewTypeMismatchArrayIntAPS: { |
8932 | const auto V0 = ReadArg<const Expr *>(S, PC); |
8933 | if (!CheckNewTypeMismatchArray<PT_IntAPS>(S, OpPC, V0)) |
8934 | return false; |
8935 | continue; |
8936 | } |
8937 | #endif |
8938 | #ifdef GET_DISASM |
8939 | case OP_CheckNewTypeMismatchArraySint8: |
8940 | Text.Op = PrintName("CheckNewTypeMismatchArraySint8" ); |
8941 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8942 | break; |
8943 | case OP_CheckNewTypeMismatchArrayUint8: |
8944 | Text.Op = PrintName("CheckNewTypeMismatchArrayUint8" ); |
8945 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8946 | break; |
8947 | case OP_CheckNewTypeMismatchArraySint16: |
8948 | Text.Op = PrintName("CheckNewTypeMismatchArraySint16" ); |
8949 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8950 | break; |
8951 | case OP_CheckNewTypeMismatchArrayUint16: |
8952 | Text.Op = PrintName("CheckNewTypeMismatchArrayUint16" ); |
8953 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8954 | break; |
8955 | case OP_CheckNewTypeMismatchArraySint32: |
8956 | Text.Op = PrintName("CheckNewTypeMismatchArraySint32" ); |
8957 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8958 | break; |
8959 | case OP_CheckNewTypeMismatchArrayUint32: |
8960 | Text.Op = PrintName("CheckNewTypeMismatchArrayUint32" ); |
8961 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8962 | break; |
8963 | case OP_CheckNewTypeMismatchArraySint64: |
8964 | Text.Op = PrintName("CheckNewTypeMismatchArraySint64" ); |
8965 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8966 | break; |
8967 | case OP_CheckNewTypeMismatchArrayUint64: |
8968 | Text.Op = PrintName("CheckNewTypeMismatchArrayUint64" ); |
8969 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8970 | break; |
8971 | case OP_CheckNewTypeMismatchArrayIntAP: |
8972 | Text.Op = PrintName("CheckNewTypeMismatchArrayIntAP" ); |
8973 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8974 | break; |
8975 | case OP_CheckNewTypeMismatchArrayIntAPS: |
8976 | Text.Op = PrintName("CheckNewTypeMismatchArrayIntAPS" ); |
8977 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
8978 | break; |
8979 | #endif |
8980 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8981 | bool emitCheckNewTypeMismatchArraySint8( const Expr * , const SourceInfo &); |
8982 | bool emitCheckNewTypeMismatchArrayUint8( const Expr * , const SourceInfo &); |
8983 | bool emitCheckNewTypeMismatchArraySint16( const Expr * , const SourceInfo &); |
8984 | bool emitCheckNewTypeMismatchArrayUint16( const Expr * , const SourceInfo &); |
8985 | bool emitCheckNewTypeMismatchArraySint32( const Expr * , const SourceInfo &); |
8986 | bool emitCheckNewTypeMismatchArrayUint32( const Expr * , const SourceInfo &); |
8987 | bool emitCheckNewTypeMismatchArraySint64( const Expr * , const SourceInfo &); |
8988 | bool emitCheckNewTypeMismatchArrayUint64( const Expr * , const SourceInfo &); |
8989 | bool emitCheckNewTypeMismatchArrayIntAP( const Expr * , const SourceInfo &); |
8990 | bool emitCheckNewTypeMismatchArrayIntAPS( const Expr * , const SourceInfo &); |
8991 | #endif |
8992 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8993 | [[nodiscard]] bool emitCheckNewTypeMismatchArray(PrimType, const Expr *, const SourceInfo &I); |
8994 | #endif |
8995 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
8996 | bool |
8997 | #if defined(GET_EVAL_IMPL) |
8998 | EvalEmitter |
8999 | #else |
9000 | ByteCodeEmitter |
9001 | #endif |
9002 | ::emitCheckNewTypeMismatchArray(PrimType T0, const Expr * A0, const SourceInfo &I) { |
9003 | switch (T0) { |
9004 | case PT_Sint8: |
9005 | return emitCheckNewTypeMismatchArraySint8(A0, I); |
9006 | case PT_Uint8: |
9007 | return emitCheckNewTypeMismatchArrayUint8(A0, I); |
9008 | case PT_Sint16: |
9009 | return emitCheckNewTypeMismatchArraySint16(A0, I); |
9010 | case PT_Uint16: |
9011 | return emitCheckNewTypeMismatchArrayUint16(A0, I); |
9012 | case PT_Sint32: |
9013 | return emitCheckNewTypeMismatchArraySint32(A0, I); |
9014 | case PT_Uint32: |
9015 | return emitCheckNewTypeMismatchArrayUint32(A0, I); |
9016 | case PT_Sint64: |
9017 | return emitCheckNewTypeMismatchArraySint64(A0, I); |
9018 | case PT_Uint64: |
9019 | return emitCheckNewTypeMismatchArrayUint64(A0, I); |
9020 | case PT_IntAP: |
9021 | return emitCheckNewTypeMismatchArrayIntAP(A0, I); |
9022 | case PT_IntAPS: |
9023 | return emitCheckNewTypeMismatchArrayIntAPS(A0, I); |
9024 | default: llvm_unreachable("invalid type: emitCheckNewTypeMismatchArray" ); |
9025 | } |
9026 | llvm_unreachable("invalid enum value" ); |
9027 | } |
9028 | #endif |
9029 | #ifdef GET_LINK_IMPL |
9030 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArraySint8( const Expr * A0, const SourceInfo &L) { |
9031 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArraySint8, A0, L); |
9032 | } |
9033 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArrayUint8( const Expr * A0, const SourceInfo &L) { |
9034 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArrayUint8, A0, L); |
9035 | } |
9036 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArraySint16( const Expr * A0, const SourceInfo &L) { |
9037 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArraySint16, A0, L); |
9038 | } |
9039 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArrayUint16( const Expr * A0, const SourceInfo &L) { |
9040 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArrayUint16, A0, L); |
9041 | } |
9042 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArraySint32( const Expr * A0, const SourceInfo &L) { |
9043 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArraySint32, A0, L); |
9044 | } |
9045 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArrayUint32( const Expr * A0, const SourceInfo &L) { |
9046 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArrayUint32, A0, L); |
9047 | } |
9048 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArraySint64( const Expr * A0, const SourceInfo &L) { |
9049 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArraySint64, A0, L); |
9050 | } |
9051 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArrayUint64( const Expr * A0, const SourceInfo &L) { |
9052 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArrayUint64, A0, L); |
9053 | } |
9054 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArrayIntAP( const Expr * A0, const SourceInfo &L) { |
9055 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArrayIntAP, A0, L); |
9056 | } |
9057 | bool ByteCodeEmitter::emitCheckNewTypeMismatchArrayIntAPS( const Expr * A0, const SourceInfo &L) { |
9058 | return emitOp<const Expr *>(OP_CheckNewTypeMismatchArrayIntAPS, A0, L); |
9059 | } |
9060 | #endif |
9061 | #ifdef GET_EVAL_IMPL |
9062 | bool EvalEmitter::emitCheckNewTypeMismatchArraySint8( const Expr * A0, const SourceInfo &L) { |
9063 | if (!isActive()) return true; |
9064 | CurrentSource = L; |
9065 | return CheckNewTypeMismatchArray<PT_Sint8>(S, OpPC, A0); |
9066 | } |
9067 | bool EvalEmitter::emitCheckNewTypeMismatchArrayUint8( const Expr * A0, const SourceInfo &L) { |
9068 | if (!isActive()) return true; |
9069 | CurrentSource = L; |
9070 | return CheckNewTypeMismatchArray<PT_Uint8>(S, OpPC, A0); |
9071 | } |
9072 | bool EvalEmitter::emitCheckNewTypeMismatchArraySint16( const Expr * A0, const SourceInfo &L) { |
9073 | if (!isActive()) return true; |
9074 | CurrentSource = L; |
9075 | return CheckNewTypeMismatchArray<PT_Sint16>(S, OpPC, A0); |
9076 | } |
9077 | bool EvalEmitter::emitCheckNewTypeMismatchArrayUint16( const Expr * A0, const SourceInfo &L) { |
9078 | if (!isActive()) return true; |
9079 | CurrentSource = L; |
9080 | return CheckNewTypeMismatchArray<PT_Uint16>(S, OpPC, A0); |
9081 | } |
9082 | bool EvalEmitter::emitCheckNewTypeMismatchArraySint32( const Expr * A0, const SourceInfo &L) { |
9083 | if (!isActive()) return true; |
9084 | CurrentSource = L; |
9085 | return CheckNewTypeMismatchArray<PT_Sint32>(S, OpPC, A0); |
9086 | } |
9087 | bool EvalEmitter::emitCheckNewTypeMismatchArrayUint32( const Expr * A0, const SourceInfo &L) { |
9088 | if (!isActive()) return true; |
9089 | CurrentSource = L; |
9090 | return CheckNewTypeMismatchArray<PT_Uint32>(S, OpPC, A0); |
9091 | } |
9092 | bool EvalEmitter::emitCheckNewTypeMismatchArraySint64( const Expr * A0, const SourceInfo &L) { |
9093 | if (!isActive()) return true; |
9094 | CurrentSource = L; |
9095 | return CheckNewTypeMismatchArray<PT_Sint64>(S, OpPC, A0); |
9096 | } |
9097 | bool EvalEmitter::emitCheckNewTypeMismatchArrayUint64( const Expr * A0, const SourceInfo &L) { |
9098 | if (!isActive()) return true; |
9099 | CurrentSource = L; |
9100 | return CheckNewTypeMismatchArray<PT_Uint64>(S, OpPC, A0); |
9101 | } |
9102 | bool EvalEmitter::emitCheckNewTypeMismatchArrayIntAP( const Expr * A0, const SourceInfo &L) { |
9103 | if (!isActive()) return true; |
9104 | CurrentSource = L; |
9105 | return CheckNewTypeMismatchArray<PT_IntAP>(S, OpPC, A0); |
9106 | } |
9107 | bool EvalEmitter::emitCheckNewTypeMismatchArrayIntAPS( const Expr * A0, const SourceInfo &L) { |
9108 | if (!isActive()) return true; |
9109 | CurrentSource = L; |
9110 | return CheckNewTypeMismatchArray<PT_IntAPS>(S, OpPC, A0); |
9111 | } |
9112 | #endif |
9113 | #ifdef GET_OPCODE_NAMES |
9114 | OP_CheckNonNullArgPtr, |
9115 | OP_CheckNonNullArgMemberPtr, |
9116 | #endif |
9117 | #ifdef GET_INTERP |
9118 | case OP_CheckNonNullArgPtr: { |
9119 | if (!CheckNonNullArg<PT_Ptr>(S, OpPC)) |
9120 | return false; |
9121 | continue; |
9122 | } |
9123 | case OP_CheckNonNullArgMemberPtr: { |
9124 | if (!CheckNonNullArg<PT_MemberPtr>(S, OpPC)) |
9125 | return false; |
9126 | continue; |
9127 | } |
9128 | #endif |
9129 | #ifdef GET_DISASM |
9130 | case OP_CheckNonNullArgPtr: |
9131 | Text.Op = PrintName("CheckNonNullArgPtr" ); |
9132 | break; |
9133 | case OP_CheckNonNullArgMemberPtr: |
9134 | Text.Op = PrintName("CheckNonNullArgMemberPtr" ); |
9135 | break; |
9136 | #endif |
9137 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9138 | bool emitCheckNonNullArgPtr(const SourceInfo &); |
9139 | bool emitCheckNonNullArgMemberPtr(const SourceInfo &); |
9140 | #endif |
9141 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9142 | [[nodiscard]] bool emitCheckNonNullArg(PrimType, const SourceInfo &I); |
9143 | #endif |
9144 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
9145 | bool |
9146 | #if defined(GET_EVAL_IMPL) |
9147 | EvalEmitter |
9148 | #else |
9149 | ByteCodeEmitter |
9150 | #endif |
9151 | ::emitCheckNonNullArg(PrimType T0, const SourceInfo &I) { |
9152 | switch (T0) { |
9153 | case PT_Ptr: |
9154 | return emitCheckNonNullArgPtr(I); |
9155 | case PT_MemberPtr: |
9156 | return emitCheckNonNullArgMemberPtr(I); |
9157 | default: llvm_unreachable("invalid type: emitCheckNonNullArg" ); |
9158 | } |
9159 | llvm_unreachable("invalid enum value" ); |
9160 | } |
9161 | #endif |
9162 | #ifdef GET_LINK_IMPL |
9163 | bool ByteCodeEmitter::emitCheckNonNullArgPtr(const SourceInfo &L) { |
9164 | return emitOp<>(OP_CheckNonNullArgPtr, L); |
9165 | } |
9166 | bool ByteCodeEmitter::emitCheckNonNullArgMemberPtr(const SourceInfo &L) { |
9167 | return emitOp<>(OP_CheckNonNullArgMemberPtr, L); |
9168 | } |
9169 | #endif |
9170 | #ifdef GET_EVAL_IMPL |
9171 | bool EvalEmitter::emitCheckNonNullArgPtr(const SourceInfo &L) { |
9172 | if (!isActive()) return true; |
9173 | CurrentSource = L; |
9174 | return CheckNonNullArg<PT_Ptr>(S, OpPC); |
9175 | } |
9176 | bool EvalEmitter::emitCheckNonNullArgMemberPtr(const SourceInfo &L) { |
9177 | if (!isActive()) return true; |
9178 | CurrentSource = L; |
9179 | return CheckNonNullArg<PT_MemberPtr>(S, OpPC); |
9180 | } |
9181 | #endif |
9182 | #ifdef GET_OPCODE_NAMES |
9183 | OP_CheckPseudoDtor, |
9184 | #endif |
9185 | #ifdef GET_INTERP |
9186 | case OP_CheckPseudoDtor: { |
9187 | if (!CheckPseudoDtor(S, OpPC)) |
9188 | return false; |
9189 | continue; |
9190 | } |
9191 | #endif |
9192 | #ifdef GET_DISASM |
9193 | case OP_CheckPseudoDtor: |
9194 | Text.Op = PrintName("CheckPseudoDtor" ); |
9195 | break; |
9196 | #endif |
9197 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9198 | bool emitCheckPseudoDtor(const SourceInfo &); |
9199 | #endif |
9200 | #ifdef GET_LINK_IMPL |
9201 | bool ByteCodeEmitter::emitCheckPseudoDtor(const SourceInfo &L) { |
9202 | return emitOp<>(OP_CheckPseudoDtor, L); |
9203 | } |
9204 | #endif |
9205 | #ifdef GET_EVAL_IMPL |
9206 | bool EvalEmitter::emitCheckPseudoDtor(const SourceInfo &L) { |
9207 | if (!isActive()) return true; |
9208 | CurrentSource = L; |
9209 | return CheckPseudoDtor(S, OpPC); |
9210 | } |
9211 | #endif |
9212 | #ifdef GET_OPCODE_NAMES |
9213 | OP_CompSint8, |
9214 | OP_CompUint8, |
9215 | OP_CompSint16, |
9216 | OP_CompUint16, |
9217 | OP_CompSint32, |
9218 | OP_CompUint32, |
9219 | OP_CompSint64, |
9220 | OP_CompUint64, |
9221 | OP_CompIntAP, |
9222 | OP_CompIntAPS, |
9223 | #endif |
9224 | #ifdef GET_INTERP |
9225 | case OP_CompSint8: { |
9226 | if (!Comp<PT_Sint8>(S, OpPC)) |
9227 | return false; |
9228 | continue; |
9229 | } |
9230 | case OP_CompUint8: { |
9231 | if (!Comp<PT_Uint8>(S, OpPC)) |
9232 | return false; |
9233 | continue; |
9234 | } |
9235 | case OP_CompSint16: { |
9236 | if (!Comp<PT_Sint16>(S, OpPC)) |
9237 | return false; |
9238 | continue; |
9239 | } |
9240 | case OP_CompUint16: { |
9241 | if (!Comp<PT_Uint16>(S, OpPC)) |
9242 | return false; |
9243 | continue; |
9244 | } |
9245 | case OP_CompSint32: { |
9246 | if (!Comp<PT_Sint32>(S, OpPC)) |
9247 | return false; |
9248 | continue; |
9249 | } |
9250 | case OP_CompUint32: { |
9251 | if (!Comp<PT_Uint32>(S, OpPC)) |
9252 | return false; |
9253 | continue; |
9254 | } |
9255 | case OP_CompSint64: { |
9256 | if (!Comp<PT_Sint64>(S, OpPC)) |
9257 | return false; |
9258 | continue; |
9259 | } |
9260 | case OP_CompUint64: { |
9261 | if (!Comp<PT_Uint64>(S, OpPC)) |
9262 | return false; |
9263 | continue; |
9264 | } |
9265 | case OP_CompIntAP: { |
9266 | if (!Comp<PT_IntAP>(S, OpPC)) |
9267 | return false; |
9268 | continue; |
9269 | } |
9270 | case OP_CompIntAPS: { |
9271 | if (!Comp<PT_IntAPS>(S, OpPC)) |
9272 | return false; |
9273 | continue; |
9274 | } |
9275 | #endif |
9276 | #ifdef GET_DISASM |
9277 | case OP_CompSint8: |
9278 | Text.Op = PrintName("CompSint8" ); |
9279 | break; |
9280 | case OP_CompUint8: |
9281 | Text.Op = PrintName("CompUint8" ); |
9282 | break; |
9283 | case OP_CompSint16: |
9284 | Text.Op = PrintName("CompSint16" ); |
9285 | break; |
9286 | case OP_CompUint16: |
9287 | Text.Op = PrintName("CompUint16" ); |
9288 | break; |
9289 | case OP_CompSint32: |
9290 | Text.Op = PrintName("CompSint32" ); |
9291 | break; |
9292 | case OP_CompUint32: |
9293 | Text.Op = PrintName("CompUint32" ); |
9294 | break; |
9295 | case OP_CompSint64: |
9296 | Text.Op = PrintName("CompSint64" ); |
9297 | break; |
9298 | case OP_CompUint64: |
9299 | Text.Op = PrintName("CompUint64" ); |
9300 | break; |
9301 | case OP_CompIntAP: |
9302 | Text.Op = PrintName("CompIntAP" ); |
9303 | break; |
9304 | case OP_CompIntAPS: |
9305 | Text.Op = PrintName("CompIntAPS" ); |
9306 | break; |
9307 | #endif |
9308 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9309 | bool emitCompSint8(const SourceInfo &); |
9310 | bool emitCompUint8(const SourceInfo &); |
9311 | bool emitCompSint16(const SourceInfo &); |
9312 | bool emitCompUint16(const SourceInfo &); |
9313 | bool emitCompSint32(const SourceInfo &); |
9314 | bool emitCompUint32(const SourceInfo &); |
9315 | bool emitCompSint64(const SourceInfo &); |
9316 | bool emitCompUint64(const SourceInfo &); |
9317 | bool emitCompIntAP(const SourceInfo &); |
9318 | bool emitCompIntAPS(const SourceInfo &); |
9319 | #endif |
9320 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9321 | [[nodiscard]] bool emitComp(PrimType, const SourceInfo &I); |
9322 | #endif |
9323 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
9324 | bool |
9325 | #if defined(GET_EVAL_IMPL) |
9326 | EvalEmitter |
9327 | #else |
9328 | ByteCodeEmitter |
9329 | #endif |
9330 | ::emitComp(PrimType T0, const SourceInfo &I) { |
9331 | switch (T0) { |
9332 | case PT_Sint8: |
9333 | return emitCompSint8(I); |
9334 | case PT_Uint8: |
9335 | return emitCompUint8(I); |
9336 | case PT_Sint16: |
9337 | return emitCompSint16(I); |
9338 | case PT_Uint16: |
9339 | return emitCompUint16(I); |
9340 | case PT_Sint32: |
9341 | return emitCompSint32(I); |
9342 | case PT_Uint32: |
9343 | return emitCompUint32(I); |
9344 | case PT_Sint64: |
9345 | return emitCompSint64(I); |
9346 | case PT_Uint64: |
9347 | return emitCompUint64(I); |
9348 | case PT_IntAP: |
9349 | return emitCompIntAP(I); |
9350 | case PT_IntAPS: |
9351 | return emitCompIntAPS(I); |
9352 | default: llvm_unreachable("invalid type: emitComp" ); |
9353 | } |
9354 | llvm_unreachable("invalid enum value" ); |
9355 | } |
9356 | #endif |
9357 | #ifdef GET_LINK_IMPL |
9358 | bool ByteCodeEmitter::emitCompSint8(const SourceInfo &L) { |
9359 | return emitOp<>(OP_CompSint8, L); |
9360 | } |
9361 | bool ByteCodeEmitter::emitCompUint8(const SourceInfo &L) { |
9362 | return emitOp<>(OP_CompUint8, L); |
9363 | } |
9364 | bool ByteCodeEmitter::emitCompSint16(const SourceInfo &L) { |
9365 | return emitOp<>(OP_CompSint16, L); |
9366 | } |
9367 | bool ByteCodeEmitter::emitCompUint16(const SourceInfo &L) { |
9368 | return emitOp<>(OP_CompUint16, L); |
9369 | } |
9370 | bool ByteCodeEmitter::emitCompSint32(const SourceInfo &L) { |
9371 | return emitOp<>(OP_CompSint32, L); |
9372 | } |
9373 | bool ByteCodeEmitter::emitCompUint32(const SourceInfo &L) { |
9374 | return emitOp<>(OP_CompUint32, L); |
9375 | } |
9376 | bool ByteCodeEmitter::emitCompSint64(const SourceInfo &L) { |
9377 | return emitOp<>(OP_CompSint64, L); |
9378 | } |
9379 | bool ByteCodeEmitter::emitCompUint64(const SourceInfo &L) { |
9380 | return emitOp<>(OP_CompUint64, L); |
9381 | } |
9382 | bool ByteCodeEmitter::emitCompIntAP(const SourceInfo &L) { |
9383 | return emitOp<>(OP_CompIntAP, L); |
9384 | } |
9385 | bool ByteCodeEmitter::emitCompIntAPS(const SourceInfo &L) { |
9386 | return emitOp<>(OP_CompIntAPS, L); |
9387 | } |
9388 | #endif |
9389 | #ifdef GET_EVAL_IMPL |
9390 | bool EvalEmitter::emitCompSint8(const SourceInfo &L) { |
9391 | if (!isActive()) return true; |
9392 | CurrentSource = L; |
9393 | return Comp<PT_Sint8>(S, OpPC); |
9394 | } |
9395 | bool EvalEmitter::emitCompUint8(const SourceInfo &L) { |
9396 | if (!isActive()) return true; |
9397 | CurrentSource = L; |
9398 | return Comp<PT_Uint8>(S, OpPC); |
9399 | } |
9400 | bool EvalEmitter::emitCompSint16(const SourceInfo &L) { |
9401 | if (!isActive()) return true; |
9402 | CurrentSource = L; |
9403 | return Comp<PT_Sint16>(S, OpPC); |
9404 | } |
9405 | bool EvalEmitter::emitCompUint16(const SourceInfo &L) { |
9406 | if (!isActive()) return true; |
9407 | CurrentSource = L; |
9408 | return Comp<PT_Uint16>(S, OpPC); |
9409 | } |
9410 | bool EvalEmitter::emitCompSint32(const SourceInfo &L) { |
9411 | if (!isActive()) return true; |
9412 | CurrentSource = L; |
9413 | return Comp<PT_Sint32>(S, OpPC); |
9414 | } |
9415 | bool EvalEmitter::emitCompUint32(const SourceInfo &L) { |
9416 | if (!isActive()) return true; |
9417 | CurrentSource = L; |
9418 | return Comp<PT_Uint32>(S, OpPC); |
9419 | } |
9420 | bool EvalEmitter::emitCompSint64(const SourceInfo &L) { |
9421 | if (!isActive()) return true; |
9422 | CurrentSource = L; |
9423 | return Comp<PT_Sint64>(S, OpPC); |
9424 | } |
9425 | bool EvalEmitter::emitCompUint64(const SourceInfo &L) { |
9426 | if (!isActive()) return true; |
9427 | CurrentSource = L; |
9428 | return Comp<PT_Uint64>(S, OpPC); |
9429 | } |
9430 | bool EvalEmitter::emitCompIntAP(const SourceInfo &L) { |
9431 | if (!isActive()) return true; |
9432 | CurrentSource = L; |
9433 | return Comp<PT_IntAP>(S, OpPC); |
9434 | } |
9435 | bool EvalEmitter::emitCompIntAPS(const SourceInfo &L) { |
9436 | if (!isActive()) return true; |
9437 | CurrentSource = L; |
9438 | return Comp<PT_IntAPS>(S, OpPC); |
9439 | } |
9440 | #endif |
9441 | #ifdef GET_OPCODE_NAMES |
9442 | OP_ConstBool, |
9443 | #endif |
9444 | #ifdef GET_INTERP |
9445 | case OP_ConstBool: { |
9446 | const auto V0 = ReadArg<bool>(S, PC); |
9447 | if (!Const<PT_Bool>(S, OpPC, V0)) |
9448 | return false; |
9449 | continue; |
9450 | } |
9451 | #endif |
9452 | #ifdef GET_DISASM |
9453 | case OP_ConstBool: |
9454 | Text.Op = PrintName("ConstBool" ); |
9455 | Text.Args.push_back(printArg<bool>(P, PC)); |
9456 | break; |
9457 | #endif |
9458 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9459 | bool emitConstBool( bool , const SourceInfo &); |
9460 | #endif |
9461 | #ifdef GET_LINK_IMPL |
9462 | bool ByteCodeEmitter::emitConstBool( bool A0, const SourceInfo &L) { |
9463 | return emitOp<bool>(OP_ConstBool, A0, L); |
9464 | } |
9465 | #endif |
9466 | #ifdef GET_EVAL_IMPL |
9467 | bool EvalEmitter::emitConstBool( bool A0, const SourceInfo &L) { |
9468 | if (!isActive()) return true; |
9469 | CurrentSource = L; |
9470 | return Const<PT_Bool>(S, OpPC, A0); |
9471 | } |
9472 | #endif |
9473 | #ifdef GET_OPCODE_NAMES |
9474 | OP_ConstFixedPoint, |
9475 | #endif |
9476 | #ifdef GET_INTERP |
9477 | case OP_ConstFixedPoint: { |
9478 | const auto &V0 = ReadArg<FixedPoint>(S, PC); |
9479 | if (!Const<PT_FixedPoint>(S, OpPC, V0)) |
9480 | return false; |
9481 | continue; |
9482 | } |
9483 | #endif |
9484 | #ifdef GET_DISASM |
9485 | case OP_ConstFixedPoint: |
9486 | Text.Op = PrintName("ConstFixedPoint" ); |
9487 | Text.Args.push_back(printArg<FixedPoint>(P, PC)); |
9488 | break; |
9489 | #endif |
9490 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9491 | bool emitConstFixedPoint(const FixedPoint &, const SourceInfo &); |
9492 | #endif |
9493 | #ifdef GET_LINK_IMPL |
9494 | bool ByteCodeEmitter::emitConstFixedPoint(const FixedPoint &A0, const SourceInfo &L) { |
9495 | return emitOp<FixedPoint>(OP_ConstFixedPoint, A0, L); |
9496 | } |
9497 | #endif |
9498 | #ifdef GET_EVAL_IMPL |
9499 | bool EvalEmitter::emitConstFixedPoint(const FixedPoint &A0, const SourceInfo &L) { |
9500 | if (!isActive()) return true; |
9501 | CurrentSource = L; |
9502 | return Const<PT_FixedPoint>(S, OpPC, A0); |
9503 | } |
9504 | #endif |
9505 | #ifdef GET_OPCODE_NAMES |
9506 | OP_ConstFloat, |
9507 | #endif |
9508 | #ifdef GET_INTERP |
9509 | case OP_ConstFloat: { |
9510 | const auto &V0 = ReadArg<Floating>(S, PC); |
9511 | if (!ConstFloat(S, OpPC, V0)) |
9512 | return false; |
9513 | continue; |
9514 | } |
9515 | #endif |
9516 | #ifdef GET_DISASM |
9517 | case OP_ConstFloat: |
9518 | Text.Op = PrintName("ConstFloat" ); |
9519 | Text.Args.push_back(printArg<Floating>(P, PC)); |
9520 | break; |
9521 | #endif |
9522 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9523 | bool emitConstFloat(const Floating &, const SourceInfo &); |
9524 | #endif |
9525 | #ifdef GET_LINK_IMPL |
9526 | bool ByteCodeEmitter::emitConstFloat(const Floating &A0, const SourceInfo &L) { |
9527 | return emitOp<Floating>(OP_ConstFloat, A0, L); |
9528 | } |
9529 | #endif |
9530 | #ifdef GET_EVAL_IMPL |
9531 | bool EvalEmitter::emitConstFloat(const Floating &A0, const SourceInfo &L) { |
9532 | if (!isActive()) return true; |
9533 | CurrentSource = L; |
9534 | return ConstFloat(S, OpPC, A0); |
9535 | } |
9536 | #endif |
9537 | #ifdef GET_OPCODE_NAMES |
9538 | OP_ConstIntAP, |
9539 | #endif |
9540 | #ifdef GET_INTERP |
9541 | case OP_ConstIntAP: { |
9542 | const auto &V0 = ReadArg<IntegralAP<false>>(S, PC); |
9543 | if (!Const<PT_IntAP>(S, OpPC, V0)) |
9544 | return false; |
9545 | continue; |
9546 | } |
9547 | #endif |
9548 | #ifdef GET_DISASM |
9549 | case OP_ConstIntAP: |
9550 | Text.Op = PrintName("ConstIntAP" ); |
9551 | Text.Args.push_back(printArg<IntegralAP<false>>(P, PC)); |
9552 | break; |
9553 | #endif |
9554 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9555 | bool emitConstIntAP(const IntegralAP<false> &, const SourceInfo &); |
9556 | #endif |
9557 | #ifdef GET_LINK_IMPL |
9558 | bool ByteCodeEmitter::emitConstIntAP(const IntegralAP<false> &A0, const SourceInfo &L) { |
9559 | return emitOp<IntegralAP<false>>(OP_ConstIntAP, A0, L); |
9560 | } |
9561 | #endif |
9562 | #ifdef GET_EVAL_IMPL |
9563 | bool EvalEmitter::emitConstIntAP(const IntegralAP<false> &A0, const SourceInfo &L) { |
9564 | if (!isActive()) return true; |
9565 | CurrentSource = L; |
9566 | return Const<PT_IntAP>(S, OpPC, A0); |
9567 | } |
9568 | #endif |
9569 | #ifdef GET_OPCODE_NAMES |
9570 | OP_ConstIntAPS, |
9571 | #endif |
9572 | #ifdef GET_INTERP |
9573 | case OP_ConstIntAPS: { |
9574 | const auto &V0 = ReadArg<IntegralAP<true>>(S, PC); |
9575 | if (!Const<PT_IntAPS>(S, OpPC, V0)) |
9576 | return false; |
9577 | continue; |
9578 | } |
9579 | #endif |
9580 | #ifdef GET_DISASM |
9581 | case OP_ConstIntAPS: |
9582 | Text.Op = PrintName("ConstIntAPS" ); |
9583 | Text.Args.push_back(printArg<IntegralAP<true>>(P, PC)); |
9584 | break; |
9585 | #endif |
9586 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9587 | bool emitConstIntAPS(const IntegralAP<true> &, const SourceInfo &); |
9588 | #endif |
9589 | #ifdef GET_LINK_IMPL |
9590 | bool ByteCodeEmitter::emitConstIntAPS(const IntegralAP<true> &A0, const SourceInfo &L) { |
9591 | return emitOp<IntegralAP<true>>(OP_ConstIntAPS, A0, L); |
9592 | } |
9593 | #endif |
9594 | #ifdef GET_EVAL_IMPL |
9595 | bool EvalEmitter::emitConstIntAPS(const IntegralAP<true> &A0, const SourceInfo &L) { |
9596 | if (!isActive()) return true; |
9597 | CurrentSource = L; |
9598 | return Const<PT_IntAPS>(S, OpPC, A0); |
9599 | } |
9600 | #endif |
9601 | #ifdef GET_OPCODE_NAMES |
9602 | OP_ConstSint8, |
9603 | #endif |
9604 | #ifdef GET_INTERP |
9605 | case OP_ConstSint8: { |
9606 | const auto V0 = ReadArg<int8_t>(S, PC); |
9607 | if (!Const<PT_Sint8>(S, OpPC, V0)) |
9608 | return false; |
9609 | continue; |
9610 | } |
9611 | #endif |
9612 | #ifdef GET_DISASM |
9613 | case OP_ConstSint8: |
9614 | Text.Op = PrintName("ConstSint8" ); |
9615 | Text.Args.push_back(printArg<int8_t>(P, PC)); |
9616 | break; |
9617 | #endif |
9618 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9619 | bool emitConstSint8( int8_t , const SourceInfo &); |
9620 | #endif |
9621 | #ifdef GET_LINK_IMPL |
9622 | bool ByteCodeEmitter::emitConstSint8( int8_t A0, const SourceInfo &L) { |
9623 | return emitOp<int8_t>(OP_ConstSint8, A0, L); |
9624 | } |
9625 | #endif |
9626 | #ifdef GET_EVAL_IMPL |
9627 | bool EvalEmitter::emitConstSint8( int8_t A0, const SourceInfo &L) { |
9628 | if (!isActive()) return true; |
9629 | CurrentSource = L; |
9630 | return Const<PT_Sint8>(S, OpPC, A0); |
9631 | } |
9632 | #endif |
9633 | #ifdef GET_OPCODE_NAMES |
9634 | OP_ConstSint16, |
9635 | #endif |
9636 | #ifdef GET_INTERP |
9637 | case OP_ConstSint16: { |
9638 | const auto V0 = ReadArg<int16_t>(S, PC); |
9639 | if (!Const<PT_Sint16>(S, OpPC, V0)) |
9640 | return false; |
9641 | continue; |
9642 | } |
9643 | #endif |
9644 | #ifdef GET_DISASM |
9645 | case OP_ConstSint16: |
9646 | Text.Op = PrintName("ConstSint16" ); |
9647 | Text.Args.push_back(printArg<int16_t>(P, PC)); |
9648 | break; |
9649 | #endif |
9650 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9651 | bool emitConstSint16( int16_t , const SourceInfo &); |
9652 | #endif |
9653 | #ifdef GET_LINK_IMPL |
9654 | bool ByteCodeEmitter::emitConstSint16( int16_t A0, const SourceInfo &L) { |
9655 | return emitOp<int16_t>(OP_ConstSint16, A0, L); |
9656 | } |
9657 | #endif |
9658 | #ifdef GET_EVAL_IMPL |
9659 | bool EvalEmitter::emitConstSint16( int16_t A0, const SourceInfo &L) { |
9660 | if (!isActive()) return true; |
9661 | CurrentSource = L; |
9662 | return Const<PT_Sint16>(S, OpPC, A0); |
9663 | } |
9664 | #endif |
9665 | #ifdef GET_OPCODE_NAMES |
9666 | OP_ConstSint32, |
9667 | #endif |
9668 | #ifdef GET_INTERP |
9669 | case OP_ConstSint32: { |
9670 | const auto V0 = ReadArg<int32_t>(S, PC); |
9671 | if (!Const<PT_Sint32>(S, OpPC, V0)) |
9672 | return false; |
9673 | continue; |
9674 | } |
9675 | #endif |
9676 | #ifdef GET_DISASM |
9677 | case OP_ConstSint32: |
9678 | Text.Op = PrintName("ConstSint32" ); |
9679 | Text.Args.push_back(printArg<int32_t>(P, PC)); |
9680 | break; |
9681 | #endif |
9682 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9683 | bool emitConstSint32( int32_t , const SourceInfo &); |
9684 | #endif |
9685 | #ifdef GET_LINK_IMPL |
9686 | bool ByteCodeEmitter::emitConstSint32( int32_t A0, const SourceInfo &L) { |
9687 | return emitOp<int32_t>(OP_ConstSint32, A0, L); |
9688 | } |
9689 | #endif |
9690 | #ifdef GET_EVAL_IMPL |
9691 | bool EvalEmitter::emitConstSint32( int32_t A0, const SourceInfo &L) { |
9692 | if (!isActive()) return true; |
9693 | CurrentSource = L; |
9694 | return Const<PT_Sint32>(S, OpPC, A0); |
9695 | } |
9696 | #endif |
9697 | #ifdef GET_OPCODE_NAMES |
9698 | OP_ConstSint64, |
9699 | #endif |
9700 | #ifdef GET_INTERP |
9701 | case OP_ConstSint64: { |
9702 | const auto V0 = ReadArg<int64_t>(S, PC); |
9703 | if (!Const<PT_Sint64>(S, OpPC, V0)) |
9704 | return false; |
9705 | continue; |
9706 | } |
9707 | #endif |
9708 | #ifdef GET_DISASM |
9709 | case OP_ConstSint64: |
9710 | Text.Op = PrintName("ConstSint64" ); |
9711 | Text.Args.push_back(printArg<int64_t>(P, PC)); |
9712 | break; |
9713 | #endif |
9714 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9715 | bool emitConstSint64( int64_t , const SourceInfo &); |
9716 | #endif |
9717 | #ifdef GET_LINK_IMPL |
9718 | bool ByteCodeEmitter::emitConstSint64( int64_t A0, const SourceInfo &L) { |
9719 | return emitOp<int64_t>(OP_ConstSint64, A0, L); |
9720 | } |
9721 | #endif |
9722 | #ifdef GET_EVAL_IMPL |
9723 | bool EvalEmitter::emitConstSint64( int64_t A0, const SourceInfo &L) { |
9724 | if (!isActive()) return true; |
9725 | CurrentSource = L; |
9726 | return Const<PT_Sint64>(S, OpPC, A0); |
9727 | } |
9728 | #endif |
9729 | #ifdef GET_OPCODE_NAMES |
9730 | OP_ConstUint8, |
9731 | #endif |
9732 | #ifdef GET_INTERP |
9733 | case OP_ConstUint8: { |
9734 | const auto V0 = ReadArg<uint8_t>(S, PC); |
9735 | if (!Const<PT_Uint8>(S, OpPC, V0)) |
9736 | return false; |
9737 | continue; |
9738 | } |
9739 | #endif |
9740 | #ifdef GET_DISASM |
9741 | case OP_ConstUint8: |
9742 | Text.Op = PrintName("ConstUint8" ); |
9743 | Text.Args.push_back(printArg<uint8_t>(P, PC)); |
9744 | break; |
9745 | #endif |
9746 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9747 | bool emitConstUint8( uint8_t , const SourceInfo &); |
9748 | #endif |
9749 | #ifdef GET_LINK_IMPL |
9750 | bool ByteCodeEmitter::emitConstUint8( uint8_t A0, const SourceInfo &L) { |
9751 | return emitOp<uint8_t>(OP_ConstUint8, A0, L); |
9752 | } |
9753 | #endif |
9754 | #ifdef GET_EVAL_IMPL |
9755 | bool EvalEmitter::emitConstUint8( uint8_t A0, const SourceInfo &L) { |
9756 | if (!isActive()) return true; |
9757 | CurrentSource = L; |
9758 | return Const<PT_Uint8>(S, OpPC, A0); |
9759 | } |
9760 | #endif |
9761 | #ifdef GET_OPCODE_NAMES |
9762 | OP_ConstUint16, |
9763 | #endif |
9764 | #ifdef GET_INTERP |
9765 | case OP_ConstUint16: { |
9766 | const auto V0 = ReadArg<uint16_t>(S, PC); |
9767 | if (!Const<PT_Uint16>(S, OpPC, V0)) |
9768 | return false; |
9769 | continue; |
9770 | } |
9771 | #endif |
9772 | #ifdef GET_DISASM |
9773 | case OP_ConstUint16: |
9774 | Text.Op = PrintName("ConstUint16" ); |
9775 | Text.Args.push_back(printArg<uint16_t>(P, PC)); |
9776 | break; |
9777 | #endif |
9778 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9779 | bool emitConstUint16( uint16_t , const SourceInfo &); |
9780 | #endif |
9781 | #ifdef GET_LINK_IMPL |
9782 | bool ByteCodeEmitter::emitConstUint16( uint16_t A0, const SourceInfo &L) { |
9783 | return emitOp<uint16_t>(OP_ConstUint16, A0, L); |
9784 | } |
9785 | #endif |
9786 | #ifdef GET_EVAL_IMPL |
9787 | bool EvalEmitter::emitConstUint16( uint16_t A0, const SourceInfo &L) { |
9788 | if (!isActive()) return true; |
9789 | CurrentSource = L; |
9790 | return Const<PT_Uint16>(S, OpPC, A0); |
9791 | } |
9792 | #endif |
9793 | #ifdef GET_OPCODE_NAMES |
9794 | OP_ConstUint32, |
9795 | #endif |
9796 | #ifdef GET_INTERP |
9797 | case OP_ConstUint32: { |
9798 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9799 | if (!Const<PT_Uint32>(S, OpPC, V0)) |
9800 | return false; |
9801 | continue; |
9802 | } |
9803 | #endif |
9804 | #ifdef GET_DISASM |
9805 | case OP_ConstUint32: |
9806 | Text.Op = PrintName("ConstUint32" ); |
9807 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
9808 | break; |
9809 | #endif |
9810 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9811 | bool emitConstUint32( uint32_t , const SourceInfo &); |
9812 | #endif |
9813 | #ifdef GET_LINK_IMPL |
9814 | bool ByteCodeEmitter::emitConstUint32( uint32_t A0, const SourceInfo &L) { |
9815 | return emitOp<uint32_t>(OP_ConstUint32, A0, L); |
9816 | } |
9817 | #endif |
9818 | #ifdef GET_EVAL_IMPL |
9819 | bool EvalEmitter::emitConstUint32( uint32_t A0, const SourceInfo &L) { |
9820 | if (!isActive()) return true; |
9821 | CurrentSource = L; |
9822 | return Const<PT_Uint32>(S, OpPC, A0); |
9823 | } |
9824 | #endif |
9825 | #ifdef GET_OPCODE_NAMES |
9826 | OP_ConstUint64, |
9827 | #endif |
9828 | #ifdef GET_INTERP |
9829 | case OP_ConstUint64: { |
9830 | const auto V0 = ReadArg<uint64_t>(S, PC); |
9831 | if (!Const<PT_Uint64>(S, OpPC, V0)) |
9832 | return false; |
9833 | continue; |
9834 | } |
9835 | #endif |
9836 | #ifdef GET_DISASM |
9837 | case OP_ConstUint64: |
9838 | Text.Op = PrintName("ConstUint64" ); |
9839 | Text.Args.push_back(printArg<uint64_t>(P, PC)); |
9840 | break; |
9841 | #endif |
9842 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9843 | bool emitConstUint64( uint64_t , const SourceInfo &); |
9844 | #endif |
9845 | #ifdef GET_LINK_IMPL |
9846 | bool ByteCodeEmitter::emitConstUint64( uint64_t A0, const SourceInfo &L) { |
9847 | return emitOp<uint64_t>(OP_ConstUint64, A0, L); |
9848 | } |
9849 | #endif |
9850 | #ifdef GET_EVAL_IMPL |
9851 | bool EvalEmitter::emitConstUint64( uint64_t A0, const SourceInfo &L) { |
9852 | if (!isActive()) return true; |
9853 | CurrentSource = L; |
9854 | return Const<PT_Uint64>(S, OpPC, A0); |
9855 | } |
9856 | #endif |
9857 | #ifdef GET_OPCODE_NAMES |
9858 | OP_CopyArraySint8, |
9859 | OP_CopyArrayUint8, |
9860 | OP_CopyArraySint16, |
9861 | OP_CopyArrayUint16, |
9862 | OP_CopyArraySint32, |
9863 | OP_CopyArrayUint32, |
9864 | OP_CopyArraySint64, |
9865 | OP_CopyArrayUint64, |
9866 | OP_CopyArrayIntAP, |
9867 | OP_CopyArrayIntAPS, |
9868 | OP_CopyArrayBool, |
9869 | OP_CopyArrayFixedPoint, |
9870 | OP_CopyArrayPtr, |
9871 | OP_CopyArrayMemberPtr, |
9872 | OP_CopyArrayFloat, |
9873 | #endif |
9874 | #ifdef GET_INTERP |
9875 | case OP_CopyArraySint8: { |
9876 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9877 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9878 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9879 | if (!CopyArray<PT_Sint8>(S, OpPC, V0, V1, V2)) |
9880 | return false; |
9881 | continue; |
9882 | } |
9883 | case OP_CopyArrayUint8: { |
9884 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9885 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9886 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9887 | if (!CopyArray<PT_Uint8>(S, OpPC, V0, V1, V2)) |
9888 | return false; |
9889 | continue; |
9890 | } |
9891 | case OP_CopyArraySint16: { |
9892 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9893 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9894 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9895 | if (!CopyArray<PT_Sint16>(S, OpPC, V0, V1, V2)) |
9896 | return false; |
9897 | continue; |
9898 | } |
9899 | case OP_CopyArrayUint16: { |
9900 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9901 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9902 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9903 | if (!CopyArray<PT_Uint16>(S, OpPC, V0, V1, V2)) |
9904 | return false; |
9905 | continue; |
9906 | } |
9907 | case OP_CopyArraySint32: { |
9908 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9909 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9910 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9911 | if (!CopyArray<PT_Sint32>(S, OpPC, V0, V1, V2)) |
9912 | return false; |
9913 | continue; |
9914 | } |
9915 | case OP_CopyArrayUint32: { |
9916 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9917 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9918 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9919 | if (!CopyArray<PT_Uint32>(S, OpPC, V0, V1, V2)) |
9920 | return false; |
9921 | continue; |
9922 | } |
9923 | case OP_CopyArraySint64: { |
9924 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9925 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9926 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9927 | if (!CopyArray<PT_Sint64>(S, OpPC, V0, V1, V2)) |
9928 | return false; |
9929 | continue; |
9930 | } |
9931 | case OP_CopyArrayUint64: { |
9932 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9933 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9934 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9935 | if (!CopyArray<PT_Uint64>(S, OpPC, V0, V1, V2)) |
9936 | return false; |
9937 | continue; |
9938 | } |
9939 | case OP_CopyArrayIntAP: { |
9940 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9941 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9942 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9943 | if (!CopyArray<PT_IntAP>(S, OpPC, V0, V1, V2)) |
9944 | return false; |
9945 | continue; |
9946 | } |
9947 | case OP_CopyArrayIntAPS: { |
9948 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9949 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9950 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9951 | if (!CopyArray<PT_IntAPS>(S, OpPC, V0, V1, V2)) |
9952 | return false; |
9953 | continue; |
9954 | } |
9955 | case OP_CopyArrayBool: { |
9956 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9957 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9958 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9959 | if (!CopyArray<PT_Bool>(S, OpPC, V0, V1, V2)) |
9960 | return false; |
9961 | continue; |
9962 | } |
9963 | case OP_CopyArrayFixedPoint: { |
9964 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9965 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9966 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9967 | if (!CopyArray<PT_FixedPoint>(S, OpPC, V0, V1, V2)) |
9968 | return false; |
9969 | continue; |
9970 | } |
9971 | case OP_CopyArrayPtr: { |
9972 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9973 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9974 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9975 | if (!CopyArray<PT_Ptr>(S, OpPC, V0, V1, V2)) |
9976 | return false; |
9977 | continue; |
9978 | } |
9979 | case OP_CopyArrayMemberPtr: { |
9980 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9981 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9982 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9983 | if (!CopyArray<PT_MemberPtr>(S, OpPC, V0, V1, V2)) |
9984 | return false; |
9985 | continue; |
9986 | } |
9987 | case OP_CopyArrayFloat: { |
9988 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9989 | const auto V1 = ReadArg<uint32_t>(S, PC); |
9990 | const auto V2 = ReadArg<uint32_t>(S, PC); |
9991 | if (!CopyArray<PT_Float>(S, OpPC, V0, V1, V2)) |
9992 | return false; |
9993 | continue; |
9994 | } |
9995 | #endif |
9996 | #ifdef GET_DISASM |
9997 | case OP_CopyArraySint8: |
9998 | Text.Op = PrintName("CopyArraySint8" ); |
9999 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10000 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10001 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10002 | break; |
10003 | case OP_CopyArrayUint8: |
10004 | Text.Op = PrintName("CopyArrayUint8" ); |
10005 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10006 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10007 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10008 | break; |
10009 | case OP_CopyArraySint16: |
10010 | Text.Op = PrintName("CopyArraySint16" ); |
10011 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10012 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10013 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10014 | break; |
10015 | case OP_CopyArrayUint16: |
10016 | Text.Op = PrintName("CopyArrayUint16" ); |
10017 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10018 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10019 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10020 | break; |
10021 | case OP_CopyArraySint32: |
10022 | Text.Op = PrintName("CopyArraySint32" ); |
10023 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10024 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10025 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10026 | break; |
10027 | case OP_CopyArrayUint32: |
10028 | Text.Op = PrintName("CopyArrayUint32" ); |
10029 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10030 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10031 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10032 | break; |
10033 | case OP_CopyArraySint64: |
10034 | Text.Op = PrintName("CopyArraySint64" ); |
10035 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10036 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10037 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10038 | break; |
10039 | case OP_CopyArrayUint64: |
10040 | Text.Op = PrintName("CopyArrayUint64" ); |
10041 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10042 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10043 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10044 | break; |
10045 | case OP_CopyArrayIntAP: |
10046 | Text.Op = PrintName("CopyArrayIntAP" ); |
10047 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10048 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10049 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10050 | break; |
10051 | case OP_CopyArrayIntAPS: |
10052 | Text.Op = PrintName("CopyArrayIntAPS" ); |
10053 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10054 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10055 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10056 | break; |
10057 | case OP_CopyArrayBool: |
10058 | Text.Op = PrintName("CopyArrayBool" ); |
10059 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10060 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10061 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10062 | break; |
10063 | case OP_CopyArrayFixedPoint: |
10064 | Text.Op = PrintName("CopyArrayFixedPoint" ); |
10065 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10066 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10067 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10068 | break; |
10069 | case OP_CopyArrayPtr: |
10070 | Text.Op = PrintName("CopyArrayPtr" ); |
10071 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10072 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10073 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10074 | break; |
10075 | case OP_CopyArrayMemberPtr: |
10076 | Text.Op = PrintName("CopyArrayMemberPtr" ); |
10077 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10078 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10079 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10080 | break; |
10081 | case OP_CopyArrayFloat: |
10082 | Text.Op = PrintName("CopyArrayFloat" ); |
10083 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10084 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10085 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
10086 | break; |
10087 | #endif |
10088 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10089 | bool emitCopyArraySint8( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10090 | bool emitCopyArrayUint8( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10091 | bool emitCopyArraySint16( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10092 | bool emitCopyArrayUint16( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10093 | bool emitCopyArraySint32( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10094 | bool emitCopyArrayUint32( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10095 | bool emitCopyArraySint64( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10096 | bool emitCopyArrayUint64( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10097 | bool emitCopyArrayIntAP( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10098 | bool emitCopyArrayIntAPS( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10099 | bool emitCopyArrayBool( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10100 | bool emitCopyArrayFixedPoint( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10101 | bool emitCopyArrayPtr( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10102 | bool emitCopyArrayMemberPtr( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10103 | bool emitCopyArrayFloat( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
10104 | #endif |
10105 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10106 | [[nodiscard]] bool emitCopyArray(PrimType, uint32_t, uint32_t, uint32_t, const SourceInfo &I); |
10107 | #endif |
10108 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
10109 | bool |
10110 | #if defined(GET_EVAL_IMPL) |
10111 | EvalEmitter |
10112 | #else |
10113 | ByteCodeEmitter |
10114 | #endif |
10115 | ::emitCopyArray(PrimType T0, uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &I) { |
10116 | switch (T0) { |
10117 | case PT_Sint8: |
10118 | return emitCopyArraySint8(A0, A1, A2, I); |
10119 | case PT_Uint8: |
10120 | return emitCopyArrayUint8(A0, A1, A2, I); |
10121 | case PT_Sint16: |
10122 | return emitCopyArraySint16(A0, A1, A2, I); |
10123 | case PT_Uint16: |
10124 | return emitCopyArrayUint16(A0, A1, A2, I); |
10125 | case PT_Sint32: |
10126 | return emitCopyArraySint32(A0, A1, A2, I); |
10127 | case PT_Uint32: |
10128 | return emitCopyArrayUint32(A0, A1, A2, I); |
10129 | case PT_Sint64: |
10130 | return emitCopyArraySint64(A0, A1, A2, I); |
10131 | case PT_Uint64: |
10132 | return emitCopyArrayUint64(A0, A1, A2, I); |
10133 | case PT_IntAP: |
10134 | return emitCopyArrayIntAP(A0, A1, A2, I); |
10135 | case PT_IntAPS: |
10136 | return emitCopyArrayIntAPS(A0, A1, A2, I); |
10137 | case PT_Bool: |
10138 | return emitCopyArrayBool(A0, A1, A2, I); |
10139 | case PT_FixedPoint: |
10140 | return emitCopyArrayFixedPoint(A0, A1, A2, I); |
10141 | case PT_Ptr: |
10142 | return emitCopyArrayPtr(A0, A1, A2, I); |
10143 | case PT_MemberPtr: |
10144 | return emitCopyArrayMemberPtr(A0, A1, A2, I); |
10145 | case PT_Float: |
10146 | return emitCopyArrayFloat(A0, A1, A2, I); |
10147 | } |
10148 | llvm_unreachable("invalid enum value" ); |
10149 | } |
10150 | #endif |
10151 | #ifdef GET_LINK_IMPL |
10152 | bool ByteCodeEmitter::emitCopyArraySint8( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10153 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArraySint8, A0, A1, A2, L); |
10154 | } |
10155 | bool ByteCodeEmitter::emitCopyArrayUint8( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10156 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayUint8, A0, A1, A2, L); |
10157 | } |
10158 | bool ByteCodeEmitter::emitCopyArraySint16( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10159 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArraySint16, A0, A1, A2, L); |
10160 | } |
10161 | bool ByteCodeEmitter::emitCopyArrayUint16( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10162 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayUint16, A0, A1, A2, L); |
10163 | } |
10164 | bool ByteCodeEmitter::emitCopyArraySint32( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10165 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArraySint32, A0, A1, A2, L); |
10166 | } |
10167 | bool ByteCodeEmitter::emitCopyArrayUint32( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10168 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayUint32, A0, A1, A2, L); |
10169 | } |
10170 | bool ByteCodeEmitter::emitCopyArraySint64( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10171 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArraySint64, A0, A1, A2, L); |
10172 | } |
10173 | bool ByteCodeEmitter::emitCopyArrayUint64( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10174 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayUint64, A0, A1, A2, L); |
10175 | } |
10176 | bool ByteCodeEmitter::emitCopyArrayIntAP( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10177 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayIntAP, A0, A1, A2, L); |
10178 | } |
10179 | bool ByteCodeEmitter::emitCopyArrayIntAPS( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10180 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayIntAPS, A0, A1, A2, L); |
10181 | } |
10182 | bool ByteCodeEmitter::emitCopyArrayBool( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10183 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayBool, A0, A1, A2, L); |
10184 | } |
10185 | bool ByteCodeEmitter::emitCopyArrayFixedPoint( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10186 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayFixedPoint, A0, A1, A2, L); |
10187 | } |
10188 | bool ByteCodeEmitter::emitCopyArrayPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10189 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayPtr, A0, A1, A2, L); |
10190 | } |
10191 | bool ByteCodeEmitter::emitCopyArrayMemberPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10192 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayMemberPtr, A0, A1, A2, L); |
10193 | } |
10194 | bool ByteCodeEmitter::emitCopyArrayFloat( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10195 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayFloat, A0, A1, A2, L); |
10196 | } |
10197 | #endif |
10198 | #ifdef GET_EVAL_IMPL |
10199 | bool EvalEmitter::emitCopyArraySint8( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10200 | if (!isActive()) return true; |
10201 | CurrentSource = L; |
10202 | return CopyArray<PT_Sint8>(S, OpPC, A0, A1, A2); |
10203 | } |
10204 | bool EvalEmitter::emitCopyArrayUint8( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10205 | if (!isActive()) return true; |
10206 | CurrentSource = L; |
10207 | return CopyArray<PT_Uint8>(S, OpPC, A0, A1, A2); |
10208 | } |
10209 | bool EvalEmitter::emitCopyArraySint16( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10210 | if (!isActive()) return true; |
10211 | CurrentSource = L; |
10212 | return CopyArray<PT_Sint16>(S, OpPC, A0, A1, A2); |
10213 | } |
10214 | bool EvalEmitter::emitCopyArrayUint16( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10215 | if (!isActive()) return true; |
10216 | CurrentSource = L; |
10217 | return CopyArray<PT_Uint16>(S, OpPC, A0, A1, A2); |
10218 | } |
10219 | bool EvalEmitter::emitCopyArraySint32( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10220 | if (!isActive()) return true; |
10221 | CurrentSource = L; |
10222 | return CopyArray<PT_Sint32>(S, OpPC, A0, A1, A2); |
10223 | } |
10224 | bool EvalEmitter::emitCopyArrayUint32( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10225 | if (!isActive()) return true; |
10226 | CurrentSource = L; |
10227 | return CopyArray<PT_Uint32>(S, OpPC, A0, A1, A2); |
10228 | } |
10229 | bool EvalEmitter::emitCopyArraySint64( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10230 | if (!isActive()) return true; |
10231 | CurrentSource = L; |
10232 | return CopyArray<PT_Sint64>(S, OpPC, A0, A1, A2); |
10233 | } |
10234 | bool EvalEmitter::emitCopyArrayUint64( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10235 | if (!isActive()) return true; |
10236 | CurrentSource = L; |
10237 | return CopyArray<PT_Uint64>(S, OpPC, A0, A1, A2); |
10238 | } |
10239 | bool EvalEmitter::emitCopyArrayIntAP( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10240 | if (!isActive()) return true; |
10241 | CurrentSource = L; |
10242 | return CopyArray<PT_IntAP>(S, OpPC, A0, A1, A2); |
10243 | } |
10244 | bool EvalEmitter::emitCopyArrayIntAPS( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10245 | if (!isActive()) return true; |
10246 | CurrentSource = L; |
10247 | return CopyArray<PT_IntAPS>(S, OpPC, A0, A1, A2); |
10248 | } |
10249 | bool EvalEmitter::emitCopyArrayBool( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10250 | if (!isActive()) return true; |
10251 | CurrentSource = L; |
10252 | return CopyArray<PT_Bool>(S, OpPC, A0, A1, A2); |
10253 | } |
10254 | bool EvalEmitter::emitCopyArrayFixedPoint( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10255 | if (!isActive()) return true; |
10256 | CurrentSource = L; |
10257 | return CopyArray<PT_FixedPoint>(S, OpPC, A0, A1, A2); |
10258 | } |
10259 | bool EvalEmitter::emitCopyArrayPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10260 | if (!isActive()) return true; |
10261 | CurrentSource = L; |
10262 | return CopyArray<PT_Ptr>(S, OpPC, A0, A1, A2); |
10263 | } |
10264 | bool EvalEmitter::emitCopyArrayMemberPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10265 | if (!isActive()) return true; |
10266 | CurrentSource = L; |
10267 | return CopyArray<PT_MemberPtr>(S, OpPC, A0, A1, A2); |
10268 | } |
10269 | bool EvalEmitter::emitCopyArrayFloat( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
10270 | if (!isActive()) return true; |
10271 | CurrentSource = L; |
10272 | return CopyArray<PT_Float>(S, OpPC, A0, A1, A2); |
10273 | } |
10274 | #endif |
10275 | #ifdef GET_OPCODE_NAMES |
10276 | OP_DecSint8, |
10277 | OP_DecUint8, |
10278 | OP_DecSint16, |
10279 | OP_DecUint16, |
10280 | OP_DecSint32, |
10281 | OP_DecUint32, |
10282 | OP_DecSint64, |
10283 | OP_DecUint64, |
10284 | OP_DecIntAP, |
10285 | OP_DecIntAPS, |
10286 | OP_DecBool, |
10287 | OP_DecFixedPoint, |
10288 | #endif |
10289 | #ifdef GET_INTERP |
10290 | case OP_DecSint8: { |
10291 | const auto V0 = ReadArg<bool>(S, PC); |
10292 | if (!Dec<PT_Sint8>(S, OpPC, V0)) |
10293 | return false; |
10294 | continue; |
10295 | } |
10296 | case OP_DecUint8: { |
10297 | const auto V0 = ReadArg<bool>(S, PC); |
10298 | if (!Dec<PT_Uint8>(S, OpPC, V0)) |
10299 | return false; |
10300 | continue; |
10301 | } |
10302 | case OP_DecSint16: { |
10303 | const auto V0 = ReadArg<bool>(S, PC); |
10304 | if (!Dec<PT_Sint16>(S, OpPC, V0)) |
10305 | return false; |
10306 | continue; |
10307 | } |
10308 | case OP_DecUint16: { |
10309 | const auto V0 = ReadArg<bool>(S, PC); |
10310 | if (!Dec<PT_Uint16>(S, OpPC, V0)) |
10311 | return false; |
10312 | continue; |
10313 | } |
10314 | case OP_DecSint32: { |
10315 | const auto V0 = ReadArg<bool>(S, PC); |
10316 | if (!Dec<PT_Sint32>(S, OpPC, V0)) |
10317 | return false; |
10318 | continue; |
10319 | } |
10320 | case OP_DecUint32: { |
10321 | const auto V0 = ReadArg<bool>(S, PC); |
10322 | if (!Dec<PT_Uint32>(S, OpPC, V0)) |
10323 | return false; |
10324 | continue; |
10325 | } |
10326 | case OP_DecSint64: { |
10327 | const auto V0 = ReadArg<bool>(S, PC); |
10328 | if (!Dec<PT_Sint64>(S, OpPC, V0)) |
10329 | return false; |
10330 | continue; |
10331 | } |
10332 | case OP_DecUint64: { |
10333 | const auto V0 = ReadArg<bool>(S, PC); |
10334 | if (!Dec<PT_Uint64>(S, OpPC, V0)) |
10335 | return false; |
10336 | continue; |
10337 | } |
10338 | case OP_DecIntAP: { |
10339 | const auto V0 = ReadArg<bool>(S, PC); |
10340 | if (!Dec<PT_IntAP>(S, OpPC, V0)) |
10341 | return false; |
10342 | continue; |
10343 | } |
10344 | case OP_DecIntAPS: { |
10345 | const auto V0 = ReadArg<bool>(S, PC); |
10346 | if (!Dec<PT_IntAPS>(S, OpPC, V0)) |
10347 | return false; |
10348 | continue; |
10349 | } |
10350 | case OP_DecBool: { |
10351 | const auto V0 = ReadArg<bool>(S, PC); |
10352 | if (!Dec<PT_Bool>(S, OpPC, V0)) |
10353 | return false; |
10354 | continue; |
10355 | } |
10356 | case OP_DecFixedPoint: { |
10357 | const auto V0 = ReadArg<bool>(S, PC); |
10358 | if (!Dec<PT_FixedPoint>(S, OpPC, V0)) |
10359 | return false; |
10360 | continue; |
10361 | } |
10362 | #endif |
10363 | #ifdef GET_DISASM |
10364 | case OP_DecSint8: |
10365 | Text.Op = PrintName("DecSint8" ); |
10366 | Text.Args.push_back(printArg<bool>(P, PC)); |
10367 | break; |
10368 | case OP_DecUint8: |
10369 | Text.Op = PrintName("DecUint8" ); |
10370 | Text.Args.push_back(printArg<bool>(P, PC)); |
10371 | break; |
10372 | case OP_DecSint16: |
10373 | Text.Op = PrintName("DecSint16" ); |
10374 | Text.Args.push_back(printArg<bool>(P, PC)); |
10375 | break; |
10376 | case OP_DecUint16: |
10377 | Text.Op = PrintName("DecUint16" ); |
10378 | Text.Args.push_back(printArg<bool>(P, PC)); |
10379 | break; |
10380 | case OP_DecSint32: |
10381 | Text.Op = PrintName("DecSint32" ); |
10382 | Text.Args.push_back(printArg<bool>(P, PC)); |
10383 | break; |
10384 | case OP_DecUint32: |
10385 | Text.Op = PrintName("DecUint32" ); |
10386 | Text.Args.push_back(printArg<bool>(P, PC)); |
10387 | break; |
10388 | case OP_DecSint64: |
10389 | Text.Op = PrintName("DecSint64" ); |
10390 | Text.Args.push_back(printArg<bool>(P, PC)); |
10391 | break; |
10392 | case OP_DecUint64: |
10393 | Text.Op = PrintName("DecUint64" ); |
10394 | Text.Args.push_back(printArg<bool>(P, PC)); |
10395 | break; |
10396 | case OP_DecIntAP: |
10397 | Text.Op = PrintName("DecIntAP" ); |
10398 | Text.Args.push_back(printArg<bool>(P, PC)); |
10399 | break; |
10400 | case OP_DecIntAPS: |
10401 | Text.Op = PrintName("DecIntAPS" ); |
10402 | Text.Args.push_back(printArg<bool>(P, PC)); |
10403 | break; |
10404 | case OP_DecBool: |
10405 | Text.Op = PrintName("DecBool" ); |
10406 | Text.Args.push_back(printArg<bool>(P, PC)); |
10407 | break; |
10408 | case OP_DecFixedPoint: |
10409 | Text.Op = PrintName("DecFixedPoint" ); |
10410 | Text.Args.push_back(printArg<bool>(P, PC)); |
10411 | break; |
10412 | #endif |
10413 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10414 | bool emitDecSint8( bool , const SourceInfo &); |
10415 | bool emitDecUint8( bool , const SourceInfo &); |
10416 | bool emitDecSint16( bool , const SourceInfo &); |
10417 | bool emitDecUint16( bool , const SourceInfo &); |
10418 | bool emitDecSint32( bool , const SourceInfo &); |
10419 | bool emitDecUint32( bool , const SourceInfo &); |
10420 | bool emitDecSint64( bool , const SourceInfo &); |
10421 | bool emitDecUint64( bool , const SourceInfo &); |
10422 | bool emitDecIntAP( bool , const SourceInfo &); |
10423 | bool emitDecIntAPS( bool , const SourceInfo &); |
10424 | bool emitDecBool( bool , const SourceInfo &); |
10425 | bool emitDecFixedPoint( bool , const SourceInfo &); |
10426 | #endif |
10427 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10428 | [[nodiscard]] bool emitDec(PrimType, bool, const SourceInfo &I); |
10429 | #endif |
10430 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
10431 | bool |
10432 | #if defined(GET_EVAL_IMPL) |
10433 | EvalEmitter |
10434 | #else |
10435 | ByteCodeEmitter |
10436 | #endif |
10437 | ::emitDec(PrimType T0, bool A0, const SourceInfo &I) { |
10438 | switch (T0) { |
10439 | case PT_Sint8: |
10440 | return emitDecSint8(A0, I); |
10441 | case PT_Uint8: |
10442 | return emitDecUint8(A0, I); |
10443 | case PT_Sint16: |
10444 | return emitDecSint16(A0, I); |
10445 | case PT_Uint16: |
10446 | return emitDecUint16(A0, I); |
10447 | case PT_Sint32: |
10448 | return emitDecSint32(A0, I); |
10449 | case PT_Uint32: |
10450 | return emitDecUint32(A0, I); |
10451 | case PT_Sint64: |
10452 | return emitDecSint64(A0, I); |
10453 | case PT_Uint64: |
10454 | return emitDecUint64(A0, I); |
10455 | case PT_IntAP: |
10456 | return emitDecIntAP(A0, I); |
10457 | case PT_IntAPS: |
10458 | return emitDecIntAPS(A0, I); |
10459 | case PT_Bool: |
10460 | return emitDecBool(A0, I); |
10461 | case PT_FixedPoint: |
10462 | return emitDecFixedPoint(A0, I); |
10463 | default: llvm_unreachable("invalid type: emitDec" ); |
10464 | } |
10465 | llvm_unreachable("invalid enum value" ); |
10466 | } |
10467 | #endif |
10468 | #ifdef GET_LINK_IMPL |
10469 | bool ByteCodeEmitter::emitDecSint8( bool A0, const SourceInfo &L) { |
10470 | return emitOp<bool>(OP_DecSint8, A0, L); |
10471 | } |
10472 | bool ByteCodeEmitter::emitDecUint8( bool A0, const SourceInfo &L) { |
10473 | return emitOp<bool>(OP_DecUint8, A0, L); |
10474 | } |
10475 | bool ByteCodeEmitter::emitDecSint16( bool A0, const SourceInfo &L) { |
10476 | return emitOp<bool>(OP_DecSint16, A0, L); |
10477 | } |
10478 | bool ByteCodeEmitter::emitDecUint16( bool A0, const SourceInfo &L) { |
10479 | return emitOp<bool>(OP_DecUint16, A0, L); |
10480 | } |
10481 | bool ByteCodeEmitter::emitDecSint32( bool A0, const SourceInfo &L) { |
10482 | return emitOp<bool>(OP_DecSint32, A0, L); |
10483 | } |
10484 | bool ByteCodeEmitter::emitDecUint32( bool A0, const SourceInfo &L) { |
10485 | return emitOp<bool>(OP_DecUint32, A0, L); |
10486 | } |
10487 | bool ByteCodeEmitter::emitDecSint64( bool A0, const SourceInfo &L) { |
10488 | return emitOp<bool>(OP_DecSint64, A0, L); |
10489 | } |
10490 | bool ByteCodeEmitter::emitDecUint64( bool A0, const SourceInfo &L) { |
10491 | return emitOp<bool>(OP_DecUint64, A0, L); |
10492 | } |
10493 | bool ByteCodeEmitter::emitDecIntAP( bool A0, const SourceInfo &L) { |
10494 | return emitOp<bool>(OP_DecIntAP, A0, L); |
10495 | } |
10496 | bool ByteCodeEmitter::emitDecIntAPS( bool A0, const SourceInfo &L) { |
10497 | return emitOp<bool>(OP_DecIntAPS, A0, L); |
10498 | } |
10499 | bool ByteCodeEmitter::emitDecBool( bool A0, const SourceInfo &L) { |
10500 | return emitOp<bool>(OP_DecBool, A0, L); |
10501 | } |
10502 | bool ByteCodeEmitter::emitDecFixedPoint( bool A0, const SourceInfo &L) { |
10503 | return emitOp<bool>(OP_DecFixedPoint, A0, L); |
10504 | } |
10505 | #endif |
10506 | #ifdef GET_EVAL_IMPL |
10507 | bool EvalEmitter::emitDecSint8( bool A0, const SourceInfo &L) { |
10508 | if (!isActive()) return true; |
10509 | CurrentSource = L; |
10510 | return Dec<PT_Sint8>(S, OpPC, A0); |
10511 | } |
10512 | bool EvalEmitter::emitDecUint8( bool A0, const SourceInfo &L) { |
10513 | if (!isActive()) return true; |
10514 | CurrentSource = L; |
10515 | return Dec<PT_Uint8>(S, OpPC, A0); |
10516 | } |
10517 | bool EvalEmitter::emitDecSint16( bool A0, const SourceInfo &L) { |
10518 | if (!isActive()) return true; |
10519 | CurrentSource = L; |
10520 | return Dec<PT_Sint16>(S, OpPC, A0); |
10521 | } |
10522 | bool EvalEmitter::emitDecUint16( bool A0, const SourceInfo &L) { |
10523 | if (!isActive()) return true; |
10524 | CurrentSource = L; |
10525 | return Dec<PT_Uint16>(S, OpPC, A0); |
10526 | } |
10527 | bool EvalEmitter::emitDecSint32( bool A0, const SourceInfo &L) { |
10528 | if (!isActive()) return true; |
10529 | CurrentSource = L; |
10530 | return Dec<PT_Sint32>(S, OpPC, A0); |
10531 | } |
10532 | bool EvalEmitter::emitDecUint32( bool A0, const SourceInfo &L) { |
10533 | if (!isActive()) return true; |
10534 | CurrentSource = L; |
10535 | return Dec<PT_Uint32>(S, OpPC, A0); |
10536 | } |
10537 | bool EvalEmitter::emitDecSint64( bool A0, const SourceInfo &L) { |
10538 | if (!isActive()) return true; |
10539 | CurrentSource = L; |
10540 | return Dec<PT_Sint64>(S, OpPC, A0); |
10541 | } |
10542 | bool EvalEmitter::emitDecUint64( bool A0, const SourceInfo &L) { |
10543 | if (!isActive()) return true; |
10544 | CurrentSource = L; |
10545 | return Dec<PT_Uint64>(S, OpPC, A0); |
10546 | } |
10547 | bool EvalEmitter::emitDecIntAP( bool A0, const SourceInfo &L) { |
10548 | if (!isActive()) return true; |
10549 | CurrentSource = L; |
10550 | return Dec<PT_IntAP>(S, OpPC, A0); |
10551 | } |
10552 | bool EvalEmitter::emitDecIntAPS( bool A0, const SourceInfo &L) { |
10553 | if (!isActive()) return true; |
10554 | CurrentSource = L; |
10555 | return Dec<PT_IntAPS>(S, OpPC, A0); |
10556 | } |
10557 | bool EvalEmitter::emitDecBool( bool A0, const SourceInfo &L) { |
10558 | if (!isActive()) return true; |
10559 | CurrentSource = L; |
10560 | return Dec<PT_Bool>(S, OpPC, A0); |
10561 | } |
10562 | bool EvalEmitter::emitDecFixedPoint( bool A0, const SourceInfo &L) { |
10563 | if (!isActive()) return true; |
10564 | CurrentSource = L; |
10565 | return Dec<PT_FixedPoint>(S, OpPC, A0); |
10566 | } |
10567 | #endif |
10568 | #ifdef GET_OPCODE_NAMES |
10569 | OP_DecPopSint8, |
10570 | OP_DecPopUint8, |
10571 | OP_DecPopSint16, |
10572 | OP_DecPopUint16, |
10573 | OP_DecPopSint32, |
10574 | OP_DecPopUint32, |
10575 | OP_DecPopSint64, |
10576 | OP_DecPopUint64, |
10577 | OP_DecPopIntAP, |
10578 | OP_DecPopIntAPS, |
10579 | OP_DecPopBool, |
10580 | OP_DecPopFixedPoint, |
10581 | #endif |
10582 | #ifdef GET_INTERP |
10583 | case OP_DecPopSint8: { |
10584 | const auto V0 = ReadArg<bool>(S, PC); |
10585 | if (!DecPop<PT_Sint8>(S, OpPC, V0)) |
10586 | return false; |
10587 | continue; |
10588 | } |
10589 | case OP_DecPopUint8: { |
10590 | const auto V0 = ReadArg<bool>(S, PC); |
10591 | if (!DecPop<PT_Uint8>(S, OpPC, V0)) |
10592 | return false; |
10593 | continue; |
10594 | } |
10595 | case OP_DecPopSint16: { |
10596 | const auto V0 = ReadArg<bool>(S, PC); |
10597 | if (!DecPop<PT_Sint16>(S, OpPC, V0)) |
10598 | return false; |
10599 | continue; |
10600 | } |
10601 | case OP_DecPopUint16: { |
10602 | const auto V0 = ReadArg<bool>(S, PC); |
10603 | if (!DecPop<PT_Uint16>(S, OpPC, V0)) |
10604 | return false; |
10605 | continue; |
10606 | } |
10607 | case OP_DecPopSint32: { |
10608 | const auto V0 = ReadArg<bool>(S, PC); |
10609 | if (!DecPop<PT_Sint32>(S, OpPC, V0)) |
10610 | return false; |
10611 | continue; |
10612 | } |
10613 | case OP_DecPopUint32: { |
10614 | const auto V0 = ReadArg<bool>(S, PC); |
10615 | if (!DecPop<PT_Uint32>(S, OpPC, V0)) |
10616 | return false; |
10617 | continue; |
10618 | } |
10619 | case OP_DecPopSint64: { |
10620 | const auto V0 = ReadArg<bool>(S, PC); |
10621 | if (!DecPop<PT_Sint64>(S, OpPC, V0)) |
10622 | return false; |
10623 | continue; |
10624 | } |
10625 | case OP_DecPopUint64: { |
10626 | const auto V0 = ReadArg<bool>(S, PC); |
10627 | if (!DecPop<PT_Uint64>(S, OpPC, V0)) |
10628 | return false; |
10629 | continue; |
10630 | } |
10631 | case OP_DecPopIntAP: { |
10632 | const auto V0 = ReadArg<bool>(S, PC); |
10633 | if (!DecPop<PT_IntAP>(S, OpPC, V0)) |
10634 | return false; |
10635 | continue; |
10636 | } |
10637 | case OP_DecPopIntAPS: { |
10638 | const auto V0 = ReadArg<bool>(S, PC); |
10639 | if (!DecPop<PT_IntAPS>(S, OpPC, V0)) |
10640 | return false; |
10641 | continue; |
10642 | } |
10643 | case OP_DecPopBool: { |
10644 | const auto V0 = ReadArg<bool>(S, PC); |
10645 | if (!DecPop<PT_Bool>(S, OpPC, V0)) |
10646 | return false; |
10647 | continue; |
10648 | } |
10649 | case OP_DecPopFixedPoint: { |
10650 | const auto V0 = ReadArg<bool>(S, PC); |
10651 | if (!DecPop<PT_FixedPoint>(S, OpPC, V0)) |
10652 | return false; |
10653 | continue; |
10654 | } |
10655 | #endif |
10656 | #ifdef GET_DISASM |
10657 | case OP_DecPopSint8: |
10658 | Text.Op = PrintName("DecPopSint8" ); |
10659 | Text.Args.push_back(printArg<bool>(P, PC)); |
10660 | break; |
10661 | case OP_DecPopUint8: |
10662 | Text.Op = PrintName("DecPopUint8" ); |
10663 | Text.Args.push_back(printArg<bool>(P, PC)); |
10664 | break; |
10665 | case OP_DecPopSint16: |
10666 | Text.Op = PrintName("DecPopSint16" ); |
10667 | Text.Args.push_back(printArg<bool>(P, PC)); |
10668 | break; |
10669 | case OP_DecPopUint16: |
10670 | Text.Op = PrintName("DecPopUint16" ); |
10671 | Text.Args.push_back(printArg<bool>(P, PC)); |
10672 | break; |
10673 | case OP_DecPopSint32: |
10674 | Text.Op = PrintName("DecPopSint32" ); |
10675 | Text.Args.push_back(printArg<bool>(P, PC)); |
10676 | break; |
10677 | case OP_DecPopUint32: |
10678 | Text.Op = PrintName("DecPopUint32" ); |
10679 | Text.Args.push_back(printArg<bool>(P, PC)); |
10680 | break; |
10681 | case OP_DecPopSint64: |
10682 | Text.Op = PrintName("DecPopSint64" ); |
10683 | Text.Args.push_back(printArg<bool>(P, PC)); |
10684 | break; |
10685 | case OP_DecPopUint64: |
10686 | Text.Op = PrintName("DecPopUint64" ); |
10687 | Text.Args.push_back(printArg<bool>(P, PC)); |
10688 | break; |
10689 | case OP_DecPopIntAP: |
10690 | Text.Op = PrintName("DecPopIntAP" ); |
10691 | Text.Args.push_back(printArg<bool>(P, PC)); |
10692 | break; |
10693 | case OP_DecPopIntAPS: |
10694 | Text.Op = PrintName("DecPopIntAPS" ); |
10695 | Text.Args.push_back(printArg<bool>(P, PC)); |
10696 | break; |
10697 | case OP_DecPopBool: |
10698 | Text.Op = PrintName("DecPopBool" ); |
10699 | Text.Args.push_back(printArg<bool>(P, PC)); |
10700 | break; |
10701 | case OP_DecPopFixedPoint: |
10702 | Text.Op = PrintName("DecPopFixedPoint" ); |
10703 | Text.Args.push_back(printArg<bool>(P, PC)); |
10704 | break; |
10705 | #endif |
10706 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10707 | bool emitDecPopSint8( bool , const SourceInfo &); |
10708 | bool emitDecPopUint8( bool , const SourceInfo &); |
10709 | bool emitDecPopSint16( bool , const SourceInfo &); |
10710 | bool emitDecPopUint16( bool , const SourceInfo &); |
10711 | bool emitDecPopSint32( bool , const SourceInfo &); |
10712 | bool emitDecPopUint32( bool , const SourceInfo &); |
10713 | bool emitDecPopSint64( bool , const SourceInfo &); |
10714 | bool emitDecPopUint64( bool , const SourceInfo &); |
10715 | bool emitDecPopIntAP( bool , const SourceInfo &); |
10716 | bool emitDecPopIntAPS( bool , const SourceInfo &); |
10717 | bool emitDecPopBool( bool , const SourceInfo &); |
10718 | bool emitDecPopFixedPoint( bool , const SourceInfo &); |
10719 | #endif |
10720 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10721 | [[nodiscard]] bool emitDecPop(PrimType, bool, const SourceInfo &I); |
10722 | #endif |
10723 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
10724 | bool |
10725 | #if defined(GET_EVAL_IMPL) |
10726 | EvalEmitter |
10727 | #else |
10728 | ByteCodeEmitter |
10729 | #endif |
10730 | ::emitDecPop(PrimType T0, bool A0, const SourceInfo &I) { |
10731 | switch (T0) { |
10732 | case PT_Sint8: |
10733 | return emitDecPopSint8(A0, I); |
10734 | case PT_Uint8: |
10735 | return emitDecPopUint8(A0, I); |
10736 | case PT_Sint16: |
10737 | return emitDecPopSint16(A0, I); |
10738 | case PT_Uint16: |
10739 | return emitDecPopUint16(A0, I); |
10740 | case PT_Sint32: |
10741 | return emitDecPopSint32(A0, I); |
10742 | case PT_Uint32: |
10743 | return emitDecPopUint32(A0, I); |
10744 | case PT_Sint64: |
10745 | return emitDecPopSint64(A0, I); |
10746 | case PT_Uint64: |
10747 | return emitDecPopUint64(A0, I); |
10748 | case PT_IntAP: |
10749 | return emitDecPopIntAP(A0, I); |
10750 | case PT_IntAPS: |
10751 | return emitDecPopIntAPS(A0, I); |
10752 | case PT_Bool: |
10753 | return emitDecPopBool(A0, I); |
10754 | case PT_FixedPoint: |
10755 | return emitDecPopFixedPoint(A0, I); |
10756 | default: llvm_unreachable("invalid type: emitDecPop" ); |
10757 | } |
10758 | llvm_unreachable("invalid enum value" ); |
10759 | } |
10760 | #endif |
10761 | #ifdef GET_LINK_IMPL |
10762 | bool ByteCodeEmitter::emitDecPopSint8( bool A0, const SourceInfo &L) { |
10763 | return emitOp<bool>(OP_DecPopSint8, A0, L); |
10764 | } |
10765 | bool ByteCodeEmitter::emitDecPopUint8( bool A0, const SourceInfo &L) { |
10766 | return emitOp<bool>(OP_DecPopUint8, A0, L); |
10767 | } |
10768 | bool ByteCodeEmitter::emitDecPopSint16( bool A0, const SourceInfo &L) { |
10769 | return emitOp<bool>(OP_DecPopSint16, A0, L); |
10770 | } |
10771 | bool ByteCodeEmitter::emitDecPopUint16( bool A0, const SourceInfo &L) { |
10772 | return emitOp<bool>(OP_DecPopUint16, A0, L); |
10773 | } |
10774 | bool ByteCodeEmitter::emitDecPopSint32( bool A0, const SourceInfo &L) { |
10775 | return emitOp<bool>(OP_DecPopSint32, A0, L); |
10776 | } |
10777 | bool ByteCodeEmitter::emitDecPopUint32( bool A0, const SourceInfo &L) { |
10778 | return emitOp<bool>(OP_DecPopUint32, A0, L); |
10779 | } |
10780 | bool ByteCodeEmitter::emitDecPopSint64( bool A0, const SourceInfo &L) { |
10781 | return emitOp<bool>(OP_DecPopSint64, A0, L); |
10782 | } |
10783 | bool ByteCodeEmitter::emitDecPopUint64( bool A0, const SourceInfo &L) { |
10784 | return emitOp<bool>(OP_DecPopUint64, A0, L); |
10785 | } |
10786 | bool ByteCodeEmitter::emitDecPopIntAP( bool A0, const SourceInfo &L) { |
10787 | return emitOp<bool>(OP_DecPopIntAP, A0, L); |
10788 | } |
10789 | bool ByteCodeEmitter::emitDecPopIntAPS( bool A0, const SourceInfo &L) { |
10790 | return emitOp<bool>(OP_DecPopIntAPS, A0, L); |
10791 | } |
10792 | bool ByteCodeEmitter::emitDecPopBool( bool A0, const SourceInfo &L) { |
10793 | return emitOp<bool>(OP_DecPopBool, A0, L); |
10794 | } |
10795 | bool ByteCodeEmitter::emitDecPopFixedPoint( bool A0, const SourceInfo &L) { |
10796 | return emitOp<bool>(OP_DecPopFixedPoint, A0, L); |
10797 | } |
10798 | #endif |
10799 | #ifdef GET_EVAL_IMPL |
10800 | bool EvalEmitter::emitDecPopSint8( bool A0, const SourceInfo &L) { |
10801 | if (!isActive()) return true; |
10802 | CurrentSource = L; |
10803 | return DecPop<PT_Sint8>(S, OpPC, A0); |
10804 | } |
10805 | bool EvalEmitter::emitDecPopUint8( bool A0, const SourceInfo &L) { |
10806 | if (!isActive()) return true; |
10807 | CurrentSource = L; |
10808 | return DecPop<PT_Uint8>(S, OpPC, A0); |
10809 | } |
10810 | bool EvalEmitter::emitDecPopSint16( bool A0, const SourceInfo &L) { |
10811 | if (!isActive()) return true; |
10812 | CurrentSource = L; |
10813 | return DecPop<PT_Sint16>(S, OpPC, A0); |
10814 | } |
10815 | bool EvalEmitter::emitDecPopUint16( bool A0, const SourceInfo &L) { |
10816 | if (!isActive()) return true; |
10817 | CurrentSource = L; |
10818 | return DecPop<PT_Uint16>(S, OpPC, A0); |
10819 | } |
10820 | bool EvalEmitter::emitDecPopSint32( bool A0, const SourceInfo &L) { |
10821 | if (!isActive()) return true; |
10822 | CurrentSource = L; |
10823 | return DecPop<PT_Sint32>(S, OpPC, A0); |
10824 | } |
10825 | bool EvalEmitter::emitDecPopUint32( bool A0, const SourceInfo &L) { |
10826 | if (!isActive()) return true; |
10827 | CurrentSource = L; |
10828 | return DecPop<PT_Uint32>(S, OpPC, A0); |
10829 | } |
10830 | bool EvalEmitter::emitDecPopSint64( bool A0, const SourceInfo &L) { |
10831 | if (!isActive()) return true; |
10832 | CurrentSource = L; |
10833 | return DecPop<PT_Sint64>(S, OpPC, A0); |
10834 | } |
10835 | bool EvalEmitter::emitDecPopUint64( bool A0, const SourceInfo &L) { |
10836 | if (!isActive()) return true; |
10837 | CurrentSource = L; |
10838 | return DecPop<PT_Uint64>(S, OpPC, A0); |
10839 | } |
10840 | bool EvalEmitter::emitDecPopIntAP( bool A0, const SourceInfo &L) { |
10841 | if (!isActive()) return true; |
10842 | CurrentSource = L; |
10843 | return DecPop<PT_IntAP>(S, OpPC, A0); |
10844 | } |
10845 | bool EvalEmitter::emitDecPopIntAPS( bool A0, const SourceInfo &L) { |
10846 | if (!isActive()) return true; |
10847 | CurrentSource = L; |
10848 | return DecPop<PT_IntAPS>(S, OpPC, A0); |
10849 | } |
10850 | bool EvalEmitter::emitDecPopBool( bool A0, const SourceInfo &L) { |
10851 | if (!isActive()) return true; |
10852 | CurrentSource = L; |
10853 | return DecPop<PT_Bool>(S, OpPC, A0); |
10854 | } |
10855 | bool EvalEmitter::emitDecPopFixedPoint( bool A0, const SourceInfo &L) { |
10856 | if (!isActive()) return true; |
10857 | CurrentSource = L; |
10858 | return DecPop<PT_FixedPoint>(S, OpPC, A0); |
10859 | } |
10860 | #endif |
10861 | #ifdef GET_OPCODE_NAMES |
10862 | OP_DecPtr, |
10863 | #endif |
10864 | #ifdef GET_INTERP |
10865 | case OP_DecPtr: { |
10866 | if (!DecPtr(S, OpPC)) |
10867 | return false; |
10868 | continue; |
10869 | } |
10870 | #endif |
10871 | #ifdef GET_DISASM |
10872 | case OP_DecPtr: |
10873 | Text.Op = PrintName("DecPtr" ); |
10874 | break; |
10875 | #endif |
10876 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10877 | bool emitDecPtr(const SourceInfo &); |
10878 | #endif |
10879 | #ifdef GET_LINK_IMPL |
10880 | bool ByteCodeEmitter::emitDecPtr(const SourceInfo &L) { |
10881 | return emitOp<>(OP_DecPtr, L); |
10882 | } |
10883 | #endif |
10884 | #ifdef GET_EVAL_IMPL |
10885 | bool EvalEmitter::emitDecPtr(const SourceInfo &L) { |
10886 | if (!isActive()) return true; |
10887 | CurrentSource = L; |
10888 | return DecPtr(S, OpPC); |
10889 | } |
10890 | #endif |
10891 | #ifdef GET_OPCODE_NAMES |
10892 | OP_DecayPtrPtrPtr, |
10893 | OP_DecayPtrPtrMemberPtr, |
10894 | OP_DecayPtrMemberPtrPtr, |
10895 | OP_DecayPtrMemberPtrMemberPtr, |
10896 | #endif |
10897 | #ifdef GET_INTERP |
10898 | case OP_DecayPtrPtrPtr: { |
10899 | if (!DecayPtr<PT_Ptr, PT_Ptr>(S, OpPC)) |
10900 | return false; |
10901 | continue; |
10902 | } |
10903 | case OP_DecayPtrPtrMemberPtr: { |
10904 | if (!DecayPtr<PT_Ptr, PT_MemberPtr>(S, OpPC)) |
10905 | return false; |
10906 | continue; |
10907 | } |
10908 | case OP_DecayPtrMemberPtrPtr: { |
10909 | if (!DecayPtr<PT_MemberPtr, PT_Ptr>(S, OpPC)) |
10910 | return false; |
10911 | continue; |
10912 | } |
10913 | case OP_DecayPtrMemberPtrMemberPtr: { |
10914 | if (!DecayPtr<PT_MemberPtr, PT_MemberPtr>(S, OpPC)) |
10915 | return false; |
10916 | continue; |
10917 | } |
10918 | #endif |
10919 | #ifdef GET_DISASM |
10920 | case OP_DecayPtrPtrPtr: |
10921 | Text.Op = PrintName("DecayPtrPtrPtr" ); |
10922 | break; |
10923 | case OP_DecayPtrPtrMemberPtr: |
10924 | Text.Op = PrintName("DecayPtrPtrMemberPtr" ); |
10925 | break; |
10926 | case OP_DecayPtrMemberPtrPtr: |
10927 | Text.Op = PrintName("DecayPtrMemberPtrPtr" ); |
10928 | break; |
10929 | case OP_DecayPtrMemberPtrMemberPtr: |
10930 | Text.Op = PrintName("DecayPtrMemberPtrMemberPtr" ); |
10931 | break; |
10932 | #endif |
10933 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10934 | bool emitDecayPtrPtrPtr(const SourceInfo &); |
10935 | bool emitDecayPtrPtrMemberPtr(const SourceInfo &); |
10936 | bool emitDecayPtrMemberPtrPtr(const SourceInfo &); |
10937 | bool emitDecayPtrMemberPtrMemberPtr(const SourceInfo &); |
10938 | #endif |
10939 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10940 | [[nodiscard]] bool emitDecayPtr(PrimType, PrimType, const SourceInfo &I); |
10941 | #endif |
10942 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
10943 | bool |
10944 | #if defined(GET_EVAL_IMPL) |
10945 | EvalEmitter |
10946 | #else |
10947 | ByteCodeEmitter |
10948 | #endif |
10949 | ::emitDecayPtr(PrimType T0, PrimType T1, const SourceInfo &I) { |
10950 | switch (T0) { |
10951 | case PT_Ptr: |
10952 | switch (T1) { |
10953 | case PT_Ptr: |
10954 | return emitDecayPtrPtrPtr(I); |
10955 | case PT_MemberPtr: |
10956 | return emitDecayPtrPtrMemberPtr(I); |
10957 | default: llvm_unreachable("invalid type: emitDecayPtr" ); |
10958 | } |
10959 | llvm_unreachable("invalid enum value" ); |
10960 | case PT_MemberPtr: |
10961 | switch (T1) { |
10962 | case PT_Ptr: |
10963 | return emitDecayPtrMemberPtrPtr(I); |
10964 | case PT_MemberPtr: |
10965 | return emitDecayPtrMemberPtrMemberPtr(I); |
10966 | default: llvm_unreachable("invalid type: emitDecayPtr" ); |
10967 | } |
10968 | llvm_unreachable("invalid enum value" ); |
10969 | default: llvm_unreachable("invalid type: emitDecayPtr" ); |
10970 | } |
10971 | llvm_unreachable("invalid enum value" ); |
10972 | } |
10973 | #endif |
10974 | #ifdef GET_LINK_IMPL |
10975 | bool ByteCodeEmitter::emitDecayPtrPtrPtr(const SourceInfo &L) { |
10976 | return emitOp<>(OP_DecayPtrPtrPtr, L); |
10977 | } |
10978 | bool ByteCodeEmitter::emitDecayPtrPtrMemberPtr(const SourceInfo &L) { |
10979 | return emitOp<>(OP_DecayPtrPtrMemberPtr, L); |
10980 | } |
10981 | bool ByteCodeEmitter::emitDecayPtrMemberPtrPtr(const SourceInfo &L) { |
10982 | return emitOp<>(OP_DecayPtrMemberPtrPtr, L); |
10983 | } |
10984 | bool ByteCodeEmitter::emitDecayPtrMemberPtrMemberPtr(const SourceInfo &L) { |
10985 | return emitOp<>(OP_DecayPtrMemberPtrMemberPtr, L); |
10986 | } |
10987 | #endif |
10988 | #ifdef GET_EVAL_IMPL |
10989 | bool EvalEmitter::emitDecayPtrPtrPtr(const SourceInfo &L) { |
10990 | if (!isActive()) return true; |
10991 | CurrentSource = L; |
10992 | return DecayPtr<PT_Ptr, PT_Ptr>(S, OpPC); |
10993 | } |
10994 | bool EvalEmitter::emitDecayPtrPtrMemberPtr(const SourceInfo &L) { |
10995 | if (!isActive()) return true; |
10996 | CurrentSource = L; |
10997 | return DecayPtr<PT_Ptr, PT_MemberPtr>(S, OpPC); |
10998 | } |
10999 | bool EvalEmitter::emitDecayPtrMemberPtrPtr(const SourceInfo &L) { |
11000 | if (!isActive()) return true; |
11001 | CurrentSource = L; |
11002 | return DecayPtr<PT_MemberPtr, PT_Ptr>(S, OpPC); |
11003 | } |
11004 | bool EvalEmitter::emitDecayPtrMemberPtrMemberPtr(const SourceInfo &L) { |
11005 | if (!isActive()) return true; |
11006 | CurrentSource = L; |
11007 | return DecayPtr<PT_MemberPtr, PT_MemberPtr>(S, OpPC); |
11008 | } |
11009 | #endif |
11010 | #ifdef GET_OPCODE_NAMES |
11011 | OP_Decf, |
11012 | #endif |
11013 | #ifdef GET_INTERP |
11014 | case OP_Decf: { |
11015 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11016 | if (!Decf(S, OpPC, V0)) |
11017 | return false; |
11018 | continue; |
11019 | } |
11020 | #endif |
11021 | #ifdef GET_DISASM |
11022 | case OP_Decf: |
11023 | Text.Op = PrintName("Decf" ); |
11024 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
11025 | break; |
11026 | #endif |
11027 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11028 | bool emitDecf( uint32_t , const SourceInfo &); |
11029 | #endif |
11030 | #ifdef GET_LINK_IMPL |
11031 | bool ByteCodeEmitter::emitDecf( uint32_t A0, const SourceInfo &L) { |
11032 | return emitOp<uint32_t>(OP_Decf, A0, L); |
11033 | } |
11034 | #endif |
11035 | #ifdef GET_EVAL_IMPL |
11036 | bool EvalEmitter::emitDecf( uint32_t A0, const SourceInfo &L) { |
11037 | if (!isActive()) return true; |
11038 | CurrentSource = L; |
11039 | return Decf(S, OpPC, A0); |
11040 | } |
11041 | #endif |
11042 | #ifdef GET_OPCODE_NAMES |
11043 | OP_DecfPop, |
11044 | #endif |
11045 | #ifdef GET_INTERP |
11046 | case OP_DecfPop: { |
11047 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11048 | if (!DecfPop(S, OpPC, V0)) |
11049 | return false; |
11050 | continue; |
11051 | } |
11052 | #endif |
11053 | #ifdef GET_DISASM |
11054 | case OP_DecfPop: |
11055 | Text.Op = PrintName("DecfPop" ); |
11056 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
11057 | break; |
11058 | #endif |
11059 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11060 | bool emitDecfPop( uint32_t , const SourceInfo &); |
11061 | #endif |
11062 | #ifdef GET_LINK_IMPL |
11063 | bool ByteCodeEmitter::emitDecfPop( uint32_t A0, const SourceInfo &L) { |
11064 | return emitOp<uint32_t>(OP_DecfPop, A0, L); |
11065 | } |
11066 | #endif |
11067 | #ifdef GET_EVAL_IMPL |
11068 | bool EvalEmitter::emitDecfPop( uint32_t A0, const SourceInfo &L) { |
11069 | if (!isActive()) return true; |
11070 | CurrentSource = L; |
11071 | return DecfPop(S, OpPC, A0); |
11072 | } |
11073 | #endif |
11074 | #ifdef GET_OPCODE_NAMES |
11075 | OP_Destroy, |
11076 | #endif |
11077 | #ifdef GET_INTERP |
11078 | case OP_Destroy: { |
11079 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11080 | if (!Destroy(S, OpPC, V0)) |
11081 | return false; |
11082 | continue; |
11083 | } |
11084 | #endif |
11085 | #ifdef GET_DISASM |
11086 | case OP_Destroy: |
11087 | Text.Op = PrintName("Destroy" ); |
11088 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
11089 | break; |
11090 | #endif |
11091 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11092 | bool emitDestroy( uint32_t , const SourceInfo &); |
11093 | #endif |
11094 | #ifdef GET_LINK_IMPL |
11095 | bool ByteCodeEmitter::emitDestroy( uint32_t A0, const SourceInfo &L) { |
11096 | return emitOp<uint32_t>(OP_Destroy, A0, L); |
11097 | } |
11098 | #endif |
11099 | #ifdef GET_OPCODE_NAMES |
11100 | OP_DiagTypeid, |
11101 | #endif |
11102 | #ifdef GET_INTERP |
11103 | case OP_DiagTypeid: { |
11104 | if (!DiagTypeid(S, OpPC)) |
11105 | return false; |
11106 | continue; |
11107 | } |
11108 | #endif |
11109 | #ifdef GET_DISASM |
11110 | case OP_DiagTypeid: |
11111 | Text.Op = PrintName("DiagTypeid" ); |
11112 | break; |
11113 | #endif |
11114 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11115 | bool emitDiagTypeid(const SourceInfo &); |
11116 | #endif |
11117 | #ifdef GET_LINK_IMPL |
11118 | bool ByteCodeEmitter::emitDiagTypeid(const SourceInfo &L) { |
11119 | return emitOp<>(OP_DiagTypeid, L); |
11120 | } |
11121 | #endif |
11122 | #ifdef GET_EVAL_IMPL |
11123 | bool EvalEmitter::emitDiagTypeid(const SourceInfo &L) { |
11124 | if (!isActive()) return true; |
11125 | CurrentSource = L; |
11126 | return DiagTypeid(S, OpPC); |
11127 | } |
11128 | #endif |
11129 | #ifdef GET_OPCODE_NAMES |
11130 | OP_DivSint8, |
11131 | OP_DivUint8, |
11132 | OP_DivSint16, |
11133 | OP_DivUint16, |
11134 | OP_DivSint32, |
11135 | OP_DivUint32, |
11136 | OP_DivSint64, |
11137 | OP_DivUint64, |
11138 | OP_DivIntAP, |
11139 | OP_DivIntAPS, |
11140 | OP_DivFixedPoint, |
11141 | #endif |
11142 | #ifdef GET_INTERP |
11143 | case OP_DivSint8: { |
11144 | if (!Div<PT_Sint8>(S, OpPC)) |
11145 | return false; |
11146 | continue; |
11147 | } |
11148 | case OP_DivUint8: { |
11149 | if (!Div<PT_Uint8>(S, OpPC)) |
11150 | return false; |
11151 | continue; |
11152 | } |
11153 | case OP_DivSint16: { |
11154 | if (!Div<PT_Sint16>(S, OpPC)) |
11155 | return false; |
11156 | continue; |
11157 | } |
11158 | case OP_DivUint16: { |
11159 | if (!Div<PT_Uint16>(S, OpPC)) |
11160 | return false; |
11161 | continue; |
11162 | } |
11163 | case OP_DivSint32: { |
11164 | if (!Div<PT_Sint32>(S, OpPC)) |
11165 | return false; |
11166 | continue; |
11167 | } |
11168 | case OP_DivUint32: { |
11169 | if (!Div<PT_Uint32>(S, OpPC)) |
11170 | return false; |
11171 | continue; |
11172 | } |
11173 | case OP_DivSint64: { |
11174 | if (!Div<PT_Sint64>(S, OpPC)) |
11175 | return false; |
11176 | continue; |
11177 | } |
11178 | case OP_DivUint64: { |
11179 | if (!Div<PT_Uint64>(S, OpPC)) |
11180 | return false; |
11181 | continue; |
11182 | } |
11183 | case OP_DivIntAP: { |
11184 | if (!Div<PT_IntAP>(S, OpPC)) |
11185 | return false; |
11186 | continue; |
11187 | } |
11188 | case OP_DivIntAPS: { |
11189 | if (!Div<PT_IntAPS>(S, OpPC)) |
11190 | return false; |
11191 | continue; |
11192 | } |
11193 | case OP_DivFixedPoint: { |
11194 | if (!Div<PT_FixedPoint>(S, OpPC)) |
11195 | return false; |
11196 | continue; |
11197 | } |
11198 | #endif |
11199 | #ifdef GET_DISASM |
11200 | case OP_DivSint8: |
11201 | Text.Op = PrintName("DivSint8" ); |
11202 | break; |
11203 | case OP_DivUint8: |
11204 | Text.Op = PrintName("DivUint8" ); |
11205 | break; |
11206 | case OP_DivSint16: |
11207 | Text.Op = PrintName("DivSint16" ); |
11208 | break; |
11209 | case OP_DivUint16: |
11210 | Text.Op = PrintName("DivUint16" ); |
11211 | break; |
11212 | case OP_DivSint32: |
11213 | Text.Op = PrintName("DivSint32" ); |
11214 | break; |
11215 | case OP_DivUint32: |
11216 | Text.Op = PrintName("DivUint32" ); |
11217 | break; |
11218 | case OP_DivSint64: |
11219 | Text.Op = PrintName("DivSint64" ); |
11220 | break; |
11221 | case OP_DivUint64: |
11222 | Text.Op = PrintName("DivUint64" ); |
11223 | break; |
11224 | case OP_DivIntAP: |
11225 | Text.Op = PrintName("DivIntAP" ); |
11226 | break; |
11227 | case OP_DivIntAPS: |
11228 | Text.Op = PrintName("DivIntAPS" ); |
11229 | break; |
11230 | case OP_DivFixedPoint: |
11231 | Text.Op = PrintName("DivFixedPoint" ); |
11232 | break; |
11233 | #endif |
11234 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11235 | bool emitDivSint8(const SourceInfo &); |
11236 | bool emitDivUint8(const SourceInfo &); |
11237 | bool emitDivSint16(const SourceInfo &); |
11238 | bool emitDivUint16(const SourceInfo &); |
11239 | bool emitDivSint32(const SourceInfo &); |
11240 | bool emitDivUint32(const SourceInfo &); |
11241 | bool emitDivSint64(const SourceInfo &); |
11242 | bool emitDivUint64(const SourceInfo &); |
11243 | bool emitDivIntAP(const SourceInfo &); |
11244 | bool emitDivIntAPS(const SourceInfo &); |
11245 | bool emitDivFixedPoint(const SourceInfo &); |
11246 | #endif |
11247 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11248 | [[nodiscard]] bool emitDiv(PrimType, const SourceInfo &I); |
11249 | #endif |
11250 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
11251 | bool |
11252 | #if defined(GET_EVAL_IMPL) |
11253 | EvalEmitter |
11254 | #else |
11255 | ByteCodeEmitter |
11256 | #endif |
11257 | ::emitDiv(PrimType T0, const SourceInfo &I) { |
11258 | switch (T0) { |
11259 | case PT_Sint8: |
11260 | return emitDivSint8(I); |
11261 | case PT_Uint8: |
11262 | return emitDivUint8(I); |
11263 | case PT_Sint16: |
11264 | return emitDivSint16(I); |
11265 | case PT_Uint16: |
11266 | return emitDivUint16(I); |
11267 | case PT_Sint32: |
11268 | return emitDivSint32(I); |
11269 | case PT_Uint32: |
11270 | return emitDivUint32(I); |
11271 | case PT_Sint64: |
11272 | return emitDivSint64(I); |
11273 | case PT_Uint64: |
11274 | return emitDivUint64(I); |
11275 | case PT_IntAP: |
11276 | return emitDivIntAP(I); |
11277 | case PT_IntAPS: |
11278 | return emitDivIntAPS(I); |
11279 | case PT_FixedPoint: |
11280 | return emitDivFixedPoint(I); |
11281 | default: llvm_unreachable("invalid type: emitDiv" ); |
11282 | } |
11283 | llvm_unreachable("invalid enum value" ); |
11284 | } |
11285 | #endif |
11286 | #ifdef GET_LINK_IMPL |
11287 | bool ByteCodeEmitter::emitDivSint8(const SourceInfo &L) { |
11288 | return emitOp<>(OP_DivSint8, L); |
11289 | } |
11290 | bool ByteCodeEmitter::emitDivUint8(const SourceInfo &L) { |
11291 | return emitOp<>(OP_DivUint8, L); |
11292 | } |
11293 | bool ByteCodeEmitter::emitDivSint16(const SourceInfo &L) { |
11294 | return emitOp<>(OP_DivSint16, L); |
11295 | } |
11296 | bool ByteCodeEmitter::emitDivUint16(const SourceInfo &L) { |
11297 | return emitOp<>(OP_DivUint16, L); |
11298 | } |
11299 | bool ByteCodeEmitter::emitDivSint32(const SourceInfo &L) { |
11300 | return emitOp<>(OP_DivSint32, L); |
11301 | } |
11302 | bool ByteCodeEmitter::emitDivUint32(const SourceInfo &L) { |
11303 | return emitOp<>(OP_DivUint32, L); |
11304 | } |
11305 | bool ByteCodeEmitter::emitDivSint64(const SourceInfo &L) { |
11306 | return emitOp<>(OP_DivSint64, L); |
11307 | } |
11308 | bool ByteCodeEmitter::emitDivUint64(const SourceInfo &L) { |
11309 | return emitOp<>(OP_DivUint64, L); |
11310 | } |
11311 | bool ByteCodeEmitter::emitDivIntAP(const SourceInfo &L) { |
11312 | return emitOp<>(OP_DivIntAP, L); |
11313 | } |
11314 | bool ByteCodeEmitter::emitDivIntAPS(const SourceInfo &L) { |
11315 | return emitOp<>(OP_DivIntAPS, L); |
11316 | } |
11317 | bool ByteCodeEmitter::emitDivFixedPoint(const SourceInfo &L) { |
11318 | return emitOp<>(OP_DivFixedPoint, L); |
11319 | } |
11320 | #endif |
11321 | #ifdef GET_EVAL_IMPL |
11322 | bool EvalEmitter::emitDivSint8(const SourceInfo &L) { |
11323 | if (!isActive()) return true; |
11324 | CurrentSource = L; |
11325 | return Div<PT_Sint8>(S, OpPC); |
11326 | } |
11327 | bool EvalEmitter::emitDivUint8(const SourceInfo &L) { |
11328 | if (!isActive()) return true; |
11329 | CurrentSource = L; |
11330 | return Div<PT_Uint8>(S, OpPC); |
11331 | } |
11332 | bool EvalEmitter::emitDivSint16(const SourceInfo &L) { |
11333 | if (!isActive()) return true; |
11334 | CurrentSource = L; |
11335 | return Div<PT_Sint16>(S, OpPC); |
11336 | } |
11337 | bool EvalEmitter::emitDivUint16(const SourceInfo &L) { |
11338 | if (!isActive()) return true; |
11339 | CurrentSource = L; |
11340 | return Div<PT_Uint16>(S, OpPC); |
11341 | } |
11342 | bool EvalEmitter::emitDivSint32(const SourceInfo &L) { |
11343 | if (!isActive()) return true; |
11344 | CurrentSource = L; |
11345 | return Div<PT_Sint32>(S, OpPC); |
11346 | } |
11347 | bool EvalEmitter::emitDivUint32(const SourceInfo &L) { |
11348 | if (!isActive()) return true; |
11349 | CurrentSource = L; |
11350 | return Div<PT_Uint32>(S, OpPC); |
11351 | } |
11352 | bool EvalEmitter::emitDivSint64(const SourceInfo &L) { |
11353 | if (!isActive()) return true; |
11354 | CurrentSource = L; |
11355 | return Div<PT_Sint64>(S, OpPC); |
11356 | } |
11357 | bool EvalEmitter::emitDivUint64(const SourceInfo &L) { |
11358 | if (!isActive()) return true; |
11359 | CurrentSource = L; |
11360 | return Div<PT_Uint64>(S, OpPC); |
11361 | } |
11362 | bool EvalEmitter::emitDivIntAP(const SourceInfo &L) { |
11363 | if (!isActive()) return true; |
11364 | CurrentSource = L; |
11365 | return Div<PT_IntAP>(S, OpPC); |
11366 | } |
11367 | bool EvalEmitter::emitDivIntAPS(const SourceInfo &L) { |
11368 | if (!isActive()) return true; |
11369 | CurrentSource = L; |
11370 | return Div<PT_IntAPS>(S, OpPC); |
11371 | } |
11372 | bool EvalEmitter::emitDivFixedPoint(const SourceInfo &L) { |
11373 | if (!isActive()) return true; |
11374 | CurrentSource = L; |
11375 | return Div<PT_FixedPoint>(S, OpPC); |
11376 | } |
11377 | #endif |
11378 | #ifdef GET_OPCODE_NAMES |
11379 | OP_DivcSint8, |
11380 | OP_DivcUint8, |
11381 | OP_DivcSint16, |
11382 | OP_DivcUint16, |
11383 | OP_DivcSint32, |
11384 | OP_DivcUint32, |
11385 | OP_DivcSint64, |
11386 | OP_DivcUint64, |
11387 | OP_DivcIntAP, |
11388 | OP_DivcIntAPS, |
11389 | OP_DivcFloat, |
11390 | #endif |
11391 | #ifdef GET_INTERP |
11392 | case OP_DivcSint8: { |
11393 | if (!Divc<PT_Sint8>(S, OpPC)) |
11394 | return false; |
11395 | continue; |
11396 | } |
11397 | case OP_DivcUint8: { |
11398 | if (!Divc<PT_Uint8>(S, OpPC)) |
11399 | return false; |
11400 | continue; |
11401 | } |
11402 | case OP_DivcSint16: { |
11403 | if (!Divc<PT_Sint16>(S, OpPC)) |
11404 | return false; |
11405 | continue; |
11406 | } |
11407 | case OP_DivcUint16: { |
11408 | if (!Divc<PT_Uint16>(S, OpPC)) |
11409 | return false; |
11410 | continue; |
11411 | } |
11412 | case OP_DivcSint32: { |
11413 | if (!Divc<PT_Sint32>(S, OpPC)) |
11414 | return false; |
11415 | continue; |
11416 | } |
11417 | case OP_DivcUint32: { |
11418 | if (!Divc<PT_Uint32>(S, OpPC)) |
11419 | return false; |
11420 | continue; |
11421 | } |
11422 | case OP_DivcSint64: { |
11423 | if (!Divc<PT_Sint64>(S, OpPC)) |
11424 | return false; |
11425 | continue; |
11426 | } |
11427 | case OP_DivcUint64: { |
11428 | if (!Divc<PT_Uint64>(S, OpPC)) |
11429 | return false; |
11430 | continue; |
11431 | } |
11432 | case OP_DivcIntAP: { |
11433 | if (!Divc<PT_IntAP>(S, OpPC)) |
11434 | return false; |
11435 | continue; |
11436 | } |
11437 | case OP_DivcIntAPS: { |
11438 | if (!Divc<PT_IntAPS>(S, OpPC)) |
11439 | return false; |
11440 | continue; |
11441 | } |
11442 | case OP_DivcFloat: { |
11443 | if (!Divc<PT_Float>(S, OpPC)) |
11444 | return false; |
11445 | continue; |
11446 | } |
11447 | #endif |
11448 | #ifdef GET_DISASM |
11449 | case OP_DivcSint8: |
11450 | Text.Op = PrintName("DivcSint8" ); |
11451 | break; |
11452 | case OP_DivcUint8: |
11453 | Text.Op = PrintName("DivcUint8" ); |
11454 | break; |
11455 | case OP_DivcSint16: |
11456 | Text.Op = PrintName("DivcSint16" ); |
11457 | break; |
11458 | case OP_DivcUint16: |
11459 | Text.Op = PrintName("DivcUint16" ); |
11460 | break; |
11461 | case OP_DivcSint32: |
11462 | Text.Op = PrintName("DivcSint32" ); |
11463 | break; |
11464 | case OP_DivcUint32: |
11465 | Text.Op = PrintName("DivcUint32" ); |
11466 | break; |
11467 | case OP_DivcSint64: |
11468 | Text.Op = PrintName("DivcSint64" ); |
11469 | break; |
11470 | case OP_DivcUint64: |
11471 | Text.Op = PrintName("DivcUint64" ); |
11472 | break; |
11473 | case OP_DivcIntAP: |
11474 | Text.Op = PrintName("DivcIntAP" ); |
11475 | break; |
11476 | case OP_DivcIntAPS: |
11477 | Text.Op = PrintName("DivcIntAPS" ); |
11478 | break; |
11479 | case OP_DivcFloat: |
11480 | Text.Op = PrintName("DivcFloat" ); |
11481 | break; |
11482 | #endif |
11483 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11484 | bool emitDivcSint8(const SourceInfo &); |
11485 | bool emitDivcUint8(const SourceInfo &); |
11486 | bool emitDivcSint16(const SourceInfo &); |
11487 | bool emitDivcUint16(const SourceInfo &); |
11488 | bool emitDivcSint32(const SourceInfo &); |
11489 | bool emitDivcUint32(const SourceInfo &); |
11490 | bool emitDivcSint64(const SourceInfo &); |
11491 | bool emitDivcUint64(const SourceInfo &); |
11492 | bool emitDivcIntAP(const SourceInfo &); |
11493 | bool emitDivcIntAPS(const SourceInfo &); |
11494 | bool emitDivcFloat(const SourceInfo &); |
11495 | #endif |
11496 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11497 | [[nodiscard]] bool emitDivc(PrimType, const SourceInfo &I); |
11498 | #endif |
11499 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
11500 | bool |
11501 | #if defined(GET_EVAL_IMPL) |
11502 | EvalEmitter |
11503 | #else |
11504 | ByteCodeEmitter |
11505 | #endif |
11506 | ::emitDivc(PrimType T0, const SourceInfo &I) { |
11507 | switch (T0) { |
11508 | case PT_Sint8: |
11509 | return emitDivcSint8(I); |
11510 | case PT_Uint8: |
11511 | return emitDivcUint8(I); |
11512 | case PT_Sint16: |
11513 | return emitDivcSint16(I); |
11514 | case PT_Uint16: |
11515 | return emitDivcUint16(I); |
11516 | case PT_Sint32: |
11517 | return emitDivcSint32(I); |
11518 | case PT_Uint32: |
11519 | return emitDivcUint32(I); |
11520 | case PT_Sint64: |
11521 | return emitDivcSint64(I); |
11522 | case PT_Uint64: |
11523 | return emitDivcUint64(I); |
11524 | case PT_IntAP: |
11525 | return emitDivcIntAP(I); |
11526 | case PT_IntAPS: |
11527 | return emitDivcIntAPS(I); |
11528 | case PT_Float: |
11529 | return emitDivcFloat(I); |
11530 | default: llvm_unreachable("invalid type: emitDivc" ); |
11531 | } |
11532 | llvm_unreachable("invalid enum value" ); |
11533 | } |
11534 | #endif |
11535 | #ifdef GET_LINK_IMPL |
11536 | bool ByteCodeEmitter::emitDivcSint8(const SourceInfo &L) { |
11537 | return emitOp<>(OP_DivcSint8, L); |
11538 | } |
11539 | bool ByteCodeEmitter::emitDivcUint8(const SourceInfo &L) { |
11540 | return emitOp<>(OP_DivcUint8, L); |
11541 | } |
11542 | bool ByteCodeEmitter::emitDivcSint16(const SourceInfo &L) { |
11543 | return emitOp<>(OP_DivcSint16, L); |
11544 | } |
11545 | bool ByteCodeEmitter::emitDivcUint16(const SourceInfo &L) { |
11546 | return emitOp<>(OP_DivcUint16, L); |
11547 | } |
11548 | bool ByteCodeEmitter::emitDivcSint32(const SourceInfo &L) { |
11549 | return emitOp<>(OP_DivcSint32, L); |
11550 | } |
11551 | bool ByteCodeEmitter::emitDivcUint32(const SourceInfo &L) { |
11552 | return emitOp<>(OP_DivcUint32, L); |
11553 | } |
11554 | bool ByteCodeEmitter::emitDivcSint64(const SourceInfo &L) { |
11555 | return emitOp<>(OP_DivcSint64, L); |
11556 | } |
11557 | bool ByteCodeEmitter::emitDivcUint64(const SourceInfo &L) { |
11558 | return emitOp<>(OP_DivcUint64, L); |
11559 | } |
11560 | bool ByteCodeEmitter::emitDivcIntAP(const SourceInfo &L) { |
11561 | return emitOp<>(OP_DivcIntAP, L); |
11562 | } |
11563 | bool ByteCodeEmitter::emitDivcIntAPS(const SourceInfo &L) { |
11564 | return emitOp<>(OP_DivcIntAPS, L); |
11565 | } |
11566 | bool ByteCodeEmitter::emitDivcFloat(const SourceInfo &L) { |
11567 | return emitOp<>(OP_DivcFloat, L); |
11568 | } |
11569 | #endif |
11570 | #ifdef GET_EVAL_IMPL |
11571 | bool EvalEmitter::emitDivcSint8(const SourceInfo &L) { |
11572 | if (!isActive()) return true; |
11573 | CurrentSource = L; |
11574 | return Divc<PT_Sint8>(S, OpPC); |
11575 | } |
11576 | bool EvalEmitter::emitDivcUint8(const SourceInfo &L) { |
11577 | if (!isActive()) return true; |
11578 | CurrentSource = L; |
11579 | return Divc<PT_Uint8>(S, OpPC); |
11580 | } |
11581 | bool EvalEmitter::emitDivcSint16(const SourceInfo &L) { |
11582 | if (!isActive()) return true; |
11583 | CurrentSource = L; |
11584 | return Divc<PT_Sint16>(S, OpPC); |
11585 | } |
11586 | bool EvalEmitter::emitDivcUint16(const SourceInfo &L) { |
11587 | if (!isActive()) return true; |
11588 | CurrentSource = L; |
11589 | return Divc<PT_Uint16>(S, OpPC); |
11590 | } |
11591 | bool EvalEmitter::emitDivcSint32(const SourceInfo &L) { |
11592 | if (!isActive()) return true; |
11593 | CurrentSource = L; |
11594 | return Divc<PT_Sint32>(S, OpPC); |
11595 | } |
11596 | bool EvalEmitter::emitDivcUint32(const SourceInfo &L) { |
11597 | if (!isActive()) return true; |
11598 | CurrentSource = L; |
11599 | return Divc<PT_Uint32>(S, OpPC); |
11600 | } |
11601 | bool EvalEmitter::emitDivcSint64(const SourceInfo &L) { |
11602 | if (!isActive()) return true; |
11603 | CurrentSource = L; |
11604 | return Divc<PT_Sint64>(S, OpPC); |
11605 | } |
11606 | bool EvalEmitter::emitDivcUint64(const SourceInfo &L) { |
11607 | if (!isActive()) return true; |
11608 | CurrentSource = L; |
11609 | return Divc<PT_Uint64>(S, OpPC); |
11610 | } |
11611 | bool EvalEmitter::emitDivcIntAP(const SourceInfo &L) { |
11612 | if (!isActive()) return true; |
11613 | CurrentSource = L; |
11614 | return Divc<PT_IntAP>(S, OpPC); |
11615 | } |
11616 | bool EvalEmitter::emitDivcIntAPS(const SourceInfo &L) { |
11617 | if (!isActive()) return true; |
11618 | CurrentSource = L; |
11619 | return Divc<PT_IntAPS>(S, OpPC); |
11620 | } |
11621 | bool EvalEmitter::emitDivcFloat(const SourceInfo &L) { |
11622 | if (!isActive()) return true; |
11623 | CurrentSource = L; |
11624 | return Divc<PT_Float>(S, OpPC); |
11625 | } |
11626 | #endif |
11627 | #ifdef GET_OPCODE_NAMES |
11628 | OP_Divf, |
11629 | #endif |
11630 | #ifdef GET_INTERP |
11631 | case OP_Divf: { |
11632 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11633 | if (!Divf(S, OpPC, V0)) |
11634 | return false; |
11635 | continue; |
11636 | } |
11637 | #endif |
11638 | #ifdef GET_DISASM |
11639 | case OP_Divf: |
11640 | Text.Op = PrintName("Divf" ); |
11641 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
11642 | break; |
11643 | #endif |
11644 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11645 | bool emitDivf( uint32_t , const SourceInfo &); |
11646 | #endif |
11647 | #ifdef GET_LINK_IMPL |
11648 | bool ByteCodeEmitter::emitDivf( uint32_t A0, const SourceInfo &L) { |
11649 | return emitOp<uint32_t>(OP_Divf, A0, L); |
11650 | } |
11651 | #endif |
11652 | #ifdef GET_EVAL_IMPL |
11653 | bool EvalEmitter::emitDivf( uint32_t A0, const SourceInfo &L) { |
11654 | if (!isActive()) return true; |
11655 | CurrentSource = L; |
11656 | return Divf(S, OpPC, A0); |
11657 | } |
11658 | #endif |
11659 | #ifdef GET_OPCODE_NAMES |
11660 | OP_Dump, |
11661 | #endif |
11662 | #ifdef GET_INTERP |
11663 | case OP_Dump: { |
11664 | if (!Dump(S, OpPC)) |
11665 | return false; |
11666 | continue; |
11667 | } |
11668 | #endif |
11669 | #ifdef GET_DISASM |
11670 | case OP_Dump: |
11671 | Text.Op = PrintName("Dump" ); |
11672 | break; |
11673 | #endif |
11674 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11675 | bool emitDump(const SourceInfo &); |
11676 | #endif |
11677 | #ifdef GET_LINK_IMPL |
11678 | bool ByteCodeEmitter::emitDump(const SourceInfo &L) { |
11679 | return emitOp<>(OP_Dump, L); |
11680 | } |
11681 | #endif |
11682 | #ifdef GET_EVAL_IMPL |
11683 | bool EvalEmitter::emitDump(const SourceInfo &L) { |
11684 | if (!isActive()) return true; |
11685 | CurrentSource = L; |
11686 | return Dump(S, OpPC); |
11687 | } |
11688 | #endif |
11689 | #ifdef GET_OPCODE_NAMES |
11690 | OP_DupSint8, |
11691 | OP_DupUint8, |
11692 | OP_DupSint16, |
11693 | OP_DupUint16, |
11694 | OP_DupSint32, |
11695 | OP_DupUint32, |
11696 | OP_DupSint64, |
11697 | OP_DupUint64, |
11698 | OP_DupIntAP, |
11699 | OP_DupIntAPS, |
11700 | OP_DupBool, |
11701 | OP_DupFixedPoint, |
11702 | OP_DupPtr, |
11703 | OP_DupMemberPtr, |
11704 | OP_DupFloat, |
11705 | #endif |
11706 | #ifdef GET_INTERP |
11707 | case OP_DupSint8: { |
11708 | if (!Dup<PT_Sint8>(S, OpPC)) |
11709 | return false; |
11710 | continue; |
11711 | } |
11712 | case OP_DupUint8: { |
11713 | if (!Dup<PT_Uint8>(S, OpPC)) |
11714 | return false; |
11715 | continue; |
11716 | } |
11717 | case OP_DupSint16: { |
11718 | if (!Dup<PT_Sint16>(S, OpPC)) |
11719 | return false; |
11720 | continue; |
11721 | } |
11722 | case OP_DupUint16: { |
11723 | if (!Dup<PT_Uint16>(S, OpPC)) |
11724 | return false; |
11725 | continue; |
11726 | } |
11727 | case OP_DupSint32: { |
11728 | if (!Dup<PT_Sint32>(S, OpPC)) |
11729 | return false; |
11730 | continue; |
11731 | } |
11732 | case OP_DupUint32: { |
11733 | if (!Dup<PT_Uint32>(S, OpPC)) |
11734 | return false; |
11735 | continue; |
11736 | } |
11737 | case OP_DupSint64: { |
11738 | if (!Dup<PT_Sint64>(S, OpPC)) |
11739 | return false; |
11740 | continue; |
11741 | } |
11742 | case OP_DupUint64: { |
11743 | if (!Dup<PT_Uint64>(S, OpPC)) |
11744 | return false; |
11745 | continue; |
11746 | } |
11747 | case OP_DupIntAP: { |
11748 | if (!Dup<PT_IntAP>(S, OpPC)) |
11749 | return false; |
11750 | continue; |
11751 | } |
11752 | case OP_DupIntAPS: { |
11753 | if (!Dup<PT_IntAPS>(S, OpPC)) |
11754 | return false; |
11755 | continue; |
11756 | } |
11757 | case OP_DupBool: { |
11758 | if (!Dup<PT_Bool>(S, OpPC)) |
11759 | return false; |
11760 | continue; |
11761 | } |
11762 | case OP_DupFixedPoint: { |
11763 | if (!Dup<PT_FixedPoint>(S, OpPC)) |
11764 | return false; |
11765 | continue; |
11766 | } |
11767 | case OP_DupPtr: { |
11768 | if (!Dup<PT_Ptr>(S, OpPC)) |
11769 | return false; |
11770 | continue; |
11771 | } |
11772 | case OP_DupMemberPtr: { |
11773 | if (!Dup<PT_MemberPtr>(S, OpPC)) |
11774 | return false; |
11775 | continue; |
11776 | } |
11777 | case OP_DupFloat: { |
11778 | if (!Dup<PT_Float>(S, OpPC)) |
11779 | return false; |
11780 | continue; |
11781 | } |
11782 | #endif |
11783 | #ifdef GET_DISASM |
11784 | case OP_DupSint8: |
11785 | Text.Op = PrintName("DupSint8" ); |
11786 | break; |
11787 | case OP_DupUint8: |
11788 | Text.Op = PrintName("DupUint8" ); |
11789 | break; |
11790 | case OP_DupSint16: |
11791 | Text.Op = PrintName("DupSint16" ); |
11792 | break; |
11793 | case OP_DupUint16: |
11794 | Text.Op = PrintName("DupUint16" ); |
11795 | break; |
11796 | case OP_DupSint32: |
11797 | Text.Op = PrintName("DupSint32" ); |
11798 | break; |
11799 | case OP_DupUint32: |
11800 | Text.Op = PrintName("DupUint32" ); |
11801 | break; |
11802 | case OP_DupSint64: |
11803 | Text.Op = PrintName("DupSint64" ); |
11804 | break; |
11805 | case OP_DupUint64: |
11806 | Text.Op = PrintName("DupUint64" ); |
11807 | break; |
11808 | case OP_DupIntAP: |
11809 | Text.Op = PrintName("DupIntAP" ); |
11810 | break; |
11811 | case OP_DupIntAPS: |
11812 | Text.Op = PrintName("DupIntAPS" ); |
11813 | break; |
11814 | case OP_DupBool: |
11815 | Text.Op = PrintName("DupBool" ); |
11816 | break; |
11817 | case OP_DupFixedPoint: |
11818 | Text.Op = PrintName("DupFixedPoint" ); |
11819 | break; |
11820 | case OP_DupPtr: |
11821 | Text.Op = PrintName("DupPtr" ); |
11822 | break; |
11823 | case OP_DupMemberPtr: |
11824 | Text.Op = PrintName("DupMemberPtr" ); |
11825 | break; |
11826 | case OP_DupFloat: |
11827 | Text.Op = PrintName("DupFloat" ); |
11828 | break; |
11829 | #endif |
11830 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11831 | bool emitDupSint8(const SourceInfo &); |
11832 | bool emitDupUint8(const SourceInfo &); |
11833 | bool emitDupSint16(const SourceInfo &); |
11834 | bool emitDupUint16(const SourceInfo &); |
11835 | bool emitDupSint32(const SourceInfo &); |
11836 | bool emitDupUint32(const SourceInfo &); |
11837 | bool emitDupSint64(const SourceInfo &); |
11838 | bool emitDupUint64(const SourceInfo &); |
11839 | bool emitDupIntAP(const SourceInfo &); |
11840 | bool emitDupIntAPS(const SourceInfo &); |
11841 | bool emitDupBool(const SourceInfo &); |
11842 | bool emitDupFixedPoint(const SourceInfo &); |
11843 | bool emitDupPtr(const SourceInfo &); |
11844 | bool emitDupMemberPtr(const SourceInfo &); |
11845 | bool emitDupFloat(const SourceInfo &); |
11846 | #endif |
11847 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11848 | [[nodiscard]] bool emitDup(PrimType, const SourceInfo &I); |
11849 | #endif |
11850 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
11851 | bool |
11852 | #if defined(GET_EVAL_IMPL) |
11853 | EvalEmitter |
11854 | #else |
11855 | ByteCodeEmitter |
11856 | #endif |
11857 | ::emitDup(PrimType T0, const SourceInfo &I) { |
11858 | switch (T0) { |
11859 | case PT_Sint8: |
11860 | return emitDupSint8(I); |
11861 | case PT_Uint8: |
11862 | return emitDupUint8(I); |
11863 | case PT_Sint16: |
11864 | return emitDupSint16(I); |
11865 | case PT_Uint16: |
11866 | return emitDupUint16(I); |
11867 | case PT_Sint32: |
11868 | return emitDupSint32(I); |
11869 | case PT_Uint32: |
11870 | return emitDupUint32(I); |
11871 | case PT_Sint64: |
11872 | return emitDupSint64(I); |
11873 | case PT_Uint64: |
11874 | return emitDupUint64(I); |
11875 | case PT_IntAP: |
11876 | return emitDupIntAP(I); |
11877 | case PT_IntAPS: |
11878 | return emitDupIntAPS(I); |
11879 | case PT_Bool: |
11880 | return emitDupBool(I); |
11881 | case PT_FixedPoint: |
11882 | return emitDupFixedPoint(I); |
11883 | case PT_Ptr: |
11884 | return emitDupPtr(I); |
11885 | case PT_MemberPtr: |
11886 | return emitDupMemberPtr(I); |
11887 | case PT_Float: |
11888 | return emitDupFloat(I); |
11889 | } |
11890 | llvm_unreachable("invalid enum value" ); |
11891 | } |
11892 | #endif |
11893 | #ifdef GET_LINK_IMPL |
11894 | bool ByteCodeEmitter::emitDupSint8(const SourceInfo &L) { |
11895 | return emitOp<>(OP_DupSint8, L); |
11896 | } |
11897 | bool ByteCodeEmitter::emitDupUint8(const SourceInfo &L) { |
11898 | return emitOp<>(OP_DupUint8, L); |
11899 | } |
11900 | bool ByteCodeEmitter::emitDupSint16(const SourceInfo &L) { |
11901 | return emitOp<>(OP_DupSint16, L); |
11902 | } |
11903 | bool ByteCodeEmitter::emitDupUint16(const SourceInfo &L) { |
11904 | return emitOp<>(OP_DupUint16, L); |
11905 | } |
11906 | bool ByteCodeEmitter::emitDupSint32(const SourceInfo &L) { |
11907 | return emitOp<>(OP_DupSint32, L); |
11908 | } |
11909 | bool ByteCodeEmitter::emitDupUint32(const SourceInfo &L) { |
11910 | return emitOp<>(OP_DupUint32, L); |
11911 | } |
11912 | bool ByteCodeEmitter::emitDupSint64(const SourceInfo &L) { |
11913 | return emitOp<>(OP_DupSint64, L); |
11914 | } |
11915 | bool ByteCodeEmitter::emitDupUint64(const SourceInfo &L) { |
11916 | return emitOp<>(OP_DupUint64, L); |
11917 | } |
11918 | bool ByteCodeEmitter::emitDupIntAP(const SourceInfo &L) { |
11919 | return emitOp<>(OP_DupIntAP, L); |
11920 | } |
11921 | bool ByteCodeEmitter::emitDupIntAPS(const SourceInfo &L) { |
11922 | return emitOp<>(OP_DupIntAPS, L); |
11923 | } |
11924 | bool ByteCodeEmitter::emitDupBool(const SourceInfo &L) { |
11925 | return emitOp<>(OP_DupBool, L); |
11926 | } |
11927 | bool ByteCodeEmitter::emitDupFixedPoint(const SourceInfo &L) { |
11928 | return emitOp<>(OP_DupFixedPoint, L); |
11929 | } |
11930 | bool ByteCodeEmitter::emitDupPtr(const SourceInfo &L) { |
11931 | return emitOp<>(OP_DupPtr, L); |
11932 | } |
11933 | bool ByteCodeEmitter::emitDupMemberPtr(const SourceInfo &L) { |
11934 | return emitOp<>(OP_DupMemberPtr, L); |
11935 | } |
11936 | bool ByteCodeEmitter::emitDupFloat(const SourceInfo &L) { |
11937 | return emitOp<>(OP_DupFloat, L); |
11938 | } |
11939 | #endif |
11940 | #ifdef GET_EVAL_IMPL |
11941 | bool EvalEmitter::emitDupSint8(const SourceInfo &L) { |
11942 | if (!isActive()) return true; |
11943 | CurrentSource = L; |
11944 | return Dup<PT_Sint8>(S, OpPC); |
11945 | } |
11946 | bool EvalEmitter::emitDupUint8(const SourceInfo &L) { |
11947 | if (!isActive()) return true; |
11948 | CurrentSource = L; |
11949 | return Dup<PT_Uint8>(S, OpPC); |
11950 | } |
11951 | bool EvalEmitter::emitDupSint16(const SourceInfo &L) { |
11952 | if (!isActive()) return true; |
11953 | CurrentSource = L; |
11954 | return Dup<PT_Sint16>(S, OpPC); |
11955 | } |
11956 | bool EvalEmitter::emitDupUint16(const SourceInfo &L) { |
11957 | if (!isActive()) return true; |
11958 | CurrentSource = L; |
11959 | return Dup<PT_Uint16>(S, OpPC); |
11960 | } |
11961 | bool EvalEmitter::emitDupSint32(const SourceInfo &L) { |
11962 | if (!isActive()) return true; |
11963 | CurrentSource = L; |
11964 | return Dup<PT_Sint32>(S, OpPC); |
11965 | } |
11966 | bool EvalEmitter::emitDupUint32(const SourceInfo &L) { |
11967 | if (!isActive()) return true; |
11968 | CurrentSource = L; |
11969 | return Dup<PT_Uint32>(S, OpPC); |
11970 | } |
11971 | bool EvalEmitter::emitDupSint64(const SourceInfo &L) { |
11972 | if (!isActive()) return true; |
11973 | CurrentSource = L; |
11974 | return Dup<PT_Sint64>(S, OpPC); |
11975 | } |
11976 | bool EvalEmitter::emitDupUint64(const SourceInfo &L) { |
11977 | if (!isActive()) return true; |
11978 | CurrentSource = L; |
11979 | return Dup<PT_Uint64>(S, OpPC); |
11980 | } |
11981 | bool EvalEmitter::emitDupIntAP(const SourceInfo &L) { |
11982 | if (!isActive()) return true; |
11983 | CurrentSource = L; |
11984 | return Dup<PT_IntAP>(S, OpPC); |
11985 | } |
11986 | bool EvalEmitter::emitDupIntAPS(const SourceInfo &L) { |
11987 | if (!isActive()) return true; |
11988 | CurrentSource = L; |
11989 | return Dup<PT_IntAPS>(S, OpPC); |
11990 | } |
11991 | bool EvalEmitter::emitDupBool(const SourceInfo &L) { |
11992 | if (!isActive()) return true; |
11993 | CurrentSource = L; |
11994 | return Dup<PT_Bool>(S, OpPC); |
11995 | } |
11996 | bool EvalEmitter::emitDupFixedPoint(const SourceInfo &L) { |
11997 | if (!isActive()) return true; |
11998 | CurrentSource = L; |
11999 | return Dup<PT_FixedPoint>(S, OpPC); |
12000 | } |
12001 | bool EvalEmitter::emitDupPtr(const SourceInfo &L) { |
12002 | if (!isActive()) return true; |
12003 | CurrentSource = L; |
12004 | return Dup<PT_Ptr>(S, OpPC); |
12005 | } |
12006 | bool EvalEmitter::emitDupMemberPtr(const SourceInfo &L) { |
12007 | if (!isActive()) return true; |
12008 | CurrentSource = L; |
12009 | return Dup<PT_MemberPtr>(S, OpPC); |
12010 | } |
12011 | bool EvalEmitter::emitDupFloat(const SourceInfo &L) { |
12012 | if (!isActive()) return true; |
12013 | CurrentSource = L; |
12014 | return Dup<PT_Float>(S, OpPC); |
12015 | } |
12016 | #endif |
12017 | #ifdef GET_OPCODE_NAMES |
12018 | OP_EQSint8, |
12019 | OP_EQUint8, |
12020 | OP_EQSint16, |
12021 | OP_EQUint16, |
12022 | OP_EQSint32, |
12023 | OP_EQUint32, |
12024 | OP_EQSint64, |
12025 | OP_EQUint64, |
12026 | OP_EQIntAP, |
12027 | OP_EQIntAPS, |
12028 | OP_EQBool, |
12029 | OP_EQFixedPoint, |
12030 | OP_EQPtr, |
12031 | OP_EQMemberPtr, |
12032 | OP_EQFloat, |
12033 | #endif |
12034 | #ifdef GET_INTERP |
12035 | case OP_EQSint8: { |
12036 | if (!EQ<PT_Sint8>(S, OpPC)) |
12037 | return false; |
12038 | continue; |
12039 | } |
12040 | case OP_EQUint8: { |
12041 | if (!EQ<PT_Uint8>(S, OpPC)) |
12042 | return false; |
12043 | continue; |
12044 | } |
12045 | case OP_EQSint16: { |
12046 | if (!EQ<PT_Sint16>(S, OpPC)) |
12047 | return false; |
12048 | continue; |
12049 | } |
12050 | case OP_EQUint16: { |
12051 | if (!EQ<PT_Uint16>(S, OpPC)) |
12052 | return false; |
12053 | continue; |
12054 | } |
12055 | case OP_EQSint32: { |
12056 | if (!EQ<PT_Sint32>(S, OpPC)) |
12057 | return false; |
12058 | continue; |
12059 | } |
12060 | case OP_EQUint32: { |
12061 | if (!EQ<PT_Uint32>(S, OpPC)) |
12062 | return false; |
12063 | continue; |
12064 | } |
12065 | case OP_EQSint64: { |
12066 | if (!EQ<PT_Sint64>(S, OpPC)) |
12067 | return false; |
12068 | continue; |
12069 | } |
12070 | case OP_EQUint64: { |
12071 | if (!EQ<PT_Uint64>(S, OpPC)) |
12072 | return false; |
12073 | continue; |
12074 | } |
12075 | case OP_EQIntAP: { |
12076 | if (!EQ<PT_IntAP>(S, OpPC)) |
12077 | return false; |
12078 | continue; |
12079 | } |
12080 | case OP_EQIntAPS: { |
12081 | if (!EQ<PT_IntAPS>(S, OpPC)) |
12082 | return false; |
12083 | continue; |
12084 | } |
12085 | case OP_EQBool: { |
12086 | if (!EQ<PT_Bool>(S, OpPC)) |
12087 | return false; |
12088 | continue; |
12089 | } |
12090 | case OP_EQFixedPoint: { |
12091 | if (!EQ<PT_FixedPoint>(S, OpPC)) |
12092 | return false; |
12093 | continue; |
12094 | } |
12095 | case OP_EQPtr: { |
12096 | if (!EQ<PT_Ptr>(S, OpPC)) |
12097 | return false; |
12098 | continue; |
12099 | } |
12100 | case OP_EQMemberPtr: { |
12101 | if (!EQ<PT_MemberPtr>(S, OpPC)) |
12102 | return false; |
12103 | continue; |
12104 | } |
12105 | case OP_EQFloat: { |
12106 | if (!EQ<PT_Float>(S, OpPC)) |
12107 | return false; |
12108 | continue; |
12109 | } |
12110 | #endif |
12111 | #ifdef GET_DISASM |
12112 | case OP_EQSint8: |
12113 | Text.Op = PrintName("EQSint8" ); |
12114 | break; |
12115 | case OP_EQUint8: |
12116 | Text.Op = PrintName("EQUint8" ); |
12117 | break; |
12118 | case OP_EQSint16: |
12119 | Text.Op = PrintName("EQSint16" ); |
12120 | break; |
12121 | case OP_EQUint16: |
12122 | Text.Op = PrintName("EQUint16" ); |
12123 | break; |
12124 | case OP_EQSint32: |
12125 | Text.Op = PrintName("EQSint32" ); |
12126 | break; |
12127 | case OP_EQUint32: |
12128 | Text.Op = PrintName("EQUint32" ); |
12129 | break; |
12130 | case OP_EQSint64: |
12131 | Text.Op = PrintName("EQSint64" ); |
12132 | break; |
12133 | case OP_EQUint64: |
12134 | Text.Op = PrintName("EQUint64" ); |
12135 | break; |
12136 | case OP_EQIntAP: |
12137 | Text.Op = PrintName("EQIntAP" ); |
12138 | break; |
12139 | case OP_EQIntAPS: |
12140 | Text.Op = PrintName("EQIntAPS" ); |
12141 | break; |
12142 | case OP_EQBool: |
12143 | Text.Op = PrintName("EQBool" ); |
12144 | break; |
12145 | case OP_EQFixedPoint: |
12146 | Text.Op = PrintName("EQFixedPoint" ); |
12147 | break; |
12148 | case OP_EQPtr: |
12149 | Text.Op = PrintName("EQPtr" ); |
12150 | break; |
12151 | case OP_EQMemberPtr: |
12152 | Text.Op = PrintName("EQMemberPtr" ); |
12153 | break; |
12154 | case OP_EQFloat: |
12155 | Text.Op = PrintName("EQFloat" ); |
12156 | break; |
12157 | #endif |
12158 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12159 | bool emitEQSint8(const SourceInfo &); |
12160 | bool emitEQUint8(const SourceInfo &); |
12161 | bool emitEQSint16(const SourceInfo &); |
12162 | bool emitEQUint16(const SourceInfo &); |
12163 | bool emitEQSint32(const SourceInfo &); |
12164 | bool emitEQUint32(const SourceInfo &); |
12165 | bool emitEQSint64(const SourceInfo &); |
12166 | bool emitEQUint64(const SourceInfo &); |
12167 | bool emitEQIntAP(const SourceInfo &); |
12168 | bool emitEQIntAPS(const SourceInfo &); |
12169 | bool emitEQBool(const SourceInfo &); |
12170 | bool emitEQFixedPoint(const SourceInfo &); |
12171 | bool emitEQPtr(const SourceInfo &); |
12172 | bool emitEQMemberPtr(const SourceInfo &); |
12173 | bool emitEQFloat(const SourceInfo &); |
12174 | #endif |
12175 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12176 | [[nodiscard]] bool emitEQ(PrimType, const SourceInfo &I); |
12177 | #endif |
12178 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
12179 | bool |
12180 | #if defined(GET_EVAL_IMPL) |
12181 | EvalEmitter |
12182 | #else |
12183 | ByteCodeEmitter |
12184 | #endif |
12185 | ::emitEQ(PrimType T0, const SourceInfo &I) { |
12186 | switch (T0) { |
12187 | case PT_Sint8: |
12188 | return emitEQSint8(I); |
12189 | case PT_Uint8: |
12190 | return emitEQUint8(I); |
12191 | case PT_Sint16: |
12192 | return emitEQSint16(I); |
12193 | case PT_Uint16: |
12194 | return emitEQUint16(I); |
12195 | case PT_Sint32: |
12196 | return emitEQSint32(I); |
12197 | case PT_Uint32: |
12198 | return emitEQUint32(I); |
12199 | case PT_Sint64: |
12200 | return emitEQSint64(I); |
12201 | case PT_Uint64: |
12202 | return emitEQUint64(I); |
12203 | case PT_IntAP: |
12204 | return emitEQIntAP(I); |
12205 | case PT_IntAPS: |
12206 | return emitEQIntAPS(I); |
12207 | case PT_Bool: |
12208 | return emitEQBool(I); |
12209 | case PT_FixedPoint: |
12210 | return emitEQFixedPoint(I); |
12211 | case PT_Ptr: |
12212 | return emitEQPtr(I); |
12213 | case PT_MemberPtr: |
12214 | return emitEQMemberPtr(I); |
12215 | case PT_Float: |
12216 | return emitEQFloat(I); |
12217 | } |
12218 | llvm_unreachable("invalid enum value" ); |
12219 | } |
12220 | #endif |
12221 | #ifdef GET_LINK_IMPL |
12222 | bool ByteCodeEmitter::emitEQSint8(const SourceInfo &L) { |
12223 | return emitOp<>(OP_EQSint8, L); |
12224 | } |
12225 | bool ByteCodeEmitter::emitEQUint8(const SourceInfo &L) { |
12226 | return emitOp<>(OP_EQUint8, L); |
12227 | } |
12228 | bool ByteCodeEmitter::emitEQSint16(const SourceInfo &L) { |
12229 | return emitOp<>(OP_EQSint16, L); |
12230 | } |
12231 | bool ByteCodeEmitter::emitEQUint16(const SourceInfo &L) { |
12232 | return emitOp<>(OP_EQUint16, L); |
12233 | } |
12234 | bool ByteCodeEmitter::emitEQSint32(const SourceInfo &L) { |
12235 | return emitOp<>(OP_EQSint32, L); |
12236 | } |
12237 | bool ByteCodeEmitter::emitEQUint32(const SourceInfo &L) { |
12238 | return emitOp<>(OP_EQUint32, L); |
12239 | } |
12240 | bool ByteCodeEmitter::emitEQSint64(const SourceInfo &L) { |
12241 | return emitOp<>(OP_EQSint64, L); |
12242 | } |
12243 | bool ByteCodeEmitter::emitEQUint64(const SourceInfo &L) { |
12244 | return emitOp<>(OP_EQUint64, L); |
12245 | } |
12246 | bool ByteCodeEmitter::emitEQIntAP(const SourceInfo &L) { |
12247 | return emitOp<>(OP_EQIntAP, L); |
12248 | } |
12249 | bool ByteCodeEmitter::emitEQIntAPS(const SourceInfo &L) { |
12250 | return emitOp<>(OP_EQIntAPS, L); |
12251 | } |
12252 | bool ByteCodeEmitter::emitEQBool(const SourceInfo &L) { |
12253 | return emitOp<>(OP_EQBool, L); |
12254 | } |
12255 | bool ByteCodeEmitter::emitEQFixedPoint(const SourceInfo &L) { |
12256 | return emitOp<>(OP_EQFixedPoint, L); |
12257 | } |
12258 | bool ByteCodeEmitter::emitEQPtr(const SourceInfo &L) { |
12259 | return emitOp<>(OP_EQPtr, L); |
12260 | } |
12261 | bool ByteCodeEmitter::emitEQMemberPtr(const SourceInfo &L) { |
12262 | return emitOp<>(OP_EQMemberPtr, L); |
12263 | } |
12264 | bool ByteCodeEmitter::emitEQFloat(const SourceInfo &L) { |
12265 | return emitOp<>(OP_EQFloat, L); |
12266 | } |
12267 | #endif |
12268 | #ifdef GET_EVAL_IMPL |
12269 | bool EvalEmitter::emitEQSint8(const SourceInfo &L) { |
12270 | if (!isActive()) return true; |
12271 | CurrentSource = L; |
12272 | return EQ<PT_Sint8>(S, OpPC); |
12273 | } |
12274 | bool EvalEmitter::emitEQUint8(const SourceInfo &L) { |
12275 | if (!isActive()) return true; |
12276 | CurrentSource = L; |
12277 | return EQ<PT_Uint8>(S, OpPC); |
12278 | } |
12279 | bool EvalEmitter::emitEQSint16(const SourceInfo &L) { |
12280 | if (!isActive()) return true; |
12281 | CurrentSource = L; |
12282 | return EQ<PT_Sint16>(S, OpPC); |
12283 | } |
12284 | bool EvalEmitter::emitEQUint16(const SourceInfo &L) { |
12285 | if (!isActive()) return true; |
12286 | CurrentSource = L; |
12287 | return EQ<PT_Uint16>(S, OpPC); |
12288 | } |
12289 | bool EvalEmitter::emitEQSint32(const SourceInfo &L) { |
12290 | if (!isActive()) return true; |
12291 | CurrentSource = L; |
12292 | return EQ<PT_Sint32>(S, OpPC); |
12293 | } |
12294 | bool EvalEmitter::emitEQUint32(const SourceInfo &L) { |
12295 | if (!isActive()) return true; |
12296 | CurrentSource = L; |
12297 | return EQ<PT_Uint32>(S, OpPC); |
12298 | } |
12299 | bool EvalEmitter::emitEQSint64(const SourceInfo &L) { |
12300 | if (!isActive()) return true; |
12301 | CurrentSource = L; |
12302 | return EQ<PT_Sint64>(S, OpPC); |
12303 | } |
12304 | bool EvalEmitter::emitEQUint64(const SourceInfo &L) { |
12305 | if (!isActive()) return true; |
12306 | CurrentSource = L; |
12307 | return EQ<PT_Uint64>(S, OpPC); |
12308 | } |
12309 | bool EvalEmitter::emitEQIntAP(const SourceInfo &L) { |
12310 | if (!isActive()) return true; |
12311 | CurrentSource = L; |
12312 | return EQ<PT_IntAP>(S, OpPC); |
12313 | } |
12314 | bool EvalEmitter::emitEQIntAPS(const SourceInfo &L) { |
12315 | if (!isActive()) return true; |
12316 | CurrentSource = L; |
12317 | return EQ<PT_IntAPS>(S, OpPC); |
12318 | } |
12319 | bool EvalEmitter::emitEQBool(const SourceInfo &L) { |
12320 | if (!isActive()) return true; |
12321 | CurrentSource = L; |
12322 | return EQ<PT_Bool>(S, OpPC); |
12323 | } |
12324 | bool EvalEmitter::emitEQFixedPoint(const SourceInfo &L) { |
12325 | if (!isActive()) return true; |
12326 | CurrentSource = L; |
12327 | return EQ<PT_FixedPoint>(S, OpPC); |
12328 | } |
12329 | bool EvalEmitter::emitEQPtr(const SourceInfo &L) { |
12330 | if (!isActive()) return true; |
12331 | CurrentSource = L; |
12332 | return EQ<PT_Ptr>(S, OpPC); |
12333 | } |
12334 | bool EvalEmitter::emitEQMemberPtr(const SourceInfo &L) { |
12335 | if (!isActive()) return true; |
12336 | CurrentSource = L; |
12337 | return EQ<PT_MemberPtr>(S, OpPC); |
12338 | } |
12339 | bool EvalEmitter::emitEQFloat(const SourceInfo &L) { |
12340 | if (!isActive()) return true; |
12341 | CurrentSource = L; |
12342 | return EQ<PT_Float>(S, OpPC); |
12343 | } |
12344 | #endif |
12345 | #ifdef GET_OPCODE_NAMES |
12346 | OP_EndLifetime, |
12347 | #endif |
12348 | #ifdef GET_INTERP |
12349 | case OP_EndLifetime: { |
12350 | if (!EndLifetime(S, OpPC)) |
12351 | return false; |
12352 | continue; |
12353 | } |
12354 | #endif |
12355 | #ifdef GET_DISASM |
12356 | case OP_EndLifetime: |
12357 | Text.Op = PrintName("EndLifetime" ); |
12358 | break; |
12359 | #endif |
12360 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12361 | bool emitEndLifetime(const SourceInfo &); |
12362 | #endif |
12363 | #ifdef GET_LINK_IMPL |
12364 | bool ByteCodeEmitter::emitEndLifetime(const SourceInfo &L) { |
12365 | return emitOp<>(OP_EndLifetime, L); |
12366 | } |
12367 | #endif |
12368 | #ifdef GET_EVAL_IMPL |
12369 | bool EvalEmitter::emitEndLifetime(const SourceInfo &L) { |
12370 | if (!isActive()) return true; |
12371 | CurrentSource = L; |
12372 | return EndLifetime(S, OpPC); |
12373 | } |
12374 | #endif |
12375 | #ifdef GET_OPCODE_NAMES |
12376 | OP_EndLifetimePop, |
12377 | #endif |
12378 | #ifdef GET_INTERP |
12379 | case OP_EndLifetimePop: { |
12380 | if (!EndLifetimePop(S, OpPC)) |
12381 | return false; |
12382 | continue; |
12383 | } |
12384 | #endif |
12385 | #ifdef GET_DISASM |
12386 | case OP_EndLifetimePop: |
12387 | Text.Op = PrintName("EndLifetimePop" ); |
12388 | break; |
12389 | #endif |
12390 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12391 | bool emitEndLifetimePop(const SourceInfo &); |
12392 | #endif |
12393 | #ifdef GET_LINK_IMPL |
12394 | bool ByteCodeEmitter::emitEndLifetimePop(const SourceInfo &L) { |
12395 | return emitOp<>(OP_EndLifetimePop, L); |
12396 | } |
12397 | #endif |
12398 | #ifdef GET_EVAL_IMPL |
12399 | bool EvalEmitter::emitEndLifetimePop(const SourceInfo &L) { |
12400 | if (!isActive()) return true; |
12401 | CurrentSource = L; |
12402 | return EndLifetimePop(S, OpPC); |
12403 | } |
12404 | #endif |
12405 | #ifdef GET_OPCODE_NAMES |
12406 | OP_EndSpeculation, |
12407 | #endif |
12408 | #ifdef GET_INTERP |
12409 | case OP_EndSpeculation: { |
12410 | if (!EndSpeculation(S, OpPC)) |
12411 | return false; |
12412 | continue; |
12413 | } |
12414 | #endif |
12415 | #ifdef GET_DISASM |
12416 | case OP_EndSpeculation: |
12417 | Text.Op = PrintName("EndSpeculation" ); |
12418 | break; |
12419 | #endif |
12420 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12421 | bool emitEndSpeculation(const SourceInfo &); |
12422 | #endif |
12423 | #ifdef GET_LINK_IMPL |
12424 | bool ByteCodeEmitter::emitEndSpeculation(const SourceInfo &L) { |
12425 | return emitOp<>(OP_EndSpeculation, L); |
12426 | } |
12427 | #endif |
12428 | #ifdef GET_EVAL_IMPL |
12429 | bool EvalEmitter::emitEndSpeculation(const SourceInfo &L) { |
12430 | if (!isActive()) return true; |
12431 | CurrentSource = L; |
12432 | return EndSpeculation(S, OpPC); |
12433 | } |
12434 | #endif |
12435 | #ifdef GET_OPCODE_NAMES |
12436 | OP_Error, |
12437 | #endif |
12438 | #ifdef GET_INTERP |
12439 | case OP_Error: { |
12440 | if (!Error(S, OpPC)) |
12441 | return false; |
12442 | continue; |
12443 | } |
12444 | #endif |
12445 | #ifdef GET_DISASM |
12446 | case OP_Error: |
12447 | Text.Op = PrintName("Error" ); |
12448 | break; |
12449 | #endif |
12450 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12451 | bool emitError(const SourceInfo &); |
12452 | #endif |
12453 | #ifdef GET_LINK_IMPL |
12454 | bool ByteCodeEmitter::emitError(const SourceInfo &L) { |
12455 | return emitOp<>(OP_Error, L); |
12456 | } |
12457 | #endif |
12458 | #ifdef GET_EVAL_IMPL |
12459 | bool EvalEmitter::emitError(const SourceInfo &L) { |
12460 | if (!isActive()) return true; |
12461 | CurrentSource = L; |
12462 | return Error(S, OpPC); |
12463 | } |
12464 | #endif |
12465 | #ifdef GET_OPCODE_NAMES |
12466 | OP_ExpandPtr, |
12467 | #endif |
12468 | #ifdef GET_INTERP |
12469 | case OP_ExpandPtr: { |
12470 | if (!ExpandPtr(S, OpPC)) |
12471 | return false; |
12472 | continue; |
12473 | } |
12474 | #endif |
12475 | #ifdef GET_DISASM |
12476 | case OP_ExpandPtr: |
12477 | Text.Op = PrintName("ExpandPtr" ); |
12478 | break; |
12479 | #endif |
12480 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12481 | bool emitExpandPtr(const SourceInfo &); |
12482 | #endif |
12483 | #ifdef GET_LINK_IMPL |
12484 | bool ByteCodeEmitter::emitExpandPtr(const SourceInfo &L) { |
12485 | return emitOp<>(OP_ExpandPtr, L); |
12486 | } |
12487 | #endif |
12488 | #ifdef GET_EVAL_IMPL |
12489 | bool EvalEmitter::emitExpandPtr(const SourceInfo &L) { |
12490 | if (!isActive()) return true; |
12491 | CurrentSource = L; |
12492 | return ExpandPtr(S, OpPC); |
12493 | } |
12494 | #endif |
12495 | #ifdef GET_OPCODE_NAMES |
12496 | OP_FinishInit, |
12497 | #endif |
12498 | #ifdef GET_INTERP |
12499 | case OP_FinishInit: { |
12500 | if (!FinishInit(S, OpPC)) |
12501 | return false; |
12502 | continue; |
12503 | } |
12504 | #endif |
12505 | #ifdef GET_DISASM |
12506 | case OP_FinishInit: |
12507 | Text.Op = PrintName("FinishInit" ); |
12508 | break; |
12509 | #endif |
12510 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12511 | bool emitFinishInit(const SourceInfo &); |
12512 | #endif |
12513 | #ifdef GET_LINK_IMPL |
12514 | bool ByteCodeEmitter::emitFinishInit(const SourceInfo &L) { |
12515 | return emitOp<>(OP_FinishInit, L); |
12516 | } |
12517 | #endif |
12518 | #ifdef GET_EVAL_IMPL |
12519 | bool EvalEmitter::emitFinishInit(const SourceInfo &L) { |
12520 | if (!isActive()) return true; |
12521 | CurrentSource = L; |
12522 | return FinishInit(S, OpPC); |
12523 | } |
12524 | #endif |
12525 | #ifdef GET_OPCODE_NAMES |
12526 | OP_FinishInitGlobal, |
12527 | #endif |
12528 | #ifdef GET_INTERP |
12529 | case OP_FinishInitGlobal: { |
12530 | if (!FinishInitGlobal(S, OpPC)) |
12531 | return false; |
12532 | continue; |
12533 | } |
12534 | #endif |
12535 | #ifdef GET_DISASM |
12536 | case OP_FinishInitGlobal: |
12537 | Text.Op = PrintName("FinishInitGlobal" ); |
12538 | break; |
12539 | #endif |
12540 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12541 | bool emitFinishInitGlobal(const SourceInfo &); |
12542 | #endif |
12543 | #ifdef GET_LINK_IMPL |
12544 | bool ByteCodeEmitter::emitFinishInitGlobal(const SourceInfo &L) { |
12545 | return emitOp<>(OP_FinishInitGlobal, L); |
12546 | } |
12547 | #endif |
12548 | #ifdef GET_EVAL_IMPL |
12549 | bool EvalEmitter::emitFinishInitGlobal(const SourceInfo &L) { |
12550 | if (!isActive()) return true; |
12551 | CurrentSource = L; |
12552 | return FinishInitGlobal(S, OpPC); |
12553 | } |
12554 | #endif |
12555 | #ifdef GET_OPCODE_NAMES |
12556 | OP_FinishInitPop, |
12557 | #endif |
12558 | #ifdef GET_INTERP |
12559 | case OP_FinishInitPop: { |
12560 | if (!FinishInitPop(S, OpPC)) |
12561 | return false; |
12562 | continue; |
12563 | } |
12564 | #endif |
12565 | #ifdef GET_DISASM |
12566 | case OP_FinishInitPop: |
12567 | Text.Op = PrintName("FinishInitPop" ); |
12568 | break; |
12569 | #endif |
12570 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12571 | bool emitFinishInitPop(const SourceInfo &); |
12572 | #endif |
12573 | #ifdef GET_LINK_IMPL |
12574 | bool ByteCodeEmitter::emitFinishInitPop(const SourceInfo &L) { |
12575 | return emitOp<>(OP_FinishInitPop, L); |
12576 | } |
12577 | #endif |
12578 | #ifdef GET_EVAL_IMPL |
12579 | bool EvalEmitter::emitFinishInitPop(const SourceInfo &L) { |
12580 | if (!isActive()) return true; |
12581 | CurrentSource = L; |
12582 | return FinishInitPop(S, OpPC); |
12583 | } |
12584 | #endif |
12585 | #ifdef GET_OPCODE_NAMES |
12586 | OP_FlipSint8Sint8, |
12587 | OP_FlipSint8Uint8, |
12588 | OP_FlipSint8Sint16, |
12589 | OP_FlipSint8Uint16, |
12590 | OP_FlipSint8Sint32, |
12591 | OP_FlipSint8Uint32, |
12592 | OP_FlipSint8Sint64, |
12593 | OP_FlipSint8Uint64, |
12594 | OP_FlipSint8IntAP, |
12595 | OP_FlipSint8IntAPS, |
12596 | OP_FlipSint8Bool, |
12597 | OP_FlipSint8FixedPoint, |
12598 | OP_FlipSint8Ptr, |
12599 | OP_FlipSint8MemberPtr, |
12600 | OP_FlipSint8Float, |
12601 | OP_FlipUint8Sint8, |
12602 | OP_FlipUint8Uint8, |
12603 | OP_FlipUint8Sint16, |
12604 | OP_FlipUint8Uint16, |
12605 | OP_FlipUint8Sint32, |
12606 | OP_FlipUint8Uint32, |
12607 | OP_FlipUint8Sint64, |
12608 | OP_FlipUint8Uint64, |
12609 | OP_FlipUint8IntAP, |
12610 | OP_FlipUint8IntAPS, |
12611 | OP_FlipUint8Bool, |
12612 | OP_FlipUint8FixedPoint, |
12613 | OP_FlipUint8Ptr, |
12614 | OP_FlipUint8MemberPtr, |
12615 | OP_FlipUint8Float, |
12616 | OP_FlipSint16Sint8, |
12617 | OP_FlipSint16Uint8, |
12618 | OP_FlipSint16Sint16, |
12619 | OP_FlipSint16Uint16, |
12620 | OP_FlipSint16Sint32, |
12621 | OP_FlipSint16Uint32, |
12622 | OP_FlipSint16Sint64, |
12623 | OP_FlipSint16Uint64, |
12624 | OP_FlipSint16IntAP, |
12625 | OP_FlipSint16IntAPS, |
12626 | OP_FlipSint16Bool, |
12627 | OP_FlipSint16FixedPoint, |
12628 | OP_FlipSint16Ptr, |
12629 | OP_FlipSint16MemberPtr, |
12630 | OP_FlipSint16Float, |
12631 | OP_FlipUint16Sint8, |
12632 | OP_FlipUint16Uint8, |
12633 | OP_FlipUint16Sint16, |
12634 | OP_FlipUint16Uint16, |
12635 | OP_FlipUint16Sint32, |
12636 | OP_FlipUint16Uint32, |
12637 | OP_FlipUint16Sint64, |
12638 | OP_FlipUint16Uint64, |
12639 | OP_FlipUint16IntAP, |
12640 | OP_FlipUint16IntAPS, |
12641 | OP_FlipUint16Bool, |
12642 | OP_FlipUint16FixedPoint, |
12643 | OP_FlipUint16Ptr, |
12644 | OP_FlipUint16MemberPtr, |
12645 | OP_FlipUint16Float, |
12646 | OP_FlipSint32Sint8, |
12647 | OP_FlipSint32Uint8, |
12648 | OP_FlipSint32Sint16, |
12649 | OP_FlipSint32Uint16, |
12650 | OP_FlipSint32Sint32, |
12651 | OP_FlipSint32Uint32, |
12652 | OP_FlipSint32Sint64, |
12653 | OP_FlipSint32Uint64, |
12654 | OP_FlipSint32IntAP, |
12655 | OP_FlipSint32IntAPS, |
12656 | OP_FlipSint32Bool, |
12657 | OP_FlipSint32FixedPoint, |
12658 | OP_FlipSint32Ptr, |
12659 | OP_FlipSint32MemberPtr, |
12660 | OP_FlipSint32Float, |
12661 | OP_FlipUint32Sint8, |
12662 | OP_FlipUint32Uint8, |
12663 | OP_FlipUint32Sint16, |
12664 | OP_FlipUint32Uint16, |
12665 | OP_FlipUint32Sint32, |
12666 | OP_FlipUint32Uint32, |
12667 | OP_FlipUint32Sint64, |
12668 | OP_FlipUint32Uint64, |
12669 | OP_FlipUint32IntAP, |
12670 | OP_FlipUint32IntAPS, |
12671 | OP_FlipUint32Bool, |
12672 | OP_FlipUint32FixedPoint, |
12673 | OP_FlipUint32Ptr, |
12674 | OP_FlipUint32MemberPtr, |
12675 | OP_FlipUint32Float, |
12676 | OP_FlipSint64Sint8, |
12677 | OP_FlipSint64Uint8, |
12678 | OP_FlipSint64Sint16, |
12679 | OP_FlipSint64Uint16, |
12680 | OP_FlipSint64Sint32, |
12681 | OP_FlipSint64Uint32, |
12682 | OP_FlipSint64Sint64, |
12683 | OP_FlipSint64Uint64, |
12684 | OP_FlipSint64IntAP, |
12685 | OP_FlipSint64IntAPS, |
12686 | OP_FlipSint64Bool, |
12687 | OP_FlipSint64FixedPoint, |
12688 | OP_FlipSint64Ptr, |
12689 | OP_FlipSint64MemberPtr, |
12690 | OP_FlipSint64Float, |
12691 | OP_FlipUint64Sint8, |
12692 | OP_FlipUint64Uint8, |
12693 | OP_FlipUint64Sint16, |
12694 | OP_FlipUint64Uint16, |
12695 | OP_FlipUint64Sint32, |
12696 | OP_FlipUint64Uint32, |
12697 | OP_FlipUint64Sint64, |
12698 | OP_FlipUint64Uint64, |
12699 | OP_FlipUint64IntAP, |
12700 | OP_FlipUint64IntAPS, |
12701 | OP_FlipUint64Bool, |
12702 | OP_FlipUint64FixedPoint, |
12703 | OP_FlipUint64Ptr, |
12704 | OP_FlipUint64MemberPtr, |
12705 | OP_FlipUint64Float, |
12706 | OP_FlipIntAPSint8, |
12707 | OP_FlipIntAPUint8, |
12708 | OP_FlipIntAPSint16, |
12709 | OP_FlipIntAPUint16, |
12710 | OP_FlipIntAPSint32, |
12711 | OP_FlipIntAPUint32, |
12712 | OP_FlipIntAPSint64, |
12713 | OP_FlipIntAPUint64, |
12714 | OP_FlipIntAPIntAP, |
12715 | OP_FlipIntAPIntAPS, |
12716 | OP_FlipIntAPBool, |
12717 | OP_FlipIntAPFixedPoint, |
12718 | OP_FlipIntAPPtr, |
12719 | OP_FlipIntAPMemberPtr, |
12720 | OP_FlipIntAPFloat, |
12721 | OP_FlipIntAPSSint8, |
12722 | OP_FlipIntAPSUint8, |
12723 | OP_FlipIntAPSSint16, |
12724 | OP_FlipIntAPSUint16, |
12725 | OP_FlipIntAPSSint32, |
12726 | OP_FlipIntAPSUint32, |
12727 | OP_FlipIntAPSSint64, |
12728 | OP_FlipIntAPSUint64, |
12729 | OP_FlipIntAPSIntAP, |
12730 | OP_FlipIntAPSIntAPS, |
12731 | OP_FlipIntAPSBool, |
12732 | OP_FlipIntAPSFixedPoint, |
12733 | OP_FlipIntAPSPtr, |
12734 | OP_FlipIntAPSMemberPtr, |
12735 | OP_FlipIntAPSFloat, |
12736 | OP_FlipBoolSint8, |
12737 | OP_FlipBoolUint8, |
12738 | OP_FlipBoolSint16, |
12739 | OP_FlipBoolUint16, |
12740 | OP_FlipBoolSint32, |
12741 | OP_FlipBoolUint32, |
12742 | OP_FlipBoolSint64, |
12743 | OP_FlipBoolUint64, |
12744 | OP_FlipBoolIntAP, |
12745 | OP_FlipBoolIntAPS, |
12746 | OP_FlipBoolBool, |
12747 | OP_FlipBoolFixedPoint, |
12748 | OP_FlipBoolPtr, |
12749 | OP_FlipBoolMemberPtr, |
12750 | OP_FlipBoolFloat, |
12751 | OP_FlipFixedPointSint8, |
12752 | OP_FlipFixedPointUint8, |
12753 | OP_FlipFixedPointSint16, |
12754 | OP_FlipFixedPointUint16, |
12755 | OP_FlipFixedPointSint32, |
12756 | OP_FlipFixedPointUint32, |
12757 | OP_FlipFixedPointSint64, |
12758 | OP_FlipFixedPointUint64, |
12759 | OP_FlipFixedPointIntAP, |
12760 | OP_FlipFixedPointIntAPS, |
12761 | OP_FlipFixedPointBool, |
12762 | OP_FlipFixedPointFixedPoint, |
12763 | OP_FlipFixedPointPtr, |
12764 | OP_FlipFixedPointMemberPtr, |
12765 | OP_FlipFixedPointFloat, |
12766 | OP_FlipPtrSint8, |
12767 | OP_FlipPtrUint8, |
12768 | OP_FlipPtrSint16, |
12769 | OP_FlipPtrUint16, |
12770 | OP_FlipPtrSint32, |
12771 | OP_FlipPtrUint32, |
12772 | OP_FlipPtrSint64, |
12773 | OP_FlipPtrUint64, |
12774 | OP_FlipPtrIntAP, |
12775 | OP_FlipPtrIntAPS, |
12776 | OP_FlipPtrBool, |
12777 | OP_FlipPtrFixedPoint, |
12778 | OP_FlipPtrPtr, |
12779 | OP_FlipPtrMemberPtr, |
12780 | OP_FlipPtrFloat, |
12781 | OP_FlipMemberPtrSint8, |
12782 | OP_FlipMemberPtrUint8, |
12783 | OP_FlipMemberPtrSint16, |
12784 | OP_FlipMemberPtrUint16, |
12785 | OP_FlipMemberPtrSint32, |
12786 | OP_FlipMemberPtrUint32, |
12787 | OP_FlipMemberPtrSint64, |
12788 | OP_FlipMemberPtrUint64, |
12789 | OP_FlipMemberPtrIntAP, |
12790 | OP_FlipMemberPtrIntAPS, |
12791 | OP_FlipMemberPtrBool, |
12792 | OP_FlipMemberPtrFixedPoint, |
12793 | OP_FlipMemberPtrPtr, |
12794 | OP_FlipMemberPtrMemberPtr, |
12795 | OP_FlipMemberPtrFloat, |
12796 | OP_FlipFloatSint8, |
12797 | OP_FlipFloatUint8, |
12798 | OP_FlipFloatSint16, |
12799 | OP_FlipFloatUint16, |
12800 | OP_FlipFloatSint32, |
12801 | OP_FlipFloatUint32, |
12802 | OP_FlipFloatSint64, |
12803 | OP_FlipFloatUint64, |
12804 | OP_FlipFloatIntAP, |
12805 | OP_FlipFloatIntAPS, |
12806 | OP_FlipFloatBool, |
12807 | OP_FlipFloatFixedPoint, |
12808 | OP_FlipFloatPtr, |
12809 | OP_FlipFloatMemberPtr, |
12810 | OP_FlipFloatFloat, |
12811 | #endif |
12812 | #ifdef GET_INTERP |
12813 | case OP_FlipSint8Sint8: { |
12814 | if (!Flip<PT_Sint8, PT_Sint8>(S, OpPC)) |
12815 | return false; |
12816 | continue; |
12817 | } |
12818 | case OP_FlipSint8Uint8: { |
12819 | if (!Flip<PT_Sint8, PT_Uint8>(S, OpPC)) |
12820 | return false; |
12821 | continue; |
12822 | } |
12823 | case OP_FlipSint8Sint16: { |
12824 | if (!Flip<PT_Sint8, PT_Sint16>(S, OpPC)) |
12825 | return false; |
12826 | continue; |
12827 | } |
12828 | case OP_FlipSint8Uint16: { |
12829 | if (!Flip<PT_Sint8, PT_Uint16>(S, OpPC)) |
12830 | return false; |
12831 | continue; |
12832 | } |
12833 | case OP_FlipSint8Sint32: { |
12834 | if (!Flip<PT_Sint8, PT_Sint32>(S, OpPC)) |
12835 | return false; |
12836 | continue; |
12837 | } |
12838 | case OP_FlipSint8Uint32: { |
12839 | if (!Flip<PT_Sint8, PT_Uint32>(S, OpPC)) |
12840 | return false; |
12841 | continue; |
12842 | } |
12843 | case OP_FlipSint8Sint64: { |
12844 | if (!Flip<PT_Sint8, PT_Sint64>(S, OpPC)) |
12845 | return false; |
12846 | continue; |
12847 | } |
12848 | case OP_FlipSint8Uint64: { |
12849 | if (!Flip<PT_Sint8, PT_Uint64>(S, OpPC)) |
12850 | return false; |
12851 | continue; |
12852 | } |
12853 | case OP_FlipSint8IntAP: { |
12854 | if (!Flip<PT_Sint8, PT_IntAP>(S, OpPC)) |
12855 | return false; |
12856 | continue; |
12857 | } |
12858 | case OP_FlipSint8IntAPS: { |
12859 | if (!Flip<PT_Sint8, PT_IntAPS>(S, OpPC)) |
12860 | return false; |
12861 | continue; |
12862 | } |
12863 | case OP_FlipSint8Bool: { |
12864 | if (!Flip<PT_Sint8, PT_Bool>(S, OpPC)) |
12865 | return false; |
12866 | continue; |
12867 | } |
12868 | case OP_FlipSint8FixedPoint: { |
12869 | if (!Flip<PT_Sint8, PT_FixedPoint>(S, OpPC)) |
12870 | return false; |
12871 | continue; |
12872 | } |
12873 | case OP_FlipSint8Ptr: { |
12874 | if (!Flip<PT_Sint8, PT_Ptr>(S, OpPC)) |
12875 | return false; |
12876 | continue; |
12877 | } |
12878 | case OP_FlipSint8MemberPtr: { |
12879 | if (!Flip<PT_Sint8, PT_MemberPtr>(S, OpPC)) |
12880 | return false; |
12881 | continue; |
12882 | } |
12883 | case OP_FlipSint8Float: { |
12884 | if (!Flip<PT_Sint8, PT_Float>(S, OpPC)) |
12885 | return false; |
12886 | continue; |
12887 | } |
12888 | case OP_FlipUint8Sint8: { |
12889 | if (!Flip<PT_Uint8, PT_Sint8>(S, OpPC)) |
12890 | return false; |
12891 | continue; |
12892 | } |
12893 | case OP_FlipUint8Uint8: { |
12894 | if (!Flip<PT_Uint8, PT_Uint8>(S, OpPC)) |
12895 | return false; |
12896 | continue; |
12897 | } |
12898 | case OP_FlipUint8Sint16: { |
12899 | if (!Flip<PT_Uint8, PT_Sint16>(S, OpPC)) |
12900 | return false; |
12901 | continue; |
12902 | } |
12903 | case OP_FlipUint8Uint16: { |
12904 | if (!Flip<PT_Uint8, PT_Uint16>(S, OpPC)) |
12905 | return false; |
12906 | continue; |
12907 | } |
12908 | case OP_FlipUint8Sint32: { |
12909 | if (!Flip<PT_Uint8, PT_Sint32>(S, OpPC)) |
12910 | return false; |
12911 | continue; |
12912 | } |
12913 | case OP_FlipUint8Uint32: { |
12914 | if (!Flip<PT_Uint8, PT_Uint32>(S, OpPC)) |
12915 | return false; |
12916 | continue; |
12917 | } |
12918 | case OP_FlipUint8Sint64: { |
12919 | if (!Flip<PT_Uint8, PT_Sint64>(S, OpPC)) |
12920 | return false; |
12921 | continue; |
12922 | } |
12923 | case OP_FlipUint8Uint64: { |
12924 | if (!Flip<PT_Uint8, PT_Uint64>(S, OpPC)) |
12925 | return false; |
12926 | continue; |
12927 | } |
12928 | case OP_FlipUint8IntAP: { |
12929 | if (!Flip<PT_Uint8, PT_IntAP>(S, OpPC)) |
12930 | return false; |
12931 | continue; |
12932 | } |
12933 | case OP_FlipUint8IntAPS: { |
12934 | if (!Flip<PT_Uint8, PT_IntAPS>(S, OpPC)) |
12935 | return false; |
12936 | continue; |
12937 | } |
12938 | case OP_FlipUint8Bool: { |
12939 | if (!Flip<PT_Uint8, PT_Bool>(S, OpPC)) |
12940 | return false; |
12941 | continue; |
12942 | } |
12943 | case OP_FlipUint8FixedPoint: { |
12944 | if (!Flip<PT_Uint8, PT_FixedPoint>(S, OpPC)) |
12945 | return false; |
12946 | continue; |
12947 | } |
12948 | case OP_FlipUint8Ptr: { |
12949 | if (!Flip<PT_Uint8, PT_Ptr>(S, OpPC)) |
12950 | return false; |
12951 | continue; |
12952 | } |
12953 | case OP_FlipUint8MemberPtr: { |
12954 | if (!Flip<PT_Uint8, PT_MemberPtr>(S, OpPC)) |
12955 | return false; |
12956 | continue; |
12957 | } |
12958 | case OP_FlipUint8Float: { |
12959 | if (!Flip<PT_Uint8, PT_Float>(S, OpPC)) |
12960 | return false; |
12961 | continue; |
12962 | } |
12963 | case OP_FlipSint16Sint8: { |
12964 | if (!Flip<PT_Sint16, PT_Sint8>(S, OpPC)) |
12965 | return false; |
12966 | continue; |
12967 | } |
12968 | case OP_FlipSint16Uint8: { |
12969 | if (!Flip<PT_Sint16, PT_Uint8>(S, OpPC)) |
12970 | return false; |
12971 | continue; |
12972 | } |
12973 | case OP_FlipSint16Sint16: { |
12974 | if (!Flip<PT_Sint16, PT_Sint16>(S, OpPC)) |
12975 | return false; |
12976 | continue; |
12977 | } |
12978 | case OP_FlipSint16Uint16: { |
12979 | if (!Flip<PT_Sint16, PT_Uint16>(S, OpPC)) |
12980 | return false; |
12981 | continue; |
12982 | } |
12983 | case OP_FlipSint16Sint32: { |
12984 | if (!Flip<PT_Sint16, PT_Sint32>(S, OpPC)) |
12985 | return false; |
12986 | continue; |
12987 | } |
12988 | case OP_FlipSint16Uint32: { |
12989 | if (!Flip<PT_Sint16, PT_Uint32>(S, OpPC)) |
12990 | return false; |
12991 | continue; |
12992 | } |
12993 | case OP_FlipSint16Sint64: { |
12994 | if (!Flip<PT_Sint16, PT_Sint64>(S, OpPC)) |
12995 | return false; |
12996 | continue; |
12997 | } |
12998 | case OP_FlipSint16Uint64: { |
12999 | if (!Flip<PT_Sint16, PT_Uint64>(S, OpPC)) |
13000 | return false; |
13001 | continue; |
13002 | } |
13003 | case OP_FlipSint16IntAP: { |
13004 | if (!Flip<PT_Sint16, PT_IntAP>(S, OpPC)) |
13005 | return false; |
13006 | continue; |
13007 | } |
13008 | case OP_FlipSint16IntAPS: { |
13009 | if (!Flip<PT_Sint16, PT_IntAPS>(S, OpPC)) |
13010 | return false; |
13011 | continue; |
13012 | } |
13013 | case OP_FlipSint16Bool: { |
13014 | if (!Flip<PT_Sint16, PT_Bool>(S, OpPC)) |
13015 | return false; |
13016 | continue; |
13017 | } |
13018 | case OP_FlipSint16FixedPoint: { |
13019 | if (!Flip<PT_Sint16, PT_FixedPoint>(S, OpPC)) |
13020 | return false; |
13021 | continue; |
13022 | } |
13023 | case OP_FlipSint16Ptr: { |
13024 | if (!Flip<PT_Sint16, PT_Ptr>(S, OpPC)) |
13025 | return false; |
13026 | continue; |
13027 | } |
13028 | case OP_FlipSint16MemberPtr: { |
13029 | if (!Flip<PT_Sint16, PT_MemberPtr>(S, OpPC)) |
13030 | return false; |
13031 | continue; |
13032 | } |
13033 | case OP_FlipSint16Float: { |
13034 | if (!Flip<PT_Sint16, PT_Float>(S, OpPC)) |
13035 | return false; |
13036 | continue; |
13037 | } |
13038 | case OP_FlipUint16Sint8: { |
13039 | if (!Flip<PT_Uint16, PT_Sint8>(S, OpPC)) |
13040 | return false; |
13041 | continue; |
13042 | } |
13043 | case OP_FlipUint16Uint8: { |
13044 | if (!Flip<PT_Uint16, PT_Uint8>(S, OpPC)) |
13045 | return false; |
13046 | continue; |
13047 | } |
13048 | case OP_FlipUint16Sint16: { |
13049 | if (!Flip<PT_Uint16, PT_Sint16>(S, OpPC)) |
13050 | return false; |
13051 | continue; |
13052 | } |
13053 | case OP_FlipUint16Uint16: { |
13054 | if (!Flip<PT_Uint16, PT_Uint16>(S, OpPC)) |
13055 | return false; |
13056 | continue; |
13057 | } |
13058 | case OP_FlipUint16Sint32: { |
13059 | if (!Flip<PT_Uint16, PT_Sint32>(S, OpPC)) |
13060 | return false; |
13061 | continue; |
13062 | } |
13063 | case OP_FlipUint16Uint32: { |
13064 | if (!Flip<PT_Uint16, PT_Uint32>(S, OpPC)) |
13065 | return false; |
13066 | continue; |
13067 | } |
13068 | case OP_FlipUint16Sint64: { |
13069 | if (!Flip<PT_Uint16, PT_Sint64>(S, OpPC)) |
13070 | return false; |
13071 | continue; |
13072 | } |
13073 | case OP_FlipUint16Uint64: { |
13074 | if (!Flip<PT_Uint16, PT_Uint64>(S, OpPC)) |
13075 | return false; |
13076 | continue; |
13077 | } |
13078 | case OP_FlipUint16IntAP: { |
13079 | if (!Flip<PT_Uint16, PT_IntAP>(S, OpPC)) |
13080 | return false; |
13081 | continue; |
13082 | } |
13083 | case OP_FlipUint16IntAPS: { |
13084 | if (!Flip<PT_Uint16, PT_IntAPS>(S, OpPC)) |
13085 | return false; |
13086 | continue; |
13087 | } |
13088 | case OP_FlipUint16Bool: { |
13089 | if (!Flip<PT_Uint16, PT_Bool>(S, OpPC)) |
13090 | return false; |
13091 | continue; |
13092 | } |
13093 | case OP_FlipUint16FixedPoint: { |
13094 | if (!Flip<PT_Uint16, PT_FixedPoint>(S, OpPC)) |
13095 | return false; |
13096 | continue; |
13097 | } |
13098 | case OP_FlipUint16Ptr: { |
13099 | if (!Flip<PT_Uint16, PT_Ptr>(S, OpPC)) |
13100 | return false; |
13101 | continue; |
13102 | } |
13103 | case OP_FlipUint16MemberPtr: { |
13104 | if (!Flip<PT_Uint16, PT_MemberPtr>(S, OpPC)) |
13105 | return false; |
13106 | continue; |
13107 | } |
13108 | case OP_FlipUint16Float: { |
13109 | if (!Flip<PT_Uint16, PT_Float>(S, OpPC)) |
13110 | return false; |
13111 | continue; |
13112 | } |
13113 | case OP_FlipSint32Sint8: { |
13114 | if (!Flip<PT_Sint32, PT_Sint8>(S, OpPC)) |
13115 | return false; |
13116 | continue; |
13117 | } |
13118 | case OP_FlipSint32Uint8: { |
13119 | if (!Flip<PT_Sint32, PT_Uint8>(S, OpPC)) |
13120 | return false; |
13121 | continue; |
13122 | } |
13123 | case OP_FlipSint32Sint16: { |
13124 | if (!Flip<PT_Sint32, PT_Sint16>(S, OpPC)) |
13125 | return false; |
13126 | continue; |
13127 | } |
13128 | case OP_FlipSint32Uint16: { |
13129 | if (!Flip<PT_Sint32, PT_Uint16>(S, OpPC)) |
13130 | return false; |
13131 | continue; |
13132 | } |
13133 | case OP_FlipSint32Sint32: { |
13134 | if (!Flip<PT_Sint32, PT_Sint32>(S, OpPC)) |
13135 | return false; |
13136 | continue; |
13137 | } |
13138 | case OP_FlipSint32Uint32: { |
13139 | if (!Flip<PT_Sint32, PT_Uint32>(S, OpPC)) |
13140 | return false; |
13141 | continue; |
13142 | } |
13143 | case OP_FlipSint32Sint64: { |
13144 | if (!Flip<PT_Sint32, PT_Sint64>(S, OpPC)) |
13145 | return false; |
13146 | continue; |
13147 | } |
13148 | case OP_FlipSint32Uint64: { |
13149 | if (!Flip<PT_Sint32, PT_Uint64>(S, OpPC)) |
13150 | return false; |
13151 | continue; |
13152 | } |
13153 | case OP_FlipSint32IntAP: { |
13154 | if (!Flip<PT_Sint32, PT_IntAP>(S, OpPC)) |
13155 | return false; |
13156 | continue; |
13157 | } |
13158 | case OP_FlipSint32IntAPS: { |
13159 | if (!Flip<PT_Sint32, PT_IntAPS>(S, OpPC)) |
13160 | return false; |
13161 | continue; |
13162 | } |
13163 | case OP_FlipSint32Bool: { |
13164 | if (!Flip<PT_Sint32, PT_Bool>(S, OpPC)) |
13165 | return false; |
13166 | continue; |
13167 | } |
13168 | case OP_FlipSint32FixedPoint: { |
13169 | if (!Flip<PT_Sint32, PT_FixedPoint>(S, OpPC)) |
13170 | return false; |
13171 | continue; |
13172 | } |
13173 | case OP_FlipSint32Ptr: { |
13174 | if (!Flip<PT_Sint32, PT_Ptr>(S, OpPC)) |
13175 | return false; |
13176 | continue; |
13177 | } |
13178 | case OP_FlipSint32MemberPtr: { |
13179 | if (!Flip<PT_Sint32, PT_MemberPtr>(S, OpPC)) |
13180 | return false; |
13181 | continue; |
13182 | } |
13183 | case OP_FlipSint32Float: { |
13184 | if (!Flip<PT_Sint32, PT_Float>(S, OpPC)) |
13185 | return false; |
13186 | continue; |
13187 | } |
13188 | case OP_FlipUint32Sint8: { |
13189 | if (!Flip<PT_Uint32, PT_Sint8>(S, OpPC)) |
13190 | return false; |
13191 | continue; |
13192 | } |
13193 | case OP_FlipUint32Uint8: { |
13194 | if (!Flip<PT_Uint32, PT_Uint8>(S, OpPC)) |
13195 | return false; |
13196 | continue; |
13197 | } |
13198 | case OP_FlipUint32Sint16: { |
13199 | if (!Flip<PT_Uint32, PT_Sint16>(S, OpPC)) |
13200 | return false; |
13201 | continue; |
13202 | } |
13203 | case OP_FlipUint32Uint16: { |
13204 | if (!Flip<PT_Uint32, PT_Uint16>(S, OpPC)) |
13205 | return false; |
13206 | continue; |
13207 | } |
13208 | case OP_FlipUint32Sint32: { |
13209 | if (!Flip<PT_Uint32, PT_Sint32>(S, OpPC)) |
13210 | return false; |
13211 | continue; |
13212 | } |
13213 | case OP_FlipUint32Uint32: { |
13214 | if (!Flip<PT_Uint32, PT_Uint32>(S, OpPC)) |
13215 | return false; |
13216 | continue; |
13217 | } |
13218 | case OP_FlipUint32Sint64: { |
13219 | if (!Flip<PT_Uint32, PT_Sint64>(S, OpPC)) |
13220 | return false; |
13221 | continue; |
13222 | } |
13223 | case OP_FlipUint32Uint64: { |
13224 | if (!Flip<PT_Uint32, PT_Uint64>(S, OpPC)) |
13225 | return false; |
13226 | continue; |
13227 | } |
13228 | case OP_FlipUint32IntAP: { |
13229 | if (!Flip<PT_Uint32, PT_IntAP>(S, OpPC)) |
13230 | return false; |
13231 | continue; |
13232 | } |
13233 | case OP_FlipUint32IntAPS: { |
13234 | if (!Flip<PT_Uint32, PT_IntAPS>(S, OpPC)) |
13235 | return false; |
13236 | continue; |
13237 | } |
13238 | case OP_FlipUint32Bool: { |
13239 | if (!Flip<PT_Uint32, PT_Bool>(S, OpPC)) |
13240 | return false; |
13241 | continue; |
13242 | } |
13243 | case OP_FlipUint32FixedPoint: { |
13244 | if (!Flip<PT_Uint32, PT_FixedPoint>(S, OpPC)) |
13245 | return false; |
13246 | continue; |
13247 | } |
13248 | case OP_FlipUint32Ptr: { |
13249 | if (!Flip<PT_Uint32, PT_Ptr>(S, OpPC)) |
13250 | return false; |
13251 | continue; |
13252 | } |
13253 | case OP_FlipUint32MemberPtr: { |
13254 | if (!Flip<PT_Uint32, PT_MemberPtr>(S, OpPC)) |
13255 | return false; |
13256 | continue; |
13257 | } |
13258 | case OP_FlipUint32Float: { |
13259 | if (!Flip<PT_Uint32, PT_Float>(S, OpPC)) |
13260 | return false; |
13261 | continue; |
13262 | } |
13263 | case OP_FlipSint64Sint8: { |
13264 | if (!Flip<PT_Sint64, PT_Sint8>(S, OpPC)) |
13265 | return false; |
13266 | continue; |
13267 | } |
13268 | case OP_FlipSint64Uint8: { |
13269 | if (!Flip<PT_Sint64, PT_Uint8>(S, OpPC)) |
13270 | return false; |
13271 | continue; |
13272 | } |
13273 | case OP_FlipSint64Sint16: { |
13274 | if (!Flip<PT_Sint64, PT_Sint16>(S, OpPC)) |
13275 | return false; |
13276 | continue; |
13277 | } |
13278 | case OP_FlipSint64Uint16: { |
13279 | if (!Flip<PT_Sint64, PT_Uint16>(S, OpPC)) |
13280 | return false; |
13281 | continue; |
13282 | } |
13283 | case OP_FlipSint64Sint32: { |
13284 | if (!Flip<PT_Sint64, PT_Sint32>(S, OpPC)) |
13285 | return false; |
13286 | continue; |
13287 | } |
13288 | case OP_FlipSint64Uint32: { |
13289 | if (!Flip<PT_Sint64, PT_Uint32>(S, OpPC)) |
13290 | return false; |
13291 | continue; |
13292 | } |
13293 | case OP_FlipSint64Sint64: { |
13294 | if (!Flip<PT_Sint64, PT_Sint64>(S, OpPC)) |
13295 | return false; |
13296 | continue; |
13297 | } |
13298 | case OP_FlipSint64Uint64: { |
13299 | if (!Flip<PT_Sint64, PT_Uint64>(S, OpPC)) |
13300 | return false; |
13301 | continue; |
13302 | } |
13303 | case OP_FlipSint64IntAP: { |
13304 | if (!Flip<PT_Sint64, PT_IntAP>(S, OpPC)) |
13305 | return false; |
13306 | continue; |
13307 | } |
13308 | case OP_FlipSint64IntAPS: { |
13309 | if (!Flip<PT_Sint64, PT_IntAPS>(S, OpPC)) |
13310 | return false; |
13311 | continue; |
13312 | } |
13313 | case OP_FlipSint64Bool: { |
13314 | if (!Flip<PT_Sint64, PT_Bool>(S, OpPC)) |
13315 | return false; |
13316 | continue; |
13317 | } |
13318 | case OP_FlipSint64FixedPoint: { |
13319 | if (!Flip<PT_Sint64, PT_FixedPoint>(S, OpPC)) |
13320 | return false; |
13321 | continue; |
13322 | } |
13323 | case OP_FlipSint64Ptr: { |
13324 | if (!Flip<PT_Sint64, PT_Ptr>(S, OpPC)) |
13325 | return false; |
13326 | continue; |
13327 | } |
13328 | case OP_FlipSint64MemberPtr: { |
13329 | if (!Flip<PT_Sint64, PT_MemberPtr>(S, OpPC)) |
13330 | return false; |
13331 | continue; |
13332 | } |
13333 | case OP_FlipSint64Float: { |
13334 | if (!Flip<PT_Sint64, PT_Float>(S, OpPC)) |
13335 | return false; |
13336 | continue; |
13337 | } |
13338 | case OP_FlipUint64Sint8: { |
13339 | if (!Flip<PT_Uint64, PT_Sint8>(S, OpPC)) |
13340 | return false; |
13341 | continue; |
13342 | } |
13343 | case OP_FlipUint64Uint8: { |
13344 | if (!Flip<PT_Uint64, PT_Uint8>(S, OpPC)) |
13345 | return false; |
13346 | continue; |
13347 | } |
13348 | case OP_FlipUint64Sint16: { |
13349 | if (!Flip<PT_Uint64, PT_Sint16>(S, OpPC)) |
13350 | return false; |
13351 | continue; |
13352 | } |
13353 | case OP_FlipUint64Uint16: { |
13354 | if (!Flip<PT_Uint64, PT_Uint16>(S, OpPC)) |
13355 | return false; |
13356 | continue; |
13357 | } |
13358 | case OP_FlipUint64Sint32: { |
13359 | if (!Flip<PT_Uint64, PT_Sint32>(S, OpPC)) |
13360 | return false; |
13361 | continue; |
13362 | } |
13363 | case OP_FlipUint64Uint32: { |
13364 | if (!Flip<PT_Uint64, PT_Uint32>(S, OpPC)) |
13365 | return false; |
13366 | continue; |
13367 | } |
13368 | case OP_FlipUint64Sint64: { |
13369 | if (!Flip<PT_Uint64, PT_Sint64>(S, OpPC)) |
13370 | return false; |
13371 | continue; |
13372 | } |
13373 | case OP_FlipUint64Uint64: { |
13374 | if (!Flip<PT_Uint64, PT_Uint64>(S, OpPC)) |
13375 | return false; |
13376 | continue; |
13377 | } |
13378 | case OP_FlipUint64IntAP: { |
13379 | if (!Flip<PT_Uint64, PT_IntAP>(S, OpPC)) |
13380 | return false; |
13381 | continue; |
13382 | } |
13383 | case OP_FlipUint64IntAPS: { |
13384 | if (!Flip<PT_Uint64, PT_IntAPS>(S, OpPC)) |
13385 | return false; |
13386 | continue; |
13387 | } |
13388 | case OP_FlipUint64Bool: { |
13389 | if (!Flip<PT_Uint64, PT_Bool>(S, OpPC)) |
13390 | return false; |
13391 | continue; |
13392 | } |
13393 | case OP_FlipUint64FixedPoint: { |
13394 | if (!Flip<PT_Uint64, PT_FixedPoint>(S, OpPC)) |
13395 | return false; |
13396 | continue; |
13397 | } |
13398 | case OP_FlipUint64Ptr: { |
13399 | if (!Flip<PT_Uint64, PT_Ptr>(S, OpPC)) |
13400 | return false; |
13401 | continue; |
13402 | } |
13403 | case OP_FlipUint64MemberPtr: { |
13404 | if (!Flip<PT_Uint64, PT_MemberPtr>(S, OpPC)) |
13405 | return false; |
13406 | continue; |
13407 | } |
13408 | case OP_FlipUint64Float: { |
13409 | if (!Flip<PT_Uint64, PT_Float>(S, OpPC)) |
13410 | return false; |
13411 | continue; |
13412 | } |
13413 | case OP_FlipIntAPSint8: { |
13414 | if (!Flip<PT_IntAP, PT_Sint8>(S, OpPC)) |
13415 | return false; |
13416 | continue; |
13417 | } |
13418 | case OP_FlipIntAPUint8: { |
13419 | if (!Flip<PT_IntAP, PT_Uint8>(S, OpPC)) |
13420 | return false; |
13421 | continue; |
13422 | } |
13423 | case OP_FlipIntAPSint16: { |
13424 | if (!Flip<PT_IntAP, PT_Sint16>(S, OpPC)) |
13425 | return false; |
13426 | continue; |
13427 | } |
13428 | case OP_FlipIntAPUint16: { |
13429 | if (!Flip<PT_IntAP, PT_Uint16>(S, OpPC)) |
13430 | return false; |
13431 | continue; |
13432 | } |
13433 | case OP_FlipIntAPSint32: { |
13434 | if (!Flip<PT_IntAP, PT_Sint32>(S, OpPC)) |
13435 | return false; |
13436 | continue; |
13437 | } |
13438 | case OP_FlipIntAPUint32: { |
13439 | if (!Flip<PT_IntAP, PT_Uint32>(S, OpPC)) |
13440 | return false; |
13441 | continue; |
13442 | } |
13443 | case OP_FlipIntAPSint64: { |
13444 | if (!Flip<PT_IntAP, PT_Sint64>(S, OpPC)) |
13445 | return false; |
13446 | continue; |
13447 | } |
13448 | case OP_FlipIntAPUint64: { |
13449 | if (!Flip<PT_IntAP, PT_Uint64>(S, OpPC)) |
13450 | return false; |
13451 | continue; |
13452 | } |
13453 | case OP_FlipIntAPIntAP: { |
13454 | if (!Flip<PT_IntAP, PT_IntAP>(S, OpPC)) |
13455 | return false; |
13456 | continue; |
13457 | } |
13458 | case OP_FlipIntAPIntAPS: { |
13459 | if (!Flip<PT_IntAP, PT_IntAPS>(S, OpPC)) |
13460 | return false; |
13461 | continue; |
13462 | } |
13463 | case OP_FlipIntAPBool: { |
13464 | if (!Flip<PT_IntAP, PT_Bool>(S, OpPC)) |
13465 | return false; |
13466 | continue; |
13467 | } |
13468 | case OP_FlipIntAPFixedPoint: { |
13469 | if (!Flip<PT_IntAP, PT_FixedPoint>(S, OpPC)) |
13470 | return false; |
13471 | continue; |
13472 | } |
13473 | case OP_FlipIntAPPtr: { |
13474 | if (!Flip<PT_IntAP, PT_Ptr>(S, OpPC)) |
13475 | return false; |
13476 | continue; |
13477 | } |
13478 | case OP_FlipIntAPMemberPtr: { |
13479 | if (!Flip<PT_IntAP, PT_MemberPtr>(S, OpPC)) |
13480 | return false; |
13481 | continue; |
13482 | } |
13483 | case OP_FlipIntAPFloat: { |
13484 | if (!Flip<PT_IntAP, PT_Float>(S, OpPC)) |
13485 | return false; |
13486 | continue; |
13487 | } |
13488 | case OP_FlipIntAPSSint8: { |
13489 | if (!Flip<PT_IntAPS, PT_Sint8>(S, OpPC)) |
13490 | return false; |
13491 | continue; |
13492 | } |
13493 | case OP_FlipIntAPSUint8: { |
13494 | if (!Flip<PT_IntAPS, PT_Uint8>(S, OpPC)) |
13495 | return false; |
13496 | continue; |
13497 | } |
13498 | case OP_FlipIntAPSSint16: { |
13499 | if (!Flip<PT_IntAPS, PT_Sint16>(S, OpPC)) |
13500 | return false; |
13501 | continue; |
13502 | } |
13503 | case OP_FlipIntAPSUint16: { |
13504 | if (!Flip<PT_IntAPS, PT_Uint16>(S, OpPC)) |
13505 | return false; |
13506 | continue; |
13507 | } |
13508 | case OP_FlipIntAPSSint32: { |
13509 | if (!Flip<PT_IntAPS, PT_Sint32>(S, OpPC)) |
13510 | return false; |
13511 | continue; |
13512 | } |
13513 | case OP_FlipIntAPSUint32: { |
13514 | if (!Flip<PT_IntAPS, PT_Uint32>(S, OpPC)) |
13515 | return false; |
13516 | continue; |
13517 | } |
13518 | case OP_FlipIntAPSSint64: { |
13519 | if (!Flip<PT_IntAPS, PT_Sint64>(S, OpPC)) |
13520 | return false; |
13521 | continue; |
13522 | } |
13523 | case OP_FlipIntAPSUint64: { |
13524 | if (!Flip<PT_IntAPS, PT_Uint64>(S, OpPC)) |
13525 | return false; |
13526 | continue; |
13527 | } |
13528 | case OP_FlipIntAPSIntAP: { |
13529 | if (!Flip<PT_IntAPS, PT_IntAP>(S, OpPC)) |
13530 | return false; |
13531 | continue; |
13532 | } |
13533 | case OP_FlipIntAPSIntAPS: { |
13534 | if (!Flip<PT_IntAPS, PT_IntAPS>(S, OpPC)) |
13535 | return false; |
13536 | continue; |
13537 | } |
13538 | case OP_FlipIntAPSBool: { |
13539 | if (!Flip<PT_IntAPS, PT_Bool>(S, OpPC)) |
13540 | return false; |
13541 | continue; |
13542 | } |
13543 | case OP_FlipIntAPSFixedPoint: { |
13544 | if (!Flip<PT_IntAPS, PT_FixedPoint>(S, OpPC)) |
13545 | return false; |
13546 | continue; |
13547 | } |
13548 | case OP_FlipIntAPSPtr: { |
13549 | if (!Flip<PT_IntAPS, PT_Ptr>(S, OpPC)) |
13550 | return false; |
13551 | continue; |
13552 | } |
13553 | case OP_FlipIntAPSMemberPtr: { |
13554 | if (!Flip<PT_IntAPS, PT_MemberPtr>(S, OpPC)) |
13555 | return false; |
13556 | continue; |
13557 | } |
13558 | case OP_FlipIntAPSFloat: { |
13559 | if (!Flip<PT_IntAPS, PT_Float>(S, OpPC)) |
13560 | return false; |
13561 | continue; |
13562 | } |
13563 | case OP_FlipBoolSint8: { |
13564 | if (!Flip<PT_Bool, PT_Sint8>(S, OpPC)) |
13565 | return false; |
13566 | continue; |
13567 | } |
13568 | case OP_FlipBoolUint8: { |
13569 | if (!Flip<PT_Bool, PT_Uint8>(S, OpPC)) |
13570 | return false; |
13571 | continue; |
13572 | } |
13573 | case OP_FlipBoolSint16: { |
13574 | if (!Flip<PT_Bool, PT_Sint16>(S, OpPC)) |
13575 | return false; |
13576 | continue; |
13577 | } |
13578 | case OP_FlipBoolUint16: { |
13579 | if (!Flip<PT_Bool, PT_Uint16>(S, OpPC)) |
13580 | return false; |
13581 | continue; |
13582 | } |
13583 | case OP_FlipBoolSint32: { |
13584 | if (!Flip<PT_Bool, PT_Sint32>(S, OpPC)) |
13585 | return false; |
13586 | continue; |
13587 | } |
13588 | case OP_FlipBoolUint32: { |
13589 | if (!Flip<PT_Bool, PT_Uint32>(S, OpPC)) |
13590 | return false; |
13591 | continue; |
13592 | } |
13593 | case OP_FlipBoolSint64: { |
13594 | if (!Flip<PT_Bool, PT_Sint64>(S, OpPC)) |
13595 | return false; |
13596 | continue; |
13597 | } |
13598 | case OP_FlipBoolUint64: { |
13599 | if (!Flip<PT_Bool, PT_Uint64>(S, OpPC)) |
13600 | return false; |
13601 | continue; |
13602 | } |
13603 | case OP_FlipBoolIntAP: { |
13604 | if (!Flip<PT_Bool, PT_IntAP>(S, OpPC)) |
13605 | return false; |
13606 | continue; |
13607 | } |
13608 | case OP_FlipBoolIntAPS: { |
13609 | if (!Flip<PT_Bool, PT_IntAPS>(S, OpPC)) |
13610 | return false; |
13611 | continue; |
13612 | } |
13613 | case OP_FlipBoolBool: { |
13614 | if (!Flip<PT_Bool, PT_Bool>(S, OpPC)) |
13615 | return false; |
13616 | continue; |
13617 | } |
13618 | case OP_FlipBoolFixedPoint: { |
13619 | if (!Flip<PT_Bool, PT_FixedPoint>(S, OpPC)) |
13620 | return false; |
13621 | continue; |
13622 | } |
13623 | case OP_FlipBoolPtr: { |
13624 | if (!Flip<PT_Bool, PT_Ptr>(S, OpPC)) |
13625 | return false; |
13626 | continue; |
13627 | } |
13628 | case OP_FlipBoolMemberPtr: { |
13629 | if (!Flip<PT_Bool, PT_MemberPtr>(S, OpPC)) |
13630 | return false; |
13631 | continue; |
13632 | } |
13633 | case OP_FlipBoolFloat: { |
13634 | if (!Flip<PT_Bool, PT_Float>(S, OpPC)) |
13635 | return false; |
13636 | continue; |
13637 | } |
13638 | case OP_FlipFixedPointSint8: { |
13639 | if (!Flip<PT_FixedPoint, PT_Sint8>(S, OpPC)) |
13640 | return false; |
13641 | continue; |
13642 | } |
13643 | case OP_FlipFixedPointUint8: { |
13644 | if (!Flip<PT_FixedPoint, PT_Uint8>(S, OpPC)) |
13645 | return false; |
13646 | continue; |
13647 | } |
13648 | case OP_FlipFixedPointSint16: { |
13649 | if (!Flip<PT_FixedPoint, PT_Sint16>(S, OpPC)) |
13650 | return false; |
13651 | continue; |
13652 | } |
13653 | case OP_FlipFixedPointUint16: { |
13654 | if (!Flip<PT_FixedPoint, PT_Uint16>(S, OpPC)) |
13655 | return false; |
13656 | continue; |
13657 | } |
13658 | case OP_FlipFixedPointSint32: { |
13659 | if (!Flip<PT_FixedPoint, PT_Sint32>(S, OpPC)) |
13660 | return false; |
13661 | continue; |
13662 | } |
13663 | case OP_FlipFixedPointUint32: { |
13664 | if (!Flip<PT_FixedPoint, PT_Uint32>(S, OpPC)) |
13665 | return false; |
13666 | continue; |
13667 | } |
13668 | case OP_FlipFixedPointSint64: { |
13669 | if (!Flip<PT_FixedPoint, PT_Sint64>(S, OpPC)) |
13670 | return false; |
13671 | continue; |
13672 | } |
13673 | case OP_FlipFixedPointUint64: { |
13674 | if (!Flip<PT_FixedPoint, PT_Uint64>(S, OpPC)) |
13675 | return false; |
13676 | continue; |
13677 | } |
13678 | case OP_FlipFixedPointIntAP: { |
13679 | if (!Flip<PT_FixedPoint, PT_IntAP>(S, OpPC)) |
13680 | return false; |
13681 | continue; |
13682 | } |
13683 | case OP_FlipFixedPointIntAPS: { |
13684 | if (!Flip<PT_FixedPoint, PT_IntAPS>(S, OpPC)) |
13685 | return false; |
13686 | continue; |
13687 | } |
13688 | case OP_FlipFixedPointBool: { |
13689 | if (!Flip<PT_FixedPoint, PT_Bool>(S, OpPC)) |
13690 | return false; |
13691 | continue; |
13692 | } |
13693 | case OP_FlipFixedPointFixedPoint: { |
13694 | if (!Flip<PT_FixedPoint, PT_FixedPoint>(S, OpPC)) |
13695 | return false; |
13696 | continue; |
13697 | } |
13698 | case OP_FlipFixedPointPtr: { |
13699 | if (!Flip<PT_FixedPoint, PT_Ptr>(S, OpPC)) |
13700 | return false; |
13701 | continue; |
13702 | } |
13703 | case OP_FlipFixedPointMemberPtr: { |
13704 | if (!Flip<PT_FixedPoint, PT_MemberPtr>(S, OpPC)) |
13705 | return false; |
13706 | continue; |
13707 | } |
13708 | case OP_FlipFixedPointFloat: { |
13709 | if (!Flip<PT_FixedPoint, PT_Float>(S, OpPC)) |
13710 | return false; |
13711 | continue; |
13712 | } |
13713 | case OP_FlipPtrSint8: { |
13714 | if (!Flip<PT_Ptr, PT_Sint8>(S, OpPC)) |
13715 | return false; |
13716 | continue; |
13717 | } |
13718 | case OP_FlipPtrUint8: { |
13719 | if (!Flip<PT_Ptr, PT_Uint8>(S, OpPC)) |
13720 | return false; |
13721 | continue; |
13722 | } |
13723 | case OP_FlipPtrSint16: { |
13724 | if (!Flip<PT_Ptr, PT_Sint16>(S, OpPC)) |
13725 | return false; |
13726 | continue; |
13727 | } |
13728 | case OP_FlipPtrUint16: { |
13729 | if (!Flip<PT_Ptr, PT_Uint16>(S, OpPC)) |
13730 | return false; |
13731 | continue; |
13732 | } |
13733 | case OP_FlipPtrSint32: { |
13734 | if (!Flip<PT_Ptr, PT_Sint32>(S, OpPC)) |
13735 | return false; |
13736 | continue; |
13737 | } |
13738 | case OP_FlipPtrUint32: { |
13739 | if (!Flip<PT_Ptr, PT_Uint32>(S, OpPC)) |
13740 | return false; |
13741 | continue; |
13742 | } |
13743 | case OP_FlipPtrSint64: { |
13744 | if (!Flip<PT_Ptr, PT_Sint64>(S, OpPC)) |
13745 | return false; |
13746 | continue; |
13747 | } |
13748 | case OP_FlipPtrUint64: { |
13749 | if (!Flip<PT_Ptr, PT_Uint64>(S, OpPC)) |
13750 | return false; |
13751 | continue; |
13752 | } |
13753 | case OP_FlipPtrIntAP: { |
13754 | if (!Flip<PT_Ptr, PT_IntAP>(S, OpPC)) |
13755 | return false; |
13756 | continue; |
13757 | } |
13758 | case OP_FlipPtrIntAPS: { |
13759 | if (!Flip<PT_Ptr, PT_IntAPS>(S, OpPC)) |
13760 | return false; |
13761 | continue; |
13762 | } |
13763 | case OP_FlipPtrBool: { |
13764 | if (!Flip<PT_Ptr, PT_Bool>(S, OpPC)) |
13765 | return false; |
13766 | continue; |
13767 | } |
13768 | case OP_FlipPtrFixedPoint: { |
13769 | if (!Flip<PT_Ptr, PT_FixedPoint>(S, OpPC)) |
13770 | return false; |
13771 | continue; |
13772 | } |
13773 | case OP_FlipPtrPtr: { |
13774 | if (!Flip<PT_Ptr, PT_Ptr>(S, OpPC)) |
13775 | return false; |
13776 | continue; |
13777 | } |
13778 | case OP_FlipPtrMemberPtr: { |
13779 | if (!Flip<PT_Ptr, PT_MemberPtr>(S, OpPC)) |
13780 | return false; |
13781 | continue; |
13782 | } |
13783 | case OP_FlipPtrFloat: { |
13784 | if (!Flip<PT_Ptr, PT_Float>(S, OpPC)) |
13785 | return false; |
13786 | continue; |
13787 | } |
13788 | case OP_FlipMemberPtrSint8: { |
13789 | if (!Flip<PT_MemberPtr, PT_Sint8>(S, OpPC)) |
13790 | return false; |
13791 | continue; |
13792 | } |
13793 | case OP_FlipMemberPtrUint8: { |
13794 | if (!Flip<PT_MemberPtr, PT_Uint8>(S, OpPC)) |
13795 | return false; |
13796 | continue; |
13797 | } |
13798 | case OP_FlipMemberPtrSint16: { |
13799 | if (!Flip<PT_MemberPtr, PT_Sint16>(S, OpPC)) |
13800 | return false; |
13801 | continue; |
13802 | } |
13803 | case OP_FlipMemberPtrUint16: { |
13804 | if (!Flip<PT_MemberPtr, PT_Uint16>(S, OpPC)) |
13805 | return false; |
13806 | continue; |
13807 | } |
13808 | case OP_FlipMemberPtrSint32: { |
13809 | if (!Flip<PT_MemberPtr, PT_Sint32>(S, OpPC)) |
13810 | return false; |
13811 | continue; |
13812 | } |
13813 | case OP_FlipMemberPtrUint32: { |
13814 | if (!Flip<PT_MemberPtr, PT_Uint32>(S, OpPC)) |
13815 | return false; |
13816 | continue; |
13817 | } |
13818 | case OP_FlipMemberPtrSint64: { |
13819 | if (!Flip<PT_MemberPtr, PT_Sint64>(S, OpPC)) |
13820 | return false; |
13821 | continue; |
13822 | } |
13823 | case OP_FlipMemberPtrUint64: { |
13824 | if (!Flip<PT_MemberPtr, PT_Uint64>(S, OpPC)) |
13825 | return false; |
13826 | continue; |
13827 | } |
13828 | case OP_FlipMemberPtrIntAP: { |
13829 | if (!Flip<PT_MemberPtr, PT_IntAP>(S, OpPC)) |
13830 | return false; |
13831 | continue; |
13832 | } |
13833 | case OP_FlipMemberPtrIntAPS: { |
13834 | if (!Flip<PT_MemberPtr, PT_IntAPS>(S, OpPC)) |
13835 | return false; |
13836 | continue; |
13837 | } |
13838 | case OP_FlipMemberPtrBool: { |
13839 | if (!Flip<PT_MemberPtr, PT_Bool>(S, OpPC)) |
13840 | return false; |
13841 | continue; |
13842 | } |
13843 | case OP_FlipMemberPtrFixedPoint: { |
13844 | if (!Flip<PT_MemberPtr, PT_FixedPoint>(S, OpPC)) |
13845 | return false; |
13846 | continue; |
13847 | } |
13848 | case OP_FlipMemberPtrPtr: { |
13849 | if (!Flip<PT_MemberPtr, PT_Ptr>(S, OpPC)) |
13850 | return false; |
13851 | continue; |
13852 | } |
13853 | case OP_FlipMemberPtrMemberPtr: { |
13854 | if (!Flip<PT_MemberPtr, PT_MemberPtr>(S, OpPC)) |
13855 | return false; |
13856 | continue; |
13857 | } |
13858 | case OP_FlipMemberPtrFloat: { |
13859 | if (!Flip<PT_MemberPtr, PT_Float>(S, OpPC)) |
13860 | return false; |
13861 | continue; |
13862 | } |
13863 | case OP_FlipFloatSint8: { |
13864 | if (!Flip<PT_Float, PT_Sint8>(S, OpPC)) |
13865 | return false; |
13866 | continue; |
13867 | } |
13868 | case OP_FlipFloatUint8: { |
13869 | if (!Flip<PT_Float, PT_Uint8>(S, OpPC)) |
13870 | return false; |
13871 | continue; |
13872 | } |
13873 | case OP_FlipFloatSint16: { |
13874 | if (!Flip<PT_Float, PT_Sint16>(S, OpPC)) |
13875 | return false; |
13876 | continue; |
13877 | } |
13878 | case OP_FlipFloatUint16: { |
13879 | if (!Flip<PT_Float, PT_Uint16>(S, OpPC)) |
13880 | return false; |
13881 | continue; |
13882 | } |
13883 | case OP_FlipFloatSint32: { |
13884 | if (!Flip<PT_Float, PT_Sint32>(S, OpPC)) |
13885 | return false; |
13886 | continue; |
13887 | } |
13888 | case OP_FlipFloatUint32: { |
13889 | if (!Flip<PT_Float, PT_Uint32>(S, OpPC)) |
13890 | return false; |
13891 | continue; |
13892 | } |
13893 | case OP_FlipFloatSint64: { |
13894 | if (!Flip<PT_Float, PT_Sint64>(S, OpPC)) |
13895 | return false; |
13896 | continue; |
13897 | } |
13898 | case OP_FlipFloatUint64: { |
13899 | if (!Flip<PT_Float, PT_Uint64>(S, OpPC)) |
13900 | return false; |
13901 | continue; |
13902 | } |
13903 | case OP_FlipFloatIntAP: { |
13904 | if (!Flip<PT_Float, PT_IntAP>(S, OpPC)) |
13905 | return false; |
13906 | continue; |
13907 | } |
13908 | case OP_FlipFloatIntAPS: { |
13909 | if (!Flip<PT_Float, PT_IntAPS>(S, OpPC)) |
13910 | return false; |
13911 | continue; |
13912 | } |
13913 | case OP_FlipFloatBool: { |
13914 | if (!Flip<PT_Float, PT_Bool>(S, OpPC)) |
13915 | return false; |
13916 | continue; |
13917 | } |
13918 | case OP_FlipFloatFixedPoint: { |
13919 | if (!Flip<PT_Float, PT_FixedPoint>(S, OpPC)) |
13920 | return false; |
13921 | continue; |
13922 | } |
13923 | case OP_FlipFloatPtr: { |
13924 | if (!Flip<PT_Float, PT_Ptr>(S, OpPC)) |
13925 | return false; |
13926 | continue; |
13927 | } |
13928 | case OP_FlipFloatMemberPtr: { |
13929 | if (!Flip<PT_Float, PT_MemberPtr>(S, OpPC)) |
13930 | return false; |
13931 | continue; |
13932 | } |
13933 | case OP_FlipFloatFloat: { |
13934 | if (!Flip<PT_Float, PT_Float>(S, OpPC)) |
13935 | return false; |
13936 | continue; |
13937 | } |
13938 | #endif |
13939 | #ifdef GET_DISASM |
13940 | case OP_FlipSint8Sint8: |
13941 | Text.Op = PrintName("FlipSint8Sint8" ); |
13942 | break; |
13943 | case OP_FlipSint8Uint8: |
13944 | Text.Op = PrintName("FlipSint8Uint8" ); |
13945 | break; |
13946 | case OP_FlipSint8Sint16: |
13947 | Text.Op = PrintName("FlipSint8Sint16" ); |
13948 | break; |
13949 | case OP_FlipSint8Uint16: |
13950 | Text.Op = PrintName("FlipSint8Uint16" ); |
13951 | break; |
13952 | case OP_FlipSint8Sint32: |
13953 | Text.Op = PrintName("FlipSint8Sint32" ); |
13954 | break; |
13955 | case OP_FlipSint8Uint32: |
13956 | Text.Op = PrintName("FlipSint8Uint32" ); |
13957 | break; |
13958 | case OP_FlipSint8Sint64: |
13959 | Text.Op = PrintName("FlipSint8Sint64" ); |
13960 | break; |
13961 | case OP_FlipSint8Uint64: |
13962 | Text.Op = PrintName("FlipSint8Uint64" ); |
13963 | break; |
13964 | case OP_FlipSint8IntAP: |
13965 | Text.Op = PrintName("FlipSint8IntAP" ); |
13966 | break; |
13967 | case OP_FlipSint8IntAPS: |
13968 | Text.Op = PrintName("FlipSint8IntAPS" ); |
13969 | break; |
13970 | case OP_FlipSint8Bool: |
13971 | Text.Op = PrintName("FlipSint8Bool" ); |
13972 | break; |
13973 | case OP_FlipSint8FixedPoint: |
13974 | Text.Op = PrintName("FlipSint8FixedPoint" ); |
13975 | break; |
13976 | case OP_FlipSint8Ptr: |
13977 | Text.Op = PrintName("FlipSint8Ptr" ); |
13978 | break; |
13979 | case OP_FlipSint8MemberPtr: |
13980 | Text.Op = PrintName("FlipSint8MemberPtr" ); |
13981 | break; |
13982 | case OP_FlipSint8Float: |
13983 | Text.Op = PrintName("FlipSint8Float" ); |
13984 | break; |
13985 | case OP_FlipUint8Sint8: |
13986 | Text.Op = PrintName("FlipUint8Sint8" ); |
13987 | break; |
13988 | case OP_FlipUint8Uint8: |
13989 | Text.Op = PrintName("FlipUint8Uint8" ); |
13990 | break; |
13991 | case OP_FlipUint8Sint16: |
13992 | Text.Op = PrintName("FlipUint8Sint16" ); |
13993 | break; |
13994 | case OP_FlipUint8Uint16: |
13995 | Text.Op = PrintName("FlipUint8Uint16" ); |
13996 | break; |
13997 | case OP_FlipUint8Sint32: |
13998 | Text.Op = PrintName("FlipUint8Sint32" ); |
13999 | break; |
14000 | case OP_FlipUint8Uint32: |
14001 | Text.Op = PrintName("FlipUint8Uint32" ); |
14002 | break; |
14003 | case OP_FlipUint8Sint64: |
14004 | Text.Op = PrintName("FlipUint8Sint64" ); |
14005 | break; |
14006 | case OP_FlipUint8Uint64: |
14007 | Text.Op = PrintName("FlipUint8Uint64" ); |
14008 | break; |
14009 | case OP_FlipUint8IntAP: |
14010 | Text.Op = PrintName("FlipUint8IntAP" ); |
14011 | break; |
14012 | case OP_FlipUint8IntAPS: |
14013 | Text.Op = PrintName("FlipUint8IntAPS" ); |
14014 | break; |
14015 | case OP_FlipUint8Bool: |
14016 | Text.Op = PrintName("FlipUint8Bool" ); |
14017 | break; |
14018 | case OP_FlipUint8FixedPoint: |
14019 | Text.Op = PrintName("FlipUint8FixedPoint" ); |
14020 | break; |
14021 | case OP_FlipUint8Ptr: |
14022 | Text.Op = PrintName("FlipUint8Ptr" ); |
14023 | break; |
14024 | case OP_FlipUint8MemberPtr: |
14025 | Text.Op = PrintName("FlipUint8MemberPtr" ); |
14026 | break; |
14027 | case OP_FlipUint8Float: |
14028 | Text.Op = PrintName("FlipUint8Float" ); |
14029 | break; |
14030 | case OP_FlipSint16Sint8: |
14031 | Text.Op = PrintName("FlipSint16Sint8" ); |
14032 | break; |
14033 | case OP_FlipSint16Uint8: |
14034 | Text.Op = PrintName("FlipSint16Uint8" ); |
14035 | break; |
14036 | case OP_FlipSint16Sint16: |
14037 | Text.Op = PrintName("FlipSint16Sint16" ); |
14038 | break; |
14039 | case OP_FlipSint16Uint16: |
14040 | Text.Op = PrintName("FlipSint16Uint16" ); |
14041 | break; |
14042 | case OP_FlipSint16Sint32: |
14043 | Text.Op = PrintName("FlipSint16Sint32" ); |
14044 | break; |
14045 | case OP_FlipSint16Uint32: |
14046 | Text.Op = PrintName("FlipSint16Uint32" ); |
14047 | break; |
14048 | case OP_FlipSint16Sint64: |
14049 | Text.Op = PrintName("FlipSint16Sint64" ); |
14050 | break; |
14051 | case OP_FlipSint16Uint64: |
14052 | Text.Op = PrintName("FlipSint16Uint64" ); |
14053 | break; |
14054 | case OP_FlipSint16IntAP: |
14055 | Text.Op = PrintName("FlipSint16IntAP" ); |
14056 | break; |
14057 | case OP_FlipSint16IntAPS: |
14058 | Text.Op = PrintName("FlipSint16IntAPS" ); |
14059 | break; |
14060 | case OP_FlipSint16Bool: |
14061 | Text.Op = PrintName("FlipSint16Bool" ); |
14062 | break; |
14063 | case OP_FlipSint16FixedPoint: |
14064 | Text.Op = PrintName("FlipSint16FixedPoint" ); |
14065 | break; |
14066 | case OP_FlipSint16Ptr: |
14067 | Text.Op = PrintName("FlipSint16Ptr" ); |
14068 | break; |
14069 | case OP_FlipSint16MemberPtr: |
14070 | Text.Op = PrintName("FlipSint16MemberPtr" ); |
14071 | break; |
14072 | case OP_FlipSint16Float: |
14073 | Text.Op = PrintName("FlipSint16Float" ); |
14074 | break; |
14075 | case OP_FlipUint16Sint8: |
14076 | Text.Op = PrintName("FlipUint16Sint8" ); |
14077 | break; |
14078 | case OP_FlipUint16Uint8: |
14079 | Text.Op = PrintName("FlipUint16Uint8" ); |
14080 | break; |
14081 | case OP_FlipUint16Sint16: |
14082 | Text.Op = PrintName("FlipUint16Sint16" ); |
14083 | break; |
14084 | case OP_FlipUint16Uint16: |
14085 | Text.Op = PrintName("FlipUint16Uint16" ); |
14086 | break; |
14087 | case OP_FlipUint16Sint32: |
14088 | Text.Op = PrintName("FlipUint16Sint32" ); |
14089 | break; |
14090 | case OP_FlipUint16Uint32: |
14091 | Text.Op = PrintName("FlipUint16Uint32" ); |
14092 | break; |
14093 | case OP_FlipUint16Sint64: |
14094 | Text.Op = PrintName("FlipUint16Sint64" ); |
14095 | break; |
14096 | case OP_FlipUint16Uint64: |
14097 | Text.Op = PrintName("FlipUint16Uint64" ); |
14098 | break; |
14099 | case OP_FlipUint16IntAP: |
14100 | Text.Op = PrintName("FlipUint16IntAP" ); |
14101 | break; |
14102 | case OP_FlipUint16IntAPS: |
14103 | Text.Op = PrintName("FlipUint16IntAPS" ); |
14104 | break; |
14105 | case OP_FlipUint16Bool: |
14106 | Text.Op = PrintName("FlipUint16Bool" ); |
14107 | break; |
14108 | case OP_FlipUint16FixedPoint: |
14109 | Text.Op = PrintName("FlipUint16FixedPoint" ); |
14110 | break; |
14111 | case OP_FlipUint16Ptr: |
14112 | Text.Op = PrintName("FlipUint16Ptr" ); |
14113 | break; |
14114 | case OP_FlipUint16MemberPtr: |
14115 | Text.Op = PrintName("FlipUint16MemberPtr" ); |
14116 | break; |
14117 | case OP_FlipUint16Float: |
14118 | Text.Op = PrintName("FlipUint16Float" ); |
14119 | break; |
14120 | case OP_FlipSint32Sint8: |
14121 | Text.Op = PrintName("FlipSint32Sint8" ); |
14122 | break; |
14123 | case OP_FlipSint32Uint8: |
14124 | Text.Op = PrintName("FlipSint32Uint8" ); |
14125 | break; |
14126 | case OP_FlipSint32Sint16: |
14127 | Text.Op = PrintName("FlipSint32Sint16" ); |
14128 | break; |
14129 | case OP_FlipSint32Uint16: |
14130 | Text.Op = PrintName("FlipSint32Uint16" ); |
14131 | break; |
14132 | case OP_FlipSint32Sint32: |
14133 | Text.Op = PrintName("FlipSint32Sint32" ); |
14134 | break; |
14135 | case OP_FlipSint32Uint32: |
14136 | Text.Op = PrintName("FlipSint32Uint32" ); |
14137 | break; |
14138 | case OP_FlipSint32Sint64: |
14139 | Text.Op = PrintName("FlipSint32Sint64" ); |
14140 | break; |
14141 | case OP_FlipSint32Uint64: |
14142 | Text.Op = PrintName("FlipSint32Uint64" ); |
14143 | break; |
14144 | case OP_FlipSint32IntAP: |
14145 | Text.Op = PrintName("FlipSint32IntAP" ); |
14146 | break; |
14147 | case OP_FlipSint32IntAPS: |
14148 | Text.Op = PrintName("FlipSint32IntAPS" ); |
14149 | break; |
14150 | case OP_FlipSint32Bool: |
14151 | Text.Op = PrintName("FlipSint32Bool" ); |
14152 | break; |
14153 | case OP_FlipSint32FixedPoint: |
14154 | Text.Op = PrintName("FlipSint32FixedPoint" ); |
14155 | break; |
14156 | case OP_FlipSint32Ptr: |
14157 | Text.Op = PrintName("FlipSint32Ptr" ); |
14158 | break; |
14159 | case OP_FlipSint32MemberPtr: |
14160 | Text.Op = PrintName("FlipSint32MemberPtr" ); |
14161 | break; |
14162 | case OP_FlipSint32Float: |
14163 | Text.Op = PrintName("FlipSint32Float" ); |
14164 | break; |
14165 | case OP_FlipUint32Sint8: |
14166 | Text.Op = PrintName("FlipUint32Sint8" ); |
14167 | break; |
14168 | case OP_FlipUint32Uint8: |
14169 | Text.Op = PrintName("FlipUint32Uint8" ); |
14170 | break; |
14171 | case OP_FlipUint32Sint16: |
14172 | Text.Op = PrintName("FlipUint32Sint16" ); |
14173 | break; |
14174 | case OP_FlipUint32Uint16: |
14175 | Text.Op = PrintName("FlipUint32Uint16" ); |
14176 | break; |
14177 | case OP_FlipUint32Sint32: |
14178 | Text.Op = PrintName("FlipUint32Sint32" ); |
14179 | break; |
14180 | case OP_FlipUint32Uint32: |
14181 | Text.Op = PrintName("FlipUint32Uint32" ); |
14182 | break; |
14183 | case OP_FlipUint32Sint64: |
14184 | Text.Op = PrintName("FlipUint32Sint64" ); |
14185 | break; |
14186 | case OP_FlipUint32Uint64: |
14187 | Text.Op = PrintName("FlipUint32Uint64" ); |
14188 | break; |
14189 | case OP_FlipUint32IntAP: |
14190 | Text.Op = PrintName("FlipUint32IntAP" ); |
14191 | break; |
14192 | case OP_FlipUint32IntAPS: |
14193 | Text.Op = PrintName("FlipUint32IntAPS" ); |
14194 | break; |
14195 | case OP_FlipUint32Bool: |
14196 | Text.Op = PrintName("FlipUint32Bool" ); |
14197 | break; |
14198 | case OP_FlipUint32FixedPoint: |
14199 | Text.Op = PrintName("FlipUint32FixedPoint" ); |
14200 | break; |
14201 | case OP_FlipUint32Ptr: |
14202 | Text.Op = PrintName("FlipUint32Ptr" ); |
14203 | break; |
14204 | case OP_FlipUint32MemberPtr: |
14205 | Text.Op = PrintName("FlipUint32MemberPtr" ); |
14206 | break; |
14207 | case OP_FlipUint32Float: |
14208 | Text.Op = PrintName("FlipUint32Float" ); |
14209 | break; |
14210 | case OP_FlipSint64Sint8: |
14211 | Text.Op = PrintName("FlipSint64Sint8" ); |
14212 | break; |
14213 | case OP_FlipSint64Uint8: |
14214 | Text.Op = PrintName("FlipSint64Uint8" ); |
14215 | break; |
14216 | case OP_FlipSint64Sint16: |
14217 | Text.Op = PrintName("FlipSint64Sint16" ); |
14218 | break; |
14219 | case OP_FlipSint64Uint16: |
14220 | Text.Op = PrintName("FlipSint64Uint16" ); |
14221 | break; |
14222 | case OP_FlipSint64Sint32: |
14223 | Text.Op = PrintName("FlipSint64Sint32" ); |
14224 | break; |
14225 | case OP_FlipSint64Uint32: |
14226 | Text.Op = PrintName("FlipSint64Uint32" ); |
14227 | break; |
14228 | case OP_FlipSint64Sint64: |
14229 | Text.Op = PrintName("FlipSint64Sint64" ); |
14230 | break; |
14231 | case OP_FlipSint64Uint64: |
14232 | Text.Op = PrintName("FlipSint64Uint64" ); |
14233 | break; |
14234 | case OP_FlipSint64IntAP: |
14235 | Text.Op = PrintName("FlipSint64IntAP" ); |
14236 | break; |
14237 | case OP_FlipSint64IntAPS: |
14238 | Text.Op = PrintName("FlipSint64IntAPS" ); |
14239 | break; |
14240 | case OP_FlipSint64Bool: |
14241 | Text.Op = PrintName("FlipSint64Bool" ); |
14242 | break; |
14243 | case OP_FlipSint64FixedPoint: |
14244 | Text.Op = PrintName("FlipSint64FixedPoint" ); |
14245 | break; |
14246 | case OP_FlipSint64Ptr: |
14247 | Text.Op = PrintName("FlipSint64Ptr" ); |
14248 | break; |
14249 | case OP_FlipSint64MemberPtr: |
14250 | Text.Op = PrintName("FlipSint64MemberPtr" ); |
14251 | break; |
14252 | case OP_FlipSint64Float: |
14253 | Text.Op = PrintName("FlipSint64Float" ); |
14254 | break; |
14255 | case OP_FlipUint64Sint8: |
14256 | Text.Op = PrintName("FlipUint64Sint8" ); |
14257 | break; |
14258 | case OP_FlipUint64Uint8: |
14259 | Text.Op = PrintName("FlipUint64Uint8" ); |
14260 | break; |
14261 | case OP_FlipUint64Sint16: |
14262 | Text.Op = PrintName("FlipUint64Sint16" ); |
14263 | break; |
14264 | case OP_FlipUint64Uint16: |
14265 | Text.Op = PrintName("FlipUint64Uint16" ); |
14266 | break; |
14267 | case OP_FlipUint64Sint32: |
14268 | Text.Op = PrintName("FlipUint64Sint32" ); |
14269 | break; |
14270 | case OP_FlipUint64Uint32: |
14271 | Text.Op = PrintName("FlipUint64Uint32" ); |
14272 | break; |
14273 | case OP_FlipUint64Sint64: |
14274 | Text.Op = PrintName("FlipUint64Sint64" ); |
14275 | break; |
14276 | case OP_FlipUint64Uint64: |
14277 | Text.Op = PrintName("FlipUint64Uint64" ); |
14278 | break; |
14279 | case OP_FlipUint64IntAP: |
14280 | Text.Op = PrintName("FlipUint64IntAP" ); |
14281 | break; |
14282 | case OP_FlipUint64IntAPS: |
14283 | Text.Op = PrintName("FlipUint64IntAPS" ); |
14284 | break; |
14285 | case OP_FlipUint64Bool: |
14286 | Text.Op = PrintName("FlipUint64Bool" ); |
14287 | break; |
14288 | case OP_FlipUint64FixedPoint: |
14289 | Text.Op = PrintName("FlipUint64FixedPoint" ); |
14290 | break; |
14291 | case OP_FlipUint64Ptr: |
14292 | Text.Op = PrintName("FlipUint64Ptr" ); |
14293 | break; |
14294 | case OP_FlipUint64MemberPtr: |
14295 | Text.Op = PrintName("FlipUint64MemberPtr" ); |
14296 | break; |
14297 | case OP_FlipUint64Float: |
14298 | Text.Op = PrintName("FlipUint64Float" ); |
14299 | break; |
14300 | case OP_FlipIntAPSint8: |
14301 | Text.Op = PrintName("FlipIntAPSint8" ); |
14302 | break; |
14303 | case OP_FlipIntAPUint8: |
14304 | Text.Op = PrintName("FlipIntAPUint8" ); |
14305 | break; |
14306 | case OP_FlipIntAPSint16: |
14307 | Text.Op = PrintName("FlipIntAPSint16" ); |
14308 | break; |
14309 | case OP_FlipIntAPUint16: |
14310 | Text.Op = PrintName("FlipIntAPUint16" ); |
14311 | break; |
14312 | case OP_FlipIntAPSint32: |
14313 | Text.Op = PrintName("FlipIntAPSint32" ); |
14314 | break; |
14315 | case OP_FlipIntAPUint32: |
14316 | Text.Op = PrintName("FlipIntAPUint32" ); |
14317 | break; |
14318 | case OP_FlipIntAPSint64: |
14319 | Text.Op = PrintName("FlipIntAPSint64" ); |
14320 | break; |
14321 | case OP_FlipIntAPUint64: |
14322 | Text.Op = PrintName("FlipIntAPUint64" ); |
14323 | break; |
14324 | case OP_FlipIntAPIntAP: |
14325 | Text.Op = PrintName("FlipIntAPIntAP" ); |
14326 | break; |
14327 | case OP_FlipIntAPIntAPS: |
14328 | Text.Op = PrintName("FlipIntAPIntAPS" ); |
14329 | break; |
14330 | case OP_FlipIntAPBool: |
14331 | Text.Op = PrintName("FlipIntAPBool" ); |
14332 | break; |
14333 | case OP_FlipIntAPFixedPoint: |
14334 | Text.Op = PrintName("FlipIntAPFixedPoint" ); |
14335 | break; |
14336 | case OP_FlipIntAPPtr: |
14337 | Text.Op = PrintName("FlipIntAPPtr" ); |
14338 | break; |
14339 | case OP_FlipIntAPMemberPtr: |
14340 | Text.Op = PrintName("FlipIntAPMemberPtr" ); |
14341 | break; |
14342 | case OP_FlipIntAPFloat: |
14343 | Text.Op = PrintName("FlipIntAPFloat" ); |
14344 | break; |
14345 | case OP_FlipIntAPSSint8: |
14346 | Text.Op = PrintName("FlipIntAPSSint8" ); |
14347 | break; |
14348 | case OP_FlipIntAPSUint8: |
14349 | Text.Op = PrintName("FlipIntAPSUint8" ); |
14350 | break; |
14351 | case OP_FlipIntAPSSint16: |
14352 | Text.Op = PrintName("FlipIntAPSSint16" ); |
14353 | break; |
14354 | case OP_FlipIntAPSUint16: |
14355 | Text.Op = PrintName("FlipIntAPSUint16" ); |
14356 | break; |
14357 | case OP_FlipIntAPSSint32: |
14358 | Text.Op = PrintName("FlipIntAPSSint32" ); |
14359 | break; |
14360 | case OP_FlipIntAPSUint32: |
14361 | Text.Op = PrintName("FlipIntAPSUint32" ); |
14362 | break; |
14363 | case OP_FlipIntAPSSint64: |
14364 | Text.Op = PrintName("FlipIntAPSSint64" ); |
14365 | break; |
14366 | case OP_FlipIntAPSUint64: |
14367 | Text.Op = PrintName("FlipIntAPSUint64" ); |
14368 | break; |
14369 | case OP_FlipIntAPSIntAP: |
14370 | Text.Op = PrintName("FlipIntAPSIntAP" ); |
14371 | break; |
14372 | case OP_FlipIntAPSIntAPS: |
14373 | Text.Op = PrintName("FlipIntAPSIntAPS" ); |
14374 | break; |
14375 | case OP_FlipIntAPSBool: |
14376 | Text.Op = PrintName("FlipIntAPSBool" ); |
14377 | break; |
14378 | case OP_FlipIntAPSFixedPoint: |
14379 | Text.Op = PrintName("FlipIntAPSFixedPoint" ); |
14380 | break; |
14381 | case OP_FlipIntAPSPtr: |
14382 | Text.Op = PrintName("FlipIntAPSPtr" ); |
14383 | break; |
14384 | case OP_FlipIntAPSMemberPtr: |
14385 | Text.Op = PrintName("FlipIntAPSMemberPtr" ); |
14386 | break; |
14387 | case OP_FlipIntAPSFloat: |
14388 | Text.Op = PrintName("FlipIntAPSFloat" ); |
14389 | break; |
14390 | case OP_FlipBoolSint8: |
14391 | Text.Op = PrintName("FlipBoolSint8" ); |
14392 | break; |
14393 | case OP_FlipBoolUint8: |
14394 | Text.Op = PrintName("FlipBoolUint8" ); |
14395 | break; |
14396 | case OP_FlipBoolSint16: |
14397 | Text.Op = PrintName("FlipBoolSint16" ); |
14398 | break; |
14399 | case OP_FlipBoolUint16: |
14400 | Text.Op = PrintName("FlipBoolUint16" ); |
14401 | break; |
14402 | case OP_FlipBoolSint32: |
14403 | Text.Op = PrintName("FlipBoolSint32" ); |
14404 | break; |
14405 | case OP_FlipBoolUint32: |
14406 | Text.Op = PrintName("FlipBoolUint32" ); |
14407 | break; |
14408 | case OP_FlipBoolSint64: |
14409 | Text.Op = PrintName("FlipBoolSint64" ); |
14410 | break; |
14411 | case OP_FlipBoolUint64: |
14412 | Text.Op = PrintName("FlipBoolUint64" ); |
14413 | break; |
14414 | case OP_FlipBoolIntAP: |
14415 | Text.Op = PrintName("FlipBoolIntAP" ); |
14416 | break; |
14417 | case OP_FlipBoolIntAPS: |
14418 | Text.Op = PrintName("FlipBoolIntAPS" ); |
14419 | break; |
14420 | case OP_FlipBoolBool: |
14421 | Text.Op = PrintName("FlipBoolBool" ); |
14422 | break; |
14423 | case OP_FlipBoolFixedPoint: |
14424 | Text.Op = PrintName("FlipBoolFixedPoint" ); |
14425 | break; |
14426 | case OP_FlipBoolPtr: |
14427 | Text.Op = PrintName("FlipBoolPtr" ); |
14428 | break; |
14429 | case OP_FlipBoolMemberPtr: |
14430 | Text.Op = PrintName("FlipBoolMemberPtr" ); |
14431 | break; |
14432 | case OP_FlipBoolFloat: |
14433 | Text.Op = PrintName("FlipBoolFloat" ); |
14434 | break; |
14435 | case OP_FlipFixedPointSint8: |
14436 | Text.Op = PrintName("FlipFixedPointSint8" ); |
14437 | break; |
14438 | case OP_FlipFixedPointUint8: |
14439 | Text.Op = PrintName("FlipFixedPointUint8" ); |
14440 | break; |
14441 | case OP_FlipFixedPointSint16: |
14442 | Text.Op = PrintName("FlipFixedPointSint16" ); |
14443 | break; |
14444 | case OP_FlipFixedPointUint16: |
14445 | Text.Op = PrintName("FlipFixedPointUint16" ); |
14446 | break; |
14447 | case OP_FlipFixedPointSint32: |
14448 | Text.Op = PrintName("FlipFixedPointSint32" ); |
14449 | break; |
14450 | case OP_FlipFixedPointUint32: |
14451 | Text.Op = PrintName("FlipFixedPointUint32" ); |
14452 | break; |
14453 | case OP_FlipFixedPointSint64: |
14454 | Text.Op = PrintName("FlipFixedPointSint64" ); |
14455 | break; |
14456 | case OP_FlipFixedPointUint64: |
14457 | Text.Op = PrintName("FlipFixedPointUint64" ); |
14458 | break; |
14459 | case OP_FlipFixedPointIntAP: |
14460 | Text.Op = PrintName("FlipFixedPointIntAP" ); |
14461 | break; |
14462 | case OP_FlipFixedPointIntAPS: |
14463 | Text.Op = PrintName("FlipFixedPointIntAPS" ); |
14464 | break; |
14465 | case OP_FlipFixedPointBool: |
14466 | Text.Op = PrintName("FlipFixedPointBool" ); |
14467 | break; |
14468 | case OP_FlipFixedPointFixedPoint: |
14469 | Text.Op = PrintName("FlipFixedPointFixedPoint" ); |
14470 | break; |
14471 | case OP_FlipFixedPointPtr: |
14472 | Text.Op = PrintName("FlipFixedPointPtr" ); |
14473 | break; |
14474 | case OP_FlipFixedPointMemberPtr: |
14475 | Text.Op = PrintName("FlipFixedPointMemberPtr" ); |
14476 | break; |
14477 | case OP_FlipFixedPointFloat: |
14478 | Text.Op = PrintName("FlipFixedPointFloat" ); |
14479 | break; |
14480 | case OP_FlipPtrSint8: |
14481 | Text.Op = PrintName("FlipPtrSint8" ); |
14482 | break; |
14483 | case OP_FlipPtrUint8: |
14484 | Text.Op = PrintName("FlipPtrUint8" ); |
14485 | break; |
14486 | case OP_FlipPtrSint16: |
14487 | Text.Op = PrintName("FlipPtrSint16" ); |
14488 | break; |
14489 | case OP_FlipPtrUint16: |
14490 | Text.Op = PrintName("FlipPtrUint16" ); |
14491 | break; |
14492 | case OP_FlipPtrSint32: |
14493 | Text.Op = PrintName("FlipPtrSint32" ); |
14494 | break; |
14495 | case OP_FlipPtrUint32: |
14496 | Text.Op = PrintName("FlipPtrUint32" ); |
14497 | break; |
14498 | case OP_FlipPtrSint64: |
14499 | Text.Op = PrintName("FlipPtrSint64" ); |
14500 | break; |
14501 | case OP_FlipPtrUint64: |
14502 | Text.Op = PrintName("FlipPtrUint64" ); |
14503 | break; |
14504 | case OP_FlipPtrIntAP: |
14505 | Text.Op = PrintName("FlipPtrIntAP" ); |
14506 | break; |
14507 | case OP_FlipPtrIntAPS: |
14508 | Text.Op = PrintName("FlipPtrIntAPS" ); |
14509 | break; |
14510 | case OP_FlipPtrBool: |
14511 | Text.Op = PrintName("FlipPtrBool" ); |
14512 | break; |
14513 | case OP_FlipPtrFixedPoint: |
14514 | Text.Op = PrintName("FlipPtrFixedPoint" ); |
14515 | break; |
14516 | case OP_FlipPtrPtr: |
14517 | Text.Op = PrintName("FlipPtrPtr" ); |
14518 | break; |
14519 | case OP_FlipPtrMemberPtr: |
14520 | Text.Op = PrintName("FlipPtrMemberPtr" ); |
14521 | break; |
14522 | case OP_FlipPtrFloat: |
14523 | Text.Op = PrintName("FlipPtrFloat" ); |
14524 | break; |
14525 | case OP_FlipMemberPtrSint8: |
14526 | Text.Op = PrintName("FlipMemberPtrSint8" ); |
14527 | break; |
14528 | case OP_FlipMemberPtrUint8: |
14529 | Text.Op = PrintName("FlipMemberPtrUint8" ); |
14530 | break; |
14531 | case OP_FlipMemberPtrSint16: |
14532 | Text.Op = PrintName("FlipMemberPtrSint16" ); |
14533 | break; |
14534 | case OP_FlipMemberPtrUint16: |
14535 | Text.Op = PrintName("FlipMemberPtrUint16" ); |
14536 | break; |
14537 | case OP_FlipMemberPtrSint32: |
14538 | Text.Op = PrintName("FlipMemberPtrSint32" ); |
14539 | break; |
14540 | case OP_FlipMemberPtrUint32: |
14541 | Text.Op = PrintName("FlipMemberPtrUint32" ); |
14542 | break; |
14543 | case OP_FlipMemberPtrSint64: |
14544 | Text.Op = PrintName("FlipMemberPtrSint64" ); |
14545 | break; |
14546 | case OP_FlipMemberPtrUint64: |
14547 | Text.Op = PrintName("FlipMemberPtrUint64" ); |
14548 | break; |
14549 | case OP_FlipMemberPtrIntAP: |
14550 | Text.Op = PrintName("FlipMemberPtrIntAP" ); |
14551 | break; |
14552 | case OP_FlipMemberPtrIntAPS: |
14553 | Text.Op = PrintName("FlipMemberPtrIntAPS" ); |
14554 | break; |
14555 | case OP_FlipMemberPtrBool: |
14556 | Text.Op = PrintName("FlipMemberPtrBool" ); |
14557 | break; |
14558 | case OP_FlipMemberPtrFixedPoint: |
14559 | Text.Op = PrintName("FlipMemberPtrFixedPoint" ); |
14560 | break; |
14561 | case OP_FlipMemberPtrPtr: |
14562 | Text.Op = PrintName("FlipMemberPtrPtr" ); |
14563 | break; |
14564 | case OP_FlipMemberPtrMemberPtr: |
14565 | Text.Op = PrintName("FlipMemberPtrMemberPtr" ); |
14566 | break; |
14567 | case OP_FlipMemberPtrFloat: |
14568 | Text.Op = PrintName("FlipMemberPtrFloat" ); |
14569 | break; |
14570 | case OP_FlipFloatSint8: |
14571 | Text.Op = PrintName("FlipFloatSint8" ); |
14572 | break; |
14573 | case OP_FlipFloatUint8: |
14574 | Text.Op = PrintName("FlipFloatUint8" ); |
14575 | break; |
14576 | case OP_FlipFloatSint16: |
14577 | Text.Op = PrintName("FlipFloatSint16" ); |
14578 | break; |
14579 | case OP_FlipFloatUint16: |
14580 | Text.Op = PrintName("FlipFloatUint16" ); |
14581 | break; |
14582 | case OP_FlipFloatSint32: |
14583 | Text.Op = PrintName("FlipFloatSint32" ); |
14584 | break; |
14585 | case OP_FlipFloatUint32: |
14586 | Text.Op = PrintName("FlipFloatUint32" ); |
14587 | break; |
14588 | case OP_FlipFloatSint64: |
14589 | Text.Op = PrintName("FlipFloatSint64" ); |
14590 | break; |
14591 | case OP_FlipFloatUint64: |
14592 | Text.Op = PrintName("FlipFloatUint64" ); |
14593 | break; |
14594 | case OP_FlipFloatIntAP: |
14595 | Text.Op = PrintName("FlipFloatIntAP" ); |
14596 | break; |
14597 | case OP_FlipFloatIntAPS: |
14598 | Text.Op = PrintName("FlipFloatIntAPS" ); |
14599 | break; |
14600 | case OP_FlipFloatBool: |
14601 | Text.Op = PrintName("FlipFloatBool" ); |
14602 | break; |
14603 | case OP_FlipFloatFixedPoint: |
14604 | Text.Op = PrintName("FlipFloatFixedPoint" ); |
14605 | break; |
14606 | case OP_FlipFloatPtr: |
14607 | Text.Op = PrintName("FlipFloatPtr" ); |
14608 | break; |
14609 | case OP_FlipFloatMemberPtr: |
14610 | Text.Op = PrintName("FlipFloatMemberPtr" ); |
14611 | break; |
14612 | case OP_FlipFloatFloat: |
14613 | Text.Op = PrintName("FlipFloatFloat" ); |
14614 | break; |
14615 | #endif |
14616 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14617 | bool emitFlipSint8Sint8(const SourceInfo &); |
14618 | bool emitFlipSint8Uint8(const SourceInfo &); |
14619 | bool emitFlipSint8Sint16(const SourceInfo &); |
14620 | bool emitFlipSint8Uint16(const SourceInfo &); |
14621 | bool emitFlipSint8Sint32(const SourceInfo &); |
14622 | bool emitFlipSint8Uint32(const SourceInfo &); |
14623 | bool emitFlipSint8Sint64(const SourceInfo &); |
14624 | bool emitFlipSint8Uint64(const SourceInfo &); |
14625 | bool emitFlipSint8IntAP(const SourceInfo &); |
14626 | bool emitFlipSint8IntAPS(const SourceInfo &); |
14627 | bool emitFlipSint8Bool(const SourceInfo &); |
14628 | bool emitFlipSint8FixedPoint(const SourceInfo &); |
14629 | bool emitFlipSint8Ptr(const SourceInfo &); |
14630 | bool emitFlipSint8MemberPtr(const SourceInfo &); |
14631 | bool emitFlipSint8Float(const SourceInfo &); |
14632 | bool emitFlipUint8Sint8(const SourceInfo &); |
14633 | bool emitFlipUint8Uint8(const SourceInfo &); |
14634 | bool emitFlipUint8Sint16(const SourceInfo &); |
14635 | bool emitFlipUint8Uint16(const SourceInfo &); |
14636 | bool emitFlipUint8Sint32(const SourceInfo &); |
14637 | bool emitFlipUint8Uint32(const SourceInfo &); |
14638 | bool emitFlipUint8Sint64(const SourceInfo &); |
14639 | bool emitFlipUint8Uint64(const SourceInfo &); |
14640 | bool emitFlipUint8IntAP(const SourceInfo &); |
14641 | bool emitFlipUint8IntAPS(const SourceInfo &); |
14642 | bool emitFlipUint8Bool(const SourceInfo &); |
14643 | bool emitFlipUint8FixedPoint(const SourceInfo &); |
14644 | bool emitFlipUint8Ptr(const SourceInfo &); |
14645 | bool emitFlipUint8MemberPtr(const SourceInfo &); |
14646 | bool emitFlipUint8Float(const SourceInfo &); |
14647 | bool emitFlipSint16Sint8(const SourceInfo &); |
14648 | bool emitFlipSint16Uint8(const SourceInfo &); |
14649 | bool emitFlipSint16Sint16(const SourceInfo &); |
14650 | bool emitFlipSint16Uint16(const SourceInfo &); |
14651 | bool emitFlipSint16Sint32(const SourceInfo &); |
14652 | bool emitFlipSint16Uint32(const SourceInfo &); |
14653 | bool emitFlipSint16Sint64(const SourceInfo &); |
14654 | bool emitFlipSint16Uint64(const SourceInfo &); |
14655 | bool emitFlipSint16IntAP(const SourceInfo &); |
14656 | bool emitFlipSint16IntAPS(const SourceInfo &); |
14657 | bool emitFlipSint16Bool(const SourceInfo &); |
14658 | bool emitFlipSint16FixedPoint(const SourceInfo &); |
14659 | bool emitFlipSint16Ptr(const SourceInfo &); |
14660 | bool emitFlipSint16MemberPtr(const SourceInfo &); |
14661 | bool emitFlipSint16Float(const SourceInfo &); |
14662 | bool emitFlipUint16Sint8(const SourceInfo &); |
14663 | bool emitFlipUint16Uint8(const SourceInfo &); |
14664 | bool emitFlipUint16Sint16(const SourceInfo &); |
14665 | bool emitFlipUint16Uint16(const SourceInfo &); |
14666 | bool emitFlipUint16Sint32(const SourceInfo &); |
14667 | bool emitFlipUint16Uint32(const SourceInfo &); |
14668 | bool emitFlipUint16Sint64(const SourceInfo &); |
14669 | bool emitFlipUint16Uint64(const SourceInfo &); |
14670 | bool emitFlipUint16IntAP(const SourceInfo &); |
14671 | bool emitFlipUint16IntAPS(const SourceInfo &); |
14672 | bool emitFlipUint16Bool(const SourceInfo &); |
14673 | bool emitFlipUint16FixedPoint(const SourceInfo &); |
14674 | bool emitFlipUint16Ptr(const SourceInfo &); |
14675 | bool emitFlipUint16MemberPtr(const SourceInfo &); |
14676 | bool emitFlipUint16Float(const SourceInfo &); |
14677 | bool emitFlipSint32Sint8(const SourceInfo &); |
14678 | bool emitFlipSint32Uint8(const SourceInfo &); |
14679 | bool emitFlipSint32Sint16(const SourceInfo &); |
14680 | bool emitFlipSint32Uint16(const SourceInfo &); |
14681 | bool emitFlipSint32Sint32(const SourceInfo &); |
14682 | bool emitFlipSint32Uint32(const SourceInfo &); |
14683 | bool emitFlipSint32Sint64(const SourceInfo &); |
14684 | bool emitFlipSint32Uint64(const SourceInfo &); |
14685 | bool emitFlipSint32IntAP(const SourceInfo &); |
14686 | bool emitFlipSint32IntAPS(const SourceInfo &); |
14687 | bool emitFlipSint32Bool(const SourceInfo &); |
14688 | bool emitFlipSint32FixedPoint(const SourceInfo &); |
14689 | bool emitFlipSint32Ptr(const SourceInfo &); |
14690 | bool emitFlipSint32MemberPtr(const SourceInfo &); |
14691 | bool emitFlipSint32Float(const SourceInfo &); |
14692 | bool emitFlipUint32Sint8(const SourceInfo &); |
14693 | bool emitFlipUint32Uint8(const SourceInfo &); |
14694 | bool emitFlipUint32Sint16(const SourceInfo &); |
14695 | bool emitFlipUint32Uint16(const SourceInfo &); |
14696 | bool emitFlipUint32Sint32(const SourceInfo &); |
14697 | bool emitFlipUint32Uint32(const SourceInfo &); |
14698 | bool emitFlipUint32Sint64(const SourceInfo &); |
14699 | bool emitFlipUint32Uint64(const SourceInfo &); |
14700 | bool emitFlipUint32IntAP(const SourceInfo &); |
14701 | bool emitFlipUint32IntAPS(const SourceInfo &); |
14702 | bool emitFlipUint32Bool(const SourceInfo &); |
14703 | bool emitFlipUint32FixedPoint(const SourceInfo &); |
14704 | bool emitFlipUint32Ptr(const SourceInfo &); |
14705 | bool emitFlipUint32MemberPtr(const SourceInfo &); |
14706 | bool emitFlipUint32Float(const SourceInfo &); |
14707 | bool emitFlipSint64Sint8(const SourceInfo &); |
14708 | bool emitFlipSint64Uint8(const SourceInfo &); |
14709 | bool emitFlipSint64Sint16(const SourceInfo &); |
14710 | bool emitFlipSint64Uint16(const SourceInfo &); |
14711 | bool emitFlipSint64Sint32(const SourceInfo &); |
14712 | bool emitFlipSint64Uint32(const SourceInfo &); |
14713 | bool emitFlipSint64Sint64(const SourceInfo &); |
14714 | bool emitFlipSint64Uint64(const SourceInfo &); |
14715 | bool emitFlipSint64IntAP(const SourceInfo &); |
14716 | bool emitFlipSint64IntAPS(const SourceInfo &); |
14717 | bool emitFlipSint64Bool(const SourceInfo &); |
14718 | bool emitFlipSint64FixedPoint(const SourceInfo &); |
14719 | bool emitFlipSint64Ptr(const SourceInfo &); |
14720 | bool emitFlipSint64MemberPtr(const SourceInfo &); |
14721 | bool emitFlipSint64Float(const SourceInfo &); |
14722 | bool emitFlipUint64Sint8(const SourceInfo &); |
14723 | bool emitFlipUint64Uint8(const SourceInfo &); |
14724 | bool emitFlipUint64Sint16(const SourceInfo &); |
14725 | bool emitFlipUint64Uint16(const SourceInfo &); |
14726 | bool emitFlipUint64Sint32(const SourceInfo &); |
14727 | bool emitFlipUint64Uint32(const SourceInfo &); |
14728 | bool emitFlipUint64Sint64(const SourceInfo &); |
14729 | bool emitFlipUint64Uint64(const SourceInfo &); |
14730 | bool emitFlipUint64IntAP(const SourceInfo &); |
14731 | bool emitFlipUint64IntAPS(const SourceInfo &); |
14732 | bool emitFlipUint64Bool(const SourceInfo &); |
14733 | bool emitFlipUint64FixedPoint(const SourceInfo &); |
14734 | bool emitFlipUint64Ptr(const SourceInfo &); |
14735 | bool emitFlipUint64MemberPtr(const SourceInfo &); |
14736 | bool emitFlipUint64Float(const SourceInfo &); |
14737 | bool emitFlipIntAPSint8(const SourceInfo &); |
14738 | bool emitFlipIntAPUint8(const SourceInfo &); |
14739 | bool emitFlipIntAPSint16(const SourceInfo &); |
14740 | bool emitFlipIntAPUint16(const SourceInfo &); |
14741 | bool emitFlipIntAPSint32(const SourceInfo &); |
14742 | bool emitFlipIntAPUint32(const SourceInfo &); |
14743 | bool emitFlipIntAPSint64(const SourceInfo &); |
14744 | bool emitFlipIntAPUint64(const SourceInfo &); |
14745 | bool emitFlipIntAPIntAP(const SourceInfo &); |
14746 | bool emitFlipIntAPIntAPS(const SourceInfo &); |
14747 | bool emitFlipIntAPBool(const SourceInfo &); |
14748 | bool emitFlipIntAPFixedPoint(const SourceInfo &); |
14749 | bool emitFlipIntAPPtr(const SourceInfo &); |
14750 | bool emitFlipIntAPMemberPtr(const SourceInfo &); |
14751 | bool emitFlipIntAPFloat(const SourceInfo &); |
14752 | bool emitFlipIntAPSSint8(const SourceInfo &); |
14753 | bool emitFlipIntAPSUint8(const SourceInfo &); |
14754 | bool emitFlipIntAPSSint16(const SourceInfo &); |
14755 | bool emitFlipIntAPSUint16(const SourceInfo &); |
14756 | bool emitFlipIntAPSSint32(const SourceInfo &); |
14757 | bool emitFlipIntAPSUint32(const SourceInfo &); |
14758 | bool emitFlipIntAPSSint64(const SourceInfo &); |
14759 | bool emitFlipIntAPSUint64(const SourceInfo &); |
14760 | bool emitFlipIntAPSIntAP(const SourceInfo &); |
14761 | bool emitFlipIntAPSIntAPS(const SourceInfo &); |
14762 | bool emitFlipIntAPSBool(const SourceInfo &); |
14763 | bool emitFlipIntAPSFixedPoint(const SourceInfo &); |
14764 | bool emitFlipIntAPSPtr(const SourceInfo &); |
14765 | bool emitFlipIntAPSMemberPtr(const SourceInfo &); |
14766 | bool emitFlipIntAPSFloat(const SourceInfo &); |
14767 | bool emitFlipBoolSint8(const SourceInfo &); |
14768 | bool emitFlipBoolUint8(const SourceInfo &); |
14769 | bool emitFlipBoolSint16(const SourceInfo &); |
14770 | bool emitFlipBoolUint16(const SourceInfo &); |
14771 | bool emitFlipBoolSint32(const SourceInfo &); |
14772 | bool emitFlipBoolUint32(const SourceInfo &); |
14773 | bool emitFlipBoolSint64(const SourceInfo &); |
14774 | bool emitFlipBoolUint64(const SourceInfo &); |
14775 | bool emitFlipBoolIntAP(const SourceInfo &); |
14776 | bool emitFlipBoolIntAPS(const SourceInfo &); |
14777 | bool emitFlipBoolBool(const SourceInfo &); |
14778 | bool emitFlipBoolFixedPoint(const SourceInfo &); |
14779 | bool emitFlipBoolPtr(const SourceInfo &); |
14780 | bool emitFlipBoolMemberPtr(const SourceInfo &); |
14781 | bool emitFlipBoolFloat(const SourceInfo &); |
14782 | bool emitFlipFixedPointSint8(const SourceInfo &); |
14783 | bool emitFlipFixedPointUint8(const SourceInfo &); |
14784 | bool emitFlipFixedPointSint16(const SourceInfo &); |
14785 | bool emitFlipFixedPointUint16(const SourceInfo &); |
14786 | bool emitFlipFixedPointSint32(const SourceInfo &); |
14787 | bool emitFlipFixedPointUint32(const SourceInfo &); |
14788 | bool emitFlipFixedPointSint64(const SourceInfo &); |
14789 | bool emitFlipFixedPointUint64(const SourceInfo &); |
14790 | bool emitFlipFixedPointIntAP(const SourceInfo &); |
14791 | bool emitFlipFixedPointIntAPS(const SourceInfo &); |
14792 | bool emitFlipFixedPointBool(const SourceInfo &); |
14793 | bool emitFlipFixedPointFixedPoint(const SourceInfo &); |
14794 | bool emitFlipFixedPointPtr(const SourceInfo &); |
14795 | bool emitFlipFixedPointMemberPtr(const SourceInfo &); |
14796 | bool emitFlipFixedPointFloat(const SourceInfo &); |
14797 | bool emitFlipPtrSint8(const SourceInfo &); |
14798 | bool emitFlipPtrUint8(const SourceInfo &); |
14799 | bool emitFlipPtrSint16(const SourceInfo &); |
14800 | bool emitFlipPtrUint16(const SourceInfo &); |
14801 | bool emitFlipPtrSint32(const SourceInfo &); |
14802 | bool emitFlipPtrUint32(const SourceInfo &); |
14803 | bool emitFlipPtrSint64(const SourceInfo &); |
14804 | bool emitFlipPtrUint64(const SourceInfo &); |
14805 | bool emitFlipPtrIntAP(const SourceInfo &); |
14806 | bool emitFlipPtrIntAPS(const SourceInfo &); |
14807 | bool emitFlipPtrBool(const SourceInfo &); |
14808 | bool emitFlipPtrFixedPoint(const SourceInfo &); |
14809 | bool emitFlipPtrPtr(const SourceInfo &); |
14810 | bool emitFlipPtrMemberPtr(const SourceInfo &); |
14811 | bool emitFlipPtrFloat(const SourceInfo &); |
14812 | bool emitFlipMemberPtrSint8(const SourceInfo &); |
14813 | bool emitFlipMemberPtrUint8(const SourceInfo &); |
14814 | bool emitFlipMemberPtrSint16(const SourceInfo &); |
14815 | bool emitFlipMemberPtrUint16(const SourceInfo &); |
14816 | bool emitFlipMemberPtrSint32(const SourceInfo &); |
14817 | bool emitFlipMemberPtrUint32(const SourceInfo &); |
14818 | bool emitFlipMemberPtrSint64(const SourceInfo &); |
14819 | bool emitFlipMemberPtrUint64(const SourceInfo &); |
14820 | bool emitFlipMemberPtrIntAP(const SourceInfo &); |
14821 | bool emitFlipMemberPtrIntAPS(const SourceInfo &); |
14822 | bool emitFlipMemberPtrBool(const SourceInfo &); |
14823 | bool emitFlipMemberPtrFixedPoint(const SourceInfo &); |
14824 | bool emitFlipMemberPtrPtr(const SourceInfo &); |
14825 | bool emitFlipMemberPtrMemberPtr(const SourceInfo &); |
14826 | bool emitFlipMemberPtrFloat(const SourceInfo &); |
14827 | bool emitFlipFloatSint8(const SourceInfo &); |
14828 | bool emitFlipFloatUint8(const SourceInfo &); |
14829 | bool emitFlipFloatSint16(const SourceInfo &); |
14830 | bool emitFlipFloatUint16(const SourceInfo &); |
14831 | bool emitFlipFloatSint32(const SourceInfo &); |
14832 | bool emitFlipFloatUint32(const SourceInfo &); |
14833 | bool emitFlipFloatSint64(const SourceInfo &); |
14834 | bool emitFlipFloatUint64(const SourceInfo &); |
14835 | bool emitFlipFloatIntAP(const SourceInfo &); |
14836 | bool emitFlipFloatIntAPS(const SourceInfo &); |
14837 | bool emitFlipFloatBool(const SourceInfo &); |
14838 | bool emitFlipFloatFixedPoint(const SourceInfo &); |
14839 | bool emitFlipFloatPtr(const SourceInfo &); |
14840 | bool emitFlipFloatMemberPtr(const SourceInfo &); |
14841 | bool emitFlipFloatFloat(const SourceInfo &); |
14842 | #endif |
14843 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14844 | [[nodiscard]] bool emitFlip(PrimType, PrimType, const SourceInfo &I); |
14845 | #endif |
14846 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
14847 | bool |
14848 | #if defined(GET_EVAL_IMPL) |
14849 | EvalEmitter |
14850 | #else |
14851 | ByteCodeEmitter |
14852 | #endif |
14853 | ::emitFlip(PrimType T0, PrimType T1, const SourceInfo &I) { |
14854 | switch (T0) { |
14855 | case PT_Sint8: |
14856 | switch (T1) { |
14857 | case PT_Sint8: |
14858 | return emitFlipSint8Sint8(I); |
14859 | case PT_Uint8: |
14860 | return emitFlipSint8Uint8(I); |
14861 | case PT_Sint16: |
14862 | return emitFlipSint8Sint16(I); |
14863 | case PT_Uint16: |
14864 | return emitFlipSint8Uint16(I); |
14865 | case PT_Sint32: |
14866 | return emitFlipSint8Sint32(I); |
14867 | case PT_Uint32: |
14868 | return emitFlipSint8Uint32(I); |
14869 | case PT_Sint64: |
14870 | return emitFlipSint8Sint64(I); |
14871 | case PT_Uint64: |
14872 | return emitFlipSint8Uint64(I); |
14873 | case PT_IntAP: |
14874 | return emitFlipSint8IntAP(I); |
14875 | case PT_IntAPS: |
14876 | return emitFlipSint8IntAPS(I); |
14877 | case PT_Bool: |
14878 | return emitFlipSint8Bool(I); |
14879 | case PT_FixedPoint: |
14880 | return emitFlipSint8FixedPoint(I); |
14881 | case PT_Ptr: |
14882 | return emitFlipSint8Ptr(I); |
14883 | case PT_MemberPtr: |
14884 | return emitFlipSint8MemberPtr(I); |
14885 | case PT_Float: |
14886 | return emitFlipSint8Float(I); |
14887 | } |
14888 | llvm_unreachable("invalid enum value" ); |
14889 | case PT_Uint8: |
14890 | switch (T1) { |
14891 | case PT_Sint8: |
14892 | return emitFlipUint8Sint8(I); |
14893 | case PT_Uint8: |
14894 | return emitFlipUint8Uint8(I); |
14895 | case PT_Sint16: |
14896 | return emitFlipUint8Sint16(I); |
14897 | case PT_Uint16: |
14898 | return emitFlipUint8Uint16(I); |
14899 | case PT_Sint32: |
14900 | return emitFlipUint8Sint32(I); |
14901 | case PT_Uint32: |
14902 | return emitFlipUint8Uint32(I); |
14903 | case PT_Sint64: |
14904 | return emitFlipUint8Sint64(I); |
14905 | case PT_Uint64: |
14906 | return emitFlipUint8Uint64(I); |
14907 | case PT_IntAP: |
14908 | return emitFlipUint8IntAP(I); |
14909 | case PT_IntAPS: |
14910 | return emitFlipUint8IntAPS(I); |
14911 | case PT_Bool: |
14912 | return emitFlipUint8Bool(I); |
14913 | case PT_FixedPoint: |
14914 | return emitFlipUint8FixedPoint(I); |
14915 | case PT_Ptr: |
14916 | return emitFlipUint8Ptr(I); |
14917 | case PT_MemberPtr: |
14918 | return emitFlipUint8MemberPtr(I); |
14919 | case PT_Float: |
14920 | return emitFlipUint8Float(I); |
14921 | } |
14922 | llvm_unreachable("invalid enum value" ); |
14923 | case PT_Sint16: |
14924 | switch (T1) { |
14925 | case PT_Sint8: |
14926 | return emitFlipSint16Sint8(I); |
14927 | case PT_Uint8: |
14928 | return emitFlipSint16Uint8(I); |
14929 | case PT_Sint16: |
14930 | return emitFlipSint16Sint16(I); |
14931 | case PT_Uint16: |
14932 | return emitFlipSint16Uint16(I); |
14933 | case PT_Sint32: |
14934 | return emitFlipSint16Sint32(I); |
14935 | case PT_Uint32: |
14936 | return emitFlipSint16Uint32(I); |
14937 | case PT_Sint64: |
14938 | return emitFlipSint16Sint64(I); |
14939 | case PT_Uint64: |
14940 | return emitFlipSint16Uint64(I); |
14941 | case PT_IntAP: |
14942 | return emitFlipSint16IntAP(I); |
14943 | case PT_IntAPS: |
14944 | return emitFlipSint16IntAPS(I); |
14945 | case PT_Bool: |
14946 | return emitFlipSint16Bool(I); |
14947 | case PT_FixedPoint: |
14948 | return emitFlipSint16FixedPoint(I); |
14949 | case PT_Ptr: |
14950 | return emitFlipSint16Ptr(I); |
14951 | case PT_MemberPtr: |
14952 | return emitFlipSint16MemberPtr(I); |
14953 | case PT_Float: |
14954 | return emitFlipSint16Float(I); |
14955 | } |
14956 | llvm_unreachable("invalid enum value" ); |
14957 | case PT_Uint16: |
14958 | switch (T1) { |
14959 | case PT_Sint8: |
14960 | return emitFlipUint16Sint8(I); |
14961 | case PT_Uint8: |
14962 | return emitFlipUint16Uint8(I); |
14963 | case PT_Sint16: |
14964 | return emitFlipUint16Sint16(I); |
14965 | case PT_Uint16: |
14966 | return emitFlipUint16Uint16(I); |
14967 | case PT_Sint32: |
14968 | return emitFlipUint16Sint32(I); |
14969 | case PT_Uint32: |
14970 | return emitFlipUint16Uint32(I); |
14971 | case PT_Sint64: |
14972 | return emitFlipUint16Sint64(I); |
14973 | case PT_Uint64: |
14974 | return emitFlipUint16Uint64(I); |
14975 | case PT_IntAP: |
14976 | return emitFlipUint16IntAP(I); |
14977 | case PT_IntAPS: |
14978 | return emitFlipUint16IntAPS(I); |
14979 | case PT_Bool: |
14980 | return emitFlipUint16Bool(I); |
14981 | case PT_FixedPoint: |
14982 | return emitFlipUint16FixedPoint(I); |
14983 | case PT_Ptr: |
14984 | return emitFlipUint16Ptr(I); |
14985 | case PT_MemberPtr: |
14986 | return emitFlipUint16MemberPtr(I); |
14987 | case PT_Float: |
14988 | return emitFlipUint16Float(I); |
14989 | } |
14990 | llvm_unreachable("invalid enum value" ); |
14991 | case PT_Sint32: |
14992 | switch (T1) { |
14993 | case PT_Sint8: |
14994 | return emitFlipSint32Sint8(I); |
14995 | case PT_Uint8: |
14996 | return emitFlipSint32Uint8(I); |
14997 | case PT_Sint16: |
14998 | return emitFlipSint32Sint16(I); |
14999 | case PT_Uint16: |
15000 | return emitFlipSint32Uint16(I); |
15001 | case PT_Sint32: |
15002 | return emitFlipSint32Sint32(I); |
15003 | case PT_Uint32: |
15004 | return emitFlipSint32Uint32(I); |
15005 | case PT_Sint64: |
15006 | return emitFlipSint32Sint64(I); |
15007 | case PT_Uint64: |
15008 | return emitFlipSint32Uint64(I); |
15009 | case PT_IntAP: |
15010 | return emitFlipSint32IntAP(I); |
15011 | case PT_IntAPS: |
15012 | return emitFlipSint32IntAPS(I); |
15013 | case PT_Bool: |
15014 | return emitFlipSint32Bool(I); |
15015 | case PT_FixedPoint: |
15016 | return emitFlipSint32FixedPoint(I); |
15017 | case PT_Ptr: |
15018 | return emitFlipSint32Ptr(I); |
15019 | case PT_MemberPtr: |
15020 | return emitFlipSint32MemberPtr(I); |
15021 | case PT_Float: |
15022 | return emitFlipSint32Float(I); |
15023 | } |
15024 | llvm_unreachable("invalid enum value" ); |
15025 | case PT_Uint32: |
15026 | switch (T1) { |
15027 | case PT_Sint8: |
15028 | return emitFlipUint32Sint8(I); |
15029 | case PT_Uint8: |
15030 | return emitFlipUint32Uint8(I); |
15031 | case PT_Sint16: |
15032 | return emitFlipUint32Sint16(I); |
15033 | case PT_Uint16: |
15034 | return emitFlipUint32Uint16(I); |
15035 | case PT_Sint32: |
15036 | return emitFlipUint32Sint32(I); |
15037 | case PT_Uint32: |
15038 | return emitFlipUint32Uint32(I); |
15039 | case PT_Sint64: |
15040 | return emitFlipUint32Sint64(I); |
15041 | case PT_Uint64: |
15042 | return emitFlipUint32Uint64(I); |
15043 | case PT_IntAP: |
15044 | return emitFlipUint32IntAP(I); |
15045 | case PT_IntAPS: |
15046 | return emitFlipUint32IntAPS(I); |
15047 | case PT_Bool: |
15048 | return emitFlipUint32Bool(I); |
15049 | case PT_FixedPoint: |
15050 | return emitFlipUint32FixedPoint(I); |
15051 | case PT_Ptr: |
15052 | return emitFlipUint32Ptr(I); |
15053 | case PT_MemberPtr: |
15054 | return emitFlipUint32MemberPtr(I); |
15055 | case PT_Float: |
15056 | return emitFlipUint32Float(I); |
15057 | } |
15058 | llvm_unreachable("invalid enum value" ); |
15059 | case PT_Sint64: |
15060 | switch (T1) { |
15061 | case PT_Sint8: |
15062 | return emitFlipSint64Sint8(I); |
15063 | case PT_Uint8: |
15064 | return emitFlipSint64Uint8(I); |
15065 | case PT_Sint16: |
15066 | return emitFlipSint64Sint16(I); |
15067 | case PT_Uint16: |
15068 | return emitFlipSint64Uint16(I); |
15069 | case PT_Sint32: |
15070 | return emitFlipSint64Sint32(I); |
15071 | case PT_Uint32: |
15072 | return emitFlipSint64Uint32(I); |
15073 | case PT_Sint64: |
15074 | return emitFlipSint64Sint64(I); |
15075 | case PT_Uint64: |
15076 | return emitFlipSint64Uint64(I); |
15077 | case PT_IntAP: |
15078 | return emitFlipSint64IntAP(I); |
15079 | case PT_IntAPS: |
15080 | return emitFlipSint64IntAPS(I); |
15081 | case PT_Bool: |
15082 | return emitFlipSint64Bool(I); |
15083 | case PT_FixedPoint: |
15084 | return emitFlipSint64FixedPoint(I); |
15085 | case PT_Ptr: |
15086 | return emitFlipSint64Ptr(I); |
15087 | case PT_MemberPtr: |
15088 | return emitFlipSint64MemberPtr(I); |
15089 | case PT_Float: |
15090 | return emitFlipSint64Float(I); |
15091 | } |
15092 | llvm_unreachable("invalid enum value" ); |
15093 | case PT_Uint64: |
15094 | switch (T1) { |
15095 | case PT_Sint8: |
15096 | return emitFlipUint64Sint8(I); |
15097 | case PT_Uint8: |
15098 | return emitFlipUint64Uint8(I); |
15099 | case PT_Sint16: |
15100 | return emitFlipUint64Sint16(I); |
15101 | case PT_Uint16: |
15102 | return emitFlipUint64Uint16(I); |
15103 | case PT_Sint32: |
15104 | return emitFlipUint64Sint32(I); |
15105 | case PT_Uint32: |
15106 | return emitFlipUint64Uint32(I); |
15107 | case PT_Sint64: |
15108 | return emitFlipUint64Sint64(I); |
15109 | case PT_Uint64: |
15110 | return emitFlipUint64Uint64(I); |
15111 | case PT_IntAP: |
15112 | return emitFlipUint64IntAP(I); |
15113 | case PT_IntAPS: |
15114 | return emitFlipUint64IntAPS(I); |
15115 | case PT_Bool: |
15116 | return emitFlipUint64Bool(I); |
15117 | case PT_FixedPoint: |
15118 | return emitFlipUint64FixedPoint(I); |
15119 | case PT_Ptr: |
15120 | return emitFlipUint64Ptr(I); |
15121 | case PT_MemberPtr: |
15122 | return emitFlipUint64MemberPtr(I); |
15123 | case PT_Float: |
15124 | return emitFlipUint64Float(I); |
15125 | } |
15126 | llvm_unreachable("invalid enum value" ); |
15127 | case PT_IntAP: |
15128 | switch (T1) { |
15129 | case PT_Sint8: |
15130 | return emitFlipIntAPSint8(I); |
15131 | case PT_Uint8: |
15132 | return emitFlipIntAPUint8(I); |
15133 | case PT_Sint16: |
15134 | return emitFlipIntAPSint16(I); |
15135 | case PT_Uint16: |
15136 | return emitFlipIntAPUint16(I); |
15137 | case PT_Sint32: |
15138 | return emitFlipIntAPSint32(I); |
15139 | case PT_Uint32: |
15140 | return emitFlipIntAPUint32(I); |
15141 | case PT_Sint64: |
15142 | return emitFlipIntAPSint64(I); |
15143 | case PT_Uint64: |
15144 | return emitFlipIntAPUint64(I); |
15145 | case PT_IntAP: |
15146 | return emitFlipIntAPIntAP(I); |
15147 | case PT_IntAPS: |
15148 | return emitFlipIntAPIntAPS(I); |
15149 | case PT_Bool: |
15150 | return emitFlipIntAPBool(I); |
15151 | case PT_FixedPoint: |
15152 | return emitFlipIntAPFixedPoint(I); |
15153 | case PT_Ptr: |
15154 | return emitFlipIntAPPtr(I); |
15155 | case PT_MemberPtr: |
15156 | return emitFlipIntAPMemberPtr(I); |
15157 | case PT_Float: |
15158 | return emitFlipIntAPFloat(I); |
15159 | } |
15160 | llvm_unreachable("invalid enum value" ); |
15161 | case PT_IntAPS: |
15162 | switch (T1) { |
15163 | case PT_Sint8: |
15164 | return emitFlipIntAPSSint8(I); |
15165 | case PT_Uint8: |
15166 | return emitFlipIntAPSUint8(I); |
15167 | case PT_Sint16: |
15168 | return emitFlipIntAPSSint16(I); |
15169 | case PT_Uint16: |
15170 | return emitFlipIntAPSUint16(I); |
15171 | case PT_Sint32: |
15172 | return emitFlipIntAPSSint32(I); |
15173 | case PT_Uint32: |
15174 | return emitFlipIntAPSUint32(I); |
15175 | case PT_Sint64: |
15176 | return emitFlipIntAPSSint64(I); |
15177 | case PT_Uint64: |
15178 | return emitFlipIntAPSUint64(I); |
15179 | case PT_IntAP: |
15180 | return emitFlipIntAPSIntAP(I); |
15181 | case PT_IntAPS: |
15182 | return emitFlipIntAPSIntAPS(I); |
15183 | case PT_Bool: |
15184 | return emitFlipIntAPSBool(I); |
15185 | case PT_FixedPoint: |
15186 | return emitFlipIntAPSFixedPoint(I); |
15187 | case PT_Ptr: |
15188 | return emitFlipIntAPSPtr(I); |
15189 | case PT_MemberPtr: |
15190 | return emitFlipIntAPSMemberPtr(I); |
15191 | case PT_Float: |
15192 | return emitFlipIntAPSFloat(I); |
15193 | } |
15194 | llvm_unreachable("invalid enum value" ); |
15195 | case PT_Bool: |
15196 | switch (T1) { |
15197 | case PT_Sint8: |
15198 | return emitFlipBoolSint8(I); |
15199 | case PT_Uint8: |
15200 | return emitFlipBoolUint8(I); |
15201 | case PT_Sint16: |
15202 | return emitFlipBoolSint16(I); |
15203 | case PT_Uint16: |
15204 | return emitFlipBoolUint16(I); |
15205 | case PT_Sint32: |
15206 | return emitFlipBoolSint32(I); |
15207 | case PT_Uint32: |
15208 | return emitFlipBoolUint32(I); |
15209 | case PT_Sint64: |
15210 | return emitFlipBoolSint64(I); |
15211 | case PT_Uint64: |
15212 | return emitFlipBoolUint64(I); |
15213 | case PT_IntAP: |
15214 | return emitFlipBoolIntAP(I); |
15215 | case PT_IntAPS: |
15216 | return emitFlipBoolIntAPS(I); |
15217 | case PT_Bool: |
15218 | return emitFlipBoolBool(I); |
15219 | case PT_FixedPoint: |
15220 | return emitFlipBoolFixedPoint(I); |
15221 | case PT_Ptr: |
15222 | return emitFlipBoolPtr(I); |
15223 | case PT_MemberPtr: |
15224 | return emitFlipBoolMemberPtr(I); |
15225 | case PT_Float: |
15226 | return emitFlipBoolFloat(I); |
15227 | } |
15228 | llvm_unreachable("invalid enum value" ); |
15229 | case PT_FixedPoint: |
15230 | switch (T1) { |
15231 | case PT_Sint8: |
15232 | return emitFlipFixedPointSint8(I); |
15233 | case PT_Uint8: |
15234 | return emitFlipFixedPointUint8(I); |
15235 | case PT_Sint16: |
15236 | return emitFlipFixedPointSint16(I); |
15237 | case PT_Uint16: |
15238 | return emitFlipFixedPointUint16(I); |
15239 | case PT_Sint32: |
15240 | return emitFlipFixedPointSint32(I); |
15241 | case PT_Uint32: |
15242 | return emitFlipFixedPointUint32(I); |
15243 | case PT_Sint64: |
15244 | return emitFlipFixedPointSint64(I); |
15245 | case PT_Uint64: |
15246 | return emitFlipFixedPointUint64(I); |
15247 | case PT_IntAP: |
15248 | return emitFlipFixedPointIntAP(I); |
15249 | case PT_IntAPS: |
15250 | return emitFlipFixedPointIntAPS(I); |
15251 | case PT_Bool: |
15252 | return emitFlipFixedPointBool(I); |
15253 | case PT_FixedPoint: |
15254 | return emitFlipFixedPointFixedPoint(I); |
15255 | case PT_Ptr: |
15256 | return emitFlipFixedPointPtr(I); |
15257 | case PT_MemberPtr: |
15258 | return emitFlipFixedPointMemberPtr(I); |
15259 | case PT_Float: |
15260 | return emitFlipFixedPointFloat(I); |
15261 | } |
15262 | llvm_unreachable("invalid enum value" ); |
15263 | case PT_Ptr: |
15264 | switch (T1) { |
15265 | case PT_Sint8: |
15266 | return emitFlipPtrSint8(I); |
15267 | case PT_Uint8: |
15268 | return emitFlipPtrUint8(I); |
15269 | case PT_Sint16: |
15270 | return emitFlipPtrSint16(I); |
15271 | case PT_Uint16: |
15272 | return emitFlipPtrUint16(I); |
15273 | case PT_Sint32: |
15274 | return emitFlipPtrSint32(I); |
15275 | case PT_Uint32: |
15276 | return emitFlipPtrUint32(I); |
15277 | case PT_Sint64: |
15278 | return emitFlipPtrSint64(I); |
15279 | case PT_Uint64: |
15280 | return emitFlipPtrUint64(I); |
15281 | case PT_IntAP: |
15282 | return emitFlipPtrIntAP(I); |
15283 | case PT_IntAPS: |
15284 | return emitFlipPtrIntAPS(I); |
15285 | case PT_Bool: |
15286 | return emitFlipPtrBool(I); |
15287 | case PT_FixedPoint: |
15288 | return emitFlipPtrFixedPoint(I); |
15289 | case PT_Ptr: |
15290 | return emitFlipPtrPtr(I); |
15291 | case PT_MemberPtr: |
15292 | return emitFlipPtrMemberPtr(I); |
15293 | case PT_Float: |
15294 | return emitFlipPtrFloat(I); |
15295 | } |
15296 | llvm_unreachable("invalid enum value" ); |
15297 | case PT_MemberPtr: |
15298 | switch (T1) { |
15299 | case PT_Sint8: |
15300 | return emitFlipMemberPtrSint8(I); |
15301 | case PT_Uint8: |
15302 | return emitFlipMemberPtrUint8(I); |
15303 | case PT_Sint16: |
15304 | return emitFlipMemberPtrSint16(I); |
15305 | case PT_Uint16: |
15306 | return emitFlipMemberPtrUint16(I); |
15307 | case PT_Sint32: |
15308 | return emitFlipMemberPtrSint32(I); |
15309 | case PT_Uint32: |
15310 | return emitFlipMemberPtrUint32(I); |
15311 | case PT_Sint64: |
15312 | return emitFlipMemberPtrSint64(I); |
15313 | case PT_Uint64: |
15314 | return emitFlipMemberPtrUint64(I); |
15315 | case PT_IntAP: |
15316 | return emitFlipMemberPtrIntAP(I); |
15317 | case PT_IntAPS: |
15318 | return emitFlipMemberPtrIntAPS(I); |
15319 | case PT_Bool: |
15320 | return emitFlipMemberPtrBool(I); |
15321 | case PT_FixedPoint: |
15322 | return emitFlipMemberPtrFixedPoint(I); |
15323 | case PT_Ptr: |
15324 | return emitFlipMemberPtrPtr(I); |
15325 | case PT_MemberPtr: |
15326 | return emitFlipMemberPtrMemberPtr(I); |
15327 | case PT_Float: |
15328 | return emitFlipMemberPtrFloat(I); |
15329 | } |
15330 | llvm_unreachable("invalid enum value" ); |
15331 | case PT_Float: |
15332 | switch (T1) { |
15333 | case PT_Sint8: |
15334 | return emitFlipFloatSint8(I); |
15335 | case PT_Uint8: |
15336 | return emitFlipFloatUint8(I); |
15337 | case PT_Sint16: |
15338 | return emitFlipFloatSint16(I); |
15339 | case PT_Uint16: |
15340 | return emitFlipFloatUint16(I); |
15341 | case PT_Sint32: |
15342 | return emitFlipFloatSint32(I); |
15343 | case PT_Uint32: |
15344 | return emitFlipFloatUint32(I); |
15345 | case PT_Sint64: |
15346 | return emitFlipFloatSint64(I); |
15347 | case PT_Uint64: |
15348 | return emitFlipFloatUint64(I); |
15349 | case PT_IntAP: |
15350 | return emitFlipFloatIntAP(I); |
15351 | case PT_IntAPS: |
15352 | return emitFlipFloatIntAPS(I); |
15353 | case PT_Bool: |
15354 | return emitFlipFloatBool(I); |
15355 | case PT_FixedPoint: |
15356 | return emitFlipFloatFixedPoint(I); |
15357 | case PT_Ptr: |
15358 | return emitFlipFloatPtr(I); |
15359 | case PT_MemberPtr: |
15360 | return emitFlipFloatMemberPtr(I); |
15361 | case PT_Float: |
15362 | return emitFlipFloatFloat(I); |
15363 | } |
15364 | llvm_unreachable("invalid enum value" ); |
15365 | } |
15366 | llvm_unreachable("invalid enum value" ); |
15367 | } |
15368 | #endif |
15369 | #ifdef GET_LINK_IMPL |
15370 | bool ByteCodeEmitter::emitFlipSint8Sint8(const SourceInfo &L) { |
15371 | return emitOp<>(OP_FlipSint8Sint8, L); |
15372 | } |
15373 | bool ByteCodeEmitter::emitFlipSint8Uint8(const SourceInfo &L) { |
15374 | return emitOp<>(OP_FlipSint8Uint8, L); |
15375 | } |
15376 | bool ByteCodeEmitter::emitFlipSint8Sint16(const SourceInfo &L) { |
15377 | return emitOp<>(OP_FlipSint8Sint16, L); |
15378 | } |
15379 | bool ByteCodeEmitter::emitFlipSint8Uint16(const SourceInfo &L) { |
15380 | return emitOp<>(OP_FlipSint8Uint16, L); |
15381 | } |
15382 | bool ByteCodeEmitter::emitFlipSint8Sint32(const SourceInfo &L) { |
15383 | return emitOp<>(OP_FlipSint8Sint32, L); |
15384 | } |
15385 | bool ByteCodeEmitter::emitFlipSint8Uint32(const SourceInfo &L) { |
15386 | return emitOp<>(OP_FlipSint8Uint32, L); |
15387 | } |
15388 | bool ByteCodeEmitter::emitFlipSint8Sint64(const SourceInfo &L) { |
15389 | return emitOp<>(OP_FlipSint8Sint64, L); |
15390 | } |
15391 | bool ByteCodeEmitter::emitFlipSint8Uint64(const SourceInfo &L) { |
15392 | return emitOp<>(OP_FlipSint8Uint64, L); |
15393 | } |
15394 | bool ByteCodeEmitter::emitFlipSint8IntAP(const SourceInfo &L) { |
15395 | return emitOp<>(OP_FlipSint8IntAP, L); |
15396 | } |
15397 | bool ByteCodeEmitter::emitFlipSint8IntAPS(const SourceInfo &L) { |
15398 | return emitOp<>(OP_FlipSint8IntAPS, L); |
15399 | } |
15400 | bool ByteCodeEmitter::emitFlipSint8Bool(const SourceInfo &L) { |
15401 | return emitOp<>(OP_FlipSint8Bool, L); |
15402 | } |
15403 | bool ByteCodeEmitter::emitFlipSint8FixedPoint(const SourceInfo &L) { |
15404 | return emitOp<>(OP_FlipSint8FixedPoint, L); |
15405 | } |
15406 | bool ByteCodeEmitter::emitFlipSint8Ptr(const SourceInfo &L) { |
15407 | return emitOp<>(OP_FlipSint8Ptr, L); |
15408 | } |
15409 | bool ByteCodeEmitter::emitFlipSint8MemberPtr(const SourceInfo &L) { |
15410 | return emitOp<>(OP_FlipSint8MemberPtr, L); |
15411 | } |
15412 | bool ByteCodeEmitter::emitFlipSint8Float(const SourceInfo &L) { |
15413 | return emitOp<>(OP_FlipSint8Float, L); |
15414 | } |
15415 | bool ByteCodeEmitter::emitFlipUint8Sint8(const SourceInfo &L) { |
15416 | return emitOp<>(OP_FlipUint8Sint8, L); |
15417 | } |
15418 | bool ByteCodeEmitter::emitFlipUint8Uint8(const SourceInfo &L) { |
15419 | return emitOp<>(OP_FlipUint8Uint8, L); |
15420 | } |
15421 | bool ByteCodeEmitter::emitFlipUint8Sint16(const SourceInfo &L) { |
15422 | return emitOp<>(OP_FlipUint8Sint16, L); |
15423 | } |
15424 | bool ByteCodeEmitter::emitFlipUint8Uint16(const SourceInfo &L) { |
15425 | return emitOp<>(OP_FlipUint8Uint16, L); |
15426 | } |
15427 | bool ByteCodeEmitter::emitFlipUint8Sint32(const SourceInfo &L) { |
15428 | return emitOp<>(OP_FlipUint8Sint32, L); |
15429 | } |
15430 | bool ByteCodeEmitter::emitFlipUint8Uint32(const SourceInfo &L) { |
15431 | return emitOp<>(OP_FlipUint8Uint32, L); |
15432 | } |
15433 | bool ByteCodeEmitter::emitFlipUint8Sint64(const SourceInfo &L) { |
15434 | return emitOp<>(OP_FlipUint8Sint64, L); |
15435 | } |
15436 | bool ByteCodeEmitter::emitFlipUint8Uint64(const SourceInfo &L) { |
15437 | return emitOp<>(OP_FlipUint8Uint64, L); |
15438 | } |
15439 | bool ByteCodeEmitter::emitFlipUint8IntAP(const SourceInfo &L) { |
15440 | return emitOp<>(OP_FlipUint8IntAP, L); |
15441 | } |
15442 | bool ByteCodeEmitter::emitFlipUint8IntAPS(const SourceInfo &L) { |
15443 | return emitOp<>(OP_FlipUint8IntAPS, L); |
15444 | } |
15445 | bool ByteCodeEmitter::emitFlipUint8Bool(const SourceInfo &L) { |
15446 | return emitOp<>(OP_FlipUint8Bool, L); |
15447 | } |
15448 | bool ByteCodeEmitter::emitFlipUint8FixedPoint(const SourceInfo &L) { |
15449 | return emitOp<>(OP_FlipUint8FixedPoint, L); |
15450 | } |
15451 | bool ByteCodeEmitter::emitFlipUint8Ptr(const SourceInfo &L) { |
15452 | return emitOp<>(OP_FlipUint8Ptr, L); |
15453 | } |
15454 | bool ByteCodeEmitter::emitFlipUint8MemberPtr(const SourceInfo &L) { |
15455 | return emitOp<>(OP_FlipUint8MemberPtr, L); |
15456 | } |
15457 | bool ByteCodeEmitter::emitFlipUint8Float(const SourceInfo &L) { |
15458 | return emitOp<>(OP_FlipUint8Float, L); |
15459 | } |
15460 | bool ByteCodeEmitter::emitFlipSint16Sint8(const SourceInfo &L) { |
15461 | return emitOp<>(OP_FlipSint16Sint8, L); |
15462 | } |
15463 | bool ByteCodeEmitter::emitFlipSint16Uint8(const SourceInfo &L) { |
15464 | return emitOp<>(OP_FlipSint16Uint8, L); |
15465 | } |
15466 | bool ByteCodeEmitter::emitFlipSint16Sint16(const SourceInfo &L) { |
15467 | return emitOp<>(OP_FlipSint16Sint16, L); |
15468 | } |
15469 | bool ByteCodeEmitter::emitFlipSint16Uint16(const SourceInfo &L) { |
15470 | return emitOp<>(OP_FlipSint16Uint16, L); |
15471 | } |
15472 | bool ByteCodeEmitter::emitFlipSint16Sint32(const SourceInfo &L) { |
15473 | return emitOp<>(OP_FlipSint16Sint32, L); |
15474 | } |
15475 | bool ByteCodeEmitter::emitFlipSint16Uint32(const SourceInfo &L) { |
15476 | return emitOp<>(OP_FlipSint16Uint32, L); |
15477 | } |
15478 | bool ByteCodeEmitter::emitFlipSint16Sint64(const SourceInfo &L) { |
15479 | return emitOp<>(OP_FlipSint16Sint64, L); |
15480 | } |
15481 | bool ByteCodeEmitter::emitFlipSint16Uint64(const SourceInfo &L) { |
15482 | return emitOp<>(OP_FlipSint16Uint64, L); |
15483 | } |
15484 | bool ByteCodeEmitter::emitFlipSint16IntAP(const SourceInfo &L) { |
15485 | return emitOp<>(OP_FlipSint16IntAP, L); |
15486 | } |
15487 | bool ByteCodeEmitter::emitFlipSint16IntAPS(const SourceInfo &L) { |
15488 | return emitOp<>(OP_FlipSint16IntAPS, L); |
15489 | } |
15490 | bool ByteCodeEmitter::emitFlipSint16Bool(const SourceInfo &L) { |
15491 | return emitOp<>(OP_FlipSint16Bool, L); |
15492 | } |
15493 | bool ByteCodeEmitter::emitFlipSint16FixedPoint(const SourceInfo &L) { |
15494 | return emitOp<>(OP_FlipSint16FixedPoint, L); |
15495 | } |
15496 | bool ByteCodeEmitter::emitFlipSint16Ptr(const SourceInfo &L) { |
15497 | return emitOp<>(OP_FlipSint16Ptr, L); |
15498 | } |
15499 | bool ByteCodeEmitter::emitFlipSint16MemberPtr(const SourceInfo &L) { |
15500 | return emitOp<>(OP_FlipSint16MemberPtr, L); |
15501 | } |
15502 | bool ByteCodeEmitter::emitFlipSint16Float(const SourceInfo &L) { |
15503 | return emitOp<>(OP_FlipSint16Float, L); |
15504 | } |
15505 | bool ByteCodeEmitter::emitFlipUint16Sint8(const SourceInfo &L) { |
15506 | return emitOp<>(OP_FlipUint16Sint8, L); |
15507 | } |
15508 | bool ByteCodeEmitter::emitFlipUint16Uint8(const SourceInfo &L) { |
15509 | return emitOp<>(OP_FlipUint16Uint8, L); |
15510 | } |
15511 | bool ByteCodeEmitter::emitFlipUint16Sint16(const SourceInfo &L) { |
15512 | return emitOp<>(OP_FlipUint16Sint16, L); |
15513 | } |
15514 | bool ByteCodeEmitter::emitFlipUint16Uint16(const SourceInfo &L) { |
15515 | return emitOp<>(OP_FlipUint16Uint16, L); |
15516 | } |
15517 | bool ByteCodeEmitter::emitFlipUint16Sint32(const SourceInfo &L) { |
15518 | return emitOp<>(OP_FlipUint16Sint32, L); |
15519 | } |
15520 | bool ByteCodeEmitter::emitFlipUint16Uint32(const SourceInfo &L) { |
15521 | return emitOp<>(OP_FlipUint16Uint32, L); |
15522 | } |
15523 | bool ByteCodeEmitter::emitFlipUint16Sint64(const SourceInfo &L) { |
15524 | return emitOp<>(OP_FlipUint16Sint64, L); |
15525 | } |
15526 | bool ByteCodeEmitter::emitFlipUint16Uint64(const SourceInfo &L) { |
15527 | return emitOp<>(OP_FlipUint16Uint64, L); |
15528 | } |
15529 | bool ByteCodeEmitter::emitFlipUint16IntAP(const SourceInfo &L) { |
15530 | return emitOp<>(OP_FlipUint16IntAP, L); |
15531 | } |
15532 | bool ByteCodeEmitter::emitFlipUint16IntAPS(const SourceInfo &L) { |
15533 | return emitOp<>(OP_FlipUint16IntAPS, L); |
15534 | } |
15535 | bool ByteCodeEmitter::emitFlipUint16Bool(const SourceInfo &L) { |
15536 | return emitOp<>(OP_FlipUint16Bool, L); |
15537 | } |
15538 | bool ByteCodeEmitter::emitFlipUint16FixedPoint(const SourceInfo &L) { |
15539 | return emitOp<>(OP_FlipUint16FixedPoint, L); |
15540 | } |
15541 | bool ByteCodeEmitter::emitFlipUint16Ptr(const SourceInfo &L) { |
15542 | return emitOp<>(OP_FlipUint16Ptr, L); |
15543 | } |
15544 | bool ByteCodeEmitter::emitFlipUint16MemberPtr(const SourceInfo &L) { |
15545 | return emitOp<>(OP_FlipUint16MemberPtr, L); |
15546 | } |
15547 | bool ByteCodeEmitter::emitFlipUint16Float(const SourceInfo &L) { |
15548 | return emitOp<>(OP_FlipUint16Float, L); |
15549 | } |
15550 | bool ByteCodeEmitter::emitFlipSint32Sint8(const SourceInfo &L) { |
15551 | return emitOp<>(OP_FlipSint32Sint8, L); |
15552 | } |
15553 | bool ByteCodeEmitter::emitFlipSint32Uint8(const SourceInfo &L) { |
15554 | return emitOp<>(OP_FlipSint32Uint8, L); |
15555 | } |
15556 | bool ByteCodeEmitter::emitFlipSint32Sint16(const SourceInfo &L) { |
15557 | return emitOp<>(OP_FlipSint32Sint16, L); |
15558 | } |
15559 | bool ByteCodeEmitter::emitFlipSint32Uint16(const SourceInfo &L) { |
15560 | return emitOp<>(OP_FlipSint32Uint16, L); |
15561 | } |
15562 | bool ByteCodeEmitter::emitFlipSint32Sint32(const SourceInfo &L) { |
15563 | return emitOp<>(OP_FlipSint32Sint32, L); |
15564 | } |
15565 | bool ByteCodeEmitter::emitFlipSint32Uint32(const SourceInfo &L) { |
15566 | return emitOp<>(OP_FlipSint32Uint32, L); |
15567 | } |
15568 | bool ByteCodeEmitter::emitFlipSint32Sint64(const SourceInfo &L) { |
15569 | return emitOp<>(OP_FlipSint32Sint64, L); |
15570 | } |
15571 | bool ByteCodeEmitter::emitFlipSint32Uint64(const SourceInfo &L) { |
15572 | return emitOp<>(OP_FlipSint32Uint64, L); |
15573 | } |
15574 | bool ByteCodeEmitter::emitFlipSint32IntAP(const SourceInfo &L) { |
15575 | return emitOp<>(OP_FlipSint32IntAP, L); |
15576 | } |
15577 | bool ByteCodeEmitter::emitFlipSint32IntAPS(const SourceInfo &L) { |
15578 | return emitOp<>(OP_FlipSint32IntAPS, L); |
15579 | } |
15580 | bool ByteCodeEmitter::emitFlipSint32Bool(const SourceInfo &L) { |
15581 | return emitOp<>(OP_FlipSint32Bool, L); |
15582 | } |
15583 | bool ByteCodeEmitter::emitFlipSint32FixedPoint(const SourceInfo &L) { |
15584 | return emitOp<>(OP_FlipSint32FixedPoint, L); |
15585 | } |
15586 | bool ByteCodeEmitter::emitFlipSint32Ptr(const SourceInfo &L) { |
15587 | return emitOp<>(OP_FlipSint32Ptr, L); |
15588 | } |
15589 | bool ByteCodeEmitter::emitFlipSint32MemberPtr(const SourceInfo &L) { |
15590 | return emitOp<>(OP_FlipSint32MemberPtr, L); |
15591 | } |
15592 | bool ByteCodeEmitter::emitFlipSint32Float(const SourceInfo &L) { |
15593 | return emitOp<>(OP_FlipSint32Float, L); |
15594 | } |
15595 | bool ByteCodeEmitter::emitFlipUint32Sint8(const SourceInfo &L) { |
15596 | return emitOp<>(OP_FlipUint32Sint8, L); |
15597 | } |
15598 | bool ByteCodeEmitter::emitFlipUint32Uint8(const SourceInfo &L) { |
15599 | return emitOp<>(OP_FlipUint32Uint8, L); |
15600 | } |
15601 | bool ByteCodeEmitter::emitFlipUint32Sint16(const SourceInfo &L) { |
15602 | return emitOp<>(OP_FlipUint32Sint16, L); |
15603 | } |
15604 | bool ByteCodeEmitter::emitFlipUint32Uint16(const SourceInfo &L) { |
15605 | return emitOp<>(OP_FlipUint32Uint16, L); |
15606 | } |
15607 | bool ByteCodeEmitter::emitFlipUint32Sint32(const SourceInfo &L) { |
15608 | return emitOp<>(OP_FlipUint32Sint32, L); |
15609 | } |
15610 | bool ByteCodeEmitter::emitFlipUint32Uint32(const SourceInfo &L) { |
15611 | return emitOp<>(OP_FlipUint32Uint32, L); |
15612 | } |
15613 | bool ByteCodeEmitter::emitFlipUint32Sint64(const SourceInfo &L) { |
15614 | return emitOp<>(OP_FlipUint32Sint64, L); |
15615 | } |
15616 | bool ByteCodeEmitter::emitFlipUint32Uint64(const SourceInfo &L) { |
15617 | return emitOp<>(OP_FlipUint32Uint64, L); |
15618 | } |
15619 | bool ByteCodeEmitter::emitFlipUint32IntAP(const SourceInfo &L) { |
15620 | return emitOp<>(OP_FlipUint32IntAP, L); |
15621 | } |
15622 | bool ByteCodeEmitter::emitFlipUint32IntAPS(const SourceInfo &L) { |
15623 | return emitOp<>(OP_FlipUint32IntAPS, L); |
15624 | } |
15625 | bool ByteCodeEmitter::emitFlipUint32Bool(const SourceInfo &L) { |
15626 | return emitOp<>(OP_FlipUint32Bool, L); |
15627 | } |
15628 | bool ByteCodeEmitter::emitFlipUint32FixedPoint(const SourceInfo &L) { |
15629 | return emitOp<>(OP_FlipUint32FixedPoint, L); |
15630 | } |
15631 | bool ByteCodeEmitter::emitFlipUint32Ptr(const SourceInfo &L) { |
15632 | return emitOp<>(OP_FlipUint32Ptr, L); |
15633 | } |
15634 | bool ByteCodeEmitter::emitFlipUint32MemberPtr(const SourceInfo &L) { |
15635 | return emitOp<>(OP_FlipUint32MemberPtr, L); |
15636 | } |
15637 | bool ByteCodeEmitter::emitFlipUint32Float(const SourceInfo &L) { |
15638 | return emitOp<>(OP_FlipUint32Float, L); |
15639 | } |
15640 | bool ByteCodeEmitter::emitFlipSint64Sint8(const SourceInfo &L) { |
15641 | return emitOp<>(OP_FlipSint64Sint8, L); |
15642 | } |
15643 | bool ByteCodeEmitter::emitFlipSint64Uint8(const SourceInfo &L) { |
15644 | return emitOp<>(OP_FlipSint64Uint8, L); |
15645 | } |
15646 | bool ByteCodeEmitter::emitFlipSint64Sint16(const SourceInfo &L) { |
15647 | return emitOp<>(OP_FlipSint64Sint16, L); |
15648 | } |
15649 | bool ByteCodeEmitter::emitFlipSint64Uint16(const SourceInfo &L) { |
15650 | return emitOp<>(OP_FlipSint64Uint16, L); |
15651 | } |
15652 | bool ByteCodeEmitter::emitFlipSint64Sint32(const SourceInfo &L) { |
15653 | return emitOp<>(OP_FlipSint64Sint32, L); |
15654 | } |
15655 | bool ByteCodeEmitter::emitFlipSint64Uint32(const SourceInfo &L) { |
15656 | return emitOp<>(OP_FlipSint64Uint32, L); |
15657 | } |
15658 | bool ByteCodeEmitter::emitFlipSint64Sint64(const SourceInfo &L) { |
15659 | return emitOp<>(OP_FlipSint64Sint64, L); |
15660 | } |
15661 | bool ByteCodeEmitter::emitFlipSint64Uint64(const SourceInfo &L) { |
15662 | return emitOp<>(OP_FlipSint64Uint64, L); |
15663 | } |
15664 | bool ByteCodeEmitter::emitFlipSint64IntAP(const SourceInfo &L) { |
15665 | return emitOp<>(OP_FlipSint64IntAP, L); |
15666 | } |
15667 | bool ByteCodeEmitter::emitFlipSint64IntAPS(const SourceInfo &L) { |
15668 | return emitOp<>(OP_FlipSint64IntAPS, L); |
15669 | } |
15670 | bool ByteCodeEmitter::emitFlipSint64Bool(const SourceInfo &L) { |
15671 | return emitOp<>(OP_FlipSint64Bool, L); |
15672 | } |
15673 | bool ByteCodeEmitter::emitFlipSint64FixedPoint(const SourceInfo &L) { |
15674 | return emitOp<>(OP_FlipSint64FixedPoint, L); |
15675 | } |
15676 | bool ByteCodeEmitter::emitFlipSint64Ptr(const SourceInfo &L) { |
15677 | return emitOp<>(OP_FlipSint64Ptr, L); |
15678 | } |
15679 | bool ByteCodeEmitter::emitFlipSint64MemberPtr(const SourceInfo &L) { |
15680 | return emitOp<>(OP_FlipSint64MemberPtr, L); |
15681 | } |
15682 | bool ByteCodeEmitter::emitFlipSint64Float(const SourceInfo &L) { |
15683 | return emitOp<>(OP_FlipSint64Float, L); |
15684 | } |
15685 | bool ByteCodeEmitter::emitFlipUint64Sint8(const SourceInfo &L) { |
15686 | return emitOp<>(OP_FlipUint64Sint8, L); |
15687 | } |
15688 | bool ByteCodeEmitter::emitFlipUint64Uint8(const SourceInfo &L) { |
15689 | return emitOp<>(OP_FlipUint64Uint8, L); |
15690 | } |
15691 | bool ByteCodeEmitter::emitFlipUint64Sint16(const SourceInfo &L) { |
15692 | return emitOp<>(OP_FlipUint64Sint16, L); |
15693 | } |
15694 | bool ByteCodeEmitter::emitFlipUint64Uint16(const SourceInfo &L) { |
15695 | return emitOp<>(OP_FlipUint64Uint16, L); |
15696 | } |
15697 | bool ByteCodeEmitter::emitFlipUint64Sint32(const SourceInfo &L) { |
15698 | return emitOp<>(OP_FlipUint64Sint32, L); |
15699 | } |
15700 | bool ByteCodeEmitter::emitFlipUint64Uint32(const SourceInfo &L) { |
15701 | return emitOp<>(OP_FlipUint64Uint32, L); |
15702 | } |
15703 | bool ByteCodeEmitter::emitFlipUint64Sint64(const SourceInfo &L) { |
15704 | return emitOp<>(OP_FlipUint64Sint64, L); |
15705 | } |
15706 | bool ByteCodeEmitter::emitFlipUint64Uint64(const SourceInfo &L) { |
15707 | return emitOp<>(OP_FlipUint64Uint64, L); |
15708 | } |
15709 | bool ByteCodeEmitter::emitFlipUint64IntAP(const SourceInfo &L) { |
15710 | return emitOp<>(OP_FlipUint64IntAP, L); |
15711 | } |
15712 | bool ByteCodeEmitter::emitFlipUint64IntAPS(const SourceInfo &L) { |
15713 | return emitOp<>(OP_FlipUint64IntAPS, L); |
15714 | } |
15715 | bool ByteCodeEmitter::emitFlipUint64Bool(const SourceInfo &L) { |
15716 | return emitOp<>(OP_FlipUint64Bool, L); |
15717 | } |
15718 | bool ByteCodeEmitter::emitFlipUint64FixedPoint(const SourceInfo &L) { |
15719 | return emitOp<>(OP_FlipUint64FixedPoint, L); |
15720 | } |
15721 | bool ByteCodeEmitter::emitFlipUint64Ptr(const SourceInfo &L) { |
15722 | return emitOp<>(OP_FlipUint64Ptr, L); |
15723 | } |
15724 | bool ByteCodeEmitter::emitFlipUint64MemberPtr(const SourceInfo &L) { |
15725 | return emitOp<>(OP_FlipUint64MemberPtr, L); |
15726 | } |
15727 | bool ByteCodeEmitter::emitFlipUint64Float(const SourceInfo &L) { |
15728 | return emitOp<>(OP_FlipUint64Float, L); |
15729 | } |
15730 | bool ByteCodeEmitter::emitFlipIntAPSint8(const SourceInfo &L) { |
15731 | return emitOp<>(OP_FlipIntAPSint8, L); |
15732 | } |
15733 | bool ByteCodeEmitter::emitFlipIntAPUint8(const SourceInfo &L) { |
15734 | return emitOp<>(OP_FlipIntAPUint8, L); |
15735 | } |
15736 | bool ByteCodeEmitter::emitFlipIntAPSint16(const SourceInfo &L) { |
15737 | return emitOp<>(OP_FlipIntAPSint16, L); |
15738 | } |
15739 | bool ByteCodeEmitter::emitFlipIntAPUint16(const SourceInfo &L) { |
15740 | return emitOp<>(OP_FlipIntAPUint16, L); |
15741 | } |
15742 | bool ByteCodeEmitter::emitFlipIntAPSint32(const SourceInfo &L) { |
15743 | return emitOp<>(OP_FlipIntAPSint32, L); |
15744 | } |
15745 | bool ByteCodeEmitter::emitFlipIntAPUint32(const SourceInfo &L) { |
15746 | return emitOp<>(OP_FlipIntAPUint32, L); |
15747 | } |
15748 | bool ByteCodeEmitter::emitFlipIntAPSint64(const SourceInfo &L) { |
15749 | return emitOp<>(OP_FlipIntAPSint64, L); |
15750 | } |
15751 | bool ByteCodeEmitter::emitFlipIntAPUint64(const SourceInfo &L) { |
15752 | return emitOp<>(OP_FlipIntAPUint64, L); |
15753 | } |
15754 | bool ByteCodeEmitter::emitFlipIntAPIntAP(const SourceInfo &L) { |
15755 | return emitOp<>(OP_FlipIntAPIntAP, L); |
15756 | } |
15757 | bool ByteCodeEmitter::emitFlipIntAPIntAPS(const SourceInfo &L) { |
15758 | return emitOp<>(OP_FlipIntAPIntAPS, L); |
15759 | } |
15760 | bool ByteCodeEmitter::emitFlipIntAPBool(const SourceInfo &L) { |
15761 | return emitOp<>(OP_FlipIntAPBool, L); |
15762 | } |
15763 | bool ByteCodeEmitter::emitFlipIntAPFixedPoint(const SourceInfo &L) { |
15764 | return emitOp<>(OP_FlipIntAPFixedPoint, L); |
15765 | } |
15766 | bool ByteCodeEmitter::emitFlipIntAPPtr(const SourceInfo &L) { |
15767 | return emitOp<>(OP_FlipIntAPPtr, L); |
15768 | } |
15769 | bool ByteCodeEmitter::emitFlipIntAPMemberPtr(const SourceInfo &L) { |
15770 | return emitOp<>(OP_FlipIntAPMemberPtr, L); |
15771 | } |
15772 | bool ByteCodeEmitter::emitFlipIntAPFloat(const SourceInfo &L) { |
15773 | return emitOp<>(OP_FlipIntAPFloat, L); |
15774 | } |
15775 | bool ByteCodeEmitter::emitFlipIntAPSSint8(const SourceInfo &L) { |
15776 | return emitOp<>(OP_FlipIntAPSSint8, L); |
15777 | } |
15778 | bool ByteCodeEmitter::emitFlipIntAPSUint8(const SourceInfo &L) { |
15779 | return emitOp<>(OP_FlipIntAPSUint8, L); |
15780 | } |
15781 | bool ByteCodeEmitter::emitFlipIntAPSSint16(const SourceInfo &L) { |
15782 | return emitOp<>(OP_FlipIntAPSSint16, L); |
15783 | } |
15784 | bool ByteCodeEmitter::emitFlipIntAPSUint16(const SourceInfo &L) { |
15785 | return emitOp<>(OP_FlipIntAPSUint16, L); |
15786 | } |
15787 | bool ByteCodeEmitter::emitFlipIntAPSSint32(const SourceInfo &L) { |
15788 | return emitOp<>(OP_FlipIntAPSSint32, L); |
15789 | } |
15790 | bool ByteCodeEmitter::emitFlipIntAPSUint32(const SourceInfo &L) { |
15791 | return emitOp<>(OP_FlipIntAPSUint32, L); |
15792 | } |
15793 | bool ByteCodeEmitter::emitFlipIntAPSSint64(const SourceInfo &L) { |
15794 | return emitOp<>(OP_FlipIntAPSSint64, L); |
15795 | } |
15796 | bool ByteCodeEmitter::emitFlipIntAPSUint64(const SourceInfo &L) { |
15797 | return emitOp<>(OP_FlipIntAPSUint64, L); |
15798 | } |
15799 | bool ByteCodeEmitter::emitFlipIntAPSIntAP(const SourceInfo &L) { |
15800 | return emitOp<>(OP_FlipIntAPSIntAP, L); |
15801 | } |
15802 | bool ByteCodeEmitter::emitFlipIntAPSIntAPS(const SourceInfo &L) { |
15803 | return emitOp<>(OP_FlipIntAPSIntAPS, L); |
15804 | } |
15805 | bool ByteCodeEmitter::emitFlipIntAPSBool(const SourceInfo &L) { |
15806 | return emitOp<>(OP_FlipIntAPSBool, L); |
15807 | } |
15808 | bool ByteCodeEmitter::emitFlipIntAPSFixedPoint(const SourceInfo &L) { |
15809 | return emitOp<>(OP_FlipIntAPSFixedPoint, L); |
15810 | } |
15811 | bool ByteCodeEmitter::emitFlipIntAPSPtr(const SourceInfo &L) { |
15812 | return emitOp<>(OP_FlipIntAPSPtr, L); |
15813 | } |
15814 | bool ByteCodeEmitter::emitFlipIntAPSMemberPtr(const SourceInfo &L) { |
15815 | return emitOp<>(OP_FlipIntAPSMemberPtr, L); |
15816 | } |
15817 | bool ByteCodeEmitter::emitFlipIntAPSFloat(const SourceInfo &L) { |
15818 | return emitOp<>(OP_FlipIntAPSFloat, L); |
15819 | } |
15820 | bool ByteCodeEmitter::emitFlipBoolSint8(const SourceInfo &L) { |
15821 | return emitOp<>(OP_FlipBoolSint8, L); |
15822 | } |
15823 | bool ByteCodeEmitter::emitFlipBoolUint8(const SourceInfo &L) { |
15824 | return emitOp<>(OP_FlipBoolUint8, L); |
15825 | } |
15826 | bool ByteCodeEmitter::emitFlipBoolSint16(const SourceInfo &L) { |
15827 | return emitOp<>(OP_FlipBoolSint16, L); |
15828 | } |
15829 | bool ByteCodeEmitter::emitFlipBoolUint16(const SourceInfo &L) { |
15830 | return emitOp<>(OP_FlipBoolUint16, L); |
15831 | } |
15832 | bool ByteCodeEmitter::emitFlipBoolSint32(const SourceInfo &L) { |
15833 | return emitOp<>(OP_FlipBoolSint32, L); |
15834 | } |
15835 | bool ByteCodeEmitter::emitFlipBoolUint32(const SourceInfo &L) { |
15836 | return emitOp<>(OP_FlipBoolUint32, L); |
15837 | } |
15838 | bool ByteCodeEmitter::emitFlipBoolSint64(const SourceInfo &L) { |
15839 | return emitOp<>(OP_FlipBoolSint64, L); |
15840 | } |
15841 | bool ByteCodeEmitter::emitFlipBoolUint64(const SourceInfo &L) { |
15842 | return emitOp<>(OP_FlipBoolUint64, L); |
15843 | } |
15844 | bool ByteCodeEmitter::emitFlipBoolIntAP(const SourceInfo &L) { |
15845 | return emitOp<>(OP_FlipBoolIntAP, L); |
15846 | } |
15847 | bool ByteCodeEmitter::emitFlipBoolIntAPS(const SourceInfo &L) { |
15848 | return emitOp<>(OP_FlipBoolIntAPS, L); |
15849 | } |
15850 | bool ByteCodeEmitter::emitFlipBoolBool(const SourceInfo &L) { |
15851 | return emitOp<>(OP_FlipBoolBool, L); |
15852 | } |
15853 | bool ByteCodeEmitter::emitFlipBoolFixedPoint(const SourceInfo &L) { |
15854 | return emitOp<>(OP_FlipBoolFixedPoint, L); |
15855 | } |
15856 | bool ByteCodeEmitter::emitFlipBoolPtr(const SourceInfo &L) { |
15857 | return emitOp<>(OP_FlipBoolPtr, L); |
15858 | } |
15859 | bool ByteCodeEmitter::emitFlipBoolMemberPtr(const SourceInfo &L) { |
15860 | return emitOp<>(OP_FlipBoolMemberPtr, L); |
15861 | } |
15862 | bool ByteCodeEmitter::emitFlipBoolFloat(const SourceInfo &L) { |
15863 | return emitOp<>(OP_FlipBoolFloat, L); |
15864 | } |
15865 | bool ByteCodeEmitter::emitFlipFixedPointSint8(const SourceInfo &L) { |
15866 | return emitOp<>(OP_FlipFixedPointSint8, L); |
15867 | } |
15868 | bool ByteCodeEmitter::emitFlipFixedPointUint8(const SourceInfo &L) { |
15869 | return emitOp<>(OP_FlipFixedPointUint8, L); |
15870 | } |
15871 | bool ByteCodeEmitter::emitFlipFixedPointSint16(const SourceInfo &L) { |
15872 | return emitOp<>(OP_FlipFixedPointSint16, L); |
15873 | } |
15874 | bool ByteCodeEmitter::emitFlipFixedPointUint16(const SourceInfo &L) { |
15875 | return emitOp<>(OP_FlipFixedPointUint16, L); |
15876 | } |
15877 | bool ByteCodeEmitter::emitFlipFixedPointSint32(const SourceInfo &L) { |
15878 | return emitOp<>(OP_FlipFixedPointSint32, L); |
15879 | } |
15880 | bool ByteCodeEmitter::emitFlipFixedPointUint32(const SourceInfo &L) { |
15881 | return emitOp<>(OP_FlipFixedPointUint32, L); |
15882 | } |
15883 | bool ByteCodeEmitter::emitFlipFixedPointSint64(const SourceInfo &L) { |
15884 | return emitOp<>(OP_FlipFixedPointSint64, L); |
15885 | } |
15886 | bool ByteCodeEmitter::emitFlipFixedPointUint64(const SourceInfo &L) { |
15887 | return emitOp<>(OP_FlipFixedPointUint64, L); |
15888 | } |
15889 | bool ByteCodeEmitter::emitFlipFixedPointIntAP(const SourceInfo &L) { |
15890 | return emitOp<>(OP_FlipFixedPointIntAP, L); |
15891 | } |
15892 | bool ByteCodeEmitter::emitFlipFixedPointIntAPS(const SourceInfo &L) { |
15893 | return emitOp<>(OP_FlipFixedPointIntAPS, L); |
15894 | } |
15895 | bool ByteCodeEmitter::emitFlipFixedPointBool(const SourceInfo &L) { |
15896 | return emitOp<>(OP_FlipFixedPointBool, L); |
15897 | } |
15898 | bool ByteCodeEmitter::emitFlipFixedPointFixedPoint(const SourceInfo &L) { |
15899 | return emitOp<>(OP_FlipFixedPointFixedPoint, L); |
15900 | } |
15901 | bool ByteCodeEmitter::emitFlipFixedPointPtr(const SourceInfo &L) { |
15902 | return emitOp<>(OP_FlipFixedPointPtr, L); |
15903 | } |
15904 | bool ByteCodeEmitter::emitFlipFixedPointMemberPtr(const SourceInfo &L) { |
15905 | return emitOp<>(OP_FlipFixedPointMemberPtr, L); |
15906 | } |
15907 | bool ByteCodeEmitter::emitFlipFixedPointFloat(const SourceInfo &L) { |
15908 | return emitOp<>(OP_FlipFixedPointFloat, L); |
15909 | } |
15910 | bool ByteCodeEmitter::emitFlipPtrSint8(const SourceInfo &L) { |
15911 | return emitOp<>(OP_FlipPtrSint8, L); |
15912 | } |
15913 | bool ByteCodeEmitter::emitFlipPtrUint8(const SourceInfo &L) { |
15914 | return emitOp<>(OP_FlipPtrUint8, L); |
15915 | } |
15916 | bool ByteCodeEmitter::emitFlipPtrSint16(const SourceInfo &L) { |
15917 | return emitOp<>(OP_FlipPtrSint16, L); |
15918 | } |
15919 | bool ByteCodeEmitter::emitFlipPtrUint16(const SourceInfo &L) { |
15920 | return emitOp<>(OP_FlipPtrUint16, L); |
15921 | } |
15922 | bool ByteCodeEmitter::emitFlipPtrSint32(const SourceInfo &L) { |
15923 | return emitOp<>(OP_FlipPtrSint32, L); |
15924 | } |
15925 | bool ByteCodeEmitter::emitFlipPtrUint32(const SourceInfo &L) { |
15926 | return emitOp<>(OP_FlipPtrUint32, L); |
15927 | } |
15928 | bool ByteCodeEmitter::emitFlipPtrSint64(const SourceInfo &L) { |
15929 | return emitOp<>(OP_FlipPtrSint64, L); |
15930 | } |
15931 | bool ByteCodeEmitter::emitFlipPtrUint64(const SourceInfo &L) { |
15932 | return emitOp<>(OP_FlipPtrUint64, L); |
15933 | } |
15934 | bool ByteCodeEmitter::emitFlipPtrIntAP(const SourceInfo &L) { |
15935 | return emitOp<>(OP_FlipPtrIntAP, L); |
15936 | } |
15937 | bool ByteCodeEmitter::emitFlipPtrIntAPS(const SourceInfo &L) { |
15938 | return emitOp<>(OP_FlipPtrIntAPS, L); |
15939 | } |
15940 | bool ByteCodeEmitter::emitFlipPtrBool(const SourceInfo &L) { |
15941 | return emitOp<>(OP_FlipPtrBool, L); |
15942 | } |
15943 | bool ByteCodeEmitter::emitFlipPtrFixedPoint(const SourceInfo &L) { |
15944 | return emitOp<>(OP_FlipPtrFixedPoint, L); |
15945 | } |
15946 | bool ByteCodeEmitter::emitFlipPtrPtr(const SourceInfo &L) { |
15947 | return emitOp<>(OP_FlipPtrPtr, L); |
15948 | } |
15949 | bool ByteCodeEmitter::emitFlipPtrMemberPtr(const SourceInfo &L) { |
15950 | return emitOp<>(OP_FlipPtrMemberPtr, L); |
15951 | } |
15952 | bool ByteCodeEmitter::emitFlipPtrFloat(const SourceInfo &L) { |
15953 | return emitOp<>(OP_FlipPtrFloat, L); |
15954 | } |
15955 | bool ByteCodeEmitter::emitFlipMemberPtrSint8(const SourceInfo &L) { |
15956 | return emitOp<>(OP_FlipMemberPtrSint8, L); |
15957 | } |
15958 | bool ByteCodeEmitter::emitFlipMemberPtrUint8(const SourceInfo &L) { |
15959 | return emitOp<>(OP_FlipMemberPtrUint8, L); |
15960 | } |
15961 | bool ByteCodeEmitter::emitFlipMemberPtrSint16(const SourceInfo &L) { |
15962 | return emitOp<>(OP_FlipMemberPtrSint16, L); |
15963 | } |
15964 | bool ByteCodeEmitter::emitFlipMemberPtrUint16(const SourceInfo &L) { |
15965 | return emitOp<>(OP_FlipMemberPtrUint16, L); |
15966 | } |
15967 | bool ByteCodeEmitter::emitFlipMemberPtrSint32(const SourceInfo &L) { |
15968 | return emitOp<>(OP_FlipMemberPtrSint32, L); |
15969 | } |
15970 | bool ByteCodeEmitter::emitFlipMemberPtrUint32(const SourceInfo &L) { |
15971 | return emitOp<>(OP_FlipMemberPtrUint32, L); |
15972 | } |
15973 | bool ByteCodeEmitter::emitFlipMemberPtrSint64(const SourceInfo &L) { |
15974 | return emitOp<>(OP_FlipMemberPtrSint64, L); |
15975 | } |
15976 | bool ByteCodeEmitter::emitFlipMemberPtrUint64(const SourceInfo &L) { |
15977 | return emitOp<>(OP_FlipMemberPtrUint64, L); |
15978 | } |
15979 | bool ByteCodeEmitter::emitFlipMemberPtrIntAP(const SourceInfo &L) { |
15980 | return emitOp<>(OP_FlipMemberPtrIntAP, L); |
15981 | } |
15982 | bool ByteCodeEmitter::emitFlipMemberPtrIntAPS(const SourceInfo &L) { |
15983 | return emitOp<>(OP_FlipMemberPtrIntAPS, L); |
15984 | } |
15985 | bool ByteCodeEmitter::emitFlipMemberPtrBool(const SourceInfo &L) { |
15986 | return emitOp<>(OP_FlipMemberPtrBool, L); |
15987 | } |
15988 | bool ByteCodeEmitter::emitFlipMemberPtrFixedPoint(const SourceInfo &L) { |
15989 | return emitOp<>(OP_FlipMemberPtrFixedPoint, L); |
15990 | } |
15991 | bool ByteCodeEmitter::emitFlipMemberPtrPtr(const SourceInfo &L) { |
15992 | return emitOp<>(OP_FlipMemberPtrPtr, L); |
15993 | } |
15994 | bool ByteCodeEmitter::emitFlipMemberPtrMemberPtr(const SourceInfo &L) { |
15995 | return emitOp<>(OP_FlipMemberPtrMemberPtr, L); |
15996 | } |
15997 | bool ByteCodeEmitter::emitFlipMemberPtrFloat(const SourceInfo &L) { |
15998 | return emitOp<>(OP_FlipMemberPtrFloat, L); |
15999 | } |
16000 | bool ByteCodeEmitter::emitFlipFloatSint8(const SourceInfo &L) { |
16001 | return emitOp<>(OP_FlipFloatSint8, L); |
16002 | } |
16003 | bool ByteCodeEmitter::emitFlipFloatUint8(const SourceInfo &L) { |
16004 | return emitOp<>(OP_FlipFloatUint8, L); |
16005 | } |
16006 | bool ByteCodeEmitter::emitFlipFloatSint16(const SourceInfo &L) { |
16007 | return emitOp<>(OP_FlipFloatSint16, L); |
16008 | } |
16009 | bool ByteCodeEmitter::emitFlipFloatUint16(const SourceInfo &L) { |
16010 | return emitOp<>(OP_FlipFloatUint16, L); |
16011 | } |
16012 | bool ByteCodeEmitter::emitFlipFloatSint32(const SourceInfo &L) { |
16013 | return emitOp<>(OP_FlipFloatSint32, L); |
16014 | } |
16015 | bool ByteCodeEmitter::emitFlipFloatUint32(const SourceInfo &L) { |
16016 | return emitOp<>(OP_FlipFloatUint32, L); |
16017 | } |
16018 | bool ByteCodeEmitter::emitFlipFloatSint64(const SourceInfo &L) { |
16019 | return emitOp<>(OP_FlipFloatSint64, L); |
16020 | } |
16021 | bool ByteCodeEmitter::emitFlipFloatUint64(const SourceInfo &L) { |
16022 | return emitOp<>(OP_FlipFloatUint64, L); |
16023 | } |
16024 | bool ByteCodeEmitter::emitFlipFloatIntAP(const SourceInfo &L) { |
16025 | return emitOp<>(OP_FlipFloatIntAP, L); |
16026 | } |
16027 | bool ByteCodeEmitter::emitFlipFloatIntAPS(const SourceInfo &L) { |
16028 | return emitOp<>(OP_FlipFloatIntAPS, L); |
16029 | } |
16030 | bool ByteCodeEmitter::emitFlipFloatBool(const SourceInfo &L) { |
16031 | return emitOp<>(OP_FlipFloatBool, L); |
16032 | } |
16033 | bool ByteCodeEmitter::emitFlipFloatFixedPoint(const SourceInfo &L) { |
16034 | return emitOp<>(OP_FlipFloatFixedPoint, L); |
16035 | } |
16036 | bool ByteCodeEmitter::emitFlipFloatPtr(const SourceInfo &L) { |
16037 | return emitOp<>(OP_FlipFloatPtr, L); |
16038 | } |
16039 | bool ByteCodeEmitter::emitFlipFloatMemberPtr(const SourceInfo &L) { |
16040 | return emitOp<>(OP_FlipFloatMemberPtr, L); |
16041 | } |
16042 | bool ByteCodeEmitter::emitFlipFloatFloat(const SourceInfo &L) { |
16043 | return emitOp<>(OP_FlipFloatFloat, L); |
16044 | } |
16045 | #endif |
16046 | #ifdef GET_EVAL_IMPL |
16047 | bool EvalEmitter::emitFlipSint8Sint8(const SourceInfo &L) { |
16048 | if (!isActive()) return true; |
16049 | CurrentSource = L; |
16050 | return Flip<PT_Sint8, PT_Sint8>(S, OpPC); |
16051 | } |
16052 | bool EvalEmitter::emitFlipSint8Uint8(const SourceInfo &L) { |
16053 | if (!isActive()) return true; |
16054 | CurrentSource = L; |
16055 | return Flip<PT_Sint8, PT_Uint8>(S, OpPC); |
16056 | } |
16057 | bool EvalEmitter::emitFlipSint8Sint16(const SourceInfo &L) { |
16058 | if (!isActive()) return true; |
16059 | CurrentSource = L; |
16060 | return Flip<PT_Sint8, PT_Sint16>(S, OpPC); |
16061 | } |
16062 | bool EvalEmitter::emitFlipSint8Uint16(const SourceInfo &L) { |
16063 | if (!isActive()) return true; |
16064 | CurrentSource = L; |
16065 | return Flip<PT_Sint8, PT_Uint16>(S, OpPC); |
16066 | } |
16067 | bool EvalEmitter::emitFlipSint8Sint32(const SourceInfo &L) { |
16068 | if (!isActive()) return true; |
16069 | CurrentSource = L; |
16070 | return Flip<PT_Sint8, PT_Sint32>(S, OpPC); |
16071 | } |
16072 | bool EvalEmitter::emitFlipSint8Uint32(const SourceInfo &L) { |
16073 | if (!isActive()) return true; |
16074 | CurrentSource = L; |
16075 | return Flip<PT_Sint8, PT_Uint32>(S, OpPC); |
16076 | } |
16077 | bool EvalEmitter::emitFlipSint8Sint64(const SourceInfo &L) { |
16078 | if (!isActive()) return true; |
16079 | CurrentSource = L; |
16080 | return Flip<PT_Sint8, PT_Sint64>(S, OpPC); |
16081 | } |
16082 | bool EvalEmitter::emitFlipSint8Uint64(const SourceInfo &L) { |
16083 | if (!isActive()) return true; |
16084 | CurrentSource = L; |
16085 | return Flip<PT_Sint8, PT_Uint64>(S, OpPC); |
16086 | } |
16087 | bool EvalEmitter::emitFlipSint8IntAP(const SourceInfo &L) { |
16088 | if (!isActive()) return true; |
16089 | CurrentSource = L; |
16090 | return Flip<PT_Sint8, PT_IntAP>(S, OpPC); |
16091 | } |
16092 | bool EvalEmitter::emitFlipSint8IntAPS(const SourceInfo &L) { |
16093 | if (!isActive()) return true; |
16094 | CurrentSource = L; |
16095 | return Flip<PT_Sint8, PT_IntAPS>(S, OpPC); |
16096 | } |
16097 | bool EvalEmitter::emitFlipSint8Bool(const SourceInfo &L) { |
16098 | if (!isActive()) return true; |
16099 | CurrentSource = L; |
16100 | return Flip<PT_Sint8, PT_Bool>(S, OpPC); |
16101 | } |
16102 | bool EvalEmitter::emitFlipSint8FixedPoint(const SourceInfo &L) { |
16103 | if (!isActive()) return true; |
16104 | CurrentSource = L; |
16105 | return Flip<PT_Sint8, PT_FixedPoint>(S, OpPC); |
16106 | } |
16107 | bool EvalEmitter::emitFlipSint8Ptr(const SourceInfo &L) { |
16108 | if (!isActive()) return true; |
16109 | CurrentSource = L; |
16110 | return Flip<PT_Sint8, PT_Ptr>(S, OpPC); |
16111 | } |
16112 | bool EvalEmitter::emitFlipSint8MemberPtr(const SourceInfo &L) { |
16113 | if (!isActive()) return true; |
16114 | CurrentSource = L; |
16115 | return Flip<PT_Sint8, PT_MemberPtr>(S, OpPC); |
16116 | } |
16117 | bool EvalEmitter::emitFlipSint8Float(const SourceInfo &L) { |
16118 | if (!isActive()) return true; |
16119 | CurrentSource = L; |
16120 | return Flip<PT_Sint8, PT_Float>(S, OpPC); |
16121 | } |
16122 | bool EvalEmitter::emitFlipUint8Sint8(const SourceInfo &L) { |
16123 | if (!isActive()) return true; |
16124 | CurrentSource = L; |
16125 | return Flip<PT_Uint8, PT_Sint8>(S, OpPC); |
16126 | } |
16127 | bool EvalEmitter::emitFlipUint8Uint8(const SourceInfo &L) { |
16128 | if (!isActive()) return true; |
16129 | CurrentSource = L; |
16130 | return Flip<PT_Uint8, PT_Uint8>(S, OpPC); |
16131 | } |
16132 | bool EvalEmitter::emitFlipUint8Sint16(const SourceInfo &L) { |
16133 | if (!isActive()) return true; |
16134 | CurrentSource = L; |
16135 | return Flip<PT_Uint8, PT_Sint16>(S, OpPC); |
16136 | } |
16137 | bool EvalEmitter::emitFlipUint8Uint16(const SourceInfo &L) { |
16138 | if (!isActive()) return true; |
16139 | CurrentSource = L; |
16140 | return Flip<PT_Uint8, PT_Uint16>(S, OpPC); |
16141 | } |
16142 | bool EvalEmitter::emitFlipUint8Sint32(const SourceInfo &L) { |
16143 | if (!isActive()) return true; |
16144 | CurrentSource = L; |
16145 | return Flip<PT_Uint8, PT_Sint32>(S, OpPC); |
16146 | } |
16147 | bool EvalEmitter::emitFlipUint8Uint32(const SourceInfo &L) { |
16148 | if (!isActive()) return true; |
16149 | CurrentSource = L; |
16150 | return Flip<PT_Uint8, PT_Uint32>(S, OpPC); |
16151 | } |
16152 | bool EvalEmitter::emitFlipUint8Sint64(const SourceInfo &L) { |
16153 | if (!isActive()) return true; |
16154 | CurrentSource = L; |
16155 | return Flip<PT_Uint8, PT_Sint64>(S, OpPC); |
16156 | } |
16157 | bool EvalEmitter::emitFlipUint8Uint64(const SourceInfo &L) { |
16158 | if (!isActive()) return true; |
16159 | CurrentSource = L; |
16160 | return Flip<PT_Uint8, PT_Uint64>(S, OpPC); |
16161 | } |
16162 | bool EvalEmitter::emitFlipUint8IntAP(const SourceInfo &L) { |
16163 | if (!isActive()) return true; |
16164 | CurrentSource = L; |
16165 | return Flip<PT_Uint8, PT_IntAP>(S, OpPC); |
16166 | } |
16167 | bool EvalEmitter::emitFlipUint8IntAPS(const SourceInfo &L) { |
16168 | if (!isActive()) return true; |
16169 | CurrentSource = L; |
16170 | return Flip<PT_Uint8, PT_IntAPS>(S, OpPC); |
16171 | } |
16172 | bool EvalEmitter::emitFlipUint8Bool(const SourceInfo &L) { |
16173 | if (!isActive()) return true; |
16174 | CurrentSource = L; |
16175 | return Flip<PT_Uint8, PT_Bool>(S, OpPC); |
16176 | } |
16177 | bool EvalEmitter::emitFlipUint8FixedPoint(const SourceInfo &L) { |
16178 | if (!isActive()) return true; |
16179 | CurrentSource = L; |
16180 | return Flip<PT_Uint8, PT_FixedPoint>(S, OpPC); |
16181 | } |
16182 | bool EvalEmitter::emitFlipUint8Ptr(const SourceInfo &L) { |
16183 | if (!isActive()) return true; |
16184 | CurrentSource = L; |
16185 | return Flip<PT_Uint8, PT_Ptr>(S, OpPC); |
16186 | } |
16187 | bool EvalEmitter::emitFlipUint8MemberPtr(const SourceInfo &L) { |
16188 | if (!isActive()) return true; |
16189 | CurrentSource = L; |
16190 | return Flip<PT_Uint8, PT_MemberPtr>(S, OpPC); |
16191 | } |
16192 | bool EvalEmitter::emitFlipUint8Float(const SourceInfo &L) { |
16193 | if (!isActive()) return true; |
16194 | CurrentSource = L; |
16195 | return Flip<PT_Uint8, PT_Float>(S, OpPC); |
16196 | } |
16197 | bool EvalEmitter::emitFlipSint16Sint8(const SourceInfo &L) { |
16198 | if (!isActive()) return true; |
16199 | CurrentSource = L; |
16200 | return Flip<PT_Sint16, PT_Sint8>(S, OpPC); |
16201 | } |
16202 | bool EvalEmitter::emitFlipSint16Uint8(const SourceInfo &L) { |
16203 | if (!isActive()) return true; |
16204 | CurrentSource = L; |
16205 | return Flip<PT_Sint16, PT_Uint8>(S, OpPC); |
16206 | } |
16207 | bool EvalEmitter::emitFlipSint16Sint16(const SourceInfo &L) { |
16208 | if (!isActive()) return true; |
16209 | CurrentSource = L; |
16210 | return Flip<PT_Sint16, PT_Sint16>(S, OpPC); |
16211 | } |
16212 | bool EvalEmitter::emitFlipSint16Uint16(const SourceInfo &L) { |
16213 | if (!isActive()) return true; |
16214 | CurrentSource = L; |
16215 | return Flip<PT_Sint16, PT_Uint16>(S, OpPC); |
16216 | } |
16217 | bool EvalEmitter::emitFlipSint16Sint32(const SourceInfo &L) { |
16218 | if (!isActive()) return true; |
16219 | CurrentSource = L; |
16220 | return Flip<PT_Sint16, PT_Sint32>(S, OpPC); |
16221 | } |
16222 | bool EvalEmitter::emitFlipSint16Uint32(const SourceInfo &L) { |
16223 | if (!isActive()) return true; |
16224 | CurrentSource = L; |
16225 | return Flip<PT_Sint16, PT_Uint32>(S, OpPC); |
16226 | } |
16227 | bool EvalEmitter::emitFlipSint16Sint64(const SourceInfo &L) { |
16228 | if (!isActive()) return true; |
16229 | CurrentSource = L; |
16230 | return Flip<PT_Sint16, PT_Sint64>(S, OpPC); |
16231 | } |
16232 | bool EvalEmitter::emitFlipSint16Uint64(const SourceInfo &L) { |
16233 | if (!isActive()) return true; |
16234 | CurrentSource = L; |
16235 | return Flip<PT_Sint16, PT_Uint64>(S, OpPC); |
16236 | } |
16237 | bool EvalEmitter::emitFlipSint16IntAP(const SourceInfo &L) { |
16238 | if (!isActive()) return true; |
16239 | CurrentSource = L; |
16240 | return Flip<PT_Sint16, PT_IntAP>(S, OpPC); |
16241 | } |
16242 | bool EvalEmitter::emitFlipSint16IntAPS(const SourceInfo &L) { |
16243 | if (!isActive()) return true; |
16244 | CurrentSource = L; |
16245 | return Flip<PT_Sint16, PT_IntAPS>(S, OpPC); |
16246 | } |
16247 | bool EvalEmitter::emitFlipSint16Bool(const SourceInfo &L) { |
16248 | if (!isActive()) return true; |
16249 | CurrentSource = L; |
16250 | return Flip<PT_Sint16, PT_Bool>(S, OpPC); |
16251 | } |
16252 | bool EvalEmitter::emitFlipSint16FixedPoint(const SourceInfo &L) { |
16253 | if (!isActive()) return true; |
16254 | CurrentSource = L; |
16255 | return Flip<PT_Sint16, PT_FixedPoint>(S, OpPC); |
16256 | } |
16257 | bool EvalEmitter::emitFlipSint16Ptr(const SourceInfo &L) { |
16258 | if (!isActive()) return true; |
16259 | CurrentSource = L; |
16260 | return Flip<PT_Sint16, PT_Ptr>(S, OpPC); |
16261 | } |
16262 | bool EvalEmitter::emitFlipSint16MemberPtr(const SourceInfo &L) { |
16263 | if (!isActive()) return true; |
16264 | CurrentSource = L; |
16265 | return Flip<PT_Sint16, PT_MemberPtr>(S, OpPC); |
16266 | } |
16267 | bool EvalEmitter::emitFlipSint16Float(const SourceInfo &L) { |
16268 | if (!isActive()) return true; |
16269 | CurrentSource = L; |
16270 | return Flip<PT_Sint16, PT_Float>(S, OpPC); |
16271 | } |
16272 | bool EvalEmitter::emitFlipUint16Sint8(const SourceInfo &L) { |
16273 | if (!isActive()) return true; |
16274 | CurrentSource = L; |
16275 | return Flip<PT_Uint16, PT_Sint8>(S, OpPC); |
16276 | } |
16277 | bool EvalEmitter::emitFlipUint16Uint8(const SourceInfo &L) { |
16278 | if (!isActive()) return true; |
16279 | CurrentSource = L; |
16280 | return Flip<PT_Uint16, PT_Uint8>(S, OpPC); |
16281 | } |
16282 | bool EvalEmitter::emitFlipUint16Sint16(const SourceInfo &L) { |
16283 | if (!isActive()) return true; |
16284 | CurrentSource = L; |
16285 | return Flip<PT_Uint16, PT_Sint16>(S, OpPC); |
16286 | } |
16287 | bool EvalEmitter::emitFlipUint16Uint16(const SourceInfo &L) { |
16288 | if (!isActive()) return true; |
16289 | CurrentSource = L; |
16290 | return Flip<PT_Uint16, PT_Uint16>(S, OpPC); |
16291 | } |
16292 | bool EvalEmitter::emitFlipUint16Sint32(const SourceInfo &L) { |
16293 | if (!isActive()) return true; |
16294 | CurrentSource = L; |
16295 | return Flip<PT_Uint16, PT_Sint32>(S, OpPC); |
16296 | } |
16297 | bool EvalEmitter::emitFlipUint16Uint32(const SourceInfo &L) { |
16298 | if (!isActive()) return true; |
16299 | CurrentSource = L; |
16300 | return Flip<PT_Uint16, PT_Uint32>(S, OpPC); |
16301 | } |
16302 | bool EvalEmitter::emitFlipUint16Sint64(const SourceInfo &L) { |
16303 | if (!isActive()) return true; |
16304 | CurrentSource = L; |
16305 | return Flip<PT_Uint16, PT_Sint64>(S, OpPC); |
16306 | } |
16307 | bool EvalEmitter::emitFlipUint16Uint64(const SourceInfo &L) { |
16308 | if (!isActive()) return true; |
16309 | CurrentSource = L; |
16310 | return Flip<PT_Uint16, PT_Uint64>(S, OpPC); |
16311 | } |
16312 | bool EvalEmitter::emitFlipUint16IntAP(const SourceInfo &L) { |
16313 | if (!isActive()) return true; |
16314 | CurrentSource = L; |
16315 | return Flip<PT_Uint16, PT_IntAP>(S, OpPC); |
16316 | } |
16317 | bool EvalEmitter::emitFlipUint16IntAPS(const SourceInfo &L) { |
16318 | if (!isActive()) return true; |
16319 | CurrentSource = L; |
16320 | return Flip<PT_Uint16, PT_IntAPS>(S, OpPC); |
16321 | } |
16322 | bool EvalEmitter::emitFlipUint16Bool(const SourceInfo &L) { |
16323 | if (!isActive()) return true; |
16324 | CurrentSource = L; |
16325 | return Flip<PT_Uint16, PT_Bool>(S, OpPC); |
16326 | } |
16327 | bool EvalEmitter::emitFlipUint16FixedPoint(const SourceInfo &L) { |
16328 | if (!isActive()) return true; |
16329 | CurrentSource = L; |
16330 | return Flip<PT_Uint16, PT_FixedPoint>(S, OpPC); |
16331 | } |
16332 | bool EvalEmitter::emitFlipUint16Ptr(const SourceInfo &L) { |
16333 | if (!isActive()) return true; |
16334 | CurrentSource = L; |
16335 | return Flip<PT_Uint16, PT_Ptr>(S, OpPC); |
16336 | } |
16337 | bool EvalEmitter::emitFlipUint16MemberPtr(const SourceInfo &L) { |
16338 | if (!isActive()) return true; |
16339 | CurrentSource = L; |
16340 | return Flip<PT_Uint16, PT_MemberPtr>(S, OpPC); |
16341 | } |
16342 | bool EvalEmitter::emitFlipUint16Float(const SourceInfo &L) { |
16343 | if (!isActive()) return true; |
16344 | CurrentSource = L; |
16345 | return Flip<PT_Uint16, PT_Float>(S, OpPC); |
16346 | } |
16347 | bool EvalEmitter::emitFlipSint32Sint8(const SourceInfo &L) { |
16348 | if (!isActive()) return true; |
16349 | CurrentSource = L; |
16350 | return Flip<PT_Sint32, PT_Sint8>(S, OpPC); |
16351 | } |
16352 | bool EvalEmitter::emitFlipSint32Uint8(const SourceInfo &L) { |
16353 | if (!isActive()) return true; |
16354 | CurrentSource = L; |
16355 | return Flip<PT_Sint32, PT_Uint8>(S, OpPC); |
16356 | } |
16357 | bool EvalEmitter::emitFlipSint32Sint16(const SourceInfo &L) { |
16358 | if (!isActive()) return true; |
16359 | CurrentSource = L; |
16360 | return Flip<PT_Sint32, PT_Sint16>(S, OpPC); |
16361 | } |
16362 | bool EvalEmitter::emitFlipSint32Uint16(const SourceInfo &L) { |
16363 | if (!isActive()) return true; |
16364 | CurrentSource = L; |
16365 | return Flip<PT_Sint32, PT_Uint16>(S, OpPC); |
16366 | } |
16367 | bool EvalEmitter::emitFlipSint32Sint32(const SourceInfo &L) { |
16368 | if (!isActive()) return true; |
16369 | CurrentSource = L; |
16370 | return Flip<PT_Sint32, PT_Sint32>(S, OpPC); |
16371 | } |
16372 | bool EvalEmitter::emitFlipSint32Uint32(const SourceInfo &L) { |
16373 | if (!isActive()) return true; |
16374 | CurrentSource = L; |
16375 | return Flip<PT_Sint32, PT_Uint32>(S, OpPC); |
16376 | } |
16377 | bool EvalEmitter::emitFlipSint32Sint64(const SourceInfo &L) { |
16378 | if (!isActive()) return true; |
16379 | CurrentSource = L; |
16380 | return Flip<PT_Sint32, PT_Sint64>(S, OpPC); |
16381 | } |
16382 | bool EvalEmitter::emitFlipSint32Uint64(const SourceInfo &L) { |
16383 | if (!isActive()) return true; |
16384 | CurrentSource = L; |
16385 | return Flip<PT_Sint32, PT_Uint64>(S, OpPC); |
16386 | } |
16387 | bool EvalEmitter::emitFlipSint32IntAP(const SourceInfo &L) { |
16388 | if (!isActive()) return true; |
16389 | CurrentSource = L; |
16390 | return Flip<PT_Sint32, PT_IntAP>(S, OpPC); |
16391 | } |
16392 | bool EvalEmitter::emitFlipSint32IntAPS(const SourceInfo &L) { |
16393 | if (!isActive()) return true; |
16394 | CurrentSource = L; |
16395 | return Flip<PT_Sint32, PT_IntAPS>(S, OpPC); |
16396 | } |
16397 | bool EvalEmitter::emitFlipSint32Bool(const SourceInfo &L) { |
16398 | if (!isActive()) return true; |
16399 | CurrentSource = L; |
16400 | return Flip<PT_Sint32, PT_Bool>(S, OpPC); |
16401 | } |
16402 | bool EvalEmitter::emitFlipSint32FixedPoint(const SourceInfo &L) { |
16403 | if (!isActive()) return true; |
16404 | CurrentSource = L; |
16405 | return Flip<PT_Sint32, PT_FixedPoint>(S, OpPC); |
16406 | } |
16407 | bool EvalEmitter::emitFlipSint32Ptr(const SourceInfo &L) { |
16408 | if (!isActive()) return true; |
16409 | CurrentSource = L; |
16410 | return Flip<PT_Sint32, PT_Ptr>(S, OpPC); |
16411 | } |
16412 | bool EvalEmitter::emitFlipSint32MemberPtr(const SourceInfo &L) { |
16413 | if (!isActive()) return true; |
16414 | CurrentSource = L; |
16415 | return Flip<PT_Sint32, PT_MemberPtr>(S, OpPC); |
16416 | } |
16417 | bool EvalEmitter::emitFlipSint32Float(const SourceInfo &L) { |
16418 | if (!isActive()) return true; |
16419 | CurrentSource = L; |
16420 | return Flip<PT_Sint32, PT_Float>(S, OpPC); |
16421 | } |
16422 | bool EvalEmitter::emitFlipUint32Sint8(const SourceInfo &L) { |
16423 | if (!isActive()) return true; |
16424 | CurrentSource = L; |
16425 | return Flip<PT_Uint32, PT_Sint8>(S, OpPC); |
16426 | } |
16427 | bool EvalEmitter::emitFlipUint32Uint8(const SourceInfo &L) { |
16428 | if (!isActive()) return true; |
16429 | CurrentSource = L; |
16430 | return Flip<PT_Uint32, PT_Uint8>(S, OpPC); |
16431 | } |
16432 | bool EvalEmitter::emitFlipUint32Sint16(const SourceInfo &L) { |
16433 | if (!isActive()) return true; |
16434 | CurrentSource = L; |
16435 | return Flip<PT_Uint32, PT_Sint16>(S, OpPC); |
16436 | } |
16437 | bool EvalEmitter::emitFlipUint32Uint16(const SourceInfo &L) { |
16438 | if (!isActive()) return true; |
16439 | CurrentSource = L; |
16440 | return Flip<PT_Uint32, PT_Uint16>(S, OpPC); |
16441 | } |
16442 | bool EvalEmitter::emitFlipUint32Sint32(const SourceInfo &L) { |
16443 | if (!isActive()) return true; |
16444 | CurrentSource = L; |
16445 | return Flip<PT_Uint32, PT_Sint32>(S, OpPC); |
16446 | } |
16447 | bool EvalEmitter::emitFlipUint32Uint32(const SourceInfo &L) { |
16448 | if (!isActive()) return true; |
16449 | CurrentSource = L; |
16450 | return Flip<PT_Uint32, PT_Uint32>(S, OpPC); |
16451 | } |
16452 | bool EvalEmitter::emitFlipUint32Sint64(const SourceInfo &L) { |
16453 | if (!isActive()) return true; |
16454 | CurrentSource = L; |
16455 | return Flip<PT_Uint32, PT_Sint64>(S, OpPC); |
16456 | } |
16457 | bool EvalEmitter::emitFlipUint32Uint64(const SourceInfo &L) { |
16458 | if (!isActive()) return true; |
16459 | CurrentSource = L; |
16460 | return Flip<PT_Uint32, PT_Uint64>(S, OpPC); |
16461 | } |
16462 | bool EvalEmitter::emitFlipUint32IntAP(const SourceInfo &L) { |
16463 | if (!isActive()) return true; |
16464 | CurrentSource = L; |
16465 | return Flip<PT_Uint32, PT_IntAP>(S, OpPC); |
16466 | } |
16467 | bool EvalEmitter::emitFlipUint32IntAPS(const SourceInfo &L) { |
16468 | if (!isActive()) return true; |
16469 | CurrentSource = L; |
16470 | return Flip<PT_Uint32, PT_IntAPS>(S, OpPC); |
16471 | } |
16472 | bool EvalEmitter::emitFlipUint32Bool(const SourceInfo &L) { |
16473 | if (!isActive()) return true; |
16474 | CurrentSource = L; |
16475 | return Flip<PT_Uint32, PT_Bool>(S, OpPC); |
16476 | } |
16477 | bool EvalEmitter::emitFlipUint32FixedPoint(const SourceInfo &L) { |
16478 | if (!isActive()) return true; |
16479 | CurrentSource = L; |
16480 | return Flip<PT_Uint32, PT_FixedPoint>(S, OpPC); |
16481 | } |
16482 | bool EvalEmitter::emitFlipUint32Ptr(const SourceInfo &L) { |
16483 | if (!isActive()) return true; |
16484 | CurrentSource = L; |
16485 | return Flip<PT_Uint32, PT_Ptr>(S, OpPC); |
16486 | } |
16487 | bool EvalEmitter::emitFlipUint32MemberPtr(const SourceInfo &L) { |
16488 | if (!isActive()) return true; |
16489 | CurrentSource = L; |
16490 | return Flip<PT_Uint32, PT_MemberPtr>(S, OpPC); |
16491 | } |
16492 | bool EvalEmitter::emitFlipUint32Float(const SourceInfo &L) { |
16493 | if (!isActive()) return true; |
16494 | CurrentSource = L; |
16495 | return Flip<PT_Uint32, PT_Float>(S, OpPC); |
16496 | } |
16497 | bool EvalEmitter::emitFlipSint64Sint8(const SourceInfo &L) { |
16498 | if (!isActive()) return true; |
16499 | CurrentSource = L; |
16500 | return Flip<PT_Sint64, PT_Sint8>(S, OpPC); |
16501 | } |
16502 | bool EvalEmitter::emitFlipSint64Uint8(const SourceInfo &L) { |
16503 | if (!isActive()) return true; |
16504 | CurrentSource = L; |
16505 | return Flip<PT_Sint64, PT_Uint8>(S, OpPC); |
16506 | } |
16507 | bool EvalEmitter::emitFlipSint64Sint16(const SourceInfo &L) { |
16508 | if (!isActive()) return true; |
16509 | CurrentSource = L; |
16510 | return Flip<PT_Sint64, PT_Sint16>(S, OpPC); |
16511 | } |
16512 | bool EvalEmitter::emitFlipSint64Uint16(const SourceInfo &L) { |
16513 | if (!isActive()) return true; |
16514 | CurrentSource = L; |
16515 | return Flip<PT_Sint64, PT_Uint16>(S, OpPC); |
16516 | } |
16517 | bool EvalEmitter::emitFlipSint64Sint32(const SourceInfo &L) { |
16518 | if (!isActive()) return true; |
16519 | CurrentSource = L; |
16520 | return Flip<PT_Sint64, PT_Sint32>(S, OpPC); |
16521 | } |
16522 | bool EvalEmitter::emitFlipSint64Uint32(const SourceInfo &L) { |
16523 | if (!isActive()) return true; |
16524 | CurrentSource = L; |
16525 | return Flip<PT_Sint64, PT_Uint32>(S, OpPC); |
16526 | } |
16527 | bool EvalEmitter::emitFlipSint64Sint64(const SourceInfo &L) { |
16528 | if (!isActive()) return true; |
16529 | CurrentSource = L; |
16530 | return Flip<PT_Sint64, PT_Sint64>(S, OpPC); |
16531 | } |
16532 | bool EvalEmitter::emitFlipSint64Uint64(const SourceInfo &L) { |
16533 | if (!isActive()) return true; |
16534 | CurrentSource = L; |
16535 | return Flip<PT_Sint64, PT_Uint64>(S, OpPC); |
16536 | } |
16537 | bool EvalEmitter::emitFlipSint64IntAP(const SourceInfo &L) { |
16538 | if (!isActive()) return true; |
16539 | CurrentSource = L; |
16540 | return Flip<PT_Sint64, PT_IntAP>(S, OpPC); |
16541 | } |
16542 | bool EvalEmitter::emitFlipSint64IntAPS(const SourceInfo &L) { |
16543 | if (!isActive()) return true; |
16544 | CurrentSource = L; |
16545 | return Flip<PT_Sint64, PT_IntAPS>(S, OpPC); |
16546 | } |
16547 | bool EvalEmitter::emitFlipSint64Bool(const SourceInfo &L) { |
16548 | if (!isActive()) return true; |
16549 | CurrentSource = L; |
16550 | return Flip<PT_Sint64, PT_Bool>(S, OpPC); |
16551 | } |
16552 | bool EvalEmitter::emitFlipSint64FixedPoint(const SourceInfo &L) { |
16553 | if (!isActive()) return true; |
16554 | CurrentSource = L; |
16555 | return Flip<PT_Sint64, PT_FixedPoint>(S, OpPC); |
16556 | } |
16557 | bool EvalEmitter::emitFlipSint64Ptr(const SourceInfo &L) { |
16558 | if (!isActive()) return true; |
16559 | CurrentSource = L; |
16560 | return Flip<PT_Sint64, PT_Ptr>(S, OpPC); |
16561 | } |
16562 | bool EvalEmitter::emitFlipSint64MemberPtr(const SourceInfo &L) { |
16563 | if (!isActive()) return true; |
16564 | CurrentSource = L; |
16565 | return Flip<PT_Sint64, PT_MemberPtr>(S, OpPC); |
16566 | } |
16567 | bool EvalEmitter::emitFlipSint64Float(const SourceInfo &L) { |
16568 | if (!isActive()) return true; |
16569 | CurrentSource = L; |
16570 | return Flip<PT_Sint64, PT_Float>(S, OpPC); |
16571 | } |
16572 | bool EvalEmitter::emitFlipUint64Sint8(const SourceInfo &L) { |
16573 | if (!isActive()) return true; |
16574 | CurrentSource = L; |
16575 | return Flip<PT_Uint64, PT_Sint8>(S, OpPC); |
16576 | } |
16577 | bool EvalEmitter::emitFlipUint64Uint8(const SourceInfo &L) { |
16578 | if (!isActive()) return true; |
16579 | CurrentSource = L; |
16580 | return Flip<PT_Uint64, PT_Uint8>(S, OpPC); |
16581 | } |
16582 | bool EvalEmitter::emitFlipUint64Sint16(const SourceInfo &L) { |
16583 | if (!isActive()) return true; |
16584 | CurrentSource = L; |
16585 | return Flip<PT_Uint64, PT_Sint16>(S, OpPC); |
16586 | } |
16587 | bool EvalEmitter::emitFlipUint64Uint16(const SourceInfo &L) { |
16588 | if (!isActive()) return true; |
16589 | CurrentSource = L; |
16590 | return Flip<PT_Uint64, PT_Uint16>(S, OpPC); |
16591 | } |
16592 | bool EvalEmitter::emitFlipUint64Sint32(const SourceInfo &L) { |
16593 | if (!isActive()) return true; |
16594 | CurrentSource = L; |
16595 | return Flip<PT_Uint64, PT_Sint32>(S, OpPC); |
16596 | } |
16597 | bool EvalEmitter::emitFlipUint64Uint32(const SourceInfo &L) { |
16598 | if (!isActive()) return true; |
16599 | CurrentSource = L; |
16600 | return Flip<PT_Uint64, PT_Uint32>(S, OpPC); |
16601 | } |
16602 | bool EvalEmitter::emitFlipUint64Sint64(const SourceInfo &L) { |
16603 | if (!isActive()) return true; |
16604 | CurrentSource = L; |
16605 | return Flip<PT_Uint64, PT_Sint64>(S, OpPC); |
16606 | } |
16607 | bool EvalEmitter::emitFlipUint64Uint64(const SourceInfo &L) { |
16608 | if (!isActive()) return true; |
16609 | CurrentSource = L; |
16610 | return Flip<PT_Uint64, PT_Uint64>(S, OpPC); |
16611 | } |
16612 | bool EvalEmitter::emitFlipUint64IntAP(const SourceInfo &L) { |
16613 | if (!isActive()) return true; |
16614 | CurrentSource = L; |
16615 | return Flip<PT_Uint64, PT_IntAP>(S, OpPC); |
16616 | } |
16617 | bool EvalEmitter::emitFlipUint64IntAPS(const SourceInfo &L) { |
16618 | if (!isActive()) return true; |
16619 | CurrentSource = L; |
16620 | return Flip<PT_Uint64, PT_IntAPS>(S, OpPC); |
16621 | } |
16622 | bool EvalEmitter::emitFlipUint64Bool(const SourceInfo &L) { |
16623 | if (!isActive()) return true; |
16624 | CurrentSource = L; |
16625 | return Flip<PT_Uint64, PT_Bool>(S, OpPC); |
16626 | } |
16627 | bool EvalEmitter::emitFlipUint64FixedPoint(const SourceInfo &L) { |
16628 | if (!isActive()) return true; |
16629 | CurrentSource = L; |
16630 | return Flip<PT_Uint64, PT_FixedPoint>(S, OpPC); |
16631 | } |
16632 | bool EvalEmitter::emitFlipUint64Ptr(const SourceInfo &L) { |
16633 | if (!isActive()) return true; |
16634 | CurrentSource = L; |
16635 | return Flip<PT_Uint64, PT_Ptr>(S, OpPC); |
16636 | } |
16637 | bool EvalEmitter::emitFlipUint64MemberPtr(const SourceInfo &L) { |
16638 | if (!isActive()) return true; |
16639 | CurrentSource = L; |
16640 | return Flip<PT_Uint64, PT_MemberPtr>(S, OpPC); |
16641 | } |
16642 | bool EvalEmitter::emitFlipUint64Float(const SourceInfo &L) { |
16643 | if (!isActive()) return true; |
16644 | CurrentSource = L; |
16645 | return Flip<PT_Uint64, PT_Float>(S, OpPC); |
16646 | } |
16647 | bool EvalEmitter::emitFlipIntAPSint8(const SourceInfo &L) { |
16648 | if (!isActive()) return true; |
16649 | CurrentSource = L; |
16650 | return Flip<PT_IntAP, PT_Sint8>(S, OpPC); |
16651 | } |
16652 | bool EvalEmitter::emitFlipIntAPUint8(const SourceInfo &L) { |
16653 | if (!isActive()) return true; |
16654 | CurrentSource = L; |
16655 | return Flip<PT_IntAP, PT_Uint8>(S, OpPC); |
16656 | } |
16657 | bool EvalEmitter::emitFlipIntAPSint16(const SourceInfo &L) { |
16658 | if (!isActive()) return true; |
16659 | CurrentSource = L; |
16660 | return Flip<PT_IntAP, PT_Sint16>(S, OpPC); |
16661 | } |
16662 | bool EvalEmitter::emitFlipIntAPUint16(const SourceInfo &L) { |
16663 | if (!isActive()) return true; |
16664 | CurrentSource = L; |
16665 | return Flip<PT_IntAP, PT_Uint16>(S, OpPC); |
16666 | } |
16667 | bool EvalEmitter::emitFlipIntAPSint32(const SourceInfo &L) { |
16668 | if (!isActive()) return true; |
16669 | CurrentSource = L; |
16670 | return Flip<PT_IntAP, PT_Sint32>(S, OpPC); |
16671 | } |
16672 | bool EvalEmitter::emitFlipIntAPUint32(const SourceInfo &L) { |
16673 | if (!isActive()) return true; |
16674 | CurrentSource = L; |
16675 | return Flip<PT_IntAP, PT_Uint32>(S, OpPC); |
16676 | } |
16677 | bool EvalEmitter::emitFlipIntAPSint64(const SourceInfo &L) { |
16678 | if (!isActive()) return true; |
16679 | CurrentSource = L; |
16680 | return Flip<PT_IntAP, PT_Sint64>(S, OpPC); |
16681 | } |
16682 | bool EvalEmitter::emitFlipIntAPUint64(const SourceInfo &L) { |
16683 | if (!isActive()) return true; |
16684 | CurrentSource = L; |
16685 | return Flip<PT_IntAP, PT_Uint64>(S, OpPC); |
16686 | } |
16687 | bool EvalEmitter::emitFlipIntAPIntAP(const SourceInfo &L) { |
16688 | if (!isActive()) return true; |
16689 | CurrentSource = L; |
16690 | return Flip<PT_IntAP, PT_IntAP>(S, OpPC); |
16691 | } |
16692 | bool EvalEmitter::emitFlipIntAPIntAPS(const SourceInfo &L) { |
16693 | if (!isActive()) return true; |
16694 | CurrentSource = L; |
16695 | return Flip<PT_IntAP, PT_IntAPS>(S, OpPC); |
16696 | } |
16697 | bool EvalEmitter::emitFlipIntAPBool(const SourceInfo &L) { |
16698 | if (!isActive()) return true; |
16699 | CurrentSource = L; |
16700 | return Flip<PT_IntAP, PT_Bool>(S, OpPC); |
16701 | } |
16702 | bool EvalEmitter::emitFlipIntAPFixedPoint(const SourceInfo &L) { |
16703 | if (!isActive()) return true; |
16704 | CurrentSource = L; |
16705 | return Flip<PT_IntAP, PT_FixedPoint>(S, OpPC); |
16706 | } |
16707 | bool EvalEmitter::emitFlipIntAPPtr(const SourceInfo &L) { |
16708 | if (!isActive()) return true; |
16709 | CurrentSource = L; |
16710 | return Flip<PT_IntAP, PT_Ptr>(S, OpPC); |
16711 | } |
16712 | bool EvalEmitter::emitFlipIntAPMemberPtr(const SourceInfo &L) { |
16713 | if (!isActive()) return true; |
16714 | CurrentSource = L; |
16715 | return Flip<PT_IntAP, PT_MemberPtr>(S, OpPC); |
16716 | } |
16717 | bool EvalEmitter::emitFlipIntAPFloat(const SourceInfo &L) { |
16718 | if (!isActive()) return true; |
16719 | CurrentSource = L; |
16720 | return Flip<PT_IntAP, PT_Float>(S, OpPC); |
16721 | } |
16722 | bool EvalEmitter::emitFlipIntAPSSint8(const SourceInfo &L) { |
16723 | if (!isActive()) return true; |
16724 | CurrentSource = L; |
16725 | return Flip<PT_IntAPS, PT_Sint8>(S, OpPC); |
16726 | } |
16727 | bool EvalEmitter::emitFlipIntAPSUint8(const SourceInfo &L) { |
16728 | if (!isActive()) return true; |
16729 | CurrentSource = L; |
16730 | return Flip<PT_IntAPS, PT_Uint8>(S, OpPC); |
16731 | } |
16732 | bool EvalEmitter::emitFlipIntAPSSint16(const SourceInfo &L) { |
16733 | if (!isActive()) return true; |
16734 | CurrentSource = L; |
16735 | return Flip<PT_IntAPS, PT_Sint16>(S, OpPC); |
16736 | } |
16737 | bool EvalEmitter::emitFlipIntAPSUint16(const SourceInfo &L) { |
16738 | if (!isActive()) return true; |
16739 | CurrentSource = L; |
16740 | return Flip<PT_IntAPS, PT_Uint16>(S, OpPC); |
16741 | } |
16742 | bool EvalEmitter::emitFlipIntAPSSint32(const SourceInfo &L) { |
16743 | if (!isActive()) return true; |
16744 | CurrentSource = L; |
16745 | return Flip<PT_IntAPS, PT_Sint32>(S, OpPC); |
16746 | } |
16747 | bool EvalEmitter::emitFlipIntAPSUint32(const SourceInfo &L) { |
16748 | if (!isActive()) return true; |
16749 | CurrentSource = L; |
16750 | return Flip<PT_IntAPS, PT_Uint32>(S, OpPC); |
16751 | } |
16752 | bool EvalEmitter::emitFlipIntAPSSint64(const SourceInfo &L) { |
16753 | if (!isActive()) return true; |
16754 | CurrentSource = L; |
16755 | return Flip<PT_IntAPS, PT_Sint64>(S, OpPC); |
16756 | } |
16757 | bool EvalEmitter::emitFlipIntAPSUint64(const SourceInfo &L) { |
16758 | if (!isActive()) return true; |
16759 | CurrentSource = L; |
16760 | return Flip<PT_IntAPS, PT_Uint64>(S, OpPC); |
16761 | } |
16762 | bool EvalEmitter::emitFlipIntAPSIntAP(const SourceInfo &L) { |
16763 | if (!isActive()) return true; |
16764 | CurrentSource = L; |
16765 | return Flip<PT_IntAPS, PT_IntAP>(S, OpPC); |
16766 | } |
16767 | bool EvalEmitter::emitFlipIntAPSIntAPS(const SourceInfo &L) { |
16768 | if (!isActive()) return true; |
16769 | CurrentSource = L; |
16770 | return Flip<PT_IntAPS, PT_IntAPS>(S, OpPC); |
16771 | } |
16772 | bool EvalEmitter::emitFlipIntAPSBool(const SourceInfo &L) { |
16773 | if (!isActive()) return true; |
16774 | CurrentSource = L; |
16775 | return Flip<PT_IntAPS, PT_Bool>(S, OpPC); |
16776 | } |
16777 | bool EvalEmitter::emitFlipIntAPSFixedPoint(const SourceInfo &L) { |
16778 | if (!isActive()) return true; |
16779 | CurrentSource = L; |
16780 | return Flip<PT_IntAPS, PT_FixedPoint>(S, OpPC); |
16781 | } |
16782 | bool EvalEmitter::emitFlipIntAPSPtr(const SourceInfo &L) { |
16783 | if (!isActive()) return true; |
16784 | CurrentSource = L; |
16785 | return Flip<PT_IntAPS, PT_Ptr>(S, OpPC); |
16786 | } |
16787 | bool EvalEmitter::emitFlipIntAPSMemberPtr(const SourceInfo &L) { |
16788 | if (!isActive()) return true; |
16789 | CurrentSource = L; |
16790 | return Flip<PT_IntAPS, PT_MemberPtr>(S, OpPC); |
16791 | } |
16792 | bool EvalEmitter::emitFlipIntAPSFloat(const SourceInfo &L) { |
16793 | if (!isActive()) return true; |
16794 | CurrentSource = L; |
16795 | return Flip<PT_IntAPS, PT_Float>(S, OpPC); |
16796 | } |
16797 | bool EvalEmitter::emitFlipBoolSint8(const SourceInfo &L) { |
16798 | if (!isActive()) return true; |
16799 | CurrentSource = L; |
16800 | return Flip<PT_Bool, PT_Sint8>(S, OpPC); |
16801 | } |
16802 | bool EvalEmitter::emitFlipBoolUint8(const SourceInfo &L) { |
16803 | if (!isActive()) return true; |
16804 | CurrentSource = L; |
16805 | return Flip<PT_Bool, PT_Uint8>(S, OpPC); |
16806 | } |
16807 | bool EvalEmitter::emitFlipBoolSint16(const SourceInfo &L) { |
16808 | if (!isActive()) return true; |
16809 | CurrentSource = L; |
16810 | return Flip<PT_Bool, PT_Sint16>(S, OpPC); |
16811 | } |
16812 | bool EvalEmitter::emitFlipBoolUint16(const SourceInfo &L) { |
16813 | if (!isActive()) return true; |
16814 | CurrentSource = L; |
16815 | return Flip<PT_Bool, PT_Uint16>(S, OpPC); |
16816 | } |
16817 | bool EvalEmitter::emitFlipBoolSint32(const SourceInfo &L) { |
16818 | if (!isActive()) return true; |
16819 | CurrentSource = L; |
16820 | return Flip<PT_Bool, PT_Sint32>(S, OpPC); |
16821 | } |
16822 | bool EvalEmitter::emitFlipBoolUint32(const SourceInfo &L) { |
16823 | if (!isActive()) return true; |
16824 | CurrentSource = L; |
16825 | return Flip<PT_Bool, PT_Uint32>(S, OpPC); |
16826 | } |
16827 | bool EvalEmitter::emitFlipBoolSint64(const SourceInfo &L) { |
16828 | if (!isActive()) return true; |
16829 | CurrentSource = L; |
16830 | return Flip<PT_Bool, PT_Sint64>(S, OpPC); |
16831 | } |
16832 | bool EvalEmitter::emitFlipBoolUint64(const SourceInfo &L) { |
16833 | if (!isActive()) return true; |
16834 | CurrentSource = L; |
16835 | return Flip<PT_Bool, PT_Uint64>(S, OpPC); |
16836 | } |
16837 | bool EvalEmitter::emitFlipBoolIntAP(const SourceInfo &L) { |
16838 | if (!isActive()) return true; |
16839 | CurrentSource = L; |
16840 | return Flip<PT_Bool, PT_IntAP>(S, OpPC); |
16841 | } |
16842 | bool EvalEmitter::emitFlipBoolIntAPS(const SourceInfo &L) { |
16843 | if (!isActive()) return true; |
16844 | CurrentSource = L; |
16845 | return Flip<PT_Bool, PT_IntAPS>(S, OpPC); |
16846 | } |
16847 | bool EvalEmitter::emitFlipBoolBool(const SourceInfo &L) { |
16848 | if (!isActive()) return true; |
16849 | CurrentSource = L; |
16850 | return Flip<PT_Bool, PT_Bool>(S, OpPC); |
16851 | } |
16852 | bool EvalEmitter::emitFlipBoolFixedPoint(const SourceInfo &L) { |
16853 | if (!isActive()) return true; |
16854 | CurrentSource = L; |
16855 | return Flip<PT_Bool, PT_FixedPoint>(S, OpPC); |
16856 | } |
16857 | bool EvalEmitter::emitFlipBoolPtr(const SourceInfo &L) { |
16858 | if (!isActive()) return true; |
16859 | CurrentSource = L; |
16860 | return Flip<PT_Bool, PT_Ptr>(S, OpPC); |
16861 | } |
16862 | bool EvalEmitter::emitFlipBoolMemberPtr(const SourceInfo &L) { |
16863 | if (!isActive()) return true; |
16864 | CurrentSource = L; |
16865 | return Flip<PT_Bool, PT_MemberPtr>(S, OpPC); |
16866 | } |
16867 | bool EvalEmitter::emitFlipBoolFloat(const SourceInfo &L) { |
16868 | if (!isActive()) return true; |
16869 | CurrentSource = L; |
16870 | return Flip<PT_Bool, PT_Float>(S, OpPC); |
16871 | } |
16872 | bool EvalEmitter::emitFlipFixedPointSint8(const SourceInfo &L) { |
16873 | if (!isActive()) return true; |
16874 | CurrentSource = L; |
16875 | return Flip<PT_FixedPoint, PT_Sint8>(S, OpPC); |
16876 | } |
16877 | bool EvalEmitter::emitFlipFixedPointUint8(const SourceInfo &L) { |
16878 | if (!isActive()) return true; |
16879 | CurrentSource = L; |
16880 | return Flip<PT_FixedPoint, PT_Uint8>(S, OpPC); |
16881 | } |
16882 | bool EvalEmitter::emitFlipFixedPointSint16(const SourceInfo &L) { |
16883 | if (!isActive()) return true; |
16884 | CurrentSource = L; |
16885 | return Flip<PT_FixedPoint, PT_Sint16>(S, OpPC); |
16886 | } |
16887 | bool EvalEmitter::emitFlipFixedPointUint16(const SourceInfo &L) { |
16888 | if (!isActive()) return true; |
16889 | CurrentSource = L; |
16890 | return Flip<PT_FixedPoint, PT_Uint16>(S, OpPC); |
16891 | } |
16892 | bool EvalEmitter::emitFlipFixedPointSint32(const SourceInfo &L) { |
16893 | if (!isActive()) return true; |
16894 | CurrentSource = L; |
16895 | return Flip<PT_FixedPoint, PT_Sint32>(S, OpPC); |
16896 | } |
16897 | bool EvalEmitter::emitFlipFixedPointUint32(const SourceInfo &L) { |
16898 | if (!isActive()) return true; |
16899 | CurrentSource = L; |
16900 | return Flip<PT_FixedPoint, PT_Uint32>(S, OpPC); |
16901 | } |
16902 | bool EvalEmitter::emitFlipFixedPointSint64(const SourceInfo &L) { |
16903 | if (!isActive()) return true; |
16904 | CurrentSource = L; |
16905 | return Flip<PT_FixedPoint, PT_Sint64>(S, OpPC); |
16906 | } |
16907 | bool EvalEmitter::emitFlipFixedPointUint64(const SourceInfo &L) { |
16908 | if (!isActive()) return true; |
16909 | CurrentSource = L; |
16910 | return Flip<PT_FixedPoint, PT_Uint64>(S, OpPC); |
16911 | } |
16912 | bool EvalEmitter::emitFlipFixedPointIntAP(const SourceInfo &L) { |
16913 | if (!isActive()) return true; |
16914 | CurrentSource = L; |
16915 | return Flip<PT_FixedPoint, PT_IntAP>(S, OpPC); |
16916 | } |
16917 | bool EvalEmitter::emitFlipFixedPointIntAPS(const SourceInfo &L) { |
16918 | if (!isActive()) return true; |
16919 | CurrentSource = L; |
16920 | return Flip<PT_FixedPoint, PT_IntAPS>(S, OpPC); |
16921 | } |
16922 | bool EvalEmitter::emitFlipFixedPointBool(const SourceInfo &L) { |
16923 | if (!isActive()) return true; |
16924 | CurrentSource = L; |
16925 | return Flip<PT_FixedPoint, PT_Bool>(S, OpPC); |
16926 | } |
16927 | bool EvalEmitter::emitFlipFixedPointFixedPoint(const SourceInfo &L) { |
16928 | if (!isActive()) return true; |
16929 | CurrentSource = L; |
16930 | return Flip<PT_FixedPoint, PT_FixedPoint>(S, OpPC); |
16931 | } |
16932 | bool EvalEmitter::emitFlipFixedPointPtr(const SourceInfo &L) { |
16933 | if (!isActive()) return true; |
16934 | CurrentSource = L; |
16935 | return Flip<PT_FixedPoint, PT_Ptr>(S, OpPC); |
16936 | } |
16937 | bool EvalEmitter::emitFlipFixedPointMemberPtr(const SourceInfo &L) { |
16938 | if (!isActive()) return true; |
16939 | CurrentSource = L; |
16940 | return Flip<PT_FixedPoint, PT_MemberPtr>(S, OpPC); |
16941 | } |
16942 | bool EvalEmitter::emitFlipFixedPointFloat(const SourceInfo &L) { |
16943 | if (!isActive()) return true; |
16944 | CurrentSource = L; |
16945 | return Flip<PT_FixedPoint, PT_Float>(S, OpPC); |
16946 | } |
16947 | bool EvalEmitter::emitFlipPtrSint8(const SourceInfo &L) { |
16948 | if (!isActive()) return true; |
16949 | CurrentSource = L; |
16950 | return Flip<PT_Ptr, PT_Sint8>(S, OpPC); |
16951 | } |
16952 | bool EvalEmitter::emitFlipPtrUint8(const SourceInfo &L) { |
16953 | if (!isActive()) return true; |
16954 | CurrentSource = L; |
16955 | return Flip<PT_Ptr, PT_Uint8>(S, OpPC); |
16956 | } |
16957 | bool EvalEmitter::emitFlipPtrSint16(const SourceInfo &L) { |
16958 | if (!isActive()) return true; |
16959 | CurrentSource = L; |
16960 | return Flip<PT_Ptr, PT_Sint16>(S, OpPC); |
16961 | } |
16962 | bool EvalEmitter::emitFlipPtrUint16(const SourceInfo &L) { |
16963 | if (!isActive()) return true; |
16964 | CurrentSource = L; |
16965 | return Flip<PT_Ptr, PT_Uint16>(S, OpPC); |
16966 | } |
16967 | bool EvalEmitter::emitFlipPtrSint32(const SourceInfo &L) { |
16968 | if (!isActive()) return true; |
16969 | CurrentSource = L; |
16970 | return Flip<PT_Ptr, PT_Sint32>(S, OpPC); |
16971 | } |
16972 | bool EvalEmitter::emitFlipPtrUint32(const SourceInfo &L) { |
16973 | if (!isActive()) return true; |
16974 | CurrentSource = L; |
16975 | return Flip<PT_Ptr, PT_Uint32>(S, OpPC); |
16976 | } |
16977 | bool EvalEmitter::emitFlipPtrSint64(const SourceInfo &L) { |
16978 | if (!isActive()) return true; |
16979 | CurrentSource = L; |
16980 | return Flip<PT_Ptr, PT_Sint64>(S, OpPC); |
16981 | } |
16982 | bool EvalEmitter::emitFlipPtrUint64(const SourceInfo &L) { |
16983 | if (!isActive()) return true; |
16984 | CurrentSource = L; |
16985 | return Flip<PT_Ptr, PT_Uint64>(S, OpPC); |
16986 | } |
16987 | bool EvalEmitter::emitFlipPtrIntAP(const SourceInfo &L) { |
16988 | if (!isActive()) return true; |
16989 | CurrentSource = L; |
16990 | return Flip<PT_Ptr, PT_IntAP>(S, OpPC); |
16991 | } |
16992 | bool EvalEmitter::emitFlipPtrIntAPS(const SourceInfo &L) { |
16993 | if (!isActive()) return true; |
16994 | CurrentSource = L; |
16995 | return Flip<PT_Ptr, PT_IntAPS>(S, OpPC); |
16996 | } |
16997 | bool EvalEmitter::emitFlipPtrBool(const SourceInfo &L) { |
16998 | if (!isActive()) return true; |
16999 | CurrentSource = L; |
17000 | return Flip<PT_Ptr, PT_Bool>(S, OpPC); |
17001 | } |
17002 | bool EvalEmitter::emitFlipPtrFixedPoint(const SourceInfo &L) { |
17003 | if (!isActive()) return true; |
17004 | CurrentSource = L; |
17005 | return Flip<PT_Ptr, PT_FixedPoint>(S, OpPC); |
17006 | } |
17007 | bool EvalEmitter::emitFlipPtrPtr(const SourceInfo &L) { |
17008 | if (!isActive()) return true; |
17009 | CurrentSource = L; |
17010 | return Flip<PT_Ptr, PT_Ptr>(S, OpPC); |
17011 | } |
17012 | bool EvalEmitter::emitFlipPtrMemberPtr(const SourceInfo &L) { |
17013 | if (!isActive()) return true; |
17014 | CurrentSource = L; |
17015 | return Flip<PT_Ptr, PT_MemberPtr>(S, OpPC); |
17016 | } |
17017 | bool EvalEmitter::emitFlipPtrFloat(const SourceInfo &L) { |
17018 | if (!isActive()) return true; |
17019 | CurrentSource = L; |
17020 | return Flip<PT_Ptr, PT_Float>(S, OpPC); |
17021 | } |
17022 | bool EvalEmitter::emitFlipMemberPtrSint8(const SourceInfo &L) { |
17023 | if (!isActive()) return true; |
17024 | CurrentSource = L; |
17025 | return Flip<PT_MemberPtr, PT_Sint8>(S, OpPC); |
17026 | } |
17027 | bool EvalEmitter::emitFlipMemberPtrUint8(const SourceInfo &L) { |
17028 | if (!isActive()) return true; |
17029 | CurrentSource = L; |
17030 | return Flip<PT_MemberPtr, PT_Uint8>(S, OpPC); |
17031 | } |
17032 | bool EvalEmitter::emitFlipMemberPtrSint16(const SourceInfo &L) { |
17033 | if (!isActive()) return true; |
17034 | CurrentSource = L; |
17035 | return Flip<PT_MemberPtr, PT_Sint16>(S, OpPC); |
17036 | } |
17037 | bool EvalEmitter::emitFlipMemberPtrUint16(const SourceInfo &L) { |
17038 | if (!isActive()) return true; |
17039 | CurrentSource = L; |
17040 | return Flip<PT_MemberPtr, PT_Uint16>(S, OpPC); |
17041 | } |
17042 | bool EvalEmitter::emitFlipMemberPtrSint32(const SourceInfo &L) { |
17043 | if (!isActive()) return true; |
17044 | CurrentSource = L; |
17045 | return Flip<PT_MemberPtr, PT_Sint32>(S, OpPC); |
17046 | } |
17047 | bool EvalEmitter::emitFlipMemberPtrUint32(const SourceInfo &L) { |
17048 | if (!isActive()) return true; |
17049 | CurrentSource = L; |
17050 | return Flip<PT_MemberPtr, PT_Uint32>(S, OpPC); |
17051 | } |
17052 | bool EvalEmitter::emitFlipMemberPtrSint64(const SourceInfo &L) { |
17053 | if (!isActive()) return true; |
17054 | CurrentSource = L; |
17055 | return Flip<PT_MemberPtr, PT_Sint64>(S, OpPC); |
17056 | } |
17057 | bool EvalEmitter::emitFlipMemberPtrUint64(const SourceInfo &L) { |
17058 | if (!isActive()) return true; |
17059 | CurrentSource = L; |
17060 | return Flip<PT_MemberPtr, PT_Uint64>(S, OpPC); |
17061 | } |
17062 | bool EvalEmitter::emitFlipMemberPtrIntAP(const SourceInfo &L) { |
17063 | if (!isActive()) return true; |
17064 | CurrentSource = L; |
17065 | return Flip<PT_MemberPtr, PT_IntAP>(S, OpPC); |
17066 | } |
17067 | bool EvalEmitter::emitFlipMemberPtrIntAPS(const SourceInfo &L) { |
17068 | if (!isActive()) return true; |
17069 | CurrentSource = L; |
17070 | return Flip<PT_MemberPtr, PT_IntAPS>(S, OpPC); |
17071 | } |
17072 | bool EvalEmitter::emitFlipMemberPtrBool(const SourceInfo &L) { |
17073 | if (!isActive()) return true; |
17074 | CurrentSource = L; |
17075 | return Flip<PT_MemberPtr, PT_Bool>(S, OpPC); |
17076 | } |
17077 | bool EvalEmitter::emitFlipMemberPtrFixedPoint(const SourceInfo &L) { |
17078 | if (!isActive()) return true; |
17079 | CurrentSource = L; |
17080 | return Flip<PT_MemberPtr, PT_FixedPoint>(S, OpPC); |
17081 | } |
17082 | bool EvalEmitter::emitFlipMemberPtrPtr(const SourceInfo &L) { |
17083 | if (!isActive()) return true; |
17084 | CurrentSource = L; |
17085 | return Flip<PT_MemberPtr, PT_Ptr>(S, OpPC); |
17086 | } |
17087 | bool EvalEmitter::emitFlipMemberPtrMemberPtr(const SourceInfo &L) { |
17088 | if (!isActive()) return true; |
17089 | CurrentSource = L; |
17090 | return Flip<PT_MemberPtr, PT_MemberPtr>(S, OpPC); |
17091 | } |
17092 | bool EvalEmitter::emitFlipMemberPtrFloat(const SourceInfo &L) { |
17093 | if (!isActive()) return true; |
17094 | CurrentSource = L; |
17095 | return Flip<PT_MemberPtr, PT_Float>(S, OpPC); |
17096 | } |
17097 | bool EvalEmitter::emitFlipFloatSint8(const SourceInfo &L) { |
17098 | if (!isActive()) return true; |
17099 | CurrentSource = L; |
17100 | return Flip<PT_Float, PT_Sint8>(S, OpPC); |
17101 | } |
17102 | bool EvalEmitter::emitFlipFloatUint8(const SourceInfo &L) { |
17103 | if (!isActive()) return true; |
17104 | CurrentSource = L; |
17105 | return Flip<PT_Float, PT_Uint8>(S, OpPC); |
17106 | } |
17107 | bool EvalEmitter::emitFlipFloatSint16(const SourceInfo &L) { |
17108 | if (!isActive()) return true; |
17109 | CurrentSource = L; |
17110 | return Flip<PT_Float, PT_Sint16>(S, OpPC); |
17111 | } |
17112 | bool EvalEmitter::emitFlipFloatUint16(const SourceInfo &L) { |
17113 | if (!isActive()) return true; |
17114 | CurrentSource = L; |
17115 | return Flip<PT_Float, PT_Uint16>(S, OpPC); |
17116 | } |
17117 | bool EvalEmitter::emitFlipFloatSint32(const SourceInfo &L) { |
17118 | if (!isActive()) return true; |
17119 | CurrentSource = L; |
17120 | return Flip<PT_Float, PT_Sint32>(S, OpPC); |
17121 | } |
17122 | bool EvalEmitter::emitFlipFloatUint32(const SourceInfo &L) { |
17123 | if (!isActive()) return true; |
17124 | CurrentSource = L; |
17125 | return Flip<PT_Float, PT_Uint32>(S, OpPC); |
17126 | } |
17127 | bool EvalEmitter::emitFlipFloatSint64(const SourceInfo &L) { |
17128 | if (!isActive()) return true; |
17129 | CurrentSource = L; |
17130 | return Flip<PT_Float, PT_Sint64>(S, OpPC); |
17131 | } |
17132 | bool EvalEmitter::emitFlipFloatUint64(const SourceInfo &L) { |
17133 | if (!isActive()) return true; |
17134 | CurrentSource = L; |
17135 | return Flip<PT_Float, PT_Uint64>(S, OpPC); |
17136 | } |
17137 | bool EvalEmitter::emitFlipFloatIntAP(const SourceInfo &L) { |
17138 | if (!isActive()) return true; |
17139 | CurrentSource = L; |
17140 | return Flip<PT_Float, PT_IntAP>(S, OpPC); |
17141 | } |
17142 | bool EvalEmitter::emitFlipFloatIntAPS(const SourceInfo &L) { |
17143 | if (!isActive()) return true; |
17144 | CurrentSource = L; |
17145 | return Flip<PT_Float, PT_IntAPS>(S, OpPC); |
17146 | } |
17147 | bool EvalEmitter::emitFlipFloatBool(const SourceInfo &L) { |
17148 | if (!isActive()) return true; |
17149 | CurrentSource = L; |
17150 | return Flip<PT_Float, PT_Bool>(S, OpPC); |
17151 | } |
17152 | bool EvalEmitter::emitFlipFloatFixedPoint(const SourceInfo &L) { |
17153 | if (!isActive()) return true; |
17154 | CurrentSource = L; |
17155 | return Flip<PT_Float, PT_FixedPoint>(S, OpPC); |
17156 | } |
17157 | bool EvalEmitter::emitFlipFloatPtr(const SourceInfo &L) { |
17158 | if (!isActive()) return true; |
17159 | CurrentSource = L; |
17160 | return Flip<PT_Float, PT_Ptr>(S, OpPC); |
17161 | } |
17162 | bool EvalEmitter::emitFlipFloatMemberPtr(const SourceInfo &L) { |
17163 | if (!isActive()) return true; |
17164 | CurrentSource = L; |
17165 | return Flip<PT_Float, PT_MemberPtr>(S, OpPC); |
17166 | } |
17167 | bool EvalEmitter::emitFlipFloatFloat(const SourceInfo &L) { |
17168 | if (!isActive()) return true; |
17169 | CurrentSource = L; |
17170 | return Flip<PT_Float, PT_Float>(S, OpPC); |
17171 | } |
17172 | #endif |
17173 | #ifdef GET_OPCODE_NAMES |
17174 | OP_Free, |
17175 | #endif |
17176 | #ifdef GET_INTERP |
17177 | case OP_Free: { |
17178 | const auto V0 = ReadArg<bool>(S, PC); |
17179 | const auto V1 = ReadArg<bool>(S, PC); |
17180 | if (!Free(S, OpPC, V0, V1)) |
17181 | return false; |
17182 | continue; |
17183 | } |
17184 | #endif |
17185 | #ifdef GET_DISASM |
17186 | case OP_Free: |
17187 | Text.Op = PrintName("Free" ); |
17188 | Text.Args.push_back(printArg<bool>(P, PC)); |
17189 | Text.Args.push_back(printArg<bool>(P, PC)); |
17190 | break; |
17191 | #endif |
17192 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17193 | bool emitFree( bool , bool , const SourceInfo &); |
17194 | #endif |
17195 | #ifdef GET_LINK_IMPL |
17196 | bool ByteCodeEmitter::emitFree( bool A0, bool A1, const SourceInfo &L) { |
17197 | return emitOp<bool, bool>(OP_Free, A0, A1, L); |
17198 | } |
17199 | #endif |
17200 | #ifdef GET_EVAL_IMPL |
17201 | bool EvalEmitter::emitFree( bool A0, bool A1, const SourceInfo &L) { |
17202 | if (!isActive()) return true; |
17203 | CurrentSource = L; |
17204 | return Free(S, OpPC, A0, A1); |
17205 | } |
17206 | #endif |
17207 | #ifdef GET_OPCODE_NAMES |
17208 | OP_GESint8, |
17209 | OP_GEUint8, |
17210 | OP_GESint16, |
17211 | OP_GEUint16, |
17212 | OP_GESint32, |
17213 | OP_GEUint32, |
17214 | OP_GESint64, |
17215 | OP_GEUint64, |
17216 | OP_GEIntAP, |
17217 | OP_GEIntAPS, |
17218 | OP_GEBool, |
17219 | OP_GEFixedPoint, |
17220 | OP_GEPtr, |
17221 | OP_GEFloat, |
17222 | #endif |
17223 | #ifdef GET_INTERP |
17224 | case OP_GESint8: { |
17225 | if (!GE<PT_Sint8>(S, OpPC)) |
17226 | return false; |
17227 | continue; |
17228 | } |
17229 | case OP_GEUint8: { |
17230 | if (!GE<PT_Uint8>(S, OpPC)) |
17231 | return false; |
17232 | continue; |
17233 | } |
17234 | case OP_GESint16: { |
17235 | if (!GE<PT_Sint16>(S, OpPC)) |
17236 | return false; |
17237 | continue; |
17238 | } |
17239 | case OP_GEUint16: { |
17240 | if (!GE<PT_Uint16>(S, OpPC)) |
17241 | return false; |
17242 | continue; |
17243 | } |
17244 | case OP_GESint32: { |
17245 | if (!GE<PT_Sint32>(S, OpPC)) |
17246 | return false; |
17247 | continue; |
17248 | } |
17249 | case OP_GEUint32: { |
17250 | if (!GE<PT_Uint32>(S, OpPC)) |
17251 | return false; |
17252 | continue; |
17253 | } |
17254 | case OP_GESint64: { |
17255 | if (!GE<PT_Sint64>(S, OpPC)) |
17256 | return false; |
17257 | continue; |
17258 | } |
17259 | case OP_GEUint64: { |
17260 | if (!GE<PT_Uint64>(S, OpPC)) |
17261 | return false; |
17262 | continue; |
17263 | } |
17264 | case OP_GEIntAP: { |
17265 | if (!GE<PT_IntAP>(S, OpPC)) |
17266 | return false; |
17267 | continue; |
17268 | } |
17269 | case OP_GEIntAPS: { |
17270 | if (!GE<PT_IntAPS>(S, OpPC)) |
17271 | return false; |
17272 | continue; |
17273 | } |
17274 | case OP_GEBool: { |
17275 | if (!GE<PT_Bool>(S, OpPC)) |
17276 | return false; |
17277 | continue; |
17278 | } |
17279 | case OP_GEFixedPoint: { |
17280 | if (!GE<PT_FixedPoint>(S, OpPC)) |
17281 | return false; |
17282 | continue; |
17283 | } |
17284 | case OP_GEPtr: { |
17285 | if (!GE<PT_Ptr>(S, OpPC)) |
17286 | return false; |
17287 | continue; |
17288 | } |
17289 | case OP_GEFloat: { |
17290 | if (!GE<PT_Float>(S, OpPC)) |
17291 | return false; |
17292 | continue; |
17293 | } |
17294 | #endif |
17295 | #ifdef GET_DISASM |
17296 | case OP_GESint8: |
17297 | Text.Op = PrintName("GESint8" ); |
17298 | break; |
17299 | case OP_GEUint8: |
17300 | Text.Op = PrintName("GEUint8" ); |
17301 | break; |
17302 | case OP_GESint16: |
17303 | Text.Op = PrintName("GESint16" ); |
17304 | break; |
17305 | case OP_GEUint16: |
17306 | Text.Op = PrintName("GEUint16" ); |
17307 | break; |
17308 | case OP_GESint32: |
17309 | Text.Op = PrintName("GESint32" ); |
17310 | break; |
17311 | case OP_GEUint32: |
17312 | Text.Op = PrintName("GEUint32" ); |
17313 | break; |
17314 | case OP_GESint64: |
17315 | Text.Op = PrintName("GESint64" ); |
17316 | break; |
17317 | case OP_GEUint64: |
17318 | Text.Op = PrintName("GEUint64" ); |
17319 | break; |
17320 | case OP_GEIntAP: |
17321 | Text.Op = PrintName("GEIntAP" ); |
17322 | break; |
17323 | case OP_GEIntAPS: |
17324 | Text.Op = PrintName("GEIntAPS" ); |
17325 | break; |
17326 | case OP_GEBool: |
17327 | Text.Op = PrintName("GEBool" ); |
17328 | break; |
17329 | case OP_GEFixedPoint: |
17330 | Text.Op = PrintName("GEFixedPoint" ); |
17331 | break; |
17332 | case OP_GEPtr: |
17333 | Text.Op = PrintName("GEPtr" ); |
17334 | break; |
17335 | case OP_GEFloat: |
17336 | Text.Op = PrintName("GEFloat" ); |
17337 | break; |
17338 | #endif |
17339 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17340 | bool emitGESint8(const SourceInfo &); |
17341 | bool emitGEUint8(const SourceInfo &); |
17342 | bool emitGESint16(const SourceInfo &); |
17343 | bool emitGEUint16(const SourceInfo &); |
17344 | bool emitGESint32(const SourceInfo &); |
17345 | bool emitGEUint32(const SourceInfo &); |
17346 | bool emitGESint64(const SourceInfo &); |
17347 | bool emitGEUint64(const SourceInfo &); |
17348 | bool emitGEIntAP(const SourceInfo &); |
17349 | bool emitGEIntAPS(const SourceInfo &); |
17350 | bool emitGEBool(const SourceInfo &); |
17351 | bool emitGEFixedPoint(const SourceInfo &); |
17352 | bool emitGEPtr(const SourceInfo &); |
17353 | bool emitGEFloat(const SourceInfo &); |
17354 | #endif |
17355 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17356 | [[nodiscard]] bool emitGE(PrimType, const SourceInfo &I); |
17357 | #endif |
17358 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
17359 | bool |
17360 | #if defined(GET_EVAL_IMPL) |
17361 | EvalEmitter |
17362 | #else |
17363 | ByteCodeEmitter |
17364 | #endif |
17365 | ::emitGE(PrimType T0, const SourceInfo &I) { |
17366 | switch (T0) { |
17367 | case PT_Sint8: |
17368 | return emitGESint8(I); |
17369 | case PT_Uint8: |
17370 | return emitGEUint8(I); |
17371 | case PT_Sint16: |
17372 | return emitGESint16(I); |
17373 | case PT_Uint16: |
17374 | return emitGEUint16(I); |
17375 | case PT_Sint32: |
17376 | return emitGESint32(I); |
17377 | case PT_Uint32: |
17378 | return emitGEUint32(I); |
17379 | case PT_Sint64: |
17380 | return emitGESint64(I); |
17381 | case PT_Uint64: |
17382 | return emitGEUint64(I); |
17383 | case PT_IntAP: |
17384 | return emitGEIntAP(I); |
17385 | case PT_IntAPS: |
17386 | return emitGEIntAPS(I); |
17387 | case PT_Bool: |
17388 | return emitGEBool(I); |
17389 | case PT_FixedPoint: |
17390 | return emitGEFixedPoint(I); |
17391 | case PT_Ptr: |
17392 | return emitGEPtr(I); |
17393 | case PT_Float: |
17394 | return emitGEFloat(I); |
17395 | default: llvm_unreachable("invalid type: emitGE" ); |
17396 | } |
17397 | llvm_unreachable("invalid enum value" ); |
17398 | } |
17399 | #endif |
17400 | #ifdef GET_LINK_IMPL |
17401 | bool ByteCodeEmitter::emitGESint8(const SourceInfo &L) { |
17402 | return emitOp<>(OP_GESint8, L); |
17403 | } |
17404 | bool ByteCodeEmitter::emitGEUint8(const SourceInfo &L) { |
17405 | return emitOp<>(OP_GEUint8, L); |
17406 | } |
17407 | bool ByteCodeEmitter::emitGESint16(const SourceInfo &L) { |
17408 | return emitOp<>(OP_GESint16, L); |
17409 | } |
17410 | bool ByteCodeEmitter::emitGEUint16(const SourceInfo &L) { |
17411 | return emitOp<>(OP_GEUint16, L); |
17412 | } |
17413 | bool ByteCodeEmitter::emitGESint32(const SourceInfo &L) { |
17414 | return emitOp<>(OP_GESint32, L); |
17415 | } |
17416 | bool ByteCodeEmitter::emitGEUint32(const SourceInfo &L) { |
17417 | return emitOp<>(OP_GEUint32, L); |
17418 | } |
17419 | bool ByteCodeEmitter::emitGESint64(const SourceInfo &L) { |
17420 | return emitOp<>(OP_GESint64, L); |
17421 | } |
17422 | bool ByteCodeEmitter::emitGEUint64(const SourceInfo &L) { |
17423 | return emitOp<>(OP_GEUint64, L); |
17424 | } |
17425 | bool ByteCodeEmitter::emitGEIntAP(const SourceInfo &L) { |
17426 | return emitOp<>(OP_GEIntAP, L); |
17427 | } |
17428 | bool ByteCodeEmitter::emitGEIntAPS(const SourceInfo &L) { |
17429 | return emitOp<>(OP_GEIntAPS, L); |
17430 | } |
17431 | bool ByteCodeEmitter::emitGEBool(const SourceInfo &L) { |
17432 | return emitOp<>(OP_GEBool, L); |
17433 | } |
17434 | bool ByteCodeEmitter::emitGEFixedPoint(const SourceInfo &L) { |
17435 | return emitOp<>(OP_GEFixedPoint, L); |
17436 | } |
17437 | bool ByteCodeEmitter::emitGEPtr(const SourceInfo &L) { |
17438 | return emitOp<>(OP_GEPtr, L); |
17439 | } |
17440 | bool ByteCodeEmitter::emitGEFloat(const SourceInfo &L) { |
17441 | return emitOp<>(OP_GEFloat, L); |
17442 | } |
17443 | #endif |
17444 | #ifdef GET_EVAL_IMPL |
17445 | bool EvalEmitter::emitGESint8(const SourceInfo &L) { |
17446 | if (!isActive()) return true; |
17447 | CurrentSource = L; |
17448 | return GE<PT_Sint8>(S, OpPC); |
17449 | } |
17450 | bool EvalEmitter::emitGEUint8(const SourceInfo &L) { |
17451 | if (!isActive()) return true; |
17452 | CurrentSource = L; |
17453 | return GE<PT_Uint8>(S, OpPC); |
17454 | } |
17455 | bool EvalEmitter::emitGESint16(const SourceInfo &L) { |
17456 | if (!isActive()) return true; |
17457 | CurrentSource = L; |
17458 | return GE<PT_Sint16>(S, OpPC); |
17459 | } |
17460 | bool EvalEmitter::emitGEUint16(const SourceInfo &L) { |
17461 | if (!isActive()) return true; |
17462 | CurrentSource = L; |
17463 | return GE<PT_Uint16>(S, OpPC); |
17464 | } |
17465 | bool EvalEmitter::emitGESint32(const SourceInfo &L) { |
17466 | if (!isActive()) return true; |
17467 | CurrentSource = L; |
17468 | return GE<PT_Sint32>(S, OpPC); |
17469 | } |
17470 | bool EvalEmitter::emitGEUint32(const SourceInfo &L) { |
17471 | if (!isActive()) return true; |
17472 | CurrentSource = L; |
17473 | return GE<PT_Uint32>(S, OpPC); |
17474 | } |
17475 | bool EvalEmitter::emitGESint64(const SourceInfo &L) { |
17476 | if (!isActive()) return true; |
17477 | CurrentSource = L; |
17478 | return GE<PT_Sint64>(S, OpPC); |
17479 | } |
17480 | bool EvalEmitter::emitGEUint64(const SourceInfo &L) { |
17481 | if (!isActive()) return true; |
17482 | CurrentSource = L; |
17483 | return GE<PT_Uint64>(S, OpPC); |
17484 | } |
17485 | bool EvalEmitter::emitGEIntAP(const SourceInfo &L) { |
17486 | if (!isActive()) return true; |
17487 | CurrentSource = L; |
17488 | return GE<PT_IntAP>(S, OpPC); |
17489 | } |
17490 | bool EvalEmitter::emitGEIntAPS(const SourceInfo &L) { |
17491 | if (!isActive()) return true; |
17492 | CurrentSource = L; |
17493 | return GE<PT_IntAPS>(S, OpPC); |
17494 | } |
17495 | bool EvalEmitter::emitGEBool(const SourceInfo &L) { |
17496 | if (!isActive()) return true; |
17497 | CurrentSource = L; |
17498 | return GE<PT_Bool>(S, OpPC); |
17499 | } |
17500 | bool EvalEmitter::emitGEFixedPoint(const SourceInfo &L) { |
17501 | if (!isActive()) return true; |
17502 | CurrentSource = L; |
17503 | return GE<PT_FixedPoint>(S, OpPC); |
17504 | } |
17505 | bool EvalEmitter::emitGEPtr(const SourceInfo &L) { |
17506 | if (!isActive()) return true; |
17507 | CurrentSource = L; |
17508 | return GE<PT_Ptr>(S, OpPC); |
17509 | } |
17510 | bool EvalEmitter::emitGEFloat(const SourceInfo &L) { |
17511 | if (!isActive()) return true; |
17512 | CurrentSource = L; |
17513 | return GE<PT_Float>(S, OpPC); |
17514 | } |
17515 | #endif |
17516 | #ifdef GET_OPCODE_NAMES |
17517 | OP_GTSint8, |
17518 | OP_GTUint8, |
17519 | OP_GTSint16, |
17520 | OP_GTUint16, |
17521 | OP_GTSint32, |
17522 | OP_GTUint32, |
17523 | OP_GTSint64, |
17524 | OP_GTUint64, |
17525 | OP_GTIntAP, |
17526 | OP_GTIntAPS, |
17527 | OP_GTBool, |
17528 | OP_GTFixedPoint, |
17529 | OP_GTPtr, |
17530 | OP_GTFloat, |
17531 | #endif |
17532 | #ifdef GET_INTERP |
17533 | case OP_GTSint8: { |
17534 | if (!GT<PT_Sint8>(S, OpPC)) |
17535 | return false; |
17536 | continue; |
17537 | } |
17538 | case OP_GTUint8: { |
17539 | if (!GT<PT_Uint8>(S, OpPC)) |
17540 | return false; |
17541 | continue; |
17542 | } |
17543 | case OP_GTSint16: { |
17544 | if (!GT<PT_Sint16>(S, OpPC)) |
17545 | return false; |
17546 | continue; |
17547 | } |
17548 | case OP_GTUint16: { |
17549 | if (!GT<PT_Uint16>(S, OpPC)) |
17550 | return false; |
17551 | continue; |
17552 | } |
17553 | case OP_GTSint32: { |
17554 | if (!GT<PT_Sint32>(S, OpPC)) |
17555 | return false; |
17556 | continue; |
17557 | } |
17558 | case OP_GTUint32: { |
17559 | if (!GT<PT_Uint32>(S, OpPC)) |
17560 | return false; |
17561 | continue; |
17562 | } |
17563 | case OP_GTSint64: { |
17564 | if (!GT<PT_Sint64>(S, OpPC)) |
17565 | return false; |
17566 | continue; |
17567 | } |
17568 | case OP_GTUint64: { |
17569 | if (!GT<PT_Uint64>(S, OpPC)) |
17570 | return false; |
17571 | continue; |
17572 | } |
17573 | case OP_GTIntAP: { |
17574 | if (!GT<PT_IntAP>(S, OpPC)) |
17575 | return false; |
17576 | continue; |
17577 | } |
17578 | case OP_GTIntAPS: { |
17579 | if (!GT<PT_IntAPS>(S, OpPC)) |
17580 | return false; |
17581 | continue; |
17582 | } |
17583 | case OP_GTBool: { |
17584 | if (!GT<PT_Bool>(S, OpPC)) |
17585 | return false; |
17586 | continue; |
17587 | } |
17588 | case OP_GTFixedPoint: { |
17589 | if (!GT<PT_FixedPoint>(S, OpPC)) |
17590 | return false; |
17591 | continue; |
17592 | } |
17593 | case OP_GTPtr: { |
17594 | if (!GT<PT_Ptr>(S, OpPC)) |
17595 | return false; |
17596 | continue; |
17597 | } |
17598 | case OP_GTFloat: { |
17599 | if (!GT<PT_Float>(S, OpPC)) |
17600 | return false; |
17601 | continue; |
17602 | } |
17603 | #endif |
17604 | #ifdef GET_DISASM |
17605 | case OP_GTSint8: |
17606 | Text.Op = PrintName("GTSint8" ); |
17607 | break; |
17608 | case OP_GTUint8: |
17609 | Text.Op = PrintName("GTUint8" ); |
17610 | break; |
17611 | case OP_GTSint16: |
17612 | Text.Op = PrintName("GTSint16" ); |
17613 | break; |
17614 | case OP_GTUint16: |
17615 | Text.Op = PrintName("GTUint16" ); |
17616 | break; |
17617 | case OP_GTSint32: |
17618 | Text.Op = PrintName("GTSint32" ); |
17619 | break; |
17620 | case OP_GTUint32: |
17621 | Text.Op = PrintName("GTUint32" ); |
17622 | break; |
17623 | case OP_GTSint64: |
17624 | Text.Op = PrintName("GTSint64" ); |
17625 | break; |
17626 | case OP_GTUint64: |
17627 | Text.Op = PrintName("GTUint64" ); |
17628 | break; |
17629 | case OP_GTIntAP: |
17630 | Text.Op = PrintName("GTIntAP" ); |
17631 | break; |
17632 | case OP_GTIntAPS: |
17633 | Text.Op = PrintName("GTIntAPS" ); |
17634 | break; |
17635 | case OP_GTBool: |
17636 | Text.Op = PrintName("GTBool" ); |
17637 | break; |
17638 | case OP_GTFixedPoint: |
17639 | Text.Op = PrintName("GTFixedPoint" ); |
17640 | break; |
17641 | case OP_GTPtr: |
17642 | Text.Op = PrintName("GTPtr" ); |
17643 | break; |
17644 | case OP_GTFloat: |
17645 | Text.Op = PrintName("GTFloat" ); |
17646 | break; |
17647 | #endif |
17648 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17649 | bool emitGTSint8(const SourceInfo &); |
17650 | bool emitGTUint8(const SourceInfo &); |
17651 | bool emitGTSint16(const SourceInfo &); |
17652 | bool emitGTUint16(const SourceInfo &); |
17653 | bool emitGTSint32(const SourceInfo &); |
17654 | bool emitGTUint32(const SourceInfo &); |
17655 | bool emitGTSint64(const SourceInfo &); |
17656 | bool emitGTUint64(const SourceInfo &); |
17657 | bool emitGTIntAP(const SourceInfo &); |
17658 | bool emitGTIntAPS(const SourceInfo &); |
17659 | bool emitGTBool(const SourceInfo &); |
17660 | bool emitGTFixedPoint(const SourceInfo &); |
17661 | bool emitGTPtr(const SourceInfo &); |
17662 | bool emitGTFloat(const SourceInfo &); |
17663 | #endif |
17664 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17665 | [[nodiscard]] bool emitGT(PrimType, const SourceInfo &I); |
17666 | #endif |
17667 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
17668 | bool |
17669 | #if defined(GET_EVAL_IMPL) |
17670 | EvalEmitter |
17671 | #else |
17672 | ByteCodeEmitter |
17673 | #endif |
17674 | ::emitGT(PrimType T0, const SourceInfo &I) { |
17675 | switch (T0) { |
17676 | case PT_Sint8: |
17677 | return emitGTSint8(I); |
17678 | case PT_Uint8: |
17679 | return emitGTUint8(I); |
17680 | case PT_Sint16: |
17681 | return emitGTSint16(I); |
17682 | case PT_Uint16: |
17683 | return emitGTUint16(I); |
17684 | case PT_Sint32: |
17685 | return emitGTSint32(I); |
17686 | case PT_Uint32: |
17687 | return emitGTUint32(I); |
17688 | case PT_Sint64: |
17689 | return emitGTSint64(I); |
17690 | case PT_Uint64: |
17691 | return emitGTUint64(I); |
17692 | case PT_IntAP: |
17693 | return emitGTIntAP(I); |
17694 | case PT_IntAPS: |
17695 | return emitGTIntAPS(I); |
17696 | case PT_Bool: |
17697 | return emitGTBool(I); |
17698 | case PT_FixedPoint: |
17699 | return emitGTFixedPoint(I); |
17700 | case PT_Ptr: |
17701 | return emitGTPtr(I); |
17702 | case PT_Float: |
17703 | return emitGTFloat(I); |
17704 | default: llvm_unreachable("invalid type: emitGT" ); |
17705 | } |
17706 | llvm_unreachable("invalid enum value" ); |
17707 | } |
17708 | #endif |
17709 | #ifdef GET_LINK_IMPL |
17710 | bool ByteCodeEmitter::emitGTSint8(const SourceInfo &L) { |
17711 | return emitOp<>(OP_GTSint8, L); |
17712 | } |
17713 | bool ByteCodeEmitter::emitGTUint8(const SourceInfo &L) { |
17714 | return emitOp<>(OP_GTUint8, L); |
17715 | } |
17716 | bool ByteCodeEmitter::emitGTSint16(const SourceInfo &L) { |
17717 | return emitOp<>(OP_GTSint16, L); |
17718 | } |
17719 | bool ByteCodeEmitter::emitGTUint16(const SourceInfo &L) { |
17720 | return emitOp<>(OP_GTUint16, L); |
17721 | } |
17722 | bool ByteCodeEmitter::emitGTSint32(const SourceInfo &L) { |
17723 | return emitOp<>(OP_GTSint32, L); |
17724 | } |
17725 | bool ByteCodeEmitter::emitGTUint32(const SourceInfo &L) { |
17726 | return emitOp<>(OP_GTUint32, L); |
17727 | } |
17728 | bool ByteCodeEmitter::emitGTSint64(const SourceInfo &L) { |
17729 | return emitOp<>(OP_GTSint64, L); |
17730 | } |
17731 | bool ByteCodeEmitter::emitGTUint64(const SourceInfo &L) { |
17732 | return emitOp<>(OP_GTUint64, L); |
17733 | } |
17734 | bool ByteCodeEmitter::emitGTIntAP(const SourceInfo &L) { |
17735 | return emitOp<>(OP_GTIntAP, L); |
17736 | } |
17737 | bool ByteCodeEmitter::emitGTIntAPS(const SourceInfo &L) { |
17738 | return emitOp<>(OP_GTIntAPS, L); |
17739 | } |
17740 | bool ByteCodeEmitter::emitGTBool(const SourceInfo &L) { |
17741 | return emitOp<>(OP_GTBool, L); |
17742 | } |
17743 | bool ByteCodeEmitter::emitGTFixedPoint(const SourceInfo &L) { |
17744 | return emitOp<>(OP_GTFixedPoint, L); |
17745 | } |
17746 | bool ByteCodeEmitter::emitGTPtr(const SourceInfo &L) { |
17747 | return emitOp<>(OP_GTPtr, L); |
17748 | } |
17749 | bool ByteCodeEmitter::emitGTFloat(const SourceInfo &L) { |
17750 | return emitOp<>(OP_GTFloat, L); |
17751 | } |
17752 | #endif |
17753 | #ifdef GET_EVAL_IMPL |
17754 | bool EvalEmitter::emitGTSint8(const SourceInfo &L) { |
17755 | if (!isActive()) return true; |
17756 | CurrentSource = L; |
17757 | return GT<PT_Sint8>(S, OpPC); |
17758 | } |
17759 | bool EvalEmitter::emitGTUint8(const SourceInfo &L) { |
17760 | if (!isActive()) return true; |
17761 | CurrentSource = L; |
17762 | return GT<PT_Uint8>(S, OpPC); |
17763 | } |
17764 | bool EvalEmitter::emitGTSint16(const SourceInfo &L) { |
17765 | if (!isActive()) return true; |
17766 | CurrentSource = L; |
17767 | return GT<PT_Sint16>(S, OpPC); |
17768 | } |
17769 | bool EvalEmitter::emitGTUint16(const SourceInfo &L) { |
17770 | if (!isActive()) return true; |
17771 | CurrentSource = L; |
17772 | return GT<PT_Uint16>(S, OpPC); |
17773 | } |
17774 | bool EvalEmitter::emitGTSint32(const SourceInfo &L) { |
17775 | if (!isActive()) return true; |
17776 | CurrentSource = L; |
17777 | return GT<PT_Sint32>(S, OpPC); |
17778 | } |
17779 | bool EvalEmitter::emitGTUint32(const SourceInfo &L) { |
17780 | if (!isActive()) return true; |
17781 | CurrentSource = L; |
17782 | return GT<PT_Uint32>(S, OpPC); |
17783 | } |
17784 | bool EvalEmitter::emitGTSint64(const SourceInfo &L) { |
17785 | if (!isActive()) return true; |
17786 | CurrentSource = L; |
17787 | return GT<PT_Sint64>(S, OpPC); |
17788 | } |
17789 | bool EvalEmitter::emitGTUint64(const SourceInfo &L) { |
17790 | if (!isActive()) return true; |
17791 | CurrentSource = L; |
17792 | return GT<PT_Uint64>(S, OpPC); |
17793 | } |
17794 | bool EvalEmitter::emitGTIntAP(const SourceInfo &L) { |
17795 | if (!isActive()) return true; |
17796 | CurrentSource = L; |
17797 | return GT<PT_IntAP>(S, OpPC); |
17798 | } |
17799 | bool EvalEmitter::emitGTIntAPS(const SourceInfo &L) { |
17800 | if (!isActive()) return true; |
17801 | CurrentSource = L; |
17802 | return GT<PT_IntAPS>(S, OpPC); |
17803 | } |
17804 | bool EvalEmitter::emitGTBool(const SourceInfo &L) { |
17805 | if (!isActive()) return true; |
17806 | CurrentSource = L; |
17807 | return GT<PT_Bool>(S, OpPC); |
17808 | } |
17809 | bool EvalEmitter::emitGTFixedPoint(const SourceInfo &L) { |
17810 | if (!isActive()) return true; |
17811 | CurrentSource = L; |
17812 | return GT<PT_FixedPoint>(S, OpPC); |
17813 | } |
17814 | bool EvalEmitter::emitGTPtr(const SourceInfo &L) { |
17815 | if (!isActive()) return true; |
17816 | CurrentSource = L; |
17817 | return GT<PT_Ptr>(S, OpPC); |
17818 | } |
17819 | bool EvalEmitter::emitGTFloat(const SourceInfo &L) { |
17820 | if (!isActive()) return true; |
17821 | CurrentSource = L; |
17822 | return GT<PT_Float>(S, OpPC); |
17823 | } |
17824 | #endif |
17825 | #ifdef GET_OPCODE_NAMES |
17826 | OP_GetFieldSint8, |
17827 | OP_GetFieldUint8, |
17828 | OP_GetFieldSint16, |
17829 | OP_GetFieldUint16, |
17830 | OP_GetFieldSint32, |
17831 | OP_GetFieldUint32, |
17832 | OP_GetFieldSint64, |
17833 | OP_GetFieldUint64, |
17834 | OP_GetFieldIntAP, |
17835 | OP_GetFieldIntAPS, |
17836 | OP_GetFieldBool, |
17837 | OP_GetFieldFixedPoint, |
17838 | OP_GetFieldPtr, |
17839 | OP_GetFieldMemberPtr, |
17840 | OP_GetFieldFloat, |
17841 | #endif |
17842 | #ifdef GET_INTERP |
17843 | case OP_GetFieldSint8: { |
17844 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17845 | if (!GetField<PT_Sint8>(S, OpPC, V0)) |
17846 | return false; |
17847 | continue; |
17848 | } |
17849 | case OP_GetFieldUint8: { |
17850 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17851 | if (!GetField<PT_Uint8>(S, OpPC, V0)) |
17852 | return false; |
17853 | continue; |
17854 | } |
17855 | case OP_GetFieldSint16: { |
17856 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17857 | if (!GetField<PT_Sint16>(S, OpPC, V0)) |
17858 | return false; |
17859 | continue; |
17860 | } |
17861 | case OP_GetFieldUint16: { |
17862 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17863 | if (!GetField<PT_Uint16>(S, OpPC, V0)) |
17864 | return false; |
17865 | continue; |
17866 | } |
17867 | case OP_GetFieldSint32: { |
17868 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17869 | if (!GetField<PT_Sint32>(S, OpPC, V0)) |
17870 | return false; |
17871 | continue; |
17872 | } |
17873 | case OP_GetFieldUint32: { |
17874 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17875 | if (!GetField<PT_Uint32>(S, OpPC, V0)) |
17876 | return false; |
17877 | continue; |
17878 | } |
17879 | case OP_GetFieldSint64: { |
17880 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17881 | if (!GetField<PT_Sint64>(S, OpPC, V0)) |
17882 | return false; |
17883 | continue; |
17884 | } |
17885 | case OP_GetFieldUint64: { |
17886 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17887 | if (!GetField<PT_Uint64>(S, OpPC, V0)) |
17888 | return false; |
17889 | continue; |
17890 | } |
17891 | case OP_GetFieldIntAP: { |
17892 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17893 | if (!GetField<PT_IntAP>(S, OpPC, V0)) |
17894 | return false; |
17895 | continue; |
17896 | } |
17897 | case OP_GetFieldIntAPS: { |
17898 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17899 | if (!GetField<PT_IntAPS>(S, OpPC, V0)) |
17900 | return false; |
17901 | continue; |
17902 | } |
17903 | case OP_GetFieldBool: { |
17904 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17905 | if (!GetField<PT_Bool>(S, OpPC, V0)) |
17906 | return false; |
17907 | continue; |
17908 | } |
17909 | case OP_GetFieldFixedPoint: { |
17910 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17911 | if (!GetField<PT_FixedPoint>(S, OpPC, V0)) |
17912 | return false; |
17913 | continue; |
17914 | } |
17915 | case OP_GetFieldPtr: { |
17916 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17917 | if (!GetField<PT_Ptr>(S, OpPC, V0)) |
17918 | return false; |
17919 | continue; |
17920 | } |
17921 | case OP_GetFieldMemberPtr: { |
17922 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17923 | if (!GetField<PT_MemberPtr>(S, OpPC, V0)) |
17924 | return false; |
17925 | continue; |
17926 | } |
17927 | case OP_GetFieldFloat: { |
17928 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17929 | if (!GetField<PT_Float>(S, OpPC, V0)) |
17930 | return false; |
17931 | continue; |
17932 | } |
17933 | #endif |
17934 | #ifdef GET_DISASM |
17935 | case OP_GetFieldSint8: |
17936 | Text.Op = PrintName("GetFieldSint8" ); |
17937 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17938 | break; |
17939 | case OP_GetFieldUint8: |
17940 | Text.Op = PrintName("GetFieldUint8" ); |
17941 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17942 | break; |
17943 | case OP_GetFieldSint16: |
17944 | Text.Op = PrintName("GetFieldSint16" ); |
17945 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17946 | break; |
17947 | case OP_GetFieldUint16: |
17948 | Text.Op = PrintName("GetFieldUint16" ); |
17949 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17950 | break; |
17951 | case OP_GetFieldSint32: |
17952 | Text.Op = PrintName("GetFieldSint32" ); |
17953 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17954 | break; |
17955 | case OP_GetFieldUint32: |
17956 | Text.Op = PrintName("GetFieldUint32" ); |
17957 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17958 | break; |
17959 | case OP_GetFieldSint64: |
17960 | Text.Op = PrintName("GetFieldSint64" ); |
17961 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17962 | break; |
17963 | case OP_GetFieldUint64: |
17964 | Text.Op = PrintName("GetFieldUint64" ); |
17965 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17966 | break; |
17967 | case OP_GetFieldIntAP: |
17968 | Text.Op = PrintName("GetFieldIntAP" ); |
17969 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17970 | break; |
17971 | case OP_GetFieldIntAPS: |
17972 | Text.Op = PrintName("GetFieldIntAPS" ); |
17973 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17974 | break; |
17975 | case OP_GetFieldBool: |
17976 | Text.Op = PrintName("GetFieldBool" ); |
17977 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17978 | break; |
17979 | case OP_GetFieldFixedPoint: |
17980 | Text.Op = PrintName("GetFieldFixedPoint" ); |
17981 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17982 | break; |
17983 | case OP_GetFieldPtr: |
17984 | Text.Op = PrintName("GetFieldPtr" ); |
17985 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17986 | break; |
17987 | case OP_GetFieldMemberPtr: |
17988 | Text.Op = PrintName("GetFieldMemberPtr" ); |
17989 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17990 | break; |
17991 | case OP_GetFieldFloat: |
17992 | Text.Op = PrintName("GetFieldFloat" ); |
17993 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
17994 | break; |
17995 | #endif |
17996 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17997 | bool emitGetFieldSint8( uint32_t , const SourceInfo &); |
17998 | bool emitGetFieldUint8( uint32_t , const SourceInfo &); |
17999 | bool emitGetFieldSint16( uint32_t , const SourceInfo &); |
18000 | bool emitGetFieldUint16( uint32_t , const SourceInfo &); |
18001 | bool emitGetFieldSint32( uint32_t , const SourceInfo &); |
18002 | bool emitGetFieldUint32( uint32_t , const SourceInfo &); |
18003 | bool emitGetFieldSint64( uint32_t , const SourceInfo &); |
18004 | bool emitGetFieldUint64( uint32_t , const SourceInfo &); |
18005 | bool emitGetFieldIntAP( uint32_t , const SourceInfo &); |
18006 | bool emitGetFieldIntAPS( uint32_t , const SourceInfo &); |
18007 | bool emitGetFieldBool( uint32_t , const SourceInfo &); |
18008 | bool emitGetFieldFixedPoint( uint32_t , const SourceInfo &); |
18009 | bool emitGetFieldPtr( uint32_t , const SourceInfo &); |
18010 | bool emitGetFieldMemberPtr( uint32_t , const SourceInfo &); |
18011 | bool emitGetFieldFloat( uint32_t , const SourceInfo &); |
18012 | #endif |
18013 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18014 | [[nodiscard]] bool emitGetField(PrimType, uint32_t, const SourceInfo &I); |
18015 | #endif |
18016 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
18017 | bool |
18018 | #if defined(GET_EVAL_IMPL) |
18019 | EvalEmitter |
18020 | #else |
18021 | ByteCodeEmitter |
18022 | #endif |
18023 | ::emitGetField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
18024 | switch (T0) { |
18025 | case PT_Sint8: |
18026 | return emitGetFieldSint8(A0, I); |
18027 | case PT_Uint8: |
18028 | return emitGetFieldUint8(A0, I); |
18029 | case PT_Sint16: |
18030 | return emitGetFieldSint16(A0, I); |
18031 | case PT_Uint16: |
18032 | return emitGetFieldUint16(A0, I); |
18033 | case PT_Sint32: |
18034 | return emitGetFieldSint32(A0, I); |
18035 | case PT_Uint32: |
18036 | return emitGetFieldUint32(A0, I); |
18037 | case PT_Sint64: |
18038 | return emitGetFieldSint64(A0, I); |
18039 | case PT_Uint64: |
18040 | return emitGetFieldUint64(A0, I); |
18041 | case PT_IntAP: |
18042 | return emitGetFieldIntAP(A0, I); |
18043 | case PT_IntAPS: |
18044 | return emitGetFieldIntAPS(A0, I); |
18045 | case PT_Bool: |
18046 | return emitGetFieldBool(A0, I); |
18047 | case PT_FixedPoint: |
18048 | return emitGetFieldFixedPoint(A0, I); |
18049 | case PT_Ptr: |
18050 | return emitGetFieldPtr(A0, I); |
18051 | case PT_MemberPtr: |
18052 | return emitGetFieldMemberPtr(A0, I); |
18053 | case PT_Float: |
18054 | return emitGetFieldFloat(A0, I); |
18055 | } |
18056 | llvm_unreachable("invalid enum value" ); |
18057 | } |
18058 | #endif |
18059 | #ifdef GET_LINK_IMPL |
18060 | bool ByteCodeEmitter::emitGetFieldSint8( uint32_t A0, const SourceInfo &L) { |
18061 | return emitOp<uint32_t>(OP_GetFieldSint8, A0, L); |
18062 | } |
18063 | bool ByteCodeEmitter::emitGetFieldUint8( uint32_t A0, const SourceInfo &L) { |
18064 | return emitOp<uint32_t>(OP_GetFieldUint8, A0, L); |
18065 | } |
18066 | bool ByteCodeEmitter::emitGetFieldSint16( uint32_t A0, const SourceInfo &L) { |
18067 | return emitOp<uint32_t>(OP_GetFieldSint16, A0, L); |
18068 | } |
18069 | bool ByteCodeEmitter::emitGetFieldUint16( uint32_t A0, const SourceInfo &L) { |
18070 | return emitOp<uint32_t>(OP_GetFieldUint16, A0, L); |
18071 | } |
18072 | bool ByteCodeEmitter::emitGetFieldSint32( uint32_t A0, const SourceInfo &L) { |
18073 | return emitOp<uint32_t>(OP_GetFieldSint32, A0, L); |
18074 | } |
18075 | bool ByteCodeEmitter::emitGetFieldUint32( uint32_t A0, const SourceInfo &L) { |
18076 | return emitOp<uint32_t>(OP_GetFieldUint32, A0, L); |
18077 | } |
18078 | bool ByteCodeEmitter::emitGetFieldSint64( uint32_t A0, const SourceInfo &L) { |
18079 | return emitOp<uint32_t>(OP_GetFieldSint64, A0, L); |
18080 | } |
18081 | bool ByteCodeEmitter::emitGetFieldUint64( uint32_t A0, const SourceInfo &L) { |
18082 | return emitOp<uint32_t>(OP_GetFieldUint64, A0, L); |
18083 | } |
18084 | bool ByteCodeEmitter::emitGetFieldIntAP( uint32_t A0, const SourceInfo &L) { |
18085 | return emitOp<uint32_t>(OP_GetFieldIntAP, A0, L); |
18086 | } |
18087 | bool ByteCodeEmitter::emitGetFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
18088 | return emitOp<uint32_t>(OP_GetFieldIntAPS, A0, L); |
18089 | } |
18090 | bool ByteCodeEmitter::emitGetFieldBool( uint32_t A0, const SourceInfo &L) { |
18091 | return emitOp<uint32_t>(OP_GetFieldBool, A0, L); |
18092 | } |
18093 | bool ByteCodeEmitter::emitGetFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
18094 | return emitOp<uint32_t>(OP_GetFieldFixedPoint, A0, L); |
18095 | } |
18096 | bool ByteCodeEmitter::emitGetFieldPtr( uint32_t A0, const SourceInfo &L) { |
18097 | return emitOp<uint32_t>(OP_GetFieldPtr, A0, L); |
18098 | } |
18099 | bool ByteCodeEmitter::emitGetFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
18100 | return emitOp<uint32_t>(OP_GetFieldMemberPtr, A0, L); |
18101 | } |
18102 | bool ByteCodeEmitter::emitGetFieldFloat( uint32_t A0, const SourceInfo &L) { |
18103 | return emitOp<uint32_t>(OP_GetFieldFloat, A0, L); |
18104 | } |
18105 | #endif |
18106 | #ifdef GET_EVAL_IMPL |
18107 | bool EvalEmitter::emitGetFieldSint8( uint32_t A0, const SourceInfo &L) { |
18108 | if (!isActive()) return true; |
18109 | CurrentSource = L; |
18110 | return GetField<PT_Sint8>(S, OpPC, A0); |
18111 | } |
18112 | bool EvalEmitter::emitGetFieldUint8( uint32_t A0, const SourceInfo &L) { |
18113 | if (!isActive()) return true; |
18114 | CurrentSource = L; |
18115 | return GetField<PT_Uint8>(S, OpPC, A0); |
18116 | } |
18117 | bool EvalEmitter::emitGetFieldSint16( uint32_t A0, const SourceInfo &L) { |
18118 | if (!isActive()) return true; |
18119 | CurrentSource = L; |
18120 | return GetField<PT_Sint16>(S, OpPC, A0); |
18121 | } |
18122 | bool EvalEmitter::emitGetFieldUint16( uint32_t A0, const SourceInfo &L) { |
18123 | if (!isActive()) return true; |
18124 | CurrentSource = L; |
18125 | return GetField<PT_Uint16>(S, OpPC, A0); |
18126 | } |
18127 | bool EvalEmitter::emitGetFieldSint32( uint32_t A0, const SourceInfo &L) { |
18128 | if (!isActive()) return true; |
18129 | CurrentSource = L; |
18130 | return GetField<PT_Sint32>(S, OpPC, A0); |
18131 | } |
18132 | bool EvalEmitter::emitGetFieldUint32( uint32_t A0, const SourceInfo &L) { |
18133 | if (!isActive()) return true; |
18134 | CurrentSource = L; |
18135 | return GetField<PT_Uint32>(S, OpPC, A0); |
18136 | } |
18137 | bool EvalEmitter::emitGetFieldSint64( uint32_t A0, const SourceInfo &L) { |
18138 | if (!isActive()) return true; |
18139 | CurrentSource = L; |
18140 | return GetField<PT_Sint64>(S, OpPC, A0); |
18141 | } |
18142 | bool EvalEmitter::emitGetFieldUint64( uint32_t A0, const SourceInfo &L) { |
18143 | if (!isActive()) return true; |
18144 | CurrentSource = L; |
18145 | return GetField<PT_Uint64>(S, OpPC, A0); |
18146 | } |
18147 | bool EvalEmitter::emitGetFieldIntAP( uint32_t A0, const SourceInfo &L) { |
18148 | if (!isActive()) return true; |
18149 | CurrentSource = L; |
18150 | return GetField<PT_IntAP>(S, OpPC, A0); |
18151 | } |
18152 | bool EvalEmitter::emitGetFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
18153 | if (!isActive()) return true; |
18154 | CurrentSource = L; |
18155 | return GetField<PT_IntAPS>(S, OpPC, A0); |
18156 | } |
18157 | bool EvalEmitter::emitGetFieldBool( uint32_t A0, const SourceInfo &L) { |
18158 | if (!isActive()) return true; |
18159 | CurrentSource = L; |
18160 | return GetField<PT_Bool>(S, OpPC, A0); |
18161 | } |
18162 | bool EvalEmitter::emitGetFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
18163 | if (!isActive()) return true; |
18164 | CurrentSource = L; |
18165 | return GetField<PT_FixedPoint>(S, OpPC, A0); |
18166 | } |
18167 | bool EvalEmitter::emitGetFieldPtr( uint32_t A0, const SourceInfo &L) { |
18168 | if (!isActive()) return true; |
18169 | CurrentSource = L; |
18170 | return GetField<PT_Ptr>(S, OpPC, A0); |
18171 | } |
18172 | bool EvalEmitter::emitGetFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
18173 | if (!isActive()) return true; |
18174 | CurrentSource = L; |
18175 | return GetField<PT_MemberPtr>(S, OpPC, A0); |
18176 | } |
18177 | bool EvalEmitter::emitGetFieldFloat( uint32_t A0, const SourceInfo &L) { |
18178 | if (!isActive()) return true; |
18179 | CurrentSource = L; |
18180 | return GetField<PT_Float>(S, OpPC, A0); |
18181 | } |
18182 | #endif |
18183 | #ifdef GET_OPCODE_NAMES |
18184 | OP_GetFieldPopSint8, |
18185 | OP_GetFieldPopUint8, |
18186 | OP_GetFieldPopSint16, |
18187 | OP_GetFieldPopUint16, |
18188 | OP_GetFieldPopSint32, |
18189 | OP_GetFieldPopUint32, |
18190 | OP_GetFieldPopSint64, |
18191 | OP_GetFieldPopUint64, |
18192 | OP_GetFieldPopIntAP, |
18193 | OP_GetFieldPopIntAPS, |
18194 | OP_GetFieldPopBool, |
18195 | OP_GetFieldPopFixedPoint, |
18196 | OP_GetFieldPopPtr, |
18197 | OP_GetFieldPopMemberPtr, |
18198 | OP_GetFieldPopFloat, |
18199 | #endif |
18200 | #ifdef GET_INTERP |
18201 | case OP_GetFieldPopSint8: { |
18202 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18203 | if (!GetFieldPop<PT_Sint8>(S, OpPC, V0)) |
18204 | return false; |
18205 | continue; |
18206 | } |
18207 | case OP_GetFieldPopUint8: { |
18208 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18209 | if (!GetFieldPop<PT_Uint8>(S, OpPC, V0)) |
18210 | return false; |
18211 | continue; |
18212 | } |
18213 | case OP_GetFieldPopSint16: { |
18214 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18215 | if (!GetFieldPop<PT_Sint16>(S, OpPC, V0)) |
18216 | return false; |
18217 | continue; |
18218 | } |
18219 | case OP_GetFieldPopUint16: { |
18220 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18221 | if (!GetFieldPop<PT_Uint16>(S, OpPC, V0)) |
18222 | return false; |
18223 | continue; |
18224 | } |
18225 | case OP_GetFieldPopSint32: { |
18226 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18227 | if (!GetFieldPop<PT_Sint32>(S, OpPC, V0)) |
18228 | return false; |
18229 | continue; |
18230 | } |
18231 | case OP_GetFieldPopUint32: { |
18232 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18233 | if (!GetFieldPop<PT_Uint32>(S, OpPC, V0)) |
18234 | return false; |
18235 | continue; |
18236 | } |
18237 | case OP_GetFieldPopSint64: { |
18238 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18239 | if (!GetFieldPop<PT_Sint64>(S, OpPC, V0)) |
18240 | return false; |
18241 | continue; |
18242 | } |
18243 | case OP_GetFieldPopUint64: { |
18244 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18245 | if (!GetFieldPop<PT_Uint64>(S, OpPC, V0)) |
18246 | return false; |
18247 | continue; |
18248 | } |
18249 | case OP_GetFieldPopIntAP: { |
18250 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18251 | if (!GetFieldPop<PT_IntAP>(S, OpPC, V0)) |
18252 | return false; |
18253 | continue; |
18254 | } |
18255 | case OP_GetFieldPopIntAPS: { |
18256 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18257 | if (!GetFieldPop<PT_IntAPS>(S, OpPC, V0)) |
18258 | return false; |
18259 | continue; |
18260 | } |
18261 | case OP_GetFieldPopBool: { |
18262 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18263 | if (!GetFieldPop<PT_Bool>(S, OpPC, V0)) |
18264 | return false; |
18265 | continue; |
18266 | } |
18267 | case OP_GetFieldPopFixedPoint: { |
18268 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18269 | if (!GetFieldPop<PT_FixedPoint>(S, OpPC, V0)) |
18270 | return false; |
18271 | continue; |
18272 | } |
18273 | case OP_GetFieldPopPtr: { |
18274 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18275 | if (!GetFieldPop<PT_Ptr>(S, OpPC, V0)) |
18276 | return false; |
18277 | continue; |
18278 | } |
18279 | case OP_GetFieldPopMemberPtr: { |
18280 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18281 | if (!GetFieldPop<PT_MemberPtr>(S, OpPC, V0)) |
18282 | return false; |
18283 | continue; |
18284 | } |
18285 | case OP_GetFieldPopFloat: { |
18286 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18287 | if (!GetFieldPop<PT_Float>(S, OpPC, V0)) |
18288 | return false; |
18289 | continue; |
18290 | } |
18291 | #endif |
18292 | #ifdef GET_DISASM |
18293 | case OP_GetFieldPopSint8: |
18294 | Text.Op = PrintName("GetFieldPopSint8" ); |
18295 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18296 | break; |
18297 | case OP_GetFieldPopUint8: |
18298 | Text.Op = PrintName("GetFieldPopUint8" ); |
18299 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18300 | break; |
18301 | case OP_GetFieldPopSint16: |
18302 | Text.Op = PrintName("GetFieldPopSint16" ); |
18303 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18304 | break; |
18305 | case OP_GetFieldPopUint16: |
18306 | Text.Op = PrintName("GetFieldPopUint16" ); |
18307 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18308 | break; |
18309 | case OP_GetFieldPopSint32: |
18310 | Text.Op = PrintName("GetFieldPopSint32" ); |
18311 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18312 | break; |
18313 | case OP_GetFieldPopUint32: |
18314 | Text.Op = PrintName("GetFieldPopUint32" ); |
18315 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18316 | break; |
18317 | case OP_GetFieldPopSint64: |
18318 | Text.Op = PrintName("GetFieldPopSint64" ); |
18319 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18320 | break; |
18321 | case OP_GetFieldPopUint64: |
18322 | Text.Op = PrintName("GetFieldPopUint64" ); |
18323 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18324 | break; |
18325 | case OP_GetFieldPopIntAP: |
18326 | Text.Op = PrintName("GetFieldPopIntAP" ); |
18327 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18328 | break; |
18329 | case OP_GetFieldPopIntAPS: |
18330 | Text.Op = PrintName("GetFieldPopIntAPS" ); |
18331 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18332 | break; |
18333 | case OP_GetFieldPopBool: |
18334 | Text.Op = PrintName("GetFieldPopBool" ); |
18335 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18336 | break; |
18337 | case OP_GetFieldPopFixedPoint: |
18338 | Text.Op = PrintName("GetFieldPopFixedPoint" ); |
18339 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18340 | break; |
18341 | case OP_GetFieldPopPtr: |
18342 | Text.Op = PrintName("GetFieldPopPtr" ); |
18343 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18344 | break; |
18345 | case OP_GetFieldPopMemberPtr: |
18346 | Text.Op = PrintName("GetFieldPopMemberPtr" ); |
18347 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18348 | break; |
18349 | case OP_GetFieldPopFloat: |
18350 | Text.Op = PrintName("GetFieldPopFloat" ); |
18351 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18352 | break; |
18353 | #endif |
18354 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18355 | bool emitGetFieldPopSint8( uint32_t , const SourceInfo &); |
18356 | bool emitGetFieldPopUint8( uint32_t , const SourceInfo &); |
18357 | bool emitGetFieldPopSint16( uint32_t , const SourceInfo &); |
18358 | bool emitGetFieldPopUint16( uint32_t , const SourceInfo &); |
18359 | bool emitGetFieldPopSint32( uint32_t , const SourceInfo &); |
18360 | bool emitGetFieldPopUint32( uint32_t , const SourceInfo &); |
18361 | bool emitGetFieldPopSint64( uint32_t , const SourceInfo &); |
18362 | bool emitGetFieldPopUint64( uint32_t , const SourceInfo &); |
18363 | bool emitGetFieldPopIntAP( uint32_t , const SourceInfo &); |
18364 | bool emitGetFieldPopIntAPS( uint32_t , const SourceInfo &); |
18365 | bool emitGetFieldPopBool( uint32_t , const SourceInfo &); |
18366 | bool emitGetFieldPopFixedPoint( uint32_t , const SourceInfo &); |
18367 | bool emitGetFieldPopPtr( uint32_t , const SourceInfo &); |
18368 | bool emitGetFieldPopMemberPtr( uint32_t , const SourceInfo &); |
18369 | bool emitGetFieldPopFloat( uint32_t , const SourceInfo &); |
18370 | #endif |
18371 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18372 | [[nodiscard]] bool emitGetFieldPop(PrimType, uint32_t, const SourceInfo &I); |
18373 | #endif |
18374 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
18375 | bool |
18376 | #if defined(GET_EVAL_IMPL) |
18377 | EvalEmitter |
18378 | #else |
18379 | ByteCodeEmitter |
18380 | #endif |
18381 | ::emitGetFieldPop(PrimType T0, uint32_t A0, const SourceInfo &I) { |
18382 | switch (T0) { |
18383 | case PT_Sint8: |
18384 | return emitGetFieldPopSint8(A0, I); |
18385 | case PT_Uint8: |
18386 | return emitGetFieldPopUint8(A0, I); |
18387 | case PT_Sint16: |
18388 | return emitGetFieldPopSint16(A0, I); |
18389 | case PT_Uint16: |
18390 | return emitGetFieldPopUint16(A0, I); |
18391 | case PT_Sint32: |
18392 | return emitGetFieldPopSint32(A0, I); |
18393 | case PT_Uint32: |
18394 | return emitGetFieldPopUint32(A0, I); |
18395 | case PT_Sint64: |
18396 | return emitGetFieldPopSint64(A0, I); |
18397 | case PT_Uint64: |
18398 | return emitGetFieldPopUint64(A0, I); |
18399 | case PT_IntAP: |
18400 | return emitGetFieldPopIntAP(A0, I); |
18401 | case PT_IntAPS: |
18402 | return emitGetFieldPopIntAPS(A0, I); |
18403 | case PT_Bool: |
18404 | return emitGetFieldPopBool(A0, I); |
18405 | case PT_FixedPoint: |
18406 | return emitGetFieldPopFixedPoint(A0, I); |
18407 | case PT_Ptr: |
18408 | return emitGetFieldPopPtr(A0, I); |
18409 | case PT_MemberPtr: |
18410 | return emitGetFieldPopMemberPtr(A0, I); |
18411 | case PT_Float: |
18412 | return emitGetFieldPopFloat(A0, I); |
18413 | } |
18414 | llvm_unreachable("invalid enum value" ); |
18415 | } |
18416 | #endif |
18417 | #ifdef GET_LINK_IMPL |
18418 | bool ByteCodeEmitter::emitGetFieldPopSint8( uint32_t A0, const SourceInfo &L) { |
18419 | return emitOp<uint32_t>(OP_GetFieldPopSint8, A0, L); |
18420 | } |
18421 | bool ByteCodeEmitter::emitGetFieldPopUint8( uint32_t A0, const SourceInfo &L) { |
18422 | return emitOp<uint32_t>(OP_GetFieldPopUint8, A0, L); |
18423 | } |
18424 | bool ByteCodeEmitter::emitGetFieldPopSint16( uint32_t A0, const SourceInfo &L) { |
18425 | return emitOp<uint32_t>(OP_GetFieldPopSint16, A0, L); |
18426 | } |
18427 | bool ByteCodeEmitter::emitGetFieldPopUint16( uint32_t A0, const SourceInfo &L) { |
18428 | return emitOp<uint32_t>(OP_GetFieldPopUint16, A0, L); |
18429 | } |
18430 | bool ByteCodeEmitter::emitGetFieldPopSint32( uint32_t A0, const SourceInfo &L) { |
18431 | return emitOp<uint32_t>(OP_GetFieldPopSint32, A0, L); |
18432 | } |
18433 | bool ByteCodeEmitter::emitGetFieldPopUint32( uint32_t A0, const SourceInfo &L) { |
18434 | return emitOp<uint32_t>(OP_GetFieldPopUint32, A0, L); |
18435 | } |
18436 | bool ByteCodeEmitter::emitGetFieldPopSint64( uint32_t A0, const SourceInfo &L) { |
18437 | return emitOp<uint32_t>(OP_GetFieldPopSint64, A0, L); |
18438 | } |
18439 | bool ByteCodeEmitter::emitGetFieldPopUint64( uint32_t A0, const SourceInfo &L) { |
18440 | return emitOp<uint32_t>(OP_GetFieldPopUint64, A0, L); |
18441 | } |
18442 | bool ByteCodeEmitter::emitGetFieldPopIntAP( uint32_t A0, const SourceInfo &L) { |
18443 | return emitOp<uint32_t>(OP_GetFieldPopIntAP, A0, L); |
18444 | } |
18445 | bool ByteCodeEmitter::emitGetFieldPopIntAPS( uint32_t A0, const SourceInfo &L) { |
18446 | return emitOp<uint32_t>(OP_GetFieldPopIntAPS, A0, L); |
18447 | } |
18448 | bool ByteCodeEmitter::emitGetFieldPopBool( uint32_t A0, const SourceInfo &L) { |
18449 | return emitOp<uint32_t>(OP_GetFieldPopBool, A0, L); |
18450 | } |
18451 | bool ByteCodeEmitter::emitGetFieldPopFixedPoint( uint32_t A0, const SourceInfo &L) { |
18452 | return emitOp<uint32_t>(OP_GetFieldPopFixedPoint, A0, L); |
18453 | } |
18454 | bool ByteCodeEmitter::emitGetFieldPopPtr( uint32_t A0, const SourceInfo &L) { |
18455 | return emitOp<uint32_t>(OP_GetFieldPopPtr, A0, L); |
18456 | } |
18457 | bool ByteCodeEmitter::emitGetFieldPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
18458 | return emitOp<uint32_t>(OP_GetFieldPopMemberPtr, A0, L); |
18459 | } |
18460 | bool ByteCodeEmitter::emitGetFieldPopFloat( uint32_t A0, const SourceInfo &L) { |
18461 | return emitOp<uint32_t>(OP_GetFieldPopFloat, A0, L); |
18462 | } |
18463 | #endif |
18464 | #ifdef GET_EVAL_IMPL |
18465 | bool EvalEmitter::emitGetFieldPopSint8( uint32_t A0, const SourceInfo &L) { |
18466 | if (!isActive()) return true; |
18467 | CurrentSource = L; |
18468 | return GetFieldPop<PT_Sint8>(S, OpPC, A0); |
18469 | } |
18470 | bool EvalEmitter::emitGetFieldPopUint8( uint32_t A0, const SourceInfo &L) { |
18471 | if (!isActive()) return true; |
18472 | CurrentSource = L; |
18473 | return GetFieldPop<PT_Uint8>(S, OpPC, A0); |
18474 | } |
18475 | bool EvalEmitter::emitGetFieldPopSint16( uint32_t A0, const SourceInfo &L) { |
18476 | if (!isActive()) return true; |
18477 | CurrentSource = L; |
18478 | return GetFieldPop<PT_Sint16>(S, OpPC, A0); |
18479 | } |
18480 | bool EvalEmitter::emitGetFieldPopUint16( uint32_t A0, const SourceInfo &L) { |
18481 | if (!isActive()) return true; |
18482 | CurrentSource = L; |
18483 | return GetFieldPop<PT_Uint16>(S, OpPC, A0); |
18484 | } |
18485 | bool EvalEmitter::emitGetFieldPopSint32( uint32_t A0, const SourceInfo &L) { |
18486 | if (!isActive()) return true; |
18487 | CurrentSource = L; |
18488 | return GetFieldPop<PT_Sint32>(S, OpPC, A0); |
18489 | } |
18490 | bool EvalEmitter::emitGetFieldPopUint32( uint32_t A0, const SourceInfo &L) { |
18491 | if (!isActive()) return true; |
18492 | CurrentSource = L; |
18493 | return GetFieldPop<PT_Uint32>(S, OpPC, A0); |
18494 | } |
18495 | bool EvalEmitter::emitGetFieldPopSint64( uint32_t A0, const SourceInfo &L) { |
18496 | if (!isActive()) return true; |
18497 | CurrentSource = L; |
18498 | return GetFieldPop<PT_Sint64>(S, OpPC, A0); |
18499 | } |
18500 | bool EvalEmitter::emitGetFieldPopUint64( uint32_t A0, const SourceInfo &L) { |
18501 | if (!isActive()) return true; |
18502 | CurrentSource = L; |
18503 | return GetFieldPop<PT_Uint64>(S, OpPC, A0); |
18504 | } |
18505 | bool EvalEmitter::emitGetFieldPopIntAP( uint32_t A0, const SourceInfo &L) { |
18506 | if (!isActive()) return true; |
18507 | CurrentSource = L; |
18508 | return GetFieldPop<PT_IntAP>(S, OpPC, A0); |
18509 | } |
18510 | bool EvalEmitter::emitGetFieldPopIntAPS( uint32_t A0, const SourceInfo &L) { |
18511 | if (!isActive()) return true; |
18512 | CurrentSource = L; |
18513 | return GetFieldPop<PT_IntAPS>(S, OpPC, A0); |
18514 | } |
18515 | bool EvalEmitter::emitGetFieldPopBool( uint32_t A0, const SourceInfo &L) { |
18516 | if (!isActive()) return true; |
18517 | CurrentSource = L; |
18518 | return GetFieldPop<PT_Bool>(S, OpPC, A0); |
18519 | } |
18520 | bool EvalEmitter::emitGetFieldPopFixedPoint( uint32_t A0, const SourceInfo &L) { |
18521 | if (!isActive()) return true; |
18522 | CurrentSource = L; |
18523 | return GetFieldPop<PT_FixedPoint>(S, OpPC, A0); |
18524 | } |
18525 | bool EvalEmitter::emitGetFieldPopPtr( uint32_t A0, const SourceInfo &L) { |
18526 | if (!isActive()) return true; |
18527 | CurrentSource = L; |
18528 | return GetFieldPop<PT_Ptr>(S, OpPC, A0); |
18529 | } |
18530 | bool EvalEmitter::emitGetFieldPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
18531 | if (!isActive()) return true; |
18532 | CurrentSource = L; |
18533 | return GetFieldPop<PT_MemberPtr>(S, OpPC, A0); |
18534 | } |
18535 | bool EvalEmitter::emitGetFieldPopFloat( uint32_t A0, const SourceInfo &L) { |
18536 | if (!isActive()) return true; |
18537 | CurrentSource = L; |
18538 | return GetFieldPop<PT_Float>(S, OpPC, A0); |
18539 | } |
18540 | #endif |
18541 | #ifdef GET_OPCODE_NAMES |
18542 | OP_GetFnPtr, |
18543 | #endif |
18544 | #ifdef GET_INTERP |
18545 | case OP_GetFnPtr: { |
18546 | const auto V0 = ReadArg<const Function *>(S, PC); |
18547 | if (!GetFnPtr(S, OpPC, V0)) |
18548 | return false; |
18549 | continue; |
18550 | } |
18551 | #endif |
18552 | #ifdef GET_DISASM |
18553 | case OP_GetFnPtr: |
18554 | Text.Op = PrintName("GetFnPtr" ); |
18555 | Text.Args.push_back(printArg<const Function *>(P, PC)); |
18556 | break; |
18557 | #endif |
18558 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18559 | bool emitGetFnPtr( const Function * , const SourceInfo &); |
18560 | #endif |
18561 | #ifdef GET_LINK_IMPL |
18562 | bool ByteCodeEmitter::emitGetFnPtr( const Function * A0, const SourceInfo &L) { |
18563 | return emitOp<const Function *>(OP_GetFnPtr, A0, L); |
18564 | } |
18565 | #endif |
18566 | #ifdef GET_EVAL_IMPL |
18567 | bool EvalEmitter::emitGetFnPtr( const Function * A0, const SourceInfo &L) { |
18568 | if (!isActive()) return true; |
18569 | CurrentSource = L; |
18570 | return GetFnPtr(S, OpPC, A0); |
18571 | } |
18572 | #endif |
18573 | #ifdef GET_OPCODE_NAMES |
18574 | OP_GetGlobalSint8, |
18575 | OP_GetGlobalUint8, |
18576 | OP_GetGlobalSint16, |
18577 | OP_GetGlobalUint16, |
18578 | OP_GetGlobalSint32, |
18579 | OP_GetGlobalUint32, |
18580 | OP_GetGlobalSint64, |
18581 | OP_GetGlobalUint64, |
18582 | OP_GetGlobalIntAP, |
18583 | OP_GetGlobalIntAPS, |
18584 | OP_GetGlobalBool, |
18585 | OP_GetGlobalFixedPoint, |
18586 | OP_GetGlobalPtr, |
18587 | OP_GetGlobalMemberPtr, |
18588 | OP_GetGlobalFloat, |
18589 | #endif |
18590 | #ifdef GET_INTERP |
18591 | case OP_GetGlobalSint8: { |
18592 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18593 | if (!GetGlobal<PT_Sint8>(S, OpPC, V0)) |
18594 | return false; |
18595 | continue; |
18596 | } |
18597 | case OP_GetGlobalUint8: { |
18598 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18599 | if (!GetGlobal<PT_Uint8>(S, OpPC, V0)) |
18600 | return false; |
18601 | continue; |
18602 | } |
18603 | case OP_GetGlobalSint16: { |
18604 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18605 | if (!GetGlobal<PT_Sint16>(S, OpPC, V0)) |
18606 | return false; |
18607 | continue; |
18608 | } |
18609 | case OP_GetGlobalUint16: { |
18610 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18611 | if (!GetGlobal<PT_Uint16>(S, OpPC, V0)) |
18612 | return false; |
18613 | continue; |
18614 | } |
18615 | case OP_GetGlobalSint32: { |
18616 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18617 | if (!GetGlobal<PT_Sint32>(S, OpPC, V0)) |
18618 | return false; |
18619 | continue; |
18620 | } |
18621 | case OP_GetGlobalUint32: { |
18622 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18623 | if (!GetGlobal<PT_Uint32>(S, OpPC, V0)) |
18624 | return false; |
18625 | continue; |
18626 | } |
18627 | case OP_GetGlobalSint64: { |
18628 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18629 | if (!GetGlobal<PT_Sint64>(S, OpPC, V0)) |
18630 | return false; |
18631 | continue; |
18632 | } |
18633 | case OP_GetGlobalUint64: { |
18634 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18635 | if (!GetGlobal<PT_Uint64>(S, OpPC, V0)) |
18636 | return false; |
18637 | continue; |
18638 | } |
18639 | case OP_GetGlobalIntAP: { |
18640 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18641 | if (!GetGlobal<PT_IntAP>(S, OpPC, V0)) |
18642 | return false; |
18643 | continue; |
18644 | } |
18645 | case OP_GetGlobalIntAPS: { |
18646 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18647 | if (!GetGlobal<PT_IntAPS>(S, OpPC, V0)) |
18648 | return false; |
18649 | continue; |
18650 | } |
18651 | case OP_GetGlobalBool: { |
18652 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18653 | if (!GetGlobal<PT_Bool>(S, OpPC, V0)) |
18654 | return false; |
18655 | continue; |
18656 | } |
18657 | case OP_GetGlobalFixedPoint: { |
18658 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18659 | if (!GetGlobal<PT_FixedPoint>(S, OpPC, V0)) |
18660 | return false; |
18661 | continue; |
18662 | } |
18663 | case OP_GetGlobalPtr: { |
18664 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18665 | if (!GetGlobal<PT_Ptr>(S, OpPC, V0)) |
18666 | return false; |
18667 | continue; |
18668 | } |
18669 | case OP_GetGlobalMemberPtr: { |
18670 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18671 | if (!GetGlobal<PT_MemberPtr>(S, OpPC, V0)) |
18672 | return false; |
18673 | continue; |
18674 | } |
18675 | case OP_GetGlobalFloat: { |
18676 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18677 | if (!GetGlobal<PT_Float>(S, OpPC, V0)) |
18678 | return false; |
18679 | continue; |
18680 | } |
18681 | #endif |
18682 | #ifdef GET_DISASM |
18683 | case OP_GetGlobalSint8: |
18684 | Text.Op = PrintName("GetGlobalSint8" ); |
18685 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18686 | break; |
18687 | case OP_GetGlobalUint8: |
18688 | Text.Op = PrintName("GetGlobalUint8" ); |
18689 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18690 | break; |
18691 | case OP_GetGlobalSint16: |
18692 | Text.Op = PrintName("GetGlobalSint16" ); |
18693 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18694 | break; |
18695 | case OP_GetGlobalUint16: |
18696 | Text.Op = PrintName("GetGlobalUint16" ); |
18697 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18698 | break; |
18699 | case OP_GetGlobalSint32: |
18700 | Text.Op = PrintName("GetGlobalSint32" ); |
18701 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18702 | break; |
18703 | case OP_GetGlobalUint32: |
18704 | Text.Op = PrintName("GetGlobalUint32" ); |
18705 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18706 | break; |
18707 | case OP_GetGlobalSint64: |
18708 | Text.Op = PrintName("GetGlobalSint64" ); |
18709 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18710 | break; |
18711 | case OP_GetGlobalUint64: |
18712 | Text.Op = PrintName("GetGlobalUint64" ); |
18713 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18714 | break; |
18715 | case OP_GetGlobalIntAP: |
18716 | Text.Op = PrintName("GetGlobalIntAP" ); |
18717 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18718 | break; |
18719 | case OP_GetGlobalIntAPS: |
18720 | Text.Op = PrintName("GetGlobalIntAPS" ); |
18721 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18722 | break; |
18723 | case OP_GetGlobalBool: |
18724 | Text.Op = PrintName("GetGlobalBool" ); |
18725 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18726 | break; |
18727 | case OP_GetGlobalFixedPoint: |
18728 | Text.Op = PrintName("GetGlobalFixedPoint" ); |
18729 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18730 | break; |
18731 | case OP_GetGlobalPtr: |
18732 | Text.Op = PrintName("GetGlobalPtr" ); |
18733 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18734 | break; |
18735 | case OP_GetGlobalMemberPtr: |
18736 | Text.Op = PrintName("GetGlobalMemberPtr" ); |
18737 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18738 | break; |
18739 | case OP_GetGlobalFloat: |
18740 | Text.Op = PrintName("GetGlobalFloat" ); |
18741 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
18742 | break; |
18743 | #endif |
18744 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18745 | bool emitGetGlobalSint8( uint32_t , const SourceInfo &); |
18746 | bool emitGetGlobalUint8( uint32_t , const SourceInfo &); |
18747 | bool emitGetGlobalSint16( uint32_t , const SourceInfo &); |
18748 | bool emitGetGlobalUint16( uint32_t , const SourceInfo &); |
18749 | bool emitGetGlobalSint32( uint32_t , const SourceInfo &); |
18750 | bool emitGetGlobalUint32( uint32_t , const SourceInfo &); |
18751 | bool emitGetGlobalSint64( uint32_t , const SourceInfo &); |
18752 | bool emitGetGlobalUint64( uint32_t , const SourceInfo &); |
18753 | bool emitGetGlobalIntAP( uint32_t , const SourceInfo &); |
18754 | bool emitGetGlobalIntAPS( uint32_t , const SourceInfo &); |
18755 | bool emitGetGlobalBool( uint32_t , const SourceInfo &); |
18756 | bool emitGetGlobalFixedPoint( uint32_t , const SourceInfo &); |
18757 | bool emitGetGlobalPtr( uint32_t , const SourceInfo &); |
18758 | bool emitGetGlobalMemberPtr( uint32_t , const SourceInfo &); |
18759 | bool emitGetGlobalFloat( uint32_t , const SourceInfo &); |
18760 | #endif |
18761 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18762 | [[nodiscard]] bool emitGetGlobal(PrimType, uint32_t, const SourceInfo &I); |
18763 | #endif |
18764 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
18765 | bool |
18766 | #if defined(GET_EVAL_IMPL) |
18767 | EvalEmitter |
18768 | #else |
18769 | ByteCodeEmitter |
18770 | #endif |
18771 | ::emitGetGlobal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
18772 | switch (T0) { |
18773 | case PT_Sint8: |
18774 | return emitGetGlobalSint8(A0, I); |
18775 | case PT_Uint8: |
18776 | return emitGetGlobalUint8(A0, I); |
18777 | case PT_Sint16: |
18778 | return emitGetGlobalSint16(A0, I); |
18779 | case PT_Uint16: |
18780 | return emitGetGlobalUint16(A0, I); |
18781 | case PT_Sint32: |
18782 | return emitGetGlobalSint32(A0, I); |
18783 | case PT_Uint32: |
18784 | return emitGetGlobalUint32(A0, I); |
18785 | case PT_Sint64: |
18786 | return emitGetGlobalSint64(A0, I); |
18787 | case PT_Uint64: |
18788 | return emitGetGlobalUint64(A0, I); |
18789 | case PT_IntAP: |
18790 | return emitGetGlobalIntAP(A0, I); |
18791 | case PT_IntAPS: |
18792 | return emitGetGlobalIntAPS(A0, I); |
18793 | case PT_Bool: |
18794 | return emitGetGlobalBool(A0, I); |
18795 | case PT_FixedPoint: |
18796 | return emitGetGlobalFixedPoint(A0, I); |
18797 | case PT_Ptr: |
18798 | return emitGetGlobalPtr(A0, I); |
18799 | case PT_MemberPtr: |
18800 | return emitGetGlobalMemberPtr(A0, I); |
18801 | case PT_Float: |
18802 | return emitGetGlobalFloat(A0, I); |
18803 | } |
18804 | llvm_unreachable("invalid enum value" ); |
18805 | } |
18806 | #endif |
18807 | #ifdef GET_LINK_IMPL |
18808 | bool ByteCodeEmitter::emitGetGlobalSint8( uint32_t A0, const SourceInfo &L) { |
18809 | return emitOp<uint32_t>(OP_GetGlobalSint8, A0, L); |
18810 | } |
18811 | bool ByteCodeEmitter::emitGetGlobalUint8( uint32_t A0, const SourceInfo &L) { |
18812 | return emitOp<uint32_t>(OP_GetGlobalUint8, A0, L); |
18813 | } |
18814 | bool ByteCodeEmitter::emitGetGlobalSint16( uint32_t A0, const SourceInfo &L) { |
18815 | return emitOp<uint32_t>(OP_GetGlobalSint16, A0, L); |
18816 | } |
18817 | bool ByteCodeEmitter::emitGetGlobalUint16( uint32_t A0, const SourceInfo &L) { |
18818 | return emitOp<uint32_t>(OP_GetGlobalUint16, A0, L); |
18819 | } |
18820 | bool ByteCodeEmitter::emitGetGlobalSint32( uint32_t A0, const SourceInfo &L) { |
18821 | return emitOp<uint32_t>(OP_GetGlobalSint32, A0, L); |
18822 | } |
18823 | bool ByteCodeEmitter::emitGetGlobalUint32( uint32_t A0, const SourceInfo &L) { |
18824 | return emitOp<uint32_t>(OP_GetGlobalUint32, A0, L); |
18825 | } |
18826 | bool ByteCodeEmitter::emitGetGlobalSint64( uint32_t A0, const SourceInfo &L) { |
18827 | return emitOp<uint32_t>(OP_GetGlobalSint64, A0, L); |
18828 | } |
18829 | bool ByteCodeEmitter::emitGetGlobalUint64( uint32_t A0, const SourceInfo &L) { |
18830 | return emitOp<uint32_t>(OP_GetGlobalUint64, A0, L); |
18831 | } |
18832 | bool ByteCodeEmitter::emitGetGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
18833 | return emitOp<uint32_t>(OP_GetGlobalIntAP, A0, L); |
18834 | } |
18835 | bool ByteCodeEmitter::emitGetGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
18836 | return emitOp<uint32_t>(OP_GetGlobalIntAPS, A0, L); |
18837 | } |
18838 | bool ByteCodeEmitter::emitGetGlobalBool( uint32_t A0, const SourceInfo &L) { |
18839 | return emitOp<uint32_t>(OP_GetGlobalBool, A0, L); |
18840 | } |
18841 | bool ByteCodeEmitter::emitGetGlobalFixedPoint( uint32_t A0, const SourceInfo &L) { |
18842 | return emitOp<uint32_t>(OP_GetGlobalFixedPoint, A0, L); |
18843 | } |
18844 | bool ByteCodeEmitter::emitGetGlobalPtr( uint32_t A0, const SourceInfo &L) { |
18845 | return emitOp<uint32_t>(OP_GetGlobalPtr, A0, L); |
18846 | } |
18847 | bool ByteCodeEmitter::emitGetGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
18848 | return emitOp<uint32_t>(OP_GetGlobalMemberPtr, A0, L); |
18849 | } |
18850 | bool ByteCodeEmitter::emitGetGlobalFloat( uint32_t A0, const SourceInfo &L) { |
18851 | return emitOp<uint32_t>(OP_GetGlobalFloat, A0, L); |
18852 | } |
18853 | #endif |
18854 | #ifdef GET_EVAL_IMPL |
18855 | bool EvalEmitter::emitGetGlobalSint8( uint32_t A0, const SourceInfo &L) { |
18856 | if (!isActive()) return true; |
18857 | CurrentSource = L; |
18858 | return GetGlobal<PT_Sint8>(S, OpPC, A0); |
18859 | } |
18860 | bool EvalEmitter::emitGetGlobalUint8( uint32_t A0, const SourceInfo &L) { |
18861 | if (!isActive()) return true; |
18862 | CurrentSource = L; |
18863 | return GetGlobal<PT_Uint8>(S, OpPC, A0); |
18864 | } |
18865 | bool EvalEmitter::emitGetGlobalSint16( uint32_t A0, const SourceInfo &L) { |
18866 | if (!isActive()) return true; |
18867 | CurrentSource = L; |
18868 | return GetGlobal<PT_Sint16>(S, OpPC, A0); |
18869 | } |
18870 | bool EvalEmitter::emitGetGlobalUint16( uint32_t A0, const SourceInfo &L) { |
18871 | if (!isActive()) return true; |
18872 | CurrentSource = L; |
18873 | return GetGlobal<PT_Uint16>(S, OpPC, A0); |
18874 | } |
18875 | bool EvalEmitter::emitGetGlobalSint32( uint32_t A0, const SourceInfo &L) { |
18876 | if (!isActive()) return true; |
18877 | CurrentSource = L; |
18878 | return GetGlobal<PT_Sint32>(S, OpPC, A0); |
18879 | } |
18880 | bool EvalEmitter::emitGetGlobalUint32( uint32_t A0, const SourceInfo &L) { |
18881 | if (!isActive()) return true; |
18882 | CurrentSource = L; |
18883 | return GetGlobal<PT_Uint32>(S, OpPC, A0); |
18884 | } |
18885 | bool EvalEmitter::emitGetGlobalSint64( uint32_t A0, const SourceInfo &L) { |
18886 | if (!isActive()) return true; |
18887 | CurrentSource = L; |
18888 | return GetGlobal<PT_Sint64>(S, OpPC, A0); |
18889 | } |
18890 | bool EvalEmitter::emitGetGlobalUint64( uint32_t A0, const SourceInfo &L) { |
18891 | if (!isActive()) return true; |
18892 | CurrentSource = L; |
18893 | return GetGlobal<PT_Uint64>(S, OpPC, A0); |
18894 | } |
18895 | bool EvalEmitter::emitGetGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
18896 | if (!isActive()) return true; |
18897 | CurrentSource = L; |
18898 | return GetGlobal<PT_IntAP>(S, OpPC, A0); |
18899 | } |
18900 | bool EvalEmitter::emitGetGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
18901 | if (!isActive()) return true; |
18902 | CurrentSource = L; |
18903 | return GetGlobal<PT_IntAPS>(S, OpPC, A0); |
18904 | } |
18905 | bool EvalEmitter::emitGetGlobalBool( uint32_t A0, const SourceInfo &L) { |
18906 | if (!isActive()) return true; |
18907 | CurrentSource = L; |
18908 | return GetGlobal<PT_Bool>(S, OpPC, A0); |
18909 | } |
18910 | bool EvalEmitter::emitGetGlobalFixedPoint( uint32_t A0, const SourceInfo &L) { |
18911 | if (!isActive()) return true; |
18912 | CurrentSource = L; |
18913 | return GetGlobal<PT_FixedPoint>(S, OpPC, A0); |
18914 | } |
18915 | bool EvalEmitter::emitGetGlobalPtr( uint32_t A0, const SourceInfo &L) { |
18916 | if (!isActive()) return true; |
18917 | CurrentSource = L; |
18918 | return GetGlobal<PT_Ptr>(S, OpPC, A0); |
18919 | } |
18920 | bool EvalEmitter::emitGetGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
18921 | if (!isActive()) return true; |
18922 | CurrentSource = L; |
18923 | return GetGlobal<PT_MemberPtr>(S, OpPC, A0); |
18924 | } |
18925 | bool EvalEmitter::emitGetGlobalFloat( uint32_t A0, const SourceInfo &L) { |
18926 | if (!isActive()) return true; |
18927 | CurrentSource = L; |
18928 | return GetGlobal<PT_Float>(S, OpPC, A0); |
18929 | } |
18930 | #endif |
18931 | #ifdef GET_OPCODE_NAMES |
18932 | OP_GetGlobalUncheckedSint8, |
18933 | OP_GetGlobalUncheckedUint8, |
18934 | OP_GetGlobalUncheckedSint16, |
18935 | OP_GetGlobalUncheckedUint16, |
18936 | OP_GetGlobalUncheckedSint32, |
18937 | OP_GetGlobalUncheckedUint32, |
18938 | OP_GetGlobalUncheckedSint64, |
18939 | OP_GetGlobalUncheckedUint64, |
18940 | OP_GetGlobalUncheckedIntAP, |
18941 | OP_GetGlobalUncheckedIntAPS, |
18942 | OP_GetGlobalUncheckedBool, |
18943 | OP_GetGlobalUncheckedFixedPoint, |
18944 | OP_GetGlobalUncheckedPtr, |
18945 | OP_GetGlobalUncheckedMemberPtr, |
18946 | OP_GetGlobalUncheckedFloat, |
18947 | #endif |
18948 | #ifdef GET_INTERP |
18949 | case OP_GetGlobalUncheckedSint8: { |
18950 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18951 | if (!GetGlobalUnchecked<PT_Sint8>(S, OpPC, V0)) |
18952 | return false; |
18953 | continue; |
18954 | } |
18955 | case OP_GetGlobalUncheckedUint8: { |
18956 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18957 | if (!GetGlobalUnchecked<PT_Uint8>(S, OpPC, V0)) |
18958 | return false; |
18959 | continue; |
18960 | } |
18961 | case OP_GetGlobalUncheckedSint16: { |
18962 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18963 | if (!GetGlobalUnchecked<PT_Sint16>(S, OpPC, V0)) |
18964 | return false; |
18965 | continue; |
18966 | } |
18967 | case OP_GetGlobalUncheckedUint16: { |
18968 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18969 | if (!GetGlobalUnchecked<PT_Uint16>(S, OpPC, V0)) |
18970 | return false; |
18971 | continue; |
18972 | } |
18973 | case OP_GetGlobalUncheckedSint32: { |
18974 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18975 | if (!GetGlobalUnchecked<PT_Sint32>(S, OpPC, V0)) |
18976 | return false; |
18977 | continue; |
18978 | } |
18979 | case OP_GetGlobalUncheckedUint32: { |
18980 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18981 | if (!GetGlobalUnchecked<PT_Uint32>(S, OpPC, V0)) |
18982 | return false; |
18983 | continue; |
18984 | } |
18985 | case OP_GetGlobalUncheckedSint64: { |
18986 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18987 | if (!GetGlobalUnchecked<PT_Sint64>(S, OpPC, V0)) |
18988 | return false; |
18989 | continue; |
18990 | } |
18991 | case OP_GetGlobalUncheckedUint64: { |
18992 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18993 | if (!GetGlobalUnchecked<PT_Uint64>(S, OpPC, V0)) |
18994 | return false; |
18995 | continue; |
18996 | } |
18997 | case OP_GetGlobalUncheckedIntAP: { |
18998 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18999 | if (!GetGlobalUnchecked<PT_IntAP>(S, OpPC, V0)) |
19000 | return false; |
19001 | continue; |
19002 | } |
19003 | case OP_GetGlobalUncheckedIntAPS: { |
19004 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19005 | if (!GetGlobalUnchecked<PT_IntAPS>(S, OpPC, V0)) |
19006 | return false; |
19007 | continue; |
19008 | } |
19009 | case OP_GetGlobalUncheckedBool: { |
19010 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19011 | if (!GetGlobalUnchecked<PT_Bool>(S, OpPC, V0)) |
19012 | return false; |
19013 | continue; |
19014 | } |
19015 | case OP_GetGlobalUncheckedFixedPoint: { |
19016 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19017 | if (!GetGlobalUnchecked<PT_FixedPoint>(S, OpPC, V0)) |
19018 | return false; |
19019 | continue; |
19020 | } |
19021 | case OP_GetGlobalUncheckedPtr: { |
19022 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19023 | if (!GetGlobalUnchecked<PT_Ptr>(S, OpPC, V0)) |
19024 | return false; |
19025 | continue; |
19026 | } |
19027 | case OP_GetGlobalUncheckedMemberPtr: { |
19028 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19029 | if (!GetGlobalUnchecked<PT_MemberPtr>(S, OpPC, V0)) |
19030 | return false; |
19031 | continue; |
19032 | } |
19033 | case OP_GetGlobalUncheckedFloat: { |
19034 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19035 | if (!GetGlobalUnchecked<PT_Float>(S, OpPC, V0)) |
19036 | return false; |
19037 | continue; |
19038 | } |
19039 | #endif |
19040 | #ifdef GET_DISASM |
19041 | case OP_GetGlobalUncheckedSint8: |
19042 | Text.Op = PrintName("GetGlobalUncheckedSint8" ); |
19043 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19044 | break; |
19045 | case OP_GetGlobalUncheckedUint8: |
19046 | Text.Op = PrintName("GetGlobalUncheckedUint8" ); |
19047 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19048 | break; |
19049 | case OP_GetGlobalUncheckedSint16: |
19050 | Text.Op = PrintName("GetGlobalUncheckedSint16" ); |
19051 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19052 | break; |
19053 | case OP_GetGlobalUncheckedUint16: |
19054 | Text.Op = PrintName("GetGlobalUncheckedUint16" ); |
19055 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19056 | break; |
19057 | case OP_GetGlobalUncheckedSint32: |
19058 | Text.Op = PrintName("GetGlobalUncheckedSint32" ); |
19059 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19060 | break; |
19061 | case OP_GetGlobalUncheckedUint32: |
19062 | Text.Op = PrintName("GetGlobalUncheckedUint32" ); |
19063 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19064 | break; |
19065 | case OP_GetGlobalUncheckedSint64: |
19066 | Text.Op = PrintName("GetGlobalUncheckedSint64" ); |
19067 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19068 | break; |
19069 | case OP_GetGlobalUncheckedUint64: |
19070 | Text.Op = PrintName("GetGlobalUncheckedUint64" ); |
19071 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19072 | break; |
19073 | case OP_GetGlobalUncheckedIntAP: |
19074 | Text.Op = PrintName("GetGlobalUncheckedIntAP" ); |
19075 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19076 | break; |
19077 | case OP_GetGlobalUncheckedIntAPS: |
19078 | Text.Op = PrintName("GetGlobalUncheckedIntAPS" ); |
19079 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19080 | break; |
19081 | case OP_GetGlobalUncheckedBool: |
19082 | Text.Op = PrintName("GetGlobalUncheckedBool" ); |
19083 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19084 | break; |
19085 | case OP_GetGlobalUncheckedFixedPoint: |
19086 | Text.Op = PrintName("GetGlobalUncheckedFixedPoint" ); |
19087 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19088 | break; |
19089 | case OP_GetGlobalUncheckedPtr: |
19090 | Text.Op = PrintName("GetGlobalUncheckedPtr" ); |
19091 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19092 | break; |
19093 | case OP_GetGlobalUncheckedMemberPtr: |
19094 | Text.Op = PrintName("GetGlobalUncheckedMemberPtr" ); |
19095 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19096 | break; |
19097 | case OP_GetGlobalUncheckedFloat: |
19098 | Text.Op = PrintName("GetGlobalUncheckedFloat" ); |
19099 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19100 | break; |
19101 | #endif |
19102 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19103 | bool emitGetGlobalUncheckedSint8( uint32_t , const SourceInfo &); |
19104 | bool emitGetGlobalUncheckedUint8( uint32_t , const SourceInfo &); |
19105 | bool emitGetGlobalUncheckedSint16( uint32_t , const SourceInfo &); |
19106 | bool emitGetGlobalUncheckedUint16( uint32_t , const SourceInfo &); |
19107 | bool emitGetGlobalUncheckedSint32( uint32_t , const SourceInfo &); |
19108 | bool emitGetGlobalUncheckedUint32( uint32_t , const SourceInfo &); |
19109 | bool emitGetGlobalUncheckedSint64( uint32_t , const SourceInfo &); |
19110 | bool emitGetGlobalUncheckedUint64( uint32_t , const SourceInfo &); |
19111 | bool emitGetGlobalUncheckedIntAP( uint32_t , const SourceInfo &); |
19112 | bool emitGetGlobalUncheckedIntAPS( uint32_t , const SourceInfo &); |
19113 | bool emitGetGlobalUncheckedBool( uint32_t , const SourceInfo &); |
19114 | bool emitGetGlobalUncheckedFixedPoint( uint32_t , const SourceInfo &); |
19115 | bool emitGetGlobalUncheckedPtr( uint32_t , const SourceInfo &); |
19116 | bool emitGetGlobalUncheckedMemberPtr( uint32_t , const SourceInfo &); |
19117 | bool emitGetGlobalUncheckedFloat( uint32_t , const SourceInfo &); |
19118 | #endif |
19119 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19120 | [[nodiscard]] bool emitGetGlobalUnchecked(PrimType, uint32_t, const SourceInfo &I); |
19121 | #endif |
19122 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
19123 | bool |
19124 | #if defined(GET_EVAL_IMPL) |
19125 | EvalEmitter |
19126 | #else |
19127 | ByteCodeEmitter |
19128 | #endif |
19129 | ::emitGetGlobalUnchecked(PrimType T0, uint32_t A0, const SourceInfo &I) { |
19130 | switch (T0) { |
19131 | case PT_Sint8: |
19132 | return emitGetGlobalUncheckedSint8(A0, I); |
19133 | case PT_Uint8: |
19134 | return emitGetGlobalUncheckedUint8(A0, I); |
19135 | case PT_Sint16: |
19136 | return emitGetGlobalUncheckedSint16(A0, I); |
19137 | case PT_Uint16: |
19138 | return emitGetGlobalUncheckedUint16(A0, I); |
19139 | case PT_Sint32: |
19140 | return emitGetGlobalUncheckedSint32(A0, I); |
19141 | case PT_Uint32: |
19142 | return emitGetGlobalUncheckedUint32(A0, I); |
19143 | case PT_Sint64: |
19144 | return emitGetGlobalUncheckedSint64(A0, I); |
19145 | case PT_Uint64: |
19146 | return emitGetGlobalUncheckedUint64(A0, I); |
19147 | case PT_IntAP: |
19148 | return emitGetGlobalUncheckedIntAP(A0, I); |
19149 | case PT_IntAPS: |
19150 | return emitGetGlobalUncheckedIntAPS(A0, I); |
19151 | case PT_Bool: |
19152 | return emitGetGlobalUncheckedBool(A0, I); |
19153 | case PT_FixedPoint: |
19154 | return emitGetGlobalUncheckedFixedPoint(A0, I); |
19155 | case PT_Ptr: |
19156 | return emitGetGlobalUncheckedPtr(A0, I); |
19157 | case PT_MemberPtr: |
19158 | return emitGetGlobalUncheckedMemberPtr(A0, I); |
19159 | case PT_Float: |
19160 | return emitGetGlobalUncheckedFloat(A0, I); |
19161 | } |
19162 | llvm_unreachable("invalid enum value" ); |
19163 | } |
19164 | #endif |
19165 | #ifdef GET_LINK_IMPL |
19166 | bool ByteCodeEmitter::emitGetGlobalUncheckedSint8( uint32_t A0, const SourceInfo &L) { |
19167 | return emitOp<uint32_t>(OP_GetGlobalUncheckedSint8, A0, L); |
19168 | } |
19169 | bool ByteCodeEmitter::emitGetGlobalUncheckedUint8( uint32_t A0, const SourceInfo &L) { |
19170 | return emitOp<uint32_t>(OP_GetGlobalUncheckedUint8, A0, L); |
19171 | } |
19172 | bool ByteCodeEmitter::emitGetGlobalUncheckedSint16( uint32_t A0, const SourceInfo &L) { |
19173 | return emitOp<uint32_t>(OP_GetGlobalUncheckedSint16, A0, L); |
19174 | } |
19175 | bool ByteCodeEmitter::emitGetGlobalUncheckedUint16( uint32_t A0, const SourceInfo &L) { |
19176 | return emitOp<uint32_t>(OP_GetGlobalUncheckedUint16, A0, L); |
19177 | } |
19178 | bool ByteCodeEmitter::emitGetGlobalUncheckedSint32( uint32_t A0, const SourceInfo &L) { |
19179 | return emitOp<uint32_t>(OP_GetGlobalUncheckedSint32, A0, L); |
19180 | } |
19181 | bool ByteCodeEmitter::emitGetGlobalUncheckedUint32( uint32_t A0, const SourceInfo &L) { |
19182 | return emitOp<uint32_t>(OP_GetGlobalUncheckedUint32, A0, L); |
19183 | } |
19184 | bool ByteCodeEmitter::emitGetGlobalUncheckedSint64( uint32_t A0, const SourceInfo &L) { |
19185 | return emitOp<uint32_t>(OP_GetGlobalUncheckedSint64, A0, L); |
19186 | } |
19187 | bool ByteCodeEmitter::emitGetGlobalUncheckedUint64( uint32_t A0, const SourceInfo &L) { |
19188 | return emitOp<uint32_t>(OP_GetGlobalUncheckedUint64, A0, L); |
19189 | } |
19190 | bool ByteCodeEmitter::emitGetGlobalUncheckedIntAP( uint32_t A0, const SourceInfo &L) { |
19191 | return emitOp<uint32_t>(OP_GetGlobalUncheckedIntAP, A0, L); |
19192 | } |
19193 | bool ByteCodeEmitter::emitGetGlobalUncheckedIntAPS( uint32_t A0, const SourceInfo &L) { |
19194 | return emitOp<uint32_t>(OP_GetGlobalUncheckedIntAPS, A0, L); |
19195 | } |
19196 | bool ByteCodeEmitter::emitGetGlobalUncheckedBool( uint32_t A0, const SourceInfo &L) { |
19197 | return emitOp<uint32_t>(OP_GetGlobalUncheckedBool, A0, L); |
19198 | } |
19199 | bool ByteCodeEmitter::emitGetGlobalUncheckedFixedPoint( uint32_t A0, const SourceInfo &L) { |
19200 | return emitOp<uint32_t>(OP_GetGlobalUncheckedFixedPoint, A0, L); |
19201 | } |
19202 | bool ByteCodeEmitter::emitGetGlobalUncheckedPtr( uint32_t A0, const SourceInfo &L) { |
19203 | return emitOp<uint32_t>(OP_GetGlobalUncheckedPtr, A0, L); |
19204 | } |
19205 | bool ByteCodeEmitter::emitGetGlobalUncheckedMemberPtr( uint32_t A0, const SourceInfo &L) { |
19206 | return emitOp<uint32_t>(OP_GetGlobalUncheckedMemberPtr, A0, L); |
19207 | } |
19208 | bool ByteCodeEmitter::emitGetGlobalUncheckedFloat( uint32_t A0, const SourceInfo &L) { |
19209 | return emitOp<uint32_t>(OP_GetGlobalUncheckedFloat, A0, L); |
19210 | } |
19211 | #endif |
19212 | #ifdef GET_EVAL_IMPL |
19213 | bool EvalEmitter::emitGetGlobalUncheckedSint8( uint32_t A0, const SourceInfo &L) { |
19214 | if (!isActive()) return true; |
19215 | CurrentSource = L; |
19216 | return GetGlobalUnchecked<PT_Sint8>(S, OpPC, A0); |
19217 | } |
19218 | bool EvalEmitter::emitGetGlobalUncheckedUint8( uint32_t A0, const SourceInfo &L) { |
19219 | if (!isActive()) return true; |
19220 | CurrentSource = L; |
19221 | return GetGlobalUnchecked<PT_Uint8>(S, OpPC, A0); |
19222 | } |
19223 | bool EvalEmitter::emitGetGlobalUncheckedSint16( uint32_t A0, const SourceInfo &L) { |
19224 | if (!isActive()) return true; |
19225 | CurrentSource = L; |
19226 | return GetGlobalUnchecked<PT_Sint16>(S, OpPC, A0); |
19227 | } |
19228 | bool EvalEmitter::emitGetGlobalUncheckedUint16( uint32_t A0, const SourceInfo &L) { |
19229 | if (!isActive()) return true; |
19230 | CurrentSource = L; |
19231 | return GetGlobalUnchecked<PT_Uint16>(S, OpPC, A0); |
19232 | } |
19233 | bool EvalEmitter::emitGetGlobalUncheckedSint32( uint32_t A0, const SourceInfo &L) { |
19234 | if (!isActive()) return true; |
19235 | CurrentSource = L; |
19236 | return GetGlobalUnchecked<PT_Sint32>(S, OpPC, A0); |
19237 | } |
19238 | bool EvalEmitter::emitGetGlobalUncheckedUint32( uint32_t A0, const SourceInfo &L) { |
19239 | if (!isActive()) return true; |
19240 | CurrentSource = L; |
19241 | return GetGlobalUnchecked<PT_Uint32>(S, OpPC, A0); |
19242 | } |
19243 | bool EvalEmitter::emitGetGlobalUncheckedSint64( uint32_t A0, const SourceInfo &L) { |
19244 | if (!isActive()) return true; |
19245 | CurrentSource = L; |
19246 | return GetGlobalUnchecked<PT_Sint64>(S, OpPC, A0); |
19247 | } |
19248 | bool EvalEmitter::emitGetGlobalUncheckedUint64( uint32_t A0, const SourceInfo &L) { |
19249 | if (!isActive()) return true; |
19250 | CurrentSource = L; |
19251 | return GetGlobalUnchecked<PT_Uint64>(S, OpPC, A0); |
19252 | } |
19253 | bool EvalEmitter::emitGetGlobalUncheckedIntAP( uint32_t A0, const SourceInfo &L) { |
19254 | if (!isActive()) return true; |
19255 | CurrentSource = L; |
19256 | return GetGlobalUnchecked<PT_IntAP>(S, OpPC, A0); |
19257 | } |
19258 | bool EvalEmitter::emitGetGlobalUncheckedIntAPS( uint32_t A0, const SourceInfo &L) { |
19259 | if (!isActive()) return true; |
19260 | CurrentSource = L; |
19261 | return GetGlobalUnchecked<PT_IntAPS>(S, OpPC, A0); |
19262 | } |
19263 | bool EvalEmitter::emitGetGlobalUncheckedBool( uint32_t A0, const SourceInfo &L) { |
19264 | if (!isActive()) return true; |
19265 | CurrentSource = L; |
19266 | return GetGlobalUnchecked<PT_Bool>(S, OpPC, A0); |
19267 | } |
19268 | bool EvalEmitter::emitGetGlobalUncheckedFixedPoint( uint32_t A0, const SourceInfo &L) { |
19269 | if (!isActive()) return true; |
19270 | CurrentSource = L; |
19271 | return GetGlobalUnchecked<PT_FixedPoint>(S, OpPC, A0); |
19272 | } |
19273 | bool EvalEmitter::emitGetGlobalUncheckedPtr( uint32_t A0, const SourceInfo &L) { |
19274 | if (!isActive()) return true; |
19275 | CurrentSource = L; |
19276 | return GetGlobalUnchecked<PT_Ptr>(S, OpPC, A0); |
19277 | } |
19278 | bool EvalEmitter::emitGetGlobalUncheckedMemberPtr( uint32_t A0, const SourceInfo &L) { |
19279 | if (!isActive()) return true; |
19280 | CurrentSource = L; |
19281 | return GetGlobalUnchecked<PT_MemberPtr>(S, OpPC, A0); |
19282 | } |
19283 | bool EvalEmitter::emitGetGlobalUncheckedFloat( uint32_t A0, const SourceInfo &L) { |
19284 | if (!isActive()) return true; |
19285 | CurrentSource = L; |
19286 | return GetGlobalUnchecked<PT_Float>(S, OpPC, A0); |
19287 | } |
19288 | #endif |
19289 | #ifdef GET_OPCODE_NAMES |
19290 | OP_GetIntPtrSint8, |
19291 | OP_GetIntPtrUint8, |
19292 | OP_GetIntPtrSint16, |
19293 | OP_GetIntPtrUint16, |
19294 | OP_GetIntPtrSint32, |
19295 | OP_GetIntPtrUint32, |
19296 | OP_GetIntPtrSint64, |
19297 | OP_GetIntPtrUint64, |
19298 | OP_GetIntPtrIntAP, |
19299 | OP_GetIntPtrIntAPS, |
19300 | OP_GetIntPtrBool, |
19301 | OP_GetIntPtrFixedPoint, |
19302 | #endif |
19303 | #ifdef GET_INTERP |
19304 | case OP_GetIntPtrSint8: { |
19305 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19306 | if (!GetIntPtr<PT_Sint8>(S, OpPC, V0)) |
19307 | return false; |
19308 | continue; |
19309 | } |
19310 | case OP_GetIntPtrUint8: { |
19311 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19312 | if (!GetIntPtr<PT_Uint8>(S, OpPC, V0)) |
19313 | return false; |
19314 | continue; |
19315 | } |
19316 | case OP_GetIntPtrSint16: { |
19317 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19318 | if (!GetIntPtr<PT_Sint16>(S, OpPC, V0)) |
19319 | return false; |
19320 | continue; |
19321 | } |
19322 | case OP_GetIntPtrUint16: { |
19323 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19324 | if (!GetIntPtr<PT_Uint16>(S, OpPC, V0)) |
19325 | return false; |
19326 | continue; |
19327 | } |
19328 | case OP_GetIntPtrSint32: { |
19329 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19330 | if (!GetIntPtr<PT_Sint32>(S, OpPC, V0)) |
19331 | return false; |
19332 | continue; |
19333 | } |
19334 | case OP_GetIntPtrUint32: { |
19335 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19336 | if (!GetIntPtr<PT_Uint32>(S, OpPC, V0)) |
19337 | return false; |
19338 | continue; |
19339 | } |
19340 | case OP_GetIntPtrSint64: { |
19341 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19342 | if (!GetIntPtr<PT_Sint64>(S, OpPC, V0)) |
19343 | return false; |
19344 | continue; |
19345 | } |
19346 | case OP_GetIntPtrUint64: { |
19347 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19348 | if (!GetIntPtr<PT_Uint64>(S, OpPC, V0)) |
19349 | return false; |
19350 | continue; |
19351 | } |
19352 | case OP_GetIntPtrIntAP: { |
19353 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19354 | if (!GetIntPtr<PT_IntAP>(S, OpPC, V0)) |
19355 | return false; |
19356 | continue; |
19357 | } |
19358 | case OP_GetIntPtrIntAPS: { |
19359 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19360 | if (!GetIntPtr<PT_IntAPS>(S, OpPC, V0)) |
19361 | return false; |
19362 | continue; |
19363 | } |
19364 | case OP_GetIntPtrBool: { |
19365 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19366 | if (!GetIntPtr<PT_Bool>(S, OpPC, V0)) |
19367 | return false; |
19368 | continue; |
19369 | } |
19370 | case OP_GetIntPtrFixedPoint: { |
19371 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
19372 | if (!GetIntPtr<PT_FixedPoint>(S, OpPC, V0)) |
19373 | return false; |
19374 | continue; |
19375 | } |
19376 | #endif |
19377 | #ifdef GET_DISASM |
19378 | case OP_GetIntPtrSint8: |
19379 | Text.Op = PrintName("GetIntPtrSint8" ); |
19380 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19381 | break; |
19382 | case OP_GetIntPtrUint8: |
19383 | Text.Op = PrintName("GetIntPtrUint8" ); |
19384 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19385 | break; |
19386 | case OP_GetIntPtrSint16: |
19387 | Text.Op = PrintName("GetIntPtrSint16" ); |
19388 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19389 | break; |
19390 | case OP_GetIntPtrUint16: |
19391 | Text.Op = PrintName("GetIntPtrUint16" ); |
19392 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19393 | break; |
19394 | case OP_GetIntPtrSint32: |
19395 | Text.Op = PrintName("GetIntPtrSint32" ); |
19396 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19397 | break; |
19398 | case OP_GetIntPtrUint32: |
19399 | Text.Op = PrintName("GetIntPtrUint32" ); |
19400 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19401 | break; |
19402 | case OP_GetIntPtrSint64: |
19403 | Text.Op = PrintName("GetIntPtrSint64" ); |
19404 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19405 | break; |
19406 | case OP_GetIntPtrUint64: |
19407 | Text.Op = PrintName("GetIntPtrUint64" ); |
19408 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19409 | break; |
19410 | case OP_GetIntPtrIntAP: |
19411 | Text.Op = PrintName("GetIntPtrIntAP" ); |
19412 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19413 | break; |
19414 | case OP_GetIntPtrIntAPS: |
19415 | Text.Op = PrintName("GetIntPtrIntAPS" ); |
19416 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19417 | break; |
19418 | case OP_GetIntPtrBool: |
19419 | Text.Op = PrintName("GetIntPtrBool" ); |
19420 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19421 | break; |
19422 | case OP_GetIntPtrFixedPoint: |
19423 | Text.Op = PrintName("GetIntPtrFixedPoint" ); |
19424 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
19425 | break; |
19426 | #endif |
19427 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19428 | bool emitGetIntPtrSint8( const Descriptor * , const SourceInfo &); |
19429 | bool emitGetIntPtrUint8( const Descriptor * , const SourceInfo &); |
19430 | bool emitGetIntPtrSint16( const Descriptor * , const SourceInfo &); |
19431 | bool emitGetIntPtrUint16( const Descriptor * , const SourceInfo &); |
19432 | bool emitGetIntPtrSint32( const Descriptor * , const SourceInfo &); |
19433 | bool emitGetIntPtrUint32( const Descriptor * , const SourceInfo &); |
19434 | bool emitGetIntPtrSint64( const Descriptor * , const SourceInfo &); |
19435 | bool emitGetIntPtrUint64( const Descriptor * , const SourceInfo &); |
19436 | bool emitGetIntPtrIntAP( const Descriptor * , const SourceInfo &); |
19437 | bool emitGetIntPtrIntAPS( const Descriptor * , const SourceInfo &); |
19438 | bool emitGetIntPtrBool( const Descriptor * , const SourceInfo &); |
19439 | bool emitGetIntPtrFixedPoint( const Descriptor * , const SourceInfo &); |
19440 | #endif |
19441 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19442 | [[nodiscard]] bool emitGetIntPtr(PrimType, const Descriptor *, const SourceInfo &I); |
19443 | #endif |
19444 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
19445 | bool |
19446 | #if defined(GET_EVAL_IMPL) |
19447 | EvalEmitter |
19448 | #else |
19449 | ByteCodeEmitter |
19450 | #endif |
19451 | ::emitGetIntPtr(PrimType T0, const Descriptor * A0, const SourceInfo &I) { |
19452 | switch (T0) { |
19453 | case PT_Sint8: |
19454 | return emitGetIntPtrSint8(A0, I); |
19455 | case PT_Uint8: |
19456 | return emitGetIntPtrUint8(A0, I); |
19457 | case PT_Sint16: |
19458 | return emitGetIntPtrSint16(A0, I); |
19459 | case PT_Uint16: |
19460 | return emitGetIntPtrUint16(A0, I); |
19461 | case PT_Sint32: |
19462 | return emitGetIntPtrSint32(A0, I); |
19463 | case PT_Uint32: |
19464 | return emitGetIntPtrUint32(A0, I); |
19465 | case PT_Sint64: |
19466 | return emitGetIntPtrSint64(A0, I); |
19467 | case PT_Uint64: |
19468 | return emitGetIntPtrUint64(A0, I); |
19469 | case PT_IntAP: |
19470 | return emitGetIntPtrIntAP(A0, I); |
19471 | case PT_IntAPS: |
19472 | return emitGetIntPtrIntAPS(A0, I); |
19473 | case PT_Bool: |
19474 | return emitGetIntPtrBool(A0, I); |
19475 | case PT_FixedPoint: |
19476 | return emitGetIntPtrFixedPoint(A0, I); |
19477 | default: llvm_unreachable("invalid type: emitGetIntPtr" ); |
19478 | } |
19479 | llvm_unreachable("invalid enum value" ); |
19480 | } |
19481 | #endif |
19482 | #ifdef GET_LINK_IMPL |
19483 | bool ByteCodeEmitter::emitGetIntPtrSint8( const Descriptor * A0, const SourceInfo &L) { |
19484 | return emitOp<const Descriptor *>(OP_GetIntPtrSint8, A0, L); |
19485 | } |
19486 | bool ByteCodeEmitter::emitGetIntPtrUint8( const Descriptor * A0, const SourceInfo &L) { |
19487 | return emitOp<const Descriptor *>(OP_GetIntPtrUint8, A0, L); |
19488 | } |
19489 | bool ByteCodeEmitter::emitGetIntPtrSint16( const Descriptor * A0, const SourceInfo &L) { |
19490 | return emitOp<const Descriptor *>(OP_GetIntPtrSint16, A0, L); |
19491 | } |
19492 | bool ByteCodeEmitter::emitGetIntPtrUint16( const Descriptor * A0, const SourceInfo &L) { |
19493 | return emitOp<const Descriptor *>(OP_GetIntPtrUint16, A0, L); |
19494 | } |
19495 | bool ByteCodeEmitter::emitGetIntPtrSint32( const Descriptor * A0, const SourceInfo &L) { |
19496 | return emitOp<const Descriptor *>(OP_GetIntPtrSint32, A0, L); |
19497 | } |
19498 | bool ByteCodeEmitter::emitGetIntPtrUint32( const Descriptor * A0, const SourceInfo &L) { |
19499 | return emitOp<const Descriptor *>(OP_GetIntPtrUint32, A0, L); |
19500 | } |
19501 | bool ByteCodeEmitter::emitGetIntPtrSint64( const Descriptor * A0, const SourceInfo &L) { |
19502 | return emitOp<const Descriptor *>(OP_GetIntPtrSint64, A0, L); |
19503 | } |
19504 | bool ByteCodeEmitter::emitGetIntPtrUint64( const Descriptor * A0, const SourceInfo &L) { |
19505 | return emitOp<const Descriptor *>(OP_GetIntPtrUint64, A0, L); |
19506 | } |
19507 | bool ByteCodeEmitter::emitGetIntPtrIntAP( const Descriptor * A0, const SourceInfo &L) { |
19508 | return emitOp<const Descriptor *>(OP_GetIntPtrIntAP, A0, L); |
19509 | } |
19510 | bool ByteCodeEmitter::emitGetIntPtrIntAPS( const Descriptor * A0, const SourceInfo &L) { |
19511 | return emitOp<const Descriptor *>(OP_GetIntPtrIntAPS, A0, L); |
19512 | } |
19513 | bool ByteCodeEmitter::emitGetIntPtrBool( const Descriptor * A0, const SourceInfo &L) { |
19514 | return emitOp<const Descriptor *>(OP_GetIntPtrBool, A0, L); |
19515 | } |
19516 | bool ByteCodeEmitter::emitGetIntPtrFixedPoint( const Descriptor * A0, const SourceInfo &L) { |
19517 | return emitOp<const Descriptor *>(OP_GetIntPtrFixedPoint, A0, L); |
19518 | } |
19519 | #endif |
19520 | #ifdef GET_EVAL_IMPL |
19521 | bool EvalEmitter::emitGetIntPtrSint8( const Descriptor * A0, const SourceInfo &L) { |
19522 | if (!isActive()) return true; |
19523 | CurrentSource = L; |
19524 | return GetIntPtr<PT_Sint8>(S, OpPC, A0); |
19525 | } |
19526 | bool EvalEmitter::emitGetIntPtrUint8( const Descriptor * A0, const SourceInfo &L) { |
19527 | if (!isActive()) return true; |
19528 | CurrentSource = L; |
19529 | return GetIntPtr<PT_Uint8>(S, OpPC, A0); |
19530 | } |
19531 | bool EvalEmitter::emitGetIntPtrSint16( const Descriptor * A0, const SourceInfo &L) { |
19532 | if (!isActive()) return true; |
19533 | CurrentSource = L; |
19534 | return GetIntPtr<PT_Sint16>(S, OpPC, A0); |
19535 | } |
19536 | bool EvalEmitter::emitGetIntPtrUint16( const Descriptor * A0, const SourceInfo &L) { |
19537 | if (!isActive()) return true; |
19538 | CurrentSource = L; |
19539 | return GetIntPtr<PT_Uint16>(S, OpPC, A0); |
19540 | } |
19541 | bool EvalEmitter::emitGetIntPtrSint32( const Descriptor * A0, const SourceInfo &L) { |
19542 | if (!isActive()) return true; |
19543 | CurrentSource = L; |
19544 | return GetIntPtr<PT_Sint32>(S, OpPC, A0); |
19545 | } |
19546 | bool EvalEmitter::emitGetIntPtrUint32( const Descriptor * A0, const SourceInfo &L) { |
19547 | if (!isActive()) return true; |
19548 | CurrentSource = L; |
19549 | return GetIntPtr<PT_Uint32>(S, OpPC, A0); |
19550 | } |
19551 | bool EvalEmitter::emitGetIntPtrSint64( const Descriptor * A0, const SourceInfo &L) { |
19552 | if (!isActive()) return true; |
19553 | CurrentSource = L; |
19554 | return GetIntPtr<PT_Sint64>(S, OpPC, A0); |
19555 | } |
19556 | bool EvalEmitter::emitGetIntPtrUint64( const Descriptor * A0, const SourceInfo &L) { |
19557 | if (!isActive()) return true; |
19558 | CurrentSource = L; |
19559 | return GetIntPtr<PT_Uint64>(S, OpPC, A0); |
19560 | } |
19561 | bool EvalEmitter::emitGetIntPtrIntAP( const Descriptor * A0, const SourceInfo &L) { |
19562 | if (!isActive()) return true; |
19563 | CurrentSource = L; |
19564 | return GetIntPtr<PT_IntAP>(S, OpPC, A0); |
19565 | } |
19566 | bool EvalEmitter::emitGetIntPtrIntAPS( const Descriptor * A0, const SourceInfo &L) { |
19567 | if (!isActive()) return true; |
19568 | CurrentSource = L; |
19569 | return GetIntPtr<PT_IntAPS>(S, OpPC, A0); |
19570 | } |
19571 | bool EvalEmitter::emitGetIntPtrBool( const Descriptor * A0, const SourceInfo &L) { |
19572 | if (!isActive()) return true; |
19573 | CurrentSource = L; |
19574 | return GetIntPtr<PT_Bool>(S, OpPC, A0); |
19575 | } |
19576 | bool EvalEmitter::emitGetIntPtrFixedPoint( const Descriptor * A0, const SourceInfo &L) { |
19577 | if (!isActive()) return true; |
19578 | CurrentSource = L; |
19579 | return GetIntPtr<PT_FixedPoint>(S, OpPC, A0); |
19580 | } |
19581 | #endif |
19582 | #ifdef GET_OPCODE_NAMES |
19583 | OP_GetLocalSint8, |
19584 | OP_GetLocalUint8, |
19585 | OP_GetLocalSint16, |
19586 | OP_GetLocalUint16, |
19587 | OP_GetLocalSint32, |
19588 | OP_GetLocalUint32, |
19589 | OP_GetLocalSint64, |
19590 | OP_GetLocalUint64, |
19591 | OP_GetLocalIntAP, |
19592 | OP_GetLocalIntAPS, |
19593 | OP_GetLocalBool, |
19594 | OP_GetLocalFixedPoint, |
19595 | OP_GetLocalPtr, |
19596 | OP_GetLocalMemberPtr, |
19597 | OP_GetLocalFloat, |
19598 | #endif |
19599 | #ifdef GET_INTERP |
19600 | case OP_GetLocalSint8: { |
19601 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19602 | if (!GetLocal<PT_Sint8>(S, OpPC, V0)) |
19603 | return false; |
19604 | continue; |
19605 | } |
19606 | case OP_GetLocalUint8: { |
19607 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19608 | if (!GetLocal<PT_Uint8>(S, OpPC, V0)) |
19609 | return false; |
19610 | continue; |
19611 | } |
19612 | case OP_GetLocalSint16: { |
19613 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19614 | if (!GetLocal<PT_Sint16>(S, OpPC, V0)) |
19615 | return false; |
19616 | continue; |
19617 | } |
19618 | case OP_GetLocalUint16: { |
19619 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19620 | if (!GetLocal<PT_Uint16>(S, OpPC, V0)) |
19621 | return false; |
19622 | continue; |
19623 | } |
19624 | case OP_GetLocalSint32: { |
19625 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19626 | if (!GetLocal<PT_Sint32>(S, OpPC, V0)) |
19627 | return false; |
19628 | continue; |
19629 | } |
19630 | case OP_GetLocalUint32: { |
19631 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19632 | if (!GetLocal<PT_Uint32>(S, OpPC, V0)) |
19633 | return false; |
19634 | continue; |
19635 | } |
19636 | case OP_GetLocalSint64: { |
19637 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19638 | if (!GetLocal<PT_Sint64>(S, OpPC, V0)) |
19639 | return false; |
19640 | continue; |
19641 | } |
19642 | case OP_GetLocalUint64: { |
19643 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19644 | if (!GetLocal<PT_Uint64>(S, OpPC, V0)) |
19645 | return false; |
19646 | continue; |
19647 | } |
19648 | case OP_GetLocalIntAP: { |
19649 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19650 | if (!GetLocal<PT_IntAP>(S, OpPC, V0)) |
19651 | return false; |
19652 | continue; |
19653 | } |
19654 | case OP_GetLocalIntAPS: { |
19655 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19656 | if (!GetLocal<PT_IntAPS>(S, OpPC, V0)) |
19657 | return false; |
19658 | continue; |
19659 | } |
19660 | case OP_GetLocalBool: { |
19661 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19662 | if (!GetLocal<PT_Bool>(S, OpPC, V0)) |
19663 | return false; |
19664 | continue; |
19665 | } |
19666 | case OP_GetLocalFixedPoint: { |
19667 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19668 | if (!GetLocal<PT_FixedPoint>(S, OpPC, V0)) |
19669 | return false; |
19670 | continue; |
19671 | } |
19672 | case OP_GetLocalPtr: { |
19673 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19674 | if (!GetLocal<PT_Ptr>(S, OpPC, V0)) |
19675 | return false; |
19676 | continue; |
19677 | } |
19678 | case OP_GetLocalMemberPtr: { |
19679 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19680 | if (!GetLocal<PT_MemberPtr>(S, OpPC, V0)) |
19681 | return false; |
19682 | continue; |
19683 | } |
19684 | case OP_GetLocalFloat: { |
19685 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19686 | if (!GetLocal<PT_Float>(S, OpPC, V0)) |
19687 | return false; |
19688 | continue; |
19689 | } |
19690 | #endif |
19691 | #ifdef GET_DISASM |
19692 | case OP_GetLocalSint8: |
19693 | Text.Op = PrintName("GetLocalSint8" ); |
19694 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19695 | break; |
19696 | case OP_GetLocalUint8: |
19697 | Text.Op = PrintName("GetLocalUint8" ); |
19698 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19699 | break; |
19700 | case OP_GetLocalSint16: |
19701 | Text.Op = PrintName("GetLocalSint16" ); |
19702 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19703 | break; |
19704 | case OP_GetLocalUint16: |
19705 | Text.Op = PrintName("GetLocalUint16" ); |
19706 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19707 | break; |
19708 | case OP_GetLocalSint32: |
19709 | Text.Op = PrintName("GetLocalSint32" ); |
19710 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19711 | break; |
19712 | case OP_GetLocalUint32: |
19713 | Text.Op = PrintName("GetLocalUint32" ); |
19714 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19715 | break; |
19716 | case OP_GetLocalSint64: |
19717 | Text.Op = PrintName("GetLocalSint64" ); |
19718 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19719 | break; |
19720 | case OP_GetLocalUint64: |
19721 | Text.Op = PrintName("GetLocalUint64" ); |
19722 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19723 | break; |
19724 | case OP_GetLocalIntAP: |
19725 | Text.Op = PrintName("GetLocalIntAP" ); |
19726 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19727 | break; |
19728 | case OP_GetLocalIntAPS: |
19729 | Text.Op = PrintName("GetLocalIntAPS" ); |
19730 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19731 | break; |
19732 | case OP_GetLocalBool: |
19733 | Text.Op = PrintName("GetLocalBool" ); |
19734 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19735 | break; |
19736 | case OP_GetLocalFixedPoint: |
19737 | Text.Op = PrintName("GetLocalFixedPoint" ); |
19738 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19739 | break; |
19740 | case OP_GetLocalPtr: |
19741 | Text.Op = PrintName("GetLocalPtr" ); |
19742 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19743 | break; |
19744 | case OP_GetLocalMemberPtr: |
19745 | Text.Op = PrintName("GetLocalMemberPtr" ); |
19746 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19747 | break; |
19748 | case OP_GetLocalFloat: |
19749 | Text.Op = PrintName("GetLocalFloat" ); |
19750 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
19751 | break; |
19752 | #endif |
19753 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19754 | bool emitGetLocalSint8( uint32_t , const SourceInfo &); |
19755 | bool emitGetLocalUint8( uint32_t , const SourceInfo &); |
19756 | bool emitGetLocalSint16( uint32_t , const SourceInfo &); |
19757 | bool emitGetLocalUint16( uint32_t , const SourceInfo &); |
19758 | bool emitGetLocalSint32( uint32_t , const SourceInfo &); |
19759 | bool emitGetLocalUint32( uint32_t , const SourceInfo &); |
19760 | bool emitGetLocalSint64( uint32_t , const SourceInfo &); |
19761 | bool emitGetLocalUint64( uint32_t , const SourceInfo &); |
19762 | bool emitGetLocalIntAP( uint32_t , const SourceInfo &); |
19763 | bool emitGetLocalIntAPS( uint32_t , const SourceInfo &); |
19764 | bool emitGetLocalBool( uint32_t , const SourceInfo &); |
19765 | bool emitGetLocalFixedPoint( uint32_t , const SourceInfo &); |
19766 | bool emitGetLocalPtr( uint32_t , const SourceInfo &); |
19767 | bool emitGetLocalMemberPtr( uint32_t , const SourceInfo &); |
19768 | bool emitGetLocalFloat( uint32_t , const SourceInfo &); |
19769 | #if defined(GET_EVAL_PROTO) |
19770 | template<PrimType> |
19771 | bool emitGetLocal(uint32_t, const SourceInfo &); |
19772 | #endif |
19773 | #endif |
19774 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19775 | [[nodiscard]] bool emitGetLocal(PrimType, uint32_t, const SourceInfo &I); |
19776 | #endif |
19777 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
19778 | bool |
19779 | #if defined(GET_EVAL_IMPL) |
19780 | EvalEmitter |
19781 | #else |
19782 | ByteCodeEmitter |
19783 | #endif |
19784 | ::emitGetLocal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
19785 | switch (T0) { |
19786 | case PT_Sint8: |
19787 | #ifdef GET_LINK_IMPL |
19788 | return emitGetLocalSint8 |
19789 | #else |
19790 | return emitGetLocal<PT_Sint8> |
19791 | #endif |
19792 | (A0, I); |
19793 | case PT_Uint8: |
19794 | #ifdef GET_LINK_IMPL |
19795 | return emitGetLocalUint8 |
19796 | #else |
19797 | return emitGetLocal<PT_Uint8> |
19798 | #endif |
19799 | (A0, I); |
19800 | case PT_Sint16: |
19801 | #ifdef GET_LINK_IMPL |
19802 | return emitGetLocalSint16 |
19803 | #else |
19804 | return emitGetLocal<PT_Sint16> |
19805 | #endif |
19806 | (A0, I); |
19807 | case PT_Uint16: |
19808 | #ifdef GET_LINK_IMPL |
19809 | return emitGetLocalUint16 |
19810 | #else |
19811 | return emitGetLocal<PT_Uint16> |
19812 | #endif |
19813 | (A0, I); |
19814 | case PT_Sint32: |
19815 | #ifdef GET_LINK_IMPL |
19816 | return emitGetLocalSint32 |
19817 | #else |
19818 | return emitGetLocal<PT_Sint32> |
19819 | #endif |
19820 | (A0, I); |
19821 | case PT_Uint32: |
19822 | #ifdef GET_LINK_IMPL |
19823 | return emitGetLocalUint32 |
19824 | #else |
19825 | return emitGetLocal<PT_Uint32> |
19826 | #endif |
19827 | (A0, I); |
19828 | case PT_Sint64: |
19829 | #ifdef GET_LINK_IMPL |
19830 | return emitGetLocalSint64 |
19831 | #else |
19832 | return emitGetLocal<PT_Sint64> |
19833 | #endif |
19834 | (A0, I); |
19835 | case PT_Uint64: |
19836 | #ifdef GET_LINK_IMPL |
19837 | return emitGetLocalUint64 |
19838 | #else |
19839 | return emitGetLocal<PT_Uint64> |
19840 | #endif |
19841 | (A0, I); |
19842 | case PT_IntAP: |
19843 | #ifdef GET_LINK_IMPL |
19844 | return emitGetLocalIntAP |
19845 | #else |
19846 | return emitGetLocal<PT_IntAP> |
19847 | #endif |
19848 | (A0, I); |
19849 | case PT_IntAPS: |
19850 | #ifdef GET_LINK_IMPL |
19851 | return emitGetLocalIntAPS |
19852 | #else |
19853 | return emitGetLocal<PT_IntAPS> |
19854 | #endif |
19855 | (A0, I); |
19856 | case PT_Bool: |
19857 | #ifdef GET_LINK_IMPL |
19858 | return emitGetLocalBool |
19859 | #else |
19860 | return emitGetLocal<PT_Bool> |
19861 | #endif |
19862 | (A0, I); |
19863 | case PT_FixedPoint: |
19864 | #ifdef GET_LINK_IMPL |
19865 | return emitGetLocalFixedPoint |
19866 | #else |
19867 | return emitGetLocal<PT_FixedPoint> |
19868 | #endif |
19869 | (A0, I); |
19870 | case PT_Ptr: |
19871 | #ifdef GET_LINK_IMPL |
19872 | return emitGetLocalPtr |
19873 | #else |
19874 | return emitGetLocal<PT_Ptr> |
19875 | #endif |
19876 | (A0, I); |
19877 | case PT_MemberPtr: |
19878 | #ifdef GET_LINK_IMPL |
19879 | return emitGetLocalMemberPtr |
19880 | #else |
19881 | return emitGetLocal<PT_MemberPtr> |
19882 | #endif |
19883 | (A0, I); |
19884 | case PT_Float: |
19885 | #ifdef GET_LINK_IMPL |
19886 | return emitGetLocalFloat |
19887 | #else |
19888 | return emitGetLocal<PT_Float> |
19889 | #endif |
19890 | (A0, I); |
19891 | } |
19892 | llvm_unreachable("invalid enum value" ); |
19893 | } |
19894 | #endif |
19895 | #ifdef GET_LINK_IMPL |
19896 | bool ByteCodeEmitter::emitGetLocalSint8( uint32_t A0, const SourceInfo &L) { |
19897 | return emitOp<uint32_t>(OP_GetLocalSint8, A0, L); |
19898 | } |
19899 | bool ByteCodeEmitter::emitGetLocalUint8( uint32_t A0, const SourceInfo &L) { |
19900 | return emitOp<uint32_t>(OP_GetLocalUint8, A0, L); |
19901 | } |
19902 | bool ByteCodeEmitter::emitGetLocalSint16( uint32_t A0, const SourceInfo &L) { |
19903 | return emitOp<uint32_t>(OP_GetLocalSint16, A0, L); |
19904 | } |
19905 | bool ByteCodeEmitter::emitGetLocalUint16( uint32_t A0, const SourceInfo &L) { |
19906 | return emitOp<uint32_t>(OP_GetLocalUint16, A0, L); |
19907 | } |
19908 | bool ByteCodeEmitter::emitGetLocalSint32( uint32_t A0, const SourceInfo &L) { |
19909 | return emitOp<uint32_t>(OP_GetLocalSint32, A0, L); |
19910 | } |
19911 | bool ByteCodeEmitter::emitGetLocalUint32( uint32_t A0, const SourceInfo &L) { |
19912 | return emitOp<uint32_t>(OP_GetLocalUint32, A0, L); |
19913 | } |
19914 | bool ByteCodeEmitter::emitGetLocalSint64( uint32_t A0, const SourceInfo &L) { |
19915 | return emitOp<uint32_t>(OP_GetLocalSint64, A0, L); |
19916 | } |
19917 | bool ByteCodeEmitter::emitGetLocalUint64( uint32_t A0, const SourceInfo &L) { |
19918 | return emitOp<uint32_t>(OP_GetLocalUint64, A0, L); |
19919 | } |
19920 | bool ByteCodeEmitter::emitGetLocalIntAP( uint32_t A0, const SourceInfo &L) { |
19921 | return emitOp<uint32_t>(OP_GetLocalIntAP, A0, L); |
19922 | } |
19923 | bool ByteCodeEmitter::emitGetLocalIntAPS( uint32_t A0, const SourceInfo &L) { |
19924 | return emitOp<uint32_t>(OP_GetLocalIntAPS, A0, L); |
19925 | } |
19926 | bool ByteCodeEmitter::emitGetLocalBool( uint32_t A0, const SourceInfo &L) { |
19927 | return emitOp<uint32_t>(OP_GetLocalBool, A0, L); |
19928 | } |
19929 | bool ByteCodeEmitter::emitGetLocalFixedPoint( uint32_t A0, const SourceInfo &L) { |
19930 | return emitOp<uint32_t>(OP_GetLocalFixedPoint, A0, L); |
19931 | } |
19932 | bool ByteCodeEmitter::emitGetLocalPtr( uint32_t A0, const SourceInfo &L) { |
19933 | return emitOp<uint32_t>(OP_GetLocalPtr, A0, L); |
19934 | } |
19935 | bool ByteCodeEmitter::emitGetLocalMemberPtr( uint32_t A0, const SourceInfo &L) { |
19936 | return emitOp<uint32_t>(OP_GetLocalMemberPtr, A0, L); |
19937 | } |
19938 | bool ByteCodeEmitter::emitGetLocalFloat( uint32_t A0, const SourceInfo &L) { |
19939 | return emitOp<uint32_t>(OP_GetLocalFloat, A0, L); |
19940 | } |
19941 | #endif |
19942 | #ifdef GET_OPCODE_NAMES |
19943 | OP_GetMemberPtr, |
19944 | #endif |
19945 | #ifdef GET_INTERP |
19946 | case OP_GetMemberPtr: { |
19947 | const auto V0 = ReadArg<const ValueDecl*>(S, PC); |
19948 | if (!GetMemberPtr(S, OpPC, V0)) |
19949 | return false; |
19950 | continue; |
19951 | } |
19952 | #endif |
19953 | #ifdef GET_DISASM |
19954 | case OP_GetMemberPtr: |
19955 | Text.Op = PrintName("GetMemberPtr" ); |
19956 | Text.Args.push_back(printArg<const ValueDecl*>(P, PC)); |
19957 | break; |
19958 | #endif |
19959 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19960 | bool emitGetMemberPtr( const ValueDecl* , const SourceInfo &); |
19961 | #endif |
19962 | #ifdef GET_LINK_IMPL |
19963 | bool ByteCodeEmitter::emitGetMemberPtr( const ValueDecl* A0, const SourceInfo &L) { |
19964 | return emitOp<const ValueDecl*>(OP_GetMemberPtr, A0, L); |
19965 | } |
19966 | #endif |
19967 | #ifdef GET_EVAL_IMPL |
19968 | bool EvalEmitter::emitGetMemberPtr( const ValueDecl* A0, const SourceInfo &L) { |
19969 | if (!isActive()) return true; |
19970 | CurrentSource = L; |
19971 | return GetMemberPtr(S, OpPC, A0); |
19972 | } |
19973 | #endif |
19974 | #ifdef GET_OPCODE_NAMES |
19975 | OP_GetMemberPtrBase, |
19976 | #endif |
19977 | #ifdef GET_INTERP |
19978 | case OP_GetMemberPtrBase: { |
19979 | if (!GetMemberPtrBase(S, OpPC)) |
19980 | return false; |
19981 | continue; |
19982 | } |
19983 | #endif |
19984 | #ifdef GET_DISASM |
19985 | case OP_GetMemberPtrBase: |
19986 | Text.Op = PrintName("GetMemberPtrBase" ); |
19987 | break; |
19988 | #endif |
19989 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19990 | bool emitGetMemberPtrBase(const SourceInfo &); |
19991 | #endif |
19992 | #ifdef GET_LINK_IMPL |
19993 | bool ByteCodeEmitter::emitGetMemberPtrBase(const SourceInfo &L) { |
19994 | return emitOp<>(OP_GetMemberPtrBase, L); |
19995 | } |
19996 | #endif |
19997 | #ifdef GET_EVAL_IMPL |
19998 | bool EvalEmitter::emitGetMemberPtrBase(const SourceInfo &L) { |
19999 | if (!isActive()) return true; |
20000 | CurrentSource = L; |
20001 | return GetMemberPtrBase(S, OpPC); |
20002 | } |
20003 | #endif |
20004 | #ifdef GET_OPCODE_NAMES |
20005 | OP_GetMemberPtrBasePop, |
20006 | #endif |
20007 | #ifdef GET_INTERP |
20008 | case OP_GetMemberPtrBasePop: { |
20009 | const auto V0 = ReadArg<int32_t>(S, PC); |
20010 | if (!GetMemberPtrBasePop(S, OpPC, V0)) |
20011 | return false; |
20012 | continue; |
20013 | } |
20014 | #endif |
20015 | #ifdef GET_DISASM |
20016 | case OP_GetMemberPtrBasePop: |
20017 | Text.Op = PrintName("GetMemberPtrBasePop" ); |
20018 | Text.Args.push_back(printArg<int32_t>(P, PC)); |
20019 | break; |
20020 | #endif |
20021 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20022 | bool emitGetMemberPtrBasePop( int32_t , const SourceInfo &); |
20023 | #endif |
20024 | #ifdef GET_LINK_IMPL |
20025 | bool ByteCodeEmitter::emitGetMemberPtrBasePop( int32_t A0, const SourceInfo &L) { |
20026 | return emitOp<int32_t>(OP_GetMemberPtrBasePop, A0, L); |
20027 | } |
20028 | #endif |
20029 | #ifdef GET_EVAL_IMPL |
20030 | bool EvalEmitter::emitGetMemberPtrBasePop( int32_t A0, const SourceInfo &L) { |
20031 | if (!isActive()) return true; |
20032 | CurrentSource = L; |
20033 | return GetMemberPtrBasePop(S, OpPC, A0); |
20034 | } |
20035 | #endif |
20036 | #ifdef GET_OPCODE_NAMES |
20037 | OP_GetMemberPtrDecl, |
20038 | #endif |
20039 | #ifdef GET_INTERP |
20040 | case OP_GetMemberPtrDecl: { |
20041 | if (!GetMemberPtrDecl(S, OpPC)) |
20042 | return false; |
20043 | continue; |
20044 | } |
20045 | #endif |
20046 | #ifdef GET_DISASM |
20047 | case OP_GetMemberPtrDecl: |
20048 | Text.Op = PrintName("GetMemberPtrDecl" ); |
20049 | break; |
20050 | #endif |
20051 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20052 | bool emitGetMemberPtrDecl(const SourceInfo &); |
20053 | #endif |
20054 | #ifdef GET_LINK_IMPL |
20055 | bool ByteCodeEmitter::emitGetMemberPtrDecl(const SourceInfo &L) { |
20056 | return emitOp<>(OP_GetMemberPtrDecl, L); |
20057 | } |
20058 | #endif |
20059 | #ifdef GET_EVAL_IMPL |
20060 | bool EvalEmitter::emitGetMemberPtrDecl(const SourceInfo &L) { |
20061 | if (!isActive()) return true; |
20062 | CurrentSource = L; |
20063 | return GetMemberPtrDecl(S, OpPC); |
20064 | } |
20065 | #endif |
20066 | #ifdef GET_OPCODE_NAMES |
20067 | OP_GetParamSint8, |
20068 | OP_GetParamUint8, |
20069 | OP_GetParamSint16, |
20070 | OP_GetParamUint16, |
20071 | OP_GetParamSint32, |
20072 | OP_GetParamUint32, |
20073 | OP_GetParamSint64, |
20074 | OP_GetParamUint64, |
20075 | OP_GetParamIntAP, |
20076 | OP_GetParamIntAPS, |
20077 | OP_GetParamBool, |
20078 | OP_GetParamFixedPoint, |
20079 | OP_GetParamPtr, |
20080 | OP_GetParamMemberPtr, |
20081 | OP_GetParamFloat, |
20082 | #endif |
20083 | #ifdef GET_INTERP |
20084 | case OP_GetParamSint8: { |
20085 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20086 | if (!GetParam<PT_Sint8>(S, OpPC, V0)) |
20087 | return false; |
20088 | continue; |
20089 | } |
20090 | case OP_GetParamUint8: { |
20091 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20092 | if (!GetParam<PT_Uint8>(S, OpPC, V0)) |
20093 | return false; |
20094 | continue; |
20095 | } |
20096 | case OP_GetParamSint16: { |
20097 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20098 | if (!GetParam<PT_Sint16>(S, OpPC, V0)) |
20099 | return false; |
20100 | continue; |
20101 | } |
20102 | case OP_GetParamUint16: { |
20103 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20104 | if (!GetParam<PT_Uint16>(S, OpPC, V0)) |
20105 | return false; |
20106 | continue; |
20107 | } |
20108 | case OP_GetParamSint32: { |
20109 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20110 | if (!GetParam<PT_Sint32>(S, OpPC, V0)) |
20111 | return false; |
20112 | continue; |
20113 | } |
20114 | case OP_GetParamUint32: { |
20115 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20116 | if (!GetParam<PT_Uint32>(S, OpPC, V0)) |
20117 | return false; |
20118 | continue; |
20119 | } |
20120 | case OP_GetParamSint64: { |
20121 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20122 | if (!GetParam<PT_Sint64>(S, OpPC, V0)) |
20123 | return false; |
20124 | continue; |
20125 | } |
20126 | case OP_GetParamUint64: { |
20127 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20128 | if (!GetParam<PT_Uint64>(S, OpPC, V0)) |
20129 | return false; |
20130 | continue; |
20131 | } |
20132 | case OP_GetParamIntAP: { |
20133 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20134 | if (!GetParam<PT_IntAP>(S, OpPC, V0)) |
20135 | return false; |
20136 | continue; |
20137 | } |
20138 | case OP_GetParamIntAPS: { |
20139 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20140 | if (!GetParam<PT_IntAPS>(S, OpPC, V0)) |
20141 | return false; |
20142 | continue; |
20143 | } |
20144 | case OP_GetParamBool: { |
20145 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20146 | if (!GetParam<PT_Bool>(S, OpPC, V0)) |
20147 | return false; |
20148 | continue; |
20149 | } |
20150 | case OP_GetParamFixedPoint: { |
20151 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20152 | if (!GetParam<PT_FixedPoint>(S, OpPC, V0)) |
20153 | return false; |
20154 | continue; |
20155 | } |
20156 | case OP_GetParamPtr: { |
20157 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20158 | if (!GetParam<PT_Ptr>(S, OpPC, V0)) |
20159 | return false; |
20160 | continue; |
20161 | } |
20162 | case OP_GetParamMemberPtr: { |
20163 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20164 | if (!GetParam<PT_MemberPtr>(S, OpPC, V0)) |
20165 | return false; |
20166 | continue; |
20167 | } |
20168 | case OP_GetParamFloat: { |
20169 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20170 | if (!GetParam<PT_Float>(S, OpPC, V0)) |
20171 | return false; |
20172 | continue; |
20173 | } |
20174 | #endif |
20175 | #ifdef GET_DISASM |
20176 | case OP_GetParamSint8: |
20177 | Text.Op = PrintName("GetParamSint8" ); |
20178 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20179 | break; |
20180 | case OP_GetParamUint8: |
20181 | Text.Op = PrintName("GetParamUint8" ); |
20182 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20183 | break; |
20184 | case OP_GetParamSint16: |
20185 | Text.Op = PrintName("GetParamSint16" ); |
20186 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20187 | break; |
20188 | case OP_GetParamUint16: |
20189 | Text.Op = PrintName("GetParamUint16" ); |
20190 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20191 | break; |
20192 | case OP_GetParamSint32: |
20193 | Text.Op = PrintName("GetParamSint32" ); |
20194 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20195 | break; |
20196 | case OP_GetParamUint32: |
20197 | Text.Op = PrintName("GetParamUint32" ); |
20198 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20199 | break; |
20200 | case OP_GetParamSint64: |
20201 | Text.Op = PrintName("GetParamSint64" ); |
20202 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20203 | break; |
20204 | case OP_GetParamUint64: |
20205 | Text.Op = PrintName("GetParamUint64" ); |
20206 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20207 | break; |
20208 | case OP_GetParamIntAP: |
20209 | Text.Op = PrintName("GetParamIntAP" ); |
20210 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20211 | break; |
20212 | case OP_GetParamIntAPS: |
20213 | Text.Op = PrintName("GetParamIntAPS" ); |
20214 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20215 | break; |
20216 | case OP_GetParamBool: |
20217 | Text.Op = PrintName("GetParamBool" ); |
20218 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20219 | break; |
20220 | case OP_GetParamFixedPoint: |
20221 | Text.Op = PrintName("GetParamFixedPoint" ); |
20222 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20223 | break; |
20224 | case OP_GetParamPtr: |
20225 | Text.Op = PrintName("GetParamPtr" ); |
20226 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20227 | break; |
20228 | case OP_GetParamMemberPtr: |
20229 | Text.Op = PrintName("GetParamMemberPtr" ); |
20230 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20231 | break; |
20232 | case OP_GetParamFloat: |
20233 | Text.Op = PrintName("GetParamFloat" ); |
20234 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20235 | break; |
20236 | #endif |
20237 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20238 | bool emitGetParamSint8( uint32_t , const SourceInfo &); |
20239 | bool emitGetParamUint8( uint32_t , const SourceInfo &); |
20240 | bool emitGetParamSint16( uint32_t , const SourceInfo &); |
20241 | bool emitGetParamUint16( uint32_t , const SourceInfo &); |
20242 | bool emitGetParamSint32( uint32_t , const SourceInfo &); |
20243 | bool emitGetParamUint32( uint32_t , const SourceInfo &); |
20244 | bool emitGetParamSint64( uint32_t , const SourceInfo &); |
20245 | bool emitGetParamUint64( uint32_t , const SourceInfo &); |
20246 | bool emitGetParamIntAP( uint32_t , const SourceInfo &); |
20247 | bool emitGetParamIntAPS( uint32_t , const SourceInfo &); |
20248 | bool emitGetParamBool( uint32_t , const SourceInfo &); |
20249 | bool emitGetParamFixedPoint( uint32_t , const SourceInfo &); |
20250 | bool emitGetParamPtr( uint32_t , const SourceInfo &); |
20251 | bool emitGetParamMemberPtr( uint32_t , const SourceInfo &); |
20252 | bool emitGetParamFloat( uint32_t , const SourceInfo &); |
20253 | #endif |
20254 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20255 | [[nodiscard]] bool emitGetParam(PrimType, uint32_t, const SourceInfo &I); |
20256 | #endif |
20257 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
20258 | bool |
20259 | #if defined(GET_EVAL_IMPL) |
20260 | EvalEmitter |
20261 | #else |
20262 | ByteCodeEmitter |
20263 | #endif |
20264 | ::emitGetParam(PrimType T0, uint32_t A0, const SourceInfo &I) { |
20265 | switch (T0) { |
20266 | case PT_Sint8: |
20267 | return emitGetParamSint8(A0, I); |
20268 | case PT_Uint8: |
20269 | return emitGetParamUint8(A0, I); |
20270 | case PT_Sint16: |
20271 | return emitGetParamSint16(A0, I); |
20272 | case PT_Uint16: |
20273 | return emitGetParamUint16(A0, I); |
20274 | case PT_Sint32: |
20275 | return emitGetParamSint32(A0, I); |
20276 | case PT_Uint32: |
20277 | return emitGetParamUint32(A0, I); |
20278 | case PT_Sint64: |
20279 | return emitGetParamSint64(A0, I); |
20280 | case PT_Uint64: |
20281 | return emitGetParamUint64(A0, I); |
20282 | case PT_IntAP: |
20283 | return emitGetParamIntAP(A0, I); |
20284 | case PT_IntAPS: |
20285 | return emitGetParamIntAPS(A0, I); |
20286 | case PT_Bool: |
20287 | return emitGetParamBool(A0, I); |
20288 | case PT_FixedPoint: |
20289 | return emitGetParamFixedPoint(A0, I); |
20290 | case PT_Ptr: |
20291 | return emitGetParamPtr(A0, I); |
20292 | case PT_MemberPtr: |
20293 | return emitGetParamMemberPtr(A0, I); |
20294 | case PT_Float: |
20295 | return emitGetParamFloat(A0, I); |
20296 | } |
20297 | llvm_unreachable("invalid enum value" ); |
20298 | } |
20299 | #endif |
20300 | #ifdef GET_LINK_IMPL |
20301 | bool ByteCodeEmitter::emitGetParamSint8( uint32_t A0, const SourceInfo &L) { |
20302 | return emitOp<uint32_t>(OP_GetParamSint8, A0, L); |
20303 | } |
20304 | bool ByteCodeEmitter::emitGetParamUint8( uint32_t A0, const SourceInfo &L) { |
20305 | return emitOp<uint32_t>(OP_GetParamUint8, A0, L); |
20306 | } |
20307 | bool ByteCodeEmitter::emitGetParamSint16( uint32_t A0, const SourceInfo &L) { |
20308 | return emitOp<uint32_t>(OP_GetParamSint16, A0, L); |
20309 | } |
20310 | bool ByteCodeEmitter::emitGetParamUint16( uint32_t A0, const SourceInfo &L) { |
20311 | return emitOp<uint32_t>(OP_GetParamUint16, A0, L); |
20312 | } |
20313 | bool ByteCodeEmitter::emitGetParamSint32( uint32_t A0, const SourceInfo &L) { |
20314 | return emitOp<uint32_t>(OP_GetParamSint32, A0, L); |
20315 | } |
20316 | bool ByteCodeEmitter::emitGetParamUint32( uint32_t A0, const SourceInfo &L) { |
20317 | return emitOp<uint32_t>(OP_GetParamUint32, A0, L); |
20318 | } |
20319 | bool ByteCodeEmitter::emitGetParamSint64( uint32_t A0, const SourceInfo &L) { |
20320 | return emitOp<uint32_t>(OP_GetParamSint64, A0, L); |
20321 | } |
20322 | bool ByteCodeEmitter::emitGetParamUint64( uint32_t A0, const SourceInfo &L) { |
20323 | return emitOp<uint32_t>(OP_GetParamUint64, A0, L); |
20324 | } |
20325 | bool ByteCodeEmitter::emitGetParamIntAP( uint32_t A0, const SourceInfo &L) { |
20326 | return emitOp<uint32_t>(OP_GetParamIntAP, A0, L); |
20327 | } |
20328 | bool ByteCodeEmitter::emitGetParamIntAPS( uint32_t A0, const SourceInfo &L) { |
20329 | return emitOp<uint32_t>(OP_GetParamIntAPS, A0, L); |
20330 | } |
20331 | bool ByteCodeEmitter::emitGetParamBool( uint32_t A0, const SourceInfo &L) { |
20332 | return emitOp<uint32_t>(OP_GetParamBool, A0, L); |
20333 | } |
20334 | bool ByteCodeEmitter::emitGetParamFixedPoint( uint32_t A0, const SourceInfo &L) { |
20335 | return emitOp<uint32_t>(OP_GetParamFixedPoint, A0, L); |
20336 | } |
20337 | bool ByteCodeEmitter::emitGetParamPtr( uint32_t A0, const SourceInfo &L) { |
20338 | return emitOp<uint32_t>(OP_GetParamPtr, A0, L); |
20339 | } |
20340 | bool ByteCodeEmitter::emitGetParamMemberPtr( uint32_t A0, const SourceInfo &L) { |
20341 | return emitOp<uint32_t>(OP_GetParamMemberPtr, A0, L); |
20342 | } |
20343 | bool ByteCodeEmitter::emitGetParamFloat( uint32_t A0, const SourceInfo &L) { |
20344 | return emitOp<uint32_t>(OP_GetParamFloat, A0, L); |
20345 | } |
20346 | #endif |
20347 | #ifdef GET_EVAL_IMPL |
20348 | bool EvalEmitter::emitGetParamSint8( uint32_t A0, const SourceInfo &L) { |
20349 | if (!isActive()) return true; |
20350 | CurrentSource = L; |
20351 | return GetParam<PT_Sint8>(S, OpPC, A0); |
20352 | } |
20353 | bool EvalEmitter::emitGetParamUint8( uint32_t A0, const SourceInfo &L) { |
20354 | if (!isActive()) return true; |
20355 | CurrentSource = L; |
20356 | return GetParam<PT_Uint8>(S, OpPC, A0); |
20357 | } |
20358 | bool EvalEmitter::emitGetParamSint16( uint32_t A0, const SourceInfo &L) { |
20359 | if (!isActive()) return true; |
20360 | CurrentSource = L; |
20361 | return GetParam<PT_Sint16>(S, OpPC, A0); |
20362 | } |
20363 | bool EvalEmitter::emitGetParamUint16( uint32_t A0, const SourceInfo &L) { |
20364 | if (!isActive()) return true; |
20365 | CurrentSource = L; |
20366 | return GetParam<PT_Uint16>(S, OpPC, A0); |
20367 | } |
20368 | bool EvalEmitter::emitGetParamSint32( uint32_t A0, const SourceInfo &L) { |
20369 | if (!isActive()) return true; |
20370 | CurrentSource = L; |
20371 | return GetParam<PT_Sint32>(S, OpPC, A0); |
20372 | } |
20373 | bool EvalEmitter::emitGetParamUint32( uint32_t A0, const SourceInfo &L) { |
20374 | if (!isActive()) return true; |
20375 | CurrentSource = L; |
20376 | return GetParam<PT_Uint32>(S, OpPC, A0); |
20377 | } |
20378 | bool EvalEmitter::emitGetParamSint64( uint32_t A0, const SourceInfo &L) { |
20379 | if (!isActive()) return true; |
20380 | CurrentSource = L; |
20381 | return GetParam<PT_Sint64>(S, OpPC, A0); |
20382 | } |
20383 | bool EvalEmitter::emitGetParamUint64( uint32_t A0, const SourceInfo &L) { |
20384 | if (!isActive()) return true; |
20385 | CurrentSource = L; |
20386 | return GetParam<PT_Uint64>(S, OpPC, A0); |
20387 | } |
20388 | bool EvalEmitter::emitGetParamIntAP( uint32_t A0, const SourceInfo &L) { |
20389 | if (!isActive()) return true; |
20390 | CurrentSource = L; |
20391 | return GetParam<PT_IntAP>(S, OpPC, A0); |
20392 | } |
20393 | bool EvalEmitter::emitGetParamIntAPS( uint32_t A0, const SourceInfo &L) { |
20394 | if (!isActive()) return true; |
20395 | CurrentSource = L; |
20396 | return GetParam<PT_IntAPS>(S, OpPC, A0); |
20397 | } |
20398 | bool EvalEmitter::emitGetParamBool( uint32_t A0, const SourceInfo &L) { |
20399 | if (!isActive()) return true; |
20400 | CurrentSource = L; |
20401 | return GetParam<PT_Bool>(S, OpPC, A0); |
20402 | } |
20403 | bool EvalEmitter::emitGetParamFixedPoint( uint32_t A0, const SourceInfo &L) { |
20404 | if (!isActive()) return true; |
20405 | CurrentSource = L; |
20406 | return GetParam<PT_FixedPoint>(S, OpPC, A0); |
20407 | } |
20408 | bool EvalEmitter::emitGetParamPtr( uint32_t A0, const SourceInfo &L) { |
20409 | if (!isActive()) return true; |
20410 | CurrentSource = L; |
20411 | return GetParam<PT_Ptr>(S, OpPC, A0); |
20412 | } |
20413 | bool EvalEmitter::emitGetParamMemberPtr( uint32_t A0, const SourceInfo &L) { |
20414 | if (!isActive()) return true; |
20415 | CurrentSource = L; |
20416 | return GetParam<PT_MemberPtr>(S, OpPC, A0); |
20417 | } |
20418 | bool EvalEmitter::emitGetParamFloat( uint32_t A0, const SourceInfo &L) { |
20419 | if (!isActive()) return true; |
20420 | CurrentSource = L; |
20421 | return GetParam<PT_Float>(S, OpPC, A0); |
20422 | } |
20423 | #endif |
20424 | #ifdef GET_OPCODE_NAMES |
20425 | OP_GetPtrActiveField, |
20426 | #endif |
20427 | #ifdef GET_INTERP |
20428 | case OP_GetPtrActiveField: { |
20429 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20430 | if (!GetPtrActiveField(S, OpPC, V0)) |
20431 | return false; |
20432 | continue; |
20433 | } |
20434 | #endif |
20435 | #ifdef GET_DISASM |
20436 | case OP_GetPtrActiveField: |
20437 | Text.Op = PrintName("GetPtrActiveField" ); |
20438 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20439 | break; |
20440 | #endif |
20441 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20442 | bool emitGetPtrActiveField( uint32_t , const SourceInfo &); |
20443 | #endif |
20444 | #ifdef GET_LINK_IMPL |
20445 | bool ByteCodeEmitter::emitGetPtrActiveField( uint32_t A0, const SourceInfo &L) { |
20446 | return emitOp<uint32_t>(OP_GetPtrActiveField, A0, L); |
20447 | } |
20448 | #endif |
20449 | #ifdef GET_EVAL_IMPL |
20450 | bool EvalEmitter::emitGetPtrActiveField( uint32_t A0, const SourceInfo &L) { |
20451 | if (!isActive()) return true; |
20452 | CurrentSource = L; |
20453 | return GetPtrActiveField(S, OpPC, A0); |
20454 | } |
20455 | #endif |
20456 | #ifdef GET_OPCODE_NAMES |
20457 | OP_GetPtrActiveThisField, |
20458 | #endif |
20459 | #ifdef GET_INTERP |
20460 | case OP_GetPtrActiveThisField: { |
20461 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20462 | if (!GetPtrActiveThisField(S, OpPC, V0)) |
20463 | return false; |
20464 | continue; |
20465 | } |
20466 | #endif |
20467 | #ifdef GET_DISASM |
20468 | case OP_GetPtrActiveThisField: |
20469 | Text.Op = PrintName("GetPtrActiveThisField" ); |
20470 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20471 | break; |
20472 | #endif |
20473 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20474 | bool emitGetPtrActiveThisField( uint32_t , const SourceInfo &); |
20475 | #endif |
20476 | #ifdef GET_LINK_IMPL |
20477 | bool ByteCodeEmitter::emitGetPtrActiveThisField( uint32_t A0, const SourceInfo &L) { |
20478 | return emitOp<uint32_t>(OP_GetPtrActiveThisField, A0, L); |
20479 | } |
20480 | #endif |
20481 | #ifdef GET_EVAL_IMPL |
20482 | bool EvalEmitter::emitGetPtrActiveThisField( uint32_t A0, const SourceInfo &L) { |
20483 | if (!isActive()) return true; |
20484 | CurrentSource = L; |
20485 | return GetPtrActiveThisField(S, OpPC, A0); |
20486 | } |
20487 | #endif |
20488 | #ifdef GET_OPCODE_NAMES |
20489 | OP_GetPtrBase, |
20490 | #endif |
20491 | #ifdef GET_INTERP |
20492 | case OP_GetPtrBase: { |
20493 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20494 | if (!GetPtrBase(S, OpPC, V0)) |
20495 | return false; |
20496 | continue; |
20497 | } |
20498 | #endif |
20499 | #ifdef GET_DISASM |
20500 | case OP_GetPtrBase: |
20501 | Text.Op = PrintName("GetPtrBase" ); |
20502 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20503 | break; |
20504 | #endif |
20505 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20506 | bool emitGetPtrBase( uint32_t , const SourceInfo &); |
20507 | #endif |
20508 | #ifdef GET_LINK_IMPL |
20509 | bool ByteCodeEmitter::emitGetPtrBase( uint32_t A0, const SourceInfo &L) { |
20510 | return emitOp<uint32_t>(OP_GetPtrBase, A0, L); |
20511 | } |
20512 | #endif |
20513 | #ifdef GET_EVAL_IMPL |
20514 | bool EvalEmitter::emitGetPtrBase( uint32_t A0, const SourceInfo &L) { |
20515 | if (!isActive()) return true; |
20516 | CurrentSource = L; |
20517 | return GetPtrBase(S, OpPC, A0); |
20518 | } |
20519 | #endif |
20520 | #ifdef GET_OPCODE_NAMES |
20521 | OP_GetPtrBasePop, |
20522 | #endif |
20523 | #ifdef GET_INTERP |
20524 | case OP_GetPtrBasePop: { |
20525 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20526 | const auto V1 = ReadArg<bool>(S, PC); |
20527 | if (!GetPtrBasePop(S, OpPC, V0, V1)) |
20528 | return false; |
20529 | continue; |
20530 | } |
20531 | #endif |
20532 | #ifdef GET_DISASM |
20533 | case OP_GetPtrBasePop: |
20534 | Text.Op = PrintName("GetPtrBasePop" ); |
20535 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20536 | Text.Args.push_back(printArg<bool>(P, PC)); |
20537 | break; |
20538 | #endif |
20539 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20540 | bool emitGetPtrBasePop( uint32_t , bool , const SourceInfo &); |
20541 | #endif |
20542 | #ifdef GET_LINK_IMPL |
20543 | bool ByteCodeEmitter::emitGetPtrBasePop( uint32_t A0, bool A1, const SourceInfo &L) { |
20544 | return emitOp<uint32_t, bool>(OP_GetPtrBasePop, A0, A1, L); |
20545 | } |
20546 | #endif |
20547 | #ifdef GET_EVAL_IMPL |
20548 | bool EvalEmitter::emitGetPtrBasePop( uint32_t A0, bool A1, const SourceInfo &L) { |
20549 | if (!isActive()) return true; |
20550 | CurrentSource = L; |
20551 | return GetPtrBasePop(S, OpPC, A0, A1); |
20552 | } |
20553 | #endif |
20554 | #ifdef GET_OPCODE_NAMES |
20555 | OP_GetPtrDerivedPop, |
20556 | #endif |
20557 | #ifdef GET_INTERP |
20558 | case OP_GetPtrDerivedPop: { |
20559 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20560 | const auto V1 = ReadArg<bool>(S, PC); |
20561 | const auto V2 = ReadArg<const Type *>(S, PC); |
20562 | if (!GetPtrDerivedPop(S, OpPC, V0, V1, V2)) |
20563 | return false; |
20564 | continue; |
20565 | } |
20566 | #endif |
20567 | #ifdef GET_DISASM |
20568 | case OP_GetPtrDerivedPop: |
20569 | Text.Op = PrintName("GetPtrDerivedPop" ); |
20570 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20571 | Text.Args.push_back(printArg<bool>(P, PC)); |
20572 | Text.Args.push_back(printArg<const Type *>(P, PC)); |
20573 | break; |
20574 | #endif |
20575 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20576 | bool emitGetPtrDerivedPop( uint32_t , bool , const Type * , const SourceInfo &); |
20577 | #endif |
20578 | #ifdef GET_LINK_IMPL |
20579 | bool ByteCodeEmitter::emitGetPtrDerivedPop( uint32_t A0, bool A1, const Type * A2, const SourceInfo &L) { |
20580 | return emitOp<uint32_t, bool, const Type *>(OP_GetPtrDerivedPop, A0, A1, A2, L); |
20581 | } |
20582 | #endif |
20583 | #ifdef GET_EVAL_IMPL |
20584 | bool EvalEmitter::emitGetPtrDerivedPop( uint32_t A0, bool A1, const Type * A2, const SourceInfo &L) { |
20585 | if (!isActive()) return true; |
20586 | CurrentSource = L; |
20587 | return GetPtrDerivedPop(S, OpPC, A0, A1, A2); |
20588 | } |
20589 | #endif |
20590 | #ifdef GET_OPCODE_NAMES |
20591 | OP_GetPtrField, |
20592 | #endif |
20593 | #ifdef GET_INTERP |
20594 | case OP_GetPtrField: { |
20595 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20596 | if (!GetPtrField(S, OpPC, V0)) |
20597 | return false; |
20598 | continue; |
20599 | } |
20600 | #endif |
20601 | #ifdef GET_DISASM |
20602 | case OP_GetPtrField: |
20603 | Text.Op = PrintName("GetPtrField" ); |
20604 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20605 | break; |
20606 | #endif |
20607 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20608 | bool emitGetPtrField( uint32_t , const SourceInfo &); |
20609 | #endif |
20610 | #ifdef GET_LINK_IMPL |
20611 | bool ByteCodeEmitter::emitGetPtrField( uint32_t A0, const SourceInfo &L) { |
20612 | return emitOp<uint32_t>(OP_GetPtrField, A0, L); |
20613 | } |
20614 | #endif |
20615 | #ifdef GET_EVAL_IMPL |
20616 | bool EvalEmitter::emitGetPtrField( uint32_t A0, const SourceInfo &L) { |
20617 | if (!isActive()) return true; |
20618 | CurrentSource = L; |
20619 | return GetPtrField(S, OpPC, A0); |
20620 | } |
20621 | #endif |
20622 | #ifdef GET_OPCODE_NAMES |
20623 | OP_GetPtrFieldPop, |
20624 | #endif |
20625 | #ifdef GET_INTERP |
20626 | case OP_GetPtrFieldPop: { |
20627 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20628 | if (!GetPtrFieldPop(S, OpPC, V0)) |
20629 | return false; |
20630 | continue; |
20631 | } |
20632 | #endif |
20633 | #ifdef GET_DISASM |
20634 | case OP_GetPtrFieldPop: |
20635 | Text.Op = PrintName("GetPtrFieldPop" ); |
20636 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20637 | break; |
20638 | #endif |
20639 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20640 | bool emitGetPtrFieldPop( uint32_t , const SourceInfo &); |
20641 | #endif |
20642 | #ifdef GET_LINK_IMPL |
20643 | bool ByteCodeEmitter::emitGetPtrFieldPop( uint32_t A0, const SourceInfo &L) { |
20644 | return emitOp<uint32_t>(OP_GetPtrFieldPop, A0, L); |
20645 | } |
20646 | #endif |
20647 | #ifdef GET_EVAL_IMPL |
20648 | bool EvalEmitter::emitGetPtrFieldPop( uint32_t A0, const SourceInfo &L) { |
20649 | if (!isActive()) return true; |
20650 | CurrentSource = L; |
20651 | return GetPtrFieldPop(S, OpPC, A0); |
20652 | } |
20653 | #endif |
20654 | #ifdef GET_OPCODE_NAMES |
20655 | OP_GetPtrGlobal, |
20656 | #endif |
20657 | #ifdef GET_INTERP |
20658 | case OP_GetPtrGlobal: { |
20659 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20660 | if (!GetPtrGlobal(S, OpPC, V0)) |
20661 | return false; |
20662 | continue; |
20663 | } |
20664 | #endif |
20665 | #ifdef GET_DISASM |
20666 | case OP_GetPtrGlobal: |
20667 | Text.Op = PrintName("GetPtrGlobal" ); |
20668 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20669 | break; |
20670 | #endif |
20671 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20672 | bool emitGetPtrGlobal( uint32_t , const SourceInfo &); |
20673 | #endif |
20674 | #ifdef GET_LINK_IMPL |
20675 | bool ByteCodeEmitter::emitGetPtrGlobal( uint32_t A0, const SourceInfo &L) { |
20676 | return emitOp<uint32_t>(OP_GetPtrGlobal, A0, L); |
20677 | } |
20678 | #endif |
20679 | #ifdef GET_EVAL_IMPL |
20680 | bool EvalEmitter::emitGetPtrGlobal( uint32_t A0, const SourceInfo &L) { |
20681 | if (!isActive()) return true; |
20682 | CurrentSource = L; |
20683 | return GetPtrGlobal(S, OpPC, A0); |
20684 | } |
20685 | #endif |
20686 | #ifdef GET_OPCODE_NAMES |
20687 | OP_GetPtrLocal, |
20688 | #endif |
20689 | #ifdef GET_INTERP |
20690 | case OP_GetPtrLocal: { |
20691 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20692 | if (!GetPtrLocal(S, OpPC, V0)) |
20693 | return false; |
20694 | continue; |
20695 | } |
20696 | #endif |
20697 | #ifdef GET_DISASM |
20698 | case OP_GetPtrLocal: |
20699 | Text.Op = PrintName("GetPtrLocal" ); |
20700 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20701 | break; |
20702 | #endif |
20703 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20704 | bool emitGetPtrLocal( uint32_t , const SourceInfo &); |
20705 | #endif |
20706 | #ifdef GET_LINK_IMPL |
20707 | bool ByteCodeEmitter::emitGetPtrLocal( uint32_t A0, const SourceInfo &L) { |
20708 | return emitOp<uint32_t>(OP_GetPtrLocal, A0, L); |
20709 | } |
20710 | #endif |
20711 | #ifdef GET_OPCODE_NAMES |
20712 | OP_GetPtrParam, |
20713 | #endif |
20714 | #ifdef GET_INTERP |
20715 | case OP_GetPtrParam: { |
20716 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20717 | if (!GetPtrParam(S, OpPC, V0)) |
20718 | return false; |
20719 | continue; |
20720 | } |
20721 | #endif |
20722 | #ifdef GET_DISASM |
20723 | case OP_GetPtrParam: |
20724 | Text.Op = PrintName("GetPtrParam" ); |
20725 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20726 | break; |
20727 | #endif |
20728 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20729 | bool emitGetPtrParam( uint32_t , const SourceInfo &); |
20730 | #endif |
20731 | #ifdef GET_LINK_IMPL |
20732 | bool ByteCodeEmitter::emitGetPtrParam( uint32_t A0, const SourceInfo &L) { |
20733 | return emitOp<uint32_t>(OP_GetPtrParam, A0, L); |
20734 | } |
20735 | #endif |
20736 | #ifdef GET_EVAL_IMPL |
20737 | bool EvalEmitter::emitGetPtrParam( uint32_t A0, const SourceInfo &L) { |
20738 | if (!isActive()) return true; |
20739 | CurrentSource = L; |
20740 | return GetPtrParam(S, OpPC, A0); |
20741 | } |
20742 | #endif |
20743 | #ifdef GET_OPCODE_NAMES |
20744 | OP_GetPtrThisBase, |
20745 | #endif |
20746 | #ifdef GET_INTERP |
20747 | case OP_GetPtrThisBase: { |
20748 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20749 | if (!GetPtrThisBase(S, OpPC, V0)) |
20750 | return false; |
20751 | continue; |
20752 | } |
20753 | #endif |
20754 | #ifdef GET_DISASM |
20755 | case OP_GetPtrThisBase: |
20756 | Text.Op = PrintName("GetPtrThisBase" ); |
20757 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20758 | break; |
20759 | #endif |
20760 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20761 | bool emitGetPtrThisBase( uint32_t , const SourceInfo &); |
20762 | #endif |
20763 | #ifdef GET_LINK_IMPL |
20764 | bool ByteCodeEmitter::emitGetPtrThisBase( uint32_t A0, const SourceInfo &L) { |
20765 | return emitOp<uint32_t>(OP_GetPtrThisBase, A0, L); |
20766 | } |
20767 | #endif |
20768 | #ifdef GET_EVAL_IMPL |
20769 | bool EvalEmitter::emitGetPtrThisBase( uint32_t A0, const SourceInfo &L) { |
20770 | if (!isActive()) return true; |
20771 | CurrentSource = L; |
20772 | return GetPtrThisBase(S, OpPC, A0); |
20773 | } |
20774 | #endif |
20775 | #ifdef GET_OPCODE_NAMES |
20776 | OP_GetPtrThisField, |
20777 | #endif |
20778 | #ifdef GET_INTERP |
20779 | case OP_GetPtrThisField: { |
20780 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20781 | if (!GetPtrThisField(S, OpPC, V0)) |
20782 | return false; |
20783 | continue; |
20784 | } |
20785 | #endif |
20786 | #ifdef GET_DISASM |
20787 | case OP_GetPtrThisField: |
20788 | Text.Op = PrintName("GetPtrThisField" ); |
20789 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20790 | break; |
20791 | #endif |
20792 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20793 | bool emitGetPtrThisField( uint32_t , const SourceInfo &); |
20794 | #endif |
20795 | #ifdef GET_LINK_IMPL |
20796 | bool ByteCodeEmitter::emitGetPtrThisField( uint32_t A0, const SourceInfo &L) { |
20797 | return emitOp<uint32_t>(OP_GetPtrThisField, A0, L); |
20798 | } |
20799 | #endif |
20800 | #ifdef GET_EVAL_IMPL |
20801 | bool EvalEmitter::emitGetPtrThisField( uint32_t A0, const SourceInfo &L) { |
20802 | if (!isActive()) return true; |
20803 | CurrentSource = L; |
20804 | return GetPtrThisField(S, OpPC, A0); |
20805 | } |
20806 | #endif |
20807 | #ifdef GET_OPCODE_NAMES |
20808 | OP_GetPtrThisVirtBase, |
20809 | #endif |
20810 | #ifdef GET_INTERP |
20811 | case OP_GetPtrThisVirtBase: { |
20812 | const auto V0 = ReadArg<const RecordDecl *>(S, PC); |
20813 | if (!GetPtrThisVirtBase(S, OpPC, V0)) |
20814 | return false; |
20815 | continue; |
20816 | } |
20817 | #endif |
20818 | #ifdef GET_DISASM |
20819 | case OP_GetPtrThisVirtBase: |
20820 | Text.Op = PrintName("GetPtrThisVirtBase" ); |
20821 | Text.Args.push_back(printArg<const RecordDecl *>(P, PC)); |
20822 | break; |
20823 | #endif |
20824 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20825 | bool emitGetPtrThisVirtBase( const RecordDecl * , const SourceInfo &); |
20826 | #endif |
20827 | #ifdef GET_LINK_IMPL |
20828 | bool ByteCodeEmitter::emitGetPtrThisVirtBase( const RecordDecl * A0, const SourceInfo &L) { |
20829 | return emitOp<const RecordDecl *>(OP_GetPtrThisVirtBase, A0, L); |
20830 | } |
20831 | #endif |
20832 | #ifdef GET_EVAL_IMPL |
20833 | bool EvalEmitter::emitGetPtrThisVirtBase( const RecordDecl * A0, const SourceInfo &L) { |
20834 | if (!isActive()) return true; |
20835 | CurrentSource = L; |
20836 | return GetPtrThisVirtBase(S, OpPC, A0); |
20837 | } |
20838 | #endif |
20839 | #ifdef GET_OPCODE_NAMES |
20840 | OP_GetPtrVirtBasePop, |
20841 | #endif |
20842 | #ifdef GET_INTERP |
20843 | case OP_GetPtrVirtBasePop: { |
20844 | const auto V0 = ReadArg<const RecordDecl *>(S, PC); |
20845 | if (!GetPtrVirtBasePop(S, OpPC, V0)) |
20846 | return false; |
20847 | continue; |
20848 | } |
20849 | #endif |
20850 | #ifdef GET_DISASM |
20851 | case OP_GetPtrVirtBasePop: |
20852 | Text.Op = PrintName("GetPtrVirtBasePop" ); |
20853 | Text.Args.push_back(printArg<const RecordDecl *>(P, PC)); |
20854 | break; |
20855 | #endif |
20856 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20857 | bool emitGetPtrVirtBasePop( const RecordDecl * , const SourceInfo &); |
20858 | #endif |
20859 | #ifdef GET_LINK_IMPL |
20860 | bool ByteCodeEmitter::emitGetPtrVirtBasePop( const RecordDecl * A0, const SourceInfo &L) { |
20861 | return emitOp<const RecordDecl *>(OP_GetPtrVirtBasePop, A0, L); |
20862 | } |
20863 | #endif |
20864 | #ifdef GET_EVAL_IMPL |
20865 | bool EvalEmitter::emitGetPtrVirtBasePop( const RecordDecl * A0, const SourceInfo &L) { |
20866 | if (!isActive()) return true; |
20867 | CurrentSource = L; |
20868 | return GetPtrVirtBasePop(S, OpPC, A0); |
20869 | } |
20870 | #endif |
20871 | #ifdef GET_OPCODE_NAMES |
20872 | OP_GetThisFieldSint8, |
20873 | OP_GetThisFieldUint8, |
20874 | OP_GetThisFieldSint16, |
20875 | OP_GetThisFieldUint16, |
20876 | OP_GetThisFieldSint32, |
20877 | OP_GetThisFieldUint32, |
20878 | OP_GetThisFieldSint64, |
20879 | OP_GetThisFieldUint64, |
20880 | OP_GetThisFieldIntAP, |
20881 | OP_GetThisFieldIntAPS, |
20882 | OP_GetThisFieldBool, |
20883 | OP_GetThisFieldFixedPoint, |
20884 | OP_GetThisFieldPtr, |
20885 | OP_GetThisFieldMemberPtr, |
20886 | OP_GetThisFieldFloat, |
20887 | #endif |
20888 | #ifdef GET_INTERP |
20889 | case OP_GetThisFieldSint8: { |
20890 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20891 | if (!GetThisField<PT_Sint8>(S, OpPC, V0)) |
20892 | return false; |
20893 | continue; |
20894 | } |
20895 | case OP_GetThisFieldUint8: { |
20896 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20897 | if (!GetThisField<PT_Uint8>(S, OpPC, V0)) |
20898 | return false; |
20899 | continue; |
20900 | } |
20901 | case OP_GetThisFieldSint16: { |
20902 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20903 | if (!GetThisField<PT_Sint16>(S, OpPC, V0)) |
20904 | return false; |
20905 | continue; |
20906 | } |
20907 | case OP_GetThisFieldUint16: { |
20908 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20909 | if (!GetThisField<PT_Uint16>(S, OpPC, V0)) |
20910 | return false; |
20911 | continue; |
20912 | } |
20913 | case OP_GetThisFieldSint32: { |
20914 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20915 | if (!GetThisField<PT_Sint32>(S, OpPC, V0)) |
20916 | return false; |
20917 | continue; |
20918 | } |
20919 | case OP_GetThisFieldUint32: { |
20920 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20921 | if (!GetThisField<PT_Uint32>(S, OpPC, V0)) |
20922 | return false; |
20923 | continue; |
20924 | } |
20925 | case OP_GetThisFieldSint64: { |
20926 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20927 | if (!GetThisField<PT_Sint64>(S, OpPC, V0)) |
20928 | return false; |
20929 | continue; |
20930 | } |
20931 | case OP_GetThisFieldUint64: { |
20932 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20933 | if (!GetThisField<PT_Uint64>(S, OpPC, V0)) |
20934 | return false; |
20935 | continue; |
20936 | } |
20937 | case OP_GetThisFieldIntAP: { |
20938 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20939 | if (!GetThisField<PT_IntAP>(S, OpPC, V0)) |
20940 | return false; |
20941 | continue; |
20942 | } |
20943 | case OP_GetThisFieldIntAPS: { |
20944 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20945 | if (!GetThisField<PT_IntAPS>(S, OpPC, V0)) |
20946 | return false; |
20947 | continue; |
20948 | } |
20949 | case OP_GetThisFieldBool: { |
20950 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20951 | if (!GetThisField<PT_Bool>(S, OpPC, V0)) |
20952 | return false; |
20953 | continue; |
20954 | } |
20955 | case OP_GetThisFieldFixedPoint: { |
20956 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20957 | if (!GetThisField<PT_FixedPoint>(S, OpPC, V0)) |
20958 | return false; |
20959 | continue; |
20960 | } |
20961 | case OP_GetThisFieldPtr: { |
20962 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20963 | if (!GetThisField<PT_Ptr>(S, OpPC, V0)) |
20964 | return false; |
20965 | continue; |
20966 | } |
20967 | case OP_GetThisFieldMemberPtr: { |
20968 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20969 | if (!GetThisField<PT_MemberPtr>(S, OpPC, V0)) |
20970 | return false; |
20971 | continue; |
20972 | } |
20973 | case OP_GetThisFieldFloat: { |
20974 | const auto V0 = ReadArg<uint32_t>(S, PC); |
20975 | if (!GetThisField<PT_Float>(S, OpPC, V0)) |
20976 | return false; |
20977 | continue; |
20978 | } |
20979 | #endif |
20980 | #ifdef GET_DISASM |
20981 | case OP_GetThisFieldSint8: |
20982 | Text.Op = PrintName("GetThisFieldSint8" ); |
20983 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20984 | break; |
20985 | case OP_GetThisFieldUint8: |
20986 | Text.Op = PrintName("GetThisFieldUint8" ); |
20987 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20988 | break; |
20989 | case OP_GetThisFieldSint16: |
20990 | Text.Op = PrintName("GetThisFieldSint16" ); |
20991 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20992 | break; |
20993 | case OP_GetThisFieldUint16: |
20994 | Text.Op = PrintName("GetThisFieldUint16" ); |
20995 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
20996 | break; |
20997 | case OP_GetThisFieldSint32: |
20998 | Text.Op = PrintName("GetThisFieldSint32" ); |
20999 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21000 | break; |
21001 | case OP_GetThisFieldUint32: |
21002 | Text.Op = PrintName("GetThisFieldUint32" ); |
21003 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21004 | break; |
21005 | case OP_GetThisFieldSint64: |
21006 | Text.Op = PrintName("GetThisFieldSint64" ); |
21007 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21008 | break; |
21009 | case OP_GetThisFieldUint64: |
21010 | Text.Op = PrintName("GetThisFieldUint64" ); |
21011 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21012 | break; |
21013 | case OP_GetThisFieldIntAP: |
21014 | Text.Op = PrintName("GetThisFieldIntAP" ); |
21015 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21016 | break; |
21017 | case OP_GetThisFieldIntAPS: |
21018 | Text.Op = PrintName("GetThisFieldIntAPS" ); |
21019 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21020 | break; |
21021 | case OP_GetThisFieldBool: |
21022 | Text.Op = PrintName("GetThisFieldBool" ); |
21023 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21024 | break; |
21025 | case OP_GetThisFieldFixedPoint: |
21026 | Text.Op = PrintName("GetThisFieldFixedPoint" ); |
21027 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21028 | break; |
21029 | case OP_GetThisFieldPtr: |
21030 | Text.Op = PrintName("GetThisFieldPtr" ); |
21031 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21032 | break; |
21033 | case OP_GetThisFieldMemberPtr: |
21034 | Text.Op = PrintName("GetThisFieldMemberPtr" ); |
21035 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21036 | break; |
21037 | case OP_GetThisFieldFloat: |
21038 | Text.Op = PrintName("GetThisFieldFloat" ); |
21039 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21040 | break; |
21041 | #endif |
21042 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21043 | bool emitGetThisFieldSint8( uint32_t , const SourceInfo &); |
21044 | bool emitGetThisFieldUint8( uint32_t , const SourceInfo &); |
21045 | bool emitGetThisFieldSint16( uint32_t , const SourceInfo &); |
21046 | bool emitGetThisFieldUint16( uint32_t , const SourceInfo &); |
21047 | bool emitGetThisFieldSint32( uint32_t , const SourceInfo &); |
21048 | bool emitGetThisFieldUint32( uint32_t , const SourceInfo &); |
21049 | bool emitGetThisFieldSint64( uint32_t , const SourceInfo &); |
21050 | bool emitGetThisFieldUint64( uint32_t , const SourceInfo &); |
21051 | bool emitGetThisFieldIntAP( uint32_t , const SourceInfo &); |
21052 | bool emitGetThisFieldIntAPS( uint32_t , const SourceInfo &); |
21053 | bool emitGetThisFieldBool( uint32_t , const SourceInfo &); |
21054 | bool emitGetThisFieldFixedPoint( uint32_t , const SourceInfo &); |
21055 | bool emitGetThisFieldPtr( uint32_t , const SourceInfo &); |
21056 | bool emitGetThisFieldMemberPtr( uint32_t , const SourceInfo &); |
21057 | bool emitGetThisFieldFloat( uint32_t , const SourceInfo &); |
21058 | #endif |
21059 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21060 | [[nodiscard]] bool emitGetThisField(PrimType, uint32_t, const SourceInfo &I); |
21061 | #endif |
21062 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
21063 | bool |
21064 | #if defined(GET_EVAL_IMPL) |
21065 | EvalEmitter |
21066 | #else |
21067 | ByteCodeEmitter |
21068 | #endif |
21069 | ::emitGetThisField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
21070 | switch (T0) { |
21071 | case PT_Sint8: |
21072 | return emitGetThisFieldSint8(A0, I); |
21073 | case PT_Uint8: |
21074 | return emitGetThisFieldUint8(A0, I); |
21075 | case PT_Sint16: |
21076 | return emitGetThisFieldSint16(A0, I); |
21077 | case PT_Uint16: |
21078 | return emitGetThisFieldUint16(A0, I); |
21079 | case PT_Sint32: |
21080 | return emitGetThisFieldSint32(A0, I); |
21081 | case PT_Uint32: |
21082 | return emitGetThisFieldUint32(A0, I); |
21083 | case PT_Sint64: |
21084 | return emitGetThisFieldSint64(A0, I); |
21085 | case PT_Uint64: |
21086 | return emitGetThisFieldUint64(A0, I); |
21087 | case PT_IntAP: |
21088 | return emitGetThisFieldIntAP(A0, I); |
21089 | case PT_IntAPS: |
21090 | return emitGetThisFieldIntAPS(A0, I); |
21091 | case PT_Bool: |
21092 | return emitGetThisFieldBool(A0, I); |
21093 | case PT_FixedPoint: |
21094 | return emitGetThisFieldFixedPoint(A0, I); |
21095 | case PT_Ptr: |
21096 | return emitGetThisFieldPtr(A0, I); |
21097 | case PT_MemberPtr: |
21098 | return emitGetThisFieldMemberPtr(A0, I); |
21099 | case PT_Float: |
21100 | return emitGetThisFieldFloat(A0, I); |
21101 | } |
21102 | llvm_unreachable("invalid enum value" ); |
21103 | } |
21104 | #endif |
21105 | #ifdef GET_LINK_IMPL |
21106 | bool ByteCodeEmitter::emitGetThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
21107 | return emitOp<uint32_t>(OP_GetThisFieldSint8, A0, L); |
21108 | } |
21109 | bool ByteCodeEmitter::emitGetThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
21110 | return emitOp<uint32_t>(OP_GetThisFieldUint8, A0, L); |
21111 | } |
21112 | bool ByteCodeEmitter::emitGetThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
21113 | return emitOp<uint32_t>(OP_GetThisFieldSint16, A0, L); |
21114 | } |
21115 | bool ByteCodeEmitter::emitGetThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
21116 | return emitOp<uint32_t>(OP_GetThisFieldUint16, A0, L); |
21117 | } |
21118 | bool ByteCodeEmitter::emitGetThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
21119 | return emitOp<uint32_t>(OP_GetThisFieldSint32, A0, L); |
21120 | } |
21121 | bool ByteCodeEmitter::emitGetThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
21122 | return emitOp<uint32_t>(OP_GetThisFieldUint32, A0, L); |
21123 | } |
21124 | bool ByteCodeEmitter::emitGetThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
21125 | return emitOp<uint32_t>(OP_GetThisFieldSint64, A0, L); |
21126 | } |
21127 | bool ByteCodeEmitter::emitGetThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
21128 | return emitOp<uint32_t>(OP_GetThisFieldUint64, A0, L); |
21129 | } |
21130 | bool ByteCodeEmitter::emitGetThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
21131 | return emitOp<uint32_t>(OP_GetThisFieldIntAP, A0, L); |
21132 | } |
21133 | bool ByteCodeEmitter::emitGetThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
21134 | return emitOp<uint32_t>(OP_GetThisFieldIntAPS, A0, L); |
21135 | } |
21136 | bool ByteCodeEmitter::emitGetThisFieldBool( uint32_t A0, const SourceInfo &L) { |
21137 | return emitOp<uint32_t>(OP_GetThisFieldBool, A0, L); |
21138 | } |
21139 | bool ByteCodeEmitter::emitGetThisFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
21140 | return emitOp<uint32_t>(OP_GetThisFieldFixedPoint, A0, L); |
21141 | } |
21142 | bool ByteCodeEmitter::emitGetThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
21143 | return emitOp<uint32_t>(OP_GetThisFieldPtr, A0, L); |
21144 | } |
21145 | bool ByteCodeEmitter::emitGetThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
21146 | return emitOp<uint32_t>(OP_GetThisFieldMemberPtr, A0, L); |
21147 | } |
21148 | bool ByteCodeEmitter::emitGetThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
21149 | return emitOp<uint32_t>(OP_GetThisFieldFloat, A0, L); |
21150 | } |
21151 | #endif |
21152 | #ifdef GET_EVAL_IMPL |
21153 | bool EvalEmitter::emitGetThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
21154 | if (!isActive()) return true; |
21155 | CurrentSource = L; |
21156 | return GetThisField<PT_Sint8>(S, OpPC, A0); |
21157 | } |
21158 | bool EvalEmitter::emitGetThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
21159 | if (!isActive()) return true; |
21160 | CurrentSource = L; |
21161 | return GetThisField<PT_Uint8>(S, OpPC, A0); |
21162 | } |
21163 | bool EvalEmitter::emitGetThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
21164 | if (!isActive()) return true; |
21165 | CurrentSource = L; |
21166 | return GetThisField<PT_Sint16>(S, OpPC, A0); |
21167 | } |
21168 | bool EvalEmitter::emitGetThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
21169 | if (!isActive()) return true; |
21170 | CurrentSource = L; |
21171 | return GetThisField<PT_Uint16>(S, OpPC, A0); |
21172 | } |
21173 | bool EvalEmitter::emitGetThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
21174 | if (!isActive()) return true; |
21175 | CurrentSource = L; |
21176 | return GetThisField<PT_Sint32>(S, OpPC, A0); |
21177 | } |
21178 | bool EvalEmitter::emitGetThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
21179 | if (!isActive()) return true; |
21180 | CurrentSource = L; |
21181 | return GetThisField<PT_Uint32>(S, OpPC, A0); |
21182 | } |
21183 | bool EvalEmitter::emitGetThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
21184 | if (!isActive()) return true; |
21185 | CurrentSource = L; |
21186 | return GetThisField<PT_Sint64>(S, OpPC, A0); |
21187 | } |
21188 | bool EvalEmitter::emitGetThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
21189 | if (!isActive()) return true; |
21190 | CurrentSource = L; |
21191 | return GetThisField<PT_Uint64>(S, OpPC, A0); |
21192 | } |
21193 | bool EvalEmitter::emitGetThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
21194 | if (!isActive()) return true; |
21195 | CurrentSource = L; |
21196 | return GetThisField<PT_IntAP>(S, OpPC, A0); |
21197 | } |
21198 | bool EvalEmitter::emitGetThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
21199 | if (!isActive()) return true; |
21200 | CurrentSource = L; |
21201 | return GetThisField<PT_IntAPS>(S, OpPC, A0); |
21202 | } |
21203 | bool EvalEmitter::emitGetThisFieldBool( uint32_t A0, const SourceInfo &L) { |
21204 | if (!isActive()) return true; |
21205 | CurrentSource = L; |
21206 | return GetThisField<PT_Bool>(S, OpPC, A0); |
21207 | } |
21208 | bool EvalEmitter::emitGetThisFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
21209 | if (!isActive()) return true; |
21210 | CurrentSource = L; |
21211 | return GetThisField<PT_FixedPoint>(S, OpPC, A0); |
21212 | } |
21213 | bool EvalEmitter::emitGetThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
21214 | if (!isActive()) return true; |
21215 | CurrentSource = L; |
21216 | return GetThisField<PT_Ptr>(S, OpPC, A0); |
21217 | } |
21218 | bool EvalEmitter::emitGetThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
21219 | if (!isActive()) return true; |
21220 | CurrentSource = L; |
21221 | return GetThisField<PT_MemberPtr>(S, OpPC, A0); |
21222 | } |
21223 | bool EvalEmitter::emitGetThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
21224 | if (!isActive()) return true; |
21225 | CurrentSource = L; |
21226 | return GetThisField<PT_Float>(S, OpPC, A0); |
21227 | } |
21228 | #endif |
21229 | #ifdef GET_OPCODE_NAMES |
21230 | OP_GetTypeid, |
21231 | #endif |
21232 | #ifdef GET_INTERP |
21233 | case OP_GetTypeid: { |
21234 | const auto V0 = ReadArg<const Type *>(S, PC); |
21235 | const auto V1 = ReadArg<const Type *>(S, PC); |
21236 | if (!GetTypeid(S, OpPC, V0, V1)) |
21237 | return false; |
21238 | continue; |
21239 | } |
21240 | #endif |
21241 | #ifdef GET_DISASM |
21242 | case OP_GetTypeid: |
21243 | Text.Op = PrintName("GetTypeid" ); |
21244 | Text.Args.push_back(printArg<const Type *>(P, PC)); |
21245 | Text.Args.push_back(printArg<const Type *>(P, PC)); |
21246 | break; |
21247 | #endif |
21248 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21249 | bool emitGetTypeid( const Type * , const Type * , const SourceInfo &); |
21250 | #endif |
21251 | #ifdef GET_LINK_IMPL |
21252 | bool ByteCodeEmitter::emitGetTypeid( const Type * A0, const Type * A1, const SourceInfo &L) { |
21253 | return emitOp<const Type *, const Type *>(OP_GetTypeid, A0, A1, L); |
21254 | } |
21255 | #endif |
21256 | #ifdef GET_EVAL_IMPL |
21257 | bool EvalEmitter::emitGetTypeid( const Type * A0, const Type * A1, const SourceInfo &L) { |
21258 | if (!isActive()) return true; |
21259 | CurrentSource = L; |
21260 | return GetTypeid(S, OpPC, A0, A1); |
21261 | } |
21262 | #endif |
21263 | #ifdef GET_OPCODE_NAMES |
21264 | OP_GetTypeidPtr, |
21265 | #endif |
21266 | #ifdef GET_INTERP |
21267 | case OP_GetTypeidPtr: { |
21268 | const auto V0 = ReadArg<const Type *>(S, PC); |
21269 | if (!GetTypeidPtr(S, OpPC, V0)) |
21270 | return false; |
21271 | continue; |
21272 | } |
21273 | #endif |
21274 | #ifdef GET_DISASM |
21275 | case OP_GetTypeidPtr: |
21276 | Text.Op = PrintName("GetTypeidPtr" ); |
21277 | Text.Args.push_back(printArg<const Type *>(P, PC)); |
21278 | break; |
21279 | #endif |
21280 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21281 | bool emitGetTypeidPtr( const Type * , const SourceInfo &); |
21282 | #endif |
21283 | #ifdef GET_LINK_IMPL |
21284 | bool ByteCodeEmitter::emitGetTypeidPtr( const Type * A0, const SourceInfo &L) { |
21285 | return emitOp<const Type *>(OP_GetTypeidPtr, A0, L); |
21286 | } |
21287 | #endif |
21288 | #ifdef GET_EVAL_IMPL |
21289 | bool EvalEmitter::emitGetTypeidPtr( const Type * A0, const SourceInfo &L) { |
21290 | if (!isActive()) return true; |
21291 | CurrentSource = L; |
21292 | return GetTypeidPtr(S, OpPC, A0); |
21293 | } |
21294 | #endif |
21295 | #ifdef GET_OPCODE_NAMES |
21296 | OP_IncSint8, |
21297 | OP_IncUint8, |
21298 | OP_IncSint16, |
21299 | OP_IncUint16, |
21300 | OP_IncSint32, |
21301 | OP_IncUint32, |
21302 | OP_IncSint64, |
21303 | OP_IncUint64, |
21304 | OP_IncIntAP, |
21305 | OP_IncIntAPS, |
21306 | OP_IncBool, |
21307 | OP_IncFixedPoint, |
21308 | #endif |
21309 | #ifdef GET_INTERP |
21310 | case OP_IncSint8: { |
21311 | const auto V0 = ReadArg<bool>(S, PC); |
21312 | if (!Inc<PT_Sint8>(S, OpPC, V0)) |
21313 | return false; |
21314 | continue; |
21315 | } |
21316 | case OP_IncUint8: { |
21317 | const auto V0 = ReadArg<bool>(S, PC); |
21318 | if (!Inc<PT_Uint8>(S, OpPC, V0)) |
21319 | return false; |
21320 | continue; |
21321 | } |
21322 | case OP_IncSint16: { |
21323 | const auto V0 = ReadArg<bool>(S, PC); |
21324 | if (!Inc<PT_Sint16>(S, OpPC, V0)) |
21325 | return false; |
21326 | continue; |
21327 | } |
21328 | case OP_IncUint16: { |
21329 | const auto V0 = ReadArg<bool>(S, PC); |
21330 | if (!Inc<PT_Uint16>(S, OpPC, V0)) |
21331 | return false; |
21332 | continue; |
21333 | } |
21334 | case OP_IncSint32: { |
21335 | const auto V0 = ReadArg<bool>(S, PC); |
21336 | if (!Inc<PT_Sint32>(S, OpPC, V0)) |
21337 | return false; |
21338 | continue; |
21339 | } |
21340 | case OP_IncUint32: { |
21341 | const auto V0 = ReadArg<bool>(S, PC); |
21342 | if (!Inc<PT_Uint32>(S, OpPC, V0)) |
21343 | return false; |
21344 | continue; |
21345 | } |
21346 | case OP_IncSint64: { |
21347 | const auto V0 = ReadArg<bool>(S, PC); |
21348 | if (!Inc<PT_Sint64>(S, OpPC, V0)) |
21349 | return false; |
21350 | continue; |
21351 | } |
21352 | case OP_IncUint64: { |
21353 | const auto V0 = ReadArg<bool>(S, PC); |
21354 | if (!Inc<PT_Uint64>(S, OpPC, V0)) |
21355 | return false; |
21356 | continue; |
21357 | } |
21358 | case OP_IncIntAP: { |
21359 | const auto V0 = ReadArg<bool>(S, PC); |
21360 | if (!Inc<PT_IntAP>(S, OpPC, V0)) |
21361 | return false; |
21362 | continue; |
21363 | } |
21364 | case OP_IncIntAPS: { |
21365 | const auto V0 = ReadArg<bool>(S, PC); |
21366 | if (!Inc<PT_IntAPS>(S, OpPC, V0)) |
21367 | return false; |
21368 | continue; |
21369 | } |
21370 | case OP_IncBool: { |
21371 | const auto V0 = ReadArg<bool>(S, PC); |
21372 | if (!Inc<PT_Bool>(S, OpPC, V0)) |
21373 | return false; |
21374 | continue; |
21375 | } |
21376 | case OP_IncFixedPoint: { |
21377 | const auto V0 = ReadArg<bool>(S, PC); |
21378 | if (!Inc<PT_FixedPoint>(S, OpPC, V0)) |
21379 | return false; |
21380 | continue; |
21381 | } |
21382 | #endif |
21383 | #ifdef GET_DISASM |
21384 | case OP_IncSint8: |
21385 | Text.Op = PrintName("IncSint8" ); |
21386 | Text.Args.push_back(printArg<bool>(P, PC)); |
21387 | break; |
21388 | case OP_IncUint8: |
21389 | Text.Op = PrintName("IncUint8" ); |
21390 | Text.Args.push_back(printArg<bool>(P, PC)); |
21391 | break; |
21392 | case OP_IncSint16: |
21393 | Text.Op = PrintName("IncSint16" ); |
21394 | Text.Args.push_back(printArg<bool>(P, PC)); |
21395 | break; |
21396 | case OP_IncUint16: |
21397 | Text.Op = PrintName("IncUint16" ); |
21398 | Text.Args.push_back(printArg<bool>(P, PC)); |
21399 | break; |
21400 | case OP_IncSint32: |
21401 | Text.Op = PrintName("IncSint32" ); |
21402 | Text.Args.push_back(printArg<bool>(P, PC)); |
21403 | break; |
21404 | case OP_IncUint32: |
21405 | Text.Op = PrintName("IncUint32" ); |
21406 | Text.Args.push_back(printArg<bool>(P, PC)); |
21407 | break; |
21408 | case OP_IncSint64: |
21409 | Text.Op = PrintName("IncSint64" ); |
21410 | Text.Args.push_back(printArg<bool>(P, PC)); |
21411 | break; |
21412 | case OP_IncUint64: |
21413 | Text.Op = PrintName("IncUint64" ); |
21414 | Text.Args.push_back(printArg<bool>(P, PC)); |
21415 | break; |
21416 | case OP_IncIntAP: |
21417 | Text.Op = PrintName("IncIntAP" ); |
21418 | Text.Args.push_back(printArg<bool>(P, PC)); |
21419 | break; |
21420 | case OP_IncIntAPS: |
21421 | Text.Op = PrintName("IncIntAPS" ); |
21422 | Text.Args.push_back(printArg<bool>(P, PC)); |
21423 | break; |
21424 | case OP_IncBool: |
21425 | Text.Op = PrintName("IncBool" ); |
21426 | Text.Args.push_back(printArg<bool>(P, PC)); |
21427 | break; |
21428 | case OP_IncFixedPoint: |
21429 | Text.Op = PrintName("IncFixedPoint" ); |
21430 | Text.Args.push_back(printArg<bool>(P, PC)); |
21431 | break; |
21432 | #endif |
21433 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21434 | bool emitIncSint8( bool , const SourceInfo &); |
21435 | bool emitIncUint8( bool , const SourceInfo &); |
21436 | bool emitIncSint16( bool , const SourceInfo &); |
21437 | bool emitIncUint16( bool , const SourceInfo &); |
21438 | bool emitIncSint32( bool , const SourceInfo &); |
21439 | bool emitIncUint32( bool , const SourceInfo &); |
21440 | bool emitIncSint64( bool , const SourceInfo &); |
21441 | bool emitIncUint64( bool , const SourceInfo &); |
21442 | bool emitIncIntAP( bool , const SourceInfo &); |
21443 | bool emitIncIntAPS( bool , const SourceInfo &); |
21444 | bool emitIncBool( bool , const SourceInfo &); |
21445 | bool emitIncFixedPoint( bool , const SourceInfo &); |
21446 | #endif |
21447 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21448 | [[nodiscard]] bool emitInc(PrimType, bool, const SourceInfo &I); |
21449 | #endif |
21450 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
21451 | bool |
21452 | #if defined(GET_EVAL_IMPL) |
21453 | EvalEmitter |
21454 | #else |
21455 | ByteCodeEmitter |
21456 | #endif |
21457 | ::emitInc(PrimType T0, bool A0, const SourceInfo &I) { |
21458 | switch (T0) { |
21459 | case PT_Sint8: |
21460 | return emitIncSint8(A0, I); |
21461 | case PT_Uint8: |
21462 | return emitIncUint8(A0, I); |
21463 | case PT_Sint16: |
21464 | return emitIncSint16(A0, I); |
21465 | case PT_Uint16: |
21466 | return emitIncUint16(A0, I); |
21467 | case PT_Sint32: |
21468 | return emitIncSint32(A0, I); |
21469 | case PT_Uint32: |
21470 | return emitIncUint32(A0, I); |
21471 | case PT_Sint64: |
21472 | return emitIncSint64(A0, I); |
21473 | case PT_Uint64: |
21474 | return emitIncUint64(A0, I); |
21475 | case PT_IntAP: |
21476 | return emitIncIntAP(A0, I); |
21477 | case PT_IntAPS: |
21478 | return emitIncIntAPS(A0, I); |
21479 | case PT_Bool: |
21480 | return emitIncBool(A0, I); |
21481 | case PT_FixedPoint: |
21482 | return emitIncFixedPoint(A0, I); |
21483 | default: llvm_unreachable("invalid type: emitInc" ); |
21484 | } |
21485 | llvm_unreachable("invalid enum value" ); |
21486 | } |
21487 | #endif |
21488 | #ifdef GET_LINK_IMPL |
21489 | bool ByteCodeEmitter::emitIncSint8( bool A0, const SourceInfo &L) { |
21490 | return emitOp<bool>(OP_IncSint8, A0, L); |
21491 | } |
21492 | bool ByteCodeEmitter::emitIncUint8( bool A0, const SourceInfo &L) { |
21493 | return emitOp<bool>(OP_IncUint8, A0, L); |
21494 | } |
21495 | bool ByteCodeEmitter::emitIncSint16( bool A0, const SourceInfo &L) { |
21496 | return emitOp<bool>(OP_IncSint16, A0, L); |
21497 | } |
21498 | bool ByteCodeEmitter::emitIncUint16( bool A0, const SourceInfo &L) { |
21499 | return emitOp<bool>(OP_IncUint16, A0, L); |
21500 | } |
21501 | bool ByteCodeEmitter::emitIncSint32( bool A0, const SourceInfo &L) { |
21502 | return emitOp<bool>(OP_IncSint32, A0, L); |
21503 | } |
21504 | bool ByteCodeEmitter::emitIncUint32( bool A0, const SourceInfo &L) { |
21505 | return emitOp<bool>(OP_IncUint32, A0, L); |
21506 | } |
21507 | bool ByteCodeEmitter::emitIncSint64( bool A0, const SourceInfo &L) { |
21508 | return emitOp<bool>(OP_IncSint64, A0, L); |
21509 | } |
21510 | bool ByteCodeEmitter::emitIncUint64( bool A0, const SourceInfo &L) { |
21511 | return emitOp<bool>(OP_IncUint64, A0, L); |
21512 | } |
21513 | bool ByteCodeEmitter::emitIncIntAP( bool A0, const SourceInfo &L) { |
21514 | return emitOp<bool>(OP_IncIntAP, A0, L); |
21515 | } |
21516 | bool ByteCodeEmitter::emitIncIntAPS( bool A0, const SourceInfo &L) { |
21517 | return emitOp<bool>(OP_IncIntAPS, A0, L); |
21518 | } |
21519 | bool ByteCodeEmitter::emitIncBool( bool A0, const SourceInfo &L) { |
21520 | return emitOp<bool>(OP_IncBool, A0, L); |
21521 | } |
21522 | bool ByteCodeEmitter::emitIncFixedPoint( bool A0, const SourceInfo &L) { |
21523 | return emitOp<bool>(OP_IncFixedPoint, A0, L); |
21524 | } |
21525 | #endif |
21526 | #ifdef GET_EVAL_IMPL |
21527 | bool EvalEmitter::emitIncSint8( bool A0, const SourceInfo &L) { |
21528 | if (!isActive()) return true; |
21529 | CurrentSource = L; |
21530 | return Inc<PT_Sint8>(S, OpPC, A0); |
21531 | } |
21532 | bool EvalEmitter::emitIncUint8( bool A0, const SourceInfo &L) { |
21533 | if (!isActive()) return true; |
21534 | CurrentSource = L; |
21535 | return Inc<PT_Uint8>(S, OpPC, A0); |
21536 | } |
21537 | bool EvalEmitter::emitIncSint16( bool A0, const SourceInfo &L) { |
21538 | if (!isActive()) return true; |
21539 | CurrentSource = L; |
21540 | return Inc<PT_Sint16>(S, OpPC, A0); |
21541 | } |
21542 | bool EvalEmitter::emitIncUint16( bool A0, const SourceInfo &L) { |
21543 | if (!isActive()) return true; |
21544 | CurrentSource = L; |
21545 | return Inc<PT_Uint16>(S, OpPC, A0); |
21546 | } |
21547 | bool EvalEmitter::emitIncSint32( bool A0, const SourceInfo &L) { |
21548 | if (!isActive()) return true; |
21549 | CurrentSource = L; |
21550 | return Inc<PT_Sint32>(S, OpPC, A0); |
21551 | } |
21552 | bool EvalEmitter::emitIncUint32( bool A0, const SourceInfo &L) { |
21553 | if (!isActive()) return true; |
21554 | CurrentSource = L; |
21555 | return Inc<PT_Uint32>(S, OpPC, A0); |
21556 | } |
21557 | bool EvalEmitter::emitIncSint64( bool A0, const SourceInfo &L) { |
21558 | if (!isActive()) return true; |
21559 | CurrentSource = L; |
21560 | return Inc<PT_Sint64>(S, OpPC, A0); |
21561 | } |
21562 | bool EvalEmitter::emitIncUint64( bool A0, const SourceInfo &L) { |
21563 | if (!isActive()) return true; |
21564 | CurrentSource = L; |
21565 | return Inc<PT_Uint64>(S, OpPC, A0); |
21566 | } |
21567 | bool EvalEmitter::emitIncIntAP( bool A0, const SourceInfo &L) { |
21568 | if (!isActive()) return true; |
21569 | CurrentSource = L; |
21570 | return Inc<PT_IntAP>(S, OpPC, A0); |
21571 | } |
21572 | bool EvalEmitter::emitIncIntAPS( bool A0, const SourceInfo &L) { |
21573 | if (!isActive()) return true; |
21574 | CurrentSource = L; |
21575 | return Inc<PT_IntAPS>(S, OpPC, A0); |
21576 | } |
21577 | bool EvalEmitter::emitIncBool( bool A0, const SourceInfo &L) { |
21578 | if (!isActive()) return true; |
21579 | CurrentSource = L; |
21580 | return Inc<PT_Bool>(S, OpPC, A0); |
21581 | } |
21582 | bool EvalEmitter::emitIncFixedPoint( bool A0, const SourceInfo &L) { |
21583 | if (!isActive()) return true; |
21584 | CurrentSource = L; |
21585 | return Inc<PT_FixedPoint>(S, OpPC, A0); |
21586 | } |
21587 | #endif |
21588 | #ifdef GET_OPCODE_NAMES |
21589 | OP_IncPopSint8, |
21590 | OP_IncPopUint8, |
21591 | OP_IncPopSint16, |
21592 | OP_IncPopUint16, |
21593 | OP_IncPopSint32, |
21594 | OP_IncPopUint32, |
21595 | OP_IncPopSint64, |
21596 | OP_IncPopUint64, |
21597 | OP_IncPopIntAP, |
21598 | OP_IncPopIntAPS, |
21599 | OP_IncPopBool, |
21600 | OP_IncPopFixedPoint, |
21601 | #endif |
21602 | #ifdef GET_INTERP |
21603 | case OP_IncPopSint8: { |
21604 | const auto V0 = ReadArg<bool>(S, PC); |
21605 | if (!IncPop<PT_Sint8>(S, OpPC, V0)) |
21606 | return false; |
21607 | continue; |
21608 | } |
21609 | case OP_IncPopUint8: { |
21610 | const auto V0 = ReadArg<bool>(S, PC); |
21611 | if (!IncPop<PT_Uint8>(S, OpPC, V0)) |
21612 | return false; |
21613 | continue; |
21614 | } |
21615 | case OP_IncPopSint16: { |
21616 | const auto V0 = ReadArg<bool>(S, PC); |
21617 | if (!IncPop<PT_Sint16>(S, OpPC, V0)) |
21618 | return false; |
21619 | continue; |
21620 | } |
21621 | case OP_IncPopUint16: { |
21622 | const auto V0 = ReadArg<bool>(S, PC); |
21623 | if (!IncPop<PT_Uint16>(S, OpPC, V0)) |
21624 | return false; |
21625 | continue; |
21626 | } |
21627 | case OP_IncPopSint32: { |
21628 | const auto V0 = ReadArg<bool>(S, PC); |
21629 | if (!IncPop<PT_Sint32>(S, OpPC, V0)) |
21630 | return false; |
21631 | continue; |
21632 | } |
21633 | case OP_IncPopUint32: { |
21634 | const auto V0 = ReadArg<bool>(S, PC); |
21635 | if (!IncPop<PT_Uint32>(S, OpPC, V0)) |
21636 | return false; |
21637 | continue; |
21638 | } |
21639 | case OP_IncPopSint64: { |
21640 | const auto V0 = ReadArg<bool>(S, PC); |
21641 | if (!IncPop<PT_Sint64>(S, OpPC, V0)) |
21642 | return false; |
21643 | continue; |
21644 | } |
21645 | case OP_IncPopUint64: { |
21646 | const auto V0 = ReadArg<bool>(S, PC); |
21647 | if (!IncPop<PT_Uint64>(S, OpPC, V0)) |
21648 | return false; |
21649 | continue; |
21650 | } |
21651 | case OP_IncPopIntAP: { |
21652 | const auto V0 = ReadArg<bool>(S, PC); |
21653 | if (!IncPop<PT_IntAP>(S, OpPC, V0)) |
21654 | return false; |
21655 | continue; |
21656 | } |
21657 | case OP_IncPopIntAPS: { |
21658 | const auto V0 = ReadArg<bool>(S, PC); |
21659 | if (!IncPop<PT_IntAPS>(S, OpPC, V0)) |
21660 | return false; |
21661 | continue; |
21662 | } |
21663 | case OP_IncPopBool: { |
21664 | const auto V0 = ReadArg<bool>(S, PC); |
21665 | if (!IncPop<PT_Bool>(S, OpPC, V0)) |
21666 | return false; |
21667 | continue; |
21668 | } |
21669 | case OP_IncPopFixedPoint: { |
21670 | const auto V0 = ReadArg<bool>(S, PC); |
21671 | if (!IncPop<PT_FixedPoint>(S, OpPC, V0)) |
21672 | return false; |
21673 | continue; |
21674 | } |
21675 | #endif |
21676 | #ifdef GET_DISASM |
21677 | case OP_IncPopSint8: |
21678 | Text.Op = PrintName("IncPopSint8" ); |
21679 | Text.Args.push_back(printArg<bool>(P, PC)); |
21680 | break; |
21681 | case OP_IncPopUint8: |
21682 | Text.Op = PrintName("IncPopUint8" ); |
21683 | Text.Args.push_back(printArg<bool>(P, PC)); |
21684 | break; |
21685 | case OP_IncPopSint16: |
21686 | Text.Op = PrintName("IncPopSint16" ); |
21687 | Text.Args.push_back(printArg<bool>(P, PC)); |
21688 | break; |
21689 | case OP_IncPopUint16: |
21690 | Text.Op = PrintName("IncPopUint16" ); |
21691 | Text.Args.push_back(printArg<bool>(P, PC)); |
21692 | break; |
21693 | case OP_IncPopSint32: |
21694 | Text.Op = PrintName("IncPopSint32" ); |
21695 | Text.Args.push_back(printArg<bool>(P, PC)); |
21696 | break; |
21697 | case OP_IncPopUint32: |
21698 | Text.Op = PrintName("IncPopUint32" ); |
21699 | Text.Args.push_back(printArg<bool>(P, PC)); |
21700 | break; |
21701 | case OP_IncPopSint64: |
21702 | Text.Op = PrintName("IncPopSint64" ); |
21703 | Text.Args.push_back(printArg<bool>(P, PC)); |
21704 | break; |
21705 | case OP_IncPopUint64: |
21706 | Text.Op = PrintName("IncPopUint64" ); |
21707 | Text.Args.push_back(printArg<bool>(P, PC)); |
21708 | break; |
21709 | case OP_IncPopIntAP: |
21710 | Text.Op = PrintName("IncPopIntAP" ); |
21711 | Text.Args.push_back(printArg<bool>(P, PC)); |
21712 | break; |
21713 | case OP_IncPopIntAPS: |
21714 | Text.Op = PrintName("IncPopIntAPS" ); |
21715 | Text.Args.push_back(printArg<bool>(P, PC)); |
21716 | break; |
21717 | case OP_IncPopBool: |
21718 | Text.Op = PrintName("IncPopBool" ); |
21719 | Text.Args.push_back(printArg<bool>(P, PC)); |
21720 | break; |
21721 | case OP_IncPopFixedPoint: |
21722 | Text.Op = PrintName("IncPopFixedPoint" ); |
21723 | Text.Args.push_back(printArg<bool>(P, PC)); |
21724 | break; |
21725 | #endif |
21726 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21727 | bool emitIncPopSint8( bool , const SourceInfo &); |
21728 | bool emitIncPopUint8( bool , const SourceInfo &); |
21729 | bool emitIncPopSint16( bool , const SourceInfo &); |
21730 | bool emitIncPopUint16( bool , const SourceInfo &); |
21731 | bool emitIncPopSint32( bool , const SourceInfo &); |
21732 | bool emitIncPopUint32( bool , const SourceInfo &); |
21733 | bool emitIncPopSint64( bool , const SourceInfo &); |
21734 | bool emitIncPopUint64( bool , const SourceInfo &); |
21735 | bool emitIncPopIntAP( bool , const SourceInfo &); |
21736 | bool emitIncPopIntAPS( bool , const SourceInfo &); |
21737 | bool emitIncPopBool( bool , const SourceInfo &); |
21738 | bool emitIncPopFixedPoint( bool , const SourceInfo &); |
21739 | #endif |
21740 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21741 | [[nodiscard]] bool emitIncPop(PrimType, bool, const SourceInfo &I); |
21742 | #endif |
21743 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
21744 | bool |
21745 | #if defined(GET_EVAL_IMPL) |
21746 | EvalEmitter |
21747 | #else |
21748 | ByteCodeEmitter |
21749 | #endif |
21750 | ::emitIncPop(PrimType T0, bool A0, const SourceInfo &I) { |
21751 | switch (T0) { |
21752 | case PT_Sint8: |
21753 | return emitIncPopSint8(A0, I); |
21754 | case PT_Uint8: |
21755 | return emitIncPopUint8(A0, I); |
21756 | case PT_Sint16: |
21757 | return emitIncPopSint16(A0, I); |
21758 | case PT_Uint16: |
21759 | return emitIncPopUint16(A0, I); |
21760 | case PT_Sint32: |
21761 | return emitIncPopSint32(A0, I); |
21762 | case PT_Uint32: |
21763 | return emitIncPopUint32(A0, I); |
21764 | case PT_Sint64: |
21765 | return emitIncPopSint64(A0, I); |
21766 | case PT_Uint64: |
21767 | return emitIncPopUint64(A0, I); |
21768 | case PT_IntAP: |
21769 | return emitIncPopIntAP(A0, I); |
21770 | case PT_IntAPS: |
21771 | return emitIncPopIntAPS(A0, I); |
21772 | case PT_Bool: |
21773 | return emitIncPopBool(A0, I); |
21774 | case PT_FixedPoint: |
21775 | return emitIncPopFixedPoint(A0, I); |
21776 | default: llvm_unreachable("invalid type: emitIncPop" ); |
21777 | } |
21778 | llvm_unreachable("invalid enum value" ); |
21779 | } |
21780 | #endif |
21781 | #ifdef GET_LINK_IMPL |
21782 | bool ByteCodeEmitter::emitIncPopSint8( bool A0, const SourceInfo &L) { |
21783 | return emitOp<bool>(OP_IncPopSint8, A0, L); |
21784 | } |
21785 | bool ByteCodeEmitter::emitIncPopUint8( bool A0, const SourceInfo &L) { |
21786 | return emitOp<bool>(OP_IncPopUint8, A0, L); |
21787 | } |
21788 | bool ByteCodeEmitter::emitIncPopSint16( bool A0, const SourceInfo &L) { |
21789 | return emitOp<bool>(OP_IncPopSint16, A0, L); |
21790 | } |
21791 | bool ByteCodeEmitter::emitIncPopUint16( bool A0, const SourceInfo &L) { |
21792 | return emitOp<bool>(OP_IncPopUint16, A0, L); |
21793 | } |
21794 | bool ByteCodeEmitter::emitIncPopSint32( bool A0, const SourceInfo &L) { |
21795 | return emitOp<bool>(OP_IncPopSint32, A0, L); |
21796 | } |
21797 | bool ByteCodeEmitter::emitIncPopUint32( bool A0, const SourceInfo &L) { |
21798 | return emitOp<bool>(OP_IncPopUint32, A0, L); |
21799 | } |
21800 | bool ByteCodeEmitter::emitIncPopSint64( bool A0, const SourceInfo &L) { |
21801 | return emitOp<bool>(OP_IncPopSint64, A0, L); |
21802 | } |
21803 | bool ByteCodeEmitter::emitIncPopUint64( bool A0, const SourceInfo &L) { |
21804 | return emitOp<bool>(OP_IncPopUint64, A0, L); |
21805 | } |
21806 | bool ByteCodeEmitter::emitIncPopIntAP( bool A0, const SourceInfo &L) { |
21807 | return emitOp<bool>(OP_IncPopIntAP, A0, L); |
21808 | } |
21809 | bool ByteCodeEmitter::emitIncPopIntAPS( bool A0, const SourceInfo &L) { |
21810 | return emitOp<bool>(OP_IncPopIntAPS, A0, L); |
21811 | } |
21812 | bool ByteCodeEmitter::emitIncPopBool( bool A0, const SourceInfo &L) { |
21813 | return emitOp<bool>(OP_IncPopBool, A0, L); |
21814 | } |
21815 | bool ByteCodeEmitter::emitIncPopFixedPoint( bool A0, const SourceInfo &L) { |
21816 | return emitOp<bool>(OP_IncPopFixedPoint, A0, L); |
21817 | } |
21818 | #endif |
21819 | #ifdef GET_EVAL_IMPL |
21820 | bool EvalEmitter::emitIncPopSint8( bool A0, const SourceInfo &L) { |
21821 | if (!isActive()) return true; |
21822 | CurrentSource = L; |
21823 | return IncPop<PT_Sint8>(S, OpPC, A0); |
21824 | } |
21825 | bool EvalEmitter::emitIncPopUint8( bool A0, const SourceInfo &L) { |
21826 | if (!isActive()) return true; |
21827 | CurrentSource = L; |
21828 | return IncPop<PT_Uint8>(S, OpPC, A0); |
21829 | } |
21830 | bool EvalEmitter::emitIncPopSint16( bool A0, const SourceInfo &L) { |
21831 | if (!isActive()) return true; |
21832 | CurrentSource = L; |
21833 | return IncPop<PT_Sint16>(S, OpPC, A0); |
21834 | } |
21835 | bool EvalEmitter::emitIncPopUint16( bool A0, const SourceInfo &L) { |
21836 | if (!isActive()) return true; |
21837 | CurrentSource = L; |
21838 | return IncPop<PT_Uint16>(S, OpPC, A0); |
21839 | } |
21840 | bool EvalEmitter::emitIncPopSint32( bool A0, const SourceInfo &L) { |
21841 | if (!isActive()) return true; |
21842 | CurrentSource = L; |
21843 | return IncPop<PT_Sint32>(S, OpPC, A0); |
21844 | } |
21845 | bool EvalEmitter::emitIncPopUint32( bool A0, const SourceInfo &L) { |
21846 | if (!isActive()) return true; |
21847 | CurrentSource = L; |
21848 | return IncPop<PT_Uint32>(S, OpPC, A0); |
21849 | } |
21850 | bool EvalEmitter::emitIncPopSint64( bool A0, const SourceInfo &L) { |
21851 | if (!isActive()) return true; |
21852 | CurrentSource = L; |
21853 | return IncPop<PT_Sint64>(S, OpPC, A0); |
21854 | } |
21855 | bool EvalEmitter::emitIncPopUint64( bool A0, const SourceInfo &L) { |
21856 | if (!isActive()) return true; |
21857 | CurrentSource = L; |
21858 | return IncPop<PT_Uint64>(S, OpPC, A0); |
21859 | } |
21860 | bool EvalEmitter::emitIncPopIntAP( bool A0, const SourceInfo &L) { |
21861 | if (!isActive()) return true; |
21862 | CurrentSource = L; |
21863 | return IncPop<PT_IntAP>(S, OpPC, A0); |
21864 | } |
21865 | bool EvalEmitter::emitIncPopIntAPS( bool A0, const SourceInfo &L) { |
21866 | if (!isActive()) return true; |
21867 | CurrentSource = L; |
21868 | return IncPop<PT_IntAPS>(S, OpPC, A0); |
21869 | } |
21870 | bool EvalEmitter::emitIncPopBool( bool A0, const SourceInfo &L) { |
21871 | if (!isActive()) return true; |
21872 | CurrentSource = L; |
21873 | return IncPop<PT_Bool>(S, OpPC, A0); |
21874 | } |
21875 | bool EvalEmitter::emitIncPopFixedPoint( bool A0, const SourceInfo &L) { |
21876 | if (!isActive()) return true; |
21877 | CurrentSource = L; |
21878 | return IncPop<PT_FixedPoint>(S, OpPC, A0); |
21879 | } |
21880 | #endif |
21881 | #ifdef GET_OPCODE_NAMES |
21882 | OP_IncPtr, |
21883 | #endif |
21884 | #ifdef GET_INTERP |
21885 | case OP_IncPtr: { |
21886 | if (!IncPtr(S, OpPC)) |
21887 | return false; |
21888 | continue; |
21889 | } |
21890 | #endif |
21891 | #ifdef GET_DISASM |
21892 | case OP_IncPtr: |
21893 | Text.Op = PrintName("IncPtr" ); |
21894 | break; |
21895 | #endif |
21896 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21897 | bool emitIncPtr(const SourceInfo &); |
21898 | #endif |
21899 | #ifdef GET_LINK_IMPL |
21900 | bool ByteCodeEmitter::emitIncPtr(const SourceInfo &L) { |
21901 | return emitOp<>(OP_IncPtr, L); |
21902 | } |
21903 | #endif |
21904 | #ifdef GET_EVAL_IMPL |
21905 | bool EvalEmitter::emitIncPtr(const SourceInfo &L) { |
21906 | if (!isActive()) return true; |
21907 | CurrentSource = L; |
21908 | return IncPtr(S, OpPC); |
21909 | } |
21910 | #endif |
21911 | #ifdef GET_OPCODE_NAMES |
21912 | OP_Incf, |
21913 | #endif |
21914 | #ifdef GET_INTERP |
21915 | case OP_Incf: { |
21916 | const auto V0 = ReadArg<uint32_t>(S, PC); |
21917 | if (!Incf(S, OpPC, V0)) |
21918 | return false; |
21919 | continue; |
21920 | } |
21921 | #endif |
21922 | #ifdef GET_DISASM |
21923 | case OP_Incf: |
21924 | Text.Op = PrintName("Incf" ); |
21925 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21926 | break; |
21927 | #endif |
21928 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21929 | bool emitIncf( uint32_t , const SourceInfo &); |
21930 | #endif |
21931 | #ifdef GET_LINK_IMPL |
21932 | bool ByteCodeEmitter::emitIncf( uint32_t A0, const SourceInfo &L) { |
21933 | return emitOp<uint32_t>(OP_Incf, A0, L); |
21934 | } |
21935 | #endif |
21936 | #ifdef GET_EVAL_IMPL |
21937 | bool EvalEmitter::emitIncf( uint32_t A0, const SourceInfo &L) { |
21938 | if (!isActive()) return true; |
21939 | CurrentSource = L; |
21940 | return Incf(S, OpPC, A0); |
21941 | } |
21942 | #endif |
21943 | #ifdef GET_OPCODE_NAMES |
21944 | OP_IncfPop, |
21945 | #endif |
21946 | #ifdef GET_INTERP |
21947 | case OP_IncfPop: { |
21948 | const auto V0 = ReadArg<uint32_t>(S, PC); |
21949 | if (!IncfPop(S, OpPC, V0)) |
21950 | return false; |
21951 | continue; |
21952 | } |
21953 | #endif |
21954 | #ifdef GET_DISASM |
21955 | case OP_IncfPop: |
21956 | Text.Op = PrintName("IncfPop" ); |
21957 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
21958 | break; |
21959 | #endif |
21960 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21961 | bool emitIncfPop( uint32_t , const SourceInfo &); |
21962 | #endif |
21963 | #ifdef GET_LINK_IMPL |
21964 | bool ByteCodeEmitter::emitIncfPop( uint32_t A0, const SourceInfo &L) { |
21965 | return emitOp<uint32_t>(OP_IncfPop, A0, L); |
21966 | } |
21967 | #endif |
21968 | #ifdef GET_EVAL_IMPL |
21969 | bool EvalEmitter::emitIncfPop( uint32_t A0, const SourceInfo &L) { |
21970 | if (!isActive()) return true; |
21971 | CurrentSource = L; |
21972 | return IncfPop(S, OpPC, A0); |
21973 | } |
21974 | #endif |
21975 | #ifdef GET_OPCODE_NAMES |
21976 | OP_InitSint8, |
21977 | OP_InitUint8, |
21978 | OP_InitSint16, |
21979 | OP_InitUint16, |
21980 | OP_InitSint32, |
21981 | OP_InitUint32, |
21982 | OP_InitSint64, |
21983 | OP_InitUint64, |
21984 | OP_InitIntAP, |
21985 | OP_InitIntAPS, |
21986 | OP_InitBool, |
21987 | OP_InitFixedPoint, |
21988 | OP_InitPtr, |
21989 | OP_InitMemberPtr, |
21990 | OP_InitFloat, |
21991 | #endif |
21992 | #ifdef GET_INTERP |
21993 | case OP_InitSint8: { |
21994 | if (!Init<PT_Sint8>(S, OpPC)) |
21995 | return false; |
21996 | continue; |
21997 | } |
21998 | case OP_InitUint8: { |
21999 | if (!Init<PT_Uint8>(S, OpPC)) |
22000 | return false; |
22001 | continue; |
22002 | } |
22003 | case OP_InitSint16: { |
22004 | if (!Init<PT_Sint16>(S, OpPC)) |
22005 | return false; |
22006 | continue; |
22007 | } |
22008 | case OP_InitUint16: { |
22009 | if (!Init<PT_Uint16>(S, OpPC)) |
22010 | return false; |
22011 | continue; |
22012 | } |
22013 | case OP_InitSint32: { |
22014 | if (!Init<PT_Sint32>(S, OpPC)) |
22015 | return false; |
22016 | continue; |
22017 | } |
22018 | case OP_InitUint32: { |
22019 | if (!Init<PT_Uint32>(S, OpPC)) |
22020 | return false; |
22021 | continue; |
22022 | } |
22023 | case OP_InitSint64: { |
22024 | if (!Init<PT_Sint64>(S, OpPC)) |
22025 | return false; |
22026 | continue; |
22027 | } |
22028 | case OP_InitUint64: { |
22029 | if (!Init<PT_Uint64>(S, OpPC)) |
22030 | return false; |
22031 | continue; |
22032 | } |
22033 | case OP_InitIntAP: { |
22034 | if (!Init<PT_IntAP>(S, OpPC)) |
22035 | return false; |
22036 | continue; |
22037 | } |
22038 | case OP_InitIntAPS: { |
22039 | if (!Init<PT_IntAPS>(S, OpPC)) |
22040 | return false; |
22041 | continue; |
22042 | } |
22043 | case OP_InitBool: { |
22044 | if (!Init<PT_Bool>(S, OpPC)) |
22045 | return false; |
22046 | continue; |
22047 | } |
22048 | case OP_InitFixedPoint: { |
22049 | if (!Init<PT_FixedPoint>(S, OpPC)) |
22050 | return false; |
22051 | continue; |
22052 | } |
22053 | case OP_InitPtr: { |
22054 | if (!Init<PT_Ptr>(S, OpPC)) |
22055 | return false; |
22056 | continue; |
22057 | } |
22058 | case OP_InitMemberPtr: { |
22059 | if (!Init<PT_MemberPtr>(S, OpPC)) |
22060 | return false; |
22061 | continue; |
22062 | } |
22063 | case OP_InitFloat: { |
22064 | if (!Init<PT_Float>(S, OpPC)) |
22065 | return false; |
22066 | continue; |
22067 | } |
22068 | #endif |
22069 | #ifdef GET_DISASM |
22070 | case OP_InitSint8: |
22071 | Text.Op = PrintName("InitSint8" ); |
22072 | break; |
22073 | case OP_InitUint8: |
22074 | Text.Op = PrintName("InitUint8" ); |
22075 | break; |
22076 | case OP_InitSint16: |
22077 | Text.Op = PrintName("InitSint16" ); |
22078 | break; |
22079 | case OP_InitUint16: |
22080 | Text.Op = PrintName("InitUint16" ); |
22081 | break; |
22082 | case OP_InitSint32: |
22083 | Text.Op = PrintName("InitSint32" ); |
22084 | break; |
22085 | case OP_InitUint32: |
22086 | Text.Op = PrintName("InitUint32" ); |
22087 | break; |
22088 | case OP_InitSint64: |
22089 | Text.Op = PrintName("InitSint64" ); |
22090 | break; |
22091 | case OP_InitUint64: |
22092 | Text.Op = PrintName("InitUint64" ); |
22093 | break; |
22094 | case OP_InitIntAP: |
22095 | Text.Op = PrintName("InitIntAP" ); |
22096 | break; |
22097 | case OP_InitIntAPS: |
22098 | Text.Op = PrintName("InitIntAPS" ); |
22099 | break; |
22100 | case OP_InitBool: |
22101 | Text.Op = PrintName("InitBool" ); |
22102 | break; |
22103 | case OP_InitFixedPoint: |
22104 | Text.Op = PrintName("InitFixedPoint" ); |
22105 | break; |
22106 | case OP_InitPtr: |
22107 | Text.Op = PrintName("InitPtr" ); |
22108 | break; |
22109 | case OP_InitMemberPtr: |
22110 | Text.Op = PrintName("InitMemberPtr" ); |
22111 | break; |
22112 | case OP_InitFloat: |
22113 | Text.Op = PrintName("InitFloat" ); |
22114 | break; |
22115 | #endif |
22116 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22117 | bool emitInitSint8(const SourceInfo &); |
22118 | bool emitInitUint8(const SourceInfo &); |
22119 | bool emitInitSint16(const SourceInfo &); |
22120 | bool emitInitUint16(const SourceInfo &); |
22121 | bool emitInitSint32(const SourceInfo &); |
22122 | bool emitInitUint32(const SourceInfo &); |
22123 | bool emitInitSint64(const SourceInfo &); |
22124 | bool emitInitUint64(const SourceInfo &); |
22125 | bool emitInitIntAP(const SourceInfo &); |
22126 | bool emitInitIntAPS(const SourceInfo &); |
22127 | bool emitInitBool(const SourceInfo &); |
22128 | bool emitInitFixedPoint(const SourceInfo &); |
22129 | bool emitInitPtr(const SourceInfo &); |
22130 | bool emitInitMemberPtr(const SourceInfo &); |
22131 | bool emitInitFloat(const SourceInfo &); |
22132 | #endif |
22133 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22134 | [[nodiscard]] bool emitInit(PrimType, const SourceInfo &I); |
22135 | #endif |
22136 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
22137 | bool |
22138 | #if defined(GET_EVAL_IMPL) |
22139 | EvalEmitter |
22140 | #else |
22141 | ByteCodeEmitter |
22142 | #endif |
22143 | ::emitInit(PrimType T0, const SourceInfo &I) { |
22144 | switch (T0) { |
22145 | case PT_Sint8: |
22146 | return emitInitSint8(I); |
22147 | case PT_Uint8: |
22148 | return emitInitUint8(I); |
22149 | case PT_Sint16: |
22150 | return emitInitSint16(I); |
22151 | case PT_Uint16: |
22152 | return emitInitUint16(I); |
22153 | case PT_Sint32: |
22154 | return emitInitSint32(I); |
22155 | case PT_Uint32: |
22156 | return emitInitUint32(I); |
22157 | case PT_Sint64: |
22158 | return emitInitSint64(I); |
22159 | case PT_Uint64: |
22160 | return emitInitUint64(I); |
22161 | case PT_IntAP: |
22162 | return emitInitIntAP(I); |
22163 | case PT_IntAPS: |
22164 | return emitInitIntAPS(I); |
22165 | case PT_Bool: |
22166 | return emitInitBool(I); |
22167 | case PT_FixedPoint: |
22168 | return emitInitFixedPoint(I); |
22169 | case PT_Ptr: |
22170 | return emitInitPtr(I); |
22171 | case PT_MemberPtr: |
22172 | return emitInitMemberPtr(I); |
22173 | case PT_Float: |
22174 | return emitInitFloat(I); |
22175 | } |
22176 | llvm_unreachable("invalid enum value" ); |
22177 | } |
22178 | #endif |
22179 | #ifdef GET_LINK_IMPL |
22180 | bool ByteCodeEmitter::emitInitSint8(const SourceInfo &L) { |
22181 | return emitOp<>(OP_InitSint8, L); |
22182 | } |
22183 | bool ByteCodeEmitter::emitInitUint8(const SourceInfo &L) { |
22184 | return emitOp<>(OP_InitUint8, L); |
22185 | } |
22186 | bool ByteCodeEmitter::emitInitSint16(const SourceInfo &L) { |
22187 | return emitOp<>(OP_InitSint16, L); |
22188 | } |
22189 | bool ByteCodeEmitter::emitInitUint16(const SourceInfo &L) { |
22190 | return emitOp<>(OP_InitUint16, L); |
22191 | } |
22192 | bool ByteCodeEmitter::emitInitSint32(const SourceInfo &L) { |
22193 | return emitOp<>(OP_InitSint32, L); |
22194 | } |
22195 | bool ByteCodeEmitter::emitInitUint32(const SourceInfo &L) { |
22196 | return emitOp<>(OP_InitUint32, L); |
22197 | } |
22198 | bool ByteCodeEmitter::emitInitSint64(const SourceInfo &L) { |
22199 | return emitOp<>(OP_InitSint64, L); |
22200 | } |
22201 | bool ByteCodeEmitter::emitInitUint64(const SourceInfo &L) { |
22202 | return emitOp<>(OP_InitUint64, L); |
22203 | } |
22204 | bool ByteCodeEmitter::emitInitIntAP(const SourceInfo &L) { |
22205 | return emitOp<>(OP_InitIntAP, L); |
22206 | } |
22207 | bool ByteCodeEmitter::emitInitIntAPS(const SourceInfo &L) { |
22208 | return emitOp<>(OP_InitIntAPS, L); |
22209 | } |
22210 | bool ByteCodeEmitter::emitInitBool(const SourceInfo &L) { |
22211 | return emitOp<>(OP_InitBool, L); |
22212 | } |
22213 | bool ByteCodeEmitter::emitInitFixedPoint(const SourceInfo &L) { |
22214 | return emitOp<>(OP_InitFixedPoint, L); |
22215 | } |
22216 | bool ByteCodeEmitter::emitInitPtr(const SourceInfo &L) { |
22217 | return emitOp<>(OP_InitPtr, L); |
22218 | } |
22219 | bool ByteCodeEmitter::emitInitMemberPtr(const SourceInfo &L) { |
22220 | return emitOp<>(OP_InitMemberPtr, L); |
22221 | } |
22222 | bool ByteCodeEmitter::emitInitFloat(const SourceInfo &L) { |
22223 | return emitOp<>(OP_InitFloat, L); |
22224 | } |
22225 | #endif |
22226 | #ifdef GET_EVAL_IMPL |
22227 | bool EvalEmitter::emitInitSint8(const SourceInfo &L) { |
22228 | if (!isActive()) return true; |
22229 | CurrentSource = L; |
22230 | return Init<PT_Sint8>(S, OpPC); |
22231 | } |
22232 | bool EvalEmitter::emitInitUint8(const SourceInfo &L) { |
22233 | if (!isActive()) return true; |
22234 | CurrentSource = L; |
22235 | return Init<PT_Uint8>(S, OpPC); |
22236 | } |
22237 | bool EvalEmitter::emitInitSint16(const SourceInfo &L) { |
22238 | if (!isActive()) return true; |
22239 | CurrentSource = L; |
22240 | return Init<PT_Sint16>(S, OpPC); |
22241 | } |
22242 | bool EvalEmitter::emitInitUint16(const SourceInfo &L) { |
22243 | if (!isActive()) return true; |
22244 | CurrentSource = L; |
22245 | return Init<PT_Uint16>(S, OpPC); |
22246 | } |
22247 | bool EvalEmitter::emitInitSint32(const SourceInfo &L) { |
22248 | if (!isActive()) return true; |
22249 | CurrentSource = L; |
22250 | return Init<PT_Sint32>(S, OpPC); |
22251 | } |
22252 | bool EvalEmitter::emitInitUint32(const SourceInfo &L) { |
22253 | if (!isActive()) return true; |
22254 | CurrentSource = L; |
22255 | return Init<PT_Uint32>(S, OpPC); |
22256 | } |
22257 | bool EvalEmitter::emitInitSint64(const SourceInfo &L) { |
22258 | if (!isActive()) return true; |
22259 | CurrentSource = L; |
22260 | return Init<PT_Sint64>(S, OpPC); |
22261 | } |
22262 | bool EvalEmitter::emitInitUint64(const SourceInfo &L) { |
22263 | if (!isActive()) return true; |
22264 | CurrentSource = L; |
22265 | return Init<PT_Uint64>(S, OpPC); |
22266 | } |
22267 | bool EvalEmitter::emitInitIntAP(const SourceInfo &L) { |
22268 | if (!isActive()) return true; |
22269 | CurrentSource = L; |
22270 | return Init<PT_IntAP>(S, OpPC); |
22271 | } |
22272 | bool EvalEmitter::emitInitIntAPS(const SourceInfo &L) { |
22273 | if (!isActive()) return true; |
22274 | CurrentSource = L; |
22275 | return Init<PT_IntAPS>(S, OpPC); |
22276 | } |
22277 | bool EvalEmitter::emitInitBool(const SourceInfo &L) { |
22278 | if (!isActive()) return true; |
22279 | CurrentSource = L; |
22280 | return Init<PT_Bool>(S, OpPC); |
22281 | } |
22282 | bool EvalEmitter::emitInitFixedPoint(const SourceInfo &L) { |
22283 | if (!isActive()) return true; |
22284 | CurrentSource = L; |
22285 | return Init<PT_FixedPoint>(S, OpPC); |
22286 | } |
22287 | bool EvalEmitter::emitInitPtr(const SourceInfo &L) { |
22288 | if (!isActive()) return true; |
22289 | CurrentSource = L; |
22290 | return Init<PT_Ptr>(S, OpPC); |
22291 | } |
22292 | bool EvalEmitter::emitInitMemberPtr(const SourceInfo &L) { |
22293 | if (!isActive()) return true; |
22294 | CurrentSource = L; |
22295 | return Init<PT_MemberPtr>(S, OpPC); |
22296 | } |
22297 | bool EvalEmitter::emitInitFloat(const SourceInfo &L) { |
22298 | if (!isActive()) return true; |
22299 | CurrentSource = L; |
22300 | return Init<PT_Float>(S, OpPC); |
22301 | } |
22302 | #endif |
22303 | #ifdef GET_OPCODE_NAMES |
22304 | OP_InitBitFieldSint8, |
22305 | OP_InitBitFieldUint8, |
22306 | OP_InitBitFieldSint16, |
22307 | OP_InitBitFieldUint16, |
22308 | OP_InitBitFieldSint32, |
22309 | OP_InitBitFieldUint32, |
22310 | OP_InitBitFieldSint64, |
22311 | OP_InitBitFieldUint64, |
22312 | OP_InitBitFieldIntAP, |
22313 | OP_InitBitFieldIntAPS, |
22314 | OP_InitBitFieldBool, |
22315 | #endif |
22316 | #ifdef GET_INTERP |
22317 | case OP_InitBitFieldSint8: { |
22318 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22319 | if (!InitBitField<PT_Sint8>(S, OpPC, V0)) |
22320 | return false; |
22321 | continue; |
22322 | } |
22323 | case OP_InitBitFieldUint8: { |
22324 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22325 | if (!InitBitField<PT_Uint8>(S, OpPC, V0)) |
22326 | return false; |
22327 | continue; |
22328 | } |
22329 | case OP_InitBitFieldSint16: { |
22330 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22331 | if (!InitBitField<PT_Sint16>(S, OpPC, V0)) |
22332 | return false; |
22333 | continue; |
22334 | } |
22335 | case OP_InitBitFieldUint16: { |
22336 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22337 | if (!InitBitField<PT_Uint16>(S, OpPC, V0)) |
22338 | return false; |
22339 | continue; |
22340 | } |
22341 | case OP_InitBitFieldSint32: { |
22342 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22343 | if (!InitBitField<PT_Sint32>(S, OpPC, V0)) |
22344 | return false; |
22345 | continue; |
22346 | } |
22347 | case OP_InitBitFieldUint32: { |
22348 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22349 | if (!InitBitField<PT_Uint32>(S, OpPC, V0)) |
22350 | return false; |
22351 | continue; |
22352 | } |
22353 | case OP_InitBitFieldSint64: { |
22354 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22355 | if (!InitBitField<PT_Sint64>(S, OpPC, V0)) |
22356 | return false; |
22357 | continue; |
22358 | } |
22359 | case OP_InitBitFieldUint64: { |
22360 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22361 | if (!InitBitField<PT_Uint64>(S, OpPC, V0)) |
22362 | return false; |
22363 | continue; |
22364 | } |
22365 | case OP_InitBitFieldIntAP: { |
22366 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22367 | if (!InitBitField<PT_IntAP>(S, OpPC, V0)) |
22368 | return false; |
22369 | continue; |
22370 | } |
22371 | case OP_InitBitFieldIntAPS: { |
22372 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22373 | if (!InitBitField<PT_IntAPS>(S, OpPC, V0)) |
22374 | return false; |
22375 | continue; |
22376 | } |
22377 | case OP_InitBitFieldBool: { |
22378 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
22379 | if (!InitBitField<PT_Bool>(S, OpPC, V0)) |
22380 | return false; |
22381 | continue; |
22382 | } |
22383 | #endif |
22384 | #ifdef GET_DISASM |
22385 | case OP_InitBitFieldSint8: |
22386 | Text.Op = PrintName("InitBitFieldSint8" ); |
22387 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22388 | break; |
22389 | case OP_InitBitFieldUint8: |
22390 | Text.Op = PrintName("InitBitFieldUint8" ); |
22391 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22392 | break; |
22393 | case OP_InitBitFieldSint16: |
22394 | Text.Op = PrintName("InitBitFieldSint16" ); |
22395 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22396 | break; |
22397 | case OP_InitBitFieldUint16: |
22398 | Text.Op = PrintName("InitBitFieldUint16" ); |
22399 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22400 | break; |
22401 | case OP_InitBitFieldSint32: |
22402 | Text.Op = PrintName("InitBitFieldSint32" ); |
22403 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22404 | break; |
22405 | case OP_InitBitFieldUint32: |
22406 | Text.Op = PrintName("InitBitFieldUint32" ); |
22407 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22408 | break; |
22409 | case OP_InitBitFieldSint64: |
22410 | Text.Op = PrintName("InitBitFieldSint64" ); |
22411 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22412 | break; |
22413 | case OP_InitBitFieldUint64: |
22414 | Text.Op = PrintName("InitBitFieldUint64" ); |
22415 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22416 | break; |
22417 | case OP_InitBitFieldIntAP: |
22418 | Text.Op = PrintName("InitBitFieldIntAP" ); |
22419 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22420 | break; |
22421 | case OP_InitBitFieldIntAPS: |
22422 | Text.Op = PrintName("InitBitFieldIntAPS" ); |
22423 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22424 | break; |
22425 | case OP_InitBitFieldBool: |
22426 | Text.Op = PrintName("InitBitFieldBool" ); |
22427 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
22428 | break; |
22429 | #endif |
22430 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22431 | bool emitInitBitFieldSint8( const Record::Field * , const SourceInfo &); |
22432 | bool emitInitBitFieldUint8( const Record::Field * , const SourceInfo &); |
22433 | bool emitInitBitFieldSint16( const Record::Field * , const SourceInfo &); |
22434 | bool emitInitBitFieldUint16( const Record::Field * , const SourceInfo &); |
22435 | bool emitInitBitFieldSint32( const Record::Field * , const SourceInfo &); |
22436 | bool emitInitBitFieldUint32( const Record::Field * , const SourceInfo &); |
22437 | bool emitInitBitFieldSint64( const Record::Field * , const SourceInfo &); |
22438 | bool emitInitBitFieldUint64( const Record::Field * , const SourceInfo &); |
22439 | bool emitInitBitFieldIntAP( const Record::Field * , const SourceInfo &); |
22440 | bool emitInitBitFieldIntAPS( const Record::Field * , const SourceInfo &); |
22441 | bool emitInitBitFieldBool( const Record::Field * , const SourceInfo &); |
22442 | #endif |
22443 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22444 | [[nodiscard]] bool emitInitBitField(PrimType, const Record::Field *, const SourceInfo &I); |
22445 | #endif |
22446 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
22447 | bool |
22448 | #if defined(GET_EVAL_IMPL) |
22449 | EvalEmitter |
22450 | #else |
22451 | ByteCodeEmitter |
22452 | #endif |
22453 | ::emitInitBitField(PrimType T0, const Record::Field * A0, const SourceInfo &I) { |
22454 | switch (T0) { |
22455 | case PT_Sint8: |
22456 | return emitInitBitFieldSint8(A0, I); |
22457 | case PT_Uint8: |
22458 | return emitInitBitFieldUint8(A0, I); |
22459 | case PT_Sint16: |
22460 | return emitInitBitFieldSint16(A0, I); |
22461 | case PT_Uint16: |
22462 | return emitInitBitFieldUint16(A0, I); |
22463 | case PT_Sint32: |
22464 | return emitInitBitFieldSint32(A0, I); |
22465 | case PT_Uint32: |
22466 | return emitInitBitFieldUint32(A0, I); |
22467 | case PT_Sint64: |
22468 | return emitInitBitFieldSint64(A0, I); |
22469 | case PT_Uint64: |
22470 | return emitInitBitFieldUint64(A0, I); |
22471 | case PT_IntAP: |
22472 | return emitInitBitFieldIntAP(A0, I); |
22473 | case PT_IntAPS: |
22474 | return emitInitBitFieldIntAPS(A0, I); |
22475 | case PT_Bool: |
22476 | return emitInitBitFieldBool(A0, I); |
22477 | default: llvm_unreachable("invalid type: emitInitBitField" ); |
22478 | } |
22479 | llvm_unreachable("invalid enum value" ); |
22480 | } |
22481 | #endif |
22482 | #ifdef GET_LINK_IMPL |
22483 | bool ByteCodeEmitter::emitInitBitFieldSint8( const Record::Field * A0, const SourceInfo &L) { |
22484 | return emitOp<const Record::Field *>(OP_InitBitFieldSint8, A0, L); |
22485 | } |
22486 | bool ByteCodeEmitter::emitInitBitFieldUint8( const Record::Field * A0, const SourceInfo &L) { |
22487 | return emitOp<const Record::Field *>(OP_InitBitFieldUint8, A0, L); |
22488 | } |
22489 | bool ByteCodeEmitter::emitInitBitFieldSint16( const Record::Field * A0, const SourceInfo &L) { |
22490 | return emitOp<const Record::Field *>(OP_InitBitFieldSint16, A0, L); |
22491 | } |
22492 | bool ByteCodeEmitter::emitInitBitFieldUint16( const Record::Field * A0, const SourceInfo &L) { |
22493 | return emitOp<const Record::Field *>(OP_InitBitFieldUint16, A0, L); |
22494 | } |
22495 | bool ByteCodeEmitter::emitInitBitFieldSint32( const Record::Field * A0, const SourceInfo &L) { |
22496 | return emitOp<const Record::Field *>(OP_InitBitFieldSint32, A0, L); |
22497 | } |
22498 | bool ByteCodeEmitter::emitInitBitFieldUint32( const Record::Field * A0, const SourceInfo &L) { |
22499 | return emitOp<const Record::Field *>(OP_InitBitFieldUint32, A0, L); |
22500 | } |
22501 | bool ByteCodeEmitter::emitInitBitFieldSint64( const Record::Field * A0, const SourceInfo &L) { |
22502 | return emitOp<const Record::Field *>(OP_InitBitFieldSint64, A0, L); |
22503 | } |
22504 | bool ByteCodeEmitter::emitInitBitFieldUint64( const Record::Field * A0, const SourceInfo &L) { |
22505 | return emitOp<const Record::Field *>(OP_InitBitFieldUint64, A0, L); |
22506 | } |
22507 | bool ByteCodeEmitter::emitInitBitFieldIntAP( const Record::Field * A0, const SourceInfo &L) { |
22508 | return emitOp<const Record::Field *>(OP_InitBitFieldIntAP, A0, L); |
22509 | } |
22510 | bool ByteCodeEmitter::emitInitBitFieldIntAPS( const Record::Field * A0, const SourceInfo &L) { |
22511 | return emitOp<const Record::Field *>(OP_InitBitFieldIntAPS, A0, L); |
22512 | } |
22513 | bool ByteCodeEmitter::emitInitBitFieldBool( const Record::Field * A0, const SourceInfo &L) { |
22514 | return emitOp<const Record::Field *>(OP_InitBitFieldBool, A0, L); |
22515 | } |
22516 | #endif |
22517 | #ifdef GET_EVAL_IMPL |
22518 | bool EvalEmitter::emitInitBitFieldSint8( const Record::Field * A0, const SourceInfo &L) { |
22519 | if (!isActive()) return true; |
22520 | CurrentSource = L; |
22521 | return InitBitField<PT_Sint8>(S, OpPC, A0); |
22522 | } |
22523 | bool EvalEmitter::emitInitBitFieldUint8( const Record::Field * A0, const SourceInfo &L) { |
22524 | if (!isActive()) return true; |
22525 | CurrentSource = L; |
22526 | return InitBitField<PT_Uint8>(S, OpPC, A0); |
22527 | } |
22528 | bool EvalEmitter::emitInitBitFieldSint16( const Record::Field * A0, const SourceInfo &L) { |
22529 | if (!isActive()) return true; |
22530 | CurrentSource = L; |
22531 | return InitBitField<PT_Sint16>(S, OpPC, A0); |
22532 | } |
22533 | bool EvalEmitter::emitInitBitFieldUint16( const Record::Field * A0, const SourceInfo &L) { |
22534 | if (!isActive()) return true; |
22535 | CurrentSource = L; |
22536 | return InitBitField<PT_Uint16>(S, OpPC, A0); |
22537 | } |
22538 | bool EvalEmitter::emitInitBitFieldSint32( const Record::Field * A0, const SourceInfo &L) { |
22539 | if (!isActive()) return true; |
22540 | CurrentSource = L; |
22541 | return InitBitField<PT_Sint32>(S, OpPC, A0); |
22542 | } |
22543 | bool EvalEmitter::emitInitBitFieldUint32( const Record::Field * A0, const SourceInfo &L) { |
22544 | if (!isActive()) return true; |
22545 | CurrentSource = L; |
22546 | return InitBitField<PT_Uint32>(S, OpPC, A0); |
22547 | } |
22548 | bool EvalEmitter::emitInitBitFieldSint64( const Record::Field * A0, const SourceInfo &L) { |
22549 | if (!isActive()) return true; |
22550 | CurrentSource = L; |
22551 | return InitBitField<PT_Sint64>(S, OpPC, A0); |
22552 | } |
22553 | bool EvalEmitter::emitInitBitFieldUint64( const Record::Field * A0, const SourceInfo &L) { |
22554 | if (!isActive()) return true; |
22555 | CurrentSource = L; |
22556 | return InitBitField<PT_Uint64>(S, OpPC, A0); |
22557 | } |
22558 | bool EvalEmitter::emitInitBitFieldIntAP( const Record::Field * A0, const SourceInfo &L) { |
22559 | if (!isActive()) return true; |
22560 | CurrentSource = L; |
22561 | return InitBitField<PT_IntAP>(S, OpPC, A0); |
22562 | } |
22563 | bool EvalEmitter::emitInitBitFieldIntAPS( const Record::Field * A0, const SourceInfo &L) { |
22564 | if (!isActive()) return true; |
22565 | CurrentSource = L; |
22566 | return InitBitField<PT_IntAPS>(S, OpPC, A0); |
22567 | } |
22568 | bool EvalEmitter::emitInitBitFieldBool( const Record::Field * A0, const SourceInfo &L) { |
22569 | if (!isActive()) return true; |
22570 | CurrentSource = L; |
22571 | return InitBitField<PT_Bool>(S, OpPC, A0); |
22572 | } |
22573 | #endif |
22574 | #ifdef GET_OPCODE_NAMES |
22575 | OP_InitElemSint8, |
22576 | OP_InitElemUint8, |
22577 | OP_InitElemSint16, |
22578 | OP_InitElemUint16, |
22579 | OP_InitElemSint32, |
22580 | OP_InitElemUint32, |
22581 | OP_InitElemSint64, |
22582 | OP_InitElemUint64, |
22583 | OP_InitElemIntAP, |
22584 | OP_InitElemIntAPS, |
22585 | OP_InitElemBool, |
22586 | OP_InitElemFixedPoint, |
22587 | OP_InitElemPtr, |
22588 | OP_InitElemMemberPtr, |
22589 | OP_InitElemFloat, |
22590 | #endif |
22591 | #ifdef GET_INTERP |
22592 | case OP_InitElemSint8: { |
22593 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22594 | if (!InitElem<PT_Sint8>(S, OpPC, V0)) |
22595 | return false; |
22596 | continue; |
22597 | } |
22598 | case OP_InitElemUint8: { |
22599 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22600 | if (!InitElem<PT_Uint8>(S, OpPC, V0)) |
22601 | return false; |
22602 | continue; |
22603 | } |
22604 | case OP_InitElemSint16: { |
22605 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22606 | if (!InitElem<PT_Sint16>(S, OpPC, V0)) |
22607 | return false; |
22608 | continue; |
22609 | } |
22610 | case OP_InitElemUint16: { |
22611 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22612 | if (!InitElem<PT_Uint16>(S, OpPC, V0)) |
22613 | return false; |
22614 | continue; |
22615 | } |
22616 | case OP_InitElemSint32: { |
22617 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22618 | if (!InitElem<PT_Sint32>(S, OpPC, V0)) |
22619 | return false; |
22620 | continue; |
22621 | } |
22622 | case OP_InitElemUint32: { |
22623 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22624 | if (!InitElem<PT_Uint32>(S, OpPC, V0)) |
22625 | return false; |
22626 | continue; |
22627 | } |
22628 | case OP_InitElemSint64: { |
22629 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22630 | if (!InitElem<PT_Sint64>(S, OpPC, V0)) |
22631 | return false; |
22632 | continue; |
22633 | } |
22634 | case OP_InitElemUint64: { |
22635 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22636 | if (!InitElem<PT_Uint64>(S, OpPC, V0)) |
22637 | return false; |
22638 | continue; |
22639 | } |
22640 | case OP_InitElemIntAP: { |
22641 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22642 | if (!InitElem<PT_IntAP>(S, OpPC, V0)) |
22643 | return false; |
22644 | continue; |
22645 | } |
22646 | case OP_InitElemIntAPS: { |
22647 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22648 | if (!InitElem<PT_IntAPS>(S, OpPC, V0)) |
22649 | return false; |
22650 | continue; |
22651 | } |
22652 | case OP_InitElemBool: { |
22653 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22654 | if (!InitElem<PT_Bool>(S, OpPC, V0)) |
22655 | return false; |
22656 | continue; |
22657 | } |
22658 | case OP_InitElemFixedPoint: { |
22659 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22660 | if (!InitElem<PT_FixedPoint>(S, OpPC, V0)) |
22661 | return false; |
22662 | continue; |
22663 | } |
22664 | case OP_InitElemPtr: { |
22665 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22666 | if (!InitElem<PT_Ptr>(S, OpPC, V0)) |
22667 | return false; |
22668 | continue; |
22669 | } |
22670 | case OP_InitElemMemberPtr: { |
22671 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22672 | if (!InitElem<PT_MemberPtr>(S, OpPC, V0)) |
22673 | return false; |
22674 | continue; |
22675 | } |
22676 | case OP_InitElemFloat: { |
22677 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22678 | if (!InitElem<PT_Float>(S, OpPC, V0)) |
22679 | return false; |
22680 | continue; |
22681 | } |
22682 | #endif |
22683 | #ifdef GET_DISASM |
22684 | case OP_InitElemSint8: |
22685 | Text.Op = PrintName("InitElemSint8" ); |
22686 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22687 | break; |
22688 | case OP_InitElemUint8: |
22689 | Text.Op = PrintName("InitElemUint8" ); |
22690 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22691 | break; |
22692 | case OP_InitElemSint16: |
22693 | Text.Op = PrintName("InitElemSint16" ); |
22694 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22695 | break; |
22696 | case OP_InitElemUint16: |
22697 | Text.Op = PrintName("InitElemUint16" ); |
22698 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22699 | break; |
22700 | case OP_InitElemSint32: |
22701 | Text.Op = PrintName("InitElemSint32" ); |
22702 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22703 | break; |
22704 | case OP_InitElemUint32: |
22705 | Text.Op = PrintName("InitElemUint32" ); |
22706 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22707 | break; |
22708 | case OP_InitElemSint64: |
22709 | Text.Op = PrintName("InitElemSint64" ); |
22710 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22711 | break; |
22712 | case OP_InitElemUint64: |
22713 | Text.Op = PrintName("InitElemUint64" ); |
22714 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22715 | break; |
22716 | case OP_InitElemIntAP: |
22717 | Text.Op = PrintName("InitElemIntAP" ); |
22718 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22719 | break; |
22720 | case OP_InitElemIntAPS: |
22721 | Text.Op = PrintName("InitElemIntAPS" ); |
22722 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22723 | break; |
22724 | case OP_InitElemBool: |
22725 | Text.Op = PrintName("InitElemBool" ); |
22726 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22727 | break; |
22728 | case OP_InitElemFixedPoint: |
22729 | Text.Op = PrintName("InitElemFixedPoint" ); |
22730 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22731 | break; |
22732 | case OP_InitElemPtr: |
22733 | Text.Op = PrintName("InitElemPtr" ); |
22734 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22735 | break; |
22736 | case OP_InitElemMemberPtr: |
22737 | Text.Op = PrintName("InitElemMemberPtr" ); |
22738 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22739 | break; |
22740 | case OP_InitElemFloat: |
22741 | Text.Op = PrintName("InitElemFloat" ); |
22742 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
22743 | break; |
22744 | #endif |
22745 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22746 | bool emitInitElemSint8( uint32_t , const SourceInfo &); |
22747 | bool emitInitElemUint8( uint32_t , const SourceInfo &); |
22748 | bool emitInitElemSint16( uint32_t , const SourceInfo &); |
22749 | bool emitInitElemUint16( uint32_t , const SourceInfo &); |
22750 | bool emitInitElemSint32( uint32_t , const SourceInfo &); |
22751 | bool emitInitElemUint32( uint32_t , const SourceInfo &); |
22752 | bool emitInitElemSint64( uint32_t , const SourceInfo &); |
22753 | bool emitInitElemUint64( uint32_t , const SourceInfo &); |
22754 | bool emitInitElemIntAP( uint32_t , const SourceInfo &); |
22755 | bool emitInitElemIntAPS( uint32_t , const SourceInfo &); |
22756 | bool emitInitElemBool( uint32_t , const SourceInfo &); |
22757 | bool emitInitElemFixedPoint( uint32_t , const SourceInfo &); |
22758 | bool emitInitElemPtr( uint32_t , const SourceInfo &); |
22759 | bool emitInitElemMemberPtr( uint32_t , const SourceInfo &); |
22760 | bool emitInitElemFloat( uint32_t , const SourceInfo &); |
22761 | #endif |
22762 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22763 | [[nodiscard]] bool emitInitElem(PrimType, uint32_t, const SourceInfo &I); |
22764 | #endif |
22765 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
22766 | bool |
22767 | #if defined(GET_EVAL_IMPL) |
22768 | EvalEmitter |
22769 | #else |
22770 | ByteCodeEmitter |
22771 | #endif |
22772 | ::emitInitElem(PrimType T0, uint32_t A0, const SourceInfo &I) { |
22773 | switch (T0) { |
22774 | case PT_Sint8: |
22775 | return emitInitElemSint8(A0, I); |
22776 | case PT_Uint8: |
22777 | return emitInitElemUint8(A0, I); |
22778 | case PT_Sint16: |
22779 | return emitInitElemSint16(A0, I); |
22780 | case PT_Uint16: |
22781 | return emitInitElemUint16(A0, I); |
22782 | case PT_Sint32: |
22783 | return emitInitElemSint32(A0, I); |
22784 | case PT_Uint32: |
22785 | return emitInitElemUint32(A0, I); |
22786 | case PT_Sint64: |
22787 | return emitInitElemSint64(A0, I); |
22788 | case PT_Uint64: |
22789 | return emitInitElemUint64(A0, I); |
22790 | case PT_IntAP: |
22791 | return emitInitElemIntAP(A0, I); |
22792 | case PT_IntAPS: |
22793 | return emitInitElemIntAPS(A0, I); |
22794 | case PT_Bool: |
22795 | return emitInitElemBool(A0, I); |
22796 | case PT_FixedPoint: |
22797 | return emitInitElemFixedPoint(A0, I); |
22798 | case PT_Ptr: |
22799 | return emitInitElemPtr(A0, I); |
22800 | case PT_MemberPtr: |
22801 | return emitInitElemMemberPtr(A0, I); |
22802 | case PT_Float: |
22803 | return emitInitElemFloat(A0, I); |
22804 | } |
22805 | llvm_unreachable("invalid enum value" ); |
22806 | } |
22807 | #endif |
22808 | #ifdef GET_LINK_IMPL |
22809 | bool ByteCodeEmitter::emitInitElemSint8( uint32_t A0, const SourceInfo &L) { |
22810 | return emitOp<uint32_t>(OP_InitElemSint8, A0, L); |
22811 | } |
22812 | bool ByteCodeEmitter::emitInitElemUint8( uint32_t A0, const SourceInfo &L) { |
22813 | return emitOp<uint32_t>(OP_InitElemUint8, A0, L); |
22814 | } |
22815 | bool ByteCodeEmitter::emitInitElemSint16( uint32_t A0, const SourceInfo &L) { |
22816 | return emitOp<uint32_t>(OP_InitElemSint16, A0, L); |
22817 | } |
22818 | bool ByteCodeEmitter::emitInitElemUint16( uint32_t A0, const SourceInfo &L) { |
22819 | return emitOp<uint32_t>(OP_InitElemUint16, A0, L); |
22820 | } |
22821 | bool ByteCodeEmitter::emitInitElemSint32( uint32_t A0, const SourceInfo &L) { |
22822 | return emitOp<uint32_t>(OP_InitElemSint32, A0, L); |
22823 | } |
22824 | bool ByteCodeEmitter::emitInitElemUint32( uint32_t A0, const SourceInfo &L) { |
22825 | return emitOp<uint32_t>(OP_InitElemUint32, A0, L); |
22826 | } |
22827 | bool ByteCodeEmitter::emitInitElemSint64( uint32_t A0, const SourceInfo &L) { |
22828 | return emitOp<uint32_t>(OP_InitElemSint64, A0, L); |
22829 | } |
22830 | bool ByteCodeEmitter::emitInitElemUint64( uint32_t A0, const SourceInfo &L) { |
22831 | return emitOp<uint32_t>(OP_InitElemUint64, A0, L); |
22832 | } |
22833 | bool ByteCodeEmitter::emitInitElemIntAP( uint32_t A0, const SourceInfo &L) { |
22834 | return emitOp<uint32_t>(OP_InitElemIntAP, A0, L); |
22835 | } |
22836 | bool ByteCodeEmitter::emitInitElemIntAPS( uint32_t A0, const SourceInfo &L) { |
22837 | return emitOp<uint32_t>(OP_InitElemIntAPS, A0, L); |
22838 | } |
22839 | bool ByteCodeEmitter::emitInitElemBool( uint32_t A0, const SourceInfo &L) { |
22840 | return emitOp<uint32_t>(OP_InitElemBool, A0, L); |
22841 | } |
22842 | bool ByteCodeEmitter::emitInitElemFixedPoint( uint32_t A0, const SourceInfo &L) { |
22843 | return emitOp<uint32_t>(OP_InitElemFixedPoint, A0, L); |
22844 | } |
22845 | bool ByteCodeEmitter::emitInitElemPtr( uint32_t A0, const SourceInfo &L) { |
22846 | return emitOp<uint32_t>(OP_InitElemPtr, A0, L); |
22847 | } |
22848 | bool ByteCodeEmitter::emitInitElemMemberPtr( uint32_t A0, const SourceInfo &L) { |
22849 | return emitOp<uint32_t>(OP_InitElemMemberPtr, A0, L); |
22850 | } |
22851 | bool ByteCodeEmitter::emitInitElemFloat( uint32_t A0, const SourceInfo &L) { |
22852 | return emitOp<uint32_t>(OP_InitElemFloat, A0, L); |
22853 | } |
22854 | #endif |
22855 | #ifdef GET_EVAL_IMPL |
22856 | bool EvalEmitter::emitInitElemSint8( uint32_t A0, const SourceInfo &L) { |
22857 | if (!isActive()) return true; |
22858 | CurrentSource = L; |
22859 | return InitElem<PT_Sint8>(S, OpPC, A0); |
22860 | } |
22861 | bool EvalEmitter::emitInitElemUint8( uint32_t A0, const SourceInfo &L) { |
22862 | if (!isActive()) return true; |
22863 | CurrentSource = L; |
22864 | return InitElem<PT_Uint8>(S, OpPC, A0); |
22865 | } |
22866 | bool EvalEmitter::emitInitElemSint16( uint32_t A0, const SourceInfo &L) { |
22867 | if (!isActive()) return true; |
22868 | CurrentSource = L; |
22869 | return InitElem<PT_Sint16>(S, OpPC, A0); |
22870 | } |
22871 | bool EvalEmitter::emitInitElemUint16( uint32_t A0, const SourceInfo &L) { |
22872 | if (!isActive()) return true; |
22873 | CurrentSource = L; |
22874 | return InitElem<PT_Uint16>(S, OpPC, A0); |
22875 | } |
22876 | bool EvalEmitter::emitInitElemSint32( uint32_t A0, const SourceInfo &L) { |
22877 | if (!isActive()) return true; |
22878 | CurrentSource = L; |
22879 | return InitElem<PT_Sint32>(S, OpPC, A0); |
22880 | } |
22881 | bool EvalEmitter::emitInitElemUint32( uint32_t A0, const SourceInfo &L) { |
22882 | if (!isActive()) return true; |
22883 | CurrentSource = L; |
22884 | return InitElem<PT_Uint32>(S, OpPC, A0); |
22885 | } |
22886 | bool EvalEmitter::emitInitElemSint64( uint32_t A0, const SourceInfo &L) { |
22887 | if (!isActive()) return true; |
22888 | CurrentSource = L; |
22889 | return InitElem<PT_Sint64>(S, OpPC, A0); |
22890 | } |
22891 | bool EvalEmitter::emitInitElemUint64( uint32_t A0, const SourceInfo &L) { |
22892 | if (!isActive()) return true; |
22893 | CurrentSource = L; |
22894 | return InitElem<PT_Uint64>(S, OpPC, A0); |
22895 | } |
22896 | bool EvalEmitter::emitInitElemIntAP( uint32_t A0, const SourceInfo &L) { |
22897 | if (!isActive()) return true; |
22898 | CurrentSource = L; |
22899 | return InitElem<PT_IntAP>(S, OpPC, A0); |
22900 | } |
22901 | bool EvalEmitter::emitInitElemIntAPS( uint32_t A0, const SourceInfo &L) { |
22902 | if (!isActive()) return true; |
22903 | CurrentSource = L; |
22904 | return InitElem<PT_IntAPS>(S, OpPC, A0); |
22905 | } |
22906 | bool EvalEmitter::emitInitElemBool( uint32_t A0, const SourceInfo &L) { |
22907 | if (!isActive()) return true; |
22908 | CurrentSource = L; |
22909 | return InitElem<PT_Bool>(S, OpPC, A0); |
22910 | } |
22911 | bool EvalEmitter::emitInitElemFixedPoint( uint32_t A0, const SourceInfo &L) { |
22912 | if (!isActive()) return true; |
22913 | CurrentSource = L; |
22914 | return InitElem<PT_FixedPoint>(S, OpPC, A0); |
22915 | } |
22916 | bool EvalEmitter::emitInitElemPtr( uint32_t A0, const SourceInfo &L) { |
22917 | if (!isActive()) return true; |
22918 | CurrentSource = L; |
22919 | return InitElem<PT_Ptr>(S, OpPC, A0); |
22920 | } |
22921 | bool EvalEmitter::emitInitElemMemberPtr( uint32_t A0, const SourceInfo &L) { |
22922 | if (!isActive()) return true; |
22923 | CurrentSource = L; |
22924 | return InitElem<PT_MemberPtr>(S, OpPC, A0); |
22925 | } |
22926 | bool EvalEmitter::emitInitElemFloat( uint32_t A0, const SourceInfo &L) { |
22927 | if (!isActive()) return true; |
22928 | CurrentSource = L; |
22929 | return InitElem<PT_Float>(S, OpPC, A0); |
22930 | } |
22931 | #endif |
22932 | #ifdef GET_OPCODE_NAMES |
22933 | OP_InitElemPopSint8, |
22934 | OP_InitElemPopUint8, |
22935 | OP_InitElemPopSint16, |
22936 | OP_InitElemPopUint16, |
22937 | OP_InitElemPopSint32, |
22938 | OP_InitElemPopUint32, |
22939 | OP_InitElemPopSint64, |
22940 | OP_InitElemPopUint64, |
22941 | OP_InitElemPopIntAP, |
22942 | OP_InitElemPopIntAPS, |
22943 | OP_InitElemPopBool, |
22944 | OP_InitElemPopFixedPoint, |
22945 | OP_InitElemPopPtr, |
22946 | OP_InitElemPopMemberPtr, |
22947 | OP_InitElemPopFloat, |
22948 | #endif |
22949 | #ifdef GET_INTERP |
22950 | case OP_InitElemPopSint8: { |
22951 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22952 | if (!InitElemPop<PT_Sint8>(S, OpPC, V0)) |
22953 | return false; |
22954 | continue; |
22955 | } |
22956 | case OP_InitElemPopUint8: { |
22957 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22958 | if (!InitElemPop<PT_Uint8>(S, OpPC, V0)) |
22959 | return false; |
22960 | continue; |
22961 | } |
22962 | case OP_InitElemPopSint16: { |
22963 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22964 | if (!InitElemPop<PT_Sint16>(S, OpPC, V0)) |
22965 | return false; |
22966 | continue; |
22967 | } |
22968 | case OP_InitElemPopUint16: { |
22969 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22970 | if (!InitElemPop<PT_Uint16>(S, OpPC, V0)) |
22971 | return false; |
22972 | continue; |
22973 | } |
22974 | case OP_InitElemPopSint32: { |
22975 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22976 | if (!InitElemPop<PT_Sint32>(S, OpPC, V0)) |
22977 | return false; |
22978 | continue; |
22979 | } |
22980 | case OP_InitElemPopUint32: { |
22981 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22982 | if (!InitElemPop<PT_Uint32>(S, OpPC, V0)) |
22983 | return false; |
22984 | continue; |
22985 | } |
22986 | case OP_InitElemPopSint64: { |
22987 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22988 | if (!InitElemPop<PT_Sint64>(S, OpPC, V0)) |
22989 | return false; |
22990 | continue; |
22991 | } |
22992 | case OP_InitElemPopUint64: { |
22993 | const auto V0 = ReadArg<uint32_t>(S, PC); |
22994 | if (!InitElemPop<PT_Uint64>(S, OpPC, V0)) |
22995 | return false; |
22996 | continue; |
22997 | } |
22998 | case OP_InitElemPopIntAP: { |
22999 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23000 | if (!InitElemPop<PT_IntAP>(S, OpPC, V0)) |
23001 | return false; |
23002 | continue; |
23003 | } |
23004 | case OP_InitElemPopIntAPS: { |
23005 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23006 | if (!InitElemPop<PT_IntAPS>(S, OpPC, V0)) |
23007 | return false; |
23008 | continue; |
23009 | } |
23010 | case OP_InitElemPopBool: { |
23011 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23012 | if (!InitElemPop<PT_Bool>(S, OpPC, V0)) |
23013 | return false; |
23014 | continue; |
23015 | } |
23016 | case OP_InitElemPopFixedPoint: { |
23017 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23018 | if (!InitElemPop<PT_FixedPoint>(S, OpPC, V0)) |
23019 | return false; |
23020 | continue; |
23021 | } |
23022 | case OP_InitElemPopPtr: { |
23023 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23024 | if (!InitElemPop<PT_Ptr>(S, OpPC, V0)) |
23025 | return false; |
23026 | continue; |
23027 | } |
23028 | case OP_InitElemPopMemberPtr: { |
23029 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23030 | if (!InitElemPop<PT_MemberPtr>(S, OpPC, V0)) |
23031 | return false; |
23032 | continue; |
23033 | } |
23034 | case OP_InitElemPopFloat: { |
23035 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23036 | if (!InitElemPop<PT_Float>(S, OpPC, V0)) |
23037 | return false; |
23038 | continue; |
23039 | } |
23040 | #endif |
23041 | #ifdef GET_DISASM |
23042 | case OP_InitElemPopSint8: |
23043 | Text.Op = PrintName("InitElemPopSint8" ); |
23044 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23045 | break; |
23046 | case OP_InitElemPopUint8: |
23047 | Text.Op = PrintName("InitElemPopUint8" ); |
23048 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23049 | break; |
23050 | case OP_InitElemPopSint16: |
23051 | Text.Op = PrintName("InitElemPopSint16" ); |
23052 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23053 | break; |
23054 | case OP_InitElemPopUint16: |
23055 | Text.Op = PrintName("InitElemPopUint16" ); |
23056 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23057 | break; |
23058 | case OP_InitElemPopSint32: |
23059 | Text.Op = PrintName("InitElemPopSint32" ); |
23060 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23061 | break; |
23062 | case OP_InitElemPopUint32: |
23063 | Text.Op = PrintName("InitElemPopUint32" ); |
23064 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23065 | break; |
23066 | case OP_InitElemPopSint64: |
23067 | Text.Op = PrintName("InitElemPopSint64" ); |
23068 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23069 | break; |
23070 | case OP_InitElemPopUint64: |
23071 | Text.Op = PrintName("InitElemPopUint64" ); |
23072 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23073 | break; |
23074 | case OP_InitElemPopIntAP: |
23075 | Text.Op = PrintName("InitElemPopIntAP" ); |
23076 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23077 | break; |
23078 | case OP_InitElemPopIntAPS: |
23079 | Text.Op = PrintName("InitElemPopIntAPS" ); |
23080 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23081 | break; |
23082 | case OP_InitElemPopBool: |
23083 | Text.Op = PrintName("InitElemPopBool" ); |
23084 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23085 | break; |
23086 | case OP_InitElemPopFixedPoint: |
23087 | Text.Op = PrintName("InitElemPopFixedPoint" ); |
23088 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23089 | break; |
23090 | case OP_InitElemPopPtr: |
23091 | Text.Op = PrintName("InitElemPopPtr" ); |
23092 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23093 | break; |
23094 | case OP_InitElemPopMemberPtr: |
23095 | Text.Op = PrintName("InitElemPopMemberPtr" ); |
23096 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23097 | break; |
23098 | case OP_InitElemPopFloat: |
23099 | Text.Op = PrintName("InitElemPopFloat" ); |
23100 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23101 | break; |
23102 | #endif |
23103 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23104 | bool emitInitElemPopSint8( uint32_t , const SourceInfo &); |
23105 | bool emitInitElemPopUint8( uint32_t , const SourceInfo &); |
23106 | bool emitInitElemPopSint16( uint32_t , const SourceInfo &); |
23107 | bool emitInitElemPopUint16( uint32_t , const SourceInfo &); |
23108 | bool emitInitElemPopSint32( uint32_t , const SourceInfo &); |
23109 | bool emitInitElemPopUint32( uint32_t , const SourceInfo &); |
23110 | bool emitInitElemPopSint64( uint32_t , const SourceInfo &); |
23111 | bool emitInitElemPopUint64( uint32_t , const SourceInfo &); |
23112 | bool emitInitElemPopIntAP( uint32_t , const SourceInfo &); |
23113 | bool emitInitElemPopIntAPS( uint32_t , const SourceInfo &); |
23114 | bool emitInitElemPopBool( uint32_t , const SourceInfo &); |
23115 | bool emitInitElemPopFixedPoint( uint32_t , const SourceInfo &); |
23116 | bool emitInitElemPopPtr( uint32_t , const SourceInfo &); |
23117 | bool emitInitElemPopMemberPtr( uint32_t , const SourceInfo &); |
23118 | bool emitInitElemPopFloat( uint32_t , const SourceInfo &); |
23119 | #endif |
23120 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23121 | [[nodiscard]] bool emitInitElemPop(PrimType, uint32_t, const SourceInfo &I); |
23122 | #endif |
23123 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
23124 | bool |
23125 | #if defined(GET_EVAL_IMPL) |
23126 | EvalEmitter |
23127 | #else |
23128 | ByteCodeEmitter |
23129 | #endif |
23130 | ::emitInitElemPop(PrimType T0, uint32_t A0, const SourceInfo &I) { |
23131 | switch (T0) { |
23132 | case PT_Sint8: |
23133 | return emitInitElemPopSint8(A0, I); |
23134 | case PT_Uint8: |
23135 | return emitInitElemPopUint8(A0, I); |
23136 | case PT_Sint16: |
23137 | return emitInitElemPopSint16(A0, I); |
23138 | case PT_Uint16: |
23139 | return emitInitElemPopUint16(A0, I); |
23140 | case PT_Sint32: |
23141 | return emitInitElemPopSint32(A0, I); |
23142 | case PT_Uint32: |
23143 | return emitInitElemPopUint32(A0, I); |
23144 | case PT_Sint64: |
23145 | return emitInitElemPopSint64(A0, I); |
23146 | case PT_Uint64: |
23147 | return emitInitElemPopUint64(A0, I); |
23148 | case PT_IntAP: |
23149 | return emitInitElemPopIntAP(A0, I); |
23150 | case PT_IntAPS: |
23151 | return emitInitElemPopIntAPS(A0, I); |
23152 | case PT_Bool: |
23153 | return emitInitElemPopBool(A0, I); |
23154 | case PT_FixedPoint: |
23155 | return emitInitElemPopFixedPoint(A0, I); |
23156 | case PT_Ptr: |
23157 | return emitInitElemPopPtr(A0, I); |
23158 | case PT_MemberPtr: |
23159 | return emitInitElemPopMemberPtr(A0, I); |
23160 | case PT_Float: |
23161 | return emitInitElemPopFloat(A0, I); |
23162 | } |
23163 | llvm_unreachable("invalid enum value" ); |
23164 | } |
23165 | #endif |
23166 | #ifdef GET_LINK_IMPL |
23167 | bool ByteCodeEmitter::emitInitElemPopSint8( uint32_t A0, const SourceInfo &L) { |
23168 | return emitOp<uint32_t>(OP_InitElemPopSint8, A0, L); |
23169 | } |
23170 | bool ByteCodeEmitter::emitInitElemPopUint8( uint32_t A0, const SourceInfo &L) { |
23171 | return emitOp<uint32_t>(OP_InitElemPopUint8, A0, L); |
23172 | } |
23173 | bool ByteCodeEmitter::emitInitElemPopSint16( uint32_t A0, const SourceInfo &L) { |
23174 | return emitOp<uint32_t>(OP_InitElemPopSint16, A0, L); |
23175 | } |
23176 | bool ByteCodeEmitter::emitInitElemPopUint16( uint32_t A0, const SourceInfo &L) { |
23177 | return emitOp<uint32_t>(OP_InitElemPopUint16, A0, L); |
23178 | } |
23179 | bool ByteCodeEmitter::emitInitElemPopSint32( uint32_t A0, const SourceInfo &L) { |
23180 | return emitOp<uint32_t>(OP_InitElemPopSint32, A0, L); |
23181 | } |
23182 | bool ByteCodeEmitter::emitInitElemPopUint32( uint32_t A0, const SourceInfo &L) { |
23183 | return emitOp<uint32_t>(OP_InitElemPopUint32, A0, L); |
23184 | } |
23185 | bool ByteCodeEmitter::emitInitElemPopSint64( uint32_t A0, const SourceInfo &L) { |
23186 | return emitOp<uint32_t>(OP_InitElemPopSint64, A0, L); |
23187 | } |
23188 | bool ByteCodeEmitter::emitInitElemPopUint64( uint32_t A0, const SourceInfo &L) { |
23189 | return emitOp<uint32_t>(OP_InitElemPopUint64, A0, L); |
23190 | } |
23191 | bool ByteCodeEmitter::emitInitElemPopIntAP( uint32_t A0, const SourceInfo &L) { |
23192 | return emitOp<uint32_t>(OP_InitElemPopIntAP, A0, L); |
23193 | } |
23194 | bool ByteCodeEmitter::emitInitElemPopIntAPS( uint32_t A0, const SourceInfo &L) { |
23195 | return emitOp<uint32_t>(OP_InitElemPopIntAPS, A0, L); |
23196 | } |
23197 | bool ByteCodeEmitter::emitInitElemPopBool( uint32_t A0, const SourceInfo &L) { |
23198 | return emitOp<uint32_t>(OP_InitElemPopBool, A0, L); |
23199 | } |
23200 | bool ByteCodeEmitter::emitInitElemPopFixedPoint( uint32_t A0, const SourceInfo &L) { |
23201 | return emitOp<uint32_t>(OP_InitElemPopFixedPoint, A0, L); |
23202 | } |
23203 | bool ByteCodeEmitter::emitInitElemPopPtr( uint32_t A0, const SourceInfo &L) { |
23204 | return emitOp<uint32_t>(OP_InitElemPopPtr, A0, L); |
23205 | } |
23206 | bool ByteCodeEmitter::emitInitElemPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
23207 | return emitOp<uint32_t>(OP_InitElemPopMemberPtr, A0, L); |
23208 | } |
23209 | bool ByteCodeEmitter::emitInitElemPopFloat( uint32_t A0, const SourceInfo &L) { |
23210 | return emitOp<uint32_t>(OP_InitElemPopFloat, A0, L); |
23211 | } |
23212 | #endif |
23213 | #ifdef GET_EVAL_IMPL |
23214 | bool EvalEmitter::emitInitElemPopSint8( uint32_t A0, const SourceInfo &L) { |
23215 | if (!isActive()) return true; |
23216 | CurrentSource = L; |
23217 | return InitElemPop<PT_Sint8>(S, OpPC, A0); |
23218 | } |
23219 | bool EvalEmitter::emitInitElemPopUint8( uint32_t A0, const SourceInfo &L) { |
23220 | if (!isActive()) return true; |
23221 | CurrentSource = L; |
23222 | return InitElemPop<PT_Uint8>(S, OpPC, A0); |
23223 | } |
23224 | bool EvalEmitter::emitInitElemPopSint16( uint32_t A0, const SourceInfo &L) { |
23225 | if (!isActive()) return true; |
23226 | CurrentSource = L; |
23227 | return InitElemPop<PT_Sint16>(S, OpPC, A0); |
23228 | } |
23229 | bool EvalEmitter::emitInitElemPopUint16( uint32_t A0, const SourceInfo &L) { |
23230 | if (!isActive()) return true; |
23231 | CurrentSource = L; |
23232 | return InitElemPop<PT_Uint16>(S, OpPC, A0); |
23233 | } |
23234 | bool EvalEmitter::emitInitElemPopSint32( uint32_t A0, const SourceInfo &L) { |
23235 | if (!isActive()) return true; |
23236 | CurrentSource = L; |
23237 | return InitElemPop<PT_Sint32>(S, OpPC, A0); |
23238 | } |
23239 | bool EvalEmitter::emitInitElemPopUint32( uint32_t A0, const SourceInfo &L) { |
23240 | if (!isActive()) return true; |
23241 | CurrentSource = L; |
23242 | return InitElemPop<PT_Uint32>(S, OpPC, A0); |
23243 | } |
23244 | bool EvalEmitter::emitInitElemPopSint64( uint32_t A0, const SourceInfo &L) { |
23245 | if (!isActive()) return true; |
23246 | CurrentSource = L; |
23247 | return InitElemPop<PT_Sint64>(S, OpPC, A0); |
23248 | } |
23249 | bool EvalEmitter::emitInitElemPopUint64( uint32_t A0, const SourceInfo &L) { |
23250 | if (!isActive()) return true; |
23251 | CurrentSource = L; |
23252 | return InitElemPop<PT_Uint64>(S, OpPC, A0); |
23253 | } |
23254 | bool EvalEmitter::emitInitElemPopIntAP( uint32_t A0, const SourceInfo &L) { |
23255 | if (!isActive()) return true; |
23256 | CurrentSource = L; |
23257 | return InitElemPop<PT_IntAP>(S, OpPC, A0); |
23258 | } |
23259 | bool EvalEmitter::emitInitElemPopIntAPS( uint32_t A0, const SourceInfo &L) { |
23260 | if (!isActive()) return true; |
23261 | CurrentSource = L; |
23262 | return InitElemPop<PT_IntAPS>(S, OpPC, A0); |
23263 | } |
23264 | bool EvalEmitter::emitInitElemPopBool( uint32_t A0, const SourceInfo &L) { |
23265 | if (!isActive()) return true; |
23266 | CurrentSource = L; |
23267 | return InitElemPop<PT_Bool>(S, OpPC, A0); |
23268 | } |
23269 | bool EvalEmitter::emitInitElemPopFixedPoint( uint32_t A0, const SourceInfo &L) { |
23270 | if (!isActive()) return true; |
23271 | CurrentSource = L; |
23272 | return InitElemPop<PT_FixedPoint>(S, OpPC, A0); |
23273 | } |
23274 | bool EvalEmitter::emitInitElemPopPtr( uint32_t A0, const SourceInfo &L) { |
23275 | if (!isActive()) return true; |
23276 | CurrentSource = L; |
23277 | return InitElemPop<PT_Ptr>(S, OpPC, A0); |
23278 | } |
23279 | bool EvalEmitter::emitInitElemPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
23280 | if (!isActive()) return true; |
23281 | CurrentSource = L; |
23282 | return InitElemPop<PT_MemberPtr>(S, OpPC, A0); |
23283 | } |
23284 | bool EvalEmitter::emitInitElemPopFloat( uint32_t A0, const SourceInfo &L) { |
23285 | if (!isActive()) return true; |
23286 | CurrentSource = L; |
23287 | return InitElemPop<PT_Float>(S, OpPC, A0); |
23288 | } |
23289 | #endif |
23290 | #ifdef GET_OPCODE_NAMES |
23291 | OP_InitFieldSint8, |
23292 | OP_InitFieldUint8, |
23293 | OP_InitFieldSint16, |
23294 | OP_InitFieldUint16, |
23295 | OP_InitFieldSint32, |
23296 | OP_InitFieldUint32, |
23297 | OP_InitFieldSint64, |
23298 | OP_InitFieldUint64, |
23299 | OP_InitFieldIntAP, |
23300 | OP_InitFieldIntAPS, |
23301 | OP_InitFieldBool, |
23302 | OP_InitFieldFixedPoint, |
23303 | OP_InitFieldPtr, |
23304 | OP_InitFieldMemberPtr, |
23305 | OP_InitFieldFloat, |
23306 | #endif |
23307 | #ifdef GET_INTERP |
23308 | case OP_InitFieldSint8: { |
23309 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23310 | if (!InitField<PT_Sint8>(S, OpPC, V0)) |
23311 | return false; |
23312 | continue; |
23313 | } |
23314 | case OP_InitFieldUint8: { |
23315 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23316 | if (!InitField<PT_Uint8>(S, OpPC, V0)) |
23317 | return false; |
23318 | continue; |
23319 | } |
23320 | case OP_InitFieldSint16: { |
23321 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23322 | if (!InitField<PT_Sint16>(S, OpPC, V0)) |
23323 | return false; |
23324 | continue; |
23325 | } |
23326 | case OP_InitFieldUint16: { |
23327 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23328 | if (!InitField<PT_Uint16>(S, OpPC, V0)) |
23329 | return false; |
23330 | continue; |
23331 | } |
23332 | case OP_InitFieldSint32: { |
23333 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23334 | if (!InitField<PT_Sint32>(S, OpPC, V0)) |
23335 | return false; |
23336 | continue; |
23337 | } |
23338 | case OP_InitFieldUint32: { |
23339 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23340 | if (!InitField<PT_Uint32>(S, OpPC, V0)) |
23341 | return false; |
23342 | continue; |
23343 | } |
23344 | case OP_InitFieldSint64: { |
23345 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23346 | if (!InitField<PT_Sint64>(S, OpPC, V0)) |
23347 | return false; |
23348 | continue; |
23349 | } |
23350 | case OP_InitFieldUint64: { |
23351 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23352 | if (!InitField<PT_Uint64>(S, OpPC, V0)) |
23353 | return false; |
23354 | continue; |
23355 | } |
23356 | case OP_InitFieldIntAP: { |
23357 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23358 | if (!InitField<PT_IntAP>(S, OpPC, V0)) |
23359 | return false; |
23360 | continue; |
23361 | } |
23362 | case OP_InitFieldIntAPS: { |
23363 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23364 | if (!InitField<PT_IntAPS>(S, OpPC, V0)) |
23365 | return false; |
23366 | continue; |
23367 | } |
23368 | case OP_InitFieldBool: { |
23369 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23370 | if (!InitField<PT_Bool>(S, OpPC, V0)) |
23371 | return false; |
23372 | continue; |
23373 | } |
23374 | case OP_InitFieldFixedPoint: { |
23375 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23376 | if (!InitField<PT_FixedPoint>(S, OpPC, V0)) |
23377 | return false; |
23378 | continue; |
23379 | } |
23380 | case OP_InitFieldPtr: { |
23381 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23382 | if (!InitField<PT_Ptr>(S, OpPC, V0)) |
23383 | return false; |
23384 | continue; |
23385 | } |
23386 | case OP_InitFieldMemberPtr: { |
23387 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23388 | if (!InitField<PT_MemberPtr>(S, OpPC, V0)) |
23389 | return false; |
23390 | continue; |
23391 | } |
23392 | case OP_InitFieldFloat: { |
23393 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23394 | if (!InitField<PT_Float>(S, OpPC, V0)) |
23395 | return false; |
23396 | continue; |
23397 | } |
23398 | #endif |
23399 | #ifdef GET_DISASM |
23400 | case OP_InitFieldSint8: |
23401 | Text.Op = PrintName("InitFieldSint8" ); |
23402 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23403 | break; |
23404 | case OP_InitFieldUint8: |
23405 | Text.Op = PrintName("InitFieldUint8" ); |
23406 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23407 | break; |
23408 | case OP_InitFieldSint16: |
23409 | Text.Op = PrintName("InitFieldSint16" ); |
23410 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23411 | break; |
23412 | case OP_InitFieldUint16: |
23413 | Text.Op = PrintName("InitFieldUint16" ); |
23414 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23415 | break; |
23416 | case OP_InitFieldSint32: |
23417 | Text.Op = PrintName("InitFieldSint32" ); |
23418 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23419 | break; |
23420 | case OP_InitFieldUint32: |
23421 | Text.Op = PrintName("InitFieldUint32" ); |
23422 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23423 | break; |
23424 | case OP_InitFieldSint64: |
23425 | Text.Op = PrintName("InitFieldSint64" ); |
23426 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23427 | break; |
23428 | case OP_InitFieldUint64: |
23429 | Text.Op = PrintName("InitFieldUint64" ); |
23430 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23431 | break; |
23432 | case OP_InitFieldIntAP: |
23433 | Text.Op = PrintName("InitFieldIntAP" ); |
23434 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23435 | break; |
23436 | case OP_InitFieldIntAPS: |
23437 | Text.Op = PrintName("InitFieldIntAPS" ); |
23438 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23439 | break; |
23440 | case OP_InitFieldBool: |
23441 | Text.Op = PrintName("InitFieldBool" ); |
23442 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23443 | break; |
23444 | case OP_InitFieldFixedPoint: |
23445 | Text.Op = PrintName("InitFieldFixedPoint" ); |
23446 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23447 | break; |
23448 | case OP_InitFieldPtr: |
23449 | Text.Op = PrintName("InitFieldPtr" ); |
23450 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23451 | break; |
23452 | case OP_InitFieldMemberPtr: |
23453 | Text.Op = PrintName("InitFieldMemberPtr" ); |
23454 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23455 | break; |
23456 | case OP_InitFieldFloat: |
23457 | Text.Op = PrintName("InitFieldFloat" ); |
23458 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23459 | break; |
23460 | #endif |
23461 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23462 | bool emitInitFieldSint8( uint32_t , const SourceInfo &); |
23463 | bool emitInitFieldUint8( uint32_t , const SourceInfo &); |
23464 | bool emitInitFieldSint16( uint32_t , const SourceInfo &); |
23465 | bool emitInitFieldUint16( uint32_t , const SourceInfo &); |
23466 | bool emitInitFieldSint32( uint32_t , const SourceInfo &); |
23467 | bool emitInitFieldUint32( uint32_t , const SourceInfo &); |
23468 | bool emitInitFieldSint64( uint32_t , const SourceInfo &); |
23469 | bool emitInitFieldUint64( uint32_t , const SourceInfo &); |
23470 | bool emitInitFieldIntAP( uint32_t , const SourceInfo &); |
23471 | bool emitInitFieldIntAPS( uint32_t , const SourceInfo &); |
23472 | bool emitInitFieldBool( uint32_t , const SourceInfo &); |
23473 | bool emitInitFieldFixedPoint( uint32_t , const SourceInfo &); |
23474 | bool emitInitFieldPtr( uint32_t , const SourceInfo &); |
23475 | bool emitInitFieldMemberPtr( uint32_t , const SourceInfo &); |
23476 | bool emitInitFieldFloat( uint32_t , const SourceInfo &); |
23477 | #endif |
23478 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23479 | [[nodiscard]] bool emitInitField(PrimType, uint32_t, const SourceInfo &I); |
23480 | #endif |
23481 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
23482 | bool |
23483 | #if defined(GET_EVAL_IMPL) |
23484 | EvalEmitter |
23485 | #else |
23486 | ByteCodeEmitter |
23487 | #endif |
23488 | ::emitInitField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
23489 | switch (T0) { |
23490 | case PT_Sint8: |
23491 | return emitInitFieldSint8(A0, I); |
23492 | case PT_Uint8: |
23493 | return emitInitFieldUint8(A0, I); |
23494 | case PT_Sint16: |
23495 | return emitInitFieldSint16(A0, I); |
23496 | case PT_Uint16: |
23497 | return emitInitFieldUint16(A0, I); |
23498 | case PT_Sint32: |
23499 | return emitInitFieldSint32(A0, I); |
23500 | case PT_Uint32: |
23501 | return emitInitFieldUint32(A0, I); |
23502 | case PT_Sint64: |
23503 | return emitInitFieldSint64(A0, I); |
23504 | case PT_Uint64: |
23505 | return emitInitFieldUint64(A0, I); |
23506 | case PT_IntAP: |
23507 | return emitInitFieldIntAP(A0, I); |
23508 | case PT_IntAPS: |
23509 | return emitInitFieldIntAPS(A0, I); |
23510 | case PT_Bool: |
23511 | return emitInitFieldBool(A0, I); |
23512 | case PT_FixedPoint: |
23513 | return emitInitFieldFixedPoint(A0, I); |
23514 | case PT_Ptr: |
23515 | return emitInitFieldPtr(A0, I); |
23516 | case PT_MemberPtr: |
23517 | return emitInitFieldMemberPtr(A0, I); |
23518 | case PT_Float: |
23519 | return emitInitFieldFloat(A0, I); |
23520 | } |
23521 | llvm_unreachable("invalid enum value" ); |
23522 | } |
23523 | #endif |
23524 | #ifdef GET_LINK_IMPL |
23525 | bool ByteCodeEmitter::emitInitFieldSint8( uint32_t A0, const SourceInfo &L) { |
23526 | return emitOp<uint32_t>(OP_InitFieldSint8, A0, L); |
23527 | } |
23528 | bool ByteCodeEmitter::emitInitFieldUint8( uint32_t A0, const SourceInfo &L) { |
23529 | return emitOp<uint32_t>(OP_InitFieldUint8, A0, L); |
23530 | } |
23531 | bool ByteCodeEmitter::emitInitFieldSint16( uint32_t A0, const SourceInfo &L) { |
23532 | return emitOp<uint32_t>(OP_InitFieldSint16, A0, L); |
23533 | } |
23534 | bool ByteCodeEmitter::emitInitFieldUint16( uint32_t A0, const SourceInfo &L) { |
23535 | return emitOp<uint32_t>(OP_InitFieldUint16, A0, L); |
23536 | } |
23537 | bool ByteCodeEmitter::emitInitFieldSint32( uint32_t A0, const SourceInfo &L) { |
23538 | return emitOp<uint32_t>(OP_InitFieldSint32, A0, L); |
23539 | } |
23540 | bool ByteCodeEmitter::emitInitFieldUint32( uint32_t A0, const SourceInfo &L) { |
23541 | return emitOp<uint32_t>(OP_InitFieldUint32, A0, L); |
23542 | } |
23543 | bool ByteCodeEmitter::emitInitFieldSint64( uint32_t A0, const SourceInfo &L) { |
23544 | return emitOp<uint32_t>(OP_InitFieldSint64, A0, L); |
23545 | } |
23546 | bool ByteCodeEmitter::emitInitFieldUint64( uint32_t A0, const SourceInfo &L) { |
23547 | return emitOp<uint32_t>(OP_InitFieldUint64, A0, L); |
23548 | } |
23549 | bool ByteCodeEmitter::emitInitFieldIntAP( uint32_t A0, const SourceInfo &L) { |
23550 | return emitOp<uint32_t>(OP_InitFieldIntAP, A0, L); |
23551 | } |
23552 | bool ByteCodeEmitter::emitInitFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
23553 | return emitOp<uint32_t>(OP_InitFieldIntAPS, A0, L); |
23554 | } |
23555 | bool ByteCodeEmitter::emitInitFieldBool( uint32_t A0, const SourceInfo &L) { |
23556 | return emitOp<uint32_t>(OP_InitFieldBool, A0, L); |
23557 | } |
23558 | bool ByteCodeEmitter::emitInitFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
23559 | return emitOp<uint32_t>(OP_InitFieldFixedPoint, A0, L); |
23560 | } |
23561 | bool ByteCodeEmitter::emitInitFieldPtr( uint32_t A0, const SourceInfo &L) { |
23562 | return emitOp<uint32_t>(OP_InitFieldPtr, A0, L); |
23563 | } |
23564 | bool ByteCodeEmitter::emitInitFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
23565 | return emitOp<uint32_t>(OP_InitFieldMemberPtr, A0, L); |
23566 | } |
23567 | bool ByteCodeEmitter::emitInitFieldFloat( uint32_t A0, const SourceInfo &L) { |
23568 | return emitOp<uint32_t>(OP_InitFieldFloat, A0, L); |
23569 | } |
23570 | #endif |
23571 | #ifdef GET_EVAL_IMPL |
23572 | bool EvalEmitter::emitInitFieldSint8( uint32_t A0, const SourceInfo &L) { |
23573 | if (!isActive()) return true; |
23574 | CurrentSource = L; |
23575 | return InitField<PT_Sint8>(S, OpPC, A0); |
23576 | } |
23577 | bool EvalEmitter::emitInitFieldUint8( uint32_t A0, const SourceInfo &L) { |
23578 | if (!isActive()) return true; |
23579 | CurrentSource = L; |
23580 | return InitField<PT_Uint8>(S, OpPC, A0); |
23581 | } |
23582 | bool EvalEmitter::emitInitFieldSint16( uint32_t A0, const SourceInfo &L) { |
23583 | if (!isActive()) return true; |
23584 | CurrentSource = L; |
23585 | return InitField<PT_Sint16>(S, OpPC, A0); |
23586 | } |
23587 | bool EvalEmitter::emitInitFieldUint16( uint32_t A0, const SourceInfo &L) { |
23588 | if (!isActive()) return true; |
23589 | CurrentSource = L; |
23590 | return InitField<PT_Uint16>(S, OpPC, A0); |
23591 | } |
23592 | bool EvalEmitter::emitInitFieldSint32( uint32_t A0, const SourceInfo &L) { |
23593 | if (!isActive()) return true; |
23594 | CurrentSource = L; |
23595 | return InitField<PT_Sint32>(S, OpPC, A0); |
23596 | } |
23597 | bool EvalEmitter::emitInitFieldUint32( uint32_t A0, const SourceInfo &L) { |
23598 | if (!isActive()) return true; |
23599 | CurrentSource = L; |
23600 | return InitField<PT_Uint32>(S, OpPC, A0); |
23601 | } |
23602 | bool EvalEmitter::emitInitFieldSint64( uint32_t A0, const SourceInfo &L) { |
23603 | if (!isActive()) return true; |
23604 | CurrentSource = L; |
23605 | return InitField<PT_Sint64>(S, OpPC, A0); |
23606 | } |
23607 | bool EvalEmitter::emitInitFieldUint64( uint32_t A0, const SourceInfo &L) { |
23608 | if (!isActive()) return true; |
23609 | CurrentSource = L; |
23610 | return InitField<PT_Uint64>(S, OpPC, A0); |
23611 | } |
23612 | bool EvalEmitter::emitInitFieldIntAP( uint32_t A0, const SourceInfo &L) { |
23613 | if (!isActive()) return true; |
23614 | CurrentSource = L; |
23615 | return InitField<PT_IntAP>(S, OpPC, A0); |
23616 | } |
23617 | bool EvalEmitter::emitInitFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
23618 | if (!isActive()) return true; |
23619 | CurrentSource = L; |
23620 | return InitField<PT_IntAPS>(S, OpPC, A0); |
23621 | } |
23622 | bool EvalEmitter::emitInitFieldBool( uint32_t A0, const SourceInfo &L) { |
23623 | if (!isActive()) return true; |
23624 | CurrentSource = L; |
23625 | return InitField<PT_Bool>(S, OpPC, A0); |
23626 | } |
23627 | bool EvalEmitter::emitInitFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
23628 | if (!isActive()) return true; |
23629 | CurrentSource = L; |
23630 | return InitField<PT_FixedPoint>(S, OpPC, A0); |
23631 | } |
23632 | bool EvalEmitter::emitInitFieldPtr( uint32_t A0, const SourceInfo &L) { |
23633 | if (!isActive()) return true; |
23634 | CurrentSource = L; |
23635 | return InitField<PT_Ptr>(S, OpPC, A0); |
23636 | } |
23637 | bool EvalEmitter::emitInitFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
23638 | if (!isActive()) return true; |
23639 | CurrentSource = L; |
23640 | return InitField<PT_MemberPtr>(S, OpPC, A0); |
23641 | } |
23642 | bool EvalEmitter::emitInitFieldFloat( uint32_t A0, const SourceInfo &L) { |
23643 | if (!isActive()) return true; |
23644 | CurrentSource = L; |
23645 | return InitField<PT_Float>(S, OpPC, A0); |
23646 | } |
23647 | #endif |
23648 | #ifdef GET_OPCODE_NAMES |
23649 | OP_InitGlobalSint8, |
23650 | OP_InitGlobalUint8, |
23651 | OP_InitGlobalSint16, |
23652 | OP_InitGlobalUint16, |
23653 | OP_InitGlobalSint32, |
23654 | OP_InitGlobalUint32, |
23655 | OP_InitGlobalSint64, |
23656 | OP_InitGlobalUint64, |
23657 | OP_InitGlobalIntAP, |
23658 | OP_InitGlobalIntAPS, |
23659 | OP_InitGlobalBool, |
23660 | OP_InitGlobalFixedPoint, |
23661 | OP_InitGlobalPtr, |
23662 | OP_InitGlobalMemberPtr, |
23663 | OP_InitGlobalFloat, |
23664 | #endif |
23665 | #ifdef GET_INTERP |
23666 | case OP_InitGlobalSint8: { |
23667 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23668 | if (!InitGlobal<PT_Sint8>(S, OpPC, V0)) |
23669 | return false; |
23670 | continue; |
23671 | } |
23672 | case OP_InitGlobalUint8: { |
23673 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23674 | if (!InitGlobal<PT_Uint8>(S, OpPC, V0)) |
23675 | return false; |
23676 | continue; |
23677 | } |
23678 | case OP_InitGlobalSint16: { |
23679 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23680 | if (!InitGlobal<PT_Sint16>(S, OpPC, V0)) |
23681 | return false; |
23682 | continue; |
23683 | } |
23684 | case OP_InitGlobalUint16: { |
23685 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23686 | if (!InitGlobal<PT_Uint16>(S, OpPC, V0)) |
23687 | return false; |
23688 | continue; |
23689 | } |
23690 | case OP_InitGlobalSint32: { |
23691 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23692 | if (!InitGlobal<PT_Sint32>(S, OpPC, V0)) |
23693 | return false; |
23694 | continue; |
23695 | } |
23696 | case OP_InitGlobalUint32: { |
23697 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23698 | if (!InitGlobal<PT_Uint32>(S, OpPC, V0)) |
23699 | return false; |
23700 | continue; |
23701 | } |
23702 | case OP_InitGlobalSint64: { |
23703 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23704 | if (!InitGlobal<PT_Sint64>(S, OpPC, V0)) |
23705 | return false; |
23706 | continue; |
23707 | } |
23708 | case OP_InitGlobalUint64: { |
23709 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23710 | if (!InitGlobal<PT_Uint64>(S, OpPC, V0)) |
23711 | return false; |
23712 | continue; |
23713 | } |
23714 | case OP_InitGlobalIntAP: { |
23715 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23716 | if (!InitGlobal<PT_IntAP>(S, OpPC, V0)) |
23717 | return false; |
23718 | continue; |
23719 | } |
23720 | case OP_InitGlobalIntAPS: { |
23721 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23722 | if (!InitGlobal<PT_IntAPS>(S, OpPC, V0)) |
23723 | return false; |
23724 | continue; |
23725 | } |
23726 | case OP_InitGlobalBool: { |
23727 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23728 | if (!InitGlobal<PT_Bool>(S, OpPC, V0)) |
23729 | return false; |
23730 | continue; |
23731 | } |
23732 | case OP_InitGlobalFixedPoint: { |
23733 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23734 | if (!InitGlobal<PT_FixedPoint>(S, OpPC, V0)) |
23735 | return false; |
23736 | continue; |
23737 | } |
23738 | case OP_InitGlobalPtr: { |
23739 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23740 | if (!InitGlobal<PT_Ptr>(S, OpPC, V0)) |
23741 | return false; |
23742 | continue; |
23743 | } |
23744 | case OP_InitGlobalMemberPtr: { |
23745 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23746 | if (!InitGlobal<PT_MemberPtr>(S, OpPC, V0)) |
23747 | return false; |
23748 | continue; |
23749 | } |
23750 | case OP_InitGlobalFloat: { |
23751 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23752 | if (!InitGlobal<PT_Float>(S, OpPC, V0)) |
23753 | return false; |
23754 | continue; |
23755 | } |
23756 | #endif |
23757 | #ifdef GET_DISASM |
23758 | case OP_InitGlobalSint8: |
23759 | Text.Op = PrintName("InitGlobalSint8" ); |
23760 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23761 | break; |
23762 | case OP_InitGlobalUint8: |
23763 | Text.Op = PrintName("InitGlobalUint8" ); |
23764 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23765 | break; |
23766 | case OP_InitGlobalSint16: |
23767 | Text.Op = PrintName("InitGlobalSint16" ); |
23768 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23769 | break; |
23770 | case OP_InitGlobalUint16: |
23771 | Text.Op = PrintName("InitGlobalUint16" ); |
23772 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23773 | break; |
23774 | case OP_InitGlobalSint32: |
23775 | Text.Op = PrintName("InitGlobalSint32" ); |
23776 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23777 | break; |
23778 | case OP_InitGlobalUint32: |
23779 | Text.Op = PrintName("InitGlobalUint32" ); |
23780 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23781 | break; |
23782 | case OP_InitGlobalSint64: |
23783 | Text.Op = PrintName("InitGlobalSint64" ); |
23784 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23785 | break; |
23786 | case OP_InitGlobalUint64: |
23787 | Text.Op = PrintName("InitGlobalUint64" ); |
23788 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23789 | break; |
23790 | case OP_InitGlobalIntAP: |
23791 | Text.Op = PrintName("InitGlobalIntAP" ); |
23792 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23793 | break; |
23794 | case OP_InitGlobalIntAPS: |
23795 | Text.Op = PrintName("InitGlobalIntAPS" ); |
23796 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23797 | break; |
23798 | case OP_InitGlobalBool: |
23799 | Text.Op = PrintName("InitGlobalBool" ); |
23800 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23801 | break; |
23802 | case OP_InitGlobalFixedPoint: |
23803 | Text.Op = PrintName("InitGlobalFixedPoint" ); |
23804 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23805 | break; |
23806 | case OP_InitGlobalPtr: |
23807 | Text.Op = PrintName("InitGlobalPtr" ); |
23808 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23809 | break; |
23810 | case OP_InitGlobalMemberPtr: |
23811 | Text.Op = PrintName("InitGlobalMemberPtr" ); |
23812 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23813 | break; |
23814 | case OP_InitGlobalFloat: |
23815 | Text.Op = PrintName("InitGlobalFloat" ); |
23816 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
23817 | break; |
23818 | #endif |
23819 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23820 | bool emitInitGlobalSint8( uint32_t , const SourceInfo &); |
23821 | bool emitInitGlobalUint8( uint32_t , const SourceInfo &); |
23822 | bool emitInitGlobalSint16( uint32_t , const SourceInfo &); |
23823 | bool emitInitGlobalUint16( uint32_t , const SourceInfo &); |
23824 | bool emitInitGlobalSint32( uint32_t , const SourceInfo &); |
23825 | bool emitInitGlobalUint32( uint32_t , const SourceInfo &); |
23826 | bool emitInitGlobalSint64( uint32_t , const SourceInfo &); |
23827 | bool emitInitGlobalUint64( uint32_t , const SourceInfo &); |
23828 | bool emitInitGlobalIntAP( uint32_t , const SourceInfo &); |
23829 | bool emitInitGlobalIntAPS( uint32_t , const SourceInfo &); |
23830 | bool emitInitGlobalBool( uint32_t , const SourceInfo &); |
23831 | bool emitInitGlobalFixedPoint( uint32_t , const SourceInfo &); |
23832 | bool emitInitGlobalPtr( uint32_t , const SourceInfo &); |
23833 | bool emitInitGlobalMemberPtr( uint32_t , const SourceInfo &); |
23834 | bool emitInitGlobalFloat( uint32_t , const SourceInfo &); |
23835 | #endif |
23836 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23837 | [[nodiscard]] bool emitInitGlobal(PrimType, uint32_t, const SourceInfo &I); |
23838 | #endif |
23839 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
23840 | bool |
23841 | #if defined(GET_EVAL_IMPL) |
23842 | EvalEmitter |
23843 | #else |
23844 | ByteCodeEmitter |
23845 | #endif |
23846 | ::emitInitGlobal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
23847 | switch (T0) { |
23848 | case PT_Sint8: |
23849 | return emitInitGlobalSint8(A0, I); |
23850 | case PT_Uint8: |
23851 | return emitInitGlobalUint8(A0, I); |
23852 | case PT_Sint16: |
23853 | return emitInitGlobalSint16(A0, I); |
23854 | case PT_Uint16: |
23855 | return emitInitGlobalUint16(A0, I); |
23856 | case PT_Sint32: |
23857 | return emitInitGlobalSint32(A0, I); |
23858 | case PT_Uint32: |
23859 | return emitInitGlobalUint32(A0, I); |
23860 | case PT_Sint64: |
23861 | return emitInitGlobalSint64(A0, I); |
23862 | case PT_Uint64: |
23863 | return emitInitGlobalUint64(A0, I); |
23864 | case PT_IntAP: |
23865 | return emitInitGlobalIntAP(A0, I); |
23866 | case PT_IntAPS: |
23867 | return emitInitGlobalIntAPS(A0, I); |
23868 | case PT_Bool: |
23869 | return emitInitGlobalBool(A0, I); |
23870 | case PT_FixedPoint: |
23871 | return emitInitGlobalFixedPoint(A0, I); |
23872 | case PT_Ptr: |
23873 | return emitInitGlobalPtr(A0, I); |
23874 | case PT_MemberPtr: |
23875 | return emitInitGlobalMemberPtr(A0, I); |
23876 | case PT_Float: |
23877 | return emitInitGlobalFloat(A0, I); |
23878 | } |
23879 | llvm_unreachable("invalid enum value" ); |
23880 | } |
23881 | #endif |
23882 | #ifdef GET_LINK_IMPL |
23883 | bool ByteCodeEmitter::emitInitGlobalSint8( uint32_t A0, const SourceInfo &L) { |
23884 | return emitOp<uint32_t>(OP_InitGlobalSint8, A0, L); |
23885 | } |
23886 | bool ByteCodeEmitter::emitInitGlobalUint8( uint32_t A0, const SourceInfo &L) { |
23887 | return emitOp<uint32_t>(OP_InitGlobalUint8, A0, L); |
23888 | } |
23889 | bool ByteCodeEmitter::emitInitGlobalSint16( uint32_t A0, const SourceInfo &L) { |
23890 | return emitOp<uint32_t>(OP_InitGlobalSint16, A0, L); |
23891 | } |
23892 | bool ByteCodeEmitter::emitInitGlobalUint16( uint32_t A0, const SourceInfo &L) { |
23893 | return emitOp<uint32_t>(OP_InitGlobalUint16, A0, L); |
23894 | } |
23895 | bool ByteCodeEmitter::emitInitGlobalSint32( uint32_t A0, const SourceInfo &L) { |
23896 | return emitOp<uint32_t>(OP_InitGlobalSint32, A0, L); |
23897 | } |
23898 | bool ByteCodeEmitter::emitInitGlobalUint32( uint32_t A0, const SourceInfo &L) { |
23899 | return emitOp<uint32_t>(OP_InitGlobalUint32, A0, L); |
23900 | } |
23901 | bool ByteCodeEmitter::emitInitGlobalSint64( uint32_t A0, const SourceInfo &L) { |
23902 | return emitOp<uint32_t>(OP_InitGlobalSint64, A0, L); |
23903 | } |
23904 | bool ByteCodeEmitter::emitInitGlobalUint64( uint32_t A0, const SourceInfo &L) { |
23905 | return emitOp<uint32_t>(OP_InitGlobalUint64, A0, L); |
23906 | } |
23907 | bool ByteCodeEmitter::emitInitGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
23908 | return emitOp<uint32_t>(OP_InitGlobalIntAP, A0, L); |
23909 | } |
23910 | bool ByteCodeEmitter::emitInitGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
23911 | return emitOp<uint32_t>(OP_InitGlobalIntAPS, A0, L); |
23912 | } |
23913 | bool ByteCodeEmitter::emitInitGlobalBool( uint32_t A0, const SourceInfo &L) { |
23914 | return emitOp<uint32_t>(OP_InitGlobalBool, A0, L); |
23915 | } |
23916 | bool ByteCodeEmitter::emitInitGlobalFixedPoint( uint32_t A0, const SourceInfo &L) { |
23917 | return emitOp<uint32_t>(OP_InitGlobalFixedPoint, A0, L); |
23918 | } |
23919 | bool ByteCodeEmitter::emitInitGlobalPtr( uint32_t A0, const SourceInfo &L) { |
23920 | return emitOp<uint32_t>(OP_InitGlobalPtr, A0, L); |
23921 | } |
23922 | bool ByteCodeEmitter::emitInitGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
23923 | return emitOp<uint32_t>(OP_InitGlobalMemberPtr, A0, L); |
23924 | } |
23925 | bool ByteCodeEmitter::emitInitGlobalFloat( uint32_t A0, const SourceInfo &L) { |
23926 | return emitOp<uint32_t>(OP_InitGlobalFloat, A0, L); |
23927 | } |
23928 | #endif |
23929 | #ifdef GET_EVAL_IMPL |
23930 | bool EvalEmitter::emitInitGlobalSint8( uint32_t A0, const SourceInfo &L) { |
23931 | if (!isActive()) return true; |
23932 | CurrentSource = L; |
23933 | return InitGlobal<PT_Sint8>(S, OpPC, A0); |
23934 | } |
23935 | bool EvalEmitter::emitInitGlobalUint8( uint32_t A0, const SourceInfo &L) { |
23936 | if (!isActive()) return true; |
23937 | CurrentSource = L; |
23938 | return InitGlobal<PT_Uint8>(S, OpPC, A0); |
23939 | } |
23940 | bool EvalEmitter::emitInitGlobalSint16( uint32_t A0, const SourceInfo &L) { |
23941 | if (!isActive()) return true; |
23942 | CurrentSource = L; |
23943 | return InitGlobal<PT_Sint16>(S, OpPC, A0); |
23944 | } |
23945 | bool EvalEmitter::emitInitGlobalUint16( uint32_t A0, const SourceInfo &L) { |
23946 | if (!isActive()) return true; |
23947 | CurrentSource = L; |
23948 | return InitGlobal<PT_Uint16>(S, OpPC, A0); |
23949 | } |
23950 | bool EvalEmitter::emitInitGlobalSint32( uint32_t A0, const SourceInfo &L) { |
23951 | if (!isActive()) return true; |
23952 | CurrentSource = L; |
23953 | return InitGlobal<PT_Sint32>(S, OpPC, A0); |
23954 | } |
23955 | bool EvalEmitter::emitInitGlobalUint32( uint32_t A0, const SourceInfo &L) { |
23956 | if (!isActive()) return true; |
23957 | CurrentSource = L; |
23958 | return InitGlobal<PT_Uint32>(S, OpPC, A0); |
23959 | } |
23960 | bool EvalEmitter::emitInitGlobalSint64( uint32_t A0, const SourceInfo &L) { |
23961 | if (!isActive()) return true; |
23962 | CurrentSource = L; |
23963 | return InitGlobal<PT_Sint64>(S, OpPC, A0); |
23964 | } |
23965 | bool EvalEmitter::emitInitGlobalUint64( uint32_t A0, const SourceInfo &L) { |
23966 | if (!isActive()) return true; |
23967 | CurrentSource = L; |
23968 | return InitGlobal<PT_Uint64>(S, OpPC, A0); |
23969 | } |
23970 | bool EvalEmitter::emitInitGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
23971 | if (!isActive()) return true; |
23972 | CurrentSource = L; |
23973 | return InitGlobal<PT_IntAP>(S, OpPC, A0); |
23974 | } |
23975 | bool EvalEmitter::emitInitGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
23976 | if (!isActive()) return true; |
23977 | CurrentSource = L; |
23978 | return InitGlobal<PT_IntAPS>(S, OpPC, A0); |
23979 | } |
23980 | bool EvalEmitter::emitInitGlobalBool( uint32_t A0, const SourceInfo &L) { |
23981 | if (!isActive()) return true; |
23982 | CurrentSource = L; |
23983 | return InitGlobal<PT_Bool>(S, OpPC, A0); |
23984 | } |
23985 | bool EvalEmitter::emitInitGlobalFixedPoint( uint32_t A0, const SourceInfo &L) { |
23986 | if (!isActive()) return true; |
23987 | CurrentSource = L; |
23988 | return InitGlobal<PT_FixedPoint>(S, OpPC, A0); |
23989 | } |
23990 | bool EvalEmitter::emitInitGlobalPtr( uint32_t A0, const SourceInfo &L) { |
23991 | if (!isActive()) return true; |
23992 | CurrentSource = L; |
23993 | return InitGlobal<PT_Ptr>(S, OpPC, A0); |
23994 | } |
23995 | bool EvalEmitter::emitInitGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
23996 | if (!isActive()) return true; |
23997 | CurrentSource = L; |
23998 | return InitGlobal<PT_MemberPtr>(S, OpPC, A0); |
23999 | } |
24000 | bool EvalEmitter::emitInitGlobalFloat( uint32_t A0, const SourceInfo &L) { |
24001 | if (!isActive()) return true; |
24002 | CurrentSource = L; |
24003 | return InitGlobal<PT_Float>(S, OpPC, A0); |
24004 | } |
24005 | #endif |
24006 | #ifdef GET_OPCODE_NAMES |
24007 | OP_InitGlobalTempSint8, |
24008 | OP_InitGlobalTempUint8, |
24009 | OP_InitGlobalTempSint16, |
24010 | OP_InitGlobalTempUint16, |
24011 | OP_InitGlobalTempSint32, |
24012 | OP_InitGlobalTempUint32, |
24013 | OP_InitGlobalTempSint64, |
24014 | OP_InitGlobalTempUint64, |
24015 | OP_InitGlobalTempIntAP, |
24016 | OP_InitGlobalTempIntAPS, |
24017 | OP_InitGlobalTempBool, |
24018 | OP_InitGlobalTempFixedPoint, |
24019 | OP_InitGlobalTempPtr, |
24020 | OP_InitGlobalTempMemberPtr, |
24021 | OP_InitGlobalTempFloat, |
24022 | #endif |
24023 | #ifdef GET_INTERP |
24024 | case OP_InitGlobalTempSint8: { |
24025 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24026 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24027 | if (!InitGlobalTemp<PT_Sint8>(S, OpPC, V0, V1)) |
24028 | return false; |
24029 | continue; |
24030 | } |
24031 | case OP_InitGlobalTempUint8: { |
24032 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24033 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24034 | if (!InitGlobalTemp<PT_Uint8>(S, OpPC, V0, V1)) |
24035 | return false; |
24036 | continue; |
24037 | } |
24038 | case OP_InitGlobalTempSint16: { |
24039 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24040 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24041 | if (!InitGlobalTemp<PT_Sint16>(S, OpPC, V0, V1)) |
24042 | return false; |
24043 | continue; |
24044 | } |
24045 | case OP_InitGlobalTempUint16: { |
24046 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24047 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24048 | if (!InitGlobalTemp<PT_Uint16>(S, OpPC, V0, V1)) |
24049 | return false; |
24050 | continue; |
24051 | } |
24052 | case OP_InitGlobalTempSint32: { |
24053 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24054 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24055 | if (!InitGlobalTemp<PT_Sint32>(S, OpPC, V0, V1)) |
24056 | return false; |
24057 | continue; |
24058 | } |
24059 | case OP_InitGlobalTempUint32: { |
24060 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24061 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24062 | if (!InitGlobalTemp<PT_Uint32>(S, OpPC, V0, V1)) |
24063 | return false; |
24064 | continue; |
24065 | } |
24066 | case OP_InitGlobalTempSint64: { |
24067 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24068 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24069 | if (!InitGlobalTemp<PT_Sint64>(S, OpPC, V0, V1)) |
24070 | return false; |
24071 | continue; |
24072 | } |
24073 | case OP_InitGlobalTempUint64: { |
24074 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24075 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24076 | if (!InitGlobalTemp<PT_Uint64>(S, OpPC, V0, V1)) |
24077 | return false; |
24078 | continue; |
24079 | } |
24080 | case OP_InitGlobalTempIntAP: { |
24081 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24082 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24083 | if (!InitGlobalTemp<PT_IntAP>(S, OpPC, V0, V1)) |
24084 | return false; |
24085 | continue; |
24086 | } |
24087 | case OP_InitGlobalTempIntAPS: { |
24088 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24089 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24090 | if (!InitGlobalTemp<PT_IntAPS>(S, OpPC, V0, V1)) |
24091 | return false; |
24092 | continue; |
24093 | } |
24094 | case OP_InitGlobalTempBool: { |
24095 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24096 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24097 | if (!InitGlobalTemp<PT_Bool>(S, OpPC, V0, V1)) |
24098 | return false; |
24099 | continue; |
24100 | } |
24101 | case OP_InitGlobalTempFixedPoint: { |
24102 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24103 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24104 | if (!InitGlobalTemp<PT_FixedPoint>(S, OpPC, V0, V1)) |
24105 | return false; |
24106 | continue; |
24107 | } |
24108 | case OP_InitGlobalTempPtr: { |
24109 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24110 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24111 | if (!InitGlobalTemp<PT_Ptr>(S, OpPC, V0, V1)) |
24112 | return false; |
24113 | continue; |
24114 | } |
24115 | case OP_InitGlobalTempMemberPtr: { |
24116 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24117 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24118 | if (!InitGlobalTemp<PT_MemberPtr>(S, OpPC, V0, V1)) |
24119 | return false; |
24120 | continue; |
24121 | } |
24122 | case OP_InitGlobalTempFloat: { |
24123 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24124 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24125 | if (!InitGlobalTemp<PT_Float>(S, OpPC, V0, V1)) |
24126 | return false; |
24127 | continue; |
24128 | } |
24129 | #endif |
24130 | #ifdef GET_DISASM |
24131 | case OP_InitGlobalTempSint8: |
24132 | Text.Op = PrintName("InitGlobalTempSint8" ); |
24133 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24134 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24135 | break; |
24136 | case OP_InitGlobalTempUint8: |
24137 | Text.Op = PrintName("InitGlobalTempUint8" ); |
24138 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24139 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24140 | break; |
24141 | case OP_InitGlobalTempSint16: |
24142 | Text.Op = PrintName("InitGlobalTempSint16" ); |
24143 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24144 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24145 | break; |
24146 | case OP_InitGlobalTempUint16: |
24147 | Text.Op = PrintName("InitGlobalTempUint16" ); |
24148 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24149 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24150 | break; |
24151 | case OP_InitGlobalTempSint32: |
24152 | Text.Op = PrintName("InitGlobalTempSint32" ); |
24153 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24154 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24155 | break; |
24156 | case OP_InitGlobalTempUint32: |
24157 | Text.Op = PrintName("InitGlobalTempUint32" ); |
24158 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24159 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24160 | break; |
24161 | case OP_InitGlobalTempSint64: |
24162 | Text.Op = PrintName("InitGlobalTempSint64" ); |
24163 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24164 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24165 | break; |
24166 | case OP_InitGlobalTempUint64: |
24167 | Text.Op = PrintName("InitGlobalTempUint64" ); |
24168 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24169 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24170 | break; |
24171 | case OP_InitGlobalTempIntAP: |
24172 | Text.Op = PrintName("InitGlobalTempIntAP" ); |
24173 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24174 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24175 | break; |
24176 | case OP_InitGlobalTempIntAPS: |
24177 | Text.Op = PrintName("InitGlobalTempIntAPS" ); |
24178 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24179 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24180 | break; |
24181 | case OP_InitGlobalTempBool: |
24182 | Text.Op = PrintName("InitGlobalTempBool" ); |
24183 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24184 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24185 | break; |
24186 | case OP_InitGlobalTempFixedPoint: |
24187 | Text.Op = PrintName("InitGlobalTempFixedPoint" ); |
24188 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24189 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24190 | break; |
24191 | case OP_InitGlobalTempPtr: |
24192 | Text.Op = PrintName("InitGlobalTempPtr" ); |
24193 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24194 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24195 | break; |
24196 | case OP_InitGlobalTempMemberPtr: |
24197 | Text.Op = PrintName("InitGlobalTempMemberPtr" ); |
24198 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24199 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24200 | break; |
24201 | case OP_InitGlobalTempFloat: |
24202 | Text.Op = PrintName("InitGlobalTempFloat" ); |
24203 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24204 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24205 | break; |
24206 | #endif |
24207 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24208 | bool emitInitGlobalTempSint8( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24209 | bool emitInitGlobalTempUint8( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24210 | bool emitInitGlobalTempSint16( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24211 | bool emitInitGlobalTempUint16( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24212 | bool emitInitGlobalTempSint32( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24213 | bool emitInitGlobalTempUint32( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24214 | bool emitInitGlobalTempSint64( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24215 | bool emitInitGlobalTempUint64( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24216 | bool emitInitGlobalTempIntAP( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24217 | bool emitInitGlobalTempIntAPS( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24218 | bool emitInitGlobalTempBool( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24219 | bool emitInitGlobalTempFixedPoint( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24220 | bool emitInitGlobalTempPtr( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24221 | bool emitInitGlobalTempMemberPtr( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24222 | bool emitInitGlobalTempFloat( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24223 | #endif |
24224 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24225 | [[nodiscard]] bool emitInitGlobalTemp(PrimType, uint32_t, const LifetimeExtendedTemporaryDecl *, const SourceInfo &I); |
24226 | #endif |
24227 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
24228 | bool |
24229 | #if defined(GET_EVAL_IMPL) |
24230 | EvalEmitter |
24231 | #else |
24232 | ByteCodeEmitter |
24233 | #endif |
24234 | ::emitInitGlobalTemp(PrimType T0, uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &I) { |
24235 | switch (T0) { |
24236 | case PT_Sint8: |
24237 | return emitInitGlobalTempSint8(A0, A1, I); |
24238 | case PT_Uint8: |
24239 | return emitInitGlobalTempUint8(A0, A1, I); |
24240 | case PT_Sint16: |
24241 | return emitInitGlobalTempSint16(A0, A1, I); |
24242 | case PT_Uint16: |
24243 | return emitInitGlobalTempUint16(A0, A1, I); |
24244 | case PT_Sint32: |
24245 | return emitInitGlobalTempSint32(A0, A1, I); |
24246 | case PT_Uint32: |
24247 | return emitInitGlobalTempUint32(A0, A1, I); |
24248 | case PT_Sint64: |
24249 | return emitInitGlobalTempSint64(A0, A1, I); |
24250 | case PT_Uint64: |
24251 | return emitInitGlobalTempUint64(A0, A1, I); |
24252 | case PT_IntAP: |
24253 | return emitInitGlobalTempIntAP(A0, A1, I); |
24254 | case PT_IntAPS: |
24255 | return emitInitGlobalTempIntAPS(A0, A1, I); |
24256 | case PT_Bool: |
24257 | return emitInitGlobalTempBool(A0, A1, I); |
24258 | case PT_FixedPoint: |
24259 | return emitInitGlobalTempFixedPoint(A0, A1, I); |
24260 | case PT_Ptr: |
24261 | return emitInitGlobalTempPtr(A0, A1, I); |
24262 | case PT_MemberPtr: |
24263 | return emitInitGlobalTempMemberPtr(A0, A1, I); |
24264 | case PT_Float: |
24265 | return emitInitGlobalTempFloat(A0, A1, I); |
24266 | } |
24267 | llvm_unreachable("invalid enum value" ); |
24268 | } |
24269 | #endif |
24270 | #ifdef GET_LINK_IMPL |
24271 | bool ByteCodeEmitter::emitInitGlobalTempSint8( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24272 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempSint8, A0, A1, L); |
24273 | } |
24274 | bool ByteCodeEmitter::emitInitGlobalTempUint8( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24275 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempUint8, A0, A1, L); |
24276 | } |
24277 | bool ByteCodeEmitter::emitInitGlobalTempSint16( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24278 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempSint16, A0, A1, L); |
24279 | } |
24280 | bool ByteCodeEmitter::emitInitGlobalTempUint16( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24281 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempUint16, A0, A1, L); |
24282 | } |
24283 | bool ByteCodeEmitter::emitInitGlobalTempSint32( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24284 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempSint32, A0, A1, L); |
24285 | } |
24286 | bool ByteCodeEmitter::emitInitGlobalTempUint32( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24287 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempUint32, A0, A1, L); |
24288 | } |
24289 | bool ByteCodeEmitter::emitInitGlobalTempSint64( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24290 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempSint64, A0, A1, L); |
24291 | } |
24292 | bool ByteCodeEmitter::emitInitGlobalTempUint64( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24293 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempUint64, A0, A1, L); |
24294 | } |
24295 | bool ByteCodeEmitter::emitInitGlobalTempIntAP( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24296 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempIntAP, A0, A1, L); |
24297 | } |
24298 | bool ByteCodeEmitter::emitInitGlobalTempIntAPS( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24299 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempIntAPS, A0, A1, L); |
24300 | } |
24301 | bool ByteCodeEmitter::emitInitGlobalTempBool( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24302 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempBool, A0, A1, L); |
24303 | } |
24304 | bool ByteCodeEmitter::emitInitGlobalTempFixedPoint( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24305 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempFixedPoint, A0, A1, L); |
24306 | } |
24307 | bool ByteCodeEmitter::emitInitGlobalTempPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24308 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempPtr, A0, A1, L); |
24309 | } |
24310 | bool ByteCodeEmitter::emitInitGlobalTempMemberPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24311 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempMemberPtr, A0, A1, L); |
24312 | } |
24313 | bool ByteCodeEmitter::emitInitGlobalTempFloat( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24314 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempFloat, A0, A1, L); |
24315 | } |
24316 | #endif |
24317 | #ifdef GET_EVAL_IMPL |
24318 | bool EvalEmitter::emitInitGlobalTempSint8( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24319 | if (!isActive()) return true; |
24320 | CurrentSource = L; |
24321 | return InitGlobalTemp<PT_Sint8>(S, OpPC, A0, A1); |
24322 | } |
24323 | bool EvalEmitter::emitInitGlobalTempUint8( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24324 | if (!isActive()) return true; |
24325 | CurrentSource = L; |
24326 | return InitGlobalTemp<PT_Uint8>(S, OpPC, A0, A1); |
24327 | } |
24328 | bool EvalEmitter::emitInitGlobalTempSint16( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24329 | if (!isActive()) return true; |
24330 | CurrentSource = L; |
24331 | return InitGlobalTemp<PT_Sint16>(S, OpPC, A0, A1); |
24332 | } |
24333 | bool EvalEmitter::emitInitGlobalTempUint16( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24334 | if (!isActive()) return true; |
24335 | CurrentSource = L; |
24336 | return InitGlobalTemp<PT_Uint16>(S, OpPC, A0, A1); |
24337 | } |
24338 | bool EvalEmitter::emitInitGlobalTempSint32( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24339 | if (!isActive()) return true; |
24340 | CurrentSource = L; |
24341 | return InitGlobalTemp<PT_Sint32>(S, OpPC, A0, A1); |
24342 | } |
24343 | bool EvalEmitter::emitInitGlobalTempUint32( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24344 | if (!isActive()) return true; |
24345 | CurrentSource = L; |
24346 | return InitGlobalTemp<PT_Uint32>(S, OpPC, A0, A1); |
24347 | } |
24348 | bool EvalEmitter::emitInitGlobalTempSint64( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24349 | if (!isActive()) return true; |
24350 | CurrentSource = L; |
24351 | return InitGlobalTemp<PT_Sint64>(S, OpPC, A0, A1); |
24352 | } |
24353 | bool EvalEmitter::emitInitGlobalTempUint64( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24354 | if (!isActive()) return true; |
24355 | CurrentSource = L; |
24356 | return InitGlobalTemp<PT_Uint64>(S, OpPC, A0, A1); |
24357 | } |
24358 | bool EvalEmitter::emitInitGlobalTempIntAP( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24359 | if (!isActive()) return true; |
24360 | CurrentSource = L; |
24361 | return InitGlobalTemp<PT_IntAP>(S, OpPC, A0, A1); |
24362 | } |
24363 | bool EvalEmitter::emitInitGlobalTempIntAPS( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24364 | if (!isActive()) return true; |
24365 | CurrentSource = L; |
24366 | return InitGlobalTemp<PT_IntAPS>(S, OpPC, A0, A1); |
24367 | } |
24368 | bool EvalEmitter::emitInitGlobalTempBool( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24369 | if (!isActive()) return true; |
24370 | CurrentSource = L; |
24371 | return InitGlobalTemp<PT_Bool>(S, OpPC, A0, A1); |
24372 | } |
24373 | bool EvalEmitter::emitInitGlobalTempFixedPoint( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24374 | if (!isActive()) return true; |
24375 | CurrentSource = L; |
24376 | return InitGlobalTemp<PT_FixedPoint>(S, OpPC, A0, A1); |
24377 | } |
24378 | bool EvalEmitter::emitInitGlobalTempPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24379 | if (!isActive()) return true; |
24380 | CurrentSource = L; |
24381 | return InitGlobalTemp<PT_Ptr>(S, OpPC, A0, A1); |
24382 | } |
24383 | bool EvalEmitter::emitInitGlobalTempMemberPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24384 | if (!isActive()) return true; |
24385 | CurrentSource = L; |
24386 | return InitGlobalTemp<PT_MemberPtr>(S, OpPC, A0, A1); |
24387 | } |
24388 | bool EvalEmitter::emitInitGlobalTempFloat( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
24389 | if (!isActive()) return true; |
24390 | CurrentSource = L; |
24391 | return InitGlobalTemp<PT_Float>(S, OpPC, A0, A1); |
24392 | } |
24393 | #endif |
24394 | #ifdef GET_OPCODE_NAMES |
24395 | OP_InitGlobalTempComp, |
24396 | #endif |
24397 | #ifdef GET_INTERP |
24398 | case OP_InitGlobalTempComp: { |
24399 | const auto V0 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
24400 | if (!InitGlobalTempComp(S, OpPC, V0)) |
24401 | return false; |
24402 | continue; |
24403 | } |
24404 | #endif |
24405 | #ifdef GET_DISASM |
24406 | case OP_InitGlobalTempComp: |
24407 | Text.Op = PrintName("InitGlobalTempComp" ); |
24408 | Text.Args.push_back(printArg<const LifetimeExtendedTemporaryDecl *>(P, PC)); |
24409 | break; |
24410 | #endif |
24411 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24412 | bool emitInitGlobalTempComp( const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
24413 | #endif |
24414 | #ifdef GET_LINK_IMPL |
24415 | bool ByteCodeEmitter::emitInitGlobalTempComp( const LifetimeExtendedTemporaryDecl * A0, const SourceInfo &L) { |
24416 | return emitOp<const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempComp, A0, L); |
24417 | } |
24418 | #endif |
24419 | #ifdef GET_EVAL_IMPL |
24420 | bool EvalEmitter::emitInitGlobalTempComp( const LifetimeExtendedTemporaryDecl * A0, const SourceInfo &L) { |
24421 | if (!isActive()) return true; |
24422 | CurrentSource = L; |
24423 | return InitGlobalTempComp(S, OpPC, A0); |
24424 | } |
24425 | #endif |
24426 | #ifdef GET_OPCODE_NAMES |
24427 | OP_InitPopSint8, |
24428 | OP_InitPopUint8, |
24429 | OP_InitPopSint16, |
24430 | OP_InitPopUint16, |
24431 | OP_InitPopSint32, |
24432 | OP_InitPopUint32, |
24433 | OP_InitPopSint64, |
24434 | OP_InitPopUint64, |
24435 | OP_InitPopIntAP, |
24436 | OP_InitPopIntAPS, |
24437 | OP_InitPopBool, |
24438 | OP_InitPopFixedPoint, |
24439 | OP_InitPopPtr, |
24440 | OP_InitPopMemberPtr, |
24441 | OP_InitPopFloat, |
24442 | #endif |
24443 | #ifdef GET_INTERP |
24444 | case OP_InitPopSint8: { |
24445 | if (!InitPop<PT_Sint8>(S, OpPC)) |
24446 | return false; |
24447 | continue; |
24448 | } |
24449 | case OP_InitPopUint8: { |
24450 | if (!InitPop<PT_Uint8>(S, OpPC)) |
24451 | return false; |
24452 | continue; |
24453 | } |
24454 | case OP_InitPopSint16: { |
24455 | if (!InitPop<PT_Sint16>(S, OpPC)) |
24456 | return false; |
24457 | continue; |
24458 | } |
24459 | case OP_InitPopUint16: { |
24460 | if (!InitPop<PT_Uint16>(S, OpPC)) |
24461 | return false; |
24462 | continue; |
24463 | } |
24464 | case OP_InitPopSint32: { |
24465 | if (!InitPop<PT_Sint32>(S, OpPC)) |
24466 | return false; |
24467 | continue; |
24468 | } |
24469 | case OP_InitPopUint32: { |
24470 | if (!InitPop<PT_Uint32>(S, OpPC)) |
24471 | return false; |
24472 | continue; |
24473 | } |
24474 | case OP_InitPopSint64: { |
24475 | if (!InitPop<PT_Sint64>(S, OpPC)) |
24476 | return false; |
24477 | continue; |
24478 | } |
24479 | case OP_InitPopUint64: { |
24480 | if (!InitPop<PT_Uint64>(S, OpPC)) |
24481 | return false; |
24482 | continue; |
24483 | } |
24484 | case OP_InitPopIntAP: { |
24485 | if (!InitPop<PT_IntAP>(S, OpPC)) |
24486 | return false; |
24487 | continue; |
24488 | } |
24489 | case OP_InitPopIntAPS: { |
24490 | if (!InitPop<PT_IntAPS>(S, OpPC)) |
24491 | return false; |
24492 | continue; |
24493 | } |
24494 | case OP_InitPopBool: { |
24495 | if (!InitPop<PT_Bool>(S, OpPC)) |
24496 | return false; |
24497 | continue; |
24498 | } |
24499 | case OP_InitPopFixedPoint: { |
24500 | if (!InitPop<PT_FixedPoint>(S, OpPC)) |
24501 | return false; |
24502 | continue; |
24503 | } |
24504 | case OP_InitPopPtr: { |
24505 | if (!InitPop<PT_Ptr>(S, OpPC)) |
24506 | return false; |
24507 | continue; |
24508 | } |
24509 | case OP_InitPopMemberPtr: { |
24510 | if (!InitPop<PT_MemberPtr>(S, OpPC)) |
24511 | return false; |
24512 | continue; |
24513 | } |
24514 | case OP_InitPopFloat: { |
24515 | if (!InitPop<PT_Float>(S, OpPC)) |
24516 | return false; |
24517 | continue; |
24518 | } |
24519 | #endif |
24520 | #ifdef GET_DISASM |
24521 | case OP_InitPopSint8: |
24522 | Text.Op = PrintName("InitPopSint8" ); |
24523 | break; |
24524 | case OP_InitPopUint8: |
24525 | Text.Op = PrintName("InitPopUint8" ); |
24526 | break; |
24527 | case OP_InitPopSint16: |
24528 | Text.Op = PrintName("InitPopSint16" ); |
24529 | break; |
24530 | case OP_InitPopUint16: |
24531 | Text.Op = PrintName("InitPopUint16" ); |
24532 | break; |
24533 | case OP_InitPopSint32: |
24534 | Text.Op = PrintName("InitPopSint32" ); |
24535 | break; |
24536 | case OP_InitPopUint32: |
24537 | Text.Op = PrintName("InitPopUint32" ); |
24538 | break; |
24539 | case OP_InitPopSint64: |
24540 | Text.Op = PrintName("InitPopSint64" ); |
24541 | break; |
24542 | case OP_InitPopUint64: |
24543 | Text.Op = PrintName("InitPopUint64" ); |
24544 | break; |
24545 | case OP_InitPopIntAP: |
24546 | Text.Op = PrintName("InitPopIntAP" ); |
24547 | break; |
24548 | case OP_InitPopIntAPS: |
24549 | Text.Op = PrintName("InitPopIntAPS" ); |
24550 | break; |
24551 | case OP_InitPopBool: |
24552 | Text.Op = PrintName("InitPopBool" ); |
24553 | break; |
24554 | case OP_InitPopFixedPoint: |
24555 | Text.Op = PrintName("InitPopFixedPoint" ); |
24556 | break; |
24557 | case OP_InitPopPtr: |
24558 | Text.Op = PrintName("InitPopPtr" ); |
24559 | break; |
24560 | case OP_InitPopMemberPtr: |
24561 | Text.Op = PrintName("InitPopMemberPtr" ); |
24562 | break; |
24563 | case OP_InitPopFloat: |
24564 | Text.Op = PrintName("InitPopFloat" ); |
24565 | break; |
24566 | #endif |
24567 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24568 | bool emitInitPopSint8(const SourceInfo &); |
24569 | bool emitInitPopUint8(const SourceInfo &); |
24570 | bool emitInitPopSint16(const SourceInfo &); |
24571 | bool emitInitPopUint16(const SourceInfo &); |
24572 | bool emitInitPopSint32(const SourceInfo &); |
24573 | bool emitInitPopUint32(const SourceInfo &); |
24574 | bool emitInitPopSint64(const SourceInfo &); |
24575 | bool emitInitPopUint64(const SourceInfo &); |
24576 | bool emitInitPopIntAP(const SourceInfo &); |
24577 | bool emitInitPopIntAPS(const SourceInfo &); |
24578 | bool emitInitPopBool(const SourceInfo &); |
24579 | bool emitInitPopFixedPoint(const SourceInfo &); |
24580 | bool emitInitPopPtr(const SourceInfo &); |
24581 | bool emitInitPopMemberPtr(const SourceInfo &); |
24582 | bool emitInitPopFloat(const SourceInfo &); |
24583 | #endif |
24584 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24585 | [[nodiscard]] bool emitInitPop(PrimType, const SourceInfo &I); |
24586 | #endif |
24587 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
24588 | bool |
24589 | #if defined(GET_EVAL_IMPL) |
24590 | EvalEmitter |
24591 | #else |
24592 | ByteCodeEmitter |
24593 | #endif |
24594 | ::emitInitPop(PrimType T0, const SourceInfo &I) { |
24595 | switch (T0) { |
24596 | case PT_Sint8: |
24597 | return emitInitPopSint8(I); |
24598 | case PT_Uint8: |
24599 | return emitInitPopUint8(I); |
24600 | case PT_Sint16: |
24601 | return emitInitPopSint16(I); |
24602 | case PT_Uint16: |
24603 | return emitInitPopUint16(I); |
24604 | case PT_Sint32: |
24605 | return emitInitPopSint32(I); |
24606 | case PT_Uint32: |
24607 | return emitInitPopUint32(I); |
24608 | case PT_Sint64: |
24609 | return emitInitPopSint64(I); |
24610 | case PT_Uint64: |
24611 | return emitInitPopUint64(I); |
24612 | case PT_IntAP: |
24613 | return emitInitPopIntAP(I); |
24614 | case PT_IntAPS: |
24615 | return emitInitPopIntAPS(I); |
24616 | case PT_Bool: |
24617 | return emitInitPopBool(I); |
24618 | case PT_FixedPoint: |
24619 | return emitInitPopFixedPoint(I); |
24620 | case PT_Ptr: |
24621 | return emitInitPopPtr(I); |
24622 | case PT_MemberPtr: |
24623 | return emitInitPopMemberPtr(I); |
24624 | case PT_Float: |
24625 | return emitInitPopFloat(I); |
24626 | } |
24627 | llvm_unreachable("invalid enum value" ); |
24628 | } |
24629 | #endif |
24630 | #ifdef GET_LINK_IMPL |
24631 | bool ByteCodeEmitter::emitInitPopSint8(const SourceInfo &L) { |
24632 | return emitOp<>(OP_InitPopSint8, L); |
24633 | } |
24634 | bool ByteCodeEmitter::emitInitPopUint8(const SourceInfo &L) { |
24635 | return emitOp<>(OP_InitPopUint8, L); |
24636 | } |
24637 | bool ByteCodeEmitter::emitInitPopSint16(const SourceInfo &L) { |
24638 | return emitOp<>(OP_InitPopSint16, L); |
24639 | } |
24640 | bool ByteCodeEmitter::emitInitPopUint16(const SourceInfo &L) { |
24641 | return emitOp<>(OP_InitPopUint16, L); |
24642 | } |
24643 | bool ByteCodeEmitter::emitInitPopSint32(const SourceInfo &L) { |
24644 | return emitOp<>(OP_InitPopSint32, L); |
24645 | } |
24646 | bool ByteCodeEmitter::emitInitPopUint32(const SourceInfo &L) { |
24647 | return emitOp<>(OP_InitPopUint32, L); |
24648 | } |
24649 | bool ByteCodeEmitter::emitInitPopSint64(const SourceInfo &L) { |
24650 | return emitOp<>(OP_InitPopSint64, L); |
24651 | } |
24652 | bool ByteCodeEmitter::emitInitPopUint64(const SourceInfo &L) { |
24653 | return emitOp<>(OP_InitPopUint64, L); |
24654 | } |
24655 | bool ByteCodeEmitter::emitInitPopIntAP(const SourceInfo &L) { |
24656 | return emitOp<>(OP_InitPopIntAP, L); |
24657 | } |
24658 | bool ByteCodeEmitter::emitInitPopIntAPS(const SourceInfo &L) { |
24659 | return emitOp<>(OP_InitPopIntAPS, L); |
24660 | } |
24661 | bool ByteCodeEmitter::emitInitPopBool(const SourceInfo &L) { |
24662 | return emitOp<>(OP_InitPopBool, L); |
24663 | } |
24664 | bool ByteCodeEmitter::emitInitPopFixedPoint(const SourceInfo &L) { |
24665 | return emitOp<>(OP_InitPopFixedPoint, L); |
24666 | } |
24667 | bool ByteCodeEmitter::emitInitPopPtr(const SourceInfo &L) { |
24668 | return emitOp<>(OP_InitPopPtr, L); |
24669 | } |
24670 | bool ByteCodeEmitter::emitInitPopMemberPtr(const SourceInfo &L) { |
24671 | return emitOp<>(OP_InitPopMemberPtr, L); |
24672 | } |
24673 | bool ByteCodeEmitter::emitInitPopFloat(const SourceInfo &L) { |
24674 | return emitOp<>(OP_InitPopFloat, L); |
24675 | } |
24676 | #endif |
24677 | #ifdef GET_EVAL_IMPL |
24678 | bool EvalEmitter::emitInitPopSint8(const SourceInfo &L) { |
24679 | if (!isActive()) return true; |
24680 | CurrentSource = L; |
24681 | return InitPop<PT_Sint8>(S, OpPC); |
24682 | } |
24683 | bool EvalEmitter::emitInitPopUint8(const SourceInfo &L) { |
24684 | if (!isActive()) return true; |
24685 | CurrentSource = L; |
24686 | return InitPop<PT_Uint8>(S, OpPC); |
24687 | } |
24688 | bool EvalEmitter::emitInitPopSint16(const SourceInfo &L) { |
24689 | if (!isActive()) return true; |
24690 | CurrentSource = L; |
24691 | return InitPop<PT_Sint16>(S, OpPC); |
24692 | } |
24693 | bool EvalEmitter::emitInitPopUint16(const SourceInfo &L) { |
24694 | if (!isActive()) return true; |
24695 | CurrentSource = L; |
24696 | return InitPop<PT_Uint16>(S, OpPC); |
24697 | } |
24698 | bool EvalEmitter::emitInitPopSint32(const SourceInfo &L) { |
24699 | if (!isActive()) return true; |
24700 | CurrentSource = L; |
24701 | return InitPop<PT_Sint32>(S, OpPC); |
24702 | } |
24703 | bool EvalEmitter::emitInitPopUint32(const SourceInfo &L) { |
24704 | if (!isActive()) return true; |
24705 | CurrentSource = L; |
24706 | return InitPop<PT_Uint32>(S, OpPC); |
24707 | } |
24708 | bool EvalEmitter::emitInitPopSint64(const SourceInfo &L) { |
24709 | if (!isActive()) return true; |
24710 | CurrentSource = L; |
24711 | return InitPop<PT_Sint64>(S, OpPC); |
24712 | } |
24713 | bool EvalEmitter::emitInitPopUint64(const SourceInfo &L) { |
24714 | if (!isActive()) return true; |
24715 | CurrentSource = L; |
24716 | return InitPop<PT_Uint64>(S, OpPC); |
24717 | } |
24718 | bool EvalEmitter::emitInitPopIntAP(const SourceInfo &L) { |
24719 | if (!isActive()) return true; |
24720 | CurrentSource = L; |
24721 | return InitPop<PT_IntAP>(S, OpPC); |
24722 | } |
24723 | bool EvalEmitter::emitInitPopIntAPS(const SourceInfo &L) { |
24724 | if (!isActive()) return true; |
24725 | CurrentSource = L; |
24726 | return InitPop<PT_IntAPS>(S, OpPC); |
24727 | } |
24728 | bool EvalEmitter::emitInitPopBool(const SourceInfo &L) { |
24729 | if (!isActive()) return true; |
24730 | CurrentSource = L; |
24731 | return InitPop<PT_Bool>(S, OpPC); |
24732 | } |
24733 | bool EvalEmitter::emitInitPopFixedPoint(const SourceInfo &L) { |
24734 | if (!isActive()) return true; |
24735 | CurrentSource = L; |
24736 | return InitPop<PT_FixedPoint>(S, OpPC); |
24737 | } |
24738 | bool EvalEmitter::emitInitPopPtr(const SourceInfo &L) { |
24739 | if (!isActive()) return true; |
24740 | CurrentSource = L; |
24741 | return InitPop<PT_Ptr>(S, OpPC); |
24742 | } |
24743 | bool EvalEmitter::emitInitPopMemberPtr(const SourceInfo &L) { |
24744 | if (!isActive()) return true; |
24745 | CurrentSource = L; |
24746 | return InitPop<PT_MemberPtr>(S, OpPC); |
24747 | } |
24748 | bool EvalEmitter::emitInitPopFloat(const SourceInfo &L) { |
24749 | if (!isActive()) return true; |
24750 | CurrentSource = L; |
24751 | return InitPop<PT_Float>(S, OpPC); |
24752 | } |
24753 | #endif |
24754 | #ifdef GET_OPCODE_NAMES |
24755 | OP_InitScope, |
24756 | #endif |
24757 | #ifdef GET_INTERP |
24758 | case OP_InitScope: { |
24759 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24760 | if (!InitScope(S, OpPC, V0)) |
24761 | return false; |
24762 | continue; |
24763 | } |
24764 | #endif |
24765 | #ifdef GET_DISASM |
24766 | case OP_InitScope: |
24767 | Text.Op = PrintName("InitScope" ); |
24768 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24769 | break; |
24770 | #endif |
24771 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24772 | bool emitInitScope( uint32_t , const SourceInfo &); |
24773 | #endif |
24774 | #ifdef GET_LINK_IMPL |
24775 | bool ByteCodeEmitter::emitInitScope( uint32_t A0, const SourceInfo &L) { |
24776 | return emitOp<uint32_t>(OP_InitScope, A0, L); |
24777 | } |
24778 | #endif |
24779 | #ifdef GET_EVAL_IMPL |
24780 | bool EvalEmitter::emitInitScope( uint32_t A0, const SourceInfo &L) { |
24781 | if (!isActive()) return true; |
24782 | CurrentSource = L; |
24783 | return InitScope(S, OpPC, A0); |
24784 | } |
24785 | #endif |
24786 | #ifdef GET_OPCODE_NAMES |
24787 | OP_InitThisBitFieldSint8, |
24788 | OP_InitThisBitFieldUint8, |
24789 | OP_InitThisBitFieldSint16, |
24790 | OP_InitThisBitFieldUint16, |
24791 | OP_InitThisBitFieldSint32, |
24792 | OP_InitThisBitFieldUint32, |
24793 | OP_InitThisBitFieldSint64, |
24794 | OP_InitThisBitFieldUint64, |
24795 | OP_InitThisBitFieldIntAP, |
24796 | OP_InitThisBitFieldIntAPS, |
24797 | OP_InitThisBitFieldBool, |
24798 | OP_InitThisBitFieldFixedPoint, |
24799 | #endif |
24800 | #ifdef GET_INTERP |
24801 | case OP_InitThisBitFieldSint8: { |
24802 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24803 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24804 | if (!InitThisBitField<PT_Sint8>(S, OpPC, V0, V1)) |
24805 | return false; |
24806 | continue; |
24807 | } |
24808 | case OP_InitThisBitFieldUint8: { |
24809 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24810 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24811 | if (!InitThisBitField<PT_Uint8>(S, OpPC, V0, V1)) |
24812 | return false; |
24813 | continue; |
24814 | } |
24815 | case OP_InitThisBitFieldSint16: { |
24816 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24817 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24818 | if (!InitThisBitField<PT_Sint16>(S, OpPC, V0, V1)) |
24819 | return false; |
24820 | continue; |
24821 | } |
24822 | case OP_InitThisBitFieldUint16: { |
24823 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24824 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24825 | if (!InitThisBitField<PT_Uint16>(S, OpPC, V0, V1)) |
24826 | return false; |
24827 | continue; |
24828 | } |
24829 | case OP_InitThisBitFieldSint32: { |
24830 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24831 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24832 | if (!InitThisBitField<PT_Sint32>(S, OpPC, V0, V1)) |
24833 | return false; |
24834 | continue; |
24835 | } |
24836 | case OP_InitThisBitFieldUint32: { |
24837 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24838 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24839 | if (!InitThisBitField<PT_Uint32>(S, OpPC, V0, V1)) |
24840 | return false; |
24841 | continue; |
24842 | } |
24843 | case OP_InitThisBitFieldSint64: { |
24844 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24845 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24846 | if (!InitThisBitField<PT_Sint64>(S, OpPC, V0, V1)) |
24847 | return false; |
24848 | continue; |
24849 | } |
24850 | case OP_InitThisBitFieldUint64: { |
24851 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24852 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24853 | if (!InitThisBitField<PT_Uint64>(S, OpPC, V0, V1)) |
24854 | return false; |
24855 | continue; |
24856 | } |
24857 | case OP_InitThisBitFieldIntAP: { |
24858 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24859 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24860 | if (!InitThisBitField<PT_IntAP>(S, OpPC, V0, V1)) |
24861 | return false; |
24862 | continue; |
24863 | } |
24864 | case OP_InitThisBitFieldIntAPS: { |
24865 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24866 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24867 | if (!InitThisBitField<PT_IntAPS>(S, OpPC, V0, V1)) |
24868 | return false; |
24869 | continue; |
24870 | } |
24871 | case OP_InitThisBitFieldBool: { |
24872 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24873 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24874 | if (!InitThisBitField<PT_Bool>(S, OpPC, V0, V1)) |
24875 | return false; |
24876 | continue; |
24877 | } |
24878 | case OP_InitThisBitFieldFixedPoint: { |
24879 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
24880 | const auto V1 = ReadArg<uint32_t>(S, PC); |
24881 | if (!InitThisBitField<PT_FixedPoint>(S, OpPC, V0, V1)) |
24882 | return false; |
24883 | continue; |
24884 | } |
24885 | #endif |
24886 | #ifdef GET_DISASM |
24887 | case OP_InitThisBitFieldSint8: |
24888 | Text.Op = PrintName("InitThisBitFieldSint8" ); |
24889 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24890 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24891 | break; |
24892 | case OP_InitThisBitFieldUint8: |
24893 | Text.Op = PrintName("InitThisBitFieldUint8" ); |
24894 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24895 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24896 | break; |
24897 | case OP_InitThisBitFieldSint16: |
24898 | Text.Op = PrintName("InitThisBitFieldSint16" ); |
24899 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24900 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24901 | break; |
24902 | case OP_InitThisBitFieldUint16: |
24903 | Text.Op = PrintName("InitThisBitFieldUint16" ); |
24904 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24905 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24906 | break; |
24907 | case OP_InitThisBitFieldSint32: |
24908 | Text.Op = PrintName("InitThisBitFieldSint32" ); |
24909 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24910 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24911 | break; |
24912 | case OP_InitThisBitFieldUint32: |
24913 | Text.Op = PrintName("InitThisBitFieldUint32" ); |
24914 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24915 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24916 | break; |
24917 | case OP_InitThisBitFieldSint64: |
24918 | Text.Op = PrintName("InitThisBitFieldSint64" ); |
24919 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24920 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24921 | break; |
24922 | case OP_InitThisBitFieldUint64: |
24923 | Text.Op = PrintName("InitThisBitFieldUint64" ); |
24924 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24925 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24926 | break; |
24927 | case OP_InitThisBitFieldIntAP: |
24928 | Text.Op = PrintName("InitThisBitFieldIntAP" ); |
24929 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24930 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24931 | break; |
24932 | case OP_InitThisBitFieldIntAPS: |
24933 | Text.Op = PrintName("InitThisBitFieldIntAPS" ); |
24934 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24935 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24936 | break; |
24937 | case OP_InitThisBitFieldBool: |
24938 | Text.Op = PrintName("InitThisBitFieldBool" ); |
24939 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24940 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24941 | break; |
24942 | case OP_InitThisBitFieldFixedPoint: |
24943 | Text.Op = PrintName("InitThisBitFieldFixedPoint" ); |
24944 | Text.Args.push_back(printArg<const Record::Field *>(P, PC)); |
24945 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
24946 | break; |
24947 | #endif |
24948 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24949 | bool emitInitThisBitFieldSint8( const Record::Field * , uint32_t , const SourceInfo &); |
24950 | bool emitInitThisBitFieldUint8( const Record::Field * , uint32_t , const SourceInfo &); |
24951 | bool emitInitThisBitFieldSint16( const Record::Field * , uint32_t , const SourceInfo &); |
24952 | bool emitInitThisBitFieldUint16( const Record::Field * , uint32_t , const SourceInfo &); |
24953 | bool emitInitThisBitFieldSint32( const Record::Field * , uint32_t , const SourceInfo &); |
24954 | bool emitInitThisBitFieldUint32( const Record::Field * , uint32_t , const SourceInfo &); |
24955 | bool emitInitThisBitFieldSint64( const Record::Field * , uint32_t , const SourceInfo &); |
24956 | bool emitInitThisBitFieldUint64( const Record::Field * , uint32_t , const SourceInfo &); |
24957 | bool emitInitThisBitFieldIntAP( const Record::Field * , uint32_t , const SourceInfo &); |
24958 | bool emitInitThisBitFieldIntAPS( const Record::Field * , uint32_t , const SourceInfo &); |
24959 | bool emitInitThisBitFieldBool( const Record::Field * , uint32_t , const SourceInfo &); |
24960 | bool emitInitThisBitFieldFixedPoint( const Record::Field * , uint32_t , const SourceInfo &); |
24961 | #endif |
24962 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24963 | [[nodiscard]] bool emitInitThisBitField(PrimType, const Record::Field *, uint32_t, const SourceInfo &I); |
24964 | #endif |
24965 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
24966 | bool |
24967 | #if defined(GET_EVAL_IMPL) |
24968 | EvalEmitter |
24969 | #else |
24970 | ByteCodeEmitter |
24971 | #endif |
24972 | ::emitInitThisBitField(PrimType T0, const Record::Field * A0, uint32_t A1, const SourceInfo &I) { |
24973 | switch (T0) { |
24974 | case PT_Sint8: |
24975 | return emitInitThisBitFieldSint8(A0, A1, I); |
24976 | case PT_Uint8: |
24977 | return emitInitThisBitFieldUint8(A0, A1, I); |
24978 | case PT_Sint16: |
24979 | return emitInitThisBitFieldSint16(A0, A1, I); |
24980 | case PT_Uint16: |
24981 | return emitInitThisBitFieldUint16(A0, A1, I); |
24982 | case PT_Sint32: |
24983 | return emitInitThisBitFieldSint32(A0, A1, I); |
24984 | case PT_Uint32: |
24985 | return emitInitThisBitFieldUint32(A0, A1, I); |
24986 | case PT_Sint64: |
24987 | return emitInitThisBitFieldSint64(A0, A1, I); |
24988 | case PT_Uint64: |
24989 | return emitInitThisBitFieldUint64(A0, A1, I); |
24990 | case PT_IntAP: |
24991 | return emitInitThisBitFieldIntAP(A0, A1, I); |
24992 | case PT_IntAPS: |
24993 | return emitInitThisBitFieldIntAPS(A0, A1, I); |
24994 | case PT_Bool: |
24995 | return emitInitThisBitFieldBool(A0, A1, I); |
24996 | case PT_FixedPoint: |
24997 | return emitInitThisBitFieldFixedPoint(A0, A1, I); |
24998 | default: llvm_unreachable("invalid type: emitInitThisBitField" ); |
24999 | } |
25000 | llvm_unreachable("invalid enum value" ); |
25001 | } |
25002 | #endif |
25003 | #ifdef GET_LINK_IMPL |
25004 | bool ByteCodeEmitter::emitInitThisBitFieldSint8( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25005 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldSint8, A0, A1, L); |
25006 | } |
25007 | bool ByteCodeEmitter::emitInitThisBitFieldUint8( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25008 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldUint8, A0, A1, L); |
25009 | } |
25010 | bool ByteCodeEmitter::emitInitThisBitFieldSint16( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25011 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldSint16, A0, A1, L); |
25012 | } |
25013 | bool ByteCodeEmitter::emitInitThisBitFieldUint16( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25014 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldUint16, A0, A1, L); |
25015 | } |
25016 | bool ByteCodeEmitter::emitInitThisBitFieldSint32( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25017 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldSint32, A0, A1, L); |
25018 | } |
25019 | bool ByteCodeEmitter::emitInitThisBitFieldUint32( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25020 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldUint32, A0, A1, L); |
25021 | } |
25022 | bool ByteCodeEmitter::emitInitThisBitFieldSint64( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25023 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldSint64, A0, A1, L); |
25024 | } |
25025 | bool ByteCodeEmitter::emitInitThisBitFieldUint64( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25026 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldUint64, A0, A1, L); |
25027 | } |
25028 | bool ByteCodeEmitter::emitInitThisBitFieldIntAP( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25029 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldIntAP, A0, A1, L); |
25030 | } |
25031 | bool ByteCodeEmitter::emitInitThisBitFieldIntAPS( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25032 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldIntAPS, A0, A1, L); |
25033 | } |
25034 | bool ByteCodeEmitter::emitInitThisBitFieldBool( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25035 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldBool, A0, A1, L); |
25036 | } |
25037 | bool ByteCodeEmitter::emitInitThisBitFieldFixedPoint( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25038 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldFixedPoint, A0, A1, L); |
25039 | } |
25040 | #endif |
25041 | #ifdef GET_EVAL_IMPL |
25042 | bool EvalEmitter::emitInitThisBitFieldSint8( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25043 | if (!isActive()) return true; |
25044 | CurrentSource = L; |
25045 | return InitThisBitField<PT_Sint8>(S, OpPC, A0, A1); |
25046 | } |
25047 | bool EvalEmitter::emitInitThisBitFieldUint8( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25048 | if (!isActive()) return true; |
25049 | CurrentSource = L; |
25050 | return InitThisBitField<PT_Uint8>(S, OpPC, A0, A1); |
25051 | } |
25052 | bool EvalEmitter::emitInitThisBitFieldSint16( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25053 | if (!isActive()) return true; |
25054 | CurrentSource = L; |
25055 | return InitThisBitField<PT_Sint16>(S, OpPC, A0, A1); |
25056 | } |
25057 | bool EvalEmitter::emitInitThisBitFieldUint16( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25058 | if (!isActive()) return true; |
25059 | CurrentSource = L; |
25060 | return InitThisBitField<PT_Uint16>(S, OpPC, A0, A1); |
25061 | } |
25062 | bool EvalEmitter::emitInitThisBitFieldSint32( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25063 | if (!isActive()) return true; |
25064 | CurrentSource = L; |
25065 | return InitThisBitField<PT_Sint32>(S, OpPC, A0, A1); |
25066 | } |
25067 | bool EvalEmitter::emitInitThisBitFieldUint32( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25068 | if (!isActive()) return true; |
25069 | CurrentSource = L; |
25070 | return InitThisBitField<PT_Uint32>(S, OpPC, A0, A1); |
25071 | } |
25072 | bool EvalEmitter::emitInitThisBitFieldSint64( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25073 | if (!isActive()) return true; |
25074 | CurrentSource = L; |
25075 | return InitThisBitField<PT_Sint64>(S, OpPC, A0, A1); |
25076 | } |
25077 | bool EvalEmitter::emitInitThisBitFieldUint64( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25078 | if (!isActive()) return true; |
25079 | CurrentSource = L; |
25080 | return InitThisBitField<PT_Uint64>(S, OpPC, A0, A1); |
25081 | } |
25082 | bool EvalEmitter::emitInitThisBitFieldIntAP( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25083 | if (!isActive()) return true; |
25084 | CurrentSource = L; |
25085 | return InitThisBitField<PT_IntAP>(S, OpPC, A0, A1); |
25086 | } |
25087 | bool EvalEmitter::emitInitThisBitFieldIntAPS( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25088 | if (!isActive()) return true; |
25089 | CurrentSource = L; |
25090 | return InitThisBitField<PT_IntAPS>(S, OpPC, A0, A1); |
25091 | } |
25092 | bool EvalEmitter::emitInitThisBitFieldBool( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25093 | if (!isActive()) return true; |
25094 | CurrentSource = L; |
25095 | return InitThisBitField<PT_Bool>(S, OpPC, A0, A1); |
25096 | } |
25097 | bool EvalEmitter::emitInitThisBitFieldFixedPoint( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
25098 | if (!isActive()) return true; |
25099 | CurrentSource = L; |
25100 | return InitThisBitField<PT_FixedPoint>(S, OpPC, A0, A1); |
25101 | } |
25102 | #endif |
25103 | #ifdef GET_OPCODE_NAMES |
25104 | OP_InitThisFieldSint8, |
25105 | OP_InitThisFieldUint8, |
25106 | OP_InitThisFieldSint16, |
25107 | OP_InitThisFieldUint16, |
25108 | OP_InitThisFieldSint32, |
25109 | OP_InitThisFieldUint32, |
25110 | OP_InitThisFieldSint64, |
25111 | OP_InitThisFieldUint64, |
25112 | OP_InitThisFieldIntAP, |
25113 | OP_InitThisFieldIntAPS, |
25114 | OP_InitThisFieldBool, |
25115 | OP_InitThisFieldFixedPoint, |
25116 | OP_InitThisFieldPtr, |
25117 | OP_InitThisFieldMemberPtr, |
25118 | OP_InitThisFieldFloat, |
25119 | #endif |
25120 | #ifdef GET_INTERP |
25121 | case OP_InitThisFieldSint8: { |
25122 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25123 | if (!InitThisField<PT_Sint8>(S, OpPC, V0)) |
25124 | return false; |
25125 | continue; |
25126 | } |
25127 | case OP_InitThisFieldUint8: { |
25128 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25129 | if (!InitThisField<PT_Uint8>(S, OpPC, V0)) |
25130 | return false; |
25131 | continue; |
25132 | } |
25133 | case OP_InitThisFieldSint16: { |
25134 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25135 | if (!InitThisField<PT_Sint16>(S, OpPC, V0)) |
25136 | return false; |
25137 | continue; |
25138 | } |
25139 | case OP_InitThisFieldUint16: { |
25140 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25141 | if (!InitThisField<PT_Uint16>(S, OpPC, V0)) |
25142 | return false; |
25143 | continue; |
25144 | } |
25145 | case OP_InitThisFieldSint32: { |
25146 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25147 | if (!InitThisField<PT_Sint32>(S, OpPC, V0)) |
25148 | return false; |
25149 | continue; |
25150 | } |
25151 | case OP_InitThisFieldUint32: { |
25152 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25153 | if (!InitThisField<PT_Uint32>(S, OpPC, V0)) |
25154 | return false; |
25155 | continue; |
25156 | } |
25157 | case OP_InitThisFieldSint64: { |
25158 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25159 | if (!InitThisField<PT_Sint64>(S, OpPC, V0)) |
25160 | return false; |
25161 | continue; |
25162 | } |
25163 | case OP_InitThisFieldUint64: { |
25164 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25165 | if (!InitThisField<PT_Uint64>(S, OpPC, V0)) |
25166 | return false; |
25167 | continue; |
25168 | } |
25169 | case OP_InitThisFieldIntAP: { |
25170 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25171 | if (!InitThisField<PT_IntAP>(S, OpPC, V0)) |
25172 | return false; |
25173 | continue; |
25174 | } |
25175 | case OP_InitThisFieldIntAPS: { |
25176 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25177 | if (!InitThisField<PT_IntAPS>(S, OpPC, V0)) |
25178 | return false; |
25179 | continue; |
25180 | } |
25181 | case OP_InitThisFieldBool: { |
25182 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25183 | if (!InitThisField<PT_Bool>(S, OpPC, V0)) |
25184 | return false; |
25185 | continue; |
25186 | } |
25187 | case OP_InitThisFieldFixedPoint: { |
25188 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25189 | if (!InitThisField<PT_FixedPoint>(S, OpPC, V0)) |
25190 | return false; |
25191 | continue; |
25192 | } |
25193 | case OP_InitThisFieldPtr: { |
25194 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25195 | if (!InitThisField<PT_Ptr>(S, OpPC, V0)) |
25196 | return false; |
25197 | continue; |
25198 | } |
25199 | case OP_InitThisFieldMemberPtr: { |
25200 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25201 | if (!InitThisField<PT_MemberPtr>(S, OpPC, V0)) |
25202 | return false; |
25203 | continue; |
25204 | } |
25205 | case OP_InitThisFieldFloat: { |
25206 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25207 | if (!InitThisField<PT_Float>(S, OpPC, V0)) |
25208 | return false; |
25209 | continue; |
25210 | } |
25211 | #endif |
25212 | #ifdef GET_DISASM |
25213 | case OP_InitThisFieldSint8: |
25214 | Text.Op = PrintName("InitThisFieldSint8" ); |
25215 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25216 | break; |
25217 | case OP_InitThisFieldUint8: |
25218 | Text.Op = PrintName("InitThisFieldUint8" ); |
25219 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25220 | break; |
25221 | case OP_InitThisFieldSint16: |
25222 | Text.Op = PrintName("InitThisFieldSint16" ); |
25223 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25224 | break; |
25225 | case OP_InitThisFieldUint16: |
25226 | Text.Op = PrintName("InitThisFieldUint16" ); |
25227 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25228 | break; |
25229 | case OP_InitThisFieldSint32: |
25230 | Text.Op = PrintName("InitThisFieldSint32" ); |
25231 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25232 | break; |
25233 | case OP_InitThisFieldUint32: |
25234 | Text.Op = PrintName("InitThisFieldUint32" ); |
25235 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25236 | break; |
25237 | case OP_InitThisFieldSint64: |
25238 | Text.Op = PrintName("InitThisFieldSint64" ); |
25239 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25240 | break; |
25241 | case OP_InitThisFieldUint64: |
25242 | Text.Op = PrintName("InitThisFieldUint64" ); |
25243 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25244 | break; |
25245 | case OP_InitThisFieldIntAP: |
25246 | Text.Op = PrintName("InitThisFieldIntAP" ); |
25247 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25248 | break; |
25249 | case OP_InitThisFieldIntAPS: |
25250 | Text.Op = PrintName("InitThisFieldIntAPS" ); |
25251 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25252 | break; |
25253 | case OP_InitThisFieldBool: |
25254 | Text.Op = PrintName("InitThisFieldBool" ); |
25255 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25256 | break; |
25257 | case OP_InitThisFieldFixedPoint: |
25258 | Text.Op = PrintName("InitThisFieldFixedPoint" ); |
25259 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25260 | break; |
25261 | case OP_InitThisFieldPtr: |
25262 | Text.Op = PrintName("InitThisFieldPtr" ); |
25263 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25264 | break; |
25265 | case OP_InitThisFieldMemberPtr: |
25266 | Text.Op = PrintName("InitThisFieldMemberPtr" ); |
25267 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25268 | break; |
25269 | case OP_InitThisFieldFloat: |
25270 | Text.Op = PrintName("InitThisFieldFloat" ); |
25271 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25272 | break; |
25273 | #endif |
25274 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25275 | bool emitInitThisFieldSint8( uint32_t , const SourceInfo &); |
25276 | bool emitInitThisFieldUint8( uint32_t , const SourceInfo &); |
25277 | bool emitInitThisFieldSint16( uint32_t , const SourceInfo &); |
25278 | bool emitInitThisFieldUint16( uint32_t , const SourceInfo &); |
25279 | bool emitInitThisFieldSint32( uint32_t , const SourceInfo &); |
25280 | bool emitInitThisFieldUint32( uint32_t , const SourceInfo &); |
25281 | bool emitInitThisFieldSint64( uint32_t , const SourceInfo &); |
25282 | bool emitInitThisFieldUint64( uint32_t , const SourceInfo &); |
25283 | bool emitInitThisFieldIntAP( uint32_t , const SourceInfo &); |
25284 | bool emitInitThisFieldIntAPS( uint32_t , const SourceInfo &); |
25285 | bool emitInitThisFieldBool( uint32_t , const SourceInfo &); |
25286 | bool emitInitThisFieldFixedPoint( uint32_t , const SourceInfo &); |
25287 | bool emitInitThisFieldPtr( uint32_t , const SourceInfo &); |
25288 | bool emitInitThisFieldMemberPtr( uint32_t , const SourceInfo &); |
25289 | bool emitInitThisFieldFloat( uint32_t , const SourceInfo &); |
25290 | #endif |
25291 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25292 | [[nodiscard]] bool emitInitThisField(PrimType, uint32_t, const SourceInfo &I); |
25293 | #endif |
25294 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
25295 | bool |
25296 | #if defined(GET_EVAL_IMPL) |
25297 | EvalEmitter |
25298 | #else |
25299 | ByteCodeEmitter |
25300 | #endif |
25301 | ::emitInitThisField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
25302 | switch (T0) { |
25303 | case PT_Sint8: |
25304 | return emitInitThisFieldSint8(A0, I); |
25305 | case PT_Uint8: |
25306 | return emitInitThisFieldUint8(A0, I); |
25307 | case PT_Sint16: |
25308 | return emitInitThisFieldSint16(A0, I); |
25309 | case PT_Uint16: |
25310 | return emitInitThisFieldUint16(A0, I); |
25311 | case PT_Sint32: |
25312 | return emitInitThisFieldSint32(A0, I); |
25313 | case PT_Uint32: |
25314 | return emitInitThisFieldUint32(A0, I); |
25315 | case PT_Sint64: |
25316 | return emitInitThisFieldSint64(A0, I); |
25317 | case PT_Uint64: |
25318 | return emitInitThisFieldUint64(A0, I); |
25319 | case PT_IntAP: |
25320 | return emitInitThisFieldIntAP(A0, I); |
25321 | case PT_IntAPS: |
25322 | return emitInitThisFieldIntAPS(A0, I); |
25323 | case PT_Bool: |
25324 | return emitInitThisFieldBool(A0, I); |
25325 | case PT_FixedPoint: |
25326 | return emitInitThisFieldFixedPoint(A0, I); |
25327 | case PT_Ptr: |
25328 | return emitInitThisFieldPtr(A0, I); |
25329 | case PT_MemberPtr: |
25330 | return emitInitThisFieldMemberPtr(A0, I); |
25331 | case PT_Float: |
25332 | return emitInitThisFieldFloat(A0, I); |
25333 | } |
25334 | llvm_unreachable("invalid enum value" ); |
25335 | } |
25336 | #endif |
25337 | #ifdef GET_LINK_IMPL |
25338 | bool ByteCodeEmitter::emitInitThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
25339 | return emitOp<uint32_t>(OP_InitThisFieldSint8, A0, L); |
25340 | } |
25341 | bool ByteCodeEmitter::emitInitThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
25342 | return emitOp<uint32_t>(OP_InitThisFieldUint8, A0, L); |
25343 | } |
25344 | bool ByteCodeEmitter::emitInitThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
25345 | return emitOp<uint32_t>(OP_InitThisFieldSint16, A0, L); |
25346 | } |
25347 | bool ByteCodeEmitter::emitInitThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
25348 | return emitOp<uint32_t>(OP_InitThisFieldUint16, A0, L); |
25349 | } |
25350 | bool ByteCodeEmitter::emitInitThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
25351 | return emitOp<uint32_t>(OP_InitThisFieldSint32, A0, L); |
25352 | } |
25353 | bool ByteCodeEmitter::emitInitThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
25354 | return emitOp<uint32_t>(OP_InitThisFieldUint32, A0, L); |
25355 | } |
25356 | bool ByteCodeEmitter::emitInitThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
25357 | return emitOp<uint32_t>(OP_InitThisFieldSint64, A0, L); |
25358 | } |
25359 | bool ByteCodeEmitter::emitInitThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
25360 | return emitOp<uint32_t>(OP_InitThisFieldUint64, A0, L); |
25361 | } |
25362 | bool ByteCodeEmitter::emitInitThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
25363 | return emitOp<uint32_t>(OP_InitThisFieldIntAP, A0, L); |
25364 | } |
25365 | bool ByteCodeEmitter::emitInitThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
25366 | return emitOp<uint32_t>(OP_InitThisFieldIntAPS, A0, L); |
25367 | } |
25368 | bool ByteCodeEmitter::emitInitThisFieldBool( uint32_t A0, const SourceInfo &L) { |
25369 | return emitOp<uint32_t>(OP_InitThisFieldBool, A0, L); |
25370 | } |
25371 | bool ByteCodeEmitter::emitInitThisFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
25372 | return emitOp<uint32_t>(OP_InitThisFieldFixedPoint, A0, L); |
25373 | } |
25374 | bool ByteCodeEmitter::emitInitThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
25375 | return emitOp<uint32_t>(OP_InitThisFieldPtr, A0, L); |
25376 | } |
25377 | bool ByteCodeEmitter::emitInitThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
25378 | return emitOp<uint32_t>(OP_InitThisFieldMemberPtr, A0, L); |
25379 | } |
25380 | bool ByteCodeEmitter::emitInitThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
25381 | return emitOp<uint32_t>(OP_InitThisFieldFloat, A0, L); |
25382 | } |
25383 | #endif |
25384 | #ifdef GET_EVAL_IMPL |
25385 | bool EvalEmitter::emitInitThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
25386 | if (!isActive()) return true; |
25387 | CurrentSource = L; |
25388 | return InitThisField<PT_Sint8>(S, OpPC, A0); |
25389 | } |
25390 | bool EvalEmitter::emitInitThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
25391 | if (!isActive()) return true; |
25392 | CurrentSource = L; |
25393 | return InitThisField<PT_Uint8>(S, OpPC, A0); |
25394 | } |
25395 | bool EvalEmitter::emitInitThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
25396 | if (!isActive()) return true; |
25397 | CurrentSource = L; |
25398 | return InitThisField<PT_Sint16>(S, OpPC, A0); |
25399 | } |
25400 | bool EvalEmitter::emitInitThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
25401 | if (!isActive()) return true; |
25402 | CurrentSource = L; |
25403 | return InitThisField<PT_Uint16>(S, OpPC, A0); |
25404 | } |
25405 | bool EvalEmitter::emitInitThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
25406 | if (!isActive()) return true; |
25407 | CurrentSource = L; |
25408 | return InitThisField<PT_Sint32>(S, OpPC, A0); |
25409 | } |
25410 | bool EvalEmitter::emitInitThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
25411 | if (!isActive()) return true; |
25412 | CurrentSource = L; |
25413 | return InitThisField<PT_Uint32>(S, OpPC, A0); |
25414 | } |
25415 | bool EvalEmitter::emitInitThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
25416 | if (!isActive()) return true; |
25417 | CurrentSource = L; |
25418 | return InitThisField<PT_Sint64>(S, OpPC, A0); |
25419 | } |
25420 | bool EvalEmitter::emitInitThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
25421 | if (!isActive()) return true; |
25422 | CurrentSource = L; |
25423 | return InitThisField<PT_Uint64>(S, OpPC, A0); |
25424 | } |
25425 | bool EvalEmitter::emitInitThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
25426 | if (!isActive()) return true; |
25427 | CurrentSource = L; |
25428 | return InitThisField<PT_IntAP>(S, OpPC, A0); |
25429 | } |
25430 | bool EvalEmitter::emitInitThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
25431 | if (!isActive()) return true; |
25432 | CurrentSource = L; |
25433 | return InitThisField<PT_IntAPS>(S, OpPC, A0); |
25434 | } |
25435 | bool EvalEmitter::emitInitThisFieldBool( uint32_t A0, const SourceInfo &L) { |
25436 | if (!isActive()) return true; |
25437 | CurrentSource = L; |
25438 | return InitThisField<PT_Bool>(S, OpPC, A0); |
25439 | } |
25440 | bool EvalEmitter::emitInitThisFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
25441 | if (!isActive()) return true; |
25442 | CurrentSource = L; |
25443 | return InitThisField<PT_FixedPoint>(S, OpPC, A0); |
25444 | } |
25445 | bool EvalEmitter::emitInitThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
25446 | if (!isActive()) return true; |
25447 | CurrentSource = L; |
25448 | return InitThisField<PT_Ptr>(S, OpPC, A0); |
25449 | } |
25450 | bool EvalEmitter::emitInitThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
25451 | if (!isActive()) return true; |
25452 | CurrentSource = L; |
25453 | return InitThisField<PT_MemberPtr>(S, OpPC, A0); |
25454 | } |
25455 | bool EvalEmitter::emitInitThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
25456 | if (!isActive()) return true; |
25457 | CurrentSource = L; |
25458 | return InitThisField<PT_Float>(S, OpPC, A0); |
25459 | } |
25460 | #endif |
25461 | #ifdef GET_OPCODE_NAMES |
25462 | OP_Inv, |
25463 | #endif |
25464 | #ifdef GET_INTERP |
25465 | case OP_Inv: { |
25466 | if (!Inv(S, OpPC)) |
25467 | return false; |
25468 | continue; |
25469 | } |
25470 | #endif |
25471 | #ifdef GET_DISASM |
25472 | case OP_Inv: |
25473 | Text.Op = PrintName("Inv" ); |
25474 | break; |
25475 | #endif |
25476 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25477 | bool emitInv(const SourceInfo &); |
25478 | #endif |
25479 | #ifdef GET_LINK_IMPL |
25480 | bool ByteCodeEmitter::emitInv(const SourceInfo &L) { |
25481 | return emitOp<>(OP_Inv, L); |
25482 | } |
25483 | #endif |
25484 | #ifdef GET_EVAL_IMPL |
25485 | bool EvalEmitter::emitInv(const SourceInfo &L) { |
25486 | if (!isActive()) return true; |
25487 | CurrentSource = L; |
25488 | return Inv(S, OpPC); |
25489 | } |
25490 | #endif |
25491 | #ifdef GET_OPCODE_NAMES |
25492 | OP_Invalid, |
25493 | #endif |
25494 | #ifdef GET_INTERP |
25495 | case OP_Invalid: { |
25496 | if (!Invalid(S, OpPC)) |
25497 | return false; |
25498 | continue; |
25499 | } |
25500 | #endif |
25501 | #ifdef GET_DISASM |
25502 | case OP_Invalid: |
25503 | Text.Op = PrintName("Invalid" ); |
25504 | break; |
25505 | #endif |
25506 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25507 | bool emitInvalid(const SourceInfo &); |
25508 | #endif |
25509 | #ifdef GET_LINK_IMPL |
25510 | bool ByteCodeEmitter::emitInvalid(const SourceInfo &L) { |
25511 | return emitOp<>(OP_Invalid, L); |
25512 | } |
25513 | #endif |
25514 | #ifdef GET_EVAL_IMPL |
25515 | bool EvalEmitter::emitInvalid(const SourceInfo &L) { |
25516 | if (!isActive()) return true; |
25517 | CurrentSource = L; |
25518 | return Invalid(S, OpPC); |
25519 | } |
25520 | #endif |
25521 | #ifdef GET_OPCODE_NAMES |
25522 | OP_InvalidCast, |
25523 | #endif |
25524 | #ifdef GET_INTERP |
25525 | case OP_InvalidCast: { |
25526 | const auto V0 = ReadArg<interp::CastKind>(S, PC); |
25527 | const auto V1 = ReadArg<bool>(S, PC); |
25528 | if (!InvalidCast(S, OpPC, V0, V1)) |
25529 | return false; |
25530 | continue; |
25531 | } |
25532 | #endif |
25533 | #ifdef GET_DISASM |
25534 | case OP_InvalidCast: |
25535 | Text.Op = PrintName("InvalidCast" ); |
25536 | Text.Args.push_back(printArg<interp::CastKind>(P, PC)); |
25537 | Text.Args.push_back(printArg<bool>(P, PC)); |
25538 | break; |
25539 | #endif |
25540 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25541 | bool emitInvalidCast( interp::CastKind , bool , const SourceInfo &); |
25542 | #endif |
25543 | #ifdef GET_LINK_IMPL |
25544 | bool ByteCodeEmitter::emitInvalidCast( interp::CastKind A0, bool A1, const SourceInfo &L) { |
25545 | return emitOp<interp::CastKind, bool>(OP_InvalidCast, A0, A1, L); |
25546 | } |
25547 | #endif |
25548 | #ifdef GET_EVAL_IMPL |
25549 | bool EvalEmitter::emitInvalidCast( interp::CastKind A0, bool A1, const SourceInfo &L) { |
25550 | if (!isActive()) return true; |
25551 | CurrentSource = L; |
25552 | return InvalidCast(S, OpPC, A0, A1); |
25553 | } |
25554 | #endif |
25555 | #ifdef GET_OPCODE_NAMES |
25556 | OP_InvalidDeclRef, |
25557 | #endif |
25558 | #ifdef GET_INTERP |
25559 | case OP_InvalidDeclRef: { |
25560 | const auto V0 = ReadArg<const DeclRefExpr *>(S, PC); |
25561 | const auto V1 = ReadArg<bool>(S, PC); |
25562 | if (!InvalidDeclRef(S, OpPC, V0, V1)) |
25563 | return false; |
25564 | continue; |
25565 | } |
25566 | #endif |
25567 | #ifdef GET_DISASM |
25568 | case OP_InvalidDeclRef: |
25569 | Text.Op = PrintName("InvalidDeclRef" ); |
25570 | Text.Args.push_back(printArg<const DeclRefExpr *>(P, PC)); |
25571 | Text.Args.push_back(printArg<bool>(P, PC)); |
25572 | break; |
25573 | #endif |
25574 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25575 | bool emitInvalidDeclRef( const DeclRefExpr * , bool , const SourceInfo &); |
25576 | #endif |
25577 | #ifdef GET_LINK_IMPL |
25578 | bool ByteCodeEmitter::emitInvalidDeclRef( const DeclRefExpr * A0, bool A1, const SourceInfo &L) { |
25579 | return emitOp<const DeclRefExpr *, bool>(OP_InvalidDeclRef, A0, A1, L); |
25580 | } |
25581 | #endif |
25582 | #ifdef GET_EVAL_IMPL |
25583 | bool EvalEmitter::emitInvalidDeclRef( const DeclRefExpr * A0, bool A1, const SourceInfo &L) { |
25584 | if (!isActive()) return true; |
25585 | CurrentSource = L; |
25586 | return InvalidDeclRef(S, OpPC, A0, A1); |
25587 | } |
25588 | #endif |
25589 | #ifdef GET_OPCODE_NAMES |
25590 | OP_InvalidNewDeleteExpr, |
25591 | #endif |
25592 | #ifdef GET_INTERP |
25593 | case OP_InvalidNewDeleteExpr: { |
25594 | const auto V0 = ReadArg<const Expr *>(S, PC); |
25595 | if (!InvalidNewDeleteExpr(S, OpPC, V0)) |
25596 | return false; |
25597 | continue; |
25598 | } |
25599 | #endif |
25600 | #ifdef GET_DISASM |
25601 | case OP_InvalidNewDeleteExpr: |
25602 | Text.Op = PrintName("InvalidNewDeleteExpr" ); |
25603 | Text.Args.push_back(printArg<const Expr *>(P, PC)); |
25604 | break; |
25605 | #endif |
25606 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25607 | bool emitInvalidNewDeleteExpr( const Expr * , const SourceInfo &); |
25608 | #endif |
25609 | #ifdef GET_LINK_IMPL |
25610 | bool ByteCodeEmitter::emitInvalidNewDeleteExpr( const Expr * A0, const SourceInfo &L) { |
25611 | return emitOp<const Expr *>(OP_InvalidNewDeleteExpr, A0, L); |
25612 | } |
25613 | #endif |
25614 | #ifdef GET_EVAL_IMPL |
25615 | bool EvalEmitter::emitInvalidNewDeleteExpr( const Expr * A0, const SourceInfo &L) { |
25616 | if (!isActive()) return true; |
25617 | CurrentSource = L; |
25618 | return InvalidNewDeleteExpr(S, OpPC, A0); |
25619 | } |
25620 | #endif |
25621 | #ifdef GET_OPCODE_NAMES |
25622 | OP_InvalidShuffleVectorIndex, |
25623 | #endif |
25624 | #ifdef GET_INTERP |
25625 | case OP_InvalidShuffleVectorIndex: { |
25626 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25627 | if (!InvalidShuffleVectorIndex(S, OpPC, V0)) |
25628 | return false; |
25629 | continue; |
25630 | } |
25631 | #endif |
25632 | #ifdef GET_DISASM |
25633 | case OP_InvalidShuffleVectorIndex: |
25634 | Text.Op = PrintName("InvalidShuffleVectorIndex" ); |
25635 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
25636 | break; |
25637 | #endif |
25638 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25639 | bool emitInvalidShuffleVectorIndex( uint32_t , const SourceInfo &); |
25640 | #endif |
25641 | #ifdef GET_LINK_IMPL |
25642 | bool ByteCodeEmitter::emitInvalidShuffleVectorIndex( uint32_t A0, const SourceInfo &L) { |
25643 | return emitOp<uint32_t>(OP_InvalidShuffleVectorIndex, A0, L); |
25644 | } |
25645 | #endif |
25646 | #ifdef GET_EVAL_IMPL |
25647 | bool EvalEmitter::emitInvalidShuffleVectorIndex( uint32_t A0, const SourceInfo &L) { |
25648 | if (!isActive()) return true; |
25649 | CurrentSource = L; |
25650 | return InvalidShuffleVectorIndex(S, OpPC, A0); |
25651 | } |
25652 | #endif |
25653 | #ifdef GET_OPCODE_NAMES |
25654 | OP_IsConstantContext, |
25655 | #endif |
25656 | #ifdef GET_INTERP |
25657 | case OP_IsConstantContext: { |
25658 | if (!IsConstantContext(S, OpPC)) |
25659 | return false; |
25660 | continue; |
25661 | } |
25662 | #endif |
25663 | #ifdef GET_DISASM |
25664 | case OP_IsConstantContext: |
25665 | Text.Op = PrintName("IsConstantContext" ); |
25666 | break; |
25667 | #endif |
25668 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25669 | bool emitIsConstantContext(const SourceInfo &); |
25670 | #endif |
25671 | #ifdef GET_LINK_IMPL |
25672 | bool ByteCodeEmitter::emitIsConstantContext(const SourceInfo &L) { |
25673 | return emitOp<>(OP_IsConstantContext, L); |
25674 | } |
25675 | #endif |
25676 | #ifdef GET_EVAL_IMPL |
25677 | bool EvalEmitter::emitIsConstantContext(const SourceInfo &L) { |
25678 | if (!isActive()) return true; |
25679 | CurrentSource = L; |
25680 | return IsConstantContext(S, OpPC); |
25681 | } |
25682 | #endif |
25683 | #ifdef GET_OPCODE_NAMES |
25684 | OP_IsNonNullPtr, |
25685 | OP_IsNonNullMemberPtr, |
25686 | #endif |
25687 | #ifdef GET_INTERP |
25688 | case OP_IsNonNullPtr: { |
25689 | if (!IsNonNull<PT_Ptr>(S, OpPC)) |
25690 | return false; |
25691 | continue; |
25692 | } |
25693 | case OP_IsNonNullMemberPtr: { |
25694 | if (!IsNonNull<PT_MemberPtr>(S, OpPC)) |
25695 | return false; |
25696 | continue; |
25697 | } |
25698 | #endif |
25699 | #ifdef GET_DISASM |
25700 | case OP_IsNonNullPtr: |
25701 | Text.Op = PrintName("IsNonNullPtr" ); |
25702 | break; |
25703 | case OP_IsNonNullMemberPtr: |
25704 | Text.Op = PrintName("IsNonNullMemberPtr" ); |
25705 | break; |
25706 | #endif |
25707 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25708 | bool emitIsNonNullPtr(const SourceInfo &); |
25709 | bool emitIsNonNullMemberPtr(const SourceInfo &); |
25710 | #endif |
25711 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25712 | [[nodiscard]] bool emitIsNonNull(PrimType, const SourceInfo &I); |
25713 | #endif |
25714 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
25715 | bool |
25716 | #if defined(GET_EVAL_IMPL) |
25717 | EvalEmitter |
25718 | #else |
25719 | ByteCodeEmitter |
25720 | #endif |
25721 | ::emitIsNonNull(PrimType T0, const SourceInfo &I) { |
25722 | switch (T0) { |
25723 | case PT_Ptr: |
25724 | return emitIsNonNullPtr(I); |
25725 | case PT_MemberPtr: |
25726 | return emitIsNonNullMemberPtr(I); |
25727 | default: llvm_unreachable("invalid type: emitIsNonNull" ); |
25728 | } |
25729 | llvm_unreachable("invalid enum value" ); |
25730 | } |
25731 | #endif |
25732 | #ifdef GET_LINK_IMPL |
25733 | bool ByteCodeEmitter::emitIsNonNullPtr(const SourceInfo &L) { |
25734 | return emitOp<>(OP_IsNonNullPtr, L); |
25735 | } |
25736 | bool ByteCodeEmitter::emitIsNonNullMemberPtr(const SourceInfo &L) { |
25737 | return emitOp<>(OP_IsNonNullMemberPtr, L); |
25738 | } |
25739 | #endif |
25740 | #ifdef GET_EVAL_IMPL |
25741 | bool EvalEmitter::emitIsNonNullPtr(const SourceInfo &L) { |
25742 | if (!isActive()) return true; |
25743 | CurrentSource = L; |
25744 | return IsNonNull<PT_Ptr>(S, OpPC); |
25745 | } |
25746 | bool EvalEmitter::emitIsNonNullMemberPtr(const SourceInfo &L) { |
25747 | if (!isActive()) return true; |
25748 | CurrentSource = L; |
25749 | return IsNonNull<PT_MemberPtr>(S, OpPC); |
25750 | } |
25751 | #endif |
25752 | #ifdef GET_OPCODE_NAMES |
25753 | OP_Jf, |
25754 | #endif |
25755 | #ifdef GET_INTERP |
25756 | case OP_Jf: { |
25757 | const auto V0 = ReadArg<int32_t>(S, PC); |
25758 | if (!Jf(S, PC, V0)) |
25759 | return false; |
25760 | continue; |
25761 | } |
25762 | #endif |
25763 | #ifdef GET_DISASM |
25764 | case OP_Jf: |
25765 | Text.Op = PrintName("Jf" ); |
25766 | Text.Args.push_back(printArg<int32_t>(P, PC)); |
25767 | break; |
25768 | #endif |
25769 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25770 | bool emitJf( int32_t , const SourceInfo &); |
25771 | #endif |
25772 | #ifdef GET_LINK_IMPL |
25773 | bool ByteCodeEmitter::emitJf( int32_t A0, const SourceInfo &L) { |
25774 | return emitOp<int32_t>(OP_Jf, A0, L); |
25775 | } |
25776 | #endif |
25777 | #ifdef GET_OPCODE_NAMES |
25778 | OP_Jmp, |
25779 | #endif |
25780 | #ifdef GET_INTERP |
25781 | case OP_Jmp: { |
25782 | const auto V0 = ReadArg<int32_t>(S, PC); |
25783 | if (!Jmp(S, PC, V0)) |
25784 | return false; |
25785 | continue; |
25786 | } |
25787 | #endif |
25788 | #ifdef GET_DISASM |
25789 | case OP_Jmp: |
25790 | Text.Op = PrintName("Jmp" ); |
25791 | Text.Args.push_back(printArg<int32_t>(P, PC)); |
25792 | break; |
25793 | #endif |
25794 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25795 | bool emitJmp( int32_t , const SourceInfo &); |
25796 | #endif |
25797 | #ifdef GET_LINK_IMPL |
25798 | bool ByteCodeEmitter::emitJmp( int32_t A0, const SourceInfo &L) { |
25799 | return emitOp<int32_t>(OP_Jmp, A0, L); |
25800 | } |
25801 | #endif |
25802 | #ifdef GET_OPCODE_NAMES |
25803 | OP_Jt, |
25804 | #endif |
25805 | #ifdef GET_INTERP |
25806 | case OP_Jt: { |
25807 | const auto V0 = ReadArg<int32_t>(S, PC); |
25808 | if (!Jt(S, PC, V0)) |
25809 | return false; |
25810 | continue; |
25811 | } |
25812 | #endif |
25813 | #ifdef GET_DISASM |
25814 | case OP_Jt: |
25815 | Text.Op = PrintName("Jt" ); |
25816 | Text.Args.push_back(printArg<int32_t>(P, PC)); |
25817 | break; |
25818 | #endif |
25819 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25820 | bool emitJt( int32_t , const SourceInfo &); |
25821 | #endif |
25822 | #ifdef GET_LINK_IMPL |
25823 | bool ByteCodeEmitter::emitJt( int32_t A0, const SourceInfo &L) { |
25824 | return emitOp<int32_t>(OP_Jt, A0, L); |
25825 | } |
25826 | #endif |
25827 | #ifdef GET_OPCODE_NAMES |
25828 | OP_LESint8, |
25829 | OP_LEUint8, |
25830 | OP_LESint16, |
25831 | OP_LEUint16, |
25832 | OP_LESint32, |
25833 | OP_LEUint32, |
25834 | OP_LESint64, |
25835 | OP_LEUint64, |
25836 | OP_LEIntAP, |
25837 | OP_LEIntAPS, |
25838 | OP_LEBool, |
25839 | OP_LEFixedPoint, |
25840 | OP_LEPtr, |
25841 | OP_LEFloat, |
25842 | #endif |
25843 | #ifdef GET_INTERP |
25844 | case OP_LESint8: { |
25845 | if (!LE<PT_Sint8>(S, OpPC)) |
25846 | return false; |
25847 | continue; |
25848 | } |
25849 | case OP_LEUint8: { |
25850 | if (!LE<PT_Uint8>(S, OpPC)) |
25851 | return false; |
25852 | continue; |
25853 | } |
25854 | case OP_LESint16: { |
25855 | if (!LE<PT_Sint16>(S, OpPC)) |
25856 | return false; |
25857 | continue; |
25858 | } |
25859 | case OP_LEUint16: { |
25860 | if (!LE<PT_Uint16>(S, OpPC)) |
25861 | return false; |
25862 | continue; |
25863 | } |
25864 | case OP_LESint32: { |
25865 | if (!LE<PT_Sint32>(S, OpPC)) |
25866 | return false; |
25867 | continue; |
25868 | } |
25869 | case OP_LEUint32: { |
25870 | if (!LE<PT_Uint32>(S, OpPC)) |
25871 | return false; |
25872 | continue; |
25873 | } |
25874 | case OP_LESint64: { |
25875 | if (!LE<PT_Sint64>(S, OpPC)) |
25876 | return false; |
25877 | continue; |
25878 | } |
25879 | case OP_LEUint64: { |
25880 | if (!LE<PT_Uint64>(S, OpPC)) |
25881 | return false; |
25882 | continue; |
25883 | } |
25884 | case OP_LEIntAP: { |
25885 | if (!LE<PT_IntAP>(S, OpPC)) |
25886 | return false; |
25887 | continue; |
25888 | } |
25889 | case OP_LEIntAPS: { |
25890 | if (!LE<PT_IntAPS>(S, OpPC)) |
25891 | return false; |
25892 | continue; |
25893 | } |
25894 | case OP_LEBool: { |
25895 | if (!LE<PT_Bool>(S, OpPC)) |
25896 | return false; |
25897 | continue; |
25898 | } |
25899 | case OP_LEFixedPoint: { |
25900 | if (!LE<PT_FixedPoint>(S, OpPC)) |
25901 | return false; |
25902 | continue; |
25903 | } |
25904 | case OP_LEPtr: { |
25905 | if (!LE<PT_Ptr>(S, OpPC)) |
25906 | return false; |
25907 | continue; |
25908 | } |
25909 | case OP_LEFloat: { |
25910 | if (!LE<PT_Float>(S, OpPC)) |
25911 | return false; |
25912 | continue; |
25913 | } |
25914 | #endif |
25915 | #ifdef GET_DISASM |
25916 | case OP_LESint8: |
25917 | Text.Op = PrintName("LESint8" ); |
25918 | break; |
25919 | case OP_LEUint8: |
25920 | Text.Op = PrintName("LEUint8" ); |
25921 | break; |
25922 | case OP_LESint16: |
25923 | Text.Op = PrintName("LESint16" ); |
25924 | break; |
25925 | case OP_LEUint16: |
25926 | Text.Op = PrintName("LEUint16" ); |
25927 | break; |
25928 | case OP_LESint32: |
25929 | Text.Op = PrintName("LESint32" ); |
25930 | break; |
25931 | case OP_LEUint32: |
25932 | Text.Op = PrintName("LEUint32" ); |
25933 | break; |
25934 | case OP_LESint64: |
25935 | Text.Op = PrintName("LESint64" ); |
25936 | break; |
25937 | case OP_LEUint64: |
25938 | Text.Op = PrintName("LEUint64" ); |
25939 | break; |
25940 | case OP_LEIntAP: |
25941 | Text.Op = PrintName("LEIntAP" ); |
25942 | break; |
25943 | case OP_LEIntAPS: |
25944 | Text.Op = PrintName("LEIntAPS" ); |
25945 | break; |
25946 | case OP_LEBool: |
25947 | Text.Op = PrintName("LEBool" ); |
25948 | break; |
25949 | case OP_LEFixedPoint: |
25950 | Text.Op = PrintName("LEFixedPoint" ); |
25951 | break; |
25952 | case OP_LEPtr: |
25953 | Text.Op = PrintName("LEPtr" ); |
25954 | break; |
25955 | case OP_LEFloat: |
25956 | Text.Op = PrintName("LEFloat" ); |
25957 | break; |
25958 | #endif |
25959 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25960 | bool emitLESint8(const SourceInfo &); |
25961 | bool emitLEUint8(const SourceInfo &); |
25962 | bool emitLESint16(const SourceInfo &); |
25963 | bool emitLEUint16(const SourceInfo &); |
25964 | bool emitLESint32(const SourceInfo &); |
25965 | bool emitLEUint32(const SourceInfo &); |
25966 | bool emitLESint64(const SourceInfo &); |
25967 | bool emitLEUint64(const SourceInfo &); |
25968 | bool emitLEIntAP(const SourceInfo &); |
25969 | bool emitLEIntAPS(const SourceInfo &); |
25970 | bool emitLEBool(const SourceInfo &); |
25971 | bool emitLEFixedPoint(const SourceInfo &); |
25972 | bool emitLEPtr(const SourceInfo &); |
25973 | bool emitLEFloat(const SourceInfo &); |
25974 | #endif |
25975 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25976 | [[nodiscard]] bool emitLE(PrimType, const SourceInfo &I); |
25977 | #endif |
25978 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
25979 | bool |
25980 | #if defined(GET_EVAL_IMPL) |
25981 | EvalEmitter |
25982 | #else |
25983 | ByteCodeEmitter |
25984 | #endif |
25985 | ::emitLE(PrimType T0, const SourceInfo &I) { |
25986 | switch (T0) { |
25987 | case PT_Sint8: |
25988 | return emitLESint8(I); |
25989 | case PT_Uint8: |
25990 | return emitLEUint8(I); |
25991 | case PT_Sint16: |
25992 | return emitLESint16(I); |
25993 | case PT_Uint16: |
25994 | return emitLEUint16(I); |
25995 | case PT_Sint32: |
25996 | return emitLESint32(I); |
25997 | case PT_Uint32: |
25998 | return emitLEUint32(I); |
25999 | case PT_Sint64: |
26000 | return emitLESint64(I); |
26001 | case PT_Uint64: |
26002 | return emitLEUint64(I); |
26003 | case PT_IntAP: |
26004 | return emitLEIntAP(I); |
26005 | case PT_IntAPS: |
26006 | return emitLEIntAPS(I); |
26007 | case PT_Bool: |
26008 | return emitLEBool(I); |
26009 | case PT_FixedPoint: |
26010 | return emitLEFixedPoint(I); |
26011 | case PT_Ptr: |
26012 | return emitLEPtr(I); |
26013 | case PT_Float: |
26014 | return emitLEFloat(I); |
26015 | default: llvm_unreachable("invalid type: emitLE" ); |
26016 | } |
26017 | llvm_unreachable("invalid enum value" ); |
26018 | } |
26019 | #endif |
26020 | #ifdef GET_LINK_IMPL |
26021 | bool ByteCodeEmitter::emitLESint8(const SourceInfo &L) { |
26022 | return emitOp<>(OP_LESint8, L); |
26023 | } |
26024 | bool ByteCodeEmitter::emitLEUint8(const SourceInfo &L) { |
26025 | return emitOp<>(OP_LEUint8, L); |
26026 | } |
26027 | bool ByteCodeEmitter::emitLESint16(const SourceInfo &L) { |
26028 | return emitOp<>(OP_LESint16, L); |
26029 | } |
26030 | bool ByteCodeEmitter::emitLEUint16(const SourceInfo &L) { |
26031 | return emitOp<>(OP_LEUint16, L); |
26032 | } |
26033 | bool ByteCodeEmitter::emitLESint32(const SourceInfo &L) { |
26034 | return emitOp<>(OP_LESint32, L); |
26035 | } |
26036 | bool ByteCodeEmitter::emitLEUint32(const SourceInfo &L) { |
26037 | return emitOp<>(OP_LEUint32, L); |
26038 | } |
26039 | bool ByteCodeEmitter::emitLESint64(const SourceInfo &L) { |
26040 | return emitOp<>(OP_LESint64, L); |
26041 | } |
26042 | bool ByteCodeEmitter::emitLEUint64(const SourceInfo &L) { |
26043 | return emitOp<>(OP_LEUint64, L); |
26044 | } |
26045 | bool ByteCodeEmitter::emitLEIntAP(const SourceInfo &L) { |
26046 | return emitOp<>(OP_LEIntAP, L); |
26047 | } |
26048 | bool ByteCodeEmitter::emitLEIntAPS(const SourceInfo &L) { |
26049 | return emitOp<>(OP_LEIntAPS, L); |
26050 | } |
26051 | bool ByteCodeEmitter::emitLEBool(const SourceInfo &L) { |
26052 | return emitOp<>(OP_LEBool, L); |
26053 | } |
26054 | bool ByteCodeEmitter::emitLEFixedPoint(const SourceInfo &L) { |
26055 | return emitOp<>(OP_LEFixedPoint, L); |
26056 | } |
26057 | bool ByteCodeEmitter::emitLEPtr(const SourceInfo &L) { |
26058 | return emitOp<>(OP_LEPtr, L); |
26059 | } |
26060 | bool ByteCodeEmitter::emitLEFloat(const SourceInfo &L) { |
26061 | return emitOp<>(OP_LEFloat, L); |
26062 | } |
26063 | #endif |
26064 | #ifdef GET_EVAL_IMPL |
26065 | bool EvalEmitter::emitLESint8(const SourceInfo &L) { |
26066 | if (!isActive()) return true; |
26067 | CurrentSource = L; |
26068 | return LE<PT_Sint8>(S, OpPC); |
26069 | } |
26070 | bool EvalEmitter::emitLEUint8(const SourceInfo &L) { |
26071 | if (!isActive()) return true; |
26072 | CurrentSource = L; |
26073 | return LE<PT_Uint8>(S, OpPC); |
26074 | } |
26075 | bool EvalEmitter::emitLESint16(const SourceInfo &L) { |
26076 | if (!isActive()) return true; |
26077 | CurrentSource = L; |
26078 | return LE<PT_Sint16>(S, OpPC); |
26079 | } |
26080 | bool EvalEmitter::emitLEUint16(const SourceInfo &L) { |
26081 | if (!isActive()) return true; |
26082 | CurrentSource = L; |
26083 | return LE<PT_Uint16>(S, OpPC); |
26084 | } |
26085 | bool EvalEmitter::emitLESint32(const SourceInfo &L) { |
26086 | if (!isActive()) return true; |
26087 | CurrentSource = L; |
26088 | return LE<PT_Sint32>(S, OpPC); |
26089 | } |
26090 | bool EvalEmitter::emitLEUint32(const SourceInfo &L) { |
26091 | if (!isActive()) return true; |
26092 | CurrentSource = L; |
26093 | return LE<PT_Uint32>(S, OpPC); |
26094 | } |
26095 | bool EvalEmitter::emitLESint64(const SourceInfo &L) { |
26096 | if (!isActive()) return true; |
26097 | CurrentSource = L; |
26098 | return LE<PT_Sint64>(S, OpPC); |
26099 | } |
26100 | bool EvalEmitter::emitLEUint64(const SourceInfo &L) { |
26101 | if (!isActive()) return true; |
26102 | CurrentSource = L; |
26103 | return LE<PT_Uint64>(S, OpPC); |
26104 | } |
26105 | bool EvalEmitter::emitLEIntAP(const SourceInfo &L) { |
26106 | if (!isActive()) return true; |
26107 | CurrentSource = L; |
26108 | return LE<PT_IntAP>(S, OpPC); |
26109 | } |
26110 | bool EvalEmitter::emitLEIntAPS(const SourceInfo &L) { |
26111 | if (!isActive()) return true; |
26112 | CurrentSource = L; |
26113 | return LE<PT_IntAPS>(S, OpPC); |
26114 | } |
26115 | bool EvalEmitter::emitLEBool(const SourceInfo &L) { |
26116 | if (!isActive()) return true; |
26117 | CurrentSource = L; |
26118 | return LE<PT_Bool>(S, OpPC); |
26119 | } |
26120 | bool EvalEmitter::emitLEFixedPoint(const SourceInfo &L) { |
26121 | if (!isActive()) return true; |
26122 | CurrentSource = L; |
26123 | return LE<PT_FixedPoint>(S, OpPC); |
26124 | } |
26125 | bool EvalEmitter::emitLEPtr(const SourceInfo &L) { |
26126 | if (!isActive()) return true; |
26127 | CurrentSource = L; |
26128 | return LE<PT_Ptr>(S, OpPC); |
26129 | } |
26130 | bool EvalEmitter::emitLEFloat(const SourceInfo &L) { |
26131 | if (!isActive()) return true; |
26132 | CurrentSource = L; |
26133 | return LE<PT_Float>(S, OpPC); |
26134 | } |
26135 | #endif |
26136 | #ifdef GET_OPCODE_NAMES |
26137 | OP_LTSint8, |
26138 | OP_LTUint8, |
26139 | OP_LTSint16, |
26140 | OP_LTUint16, |
26141 | OP_LTSint32, |
26142 | OP_LTUint32, |
26143 | OP_LTSint64, |
26144 | OP_LTUint64, |
26145 | OP_LTIntAP, |
26146 | OP_LTIntAPS, |
26147 | OP_LTBool, |
26148 | OP_LTFixedPoint, |
26149 | OP_LTPtr, |
26150 | OP_LTFloat, |
26151 | #endif |
26152 | #ifdef GET_INTERP |
26153 | case OP_LTSint8: { |
26154 | if (!LT<PT_Sint8>(S, OpPC)) |
26155 | return false; |
26156 | continue; |
26157 | } |
26158 | case OP_LTUint8: { |
26159 | if (!LT<PT_Uint8>(S, OpPC)) |
26160 | return false; |
26161 | continue; |
26162 | } |
26163 | case OP_LTSint16: { |
26164 | if (!LT<PT_Sint16>(S, OpPC)) |
26165 | return false; |
26166 | continue; |
26167 | } |
26168 | case OP_LTUint16: { |
26169 | if (!LT<PT_Uint16>(S, OpPC)) |
26170 | return false; |
26171 | continue; |
26172 | } |
26173 | case OP_LTSint32: { |
26174 | if (!LT<PT_Sint32>(S, OpPC)) |
26175 | return false; |
26176 | continue; |
26177 | } |
26178 | case OP_LTUint32: { |
26179 | if (!LT<PT_Uint32>(S, OpPC)) |
26180 | return false; |
26181 | continue; |
26182 | } |
26183 | case OP_LTSint64: { |
26184 | if (!LT<PT_Sint64>(S, OpPC)) |
26185 | return false; |
26186 | continue; |
26187 | } |
26188 | case OP_LTUint64: { |
26189 | if (!LT<PT_Uint64>(S, OpPC)) |
26190 | return false; |
26191 | continue; |
26192 | } |
26193 | case OP_LTIntAP: { |
26194 | if (!LT<PT_IntAP>(S, OpPC)) |
26195 | return false; |
26196 | continue; |
26197 | } |
26198 | case OP_LTIntAPS: { |
26199 | if (!LT<PT_IntAPS>(S, OpPC)) |
26200 | return false; |
26201 | continue; |
26202 | } |
26203 | case OP_LTBool: { |
26204 | if (!LT<PT_Bool>(S, OpPC)) |
26205 | return false; |
26206 | continue; |
26207 | } |
26208 | case OP_LTFixedPoint: { |
26209 | if (!LT<PT_FixedPoint>(S, OpPC)) |
26210 | return false; |
26211 | continue; |
26212 | } |
26213 | case OP_LTPtr: { |
26214 | if (!LT<PT_Ptr>(S, OpPC)) |
26215 | return false; |
26216 | continue; |
26217 | } |
26218 | case OP_LTFloat: { |
26219 | if (!LT<PT_Float>(S, OpPC)) |
26220 | return false; |
26221 | continue; |
26222 | } |
26223 | #endif |
26224 | #ifdef GET_DISASM |
26225 | case OP_LTSint8: |
26226 | Text.Op = PrintName("LTSint8" ); |
26227 | break; |
26228 | case OP_LTUint8: |
26229 | Text.Op = PrintName("LTUint8" ); |
26230 | break; |
26231 | case OP_LTSint16: |
26232 | Text.Op = PrintName("LTSint16" ); |
26233 | break; |
26234 | case OP_LTUint16: |
26235 | Text.Op = PrintName("LTUint16" ); |
26236 | break; |
26237 | case OP_LTSint32: |
26238 | Text.Op = PrintName("LTSint32" ); |
26239 | break; |
26240 | case OP_LTUint32: |
26241 | Text.Op = PrintName("LTUint32" ); |
26242 | break; |
26243 | case OP_LTSint64: |
26244 | Text.Op = PrintName("LTSint64" ); |
26245 | break; |
26246 | case OP_LTUint64: |
26247 | Text.Op = PrintName("LTUint64" ); |
26248 | break; |
26249 | case OP_LTIntAP: |
26250 | Text.Op = PrintName("LTIntAP" ); |
26251 | break; |
26252 | case OP_LTIntAPS: |
26253 | Text.Op = PrintName("LTIntAPS" ); |
26254 | break; |
26255 | case OP_LTBool: |
26256 | Text.Op = PrintName("LTBool" ); |
26257 | break; |
26258 | case OP_LTFixedPoint: |
26259 | Text.Op = PrintName("LTFixedPoint" ); |
26260 | break; |
26261 | case OP_LTPtr: |
26262 | Text.Op = PrintName("LTPtr" ); |
26263 | break; |
26264 | case OP_LTFloat: |
26265 | Text.Op = PrintName("LTFloat" ); |
26266 | break; |
26267 | #endif |
26268 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
26269 | bool emitLTSint8(const SourceInfo &); |
26270 | bool emitLTUint8(const SourceInfo &); |
26271 | bool emitLTSint16(const SourceInfo &); |
26272 | bool emitLTUint16(const SourceInfo &); |
26273 | bool emitLTSint32(const SourceInfo &); |
26274 | bool emitLTUint32(const SourceInfo &); |
26275 | bool emitLTSint64(const SourceInfo &); |
26276 | bool emitLTUint64(const SourceInfo &); |
26277 | bool emitLTIntAP(const SourceInfo &); |
26278 | bool emitLTIntAPS(const SourceInfo &); |
26279 | bool emitLTBool(const SourceInfo &); |
26280 | bool emitLTFixedPoint(const SourceInfo &); |
26281 | bool emitLTPtr(const SourceInfo &); |
26282 | bool emitLTFloat(const SourceInfo &); |
26283 | #endif |
26284 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
26285 | [[nodiscard]] bool emitLT(PrimType, const SourceInfo &I); |
26286 | #endif |
26287 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
26288 | bool |
26289 | #if defined(GET_EVAL_IMPL) |
26290 | EvalEmitter |
26291 | #else |
26292 | ByteCodeEmitter |
26293 | #endif |
26294 | ::emitLT(PrimType T0, const SourceInfo &I) { |
26295 | switch (T0) { |
26296 | case PT_Sint8: |
26297 | return emitLTSint8(I); |
26298 | case PT_Uint8: |
26299 | return emitLTUint8(I); |
26300 | case PT_Sint16: |
26301 | return emitLTSint16(I); |
26302 | case PT_Uint16: |
26303 | return emitLTUint16(I); |
26304 | case PT_Sint32: |
26305 | return emitLTSint32(I); |
26306 | case PT_Uint32: |
26307 | return emitLTUint32(I); |
26308 | case PT_Sint64: |
26309 | return emitLTSint64(I); |
26310 | case PT_Uint64: |
26311 | return emitLTUint64(I); |
26312 | case PT_IntAP: |
26313 | return emitLTIntAP(I); |
26314 | case PT_IntAPS: |
26315 | return emitLTIntAPS(I); |
26316 | case PT_Bool: |
26317 | return emitLTBool(I); |
26318 | case PT_FixedPoint: |
26319 | return emitLTFixedPoint(I); |
26320 | case PT_Ptr: |
26321 | return emitLTPtr(I); |
26322 | case PT_Float: |
26323 | return emitLTFloat(I); |
26324 | default: llvm_unreachable("invalid type: emitLT" ); |
26325 | } |
26326 | llvm_unreachable("invalid enum value" ); |
26327 | } |
26328 | #endif |
26329 | #ifdef GET_LINK_IMPL |
26330 | bool ByteCodeEmitter::emitLTSint8(const SourceInfo &L) { |
26331 | return emitOp<>(OP_LTSint8, L); |
26332 | } |
26333 | bool ByteCodeEmitter::emitLTUint8(const SourceInfo &L) { |
26334 | return emitOp<>(OP_LTUint8, L); |
26335 | } |
26336 | bool ByteCodeEmitter::emitLTSint16(const SourceInfo &L) { |
26337 | return emitOp<>(OP_LTSint16, L); |
26338 | } |
26339 | bool ByteCodeEmitter::emitLTUint16(const SourceInfo &L) { |
26340 | return emitOp<>(OP_LTUint16, L); |
26341 | } |
26342 | bool ByteCodeEmitter::emitLTSint32(const SourceInfo &L) { |
26343 | return emitOp<>(OP_LTSint32, L); |
26344 | } |
26345 | bool ByteCodeEmitter::emitLTUint32(const SourceInfo &L) { |
26346 | return emitOp<>(OP_LTUint32, L); |
26347 | } |
26348 | bool ByteCodeEmitter::emitLTSint64(const SourceInfo &L) { |
26349 | return emitOp<>(OP_LTSint64, L); |
26350 | } |
26351 | bool ByteCodeEmitter::emitLTUint64(const SourceInfo &L) { |
26352 | return emitOp<>(OP_LTUint64, L); |
26353 | } |
26354 | bool ByteCodeEmitter::emitLTIntAP(const SourceInfo &L) { |
26355 | return emitOp<>(OP_LTIntAP, L); |
26356 | } |
26357 | bool ByteCodeEmitter::emitLTIntAPS(const SourceInfo &L) { |
26358 | return emitOp<>(OP_LTIntAPS, L); |
26359 | } |
26360 | bool ByteCodeEmitter::emitLTBool(const SourceInfo &L) { |
26361 | return emitOp<>(OP_LTBool, L); |
26362 | } |
26363 | bool ByteCodeEmitter::emitLTFixedPoint(const SourceInfo &L) { |
26364 | return emitOp<>(OP_LTFixedPoint, L); |
26365 | } |
26366 | bool ByteCodeEmitter::emitLTPtr(const SourceInfo &L) { |
26367 | return emitOp<>(OP_LTPtr, L); |
26368 | } |
26369 | bool ByteCodeEmitter::emitLTFloat(const SourceInfo &L) { |
26370 | return emitOp<>(OP_LTFloat, L); |
26371 | } |
26372 | #endif |
26373 | #ifdef GET_EVAL_IMPL |
26374 | bool EvalEmitter::emitLTSint8(const SourceInfo &L) { |
26375 | if (!isActive()) return true; |
26376 | CurrentSource = L; |
26377 | return LT<PT_Sint8>(S, OpPC); |
26378 | } |
26379 | bool EvalEmitter::emitLTUint8(const SourceInfo &L) { |
26380 | if (!isActive()) return true; |
26381 | CurrentSource = L; |
26382 | return LT<PT_Uint8>(S, OpPC); |
26383 | } |
26384 | bool EvalEmitter::emitLTSint16(const SourceInfo &L) { |
26385 | if (!isActive()) return true; |
26386 | CurrentSource = L; |
26387 | return LT<PT_Sint16>(S, OpPC); |
26388 | } |
26389 | bool EvalEmitter::emitLTUint16(const SourceInfo &L) { |
26390 | if (!isActive()) return true; |
26391 | CurrentSource = L; |
26392 | return LT<PT_Uint16>(S, OpPC); |
26393 | } |
26394 | bool EvalEmitter::emitLTSint32(const SourceInfo &L) { |
26395 | if (!isActive()) return true; |
26396 | CurrentSource = L; |
26397 | return LT<PT_Sint32>(S, OpPC); |
26398 | } |
26399 | bool EvalEmitter::emitLTUint32(const SourceInfo &L) { |
26400 | if (!isActive()) return true; |
26401 | CurrentSource = L; |
26402 | return LT<PT_Uint32>(S, OpPC); |
26403 | } |
26404 | bool EvalEmitter::emitLTSint64(const SourceInfo &L) { |
26405 | if (!isActive()) return true; |
26406 | CurrentSource = L; |
26407 | return LT<PT_Sint64>(S, OpPC); |
26408 | } |
26409 | bool EvalEmitter::emitLTUint64(const SourceInfo &L) { |
26410 | if (!isActive()) return true; |
26411 | CurrentSource = L; |
26412 | return LT<PT_Uint64>(S, OpPC); |
26413 | } |
26414 | bool EvalEmitter::emitLTIntAP(const SourceInfo &L) { |
26415 | if (!isActive()) return true; |
26416 | CurrentSource = L; |
26417 | return LT<PT_IntAP>(S, OpPC); |
26418 | } |
26419 | bool EvalEmitter::emitLTIntAPS(const SourceInfo &L) { |
26420 | if (!isActive()) return true; |
26421 | CurrentSource = L; |
26422 | return LT<PT_IntAPS>(S, OpPC); |
26423 | } |
26424 | bool EvalEmitter::emitLTBool(const SourceInfo &L) { |
26425 | if (!isActive()) return true; |
26426 | CurrentSource = L; |
26427 | return LT<PT_Bool>(S, OpPC); |
26428 | } |
26429 | bool EvalEmitter::emitLTFixedPoint(const SourceInfo &L) { |
26430 | if (!isActive()) return true; |
26431 | CurrentSource = L; |
26432 | return LT<PT_FixedPoint>(S, OpPC); |
26433 | } |
26434 | bool EvalEmitter::emitLTPtr(const SourceInfo &L) { |
26435 | if (!isActive()) return true; |
26436 | CurrentSource = L; |
26437 | return LT<PT_Ptr>(S, OpPC); |
26438 | } |
26439 | bool EvalEmitter::emitLTFloat(const SourceInfo &L) { |
26440 | if (!isActive()) return true; |
26441 | CurrentSource = L; |
26442 | return LT<PT_Float>(S, OpPC); |
26443 | } |
26444 | #endif |
26445 | #ifdef GET_OPCODE_NAMES |
26446 | OP_LoadSint8, |
26447 | OP_LoadUint8, |
26448 | OP_LoadSint16, |
26449 | OP_LoadUint16, |
26450 | OP_LoadSint32, |
26451 | OP_LoadUint32, |
26452 | OP_LoadSint64, |
26453 | OP_LoadUint64, |
26454 | OP_LoadIntAP, |
26455 | OP_LoadIntAPS, |
26456 | OP_LoadBool, |
26457 | OP_LoadFixedPoint, |
26458 | OP_LoadPtr, |
26459 | OP_LoadMemberPtr, |
26460 | OP_LoadFloat, |
26461 | #endif |
26462 | #ifdef GET_INTERP |
26463 | case OP_LoadSint8: { |
26464 | if (!Load<PT_Sint8>(S, OpPC)) |
26465 | return false; |
26466 | continue; |
26467 | } |
26468 | case OP_LoadUint8: { |
26469 | if (!Load<PT_Uint8>(S, OpPC)) |
26470 | return false; |
26471 | continue; |
26472 | } |
26473 | case OP_LoadSint16: { |
26474 | if (!Load<PT_Sint16>(S, OpPC)) |
26475 | return false; |
26476 | continue; |
26477 | } |
26478 | case OP_LoadUint16: { |
26479 | if (!Load<PT_Uint16>(S, OpPC)) |
26480 | return false; |
26481 | continue; |
26482 | } |
26483 | case OP_LoadSint32: { |
26484 | if (!Load<PT_Sint32>(S, OpPC)) |
26485 | return false; |
26486 | continue; |
26487 | } |
26488 | case OP_LoadUint32: { |
26489 | if (!Load<PT_Uint32>(S, OpPC)) |
26490 | return false; |
26491 | continue; |
26492 | } |
26493 | case OP_LoadSint64: { |
26494 | if (!Load<PT_Sint64>(S, OpPC)) |
26495 | return false; |
26496 | continue; |
26497 | } |
26498 | case OP_LoadUint64: { |
26499 | if (!Load<PT_Uint64>(S, OpPC)) |
26500 | return false; |
26501 | continue; |
26502 | } |
26503 | case OP_LoadIntAP: { |
26504 | if (!Load<PT_IntAP>(S, OpPC)) |
26505 | return false; |
26506 | continue; |
26507 | } |
26508 | case OP_LoadIntAPS: { |
26509 | if (!Load<PT_IntAPS>(S, OpPC)) |
26510 | return false; |
26511 | continue; |
26512 | } |
26513 | case OP_LoadBool: { |
26514 | if (!Load<PT_Bool>(S, OpPC)) |
26515 | return false; |
26516 | continue; |
26517 | } |
26518 | case OP_LoadFixedPoint: { |
26519 | if (!Load<PT_FixedPoint>(S, OpPC)) |
26520 | return false; |
26521 | continue; |
26522 | } |
26523 | case OP_LoadPtr: { |
26524 | if (!Load<PT_Ptr>(S, OpPC)) |
26525 | return false; |
26526 | continue; |
26527 | } |
26528 | case OP_LoadMemberPtr: { |
26529 | if (!Load<PT_MemberPtr>(S, OpPC)) |
26530 | return false; |
26531 | continue; |
26532 | } |
26533 | case OP_LoadFloat: { |
26534 | if (!Load<PT_Float>(S, OpPC)) |
26535 | return false; |
26536 | continue; |
26537 | } |
26538 | #endif |
26539 | #ifdef GET_DISASM |
26540 | case OP_LoadSint8: |
26541 | Text.Op = PrintName("LoadSint8" ); |
26542 | break; |
26543 | case OP_LoadUint8: |
26544 | Text.Op = PrintName("LoadUint8" ); |
26545 | break; |
26546 | case OP_LoadSint16: |
26547 | Text.Op = PrintName("LoadSint16" ); |
26548 | break; |
26549 | case OP_LoadUint16: |
26550 | Text.Op = PrintName("LoadUint16" ); |
26551 | break; |
26552 | case OP_LoadSint32: |
26553 | Text.Op = PrintName("LoadSint32" ); |
26554 | break; |
26555 | case OP_LoadUint32: |
26556 | Text.Op = PrintName("LoadUint32" ); |
26557 | break; |
26558 | case OP_LoadSint64: |
26559 | Text.Op = PrintName("LoadSint64" ); |
26560 | break; |
26561 | case OP_LoadUint64: |
26562 | Text.Op = PrintName("LoadUint64" ); |
26563 | break; |
26564 | case OP_LoadIntAP: |
26565 | Text.Op = PrintName("LoadIntAP" ); |
26566 | break; |
26567 | case OP_LoadIntAPS: |
26568 | Text.Op = PrintName("LoadIntAPS" ); |
26569 | break; |
26570 | case OP_LoadBool: |
26571 | Text.Op = PrintName("LoadBool" ); |
26572 | break; |
26573 | case OP_LoadFixedPoint: |
26574 | Text.Op = PrintName("LoadFixedPoint" ); |
26575 | break; |
26576 | case OP_LoadPtr: |
26577 | Text.Op = PrintName("LoadPtr" ); |
26578 | break; |
26579 | case OP_LoadMemberPtr: |
26580 | Text.Op = PrintName("LoadMemberPtr" ); |
26581 | break; |
26582 | case OP_LoadFloat: |
26583 | Text.Op = PrintName("LoadFloat" ); |
26584 | break; |
26585 | #endif |
26586 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
26587 | bool emitLoadSint8(const SourceInfo &); |
26588 | bool emitLoadUint8(const SourceInfo &); |
26589 | bool emitLoadSint16(const SourceInfo &); |
26590 | bool emitLoadUint16(const SourceInfo &); |
26591 | bool emitLoadSint32(const SourceInfo &); |
26592 | bool emitLoadUint32(const SourceInfo &); |
26593 | bool emitLoadSint64(const SourceInfo &); |
26594 | bool emitLoadUint64(const SourceInfo &); |
26595 | bool emitLoadIntAP(const SourceInfo &); |
26596 | bool emitLoadIntAPS(const SourceInfo &); |
26597 | bool emitLoadBool(const SourceInfo &); |
26598 | bool emitLoadFixedPoint(const SourceInfo &); |
26599 | bool emitLoadPtr(const SourceInfo &); |
26600 | bool emitLoadMemberPtr(const SourceInfo &); |
26601 | bool emitLoadFloat(const SourceInfo &); |
26602 | #endif |
26603 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
26604 | [[nodiscard]] bool emitLoad(PrimType, const SourceInfo &I); |
26605 | #endif |
26606 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
26607 | bool |
26608 | #if defined(GET_EVAL_IMPL) |
26609 | EvalEmitter |
26610 | #else |
26611 | ByteCodeEmitter |
26612 | #endif |
26613 | ::emitLoad(PrimType T0, const SourceInfo &I) { |
26614 | switch (T0) { |
26615 | case PT_Sint8: |
26616 | return emitLoadSint8(I); |
26617 | case PT_Uint8: |
26618 | return emitLoadUint8(I); |
26619 | case PT_Sint16: |
26620 | return emitLoadSint16(I); |
26621 | case PT_Uint16: |
26622 | return emitLoadUint16(I); |
26623 | case PT_Sint32: |
26624 | return emitLoadSint32(I); |
26625 | case PT_Uint32: |
26626 | return emitLoadUint32(I); |
26627 | case PT_Sint64: |
26628 | return emitLoadSint64(I); |
26629 | case PT_Uint64: |
26630 | return emitLoadUint64(I); |
26631 | case PT_IntAP: |
26632 | return emitLoadIntAP(I); |
26633 | case PT_IntAPS: |
26634 | return emitLoadIntAPS(I); |
26635 | case PT_Bool: |
26636 | return emitLoadBool(I); |
26637 | case PT_FixedPoint: |
26638 | return emitLoadFixedPoint(I); |
26639 | case PT_Ptr: |
26640 | return emitLoadPtr(I); |
26641 | case PT_MemberPtr: |
26642 | return emitLoadMemberPtr(I); |
26643 | case PT_Float: |
26644 | return emitLoadFloat(I); |
26645 | } |
26646 | llvm_unreachable("invalid enum value" ); |
26647 | } |
26648 | #endif |
26649 | #ifdef GET_LINK_IMPL |
26650 | bool ByteCodeEmitter::emitLoadSint8(const SourceInfo &L) { |
26651 | return emitOp<>(OP_LoadSint8, L); |
26652 | } |
26653 | bool ByteCodeEmitter::emitLoadUint8(const SourceInfo &L) { |
26654 | return emitOp<>(OP_LoadUint8, L); |
26655 | } |
26656 | bool ByteCodeEmitter::emitLoadSint16(const SourceInfo &L) { |
26657 | return emitOp<>(OP_LoadSint16, L); |
26658 | } |
26659 | bool ByteCodeEmitter::emitLoadUint16(const SourceInfo &L) { |
26660 | return emitOp<>(OP_LoadUint16, L); |
26661 | } |
26662 | bool ByteCodeEmitter::emitLoadSint32(const SourceInfo &L) { |
26663 | return emitOp<>(OP_LoadSint32, L); |
26664 | } |
26665 | bool ByteCodeEmitter::emitLoadUint32(const SourceInfo &L) { |
26666 | return emitOp<>(OP_LoadUint32, L); |
26667 | } |
26668 | bool ByteCodeEmitter::emitLoadSint64(const SourceInfo &L) { |
26669 | return emitOp<>(OP_LoadSint64, L); |
26670 | } |
26671 | bool ByteCodeEmitter::emitLoadUint64(const SourceInfo &L) { |
26672 | return emitOp<>(OP_LoadUint64, L); |
26673 | } |
26674 | bool ByteCodeEmitter::emitLoadIntAP(const SourceInfo &L) { |
26675 | return emitOp<>(OP_LoadIntAP, L); |
26676 | } |
26677 | bool ByteCodeEmitter::emitLoadIntAPS(const SourceInfo &L) { |
26678 | return emitOp<>(OP_LoadIntAPS, L); |
26679 | } |
26680 | bool ByteCodeEmitter::emitLoadBool(const SourceInfo &L) { |
26681 | return emitOp<>(OP_LoadBool, L); |
26682 | } |
26683 | bool ByteCodeEmitter::emitLoadFixedPoint(const SourceInfo &L) { |
26684 | return emitOp<>(OP_LoadFixedPoint, L); |
26685 | } |
26686 | bool ByteCodeEmitter::emitLoadPtr(const SourceInfo &L) { |
26687 | return emitOp<>(OP_LoadPtr, L); |
26688 | } |
26689 | bool ByteCodeEmitter::emitLoadMemberPtr(const SourceInfo &L) { |
26690 | return emitOp<>(OP_LoadMemberPtr, L); |
26691 | } |
26692 | bool ByteCodeEmitter::emitLoadFloat(const SourceInfo &L) { |
26693 | return emitOp<>(OP_LoadFloat, L); |
26694 | } |
26695 | #endif |
26696 | #ifdef GET_EVAL_IMPL |
26697 | bool EvalEmitter::emitLoadSint8(const SourceInfo &L) { |
26698 | if (!isActive()) return true; |
26699 | CurrentSource = L; |
26700 | return Load<PT_Sint8>(S, OpPC); |
26701 | } |
26702 | bool EvalEmitter::emitLoadUint8(const SourceInfo &L) { |
26703 | if (!isActive()) return true; |
26704 | CurrentSource = L; |
26705 | return Load<PT_Uint8>(S, OpPC); |
26706 | } |
26707 | bool EvalEmitter::emitLoadSint16(const SourceInfo &L) { |
26708 | if (!isActive()) return true; |
26709 | CurrentSource = L; |
26710 | return Load<PT_Sint16>(S, OpPC); |
26711 | } |
26712 | bool EvalEmitter::emitLoadUint16(const SourceInfo &L) { |
26713 | if (!isActive()) return true; |
26714 | CurrentSource = L; |
26715 | return Load<PT_Uint16>(S, OpPC); |
26716 | } |
26717 | bool EvalEmitter::emitLoadSint32(const SourceInfo &L) { |
26718 | if (!isActive()) return true; |
26719 | CurrentSource = L; |
26720 | return Load<PT_Sint32>(S, OpPC); |
26721 | } |
26722 | bool EvalEmitter::emitLoadUint32(const SourceInfo &L) { |
26723 | if (!isActive()) return true; |
26724 | CurrentSource = L; |
26725 | return Load<PT_Uint32>(S, OpPC); |
26726 | } |
26727 | bool EvalEmitter::emitLoadSint64(const SourceInfo &L) { |
26728 | if (!isActive()) return true; |
26729 | CurrentSource = L; |
26730 | return Load<PT_Sint64>(S, OpPC); |
26731 | } |
26732 | bool EvalEmitter::emitLoadUint64(const SourceInfo &L) { |
26733 | if (!isActive()) return true; |
26734 | CurrentSource = L; |
26735 | return Load<PT_Uint64>(S, OpPC); |
26736 | } |
26737 | bool EvalEmitter::emitLoadIntAP(const SourceInfo &L) { |
26738 | if (!isActive()) return true; |
26739 | CurrentSource = L; |
26740 | return Load<PT_IntAP>(S, OpPC); |
26741 | } |
26742 | bool EvalEmitter::emitLoadIntAPS(const SourceInfo &L) { |
26743 | if (!isActive()) return true; |
26744 | CurrentSource = L; |
26745 | return Load<PT_IntAPS>(S, OpPC); |
26746 | } |
26747 | bool EvalEmitter::emitLoadBool(const SourceInfo &L) { |
26748 | if (!isActive()) return true; |
26749 | CurrentSource = L; |
26750 | return Load<PT_Bool>(S, OpPC); |
26751 | } |
26752 | bool EvalEmitter::emitLoadFixedPoint(const SourceInfo &L) { |
26753 | if (!isActive()) return true; |
26754 | CurrentSource = L; |
26755 | return Load<PT_FixedPoint>(S, OpPC); |
26756 | } |
26757 | bool EvalEmitter::emitLoadPtr(const SourceInfo &L) { |
26758 | if (!isActive()) return true; |
26759 | CurrentSource = L; |
26760 | return Load<PT_Ptr>(S, OpPC); |
26761 | } |
26762 | bool EvalEmitter::emitLoadMemberPtr(const SourceInfo &L) { |
26763 | if (!isActive()) return true; |
26764 | CurrentSource = L; |
26765 | return Load<PT_MemberPtr>(S, OpPC); |
26766 | } |
26767 | bool EvalEmitter::emitLoadFloat(const SourceInfo &L) { |
26768 | if (!isActive()) return true; |
26769 | CurrentSource = L; |
26770 | return Load<PT_Float>(S, OpPC); |
26771 | } |
26772 | #endif |
26773 | #ifdef GET_OPCODE_NAMES |
26774 | OP_LoadPopSint8, |
26775 | OP_LoadPopUint8, |
26776 | OP_LoadPopSint16, |
26777 | OP_LoadPopUint16, |
26778 | OP_LoadPopSint32, |
26779 | OP_LoadPopUint32, |
26780 | OP_LoadPopSint64, |
26781 | OP_LoadPopUint64, |
26782 | OP_LoadPopIntAP, |
26783 | OP_LoadPopIntAPS, |
26784 | OP_LoadPopBool, |
26785 | OP_LoadPopFixedPoint, |
26786 | OP_LoadPopPtr, |
26787 | OP_LoadPopMemberPtr, |
26788 | OP_LoadPopFloat, |
26789 | #endif |
26790 | #ifdef GET_INTERP |
26791 | case OP_LoadPopSint8: { |
26792 | if (!LoadPop<PT_Sint8>(S, OpPC)) |
26793 | return false; |
26794 | continue; |
26795 | } |
26796 | case OP_LoadPopUint8: { |
26797 | if (!LoadPop<PT_Uint8>(S, OpPC)) |
26798 | return false; |
26799 | continue; |
26800 | } |
26801 | case OP_LoadPopSint16: { |
26802 | if (!LoadPop<PT_Sint16>(S, OpPC)) |
26803 | return false; |
26804 | continue; |
26805 | } |
26806 | case OP_LoadPopUint16: { |
26807 | if (!LoadPop<PT_Uint16>(S, OpPC)) |
26808 | return false; |
26809 | continue; |
26810 | } |
26811 | case OP_LoadPopSint32: { |
26812 | if (!LoadPop<PT_Sint32>(S, OpPC)) |
26813 | return false; |
26814 | continue; |
26815 | } |
26816 | case OP_LoadPopUint32: { |
26817 | if (!LoadPop<PT_Uint32>(S, OpPC)) |
26818 | return false; |
26819 | continue; |
26820 | } |
26821 | case OP_LoadPopSint64: { |
26822 | if (!LoadPop<PT_Sint64>(S, OpPC)) |
26823 | return false; |
26824 | continue; |
26825 | } |
26826 | case OP_LoadPopUint64: { |
26827 | if (!LoadPop<PT_Uint64>(S, OpPC)) |
26828 | return false; |
26829 | continue; |
26830 | } |
26831 | case OP_LoadPopIntAP: { |
26832 | if (!LoadPop<PT_IntAP>(S, OpPC)) |
26833 | return false; |
26834 | continue; |
26835 | } |
26836 | case OP_LoadPopIntAPS: { |
26837 | if (!LoadPop<PT_IntAPS>(S, OpPC)) |
26838 | return false; |
26839 | continue; |
26840 | } |
26841 | case OP_LoadPopBool: { |
26842 | if (!LoadPop<PT_Bool>(S, OpPC)) |
26843 | return false; |
26844 | continue; |
26845 | } |
26846 | case OP_LoadPopFixedPoint: { |
26847 | if (!LoadPop<PT_FixedPoint>(S, OpPC)) |
26848 | return false; |
26849 | continue; |
26850 | } |
26851 | case OP_LoadPopPtr: { |
26852 | if (!LoadPop<PT_Ptr>(S, OpPC)) |
26853 | return false; |
26854 | continue; |
26855 | } |
26856 | case OP_LoadPopMemberPtr: { |
26857 | if (!LoadPop<PT_MemberPtr>(S, OpPC)) |
26858 | return false; |
26859 | continue; |
26860 | } |
26861 | case OP_LoadPopFloat: { |
26862 | if (!LoadPop<PT_Float>(S, OpPC)) |
26863 | return false; |
26864 | continue; |
26865 | } |
26866 | #endif |
26867 | #ifdef GET_DISASM |
26868 | case OP_LoadPopSint8: |
26869 | Text.Op = PrintName("LoadPopSint8" ); |
26870 | break; |
26871 | case OP_LoadPopUint8: |
26872 | Text.Op = PrintName("LoadPopUint8" ); |
26873 | break; |
26874 | case OP_LoadPopSint16: |
26875 | Text.Op = PrintName("LoadPopSint16" ); |
26876 | break; |
26877 | case OP_LoadPopUint16: |
26878 | Text.Op = PrintName("LoadPopUint16" ); |
26879 | break; |
26880 | case OP_LoadPopSint32: |
26881 | Text.Op = PrintName("LoadPopSint32" ); |
26882 | break; |
26883 | case OP_LoadPopUint32: |
26884 | Text.Op = PrintName("LoadPopUint32" ); |
26885 | break; |
26886 | case OP_LoadPopSint64: |
26887 | Text.Op = PrintName("LoadPopSint64" ); |
26888 | break; |
26889 | case OP_LoadPopUint64: |
26890 | Text.Op = PrintName("LoadPopUint64" ); |
26891 | break; |
26892 | case OP_LoadPopIntAP: |
26893 | Text.Op = PrintName("LoadPopIntAP" ); |
26894 | break; |
26895 | case OP_LoadPopIntAPS: |
26896 | Text.Op = PrintName("LoadPopIntAPS" ); |
26897 | break; |
26898 | case OP_LoadPopBool: |
26899 | Text.Op = PrintName("LoadPopBool" ); |
26900 | break; |
26901 | case OP_LoadPopFixedPoint: |
26902 | Text.Op = PrintName("LoadPopFixedPoint" ); |
26903 | break; |
26904 | case OP_LoadPopPtr: |
26905 | Text.Op = PrintName("LoadPopPtr" ); |
26906 | break; |
26907 | case OP_LoadPopMemberPtr: |
26908 | Text.Op = PrintName("LoadPopMemberPtr" ); |
26909 | break; |
26910 | case OP_LoadPopFloat: |
26911 | Text.Op = PrintName("LoadPopFloat" ); |
26912 | break; |
26913 | #endif |
26914 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
26915 | bool emitLoadPopSint8(const SourceInfo &); |
26916 | bool emitLoadPopUint8(const SourceInfo &); |
26917 | bool emitLoadPopSint16(const SourceInfo &); |
26918 | bool emitLoadPopUint16(const SourceInfo &); |
26919 | bool emitLoadPopSint32(const SourceInfo &); |
26920 | bool emitLoadPopUint32(const SourceInfo &); |
26921 | bool emitLoadPopSint64(const SourceInfo &); |
26922 | bool emitLoadPopUint64(const SourceInfo &); |
26923 | bool emitLoadPopIntAP(const SourceInfo &); |
26924 | bool emitLoadPopIntAPS(const SourceInfo &); |
26925 | bool emitLoadPopBool(const SourceInfo &); |
26926 | bool emitLoadPopFixedPoint(const SourceInfo &); |
26927 | bool emitLoadPopPtr(const SourceInfo &); |
26928 | bool emitLoadPopMemberPtr(const SourceInfo &); |
26929 | bool emitLoadPopFloat(const SourceInfo &); |
26930 | #endif |
26931 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
26932 | [[nodiscard]] bool emitLoadPop(PrimType, const SourceInfo &I); |
26933 | #endif |
26934 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
26935 | bool |
26936 | #if defined(GET_EVAL_IMPL) |
26937 | EvalEmitter |
26938 | #else |
26939 | ByteCodeEmitter |
26940 | #endif |
26941 | ::emitLoadPop(PrimType T0, const SourceInfo &I) { |
26942 | switch (T0) { |
26943 | case PT_Sint8: |
26944 | return emitLoadPopSint8(I); |
26945 | case PT_Uint8: |
26946 | return emitLoadPopUint8(I); |
26947 | case PT_Sint16: |
26948 | return emitLoadPopSint16(I); |
26949 | case PT_Uint16: |
26950 | return emitLoadPopUint16(I); |
26951 | case PT_Sint32: |
26952 | return emitLoadPopSint32(I); |
26953 | case PT_Uint32: |
26954 | return emitLoadPopUint32(I); |
26955 | case PT_Sint64: |
26956 | return emitLoadPopSint64(I); |
26957 | case PT_Uint64: |
26958 | return emitLoadPopUint64(I); |
26959 | case PT_IntAP: |
26960 | return emitLoadPopIntAP(I); |
26961 | case PT_IntAPS: |
26962 | return emitLoadPopIntAPS(I); |
26963 | case PT_Bool: |
26964 | return emitLoadPopBool(I); |
26965 | case PT_FixedPoint: |
26966 | return emitLoadPopFixedPoint(I); |
26967 | case PT_Ptr: |
26968 | return emitLoadPopPtr(I); |
26969 | case PT_MemberPtr: |
26970 | return emitLoadPopMemberPtr(I); |
26971 | case PT_Float: |
26972 | return emitLoadPopFloat(I); |
26973 | } |
26974 | llvm_unreachable("invalid enum value" ); |
26975 | } |
26976 | #endif |
26977 | #ifdef GET_LINK_IMPL |
26978 | bool ByteCodeEmitter::emitLoadPopSint8(const SourceInfo &L) { |
26979 | return emitOp<>(OP_LoadPopSint8, L); |
26980 | } |
26981 | bool ByteCodeEmitter::emitLoadPopUint8(const SourceInfo &L) { |
26982 | return emitOp<>(OP_LoadPopUint8, L); |
26983 | } |
26984 | bool ByteCodeEmitter::emitLoadPopSint16(const SourceInfo &L) { |
26985 | return emitOp<>(OP_LoadPopSint16, L); |
26986 | } |
26987 | bool ByteCodeEmitter::emitLoadPopUint16(const SourceInfo &L) { |
26988 | return emitOp<>(OP_LoadPopUint16, L); |
26989 | } |
26990 | bool ByteCodeEmitter::emitLoadPopSint32(const SourceInfo &L) { |
26991 | return emitOp<>(OP_LoadPopSint32, L); |
26992 | } |
26993 | bool ByteCodeEmitter::emitLoadPopUint32(const SourceInfo &L) { |
26994 | return emitOp<>(OP_LoadPopUint32, L); |
26995 | } |
26996 | bool ByteCodeEmitter::emitLoadPopSint64(const SourceInfo &L) { |
26997 | return emitOp<>(OP_LoadPopSint64, L); |
26998 | } |
26999 | bool ByteCodeEmitter::emitLoadPopUint64(const SourceInfo &L) { |
27000 | return emitOp<>(OP_LoadPopUint64, L); |
27001 | } |
27002 | bool ByteCodeEmitter::emitLoadPopIntAP(const SourceInfo &L) { |
27003 | return emitOp<>(OP_LoadPopIntAP, L); |
27004 | } |
27005 | bool ByteCodeEmitter::emitLoadPopIntAPS(const SourceInfo &L) { |
27006 | return emitOp<>(OP_LoadPopIntAPS, L); |
27007 | } |
27008 | bool ByteCodeEmitter::emitLoadPopBool(const SourceInfo &L) { |
27009 | return emitOp<>(OP_LoadPopBool, L); |
27010 | } |
27011 | bool ByteCodeEmitter::emitLoadPopFixedPoint(const SourceInfo &L) { |
27012 | return emitOp<>(OP_LoadPopFixedPoint, L); |
27013 | } |
27014 | bool ByteCodeEmitter::emitLoadPopPtr(const SourceInfo &L) { |
27015 | return emitOp<>(OP_LoadPopPtr, L); |
27016 | } |
27017 | bool ByteCodeEmitter::emitLoadPopMemberPtr(const SourceInfo &L) { |
27018 | return emitOp<>(OP_LoadPopMemberPtr, L); |
27019 | } |
27020 | bool ByteCodeEmitter::emitLoadPopFloat(const SourceInfo &L) { |
27021 | return emitOp<>(OP_LoadPopFloat, L); |
27022 | } |
27023 | #endif |
27024 | #ifdef GET_EVAL_IMPL |
27025 | bool EvalEmitter::emitLoadPopSint8(const SourceInfo &L) { |
27026 | if (!isActive()) return true; |
27027 | CurrentSource = L; |
27028 | return LoadPop<PT_Sint8>(S, OpPC); |
27029 | } |
27030 | bool EvalEmitter::emitLoadPopUint8(const SourceInfo &L) { |
27031 | if (!isActive()) return true; |
27032 | CurrentSource = L; |
27033 | return LoadPop<PT_Uint8>(S, OpPC); |
27034 | } |
27035 | bool EvalEmitter::emitLoadPopSint16(const SourceInfo &L) { |
27036 | if (!isActive()) return true; |
27037 | CurrentSource = L; |
27038 | return LoadPop<PT_Sint16>(S, OpPC); |
27039 | } |
27040 | bool EvalEmitter::emitLoadPopUint16(const SourceInfo &L) { |
27041 | if (!isActive()) return true; |
27042 | CurrentSource = L; |
27043 | return LoadPop<PT_Uint16>(S, OpPC); |
27044 | } |
27045 | bool EvalEmitter::emitLoadPopSint32(const SourceInfo &L) { |
27046 | if (!isActive()) return true; |
27047 | CurrentSource = L; |
27048 | return LoadPop<PT_Sint32>(S, OpPC); |
27049 | } |
27050 | bool EvalEmitter::emitLoadPopUint32(const SourceInfo &L) { |
27051 | if (!isActive()) return true; |
27052 | CurrentSource = L; |
27053 | return LoadPop<PT_Uint32>(S, OpPC); |
27054 | } |
27055 | bool EvalEmitter::emitLoadPopSint64(const SourceInfo &L) { |
27056 | if (!isActive()) return true; |
27057 | CurrentSource = L; |
27058 | return LoadPop<PT_Sint64>(S, OpPC); |
27059 | } |
27060 | bool EvalEmitter::emitLoadPopUint64(const SourceInfo &L) { |
27061 | if (!isActive()) return true; |
27062 | CurrentSource = L; |
27063 | return LoadPop<PT_Uint64>(S, OpPC); |
27064 | } |
27065 | bool EvalEmitter::emitLoadPopIntAP(const SourceInfo &L) { |
27066 | if (!isActive()) return true; |
27067 | CurrentSource = L; |
27068 | return LoadPop<PT_IntAP>(S, OpPC); |
27069 | } |
27070 | bool EvalEmitter::emitLoadPopIntAPS(const SourceInfo &L) { |
27071 | if (!isActive()) return true; |
27072 | CurrentSource = L; |
27073 | return LoadPop<PT_IntAPS>(S, OpPC); |
27074 | } |
27075 | bool EvalEmitter::emitLoadPopBool(const SourceInfo &L) { |
27076 | if (!isActive()) return true; |
27077 | CurrentSource = L; |
27078 | return LoadPop<PT_Bool>(S, OpPC); |
27079 | } |
27080 | bool EvalEmitter::emitLoadPopFixedPoint(const SourceInfo &L) { |
27081 | if (!isActive()) return true; |
27082 | CurrentSource = L; |
27083 | return LoadPop<PT_FixedPoint>(S, OpPC); |
27084 | } |
27085 | bool EvalEmitter::emitLoadPopPtr(const SourceInfo &L) { |
27086 | if (!isActive()) return true; |
27087 | CurrentSource = L; |
27088 | return LoadPop<PT_Ptr>(S, OpPC); |
27089 | } |
27090 | bool EvalEmitter::emitLoadPopMemberPtr(const SourceInfo &L) { |
27091 | if (!isActive()) return true; |
27092 | CurrentSource = L; |
27093 | return LoadPop<PT_MemberPtr>(S, OpPC); |
27094 | } |
27095 | bool EvalEmitter::emitLoadPopFloat(const SourceInfo &L) { |
27096 | if (!isActive()) return true; |
27097 | CurrentSource = L; |
27098 | return LoadPop<PT_Float>(S, OpPC); |
27099 | } |
27100 | #endif |
27101 | #ifdef GET_OPCODE_NAMES |
27102 | OP_Memcpy, |
27103 | #endif |
27104 | #ifdef GET_INTERP |
27105 | case OP_Memcpy: { |
27106 | if (!Memcpy(S, OpPC)) |
27107 | return false; |
27108 | continue; |
27109 | } |
27110 | #endif |
27111 | #ifdef GET_DISASM |
27112 | case OP_Memcpy: |
27113 | Text.Op = PrintName("Memcpy" ); |
27114 | break; |
27115 | #endif |
27116 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
27117 | bool emitMemcpy(const SourceInfo &); |
27118 | #endif |
27119 | #ifdef GET_LINK_IMPL |
27120 | bool ByteCodeEmitter::emitMemcpy(const SourceInfo &L) { |
27121 | return emitOp<>(OP_Memcpy, L); |
27122 | } |
27123 | #endif |
27124 | #ifdef GET_EVAL_IMPL |
27125 | bool EvalEmitter::emitMemcpy(const SourceInfo &L) { |
27126 | if (!isActive()) return true; |
27127 | CurrentSource = L; |
27128 | return Memcpy(S, OpPC); |
27129 | } |
27130 | #endif |
27131 | #ifdef GET_OPCODE_NAMES |
27132 | OP_MulSint8, |
27133 | OP_MulUint8, |
27134 | OP_MulSint16, |
27135 | OP_MulUint16, |
27136 | OP_MulSint32, |
27137 | OP_MulUint32, |
27138 | OP_MulSint64, |
27139 | OP_MulUint64, |
27140 | OP_MulIntAP, |
27141 | OP_MulIntAPS, |
27142 | OP_MulBool, |
27143 | OP_MulFixedPoint, |
27144 | #endif |
27145 | #ifdef GET_INTERP |
27146 | case OP_MulSint8: { |
27147 | if (!Mul<PT_Sint8>(S, OpPC)) |
27148 | return false; |
27149 | continue; |
27150 | } |
27151 | case OP_MulUint8: { |
27152 | if (!Mul<PT_Uint8>(S, OpPC)) |
27153 | return false; |
27154 | continue; |
27155 | } |
27156 | case OP_MulSint16: { |
27157 | if (!Mul<PT_Sint16>(S, OpPC)) |
27158 | return false; |
27159 | continue; |
27160 | } |
27161 | case OP_MulUint16: { |
27162 | if (!Mul<PT_Uint16>(S, OpPC)) |
27163 | return false; |
27164 | continue; |
27165 | } |
27166 | case OP_MulSint32: { |
27167 | if (!Mul<PT_Sint32>(S, OpPC)) |
27168 | return false; |
27169 | continue; |
27170 | } |
27171 | case OP_MulUint32: { |
27172 | if (!Mul<PT_Uint32>(S, OpPC)) |
27173 | return false; |
27174 | continue; |
27175 | } |
27176 | case OP_MulSint64: { |
27177 | if (!Mul<PT_Sint64>(S, OpPC)) |
27178 | return false; |
27179 | continue; |
27180 | } |
27181 | case OP_MulUint64: { |
27182 | if (!Mul<PT_Uint64>(S, OpPC)) |
27183 | return false; |
27184 | continue; |
27185 | } |
27186 | case OP_MulIntAP: { |
27187 | if (!Mul<PT_IntAP>(S, OpPC)) |
27188 | return false; |
27189 | continue; |
27190 | } |
27191 | case OP_MulIntAPS: { |
27192 | if (!Mul<PT_IntAPS>(S, OpPC)) |
27193 | return false; |
27194 | continue; |
27195 | } |
27196 | case OP_MulBool: { |
27197 | if (!Mul<PT_Bool>(S, OpPC)) |
27198 | return false; |
27199 | continue; |
27200 | } |
27201 | case OP_MulFixedPoint: { |
27202 | if (!Mul<PT_FixedPoint>(S, OpPC)) |
27203 | return false; |
27204 | continue; |
27205 | } |
27206 | #endif |
27207 | #ifdef GET_DISASM |
27208 | case OP_MulSint8: |
27209 | Text.Op = PrintName("MulSint8" ); |
27210 | break; |
27211 | case OP_MulUint8: |
27212 | Text.Op = PrintName("MulUint8" ); |
27213 | break; |
27214 | case OP_MulSint16: |
27215 | Text.Op = PrintName("MulSint16" ); |
27216 | break; |
27217 | case OP_MulUint16: |
27218 | Text.Op = PrintName("MulUint16" ); |
27219 | break; |
27220 | case OP_MulSint32: |
27221 | Text.Op = PrintName("MulSint32" ); |
27222 | break; |
27223 | case OP_MulUint32: |
27224 | Text.Op = PrintName("MulUint32" ); |
27225 | break; |
27226 | case OP_MulSint64: |
27227 | Text.Op = PrintName("MulSint64" ); |
27228 | break; |
27229 | case OP_MulUint64: |
27230 | Text.Op = PrintName("MulUint64" ); |
27231 | break; |
27232 | case OP_MulIntAP: |
27233 | Text.Op = PrintName("MulIntAP" ); |
27234 | break; |
27235 | case OP_MulIntAPS: |
27236 | Text.Op = PrintName("MulIntAPS" ); |
27237 | break; |
27238 | case OP_MulBool: |
27239 | Text.Op = PrintName("MulBool" ); |
27240 | break; |
27241 | case OP_MulFixedPoint: |
27242 | Text.Op = PrintName("MulFixedPoint" ); |
27243 | break; |
27244 | #endif |
27245 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
27246 | bool emitMulSint8(const SourceInfo &); |
27247 | bool emitMulUint8(const SourceInfo &); |
27248 | bool emitMulSint16(const SourceInfo &); |
27249 | bool emitMulUint16(const SourceInfo &); |
27250 | bool emitMulSint32(const SourceInfo &); |
27251 | bool emitMulUint32(const SourceInfo &); |
27252 | bool emitMulSint64(const SourceInfo &); |
27253 | bool emitMulUint64(const SourceInfo &); |
27254 | bool emitMulIntAP(const SourceInfo &); |
27255 | bool emitMulIntAPS(const SourceInfo &); |
27256 | bool emitMulBool(const SourceInfo &); |
27257 | bool emitMulFixedPoint(const SourceInfo &); |
27258 | #endif |
27259 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
27260 | [[nodiscard]] bool emitMul(PrimType, const SourceInfo &I); |
27261 | #endif |
27262 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
27263 | bool |
27264 | #if defined(GET_EVAL_IMPL) |
27265 | EvalEmitter |
27266 | #else |
27267 | ByteCodeEmitter |
27268 | #endif |
27269 | ::emitMul(PrimType T0, const SourceInfo &I) { |
27270 | switch (T0) { |
27271 | case PT_Sint8: |
27272 | return emitMulSint8(I); |
27273 | case PT_Uint8: |
27274 | return emitMulUint8(I); |
27275 | case PT_Sint16: |
27276 | return emitMulSint16(I); |
27277 | case PT_Uint16: |
27278 | return emitMulUint16(I); |
27279 | case PT_Sint32: |
27280 | return emitMulSint32(I); |
27281 | case PT_Uint32: |
27282 | return emitMulUint32(I); |
27283 | case PT_Sint64: |
27284 | return emitMulSint64(I); |
27285 | case PT_Uint64: |
27286 | return emitMulUint64(I); |
27287 | case PT_IntAP: |
27288 | return emitMulIntAP(I); |
27289 | case PT_IntAPS: |
27290 | return emitMulIntAPS(I); |
27291 | case PT_Bool: |
27292 | return emitMulBool(I); |
27293 | case PT_FixedPoint: |
27294 | return emitMulFixedPoint(I); |
27295 | default: llvm_unreachable("invalid type: emitMul" ); |
27296 | } |
27297 | llvm_unreachable("invalid enum value" ); |
27298 | } |
27299 | #endif |
27300 | #ifdef GET_LINK_IMPL |
27301 | bool ByteCodeEmitter::emitMulSint8(const SourceInfo &L) { |
27302 | return emitOp<>(OP_MulSint8, L); |
27303 | } |
27304 | bool ByteCodeEmitter::emitMulUint8(const SourceInfo &L) { |
27305 | return emitOp<>(OP_MulUint8, L); |
27306 | } |
27307 | bool ByteCodeEmitter::emitMulSint16(const SourceInfo &L) { |
27308 | return emitOp<>(OP_MulSint16, L); |
27309 | } |
27310 | bool ByteCodeEmitter::emitMulUint16(const SourceInfo &L) { |
27311 | return emitOp<>(OP_MulUint16, L); |
27312 | } |
27313 | bool ByteCodeEmitter::emitMulSint32(const SourceInfo &L) { |
27314 | return emitOp<>(OP_MulSint32, L); |
27315 | } |
27316 | bool ByteCodeEmitter::emitMulUint32(const SourceInfo &L) { |
27317 | return emitOp<>(OP_MulUint32, L); |
27318 | } |
27319 | bool ByteCodeEmitter::emitMulSint64(const SourceInfo &L) { |
27320 | return emitOp<>(OP_MulSint64, L); |
27321 | } |
27322 | bool ByteCodeEmitter::emitMulUint64(const SourceInfo &L) { |
27323 | return emitOp<>(OP_MulUint64, L); |
27324 | } |
27325 | bool ByteCodeEmitter::emitMulIntAP(const SourceInfo &L) { |
27326 | return emitOp<>(OP_MulIntAP, L); |
27327 | } |
27328 | bool ByteCodeEmitter::emitMulIntAPS(const SourceInfo &L) { |
27329 | return emitOp<>(OP_MulIntAPS, L); |
27330 | } |
27331 | bool ByteCodeEmitter::emitMulBool(const SourceInfo &L) { |
27332 | return emitOp<>(OP_MulBool, L); |
27333 | } |
27334 | bool ByteCodeEmitter::emitMulFixedPoint(const SourceInfo &L) { |
27335 | return emitOp<>(OP_MulFixedPoint, L); |
27336 | } |
27337 | #endif |
27338 | #ifdef GET_EVAL_IMPL |
27339 | bool EvalEmitter::emitMulSint8(const SourceInfo &L) { |
27340 | if (!isActive()) return true; |
27341 | CurrentSource = L; |
27342 | return Mul<PT_Sint8>(S, OpPC); |
27343 | } |
27344 | bool EvalEmitter::emitMulUint8(const SourceInfo &L) { |
27345 | if (!isActive()) return true; |
27346 | CurrentSource = L; |
27347 | return Mul<PT_Uint8>(S, OpPC); |
27348 | } |
27349 | bool EvalEmitter::emitMulSint16(const SourceInfo &L) { |
27350 | if (!isActive()) return true; |
27351 | CurrentSource = L; |
27352 | return Mul<PT_Sint16>(S, OpPC); |
27353 | } |
27354 | bool EvalEmitter::emitMulUint16(const SourceInfo &L) { |
27355 | if (!isActive()) return true; |
27356 | CurrentSource = L; |
27357 | return Mul<PT_Uint16>(S, OpPC); |
27358 | } |
27359 | bool EvalEmitter::emitMulSint32(const SourceInfo &L) { |
27360 | if (!isActive()) return true; |
27361 | CurrentSource = L; |
27362 | return Mul<PT_Sint32>(S, OpPC); |
27363 | } |
27364 | bool EvalEmitter::emitMulUint32(const SourceInfo &L) { |
27365 | if (!isActive()) return true; |
27366 | CurrentSource = L; |
27367 | return Mul<PT_Uint32>(S, OpPC); |
27368 | } |
27369 | bool EvalEmitter::emitMulSint64(const SourceInfo &L) { |
27370 | if (!isActive()) return true; |
27371 | CurrentSource = L; |
27372 | return Mul<PT_Sint64>(S, OpPC); |
27373 | } |
27374 | bool EvalEmitter::emitMulUint64(const SourceInfo &L) { |
27375 | if (!isActive()) return true; |
27376 | CurrentSource = L; |
27377 | return Mul<PT_Uint64>(S, OpPC); |
27378 | } |
27379 | bool EvalEmitter::emitMulIntAP(const SourceInfo &L) { |
27380 | if (!isActive()) return true; |
27381 | CurrentSource = L; |
27382 | return Mul<PT_IntAP>(S, OpPC); |
27383 | } |
27384 | bool EvalEmitter::emitMulIntAPS(const SourceInfo &L) { |
27385 | if (!isActive()) return true; |
27386 | CurrentSource = L; |
27387 | return Mul<PT_IntAPS>(S, OpPC); |
27388 | } |
27389 | bool EvalEmitter::emitMulBool(const SourceInfo &L) { |
27390 | if (!isActive()) return true; |
27391 | CurrentSource = L; |
27392 | return Mul<PT_Bool>(S, OpPC); |
27393 | } |
27394 | bool EvalEmitter::emitMulFixedPoint(const SourceInfo &L) { |
27395 | if (!isActive()) return true; |
27396 | CurrentSource = L; |
27397 | return Mul<PT_FixedPoint>(S, OpPC); |
27398 | } |
27399 | #endif |
27400 | #ifdef GET_OPCODE_NAMES |
27401 | OP_MulcSint8, |
27402 | OP_MulcUint8, |
27403 | OP_MulcSint16, |
27404 | OP_MulcUint16, |
27405 | OP_MulcSint32, |
27406 | OP_MulcUint32, |
27407 | OP_MulcSint64, |
27408 | OP_MulcUint64, |
27409 | OP_MulcIntAP, |
27410 | OP_MulcIntAPS, |
27411 | OP_MulcFloat, |
27412 | #endif |
27413 | #ifdef GET_INTERP |
27414 | case OP_MulcSint8: { |
27415 | if (!Mulc<PT_Sint8>(S, OpPC)) |
27416 | return false; |
27417 | continue; |
27418 | } |
27419 | case OP_MulcUint8: { |
27420 | if (!Mulc<PT_Uint8>(S, OpPC)) |
27421 | return false; |
27422 | continue; |
27423 | } |
27424 | case OP_MulcSint16: { |
27425 | if (!Mulc<PT_Sint16>(S, OpPC)) |
27426 | return false; |
27427 | continue; |
27428 | } |
27429 | case OP_MulcUint16: { |
27430 | if (!Mulc<PT_Uint16>(S, OpPC)) |
27431 | return false; |
27432 | continue; |
27433 | } |
27434 | case OP_MulcSint32: { |
27435 | if (!Mulc<PT_Sint32>(S, OpPC)) |
27436 | return false; |
27437 | continue; |
27438 | } |
27439 | case OP_MulcUint32: { |
27440 | if (!Mulc<PT_Uint32>(S, OpPC)) |
27441 | return false; |
27442 | continue; |
27443 | } |
27444 | case OP_MulcSint64: { |
27445 | if (!Mulc<PT_Sint64>(S, OpPC)) |
27446 | return false; |
27447 | continue; |
27448 | } |
27449 | case OP_MulcUint64: { |
27450 | if (!Mulc<PT_Uint64>(S, OpPC)) |
27451 | return false; |
27452 | continue; |
27453 | } |
27454 | case OP_MulcIntAP: { |
27455 | if (!Mulc<PT_IntAP>(S, OpPC)) |
27456 | return false; |
27457 | continue; |
27458 | } |
27459 | case OP_MulcIntAPS: { |
27460 | if (!Mulc<PT_IntAPS>(S, OpPC)) |
27461 | return false; |
27462 | continue; |
27463 | } |
27464 | case OP_MulcFloat: { |
27465 | if (!Mulc<PT_Float>(S, OpPC)) |
27466 | return false; |
27467 | continue; |
27468 | } |
27469 | #endif |
27470 | #ifdef GET_DISASM |
27471 | case OP_MulcSint8: |
27472 | Text.Op = PrintName("MulcSint8" ); |
27473 | break; |
27474 | case OP_MulcUint8: |
27475 | Text.Op = PrintName("MulcUint8" ); |
27476 | break; |
27477 | case OP_MulcSint16: |
27478 | Text.Op = PrintName("MulcSint16" ); |
27479 | break; |
27480 | case OP_MulcUint16: |
27481 | Text.Op = PrintName("MulcUint16" ); |
27482 | break; |
27483 | case OP_MulcSint32: |
27484 | Text.Op = PrintName("MulcSint32" ); |
27485 | break; |
27486 | case OP_MulcUint32: |
27487 | Text.Op = PrintName("MulcUint32" ); |
27488 | break; |
27489 | case OP_MulcSint64: |
27490 | Text.Op = PrintName("MulcSint64" ); |
27491 | break; |
27492 | case OP_MulcUint64: |
27493 | Text.Op = PrintName("MulcUint64" ); |
27494 | break; |
27495 | case OP_MulcIntAP: |
27496 | Text.Op = PrintName("MulcIntAP" ); |
27497 | break; |
27498 | case OP_MulcIntAPS: |
27499 | Text.Op = PrintName("MulcIntAPS" ); |
27500 | break; |
27501 | case OP_MulcFloat: |
27502 | Text.Op = PrintName("MulcFloat" ); |
27503 | break; |
27504 | #endif |
27505 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
27506 | bool emitMulcSint8(const SourceInfo &); |
27507 | bool emitMulcUint8(const SourceInfo &); |
27508 | bool emitMulcSint16(const SourceInfo &); |
27509 | bool emitMulcUint16(const SourceInfo &); |
27510 | bool emitMulcSint32(const SourceInfo &); |
27511 | bool emitMulcUint32(const SourceInfo &); |
27512 | bool emitMulcSint64(const SourceInfo &); |
27513 | bool emitMulcUint64(const SourceInfo &); |
27514 | bool emitMulcIntAP(const SourceInfo &); |
27515 | bool emitMulcIntAPS(const SourceInfo &); |
27516 | bool emitMulcFloat(const SourceInfo &); |
27517 | #endif |
27518 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
27519 | [[nodiscard]] bool emitMulc(PrimType, const SourceInfo &I); |
27520 | #endif |
27521 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
27522 | bool |
27523 | #if defined(GET_EVAL_IMPL) |
27524 | EvalEmitter |
27525 | #else |
27526 | ByteCodeEmitter |
27527 | #endif |
27528 | ::emitMulc(PrimType T0, const SourceInfo &I) { |
27529 | switch (T0) { |
27530 | case PT_Sint8: |
27531 | return emitMulcSint8(I); |
27532 | case PT_Uint8: |
27533 | return emitMulcUint8(I); |
27534 | case PT_Sint16: |
27535 | return emitMulcSint16(I); |
27536 | case PT_Uint16: |
27537 | return emitMulcUint16(I); |
27538 | case PT_Sint32: |
27539 | return emitMulcSint32(I); |
27540 | case PT_Uint32: |
27541 | return emitMulcUint32(I); |
27542 | case PT_Sint64: |
27543 | return emitMulcSint64(I); |
27544 | case PT_Uint64: |
27545 | return emitMulcUint64(I); |
27546 | case PT_IntAP: |
27547 | return emitMulcIntAP(I); |
27548 | case PT_IntAPS: |
27549 | return emitMulcIntAPS(I); |
27550 | case PT_Float: |
27551 | return emitMulcFloat(I); |
27552 | default: llvm_unreachable("invalid type: emitMulc" ); |
27553 | } |
27554 | llvm_unreachable("invalid enum value" ); |
27555 | } |
27556 | #endif |
27557 | #ifdef GET_LINK_IMPL |
27558 | bool ByteCodeEmitter::emitMulcSint8(const SourceInfo &L) { |
27559 | return emitOp<>(OP_MulcSint8, L); |
27560 | } |
27561 | bool ByteCodeEmitter::emitMulcUint8(const SourceInfo &L) { |
27562 | return emitOp<>(OP_MulcUint8, L); |
27563 | } |
27564 | bool ByteCodeEmitter::emitMulcSint16(const SourceInfo &L) { |
27565 | return emitOp<>(OP_MulcSint16, L); |
27566 | } |
27567 | bool ByteCodeEmitter::emitMulcUint16(const SourceInfo &L) { |
27568 | return emitOp<>(OP_MulcUint16, L); |
27569 | } |
27570 | bool ByteCodeEmitter::emitMulcSint32(const SourceInfo &L) { |
27571 | return emitOp<>(OP_MulcSint32, L); |
27572 | } |
27573 | bool ByteCodeEmitter::emitMulcUint32(const SourceInfo &L) { |
27574 | return emitOp<>(OP_MulcUint32, L); |
27575 | } |
27576 | bool ByteCodeEmitter::emitMulcSint64(const SourceInfo &L) { |
27577 | return emitOp<>(OP_MulcSint64, L); |
27578 | } |
27579 | bool ByteCodeEmitter::emitMulcUint64(const SourceInfo &L) { |
27580 | return emitOp<>(OP_MulcUint64, L); |
27581 | } |
27582 | bool ByteCodeEmitter::emitMulcIntAP(const SourceInfo &L) { |
27583 | return emitOp<>(OP_MulcIntAP, L); |
27584 | } |
27585 | bool ByteCodeEmitter::emitMulcIntAPS(const SourceInfo &L) { |
27586 | return emitOp<>(OP_MulcIntAPS, L); |
27587 | } |
27588 | bool ByteCodeEmitter::emitMulcFloat(const SourceInfo &L) { |
27589 | return emitOp<>(OP_MulcFloat, L); |
27590 | } |
27591 | #endif |
27592 | #ifdef GET_EVAL_IMPL |
27593 | bool EvalEmitter::emitMulcSint8(const SourceInfo &L) { |
27594 | if (!isActive()) return true; |
27595 | CurrentSource = L; |
27596 | return Mulc<PT_Sint8>(S, OpPC); |
27597 | } |
27598 | bool EvalEmitter::emitMulcUint8(const SourceInfo &L) { |
27599 | if (!isActive()) return true; |
27600 | CurrentSource = L; |
27601 | return Mulc<PT_Uint8>(S, OpPC); |
27602 | } |
27603 | bool EvalEmitter::emitMulcSint16(const SourceInfo &L) { |
27604 | if (!isActive()) return true; |
27605 | CurrentSource = L; |
27606 | return Mulc<PT_Sint16>(S, OpPC); |
27607 | } |
27608 | bool EvalEmitter::emitMulcUint16(const SourceInfo &L) { |
27609 | if (!isActive()) return true; |
27610 | CurrentSource = L; |
27611 | return Mulc<PT_Uint16>(S, OpPC); |
27612 | } |
27613 | bool EvalEmitter::emitMulcSint32(const SourceInfo &L) { |
27614 | if (!isActive()) return true; |
27615 | CurrentSource = L; |
27616 | return Mulc<PT_Sint32>(S, OpPC); |
27617 | } |
27618 | bool EvalEmitter::emitMulcUint32(const SourceInfo &L) { |
27619 | if (!isActive()) return true; |
27620 | CurrentSource = L; |
27621 | return Mulc<PT_Uint32>(S, OpPC); |
27622 | } |
27623 | bool EvalEmitter::emitMulcSint64(const SourceInfo &L) { |
27624 | if (!isActive()) return true; |
27625 | CurrentSource = L; |
27626 | return Mulc<PT_Sint64>(S, OpPC); |
27627 | } |
27628 | bool EvalEmitter::emitMulcUint64(const SourceInfo &L) { |
27629 | if (!isActive()) return true; |
27630 | CurrentSource = L; |
27631 | return Mulc<PT_Uint64>(S, OpPC); |
27632 | } |
27633 | bool EvalEmitter::emitMulcIntAP(const SourceInfo &L) { |
27634 | if (!isActive()) return true; |
27635 | CurrentSource = L; |
27636 | return Mulc<PT_IntAP>(S, OpPC); |
27637 | } |
27638 | bool EvalEmitter::emitMulcIntAPS(const SourceInfo &L) { |
27639 | if (!isActive()) return true; |
27640 | CurrentSource = L; |
27641 | return Mulc<PT_IntAPS>(S, OpPC); |
27642 | } |
27643 | bool EvalEmitter::emitMulcFloat(const SourceInfo &L) { |
27644 | if (!isActive()) return true; |
27645 | CurrentSource = L; |
27646 | return Mulc<PT_Float>(S, OpPC); |
27647 | } |
27648 | #endif |
27649 | #ifdef GET_OPCODE_NAMES |
27650 | OP_Mulf, |
27651 | #endif |
27652 | #ifdef GET_INTERP |
27653 | case OP_Mulf: { |
27654 | const auto V0 = ReadArg<uint32_t>(S, PC); |
27655 | if (!Mulf(S, OpPC, V0)) |
27656 | return false; |
27657 | continue; |
27658 | } |
27659 | #endif |
27660 | #ifdef GET_DISASM |
27661 | case OP_Mulf: |
27662 | Text.Op = PrintName("Mulf" ); |
27663 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
27664 | break; |
27665 | #endif |
27666 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
27667 | bool emitMulf( uint32_t , const SourceInfo &); |
27668 | #endif |
27669 | #ifdef GET_LINK_IMPL |
27670 | bool ByteCodeEmitter::emitMulf( uint32_t A0, const SourceInfo &L) { |
27671 | return emitOp<uint32_t>(OP_Mulf, A0, L); |
27672 | } |
27673 | #endif |
27674 | #ifdef GET_EVAL_IMPL |
27675 | bool EvalEmitter::emitMulf( uint32_t A0, const SourceInfo &L) { |
27676 | if (!isActive()) return true; |
27677 | CurrentSource = L; |
27678 | return Mulf(S, OpPC, A0); |
27679 | } |
27680 | #endif |
27681 | #ifdef GET_OPCODE_NAMES |
27682 | OP_NESint8, |
27683 | OP_NEUint8, |
27684 | OP_NESint16, |
27685 | OP_NEUint16, |
27686 | OP_NESint32, |
27687 | OP_NEUint32, |
27688 | OP_NESint64, |
27689 | OP_NEUint64, |
27690 | OP_NEIntAP, |
27691 | OP_NEIntAPS, |
27692 | OP_NEBool, |
27693 | OP_NEFixedPoint, |
27694 | OP_NEPtr, |
27695 | OP_NEMemberPtr, |
27696 | OP_NEFloat, |
27697 | #endif |
27698 | #ifdef GET_INTERP |
27699 | case OP_NESint8: { |
27700 | if (!NE<PT_Sint8>(S, OpPC)) |
27701 | return false; |
27702 | continue; |
27703 | } |
27704 | case OP_NEUint8: { |
27705 | if (!NE<PT_Uint8>(S, OpPC)) |
27706 | return false; |
27707 | continue; |
27708 | } |
27709 | case OP_NESint16: { |
27710 | if (!NE<PT_Sint16>(S, OpPC)) |
27711 | return false; |
27712 | continue; |
27713 | } |
27714 | case OP_NEUint16: { |
27715 | if (!NE<PT_Uint16>(S, OpPC)) |
27716 | return false; |
27717 | continue; |
27718 | } |
27719 | case OP_NESint32: { |
27720 | if (!NE<PT_Sint32>(S, OpPC)) |
27721 | return false; |
27722 | continue; |
27723 | } |
27724 | case OP_NEUint32: { |
27725 | if (!NE<PT_Uint32>(S, OpPC)) |
27726 | return false; |
27727 | continue; |
27728 | } |
27729 | case OP_NESint64: { |
27730 | if (!NE<PT_Sint64>(S, OpPC)) |
27731 | return false; |
27732 | continue; |
27733 | } |
27734 | case OP_NEUint64: { |
27735 | if (!NE<PT_Uint64>(S, OpPC)) |
27736 | return false; |
27737 | continue; |
27738 | } |
27739 | case OP_NEIntAP: { |
27740 | if (!NE<PT_IntAP>(S, OpPC)) |
27741 | return false; |
27742 | continue; |
27743 | } |
27744 | case OP_NEIntAPS: { |
27745 | if (!NE<PT_IntAPS>(S, OpPC)) |
27746 | return false; |
27747 | continue; |
27748 | } |
27749 | case OP_NEBool: { |
27750 | if (!NE<PT_Bool>(S, OpPC)) |
27751 | return false; |
27752 | continue; |
27753 | } |
27754 | case OP_NEFixedPoint: { |
27755 | if (!NE<PT_FixedPoint>(S, OpPC)) |
27756 | return false; |
27757 | continue; |
27758 | } |
27759 | case OP_NEPtr: { |
27760 | if (!NE<PT_Ptr>(S, OpPC)) |
27761 | return false; |
27762 | continue; |
27763 | } |
27764 | case OP_NEMemberPtr: { |
27765 | if (!NE<PT_MemberPtr>(S, OpPC)) |
27766 | return false; |
27767 | continue; |
27768 | } |
27769 | case OP_NEFloat: { |
27770 | if (!NE<PT_Float>(S, OpPC)) |
27771 | return false; |
27772 | continue; |
27773 | } |
27774 | #endif |
27775 | #ifdef GET_DISASM |
27776 | case OP_NESint8: |
27777 | Text.Op = PrintName("NESint8" ); |
27778 | break; |
27779 | case OP_NEUint8: |
27780 | Text.Op = PrintName("NEUint8" ); |
27781 | break; |
27782 | case OP_NESint16: |
27783 | Text.Op = PrintName("NESint16" ); |
27784 | break; |
27785 | case OP_NEUint16: |
27786 | Text.Op = PrintName("NEUint16" ); |
27787 | break; |
27788 | case OP_NESint32: |
27789 | Text.Op = PrintName("NESint32" ); |
27790 | break; |
27791 | case OP_NEUint32: |
27792 | Text.Op = PrintName("NEUint32" ); |
27793 | break; |
27794 | case OP_NESint64: |
27795 | Text.Op = PrintName("NESint64" ); |
27796 | break; |
27797 | case OP_NEUint64: |
27798 | Text.Op = PrintName("NEUint64" ); |
27799 | break; |
27800 | case OP_NEIntAP: |
27801 | Text.Op = PrintName("NEIntAP" ); |
27802 | break; |
27803 | case OP_NEIntAPS: |
27804 | Text.Op = PrintName("NEIntAPS" ); |
27805 | break; |
27806 | case OP_NEBool: |
27807 | Text.Op = PrintName("NEBool" ); |
27808 | break; |
27809 | case OP_NEFixedPoint: |
27810 | Text.Op = PrintName("NEFixedPoint" ); |
27811 | break; |
27812 | case OP_NEPtr: |
27813 | Text.Op = PrintName("NEPtr" ); |
27814 | break; |
27815 | case OP_NEMemberPtr: |
27816 | Text.Op = PrintName("NEMemberPtr" ); |
27817 | break; |
27818 | case OP_NEFloat: |
27819 | Text.Op = PrintName("NEFloat" ); |
27820 | break; |
27821 | #endif |
27822 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
27823 | bool emitNESint8(const SourceInfo &); |
27824 | bool emitNEUint8(const SourceInfo &); |
27825 | bool emitNESint16(const SourceInfo &); |
27826 | bool emitNEUint16(const SourceInfo &); |
27827 | bool emitNESint32(const SourceInfo &); |
27828 | bool emitNEUint32(const SourceInfo &); |
27829 | bool emitNESint64(const SourceInfo &); |
27830 | bool emitNEUint64(const SourceInfo &); |
27831 | bool emitNEIntAP(const SourceInfo &); |
27832 | bool emitNEIntAPS(const SourceInfo &); |
27833 | bool emitNEBool(const SourceInfo &); |
27834 | bool emitNEFixedPoint(const SourceInfo &); |
27835 | bool emitNEPtr(const SourceInfo &); |
27836 | bool emitNEMemberPtr(const SourceInfo &); |
27837 | bool emitNEFloat(const SourceInfo &); |
27838 | #endif |
27839 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
27840 | [[nodiscard]] bool emitNE(PrimType, const SourceInfo &I); |
27841 | #endif |
27842 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
27843 | bool |
27844 | #if defined(GET_EVAL_IMPL) |
27845 | EvalEmitter |
27846 | #else |
27847 | ByteCodeEmitter |
27848 | #endif |
27849 | ::emitNE(PrimType T0, const SourceInfo &I) { |
27850 | switch (T0) { |
27851 | case PT_Sint8: |
27852 | return emitNESint8(I); |
27853 | case PT_Uint8: |
27854 | return emitNEUint8(I); |
27855 | case PT_Sint16: |
27856 | return emitNESint16(I); |
27857 | case PT_Uint16: |
27858 | return emitNEUint16(I); |
27859 | case PT_Sint32: |
27860 | return emitNESint32(I); |
27861 | case PT_Uint32: |
27862 | return emitNEUint32(I); |
27863 | case PT_Sint64: |
27864 | return emitNESint64(I); |
27865 | case PT_Uint64: |
27866 | return emitNEUint64(I); |
27867 | case PT_IntAP: |
27868 | return emitNEIntAP(I); |
27869 | case PT_IntAPS: |
27870 | return emitNEIntAPS(I); |
27871 | case PT_Bool: |
27872 | return emitNEBool(I); |
27873 | case PT_FixedPoint: |
27874 | return emitNEFixedPoint(I); |
27875 | case PT_Ptr: |
27876 | return emitNEPtr(I); |
27877 | case PT_MemberPtr: |
27878 | return emitNEMemberPtr(I); |
27879 | case PT_Float: |
27880 | return emitNEFloat(I); |
27881 | } |
27882 | llvm_unreachable("invalid enum value" ); |
27883 | } |
27884 | #endif |
27885 | #ifdef GET_LINK_IMPL |
27886 | bool ByteCodeEmitter::emitNESint8(const SourceInfo &L) { |
27887 | return emitOp<>(OP_NESint8, L); |
27888 | } |
27889 | bool ByteCodeEmitter::emitNEUint8(const SourceInfo &L) { |
27890 | return emitOp<>(OP_NEUint8, L); |
27891 | } |
27892 | bool ByteCodeEmitter::emitNESint16(const SourceInfo &L) { |
27893 | return emitOp<>(OP_NESint16, L); |
27894 | } |
27895 | bool ByteCodeEmitter::emitNEUint16(const SourceInfo &L) { |
27896 | return emitOp<>(OP_NEUint16, L); |
27897 | } |
27898 | bool ByteCodeEmitter::emitNESint32(const SourceInfo &L) { |
27899 | return emitOp<>(OP_NESint32, L); |
27900 | } |
27901 | bool ByteCodeEmitter::emitNEUint32(const SourceInfo &L) { |
27902 | return emitOp<>(OP_NEUint32, L); |
27903 | } |
27904 | bool ByteCodeEmitter::emitNESint64(const SourceInfo &L) { |
27905 | return emitOp<>(OP_NESint64, L); |
27906 | } |
27907 | bool ByteCodeEmitter::emitNEUint64(const SourceInfo &L) { |
27908 | return emitOp<>(OP_NEUint64, L); |
27909 | } |
27910 | bool ByteCodeEmitter::emitNEIntAP(const SourceInfo &L) { |
27911 | return emitOp<>(OP_NEIntAP, L); |
27912 | } |
27913 | bool ByteCodeEmitter::emitNEIntAPS(const SourceInfo &L) { |
27914 | return emitOp<>(OP_NEIntAPS, L); |
27915 | } |
27916 | bool ByteCodeEmitter::emitNEBool(const SourceInfo &L) { |
27917 | return emitOp<>(OP_NEBool, L); |
27918 | } |
27919 | bool ByteCodeEmitter::emitNEFixedPoint(const SourceInfo &L) { |
27920 | return emitOp<>(OP_NEFixedPoint, L); |
27921 | } |
27922 | bool ByteCodeEmitter::emitNEPtr(const SourceInfo &L) { |
27923 | return emitOp<>(OP_NEPtr, L); |
27924 | } |
27925 | bool ByteCodeEmitter::emitNEMemberPtr(const SourceInfo &L) { |
27926 | return emitOp<>(OP_NEMemberPtr, L); |
27927 | } |
27928 | bool ByteCodeEmitter::emitNEFloat(const SourceInfo &L) { |
27929 | return emitOp<>(OP_NEFloat, L); |
27930 | } |
27931 | #endif |
27932 | #ifdef GET_EVAL_IMPL |
27933 | bool EvalEmitter::emitNESint8(const SourceInfo &L) { |
27934 | if (!isActive()) return true; |
27935 | CurrentSource = L; |
27936 | return NE<PT_Sint8>(S, OpPC); |
27937 | } |
27938 | bool EvalEmitter::emitNEUint8(const SourceInfo &L) { |
27939 | if (!isActive()) return true; |
27940 | CurrentSource = L; |
27941 | return NE<PT_Uint8>(S, OpPC); |
27942 | } |
27943 | bool EvalEmitter::emitNESint16(const SourceInfo &L) { |
27944 | if (!isActive()) return true; |
27945 | CurrentSource = L; |
27946 | return NE<PT_Sint16>(S, OpPC); |
27947 | } |
27948 | bool EvalEmitter::emitNEUint16(const SourceInfo &L) { |
27949 | if (!isActive()) return true; |
27950 | CurrentSource = L; |
27951 | return NE<PT_Uint16>(S, OpPC); |
27952 | } |
27953 | bool EvalEmitter::emitNESint32(const SourceInfo &L) { |
27954 | if (!isActive()) return true; |
27955 | CurrentSource = L; |
27956 | return NE<PT_Sint32>(S, OpPC); |
27957 | } |
27958 | bool EvalEmitter::emitNEUint32(const SourceInfo &L) { |
27959 | if (!isActive()) return true; |
27960 | CurrentSource = L; |
27961 | return NE<PT_Uint32>(S, OpPC); |
27962 | } |
27963 | bool EvalEmitter::emitNESint64(const SourceInfo &L) { |
27964 | if (!isActive()) return true; |
27965 | CurrentSource = L; |
27966 | return NE<PT_Sint64>(S, OpPC); |
27967 | } |
27968 | bool EvalEmitter::emitNEUint64(const SourceInfo &L) { |
27969 | if (!isActive()) return true; |
27970 | CurrentSource = L; |
27971 | return NE<PT_Uint64>(S, OpPC); |
27972 | } |
27973 | bool EvalEmitter::emitNEIntAP(const SourceInfo &L) { |
27974 | if (!isActive()) return true; |
27975 | CurrentSource = L; |
27976 | return NE<PT_IntAP>(S, OpPC); |
27977 | } |
27978 | bool EvalEmitter::emitNEIntAPS(const SourceInfo &L) { |
27979 | if (!isActive()) return true; |
27980 | CurrentSource = L; |
27981 | return NE<PT_IntAPS>(S, OpPC); |
27982 | } |
27983 | bool EvalEmitter::emitNEBool(const SourceInfo &L) { |
27984 | if (!isActive()) return true; |
27985 | CurrentSource = L; |
27986 | return NE<PT_Bool>(S, OpPC); |
27987 | } |
27988 | bool EvalEmitter::emitNEFixedPoint(const SourceInfo &L) { |
27989 | if (!isActive()) return true; |
27990 | CurrentSource = L; |
27991 | return NE<PT_FixedPoint>(S, OpPC); |
27992 | } |
27993 | bool EvalEmitter::emitNEPtr(const SourceInfo &L) { |
27994 | if (!isActive()) return true; |
27995 | CurrentSource = L; |
27996 | return NE<PT_Ptr>(S, OpPC); |
27997 | } |
27998 | bool EvalEmitter::emitNEMemberPtr(const SourceInfo &L) { |
27999 | if (!isActive()) return true; |
28000 | CurrentSource = L; |
28001 | return NE<PT_MemberPtr>(S, OpPC); |
28002 | } |
28003 | bool EvalEmitter::emitNEFloat(const SourceInfo &L) { |
28004 | if (!isActive()) return true; |
28005 | CurrentSource = L; |
28006 | return NE<PT_Float>(S, OpPC); |
28007 | } |
28008 | #endif |
28009 | #ifdef GET_OPCODE_NAMES |
28010 | OP_NarrowPtr, |
28011 | #endif |
28012 | #ifdef GET_INTERP |
28013 | case OP_NarrowPtr: { |
28014 | if (!NarrowPtr(S, OpPC)) |
28015 | return false; |
28016 | continue; |
28017 | } |
28018 | #endif |
28019 | #ifdef GET_DISASM |
28020 | case OP_NarrowPtr: |
28021 | Text.Op = PrintName("NarrowPtr" ); |
28022 | break; |
28023 | #endif |
28024 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28025 | bool emitNarrowPtr(const SourceInfo &); |
28026 | #endif |
28027 | #ifdef GET_LINK_IMPL |
28028 | bool ByteCodeEmitter::emitNarrowPtr(const SourceInfo &L) { |
28029 | return emitOp<>(OP_NarrowPtr, L); |
28030 | } |
28031 | #endif |
28032 | #ifdef GET_EVAL_IMPL |
28033 | bool EvalEmitter::emitNarrowPtr(const SourceInfo &L) { |
28034 | if (!isActive()) return true; |
28035 | CurrentSource = L; |
28036 | return NarrowPtr(S, OpPC); |
28037 | } |
28038 | #endif |
28039 | #ifdef GET_OPCODE_NAMES |
28040 | OP_NegSint8, |
28041 | OP_NegUint8, |
28042 | OP_NegSint16, |
28043 | OP_NegUint16, |
28044 | OP_NegSint32, |
28045 | OP_NegUint32, |
28046 | OP_NegSint64, |
28047 | OP_NegUint64, |
28048 | OP_NegIntAP, |
28049 | OP_NegIntAPS, |
28050 | OP_NegBool, |
28051 | OP_NegFloat, |
28052 | OP_NegFixedPoint, |
28053 | #endif |
28054 | #ifdef GET_INTERP |
28055 | case OP_NegSint8: { |
28056 | if (!Neg<PT_Sint8>(S, OpPC)) |
28057 | return false; |
28058 | continue; |
28059 | } |
28060 | case OP_NegUint8: { |
28061 | if (!Neg<PT_Uint8>(S, OpPC)) |
28062 | return false; |
28063 | continue; |
28064 | } |
28065 | case OP_NegSint16: { |
28066 | if (!Neg<PT_Sint16>(S, OpPC)) |
28067 | return false; |
28068 | continue; |
28069 | } |
28070 | case OP_NegUint16: { |
28071 | if (!Neg<PT_Uint16>(S, OpPC)) |
28072 | return false; |
28073 | continue; |
28074 | } |
28075 | case OP_NegSint32: { |
28076 | if (!Neg<PT_Sint32>(S, OpPC)) |
28077 | return false; |
28078 | continue; |
28079 | } |
28080 | case OP_NegUint32: { |
28081 | if (!Neg<PT_Uint32>(S, OpPC)) |
28082 | return false; |
28083 | continue; |
28084 | } |
28085 | case OP_NegSint64: { |
28086 | if (!Neg<PT_Sint64>(S, OpPC)) |
28087 | return false; |
28088 | continue; |
28089 | } |
28090 | case OP_NegUint64: { |
28091 | if (!Neg<PT_Uint64>(S, OpPC)) |
28092 | return false; |
28093 | continue; |
28094 | } |
28095 | case OP_NegIntAP: { |
28096 | if (!Neg<PT_IntAP>(S, OpPC)) |
28097 | return false; |
28098 | continue; |
28099 | } |
28100 | case OP_NegIntAPS: { |
28101 | if (!Neg<PT_IntAPS>(S, OpPC)) |
28102 | return false; |
28103 | continue; |
28104 | } |
28105 | case OP_NegBool: { |
28106 | if (!Neg<PT_Bool>(S, OpPC)) |
28107 | return false; |
28108 | continue; |
28109 | } |
28110 | case OP_NegFloat: { |
28111 | if (!Neg<PT_Float>(S, OpPC)) |
28112 | return false; |
28113 | continue; |
28114 | } |
28115 | case OP_NegFixedPoint: { |
28116 | if (!Neg<PT_FixedPoint>(S, OpPC)) |
28117 | return false; |
28118 | continue; |
28119 | } |
28120 | #endif |
28121 | #ifdef GET_DISASM |
28122 | case OP_NegSint8: |
28123 | Text.Op = PrintName("NegSint8" ); |
28124 | break; |
28125 | case OP_NegUint8: |
28126 | Text.Op = PrintName("NegUint8" ); |
28127 | break; |
28128 | case OP_NegSint16: |
28129 | Text.Op = PrintName("NegSint16" ); |
28130 | break; |
28131 | case OP_NegUint16: |
28132 | Text.Op = PrintName("NegUint16" ); |
28133 | break; |
28134 | case OP_NegSint32: |
28135 | Text.Op = PrintName("NegSint32" ); |
28136 | break; |
28137 | case OP_NegUint32: |
28138 | Text.Op = PrintName("NegUint32" ); |
28139 | break; |
28140 | case OP_NegSint64: |
28141 | Text.Op = PrintName("NegSint64" ); |
28142 | break; |
28143 | case OP_NegUint64: |
28144 | Text.Op = PrintName("NegUint64" ); |
28145 | break; |
28146 | case OP_NegIntAP: |
28147 | Text.Op = PrintName("NegIntAP" ); |
28148 | break; |
28149 | case OP_NegIntAPS: |
28150 | Text.Op = PrintName("NegIntAPS" ); |
28151 | break; |
28152 | case OP_NegBool: |
28153 | Text.Op = PrintName("NegBool" ); |
28154 | break; |
28155 | case OP_NegFloat: |
28156 | Text.Op = PrintName("NegFloat" ); |
28157 | break; |
28158 | case OP_NegFixedPoint: |
28159 | Text.Op = PrintName("NegFixedPoint" ); |
28160 | break; |
28161 | #endif |
28162 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28163 | bool emitNegSint8(const SourceInfo &); |
28164 | bool emitNegUint8(const SourceInfo &); |
28165 | bool emitNegSint16(const SourceInfo &); |
28166 | bool emitNegUint16(const SourceInfo &); |
28167 | bool emitNegSint32(const SourceInfo &); |
28168 | bool emitNegUint32(const SourceInfo &); |
28169 | bool emitNegSint64(const SourceInfo &); |
28170 | bool emitNegUint64(const SourceInfo &); |
28171 | bool emitNegIntAP(const SourceInfo &); |
28172 | bool emitNegIntAPS(const SourceInfo &); |
28173 | bool emitNegBool(const SourceInfo &); |
28174 | bool emitNegFloat(const SourceInfo &); |
28175 | bool emitNegFixedPoint(const SourceInfo &); |
28176 | #endif |
28177 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28178 | [[nodiscard]] bool emitNeg(PrimType, const SourceInfo &I); |
28179 | #endif |
28180 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
28181 | bool |
28182 | #if defined(GET_EVAL_IMPL) |
28183 | EvalEmitter |
28184 | #else |
28185 | ByteCodeEmitter |
28186 | #endif |
28187 | ::emitNeg(PrimType T0, const SourceInfo &I) { |
28188 | switch (T0) { |
28189 | case PT_Sint8: |
28190 | return emitNegSint8(I); |
28191 | case PT_Uint8: |
28192 | return emitNegUint8(I); |
28193 | case PT_Sint16: |
28194 | return emitNegSint16(I); |
28195 | case PT_Uint16: |
28196 | return emitNegUint16(I); |
28197 | case PT_Sint32: |
28198 | return emitNegSint32(I); |
28199 | case PT_Uint32: |
28200 | return emitNegUint32(I); |
28201 | case PT_Sint64: |
28202 | return emitNegSint64(I); |
28203 | case PT_Uint64: |
28204 | return emitNegUint64(I); |
28205 | case PT_IntAP: |
28206 | return emitNegIntAP(I); |
28207 | case PT_IntAPS: |
28208 | return emitNegIntAPS(I); |
28209 | case PT_Bool: |
28210 | return emitNegBool(I); |
28211 | case PT_Float: |
28212 | return emitNegFloat(I); |
28213 | case PT_FixedPoint: |
28214 | return emitNegFixedPoint(I); |
28215 | default: llvm_unreachable("invalid type: emitNeg" ); |
28216 | } |
28217 | llvm_unreachable("invalid enum value" ); |
28218 | } |
28219 | #endif |
28220 | #ifdef GET_LINK_IMPL |
28221 | bool ByteCodeEmitter::emitNegSint8(const SourceInfo &L) { |
28222 | return emitOp<>(OP_NegSint8, L); |
28223 | } |
28224 | bool ByteCodeEmitter::emitNegUint8(const SourceInfo &L) { |
28225 | return emitOp<>(OP_NegUint8, L); |
28226 | } |
28227 | bool ByteCodeEmitter::emitNegSint16(const SourceInfo &L) { |
28228 | return emitOp<>(OP_NegSint16, L); |
28229 | } |
28230 | bool ByteCodeEmitter::emitNegUint16(const SourceInfo &L) { |
28231 | return emitOp<>(OP_NegUint16, L); |
28232 | } |
28233 | bool ByteCodeEmitter::emitNegSint32(const SourceInfo &L) { |
28234 | return emitOp<>(OP_NegSint32, L); |
28235 | } |
28236 | bool ByteCodeEmitter::emitNegUint32(const SourceInfo &L) { |
28237 | return emitOp<>(OP_NegUint32, L); |
28238 | } |
28239 | bool ByteCodeEmitter::emitNegSint64(const SourceInfo &L) { |
28240 | return emitOp<>(OP_NegSint64, L); |
28241 | } |
28242 | bool ByteCodeEmitter::emitNegUint64(const SourceInfo &L) { |
28243 | return emitOp<>(OP_NegUint64, L); |
28244 | } |
28245 | bool ByteCodeEmitter::emitNegIntAP(const SourceInfo &L) { |
28246 | return emitOp<>(OP_NegIntAP, L); |
28247 | } |
28248 | bool ByteCodeEmitter::emitNegIntAPS(const SourceInfo &L) { |
28249 | return emitOp<>(OP_NegIntAPS, L); |
28250 | } |
28251 | bool ByteCodeEmitter::emitNegBool(const SourceInfo &L) { |
28252 | return emitOp<>(OP_NegBool, L); |
28253 | } |
28254 | bool ByteCodeEmitter::emitNegFloat(const SourceInfo &L) { |
28255 | return emitOp<>(OP_NegFloat, L); |
28256 | } |
28257 | bool ByteCodeEmitter::emitNegFixedPoint(const SourceInfo &L) { |
28258 | return emitOp<>(OP_NegFixedPoint, L); |
28259 | } |
28260 | #endif |
28261 | #ifdef GET_EVAL_IMPL |
28262 | bool EvalEmitter::emitNegSint8(const SourceInfo &L) { |
28263 | if (!isActive()) return true; |
28264 | CurrentSource = L; |
28265 | return Neg<PT_Sint8>(S, OpPC); |
28266 | } |
28267 | bool EvalEmitter::emitNegUint8(const SourceInfo &L) { |
28268 | if (!isActive()) return true; |
28269 | CurrentSource = L; |
28270 | return Neg<PT_Uint8>(S, OpPC); |
28271 | } |
28272 | bool EvalEmitter::emitNegSint16(const SourceInfo &L) { |
28273 | if (!isActive()) return true; |
28274 | CurrentSource = L; |
28275 | return Neg<PT_Sint16>(S, OpPC); |
28276 | } |
28277 | bool EvalEmitter::emitNegUint16(const SourceInfo &L) { |
28278 | if (!isActive()) return true; |
28279 | CurrentSource = L; |
28280 | return Neg<PT_Uint16>(S, OpPC); |
28281 | } |
28282 | bool EvalEmitter::emitNegSint32(const SourceInfo &L) { |
28283 | if (!isActive()) return true; |
28284 | CurrentSource = L; |
28285 | return Neg<PT_Sint32>(S, OpPC); |
28286 | } |
28287 | bool EvalEmitter::emitNegUint32(const SourceInfo &L) { |
28288 | if (!isActive()) return true; |
28289 | CurrentSource = L; |
28290 | return Neg<PT_Uint32>(S, OpPC); |
28291 | } |
28292 | bool EvalEmitter::emitNegSint64(const SourceInfo &L) { |
28293 | if (!isActive()) return true; |
28294 | CurrentSource = L; |
28295 | return Neg<PT_Sint64>(S, OpPC); |
28296 | } |
28297 | bool EvalEmitter::emitNegUint64(const SourceInfo &L) { |
28298 | if (!isActive()) return true; |
28299 | CurrentSource = L; |
28300 | return Neg<PT_Uint64>(S, OpPC); |
28301 | } |
28302 | bool EvalEmitter::emitNegIntAP(const SourceInfo &L) { |
28303 | if (!isActive()) return true; |
28304 | CurrentSource = L; |
28305 | return Neg<PT_IntAP>(S, OpPC); |
28306 | } |
28307 | bool EvalEmitter::emitNegIntAPS(const SourceInfo &L) { |
28308 | if (!isActive()) return true; |
28309 | CurrentSource = L; |
28310 | return Neg<PT_IntAPS>(S, OpPC); |
28311 | } |
28312 | bool EvalEmitter::emitNegBool(const SourceInfo &L) { |
28313 | if (!isActive()) return true; |
28314 | CurrentSource = L; |
28315 | return Neg<PT_Bool>(S, OpPC); |
28316 | } |
28317 | bool EvalEmitter::emitNegFloat(const SourceInfo &L) { |
28318 | if (!isActive()) return true; |
28319 | CurrentSource = L; |
28320 | return Neg<PT_Float>(S, OpPC); |
28321 | } |
28322 | bool EvalEmitter::emitNegFixedPoint(const SourceInfo &L) { |
28323 | if (!isActive()) return true; |
28324 | CurrentSource = L; |
28325 | return Neg<PT_FixedPoint>(S, OpPC); |
28326 | } |
28327 | #endif |
28328 | #ifdef GET_OPCODE_NAMES |
28329 | OP_NoRet, |
28330 | #endif |
28331 | #ifdef GET_INTERP |
28332 | case OP_NoRet: { |
28333 | if (!NoRet(S, OpPC)) |
28334 | return false; |
28335 | continue; |
28336 | } |
28337 | #endif |
28338 | #ifdef GET_DISASM |
28339 | case OP_NoRet: |
28340 | Text.Op = PrintName("NoRet" ); |
28341 | break; |
28342 | #endif |
28343 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28344 | bool emitNoRet(const SourceInfo &); |
28345 | #endif |
28346 | #ifdef GET_LINK_IMPL |
28347 | bool ByteCodeEmitter::emitNoRet(const SourceInfo &L) { |
28348 | return emitOp<>(OP_NoRet, L); |
28349 | } |
28350 | #endif |
28351 | #ifdef GET_EVAL_IMPL |
28352 | bool EvalEmitter::emitNoRet(const SourceInfo &L) { |
28353 | if (!isActive()) return true; |
28354 | CurrentSource = L; |
28355 | return NoRet(S, OpPC); |
28356 | } |
28357 | #endif |
28358 | #ifdef GET_OPCODE_NAMES |
28359 | OP_NullPtr, |
28360 | OP_NullMemberPtr, |
28361 | #endif |
28362 | #ifdef GET_INTERP |
28363 | case OP_NullPtr: { |
28364 | const auto V0 = ReadArg<uint64_t>(S, PC); |
28365 | const auto V1 = ReadArg<const Descriptor *>(S, PC); |
28366 | if (!Null<PT_Ptr>(S, OpPC, V0, V1)) |
28367 | return false; |
28368 | continue; |
28369 | } |
28370 | case OP_NullMemberPtr: { |
28371 | const auto V0 = ReadArg<uint64_t>(S, PC); |
28372 | const auto V1 = ReadArg<const Descriptor *>(S, PC); |
28373 | if (!Null<PT_MemberPtr>(S, OpPC, V0, V1)) |
28374 | return false; |
28375 | continue; |
28376 | } |
28377 | #endif |
28378 | #ifdef GET_DISASM |
28379 | case OP_NullPtr: |
28380 | Text.Op = PrintName("NullPtr" ); |
28381 | Text.Args.push_back(printArg<uint64_t>(P, PC)); |
28382 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
28383 | break; |
28384 | case OP_NullMemberPtr: |
28385 | Text.Op = PrintName("NullMemberPtr" ); |
28386 | Text.Args.push_back(printArg<uint64_t>(P, PC)); |
28387 | Text.Args.push_back(printArg<const Descriptor *>(P, PC)); |
28388 | break; |
28389 | #endif |
28390 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28391 | bool emitNullPtr( uint64_t , const Descriptor * , const SourceInfo &); |
28392 | bool emitNullMemberPtr( uint64_t , const Descriptor * , const SourceInfo &); |
28393 | #endif |
28394 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28395 | [[nodiscard]] bool emitNull(PrimType, uint64_t, const Descriptor *, const SourceInfo &I); |
28396 | #endif |
28397 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
28398 | bool |
28399 | #if defined(GET_EVAL_IMPL) |
28400 | EvalEmitter |
28401 | #else |
28402 | ByteCodeEmitter |
28403 | #endif |
28404 | ::emitNull(PrimType T0, uint64_t A0, const Descriptor * A1, const SourceInfo &I) { |
28405 | switch (T0) { |
28406 | case PT_Ptr: |
28407 | return emitNullPtr(A0, A1, I); |
28408 | case PT_MemberPtr: |
28409 | return emitNullMemberPtr(A0, A1, I); |
28410 | default: llvm_unreachable("invalid type: emitNull" ); |
28411 | } |
28412 | llvm_unreachable("invalid enum value" ); |
28413 | } |
28414 | #endif |
28415 | #ifdef GET_LINK_IMPL |
28416 | bool ByteCodeEmitter::emitNullPtr( uint64_t A0, const Descriptor * A1, const SourceInfo &L) { |
28417 | return emitOp<uint64_t, const Descriptor *>(OP_NullPtr, A0, A1, L); |
28418 | } |
28419 | bool ByteCodeEmitter::emitNullMemberPtr( uint64_t A0, const Descriptor * A1, const SourceInfo &L) { |
28420 | return emitOp<uint64_t, const Descriptor *>(OP_NullMemberPtr, A0, A1, L); |
28421 | } |
28422 | #endif |
28423 | #ifdef GET_EVAL_IMPL |
28424 | bool EvalEmitter::emitNullPtr( uint64_t A0, const Descriptor * A1, const SourceInfo &L) { |
28425 | if (!isActive()) return true; |
28426 | CurrentSource = L; |
28427 | return Null<PT_Ptr>(S, OpPC, A0, A1); |
28428 | } |
28429 | bool EvalEmitter::emitNullMemberPtr( uint64_t A0, const Descriptor * A1, const SourceInfo &L) { |
28430 | if (!isActive()) return true; |
28431 | CurrentSource = L; |
28432 | return Null<PT_MemberPtr>(S, OpPC, A0, A1); |
28433 | } |
28434 | #endif |
28435 | #ifdef GET_OPCODE_NAMES |
28436 | OP_OffsetOfSint8, |
28437 | OP_OffsetOfUint8, |
28438 | OP_OffsetOfSint16, |
28439 | OP_OffsetOfUint16, |
28440 | OP_OffsetOfSint32, |
28441 | OP_OffsetOfUint32, |
28442 | OP_OffsetOfSint64, |
28443 | OP_OffsetOfUint64, |
28444 | OP_OffsetOfIntAP, |
28445 | OP_OffsetOfIntAPS, |
28446 | #endif |
28447 | #ifdef GET_INTERP |
28448 | case OP_OffsetOfSint8: { |
28449 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28450 | if (!OffsetOf<PT_Sint8>(S, OpPC, V0)) |
28451 | return false; |
28452 | continue; |
28453 | } |
28454 | case OP_OffsetOfUint8: { |
28455 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28456 | if (!OffsetOf<PT_Uint8>(S, OpPC, V0)) |
28457 | return false; |
28458 | continue; |
28459 | } |
28460 | case OP_OffsetOfSint16: { |
28461 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28462 | if (!OffsetOf<PT_Sint16>(S, OpPC, V0)) |
28463 | return false; |
28464 | continue; |
28465 | } |
28466 | case OP_OffsetOfUint16: { |
28467 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28468 | if (!OffsetOf<PT_Uint16>(S, OpPC, V0)) |
28469 | return false; |
28470 | continue; |
28471 | } |
28472 | case OP_OffsetOfSint32: { |
28473 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28474 | if (!OffsetOf<PT_Sint32>(S, OpPC, V0)) |
28475 | return false; |
28476 | continue; |
28477 | } |
28478 | case OP_OffsetOfUint32: { |
28479 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28480 | if (!OffsetOf<PT_Uint32>(S, OpPC, V0)) |
28481 | return false; |
28482 | continue; |
28483 | } |
28484 | case OP_OffsetOfSint64: { |
28485 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28486 | if (!OffsetOf<PT_Sint64>(S, OpPC, V0)) |
28487 | return false; |
28488 | continue; |
28489 | } |
28490 | case OP_OffsetOfUint64: { |
28491 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28492 | if (!OffsetOf<PT_Uint64>(S, OpPC, V0)) |
28493 | return false; |
28494 | continue; |
28495 | } |
28496 | case OP_OffsetOfIntAP: { |
28497 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28498 | if (!OffsetOf<PT_IntAP>(S, OpPC, V0)) |
28499 | return false; |
28500 | continue; |
28501 | } |
28502 | case OP_OffsetOfIntAPS: { |
28503 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
28504 | if (!OffsetOf<PT_IntAPS>(S, OpPC, V0)) |
28505 | return false; |
28506 | continue; |
28507 | } |
28508 | #endif |
28509 | #ifdef GET_DISASM |
28510 | case OP_OffsetOfSint8: |
28511 | Text.Op = PrintName("OffsetOfSint8" ); |
28512 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28513 | break; |
28514 | case OP_OffsetOfUint8: |
28515 | Text.Op = PrintName("OffsetOfUint8" ); |
28516 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28517 | break; |
28518 | case OP_OffsetOfSint16: |
28519 | Text.Op = PrintName("OffsetOfSint16" ); |
28520 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28521 | break; |
28522 | case OP_OffsetOfUint16: |
28523 | Text.Op = PrintName("OffsetOfUint16" ); |
28524 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28525 | break; |
28526 | case OP_OffsetOfSint32: |
28527 | Text.Op = PrintName("OffsetOfSint32" ); |
28528 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28529 | break; |
28530 | case OP_OffsetOfUint32: |
28531 | Text.Op = PrintName("OffsetOfUint32" ); |
28532 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28533 | break; |
28534 | case OP_OffsetOfSint64: |
28535 | Text.Op = PrintName("OffsetOfSint64" ); |
28536 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28537 | break; |
28538 | case OP_OffsetOfUint64: |
28539 | Text.Op = PrintName("OffsetOfUint64" ); |
28540 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28541 | break; |
28542 | case OP_OffsetOfIntAP: |
28543 | Text.Op = PrintName("OffsetOfIntAP" ); |
28544 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28545 | break; |
28546 | case OP_OffsetOfIntAPS: |
28547 | Text.Op = PrintName("OffsetOfIntAPS" ); |
28548 | Text.Args.push_back(printArg<const OffsetOfExpr *>(P, PC)); |
28549 | break; |
28550 | #endif |
28551 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28552 | bool emitOffsetOfSint8( const OffsetOfExpr * , const SourceInfo &); |
28553 | bool emitOffsetOfUint8( const OffsetOfExpr * , const SourceInfo &); |
28554 | bool emitOffsetOfSint16( const OffsetOfExpr * , const SourceInfo &); |
28555 | bool emitOffsetOfUint16( const OffsetOfExpr * , const SourceInfo &); |
28556 | bool emitOffsetOfSint32( const OffsetOfExpr * , const SourceInfo &); |
28557 | bool emitOffsetOfUint32( const OffsetOfExpr * , const SourceInfo &); |
28558 | bool emitOffsetOfSint64( const OffsetOfExpr * , const SourceInfo &); |
28559 | bool emitOffsetOfUint64( const OffsetOfExpr * , const SourceInfo &); |
28560 | bool emitOffsetOfIntAP( const OffsetOfExpr * , const SourceInfo &); |
28561 | bool emitOffsetOfIntAPS( const OffsetOfExpr * , const SourceInfo &); |
28562 | #endif |
28563 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28564 | [[nodiscard]] bool emitOffsetOf(PrimType, const OffsetOfExpr *, const SourceInfo &I); |
28565 | #endif |
28566 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
28567 | bool |
28568 | #if defined(GET_EVAL_IMPL) |
28569 | EvalEmitter |
28570 | #else |
28571 | ByteCodeEmitter |
28572 | #endif |
28573 | ::emitOffsetOf(PrimType T0, const OffsetOfExpr * A0, const SourceInfo &I) { |
28574 | switch (T0) { |
28575 | case PT_Sint8: |
28576 | return emitOffsetOfSint8(A0, I); |
28577 | case PT_Uint8: |
28578 | return emitOffsetOfUint8(A0, I); |
28579 | case PT_Sint16: |
28580 | return emitOffsetOfSint16(A0, I); |
28581 | case PT_Uint16: |
28582 | return emitOffsetOfUint16(A0, I); |
28583 | case PT_Sint32: |
28584 | return emitOffsetOfSint32(A0, I); |
28585 | case PT_Uint32: |
28586 | return emitOffsetOfUint32(A0, I); |
28587 | case PT_Sint64: |
28588 | return emitOffsetOfSint64(A0, I); |
28589 | case PT_Uint64: |
28590 | return emitOffsetOfUint64(A0, I); |
28591 | case PT_IntAP: |
28592 | return emitOffsetOfIntAP(A0, I); |
28593 | case PT_IntAPS: |
28594 | return emitOffsetOfIntAPS(A0, I); |
28595 | default: llvm_unreachable("invalid type: emitOffsetOf" ); |
28596 | } |
28597 | llvm_unreachable("invalid enum value" ); |
28598 | } |
28599 | #endif |
28600 | #ifdef GET_LINK_IMPL |
28601 | bool ByteCodeEmitter::emitOffsetOfSint8( const OffsetOfExpr * A0, const SourceInfo &L) { |
28602 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfSint8, A0, L); |
28603 | } |
28604 | bool ByteCodeEmitter::emitOffsetOfUint8( const OffsetOfExpr * A0, const SourceInfo &L) { |
28605 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfUint8, A0, L); |
28606 | } |
28607 | bool ByteCodeEmitter::emitOffsetOfSint16( const OffsetOfExpr * A0, const SourceInfo &L) { |
28608 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfSint16, A0, L); |
28609 | } |
28610 | bool ByteCodeEmitter::emitOffsetOfUint16( const OffsetOfExpr * A0, const SourceInfo &L) { |
28611 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfUint16, A0, L); |
28612 | } |
28613 | bool ByteCodeEmitter::emitOffsetOfSint32( const OffsetOfExpr * A0, const SourceInfo &L) { |
28614 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfSint32, A0, L); |
28615 | } |
28616 | bool ByteCodeEmitter::emitOffsetOfUint32( const OffsetOfExpr * A0, const SourceInfo &L) { |
28617 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfUint32, A0, L); |
28618 | } |
28619 | bool ByteCodeEmitter::emitOffsetOfSint64( const OffsetOfExpr * A0, const SourceInfo &L) { |
28620 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfSint64, A0, L); |
28621 | } |
28622 | bool ByteCodeEmitter::emitOffsetOfUint64( const OffsetOfExpr * A0, const SourceInfo &L) { |
28623 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfUint64, A0, L); |
28624 | } |
28625 | bool ByteCodeEmitter::emitOffsetOfIntAP( const OffsetOfExpr * A0, const SourceInfo &L) { |
28626 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfIntAP, A0, L); |
28627 | } |
28628 | bool ByteCodeEmitter::emitOffsetOfIntAPS( const OffsetOfExpr * A0, const SourceInfo &L) { |
28629 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfIntAPS, A0, L); |
28630 | } |
28631 | #endif |
28632 | #ifdef GET_EVAL_IMPL |
28633 | bool EvalEmitter::emitOffsetOfSint8( const OffsetOfExpr * A0, const SourceInfo &L) { |
28634 | if (!isActive()) return true; |
28635 | CurrentSource = L; |
28636 | return OffsetOf<PT_Sint8>(S, OpPC, A0); |
28637 | } |
28638 | bool EvalEmitter::emitOffsetOfUint8( const OffsetOfExpr * A0, const SourceInfo &L) { |
28639 | if (!isActive()) return true; |
28640 | CurrentSource = L; |
28641 | return OffsetOf<PT_Uint8>(S, OpPC, A0); |
28642 | } |
28643 | bool EvalEmitter::emitOffsetOfSint16( const OffsetOfExpr * A0, const SourceInfo &L) { |
28644 | if (!isActive()) return true; |
28645 | CurrentSource = L; |
28646 | return OffsetOf<PT_Sint16>(S, OpPC, A0); |
28647 | } |
28648 | bool EvalEmitter::emitOffsetOfUint16( const OffsetOfExpr * A0, const SourceInfo &L) { |
28649 | if (!isActive()) return true; |
28650 | CurrentSource = L; |
28651 | return OffsetOf<PT_Uint16>(S, OpPC, A0); |
28652 | } |
28653 | bool EvalEmitter::emitOffsetOfSint32( const OffsetOfExpr * A0, const SourceInfo &L) { |
28654 | if (!isActive()) return true; |
28655 | CurrentSource = L; |
28656 | return OffsetOf<PT_Sint32>(S, OpPC, A0); |
28657 | } |
28658 | bool EvalEmitter::emitOffsetOfUint32( const OffsetOfExpr * A0, const SourceInfo &L) { |
28659 | if (!isActive()) return true; |
28660 | CurrentSource = L; |
28661 | return OffsetOf<PT_Uint32>(S, OpPC, A0); |
28662 | } |
28663 | bool EvalEmitter::emitOffsetOfSint64( const OffsetOfExpr * A0, const SourceInfo &L) { |
28664 | if (!isActive()) return true; |
28665 | CurrentSource = L; |
28666 | return OffsetOf<PT_Sint64>(S, OpPC, A0); |
28667 | } |
28668 | bool EvalEmitter::emitOffsetOfUint64( const OffsetOfExpr * A0, const SourceInfo &L) { |
28669 | if (!isActive()) return true; |
28670 | CurrentSource = L; |
28671 | return OffsetOf<PT_Uint64>(S, OpPC, A0); |
28672 | } |
28673 | bool EvalEmitter::emitOffsetOfIntAP( const OffsetOfExpr * A0, const SourceInfo &L) { |
28674 | if (!isActive()) return true; |
28675 | CurrentSource = L; |
28676 | return OffsetOf<PT_IntAP>(S, OpPC, A0); |
28677 | } |
28678 | bool EvalEmitter::emitOffsetOfIntAPS( const OffsetOfExpr * A0, const SourceInfo &L) { |
28679 | if (!isActive()) return true; |
28680 | CurrentSource = L; |
28681 | return OffsetOf<PT_IntAPS>(S, OpPC, A0); |
28682 | } |
28683 | #endif |
28684 | #ifdef GET_OPCODE_NAMES |
28685 | OP_PopSint8, |
28686 | OP_PopUint8, |
28687 | OP_PopSint16, |
28688 | OP_PopUint16, |
28689 | OP_PopSint32, |
28690 | OP_PopUint32, |
28691 | OP_PopSint64, |
28692 | OP_PopUint64, |
28693 | OP_PopIntAP, |
28694 | OP_PopIntAPS, |
28695 | OP_PopBool, |
28696 | OP_PopFixedPoint, |
28697 | OP_PopPtr, |
28698 | OP_PopMemberPtr, |
28699 | OP_PopFloat, |
28700 | #endif |
28701 | #ifdef GET_INTERP |
28702 | case OP_PopSint8: { |
28703 | if (!Pop<PT_Sint8>(S, OpPC)) |
28704 | return false; |
28705 | continue; |
28706 | } |
28707 | case OP_PopUint8: { |
28708 | if (!Pop<PT_Uint8>(S, OpPC)) |
28709 | return false; |
28710 | continue; |
28711 | } |
28712 | case OP_PopSint16: { |
28713 | if (!Pop<PT_Sint16>(S, OpPC)) |
28714 | return false; |
28715 | continue; |
28716 | } |
28717 | case OP_PopUint16: { |
28718 | if (!Pop<PT_Uint16>(S, OpPC)) |
28719 | return false; |
28720 | continue; |
28721 | } |
28722 | case OP_PopSint32: { |
28723 | if (!Pop<PT_Sint32>(S, OpPC)) |
28724 | return false; |
28725 | continue; |
28726 | } |
28727 | case OP_PopUint32: { |
28728 | if (!Pop<PT_Uint32>(S, OpPC)) |
28729 | return false; |
28730 | continue; |
28731 | } |
28732 | case OP_PopSint64: { |
28733 | if (!Pop<PT_Sint64>(S, OpPC)) |
28734 | return false; |
28735 | continue; |
28736 | } |
28737 | case OP_PopUint64: { |
28738 | if (!Pop<PT_Uint64>(S, OpPC)) |
28739 | return false; |
28740 | continue; |
28741 | } |
28742 | case OP_PopIntAP: { |
28743 | if (!Pop<PT_IntAP>(S, OpPC)) |
28744 | return false; |
28745 | continue; |
28746 | } |
28747 | case OP_PopIntAPS: { |
28748 | if (!Pop<PT_IntAPS>(S, OpPC)) |
28749 | return false; |
28750 | continue; |
28751 | } |
28752 | case OP_PopBool: { |
28753 | if (!Pop<PT_Bool>(S, OpPC)) |
28754 | return false; |
28755 | continue; |
28756 | } |
28757 | case OP_PopFixedPoint: { |
28758 | if (!Pop<PT_FixedPoint>(S, OpPC)) |
28759 | return false; |
28760 | continue; |
28761 | } |
28762 | case OP_PopPtr: { |
28763 | if (!Pop<PT_Ptr>(S, OpPC)) |
28764 | return false; |
28765 | continue; |
28766 | } |
28767 | case OP_PopMemberPtr: { |
28768 | if (!Pop<PT_MemberPtr>(S, OpPC)) |
28769 | return false; |
28770 | continue; |
28771 | } |
28772 | case OP_PopFloat: { |
28773 | if (!Pop<PT_Float>(S, OpPC)) |
28774 | return false; |
28775 | continue; |
28776 | } |
28777 | #endif |
28778 | #ifdef GET_DISASM |
28779 | case OP_PopSint8: |
28780 | Text.Op = PrintName("PopSint8" ); |
28781 | break; |
28782 | case OP_PopUint8: |
28783 | Text.Op = PrintName("PopUint8" ); |
28784 | break; |
28785 | case OP_PopSint16: |
28786 | Text.Op = PrintName("PopSint16" ); |
28787 | break; |
28788 | case OP_PopUint16: |
28789 | Text.Op = PrintName("PopUint16" ); |
28790 | break; |
28791 | case OP_PopSint32: |
28792 | Text.Op = PrintName("PopSint32" ); |
28793 | break; |
28794 | case OP_PopUint32: |
28795 | Text.Op = PrintName("PopUint32" ); |
28796 | break; |
28797 | case OP_PopSint64: |
28798 | Text.Op = PrintName("PopSint64" ); |
28799 | break; |
28800 | case OP_PopUint64: |
28801 | Text.Op = PrintName("PopUint64" ); |
28802 | break; |
28803 | case OP_PopIntAP: |
28804 | Text.Op = PrintName("PopIntAP" ); |
28805 | break; |
28806 | case OP_PopIntAPS: |
28807 | Text.Op = PrintName("PopIntAPS" ); |
28808 | break; |
28809 | case OP_PopBool: |
28810 | Text.Op = PrintName("PopBool" ); |
28811 | break; |
28812 | case OP_PopFixedPoint: |
28813 | Text.Op = PrintName("PopFixedPoint" ); |
28814 | break; |
28815 | case OP_PopPtr: |
28816 | Text.Op = PrintName("PopPtr" ); |
28817 | break; |
28818 | case OP_PopMemberPtr: |
28819 | Text.Op = PrintName("PopMemberPtr" ); |
28820 | break; |
28821 | case OP_PopFloat: |
28822 | Text.Op = PrintName("PopFloat" ); |
28823 | break; |
28824 | #endif |
28825 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28826 | bool emitPopSint8(const SourceInfo &); |
28827 | bool emitPopUint8(const SourceInfo &); |
28828 | bool emitPopSint16(const SourceInfo &); |
28829 | bool emitPopUint16(const SourceInfo &); |
28830 | bool emitPopSint32(const SourceInfo &); |
28831 | bool emitPopUint32(const SourceInfo &); |
28832 | bool emitPopSint64(const SourceInfo &); |
28833 | bool emitPopUint64(const SourceInfo &); |
28834 | bool emitPopIntAP(const SourceInfo &); |
28835 | bool emitPopIntAPS(const SourceInfo &); |
28836 | bool emitPopBool(const SourceInfo &); |
28837 | bool emitPopFixedPoint(const SourceInfo &); |
28838 | bool emitPopPtr(const SourceInfo &); |
28839 | bool emitPopMemberPtr(const SourceInfo &); |
28840 | bool emitPopFloat(const SourceInfo &); |
28841 | #endif |
28842 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28843 | [[nodiscard]] bool emitPop(PrimType, const SourceInfo &I); |
28844 | #endif |
28845 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
28846 | bool |
28847 | #if defined(GET_EVAL_IMPL) |
28848 | EvalEmitter |
28849 | #else |
28850 | ByteCodeEmitter |
28851 | #endif |
28852 | ::emitPop(PrimType T0, const SourceInfo &I) { |
28853 | switch (T0) { |
28854 | case PT_Sint8: |
28855 | return emitPopSint8(I); |
28856 | case PT_Uint8: |
28857 | return emitPopUint8(I); |
28858 | case PT_Sint16: |
28859 | return emitPopSint16(I); |
28860 | case PT_Uint16: |
28861 | return emitPopUint16(I); |
28862 | case PT_Sint32: |
28863 | return emitPopSint32(I); |
28864 | case PT_Uint32: |
28865 | return emitPopUint32(I); |
28866 | case PT_Sint64: |
28867 | return emitPopSint64(I); |
28868 | case PT_Uint64: |
28869 | return emitPopUint64(I); |
28870 | case PT_IntAP: |
28871 | return emitPopIntAP(I); |
28872 | case PT_IntAPS: |
28873 | return emitPopIntAPS(I); |
28874 | case PT_Bool: |
28875 | return emitPopBool(I); |
28876 | case PT_FixedPoint: |
28877 | return emitPopFixedPoint(I); |
28878 | case PT_Ptr: |
28879 | return emitPopPtr(I); |
28880 | case PT_MemberPtr: |
28881 | return emitPopMemberPtr(I); |
28882 | case PT_Float: |
28883 | return emitPopFloat(I); |
28884 | } |
28885 | llvm_unreachable("invalid enum value" ); |
28886 | } |
28887 | #endif |
28888 | #ifdef GET_LINK_IMPL |
28889 | bool ByteCodeEmitter::emitPopSint8(const SourceInfo &L) { |
28890 | return emitOp<>(OP_PopSint8, L); |
28891 | } |
28892 | bool ByteCodeEmitter::emitPopUint8(const SourceInfo &L) { |
28893 | return emitOp<>(OP_PopUint8, L); |
28894 | } |
28895 | bool ByteCodeEmitter::emitPopSint16(const SourceInfo &L) { |
28896 | return emitOp<>(OP_PopSint16, L); |
28897 | } |
28898 | bool ByteCodeEmitter::emitPopUint16(const SourceInfo &L) { |
28899 | return emitOp<>(OP_PopUint16, L); |
28900 | } |
28901 | bool ByteCodeEmitter::emitPopSint32(const SourceInfo &L) { |
28902 | return emitOp<>(OP_PopSint32, L); |
28903 | } |
28904 | bool ByteCodeEmitter::emitPopUint32(const SourceInfo &L) { |
28905 | return emitOp<>(OP_PopUint32, L); |
28906 | } |
28907 | bool ByteCodeEmitter::emitPopSint64(const SourceInfo &L) { |
28908 | return emitOp<>(OP_PopSint64, L); |
28909 | } |
28910 | bool ByteCodeEmitter::emitPopUint64(const SourceInfo &L) { |
28911 | return emitOp<>(OP_PopUint64, L); |
28912 | } |
28913 | bool ByteCodeEmitter::emitPopIntAP(const SourceInfo &L) { |
28914 | return emitOp<>(OP_PopIntAP, L); |
28915 | } |
28916 | bool ByteCodeEmitter::emitPopIntAPS(const SourceInfo &L) { |
28917 | return emitOp<>(OP_PopIntAPS, L); |
28918 | } |
28919 | bool ByteCodeEmitter::emitPopBool(const SourceInfo &L) { |
28920 | return emitOp<>(OP_PopBool, L); |
28921 | } |
28922 | bool ByteCodeEmitter::emitPopFixedPoint(const SourceInfo &L) { |
28923 | return emitOp<>(OP_PopFixedPoint, L); |
28924 | } |
28925 | bool ByteCodeEmitter::emitPopPtr(const SourceInfo &L) { |
28926 | return emitOp<>(OP_PopPtr, L); |
28927 | } |
28928 | bool ByteCodeEmitter::emitPopMemberPtr(const SourceInfo &L) { |
28929 | return emitOp<>(OP_PopMemberPtr, L); |
28930 | } |
28931 | bool ByteCodeEmitter::emitPopFloat(const SourceInfo &L) { |
28932 | return emitOp<>(OP_PopFloat, L); |
28933 | } |
28934 | #endif |
28935 | #ifdef GET_EVAL_IMPL |
28936 | bool EvalEmitter::emitPopSint8(const SourceInfo &L) { |
28937 | if (!isActive()) return true; |
28938 | CurrentSource = L; |
28939 | return Pop<PT_Sint8>(S, OpPC); |
28940 | } |
28941 | bool EvalEmitter::emitPopUint8(const SourceInfo &L) { |
28942 | if (!isActive()) return true; |
28943 | CurrentSource = L; |
28944 | return Pop<PT_Uint8>(S, OpPC); |
28945 | } |
28946 | bool EvalEmitter::emitPopSint16(const SourceInfo &L) { |
28947 | if (!isActive()) return true; |
28948 | CurrentSource = L; |
28949 | return Pop<PT_Sint16>(S, OpPC); |
28950 | } |
28951 | bool EvalEmitter::emitPopUint16(const SourceInfo &L) { |
28952 | if (!isActive()) return true; |
28953 | CurrentSource = L; |
28954 | return Pop<PT_Uint16>(S, OpPC); |
28955 | } |
28956 | bool EvalEmitter::emitPopSint32(const SourceInfo &L) { |
28957 | if (!isActive()) return true; |
28958 | CurrentSource = L; |
28959 | return Pop<PT_Sint32>(S, OpPC); |
28960 | } |
28961 | bool EvalEmitter::emitPopUint32(const SourceInfo &L) { |
28962 | if (!isActive()) return true; |
28963 | CurrentSource = L; |
28964 | return Pop<PT_Uint32>(S, OpPC); |
28965 | } |
28966 | bool EvalEmitter::emitPopSint64(const SourceInfo &L) { |
28967 | if (!isActive()) return true; |
28968 | CurrentSource = L; |
28969 | return Pop<PT_Sint64>(S, OpPC); |
28970 | } |
28971 | bool EvalEmitter::emitPopUint64(const SourceInfo &L) { |
28972 | if (!isActive()) return true; |
28973 | CurrentSource = L; |
28974 | return Pop<PT_Uint64>(S, OpPC); |
28975 | } |
28976 | bool EvalEmitter::emitPopIntAP(const SourceInfo &L) { |
28977 | if (!isActive()) return true; |
28978 | CurrentSource = L; |
28979 | return Pop<PT_IntAP>(S, OpPC); |
28980 | } |
28981 | bool EvalEmitter::emitPopIntAPS(const SourceInfo &L) { |
28982 | if (!isActive()) return true; |
28983 | CurrentSource = L; |
28984 | return Pop<PT_IntAPS>(S, OpPC); |
28985 | } |
28986 | bool EvalEmitter::emitPopBool(const SourceInfo &L) { |
28987 | if (!isActive()) return true; |
28988 | CurrentSource = L; |
28989 | return Pop<PT_Bool>(S, OpPC); |
28990 | } |
28991 | bool EvalEmitter::emitPopFixedPoint(const SourceInfo &L) { |
28992 | if (!isActive()) return true; |
28993 | CurrentSource = L; |
28994 | return Pop<PT_FixedPoint>(S, OpPC); |
28995 | } |
28996 | bool EvalEmitter::emitPopPtr(const SourceInfo &L) { |
28997 | if (!isActive()) return true; |
28998 | CurrentSource = L; |
28999 | return Pop<PT_Ptr>(S, OpPC); |
29000 | } |
29001 | bool EvalEmitter::emitPopMemberPtr(const SourceInfo &L) { |
29002 | if (!isActive()) return true; |
29003 | CurrentSource = L; |
29004 | return Pop<PT_MemberPtr>(S, OpPC); |
29005 | } |
29006 | bool EvalEmitter::emitPopFloat(const SourceInfo &L) { |
29007 | if (!isActive()) return true; |
29008 | CurrentSource = L; |
29009 | return Pop<PT_Float>(S, OpPC); |
29010 | } |
29011 | #endif |
29012 | #ifdef GET_OPCODE_NAMES |
29013 | OP_PopCC, |
29014 | #endif |
29015 | #ifdef GET_INTERP |
29016 | case OP_PopCC: { |
29017 | if (!PopCC(S, OpPC)) |
29018 | return false; |
29019 | continue; |
29020 | } |
29021 | #endif |
29022 | #ifdef GET_DISASM |
29023 | case OP_PopCC: |
29024 | Text.Op = PrintName("PopCC" ); |
29025 | break; |
29026 | #endif |
29027 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29028 | bool emitPopCC(const SourceInfo &); |
29029 | #endif |
29030 | #ifdef GET_LINK_IMPL |
29031 | bool ByteCodeEmitter::emitPopCC(const SourceInfo &L) { |
29032 | return emitOp<>(OP_PopCC, L); |
29033 | } |
29034 | #endif |
29035 | #ifdef GET_EVAL_IMPL |
29036 | bool EvalEmitter::emitPopCC(const SourceInfo &L) { |
29037 | if (!isActive()) return true; |
29038 | CurrentSource = L; |
29039 | return PopCC(S, OpPC); |
29040 | } |
29041 | #endif |
29042 | #ifdef GET_OPCODE_NAMES |
29043 | OP_PreDecSint8, |
29044 | OP_PreDecUint8, |
29045 | OP_PreDecSint16, |
29046 | OP_PreDecUint16, |
29047 | OP_PreDecSint32, |
29048 | OP_PreDecUint32, |
29049 | OP_PreDecSint64, |
29050 | OP_PreDecUint64, |
29051 | OP_PreDecIntAP, |
29052 | OP_PreDecIntAPS, |
29053 | OP_PreDecBool, |
29054 | OP_PreDecFixedPoint, |
29055 | #endif |
29056 | #ifdef GET_INTERP |
29057 | case OP_PreDecSint8: { |
29058 | const auto V0 = ReadArg<bool>(S, PC); |
29059 | if (!PreDec<PT_Sint8>(S, OpPC, V0)) |
29060 | return false; |
29061 | continue; |
29062 | } |
29063 | case OP_PreDecUint8: { |
29064 | const auto V0 = ReadArg<bool>(S, PC); |
29065 | if (!PreDec<PT_Uint8>(S, OpPC, V0)) |
29066 | return false; |
29067 | continue; |
29068 | } |
29069 | case OP_PreDecSint16: { |
29070 | const auto V0 = ReadArg<bool>(S, PC); |
29071 | if (!PreDec<PT_Sint16>(S, OpPC, V0)) |
29072 | return false; |
29073 | continue; |
29074 | } |
29075 | case OP_PreDecUint16: { |
29076 | const auto V0 = ReadArg<bool>(S, PC); |
29077 | if (!PreDec<PT_Uint16>(S, OpPC, V0)) |
29078 | return false; |
29079 | continue; |
29080 | } |
29081 | case OP_PreDecSint32: { |
29082 | const auto V0 = ReadArg<bool>(S, PC); |
29083 | if (!PreDec<PT_Sint32>(S, OpPC, V0)) |
29084 | return false; |
29085 | continue; |
29086 | } |
29087 | case OP_PreDecUint32: { |
29088 | const auto V0 = ReadArg<bool>(S, PC); |
29089 | if (!PreDec<PT_Uint32>(S, OpPC, V0)) |
29090 | return false; |
29091 | continue; |
29092 | } |
29093 | case OP_PreDecSint64: { |
29094 | const auto V0 = ReadArg<bool>(S, PC); |
29095 | if (!PreDec<PT_Sint64>(S, OpPC, V0)) |
29096 | return false; |
29097 | continue; |
29098 | } |
29099 | case OP_PreDecUint64: { |
29100 | const auto V0 = ReadArg<bool>(S, PC); |
29101 | if (!PreDec<PT_Uint64>(S, OpPC, V0)) |
29102 | return false; |
29103 | continue; |
29104 | } |
29105 | case OP_PreDecIntAP: { |
29106 | const auto V0 = ReadArg<bool>(S, PC); |
29107 | if (!PreDec<PT_IntAP>(S, OpPC, V0)) |
29108 | return false; |
29109 | continue; |
29110 | } |
29111 | case OP_PreDecIntAPS: { |
29112 | const auto V0 = ReadArg<bool>(S, PC); |
29113 | if (!PreDec<PT_IntAPS>(S, OpPC, V0)) |
29114 | return false; |
29115 | continue; |
29116 | } |
29117 | case OP_PreDecBool: { |
29118 | const auto V0 = ReadArg<bool>(S, PC); |
29119 | if (!PreDec<PT_Bool>(S, OpPC, V0)) |
29120 | return false; |
29121 | continue; |
29122 | } |
29123 | case OP_PreDecFixedPoint: { |
29124 | const auto V0 = ReadArg<bool>(S, PC); |
29125 | if (!PreDec<PT_FixedPoint>(S, OpPC, V0)) |
29126 | return false; |
29127 | continue; |
29128 | } |
29129 | #endif |
29130 | #ifdef GET_DISASM |
29131 | case OP_PreDecSint8: |
29132 | Text.Op = PrintName("PreDecSint8" ); |
29133 | Text.Args.push_back(printArg<bool>(P, PC)); |
29134 | break; |
29135 | case OP_PreDecUint8: |
29136 | Text.Op = PrintName("PreDecUint8" ); |
29137 | Text.Args.push_back(printArg<bool>(P, PC)); |
29138 | break; |
29139 | case OP_PreDecSint16: |
29140 | Text.Op = PrintName("PreDecSint16" ); |
29141 | Text.Args.push_back(printArg<bool>(P, PC)); |
29142 | break; |
29143 | case OP_PreDecUint16: |
29144 | Text.Op = PrintName("PreDecUint16" ); |
29145 | Text.Args.push_back(printArg<bool>(P, PC)); |
29146 | break; |
29147 | case OP_PreDecSint32: |
29148 | Text.Op = PrintName("PreDecSint32" ); |
29149 | Text.Args.push_back(printArg<bool>(P, PC)); |
29150 | break; |
29151 | case OP_PreDecUint32: |
29152 | Text.Op = PrintName("PreDecUint32" ); |
29153 | Text.Args.push_back(printArg<bool>(P, PC)); |
29154 | break; |
29155 | case OP_PreDecSint64: |
29156 | Text.Op = PrintName("PreDecSint64" ); |
29157 | Text.Args.push_back(printArg<bool>(P, PC)); |
29158 | break; |
29159 | case OP_PreDecUint64: |
29160 | Text.Op = PrintName("PreDecUint64" ); |
29161 | Text.Args.push_back(printArg<bool>(P, PC)); |
29162 | break; |
29163 | case OP_PreDecIntAP: |
29164 | Text.Op = PrintName("PreDecIntAP" ); |
29165 | Text.Args.push_back(printArg<bool>(P, PC)); |
29166 | break; |
29167 | case OP_PreDecIntAPS: |
29168 | Text.Op = PrintName("PreDecIntAPS" ); |
29169 | Text.Args.push_back(printArg<bool>(P, PC)); |
29170 | break; |
29171 | case OP_PreDecBool: |
29172 | Text.Op = PrintName("PreDecBool" ); |
29173 | Text.Args.push_back(printArg<bool>(P, PC)); |
29174 | break; |
29175 | case OP_PreDecFixedPoint: |
29176 | Text.Op = PrintName("PreDecFixedPoint" ); |
29177 | Text.Args.push_back(printArg<bool>(P, PC)); |
29178 | break; |
29179 | #endif |
29180 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29181 | bool emitPreDecSint8( bool , const SourceInfo &); |
29182 | bool emitPreDecUint8( bool , const SourceInfo &); |
29183 | bool emitPreDecSint16( bool , const SourceInfo &); |
29184 | bool emitPreDecUint16( bool , const SourceInfo &); |
29185 | bool emitPreDecSint32( bool , const SourceInfo &); |
29186 | bool emitPreDecUint32( bool , const SourceInfo &); |
29187 | bool emitPreDecSint64( bool , const SourceInfo &); |
29188 | bool emitPreDecUint64( bool , const SourceInfo &); |
29189 | bool emitPreDecIntAP( bool , const SourceInfo &); |
29190 | bool emitPreDecIntAPS( bool , const SourceInfo &); |
29191 | bool emitPreDecBool( bool , const SourceInfo &); |
29192 | bool emitPreDecFixedPoint( bool , const SourceInfo &); |
29193 | #endif |
29194 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29195 | [[nodiscard]] bool emitPreDec(PrimType, bool, const SourceInfo &I); |
29196 | #endif |
29197 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
29198 | bool |
29199 | #if defined(GET_EVAL_IMPL) |
29200 | EvalEmitter |
29201 | #else |
29202 | ByteCodeEmitter |
29203 | #endif |
29204 | ::emitPreDec(PrimType T0, bool A0, const SourceInfo &I) { |
29205 | switch (T0) { |
29206 | case PT_Sint8: |
29207 | return emitPreDecSint8(A0, I); |
29208 | case PT_Uint8: |
29209 | return emitPreDecUint8(A0, I); |
29210 | case PT_Sint16: |
29211 | return emitPreDecSint16(A0, I); |
29212 | case PT_Uint16: |
29213 | return emitPreDecUint16(A0, I); |
29214 | case PT_Sint32: |
29215 | return emitPreDecSint32(A0, I); |
29216 | case PT_Uint32: |
29217 | return emitPreDecUint32(A0, I); |
29218 | case PT_Sint64: |
29219 | return emitPreDecSint64(A0, I); |
29220 | case PT_Uint64: |
29221 | return emitPreDecUint64(A0, I); |
29222 | case PT_IntAP: |
29223 | return emitPreDecIntAP(A0, I); |
29224 | case PT_IntAPS: |
29225 | return emitPreDecIntAPS(A0, I); |
29226 | case PT_Bool: |
29227 | return emitPreDecBool(A0, I); |
29228 | case PT_FixedPoint: |
29229 | return emitPreDecFixedPoint(A0, I); |
29230 | default: llvm_unreachable("invalid type: emitPreDec" ); |
29231 | } |
29232 | llvm_unreachable("invalid enum value" ); |
29233 | } |
29234 | #endif |
29235 | #ifdef GET_LINK_IMPL |
29236 | bool ByteCodeEmitter::emitPreDecSint8( bool A0, const SourceInfo &L) { |
29237 | return emitOp<bool>(OP_PreDecSint8, A0, L); |
29238 | } |
29239 | bool ByteCodeEmitter::emitPreDecUint8( bool A0, const SourceInfo &L) { |
29240 | return emitOp<bool>(OP_PreDecUint8, A0, L); |
29241 | } |
29242 | bool ByteCodeEmitter::emitPreDecSint16( bool A0, const SourceInfo &L) { |
29243 | return emitOp<bool>(OP_PreDecSint16, A0, L); |
29244 | } |
29245 | bool ByteCodeEmitter::emitPreDecUint16( bool A0, const SourceInfo &L) { |
29246 | return emitOp<bool>(OP_PreDecUint16, A0, L); |
29247 | } |
29248 | bool ByteCodeEmitter::emitPreDecSint32( bool A0, const SourceInfo &L) { |
29249 | return emitOp<bool>(OP_PreDecSint32, A0, L); |
29250 | } |
29251 | bool ByteCodeEmitter::emitPreDecUint32( bool A0, const SourceInfo &L) { |
29252 | return emitOp<bool>(OP_PreDecUint32, A0, L); |
29253 | } |
29254 | bool ByteCodeEmitter::emitPreDecSint64( bool A0, const SourceInfo &L) { |
29255 | return emitOp<bool>(OP_PreDecSint64, A0, L); |
29256 | } |
29257 | bool ByteCodeEmitter::emitPreDecUint64( bool A0, const SourceInfo &L) { |
29258 | return emitOp<bool>(OP_PreDecUint64, A0, L); |
29259 | } |
29260 | bool ByteCodeEmitter::emitPreDecIntAP( bool A0, const SourceInfo &L) { |
29261 | return emitOp<bool>(OP_PreDecIntAP, A0, L); |
29262 | } |
29263 | bool ByteCodeEmitter::emitPreDecIntAPS( bool A0, const SourceInfo &L) { |
29264 | return emitOp<bool>(OP_PreDecIntAPS, A0, L); |
29265 | } |
29266 | bool ByteCodeEmitter::emitPreDecBool( bool A0, const SourceInfo &L) { |
29267 | return emitOp<bool>(OP_PreDecBool, A0, L); |
29268 | } |
29269 | bool ByteCodeEmitter::emitPreDecFixedPoint( bool A0, const SourceInfo &L) { |
29270 | return emitOp<bool>(OP_PreDecFixedPoint, A0, L); |
29271 | } |
29272 | #endif |
29273 | #ifdef GET_EVAL_IMPL |
29274 | bool EvalEmitter::emitPreDecSint8( bool A0, const SourceInfo &L) { |
29275 | if (!isActive()) return true; |
29276 | CurrentSource = L; |
29277 | return PreDec<PT_Sint8>(S, OpPC, A0); |
29278 | } |
29279 | bool EvalEmitter::emitPreDecUint8( bool A0, const SourceInfo &L) { |
29280 | if (!isActive()) return true; |
29281 | CurrentSource = L; |
29282 | return PreDec<PT_Uint8>(S, OpPC, A0); |
29283 | } |
29284 | bool EvalEmitter::emitPreDecSint16( bool A0, const SourceInfo &L) { |
29285 | if (!isActive()) return true; |
29286 | CurrentSource = L; |
29287 | return PreDec<PT_Sint16>(S, OpPC, A0); |
29288 | } |
29289 | bool EvalEmitter::emitPreDecUint16( bool A0, const SourceInfo &L) { |
29290 | if (!isActive()) return true; |
29291 | CurrentSource = L; |
29292 | return PreDec<PT_Uint16>(S, OpPC, A0); |
29293 | } |
29294 | bool EvalEmitter::emitPreDecSint32( bool A0, const SourceInfo &L) { |
29295 | if (!isActive()) return true; |
29296 | CurrentSource = L; |
29297 | return PreDec<PT_Sint32>(S, OpPC, A0); |
29298 | } |
29299 | bool EvalEmitter::emitPreDecUint32( bool A0, const SourceInfo &L) { |
29300 | if (!isActive()) return true; |
29301 | CurrentSource = L; |
29302 | return PreDec<PT_Uint32>(S, OpPC, A0); |
29303 | } |
29304 | bool EvalEmitter::emitPreDecSint64( bool A0, const SourceInfo &L) { |
29305 | if (!isActive()) return true; |
29306 | CurrentSource = L; |
29307 | return PreDec<PT_Sint64>(S, OpPC, A0); |
29308 | } |
29309 | bool EvalEmitter::emitPreDecUint64( bool A0, const SourceInfo &L) { |
29310 | if (!isActive()) return true; |
29311 | CurrentSource = L; |
29312 | return PreDec<PT_Uint64>(S, OpPC, A0); |
29313 | } |
29314 | bool EvalEmitter::emitPreDecIntAP( bool A0, const SourceInfo &L) { |
29315 | if (!isActive()) return true; |
29316 | CurrentSource = L; |
29317 | return PreDec<PT_IntAP>(S, OpPC, A0); |
29318 | } |
29319 | bool EvalEmitter::emitPreDecIntAPS( bool A0, const SourceInfo &L) { |
29320 | if (!isActive()) return true; |
29321 | CurrentSource = L; |
29322 | return PreDec<PT_IntAPS>(S, OpPC, A0); |
29323 | } |
29324 | bool EvalEmitter::emitPreDecBool( bool A0, const SourceInfo &L) { |
29325 | if (!isActive()) return true; |
29326 | CurrentSource = L; |
29327 | return PreDec<PT_Bool>(S, OpPC, A0); |
29328 | } |
29329 | bool EvalEmitter::emitPreDecFixedPoint( bool A0, const SourceInfo &L) { |
29330 | if (!isActive()) return true; |
29331 | CurrentSource = L; |
29332 | return PreDec<PT_FixedPoint>(S, OpPC, A0); |
29333 | } |
29334 | #endif |
29335 | #ifdef GET_OPCODE_NAMES |
29336 | OP_PreIncSint8, |
29337 | OP_PreIncUint8, |
29338 | OP_PreIncSint16, |
29339 | OP_PreIncUint16, |
29340 | OP_PreIncSint32, |
29341 | OP_PreIncUint32, |
29342 | OP_PreIncSint64, |
29343 | OP_PreIncUint64, |
29344 | OP_PreIncIntAP, |
29345 | OP_PreIncIntAPS, |
29346 | OP_PreIncBool, |
29347 | OP_PreIncFixedPoint, |
29348 | #endif |
29349 | #ifdef GET_INTERP |
29350 | case OP_PreIncSint8: { |
29351 | const auto V0 = ReadArg<bool>(S, PC); |
29352 | if (!PreInc<PT_Sint8>(S, OpPC, V0)) |
29353 | return false; |
29354 | continue; |
29355 | } |
29356 | case OP_PreIncUint8: { |
29357 | const auto V0 = ReadArg<bool>(S, PC); |
29358 | if (!PreInc<PT_Uint8>(S, OpPC, V0)) |
29359 | return false; |
29360 | continue; |
29361 | } |
29362 | case OP_PreIncSint16: { |
29363 | const auto V0 = ReadArg<bool>(S, PC); |
29364 | if (!PreInc<PT_Sint16>(S, OpPC, V0)) |
29365 | return false; |
29366 | continue; |
29367 | } |
29368 | case OP_PreIncUint16: { |
29369 | const auto V0 = ReadArg<bool>(S, PC); |
29370 | if (!PreInc<PT_Uint16>(S, OpPC, V0)) |
29371 | return false; |
29372 | continue; |
29373 | } |
29374 | case OP_PreIncSint32: { |
29375 | const auto V0 = ReadArg<bool>(S, PC); |
29376 | if (!PreInc<PT_Sint32>(S, OpPC, V0)) |
29377 | return false; |
29378 | continue; |
29379 | } |
29380 | case OP_PreIncUint32: { |
29381 | const auto V0 = ReadArg<bool>(S, PC); |
29382 | if (!PreInc<PT_Uint32>(S, OpPC, V0)) |
29383 | return false; |
29384 | continue; |
29385 | } |
29386 | case OP_PreIncSint64: { |
29387 | const auto V0 = ReadArg<bool>(S, PC); |
29388 | if (!PreInc<PT_Sint64>(S, OpPC, V0)) |
29389 | return false; |
29390 | continue; |
29391 | } |
29392 | case OP_PreIncUint64: { |
29393 | const auto V0 = ReadArg<bool>(S, PC); |
29394 | if (!PreInc<PT_Uint64>(S, OpPC, V0)) |
29395 | return false; |
29396 | continue; |
29397 | } |
29398 | case OP_PreIncIntAP: { |
29399 | const auto V0 = ReadArg<bool>(S, PC); |
29400 | if (!PreInc<PT_IntAP>(S, OpPC, V0)) |
29401 | return false; |
29402 | continue; |
29403 | } |
29404 | case OP_PreIncIntAPS: { |
29405 | const auto V0 = ReadArg<bool>(S, PC); |
29406 | if (!PreInc<PT_IntAPS>(S, OpPC, V0)) |
29407 | return false; |
29408 | continue; |
29409 | } |
29410 | case OP_PreIncBool: { |
29411 | const auto V0 = ReadArg<bool>(S, PC); |
29412 | if (!PreInc<PT_Bool>(S, OpPC, V0)) |
29413 | return false; |
29414 | continue; |
29415 | } |
29416 | case OP_PreIncFixedPoint: { |
29417 | const auto V0 = ReadArg<bool>(S, PC); |
29418 | if (!PreInc<PT_FixedPoint>(S, OpPC, V0)) |
29419 | return false; |
29420 | continue; |
29421 | } |
29422 | #endif |
29423 | #ifdef GET_DISASM |
29424 | case OP_PreIncSint8: |
29425 | Text.Op = PrintName("PreIncSint8" ); |
29426 | Text.Args.push_back(printArg<bool>(P, PC)); |
29427 | break; |
29428 | case OP_PreIncUint8: |
29429 | Text.Op = PrintName("PreIncUint8" ); |
29430 | Text.Args.push_back(printArg<bool>(P, PC)); |
29431 | break; |
29432 | case OP_PreIncSint16: |
29433 | Text.Op = PrintName("PreIncSint16" ); |
29434 | Text.Args.push_back(printArg<bool>(P, PC)); |
29435 | break; |
29436 | case OP_PreIncUint16: |
29437 | Text.Op = PrintName("PreIncUint16" ); |
29438 | Text.Args.push_back(printArg<bool>(P, PC)); |
29439 | break; |
29440 | case OP_PreIncSint32: |
29441 | Text.Op = PrintName("PreIncSint32" ); |
29442 | Text.Args.push_back(printArg<bool>(P, PC)); |
29443 | break; |
29444 | case OP_PreIncUint32: |
29445 | Text.Op = PrintName("PreIncUint32" ); |
29446 | Text.Args.push_back(printArg<bool>(P, PC)); |
29447 | break; |
29448 | case OP_PreIncSint64: |
29449 | Text.Op = PrintName("PreIncSint64" ); |
29450 | Text.Args.push_back(printArg<bool>(P, PC)); |
29451 | break; |
29452 | case OP_PreIncUint64: |
29453 | Text.Op = PrintName("PreIncUint64" ); |
29454 | Text.Args.push_back(printArg<bool>(P, PC)); |
29455 | break; |
29456 | case OP_PreIncIntAP: |
29457 | Text.Op = PrintName("PreIncIntAP" ); |
29458 | Text.Args.push_back(printArg<bool>(P, PC)); |
29459 | break; |
29460 | case OP_PreIncIntAPS: |
29461 | Text.Op = PrintName("PreIncIntAPS" ); |
29462 | Text.Args.push_back(printArg<bool>(P, PC)); |
29463 | break; |
29464 | case OP_PreIncBool: |
29465 | Text.Op = PrintName("PreIncBool" ); |
29466 | Text.Args.push_back(printArg<bool>(P, PC)); |
29467 | break; |
29468 | case OP_PreIncFixedPoint: |
29469 | Text.Op = PrintName("PreIncFixedPoint" ); |
29470 | Text.Args.push_back(printArg<bool>(P, PC)); |
29471 | break; |
29472 | #endif |
29473 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29474 | bool emitPreIncSint8( bool , const SourceInfo &); |
29475 | bool emitPreIncUint8( bool , const SourceInfo &); |
29476 | bool emitPreIncSint16( bool , const SourceInfo &); |
29477 | bool emitPreIncUint16( bool , const SourceInfo &); |
29478 | bool emitPreIncSint32( bool , const SourceInfo &); |
29479 | bool emitPreIncUint32( bool , const SourceInfo &); |
29480 | bool emitPreIncSint64( bool , const SourceInfo &); |
29481 | bool emitPreIncUint64( bool , const SourceInfo &); |
29482 | bool emitPreIncIntAP( bool , const SourceInfo &); |
29483 | bool emitPreIncIntAPS( bool , const SourceInfo &); |
29484 | bool emitPreIncBool( bool , const SourceInfo &); |
29485 | bool emitPreIncFixedPoint( bool , const SourceInfo &); |
29486 | #endif |
29487 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29488 | [[nodiscard]] bool emitPreInc(PrimType, bool, const SourceInfo &I); |
29489 | #endif |
29490 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
29491 | bool |
29492 | #if defined(GET_EVAL_IMPL) |
29493 | EvalEmitter |
29494 | #else |
29495 | ByteCodeEmitter |
29496 | #endif |
29497 | ::emitPreInc(PrimType T0, bool A0, const SourceInfo &I) { |
29498 | switch (T0) { |
29499 | case PT_Sint8: |
29500 | return emitPreIncSint8(A0, I); |
29501 | case PT_Uint8: |
29502 | return emitPreIncUint8(A0, I); |
29503 | case PT_Sint16: |
29504 | return emitPreIncSint16(A0, I); |
29505 | case PT_Uint16: |
29506 | return emitPreIncUint16(A0, I); |
29507 | case PT_Sint32: |
29508 | return emitPreIncSint32(A0, I); |
29509 | case PT_Uint32: |
29510 | return emitPreIncUint32(A0, I); |
29511 | case PT_Sint64: |
29512 | return emitPreIncSint64(A0, I); |
29513 | case PT_Uint64: |
29514 | return emitPreIncUint64(A0, I); |
29515 | case PT_IntAP: |
29516 | return emitPreIncIntAP(A0, I); |
29517 | case PT_IntAPS: |
29518 | return emitPreIncIntAPS(A0, I); |
29519 | case PT_Bool: |
29520 | return emitPreIncBool(A0, I); |
29521 | case PT_FixedPoint: |
29522 | return emitPreIncFixedPoint(A0, I); |
29523 | default: llvm_unreachable("invalid type: emitPreInc" ); |
29524 | } |
29525 | llvm_unreachable("invalid enum value" ); |
29526 | } |
29527 | #endif |
29528 | #ifdef GET_LINK_IMPL |
29529 | bool ByteCodeEmitter::emitPreIncSint8( bool A0, const SourceInfo &L) { |
29530 | return emitOp<bool>(OP_PreIncSint8, A0, L); |
29531 | } |
29532 | bool ByteCodeEmitter::emitPreIncUint8( bool A0, const SourceInfo &L) { |
29533 | return emitOp<bool>(OP_PreIncUint8, A0, L); |
29534 | } |
29535 | bool ByteCodeEmitter::emitPreIncSint16( bool A0, const SourceInfo &L) { |
29536 | return emitOp<bool>(OP_PreIncSint16, A0, L); |
29537 | } |
29538 | bool ByteCodeEmitter::emitPreIncUint16( bool A0, const SourceInfo &L) { |
29539 | return emitOp<bool>(OP_PreIncUint16, A0, L); |
29540 | } |
29541 | bool ByteCodeEmitter::emitPreIncSint32( bool A0, const SourceInfo &L) { |
29542 | return emitOp<bool>(OP_PreIncSint32, A0, L); |
29543 | } |
29544 | bool ByteCodeEmitter::emitPreIncUint32( bool A0, const SourceInfo &L) { |
29545 | return emitOp<bool>(OP_PreIncUint32, A0, L); |
29546 | } |
29547 | bool ByteCodeEmitter::emitPreIncSint64( bool A0, const SourceInfo &L) { |
29548 | return emitOp<bool>(OP_PreIncSint64, A0, L); |
29549 | } |
29550 | bool ByteCodeEmitter::emitPreIncUint64( bool A0, const SourceInfo &L) { |
29551 | return emitOp<bool>(OP_PreIncUint64, A0, L); |
29552 | } |
29553 | bool ByteCodeEmitter::emitPreIncIntAP( bool A0, const SourceInfo &L) { |
29554 | return emitOp<bool>(OP_PreIncIntAP, A0, L); |
29555 | } |
29556 | bool ByteCodeEmitter::emitPreIncIntAPS( bool A0, const SourceInfo &L) { |
29557 | return emitOp<bool>(OP_PreIncIntAPS, A0, L); |
29558 | } |
29559 | bool ByteCodeEmitter::emitPreIncBool( bool A0, const SourceInfo &L) { |
29560 | return emitOp<bool>(OP_PreIncBool, A0, L); |
29561 | } |
29562 | bool ByteCodeEmitter::emitPreIncFixedPoint( bool A0, const SourceInfo &L) { |
29563 | return emitOp<bool>(OP_PreIncFixedPoint, A0, L); |
29564 | } |
29565 | #endif |
29566 | #ifdef GET_EVAL_IMPL |
29567 | bool EvalEmitter::emitPreIncSint8( bool A0, const SourceInfo &L) { |
29568 | if (!isActive()) return true; |
29569 | CurrentSource = L; |
29570 | return PreInc<PT_Sint8>(S, OpPC, A0); |
29571 | } |
29572 | bool EvalEmitter::emitPreIncUint8( bool A0, const SourceInfo &L) { |
29573 | if (!isActive()) return true; |
29574 | CurrentSource = L; |
29575 | return PreInc<PT_Uint8>(S, OpPC, A0); |
29576 | } |
29577 | bool EvalEmitter::emitPreIncSint16( bool A0, const SourceInfo &L) { |
29578 | if (!isActive()) return true; |
29579 | CurrentSource = L; |
29580 | return PreInc<PT_Sint16>(S, OpPC, A0); |
29581 | } |
29582 | bool EvalEmitter::emitPreIncUint16( bool A0, const SourceInfo &L) { |
29583 | if (!isActive()) return true; |
29584 | CurrentSource = L; |
29585 | return PreInc<PT_Uint16>(S, OpPC, A0); |
29586 | } |
29587 | bool EvalEmitter::emitPreIncSint32( bool A0, const SourceInfo &L) { |
29588 | if (!isActive()) return true; |
29589 | CurrentSource = L; |
29590 | return PreInc<PT_Sint32>(S, OpPC, A0); |
29591 | } |
29592 | bool EvalEmitter::emitPreIncUint32( bool A0, const SourceInfo &L) { |
29593 | if (!isActive()) return true; |
29594 | CurrentSource = L; |
29595 | return PreInc<PT_Uint32>(S, OpPC, A0); |
29596 | } |
29597 | bool EvalEmitter::emitPreIncSint64( bool A0, const SourceInfo &L) { |
29598 | if (!isActive()) return true; |
29599 | CurrentSource = L; |
29600 | return PreInc<PT_Sint64>(S, OpPC, A0); |
29601 | } |
29602 | bool EvalEmitter::emitPreIncUint64( bool A0, const SourceInfo &L) { |
29603 | if (!isActive()) return true; |
29604 | CurrentSource = L; |
29605 | return PreInc<PT_Uint64>(S, OpPC, A0); |
29606 | } |
29607 | bool EvalEmitter::emitPreIncIntAP( bool A0, const SourceInfo &L) { |
29608 | if (!isActive()) return true; |
29609 | CurrentSource = L; |
29610 | return PreInc<PT_IntAP>(S, OpPC, A0); |
29611 | } |
29612 | bool EvalEmitter::emitPreIncIntAPS( bool A0, const SourceInfo &L) { |
29613 | if (!isActive()) return true; |
29614 | CurrentSource = L; |
29615 | return PreInc<PT_IntAPS>(S, OpPC, A0); |
29616 | } |
29617 | bool EvalEmitter::emitPreIncBool( bool A0, const SourceInfo &L) { |
29618 | if (!isActive()) return true; |
29619 | CurrentSource = L; |
29620 | return PreInc<PT_Bool>(S, OpPC, A0); |
29621 | } |
29622 | bool EvalEmitter::emitPreIncFixedPoint( bool A0, const SourceInfo &L) { |
29623 | if (!isActive()) return true; |
29624 | CurrentSource = L; |
29625 | return PreInc<PT_FixedPoint>(S, OpPC, A0); |
29626 | } |
29627 | #endif |
29628 | #ifdef GET_OPCODE_NAMES |
29629 | OP_PtrPtrCast, |
29630 | #endif |
29631 | #ifdef GET_INTERP |
29632 | case OP_PtrPtrCast: { |
29633 | const auto V0 = ReadArg<bool>(S, PC); |
29634 | if (!PtrPtrCast(S, OpPC, V0)) |
29635 | return false; |
29636 | continue; |
29637 | } |
29638 | #endif |
29639 | #ifdef GET_DISASM |
29640 | case OP_PtrPtrCast: |
29641 | Text.Op = PrintName("PtrPtrCast" ); |
29642 | Text.Args.push_back(printArg<bool>(P, PC)); |
29643 | break; |
29644 | #endif |
29645 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29646 | bool emitPtrPtrCast( bool , const SourceInfo &); |
29647 | #endif |
29648 | #ifdef GET_LINK_IMPL |
29649 | bool ByteCodeEmitter::emitPtrPtrCast( bool A0, const SourceInfo &L) { |
29650 | return emitOp<bool>(OP_PtrPtrCast, A0, L); |
29651 | } |
29652 | #endif |
29653 | #ifdef GET_EVAL_IMPL |
29654 | bool EvalEmitter::emitPtrPtrCast( bool A0, const SourceInfo &L) { |
29655 | if (!isActive()) return true; |
29656 | CurrentSource = L; |
29657 | return PtrPtrCast(S, OpPC, A0); |
29658 | } |
29659 | #endif |
29660 | #ifdef GET_OPCODE_NAMES |
29661 | OP_PushCC, |
29662 | #endif |
29663 | #ifdef GET_INTERP |
29664 | case OP_PushCC: { |
29665 | const auto V0 = ReadArg<bool>(S, PC); |
29666 | if (!PushCC(S, OpPC, V0)) |
29667 | return false; |
29668 | continue; |
29669 | } |
29670 | #endif |
29671 | #ifdef GET_DISASM |
29672 | case OP_PushCC: |
29673 | Text.Op = PrintName("PushCC" ); |
29674 | Text.Args.push_back(printArg<bool>(P, PC)); |
29675 | break; |
29676 | #endif |
29677 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29678 | bool emitPushCC( bool , const SourceInfo &); |
29679 | #endif |
29680 | #ifdef GET_LINK_IMPL |
29681 | bool ByteCodeEmitter::emitPushCC( bool A0, const SourceInfo &L) { |
29682 | return emitOp<bool>(OP_PushCC, A0, L); |
29683 | } |
29684 | #endif |
29685 | #ifdef GET_EVAL_IMPL |
29686 | bool EvalEmitter::emitPushCC( bool A0, const SourceInfo &L) { |
29687 | if (!isActive()) return true; |
29688 | CurrentSource = L; |
29689 | return PushCC(S, OpPC, A0); |
29690 | } |
29691 | #endif |
29692 | #ifdef GET_OPCODE_NAMES |
29693 | OP_RVOPtr, |
29694 | #endif |
29695 | #ifdef GET_INTERP |
29696 | case OP_RVOPtr: { |
29697 | if (!RVOPtr(S, OpPC)) |
29698 | return false; |
29699 | continue; |
29700 | } |
29701 | #endif |
29702 | #ifdef GET_DISASM |
29703 | case OP_RVOPtr: |
29704 | Text.Op = PrintName("RVOPtr" ); |
29705 | break; |
29706 | #endif |
29707 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29708 | bool emitRVOPtr(const SourceInfo &); |
29709 | #endif |
29710 | #ifdef GET_LINK_IMPL |
29711 | bool ByteCodeEmitter::emitRVOPtr(const SourceInfo &L) { |
29712 | return emitOp<>(OP_RVOPtr, L); |
29713 | } |
29714 | #endif |
29715 | #ifdef GET_EVAL_IMPL |
29716 | bool EvalEmitter::emitRVOPtr(const SourceInfo &L) { |
29717 | if (!isActive()) return true; |
29718 | CurrentSource = L; |
29719 | return RVOPtr(S, OpPC); |
29720 | } |
29721 | #endif |
29722 | #ifdef GET_OPCODE_NAMES |
29723 | OP_RemSint8, |
29724 | OP_RemUint8, |
29725 | OP_RemSint16, |
29726 | OP_RemUint16, |
29727 | OP_RemSint32, |
29728 | OP_RemUint32, |
29729 | OP_RemSint64, |
29730 | OP_RemUint64, |
29731 | OP_RemIntAP, |
29732 | OP_RemIntAPS, |
29733 | OP_RemFixedPoint, |
29734 | #endif |
29735 | #ifdef GET_INTERP |
29736 | case OP_RemSint8: { |
29737 | if (!Rem<PT_Sint8>(S, OpPC)) |
29738 | return false; |
29739 | continue; |
29740 | } |
29741 | case OP_RemUint8: { |
29742 | if (!Rem<PT_Uint8>(S, OpPC)) |
29743 | return false; |
29744 | continue; |
29745 | } |
29746 | case OP_RemSint16: { |
29747 | if (!Rem<PT_Sint16>(S, OpPC)) |
29748 | return false; |
29749 | continue; |
29750 | } |
29751 | case OP_RemUint16: { |
29752 | if (!Rem<PT_Uint16>(S, OpPC)) |
29753 | return false; |
29754 | continue; |
29755 | } |
29756 | case OP_RemSint32: { |
29757 | if (!Rem<PT_Sint32>(S, OpPC)) |
29758 | return false; |
29759 | continue; |
29760 | } |
29761 | case OP_RemUint32: { |
29762 | if (!Rem<PT_Uint32>(S, OpPC)) |
29763 | return false; |
29764 | continue; |
29765 | } |
29766 | case OP_RemSint64: { |
29767 | if (!Rem<PT_Sint64>(S, OpPC)) |
29768 | return false; |
29769 | continue; |
29770 | } |
29771 | case OP_RemUint64: { |
29772 | if (!Rem<PT_Uint64>(S, OpPC)) |
29773 | return false; |
29774 | continue; |
29775 | } |
29776 | case OP_RemIntAP: { |
29777 | if (!Rem<PT_IntAP>(S, OpPC)) |
29778 | return false; |
29779 | continue; |
29780 | } |
29781 | case OP_RemIntAPS: { |
29782 | if (!Rem<PT_IntAPS>(S, OpPC)) |
29783 | return false; |
29784 | continue; |
29785 | } |
29786 | case OP_RemFixedPoint: { |
29787 | if (!Rem<PT_FixedPoint>(S, OpPC)) |
29788 | return false; |
29789 | continue; |
29790 | } |
29791 | #endif |
29792 | #ifdef GET_DISASM |
29793 | case OP_RemSint8: |
29794 | Text.Op = PrintName("RemSint8" ); |
29795 | break; |
29796 | case OP_RemUint8: |
29797 | Text.Op = PrintName("RemUint8" ); |
29798 | break; |
29799 | case OP_RemSint16: |
29800 | Text.Op = PrintName("RemSint16" ); |
29801 | break; |
29802 | case OP_RemUint16: |
29803 | Text.Op = PrintName("RemUint16" ); |
29804 | break; |
29805 | case OP_RemSint32: |
29806 | Text.Op = PrintName("RemSint32" ); |
29807 | break; |
29808 | case OP_RemUint32: |
29809 | Text.Op = PrintName("RemUint32" ); |
29810 | break; |
29811 | case OP_RemSint64: |
29812 | Text.Op = PrintName("RemSint64" ); |
29813 | break; |
29814 | case OP_RemUint64: |
29815 | Text.Op = PrintName("RemUint64" ); |
29816 | break; |
29817 | case OP_RemIntAP: |
29818 | Text.Op = PrintName("RemIntAP" ); |
29819 | break; |
29820 | case OP_RemIntAPS: |
29821 | Text.Op = PrintName("RemIntAPS" ); |
29822 | break; |
29823 | case OP_RemFixedPoint: |
29824 | Text.Op = PrintName("RemFixedPoint" ); |
29825 | break; |
29826 | #endif |
29827 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29828 | bool emitRemSint8(const SourceInfo &); |
29829 | bool emitRemUint8(const SourceInfo &); |
29830 | bool emitRemSint16(const SourceInfo &); |
29831 | bool emitRemUint16(const SourceInfo &); |
29832 | bool emitRemSint32(const SourceInfo &); |
29833 | bool emitRemUint32(const SourceInfo &); |
29834 | bool emitRemSint64(const SourceInfo &); |
29835 | bool emitRemUint64(const SourceInfo &); |
29836 | bool emitRemIntAP(const SourceInfo &); |
29837 | bool emitRemIntAPS(const SourceInfo &); |
29838 | bool emitRemFixedPoint(const SourceInfo &); |
29839 | #endif |
29840 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
29841 | [[nodiscard]] bool emitRem(PrimType, const SourceInfo &I); |
29842 | #endif |
29843 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
29844 | bool |
29845 | #if defined(GET_EVAL_IMPL) |
29846 | EvalEmitter |
29847 | #else |
29848 | ByteCodeEmitter |
29849 | #endif |
29850 | ::emitRem(PrimType T0, const SourceInfo &I) { |
29851 | switch (T0) { |
29852 | case PT_Sint8: |
29853 | return emitRemSint8(I); |
29854 | case PT_Uint8: |
29855 | return emitRemUint8(I); |
29856 | case PT_Sint16: |
29857 | return emitRemSint16(I); |
29858 | case PT_Uint16: |
29859 | return emitRemUint16(I); |
29860 | case PT_Sint32: |
29861 | return emitRemSint32(I); |
29862 | case PT_Uint32: |
29863 | return emitRemUint32(I); |
29864 | case PT_Sint64: |
29865 | return emitRemSint64(I); |
29866 | case PT_Uint64: |
29867 | return emitRemUint64(I); |
29868 | case PT_IntAP: |
29869 | return emitRemIntAP(I); |
29870 | case PT_IntAPS: |
29871 | return emitRemIntAPS(I); |
29872 | case PT_FixedPoint: |
29873 | return emitRemFixedPoint(I); |
29874 | default: llvm_unreachable("invalid type: emitRem" ); |
29875 | } |
29876 | llvm_unreachable("invalid enum value" ); |
29877 | } |
29878 | #endif |
29879 | #ifdef GET_LINK_IMPL |
29880 | bool ByteCodeEmitter::emitRemSint8(const SourceInfo &L) { |
29881 | return emitOp<>(OP_RemSint8, L); |
29882 | } |
29883 | bool ByteCodeEmitter::emitRemUint8(const SourceInfo &L) { |
29884 | return emitOp<>(OP_RemUint8, L); |
29885 | } |
29886 | bool ByteCodeEmitter::emitRemSint16(const SourceInfo &L) { |
29887 | return emitOp<>(OP_RemSint16, L); |
29888 | } |
29889 | bool ByteCodeEmitter::emitRemUint16(const SourceInfo &L) { |
29890 | return emitOp<>(OP_RemUint16, L); |
29891 | } |
29892 | bool ByteCodeEmitter::emitRemSint32(const SourceInfo &L) { |
29893 | return emitOp<>(OP_RemSint32, L); |
29894 | } |
29895 | bool ByteCodeEmitter::emitRemUint32(const SourceInfo &L) { |
29896 | return emitOp<>(OP_RemUint32, L); |
29897 | } |
29898 | bool ByteCodeEmitter::emitRemSint64(const SourceInfo &L) { |
29899 | return emitOp<>(OP_RemSint64, L); |
29900 | } |
29901 | bool ByteCodeEmitter::emitRemUint64(const SourceInfo &L) { |
29902 | return emitOp<>(OP_RemUint64, L); |
29903 | } |
29904 | bool ByteCodeEmitter::emitRemIntAP(const SourceInfo &L) { |
29905 | return emitOp<>(OP_RemIntAP, L); |
29906 | } |
29907 | bool ByteCodeEmitter::emitRemIntAPS(const SourceInfo &L) { |
29908 | return emitOp<>(OP_RemIntAPS, L); |
29909 | } |
29910 | bool ByteCodeEmitter::emitRemFixedPoint(const SourceInfo &L) { |
29911 | return emitOp<>(OP_RemFixedPoint, L); |
29912 | } |
29913 | #endif |
29914 | #ifdef GET_EVAL_IMPL |
29915 | bool EvalEmitter::emitRemSint8(const SourceInfo &L) { |
29916 | if (!isActive()) return true; |
29917 | CurrentSource = L; |
29918 | return Rem<PT_Sint8>(S, OpPC); |
29919 | } |
29920 | bool EvalEmitter::emitRemUint8(const SourceInfo &L) { |
29921 | if (!isActive()) return true; |
29922 | CurrentSource = L; |
29923 | return Rem<PT_Uint8>(S, OpPC); |
29924 | } |
29925 | bool EvalEmitter::emitRemSint16(const SourceInfo &L) { |
29926 | if (!isActive()) return true; |
29927 | CurrentSource = L; |
29928 | return Rem<PT_Sint16>(S, OpPC); |
29929 | } |
29930 | bool EvalEmitter::emitRemUint16(const SourceInfo &L) { |
29931 | if (!isActive()) return true; |
29932 | CurrentSource = L; |
29933 | return Rem<PT_Uint16>(S, OpPC); |
29934 | } |
29935 | bool EvalEmitter::emitRemSint32(const SourceInfo &L) { |
29936 | if (!isActive()) return true; |
29937 | CurrentSource = L; |
29938 | return Rem<PT_Sint32>(S, OpPC); |
29939 | } |
29940 | bool EvalEmitter::emitRemUint32(const SourceInfo &L) { |
29941 | if (!isActive()) return true; |
29942 | CurrentSource = L; |
29943 | return Rem<PT_Uint32>(S, OpPC); |
29944 | } |
29945 | bool EvalEmitter::emitRemSint64(const SourceInfo &L) { |
29946 | if (!isActive()) return true; |
29947 | CurrentSource = L; |
29948 | return Rem<PT_Sint64>(S, OpPC); |
29949 | } |
29950 | bool EvalEmitter::emitRemUint64(const SourceInfo &L) { |
29951 | if (!isActive()) return true; |
29952 | CurrentSource = L; |
29953 | return Rem<PT_Uint64>(S, OpPC); |
29954 | } |
29955 | bool EvalEmitter::emitRemIntAP(const SourceInfo &L) { |
29956 | if (!isActive()) return true; |
29957 | CurrentSource = L; |
29958 | return Rem<PT_IntAP>(S, OpPC); |
29959 | } |
29960 | bool EvalEmitter::emitRemIntAPS(const SourceInfo &L) { |
29961 | if (!isActive()) return true; |
29962 | CurrentSource = L; |
29963 | return Rem<PT_IntAPS>(S, OpPC); |
29964 | } |
29965 | bool EvalEmitter::emitRemFixedPoint(const SourceInfo &L) { |
29966 | if (!isActive()) return true; |
29967 | CurrentSource = L; |
29968 | return Rem<PT_FixedPoint>(S, OpPC); |
29969 | } |
29970 | #endif |
29971 | #ifdef GET_OPCODE_NAMES |
29972 | OP_RetSint8, |
29973 | OP_RetUint8, |
29974 | OP_RetSint16, |
29975 | OP_RetUint16, |
29976 | OP_RetSint32, |
29977 | OP_RetUint32, |
29978 | OP_RetSint64, |
29979 | OP_RetUint64, |
29980 | OP_RetIntAP, |
29981 | OP_RetIntAPS, |
29982 | OP_RetBool, |
29983 | OP_RetFixedPoint, |
29984 | OP_RetPtr, |
29985 | OP_RetMemberPtr, |
29986 | OP_RetFloat, |
29987 | #endif |
29988 | #ifdef GET_INTERP |
29989 | case OP_RetSint8: { |
29990 | bool DoReturn = (S.Current == StartFrame); |
29991 | if (!Ret<PT_Sint8>(S, PC)) |
29992 | return false; |
29993 | if (!S.Current || S.Current->isRoot()) |
29994 | return true; |
29995 | if (DoReturn) |
29996 | return true; |
29997 | continue; |
29998 | } |
29999 | case OP_RetUint8: { |
30000 | bool DoReturn = (S.Current == StartFrame); |
30001 | if (!Ret<PT_Uint8>(S, PC)) |
30002 | return false; |
30003 | if (!S.Current || S.Current->isRoot()) |
30004 | return true; |
30005 | if (DoReturn) |
30006 | return true; |
30007 | continue; |
30008 | } |
30009 | case OP_RetSint16: { |
30010 | bool DoReturn = (S.Current == StartFrame); |
30011 | if (!Ret<PT_Sint16>(S, PC)) |
30012 | return false; |
30013 | if (!S.Current || S.Current->isRoot()) |
30014 | return true; |
30015 | if (DoReturn) |
30016 | return true; |
30017 | continue; |
30018 | } |
30019 | case OP_RetUint16: { |
30020 | bool DoReturn = (S.Current == StartFrame); |
30021 | if (!Ret<PT_Uint16>(S, PC)) |
30022 | return false; |
30023 | if (!S.Current || S.Current->isRoot()) |
30024 | return true; |
30025 | if (DoReturn) |
30026 | return true; |
30027 | continue; |
30028 | } |
30029 | case OP_RetSint32: { |
30030 | bool DoReturn = (S.Current == StartFrame); |
30031 | if (!Ret<PT_Sint32>(S, PC)) |
30032 | return false; |
30033 | if (!S.Current || S.Current->isRoot()) |
30034 | return true; |
30035 | if (DoReturn) |
30036 | return true; |
30037 | continue; |
30038 | } |
30039 | case OP_RetUint32: { |
30040 | bool DoReturn = (S.Current == StartFrame); |
30041 | if (!Ret<PT_Uint32>(S, PC)) |
30042 | return false; |
30043 | if (!S.Current || S.Current->isRoot()) |
30044 | return true; |
30045 | if (DoReturn) |
30046 | return true; |
30047 | continue; |
30048 | } |
30049 | case OP_RetSint64: { |
30050 | bool DoReturn = (S.Current == StartFrame); |
30051 | if (!Ret<PT_Sint64>(S, PC)) |
30052 | return false; |
30053 | if (!S.Current || S.Current->isRoot()) |
30054 | return true; |
30055 | if (DoReturn) |
30056 | return true; |
30057 | continue; |
30058 | } |
30059 | case OP_RetUint64: { |
30060 | bool DoReturn = (S.Current == StartFrame); |
30061 | if (!Ret<PT_Uint64>(S, PC)) |
30062 | return false; |
30063 | if (!S.Current || S.Current->isRoot()) |
30064 | return true; |
30065 | if (DoReturn) |
30066 | return true; |
30067 | continue; |
30068 | } |
30069 | case OP_RetIntAP: { |
30070 | bool DoReturn = (S.Current == StartFrame); |
30071 | if (!Ret<PT_IntAP>(S, PC)) |
30072 | return false; |
30073 | if (!S.Current || S.Current->isRoot()) |
30074 | return true; |
30075 | if (DoReturn) |
30076 | return true; |
30077 | continue; |
30078 | } |
30079 | case OP_RetIntAPS: { |
30080 | bool DoReturn = (S.Current == StartFrame); |
30081 | if (!Ret<PT_IntAPS>(S, PC)) |
30082 | return false; |
30083 | if (!S.Current || S.Current->isRoot()) |
30084 | return true; |
30085 | if (DoReturn) |
30086 | return true; |
30087 | continue; |
30088 | } |
30089 | case OP_RetBool: { |
30090 | bool DoReturn = (S.Current == StartFrame); |
30091 | if (!Ret<PT_Bool>(S, PC)) |
30092 | return false; |
30093 | if (!S.Current || S.Current->isRoot()) |
30094 | return true; |
30095 | if (DoReturn) |
30096 | return true; |
30097 | continue; |
30098 | } |
30099 | case OP_RetFixedPoint: { |
30100 | bool DoReturn = (S.Current == StartFrame); |
30101 | if (!Ret<PT_FixedPoint>(S, PC)) |
30102 | return false; |
30103 | if (!S.Current || S.Current->isRoot()) |
30104 | return true; |
30105 | if (DoReturn) |
30106 | return true; |
30107 | continue; |
30108 | } |
30109 | case OP_RetPtr: { |
30110 | bool DoReturn = (S.Current == StartFrame); |
30111 | if (!Ret<PT_Ptr>(S, PC)) |
30112 | return false; |
30113 | if (!S.Current || S.Current->isRoot()) |
30114 | return true; |
30115 | if (DoReturn) |
30116 | return true; |
30117 | continue; |
30118 | } |
30119 | case OP_RetMemberPtr: { |
30120 | bool DoReturn = (S.Current == StartFrame); |
30121 | if (!Ret<PT_MemberPtr>(S, PC)) |
30122 | return false; |
30123 | if (!S.Current || S.Current->isRoot()) |
30124 | return true; |
30125 | if (DoReturn) |
30126 | return true; |
30127 | continue; |
30128 | } |
30129 | case OP_RetFloat: { |
30130 | bool DoReturn = (S.Current == StartFrame); |
30131 | if (!Ret<PT_Float>(S, PC)) |
30132 | return false; |
30133 | if (!S.Current || S.Current->isRoot()) |
30134 | return true; |
30135 | if (DoReturn) |
30136 | return true; |
30137 | continue; |
30138 | } |
30139 | #endif |
30140 | #ifdef GET_DISASM |
30141 | case OP_RetSint8: |
30142 | Text.Op = PrintName("RetSint8" ); |
30143 | break; |
30144 | case OP_RetUint8: |
30145 | Text.Op = PrintName("RetUint8" ); |
30146 | break; |
30147 | case OP_RetSint16: |
30148 | Text.Op = PrintName("RetSint16" ); |
30149 | break; |
30150 | case OP_RetUint16: |
30151 | Text.Op = PrintName("RetUint16" ); |
30152 | break; |
30153 | case OP_RetSint32: |
30154 | Text.Op = PrintName("RetSint32" ); |
30155 | break; |
30156 | case OP_RetUint32: |
30157 | Text.Op = PrintName("RetUint32" ); |
30158 | break; |
30159 | case OP_RetSint64: |
30160 | Text.Op = PrintName("RetSint64" ); |
30161 | break; |
30162 | case OP_RetUint64: |
30163 | Text.Op = PrintName("RetUint64" ); |
30164 | break; |
30165 | case OP_RetIntAP: |
30166 | Text.Op = PrintName("RetIntAP" ); |
30167 | break; |
30168 | case OP_RetIntAPS: |
30169 | Text.Op = PrintName("RetIntAPS" ); |
30170 | break; |
30171 | case OP_RetBool: |
30172 | Text.Op = PrintName("RetBool" ); |
30173 | break; |
30174 | case OP_RetFixedPoint: |
30175 | Text.Op = PrintName("RetFixedPoint" ); |
30176 | break; |
30177 | case OP_RetPtr: |
30178 | Text.Op = PrintName("RetPtr" ); |
30179 | break; |
30180 | case OP_RetMemberPtr: |
30181 | Text.Op = PrintName("RetMemberPtr" ); |
30182 | break; |
30183 | case OP_RetFloat: |
30184 | Text.Op = PrintName("RetFloat" ); |
30185 | break; |
30186 | #endif |
30187 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30188 | bool emitRetSint8(const SourceInfo &); |
30189 | bool emitRetUint8(const SourceInfo &); |
30190 | bool emitRetSint16(const SourceInfo &); |
30191 | bool emitRetUint16(const SourceInfo &); |
30192 | bool emitRetSint32(const SourceInfo &); |
30193 | bool emitRetUint32(const SourceInfo &); |
30194 | bool emitRetSint64(const SourceInfo &); |
30195 | bool emitRetUint64(const SourceInfo &); |
30196 | bool emitRetIntAP(const SourceInfo &); |
30197 | bool emitRetIntAPS(const SourceInfo &); |
30198 | bool emitRetBool(const SourceInfo &); |
30199 | bool emitRetFixedPoint(const SourceInfo &); |
30200 | bool emitRetPtr(const SourceInfo &); |
30201 | bool emitRetMemberPtr(const SourceInfo &); |
30202 | bool emitRetFloat(const SourceInfo &); |
30203 | #if defined(GET_EVAL_PROTO) |
30204 | template<PrimType> |
30205 | bool emitRet(const SourceInfo &); |
30206 | #endif |
30207 | #endif |
30208 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30209 | [[nodiscard]] bool emitRet(PrimType, const SourceInfo &I); |
30210 | #endif |
30211 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
30212 | bool |
30213 | #if defined(GET_EVAL_IMPL) |
30214 | EvalEmitter |
30215 | #else |
30216 | ByteCodeEmitter |
30217 | #endif |
30218 | ::emitRet(PrimType T0, const SourceInfo &I) { |
30219 | switch (T0) { |
30220 | case PT_Sint8: |
30221 | #ifdef GET_LINK_IMPL |
30222 | return emitRetSint8 |
30223 | #else |
30224 | return emitRet<PT_Sint8> |
30225 | #endif |
30226 | (I); |
30227 | case PT_Uint8: |
30228 | #ifdef GET_LINK_IMPL |
30229 | return emitRetUint8 |
30230 | #else |
30231 | return emitRet<PT_Uint8> |
30232 | #endif |
30233 | (I); |
30234 | case PT_Sint16: |
30235 | #ifdef GET_LINK_IMPL |
30236 | return emitRetSint16 |
30237 | #else |
30238 | return emitRet<PT_Sint16> |
30239 | #endif |
30240 | (I); |
30241 | case PT_Uint16: |
30242 | #ifdef GET_LINK_IMPL |
30243 | return emitRetUint16 |
30244 | #else |
30245 | return emitRet<PT_Uint16> |
30246 | #endif |
30247 | (I); |
30248 | case PT_Sint32: |
30249 | #ifdef GET_LINK_IMPL |
30250 | return emitRetSint32 |
30251 | #else |
30252 | return emitRet<PT_Sint32> |
30253 | #endif |
30254 | (I); |
30255 | case PT_Uint32: |
30256 | #ifdef GET_LINK_IMPL |
30257 | return emitRetUint32 |
30258 | #else |
30259 | return emitRet<PT_Uint32> |
30260 | #endif |
30261 | (I); |
30262 | case PT_Sint64: |
30263 | #ifdef GET_LINK_IMPL |
30264 | return emitRetSint64 |
30265 | #else |
30266 | return emitRet<PT_Sint64> |
30267 | #endif |
30268 | (I); |
30269 | case PT_Uint64: |
30270 | #ifdef GET_LINK_IMPL |
30271 | return emitRetUint64 |
30272 | #else |
30273 | return emitRet<PT_Uint64> |
30274 | #endif |
30275 | (I); |
30276 | case PT_IntAP: |
30277 | #ifdef GET_LINK_IMPL |
30278 | return emitRetIntAP |
30279 | #else |
30280 | return emitRet<PT_IntAP> |
30281 | #endif |
30282 | (I); |
30283 | case PT_IntAPS: |
30284 | #ifdef GET_LINK_IMPL |
30285 | return emitRetIntAPS |
30286 | #else |
30287 | return emitRet<PT_IntAPS> |
30288 | #endif |
30289 | (I); |
30290 | case PT_Bool: |
30291 | #ifdef GET_LINK_IMPL |
30292 | return emitRetBool |
30293 | #else |
30294 | return emitRet<PT_Bool> |
30295 | #endif |
30296 | (I); |
30297 | case PT_FixedPoint: |
30298 | #ifdef GET_LINK_IMPL |
30299 | return emitRetFixedPoint |
30300 | #else |
30301 | return emitRet<PT_FixedPoint> |
30302 | #endif |
30303 | (I); |
30304 | case PT_Ptr: |
30305 | #ifdef GET_LINK_IMPL |
30306 | return emitRetPtr |
30307 | #else |
30308 | return emitRet<PT_Ptr> |
30309 | #endif |
30310 | (I); |
30311 | case PT_MemberPtr: |
30312 | #ifdef GET_LINK_IMPL |
30313 | return emitRetMemberPtr |
30314 | #else |
30315 | return emitRet<PT_MemberPtr> |
30316 | #endif |
30317 | (I); |
30318 | case PT_Float: |
30319 | #ifdef GET_LINK_IMPL |
30320 | return emitRetFloat |
30321 | #else |
30322 | return emitRet<PT_Float> |
30323 | #endif |
30324 | (I); |
30325 | } |
30326 | llvm_unreachable("invalid enum value" ); |
30327 | } |
30328 | #endif |
30329 | #ifdef GET_LINK_IMPL |
30330 | bool ByteCodeEmitter::emitRetSint8(const SourceInfo &L) { |
30331 | return emitOp<>(OP_RetSint8, L); |
30332 | } |
30333 | bool ByteCodeEmitter::emitRetUint8(const SourceInfo &L) { |
30334 | return emitOp<>(OP_RetUint8, L); |
30335 | } |
30336 | bool ByteCodeEmitter::emitRetSint16(const SourceInfo &L) { |
30337 | return emitOp<>(OP_RetSint16, L); |
30338 | } |
30339 | bool ByteCodeEmitter::emitRetUint16(const SourceInfo &L) { |
30340 | return emitOp<>(OP_RetUint16, L); |
30341 | } |
30342 | bool ByteCodeEmitter::emitRetSint32(const SourceInfo &L) { |
30343 | return emitOp<>(OP_RetSint32, L); |
30344 | } |
30345 | bool ByteCodeEmitter::emitRetUint32(const SourceInfo &L) { |
30346 | return emitOp<>(OP_RetUint32, L); |
30347 | } |
30348 | bool ByteCodeEmitter::emitRetSint64(const SourceInfo &L) { |
30349 | return emitOp<>(OP_RetSint64, L); |
30350 | } |
30351 | bool ByteCodeEmitter::emitRetUint64(const SourceInfo &L) { |
30352 | return emitOp<>(OP_RetUint64, L); |
30353 | } |
30354 | bool ByteCodeEmitter::emitRetIntAP(const SourceInfo &L) { |
30355 | return emitOp<>(OP_RetIntAP, L); |
30356 | } |
30357 | bool ByteCodeEmitter::emitRetIntAPS(const SourceInfo &L) { |
30358 | return emitOp<>(OP_RetIntAPS, L); |
30359 | } |
30360 | bool ByteCodeEmitter::emitRetBool(const SourceInfo &L) { |
30361 | return emitOp<>(OP_RetBool, L); |
30362 | } |
30363 | bool ByteCodeEmitter::emitRetFixedPoint(const SourceInfo &L) { |
30364 | return emitOp<>(OP_RetFixedPoint, L); |
30365 | } |
30366 | bool ByteCodeEmitter::emitRetPtr(const SourceInfo &L) { |
30367 | return emitOp<>(OP_RetPtr, L); |
30368 | } |
30369 | bool ByteCodeEmitter::emitRetMemberPtr(const SourceInfo &L) { |
30370 | return emitOp<>(OP_RetMemberPtr, L); |
30371 | } |
30372 | bool ByteCodeEmitter::emitRetFloat(const SourceInfo &L) { |
30373 | return emitOp<>(OP_RetFloat, L); |
30374 | } |
30375 | #endif |
30376 | #ifdef GET_OPCODE_NAMES |
30377 | OP_RetValue, |
30378 | #endif |
30379 | #ifdef GET_INTERP |
30380 | case OP_RetValue: { |
30381 | bool DoReturn = (S.Current == StartFrame); |
30382 | if (!RetValue(S, PC)) |
30383 | return false; |
30384 | if (!S.Current || S.Current->isRoot()) |
30385 | return true; |
30386 | if (DoReturn) |
30387 | return true; |
30388 | continue; |
30389 | } |
30390 | #endif |
30391 | #ifdef GET_DISASM |
30392 | case OP_RetValue: |
30393 | Text.Op = PrintName("RetValue" ); |
30394 | break; |
30395 | #endif |
30396 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30397 | bool emitRetValue(const SourceInfo &); |
30398 | #endif |
30399 | #ifdef GET_LINK_IMPL |
30400 | bool ByteCodeEmitter::emitRetValue(const SourceInfo &L) { |
30401 | return emitOp<>(OP_RetValue, L); |
30402 | } |
30403 | #endif |
30404 | #ifdef GET_OPCODE_NAMES |
30405 | OP_RetVoid, |
30406 | #endif |
30407 | #ifdef GET_INTERP |
30408 | case OP_RetVoid: { |
30409 | bool DoReturn = (S.Current == StartFrame); |
30410 | if (!RetVoid(S, PC)) |
30411 | return false; |
30412 | if (!S.Current || S.Current->isRoot()) |
30413 | return true; |
30414 | if (DoReturn) |
30415 | return true; |
30416 | continue; |
30417 | } |
30418 | #endif |
30419 | #ifdef GET_DISASM |
30420 | case OP_RetVoid: |
30421 | Text.Op = PrintName("RetVoid" ); |
30422 | break; |
30423 | #endif |
30424 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30425 | bool emitRetVoid(const SourceInfo &); |
30426 | #endif |
30427 | #ifdef GET_LINK_IMPL |
30428 | bool ByteCodeEmitter::emitRetVoid(const SourceInfo &L) { |
30429 | return emitOp<>(OP_RetVoid, L); |
30430 | } |
30431 | #endif |
30432 | #ifdef GET_OPCODE_NAMES |
30433 | OP_SetFieldSint8, |
30434 | OP_SetFieldUint8, |
30435 | OP_SetFieldSint16, |
30436 | OP_SetFieldUint16, |
30437 | OP_SetFieldSint32, |
30438 | OP_SetFieldUint32, |
30439 | OP_SetFieldSint64, |
30440 | OP_SetFieldUint64, |
30441 | OP_SetFieldIntAP, |
30442 | OP_SetFieldIntAPS, |
30443 | OP_SetFieldBool, |
30444 | OP_SetFieldFixedPoint, |
30445 | OP_SetFieldPtr, |
30446 | OP_SetFieldMemberPtr, |
30447 | OP_SetFieldFloat, |
30448 | #endif |
30449 | #ifdef GET_INTERP |
30450 | case OP_SetFieldSint8: { |
30451 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30452 | if (!SetField<PT_Sint8>(S, OpPC, V0)) |
30453 | return false; |
30454 | continue; |
30455 | } |
30456 | case OP_SetFieldUint8: { |
30457 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30458 | if (!SetField<PT_Uint8>(S, OpPC, V0)) |
30459 | return false; |
30460 | continue; |
30461 | } |
30462 | case OP_SetFieldSint16: { |
30463 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30464 | if (!SetField<PT_Sint16>(S, OpPC, V0)) |
30465 | return false; |
30466 | continue; |
30467 | } |
30468 | case OP_SetFieldUint16: { |
30469 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30470 | if (!SetField<PT_Uint16>(S, OpPC, V0)) |
30471 | return false; |
30472 | continue; |
30473 | } |
30474 | case OP_SetFieldSint32: { |
30475 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30476 | if (!SetField<PT_Sint32>(S, OpPC, V0)) |
30477 | return false; |
30478 | continue; |
30479 | } |
30480 | case OP_SetFieldUint32: { |
30481 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30482 | if (!SetField<PT_Uint32>(S, OpPC, V0)) |
30483 | return false; |
30484 | continue; |
30485 | } |
30486 | case OP_SetFieldSint64: { |
30487 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30488 | if (!SetField<PT_Sint64>(S, OpPC, V0)) |
30489 | return false; |
30490 | continue; |
30491 | } |
30492 | case OP_SetFieldUint64: { |
30493 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30494 | if (!SetField<PT_Uint64>(S, OpPC, V0)) |
30495 | return false; |
30496 | continue; |
30497 | } |
30498 | case OP_SetFieldIntAP: { |
30499 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30500 | if (!SetField<PT_IntAP>(S, OpPC, V0)) |
30501 | return false; |
30502 | continue; |
30503 | } |
30504 | case OP_SetFieldIntAPS: { |
30505 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30506 | if (!SetField<PT_IntAPS>(S, OpPC, V0)) |
30507 | return false; |
30508 | continue; |
30509 | } |
30510 | case OP_SetFieldBool: { |
30511 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30512 | if (!SetField<PT_Bool>(S, OpPC, V0)) |
30513 | return false; |
30514 | continue; |
30515 | } |
30516 | case OP_SetFieldFixedPoint: { |
30517 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30518 | if (!SetField<PT_FixedPoint>(S, OpPC, V0)) |
30519 | return false; |
30520 | continue; |
30521 | } |
30522 | case OP_SetFieldPtr: { |
30523 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30524 | if (!SetField<PT_Ptr>(S, OpPC, V0)) |
30525 | return false; |
30526 | continue; |
30527 | } |
30528 | case OP_SetFieldMemberPtr: { |
30529 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30530 | if (!SetField<PT_MemberPtr>(S, OpPC, V0)) |
30531 | return false; |
30532 | continue; |
30533 | } |
30534 | case OP_SetFieldFloat: { |
30535 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30536 | if (!SetField<PT_Float>(S, OpPC, V0)) |
30537 | return false; |
30538 | continue; |
30539 | } |
30540 | #endif |
30541 | #ifdef GET_DISASM |
30542 | case OP_SetFieldSint8: |
30543 | Text.Op = PrintName("SetFieldSint8" ); |
30544 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30545 | break; |
30546 | case OP_SetFieldUint8: |
30547 | Text.Op = PrintName("SetFieldUint8" ); |
30548 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30549 | break; |
30550 | case OP_SetFieldSint16: |
30551 | Text.Op = PrintName("SetFieldSint16" ); |
30552 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30553 | break; |
30554 | case OP_SetFieldUint16: |
30555 | Text.Op = PrintName("SetFieldUint16" ); |
30556 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30557 | break; |
30558 | case OP_SetFieldSint32: |
30559 | Text.Op = PrintName("SetFieldSint32" ); |
30560 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30561 | break; |
30562 | case OP_SetFieldUint32: |
30563 | Text.Op = PrintName("SetFieldUint32" ); |
30564 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30565 | break; |
30566 | case OP_SetFieldSint64: |
30567 | Text.Op = PrintName("SetFieldSint64" ); |
30568 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30569 | break; |
30570 | case OP_SetFieldUint64: |
30571 | Text.Op = PrintName("SetFieldUint64" ); |
30572 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30573 | break; |
30574 | case OP_SetFieldIntAP: |
30575 | Text.Op = PrintName("SetFieldIntAP" ); |
30576 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30577 | break; |
30578 | case OP_SetFieldIntAPS: |
30579 | Text.Op = PrintName("SetFieldIntAPS" ); |
30580 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30581 | break; |
30582 | case OP_SetFieldBool: |
30583 | Text.Op = PrintName("SetFieldBool" ); |
30584 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30585 | break; |
30586 | case OP_SetFieldFixedPoint: |
30587 | Text.Op = PrintName("SetFieldFixedPoint" ); |
30588 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30589 | break; |
30590 | case OP_SetFieldPtr: |
30591 | Text.Op = PrintName("SetFieldPtr" ); |
30592 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30593 | break; |
30594 | case OP_SetFieldMemberPtr: |
30595 | Text.Op = PrintName("SetFieldMemberPtr" ); |
30596 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30597 | break; |
30598 | case OP_SetFieldFloat: |
30599 | Text.Op = PrintName("SetFieldFloat" ); |
30600 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30601 | break; |
30602 | #endif |
30603 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30604 | bool emitSetFieldSint8( uint32_t , const SourceInfo &); |
30605 | bool emitSetFieldUint8( uint32_t , const SourceInfo &); |
30606 | bool emitSetFieldSint16( uint32_t , const SourceInfo &); |
30607 | bool emitSetFieldUint16( uint32_t , const SourceInfo &); |
30608 | bool emitSetFieldSint32( uint32_t , const SourceInfo &); |
30609 | bool emitSetFieldUint32( uint32_t , const SourceInfo &); |
30610 | bool emitSetFieldSint64( uint32_t , const SourceInfo &); |
30611 | bool emitSetFieldUint64( uint32_t , const SourceInfo &); |
30612 | bool emitSetFieldIntAP( uint32_t , const SourceInfo &); |
30613 | bool emitSetFieldIntAPS( uint32_t , const SourceInfo &); |
30614 | bool emitSetFieldBool( uint32_t , const SourceInfo &); |
30615 | bool emitSetFieldFixedPoint( uint32_t , const SourceInfo &); |
30616 | bool emitSetFieldPtr( uint32_t , const SourceInfo &); |
30617 | bool emitSetFieldMemberPtr( uint32_t , const SourceInfo &); |
30618 | bool emitSetFieldFloat( uint32_t , const SourceInfo &); |
30619 | #endif |
30620 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30621 | [[nodiscard]] bool emitSetField(PrimType, uint32_t, const SourceInfo &I); |
30622 | #endif |
30623 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
30624 | bool |
30625 | #if defined(GET_EVAL_IMPL) |
30626 | EvalEmitter |
30627 | #else |
30628 | ByteCodeEmitter |
30629 | #endif |
30630 | ::emitSetField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
30631 | switch (T0) { |
30632 | case PT_Sint8: |
30633 | return emitSetFieldSint8(A0, I); |
30634 | case PT_Uint8: |
30635 | return emitSetFieldUint8(A0, I); |
30636 | case PT_Sint16: |
30637 | return emitSetFieldSint16(A0, I); |
30638 | case PT_Uint16: |
30639 | return emitSetFieldUint16(A0, I); |
30640 | case PT_Sint32: |
30641 | return emitSetFieldSint32(A0, I); |
30642 | case PT_Uint32: |
30643 | return emitSetFieldUint32(A0, I); |
30644 | case PT_Sint64: |
30645 | return emitSetFieldSint64(A0, I); |
30646 | case PT_Uint64: |
30647 | return emitSetFieldUint64(A0, I); |
30648 | case PT_IntAP: |
30649 | return emitSetFieldIntAP(A0, I); |
30650 | case PT_IntAPS: |
30651 | return emitSetFieldIntAPS(A0, I); |
30652 | case PT_Bool: |
30653 | return emitSetFieldBool(A0, I); |
30654 | case PT_FixedPoint: |
30655 | return emitSetFieldFixedPoint(A0, I); |
30656 | case PT_Ptr: |
30657 | return emitSetFieldPtr(A0, I); |
30658 | case PT_MemberPtr: |
30659 | return emitSetFieldMemberPtr(A0, I); |
30660 | case PT_Float: |
30661 | return emitSetFieldFloat(A0, I); |
30662 | } |
30663 | llvm_unreachable("invalid enum value" ); |
30664 | } |
30665 | #endif |
30666 | #ifdef GET_LINK_IMPL |
30667 | bool ByteCodeEmitter::emitSetFieldSint8( uint32_t A0, const SourceInfo &L) { |
30668 | return emitOp<uint32_t>(OP_SetFieldSint8, A0, L); |
30669 | } |
30670 | bool ByteCodeEmitter::emitSetFieldUint8( uint32_t A0, const SourceInfo &L) { |
30671 | return emitOp<uint32_t>(OP_SetFieldUint8, A0, L); |
30672 | } |
30673 | bool ByteCodeEmitter::emitSetFieldSint16( uint32_t A0, const SourceInfo &L) { |
30674 | return emitOp<uint32_t>(OP_SetFieldSint16, A0, L); |
30675 | } |
30676 | bool ByteCodeEmitter::emitSetFieldUint16( uint32_t A0, const SourceInfo &L) { |
30677 | return emitOp<uint32_t>(OP_SetFieldUint16, A0, L); |
30678 | } |
30679 | bool ByteCodeEmitter::emitSetFieldSint32( uint32_t A0, const SourceInfo &L) { |
30680 | return emitOp<uint32_t>(OP_SetFieldSint32, A0, L); |
30681 | } |
30682 | bool ByteCodeEmitter::emitSetFieldUint32( uint32_t A0, const SourceInfo &L) { |
30683 | return emitOp<uint32_t>(OP_SetFieldUint32, A0, L); |
30684 | } |
30685 | bool ByteCodeEmitter::emitSetFieldSint64( uint32_t A0, const SourceInfo &L) { |
30686 | return emitOp<uint32_t>(OP_SetFieldSint64, A0, L); |
30687 | } |
30688 | bool ByteCodeEmitter::emitSetFieldUint64( uint32_t A0, const SourceInfo &L) { |
30689 | return emitOp<uint32_t>(OP_SetFieldUint64, A0, L); |
30690 | } |
30691 | bool ByteCodeEmitter::emitSetFieldIntAP( uint32_t A0, const SourceInfo &L) { |
30692 | return emitOp<uint32_t>(OP_SetFieldIntAP, A0, L); |
30693 | } |
30694 | bool ByteCodeEmitter::emitSetFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
30695 | return emitOp<uint32_t>(OP_SetFieldIntAPS, A0, L); |
30696 | } |
30697 | bool ByteCodeEmitter::emitSetFieldBool( uint32_t A0, const SourceInfo &L) { |
30698 | return emitOp<uint32_t>(OP_SetFieldBool, A0, L); |
30699 | } |
30700 | bool ByteCodeEmitter::emitSetFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
30701 | return emitOp<uint32_t>(OP_SetFieldFixedPoint, A0, L); |
30702 | } |
30703 | bool ByteCodeEmitter::emitSetFieldPtr( uint32_t A0, const SourceInfo &L) { |
30704 | return emitOp<uint32_t>(OP_SetFieldPtr, A0, L); |
30705 | } |
30706 | bool ByteCodeEmitter::emitSetFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
30707 | return emitOp<uint32_t>(OP_SetFieldMemberPtr, A0, L); |
30708 | } |
30709 | bool ByteCodeEmitter::emitSetFieldFloat( uint32_t A0, const SourceInfo &L) { |
30710 | return emitOp<uint32_t>(OP_SetFieldFloat, A0, L); |
30711 | } |
30712 | #endif |
30713 | #ifdef GET_EVAL_IMPL |
30714 | bool EvalEmitter::emitSetFieldSint8( uint32_t A0, const SourceInfo &L) { |
30715 | if (!isActive()) return true; |
30716 | CurrentSource = L; |
30717 | return SetField<PT_Sint8>(S, OpPC, A0); |
30718 | } |
30719 | bool EvalEmitter::emitSetFieldUint8( uint32_t A0, const SourceInfo &L) { |
30720 | if (!isActive()) return true; |
30721 | CurrentSource = L; |
30722 | return SetField<PT_Uint8>(S, OpPC, A0); |
30723 | } |
30724 | bool EvalEmitter::emitSetFieldSint16( uint32_t A0, const SourceInfo &L) { |
30725 | if (!isActive()) return true; |
30726 | CurrentSource = L; |
30727 | return SetField<PT_Sint16>(S, OpPC, A0); |
30728 | } |
30729 | bool EvalEmitter::emitSetFieldUint16( uint32_t A0, const SourceInfo &L) { |
30730 | if (!isActive()) return true; |
30731 | CurrentSource = L; |
30732 | return SetField<PT_Uint16>(S, OpPC, A0); |
30733 | } |
30734 | bool EvalEmitter::emitSetFieldSint32( uint32_t A0, const SourceInfo &L) { |
30735 | if (!isActive()) return true; |
30736 | CurrentSource = L; |
30737 | return SetField<PT_Sint32>(S, OpPC, A0); |
30738 | } |
30739 | bool EvalEmitter::emitSetFieldUint32( uint32_t A0, const SourceInfo &L) { |
30740 | if (!isActive()) return true; |
30741 | CurrentSource = L; |
30742 | return SetField<PT_Uint32>(S, OpPC, A0); |
30743 | } |
30744 | bool EvalEmitter::emitSetFieldSint64( uint32_t A0, const SourceInfo &L) { |
30745 | if (!isActive()) return true; |
30746 | CurrentSource = L; |
30747 | return SetField<PT_Sint64>(S, OpPC, A0); |
30748 | } |
30749 | bool EvalEmitter::emitSetFieldUint64( uint32_t A0, const SourceInfo &L) { |
30750 | if (!isActive()) return true; |
30751 | CurrentSource = L; |
30752 | return SetField<PT_Uint64>(S, OpPC, A0); |
30753 | } |
30754 | bool EvalEmitter::emitSetFieldIntAP( uint32_t A0, const SourceInfo &L) { |
30755 | if (!isActive()) return true; |
30756 | CurrentSource = L; |
30757 | return SetField<PT_IntAP>(S, OpPC, A0); |
30758 | } |
30759 | bool EvalEmitter::emitSetFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
30760 | if (!isActive()) return true; |
30761 | CurrentSource = L; |
30762 | return SetField<PT_IntAPS>(S, OpPC, A0); |
30763 | } |
30764 | bool EvalEmitter::emitSetFieldBool( uint32_t A0, const SourceInfo &L) { |
30765 | if (!isActive()) return true; |
30766 | CurrentSource = L; |
30767 | return SetField<PT_Bool>(S, OpPC, A0); |
30768 | } |
30769 | bool EvalEmitter::emitSetFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
30770 | if (!isActive()) return true; |
30771 | CurrentSource = L; |
30772 | return SetField<PT_FixedPoint>(S, OpPC, A0); |
30773 | } |
30774 | bool EvalEmitter::emitSetFieldPtr( uint32_t A0, const SourceInfo &L) { |
30775 | if (!isActive()) return true; |
30776 | CurrentSource = L; |
30777 | return SetField<PT_Ptr>(S, OpPC, A0); |
30778 | } |
30779 | bool EvalEmitter::emitSetFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
30780 | if (!isActive()) return true; |
30781 | CurrentSource = L; |
30782 | return SetField<PT_MemberPtr>(S, OpPC, A0); |
30783 | } |
30784 | bool EvalEmitter::emitSetFieldFloat( uint32_t A0, const SourceInfo &L) { |
30785 | if (!isActive()) return true; |
30786 | CurrentSource = L; |
30787 | return SetField<PT_Float>(S, OpPC, A0); |
30788 | } |
30789 | #endif |
30790 | #ifdef GET_OPCODE_NAMES |
30791 | OP_SetGlobalSint8, |
30792 | OP_SetGlobalUint8, |
30793 | OP_SetGlobalSint16, |
30794 | OP_SetGlobalUint16, |
30795 | OP_SetGlobalSint32, |
30796 | OP_SetGlobalUint32, |
30797 | OP_SetGlobalSint64, |
30798 | OP_SetGlobalUint64, |
30799 | OP_SetGlobalIntAP, |
30800 | OP_SetGlobalIntAPS, |
30801 | OP_SetGlobalBool, |
30802 | OP_SetGlobalFixedPoint, |
30803 | OP_SetGlobalPtr, |
30804 | OP_SetGlobalMemberPtr, |
30805 | OP_SetGlobalFloat, |
30806 | #endif |
30807 | #ifdef GET_INTERP |
30808 | case OP_SetGlobalSint8: { |
30809 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30810 | if (!SetGlobal<PT_Sint8>(S, OpPC, V0)) |
30811 | return false; |
30812 | continue; |
30813 | } |
30814 | case OP_SetGlobalUint8: { |
30815 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30816 | if (!SetGlobal<PT_Uint8>(S, OpPC, V0)) |
30817 | return false; |
30818 | continue; |
30819 | } |
30820 | case OP_SetGlobalSint16: { |
30821 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30822 | if (!SetGlobal<PT_Sint16>(S, OpPC, V0)) |
30823 | return false; |
30824 | continue; |
30825 | } |
30826 | case OP_SetGlobalUint16: { |
30827 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30828 | if (!SetGlobal<PT_Uint16>(S, OpPC, V0)) |
30829 | return false; |
30830 | continue; |
30831 | } |
30832 | case OP_SetGlobalSint32: { |
30833 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30834 | if (!SetGlobal<PT_Sint32>(S, OpPC, V0)) |
30835 | return false; |
30836 | continue; |
30837 | } |
30838 | case OP_SetGlobalUint32: { |
30839 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30840 | if (!SetGlobal<PT_Uint32>(S, OpPC, V0)) |
30841 | return false; |
30842 | continue; |
30843 | } |
30844 | case OP_SetGlobalSint64: { |
30845 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30846 | if (!SetGlobal<PT_Sint64>(S, OpPC, V0)) |
30847 | return false; |
30848 | continue; |
30849 | } |
30850 | case OP_SetGlobalUint64: { |
30851 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30852 | if (!SetGlobal<PT_Uint64>(S, OpPC, V0)) |
30853 | return false; |
30854 | continue; |
30855 | } |
30856 | case OP_SetGlobalIntAP: { |
30857 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30858 | if (!SetGlobal<PT_IntAP>(S, OpPC, V0)) |
30859 | return false; |
30860 | continue; |
30861 | } |
30862 | case OP_SetGlobalIntAPS: { |
30863 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30864 | if (!SetGlobal<PT_IntAPS>(S, OpPC, V0)) |
30865 | return false; |
30866 | continue; |
30867 | } |
30868 | case OP_SetGlobalBool: { |
30869 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30870 | if (!SetGlobal<PT_Bool>(S, OpPC, V0)) |
30871 | return false; |
30872 | continue; |
30873 | } |
30874 | case OP_SetGlobalFixedPoint: { |
30875 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30876 | if (!SetGlobal<PT_FixedPoint>(S, OpPC, V0)) |
30877 | return false; |
30878 | continue; |
30879 | } |
30880 | case OP_SetGlobalPtr: { |
30881 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30882 | if (!SetGlobal<PT_Ptr>(S, OpPC, V0)) |
30883 | return false; |
30884 | continue; |
30885 | } |
30886 | case OP_SetGlobalMemberPtr: { |
30887 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30888 | if (!SetGlobal<PT_MemberPtr>(S, OpPC, V0)) |
30889 | return false; |
30890 | continue; |
30891 | } |
30892 | case OP_SetGlobalFloat: { |
30893 | const auto V0 = ReadArg<uint32_t>(S, PC); |
30894 | if (!SetGlobal<PT_Float>(S, OpPC, V0)) |
30895 | return false; |
30896 | continue; |
30897 | } |
30898 | #endif |
30899 | #ifdef GET_DISASM |
30900 | case OP_SetGlobalSint8: |
30901 | Text.Op = PrintName("SetGlobalSint8" ); |
30902 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30903 | break; |
30904 | case OP_SetGlobalUint8: |
30905 | Text.Op = PrintName("SetGlobalUint8" ); |
30906 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30907 | break; |
30908 | case OP_SetGlobalSint16: |
30909 | Text.Op = PrintName("SetGlobalSint16" ); |
30910 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30911 | break; |
30912 | case OP_SetGlobalUint16: |
30913 | Text.Op = PrintName("SetGlobalUint16" ); |
30914 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30915 | break; |
30916 | case OP_SetGlobalSint32: |
30917 | Text.Op = PrintName("SetGlobalSint32" ); |
30918 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30919 | break; |
30920 | case OP_SetGlobalUint32: |
30921 | Text.Op = PrintName("SetGlobalUint32" ); |
30922 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30923 | break; |
30924 | case OP_SetGlobalSint64: |
30925 | Text.Op = PrintName("SetGlobalSint64" ); |
30926 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30927 | break; |
30928 | case OP_SetGlobalUint64: |
30929 | Text.Op = PrintName("SetGlobalUint64" ); |
30930 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30931 | break; |
30932 | case OP_SetGlobalIntAP: |
30933 | Text.Op = PrintName("SetGlobalIntAP" ); |
30934 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30935 | break; |
30936 | case OP_SetGlobalIntAPS: |
30937 | Text.Op = PrintName("SetGlobalIntAPS" ); |
30938 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30939 | break; |
30940 | case OP_SetGlobalBool: |
30941 | Text.Op = PrintName("SetGlobalBool" ); |
30942 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30943 | break; |
30944 | case OP_SetGlobalFixedPoint: |
30945 | Text.Op = PrintName("SetGlobalFixedPoint" ); |
30946 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30947 | break; |
30948 | case OP_SetGlobalPtr: |
30949 | Text.Op = PrintName("SetGlobalPtr" ); |
30950 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30951 | break; |
30952 | case OP_SetGlobalMemberPtr: |
30953 | Text.Op = PrintName("SetGlobalMemberPtr" ); |
30954 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30955 | break; |
30956 | case OP_SetGlobalFloat: |
30957 | Text.Op = PrintName("SetGlobalFloat" ); |
30958 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
30959 | break; |
30960 | #endif |
30961 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30962 | bool emitSetGlobalSint8( uint32_t , const SourceInfo &); |
30963 | bool emitSetGlobalUint8( uint32_t , const SourceInfo &); |
30964 | bool emitSetGlobalSint16( uint32_t , const SourceInfo &); |
30965 | bool emitSetGlobalUint16( uint32_t , const SourceInfo &); |
30966 | bool emitSetGlobalSint32( uint32_t , const SourceInfo &); |
30967 | bool emitSetGlobalUint32( uint32_t , const SourceInfo &); |
30968 | bool emitSetGlobalSint64( uint32_t , const SourceInfo &); |
30969 | bool emitSetGlobalUint64( uint32_t , const SourceInfo &); |
30970 | bool emitSetGlobalIntAP( uint32_t , const SourceInfo &); |
30971 | bool emitSetGlobalIntAPS( uint32_t , const SourceInfo &); |
30972 | bool emitSetGlobalBool( uint32_t , const SourceInfo &); |
30973 | bool emitSetGlobalFixedPoint( uint32_t , const SourceInfo &); |
30974 | bool emitSetGlobalPtr( uint32_t , const SourceInfo &); |
30975 | bool emitSetGlobalMemberPtr( uint32_t , const SourceInfo &); |
30976 | bool emitSetGlobalFloat( uint32_t , const SourceInfo &); |
30977 | #endif |
30978 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30979 | [[nodiscard]] bool emitSetGlobal(PrimType, uint32_t, const SourceInfo &I); |
30980 | #endif |
30981 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
30982 | bool |
30983 | #if defined(GET_EVAL_IMPL) |
30984 | EvalEmitter |
30985 | #else |
30986 | ByteCodeEmitter |
30987 | #endif |
30988 | ::emitSetGlobal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
30989 | switch (T0) { |
30990 | case PT_Sint8: |
30991 | return emitSetGlobalSint8(A0, I); |
30992 | case PT_Uint8: |
30993 | return emitSetGlobalUint8(A0, I); |
30994 | case PT_Sint16: |
30995 | return emitSetGlobalSint16(A0, I); |
30996 | case PT_Uint16: |
30997 | return emitSetGlobalUint16(A0, I); |
30998 | case PT_Sint32: |
30999 | return emitSetGlobalSint32(A0, I); |
31000 | case PT_Uint32: |
31001 | return emitSetGlobalUint32(A0, I); |
31002 | case PT_Sint64: |
31003 | return emitSetGlobalSint64(A0, I); |
31004 | case PT_Uint64: |
31005 | return emitSetGlobalUint64(A0, I); |
31006 | case PT_IntAP: |
31007 | return emitSetGlobalIntAP(A0, I); |
31008 | case PT_IntAPS: |
31009 | return emitSetGlobalIntAPS(A0, I); |
31010 | case PT_Bool: |
31011 | return emitSetGlobalBool(A0, I); |
31012 | case PT_FixedPoint: |
31013 | return emitSetGlobalFixedPoint(A0, I); |
31014 | case PT_Ptr: |
31015 | return emitSetGlobalPtr(A0, I); |
31016 | case PT_MemberPtr: |
31017 | return emitSetGlobalMemberPtr(A0, I); |
31018 | case PT_Float: |
31019 | return emitSetGlobalFloat(A0, I); |
31020 | } |
31021 | llvm_unreachable("invalid enum value" ); |
31022 | } |
31023 | #endif |
31024 | #ifdef GET_LINK_IMPL |
31025 | bool ByteCodeEmitter::emitSetGlobalSint8( uint32_t A0, const SourceInfo &L) { |
31026 | return emitOp<uint32_t>(OP_SetGlobalSint8, A0, L); |
31027 | } |
31028 | bool ByteCodeEmitter::emitSetGlobalUint8( uint32_t A0, const SourceInfo &L) { |
31029 | return emitOp<uint32_t>(OP_SetGlobalUint8, A0, L); |
31030 | } |
31031 | bool ByteCodeEmitter::emitSetGlobalSint16( uint32_t A0, const SourceInfo &L) { |
31032 | return emitOp<uint32_t>(OP_SetGlobalSint16, A0, L); |
31033 | } |
31034 | bool ByteCodeEmitter::emitSetGlobalUint16( uint32_t A0, const SourceInfo &L) { |
31035 | return emitOp<uint32_t>(OP_SetGlobalUint16, A0, L); |
31036 | } |
31037 | bool ByteCodeEmitter::emitSetGlobalSint32( uint32_t A0, const SourceInfo &L) { |
31038 | return emitOp<uint32_t>(OP_SetGlobalSint32, A0, L); |
31039 | } |
31040 | bool ByteCodeEmitter::emitSetGlobalUint32( uint32_t A0, const SourceInfo &L) { |
31041 | return emitOp<uint32_t>(OP_SetGlobalUint32, A0, L); |
31042 | } |
31043 | bool ByteCodeEmitter::emitSetGlobalSint64( uint32_t A0, const SourceInfo &L) { |
31044 | return emitOp<uint32_t>(OP_SetGlobalSint64, A0, L); |
31045 | } |
31046 | bool ByteCodeEmitter::emitSetGlobalUint64( uint32_t A0, const SourceInfo &L) { |
31047 | return emitOp<uint32_t>(OP_SetGlobalUint64, A0, L); |
31048 | } |
31049 | bool ByteCodeEmitter::emitSetGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
31050 | return emitOp<uint32_t>(OP_SetGlobalIntAP, A0, L); |
31051 | } |
31052 | bool ByteCodeEmitter::emitSetGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
31053 | return emitOp<uint32_t>(OP_SetGlobalIntAPS, A0, L); |
31054 | } |
31055 | bool ByteCodeEmitter::emitSetGlobalBool( uint32_t A0, const SourceInfo &L) { |
31056 | return emitOp<uint32_t>(OP_SetGlobalBool, A0, L); |
31057 | } |
31058 | bool ByteCodeEmitter::emitSetGlobalFixedPoint( uint32_t A0, const SourceInfo &L) { |
31059 | return emitOp<uint32_t>(OP_SetGlobalFixedPoint, A0, L); |
31060 | } |
31061 | bool ByteCodeEmitter::emitSetGlobalPtr( uint32_t A0, const SourceInfo &L) { |
31062 | return emitOp<uint32_t>(OP_SetGlobalPtr, A0, L); |
31063 | } |
31064 | bool ByteCodeEmitter::emitSetGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
31065 | return emitOp<uint32_t>(OP_SetGlobalMemberPtr, A0, L); |
31066 | } |
31067 | bool ByteCodeEmitter::emitSetGlobalFloat( uint32_t A0, const SourceInfo &L) { |
31068 | return emitOp<uint32_t>(OP_SetGlobalFloat, A0, L); |
31069 | } |
31070 | #endif |
31071 | #ifdef GET_EVAL_IMPL |
31072 | bool EvalEmitter::emitSetGlobalSint8( uint32_t A0, const SourceInfo &L) { |
31073 | if (!isActive()) return true; |
31074 | CurrentSource = L; |
31075 | return SetGlobal<PT_Sint8>(S, OpPC, A0); |
31076 | } |
31077 | bool EvalEmitter::emitSetGlobalUint8( uint32_t A0, const SourceInfo &L) { |
31078 | if (!isActive()) return true; |
31079 | CurrentSource = L; |
31080 | return SetGlobal<PT_Uint8>(S, OpPC, A0); |
31081 | } |
31082 | bool EvalEmitter::emitSetGlobalSint16( uint32_t A0, const SourceInfo &L) { |
31083 | if (!isActive()) return true; |
31084 | CurrentSource = L; |
31085 | return SetGlobal<PT_Sint16>(S, OpPC, A0); |
31086 | } |
31087 | bool EvalEmitter::emitSetGlobalUint16( uint32_t A0, const SourceInfo &L) { |
31088 | if (!isActive()) return true; |
31089 | CurrentSource = L; |
31090 | return SetGlobal<PT_Uint16>(S, OpPC, A0); |
31091 | } |
31092 | bool EvalEmitter::emitSetGlobalSint32( uint32_t A0, const SourceInfo &L) { |
31093 | if (!isActive()) return true; |
31094 | CurrentSource = L; |
31095 | return SetGlobal<PT_Sint32>(S, OpPC, A0); |
31096 | } |
31097 | bool EvalEmitter::emitSetGlobalUint32( uint32_t A0, const SourceInfo &L) { |
31098 | if (!isActive()) return true; |
31099 | CurrentSource = L; |
31100 | return SetGlobal<PT_Uint32>(S, OpPC, A0); |
31101 | } |
31102 | bool EvalEmitter::emitSetGlobalSint64( uint32_t A0, const SourceInfo &L) { |
31103 | if (!isActive()) return true; |
31104 | CurrentSource = L; |
31105 | return SetGlobal<PT_Sint64>(S, OpPC, A0); |
31106 | } |
31107 | bool EvalEmitter::emitSetGlobalUint64( uint32_t A0, const SourceInfo &L) { |
31108 | if (!isActive()) return true; |
31109 | CurrentSource = L; |
31110 | return SetGlobal<PT_Uint64>(S, OpPC, A0); |
31111 | } |
31112 | bool EvalEmitter::emitSetGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
31113 | if (!isActive()) return true; |
31114 | CurrentSource = L; |
31115 | return SetGlobal<PT_IntAP>(S, OpPC, A0); |
31116 | } |
31117 | bool EvalEmitter::emitSetGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
31118 | if (!isActive()) return true; |
31119 | CurrentSource = L; |
31120 | return SetGlobal<PT_IntAPS>(S, OpPC, A0); |
31121 | } |
31122 | bool EvalEmitter::emitSetGlobalBool( uint32_t A0, const SourceInfo &L) { |
31123 | if (!isActive()) return true; |
31124 | CurrentSource = L; |
31125 | return SetGlobal<PT_Bool>(S, OpPC, A0); |
31126 | } |
31127 | bool EvalEmitter::emitSetGlobalFixedPoint( uint32_t A0, const SourceInfo &L) { |
31128 | if (!isActive()) return true; |
31129 | CurrentSource = L; |
31130 | return SetGlobal<PT_FixedPoint>(S, OpPC, A0); |
31131 | } |
31132 | bool EvalEmitter::emitSetGlobalPtr( uint32_t A0, const SourceInfo &L) { |
31133 | if (!isActive()) return true; |
31134 | CurrentSource = L; |
31135 | return SetGlobal<PT_Ptr>(S, OpPC, A0); |
31136 | } |
31137 | bool EvalEmitter::emitSetGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
31138 | if (!isActive()) return true; |
31139 | CurrentSource = L; |
31140 | return SetGlobal<PT_MemberPtr>(S, OpPC, A0); |
31141 | } |
31142 | bool EvalEmitter::emitSetGlobalFloat( uint32_t A0, const SourceInfo &L) { |
31143 | if (!isActive()) return true; |
31144 | CurrentSource = L; |
31145 | return SetGlobal<PT_Float>(S, OpPC, A0); |
31146 | } |
31147 | #endif |
31148 | #ifdef GET_OPCODE_NAMES |
31149 | OP_SetLocalSint8, |
31150 | OP_SetLocalUint8, |
31151 | OP_SetLocalSint16, |
31152 | OP_SetLocalUint16, |
31153 | OP_SetLocalSint32, |
31154 | OP_SetLocalUint32, |
31155 | OP_SetLocalSint64, |
31156 | OP_SetLocalUint64, |
31157 | OP_SetLocalIntAP, |
31158 | OP_SetLocalIntAPS, |
31159 | OP_SetLocalBool, |
31160 | OP_SetLocalFixedPoint, |
31161 | OP_SetLocalPtr, |
31162 | OP_SetLocalMemberPtr, |
31163 | OP_SetLocalFloat, |
31164 | #endif |
31165 | #ifdef GET_INTERP |
31166 | case OP_SetLocalSint8: { |
31167 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31168 | if (!SetLocal<PT_Sint8>(S, OpPC, V0)) |
31169 | return false; |
31170 | continue; |
31171 | } |
31172 | case OP_SetLocalUint8: { |
31173 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31174 | if (!SetLocal<PT_Uint8>(S, OpPC, V0)) |
31175 | return false; |
31176 | continue; |
31177 | } |
31178 | case OP_SetLocalSint16: { |
31179 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31180 | if (!SetLocal<PT_Sint16>(S, OpPC, V0)) |
31181 | return false; |
31182 | continue; |
31183 | } |
31184 | case OP_SetLocalUint16: { |
31185 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31186 | if (!SetLocal<PT_Uint16>(S, OpPC, V0)) |
31187 | return false; |
31188 | continue; |
31189 | } |
31190 | case OP_SetLocalSint32: { |
31191 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31192 | if (!SetLocal<PT_Sint32>(S, OpPC, V0)) |
31193 | return false; |
31194 | continue; |
31195 | } |
31196 | case OP_SetLocalUint32: { |
31197 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31198 | if (!SetLocal<PT_Uint32>(S, OpPC, V0)) |
31199 | return false; |
31200 | continue; |
31201 | } |
31202 | case OP_SetLocalSint64: { |
31203 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31204 | if (!SetLocal<PT_Sint64>(S, OpPC, V0)) |
31205 | return false; |
31206 | continue; |
31207 | } |
31208 | case OP_SetLocalUint64: { |
31209 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31210 | if (!SetLocal<PT_Uint64>(S, OpPC, V0)) |
31211 | return false; |
31212 | continue; |
31213 | } |
31214 | case OP_SetLocalIntAP: { |
31215 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31216 | if (!SetLocal<PT_IntAP>(S, OpPC, V0)) |
31217 | return false; |
31218 | continue; |
31219 | } |
31220 | case OP_SetLocalIntAPS: { |
31221 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31222 | if (!SetLocal<PT_IntAPS>(S, OpPC, V0)) |
31223 | return false; |
31224 | continue; |
31225 | } |
31226 | case OP_SetLocalBool: { |
31227 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31228 | if (!SetLocal<PT_Bool>(S, OpPC, V0)) |
31229 | return false; |
31230 | continue; |
31231 | } |
31232 | case OP_SetLocalFixedPoint: { |
31233 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31234 | if (!SetLocal<PT_FixedPoint>(S, OpPC, V0)) |
31235 | return false; |
31236 | continue; |
31237 | } |
31238 | case OP_SetLocalPtr: { |
31239 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31240 | if (!SetLocal<PT_Ptr>(S, OpPC, V0)) |
31241 | return false; |
31242 | continue; |
31243 | } |
31244 | case OP_SetLocalMemberPtr: { |
31245 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31246 | if (!SetLocal<PT_MemberPtr>(S, OpPC, V0)) |
31247 | return false; |
31248 | continue; |
31249 | } |
31250 | case OP_SetLocalFloat: { |
31251 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31252 | if (!SetLocal<PT_Float>(S, OpPC, V0)) |
31253 | return false; |
31254 | continue; |
31255 | } |
31256 | #endif |
31257 | #ifdef GET_DISASM |
31258 | case OP_SetLocalSint8: |
31259 | Text.Op = PrintName("SetLocalSint8" ); |
31260 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31261 | break; |
31262 | case OP_SetLocalUint8: |
31263 | Text.Op = PrintName("SetLocalUint8" ); |
31264 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31265 | break; |
31266 | case OP_SetLocalSint16: |
31267 | Text.Op = PrintName("SetLocalSint16" ); |
31268 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31269 | break; |
31270 | case OP_SetLocalUint16: |
31271 | Text.Op = PrintName("SetLocalUint16" ); |
31272 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31273 | break; |
31274 | case OP_SetLocalSint32: |
31275 | Text.Op = PrintName("SetLocalSint32" ); |
31276 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31277 | break; |
31278 | case OP_SetLocalUint32: |
31279 | Text.Op = PrintName("SetLocalUint32" ); |
31280 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31281 | break; |
31282 | case OP_SetLocalSint64: |
31283 | Text.Op = PrintName("SetLocalSint64" ); |
31284 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31285 | break; |
31286 | case OP_SetLocalUint64: |
31287 | Text.Op = PrintName("SetLocalUint64" ); |
31288 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31289 | break; |
31290 | case OP_SetLocalIntAP: |
31291 | Text.Op = PrintName("SetLocalIntAP" ); |
31292 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31293 | break; |
31294 | case OP_SetLocalIntAPS: |
31295 | Text.Op = PrintName("SetLocalIntAPS" ); |
31296 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31297 | break; |
31298 | case OP_SetLocalBool: |
31299 | Text.Op = PrintName("SetLocalBool" ); |
31300 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31301 | break; |
31302 | case OP_SetLocalFixedPoint: |
31303 | Text.Op = PrintName("SetLocalFixedPoint" ); |
31304 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31305 | break; |
31306 | case OP_SetLocalPtr: |
31307 | Text.Op = PrintName("SetLocalPtr" ); |
31308 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31309 | break; |
31310 | case OP_SetLocalMemberPtr: |
31311 | Text.Op = PrintName("SetLocalMemberPtr" ); |
31312 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31313 | break; |
31314 | case OP_SetLocalFloat: |
31315 | Text.Op = PrintName("SetLocalFloat" ); |
31316 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31317 | break; |
31318 | #endif |
31319 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31320 | bool emitSetLocalSint8( uint32_t , const SourceInfo &); |
31321 | bool emitSetLocalUint8( uint32_t , const SourceInfo &); |
31322 | bool emitSetLocalSint16( uint32_t , const SourceInfo &); |
31323 | bool emitSetLocalUint16( uint32_t , const SourceInfo &); |
31324 | bool emitSetLocalSint32( uint32_t , const SourceInfo &); |
31325 | bool emitSetLocalUint32( uint32_t , const SourceInfo &); |
31326 | bool emitSetLocalSint64( uint32_t , const SourceInfo &); |
31327 | bool emitSetLocalUint64( uint32_t , const SourceInfo &); |
31328 | bool emitSetLocalIntAP( uint32_t , const SourceInfo &); |
31329 | bool emitSetLocalIntAPS( uint32_t , const SourceInfo &); |
31330 | bool emitSetLocalBool( uint32_t , const SourceInfo &); |
31331 | bool emitSetLocalFixedPoint( uint32_t , const SourceInfo &); |
31332 | bool emitSetLocalPtr( uint32_t , const SourceInfo &); |
31333 | bool emitSetLocalMemberPtr( uint32_t , const SourceInfo &); |
31334 | bool emitSetLocalFloat( uint32_t , const SourceInfo &); |
31335 | #if defined(GET_EVAL_PROTO) |
31336 | template<PrimType> |
31337 | bool emitSetLocal(uint32_t, const SourceInfo &); |
31338 | #endif |
31339 | #endif |
31340 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31341 | [[nodiscard]] bool emitSetLocal(PrimType, uint32_t, const SourceInfo &I); |
31342 | #endif |
31343 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
31344 | bool |
31345 | #if defined(GET_EVAL_IMPL) |
31346 | EvalEmitter |
31347 | #else |
31348 | ByteCodeEmitter |
31349 | #endif |
31350 | ::emitSetLocal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
31351 | switch (T0) { |
31352 | case PT_Sint8: |
31353 | #ifdef GET_LINK_IMPL |
31354 | return emitSetLocalSint8 |
31355 | #else |
31356 | return emitSetLocal<PT_Sint8> |
31357 | #endif |
31358 | (A0, I); |
31359 | case PT_Uint8: |
31360 | #ifdef GET_LINK_IMPL |
31361 | return emitSetLocalUint8 |
31362 | #else |
31363 | return emitSetLocal<PT_Uint8> |
31364 | #endif |
31365 | (A0, I); |
31366 | case PT_Sint16: |
31367 | #ifdef GET_LINK_IMPL |
31368 | return emitSetLocalSint16 |
31369 | #else |
31370 | return emitSetLocal<PT_Sint16> |
31371 | #endif |
31372 | (A0, I); |
31373 | case PT_Uint16: |
31374 | #ifdef GET_LINK_IMPL |
31375 | return emitSetLocalUint16 |
31376 | #else |
31377 | return emitSetLocal<PT_Uint16> |
31378 | #endif |
31379 | (A0, I); |
31380 | case PT_Sint32: |
31381 | #ifdef GET_LINK_IMPL |
31382 | return emitSetLocalSint32 |
31383 | #else |
31384 | return emitSetLocal<PT_Sint32> |
31385 | #endif |
31386 | (A0, I); |
31387 | case PT_Uint32: |
31388 | #ifdef GET_LINK_IMPL |
31389 | return emitSetLocalUint32 |
31390 | #else |
31391 | return emitSetLocal<PT_Uint32> |
31392 | #endif |
31393 | (A0, I); |
31394 | case PT_Sint64: |
31395 | #ifdef GET_LINK_IMPL |
31396 | return emitSetLocalSint64 |
31397 | #else |
31398 | return emitSetLocal<PT_Sint64> |
31399 | #endif |
31400 | (A0, I); |
31401 | case PT_Uint64: |
31402 | #ifdef GET_LINK_IMPL |
31403 | return emitSetLocalUint64 |
31404 | #else |
31405 | return emitSetLocal<PT_Uint64> |
31406 | #endif |
31407 | (A0, I); |
31408 | case PT_IntAP: |
31409 | #ifdef GET_LINK_IMPL |
31410 | return emitSetLocalIntAP |
31411 | #else |
31412 | return emitSetLocal<PT_IntAP> |
31413 | #endif |
31414 | (A0, I); |
31415 | case PT_IntAPS: |
31416 | #ifdef GET_LINK_IMPL |
31417 | return emitSetLocalIntAPS |
31418 | #else |
31419 | return emitSetLocal<PT_IntAPS> |
31420 | #endif |
31421 | (A0, I); |
31422 | case PT_Bool: |
31423 | #ifdef GET_LINK_IMPL |
31424 | return emitSetLocalBool |
31425 | #else |
31426 | return emitSetLocal<PT_Bool> |
31427 | #endif |
31428 | (A0, I); |
31429 | case PT_FixedPoint: |
31430 | #ifdef GET_LINK_IMPL |
31431 | return emitSetLocalFixedPoint |
31432 | #else |
31433 | return emitSetLocal<PT_FixedPoint> |
31434 | #endif |
31435 | (A0, I); |
31436 | case PT_Ptr: |
31437 | #ifdef GET_LINK_IMPL |
31438 | return emitSetLocalPtr |
31439 | #else |
31440 | return emitSetLocal<PT_Ptr> |
31441 | #endif |
31442 | (A0, I); |
31443 | case PT_MemberPtr: |
31444 | #ifdef GET_LINK_IMPL |
31445 | return emitSetLocalMemberPtr |
31446 | #else |
31447 | return emitSetLocal<PT_MemberPtr> |
31448 | #endif |
31449 | (A0, I); |
31450 | case PT_Float: |
31451 | #ifdef GET_LINK_IMPL |
31452 | return emitSetLocalFloat |
31453 | #else |
31454 | return emitSetLocal<PT_Float> |
31455 | #endif |
31456 | (A0, I); |
31457 | } |
31458 | llvm_unreachable("invalid enum value" ); |
31459 | } |
31460 | #endif |
31461 | #ifdef GET_LINK_IMPL |
31462 | bool ByteCodeEmitter::emitSetLocalSint8( uint32_t A0, const SourceInfo &L) { |
31463 | return emitOp<uint32_t>(OP_SetLocalSint8, A0, L); |
31464 | } |
31465 | bool ByteCodeEmitter::emitSetLocalUint8( uint32_t A0, const SourceInfo &L) { |
31466 | return emitOp<uint32_t>(OP_SetLocalUint8, A0, L); |
31467 | } |
31468 | bool ByteCodeEmitter::emitSetLocalSint16( uint32_t A0, const SourceInfo &L) { |
31469 | return emitOp<uint32_t>(OP_SetLocalSint16, A0, L); |
31470 | } |
31471 | bool ByteCodeEmitter::emitSetLocalUint16( uint32_t A0, const SourceInfo &L) { |
31472 | return emitOp<uint32_t>(OP_SetLocalUint16, A0, L); |
31473 | } |
31474 | bool ByteCodeEmitter::emitSetLocalSint32( uint32_t A0, const SourceInfo &L) { |
31475 | return emitOp<uint32_t>(OP_SetLocalSint32, A0, L); |
31476 | } |
31477 | bool ByteCodeEmitter::emitSetLocalUint32( uint32_t A0, const SourceInfo &L) { |
31478 | return emitOp<uint32_t>(OP_SetLocalUint32, A0, L); |
31479 | } |
31480 | bool ByteCodeEmitter::emitSetLocalSint64( uint32_t A0, const SourceInfo &L) { |
31481 | return emitOp<uint32_t>(OP_SetLocalSint64, A0, L); |
31482 | } |
31483 | bool ByteCodeEmitter::emitSetLocalUint64( uint32_t A0, const SourceInfo &L) { |
31484 | return emitOp<uint32_t>(OP_SetLocalUint64, A0, L); |
31485 | } |
31486 | bool ByteCodeEmitter::emitSetLocalIntAP( uint32_t A0, const SourceInfo &L) { |
31487 | return emitOp<uint32_t>(OP_SetLocalIntAP, A0, L); |
31488 | } |
31489 | bool ByteCodeEmitter::emitSetLocalIntAPS( uint32_t A0, const SourceInfo &L) { |
31490 | return emitOp<uint32_t>(OP_SetLocalIntAPS, A0, L); |
31491 | } |
31492 | bool ByteCodeEmitter::emitSetLocalBool( uint32_t A0, const SourceInfo &L) { |
31493 | return emitOp<uint32_t>(OP_SetLocalBool, A0, L); |
31494 | } |
31495 | bool ByteCodeEmitter::emitSetLocalFixedPoint( uint32_t A0, const SourceInfo &L) { |
31496 | return emitOp<uint32_t>(OP_SetLocalFixedPoint, A0, L); |
31497 | } |
31498 | bool ByteCodeEmitter::emitSetLocalPtr( uint32_t A0, const SourceInfo &L) { |
31499 | return emitOp<uint32_t>(OP_SetLocalPtr, A0, L); |
31500 | } |
31501 | bool ByteCodeEmitter::emitSetLocalMemberPtr( uint32_t A0, const SourceInfo &L) { |
31502 | return emitOp<uint32_t>(OP_SetLocalMemberPtr, A0, L); |
31503 | } |
31504 | bool ByteCodeEmitter::emitSetLocalFloat( uint32_t A0, const SourceInfo &L) { |
31505 | return emitOp<uint32_t>(OP_SetLocalFloat, A0, L); |
31506 | } |
31507 | #endif |
31508 | #ifdef GET_OPCODE_NAMES |
31509 | OP_SetParamSint8, |
31510 | OP_SetParamUint8, |
31511 | OP_SetParamSint16, |
31512 | OP_SetParamUint16, |
31513 | OP_SetParamSint32, |
31514 | OP_SetParamUint32, |
31515 | OP_SetParamSint64, |
31516 | OP_SetParamUint64, |
31517 | OP_SetParamIntAP, |
31518 | OP_SetParamIntAPS, |
31519 | OP_SetParamBool, |
31520 | OP_SetParamFixedPoint, |
31521 | OP_SetParamPtr, |
31522 | OP_SetParamMemberPtr, |
31523 | OP_SetParamFloat, |
31524 | #endif |
31525 | #ifdef GET_INTERP |
31526 | case OP_SetParamSint8: { |
31527 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31528 | if (!SetParam<PT_Sint8>(S, OpPC, V0)) |
31529 | return false; |
31530 | continue; |
31531 | } |
31532 | case OP_SetParamUint8: { |
31533 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31534 | if (!SetParam<PT_Uint8>(S, OpPC, V0)) |
31535 | return false; |
31536 | continue; |
31537 | } |
31538 | case OP_SetParamSint16: { |
31539 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31540 | if (!SetParam<PT_Sint16>(S, OpPC, V0)) |
31541 | return false; |
31542 | continue; |
31543 | } |
31544 | case OP_SetParamUint16: { |
31545 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31546 | if (!SetParam<PT_Uint16>(S, OpPC, V0)) |
31547 | return false; |
31548 | continue; |
31549 | } |
31550 | case OP_SetParamSint32: { |
31551 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31552 | if (!SetParam<PT_Sint32>(S, OpPC, V0)) |
31553 | return false; |
31554 | continue; |
31555 | } |
31556 | case OP_SetParamUint32: { |
31557 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31558 | if (!SetParam<PT_Uint32>(S, OpPC, V0)) |
31559 | return false; |
31560 | continue; |
31561 | } |
31562 | case OP_SetParamSint64: { |
31563 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31564 | if (!SetParam<PT_Sint64>(S, OpPC, V0)) |
31565 | return false; |
31566 | continue; |
31567 | } |
31568 | case OP_SetParamUint64: { |
31569 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31570 | if (!SetParam<PT_Uint64>(S, OpPC, V0)) |
31571 | return false; |
31572 | continue; |
31573 | } |
31574 | case OP_SetParamIntAP: { |
31575 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31576 | if (!SetParam<PT_IntAP>(S, OpPC, V0)) |
31577 | return false; |
31578 | continue; |
31579 | } |
31580 | case OP_SetParamIntAPS: { |
31581 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31582 | if (!SetParam<PT_IntAPS>(S, OpPC, V0)) |
31583 | return false; |
31584 | continue; |
31585 | } |
31586 | case OP_SetParamBool: { |
31587 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31588 | if (!SetParam<PT_Bool>(S, OpPC, V0)) |
31589 | return false; |
31590 | continue; |
31591 | } |
31592 | case OP_SetParamFixedPoint: { |
31593 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31594 | if (!SetParam<PT_FixedPoint>(S, OpPC, V0)) |
31595 | return false; |
31596 | continue; |
31597 | } |
31598 | case OP_SetParamPtr: { |
31599 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31600 | if (!SetParam<PT_Ptr>(S, OpPC, V0)) |
31601 | return false; |
31602 | continue; |
31603 | } |
31604 | case OP_SetParamMemberPtr: { |
31605 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31606 | if (!SetParam<PT_MemberPtr>(S, OpPC, V0)) |
31607 | return false; |
31608 | continue; |
31609 | } |
31610 | case OP_SetParamFloat: { |
31611 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31612 | if (!SetParam<PT_Float>(S, OpPC, V0)) |
31613 | return false; |
31614 | continue; |
31615 | } |
31616 | #endif |
31617 | #ifdef GET_DISASM |
31618 | case OP_SetParamSint8: |
31619 | Text.Op = PrintName("SetParamSint8" ); |
31620 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31621 | break; |
31622 | case OP_SetParamUint8: |
31623 | Text.Op = PrintName("SetParamUint8" ); |
31624 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31625 | break; |
31626 | case OP_SetParamSint16: |
31627 | Text.Op = PrintName("SetParamSint16" ); |
31628 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31629 | break; |
31630 | case OP_SetParamUint16: |
31631 | Text.Op = PrintName("SetParamUint16" ); |
31632 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31633 | break; |
31634 | case OP_SetParamSint32: |
31635 | Text.Op = PrintName("SetParamSint32" ); |
31636 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31637 | break; |
31638 | case OP_SetParamUint32: |
31639 | Text.Op = PrintName("SetParamUint32" ); |
31640 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31641 | break; |
31642 | case OP_SetParamSint64: |
31643 | Text.Op = PrintName("SetParamSint64" ); |
31644 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31645 | break; |
31646 | case OP_SetParamUint64: |
31647 | Text.Op = PrintName("SetParamUint64" ); |
31648 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31649 | break; |
31650 | case OP_SetParamIntAP: |
31651 | Text.Op = PrintName("SetParamIntAP" ); |
31652 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31653 | break; |
31654 | case OP_SetParamIntAPS: |
31655 | Text.Op = PrintName("SetParamIntAPS" ); |
31656 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31657 | break; |
31658 | case OP_SetParamBool: |
31659 | Text.Op = PrintName("SetParamBool" ); |
31660 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31661 | break; |
31662 | case OP_SetParamFixedPoint: |
31663 | Text.Op = PrintName("SetParamFixedPoint" ); |
31664 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31665 | break; |
31666 | case OP_SetParamPtr: |
31667 | Text.Op = PrintName("SetParamPtr" ); |
31668 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31669 | break; |
31670 | case OP_SetParamMemberPtr: |
31671 | Text.Op = PrintName("SetParamMemberPtr" ); |
31672 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31673 | break; |
31674 | case OP_SetParamFloat: |
31675 | Text.Op = PrintName("SetParamFloat" ); |
31676 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31677 | break; |
31678 | #endif |
31679 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31680 | bool emitSetParamSint8( uint32_t , const SourceInfo &); |
31681 | bool emitSetParamUint8( uint32_t , const SourceInfo &); |
31682 | bool emitSetParamSint16( uint32_t , const SourceInfo &); |
31683 | bool emitSetParamUint16( uint32_t , const SourceInfo &); |
31684 | bool emitSetParamSint32( uint32_t , const SourceInfo &); |
31685 | bool emitSetParamUint32( uint32_t , const SourceInfo &); |
31686 | bool emitSetParamSint64( uint32_t , const SourceInfo &); |
31687 | bool emitSetParamUint64( uint32_t , const SourceInfo &); |
31688 | bool emitSetParamIntAP( uint32_t , const SourceInfo &); |
31689 | bool emitSetParamIntAPS( uint32_t , const SourceInfo &); |
31690 | bool emitSetParamBool( uint32_t , const SourceInfo &); |
31691 | bool emitSetParamFixedPoint( uint32_t , const SourceInfo &); |
31692 | bool emitSetParamPtr( uint32_t , const SourceInfo &); |
31693 | bool emitSetParamMemberPtr( uint32_t , const SourceInfo &); |
31694 | bool emitSetParamFloat( uint32_t , const SourceInfo &); |
31695 | #endif |
31696 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31697 | [[nodiscard]] bool emitSetParam(PrimType, uint32_t, const SourceInfo &I); |
31698 | #endif |
31699 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
31700 | bool |
31701 | #if defined(GET_EVAL_IMPL) |
31702 | EvalEmitter |
31703 | #else |
31704 | ByteCodeEmitter |
31705 | #endif |
31706 | ::emitSetParam(PrimType T0, uint32_t A0, const SourceInfo &I) { |
31707 | switch (T0) { |
31708 | case PT_Sint8: |
31709 | return emitSetParamSint8(A0, I); |
31710 | case PT_Uint8: |
31711 | return emitSetParamUint8(A0, I); |
31712 | case PT_Sint16: |
31713 | return emitSetParamSint16(A0, I); |
31714 | case PT_Uint16: |
31715 | return emitSetParamUint16(A0, I); |
31716 | case PT_Sint32: |
31717 | return emitSetParamSint32(A0, I); |
31718 | case PT_Uint32: |
31719 | return emitSetParamUint32(A0, I); |
31720 | case PT_Sint64: |
31721 | return emitSetParamSint64(A0, I); |
31722 | case PT_Uint64: |
31723 | return emitSetParamUint64(A0, I); |
31724 | case PT_IntAP: |
31725 | return emitSetParamIntAP(A0, I); |
31726 | case PT_IntAPS: |
31727 | return emitSetParamIntAPS(A0, I); |
31728 | case PT_Bool: |
31729 | return emitSetParamBool(A0, I); |
31730 | case PT_FixedPoint: |
31731 | return emitSetParamFixedPoint(A0, I); |
31732 | case PT_Ptr: |
31733 | return emitSetParamPtr(A0, I); |
31734 | case PT_MemberPtr: |
31735 | return emitSetParamMemberPtr(A0, I); |
31736 | case PT_Float: |
31737 | return emitSetParamFloat(A0, I); |
31738 | } |
31739 | llvm_unreachable("invalid enum value" ); |
31740 | } |
31741 | #endif |
31742 | #ifdef GET_LINK_IMPL |
31743 | bool ByteCodeEmitter::emitSetParamSint8( uint32_t A0, const SourceInfo &L) { |
31744 | return emitOp<uint32_t>(OP_SetParamSint8, A0, L); |
31745 | } |
31746 | bool ByteCodeEmitter::emitSetParamUint8( uint32_t A0, const SourceInfo &L) { |
31747 | return emitOp<uint32_t>(OP_SetParamUint8, A0, L); |
31748 | } |
31749 | bool ByteCodeEmitter::emitSetParamSint16( uint32_t A0, const SourceInfo &L) { |
31750 | return emitOp<uint32_t>(OP_SetParamSint16, A0, L); |
31751 | } |
31752 | bool ByteCodeEmitter::emitSetParamUint16( uint32_t A0, const SourceInfo &L) { |
31753 | return emitOp<uint32_t>(OP_SetParamUint16, A0, L); |
31754 | } |
31755 | bool ByteCodeEmitter::emitSetParamSint32( uint32_t A0, const SourceInfo &L) { |
31756 | return emitOp<uint32_t>(OP_SetParamSint32, A0, L); |
31757 | } |
31758 | bool ByteCodeEmitter::emitSetParamUint32( uint32_t A0, const SourceInfo &L) { |
31759 | return emitOp<uint32_t>(OP_SetParamUint32, A0, L); |
31760 | } |
31761 | bool ByteCodeEmitter::emitSetParamSint64( uint32_t A0, const SourceInfo &L) { |
31762 | return emitOp<uint32_t>(OP_SetParamSint64, A0, L); |
31763 | } |
31764 | bool ByteCodeEmitter::emitSetParamUint64( uint32_t A0, const SourceInfo &L) { |
31765 | return emitOp<uint32_t>(OP_SetParamUint64, A0, L); |
31766 | } |
31767 | bool ByteCodeEmitter::emitSetParamIntAP( uint32_t A0, const SourceInfo &L) { |
31768 | return emitOp<uint32_t>(OP_SetParamIntAP, A0, L); |
31769 | } |
31770 | bool ByteCodeEmitter::emitSetParamIntAPS( uint32_t A0, const SourceInfo &L) { |
31771 | return emitOp<uint32_t>(OP_SetParamIntAPS, A0, L); |
31772 | } |
31773 | bool ByteCodeEmitter::emitSetParamBool( uint32_t A0, const SourceInfo &L) { |
31774 | return emitOp<uint32_t>(OP_SetParamBool, A0, L); |
31775 | } |
31776 | bool ByteCodeEmitter::emitSetParamFixedPoint( uint32_t A0, const SourceInfo &L) { |
31777 | return emitOp<uint32_t>(OP_SetParamFixedPoint, A0, L); |
31778 | } |
31779 | bool ByteCodeEmitter::emitSetParamPtr( uint32_t A0, const SourceInfo &L) { |
31780 | return emitOp<uint32_t>(OP_SetParamPtr, A0, L); |
31781 | } |
31782 | bool ByteCodeEmitter::emitSetParamMemberPtr( uint32_t A0, const SourceInfo &L) { |
31783 | return emitOp<uint32_t>(OP_SetParamMemberPtr, A0, L); |
31784 | } |
31785 | bool ByteCodeEmitter::emitSetParamFloat( uint32_t A0, const SourceInfo &L) { |
31786 | return emitOp<uint32_t>(OP_SetParamFloat, A0, L); |
31787 | } |
31788 | #endif |
31789 | #ifdef GET_EVAL_IMPL |
31790 | bool EvalEmitter::emitSetParamSint8( uint32_t A0, const SourceInfo &L) { |
31791 | if (!isActive()) return true; |
31792 | CurrentSource = L; |
31793 | return SetParam<PT_Sint8>(S, OpPC, A0); |
31794 | } |
31795 | bool EvalEmitter::emitSetParamUint8( uint32_t A0, const SourceInfo &L) { |
31796 | if (!isActive()) return true; |
31797 | CurrentSource = L; |
31798 | return SetParam<PT_Uint8>(S, OpPC, A0); |
31799 | } |
31800 | bool EvalEmitter::emitSetParamSint16( uint32_t A0, const SourceInfo &L) { |
31801 | if (!isActive()) return true; |
31802 | CurrentSource = L; |
31803 | return SetParam<PT_Sint16>(S, OpPC, A0); |
31804 | } |
31805 | bool EvalEmitter::emitSetParamUint16( uint32_t A0, const SourceInfo &L) { |
31806 | if (!isActive()) return true; |
31807 | CurrentSource = L; |
31808 | return SetParam<PT_Uint16>(S, OpPC, A0); |
31809 | } |
31810 | bool EvalEmitter::emitSetParamSint32( uint32_t A0, const SourceInfo &L) { |
31811 | if (!isActive()) return true; |
31812 | CurrentSource = L; |
31813 | return SetParam<PT_Sint32>(S, OpPC, A0); |
31814 | } |
31815 | bool EvalEmitter::emitSetParamUint32( uint32_t A0, const SourceInfo &L) { |
31816 | if (!isActive()) return true; |
31817 | CurrentSource = L; |
31818 | return SetParam<PT_Uint32>(S, OpPC, A0); |
31819 | } |
31820 | bool EvalEmitter::emitSetParamSint64( uint32_t A0, const SourceInfo &L) { |
31821 | if (!isActive()) return true; |
31822 | CurrentSource = L; |
31823 | return SetParam<PT_Sint64>(S, OpPC, A0); |
31824 | } |
31825 | bool EvalEmitter::emitSetParamUint64( uint32_t A0, const SourceInfo &L) { |
31826 | if (!isActive()) return true; |
31827 | CurrentSource = L; |
31828 | return SetParam<PT_Uint64>(S, OpPC, A0); |
31829 | } |
31830 | bool EvalEmitter::emitSetParamIntAP( uint32_t A0, const SourceInfo &L) { |
31831 | if (!isActive()) return true; |
31832 | CurrentSource = L; |
31833 | return SetParam<PT_IntAP>(S, OpPC, A0); |
31834 | } |
31835 | bool EvalEmitter::emitSetParamIntAPS( uint32_t A0, const SourceInfo &L) { |
31836 | if (!isActive()) return true; |
31837 | CurrentSource = L; |
31838 | return SetParam<PT_IntAPS>(S, OpPC, A0); |
31839 | } |
31840 | bool EvalEmitter::emitSetParamBool( uint32_t A0, const SourceInfo &L) { |
31841 | if (!isActive()) return true; |
31842 | CurrentSource = L; |
31843 | return SetParam<PT_Bool>(S, OpPC, A0); |
31844 | } |
31845 | bool EvalEmitter::emitSetParamFixedPoint( uint32_t A0, const SourceInfo &L) { |
31846 | if (!isActive()) return true; |
31847 | CurrentSource = L; |
31848 | return SetParam<PT_FixedPoint>(S, OpPC, A0); |
31849 | } |
31850 | bool EvalEmitter::emitSetParamPtr( uint32_t A0, const SourceInfo &L) { |
31851 | if (!isActive()) return true; |
31852 | CurrentSource = L; |
31853 | return SetParam<PT_Ptr>(S, OpPC, A0); |
31854 | } |
31855 | bool EvalEmitter::emitSetParamMemberPtr( uint32_t A0, const SourceInfo &L) { |
31856 | if (!isActive()) return true; |
31857 | CurrentSource = L; |
31858 | return SetParam<PT_MemberPtr>(S, OpPC, A0); |
31859 | } |
31860 | bool EvalEmitter::emitSetParamFloat( uint32_t A0, const SourceInfo &L) { |
31861 | if (!isActive()) return true; |
31862 | CurrentSource = L; |
31863 | return SetParam<PT_Float>(S, OpPC, A0); |
31864 | } |
31865 | #endif |
31866 | #ifdef GET_OPCODE_NAMES |
31867 | OP_SetThisFieldSint8, |
31868 | OP_SetThisFieldUint8, |
31869 | OP_SetThisFieldSint16, |
31870 | OP_SetThisFieldUint16, |
31871 | OP_SetThisFieldSint32, |
31872 | OP_SetThisFieldUint32, |
31873 | OP_SetThisFieldSint64, |
31874 | OP_SetThisFieldUint64, |
31875 | OP_SetThisFieldIntAP, |
31876 | OP_SetThisFieldIntAPS, |
31877 | OP_SetThisFieldBool, |
31878 | OP_SetThisFieldFixedPoint, |
31879 | OP_SetThisFieldPtr, |
31880 | OP_SetThisFieldMemberPtr, |
31881 | OP_SetThisFieldFloat, |
31882 | #endif |
31883 | #ifdef GET_INTERP |
31884 | case OP_SetThisFieldSint8: { |
31885 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31886 | if (!SetThisField<PT_Sint8>(S, OpPC, V0)) |
31887 | return false; |
31888 | continue; |
31889 | } |
31890 | case OP_SetThisFieldUint8: { |
31891 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31892 | if (!SetThisField<PT_Uint8>(S, OpPC, V0)) |
31893 | return false; |
31894 | continue; |
31895 | } |
31896 | case OP_SetThisFieldSint16: { |
31897 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31898 | if (!SetThisField<PT_Sint16>(S, OpPC, V0)) |
31899 | return false; |
31900 | continue; |
31901 | } |
31902 | case OP_SetThisFieldUint16: { |
31903 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31904 | if (!SetThisField<PT_Uint16>(S, OpPC, V0)) |
31905 | return false; |
31906 | continue; |
31907 | } |
31908 | case OP_SetThisFieldSint32: { |
31909 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31910 | if (!SetThisField<PT_Sint32>(S, OpPC, V0)) |
31911 | return false; |
31912 | continue; |
31913 | } |
31914 | case OP_SetThisFieldUint32: { |
31915 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31916 | if (!SetThisField<PT_Uint32>(S, OpPC, V0)) |
31917 | return false; |
31918 | continue; |
31919 | } |
31920 | case OP_SetThisFieldSint64: { |
31921 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31922 | if (!SetThisField<PT_Sint64>(S, OpPC, V0)) |
31923 | return false; |
31924 | continue; |
31925 | } |
31926 | case OP_SetThisFieldUint64: { |
31927 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31928 | if (!SetThisField<PT_Uint64>(S, OpPC, V0)) |
31929 | return false; |
31930 | continue; |
31931 | } |
31932 | case OP_SetThisFieldIntAP: { |
31933 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31934 | if (!SetThisField<PT_IntAP>(S, OpPC, V0)) |
31935 | return false; |
31936 | continue; |
31937 | } |
31938 | case OP_SetThisFieldIntAPS: { |
31939 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31940 | if (!SetThisField<PT_IntAPS>(S, OpPC, V0)) |
31941 | return false; |
31942 | continue; |
31943 | } |
31944 | case OP_SetThisFieldBool: { |
31945 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31946 | if (!SetThisField<PT_Bool>(S, OpPC, V0)) |
31947 | return false; |
31948 | continue; |
31949 | } |
31950 | case OP_SetThisFieldFixedPoint: { |
31951 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31952 | if (!SetThisField<PT_FixedPoint>(S, OpPC, V0)) |
31953 | return false; |
31954 | continue; |
31955 | } |
31956 | case OP_SetThisFieldPtr: { |
31957 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31958 | if (!SetThisField<PT_Ptr>(S, OpPC, V0)) |
31959 | return false; |
31960 | continue; |
31961 | } |
31962 | case OP_SetThisFieldMemberPtr: { |
31963 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31964 | if (!SetThisField<PT_MemberPtr>(S, OpPC, V0)) |
31965 | return false; |
31966 | continue; |
31967 | } |
31968 | case OP_SetThisFieldFloat: { |
31969 | const auto V0 = ReadArg<uint32_t>(S, PC); |
31970 | if (!SetThisField<PT_Float>(S, OpPC, V0)) |
31971 | return false; |
31972 | continue; |
31973 | } |
31974 | #endif |
31975 | #ifdef GET_DISASM |
31976 | case OP_SetThisFieldSint8: |
31977 | Text.Op = PrintName("SetThisFieldSint8" ); |
31978 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31979 | break; |
31980 | case OP_SetThisFieldUint8: |
31981 | Text.Op = PrintName("SetThisFieldUint8" ); |
31982 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31983 | break; |
31984 | case OP_SetThisFieldSint16: |
31985 | Text.Op = PrintName("SetThisFieldSint16" ); |
31986 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31987 | break; |
31988 | case OP_SetThisFieldUint16: |
31989 | Text.Op = PrintName("SetThisFieldUint16" ); |
31990 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31991 | break; |
31992 | case OP_SetThisFieldSint32: |
31993 | Text.Op = PrintName("SetThisFieldSint32" ); |
31994 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31995 | break; |
31996 | case OP_SetThisFieldUint32: |
31997 | Text.Op = PrintName("SetThisFieldUint32" ); |
31998 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
31999 | break; |
32000 | case OP_SetThisFieldSint64: |
32001 | Text.Op = PrintName("SetThisFieldSint64" ); |
32002 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32003 | break; |
32004 | case OP_SetThisFieldUint64: |
32005 | Text.Op = PrintName("SetThisFieldUint64" ); |
32006 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32007 | break; |
32008 | case OP_SetThisFieldIntAP: |
32009 | Text.Op = PrintName("SetThisFieldIntAP" ); |
32010 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32011 | break; |
32012 | case OP_SetThisFieldIntAPS: |
32013 | Text.Op = PrintName("SetThisFieldIntAPS" ); |
32014 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32015 | break; |
32016 | case OP_SetThisFieldBool: |
32017 | Text.Op = PrintName("SetThisFieldBool" ); |
32018 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32019 | break; |
32020 | case OP_SetThisFieldFixedPoint: |
32021 | Text.Op = PrintName("SetThisFieldFixedPoint" ); |
32022 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32023 | break; |
32024 | case OP_SetThisFieldPtr: |
32025 | Text.Op = PrintName("SetThisFieldPtr" ); |
32026 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32027 | break; |
32028 | case OP_SetThisFieldMemberPtr: |
32029 | Text.Op = PrintName("SetThisFieldMemberPtr" ); |
32030 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32031 | break; |
32032 | case OP_SetThisFieldFloat: |
32033 | Text.Op = PrintName("SetThisFieldFloat" ); |
32034 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
32035 | break; |
32036 | #endif |
32037 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32038 | bool emitSetThisFieldSint8( uint32_t , const SourceInfo &); |
32039 | bool emitSetThisFieldUint8( uint32_t , const SourceInfo &); |
32040 | bool emitSetThisFieldSint16( uint32_t , const SourceInfo &); |
32041 | bool emitSetThisFieldUint16( uint32_t , const SourceInfo &); |
32042 | bool emitSetThisFieldSint32( uint32_t , const SourceInfo &); |
32043 | bool emitSetThisFieldUint32( uint32_t , const SourceInfo &); |
32044 | bool emitSetThisFieldSint64( uint32_t , const SourceInfo &); |
32045 | bool emitSetThisFieldUint64( uint32_t , const SourceInfo &); |
32046 | bool emitSetThisFieldIntAP( uint32_t , const SourceInfo &); |
32047 | bool emitSetThisFieldIntAPS( uint32_t , const SourceInfo &); |
32048 | bool emitSetThisFieldBool( uint32_t , const SourceInfo &); |
32049 | bool emitSetThisFieldFixedPoint( uint32_t , const SourceInfo &); |
32050 | bool emitSetThisFieldPtr( uint32_t , const SourceInfo &); |
32051 | bool emitSetThisFieldMemberPtr( uint32_t , const SourceInfo &); |
32052 | bool emitSetThisFieldFloat( uint32_t , const SourceInfo &); |
32053 | #endif |
32054 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32055 | [[nodiscard]] bool emitSetThisField(PrimType, uint32_t, const SourceInfo &I); |
32056 | #endif |
32057 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
32058 | bool |
32059 | #if defined(GET_EVAL_IMPL) |
32060 | EvalEmitter |
32061 | #else |
32062 | ByteCodeEmitter |
32063 | #endif |
32064 | ::emitSetThisField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
32065 | switch (T0) { |
32066 | case PT_Sint8: |
32067 | return emitSetThisFieldSint8(A0, I); |
32068 | case PT_Uint8: |
32069 | return emitSetThisFieldUint8(A0, I); |
32070 | case PT_Sint16: |
32071 | return emitSetThisFieldSint16(A0, I); |
32072 | case PT_Uint16: |
32073 | return emitSetThisFieldUint16(A0, I); |
32074 | case PT_Sint32: |
32075 | return emitSetThisFieldSint32(A0, I); |
32076 | case PT_Uint32: |
32077 | return emitSetThisFieldUint32(A0, I); |
32078 | case PT_Sint64: |
32079 | return emitSetThisFieldSint64(A0, I); |
32080 | case PT_Uint64: |
32081 | return emitSetThisFieldUint64(A0, I); |
32082 | case PT_IntAP: |
32083 | return emitSetThisFieldIntAP(A0, I); |
32084 | case PT_IntAPS: |
32085 | return emitSetThisFieldIntAPS(A0, I); |
32086 | case PT_Bool: |
32087 | return emitSetThisFieldBool(A0, I); |
32088 | case PT_FixedPoint: |
32089 | return emitSetThisFieldFixedPoint(A0, I); |
32090 | case PT_Ptr: |
32091 | return emitSetThisFieldPtr(A0, I); |
32092 | case PT_MemberPtr: |
32093 | return emitSetThisFieldMemberPtr(A0, I); |
32094 | case PT_Float: |
32095 | return emitSetThisFieldFloat(A0, I); |
32096 | } |
32097 | llvm_unreachable("invalid enum value" ); |
32098 | } |
32099 | #endif |
32100 | #ifdef GET_LINK_IMPL |
32101 | bool ByteCodeEmitter::emitSetThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
32102 | return emitOp<uint32_t>(OP_SetThisFieldSint8, A0, L); |
32103 | } |
32104 | bool ByteCodeEmitter::emitSetThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
32105 | return emitOp<uint32_t>(OP_SetThisFieldUint8, A0, L); |
32106 | } |
32107 | bool ByteCodeEmitter::emitSetThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
32108 | return emitOp<uint32_t>(OP_SetThisFieldSint16, A0, L); |
32109 | } |
32110 | bool ByteCodeEmitter::emitSetThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
32111 | return emitOp<uint32_t>(OP_SetThisFieldUint16, A0, L); |
32112 | } |
32113 | bool ByteCodeEmitter::emitSetThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
32114 | return emitOp<uint32_t>(OP_SetThisFieldSint32, A0, L); |
32115 | } |
32116 | bool ByteCodeEmitter::emitSetThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
32117 | return emitOp<uint32_t>(OP_SetThisFieldUint32, A0, L); |
32118 | } |
32119 | bool ByteCodeEmitter::emitSetThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
32120 | return emitOp<uint32_t>(OP_SetThisFieldSint64, A0, L); |
32121 | } |
32122 | bool ByteCodeEmitter::emitSetThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
32123 | return emitOp<uint32_t>(OP_SetThisFieldUint64, A0, L); |
32124 | } |
32125 | bool ByteCodeEmitter::emitSetThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
32126 | return emitOp<uint32_t>(OP_SetThisFieldIntAP, A0, L); |
32127 | } |
32128 | bool ByteCodeEmitter::emitSetThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
32129 | return emitOp<uint32_t>(OP_SetThisFieldIntAPS, A0, L); |
32130 | } |
32131 | bool ByteCodeEmitter::emitSetThisFieldBool( uint32_t A0, const SourceInfo &L) { |
32132 | return emitOp<uint32_t>(OP_SetThisFieldBool, A0, L); |
32133 | } |
32134 | bool ByteCodeEmitter::emitSetThisFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
32135 | return emitOp<uint32_t>(OP_SetThisFieldFixedPoint, A0, L); |
32136 | } |
32137 | bool ByteCodeEmitter::emitSetThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
32138 | return emitOp<uint32_t>(OP_SetThisFieldPtr, A0, L); |
32139 | } |
32140 | bool ByteCodeEmitter::emitSetThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
32141 | return emitOp<uint32_t>(OP_SetThisFieldMemberPtr, A0, L); |
32142 | } |
32143 | bool ByteCodeEmitter::emitSetThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
32144 | return emitOp<uint32_t>(OP_SetThisFieldFloat, A0, L); |
32145 | } |
32146 | #endif |
32147 | #ifdef GET_EVAL_IMPL |
32148 | bool EvalEmitter::emitSetThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
32149 | if (!isActive()) return true; |
32150 | CurrentSource = L; |
32151 | return SetThisField<PT_Sint8>(S, OpPC, A0); |
32152 | } |
32153 | bool EvalEmitter::emitSetThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
32154 | if (!isActive()) return true; |
32155 | CurrentSource = L; |
32156 | return SetThisField<PT_Uint8>(S, OpPC, A0); |
32157 | } |
32158 | bool EvalEmitter::emitSetThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
32159 | if (!isActive()) return true; |
32160 | CurrentSource = L; |
32161 | return SetThisField<PT_Sint16>(S, OpPC, A0); |
32162 | } |
32163 | bool EvalEmitter::emitSetThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
32164 | if (!isActive()) return true; |
32165 | CurrentSource = L; |
32166 | return SetThisField<PT_Uint16>(S, OpPC, A0); |
32167 | } |
32168 | bool EvalEmitter::emitSetThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
32169 | if (!isActive()) return true; |
32170 | CurrentSource = L; |
32171 | return SetThisField<PT_Sint32>(S, OpPC, A0); |
32172 | } |
32173 | bool EvalEmitter::emitSetThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
32174 | if (!isActive()) return true; |
32175 | CurrentSource = L; |
32176 | return SetThisField<PT_Uint32>(S, OpPC, A0); |
32177 | } |
32178 | bool EvalEmitter::emitSetThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
32179 | if (!isActive()) return true; |
32180 | CurrentSource = L; |
32181 | return SetThisField<PT_Sint64>(S, OpPC, A0); |
32182 | } |
32183 | bool EvalEmitter::emitSetThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
32184 | if (!isActive()) return true; |
32185 | CurrentSource = L; |
32186 | return SetThisField<PT_Uint64>(S, OpPC, A0); |
32187 | } |
32188 | bool EvalEmitter::emitSetThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
32189 | if (!isActive()) return true; |
32190 | CurrentSource = L; |
32191 | return SetThisField<PT_IntAP>(S, OpPC, A0); |
32192 | } |
32193 | bool EvalEmitter::emitSetThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
32194 | if (!isActive()) return true; |
32195 | CurrentSource = L; |
32196 | return SetThisField<PT_IntAPS>(S, OpPC, A0); |
32197 | } |
32198 | bool EvalEmitter::emitSetThisFieldBool( uint32_t A0, const SourceInfo &L) { |
32199 | if (!isActive()) return true; |
32200 | CurrentSource = L; |
32201 | return SetThisField<PT_Bool>(S, OpPC, A0); |
32202 | } |
32203 | bool EvalEmitter::emitSetThisFieldFixedPoint( uint32_t A0, const SourceInfo &L) { |
32204 | if (!isActive()) return true; |
32205 | CurrentSource = L; |
32206 | return SetThisField<PT_FixedPoint>(S, OpPC, A0); |
32207 | } |
32208 | bool EvalEmitter::emitSetThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
32209 | if (!isActive()) return true; |
32210 | CurrentSource = L; |
32211 | return SetThisField<PT_Ptr>(S, OpPC, A0); |
32212 | } |
32213 | bool EvalEmitter::emitSetThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
32214 | if (!isActive()) return true; |
32215 | CurrentSource = L; |
32216 | return SetThisField<PT_MemberPtr>(S, OpPC, A0); |
32217 | } |
32218 | bool EvalEmitter::emitSetThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
32219 | if (!isActive()) return true; |
32220 | CurrentSource = L; |
32221 | return SetThisField<PT_Float>(S, OpPC, A0); |
32222 | } |
32223 | #endif |
32224 | #ifdef GET_OPCODE_NAMES |
32225 | OP_ShiftFixedPoint, |
32226 | #endif |
32227 | #ifdef GET_INTERP |
32228 | case OP_ShiftFixedPoint: { |
32229 | const auto V0 = ReadArg<bool>(S, PC); |
32230 | if (!ShiftFixedPoint(S, OpPC, V0)) |
32231 | return false; |
32232 | continue; |
32233 | } |
32234 | #endif |
32235 | #ifdef GET_DISASM |
32236 | case OP_ShiftFixedPoint: |
32237 | Text.Op = PrintName("ShiftFixedPoint" ); |
32238 | Text.Args.push_back(printArg<bool>(P, PC)); |
32239 | break; |
32240 | #endif |
32241 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32242 | bool emitShiftFixedPoint( bool , const SourceInfo &); |
32243 | #endif |
32244 | #ifdef GET_LINK_IMPL |
32245 | bool ByteCodeEmitter::emitShiftFixedPoint( bool A0, const SourceInfo &L) { |
32246 | return emitOp<bool>(OP_ShiftFixedPoint, A0, L); |
32247 | } |
32248 | #endif |
32249 | #ifdef GET_EVAL_IMPL |
32250 | bool EvalEmitter::emitShiftFixedPoint( bool A0, const SourceInfo &L) { |
32251 | if (!isActive()) return true; |
32252 | CurrentSource = L; |
32253 | return ShiftFixedPoint(S, OpPC, A0); |
32254 | } |
32255 | #endif |
32256 | #ifdef GET_OPCODE_NAMES |
32257 | OP_ShlSint8Sint8, |
32258 | OP_ShlSint8Uint8, |
32259 | OP_ShlSint8Sint16, |
32260 | OP_ShlSint8Uint16, |
32261 | OP_ShlSint8Sint32, |
32262 | OP_ShlSint8Uint32, |
32263 | OP_ShlSint8Sint64, |
32264 | OP_ShlSint8Uint64, |
32265 | OP_ShlSint8IntAP, |
32266 | OP_ShlSint8IntAPS, |
32267 | OP_ShlUint8Sint8, |
32268 | OP_ShlUint8Uint8, |
32269 | OP_ShlUint8Sint16, |
32270 | OP_ShlUint8Uint16, |
32271 | OP_ShlUint8Sint32, |
32272 | OP_ShlUint8Uint32, |
32273 | OP_ShlUint8Sint64, |
32274 | OP_ShlUint8Uint64, |
32275 | OP_ShlUint8IntAP, |
32276 | OP_ShlUint8IntAPS, |
32277 | OP_ShlSint16Sint8, |
32278 | OP_ShlSint16Uint8, |
32279 | OP_ShlSint16Sint16, |
32280 | OP_ShlSint16Uint16, |
32281 | OP_ShlSint16Sint32, |
32282 | OP_ShlSint16Uint32, |
32283 | OP_ShlSint16Sint64, |
32284 | OP_ShlSint16Uint64, |
32285 | OP_ShlSint16IntAP, |
32286 | OP_ShlSint16IntAPS, |
32287 | OP_ShlUint16Sint8, |
32288 | OP_ShlUint16Uint8, |
32289 | OP_ShlUint16Sint16, |
32290 | OP_ShlUint16Uint16, |
32291 | OP_ShlUint16Sint32, |
32292 | OP_ShlUint16Uint32, |
32293 | OP_ShlUint16Sint64, |
32294 | OP_ShlUint16Uint64, |
32295 | OP_ShlUint16IntAP, |
32296 | OP_ShlUint16IntAPS, |
32297 | OP_ShlSint32Sint8, |
32298 | OP_ShlSint32Uint8, |
32299 | OP_ShlSint32Sint16, |
32300 | OP_ShlSint32Uint16, |
32301 | OP_ShlSint32Sint32, |
32302 | OP_ShlSint32Uint32, |
32303 | OP_ShlSint32Sint64, |
32304 | OP_ShlSint32Uint64, |
32305 | OP_ShlSint32IntAP, |
32306 | OP_ShlSint32IntAPS, |
32307 | OP_ShlUint32Sint8, |
32308 | OP_ShlUint32Uint8, |
32309 | OP_ShlUint32Sint16, |
32310 | OP_ShlUint32Uint16, |
32311 | OP_ShlUint32Sint32, |
32312 | OP_ShlUint32Uint32, |
32313 | OP_ShlUint32Sint64, |
32314 | OP_ShlUint32Uint64, |
32315 | OP_ShlUint32IntAP, |
32316 | OP_ShlUint32IntAPS, |
32317 | OP_ShlSint64Sint8, |
32318 | OP_ShlSint64Uint8, |
32319 | OP_ShlSint64Sint16, |
32320 | OP_ShlSint64Uint16, |
32321 | OP_ShlSint64Sint32, |
32322 | OP_ShlSint64Uint32, |
32323 | OP_ShlSint64Sint64, |
32324 | OP_ShlSint64Uint64, |
32325 | OP_ShlSint64IntAP, |
32326 | OP_ShlSint64IntAPS, |
32327 | OP_ShlUint64Sint8, |
32328 | OP_ShlUint64Uint8, |
32329 | OP_ShlUint64Sint16, |
32330 | OP_ShlUint64Uint16, |
32331 | OP_ShlUint64Sint32, |
32332 | OP_ShlUint64Uint32, |
32333 | OP_ShlUint64Sint64, |
32334 | OP_ShlUint64Uint64, |
32335 | OP_ShlUint64IntAP, |
32336 | OP_ShlUint64IntAPS, |
32337 | OP_ShlIntAPSint8, |
32338 | OP_ShlIntAPUint8, |
32339 | OP_ShlIntAPSint16, |
32340 | OP_ShlIntAPUint16, |
32341 | OP_ShlIntAPSint32, |
32342 | OP_ShlIntAPUint32, |
32343 | OP_ShlIntAPSint64, |
32344 | OP_ShlIntAPUint64, |
32345 | OP_ShlIntAPIntAP, |
32346 | OP_ShlIntAPIntAPS, |
32347 | OP_ShlIntAPSSint8, |
32348 | OP_ShlIntAPSUint8, |
32349 | OP_ShlIntAPSSint16, |
32350 | OP_ShlIntAPSUint16, |
32351 | OP_ShlIntAPSSint32, |
32352 | OP_ShlIntAPSUint32, |
32353 | OP_ShlIntAPSSint64, |
32354 | OP_ShlIntAPSUint64, |
32355 | OP_ShlIntAPSIntAP, |
32356 | OP_ShlIntAPSIntAPS, |
32357 | #endif |
32358 | #ifdef GET_INTERP |
32359 | case OP_ShlSint8Sint8: { |
32360 | if (!Shl<PT_Sint8, PT_Sint8>(S, OpPC)) |
32361 | return false; |
32362 | continue; |
32363 | } |
32364 | case OP_ShlSint8Uint8: { |
32365 | if (!Shl<PT_Sint8, PT_Uint8>(S, OpPC)) |
32366 | return false; |
32367 | continue; |
32368 | } |
32369 | case OP_ShlSint8Sint16: { |
32370 | if (!Shl<PT_Sint8, PT_Sint16>(S, OpPC)) |
32371 | return false; |
32372 | continue; |
32373 | } |
32374 | case OP_ShlSint8Uint16: { |
32375 | if (!Shl<PT_Sint8, PT_Uint16>(S, OpPC)) |
32376 | return false; |
32377 | continue; |
32378 | } |
32379 | case OP_ShlSint8Sint32: { |
32380 | if (!Shl<PT_Sint8, PT_Sint32>(S, OpPC)) |
32381 | return false; |
32382 | continue; |
32383 | } |
32384 | case OP_ShlSint8Uint32: { |
32385 | if (!Shl<PT_Sint8, PT_Uint32>(S, OpPC)) |
32386 | return false; |
32387 | continue; |
32388 | } |
32389 | case OP_ShlSint8Sint64: { |
32390 | if (!Shl<PT_Sint8, PT_Sint64>(S, OpPC)) |
32391 | return false; |
32392 | continue; |
32393 | } |
32394 | case OP_ShlSint8Uint64: { |
32395 | if (!Shl<PT_Sint8, PT_Uint64>(S, OpPC)) |
32396 | return false; |
32397 | continue; |
32398 | } |
32399 | case OP_ShlSint8IntAP: { |
32400 | if (!Shl<PT_Sint8, PT_IntAP>(S, OpPC)) |
32401 | return false; |
32402 | continue; |
32403 | } |
32404 | case OP_ShlSint8IntAPS: { |
32405 | if (!Shl<PT_Sint8, PT_IntAPS>(S, OpPC)) |
32406 | return false; |
32407 | continue; |
32408 | } |
32409 | case OP_ShlUint8Sint8: { |
32410 | if (!Shl<PT_Uint8, PT_Sint8>(S, OpPC)) |
32411 | return false; |
32412 | continue; |
32413 | } |
32414 | case OP_ShlUint8Uint8: { |
32415 | if (!Shl<PT_Uint8, PT_Uint8>(S, OpPC)) |
32416 | return false; |
32417 | continue; |
32418 | } |
32419 | case OP_ShlUint8Sint16: { |
32420 | if (!Shl<PT_Uint8, PT_Sint16>(S, OpPC)) |
32421 | return false; |
32422 | continue; |
32423 | } |
32424 | case OP_ShlUint8Uint16: { |
32425 | if (!Shl<PT_Uint8, PT_Uint16>(S, OpPC)) |
32426 | return false; |
32427 | continue; |
32428 | } |
32429 | case OP_ShlUint8Sint32: { |
32430 | if (!Shl<PT_Uint8, PT_Sint32>(S, OpPC)) |
32431 | return false; |
32432 | continue; |
32433 | } |
32434 | case OP_ShlUint8Uint32: { |
32435 | if (!Shl<PT_Uint8, PT_Uint32>(S, OpPC)) |
32436 | return false; |
32437 | continue; |
32438 | } |
32439 | case OP_ShlUint8Sint64: { |
32440 | if (!Shl<PT_Uint8, PT_Sint64>(S, OpPC)) |
32441 | return false; |
32442 | continue; |
32443 | } |
32444 | case OP_ShlUint8Uint64: { |
32445 | if (!Shl<PT_Uint8, PT_Uint64>(S, OpPC)) |
32446 | return false; |
32447 | continue; |
32448 | } |
32449 | case OP_ShlUint8IntAP: { |
32450 | if (!Shl<PT_Uint8, PT_IntAP>(S, OpPC)) |
32451 | return false; |
32452 | continue; |
32453 | } |
32454 | case OP_ShlUint8IntAPS: { |
32455 | if (!Shl<PT_Uint8, PT_IntAPS>(S, OpPC)) |
32456 | return false; |
32457 | continue; |
32458 | } |
32459 | case OP_ShlSint16Sint8: { |
32460 | if (!Shl<PT_Sint16, PT_Sint8>(S, OpPC)) |
32461 | return false; |
32462 | continue; |
32463 | } |
32464 | case OP_ShlSint16Uint8: { |
32465 | if (!Shl<PT_Sint16, PT_Uint8>(S, OpPC)) |
32466 | return false; |
32467 | continue; |
32468 | } |
32469 | case OP_ShlSint16Sint16: { |
32470 | if (!Shl<PT_Sint16, PT_Sint16>(S, OpPC)) |
32471 | return false; |
32472 | continue; |
32473 | } |
32474 | case OP_ShlSint16Uint16: { |
32475 | if (!Shl<PT_Sint16, PT_Uint16>(S, OpPC)) |
32476 | return false; |
32477 | continue; |
32478 | } |
32479 | case OP_ShlSint16Sint32: { |
32480 | if (!Shl<PT_Sint16, PT_Sint32>(S, OpPC)) |
32481 | return false; |
32482 | continue; |
32483 | } |
32484 | case OP_ShlSint16Uint32: { |
32485 | if (!Shl<PT_Sint16, PT_Uint32>(S, OpPC)) |
32486 | return false; |
32487 | continue; |
32488 | } |
32489 | case OP_ShlSint16Sint64: { |
32490 | if (!Shl<PT_Sint16, PT_Sint64>(S, OpPC)) |
32491 | return false; |
32492 | continue; |
32493 | } |
32494 | case OP_ShlSint16Uint64: { |
32495 | if (!Shl<PT_Sint16, PT_Uint64>(S, OpPC)) |
32496 | return false; |
32497 | continue; |
32498 | } |
32499 | case OP_ShlSint16IntAP: { |
32500 | if (!Shl<PT_Sint16, PT_IntAP>(S, OpPC)) |
32501 | return false; |
32502 | continue; |
32503 | } |
32504 | case OP_ShlSint16IntAPS: { |
32505 | if (!Shl<PT_Sint16, PT_IntAPS>(S, OpPC)) |
32506 | return false; |
32507 | continue; |
32508 | } |
32509 | case OP_ShlUint16Sint8: { |
32510 | if (!Shl<PT_Uint16, PT_Sint8>(S, OpPC)) |
32511 | return false; |
32512 | continue; |
32513 | } |
32514 | case OP_ShlUint16Uint8: { |
32515 | if (!Shl<PT_Uint16, PT_Uint8>(S, OpPC)) |
32516 | return false; |
32517 | continue; |
32518 | } |
32519 | case OP_ShlUint16Sint16: { |
32520 | if (!Shl<PT_Uint16, PT_Sint16>(S, OpPC)) |
32521 | return false; |
32522 | continue; |
32523 | } |
32524 | case OP_ShlUint16Uint16: { |
32525 | if (!Shl<PT_Uint16, PT_Uint16>(S, OpPC)) |
32526 | return false; |
32527 | continue; |
32528 | } |
32529 | case OP_ShlUint16Sint32: { |
32530 | if (!Shl<PT_Uint16, PT_Sint32>(S, OpPC)) |
32531 | return false; |
32532 | continue; |
32533 | } |
32534 | case OP_ShlUint16Uint32: { |
32535 | if (!Shl<PT_Uint16, PT_Uint32>(S, OpPC)) |
32536 | return false; |
32537 | continue; |
32538 | } |
32539 | case OP_ShlUint16Sint64: { |
32540 | if (!Shl<PT_Uint16, PT_Sint64>(S, OpPC)) |
32541 | return false; |
32542 | continue; |
32543 | } |
32544 | case OP_ShlUint16Uint64: { |
32545 | if (!Shl<PT_Uint16, PT_Uint64>(S, OpPC)) |
32546 | return false; |
32547 | continue; |
32548 | } |
32549 | case OP_ShlUint16IntAP: { |
32550 | if (!Shl<PT_Uint16, PT_IntAP>(S, OpPC)) |
32551 | return false; |
32552 | continue; |
32553 | } |
32554 | case OP_ShlUint16IntAPS: { |
32555 | if (!Shl<PT_Uint16, PT_IntAPS>(S, OpPC)) |
32556 | return false; |
32557 | continue; |
32558 | } |
32559 | case OP_ShlSint32Sint8: { |
32560 | if (!Shl<PT_Sint32, PT_Sint8>(S, OpPC)) |
32561 | return false; |
32562 | continue; |
32563 | } |
32564 | case OP_ShlSint32Uint8: { |
32565 | if (!Shl<PT_Sint32, PT_Uint8>(S, OpPC)) |
32566 | return false; |
32567 | continue; |
32568 | } |
32569 | case OP_ShlSint32Sint16: { |
32570 | if (!Shl<PT_Sint32, PT_Sint16>(S, OpPC)) |
32571 | return false; |
32572 | continue; |
32573 | } |
32574 | case OP_ShlSint32Uint16: { |
32575 | if (!Shl<PT_Sint32, PT_Uint16>(S, OpPC)) |
32576 | return false; |
32577 | continue; |
32578 | } |
32579 | case OP_ShlSint32Sint32: { |
32580 | if (!Shl<PT_Sint32, PT_Sint32>(S, OpPC)) |
32581 | return false; |
32582 | continue; |
32583 | } |
32584 | case OP_ShlSint32Uint32: { |
32585 | if (!Shl<PT_Sint32, PT_Uint32>(S, OpPC)) |
32586 | return false; |
32587 | continue; |
32588 | } |
32589 | case OP_ShlSint32Sint64: { |
32590 | if (!Shl<PT_Sint32, PT_Sint64>(S, OpPC)) |
32591 | return false; |
32592 | continue; |
32593 | } |
32594 | case OP_ShlSint32Uint64: { |
32595 | if (!Shl<PT_Sint32, PT_Uint64>(S, OpPC)) |
32596 | return false; |
32597 | continue; |
32598 | } |
32599 | case OP_ShlSint32IntAP: { |
32600 | if (!Shl<PT_Sint32, PT_IntAP>(S, OpPC)) |
32601 | return false; |
32602 | continue; |
32603 | } |
32604 | case OP_ShlSint32IntAPS: { |
32605 | if (!Shl<PT_Sint32, PT_IntAPS>(S, OpPC)) |
32606 | return false; |
32607 | continue; |
32608 | } |
32609 | case OP_ShlUint32Sint8: { |
32610 | if (!Shl<PT_Uint32, PT_Sint8>(S, OpPC)) |
32611 | return false; |
32612 | continue; |
32613 | } |
32614 | case OP_ShlUint32Uint8: { |
32615 | if (!Shl<PT_Uint32, PT_Uint8>(S, OpPC)) |
32616 | return false; |
32617 | continue; |
32618 | } |
32619 | case OP_ShlUint32Sint16: { |
32620 | if (!Shl<PT_Uint32, PT_Sint16>(S, OpPC)) |
32621 | return false; |
32622 | continue; |
32623 | } |
32624 | case OP_ShlUint32Uint16: { |
32625 | if (!Shl<PT_Uint32, PT_Uint16>(S, OpPC)) |
32626 | return false; |
32627 | continue; |
32628 | } |
32629 | case OP_ShlUint32Sint32: { |
32630 | if (!Shl<PT_Uint32, PT_Sint32>(S, OpPC)) |
32631 | return false; |
32632 | continue; |
32633 | } |
32634 | case OP_ShlUint32Uint32: { |
32635 | if (!Shl<PT_Uint32, PT_Uint32>(S, OpPC)) |
32636 | return false; |
32637 | continue; |
32638 | } |
32639 | case OP_ShlUint32Sint64: { |
32640 | if (!Shl<PT_Uint32, PT_Sint64>(S, OpPC)) |
32641 | return false; |
32642 | continue; |
32643 | } |
32644 | case OP_ShlUint32Uint64: { |
32645 | if (!Shl<PT_Uint32, PT_Uint64>(S, OpPC)) |
32646 | return false; |
32647 | continue; |
32648 | } |
32649 | case OP_ShlUint32IntAP: { |
32650 | if (!Shl<PT_Uint32, PT_IntAP>(S, OpPC)) |
32651 | return false; |
32652 | continue; |
32653 | } |
32654 | case OP_ShlUint32IntAPS: { |
32655 | if (!Shl<PT_Uint32, PT_IntAPS>(S, OpPC)) |
32656 | return false; |
32657 | continue; |
32658 | } |
32659 | case OP_ShlSint64Sint8: { |
32660 | if (!Shl<PT_Sint64, PT_Sint8>(S, OpPC)) |
32661 | return false; |
32662 | continue; |
32663 | } |
32664 | case OP_ShlSint64Uint8: { |
32665 | if (!Shl<PT_Sint64, PT_Uint8>(S, OpPC)) |
32666 | return false; |
32667 | continue; |
32668 | } |
32669 | case OP_ShlSint64Sint16: { |
32670 | if (!Shl<PT_Sint64, PT_Sint16>(S, OpPC)) |
32671 | return false; |
32672 | continue; |
32673 | } |
32674 | case OP_ShlSint64Uint16: { |
32675 | if (!Shl<PT_Sint64, PT_Uint16>(S, OpPC)) |
32676 | return false; |
32677 | continue; |
32678 | } |
32679 | case OP_ShlSint64Sint32: { |
32680 | if (!Shl<PT_Sint64, PT_Sint32>(S, OpPC)) |
32681 | return false; |
32682 | continue; |
32683 | } |
32684 | case OP_ShlSint64Uint32: { |
32685 | if (!Shl<PT_Sint64, PT_Uint32>(S, OpPC)) |
32686 | return false; |
32687 | continue; |
32688 | } |
32689 | case OP_ShlSint64Sint64: { |
32690 | if (!Shl<PT_Sint64, PT_Sint64>(S, OpPC)) |
32691 | return false; |
32692 | continue; |
32693 | } |
32694 | case OP_ShlSint64Uint64: { |
32695 | if (!Shl<PT_Sint64, PT_Uint64>(S, OpPC)) |
32696 | return false; |
32697 | continue; |
32698 | } |
32699 | case OP_ShlSint64IntAP: { |
32700 | if (!Shl<PT_Sint64, PT_IntAP>(S, OpPC)) |
32701 | return false; |
32702 | continue; |
32703 | } |
32704 | case OP_ShlSint64IntAPS: { |
32705 | if (!Shl<PT_Sint64, PT_IntAPS>(S, OpPC)) |
32706 | return false; |
32707 | continue; |
32708 | } |
32709 | case OP_ShlUint64Sint8: { |
32710 | if (!Shl<PT_Uint64, PT_Sint8>(S, OpPC)) |
32711 | return false; |
32712 | continue; |
32713 | } |
32714 | case OP_ShlUint64Uint8: { |
32715 | if (!Shl<PT_Uint64, PT_Uint8>(S, OpPC)) |
32716 | return false; |
32717 | continue; |
32718 | } |
32719 | case OP_ShlUint64Sint16: { |
32720 | if (!Shl<PT_Uint64, PT_Sint16>(S, OpPC)) |
32721 | return false; |
32722 | continue; |
32723 | } |
32724 | case OP_ShlUint64Uint16: { |
32725 | if (!Shl<PT_Uint64, PT_Uint16>(S, OpPC)) |
32726 | return false; |
32727 | continue; |
32728 | } |
32729 | case OP_ShlUint64Sint32: { |
32730 | if (!Shl<PT_Uint64, PT_Sint32>(S, OpPC)) |
32731 | return false; |
32732 | continue; |
32733 | } |
32734 | case OP_ShlUint64Uint32: { |
32735 | if (!Shl<PT_Uint64, PT_Uint32>(S, OpPC)) |
32736 | return false; |
32737 | continue; |
32738 | } |
32739 | case OP_ShlUint64Sint64: { |
32740 | if (!Shl<PT_Uint64, PT_Sint64>(S, OpPC)) |
32741 | return false; |
32742 | continue; |
32743 | } |
32744 | case OP_ShlUint64Uint64: { |
32745 | if (!Shl<PT_Uint64, PT_Uint64>(S, OpPC)) |
32746 | return false; |
32747 | continue; |
32748 | } |
32749 | case OP_ShlUint64IntAP: { |
32750 | if (!Shl<PT_Uint64, PT_IntAP>(S, OpPC)) |
32751 | return false; |
32752 | continue; |
32753 | } |
32754 | case OP_ShlUint64IntAPS: { |
32755 | if (!Shl<PT_Uint64, PT_IntAPS>(S, OpPC)) |
32756 | return false; |
32757 | continue; |
32758 | } |
32759 | case OP_ShlIntAPSint8: { |
32760 | if (!Shl<PT_IntAP, PT_Sint8>(S, OpPC)) |
32761 | return false; |
32762 | continue; |
32763 | } |
32764 | case OP_ShlIntAPUint8: { |
32765 | if (!Shl<PT_IntAP, PT_Uint8>(S, OpPC)) |
32766 | return false; |
32767 | continue; |
32768 | } |
32769 | case OP_ShlIntAPSint16: { |
32770 | if (!Shl<PT_IntAP, PT_Sint16>(S, OpPC)) |
32771 | return false; |
32772 | continue; |
32773 | } |
32774 | case OP_ShlIntAPUint16: { |
32775 | if (!Shl<PT_IntAP, PT_Uint16>(S, OpPC)) |
32776 | return false; |
32777 | continue; |
32778 | } |
32779 | case OP_ShlIntAPSint32: { |
32780 | if (!Shl<PT_IntAP, PT_Sint32>(S, OpPC)) |
32781 | return false; |
32782 | continue; |
32783 | } |
32784 | case OP_ShlIntAPUint32: { |
32785 | if (!Shl<PT_IntAP, PT_Uint32>(S, OpPC)) |
32786 | return false; |
32787 | continue; |
32788 | } |
32789 | case OP_ShlIntAPSint64: { |
32790 | if (!Shl<PT_IntAP, PT_Sint64>(S, OpPC)) |
32791 | return false; |
32792 | continue; |
32793 | } |
32794 | case OP_ShlIntAPUint64: { |
32795 | if (!Shl<PT_IntAP, PT_Uint64>(S, OpPC)) |
32796 | return false; |
32797 | continue; |
32798 | } |
32799 | case OP_ShlIntAPIntAP: { |
32800 | if (!Shl<PT_IntAP, PT_IntAP>(S, OpPC)) |
32801 | return false; |
32802 | continue; |
32803 | } |
32804 | case OP_ShlIntAPIntAPS: { |
32805 | if (!Shl<PT_IntAP, PT_IntAPS>(S, OpPC)) |
32806 | return false; |
32807 | continue; |
32808 | } |
32809 | case OP_ShlIntAPSSint8: { |
32810 | if (!Shl<PT_IntAPS, PT_Sint8>(S, OpPC)) |
32811 | return false; |
32812 | continue; |
32813 | } |
32814 | case OP_ShlIntAPSUint8: { |
32815 | if (!Shl<PT_IntAPS, PT_Uint8>(S, OpPC)) |
32816 | return false; |
32817 | continue; |
32818 | } |
32819 | case OP_ShlIntAPSSint16: { |
32820 | if (!Shl<PT_IntAPS, PT_Sint16>(S, OpPC)) |
32821 | return false; |
32822 | continue; |
32823 | } |
32824 | case OP_ShlIntAPSUint16: { |
32825 | if (!Shl<PT_IntAPS, PT_Uint16>(S, OpPC)) |
32826 | return false; |
32827 | continue; |
32828 | } |
32829 | case OP_ShlIntAPSSint32: { |
32830 | if (!Shl<PT_IntAPS, PT_Sint32>(S, OpPC)) |
32831 | return false; |
32832 | continue; |
32833 | } |
32834 | case OP_ShlIntAPSUint32: { |
32835 | if (!Shl<PT_IntAPS, PT_Uint32>(S, OpPC)) |
32836 | return false; |
32837 | continue; |
32838 | } |
32839 | case OP_ShlIntAPSSint64: { |
32840 | if (!Shl<PT_IntAPS, PT_Sint64>(S, OpPC)) |
32841 | return false; |
32842 | continue; |
32843 | } |
32844 | case OP_ShlIntAPSUint64: { |
32845 | if (!Shl<PT_IntAPS, PT_Uint64>(S, OpPC)) |
32846 | return false; |
32847 | continue; |
32848 | } |
32849 | case OP_ShlIntAPSIntAP: { |
32850 | if (!Shl<PT_IntAPS, PT_IntAP>(S, OpPC)) |
32851 | return false; |
32852 | continue; |
32853 | } |
32854 | case OP_ShlIntAPSIntAPS: { |
32855 | if (!Shl<PT_IntAPS, PT_IntAPS>(S, OpPC)) |
32856 | return false; |
32857 | continue; |
32858 | } |
32859 | #endif |
32860 | #ifdef GET_DISASM |
32861 | case OP_ShlSint8Sint8: |
32862 | Text.Op = PrintName("ShlSint8Sint8" ); |
32863 | break; |
32864 | case OP_ShlSint8Uint8: |
32865 | Text.Op = PrintName("ShlSint8Uint8" ); |
32866 | break; |
32867 | case OP_ShlSint8Sint16: |
32868 | Text.Op = PrintName("ShlSint8Sint16" ); |
32869 | break; |
32870 | case OP_ShlSint8Uint16: |
32871 | Text.Op = PrintName("ShlSint8Uint16" ); |
32872 | break; |
32873 | case OP_ShlSint8Sint32: |
32874 | Text.Op = PrintName("ShlSint8Sint32" ); |
32875 | break; |
32876 | case OP_ShlSint8Uint32: |
32877 | Text.Op = PrintName("ShlSint8Uint32" ); |
32878 | break; |
32879 | case OP_ShlSint8Sint64: |
32880 | Text.Op = PrintName("ShlSint8Sint64" ); |
32881 | break; |
32882 | case OP_ShlSint8Uint64: |
32883 | Text.Op = PrintName("ShlSint8Uint64" ); |
32884 | break; |
32885 | case OP_ShlSint8IntAP: |
32886 | Text.Op = PrintName("ShlSint8IntAP" ); |
32887 | break; |
32888 | case OP_ShlSint8IntAPS: |
32889 | Text.Op = PrintName("ShlSint8IntAPS" ); |
32890 | break; |
32891 | case OP_ShlUint8Sint8: |
32892 | Text.Op = PrintName("ShlUint8Sint8" ); |
32893 | break; |
32894 | case OP_ShlUint8Uint8: |
32895 | Text.Op = PrintName("ShlUint8Uint8" ); |
32896 | break; |
32897 | case OP_ShlUint8Sint16: |
32898 | Text.Op = PrintName("ShlUint8Sint16" ); |
32899 | break; |
32900 | case OP_ShlUint8Uint16: |
32901 | Text.Op = PrintName("ShlUint8Uint16" ); |
32902 | break; |
32903 | case OP_ShlUint8Sint32: |
32904 | Text.Op = PrintName("ShlUint8Sint32" ); |
32905 | break; |
32906 | case OP_ShlUint8Uint32: |
32907 | Text.Op = PrintName("ShlUint8Uint32" ); |
32908 | break; |
32909 | case OP_ShlUint8Sint64: |
32910 | Text.Op = PrintName("ShlUint8Sint64" ); |
32911 | break; |
32912 | case OP_ShlUint8Uint64: |
32913 | Text.Op = PrintName("ShlUint8Uint64" ); |
32914 | break; |
32915 | case OP_ShlUint8IntAP: |
32916 | Text.Op = PrintName("ShlUint8IntAP" ); |
32917 | break; |
32918 | case OP_ShlUint8IntAPS: |
32919 | Text.Op = PrintName("ShlUint8IntAPS" ); |
32920 | break; |
32921 | case OP_ShlSint16Sint8: |
32922 | Text.Op = PrintName("ShlSint16Sint8" ); |
32923 | break; |
32924 | case OP_ShlSint16Uint8: |
32925 | Text.Op = PrintName("ShlSint16Uint8" ); |
32926 | break; |
32927 | case OP_ShlSint16Sint16: |
32928 | Text.Op = PrintName("ShlSint16Sint16" ); |
32929 | break; |
32930 | case OP_ShlSint16Uint16: |
32931 | Text.Op = PrintName("ShlSint16Uint16" ); |
32932 | break; |
32933 | case OP_ShlSint16Sint32: |
32934 | Text.Op = PrintName("ShlSint16Sint32" ); |
32935 | break; |
32936 | case OP_ShlSint16Uint32: |
32937 | Text.Op = PrintName("ShlSint16Uint32" ); |
32938 | break; |
32939 | case OP_ShlSint16Sint64: |
32940 | Text.Op = PrintName("ShlSint16Sint64" ); |
32941 | break; |
32942 | case OP_ShlSint16Uint64: |
32943 | Text.Op = PrintName("ShlSint16Uint64" ); |
32944 | break; |
32945 | case OP_ShlSint16IntAP: |
32946 | Text.Op = PrintName("ShlSint16IntAP" ); |
32947 | break; |
32948 | case OP_ShlSint16IntAPS: |
32949 | Text.Op = PrintName("ShlSint16IntAPS" ); |
32950 | break; |
32951 | case OP_ShlUint16Sint8: |
32952 | Text.Op = PrintName("ShlUint16Sint8" ); |
32953 | break; |
32954 | case OP_ShlUint16Uint8: |
32955 | Text.Op = PrintName("ShlUint16Uint8" ); |
32956 | break; |
32957 | case OP_ShlUint16Sint16: |
32958 | Text.Op = PrintName("ShlUint16Sint16" ); |
32959 | break; |
32960 | case OP_ShlUint16Uint16: |
32961 | Text.Op = PrintName("ShlUint16Uint16" ); |
32962 | break; |
32963 | case OP_ShlUint16Sint32: |
32964 | Text.Op = PrintName("ShlUint16Sint32" ); |
32965 | break; |
32966 | case OP_ShlUint16Uint32: |
32967 | Text.Op = PrintName("ShlUint16Uint32" ); |
32968 | break; |
32969 | case OP_ShlUint16Sint64: |
32970 | Text.Op = PrintName("ShlUint16Sint64" ); |
32971 | break; |
32972 | case OP_ShlUint16Uint64: |
32973 | Text.Op = PrintName("ShlUint16Uint64" ); |
32974 | break; |
32975 | case OP_ShlUint16IntAP: |
32976 | Text.Op = PrintName("ShlUint16IntAP" ); |
32977 | break; |
32978 | case OP_ShlUint16IntAPS: |
32979 | Text.Op = PrintName("ShlUint16IntAPS" ); |
32980 | break; |
32981 | case OP_ShlSint32Sint8: |
32982 | Text.Op = PrintName("ShlSint32Sint8" ); |
32983 | break; |
32984 | case OP_ShlSint32Uint8: |
32985 | Text.Op = PrintName("ShlSint32Uint8" ); |
32986 | break; |
32987 | case OP_ShlSint32Sint16: |
32988 | Text.Op = PrintName("ShlSint32Sint16" ); |
32989 | break; |
32990 | case OP_ShlSint32Uint16: |
32991 | Text.Op = PrintName("ShlSint32Uint16" ); |
32992 | break; |
32993 | case OP_ShlSint32Sint32: |
32994 | Text.Op = PrintName("ShlSint32Sint32" ); |
32995 | break; |
32996 | case OP_ShlSint32Uint32: |
32997 | Text.Op = PrintName("ShlSint32Uint32" ); |
32998 | break; |
32999 | case OP_ShlSint32Sint64: |
33000 | Text.Op = PrintName("ShlSint32Sint64" ); |
33001 | break; |
33002 | case OP_ShlSint32Uint64: |
33003 | Text.Op = PrintName("ShlSint32Uint64" ); |
33004 | break; |
33005 | case OP_ShlSint32IntAP: |
33006 | Text.Op = PrintName("ShlSint32IntAP" ); |
33007 | break; |
33008 | case OP_ShlSint32IntAPS: |
33009 | Text.Op = PrintName("ShlSint32IntAPS" ); |
33010 | break; |
33011 | case OP_ShlUint32Sint8: |
33012 | Text.Op = PrintName("ShlUint32Sint8" ); |
33013 | break; |
33014 | case OP_ShlUint32Uint8: |
33015 | Text.Op = PrintName("ShlUint32Uint8" ); |
33016 | break; |
33017 | case OP_ShlUint32Sint16: |
33018 | Text.Op = PrintName("ShlUint32Sint16" ); |
33019 | break; |
33020 | case OP_ShlUint32Uint16: |
33021 | Text.Op = PrintName("ShlUint32Uint16" ); |
33022 | break; |
33023 | case OP_ShlUint32Sint32: |
33024 | Text.Op = PrintName("ShlUint32Sint32" ); |
33025 | break; |
33026 | case OP_ShlUint32Uint32: |
33027 | Text.Op = PrintName("ShlUint32Uint32" ); |
33028 | break; |
33029 | case OP_ShlUint32Sint64: |
33030 | Text.Op = PrintName("ShlUint32Sint64" ); |
33031 | break; |
33032 | case OP_ShlUint32Uint64: |
33033 | Text.Op = PrintName("ShlUint32Uint64" ); |
33034 | break; |
33035 | case OP_ShlUint32IntAP: |
33036 | Text.Op = PrintName("ShlUint32IntAP" ); |
33037 | break; |
33038 | case OP_ShlUint32IntAPS: |
33039 | Text.Op = PrintName("ShlUint32IntAPS" ); |
33040 | break; |
33041 | case OP_ShlSint64Sint8: |
33042 | Text.Op = PrintName("ShlSint64Sint8" ); |
33043 | break; |
33044 | case OP_ShlSint64Uint8: |
33045 | Text.Op = PrintName("ShlSint64Uint8" ); |
33046 | break; |
33047 | case OP_ShlSint64Sint16: |
33048 | Text.Op = PrintName("ShlSint64Sint16" ); |
33049 | break; |
33050 | case OP_ShlSint64Uint16: |
33051 | Text.Op = PrintName("ShlSint64Uint16" ); |
33052 | break; |
33053 | case OP_ShlSint64Sint32: |
33054 | Text.Op = PrintName("ShlSint64Sint32" ); |
33055 | break; |
33056 | case OP_ShlSint64Uint32: |
33057 | Text.Op = PrintName("ShlSint64Uint32" ); |
33058 | break; |
33059 | case OP_ShlSint64Sint64: |
33060 | Text.Op = PrintName("ShlSint64Sint64" ); |
33061 | break; |
33062 | case OP_ShlSint64Uint64: |
33063 | Text.Op = PrintName("ShlSint64Uint64" ); |
33064 | break; |
33065 | case OP_ShlSint64IntAP: |
33066 | Text.Op = PrintName("ShlSint64IntAP" ); |
33067 | break; |
33068 | case OP_ShlSint64IntAPS: |
33069 | Text.Op = PrintName("ShlSint64IntAPS" ); |
33070 | break; |
33071 | case OP_ShlUint64Sint8: |
33072 | Text.Op = PrintName("ShlUint64Sint8" ); |
33073 | break; |
33074 | case OP_ShlUint64Uint8: |
33075 | Text.Op = PrintName("ShlUint64Uint8" ); |
33076 | break; |
33077 | case OP_ShlUint64Sint16: |
33078 | Text.Op = PrintName("ShlUint64Sint16" ); |
33079 | break; |
33080 | case OP_ShlUint64Uint16: |
33081 | Text.Op = PrintName("ShlUint64Uint16" ); |
33082 | break; |
33083 | case OP_ShlUint64Sint32: |
33084 | Text.Op = PrintName("ShlUint64Sint32" ); |
33085 | break; |
33086 | case OP_ShlUint64Uint32: |
33087 | Text.Op = PrintName("ShlUint64Uint32" ); |
33088 | break; |
33089 | case OP_ShlUint64Sint64: |
33090 | Text.Op = PrintName("ShlUint64Sint64" ); |
33091 | break; |
33092 | case OP_ShlUint64Uint64: |
33093 | Text.Op = PrintName("ShlUint64Uint64" ); |
33094 | break; |
33095 | case OP_ShlUint64IntAP: |
33096 | Text.Op = PrintName("ShlUint64IntAP" ); |
33097 | break; |
33098 | case OP_ShlUint64IntAPS: |
33099 | Text.Op = PrintName("ShlUint64IntAPS" ); |
33100 | break; |
33101 | case OP_ShlIntAPSint8: |
33102 | Text.Op = PrintName("ShlIntAPSint8" ); |
33103 | break; |
33104 | case OP_ShlIntAPUint8: |
33105 | Text.Op = PrintName("ShlIntAPUint8" ); |
33106 | break; |
33107 | case OP_ShlIntAPSint16: |
33108 | Text.Op = PrintName("ShlIntAPSint16" ); |
33109 | break; |
33110 | case OP_ShlIntAPUint16: |
33111 | Text.Op = PrintName("ShlIntAPUint16" ); |
33112 | break; |
33113 | case OP_ShlIntAPSint32: |
33114 | Text.Op = PrintName("ShlIntAPSint32" ); |
33115 | break; |
33116 | case OP_ShlIntAPUint32: |
33117 | Text.Op = PrintName("ShlIntAPUint32" ); |
33118 | break; |
33119 | case OP_ShlIntAPSint64: |
33120 | Text.Op = PrintName("ShlIntAPSint64" ); |
33121 | break; |
33122 | case OP_ShlIntAPUint64: |
33123 | Text.Op = PrintName("ShlIntAPUint64" ); |
33124 | break; |
33125 | case OP_ShlIntAPIntAP: |
33126 | Text.Op = PrintName("ShlIntAPIntAP" ); |
33127 | break; |
33128 | case OP_ShlIntAPIntAPS: |
33129 | Text.Op = PrintName("ShlIntAPIntAPS" ); |
33130 | break; |
33131 | case OP_ShlIntAPSSint8: |
33132 | Text.Op = PrintName("ShlIntAPSSint8" ); |
33133 | break; |
33134 | case OP_ShlIntAPSUint8: |
33135 | Text.Op = PrintName("ShlIntAPSUint8" ); |
33136 | break; |
33137 | case OP_ShlIntAPSSint16: |
33138 | Text.Op = PrintName("ShlIntAPSSint16" ); |
33139 | break; |
33140 | case OP_ShlIntAPSUint16: |
33141 | Text.Op = PrintName("ShlIntAPSUint16" ); |
33142 | break; |
33143 | case OP_ShlIntAPSSint32: |
33144 | Text.Op = PrintName("ShlIntAPSSint32" ); |
33145 | break; |
33146 | case OP_ShlIntAPSUint32: |
33147 | Text.Op = PrintName("ShlIntAPSUint32" ); |
33148 | break; |
33149 | case OP_ShlIntAPSSint64: |
33150 | Text.Op = PrintName("ShlIntAPSSint64" ); |
33151 | break; |
33152 | case OP_ShlIntAPSUint64: |
33153 | Text.Op = PrintName("ShlIntAPSUint64" ); |
33154 | break; |
33155 | case OP_ShlIntAPSIntAP: |
33156 | Text.Op = PrintName("ShlIntAPSIntAP" ); |
33157 | break; |
33158 | case OP_ShlIntAPSIntAPS: |
33159 | Text.Op = PrintName("ShlIntAPSIntAPS" ); |
33160 | break; |
33161 | #endif |
33162 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
33163 | bool emitShlSint8Sint8(const SourceInfo &); |
33164 | bool emitShlSint8Uint8(const SourceInfo &); |
33165 | bool emitShlSint8Sint16(const SourceInfo &); |
33166 | bool emitShlSint8Uint16(const SourceInfo &); |
33167 | bool emitShlSint8Sint32(const SourceInfo &); |
33168 | bool emitShlSint8Uint32(const SourceInfo &); |
33169 | bool emitShlSint8Sint64(const SourceInfo &); |
33170 | bool emitShlSint8Uint64(const SourceInfo &); |
33171 | bool emitShlSint8IntAP(const SourceInfo &); |
33172 | bool emitShlSint8IntAPS(const SourceInfo &); |
33173 | bool emitShlUint8Sint8(const SourceInfo &); |
33174 | bool emitShlUint8Uint8(const SourceInfo &); |
33175 | bool emitShlUint8Sint16(const SourceInfo &); |
33176 | bool emitShlUint8Uint16(const SourceInfo &); |
33177 | bool emitShlUint8Sint32(const SourceInfo &); |
33178 | bool emitShlUint8Uint32(const SourceInfo &); |
33179 | bool emitShlUint8Sint64(const SourceInfo &); |
33180 | bool emitShlUint8Uint64(const SourceInfo &); |
33181 | bool emitShlUint8IntAP(const SourceInfo &); |
33182 | bool emitShlUint8IntAPS(const SourceInfo &); |
33183 | bool emitShlSint16Sint8(const SourceInfo &); |
33184 | bool emitShlSint16Uint8(const SourceInfo &); |
33185 | bool emitShlSint16Sint16(const SourceInfo &); |
33186 | bool emitShlSint16Uint16(const SourceInfo &); |
33187 | bool emitShlSint16Sint32(const SourceInfo &); |
33188 | bool emitShlSint16Uint32(const SourceInfo &); |
33189 | bool emitShlSint16Sint64(const SourceInfo &); |
33190 | bool emitShlSint16Uint64(const SourceInfo &); |
33191 | bool emitShlSint16IntAP(const SourceInfo &); |
33192 | bool emitShlSint16IntAPS(const SourceInfo &); |
33193 | bool emitShlUint16Sint8(const SourceInfo &); |
33194 | bool emitShlUint16Uint8(const SourceInfo &); |
33195 | bool emitShlUint16Sint16(const SourceInfo &); |
33196 | bool emitShlUint16Uint16(const SourceInfo &); |
33197 | bool emitShlUint16Sint32(const SourceInfo &); |
33198 | bool emitShlUint16Uint32(const SourceInfo &); |
33199 | bool emitShlUint16Sint64(const SourceInfo &); |
33200 | bool emitShlUint16Uint64(const SourceInfo &); |
33201 | bool emitShlUint16IntAP(const SourceInfo &); |
33202 | bool emitShlUint16IntAPS(const SourceInfo &); |
33203 | bool emitShlSint32Sint8(const SourceInfo &); |
33204 | bool emitShlSint32Uint8(const SourceInfo &); |
33205 | bool emitShlSint32Sint16(const SourceInfo &); |
33206 | bool emitShlSint32Uint16(const SourceInfo &); |
33207 | bool emitShlSint32Sint32(const SourceInfo &); |
33208 | bool emitShlSint32Uint32(const SourceInfo &); |
33209 | bool emitShlSint32Sint64(const SourceInfo &); |
33210 | bool emitShlSint32Uint64(const SourceInfo &); |
33211 | bool emitShlSint32IntAP(const SourceInfo &); |
33212 | bool emitShlSint32IntAPS(const SourceInfo &); |
33213 | bool emitShlUint32Sint8(const SourceInfo &); |
33214 | bool emitShlUint32Uint8(const SourceInfo &); |
33215 | bool emitShlUint32Sint16(const SourceInfo &); |
33216 | bool emitShlUint32Uint16(const SourceInfo &); |
33217 | bool emitShlUint32Sint32(const SourceInfo &); |
33218 | bool emitShlUint32Uint32(const SourceInfo &); |
33219 | bool emitShlUint32Sint64(const SourceInfo &); |
33220 | bool emitShlUint32Uint64(const SourceInfo &); |
33221 | bool emitShlUint32IntAP(const SourceInfo &); |
33222 | bool emitShlUint32IntAPS(const SourceInfo &); |
33223 | bool emitShlSint64Sint8(const SourceInfo &); |
33224 | bool emitShlSint64Uint8(const SourceInfo &); |
33225 | bool emitShlSint64Sint16(const SourceInfo &); |
33226 | bool emitShlSint64Uint16(const SourceInfo &); |
33227 | bool emitShlSint64Sint32(const SourceInfo &); |
33228 | bool emitShlSint64Uint32(const SourceInfo &); |
33229 | bool emitShlSint64Sint64(const SourceInfo &); |
33230 | bool emitShlSint64Uint64(const SourceInfo &); |
33231 | bool emitShlSint64IntAP(const SourceInfo &); |
33232 | bool emitShlSint64IntAPS(const SourceInfo &); |
33233 | bool emitShlUint64Sint8(const SourceInfo &); |
33234 | bool emitShlUint64Uint8(const SourceInfo &); |
33235 | bool emitShlUint64Sint16(const SourceInfo &); |
33236 | bool emitShlUint64Uint16(const SourceInfo &); |
33237 | bool emitShlUint64Sint32(const SourceInfo &); |
33238 | bool emitShlUint64Uint32(const SourceInfo &); |
33239 | bool emitShlUint64Sint64(const SourceInfo &); |
33240 | bool emitShlUint64Uint64(const SourceInfo &); |
33241 | bool emitShlUint64IntAP(const SourceInfo &); |
33242 | bool emitShlUint64IntAPS(const SourceInfo &); |
33243 | bool emitShlIntAPSint8(const SourceInfo &); |
33244 | bool emitShlIntAPUint8(const SourceInfo &); |
33245 | bool emitShlIntAPSint16(const SourceInfo &); |
33246 | bool emitShlIntAPUint16(const SourceInfo &); |
33247 | bool emitShlIntAPSint32(const SourceInfo &); |
33248 | bool emitShlIntAPUint32(const SourceInfo &); |
33249 | bool emitShlIntAPSint64(const SourceInfo &); |
33250 | bool emitShlIntAPUint64(const SourceInfo &); |
33251 | bool emitShlIntAPIntAP(const SourceInfo &); |
33252 | bool emitShlIntAPIntAPS(const SourceInfo &); |
33253 | bool emitShlIntAPSSint8(const SourceInfo &); |
33254 | bool emitShlIntAPSUint8(const SourceInfo &); |
33255 | bool emitShlIntAPSSint16(const SourceInfo &); |
33256 | bool emitShlIntAPSUint16(const SourceInfo &); |
33257 | bool emitShlIntAPSSint32(const SourceInfo &); |
33258 | bool emitShlIntAPSUint32(const SourceInfo &); |
33259 | bool emitShlIntAPSSint64(const SourceInfo &); |
33260 | bool emitShlIntAPSUint64(const SourceInfo &); |
33261 | bool emitShlIntAPSIntAP(const SourceInfo &); |
33262 | bool emitShlIntAPSIntAPS(const SourceInfo &); |
33263 | #endif |
33264 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
33265 | [[nodiscard]] bool emitShl(PrimType, PrimType, const SourceInfo &I); |
33266 | #endif |
33267 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
33268 | bool |
33269 | #if defined(GET_EVAL_IMPL) |
33270 | EvalEmitter |
33271 | #else |
33272 | ByteCodeEmitter |
33273 | #endif |
33274 | ::emitShl(PrimType T0, PrimType T1, const SourceInfo &I) { |
33275 | switch (T0) { |
33276 | case PT_Sint8: |
33277 | switch (T1) { |
33278 | case PT_Sint8: |
33279 | return emitShlSint8Sint8(I); |
33280 | case PT_Uint8: |
33281 | return emitShlSint8Uint8(I); |
33282 | case PT_Sint16: |
33283 | return emitShlSint8Sint16(I); |
33284 | case PT_Uint16: |
33285 | return emitShlSint8Uint16(I); |
33286 | case PT_Sint32: |
33287 | return emitShlSint8Sint32(I); |
33288 | case PT_Uint32: |
33289 | return emitShlSint8Uint32(I); |
33290 | case PT_Sint64: |
33291 | return emitShlSint8Sint64(I); |
33292 | case PT_Uint64: |
33293 | return emitShlSint8Uint64(I); |
33294 | case PT_IntAP: |
33295 | return emitShlSint8IntAP(I); |
33296 | case PT_IntAPS: |
33297 | return emitShlSint8IntAPS(I); |
33298 | default: llvm_unreachable("invalid type: emitShl" ); |
33299 | } |
33300 | llvm_unreachable("invalid enum value" ); |
33301 | case PT_Uint8: |
33302 | switch (T1) { |
33303 | case PT_Sint8: |
33304 | return emitShlUint8Sint8(I); |
33305 | case PT_Uint8: |
33306 | return emitShlUint8Uint8(I); |
33307 | case PT_Sint16: |
33308 | return emitShlUint8Sint16(I); |
33309 | case PT_Uint16: |
33310 | return emitShlUint8Uint16(I); |
33311 | case PT_Sint32: |
33312 | return emitShlUint8Sint32(I); |
33313 | case PT_Uint32: |
33314 | return emitShlUint8Uint32(I); |
33315 | case PT_Sint64: |
33316 | return emitShlUint8Sint64(I); |
33317 | case PT_Uint64: |
33318 | return emitShlUint8Uint64(I); |
33319 | case PT_IntAP: |
33320 | return emitShlUint8IntAP(I); |
33321 | case PT_IntAPS: |
33322 | return emitShlUint8IntAPS(I); |
33323 | default: llvm_unreachable("invalid type: emitShl" ); |
33324 | } |
33325 | llvm_unreachable("invalid enum value" ); |
33326 | case PT_Sint16: |
33327 | switch (T1) { |
33328 | case PT_Sint8: |
33329 | return emitShlSint16Sint8(I); |
33330 | case PT_Uint8: |
33331 | return emitShlSint16Uint8(I); |
33332 | case PT_Sint16: |
33333 | return emitShlSint16Sint16(I); |
33334 | case PT_Uint16: |
33335 | return emitShlSint16Uint16(I); |
33336 | case PT_Sint32: |
33337 | return emitShlSint16Sint32(I); |
33338 | case PT_Uint32: |
33339 | return emitShlSint16Uint32(I); |
33340 | case PT_Sint64: |
33341 | return emitShlSint16Sint64(I); |
33342 | case PT_Uint64: |
33343 | return emitShlSint16Uint64(I); |
33344 | case PT_IntAP: |
33345 | return emitShlSint16IntAP(I); |
33346 | case PT_IntAPS: |
33347 | return emitShlSint16IntAPS(I); |
33348 | default: llvm_unreachable("invalid type: emitShl" ); |
33349 | } |
33350 | llvm_unreachable("invalid enum value" ); |
33351 | case PT_Uint16: |
33352 | switch (T1) { |
33353 | case PT_Sint8: |
33354 | return emitShlUint16Sint8(I); |
33355 | case PT_Uint8: |
33356 | return emitShlUint16Uint8(I); |
33357 | case PT_Sint16: |
33358 | return emitShlUint16Sint16(I); |
33359 | case PT_Uint16: |
33360 | return emitShlUint16Uint16(I); |
33361 | case PT_Sint32: |
33362 | return emitShlUint16Sint32(I); |
33363 | case PT_Uint32: |
33364 | return emitShlUint16Uint32(I); |
33365 | case PT_Sint64: |
33366 | return emitShlUint16Sint64(I); |
33367 | case PT_Uint64: |
33368 | return emitShlUint16Uint64(I); |
33369 | case PT_IntAP: |
33370 | return emitShlUint16IntAP(I); |
33371 | case PT_IntAPS: |
33372 | return emitShlUint16IntAPS(I); |
33373 | default: llvm_unreachable("invalid type: emitShl" ); |
33374 | } |
33375 | llvm_unreachable("invalid enum value" ); |
33376 | case PT_Sint32: |
33377 | switch (T1) { |
33378 | case PT_Sint8: |
33379 | return emitShlSint32Sint8(I); |
33380 | case PT_Uint8: |
33381 | return emitShlSint32Uint8(I); |
33382 | case PT_Sint16: |
33383 | return emitShlSint32Sint16(I); |
33384 | case PT_Uint16: |
33385 | return emitShlSint32Uint16(I); |
33386 | case PT_Sint32: |
33387 | return emitShlSint32Sint32(I); |
33388 | case PT_Uint32: |
33389 | return emitShlSint32Uint32(I); |
33390 | case PT_Sint64: |
33391 | return emitShlSint32Sint64(I); |
33392 | case PT_Uint64: |
33393 | return emitShlSint32Uint64(I); |
33394 | case PT_IntAP: |
33395 | return emitShlSint32IntAP(I); |
33396 | case PT_IntAPS: |
33397 | return emitShlSint32IntAPS(I); |
33398 | default: llvm_unreachable("invalid type: emitShl" ); |
33399 | } |
33400 | llvm_unreachable("invalid enum value" ); |
33401 | case PT_Uint32: |
33402 | switch (T1) { |
33403 | case PT_Sint8: |
33404 | return emitShlUint32Sint8(I); |
33405 | case PT_Uint8: |
33406 | return emitShlUint32Uint8(I); |
33407 | case PT_Sint16: |
33408 | return emitShlUint32Sint16(I); |
33409 | case PT_Uint16: |
33410 | return emitShlUint32Uint16(I); |
33411 | case PT_Sint32: |
33412 | return emitShlUint32Sint32(I); |
33413 | case PT_Uint32: |
33414 | return emitShlUint32Uint32(I); |
33415 | case PT_Sint64: |
33416 | return emitShlUint32Sint64(I); |
33417 | case PT_Uint64: |
33418 | return emitShlUint32Uint64(I); |
33419 | case PT_IntAP: |
33420 | return emitShlUint32IntAP(I); |
33421 | case PT_IntAPS: |
33422 | return emitShlUint32IntAPS(I); |
33423 | default: llvm_unreachable("invalid type: emitShl" ); |
33424 | } |
33425 | llvm_unreachable("invalid enum value" ); |
33426 | case PT_Sint64: |
33427 | switch (T1) { |
33428 | case PT_Sint8: |
33429 | return emitShlSint64Sint8(I); |
33430 | case PT_Uint8: |
33431 | return emitShlSint64Uint8(I); |
33432 | case PT_Sint16: |
33433 | return emitShlSint64Sint16(I); |
33434 | case PT_Uint16: |
33435 | return emitShlSint64Uint16(I); |
33436 | case PT_Sint32: |
33437 | return emitShlSint64Sint32(I); |
33438 | case PT_Uint32: |
33439 | return emitShlSint64Uint32(I); |
33440 | case PT_Sint64: |
33441 | return emitShlSint64Sint64(I); |
33442 | case PT_Uint64: |
33443 | return emitShlSint64Uint64(I); |
33444 | case PT_IntAP: |
33445 | return emitShlSint64IntAP(I); |
33446 | case PT_IntAPS: |
33447 | return emitShlSint64IntAPS(I); |
33448 | default: llvm_unreachable("invalid type: emitShl" ); |
33449 | } |
33450 | llvm_unreachable("invalid enum value" ); |
33451 | case PT_Uint64: |
33452 | switch (T1) { |
33453 | case PT_Sint8: |
33454 | return emitShlUint64Sint8(I); |
33455 | case PT_Uint8: |
33456 | return emitShlUint64Uint8(I); |
33457 | case PT_Sint16: |
33458 | return emitShlUint64Sint16(I); |
33459 | case PT_Uint16: |
33460 | return emitShlUint64Uint16(I); |
33461 | case PT_Sint32: |
33462 | return emitShlUint64Sint32(I); |
33463 | case PT_Uint32: |
33464 | return emitShlUint64Uint32(I); |
33465 | case PT_Sint64: |
33466 | return emitShlUint64Sint64(I); |
33467 | case PT_Uint64: |
33468 | return emitShlUint64Uint64(I); |
33469 | case PT_IntAP: |
33470 | return emitShlUint64IntAP(I); |
33471 | case PT_IntAPS: |
33472 | return emitShlUint64IntAPS(I); |
33473 | default: llvm_unreachable("invalid type: emitShl" ); |
33474 | } |
33475 | llvm_unreachable("invalid enum value" ); |
33476 | case PT_IntAP: |
33477 | switch (T1) { |
33478 | case PT_Sint8: |
33479 | return emitShlIntAPSint8(I); |
33480 | case PT_Uint8: |
33481 | return emitShlIntAPUint8(I); |
33482 | case PT_Sint16: |
33483 | return emitShlIntAPSint16(I); |
33484 | case PT_Uint16: |
33485 | return emitShlIntAPUint16(I); |
33486 | case PT_Sint32: |
33487 | return emitShlIntAPSint32(I); |
33488 | case PT_Uint32: |
33489 | return emitShlIntAPUint32(I); |
33490 | case PT_Sint64: |
33491 | return emitShlIntAPSint64(I); |
33492 | case PT_Uint64: |
33493 | return emitShlIntAPUint64(I); |
33494 | case PT_IntAP: |
33495 | return emitShlIntAPIntAP(I); |
33496 | case PT_IntAPS: |
33497 | return emitShlIntAPIntAPS(I); |
33498 | default: llvm_unreachable("invalid type: emitShl" ); |
33499 | } |
33500 | llvm_unreachable("invalid enum value" ); |
33501 | case PT_IntAPS: |
33502 | switch (T1) { |
33503 | case PT_Sint8: |
33504 | return emitShlIntAPSSint8(I); |
33505 | case PT_Uint8: |
33506 | return emitShlIntAPSUint8(I); |
33507 | case PT_Sint16: |
33508 | return emitShlIntAPSSint16(I); |
33509 | case PT_Uint16: |
33510 | return emitShlIntAPSUint16(I); |
33511 | case PT_Sint32: |
33512 | return emitShlIntAPSSint32(I); |
33513 | case PT_Uint32: |
33514 | return emitShlIntAPSUint32(I); |
33515 | case PT_Sint64: |
33516 | return emitShlIntAPSSint64(I); |
33517 | case PT_Uint64: |
33518 | return emitShlIntAPSUint64(I); |
33519 | case PT_IntAP: |
33520 | return emitShlIntAPSIntAP(I); |
33521 | case PT_IntAPS: |
33522 | return emitShlIntAPSIntAPS(I); |
33523 | default: llvm_unreachable("invalid type: emitShl" ); |
33524 | } |
33525 | llvm_unreachable("invalid enum value" ); |
33526 | default: llvm_unreachable("invalid type: emitShl" ); |
33527 | } |
33528 | llvm_unreachable("invalid enum value" ); |
33529 | } |
33530 | #endif |
33531 | #ifdef GET_LINK_IMPL |
33532 | bool ByteCodeEmitter::emitShlSint8Sint8(const SourceInfo &L) { |
33533 | return emitOp<>(OP_ShlSint8Sint8, L); |
33534 | } |
33535 | bool ByteCodeEmitter::emitShlSint8Uint8(const SourceInfo &L) { |
33536 | return emitOp<>(OP_ShlSint8Uint8, L); |
33537 | } |
33538 | bool ByteCodeEmitter::emitShlSint8Sint16(const SourceInfo &L) { |
33539 | return emitOp<>(OP_ShlSint8Sint16, L); |
33540 | } |
33541 | bool ByteCodeEmitter::emitShlSint8Uint16(const SourceInfo &L) { |
33542 | return emitOp<>(OP_ShlSint8Uint16, L); |
33543 | } |
33544 | bool ByteCodeEmitter::emitShlSint8Sint32(const SourceInfo &L) { |
33545 | return emitOp<>(OP_ShlSint8Sint32, L); |
33546 | } |
33547 | bool ByteCodeEmitter::emitShlSint8Uint32(const SourceInfo &L) { |
33548 | return emitOp<>(OP_ShlSint8Uint32, L); |
33549 | } |
33550 | bool ByteCodeEmitter::emitShlSint8Sint64(const SourceInfo &L) { |
33551 | return emitOp<>(OP_ShlSint8Sint64, L); |
33552 | } |
33553 | bool ByteCodeEmitter::emitShlSint8Uint64(const SourceInfo &L) { |
33554 | return emitOp<>(OP_ShlSint8Uint64, L); |
33555 | } |
33556 | bool ByteCodeEmitter::emitShlSint8IntAP(const SourceInfo &L) { |
33557 | return emitOp<>(OP_ShlSint8IntAP, L); |
33558 | } |
33559 | bool ByteCodeEmitter::emitShlSint8IntAPS(const SourceInfo &L) { |
33560 | return emitOp<>(OP_ShlSint8IntAPS, L); |
33561 | } |
33562 | bool ByteCodeEmitter::emitShlUint8Sint8(const SourceInfo &L) { |
33563 | return emitOp<>(OP_ShlUint8Sint8, L); |
33564 | } |
33565 | bool ByteCodeEmitter::emitShlUint8Uint8(const SourceInfo &L) { |
33566 | return emitOp<>(OP_ShlUint8Uint8, L); |
33567 | } |
33568 | bool ByteCodeEmitter::emitShlUint8Sint16(const SourceInfo &L) { |
33569 | return emitOp<>(OP_ShlUint8Sint16, L); |
33570 | } |
33571 | bool ByteCodeEmitter::emitShlUint8Uint16(const SourceInfo &L) { |
33572 | return emitOp<>(OP_ShlUint8Uint16, L); |
33573 | } |
33574 | bool ByteCodeEmitter::emitShlUint8Sint32(const SourceInfo &L) { |
33575 | return emitOp<>(OP_ShlUint8Sint32, L); |
33576 | } |
33577 | bool ByteCodeEmitter::emitShlUint8Uint32(const SourceInfo &L) { |
33578 | return emitOp<>(OP_ShlUint8Uint32, L); |
33579 | } |
33580 | bool ByteCodeEmitter::emitShlUint8Sint64(const SourceInfo &L) { |
33581 | return emitOp<>(OP_ShlUint8Sint64, L); |
33582 | } |
33583 | bool ByteCodeEmitter::emitShlUint8Uint64(const SourceInfo &L) { |
33584 | return emitOp<>(OP_ShlUint8Uint64, L); |
33585 | } |
33586 | bool ByteCodeEmitter::emitShlUint8IntAP(const SourceInfo &L) { |
33587 | return emitOp<>(OP_ShlUint8IntAP, L); |
33588 | } |
33589 | bool ByteCodeEmitter::emitShlUint8IntAPS(const SourceInfo &L) { |
33590 | return emitOp<>(OP_ShlUint8IntAPS, L); |
33591 | } |
33592 | bool ByteCodeEmitter::emitShlSint16Sint8(const SourceInfo &L) { |
33593 | return emitOp<>(OP_ShlSint16Sint8, L); |
33594 | } |
33595 | bool ByteCodeEmitter::emitShlSint16Uint8(const SourceInfo &L) { |
33596 | return emitOp<>(OP_ShlSint16Uint8, L); |
33597 | } |
33598 | bool ByteCodeEmitter::emitShlSint16Sint16(const SourceInfo &L) { |
33599 | return emitOp<>(OP_ShlSint16Sint16, L); |
33600 | } |
33601 | bool ByteCodeEmitter::emitShlSint16Uint16(const SourceInfo &L) { |
33602 | return emitOp<>(OP_ShlSint16Uint16, L); |
33603 | } |
33604 | bool ByteCodeEmitter::emitShlSint16Sint32(const SourceInfo &L) { |
33605 | return emitOp<>(OP_ShlSint16Sint32, L); |
33606 | } |
33607 | bool ByteCodeEmitter::emitShlSint16Uint32(const SourceInfo &L) { |
33608 | return emitOp<>(OP_ShlSint16Uint32, L); |
33609 | } |
33610 | bool ByteCodeEmitter::emitShlSint16Sint64(const SourceInfo &L) { |
33611 | return emitOp<>(OP_ShlSint16Sint64, L); |
33612 | } |
33613 | bool ByteCodeEmitter::emitShlSint16Uint64(const SourceInfo &L) { |
33614 | return emitOp<>(OP_ShlSint16Uint64, L); |
33615 | } |
33616 | bool ByteCodeEmitter::emitShlSint16IntAP(const SourceInfo &L) { |
33617 | return emitOp<>(OP_ShlSint16IntAP, L); |
33618 | } |
33619 | bool ByteCodeEmitter::emitShlSint16IntAPS(const SourceInfo &L) { |
33620 | return emitOp<>(OP_ShlSint16IntAPS, L); |
33621 | } |
33622 | bool ByteCodeEmitter::emitShlUint16Sint8(const SourceInfo &L) { |
33623 | return emitOp<>(OP_ShlUint16Sint8, L); |
33624 | } |
33625 | bool ByteCodeEmitter::emitShlUint16Uint8(const SourceInfo &L) { |
33626 | return emitOp<>(OP_ShlUint16Uint8, L); |
33627 | } |
33628 | bool ByteCodeEmitter::emitShlUint16Sint16(const SourceInfo &L) { |
33629 | return emitOp<>(OP_ShlUint16Sint16, L); |
33630 | } |
33631 | bool ByteCodeEmitter::emitShlUint16Uint16(const SourceInfo &L) { |
33632 | return emitOp<>(OP_ShlUint16Uint16, L); |
33633 | } |
33634 | bool ByteCodeEmitter::emitShlUint16Sint32(const SourceInfo &L) { |
33635 | return emitOp<>(OP_ShlUint16Sint32, L); |
33636 | } |
33637 | bool ByteCodeEmitter::emitShlUint16Uint32(const SourceInfo &L) { |
33638 | return emitOp<>(OP_ShlUint16Uint32, L); |
33639 | } |
33640 | bool ByteCodeEmitter::emitShlUint16Sint64(const SourceInfo &L) { |
33641 | return emitOp<>(OP_ShlUint16Sint64, L); |
33642 | } |
33643 | bool ByteCodeEmitter::emitShlUint16Uint64(const SourceInfo &L) { |
33644 | return emitOp<>(OP_ShlUint16Uint64, L); |
33645 | } |
33646 | bool ByteCodeEmitter::emitShlUint16IntAP(const SourceInfo &L) { |
33647 | return emitOp<>(OP_ShlUint16IntAP, L); |
33648 | } |
33649 | bool ByteCodeEmitter::emitShlUint16IntAPS(const SourceInfo &L) { |
33650 | return emitOp<>(OP_ShlUint16IntAPS, L); |
33651 | } |
33652 | bool ByteCodeEmitter::emitShlSint32Sint8(const SourceInfo &L) { |
33653 | return emitOp<>(OP_ShlSint32Sint8, L); |
33654 | } |
33655 | bool ByteCodeEmitter::emitShlSint32Uint8(const SourceInfo &L) { |
33656 | return emitOp<>(OP_ShlSint32Uint8, L); |
33657 | } |
33658 | bool ByteCodeEmitter::emitShlSint32Sint16(const SourceInfo &L) { |
33659 | return emitOp<>(OP_ShlSint32Sint16, L); |
33660 | } |
33661 | bool ByteCodeEmitter::emitShlSint32Uint16(const SourceInfo &L) { |
33662 | return emitOp<>(OP_ShlSint32Uint16, L); |
33663 | } |
33664 | bool ByteCodeEmitter::emitShlSint32Sint32(const SourceInfo &L) { |
33665 | return emitOp<>(OP_ShlSint32Sint32, L); |
33666 | } |
33667 | bool ByteCodeEmitter::emitShlSint32Uint32(const SourceInfo &L) { |
33668 | return emitOp<>(OP_ShlSint32Uint32, L); |
33669 | } |
33670 | bool ByteCodeEmitter::emitShlSint32Sint64(const SourceInfo &L) { |
33671 | return emitOp<>(OP_ShlSint32Sint64, L); |
33672 | } |
33673 | bool ByteCodeEmitter::emitShlSint32Uint64(const SourceInfo &L) { |
33674 | return emitOp<>(OP_ShlSint32Uint64, L); |
33675 | } |
33676 | bool ByteCodeEmitter::emitShlSint32IntAP(const SourceInfo &L) { |
33677 | return emitOp<>(OP_ShlSint32IntAP, L); |
33678 | } |
33679 | bool ByteCodeEmitter::emitShlSint32IntAPS(const SourceInfo &L) { |
33680 | return emitOp<>(OP_ShlSint32IntAPS, L); |
33681 | } |
33682 | bool ByteCodeEmitter::emitShlUint32Sint8(const SourceInfo &L) { |
33683 | return emitOp<>(OP_ShlUint32Sint8, L); |
33684 | } |
33685 | bool ByteCodeEmitter::emitShlUint32Uint8(const SourceInfo &L) { |
33686 | return emitOp<>(OP_ShlUint32Uint8, L); |
33687 | } |
33688 | bool ByteCodeEmitter::emitShlUint32Sint16(const SourceInfo &L) { |
33689 | return emitOp<>(OP_ShlUint32Sint16, L); |
33690 | } |
33691 | bool ByteCodeEmitter::emitShlUint32Uint16(const SourceInfo &L) { |
33692 | return emitOp<>(OP_ShlUint32Uint16, L); |
33693 | } |
33694 | bool ByteCodeEmitter::emitShlUint32Sint32(const SourceInfo &L) { |
33695 | return emitOp<>(OP_ShlUint32Sint32, L); |
33696 | } |
33697 | bool ByteCodeEmitter::emitShlUint32Uint32(const SourceInfo &L) { |
33698 | return emitOp<>(OP_ShlUint32Uint32, L); |
33699 | } |
33700 | bool ByteCodeEmitter::emitShlUint32Sint64(const SourceInfo &L) { |
33701 | return emitOp<>(OP_ShlUint32Sint64, L); |
33702 | } |
33703 | bool ByteCodeEmitter::emitShlUint32Uint64(const SourceInfo &L) { |
33704 | return emitOp<>(OP_ShlUint32Uint64, L); |
33705 | } |
33706 | bool ByteCodeEmitter::emitShlUint32IntAP(const SourceInfo &L) { |
33707 | return emitOp<>(OP_ShlUint32IntAP, L); |
33708 | } |
33709 | bool ByteCodeEmitter::emitShlUint32IntAPS(const SourceInfo &L) { |
33710 | return emitOp<>(OP_ShlUint32IntAPS, L); |
33711 | } |
33712 | bool ByteCodeEmitter::emitShlSint64Sint8(const SourceInfo &L) { |
33713 | return emitOp<>(OP_ShlSint64Sint8, L); |
33714 | } |
33715 | bool ByteCodeEmitter::emitShlSint64Uint8(const SourceInfo &L) { |
33716 | return emitOp<>(OP_ShlSint64Uint8, L); |
33717 | } |
33718 | bool ByteCodeEmitter::emitShlSint64Sint16(const SourceInfo &L) { |
33719 | return emitOp<>(OP_ShlSint64Sint16, L); |
33720 | } |
33721 | bool ByteCodeEmitter::emitShlSint64Uint16(const SourceInfo &L) { |
33722 | return emitOp<>(OP_ShlSint64Uint16, L); |
33723 | } |
33724 | bool ByteCodeEmitter::emitShlSint64Sint32(const SourceInfo &L) { |
33725 | return emitOp<>(OP_ShlSint64Sint32, L); |
33726 | } |
33727 | bool ByteCodeEmitter::emitShlSint64Uint32(const SourceInfo &L) { |
33728 | return emitOp<>(OP_ShlSint64Uint32, L); |
33729 | } |
33730 | bool ByteCodeEmitter::emitShlSint64Sint64(const SourceInfo &L) { |
33731 | return emitOp<>(OP_ShlSint64Sint64, L); |
33732 | } |
33733 | bool ByteCodeEmitter::emitShlSint64Uint64(const SourceInfo &L) { |
33734 | return emitOp<>(OP_ShlSint64Uint64, L); |
33735 | } |
33736 | bool ByteCodeEmitter::emitShlSint64IntAP(const SourceInfo &L) { |
33737 | return emitOp<>(OP_ShlSint64IntAP, L); |
33738 | } |
33739 | bool ByteCodeEmitter::emitShlSint64IntAPS(const SourceInfo &L) { |
33740 | return emitOp<>(OP_ShlSint64IntAPS, L); |
33741 | } |
33742 | bool ByteCodeEmitter::emitShlUint64Sint8(const SourceInfo &L) { |
33743 | return emitOp<>(OP_ShlUint64Sint8, L); |
33744 | } |
33745 | bool ByteCodeEmitter::emitShlUint64Uint8(const SourceInfo &L) { |
33746 | return emitOp<>(OP_ShlUint64Uint8, L); |
33747 | } |
33748 | bool ByteCodeEmitter::emitShlUint64Sint16(const SourceInfo &L) { |
33749 | return emitOp<>(OP_ShlUint64Sint16, L); |
33750 | } |
33751 | bool ByteCodeEmitter::emitShlUint64Uint16(const SourceInfo &L) { |
33752 | return emitOp<>(OP_ShlUint64Uint16, L); |
33753 | } |
33754 | bool ByteCodeEmitter::emitShlUint64Sint32(const SourceInfo &L) { |
33755 | return emitOp<>(OP_ShlUint64Sint32, L); |
33756 | } |
33757 | bool ByteCodeEmitter::emitShlUint64Uint32(const SourceInfo &L) { |
33758 | return emitOp<>(OP_ShlUint64Uint32, L); |
33759 | } |
33760 | bool ByteCodeEmitter::emitShlUint64Sint64(const SourceInfo &L) { |
33761 | return emitOp<>(OP_ShlUint64Sint64, L); |
33762 | } |
33763 | bool ByteCodeEmitter::emitShlUint64Uint64(const SourceInfo &L) { |
33764 | return emitOp<>(OP_ShlUint64Uint64, L); |
33765 | } |
33766 | bool ByteCodeEmitter::emitShlUint64IntAP(const SourceInfo &L) { |
33767 | return emitOp<>(OP_ShlUint64IntAP, L); |
33768 | } |
33769 | bool ByteCodeEmitter::emitShlUint64IntAPS(const SourceInfo &L) { |
33770 | return emitOp<>(OP_ShlUint64IntAPS, L); |
33771 | } |
33772 | bool ByteCodeEmitter::emitShlIntAPSint8(const SourceInfo &L) { |
33773 | return emitOp<>(OP_ShlIntAPSint8, L); |
33774 | } |
33775 | bool ByteCodeEmitter::emitShlIntAPUint8(const SourceInfo &L) { |
33776 | return emitOp<>(OP_ShlIntAPUint8, L); |
33777 | } |
33778 | bool ByteCodeEmitter::emitShlIntAPSint16(const SourceInfo &L) { |
33779 | return emitOp<>(OP_ShlIntAPSint16, L); |
33780 | } |
33781 | bool ByteCodeEmitter::emitShlIntAPUint16(const SourceInfo &L) { |
33782 | return emitOp<>(OP_ShlIntAPUint16, L); |
33783 | } |
33784 | bool ByteCodeEmitter::emitShlIntAPSint32(const SourceInfo &L) { |
33785 | return emitOp<>(OP_ShlIntAPSint32, L); |
33786 | } |
33787 | bool ByteCodeEmitter::emitShlIntAPUint32(const SourceInfo &L) { |
33788 | return emitOp<>(OP_ShlIntAPUint32, L); |
33789 | } |
33790 | bool ByteCodeEmitter::emitShlIntAPSint64(const SourceInfo &L) { |
33791 | return emitOp<>(OP_ShlIntAPSint64, L); |
33792 | } |
33793 | bool ByteCodeEmitter::emitShlIntAPUint64(const SourceInfo &L) { |
33794 | return emitOp<>(OP_ShlIntAPUint64, L); |
33795 | } |
33796 | bool ByteCodeEmitter::emitShlIntAPIntAP(const SourceInfo &L) { |
33797 | return emitOp<>(OP_ShlIntAPIntAP, L); |
33798 | } |
33799 | bool ByteCodeEmitter::emitShlIntAPIntAPS(const SourceInfo &L) { |
33800 | return emitOp<>(OP_ShlIntAPIntAPS, L); |
33801 | } |
33802 | bool ByteCodeEmitter::emitShlIntAPSSint8(const SourceInfo &L) { |
33803 | return emitOp<>(OP_ShlIntAPSSint8, L); |
33804 | } |
33805 | bool ByteCodeEmitter::emitShlIntAPSUint8(const SourceInfo &L) { |
33806 | return emitOp<>(OP_ShlIntAPSUint8, L); |
33807 | } |
33808 | bool ByteCodeEmitter::emitShlIntAPSSint16(const SourceInfo &L) { |
33809 | return emitOp<>(OP_ShlIntAPSSint16, L); |
33810 | } |
33811 | bool ByteCodeEmitter::emitShlIntAPSUint16(const SourceInfo &L) { |
33812 | return emitOp<>(OP_ShlIntAPSUint16, L); |
33813 | } |
33814 | bool ByteCodeEmitter::emitShlIntAPSSint32(const SourceInfo &L) { |
33815 | return emitOp<>(OP_ShlIntAPSSint32, L); |
33816 | } |
33817 | bool ByteCodeEmitter::emitShlIntAPSUint32(const SourceInfo &L) { |
33818 | return emitOp<>(OP_ShlIntAPSUint32, L); |
33819 | } |
33820 | bool ByteCodeEmitter::emitShlIntAPSSint64(const SourceInfo &L) { |
33821 | return emitOp<>(OP_ShlIntAPSSint64, L); |
33822 | } |
33823 | bool ByteCodeEmitter::emitShlIntAPSUint64(const SourceInfo &L) { |
33824 | return emitOp<>(OP_ShlIntAPSUint64, L); |
33825 | } |
33826 | bool ByteCodeEmitter::emitShlIntAPSIntAP(const SourceInfo &L) { |
33827 | return emitOp<>(OP_ShlIntAPSIntAP, L); |
33828 | } |
33829 | bool ByteCodeEmitter::emitShlIntAPSIntAPS(const SourceInfo &L) { |
33830 | return emitOp<>(OP_ShlIntAPSIntAPS, L); |
33831 | } |
33832 | #endif |
33833 | #ifdef GET_EVAL_IMPL |
33834 | bool EvalEmitter::emitShlSint8Sint8(const SourceInfo &L) { |
33835 | if (!isActive()) return true; |
33836 | CurrentSource = L; |
33837 | return Shl<PT_Sint8, PT_Sint8>(S, OpPC); |
33838 | } |
33839 | bool EvalEmitter::emitShlSint8Uint8(const SourceInfo &L) { |
33840 | if (!isActive()) return true; |
33841 | CurrentSource = L; |
33842 | return Shl<PT_Sint8, PT_Uint8>(S, OpPC); |
33843 | } |
33844 | bool EvalEmitter::emitShlSint8Sint16(const SourceInfo &L) { |
33845 | if (!isActive()) return true; |
33846 | CurrentSource = L; |
33847 | return Shl<PT_Sint8, PT_Sint16>(S, OpPC); |
33848 | } |
33849 | bool EvalEmitter::emitShlSint8Uint16(const SourceInfo &L) { |
33850 | if (!isActive()) return true; |
33851 | CurrentSource = L; |
33852 | return Shl<PT_Sint8, PT_Uint16>(S, OpPC); |
33853 | } |
33854 | bool EvalEmitter::emitShlSint8Sint32(const SourceInfo &L) { |
33855 | if (!isActive()) return true; |
33856 | CurrentSource = L; |
33857 | return Shl<PT_Sint8, PT_Sint32>(S, OpPC); |
33858 | } |
33859 | bool EvalEmitter::emitShlSint8Uint32(const SourceInfo &L) { |
33860 | if (!isActive()) return true; |
33861 | CurrentSource = L; |
33862 | return Shl<PT_Sint8, PT_Uint32>(S, OpPC); |
33863 | } |
33864 | bool EvalEmitter::emitShlSint8Sint64(const SourceInfo &L) { |
33865 | if (!isActive()) return true; |
33866 | CurrentSource = L; |
33867 | return Shl<PT_Sint8, PT_Sint64>(S, OpPC); |
33868 | } |
33869 | bool EvalEmitter::emitShlSint8Uint64(const SourceInfo &L) { |
33870 | if (!isActive()) return true; |
33871 | CurrentSource = L; |
33872 | return Shl<PT_Sint8, PT_Uint64>(S, OpPC); |
33873 | } |
33874 | bool EvalEmitter::emitShlSint8IntAP(const SourceInfo &L) { |
33875 | if (!isActive()) return true; |
33876 | CurrentSource = L; |
33877 | return Shl<PT_Sint8, PT_IntAP>(S, OpPC); |
33878 | } |
33879 | bool EvalEmitter::emitShlSint8IntAPS(const SourceInfo &L) { |
33880 | if (!isActive()) return true; |
33881 | CurrentSource = L; |
33882 | return Shl<PT_Sint8, PT_IntAPS>(S, OpPC); |
33883 | } |
33884 | bool EvalEmitter::emitShlUint8Sint8(const SourceInfo &L) { |
33885 | if (!isActive()) return true; |
33886 | CurrentSource = L; |
33887 | return Shl<PT_Uint8, PT_Sint8>(S, OpPC); |
33888 | } |
33889 | bool EvalEmitter::emitShlUint8Uint8(const SourceInfo &L) { |
33890 | if (!isActive()) return true; |
33891 | CurrentSource = L; |
33892 | return Shl<PT_Uint8, PT_Uint8>(S, OpPC); |
33893 | } |
33894 | bool EvalEmitter::emitShlUint8Sint16(const SourceInfo &L) { |
33895 | if (!isActive()) return true; |
33896 | CurrentSource = L; |
33897 | return Shl<PT_Uint8, PT_Sint16>(S, OpPC); |
33898 | } |
33899 | bool EvalEmitter::emitShlUint8Uint16(const SourceInfo &L) { |
33900 | if (!isActive()) return true; |
33901 | CurrentSource = L; |
33902 | return Shl<PT_Uint8, PT_Uint16>(S, OpPC); |
33903 | } |
33904 | bool EvalEmitter::emitShlUint8Sint32(const SourceInfo &L) { |
33905 | if (!isActive()) return true; |
33906 | CurrentSource = L; |
33907 | return Shl<PT_Uint8, PT_Sint32>(S, OpPC); |
33908 | } |
33909 | bool EvalEmitter::emitShlUint8Uint32(const SourceInfo &L) { |
33910 | if (!isActive()) return true; |
33911 | CurrentSource = L; |
33912 | return Shl<PT_Uint8, PT_Uint32>(S, OpPC); |
33913 | } |
33914 | bool EvalEmitter::emitShlUint8Sint64(const SourceInfo &L) { |
33915 | if (!isActive()) return true; |
33916 | CurrentSource = L; |
33917 | return Shl<PT_Uint8, PT_Sint64>(S, OpPC); |
33918 | } |
33919 | bool EvalEmitter::emitShlUint8Uint64(const SourceInfo &L) { |
33920 | if (!isActive()) return true; |
33921 | CurrentSource = L; |
33922 | return Shl<PT_Uint8, PT_Uint64>(S, OpPC); |
33923 | } |
33924 | bool EvalEmitter::emitShlUint8IntAP(const SourceInfo &L) { |
33925 | if (!isActive()) return true; |
33926 | CurrentSource = L; |
33927 | return Shl<PT_Uint8, PT_IntAP>(S, OpPC); |
33928 | } |
33929 | bool EvalEmitter::emitShlUint8IntAPS(const SourceInfo &L) { |
33930 | if (!isActive()) return true; |
33931 | CurrentSource = L; |
33932 | return Shl<PT_Uint8, PT_IntAPS>(S, OpPC); |
33933 | } |
33934 | bool EvalEmitter::emitShlSint16Sint8(const SourceInfo &L) { |
33935 | if (!isActive()) return true; |
33936 | CurrentSource = L; |
33937 | return Shl<PT_Sint16, PT_Sint8>(S, OpPC); |
33938 | } |
33939 | bool EvalEmitter::emitShlSint16Uint8(const SourceInfo &L) { |
33940 | if (!isActive()) return true; |
33941 | CurrentSource = L; |
33942 | return Shl<PT_Sint16, PT_Uint8>(S, OpPC); |
33943 | } |
33944 | bool EvalEmitter::emitShlSint16Sint16(const SourceInfo &L) { |
33945 | if (!isActive()) return true; |
33946 | CurrentSource = L; |
33947 | return Shl<PT_Sint16, PT_Sint16>(S, OpPC); |
33948 | } |
33949 | bool EvalEmitter::emitShlSint16Uint16(const SourceInfo &L) { |
33950 | if (!isActive()) return true; |
33951 | CurrentSource = L; |
33952 | return Shl<PT_Sint16, PT_Uint16>(S, OpPC); |
33953 | } |
33954 | bool EvalEmitter::emitShlSint16Sint32(const SourceInfo &L) { |
33955 | if (!isActive()) return true; |
33956 | CurrentSource = L; |
33957 | return Shl<PT_Sint16, PT_Sint32>(S, OpPC); |
33958 | } |
33959 | bool EvalEmitter::emitShlSint16Uint32(const SourceInfo &L) { |
33960 | if (!isActive()) return true; |
33961 | CurrentSource = L; |
33962 | return Shl<PT_Sint16, PT_Uint32>(S, OpPC); |
33963 | } |
33964 | bool EvalEmitter::emitShlSint16Sint64(const SourceInfo &L) { |
33965 | if (!isActive()) return true; |
33966 | CurrentSource = L; |
33967 | return Shl<PT_Sint16, PT_Sint64>(S, OpPC); |
33968 | } |
33969 | bool EvalEmitter::emitShlSint16Uint64(const SourceInfo &L) { |
33970 | if (!isActive()) return true; |
33971 | CurrentSource = L; |
33972 | return Shl<PT_Sint16, PT_Uint64>(S, OpPC); |
33973 | } |
33974 | bool EvalEmitter::emitShlSint16IntAP(const SourceInfo &L) { |
33975 | if (!isActive()) return true; |
33976 | CurrentSource = L; |
33977 | return Shl<PT_Sint16, PT_IntAP>(S, OpPC); |
33978 | } |
33979 | bool EvalEmitter::emitShlSint16IntAPS(const SourceInfo &L) { |
33980 | if (!isActive()) return true; |
33981 | CurrentSource = L; |
33982 | return Shl<PT_Sint16, PT_IntAPS>(S, OpPC); |
33983 | } |
33984 | bool EvalEmitter::emitShlUint16Sint8(const SourceInfo &L) { |
33985 | if (!isActive()) return true; |
33986 | CurrentSource = L; |
33987 | return Shl<PT_Uint16, PT_Sint8>(S, OpPC); |
33988 | } |
33989 | bool EvalEmitter::emitShlUint16Uint8(const SourceInfo &L) { |
33990 | if (!isActive()) return true; |
33991 | CurrentSource = L; |
33992 | return Shl<PT_Uint16, PT_Uint8>(S, OpPC); |
33993 | } |
33994 | bool EvalEmitter::emitShlUint16Sint16(const SourceInfo &L) { |
33995 | if (!isActive()) return true; |
33996 | CurrentSource = L; |
33997 | return Shl<PT_Uint16, PT_Sint16>(S, OpPC); |
33998 | } |
33999 | bool EvalEmitter::emitShlUint16Uint16(const SourceInfo &L) { |
34000 | if (!isActive()) return true; |
34001 | CurrentSource = L; |
34002 | return Shl<PT_Uint16, PT_Uint16>(S, OpPC); |
34003 | } |
34004 | bool EvalEmitter::emitShlUint16Sint32(const SourceInfo &L) { |
34005 | if (!isActive()) return true; |
34006 | CurrentSource = L; |
34007 | return Shl<PT_Uint16, PT_Sint32>(S, OpPC); |
34008 | } |
34009 | bool EvalEmitter::emitShlUint16Uint32(const SourceInfo &L) { |
34010 | if (!isActive()) return true; |
34011 | CurrentSource = L; |
34012 | return Shl<PT_Uint16, PT_Uint32>(S, OpPC); |
34013 | } |
34014 | bool EvalEmitter::emitShlUint16Sint64(const SourceInfo &L) { |
34015 | if (!isActive()) return true; |
34016 | CurrentSource = L; |
34017 | return Shl<PT_Uint16, PT_Sint64>(S, OpPC); |
34018 | } |
34019 | bool EvalEmitter::emitShlUint16Uint64(const SourceInfo &L) { |
34020 | if (!isActive()) return true; |
34021 | CurrentSource = L; |
34022 | return Shl<PT_Uint16, PT_Uint64>(S, OpPC); |
34023 | } |
34024 | bool EvalEmitter::emitShlUint16IntAP(const SourceInfo &L) { |
34025 | if (!isActive()) return true; |
34026 | CurrentSource = L; |
34027 | return Shl<PT_Uint16, PT_IntAP>(S, OpPC); |
34028 | } |
34029 | bool EvalEmitter::emitShlUint16IntAPS(const SourceInfo &L) { |
34030 | if (!isActive()) return true; |
34031 | CurrentSource = L; |
34032 | return Shl<PT_Uint16, PT_IntAPS>(S, OpPC); |
34033 | } |
34034 | bool EvalEmitter::emitShlSint32Sint8(const SourceInfo &L) { |
34035 | if (!isActive()) return true; |
34036 | CurrentSource = L; |
34037 | return Shl<PT_Sint32, PT_Sint8>(S, OpPC); |
34038 | } |
34039 | bool EvalEmitter::emitShlSint32Uint8(const SourceInfo &L) { |
34040 | if (!isActive()) return true; |
34041 | CurrentSource = L; |
34042 | return Shl<PT_Sint32, PT_Uint8>(S, OpPC); |
34043 | } |
34044 | bool EvalEmitter::emitShlSint32Sint16(const SourceInfo &L) { |
34045 | if (!isActive()) return true; |
34046 | CurrentSource = L; |
34047 | return Shl<PT_Sint32, PT_Sint16>(S, OpPC); |
34048 | } |
34049 | bool EvalEmitter::emitShlSint32Uint16(const SourceInfo &L) { |
34050 | if (!isActive()) return true; |
34051 | CurrentSource = L; |
34052 | return Shl<PT_Sint32, PT_Uint16>(S, OpPC); |
34053 | } |
34054 | bool EvalEmitter::emitShlSint32Sint32(const SourceInfo &L) { |
34055 | if (!isActive()) return true; |
34056 | CurrentSource = L; |
34057 | return Shl<PT_Sint32, PT_Sint32>(S, OpPC); |
34058 | } |
34059 | bool EvalEmitter::emitShlSint32Uint32(const SourceInfo &L) { |
34060 | if (!isActive()) return true; |
34061 | CurrentSource = L; |
34062 | return Shl<PT_Sint32, PT_Uint32>(S, OpPC); |
34063 | } |
34064 | bool EvalEmitter::emitShlSint32Sint64(const SourceInfo &L) { |
34065 | if (!isActive()) return true; |
34066 | CurrentSource = L; |
34067 | return Shl<PT_Sint32, PT_Sint64>(S, OpPC); |
34068 | } |
34069 | bool EvalEmitter::emitShlSint32Uint64(const SourceInfo &L) { |
34070 | if (!isActive()) return true; |
34071 | CurrentSource = L; |
34072 | return Shl<PT_Sint32, PT_Uint64>(S, OpPC); |
34073 | } |
34074 | bool EvalEmitter::emitShlSint32IntAP(const SourceInfo &L) { |
34075 | if (!isActive()) return true; |
34076 | CurrentSource = L; |
34077 | return Shl<PT_Sint32, PT_IntAP>(S, OpPC); |
34078 | } |
34079 | bool EvalEmitter::emitShlSint32IntAPS(const SourceInfo &L) { |
34080 | if (!isActive()) return true; |
34081 | CurrentSource = L; |
34082 | return Shl<PT_Sint32, PT_IntAPS>(S, OpPC); |
34083 | } |
34084 | bool EvalEmitter::emitShlUint32Sint8(const SourceInfo &L) { |
34085 | if (!isActive()) return true; |
34086 | CurrentSource = L; |
34087 | return Shl<PT_Uint32, PT_Sint8>(S, OpPC); |
34088 | } |
34089 | bool EvalEmitter::emitShlUint32Uint8(const SourceInfo &L) { |
34090 | if (!isActive()) return true; |
34091 | CurrentSource = L; |
34092 | return Shl<PT_Uint32, PT_Uint8>(S, OpPC); |
34093 | } |
34094 | bool EvalEmitter::emitShlUint32Sint16(const SourceInfo &L) { |
34095 | if (!isActive()) return true; |
34096 | CurrentSource = L; |
34097 | return Shl<PT_Uint32, PT_Sint16>(S, OpPC); |
34098 | } |
34099 | bool EvalEmitter::emitShlUint32Uint16(const SourceInfo &L) { |
34100 | if (!isActive()) return true; |
34101 | CurrentSource = L; |
34102 | return Shl<PT_Uint32, PT_Uint16>(S, OpPC); |
34103 | } |
34104 | bool EvalEmitter::emitShlUint32Sint32(const SourceInfo &L) { |
34105 | if (!isActive()) return true; |
34106 | CurrentSource = L; |
34107 | return Shl<PT_Uint32, PT_Sint32>(S, OpPC); |
34108 | } |
34109 | bool EvalEmitter::emitShlUint32Uint32(const SourceInfo &L) { |
34110 | if (!isActive()) return true; |
34111 | CurrentSource = L; |
34112 | return Shl<PT_Uint32, PT_Uint32>(S, OpPC); |
34113 | } |
34114 | bool EvalEmitter::emitShlUint32Sint64(const SourceInfo &L) { |
34115 | if (!isActive()) return true; |
34116 | CurrentSource = L; |
34117 | return Shl<PT_Uint32, PT_Sint64>(S, OpPC); |
34118 | } |
34119 | bool EvalEmitter::emitShlUint32Uint64(const SourceInfo &L) { |
34120 | if (!isActive()) return true; |
34121 | CurrentSource = L; |
34122 | return Shl<PT_Uint32, PT_Uint64>(S, OpPC); |
34123 | } |
34124 | bool EvalEmitter::emitShlUint32IntAP(const SourceInfo &L) { |
34125 | if (!isActive()) return true; |
34126 | CurrentSource = L; |
34127 | return Shl<PT_Uint32, PT_IntAP>(S, OpPC); |
34128 | } |
34129 | bool EvalEmitter::emitShlUint32IntAPS(const SourceInfo &L) { |
34130 | if (!isActive()) return true; |
34131 | CurrentSource = L; |
34132 | return Shl<PT_Uint32, PT_IntAPS>(S, OpPC); |
34133 | } |
34134 | bool EvalEmitter::emitShlSint64Sint8(const SourceInfo &L) { |
34135 | if (!isActive()) return true; |
34136 | CurrentSource = L; |
34137 | return Shl<PT_Sint64, PT_Sint8>(S, OpPC); |
34138 | } |
34139 | bool EvalEmitter::emitShlSint64Uint8(const SourceInfo &L) { |
34140 | if (!isActive()) return true; |
34141 | CurrentSource = L; |
34142 | return Shl<PT_Sint64, PT_Uint8>(S, OpPC); |
34143 | } |
34144 | bool EvalEmitter::emitShlSint64Sint16(const SourceInfo &L) { |
34145 | if (!isActive()) return true; |
34146 | CurrentSource = L; |
34147 | return Shl<PT_Sint64, PT_Sint16>(S, OpPC); |
34148 | } |
34149 | bool EvalEmitter::emitShlSint64Uint16(const SourceInfo &L) { |
34150 | if (!isActive()) return true; |
34151 | CurrentSource = L; |
34152 | return Shl<PT_Sint64, PT_Uint16>(S, OpPC); |
34153 | } |
34154 | bool EvalEmitter::emitShlSint64Sint32(const SourceInfo &L) { |
34155 | if (!isActive()) return true; |
34156 | CurrentSource = L; |
34157 | return Shl<PT_Sint64, PT_Sint32>(S, OpPC); |
34158 | } |
34159 | bool EvalEmitter::emitShlSint64Uint32(const SourceInfo &L) { |
34160 | if (!isActive()) return true; |
34161 | CurrentSource = L; |
34162 | return Shl<PT_Sint64, PT_Uint32>(S, OpPC); |
34163 | } |
34164 | bool EvalEmitter::emitShlSint64Sint64(const SourceInfo &L) { |
34165 | if (!isActive()) return true; |
34166 | CurrentSource = L; |
34167 | return Shl<PT_Sint64, PT_Sint64>(S, OpPC); |
34168 | } |
34169 | bool EvalEmitter::emitShlSint64Uint64(const SourceInfo &L) { |
34170 | if (!isActive()) return true; |
34171 | CurrentSource = L; |
34172 | return Shl<PT_Sint64, PT_Uint64>(S, OpPC); |
34173 | } |
34174 | bool EvalEmitter::emitShlSint64IntAP(const SourceInfo &L) { |
34175 | if (!isActive()) return true; |
34176 | CurrentSource = L; |
34177 | return Shl<PT_Sint64, PT_IntAP>(S, OpPC); |
34178 | } |
34179 | bool EvalEmitter::emitShlSint64IntAPS(const SourceInfo &L) { |
34180 | if (!isActive()) return true; |
34181 | CurrentSource = L; |
34182 | return Shl<PT_Sint64, PT_IntAPS>(S, OpPC); |
34183 | } |
34184 | bool EvalEmitter::emitShlUint64Sint8(const SourceInfo &L) { |
34185 | if (!isActive()) return true; |
34186 | CurrentSource = L; |
34187 | return Shl<PT_Uint64, PT_Sint8>(S, OpPC); |
34188 | } |
34189 | bool EvalEmitter::emitShlUint64Uint8(const SourceInfo &L) { |
34190 | if (!isActive()) return true; |
34191 | CurrentSource = L; |
34192 | return Shl<PT_Uint64, PT_Uint8>(S, OpPC); |
34193 | } |
34194 | bool EvalEmitter::emitShlUint64Sint16(const SourceInfo &L) { |
34195 | if (!isActive()) return true; |
34196 | CurrentSource = L; |
34197 | return Shl<PT_Uint64, PT_Sint16>(S, OpPC); |
34198 | } |
34199 | bool EvalEmitter::emitShlUint64Uint16(const SourceInfo &L) { |
34200 | if (!isActive()) return true; |
34201 | CurrentSource = L; |
34202 | return Shl<PT_Uint64, PT_Uint16>(S, OpPC); |
34203 | } |
34204 | bool EvalEmitter::emitShlUint64Sint32(const SourceInfo &L) { |
34205 | if (!isActive()) return true; |
34206 | CurrentSource = L; |
34207 | return Shl<PT_Uint64, PT_Sint32>(S, OpPC); |
34208 | } |
34209 | bool EvalEmitter::emitShlUint64Uint32(const SourceInfo &L) { |
34210 | if (!isActive()) return true; |
34211 | CurrentSource = L; |
34212 | return Shl<PT_Uint64, PT_Uint32>(S, OpPC); |
34213 | } |
34214 | bool EvalEmitter::emitShlUint64Sint64(const SourceInfo &L) { |
34215 | if (!isActive()) return true; |
34216 | CurrentSource = L; |
34217 | return Shl<PT_Uint64, PT_Sint64>(S, OpPC); |
34218 | } |
34219 | bool EvalEmitter::emitShlUint64Uint64(const SourceInfo &L) { |
34220 | if (!isActive()) return true; |
34221 | CurrentSource = L; |
34222 | return Shl<PT_Uint64, PT_Uint64>(S, OpPC); |
34223 | } |
34224 | bool EvalEmitter::emitShlUint64IntAP(const SourceInfo &L) { |
34225 | if (!isActive()) return true; |
34226 | CurrentSource = L; |
34227 | return Shl<PT_Uint64, PT_IntAP>(S, OpPC); |
34228 | } |
34229 | bool EvalEmitter::emitShlUint64IntAPS(const SourceInfo &L) { |
34230 | if (!isActive()) return true; |
34231 | CurrentSource = L; |
34232 | return Shl<PT_Uint64, PT_IntAPS>(S, OpPC); |
34233 | } |
34234 | bool EvalEmitter::emitShlIntAPSint8(const SourceInfo &L) { |
34235 | if (!isActive()) return true; |
34236 | CurrentSource = L; |
34237 | return Shl<PT_IntAP, PT_Sint8>(S, OpPC); |
34238 | } |
34239 | bool EvalEmitter::emitShlIntAPUint8(const SourceInfo &L) { |
34240 | if (!isActive()) return true; |
34241 | CurrentSource = L; |
34242 | return Shl<PT_IntAP, PT_Uint8>(S, OpPC); |
34243 | } |
34244 | bool EvalEmitter::emitShlIntAPSint16(const SourceInfo &L) { |
34245 | if (!isActive()) return true; |
34246 | CurrentSource = L; |
34247 | return Shl<PT_IntAP, PT_Sint16>(S, OpPC); |
34248 | } |
34249 | bool EvalEmitter::emitShlIntAPUint16(const SourceInfo &L) { |
34250 | if (!isActive()) return true; |
34251 | CurrentSource = L; |
34252 | return Shl<PT_IntAP, PT_Uint16>(S, OpPC); |
34253 | } |
34254 | bool EvalEmitter::emitShlIntAPSint32(const SourceInfo &L) { |
34255 | if (!isActive()) return true; |
34256 | CurrentSource = L; |
34257 | return Shl<PT_IntAP, PT_Sint32>(S, OpPC); |
34258 | } |
34259 | bool EvalEmitter::emitShlIntAPUint32(const SourceInfo &L) { |
34260 | if (!isActive()) return true; |
34261 | CurrentSource = L; |
34262 | return Shl<PT_IntAP, PT_Uint32>(S, OpPC); |
34263 | } |
34264 | bool EvalEmitter::emitShlIntAPSint64(const SourceInfo &L) { |
34265 | if (!isActive()) return true; |
34266 | CurrentSource = L; |
34267 | return Shl<PT_IntAP, PT_Sint64>(S, OpPC); |
34268 | } |
34269 | bool EvalEmitter::emitShlIntAPUint64(const SourceInfo &L) { |
34270 | if (!isActive()) return true; |
34271 | CurrentSource = L; |
34272 | return Shl<PT_IntAP, PT_Uint64>(S, OpPC); |
34273 | } |
34274 | bool EvalEmitter::emitShlIntAPIntAP(const SourceInfo &L) { |
34275 | if (!isActive()) return true; |
34276 | CurrentSource = L; |
34277 | return Shl<PT_IntAP, PT_IntAP>(S, OpPC); |
34278 | } |
34279 | bool EvalEmitter::emitShlIntAPIntAPS(const SourceInfo &L) { |
34280 | if (!isActive()) return true; |
34281 | CurrentSource = L; |
34282 | return Shl<PT_IntAP, PT_IntAPS>(S, OpPC); |
34283 | } |
34284 | bool EvalEmitter::emitShlIntAPSSint8(const SourceInfo &L) { |
34285 | if (!isActive()) return true; |
34286 | CurrentSource = L; |
34287 | return Shl<PT_IntAPS, PT_Sint8>(S, OpPC); |
34288 | } |
34289 | bool EvalEmitter::emitShlIntAPSUint8(const SourceInfo &L) { |
34290 | if (!isActive()) return true; |
34291 | CurrentSource = L; |
34292 | return Shl<PT_IntAPS, PT_Uint8>(S, OpPC); |
34293 | } |
34294 | bool EvalEmitter::emitShlIntAPSSint16(const SourceInfo &L) { |
34295 | if (!isActive()) return true; |
34296 | CurrentSource = L; |
34297 | return Shl<PT_IntAPS, PT_Sint16>(S, OpPC); |
34298 | } |
34299 | bool EvalEmitter::emitShlIntAPSUint16(const SourceInfo &L) { |
34300 | if (!isActive()) return true; |
34301 | CurrentSource = L; |
34302 | return Shl<PT_IntAPS, PT_Uint16>(S, OpPC); |
34303 | } |
34304 | bool EvalEmitter::emitShlIntAPSSint32(const SourceInfo &L) { |
34305 | if (!isActive()) return true; |
34306 | CurrentSource = L; |
34307 | return Shl<PT_IntAPS, PT_Sint32>(S, OpPC); |
34308 | } |
34309 | bool EvalEmitter::emitShlIntAPSUint32(const SourceInfo &L) { |
34310 | if (!isActive()) return true; |
34311 | CurrentSource = L; |
34312 | return Shl<PT_IntAPS, PT_Uint32>(S, OpPC); |
34313 | } |
34314 | bool EvalEmitter::emitShlIntAPSSint64(const SourceInfo &L) { |
34315 | if (!isActive()) return true; |
34316 | CurrentSource = L; |
34317 | return Shl<PT_IntAPS, PT_Sint64>(S, OpPC); |
34318 | } |
34319 | bool EvalEmitter::emitShlIntAPSUint64(const SourceInfo &L) { |
34320 | if (!isActive()) return true; |
34321 | CurrentSource = L; |
34322 | return Shl<PT_IntAPS, PT_Uint64>(S, OpPC); |
34323 | } |
34324 | bool EvalEmitter::emitShlIntAPSIntAP(const SourceInfo &L) { |
34325 | if (!isActive()) return true; |
34326 | CurrentSource = L; |
34327 | return Shl<PT_IntAPS, PT_IntAP>(S, OpPC); |
34328 | } |
34329 | bool EvalEmitter::emitShlIntAPSIntAPS(const SourceInfo &L) { |
34330 | if (!isActive()) return true; |
34331 | CurrentSource = L; |
34332 | return Shl<PT_IntAPS, PT_IntAPS>(S, OpPC); |
34333 | } |
34334 | #endif |
34335 | #ifdef GET_OPCODE_NAMES |
34336 | OP_ShrSint8Sint8, |
34337 | OP_ShrSint8Uint8, |
34338 | OP_ShrSint8Sint16, |
34339 | OP_ShrSint8Uint16, |
34340 | OP_ShrSint8Sint32, |
34341 | OP_ShrSint8Uint32, |
34342 | OP_ShrSint8Sint64, |
34343 | OP_ShrSint8Uint64, |
34344 | OP_ShrSint8IntAP, |
34345 | OP_ShrSint8IntAPS, |
34346 | OP_ShrUint8Sint8, |
34347 | OP_ShrUint8Uint8, |
34348 | OP_ShrUint8Sint16, |
34349 | OP_ShrUint8Uint16, |
34350 | OP_ShrUint8Sint32, |
34351 | OP_ShrUint8Uint32, |
34352 | OP_ShrUint8Sint64, |
34353 | OP_ShrUint8Uint64, |
34354 | OP_ShrUint8IntAP, |
34355 | OP_ShrUint8IntAPS, |
34356 | OP_ShrSint16Sint8, |
34357 | OP_ShrSint16Uint8, |
34358 | OP_ShrSint16Sint16, |
34359 | OP_ShrSint16Uint16, |
34360 | OP_ShrSint16Sint32, |
34361 | OP_ShrSint16Uint32, |
34362 | OP_ShrSint16Sint64, |
34363 | OP_ShrSint16Uint64, |
34364 | OP_ShrSint16IntAP, |
34365 | OP_ShrSint16IntAPS, |
34366 | OP_ShrUint16Sint8, |
34367 | OP_ShrUint16Uint8, |
34368 | OP_ShrUint16Sint16, |
34369 | OP_ShrUint16Uint16, |
34370 | OP_ShrUint16Sint32, |
34371 | OP_ShrUint16Uint32, |
34372 | OP_ShrUint16Sint64, |
34373 | OP_ShrUint16Uint64, |
34374 | OP_ShrUint16IntAP, |
34375 | OP_ShrUint16IntAPS, |
34376 | OP_ShrSint32Sint8, |
34377 | OP_ShrSint32Uint8, |
34378 | OP_ShrSint32Sint16, |
34379 | OP_ShrSint32Uint16, |
34380 | OP_ShrSint32Sint32, |
34381 | OP_ShrSint32Uint32, |
34382 | OP_ShrSint32Sint64, |
34383 | OP_ShrSint32Uint64, |
34384 | OP_ShrSint32IntAP, |
34385 | OP_ShrSint32IntAPS, |
34386 | OP_ShrUint32Sint8, |
34387 | OP_ShrUint32Uint8, |
34388 | OP_ShrUint32Sint16, |
34389 | OP_ShrUint32Uint16, |
34390 | OP_ShrUint32Sint32, |
34391 | OP_ShrUint32Uint32, |
34392 | OP_ShrUint32Sint64, |
34393 | OP_ShrUint32Uint64, |
34394 | OP_ShrUint32IntAP, |
34395 | OP_ShrUint32IntAPS, |
34396 | OP_ShrSint64Sint8, |
34397 | OP_ShrSint64Uint8, |
34398 | OP_ShrSint64Sint16, |
34399 | OP_ShrSint64Uint16, |
34400 | OP_ShrSint64Sint32, |
34401 | OP_ShrSint64Uint32, |
34402 | OP_ShrSint64Sint64, |
34403 | OP_ShrSint64Uint64, |
34404 | OP_ShrSint64IntAP, |
34405 | OP_ShrSint64IntAPS, |
34406 | OP_ShrUint64Sint8, |
34407 | OP_ShrUint64Uint8, |
34408 | OP_ShrUint64Sint16, |
34409 | OP_ShrUint64Uint16, |
34410 | OP_ShrUint64Sint32, |
34411 | OP_ShrUint64Uint32, |
34412 | OP_ShrUint64Sint64, |
34413 | OP_ShrUint64Uint64, |
34414 | OP_ShrUint64IntAP, |
34415 | OP_ShrUint64IntAPS, |
34416 | OP_ShrIntAPSint8, |
34417 | OP_ShrIntAPUint8, |
34418 | OP_ShrIntAPSint16, |
34419 | OP_ShrIntAPUint16, |
34420 | OP_ShrIntAPSint32, |
34421 | OP_ShrIntAPUint32, |
34422 | OP_ShrIntAPSint64, |
34423 | OP_ShrIntAPUint64, |
34424 | OP_ShrIntAPIntAP, |
34425 | OP_ShrIntAPIntAPS, |
34426 | OP_ShrIntAPSSint8, |
34427 | OP_ShrIntAPSUint8, |
34428 | OP_ShrIntAPSSint16, |
34429 | OP_ShrIntAPSUint16, |
34430 | OP_ShrIntAPSSint32, |
34431 | OP_ShrIntAPSUint32, |
34432 | OP_ShrIntAPSSint64, |
34433 | OP_ShrIntAPSUint64, |
34434 | OP_ShrIntAPSIntAP, |
34435 | OP_ShrIntAPSIntAPS, |
34436 | #endif |
34437 | #ifdef GET_INTERP |
34438 | case OP_ShrSint8Sint8: { |
34439 | if (!Shr<PT_Sint8, PT_Sint8>(S, OpPC)) |
34440 | return false; |
34441 | continue; |
34442 | } |
34443 | case OP_ShrSint8Uint8: { |
34444 | if (!Shr<PT_Sint8, PT_Uint8>(S, OpPC)) |
34445 | return false; |
34446 | continue; |
34447 | } |
34448 | case OP_ShrSint8Sint16: { |
34449 | if (!Shr<PT_Sint8, PT_Sint16>(S, OpPC)) |
34450 | return false; |
34451 | continue; |
34452 | } |
34453 | case OP_ShrSint8Uint16: { |
34454 | if (!Shr<PT_Sint8, PT_Uint16>(S, OpPC)) |
34455 | return false; |
34456 | continue; |
34457 | } |
34458 | case OP_ShrSint8Sint32: { |
34459 | if (!Shr<PT_Sint8, PT_Sint32>(S, OpPC)) |
34460 | return false; |
34461 | continue; |
34462 | } |
34463 | case OP_ShrSint8Uint32: { |
34464 | if (!Shr<PT_Sint8, PT_Uint32>(S, OpPC)) |
34465 | return false; |
34466 | continue; |
34467 | } |
34468 | case OP_ShrSint8Sint64: { |
34469 | if (!Shr<PT_Sint8, PT_Sint64>(S, OpPC)) |
34470 | return false; |
34471 | continue; |
34472 | } |
34473 | case OP_ShrSint8Uint64: { |
34474 | if (!Shr<PT_Sint8, PT_Uint64>(S, OpPC)) |
34475 | return false; |
34476 | continue; |
34477 | } |
34478 | case OP_ShrSint8IntAP: { |
34479 | if (!Shr<PT_Sint8, PT_IntAP>(S, OpPC)) |
34480 | return false; |
34481 | continue; |
34482 | } |
34483 | case OP_ShrSint8IntAPS: { |
34484 | if (!Shr<PT_Sint8, PT_IntAPS>(S, OpPC)) |
34485 | return false; |
34486 | continue; |
34487 | } |
34488 | case OP_ShrUint8Sint8: { |
34489 | if (!Shr<PT_Uint8, PT_Sint8>(S, OpPC)) |
34490 | return false; |
34491 | continue; |
34492 | } |
34493 | case OP_ShrUint8Uint8: { |
34494 | if (!Shr<PT_Uint8, PT_Uint8>(S, OpPC)) |
34495 | return false; |
34496 | continue; |
34497 | } |
34498 | case OP_ShrUint8Sint16: { |
34499 | if (!Shr<PT_Uint8, PT_Sint16>(S, OpPC)) |
34500 | return false; |
34501 | continue; |
34502 | } |
34503 | case OP_ShrUint8Uint16: { |
34504 | if (!Shr<PT_Uint8, PT_Uint16>(S, OpPC)) |
34505 | return false; |
34506 | continue; |
34507 | } |
34508 | case OP_ShrUint8Sint32: { |
34509 | if (!Shr<PT_Uint8, PT_Sint32>(S, OpPC)) |
34510 | return false; |
34511 | continue; |
34512 | } |
34513 | case OP_ShrUint8Uint32: { |
34514 | if (!Shr<PT_Uint8, PT_Uint32>(S, OpPC)) |
34515 | return false; |
34516 | continue; |
34517 | } |
34518 | case OP_ShrUint8Sint64: { |
34519 | if (!Shr<PT_Uint8, PT_Sint64>(S, OpPC)) |
34520 | return false; |
34521 | continue; |
34522 | } |
34523 | case OP_ShrUint8Uint64: { |
34524 | if (!Shr<PT_Uint8, PT_Uint64>(S, OpPC)) |
34525 | return false; |
34526 | continue; |
34527 | } |
34528 | case OP_ShrUint8IntAP: { |
34529 | if (!Shr<PT_Uint8, PT_IntAP>(S, OpPC)) |
34530 | return false; |
34531 | continue; |
34532 | } |
34533 | case OP_ShrUint8IntAPS: { |
34534 | if (!Shr<PT_Uint8, PT_IntAPS>(S, OpPC)) |
34535 | return false; |
34536 | continue; |
34537 | } |
34538 | case OP_ShrSint16Sint8: { |
34539 | if (!Shr<PT_Sint16, PT_Sint8>(S, OpPC)) |
34540 | return false; |
34541 | continue; |
34542 | } |
34543 | case OP_ShrSint16Uint8: { |
34544 | if (!Shr<PT_Sint16, PT_Uint8>(S, OpPC)) |
34545 | return false; |
34546 | continue; |
34547 | } |
34548 | case OP_ShrSint16Sint16: { |
34549 | if (!Shr<PT_Sint16, PT_Sint16>(S, OpPC)) |
34550 | return false; |
34551 | continue; |
34552 | } |
34553 | case OP_ShrSint16Uint16: { |
34554 | if (!Shr<PT_Sint16, PT_Uint16>(S, OpPC)) |
34555 | return false; |
34556 | continue; |
34557 | } |
34558 | case OP_ShrSint16Sint32: { |
34559 | if (!Shr<PT_Sint16, PT_Sint32>(S, OpPC)) |
34560 | return false; |
34561 | continue; |
34562 | } |
34563 | case OP_ShrSint16Uint32: { |
34564 | if (!Shr<PT_Sint16, PT_Uint32>(S, OpPC)) |
34565 | return false; |
34566 | continue; |
34567 | } |
34568 | case OP_ShrSint16Sint64: { |
34569 | if (!Shr<PT_Sint16, PT_Sint64>(S, OpPC)) |
34570 | return false; |
34571 | continue; |
34572 | } |
34573 | case OP_ShrSint16Uint64: { |
34574 | if (!Shr<PT_Sint16, PT_Uint64>(S, OpPC)) |
34575 | return false; |
34576 | continue; |
34577 | } |
34578 | case OP_ShrSint16IntAP: { |
34579 | if (!Shr<PT_Sint16, PT_IntAP>(S, OpPC)) |
34580 | return false; |
34581 | continue; |
34582 | } |
34583 | case OP_ShrSint16IntAPS: { |
34584 | if (!Shr<PT_Sint16, PT_IntAPS>(S, OpPC)) |
34585 | return false; |
34586 | continue; |
34587 | } |
34588 | case OP_ShrUint16Sint8: { |
34589 | if (!Shr<PT_Uint16, PT_Sint8>(S, OpPC)) |
34590 | return false; |
34591 | continue; |
34592 | } |
34593 | case OP_ShrUint16Uint8: { |
34594 | if (!Shr<PT_Uint16, PT_Uint8>(S, OpPC)) |
34595 | return false; |
34596 | continue; |
34597 | } |
34598 | case OP_ShrUint16Sint16: { |
34599 | if (!Shr<PT_Uint16, PT_Sint16>(S, OpPC)) |
34600 | return false; |
34601 | continue; |
34602 | } |
34603 | case OP_ShrUint16Uint16: { |
34604 | if (!Shr<PT_Uint16, PT_Uint16>(S, OpPC)) |
34605 | return false; |
34606 | continue; |
34607 | } |
34608 | case OP_ShrUint16Sint32: { |
34609 | if (!Shr<PT_Uint16, PT_Sint32>(S, OpPC)) |
34610 | return false; |
34611 | continue; |
34612 | } |
34613 | case OP_ShrUint16Uint32: { |
34614 | if (!Shr<PT_Uint16, PT_Uint32>(S, OpPC)) |
34615 | return false; |
34616 | continue; |
34617 | } |
34618 | case OP_ShrUint16Sint64: { |
34619 | if (!Shr<PT_Uint16, PT_Sint64>(S, OpPC)) |
34620 | return false; |
34621 | continue; |
34622 | } |
34623 | case OP_ShrUint16Uint64: { |
34624 | if (!Shr<PT_Uint16, PT_Uint64>(S, OpPC)) |
34625 | return false; |
34626 | continue; |
34627 | } |
34628 | case OP_ShrUint16IntAP: { |
34629 | if (!Shr<PT_Uint16, PT_IntAP>(S, OpPC)) |
34630 | return false; |
34631 | continue; |
34632 | } |
34633 | case OP_ShrUint16IntAPS: { |
34634 | if (!Shr<PT_Uint16, PT_IntAPS>(S, OpPC)) |
34635 | return false; |
34636 | continue; |
34637 | } |
34638 | case OP_ShrSint32Sint8: { |
34639 | if (!Shr<PT_Sint32, PT_Sint8>(S, OpPC)) |
34640 | return false; |
34641 | continue; |
34642 | } |
34643 | case OP_ShrSint32Uint8: { |
34644 | if (!Shr<PT_Sint32, PT_Uint8>(S, OpPC)) |
34645 | return false; |
34646 | continue; |
34647 | } |
34648 | case OP_ShrSint32Sint16: { |
34649 | if (!Shr<PT_Sint32, PT_Sint16>(S, OpPC)) |
34650 | return false; |
34651 | continue; |
34652 | } |
34653 | case OP_ShrSint32Uint16: { |
34654 | if (!Shr<PT_Sint32, PT_Uint16>(S, OpPC)) |
34655 | return false; |
34656 | continue; |
34657 | } |
34658 | case OP_ShrSint32Sint32: { |
34659 | if (!Shr<PT_Sint32, PT_Sint32>(S, OpPC)) |
34660 | return false; |
34661 | continue; |
34662 | } |
34663 | case OP_ShrSint32Uint32: { |
34664 | if (!Shr<PT_Sint32, PT_Uint32>(S, OpPC)) |
34665 | return false; |
34666 | continue; |
34667 | } |
34668 | case OP_ShrSint32Sint64: { |
34669 | if (!Shr<PT_Sint32, PT_Sint64>(S, OpPC)) |
34670 | return false; |
34671 | continue; |
34672 | } |
34673 | case OP_ShrSint32Uint64: { |
34674 | if (!Shr<PT_Sint32, PT_Uint64>(S, OpPC)) |
34675 | return false; |
34676 | continue; |
34677 | } |
34678 | case OP_ShrSint32IntAP: { |
34679 | if (!Shr<PT_Sint32, PT_IntAP>(S, OpPC)) |
34680 | return false; |
34681 | continue; |
34682 | } |
34683 | case OP_ShrSint32IntAPS: { |
34684 | if (!Shr<PT_Sint32, PT_IntAPS>(S, OpPC)) |
34685 | return false; |
34686 | continue; |
34687 | } |
34688 | case OP_ShrUint32Sint8: { |
34689 | if (!Shr<PT_Uint32, PT_Sint8>(S, OpPC)) |
34690 | return false; |
34691 | continue; |
34692 | } |
34693 | case OP_ShrUint32Uint8: { |
34694 | if (!Shr<PT_Uint32, PT_Uint8>(S, OpPC)) |
34695 | return false; |
34696 | continue; |
34697 | } |
34698 | case OP_ShrUint32Sint16: { |
34699 | if (!Shr<PT_Uint32, PT_Sint16>(S, OpPC)) |
34700 | return false; |
34701 | continue; |
34702 | } |
34703 | case OP_ShrUint32Uint16: { |
34704 | if (!Shr<PT_Uint32, PT_Uint16>(S, OpPC)) |
34705 | return false; |
34706 | continue; |
34707 | } |
34708 | case OP_ShrUint32Sint32: { |
34709 | if (!Shr<PT_Uint32, PT_Sint32>(S, OpPC)) |
34710 | return false; |
34711 | continue; |
34712 | } |
34713 | case OP_ShrUint32Uint32: { |
34714 | if (!Shr<PT_Uint32, PT_Uint32>(S, OpPC)) |
34715 | return false; |
34716 | continue; |
34717 | } |
34718 | case OP_ShrUint32Sint64: { |
34719 | if (!Shr<PT_Uint32, PT_Sint64>(S, OpPC)) |
34720 | return false; |
34721 | continue; |
34722 | } |
34723 | case OP_ShrUint32Uint64: { |
34724 | if (!Shr<PT_Uint32, PT_Uint64>(S, OpPC)) |
34725 | return false; |
34726 | continue; |
34727 | } |
34728 | case OP_ShrUint32IntAP: { |
34729 | if (!Shr<PT_Uint32, PT_IntAP>(S, OpPC)) |
34730 | return false; |
34731 | continue; |
34732 | } |
34733 | case OP_ShrUint32IntAPS: { |
34734 | if (!Shr<PT_Uint32, PT_IntAPS>(S, OpPC)) |
34735 | return false; |
34736 | continue; |
34737 | } |
34738 | case OP_ShrSint64Sint8: { |
34739 | if (!Shr<PT_Sint64, PT_Sint8>(S, OpPC)) |
34740 | return false; |
34741 | continue; |
34742 | } |
34743 | case OP_ShrSint64Uint8: { |
34744 | if (!Shr<PT_Sint64, PT_Uint8>(S, OpPC)) |
34745 | return false; |
34746 | continue; |
34747 | } |
34748 | case OP_ShrSint64Sint16: { |
34749 | if (!Shr<PT_Sint64, PT_Sint16>(S, OpPC)) |
34750 | return false; |
34751 | continue; |
34752 | } |
34753 | case OP_ShrSint64Uint16: { |
34754 | if (!Shr<PT_Sint64, PT_Uint16>(S, OpPC)) |
34755 | return false; |
34756 | continue; |
34757 | } |
34758 | case OP_ShrSint64Sint32: { |
34759 | if (!Shr<PT_Sint64, PT_Sint32>(S, OpPC)) |
34760 | return false; |
34761 | continue; |
34762 | } |
34763 | case OP_ShrSint64Uint32: { |
34764 | if (!Shr<PT_Sint64, PT_Uint32>(S, OpPC)) |
34765 | return false; |
34766 | continue; |
34767 | } |
34768 | case OP_ShrSint64Sint64: { |
34769 | if (!Shr<PT_Sint64, PT_Sint64>(S, OpPC)) |
34770 | return false; |
34771 | continue; |
34772 | } |
34773 | case OP_ShrSint64Uint64: { |
34774 | if (!Shr<PT_Sint64, PT_Uint64>(S, OpPC)) |
34775 | return false; |
34776 | continue; |
34777 | } |
34778 | case OP_ShrSint64IntAP: { |
34779 | if (!Shr<PT_Sint64, PT_IntAP>(S, OpPC)) |
34780 | return false; |
34781 | continue; |
34782 | } |
34783 | case OP_ShrSint64IntAPS: { |
34784 | if (!Shr<PT_Sint64, PT_IntAPS>(S, OpPC)) |
34785 | return false; |
34786 | continue; |
34787 | } |
34788 | case OP_ShrUint64Sint8: { |
34789 | if (!Shr<PT_Uint64, PT_Sint8>(S, OpPC)) |
34790 | return false; |
34791 | continue; |
34792 | } |
34793 | case OP_ShrUint64Uint8: { |
34794 | if (!Shr<PT_Uint64, PT_Uint8>(S, OpPC)) |
34795 | return false; |
34796 | continue; |
34797 | } |
34798 | case OP_ShrUint64Sint16: { |
34799 | if (!Shr<PT_Uint64, PT_Sint16>(S, OpPC)) |
34800 | return false; |
34801 | continue; |
34802 | } |
34803 | case OP_ShrUint64Uint16: { |
34804 | if (!Shr<PT_Uint64, PT_Uint16>(S, OpPC)) |
34805 | return false; |
34806 | continue; |
34807 | } |
34808 | case OP_ShrUint64Sint32: { |
34809 | if (!Shr<PT_Uint64, PT_Sint32>(S, OpPC)) |
34810 | return false; |
34811 | continue; |
34812 | } |
34813 | case OP_ShrUint64Uint32: { |
34814 | if (!Shr<PT_Uint64, PT_Uint32>(S, OpPC)) |
34815 | return false; |
34816 | continue; |
34817 | } |
34818 | case OP_ShrUint64Sint64: { |
34819 | if (!Shr<PT_Uint64, PT_Sint64>(S, OpPC)) |
34820 | return false; |
34821 | continue; |
34822 | } |
34823 | case OP_ShrUint64Uint64: { |
34824 | if (!Shr<PT_Uint64, PT_Uint64>(S, OpPC)) |
34825 | return false; |
34826 | continue; |
34827 | } |
34828 | case OP_ShrUint64IntAP: { |
34829 | if (!Shr<PT_Uint64, PT_IntAP>(S, OpPC)) |
34830 | return false; |
34831 | continue; |
34832 | } |
34833 | case OP_ShrUint64IntAPS: { |
34834 | if (!Shr<PT_Uint64, PT_IntAPS>(S, OpPC)) |
34835 | return false; |
34836 | continue; |
34837 | } |
34838 | case OP_ShrIntAPSint8: { |
34839 | if (!Shr<PT_IntAP, PT_Sint8>(S, OpPC)) |
34840 | return false; |
34841 | continue; |
34842 | } |
34843 | case OP_ShrIntAPUint8: { |
34844 | if (!Shr<PT_IntAP, PT_Uint8>(S, OpPC)) |
34845 | return false; |
34846 | continue; |
34847 | } |
34848 | case OP_ShrIntAPSint16: { |
34849 | if (!Shr<PT_IntAP, PT_Sint16>(S, OpPC)) |
34850 | return false; |
34851 | continue; |
34852 | } |
34853 | case OP_ShrIntAPUint16: { |
34854 | if (!Shr<PT_IntAP, PT_Uint16>(S, OpPC)) |
34855 | return false; |
34856 | continue; |
34857 | } |
34858 | case OP_ShrIntAPSint32: { |
34859 | if (!Shr<PT_IntAP, PT_Sint32>(S, OpPC)) |
34860 | return false; |
34861 | continue; |
34862 | } |
34863 | case OP_ShrIntAPUint32: { |
34864 | if (!Shr<PT_IntAP, PT_Uint32>(S, OpPC)) |
34865 | return false; |
34866 | continue; |
34867 | } |
34868 | case OP_ShrIntAPSint64: { |
34869 | if (!Shr<PT_IntAP, PT_Sint64>(S, OpPC)) |
34870 | return false; |
34871 | continue; |
34872 | } |
34873 | case OP_ShrIntAPUint64: { |
34874 | if (!Shr<PT_IntAP, PT_Uint64>(S, OpPC)) |
34875 | return false; |
34876 | continue; |
34877 | } |
34878 | case OP_ShrIntAPIntAP: { |
34879 | if (!Shr<PT_IntAP, PT_IntAP>(S, OpPC)) |
34880 | return false; |
34881 | continue; |
34882 | } |
34883 | case OP_ShrIntAPIntAPS: { |
34884 | if (!Shr<PT_IntAP, PT_IntAPS>(S, OpPC)) |
34885 | return false; |
34886 | continue; |
34887 | } |
34888 | case OP_ShrIntAPSSint8: { |
34889 | if (!Shr<PT_IntAPS, PT_Sint8>(S, OpPC)) |
34890 | return false; |
34891 | continue; |
34892 | } |
34893 | case OP_ShrIntAPSUint8: { |
34894 | if (!Shr<PT_IntAPS, PT_Uint8>(S, OpPC)) |
34895 | return false; |
34896 | continue; |
34897 | } |
34898 | case OP_ShrIntAPSSint16: { |
34899 | if (!Shr<PT_IntAPS, PT_Sint16>(S, OpPC)) |
34900 | return false; |
34901 | continue; |
34902 | } |
34903 | case OP_ShrIntAPSUint16: { |
34904 | if (!Shr<PT_IntAPS, PT_Uint16>(S, OpPC)) |
34905 | return false; |
34906 | continue; |
34907 | } |
34908 | case OP_ShrIntAPSSint32: { |
34909 | if (!Shr<PT_IntAPS, PT_Sint32>(S, OpPC)) |
34910 | return false; |
34911 | continue; |
34912 | } |
34913 | case OP_ShrIntAPSUint32: { |
34914 | if (!Shr<PT_IntAPS, PT_Uint32>(S, OpPC)) |
34915 | return false; |
34916 | continue; |
34917 | } |
34918 | case OP_ShrIntAPSSint64: { |
34919 | if (!Shr<PT_IntAPS, PT_Sint64>(S, OpPC)) |
34920 | return false; |
34921 | continue; |
34922 | } |
34923 | case OP_ShrIntAPSUint64: { |
34924 | if (!Shr<PT_IntAPS, PT_Uint64>(S, OpPC)) |
34925 | return false; |
34926 | continue; |
34927 | } |
34928 | case OP_ShrIntAPSIntAP: { |
34929 | if (!Shr<PT_IntAPS, PT_IntAP>(S, OpPC)) |
34930 | return false; |
34931 | continue; |
34932 | } |
34933 | case OP_ShrIntAPSIntAPS: { |
34934 | if (!Shr<PT_IntAPS, PT_IntAPS>(S, OpPC)) |
34935 | return false; |
34936 | continue; |
34937 | } |
34938 | #endif |
34939 | #ifdef GET_DISASM |
34940 | case OP_ShrSint8Sint8: |
34941 | Text.Op = PrintName("ShrSint8Sint8" ); |
34942 | break; |
34943 | case OP_ShrSint8Uint8: |
34944 | Text.Op = PrintName("ShrSint8Uint8" ); |
34945 | break; |
34946 | case OP_ShrSint8Sint16: |
34947 | Text.Op = PrintName("ShrSint8Sint16" ); |
34948 | break; |
34949 | case OP_ShrSint8Uint16: |
34950 | Text.Op = PrintName("ShrSint8Uint16" ); |
34951 | break; |
34952 | case OP_ShrSint8Sint32: |
34953 | Text.Op = PrintName("ShrSint8Sint32" ); |
34954 | break; |
34955 | case OP_ShrSint8Uint32: |
34956 | Text.Op = PrintName("ShrSint8Uint32" ); |
34957 | break; |
34958 | case OP_ShrSint8Sint64: |
34959 | Text.Op = PrintName("ShrSint8Sint64" ); |
34960 | break; |
34961 | case OP_ShrSint8Uint64: |
34962 | Text.Op = PrintName("ShrSint8Uint64" ); |
34963 | break; |
34964 | case OP_ShrSint8IntAP: |
34965 | Text.Op = PrintName("ShrSint8IntAP" ); |
34966 | break; |
34967 | case OP_ShrSint8IntAPS: |
34968 | Text.Op = PrintName("ShrSint8IntAPS" ); |
34969 | break; |
34970 | case OP_ShrUint8Sint8: |
34971 | Text.Op = PrintName("ShrUint8Sint8" ); |
34972 | break; |
34973 | case OP_ShrUint8Uint8: |
34974 | Text.Op = PrintName("ShrUint8Uint8" ); |
34975 | break; |
34976 | case OP_ShrUint8Sint16: |
34977 | Text.Op = PrintName("ShrUint8Sint16" ); |
34978 | break; |
34979 | case OP_ShrUint8Uint16: |
34980 | Text.Op = PrintName("ShrUint8Uint16" ); |
34981 | break; |
34982 | case OP_ShrUint8Sint32: |
34983 | Text.Op = PrintName("ShrUint8Sint32" ); |
34984 | break; |
34985 | case OP_ShrUint8Uint32: |
34986 | Text.Op = PrintName("ShrUint8Uint32" ); |
34987 | break; |
34988 | case OP_ShrUint8Sint64: |
34989 | Text.Op = PrintName("ShrUint8Sint64" ); |
34990 | break; |
34991 | case OP_ShrUint8Uint64: |
34992 | Text.Op = PrintName("ShrUint8Uint64" ); |
34993 | break; |
34994 | case OP_ShrUint8IntAP: |
34995 | Text.Op = PrintName("ShrUint8IntAP" ); |
34996 | break; |
34997 | case OP_ShrUint8IntAPS: |
34998 | Text.Op = PrintName("ShrUint8IntAPS" ); |
34999 | break; |
35000 | case OP_ShrSint16Sint8: |
35001 | Text.Op = PrintName("ShrSint16Sint8" ); |
35002 | break; |
35003 | case OP_ShrSint16Uint8: |
35004 | Text.Op = PrintName("ShrSint16Uint8" ); |
35005 | break; |
35006 | case OP_ShrSint16Sint16: |
35007 | Text.Op = PrintName("ShrSint16Sint16" ); |
35008 | break; |
35009 | case OP_ShrSint16Uint16: |
35010 | Text.Op = PrintName("ShrSint16Uint16" ); |
35011 | break; |
35012 | case OP_ShrSint16Sint32: |
35013 | Text.Op = PrintName("ShrSint16Sint32" ); |
35014 | break; |
35015 | case OP_ShrSint16Uint32: |
35016 | Text.Op = PrintName("ShrSint16Uint32" ); |
35017 | break; |
35018 | case OP_ShrSint16Sint64: |
35019 | Text.Op = PrintName("ShrSint16Sint64" ); |
35020 | break; |
35021 | case OP_ShrSint16Uint64: |
35022 | Text.Op = PrintName("ShrSint16Uint64" ); |
35023 | break; |
35024 | case OP_ShrSint16IntAP: |
35025 | Text.Op = PrintName("ShrSint16IntAP" ); |
35026 | break; |
35027 | case OP_ShrSint16IntAPS: |
35028 | Text.Op = PrintName("ShrSint16IntAPS" ); |
35029 | break; |
35030 | case OP_ShrUint16Sint8: |
35031 | Text.Op = PrintName("ShrUint16Sint8" ); |
35032 | break; |
35033 | case OP_ShrUint16Uint8: |
35034 | Text.Op = PrintName("ShrUint16Uint8" ); |
35035 | break; |
35036 | case OP_ShrUint16Sint16: |
35037 | Text.Op = PrintName("ShrUint16Sint16" ); |
35038 | break; |
35039 | case OP_ShrUint16Uint16: |
35040 | Text.Op = PrintName("ShrUint16Uint16" ); |
35041 | break; |
35042 | case OP_ShrUint16Sint32: |
35043 | Text.Op = PrintName("ShrUint16Sint32" ); |
35044 | break; |
35045 | case OP_ShrUint16Uint32: |
35046 | Text.Op = PrintName("ShrUint16Uint32" ); |
35047 | break; |
35048 | case OP_ShrUint16Sint64: |
35049 | Text.Op = PrintName("ShrUint16Sint64" ); |
35050 | break; |
35051 | case OP_ShrUint16Uint64: |
35052 | Text.Op = PrintName("ShrUint16Uint64" ); |
35053 | break; |
35054 | case OP_ShrUint16IntAP: |
35055 | Text.Op = PrintName("ShrUint16IntAP" ); |
35056 | break; |
35057 | case OP_ShrUint16IntAPS: |
35058 | Text.Op = PrintName("ShrUint16IntAPS" ); |
35059 | break; |
35060 | case OP_ShrSint32Sint8: |
35061 | Text.Op = PrintName("ShrSint32Sint8" ); |
35062 | break; |
35063 | case OP_ShrSint32Uint8: |
35064 | Text.Op = PrintName("ShrSint32Uint8" ); |
35065 | break; |
35066 | case OP_ShrSint32Sint16: |
35067 | Text.Op = PrintName("ShrSint32Sint16" ); |
35068 | break; |
35069 | case OP_ShrSint32Uint16: |
35070 | Text.Op = PrintName("ShrSint32Uint16" ); |
35071 | break; |
35072 | case OP_ShrSint32Sint32: |
35073 | Text.Op = PrintName("ShrSint32Sint32" ); |
35074 | break; |
35075 | case OP_ShrSint32Uint32: |
35076 | Text.Op = PrintName("ShrSint32Uint32" ); |
35077 | break; |
35078 | case OP_ShrSint32Sint64: |
35079 | Text.Op = PrintName("ShrSint32Sint64" ); |
35080 | break; |
35081 | case OP_ShrSint32Uint64: |
35082 | Text.Op = PrintName("ShrSint32Uint64" ); |
35083 | break; |
35084 | case OP_ShrSint32IntAP: |
35085 | Text.Op = PrintName("ShrSint32IntAP" ); |
35086 | break; |
35087 | case OP_ShrSint32IntAPS: |
35088 | Text.Op = PrintName("ShrSint32IntAPS" ); |
35089 | break; |
35090 | case OP_ShrUint32Sint8: |
35091 | Text.Op = PrintName("ShrUint32Sint8" ); |
35092 | break; |
35093 | case OP_ShrUint32Uint8: |
35094 | Text.Op = PrintName("ShrUint32Uint8" ); |
35095 | break; |
35096 | case OP_ShrUint32Sint16: |
35097 | Text.Op = PrintName("ShrUint32Sint16" ); |
35098 | break; |
35099 | case OP_ShrUint32Uint16: |
35100 | Text.Op = PrintName("ShrUint32Uint16" ); |
35101 | break; |
35102 | case OP_ShrUint32Sint32: |
35103 | Text.Op = PrintName("ShrUint32Sint32" ); |
35104 | break; |
35105 | case OP_ShrUint32Uint32: |
35106 | Text.Op = PrintName("ShrUint32Uint32" ); |
35107 | break; |
35108 | case OP_ShrUint32Sint64: |
35109 | Text.Op = PrintName("ShrUint32Sint64" ); |
35110 | break; |
35111 | case OP_ShrUint32Uint64: |
35112 | Text.Op = PrintName("ShrUint32Uint64" ); |
35113 | break; |
35114 | case OP_ShrUint32IntAP: |
35115 | Text.Op = PrintName("ShrUint32IntAP" ); |
35116 | break; |
35117 | case OP_ShrUint32IntAPS: |
35118 | Text.Op = PrintName("ShrUint32IntAPS" ); |
35119 | break; |
35120 | case OP_ShrSint64Sint8: |
35121 | Text.Op = PrintName("ShrSint64Sint8" ); |
35122 | break; |
35123 | case OP_ShrSint64Uint8: |
35124 | Text.Op = PrintName("ShrSint64Uint8" ); |
35125 | break; |
35126 | case OP_ShrSint64Sint16: |
35127 | Text.Op = PrintName("ShrSint64Sint16" ); |
35128 | break; |
35129 | case OP_ShrSint64Uint16: |
35130 | Text.Op = PrintName("ShrSint64Uint16" ); |
35131 | break; |
35132 | case OP_ShrSint64Sint32: |
35133 | Text.Op = PrintName("ShrSint64Sint32" ); |
35134 | break; |
35135 | case OP_ShrSint64Uint32: |
35136 | Text.Op = PrintName("ShrSint64Uint32" ); |
35137 | break; |
35138 | case OP_ShrSint64Sint64: |
35139 | Text.Op = PrintName("ShrSint64Sint64" ); |
35140 | break; |
35141 | case OP_ShrSint64Uint64: |
35142 | Text.Op = PrintName("ShrSint64Uint64" ); |
35143 | break; |
35144 | case OP_ShrSint64IntAP: |
35145 | Text.Op = PrintName("ShrSint64IntAP" ); |
35146 | break; |
35147 | case OP_ShrSint64IntAPS: |
35148 | Text.Op = PrintName("ShrSint64IntAPS" ); |
35149 | break; |
35150 | case OP_ShrUint64Sint8: |
35151 | Text.Op = PrintName("ShrUint64Sint8" ); |
35152 | break; |
35153 | case OP_ShrUint64Uint8: |
35154 | Text.Op = PrintName("ShrUint64Uint8" ); |
35155 | break; |
35156 | case OP_ShrUint64Sint16: |
35157 | Text.Op = PrintName("ShrUint64Sint16" ); |
35158 | break; |
35159 | case OP_ShrUint64Uint16: |
35160 | Text.Op = PrintName("ShrUint64Uint16" ); |
35161 | break; |
35162 | case OP_ShrUint64Sint32: |
35163 | Text.Op = PrintName("ShrUint64Sint32" ); |
35164 | break; |
35165 | case OP_ShrUint64Uint32: |
35166 | Text.Op = PrintName("ShrUint64Uint32" ); |
35167 | break; |
35168 | case OP_ShrUint64Sint64: |
35169 | Text.Op = PrintName("ShrUint64Sint64" ); |
35170 | break; |
35171 | case OP_ShrUint64Uint64: |
35172 | Text.Op = PrintName("ShrUint64Uint64" ); |
35173 | break; |
35174 | case OP_ShrUint64IntAP: |
35175 | Text.Op = PrintName("ShrUint64IntAP" ); |
35176 | break; |
35177 | case OP_ShrUint64IntAPS: |
35178 | Text.Op = PrintName("ShrUint64IntAPS" ); |
35179 | break; |
35180 | case OP_ShrIntAPSint8: |
35181 | Text.Op = PrintName("ShrIntAPSint8" ); |
35182 | break; |
35183 | case OP_ShrIntAPUint8: |
35184 | Text.Op = PrintName("ShrIntAPUint8" ); |
35185 | break; |
35186 | case OP_ShrIntAPSint16: |
35187 | Text.Op = PrintName("ShrIntAPSint16" ); |
35188 | break; |
35189 | case OP_ShrIntAPUint16: |
35190 | Text.Op = PrintName("ShrIntAPUint16" ); |
35191 | break; |
35192 | case OP_ShrIntAPSint32: |
35193 | Text.Op = PrintName("ShrIntAPSint32" ); |
35194 | break; |
35195 | case OP_ShrIntAPUint32: |
35196 | Text.Op = PrintName("ShrIntAPUint32" ); |
35197 | break; |
35198 | case OP_ShrIntAPSint64: |
35199 | Text.Op = PrintName("ShrIntAPSint64" ); |
35200 | break; |
35201 | case OP_ShrIntAPUint64: |
35202 | Text.Op = PrintName("ShrIntAPUint64" ); |
35203 | break; |
35204 | case OP_ShrIntAPIntAP: |
35205 | Text.Op = PrintName("ShrIntAPIntAP" ); |
35206 | break; |
35207 | case OP_ShrIntAPIntAPS: |
35208 | Text.Op = PrintName("ShrIntAPIntAPS" ); |
35209 | break; |
35210 | case OP_ShrIntAPSSint8: |
35211 | Text.Op = PrintName("ShrIntAPSSint8" ); |
35212 | break; |
35213 | case OP_ShrIntAPSUint8: |
35214 | Text.Op = PrintName("ShrIntAPSUint8" ); |
35215 | break; |
35216 | case OP_ShrIntAPSSint16: |
35217 | Text.Op = PrintName("ShrIntAPSSint16" ); |
35218 | break; |
35219 | case OP_ShrIntAPSUint16: |
35220 | Text.Op = PrintName("ShrIntAPSUint16" ); |
35221 | break; |
35222 | case OP_ShrIntAPSSint32: |
35223 | Text.Op = PrintName("ShrIntAPSSint32" ); |
35224 | break; |
35225 | case OP_ShrIntAPSUint32: |
35226 | Text.Op = PrintName("ShrIntAPSUint32" ); |
35227 | break; |
35228 | case OP_ShrIntAPSSint64: |
35229 | Text.Op = PrintName("ShrIntAPSSint64" ); |
35230 | break; |
35231 | case OP_ShrIntAPSUint64: |
35232 | Text.Op = PrintName("ShrIntAPSUint64" ); |
35233 | break; |
35234 | case OP_ShrIntAPSIntAP: |
35235 | Text.Op = PrintName("ShrIntAPSIntAP" ); |
35236 | break; |
35237 | case OP_ShrIntAPSIntAPS: |
35238 | Text.Op = PrintName("ShrIntAPSIntAPS" ); |
35239 | break; |
35240 | #endif |
35241 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
35242 | bool emitShrSint8Sint8(const SourceInfo &); |
35243 | bool emitShrSint8Uint8(const SourceInfo &); |
35244 | bool emitShrSint8Sint16(const SourceInfo &); |
35245 | bool emitShrSint8Uint16(const SourceInfo &); |
35246 | bool emitShrSint8Sint32(const SourceInfo &); |
35247 | bool emitShrSint8Uint32(const SourceInfo &); |
35248 | bool emitShrSint8Sint64(const SourceInfo &); |
35249 | bool emitShrSint8Uint64(const SourceInfo &); |
35250 | bool emitShrSint8IntAP(const SourceInfo &); |
35251 | bool emitShrSint8IntAPS(const SourceInfo &); |
35252 | bool emitShrUint8Sint8(const SourceInfo &); |
35253 | bool emitShrUint8Uint8(const SourceInfo &); |
35254 | bool emitShrUint8Sint16(const SourceInfo &); |
35255 | bool emitShrUint8Uint16(const SourceInfo &); |
35256 | bool emitShrUint8Sint32(const SourceInfo &); |
35257 | bool emitShrUint8Uint32(const SourceInfo &); |
35258 | bool emitShrUint8Sint64(const SourceInfo &); |
35259 | bool emitShrUint8Uint64(const SourceInfo &); |
35260 | bool emitShrUint8IntAP(const SourceInfo &); |
35261 | bool emitShrUint8IntAPS(const SourceInfo &); |
35262 | bool emitShrSint16Sint8(const SourceInfo &); |
35263 | bool emitShrSint16Uint8(const SourceInfo &); |
35264 | bool emitShrSint16Sint16(const SourceInfo &); |
35265 | bool emitShrSint16Uint16(const SourceInfo &); |
35266 | bool emitShrSint16Sint32(const SourceInfo &); |
35267 | bool emitShrSint16Uint32(const SourceInfo &); |
35268 | bool emitShrSint16Sint64(const SourceInfo &); |
35269 | bool emitShrSint16Uint64(const SourceInfo &); |
35270 | bool emitShrSint16IntAP(const SourceInfo &); |
35271 | bool emitShrSint16IntAPS(const SourceInfo &); |
35272 | bool emitShrUint16Sint8(const SourceInfo &); |
35273 | bool emitShrUint16Uint8(const SourceInfo &); |
35274 | bool emitShrUint16Sint16(const SourceInfo &); |
35275 | bool emitShrUint16Uint16(const SourceInfo &); |
35276 | bool emitShrUint16Sint32(const SourceInfo &); |
35277 | bool emitShrUint16Uint32(const SourceInfo &); |
35278 | bool emitShrUint16Sint64(const SourceInfo &); |
35279 | bool emitShrUint16Uint64(const SourceInfo &); |
35280 | bool emitShrUint16IntAP(const SourceInfo &); |
35281 | bool emitShrUint16IntAPS(const SourceInfo &); |
35282 | bool emitShrSint32Sint8(const SourceInfo &); |
35283 | bool emitShrSint32Uint8(const SourceInfo &); |
35284 | bool emitShrSint32Sint16(const SourceInfo &); |
35285 | bool emitShrSint32Uint16(const SourceInfo &); |
35286 | bool emitShrSint32Sint32(const SourceInfo &); |
35287 | bool emitShrSint32Uint32(const SourceInfo &); |
35288 | bool emitShrSint32Sint64(const SourceInfo &); |
35289 | bool emitShrSint32Uint64(const SourceInfo &); |
35290 | bool emitShrSint32IntAP(const SourceInfo &); |
35291 | bool emitShrSint32IntAPS(const SourceInfo &); |
35292 | bool emitShrUint32Sint8(const SourceInfo &); |
35293 | bool emitShrUint32Uint8(const SourceInfo &); |
35294 | bool emitShrUint32Sint16(const SourceInfo &); |
35295 | bool emitShrUint32Uint16(const SourceInfo &); |
35296 | bool emitShrUint32Sint32(const SourceInfo &); |
35297 | bool emitShrUint32Uint32(const SourceInfo &); |
35298 | bool emitShrUint32Sint64(const SourceInfo &); |
35299 | bool emitShrUint32Uint64(const SourceInfo &); |
35300 | bool emitShrUint32IntAP(const SourceInfo &); |
35301 | bool emitShrUint32IntAPS(const SourceInfo &); |
35302 | bool emitShrSint64Sint8(const SourceInfo &); |
35303 | bool emitShrSint64Uint8(const SourceInfo &); |
35304 | bool emitShrSint64Sint16(const SourceInfo &); |
35305 | bool emitShrSint64Uint16(const SourceInfo &); |
35306 | bool emitShrSint64Sint32(const SourceInfo &); |
35307 | bool emitShrSint64Uint32(const SourceInfo &); |
35308 | bool emitShrSint64Sint64(const SourceInfo &); |
35309 | bool emitShrSint64Uint64(const SourceInfo &); |
35310 | bool emitShrSint64IntAP(const SourceInfo &); |
35311 | bool emitShrSint64IntAPS(const SourceInfo &); |
35312 | bool emitShrUint64Sint8(const SourceInfo &); |
35313 | bool emitShrUint64Uint8(const SourceInfo &); |
35314 | bool emitShrUint64Sint16(const SourceInfo &); |
35315 | bool emitShrUint64Uint16(const SourceInfo &); |
35316 | bool emitShrUint64Sint32(const SourceInfo &); |
35317 | bool emitShrUint64Uint32(const SourceInfo &); |
35318 | bool emitShrUint64Sint64(const SourceInfo &); |
35319 | bool emitShrUint64Uint64(const SourceInfo &); |
35320 | bool emitShrUint64IntAP(const SourceInfo &); |
35321 | bool emitShrUint64IntAPS(const SourceInfo &); |
35322 | bool emitShrIntAPSint8(const SourceInfo &); |
35323 | bool emitShrIntAPUint8(const SourceInfo &); |
35324 | bool emitShrIntAPSint16(const SourceInfo &); |
35325 | bool emitShrIntAPUint16(const SourceInfo &); |
35326 | bool emitShrIntAPSint32(const SourceInfo &); |
35327 | bool emitShrIntAPUint32(const SourceInfo &); |
35328 | bool emitShrIntAPSint64(const SourceInfo &); |
35329 | bool emitShrIntAPUint64(const SourceInfo &); |
35330 | bool emitShrIntAPIntAP(const SourceInfo &); |
35331 | bool emitShrIntAPIntAPS(const SourceInfo &); |
35332 | bool emitShrIntAPSSint8(const SourceInfo &); |
35333 | bool emitShrIntAPSUint8(const SourceInfo &); |
35334 | bool emitShrIntAPSSint16(const SourceInfo &); |
35335 | bool emitShrIntAPSUint16(const SourceInfo &); |
35336 | bool emitShrIntAPSSint32(const SourceInfo &); |
35337 | bool emitShrIntAPSUint32(const SourceInfo &); |
35338 | bool emitShrIntAPSSint64(const SourceInfo &); |
35339 | bool emitShrIntAPSUint64(const SourceInfo &); |
35340 | bool emitShrIntAPSIntAP(const SourceInfo &); |
35341 | bool emitShrIntAPSIntAPS(const SourceInfo &); |
35342 | #endif |
35343 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
35344 | [[nodiscard]] bool emitShr(PrimType, PrimType, const SourceInfo &I); |
35345 | #endif |
35346 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
35347 | bool |
35348 | #if defined(GET_EVAL_IMPL) |
35349 | EvalEmitter |
35350 | #else |
35351 | ByteCodeEmitter |
35352 | #endif |
35353 | ::emitShr(PrimType T0, PrimType T1, const SourceInfo &I) { |
35354 | switch (T0) { |
35355 | case PT_Sint8: |
35356 | switch (T1) { |
35357 | case PT_Sint8: |
35358 | return emitShrSint8Sint8(I); |
35359 | case PT_Uint8: |
35360 | return emitShrSint8Uint8(I); |
35361 | case PT_Sint16: |
35362 | return emitShrSint8Sint16(I); |
35363 | case PT_Uint16: |
35364 | return emitShrSint8Uint16(I); |
35365 | case PT_Sint32: |
35366 | return emitShrSint8Sint32(I); |
35367 | case PT_Uint32: |
35368 | return emitShrSint8Uint32(I); |
35369 | case PT_Sint64: |
35370 | return emitShrSint8Sint64(I); |
35371 | case PT_Uint64: |
35372 | return emitShrSint8Uint64(I); |
35373 | case PT_IntAP: |
35374 | return emitShrSint8IntAP(I); |
35375 | case PT_IntAPS: |
35376 | return emitShrSint8IntAPS(I); |
35377 | default: llvm_unreachable("invalid type: emitShr" ); |
35378 | } |
35379 | llvm_unreachable("invalid enum value" ); |
35380 | case PT_Uint8: |
35381 | switch (T1) { |
35382 | case PT_Sint8: |
35383 | return emitShrUint8Sint8(I); |
35384 | case PT_Uint8: |
35385 | return emitShrUint8Uint8(I); |
35386 | case PT_Sint16: |
35387 | return emitShrUint8Sint16(I); |
35388 | case PT_Uint16: |
35389 | return emitShrUint8Uint16(I); |
35390 | case PT_Sint32: |
35391 | return emitShrUint8Sint32(I); |
35392 | case PT_Uint32: |
35393 | return emitShrUint8Uint32(I); |
35394 | case PT_Sint64: |
35395 | return emitShrUint8Sint64(I); |
35396 | case PT_Uint64: |
35397 | return emitShrUint8Uint64(I); |
35398 | case PT_IntAP: |
35399 | return emitShrUint8IntAP(I); |
35400 | case PT_IntAPS: |
35401 | return emitShrUint8IntAPS(I); |
35402 | default: llvm_unreachable("invalid type: emitShr" ); |
35403 | } |
35404 | llvm_unreachable("invalid enum value" ); |
35405 | case PT_Sint16: |
35406 | switch (T1) { |
35407 | case PT_Sint8: |
35408 | return emitShrSint16Sint8(I); |
35409 | case PT_Uint8: |
35410 | return emitShrSint16Uint8(I); |
35411 | case PT_Sint16: |
35412 | return emitShrSint16Sint16(I); |
35413 | case PT_Uint16: |
35414 | return emitShrSint16Uint16(I); |
35415 | case PT_Sint32: |
35416 | return emitShrSint16Sint32(I); |
35417 | case PT_Uint32: |
35418 | return emitShrSint16Uint32(I); |
35419 | case PT_Sint64: |
35420 | return emitShrSint16Sint64(I); |
35421 | case PT_Uint64: |
35422 | return emitShrSint16Uint64(I); |
35423 | case PT_IntAP: |
35424 | return emitShrSint16IntAP(I); |
35425 | case PT_IntAPS: |
35426 | return emitShrSint16IntAPS(I); |
35427 | default: llvm_unreachable("invalid type: emitShr" ); |
35428 | } |
35429 | llvm_unreachable("invalid enum value" ); |
35430 | case PT_Uint16: |
35431 | switch (T1) { |
35432 | case PT_Sint8: |
35433 | return emitShrUint16Sint8(I); |
35434 | case PT_Uint8: |
35435 | return emitShrUint16Uint8(I); |
35436 | case PT_Sint16: |
35437 | return emitShrUint16Sint16(I); |
35438 | case PT_Uint16: |
35439 | return emitShrUint16Uint16(I); |
35440 | case PT_Sint32: |
35441 | return emitShrUint16Sint32(I); |
35442 | case PT_Uint32: |
35443 | return emitShrUint16Uint32(I); |
35444 | case PT_Sint64: |
35445 | return emitShrUint16Sint64(I); |
35446 | case PT_Uint64: |
35447 | return emitShrUint16Uint64(I); |
35448 | case PT_IntAP: |
35449 | return emitShrUint16IntAP(I); |
35450 | case PT_IntAPS: |
35451 | return emitShrUint16IntAPS(I); |
35452 | default: llvm_unreachable("invalid type: emitShr" ); |
35453 | } |
35454 | llvm_unreachable("invalid enum value" ); |
35455 | case PT_Sint32: |
35456 | switch (T1) { |
35457 | case PT_Sint8: |
35458 | return emitShrSint32Sint8(I); |
35459 | case PT_Uint8: |
35460 | return emitShrSint32Uint8(I); |
35461 | case PT_Sint16: |
35462 | return emitShrSint32Sint16(I); |
35463 | case PT_Uint16: |
35464 | return emitShrSint32Uint16(I); |
35465 | case PT_Sint32: |
35466 | return emitShrSint32Sint32(I); |
35467 | case PT_Uint32: |
35468 | return emitShrSint32Uint32(I); |
35469 | case PT_Sint64: |
35470 | return emitShrSint32Sint64(I); |
35471 | case PT_Uint64: |
35472 | return emitShrSint32Uint64(I); |
35473 | case PT_IntAP: |
35474 | return emitShrSint32IntAP(I); |
35475 | case PT_IntAPS: |
35476 | return emitShrSint32IntAPS(I); |
35477 | default: llvm_unreachable("invalid type: emitShr" ); |
35478 | } |
35479 | llvm_unreachable("invalid enum value" ); |
35480 | case PT_Uint32: |
35481 | switch (T1) { |
35482 | case PT_Sint8: |
35483 | return emitShrUint32Sint8(I); |
35484 | case PT_Uint8: |
35485 | return emitShrUint32Uint8(I); |
35486 | case PT_Sint16: |
35487 | return emitShrUint32Sint16(I); |
35488 | case PT_Uint16: |
35489 | return emitShrUint32Uint16(I); |
35490 | case PT_Sint32: |
35491 | return emitShrUint32Sint32(I); |
35492 | case PT_Uint32: |
35493 | return emitShrUint32Uint32(I); |
35494 | case PT_Sint64: |
35495 | return emitShrUint32Sint64(I); |
35496 | case PT_Uint64: |
35497 | return emitShrUint32Uint64(I); |
35498 | case PT_IntAP: |
35499 | return emitShrUint32IntAP(I); |
35500 | case PT_IntAPS: |
35501 | return emitShrUint32IntAPS(I); |
35502 | default: llvm_unreachable("invalid type: emitShr" ); |
35503 | } |
35504 | llvm_unreachable("invalid enum value" ); |
35505 | case PT_Sint64: |
35506 | switch (T1) { |
35507 | case PT_Sint8: |
35508 | return emitShrSint64Sint8(I); |
35509 | case PT_Uint8: |
35510 | return emitShrSint64Uint8(I); |
35511 | case PT_Sint16: |
35512 | return emitShrSint64Sint16(I); |
35513 | case PT_Uint16: |
35514 | return emitShrSint64Uint16(I); |
35515 | case PT_Sint32: |
35516 | return emitShrSint64Sint32(I); |
35517 | case PT_Uint32: |
35518 | return emitShrSint64Uint32(I); |
35519 | case PT_Sint64: |
35520 | return emitShrSint64Sint64(I); |
35521 | case PT_Uint64: |
35522 | return emitShrSint64Uint64(I); |
35523 | case PT_IntAP: |
35524 | return emitShrSint64IntAP(I); |
35525 | case PT_IntAPS: |
35526 | return emitShrSint64IntAPS(I); |
35527 | default: llvm_unreachable("invalid type: emitShr" ); |
35528 | } |
35529 | llvm_unreachable("invalid enum value" ); |
35530 | case PT_Uint64: |
35531 | switch (T1) { |
35532 | case PT_Sint8: |
35533 | return emitShrUint64Sint8(I); |
35534 | case PT_Uint8: |
35535 | return emitShrUint64Uint8(I); |
35536 | case PT_Sint16: |
35537 | return emitShrUint64Sint16(I); |
35538 | case PT_Uint16: |
35539 | return emitShrUint64Uint16(I); |
35540 | case PT_Sint32: |
35541 | return emitShrUint64Sint32(I); |
35542 | case PT_Uint32: |
35543 | return emitShrUint64Uint32(I); |
35544 | case PT_Sint64: |
35545 | return emitShrUint64Sint64(I); |
35546 | case PT_Uint64: |
35547 | return emitShrUint64Uint64(I); |
35548 | case PT_IntAP: |
35549 | return emitShrUint64IntAP(I); |
35550 | case PT_IntAPS: |
35551 | return emitShrUint64IntAPS(I); |
35552 | default: llvm_unreachable("invalid type: emitShr" ); |
35553 | } |
35554 | llvm_unreachable("invalid enum value" ); |
35555 | case PT_IntAP: |
35556 | switch (T1) { |
35557 | case PT_Sint8: |
35558 | return emitShrIntAPSint8(I); |
35559 | case PT_Uint8: |
35560 | return emitShrIntAPUint8(I); |
35561 | case PT_Sint16: |
35562 | return emitShrIntAPSint16(I); |
35563 | case PT_Uint16: |
35564 | return emitShrIntAPUint16(I); |
35565 | case PT_Sint32: |
35566 | return emitShrIntAPSint32(I); |
35567 | case PT_Uint32: |
35568 | return emitShrIntAPUint32(I); |
35569 | case PT_Sint64: |
35570 | return emitShrIntAPSint64(I); |
35571 | case PT_Uint64: |
35572 | return emitShrIntAPUint64(I); |
35573 | case PT_IntAP: |
35574 | return emitShrIntAPIntAP(I); |
35575 | case PT_IntAPS: |
35576 | return emitShrIntAPIntAPS(I); |
35577 | default: llvm_unreachable("invalid type: emitShr" ); |
35578 | } |
35579 | llvm_unreachable("invalid enum value" ); |
35580 | case PT_IntAPS: |
35581 | switch (T1) { |
35582 | case PT_Sint8: |
35583 | return emitShrIntAPSSint8(I); |
35584 | case PT_Uint8: |
35585 | return emitShrIntAPSUint8(I); |
35586 | case PT_Sint16: |
35587 | return emitShrIntAPSSint16(I); |
35588 | case PT_Uint16: |
35589 | return emitShrIntAPSUint16(I); |
35590 | case PT_Sint32: |
35591 | return emitShrIntAPSSint32(I); |
35592 | case PT_Uint32: |
35593 | return emitShrIntAPSUint32(I); |
35594 | case PT_Sint64: |
35595 | return emitShrIntAPSSint64(I); |
35596 | case PT_Uint64: |
35597 | return emitShrIntAPSUint64(I); |
35598 | case PT_IntAP: |
35599 | return emitShrIntAPSIntAP(I); |
35600 | case PT_IntAPS: |
35601 | return emitShrIntAPSIntAPS(I); |
35602 | default: llvm_unreachable("invalid type: emitShr" ); |
35603 | } |
35604 | llvm_unreachable("invalid enum value" ); |
35605 | default: llvm_unreachable("invalid type: emitShr" ); |
35606 | } |
35607 | llvm_unreachable("invalid enum value" ); |
35608 | } |
35609 | #endif |
35610 | #ifdef GET_LINK_IMPL |
35611 | bool ByteCodeEmitter::emitShrSint8Sint8(const SourceInfo &L) { |
35612 | return emitOp<>(OP_ShrSint8Sint8, L); |
35613 | } |
35614 | bool ByteCodeEmitter::emitShrSint8Uint8(const SourceInfo &L) { |
35615 | return emitOp<>(OP_ShrSint8Uint8, L); |
35616 | } |
35617 | bool ByteCodeEmitter::emitShrSint8Sint16(const SourceInfo &L) { |
35618 | return emitOp<>(OP_ShrSint8Sint16, L); |
35619 | } |
35620 | bool ByteCodeEmitter::emitShrSint8Uint16(const SourceInfo &L) { |
35621 | return emitOp<>(OP_ShrSint8Uint16, L); |
35622 | } |
35623 | bool ByteCodeEmitter::emitShrSint8Sint32(const SourceInfo &L) { |
35624 | return emitOp<>(OP_ShrSint8Sint32, L); |
35625 | } |
35626 | bool ByteCodeEmitter::emitShrSint8Uint32(const SourceInfo &L) { |
35627 | return emitOp<>(OP_ShrSint8Uint32, L); |
35628 | } |
35629 | bool ByteCodeEmitter::emitShrSint8Sint64(const SourceInfo &L) { |
35630 | return emitOp<>(OP_ShrSint8Sint64, L); |
35631 | } |
35632 | bool ByteCodeEmitter::emitShrSint8Uint64(const SourceInfo &L) { |
35633 | return emitOp<>(OP_ShrSint8Uint64, L); |
35634 | } |
35635 | bool ByteCodeEmitter::emitShrSint8IntAP(const SourceInfo &L) { |
35636 | return emitOp<>(OP_ShrSint8IntAP, L); |
35637 | } |
35638 | bool ByteCodeEmitter::emitShrSint8IntAPS(const SourceInfo &L) { |
35639 | return emitOp<>(OP_ShrSint8IntAPS, L); |
35640 | } |
35641 | bool ByteCodeEmitter::emitShrUint8Sint8(const SourceInfo &L) { |
35642 | return emitOp<>(OP_ShrUint8Sint8, L); |
35643 | } |
35644 | bool ByteCodeEmitter::emitShrUint8Uint8(const SourceInfo &L) { |
35645 | return emitOp<>(OP_ShrUint8Uint8, L); |
35646 | } |
35647 | bool ByteCodeEmitter::emitShrUint8Sint16(const SourceInfo &L) { |
35648 | return emitOp<>(OP_ShrUint8Sint16, L); |
35649 | } |
35650 | bool ByteCodeEmitter::emitShrUint8Uint16(const SourceInfo &L) { |
35651 | return emitOp<>(OP_ShrUint8Uint16, L); |
35652 | } |
35653 | bool ByteCodeEmitter::emitShrUint8Sint32(const SourceInfo &L) { |
35654 | return emitOp<>(OP_ShrUint8Sint32, L); |
35655 | } |
35656 | bool ByteCodeEmitter::emitShrUint8Uint32(const SourceInfo &L) { |
35657 | return emitOp<>(OP_ShrUint8Uint32, L); |
35658 | } |
35659 | bool ByteCodeEmitter::emitShrUint8Sint64(const SourceInfo &L) { |
35660 | return emitOp<>(OP_ShrUint8Sint64, L); |
35661 | } |
35662 | bool ByteCodeEmitter::emitShrUint8Uint64(const SourceInfo &L) { |
35663 | return emitOp<>(OP_ShrUint8Uint64, L); |
35664 | } |
35665 | bool ByteCodeEmitter::emitShrUint8IntAP(const SourceInfo &L) { |
35666 | return emitOp<>(OP_ShrUint8IntAP, L); |
35667 | } |
35668 | bool ByteCodeEmitter::emitShrUint8IntAPS(const SourceInfo &L) { |
35669 | return emitOp<>(OP_ShrUint8IntAPS, L); |
35670 | } |
35671 | bool ByteCodeEmitter::emitShrSint16Sint8(const SourceInfo &L) { |
35672 | return emitOp<>(OP_ShrSint16Sint8, L); |
35673 | } |
35674 | bool ByteCodeEmitter::emitShrSint16Uint8(const SourceInfo &L) { |
35675 | return emitOp<>(OP_ShrSint16Uint8, L); |
35676 | } |
35677 | bool ByteCodeEmitter::emitShrSint16Sint16(const SourceInfo &L) { |
35678 | return emitOp<>(OP_ShrSint16Sint16, L); |
35679 | } |
35680 | bool ByteCodeEmitter::emitShrSint16Uint16(const SourceInfo &L) { |
35681 | return emitOp<>(OP_ShrSint16Uint16, L); |
35682 | } |
35683 | bool ByteCodeEmitter::emitShrSint16Sint32(const SourceInfo &L) { |
35684 | return emitOp<>(OP_ShrSint16Sint32, L); |
35685 | } |
35686 | bool ByteCodeEmitter::emitShrSint16Uint32(const SourceInfo &L) { |
35687 | return emitOp<>(OP_ShrSint16Uint32, L); |
35688 | } |
35689 | bool ByteCodeEmitter::emitShrSint16Sint64(const SourceInfo &L) { |
35690 | return emitOp<>(OP_ShrSint16Sint64, L); |
35691 | } |
35692 | bool ByteCodeEmitter::emitShrSint16Uint64(const SourceInfo &L) { |
35693 | return emitOp<>(OP_ShrSint16Uint64, L); |
35694 | } |
35695 | bool ByteCodeEmitter::emitShrSint16IntAP(const SourceInfo &L) { |
35696 | return emitOp<>(OP_ShrSint16IntAP, L); |
35697 | } |
35698 | bool ByteCodeEmitter::emitShrSint16IntAPS(const SourceInfo &L) { |
35699 | return emitOp<>(OP_ShrSint16IntAPS, L); |
35700 | } |
35701 | bool ByteCodeEmitter::emitShrUint16Sint8(const SourceInfo &L) { |
35702 | return emitOp<>(OP_ShrUint16Sint8, L); |
35703 | } |
35704 | bool ByteCodeEmitter::emitShrUint16Uint8(const SourceInfo &L) { |
35705 | return emitOp<>(OP_ShrUint16Uint8, L); |
35706 | } |
35707 | bool ByteCodeEmitter::emitShrUint16Sint16(const SourceInfo &L) { |
35708 | return emitOp<>(OP_ShrUint16Sint16, L); |
35709 | } |
35710 | bool ByteCodeEmitter::emitShrUint16Uint16(const SourceInfo &L) { |
35711 | return emitOp<>(OP_ShrUint16Uint16, L); |
35712 | } |
35713 | bool ByteCodeEmitter::emitShrUint16Sint32(const SourceInfo &L) { |
35714 | return emitOp<>(OP_ShrUint16Sint32, L); |
35715 | } |
35716 | bool ByteCodeEmitter::emitShrUint16Uint32(const SourceInfo &L) { |
35717 | return emitOp<>(OP_ShrUint16Uint32, L); |
35718 | } |
35719 | bool ByteCodeEmitter::emitShrUint16Sint64(const SourceInfo &L) { |
35720 | return emitOp<>(OP_ShrUint16Sint64, L); |
35721 | } |
35722 | bool ByteCodeEmitter::emitShrUint16Uint64(const SourceInfo &L) { |
35723 | return emitOp<>(OP_ShrUint16Uint64, L); |
35724 | } |
35725 | bool ByteCodeEmitter::emitShrUint16IntAP(const SourceInfo &L) { |
35726 | return emitOp<>(OP_ShrUint16IntAP, L); |
35727 | } |
35728 | bool ByteCodeEmitter::emitShrUint16IntAPS(const SourceInfo &L) { |
35729 | return emitOp<>(OP_ShrUint16IntAPS, L); |
35730 | } |
35731 | bool ByteCodeEmitter::emitShrSint32Sint8(const SourceInfo &L) { |
35732 | return emitOp<>(OP_ShrSint32Sint8, L); |
35733 | } |
35734 | bool ByteCodeEmitter::emitShrSint32Uint8(const SourceInfo &L) { |
35735 | return emitOp<>(OP_ShrSint32Uint8, L); |
35736 | } |
35737 | bool ByteCodeEmitter::emitShrSint32Sint16(const SourceInfo &L) { |
35738 | return emitOp<>(OP_ShrSint32Sint16, L); |
35739 | } |
35740 | bool ByteCodeEmitter::emitShrSint32Uint16(const SourceInfo &L) { |
35741 | return emitOp<>(OP_ShrSint32Uint16, L); |
35742 | } |
35743 | bool ByteCodeEmitter::emitShrSint32Sint32(const SourceInfo &L) { |
35744 | return emitOp<>(OP_ShrSint32Sint32, L); |
35745 | } |
35746 | bool ByteCodeEmitter::emitShrSint32Uint32(const SourceInfo &L) { |
35747 | return emitOp<>(OP_ShrSint32Uint32, L); |
35748 | } |
35749 | bool ByteCodeEmitter::emitShrSint32Sint64(const SourceInfo &L) { |
35750 | return emitOp<>(OP_ShrSint32Sint64, L); |
35751 | } |
35752 | bool ByteCodeEmitter::emitShrSint32Uint64(const SourceInfo &L) { |
35753 | return emitOp<>(OP_ShrSint32Uint64, L); |
35754 | } |
35755 | bool ByteCodeEmitter::emitShrSint32IntAP(const SourceInfo &L) { |
35756 | return emitOp<>(OP_ShrSint32IntAP, L); |
35757 | } |
35758 | bool ByteCodeEmitter::emitShrSint32IntAPS(const SourceInfo &L) { |
35759 | return emitOp<>(OP_ShrSint32IntAPS, L); |
35760 | } |
35761 | bool ByteCodeEmitter::emitShrUint32Sint8(const SourceInfo &L) { |
35762 | return emitOp<>(OP_ShrUint32Sint8, L); |
35763 | } |
35764 | bool ByteCodeEmitter::emitShrUint32Uint8(const SourceInfo &L) { |
35765 | return emitOp<>(OP_ShrUint32Uint8, L); |
35766 | } |
35767 | bool ByteCodeEmitter::emitShrUint32Sint16(const SourceInfo &L) { |
35768 | return emitOp<>(OP_ShrUint32Sint16, L); |
35769 | } |
35770 | bool ByteCodeEmitter::emitShrUint32Uint16(const SourceInfo &L) { |
35771 | return emitOp<>(OP_ShrUint32Uint16, L); |
35772 | } |
35773 | bool ByteCodeEmitter::emitShrUint32Sint32(const SourceInfo &L) { |
35774 | return emitOp<>(OP_ShrUint32Sint32, L); |
35775 | } |
35776 | bool ByteCodeEmitter::emitShrUint32Uint32(const SourceInfo &L) { |
35777 | return emitOp<>(OP_ShrUint32Uint32, L); |
35778 | } |
35779 | bool ByteCodeEmitter::emitShrUint32Sint64(const SourceInfo &L) { |
35780 | return emitOp<>(OP_ShrUint32Sint64, L); |
35781 | } |
35782 | bool ByteCodeEmitter::emitShrUint32Uint64(const SourceInfo &L) { |
35783 | return emitOp<>(OP_ShrUint32Uint64, L); |
35784 | } |
35785 | bool ByteCodeEmitter::emitShrUint32IntAP(const SourceInfo &L) { |
35786 | return emitOp<>(OP_ShrUint32IntAP, L); |
35787 | } |
35788 | bool ByteCodeEmitter::emitShrUint32IntAPS(const SourceInfo &L) { |
35789 | return emitOp<>(OP_ShrUint32IntAPS, L); |
35790 | } |
35791 | bool ByteCodeEmitter::emitShrSint64Sint8(const SourceInfo &L) { |
35792 | return emitOp<>(OP_ShrSint64Sint8, L); |
35793 | } |
35794 | bool ByteCodeEmitter::emitShrSint64Uint8(const SourceInfo &L) { |
35795 | return emitOp<>(OP_ShrSint64Uint8, L); |
35796 | } |
35797 | bool ByteCodeEmitter::emitShrSint64Sint16(const SourceInfo &L) { |
35798 | return emitOp<>(OP_ShrSint64Sint16, L); |
35799 | } |
35800 | bool ByteCodeEmitter::emitShrSint64Uint16(const SourceInfo &L) { |
35801 | return emitOp<>(OP_ShrSint64Uint16, L); |
35802 | } |
35803 | bool ByteCodeEmitter::emitShrSint64Sint32(const SourceInfo &L) { |
35804 | return emitOp<>(OP_ShrSint64Sint32, L); |
35805 | } |
35806 | bool ByteCodeEmitter::emitShrSint64Uint32(const SourceInfo &L) { |
35807 | return emitOp<>(OP_ShrSint64Uint32, L); |
35808 | } |
35809 | bool ByteCodeEmitter::emitShrSint64Sint64(const SourceInfo &L) { |
35810 | return emitOp<>(OP_ShrSint64Sint64, L); |
35811 | } |
35812 | bool ByteCodeEmitter::emitShrSint64Uint64(const SourceInfo &L) { |
35813 | return emitOp<>(OP_ShrSint64Uint64, L); |
35814 | } |
35815 | bool ByteCodeEmitter::emitShrSint64IntAP(const SourceInfo &L) { |
35816 | return emitOp<>(OP_ShrSint64IntAP, L); |
35817 | } |
35818 | bool ByteCodeEmitter::emitShrSint64IntAPS(const SourceInfo &L) { |
35819 | return emitOp<>(OP_ShrSint64IntAPS, L); |
35820 | } |
35821 | bool ByteCodeEmitter::emitShrUint64Sint8(const SourceInfo &L) { |
35822 | return emitOp<>(OP_ShrUint64Sint8, L); |
35823 | } |
35824 | bool ByteCodeEmitter::emitShrUint64Uint8(const SourceInfo &L) { |
35825 | return emitOp<>(OP_ShrUint64Uint8, L); |
35826 | } |
35827 | bool ByteCodeEmitter::emitShrUint64Sint16(const SourceInfo &L) { |
35828 | return emitOp<>(OP_ShrUint64Sint16, L); |
35829 | } |
35830 | bool ByteCodeEmitter::emitShrUint64Uint16(const SourceInfo &L) { |
35831 | return emitOp<>(OP_ShrUint64Uint16, L); |
35832 | } |
35833 | bool ByteCodeEmitter::emitShrUint64Sint32(const SourceInfo &L) { |
35834 | return emitOp<>(OP_ShrUint64Sint32, L); |
35835 | } |
35836 | bool ByteCodeEmitter::emitShrUint64Uint32(const SourceInfo &L) { |
35837 | return emitOp<>(OP_ShrUint64Uint32, L); |
35838 | } |
35839 | bool ByteCodeEmitter::emitShrUint64Sint64(const SourceInfo &L) { |
35840 | return emitOp<>(OP_ShrUint64Sint64, L); |
35841 | } |
35842 | bool ByteCodeEmitter::emitShrUint64Uint64(const SourceInfo &L) { |
35843 | return emitOp<>(OP_ShrUint64Uint64, L); |
35844 | } |
35845 | bool ByteCodeEmitter::emitShrUint64IntAP(const SourceInfo &L) { |
35846 | return emitOp<>(OP_ShrUint64IntAP, L); |
35847 | } |
35848 | bool ByteCodeEmitter::emitShrUint64IntAPS(const SourceInfo &L) { |
35849 | return emitOp<>(OP_ShrUint64IntAPS, L); |
35850 | } |
35851 | bool ByteCodeEmitter::emitShrIntAPSint8(const SourceInfo &L) { |
35852 | return emitOp<>(OP_ShrIntAPSint8, L); |
35853 | } |
35854 | bool ByteCodeEmitter::emitShrIntAPUint8(const SourceInfo &L) { |
35855 | return emitOp<>(OP_ShrIntAPUint8, L); |
35856 | } |
35857 | bool ByteCodeEmitter::emitShrIntAPSint16(const SourceInfo &L) { |
35858 | return emitOp<>(OP_ShrIntAPSint16, L); |
35859 | } |
35860 | bool ByteCodeEmitter::emitShrIntAPUint16(const SourceInfo &L) { |
35861 | return emitOp<>(OP_ShrIntAPUint16, L); |
35862 | } |
35863 | bool ByteCodeEmitter::emitShrIntAPSint32(const SourceInfo &L) { |
35864 | return emitOp<>(OP_ShrIntAPSint32, L); |
35865 | } |
35866 | bool ByteCodeEmitter::emitShrIntAPUint32(const SourceInfo &L) { |
35867 | return emitOp<>(OP_ShrIntAPUint32, L); |
35868 | } |
35869 | bool ByteCodeEmitter::emitShrIntAPSint64(const SourceInfo &L) { |
35870 | return emitOp<>(OP_ShrIntAPSint64, L); |
35871 | } |
35872 | bool ByteCodeEmitter::emitShrIntAPUint64(const SourceInfo &L) { |
35873 | return emitOp<>(OP_ShrIntAPUint64, L); |
35874 | } |
35875 | bool ByteCodeEmitter::emitShrIntAPIntAP(const SourceInfo &L) { |
35876 | return emitOp<>(OP_ShrIntAPIntAP, L); |
35877 | } |
35878 | bool ByteCodeEmitter::emitShrIntAPIntAPS(const SourceInfo &L) { |
35879 | return emitOp<>(OP_ShrIntAPIntAPS, L); |
35880 | } |
35881 | bool ByteCodeEmitter::emitShrIntAPSSint8(const SourceInfo &L) { |
35882 | return emitOp<>(OP_ShrIntAPSSint8, L); |
35883 | } |
35884 | bool ByteCodeEmitter::emitShrIntAPSUint8(const SourceInfo &L) { |
35885 | return emitOp<>(OP_ShrIntAPSUint8, L); |
35886 | } |
35887 | bool ByteCodeEmitter::emitShrIntAPSSint16(const SourceInfo &L) { |
35888 | return emitOp<>(OP_ShrIntAPSSint16, L); |
35889 | } |
35890 | bool ByteCodeEmitter::emitShrIntAPSUint16(const SourceInfo &L) { |
35891 | return emitOp<>(OP_ShrIntAPSUint16, L); |
35892 | } |
35893 | bool ByteCodeEmitter::emitShrIntAPSSint32(const SourceInfo &L) { |
35894 | return emitOp<>(OP_ShrIntAPSSint32, L); |
35895 | } |
35896 | bool ByteCodeEmitter::emitShrIntAPSUint32(const SourceInfo &L) { |
35897 | return emitOp<>(OP_ShrIntAPSUint32, L); |
35898 | } |
35899 | bool ByteCodeEmitter::emitShrIntAPSSint64(const SourceInfo &L) { |
35900 | return emitOp<>(OP_ShrIntAPSSint64, L); |
35901 | } |
35902 | bool ByteCodeEmitter::emitShrIntAPSUint64(const SourceInfo &L) { |
35903 | return emitOp<>(OP_ShrIntAPSUint64, L); |
35904 | } |
35905 | bool ByteCodeEmitter::emitShrIntAPSIntAP(const SourceInfo &L) { |
35906 | return emitOp<>(OP_ShrIntAPSIntAP, L); |
35907 | } |
35908 | bool ByteCodeEmitter::emitShrIntAPSIntAPS(const SourceInfo &L) { |
35909 | return emitOp<>(OP_ShrIntAPSIntAPS, L); |
35910 | } |
35911 | #endif |
35912 | #ifdef GET_EVAL_IMPL |
35913 | bool EvalEmitter::emitShrSint8Sint8(const SourceInfo &L) { |
35914 | if (!isActive()) return true; |
35915 | CurrentSource = L; |
35916 | return Shr<PT_Sint8, PT_Sint8>(S, OpPC); |
35917 | } |
35918 | bool EvalEmitter::emitShrSint8Uint8(const SourceInfo &L) { |
35919 | if (!isActive()) return true; |
35920 | CurrentSource = L; |
35921 | return Shr<PT_Sint8, PT_Uint8>(S, OpPC); |
35922 | } |
35923 | bool EvalEmitter::emitShrSint8Sint16(const SourceInfo &L) { |
35924 | if (!isActive()) return true; |
35925 | CurrentSource = L; |
35926 | return Shr<PT_Sint8, PT_Sint16>(S, OpPC); |
35927 | } |
35928 | bool EvalEmitter::emitShrSint8Uint16(const SourceInfo &L) { |
35929 | if (!isActive()) return true; |
35930 | CurrentSource = L; |
35931 | return Shr<PT_Sint8, PT_Uint16>(S, OpPC); |
35932 | } |
35933 | bool EvalEmitter::emitShrSint8Sint32(const SourceInfo &L) { |
35934 | if (!isActive()) return true; |
35935 | CurrentSource = L; |
35936 | return Shr<PT_Sint8, PT_Sint32>(S, OpPC); |
35937 | } |
35938 | bool EvalEmitter::emitShrSint8Uint32(const SourceInfo &L) { |
35939 | if (!isActive()) return true; |
35940 | CurrentSource = L; |
35941 | return Shr<PT_Sint8, PT_Uint32>(S, OpPC); |
35942 | } |
35943 | bool EvalEmitter::emitShrSint8Sint64(const SourceInfo &L) { |
35944 | if (!isActive()) return true; |
35945 | CurrentSource = L; |
35946 | return Shr<PT_Sint8, PT_Sint64>(S, OpPC); |
35947 | } |
35948 | bool EvalEmitter::emitShrSint8Uint64(const SourceInfo &L) { |
35949 | if (!isActive()) return true; |
35950 | CurrentSource = L; |
35951 | return Shr<PT_Sint8, PT_Uint64>(S, OpPC); |
35952 | } |
35953 | bool EvalEmitter::emitShrSint8IntAP(const SourceInfo &L) { |
35954 | if (!isActive()) return true; |
35955 | CurrentSource = L; |
35956 | return Shr<PT_Sint8, PT_IntAP>(S, OpPC); |
35957 | } |
35958 | bool EvalEmitter::emitShrSint8IntAPS(const SourceInfo &L) { |
35959 | if (!isActive()) return true; |
35960 | CurrentSource = L; |
35961 | return Shr<PT_Sint8, PT_IntAPS>(S, OpPC); |
35962 | } |
35963 | bool EvalEmitter::emitShrUint8Sint8(const SourceInfo &L) { |
35964 | if (!isActive()) return true; |
35965 | CurrentSource = L; |
35966 | return Shr<PT_Uint8, PT_Sint8>(S, OpPC); |
35967 | } |
35968 | bool EvalEmitter::emitShrUint8Uint8(const SourceInfo &L) { |
35969 | if (!isActive()) return true; |
35970 | CurrentSource = L; |
35971 | return Shr<PT_Uint8, PT_Uint8>(S, OpPC); |
35972 | } |
35973 | bool EvalEmitter::emitShrUint8Sint16(const SourceInfo &L) { |
35974 | if (!isActive()) return true; |
35975 | CurrentSource = L; |
35976 | return Shr<PT_Uint8, PT_Sint16>(S, OpPC); |
35977 | } |
35978 | bool EvalEmitter::emitShrUint8Uint16(const SourceInfo &L) { |
35979 | if (!isActive()) return true; |
35980 | CurrentSource = L; |
35981 | return Shr<PT_Uint8, PT_Uint16>(S, OpPC); |
35982 | } |
35983 | bool EvalEmitter::emitShrUint8Sint32(const SourceInfo &L) { |
35984 | if (!isActive()) return true; |
35985 | CurrentSource = L; |
35986 | return Shr<PT_Uint8, PT_Sint32>(S, OpPC); |
35987 | } |
35988 | bool EvalEmitter::emitShrUint8Uint32(const SourceInfo &L) { |
35989 | if (!isActive()) return true; |
35990 | CurrentSource = L; |
35991 | return Shr<PT_Uint8, PT_Uint32>(S, OpPC); |
35992 | } |
35993 | bool EvalEmitter::emitShrUint8Sint64(const SourceInfo &L) { |
35994 | if (!isActive()) return true; |
35995 | CurrentSource = L; |
35996 | return Shr<PT_Uint8, PT_Sint64>(S, OpPC); |
35997 | } |
35998 | bool EvalEmitter::emitShrUint8Uint64(const SourceInfo &L) { |
35999 | if (!isActive()) return true; |
36000 | CurrentSource = L; |
36001 | return Shr<PT_Uint8, PT_Uint64>(S, OpPC); |
36002 | } |
36003 | bool EvalEmitter::emitShrUint8IntAP(const SourceInfo &L) { |
36004 | if (!isActive()) return true; |
36005 | CurrentSource = L; |
36006 | return Shr<PT_Uint8, PT_IntAP>(S, OpPC); |
36007 | } |
36008 | bool EvalEmitter::emitShrUint8IntAPS(const SourceInfo &L) { |
36009 | if (!isActive()) return true; |
36010 | CurrentSource = L; |
36011 | return Shr<PT_Uint8, PT_IntAPS>(S, OpPC); |
36012 | } |
36013 | bool EvalEmitter::emitShrSint16Sint8(const SourceInfo &L) { |
36014 | if (!isActive()) return true; |
36015 | CurrentSource = L; |
36016 | return Shr<PT_Sint16, PT_Sint8>(S, OpPC); |
36017 | } |
36018 | bool EvalEmitter::emitShrSint16Uint8(const SourceInfo &L) { |
36019 | if (!isActive()) return true; |
36020 | CurrentSource = L; |
36021 | return Shr<PT_Sint16, PT_Uint8>(S, OpPC); |
36022 | } |
36023 | bool EvalEmitter::emitShrSint16Sint16(const SourceInfo &L) { |
36024 | if (!isActive()) return true; |
36025 | CurrentSource = L; |
36026 | return Shr<PT_Sint16, PT_Sint16>(S, OpPC); |
36027 | } |
36028 | bool EvalEmitter::emitShrSint16Uint16(const SourceInfo &L) { |
36029 | if (!isActive()) return true; |
36030 | CurrentSource = L; |
36031 | return Shr<PT_Sint16, PT_Uint16>(S, OpPC); |
36032 | } |
36033 | bool EvalEmitter::emitShrSint16Sint32(const SourceInfo &L) { |
36034 | if (!isActive()) return true; |
36035 | CurrentSource = L; |
36036 | return Shr<PT_Sint16, PT_Sint32>(S, OpPC); |
36037 | } |
36038 | bool EvalEmitter::emitShrSint16Uint32(const SourceInfo &L) { |
36039 | if (!isActive()) return true; |
36040 | CurrentSource = L; |
36041 | return Shr<PT_Sint16, PT_Uint32>(S, OpPC); |
36042 | } |
36043 | bool EvalEmitter::emitShrSint16Sint64(const SourceInfo &L) { |
36044 | if (!isActive()) return true; |
36045 | CurrentSource = L; |
36046 | return Shr<PT_Sint16, PT_Sint64>(S, OpPC); |
36047 | } |
36048 | bool EvalEmitter::emitShrSint16Uint64(const SourceInfo &L) { |
36049 | if (!isActive()) return true; |
36050 | CurrentSource = L; |
36051 | return Shr<PT_Sint16, PT_Uint64>(S, OpPC); |
36052 | } |
36053 | bool EvalEmitter::emitShrSint16IntAP(const SourceInfo &L) { |
36054 | if (!isActive()) return true; |
36055 | CurrentSource = L; |
36056 | return Shr<PT_Sint16, PT_IntAP>(S, OpPC); |
36057 | } |
36058 | bool EvalEmitter::emitShrSint16IntAPS(const SourceInfo &L) { |
36059 | if (!isActive()) return true; |
36060 | CurrentSource = L; |
36061 | return Shr<PT_Sint16, PT_IntAPS>(S, OpPC); |
36062 | } |
36063 | bool EvalEmitter::emitShrUint16Sint8(const SourceInfo &L) { |
36064 | if (!isActive()) return true; |
36065 | CurrentSource = L; |
36066 | return Shr<PT_Uint16, PT_Sint8>(S, OpPC); |
36067 | } |
36068 | bool EvalEmitter::emitShrUint16Uint8(const SourceInfo &L) { |
36069 | if (!isActive()) return true; |
36070 | CurrentSource = L; |
36071 | return Shr<PT_Uint16, PT_Uint8>(S, OpPC); |
36072 | } |
36073 | bool EvalEmitter::emitShrUint16Sint16(const SourceInfo &L) { |
36074 | if (!isActive()) return true; |
36075 | CurrentSource = L; |
36076 | return Shr<PT_Uint16, PT_Sint16>(S, OpPC); |
36077 | } |
36078 | bool EvalEmitter::emitShrUint16Uint16(const SourceInfo &L) { |
36079 | if (!isActive()) return true; |
36080 | CurrentSource = L; |
36081 | return Shr<PT_Uint16, PT_Uint16>(S, OpPC); |
36082 | } |
36083 | bool EvalEmitter::emitShrUint16Sint32(const SourceInfo &L) { |
36084 | if (!isActive()) return true; |
36085 | CurrentSource = L; |
36086 | return Shr<PT_Uint16, PT_Sint32>(S, OpPC); |
36087 | } |
36088 | bool EvalEmitter::emitShrUint16Uint32(const SourceInfo &L) { |
36089 | if (!isActive()) return true; |
36090 | CurrentSource = L; |
36091 | return Shr<PT_Uint16, PT_Uint32>(S, OpPC); |
36092 | } |
36093 | bool EvalEmitter::emitShrUint16Sint64(const SourceInfo &L) { |
36094 | if (!isActive()) return true; |
36095 | CurrentSource = L; |
36096 | return Shr<PT_Uint16, PT_Sint64>(S, OpPC); |
36097 | } |
36098 | bool EvalEmitter::emitShrUint16Uint64(const SourceInfo &L) { |
36099 | if (!isActive()) return true; |
36100 | CurrentSource = L; |
36101 | return Shr<PT_Uint16, PT_Uint64>(S, OpPC); |
36102 | } |
36103 | bool EvalEmitter::emitShrUint16IntAP(const SourceInfo &L) { |
36104 | if (!isActive()) return true; |
36105 | CurrentSource = L; |
36106 | return Shr<PT_Uint16, PT_IntAP>(S, OpPC); |
36107 | } |
36108 | bool EvalEmitter::emitShrUint16IntAPS(const SourceInfo &L) { |
36109 | if (!isActive()) return true; |
36110 | CurrentSource = L; |
36111 | return Shr<PT_Uint16, PT_IntAPS>(S, OpPC); |
36112 | } |
36113 | bool EvalEmitter::emitShrSint32Sint8(const SourceInfo &L) { |
36114 | if (!isActive()) return true; |
36115 | CurrentSource = L; |
36116 | return Shr<PT_Sint32, PT_Sint8>(S, OpPC); |
36117 | } |
36118 | bool EvalEmitter::emitShrSint32Uint8(const SourceInfo &L) { |
36119 | if (!isActive()) return true; |
36120 | CurrentSource = L; |
36121 | return Shr<PT_Sint32, PT_Uint8>(S, OpPC); |
36122 | } |
36123 | bool EvalEmitter::emitShrSint32Sint16(const SourceInfo &L) { |
36124 | if (!isActive()) return true; |
36125 | CurrentSource = L; |
36126 | return Shr<PT_Sint32, PT_Sint16>(S, OpPC); |
36127 | } |
36128 | bool EvalEmitter::emitShrSint32Uint16(const SourceInfo &L) { |
36129 | if (!isActive()) return true; |
36130 | CurrentSource = L; |
36131 | return Shr<PT_Sint32, PT_Uint16>(S, OpPC); |
36132 | } |
36133 | bool EvalEmitter::emitShrSint32Sint32(const SourceInfo &L) { |
36134 | if (!isActive()) return true; |
36135 | CurrentSource = L; |
36136 | return Shr<PT_Sint32, PT_Sint32>(S, OpPC); |
36137 | } |
36138 | bool EvalEmitter::emitShrSint32Uint32(const SourceInfo &L) { |
36139 | if (!isActive()) return true; |
36140 | CurrentSource = L; |
36141 | return Shr<PT_Sint32, PT_Uint32>(S, OpPC); |
36142 | } |
36143 | bool EvalEmitter::emitShrSint32Sint64(const SourceInfo &L) { |
36144 | if (!isActive()) return true; |
36145 | CurrentSource = L; |
36146 | return Shr<PT_Sint32, PT_Sint64>(S, OpPC); |
36147 | } |
36148 | bool EvalEmitter::emitShrSint32Uint64(const SourceInfo &L) { |
36149 | if (!isActive()) return true; |
36150 | CurrentSource = L; |
36151 | return Shr<PT_Sint32, PT_Uint64>(S, OpPC); |
36152 | } |
36153 | bool EvalEmitter::emitShrSint32IntAP(const SourceInfo &L) { |
36154 | if (!isActive()) return true; |
36155 | CurrentSource = L; |
36156 | return Shr<PT_Sint32, PT_IntAP>(S, OpPC); |
36157 | } |
36158 | bool EvalEmitter::emitShrSint32IntAPS(const SourceInfo &L) { |
36159 | if (!isActive()) return true; |
36160 | CurrentSource = L; |
36161 | return Shr<PT_Sint32, PT_IntAPS>(S, OpPC); |
36162 | } |
36163 | bool EvalEmitter::emitShrUint32Sint8(const SourceInfo &L) { |
36164 | if (!isActive()) return true; |
36165 | CurrentSource = L; |
36166 | return Shr<PT_Uint32, PT_Sint8>(S, OpPC); |
36167 | } |
36168 | bool EvalEmitter::emitShrUint32Uint8(const SourceInfo &L) { |
36169 | if (!isActive()) return true; |
36170 | CurrentSource = L; |
36171 | return Shr<PT_Uint32, PT_Uint8>(S, OpPC); |
36172 | } |
36173 | bool EvalEmitter::emitShrUint32Sint16(const SourceInfo &L) { |
36174 | if (!isActive()) return true; |
36175 | CurrentSource = L; |
36176 | return Shr<PT_Uint32, PT_Sint16>(S, OpPC); |
36177 | } |
36178 | bool EvalEmitter::emitShrUint32Uint16(const SourceInfo &L) { |
36179 | if (!isActive()) return true; |
36180 | CurrentSource = L; |
36181 | return Shr<PT_Uint32, PT_Uint16>(S, OpPC); |
36182 | } |
36183 | bool EvalEmitter::emitShrUint32Sint32(const SourceInfo &L) { |
36184 | if (!isActive()) return true; |
36185 | CurrentSource = L; |
36186 | return Shr<PT_Uint32, PT_Sint32>(S, OpPC); |
36187 | } |
36188 | bool EvalEmitter::emitShrUint32Uint32(const SourceInfo &L) { |
36189 | if (!isActive()) return true; |
36190 | CurrentSource = L; |
36191 | return Shr<PT_Uint32, PT_Uint32>(S, OpPC); |
36192 | } |
36193 | bool EvalEmitter::emitShrUint32Sint64(const SourceInfo &L) { |
36194 | if (!isActive()) return true; |
36195 | CurrentSource = L; |
36196 | return Shr<PT_Uint32, PT_Sint64>(S, OpPC); |
36197 | } |
36198 | bool EvalEmitter::emitShrUint32Uint64(const SourceInfo &L) { |
36199 | if (!isActive()) return true; |
36200 | CurrentSource = L; |
36201 | return Shr<PT_Uint32, PT_Uint64>(S, OpPC); |
36202 | } |
36203 | bool EvalEmitter::emitShrUint32IntAP(const SourceInfo &L) { |
36204 | if (!isActive()) return true; |
36205 | CurrentSource = L; |
36206 | return Shr<PT_Uint32, PT_IntAP>(S, OpPC); |
36207 | } |
36208 | bool EvalEmitter::emitShrUint32IntAPS(const SourceInfo &L) { |
36209 | if (!isActive()) return true; |
36210 | CurrentSource = L; |
36211 | return Shr<PT_Uint32, PT_IntAPS>(S, OpPC); |
36212 | } |
36213 | bool EvalEmitter::emitShrSint64Sint8(const SourceInfo &L) { |
36214 | if (!isActive()) return true; |
36215 | CurrentSource = L; |
36216 | return Shr<PT_Sint64, PT_Sint8>(S, OpPC); |
36217 | } |
36218 | bool EvalEmitter::emitShrSint64Uint8(const SourceInfo &L) { |
36219 | if (!isActive()) return true; |
36220 | CurrentSource = L; |
36221 | return Shr<PT_Sint64, PT_Uint8>(S, OpPC); |
36222 | } |
36223 | bool EvalEmitter::emitShrSint64Sint16(const SourceInfo &L) { |
36224 | if (!isActive()) return true; |
36225 | CurrentSource = L; |
36226 | return Shr<PT_Sint64, PT_Sint16>(S, OpPC); |
36227 | } |
36228 | bool EvalEmitter::emitShrSint64Uint16(const SourceInfo &L) { |
36229 | if (!isActive()) return true; |
36230 | CurrentSource = L; |
36231 | return Shr<PT_Sint64, PT_Uint16>(S, OpPC); |
36232 | } |
36233 | bool EvalEmitter::emitShrSint64Sint32(const SourceInfo &L) { |
36234 | if (!isActive()) return true; |
36235 | CurrentSource = L; |
36236 | return Shr<PT_Sint64, PT_Sint32>(S, OpPC); |
36237 | } |
36238 | bool EvalEmitter::emitShrSint64Uint32(const SourceInfo &L) { |
36239 | if (!isActive()) return true; |
36240 | CurrentSource = L; |
36241 | return Shr<PT_Sint64, PT_Uint32>(S, OpPC); |
36242 | } |
36243 | bool EvalEmitter::emitShrSint64Sint64(const SourceInfo &L) { |
36244 | if (!isActive()) return true; |
36245 | CurrentSource = L; |
36246 | return Shr<PT_Sint64, PT_Sint64>(S, OpPC); |
36247 | } |
36248 | bool EvalEmitter::emitShrSint64Uint64(const SourceInfo &L) { |
36249 | if (!isActive()) return true; |
36250 | CurrentSource = L; |
36251 | return Shr<PT_Sint64, PT_Uint64>(S, OpPC); |
36252 | } |
36253 | bool EvalEmitter::emitShrSint64IntAP(const SourceInfo &L) { |
36254 | if (!isActive()) return true; |
36255 | CurrentSource = L; |
36256 | return Shr<PT_Sint64, PT_IntAP>(S, OpPC); |
36257 | } |
36258 | bool EvalEmitter::emitShrSint64IntAPS(const SourceInfo &L) { |
36259 | if (!isActive()) return true; |
36260 | CurrentSource = L; |
36261 | return Shr<PT_Sint64, PT_IntAPS>(S, OpPC); |
36262 | } |
36263 | bool EvalEmitter::emitShrUint64Sint8(const SourceInfo &L) { |
36264 | if (!isActive()) return true; |
36265 | CurrentSource = L; |
36266 | return Shr<PT_Uint64, PT_Sint8>(S, OpPC); |
36267 | } |
36268 | bool EvalEmitter::emitShrUint64Uint8(const SourceInfo &L) { |
36269 | if (!isActive()) return true; |
36270 | CurrentSource = L; |
36271 | return Shr<PT_Uint64, PT_Uint8>(S, OpPC); |
36272 | } |
36273 | bool EvalEmitter::emitShrUint64Sint16(const SourceInfo &L) { |
36274 | if (!isActive()) return true; |
36275 | CurrentSource = L; |
36276 | return Shr<PT_Uint64, PT_Sint16>(S, OpPC); |
36277 | } |
36278 | bool EvalEmitter::emitShrUint64Uint16(const SourceInfo &L) { |
36279 | if (!isActive()) return true; |
36280 | CurrentSource = L; |
36281 | return Shr<PT_Uint64, PT_Uint16>(S, OpPC); |
36282 | } |
36283 | bool EvalEmitter::emitShrUint64Sint32(const SourceInfo &L) { |
36284 | if (!isActive()) return true; |
36285 | CurrentSource = L; |
36286 | return Shr<PT_Uint64, PT_Sint32>(S, OpPC); |
36287 | } |
36288 | bool EvalEmitter::emitShrUint64Uint32(const SourceInfo &L) { |
36289 | if (!isActive()) return true; |
36290 | CurrentSource = L; |
36291 | return Shr<PT_Uint64, PT_Uint32>(S, OpPC); |
36292 | } |
36293 | bool EvalEmitter::emitShrUint64Sint64(const SourceInfo &L) { |
36294 | if (!isActive()) return true; |
36295 | CurrentSource = L; |
36296 | return Shr<PT_Uint64, PT_Sint64>(S, OpPC); |
36297 | } |
36298 | bool EvalEmitter::emitShrUint64Uint64(const SourceInfo &L) { |
36299 | if (!isActive()) return true; |
36300 | CurrentSource = L; |
36301 | return Shr<PT_Uint64, PT_Uint64>(S, OpPC); |
36302 | } |
36303 | bool EvalEmitter::emitShrUint64IntAP(const SourceInfo &L) { |
36304 | if (!isActive()) return true; |
36305 | CurrentSource = L; |
36306 | return Shr<PT_Uint64, PT_IntAP>(S, OpPC); |
36307 | } |
36308 | bool EvalEmitter::emitShrUint64IntAPS(const SourceInfo &L) { |
36309 | if (!isActive()) return true; |
36310 | CurrentSource = L; |
36311 | return Shr<PT_Uint64, PT_IntAPS>(S, OpPC); |
36312 | } |
36313 | bool EvalEmitter::emitShrIntAPSint8(const SourceInfo &L) { |
36314 | if (!isActive()) return true; |
36315 | CurrentSource = L; |
36316 | return Shr<PT_IntAP, PT_Sint8>(S, OpPC); |
36317 | } |
36318 | bool EvalEmitter::emitShrIntAPUint8(const SourceInfo &L) { |
36319 | if (!isActive()) return true; |
36320 | CurrentSource = L; |
36321 | return Shr<PT_IntAP, PT_Uint8>(S, OpPC); |
36322 | } |
36323 | bool EvalEmitter::emitShrIntAPSint16(const SourceInfo &L) { |
36324 | if (!isActive()) return true; |
36325 | CurrentSource = L; |
36326 | return Shr<PT_IntAP, PT_Sint16>(S, OpPC); |
36327 | } |
36328 | bool EvalEmitter::emitShrIntAPUint16(const SourceInfo &L) { |
36329 | if (!isActive()) return true; |
36330 | CurrentSource = L; |
36331 | return Shr<PT_IntAP, PT_Uint16>(S, OpPC); |
36332 | } |
36333 | bool EvalEmitter::emitShrIntAPSint32(const SourceInfo &L) { |
36334 | if (!isActive()) return true; |
36335 | CurrentSource = L; |
36336 | return Shr<PT_IntAP, PT_Sint32>(S, OpPC); |
36337 | } |
36338 | bool EvalEmitter::emitShrIntAPUint32(const SourceInfo &L) { |
36339 | if (!isActive()) return true; |
36340 | CurrentSource = L; |
36341 | return Shr<PT_IntAP, PT_Uint32>(S, OpPC); |
36342 | } |
36343 | bool EvalEmitter::emitShrIntAPSint64(const SourceInfo &L) { |
36344 | if (!isActive()) return true; |
36345 | CurrentSource = L; |
36346 | return Shr<PT_IntAP, PT_Sint64>(S, OpPC); |
36347 | } |
36348 | bool EvalEmitter::emitShrIntAPUint64(const SourceInfo &L) { |
36349 | if (!isActive()) return true; |
36350 | CurrentSource = L; |
36351 | return Shr<PT_IntAP, PT_Uint64>(S, OpPC); |
36352 | } |
36353 | bool EvalEmitter::emitShrIntAPIntAP(const SourceInfo &L) { |
36354 | if (!isActive()) return true; |
36355 | CurrentSource = L; |
36356 | return Shr<PT_IntAP, PT_IntAP>(S, OpPC); |
36357 | } |
36358 | bool EvalEmitter::emitShrIntAPIntAPS(const SourceInfo &L) { |
36359 | if (!isActive()) return true; |
36360 | CurrentSource = L; |
36361 | return Shr<PT_IntAP, PT_IntAPS>(S, OpPC); |
36362 | } |
36363 | bool EvalEmitter::emitShrIntAPSSint8(const SourceInfo &L) { |
36364 | if (!isActive()) return true; |
36365 | CurrentSource = L; |
36366 | return Shr<PT_IntAPS, PT_Sint8>(S, OpPC); |
36367 | } |
36368 | bool EvalEmitter::emitShrIntAPSUint8(const SourceInfo &L) { |
36369 | if (!isActive()) return true; |
36370 | CurrentSource = L; |
36371 | return Shr<PT_IntAPS, PT_Uint8>(S, OpPC); |
36372 | } |
36373 | bool EvalEmitter::emitShrIntAPSSint16(const SourceInfo &L) { |
36374 | if (!isActive()) return true; |
36375 | CurrentSource = L; |
36376 | return Shr<PT_IntAPS, PT_Sint16>(S, OpPC); |
36377 | } |
36378 | bool EvalEmitter::emitShrIntAPSUint16(const SourceInfo &L) { |
36379 | if (!isActive()) return true; |
36380 | CurrentSource = L; |
36381 | return Shr<PT_IntAPS, PT_Uint16>(S, OpPC); |
36382 | } |
36383 | bool EvalEmitter::emitShrIntAPSSint32(const SourceInfo &L) { |
36384 | if (!isActive()) return true; |
36385 | CurrentSource = L; |
36386 | return Shr<PT_IntAPS, PT_Sint32>(S, OpPC); |
36387 | } |
36388 | bool EvalEmitter::emitShrIntAPSUint32(const SourceInfo &L) { |
36389 | if (!isActive()) return true; |
36390 | CurrentSource = L; |
36391 | return Shr<PT_IntAPS, PT_Uint32>(S, OpPC); |
36392 | } |
36393 | bool EvalEmitter::emitShrIntAPSSint64(const SourceInfo &L) { |
36394 | if (!isActive()) return true; |
36395 | CurrentSource = L; |
36396 | return Shr<PT_IntAPS, PT_Sint64>(S, OpPC); |
36397 | } |
36398 | bool EvalEmitter::emitShrIntAPSUint64(const SourceInfo &L) { |
36399 | if (!isActive()) return true; |
36400 | CurrentSource = L; |
36401 | return Shr<PT_IntAPS, PT_Uint64>(S, OpPC); |
36402 | } |
36403 | bool EvalEmitter::emitShrIntAPSIntAP(const SourceInfo &L) { |
36404 | if (!isActive()) return true; |
36405 | CurrentSource = L; |
36406 | return Shr<PT_IntAPS, PT_IntAP>(S, OpPC); |
36407 | } |
36408 | bool EvalEmitter::emitShrIntAPSIntAPS(const SourceInfo &L) { |
36409 | if (!isActive()) return true; |
36410 | CurrentSource = L; |
36411 | return Shr<PT_IntAPS, PT_IntAPS>(S, OpPC); |
36412 | } |
36413 | #endif |
36414 | #ifdef GET_OPCODE_NAMES |
36415 | OP_SideEffect, |
36416 | #endif |
36417 | #ifdef GET_INTERP |
36418 | case OP_SideEffect: { |
36419 | if (!SideEffect(S, OpPC)) |
36420 | return false; |
36421 | continue; |
36422 | } |
36423 | #endif |
36424 | #ifdef GET_DISASM |
36425 | case OP_SideEffect: |
36426 | Text.Op = PrintName("SideEffect" ); |
36427 | break; |
36428 | #endif |
36429 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
36430 | bool emitSideEffect(const SourceInfo &); |
36431 | #endif |
36432 | #ifdef GET_LINK_IMPL |
36433 | bool ByteCodeEmitter::emitSideEffect(const SourceInfo &L) { |
36434 | return emitOp<>(OP_SideEffect, L); |
36435 | } |
36436 | #endif |
36437 | #ifdef GET_EVAL_IMPL |
36438 | bool EvalEmitter::emitSideEffect(const SourceInfo &L) { |
36439 | if (!isActive()) return true; |
36440 | CurrentSource = L; |
36441 | return SideEffect(S, OpPC); |
36442 | } |
36443 | #endif |
36444 | #ifdef GET_OPCODE_NAMES |
36445 | OP_SizelessVectorElementSize, |
36446 | #endif |
36447 | #ifdef GET_INTERP |
36448 | case OP_SizelessVectorElementSize: { |
36449 | if (!SizelessVectorElementSize(S, OpPC)) |
36450 | return false; |
36451 | continue; |
36452 | } |
36453 | #endif |
36454 | #ifdef GET_DISASM |
36455 | case OP_SizelessVectorElementSize: |
36456 | Text.Op = PrintName("SizelessVectorElementSize" ); |
36457 | break; |
36458 | #endif |
36459 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
36460 | bool emitSizelessVectorElementSize(const SourceInfo &); |
36461 | #endif |
36462 | #ifdef GET_LINK_IMPL |
36463 | bool ByteCodeEmitter::emitSizelessVectorElementSize(const SourceInfo &L) { |
36464 | return emitOp<>(OP_SizelessVectorElementSize, L); |
36465 | } |
36466 | #endif |
36467 | #ifdef GET_EVAL_IMPL |
36468 | bool EvalEmitter::emitSizelessVectorElementSize(const SourceInfo &L) { |
36469 | if (!isActive()) return true; |
36470 | CurrentSource = L; |
36471 | return SizelessVectorElementSize(S, OpPC); |
36472 | } |
36473 | #endif |
36474 | #ifdef GET_OPCODE_NAMES |
36475 | OP_StartLifetime, |
36476 | #endif |
36477 | #ifdef GET_INTERP |
36478 | case OP_StartLifetime: { |
36479 | if (!StartLifetime(S, OpPC)) |
36480 | return false; |
36481 | continue; |
36482 | } |
36483 | #endif |
36484 | #ifdef GET_DISASM |
36485 | case OP_StartLifetime: |
36486 | Text.Op = PrintName("StartLifetime" ); |
36487 | break; |
36488 | #endif |
36489 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
36490 | bool emitStartLifetime(const SourceInfo &); |
36491 | #endif |
36492 | #ifdef GET_LINK_IMPL |
36493 | bool ByteCodeEmitter::emitStartLifetime(const SourceInfo &L) { |
36494 | return emitOp<>(OP_StartLifetime, L); |
36495 | } |
36496 | #endif |
36497 | #ifdef GET_EVAL_IMPL |
36498 | bool EvalEmitter::emitStartLifetime(const SourceInfo &L) { |
36499 | if (!isActive()) return true; |
36500 | CurrentSource = L; |
36501 | return StartLifetime(S, OpPC); |
36502 | } |
36503 | #endif |
36504 | #ifdef GET_OPCODE_NAMES |
36505 | OP_StartSpeculation, |
36506 | #endif |
36507 | #ifdef GET_INTERP |
36508 | case OP_StartSpeculation: { |
36509 | if (!StartSpeculation(S, OpPC)) |
36510 | return false; |
36511 | continue; |
36512 | } |
36513 | #endif |
36514 | #ifdef GET_DISASM |
36515 | case OP_StartSpeculation: |
36516 | Text.Op = PrintName("StartSpeculation" ); |
36517 | break; |
36518 | #endif |
36519 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
36520 | bool emitStartSpeculation(const SourceInfo &); |
36521 | #endif |
36522 | #ifdef GET_LINK_IMPL |
36523 | bool ByteCodeEmitter::emitStartSpeculation(const SourceInfo &L) { |
36524 | return emitOp<>(OP_StartSpeculation, L); |
36525 | } |
36526 | #endif |
36527 | #ifdef GET_EVAL_IMPL |
36528 | bool EvalEmitter::emitStartSpeculation(const SourceInfo &L) { |
36529 | if (!isActive()) return true; |
36530 | CurrentSource = L; |
36531 | return StartSpeculation(S, OpPC); |
36532 | } |
36533 | #endif |
36534 | #ifdef GET_OPCODE_NAMES |
36535 | OP_StoreSint8, |
36536 | OP_StoreUint8, |
36537 | OP_StoreSint16, |
36538 | OP_StoreUint16, |
36539 | OP_StoreSint32, |
36540 | OP_StoreUint32, |
36541 | OP_StoreSint64, |
36542 | OP_StoreUint64, |
36543 | OP_StoreIntAP, |
36544 | OP_StoreIntAPS, |
36545 | OP_StoreBool, |
36546 | OP_StoreFixedPoint, |
36547 | OP_StorePtr, |
36548 | OP_StoreMemberPtr, |
36549 | OP_StoreFloat, |
36550 | #endif |
36551 | #ifdef GET_INTERP |
36552 | case OP_StoreSint8: { |
36553 | if (!Store<PT_Sint8>(S, OpPC)) |
36554 | return false; |
36555 | continue; |
36556 | } |
36557 | case OP_StoreUint8: { |
36558 | if (!Store<PT_Uint8>(S, OpPC)) |
36559 | return false; |
36560 | continue; |
36561 | } |
36562 | case OP_StoreSint16: { |
36563 | if (!Store<PT_Sint16>(S, OpPC)) |
36564 | return false; |
36565 | continue; |
36566 | } |
36567 | case OP_StoreUint16: { |
36568 | if (!Store<PT_Uint16>(S, OpPC)) |
36569 | return false; |
36570 | continue; |
36571 | } |
36572 | case OP_StoreSint32: { |
36573 | if (!Store<PT_Sint32>(S, OpPC)) |
36574 | return false; |
36575 | continue; |
36576 | } |
36577 | case OP_StoreUint32: { |
36578 | if (!Store<PT_Uint32>(S, OpPC)) |
36579 | return false; |
36580 | continue; |
36581 | } |
36582 | case OP_StoreSint64: { |
36583 | if (!Store<PT_Sint64>(S, OpPC)) |
36584 | return false; |
36585 | continue; |
36586 | } |
36587 | case OP_StoreUint64: { |
36588 | if (!Store<PT_Uint64>(S, OpPC)) |
36589 | return false; |
36590 | continue; |
36591 | } |
36592 | case OP_StoreIntAP: { |
36593 | if (!Store<PT_IntAP>(S, OpPC)) |
36594 | return false; |
36595 | continue; |
36596 | } |
36597 | case OP_StoreIntAPS: { |
36598 | if (!Store<PT_IntAPS>(S, OpPC)) |
36599 | return false; |
36600 | continue; |
36601 | } |
36602 | case OP_StoreBool: { |
36603 | if (!Store<PT_Bool>(S, OpPC)) |
36604 | return false; |
36605 | continue; |
36606 | } |
36607 | case OP_StoreFixedPoint: { |
36608 | if (!Store<PT_FixedPoint>(S, OpPC)) |
36609 | return false; |
36610 | continue; |
36611 | } |
36612 | case OP_StorePtr: { |
36613 | if (!Store<PT_Ptr>(S, OpPC)) |
36614 | return false; |
36615 | continue; |
36616 | } |
36617 | case OP_StoreMemberPtr: { |
36618 | if (!Store<PT_MemberPtr>(S, OpPC)) |
36619 | return false; |
36620 | continue; |
36621 | } |
36622 | case OP_StoreFloat: { |
36623 | if (!Store<PT_Float>(S, OpPC)) |
36624 | return false; |
36625 | continue; |
36626 | } |
36627 | #endif |
36628 | #ifdef GET_DISASM |
36629 | case OP_StoreSint8: |
36630 | Text.Op = PrintName("StoreSint8" ); |
36631 | break; |
36632 | case OP_StoreUint8: |
36633 | Text.Op = PrintName("StoreUint8" ); |
36634 | break; |
36635 | case OP_StoreSint16: |
36636 | Text.Op = PrintName("StoreSint16" ); |
36637 | break; |
36638 | case OP_StoreUint16: |
36639 | Text.Op = PrintName("StoreUint16" ); |
36640 | break; |
36641 | case OP_StoreSint32: |
36642 | Text.Op = PrintName("StoreSint32" ); |
36643 | break; |
36644 | case OP_StoreUint32: |
36645 | Text.Op = PrintName("StoreUint32" ); |
36646 | break; |
36647 | case OP_StoreSint64: |
36648 | Text.Op = PrintName("StoreSint64" ); |
36649 | break; |
36650 | case OP_StoreUint64: |
36651 | Text.Op = PrintName("StoreUint64" ); |
36652 | break; |
36653 | case OP_StoreIntAP: |
36654 | Text.Op = PrintName("StoreIntAP" ); |
36655 | break; |
36656 | case OP_StoreIntAPS: |
36657 | Text.Op = PrintName("StoreIntAPS" ); |
36658 | break; |
36659 | case OP_StoreBool: |
36660 | Text.Op = PrintName("StoreBool" ); |
36661 | break; |
36662 | case OP_StoreFixedPoint: |
36663 | Text.Op = PrintName("StoreFixedPoint" ); |
36664 | break; |
36665 | case OP_StorePtr: |
36666 | Text.Op = PrintName("StorePtr" ); |
36667 | break; |
36668 | case OP_StoreMemberPtr: |
36669 | Text.Op = PrintName("StoreMemberPtr" ); |
36670 | break; |
36671 | case OP_StoreFloat: |
36672 | Text.Op = PrintName("StoreFloat" ); |
36673 | break; |
36674 | #endif |
36675 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
36676 | bool emitStoreSint8(const SourceInfo &); |
36677 | bool emitStoreUint8(const SourceInfo &); |
36678 | bool emitStoreSint16(const SourceInfo &); |
36679 | bool emitStoreUint16(const SourceInfo &); |
36680 | bool emitStoreSint32(const SourceInfo &); |
36681 | bool emitStoreUint32(const SourceInfo &); |
36682 | bool emitStoreSint64(const SourceInfo &); |
36683 | bool emitStoreUint64(const SourceInfo &); |
36684 | bool emitStoreIntAP(const SourceInfo &); |
36685 | bool emitStoreIntAPS(const SourceInfo &); |
36686 | bool emitStoreBool(const SourceInfo &); |
36687 | bool emitStoreFixedPoint(const SourceInfo &); |
36688 | bool emitStorePtr(const SourceInfo &); |
36689 | bool emitStoreMemberPtr(const SourceInfo &); |
36690 | bool emitStoreFloat(const SourceInfo &); |
36691 | #endif |
36692 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
36693 | [[nodiscard]] bool emitStore(PrimType, const SourceInfo &I); |
36694 | #endif |
36695 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
36696 | bool |
36697 | #if defined(GET_EVAL_IMPL) |
36698 | EvalEmitter |
36699 | #else |
36700 | ByteCodeEmitter |
36701 | #endif |
36702 | ::emitStore(PrimType T0, const SourceInfo &I) { |
36703 | switch (T0) { |
36704 | case PT_Sint8: |
36705 | return emitStoreSint8(I); |
36706 | case PT_Uint8: |
36707 | return emitStoreUint8(I); |
36708 | case PT_Sint16: |
36709 | return emitStoreSint16(I); |
36710 | case PT_Uint16: |
36711 | return emitStoreUint16(I); |
36712 | case PT_Sint32: |
36713 | return emitStoreSint32(I); |
36714 | case PT_Uint32: |
36715 | return emitStoreUint32(I); |
36716 | case PT_Sint64: |
36717 | return emitStoreSint64(I); |
36718 | case PT_Uint64: |
36719 | return emitStoreUint64(I); |
36720 | case PT_IntAP: |
36721 | return emitStoreIntAP(I); |
36722 | case PT_IntAPS: |
36723 | return emitStoreIntAPS(I); |
36724 | case PT_Bool: |
36725 | return emitStoreBool(I); |
36726 | case PT_FixedPoint: |
36727 | return emitStoreFixedPoint(I); |
36728 | case PT_Ptr: |
36729 | return emitStorePtr(I); |
36730 | case PT_MemberPtr: |
36731 | return emitStoreMemberPtr(I); |
36732 | case PT_Float: |
36733 | return emitStoreFloat(I); |
36734 | } |
36735 | llvm_unreachable("invalid enum value" ); |
36736 | } |
36737 | #endif |
36738 | #ifdef GET_LINK_IMPL |
36739 | bool ByteCodeEmitter::emitStoreSint8(const SourceInfo &L) { |
36740 | return emitOp<>(OP_StoreSint8, L); |
36741 | } |
36742 | bool ByteCodeEmitter::emitStoreUint8(const SourceInfo &L) { |
36743 | return emitOp<>(OP_StoreUint8, L); |
36744 | } |
36745 | bool ByteCodeEmitter::emitStoreSint16(const SourceInfo &L) { |
36746 | return emitOp<>(OP_StoreSint16, L); |
36747 | } |
36748 | bool ByteCodeEmitter::emitStoreUint16(const SourceInfo &L) { |
36749 | return emitOp<>(OP_StoreUint16, L); |
36750 | } |
36751 | bool ByteCodeEmitter::emitStoreSint32(const SourceInfo &L) { |
36752 | return emitOp<>(OP_StoreSint32, L); |
36753 | } |
36754 | bool ByteCodeEmitter::emitStoreUint32(const SourceInfo &L) { |
36755 | return emitOp<>(OP_StoreUint32, L); |
36756 | } |
36757 | bool ByteCodeEmitter::emitStoreSint64(const SourceInfo &L) { |
36758 | return emitOp<>(OP_StoreSint64, L); |
36759 | } |
36760 | bool ByteCodeEmitter::emitStoreUint64(const SourceInfo &L) { |
36761 | return emitOp<>(OP_StoreUint64, L); |
36762 | } |
36763 | bool ByteCodeEmitter::emitStoreIntAP(const SourceInfo &L) { |
36764 | return emitOp<>(OP_StoreIntAP, L); |
36765 | } |
36766 | bool ByteCodeEmitter::emitStoreIntAPS(const SourceInfo &L) { |
36767 | return emitOp<>(OP_StoreIntAPS, L); |
36768 | } |
36769 | bool ByteCodeEmitter::emitStoreBool(const SourceInfo &L) { |
36770 | return emitOp<>(OP_StoreBool, L); |
36771 | } |
36772 | bool ByteCodeEmitter::emitStoreFixedPoint(const SourceInfo &L) { |
36773 | return emitOp<>(OP_StoreFixedPoint, L); |
36774 | } |
36775 | bool ByteCodeEmitter::emitStorePtr(const SourceInfo &L) { |
36776 | return emitOp<>(OP_StorePtr, L); |
36777 | } |
36778 | bool ByteCodeEmitter::emitStoreMemberPtr(const SourceInfo &L) { |
36779 | return emitOp<>(OP_StoreMemberPtr, L); |
36780 | } |
36781 | bool ByteCodeEmitter::emitStoreFloat(const SourceInfo &L) { |
36782 | return emitOp<>(OP_StoreFloat, L); |
36783 | } |
36784 | #endif |
36785 | #ifdef GET_EVAL_IMPL |
36786 | bool EvalEmitter::emitStoreSint8(const SourceInfo &L) { |
36787 | if (!isActive()) return true; |
36788 | CurrentSource = L; |
36789 | return Store<PT_Sint8>(S, OpPC); |
36790 | } |
36791 | bool EvalEmitter::emitStoreUint8(const SourceInfo &L) { |
36792 | if (!isActive()) return true; |
36793 | CurrentSource = L; |
36794 | return Store<PT_Uint8>(S, OpPC); |
36795 | } |
36796 | bool EvalEmitter::emitStoreSint16(const SourceInfo &L) { |
36797 | if (!isActive()) return true; |
36798 | CurrentSource = L; |
36799 | return Store<PT_Sint16>(S, OpPC); |
36800 | } |
36801 | bool EvalEmitter::emitStoreUint16(const SourceInfo &L) { |
36802 | if (!isActive()) return true; |
36803 | CurrentSource = L; |
36804 | return Store<PT_Uint16>(S, OpPC); |
36805 | } |
36806 | bool EvalEmitter::emitStoreSint32(const SourceInfo &L) { |
36807 | if (!isActive()) return true; |
36808 | CurrentSource = L; |
36809 | return Store<PT_Sint32>(S, OpPC); |
36810 | } |
36811 | bool EvalEmitter::emitStoreUint32(const SourceInfo &L) { |
36812 | if (!isActive()) return true; |
36813 | CurrentSource = L; |
36814 | return Store<PT_Uint32>(S, OpPC); |
36815 | } |
36816 | bool EvalEmitter::emitStoreSint64(const SourceInfo &L) { |
36817 | if (!isActive()) return true; |
36818 | CurrentSource = L; |
36819 | return Store<PT_Sint64>(S, OpPC); |
36820 | } |
36821 | bool EvalEmitter::emitStoreUint64(const SourceInfo &L) { |
36822 | if (!isActive()) return true; |
36823 | CurrentSource = L; |
36824 | return Store<PT_Uint64>(S, OpPC); |
36825 | } |
36826 | bool EvalEmitter::emitStoreIntAP(const SourceInfo &L) { |
36827 | if (!isActive()) return true; |
36828 | CurrentSource = L; |
36829 | return Store<PT_IntAP>(S, OpPC); |
36830 | } |
36831 | bool EvalEmitter::emitStoreIntAPS(const SourceInfo &L) { |
36832 | if (!isActive()) return true; |
36833 | CurrentSource = L; |
36834 | return Store<PT_IntAPS>(S, OpPC); |
36835 | } |
36836 | bool EvalEmitter::emitStoreBool(const SourceInfo &L) { |
36837 | if (!isActive()) return true; |
36838 | CurrentSource = L; |
36839 | return Store<PT_Bool>(S, OpPC); |
36840 | } |
36841 | bool EvalEmitter::emitStoreFixedPoint(const SourceInfo &L) { |
36842 | if (!isActive()) return true; |
36843 | CurrentSource = L; |
36844 | return Store<PT_FixedPoint>(S, OpPC); |
36845 | } |
36846 | bool EvalEmitter::emitStorePtr(const SourceInfo &L) { |
36847 | if (!isActive()) return true; |
36848 | CurrentSource = L; |
36849 | return Store<PT_Ptr>(S, OpPC); |
36850 | } |
36851 | bool EvalEmitter::emitStoreMemberPtr(const SourceInfo &L) { |
36852 | if (!isActive()) return true; |
36853 | CurrentSource = L; |
36854 | return Store<PT_MemberPtr>(S, OpPC); |
36855 | } |
36856 | bool EvalEmitter::emitStoreFloat(const SourceInfo &L) { |
36857 | if (!isActive()) return true; |
36858 | CurrentSource = L; |
36859 | return Store<PT_Float>(S, OpPC); |
36860 | } |
36861 | #endif |
36862 | #ifdef GET_OPCODE_NAMES |
36863 | OP_StoreBitFieldSint8, |
36864 | OP_StoreBitFieldUint8, |
36865 | OP_StoreBitFieldSint16, |
36866 | OP_StoreBitFieldUint16, |
36867 | OP_StoreBitFieldSint32, |
36868 | OP_StoreBitFieldUint32, |
36869 | OP_StoreBitFieldSint64, |
36870 | OP_StoreBitFieldUint64, |
36871 | OP_StoreBitFieldIntAP, |
36872 | OP_StoreBitFieldIntAPS, |
36873 | OP_StoreBitFieldBool, |
36874 | OP_StoreBitFieldFixedPoint, |
36875 | #endif |
36876 | #ifdef GET_INTERP |
36877 | case OP_StoreBitFieldSint8: { |
36878 | if (!StoreBitField<PT_Sint8>(S, OpPC)) |
36879 | return false; |
36880 | continue; |
36881 | } |
36882 | case OP_StoreBitFieldUint8: { |
36883 | if (!StoreBitField<PT_Uint8>(S, OpPC)) |
36884 | return false; |
36885 | continue; |
36886 | } |
36887 | case OP_StoreBitFieldSint16: { |
36888 | if (!StoreBitField<PT_Sint16>(S, OpPC)) |
36889 | return false; |
36890 | continue; |
36891 | } |
36892 | case OP_StoreBitFieldUint16: { |
36893 | if (!StoreBitField<PT_Uint16>(S, OpPC)) |
36894 | return false; |
36895 | continue; |
36896 | } |
36897 | case OP_StoreBitFieldSint32: { |
36898 | if (!StoreBitField<PT_Sint32>(S, OpPC)) |
36899 | return false; |
36900 | continue; |
36901 | } |
36902 | case OP_StoreBitFieldUint32: { |
36903 | if (!StoreBitField<PT_Uint32>(S, OpPC)) |
36904 | return false; |
36905 | continue; |
36906 | } |
36907 | case OP_StoreBitFieldSint64: { |
36908 | if (!StoreBitField<PT_Sint64>(S, OpPC)) |
36909 | return false; |
36910 | continue; |
36911 | } |
36912 | case OP_StoreBitFieldUint64: { |
36913 | if (!StoreBitField<PT_Uint64>(S, OpPC)) |
36914 | return false; |
36915 | continue; |
36916 | } |
36917 | case OP_StoreBitFieldIntAP: { |
36918 | if (!StoreBitField<PT_IntAP>(S, OpPC)) |
36919 | return false; |
36920 | continue; |
36921 | } |
36922 | case OP_StoreBitFieldIntAPS: { |
36923 | if (!StoreBitField<PT_IntAPS>(S, OpPC)) |
36924 | return false; |
36925 | continue; |
36926 | } |
36927 | case OP_StoreBitFieldBool: { |
36928 | if (!StoreBitField<PT_Bool>(S, OpPC)) |
36929 | return false; |
36930 | continue; |
36931 | } |
36932 | case OP_StoreBitFieldFixedPoint: { |
36933 | if (!StoreBitField<PT_FixedPoint>(S, OpPC)) |
36934 | return false; |
36935 | continue; |
36936 | } |
36937 | #endif |
36938 | #ifdef GET_DISASM |
36939 | case OP_StoreBitFieldSint8: |
36940 | Text.Op = PrintName("StoreBitFieldSint8" ); |
36941 | break; |
36942 | case OP_StoreBitFieldUint8: |
36943 | Text.Op = PrintName("StoreBitFieldUint8" ); |
36944 | break; |
36945 | case OP_StoreBitFieldSint16: |
36946 | Text.Op = PrintName("StoreBitFieldSint16" ); |
36947 | break; |
36948 | case OP_StoreBitFieldUint16: |
36949 | Text.Op = PrintName("StoreBitFieldUint16" ); |
36950 | break; |
36951 | case OP_StoreBitFieldSint32: |
36952 | Text.Op = PrintName("StoreBitFieldSint32" ); |
36953 | break; |
36954 | case OP_StoreBitFieldUint32: |
36955 | Text.Op = PrintName("StoreBitFieldUint32" ); |
36956 | break; |
36957 | case OP_StoreBitFieldSint64: |
36958 | Text.Op = PrintName("StoreBitFieldSint64" ); |
36959 | break; |
36960 | case OP_StoreBitFieldUint64: |
36961 | Text.Op = PrintName("StoreBitFieldUint64" ); |
36962 | break; |
36963 | case OP_StoreBitFieldIntAP: |
36964 | Text.Op = PrintName("StoreBitFieldIntAP" ); |
36965 | break; |
36966 | case OP_StoreBitFieldIntAPS: |
36967 | Text.Op = PrintName("StoreBitFieldIntAPS" ); |
36968 | break; |
36969 | case OP_StoreBitFieldBool: |
36970 | Text.Op = PrintName("StoreBitFieldBool" ); |
36971 | break; |
36972 | case OP_StoreBitFieldFixedPoint: |
36973 | Text.Op = PrintName("StoreBitFieldFixedPoint" ); |
36974 | break; |
36975 | #endif |
36976 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
36977 | bool emitStoreBitFieldSint8(const SourceInfo &); |
36978 | bool emitStoreBitFieldUint8(const SourceInfo &); |
36979 | bool emitStoreBitFieldSint16(const SourceInfo &); |
36980 | bool emitStoreBitFieldUint16(const SourceInfo &); |
36981 | bool emitStoreBitFieldSint32(const SourceInfo &); |
36982 | bool emitStoreBitFieldUint32(const SourceInfo &); |
36983 | bool emitStoreBitFieldSint64(const SourceInfo &); |
36984 | bool emitStoreBitFieldUint64(const SourceInfo &); |
36985 | bool emitStoreBitFieldIntAP(const SourceInfo &); |
36986 | bool emitStoreBitFieldIntAPS(const SourceInfo &); |
36987 | bool emitStoreBitFieldBool(const SourceInfo &); |
36988 | bool emitStoreBitFieldFixedPoint(const SourceInfo &); |
36989 | #endif |
36990 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
36991 | [[nodiscard]] bool emitStoreBitField(PrimType, const SourceInfo &I); |
36992 | #endif |
36993 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
36994 | bool |
36995 | #if defined(GET_EVAL_IMPL) |
36996 | EvalEmitter |
36997 | #else |
36998 | ByteCodeEmitter |
36999 | #endif |
37000 | ::emitStoreBitField(PrimType T0, const SourceInfo &I) { |
37001 | switch (T0) { |
37002 | case PT_Sint8: |
37003 | return emitStoreBitFieldSint8(I); |
37004 | case PT_Uint8: |
37005 | return emitStoreBitFieldUint8(I); |
37006 | case PT_Sint16: |
37007 | return emitStoreBitFieldSint16(I); |
37008 | case PT_Uint16: |
37009 | return emitStoreBitFieldUint16(I); |
37010 | case PT_Sint32: |
37011 | return emitStoreBitFieldSint32(I); |
37012 | case PT_Uint32: |
37013 | return emitStoreBitFieldUint32(I); |
37014 | case PT_Sint64: |
37015 | return emitStoreBitFieldSint64(I); |
37016 | case PT_Uint64: |
37017 | return emitStoreBitFieldUint64(I); |
37018 | case PT_IntAP: |
37019 | return emitStoreBitFieldIntAP(I); |
37020 | case PT_IntAPS: |
37021 | return emitStoreBitFieldIntAPS(I); |
37022 | case PT_Bool: |
37023 | return emitStoreBitFieldBool(I); |
37024 | case PT_FixedPoint: |
37025 | return emitStoreBitFieldFixedPoint(I); |
37026 | default: llvm_unreachable("invalid type: emitStoreBitField" ); |
37027 | } |
37028 | llvm_unreachable("invalid enum value" ); |
37029 | } |
37030 | #endif |
37031 | #ifdef GET_LINK_IMPL |
37032 | bool ByteCodeEmitter::emitStoreBitFieldSint8(const SourceInfo &L) { |
37033 | return emitOp<>(OP_StoreBitFieldSint8, L); |
37034 | } |
37035 | bool ByteCodeEmitter::emitStoreBitFieldUint8(const SourceInfo &L) { |
37036 | return emitOp<>(OP_StoreBitFieldUint8, L); |
37037 | } |
37038 | bool ByteCodeEmitter::emitStoreBitFieldSint16(const SourceInfo &L) { |
37039 | return emitOp<>(OP_StoreBitFieldSint16, L); |
37040 | } |
37041 | bool ByteCodeEmitter::emitStoreBitFieldUint16(const SourceInfo &L) { |
37042 | return emitOp<>(OP_StoreBitFieldUint16, L); |
37043 | } |
37044 | bool ByteCodeEmitter::emitStoreBitFieldSint32(const SourceInfo &L) { |
37045 | return emitOp<>(OP_StoreBitFieldSint32, L); |
37046 | } |
37047 | bool ByteCodeEmitter::emitStoreBitFieldUint32(const SourceInfo &L) { |
37048 | return emitOp<>(OP_StoreBitFieldUint32, L); |
37049 | } |
37050 | bool ByteCodeEmitter::emitStoreBitFieldSint64(const SourceInfo &L) { |
37051 | return emitOp<>(OP_StoreBitFieldSint64, L); |
37052 | } |
37053 | bool ByteCodeEmitter::emitStoreBitFieldUint64(const SourceInfo &L) { |
37054 | return emitOp<>(OP_StoreBitFieldUint64, L); |
37055 | } |
37056 | bool ByteCodeEmitter::emitStoreBitFieldIntAP(const SourceInfo &L) { |
37057 | return emitOp<>(OP_StoreBitFieldIntAP, L); |
37058 | } |
37059 | bool ByteCodeEmitter::emitStoreBitFieldIntAPS(const SourceInfo &L) { |
37060 | return emitOp<>(OP_StoreBitFieldIntAPS, L); |
37061 | } |
37062 | bool ByteCodeEmitter::emitStoreBitFieldBool(const SourceInfo &L) { |
37063 | return emitOp<>(OP_StoreBitFieldBool, L); |
37064 | } |
37065 | bool ByteCodeEmitter::emitStoreBitFieldFixedPoint(const SourceInfo &L) { |
37066 | return emitOp<>(OP_StoreBitFieldFixedPoint, L); |
37067 | } |
37068 | #endif |
37069 | #ifdef GET_EVAL_IMPL |
37070 | bool EvalEmitter::emitStoreBitFieldSint8(const SourceInfo &L) { |
37071 | if (!isActive()) return true; |
37072 | CurrentSource = L; |
37073 | return StoreBitField<PT_Sint8>(S, OpPC); |
37074 | } |
37075 | bool EvalEmitter::emitStoreBitFieldUint8(const SourceInfo &L) { |
37076 | if (!isActive()) return true; |
37077 | CurrentSource = L; |
37078 | return StoreBitField<PT_Uint8>(S, OpPC); |
37079 | } |
37080 | bool EvalEmitter::emitStoreBitFieldSint16(const SourceInfo &L) { |
37081 | if (!isActive()) return true; |
37082 | CurrentSource = L; |
37083 | return StoreBitField<PT_Sint16>(S, OpPC); |
37084 | } |
37085 | bool EvalEmitter::emitStoreBitFieldUint16(const SourceInfo &L) { |
37086 | if (!isActive()) return true; |
37087 | CurrentSource = L; |
37088 | return StoreBitField<PT_Uint16>(S, OpPC); |
37089 | } |
37090 | bool EvalEmitter::emitStoreBitFieldSint32(const SourceInfo &L) { |
37091 | if (!isActive()) return true; |
37092 | CurrentSource = L; |
37093 | return StoreBitField<PT_Sint32>(S, OpPC); |
37094 | } |
37095 | bool EvalEmitter::emitStoreBitFieldUint32(const SourceInfo &L) { |
37096 | if (!isActive()) return true; |
37097 | CurrentSource = L; |
37098 | return StoreBitField<PT_Uint32>(S, OpPC); |
37099 | } |
37100 | bool EvalEmitter::emitStoreBitFieldSint64(const SourceInfo &L) { |
37101 | if (!isActive()) return true; |
37102 | CurrentSource = L; |
37103 | return StoreBitField<PT_Sint64>(S, OpPC); |
37104 | } |
37105 | bool EvalEmitter::emitStoreBitFieldUint64(const SourceInfo &L) { |
37106 | if (!isActive()) return true; |
37107 | CurrentSource = L; |
37108 | return StoreBitField<PT_Uint64>(S, OpPC); |
37109 | } |
37110 | bool EvalEmitter::emitStoreBitFieldIntAP(const SourceInfo &L) { |
37111 | if (!isActive()) return true; |
37112 | CurrentSource = L; |
37113 | return StoreBitField<PT_IntAP>(S, OpPC); |
37114 | } |
37115 | bool EvalEmitter::emitStoreBitFieldIntAPS(const SourceInfo &L) { |
37116 | if (!isActive()) return true; |
37117 | CurrentSource = L; |
37118 | return StoreBitField<PT_IntAPS>(S, OpPC); |
37119 | } |
37120 | bool EvalEmitter::emitStoreBitFieldBool(const SourceInfo &L) { |
37121 | if (!isActive()) return true; |
37122 | CurrentSource = L; |
37123 | return StoreBitField<PT_Bool>(S, OpPC); |
37124 | } |
37125 | bool EvalEmitter::emitStoreBitFieldFixedPoint(const SourceInfo &L) { |
37126 | if (!isActive()) return true; |
37127 | CurrentSource = L; |
37128 | return StoreBitField<PT_FixedPoint>(S, OpPC); |
37129 | } |
37130 | #endif |
37131 | #ifdef GET_OPCODE_NAMES |
37132 | OP_StoreBitFieldPopSint8, |
37133 | OP_StoreBitFieldPopUint8, |
37134 | OP_StoreBitFieldPopSint16, |
37135 | OP_StoreBitFieldPopUint16, |
37136 | OP_StoreBitFieldPopSint32, |
37137 | OP_StoreBitFieldPopUint32, |
37138 | OP_StoreBitFieldPopSint64, |
37139 | OP_StoreBitFieldPopUint64, |
37140 | OP_StoreBitFieldPopIntAP, |
37141 | OP_StoreBitFieldPopIntAPS, |
37142 | OP_StoreBitFieldPopBool, |
37143 | OP_StoreBitFieldPopFixedPoint, |
37144 | #endif |
37145 | #ifdef GET_INTERP |
37146 | case OP_StoreBitFieldPopSint8: { |
37147 | if (!StoreBitFieldPop<PT_Sint8>(S, OpPC)) |
37148 | return false; |
37149 | continue; |
37150 | } |
37151 | case OP_StoreBitFieldPopUint8: { |
37152 | if (!StoreBitFieldPop<PT_Uint8>(S, OpPC)) |
37153 | return false; |
37154 | continue; |
37155 | } |
37156 | case OP_StoreBitFieldPopSint16: { |
37157 | if (!StoreBitFieldPop<PT_Sint16>(S, OpPC)) |
37158 | return false; |
37159 | continue; |
37160 | } |
37161 | case OP_StoreBitFieldPopUint16: { |
37162 | if (!StoreBitFieldPop<PT_Uint16>(S, OpPC)) |
37163 | return false; |
37164 | continue; |
37165 | } |
37166 | case OP_StoreBitFieldPopSint32: { |
37167 | if (!StoreBitFieldPop<PT_Sint32>(S, OpPC)) |
37168 | return false; |
37169 | continue; |
37170 | } |
37171 | case OP_StoreBitFieldPopUint32: { |
37172 | if (!StoreBitFieldPop<PT_Uint32>(S, OpPC)) |
37173 | return false; |
37174 | continue; |
37175 | } |
37176 | case OP_StoreBitFieldPopSint64: { |
37177 | if (!StoreBitFieldPop<PT_Sint64>(S, OpPC)) |
37178 | return false; |
37179 | continue; |
37180 | } |
37181 | case OP_StoreBitFieldPopUint64: { |
37182 | if (!StoreBitFieldPop<PT_Uint64>(S, OpPC)) |
37183 | return false; |
37184 | continue; |
37185 | } |
37186 | case OP_StoreBitFieldPopIntAP: { |
37187 | if (!StoreBitFieldPop<PT_IntAP>(S, OpPC)) |
37188 | return false; |
37189 | continue; |
37190 | } |
37191 | case OP_StoreBitFieldPopIntAPS: { |
37192 | if (!StoreBitFieldPop<PT_IntAPS>(S, OpPC)) |
37193 | return false; |
37194 | continue; |
37195 | } |
37196 | case OP_StoreBitFieldPopBool: { |
37197 | if (!StoreBitFieldPop<PT_Bool>(S, OpPC)) |
37198 | return false; |
37199 | continue; |
37200 | } |
37201 | case OP_StoreBitFieldPopFixedPoint: { |
37202 | if (!StoreBitFieldPop<PT_FixedPoint>(S, OpPC)) |
37203 | return false; |
37204 | continue; |
37205 | } |
37206 | #endif |
37207 | #ifdef GET_DISASM |
37208 | case OP_StoreBitFieldPopSint8: |
37209 | Text.Op = PrintName("StoreBitFieldPopSint8" ); |
37210 | break; |
37211 | case OP_StoreBitFieldPopUint8: |
37212 | Text.Op = PrintName("StoreBitFieldPopUint8" ); |
37213 | break; |
37214 | case OP_StoreBitFieldPopSint16: |
37215 | Text.Op = PrintName("StoreBitFieldPopSint16" ); |
37216 | break; |
37217 | case OP_StoreBitFieldPopUint16: |
37218 | Text.Op = PrintName("StoreBitFieldPopUint16" ); |
37219 | break; |
37220 | case OP_StoreBitFieldPopSint32: |
37221 | Text.Op = PrintName("StoreBitFieldPopSint32" ); |
37222 | break; |
37223 | case OP_StoreBitFieldPopUint32: |
37224 | Text.Op = PrintName("StoreBitFieldPopUint32" ); |
37225 | break; |
37226 | case OP_StoreBitFieldPopSint64: |
37227 | Text.Op = PrintName("StoreBitFieldPopSint64" ); |
37228 | break; |
37229 | case OP_StoreBitFieldPopUint64: |
37230 | Text.Op = PrintName("StoreBitFieldPopUint64" ); |
37231 | break; |
37232 | case OP_StoreBitFieldPopIntAP: |
37233 | Text.Op = PrintName("StoreBitFieldPopIntAP" ); |
37234 | break; |
37235 | case OP_StoreBitFieldPopIntAPS: |
37236 | Text.Op = PrintName("StoreBitFieldPopIntAPS" ); |
37237 | break; |
37238 | case OP_StoreBitFieldPopBool: |
37239 | Text.Op = PrintName("StoreBitFieldPopBool" ); |
37240 | break; |
37241 | case OP_StoreBitFieldPopFixedPoint: |
37242 | Text.Op = PrintName("StoreBitFieldPopFixedPoint" ); |
37243 | break; |
37244 | #endif |
37245 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
37246 | bool emitStoreBitFieldPopSint8(const SourceInfo &); |
37247 | bool emitStoreBitFieldPopUint8(const SourceInfo &); |
37248 | bool emitStoreBitFieldPopSint16(const SourceInfo &); |
37249 | bool emitStoreBitFieldPopUint16(const SourceInfo &); |
37250 | bool emitStoreBitFieldPopSint32(const SourceInfo &); |
37251 | bool emitStoreBitFieldPopUint32(const SourceInfo &); |
37252 | bool emitStoreBitFieldPopSint64(const SourceInfo &); |
37253 | bool emitStoreBitFieldPopUint64(const SourceInfo &); |
37254 | bool emitStoreBitFieldPopIntAP(const SourceInfo &); |
37255 | bool emitStoreBitFieldPopIntAPS(const SourceInfo &); |
37256 | bool emitStoreBitFieldPopBool(const SourceInfo &); |
37257 | bool emitStoreBitFieldPopFixedPoint(const SourceInfo &); |
37258 | #endif |
37259 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
37260 | [[nodiscard]] bool emitStoreBitFieldPop(PrimType, const SourceInfo &I); |
37261 | #endif |
37262 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
37263 | bool |
37264 | #if defined(GET_EVAL_IMPL) |
37265 | EvalEmitter |
37266 | #else |
37267 | ByteCodeEmitter |
37268 | #endif |
37269 | ::emitStoreBitFieldPop(PrimType T0, const SourceInfo &I) { |
37270 | switch (T0) { |
37271 | case PT_Sint8: |
37272 | return emitStoreBitFieldPopSint8(I); |
37273 | case PT_Uint8: |
37274 | return emitStoreBitFieldPopUint8(I); |
37275 | case PT_Sint16: |
37276 | return emitStoreBitFieldPopSint16(I); |
37277 | case PT_Uint16: |
37278 | return emitStoreBitFieldPopUint16(I); |
37279 | case PT_Sint32: |
37280 | return emitStoreBitFieldPopSint32(I); |
37281 | case PT_Uint32: |
37282 | return emitStoreBitFieldPopUint32(I); |
37283 | case PT_Sint64: |
37284 | return emitStoreBitFieldPopSint64(I); |
37285 | case PT_Uint64: |
37286 | return emitStoreBitFieldPopUint64(I); |
37287 | case PT_IntAP: |
37288 | return emitStoreBitFieldPopIntAP(I); |
37289 | case PT_IntAPS: |
37290 | return emitStoreBitFieldPopIntAPS(I); |
37291 | case PT_Bool: |
37292 | return emitStoreBitFieldPopBool(I); |
37293 | case PT_FixedPoint: |
37294 | return emitStoreBitFieldPopFixedPoint(I); |
37295 | default: llvm_unreachable("invalid type: emitStoreBitFieldPop" ); |
37296 | } |
37297 | llvm_unreachable("invalid enum value" ); |
37298 | } |
37299 | #endif |
37300 | #ifdef GET_LINK_IMPL |
37301 | bool ByteCodeEmitter::emitStoreBitFieldPopSint8(const SourceInfo &L) { |
37302 | return emitOp<>(OP_StoreBitFieldPopSint8, L); |
37303 | } |
37304 | bool ByteCodeEmitter::emitStoreBitFieldPopUint8(const SourceInfo &L) { |
37305 | return emitOp<>(OP_StoreBitFieldPopUint8, L); |
37306 | } |
37307 | bool ByteCodeEmitter::emitStoreBitFieldPopSint16(const SourceInfo &L) { |
37308 | return emitOp<>(OP_StoreBitFieldPopSint16, L); |
37309 | } |
37310 | bool ByteCodeEmitter::emitStoreBitFieldPopUint16(const SourceInfo &L) { |
37311 | return emitOp<>(OP_StoreBitFieldPopUint16, L); |
37312 | } |
37313 | bool ByteCodeEmitter::emitStoreBitFieldPopSint32(const SourceInfo &L) { |
37314 | return emitOp<>(OP_StoreBitFieldPopSint32, L); |
37315 | } |
37316 | bool ByteCodeEmitter::emitStoreBitFieldPopUint32(const SourceInfo &L) { |
37317 | return emitOp<>(OP_StoreBitFieldPopUint32, L); |
37318 | } |
37319 | bool ByteCodeEmitter::emitStoreBitFieldPopSint64(const SourceInfo &L) { |
37320 | return emitOp<>(OP_StoreBitFieldPopSint64, L); |
37321 | } |
37322 | bool ByteCodeEmitter::emitStoreBitFieldPopUint64(const SourceInfo &L) { |
37323 | return emitOp<>(OP_StoreBitFieldPopUint64, L); |
37324 | } |
37325 | bool ByteCodeEmitter::emitStoreBitFieldPopIntAP(const SourceInfo &L) { |
37326 | return emitOp<>(OP_StoreBitFieldPopIntAP, L); |
37327 | } |
37328 | bool ByteCodeEmitter::emitStoreBitFieldPopIntAPS(const SourceInfo &L) { |
37329 | return emitOp<>(OP_StoreBitFieldPopIntAPS, L); |
37330 | } |
37331 | bool ByteCodeEmitter::emitStoreBitFieldPopBool(const SourceInfo &L) { |
37332 | return emitOp<>(OP_StoreBitFieldPopBool, L); |
37333 | } |
37334 | bool ByteCodeEmitter::emitStoreBitFieldPopFixedPoint(const SourceInfo &L) { |
37335 | return emitOp<>(OP_StoreBitFieldPopFixedPoint, L); |
37336 | } |
37337 | #endif |
37338 | #ifdef GET_EVAL_IMPL |
37339 | bool EvalEmitter::emitStoreBitFieldPopSint8(const SourceInfo &L) { |
37340 | if (!isActive()) return true; |
37341 | CurrentSource = L; |
37342 | return StoreBitFieldPop<PT_Sint8>(S, OpPC); |
37343 | } |
37344 | bool EvalEmitter::emitStoreBitFieldPopUint8(const SourceInfo &L) { |
37345 | if (!isActive()) return true; |
37346 | CurrentSource = L; |
37347 | return StoreBitFieldPop<PT_Uint8>(S, OpPC); |
37348 | } |
37349 | bool EvalEmitter::emitStoreBitFieldPopSint16(const SourceInfo &L) { |
37350 | if (!isActive()) return true; |
37351 | CurrentSource = L; |
37352 | return StoreBitFieldPop<PT_Sint16>(S, OpPC); |
37353 | } |
37354 | bool EvalEmitter::emitStoreBitFieldPopUint16(const SourceInfo &L) { |
37355 | if (!isActive()) return true; |
37356 | CurrentSource = L; |
37357 | return StoreBitFieldPop<PT_Uint16>(S, OpPC); |
37358 | } |
37359 | bool EvalEmitter::emitStoreBitFieldPopSint32(const SourceInfo &L) { |
37360 | if (!isActive()) return true; |
37361 | CurrentSource = L; |
37362 | return StoreBitFieldPop<PT_Sint32>(S, OpPC); |
37363 | } |
37364 | bool EvalEmitter::emitStoreBitFieldPopUint32(const SourceInfo &L) { |
37365 | if (!isActive()) return true; |
37366 | CurrentSource = L; |
37367 | return StoreBitFieldPop<PT_Uint32>(S, OpPC); |
37368 | } |
37369 | bool EvalEmitter::emitStoreBitFieldPopSint64(const SourceInfo &L) { |
37370 | if (!isActive()) return true; |
37371 | CurrentSource = L; |
37372 | return StoreBitFieldPop<PT_Sint64>(S, OpPC); |
37373 | } |
37374 | bool EvalEmitter::emitStoreBitFieldPopUint64(const SourceInfo &L) { |
37375 | if (!isActive()) return true; |
37376 | CurrentSource = L; |
37377 | return StoreBitFieldPop<PT_Uint64>(S, OpPC); |
37378 | } |
37379 | bool EvalEmitter::emitStoreBitFieldPopIntAP(const SourceInfo &L) { |
37380 | if (!isActive()) return true; |
37381 | CurrentSource = L; |
37382 | return StoreBitFieldPop<PT_IntAP>(S, OpPC); |
37383 | } |
37384 | bool EvalEmitter::emitStoreBitFieldPopIntAPS(const SourceInfo &L) { |
37385 | if (!isActive()) return true; |
37386 | CurrentSource = L; |
37387 | return StoreBitFieldPop<PT_IntAPS>(S, OpPC); |
37388 | } |
37389 | bool EvalEmitter::emitStoreBitFieldPopBool(const SourceInfo &L) { |
37390 | if (!isActive()) return true; |
37391 | CurrentSource = L; |
37392 | return StoreBitFieldPop<PT_Bool>(S, OpPC); |
37393 | } |
37394 | bool EvalEmitter::emitStoreBitFieldPopFixedPoint(const SourceInfo &L) { |
37395 | if (!isActive()) return true; |
37396 | CurrentSource = L; |
37397 | return StoreBitFieldPop<PT_FixedPoint>(S, OpPC); |
37398 | } |
37399 | #endif |
37400 | #ifdef GET_OPCODE_NAMES |
37401 | OP_StorePopSint8, |
37402 | OP_StorePopUint8, |
37403 | OP_StorePopSint16, |
37404 | OP_StorePopUint16, |
37405 | OP_StorePopSint32, |
37406 | OP_StorePopUint32, |
37407 | OP_StorePopSint64, |
37408 | OP_StorePopUint64, |
37409 | OP_StorePopIntAP, |
37410 | OP_StorePopIntAPS, |
37411 | OP_StorePopBool, |
37412 | OP_StorePopFixedPoint, |
37413 | OP_StorePopPtr, |
37414 | OP_StorePopMemberPtr, |
37415 | OP_StorePopFloat, |
37416 | #endif |
37417 | #ifdef GET_INTERP |
37418 | case OP_StorePopSint8: { |
37419 | if (!StorePop<PT_Sint8>(S, OpPC)) |
37420 | return false; |
37421 | continue; |
37422 | } |
37423 | case OP_StorePopUint8: { |
37424 | if (!StorePop<PT_Uint8>(S, OpPC)) |
37425 | return false; |
37426 | continue; |
37427 | } |
37428 | case OP_StorePopSint16: { |
37429 | if (!StorePop<PT_Sint16>(S, OpPC)) |
37430 | return false; |
37431 | continue; |
37432 | } |
37433 | case OP_StorePopUint16: { |
37434 | if (!StorePop<PT_Uint16>(S, OpPC)) |
37435 | return false; |
37436 | continue; |
37437 | } |
37438 | case OP_StorePopSint32: { |
37439 | if (!StorePop<PT_Sint32>(S, OpPC)) |
37440 | return false; |
37441 | continue; |
37442 | } |
37443 | case OP_StorePopUint32: { |
37444 | if (!StorePop<PT_Uint32>(S, OpPC)) |
37445 | return false; |
37446 | continue; |
37447 | } |
37448 | case OP_StorePopSint64: { |
37449 | if (!StorePop<PT_Sint64>(S, OpPC)) |
37450 | return false; |
37451 | continue; |
37452 | } |
37453 | case OP_StorePopUint64: { |
37454 | if (!StorePop<PT_Uint64>(S, OpPC)) |
37455 | return false; |
37456 | continue; |
37457 | } |
37458 | case OP_StorePopIntAP: { |
37459 | if (!StorePop<PT_IntAP>(S, OpPC)) |
37460 | return false; |
37461 | continue; |
37462 | } |
37463 | case OP_StorePopIntAPS: { |
37464 | if (!StorePop<PT_IntAPS>(S, OpPC)) |
37465 | return false; |
37466 | continue; |
37467 | } |
37468 | case OP_StorePopBool: { |
37469 | if (!StorePop<PT_Bool>(S, OpPC)) |
37470 | return false; |
37471 | continue; |
37472 | } |
37473 | case OP_StorePopFixedPoint: { |
37474 | if (!StorePop<PT_FixedPoint>(S, OpPC)) |
37475 | return false; |
37476 | continue; |
37477 | } |
37478 | case OP_StorePopPtr: { |
37479 | if (!StorePop<PT_Ptr>(S, OpPC)) |
37480 | return false; |
37481 | continue; |
37482 | } |
37483 | case OP_StorePopMemberPtr: { |
37484 | if (!StorePop<PT_MemberPtr>(S, OpPC)) |
37485 | return false; |
37486 | continue; |
37487 | } |
37488 | case OP_StorePopFloat: { |
37489 | if (!StorePop<PT_Float>(S, OpPC)) |
37490 | return false; |
37491 | continue; |
37492 | } |
37493 | #endif |
37494 | #ifdef GET_DISASM |
37495 | case OP_StorePopSint8: |
37496 | Text.Op = PrintName("StorePopSint8" ); |
37497 | break; |
37498 | case OP_StorePopUint8: |
37499 | Text.Op = PrintName("StorePopUint8" ); |
37500 | break; |
37501 | case OP_StorePopSint16: |
37502 | Text.Op = PrintName("StorePopSint16" ); |
37503 | break; |
37504 | case OP_StorePopUint16: |
37505 | Text.Op = PrintName("StorePopUint16" ); |
37506 | break; |
37507 | case OP_StorePopSint32: |
37508 | Text.Op = PrintName("StorePopSint32" ); |
37509 | break; |
37510 | case OP_StorePopUint32: |
37511 | Text.Op = PrintName("StorePopUint32" ); |
37512 | break; |
37513 | case OP_StorePopSint64: |
37514 | Text.Op = PrintName("StorePopSint64" ); |
37515 | break; |
37516 | case OP_StorePopUint64: |
37517 | Text.Op = PrintName("StorePopUint64" ); |
37518 | break; |
37519 | case OP_StorePopIntAP: |
37520 | Text.Op = PrintName("StorePopIntAP" ); |
37521 | break; |
37522 | case OP_StorePopIntAPS: |
37523 | Text.Op = PrintName("StorePopIntAPS" ); |
37524 | break; |
37525 | case OP_StorePopBool: |
37526 | Text.Op = PrintName("StorePopBool" ); |
37527 | break; |
37528 | case OP_StorePopFixedPoint: |
37529 | Text.Op = PrintName("StorePopFixedPoint" ); |
37530 | break; |
37531 | case OP_StorePopPtr: |
37532 | Text.Op = PrintName("StorePopPtr" ); |
37533 | break; |
37534 | case OP_StorePopMemberPtr: |
37535 | Text.Op = PrintName("StorePopMemberPtr" ); |
37536 | break; |
37537 | case OP_StorePopFloat: |
37538 | Text.Op = PrintName("StorePopFloat" ); |
37539 | break; |
37540 | #endif |
37541 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
37542 | bool emitStorePopSint8(const SourceInfo &); |
37543 | bool emitStorePopUint8(const SourceInfo &); |
37544 | bool emitStorePopSint16(const SourceInfo &); |
37545 | bool emitStorePopUint16(const SourceInfo &); |
37546 | bool emitStorePopSint32(const SourceInfo &); |
37547 | bool emitStorePopUint32(const SourceInfo &); |
37548 | bool emitStorePopSint64(const SourceInfo &); |
37549 | bool emitStorePopUint64(const SourceInfo &); |
37550 | bool emitStorePopIntAP(const SourceInfo &); |
37551 | bool emitStorePopIntAPS(const SourceInfo &); |
37552 | bool emitStorePopBool(const SourceInfo &); |
37553 | bool emitStorePopFixedPoint(const SourceInfo &); |
37554 | bool emitStorePopPtr(const SourceInfo &); |
37555 | bool emitStorePopMemberPtr(const SourceInfo &); |
37556 | bool emitStorePopFloat(const SourceInfo &); |
37557 | #endif |
37558 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
37559 | [[nodiscard]] bool emitStorePop(PrimType, const SourceInfo &I); |
37560 | #endif |
37561 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
37562 | bool |
37563 | #if defined(GET_EVAL_IMPL) |
37564 | EvalEmitter |
37565 | #else |
37566 | ByteCodeEmitter |
37567 | #endif |
37568 | ::emitStorePop(PrimType T0, const SourceInfo &I) { |
37569 | switch (T0) { |
37570 | case PT_Sint8: |
37571 | return emitStorePopSint8(I); |
37572 | case PT_Uint8: |
37573 | return emitStorePopUint8(I); |
37574 | case PT_Sint16: |
37575 | return emitStorePopSint16(I); |
37576 | case PT_Uint16: |
37577 | return emitStorePopUint16(I); |
37578 | case PT_Sint32: |
37579 | return emitStorePopSint32(I); |
37580 | case PT_Uint32: |
37581 | return emitStorePopUint32(I); |
37582 | case PT_Sint64: |
37583 | return emitStorePopSint64(I); |
37584 | case PT_Uint64: |
37585 | return emitStorePopUint64(I); |
37586 | case PT_IntAP: |
37587 | return emitStorePopIntAP(I); |
37588 | case PT_IntAPS: |
37589 | return emitStorePopIntAPS(I); |
37590 | case PT_Bool: |
37591 | return emitStorePopBool(I); |
37592 | case PT_FixedPoint: |
37593 | return emitStorePopFixedPoint(I); |
37594 | case PT_Ptr: |
37595 | return emitStorePopPtr(I); |
37596 | case PT_MemberPtr: |
37597 | return emitStorePopMemberPtr(I); |
37598 | case PT_Float: |
37599 | return emitStorePopFloat(I); |
37600 | } |
37601 | llvm_unreachable("invalid enum value" ); |
37602 | } |
37603 | #endif |
37604 | #ifdef GET_LINK_IMPL |
37605 | bool ByteCodeEmitter::emitStorePopSint8(const SourceInfo &L) { |
37606 | return emitOp<>(OP_StorePopSint8, L); |
37607 | } |
37608 | bool ByteCodeEmitter::emitStorePopUint8(const SourceInfo &L) { |
37609 | return emitOp<>(OP_StorePopUint8, L); |
37610 | } |
37611 | bool ByteCodeEmitter::emitStorePopSint16(const SourceInfo &L) { |
37612 | return emitOp<>(OP_StorePopSint16, L); |
37613 | } |
37614 | bool ByteCodeEmitter::emitStorePopUint16(const SourceInfo &L) { |
37615 | return emitOp<>(OP_StorePopUint16, L); |
37616 | } |
37617 | bool ByteCodeEmitter::emitStorePopSint32(const SourceInfo &L) { |
37618 | return emitOp<>(OP_StorePopSint32, L); |
37619 | } |
37620 | bool ByteCodeEmitter::emitStorePopUint32(const SourceInfo &L) { |
37621 | return emitOp<>(OP_StorePopUint32, L); |
37622 | } |
37623 | bool ByteCodeEmitter::emitStorePopSint64(const SourceInfo &L) { |
37624 | return emitOp<>(OP_StorePopSint64, L); |
37625 | } |
37626 | bool ByteCodeEmitter::emitStorePopUint64(const SourceInfo &L) { |
37627 | return emitOp<>(OP_StorePopUint64, L); |
37628 | } |
37629 | bool ByteCodeEmitter::emitStorePopIntAP(const SourceInfo &L) { |
37630 | return emitOp<>(OP_StorePopIntAP, L); |
37631 | } |
37632 | bool ByteCodeEmitter::emitStorePopIntAPS(const SourceInfo &L) { |
37633 | return emitOp<>(OP_StorePopIntAPS, L); |
37634 | } |
37635 | bool ByteCodeEmitter::emitStorePopBool(const SourceInfo &L) { |
37636 | return emitOp<>(OP_StorePopBool, L); |
37637 | } |
37638 | bool ByteCodeEmitter::emitStorePopFixedPoint(const SourceInfo &L) { |
37639 | return emitOp<>(OP_StorePopFixedPoint, L); |
37640 | } |
37641 | bool ByteCodeEmitter::emitStorePopPtr(const SourceInfo &L) { |
37642 | return emitOp<>(OP_StorePopPtr, L); |
37643 | } |
37644 | bool ByteCodeEmitter::emitStorePopMemberPtr(const SourceInfo &L) { |
37645 | return emitOp<>(OP_StorePopMemberPtr, L); |
37646 | } |
37647 | bool ByteCodeEmitter::emitStorePopFloat(const SourceInfo &L) { |
37648 | return emitOp<>(OP_StorePopFloat, L); |
37649 | } |
37650 | #endif |
37651 | #ifdef GET_EVAL_IMPL |
37652 | bool EvalEmitter::emitStorePopSint8(const SourceInfo &L) { |
37653 | if (!isActive()) return true; |
37654 | CurrentSource = L; |
37655 | return StorePop<PT_Sint8>(S, OpPC); |
37656 | } |
37657 | bool EvalEmitter::emitStorePopUint8(const SourceInfo &L) { |
37658 | if (!isActive()) return true; |
37659 | CurrentSource = L; |
37660 | return StorePop<PT_Uint8>(S, OpPC); |
37661 | } |
37662 | bool EvalEmitter::emitStorePopSint16(const SourceInfo &L) { |
37663 | if (!isActive()) return true; |
37664 | CurrentSource = L; |
37665 | return StorePop<PT_Sint16>(S, OpPC); |
37666 | } |
37667 | bool EvalEmitter::emitStorePopUint16(const SourceInfo &L) { |
37668 | if (!isActive()) return true; |
37669 | CurrentSource = L; |
37670 | return StorePop<PT_Uint16>(S, OpPC); |
37671 | } |
37672 | bool EvalEmitter::emitStorePopSint32(const SourceInfo &L) { |
37673 | if (!isActive()) return true; |
37674 | CurrentSource = L; |
37675 | return StorePop<PT_Sint32>(S, OpPC); |
37676 | } |
37677 | bool EvalEmitter::emitStorePopUint32(const SourceInfo &L) { |
37678 | if (!isActive()) return true; |
37679 | CurrentSource = L; |
37680 | return StorePop<PT_Uint32>(S, OpPC); |
37681 | } |
37682 | bool EvalEmitter::emitStorePopSint64(const SourceInfo &L) { |
37683 | if (!isActive()) return true; |
37684 | CurrentSource = L; |
37685 | return StorePop<PT_Sint64>(S, OpPC); |
37686 | } |
37687 | bool EvalEmitter::emitStorePopUint64(const SourceInfo &L) { |
37688 | if (!isActive()) return true; |
37689 | CurrentSource = L; |
37690 | return StorePop<PT_Uint64>(S, OpPC); |
37691 | } |
37692 | bool EvalEmitter::emitStorePopIntAP(const SourceInfo &L) { |
37693 | if (!isActive()) return true; |
37694 | CurrentSource = L; |
37695 | return StorePop<PT_IntAP>(S, OpPC); |
37696 | } |
37697 | bool EvalEmitter::emitStorePopIntAPS(const SourceInfo &L) { |
37698 | if (!isActive()) return true; |
37699 | CurrentSource = L; |
37700 | return StorePop<PT_IntAPS>(S, OpPC); |
37701 | } |
37702 | bool EvalEmitter::emitStorePopBool(const SourceInfo &L) { |
37703 | if (!isActive()) return true; |
37704 | CurrentSource = L; |
37705 | return StorePop<PT_Bool>(S, OpPC); |
37706 | } |
37707 | bool EvalEmitter::emitStorePopFixedPoint(const SourceInfo &L) { |
37708 | if (!isActive()) return true; |
37709 | CurrentSource = L; |
37710 | return StorePop<PT_FixedPoint>(S, OpPC); |
37711 | } |
37712 | bool EvalEmitter::emitStorePopPtr(const SourceInfo &L) { |
37713 | if (!isActive()) return true; |
37714 | CurrentSource = L; |
37715 | return StorePop<PT_Ptr>(S, OpPC); |
37716 | } |
37717 | bool EvalEmitter::emitStorePopMemberPtr(const SourceInfo &L) { |
37718 | if (!isActive()) return true; |
37719 | CurrentSource = L; |
37720 | return StorePop<PT_MemberPtr>(S, OpPC); |
37721 | } |
37722 | bool EvalEmitter::emitStorePopFloat(const SourceInfo &L) { |
37723 | if (!isActive()) return true; |
37724 | CurrentSource = L; |
37725 | return StorePop<PT_Float>(S, OpPC); |
37726 | } |
37727 | #endif |
37728 | #ifdef GET_OPCODE_NAMES |
37729 | OP_SubSint8, |
37730 | OP_SubUint8, |
37731 | OP_SubSint16, |
37732 | OP_SubUint16, |
37733 | OP_SubSint32, |
37734 | OP_SubUint32, |
37735 | OP_SubSint64, |
37736 | OP_SubUint64, |
37737 | OP_SubIntAP, |
37738 | OP_SubIntAPS, |
37739 | OP_SubBool, |
37740 | OP_SubFixedPoint, |
37741 | #endif |
37742 | #ifdef GET_INTERP |
37743 | case OP_SubSint8: { |
37744 | if (!Sub<PT_Sint8>(S, OpPC)) |
37745 | return false; |
37746 | continue; |
37747 | } |
37748 | case OP_SubUint8: { |
37749 | if (!Sub<PT_Uint8>(S, OpPC)) |
37750 | return false; |
37751 | continue; |
37752 | } |
37753 | case OP_SubSint16: { |
37754 | if (!Sub<PT_Sint16>(S, OpPC)) |
37755 | return false; |
37756 | continue; |
37757 | } |
37758 | case OP_SubUint16: { |
37759 | if (!Sub<PT_Uint16>(S, OpPC)) |
37760 | return false; |
37761 | continue; |
37762 | } |
37763 | case OP_SubSint32: { |
37764 | if (!Sub<PT_Sint32>(S, OpPC)) |
37765 | return false; |
37766 | continue; |
37767 | } |
37768 | case OP_SubUint32: { |
37769 | if (!Sub<PT_Uint32>(S, OpPC)) |
37770 | return false; |
37771 | continue; |
37772 | } |
37773 | case OP_SubSint64: { |
37774 | if (!Sub<PT_Sint64>(S, OpPC)) |
37775 | return false; |
37776 | continue; |
37777 | } |
37778 | case OP_SubUint64: { |
37779 | if (!Sub<PT_Uint64>(S, OpPC)) |
37780 | return false; |
37781 | continue; |
37782 | } |
37783 | case OP_SubIntAP: { |
37784 | if (!Sub<PT_IntAP>(S, OpPC)) |
37785 | return false; |
37786 | continue; |
37787 | } |
37788 | case OP_SubIntAPS: { |
37789 | if (!Sub<PT_IntAPS>(S, OpPC)) |
37790 | return false; |
37791 | continue; |
37792 | } |
37793 | case OP_SubBool: { |
37794 | if (!Sub<PT_Bool>(S, OpPC)) |
37795 | return false; |
37796 | continue; |
37797 | } |
37798 | case OP_SubFixedPoint: { |
37799 | if (!Sub<PT_FixedPoint>(S, OpPC)) |
37800 | return false; |
37801 | continue; |
37802 | } |
37803 | #endif |
37804 | #ifdef GET_DISASM |
37805 | case OP_SubSint8: |
37806 | Text.Op = PrintName("SubSint8" ); |
37807 | break; |
37808 | case OP_SubUint8: |
37809 | Text.Op = PrintName("SubUint8" ); |
37810 | break; |
37811 | case OP_SubSint16: |
37812 | Text.Op = PrintName("SubSint16" ); |
37813 | break; |
37814 | case OP_SubUint16: |
37815 | Text.Op = PrintName("SubUint16" ); |
37816 | break; |
37817 | case OP_SubSint32: |
37818 | Text.Op = PrintName("SubSint32" ); |
37819 | break; |
37820 | case OP_SubUint32: |
37821 | Text.Op = PrintName("SubUint32" ); |
37822 | break; |
37823 | case OP_SubSint64: |
37824 | Text.Op = PrintName("SubSint64" ); |
37825 | break; |
37826 | case OP_SubUint64: |
37827 | Text.Op = PrintName("SubUint64" ); |
37828 | break; |
37829 | case OP_SubIntAP: |
37830 | Text.Op = PrintName("SubIntAP" ); |
37831 | break; |
37832 | case OP_SubIntAPS: |
37833 | Text.Op = PrintName("SubIntAPS" ); |
37834 | break; |
37835 | case OP_SubBool: |
37836 | Text.Op = PrintName("SubBool" ); |
37837 | break; |
37838 | case OP_SubFixedPoint: |
37839 | Text.Op = PrintName("SubFixedPoint" ); |
37840 | break; |
37841 | #endif |
37842 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
37843 | bool emitSubSint8(const SourceInfo &); |
37844 | bool emitSubUint8(const SourceInfo &); |
37845 | bool emitSubSint16(const SourceInfo &); |
37846 | bool emitSubUint16(const SourceInfo &); |
37847 | bool emitSubSint32(const SourceInfo &); |
37848 | bool emitSubUint32(const SourceInfo &); |
37849 | bool emitSubSint64(const SourceInfo &); |
37850 | bool emitSubUint64(const SourceInfo &); |
37851 | bool emitSubIntAP(const SourceInfo &); |
37852 | bool emitSubIntAPS(const SourceInfo &); |
37853 | bool emitSubBool(const SourceInfo &); |
37854 | bool emitSubFixedPoint(const SourceInfo &); |
37855 | #endif |
37856 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
37857 | [[nodiscard]] bool emitSub(PrimType, const SourceInfo &I); |
37858 | #endif |
37859 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
37860 | bool |
37861 | #if defined(GET_EVAL_IMPL) |
37862 | EvalEmitter |
37863 | #else |
37864 | ByteCodeEmitter |
37865 | #endif |
37866 | ::emitSub(PrimType T0, const SourceInfo &I) { |
37867 | switch (T0) { |
37868 | case PT_Sint8: |
37869 | return emitSubSint8(I); |
37870 | case PT_Uint8: |
37871 | return emitSubUint8(I); |
37872 | case PT_Sint16: |
37873 | return emitSubSint16(I); |
37874 | case PT_Uint16: |
37875 | return emitSubUint16(I); |
37876 | case PT_Sint32: |
37877 | return emitSubSint32(I); |
37878 | case PT_Uint32: |
37879 | return emitSubUint32(I); |
37880 | case PT_Sint64: |
37881 | return emitSubSint64(I); |
37882 | case PT_Uint64: |
37883 | return emitSubUint64(I); |
37884 | case PT_IntAP: |
37885 | return emitSubIntAP(I); |
37886 | case PT_IntAPS: |
37887 | return emitSubIntAPS(I); |
37888 | case PT_Bool: |
37889 | return emitSubBool(I); |
37890 | case PT_FixedPoint: |
37891 | return emitSubFixedPoint(I); |
37892 | default: llvm_unreachable("invalid type: emitSub" ); |
37893 | } |
37894 | llvm_unreachable("invalid enum value" ); |
37895 | } |
37896 | #endif |
37897 | #ifdef GET_LINK_IMPL |
37898 | bool ByteCodeEmitter::emitSubSint8(const SourceInfo &L) { |
37899 | return emitOp<>(OP_SubSint8, L); |
37900 | } |
37901 | bool ByteCodeEmitter::emitSubUint8(const SourceInfo &L) { |
37902 | return emitOp<>(OP_SubUint8, L); |
37903 | } |
37904 | bool ByteCodeEmitter::emitSubSint16(const SourceInfo &L) { |
37905 | return emitOp<>(OP_SubSint16, L); |
37906 | } |
37907 | bool ByteCodeEmitter::emitSubUint16(const SourceInfo &L) { |
37908 | return emitOp<>(OP_SubUint16, L); |
37909 | } |
37910 | bool ByteCodeEmitter::emitSubSint32(const SourceInfo &L) { |
37911 | return emitOp<>(OP_SubSint32, L); |
37912 | } |
37913 | bool ByteCodeEmitter::emitSubUint32(const SourceInfo &L) { |
37914 | return emitOp<>(OP_SubUint32, L); |
37915 | } |
37916 | bool ByteCodeEmitter::emitSubSint64(const SourceInfo &L) { |
37917 | return emitOp<>(OP_SubSint64, L); |
37918 | } |
37919 | bool ByteCodeEmitter::emitSubUint64(const SourceInfo &L) { |
37920 | return emitOp<>(OP_SubUint64, L); |
37921 | } |
37922 | bool ByteCodeEmitter::emitSubIntAP(const SourceInfo &L) { |
37923 | return emitOp<>(OP_SubIntAP, L); |
37924 | } |
37925 | bool ByteCodeEmitter::emitSubIntAPS(const SourceInfo &L) { |
37926 | return emitOp<>(OP_SubIntAPS, L); |
37927 | } |
37928 | bool ByteCodeEmitter::emitSubBool(const SourceInfo &L) { |
37929 | return emitOp<>(OP_SubBool, L); |
37930 | } |
37931 | bool ByteCodeEmitter::emitSubFixedPoint(const SourceInfo &L) { |
37932 | return emitOp<>(OP_SubFixedPoint, L); |
37933 | } |
37934 | #endif |
37935 | #ifdef GET_EVAL_IMPL |
37936 | bool EvalEmitter::emitSubSint8(const SourceInfo &L) { |
37937 | if (!isActive()) return true; |
37938 | CurrentSource = L; |
37939 | return Sub<PT_Sint8>(S, OpPC); |
37940 | } |
37941 | bool EvalEmitter::emitSubUint8(const SourceInfo &L) { |
37942 | if (!isActive()) return true; |
37943 | CurrentSource = L; |
37944 | return Sub<PT_Uint8>(S, OpPC); |
37945 | } |
37946 | bool EvalEmitter::emitSubSint16(const SourceInfo &L) { |
37947 | if (!isActive()) return true; |
37948 | CurrentSource = L; |
37949 | return Sub<PT_Sint16>(S, OpPC); |
37950 | } |
37951 | bool EvalEmitter::emitSubUint16(const SourceInfo &L) { |
37952 | if (!isActive()) return true; |
37953 | CurrentSource = L; |
37954 | return Sub<PT_Uint16>(S, OpPC); |
37955 | } |
37956 | bool EvalEmitter::emitSubSint32(const SourceInfo &L) { |
37957 | if (!isActive()) return true; |
37958 | CurrentSource = L; |
37959 | return Sub<PT_Sint32>(S, OpPC); |
37960 | } |
37961 | bool EvalEmitter::emitSubUint32(const SourceInfo &L) { |
37962 | if (!isActive()) return true; |
37963 | CurrentSource = L; |
37964 | return Sub<PT_Uint32>(S, OpPC); |
37965 | } |
37966 | bool EvalEmitter::emitSubSint64(const SourceInfo &L) { |
37967 | if (!isActive()) return true; |
37968 | CurrentSource = L; |
37969 | return Sub<PT_Sint64>(S, OpPC); |
37970 | } |
37971 | bool EvalEmitter::emitSubUint64(const SourceInfo &L) { |
37972 | if (!isActive()) return true; |
37973 | CurrentSource = L; |
37974 | return Sub<PT_Uint64>(S, OpPC); |
37975 | } |
37976 | bool EvalEmitter::emitSubIntAP(const SourceInfo &L) { |
37977 | if (!isActive()) return true; |
37978 | CurrentSource = L; |
37979 | return Sub<PT_IntAP>(S, OpPC); |
37980 | } |
37981 | bool EvalEmitter::emitSubIntAPS(const SourceInfo &L) { |
37982 | if (!isActive()) return true; |
37983 | CurrentSource = L; |
37984 | return Sub<PT_IntAPS>(S, OpPC); |
37985 | } |
37986 | bool EvalEmitter::emitSubBool(const SourceInfo &L) { |
37987 | if (!isActive()) return true; |
37988 | CurrentSource = L; |
37989 | return Sub<PT_Bool>(S, OpPC); |
37990 | } |
37991 | bool EvalEmitter::emitSubFixedPoint(const SourceInfo &L) { |
37992 | if (!isActive()) return true; |
37993 | CurrentSource = L; |
37994 | return Sub<PT_FixedPoint>(S, OpPC); |
37995 | } |
37996 | #endif |
37997 | #ifdef GET_OPCODE_NAMES |
37998 | OP_SubOffsetSint8, |
37999 | OP_SubOffsetUint8, |
38000 | OP_SubOffsetSint16, |
38001 | OP_SubOffsetUint16, |
38002 | OP_SubOffsetSint32, |
38003 | OP_SubOffsetUint32, |
38004 | OP_SubOffsetSint64, |
38005 | OP_SubOffsetUint64, |
38006 | OP_SubOffsetIntAP, |
38007 | OP_SubOffsetIntAPS, |
38008 | OP_SubOffsetBool, |
38009 | OP_SubOffsetFixedPoint, |
38010 | #endif |
38011 | #ifdef GET_INTERP |
38012 | case OP_SubOffsetSint8: { |
38013 | if (!SubOffset<PT_Sint8>(S, OpPC)) |
38014 | return false; |
38015 | continue; |
38016 | } |
38017 | case OP_SubOffsetUint8: { |
38018 | if (!SubOffset<PT_Uint8>(S, OpPC)) |
38019 | return false; |
38020 | continue; |
38021 | } |
38022 | case OP_SubOffsetSint16: { |
38023 | if (!SubOffset<PT_Sint16>(S, OpPC)) |
38024 | return false; |
38025 | continue; |
38026 | } |
38027 | case OP_SubOffsetUint16: { |
38028 | if (!SubOffset<PT_Uint16>(S, OpPC)) |
38029 | return false; |
38030 | continue; |
38031 | } |
38032 | case OP_SubOffsetSint32: { |
38033 | if (!SubOffset<PT_Sint32>(S, OpPC)) |
38034 | return false; |
38035 | continue; |
38036 | } |
38037 | case OP_SubOffsetUint32: { |
38038 | if (!SubOffset<PT_Uint32>(S, OpPC)) |
38039 | return false; |
38040 | continue; |
38041 | } |
38042 | case OP_SubOffsetSint64: { |
38043 | if (!SubOffset<PT_Sint64>(S, OpPC)) |
38044 | return false; |
38045 | continue; |
38046 | } |
38047 | case OP_SubOffsetUint64: { |
38048 | if (!SubOffset<PT_Uint64>(S, OpPC)) |
38049 | return false; |
38050 | continue; |
38051 | } |
38052 | case OP_SubOffsetIntAP: { |
38053 | if (!SubOffset<PT_IntAP>(S, OpPC)) |
38054 | return false; |
38055 | continue; |
38056 | } |
38057 | case OP_SubOffsetIntAPS: { |
38058 | if (!SubOffset<PT_IntAPS>(S, OpPC)) |
38059 | return false; |
38060 | continue; |
38061 | } |
38062 | case OP_SubOffsetBool: { |
38063 | if (!SubOffset<PT_Bool>(S, OpPC)) |
38064 | return false; |
38065 | continue; |
38066 | } |
38067 | case OP_SubOffsetFixedPoint: { |
38068 | if (!SubOffset<PT_FixedPoint>(S, OpPC)) |
38069 | return false; |
38070 | continue; |
38071 | } |
38072 | #endif |
38073 | #ifdef GET_DISASM |
38074 | case OP_SubOffsetSint8: |
38075 | Text.Op = PrintName("SubOffsetSint8" ); |
38076 | break; |
38077 | case OP_SubOffsetUint8: |
38078 | Text.Op = PrintName("SubOffsetUint8" ); |
38079 | break; |
38080 | case OP_SubOffsetSint16: |
38081 | Text.Op = PrintName("SubOffsetSint16" ); |
38082 | break; |
38083 | case OP_SubOffsetUint16: |
38084 | Text.Op = PrintName("SubOffsetUint16" ); |
38085 | break; |
38086 | case OP_SubOffsetSint32: |
38087 | Text.Op = PrintName("SubOffsetSint32" ); |
38088 | break; |
38089 | case OP_SubOffsetUint32: |
38090 | Text.Op = PrintName("SubOffsetUint32" ); |
38091 | break; |
38092 | case OP_SubOffsetSint64: |
38093 | Text.Op = PrintName("SubOffsetSint64" ); |
38094 | break; |
38095 | case OP_SubOffsetUint64: |
38096 | Text.Op = PrintName("SubOffsetUint64" ); |
38097 | break; |
38098 | case OP_SubOffsetIntAP: |
38099 | Text.Op = PrintName("SubOffsetIntAP" ); |
38100 | break; |
38101 | case OP_SubOffsetIntAPS: |
38102 | Text.Op = PrintName("SubOffsetIntAPS" ); |
38103 | break; |
38104 | case OP_SubOffsetBool: |
38105 | Text.Op = PrintName("SubOffsetBool" ); |
38106 | break; |
38107 | case OP_SubOffsetFixedPoint: |
38108 | Text.Op = PrintName("SubOffsetFixedPoint" ); |
38109 | break; |
38110 | #endif |
38111 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38112 | bool emitSubOffsetSint8(const SourceInfo &); |
38113 | bool emitSubOffsetUint8(const SourceInfo &); |
38114 | bool emitSubOffsetSint16(const SourceInfo &); |
38115 | bool emitSubOffsetUint16(const SourceInfo &); |
38116 | bool emitSubOffsetSint32(const SourceInfo &); |
38117 | bool emitSubOffsetUint32(const SourceInfo &); |
38118 | bool emitSubOffsetSint64(const SourceInfo &); |
38119 | bool emitSubOffsetUint64(const SourceInfo &); |
38120 | bool emitSubOffsetIntAP(const SourceInfo &); |
38121 | bool emitSubOffsetIntAPS(const SourceInfo &); |
38122 | bool emitSubOffsetBool(const SourceInfo &); |
38123 | bool emitSubOffsetFixedPoint(const SourceInfo &); |
38124 | #endif |
38125 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38126 | [[nodiscard]] bool emitSubOffset(PrimType, const SourceInfo &I); |
38127 | #endif |
38128 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
38129 | bool |
38130 | #if defined(GET_EVAL_IMPL) |
38131 | EvalEmitter |
38132 | #else |
38133 | ByteCodeEmitter |
38134 | #endif |
38135 | ::emitSubOffset(PrimType T0, const SourceInfo &I) { |
38136 | switch (T0) { |
38137 | case PT_Sint8: |
38138 | return emitSubOffsetSint8(I); |
38139 | case PT_Uint8: |
38140 | return emitSubOffsetUint8(I); |
38141 | case PT_Sint16: |
38142 | return emitSubOffsetSint16(I); |
38143 | case PT_Uint16: |
38144 | return emitSubOffsetUint16(I); |
38145 | case PT_Sint32: |
38146 | return emitSubOffsetSint32(I); |
38147 | case PT_Uint32: |
38148 | return emitSubOffsetUint32(I); |
38149 | case PT_Sint64: |
38150 | return emitSubOffsetSint64(I); |
38151 | case PT_Uint64: |
38152 | return emitSubOffsetUint64(I); |
38153 | case PT_IntAP: |
38154 | return emitSubOffsetIntAP(I); |
38155 | case PT_IntAPS: |
38156 | return emitSubOffsetIntAPS(I); |
38157 | case PT_Bool: |
38158 | return emitSubOffsetBool(I); |
38159 | case PT_FixedPoint: |
38160 | return emitSubOffsetFixedPoint(I); |
38161 | default: llvm_unreachable("invalid type: emitSubOffset" ); |
38162 | } |
38163 | llvm_unreachable("invalid enum value" ); |
38164 | } |
38165 | #endif |
38166 | #ifdef GET_LINK_IMPL |
38167 | bool ByteCodeEmitter::emitSubOffsetSint8(const SourceInfo &L) { |
38168 | return emitOp<>(OP_SubOffsetSint8, L); |
38169 | } |
38170 | bool ByteCodeEmitter::emitSubOffsetUint8(const SourceInfo &L) { |
38171 | return emitOp<>(OP_SubOffsetUint8, L); |
38172 | } |
38173 | bool ByteCodeEmitter::emitSubOffsetSint16(const SourceInfo &L) { |
38174 | return emitOp<>(OP_SubOffsetSint16, L); |
38175 | } |
38176 | bool ByteCodeEmitter::emitSubOffsetUint16(const SourceInfo &L) { |
38177 | return emitOp<>(OP_SubOffsetUint16, L); |
38178 | } |
38179 | bool ByteCodeEmitter::emitSubOffsetSint32(const SourceInfo &L) { |
38180 | return emitOp<>(OP_SubOffsetSint32, L); |
38181 | } |
38182 | bool ByteCodeEmitter::emitSubOffsetUint32(const SourceInfo &L) { |
38183 | return emitOp<>(OP_SubOffsetUint32, L); |
38184 | } |
38185 | bool ByteCodeEmitter::emitSubOffsetSint64(const SourceInfo &L) { |
38186 | return emitOp<>(OP_SubOffsetSint64, L); |
38187 | } |
38188 | bool ByteCodeEmitter::emitSubOffsetUint64(const SourceInfo &L) { |
38189 | return emitOp<>(OP_SubOffsetUint64, L); |
38190 | } |
38191 | bool ByteCodeEmitter::emitSubOffsetIntAP(const SourceInfo &L) { |
38192 | return emitOp<>(OP_SubOffsetIntAP, L); |
38193 | } |
38194 | bool ByteCodeEmitter::emitSubOffsetIntAPS(const SourceInfo &L) { |
38195 | return emitOp<>(OP_SubOffsetIntAPS, L); |
38196 | } |
38197 | bool ByteCodeEmitter::emitSubOffsetBool(const SourceInfo &L) { |
38198 | return emitOp<>(OP_SubOffsetBool, L); |
38199 | } |
38200 | bool ByteCodeEmitter::emitSubOffsetFixedPoint(const SourceInfo &L) { |
38201 | return emitOp<>(OP_SubOffsetFixedPoint, L); |
38202 | } |
38203 | #endif |
38204 | #ifdef GET_EVAL_IMPL |
38205 | bool EvalEmitter::emitSubOffsetSint8(const SourceInfo &L) { |
38206 | if (!isActive()) return true; |
38207 | CurrentSource = L; |
38208 | return SubOffset<PT_Sint8>(S, OpPC); |
38209 | } |
38210 | bool EvalEmitter::emitSubOffsetUint8(const SourceInfo &L) { |
38211 | if (!isActive()) return true; |
38212 | CurrentSource = L; |
38213 | return SubOffset<PT_Uint8>(S, OpPC); |
38214 | } |
38215 | bool EvalEmitter::emitSubOffsetSint16(const SourceInfo &L) { |
38216 | if (!isActive()) return true; |
38217 | CurrentSource = L; |
38218 | return SubOffset<PT_Sint16>(S, OpPC); |
38219 | } |
38220 | bool EvalEmitter::emitSubOffsetUint16(const SourceInfo &L) { |
38221 | if (!isActive()) return true; |
38222 | CurrentSource = L; |
38223 | return SubOffset<PT_Uint16>(S, OpPC); |
38224 | } |
38225 | bool EvalEmitter::emitSubOffsetSint32(const SourceInfo &L) { |
38226 | if (!isActive()) return true; |
38227 | CurrentSource = L; |
38228 | return SubOffset<PT_Sint32>(S, OpPC); |
38229 | } |
38230 | bool EvalEmitter::emitSubOffsetUint32(const SourceInfo &L) { |
38231 | if (!isActive()) return true; |
38232 | CurrentSource = L; |
38233 | return SubOffset<PT_Uint32>(S, OpPC); |
38234 | } |
38235 | bool EvalEmitter::emitSubOffsetSint64(const SourceInfo &L) { |
38236 | if (!isActive()) return true; |
38237 | CurrentSource = L; |
38238 | return SubOffset<PT_Sint64>(S, OpPC); |
38239 | } |
38240 | bool EvalEmitter::emitSubOffsetUint64(const SourceInfo &L) { |
38241 | if (!isActive()) return true; |
38242 | CurrentSource = L; |
38243 | return SubOffset<PT_Uint64>(S, OpPC); |
38244 | } |
38245 | bool EvalEmitter::emitSubOffsetIntAP(const SourceInfo &L) { |
38246 | if (!isActive()) return true; |
38247 | CurrentSource = L; |
38248 | return SubOffset<PT_IntAP>(S, OpPC); |
38249 | } |
38250 | bool EvalEmitter::emitSubOffsetIntAPS(const SourceInfo &L) { |
38251 | if (!isActive()) return true; |
38252 | CurrentSource = L; |
38253 | return SubOffset<PT_IntAPS>(S, OpPC); |
38254 | } |
38255 | bool EvalEmitter::emitSubOffsetBool(const SourceInfo &L) { |
38256 | if (!isActive()) return true; |
38257 | CurrentSource = L; |
38258 | return SubOffset<PT_Bool>(S, OpPC); |
38259 | } |
38260 | bool EvalEmitter::emitSubOffsetFixedPoint(const SourceInfo &L) { |
38261 | if (!isActive()) return true; |
38262 | CurrentSource = L; |
38263 | return SubOffset<PT_FixedPoint>(S, OpPC); |
38264 | } |
38265 | #endif |
38266 | #ifdef GET_OPCODE_NAMES |
38267 | OP_SubPtrSint8, |
38268 | OP_SubPtrUint8, |
38269 | OP_SubPtrSint16, |
38270 | OP_SubPtrUint16, |
38271 | OP_SubPtrSint32, |
38272 | OP_SubPtrUint32, |
38273 | OP_SubPtrSint64, |
38274 | OP_SubPtrUint64, |
38275 | OP_SubPtrIntAP, |
38276 | OP_SubPtrIntAPS, |
38277 | #endif |
38278 | #ifdef GET_INTERP |
38279 | case OP_SubPtrSint8: { |
38280 | if (!SubPtr<PT_Sint8>(S, OpPC)) |
38281 | return false; |
38282 | continue; |
38283 | } |
38284 | case OP_SubPtrUint8: { |
38285 | if (!SubPtr<PT_Uint8>(S, OpPC)) |
38286 | return false; |
38287 | continue; |
38288 | } |
38289 | case OP_SubPtrSint16: { |
38290 | if (!SubPtr<PT_Sint16>(S, OpPC)) |
38291 | return false; |
38292 | continue; |
38293 | } |
38294 | case OP_SubPtrUint16: { |
38295 | if (!SubPtr<PT_Uint16>(S, OpPC)) |
38296 | return false; |
38297 | continue; |
38298 | } |
38299 | case OP_SubPtrSint32: { |
38300 | if (!SubPtr<PT_Sint32>(S, OpPC)) |
38301 | return false; |
38302 | continue; |
38303 | } |
38304 | case OP_SubPtrUint32: { |
38305 | if (!SubPtr<PT_Uint32>(S, OpPC)) |
38306 | return false; |
38307 | continue; |
38308 | } |
38309 | case OP_SubPtrSint64: { |
38310 | if (!SubPtr<PT_Sint64>(S, OpPC)) |
38311 | return false; |
38312 | continue; |
38313 | } |
38314 | case OP_SubPtrUint64: { |
38315 | if (!SubPtr<PT_Uint64>(S, OpPC)) |
38316 | return false; |
38317 | continue; |
38318 | } |
38319 | case OP_SubPtrIntAP: { |
38320 | if (!SubPtr<PT_IntAP>(S, OpPC)) |
38321 | return false; |
38322 | continue; |
38323 | } |
38324 | case OP_SubPtrIntAPS: { |
38325 | if (!SubPtr<PT_IntAPS>(S, OpPC)) |
38326 | return false; |
38327 | continue; |
38328 | } |
38329 | #endif |
38330 | #ifdef GET_DISASM |
38331 | case OP_SubPtrSint8: |
38332 | Text.Op = PrintName("SubPtrSint8" ); |
38333 | break; |
38334 | case OP_SubPtrUint8: |
38335 | Text.Op = PrintName("SubPtrUint8" ); |
38336 | break; |
38337 | case OP_SubPtrSint16: |
38338 | Text.Op = PrintName("SubPtrSint16" ); |
38339 | break; |
38340 | case OP_SubPtrUint16: |
38341 | Text.Op = PrintName("SubPtrUint16" ); |
38342 | break; |
38343 | case OP_SubPtrSint32: |
38344 | Text.Op = PrintName("SubPtrSint32" ); |
38345 | break; |
38346 | case OP_SubPtrUint32: |
38347 | Text.Op = PrintName("SubPtrUint32" ); |
38348 | break; |
38349 | case OP_SubPtrSint64: |
38350 | Text.Op = PrintName("SubPtrSint64" ); |
38351 | break; |
38352 | case OP_SubPtrUint64: |
38353 | Text.Op = PrintName("SubPtrUint64" ); |
38354 | break; |
38355 | case OP_SubPtrIntAP: |
38356 | Text.Op = PrintName("SubPtrIntAP" ); |
38357 | break; |
38358 | case OP_SubPtrIntAPS: |
38359 | Text.Op = PrintName("SubPtrIntAPS" ); |
38360 | break; |
38361 | #endif |
38362 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38363 | bool emitSubPtrSint8(const SourceInfo &); |
38364 | bool emitSubPtrUint8(const SourceInfo &); |
38365 | bool emitSubPtrSint16(const SourceInfo &); |
38366 | bool emitSubPtrUint16(const SourceInfo &); |
38367 | bool emitSubPtrSint32(const SourceInfo &); |
38368 | bool emitSubPtrUint32(const SourceInfo &); |
38369 | bool emitSubPtrSint64(const SourceInfo &); |
38370 | bool emitSubPtrUint64(const SourceInfo &); |
38371 | bool emitSubPtrIntAP(const SourceInfo &); |
38372 | bool emitSubPtrIntAPS(const SourceInfo &); |
38373 | #endif |
38374 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38375 | [[nodiscard]] bool emitSubPtr(PrimType, const SourceInfo &I); |
38376 | #endif |
38377 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
38378 | bool |
38379 | #if defined(GET_EVAL_IMPL) |
38380 | EvalEmitter |
38381 | #else |
38382 | ByteCodeEmitter |
38383 | #endif |
38384 | ::emitSubPtr(PrimType T0, const SourceInfo &I) { |
38385 | switch (T0) { |
38386 | case PT_Sint8: |
38387 | return emitSubPtrSint8(I); |
38388 | case PT_Uint8: |
38389 | return emitSubPtrUint8(I); |
38390 | case PT_Sint16: |
38391 | return emitSubPtrSint16(I); |
38392 | case PT_Uint16: |
38393 | return emitSubPtrUint16(I); |
38394 | case PT_Sint32: |
38395 | return emitSubPtrSint32(I); |
38396 | case PT_Uint32: |
38397 | return emitSubPtrUint32(I); |
38398 | case PT_Sint64: |
38399 | return emitSubPtrSint64(I); |
38400 | case PT_Uint64: |
38401 | return emitSubPtrUint64(I); |
38402 | case PT_IntAP: |
38403 | return emitSubPtrIntAP(I); |
38404 | case PT_IntAPS: |
38405 | return emitSubPtrIntAPS(I); |
38406 | default: llvm_unreachable("invalid type: emitSubPtr" ); |
38407 | } |
38408 | llvm_unreachable("invalid enum value" ); |
38409 | } |
38410 | #endif |
38411 | #ifdef GET_LINK_IMPL |
38412 | bool ByteCodeEmitter::emitSubPtrSint8(const SourceInfo &L) { |
38413 | return emitOp<>(OP_SubPtrSint8, L); |
38414 | } |
38415 | bool ByteCodeEmitter::emitSubPtrUint8(const SourceInfo &L) { |
38416 | return emitOp<>(OP_SubPtrUint8, L); |
38417 | } |
38418 | bool ByteCodeEmitter::emitSubPtrSint16(const SourceInfo &L) { |
38419 | return emitOp<>(OP_SubPtrSint16, L); |
38420 | } |
38421 | bool ByteCodeEmitter::emitSubPtrUint16(const SourceInfo &L) { |
38422 | return emitOp<>(OP_SubPtrUint16, L); |
38423 | } |
38424 | bool ByteCodeEmitter::emitSubPtrSint32(const SourceInfo &L) { |
38425 | return emitOp<>(OP_SubPtrSint32, L); |
38426 | } |
38427 | bool ByteCodeEmitter::emitSubPtrUint32(const SourceInfo &L) { |
38428 | return emitOp<>(OP_SubPtrUint32, L); |
38429 | } |
38430 | bool ByteCodeEmitter::emitSubPtrSint64(const SourceInfo &L) { |
38431 | return emitOp<>(OP_SubPtrSint64, L); |
38432 | } |
38433 | bool ByteCodeEmitter::emitSubPtrUint64(const SourceInfo &L) { |
38434 | return emitOp<>(OP_SubPtrUint64, L); |
38435 | } |
38436 | bool ByteCodeEmitter::emitSubPtrIntAP(const SourceInfo &L) { |
38437 | return emitOp<>(OP_SubPtrIntAP, L); |
38438 | } |
38439 | bool ByteCodeEmitter::emitSubPtrIntAPS(const SourceInfo &L) { |
38440 | return emitOp<>(OP_SubPtrIntAPS, L); |
38441 | } |
38442 | #endif |
38443 | #ifdef GET_EVAL_IMPL |
38444 | bool EvalEmitter::emitSubPtrSint8(const SourceInfo &L) { |
38445 | if (!isActive()) return true; |
38446 | CurrentSource = L; |
38447 | return SubPtr<PT_Sint8>(S, OpPC); |
38448 | } |
38449 | bool EvalEmitter::emitSubPtrUint8(const SourceInfo &L) { |
38450 | if (!isActive()) return true; |
38451 | CurrentSource = L; |
38452 | return SubPtr<PT_Uint8>(S, OpPC); |
38453 | } |
38454 | bool EvalEmitter::emitSubPtrSint16(const SourceInfo &L) { |
38455 | if (!isActive()) return true; |
38456 | CurrentSource = L; |
38457 | return SubPtr<PT_Sint16>(S, OpPC); |
38458 | } |
38459 | bool EvalEmitter::emitSubPtrUint16(const SourceInfo &L) { |
38460 | if (!isActive()) return true; |
38461 | CurrentSource = L; |
38462 | return SubPtr<PT_Uint16>(S, OpPC); |
38463 | } |
38464 | bool EvalEmitter::emitSubPtrSint32(const SourceInfo &L) { |
38465 | if (!isActive()) return true; |
38466 | CurrentSource = L; |
38467 | return SubPtr<PT_Sint32>(S, OpPC); |
38468 | } |
38469 | bool EvalEmitter::emitSubPtrUint32(const SourceInfo &L) { |
38470 | if (!isActive()) return true; |
38471 | CurrentSource = L; |
38472 | return SubPtr<PT_Uint32>(S, OpPC); |
38473 | } |
38474 | bool EvalEmitter::emitSubPtrSint64(const SourceInfo &L) { |
38475 | if (!isActive()) return true; |
38476 | CurrentSource = L; |
38477 | return SubPtr<PT_Sint64>(S, OpPC); |
38478 | } |
38479 | bool EvalEmitter::emitSubPtrUint64(const SourceInfo &L) { |
38480 | if (!isActive()) return true; |
38481 | CurrentSource = L; |
38482 | return SubPtr<PT_Uint64>(S, OpPC); |
38483 | } |
38484 | bool EvalEmitter::emitSubPtrIntAP(const SourceInfo &L) { |
38485 | if (!isActive()) return true; |
38486 | CurrentSource = L; |
38487 | return SubPtr<PT_IntAP>(S, OpPC); |
38488 | } |
38489 | bool EvalEmitter::emitSubPtrIntAPS(const SourceInfo &L) { |
38490 | if (!isActive()) return true; |
38491 | CurrentSource = L; |
38492 | return SubPtr<PT_IntAPS>(S, OpPC); |
38493 | } |
38494 | #endif |
38495 | #ifdef GET_OPCODE_NAMES |
38496 | OP_Subf, |
38497 | #endif |
38498 | #ifdef GET_INTERP |
38499 | case OP_Subf: { |
38500 | const auto V0 = ReadArg<uint32_t>(S, PC); |
38501 | if (!Subf(S, OpPC, V0)) |
38502 | return false; |
38503 | continue; |
38504 | } |
38505 | #endif |
38506 | #ifdef GET_DISASM |
38507 | case OP_Subf: |
38508 | Text.Op = PrintName("Subf" ); |
38509 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
38510 | break; |
38511 | #endif |
38512 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38513 | bool emitSubf( uint32_t , const SourceInfo &); |
38514 | #endif |
38515 | #ifdef GET_LINK_IMPL |
38516 | bool ByteCodeEmitter::emitSubf( uint32_t A0, const SourceInfo &L) { |
38517 | return emitOp<uint32_t>(OP_Subf, A0, L); |
38518 | } |
38519 | #endif |
38520 | #ifdef GET_EVAL_IMPL |
38521 | bool EvalEmitter::emitSubf( uint32_t A0, const SourceInfo &L) { |
38522 | if (!isActive()) return true; |
38523 | CurrentSource = L; |
38524 | return Subf(S, OpPC, A0); |
38525 | } |
38526 | #endif |
38527 | #ifdef GET_OPCODE_NAMES |
38528 | OP_This, |
38529 | #endif |
38530 | #ifdef GET_INTERP |
38531 | case OP_This: { |
38532 | if (!This(S, OpPC)) |
38533 | return false; |
38534 | continue; |
38535 | } |
38536 | #endif |
38537 | #ifdef GET_DISASM |
38538 | case OP_This: |
38539 | Text.Op = PrintName("This" ); |
38540 | break; |
38541 | #endif |
38542 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38543 | bool emitThis(const SourceInfo &); |
38544 | #endif |
38545 | #ifdef GET_LINK_IMPL |
38546 | bool ByteCodeEmitter::emitThis(const SourceInfo &L) { |
38547 | return emitOp<>(OP_This, L); |
38548 | } |
38549 | #endif |
38550 | #ifdef GET_EVAL_IMPL |
38551 | bool EvalEmitter::emitThis(const SourceInfo &L) { |
38552 | if (!isActive()) return true; |
38553 | CurrentSource = L; |
38554 | return This(S, OpPC); |
38555 | } |
38556 | #endif |
38557 | #ifdef GET_OPCODE_NAMES |
38558 | OP_ToMemberPtr, |
38559 | #endif |
38560 | #ifdef GET_INTERP |
38561 | case OP_ToMemberPtr: { |
38562 | if (!ToMemberPtr(S, OpPC)) |
38563 | return false; |
38564 | continue; |
38565 | } |
38566 | #endif |
38567 | #ifdef GET_DISASM |
38568 | case OP_ToMemberPtr: |
38569 | Text.Op = PrintName("ToMemberPtr" ); |
38570 | break; |
38571 | #endif |
38572 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38573 | bool emitToMemberPtr(const SourceInfo &); |
38574 | #endif |
38575 | #ifdef GET_LINK_IMPL |
38576 | bool ByteCodeEmitter::emitToMemberPtr(const SourceInfo &L) { |
38577 | return emitOp<>(OP_ToMemberPtr, L); |
38578 | } |
38579 | #endif |
38580 | #ifdef GET_EVAL_IMPL |
38581 | bool EvalEmitter::emitToMemberPtr(const SourceInfo &L) { |
38582 | if (!isActive()) return true; |
38583 | CurrentSource = L; |
38584 | return ToMemberPtr(S, OpPC); |
38585 | } |
38586 | #endif |
38587 | #ifdef GET_OPCODE_NAMES |
38588 | OP_Unsupported, |
38589 | #endif |
38590 | #ifdef GET_INTERP |
38591 | case OP_Unsupported: { |
38592 | if (!Unsupported(S, OpPC)) |
38593 | return false; |
38594 | continue; |
38595 | } |
38596 | #endif |
38597 | #ifdef GET_DISASM |
38598 | case OP_Unsupported: |
38599 | Text.Op = PrintName("Unsupported" ); |
38600 | break; |
38601 | #endif |
38602 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38603 | bool emitUnsupported(const SourceInfo &); |
38604 | #endif |
38605 | #ifdef GET_LINK_IMPL |
38606 | bool ByteCodeEmitter::emitUnsupported(const SourceInfo &L) { |
38607 | return emitOp<>(OP_Unsupported, L); |
38608 | } |
38609 | #endif |
38610 | #ifdef GET_EVAL_IMPL |
38611 | bool EvalEmitter::emitUnsupported(const SourceInfo &L) { |
38612 | if (!isActive()) return true; |
38613 | CurrentSource = L; |
38614 | return Unsupported(S, OpPC); |
38615 | } |
38616 | #endif |
38617 | #ifdef GET_OPCODE_NAMES |
38618 | OP_ZeroSint8, |
38619 | OP_ZeroUint8, |
38620 | OP_ZeroSint16, |
38621 | OP_ZeroUint16, |
38622 | OP_ZeroSint32, |
38623 | OP_ZeroUint32, |
38624 | OP_ZeroSint64, |
38625 | OP_ZeroUint64, |
38626 | OP_ZeroBool, |
38627 | #endif |
38628 | #ifdef GET_INTERP |
38629 | case OP_ZeroSint8: { |
38630 | if (!Zero<PT_Sint8>(S, OpPC)) |
38631 | return false; |
38632 | continue; |
38633 | } |
38634 | case OP_ZeroUint8: { |
38635 | if (!Zero<PT_Uint8>(S, OpPC)) |
38636 | return false; |
38637 | continue; |
38638 | } |
38639 | case OP_ZeroSint16: { |
38640 | if (!Zero<PT_Sint16>(S, OpPC)) |
38641 | return false; |
38642 | continue; |
38643 | } |
38644 | case OP_ZeroUint16: { |
38645 | if (!Zero<PT_Uint16>(S, OpPC)) |
38646 | return false; |
38647 | continue; |
38648 | } |
38649 | case OP_ZeroSint32: { |
38650 | if (!Zero<PT_Sint32>(S, OpPC)) |
38651 | return false; |
38652 | continue; |
38653 | } |
38654 | case OP_ZeroUint32: { |
38655 | if (!Zero<PT_Uint32>(S, OpPC)) |
38656 | return false; |
38657 | continue; |
38658 | } |
38659 | case OP_ZeroSint64: { |
38660 | if (!Zero<PT_Sint64>(S, OpPC)) |
38661 | return false; |
38662 | continue; |
38663 | } |
38664 | case OP_ZeroUint64: { |
38665 | if (!Zero<PT_Uint64>(S, OpPC)) |
38666 | return false; |
38667 | continue; |
38668 | } |
38669 | case OP_ZeroBool: { |
38670 | if (!Zero<PT_Bool>(S, OpPC)) |
38671 | return false; |
38672 | continue; |
38673 | } |
38674 | #endif |
38675 | #ifdef GET_DISASM |
38676 | case OP_ZeroSint8: |
38677 | Text.Op = PrintName("ZeroSint8" ); |
38678 | break; |
38679 | case OP_ZeroUint8: |
38680 | Text.Op = PrintName("ZeroUint8" ); |
38681 | break; |
38682 | case OP_ZeroSint16: |
38683 | Text.Op = PrintName("ZeroSint16" ); |
38684 | break; |
38685 | case OP_ZeroUint16: |
38686 | Text.Op = PrintName("ZeroUint16" ); |
38687 | break; |
38688 | case OP_ZeroSint32: |
38689 | Text.Op = PrintName("ZeroSint32" ); |
38690 | break; |
38691 | case OP_ZeroUint32: |
38692 | Text.Op = PrintName("ZeroUint32" ); |
38693 | break; |
38694 | case OP_ZeroSint64: |
38695 | Text.Op = PrintName("ZeroSint64" ); |
38696 | break; |
38697 | case OP_ZeroUint64: |
38698 | Text.Op = PrintName("ZeroUint64" ); |
38699 | break; |
38700 | case OP_ZeroBool: |
38701 | Text.Op = PrintName("ZeroBool" ); |
38702 | break; |
38703 | #endif |
38704 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38705 | bool emitZeroSint8(const SourceInfo &); |
38706 | bool emitZeroUint8(const SourceInfo &); |
38707 | bool emitZeroSint16(const SourceInfo &); |
38708 | bool emitZeroUint16(const SourceInfo &); |
38709 | bool emitZeroSint32(const SourceInfo &); |
38710 | bool emitZeroUint32(const SourceInfo &); |
38711 | bool emitZeroSint64(const SourceInfo &); |
38712 | bool emitZeroUint64(const SourceInfo &); |
38713 | bool emitZeroBool(const SourceInfo &); |
38714 | #endif |
38715 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38716 | [[nodiscard]] bool emitZero(PrimType, const SourceInfo &I); |
38717 | #endif |
38718 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
38719 | bool |
38720 | #if defined(GET_EVAL_IMPL) |
38721 | EvalEmitter |
38722 | #else |
38723 | ByteCodeEmitter |
38724 | #endif |
38725 | ::emitZero(PrimType T0, const SourceInfo &I) { |
38726 | switch (T0) { |
38727 | case PT_Sint8: |
38728 | return emitZeroSint8(I); |
38729 | case PT_Uint8: |
38730 | return emitZeroUint8(I); |
38731 | case PT_Sint16: |
38732 | return emitZeroSint16(I); |
38733 | case PT_Uint16: |
38734 | return emitZeroUint16(I); |
38735 | case PT_Sint32: |
38736 | return emitZeroSint32(I); |
38737 | case PT_Uint32: |
38738 | return emitZeroUint32(I); |
38739 | case PT_Sint64: |
38740 | return emitZeroSint64(I); |
38741 | case PT_Uint64: |
38742 | return emitZeroUint64(I); |
38743 | case PT_Bool: |
38744 | return emitZeroBool(I); |
38745 | default: llvm_unreachable("invalid type: emitZero" ); |
38746 | } |
38747 | llvm_unreachable("invalid enum value" ); |
38748 | } |
38749 | #endif |
38750 | #ifdef GET_LINK_IMPL |
38751 | bool ByteCodeEmitter::emitZeroSint8(const SourceInfo &L) { |
38752 | return emitOp<>(OP_ZeroSint8, L); |
38753 | } |
38754 | bool ByteCodeEmitter::emitZeroUint8(const SourceInfo &L) { |
38755 | return emitOp<>(OP_ZeroUint8, L); |
38756 | } |
38757 | bool ByteCodeEmitter::emitZeroSint16(const SourceInfo &L) { |
38758 | return emitOp<>(OP_ZeroSint16, L); |
38759 | } |
38760 | bool ByteCodeEmitter::emitZeroUint16(const SourceInfo &L) { |
38761 | return emitOp<>(OP_ZeroUint16, L); |
38762 | } |
38763 | bool ByteCodeEmitter::emitZeroSint32(const SourceInfo &L) { |
38764 | return emitOp<>(OP_ZeroSint32, L); |
38765 | } |
38766 | bool ByteCodeEmitter::emitZeroUint32(const SourceInfo &L) { |
38767 | return emitOp<>(OP_ZeroUint32, L); |
38768 | } |
38769 | bool ByteCodeEmitter::emitZeroSint64(const SourceInfo &L) { |
38770 | return emitOp<>(OP_ZeroSint64, L); |
38771 | } |
38772 | bool ByteCodeEmitter::emitZeroUint64(const SourceInfo &L) { |
38773 | return emitOp<>(OP_ZeroUint64, L); |
38774 | } |
38775 | bool ByteCodeEmitter::emitZeroBool(const SourceInfo &L) { |
38776 | return emitOp<>(OP_ZeroBool, L); |
38777 | } |
38778 | #endif |
38779 | #ifdef GET_EVAL_IMPL |
38780 | bool EvalEmitter::emitZeroSint8(const SourceInfo &L) { |
38781 | if (!isActive()) return true; |
38782 | CurrentSource = L; |
38783 | return Zero<PT_Sint8>(S, OpPC); |
38784 | } |
38785 | bool EvalEmitter::emitZeroUint8(const SourceInfo &L) { |
38786 | if (!isActive()) return true; |
38787 | CurrentSource = L; |
38788 | return Zero<PT_Uint8>(S, OpPC); |
38789 | } |
38790 | bool EvalEmitter::emitZeroSint16(const SourceInfo &L) { |
38791 | if (!isActive()) return true; |
38792 | CurrentSource = L; |
38793 | return Zero<PT_Sint16>(S, OpPC); |
38794 | } |
38795 | bool EvalEmitter::emitZeroUint16(const SourceInfo &L) { |
38796 | if (!isActive()) return true; |
38797 | CurrentSource = L; |
38798 | return Zero<PT_Uint16>(S, OpPC); |
38799 | } |
38800 | bool EvalEmitter::emitZeroSint32(const SourceInfo &L) { |
38801 | if (!isActive()) return true; |
38802 | CurrentSource = L; |
38803 | return Zero<PT_Sint32>(S, OpPC); |
38804 | } |
38805 | bool EvalEmitter::emitZeroUint32(const SourceInfo &L) { |
38806 | if (!isActive()) return true; |
38807 | CurrentSource = L; |
38808 | return Zero<PT_Uint32>(S, OpPC); |
38809 | } |
38810 | bool EvalEmitter::emitZeroSint64(const SourceInfo &L) { |
38811 | if (!isActive()) return true; |
38812 | CurrentSource = L; |
38813 | return Zero<PT_Sint64>(S, OpPC); |
38814 | } |
38815 | bool EvalEmitter::emitZeroUint64(const SourceInfo &L) { |
38816 | if (!isActive()) return true; |
38817 | CurrentSource = L; |
38818 | return Zero<PT_Uint64>(S, OpPC); |
38819 | } |
38820 | bool EvalEmitter::emitZeroBool(const SourceInfo &L) { |
38821 | if (!isActive()) return true; |
38822 | CurrentSource = L; |
38823 | return Zero<PT_Bool>(S, OpPC); |
38824 | } |
38825 | #endif |
38826 | #ifdef GET_OPCODE_NAMES |
38827 | OP_ZeroIntAP, |
38828 | #endif |
38829 | #ifdef GET_INTERP |
38830 | case OP_ZeroIntAP: { |
38831 | const auto V0 = ReadArg<uint32_t>(S, PC); |
38832 | if (!ZeroIntAP(S, OpPC, V0)) |
38833 | return false; |
38834 | continue; |
38835 | } |
38836 | #endif |
38837 | #ifdef GET_DISASM |
38838 | case OP_ZeroIntAP: |
38839 | Text.Op = PrintName("ZeroIntAP" ); |
38840 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
38841 | break; |
38842 | #endif |
38843 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38844 | bool emitZeroIntAP( uint32_t , const SourceInfo &); |
38845 | #endif |
38846 | #ifdef GET_LINK_IMPL |
38847 | bool ByteCodeEmitter::emitZeroIntAP( uint32_t A0, const SourceInfo &L) { |
38848 | return emitOp<uint32_t>(OP_ZeroIntAP, A0, L); |
38849 | } |
38850 | #endif |
38851 | #ifdef GET_EVAL_IMPL |
38852 | bool EvalEmitter::emitZeroIntAP( uint32_t A0, const SourceInfo &L) { |
38853 | if (!isActive()) return true; |
38854 | CurrentSource = L; |
38855 | return ZeroIntAP(S, OpPC, A0); |
38856 | } |
38857 | #endif |
38858 | #ifdef GET_OPCODE_NAMES |
38859 | OP_ZeroIntAPS, |
38860 | #endif |
38861 | #ifdef GET_INTERP |
38862 | case OP_ZeroIntAPS: { |
38863 | const auto V0 = ReadArg<uint32_t>(S, PC); |
38864 | if (!ZeroIntAPS(S, OpPC, V0)) |
38865 | return false; |
38866 | continue; |
38867 | } |
38868 | #endif |
38869 | #ifdef GET_DISASM |
38870 | case OP_ZeroIntAPS: |
38871 | Text.Op = PrintName("ZeroIntAPS" ); |
38872 | Text.Args.push_back(printArg<uint32_t>(P, PC)); |
38873 | break; |
38874 | #endif |
38875 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
38876 | bool emitZeroIntAPS( uint32_t , const SourceInfo &); |
38877 | #endif |
38878 | #ifdef GET_LINK_IMPL |
38879 | bool ByteCodeEmitter::emitZeroIntAPS( uint32_t A0, const SourceInfo &L) { |
38880 | return emitOp<uint32_t>(OP_ZeroIntAPS, A0, L); |
38881 | } |
38882 | #endif |
38883 | #ifdef GET_EVAL_IMPL |
38884 | bool EvalEmitter::emitZeroIntAPS( uint32_t A0, const SourceInfo &L) { |
38885 | if (!isActive()) return true; |
38886 | CurrentSource = L; |
38887 | return ZeroIntAPS(S, OpPC, A0); |
38888 | } |
38889 | #endif |
38890 | |