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 | #endif |
14 | #ifdef GET_INTERP |
15 | case OP_AddSint8: { |
16 | if (!Add<PT_Sint8>(S, OpPC)) |
17 | return false; |
18 | continue; |
19 | } |
20 | case OP_AddUint8: { |
21 | if (!Add<PT_Uint8>(S, OpPC)) |
22 | return false; |
23 | continue; |
24 | } |
25 | case OP_AddSint16: { |
26 | if (!Add<PT_Sint16>(S, OpPC)) |
27 | return false; |
28 | continue; |
29 | } |
30 | case OP_AddUint16: { |
31 | if (!Add<PT_Uint16>(S, OpPC)) |
32 | return false; |
33 | continue; |
34 | } |
35 | case OP_AddSint32: { |
36 | if (!Add<PT_Sint32>(S, OpPC)) |
37 | return false; |
38 | continue; |
39 | } |
40 | case OP_AddUint32: { |
41 | if (!Add<PT_Uint32>(S, OpPC)) |
42 | return false; |
43 | continue; |
44 | } |
45 | case OP_AddSint64: { |
46 | if (!Add<PT_Sint64>(S, OpPC)) |
47 | return false; |
48 | continue; |
49 | } |
50 | case OP_AddUint64: { |
51 | if (!Add<PT_Uint64>(S, OpPC)) |
52 | return false; |
53 | continue; |
54 | } |
55 | case OP_AddIntAP: { |
56 | if (!Add<PT_IntAP>(S, OpPC)) |
57 | return false; |
58 | continue; |
59 | } |
60 | case OP_AddIntAPS: { |
61 | if (!Add<PT_IntAPS>(S, OpPC)) |
62 | return false; |
63 | continue; |
64 | } |
65 | case OP_AddBool: { |
66 | if (!Add<PT_Bool>(S, OpPC)) |
67 | return false; |
68 | continue; |
69 | } |
70 | #endif |
71 | #ifdef GET_DISASM |
72 | case OP_AddSint8: |
73 | PrintName("AddSint8" ); |
74 | OS << "\t" << "\n" ; |
75 | continue; |
76 | case OP_AddUint8: |
77 | PrintName("AddUint8" ); |
78 | OS << "\t" << "\n" ; |
79 | continue; |
80 | case OP_AddSint16: |
81 | PrintName("AddSint16" ); |
82 | OS << "\t" << "\n" ; |
83 | continue; |
84 | case OP_AddUint16: |
85 | PrintName("AddUint16" ); |
86 | OS << "\t" << "\n" ; |
87 | continue; |
88 | case OP_AddSint32: |
89 | PrintName("AddSint32" ); |
90 | OS << "\t" << "\n" ; |
91 | continue; |
92 | case OP_AddUint32: |
93 | PrintName("AddUint32" ); |
94 | OS << "\t" << "\n" ; |
95 | continue; |
96 | case OP_AddSint64: |
97 | PrintName("AddSint64" ); |
98 | OS << "\t" << "\n" ; |
99 | continue; |
100 | case OP_AddUint64: |
101 | PrintName("AddUint64" ); |
102 | OS << "\t" << "\n" ; |
103 | continue; |
104 | case OP_AddIntAP: |
105 | PrintName("AddIntAP" ); |
106 | OS << "\t" << "\n" ; |
107 | continue; |
108 | case OP_AddIntAPS: |
109 | PrintName("AddIntAPS" ); |
110 | OS << "\t" << "\n" ; |
111 | continue; |
112 | case OP_AddBool: |
113 | PrintName("AddBool" ); |
114 | OS << "\t" << "\n" ; |
115 | continue; |
116 | #endif |
117 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
118 | bool emitAddSint8(const SourceInfo &); |
119 | bool emitAddUint8(const SourceInfo &); |
120 | bool emitAddSint16(const SourceInfo &); |
121 | bool emitAddUint16(const SourceInfo &); |
122 | bool emitAddSint32(const SourceInfo &); |
123 | bool emitAddUint32(const SourceInfo &); |
124 | bool emitAddSint64(const SourceInfo &); |
125 | bool emitAddUint64(const SourceInfo &); |
126 | bool emitAddIntAP(const SourceInfo &); |
127 | bool emitAddIntAPS(const SourceInfo &); |
128 | bool emitAddBool(const SourceInfo &); |
129 | #endif |
130 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
131 | [[nodiscard]] bool emitAdd(PrimType, const SourceInfo &I); |
132 | #endif |
133 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
134 | bool |
135 | #if defined(GET_EVAL_IMPL) |
136 | EvalEmitter |
137 | #else |
138 | ByteCodeEmitter |
139 | #endif |
140 | ::emitAdd(PrimType T0, const SourceInfo &I) { |
141 | switch (T0) { |
142 | case PT_Sint8: |
143 | return emitAddSint8(I); |
144 | case PT_Uint8: |
145 | return emitAddUint8(I); |
146 | case PT_Sint16: |
147 | return emitAddSint16(I); |
148 | case PT_Uint16: |
149 | return emitAddUint16(I); |
150 | case PT_Sint32: |
151 | return emitAddSint32(I); |
152 | case PT_Uint32: |
153 | return emitAddUint32(I); |
154 | case PT_Sint64: |
155 | return emitAddSint64(I); |
156 | case PT_Uint64: |
157 | return emitAddUint64(I); |
158 | case PT_IntAP: |
159 | return emitAddIntAP(I); |
160 | case PT_IntAPS: |
161 | return emitAddIntAPS(I); |
162 | case PT_Bool: |
163 | return emitAddBool(I); |
164 | default: llvm_unreachable("invalid type: emitAdd" ); |
165 | } |
166 | llvm_unreachable("invalid enum value" ); |
167 | } |
168 | #endif |
169 | #ifdef GET_LINK_IMPL |
170 | bool ByteCodeEmitter::emitAddSint8(const SourceInfo &L) { |
171 | return emitOp<>(OP_AddSint8, L); |
172 | } |
173 | bool ByteCodeEmitter::emitAddUint8(const SourceInfo &L) { |
174 | return emitOp<>(OP_AddUint8, L); |
175 | } |
176 | bool ByteCodeEmitter::emitAddSint16(const SourceInfo &L) { |
177 | return emitOp<>(OP_AddSint16, L); |
178 | } |
179 | bool ByteCodeEmitter::emitAddUint16(const SourceInfo &L) { |
180 | return emitOp<>(OP_AddUint16, L); |
181 | } |
182 | bool ByteCodeEmitter::emitAddSint32(const SourceInfo &L) { |
183 | return emitOp<>(OP_AddSint32, L); |
184 | } |
185 | bool ByteCodeEmitter::emitAddUint32(const SourceInfo &L) { |
186 | return emitOp<>(OP_AddUint32, L); |
187 | } |
188 | bool ByteCodeEmitter::emitAddSint64(const SourceInfo &L) { |
189 | return emitOp<>(OP_AddSint64, L); |
190 | } |
191 | bool ByteCodeEmitter::emitAddUint64(const SourceInfo &L) { |
192 | return emitOp<>(OP_AddUint64, L); |
193 | } |
194 | bool ByteCodeEmitter::emitAddIntAP(const SourceInfo &L) { |
195 | return emitOp<>(OP_AddIntAP, L); |
196 | } |
197 | bool ByteCodeEmitter::emitAddIntAPS(const SourceInfo &L) { |
198 | return emitOp<>(OP_AddIntAPS, L); |
199 | } |
200 | bool ByteCodeEmitter::emitAddBool(const SourceInfo &L) { |
201 | return emitOp<>(OP_AddBool, L); |
202 | } |
203 | #endif |
204 | #ifdef GET_EVAL_IMPL |
205 | bool EvalEmitter::emitAddSint8(const SourceInfo &L) { |
206 | if (!isActive()) return true; |
207 | CurrentSource = L; |
208 | return Add<PT_Sint8>(S, OpPC); |
209 | } |
210 | bool EvalEmitter::emitAddUint8(const SourceInfo &L) { |
211 | if (!isActive()) return true; |
212 | CurrentSource = L; |
213 | return Add<PT_Uint8>(S, OpPC); |
214 | } |
215 | bool EvalEmitter::emitAddSint16(const SourceInfo &L) { |
216 | if (!isActive()) return true; |
217 | CurrentSource = L; |
218 | return Add<PT_Sint16>(S, OpPC); |
219 | } |
220 | bool EvalEmitter::emitAddUint16(const SourceInfo &L) { |
221 | if (!isActive()) return true; |
222 | CurrentSource = L; |
223 | return Add<PT_Uint16>(S, OpPC); |
224 | } |
225 | bool EvalEmitter::emitAddSint32(const SourceInfo &L) { |
226 | if (!isActive()) return true; |
227 | CurrentSource = L; |
228 | return Add<PT_Sint32>(S, OpPC); |
229 | } |
230 | bool EvalEmitter::emitAddUint32(const SourceInfo &L) { |
231 | if (!isActive()) return true; |
232 | CurrentSource = L; |
233 | return Add<PT_Uint32>(S, OpPC); |
234 | } |
235 | bool EvalEmitter::emitAddSint64(const SourceInfo &L) { |
236 | if (!isActive()) return true; |
237 | CurrentSource = L; |
238 | return Add<PT_Sint64>(S, OpPC); |
239 | } |
240 | bool EvalEmitter::emitAddUint64(const SourceInfo &L) { |
241 | if (!isActive()) return true; |
242 | CurrentSource = L; |
243 | return Add<PT_Uint64>(S, OpPC); |
244 | } |
245 | bool EvalEmitter::emitAddIntAP(const SourceInfo &L) { |
246 | if (!isActive()) return true; |
247 | CurrentSource = L; |
248 | return Add<PT_IntAP>(S, OpPC); |
249 | } |
250 | bool EvalEmitter::emitAddIntAPS(const SourceInfo &L) { |
251 | if (!isActive()) return true; |
252 | CurrentSource = L; |
253 | return Add<PT_IntAPS>(S, OpPC); |
254 | } |
255 | bool EvalEmitter::emitAddBool(const SourceInfo &L) { |
256 | if (!isActive()) return true; |
257 | CurrentSource = L; |
258 | return Add<PT_Bool>(S, OpPC); |
259 | } |
260 | #endif |
261 | #ifdef GET_OPCODE_NAMES |
262 | OP_AddOffsetSint8, |
263 | OP_AddOffsetUint8, |
264 | OP_AddOffsetSint16, |
265 | OP_AddOffsetUint16, |
266 | OP_AddOffsetSint32, |
267 | OP_AddOffsetUint32, |
268 | OP_AddOffsetSint64, |
269 | OP_AddOffsetUint64, |
270 | OP_AddOffsetIntAP, |
271 | OP_AddOffsetIntAPS, |
272 | OP_AddOffsetBool, |
273 | #endif |
274 | #ifdef GET_INTERP |
275 | case OP_AddOffsetSint8: { |
276 | if (!AddOffset<PT_Sint8>(S, OpPC)) |
277 | return false; |
278 | continue; |
279 | } |
280 | case OP_AddOffsetUint8: { |
281 | if (!AddOffset<PT_Uint8>(S, OpPC)) |
282 | return false; |
283 | continue; |
284 | } |
285 | case OP_AddOffsetSint16: { |
286 | if (!AddOffset<PT_Sint16>(S, OpPC)) |
287 | return false; |
288 | continue; |
289 | } |
290 | case OP_AddOffsetUint16: { |
291 | if (!AddOffset<PT_Uint16>(S, OpPC)) |
292 | return false; |
293 | continue; |
294 | } |
295 | case OP_AddOffsetSint32: { |
296 | if (!AddOffset<PT_Sint32>(S, OpPC)) |
297 | return false; |
298 | continue; |
299 | } |
300 | case OP_AddOffsetUint32: { |
301 | if (!AddOffset<PT_Uint32>(S, OpPC)) |
302 | return false; |
303 | continue; |
304 | } |
305 | case OP_AddOffsetSint64: { |
306 | if (!AddOffset<PT_Sint64>(S, OpPC)) |
307 | return false; |
308 | continue; |
309 | } |
310 | case OP_AddOffsetUint64: { |
311 | if (!AddOffset<PT_Uint64>(S, OpPC)) |
312 | return false; |
313 | continue; |
314 | } |
315 | case OP_AddOffsetIntAP: { |
316 | if (!AddOffset<PT_IntAP>(S, OpPC)) |
317 | return false; |
318 | continue; |
319 | } |
320 | case OP_AddOffsetIntAPS: { |
321 | if (!AddOffset<PT_IntAPS>(S, OpPC)) |
322 | return false; |
323 | continue; |
324 | } |
325 | case OP_AddOffsetBool: { |
326 | if (!AddOffset<PT_Bool>(S, OpPC)) |
327 | return false; |
328 | continue; |
329 | } |
330 | #endif |
331 | #ifdef GET_DISASM |
332 | case OP_AddOffsetSint8: |
333 | PrintName("AddOffsetSint8" ); |
334 | OS << "\t" << "\n" ; |
335 | continue; |
336 | case OP_AddOffsetUint8: |
337 | PrintName("AddOffsetUint8" ); |
338 | OS << "\t" << "\n" ; |
339 | continue; |
340 | case OP_AddOffsetSint16: |
341 | PrintName("AddOffsetSint16" ); |
342 | OS << "\t" << "\n" ; |
343 | continue; |
344 | case OP_AddOffsetUint16: |
345 | PrintName("AddOffsetUint16" ); |
346 | OS << "\t" << "\n" ; |
347 | continue; |
348 | case OP_AddOffsetSint32: |
349 | PrintName("AddOffsetSint32" ); |
350 | OS << "\t" << "\n" ; |
351 | continue; |
352 | case OP_AddOffsetUint32: |
353 | PrintName("AddOffsetUint32" ); |
354 | OS << "\t" << "\n" ; |
355 | continue; |
356 | case OP_AddOffsetSint64: |
357 | PrintName("AddOffsetSint64" ); |
358 | OS << "\t" << "\n" ; |
359 | continue; |
360 | case OP_AddOffsetUint64: |
361 | PrintName("AddOffsetUint64" ); |
362 | OS << "\t" << "\n" ; |
363 | continue; |
364 | case OP_AddOffsetIntAP: |
365 | PrintName("AddOffsetIntAP" ); |
366 | OS << "\t" << "\n" ; |
367 | continue; |
368 | case OP_AddOffsetIntAPS: |
369 | PrintName("AddOffsetIntAPS" ); |
370 | OS << "\t" << "\n" ; |
371 | continue; |
372 | case OP_AddOffsetBool: |
373 | PrintName("AddOffsetBool" ); |
374 | OS << "\t" << "\n" ; |
375 | continue; |
376 | #endif |
377 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
378 | bool emitAddOffsetSint8(const SourceInfo &); |
379 | bool emitAddOffsetUint8(const SourceInfo &); |
380 | bool emitAddOffsetSint16(const SourceInfo &); |
381 | bool emitAddOffsetUint16(const SourceInfo &); |
382 | bool emitAddOffsetSint32(const SourceInfo &); |
383 | bool emitAddOffsetUint32(const SourceInfo &); |
384 | bool emitAddOffsetSint64(const SourceInfo &); |
385 | bool emitAddOffsetUint64(const SourceInfo &); |
386 | bool emitAddOffsetIntAP(const SourceInfo &); |
387 | bool emitAddOffsetIntAPS(const SourceInfo &); |
388 | bool emitAddOffsetBool(const SourceInfo &); |
389 | #endif |
390 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
391 | [[nodiscard]] bool emitAddOffset(PrimType, const SourceInfo &I); |
392 | #endif |
393 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
394 | bool |
395 | #if defined(GET_EVAL_IMPL) |
396 | EvalEmitter |
397 | #else |
398 | ByteCodeEmitter |
399 | #endif |
400 | ::emitAddOffset(PrimType T0, const SourceInfo &I) { |
401 | switch (T0) { |
402 | case PT_Sint8: |
403 | return emitAddOffsetSint8(I); |
404 | case PT_Uint8: |
405 | return emitAddOffsetUint8(I); |
406 | case PT_Sint16: |
407 | return emitAddOffsetSint16(I); |
408 | case PT_Uint16: |
409 | return emitAddOffsetUint16(I); |
410 | case PT_Sint32: |
411 | return emitAddOffsetSint32(I); |
412 | case PT_Uint32: |
413 | return emitAddOffsetUint32(I); |
414 | case PT_Sint64: |
415 | return emitAddOffsetSint64(I); |
416 | case PT_Uint64: |
417 | return emitAddOffsetUint64(I); |
418 | case PT_IntAP: |
419 | return emitAddOffsetIntAP(I); |
420 | case PT_IntAPS: |
421 | return emitAddOffsetIntAPS(I); |
422 | case PT_Bool: |
423 | return emitAddOffsetBool(I); |
424 | default: llvm_unreachable("invalid type: emitAddOffset" ); |
425 | } |
426 | llvm_unreachable("invalid enum value" ); |
427 | } |
428 | #endif |
429 | #ifdef GET_LINK_IMPL |
430 | bool ByteCodeEmitter::emitAddOffsetSint8(const SourceInfo &L) { |
431 | return emitOp<>(OP_AddOffsetSint8, L); |
432 | } |
433 | bool ByteCodeEmitter::emitAddOffsetUint8(const SourceInfo &L) { |
434 | return emitOp<>(OP_AddOffsetUint8, L); |
435 | } |
436 | bool ByteCodeEmitter::emitAddOffsetSint16(const SourceInfo &L) { |
437 | return emitOp<>(OP_AddOffsetSint16, L); |
438 | } |
439 | bool ByteCodeEmitter::emitAddOffsetUint16(const SourceInfo &L) { |
440 | return emitOp<>(OP_AddOffsetUint16, L); |
441 | } |
442 | bool ByteCodeEmitter::emitAddOffsetSint32(const SourceInfo &L) { |
443 | return emitOp<>(OP_AddOffsetSint32, L); |
444 | } |
445 | bool ByteCodeEmitter::emitAddOffsetUint32(const SourceInfo &L) { |
446 | return emitOp<>(OP_AddOffsetUint32, L); |
447 | } |
448 | bool ByteCodeEmitter::emitAddOffsetSint64(const SourceInfo &L) { |
449 | return emitOp<>(OP_AddOffsetSint64, L); |
450 | } |
451 | bool ByteCodeEmitter::emitAddOffsetUint64(const SourceInfo &L) { |
452 | return emitOp<>(OP_AddOffsetUint64, L); |
453 | } |
454 | bool ByteCodeEmitter::emitAddOffsetIntAP(const SourceInfo &L) { |
455 | return emitOp<>(OP_AddOffsetIntAP, L); |
456 | } |
457 | bool ByteCodeEmitter::emitAddOffsetIntAPS(const SourceInfo &L) { |
458 | return emitOp<>(OP_AddOffsetIntAPS, L); |
459 | } |
460 | bool ByteCodeEmitter::emitAddOffsetBool(const SourceInfo &L) { |
461 | return emitOp<>(OP_AddOffsetBool, L); |
462 | } |
463 | #endif |
464 | #ifdef GET_EVAL_IMPL |
465 | bool EvalEmitter::emitAddOffsetSint8(const SourceInfo &L) { |
466 | if (!isActive()) return true; |
467 | CurrentSource = L; |
468 | return AddOffset<PT_Sint8>(S, OpPC); |
469 | } |
470 | bool EvalEmitter::emitAddOffsetUint8(const SourceInfo &L) { |
471 | if (!isActive()) return true; |
472 | CurrentSource = L; |
473 | return AddOffset<PT_Uint8>(S, OpPC); |
474 | } |
475 | bool EvalEmitter::emitAddOffsetSint16(const SourceInfo &L) { |
476 | if (!isActive()) return true; |
477 | CurrentSource = L; |
478 | return AddOffset<PT_Sint16>(S, OpPC); |
479 | } |
480 | bool EvalEmitter::emitAddOffsetUint16(const SourceInfo &L) { |
481 | if (!isActive()) return true; |
482 | CurrentSource = L; |
483 | return AddOffset<PT_Uint16>(S, OpPC); |
484 | } |
485 | bool EvalEmitter::emitAddOffsetSint32(const SourceInfo &L) { |
486 | if (!isActive()) return true; |
487 | CurrentSource = L; |
488 | return AddOffset<PT_Sint32>(S, OpPC); |
489 | } |
490 | bool EvalEmitter::emitAddOffsetUint32(const SourceInfo &L) { |
491 | if (!isActive()) return true; |
492 | CurrentSource = L; |
493 | return AddOffset<PT_Uint32>(S, OpPC); |
494 | } |
495 | bool EvalEmitter::emitAddOffsetSint64(const SourceInfo &L) { |
496 | if (!isActive()) return true; |
497 | CurrentSource = L; |
498 | return AddOffset<PT_Sint64>(S, OpPC); |
499 | } |
500 | bool EvalEmitter::emitAddOffsetUint64(const SourceInfo &L) { |
501 | if (!isActive()) return true; |
502 | CurrentSource = L; |
503 | return AddOffset<PT_Uint64>(S, OpPC); |
504 | } |
505 | bool EvalEmitter::emitAddOffsetIntAP(const SourceInfo &L) { |
506 | if (!isActive()) return true; |
507 | CurrentSource = L; |
508 | return AddOffset<PT_IntAP>(S, OpPC); |
509 | } |
510 | bool EvalEmitter::emitAddOffsetIntAPS(const SourceInfo &L) { |
511 | if (!isActive()) return true; |
512 | CurrentSource = L; |
513 | return AddOffset<PT_IntAPS>(S, OpPC); |
514 | } |
515 | bool EvalEmitter::emitAddOffsetBool(const SourceInfo &L) { |
516 | if (!isActive()) return true; |
517 | CurrentSource = L; |
518 | return AddOffset<PT_Bool>(S, OpPC); |
519 | } |
520 | #endif |
521 | #ifdef GET_OPCODE_NAMES |
522 | OP_Addf, |
523 | #endif |
524 | #ifdef GET_INTERP |
525 | case OP_Addf: { |
526 | const auto V0 = ReadArg<llvm::RoundingMode>(S, PC); |
527 | if (!Addf(S, OpPC, V0)) |
528 | return false; |
529 | continue; |
530 | } |
531 | #endif |
532 | #ifdef GET_DISASM |
533 | case OP_Addf: |
534 | PrintName("Addf" ); |
535 | OS << "\t" << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
536 | continue; |
537 | #endif |
538 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
539 | bool emitAddf( llvm::RoundingMode , const SourceInfo &); |
540 | #endif |
541 | #ifdef GET_LINK_IMPL |
542 | bool ByteCodeEmitter::emitAddf( llvm::RoundingMode A0, const SourceInfo &L) { |
543 | return emitOp<llvm::RoundingMode>(OP_Addf, A0, L); |
544 | } |
545 | #endif |
546 | #ifdef GET_EVAL_IMPL |
547 | bool EvalEmitter::emitAddf( llvm::RoundingMode A0, const SourceInfo &L) { |
548 | if (!isActive()) return true; |
549 | CurrentSource = L; |
550 | return Addf(S, OpPC, A0); |
551 | } |
552 | #endif |
553 | #ifdef GET_OPCODE_NAMES |
554 | OP_Alloc, |
555 | #endif |
556 | #ifdef GET_INTERP |
557 | case OP_Alloc: { |
558 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
559 | if (!Alloc(S, OpPC, V0)) |
560 | return false; |
561 | continue; |
562 | } |
563 | #endif |
564 | #ifdef GET_DISASM |
565 | case OP_Alloc: |
566 | PrintName("Alloc" ); |
567 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
568 | continue; |
569 | #endif |
570 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
571 | bool emitAlloc( const Descriptor * , const SourceInfo &); |
572 | #endif |
573 | #ifdef GET_LINK_IMPL |
574 | bool ByteCodeEmitter::emitAlloc( const Descriptor * A0, const SourceInfo &L) { |
575 | return emitOp<const Descriptor *>(OP_Alloc, A0, L); |
576 | } |
577 | #endif |
578 | #ifdef GET_EVAL_IMPL |
579 | bool EvalEmitter::emitAlloc( const Descriptor * A0, const SourceInfo &L) { |
580 | if (!isActive()) return true; |
581 | CurrentSource = L; |
582 | return Alloc(S, OpPC, A0); |
583 | } |
584 | #endif |
585 | #ifdef GET_OPCODE_NAMES |
586 | OP_AllocCNSint8, |
587 | OP_AllocCNUint8, |
588 | OP_AllocCNSint16, |
589 | OP_AllocCNUint16, |
590 | OP_AllocCNSint32, |
591 | OP_AllocCNUint32, |
592 | OP_AllocCNSint64, |
593 | OP_AllocCNUint64, |
594 | OP_AllocCNIntAP, |
595 | OP_AllocCNIntAPS, |
596 | #endif |
597 | #ifdef GET_INTERP |
598 | case OP_AllocCNSint8: { |
599 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
600 | const auto V1 = ReadArg<bool>(S, PC); |
601 | if (!AllocCN<PT_Sint8>(S, OpPC, V0, V1)) |
602 | return false; |
603 | continue; |
604 | } |
605 | case OP_AllocCNUint8: { |
606 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
607 | const auto V1 = ReadArg<bool>(S, PC); |
608 | if (!AllocCN<PT_Uint8>(S, OpPC, V0, V1)) |
609 | return false; |
610 | continue; |
611 | } |
612 | case OP_AllocCNSint16: { |
613 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
614 | const auto V1 = ReadArg<bool>(S, PC); |
615 | if (!AllocCN<PT_Sint16>(S, OpPC, V0, V1)) |
616 | return false; |
617 | continue; |
618 | } |
619 | case OP_AllocCNUint16: { |
620 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
621 | const auto V1 = ReadArg<bool>(S, PC); |
622 | if (!AllocCN<PT_Uint16>(S, OpPC, V0, V1)) |
623 | return false; |
624 | continue; |
625 | } |
626 | case OP_AllocCNSint32: { |
627 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
628 | const auto V1 = ReadArg<bool>(S, PC); |
629 | if (!AllocCN<PT_Sint32>(S, OpPC, V0, V1)) |
630 | return false; |
631 | continue; |
632 | } |
633 | case OP_AllocCNUint32: { |
634 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
635 | const auto V1 = ReadArg<bool>(S, PC); |
636 | if (!AllocCN<PT_Uint32>(S, OpPC, V0, V1)) |
637 | return false; |
638 | continue; |
639 | } |
640 | case OP_AllocCNSint64: { |
641 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
642 | const auto V1 = ReadArg<bool>(S, PC); |
643 | if (!AllocCN<PT_Sint64>(S, OpPC, V0, V1)) |
644 | return false; |
645 | continue; |
646 | } |
647 | case OP_AllocCNUint64: { |
648 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
649 | const auto V1 = ReadArg<bool>(S, PC); |
650 | if (!AllocCN<PT_Uint64>(S, OpPC, V0, V1)) |
651 | return false; |
652 | continue; |
653 | } |
654 | case OP_AllocCNIntAP: { |
655 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
656 | const auto V1 = ReadArg<bool>(S, PC); |
657 | if (!AllocCN<PT_IntAP>(S, OpPC, V0, V1)) |
658 | return false; |
659 | continue; |
660 | } |
661 | case OP_AllocCNIntAPS: { |
662 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
663 | const auto V1 = ReadArg<bool>(S, PC); |
664 | if (!AllocCN<PT_IntAPS>(S, OpPC, V0, V1)) |
665 | return false; |
666 | continue; |
667 | } |
668 | #endif |
669 | #ifdef GET_DISASM |
670 | case OP_AllocCNSint8: |
671 | PrintName("AllocCNSint8" ); |
672 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
673 | continue; |
674 | case OP_AllocCNUint8: |
675 | PrintName("AllocCNUint8" ); |
676 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
677 | continue; |
678 | case OP_AllocCNSint16: |
679 | PrintName("AllocCNSint16" ); |
680 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
681 | continue; |
682 | case OP_AllocCNUint16: |
683 | PrintName("AllocCNUint16" ); |
684 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
685 | continue; |
686 | case OP_AllocCNSint32: |
687 | PrintName("AllocCNSint32" ); |
688 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
689 | continue; |
690 | case OP_AllocCNUint32: |
691 | PrintName("AllocCNUint32" ); |
692 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
693 | continue; |
694 | case OP_AllocCNSint64: |
695 | PrintName("AllocCNSint64" ); |
696 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
697 | continue; |
698 | case OP_AllocCNUint64: |
699 | PrintName("AllocCNUint64" ); |
700 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
701 | continue; |
702 | case OP_AllocCNIntAP: |
703 | PrintName("AllocCNIntAP" ); |
704 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
705 | continue; |
706 | case OP_AllocCNIntAPS: |
707 | PrintName("AllocCNIntAPS" ); |
708 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
709 | continue; |
710 | #endif |
711 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
712 | bool emitAllocCNSint8( const Descriptor * , bool , const SourceInfo &); |
713 | bool emitAllocCNUint8( const Descriptor * , bool , const SourceInfo &); |
714 | bool emitAllocCNSint16( const Descriptor * , bool , const SourceInfo &); |
715 | bool emitAllocCNUint16( const Descriptor * , bool , const SourceInfo &); |
716 | bool emitAllocCNSint32( const Descriptor * , bool , const SourceInfo &); |
717 | bool emitAllocCNUint32( const Descriptor * , bool , const SourceInfo &); |
718 | bool emitAllocCNSint64( const Descriptor * , bool , const SourceInfo &); |
719 | bool emitAllocCNUint64( const Descriptor * , bool , const SourceInfo &); |
720 | bool emitAllocCNIntAP( const Descriptor * , bool , const SourceInfo &); |
721 | bool emitAllocCNIntAPS( const Descriptor * , bool , const SourceInfo &); |
722 | #endif |
723 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
724 | [[nodiscard]] bool emitAllocCN(PrimType, const Descriptor *, bool, const SourceInfo &I); |
725 | #endif |
726 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
727 | bool |
728 | #if defined(GET_EVAL_IMPL) |
729 | EvalEmitter |
730 | #else |
731 | ByteCodeEmitter |
732 | #endif |
733 | ::emitAllocCN(PrimType T0, const Descriptor * A0, bool A1, const SourceInfo &I) { |
734 | switch (T0) { |
735 | case PT_Sint8: |
736 | return emitAllocCNSint8(A0, A1, I); |
737 | case PT_Uint8: |
738 | return emitAllocCNUint8(A0, A1, I); |
739 | case PT_Sint16: |
740 | return emitAllocCNSint16(A0, A1, I); |
741 | case PT_Uint16: |
742 | return emitAllocCNUint16(A0, A1, I); |
743 | case PT_Sint32: |
744 | return emitAllocCNSint32(A0, A1, I); |
745 | case PT_Uint32: |
746 | return emitAllocCNUint32(A0, A1, I); |
747 | case PT_Sint64: |
748 | return emitAllocCNSint64(A0, A1, I); |
749 | case PT_Uint64: |
750 | return emitAllocCNUint64(A0, A1, I); |
751 | case PT_IntAP: |
752 | return emitAllocCNIntAP(A0, A1, I); |
753 | case PT_IntAPS: |
754 | return emitAllocCNIntAPS(A0, A1, I); |
755 | default: llvm_unreachable("invalid type: emitAllocCN" ); |
756 | } |
757 | llvm_unreachable("invalid enum value" ); |
758 | } |
759 | #endif |
760 | #ifdef GET_LINK_IMPL |
761 | bool ByteCodeEmitter::emitAllocCNSint8( const Descriptor * A0, bool A1, const SourceInfo &L) { |
762 | return emitOp<const Descriptor *, bool>(OP_AllocCNSint8, A0, A1, L); |
763 | } |
764 | bool ByteCodeEmitter::emitAllocCNUint8( const Descriptor * A0, bool A1, const SourceInfo &L) { |
765 | return emitOp<const Descriptor *, bool>(OP_AllocCNUint8, A0, A1, L); |
766 | } |
767 | bool ByteCodeEmitter::emitAllocCNSint16( const Descriptor * A0, bool A1, const SourceInfo &L) { |
768 | return emitOp<const Descriptor *, bool>(OP_AllocCNSint16, A0, A1, L); |
769 | } |
770 | bool ByteCodeEmitter::emitAllocCNUint16( const Descriptor * A0, bool A1, const SourceInfo &L) { |
771 | return emitOp<const Descriptor *, bool>(OP_AllocCNUint16, A0, A1, L); |
772 | } |
773 | bool ByteCodeEmitter::emitAllocCNSint32( const Descriptor * A0, bool A1, const SourceInfo &L) { |
774 | return emitOp<const Descriptor *, bool>(OP_AllocCNSint32, A0, A1, L); |
775 | } |
776 | bool ByteCodeEmitter::emitAllocCNUint32( const Descriptor * A0, bool A1, const SourceInfo &L) { |
777 | return emitOp<const Descriptor *, bool>(OP_AllocCNUint32, A0, A1, L); |
778 | } |
779 | bool ByteCodeEmitter::emitAllocCNSint64( const Descriptor * A0, bool A1, const SourceInfo &L) { |
780 | return emitOp<const Descriptor *, bool>(OP_AllocCNSint64, A0, A1, L); |
781 | } |
782 | bool ByteCodeEmitter::emitAllocCNUint64( const Descriptor * A0, bool A1, const SourceInfo &L) { |
783 | return emitOp<const Descriptor *, bool>(OP_AllocCNUint64, A0, A1, L); |
784 | } |
785 | bool ByteCodeEmitter::emitAllocCNIntAP( const Descriptor * A0, bool A1, const SourceInfo &L) { |
786 | return emitOp<const Descriptor *, bool>(OP_AllocCNIntAP, A0, A1, L); |
787 | } |
788 | bool ByteCodeEmitter::emitAllocCNIntAPS( const Descriptor * A0, bool A1, const SourceInfo &L) { |
789 | return emitOp<const Descriptor *, bool>(OP_AllocCNIntAPS, A0, A1, L); |
790 | } |
791 | #endif |
792 | #ifdef GET_EVAL_IMPL |
793 | bool EvalEmitter::emitAllocCNSint8( const Descriptor * A0, bool A1, const SourceInfo &L) { |
794 | if (!isActive()) return true; |
795 | CurrentSource = L; |
796 | return AllocCN<PT_Sint8>(S, OpPC, A0, A1); |
797 | } |
798 | bool EvalEmitter::emitAllocCNUint8( const Descriptor * A0, bool A1, const SourceInfo &L) { |
799 | if (!isActive()) return true; |
800 | CurrentSource = L; |
801 | return AllocCN<PT_Uint8>(S, OpPC, A0, A1); |
802 | } |
803 | bool EvalEmitter::emitAllocCNSint16( const Descriptor * A0, bool A1, const SourceInfo &L) { |
804 | if (!isActive()) return true; |
805 | CurrentSource = L; |
806 | return AllocCN<PT_Sint16>(S, OpPC, A0, A1); |
807 | } |
808 | bool EvalEmitter::emitAllocCNUint16( const Descriptor * A0, bool A1, const SourceInfo &L) { |
809 | if (!isActive()) return true; |
810 | CurrentSource = L; |
811 | return AllocCN<PT_Uint16>(S, OpPC, A0, A1); |
812 | } |
813 | bool EvalEmitter::emitAllocCNSint32( const Descriptor * A0, bool A1, const SourceInfo &L) { |
814 | if (!isActive()) return true; |
815 | CurrentSource = L; |
816 | return AllocCN<PT_Sint32>(S, OpPC, A0, A1); |
817 | } |
818 | bool EvalEmitter::emitAllocCNUint32( const Descriptor * A0, bool A1, const SourceInfo &L) { |
819 | if (!isActive()) return true; |
820 | CurrentSource = L; |
821 | return AllocCN<PT_Uint32>(S, OpPC, A0, A1); |
822 | } |
823 | bool EvalEmitter::emitAllocCNSint64( const Descriptor * A0, bool A1, const SourceInfo &L) { |
824 | if (!isActive()) return true; |
825 | CurrentSource = L; |
826 | return AllocCN<PT_Sint64>(S, OpPC, A0, A1); |
827 | } |
828 | bool EvalEmitter::emitAllocCNUint64( const Descriptor * A0, bool A1, const SourceInfo &L) { |
829 | if (!isActive()) return true; |
830 | CurrentSource = L; |
831 | return AllocCN<PT_Uint64>(S, OpPC, A0, A1); |
832 | } |
833 | bool EvalEmitter::emitAllocCNIntAP( const Descriptor * A0, bool A1, const SourceInfo &L) { |
834 | if (!isActive()) return true; |
835 | CurrentSource = L; |
836 | return AllocCN<PT_IntAP>(S, OpPC, A0, A1); |
837 | } |
838 | bool EvalEmitter::emitAllocCNIntAPS( const Descriptor * A0, bool A1, const SourceInfo &L) { |
839 | if (!isActive()) return true; |
840 | CurrentSource = L; |
841 | return AllocCN<PT_IntAPS>(S, OpPC, A0, A1); |
842 | } |
843 | #endif |
844 | #ifdef GET_OPCODE_NAMES |
845 | OP_AllocNSint8, |
846 | OP_AllocNUint8, |
847 | OP_AllocNSint16, |
848 | OP_AllocNUint16, |
849 | OP_AllocNSint32, |
850 | OP_AllocNUint32, |
851 | OP_AllocNSint64, |
852 | OP_AllocNUint64, |
853 | OP_AllocNIntAP, |
854 | OP_AllocNIntAPS, |
855 | #endif |
856 | #ifdef GET_INTERP |
857 | case OP_AllocNSint8: { |
858 | const auto V0 = ReadArg<PrimType>(S, PC); |
859 | const auto V1 = ReadArg<const Expr *>(S, PC); |
860 | const auto V2 = ReadArg<bool>(S, PC); |
861 | if (!AllocN<PT_Sint8>(S, OpPC, V0, V1, V2)) |
862 | return false; |
863 | continue; |
864 | } |
865 | case OP_AllocNUint8: { |
866 | const auto V0 = ReadArg<PrimType>(S, PC); |
867 | const auto V1 = ReadArg<const Expr *>(S, PC); |
868 | const auto V2 = ReadArg<bool>(S, PC); |
869 | if (!AllocN<PT_Uint8>(S, OpPC, V0, V1, V2)) |
870 | return false; |
871 | continue; |
872 | } |
873 | case OP_AllocNSint16: { |
874 | const auto V0 = ReadArg<PrimType>(S, PC); |
875 | const auto V1 = ReadArg<const Expr *>(S, PC); |
876 | const auto V2 = ReadArg<bool>(S, PC); |
877 | if (!AllocN<PT_Sint16>(S, OpPC, V0, V1, V2)) |
878 | return false; |
879 | continue; |
880 | } |
881 | case OP_AllocNUint16: { |
882 | const auto V0 = ReadArg<PrimType>(S, PC); |
883 | const auto V1 = ReadArg<const Expr *>(S, PC); |
884 | const auto V2 = ReadArg<bool>(S, PC); |
885 | if (!AllocN<PT_Uint16>(S, OpPC, V0, V1, V2)) |
886 | return false; |
887 | continue; |
888 | } |
889 | case OP_AllocNSint32: { |
890 | const auto V0 = ReadArg<PrimType>(S, PC); |
891 | const auto V1 = ReadArg<const Expr *>(S, PC); |
892 | const auto V2 = ReadArg<bool>(S, PC); |
893 | if (!AllocN<PT_Sint32>(S, OpPC, V0, V1, V2)) |
894 | return false; |
895 | continue; |
896 | } |
897 | case OP_AllocNUint32: { |
898 | const auto V0 = ReadArg<PrimType>(S, PC); |
899 | const auto V1 = ReadArg<const Expr *>(S, PC); |
900 | const auto V2 = ReadArg<bool>(S, PC); |
901 | if (!AllocN<PT_Uint32>(S, OpPC, V0, V1, V2)) |
902 | return false; |
903 | continue; |
904 | } |
905 | case OP_AllocNSint64: { |
906 | const auto V0 = ReadArg<PrimType>(S, PC); |
907 | const auto V1 = ReadArg<const Expr *>(S, PC); |
908 | const auto V2 = ReadArg<bool>(S, PC); |
909 | if (!AllocN<PT_Sint64>(S, OpPC, V0, V1, V2)) |
910 | return false; |
911 | continue; |
912 | } |
913 | case OP_AllocNUint64: { |
914 | const auto V0 = ReadArg<PrimType>(S, PC); |
915 | const auto V1 = ReadArg<const Expr *>(S, PC); |
916 | const auto V2 = ReadArg<bool>(S, PC); |
917 | if (!AllocN<PT_Uint64>(S, OpPC, V0, V1, V2)) |
918 | return false; |
919 | continue; |
920 | } |
921 | case OP_AllocNIntAP: { |
922 | const auto V0 = ReadArg<PrimType>(S, PC); |
923 | const auto V1 = ReadArg<const Expr *>(S, PC); |
924 | const auto V2 = ReadArg<bool>(S, PC); |
925 | if (!AllocN<PT_IntAP>(S, OpPC, V0, V1, V2)) |
926 | return false; |
927 | continue; |
928 | } |
929 | case OP_AllocNIntAPS: { |
930 | const auto V0 = ReadArg<PrimType>(S, PC); |
931 | const auto V1 = ReadArg<const Expr *>(S, PC); |
932 | const auto V2 = ReadArg<bool>(S, PC); |
933 | if (!AllocN<PT_IntAPS>(S, OpPC, V0, V1, V2)) |
934 | return false; |
935 | continue; |
936 | } |
937 | #endif |
938 | #ifdef GET_DISASM |
939 | case OP_AllocNSint8: |
940 | PrintName("AllocNSint8" ); |
941 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
942 | continue; |
943 | case OP_AllocNUint8: |
944 | PrintName("AllocNUint8" ); |
945 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
946 | continue; |
947 | case OP_AllocNSint16: |
948 | PrintName("AllocNSint16" ); |
949 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
950 | continue; |
951 | case OP_AllocNUint16: |
952 | PrintName("AllocNUint16" ); |
953 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
954 | continue; |
955 | case OP_AllocNSint32: |
956 | PrintName("AllocNSint32" ); |
957 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
958 | continue; |
959 | case OP_AllocNUint32: |
960 | PrintName("AllocNUint32" ); |
961 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
962 | continue; |
963 | case OP_AllocNSint64: |
964 | PrintName("AllocNSint64" ); |
965 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
966 | continue; |
967 | case OP_AllocNUint64: |
968 | PrintName("AllocNUint64" ); |
969 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
970 | continue; |
971 | case OP_AllocNIntAP: |
972 | PrintName("AllocNIntAP" ); |
973 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
974 | continue; |
975 | case OP_AllocNIntAPS: |
976 | PrintName("AllocNIntAPS" ); |
977 | OS << "\t" << ReadArg<PrimType>(P, PC) << " " << ReadArg<const Expr *>(P, PC) << " " << ReadArg<bool>(P, PC) << " " << "\n" ; |
978 | continue; |
979 | #endif |
980 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
981 | bool emitAllocNSint8( PrimType , const Expr * , bool , const SourceInfo &); |
982 | bool emitAllocNUint8( PrimType , const Expr * , bool , const SourceInfo &); |
983 | bool emitAllocNSint16( PrimType , const Expr * , bool , const SourceInfo &); |
984 | bool emitAllocNUint16( PrimType , const Expr * , bool , const SourceInfo &); |
985 | bool emitAllocNSint32( PrimType , const Expr * , bool , const SourceInfo &); |
986 | bool emitAllocNUint32( PrimType , const Expr * , bool , const SourceInfo &); |
987 | bool emitAllocNSint64( PrimType , const Expr * , bool , const SourceInfo &); |
988 | bool emitAllocNUint64( PrimType , const Expr * , bool , const SourceInfo &); |
989 | bool emitAllocNIntAP( PrimType , const Expr * , bool , const SourceInfo &); |
990 | bool emitAllocNIntAPS( PrimType , const Expr * , bool , const SourceInfo &); |
991 | #endif |
992 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
993 | [[nodiscard]] bool emitAllocN(PrimType, PrimType, const Expr *, bool, const SourceInfo &I); |
994 | #endif |
995 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
996 | bool |
997 | #if defined(GET_EVAL_IMPL) |
998 | EvalEmitter |
999 | #else |
1000 | ByteCodeEmitter |
1001 | #endif |
1002 | ::emitAllocN(PrimType T0, PrimType A0, const Expr * A1, bool A2, const SourceInfo &I) { |
1003 | switch (T0) { |
1004 | case PT_Sint8: |
1005 | return emitAllocNSint8(A0, A1, A2, I); |
1006 | case PT_Uint8: |
1007 | return emitAllocNUint8(A0, A1, A2, I); |
1008 | case PT_Sint16: |
1009 | return emitAllocNSint16(A0, A1, A2, I); |
1010 | case PT_Uint16: |
1011 | return emitAllocNUint16(A0, A1, A2, I); |
1012 | case PT_Sint32: |
1013 | return emitAllocNSint32(A0, A1, A2, I); |
1014 | case PT_Uint32: |
1015 | return emitAllocNUint32(A0, A1, A2, I); |
1016 | case PT_Sint64: |
1017 | return emitAllocNSint64(A0, A1, A2, I); |
1018 | case PT_Uint64: |
1019 | return emitAllocNUint64(A0, A1, A2, I); |
1020 | case PT_IntAP: |
1021 | return emitAllocNIntAP(A0, A1, A2, I); |
1022 | case PT_IntAPS: |
1023 | return emitAllocNIntAPS(A0, A1, A2, I); |
1024 | default: llvm_unreachable("invalid type: emitAllocN" ); |
1025 | } |
1026 | llvm_unreachable("invalid enum value" ); |
1027 | } |
1028 | #endif |
1029 | #ifdef GET_LINK_IMPL |
1030 | bool ByteCodeEmitter::emitAllocNSint8( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1031 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNSint8, A0, A1, A2, L); |
1032 | } |
1033 | bool ByteCodeEmitter::emitAllocNUint8( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1034 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNUint8, A0, A1, A2, L); |
1035 | } |
1036 | bool ByteCodeEmitter::emitAllocNSint16( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1037 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNSint16, A0, A1, A2, L); |
1038 | } |
1039 | bool ByteCodeEmitter::emitAllocNUint16( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1040 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNUint16, A0, A1, A2, L); |
1041 | } |
1042 | bool ByteCodeEmitter::emitAllocNSint32( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1043 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNSint32, A0, A1, A2, L); |
1044 | } |
1045 | bool ByteCodeEmitter::emitAllocNUint32( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1046 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNUint32, A0, A1, A2, L); |
1047 | } |
1048 | bool ByteCodeEmitter::emitAllocNSint64( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1049 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNSint64, A0, A1, A2, L); |
1050 | } |
1051 | bool ByteCodeEmitter::emitAllocNUint64( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1052 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNUint64, A0, A1, A2, L); |
1053 | } |
1054 | bool ByteCodeEmitter::emitAllocNIntAP( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1055 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNIntAP, A0, A1, A2, L); |
1056 | } |
1057 | bool ByteCodeEmitter::emitAllocNIntAPS( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1058 | return emitOp<PrimType, const Expr *, bool>(OP_AllocNIntAPS, A0, A1, A2, L); |
1059 | } |
1060 | #endif |
1061 | #ifdef GET_EVAL_IMPL |
1062 | bool EvalEmitter::emitAllocNSint8( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1063 | if (!isActive()) return true; |
1064 | CurrentSource = L; |
1065 | return AllocN<PT_Sint8>(S, OpPC, A0, A1, A2); |
1066 | } |
1067 | bool EvalEmitter::emitAllocNUint8( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1068 | if (!isActive()) return true; |
1069 | CurrentSource = L; |
1070 | return AllocN<PT_Uint8>(S, OpPC, A0, A1, A2); |
1071 | } |
1072 | bool EvalEmitter::emitAllocNSint16( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1073 | if (!isActive()) return true; |
1074 | CurrentSource = L; |
1075 | return AllocN<PT_Sint16>(S, OpPC, A0, A1, A2); |
1076 | } |
1077 | bool EvalEmitter::emitAllocNUint16( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1078 | if (!isActive()) return true; |
1079 | CurrentSource = L; |
1080 | return AllocN<PT_Uint16>(S, OpPC, A0, A1, A2); |
1081 | } |
1082 | bool EvalEmitter::emitAllocNSint32( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1083 | if (!isActive()) return true; |
1084 | CurrentSource = L; |
1085 | return AllocN<PT_Sint32>(S, OpPC, A0, A1, A2); |
1086 | } |
1087 | bool EvalEmitter::emitAllocNUint32( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1088 | if (!isActive()) return true; |
1089 | CurrentSource = L; |
1090 | return AllocN<PT_Uint32>(S, OpPC, A0, A1, A2); |
1091 | } |
1092 | bool EvalEmitter::emitAllocNSint64( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1093 | if (!isActive()) return true; |
1094 | CurrentSource = L; |
1095 | return AllocN<PT_Sint64>(S, OpPC, A0, A1, A2); |
1096 | } |
1097 | bool EvalEmitter::emitAllocNUint64( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1098 | if (!isActive()) return true; |
1099 | CurrentSource = L; |
1100 | return AllocN<PT_Uint64>(S, OpPC, A0, A1, A2); |
1101 | } |
1102 | bool EvalEmitter::emitAllocNIntAP( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1103 | if (!isActive()) return true; |
1104 | CurrentSource = L; |
1105 | return AllocN<PT_IntAP>(S, OpPC, A0, A1, A2); |
1106 | } |
1107 | bool EvalEmitter::emitAllocNIntAPS( PrimType A0, const Expr * A1, bool A2, const SourceInfo &L) { |
1108 | if (!isActive()) return true; |
1109 | CurrentSource = L; |
1110 | return AllocN<PT_IntAPS>(S, OpPC, A0, A1, A2); |
1111 | } |
1112 | #endif |
1113 | #ifdef GET_OPCODE_NAMES |
1114 | OP_ArrayDecay, |
1115 | #endif |
1116 | #ifdef GET_INTERP |
1117 | case OP_ArrayDecay: { |
1118 | if (!ArrayDecay(S, OpPC)) |
1119 | return false; |
1120 | continue; |
1121 | } |
1122 | #endif |
1123 | #ifdef GET_DISASM |
1124 | case OP_ArrayDecay: |
1125 | PrintName("ArrayDecay" ); |
1126 | OS << "\t" << "\n" ; |
1127 | continue; |
1128 | #endif |
1129 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1130 | bool emitArrayDecay(const SourceInfo &); |
1131 | #endif |
1132 | #ifdef GET_LINK_IMPL |
1133 | bool ByteCodeEmitter::emitArrayDecay(const SourceInfo &L) { |
1134 | return emitOp<>(OP_ArrayDecay, L); |
1135 | } |
1136 | #endif |
1137 | #ifdef GET_EVAL_IMPL |
1138 | bool EvalEmitter::emitArrayDecay(const SourceInfo &L) { |
1139 | if (!isActive()) return true; |
1140 | CurrentSource = L; |
1141 | return ArrayDecay(S, OpPC); |
1142 | } |
1143 | #endif |
1144 | #ifdef GET_OPCODE_NAMES |
1145 | OP_ArrayElemSint8, |
1146 | OP_ArrayElemUint8, |
1147 | OP_ArrayElemSint16, |
1148 | OP_ArrayElemUint16, |
1149 | OP_ArrayElemSint32, |
1150 | OP_ArrayElemUint32, |
1151 | OP_ArrayElemSint64, |
1152 | OP_ArrayElemUint64, |
1153 | OP_ArrayElemIntAP, |
1154 | OP_ArrayElemIntAPS, |
1155 | OP_ArrayElemBool, |
1156 | OP_ArrayElemPtr, |
1157 | OP_ArrayElemFnPtr, |
1158 | OP_ArrayElemMemberPtr, |
1159 | OP_ArrayElemFloat, |
1160 | #endif |
1161 | #ifdef GET_INTERP |
1162 | case OP_ArrayElemSint8: { |
1163 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1164 | if (!ArrayElem<PT_Sint8>(S, OpPC, V0)) |
1165 | return false; |
1166 | continue; |
1167 | } |
1168 | case OP_ArrayElemUint8: { |
1169 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1170 | if (!ArrayElem<PT_Uint8>(S, OpPC, V0)) |
1171 | return false; |
1172 | continue; |
1173 | } |
1174 | case OP_ArrayElemSint16: { |
1175 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1176 | if (!ArrayElem<PT_Sint16>(S, OpPC, V0)) |
1177 | return false; |
1178 | continue; |
1179 | } |
1180 | case OP_ArrayElemUint16: { |
1181 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1182 | if (!ArrayElem<PT_Uint16>(S, OpPC, V0)) |
1183 | return false; |
1184 | continue; |
1185 | } |
1186 | case OP_ArrayElemSint32: { |
1187 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1188 | if (!ArrayElem<PT_Sint32>(S, OpPC, V0)) |
1189 | return false; |
1190 | continue; |
1191 | } |
1192 | case OP_ArrayElemUint32: { |
1193 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1194 | if (!ArrayElem<PT_Uint32>(S, OpPC, V0)) |
1195 | return false; |
1196 | continue; |
1197 | } |
1198 | case OP_ArrayElemSint64: { |
1199 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1200 | if (!ArrayElem<PT_Sint64>(S, OpPC, V0)) |
1201 | return false; |
1202 | continue; |
1203 | } |
1204 | case OP_ArrayElemUint64: { |
1205 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1206 | if (!ArrayElem<PT_Uint64>(S, OpPC, V0)) |
1207 | return false; |
1208 | continue; |
1209 | } |
1210 | case OP_ArrayElemIntAP: { |
1211 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1212 | if (!ArrayElem<PT_IntAP>(S, OpPC, V0)) |
1213 | return false; |
1214 | continue; |
1215 | } |
1216 | case OP_ArrayElemIntAPS: { |
1217 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1218 | if (!ArrayElem<PT_IntAPS>(S, OpPC, V0)) |
1219 | return false; |
1220 | continue; |
1221 | } |
1222 | case OP_ArrayElemBool: { |
1223 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1224 | if (!ArrayElem<PT_Bool>(S, OpPC, V0)) |
1225 | return false; |
1226 | continue; |
1227 | } |
1228 | case OP_ArrayElemPtr: { |
1229 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1230 | if (!ArrayElem<PT_Ptr>(S, OpPC, V0)) |
1231 | return false; |
1232 | continue; |
1233 | } |
1234 | case OP_ArrayElemFnPtr: { |
1235 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1236 | if (!ArrayElem<PT_FnPtr>(S, OpPC, V0)) |
1237 | return false; |
1238 | continue; |
1239 | } |
1240 | case OP_ArrayElemMemberPtr: { |
1241 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1242 | if (!ArrayElem<PT_MemberPtr>(S, OpPC, V0)) |
1243 | return false; |
1244 | continue; |
1245 | } |
1246 | case OP_ArrayElemFloat: { |
1247 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1248 | if (!ArrayElem<PT_Float>(S, OpPC, V0)) |
1249 | return false; |
1250 | continue; |
1251 | } |
1252 | #endif |
1253 | #ifdef GET_DISASM |
1254 | case OP_ArrayElemSint8: |
1255 | PrintName("ArrayElemSint8" ); |
1256 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1257 | continue; |
1258 | case OP_ArrayElemUint8: |
1259 | PrintName("ArrayElemUint8" ); |
1260 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1261 | continue; |
1262 | case OP_ArrayElemSint16: |
1263 | PrintName("ArrayElemSint16" ); |
1264 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1265 | continue; |
1266 | case OP_ArrayElemUint16: |
1267 | PrintName("ArrayElemUint16" ); |
1268 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1269 | continue; |
1270 | case OP_ArrayElemSint32: |
1271 | PrintName("ArrayElemSint32" ); |
1272 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1273 | continue; |
1274 | case OP_ArrayElemUint32: |
1275 | PrintName("ArrayElemUint32" ); |
1276 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1277 | continue; |
1278 | case OP_ArrayElemSint64: |
1279 | PrintName("ArrayElemSint64" ); |
1280 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1281 | continue; |
1282 | case OP_ArrayElemUint64: |
1283 | PrintName("ArrayElemUint64" ); |
1284 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1285 | continue; |
1286 | case OP_ArrayElemIntAP: |
1287 | PrintName("ArrayElemIntAP" ); |
1288 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1289 | continue; |
1290 | case OP_ArrayElemIntAPS: |
1291 | PrintName("ArrayElemIntAPS" ); |
1292 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1293 | continue; |
1294 | case OP_ArrayElemBool: |
1295 | PrintName("ArrayElemBool" ); |
1296 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1297 | continue; |
1298 | case OP_ArrayElemPtr: |
1299 | PrintName("ArrayElemPtr" ); |
1300 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1301 | continue; |
1302 | case OP_ArrayElemFnPtr: |
1303 | PrintName("ArrayElemFnPtr" ); |
1304 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1305 | continue; |
1306 | case OP_ArrayElemMemberPtr: |
1307 | PrintName("ArrayElemMemberPtr" ); |
1308 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1309 | continue; |
1310 | case OP_ArrayElemFloat: |
1311 | PrintName("ArrayElemFloat" ); |
1312 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1313 | continue; |
1314 | #endif |
1315 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1316 | bool emitArrayElemSint8( uint32_t , const SourceInfo &); |
1317 | bool emitArrayElemUint8( uint32_t , const SourceInfo &); |
1318 | bool emitArrayElemSint16( uint32_t , const SourceInfo &); |
1319 | bool emitArrayElemUint16( uint32_t , const SourceInfo &); |
1320 | bool emitArrayElemSint32( uint32_t , const SourceInfo &); |
1321 | bool emitArrayElemUint32( uint32_t , const SourceInfo &); |
1322 | bool emitArrayElemSint64( uint32_t , const SourceInfo &); |
1323 | bool emitArrayElemUint64( uint32_t , const SourceInfo &); |
1324 | bool emitArrayElemIntAP( uint32_t , const SourceInfo &); |
1325 | bool emitArrayElemIntAPS( uint32_t , const SourceInfo &); |
1326 | bool emitArrayElemBool( uint32_t , const SourceInfo &); |
1327 | bool emitArrayElemPtr( uint32_t , const SourceInfo &); |
1328 | bool emitArrayElemFnPtr( uint32_t , const SourceInfo &); |
1329 | bool emitArrayElemMemberPtr( uint32_t , const SourceInfo &); |
1330 | bool emitArrayElemFloat( uint32_t , const SourceInfo &); |
1331 | #endif |
1332 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1333 | [[nodiscard]] bool emitArrayElem(PrimType, uint32_t, const SourceInfo &I); |
1334 | #endif |
1335 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
1336 | bool |
1337 | #if defined(GET_EVAL_IMPL) |
1338 | EvalEmitter |
1339 | #else |
1340 | ByteCodeEmitter |
1341 | #endif |
1342 | ::emitArrayElem(PrimType T0, uint32_t A0, const SourceInfo &I) { |
1343 | switch (T0) { |
1344 | case PT_Sint8: |
1345 | return emitArrayElemSint8(A0, I); |
1346 | case PT_Uint8: |
1347 | return emitArrayElemUint8(A0, I); |
1348 | case PT_Sint16: |
1349 | return emitArrayElemSint16(A0, I); |
1350 | case PT_Uint16: |
1351 | return emitArrayElemUint16(A0, I); |
1352 | case PT_Sint32: |
1353 | return emitArrayElemSint32(A0, I); |
1354 | case PT_Uint32: |
1355 | return emitArrayElemUint32(A0, I); |
1356 | case PT_Sint64: |
1357 | return emitArrayElemSint64(A0, I); |
1358 | case PT_Uint64: |
1359 | return emitArrayElemUint64(A0, I); |
1360 | case PT_IntAP: |
1361 | return emitArrayElemIntAP(A0, I); |
1362 | case PT_IntAPS: |
1363 | return emitArrayElemIntAPS(A0, I); |
1364 | case PT_Bool: |
1365 | return emitArrayElemBool(A0, I); |
1366 | case PT_Ptr: |
1367 | return emitArrayElemPtr(A0, I); |
1368 | case PT_FnPtr: |
1369 | return emitArrayElemFnPtr(A0, I); |
1370 | case PT_MemberPtr: |
1371 | return emitArrayElemMemberPtr(A0, I); |
1372 | case PT_Float: |
1373 | return emitArrayElemFloat(A0, I); |
1374 | } |
1375 | llvm_unreachable("invalid enum value" ); |
1376 | } |
1377 | #endif |
1378 | #ifdef GET_LINK_IMPL |
1379 | bool ByteCodeEmitter::emitArrayElemSint8( uint32_t A0, const SourceInfo &L) { |
1380 | return emitOp<uint32_t>(OP_ArrayElemSint8, A0, L); |
1381 | } |
1382 | bool ByteCodeEmitter::emitArrayElemUint8( uint32_t A0, const SourceInfo &L) { |
1383 | return emitOp<uint32_t>(OP_ArrayElemUint8, A0, L); |
1384 | } |
1385 | bool ByteCodeEmitter::emitArrayElemSint16( uint32_t A0, const SourceInfo &L) { |
1386 | return emitOp<uint32_t>(OP_ArrayElemSint16, A0, L); |
1387 | } |
1388 | bool ByteCodeEmitter::emitArrayElemUint16( uint32_t A0, const SourceInfo &L) { |
1389 | return emitOp<uint32_t>(OP_ArrayElemUint16, A0, L); |
1390 | } |
1391 | bool ByteCodeEmitter::emitArrayElemSint32( uint32_t A0, const SourceInfo &L) { |
1392 | return emitOp<uint32_t>(OP_ArrayElemSint32, A0, L); |
1393 | } |
1394 | bool ByteCodeEmitter::emitArrayElemUint32( uint32_t A0, const SourceInfo &L) { |
1395 | return emitOp<uint32_t>(OP_ArrayElemUint32, A0, L); |
1396 | } |
1397 | bool ByteCodeEmitter::emitArrayElemSint64( uint32_t A0, const SourceInfo &L) { |
1398 | return emitOp<uint32_t>(OP_ArrayElemSint64, A0, L); |
1399 | } |
1400 | bool ByteCodeEmitter::emitArrayElemUint64( uint32_t A0, const SourceInfo &L) { |
1401 | return emitOp<uint32_t>(OP_ArrayElemUint64, A0, L); |
1402 | } |
1403 | bool ByteCodeEmitter::emitArrayElemIntAP( uint32_t A0, const SourceInfo &L) { |
1404 | return emitOp<uint32_t>(OP_ArrayElemIntAP, A0, L); |
1405 | } |
1406 | bool ByteCodeEmitter::emitArrayElemIntAPS( uint32_t A0, const SourceInfo &L) { |
1407 | return emitOp<uint32_t>(OP_ArrayElemIntAPS, A0, L); |
1408 | } |
1409 | bool ByteCodeEmitter::emitArrayElemBool( uint32_t A0, const SourceInfo &L) { |
1410 | return emitOp<uint32_t>(OP_ArrayElemBool, A0, L); |
1411 | } |
1412 | bool ByteCodeEmitter::emitArrayElemPtr( uint32_t A0, const SourceInfo &L) { |
1413 | return emitOp<uint32_t>(OP_ArrayElemPtr, A0, L); |
1414 | } |
1415 | bool ByteCodeEmitter::emitArrayElemFnPtr( uint32_t A0, const SourceInfo &L) { |
1416 | return emitOp<uint32_t>(OP_ArrayElemFnPtr, A0, L); |
1417 | } |
1418 | bool ByteCodeEmitter::emitArrayElemMemberPtr( uint32_t A0, const SourceInfo &L) { |
1419 | return emitOp<uint32_t>(OP_ArrayElemMemberPtr, A0, L); |
1420 | } |
1421 | bool ByteCodeEmitter::emitArrayElemFloat( uint32_t A0, const SourceInfo &L) { |
1422 | return emitOp<uint32_t>(OP_ArrayElemFloat, A0, L); |
1423 | } |
1424 | #endif |
1425 | #ifdef GET_EVAL_IMPL |
1426 | bool EvalEmitter::emitArrayElemSint8( uint32_t A0, const SourceInfo &L) { |
1427 | if (!isActive()) return true; |
1428 | CurrentSource = L; |
1429 | return ArrayElem<PT_Sint8>(S, OpPC, A0); |
1430 | } |
1431 | bool EvalEmitter::emitArrayElemUint8( uint32_t A0, const SourceInfo &L) { |
1432 | if (!isActive()) return true; |
1433 | CurrentSource = L; |
1434 | return ArrayElem<PT_Uint8>(S, OpPC, A0); |
1435 | } |
1436 | bool EvalEmitter::emitArrayElemSint16( uint32_t A0, const SourceInfo &L) { |
1437 | if (!isActive()) return true; |
1438 | CurrentSource = L; |
1439 | return ArrayElem<PT_Sint16>(S, OpPC, A0); |
1440 | } |
1441 | bool EvalEmitter::emitArrayElemUint16( uint32_t A0, const SourceInfo &L) { |
1442 | if (!isActive()) return true; |
1443 | CurrentSource = L; |
1444 | return ArrayElem<PT_Uint16>(S, OpPC, A0); |
1445 | } |
1446 | bool EvalEmitter::emitArrayElemSint32( uint32_t A0, const SourceInfo &L) { |
1447 | if (!isActive()) return true; |
1448 | CurrentSource = L; |
1449 | return ArrayElem<PT_Sint32>(S, OpPC, A0); |
1450 | } |
1451 | bool EvalEmitter::emitArrayElemUint32( uint32_t A0, const SourceInfo &L) { |
1452 | if (!isActive()) return true; |
1453 | CurrentSource = L; |
1454 | return ArrayElem<PT_Uint32>(S, OpPC, A0); |
1455 | } |
1456 | bool EvalEmitter::emitArrayElemSint64( uint32_t A0, const SourceInfo &L) { |
1457 | if (!isActive()) return true; |
1458 | CurrentSource = L; |
1459 | return ArrayElem<PT_Sint64>(S, OpPC, A0); |
1460 | } |
1461 | bool EvalEmitter::emitArrayElemUint64( uint32_t A0, const SourceInfo &L) { |
1462 | if (!isActive()) return true; |
1463 | CurrentSource = L; |
1464 | return ArrayElem<PT_Uint64>(S, OpPC, A0); |
1465 | } |
1466 | bool EvalEmitter::emitArrayElemIntAP( uint32_t A0, const SourceInfo &L) { |
1467 | if (!isActive()) return true; |
1468 | CurrentSource = L; |
1469 | return ArrayElem<PT_IntAP>(S, OpPC, A0); |
1470 | } |
1471 | bool EvalEmitter::emitArrayElemIntAPS( uint32_t A0, const SourceInfo &L) { |
1472 | if (!isActive()) return true; |
1473 | CurrentSource = L; |
1474 | return ArrayElem<PT_IntAPS>(S, OpPC, A0); |
1475 | } |
1476 | bool EvalEmitter::emitArrayElemBool( uint32_t A0, const SourceInfo &L) { |
1477 | if (!isActive()) return true; |
1478 | CurrentSource = L; |
1479 | return ArrayElem<PT_Bool>(S, OpPC, A0); |
1480 | } |
1481 | bool EvalEmitter::emitArrayElemPtr( uint32_t A0, const SourceInfo &L) { |
1482 | if (!isActive()) return true; |
1483 | CurrentSource = L; |
1484 | return ArrayElem<PT_Ptr>(S, OpPC, A0); |
1485 | } |
1486 | bool EvalEmitter::emitArrayElemFnPtr( uint32_t A0, const SourceInfo &L) { |
1487 | if (!isActive()) return true; |
1488 | CurrentSource = L; |
1489 | return ArrayElem<PT_FnPtr>(S, OpPC, A0); |
1490 | } |
1491 | bool EvalEmitter::emitArrayElemMemberPtr( uint32_t A0, const SourceInfo &L) { |
1492 | if (!isActive()) return true; |
1493 | CurrentSource = L; |
1494 | return ArrayElem<PT_MemberPtr>(S, OpPC, A0); |
1495 | } |
1496 | bool EvalEmitter::emitArrayElemFloat( uint32_t A0, const SourceInfo &L) { |
1497 | if (!isActive()) return true; |
1498 | CurrentSource = L; |
1499 | return ArrayElem<PT_Float>(S, OpPC, A0); |
1500 | } |
1501 | #endif |
1502 | #ifdef GET_OPCODE_NAMES |
1503 | OP_ArrayElemPopSint8, |
1504 | OP_ArrayElemPopUint8, |
1505 | OP_ArrayElemPopSint16, |
1506 | OP_ArrayElemPopUint16, |
1507 | OP_ArrayElemPopSint32, |
1508 | OP_ArrayElemPopUint32, |
1509 | OP_ArrayElemPopSint64, |
1510 | OP_ArrayElemPopUint64, |
1511 | OP_ArrayElemPopIntAP, |
1512 | OP_ArrayElemPopIntAPS, |
1513 | OP_ArrayElemPopBool, |
1514 | OP_ArrayElemPopPtr, |
1515 | OP_ArrayElemPopFnPtr, |
1516 | OP_ArrayElemPopMemberPtr, |
1517 | OP_ArrayElemPopFloat, |
1518 | #endif |
1519 | #ifdef GET_INTERP |
1520 | case OP_ArrayElemPopSint8: { |
1521 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1522 | if (!ArrayElemPop<PT_Sint8>(S, OpPC, V0)) |
1523 | return false; |
1524 | continue; |
1525 | } |
1526 | case OP_ArrayElemPopUint8: { |
1527 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1528 | if (!ArrayElemPop<PT_Uint8>(S, OpPC, V0)) |
1529 | return false; |
1530 | continue; |
1531 | } |
1532 | case OP_ArrayElemPopSint16: { |
1533 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1534 | if (!ArrayElemPop<PT_Sint16>(S, OpPC, V0)) |
1535 | return false; |
1536 | continue; |
1537 | } |
1538 | case OP_ArrayElemPopUint16: { |
1539 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1540 | if (!ArrayElemPop<PT_Uint16>(S, OpPC, V0)) |
1541 | return false; |
1542 | continue; |
1543 | } |
1544 | case OP_ArrayElemPopSint32: { |
1545 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1546 | if (!ArrayElemPop<PT_Sint32>(S, OpPC, V0)) |
1547 | return false; |
1548 | continue; |
1549 | } |
1550 | case OP_ArrayElemPopUint32: { |
1551 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1552 | if (!ArrayElemPop<PT_Uint32>(S, OpPC, V0)) |
1553 | return false; |
1554 | continue; |
1555 | } |
1556 | case OP_ArrayElemPopSint64: { |
1557 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1558 | if (!ArrayElemPop<PT_Sint64>(S, OpPC, V0)) |
1559 | return false; |
1560 | continue; |
1561 | } |
1562 | case OP_ArrayElemPopUint64: { |
1563 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1564 | if (!ArrayElemPop<PT_Uint64>(S, OpPC, V0)) |
1565 | return false; |
1566 | continue; |
1567 | } |
1568 | case OP_ArrayElemPopIntAP: { |
1569 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1570 | if (!ArrayElemPop<PT_IntAP>(S, OpPC, V0)) |
1571 | return false; |
1572 | continue; |
1573 | } |
1574 | case OP_ArrayElemPopIntAPS: { |
1575 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1576 | if (!ArrayElemPop<PT_IntAPS>(S, OpPC, V0)) |
1577 | return false; |
1578 | continue; |
1579 | } |
1580 | case OP_ArrayElemPopBool: { |
1581 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1582 | if (!ArrayElemPop<PT_Bool>(S, OpPC, V0)) |
1583 | return false; |
1584 | continue; |
1585 | } |
1586 | case OP_ArrayElemPopPtr: { |
1587 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1588 | if (!ArrayElemPop<PT_Ptr>(S, OpPC, V0)) |
1589 | return false; |
1590 | continue; |
1591 | } |
1592 | case OP_ArrayElemPopFnPtr: { |
1593 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1594 | if (!ArrayElemPop<PT_FnPtr>(S, OpPC, V0)) |
1595 | return false; |
1596 | continue; |
1597 | } |
1598 | case OP_ArrayElemPopMemberPtr: { |
1599 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1600 | if (!ArrayElemPop<PT_MemberPtr>(S, OpPC, V0)) |
1601 | return false; |
1602 | continue; |
1603 | } |
1604 | case OP_ArrayElemPopFloat: { |
1605 | const auto V0 = ReadArg<uint32_t>(S, PC); |
1606 | if (!ArrayElemPop<PT_Float>(S, OpPC, V0)) |
1607 | return false; |
1608 | continue; |
1609 | } |
1610 | #endif |
1611 | #ifdef GET_DISASM |
1612 | case OP_ArrayElemPopSint8: |
1613 | PrintName("ArrayElemPopSint8" ); |
1614 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1615 | continue; |
1616 | case OP_ArrayElemPopUint8: |
1617 | PrintName("ArrayElemPopUint8" ); |
1618 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1619 | continue; |
1620 | case OP_ArrayElemPopSint16: |
1621 | PrintName("ArrayElemPopSint16" ); |
1622 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1623 | continue; |
1624 | case OP_ArrayElemPopUint16: |
1625 | PrintName("ArrayElemPopUint16" ); |
1626 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1627 | continue; |
1628 | case OP_ArrayElemPopSint32: |
1629 | PrintName("ArrayElemPopSint32" ); |
1630 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1631 | continue; |
1632 | case OP_ArrayElemPopUint32: |
1633 | PrintName("ArrayElemPopUint32" ); |
1634 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1635 | continue; |
1636 | case OP_ArrayElemPopSint64: |
1637 | PrintName("ArrayElemPopSint64" ); |
1638 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1639 | continue; |
1640 | case OP_ArrayElemPopUint64: |
1641 | PrintName("ArrayElemPopUint64" ); |
1642 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1643 | continue; |
1644 | case OP_ArrayElemPopIntAP: |
1645 | PrintName("ArrayElemPopIntAP" ); |
1646 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1647 | continue; |
1648 | case OP_ArrayElemPopIntAPS: |
1649 | PrintName("ArrayElemPopIntAPS" ); |
1650 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1651 | continue; |
1652 | case OP_ArrayElemPopBool: |
1653 | PrintName("ArrayElemPopBool" ); |
1654 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1655 | continue; |
1656 | case OP_ArrayElemPopPtr: |
1657 | PrintName("ArrayElemPopPtr" ); |
1658 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1659 | continue; |
1660 | case OP_ArrayElemPopFnPtr: |
1661 | PrintName("ArrayElemPopFnPtr" ); |
1662 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1663 | continue; |
1664 | case OP_ArrayElemPopMemberPtr: |
1665 | PrintName("ArrayElemPopMemberPtr" ); |
1666 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1667 | continue; |
1668 | case OP_ArrayElemPopFloat: |
1669 | PrintName("ArrayElemPopFloat" ); |
1670 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
1671 | continue; |
1672 | #endif |
1673 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1674 | bool emitArrayElemPopSint8( uint32_t , const SourceInfo &); |
1675 | bool emitArrayElemPopUint8( uint32_t , const SourceInfo &); |
1676 | bool emitArrayElemPopSint16( uint32_t , const SourceInfo &); |
1677 | bool emitArrayElemPopUint16( uint32_t , const SourceInfo &); |
1678 | bool emitArrayElemPopSint32( uint32_t , const SourceInfo &); |
1679 | bool emitArrayElemPopUint32( uint32_t , const SourceInfo &); |
1680 | bool emitArrayElemPopSint64( uint32_t , const SourceInfo &); |
1681 | bool emitArrayElemPopUint64( uint32_t , const SourceInfo &); |
1682 | bool emitArrayElemPopIntAP( uint32_t , const SourceInfo &); |
1683 | bool emitArrayElemPopIntAPS( uint32_t , const SourceInfo &); |
1684 | bool emitArrayElemPopBool( uint32_t , const SourceInfo &); |
1685 | bool emitArrayElemPopPtr( uint32_t , const SourceInfo &); |
1686 | bool emitArrayElemPopFnPtr( uint32_t , const SourceInfo &); |
1687 | bool emitArrayElemPopMemberPtr( uint32_t , const SourceInfo &); |
1688 | bool emitArrayElemPopFloat( uint32_t , const SourceInfo &); |
1689 | #endif |
1690 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1691 | [[nodiscard]] bool emitArrayElemPop(PrimType, uint32_t, const SourceInfo &I); |
1692 | #endif |
1693 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
1694 | bool |
1695 | #if defined(GET_EVAL_IMPL) |
1696 | EvalEmitter |
1697 | #else |
1698 | ByteCodeEmitter |
1699 | #endif |
1700 | ::emitArrayElemPop(PrimType T0, uint32_t A0, const SourceInfo &I) { |
1701 | switch (T0) { |
1702 | case PT_Sint8: |
1703 | return emitArrayElemPopSint8(A0, I); |
1704 | case PT_Uint8: |
1705 | return emitArrayElemPopUint8(A0, I); |
1706 | case PT_Sint16: |
1707 | return emitArrayElemPopSint16(A0, I); |
1708 | case PT_Uint16: |
1709 | return emitArrayElemPopUint16(A0, I); |
1710 | case PT_Sint32: |
1711 | return emitArrayElemPopSint32(A0, I); |
1712 | case PT_Uint32: |
1713 | return emitArrayElemPopUint32(A0, I); |
1714 | case PT_Sint64: |
1715 | return emitArrayElemPopSint64(A0, I); |
1716 | case PT_Uint64: |
1717 | return emitArrayElemPopUint64(A0, I); |
1718 | case PT_IntAP: |
1719 | return emitArrayElemPopIntAP(A0, I); |
1720 | case PT_IntAPS: |
1721 | return emitArrayElemPopIntAPS(A0, I); |
1722 | case PT_Bool: |
1723 | return emitArrayElemPopBool(A0, I); |
1724 | case PT_Ptr: |
1725 | return emitArrayElemPopPtr(A0, I); |
1726 | case PT_FnPtr: |
1727 | return emitArrayElemPopFnPtr(A0, I); |
1728 | case PT_MemberPtr: |
1729 | return emitArrayElemPopMemberPtr(A0, I); |
1730 | case PT_Float: |
1731 | return emitArrayElemPopFloat(A0, I); |
1732 | } |
1733 | llvm_unreachable("invalid enum value" ); |
1734 | } |
1735 | #endif |
1736 | #ifdef GET_LINK_IMPL |
1737 | bool ByteCodeEmitter::emitArrayElemPopSint8( uint32_t A0, const SourceInfo &L) { |
1738 | return emitOp<uint32_t>(OP_ArrayElemPopSint8, A0, L); |
1739 | } |
1740 | bool ByteCodeEmitter::emitArrayElemPopUint8( uint32_t A0, const SourceInfo &L) { |
1741 | return emitOp<uint32_t>(OP_ArrayElemPopUint8, A0, L); |
1742 | } |
1743 | bool ByteCodeEmitter::emitArrayElemPopSint16( uint32_t A0, const SourceInfo &L) { |
1744 | return emitOp<uint32_t>(OP_ArrayElemPopSint16, A0, L); |
1745 | } |
1746 | bool ByteCodeEmitter::emitArrayElemPopUint16( uint32_t A0, const SourceInfo &L) { |
1747 | return emitOp<uint32_t>(OP_ArrayElemPopUint16, A0, L); |
1748 | } |
1749 | bool ByteCodeEmitter::emitArrayElemPopSint32( uint32_t A0, const SourceInfo &L) { |
1750 | return emitOp<uint32_t>(OP_ArrayElemPopSint32, A0, L); |
1751 | } |
1752 | bool ByteCodeEmitter::emitArrayElemPopUint32( uint32_t A0, const SourceInfo &L) { |
1753 | return emitOp<uint32_t>(OP_ArrayElemPopUint32, A0, L); |
1754 | } |
1755 | bool ByteCodeEmitter::emitArrayElemPopSint64( uint32_t A0, const SourceInfo &L) { |
1756 | return emitOp<uint32_t>(OP_ArrayElemPopSint64, A0, L); |
1757 | } |
1758 | bool ByteCodeEmitter::emitArrayElemPopUint64( uint32_t A0, const SourceInfo &L) { |
1759 | return emitOp<uint32_t>(OP_ArrayElemPopUint64, A0, L); |
1760 | } |
1761 | bool ByteCodeEmitter::emitArrayElemPopIntAP( uint32_t A0, const SourceInfo &L) { |
1762 | return emitOp<uint32_t>(OP_ArrayElemPopIntAP, A0, L); |
1763 | } |
1764 | bool ByteCodeEmitter::emitArrayElemPopIntAPS( uint32_t A0, const SourceInfo &L) { |
1765 | return emitOp<uint32_t>(OP_ArrayElemPopIntAPS, A0, L); |
1766 | } |
1767 | bool ByteCodeEmitter::emitArrayElemPopBool( uint32_t A0, const SourceInfo &L) { |
1768 | return emitOp<uint32_t>(OP_ArrayElemPopBool, A0, L); |
1769 | } |
1770 | bool ByteCodeEmitter::emitArrayElemPopPtr( uint32_t A0, const SourceInfo &L) { |
1771 | return emitOp<uint32_t>(OP_ArrayElemPopPtr, A0, L); |
1772 | } |
1773 | bool ByteCodeEmitter::emitArrayElemPopFnPtr( uint32_t A0, const SourceInfo &L) { |
1774 | return emitOp<uint32_t>(OP_ArrayElemPopFnPtr, A0, L); |
1775 | } |
1776 | bool ByteCodeEmitter::emitArrayElemPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
1777 | return emitOp<uint32_t>(OP_ArrayElemPopMemberPtr, A0, L); |
1778 | } |
1779 | bool ByteCodeEmitter::emitArrayElemPopFloat( uint32_t A0, const SourceInfo &L) { |
1780 | return emitOp<uint32_t>(OP_ArrayElemPopFloat, A0, L); |
1781 | } |
1782 | #endif |
1783 | #ifdef GET_EVAL_IMPL |
1784 | bool EvalEmitter::emitArrayElemPopSint8( uint32_t A0, const SourceInfo &L) { |
1785 | if (!isActive()) return true; |
1786 | CurrentSource = L; |
1787 | return ArrayElemPop<PT_Sint8>(S, OpPC, A0); |
1788 | } |
1789 | bool EvalEmitter::emitArrayElemPopUint8( uint32_t A0, const SourceInfo &L) { |
1790 | if (!isActive()) return true; |
1791 | CurrentSource = L; |
1792 | return ArrayElemPop<PT_Uint8>(S, OpPC, A0); |
1793 | } |
1794 | bool EvalEmitter::emitArrayElemPopSint16( uint32_t A0, const SourceInfo &L) { |
1795 | if (!isActive()) return true; |
1796 | CurrentSource = L; |
1797 | return ArrayElemPop<PT_Sint16>(S, OpPC, A0); |
1798 | } |
1799 | bool EvalEmitter::emitArrayElemPopUint16( uint32_t A0, const SourceInfo &L) { |
1800 | if (!isActive()) return true; |
1801 | CurrentSource = L; |
1802 | return ArrayElemPop<PT_Uint16>(S, OpPC, A0); |
1803 | } |
1804 | bool EvalEmitter::emitArrayElemPopSint32( uint32_t A0, const SourceInfo &L) { |
1805 | if (!isActive()) return true; |
1806 | CurrentSource = L; |
1807 | return ArrayElemPop<PT_Sint32>(S, OpPC, A0); |
1808 | } |
1809 | bool EvalEmitter::emitArrayElemPopUint32( uint32_t A0, const SourceInfo &L) { |
1810 | if (!isActive()) return true; |
1811 | CurrentSource = L; |
1812 | return ArrayElemPop<PT_Uint32>(S, OpPC, A0); |
1813 | } |
1814 | bool EvalEmitter::emitArrayElemPopSint64( uint32_t A0, const SourceInfo &L) { |
1815 | if (!isActive()) return true; |
1816 | CurrentSource = L; |
1817 | return ArrayElemPop<PT_Sint64>(S, OpPC, A0); |
1818 | } |
1819 | bool EvalEmitter::emitArrayElemPopUint64( uint32_t A0, const SourceInfo &L) { |
1820 | if (!isActive()) return true; |
1821 | CurrentSource = L; |
1822 | return ArrayElemPop<PT_Uint64>(S, OpPC, A0); |
1823 | } |
1824 | bool EvalEmitter::emitArrayElemPopIntAP( uint32_t A0, const SourceInfo &L) { |
1825 | if (!isActive()) return true; |
1826 | CurrentSource = L; |
1827 | return ArrayElemPop<PT_IntAP>(S, OpPC, A0); |
1828 | } |
1829 | bool EvalEmitter::emitArrayElemPopIntAPS( uint32_t A0, const SourceInfo &L) { |
1830 | if (!isActive()) return true; |
1831 | CurrentSource = L; |
1832 | return ArrayElemPop<PT_IntAPS>(S, OpPC, A0); |
1833 | } |
1834 | bool EvalEmitter::emitArrayElemPopBool( uint32_t A0, const SourceInfo &L) { |
1835 | if (!isActive()) return true; |
1836 | CurrentSource = L; |
1837 | return ArrayElemPop<PT_Bool>(S, OpPC, A0); |
1838 | } |
1839 | bool EvalEmitter::emitArrayElemPopPtr( uint32_t A0, const SourceInfo &L) { |
1840 | if (!isActive()) return true; |
1841 | CurrentSource = L; |
1842 | return ArrayElemPop<PT_Ptr>(S, OpPC, A0); |
1843 | } |
1844 | bool EvalEmitter::emitArrayElemPopFnPtr( uint32_t A0, const SourceInfo &L) { |
1845 | if (!isActive()) return true; |
1846 | CurrentSource = L; |
1847 | return ArrayElemPop<PT_FnPtr>(S, OpPC, A0); |
1848 | } |
1849 | bool EvalEmitter::emitArrayElemPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
1850 | if (!isActive()) return true; |
1851 | CurrentSource = L; |
1852 | return ArrayElemPop<PT_MemberPtr>(S, OpPC, A0); |
1853 | } |
1854 | bool EvalEmitter::emitArrayElemPopFloat( uint32_t A0, const SourceInfo &L) { |
1855 | if (!isActive()) return true; |
1856 | CurrentSource = L; |
1857 | return ArrayElemPop<PT_Float>(S, OpPC, A0); |
1858 | } |
1859 | #endif |
1860 | #ifdef GET_OPCODE_NAMES |
1861 | OP_ArrayElemPtrSint8, |
1862 | OP_ArrayElemPtrUint8, |
1863 | OP_ArrayElemPtrSint16, |
1864 | OP_ArrayElemPtrUint16, |
1865 | OP_ArrayElemPtrSint32, |
1866 | OP_ArrayElemPtrUint32, |
1867 | OP_ArrayElemPtrSint64, |
1868 | OP_ArrayElemPtrUint64, |
1869 | OP_ArrayElemPtrIntAP, |
1870 | OP_ArrayElemPtrIntAPS, |
1871 | OP_ArrayElemPtrBool, |
1872 | #endif |
1873 | #ifdef GET_INTERP |
1874 | case OP_ArrayElemPtrSint8: { |
1875 | if (!ArrayElemPtr<PT_Sint8>(S, OpPC)) |
1876 | return false; |
1877 | continue; |
1878 | } |
1879 | case OP_ArrayElemPtrUint8: { |
1880 | if (!ArrayElemPtr<PT_Uint8>(S, OpPC)) |
1881 | return false; |
1882 | continue; |
1883 | } |
1884 | case OP_ArrayElemPtrSint16: { |
1885 | if (!ArrayElemPtr<PT_Sint16>(S, OpPC)) |
1886 | return false; |
1887 | continue; |
1888 | } |
1889 | case OP_ArrayElemPtrUint16: { |
1890 | if (!ArrayElemPtr<PT_Uint16>(S, OpPC)) |
1891 | return false; |
1892 | continue; |
1893 | } |
1894 | case OP_ArrayElemPtrSint32: { |
1895 | if (!ArrayElemPtr<PT_Sint32>(S, OpPC)) |
1896 | return false; |
1897 | continue; |
1898 | } |
1899 | case OP_ArrayElemPtrUint32: { |
1900 | if (!ArrayElemPtr<PT_Uint32>(S, OpPC)) |
1901 | return false; |
1902 | continue; |
1903 | } |
1904 | case OP_ArrayElemPtrSint64: { |
1905 | if (!ArrayElemPtr<PT_Sint64>(S, OpPC)) |
1906 | return false; |
1907 | continue; |
1908 | } |
1909 | case OP_ArrayElemPtrUint64: { |
1910 | if (!ArrayElemPtr<PT_Uint64>(S, OpPC)) |
1911 | return false; |
1912 | continue; |
1913 | } |
1914 | case OP_ArrayElemPtrIntAP: { |
1915 | if (!ArrayElemPtr<PT_IntAP>(S, OpPC)) |
1916 | return false; |
1917 | continue; |
1918 | } |
1919 | case OP_ArrayElemPtrIntAPS: { |
1920 | if (!ArrayElemPtr<PT_IntAPS>(S, OpPC)) |
1921 | return false; |
1922 | continue; |
1923 | } |
1924 | case OP_ArrayElemPtrBool: { |
1925 | if (!ArrayElemPtr<PT_Bool>(S, OpPC)) |
1926 | return false; |
1927 | continue; |
1928 | } |
1929 | #endif |
1930 | #ifdef GET_DISASM |
1931 | case OP_ArrayElemPtrSint8: |
1932 | PrintName("ArrayElemPtrSint8" ); |
1933 | OS << "\t" << "\n" ; |
1934 | continue; |
1935 | case OP_ArrayElemPtrUint8: |
1936 | PrintName("ArrayElemPtrUint8" ); |
1937 | OS << "\t" << "\n" ; |
1938 | continue; |
1939 | case OP_ArrayElemPtrSint16: |
1940 | PrintName("ArrayElemPtrSint16" ); |
1941 | OS << "\t" << "\n" ; |
1942 | continue; |
1943 | case OP_ArrayElemPtrUint16: |
1944 | PrintName("ArrayElemPtrUint16" ); |
1945 | OS << "\t" << "\n" ; |
1946 | continue; |
1947 | case OP_ArrayElemPtrSint32: |
1948 | PrintName("ArrayElemPtrSint32" ); |
1949 | OS << "\t" << "\n" ; |
1950 | continue; |
1951 | case OP_ArrayElemPtrUint32: |
1952 | PrintName("ArrayElemPtrUint32" ); |
1953 | OS << "\t" << "\n" ; |
1954 | continue; |
1955 | case OP_ArrayElemPtrSint64: |
1956 | PrintName("ArrayElemPtrSint64" ); |
1957 | OS << "\t" << "\n" ; |
1958 | continue; |
1959 | case OP_ArrayElemPtrUint64: |
1960 | PrintName("ArrayElemPtrUint64" ); |
1961 | OS << "\t" << "\n" ; |
1962 | continue; |
1963 | case OP_ArrayElemPtrIntAP: |
1964 | PrintName("ArrayElemPtrIntAP" ); |
1965 | OS << "\t" << "\n" ; |
1966 | continue; |
1967 | case OP_ArrayElemPtrIntAPS: |
1968 | PrintName("ArrayElemPtrIntAPS" ); |
1969 | OS << "\t" << "\n" ; |
1970 | continue; |
1971 | case OP_ArrayElemPtrBool: |
1972 | PrintName("ArrayElemPtrBool" ); |
1973 | OS << "\t" << "\n" ; |
1974 | continue; |
1975 | #endif |
1976 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1977 | bool emitArrayElemPtrSint8(const SourceInfo &); |
1978 | bool emitArrayElemPtrUint8(const SourceInfo &); |
1979 | bool emitArrayElemPtrSint16(const SourceInfo &); |
1980 | bool emitArrayElemPtrUint16(const SourceInfo &); |
1981 | bool emitArrayElemPtrSint32(const SourceInfo &); |
1982 | bool emitArrayElemPtrUint32(const SourceInfo &); |
1983 | bool emitArrayElemPtrSint64(const SourceInfo &); |
1984 | bool emitArrayElemPtrUint64(const SourceInfo &); |
1985 | bool emitArrayElemPtrIntAP(const SourceInfo &); |
1986 | bool emitArrayElemPtrIntAPS(const SourceInfo &); |
1987 | bool emitArrayElemPtrBool(const SourceInfo &); |
1988 | #endif |
1989 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
1990 | [[nodiscard]] bool emitArrayElemPtr(PrimType, const SourceInfo &I); |
1991 | #endif |
1992 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
1993 | bool |
1994 | #if defined(GET_EVAL_IMPL) |
1995 | EvalEmitter |
1996 | #else |
1997 | ByteCodeEmitter |
1998 | #endif |
1999 | ::emitArrayElemPtr(PrimType T0, const SourceInfo &I) { |
2000 | switch (T0) { |
2001 | case PT_Sint8: |
2002 | return emitArrayElemPtrSint8(I); |
2003 | case PT_Uint8: |
2004 | return emitArrayElemPtrUint8(I); |
2005 | case PT_Sint16: |
2006 | return emitArrayElemPtrSint16(I); |
2007 | case PT_Uint16: |
2008 | return emitArrayElemPtrUint16(I); |
2009 | case PT_Sint32: |
2010 | return emitArrayElemPtrSint32(I); |
2011 | case PT_Uint32: |
2012 | return emitArrayElemPtrUint32(I); |
2013 | case PT_Sint64: |
2014 | return emitArrayElemPtrSint64(I); |
2015 | case PT_Uint64: |
2016 | return emitArrayElemPtrUint64(I); |
2017 | case PT_IntAP: |
2018 | return emitArrayElemPtrIntAP(I); |
2019 | case PT_IntAPS: |
2020 | return emitArrayElemPtrIntAPS(I); |
2021 | case PT_Bool: |
2022 | return emitArrayElemPtrBool(I); |
2023 | default: llvm_unreachable("invalid type: emitArrayElemPtr" ); |
2024 | } |
2025 | llvm_unreachable("invalid enum value" ); |
2026 | } |
2027 | #endif |
2028 | #ifdef GET_LINK_IMPL |
2029 | bool ByteCodeEmitter::emitArrayElemPtrSint8(const SourceInfo &L) { |
2030 | return emitOp<>(OP_ArrayElemPtrSint8, L); |
2031 | } |
2032 | bool ByteCodeEmitter::emitArrayElemPtrUint8(const SourceInfo &L) { |
2033 | return emitOp<>(OP_ArrayElemPtrUint8, L); |
2034 | } |
2035 | bool ByteCodeEmitter::emitArrayElemPtrSint16(const SourceInfo &L) { |
2036 | return emitOp<>(OP_ArrayElemPtrSint16, L); |
2037 | } |
2038 | bool ByteCodeEmitter::emitArrayElemPtrUint16(const SourceInfo &L) { |
2039 | return emitOp<>(OP_ArrayElemPtrUint16, L); |
2040 | } |
2041 | bool ByteCodeEmitter::emitArrayElemPtrSint32(const SourceInfo &L) { |
2042 | return emitOp<>(OP_ArrayElemPtrSint32, L); |
2043 | } |
2044 | bool ByteCodeEmitter::emitArrayElemPtrUint32(const SourceInfo &L) { |
2045 | return emitOp<>(OP_ArrayElemPtrUint32, L); |
2046 | } |
2047 | bool ByteCodeEmitter::emitArrayElemPtrSint64(const SourceInfo &L) { |
2048 | return emitOp<>(OP_ArrayElemPtrSint64, L); |
2049 | } |
2050 | bool ByteCodeEmitter::emitArrayElemPtrUint64(const SourceInfo &L) { |
2051 | return emitOp<>(OP_ArrayElemPtrUint64, L); |
2052 | } |
2053 | bool ByteCodeEmitter::emitArrayElemPtrIntAP(const SourceInfo &L) { |
2054 | return emitOp<>(OP_ArrayElemPtrIntAP, L); |
2055 | } |
2056 | bool ByteCodeEmitter::emitArrayElemPtrIntAPS(const SourceInfo &L) { |
2057 | return emitOp<>(OP_ArrayElemPtrIntAPS, L); |
2058 | } |
2059 | bool ByteCodeEmitter::emitArrayElemPtrBool(const SourceInfo &L) { |
2060 | return emitOp<>(OP_ArrayElemPtrBool, L); |
2061 | } |
2062 | #endif |
2063 | #ifdef GET_EVAL_IMPL |
2064 | bool EvalEmitter::emitArrayElemPtrSint8(const SourceInfo &L) { |
2065 | if (!isActive()) return true; |
2066 | CurrentSource = L; |
2067 | return ArrayElemPtr<PT_Sint8>(S, OpPC); |
2068 | } |
2069 | bool EvalEmitter::emitArrayElemPtrUint8(const SourceInfo &L) { |
2070 | if (!isActive()) return true; |
2071 | CurrentSource = L; |
2072 | return ArrayElemPtr<PT_Uint8>(S, OpPC); |
2073 | } |
2074 | bool EvalEmitter::emitArrayElemPtrSint16(const SourceInfo &L) { |
2075 | if (!isActive()) return true; |
2076 | CurrentSource = L; |
2077 | return ArrayElemPtr<PT_Sint16>(S, OpPC); |
2078 | } |
2079 | bool EvalEmitter::emitArrayElemPtrUint16(const SourceInfo &L) { |
2080 | if (!isActive()) return true; |
2081 | CurrentSource = L; |
2082 | return ArrayElemPtr<PT_Uint16>(S, OpPC); |
2083 | } |
2084 | bool EvalEmitter::emitArrayElemPtrSint32(const SourceInfo &L) { |
2085 | if (!isActive()) return true; |
2086 | CurrentSource = L; |
2087 | return ArrayElemPtr<PT_Sint32>(S, OpPC); |
2088 | } |
2089 | bool EvalEmitter::emitArrayElemPtrUint32(const SourceInfo &L) { |
2090 | if (!isActive()) return true; |
2091 | CurrentSource = L; |
2092 | return ArrayElemPtr<PT_Uint32>(S, OpPC); |
2093 | } |
2094 | bool EvalEmitter::emitArrayElemPtrSint64(const SourceInfo &L) { |
2095 | if (!isActive()) return true; |
2096 | CurrentSource = L; |
2097 | return ArrayElemPtr<PT_Sint64>(S, OpPC); |
2098 | } |
2099 | bool EvalEmitter::emitArrayElemPtrUint64(const SourceInfo &L) { |
2100 | if (!isActive()) return true; |
2101 | CurrentSource = L; |
2102 | return ArrayElemPtr<PT_Uint64>(S, OpPC); |
2103 | } |
2104 | bool EvalEmitter::emitArrayElemPtrIntAP(const SourceInfo &L) { |
2105 | if (!isActive()) return true; |
2106 | CurrentSource = L; |
2107 | return ArrayElemPtr<PT_IntAP>(S, OpPC); |
2108 | } |
2109 | bool EvalEmitter::emitArrayElemPtrIntAPS(const SourceInfo &L) { |
2110 | if (!isActive()) return true; |
2111 | CurrentSource = L; |
2112 | return ArrayElemPtr<PT_IntAPS>(S, OpPC); |
2113 | } |
2114 | bool EvalEmitter::emitArrayElemPtrBool(const SourceInfo &L) { |
2115 | if (!isActive()) return true; |
2116 | CurrentSource = L; |
2117 | return ArrayElemPtr<PT_Bool>(S, OpPC); |
2118 | } |
2119 | #endif |
2120 | #ifdef GET_OPCODE_NAMES |
2121 | OP_ArrayElemPtrPopSint8, |
2122 | OP_ArrayElemPtrPopUint8, |
2123 | OP_ArrayElemPtrPopSint16, |
2124 | OP_ArrayElemPtrPopUint16, |
2125 | OP_ArrayElemPtrPopSint32, |
2126 | OP_ArrayElemPtrPopUint32, |
2127 | OP_ArrayElemPtrPopSint64, |
2128 | OP_ArrayElemPtrPopUint64, |
2129 | OP_ArrayElemPtrPopIntAP, |
2130 | OP_ArrayElemPtrPopIntAPS, |
2131 | OP_ArrayElemPtrPopBool, |
2132 | #endif |
2133 | #ifdef GET_INTERP |
2134 | case OP_ArrayElemPtrPopSint8: { |
2135 | if (!ArrayElemPtrPop<PT_Sint8>(S, OpPC)) |
2136 | return false; |
2137 | continue; |
2138 | } |
2139 | case OP_ArrayElemPtrPopUint8: { |
2140 | if (!ArrayElemPtrPop<PT_Uint8>(S, OpPC)) |
2141 | return false; |
2142 | continue; |
2143 | } |
2144 | case OP_ArrayElemPtrPopSint16: { |
2145 | if (!ArrayElemPtrPop<PT_Sint16>(S, OpPC)) |
2146 | return false; |
2147 | continue; |
2148 | } |
2149 | case OP_ArrayElemPtrPopUint16: { |
2150 | if (!ArrayElemPtrPop<PT_Uint16>(S, OpPC)) |
2151 | return false; |
2152 | continue; |
2153 | } |
2154 | case OP_ArrayElemPtrPopSint32: { |
2155 | if (!ArrayElemPtrPop<PT_Sint32>(S, OpPC)) |
2156 | return false; |
2157 | continue; |
2158 | } |
2159 | case OP_ArrayElemPtrPopUint32: { |
2160 | if (!ArrayElemPtrPop<PT_Uint32>(S, OpPC)) |
2161 | return false; |
2162 | continue; |
2163 | } |
2164 | case OP_ArrayElemPtrPopSint64: { |
2165 | if (!ArrayElemPtrPop<PT_Sint64>(S, OpPC)) |
2166 | return false; |
2167 | continue; |
2168 | } |
2169 | case OP_ArrayElemPtrPopUint64: { |
2170 | if (!ArrayElemPtrPop<PT_Uint64>(S, OpPC)) |
2171 | return false; |
2172 | continue; |
2173 | } |
2174 | case OP_ArrayElemPtrPopIntAP: { |
2175 | if (!ArrayElemPtrPop<PT_IntAP>(S, OpPC)) |
2176 | return false; |
2177 | continue; |
2178 | } |
2179 | case OP_ArrayElemPtrPopIntAPS: { |
2180 | if (!ArrayElemPtrPop<PT_IntAPS>(S, OpPC)) |
2181 | return false; |
2182 | continue; |
2183 | } |
2184 | case OP_ArrayElemPtrPopBool: { |
2185 | if (!ArrayElemPtrPop<PT_Bool>(S, OpPC)) |
2186 | return false; |
2187 | continue; |
2188 | } |
2189 | #endif |
2190 | #ifdef GET_DISASM |
2191 | case OP_ArrayElemPtrPopSint8: |
2192 | PrintName("ArrayElemPtrPopSint8" ); |
2193 | OS << "\t" << "\n" ; |
2194 | continue; |
2195 | case OP_ArrayElemPtrPopUint8: |
2196 | PrintName("ArrayElemPtrPopUint8" ); |
2197 | OS << "\t" << "\n" ; |
2198 | continue; |
2199 | case OP_ArrayElemPtrPopSint16: |
2200 | PrintName("ArrayElemPtrPopSint16" ); |
2201 | OS << "\t" << "\n" ; |
2202 | continue; |
2203 | case OP_ArrayElemPtrPopUint16: |
2204 | PrintName("ArrayElemPtrPopUint16" ); |
2205 | OS << "\t" << "\n" ; |
2206 | continue; |
2207 | case OP_ArrayElemPtrPopSint32: |
2208 | PrintName("ArrayElemPtrPopSint32" ); |
2209 | OS << "\t" << "\n" ; |
2210 | continue; |
2211 | case OP_ArrayElemPtrPopUint32: |
2212 | PrintName("ArrayElemPtrPopUint32" ); |
2213 | OS << "\t" << "\n" ; |
2214 | continue; |
2215 | case OP_ArrayElemPtrPopSint64: |
2216 | PrintName("ArrayElemPtrPopSint64" ); |
2217 | OS << "\t" << "\n" ; |
2218 | continue; |
2219 | case OP_ArrayElemPtrPopUint64: |
2220 | PrintName("ArrayElemPtrPopUint64" ); |
2221 | OS << "\t" << "\n" ; |
2222 | continue; |
2223 | case OP_ArrayElemPtrPopIntAP: |
2224 | PrintName("ArrayElemPtrPopIntAP" ); |
2225 | OS << "\t" << "\n" ; |
2226 | continue; |
2227 | case OP_ArrayElemPtrPopIntAPS: |
2228 | PrintName("ArrayElemPtrPopIntAPS" ); |
2229 | OS << "\t" << "\n" ; |
2230 | continue; |
2231 | case OP_ArrayElemPtrPopBool: |
2232 | PrintName("ArrayElemPtrPopBool" ); |
2233 | OS << "\t" << "\n" ; |
2234 | continue; |
2235 | #endif |
2236 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2237 | bool emitArrayElemPtrPopSint8(const SourceInfo &); |
2238 | bool emitArrayElemPtrPopUint8(const SourceInfo &); |
2239 | bool emitArrayElemPtrPopSint16(const SourceInfo &); |
2240 | bool emitArrayElemPtrPopUint16(const SourceInfo &); |
2241 | bool emitArrayElemPtrPopSint32(const SourceInfo &); |
2242 | bool emitArrayElemPtrPopUint32(const SourceInfo &); |
2243 | bool emitArrayElemPtrPopSint64(const SourceInfo &); |
2244 | bool emitArrayElemPtrPopUint64(const SourceInfo &); |
2245 | bool emitArrayElemPtrPopIntAP(const SourceInfo &); |
2246 | bool emitArrayElemPtrPopIntAPS(const SourceInfo &); |
2247 | bool emitArrayElemPtrPopBool(const SourceInfo &); |
2248 | #endif |
2249 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2250 | [[nodiscard]] bool emitArrayElemPtrPop(PrimType, const SourceInfo &I); |
2251 | #endif |
2252 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
2253 | bool |
2254 | #if defined(GET_EVAL_IMPL) |
2255 | EvalEmitter |
2256 | #else |
2257 | ByteCodeEmitter |
2258 | #endif |
2259 | ::emitArrayElemPtrPop(PrimType T0, const SourceInfo &I) { |
2260 | switch (T0) { |
2261 | case PT_Sint8: |
2262 | return emitArrayElemPtrPopSint8(I); |
2263 | case PT_Uint8: |
2264 | return emitArrayElemPtrPopUint8(I); |
2265 | case PT_Sint16: |
2266 | return emitArrayElemPtrPopSint16(I); |
2267 | case PT_Uint16: |
2268 | return emitArrayElemPtrPopUint16(I); |
2269 | case PT_Sint32: |
2270 | return emitArrayElemPtrPopSint32(I); |
2271 | case PT_Uint32: |
2272 | return emitArrayElemPtrPopUint32(I); |
2273 | case PT_Sint64: |
2274 | return emitArrayElemPtrPopSint64(I); |
2275 | case PT_Uint64: |
2276 | return emitArrayElemPtrPopUint64(I); |
2277 | case PT_IntAP: |
2278 | return emitArrayElemPtrPopIntAP(I); |
2279 | case PT_IntAPS: |
2280 | return emitArrayElemPtrPopIntAPS(I); |
2281 | case PT_Bool: |
2282 | return emitArrayElemPtrPopBool(I); |
2283 | default: llvm_unreachable("invalid type: emitArrayElemPtrPop" ); |
2284 | } |
2285 | llvm_unreachable("invalid enum value" ); |
2286 | } |
2287 | #endif |
2288 | #ifdef GET_LINK_IMPL |
2289 | bool ByteCodeEmitter::emitArrayElemPtrPopSint8(const SourceInfo &L) { |
2290 | return emitOp<>(OP_ArrayElemPtrPopSint8, L); |
2291 | } |
2292 | bool ByteCodeEmitter::emitArrayElemPtrPopUint8(const SourceInfo &L) { |
2293 | return emitOp<>(OP_ArrayElemPtrPopUint8, L); |
2294 | } |
2295 | bool ByteCodeEmitter::emitArrayElemPtrPopSint16(const SourceInfo &L) { |
2296 | return emitOp<>(OP_ArrayElemPtrPopSint16, L); |
2297 | } |
2298 | bool ByteCodeEmitter::emitArrayElemPtrPopUint16(const SourceInfo &L) { |
2299 | return emitOp<>(OP_ArrayElemPtrPopUint16, L); |
2300 | } |
2301 | bool ByteCodeEmitter::emitArrayElemPtrPopSint32(const SourceInfo &L) { |
2302 | return emitOp<>(OP_ArrayElemPtrPopSint32, L); |
2303 | } |
2304 | bool ByteCodeEmitter::emitArrayElemPtrPopUint32(const SourceInfo &L) { |
2305 | return emitOp<>(OP_ArrayElemPtrPopUint32, L); |
2306 | } |
2307 | bool ByteCodeEmitter::emitArrayElemPtrPopSint64(const SourceInfo &L) { |
2308 | return emitOp<>(OP_ArrayElemPtrPopSint64, L); |
2309 | } |
2310 | bool ByteCodeEmitter::emitArrayElemPtrPopUint64(const SourceInfo &L) { |
2311 | return emitOp<>(OP_ArrayElemPtrPopUint64, L); |
2312 | } |
2313 | bool ByteCodeEmitter::emitArrayElemPtrPopIntAP(const SourceInfo &L) { |
2314 | return emitOp<>(OP_ArrayElemPtrPopIntAP, L); |
2315 | } |
2316 | bool ByteCodeEmitter::emitArrayElemPtrPopIntAPS(const SourceInfo &L) { |
2317 | return emitOp<>(OP_ArrayElemPtrPopIntAPS, L); |
2318 | } |
2319 | bool ByteCodeEmitter::emitArrayElemPtrPopBool(const SourceInfo &L) { |
2320 | return emitOp<>(OP_ArrayElemPtrPopBool, L); |
2321 | } |
2322 | #endif |
2323 | #ifdef GET_EVAL_IMPL |
2324 | bool EvalEmitter::emitArrayElemPtrPopSint8(const SourceInfo &L) { |
2325 | if (!isActive()) return true; |
2326 | CurrentSource = L; |
2327 | return ArrayElemPtrPop<PT_Sint8>(S, OpPC); |
2328 | } |
2329 | bool EvalEmitter::emitArrayElemPtrPopUint8(const SourceInfo &L) { |
2330 | if (!isActive()) return true; |
2331 | CurrentSource = L; |
2332 | return ArrayElemPtrPop<PT_Uint8>(S, OpPC); |
2333 | } |
2334 | bool EvalEmitter::emitArrayElemPtrPopSint16(const SourceInfo &L) { |
2335 | if (!isActive()) return true; |
2336 | CurrentSource = L; |
2337 | return ArrayElemPtrPop<PT_Sint16>(S, OpPC); |
2338 | } |
2339 | bool EvalEmitter::emitArrayElemPtrPopUint16(const SourceInfo &L) { |
2340 | if (!isActive()) return true; |
2341 | CurrentSource = L; |
2342 | return ArrayElemPtrPop<PT_Uint16>(S, OpPC); |
2343 | } |
2344 | bool EvalEmitter::emitArrayElemPtrPopSint32(const SourceInfo &L) { |
2345 | if (!isActive()) return true; |
2346 | CurrentSource = L; |
2347 | return ArrayElemPtrPop<PT_Sint32>(S, OpPC); |
2348 | } |
2349 | bool EvalEmitter::emitArrayElemPtrPopUint32(const SourceInfo &L) { |
2350 | if (!isActive()) return true; |
2351 | CurrentSource = L; |
2352 | return ArrayElemPtrPop<PT_Uint32>(S, OpPC); |
2353 | } |
2354 | bool EvalEmitter::emitArrayElemPtrPopSint64(const SourceInfo &L) { |
2355 | if (!isActive()) return true; |
2356 | CurrentSource = L; |
2357 | return ArrayElemPtrPop<PT_Sint64>(S, OpPC); |
2358 | } |
2359 | bool EvalEmitter::emitArrayElemPtrPopUint64(const SourceInfo &L) { |
2360 | if (!isActive()) return true; |
2361 | CurrentSource = L; |
2362 | return ArrayElemPtrPop<PT_Uint64>(S, OpPC); |
2363 | } |
2364 | bool EvalEmitter::emitArrayElemPtrPopIntAP(const SourceInfo &L) { |
2365 | if (!isActive()) return true; |
2366 | CurrentSource = L; |
2367 | return ArrayElemPtrPop<PT_IntAP>(S, OpPC); |
2368 | } |
2369 | bool EvalEmitter::emitArrayElemPtrPopIntAPS(const SourceInfo &L) { |
2370 | if (!isActive()) return true; |
2371 | CurrentSource = L; |
2372 | return ArrayElemPtrPop<PT_IntAPS>(S, OpPC); |
2373 | } |
2374 | bool EvalEmitter::emitArrayElemPtrPopBool(const SourceInfo &L) { |
2375 | if (!isActive()) return true; |
2376 | CurrentSource = L; |
2377 | return ArrayElemPtrPop<PT_Bool>(S, OpPC); |
2378 | } |
2379 | #endif |
2380 | #ifdef GET_OPCODE_NAMES |
2381 | OP_Assume, |
2382 | #endif |
2383 | #ifdef GET_INTERP |
2384 | case OP_Assume: { |
2385 | if (!Assume(S, OpPC)) |
2386 | return false; |
2387 | continue; |
2388 | } |
2389 | #endif |
2390 | #ifdef GET_DISASM |
2391 | case OP_Assume: |
2392 | PrintName("Assume" ); |
2393 | OS << "\t" << "\n" ; |
2394 | continue; |
2395 | #endif |
2396 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2397 | bool emitAssume(const SourceInfo &); |
2398 | #endif |
2399 | #ifdef GET_LINK_IMPL |
2400 | bool ByteCodeEmitter::emitAssume(const SourceInfo &L) { |
2401 | return emitOp<>(OP_Assume, L); |
2402 | } |
2403 | #endif |
2404 | #ifdef GET_EVAL_IMPL |
2405 | bool EvalEmitter::emitAssume(const SourceInfo &L) { |
2406 | if (!isActive()) return true; |
2407 | CurrentSource = L; |
2408 | return Assume(S, OpPC); |
2409 | } |
2410 | #endif |
2411 | #ifdef GET_OPCODE_NAMES |
2412 | OP_BitAndSint8, |
2413 | OP_BitAndUint8, |
2414 | OP_BitAndSint16, |
2415 | OP_BitAndUint16, |
2416 | OP_BitAndSint32, |
2417 | OP_BitAndUint32, |
2418 | OP_BitAndSint64, |
2419 | OP_BitAndUint64, |
2420 | OP_BitAndIntAP, |
2421 | OP_BitAndIntAPS, |
2422 | #endif |
2423 | #ifdef GET_INTERP |
2424 | case OP_BitAndSint8: { |
2425 | if (!BitAnd<PT_Sint8>(S, OpPC)) |
2426 | return false; |
2427 | continue; |
2428 | } |
2429 | case OP_BitAndUint8: { |
2430 | if (!BitAnd<PT_Uint8>(S, OpPC)) |
2431 | return false; |
2432 | continue; |
2433 | } |
2434 | case OP_BitAndSint16: { |
2435 | if (!BitAnd<PT_Sint16>(S, OpPC)) |
2436 | return false; |
2437 | continue; |
2438 | } |
2439 | case OP_BitAndUint16: { |
2440 | if (!BitAnd<PT_Uint16>(S, OpPC)) |
2441 | return false; |
2442 | continue; |
2443 | } |
2444 | case OP_BitAndSint32: { |
2445 | if (!BitAnd<PT_Sint32>(S, OpPC)) |
2446 | return false; |
2447 | continue; |
2448 | } |
2449 | case OP_BitAndUint32: { |
2450 | if (!BitAnd<PT_Uint32>(S, OpPC)) |
2451 | return false; |
2452 | continue; |
2453 | } |
2454 | case OP_BitAndSint64: { |
2455 | if (!BitAnd<PT_Sint64>(S, OpPC)) |
2456 | return false; |
2457 | continue; |
2458 | } |
2459 | case OP_BitAndUint64: { |
2460 | if (!BitAnd<PT_Uint64>(S, OpPC)) |
2461 | return false; |
2462 | continue; |
2463 | } |
2464 | case OP_BitAndIntAP: { |
2465 | if (!BitAnd<PT_IntAP>(S, OpPC)) |
2466 | return false; |
2467 | continue; |
2468 | } |
2469 | case OP_BitAndIntAPS: { |
2470 | if (!BitAnd<PT_IntAPS>(S, OpPC)) |
2471 | return false; |
2472 | continue; |
2473 | } |
2474 | #endif |
2475 | #ifdef GET_DISASM |
2476 | case OP_BitAndSint8: |
2477 | PrintName("BitAndSint8" ); |
2478 | OS << "\t" << "\n" ; |
2479 | continue; |
2480 | case OP_BitAndUint8: |
2481 | PrintName("BitAndUint8" ); |
2482 | OS << "\t" << "\n" ; |
2483 | continue; |
2484 | case OP_BitAndSint16: |
2485 | PrintName("BitAndSint16" ); |
2486 | OS << "\t" << "\n" ; |
2487 | continue; |
2488 | case OP_BitAndUint16: |
2489 | PrintName("BitAndUint16" ); |
2490 | OS << "\t" << "\n" ; |
2491 | continue; |
2492 | case OP_BitAndSint32: |
2493 | PrintName("BitAndSint32" ); |
2494 | OS << "\t" << "\n" ; |
2495 | continue; |
2496 | case OP_BitAndUint32: |
2497 | PrintName("BitAndUint32" ); |
2498 | OS << "\t" << "\n" ; |
2499 | continue; |
2500 | case OP_BitAndSint64: |
2501 | PrintName("BitAndSint64" ); |
2502 | OS << "\t" << "\n" ; |
2503 | continue; |
2504 | case OP_BitAndUint64: |
2505 | PrintName("BitAndUint64" ); |
2506 | OS << "\t" << "\n" ; |
2507 | continue; |
2508 | case OP_BitAndIntAP: |
2509 | PrintName("BitAndIntAP" ); |
2510 | OS << "\t" << "\n" ; |
2511 | continue; |
2512 | case OP_BitAndIntAPS: |
2513 | PrintName("BitAndIntAPS" ); |
2514 | OS << "\t" << "\n" ; |
2515 | continue; |
2516 | #endif |
2517 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2518 | bool emitBitAndSint8(const SourceInfo &); |
2519 | bool emitBitAndUint8(const SourceInfo &); |
2520 | bool emitBitAndSint16(const SourceInfo &); |
2521 | bool emitBitAndUint16(const SourceInfo &); |
2522 | bool emitBitAndSint32(const SourceInfo &); |
2523 | bool emitBitAndUint32(const SourceInfo &); |
2524 | bool emitBitAndSint64(const SourceInfo &); |
2525 | bool emitBitAndUint64(const SourceInfo &); |
2526 | bool emitBitAndIntAP(const SourceInfo &); |
2527 | bool emitBitAndIntAPS(const SourceInfo &); |
2528 | #endif |
2529 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2530 | [[nodiscard]] bool emitBitAnd(PrimType, const SourceInfo &I); |
2531 | #endif |
2532 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
2533 | bool |
2534 | #if defined(GET_EVAL_IMPL) |
2535 | EvalEmitter |
2536 | #else |
2537 | ByteCodeEmitter |
2538 | #endif |
2539 | ::emitBitAnd(PrimType T0, const SourceInfo &I) { |
2540 | switch (T0) { |
2541 | case PT_Sint8: |
2542 | return emitBitAndSint8(I); |
2543 | case PT_Uint8: |
2544 | return emitBitAndUint8(I); |
2545 | case PT_Sint16: |
2546 | return emitBitAndSint16(I); |
2547 | case PT_Uint16: |
2548 | return emitBitAndUint16(I); |
2549 | case PT_Sint32: |
2550 | return emitBitAndSint32(I); |
2551 | case PT_Uint32: |
2552 | return emitBitAndUint32(I); |
2553 | case PT_Sint64: |
2554 | return emitBitAndSint64(I); |
2555 | case PT_Uint64: |
2556 | return emitBitAndUint64(I); |
2557 | case PT_IntAP: |
2558 | return emitBitAndIntAP(I); |
2559 | case PT_IntAPS: |
2560 | return emitBitAndIntAPS(I); |
2561 | default: llvm_unreachable("invalid type: emitBitAnd" ); |
2562 | } |
2563 | llvm_unreachable("invalid enum value" ); |
2564 | } |
2565 | #endif |
2566 | #ifdef GET_LINK_IMPL |
2567 | bool ByteCodeEmitter::emitBitAndSint8(const SourceInfo &L) { |
2568 | return emitOp<>(OP_BitAndSint8, L); |
2569 | } |
2570 | bool ByteCodeEmitter::emitBitAndUint8(const SourceInfo &L) { |
2571 | return emitOp<>(OP_BitAndUint8, L); |
2572 | } |
2573 | bool ByteCodeEmitter::emitBitAndSint16(const SourceInfo &L) { |
2574 | return emitOp<>(OP_BitAndSint16, L); |
2575 | } |
2576 | bool ByteCodeEmitter::emitBitAndUint16(const SourceInfo &L) { |
2577 | return emitOp<>(OP_BitAndUint16, L); |
2578 | } |
2579 | bool ByteCodeEmitter::emitBitAndSint32(const SourceInfo &L) { |
2580 | return emitOp<>(OP_BitAndSint32, L); |
2581 | } |
2582 | bool ByteCodeEmitter::emitBitAndUint32(const SourceInfo &L) { |
2583 | return emitOp<>(OP_BitAndUint32, L); |
2584 | } |
2585 | bool ByteCodeEmitter::emitBitAndSint64(const SourceInfo &L) { |
2586 | return emitOp<>(OP_BitAndSint64, L); |
2587 | } |
2588 | bool ByteCodeEmitter::emitBitAndUint64(const SourceInfo &L) { |
2589 | return emitOp<>(OP_BitAndUint64, L); |
2590 | } |
2591 | bool ByteCodeEmitter::emitBitAndIntAP(const SourceInfo &L) { |
2592 | return emitOp<>(OP_BitAndIntAP, L); |
2593 | } |
2594 | bool ByteCodeEmitter::emitBitAndIntAPS(const SourceInfo &L) { |
2595 | return emitOp<>(OP_BitAndIntAPS, L); |
2596 | } |
2597 | #endif |
2598 | #ifdef GET_EVAL_IMPL |
2599 | bool EvalEmitter::emitBitAndSint8(const SourceInfo &L) { |
2600 | if (!isActive()) return true; |
2601 | CurrentSource = L; |
2602 | return BitAnd<PT_Sint8>(S, OpPC); |
2603 | } |
2604 | bool EvalEmitter::emitBitAndUint8(const SourceInfo &L) { |
2605 | if (!isActive()) return true; |
2606 | CurrentSource = L; |
2607 | return BitAnd<PT_Uint8>(S, OpPC); |
2608 | } |
2609 | bool EvalEmitter::emitBitAndSint16(const SourceInfo &L) { |
2610 | if (!isActive()) return true; |
2611 | CurrentSource = L; |
2612 | return BitAnd<PT_Sint16>(S, OpPC); |
2613 | } |
2614 | bool EvalEmitter::emitBitAndUint16(const SourceInfo &L) { |
2615 | if (!isActive()) return true; |
2616 | CurrentSource = L; |
2617 | return BitAnd<PT_Uint16>(S, OpPC); |
2618 | } |
2619 | bool EvalEmitter::emitBitAndSint32(const SourceInfo &L) { |
2620 | if (!isActive()) return true; |
2621 | CurrentSource = L; |
2622 | return BitAnd<PT_Sint32>(S, OpPC); |
2623 | } |
2624 | bool EvalEmitter::emitBitAndUint32(const SourceInfo &L) { |
2625 | if (!isActive()) return true; |
2626 | CurrentSource = L; |
2627 | return BitAnd<PT_Uint32>(S, OpPC); |
2628 | } |
2629 | bool EvalEmitter::emitBitAndSint64(const SourceInfo &L) { |
2630 | if (!isActive()) return true; |
2631 | CurrentSource = L; |
2632 | return BitAnd<PT_Sint64>(S, OpPC); |
2633 | } |
2634 | bool EvalEmitter::emitBitAndUint64(const SourceInfo &L) { |
2635 | if (!isActive()) return true; |
2636 | CurrentSource = L; |
2637 | return BitAnd<PT_Uint64>(S, OpPC); |
2638 | } |
2639 | bool EvalEmitter::emitBitAndIntAP(const SourceInfo &L) { |
2640 | if (!isActive()) return true; |
2641 | CurrentSource = L; |
2642 | return BitAnd<PT_IntAP>(S, OpPC); |
2643 | } |
2644 | bool EvalEmitter::emitBitAndIntAPS(const SourceInfo &L) { |
2645 | if (!isActive()) return true; |
2646 | CurrentSource = L; |
2647 | return BitAnd<PT_IntAPS>(S, OpPC); |
2648 | } |
2649 | #endif |
2650 | #ifdef GET_OPCODE_NAMES |
2651 | OP_BitOrSint8, |
2652 | OP_BitOrUint8, |
2653 | OP_BitOrSint16, |
2654 | OP_BitOrUint16, |
2655 | OP_BitOrSint32, |
2656 | OP_BitOrUint32, |
2657 | OP_BitOrSint64, |
2658 | OP_BitOrUint64, |
2659 | OP_BitOrIntAP, |
2660 | OP_BitOrIntAPS, |
2661 | #endif |
2662 | #ifdef GET_INTERP |
2663 | case OP_BitOrSint8: { |
2664 | if (!BitOr<PT_Sint8>(S, OpPC)) |
2665 | return false; |
2666 | continue; |
2667 | } |
2668 | case OP_BitOrUint8: { |
2669 | if (!BitOr<PT_Uint8>(S, OpPC)) |
2670 | return false; |
2671 | continue; |
2672 | } |
2673 | case OP_BitOrSint16: { |
2674 | if (!BitOr<PT_Sint16>(S, OpPC)) |
2675 | return false; |
2676 | continue; |
2677 | } |
2678 | case OP_BitOrUint16: { |
2679 | if (!BitOr<PT_Uint16>(S, OpPC)) |
2680 | return false; |
2681 | continue; |
2682 | } |
2683 | case OP_BitOrSint32: { |
2684 | if (!BitOr<PT_Sint32>(S, OpPC)) |
2685 | return false; |
2686 | continue; |
2687 | } |
2688 | case OP_BitOrUint32: { |
2689 | if (!BitOr<PT_Uint32>(S, OpPC)) |
2690 | return false; |
2691 | continue; |
2692 | } |
2693 | case OP_BitOrSint64: { |
2694 | if (!BitOr<PT_Sint64>(S, OpPC)) |
2695 | return false; |
2696 | continue; |
2697 | } |
2698 | case OP_BitOrUint64: { |
2699 | if (!BitOr<PT_Uint64>(S, OpPC)) |
2700 | return false; |
2701 | continue; |
2702 | } |
2703 | case OP_BitOrIntAP: { |
2704 | if (!BitOr<PT_IntAP>(S, OpPC)) |
2705 | return false; |
2706 | continue; |
2707 | } |
2708 | case OP_BitOrIntAPS: { |
2709 | if (!BitOr<PT_IntAPS>(S, OpPC)) |
2710 | return false; |
2711 | continue; |
2712 | } |
2713 | #endif |
2714 | #ifdef GET_DISASM |
2715 | case OP_BitOrSint8: |
2716 | PrintName("BitOrSint8" ); |
2717 | OS << "\t" << "\n" ; |
2718 | continue; |
2719 | case OP_BitOrUint8: |
2720 | PrintName("BitOrUint8" ); |
2721 | OS << "\t" << "\n" ; |
2722 | continue; |
2723 | case OP_BitOrSint16: |
2724 | PrintName("BitOrSint16" ); |
2725 | OS << "\t" << "\n" ; |
2726 | continue; |
2727 | case OP_BitOrUint16: |
2728 | PrintName("BitOrUint16" ); |
2729 | OS << "\t" << "\n" ; |
2730 | continue; |
2731 | case OP_BitOrSint32: |
2732 | PrintName("BitOrSint32" ); |
2733 | OS << "\t" << "\n" ; |
2734 | continue; |
2735 | case OP_BitOrUint32: |
2736 | PrintName("BitOrUint32" ); |
2737 | OS << "\t" << "\n" ; |
2738 | continue; |
2739 | case OP_BitOrSint64: |
2740 | PrintName("BitOrSint64" ); |
2741 | OS << "\t" << "\n" ; |
2742 | continue; |
2743 | case OP_BitOrUint64: |
2744 | PrintName("BitOrUint64" ); |
2745 | OS << "\t" << "\n" ; |
2746 | continue; |
2747 | case OP_BitOrIntAP: |
2748 | PrintName("BitOrIntAP" ); |
2749 | OS << "\t" << "\n" ; |
2750 | continue; |
2751 | case OP_BitOrIntAPS: |
2752 | PrintName("BitOrIntAPS" ); |
2753 | OS << "\t" << "\n" ; |
2754 | continue; |
2755 | #endif |
2756 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2757 | bool emitBitOrSint8(const SourceInfo &); |
2758 | bool emitBitOrUint8(const SourceInfo &); |
2759 | bool emitBitOrSint16(const SourceInfo &); |
2760 | bool emitBitOrUint16(const SourceInfo &); |
2761 | bool emitBitOrSint32(const SourceInfo &); |
2762 | bool emitBitOrUint32(const SourceInfo &); |
2763 | bool emitBitOrSint64(const SourceInfo &); |
2764 | bool emitBitOrUint64(const SourceInfo &); |
2765 | bool emitBitOrIntAP(const SourceInfo &); |
2766 | bool emitBitOrIntAPS(const SourceInfo &); |
2767 | #endif |
2768 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2769 | [[nodiscard]] bool emitBitOr(PrimType, const SourceInfo &I); |
2770 | #endif |
2771 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
2772 | bool |
2773 | #if defined(GET_EVAL_IMPL) |
2774 | EvalEmitter |
2775 | #else |
2776 | ByteCodeEmitter |
2777 | #endif |
2778 | ::emitBitOr(PrimType T0, const SourceInfo &I) { |
2779 | switch (T0) { |
2780 | case PT_Sint8: |
2781 | return emitBitOrSint8(I); |
2782 | case PT_Uint8: |
2783 | return emitBitOrUint8(I); |
2784 | case PT_Sint16: |
2785 | return emitBitOrSint16(I); |
2786 | case PT_Uint16: |
2787 | return emitBitOrUint16(I); |
2788 | case PT_Sint32: |
2789 | return emitBitOrSint32(I); |
2790 | case PT_Uint32: |
2791 | return emitBitOrUint32(I); |
2792 | case PT_Sint64: |
2793 | return emitBitOrSint64(I); |
2794 | case PT_Uint64: |
2795 | return emitBitOrUint64(I); |
2796 | case PT_IntAP: |
2797 | return emitBitOrIntAP(I); |
2798 | case PT_IntAPS: |
2799 | return emitBitOrIntAPS(I); |
2800 | default: llvm_unreachable("invalid type: emitBitOr" ); |
2801 | } |
2802 | llvm_unreachable("invalid enum value" ); |
2803 | } |
2804 | #endif |
2805 | #ifdef GET_LINK_IMPL |
2806 | bool ByteCodeEmitter::emitBitOrSint8(const SourceInfo &L) { |
2807 | return emitOp<>(OP_BitOrSint8, L); |
2808 | } |
2809 | bool ByteCodeEmitter::emitBitOrUint8(const SourceInfo &L) { |
2810 | return emitOp<>(OP_BitOrUint8, L); |
2811 | } |
2812 | bool ByteCodeEmitter::emitBitOrSint16(const SourceInfo &L) { |
2813 | return emitOp<>(OP_BitOrSint16, L); |
2814 | } |
2815 | bool ByteCodeEmitter::emitBitOrUint16(const SourceInfo &L) { |
2816 | return emitOp<>(OP_BitOrUint16, L); |
2817 | } |
2818 | bool ByteCodeEmitter::emitBitOrSint32(const SourceInfo &L) { |
2819 | return emitOp<>(OP_BitOrSint32, L); |
2820 | } |
2821 | bool ByteCodeEmitter::emitBitOrUint32(const SourceInfo &L) { |
2822 | return emitOp<>(OP_BitOrUint32, L); |
2823 | } |
2824 | bool ByteCodeEmitter::emitBitOrSint64(const SourceInfo &L) { |
2825 | return emitOp<>(OP_BitOrSint64, L); |
2826 | } |
2827 | bool ByteCodeEmitter::emitBitOrUint64(const SourceInfo &L) { |
2828 | return emitOp<>(OP_BitOrUint64, L); |
2829 | } |
2830 | bool ByteCodeEmitter::emitBitOrIntAP(const SourceInfo &L) { |
2831 | return emitOp<>(OP_BitOrIntAP, L); |
2832 | } |
2833 | bool ByteCodeEmitter::emitBitOrIntAPS(const SourceInfo &L) { |
2834 | return emitOp<>(OP_BitOrIntAPS, L); |
2835 | } |
2836 | #endif |
2837 | #ifdef GET_EVAL_IMPL |
2838 | bool EvalEmitter::emitBitOrSint8(const SourceInfo &L) { |
2839 | if (!isActive()) return true; |
2840 | CurrentSource = L; |
2841 | return BitOr<PT_Sint8>(S, OpPC); |
2842 | } |
2843 | bool EvalEmitter::emitBitOrUint8(const SourceInfo &L) { |
2844 | if (!isActive()) return true; |
2845 | CurrentSource = L; |
2846 | return BitOr<PT_Uint8>(S, OpPC); |
2847 | } |
2848 | bool EvalEmitter::emitBitOrSint16(const SourceInfo &L) { |
2849 | if (!isActive()) return true; |
2850 | CurrentSource = L; |
2851 | return BitOr<PT_Sint16>(S, OpPC); |
2852 | } |
2853 | bool EvalEmitter::emitBitOrUint16(const SourceInfo &L) { |
2854 | if (!isActive()) return true; |
2855 | CurrentSource = L; |
2856 | return BitOr<PT_Uint16>(S, OpPC); |
2857 | } |
2858 | bool EvalEmitter::emitBitOrSint32(const SourceInfo &L) { |
2859 | if (!isActive()) return true; |
2860 | CurrentSource = L; |
2861 | return BitOr<PT_Sint32>(S, OpPC); |
2862 | } |
2863 | bool EvalEmitter::emitBitOrUint32(const SourceInfo &L) { |
2864 | if (!isActive()) return true; |
2865 | CurrentSource = L; |
2866 | return BitOr<PT_Uint32>(S, OpPC); |
2867 | } |
2868 | bool EvalEmitter::emitBitOrSint64(const SourceInfo &L) { |
2869 | if (!isActive()) return true; |
2870 | CurrentSource = L; |
2871 | return BitOr<PT_Sint64>(S, OpPC); |
2872 | } |
2873 | bool EvalEmitter::emitBitOrUint64(const SourceInfo &L) { |
2874 | if (!isActive()) return true; |
2875 | CurrentSource = L; |
2876 | return BitOr<PT_Uint64>(S, OpPC); |
2877 | } |
2878 | bool EvalEmitter::emitBitOrIntAP(const SourceInfo &L) { |
2879 | if (!isActive()) return true; |
2880 | CurrentSource = L; |
2881 | return BitOr<PT_IntAP>(S, OpPC); |
2882 | } |
2883 | bool EvalEmitter::emitBitOrIntAPS(const SourceInfo &L) { |
2884 | if (!isActive()) return true; |
2885 | CurrentSource = L; |
2886 | return BitOr<PT_IntAPS>(S, OpPC); |
2887 | } |
2888 | #endif |
2889 | #ifdef GET_OPCODE_NAMES |
2890 | OP_BitXorSint8, |
2891 | OP_BitXorUint8, |
2892 | OP_BitXorSint16, |
2893 | OP_BitXorUint16, |
2894 | OP_BitXorSint32, |
2895 | OP_BitXorUint32, |
2896 | OP_BitXorSint64, |
2897 | OP_BitXorUint64, |
2898 | OP_BitXorIntAP, |
2899 | OP_BitXorIntAPS, |
2900 | #endif |
2901 | #ifdef GET_INTERP |
2902 | case OP_BitXorSint8: { |
2903 | if (!BitXor<PT_Sint8>(S, OpPC)) |
2904 | return false; |
2905 | continue; |
2906 | } |
2907 | case OP_BitXorUint8: { |
2908 | if (!BitXor<PT_Uint8>(S, OpPC)) |
2909 | return false; |
2910 | continue; |
2911 | } |
2912 | case OP_BitXorSint16: { |
2913 | if (!BitXor<PT_Sint16>(S, OpPC)) |
2914 | return false; |
2915 | continue; |
2916 | } |
2917 | case OP_BitXorUint16: { |
2918 | if (!BitXor<PT_Uint16>(S, OpPC)) |
2919 | return false; |
2920 | continue; |
2921 | } |
2922 | case OP_BitXorSint32: { |
2923 | if (!BitXor<PT_Sint32>(S, OpPC)) |
2924 | return false; |
2925 | continue; |
2926 | } |
2927 | case OP_BitXorUint32: { |
2928 | if (!BitXor<PT_Uint32>(S, OpPC)) |
2929 | return false; |
2930 | continue; |
2931 | } |
2932 | case OP_BitXorSint64: { |
2933 | if (!BitXor<PT_Sint64>(S, OpPC)) |
2934 | return false; |
2935 | continue; |
2936 | } |
2937 | case OP_BitXorUint64: { |
2938 | if (!BitXor<PT_Uint64>(S, OpPC)) |
2939 | return false; |
2940 | continue; |
2941 | } |
2942 | case OP_BitXorIntAP: { |
2943 | if (!BitXor<PT_IntAP>(S, OpPC)) |
2944 | return false; |
2945 | continue; |
2946 | } |
2947 | case OP_BitXorIntAPS: { |
2948 | if (!BitXor<PT_IntAPS>(S, OpPC)) |
2949 | return false; |
2950 | continue; |
2951 | } |
2952 | #endif |
2953 | #ifdef GET_DISASM |
2954 | case OP_BitXorSint8: |
2955 | PrintName("BitXorSint8" ); |
2956 | OS << "\t" << "\n" ; |
2957 | continue; |
2958 | case OP_BitXorUint8: |
2959 | PrintName("BitXorUint8" ); |
2960 | OS << "\t" << "\n" ; |
2961 | continue; |
2962 | case OP_BitXorSint16: |
2963 | PrintName("BitXorSint16" ); |
2964 | OS << "\t" << "\n" ; |
2965 | continue; |
2966 | case OP_BitXorUint16: |
2967 | PrintName("BitXorUint16" ); |
2968 | OS << "\t" << "\n" ; |
2969 | continue; |
2970 | case OP_BitXorSint32: |
2971 | PrintName("BitXorSint32" ); |
2972 | OS << "\t" << "\n" ; |
2973 | continue; |
2974 | case OP_BitXorUint32: |
2975 | PrintName("BitXorUint32" ); |
2976 | OS << "\t" << "\n" ; |
2977 | continue; |
2978 | case OP_BitXorSint64: |
2979 | PrintName("BitXorSint64" ); |
2980 | OS << "\t" << "\n" ; |
2981 | continue; |
2982 | case OP_BitXorUint64: |
2983 | PrintName("BitXorUint64" ); |
2984 | OS << "\t" << "\n" ; |
2985 | continue; |
2986 | case OP_BitXorIntAP: |
2987 | PrintName("BitXorIntAP" ); |
2988 | OS << "\t" << "\n" ; |
2989 | continue; |
2990 | case OP_BitXorIntAPS: |
2991 | PrintName("BitXorIntAPS" ); |
2992 | OS << "\t" << "\n" ; |
2993 | continue; |
2994 | #endif |
2995 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
2996 | bool emitBitXorSint8(const SourceInfo &); |
2997 | bool emitBitXorUint8(const SourceInfo &); |
2998 | bool emitBitXorSint16(const SourceInfo &); |
2999 | bool emitBitXorUint16(const SourceInfo &); |
3000 | bool emitBitXorSint32(const SourceInfo &); |
3001 | bool emitBitXorUint32(const SourceInfo &); |
3002 | bool emitBitXorSint64(const SourceInfo &); |
3003 | bool emitBitXorUint64(const SourceInfo &); |
3004 | bool emitBitXorIntAP(const SourceInfo &); |
3005 | bool emitBitXorIntAPS(const SourceInfo &); |
3006 | #endif |
3007 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3008 | [[nodiscard]] bool emitBitXor(PrimType, const SourceInfo &I); |
3009 | #endif |
3010 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
3011 | bool |
3012 | #if defined(GET_EVAL_IMPL) |
3013 | EvalEmitter |
3014 | #else |
3015 | ByteCodeEmitter |
3016 | #endif |
3017 | ::emitBitXor(PrimType T0, const SourceInfo &I) { |
3018 | switch (T0) { |
3019 | case PT_Sint8: |
3020 | return emitBitXorSint8(I); |
3021 | case PT_Uint8: |
3022 | return emitBitXorUint8(I); |
3023 | case PT_Sint16: |
3024 | return emitBitXorSint16(I); |
3025 | case PT_Uint16: |
3026 | return emitBitXorUint16(I); |
3027 | case PT_Sint32: |
3028 | return emitBitXorSint32(I); |
3029 | case PT_Uint32: |
3030 | return emitBitXorUint32(I); |
3031 | case PT_Sint64: |
3032 | return emitBitXorSint64(I); |
3033 | case PT_Uint64: |
3034 | return emitBitXorUint64(I); |
3035 | case PT_IntAP: |
3036 | return emitBitXorIntAP(I); |
3037 | case PT_IntAPS: |
3038 | return emitBitXorIntAPS(I); |
3039 | default: llvm_unreachable("invalid type: emitBitXor" ); |
3040 | } |
3041 | llvm_unreachable("invalid enum value" ); |
3042 | } |
3043 | #endif |
3044 | #ifdef GET_LINK_IMPL |
3045 | bool ByteCodeEmitter::emitBitXorSint8(const SourceInfo &L) { |
3046 | return emitOp<>(OP_BitXorSint8, L); |
3047 | } |
3048 | bool ByteCodeEmitter::emitBitXorUint8(const SourceInfo &L) { |
3049 | return emitOp<>(OP_BitXorUint8, L); |
3050 | } |
3051 | bool ByteCodeEmitter::emitBitXorSint16(const SourceInfo &L) { |
3052 | return emitOp<>(OP_BitXorSint16, L); |
3053 | } |
3054 | bool ByteCodeEmitter::emitBitXorUint16(const SourceInfo &L) { |
3055 | return emitOp<>(OP_BitXorUint16, L); |
3056 | } |
3057 | bool ByteCodeEmitter::emitBitXorSint32(const SourceInfo &L) { |
3058 | return emitOp<>(OP_BitXorSint32, L); |
3059 | } |
3060 | bool ByteCodeEmitter::emitBitXorUint32(const SourceInfo &L) { |
3061 | return emitOp<>(OP_BitXorUint32, L); |
3062 | } |
3063 | bool ByteCodeEmitter::emitBitXorSint64(const SourceInfo &L) { |
3064 | return emitOp<>(OP_BitXorSint64, L); |
3065 | } |
3066 | bool ByteCodeEmitter::emitBitXorUint64(const SourceInfo &L) { |
3067 | return emitOp<>(OP_BitXorUint64, L); |
3068 | } |
3069 | bool ByteCodeEmitter::emitBitXorIntAP(const SourceInfo &L) { |
3070 | return emitOp<>(OP_BitXorIntAP, L); |
3071 | } |
3072 | bool ByteCodeEmitter::emitBitXorIntAPS(const SourceInfo &L) { |
3073 | return emitOp<>(OP_BitXorIntAPS, L); |
3074 | } |
3075 | #endif |
3076 | #ifdef GET_EVAL_IMPL |
3077 | bool EvalEmitter::emitBitXorSint8(const SourceInfo &L) { |
3078 | if (!isActive()) return true; |
3079 | CurrentSource = L; |
3080 | return BitXor<PT_Sint8>(S, OpPC); |
3081 | } |
3082 | bool EvalEmitter::emitBitXorUint8(const SourceInfo &L) { |
3083 | if (!isActive()) return true; |
3084 | CurrentSource = L; |
3085 | return BitXor<PT_Uint8>(S, OpPC); |
3086 | } |
3087 | bool EvalEmitter::emitBitXorSint16(const SourceInfo &L) { |
3088 | if (!isActive()) return true; |
3089 | CurrentSource = L; |
3090 | return BitXor<PT_Sint16>(S, OpPC); |
3091 | } |
3092 | bool EvalEmitter::emitBitXorUint16(const SourceInfo &L) { |
3093 | if (!isActive()) return true; |
3094 | CurrentSource = L; |
3095 | return BitXor<PT_Uint16>(S, OpPC); |
3096 | } |
3097 | bool EvalEmitter::emitBitXorSint32(const SourceInfo &L) { |
3098 | if (!isActive()) return true; |
3099 | CurrentSource = L; |
3100 | return BitXor<PT_Sint32>(S, OpPC); |
3101 | } |
3102 | bool EvalEmitter::emitBitXorUint32(const SourceInfo &L) { |
3103 | if (!isActive()) return true; |
3104 | CurrentSource = L; |
3105 | return BitXor<PT_Uint32>(S, OpPC); |
3106 | } |
3107 | bool EvalEmitter::emitBitXorSint64(const SourceInfo &L) { |
3108 | if (!isActive()) return true; |
3109 | CurrentSource = L; |
3110 | return BitXor<PT_Sint64>(S, OpPC); |
3111 | } |
3112 | bool EvalEmitter::emitBitXorUint64(const SourceInfo &L) { |
3113 | if (!isActive()) return true; |
3114 | CurrentSource = L; |
3115 | return BitXor<PT_Uint64>(S, OpPC); |
3116 | } |
3117 | bool EvalEmitter::emitBitXorIntAP(const SourceInfo &L) { |
3118 | if (!isActive()) return true; |
3119 | CurrentSource = L; |
3120 | return BitXor<PT_IntAP>(S, OpPC); |
3121 | } |
3122 | bool EvalEmitter::emitBitXorIntAPS(const SourceInfo &L) { |
3123 | if (!isActive()) return true; |
3124 | CurrentSource = L; |
3125 | return BitXor<PT_IntAPS>(S, OpPC); |
3126 | } |
3127 | #endif |
3128 | #ifdef GET_OPCODE_NAMES |
3129 | OP_CMP3Sint8, |
3130 | OP_CMP3Uint8, |
3131 | OP_CMP3Sint16, |
3132 | OP_CMP3Uint16, |
3133 | OP_CMP3Sint32, |
3134 | OP_CMP3Uint32, |
3135 | OP_CMP3Sint64, |
3136 | OP_CMP3Uint64, |
3137 | OP_CMP3IntAP, |
3138 | OP_CMP3IntAPS, |
3139 | OP_CMP3Bool, |
3140 | OP_CMP3Ptr, |
3141 | OP_CMP3Float, |
3142 | OP_CMP3FnPtr, |
3143 | #endif |
3144 | #ifdef GET_INTERP |
3145 | case OP_CMP3Sint8: { |
3146 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3147 | if (!CMP3<PT_Sint8>(S, OpPC, V0)) |
3148 | return false; |
3149 | continue; |
3150 | } |
3151 | case OP_CMP3Uint8: { |
3152 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3153 | if (!CMP3<PT_Uint8>(S, OpPC, V0)) |
3154 | return false; |
3155 | continue; |
3156 | } |
3157 | case OP_CMP3Sint16: { |
3158 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3159 | if (!CMP3<PT_Sint16>(S, OpPC, V0)) |
3160 | return false; |
3161 | continue; |
3162 | } |
3163 | case OP_CMP3Uint16: { |
3164 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3165 | if (!CMP3<PT_Uint16>(S, OpPC, V0)) |
3166 | return false; |
3167 | continue; |
3168 | } |
3169 | case OP_CMP3Sint32: { |
3170 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3171 | if (!CMP3<PT_Sint32>(S, OpPC, V0)) |
3172 | return false; |
3173 | continue; |
3174 | } |
3175 | case OP_CMP3Uint32: { |
3176 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3177 | if (!CMP3<PT_Uint32>(S, OpPC, V0)) |
3178 | return false; |
3179 | continue; |
3180 | } |
3181 | case OP_CMP3Sint64: { |
3182 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3183 | if (!CMP3<PT_Sint64>(S, OpPC, V0)) |
3184 | return false; |
3185 | continue; |
3186 | } |
3187 | case OP_CMP3Uint64: { |
3188 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3189 | if (!CMP3<PT_Uint64>(S, OpPC, V0)) |
3190 | return false; |
3191 | continue; |
3192 | } |
3193 | case OP_CMP3IntAP: { |
3194 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3195 | if (!CMP3<PT_IntAP>(S, OpPC, V0)) |
3196 | return false; |
3197 | continue; |
3198 | } |
3199 | case OP_CMP3IntAPS: { |
3200 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3201 | if (!CMP3<PT_IntAPS>(S, OpPC, V0)) |
3202 | return false; |
3203 | continue; |
3204 | } |
3205 | case OP_CMP3Bool: { |
3206 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3207 | if (!CMP3<PT_Bool>(S, OpPC, V0)) |
3208 | return false; |
3209 | continue; |
3210 | } |
3211 | case OP_CMP3Ptr: { |
3212 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3213 | if (!CMP3<PT_Ptr>(S, OpPC, V0)) |
3214 | return false; |
3215 | continue; |
3216 | } |
3217 | case OP_CMP3Float: { |
3218 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3219 | if (!CMP3<PT_Float>(S, OpPC, V0)) |
3220 | return false; |
3221 | continue; |
3222 | } |
3223 | case OP_CMP3FnPtr: { |
3224 | const auto V0 = ReadArg<const ComparisonCategoryInfo *>(S, PC); |
3225 | if (!CMP3<PT_FnPtr>(S, OpPC, V0)) |
3226 | return false; |
3227 | continue; |
3228 | } |
3229 | #endif |
3230 | #ifdef GET_DISASM |
3231 | case OP_CMP3Sint8: |
3232 | PrintName("CMP3Sint8" ); |
3233 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3234 | continue; |
3235 | case OP_CMP3Uint8: |
3236 | PrintName("CMP3Uint8" ); |
3237 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3238 | continue; |
3239 | case OP_CMP3Sint16: |
3240 | PrintName("CMP3Sint16" ); |
3241 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3242 | continue; |
3243 | case OP_CMP3Uint16: |
3244 | PrintName("CMP3Uint16" ); |
3245 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3246 | continue; |
3247 | case OP_CMP3Sint32: |
3248 | PrintName("CMP3Sint32" ); |
3249 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3250 | continue; |
3251 | case OP_CMP3Uint32: |
3252 | PrintName("CMP3Uint32" ); |
3253 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3254 | continue; |
3255 | case OP_CMP3Sint64: |
3256 | PrintName("CMP3Sint64" ); |
3257 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3258 | continue; |
3259 | case OP_CMP3Uint64: |
3260 | PrintName("CMP3Uint64" ); |
3261 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3262 | continue; |
3263 | case OP_CMP3IntAP: |
3264 | PrintName("CMP3IntAP" ); |
3265 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3266 | continue; |
3267 | case OP_CMP3IntAPS: |
3268 | PrintName("CMP3IntAPS" ); |
3269 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3270 | continue; |
3271 | case OP_CMP3Bool: |
3272 | PrintName("CMP3Bool" ); |
3273 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3274 | continue; |
3275 | case OP_CMP3Ptr: |
3276 | PrintName("CMP3Ptr" ); |
3277 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3278 | continue; |
3279 | case OP_CMP3Float: |
3280 | PrintName("CMP3Float" ); |
3281 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3282 | continue; |
3283 | case OP_CMP3FnPtr: |
3284 | PrintName("CMP3FnPtr" ); |
3285 | OS << "\t" << ReadArg<const ComparisonCategoryInfo *>(P, PC) << " " << "\n" ; |
3286 | continue; |
3287 | #endif |
3288 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3289 | bool emitCMP3Sint8( const ComparisonCategoryInfo * , const SourceInfo &); |
3290 | bool emitCMP3Uint8( const ComparisonCategoryInfo * , const SourceInfo &); |
3291 | bool emitCMP3Sint16( const ComparisonCategoryInfo * , const SourceInfo &); |
3292 | bool emitCMP3Uint16( const ComparisonCategoryInfo * , const SourceInfo &); |
3293 | bool emitCMP3Sint32( const ComparisonCategoryInfo * , const SourceInfo &); |
3294 | bool emitCMP3Uint32( const ComparisonCategoryInfo * , const SourceInfo &); |
3295 | bool emitCMP3Sint64( const ComparisonCategoryInfo * , const SourceInfo &); |
3296 | bool emitCMP3Uint64( const ComparisonCategoryInfo * , const SourceInfo &); |
3297 | bool emitCMP3IntAP( const ComparisonCategoryInfo * , const SourceInfo &); |
3298 | bool emitCMP3IntAPS( const ComparisonCategoryInfo * , const SourceInfo &); |
3299 | bool emitCMP3Bool( const ComparisonCategoryInfo * , const SourceInfo &); |
3300 | bool emitCMP3Ptr( const ComparisonCategoryInfo * , const SourceInfo &); |
3301 | bool emitCMP3Float( const ComparisonCategoryInfo * , const SourceInfo &); |
3302 | bool emitCMP3FnPtr( const ComparisonCategoryInfo * , const SourceInfo &); |
3303 | #endif |
3304 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3305 | [[nodiscard]] bool emitCMP3(PrimType, const ComparisonCategoryInfo *, const SourceInfo &I); |
3306 | #endif |
3307 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
3308 | bool |
3309 | #if defined(GET_EVAL_IMPL) |
3310 | EvalEmitter |
3311 | #else |
3312 | ByteCodeEmitter |
3313 | #endif |
3314 | ::emitCMP3(PrimType T0, const ComparisonCategoryInfo * A0, const SourceInfo &I) { |
3315 | switch (T0) { |
3316 | case PT_Sint8: |
3317 | return emitCMP3Sint8(A0, I); |
3318 | case PT_Uint8: |
3319 | return emitCMP3Uint8(A0, I); |
3320 | case PT_Sint16: |
3321 | return emitCMP3Sint16(A0, I); |
3322 | case PT_Uint16: |
3323 | return emitCMP3Uint16(A0, I); |
3324 | case PT_Sint32: |
3325 | return emitCMP3Sint32(A0, I); |
3326 | case PT_Uint32: |
3327 | return emitCMP3Uint32(A0, I); |
3328 | case PT_Sint64: |
3329 | return emitCMP3Sint64(A0, I); |
3330 | case PT_Uint64: |
3331 | return emitCMP3Uint64(A0, I); |
3332 | case PT_IntAP: |
3333 | return emitCMP3IntAP(A0, I); |
3334 | case PT_IntAPS: |
3335 | return emitCMP3IntAPS(A0, I); |
3336 | case PT_Bool: |
3337 | return emitCMP3Bool(A0, I); |
3338 | case PT_Ptr: |
3339 | return emitCMP3Ptr(A0, I); |
3340 | case PT_Float: |
3341 | return emitCMP3Float(A0, I); |
3342 | case PT_FnPtr: |
3343 | return emitCMP3FnPtr(A0, I); |
3344 | default: llvm_unreachable("invalid type: emitCMP3" ); |
3345 | } |
3346 | llvm_unreachable("invalid enum value" ); |
3347 | } |
3348 | #endif |
3349 | #ifdef GET_LINK_IMPL |
3350 | bool ByteCodeEmitter::emitCMP3Sint8( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3351 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Sint8, A0, L); |
3352 | } |
3353 | bool ByteCodeEmitter::emitCMP3Uint8( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3354 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Uint8, A0, L); |
3355 | } |
3356 | bool ByteCodeEmitter::emitCMP3Sint16( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3357 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Sint16, A0, L); |
3358 | } |
3359 | bool ByteCodeEmitter::emitCMP3Uint16( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3360 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Uint16, A0, L); |
3361 | } |
3362 | bool ByteCodeEmitter::emitCMP3Sint32( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3363 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Sint32, A0, L); |
3364 | } |
3365 | bool ByteCodeEmitter::emitCMP3Uint32( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3366 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Uint32, A0, L); |
3367 | } |
3368 | bool ByteCodeEmitter::emitCMP3Sint64( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3369 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Sint64, A0, L); |
3370 | } |
3371 | bool ByteCodeEmitter::emitCMP3Uint64( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3372 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Uint64, A0, L); |
3373 | } |
3374 | bool ByteCodeEmitter::emitCMP3IntAP( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3375 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3IntAP, A0, L); |
3376 | } |
3377 | bool ByteCodeEmitter::emitCMP3IntAPS( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3378 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3IntAPS, A0, L); |
3379 | } |
3380 | bool ByteCodeEmitter::emitCMP3Bool( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3381 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Bool, A0, L); |
3382 | } |
3383 | bool ByteCodeEmitter::emitCMP3Ptr( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3384 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Ptr, A0, L); |
3385 | } |
3386 | bool ByteCodeEmitter::emitCMP3Float( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3387 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3Float, A0, L); |
3388 | } |
3389 | bool ByteCodeEmitter::emitCMP3FnPtr( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3390 | return emitOp<const ComparisonCategoryInfo *>(OP_CMP3FnPtr, A0, L); |
3391 | } |
3392 | #endif |
3393 | #ifdef GET_EVAL_IMPL |
3394 | bool EvalEmitter::emitCMP3Sint8( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3395 | if (!isActive()) return true; |
3396 | CurrentSource = L; |
3397 | return CMP3<PT_Sint8>(S, OpPC, A0); |
3398 | } |
3399 | bool EvalEmitter::emitCMP3Uint8( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3400 | if (!isActive()) return true; |
3401 | CurrentSource = L; |
3402 | return CMP3<PT_Uint8>(S, OpPC, A0); |
3403 | } |
3404 | bool EvalEmitter::emitCMP3Sint16( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3405 | if (!isActive()) return true; |
3406 | CurrentSource = L; |
3407 | return CMP3<PT_Sint16>(S, OpPC, A0); |
3408 | } |
3409 | bool EvalEmitter::emitCMP3Uint16( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3410 | if (!isActive()) return true; |
3411 | CurrentSource = L; |
3412 | return CMP3<PT_Uint16>(S, OpPC, A0); |
3413 | } |
3414 | bool EvalEmitter::emitCMP3Sint32( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3415 | if (!isActive()) return true; |
3416 | CurrentSource = L; |
3417 | return CMP3<PT_Sint32>(S, OpPC, A0); |
3418 | } |
3419 | bool EvalEmitter::emitCMP3Uint32( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3420 | if (!isActive()) return true; |
3421 | CurrentSource = L; |
3422 | return CMP3<PT_Uint32>(S, OpPC, A0); |
3423 | } |
3424 | bool EvalEmitter::emitCMP3Sint64( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3425 | if (!isActive()) return true; |
3426 | CurrentSource = L; |
3427 | return CMP3<PT_Sint64>(S, OpPC, A0); |
3428 | } |
3429 | bool EvalEmitter::emitCMP3Uint64( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3430 | if (!isActive()) return true; |
3431 | CurrentSource = L; |
3432 | return CMP3<PT_Uint64>(S, OpPC, A0); |
3433 | } |
3434 | bool EvalEmitter::emitCMP3IntAP( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3435 | if (!isActive()) return true; |
3436 | CurrentSource = L; |
3437 | return CMP3<PT_IntAP>(S, OpPC, A0); |
3438 | } |
3439 | bool EvalEmitter::emitCMP3IntAPS( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3440 | if (!isActive()) return true; |
3441 | CurrentSource = L; |
3442 | return CMP3<PT_IntAPS>(S, OpPC, A0); |
3443 | } |
3444 | bool EvalEmitter::emitCMP3Bool( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3445 | if (!isActive()) return true; |
3446 | CurrentSource = L; |
3447 | return CMP3<PT_Bool>(S, OpPC, A0); |
3448 | } |
3449 | bool EvalEmitter::emitCMP3Ptr( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3450 | if (!isActive()) return true; |
3451 | CurrentSource = L; |
3452 | return CMP3<PT_Ptr>(S, OpPC, A0); |
3453 | } |
3454 | bool EvalEmitter::emitCMP3Float( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3455 | if (!isActive()) return true; |
3456 | CurrentSource = L; |
3457 | return CMP3<PT_Float>(S, OpPC, A0); |
3458 | } |
3459 | bool EvalEmitter::emitCMP3FnPtr( const ComparisonCategoryInfo * A0, const SourceInfo &L) { |
3460 | if (!isActive()) return true; |
3461 | CurrentSource = L; |
3462 | return CMP3<PT_FnPtr>(S, OpPC, A0); |
3463 | } |
3464 | #endif |
3465 | #ifdef GET_OPCODE_NAMES |
3466 | OP_Call, |
3467 | #endif |
3468 | #ifdef GET_INTERP |
3469 | case OP_Call: { |
3470 | const auto V0 = ReadArg<const Function *>(S, PC); |
3471 | const auto V1 = ReadArg<uint32_t>(S, PC); |
3472 | if (!Call(S, OpPC, V0, V1)) |
3473 | return false; |
3474 | continue; |
3475 | } |
3476 | #endif |
3477 | #ifdef GET_DISASM |
3478 | case OP_Call: |
3479 | PrintName("Call" ); |
3480 | OS << "\t" << ReadArg<const Function *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
3481 | continue; |
3482 | #endif |
3483 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3484 | bool emitCall( const Function * , uint32_t , const SourceInfo &); |
3485 | #endif |
3486 | #ifdef GET_LINK_IMPL |
3487 | bool ByteCodeEmitter::emitCall( const Function * A0, uint32_t A1, const SourceInfo &L) { |
3488 | return emitOp<const Function *, uint32_t>(OP_Call, A0, A1, L); |
3489 | } |
3490 | #endif |
3491 | #ifdef GET_EVAL_IMPL |
3492 | bool EvalEmitter::emitCall( const Function * A0, uint32_t A1, const SourceInfo &L) { |
3493 | if (!isActive()) return true; |
3494 | CurrentSource = L; |
3495 | return Call(S, OpPC, A0, A1); |
3496 | } |
3497 | #endif |
3498 | #ifdef GET_OPCODE_NAMES |
3499 | OP_CallBI, |
3500 | #endif |
3501 | #ifdef GET_INTERP |
3502 | case OP_CallBI: { |
3503 | const auto V0 = ReadArg<const Function *>(S, PC); |
3504 | const auto V1 = ReadArg<const CallExpr *>(S, PC); |
3505 | if (!CallBI(S, OpPC, V0, V1)) |
3506 | return false; |
3507 | continue; |
3508 | } |
3509 | #endif |
3510 | #ifdef GET_DISASM |
3511 | case OP_CallBI: |
3512 | PrintName("CallBI" ); |
3513 | OS << "\t" << ReadArg<const Function *>(P, PC) << " " << ReadArg<const CallExpr *>(P, PC) << " " << "\n" ; |
3514 | continue; |
3515 | #endif |
3516 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3517 | bool emitCallBI( const Function * , const CallExpr * , const SourceInfo &); |
3518 | #endif |
3519 | #ifdef GET_LINK_IMPL |
3520 | bool ByteCodeEmitter::emitCallBI( const Function * A0, const CallExpr * A1, const SourceInfo &L) { |
3521 | return emitOp<const Function *, const CallExpr *>(OP_CallBI, A0, A1, L); |
3522 | } |
3523 | #endif |
3524 | #ifdef GET_EVAL_IMPL |
3525 | bool EvalEmitter::emitCallBI( const Function * A0, const CallExpr * A1, const SourceInfo &L) { |
3526 | if (!isActive()) return true; |
3527 | CurrentSource = L; |
3528 | return CallBI(S, OpPC, A0, A1); |
3529 | } |
3530 | #endif |
3531 | #ifdef GET_OPCODE_NAMES |
3532 | OP_CallPtr, |
3533 | #endif |
3534 | #ifdef GET_INTERP |
3535 | case OP_CallPtr: { |
3536 | const auto V0 = ReadArg<uint32_t>(S, PC); |
3537 | const auto V1 = ReadArg<const CallExpr *>(S, PC); |
3538 | if (!CallPtr(S, OpPC, V0, V1)) |
3539 | return false; |
3540 | continue; |
3541 | } |
3542 | #endif |
3543 | #ifdef GET_DISASM |
3544 | case OP_CallPtr: |
3545 | PrintName("CallPtr" ); |
3546 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const CallExpr *>(P, PC) << " " << "\n" ; |
3547 | continue; |
3548 | #endif |
3549 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3550 | bool emitCallPtr( uint32_t , const CallExpr * , const SourceInfo &); |
3551 | #endif |
3552 | #ifdef GET_LINK_IMPL |
3553 | bool ByteCodeEmitter::emitCallPtr( uint32_t A0, const CallExpr * A1, const SourceInfo &L) { |
3554 | return emitOp<uint32_t, const CallExpr *>(OP_CallPtr, A0, A1, L); |
3555 | } |
3556 | #endif |
3557 | #ifdef GET_EVAL_IMPL |
3558 | bool EvalEmitter::emitCallPtr( uint32_t A0, const CallExpr * A1, const SourceInfo &L) { |
3559 | if (!isActive()) return true; |
3560 | CurrentSource = L; |
3561 | return CallPtr(S, OpPC, A0, A1); |
3562 | } |
3563 | #endif |
3564 | #ifdef GET_OPCODE_NAMES |
3565 | OP_CallVar, |
3566 | #endif |
3567 | #ifdef GET_INTERP |
3568 | case OP_CallVar: { |
3569 | const auto V0 = ReadArg<const Function *>(S, PC); |
3570 | const auto V1 = ReadArg<uint32_t>(S, PC); |
3571 | if (!CallVar(S, OpPC, V0, V1)) |
3572 | return false; |
3573 | continue; |
3574 | } |
3575 | #endif |
3576 | #ifdef GET_DISASM |
3577 | case OP_CallVar: |
3578 | PrintName("CallVar" ); |
3579 | OS << "\t" << ReadArg<const Function *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
3580 | continue; |
3581 | #endif |
3582 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3583 | bool emitCallVar( const Function * , uint32_t , const SourceInfo &); |
3584 | #endif |
3585 | #ifdef GET_LINK_IMPL |
3586 | bool ByteCodeEmitter::emitCallVar( const Function * A0, uint32_t A1, const SourceInfo &L) { |
3587 | return emitOp<const Function *, uint32_t>(OP_CallVar, A0, A1, L); |
3588 | } |
3589 | #endif |
3590 | #ifdef GET_EVAL_IMPL |
3591 | bool EvalEmitter::emitCallVar( const Function * A0, uint32_t A1, const SourceInfo &L) { |
3592 | if (!isActive()) return true; |
3593 | CurrentSource = L; |
3594 | return CallVar(S, OpPC, A0, A1); |
3595 | } |
3596 | #endif |
3597 | #ifdef GET_OPCODE_NAMES |
3598 | OP_CallVirt, |
3599 | #endif |
3600 | #ifdef GET_INTERP |
3601 | case OP_CallVirt: { |
3602 | const auto V0 = ReadArg<const Function *>(S, PC); |
3603 | const auto V1 = ReadArg<uint32_t>(S, PC); |
3604 | if (!CallVirt(S, OpPC, V0, V1)) |
3605 | return false; |
3606 | continue; |
3607 | } |
3608 | #endif |
3609 | #ifdef GET_DISASM |
3610 | case OP_CallVirt: |
3611 | PrintName("CallVirt" ); |
3612 | OS << "\t" << ReadArg<const Function *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
3613 | continue; |
3614 | #endif |
3615 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
3616 | bool emitCallVirt( const Function * , uint32_t , const SourceInfo &); |
3617 | #endif |
3618 | #ifdef GET_LINK_IMPL |
3619 | bool ByteCodeEmitter::emitCallVirt( const Function * A0, uint32_t A1, const SourceInfo &L) { |
3620 | return emitOp<const Function *, uint32_t>(OP_CallVirt, A0, A1, L); |
3621 | } |
3622 | #endif |
3623 | #ifdef GET_EVAL_IMPL |
3624 | bool EvalEmitter::emitCallVirt( const Function * A0, uint32_t A1, const SourceInfo &L) { |
3625 | if (!isActive()) return true; |
3626 | CurrentSource = L; |
3627 | return CallVirt(S, OpPC, A0, A1); |
3628 | } |
3629 | #endif |
3630 | #ifdef GET_OPCODE_NAMES |
3631 | OP_CastUint8Uint8, |
3632 | OP_CastUint8Sint8, |
3633 | OP_CastUint8Uint16, |
3634 | OP_CastUint8Sint16, |
3635 | OP_CastUint8Uint32, |
3636 | OP_CastUint8Sint32, |
3637 | OP_CastUint8Uint64, |
3638 | OP_CastUint8Sint64, |
3639 | OP_CastUint8Bool, |
3640 | OP_CastSint8Uint8, |
3641 | OP_CastSint8Sint8, |
3642 | OP_CastSint8Uint16, |
3643 | OP_CastSint8Sint16, |
3644 | OP_CastSint8Uint32, |
3645 | OP_CastSint8Sint32, |
3646 | OP_CastSint8Uint64, |
3647 | OP_CastSint8Sint64, |
3648 | OP_CastSint8Bool, |
3649 | OP_CastUint16Uint8, |
3650 | OP_CastUint16Sint8, |
3651 | OP_CastUint16Uint16, |
3652 | OP_CastUint16Sint16, |
3653 | OP_CastUint16Uint32, |
3654 | OP_CastUint16Sint32, |
3655 | OP_CastUint16Uint64, |
3656 | OP_CastUint16Sint64, |
3657 | OP_CastUint16Bool, |
3658 | OP_CastSint16Uint8, |
3659 | OP_CastSint16Sint8, |
3660 | OP_CastSint16Uint16, |
3661 | OP_CastSint16Sint16, |
3662 | OP_CastSint16Uint32, |
3663 | OP_CastSint16Sint32, |
3664 | OP_CastSint16Uint64, |
3665 | OP_CastSint16Sint64, |
3666 | OP_CastSint16Bool, |
3667 | OP_CastUint32Uint8, |
3668 | OP_CastUint32Sint8, |
3669 | OP_CastUint32Uint16, |
3670 | OP_CastUint32Sint16, |
3671 | OP_CastUint32Uint32, |
3672 | OP_CastUint32Sint32, |
3673 | OP_CastUint32Uint64, |
3674 | OP_CastUint32Sint64, |
3675 | OP_CastUint32Bool, |
3676 | OP_CastSint32Uint8, |
3677 | OP_CastSint32Sint8, |
3678 | OP_CastSint32Uint16, |
3679 | OP_CastSint32Sint16, |
3680 | OP_CastSint32Uint32, |
3681 | OP_CastSint32Sint32, |
3682 | OP_CastSint32Uint64, |
3683 | OP_CastSint32Sint64, |
3684 | OP_CastSint32Bool, |
3685 | OP_CastUint64Uint8, |
3686 | OP_CastUint64Sint8, |
3687 | OP_CastUint64Uint16, |
3688 | OP_CastUint64Sint16, |
3689 | OP_CastUint64Uint32, |
3690 | OP_CastUint64Sint32, |
3691 | OP_CastUint64Uint64, |
3692 | OP_CastUint64Sint64, |
3693 | OP_CastUint64Bool, |
3694 | OP_CastSint64Uint8, |
3695 | OP_CastSint64Sint8, |
3696 | OP_CastSint64Uint16, |
3697 | OP_CastSint64Sint16, |
3698 | OP_CastSint64Uint32, |
3699 | OP_CastSint64Sint32, |
3700 | OP_CastSint64Uint64, |
3701 | OP_CastSint64Sint64, |
3702 | OP_CastSint64Bool, |
3703 | OP_CastBoolUint8, |
3704 | OP_CastBoolSint8, |
3705 | OP_CastBoolUint16, |
3706 | OP_CastBoolSint16, |
3707 | OP_CastBoolUint32, |
3708 | OP_CastBoolSint32, |
3709 | OP_CastBoolUint64, |
3710 | OP_CastBoolSint64, |
3711 | OP_CastBoolBool, |
3712 | OP_CastIntAPUint8, |
3713 | OP_CastIntAPSint8, |
3714 | OP_CastIntAPUint16, |
3715 | OP_CastIntAPSint16, |
3716 | OP_CastIntAPUint32, |
3717 | OP_CastIntAPSint32, |
3718 | OP_CastIntAPUint64, |
3719 | OP_CastIntAPSint64, |
3720 | OP_CastIntAPBool, |
3721 | OP_CastIntAPSUint8, |
3722 | OP_CastIntAPSSint8, |
3723 | OP_CastIntAPSUint16, |
3724 | OP_CastIntAPSSint16, |
3725 | OP_CastIntAPSUint32, |
3726 | OP_CastIntAPSSint32, |
3727 | OP_CastIntAPSUint64, |
3728 | OP_CastIntAPSSint64, |
3729 | OP_CastIntAPSBool, |
3730 | #endif |
3731 | #ifdef GET_INTERP |
3732 | case OP_CastUint8Uint8: { |
3733 | if (!Cast<PT_Uint8, PT_Uint8>(S, OpPC)) |
3734 | return false; |
3735 | continue; |
3736 | } |
3737 | case OP_CastUint8Sint8: { |
3738 | if (!Cast<PT_Uint8, PT_Sint8>(S, OpPC)) |
3739 | return false; |
3740 | continue; |
3741 | } |
3742 | case OP_CastUint8Uint16: { |
3743 | if (!Cast<PT_Uint8, PT_Uint16>(S, OpPC)) |
3744 | return false; |
3745 | continue; |
3746 | } |
3747 | case OP_CastUint8Sint16: { |
3748 | if (!Cast<PT_Uint8, PT_Sint16>(S, OpPC)) |
3749 | return false; |
3750 | continue; |
3751 | } |
3752 | case OP_CastUint8Uint32: { |
3753 | if (!Cast<PT_Uint8, PT_Uint32>(S, OpPC)) |
3754 | return false; |
3755 | continue; |
3756 | } |
3757 | case OP_CastUint8Sint32: { |
3758 | if (!Cast<PT_Uint8, PT_Sint32>(S, OpPC)) |
3759 | return false; |
3760 | continue; |
3761 | } |
3762 | case OP_CastUint8Uint64: { |
3763 | if (!Cast<PT_Uint8, PT_Uint64>(S, OpPC)) |
3764 | return false; |
3765 | continue; |
3766 | } |
3767 | case OP_CastUint8Sint64: { |
3768 | if (!Cast<PT_Uint8, PT_Sint64>(S, OpPC)) |
3769 | return false; |
3770 | continue; |
3771 | } |
3772 | case OP_CastUint8Bool: { |
3773 | if (!Cast<PT_Uint8, PT_Bool>(S, OpPC)) |
3774 | return false; |
3775 | continue; |
3776 | } |
3777 | case OP_CastSint8Uint8: { |
3778 | if (!Cast<PT_Sint8, PT_Uint8>(S, OpPC)) |
3779 | return false; |
3780 | continue; |
3781 | } |
3782 | case OP_CastSint8Sint8: { |
3783 | if (!Cast<PT_Sint8, PT_Sint8>(S, OpPC)) |
3784 | return false; |
3785 | continue; |
3786 | } |
3787 | case OP_CastSint8Uint16: { |
3788 | if (!Cast<PT_Sint8, PT_Uint16>(S, OpPC)) |
3789 | return false; |
3790 | continue; |
3791 | } |
3792 | case OP_CastSint8Sint16: { |
3793 | if (!Cast<PT_Sint8, PT_Sint16>(S, OpPC)) |
3794 | return false; |
3795 | continue; |
3796 | } |
3797 | case OP_CastSint8Uint32: { |
3798 | if (!Cast<PT_Sint8, PT_Uint32>(S, OpPC)) |
3799 | return false; |
3800 | continue; |
3801 | } |
3802 | case OP_CastSint8Sint32: { |
3803 | if (!Cast<PT_Sint8, PT_Sint32>(S, OpPC)) |
3804 | return false; |
3805 | continue; |
3806 | } |
3807 | case OP_CastSint8Uint64: { |
3808 | if (!Cast<PT_Sint8, PT_Uint64>(S, OpPC)) |
3809 | return false; |
3810 | continue; |
3811 | } |
3812 | case OP_CastSint8Sint64: { |
3813 | if (!Cast<PT_Sint8, PT_Sint64>(S, OpPC)) |
3814 | return false; |
3815 | continue; |
3816 | } |
3817 | case OP_CastSint8Bool: { |
3818 | if (!Cast<PT_Sint8, PT_Bool>(S, OpPC)) |
3819 | return false; |
3820 | continue; |
3821 | } |
3822 | case OP_CastUint16Uint8: { |
3823 | if (!Cast<PT_Uint16, PT_Uint8>(S, OpPC)) |
3824 | return false; |
3825 | continue; |
3826 | } |
3827 | case OP_CastUint16Sint8: { |
3828 | if (!Cast<PT_Uint16, PT_Sint8>(S, OpPC)) |
3829 | return false; |
3830 | continue; |
3831 | } |
3832 | case OP_CastUint16Uint16: { |
3833 | if (!Cast<PT_Uint16, PT_Uint16>(S, OpPC)) |
3834 | return false; |
3835 | continue; |
3836 | } |
3837 | case OP_CastUint16Sint16: { |
3838 | if (!Cast<PT_Uint16, PT_Sint16>(S, OpPC)) |
3839 | return false; |
3840 | continue; |
3841 | } |
3842 | case OP_CastUint16Uint32: { |
3843 | if (!Cast<PT_Uint16, PT_Uint32>(S, OpPC)) |
3844 | return false; |
3845 | continue; |
3846 | } |
3847 | case OP_CastUint16Sint32: { |
3848 | if (!Cast<PT_Uint16, PT_Sint32>(S, OpPC)) |
3849 | return false; |
3850 | continue; |
3851 | } |
3852 | case OP_CastUint16Uint64: { |
3853 | if (!Cast<PT_Uint16, PT_Uint64>(S, OpPC)) |
3854 | return false; |
3855 | continue; |
3856 | } |
3857 | case OP_CastUint16Sint64: { |
3858 | if (!Cast<PT_Uint16, PT_Sint64>(S, OpPC)) |
3859 | return false; |
3860 | continue; |
3861 | } |
3862 | case OP_CastUint16Bool: { |
3863 | if (!Cast<PT_Uint16, PT_Bool>(S, OpPC)) |
3864 | return false; |
3865 | continue; |
3866 | } |
3867 | case OP_CastSint16Uint8: { |
3868 | if (!Cast<PT_Sint16, PT_Uint8>(S, OpPC)) |
3869 | return false; |
3870 | continue; |
3871 | } |
3872 | case OP_CastSint16Sint8: { |
3873 | if (!Cast<PT_Sint16, PT_Sint8>(S, OpPC)) |
3874 | return false; |
3875 | continue; |
3876 | } |
3877 | case OP_CastSint16Uint16: { |
3878 | if (!Cast<PT_Sint16, PT_Uint16>(S, OpPC)) |
3879 | return false; |
3880 | continue; |
3881 | } |
3882 | case OP_CastSint16Sint16: { |
3883 | if (!Cast<PT_Sint16, PT_Sint16>(S, OpPC)) |
3884 | return false; |
3885 | continue; |
3886 | } |
3887 | case OP_CastSint16Uint32: { |
3888 | if (!Cast<PT_Sint16, PT_Uint32>(S, OpPC)) |
3889 | return false; |
3890 | continue; |
3891 | } |
3892 | case OP_CastSint16Sint32: { |
3893 | if (!Cast<PT_Sint16, PT_Sint32>(S, OpPC)) |
3894 | return false; |
3895 | continue; |
3896 | } |
3897 | case OP_CastSint16Uint64: { |
3898 | if (!Cast<PT_Sint16, PT_Uint64>(S, OpPC)) |
3899 | return false; |
3900 | continue; |
3901 | } |
3902 | case OP_CastSint16Sint64: { |
3903 | if (!Cast<PT_Sint16, PT_Sint64>(S, OpPC)) |
3904 | return false; |
3905 | continue; |
3906 | } |
3907 | case OP_CastSint16Bool: { |
3908 | if (!Cast<PT_Sint16, PT_Bool>(S, OpPC)) |
3909 | return false; |
3910 | continue; |
3911 | } |
3912 | case OP_CastUint32Uint8: { |
3913 | if (!Cast<PT_Uint32, PT_Uint8>(S, OpPC)) |
3914 | return false; |
3915 | continue; |
3916 | } |
3917 | case OP_CastUint32Sint8: { |
3918 | if (!Cast<PT_Uint32, PT_Sint8>(S, OpPC)) |
3919 | return false; |
3920 | continue; |
3921 | } |
3922 | case OP_CastUint32Uint16: { |
3923 | if (!Cast<PT_Uint32, PT_Uint16>(S, OpPC)) |
3924 | return false; |
3925 | continue; |
3926 | } |
3927 | case OP_CastUint32Sint16: { |
3928 | if (!Cast<PT_Uint32, PT_Sint16>(S, OpPC)) |
3929 | return false; |
3930 | continue; |
3931 | } |
3932 | case OP_CastUint32Uint32: { |
3933 | if (!Cast<PT_Uint32, PT_Uint32>(S, OpPC)) |
3934 | return false; |
3935 | continue; |
3936 | } |
3937 | case OP_CastUint32Sint32: { |
3938 | if (!Cast<PT_Uint32, PT_Sint32>(S, OpPC)) |
3939 | return false; |
3940 | continue; |
3941 | } |
3942 | case OP_CastUint32Uint64: { |
3943 | if (!Cast<PT_Uint32, PT_Uint64>(S, OpPC)) |
3944 | return false; |
3945 | continue; |
3946 | } |
3947 | case OP_CastUint32Sint64: { |
3948 | if (!Cast<PT_Uint32, PT_Sint64>(S, OpPC)) |
3949 | return false; |
3950 | continue; |
3951 | } |
3952 | case OP_CastUint32Bool: { |
3953 | if (!Cast<PT_Uint32, PT_Bool>(S, OpPC)) |
3954 | return false; |
3955 | continue; |
3956 | } |
3957 | case OP_CastSint32Uint8: { |
3958 | if (!Cast<PT_Sint32, PT_Uint8>(S, OpPC)) |
3959 | return false; |
3960 | continue; |
3961 | } |
3962 | case OP_CastSint32Sint8: { |
3963 | if (!Cast<PT_Sint32, PT_Sint8>(S, OpPC)) |
3964 | return false; |
3965 | continue; |
3966 | } |
3967 | case OP_CastSint32Uint16: { |
3968 | if (!Cast<PT_Sint32, PT_Uint16>(S, OpPC)) |
3969 | return false; |
3970 | continue; |
3971 | } |
3972 | case OP_CastSint32Sint16: { |
3973 | if (!Cast<PT_Sint32, PT_Sint16>(S, OpPC)) |
3974 | return false; |
3975 | continue; |
3976 | } |
3977 | case OP_CastSint32Uint32: { |
3978 | if (!Cast<PT_Sint32, PT_Uint32>(S, OpPC)) |
3979 | return false; |
3980 | continue; |
3981 | } |
3982 | case OP_CastSint32Sint32: { |
3983 | if (!Cast<PT_Sint32, PT_Sint32>(S, OpPC)) |
3984 | return false; |
3985 | continue; |
3986 | } |
3987 | case OP_CastSint32Uint64: { |
3988 | if (!Cast<PT_Sint32, PT_Uint64>(S, OpPC)) |
3989 | return false; |
3990 | continue; |
3991 | } |
3992 | case OP_CastSint32Sint64: { |
3993 | if (!Cast<PT_Sint32, PT_Sint64>(S, OpPC)) |
3994 | return false; |
3995 | continue; |
3996 | } |
3997 | case OP_CastSint32Bool: { |
3998 | if (!Cast<PT_Sint32, PT_Bool>(S, OpPC)) |
3999 | return false; |
4000 | continue; |
4001 | } |
4002 | case OP_CastUint64Uint8: { |
4003 | if (!Cast<PT_Uint64, PT_Uint8>(S, OpPC)) |
4004 | return false; |
4005 | continue; |
4006 | } |
4007 | case OP_CastUint64Sint8: { |
4008 | if (!Cast<PT_Uint64, PT_Sint8>(S, OpPC)) |
4009 | return false; |
4010 | continue; |
4011 | } |
4012 | case OP_CastUint64Uint16: { |
4013 | if (!Cast<PT_Uint64, PT_Uint16>(S, OpPC)) |
4014 | return false; |
4015 | continue; |
4016 | } |
4017 | case OP_CastUint64Sint16: { |
4018 | if (!Cast<PT_Uint64, PT_Sint16>(S, OpPC)) |
4019 | return false; |
4020 | continue; |
4021 | } |
4022 | case OP_CastUint64Uint32: { |
4023 | if (!Cast<PT_Uint64, PT_Uint32>(S, OpPC)) |
4024 | return false; |
4025 | continue; |
4026 | } |
4027 | case OP_CastUint64Sint32: { |
4028 | if (!Cast<PT_Uint64, PT_Sint32>(S, OpPC)) |
4029 | return false; |
4030 | continue; |
4031 | } |
4032 | case OP_CastUint64Uint64: { |
4033 | if (!Cast<PT_Uint64, PT_Uint64>(S, OpPC)) |
4034 | return false; |
4035 | continue; |
4036 | } |
4037 | case OP_CastUint64Sint64: { |
4038 | if (!Cast<PT_Uint64, PT_Sint64>(S, OpPC)) |
4039 | return false; |
4040 | continue; |
4041 | } |
4042 | case OP_CastUint64Bool: { |
4043 | if (!Cast<PT_Uint64, PT_Bool>(S, OpPC)) |
4044 | return false; |
4045 | continue; |
4046 | } |
4047 | case OP_CastSint64Uint8: { |
4048 | if (!Cast<PT_Sint64, PT_Uint8>(S, OpPC)) |
4049 | return false; |
4050 | continue; |
4051 | } |
4052 | case OP_CastSint64Sint8: { |
4053 | if (!Cast<PT_Sint64, PT_Sint8>(S, OpPC)) |
4054 | return false; |
4055 | continue; |
4056 | } |
4057 | case OP_CastSint64Uint16: { |
4058 | if (!Cast<PT_Sint64, PT_Uint16>(S, OpPC)) |
4059 | return false; |
4060 | continue; |
4061 | } |
4062 | case OP_CastSint64Sint16: { |
4063 | if (!Cast<PT_Sint64, PT_Sint16>(S, OpPC)) |
4064 | return false; |
4065 | continue; |
4066 | } |
4067 | case OP_CastSint64Uint32: { |
4068 | if (!Cast<PT_Sint64, PT_Uint32>(S, OpPC)) |
4069 | return false; |
4070 | continue; |
4071 | } |
4072 | case OP_CastSint64Sint32: { |
4073 | if (!Cast<PT_Sint64, PT_Sint32>(S, OpPC)) |
4074 | return false; |
4075 | continue; |
4076 | } |
4077 | case OP_CastSint64Uint64: { |
4078 | if (!Cast<PT_Sint64, PT_Uint64>(S, OpPC)) |
4079 | return false; |
4080 | continue; |
4081 | } |
4082 | case OP_CastSint64Sint64: { |
4083 | if (!Cast<PT_Sint64, PT_Sint64>(S, OpPC)) |
4084 | return false; |
4085 | continue; |
4086 | } |
4087 | case OP_CastSint64Bool: { |
4088 | if (!Cast<PT_Sint64, PT_Bool>(S, OpPC)) |
4089 | return false; |
4090 | continue; |
4091 | } |
4092 | case OP_CastBoolUint8: { |
4093 | if (!Cast<PT_Bool, PT_Uint8>(S, OpPC)) |
4094 | return false; |
4095 | continue; |
4096 | } |
4097 | case OP_CastBoolSint8: { |
4098 | if (!Cast<PT_Bool, PT_Sint8>(S, OpPC)) |
4099 | return false; |
4100 | continue; |
4101 | } |
4102 | case OP_CastBoolUint16: { |
4103 | if (!Cast<PT_Bool, PT_Uint16>(S, OpPC)) |
4104 | return false; |
4105 | continue; |
4106 | } |
4107 | case OP_CastBoolSint16: { |
4108 | if (!Cast<PT_Bool, PT_Sint16>(S, OpPC)) |
4109 | return false; |
4110 | continue; |
4111 | } |
4112 | case OP_CastBoolUint32: { |
4113 | if (!Cast<PT_Bool, PT_Uint32>(S, OpPC)) |
4114 | return false; |
4115 | continue; |
4116 | } |
4117 | case OP_CastBoolSint32: { |
4118 | if (!Cast<PT_Bool, PT_Sint32>(S, OpPC)) |
4119 | return false; |
4120 | continue; |
4121 | } |
4122 | case OP_CastBoolUint64: { |
4123 | if (!Cast<PT_Bool, PT_Uint64>(S, OpPC)) |
4124 | return false; |
4125 | continue; |
4126 | } |
4127 | case OP_CastBoolSint64: { |
4128 | if (!Cast<PT_Bool, PT_Sint64>(S, OpPC)) |
4129 | return false; |
4130 | continue; |
4131 | } |
4132 | case OP_CastBoolBool: { |
4133 | if (!Cast<PT_Bool, PT_Bool>(S, OpPC)) |
4134 | return false; |
4135 | continue; |
4136 | } |
4137 | case OP_CastIntAPUint8: { |
4138 | if (!Cast<PT_IntAP, PT_Uint8>(S, OpPC)) |
4139 | return false; |
4140 | continue; |
4141 | } |
4142 | case OP_CastIntAPSint8: { |
4143 | if (!Cast<PT_IntAP, PT_Sint8>(S, OpPC)) |
4144 | return false; |
4145 | continue; |
4146 | } |
4147 | case OP_CastIntAPUint16: { |
4148 | if (!Cast<PT_IntAP, PT_Uint16>(S, OpPC)) |
4149 | return false; |
4150 | continue; |
4151 | } |
4152 | case OP_CastIntAPSint16: { |
4153 | if (!Cast<PT_IntAP, PT_Sint16>(S, OpPC)) |
4154 | return false; |
4155 | continue; |
4156 | } |
4157 | case OP_CastIntAPUint32: { |
4158 | if (!Cast<PT_IntAP, PT_Uint32>(S, OpPC)) |
4159 | return false; |
4160 | continue; |
4161 | } |
4162 | case OP_CastIntAPSint32: { |
4163 | if (!Cast<PT_IntAP, PT_Sint32>(S, OpPC)) |
4164 | return false; |
4165 | continue; |
4166 | } |
4167 | case OP_CastIntAPUint64: { |
4168 | if (!Cast<PT_IntAP, PT_Uint64>(S, OpPC)) |
4169 | return false; |
4170 | continue; |
4171 | } |
4172 | case OP_CastIntAPSint64: { |
4173 | if (!Cast<PT_IntAP, PT_Sint64>(S, OpPC)) |
4174 | return false; |
4175 | continue; |
4176 | } |
4177 | case OP_CastIntAPBool: { |
4178 | if (!Cast<PT_IntAP, PT_Bool>(S, OpPC)) |
4179 | return false; |
4180 | continue; |
4181 | } |
4182 | case OP_CastIntAPSUint8: { |
4183 | if (!Cast<PT_IntAPS, PT_Uint8>(S, OpPC)) |
4184 | return false; |
4185 | continue; |
4186 | } |
4187 | case OP_CastIntAPSSint8: { |
4188 | if (!Cast<PT_IntAPS, PT_Sint8>(S, OpPC)) |
4189 | return false; |
4190 | continue; |
4191 | } |
4192 | case OP_CastIntAPSUint16: { |
4193 | if (!Cast<PT_IntAPS, PT_Uint16>(S, OpPC)) |
4194 | return false; |
4195 | continue; |
4196 | } |
4197 | case OP_CastIntAPSSint16: { |
4198 | if (!Cast<PT_IntAPS, PT_Sint16>(S, OpPC)) |
4199 | return false; |
4200 | continue; |
4201 | } |
4202 | case OP_CastIntAPSUint32: { |
4203 | if (!Cast<PT_IntAPS, PT_Uint32>(S, OpPC)) |
4204 | return false; |
4205 | continue; |
4206 | } |
4207 | case OP_CastIntAPSSint32: { |
4208 | if (!Cast<PT_IntAPS, PT_Sint32>(S, OpPC)) |
4209 | return false; |
4210 | continue; |
4211 | } |
4212 | case OP_CastIntAPSUint64: { |
4213 | if (!Cast<PT_IntAPS, PT_Uint64>(S, OpPC)) |
4214 | return false; |
4215 | continue; |
4216 | } |
4217 | case OP_CastIntAPSSint64: { |
4218 | if (!Cast<PT_IntAPS, PT_Sint64>(S, OpPC)) |
4219 | return false; |
4220 | continue; |
4221 | } |
4222 | case OP_CastIntAPSBool: { |
4223 | if (!Cast<PT_IntAPS, PT_Bool>(S, OpPC)) |
4224 | return false; |
4225 | continue; |
4226 | } |
4227 | #endif |
4228 | #ifdef GET_DISASM |
4229 | case OP_CastUint8Uint8: |
4230 | PrintName("CastUint8Uint8" ); |
4231 | OS << "\t" << "\n" ; |
4232 | continue; |
4233 | case OP_CastUint8Sint8: |
4234 | PrintName("CastUint8Sint8" ); |
4235 | OS << "\t" << "\n" ; |
4236 | continue; |
4237 | case OP_CastUint8Uint16: |
4238 | PrintName("CastUint8Uint16" ); |
4239 | OS << "\t" << "\n" ; |
4240 | continue; |
4241 | case OP_CastUint8Sint16: |
4242 | PrintName("CastUint8Sint16" ); |
4243 | OS << "\t" << "\n" ; |
4244 | continue; |
4245 | case OP_CastUint8Uint32: |
4246 | PrintName("CastUint8Uint32" ); |
4247 | OS << "\t" << "\n" ; |
4248 | continue; |
4249 | case OP_CastUint8Sint32: |
4250 | PrintName("CastUint8Sint32" ); |
4251 | OS << "\t" << "\n" ; |
4252 | continue; |
4253 | case OP_CastUint8Uint64: |
4254 | PrintName("CastUint8Uint64" ); |
4255 | OS << "\t" << "\n" ; |
4256 | continue; |
4257 | case OP_CastUint8Sint64: |
4258 | PrintName("CastUint8Sint64" ); |
4259 | OS << "\t" << "\n" ; |
4260 | continue; |
4261 | case OP_CastUint8Bool: |
4262 | PrintName("CastUint8Bool" ); |
4263 | OS << "\t" << "\n" ; |
4264 | continue; |
4265 | case OP_CastSint8Uint8: |
4266 | PrintName("CastSint8Uint8" ); |
4267 | OS << "\t" << "\n" ; |
4268 | continue; |
4269 | case OP_CastSint8Sint8: |
4270 | PrintName("CastSint8Sint8" ); |
4271 | OS << "\t" << "\n" ; |
4272 | continue; |
4273 | case OP_CastSint8Uint16: |
4274 | PrintName("CastSint8Uint16" ); |
4275 | OS << "\t" << "\n" ; |
4276 | continue; |
4277 | case OP_CastSint8Sint16: |
4278 | PrintName("CastSint8Sint16" ); |
4279 | OS << "\t" << "\n" ; |
4280 | continue; |
4281 | case OP_CastSint8Uint32: |
4282 | PrintName("CastSint8Uint32" ); |
4283 | OS << "\t" << "\n" ; |
4284 | continue; |
4285 | case OP_CastSint8Sint32: |
4286 | PrintName("CastSint8Sint32" ); |
4287 | OS << "\t" << "\n" ; |
4288 | continue; |
4289 | case OP_CastSint8Uint64: |
4290 | PrintName("CastSint8Uint64" ); |
4291 | OS << "\t" << "\n" ; |
4292 | continue; |
4293 | case OP_CastSint8Sint64: |
4294 | PrintName("CastSint8Sint64" ); |
4295 | OS << "\t" << "\n" ; |
4296 | continue; |
4297 | case OP_CastSint8Bool: |
4298 | PrintName("CastSint8Bool" ); |
4299 | OS << "\t" << "\n" ; |
4300 | continue; |
4301 | case OP_CastUint16Uint8: |
4302 | PrintName("CastUint16Uint8" ); |
4303 | OS << "\t" << "\n" ; |
4304 | continue; |
4305 | case OP_CastUint16Sint8: |
4306 | PrintName("CastUint16Sint8" ); |
4307 | OS << "\t" << "\n" ; |
4308 | continue; |
4309 | case OP_CastUint16Uint16: |
4310 | PrintName("CastUint16Uint16" ); |
4311 | OS << "\t" << "\n" ; |
4312 | continue; |
4313 | case OP_CastUint16Sint16: |
4314 | PrintName("CastUint16Sint16" ); |
4315 | OS << "\t" << "\n" ; |
4316 | continue; |
4317 | case OP_CastUint16Uint32: |
4318 | PrintName("CastUint16Uint32" ); |
4319 | OS << "\t" << "\n" ; |
4320 | continue; |
4321 | case OP_CastUint16Sint32: |
4322 | PrintName("CastUint16Sint32" ); |
4323 | OS << "\t" << "\n" ; |
4324 | continue; |
4325 | case OP_CastUint16Uint64: |
4326 | PrintName("CastUint16Uint64" ); |
4327 | OS << "\t" << "\n" ; |
4328 | continue; |
4329 | case OP_CastUint16Sint64: |
4330 | PrintName("CastUint16Sint64" ); |
4331 | OS << "\t" << "\n" ; |
4332 | continue; |
4333 | case OP_CastUint16Bool: |
4334 | PrintName("CastUint16Bool" ); |
4335 | OS << "\t" << "\n" ; |
4336 | continue; |
4337 | case OP_CastSint16Uint8: |
4338 | PrintName("CastSint16Uint8" ); |
4339 | OS << "\t" << "\n" ; |
4340 | continue; |
4341 | case OP_CastSint16Sint8: |
4342 | PrintName("CastSint16Sint8" ); |
4343 | OS << "\t" << "\n" ; |
4344 | continue; |
4345 | case OP_CastSint16Uint16: |
4346 | PrintName("CastSint16Uint16" ); |
4347 | OS << "\t" << "\n" ; |
4348 | continue; |
4349 | case OP_CastSint16Sint16: |
4350 | PrintName("CastSint16Sint16" ); |
4351 | OS << "\t" << "\n" ; |
4352 | continue; |
4353 | case OP_CastSint16Uint32: |
4354 | PrintName("CastSint16Uint32" ); |
4355 | OS << "\t" << "\n" ; |
4356 | continue; |
4357 | case OP_CastSint16Sint32: |
4358 | PrintName("CastSint16Sint32" ); |
4359 | OS << "\t" << "\n" ; |
4360 | continue; |
4361 | case OP_CastSint16Uint64: |
4362 | PrintName("CastSint16Uint64" ); |
4363 | OS << "\t" << "\n" ; |
4364 | continue; |
4365 | case OP_CastSint16Sint64: |
4366 | PrintName("CastSint16Sint64" ); |
4367 | OS << "\t" << "\n" ; |
4368 | continue; |
4369 | case OP_CastSint16Bool: |
4370 | PrintName("CastSint16Bool" ); |
4371 | OS << "\t" << "\n" ; |
4372 | continue; |
4373 | case OP_CastUint32Uint8: |
4374 | PrintName("CastUint32Uint8" ); |
4375 | OS << "\t" << "\n" ; |
4376 | continue; |
4377 | case OP_CastUint32Sint8: |
4378 | PrintName("CastUint32Sint8" ); |
4379 | OS << "\t" << "\n" ; |
4380 | continue; |
4381 | case OP_CastUint32Uint16: |
4382 | PrintName("CastUint32Uint16" ); |
4383 | OS << "\t" << "\n" ; |
4384 | continue; |
4385 | case OP_CastUint32Sint16: |
4386 | PrintName("CastUint32Sint16" ); |
4387 | OS << "\t" << "\n" ; |
4388 | continue; |
4389 | case OP_CastUint32Uint32: |
4390 | PrintName("CastUint32Uint32" ); |
4391 | OS << "\t" << "\n" ; |
4392 | continue; |
4393 | case OP_CastUint32Sint32: |
4394 | PrintName("CastUint32Sint32" ); |
4395 | OS << "\t" << "\n" ; |
4396 | continue; |
4397 | case OP_CastUint32Uint64: |
4398 | PrintName("CastUint32Uint64" ); |
4399 | OS << "\t" << "\n" ; |
4400 | continue; |
4401 | case OP_CastUint32Sint64: |
4402 | PrintName("CastUint32Sint64" ); |
4403 | OS << "\t" << "\n" ; |
4404 | continue; |
4405 | case OP_CastUint32Bool: |
4406 | PrintName("CastUint32Bool" ); |
4407 | OS << "\t" << "\n" ; |
4408 | continue; |
4409 | case OP_CastSint32Uint8: |
4410 | PrintName("CastSint32Uint8" ); |
4411 | OS << "\t" << "\n" ; |
4412 | continue; |
4413 | case OP_CastSint32Sint8: |
4414 | PrintName("CastSint32Sint8" ); |
4415 | OS << "\t" << "\n" ; |
4416 | continue; |
4417 | case OP_CastSint32Uint16: |
4418 | PrintName("CastSint32Uint16" ); |
4419 | OS << "\t" << "\n" ; |
4420 | continue; |
4421 | case OP_CastSint32Sint16: |
4422 | PrintName("CastSint32Sint16" ); |
4423 | OS << "\t" << "\n" ; |
4424 | continue; |
4425 | case OP_CastSint32Uint32: |
4426 | PrintName("CastSint32Uint32" ); |
4427 | OS << "\t" << "\n" ; |
4428 | continue; |
4429 | case OP_CastSint32Sint32: |
4430 | PrintName("CastSint32Sint32" ); |
4431 | OS << "\t" << "\n" ; |
4432 | continue; |
4433 | case OP_CastSint32Uint64: |
4434 | PrintName("CastSint32Uint64" ); |
4435 | OS << "\t" << "\n" ; |
4436 | continue; |
4437 | case OP_CastSint32Sint64: |
4438 | PrintName("CastSint32Sint64" ); |
4439 | OS << "\t" << "\n" ; |
4440 | continue; |
4441 | case OP_CastSint32Bool: |
4442 | PrintName("CastSint32Bool" ); |
4443 | OS << "\t" << "\n" ; |
4444 | continue; |
4445 | case OP_CastUint64Uint8: |
4446 | PrintName("CastUint64Uint8" ); |
4447 | OS << "\t" << "\n" ; |
4448 | continue; |
4449 | case OP_CastUint64Sint8: |
4450 | PrintName("CastUint64Sint8" ); |
4451 | OS << "\t" << "\n" ; |
4452 | continue; |
4453 | case OP_CastUint64Uint16: |
4454 | PrintName("CastUint64Uint16" ); |
4455 | OS << "\t" << "\n" ; |
4456 | continue; |
4457 | case OP_CastUint64Sint16: |
4458 | PrintName("CastUint64Sint16" ); |
4459 | OS << "\t" << "\n" ; |
4460 | continue; |
4461 | case OP_CastUint64Uint32: |
4462 | PrintName("CastUint64Uint32" ); |
4463 | OS << "\t" << "\n" ; |
4464 | continue; |
4465 | case OP_CastUint64Sint32: |
4466 | PrintName("CastUint64Sint32" ); |
4467 | OS << "\t" << "\n" ; |
4468 | continue; |
4469 | case OP_CastUint64Uint64: |
4470 | PrintName("CastUint64Uint64" ); |
4471 | OS << "\t" << "\n" ; |
4472 | continue; |
4473 | case OP_CastUint64Sint64: |
4474 | PrintName("CastUint64Sint64" ); |
4475 | OS << "\t" << "\n" ; |
4476 | continue; |
4477 | case OP_CastUint64Bool: |
4478 | PrintName("CastUint64Bool" ); |
4479 | OS << "\t" << "\n" ; |
4480 | continue; |
4481 | case OP_CastSint64Uint8: |
4482 | PrintName("CastSint64Uint8" ); |
4483 | OS << "\t" << "\n" ; |
4484 | continue; |
4485 | case OP_CastSint64Sint8: |
4486 | PrintName("CastSint64Sint8" ); |
4487 | OS << "\t" << "\n" ; |
4488 | continue; |
4489 | case OP_CastSint64Uint16: |
4490 | PrintName("CastSint64Uint16" ); |
4491 | OS << "\t" << "\n" ; |
4492 | continue; |
4493 | case OP_CastSint64Sint16: |
4494 | PrintName("CastSint64Sint16" ); |
4495 | OS << "\t" << "\n" ; |
4496 | continue; |
4497 | case OP_CastSint64Uint32: |
4498 | PrintName("CastSint64Uint32" ); |
4499 | OS << "\t" << "\n" ; |
4500 | continue; |
4501 | case OP_CastSint64Sint32: |
4502 | PrintName("CastSint64Sint32" ); |
4503 | OS << "\t" << "\n" ; |
4504 | continue; |
4505 | case OP_CastSint64Uint64: |
4506 | PrintName("CastSint64Uint64" ); |
4507 | OS << "\t" << "\n" ; |
4508 | continue; |
4509 | case OP_CastSint64Sint64: |
4510 | PrintName("CastSint64Sint64" ); |
4511 | OS << "\t" << "\n" ; |
4512 | continue; |
4513 | case OP_CastSint64Bool: |
4514 | PrintName("CastSint64Bool" ); |
4515 | OS << "\t" << "\n" ; |
4516 | continue; |
4517 | case OP_CastBoolUint8: |
4518 | PrintName("CastBoolUint8" ); |
4519 | OS << "\t" << "\n" ; |
4520 | continue; |
4521 | case OP_CastBoolSint8: |
4522 | PrintName("CastBoolSint8" ); |
4523 | OS << "\t" << "\n" ; |
4524 | continue; |
4525 | case OP_CastBoolUint16: |
4526 | PrintName("CastBoolUint16" ); |
4527 | OS << "\t" << "\n" ; |
4528 | continue; |
4529 | case OP_CastBoolSint16: |
4530 | PrintName("CastBoolSint16" ); |
4531 | OS << "\t" << "\n" ; |
4532 | continue; |
4533 | case OP_CastBoolUint32: |
4534 | PrintName("CastBoolUint32" ); |
4535 | OS << "\t" << "\n" ; |
4536 | continue; |
4537 | case OP_CastBoolSint32: |
4538 | PrintName("CastBoolSint32" ); |
4539 | OS << "\t" << "\n" ; |
4540 | continue; |
4541 | case OP_CastBoolUint64: |
4542 | PrintName("CastBoolUint64" ); |
4543 | OS << "\t" << "\n" ; |
4544 | continue; |
4545 | case OP_CastBoolSint64: |
4546 | PrintName("CastBoolSint64" ); |
4547 | OS << "\t" << "\n" ; |
4548 | continue; |
4549 | case OP_CastBoolBool: |
4550 | PrintName("CastBoolBool" ); |
4551 | OS << "\t" << "\n" ; |
4552 | continue; |
4553 | case OP_CastIntAPUint8: |
4554 | PrintName("CastIntAPUint8" ); |
4555 | OS << "\t" << "\n" ; |
4556 | continue; |
4557 | case OP_CastIntAPSint8: |
4558 | PrintName("CastIntAPSint8" ); |
4559 | OS << "\t" << "\n" ; |
4560 | continue; |
4561 | case OP_CastIntAPUint16: |
4562 | PrintName("CastIntAPUint16" ); |
4563 | OS << "\t" << "\n" ; |
4564 | continue; |
4565 | case OP_CastIntAPSint16: |
4566 | PrintName("CastIntAPSint16" ); |
4567 | OS << "\t" << "\n" ; |
4568 | continue; |
4569 | case OP_CastIntAPUint32: |
4570 | PrintName("CastIntAPUint32" ); |
4571 | OS << "\t" << "\n" ; |
4572 | continue; |
4573 | case OP_CastIntAPSint32: |
4574 | PrintName("CastIntAPSint32" ); |
4575 | OS << "\t" << "\n" ; |
4576 | continue; |
4577 | case OP_CastIntAPUint64: |
4578 | PrintName("CastIntAPUint64" ); |
4579 | OS << "\t" << "\n" ; |
4580 | continue; |
4581 | case OP_CastIntAPSint64: |
4582 | PrintName("CastIntAPSint64" ); |
4583 | OS << "\t" << "\n" ; |
4584 | continue; |
4585 | case OP_CastIntAPBool: |
4586 | PrintName("CastIntAPBool" ); |
4587 | OS << "\t" << "\n" ; |
4588 | continue; |
4589 | case OP_CastIntAPSUint8: |
4590 | PrintName("CastIntAPSUint8" ); |
4591 | OS << "\t" << "\n" ; |
4592 | continue; |
4593 | case OP_CastIntAPSSint8: |
4594 | PrintName("CastIntAPSSint8" ); |
4595 | OS << "\t" << "\n" ; |
4596 | continue; |
4597 | case OP_CastIntAPSUint16: |
4598 | PrintName("CastIntAPSUint16" ); |
4599 | OS << "\t" << "\n" ; |
4600 | continue; |
4601 | case OP_CastIntAPSSint16: |
4602 | PrintName("CastIntAPSSint16" ); |
4603 | OS << "\t" << "\n" ; |
4604 | continue; |
4605 | case OP_CastIntAPSUint32: |
4606 | PrintName("CastIntAPSUint32" ); |
4607 | OS << "\t" << "\n" ; |
4608 | continue; |
4609 | case OP_CastIntAPSSint32: |
4610 | PrintName("CastIntAPSSint32" ); |
4611 | OS << "\t" << "\n" ; |
4612 | continue; |
4613 | case OP_CastIntAPSUint64: |
4614 | PrintName("CastIntAPSUint64" ); |
4615 | OS << "\t" << "\n" ; |
4616 | continue; |
4617 | case OP_CastIntAPSSint64: |
4618 | PrintName("CastIntAPSSint64" ); |
4619 | OS << "\t" << "\n" ; |
4620 | continue; |
4621 | case OP_CastIntAPSBool: |
4622 | PrintName("CastIntAPSBool" ); |
4623 | OS << "\t" << "\n" ; |
4624 | continue; |
4625 | #endif |
4626 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
4627 | bool emitCastUint8Uint8(const SourceInfo &); |
4628 | bool emitCastUint8Sint8(const SourceInfo &); |
4629 | bool emitCastUint8Uint16(const SourceInfo &); |
4630 | bool emitCastUint8Sint16(const SourceInfo &); |
4631 | bool emitCastUint8Uint32(const SourceInfo &); |
4632 | bool emitCastUint8Sint32(const SourceInfo &); |
4633 | bool emitCastUint8Uint64(const SourceInfo &); |
4634 | bool emitCastUint8Sint64(const SourceInfo &); |
4635 | bool emitCastUint8Bool(const SourceInfo &); |
4636 | bool emitCastSint8Uint8(const SourceInfo &); |
4637 | bool emitCastSint8Sint8(const SourceInfo &); |
4638 | bool emitCastSint8Uint16(const SourceInfo &); |
4639 | bool emitCastSint8Sint16(const SourceInfo &); |
4640 | bool emitCastSint8Uint32(const SourceInfo &); |
4641 | bool emitCastSint8Sint32(const SourceInfo &); |
4642 | bool emitCastSint8Uint64(const SourceInfo &); |
4643 | bool emitCastSint8Sint64(const SourceInfo &); |
4644 | bool emitCastSint8Bool(const SourceInfo &); |
4645 | bool emitCastUint16Uint8(const SourceInfo &); |
4646 | bool emitCastUint16Sint8(const SourceInfo &); |
4647 | bool emitCastUint16Uint16(const SourceInfo &); |
4648 | bool emitCastUint16Sint16(const SourceInfo &); |
4649 | bool emitCastUint16Uint32(const SourceInfo &); |
4650 | bool emitCastUint16Sint32(const SourceInfo &); |
4651 | bool emitCastUint16Uint64(const SourceInfo &); |
4652 | bool emitCastUint16Sint64(const SourceInfo &); |
4653 | bool emitCastUint16Bool(const SourceInfo &); |
4654 | bool emitCastSint16Uint8(const SourceInfo &); |
4655 | bool emitCastSint16Sint8(const SourceInfo &); |
4656 | bool emitCastSint16Uint16(const SourceInfo &); |
4657 | bool emitCastSint16Sint16(const SourceInfo &); |
4658 | bool emitCastSint16Uint32(const SourceInfo &); |
4659 | bool emitCastSint16Sint32(const SourceInfo &); |
4660 | bool emitCastSint16Uint64(const SourceInfo &); |
4661 | bool emitCastSint16Sint64(const SourceInfo &); |
4662 | bool emitCastSint16Bool(const SourceInfo &); |
4663 | bool emitCastUint32Uint8(const SourceInfo &); |
4664 | bool emitCastUint32Sint8(const SourceInfo &); |
4665 | bool emitCastUint32Uint16(const SourceInfo &); |
4666 | bool emitCastUint32Sint16(const SourceInfo &); |
4667 | bool emitCastUint32Uint32(const SourceInfo &); |
4668 | bool emitCastUint32Sint32(const SourceInfo &); |
4669 | bool emitCastUint32Uint64(const SourceInfo &); |
4670 | bool emitCastUint32Sint64(const SourceInfo &); |
4671 | bool emitCastUint32Bool(const SourceInfo &); |
4672 | bool emitCastSint32Uint8(const SourceInfo &); |
4673 | bool emitCastSint32Sint8(const SourceInfo &); |
4674 | bool emitCastSint32Uint16(const SourceInfo &); |
4675 | bool emitCastSint32Sint16(const SourceInfo &); |
4676 | bool emitCastSint32Uint32(const SourceInfo &); |
4677 | bool emitCastSint32Sint32(const SourceInfo &); |
4678 | bool emitCastSint32Uint64(const SourceInfo &); |
4679 | bool emitCastSint32Sint64(const SourceInfo &); |
4680 | bool emitCastSint32Bool(const SourceInfo &); |
4681 | bool emitCastUint64Uint8(const SourceInfo &); |
4682 | bool emitCastUint64Sint8(const SourceInfo &); |
4683 | bool emitCastUint64Uint16(const SourceInfo &); |
4684 | bool emitCastUint64Sint16(const SourceInfo &); |
4685 | bool emitCastUint64Uint32(const SourceInfo &); |
4686 | bool emitCastUint64Sint32(const SourceInfo &); |
4687 | bool emitCastUint64Uint64(const SourceInfo &); |
4688 | bool emitCastUint64Sint64(const SourceInfo &); |
4689 | bool emitCastUint64Bool(const SourceInfo &); |
4690 | bool emitCastSint64Uint8(const SourceInfo &); |
4691 | bool emitCastSint64Sint8(const SourceInfo &); |
4692 | bool emitCastSint64Uint16(const SourceInfo &); |
4693 | bool emitCastSint64Sint16(const SourceInfo &); |
4694 | bool emitCastSint64Uint32(const SourceInfo &); |
4695 | bool emitCastSint64Sint32(const SourceInfo &); |
4696 | bool emitCastSint64Uint64(const SourceInfo &); |
4697 | bool emitCastSint64Sint64(const SourceInfo &); |
4698 | bool emitCastSint64Bool(const SourceInfo &); |
4699 | bool emitCastBoolUint8(const SourceInfo &); |
4700 | bool emitCastBoolSint8(const SourceInfo &); |
4701 | bool emitCastBoolUint16(const SourceInfo &); |
4702 | bool emitCastBoolSint16(const SourceInfo &); |
4703 | bool emitCastBoolUint32(const SourceInfo &); |
4704 | bool emitCastBoolSint32(const SourceInfo &); |
4705 | bool emitCastBoolUint64(const SourceInfo &); |
4706 | bool emitCastBoolSint64(const SourceInfo &); |
4707 | bool emitCastBoolBool(const SourceInfo &); |
4708 | bool emitCastIntAPUint8(const SourceInfo &); |
4709 | bool emitCastIntAPSint8(const SourceInfo &); |
4710 | bool emitCastIntAPUint16(const SourceInfo &); |
4711 | bool emitCastIntAPSint16(const SourceInfo &); |
4712 | bool emitCastIntAPUint32(const SourceInfo &); |
4713 | bool emitCastIntAPSint32(const SourceInfo &); |
4714 | bool emitCastIntAPUint64(const SourceInfo &); |
4715 | bool emitCastIntAPSint64(const SourceInfo &); |
4716 | bool emitCastIntAPBool(const SourceInfo &); |
4717 | bool emitCastIntAPSUint8(const SourceInfo &); |
4718 | bool emitCastIntAPSSint8(const SourceInfo &); |
4719 | bool emitCastIntAPSUint16(const SourceInfo &); |
4720 | bool emitCastIntAPSSint16(const SourceInfo &); |
4721 | bool emitCastIntAPSUint32(const SourceInfo &); |
4722 | bool emitCastIntAPSSint32(const SourceInfo &); |
4723 | bool emitCastIntAPSUint64(const SourceInfo &); |
4724 | bool emitCastIntAPSSint64(const SourceInfo &); |
4725 | bool emitCastIntAPSBool(const SourceInfo &); |
4726 | #endif |
4727 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
4728 | [[nodiscard]] bool emitCast(PrimType, PrimType, const SourceInfo &I); |
4729 | #endif |
4730 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
4731 | bool |
4732 | #if defined(GET_EVAL_IMPL) |
4733 | EvalEmitter |
4734 | #else |
4735 | ByteCodeEmitter |
4736 | #endif |
4737 | ::emitCast(PrimType T0, PrimType T1, const SourceInfo &I) { |
4738 | switch (T0) { |
4739 | case PT_Uint8: |
4740 | switch (T1) { |
4741 | case PT_Uint8: |
4742 | return emitCastUint8Uint8(I); |
4743 | case PT_Sint8: |
4744 | return emitCastUint8Sint8(I); |
4745 | case PT_Uint16: |
4746 | return emitCastUint8Uint16(I); |
4747 | case PT_Sint16: |
4748 | return emitCastUint8Sint16(I); |
4749 | case PT_Uint32: |
4750 | return emitCastUint8Uint32(I); |
4751 | case PT_Sint32: |
4752 | return emitCastUint8Sint32(I); |
4753 | case PT_Uint64: |
4754 | return emitCastUint8Uint64(I); |
4755 | case PT_Sint64: |
4756 | return emitCastUint8Sint64(I); |
4757 | case PT_Bool: |
4758 | return emitCastUint8Bool(I); |
4759 | default: llvm_unreachable("invalid type: emitCast" ); |
4760 | } |
4761 | llvm_unreachable("invalid enum value" ); |
4762 | case PT_Sint8: |
4763 | switch (T1) { |
4764 | case PT_Uint8: |
4765 | return emitCastSint8Uint8(I); |
4766 | case PT_Sint8: |
4767 | return emitCastSint8Sint8(I); |
4768 | case PT_Uint16: |
4769 | return emitCastSint8Uint16(I); |
4770 | case PT_Sint16: |
4771 | return emitCastSint8Sint16(I); |
4772 | case PT_Uint32: |
4773 | return emitCastSint8Uint32(I); |
4774 | case PT_Sint32: |
4775 | return emitCastSint8Sint32(I); |
4776 | case PT_Uint64: |
4777 | return emitCastSint8Uint64(I); |
4778 | case PT_Sint64: |
4779 | return emitCastSint8Sint64(I); |
4780 | case PT_Bool: |
4781 | return emitCastSint8Bool(I); |
4782 | default: llvm_unreachable("invalid type: emitCast" ); |
4783 | } |
4784 | llvm_unreachable("invalid enum value" ); |
4785 | case PT_Uint16: |
4786 | switch (T1) { |
4787 | case PT_Uint8: |
4788 | return emitCastUint16Uint8(I); |
4789 | case PT_Sint8: |
4790 | return emitCastUint16Sint8(I); |
4791 | case PT_Uint16: |
4792 | return emitCastUint16Uint16(I); |
4793 | case PT_Sint16: |
4794 | return emitCastUint16Sint16(I); |
4795 | case PT_Uint32: |
4796 | return emitCastUint16Uint32(I); |
4797 | case PT_Sint32: |
4798 | return emitCastUint16Sint32(I); |
4799 | case PT_Uint64: |
4800 | return emitCastUint16Uint64(I); |
4801 | case PT_Sint64: |
4802 | return emitCastUint16Sint64(I); |
4803 | case PT_Bool: |
4804 | return emitCastUint16Bool(I); |
4805 | default: llvm_unreachable("invalid type: emitCast" ); |
4806 | } |
4807 | llvm_unreachable("invalid enum value" ); |
4808 | case PT_Sint16: |
4809 | switch (T1) { |
4810 | case PT_Uint8: |
4811 | return emitCastSint16Uint8(I); |
4812 | case PT_Sint8: |
4813 | return emitCastSint16Sint8(I); |
4814 | case PT_Uint16: |
4815 | return emitCastSint16Uint16(I); |
4816 | case PT_Sint16: |
4817 | return emitCastSint16Sint16(I); |
4818 | case PT_Uint32: |
4819 | return emitCastSint16Uint32(I); |
4820 | case PT_Sint32: |
4821 | return emitCastSint16Sint32(I); |
4822 | case PT_Uint64: |
4823 | return emitCastSint16Uint64(I); |
4824 | case PT_Sint64: |
4825 | return emitCastSint16Sint64(I); |
4826 | case PT_Bool: |
4827 | return emitCastSint16Bool(I); |
4828 | default: llvm_unreachable("invalid type: emitCast" ); |
4829 | } |
4830 | llvm_unreachable("invalid enum value" ); |
4831 | case PT_Uint32: |
4832 | switch (T1) { |
4833 | case PT_Uint8: |
4834 | return emitCastUint32Uint8(I); |
4835 | case PT_Sint8: |
4836 | return emitCastUint32Sint8(I); |
4837 | case PT_Uint16: |
4838 | return emitCastUint32Uint16(I); |
4839 | case PT_Sint16: |
4840 | return emitCastUint32Sint16(I); |
4841 | case PT_Uint32: |
4842 | return emitCastUint32Uint32(I); |
4843 | case PT_Sint32: |
4844 | return emitCastUint32Sint32(I); |
4845 | case PT_Uint64: |
4846 | return emitCastUint32Uint64(I); |
4847 | case PT_Sint64: |
4848 | return emitCastUint32Sint64(I); |
4849 | case PT_Bool: |
4850 | return emitCastUint32Bool(I); |
4851 | default: llvm_unreachable("invalid type: emitCast" ); |
4852 | } |
4853 | llvm_unreachable("invalid enum value" ); |
4854 | case PT_Sint32: |
4855 | switch (T1) { |
4856 | case PT_Uint8: |
4857 | return emitCastSint32Uint8(I); |
4858 | case PT_Sint8: |
4859 | return emitCastSint32Sint8(I); |
4860 | case PT_Uint16: |
4861 | return emitCastSint32Uint16(I); |
4862 | case PT_Sint16: |
4863 | return emitCastSint32Sint16(I); |
4864 | case PT_Uint32: |
4865 | return emitCastSint32Uint32(I); |
4866 | case PT_Sint32: |
4867 | return emitCastSint32Sint32(I); |
4868 | case PT_Uint64: |
4869 | return emitCastSint32Uint64(I); |
4870 | case PT_Sint64: |
4871 | return emitCastSint32Sint64(I); |
4872 | case PT_Bool: |
4873 | return emitCastSint32Bool(I); |
4874 | default: llvm_unreachable("invalid type: emitCast" ); |
4875 | } |
4876 | llvm_unreachable("invalid enum value" ); |
4877 | case PT_Uint64: |
4878 | switch (T1) { |
4879 | case PT_Uint8: |
4880 | return emitCastUint64Uint8(I); |
4881 | case PT_Sint8: |
4882 | return emitCastUint64Sint8(I); |
4883 | case PT_Uint16: |
4884 | return emitCastUint64Uint16(I); |
4885 | case PT_Sint16: |
4886 | return emitCastUint64Sint16(I); |
4887 | case PT_Uint32: |
4888 | return emitCastUint64Uint32(I); |
4889 | case PT_Sint32: |
4890 | return emitCastUint64Sint32(I); |
4891 | case PT_Uint64: |
4892 | return emitCastUint64Uint64(I); |
4893 | case PT_Sint64: |
4894 | return emitCastUint64Sint64(I); |
4895 | case PT_Bool: |
4896 | return emitCastUint64Bool(I); |
4897 | default: llvm_unreachable("invalid type: emitCast" ); |
4898 | } |
4899 | llvm_unreachable("invalid enum value" ); |
4900 | case PT_Sint64: |
4901 | switch (T1) { |
4902 | case PT_Uint8: |
4903 | return emitCastSint64Uint8(I); |
4904 | case PT_Sint8: |
4905 | return emitCastSint64Sint8(I); |
4906 | case PT_Uint16: |
4907 | return emitCastSint64Uint16(I); |
4908 | case PT_Sint16: |
4909 | return emitCastSint64Sint16(I); |
4910 | case PT_Uint32: |
4911 | return emitCastSint64Uint32(I); |
4912 | case PT_Sint32: |
4913 | return emitCastSint64Sint32(I); |
4914 | case PT_Uint64: |
4915 | return emitCastSint64Uint64(I); |
4916 | case PT_Sint64: |
4917 | return emitCastSint64Sint64(I); |
4918 | case PT_Bool: |
4919 | return emitCastSint64Bool(I); |
4920 | default: llvm_unreachable("invalid type: emitCast" ); |
4921 | } |
4922 | llvm_unreachable("invalid enum value" ); |
4923 | case PT_Bool: |
4924 | switch (T1) { |
4925 | case PT_Uint8: |
4926 | return emitCastBoolUint8(I); |
4927 | case PT_Sint8: |
4928 | return emitCastBoolSint8(I); |
4929 | case PT_Uint16: |
4930 | return emitCastBoolUint16(I); |
4931 | case PT_Sint16: |
4932 | return emitCastBoolSint16(I); |
4933 | case PT_Uint32: |
4934 | return emitCastBoolUint32(I); |
4935 | case PT_Sint32: |
4936 | return emitCastBoolSint32(I); |
4937 | case PT_Uint64: |
4938 | return emitCastBoolUint64(I); |
4939 | case PT_Sint64: |
4940 | return emitCastBoolSint64(I); |
4941 | case PT_Bool: |
4942 | return emitCastBoolBool(I); |
4943 | default: llvm_unreachable("invalid type: emitCast" ); |
4944 | } |
4945 | llvm_unreachable("invalid enum value" ); |
4946 | case PT_IntAP: |
4947 | switch (T1) { |
4948 | case PT_Uint8: |
4949 | return emitCastIntAPUint8(I); |
4950 | case PT_Sint8: |
4951 | return emitCastIntAPSint8(I); |
4952 | case PT_Uint16: |
4953 | return emitCastIntAPUint16(I); |
4954 | case PT_Sint16: |
4955 | return emitCastIntAPSint16(I); |
4956 | case PT_Uint32: |
4957 | return emitCastIntAPUint32(I); |
4958 | case PT_Sint32: |
4959 | return emitCastIntAPSint32(I); |
4960 | case PT_Uint64: |
4961 | return emitCastIntAPUint64(I); |
4962 | case PT_Sint64: |
4963 | return emitCastIntAPSint64(I); |
4964 | case PT_Bool: |
4965 | return emitCastIntAPBool(I); |
4966 | default: llvm_unreachable("invalid type: emitCast" ); |
4967 | } |
4968 | llvm_unreachable("invalid enum value" ); |
4969 | case PT_IntAPS: |
4970 | switch (T1) { |
4971 | case PT_Uint8: |
4972 | return emitCastIntAPSUint8(I); |
4973 | case PT_Sint8: |
4974 | return emitCastIntAPSSint8(I); |
4975 | case PT_Uint16: |
4976 | return emitCastIntAPSUint16(I); |
4977 | case PT_Sint16: |
4978 | return emitCastIntAPSSint16(I); |
4979 | case PT_Uint32: |
4980 | return emitCastIntAPSUint32(I); |
4981 | case PT_Sint32: |
4982 | return emitCastIntAPSSint32(I); |
4983 | case PT_Uint64: |
4984 | return emitCastIntAPSUint64(I); |
4985 | case PT_Sint64: |
4986 | return emitCastIntAPSSint64(I); |
4987 | case PT_Bool: |
4988 | return emitCastIntAPSBool(I); |
4989 | default: llvm_unreachable("invalid type: emitCast" ); |
4990 | } |
4991 | llvm_unreachable("invalid enum value" ); |
4992 | default: llvm_unreachable("invalid type: emitCast" ); |
4993 | } |
4994 | llvm_unreachable("invalid enum value" ); |
4995 | } |
4996 | #endif |
4997 | #ifdef GET_LINK_IMPL |
4998 | bool ByteCodeEmitter::emitCastUint8Uint8(const SourceInfo &L) { |
4999 | return emitOp<>(OP_CastUint8Uint8, L); |
5000 | } |
5001 | bool ByteCodeEmitter::emitCastUint8Sint8(const SourceInfo &L) { |
5002 | return emitOp<>(OP_CastUint8Sint8, L); |
5003 | } |
5004 | bool ByteCodeEmitter::emitCastUint8Uint16(const SourceInfo &L) { |
5005 | return emitOp<>(OP_CastUint8Uint16, L); |
5006 | } |
5007 | bool ByteCodeEmitter::emitCastUint8Sint16(const SourceInfo &L) { |
5008 | return emitOp<>(OP_CastUint8Sint16, L); |
5009 | } |
5010 | bool ByteCodeEmitter::emitCastUint8Uint32(const SourceInfo &L) { |
5011 | return emitOp<>(OP_CastUint8Uint32, L); |
5012 | } |
5013 | bool ByteCodeEmitter::emitCastUint8Sint32(const SourceInfo &L) { |
5014 | return emitOp<>(OP_CastUint8Sint32, L); |
5015 | } |
5016 | bool ByteCodeEmitter::emitCastUint8Uint64(const SourceInfo &L) { |
5017 | return emitOp<>(OP_CastUint8Uint64, L); |
5018 | } |
5019 | bool ByteCodeEmitter::emitCastUint8Sint64(const SourceInfo &L) { |
5020 | return emitOp<>(OP_CastUint8Sint64, L); |
5021 | } |
5022 | bool ByteCodeEmitter::emitCastUint8Bool(const SourceInfo &L) { |
5023 | return emitOp<>(OP_CastUint8Bool, L); |
5024 | } |
5025 | bool ByteCodeEmitter::emitCastSint8Uint8(const SourceInfo &L) { |
5026 | return emitOp<>(OP_CastSint8Uint8, L); |
5027 | } |
5028 | bool ByteCodeEmitter::emitCastSint8Sint8(const SourceInfo &L) { |
5029 | return emitOp<>(OP_CastSint8Sint8, L); |
5030 | } |
5031 | bool ByteCodeEmitter::emitCastSint8Uint16(const SourceInfo &L) { |
5032 | return emitOp<>(OP_CastSint8Uint16, L); |
5033 | } |
5034 | bool ByteCodeEmitter::emitCastSint8Sint16(const SourceInfo &L) { |
5035 | return emitOp<>(OP_CastSint8Sint16, L); |
5036 | } |
5037 | bool ByteCodeEmitter::emitCastSint8Uint32(const SourceInfo &L) { |
5038 | return emitOp<>(OP_CastSint8Uint32, L); |
5039 | } |
5040 | bool ByteCodeEmitter::emitCastSint8Sint32(const SourceInfo &L) { |
5041 | return emitOp<>(OP_CastSint8Sint32, L); |
5042 | } |
5043 | bool ByteCodeEmitter::emitCastSint8Uint64(const SourceInfo &L) { |
5044 | return emitOp<>(OP_CastSint8Uint64, L); |
5045 | } |
5046 | bool ByteCodeEmitter::emitCastSint8Sint64(const SourceInfo &L) { |
5047 | return emitOp<>(OP_CastSint8Sint64, L); |
5048 | } |
5049 | bool ByteCodeEmitter::emitCastSint8Bool(const SourceInfo &L) { |
5050 | return emitOp<>(OP_CastSint8Bool, L); |
5051 | } |
5052 | bool ByteCodeEmitter::emitCastUint16Uint8(const SourceInfo &L) { |
5053 | return emitOp<>(OP_CastUint16Uint8, L); |
5054 | } |
5055 | bool ByteCodeEmitter::emitCastUint16Sint8(const SourceInfo &L) { |
5056 | return emitOp<>(OP_CastUint16Sint8, L); |
5057 | } |
5058 | bool ByteCodeEmitter::emitCastUint16Uint16(const SourceInfo &L) { |
5059 | return emitOp<>(OP_CastUint16Uint16, L); |
5060 | } |
5061 | bool ByteCodeEmitter::emitCastUint16Sint16(const SourceInfo &L) { |
5062 | return emitOp<>(OP_CastUint16Sint16, L); |
5063 | } |
5064 | bool ByteCodeEmitter::emitCastUint16Uint32(const SourceInfo &L) { |
5065 | return emitOp<>(OP_CastUint16Uint32, L); |
5066 | } |
5067 | bool ByteCodeEmitter::emitCastUint16Sint32(const SourceInfo &L) { |
5068 | return emitOp<>(OP_CastUint16Sint32, L); |
5069 | } |
5070 | bool ByteCodeEmitter::emitCastUint16Uint64(const SourceInfo &L) { |
5071 | return emitOp<>(OP_CastUint16Uint64, L); |
5072 | } |
5073 | bool ByteCodeEmitter::emitCastUint16Sint64(const SourceInfo &L) { |
5074 | return emitOp<>(OP_CastUint16Sint64, L); |
5075 | } |
5076 | bool ByteCodeEmitter::emitCastUint16Bool(const SourceInfo &L) { |
5077 | return emitOp<>(OP_CastUint16Bool, L); |
5078 | } |
5079 | bool ByteCodeEmitter::emitCastSint16Uint8(const SourceInfo &L) { |
5080 | return emitOp<>(OP_CastSint16Uint8, L); |
5081 | } |
5082 | bool ByteCodeEmitter::emitCastSint16Sint8(const SourceInfo &L) { |
5083 | return emitOp<>(OP_CastSint16Sint8, L); |
5084 | } |
5085 | bool ByteCodeEmitter::emitCastSint16Uint16(const SourceInfo &L) { |
5086 | return emitOp<>(OP_CastSint16Uint16, L); |
5087 | } |
5088 | bool ByteCodeEmitter::emitCastSint16Sint16(const SourceInfo &L) { |
5089 | return emitOp<>(OP_CastSint16Sint16, L); |
5090 | } |
5091 | bool ByteCodeEmitter::emitCastSint16Uint32(const SourceInfo &L) { |
5092 | return emitOp<>(OP_CastSint16Uint32, L); |
5093 | } |
5094 | bool ByteCodeEmitter::emitCastSint16Sint32(const SourceInfo &L) { |
5095 | return emitOp<>(OP_CastSint16Sint32, L); |
5096 | } |
5097 | bool ByteCodeEmitter::emitCastSint16Uint64(const SourceInfo &L) { |
5098 | return emitOp<>(OP_CastSint16Uint64, L); |
5099 | } |
5100 | bool ByteCodeEmitter::emitCastSint16Sint64(const SourceInfo &L) { |
5101 | return emitOp<>(OP_CastSint16Sint64, L); |
5102 | } |
5103 | bool ByteCodeEmitter::emitCastSint16Bool(const SourceInfo &L) { |
5104 | return emitOp<>(OP_CastSint16Bool, L); |
5105 | } |
5106 | bool ByteCodeEmitter::emitCastUint32Uint8(const SourceInfo &L) { |
5107 | return emitOp<>(OP_CastUint32Uint8, L); |
5108 | } |
5109 | bool ByteCodeEmitter::emitCastUint32Sint8(const SourceInfo &L) { |
5110 | return emitOp<>(OP_CastUint32Sint8, L); |
5111 | } |
5112 | bool ByteCodeEmitter::emitCastUint32Uint16(const SourceInfo &L) { |
5113 | return emitOp<>(OP_CastUint32Uint16, L); |
5114 | } |
5115 | bool ByteCodeEmitter::emitCastUint32Sint16(const SourceInfo &L) { |
5116 | return emitOp<>(OP_CastUint32Sint16, L); |
5117 | } |
5118 | bool ByteCodeEmitter::emitCastUint32Uint32(const SourceInfo &L) { |
5119 | return emitOp<>(OP_CastUint32Uint32, L); |
5120 | } |
5121 | bool ByteCodeEmitter::emitCastUint32Sint32(const SourceInfo &L) { |
5122 | return emitOp<>(OP_CastUint32Sint32, L); |
5123 | } |
5124 | bool ByteCodeEmitter::emitCastUint32Uint64(const SourceInfo &L) { |
5125 | return emitOp<>(OP_CastUint32Uint64, L); |
5126 | } |
5127 | bool ByteCodeEmitter::emitCastUint32Sint64(const SourceInfo &L) { |
5128 | return emitOp<>(OP_CastUint32Sint64, L); |
5129 | } |
5130 | bool ByteCodeEmitter::emitCastUint32Bool(const SourceInfo &L) { |
5131 | return emitOp<>(OP_CastUint32Bool, L); |
5132 | } |
5133 | bool ByteCodeEmitter::emitCastSint32Uint8(const SourceInfo &L) { |
5134 | return emitOp<>(OP_CastSint32Uint8, L); |
5135 | } |
5136 | bool ByteCodeEmitter::emitCastSint32Sint8(const SourceInfo &L) { |
5137 | return emitOp<>(OP_CastSint32Sint8, L); |
5138 | } |
5139 | bool ByteCodeEmitter::emitCastSint32Uint16(const SourceInfo &L) { |
5140 | return emitOp<>(OP_CastSint32Uint16, L); |
5141 | } |
5142 | bool ByteCodeEmitter::emitCastSint32Sint16(const SourceInfo &L) { |
5143 | return emitOp<>(OP_CastSint32Sint16, L); |
5144 | } |
5145 | bool ByteCodeEmitter::emitCastSint32Uint32(const SourceInfo &L) { |
5146 | return emitOp<>(OP_CastSint32Uint32, L); |
5147 | } |
5148 | bool ByteCodeEmitter::emitCastSint32Sint32(const SourceInfo &L) { |
5149 | return emitOp<>(OP_CastSint32Sint32, L); |
5150 | } |
5151 | bool ByteCodeEmitter::emitCastSint32Uint64(const SourceInfo &L) { |
5152 | return emitOp<>(OP_CastSint32Uint64, L); |
5153 | } |
5154 | bool ByteCodeEmitter::emitCastSint32Sint64(const SourceInfo &L) { |
5155 | return emitOp<>(OP_CastSint32Sint64, L); |
5156 | } |
5157 | bool ByteCodeEmitter::emitCastSint32Bool(const SourceInfo &L) { |
5158 | return emitOp<>(OP_CastSint32Bool, L); |
5159 | } |
5160 | bool ByteCodeEmitter::emitCastUint64Uint8(const SourceInfo &L) { |
5161 | return emitOp<>(OP_CastUint64Uint8, L); |
5162 | } |
5163 | bool ByteCodeEmitter::emitCastUint64Sint8(const SourceInfo &L) { |
5164 | return emitOp<>(OP_CastUint64Sint8, L); |
5165 | } |
5166 | bool ByteCodeEmitter::emitCastUint64Uint16(const SourceInfo &L) { |
5167 | return emitOp<>(OP_CastUint64Uint16, L); |
5168 | } |
5169 | bool ByteCodeEmitter::emitCastUint64Sint16(const SourceInfo &L) { |
5170 | return emitOp<>(OP_CastUint64Sint16, L); |
5171 | } |
5172 | bool ByteCodeEmitter::emitCastUint64Uint32(const SourceInfo &L) { |
5173 | return emitOp<>(OP_CastUint64Uint32, L); |
5174 | } |
5175 | bool ByteCodeEmitter::emitCastUint64Sint32(const SourceInfo &L) { |
5176 | return emitOp<>(OP_CastUint64Sint32, L); |
5177 | } |
5178 | bool ByteCodeEmitter::emitCastUint64Uint64(const SourceInfo &L) { |
5179 | return emitOp<>(OP_CastUint64Uint64, L); |
5180 | } |
5181 | bool ByteCodeEmitter::emitCastUint64Sint64(const SourceInfo &L) { |
5182 | return emitOp<>(OP_CastUint64Sint64, L); |
5183 | } |
5184 | bool ByteCodeEmitter::emitCastUint64Bool(const SourceInfo &L) { |
5185 | return emitOp<>(OP_CastUint64Bool, L); |
5186 | } |
5187 | bool ByteCodeEmitter::emitCastSint64Uint8(const SourceInfo &L) { |
5188 | return emitOp<>(OP_CastSint64Uint8, L); |
5189 | } |
5190 | bool ByteCodeEmitter::emitCastSint64Sint8(const SourceInfo &L) { |
5191 | return emitOp<>(OP_CastSint64Sint8, L); |
5192 | } |
5193 | bool ByteCodeEmitter::emitCastSint64Uint16(const SourceInfo &L) { |
5194 | return emitOp<>(OP_CastSint64Uint16, L); |
5195 | } |
5196 | bool ByteCodeEmitter::emitCastSint64Sint16(const SourceInfo &L) { |
5197 | return emitOp<>(OP_CastSint64Sint16, L); |
5198 | } |
5199 | bool ByteCodeEmitter::emitCastSint64Uint32(const SourceInfo &L) { |
5200 | return emitOp<>(OP_CastSint64Uint32, L); |
5201 | } |
5202 | bool ByteCodeEmitter::emitCastSint64Sint32(const SourceInfo &L) { |
5203 | return emitOp<>(OP_CastSint64Sint32, L); |
5204 | } |
5205 | bool ByteCodeEmitter::emitCastSint64Uint64(const SourceInfo &L) { |
5206 | return emitOp<>(OP_CastSint64Uint64, L); |
5207 | } |
5208 | bool ByteCodeEmitter::emitCastSint64Sint64(const SourceInfo &L) { |
5209 | return emitOp<>(OP_CastSint64Sint64, L); |
5210 | } |
5211 | bool ByteCodeEmitter::emitCastSint64Bool(const SourceInfo &L) { |
5212 | return emitOp<>(OP_CastSint64Bool, L); |
5213 | } |
5214 | bool ByteCodeEmitter::emitCastBoolUint8(const SourceInfo &L) { |
5215 | return emitOp<>(OP_CastBoolUint8, L); |
5216 | } |
5217 | bool ByteCodeEmitter::emitCastBoolSint8(const SourceInfo &L) { |
5218 | return emitOp<>(OP_CastBoolSint8, L); |
5219 | } |
5220 | bool ByteCodeEmitter::emitCastBoolUint16(const SourceInfo &L) { |
5221 | return emitOp<>(OP_CastBoolUint16, L); |
5222 | } |
5223 | bool ByteCodeEmitter::emitCastBoolSint16(const SourceInfo &L) { |
5224 | return emitOp<>(OP_CastBoolSint16, L); |
5225 | } |
5226 | bool ByteCodeEmitter::emitCastBoolUint32(const SourceInfo &L) { |
5227 | return emitOp<>(OP_CastBoolUint32, L); |
5228 | } |
5229 | bool ByteCodeEmitter::emitCastBoolSint32(const SourceInfo &L) { |
5230 | return emitOp<>(OP_CastBoolSint32, L); |
5231 | } |
5232 | bool ByteCodeEmitter::emitCastBoolUint64(const SourceInfo &L) { |
5233 | return emitOp<>(OP_CastBoolUint64, L); |
5234 | } |
5235 | bool ByteCodeEmitter::emitCastBoolSint64(const SourceInfo &L) { |
5236 | return emitOp<>(OP_CastBoolSint64, L); |
5237 | } |
5238 | bool ByteCodeEmitter::emitCastBoolBool(const SourceInfo &L) { |
5239 | return emitOp<>(OP_CastBoolBool, L); |
5240 | } |
5241 | bool ByteCodeEmitter::emitCastIntAPUint8(const SourceInfo &L) { |
5242 | return emitOp<>(OP_CastIntAPUint8, L); |
5243 | } |
5244 | bool ByteCodeEmitter::emitCastIntAPSint8(const SourceInfo &L) { |
5245 | return emitOp<>(OP_CastIntAPSint8, L); |
5246 | } |
5247 | bool ByteCodeEmitter::emitCastIntAPUint16(const SourceInfo &L) { |
5248 | return emitOp<>(OP_CastIntAPUint16, L); |
5249 | } |
5250 | bool ByteCodeEmitter::emitCastIntAPSint16(const SourceInfo &L) { |
5251 | return emitOp<>(OP_CastIntAPSint16, L); |
5252 | } |
5253 | bool ByteCodeEmitter::emitCastIntAPUint32(const SourceInfo &L) { |
5254 | return emitOp<>(OP_CastIntAPUint32, L); |
5255 | } |
5256 | bool ByteCodeEmitter::emitCastIntAPSint32(const SourceInfo &L) { |
5257 | return emitOp<>(OP_CastIntAPSint32, L); |
5258 | } |
5259 | bool ByteCodeEmitter::emitCastIntAPUint64(const SourceInfo &L) { |
5260 | return emitOp<>(OP_CastIntAPUint64, L); |
5261 | } |
5262 | bool ByteCodeEmitter::emitCastIntAPSint64(const SourceInfo &L) { |
5263 | return emitOp<>(OP_CastIntAPSint64, L); |
5264 | } |
5265 | bool ByteCodeEmitter::emitCastIntAPBool(const SourceInfo &L) { |
5266 | return emitOp<>(OP_CastIntAPBool, L); |
5267 | } |
5268 | bool ByteCodeEmitter::emitCastIntAPSUint8(const SourceInfo &L) { |
5269 | return emitOp<>(OP_CastIntAPSUint8, L); |
5270 | } |
5271 | bool ByteCodeEmitter::emitCastIntAPSSint8(const SourceInfo &L) { |
5272 | return emitOp<>(OP_CastIntAPSSint8, L); |
5273 | } |
5274 | bool ByteCodeEmitter::emitCastIntAPSUint16(const SourceInfo &L) { |
5275 | return emitOp<>(OP_CastIntAPSUint16, L); |
5276 | } |
5277 | bool ByteCodeEmitter::emitCastIntAPSSint16(const SourceInfo &L) { |
5278 | return emitOp<>(OP_CastIntAPSSint16, L); |
5279 | } |
5280 | bool ByteCodeEmitter::emitCastIntAPSUint32(const SourceInfo &L) { |
5281 | return emitOp<>(OP_CastIntAPSUint32, L); |
5282 | } |
5283 | bool ByteCodeEmitter::emitCastIntAPSSint32(const SourceInfo &L) { |
5284 | return emitOp<>(OP_CastIntAPSSint32, L); |
5285 | } |
5286 | bool ByteCodeEmitter::emitCastIntAPSUint64(const SourceInfo &L) { |
5287 | return emitOp<>(OP_CastIntAPSUint64, L); |
5288 | } |
5289 | bool ByteCodeEmitter::emitCastIntAPSSint64(const SourceInfo &L) { |
5290 | return emitOp<>(OP_CastIntAPSSint64, L); |
5291 | } |
5292 | bool ByteCodeEmitter::emitCastIntAPSBool(const SourceInfo &L) { |
5293 | return emitOp<>(OP_CastIntAPSBool, L); |
5294 | } |
5295 | #endif |
5296 | #ifdef GET_EVAL_IMPL |
5297 | bool EvalEmitter::emitCastUint8Uint8(const SourceInfo &L) { |
5298 | if (!isActive()) return true; |
5299 | CurrentSource = L; |
5300 | return Cast<PT_Uint8, PT_Uint8>(S, OpPC); |
5301 | } |
5302 | bool EvalEmitter::emitCastUint8Sint8(const SourceInfo &L) { |
5303 | if (!isActive()) return true; |
5304 | CurrentSource = L; |
5305 | return Cast<PT_Uint8, PT_Sint8>(S, OpPC); |
5306 | } |
5307 | bool EvalEmitter::emitCastUint8Uint16(const SourceInfo &L) { |
5308 | if (!isActive()) return true; |
5309 | CurrentSource = L; |
5310 | return Cast<PT_Uint8, PT_Uint16>(S, OpPC); |
5311 | } |
5312 | bool EvalEmitter::emitCastUint8Sint16(const SourceInfo &L) { |
5313 | if (!isActive()) return true; |
5314 | CurrentSource = L; |
5315 | return Cast<PT_Uint8, PT_Sint16>(S, OpPC); |
5316 | } |
5317 | bool EvalEmitter::emitCastUint8Uint32(const SourceInfo &L) { |
5318 | if (!isActive()) return true; |
5319 | CurrentSource = L; |
5320 | return Cast<PT_Uint8, PT_Uint32>(S, OpPC); |
5321 | } |
5322 | bool EvalEmitter::emitCastUint8Sint32(const SourceInfo &L) { |
5323 | if (!isActive()) return true; |
5324 | CurrentSource = L; |
5325 | return Cast<PT_Uint8, PT_Sint32>(S, OpPC); |
5326 | } |
5327 | bool EvalEmitter::emitCastUint8Uint64(const SourceInfo &L) { |
5328 | if (!isActive()) return true; |
5329 | CurrentSource = L; |
5330 | return Cast<PT_Uint8, PT_Uint64>(S, OpPC); |
5331 | } |
5332 | bool EvalEmitter::emitCastUint8Sint64(const SourceInfo &L) { |
5333 | if (!isActive()) return true; |
5334 | CurrentSource = L; |
5335 | return Cast<PT_Uint8, PT_Sint64>(S, OpPC); |
5336 | } |
5337 | bool EvalEmitter::emitCastUint8Bool(const SourceInfo &L) { |
5338 | if (!isActive()) return true; |
5339 | CurrentSource = L; |
5340 | return Cast<PT_Uint8, PT_Bool>(S, OpPC); |
5341 | } |
5342 | bool EvalEmitter::emitCastSint8Uint8(const SourceInfo &L) { |
5343 | if (!isActive()) return true; |
5344 | CurrentSource = L; |
5345 | return Cast<PT_Sint8, PT_Uint8>(S, OpPC); |
5346 | } |
5347 | bool EvalEmitter::emitCastSint8Sint8(const SourceInfo &L) { |
5348 | if (!isActive()) return true; |
5349 | CurrentSource = L; |
5350 | return Cast<PT_Sint8, PT_Sint8>(S, OpPC); |
5351 | } |
5352 | bool EvalEmitter::emitCastSint8Uint16(const SourceInfo &L) { |
5353 | if (!isActive()) return true; |
5354 | CurrentSource = L; |
5355 | return Cast<PT_Sint8, PT_Uint16>(S, OpPC); |
5356 | } |
5357 | bool EvalEmitter::emitCastSint8Sint16(const SourceInfo &L) { |
5358 | if (!isActive()) return true; |
5359 | CurrentSource = L; |
5360 | return Cast<PT_Sint8, PT_Sint16>(S, OpPC); |
5361 | } |
5362 | bool EvalEmitter::emitCastSint8Uint32(const SourceInfo &L) { |
5363 | if (!isActive()) return true; |
5364 | CurrentSource = L; |
5365 | return Cast<PT_Sint8, PT_Uint32>(S, OpPC); |
5366 | } |
5367 | bool EvalEmitter::emitCastSint8Sint32(const SourceInfo &L) { |
5368 | if (!isActive()) return true; |
5369 | CurrentSource = L; |
5370 | return Cast<PT_Sint8, PT_Sint32>(S, OpPC); |
5371 | } |
5372 | bool EvalEmitter::emitCastSint8Uint64(const SourceInfo &L) { |
5373 | if (!isActive()) return true; |
5374 | CurrentSource = L; |
5375 | return Cast<PT_Sint8, PT_Uint64>(S, OpPC); |
5376 | } |
5377 | bool EvalEmitter::emitCastSint8Sint64(const SourceInfo &L) { |
5378 | if (!isActive()) return true; |
5379 | CurrentSource = L; |
5380 | return Cast<PT_Sint8, PT_Sint64>(S, OpPC); |
5381 | } |
5382 | bool EvalEmitter::emitCastSint8Bool(const SourceInfo &L) { |
5383 | if (!isActive()) return true; |
5384 | CurrentSource = L; |
5385 | return Cast<PT_Sint8, PT_Bool>(S, OpPC); |
5386 | } |
5387 | bool EvalEmitter::emitCastUint16Uint8(const SourceInfo &L) { |
5388 | if (!isActive()) return true; |
5389 | CurrentSource = L; |
5390 | return Cast<PT_Uint16, PT_Uint8>(S, OpPC); |
5391 | } |
5392 | bool EvalEmitter::emitCastUint16Sint8(const SourceInfo &L) { |
5393 | if (!isActive()) return true; |
5394 | CurrentSource = L; |
5395 | return Cast<PT_Uint16, PT_Sint8>(S, OpPC); |
5396 | } |
5397 | bool EvalEmitter::emitCastUint16Uint16(const SourceInfo &L) { |
5398 | if (!isActive()) return true; |
5399 | CurrentSource = L; |
5400 | return Cast<PT_Uint16, PT_Uint16>(S, OpPC); |
5401 | } |
5402 | bool EvalEmitter::emitCastUint16Sint16(const SourceInfo &L) { |
5403 | if (!isActive()) return true; |
5404 | CurrentSource = L; |
5405 | return Cast<PT_Uint16, PT_Sint16>(S, OpPC); |
5406 | } |
5407 | bool EvalEmitter::emitCastUint16Uint32(const SourceInfo &L) { |
5408 | if (!isActive()) return true; |
5409 | CurrentSource = L; |
5410 | return Cast<PT_Uint16, PT_Uint32>(S, OpPC); |
5411 | } |
5412 | bool EvalEmitter::emitCastUint16Sint32(const SourceInfo &L) { |
5413 | if (!isActive()) return true; |
5414 | CurrentSource = L; |
5415 | return Cast<PT_Uint16, PT_Sint32>(S, OpPC); |
5416 | } |
5417 | bool EvalEmitter::emitCastUint16Uint64(const SourceInfo &L) { |
5418 | if (!isActive()) return true; |
5419 | CurrentSource = L; |
5420 | return Cast<PT_Uint16, PT_Uint64>(S, OpPC); |
5421 | } |
5422 | bool EvalEmitter::emitCastUint16Sint64(const SourceInfo &L) { |
5423 | if (!isActive()) return true; |
5424 | CurrentSource = L; |
5425 | return Cast<PT_Uint16, PT_Sint64>(S, OpPC); |
5426 | } |
5427 | bool EvalEmitter::emitCastUint16Bool(const SourceInfo &L) { |
5428 | if (!isActive()) return true; |
5429 | CurrentSource = L; |
5430 | return Cast<PT_Uint16, PT_Bool>(S, OpPC); |
5431 | } |
5432 | bool EvalEmitter::emitCastSint16Uint8(const SourceInfo &L) { |
5433 | if (!isActive()) return true; |
5434 | CurrentSource = L; |
5435 | return Cast<PT_Sint16, PT_Uint8>(S, OpPC); |
5436 | } |
5437 | bool EvalEmitter::emitCastSint16Sint8(const SourceInfo &L) { |
5438 | if (!isActive()) return true; |
5439 | CurrentSource = L; |
5440 | return Cast<PT_Sint16, PT_Sint8>(S, OpPC); |
5441 | } |
5442 | bool EvalEmitter::emitCastSint16Uint16(const SourceInfo &L) { |
5443 | if (!isActive()) return true; |
5444 | CurrentSource = L; |
5445 | return Cast<PT_Sint16, PT_Uint16>(S, OpPC); |
5446 | } |
5447 | bool EvalEmitter::emitCastSint16Sint16(const SourceInfo &L) { |
5448 | if (!isActive()) return true; |
5449 | CurrentSource = L; |
5450 | return Cast<PT_Sint16, PT_Sint16>(S, OpPC); |
5451 | } |
5452 | bool EvalEmitter::emitCastSint16Uint32(const SourceInfo &L) { |
5453 | if (!isActive()) return true; |
5454 | CurrentSource = L; |
5455 | return Cast<PT_Sint16, PT_Uint32>(S, OpPC); |
5456 | } |
5457 | bool EvalEmitter::emitCastSint16Sint32(const SourceInfo &L) { |
5458 | if (!isActive()) return true; |
5459 | CurrentSource = L; |
5460 | return Cast<PT_Sint16, PT_Sint32>(S, OpPC); |
5461 | } |
5462 | bool EvalEmitter::emitCastSint16Uint64(const SourceInfo &L) { |
5463 | if (!isActive()) return true; |
5464 | CurrentSource = L; |
5465 | return Cast<PT_Sint16, PT_Uint64>(S, OpPC); |
5466 | } |
5467 | bool EvalEmitter::emitCastSint16Sint64(const SourceInfo &L) { |
5468 | if (!isActive()) return true; |
5469 | CurrentSource = L; |
5470 | return Cast<PT_Sint16, PT_Sint64>(S, OpPC); |
5471 | } |
5472 | bool EvalEmitter::emitCastSint16Bool(const SourceInfo &L) { |
5473 | if (!isActive()) return true; |
5474 | CurrentSource = L; |
5475 | return Cast<PT_Sint16, PT_Bool>(S, OpPC); |
5476 | } |
5477 | bool EvalEmitter::emitCastUint32Uint8(const SourceInfo &L) { |
5478 | if (!isActive()) return true; |
5479 | CurrentSource = L; |
5480 | return Cast<PT_Uint32, PT_Uint8>(S, OpPC); |
5481 | } |
5482 | bool EvalEmitter::emitCastUint32Sint8(const SourceInfo &L) { |
5483 | if (!isActive()) return true; |
5484 | CurrentSource = L; |
5485 | return Cast<PT_Uint32, PT_Sint8>(S, OpPC); |
5486 | } |
5487 | bool EvalEmitter::emitCastUint32Uint16(const SourceInfo &L) { |
5488 | if (!isActive()) return true; |
5489 | CurrentSource = L; |
5490 | return Cast<PT_Uint32, PT_Uint16>(S, OpPC); |
5491 | } |
5492 | bool EvalEmitter::emitCastUint32Sint16(const SourceInfo &L) { |
5493 | if (!isActive()) return true; |
5494 | CurrentSource = L; |
5495 | return Cast<PT_Uint32, PT_Sint16>(S, OpPC); |
5496 | } |
5497 | bool EvalEmitter::emitCastUint32Uint32(const SourceInfo &L) { |
5498 | if (!isActive()) return true; |
5499 | CurrentSource = L; |
5500 | return Cast<PT_Uint32, PT_Uint32>(S, OpPC); |
5501 | } |
5502 | bool EvalEmitter::emitCastUint32Sint32(const SourceInfo &L) { |
5503 | if (!isActive()) return true; |
5504 | CurrentSource = L; |
5505 | return Cast<PT_Uint32, PT_Sint32>(S, OpPC); |
5506 | } |
5507 | bool EvalEmitter::emitCastUint32Uint64(const SourceInfo &L) { |
5508 | if (!isActive()) return true; |
5509 | CurrentSource = L; |
5510 | return Cast<PT_Uint32, PT_Uint64>(S, OpPC); |
5511 | } |
5512 | bool EvalEmitter::emitCastUint32Sint64(const SourceInfo &L) { |
5513 | if (!isActive()) return true; |
5514 | CurrentSource = L; |
5515 | return Cast<PT_Uint32, PT_Sint64>(S, OpPC); |
5516 | } |
5517 | bool EvalEmitter::emitCastUint32Bool(const SourceInfo &L) { |
5518 | if (!isActive()) return true; |
5519 | CurrentSource = L; |
5520 | return Cast<PT_Uint32, PT_Bool>(S, OpPC); |
5521 | } |
5522 | bool EvalEmitter::emitCastSint32Uint8(const SourceInfo &L) { |
5523 | if (!isActive()) return true; |
5524 | CurrentSource = L; |
5525 | return Cast<PT_Sint32, PT_Uint8>(S, OpPC); |
5526 | } |
5527 | bool EvalEmitter::emitCastSint32Sint8(const SourceInfo &L) { |
5528 | if (!isActive()) return true; |
5529 | CurrentSource = L; |
5530 | return Cast<PT_Sint32, PT_Sint8>(S, OpPC); |
5531 | } |
5532 | bool EvalEmitter::emitCastSint32Uint16(const SourceInfo &L) { |
5533 | if (!isActive()) return true; |
5534 | CurrentSource = L; |
5535 | return Cast<PT_Sint32, PT_Uint16>(S, OpPC); |
5536 | } |
5537 | bool EvalEmitter::emitCastSint32Sint16(const SourceInfo &L) { |
5538 | if (!isActive()) return true; |
5539 | CurrentSource = L; |
5540 | return Cast<PT_Sint32, PT_Sint16>(S, OpPC); |
5541 | } |
5542 | bool EvalEmitter::emitCastSint32Uint32(const SourceInfo &L) { |
5543 | if (!isActive()) return true; |
5544 | CurrentSource = L; |
5545 | return Cast<PT_Sint32, PT_Uint32>(S, OpPC); |
5546 | } |
5547 | bool EvalEmitter::emitCastSint32Sint32(const SourceInfo &L) { |
5548 | if (!isActive()) return true; |
5549 | CurrentSource = L; |
5550 | return Cast<PT_Sint32, PT_Sint32>(S, OpPC); |
5551 | } |
5552 | bool EvalEmitter::emitCastSint32Uint64(const SourceInfo &L) { |
5553 | if (!isActive()) return true; |
5554 | CurrentSource = L; |
5555 | return Cast<PT_Sint32, PT_Uint64>(S, OpPC); |
5556 | } |
5557 | bool EvalEmitter::emitCastSint32Sint64(const SourceInfo &L) { |
5558 | if (!isActive()) return true; |
5559 | CurrentSource = L; |
5560 | return Cast<PT_Sint32, PT_Sint64>(S, OpPC); |
5561 | } |
5562 | bool EvalEmitter::emitCastSint32Bool(const SourceInfo &L) { |
5563 | if (!isActive()) return true; |
5564 | CurrentSource = L; |
5565 | return Cast<PT_Sint32, PT_Bool>(S, OpPC); |
5566 | } |
5567 | bool EvalEmitter::emitCastUint64Uint8(const SourceInfo &L) { |
5568 | if (!isActive()) return true; |
5569 | CurrentSource = L; |
5570 | return Cast<PT_Uint64, PT_Uint8>(S, OpPC); |
5571 | } |
5572 | bool EvalEmitter::emitCastUint64Sint8(const SourceInfo &L) { |
5573 | if (!isActive()) return true; |
5574 | CurrentSource = L; |
5575 | return Cast<PT_Uint64, PT_Sint8>(S, OpPC); |
5576 | } |
5577 | bool EvalEmitter::emitCastUint64Uint16(const SourceInfo &L) { |
5578 | if (!isActive()) return true; |
5579 | CurrentSource = L; |
5580 | return Cast<PT_Uint64, PT_Uint16>(S, OpPC); |
5581 | } |
5582 | bool EvalEmitter::emitCastUint64Sint16(const SourceInfo &L) { |
5583 | if (!isActive()) return true; |
5584 | CurrentSource = L; |
5585 | return Cast<PT_Uint64, PT_Sint16>(S, OpPC); |
5586 | } |
5587 | bool EvalEmitter::emitCastUint64Uint32(const SourceInfo &L) { |
5588 | if (!isActive()) return true; |
5589 | CurrentSource = L; |
5590 | return Cast<PT_Uint64, PT_Uint32>(S, OpPC); |
5591 | } |
5592 | bool EvalEmitter::emitCastUint64Sint32(const SourceInfo &L) { |
5593 | if (!isActive()) return true; |
5594 | CurrentSource = L; |
5595 | return Cast<PT_Uint64, PT_Sint32>(S, OpPC); |
5596 | } |
5597 | bool EvalEmitter::emitCastUint64Uint64(const SourceInfo &L) { |
5598 | if (!isActive()) return true; |
5599 | CurrentSource = L; |
5600 | return Cast<PT_Uint64, PT_Uint64>(S, OpPC); |
5601 | } |
5602 | bool EvalEmitter::emitCastUint64Sint64(const SourceInfo &L) { |
5603 | if (!isActive()) return true; |
5604 | CurrentSource = L; |
5605 | return Cast<PT_Uint64, PT_Sint64>(S, OpPC); |
5606 | } |
5607 | bool EvalEmitter::emitCastUint64Bool(const SourceInfo &L) { |
5608 | if (!isActive()) return true; |
5609 | CurrentSource = L; |
5610 | return Cast<PT_Uint64, PT_Bool>(S, OpPC); |
5611 | } |
5612 | bool EvalEmitter::emitCastSint64Uint8(const SourceInfo &L) { |
5613 | if (!isActive()) return true; |
5614 | CurrentSource = L; |
5615 | return Cast<PT_Sint64, PT_Uint8>(S, OpPC); |
5616 | } |
5617 | bool EvalEmitter::emitCastSint64Sint8(const SourceInfo &L) { |
5618 | if (!isActive()) return true; |
5619 | CurrentSource = L; |
5620 | return Cast<PT_Sint64, PT_Sint8>(S, OpPC); |
5621 | } |
5622 | bool EvalEmitter::emitCastSint64Uint16(const SourceInfo &L) { |
5623 | if (!isActive()) return true; |
5624 | CurrentSource = L; |
5625 | return Cast<PT_Sint64, PT_Uint16>(S, OpPC); |
5626 | } |
5627 | bool EvalEmitter::emitCastSint64Sint16(const SourceInfo &L) { |
5628 | if (!isActive()) return true; |
5629 | CurrentSource = L; |
5630 | return Cast<PT_Sint64, PT_Sint16>(S, OpPC); |
5631 | } |
5632 | bool EvalEmitter::emitCastSint64Uint32(const SourceInfo &L) { |
5633 | if (!isActive()) return true; |
5634 | CurrentSource = L; |
5635 | return Cast<PT_Sint64, PT_Uint32>(S, OpPC); |
5636 | } |
5637 | bool EvalEmitter::emitCastSint64Sint32(const SourceInfo &L) { |
5638 | if (!isActive()) return true; |
5639 | CurrentSource = L; |
5640 | return Cast<PT_Sint64, PT_Sint32>(S, OpPC); |
5641 | } |
5642 | bool EvalEmitter::emitCastSint64Uint64(const SourceInfo &L) { |
5643 | if (!isActive()) return true; |
5644 | CurrentSource = L; |
5645 | return Cast<PT_Sint64, PT_Uint64>(S, OpPC); |
5646 | } |
5647 | bool EvalEmitter::emitCastSint64Sint64(const SourceInfo &L) { |
5648 | if (!isActive()) return true; |
5649 | CurrentSource = L; |
5650 | return Cast<PT_Sint64, PT_Sint64>(S, OpPC); |
5651 | } |
5652 | bool EvalEmitter::emitCastSint64Bool(const SourceInfo &L) { |
5653 | if (!isActive()) return true; |
5654 | CurrentSource = L; |
5655 | return Cast<PT_Sint64, PT_Bool>(S, OpPC); |
5656 | } |
5657 | bool EvalEmitter::emitCastBoolUint8(const SourceInfo &L) { |
5658 | if (!isActive()) return true; |
5659 | CurrentSource = L; |
5660 | return Cast<PT_Bool, PT_Uint8>(S, OpPC); |
5661 | } |
5662 | bool EvalEmitter::emitCastBoolSint8(const SourceInfo &L) { |
5663 | if (!isActive()) return true; |
5664 | CurrentSource = L; |
5665 | return Cast<PT_Bool, PT_Sint8>(S, OpPC); |
5666 | } |
5667 | bool EvalEmitter::emitCastBoolUint16(const SourceInfo &L) { |
5668 | if (!isActive()) return true; |
5669 | CurrentSource = L; |
5670 | return Cast<PT_Bool, PT_Uint16>(S, OpPC); |
5671 | } |
5672 | bool EvalEmitter::emitCastBoolSint16(const SourceInfo &L) { |
5673 | if (!isActive()) return true; |
5674 | CurrentSource = L; |
5675 | return Cast<PT_Bool, PT_Sint16>(S, OpPC); |
5676 | } |
5677 | bool EvalEmitter::emitCastBoolUint32(const SourceInfo &L) { |
5678 | if (!isActive()) return true; |
5679 | CurrentSource = L; |
5680 | return Cast<PT_Bool, PT_Uint32>(S, OpPC); |
5681 | } |
5682 | bool EvalEmitter::emitCastBoolSint32(const SourceInfo &L) { |
5683 | if (!isActive()) return true; |
5684 | CurrentSource = L; |
5685 | return Cast<PT_Bool, PT_Sint32>(S, OpPC); |
5686 | } |
5687 | bool EvalEmitter::emitCastBoolUint64(const SourceInfo &L) { |
5688 | if (!isActive()) return true; |
5689 | CurrentSource = L; |
5690 | return Cast<PT_Bool, PT_Uint64>(S, OpPC); |
5691 | } |
5692 | bool EvalEmitter::emitCastBoolSint64(const SourceInfo &L) { |
5693 | if (!isActive()) return true; |
5694 | CurrentSource = L; |
5695 | return Cast<PT_Bool, PT_Sint64>(S, OpPC); |
5696 | } |
5697 | bool EvalEmitter::emitCastBoolBool(const SourceInfo &L) { |
5698 | if (!isActive()) return true; |
5699 | CurrentSource = L; |
5700 | return Cast<PT_Bool, PT_Bool>(S, OpPC); |
5701 | } |
5702 | bool EvalEmitter::emitCastIntAPUint8(const SourceInfo &L) { |
5703 | if (!isActive()) return true; |
5704 | CurrentSource = L; |
5705 | return Cast<PT_IntAP, PT_Uint8>(S, OpPC); |
5706 | } |
5707 | bool EvalEmitter::emitCastIntAPSint8(const SourceInfo &L) { |
5708 | if (!isActive()) return true; |
5709 | CurrentSource = L; |
5710 | return Cast<PT_IntAP, PT_Sint8>(S, OpPC); |
5711 | } |
5712 | bool EvalEmitter::emitCastIntAPUint16(const SourceInfo &L) { |
5713 | if (!isActive()) return true; |
5714 | CurrentSource = L; |
5715 | return Cast<PT_IntAP, PT_Uint16>(S, OpPC); |
5716 | } |
5717 | bool EvalEmitter::emitCastIntAPSint16(const SourceInfo &L) { |
5718 | if (!isActive()) return true; |
5719 | CurrentSource = L; |
5720 | return Cast<PT_IntAP, PT_Sint16>(S, OpPC); |
5721 | } |
5722 | bool EvalEmitter::emitCastIntAPUint32(const SourceInfo &L) { |
5723 | if (!isActive()) return true; |
5724 | CurrentSource = L; |
5725 | return Cast<PT_IntAP, PT_Uint32>(S, OpPC); |
5726 | } |
5727 | bool EvalEmitter::emitCastIntAPSint32(const SourceInfo &L) { |
5728 | if (!isActive()) return true; |
5729 | CurrentSource = L; |
5730 | return Cast<PT_IntAP, PT_Sint32>(S, OpPC); |
5731 | } |
5732 | bool EvalEmitter::emitCastIntAPUint64(const SourceInfo &L) { |
5733 | if (!isActive()) return true; |
5734 | CurrentSource = L; |
5735 | return Cast<PT_IntAP, PT_Uint64>(S, OpPC); |
5736 | } |
5737 | bool EvalEmitter::emitCastIntAPSint64(const SourceInfo &L) { |
5738 | if (!isActive()) return true; |
5739 | CurrentSource = L; |
5740 | return Cast<PT_IntAP, PT_Sint64>(S, OpPC); |
5741 | } |
5742 | bool EvalEmitter::emitCastIntAPBool(const SourceInfo &L) { |
5743 | if (!isActive()) return true; |
5744 | CurrentSource = L; |
5745 | return Cast<PT_IntAP, PT_Bool>(S, OpPC); |
5746 | } |
5747 | bool EvalEmitter::emitCastIntAPSUint8(const SourceInfo &L) { |
5748 | if (!isActive()) return true; |
5749 | CurrentSource = L; |
5750 | return Cast<PT_IntAPS, PT_Uint8>(S, OpPC); |
5751 | } |
5752 | bool EvalEmitter::emitCastIntAPSSint8(const SourceInfo &L) { |
5753 | if (!isActive()) return true; |
5754 | CurrentSource = L; |
5755 | return Cast<PT_IntAPS, PT_Sint8>(S, OpPC); |
5756 | } |
5757 | bool EvalEmitter::emitCastIntAPSUint16(const SourceInfo &L) { |
5758 | if (!isActive()) return true; |
5759 | CurrentSource = L; |
5760 | return Cast<PT_IntAPS, PT_Uint16>(S, OpPC); |
5761 | } |
5762 | bool EvalEmitter::emitCastIntAPSSint16(const SourceInfo &L) { |
5763 | if (!isActive()) return true; |
5764 | CurrentSource = L; |
5765 | return Cast<PT_IntAPS, PT_Sint16>(S, OpPC); |
5766 | } |
5767 | bool EvalEmitter::emitCastIntAPSUint32(const SourceInfo &L) { |
5768 | if (!isActive()) return true; |
5769 | CurrentSource = L; |
5770 | return Cast<PT_IntAPS, PT_Uint32>(S, OpPC); |
5771 | } |
5772 | bool EvalEmitter::emitCastIntAPSSint32(const SourceInfo &L) { |
5773 | if (!isActive()) return true; |
5774 | CurrentSource = L; |
5775 | return Cast<PT_IntAPS, PT_Sint32>(S, OpPC); |
5776 | } |
5777 | bool EvalEmitter::emitCastIntAPSUint64(const SourceInfo &L) { |
5778 | if (!isActive()) return true; |
5779 | CurrentSource = L; |
5780 | return Cast<PT_IntAPS, PT_Uint64>(S, OpPC); |
5781 | } |
5782 | bool EvalEmitter::emitCastIntAPSSint64(const SourceInfo &L) { |
5783 | if (!isActive()) return true; |
5784 | CurrentSource = L; |
5785 | return Cast<PT_IntAPS, PT_Sint64>(S, OpPC); |
5786 | } |
5787 | bool EvalEmitter::emitCastIntAPSBool(const SourceInfo &L) { |
5788 | if (!isActive()) return true; |
5789 | CurrentSource = L; |
5790 | return Cast<PT_IntAPS, PT_Bool>(S, OpPC); |
5791 | } |
5792 | #endif |
5793 | #ifdef GET_OPCODE_NAMES |
5794 | OP_CastAPSint8, |
5795 | OP_CastAPUint8, |
5796 | OP_CastAPSint16, |
5797 | OP_CastAPUint16, |
5798 | OP_CastAPSint32, |
5799 | OP_CastAPUint32, |
5800 | OP_CastAPSint64, |
5801 | OP_CastAPUint64, |
5802 | OP_CastAPIntAP, |
5803 | OP_CastAPIntAPS, |
5804 | OP_CastAPBool, |
5805 | #endif |
5806 | #ifdef GET_INTERP |
5807 | case OP_CastAPSint8: { |
5808 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5809 | if (!CastAP<PT_Sint8>(S, OpPC, V0)) |
5810 | return false; |
5811 | continue; |
5812 | } |
5813 | case OP_CastAPUint8: { |
5814 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5815 | if (!CastAP<PT_Uint8>(S, OpPC, V0)) |
5816 | return false; |
5817 | continue; |
5818 | } |
5819 | case OP_CastAPSint16: { |
5820 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5821 | if (!CastAP<PT_Sint16>(S, OpPC, V0)) |
5822 | return false; |
5823 | continue; |
5824 | } |
5825 | case OP_CastAPUint16: { |
5826 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5827 | if (!CastAP<PT_Uint16>(S, OpPC, V0)) |
5828 | return false; |
5829 | continue; |
5830 | } |
5831 | case OP_CastAPSint32: { |
5832 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5833 | if (!CastAP<PT_Sint32>(S, OpPC, V0)) |
5834 | return false; |
5835 | continue; |
5836 | } |
5837 | case OP_CastAPUint32: { |
5838 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5839 | if (!CastAP<PT_Uint32>(S, OpPC, V0)) |
5840 | return false; |
5841 | continue; |
5842 | } |
5843 | case OP_CastAPSint64: { |
5844 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5845 | if (!CastAP<PT_Sint64>(S, OpPC, V0)) |
5846 | return false; |
5847 | continue; |
5848 | } |
5849 | case OP_CastAPUint64: { |
5850 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5851 | if (!CastAP<PT_Uint64>(S, OpPC, V0)) |
5852 | return false; |
5853 | continue; |
5854 | } |
5855 | case OP_CastAPIntAP: { |
5856 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5857 | if (!CastAP<PT_IntAP>(S, OpPC, V0)) |
5858 | return false; |
5859 | continue; |
5860 | } |
5861 | case OP_CastAPIntAPS: { |
5862 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5863 | if (!CastAP<PT_IntAPS>(S, OpPC, V0)) |
5864 | return false; |
5865 | continue; |
5866 | } |
5867 | case OP_CastAPBool: { |
5868 | const auto V0 = ReadArg<uint32_t>(S, PC); |
5869 | if (!CastAP<PT_Bool>(S, OpPC, V0)) |
5870 | return false; |
5871 | continue; |
5872 | } |
5873 | #endif |
5874 | #ifdef GET_DISASM |
5875 | case OP_CastAPSint8: |
5876 | PrintName("CastAPSint8" ); |
5877 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5878 | continue; |
5879 | case OP_CastAPUint8: |
5880 | PrintName("CastAPUint8" ); |
5881 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5882 | continue; |
5883 | case OP_CastAPSint16: |
5884 | PrintName("CastAPSint16" ); |
5885 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5886 | continue; |
5887 | case OP_CastAPUint16: |
5888 | PrintName("CastAPUint16" ); |
5889 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5890 | continue; |
5891 | case OP_CastAPSint32: |
5892 | PrintName("CastAPSint32" ); |
5893 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5894 | continue; |
5895 | case OP_CastAPUint32: |
5896 | PrintName("CastAPUint32" ); |
5897 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5898 | continue; |
5899 | case OP_CastAPSint64: |
5900 | PrintName("CastAPSint64" ); |
5901 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5902 | continue; |
5903 | case OP_CastAPUint64: |
5904 | PrintName("CastAPUint64" ); |
5905 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5906 | continue; |
5907 | case OP_CastAPIntAP: |
5908 | PrintName("CastAPIntAP" ); |
5909 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5910 | continue; |
5911 | case OP_CastAPIntAPS: |
5912 | PrintName("CastAPIntAPS" ); |
5913 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5914 | continue; |
5915 | case OP_CastAPBool: |
5916 | PrintName("CastAPBool" ); |
5917 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
5918 | continue; |
5919 | #endif |
5920 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
5921 | bool emitCastAPSint8( uint32_t , const SourceInfo &); |
5922 | bool emitCastAPUint8( uint32_t , const SourceInfo &); |
5923 | bool emitCastAPSint16( uint32_t , const SourceInfo &); |
5924 | bool emitCastAPUint16( uint32_t , const SourceInfo &); |
5925 | bool emitCastAPSint32( uint32_t , const SourceInfo &); |
5926 | bool emitCastAPUint32( uint32_t , const SourceInfo &); |
5927 | bool emitCastAPSint64( uint32_t , const SourceInfo &); |
5928 | bool emitCastAPUint64( uint32_t , const SourceInfo &); |
5929 | bool emitCastAPIntAP( uint32_t , const SourceInfo &); |
5930 | bool emitCastAPIntAPS( uint32_t , const SourceInfo &); |
5931 | bool emitCastAPBool( uint32_t , const SourceInfo &); |
5932 | #endif |
5933 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
5934 | [[nodiscard]] bool emitCastAP(PrimType, uint32_t, const SourceInfo &I); |
5935 | #endif |
5936 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
5937 | bool |
5938 | #if defined(GET_EVAL_IMPL) |
5939 | EvalEmitter |
5940 | #else |
5941 | ByteCodeEmitter |
5942 | #endif |
5943 | ::emitCastAP(PrimType T0, uint32_t A0, const SourceInfo &I) { |
5944 | switch (T0) { |
5945 | case PT_Sint8: |
5946 | return emitCastAPSint8(A0, I); |
5947 | case PT_Uint8: |
5948 | return emitCastAPUint8(A0, I); |
5949 | case PT_Sint16: |
5950 | return emitCastAPSint16(A0, I); |
5951 | case PT_Uint16: |
5952 | return emitCastAPUint16(A0, I); |
5953 | case PT_Sint32: |
5954 | return emitCastAPSint32(A0, I); |
5955 | case PT_Uint32: |
5956 | return emitCastAPUint32(A0, I); |
5957 | case PT_Sint64: |
5958 | return emitCastAPSint64(A0, I); |
5959 | case PT_Uint64: |
5960 | return emitCastAPUint64(A0, I); |
5961 | case PT_IntAP: |
5962 | return emitCastAPIntAP(A0, I); |
5963 | case PT_IntAPS: |
5964 | return emitCastAPIntAPS(A0, I); |
5965 | case PT_Bool: |
5966 | return emitCastAPBool(A0, I); |
5967 | default: llvm_unreachable("invalid type: emitCastAP" ); |
5968 | } |
5969 | llvm_unreachable("invalid enum value" ); |
5970 | } |
5971 | #endif |
5972 | #ifdef GET_LINK_IMPL |
5973 | bool ByteCodeEmitter::emitCastAPSint8( uint32_t A0, const SourceInfo &L) { |
5974 | return emitOp<uint32_t>(OP_CastAPSint8, A0, L); |
5975 | } |
5976 | bool ByteCodeEmitter::emitCastAPUint8( uint32_t A0, const SourceInfo &L) { |
5977 | return emitOp<uint32_t>(OP_CastAPUint8, A0, L); |
5978 | } |
5979 | bool ByteCodeEmitter::emitCastAPSint16( uint32_t A0, const SourceInfo &L) { |
5980 | return emitOp<uint32_t>(OP_CastAPSint16, A0, L); |
5981 | } |
5982 | bool ByteCodeEmitter::emitCastAPUint16( uint32_t A0, const SourceInfo &L) { |
5983 | return emitOp<uint32_t>(OP_CastAPUint16, A0, L); |
5984 | } |
5985 | bool ByteCodeEmitter::emitCastAPSint32( uint32_t A0, const SourceInfo &L) { |
5986 | return emitOp<uint32_t>(OP_CastAPSint32, A0, L); |
5987 | } |
5988 | bool ByteCodeEmitter::emitCastAPUint32( uint32_t A0, const SourceInfo &L) { |
5989 | return emitOp<uint32_t>(OP_CastAPUint32, A0, L); |
5990 | } |
5991 | bool ByteCodeEmitter::emitCastAPSint64( uint32_t A0, const SourceInfo &L) { |
5992 | return emitOp<uint32_t>(OP_CastAPSint64, A0, L); |
5993 | } |
5994 | bool ByteCodeEmitter::emitCastAPUint64( uint32_t A0, const SourceInfo &L) { |
5995 | return emitOp<uint32_t>(OP_CastAPUint64, A0, L); |
5996 | } |
5997 | bool ByteCodeEmitter::emitCastAPIntAP( uint32_t A0, const SourceInfo &L) { |
5998 | return emitOp<uint32_t>(OP_CastAPIntAP, A0, L); |
5999 | } |
6000 | bool ByteCodeEmitter::emitCastAPIntAPS( uint32_t A0, const SourceInfo &L) { |
6001 | return emitOp<uint32_t>(OP_CastAPIntAPS, A0, L); |
6002 | } |
6003 | bool ByteCodeEmitter::emitCastAPBool( uint32_t A0, const SourceInfo &L) { |
6004 | return emitOp<uint32_t>(OP_CastAPBool, A0, L); |
6005 | } |
6006 | #endif |
6007 | #ifdef GET_EVAL_IMPL |
6008 | bool EvalEmitter::emitCastAPSint8( uint32_t A0, const SourceInfo &L) { |
6009 | if (!isActive()) return true; |
6010 | CurrentSource = L; |
6011 | return CastAP<PT_Sint8>(S, OpPC, A0); |
6012 | } |
6013 | bool EvalEmitter::emitCastAPUint8( uint32_t A0, const SourceInfo &L) { |
6014 | if (!isActive()) return true; |
6015 | CurrentSource = L; |
6016 | return CastAP<PT_Uint8>(S, OpPC, A0); |
6017 | } |
6018 | bool EvalEmitter::emitCastAPSint16( uint32_t A0, const SourceInfo &L) { |
6019 | if (!isActive()) return true; |
6020 | CurrentSource = L; |
6021 | return CastAP<PT_Sint16>(S, OpPC, A0); |
6022 | } |
6023 | bool EvalEmitter::emitCastAPUint16( uint32_t A0, const SourceInfo &L) { |
6024 | if (!isActive()) return true; |
6025 | CurrentSource = L; |
6026 | return CastAP<PT_Uint16>(S, OpPC, A0); |
6027 | } |
6028 | bool EvalEmitter::emitCastAPSint32( uint32_t A0, const SourceInfo &L) { |
6029 | if (!isActive()) return true; |
6030 | CurrentSource = L; |
6031 | return CastAP<PT_Sint32>(S, OpPC, A0); |
6032 | } |
6033 | bool EvalEmitter::emitCastAPUint32( uint32_t A0, const SourceInfo &L) { |
6034 | if (!isActive()) return true; |
6035 | CurrentSource = L; |
6036 | return CastAP<PT_Uint32>(S, OpPC, A0); |
6037 | } |
6038 | bool EvalEmitter::emitCastAPSint64( uint32_t A0, const SourceInfo &L) { |
6039 | if (!isActive()) return true; |
6040 | CurrentSource = L; |
6041 | return CastAP<PT_Sint64>(S, OpPC, A0); |
6042 | } |
6043 | bool EvalEmitter::emitCastAPUint64( uint32_t A0, const SourceInfo &L) { |
6044 | if (!isActive()) return true; |
6045 | CurrentSource = L; |
6046 | return CastAP<PT_Uint64>(S, OpPC, A0); |
6047 | } |
6048 | bool EvalEmitter::emitCastAPIntAP( uint32_t A0, const SourceInfo &L) { |
6049 | if (!isActive()) return true; |
6050 | CurrentSource = L; |
6051 | return CastAP<PT_IntAP>(S, OpPC, A0); |
6052 | } |
6053 | bool EvalEmitter::emitCastAPIntAPS( uint32_t A0, const SourceInfo &L) { |
6054 | if (!isActive()) return true; |
6055 | CurrentSource = L; |
6056 | return CastAP<PT_IntAPS>(S, OpPC, A0); |
6057 | } |
6058 | bool EvalEmitter::emitCastAPBool( uint32_t A0, const SourceInfo &L) { |
6059 | if (!isActive()) return true; |
6060 | CurrentSource = L; |
6061 | return CastAP<PT_Bool>(S, OpPC, A0); |
6062 | } |
6063 | #endif |
6064 | #ifdef GET_OPCODE_NAMES |
6065 | OP_CastAPSSint8, |
6066 | OP_CastAPSUint8, |
6067 | OP_CastAPSSint16, |
6068 | OP_CastAPSUint16, |
6069 | OP_CastAPSSint32, |
6070 | OP_CastAPSUint32, |
6071 | OP_CastAPSSint64, |
6072 | OP_CastAPSUint64, |
6073 | OP_CastAPSIntAP, |
6074 | OP_CastAPSIntAPS, |
6075 | OP_CastAPSBool, |
6076 | #endif |
6077 | #ifdef GET_INTERP |
6078 | case OP_CastAPSSint8: { |
6079 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6080 | if (!CastAPS<PT_Sint8>(S, OpPC, V0)) |
6081 | return false; |
6082 | continue; |
6083 | } |
6084 | case OP_CastAPSUint8: { |
6085 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6086 | if (!CastAPS<PT_Uint8>(S, OpPC, V0)) |
6087 | return false; |
6088 | continue; |
6089 | } |
6090 | case OP_CastAPSSint16: { |
6091 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6092 | if (!CastAPS<PT_Sint16>(S, OpPC, V0)) |
6093 | return false; |
6094 | continue; |
6095 | } |
6096 | case OP_CastAPSUint16: { |
6097 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6098 | if (!CastAPS<PT_Uint16>(S, OpPC, V0)) |
6099 | return false; |
6100 | continue; |
6101 | } |
6102 | case OP_CastAPSSint32: { |
6103 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6104 | if (!CastAPS<PT_Sint32>(S, OpPC, V0)) |
6105 | return false; |
6106 | continue; |
6107 | } |
6108 | case OP_CastAPSUint32: { |
6109 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6110 | if (!CastAPS<PT_Uint32>(S, OpPC, V0)) |
6111 | return false; |
6112 | continue; |
6113 | } |
6114 | case OP_CastAPSSint64: { |
6115 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6116 | if (!CastAPS<PT_Sint64>(S, OpPC, V0)) |
6117 | return false; |
6118 | continue; |
6119 | } |
6120 | case OP_CastAPSUint64: { |
6121 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6122 | if (!CastAPS<PT_Uint64>(S, OpPC, V0)) |
6123 | return false; |
6124 | continue; |
6125 | } |
6126 | case OP_CastAPSIntAP: { |
6127 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6128 | if (!CastAPS<PT_IntAP>(S, OpPC, V0)) |
6129 | return false; |
6130 | continue; |
6131 | } |
6132 | case OP_CastAPSIntAPS: { |
6133 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6134 | if (!CastAPS<PT_IntAPS>(S, OpPC, V0)) |
6135 | return false; |
6136 | continue; |
6137 | } |
6138 | case OP_CastAPSBool: { |
6139 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6140 | if (!CastAPS<PT_Bool>(S, OpPC, V0)) |
6141 | return false; |
6142 | continue; |
6143 | } |
6144 | #endif |
6145 | #ifdef GET_DISASM |
6146 | case OP_CastAPSSint8: |
6147 | PrintName("CastAPSSint8" ); |
6148 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6149 | continue; |
6150 | case OP_CastAPSUint8: |
6151 | PrintName("CastAPSUint8" ); |
6152 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6153 | continue; |
6154 | case OP_CastAPSSint16: |
6155 | PrintName("CastAPSSint16" ); |
6156 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6157 | continue; |
6158 | case OP_CastAPSUint16: |
6159 | PrintName("CastAPSUint16" ); |
6160 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6161 | continue; |
6162 | case OP_CastAPSSint32: |
6163 | PrintName("CastAPSSint32" ); |
6164 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6165 | continue; |
6166 | case OP_CastAPSUint32: |
6167 | PrintName("CastAPSUint32" ); |
6168 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6169 | continue; |
6170 | case OP_CastAPSSint64: |
6171 | PrintName("CastAPSSint64" ); |
6172 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6173 | continue; |
6174 | case OP_CastAPSUint64: |
6175 | PrintName("CastAPSUint64" ); |
6176 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6177 | continue; |
6178 | case OP_CastAPSIntAP: |
6179 | PrintName("CastAPSIntAP" ); |
6180 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6181 | continue; |
6182 | case OP_CastAPSIntAPS: |
6183 | PrintName("CastAPSIntAPS" ); |
6184 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6185 | continue; |
6186 | case OP_CastAPSBool: |
6187 | PrintName("CastAPSBool" ); |
6188 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6189 | continue; |
6190 | #endif |
6191 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6192 | bool emitCastAPSSint8( uint32_t , const SourceInfo &); |
6193 | bool emitCastAPSUint8( uint32_t , const SourceInfo &); |
6194 | bool emitCastAPSSint16( uint32_t , const SourceInfo &); |
6195 | bool emitCastAPSUint16( uint32_t , const SourceInfo &); |
6196 | bool emitCastAPSSint32( uint32_t , const SourceInfo &); |
6197 | bool emitCastAPSUint32( uint32_t , const SourceInfo &); |
6198 | bool emitCastAPSSint64( uint32_t , const SourceInfo &); |
6199 | bool emitCastAPSUint64( uint32_t , const SourceInfo &); |
6200 | bool emitCastAPSIntAP( uint32_t , const SourceInfo &); |
6201 | bool emitCastAPSIntAPS( uint32_t , const SourceInfo &); |
6202 | bool emitCastAPSBool( uint32_t , const SourceInfo &); |
6203 | #endif |
6204 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6205 | [[nodiscard]] bool emitCastAPS(PrimType, uint32_t, const SourceInfo &I); |
6206 | #endif |
6207 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
6208 | bool |
6209 | #if defined(GET_EVAL_IMPL) |
6210 | EvalEmitter |
6211 | #else |
6212 | ByteCodeEmitter |
6213 | #endif |
6214 | ::emitCastAPS(PrimType T0, uint32_t A0, const SourceInfo &I) { |
6215 | switch (T0) { |
6216 | case PT_Sint8: |
6217 | return emitCastAPSSint8(A0, I); |
6218 | case PT_Uint8: |
6219 | return emitCastAPSUint8(A0, I); |
6220 | case PT_Sint16: |
6221 | return emitCastAPSSint16(A0, I); |
6222 | case PT_Uint16: |
6223 | return emitCastAPSUint16(A0, I); |
6224 | case PT_Sint32: |
6225 | return emitCastAPSSint32(A0, I); |
6226 | case PT_Uint32: |
6227 | return emitCastAPSUint32(A0, I); |
6228 | case PT_Sint64: |
6229 | return emitCastAPSSint64(A0, I); |
6230 | case PT_Uint64: |
6231 | return emitCastAPSUint64(A0, I); |
6232 | case PT_IntAP: |
6233 | return emitCastAPSIntAP(A0, I); |
6234 | case PT_IntAPS: |
6235 | return emitCastAPSIntAPS(A0, I); |
6236 | case PT_Bool: |
6237 | return emitCastAPSBool(A0, I); |
6238 | default: llvm_unreachable("invalid type: emitCastAPS" ); |
6239 | } |
6240 | llvm_unreachable("invalid enum value" ); |
6241 | } |
6242 | #endif |
6243 | #ifdef GET_LINK_IMPL |
6244 | bool ByteCodeEmitter::emitCastAPSSint8( uint32_t A0, const SourceInfo &L) { |
6245 | return emitOp<uint32_t>(OP_CastAPSSint8, A0, L); |
6246 | } |
6247 | bool ByteCodeEmitter::emitCastAPSUint8( uint32_t A0, const SourceInfo &L) { |
6248 | return emitOp<uint32_t>(OP_CastAPSUint8, A0, L); |
6249 | } |
6250 | bool ByteCodeEmitter::emitCastAPSSint16( uint32_t A0, const SourceInfo &L) { |
6251 | return emitOp<uint32_t>(OP_CastAPSSint16, A0, L); |
6252 | } |
6253 | bool ByteCodeEmitter::emitCastAPSUint16( uint32_t A0, const SourceInfo &L) { |
6254 | return emitOp<uint32_t>(OP_CastAPSUint16, A0, L); |
6255 | } |
6256 | bool ByteCodeEmitter::emitCastAPSSint32( uint32_t A0, const SourceInfo &L) { |
6257 | return emitOp<uint32_t>(OP_CastAPSSint32, A0, L); |
6258 | } |
6259 | bool ByteCodeEmitter::emitCastAPSUint32( uint32_t A0, const SourceInfo &L) { |
6260 | return emitOp<uint32_t>(OP_CastAPSUint32, A0, L); |
6261 | } |
6262 | bool ByteCodeEmitter::emitCastAPSSint64( uint32_t A0, const SourceInfo &L) { |
6263 | return emitOp<uint32_t>(OP_CastAPSSint64, A0, L); |
6264 | } |
6265 | bool ByteCodeEmitter::emitCastAPSUint64( uint32_t A0, const SourceInfo &L) { |
6266 | return emitOp<uint32_t>(OP_CastAPSUint64, A0, L); |
6267 | } |
6268 | bool ByteCodeEmitter::emitCastAPSIntAP( uint32_t A0, const SourceInfo &L) { |
6269 | return emitOp<uint32_t>(OP_CastAPSIntAP, A0, L); |
6270 | } |
6271 | bool ByteCodeEmitter::emitCastAPSIntAPS( uint32_t A0, const SourceInfo &L) { |
6272 | return emitOp<uint32_t>(OP_CastAPSIntAPS, A0, L); |
6273 | } |
6274 | bool ByteCodeEmitter::emitCastAPSBool( uint32_t A0, const SourceInfo &L) { |
6275 | return emitOp<uint32_t>(OP_CastAPSBool, A0, L); |
6276 | } |
6277 | #endif |
6278 | #ifdef GET_EVAL_IMPL |
6279 | bool EvalEmitter::emitCastAPSSint8( uint32_t A0, const SourceInfo &L) { |
6280 | if (!isActive()) return true; |
6281 | CurrentSource = L; |
6282 | return CastAPS<PT_Sint8>(S, OpPC, A0); |
6283 | } |
6284 | bool EvalEmitter::emitCastAPSUint8( uint32_t A0, const SourceInfo &L) { |
6285 | if (!isActive()) return true; |
6286 | CurrentSource = L; |
6287 | return CastAPS<PT_Uint8>(S, OpPC, A0); |
6288 | } |
6289 | bool EvalEmitter::emitCastAPSSint16( uint32_t A0, const SourceInfo &L) { |
6290 | if (!isActive()) return true; |
6291 | CurrentSource = L; |
6292 | return CastAPS<PT_Sint16>(S, OpPC, A0); |
6293 | } |
6294 | bool EvalEmitter::emitCastAPSUint16( uint32_t A0, const SourceInfo &L) { |
6295 | if (!isActive()) return true; |
6296 | CurrentSource = L; |
6297 | return CastAPS<PT_Uint16>(S, OpPC, A0); |
6298 | } |
6299 | bool EvalEmitter::emitCastAPSSint32( uint32_t A0, const SourceInfo &L) { |
6300 | if (!isActive()) return true; |
6301 | CurrentSource = L; |
6302 | return CastAPS<PT_Sint32>(S, OpPC, A0); |
6303 | } |
6304 | bool EvalEmitter::emitCastAPSUint32( uint32_t A0, const SourceInfo &L) { |
6305 | if (!isActive()) return true; |
6306 | CurrentSource = L; |
6307 | return CastAPS<PT_Uint32>(S, OpPC, A0); |
6308 | } |
6309 | bool EvalEmitter::emitCastAPSSint64( uint32_t A0, const SourceInfo &L) { |
6310 | if (!isActive()) return true; |
6311 | CurrentSource = L; |
6312 | return CastAPS<PT_Sint64>(S, OpPC, A0); |
6313 | } |
6314 | bool EvalEmitter::emitCastAPSUint64( uint32_t A0, const SourceInfo &L) { |
6315 | if (!isActive()) return true; |
6316 | CurrentSource = L; |
6317 | return CastAPS<PT_Uint64>(S, OpPC, A0); |
6318 | } |
6319 | bool EvalEmitter::emitCastAPSIntAP( uint32_t A0, const SourceInfo &L) { |
6320 | if (!isActive()) return true; |
6321 | CurrentSource = L; |
6322 | return CastAPS<PT_IntAP>(S, OpPC, A0); |
6323 | } |
6324 | bool EvalEmitter::emitCastAPSIntAPS( uint32_t A0, const SourceInfo &L) { |
6325 | if (!isActive()) return true; |
6326 | CurrentSource = L; |
6327 | return CastAPS<PT_IntAPS>(S, OpPC, A0); |
6328 | } |
6329 | bool EvalEmitter::emitCastAPSBool( uint32_t A0, const SourceInfo &L) { |
6330 | if (!isActive()) return true; |
6331 | CurrentSource = L; |
6332 | return CastAPS<PT_Bool>(S, OpPC, A0); |
6333 | } |
6334 | #endif |
6335 | #ifdef GET_OPCODE_NAMES |
6336 | OP_CastFP, |
6337 | #endif |
6338 | #ifdef GET_INTERP |
6339 | case OP_CastFP: { |
6340 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6341 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6342 | if (!CastFP(S, OpPC, V0, V1)) |
6343 | return false; |
6344 | continue; |
6345 | } |
6346 | #endif |
6347 | #ifdef GET_DISASM |
6348 | case OP_CastFP: |
6349 | PrintName("CastFP" ); |
6350 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6351 | continue; |
6352 | #endif |
6353 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6354 | bool emitCastFP( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6355 | #endif |
6356 | #ifdef GET_LINK_IMPL |
6357 | bool ByteCodeEmitter::emitCastFP( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6358 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastFP, A0, A1, L); |
6359 | } |
6360 | #endif |
6361 | #ifdef GET_EVAL_IMPL |
6362 | bool EvalEmitter::emitCastFP( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6363 | if (!isActive()) return true; |
6364 | CurrentSource = L; |
6365 | return CastFP(S, OpPC, A0, A1); |
6366 | } |
6367 | #endif |
6368 | #ifdef GET_OPCODE_NAMES |
6369 | OP_CastFloatingIntegralUint8, |
6370 | OP_CastFloatingIntegralSint8, |
6371 | OP_CastFloatingIntegralUint16, |
6372 | OP_CastFloatingIntegralSint16, |
6373 | OP_CastFloatingIntegralUint32, |
6374 | OP_CastFloatingIntegralSint32, |
6375 | OP_CastFloatingIntegralUint64, |
6376 | OP_CastFloatingIntegralSint64, |
6377 | OP_CastFloatingIntegralBool, |
6378 | #endif |
6379 | #ifdef GET_INTERP |
6380 | case OP_CastFloatingIntegralUint8: { |
6381 | if (!CastFloatingIntegral<PT_Uint8>(S, OpPC)) |
6382 | return false; |
6383 | continue; |
6384 | } |
6385 | case OP_CastFloatingIntegralSint8: { |
6386 | if (!CastFloatingIntegral<PT_Sint8>(S, OpPC)) |
6387 | return false; |
6388 | continue; |
6389 | } |
6390 | case OP_CastFloatingIntegralUint16: { |
6391 | if (!CastFloatingIntegral<PT_Uint16>(S, OpPC)) |
6392 | return false; |
6393 | continue; |
6394 | } |
6395 | case OP_CastFloatingIntegralSint16: { |
6396 | if (!CastFloatingIntegral<PT_Sint16>(S, OpPC)) |
6397 | return false; |
6398 | continue; |
6399 | } |
6400 | case OP_CastFloatingIntegralUint32: { |
6401 | if (!CastFloatingIntegral<PT_Uint32>(S, OpPC)) |
6402 | return false; |
6403 | continue; |
6404 | } |
6405 | case OP_CastFloatingIntegralSint32: { |
6406 | if (!CastFloatingIntegral<PT_Sint32>(S, OpPC)) |
6407 | return false; |
6408 | continue; |
6409 | } |
6410 | case OP_CastFloatingIntegralUint64: { |
6411 | if (!CastFloatingIntegral<PT_Uint64>(S, OpPC)) |
6412 | return false; |
6413 | continue; |
6414 | } |
6415 | case OP_CastFloatingIntegralSint64: { |
6416 | if (!CastFloatingIntegral<PT_Sint64>(S, OpPC)) |
6417 | return false; |
6418 | continue; |
6419 | } |
6420 | case OP_CastFloatingIntegralBool: { |
6421 | if (!CastFloatingIntegral<PT_Bool>(S, OpPC)) |
6422 | return false; |
6423 | continue; |
6424 | } |
6425 | #endif |
6426 | #ifdef GET_DISASM |
6427 | case OP_CastFloatingIntegralUint8: |
6428 | PrintName("CastFloatingIntegralUint8" ); |
6429 | OS << "\t" << "\n" ; |
6430 | continue; |
6431 | case OP_CastFloatingIntegralSint8: |
6432 | PrintName("CastFloatingIntegralSint8" ); |
6433 | OS << "\t" << "\n" ; |
6434 | continue; |
6435 | case OP_CastFloatingIntegralUint16: |
6436 | PrintName("CastFloatingIntegralUint16" ); |
6437 | OS << "\t" << "\n" ; |
6438 | continue; |
6439 | case OP_CastFloatingIntegralSint16: |
6440 | PrintName("CastFloatingIntegralSint16" ); |
6441 | OS << "\t" << "\n" ; |
6442 | continue; |
6443 | case OP_CastFloatingIntegralUint32: |
6444 | PrintName("CastFloatingIntegralUint32" ); |
6445 | OS << "\t" << "\n" ; |
6446 | continue; |
6447 | case OP_CastFloatingIntegralSint32: |
6448 | PrintName("CastFloatingIntegralSint32" ); |
6449 | OS << "\t" << "\n" ; |
6450 | continue; |
6451 | case OP_CastFloatingIntegralUint64: |
6452 | PrintName("CastFloatingIntegralUint64" ); |
6453 | OS << "\t" << "\n" ; |
6454 | continue; |
6455 | case OP_CastFloatingIntegralSint64: |
6456 | PrintName("CastFloatingIntegralSint64" ); |
6457 | OS << "\t" << "\n" ; |
6458 | continue; |
6459 | case OP_CastFloatingIntegralBool: |
6460 | PrintName("CastFloatingIntegralBool" ); |
6461 | OS << "\t" << "\n" ; |
6462 | continue; |
6463 | #endif |
6464 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6465 | bool emitCastFloatingIntegralUint8(const SourceInfo &); |
6466 | bool emitCastFloatingIntegralSint8(const SourceInfo &); |
6467 | bool emitCastFloatingIntegralUint16(const SourceInfo &); |
6468 | bool emitCastFloatingIntegralSint16(const SourceInfo &); |
6469 | bool emitCastFloatingIntegralUint32(const SourceInfo &); |
6470 | bool emitCastFloatingIntegralSint32(const SourceInfo &); |
6471 | bool emitCastFloatingIntegralUint64(const SourceInfo &); |
6472 | bool emitCastFloatingIntegralSint64(const SourceInfo &); |
6473 | bool emitCastFloatingIntegralBool(const SourceInfo &); |
6474 | #endif |
6475 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6476 | [[nodiscard]] bool emitCastFloatingIntegral(PrimType, const SourceInfo &I); |
6477 | #endif |
6478 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
6479 | bool |
6480 | #if defined(GET_EVAL_IMPL) |
6481 | EvalEmitter |
6482 | #else |
6483 | ByteCodeEmitter |
6484 | #endif |
6485 | ::emitCastFloatingIntegral(PrimType T0, const SourceInfo &I) { |
6486 | switch (T0) { |
6487 | case PT_Uint8: |
6488 | return emitCastFloatingIntegralUint8(I); |
6489 | case PT_Sint8: |
6490 | return emitCastFloatingIntegralSint8(I); |
6491 | case PT_Uint16: |
6492 | return emitCastFloatingIntegralUint16(I); |
6493 | case PT_Sint16: |
6494 | return emitCastFloatingIntegralSint16(I); |
6495 | case PT_Uint32: |
6496 | return emitCastFloatingIntegralUint32(I); |
6497 | case PT_Sint32: |
6498 | return emitCastFloatingIntegralSint32(I); |
6499 | case PT_Uint64: |
6500 | return emitCastFloatingIntegralUint64(I); |
6501 | case PT_Sint64: |
6502 | return emitCastFloatingIntegralSint64(I); |
6503 | case PT_Bool: |
6504 | return emitCastFloatingIntegralBool(I); |
6505 | default: llvm_unreachable("invalid type: emitCastFloatingIntegral" ); |
6506 | } |
6507 | llvm_unreachable("invalid enum value" ); |
6508 | } |
6509 | #endif |
6510 | #ifdef GET_LINK_IMPL |
6511 | bool ByteCodeEmitter::emitCastFloatingIntegralUint8(const SourceInfo &L) { |
6512 | return emitOp<>(OP_CastFloatingIntegralUint8, L); |
6513 | } |
6514 | bool ByteCodeEmitter::emitCastFloatingIntegralSint8(const SourceInfo &L) { |
6515 | return emitOp<>(OP_CastFloatingIntegralSint8, L); |
6516 | } |
6517 | bool ByteCodeEmitter::emitCastFloatingIntegralUint16(const SourceInfo &L) { |
6518 | return emitOp<>(OP_CastFloatingIntegralUint16, L); |
6519 | } |
6520 | bool ByteCodeEmitter::emitCastFloatingIntegralSint16(const SourceInfo &L) { |
6521 | return emitOp<>(OP_CastFloatingIntegralSint16, L); |
6522 | } |
6523 | bool ByteCodeEmitter::emitCastFloatingIntegralUint32(const SourceInfo &L) { |
6524 | return emitOp<>(OP_CastFloatingIntegralUint32, L); |
6525 | } |
6526 | bool ByteCodeEmitter::emitCastFloatingIntegralSint32(const SourceInfo &L) { |
6527 | return emitOp<>(OP_CastFloatingIntegralSint32, L); |
6528 | } |
6529 | bool ByteCodeEmitter::emitCastFloatingIntegralUint64(const SourceInfo &L) { |
6530 | return emitOp<>(OP_CastFloatingIntegralUint64, L); |
6531 | } |
6532 | bool ByteCodeEmitter::emitCastFloatingIntegralSint64(const SourceInfo &L) { |
6533 | return emitOp<>(OP_CastFloatingIntegralSint64, L); |
6534 | } |
6535 | bool ByteCodeEmitter::emitCastFloatingIntegralBool(const SourceInfo &L) { |
6536 | return emitOp<>(OP_CastFloatingIntegralBool, L); |
6537 | } |
6538 | #endif |
6539 | #ifdef GET_EVAL_IMPL |
6540 | bool EvalEmitter::emitCastFloatingIntegralUint8(const SourceInfo &L) { |
6541 | if (!isActive()) return true; |
6542 | CurrentSource = L; |
6543 | return CastFloatingIntegral<PT_Uint8>(S, OpPC); |
6544 | } |
6545 | bool EvalEmitter::emitCastFloatingIntegralSint8(const SourceInfo &L) { |
6546 | if (!isActive()) return true; |
6547 | CurrentSource = L; |
6548 | return CastFloatingIntegral<PT_Sint8>(S, OpPC); |
6549 | } |
6550 | bool EvalEmitter::emitCastFloatingIntegralUint16(const SourceInfo &L) { |
6551 | if (!isActive()) return true; |
6552 | CurrentSource = L; |
6553 | return CastFloatingIntegral<PT_Uint16>(S, OpPC); |
6554 | } |
6555 | bool EvalEmitter::emitCastFloatingIntegralSint16(const SourceInfo &L) { |
6556 | if (!isActive()) return true; |
6557 | CurrentSource = L; |
6558 | return CastFloatingIntegral<PT_Sint16>(S, OpPC); |
6559 | } |
6560 | bool EvalEmitter::emitCastFloatingIntegralUint32(const SourceInfo &L) { |
6561 | if (!isActive()) return true; |
6562 | CurrentSource = L; |
6563 | return CastFloatingIntegral<PT_Uint32>(S, OpPC); |
6564 | } |
6565 | bool EvalEmitter::emitCastFloatingIntegralSint32(const SourceInfo &L) { |
6566 | if (!isActive()) return true; |
6567 | CurrentSource = L; |
6568 | return CastFloatingIntegral<PT_Sint32>(S, OpPC); |
6569 | } |
6570 | bool EvalEmitter::emitCastFloatingIntegralUint64(const SourceInfo &L) { |
6571 | if (!isActive()) return true; |
6572 | CurrentSource = L; |
6573 | return CastFloatingIntegral<PT_Uint64>(S, OpPC); |
6574 | } |
6575 | bool EvalEmitter::emitCastFloatingIntegralSint64(const SourceInfo &L) { |
6576 | if (!isActive()) return true; |
6577 | CurrentSource = L; |
6578 | return CastFloatingIntegral<PT_Sint64>(S, OpPC); |
6579 | } |
6580 | bool EvalEmitter::emitCastFloatingIntegralBool(const SourceInfo &L) { |
6581 | if (!isActive()) return true; |
6582 | CurrentSource = L; |
6583 | return CastFloatingIntegral<PT_Bool>(S, OpPC); |
6584 | } |
6585 | #endif |
6586 | #ifdef GET_OPCODE_NAMES |
6587 | OP_CastFloatingIntegralAP, |
6588 | #endif |
6589 | #ifdef GET_INTERP |
6590 | case OP_CastFloatingIntegralAP: { |
6591 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6592 | if (!CastFloatingIntegralAP(S, OpPC, V0)) |
6593 | return false; |
6594 | continue; |
6595 | } |
6596 | #endif |
6597 | #ifdef GET_DISASM |
6598 | case OP_CastFloatingIntegralAP: |
6599 | PrintName("CastFloatingIntegralAP" ); |
6600 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6601 | continue; |
6602 | #endif |
6603 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6604 | bool emitCastFloatingIntegralAP( uint32_t , const SourceInfo &); |
6605 | #endif |
6606 | #ifdef GET_LINK_IMPL |
6607 | bool ByteCodeEmitter::emitCastFloatingIntegralAP( uint32_t A0, const SourceInfo &L) { |
6608 | return emitOp<uint32_t>(OP_CastFloatingIntegralAP, A0, L); |
6609 | } |
6610 | #endif |
6611 | #ifdef GET_EVAL_IMPL |
6612 | bool EvalEmitter::emitCastFloatingIntegralAP( uint32_t A0, const SourceInfo &L) { |
6613 | if (!isActive()) return true; |
6614 | CurrentSource = L; |
6615 | return CastFloatingIntegralAP(S, OpPC, A0); |
6616 | } |
6617 | #endif |
6618 | #ifdef GET_OPCODE_NAMES |
6619 | OP_CastFloatingIntegralAPS, |
6620 | #endif |
6621 | #ifdef GET_INTERP |
6622 | case OP_CastFloatingIntegralAPS: { |
6623 | const auto V0 = ReadArg<uint32_t>(S, PC); |
6624 | if (!CastFloatingIntegralAPS(S, OpPC, V0)) |
6625 | return false; |
6626 | continue; |
6627 | } |
6628 | #endif |
6629 | #ifdef GET_DISASM |
6630 | case OP_CastFloatingIntegralAPS: |
6631 | PrintName("CastFloatingIntegralAPS" ); |
6632 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
6633 | continue; |
6634 | #endif |
6635 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6636 | bool emitCastFloatingIntegralAPS( uint32_t , const SourceInfo &); |
6637 | #endif |
6638 | #ifdef GET_LINK_IMPL |
6639 | bool ByteCodeEmitter::emitCastFloatingIntegralAPS( uint32_t A0, const SourceInfo &L) { |
6640 | return emitOp<uint32_t>(OP_CastFloatingIntegralAPS, A0, L); |
6641 | } |
6642 | #endif |
6643 | #ifdef GET_EVAL_IMPL |
6644 | bool EvalEmitter::emitCastFloatingIntegralAPS( uint32_t A0, const SourceInfo &L) { |
6645 | if (!isActive()) return true; |
6646 | CurrentSource = L; |
6647 | return CastFloatingIntegralAPS(S, OpPC, A0); |
6648 | } |
6649 | #endif |
6650 | #ifdef GET_OPCODE_NAMES |
6651 | OP_CastIntegralFloatingSint8, |
6652 | OP_CastIntegralFloatingUint8, |
6653 | OP_CastIntegralFloatingSint16, |
6654 | OP_CastIntegralFloatingUint16, |
6655 | OP_CastIntegralFloatingSint32, |
6656 | OP_CastIntegralFloatingUint32, |
6657 | OP_CastIntegralFloatingSint64, |
6658 | OP_CastIntegralFloatingUint64, |
6659 | OP_CastIntegralFloatingIntAP, |
6660 | OP_CastIntegralFloatingIntAPS, |
6661 | OP_CastIntegralFloatingBool, |
6662 | #endif |
6663 | #ifdef GET_INTERP |
6664 | case OP_CastIntegralFloatingSint8: { |
6665 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6666 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6667 | if (!CastIntegralFloating<PT_Sint8>(S, OpPC, V0, V1)) |
6668 | return false; |
6669 | continue; |
6670 | } |
6671 | case OP_CastIntegralFloatingUint8: { |
6672 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6673 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6674 | if (!CastIntegralFloating<PT_Uint8>(S, OpPC, V0, V1)) |
6675 | return false; |
6676 | continue; |
6677 | } |
6678 | case OP_CastIntegralFloatingSint16: { |
6679 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6680 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6681 | if (!CastIntegralFloating<PT_Sint16>(S, OpPC, V0, V1)) |
6682 | return false; |
6683 | continue; |
6684 | } |
6685 | case OP_CastIntegralFloatingUint16: { |
6686 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6687 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6688 | if (!CastIntegralFloating<PT_Uint16>(S, OpPC, V0, V1)) |
6689 | return false; |
6690 | continue; |
6691 | } |
6692 | case OP_CastIntegralFloatingSint32: { |
6693 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6694 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6695 | if (!CastIntegralFloating<PT_Sint32>(S, OpPC, V0, V1)) |
6696 | return false; |
6697 | continue; |
6698 | } |
6699 | case OP_CastIntegralFloatingUint32: { |
6700 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6701 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6702 | if (!CastIntegralFloating<PT_Uint32>(S, OpPC, V0, V1)) |
6703 | return false; |
6704 | continue; |
6705 | } |
6706 | case OP_CastIntegralFloatingSint64: { |
6707 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6708 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6709 | if (!CastIntegralFloating<PT_Sint64>(S, OpPC, V0, V1)) |
6710 | return false; |
6711 | continue; |
6712 | } |
6713 | case OP_CastIntegralFloatingUint64: { |
6714 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6715 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6716 | if (!CastIntegralFloating<PT_Uint64>(S, OpPC, V0, V1)) |
6717 | return false; |
6718 | continue; |
6719 | } |
6720 | case OP_CastIntegralFloatingIntAP: { |
6721 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6722 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6723 | if (!CastIntegralFloating<PT_IntAP>(S, OpPC, V0, V1)) |
6724 | return false; |
6725 | continue; |
6726 | } |
6727 | case OP_CastIntegralFloatingIntAPS: { |
6728 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6729 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6730 | if (!CastIntegralFloating<PT_IntAPS>(S, OpPC, V0, V1)) |
6731 | return false; |
6732 | continue; |
6733 | } |
6734 | case OP_CastIntegralFloatingBool: { |
6735 | const auto V0 = ReadArg<const llvm::fltSemantics *>(S, PC); |
6736 | const auto V1 = ReadArg<llvm::RoundingMode>(S, PC); |
6737 | if (!CastIntegralFloating<PT_Bool>(S, OpPC, V0, V1)) |
6738 | return false; |
6739 | continue; |
6740 | } |
6741 | #endif |
6742 | #ifdef GET_DISASM |
6743 | case OP_CastIntegralFloatingSint8: |
6744 | PrintName("CastIntegralFloatingSint8" ); |
6745 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6746 | continue; |
6747 | case OP_CastIntegralFloatingUint8: |
6748 | PrintName("CastIntegralFloatingUint8" ); |
6749 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6750 | continue; |
6751 | case OP_CastIntegralFloatingSint16: |
6752 | PrintName("CastIntegralFloatingSint16" ); |
6753 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6754 | continue; |
6755 | case OP_CastIntegralFloatingUint16: |
6756 | PrintName("CastIntegralFloatingUint16" ); |
6757 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6758 | continue; |
6759 | case OP_CastIntegralFloatingSint32: |
6760 | PrintName("CastIntegralFloatingSint32" ); |
6761 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6762 | continue; |
6763 | case OP_CastIntegralFloatingUint32: |
6764 | PrintName("CastIntegralFloatingUint32" ); |
6765 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6766 | continue; |
6767 | case OP_CastIntegralFloatingSint64: |
6768 | PrintName("CastIntegralFloatingSint64" ); |
6769 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6770 | continue; |
6771 | case OP_CastIntegralFloatingUint64: |
6772 | PrintName("CastIntegralFloatingUint64" ); |
6773 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6774 | continue; |
6775 | case OP_CastIntegralFloatingIntAP: |
6776 | PrintName("CastIntegralFloatingIntAP" ); |
6777 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6778 | continue; |
6779 | case OP_CastIntegralFloatingIntAPS: |
6780 | PrintName("CastIntegralFloatingIntAPS" ); |
6781 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6782 | continue; |
6783 | case OP_CastIntegralFloatingBool: |
6784 | PrintName("CastIntegralFloatingBool" ); |
6785 | OS << "\t" << ReadArg<const llvm::fltSemantics *>(P, PC) << " " << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
6786 | continue; |
6787 | #endif |
6788 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6789 | bool emitCastIntegralFloatingSint8( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6790 | bool emitCastIntegralFloatingUint8( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6791 | bool emitCastIntegralFloatingSint16( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6792 | bool emitCastIntegralFloatingUint16( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6793 | bool emitCastIntegralFloatingSint32( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6794 | bool emitCastIntegralFloatingUint32( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6795 | bool emitCastIntegralFloatingSint64( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6796 | bool emitCastIntegralFloatingUint64( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6797 | bool emitCastIntegralFloatingIntAP( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6798 | bool emitCastIntegralFloatingIntAPS( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6799 | bool emitCastIntegralFloatingBool( const llvm::fltSemantics * , llvm::RoundingMode , const SourceInfo &); |
6800 | #endif |
6801 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6802 | [[nodiscard]] bool emitCastIntegralFloating(PrimType, const llvm::fltSemantics *, llvm::RoundingMode, const SourceInfo &I); |
6803 | #endif |
6804 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
6805 | bool |
6806 | #if defined(GET_EVAL_IMPL) |
6807 | EvalEmitter |
6808 | #else |
6809 | ByteCodeEmitter |
6810 | #endif |
6811 | ::emitCastIntegralFloating(PrimType T0, const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &I) { |
6812 | switch (T0) { |
6813 | case PT_Sint8: |
6814 | return emitCastIntegralFloatingSint8(A0, A1, I); |
6815 | case PT_Uint8: |
6816 | return emitCastIntegralFloatingUint8(A0, A1, I); |
6817 | case PT_Sint16: |
6818 | return emitCastIntegralFloatingSint16(A0, A1, I); |
6819 | case PT_Uint16: |
6820 | return emitCastIntegralFloatingUint16(A0, A1, I); |
6821 | case PT_Sint32: |
6822 | return emitCastIntegralFloatingSint32(A0, A1, I); |
6823 | case PT_Uint32: |
6824 | return emitCastIntegralFloatingUint32(A0, A1, I); |
6825 | case PT_Sint64: |
6826 | return emitCastIntegralFloatingSint64(A0, A1, I); |
6827 | case PT_Uint64: |
6828 | return emitCastIntegralFloatingUint64(A0, A1, I); |
6829 | case PT_IntAP: |
6830 | return emitCastIntegralFloatingIntAP(A0, A1, I); |
6831 | case PT_IntAPS: |
6832 | return emitCastIntegralFloatingIntAPS(A0, A1, I); |
6833 | case PT_Bool: |
6834 | return emitCastIntegralFloatingBool(A0, A1, I); |
6835 | default: llvm_unreachable("invalid type: emitCastIntegralFloating" ); |
6836 | } |
6837 | llvm_unreachable("invalid enum value" ); |
6838 | } |
6839 | #endif |
6840 | #ifdef GET_LINK_IMPL |
6841 | bool ByteCodeEmitter::emitCastIntegralFloatingSint8( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6842 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingSint8, A0, A1, L); |
6843 | } |
6844 | bool ByteCodeEmitter::emitCastIntegralFloatingUint8( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6845 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingUint8, A0, A1, L); |
6846 | } |
6847 | bool ByteCodeEmitter::emitCastIntegralFloatingSint16( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6848 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingSint16, A0, A1, L); |
6849 | } |
6850 | bool ByteCodeEmitter::emitCastIntegralFloatingUint16( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6851 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingUint16, A0, A1, L); |
6852 | } |
6853 | bool ByteCodeEmitter::emitCastIntegralFloatingSint32( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6854 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingSint32, A0, A1, L); |
6855 | } |
6856 | bool ByteCodeEmitter::emitCastIntegralFloatingUint32( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6857 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingUint32, A0, A1, L); |
6858 | } |
6859 | bool ByteCodeEmitter::emitCastIntegralFloatingSint64( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6860 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingSint64, A0, A1, L); |
6861 | } |
6862 | bool ByteCodeEmitter::emitCastIntegralFloatingUint64( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6863 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingUint64, A0, A1, L); |
6864 | } |
6865 | bool ByteCodeEmitter::emitCastIntegralFloatingIntAP( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6866 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingIntAP, A0, A1, L); |
6867 | } |
6868 | bool ByteCodeEmitter::emitCastIntegralFloatingIntAPS( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6869 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingIntAPS, A0, A1, L); |
6870 | } |
6871 | bool ByteCodeEmitter::emitCastIntegralFloatingBool( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6872 | return emitOp<const llvm::fltSemantics *, llvm::RoundingMode>(OP_CastIntegralFloatingBool, A0, A1, L); |
6873 | } |
6874 | #endif |
6875 | #ifdef GET_EVAL_IMPL |
6876 | bool EvalEmitter::emitCastIntegralFloatingSint8( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6877 | if (!isActive()) return true; |
6878 | CurrentSource = L; |
6879 | return CastIntegralFloating<PT_Sint8>(S, OpPC, A0, A1); |
6880 | } |
6881 | bool EvalEmitter::emitCastIntegralFloatingUint8( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6882 | if (!isActive()) return true; |
6883 | CurrentSource = L; |
6884 | return CastIntegralFloating<PT_Uint8>(S, OpPC, A0, A1); |
6885 | } |
6886 | bool EvalEmitter::emitCastIntegralFloatingSint16( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6887 | if (!isActive()) return true; |
6888 | CurrentSource = L; |
6889 | return CastIntegralFloating<PT_Sint16>(S, OpPC, A0, A1); |
6890 | } |
6891 | bool EvalEmitter::emitCastIntegralFloatingUint16( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6892 | if (!isActive()) return true; |
6893 | CurrentSource = L; |
6894 | return CastIntegralFloating<PT_Uint16>(S, OpPC, A0, A1); |
6895 | } |
6896 | bool EvalEmitter::emitCastIntegralFloatingSint32( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6897 | if (!isActive()) return true; |
6898 | CurrentSource = L; |
6899 | return CastIntegralFloating<PT_Sint32>(S, OpPC, A0, A1); |
6900 | } |
6901 | bool EvalEmitter::emitCastIntegralFloatingUint32( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6902 | if (!isActive()) return true; |
6903 | CurrentSource = L; |
6904 | return CastIntegralFloating<PT_Uint32>(S, OpPC, A0, A1); |
6905 | } |
6906 | bool EvalEmitter::emitCastIntegralFloatingSint64( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6907 | if (!isActive()) return true; |
6908 | CurrentSource = L; |
6909 | return CastIntegralFloating<PT_Sint64>(S, OpPC, A0, A1); |
6910 | } |
6911 | bool EvalEmitter::emitCastIntegralFloatingUint64( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6912 | if (!isActive()) return true; |
6913 | CurrentSource = L; |
6914 | return CastIntegralFloating<PT_Uint64>(S, OpPC, A0, A1); |
6915 | } |
6916 | bool EvalEmitter::emitCastIntegralFloatingIntAP( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6917 | if (!isActive()) return true; |
6918 | CurrentSource = L; |
6919 | return CastIntegralFloating<PT_IntAP>(S, OpPC, A0, A1); |
6920 | } |
6921 | bool EvalEmitter::emitCastIntegralFloatingIntAPS( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6922 | if (!isActive()) return true; |
6923 | CurrentSource = L; |
6924 | return CastIntegralFloating<PT_IntAPS>(S, OpPC, A0, A1); |
6925 | } |
6926 | bool EvalEmitter::emitCastIntegralFloatingBool( const llvm::fltSemantics * A0, llvm::RoundingMode A1, const SourceInfo &L) { |
6927 | if (!isActive()) return true; |
6928 | CurrentSource = L; |
6929 | return CastIntegralFloating<PT_Bool>(S, OpPC, A0, A1); |
6930 | } |
6931 | #endif |
6932 | #ifdef GET_OPCODE_NAMES |
6933 | OP_CastMemberPtrPtr, |
6934 | #endif |
6935 | #ifdef GET_INTERP |
6936 | case OP_CastMemberPtrPtr: { |
6937 | if (!CastMemberPtrPtr(S, OpPC)) |
6938 | return false; |
6939 | continue; |
6940 | } |
6941 | #endif |
6942 | #ifdef GET_DISASM |
6943 | case OP_CastMemberPtrPtr: |
6944 | PrintName("CastMemberPtrPtr" ); |
6945 | OS << "\t" << "\n" ; |
6946 | continue; |
6947 | #endif |
6948 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
6949 | bool emitCastMemberPtrPtr(const SourceInfo &); |
6950 | #endif |
6951 | #ifdef GET_LINK_IMPL |
6952 | bool ByteCodeEmitter::emitCastMemberPtrPtr(const SourceInfo &L) { |
6953 | return emitOp<>(OP_CastMemberPtrPtr, L); |
6954 | } |
6955 | #endif |
6956 | #ifdef GET_EVAL_IMPL |
6957 | bool EvalEmitter::emitCastMemberPtrPtr(const SourceInfo &L) { |
6958 | if (!isActive()) return true; |
6959 | CurrentSource = L; |
6960 | return CastMemberPtrPtr(S, OpPC); |
6961 | } |
6962 | #endif |
6963 | #ifdef GET_OPCODE_NAMES |
6964 | OP_CastPointerIntegralSint8, |
6965 | OP_CastPointerIntegralUint8, |
6966 | OP_CastPointerIntegralSint16, |
6967 | OP_CastPointerIntegralUint16, |
6968 | OP_CastPointerIntegralSint32, |
6969 | OP_CastPointerIntegralUint32, |
6970 | OP_CastPointerIntegralSint64, |
6971 | OP_CastPointerIntegralUint64, |
6972 | OP_CastPointerIntegralBool, |
6973 | #endif |
6974 | #ifdef GET_INTERP |
6975 | case OP_CastPointerIntegralSint8: { |
6976 | if (!CastPointerIntegral<PT_Sint8>(S, OpPC)) |
6977 | return false; |
6978 | continue; |
6979 | } |
6980 | case OP_CastPointerIntegralUint8: { |
6981 | if (!CastPointerIntegral<PT_Uint8>(S, OpPC)) |
6982 | return false; |
6983 | continue; |
6984 | } |
6985 | case OP_CastPointerIntegralSint16: { |
6986 | if (!CastPointerIntegral<PT_Sint16>(S, OpPC)) |
6987 | return false; |
6988 | continue; |
6989 | } |
6990 | case OP_CastPointerIntegralUint16: { |
6991 | if (!CastPointerIntegral<PT_Uint16>(S, OpPC)) |
6992 | return false; |
6993 | continue; |
6994 | } |
6995 | case OP_CastPointerIntegralSint32: { |
6996 | if (!CastPointerIntegral<PT_Sint32>(S, OpPC)) |
6997 | return false; |
6998 | continue; |
6999 | } |
7000 | case OP_CastPointerIntegralUint32: { |
7001 | if (!CastPointerIntegral<PT_Uint32>(S, OpPC)) |
7002 | return false; |
7003 | continue; |
7004 | } |
7005 | case OP_CastPointerIntegralSint64: { |
7006 | if (!CastPointerIntegral<PT_Sint64>(S, OpPC)) |
7007 | return false; |
7008 | continue; |
7009 | } |
7010 | case OP_CastPointerIntegralUint64: { |
7011 | if (!CastPointerIntegral<PT_Uint64>(S, OpPC)) |
7012 | return false; |
7013 | continue; |
7014 | } |
7015 | case OP_CastPointerIntegralBool: { |
7016 | if (!CastPointerIntegral<PT_Bool>(S, OpPC)) |
7017 | return false; |
7018 | continue; |
7019 | } |
7020 | #endif |
7021 | #ifdef GET_DISASM |
7022 | case OP_CastPointerIntegralSint8: |
7023 | PrintName("CastPointerIntegralSint8" ); |
7024 | OS << "\t" << "\n" ; |
7025 | continue; |
7026 | case OP_CastPointerIntegralUint8: |
7027 | PrintName("CastPointerIntegralUint8" ); |
7028 | OS << "\t" << "\n" ; |
7029 | continue; |
7030 | case OP_CastPointerIntegralSint16: |
7031 | PrintName("CastPointerIntegralSint16" ); |
7032 | OS << "\t" << "\n" ; |
7033 | continue; |
7034 | case OP_CastPointerIntegralUint16: |
7035 | PrintName("CastPointerIntegralUint16" ); |
7036 | OS << "\t" << "\n" ; |
7037 | continue; |
7038 | case OP_CastPointerIntegralSint32: |
7039 | PrintName("CastPointerIntegralSint32" ); |
7040 | OS << "\t" << "\n" ; |
7041 | continue; |
7042 | case OP_CastPointerIntegralUint32: |
7043 | PrintName("CastPointerIntegralUint32" ); |
7044 | OS << "\t" << "\n" ; |
7045 | continue; |
7046 | case OP_CastPointerIntegralSint64: |
7047 | PrintName("CastPointerIntegralSint64" ); |
7048 | OS << "\t" << "\n" ; |
7049 | continue; |
7050 | case OP_CastPointerIntegralUint64: |
7051 | PrintName("CastPointerIntegralUint64" ); |
7052 | OS << "\t" << "\n" ; |
7053 | continue; |
7054 | case OP_CastPointerIntegralBool: |
7055 | PrintName("CastPointerIntegralBool" ); |
7056 | OS << "\t" << "\n" ; |
7057 | continue; |
7058 | #endif |
7059 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7060 | bool emitCastPointerIntegralSint8(const SourceInfo &); |
7061 | bool emitCastPointerIntegralUint8(const SourceInfo &); |
7062 | bool emitCastPointerIntegralSint16(const SourceInfo &); |
7063 | bool emitCastPointerIntegralUint16(const SourceInfo &); |
7064 | bool emitCastPointerIntegralSint32(const SourceInfo &); |
7065 | bool emitCastPointerIntegralUint32(const SourceInfo &); |
7066 | bool emitCastPointerIntegralSint64(const SourceInfo &); |
7067 | bool emitCastPointerIntegralUint64(const SourceInfo &); |
7068 | bool emitCastPointerIntegralBool(const SourceInfo &); |
7069 | #endif |
7070 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7071 | [[nodiscard]] bool emitCastPointerIntegral(PrimType, const SourceInfo &I); |
7072 | #endif |
7073 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
7074 | bool |
7075 | #if defined(GET_EVAL_IMPL) |
7076 | EvalEmitter |
7077 | #else |
7078 | ByteCodeEmitter |
7079 | #endif |
7080 | ::emitCastPointerIntegral(PrimType T0, const SourceInfo &I) { |
7081 | switch (T0) { |
7082 | case PT_Sint8: |
7083 | return emitCastPointerIntegralSint8(I); |
7084 | case PT_Uint8: |
7085 | return emitCastPointerIntegralUint8(I); |
7086 | case PT_Sint16: |
7087 | return emitCastPointerIntegralSint16(I); |
7088 | case PT_Uint16: |
7089 | return emitCastPointerIntegralUint16(I); |
7090 | case PT_Sint32: |
7091 | return emitCastPointerIntegralSint32(I); |
7092 | case PT_Uint32: |
7093 | return emitCastPointerIntegralUint32(I); |
7094 | case PT_Sint64: |
7095 | return emitCastPointerIntegralSint64(I); |
7096 | case PT_Uint64: |
7097 | return emitCastPointerIntegralUint64(I); |
7098 | case PT_Bool: |
7099 | return emitCastPointerIntegralBool(I); |
7100 | default: llvm_unreachable("invalid type: emitCastPointerIntegral" ); |
7101 | } |
7102 | llvm_unreachable("invalid enum value" ); |
7103 | } |
7104 | #endif |
7105 | #ifdef GET_LINK_IMPL |
7106 | bool ByteCodeEmitter::emitCastPointerIntegralSint8(const SourceInfo &L) { |
7107 | return emitOp<>(OP_CastPointerIntegralSint8, L); |
7108 | } |
7109 | bool ByteCodeEmitter::emitCastPointerIntegralUint8(const SourceInfo &L) { |
7110 | return emitOp<>(OP_CastPointerIntegralUint8, L); |
7111 | } |
7112 | bool ByteCodeEmitter::emitCastPointerIntegralSint16(const SourceInfo &L) { |
7113 | return emitOp<>(OP_CastPointerIntegralSint16, L); |
7114 | } |
7115 | bool ByteCodeEmitter::emitCastPointerIntegralUint16(const SourceInfo &L) { |
7116 | return emitOp<>(OP_CastPointerIntegralUint16, L); |
7117 | } |
7118 | bool ByteCodeEmitter::emitCastPointerIntegralSint32(const SourceInfo &L) { |
7119 | return emitOp<>(OP_CastPointerIntegralSint32, L); |
7120 | } |
7121 | bool ByteCodeEmitter::emitCastPointerIntegralUint32(const SourceInfo &L) { |
7122 | return emitOp<>(OP_CastPointerIntegralUint32, L); |
7123 | } |
7124 | bool ByteCodeEmitter::emitCastPointerIntegralSint64(const SourceInfo &L) { |
7125 | return emitOp<>(OP_CastPointerIntegralSint64, L); |
7126 | } |
7127 | bool ByteCodeEmitter::emitCastPointerIntegralUint64(const SourceInfo &L) { |
7128 | return emitOp<>(OP_CastPointerIntegralUint64, L); |
7129 | } |
7130 | bool ByteCodeEmitter::emitCastPointerIntegralBool(const SourceInfo &L) { |
7131 | return emitOp<>(OP_CastPointerIntegralBool, L); |
7132 | } |
7133 | #endif |
7134 | #ifdef GET_EVAL_IMPL |
7135 | bool EvalEmitter::emitCastPointerIntegralSint8(const SourceInfo &L) { |
7136 | if (!isActive()) return true; |
7137 | CurrentSource = L; |
7138 | return CastPointerIntegral<PT_Sint8>(S, OpPC); |
7139 | } |
7140 | bool EvalEmitter::emitCastPointerIntegralUint8(const SourceInfo &L) { |
7141 | if (!isActive()) return true; |
7142 | CurrentSource = L; |
7143 | return CastPointerIntegral<PT_Uint8>(S, OpPC); |
7144 | } |
7145 | bool EvalEmitter::emitCastPointerIntegralSint16(const SourceInfo &L) { |
7146 | if (!isActive()) return true; |
7147 | CurrentSource = L; |
7148 | return CastPointerIntegral<PT_Sint16>(S, OpPC); |
7149 | } |
7150 | bool EvalEmitter::emitCastPointerIntegralUint16(const SourceInfo &L) { |
7151 | if (!isActive()) return true; |
7152 | CurrentSource = L; |
7153 | return CastPointerIntegral<PT_Uint16>(S, OpPC); |
7154 | } |
7155 | bool EvalEmitter::emitCastPointerIntegralSint32(const SourceInfo &L) { |
7156 | if (!isActive()) return true; |
7157 | CurrentSource = L; |
7158 | return CastPointerIntegral<PT_Sint32>(S, OpPC); |
7159 | } |
7160 | bool EvalEmitter::emitCastPointerIntegralUint32(const SourceInfo &L) { |
7161 | if (!isActive()) return true; |
7162 | CurrentSource = L; |
7163 | return CastPointerIntegral<PT_Uint32>(S, OpPC); |
7164 | } |
7165 | bool EvalEmitter::emitCastPointerIntegralSint64(const SourceInfo &L) { |
7166 | if (!isActive()) return true; |
7167 | CurrentSource = L; |
7168 | return CastPointerIntegral<PT_Sint64>(S, OpPC); |
7169 | } |
7170 | bool EvalEmitter::emitCastPointerIntegralUint64(const SourceInfo &L) { |
7171 | if (!isActive()) return true; |
7172 | CurrentSource = L; |
7173 | return CastPointerIntegral<PT_Uint64>(S, OpPC); |
7174 | } |
7175 | bool EvalEmitter::emitCastPointerIntegralBool(const SourceInfo &L) { |
7176 | if (!isActive()) return true; |
7177 | CurrentSource = L; |
7178 | return CastPointerIntegral<PT_Bool>(S, OpPC); |
7179 | } |
7180 | #endif |
7181 | #ifdef GET_OPCODE_NAMES |
7182 | OP_CastPointerIntegralAP, |
7183 | #endif |
7184 | #ifdef GET_INTERP |
7185 | case OP_CastPointerIntegralAP: { |
7186 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7187 | if (!CastPointerIntegralAP(S, OpPC, V0)) |
7188 | return false; |
7189 | continue; |
7190 | } |
7191 | #endif |
7192 | #ifdef GET_DISASM |
7193 | case OP_CastPointerIntegralAP: |
7194 | PrintName("CastPointerIntegralAP" ); |
7195 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
7196 | continue; |
7197 | #endif |
7198 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7199 | bool emitCastPointerIntegralAP( uint32_t , const SourceInfo &); |
7200 | #endif |
7201 | #ifdef GET_LINK_IMPL |
7202 | bool ByteCodeEmitter::emitCastPointerIntegralAP( uint32_t A0, const SourceInfo &L) { |
7203 | return emitOp<uint32_t>(OP_CastPointerIntegralAP, A0, L); |
7204 | } |
7205 | #endif |
7206 | #ifdef GET_EVAL_IMPL |
7207 | bool EvalEmitter::emitCastPointerIntegralAP( uint32_t A0, const SourceInfo &L) { |
7208 | if (!isActive()) return true; |
7209 | CurrentSource = L; |
7210 | return CastPointerIntegralAP(S, OpPC, A0); |
7211 | } |
7212 | #endif |
7213 | #ifdef GET_OPCODE_NAMES |
7214 | OP_CastPointerIntegralAPS, |
7215 | #endif |
7216 | #ifdef GET_INTERP |
7217 | case OP_CastPointerIntegralAPS: { |
7218 | const auto V0 = ReadArg<uint32_t>(S, PC); |
7219 | if (!CastPointerIntegralAPS(S, OpPC, V0)) |
7220 | return false; |
7221 | continue; |
7222 | } |
7223 | #endif |
7224 | #ifdef GET_DISASM |
7225 | case OP_CastPointerIntegralAPS: |
7226 | PrintName("CastPointerIntegralAPS" ); |
7227 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
7228 | continue; |
7229 | #endif |
7230 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7231 | bool emitCastPointerIntegralAPS( uint32_t , const SourceInfo &); |
7232 | #endif |
7233 | #ifdef GET_LINK_IMPL |
7234 | bool ByteCodeEmitter::emitCastPointerIntegralAPS( uint32_t A0, const SourceInfo &L) { |
7235 | return emitOp<uint32_t>(OP_CastPointerIntegralAPS, A0, L); |
7236 | } |
7237 | #endif |
7238 | #ifdef GET_EVAL_IMPL |
7239 | bool EvalEmitter::emitCastPointerIntegralAPS( uint32_t A0, const SourceInfo &L) { |
7240 | if (!isActive()) return true; |
7241 | CurrentSource = L; |
7242 | return CastPointerIntegralAPS(S, OpPC, A0); |
7243 | } |
7244 | #endif |
7245 | #ifdef GET_OPCODE_NAMES |
7246 | OP_CheckDecl, |
7247 | #endif |
7248 | #ifdef GET_INTERP |
7249 | case OP_CheckDecl: { |
7250 | const auto V0 = ReadArg<const VarDecl*>(S, PC); |
7251 | if (!CheckDecl(S, OpPC, V0)) |
7252 | return false; |
7253 | continue; |
7254 | } |
7255 | #endif |
7256 | #ifdef GET_DISASM |
7257 | case OP_CheckDecl: |
7258 | PrintName("CheckDecl" ); |
7259 | OS << "\t" << ReadArg<const VarDecl*>(P, PC) << " " << "\n" ; |
7260 | continue; |
7261 | #endif |
7262 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7263 | bool emitCheckDecl( const VarDecl* , const SourceInfo &); |
7264 | #endif |
7265 | #ifdef GET_LINK_IMPL |
7266 | bool ByteCodeEmitter::emitCheckDecl( const VarDecl* A0, const SourceInfo &L) { |
7267 | return emitOp<const VarDecl*>(OP_CheckDecl, A0, L); |
7268 | } |
7269 | #endif |
7270 | #ifdef GET_EVAL_IMPL |
7271 | bool EvalEmitter::emitCheckDecl( const VarDecl* A0, const SourceInfo &L) { |
7272 | if (!isActive()) return true; |
7273 | CurrentSource = L; |
7274 | return CheckDecl(S, OpPC, A0); |
7275 | } |
7276 | #endif |
7277 | #ifdef GET_OPCODE_NAMES |
7278 | OP_CheckEnumValueSint8, |
7279 | OP_CheckEnumValueUint8, |
7280 | OP_CheckEnumValueSint16, |
7281 | OP_CheckEnumValueUint16, |
7282 | OP_CheckEnumValueSint32, |
7283 | OP_CheckEnumValueUint32, |
7284 | OP_CheckEnumValueSint64, |
7285 | OP_CheckEnumValueUint64, |
7286 | OP_CheckEnumValueBool, |
7287 | #endif |
7288 | #ifdef GET_INTERP |
7289 | case OP_CheckEnumValueSint8: { |
7290 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7291 | if (!CheckEnumValue<PT_Sint8>(S, OpPC, V0)) |
7292 | return false; |
7293 | continue; |
7294 | } |
7295 | case OP_CheckEnumValueUint8: { |
7296 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7297 | if (!CheckEnumValue<PT_Uint8>(S, OpPC, V0)) |
7298 | return false; |
7299 | continue; |
7300 | } |
7301 | case OP_CheckEnumValueSint16: { |
7302 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7303 | if (!CheckEnumValue<PT_Sint16>(S, OpPC, V0)) |
7304 | return false; |
7305 | continue; |
7306 | } |
7307 | case OP_CheckEnumValueUint16: { |
7308 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7309 | if (!CheckEnumValue<PT_Uint16>(S, OpPC, V0)) |
7310 | return false; |
7311 | continue; |
7312 | } |
7313 | case OP_CheckEnumValueSint32: { |
7314 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7315 | if (!CheckEnumValue<PT_Sint32>(S, OpPC, V0)) |
7316 | return false; |
7317 | continue; |
7318 | } |
7319 | case OP_CheckEnumValueUint32: { |
7320 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7321 | if (!CheckEnumValue<PT_Uint32>(S, OpPC, V0)) |
7322 | return false; |
7323 | continue; |
7324 | } |
7325 | case OP_CheckEnumValueSint64: { |
7326 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7327 | if (!CheckEnumValue<PT_Sint64>(S, OpPC, V0)) |
7328 | return false; |
7329 | continue; |
7330 | } |
7331 | case OP_CheckEnumValueUint64: { |
7332 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7333 | if (!CheckEnumValue<PT_Uint64>(S, OpPC, V0)) |
7334 | return false; |
7335 | continue; |
7336 | } |
7337 | case OP_CheckEnumValueBool: { |
7338 | const auto V0 = ReadArg<const EnumDecl *>(S, PC); |
7339 | if (!CheckEnumValue<PT_Bool>(S, OpPC, V0)) |
7340 | return false; |
7341 | continue; |
7342 | } |
7343 | #endif |
7344 | #ifdef GET_DISASM |
7345 | case OP_CheckEnumValueSint8: |
7346 | PrintName("CheckEnumValueSint8" ); |
7347 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7348 | continue; |
7349 | case OP_CheckEnumValueUint8: |
7350 | PrintName("CheckEnumValueUint8" ); |
7351 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7352 | continue; |
7353 | case OP_CheckEnumValueSint16: |
7354 | PrintName("CheckEnumValueSint16" ); |
7355 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7356 | continue; |
7357 | case OP_CheckEnumValueUint16: |
7358 | PrintName("CheckEnumValueUint16" ); |
7359 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7360 | continue; |
7361 | case OP_CheckEnumValueSint32: |
7362 | PrintName("CheckEnumValueSint32" ); |
7363 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7364 | continue; |
7365 | case OP_CheckEnumValueUint32: |
7366 | PrintName("CheckEnumValueUint32" ); |
7367 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7368 | continue; |
7369 | case OP_CheckEnumValueSint64: |
7370 | PrintName("CheckEnumValueSint64" ); |
7371 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7372 | continue; |
7373 | case OP_CheckEnumValueUint64: |
7374 | PrintName("CheckEnumValueUint64" ); |
7375 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7376 | continue; |
7377 | case OP_CheckEnumValueBool: |
7378 | PrintName("CheckEnumValueBool" ); |
7379 | OS << "\t" << ReadArg<const EnumDecl *>(P, PC) << " " << "\n" ; |
7380 | continue; |
7381 | #endif |
7382 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7383 | bool emitCheckEnumValueSint8( const EnumDecl * , const SourceInfo &); |
7384 | bool emitCheckEnumValueUint8( const EnumDecl * , const SourceInfo &); |
7385 | bool emitCheckEnumValueSint16( const EnumDecl * , const SourceInfo &); |
7386 | bool emitCheckEnumValueUint16( const EnumDecl * , const SourceInfo &); |
7387 | bool emitCheckEnumValueSint32( const EnumDecl * , const SourceInfo &); |
7388 | bool emitCheckEnumValueUint32( const EnumDecl * , const SourceInfo &); |
7389 | bool emitCheckEnumValueSint64( const EnumDecl * , const SourceInfo &); |
7390 | bool emitCheckEnumValueUint64( const EnumDecl * , const SourceInfo &); |
7391 | bool emitCheckEnumValueBool( const EnumDecl * , const SourceInfo &); |
7392 | #endif |
7393 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7394 | [[nodiscard]] bool emitCheckEnumValue(PrimType, const EnumDecl *, const SourceInfo &I); |
7395 | #endif |
7396 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
7397 | bool |
7398 | #if defined(GET_EVAL_IMPL) |
7399 | EvalEmitter |
7400 | #else |
7401 | ByteCodeEmitter |
7402 | #endif |
7403 | ::emitCheckEnumValue(PrimType T0, const EnumDecl * A0, const SourceInfo &I) { |
7404 | switch (T0) { |
7405 | case PT_Sint8: |
7406 | return emitCheckEnumValueSint8(A0, I); |
7407 | case PT_Uint8: |
7408 | return emitCheckEnumValueUint8(A0, I); |
7409 | case PT_Sint16: |
7410 | return emitCheckEnumValueSint16(A0, I); |
7411 | case PT_Uint16: |
7412 | return emitCheckEnumValueUint16(A0, I); |
7413 | case PT_Sint32: |
7414 | return emitCheckEnumValueSint32(A0, I); |
7415 | case PT_Uint32: |
7416 | return emitCheckEnumValueUint32(A0, I); |
7417 | case PT_Sint64: |
7418 | return emitCheckEnumValueSint64(A0, I); |
7419 | case PT_Uint64: |
7420 | return emitCheckEnumValueUint64(A0, I); |
7421 | case PT_Bool: |
7422 | return emitCheckEnumValueBool(A0, I); |
7423 | default: llvm_unreachable("invalid type: emitCheckEnumValue" ); |
7424 | } |
7425 | llvm_unreachable("invalid enum value" ); |
7426 | } |
7427 | #endif |
7428 | #ifdef GET_LINK_IMPL |
7429 | bool ByteCodeEmitter::emitCheckEnumValueSint8( const EnumDecl * A0, const SourceInfo &L) { |
7430 | return emitOp<const EnumDecl *>(OP_CheckEnumValueSint8, A0, L); |
7431 | } |
7432 | bool ByteCodeEmitter::emitCheckEnumValueUint8( const EnumDecl * A0, const SourceInfo &L) { |
7433 | return emitOp<const EnumDecl *>(OP_CheckEnumValueUint8, A0, L); |
7434 | } |
7435 | bool ByteCodeEmitter::emitCheckEnumValueSint16( const EnumDecl * A0, const SourceInfo &L) { |
7436 | return emitOp<const EnumDecl *>(OP_CheckEnumValueSint16, A0, L); |
7437 | } |
7438 | bool ByteCodeEmitter::emitCheckEnumValueUint16( const EnumDecl * A0, const SourceInfo &L) { |
7439 | return emitOp<const EnumDecl *>(OP_CheckEnumValueUint16, A0, L); |
7440 | } |
7441 | bool ByteCodeEmitter::emitCheckEnumValueSint32( const EnumDecl * A0, const SourceInfo &L) { |
7442 | return emitOp<const EnumDecl *>(OP_CheckEnumValueSint32, A0, L); |
7443 | } |
7444 | bool ByteCodeEmitter::emitCheckEnumValueUint32( const EnumDecl * A0, const SourceInfo &L) { |
7445 | return emitOp<const EnumDecl *>(OP_CheckEnumValueUint32, A0, L); |
7446 | } |
7447 | bool ByteCodeEmitter::emitCheckEnumValueSint64( const EnumDecl * A0, const SourceInfo &L) { |
7448 | return emitOp<const EnumDecl *>(OP_CheckEnumValueSint64, A0, L); |
7449 | } |
7450 | bool ByteCodeEmitter::emitCheckEnumValueUint64( const EnumDecl * A0, const SourceInfo &L) { |
7451 | return emitOp<const EnumDecl *>(OP_CheckEnumValueUint64, A0, L); |
7452 | } |
7453 | bool ByteCodeEmitter::emitCheckEnumValueBool( const EnumDecl * A0, const SourceInfo &L) { |
7454 | return emitOp<const EnumDecl *>(OP_CheckEnumValueBool, A0, L); |
7455 | } |
7456 | #endif |
7457 | #ifdef GET_EVAL_IMPL |
7458 | bool EvalEmitter::emitCheckEnumValueSint8( const EnumDecl * A0, const SourceInfo &L) { |
7459 | if (!isActive()) return true; |
7460 | CurrentSource = L; |
7461 | return CheckEnumValue<PT_Sint8>(S, OpPC, A0); |
7462 | } |
7463 | bool EvalEmitter::emitCheckEnumValueUint8( const EnumDecl * A0, const SourceInfo &L) { |
7464 | if (!isActive()) return true; |
7465 | CurrentSource = L; |
7466 | return CheckEnumValue<PT_Uint8>(S, OpPC, A0); |
7467 | } |
7468 | bool EvalEmitter::emitCheckEnumValueSint16( const EnumDecl * A0, const SourceInfo &L) { |
7469 | if (!isActive()) return true; |
7470 | CurrentSource = L; |
7471 | return CheckEnumValue<PT_Sint16>(S, OpPC, A0); |
7472 | } |
7473 | bool EvalEmitter::emitCheckEnumValueUint16( const EnumDecl * A0, const SourceInfo &L) { |
7474 | if (!isActive()) return true; |
7475 | CurrentSource = L; |
7476 | return CheckEnumValue<PT_Uint16>(S, OpPC, A0); |
7477 | } |
7478 | bool EvalEmitter::emitCheckEnumValueSint32( const EnumDecl * A0, const SourceInfo &L) { |
7479 | if (!isActive()) return true; |
7480 | CurrentSource = L; |
7481 | return CheckEnumValue<PT_Sint32>(S, OpPC, A0); |
7482 | } |
7483 | bool EvalEmitter::emitCheckEnumValueUint32( const EnumDecl * A0, const SourceInfo &L) { |
7484 | if (!isActive()) return true; |
7485 | CurrentSource = L; |
7486 | return CheckEnumValue<PT_Uint32>(S, OpPC, A0); |
7487 | } |
7488 | bool EvalEmitter::emitCheckEnumValueSint64( const EnumDecl * A0, const SourceInfo &L) { |
7489 | if (!isActive()) return true; |
7490 | CurrentSource = L; |
7491 | return CheckEnumValue<PT_Sint64>(S, OpPC, A0); |
7492 | } |
7493 | bool EvalEmitter::emitCheckEnumValueUint64( const EnumDecl * A0, const SourceInfo &L) { |
7494 | if (!isActive()) return true; |
7495 | CurrentSource = L; |
7496 | return CheckEnumValue<PT_Uint64>(S, OpPC, A0); |
7497 | } |
7498 | bool EvalEmitter::emitCheckEnumValueBool( const EnumDecl * A0, const SourceInfo &L) { |
7499 | if (!isActive()) return true; |
7500 | CurrentSource = L; |
7501 | return CheckEnumValue<PT_Bool>(S, OpPC, A0); |
7502 | } |
7503 | #endif |
7504 | #ifdef GET_OPCODE_NAMES |
7505 | OP_CheckNonNullArgPtr, |
7506 | OP_CheckNonNullArgFnPtr, |
7507 | OP_CheckNonNullArgMemberPtr, |
7508 | #endif |
7509 | #ifdef GET_INTERP |
7510 | case OP_CheckNonNullArgPtr: { |
7511 | if (!CheckNonNullArg<PT_Ptr>(S, OpPC)) |
7512 | return false; |
7513 | continue; |
7514 | } |
7515 | case OP_CheckNonNullArgFnPtr: { |
7516 | if (!CheckNonNullArg<PT_FnPtr>(S, OpPC)) |
7517 | return false; |
7518 | continue; |
7519 | } |
7520 | case OP_CheckNonNullArgMemberPtr: { |
7521 | if (!CheckNonNullArg<PT_MemberPtr>(S, OpPC)) |
7522 | return false; |
7523 | continue; |
7524 | } |
7525 | #endif |
7526 | #ifdef GET_DISASM |
7527 | case OP_CheckNonNullArgPtr: |
7528 | PrintName("CheckNonNullArgPtr" ); |
7529 | OS << "\t" << "\n" ; |
7530 | continue; |
7531 | case OP_CheckNonNullArgFnPtr: |
7532 | PrintName("CheckNonNullArgFnPtr" ); |
7533 | OS << "\t" << "\n" ; |
7534 | continue; |
7535 | case OP_CheckNonNullArgMemberPtr: |
7536 | PrintName("CheckNonNullArgMemberPtr" ); |
7537 | OS << "\t" << "\n" ; |
7538 | continue; |
7539 | #endif |
7540 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7541 | bool emitCheckNonNullArgPtr(const SourceInfo &); |
7542 | bool emitCheckNonNullArgFnPtr(const SourceInfo &); |
7543 | bool emitCheckNonNullArgMemberPtr(const SourceInfo &); |
7544 | #endif |
7545 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7546 | [[nodiscard]] bool emitCheckNonNullArg(PrimType, const SourceInfo &I); |
7547 | #endif |
7548 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
7549 | bool |
7550 | #if defined(GET_EVAL_IMPL) |
7551 | EvalEmitter |
7552 | #else |
7553 | ByteCodeEmitter |
7554 | #endif |
7555 | ::emitCheckNonNullArg(PrimType T0, const SourceInfo &I) { |
7556 | switch (T0) { |
7557 | case PT_Ptr: |
7558 | return emitCheckNonNullArgPtr(I); |
7559 | case PT_FnPtr: |
7560 | return emitCheckNonNullArgFnPtr(I); |
7561 | case PT_MemberPtr: |
7562 | return emitCheckNonNullArgMemberPtr(I); |
7563 | default: llvm_unreachable("invalid type: emitCheckNonNullArg" ); |
7564 | } |
7565 | llvm_unreachable("invalid enum value" ); |
7566 | } |
7567 | #endif |
7568 | #ifdef GET_LINK_IMPL |
7569 | bool ByteCodeEmitter::emitCheckNonNullArgPtr(const SourceInfo &L) { |
7570 | return emitOp<>(OP_CheckNonNullArgPtr, L); |
7571 | } |
7572 | bool ByteCodeEmitter::emitCheckNonNullArgFnPtr(const SourceInfo &L) { |
7573 | return emitOp<>(OP_CheckNonNullArgFnPtr, L); |
7574 | } |
7575 | bool ByteCodeEmitter::emitCheckNonNullArgMemberPtr(const SourceInfo &L) { |
7576 | return emitOp<>(OP_CheckNonNullArgMemberPtr, L); |
7577 | } |
7578 | #endif |
7579 | #ifdef GET_EVAL_IMPL |
7580 | bool EvalEmitter::emitCheckNonNullArgPtr(const SourceInfo &L) { |
7581 | if (!isActive()) return true; |
7582 | CurrentSource = L; |
7583 | return CheckNonNullArg<PT_Ptr>(S, OpPC); |
7584 | } |
7585 | bool EvalEmitter::emitCheckNonNullArgFnPtr(const SourceInfo &L) { |
7586 | if (!isActive()) return true; |
7587 | CurrentSource = L; |
7588 | return CheckNonNullArg<PT_FnPtr>(S, OpPC); |
7589 | } |
7590 | bool EvalEmitter::emitCheckNonNullArgMemberPtr(const SourceInfo &L) { |
7591 | if (!isActive()) return true; |
7592 | CurrentSource = L; |
7593 | return CheckNonNullArg<PT_MemberPtr>(S, OpPC); |
7594 | } |
7595 | #endif |
7596 | #ifdef GET_OPCODE_NAMES |
7597 | OP_CompSint8, |
7598 | OP_CompUint8, |
7599 | OP_CompSint16, |
7600 | OP_CompUint16, |
7601 | OP_CompSint32, |
7602 | OP_CompUint32, |
7603 | OP_CompSint64, |
7604 | OP_CompUint64, |
7605 | OP_CompIntAP, |
7606 | OP_CompIntAPS, |
7607 | #endif |
7608 | #ifdef GET_INTERP |
7609 | case OP_CompSint8: { |
7610 | if (!Comp<PT_Sint8>(S, OpPC)) |
7611 | return false; |
7612 | continue; |
7613 | } |
7614 | case OP_CompUint8: { |
7615 | if (!Comp<PT_Uint8>(S, OpPC)) |
7616 | return false; |
7617 | continue; |
7618 | } |
7619 | case OP_CompSint16: { |
7620 | if (!Comp<PT_Sint16>(S, OpPC)) |
7621 | return false; |
7622 | continue; |
7623 | } |
7624 | case OP_CompUint16: { |
7625 | if (!Comp<PT_Uint16>(S, OpPC)) |
7626 | return false; |
7627 | continue; |
7628 | } |
7629 | case OP_CompSint32: { |
7630 | if (!Comp<PT_Sint32>(S, OpPC)) |
7631 | return false; |
7632 | continue; |
7633 | } |
7634 | case OP_CompUint32: { |
7635 | if (!Comp<PT_Uint32>(S, OpPC)) |
7636 | return false; |
7637 | continue; |
7638 | } |
7639 | case OP_CompSint64: { |
7640 | if (!Comp<PT_Sint64>(S, OpPC)) |
7641 | return false; |
7642 | continue; |
7643 | } |
7644 | case OP_CompUint64: { |
7645 | if (!Comp<PT_Uint64>(S, OpPC)) |
7646 | return false; |
7647 | continue; |
7648 | } |
7649 | case OP_CompIntAP: { |
7650 | if (!Comp<PT_IntAP>(S, OpPC)) |
7651 | return false; |
7652 | continue; |
7653 | } |
7654 | case OP_CompIntAPS: { |
7655 | if (!Comp<PT_IntAPS>(S, OpPC)) |
7656 | return false; |
7657 | continue; |
7658 | } |
7659 | #endif |
7660 | #ifdef GET_DISASM |
7661 | case OP_CompSint8: |
7662 | PrintName("CompSint8" ); |
7663 | OS << "\t" << "\n" ; |
7664 | continue; |
7665 | case OP_CompUint8: |
7666 | PrintName("CompUint8" ); |
7667 | OS << "\t" << "\n" ; |
7668 | continue; |
7669 | case OP_CompSint16: |
7670 | PrintName("CompSint16" ); |
7671 | OS << "\t" << "\n" ; |
7672 | continue; |
7673 | case OP_CompUint16: |
7674 | PrintName("CompUint16" ); |
7675 | OS << "\t" << "\n" ; |
7676 | continue; |
7677 | case OP_CompSint32: |
7678 | PrintName("CompSint32" ); |
7679 | OS << "\t" << "\n" ; |
7680 | continue; |
7681 | case OP_CompUint32: |
7682 | PrintName("CompUint32" ); |
7683 | OS << "\t" << "\n" ; |
7684 | continue; |
7685 | case OP_CompSint64: |
7686 | PrintName("CompSint64" ); |
7687 | OS << "\t" << "\n" ; |
7688 | continue; |
7689 | case OP_CompUint64: |
7690 | PrintName("CompUint64" ); |
7691 | OS << "\t" << "\n" ; |
7692 | continue; |
7693 | case OP_CompIntAP: |
7694 | PrintName("CompIntAP" ); |
7695 | OS << "\t" << "\n" ; |
7696 | continue; |
7697 | case OP_CompIntAPS: |
7698 | PrintName("CompIntAPS" ); |
7699 | OS << "\t" << "\n" ; |
7700 | continue; |
7701 | #endif |
7702 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7703 | bool emitCompSint8(const SourceInfo &); |
7704 | bool emitCompUint8(const SourceInfo &); |
7705 | bool emitCompSint16(const SourceInfo &); |
7706 | bool emitCompUint16(const SourceInfo &); |
7707 | bool emitCompSint32(const SourceInfo &); |
7708 | bool emitCompUint32(const SourceInfo &); |
7709 | bool emitCompSint64(const SourceInfo &); |
7710 | bool emitCompUint64(const SourceInfo &); |
7711 | bool emitCompIntAP(const SourceInfo &); |
7712 | bool emitCompIntAPS(const SourceInfo &); |
7713 | #endif |
7714 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7715 | [[nodiscard]] bool emitComp(PrimType, const SourceInfo &I); |
7716 | #endif |
7717 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
7718 | bool |
7719 | #if defined(GET_EVAL_IMPL) |
7720 | EvalEmitter |
7721 | #else |
7722 | ByteCodeEmitter |
7723 | #endif |
7724 | ::emitComp(PrimType T0, const SourceInfo &I) { |
7725 | switch (T0) { |
7726 | case PT_Sint8: |
7727 | return emitCompSint8(I); |
7728 | case PT_Uint8: |
7729 | return emitCompUint8(I); |
7730 | case PT_Sint16: |
7731 | return emitCompSint16(I); |
7732 | case PT_Uint16: |
7733 | return emitCompUint16(I); |
7734 | case PT_Sint32: |
7735 | return emitCompSint32(I); |
7736 | case PT_Uint32: |
7737 | return emitCompUint32(I); |
7738 | case PT_Sint64: |
7739 | return emitCompSint64(I); |
7740 | case PT_Uint64: |
7741 | return emitCompUint64(I); |
7742 | case PT_IntAP: |
7743 | return emitCompIntAP(I); |
7744 | case PT_IntAPS: |
7745 | return emitCompIntAPS(I); |
7746 | default: llvm_unreachable("invalid type: emitComp" ); |
7747 | } |
7748 | llvm_unreachable("invalid enum value" ); |
7749 | } |
7750 | #endif |
7751 | #ifdef GET_LINK_IMPL |
7752 | bool ByteCodeEmitter::emitCompSint8(const SourceInfo &L) { |
7753 | return emitOp<>(OP_CompSint8, L); |
7754 | } |
7755 | bool ByteCodeEmitter::emitCompUint8(const SourceInfo &L) { |
7756 | return emitOp<>(OP_CompUint8, L); |
7757 | } |
7758 | bool ByteCodeEmitter::emitCompSint16(const SourceInfo &L) { |
7759 | return emitOp<>(OP_CompSint16, L); |
7760 | } |
7761 | bool ByteCodeEmitter::emitCompUint16(const SourceInfo &L) { |
7762 | return emitOp<>(OP_CompUint16, L); |
7763 | } |
7764 | bool ByteCodeEmitter::emitCompSint32(const SourceInfo &L) { |
7765 | return emitOp<>(OP_CompSint32, L); |
7766 | } |
7767 | bool ByteCodeEmitter::emitCompUint32(const SourceInfo &L) { |
7768 | return emitOp<>(OP_CompUint32, L); |
7769 | } |
7770 | bool ByteCodeEmitter::emitCompSint64(const SourceInfo &L) { |
7771 | return emitOp<>(OP_CompSint64, L); |
7772 | } |
7773 | bool ByteCodeEmitter::emitCompUint64(const SourceInfo &L) { |
7774 | return emitOp<>(OP_CompUint64, L); |
7775 | } |
7776 | bool ByteCodeEmitter::emitCompIntAP(const SourceInfo &L) { |
7777 | return emitOp<>(OP_CompIntAP, L); |
7778 | } |
7779 | bool ByteCodeEmitter::emitCompIntAPS(const SourceInfo &L) { |
7780 | return emitOp<>(OP_CompIntAPS, L); |
7781 | } |
7782 | #endif |
7783 | #ifdef GET_EVAL_IMPL |
7784 | bool EvalEmitter::emitCompSint8(const SourceInfo &L) { |
7785 | if (!isActive()) return true; |
7786 | CurrentSource = L; |
7787 | return Comp<PT_Sint8>(S, OpPC); |
7788 | } |
7789 | bool EvalEmitter::emitCompUint8(const SourceInfo &L) { |
7790 | if (!isActive()) return true; |
7791 | CurrentSource = L; |
7792 | return Comp<PT_Uint8>(S, OpPC); |
7793 | } |
7794 | bool EvalEmitter::emitCompSint16(const SourceInfo &L) { |
7795 | if (!isActive()) return true; |
7796 | CurrentSource = L; |
7797 | return Comp<PT_Sint16>(S, OpPC); |
7798 | } |
7799 | bool EvalEmitter::emitCompUint16(const SourceInfo &L) { |
7800 | if (!isActive()) return true; |
7801 | CurrentSource = L; |
7802 | return Comp<PT_Uint16>(S, OpPC); |
7803 | } |
7804 | bool EvalEmitter::emitCompSint32(const SourceInfo &L) { |
7805 | if (!isActive()) return true; |
7806 | CurrentSource = L; |
7807 | return Comp<PT_Sint32>(S, OpPC); |
7808 | } |
7809 | bool EvalEmitter::emitCompUint32(const SourceInfo &L) { |
7810 | if (!isActive()) return true; |
7811 | CurrentSource = L; |
7812 | return Comp<PT_Uint32>(S, OpPC); |
7813 | } |
7814 | bool EvalEmitter::emitCompSint64(const SourceInfo &L) { |
7815 | if (!isActive()) return true; |
7816 | CurrentSource = L; |
7817 | return Comp<PT_Sint64>(S, OpPC); |
7818 | } |
7819 | bool EvalEmitter::emitCompUint64(const SourceInfo &L) { |
7820 | if (!isActive()) return true; |
7821 | CurrentSource = L; |
7822 | return Comp<PT_Uint64>(S, OpPC); |
7823 | } |
7824 | bool EvalEmitter::emitCompIntAP(const SourceInfo &L) { |
7825 | if (!isActive()) return true; |
7826 | CurrentSource = L; |
7827 | return Comp<PT_IntAP>(S, OpPC); |
7828 | } |
7829 | bool EvalEmitter::emitCompIntAPS(const SourceInfo &L) { |
7830 | if (!isActive()) return true; |
7831 | CurrentSource = L; |
7832 | return Comp<PT_IntAPS>(S, OpPC); |
7833 | } |
7834 | #endif |
7835 | #ifdef GET_OPCODE_NAMES |
7836 | OP_ConstBool, |
7837 | #endif |
7838 | #ifdef GET_INTERP |
7839 | case OP_ConstBool: { |
7840 | const auto V0 = ReadArg<bool>(S, PC); |
7841 | if (!Const<PT_Bool>(S, OpPC, V0)) |
7842 | return false; |
7843 | continue; |
7844 | } |
7845 | #endif |
7846 | #ifdef GET_DISASM |
7847 | case OP_ConstBool: |
7848 | PrintName("ConstBool" ); |
7849 | OS << "\t" << ReadArg<bool>(P, PC) << " " << "\n" ; |
7850 | continue; |
7851 | #endif |
7852 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7853 | bool emitConstBool( bool , const SourceInfo &); |
7854 | #endif |
7855 | #ifdef GET_LINK_IMPL |
7856 | bool ByteCodeEmitter::emitConstBool( bool A0, const SourceInfo &L) { |
7857 | return emitOp<bool>(OP_ConstBool, A0, L); |
7858 | } |
7859 | #endif |
7860 | #ifdef GET_EVAL_IMPL |
7861 | bool EvalEmitter::emitConstBool( bool A0, const SourceInfo &L) { |
7862 | if (!isActive()) return true; |
7863 | CurrentSource = L; |
7864 | return Const<PT_Bool>(S, OpPC, A0); |
7865 | } |
7866 | #endif |
7867 | #ifdef GET_OPCODE_NAMES |
7868 | OP_ConstFloat, |
7869 | #endif |
7870 | #ifdef GET_INTERP |
7871 | case OP_ConstFloat: { |
7872 | const auto &V0 = ReadArg<Floating>(S, PC); |
7873 | if (!Const<PT_Float>(S, OpPC, V0)) |
7874 | return false; |
7875 | continue; |
7876 | } |
7877 | #endif |
7878 | #ifdef GET_DISASM |
7879 | case OP_ConstFloat: |
7880 | PrintName("ConstFloat" ); |
7881 | OS << "\t" << ReadArg<Floating>(P, PC) << " " << "\n" ; |
7882 | continue; |
7883 | #endif |
7884 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7885 | bool emitConstFloat(const Floating &, const SourceInfo &); |
7886 | #endif |
7887 | #ifdef GET_LINK_IMPL |
7888 | bool ByteCodeEmitter::emitConstFloat(const Floating &A0, const SourceInfo &L) { |
7889 | return emitOp<Floating>(OP_ConstFloat, A0, L); |
7890 | } |
7891 | #endif |
7892 | #ifdef GET_EVAL_IMPL |
7893 | bool EvalEmitter::emitConstFloat(const Floating &A0, const SourceInfo &L) { |
7894 | if (!isActive()) return true; |
7895 | CurrentSource = L; |
7896 | return Const<PT_Float>(S, OpPC, A0); |
7897 | } |
7898 | #endif |
7899 | #ifdef GET_OPCODE_NAMES |
7900 | OP_ConstSint8, |
7901 | #endif |
7902 | #ifdef GET_INTERP |
7903 | case OP_ConstSint8: { |
7904 | const auto V0 = ReadArg<int8_t>(S, PC); |
7905 | if (!Const<PT_Sint8>(S, OpPC, V0)) |
7906 | return false; |
7907 | continue; |
7908 | } |
7909 | #endif |
7910 | #ifdef GET_DISASM |
7911 | case OP_ConstSint8: |
7912 | PrintName("ConstSint8" ); |
7913 | OS << "\t" << ReadArg<int8_t>(P, PC) << " " << "\n" ; |
7914 | continue; |
7915 | #endif |
7916 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7917 | bool emitConstSint8( int8_t , const SourceInfo &); |
7918 | #endif |
7919 | #ifdef GET_LINK_IMPL |
7920 | bool ByteCodeEmitter::emitConstSint8( int8_t A0, const SourceInfo &L) { |
7921 | return emitOp<int8_t>(OP_ConstSint8, A0, L); |
7922 | } |
7923 | #endif |
7924 | #ifdef GET_EVAL_IMPL |
7925 | bool EvalEmitter::emitConstSint8( int8_t A0, const SourceInfo &L) { |
7926 | if (!isActive()) return true; |
7927 | CurrentSource = L; |
7928 | return Const<PT_Sint8>(S, OpPC, A0); |
7929 | } |
7930 | #endif |
7931 | #ifdef GET_OPCODE_NAMES |
7932 | OP_ConstSint16, |
7933 | #endif |
7934 | #ifdef GET_INTERP |
7935 | case OP_ConstSint16: { |
7936 | const auto V0 = ReadArg<int16_t>(S, PC); |
7937 | if (!Const<PT_Sint16>(S, OpPC, V0)) |
7938 | return false; |
7939 | continue; |
7940 | } |
7941 | #endif |
7942 | #ifdef GET_DISASM |
7943 | case OP_ConstSint16: |
7944 | PrintName("ConstSint16" ); |
7945 | OS << "\t" << ReadArg<int16_t>(P, PC) << " " << "\n" ; |
7946 | continue; |
7947 | #endif |
7948 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7949 | bool emitConstSint16( int16_t , const SourceInfo &); |
7950 | #endif |
7951 | #ifdef GET_LINK_IMPL |
7952 | bool ByteCodeEmitter::emitConstSint16( int16_t A0, const SourceInfo &L) { |
7953 | return emitOp<int16_t>(OP_ConstSint16, A0, L); |
7954 | } |
7955 | #endif |
7956 | #ifdef GET_EVAL_IMPL |
7957 | bool EvalEmitter::emitConstSint16( int16_t A0, const SourceInfo &L) { |
7958 | if (!isActive()) return true; |
7959 | CurrentSource = L; |
7960 | return Const<PT_Sint16>(S, OpPC, A0); |
7961 | } |
7962 | #endif |
7963 | #ifdef GET_OPCODE_NAMES |
7964 | OP_ConstSint32, |
7965 | #endif |
7966 | #ifdef GET_INTERP |
7967 | case OP_ConstSint32: { |
7968 | const auto V0 = ReadArg<int32_t>(S, PC); |
7969 | if (!Const<PT_Sint32>(S, OpPC, V0)) |
7970 | return false; |
7971 | continue; |
7972 | } |
7973 | #endif |
7974 | #ifdef GET_DISASM |
7975 | case OP_ConstSint32: |
7976 | PrintName("ConstSint32" ); |
7977 | OS << "\t" << ReadArg<int32_t>(P, PC) << " " << "\n" ; |
7978 | continue; |
7979 | #endif |
7980 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
7981 | bool emitConstSint32( int32_t , const SourceInfo &); |
7982 | #endif |
7983 | #ifdef GET_LINK_IMPL |
7984 | bool ByteCodeEmitter::emitConstSint32( int32_t A0, const SourceInfo &L) { |
7985 | return emitOp<int32_t>(OP_ConstSint32, A0, L); |
7986 | } |
7987 | #endif |
7988 | #ifdef GET_EVAL_IMPL |
7989 | bool EvalEmitter::emitConstSint32( int32_t A0, const SourceInfo &L) { |
7990 | if (!isActive()) return true; |
7991 | CurrentSource = L; |
7992 | return Const<PT_Sint32>(S, OpPC, A0); |
7993 | } |
7994 | #endif |
7995 | #ifdef GET_OPCODE_NAMES |
7996 | OP_ConstSint64, |
7997 | #endif |
7998 | #ifdef GET_INTERP |
7999 | case OP_ConstSint64: { |
8000 | const auto V0 = ReadArg<int64_t>(S, PC); |
8001 | if (!Const<PT_Sint64>(S, OpPC, V0)) |
8002 | return false; |
8003 | continue; |
8004 | } |
8005 | #endif |
8006 | #ifdef GET_DISASM |
8007 | case OP_ConstSint64: |
8008 | PrintName("ConstSint64" ); |
8009 | OS << "\t" << ReadArg<int64_t>(P, PC) << " " << "\n" ; |
8010 | continue; |
8011 | #endif |
8012 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8013 | bool emitConstSint64( int64_t , const SourceInfo &); |
8014 | #endif |
8015 | #ifdef GET_LINK_IMPL |
8016 | bool ByteCodeEmitter::emitConstSint64( int64_t A0, const SourceInfo &L) { |
8017 | return emitOp<int64_t>(OP_ConstSint64, A0, L); |
8018 | } |
8019 | #endif |
8020 | #ifdef GET_EVAL_IMPL |
8021 | bool EvalEmitter::emitConstSint64( int64_t A0, const SourceInfo &L) { |
8022 | if (!isActive()) return true; |
8023 | CurrentSource = L; |
8024 | return Const<PT_Sint64>(S, OpPC, A0); |
8025 | } |
8026 | #endif |
8027 | #ifdef GET_OPCODE_NAMES |
8028 | OP_ConstUint8, |
8029 | #endif |
8030 | #ifdef GET_INTERP |
8031 | case OP_ConstUint8: { |
8032 | const auto V0 = ReadArg<uint8_t>(S, PC); |
8033 | if (!Const<PT_Uint8>(S, OpPC, V0)) |
8034 | return false; |
8035 | continue; |
8036 | } |
8037 | #endif |
8038 | #ifdef GET_DISASM |
8039 | case OP_ConstUint8: |
8040 | PrintName("ConstUint8" ); |
8041 | OS << "\t" << ReadArg<uint8_t>(P, PC) << " " << "\n" ; |
8042 | continue; |
8043 | #endif |
8044 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8045 | bool emitConstUint8( uint8_t , const SourceInfo &); |
8046 | #endif |
8047 | #ifdef GET_LINK_IMPL |
8048 | bool ByteCodeEmitter::emitConstUint8( uint8_t A0, const SourceInfo &L) { |
8049 | return emitOp<uint8_t>(OP_ConstUint8, A0, L); |
8050 | } |
8051 | #endif |
8052 | #ifdef GET_EVAL_IMPL |
8053 | bool EvalEmitter::emitConstUint8( uint8_t A0, const SourceInfo &L) { |
8054 | if (!isActive()) return true; |
8055 | CurrentSource = L; |
8056 | return Const<PT_Uint8>(S, OpPC, A0); |
8057 | } |
8058 | #endif |
8059 | #ifdef GET_OPCODE_NAMES |
8060 | OP_ConstUint16, |
8061 | #endif |
8062 | #ifdef GET_INTERP |
8063 | case OP_ConstUint16: { |
8064 | const auto V0 = ReadArg<uint16_t>(S, PC); |
8065 | if (!Const<PT_Uint16>(S, OpPC, V0)) |
8066 | return false; |
8067 | continue; |
8068 | } |
8069 | #endif |
8070 | #ifdef GET_DISASM |
8071 | case OP_ConstUint16: |
8072 | PrintName("ConstUint16" ); |
8073 | OS << "\t" << ReadArg<uint16_t>(P, PC) << " " << "\n" ; |
8074 | continue; |
8075 | #endif |
8076 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8077 | bool emitConstUint16( uint16_t , const SourceInfo &); |
8078 | #endif |
8079 | #ifdef GET_LINK_IMPL |
8080 | bool ByteCodeEmitter::emitConstUint16( uint16_t A0, const SourceInfo &L) { |
8081 | return emitOp<uint16_t>(OP_ConstUint16, A0, L); |
8082 | } |
8083 | #endif |
8084 | #ifdef GET_EVAL_IMPL |
8085 | bool EvalEmitter::emitConstUint16( uint16_t A0, const SourceInfo &L) { |
8086 | if (!isActive()) return true; |
8087 | CurrentSource = L; |
8088 | return Const<PT_Uint16>(S, OpPC, A0); |
8089 | } |
8090 | #endif |
8091 | #ifdef GET_OPCODE_NAMES |
8092 | OP_ConstUint32, |
8093 | #endif |
8094 | #ifdef GET_INTERP |
8095 | case OP_ConstUint32: { |
8096 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8097 | if (!Const<PT_Uint32>(S, OpPC, V0)) |
8098 | return false; |
8099 | continue; |
8100 | } |
8101 | #endif |
8102 | #ifdef GET_DISASM |
8103 | case OP_ConstUint32: |
8104 | PrintName("ConstUint32" ); |
8105 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8106 | continue; |
8107 | #endif |
8108 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8109 | bool emitConstUint32( uint32_t , const SourceInfo &); |
8110 | #endif |
8111 | #ifdef GET_LINK_IMPL |
8112 | bool ByteCodeEmitter::emitConstUint32( uint32_t A0, const SourceInfo &L) { |
8113 | return emitOp<uint32_t>(OP_ConstUint32, A0, L); |
8114 | } |
8115 | #endif |
8116 | #ifdef GET_EVAL_IMPL |
8117 | bool EvalEmitter::emitConstUint32( uint32_t A0, const SourceInfo &L) { |
8118 | if (!isActive()) return true; |
8119 | CurrentSource = L; |
8120 | return Const<PT_Uint32>(S, OpPC, A0); |
8121 | } |
8122 | #endif |
8123 | #ifdef GET_OPCODE_NAMES |
8124 | OP_ConstUint64, |
8125 | #endif |
8126 | #ifdef GET_INTERP |
8127 | case OP_ConstUint64: { |
8128 | const auto V0 = ReadArg<uint64_t>(S, PC); |
8129 | if (!Const<PT_Uint64>(S, OpPC, V0)) |
8130 | return false; |
8131 | continue; |
8132 | } |
8133 | #endif |
8134 | #ifdef GET_DISASM |
8135 | case OP_ConstUint64: |
8136 | PrintName("ConstUint64" ); |
8137 | OS << "\t" << ReadArg<uint64_t>(P, PC) << " " << "\n" ; |
8138 | continue; |
8139 | #endif |
8140 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8141 | bool emitConstUint64( uint64_t , const SourceInfo &); |
8142 | #endif |
8143 | #ifdef GET_LINK_IMPL |
8144 | bool ByteCodeEmitter::emitConstUint64( uint64_t A0, const SourceInfo &L) { |
8145 | return emitOp<uint64_t>(OP_ConstUint64, A0, L); |
8146 | } |
8147 | #endif |
8148 | #ifdef GET_EVAL_IMPL |
8149 | bool EvalEmitter::emitConstUint64( uint64_t A0, const SourceInfo &L) { |
8150 | if (!isActive()) return true; |
8151 | CurrentSource = L; |
8152 | return Const<PT_Uint64>(S, OpPC, A0); |
8153 | } |
8154 | #endif |
8155 | #ifdef GET_OPCODE_NAMES |
8156 | OP_CopyArraySint8, |
8157 | OP_CopyArrayUint8, |
8158 | OP_CopyArraySint16, |
8159 | OP_CopyArrayUint16, |
8160 | OP_CopyArraySint32, |
8161 | OP_CopyArrayUint32, |
8162 | OP_CopyArraySint64, |
8163 | OP_CopyArrayUint64, |
8164 | OP_CopyArrayIntAP, |
8165 | OP_CopyArrayIntAPS, |
8166 | OP_CopyArrayBool, |
8167 | OP_CopyArrayPtr, |
8168 | OP_CopyArrayFnPtr, |
8169 | OP_CopyArrayMemberPtr, |
8170 | OP_CopyArrayFloat, |
8171 | #endif |
8172 | #ifdef GET_INTERP |
8173 | case OP_CopyArraySint8: { |
8174 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8175 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8176 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8177 | if (!CopyArray<PT_Sint8>(S, OpPC, V0, V1, V2)) |
8178 | return false; |
8179 | continue; |
8180 | } |
8181 | case OP_CopyArrayUint8: { |
8182 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8183 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8184 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8185 | if (!CopyArray<PT_Uint8>(S, OpPC, V0, V1, V2)) |
8186 | return false; |
8187 | continue; |
8188 | } |
8189 | case OP_CopyArraySint16: { |
8190 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8191 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8192 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8193 | if (!CopyArray<PT_Sint16>(S, OpPC, V0, V1, V2)) |
8194 | return false; |
8195 | continue; |
8196 | } |
8197 | case OP_CopyArrayUint16: { |
8198 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8199 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8200 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8201 | if (!CopyArray<PT_Uint16>(S, OpPC, V0, V1, V2)) |
8202 | return false; |
8203 | continue; |
8204 | } |
8205 | case OP_CopyArraySint32: { |
8206 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8207 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8208 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8209 | if (!CopyArray<PT_Sint32>(S, OpPC, V0, V1, V2)) |
8210 | return false; |
8211 | continue; |
8212 | } |
8213 | case OP_CopyArrayUint32: { |
8214 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8215 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8216 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8217 | if (!CopyArray<PT_Uint32>(S, OpPC, V0, V1, V2)) |
8218 | return false; |
8219 | continue; |
8220 | } |
8221 | case OP_CopyArraySint64: { |
8222 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8223 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8224 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8225 | if (!CopyArray<PT_Sint64>(S, OpPC, V0, V1, V2)) |
8226 | return false; |
8227 | continue; |
8228 | } |
8229 | case OP_CopyArrayUint64: { |
8230 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8231 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8232 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8233 | if (!CopyArray<PT_Uint64>(S, OpPC, V0, V1, V2)) |
8234 | return false; |
8235 | continue; |
8236 | } |
8237 | case OP_CopyArrayIntAP: { |
8238 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8239 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8240 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8241 | if (!CopyArray<PT_IntAP>(S, OpPC, V0, V1, V2)) |
8242 | return false; |
8243 | continue; |
8244 | } |
8245 | case OP_CopyArrayIntAPS: { |
8246 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8247 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8248 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8249 | if (!CopyArray<PT_IntAPS>(S, OpPC, V0, V1, V2)) |
8250 | return false; |
8251 | continue; |
8252 | } |
8253 | case OP_CopyArrayBool: { |
8254 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8255 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8256 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8257 | if (!CopyArray<PT_Bool>(S, OpPC, V0, V1, V2)) |
8258 | return false; |
8259 | continue; |
8260 | } |
8261 | case OP_CopyArrayPtr: { |
8262 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8263 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8264 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8265 | if (!CopyArray<PT_Ptr>(S, OpPC, V0, V1, V2)) |
8266 | return false; |
8267 | continue; |
8268 | } |
8269 | case OP_CopyArrayFnPtr: { |
8270 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8271 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8272 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8273 | if (!CopyArray<PT_FnPtr>(S, OpPC, V0, V1, V2)) |
8274 | return false; |
8275 | continue; |
8276 | } |
8277 | case OP_CopyArrayMemberPtr: { |
8278 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8279 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8280 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8281 | if (!CopyArray<PT_MemberPtr>(S, OpPC, V0, V1, V2)) |
8282 | return false; |
8283 | continue; |
8284 | } |
8285 | case OP_CopyArrayFloat: { |
8286 | const auto V0 = ReadArg<uint32_t>(S, PC); |
8287 | const auto V1 = ReadArg<uint32_t>(S, PC); |
8288 | const auto V2 = ReadArg<uint32_t>(S, PC); |
8289 | if (!CopyArray<PT_Float>(S, OpPC, V0, V1, V2)) |
8290 | return false; |
8291 | continue; |
8292 | } |
8293 | #endif |
8294 | #ifdef GET_DISASM |
8295 | case OP_CopyArraySint8: |
8296 | PrintName("CopyArraySint8" ); |
8297 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8298 | continue; |
8299 | case OP_CopyArrayUint8: |
8300 | PrintName("CopyArrayUint8" ); |
8301 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8302 | continue; |
8303 | case OP_CopyArraySint16: |
8304 | PrintName("CopyArraySint16" ); |
8305 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8306 | continue; |
8307 | case OP_CopyArrayUint16: |
8308 | PrintName("CopyArrayUint16" ); |
8309 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8310 | continue; |
8311 | case OP_CopyArraySint32: |
8312 | PrintName("CopyArraySint32" ); |
8313 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8314 | continue; |
8315 | case OP_CopyArrayUint32: |
8316 | PrintName("CopyArrayUint32" ); |
8317 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8318 | continue; |
8319 | case OP_CopyArraySint64: |
8320 | PrintName("CopyArraySint64" ); |
8321 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8322 | continue; |
8323 | case OP_CopyArrayUint64: |
8324 | PrintName("CopyArrayUint64" ); |
8325 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8326 | continue; |
8327 | case OP_CopyArrayIntAP: |
8328 | PrintName("CopyArrayIntAP" ); |
8329 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8330 | continue; |
8331 | case OP_CopyArrayIntAPS: |
8332 | PrintName("CopyArrayIntAPS" ); |
8333 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8334 | continue; |
8335 | case OP_CopyArrayBool: |
8336 | PrintName("CopyArrayBool" ); |
8337 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8338 | continue; |
8339 | case OP_CopyArrayPtr: |
8340 | PrintName("CopyArrayPtr" ); |
8341 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8342 | continue; |
8343 | case OP_CopyArrayFnPtr: |
8344 | PrintName("CopyArrayFnPtr" ); |
8345 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8346 | continue; |
8347 | case OP_CopyArrayMemberPtr: |
8348 | PrintName("CopyArrayMemberPtr" ); |
8349 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8350 | continue; |
8351 | case OP_CopyArrayFloat: |
8352 | PrintName("CopyArrayFloat" ); |
8353 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
8354 | continue; |
8355 | #endif |
8356 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8357 | bool emitCopyArraySint8( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8358 | bool emitCopyArrayUint8( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8359 | bool emitCopyArraySint16( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8360 | bool emitCopyArrayUint16( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8361 | bool emitCopyArraySint32( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8362 | bool emitCopyArrayUint32( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8363 | bool emitCopyArraySint64( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8364 | bool emitCopyArrayUint64( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8365 | bool emitCopyArrayIntAP( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8366 | bool emitCopyArrayIntAPS( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8367 | bool emitCopyArrayBool( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8368 | bool emitCopyArrayPtr( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8369 | bool emitCopyArrayFnPtr( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8370 | bool emitCopyArrayMemberPtr( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8371 | bool emitCopyArrayFloat( uint32_t , uint32_t , uint32_t , const SourceInfo &); |
8372 | #endif |
8373 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8374 | [[nodiscard]] bool emitCopyArray(PrimType, uint32_t, uint32_t, uint32_t, const SourceInfo &I); |
8375 | #endif |
8376 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
8377 | bool |
8378 | #if defined(GET_EVAL_IMPL) |
8379 | EvalEmitter |
8380 | #else |
8381 | ByteCodeEmitter |
8382 | #endif |
8383 | ::emitCopyArray(PrimType T0, uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &I) { |
8384 | switch (T0) { |
8385 | case PT_Sint8: |
8386 | return emitCopyArraySint8(A0, A1, A2, I); |
8387 | case PT_Uint8: |
8388 | return emitCopyArrayUint8(A0, A1, A2, I); |
8389 | case PT_Sint16: |
8390 | return emitCopyArraySint16(A0, A1, A2, I); |
8391 | case PT_Uint16: |
8392 | return emitCopyArrayUint16(A0, A1, A2, I); |
8393 | case PT_Sint32: |
8394 | return emitCopyArraySint32(A0, A1, A2, I); |
8395 | case PT_Uint32: |
8396 | return emitCopyArrayUint32(A0, A1, A2, I); |
8397 | case PT_Sint64: |
8398 | return emitCopyArraySint64(A0, A1, A2, I); |
8399 | case PT_Uint64: |
8400 | return emitCopyArrayUint64(A0, A1, A2, I); |
8401 | case PT_IntAP: |
8402 | return emitCopyArrayIntAP(A0, A1, A2, I); |
8403 | case PT_IntAPS: |
8404 | return emitCopyArrayIntAPS(A0, A1, A2, I); |
8405 | case PT_Bool: |
8406 | return emitCopyArrayBool(A0, A1, A2, I); |
8407 | case PT_Ptr: |
8408 | return emitCopyArrayPtr(A0, A1, A2, I); |
8409 | case PT_FnPtr: |
8410 | return emitCopyArrayFnPtr(A0, A1, A2, I); |
8411 | case PT_MemberPtr: |
8412 | return emitCopyArrayMemberPtr(A0, A1, A2, I); |
8413 | case PT_Float: |
8414 | return emitCopyArrayFloat(A0, A1, A2, I); |
8415 | } |
8416 | llvm_unreachable("invalid enum value" ); |
8417 | } |
8418 | #endif |
8419 | #ifdef GET_LINK_IMPL |
8420 | bool ByteCodeEmitter::emitCopyArraySint8( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8421 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArraySint8, A0, A1, A2, L); |
8422 | } |
8423 | bool ByteCodeEmitter::emitCopyArrayUint8( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8424 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayUint8, A0, A1, A2, L); |
8425 | } |
8426 | bool ByteCodeEmitter::emitCopyArraySint16( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8427 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArraySint16, A0, A1, A2, L); |
8428 | } |
8429 | bool ByteCodeEmitter::emitCopyArrayUint16( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8430 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayUint16, A0, A1, A2, L); |
8431 | } |
8432 | bool ByteCodeEmitter::emitCopyArraySint32( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8433 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArraySint32, A0, A1, A2, L); |
8434 | } |
8435 | bool ByteCodeEmitter::emitCopyArrayUint32( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8436 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayUint32, A0, A1, A2, L); |
8437 | } |
8438 | bool ByteCodeEmitter::emitCopyArraySint64( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8439 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArraySint64, A0, A1, A2, L); |
8440 | } |
8441 | bool ByteCodeEmitter::emitCopyArrayUint64( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8442 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayUint64, A0, A1, A2, L); |
8443 | } |
8444 | bool ByteCodeEmitter::emitCopyArrayIntAP( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8445 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayIntAP, A0, A1, A2, L); |
8446 | } |
8447 | bool ByteCodeEmitter::emitCopyArrayIntAPS( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8448 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayIntAPS, A0, A1, A2, L); |
8449 | } |
8450 | bool ByteCodeEmitter::emitCopyArrayBool( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8451 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayBool, A0, A1, A2, L); |
8452 | } |
8453 | bool ByteCodeEmitter::emitCopyArrayPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8454 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayPtr, A0, A1, A2, L); |
8455 | } |
8456 | bool ByteCodeEmitter::emitCopyArrayFnPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8457 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayFnPtr, A0, A1, A2, L); |
8458 | } |
8459 | bool ByteCodeEmitter::emitCopyArrayMemberPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8460 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayMemberPtr, A0, A1, A2, L); |
8461 | } |
8462 | bool ByteCodeEmitter::emitCopyArrayFloat( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8463 | return emitOp<uint32_t, uint32_t, uint32_t>(OP_CopyArrayFloat, A0, A1, A2, L); |
8464 | } |
8465 | #endif |
8466 | #ifdef GET_EVAL_IMPL |
8467 | bool EvalEmitter::emitCopyArraySint8( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8468 | if (!isActive()) return true; |
8469 | CurrentSource = L; |
8470 | return CopyArray<PT_Sint8>(S, OpPC, A0, A1, A2); |
8471 | } |
8472 | bool EvalEmitter::emitCopyArrayUint8( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8473 | if (!isActive()) return true; |
8474 | CurrentSource = L; |
8475 | return CopyArray<PT_Uint8>(S, OpPC, A0, A1, A2); |
8476 | } |
8477 | bool EvalEmitter::emitCopyArraySint16( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8478 | if (!isActive()) return true; |
8479 | CurrentSource = L; |
8480 | return CopyArray<PT_Sint16>(S, OpPC, A0, A1, A2); |
8481 | } |
8482 | bool EvalEmitter::emitCopyArrayUint16( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8483 | if (!isActive()) return true; |
8484 | CurrentSource = L; |
8485 | return CopyArray<PT_Uint16>(S, OpPC, A0, A1, A2); |
8486 | } |
8487 | bool EvalEmitter::emitCopyArraySint32( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8488 | if (!isActive()) return true; |
8489 | CurrentSource = L; |
8490 | return CopyArray<PT_Sint32>(S, OpPC, A0, A1, A2); |
8491 | } |
8492 | bool EvalEmitter::emitCopyArrayUint32( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8493 | if (!isActive()) return true; |
8494 | CurrentSource = L; |
8495 | return CopyArray<PT_Uint32>(S, OpPC, A0, A1, A2); |
8496 | } |
8497 | bool EvalEmitter::emitCopyArraySint64( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8498 | if (!isActive()) return true; |
8499 | CurrentSource = L; |
8500 | return CopyArray<PT_Sint64>(S, OpPC, A0, A1, A2); |
8501 | } |
8502 | bool EvalEmitter::emitCopyArrayUint64( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8503 | if (!isActive()) return true; |
8504 | CurrentSource = L; |
8505 | return CopyArray<PT_Uint64>(S, OpPC, A0, A1, A2); |
8506 | } |
8507 | bool EvalEmitter::emitCopyArrayIntAP( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8508 | if (!isActive()) return true; |
8509 | CurrentSource = L; |
8510 | return CopyArray<PT_IntAP>(S, OpPC, A0, A1, A2); |
8511 | } |
8512 | bool EvalEmitter::emitCopyArrayIntAPS( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8513 | if (!isActive()) return true; |
8514 | CurrentSource = L; |
8515 | return CopyArray<PT_IntAPS>(S, OpPC, A0, A1, A2); |
8516 | } |
8517 | bool EvalEmitter::emitCopyArrayBool( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8518 | if (!isActive()) return true; |
8519 | CurrentSource = L; |
8520 | return CopyArray<PT_Bool>(S, OpPC, A0, A1, A2); |
8521 | } |
8522 | bool EvalEmitter::emitCopyArrayPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8523 | if (!isActive()) return true; |
8524 | CurrentSource = L; |
8525 | return CopyArray<PT_Ptr>(S, OpPC, A0, A1, A2); |
8526 | } |
8527 | bool EvalEmitter::emitCopyArrayFnPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8528 | if (!isActive()) return true; |
8529 | CurrentSource = L; |
8530 | return CopyArray<PT_FnPtr>(S, OpPC, A0, A1, A2); |
8531 | } |
8532 | bool EvalEmitter::emitCopyArrayMemberPtr( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8533 | if (!isActive()) return true; |
8534 | CurrentSource = L; |
8535 | return CopyArray<PT_MemberPtr>(S, OpPC, A0, A1, A2); |
8536 | } |
8537 | bool EvalEmitter::emitCopyArrayFloat( uint32_t A0, uint32_t A1, uint32_t A2, const SourceInfo &L) { |
8538 | if (!isActive()) return true; |
8539 | CurrentSource = L; |
8540 | return CopyArray<PT_Float>(S, OpPC, A0, A1, A2); |
8541 | } |
8542 | #endif |
8543 | #ifdef GET_OPCODE_NAMES |
8544 | OP_DecSint8, |
8545 | OP_DecUint8, |
8546 | OP_DecSint16, |
8547 | OP_DecUint16, |
8548 | OP_DecSint32, |
8549 | OP_DecUint32, |
8550 | OP_DecSint64, |
8551 | OP_DecUint64, |
8552 | OP_DecIntAP, |
8553 | OP_DecIntAPS, |
8554 | OP_DecBool, |
8555 | #endif |
8556 | #ifdef GET_INTERP |
8557 | case OP_DecSint8: { |
8558 | if (!Dec<PT_Sint8>(S, OpPC)) |
8559 | return false; |
8560 | continue; |
8561 | } |
8562 | case OP_DecUint8: { |
8563 | if (!Dec<PT_Uint8>(S, OpPC)) |
8564 | return false; |
8565 | continue; |
8566 | } |
8567 | case OP_DecSint16: { |
8568 | if (!Dec<PT_Sint16>(S, OpPC)) |
8569 | return false; |
8570 | continue; |
8571 | } |
8572 | case OP_DecUint16: { |
8573 | if (!Dec<PT_Uint16>(S, OpPC)) |
8574 | return false; |
8575 | continue; |
8576 | } |
8577 | case OP_DecSint32: { |
8578 | if (!Dec<PT_Sint32>(S, OpPC)) |
8579 | return false; |
8580 | continue; |
8581 | } |
8582 | case OP_DecUint32: { |
8583 | if (!Dec<PT_Uint32>(S, OpPC)) |
8584 | return false; |
8585 | continue; |
8586 | } |
8587 | case OP_DecSint64: { |
8588 | if (!Dec<PT_Sint64>(S, OpPC)) |
8589 | return false; |
8590 | continue; |
8591 | } |
8592 | case OP_DecUint64: { |
8593 | if (!Dec<PT_Uint64>(S, OpPC)) |
8594 | return false; |
8595 | continue; |
8596 | } |
8597 | case OP_DecIntAP: { |
8598 | if (!Dec<PT_IntAP>(S, OpPC)) |
8599 | return false; |
8600 | continue; |
8601 | } |
8602 | case OP_DecIntAPS: { |
8603 | if (!Dec<PT_IntAPS>(S, OpPC)) |
8604 | return false; |
8605 | continue; |
8606 | } |
8607 | case OP_DecBool: { |
8608 | if (!Dec<PT_Bool>(S, OpPC)) |
8609 | return false; |
8610 | continue; |
8611 | } |
8612 | #endif |
8613 | #ifdef GET_DISASM |
8614 | case OP_DecSint8: |
8615 | PrintName("DecSint8" ); |
8616 | OS << "\t" << "\n" ; |
8617 | continue; |
8618 | case OP_DecUint8: |
8619 | PrintName("DecUint8" ); |
8620 | OS << "\t" << "\n" ; |
8621 | continue; |
8622 | case OP_DecSint16: |
8623 | PrintName("DecSint16" ); |
8624 | OS << "\t" << "\n" ; |
8625 | continue; |
8626 | case OP_DecUint16: |
8627 | PrintName("DecUint16" ); |
8628 | OS << "\t" << "\n" ; |
8629 | continue; |
8630 | case OP_DecSint32: |
8631 | PrintName("DecSint32" ); |
8632 | OS << "\t" << "\n" ; |
8633 | continue; |
8634 | case OP_DecUint32: |
8635 | PrintName("DecUint32" ); |
8636 | OS << "\t" << "\n" ; |
8637 | continue; |
8638 | case OP_DecSint64: |
8639 | PrintName("DecSint64" ); |
8640 | OS << "\t" << "\n" ; |
8641 | continue; |
8642 | case OP_DecUint64: |
8643 | PrintName("DecUint64" ); |
8644 | OS << "\t" << "\n" ; |
8645 | continue; |
8646 | case OP_DecIntAP: |
8647 | PrintName("DecIntAP" ); |
8648 | OS << "\t" << "\n" ; |
8649 | continue; |
8650 | case OP_DecIntAPS: |
8651 | PrintName("DecIntAPS" ); |
8652 | OS << "\t" << "\n" ; |
8653 | continue; |
8654 | case OP_DecBool: |
8655 | PrintName("DecBool" ); |
8656 | OS << "\t" << "\n" ; |
8657 | continue; |
8658 | #endif |
8659 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8660 | bool emitDecSint8(const SourceInfo &); |
8661 | bool emitDecUint8(const SourceInfo &); |
8662 | bool emitDecSint16(const SourceInfo &); |
8663 | bool emitDecUint16(const SourceInfo &); |
8664 | bool emitDecSint32(const SourceInfo &); |
8665 | bool emitDecUint32(const SourceInfo &); |
8666 | bool emitDecSint64(const SourceInfo &); |
8667 | bool emitDecUint64(const SourceInfo &); |
8668 | bool emitDecIntAP(const SourceInfo &); |
8669 | bool emitDecIntAPS(const SourceInfo &); |
8670 | bool emitDecBool(const SourceInfo &); |
8671 | #endif |
8672 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8673 | [[nodiscard]] bool emitDec(PrimType, const SourceInfo &I); |
8674 | #endif |
8675 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
8676 | bool |
8677 | #if defined(GET_EVAL_IMPL) |
8678 | EvalEmitter |
8679 | #else |
8680 | ByteCodeEmitter |
8681 | #endif |
8682 | ::emitDec(PrimType T0, const SourceInfo &I) { |
8683 | switch (T0) { |
8684 | case PT_Sint8: |
8685 | return emitDecSint8(I); |
8686 | case PT_Uint8: |
8687 | return emitDecUint8(I); |
8688 | case PT_Sint16: |
8689 | return emitDecSint16(I); |
8690 | case PT_Uint16: |
8691 | return emitDecUint16(I); |
8692 | case PT_Sint32: |
8693 | return emitDecSint32(I); |
8694 | case PT_Uint32: |
8695 | return emitDecUint32(I); |
8696 | case PT_Sint64: |
8697 | return emitDecSint64(I); |
8698 | case PT_Uint64: |
8699 | return emitDecUint64(I); |
8700 | case PT_IntAP: |
8701 | return emitDecIntAP(I); |
8702 | case PT_IntAPS: |
8703 | return emitDecIntAPS(I); |
8704 | case PT_Bool: |
8705 | return emitDecBool(I); |
8706 | default: llvm_unreachable("invalid type: emitDec" ); |
8707 | } |
8708 | llvm_unreachable("invalid enum value" ); |
8709 | } |
8710 | #endif |
8711 | #ifdef GET_LINK_IMPL |
8712 | bool ByteCodeEmitter::emitDecSint8(const SourceInfo &L) { |
8713 | return emitOp<>(OP_DecSint8, L); |
8714 | } |
8715 | bool ByteCodeEmitter::emitDecUint8(const SourceInfo &L) { |
8716 | return emitOp<>(OP_DecUint8, L); |
8717 | } |
8718 | bool ByteCodeEmitter::emitDecSint16(const SourceInfo &L) { |
8719 | return emitOp<>(OP_DecSint16, L); |
8720 | } |
8721 | bool ByteCodeEmitter::emitDecUint16(const SourceInfo &L) { |
8722 | return emitOp<>(OP_DecUint16, L); |
8723 | } |
8724 | bool ByteCodeEmitter::emitDecSint32(const SourceInfo &L) { |
8725 | return emitOp<>(OP_DecSint32, L); |
8726 | } |
8727 | bool ByteCodeEmitter::emitDecUint32(const SourceInfo &L) { |
8728 | return emitOp<>(OP_DecUint32, L); |
8729 | } |
8730 | bool ByteCodeEmitter::emitDecSint64(const SourceInfo &L) { |
8731 | return emitOp<>(OP_DecSint64, L); |
8732 | } |
8733 | bool ByteCodeEmitter::emitDecUint64(const SourceInfo &L) { |
8734 | return emitOp<>(OP_DecUint64, L); |
8735 | } |
8736 | bool ByteCodeEmitter::emitDecIntAP(const SourceInfo &L) { |
8737 | return emitOp<>(OP_DecIntAP, L); |
8738 | } |
8739 | bool ByteCodeEmitter::emitDecIntAPS(const SourceInfo &L) { |
8740 | return emitOp<>(OP_DecIntAPS, L); |
8741 | } |
8742 | bool ByteCodeEmitter::emitDecBool(const SourceInfo &L) { |
8743 | return emitOp<>(OP_DecBool, L); |
8744 | } |
8745 | #endif |
8746 | #ifdef GET_EVAL_IMPL |
8747 | bool EvalEmitter::emitDecSint8(const SourceInfo &L) { |
8748 | if (!isActive()) return true; |
8749 | CurrentSource = L; |
8750 | return Dec<PT_Sint8>(S, OpPC); |
8751 | } |
8752 | bool EvalEmitter::emitDecUint8(const SourceInfo &L) { |
8753 | if (!isActive()) return true; |
8754 | CurrentSource = L; |
8755 | return Dec<PT_Uint8>(S, OpPC); |
8756 | } |
8757 | bool EvalEmitter::emitDecSint16(const SourceInfo &L) { |
8758 | if (!isActive()) return true; |
8759 | CurrentSource = L; |
8760 | return Dec<PT_Sint16>(S, OpPC); |
8761 | } |
8762 | bool EvalEmitter::emitDecUint16(const SourceInfo &L) { |
8763 | if (!isActive()) return true; |
8764 | CurrentSource = L; |
8765 | return Dec<PT_Uint16>(S, OpPC); |
8766 | } |
8767 | bool EvalEmitter::emitDecSint32(const SourceInfo &L) { |
8768 | if (!isActive()) return true; |
8769 | CurrentSource = L; |
8770 | return Dec<PT_Sint32>(S, OpPC); |
8771 | } |
8772 | bool EvalEmitter::emitDecUint32(const SourceInfo &L) { |
8773 | if (!isActive()) return true; |
8774 | CurrentSource = L; |
8775 | return Dec<PT_Uint32>(S, OpPC); |
8776 | } |
8777 | bool EvalEmitter::emitDecSint64(const SourceInfo &L) { |
8778 | if (!isActive()) return true; |
8779 | CurrentSource = L; |
8780 | return Dec<PT_Sint64>(S, OpPC); |
8781 | } |
8782 | bool EvalEmitter::emitDecUint64(const SourceInfo &L) { |
8783 | if (!isActive()) return true; |
8784 | CurrentSource = L; |
8785 | return Dec<PT_Uint64>(S, OpPC); |
8786 | } |
8787 | bool EvalEmitter::emitDecIntAP(const SourceInfo &L) { |
8788 | if (!isActive()) return true; |
8789 | CurrentSource = L; |
8790 | return Dec<PT_IntAP>(S, OpPC); |
8791 | } |
8792 | bool EvalEmitter::emitDecIntAPS(const SourceInfo &L) { |
8793 | if (!isActive()) return true; |
8794 | CurrentSource = L; |
8795 | return Dec<PT_IntAPS>(S, OpPC); |
8796 | } |
8797 | bool EvalEmitter::emitDecBool(const SourceInfo &L) { |
8798 | if (!isActive()) return true; |
8799 | CurrentSource = L; |
8800 | return Dec<PT_Bool>(S, OpPC); |
8801 | } |
8802 | #endif |
8803 | #ifdef GET_OPCODE_NAMES |
8804 | OP_DecPopSint8, |
8805 | OP_DecPopUint8, |
8806 | OP_DecPopSint16, |
8807 | OP_DecPopUint16, |
8808 | OP_DecPopSint32, |
8809 | OP_DecPopUint32, |
8810 | OP_DecPopSint64, |
8811 | OP_DecPopUint64, |
8812 | OP_DecPopIntAP, |
8813 | OP_DecPopIntAPS, |
8814 | OP_DecPopBool, |
8815 | #endif |
8816 | #ifdef GET_INTERP |
8817 | case OP_DecPopSint8: { |
8818 | if (!DecPop<PT_Sint8>(S, OpPC)) |
8819 | return false; |
8820 | continue; |
8821 | } |
8822 | case OP_DecPopUint8: { |
8823 | if (!DecPop<PT_Uint8>(S, OpPC)) |
8824 | return false; |
8825 | continue; |
8826 | } |
8827 | case OP_DecPopSint16: { |
8828 | if (!DecPop<PT_Sint16>(S, OpPC)) |
8829 | return false; |
8830 | continue; |
8831 | } |
8832 | case OP_DecPopUint16: { |
8833 | if (!DecPop<PT_Uint16>(S, OpPC)) |
8834 | return false; |
8835 | continue; |
8836 | } |
8837 | case OP_DecPopSint32: { |
8838 | if (!DecPop<PT_Sint32>(S, OpPC)) |
8839 | return false; |
8840 | continue; |
8841 | } |
8842 | case OP_DecPopUint32: { |
8843 | if (!DecPop<PT_Uint32>(S, OpPC)) |
8844 | return false; |
8845 | continue; |
8846 | } |
8847 | case OP_DecPopSint64: { |
8848 | if (!DecPop<PT_Sint64>(S, OpPC)) |
8849 | return false; |
8850 | continue; |
8851 | } |
8852 | case OP_DecPopUint64: { |
8853 | if (!DecPop<PT_Uint64>(S, OpPC)) |
8854 | return false; |
8855 | continue; |
8856 | } |
8857 | case OP_DecPopIntAP: { |
8858 | if (!DecPop<PT_IntAP>(S, OpPC)) |
8859 | return false; |
8860 | continue; |
8861 | } |
8862 | case OP_DecPopIntAPS: { |
8863 | if (!DecPop<PT_IntAPS>(S, OpPC)) |
8864 | return false; |
8865 | continue; |
8866 | } |
8867 | case OP_DecPopBool: { |
8868 | if (!DecPop<PT_Bool>(S, OpPC)) |
8869 | return false; |
8870 | continue; |
8871 | } |
8872 | #endif |
8873 | #ifdef GET_DISASM |
8874 | case OP_DecPopSint8: |
8875 | PrintName("DecPopSint8" ); |
8876 | OS << "\t" << "\n" ; |
8877 | continue; |
8878 | case OP_DecPopUint8: |
8879 | PrintName("DecPopUint8" ); |
8880 | OS << "\t" << "\n" ; |
8881 | continue; |
8882 | case OP_DecPopSint16: |
8883 | PrintName("DecPopSint16" ); |
8884 | OS << "\t" << "\n" ; |
8885 | continue; |
8886 | case OP_DecPopUint16: |
8887 | PrintName("DecPopUint16" ); |
8888 | OS << "\t" << "\n" ; |
8889 | continue; |
8890 | case OP_DecPopSint32: |
8891 | PrintName("DecPopSint32" ); |
8892 | OS << "\t" << "\n" ; |
8893 | continue; |
8894 | case OP_DecPopUint32: |
8895 | PrintName("DecPopUint32" ); |
8896 | OS << "\t" << "\n" ; |
8897 | continue; |
8898 | case OP_DecPopSint64: |
8899 | PrintName("DecPopSint64" ); |
8900 | OS << "\t" << "\n" ; |
8901 | continue; |
8902 | case OP_DecPopUint64: |
8903 | PrintName("DecPopUint64" ); |
8904 | OS << "\t" << "\n" ; |
8905 | continue; |
8906 | case OP_DecPopIntAP: |
8907 | PrintName("DecPopIntAP" ); |
8908 | OS << "\t" << "\n" ; |
8909 | continue; |
8910 | case OP_DecPopIntAPS: |
8911 | PrintName("DecPopIntAPS" ); |
8912 | OS << "\t" << "\n" ; |
8913 | continue; |
8914 | case OP_DecPopBool: |
8915 | PrintName("DecPopBool" ); |
8916 | OS << "\t" << "\n" ; |
8917 | continue; |
8918 | #endif |
8919 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8920 | bool emitDecPopSint8(const SourceInfo &); |
8921 | bool emitDecPopUint8(const SourceInfo &); |
8922 | bool emitDecPopSint16(const SourceInfo &); |
8923 | bool emitDecPopUint16(const SourceInfo &); |
8924 | bool emitDecPopSint32(const SourceInfo &); |
8925 | bool emitDecPopUint32(const SourceInfo &); |
8926 | bool emitDecPopSint64(const SourceInfo &); |
8927 | bool emitDecPopUint64(const SourceInfo &); |
8928 | bool emitDecPopIntAP(const SourceInfo &); |
8929 | bool emitDecPopIntAPS(const SourceInfo &); |
8930 | bool emitDecPopBool(const SourceInfo &); |
8931 | #endif |
8932 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
8933 | [[nodiscard]] bool emitDecPop(PrimType, const SourceInfo &I); |
8934 | #endif |
8935 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
8936 | bool |
8937 | #if defined(GET_EVAL_IMPL) |
8938 | EvalEmitter |
8939 | #else |
8940 | ByteCodeEmitter |
8941 | #endif |
8942 | ::emitDecPop(PrimType T0, const SourceInfo &I) { |
8943 | switch (T0) { |
8944 | case PT_Sint8: |
8945 | return emitDecPopSint8(I); |
8946 | case PT_Uint8: |
8947 | return emitDecPopUint8(I); |
8948 | case PT_Sint16: |
8949 | return emitDecPopSint16(I); |
8950 | case PT_Uint16: |
8951 | return emitDecPopUint16(I); |
8952 | case PT_Sint32: |
8953 | return emitDecPopSint32(I); |
8954 | case PT_Uint32: |
8955 | return emitDecPopUint32(I); |
8956 | case PT_Sint64: |
8957 | return emitDecPopSint64(I); |
8958 | case PT_Uint64: |
8959 | return emitDecPopUint64(I); |
8960 | case PT_IntAP: |
8961 | return emitDecPopIntAP(I); |
8962 | case PT_IntAPS: |
8963 | return emitDecPopIntAPS(I); |
8964 | case PT_Bool: |
8965 | return emitDecPopBool(I); |
8966 | default: llvm_unreachable("invalid type: emitDecPop" ); |
8967 | } |
8968 | llvm_unreachable("invalid enum value" ); |
8969 | } |
8970 | #endif |
8971 | #ifdef GET_LINK_IMPL |
8972 | bool ByteCodeEmitter::emitDecPopSint8(const SourceInfo &L) { |
8973 | return emitOp<>(OP_DecPopSint8, L); |
8974 | } |
8975 | bool ByteCodeEmitter::emitDecPopUint8(const SourceInfo &L) { |
8976 | return emitOp<>(OP_DecPopUint8, L); |
8977 | } |
8978 | bool ByteCodeEmitter::emitDecPopSint16(const SourceInfo &L) { |
8979 | return emitOp<>(OP_DecPopSint16, L); |
8980 | } |
8981 | bool ByteCodeEmitter::emitDecPopUint16(const SourceInfo &L) { |
8982 | return emitOp<>(OP_DecPopUint16, L); |
8983 | } |
8984 | bool ByteCodeEmitter::emitDecPopSint32(const SourceInfo &L) { |
8985 | return emitOp<>(OP_DecPopSint32, L); |
8986 | } |
8987 | bool ByteCodeEmitter::emitDecPopUint32(const SourceInfo &L) { |
8988 | return emitOp<>(OP_DecPopUint32, L); |
8989 | } |
8990 | bool ByteCodeEmitter::emitDecPopSint64(const SourceInfo &L) { |
8991 | return emitOp<>(OP_DecPopSint64, L); |
8992 | } |
8993 | bool ByteCodeEmitter::emitDecPopUint64(const SourceInfo &L) { |
8994 | return emitOp<>(OP_DecPopUint64, L); |
8995 | } |
8996 | bool ByteCodeEmitter::emitDecPopIntAP(const SourceInfo &L) { |
8997 | return emitOp<>(OP_DecPopIntAP, L); |
8998 | } |
8999 | bool ByteCodeEmitter::emitDecPopIntAPS(const SourceInfo &L) { |
9000 | return emitOp<>(OP_DecPopIntAPS, L); |
9001 | } |
9002 | bool ByteCodeEmitter::emitDecPopBool(const SourceInfo &L) { |
9003 | return emitOp<>(OP_DecPopBool, L); |
9004 | } |
9005 | #endif |
9006 | #ifdef GET_EVAL_IMPL |
9007 | bool EvalEmitter::emitDecPopSint8(const SourceInfo &L) { |
9008 | if (!isActive()) return true; |
9009 | CurrentSource = L; |
9010 | return DecPop<PT_Sint8>(S, OpPC); |
9011 | } |
9012 | bool EvalEmitter::emitDecPopUint8(const SourceInfo &L) { |
9013 | if (!isActive()) return true; |
9014 | CurrentSource = L; |
9015 | return DecPop<PT_Uint8>(S, OpPC); |
9016 | } |
9017 | bool EvalEmitter::emitDecPopSint16(const SourceInfo &L) { |
9018 | if (!isActive()) return true; |
9019 | CurrentSource = L; |
9020 | return DecPop<PT_Sint16>(S, OpPC); |
9021 | } |
9022 | bool EvalEmitter::emitDecPopUint16(const SourceInfo &L) { |
9023 | if (!isActive()) return true; |
9024 | CurrentSource = L; |
9025 | return DecPop<PT_Uint16>(S, OpPC); |
9026 | } |
9027 | bool EvalEmitter::emitDecPopSint32(const SourceInfo &L) { |
9028 | if (!isActive()) return true; |
9029 | CurrentSource = L; |
9030 | return DecPop<PT_Sint32>(S, OpPC); |
9031 | } |
9032 | bool EvalEmitter::emitDecPopUint32(const SourceInfo &L) { |
9033 | if (!isActive()) return true; |
9034 | CurrentSource = L; |
9035 | return DecPop<PT_Uint32>(S, OpPC); |
9036 | } |
9037 | bool EvalEmitter::emitDecPopSint64(const SourceInfo &L) { |
9038 | if (!isActive()) return true; |
9039 | CurrentSource = L; |
9040 | return DecPop<PT_Sint64>(S, OpPC); |
9041 | } |
9042 | bool EvalEmitter::emitDecPopUint64(const SourceInfo &L) { |
9043 | if (!isActive()) return true; |
9044 | CurrentSource = L; |
9045 | return DecPop<PT_Uint64>(S, OpPC); |
9046 | } |
9047 | bool EvalEmitter::emitDecPopIntAP(const SourceInfo &L) { |
9048 | if (!isActive()) return true; |
9049 | CurrentSource = L; |
9050 | return DecPop<PT_IntAP>(S, OpPC); |
9051 | } |
9052 | bool EvalEmitter::emitDecPopIntAPS(const SourceInfo &L) { |
9053 | if (!isActive()) return true; |
9054 | CurrentSource = L; |
9055 | return DecPop<PT_IntAPS>(S, OpPC); |
9056 | } |
9057 | bool EvalEmitter::emitDecPopBool(const SourceInfo &L) { |
9058 | if (!isActive()) return true; |
9059 | CurrentSource = L; |
9060 | return DecPop<PT_Bool>(S, OpPC); |
9061 | } |
9062 | #endif |
9063 | #ifdef GET_OPCODE_NAMES |
9064 | OP_DecPtr, |
9065 | #endif |
9066 | #ifdef GET_INTERP |
9067 | case OP_DecPtr: { |
9068 | if (!DecPtr(S, OpPC)) |
9069 | return false; |
9070 | continue; |
9071 | } |
9072 | #endif |
9073 | #ifdef GET_DISASM |
9074 | case OP_DecPtr: |
9075 | PrintName("DecPtr" ); |
9076 | OS << "\t" << "\n" ; |
9077 | continue; |
9078 | #endif |
9079 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9080 | bool emitDecPtr(const SourceInfo &); |
9081 | #endif |
9082 | #ifdef GET_LINK_IMPL |
9083 | bool ByteCodeEmitter::emitDecPtr(const SourceInfo &L) { |
9084 | return emitOp<>(OP_DecPtr, L); |
9085 | } |
9086 | #endif |
9087 | #ifdef GET_EVAL_IMPL |
9088 | bool EvalEmitter::emitDecPtr(const SourceInfo &L) { |
9089 | if (!isActive()) return true; |
9090 | CurrentSource = L; |
9091 | return DecPtr(S, OpPC); |
9092 | } |
9093 | #endif |
9094 | #ifdef GET_OPCODE_NAMES |
9095 | OP_DecayPtrPtrPtr, |
9096 | OP_DecayPtrPtrFnPtr, |
9097 | OP_DecayPtrPtrMemberPtr, |
9098 | OP_DecayPtrFnPtrPtr, |
9099 | OP_DecayPtrFnPtrFnPtr, |
9100 | OP_DecayPtrFnPtrMemberPtr, |
9101 | OP_DecayPtrMemberPtrPtr, |
9102 | OP_DecayPtrMemberPtrFnPtr, |
9103 | OP_DecayPtrMemberPtrMemberPtr, |
9104 | #endif |
9105 | #ifdef GET_INTERP |
9106 | case OP_DecayPtrPtrPtr: { |
9107 | if (!DecayPtr<PT_Ptr, PT_Ptr>(S, OpPC)) |
9108 | return false; |
9109 | continue; |
9110 | } |
9111 | case OP_DecayPtrPtrFnPtr: { |
9112 | if (!DecayPtr<PT_Ptr, PT_FnPtr>(S, OpPC)) |
9113 | return false; |
9114 | continue; |
9115 | } |
9116 | case OP_DecayPtrPtrMemberPtr: { |
9117 | if (!DecayPtr<PT_Ptr, PT_MemberPtr>(S, OpPC)) |
9118 | return false; |
9119 | continue; |
9120 | } |
9121 | case OP_DecayPtrFnPtrPtr: { |
9122 | if (!DecayPtr<PT_FnPtr, PT_Ptr>(S, OpPC)) |
9123 | return false; |
9124 | continue; |
9125 | } |
9126 | case OP_DecayPtrFnPtrFnPtr: { |
9127 | if (!DecayPtr<PT_FnPtr, PT_FnPtr>(S, OpPC)) |
9128 | return false; |
9129 | continue; |
9130 | } |
9131 | case OP_DecayPtrFnPtrMemberPtr: { |
9132 | if (!DecayPtr<PT_FnPtr, PT_MemberPtr>(S, OpPC)) |
9133 | return false; |
9134 | continue; |
9135 | } |
9136 | case OP_DecayPtrMemberPtrPtr: { |
9137 | if (!DecayPtr<PT_MemberPtr, PT_Ptr>(S, OpPC)) |
9138 | return false; |
9139 | continue; |
9140 | } |
9141 | case OP_DecayPtrMemberPtrFnPtr: { |
9142 | if (!DecayPtr<PT_MemberPtr, PT_FnPtr>(S, OpPC)) |
9143 | return false; |
9144 | continue; |
9145 | } |
9146 | case OP_DecayPtrMemberPtrMemberPtr: { |
9147 | if (!DecayPtr<PT_MemberPtr, PT_MemberPtr>(S, OpPC)) |
9148 | return false; |
9149 | continue; |
9150 | } |
9151 | #endif |
9152 | #ifdef GET_DISASM |
9153 | case OP_DecayPtrPtrPtr: |
9154 | PrintName("DecayPtrPtrPtr" ); |
9155 | OS << "\t" << "\n" ; |
9156 | continue; |
9157 | case OP_DecayPtrPtrFnPtr: |
9158 | PrintName("DecayPtrPtrFnPtr" ); |
9159 | OS << "\t" << "\n" ; |
9160 | continue; |
9161 | case OP_DecayPtrPtrMemberPtr: |
9162 | PrintName("DecayPtrPtrMemberPtr" ); |
9163 | OS << "\t" << "\n" ; |
9164 | continue; |
9165 | case OP_DecayPtrFnPtrPtr: |
9166 | PrintName("DecayPtrFnPtrPtr" ); |
9167 | OS << "\t" << "\n" ; |
9168 | continue; |
9169 | case OP_DecayPtrFnPtrFnPtr: |
9170 | PrintName("DecayPtrFnPtrFnPtr" ); |
9171 | OS << "\t" << "\n" ; |
9172 | continue; |
9173 | case OP_DecayPtrFnPtrMemberPtr: |
9174 | PrintName("DecayPtrFnPtrMemberPtr" ); |
9175 | OS << "\t" << "\n" ; |
9176 | continue; |
9177 | case OP_DecayPtrMemberPtrPtr: |
9178 | PrintName("DecayPtrMemberPtrPtr" ); |
9179 | OS << "\t" << "\n" ; |
9180 | continue; |
9181 | case OP_DecayPtrMemberPtrFnPtr: |
9182 | PrintName("DecayPtrMemberPtrFnPtr" ); |
9183 | OS << "\t" << "\n" ; |
9184 | continue; |
9185 | case OP_DecayPtrMemberPtrMemberPtr: |
9186 | PrintName("DecayPtrMemberPtrMemberPtr" ); |
9187 | OS << "\t" << "\n" ; |
9188 | continue; |
9189 | #endif |
9190 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9191 | bool emitDecayPtrPtrPtr(const SourceInfo &); |
9192 | bool emitDecayPtrPtrFnPtr(const SourceInfo &); |
9193 | bool emitDecayPtrPtrMemberPtr(const SourceInfo &); |
9194 | bool emitDecayPtrFnPtrPtr(const SourceInfo &); |
9195 | bool emitDecayPtrFnPtrFnPtr(const SourceInfo &); |
9196 | bool emitDecayPtrFnPtrMemberPtr(const SourceInfo &); |
9197 | bool emitDecayPtrMemberPtrPtr(const SourceInfo &); |
9198 | bool emitDecayPtrMemberPtrFnPtr(const SourceInfo &); |
9199 | bool emitDecayPtrMemberPtrMemberPtr(const SourceInfo &); |
9200 | #endif |
9201 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9202 | [[nodiscard]] bool emitDecayPtr(PrimType, PrimType, const SourceInfo &I); |
9203 | #endif |
9204 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
9205 | bool |
9206 | #if defined(GET_EVAL_IMPL) |
9207 | EvalEmitter |
9208 | #else |
9209 | ByteCodeEmitter |
9210 | #endif |
9211 | ::emitDecayPtr(PrimType T0, PrimType T1, const SourceInfo &I) { |
9212 | switch (T0) { |
9213 | case PT_Ptr: |
9214 | switch (T1) { |
9215 | case PT_Ptr: |
9216 | return emitDecayPtrPtrPtr(I); |
9217 | case PT_FnPtr: |
9218 | return emitDecayPtrPtrFnPtr(I); |
9219 | case PT_MemberPtr: |
9220 | return emitDecayPtrPtrMemberPtr(I); |
9221 | default: llvm_unreachable("invalid type: emitDecayPtr" ); |
9222 | } |
9223 | llvm_unreachable("invalid enum value" ); |
9224 | case PT_FnPtr: |
9225 | switch (T1) { |
9226 | case PT_Ptr: |
9227 | return emitDecayPtrFnPtrPtr(I); |
9228 | case PT_FnPtr: |
9229 | return emitDecayPtrFnPtrFnPtr(I); |
9230 | case PT_MemberPtr: |
9231 | return emitDecayPtrFnPtrMemberPtr(I); |
9232 | default: llvm_unreachable("invalid type: emitDecayPtr" ); |
9233 | } |
9234 | llvm_unreachable("invalid enum value" ); |
9235 | case PT_MemberPtr: |
9236 | switch (T1) { |
9237 | case PT_Ptr: |
9238 | return emitDecayPtrMemberPtrPtr(I); |
9239 | case PT_FnPtr: |
9240 | return emitDecayPtrMemberPtrFnPtr(I); |
9241 | case PT_MemberPtr: |
9242 | return emitDecayPtrMemberPtrMemberPtr(I); |
9243 | default: llvm_unreachable("invalid type: emitDecayPtr" ); |
9244 | } |
9245 | llvm_unreachable("invalid enum value" ); |
9246 | default: llvm_unreachable("invalid type: emitDecayPtr" ); |
9247 | } |
9248 | llvm_unreachable("invalid enum value" ); |
9249 | } |
9250 | #endif |
9251 | #ifdef GET_LINK_IMPL |
9252 | bool ByteCodeEmitter::emitDecayPtrPtrPtr(const SourceInfo &L) { |
9253 | return emitOp<>(OP_DecayPtrPtrPtr, L); |
9254 | } |
9255 | bool ByteCodeEmitter::emitDecayPtrPtrFnPtr(const SourceInfo &L) { |
9256 | return emitOp<>(OP_DecayPtrPtrFnPtr, L); |
9257 | } |
9258 | bool ByteCodeEmitter::emitDecayPtrPtrMemberPtr(const SourceInfo &L) { |
9259 | return emitOp<>(OP_DecayPtrPtrMemberPtr, L); |
9260 | } |
9261 | bool ByteCodeEmitter::emitDecayPtrFnPtrPtr(const SourceInfo &L) { |
9262 | return emitOp<>(OP_DecayPtrFnPtrPtr, L); |
9263 | } |
9264 | bool ByteCodeEmitter::emitDecayPtrFnPtrFnPtr(const SourceInfo &L) { |
9265 | return emitOp<>(OP_DecayPtrFnPtrFnPtr, L); |
9266 | } |
9267 | bool ByteCodeEmitter::emitDecayPtrFnPtrMemberPtr(const SourceInfo &L) { |
9268 | return emitOp<>(OP_DecayPtrFnPtrMemberPtr, L); |
9269 | } |
9270 | bool ByteCodeEmitter::emitDecayPtrMemberPtrPtr(const SourceInfo &L) { |
9271 | return emitOp<>(OP_DecayPtrMemberPtrPtr, L); |
9272 | } |
9273 | bool ByteCodeEmitter::emitDecayPtrMemberPtrFnPtr(const SourceInfo &L) { |
9274 | return emitOp<>(OP_DecayPtrMemberPtrFnPtr, L); |
9275 | } |
9276 | bool ByteCodeEmitter::emitDecayPtrMemberPtrMemberPtr(const SourceInfo &L) { |
9277 | return emitOp<>(OP_DecayPtrMemberPtrMemberPtr, L); |
9278 | } |
9279 | #endif |
9280 | #ifdef GET_EVAL_IMPL |
9281 | bool EvalEmitter::emitDecayPtrPtrPtr(const SourceInfo &L) { |
9282 | if (!isActive()) return true; |
9283 | CurrentSource = L; |
9284 | return DecayPtr<PT_Ptr, PT_Ptr>(S, OpPC); |
9285 | } |
9286 | bool EvalEmitter::emitDecayPtrPtrFnPtr(const SourceInfo &L) { |
9287 | if (!isActive()) return true; |
9288 | CurrentSource = L; |
9289 | return DecayPtr<PT_Ptr, PT_FnPtr>(S, OpPC); |
9290 | } |
9291 | bool EvalEmitter::emitDecayPtrPtrMemberPtr(const SourceInfo &L) { |
9292 | if (!isActive()) return true; |
9293 | CurrentSource = L; |
9294 | return DecayPtr<PT_Ptr, PT_MemberPtr>(S, OpPC); |
9295 | } |
9296 | bool EvalEmitter::emitDecayPtrFnPtrPtr(const SourceInfo &L) { |
9297 | if (!isActive()) return true; |
9298 | CurrentSource = L; |
9299 | return DecayPtr<PT_FnPtr, PT_Ptr>(S, OpPC); |
9300 | } |
9301 | bool EvalEmitter::emitDecayPtrFnPtrFnPtr(const SourceInfo &L) { |
9302 | if (!isActive()) return true; |
9303 | CurrentSource = L; |
9304 | return DecayPtr<PT_FnPtr, PT_FnPtr>(S, OpPC); |
9305 | } |
9306 | bool EvalEmitter::emitDecayPtrFnPtrMemberPtr(const SourceInfo &L) { |
9307 | if (!isActive()) return true; |
9308 | CurrentSource = L; |
9309 | return DecayPtr<PT_FnPtr, PT_MemberPtr>(S, OpPC); |
9310 | } |
9311 | bool EvalEmitter::emitDecayPtrMemberPtrPtr(const SourceInfo &L) { |
9312 | if (!isActive()) return true; |
9313 | CurrentSource = L; |
9314 | return DecayPtr<PT_MemberPtr, PT_Ptr>(S, OpPC); |
9315 | } |
9316 | bool EvalEmitter::emitDecayPtrMemberPtrFnPtr(const SourceInfo &L) { |
9317 | if (!isActive()) return true; |
9318 | CurrentSource = L; |
9319 | return DecayPtr<PT_MemberPtr, PT_FnPtr>(S, OpPC); |
9320 | } |
9321 | bool EvalEmitter::emitDecayPtrMemberPtrMemberPtr(const SourceInfo &L) { |
9322 | if (!isActive()) return true; |
9323 | CurrentSource = L; |
9324 | return DecayPtr<PT_MemberPtr, PT_MemberPtr>(S, OpPC); |
9325 | } |
9326 | #endif |
9327 | #ifdef GET_OPCODE_NAMES |
9328 | OP_Decf, |
9329 | #endif |
9330 | #ifdef GET_INTERP |
9331 | case OP_Decf: { |
9332 | const auto V0 = ReadArg<llvm::RoundingMode>(S, PC); |
9333 | if (!Decf(S, OpPC, V0)) |
9334 | return false; |
9335 | continue; |
9336 | } |
9337 | #endif |
9338 | #ifdef GET_DISASM |
9339 | case OP_Decf: |
9340 | PrintName("Decf" ); |
9341 | OS << "\t" << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
9342 | continue; |
9343 | #endif |
9344 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9345 | bool emitDecf( llvm::RoundingMode , const SourceInfo &); |
9346 | #endif |
9347 | #ifdef GET_LINK_IMPL |
9348 | bool ByteCodeEmitter::emitDecf( llvm::RoundingMode A0, const SourceInfo &L) { |
9349 | return emitOp<llvm::RoundingMode>(OP_Decf, A0, L); |
9350 | } |
9351 | #endif |
9352 | #ifdef GET_EVAL_IMPL |
9353 | bool EvalEmitter::emitDecf( llvm::RoundingMode A0, const SourceInfo &L) { |
9354 | if (!isActive()) return true; |
9355 | CurrentSource = L; |
9356 | return Decf(S, OpPC, A0); |
9357 | } |
9358 | #endif |
9359 | #ifdef GET_OPCODE_NAMES |
9360 | OP_DecfPop, |
9361 | #endif |
9362 | #ifdef GET_INTERP |
9363 | case OP_DecfPop: { |
9364 | const auto V0 = ReadArg<llvm::RoundingMode>(S, PC); |
9365 | if (!DecfPop(S, OpPC, V0)) |
9366 | return false; |
9367 | continue; |
9368 | } |
9369 | #endif |
9370 | #ifdef GET_DISASM |
9371 | case OP_DecfPop: |
9372 | PrintName("DecfPop" ); |
9373 | OS << "\t" << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
9374 | continue; |
9375 | #endif |
9376 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9377 | bool emitDecfPop( llvm::RoundingMode , const SourceInfo &); |
9378 | #endif |
9379 | #ifdef GET_LINK_IMPL |
9380 | bool ByteCodeEmitter::emitDecfPop( llvm::RoundingMode A0, const SourceInfo &L) { |
9381 | return emitOp<llvm::RoundingMode>(OP_DecfPop, A0, L); |
9382 | } |
9383 | #endif |
9384 | #ifdef GET_EVAL_IMPL |
9385 | bool EvalEmitter::emitDecfPop( llvm::RoundingMode A0, const SourceInfo &L) { |
9386 | if (!isActive()) return true; |
9387 | CurrentSource = L; |
9388 | return DecfPop(S, OpPC, A0); |
9389 | } |
9390 | #endif |
9391 | #ifdef GET_OPCODE_NAMES |
9392 | OP_Destroy, |
9393 | #endif |
9394 | #ifdef GET_INTERP |
9395 | case OP_Destroy: { |
9396 | const auto V0 = ReadArg<uint32_t>(S, PC); |
9397 | if (!Destroy(S, OpPC, V0)) |
9398 | return false; |
9399 | continue; |
9400 | } |
9401 | #endif |
9402 | #ifdef GET_DISASM |
9403 | case OP_Destroy: |
9404 | PrintName("Destroy" ); |
9405 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
9406 | continue; |
9407 | #endif |
9408 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9409 | bool emitDestroy( uint32_t , const SourceInfo &); |
9410 | #endif |
9411 | #ifdef GET_LINK_IMPL |
9412 | bool ByteCodeEmitter::emitDestroy( uint32_t A0, const SourceInfo &L) { |
9413 | return emitOp<uint32_t>(OP_Destroy, A0, L); |
9414 | } |
9415 | #endif |
9416 | #ifdef GET_OPCODE_NAMES |
9417 | OP_DivSint8, |
9418 | OP_DivUint8, |
9419 | OP_DivSint16, |
9420 | OP_DivUint16, |
9421 | OP_DivSint32, |
9422 | OP_DivUint32, |
9423 | OP_DivSint64, |
9424 | OP_DivUint64, |
9425 | OP_DivIntAP, |
9426 | OP_DivIntAPS, |
9427 | #endif |
9428 | #ifdef GET_INTERP |
9429 | case OP_DivSint8: { |
9430 | if (!Div<PT_Sint8>(S, OpPC)) |
9431 | return false; |
9432 | continue; |
9433 | } |
9434 | case OP_DivUint8: { |
9435 | if (!Div<PT_Uint8>(S, OpPC)) |
9436 | return false; |
9437 | continue; |
9438 | } |
9439 | case OP_DivSint16: { |
9440 | if (!Div<PT_Sint16>(S, OpPC)) |
9441 | return false; |
9442 | continue; |
9443 | } |
9444 | case OP_DivUint16: { |
9445 | if (!Div<PT_Uint16>(S, OpPC)) |
9446 | return false; |
9447 | continue; |
9448 | } |
9449 | case OP_DivSint32: { |
9450 | if (!Div<PT_Sint32>(S, OpPC)) |
9451 | return false; |
9452 | continue; |
9453 | } |
9454 | case OP_DivUint32: { |
9455 | if (!Div<PT_Uint32>(S, OpPC)) |
9456 | return false; |
9457 | continue; |
9458 | } |
9459 | case OP_DivSint64: { |
9460 | if (!Div<PT_Sint64>(S, OpPC)) |
9461 | return false; |
9462 | continue; |
9463 | } |
9464 | case OP_DivUint64: { |
9465 | if (!Div<PT_Uint64>(S, OpPC)) |
9466 | return false; |
9467 | continue; |
9468 | } |
9469 | case OP_DivIntAP: { |
9470 | if (!Div<PT_IntAP>(S, OpPC)) |
9471 | return false; |
9472 | continue; |
9473 | } |
9474 | case OP_DivIntAPS: { |
9475 | if (!Div<PT_IntAPS>(S, OpPC)) |
9476 | return false; |
9477 | continue; |
9478 | } |
9479 | #endif |
9480 | #ifdef GET_DISASM |
9481 | case OP_DivSint8: |
9482 | PrintName("DivSint8" ); |
9483 | OS << "\t" << "\n" ; |
9484 | continue; |
9485 | case OP_DivUint8: |
9486 | PrintName("DivUint8" ); |
9487 | OS << "\t" << "\n" ; |
9488 | continue; |
9489 | case OP_DivSint16: |
9490 | PrintName("DivSint16" ); |
9491 | OS << "\t" << "\n" ; |
9492 | continue; |
9493 | case OP_DivUint16: |
9494 | PrintName("DivUint16" ); |
9495 | OS << "\t" << "\n" ; |
9496 | continue; |
9497 | case OP_DivSint32: |
9498 | PrintName("DivSint32" ); |
9499 | OS << "\t" << "\n" ; |
9500 | continue; |
9501 | case OP_DivUint32: |
9502 | PrintName("DivUint32" ); |
9503 | OS << "\t" << "\n" ; |
9504 | continue; |
9505 | case OP_DivSint64: |
9506 | PrintName("DivSint64" ); |
9507 | OS << "\t" << "\n" ; |
9508 | continue; |
9509 | case OP_DivUint64: |
9510 | PrintName("DivUint64" ); |
9511 | OS << "\t" << "\n" ; |
9512 | continue; |
9513 | case OP_DivIntAP: |
9514 | PrintName("DivIntAP" ); |
9515 | OS << "\t" << "\n" ; |
9516 | continue; |
9517 | case OP_DivIntAPS: |
9518 | PrintName("DivIntAPS" ); |
9519 | OS << "\t" << "\n" ; |
9520 | continue; |
9521 | #endif |
9522 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9523 | bool emitDivSint8(const SourceInfo &); |
9524 | bool emitDivUint8(const SourceInfo &); |
9525 | bool emitDivSint16(const SourceInfo &); |
9526 | bool emitDivUint16(const SourceInfo &); |
9527 | bool emitDivSint32(const SourceInfo &); |
9528 | bool emitDivUint32(const SourceInfo &); |
9529 | bool emitDivSint64(const SourceInfo &); |
9530 | bool emitDivUint64(const SourceInfo &); |
9531 | bool emitDivIntAP(const SourceInfo &); |
9532 | bool emitDivIntAPS(const SourceInfo &); |
9533 | #endif |
9534 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9535 | [[nodiscard]] bool emitDiv(PrimType, const SourceInfo &I); |
9536 | #endif |
9537 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
9538 | bool |
9539 | #if defined(GET_EVAL_IMPL) |
9540 | EvalEmitter |
9541 | #else |
9542 | ByteCodeEmitter |
9543 | #endif |
9544 | ::emitDiv(PrimType T0, const SourceInfo &I) { |
9545 | switch (T0) { |
9546 | case PT_Sint8: |
9547 | return emitDivSint8(I); |
9548 | case PT_Uint8: |
9549 | return emitDivUint8(I); |
9550 | case PT_Sint16: |
9551 | return emitDivSint16(I); |
9552 | case PT_Uint16: |
9553 | return emitDivUint16(I); |
9554 | case PT_Sint32: |
9555 | return emitDivSint32(I); |
9556 | case PT_Uint32: |
9557 | return emitDivUint32(I); |
9558 | case PT_Sint64: |
9559 | return emitDivSint64(I); |
9560 | case PT_Uint64: |
9561 | return emitDivUint64(I); |
9562 | case PT_IntAP: |
9563 | return emitDivIntAP(I); |
9564 | case PT_IntAPS: |
9565 | return emitDivIntAPS(I); |
9566 | default: llvm_unreachable("invalid type: emitDiv" ); |
9567 | } |
9568 | llvm_unreachable("invalid enum value" ); |
9569 | } |
9570 | #endif |
9571 | #ifdef GET_LINK_IMPL |
9572 | bool ByteCodeEmitter::emitDivSint8(const SourceInfo &L) { |
9573 | return emitOp<>(OP_DivSint8, L); |
9574 | } |
9575 | bool ByteCodeEmitter::emitDivUint8(const SourceInfo &L) { |
9576 | return emitOp<>(OP_DivUint8, L); |
9577 | } |
9578 | bool ByteCodeEmitter::emitDivSint16(const SourceInfo &L) { |
9579 | return emitOp<>(OP_DivSint16, L); |
9580 | } |
9581 | bool ByteCodeEmitter::emitDivUint16(const SourceInfo &L) { |
9582 | return emitOp<>(OP_DivUint16, L); |
9583 | } |
9584 | bool ByteCodeEmitter::emitDivSint32(const SourceInfo &L) { |
9585 | return emitOp<>(OP_DivSint32, L); |
9586 | } |
9587 | bool ByteCodeEmitter::emitDivUint32(const SourceInfo &L) { |
9588 | return emitOp<>(OP_DivUint32, L); |
9589 | } |
9590 | bool ByteCodeEmitter::emitDivSint64(const SourceInfo &L) { |
9591 | return emitOp<>(OP_DivSint64, L); |
9592 | } |
9593 | bool ByteCodeEmitter::emitDivUint64(const SourceInfo &L) { |
9594 | return emitOp<>(OP_DivUint64, L); |
9595 | } |
9596 | bool ByteCodeEmitter::emitDivIntAP(const SourceInfo &L) { |
9597 | return emitOp<>(OP_DivIntAP, L); |
9598 | } |
9599 | bool ByteCodeEmitter::emitDivIntAPS(const SourceInfo &L) { |
9600 | return emitOp<>(OP_DivIntAPS, L); |
9601 | } |
9602 | #endif |
9603 | #ifdef GET_EVAL_IMPL |
9604 | bool EvalEmitter::emitDivSint8(const SourceInfo &L) { |
9605 | if (!isActive()) return true; |
9606 | CurrentSource = L; |
9607 | return Div<PT_Sint8>(S, OpPC); |
9608 | } |
9609 | bool EvalEmitter::emitDivUint8(const SourceInfo &L) { |
9610 | if (!isActive()) return true; |
9611 | CurrentSource = L; |
9612 | return Div<PT_Uint8>(S, OpPC); |
9613 | } |
9614 | bool EvalEmitter::emitDivSint16(const SourceInfo &L) { |
9615 | if (!isActive()) return true; |
9616 | CurrentSource = L; |
9617 | return Div<PT_Sint16>(S, OpPC); |
9618 | } |
9619 | bool EvalEmitter::emitDivUint16(const SourceInfo &L) { |
9620 | if (!isActive()) return true; |
9621 | CurrentSource = L; |
9622 | return Div<PT_Uint16>(S, OpPC); |
9623 | } |
9624 | bool EvalEmitter::emitDivSint32(const SourceInfo &L) { |
9625 | if (!isActive()) return true; |
9626 | CurrentSource = L; |
9627 | return Div<PT_Sint32>(S, OpPC); |
9628 | } |
9629 | bool EvalEmitter::emitDivUint32(const SourceInfo &L) { |
9630 | if (!isActive()) return true; |
9631 | CurrentSource = L; |
9632 | return Div<PT_Uint32>(S, OpPC); |
9633 | } |
9634 | bool EvalEmitter::emitDivSint64(const SourceInfo &L) { |
9635 | if (!isActive()) return true; |
9636 | CurrentSource = L; |
9637 | return Div<PT_Sint64>(S, OpPC); |
9638 | } |
9639 | bool EvalEmitter::emitDivUint64(const SourceInfo &L) { |
9640 | if (!isActive()) return true; |
9641 | CurrentSource = L; |
9642 | return Div<PT_Uint64>(S, OpPC); |
9643 | } |
9644 | bool EvalEmitter::emitDivIntAP(const SourceInfo &L) { |
9645 | if (!isActive()) return true; |
9646 | CurrentSource = L; |
9647 | return Div<PT_IntAP>(S, OpPC); |
9648 | } |
9649 | bool EvalEmitter::emitDivIntAPS(const SourceInfo &L) { |
9650 | if (!isActive()) return true; |
9651 | CurrentSource = L; |
9652 | return Div<PT_IntAPS>(S, OpPC); |
9653 | } |
9654 | #endif |
9655 | #ifdef GET_OPCODE_NAMES |
9656 | OP_DivcSint8, |
9657 | OP_DivcUint8, |
9658 | OP_DivcSint16, |
9659 | OP_DivcUint16, |
9660 | OP_DivcSint32, |
9661 | OP_DivcUint32, |
9662 | OP_DivcSint64, |
9663 | OP_DivcUint64, |
9664 | OP_DivcIntAP, |
9665 | OP_DivcIntAPS, |
9666 | OP_DivcFloat, |
9667 | #endif |
9668 | #ifdef GET_INTERP |
9669 | case OP_DivcSint8: { |
9670 | if (!Divc<PT_Sint8>(S, OpPC)) |
9671 | return false; |
9672 | continue; |
9673 | } |
9674 | case OP_DivcUint8: { |
9675 | if (!Divc<PT_Uint8>(S, OpPC)) |
9676 | return false; |
9677 | continue; |
9678 | } |
9679 | case OP_DivcSint16: { |
9680 | if (!Divc<PT_Sint16>(S, OpPC)) |
9681 | return false; |
9682 | continue; |
9683 | } |
9684 | case OP_DivcUint16: { |
9685 | if (!Divc<PT_Uint16>(S, OpPC)) |
9686 | return false; |
9687 | continue; |
9688 | } |
9689 | case OP_DivcSint32: { |
9690 | if (!Divc<PT_Sint32>(S, OpPC)) |
9691 | return false; |
9692 | continue; |
9693 | } |
9694 | case OP_DivcUint32: { |
9695 | if (!Divc<PT_Uint32>(S, OpPC)) |
9696 | return false; |
9697 | continue; |
9698 | } |
9699 | case OP_DivcSint64: { |
9700 | if (!Divc<PT_Sint64>(S, OpPC)) |
9701 | return false; |
9702 | continue; |
9703 | } |
9704 | case OP_DivcUint64: { |
9705 | if (!Divc<PT_Uint64>(S, OpPC)) |
9706 | return false; |
9707 | continue; |
9708 | } |
9709 | case OP_DivcIntAP: { |
9710 | if (!Divc<PT_IntAP>(S, OpPC)) |
9711 | return false; |
9712 | continue; |
9713 | } |
9714 | case OP_DivcIntAPS: { |
9715 | if (!Divc<PT_IntAPS>(S, OpPC)) |
9716 | return false; |
9717 | continue; |
9718 | } |
9719 | case OP_DivcFloat: { |
9720 | if (!Divc<PT_Float>(S, OpPC)) |
9721 | return false; |
9722 | continue; |
9723 | } |
9724 | #endif |
9725 | #ifdef GET_DISASM |
9726 | case OP_DivcSint8: |
9727 | PrintName("DivcSint8" ); |
9728 | OS << "\t" << "\n" ; |
9729 | continue; |
9730 | case OP_DivcUint8: |
9731 | PrintName("DivcUint8" ); |
9732 | OS << "\t" << "\n" ; |
9733 | continue; |
9734 | case OP_DivcSint16: |
9735 | PrintName("DivcSint16" ); |
9736 | OS << "\t" << "\n" ; |
9737 | continue; |
9738 | case OP_DivcUint16: |
9739 | PrintName("DivcUint16" ); |
9740 | OS << "\t" << "\n" ; |
9741 | continue; |
9742 | case OP_DivcSint32: |
9743 | PrintName("DivcSint32" ); |
9744 | OS << "\t" << "\n" ; |
9745 | continue; |
9746 | case OP_DivcUint32: |
9747 | PrintName("DivcUint32" ); |
9748 | OS << "\t" << "\n" ; |
9749 | continue; |
9750 | case OP_DivcSint64: |
9751 | PrintName("DivcSint64" ); |
9752 | OS << "\t" << "\n" ; |
9753 | continue; |
9754 | case OP_DivcUint64: |
9755 | PrintName("DivcUint64" ); |
9756 | OS << "\t" << "\n" ; |
9757 | continue; |
9758 | case OP_DivcIntAP: |
9759 | PrintName("DivcIntAP" ); |
9760 | OS << "\t" << "\n" ; |
9761 | continue; |
9762 | case OP_DivcIntAPS: |
9763 | PrintName("DivcIntAPS" ); |
9764 | OS << "\t" << "\n" ; |
9765 | continue; |
9766 | case OP_DivcFloat: |
9767 | PrintName("DivcFloat" ); |
9768 | OS << "\t" << "\n" ; |
9769 | continue; |
9770 | #endif |
9771 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9772 | bool emitDivcSint8(const SourceInfo &); |
9773 | bool emitDivcUint8(const SourceInfo &); |
9774 | bool emitDivcSint16(const SourceInfo &); |
9775 | bool emitDivcUint16(const SourceInfo &); |
9776 | bool emitDivcSint32(const SourceInfo &); |
9777 | bool emitDivcUint32(const SourceInfo &); |
9778 | bool emitDivcSint64(const SourceInfo &); |
9779 | bool emitDivcUint64(const SourceInfo &); |
9780 | bool emitDivcIntAP(const SourceInfo &); |
9781 | bool emitDivcIntAPS(const SourceInfo &); |
9782 | bool emitDivcFloat(const SourceInfo &); |
9783 | #endif |
9784 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9785 | [[nodiscard]] bool emitDivc(PrimType, const SourceInfo &I); |
9786 | #endif |
9787 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
9788 | bool |
9789 | #if defined(GET_EVAL_IMPL) |
9790 | EvalEmitter |
9791 | #else |
9792 | ByteCodeEmitter |
9793 | #endif |
9794 | ::emitDivc(PrimType T0, const SourceInfo &I) { |
9795 | switch (T0) { |
9796 | case PT_Sint8: |
9797 | return emitDivcSint8(I); |
9798 | case PT_Uint8: |
9799 | return emitDivcUint8(I); |
9800 | case PT_Sint16: |
9801 | return emitDivcSint16(I); |
9802 | case PT_Uint16: |
9803 | return emitDivcUint16(I); |
9804 | case PT_Sint32: |
9805 | return emitDivcSint32(I); |
9806 | case PT_Uint32: |
9807 | return emitDivcUint32(I); |
9808 | case PT_Sint64: |
9809 | return emitDivcSint64(I); |
9810 | case PT_Uint64: |
9811 | return emitDivcUint64(I); |
9812 | case PT_IntAP: |
9813 | return emitDivcIntAP(I); |
9814 | case PT_IntAPS: |
9815 | return emitDivcIntAPS(I); |
9816 | case PT_Float: |
9817 | return emitDivcFloat(I); |
9818 | default: llvm_unreachable("invalid type: emitDivc" ); |
9819 | } |
9820 | llvm_unreachable("invalid enum value" ); |
9821 | } |
9822 | #endif |
9823 | #ifdef GET_LINK_IMPL |
9824 | bool ByteCodeEmitter::emitDivcSint8(const SourceInfo &L) { |
9825 | return emitOp<>(OP_DivcSint8, L); |
9826 | } |
9827 | bool ByteCodeEmitter::emitDivcUint8(const SourceInfo &L) { |
9828 | return emitOp<>(OP_DivcUint8, L); |
9829 | } |
9830 | bool ByteCodeEmitter::emitDivcSint16(const SourceInfo &L) { |
9831 | return emitOp<>(OP_DivcSint16, L); |
9832 | } |
9833 | bool ByteCodeEmitter::emitDivcUint16(const SourceInfo &L) { |
9834 | return emitOp<>(OP_DivcUint16, L); |
9835 | } |
9836 | bool ByteCodeEmitter::emitDivcSint32(const SourceInfo &L) { |
9837 | return emitOp<>(OP_DivcSint32, L); |
9838 | } |
9839 | bool ByteCodeEmitter::emitDivcUint32(const SourceInfo &L) { |
9840 | return emitOp<>(OP_DivcUint32, L); |
9841 | } |
9842 | bool ByteCodeEmitter::emitDivcSint64(const SourceInfo &L) { |
9843 | return emitOp<>(OP_DivcSint64, L); |
9844 | } |
9845 | bool ByteCodeEmitter::emitDivcUint64(const SourceInfo &L) { |
9846 | return emitOp<>(OP_DivcUint64, L); |
9847 | } |
9848 | bool ByteCodeEmitter::emitDivcIntAP(const SourceInfo &L) { |
9849 | return emitOp<>(OP_DivcIntAP, L); |
9850 | } |
9851 | bool ByteCodeEmitter::emitDivcIntAPS(const SourceInfo &L) { |
9852 | return emitOp<>(OP_DivcIntAPS, L); |
9853 | } |
9854 | bool ByteCodeEmitter::emitDivcFloat(const SourceInfo &L) { |
9855 | return emitOp<>(OP_DivcFloat, L); |
9856 | } |
9857 | #endif |
9858 | #ifdef GET_EVAL_IMPL |
9859 | bool EvalEmitter::emitDivcSint8(const SourceInfo &L) { |
9860 | if (!isActive()) return true; |
9861 | CurrentSource = L; |
9862 | return Divc<PT_Sint8>(S, OpPC); |
9863 | } |
9864 | bool EvalEmitter::emitDivcUint8(const SourceInfo &L) { |
9865 | if (!isActive()) return true; |
9866 | CurrentSource = L; |
9867 | return Divc<PT_Uint8>(S, OpPC); |
9868 | } |
9869 | bool EvalEmitter::emitDivcSint16(const SourceInfo &L) { |
9870 | if (!isActive()) return true; |
9871 | CurrentSource = L; |
9872 | return Divc<PT_Sint16>(S, OpPC); |
9873 | } |
9874 | bool EvalEmitter::emitDivcUint16(const SourceInfo &L) { |
9875 | if (!isActive()) return true; |
9876 | CurrentSource = L; |
9877 | return Divc<PT_Uint16>(S, OpPC); |
9878 | } |
9879 | bool EvalEmitter::emitDivcSint32(const SourceInfo &L) { |
9880 | if (!isActive()) return true; |
9881 | CurrentSource = L; |
9882 | return Divc<PT_Sint32>(S, OpPC); |
9883 | } |
9884 | bool EvalEmitter::emitDivcUint32(const SourceInfo &L) { |
9885 | if (!isActive()) return true; |
9886 | CurrentSource = L; |
9887 | return Divc<PT_Uint32>(S, OpPC); |
9888 | } |
9889 | bool EvalEmitter::emitDivcSint64(const SourceInfo &L) { |
9890 | if (!isActive()) return true; |
9891 | CurrentSource = L; |
9892 | return Divc<PT_Sint64>(S, OpPC); |
9893 | } |
9894 | bool EvalEmitter::emitDivcUint64(const SourceInfo &L) { |
9895 | if (!isActive()) return true; |
9896 | CurrentSource = L; |
9897 | return Divc<PT_Uint64>(S, OpPC); |
9898 | } |
9899 | bool EvalEmitter::emitDivcIntAP(const SourceInfo &L) { |
9900 | if (!isActive()) return true; |
9901 | CurrentSource = L; |
9902 | return Divc<PT_IntAP>(S, OpPC); |
9903 | } |
9904 | bool EvalEmitter::emitDivcIntAPS(const SourceInfo &L) { |
9905 | if (!isActive()) return true; |
9906 | CurrentSource = L; |
9907 | return Divc<PT_IntAPS>(S, OpPC); |
9908 | } |
9909 | bool EvalEmitter::emitDivcFloat(const SourceInfo &L) { |
9910 | if (!isActive()) return true; |
9911 | CurrentSource = L; |
9912 | return Divc<PT_Float>(S, OpPC); |
9913 | } |
9914 | #endif |
9915 | #ifdef GET_OPCODE_NAMES |
9916 | OP_Divf, |
9917 | #endif |
9918 | #ifdef GET_INTERP |
9919 | case OP_Divf: { |
9920 | const auto V0 = ReadArg<llvm::RoundingMode>(S, PC); |
9921 | if (!Divf(S, OpPC, V0)) |
9922 | return false; |
9923 | continue; |
9924 | } |
9925 | #endif |
9926 | #ifdef GET_DISASM |
9927 | case OP_Divf: |
9928 | PrintName("Divf" ); |
9929 | OS << "\t" << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
9930 | continue; |
9931 | #endif |
9932 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9933 | bool emitDivf( llvm::RoundingMode , const SourceInfo &); |
9934 | #endif |
9935 | #ifdef GET_LINK_IMPL |
9936 | bool ByteCodeEmitter::emitDivf( llvm::RoundingMode A0, const SourceInfo &L) { |
9937 | return emitOp<llvm::RoundingMode>(OP_Divf, A0, L); |
9938 | } |
9939 | #endif |
9940 | #ifdef GET_EVAL_IMPL |
9941 | bool EvalEmitter::emitDivf( llvm::RoundingMode A0, const SourceInfo &L) { |
9942 | if (!isActive()) return true; |
9943 | CurrentSource = L; |
9944 | return Divf(S, OpPC, A0); |
9945 | } |
9946 | #endif |
9947 | #ifdef GET_OPCODE_NAMES |
9948 | OP_Dump, |
9949 | #endif |
9950 | #ifdef GET_INTERP |
9951 | case OP_Dump: { |
9952 | if (!Dump(S, OpPC)) |
9953 | return false; |
9954 | continue; |
9955 | } |
9956 | #endif |
9957 | #ifdef GET_DISASM |
9958 | case OP_Dump: |
9959 | PrintName("Dump" ); |
9960 | OS << "\t" << "\n" ; |
9961 | continue; |
9962 | #endif |
9963 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
9964 | bool emitDump(const SourceInfo &); |
9965 | #endif |
9966 | #ifdef GET_LINK_IMPL |
9967 | bool ByteCodeEmitter::emitDump(const SourceInfo &L) { |
9968 | return emitOp<>(OP_Dump, L); |
9969 | } |
9970 | #endif |
9971 | #ifdef GET_EVAL_IMPL |
9972 | bool EvalEmitter::emitDump(const SourceInfo &L) { |
9973 | if (!isActive()) return true; |
9974 | CurrentSource = L; |
9975 | return Dump(S, OpPC); |
9976 | } |
9977 | #endif |
9978 | #ifdef GET_OPCODE_NAMES |
9979 | OP_DupSint8, |
9980 | OP_DupUint8, |
9981 | OP_DupSint16, |
9982 | OP_DupUint16, |
9983 | OP_DupSint32, |
9984 | OP_DupUint32, |
9985 | OP_DupSint64, |
9986 | OP_DupUint64, |
9987 | OP_DupIntAP, |
9988 | OP_DupIntAPS, |
9989 | OP_DupBool, |
9990 | OP_DupPtr, |
9991 | OP_DupFnPtr, |
9992 | OP_DupMemberPtr, |
9993 | OP_DupFloat, |
9994 | #endif |
9995 | #ifdef GET_INTERP |
9996 | case OP_DupSint8: { |
9997 | if (!Dup<PT_Sint8>(S, OpPC)) |
9998 | return false; |
9999 | continue; |
10000 | } |
10001 | case OP_DupUint8: { |
10002 | if (!Dup<PT_Uint8>(S, OpPC)) |
10003 | return false; |
10004 | continue; |
10005 | } |
10006 | case OP_DupSint16: { |
10007 | if (!Dup<PT_Sint16>(S, OpPC)) |
10008 | return false; |
10009 | continue; |
10010 | } |
10011 | case OP_DupUint16: { |
10012 | if (!Dup<PT_Uint16>(S, OpPC)) |
10013 | return false; |
10014 | continue; |
10015 | } |
10016 | case OP_DupSint32: { |
10017 | if (!Dup<PT_Sint32>(S, OpPC)) |
10018 | return false; |
10019 | continue; |
10020 | } |
10021 | case OP_DupUint32: { |
10022 | if (!Dup<PT_Uint32>(S, OpPC)) |
10023 | return false; |
10024 | continue; |
10025 | } |
10026 | case OP_DupSint64: { |
10027 | if (!Dup<PT_Sint64>(S, OpPC)) |
10028 | return false; |
10029 | continue; |
10030 | } |
10031 | case OP_DupUint64: { |
10032 | if (!Dup<PT_Uint64>(S, OpPC)) |
10033 | return false; |
10034 | continue; |
10035 | } |
10036 | case OP_DupIntAP: { |
10037 | if (!Dup<PT_IntAP>(S, OpPC)) |
10038 | return false; |
10039 | continue; |
10040 | } |
10041 | case OP_DupIntAPS: { |
10042 | if (!Dup<PT_IntAPS>(S, OpPC)) |
10043 | return false; |
10044 | continue; |
10045 | } |
10046 | case OP_DupBool: { |
10047 | if (!Dup<PT_Bool>(S, OpPC)) |
10048 | return false; |
10049 | continue; |
10050 | } |
10051 | case OP_DupPtr: { |
10052 | if (!Dup<PT_Ptr>(S, OpPC)) |
10053 | return false; |
10054 | continue; |
10055 | } |
10056 | case OP_DupFnPtr: { |
10057 | if (!Dup<PT_FnPtr>(S, OpPC)) |
10058 | return false; |
10059 | continue; |
10060 | } |
10061 | case OP_DupMemberPtr: { |
10062 | if (!Dup<PT_MemberPtr>(S, OpPC)) |
10063 | return false; |
10064 | continue; |
10065 | } |
10066 | case OP_DupFloat: { |
10067 | if (!Dup<PT_Float>(S, OpPC)) |
10068 | return false; |
10069 | continue; |
10070 | } |
10071 | #endif |
10072 | #ifdef GET_DISASM |
10073 | case OP_DupSint8: |
10074 | PrintName("DupSint8" ); |
10075 | OS << "\t" << "\n" ; |
10076 | continue; |
10077 | case OP_DupUint8: |
10078 | PrintName("DupUint8" ); |
10079 | OS << "\t" << "\n" ; |
10080 | continue; |
10081 | case OP_DupSint16: |
10082 | PrintName("DupSint16" ); |
10083 | OS << "\t" << "\n" ; |
10084 | continue; |
10085 | case OP_DupUint16: |
10086 | PrintName("DupUint16" ); |
10087 | OS << "\t" << "\n" ; |
10088 | continue; |
10089 | case OP_DupSint32: |
10090 | PrintName("DupSint32" ); |
10091 | OS << "\t" << "\n" ; |
10092 | continue; |
10093 | case OP_DupUint32: |
10094 | PrintName("DupUint32" ); |
10095 | OS << "\t" << "\n" ; |
10096 | continue; |
10097 | case OP_DupSint64: |
10098 | PrintName("DupSint64" ); |
10099 | OS << "\t" << "\n" ; |
10100 | continue; |
10101 | case OP_DupUint64: |
10102 | PrintName("DupUint64" ); |
10103 | OS << "\t" << "\n" ; |
10104 | continue; |
10105 | case OP_DupIntAP: |
10106 | PrintName("DupIntAP" ); |
10107 | OS << "\t" << "\n" ; |
10108 | continue; |
10109 | case OP_DupIntAPS: |
10110 | PrintName("DupIntAPS" ); |
10111 | OS << "\t" << "\n" ; |
10112 | continue; |
10113 | case OP_DupBool: |
10114 | PrintName("DupBool" ); |
10115 | OS << "\t" << "\n" ; |
10116 | continue; |
10117 | case OP_DupPtr: |
10118 | PrintName("DupPtr" ); |
10119 | OS << "\t" << "\n" ; |
10120 | continue; |
10121 | case OP_DupFnPtr: |
10122 | PrintName("DupFnPtr" ); |
10123 | OS << "\t" << "\n" ; |
10124 | continue; |
10125 | case OP_DupMemberPtr: |
10126 | PrintName("DupMemberPtr" ); |
10127 | OS << "\t" << "\n" ; |
10128 | continue; |
10129 | case OP_DupFloat: |
10130 | PrintName("DupFloat" ); |
10131 | OS << "\t" << "\n" ; |
10132 | continue; |
10133 | #endif |
10134 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10135 | bool emitDupSint8(const SourceInfo &); |
10136 | bool emitDupUint8(const SourceInfo &); |
10137 | bool emitDupSint16(const SourceInfo &); |
10138 | bool emitDupUint16(const SourceInfo &); |
10139 | bool emitDupSint32(const SourceInfo &); |
10140 | bool emitDupUint32(const SourceInfo &); |
10141 | bool emitDupSint64(const SourceInfo &); |
10142 | bool emitDupUint64(const SourceInfo &); |
10143 | bool emitDupIntAP(const SourceInfo &); |
10144 | bool emitDupIntAPS(const SourceInfo &); |
10145 | bool emitDupBool(const SourceInfo &); |
10146 | bool emitDupPtr(const SourceInfo &); |
10147 | bool emitDupFnPtr(const SourceInfo &); |
10148 | bool emitDupMemberPtr(const SourceInfo &); |
10149 | bool emitDupFloat(const SourceInfo &); |
10150 | #endif |
10151 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10152 | [[nodiscard]] bool emitDup(PrimType, const SourceInfo &I); |
10153 | #endif |
10154 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
10155 | bool |
10156 | #if defined(GET_EVAL_IMPL) |
10157 | EvalEmitter |
10158 | #else |
10159 | ByteCodeEmitter |
10160 | #endif |
10161 | ::emitDup(PrimType T0, const SourceInfo &I) { |
10162 | switch (T0) { |
10163 | case PT_Sint8: |
10164 | return emitDupSint8(I); |
10165 | case PT_Uint8: |
10166 | return emitDupUint8(I); |
10167 | case PT_Sint16: |
10168 | return emitDupSint16(I); |
10169 | case PT_Uint16: |
10170 | return emitDupUint16(I); |
10171 | case PT_Sint32: |
10172 | return emitDupSint32(I); |
10173 | case PT_Uint32: |
10174 | return emitDupUint32(I); |
10175 | case PT_Sint64: |
10176 | return emitDupSint64(I); |
10177 | case PT_Uint64: |
10178 | return emitDupUint64(I); |
10179 | case PT_IntAP: |
10180 | return emitDupIntAP(I); |
10181 | case PT_IntAPS: |
10182 | return emitDupIntAPS(I); |
10183 | case PT_Bool: |
10184 | return emitDupBool(I); |
10185 | case PT_Ptr: |
10186 | return emitDupPtr(I); |
10187 | case PT_FnPtr: |
10188 | return emitDupFnPtr(I); |
10189 | case PT_MemberPtr: |
10190 | return emitDupMemberPtr(I); |
10191 | case PT_Float: |
10192 | return emitDupFloat(I); |
10193 | } |
10194 | llvm_unreachable("invalid enum value" ); |
10195 | } |
10196 | #endif |
10197 | #ifdef GET_LINK_IMPL |
10198 | bool ByteCodeEmitter::emitDupSint8(const SourceInfo &L) { |
10199 | return emitOp<>(OP_DupSint8, L); |
10200 | } |
10201 | bool ByteCodeEmitter::emitDupUint8(const SourceInfo &L) { |
10202 | return emitOp<>(OP_DupUint8, L); |
10203 | } |
10204 | bool ByteCodeEmitter::emitDupSint16(const SourceInfo &L) { |
10205 | return emitOp<>(OP_DupSint16, L); |
10206 | } |
10207 | bool ByteCodeEmitter::emitDupUint16(const SourceInfo &L) { |
10208 | return emitOp<>(OP_DupUint16, L); |
10209 | } |
10210 | bool ByteCodeEmitter::emitDupSint32(const SourceInfo &L) { |
10211 | return emitOp<>(OP_DupSint32, L); |
10212 | } |
10213 | bool ByteCodeEmitter::emitDupUint32(const SourceInfo &L) { |
10214 | return emitOp<>(OP_DupUint32, L); |
10215 | } |
10216 | bool ByteCodeEmitter::emitDupSint64(const SourceInfo &L) { |
10217 | return emitOp<>(OP_DupSint64, L); |
10218 | } |
10219 | bool ByteCodeEmitter::emitDupUint64(const SourceInfo &L) { |
10220 | return emitOp<>(OP_DupUint64, L); |
10221 | } |
10222 | bool ByteCodeEmitter::emitDupIntAP(const SourceInfo &L) { |
10223 | return emitOp<>(OP_DupIntAP, L); |
10224 | } |
10225 | bool ByteCodeEmitter::emitDupIntAPS(const SourceInfo &L) { |
10226 | return emitOp<>(OP_DupIntAPS, L); |
10227 | } |
10228 | bool ByteCodeEmitter::emitDupBool(const SourceInfo &L) { |
10229 | return emitOp<>(OP_DupBool, L); |
10230 | } |
10231 | bool ByteCodeEmitter::emitDupPtr(const SourceInfo &L) { |
10232 | return emitOp<>(OP_DupPtr, L); |
10233 | } |
10234 | bool ByteCodeEmitter::emitDupFnPtr(const SourceInfo &L) { |
10235 | return emitOp<>(OP_DupFnPtr, L); |
10236 | } |
10237 | bool ByteCodeEmitter::emitDupMemberPtr(const SourceInfo &L) { |
10238 | return emitOp<>(OP_DupMemberPtr, L); |
10239 | } |
10240 | bool ByteCodeEmitter::emitDupFloat(const SourceInfo &L) { |
10241 | return emitOp<>(OP_DupFloat, L); |
10242 | } |
10243 | #endif |
10244 | #ifdef GET_EVAL_IMPL |
10245 | bool EvalEmitter::emitDupSint8(const SourceInfo &L) { |
10246 | if (!isActive()) return true; |
10247 | CurrentSource = L; |
10248 | return Dup<PT_Sint8>(S, OpPC); |
10249 | } |
10250 | bool EvalEmitter::emitDupUint8(const SourceInfo &L) { |
10251 | if (!isActive()) return true; |
10252 | CurrentSource = L; |
10253 | return Dup<PT_Uint8>(S, OpPC); |
10254 | } |
10255 | bool EvalEmitter::emitDupSint16(const SourceInfo &L) { |
10256 | if (!isActive()) return true; |
10257 | CurrentSource = L; |
10258 | return Dup<PT_Sint16>(S, OpPC); |
10259 | } |
10260 | bool EvalEmitter::emitDupUint16(const SourceInfo &L) { |
10261 | if (!isActive()) return true; |
10262 | CurrentSource = L; |
10263 | return Dup<PT_Uint16>(S, OpPC); |
10264 | } |
10265 | bool EvalEmitter::emitDupSint32(const SourceInfo &L) { |
10266 | if (!isActive()) return true; |
10267 | CurrentSource = L; |
10268 | return Dup<PT_Sint32>(S, OpPC); |
10269 | } |
10270 | bool EvalEmitter::emitDupUint32(const SourceInfo &L) { |
10271 | if (!isActive()) return true; |
10272 | CurrentSource = L; |
10273 | return Dup<PT_Uint32>(S, OpPC); |
10274 | } |
10275 | bool EvalEmitter::emitDupSint64(const SourceInfo &L) { |
10276 | if (!isActive()) return true; |
10277 | CurrentSource = L; |
10278 | return Dup<PT_Sint64>(S, OpPC); |
10279 | } |
10280 | bool EvalEmitter::emitDupUint64(const SourceInfo &L) { |
10281 | if (!isActive()) return true; |
10282 | CurrentSource = L; |
10283 | return Dup<PT_Uint64>(S, OpPC); |
10284 | } |
10285 | bool EvalEmitter::emitDupIntAP(const SourceInfo &L) { |
10286 | if (!isActive()) return true; |
10287 | CurrentSource = L; |
10288 | return Dup<PT_IntAP>(S, OpPC); |
10289 | } |
10290 | bool EvalEmitter::emitDupIntAPS(const SourceInfo &L) { |
10291 | if (!isActive()) return true; |
10292 | CurrentSource = L; |
10293 | return Dup<PT_IntAPS>(S, OpPC); |
10294 | } |
10295 | bool EvalEmitter::emitDupBool(const SourceInfo &L) { |
10296 | if (!isActive()) return true; |
10297 | CurrentSource = L; |
10298 | return Dup<PT_Bool>(S, OpPC); |
10299 | } |
10300 | bool EvalEmitter::emitDupPtr(const SourceInfo &L) { |
10301 | if (!isActive()) return true; |
10302 | CurrentSource = L; |
10303 | return Dup<PT_Ptr>(S, OpPC); |
10304 | } |
10305 | bool EvalEmitter::emitDupFnPtr(const SourceInfo &L) { |
10306 | if (!isActive()) return true; |
10307 | CurrentSource = L; |
10308 | return Dup<PT_FnPtr>(S, OpPC); |
10309 | } |
10310 | bool EvalEmitter::emitDupMemberPtr(const SourceInfo &L) { |
10311 | if (!isActive()) return true; |
10312 | CurrentSource = L; |
10313 | return Dup<PT_MemberPtr>(S, OpPC); |
10314 | } |
10315 | bool EvalEmitter::emitDupFloat(const SourceInfo &L) { |
10316 | if (!isActive()) return true; |
10317 | CurrentSource = L; |
10318 | return Dup<PT_Float>(S, OpPC); |
10319 | } |
10320 | #endif |
10321 | #ifdef GET_OPCODE_NAMES |
10322 | OP_EQSint8, |
10323 | OP_EQUint8, |
10324 | OP_EQSint16, |
10325 | OP_EQUint16, |
10326 | OP_EQSint32, |
10327 | OP_EQUint32, |
10328 | OP_EQSint64, |
10329 | OP_EQUint64, |
10330 | OP_EQIntAP, |
10331 | OP_EQIntAPS, |
10332 | OP_EQBool, |
10333 | OP_EQPtr, |
10334 | OP_EQFnPtr, |
10335 | OP_EQMemberPtr, |
10336 | OP_EQFloat, |
10337 | #endif |
10338 | #ifdef GET_INTERP |
10339 | case OP_EQSint8: { |
10340 | if (!EQ<PT_Sint8>(S, OpPC)) |
10341 | return false; |
10342 | continue; |
10343 | } |
10344 | case OP_EQUint8: { |
10345 | if (!EQ<PT_Uint8>(S, OpPC)) |
10346 | return false; |
10347 | continue; |
10348 | } |
10349 | case OP_EQSint16: { |
10350 | if (!EQ<PT_Sint16>(S, OpPC)) |
10351 | return false; |
10352 | continue; |
10353 | } |
10354 | case OP_EQUint16: { |
10355 | if (!EQ<PT_Uint16>(S, OpPC)) |
10356 | return false; |
10357 | continue; |
10358 | } |
10359 | case OP_EQSint32: { |
10360 | if (!EQ<PT_Sint32>(S, OpPC)) |
10361 | return false; |
10362 | continue; |
10363 | } |
10364 | case OP_EQUint32: { |
10365 | if (!EQ<PT_Uint32>(S, OpPC)) |
10366 | return false; |
10367 | continue; |
10368 | } |
10369 | case OP_EQSint64: { |
10370 | if (!EQ<PT_Sint64>(S, OpPC)) |
10371 | return false; |
10372 | continue; |
10373 | } |
10374 | case OP_EQUint64: { |
10375 | if (!EQ<PT_Uint64>(S, OpPC)) |
10376 | return false; |
10377 | continue; |
10378 | } |
10379 | case OP_EQIntAP: { |
10380 | if (!EQ<PT_IntAP>(S, OpPC)) |
10381 | return false; |
10382 | continue; |
10383 | } |
10384 | case OP_EQIntAPS: { |
10385 | if (!EQ<PT_IntAPS>(S, OpPC)) |
10386 | return false; |
10387 | continue; |
10388 | } |
10389 | case OP_EQBool: { |
10390 | if (!EQ<PT_Bool>(S, OpPC)) |
10391 | return false; |
10392 | continue; |
10393 | } |
10394 | case OP_EQPtr: { |
10395 | if (!EQ<PT_Ptr>(S, OpPC)) |
10396 | return false; |
10397 | continue; |
10398 | } |
10399 | case OP_EQFnPtr: { |
10400 | if (!EQ<PT_FnPtr>(S, OpPC)) |
10401 | return false; |
10402 | continue; |
10403 | } |
10404 | case OP_EQMemberPtr: { |
10405 | if (!EQ<PT_MemberPtr>(S, OpPC)) |
10406 | return false; |
10407 | continue; |
10408 | } |
10409 | case OP_EQFloat: { |
10410 | if (!EQ<PT_Float>(S, OpPC)) |
10411 | return false; |
10412 | continue; |
10413 | } |
10414 | #endif |
10415 | #ifdef GET_DISASM |
10416 | case OP_EQSint8: |
10417 | PrintName("EQSint8" ); |
10418 | OS << "\t" << "\n" ; |
10419 | continue; |
10420 | case OP_EQUint8: |
10421 | PrintName("EQUint8" ); |
10422 | OS << "\t" << "\n" ; |
10423 | continue; |
10424 | case OP_EQSint16: |
10425 | PrintName("EQSint16" ); |
10426 | OS << "\t" << "\n" ; |
10427 | continue; |
10428 | case OP_EQUint16: |
10429 | PrintName("EQUint16" ); |
10430 | OS << "\t" << "\n" ; |
10431 | continue; |
10432 | case OP_EQSint32: |
10433 | PrintName("EQSint32" ); |
10434 | OS << "\t" << "\n" ; |
10435 | continue; |
10436 | case OP_EQUint32: |
10437 | PrintName("EQUint32" ); |
10438 | OS << "\t" << "\n" ; |
10439 | continue; |
10440 | case OP_EQSint64: |
10441 | PrintName("EQSint64" ); |
10442 | OS << "\t" << "\n" ; |
10443 | continue; |
10444 | case OP_EQUint64: |
10445 | PrintName("EQUint64" ); |
10446 | OS << "\t" << "\n" ; |
10447 | continue; |
10448 | case OP_EQIntAP: |
10449 | PrintName("EQIntAP" ); |
10450 | OS << "\t" << "\n" ; |
10451 | continue; |
10452 | case OP_EQIntAPS: |
10453 | PrintName("EQIntAPS" ); |
10454 | OS << "\t" << "\n" ; |
10455 | continue; |
10456 | case OP_EQBool: |
10457 | PrintName("EQBool" ); |
10458 | OS << "\t" << "\n" ; |
10459 | continue; |
10460 | case OP_EQPtr: |
10461 | PrintName("EQPtr" ); |
10462 | OS << "\t" << "\n" ; |
10463 | continue; |
10464 | case OP_EQFnPtr: |
10465 | PrintName("EQFnPtr" ); |
10466 | OS << "\t" << "\n" ; |
10467 | continue; |
10468 | case OP_EQMemberPtr: |
10469 | PrintName("EQMemberPtr" ); |
10470 | OS << "\t" << "\n" ; |
10471 | continue; |
10472 | case OP_EQFloat: |
10473 | PrintName("EQFloat" ); |
10474 | OS << "\t" << "\n" ; |
10475 | continue; |
10476 | #endif |
10477 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10478 | bool emitEQSint8(const SourceInfo &); |
10479 | bool emitEQUint8(const SourceInfo &); |
10480 | bool emitEQSint16(const SourceInfo &); |
10481 | bool emitEQUint16(const SourceInfo &); |
10482 | bool emitEQSint32(const SourceInfo &); |
10483 | bool emitEQUint32(const SourceInfo &); |
10484 | bool emitEQSint64(const SourceInfo &); |
10485 | bool emitEQUint64(const SourceInfo &); |
10486 | bool emitEQIntAP(const SourceInfo &); |
10487 | bool emitEQIntAPS(const SourceInfo &); |
10488 | bool emitEQBool(const SourceInfo &); |
10489 | bool emitEQPtr(const SourceInfo &); |
10490 | bool emitEQFnPtr(const SourceInfo &); |
10491 | bool emitEQMemberPtr(const SourceInfo &); |
10492 | bool emitEQFloat(const SourceInfo &); |
10493 | #endif |
10494 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10495 | [[nodiscard]] bool emitEQ(PrimType, const SourceInfo &I); |
10496 | #endif |
10497 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
10498 | bool |
10499 | #if defined(GET_EVAL_IMPL) |
10500 | EvalEmitter |
10501 | #else |
10502 | ByteCodeEmitter |
10503 | #endif |
10504 | ::emitEQ(PrimType T0, const SourceInfo &I) { |
10505 | switch (T0) { |
10506 | case PT_Sint8: |
10507 | return emitEQSint8(I); |
10508 | case PT_Uint8: |
10509 | return emitEQUint8(I); |
10510 | case PT_Sint16: |
10511 | return emitEQSint16(I); |
10512 | case PT_Uint16: |
10513 | return emitEQUint16(I); |
10514 | case PT_Sint32: |
10515 | return emitEQSint32(I); |
10516 | case PT_Uint32: |
10517 | return emitEQUint32(I); |
10518 | case PT_Sint64: |
10519 | return emitEQSint64(I); |
10520 | case PT_Uint64: |
10521 | return emitEQUint64(I); |
10522 | case PT_IntAP: |
10523 | return emitEQIntAP(I); |
10524 | case PT_IntAPS: |
10525 | return emitEQIntAPS(I); |
10526 | case PT_Bool: |
10527 | return emitEQBool(I); |
10528 | case PT_Ptr: |
10529 | return emitEQPtr(I); |
10530 | case PT_FnPtr: |
10531 | return emitEQFnPtr(I); |
10532 | case PT_MemberPtr: |
10533 | return emitEQMemberPtr(I); |
10534 | case PT_Float: |
10535 | return emitEQFloat(I); |
10536 | } |
10537 | llvm_unreachable("invalid enum value" ); |
10538 | } |
10539 | #endif |
10540 | #ifdef GET_LINK_IMPL |
10541 | bool ByteCodeEmitter::emitEQSint8(const SourceInfo &L) { |
10542 | return emitOp<>(OP_EQSint8, L); |
10543 | } |
10544 | bool ByteCodeEmitter::emitEQUint8(const SourceInfo &L) { |
10545 | return emitOp<>(OP_EQUint8, L); |
10546 | } |
10547 | bool ByteCodeEmitter::emitEQSint16(const SourceInfo &L) { |
10548 | return emitOp<>(OP_EQSint16, L); |
10549 | } |
10550 | bool ByteCodeEmitter::emitEQUint16(const SourceInfo &L) { |
10551 | return emitOp<>(OP_EQUint16, L); |
10552 | } |
10553 | bool ByteCodeEmitter::emitEQSint32(const SourceInfo &L) { |
10554 | return emitOp<>(OP_EQSint32, L); |
10555 | } |
10556 | bool ByteCodeEmitter::emitEQUint32(const SourceInfo &L) { |
10557 | return emitOp<>(OP_EQUint32, L); |
10558 | } |
10559 | bool ByteCodeEmitter::emitEQSint64(const SourceInfo &L) { |
10560 | return emitOp<>(OP_EQSint64, L); |
10561 | } |
10562 | bool ByteCodeEmitter::emitEQUint64(const SourceInfo &L) { |
10563 | return emitOp<>(OP_EQUint64, L); |
10564 | } |
10565 | bool ByteCodeEmitter::emitEQIntAP(const SourceInfo &L) { |
10566 | return emitOp<>(OP_EQIntAP, L); |
10567 | } |
10568 | bool ByteCodeEmitter::emitEQIntAPS(const SourceInfo &L) { |
10569 | return emitOp<>(OP_EQIntAPS, L); |
10570 | } |
10571 | bool ByteCodeEmitter::emitEQBool(const SourceInfo &L) { |
10572 | return emitOp<>(OP_EQBool, L); |
10573 | } |
10574 | bool ByteCodeEmitter::emitEQPtr(const SourceInfo &L) { |
10575 | return emitOp<>(OP_EQPtr, L); |
10576 | } |
10577 | bool ByteCodeEmitter::emitEQFnPtr(const SourceInfo &L) { |
10578 | return emitOp<>(OP_EQFnPtr, L); |
10579 | } |
10580 | bool ByteCodeEmitter::emitEQMemberPtr(const SourceInfo &L) { |
10581 | return emitOp<>(OP_EQMemberPtr, L); |
10582 | } |
10583 | bool ByteCodeEmitter::emitEQFloat(const SourceInfo &L) { |
10584 | return emitOp<>(OP_EQFloat, L); |
10585 | } |
10586 | #endif |
10587 | #ifdef GET_EVAL_IMPL |
10588 | bool EvalEmitter::emitEQSint8(const SourceInfo &L) { |
10589 | if (!isActive()) return true; |
10590 | CurrentSource = L; |
10591 | return EQ<PT_Sint8>(S, OpPC); |
10592 | } |
10593 | bool EvalEmitter::emitEQUint8(const SourceInfo &L) { |
10594 | if (!isActive()) return true; |
10595 | CurrentSource = L; |
10596 | return EQ<PT_Uint8>(S, OpPC); |
10597 | } |
10598 | bool EvalEmitter::emitEQSint16(const SourceInfo &L) { |
10599 | if (!isActive()) return true; |
10600 | CurrentSource = L; |
10601 | return EQ<PT_Sint16>(S, OpPC); |
10602 | } |
10603 | bool EvalEmitter::emitEQUint16(const SourceInfo &L) { |
10604 | if (!isActive()) return true; |
10605 | CurrentSource = L; |
10606 | return EQ<PT_Uint16>(S, OpPC); |
10607 | } |
10608 | bool EvalEmitter::emitEQSint32(const SourceInfo &L) { |
10609 | if (!isActive()) return true; |
10610 | CurrentSource = L; |
10611 | return EQ<PT_Sint32>(S, OpPC); |
10612 | } |
10613 | bool EvalEmitter::emitEQUint32(const SourceInfo &L) { |
10614 | if (!isActive()) return true; |
10615 | CurrentSource = L; |
10616 | return EQ<PT_Uint32>(S, OpPC); |
10617 | } |
10618 | bool EvalEmitter::emitEQSint64(const SourceInfo &L) { |
10619 | if (!isActive()) return true; |
10620 | CurrentSource = L; |
10621 | return EQ<PT_Sint64>(S, OpPC); |
10622 | } |
10623 | bool EvalEmitter::emitEQUint64(const SourceInfo &L) { |
10624 | if (!isActive()) return true; |
10625 | CurrentSource = L; |
10626 | return EQ<PT_Uint64>(S, OpPC); |
10627 | } |
10628 | bool EvalEmitter::emitEQIntAP(const SourceInfo &L) { |
10629 | if (!isActive()) return true; |
10630 | CurrentSource = L; |
10631 | return EQ<PT_IntAP>(S, OpPC); |
10632 | } |
10633 | bool EvalEmitter::emitEQIntAPS(const SourceInfo &L) { |
10634 | if (!isActive()) return true; |
10635 | CurrentSource = L; |
10636 | return EQ<PT_IntAPS>(S, OpPC); |
10637 | } |
10638 | bool EvalEmitter::emitEQBool(const SourceInfo &L) { |
10639 | if (!isActive()) return true; |
10640 | CurrentSource = L; |
10641 | return EQ<PT_Bool>(S, OpPC); |
10642 | } |
10643 | bool EvalEmitter::emitEQPtr(const SourceInfo &L) { |
10644 | if (!isActive()) return true; |
10645 | CurrentSource = L; |
10646 | return EQ<PT_Ptr>(S, OpPC); |
10647 | } |
10648 | bool EvalEmitter::emitEQFnPtr(const SourceInfo &L) { |
10649 | if (!isActive()) return true; |
10650 | CurrentSource = L; |
10651 | return EQ<PT_FnPtr>(S, OpPC); |
10652 | } |
10653 | bool EvalEmitter::emitEQMemberPtr(const SourceInfo &L) { |
10654 | if (!isActive()) return true; |
10655 | CurrentSource = L; |
10656 | return EQ<PT_MemberPtr>(S, OpPC); |
10657 | } |
10658 | bool EvalEmitter::emitEQFloat(const SourceInfo &L) { |
10659 | if (!isActive()) return true; |
10660 | CurrentSource = L; |
10661 | return EQ<PT_Float>(S, OpPC); |
10662 | } |
10663 | #endif |
10664 | #ifdef GET_OPCODE_NAMES |
10665 | OP_Error, |
10666 | #endif |
10667 | #ifdef GET_INTERP |
10668 | case OP_Error: { |
10669 | if (!Error(S, OpPC)) |
10670 | return false; |
10671 | continue; |
10672 | } |
10673 | #endif |
10674 | #ifdef GET_DISASM |
10675 | case OP_Error: |
10676 | PrintName("Error" ); |
10677 | OS << "\t" << "\n" ; |
10678 | continue; |
10679 | #endif |
10680 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10681 | bool emitError(const SourceInfo &); |
10682 | #endif |
10683 | #ifdef GET_LINK_IMPL |
10684 | bool ByteCodeEmitter::emitError(const SourceInfo &L) { |
10685 | return emitOp<>(OP_Error, L); |
10686 | } |
10687 | #endif |
10688 | #ifdef GET_EVAL_IMPL |
10689 | bool EvalEmitter::emitError(const SourceInfo &L) { |
10690 | if (!isActive()) return true; |
10691 | CurrentSource = L; |
10692 | return Error(S, OpPC); |
10693 | } |
10694 | #endif |
10695 | #ifdef GET_OPCODE_NAMES |
10696 | OP_ExpandPtr, |
10697 | #endif |
10698 | #ifdef GET_INTERP |
10699 | case OP_ExpandPtr: { |
10700 | if (!ExpandPtr(S, OpPC)) |
10701 | return false; |
10702 | continue; |
10703 | } |
10704 | #endif |
10705 | #ifdef GET_DISASM |
10706 | case OP_ExpandPtr: |
10707 | PrintName("ExpandPtr" ); |
10708 | OS << "\t" << "\n" ; |
10709 | continue; |
10710 | #endif |
10711 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10712 | bool emitExpandPtr(const SourceInfo &); |
10713 | #endif |
10714 | #ifdef GET_LINK_IMPL |
10715 | bool ByteCodeEmitter::emitExpandPtr(const SourceInfo &L) { |
10716 | return emitOp<>(OP_ExpandPtr, L); |
10717 | } |
10718 | #endif |
10719 | #ifdef GET_EVAL_IMPL |
10720 | bool EvalEmitter::emitExpandPtr(const SourceInfo &L) { |
10721 | if (!isActive()) return true; |
10722 | CurrentSource = L; |
10723 | return ExpandPtr(S, OpPC); |
10724 | } |
10725 | #endif |
10726 | #ifdef GET_OPCODE_NAMES |
10727 | OP_FinishInit, |
10728 | #endif |
10729 | #ifdef GET_INTERP |
10730 | case OP_FinishInit: { |
10731 | if (!FinishInit(S, OpPC)) |
10732 | return false; |
10733 | continue; |
10734 | } |
10735 | #endif |
10736 | #ifdef GET_DISASM |
10737 | case OP_FinishInit: |
10738 | PrintName("FinishInit" ); |
10739 | OS << "\t" << "\n" ; |
10740 | continue; |
10741 | #endif |
10742 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10743 | bool emitFinishInit(const SourceInfo &); |
10744 | #endif |
10745 | #ifdef GET_LINK_IMPL |
10746 | bool ByteCodeEmitter::emitFinishInit(const SourceInfo &L) { |
10747 | return emitOp<>(OP_FinishInit, L); |
10748 | } |
10749 | #endif |
10750 | #ifdef GET_EVAL_IMPL |
10751 | bool EvalEmitter::emitFinishInit(const SourceInfo &L) { |
10752 | if (!isActive()) return true; |
10753 | CurrentSource = L; |
10754 | return FinishInit(S, OpPC); |
10755 | } |
10756 | #endif |
10757 | #ifdef GET_OPCODE_NAMES |
10758 | OP_FinishInitPop, |
10759 | #endif |
10760 | #ifdef GET_INTERP |
10761 | case OP_FinishInitPop: { |
10762 | if (!FinishInitPop(S, OpPC)) |
10763 | return false; |
10764 | continue; |
10765 | } |
10766 | #endif |
10767 | #ifdef GET_DISASM |
10768 | case OP_FinishInitPop: |
10769 | PrintName("FinishInitPop" ); |
10770 | OS << "\t" << "\n" ; |
10771 | continue; |
10772 | #endif |
10773 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10774 | bool emitFinishInitPop(const SourceInfo &); |
10775 | #endif |
10776 | #ifdef GET_LINK_IMPL |
10777 | bool ByteCodeEmitter::emitFinishInitPop(const SourceInfo &L) { |
10778 | return emitOp<>(OP_FinishInitPop, L); |
10779 | } |
10780 | #endif |
10781 | #ifdef GET_EVAL_IMPL |
10782 | bool EvalEmitter::emitFinishInitPop(const SourceInfo &L) { |
10783 | if (!isActive()) return true; |
10784 | CurrentSource = L; |
10785 | return FinishInitPop(S, OpPC); |
10786 | } |
10787 | #endif |
10788 | #ifdef GET_OPCODE_NAMES |
10789 | OP_Free, |
10790 | #endif |
10791 | #ifdef GET_INTERP |
10792 | case OP_Free: { |
10793 | const auto V0 = ReadArg<bool>(S, PC); |
10794 | if (!Free(S, OpPC, V0)) |
10795 | return false; |
10796 | continue; |
10797 | } |
10798 | #endif |
10799 | #ifdef GET_DISASM |
10800 | case OP_Free: |
10801 | PrintName("Free" ); |
10802 | OS << "\t" << ReadArg<bool>(P, PC) << " " << "\n" ; |
10803 | continue; |
10804 | #endif |
10805 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10806 | bool emitFree( bool , const SourceInfo &); |
10807 | #endif |
10808 | #ifdef GET_LINK_IMPL |
10809 | bool ByteCodeEmitter::emitFree( bool A0, const SourceInfo &L) { |
10810 | return emitOp<bool>(OP_Free, A0, L); |
10811 | } |
10812 | #endif |
10813 | #ifdef GET_EVAL_IMPL |
10814 | bool EvalEmitter::emitFree( bool A0, const SourceInfo &L) { |
10815 | if (!isActive()) return true; |
10816 | CurrentSource = L; |
10817 | return Free(S, OpPC, A0); |
10818 | } |
10819 | #endif |
10820 | #ifdef GET_OPCODE_NAMES |
10821 | OP_GESint8, |
10822 | OP_GEUint8, |
10823 | OP_GESint16, |
10824 | OP_GEUint16, |
10825 | OP_GESint32, |
10826 | OP_GEUint32, |
10827 | OP_GESint64, |
10828 | OP_GEUint64, |
10829 | OP_GEIntAP, |
10830 | OP_GEIntAPS, |
10831 | OP_GEBool, |
10832 | OP_GEPtr, |
10833 | OP_GEFloat, |
10834 | OP_GEFnPtr, |
10835 | #endif |
10836 | #ifdef GET_INTERP |
10837 | case OP_GESint8: { |
10838 | if (!GE<PT_Sint8>(S, OpPC)) |
10839 | return false; |
10840 | continue; |
10841 | } |
10842 | case OP_GEUint8: { |
10843 | if (!GE<PT_Uint8>(S, OpPC)) |
10844 | return false; |
10845 | continue; |
10846 | } |
10847 | case OP_GESint16: { |
10848 | if (!GE<PT_Sint16>(S, OpPC)) |
10849 | return false; |
10850 | continue; |
10851 | } |
10852 | case OP_GEUint16: { |
10853 | if (!GE<PT_Uint16>(S, OpPC)) |
10854 | return false; |
10855 | continue; |
10856 | } |
10857 | case OP_GESint32: { |
10858 | if (!GE<PT_Sint32>(S, OpPC)) |
10859 | return false; |
10860 | continue; |
10861 | } |
10862 | case OP_GEUint32: { |
10863 | if (!GE<PT_Uint32>(S, OpPC)) |
10864 | return false; |
10865 | continue; |
10866 | } |
10867 | case OP_GESint64: { |
10868 | if (!GE<PT_Sint64>(S, OpPC)) |
10869 | return false; |
10870 | continue; |
10871 | } |
10872 | case OP_GEUint64: { |
10873 | if (!GE<PT_Uint64>(S, OpPC)) |
10874 | return false; |
10875 | continue; |
10876 | } |
10877 | case OP_GEIntAP: { |
10878 | if (!GE<PT_IntAP>(S, OpPC)) |
10879 | return false; |
10880 | continue; |
10881 | } |
10882 | case OP_GEIntAPS: { |
10883 | if (!GE<PT_IntAPS>(S, OpPC)) |
10884 | return false; |
10885 | continue; |
10886 | } |
10887 | case OP_GEBool: { |
10888 | if (!GE<PT_Bool>(S, OpPC)) |
10889 | return false; |
10890 | continue; |
10891 | } |
10892 | case OP_GEPtr: { |
10893 | if (!GE<PT_Ptr>(S, OpPC)) |
10894 | return false; |
10895 | continue; |
10896 | } |
10897 | case OP_GEFloat: { |
10898 | if (!GE<PT_Float>(S, OpPC)) |
10899 | return false; |
10900 | continue; |
10901 | } |
10902 | case OP_GEFnPtr: { |
10903 | if (!GE<PT_FnPtr>(S, OpPC)) |
10904 | return false; |
10905 | continue; |
10906 | } |
10907 | #endif |
10908 | #ifdef GET_DISASM |
10909 | case OP_GESint8: |
10910 | PrintName("GESint8" ); |
10911 | OS << "\t" << "\n" ; |
10912 | continue; |
10913 | case OP_GEUint8: |
10914 | PrintName("GEUint8" ); |
10915 | OS << "\t" << "\n" ; |
10916 | continue; |
10917 | case OP_GESint16: |
10918 | PrintName("GESint16" ); |
10919 | OS << "\t" << "\n" ; |
10920 | continue; |
10921 | case OP_GEUint16: |
10922 | PrintName("GEUint16" ); |
10923 | OS << "\t" << "\n" ; |
10924 | continue; |
10925 | case OP_GESint32: |
10926 | PrintName("GESint32" ); |
10927 | OS << "\t" << "\n" ; |
10928 | continue; |
10929 | case OP_GEUint32: |
10930 | PrintName("GEUint32" ); |
10931 | OS << "\t" << "\n" ; |
10932 | continue; |
10933 | case OP_GESint64: |
10934 | PrintName("GESint64" ); |
10935 | OS << "\t" << "\n" ; |
10936 | continue; |
10937 | case OP_GEUint64: |
10938 | PrintName("GEUint64" ); |
10939 | OS << "\t" << "\n" ; |
10940 | continue; |
10941 | case OP_GEIntAP: |
10942 | PrintName("GEIntAP" ); |
10943 | OS << "\t" << "\n" ; |
10944 | continue; |
10945 | case OP_GEIntAPS: |
10946 | PrintName("GEIntAPS" ); |
10947 | OS << "\t" << "\n" ; |
10948 | continue; |
10949 | case OP_GEBool: |
10950 | PrintName("GEBool" ); |
10951 | OS << "\t" << "\n" ; |
10952 | continue; |
10953 | case OP_GEPtr: |
10954 | PrintName("GEPtr" ); |
10955 | OS << "\t" << "\n" ; |
10956 | continue; |
10957 | case OP_GEFloat: |
10958 | PrintName("GEFloat" ); |
10959 | OS << "\t" << "\n" ; |
10960 | continue; |
10961 | case OP_GEFnPtr: |
10962 | PrintName("GEFnPtr" ); |
10963 | OS << "\t" << "\n" ; |
10964 | continue; |
10965 | #endif |
10966 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10967 | bool emitGESint8(const SourceInfo &); |
10968 | bool emitGEUint8(const SourceInfo &); |
10969 | bool emitGESint16(const SourceInfo &); |
10970 | bool emitGEUint16(const SourceInfo &); |
10971 | bool emitGESint32(const SourceInfo &); |
10972 | bool emitGEUint32(const SourceInfo &); |
10973 | bool emitGESint64(const SourceInfo &); |
10974 | bool emitGEUint64(const SourceInfo &); |
10975 | bool emitGEIntAP(const SourceInfo &); |
10976 | bool emitGEIntAPS(const SourceInfo &); |
10977 | bool emitGEBool(const SourceInfo &); |
10978 | bool emitGEPtr(const SourceInfo &); |
10979 | bool emitGEFloat(const SourceInfo &); |
10980 | bool emitGEFnPtr(const SourceInfo &); |
10981 | #endif |
10982 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
10983 | [[nodiscard]] bool emitGE(PrimType, const SourceInfo &I); |
10984 | #endif |
10985 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
10986 | bool |
10987 | #if defined(GET_EVAL_IMPL) |
10988 | EvalEmitter |
10989 | #else |
10990 | ByteCodeEmitter |
10991 | #endif |
10992 | ::emitGE(PrimType T0, const SourceInfo &I) { |
10993 | switch (T0) { |
10994 | case PT_Sint8: |
10995 | return emitGESint8(I); |
10996 | case PT_Uint8: |
10997 | return emitGEUint8(I); |
10998 | case PT_Sint16: |
10999 | return emitGESint16(I); |
11000 | case PT_Uint16: |
11001 | return emitGEUint16(I); |
11002 | case PT_Sint32: |
11003 | return emitGESint32(I); |
11004 | case PT_Uint32: |
11005 | return emitGEUint32(I); |
11006 | case PT_Sint64: |
11007 | return emitGESint64(I); |
11008 | case PT_Uint64: |
11009 | return emitGEUint64(I); |
11010 | case PT_IntAP: |
11011 | return emitGEIntAP(I); |
11012 | case PT_IntAPS: |
11013 | return emitGEIntAPS(I); |
11014 | case PT_Bool: |
11015 | return emitGEBool(I); |
11016 | case PT_Ptr: |
11017 | return emitGEPtr(I); |
11018 | case PT_Float: |
11019 | return emitGEFloat(I); |
11020 | case PT_FnPtr: |
11021 | return emitGEFnPtr(I); |
11022 | default: llvm_unreachable("invalid type: emitGE" ); |
11023 | } |
11024 | llvm_unreachable("invalid enum value" ); |
11025 | } |
11026 | #endif |
11027 | #ifdef GET_LINK_IMPL |
11028 | bool ByteCodeEmitter::emitGESint8(const SourceInfo &L) { |
11029 | return emitOp<>(OP_GESint8, L); |
11030 | } |
11031 | bool ByteCodeEmitter::emitGEUint8(const SourceInfo &L) { |
11032 | return emitOp<>(OP_GEUint8, L); |
11033 | } |
11034 | bool ByteCodeEmitter::emitGESint16(const SourceInfo &L) { |
11035 | return emitOp<>(OP_GESint16, L); |
11036 | } |
11037 | bool ByteCodeEmitter::emitGEUint16(const SourceInfo &L) { |
11038 | return emitOp<>(OP_GEUint16, L); |
11039 | } |
11040 | bool ByteCodeEmitter::emitGESint32(const SourceInfo &L) { |
11041 | return emitOp<>(OP_GESint32, L); |
11042 | } |
11043 | bool ByteCodeEmitter::emitGEUint32(const SourceInfo &L) { |
11044 | return emitOp<>(OP_GEUint32, L); |
11045 | } |
11046 | bool ByteCodeEmitter::emitGESint64(const SourceInfo &L) { |
11047 | return emitOp<>(OP_GESint64, L); |
11048 | } |
11049 | bool ByteCodeEmitter::emitGEUint64(const SourceInfo &L) { |
11050 | return emitOp<>(OP_GEUint64, L); |
11051 | } |
11052 | bool ByteCodeEmitter::emitGEIntAP(const SourceInfo &L) { |
11053 | return emitOp<>(OP_GEIntAP, L); |
11054 | } |
11055 | bool ByteCodeEmitter::emitGEIntAPS(const SourceInfo &L) { |
11056 | return emitOp<>(OP_GEIntAPS, L); |
11057 | } |
11058 | bool ByteCodeEmitter::emitGEBool(const SourceInfo &L) { |
11059 | return emitOp<>(OP_GEBool, L); |
11060 | } |
11061 | bool ByteCodeEmitter::emitGEPtr(const SourceInfo &L) { |
11062 | return emitOp<>(OP_GEPtr, L); |
11063 | } |
11064 | bool ByteCodeEmitter::emitGEFloat(const SourceInfo &L) { |
11065 | return emitOp<>(OP_GEFloat, L); |
11066 | } |
11067 | bool ByteCodeEmitter::emitGEFnPtr(const SourceInfo &L) { |
11068 | return emitOp<>(OP_GEFnPtr, L); |
11069 | } |
11070 | #endif |
11071 | #ifdef GET_EVAL_IMPL |
11072 | bool EvalEmitter::emitGESint8(const SourceInfo &L) { |
11073 | if (!isActive()) return true; |
11074 | CurrentSource = L; |
11075 | return GE<PT_Sint8>(S, OpPC); |
11076 | } |
11077 | bool EvalEmitter::emitGEUint8(const SourceInfo &L) { |
11078 | if (!isActive()) return true; |
11079 | CurrentSource = L; |
11080 | return GE<PT_Uint8>(S, OpPC); |
11081 | } |
11082 | bool EvalEmitter::emitGESint16(const SourceInfo &L) { |
11083 | if (!isActive()) return true; |
11084 | CurrentSource = L; |
11085 | return GE<PT_Sint16>(S, OpPC); |
11086 | } |
11087 | bool EvalEmitter::emitGEUint16(const SourceInfo &L) { |
11088 | if (!isActive()) return true; |
11089 | CurrentSource = L; |
11090 | return GE<PT_Uint16>(S, OpPC); |
11091 | } |
11092 | bool EvalEmitter::emitGESint32(const SourceInfo &L) { |
11093 | if (!isActive()) return true; |
11094 | CurrentSource = L; |
11095 | return GE<PT_Sint32>(S, OpPC); |
11096 | } |
11097 | bool EvalEmitter::emitGEUint32(const SourceInfo &L) { |
11098 | if (!isActive()) return true; |
11099 | CurrentSource = L; |
11100 | return GE<PT_Uint32>(S, OpPC); |
11101 | } |
11102 | bool EvalEmitter::emitGESint64(const SourceInfo &L) { |
11103 | if (!isActive()) return true; |
11104 | CurrentSource = L; |
11105 | return GE<PT_Sint64>(S, OpPC); |
11106 | } |
11107 | bool EvalEmitter::emitGEUint64(const SourceInfo &L) { |
11108 | if (!isActive()) return true; |
11109 | CurrentSource = L; |
11110 | return GE<PT_Uint64>(S, OpPC); |
11111 | } |
11112 | bool EvalEmitter::emitGEIntAP(const SourceInfo &L) { |
11113 | if (!isActive()) return true; |
11114 | CurrentSource = L; |
11115 | return GE<PT_IntAP>(S, OpPC); |
11116 | } |
11117 | bool EvalEmitter::emitGEIntAPS(const SourceInfo &L) { |
11118 | if (!isActive()) return true; |
11119 | CurrentSource = L; |
11120 | return GE<PT_IntAPS>(S, OpPC); |
11121 | } |
11122 | bool EvalEmitter::emitGEBool(const SourceInfo &L) { |
11123 | if (!isActive()) return true; |
11124 | CurrentSource = L; |
11125 | return GE<PT_Bool>(S, OpPC); |
11126 | } |
11127 | bool EvalEmitter::emitGEPtr(const SourceInfo &L) { |
11128 | if (!isActive()) return true; |
11129 | CurrentSource = L; |
11130 | return GE<PT_Ptr>(S, OpPC); |
11131 | } |
11132 | bool EvalEmitter::emitGEFloat(const SourceInfo &L) { |
11133 | if (!isActive()) return true; |
11134 | CurrentSource = L; |
11135 | return GE<PT_Float>(S, OpPC); |
11136 | } |
11137 | bool EvalEmitter::emitGEFnPtr(const SourceInfo &L) { |
11138 | if (!isActive()) return true; |
11139 | CurrentSource = L; |
11140 | return GE<PT_FnPtr>(S, OpPC); |
11141 | } |
11142 | #endif |
11143 | #ifdef GET_OPCODE_NAMES |
11144 | OP_GTSint8, |
11145 | OP_GTUint8, |
11146 | OP_GTSint16, |
11147 | OP_GTUint16, |
11148 | OP_GTSint32, |
11149 | OP_GTUint32, |
11150 | OP_GTSint64, |
11151 | OP_GTUint64, |
11152 | OP_GTIntAP, |
11153 | OP_GTIntAPS, |
11154 | OP_GTBool, |
11155 | OP_GTPtr, |
11156 | OP_GTFloat, |
11157 | OP_GTFnPtr, |
11158 | #endif |
11159 | #ifdef GET_INTERP |
11160 | case OP_GTSint8: { |
11161 | if (!GT<PT_Sint8>(S, OpPC)) |
11162 | return false; |
11163 | continue; |
11164 | } |
11165 | case OP_GTUint8: { |
11166 | if (!GT<PT_Uint8>(S, OpPC)) |
11167 | return false; |
11168 | continue; |
11169 | } |
11170 | case OP_GTSint16: { |
11171 | if (!GT<PT_Sint16>(S, OpPC)) |
11172 | return false; |
11173 | continue; |
11174 | } |
11175 | case OP_GTUint16: { |
11176 | if (!GT<PT_Uint16>(S, OpPC)) |
11177 | return false; |
11178 | continue; |
11179 | } |
11180 | case OP_GTSint32: { |
11181 | if (!GT<PT_Sint32>(S, OpPC)) |
11182 | return false; |
11183 | continue; |
11184 | } |
11185 | case OP_GTUint32: { |
11186 | if (!GT<PT_Uint32>(S, OpPC)) |
11187 | return false; |
11188 | continue; |
11189 | } |
11190 | case OP_GTSint64: { |
11191 | if (!GT<PT_Sint64>(S, OpPC)) |
11192 | return false; |
11193 | continue; |
11194 | } |
11195 | case OP_GTUint64: { |
11196 | if (!GT<PT_Uint64>(S, OpPC)) |
11197 | return false; |
11198 | continue; |
11199 | } |
11200 | case OP_GTIntAP: { |
11201 | if (!GT<PT_IntAP>(S, OpPC)) |
11202 | return false; |
11203 | continue; |
11204 | } |
11205 | case OP_GTIntAPS: { |
11206 | if (!GT<PT_IntAPS>(S, OpPC)) |
11207 | return false; |
11208 | continue; |
11209 | } |
11210 | case OP_GTBool: { |
11211 | if (!GT<PT_Bool>(S, OpPC)) |
11212 | return false; |
11213 | continue; |
11214 | } |
11215 | case OP_GTPtr: { |
11216 | if (!GT<PT_Ptr>(S, OpPC)) |
11217 | return false; |
11218 | continue; |
11219 | } |
11220 | case OP_GTFloat: { |
11221 | if (!GT<PT_Float>(S, OpPC)) |
11222 | return false; |
11223 | continue; |
11224 | } |
11225 | case OP_GTFnPtr: { |
11226 | if (!GT<PT_FnPtr>(S, OpPC)) |
11227 | return false; |
11228 | continue; |
11229 | } |
11230 | #endif |
11231 | #ifdef GET_DISASM |
11232 | case OP_GTSint8: |
11233 | PrintName("GTSint8" ); |
11234 | OS << "\t" << "\n" ; |
11235 | continue; |
11236 | case OP_GTUint8: |
11237 | PrintName("GTUint8" ); |
11238 | OS << "\t" << "\n" ; |
11239 | continue; |
11240 | case OP_GTSint16: |
11241 | PrintName("GTSint16" ); |
11242 | OS << "\t" << "\n" ; |
11243 | continue; |
11244 | case OP_GTUint16: |
11245 | PrintName("GTUint16" ); |
11246 | OS << "\t" << "\n" ; |
11247 | continue; |
11248 | case OP_GTSint32: |
11249 | PrintName("GTSint32" ); |
11250 | OS << "\t" << "\n" ; |
11251 | continue; |
11252 | case OP_GTUint32: |
11253 | PrintName("GTUint32" ); |
11254 | OS << "\t" << "\n" ; |
11255 | continue; |
11256 | case OP_GTSint64: |
11257 | PrintName("GTSint64" ); |
11258 | OS << "\t" << "\n" ; |
11259 | continue; |
11260 | case OP_GTUint64: |
11261 | PrintName("GTUint64" ); |
11262 | OS << "\t" << "\n" ; |
11263 | continue; |
11264 | case OP_GTIntAP: |
11265 | PrintName("GTIntAP" ); |
11266 | OS << "\t" << "\n" ; |
11267 | continue; |
11268 | case OP_GTIntAPS: |
11269 | PrintName("GTIntAPS" ); |
11270 | OS << "\t" << "\n" ; |
11271 | continue; |
11272 | case OP_GTBool: |
11273 | PrintName("GTBool" ); |
11274 | OS << "\t" << "\n" ; |
11275 | continue; |
11276 | case OP_GTPtr: |
11277 | PrintName("GTPtr" ); |
11278 | OS << "\t" << "\n" ; |
11279 | continue; |
11280 | case OP_GTFloat: |
11281 | PrintName("GTFloat" ); |
11282 | OS << "\t" << "\n" ; |
11283 | continue; |
11284 | case OP_GTFnPtr: |
11285 | PrintName("GTFnPtr" ); |
11286 | OS << "\t" << "\n" ; |
11287 | continue; |
11288 | #endif |
11289 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11290 | bool emitGTSint8(const SourceInfo &); |
11291 | bool emitGTUint8(const SourceInfo &); |
11292 | bool emitGTSint16(const SourceInfo &); |
11293 | bool emitGTUint16(const SourceInfo &); |
11294 | bool emitGTSint32(const SourceInfo &); |
11295 | bool emitGTUint32(const SourceInfo &); |
11296 | bool emitGTSint64(const SourceInfo &); |
11297 | bool emitGTUint64(const SourceInfo &); |
11298 | bool emitGTIntAP(const SourceInfo &); |
11299 | bool emitGTIntAPS(const SourceInfo &); |
11300 | bool emitGTBool(const SourceInfo &); |
11301 | bool emitGTPtr(const SourceInfo &); |
11302 | bool emitGTFloat(const SourceInfo &); |
11303 | bool emitGTFnPtr(const SourceInfo &); |
11304 | #endif |
11305 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11306 | [[nodiscard]] bool emitGT(PrimType, const SourceInfo &I); |
11307 | #endif |
11308 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
11309 | bool |
11310 | #if defined(GET_EVAL_IMPL) |
11311 | EvalEmitter |
11312 | #else |
11313 | ByteCodeEmitter |
11314 | #endif |
11315 | ::emitGT(PrimType T0, const SourceInfo &I) { |
11316 | switch (T0) { |
11317 | case PT_Sint8: |
11318 | return emitGTSint8(I); |
11319 | case PT_Uint8: |
11320 | return emitGTUint8(I); |
11321 | case PT_Sint16: |
11322 | return emitGTSint16(I); |
11323 | case PT_Uint16: |
11324 | return emitGTUint16(I); |
11325 | case PT_Sint32: |
11326 | return emitGTSint32(I); |
11327 | case PT_Uint32: |
11328 | return emitGTUint32(I); |
11329 | case PT_Sint64: |
11330 | return emitGTSint64(I); |
11331 | case PT_Uint64: |
11332 | return emitGTUint64(I); |
11333 | case PT_IntAP: |
11334 | return emitGTIntAP(I); |
11335 | case PT_IntAPS: |
11336 | return emitGTIntAPS(I); |
11337 | case PT_Bool: |
11338 | return emitGTBool(I); |
11339 | case PT_Ptr: |
11340 | return emitGTPtr(I); |
11341 | case PT_Float: |
11342 | return emitGTFloat(I); |
11343 | case PT_FnPtr: |
11344 | return emitGTFnPtr(I); |
11345 | default: llvm_unreachable("invalid type: emitGT" ); |
11346 | } |
11347 | llvm_unreachable("invalid enum value" ); |
11348 | } |
11349 | #endif |
11350 | #ifdef GET_LINK_IMPL |
11351 | bool ByteCodeEmitter::emitGTSint8(const SourceInfo &L) { |
11352 | return emitOp<>(OP_GTSint8, L); |
11353 | } |
11354 | bool ByteCodeEmitter::emitGTUint8(const SourceInfo &L) { |
11355 | return emitOp<>(OP_GTUint8, L); |
11356 | } |
11357 | bool ByteCodeEmitter::emitGTSint16(const SourceInfo &L) { |
11358 | return emitOp<>(OP_GTSint16, L); |
11359 | } |
11360 | bool ByteCodeEmitter::emitGTUint16(const SourceInfo &L) { |
11361 | return emitOp<>(OP_GTUint16, L); |
11362 | } |
11363 | bool ByteCodeEmitter::emitGTSint32(const SourceInfo &L) { |
11364 | return emitOp<>(OP_GTSint32, L); |
11365 | } |
11366 | bool ByteCodeEmitter::emitGTUint32(const SourceInfo &L) { |
11367 | return emitOp<>(OP_GTUint32, L); |
11368 | } |
11369 | bool ByteCodeEmitter::emitGTSint64(const SourceInfo &L) { |
11370 | return emitOp<>(OP_GTSint64, L); |
11371 | } |
11372 | bool ByteCodeEmitter::emitGTUint64(const SourceInfo &L) { |
11373 | return emitOp<>(OP_GTUint64, L); |
11374 | } |
11375 | bool ByteCodeEmitter::emitGTIntAP(const SourceInfo &L) { |
11376 | return emitOp<>(OP_GTIntAP, L); |
11377 | } |
11378 | bool ByteCodeEmitter::emitGTIntAPS(const SourceInfo &L) { |
11379 | return emitOp<>(OP_GTIntAPS, L); |
11380 | } |
11381 | bool ByteCodeEmitter::emitGTBool(const SourceInfo &L) { |
11382 | return emitOp<>(OP_GTBool, L); |
11383 | } |
11384 | bool ByteCodeEmitter::emitGTPtr(const SourceInfo &L) { |
11385 | return emitOp<>(OP_GTPtr, L); |
11386 | } |
11387 | bool ByteCodeEmitter::emitGTFloat(const SourceInfo &L) { |
11388 | return emitOp<>(OP_GTFloat, L); |
11389 | } |
11390 | bool ByteCodeEmitter::emitGTFnPtr(const SourceInfo &L) { |
11391 | return emitOp<>(OP_GTFnPtr, L); |
11392 | } |
11393 | #endif |
11394 | #ifdef GET_EVAL_IMPL |
11395 | bool EvalEmitter::emitGTSint8(const SourceInfo &L) { |
11396 | if (!isActive()) return true; |
11397 | CurrentSource = L; |
11398 | return GT<PT_Sint8>(S, OpPC); |
11399 | } |
11400 | bool EvalEmitter::emitGTUint8(const SourceInfo &L) { |
11401 | if (!isActive()) return true; |
11402 | CurrentSource = L; |
11403 | return GT<PT_Uint8>(S, OpPC); |
11404 | } |
11405 | bool EvalEmitter::emitGTSint16(const SourceInfo &L) { |
11406 | if (!isActive()) return true; |
11407 | CurrentSource = L; |
11408 | return GT<PT_Sint16>(S, OpPC); |
11409 | } |
11410 | bool EvalEmitter::emitGTUint16(const SourceInfo &L) { |
11411 | if (!isActive()) return true; |
11412 | CurrentSource = L; |
11413 | return GT<PT_Uint16>(S, OpPC); |
11414 | } |
11415 | bool EvalEmitter::emitGTSint32(const SourceInfo &L) { |
11416 | if (!isActive()) return true; |
11417 | CurrentSource = L; |
11418 | return GT<PT_Sint32>(S, OpPC); |
11419 | } |
11420 | bool EvalEmitter::emitGTUint32(const SourceInfo &L) { |
11421 | if (!isActive()) return true; |
11422 | CurrentSource = L; |
11423 | return GT<PT_Uint32>(S, OpPC); |
11424 | } |
11425 | bool EvalEmitter::emitGTSint64(const SourceInfo &L) { |
11426 | if (!isActive()) return true; |
11427 | CurrentSource = L; |
11428 | return GT<PT_Sint64>(S, OpPC); |
11429 | } |
11430 | bool EvalEmitter::emitGTUint64(const SourceInfo &L) { |
11431 | if (!isActive()) return true; |
11432 | CurrentSource = L; |
11433 | return GT<PT_Uint64>(S, OpPC); |
11434 | } |
11435 | bool EvalEmitter::emitGTIntAP(const SourceInfo &L) { |
11436 | if (!isActive()) return true; |
11437 | CurrentSource = L; |
11438 | return GT<PT_IntAP>(S, OpPC); |
11439 | } |
11440 | bool EvalEmitter::emitGTIntAPS(const SourceInfo &L) { |
11441 | if (!isActive()) return true; |
11442 | CurrentSource = L; |
11443 | return GT<PT_IntAPS>(S, OpPC); |
11444 | } |
11445 | bool EvalEmitter::emitGTBool(const SourceInfo &L) { |
11446 | if (!isActive()) return true; |
11447 | CurrentSource = L; |
11448 | return GT<PT_Bool>(S, OpPC); |
11449 | } |
11450 | bool EvalEmitter::emitGTPtr(const SourceInfo &L) { |
11451 | if (!isActive()) return true; |
11452 | CurrentSource = L; |
11453 | return GT<PT_Ptr>(S, OpPC); |
11454 | } |
11455 | bool EvalEmitter::emitGTFloat(const SourceInfo &L) { |
11456 | if (!isActive()) return true; |
11457 | CurrentSource = L; |
11458 | return GT<PT_Float>(S, OpPC); |
11459 | } |
11460 | bool EvalEmitter::emitGTFnPtr(const SourceInfo &L) { |
11461 | if (!isActive()) return true; |
11462 | CurrentSource = L; |
11463 | return GT<PT_FnPtr>(S, OpPC); |
11464 | } |
11465 | #endif |
11466 | #ifdef GET_OPCODE_NAMES |
11467 | OP_GetFieldSint8, |
11468 | OP_GetFieldUint8, |
11469 | OP_GetFieldSint16, |
11470 | OP_GetFieldUint16, |
11471 | OP_GetFieldSint32, |
11472 | OP_GetFieldUint32, |
11473 | OP_GetFieldSint64, |
11474 | OP_GetFieldUint64, |
11475 | OP_GetFieldIntAP, |
11476 | OP_GetFieldIntAPS, |
11477 | OP_GetFieldBool, |
11478 | OP_GetFieldPtr, |
11479 | OP_GetFieldFnPtr, |
11480 | OP_GetFieldMemberPtr, |
11481 | OP_GetFieldFloat, |
11482 | #endif |
11483 | #ifdef GET_INTERP |
11484 | case OP_GetFieldSint8: { |
11485 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11486 | if (!GetField<PT_Sint8>(S, OpPC, V0)) |
11487 | return false; |
11488 | continue; |
11489 | } |
11490 | case OP_GetFieldUint8: { |
11491 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11492 | if (!GetField<PT_Uint8>(S, OpPC, V0)) |
11493 | return false; |
11494 | continue; |
11495 | } |
11496 | case OP_GetFieldSint16: { |
11497 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11498 | if (!GetField<PT_Sint16>(S, OpPC, V0)) |
11499 | return false; |
11500 | continue; |
11501 | } |
11502 | case OP_GetFieldUint16: { |
11503 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11504 | if (!GetField<PT_Uint16>(S, OpPC, V0)) |
11505 | return false; |
11506 | continue; |
11507 | } |
11508 | case OP_GetFieldSint32: { |
11509 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11510 | if (!GetField<PT_Sint32>(S, OpPC, V0)) |
11511 | return false; |
11512 | continue; |
11513 | } |
11514 | case OP_GetFieldUint32: { |
11515 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11516 | if (!GetField<PT_Uint32>(S, OpPC, V0)) |
11517 | return false; |
11518 | continue; |
11519 | } |
11520 | case OP_GetFieldSint64: { |
11521 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11522 | if (!GetField<PT_Sint64>(S, OpPC, V0)) |
11523 | return false; |
11524 | continue; |
11525 | } |
11526 | case OP_GetFieldUint64: { |
11527 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11528 | if (!GetField<PT_Uint64>(S, OpPC, V0)) |
11529 | return false; |
11530 | continue; |
11531 | } |
11532 | case OP_GetFieldIntAP: { |
11533 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11534 | if (!GetField<PT_IntAP>(S, OpPC, V0)) |
11535 | return false; |
11536 | continue; |
11537 | } |
11538 | case OP_GetFieldIntAPS: { |
11539 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11540 | if (!GetField<PT_IntAPS>(S, OpPC, V0)) |
11541 | return false; |
11542 | continue; |
11543 | } |
11544 | case OP_GetFieldBool: { |
11545 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11546 | if (!GetField<PT_Bool>(S, OpPC, V0)) |
11547 | return false; |
11548 | continue; |
11549 | } |
11550 | case OP_GetFieldPtr: { |
11551 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11552 | if (!GetField<PT_Ptr>(S, OpPC, V0)) |
11553 | return false; |
11554 | continue; |
11555 | } |
11556 | case OP_GetFieldFnPtr: { |
11557 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11558 | if (!GetField<PT_FnPtr>(S, OpPC, V0)) |
11559 | return false; |
11560 | continue; |
11561 | } |
11562 | case OP_GetFieldMemberPtr: { |
11563 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11564 | if (!GetField<PT_MemberPtr>(S, OpPC, V0)) |
11565 | return false; |
11566 | continue; |
11567 | } |
11568 | case OP_GetFieldFloat: { |
11569 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11570 | if (!GetField<PT_Float>(S, OpPC, V0)) |
11571 | return false; |
11572 | continue; |
11573 | } |
11574 | #endif |
11575 | #ifdef GET_DISASM |
11576 | case OP_GetFieldSint8: |
11577 | PrintName("GetFieldSint8" ); |
11578 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11579 | continue; |
11580 | case OP_GetFieldUint8: |
11581 | PrintName("GetFieldUint8" ); |
11582 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11583 | continue; |
11584 | case OP_GetFieldSint16: |
11585 | PrintName("GetFieldSint16" ); |
11586 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11587 | continue; |
11588 | case OP_GetFieldUint16: |
11589 | PrintName("GetFieldUint16" ); |
11590 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11591 | continue; |
11592 | case OP_GetFieldSint32: |
11593 | PrintName("GetFieldSint32" ); |
11594 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11595 | continue; |
11596 | case OP_GetFieldUint32: |
11597 | PrintName("GetFieldUint32" ); |
11598 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11599 | continue; |
11600 | case OP_GetFieldSint64: |
11601 | PrintName("GetFieldSint64" ); |
11602 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11603 | continue; |
11604 | case OP_GetFieldUint64: |
11605 | PrintName("GetFieldUint64" ); |
11606 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11607 | continue; |
11608 | case OP_GetFieldIntAP: |
11609 | PrintName("GetFieldIntAP" ); |
11610 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11611 | continue; |
11612 | case OP_GetFieldIntAPS: |
11613 | PrintName("GetFieldIntAPS" ); |
11614 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11615 | continue; |
11616 | case OP_GetFieldBool: |
11617 | PrintName("GetFieldBool" ); |
11618 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11619 | continue; |
11620 | case OP_GetFieldPtr: |
11621 | PrintName("GetFieldPtr" ); |
11622 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11623 | continue; |
11624 | case OP_GetFieldFnPtr: |
11625 | PrintName("GetFieldFnPtr" ); |
11626 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11627 | continue; |
11628 | case OP_GetFieldMemberPtr: |
11629 | PrintName("GetFieldMemberPtr" ); |
11630 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11631 | continue; |
11632 | case OP_GetFieldFloat: |
11633 | PrintName("GetFieldFloat" ); |
11634 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11635 | continue; |
11636 | #endif |
11637 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11638 | bool emitGetFieldSint8( uint32_t , const SourceInfo &); |
11639 | bool emitGetFieldUint8( uint32_t , const SourceInfo &); |
11640 | bool emitGetFieldSint16( uint32_t , const SourceInfo &); |
11641 | bool emitGetFieldUint16( uint32_t , const SourceInfo &); |
11642 | bool emitGetFieldSint32( uint32_t , const SourceInfo &); |
11643 | bool emitGetFieldUint32( uint32_t , const SourceInfo &); |
11644 | bool emitGetFieldSint64( uint32_t , const SourceInfo &); |
11645 | bool emitGetFieldUint64( uint32_t , const SourceInfo &); |
11646 | bool emitGetFieldIntAP( uint32_t , const SourceInfo &); |
11647 | bool emitGetFieldIntAPS( uint32_t , const SourceInfo &); |
11648 | bool emitGetFieldBool( uint32_t , const SourceInfo &); |
11649 | bool emitGetFieldPtr( uint32_t , const SourceInfo &); |
11650 | bool emitGetFieldFnPtr( uint32_t , const SourceInfo &); |
11651 | bool emitGetFieldMemberPtr( uint32_t , const SourceInfo &); |
11652 | bool emitGetFieldFloat( uint32_t , const SourceInfo &); |
11653 | #endif |
11654 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11655 | [[nodiscard]] bool emitGetField(PrimType, uint32_t, const SourceInfo &I); |
11656 | #endif |
11657 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
11658 | bool |
11659 | #if defined(GET_EVAL_IMPL) |
11660 | EvalEmitter |
11661 | #else |
11662 | ByteCodeEmitter |
11663 | #endif |
11664 | ::emitGetField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
11665 | switch (T0) { |
11666 | case PT_Sint8: |
11667 | return emitGetFieldSint8(A0, I); |
11668 | case PT_Uint8: |
11669 | return emitGetFieldUint8(A0, I); |
11670 | case PT_Sint16: |
11671 | return emitGetFieldSint16(A0, I); |
11672 | case PT_Uint16: |
11673 | return emitGetFieldUint16(A0, I); |
11674 | case PT_Sint32: |
11675 | return emitGetFieldSint32(A0, I); |
11676 | case PT_Uint32: |
11677 | return emitGetFieldUint32(A0, I); |
11678 | case PT_Sint64: |
11679 | return emitGetFieldSint64(A0, I); |
11680 | case PT_Uint64: |
11681 | return emitGetFieldUint64(A0, I); |
11682 | case PT_IntAP: |
11683 | return emitGetFieldIntAP(A0, I); |
11684 | case PT_IntAPS: |
11685 | return emitGetFieldIntAPS(A0, I); |
11686 | case PT_Bool: |
11687 | return emitGetFieldBool(A0, I); |
11688 | case PT_Ptr: |
11689 | return emitGetFieldPtr(A0, I); |
11690 | case PT_FnPtr: |
11691 | return emitGetFieldFnPtr(A0, I); |
11692 | case PT_MemberPtr: |
11693 | return emitGetFieldMemberPtr(A0, I); |
11694 | case PT_Float: |
11695 | return emitGetFieldFloat(A0, I); |
11696 | } |
11697 | llvm_unreachable("invalid enum value" ); |
11698 | } |
11699 | #endif |
11700 | #ifdef GET_LINK_IMPL |
11701 | bool ByteCodeEmitter::emitGetFieldSint8( uint32_t A0, const SourceInfo &L) { |
11702 | return emitOp<uint32_t>(OP_GetFieldSint8, A0, L); |
11703 | } |
11704 | bool ByteCodeEmitter::emitGetFieldUint8( uint32_t A0, const SourceInfo &L) { |
11705 | return emitOp<uint32_t>(OP_GetFieldUint8, A0, L); |
11706 | } |
11707 | bool ByteCodeEmitter::emitGetFieldSint16( uint32_t A0, const SourceInfo &L) { |
11708 | return emitOp<uint32_t>(OP_GetFieldSint16, A0, L); |
11709 | } |
11710 | bool ByteCodeEmitter::emitGetFieldUint16( uint32_t A0, const SourceInfo &L) { |
11711 | return emitOp<uint32_t>(OP_GetFieldUint16, A0, L); |
11712 | } |
11713 | bool ByteCodeEmitter::emitGetFieldSint32( uint32_t A0, const SourceInfo &L) { |
11714 | return emitOp<uint32_t>(OP_GetFieldSint32, A0, L); |
11715 | } |
11716 | bool ByteCodeEmitter::emitGetFieldUint32( uint32_t A0, const SourceInfo &L) { |
11717 | return emitOp<uint32_t>(OP_GetFieldUint32, A0, L); |
11718 | } |
11719 | bool ByteCodeEmitter::emitGetFieldSint64( uint32_t A0, const SourceInfo &L) { |
11720 | return emitOp<uint32_t>(OP_GetFieldSint64, A0, L); |
11721 | } |
11722 | bool ByteCodeEmitter::emitGetFieldUint64( uint32_t A0, const SourceInfo &L) { |
11723 | return emitOp<uint32_t>(OP_GetFieldUint64, A0, L); |
11724 | } |
11725 | bool ByteCodeEmitter::emitGetFieldIntAP( uint32_t A0, const SourceInfo &L) { |
11726 | return emitOp<uint32_t>(OP_GetFieldIntAP, A0, L); |
11727 | } |
11728 | bool ByteCodeEmitter::emitGetFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
11729 | return emitOp<uint32_t>(OP_GetFieldIntAPS, A0, L); |
11730 | } |
11731 | bool ByteCodeEmitter::emitGetFieldBool( uint32_t A0, const SourceInfo &L) { |
11732 | return emitOp<uint32_t>(OP_GetFieldBool, A0, L); |
11733 | } |
11734 | bool ByteCodeEmitter::emitGetFieldPtr( uint32_t A0, const SourceInfo &L) { |
11735 | return emitOp<uint32_t>(OP_GetFieldPtr, A0, L); |
11736 | } |
11737 | bool ByteCodeEmitter::emitGetFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
11738 | return emitOp<uint32_t>(OP_GetFieldFnPtr, A0, L); |
11739 | } |
11740 | bool ByteCodeEmitter::emitGetFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
11741 | return emitOp<uint32_t>(OP_GetFieldMemberPtr, A0, L); |
11742 | } |
11743 | bool ByteCodeEmitter::emitGetFieldFloat( uint32_t A0, const SourceInfo &L) { |
11744 | return emitOp<uint32_t>(OP_GetFieldFloat, A0, L); |
11745 | } |
11746 | #endif |
11747 | #ifdef GET_EVAL_IMPL |
11748 | bool EvalEmitter::emitGetFieldSint8( uint32_t A0, const SourceInfo &L) { |
11749 | if (!isActive()) return true; |
11750 | CurrentSource = L; |
11751 | return GetField<PT_Sint8>(S, OpPC, A0); |
11752 | } |
11753 | bool EvalEmitter::emitGetFieldUint8( uint32_t A0, const SourceInfo &L) { |
11754 | if (!isActive()) return true; |
11755 | CurrentSource = L; |
11756 | return GetField<PT_Uint8>(S, OpPC, A0); |
11757 | } |
11758 | bool EvalEmitter::emitGetFieldSint16( uint32_t A0, const SourceInfo &L) { |
11759 | if (!isActive()) return true; |
11760 | CurrentSource = L; |
11761 | return GetField<PT_Sint16>(S, OpPC, A0); |
11762 | } |
11763 | bool EvalEmitter::emitGetFieldUint16( uint32_t A0, const SourceInfo &L) { |
11764 | if (!isActive()) return true; |
11765 | CurrentSource = L; |
11766 | return GetField<PT_Uint16>(S, OpPC, A0); |
11767 | } |
11768 | bool EvalEmitter::emitGetFieldSint32( uint32_t A0, const SourceInfo &L) { |
11769 | if (!isActive()) return true; |
11770 | CurrentSource = L; |
11771 | return GetField<PT_Sint32>(S, OpPC, A0); |
11772 | } |
11773 | bool EvalEmitter::emitGetFieldUint32( uint32_t A0, const SourceInfo &L) { |
11774 | if (!isActive()) return true; |
11775 | CurrentSource = L; |
11776 | return GetField<PT_Uint32>(S, OpPC, A0); |
11777 | } |
11778 | bool EvalEmitter::emitGetFieldSint64( uint32_t A0, const SourceInfo &L) { |
11779 | if (!isActive()) return true; |
11780 | CurrentSource = L; |
11781 | return GetField<PT_Sint64>(S, OpPC, A0); |
11782 | } |
11783 | bool EvalEmitter::emitGetFieldUint64( uint32_t A0, const SourceInfo &L) { |
11784 | if (!isActive()) return true; |
11785 | CurrentSource = L; |
11786 | return GetField<PT_Uint64>(S, OpPC, A0); |
11787 | } |
11788 | bool EvalEmitter::emitGetFieldIntAP( uint32_t A0, const SourceInfo &L) { |
11789 | if (!isActive()) return true; |
11790 | CurrentSource = L; |
11791 | return GetField<PT_IntAP>(S, OpPC, A0); |
11792 | } |
11793 | bool EvalEmitter::emitGetFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
11794 | if (!isActive()) return true; |
11795 | CurrentSource = L; |
11796 | return GetField<PT_IntAPS>(S, OpPC, A0); |
11797 | } |
11798 | bool EvalEmitter::emitGetFieldBool( uint32_t A0, const SourceInfo &L) { |
11799 | if (!isActive()) return true; |
11800 | CurrentSource = L; |
11801 | return GetField<PT_Bool>(S, OpPC, A0); |
11802 | } |
11803 | bool EvalEmitter::emitGetFieldPtr( uint32_t A0, const SourceInfo &L) { |
11804 | if (!isActive()) return true; |
11805 | CurrentSource = L; |
11806 | return GetField<PT_Ptr>(S, OpPC, A0); |
11807 | } |
11808 | bool EvalEmitter::emitGetFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
11809 | if (!isActive()) return true; |
11810 | CurrentSource = L; |
11811 | return GetField<PT_FnPtr>(S, OpPC, A0); |
11812 | } |
11813 | bool EvalEmitter::emitGetFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
11814 | if (!isActive()) return true; |
11815 | CurrentSource = L; |
11816 | return GetField<PT_MemberPtr>(S, OpPC, A0); |
11817 | } |
11818 | bool EvalEmitter::emitGetFieldFloat( uint32_t A0, const SourceInfo &L) { |
11819 | if (!isActive()) return true; |
11820 | CurrentSource = L; |
11821 | return GetField<PT_Float>(S, OpPC, A0); |
11822 | } |
11823 | #endif |
11824 | #ifdef GET_OPCODE_NAMES |
11825 | OP_GetFieldPopSint8, |
11826 | OP_GetFieldPopUint8, |
11827 | OP_GetFieldPopSint16, |
11828 | OP_GetFieldPopUint16, |
11829 | OP_GetFieldPopSint32, |
11830 | OP_GetFieldPopUint32, |
11831 | OP_GetFieldPopSint64, |
11832 | OP_GetFieldPopUint64, |
11833 | OP_GetFieldPopIntAP, |
11834 | OP_GetFieldPopIntAPS, |
11835 | OP_GetFieldPopBool, |
11836 | OP_GetFieldPopPtr, |
11837 | OP_GetFieldPopFnPtr, |
11838 | OP_GetFieldPopMemberPtr, |
11839 | OP_GetFieldPopFloat, |
11840 | #endif |
11841 | #ifdef GET_INTERP |
11842 | case OP_GetFieldPopSint8: { |
11843 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11844 | if (!GetFieldPop<PT_Sint8>(S, OpPC, V0)) |
11845 | return false; |
11846 | continue; |
11847 | } |
11848 | case OP_GetFieldPopUint8: { |
11849 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11850 | if (!GetFieldPop<PT_Uint8>(S, OpPC, V0)) |
11851 | return false; |
11852 | continue; |
11853 | } |
11854 | case OP_GetFieldPopSint16: { |
11855 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11856 | if (!GetFieldPop<PT_Sint16>(S, OpPC, V0)) |
11857 | return false; |
11858 | continue; |
11859 | } |
11860 | case OP_GetFieldPopUint16: { |
11861 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11862 | if (!GetFieldPop<PT_Uint16>(S, OpPC, V0)) |
11863 | return false; |
11864 | continue; |
11865 | } |
11866 | case OP_GetFieldPopSint32: { |
11867 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11868 | if (!GetFieldPop<PT_Sint32>(S, OpPC, V0)) |
11869 | return false; |
11870 | continue; |
11871 | } |
11872 | case OP_GetFieldPopUint32: { |
11873 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11874 | if (!GetFieldPop<PT_Uint32>(S, OpPC, V0)) |
11875 | return false; |
11876 | continue; |
11877 | } |
11878 | case OP_GetFieldPopSint64: { |
11879 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11880 | if (!GetFieldPop<PT_Sint64>(S, OpPC, V0)) |
11881 | return false; |
11882 | continue; |
11883 | } |
11884 | case OP_GetFieldPopUint64: { |
11885 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11886 | if (!GetFieldPop<PT_Uint64>(S, OpPC, V0)) |
11887 | return false; |
11888 | continue; |
11889 | } |
11890 | case OP_GetFieldPopIntAP: { |
11891 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11892 | if (!GetFieldPop<PT_IntAP>(S, OpPC, V0)) |
11893 | return false; |
11894 | continue; |
11895 | } |
11896 | case OP_GetFieldPopIntAPS: { |
11897 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11898 | if (!GetFieldPop<PT_IntAPS>(S, OpPC, V0)) |
11899 | return false; |
11900 | continue; |
11901 | } |
11902 | case OP_GetFieldPopBool: { |
11903 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11904 | if (!GetFieldPop<PT_Bool>(S, OpPC, V0)) |
11905 | return false; |
11906 | continue; |
11907 | } |
11908 | case OP_GetFieldPopPtr: { |
11909 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11910 | if (!GetFieldPop<PT_Ptr>(S, OpPC, V0)) |
11911 | return false; |
11912 | continue; |
11913 | } |
11914 | case OP_GetFieldPopFnPtr: { |
11915 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11916 | if (!GetFieldPop<PT_FnPtr>(S, OpPC, V0)) |
11917 | return false; |
11918 | continue; |
11919 | } |
11920 | case OP_GetFieldPopMemberPtr: { |
11921 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11922 | if (!GetFieldPop<PT_MemberPtr>(S, OpPC, V0)) |
11923 | return false; |
11924 | continue; |
11925 | } |
11926 | case OP_GetFieldPopFloat: { |
11927 | const auto V0 = ReadArg<uint32_t>(S, PC); |
11928 | if (!GetFieldPop<PT_Float>(S, OpPC, V0)) |
11929 | return false; |
11930 | continue; |
11931 | } |
11932 | #endif |
11933 | #ifdef GET_DISASM |
11934 | case OP_GetFieldPopSint8: |
11935 | PrintName("GetFieldPopSint8" ); |
11936 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11937 | continue; |
11938 | case OP_GetFieldPopUint8: |
11939 | PrintName("GetFieldPopUint8" ); |
11940 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11941 | continue; |
11942 | case OP_GetFieldPopSint16: |
11943 | PrintName("GetFieldPopSint16" ); |
11944 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11945 | continue; |
11946 | case OP_GetFieldPopUint16: |
11947 | PrintName("GetFieldPopUint16" ); |
11948 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11949 | continue; |
11950 | case OP_GetFieldPopSint32: |
11951 | PrintName("GetFieldPopSint32" ); |
11952 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11953 | continue; |
11954 | case OP_GetFieldPopUint32: |
11955 | PrintName("GetFieldPopUint32" ); |
11956 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11957 | continue; |
11958 | case OP_GetFieldPopSint64: |
11959 | PrintName("GetFieldPopSint64" ); |
11960 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11961 | continue; |
11962 | case OP_GetFieldPopUint64: |
11963 | PrintName("GetFieldPopUint64" ); |
11964 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11965 | continue; |
11966 | case OP_GetFieldPopIntAP: |
11967 | PrintName("GetFieldPopIntAP" ); |
11968 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11969 | continue; |
11970 | case OP_GetFieldPopIntAPS: |
11971 | PrintName("GetFieldPopIntAPS" ); |
11972 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11973 | continue; |
11974 | case OP_GetFieldPopBool: |
11975 | PrintName("GetFieldPopBool" ); |
11976 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11977 | continue; |
11978 | case OP_GetFieldPopPtr: |
11979 | PrintName("GetFieldPopPtr" ); |
11980 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11981 | continue; |
11982 | case OP_GetFieldPopFnPtr: |
11983 | PrintName("GetFieldPopFnPtr" ); |
11984 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11985 | continue; |
11986 | case OP_GetFieldPopMemberPtr: |
11987 | PrintName("GetFieldPopMemberPtr" ); |
11988 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11989 | continue; |
11990 | case OP_GetFieldPopFloat: |
11991 | PrintName("GetFieldPopFloat" ); |
11992 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
11993 | continue; |
11994 | #endif |
11995 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
11996 | bool emitGetFieldPopSint8( uint32_t , const SourceInfo &); |
11997 | bool emitGetFieldPopUint8( uint32_t , const SourceInfo &); |
11998 | bool emitGetFieldPopSint16( uint32_t , const SourceInfo &); |
11999 | bool emitGetFieldPopUint16( uint32_t , const SourceInfo &); |
12000 | bool emitGetFieldPopSint32( uint32_t , const SourceInfo &); |
12001 | bool emitGetFieldPopUint32( uint32_t , const SourceInfo &); |
12002 | bool emitGetFieldPopSint64( uint32_t , const SourceInfo &); |
12003 | bool emitGetFieldPopUint64( uint32_t , const SourceInfo &); |
12004 | bool emitGetFieldPopIntAP( uint32_t , const SourceInfo &); |
12005 | bool emitGetFieldPopIntAPS( uint32_t , const SourceInfo &); |
12006 | bool emitGetFieldPopBool( uint32_t , const SourceInfo &); |
12007 | bool emitGetFieldPopPtr( uint32_t , const SourceInfo &); |
12008 | bool emitGetFieldPopFnPtr( uint32_t , const SourceInfo &); |
12009 | bool emitGetFieldPopMemberPtr( uint32_t , const SourceInfo &); |
12010 | bool emitGetFieldPopFloat( uint32_t , const SourceInfo &); |
12011 | #endif |
12012 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12013 | [[nodiscard]] bool emitGetFieldPop(PrimType, uint32_t, const SourceInfo &I); |
12014 | #endif |
12015 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
12016 | bool |
12017 | #if defined(GET_EVAL_IMPL) |
12018 | EvalEmitter |
12019 | #else |
12020 | ByteCodeEmitter |
12021 | #endif |
12022 | ::emitGetFieldPop(PrimType T0, uint32_t A0, const SourceInfo &I) { |
12023 | switch (T0) { |
12024 | case PT_Sint8: |
12025 | return emitGetFieldPopSint8(A0, I); |
12026 | case PT_Uint8: |
12027 | return emitGetFieldPopUint8(A0, I); |
12028 | case PT_Sint16: |
12029 | return emitGetFieldPopSint16(A0, I); |
12030 | case PT_Uint16: |
12031 | return emitGetFieldPopUint16(A0, I); |
12032 | case PT_Sint32: |
12033 | return emitGetFieldPopSint32(A0, I); |
12034 | case PT_Uint32: |
12035 | return emitGetFieldPopUint32(A0, I); |
12036 | case PT_Sint64: |
12037 | return emitGetFieldPopSint64(A0, I); |
12038 | case PT_Uint64: |
12039 | return emitGetFieldPopUint64(A0, I); |
12040 | case PT_IntAP: |
12041 | return emitGetFieldPopIntAP(A0, I); |
12042 | case PT_IntAPS: |
12043 | return emitGetFieldPopIntAPS(A0, I); |
12044 | case PT_Bool: |
12045 | return emitGetFieldPopBool(A0, I); |
12046 | case PT_Ptr: |
12047 | return emitGetFieldPopPtr(A0, I); |
12048 | case PT_FnPtr: |
12049 | return emitGetFieldPopFnPtr(A0, I); |
12050 | case PT_MemberPtr: |
12051 | return emitGetFieldPopMemberPtr(A0, I); |
12052 | case PT_Float: |
12053 | return emitGetFieldPopFloat(A0, I); |
12054 | } |
12055 | llvm_unreachable("invalid enum value" ); |
12056 | } |
12057 | #endif |
12058 | #ifdef GET_LINK_IMPL |
12059 | bool ByteCodeEmitter::emitGetFieldPopSint8( uint32_t A0, const SourceInfo &L) { |
12060 | return emitOp<uint32_t>(OP_GetFieldPopSint8, A0, L); |
12061 | } |
12062 | bool ByteCodeEmitter::emitGetFieldPopUint8( uint32_t A0, const SourceInfo &L) { |
12063 | return emitOp<uint32_t>(OP_GetFieldPopUint8, A0, L); |
12064 | } |
12065 | bool ByteCodeEmitter::emitGetFieldPopSint16( uint32_t A0, const SourceInfo &L) { |
12066 | return emitOp<uint32_t>(OP_GetFieldPopSint16, A0, L); |
12067 | } |
12068 | bool ByteCodeEmitter::emitGetFieldPopUint16( uint32_t A0, const SourceInfo &L) { |
12069 | return emitOp<uint32_t>(OP_GetFieldPopUint16, A0, L); |
12070 | } |
12071 | bool ByteCodeEmitter::emitGetFieldPopSint32( uint32_t A0, const SourceInfo &L) { |
12072 | return emitOp<uint32_t>(OP_GetFieldPopSint32, A0, L); |
12073 | } |
12074 | bool ByteCodeEmitter::emitGetFieldPopUint32( uint32_t A0, const SourceInfo &L) { |
12075 | return emitOp<uint32_t>(OP_GetFieldPopUint32, A0, L); |
12076 | } |
12077 | bool ByteCodeEmitter::emitGetFieldPopSint64( uint32_t A0, const SourceInfo &L) { |
12078 | return emitOp<uint32_t>(OP_GetFieldPopSint64, A0, L); |
12079 | } |
12080 | bool ByteCodeEmitter::emitGetFieldPopUint64( uint32_t A0, const SourceInfo &L) { |
12081 | return emitOp<uint32_t>(OP_GetFieldPopUint64, A0, L); |
12082 | } |
12083 | bool ByteCodeEmitter::emitGetFieldPopIntAP( uint32_t A0, const SourceInfo &L) { |
12084 | return emitOp<uint32_t>(OP_GetFieldPopIntAP, A0, L); |
12085 | } |
12086 | bool ByteCodeEmitter::emitGetFieldPopIntAPS( uint32_t A0, const SourceInfo &L) { |
12087 | return emitOp<uint32_t>(OP_GetFieldPopIntAPS, A0, L); |
12088 | } |
12089 | bool ByteCodeEmitter::emitGetFieldPopBool( uint32_t A0, const SourceInfo &L) { |
12090 | return emitOp<uint32_t>(OP_GetFieldPopBool, A0, L); |
12091 | } |
12092 | bool ByteCodeEmitter::emitGetFieldPopPtr( uint32_t A0, const SourceInfo &L) { |
12093 | return emitOp<uint32_t>(OP_GetFieldPopPtr, A0, L); |
12094 | } |
12095 | bool ByteCodeEmitter::emitGetFieldPopFnPtr( uint32_t A0, const SourceInfo &L) { |
12096 | return emitOp<uint32_t>(OP_GetFieldPopFnPtr, A0, L); |
12097 | } |
12098 | bool ByteCodeEmitter::emitGetFieldPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
12099 | return emitOp<uint32_t>(OP_GetFieldPopMemberPtr, A0, L); |
12100 | } |
12101 | bool ByteCodeEmitter::emitGetFieldPopFloat( uint32_t A0, const SourceInfo &L) { |
12102 | return emitOp<uint32_t>(OP_GetFieldPopFloat, A0, L); |
12103 | } |
12104 | #endif |
12105 | #ifdef GET_EVAL_IMPL |
12106 | bool EvalEmitter::emitGetFieldPopSint8( uint32_t A0, const SourceInfo &L) { |
12107 | if (!isActive()) return true; |
12108 | CurrentSource = L; |
12109 | return GetFieldPop<PT_Sint8>(S, OpPC, A0); |
12110 | } |
12111 | bool EvalEmitter::emitGetFieldPopUint8( uint32_t A0, const SourceInfo &L) { |
12112 | if (!isActive()) return true; |
12113 | CurrentSource = L; |
12114 | return GetFieldPop<PT_Uint8>(S, OpPC, A0); |
12115 | } |
12116 | bool EvalEmitter::emitGetFieldPopSint16( uint32_t A0, const SourceInfo &L) { |
12117 | if (!isActive()) return true; |
12118 | CurrentSource = L; |
12119 | return GetFieldPop<PT_Sint16>(S, OpPC, A0); |
12120 | } |
12121 | bool EvalEmitter::emitGetFieldPopUint16( uint32_t A0, const SourceInfo &L) { |
12122 | if (!isActive()) return true; |
12123 | CurrentSource = L; |
12124 | return GetFieldPop<PT_Uint16>(S, OpPC, A0); |
12125 | } |
12126 | bool EvalEmitter::emitGetFieldPopSint32( uint32_t A0, const SourceInfo &L) { |
12127 | if (!isActive()) return true; |
12128 | CurrentSource = L; |
12129 | return GetFieldPop<PT_Sint32>(S, OpPC, A0); |
12130 | } |
12131 | bool EvalEmitter::emitGetFieldPopUint32( uint32_t A0, const SourceInfo &L) { |
12132 | if (!isActive()) return true; |
12133 | CurrentSource = L; |
12134 | return GetFieldPop<PT_Uint32>(S, OpPC, A0); |
12135 | } |
12136 | bool EvalEmitter::emitGetFieldPopSint64( uint32_t A0, const SourceInfo &L) { |
12137 | if (!isActive()) return true; |
12138 | CurrentSource = L; |
12139 | return GetFieldPop<PT_Sint64>(S, OpPC, A0); |
12140 | } |
12141 | bool EvalEmitter::emitGetFieldPopUint64( uint32_t A0, const SourceInfo &L) { |
12142 | if (!isActive()) return true; |
12143 | CurrentSource = L; |
12144 | return GetFieldPop<PT_Uint64>(S, OpPC, A0); |
12145 | } |
12146 | bool EvalEmitter::emitGetFieldPopIntAP( uint32_t A0, const SourceInfo &L) { |
12147 | if (!isActive()) return true; |
12148 | CurrentSource = L; |
12149 | return GetFieldPop<PT_IntAP>(S, OpPC, A0); |
12150 | } |
12151 | bool EvalEmitter::emitGetFieldPopIntAPS( uint32_t A0, const SourceInfo &L) { |
12152 | if (!isActive()) return true; |
12153 | CurrentSource = L; |
12154 | return GetFieldPop<PT_IntAPS>(S, OpPC, A0); |
12155 | } |
12156 | bool EvalEmitter::emitGetFieldPopBool( uint32_t A0, const SourceInfo &L) { |
12157 | if (!isActive()) return true; |
12158 | CurrentSource = L; |
12159 | return GetFieldPop<PT_Bool>(S, OpPC, A0); |
12160 | } |
12161 | bool EvalEmitter::emitGetFieldPopPtr( uint32_t A0, const SourceInfo &L) { |
12162 | if (!isActive()) return true; |
12163 | CurrentSource = L; |
12164 | return GetFieldPop<PT_Ptr>(S, OpPC, A0); |
12165 | } |
12166 | bool EvalEmitter::emitGetFieldPopFnPtr( uint32_t A0, const SourceInfo &L) { |
12167 | if (!isActive()) return true; |
12168 | CurrentSource = L; |
12169 | return GetFieldPop<PT_FnPtr>(S, OpPC, A0); |
12170 | } |
12171 | bool EvalEmitter::emitGetFieldPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
12172 | if (!isActive()) return true; |
12173 | CurrentSource = L; |
12174 | return GetFieldPop<PT_MemberPtr>(S, OpPC, A0); |
12175 | } |
12176 | bool EvalEmitter::emitGetFieldPopFloat( uint32_t A0, const SourceInfo &L) { |
12177 | if (!isActive()) return true; |
12178 | CurrentSource = L; |
12179 | return GetFieldPop<PT_Float>(S, OpPC, A0); |
12180 | } |
12181 | #endif |
12182 | #ifdef GET_OPCODE_NAMES |
12183 | OP_GetFnPtr, |
12184 | #endif |
12185 | #ifdef GET_INTERP |
12186 | case OP_GetFnPtr: { |
12187 | const auto V0 = ReadArg<const Function *>(S, PC); |
12188 | if (!GetFnPtr(S, OpPC, V0)) |
12189 | return false; |
12190 | continue; |
12191 | } |
12192 | #endif |
12193 | #ifdef GET_DISASM |
12194 | case OP_GetFnPtr: |
12195 | PrintName("GetFnPtr" ); |
12196 | OS << "\t" << ReadArg<const Function *>(P, PC) << " " << "\n" ; |
12197 | continue; |
12198 | #endif |
12199 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12200 | bool emitGetFnPtr( const Function * , const SourceInfo &); |
12201 | #endif |
12202 | #ifdef GET_LINK_IMPL |
12203 | bool ByteCodeEmitter::emitGetFnPtr( const Function * A0, const SourceInfo &L) { |
12204 | return emitOp<const Function *>(OP_GetFnPtr, A0, L); |
12205 | } |
12206 | #endif |
12207 | #ifdef GET_EVAL_IMPL |
12208 | bool EvalEmitter::emitGetFnPtr( const Function * A0, const SourceInfo &L) { |
12209 | if (!isActive()) return true; |
12210 | CurrentSource = L; |
12211 | return GetFnPtr(S, OpPC, A0); |
12212 | } |
12213 | #endif |
12214 | #ifdef GET_OPCODE_NAMES |
12215 | OP_GetGlobalSint8, |
12216 | OP_GetGlobalUint8, |
12217 | OP_GetGlobalSint16, |
12218 | OP_GetGlobalUint16, |
12219 | OP_GetGlobalSint32, |
12220 | OP_GetGlobalUint32, |
12221 | OP_GetGlobalSint64, |
12222 | OP_GetGlobalUint64, |
12223 | OP_GetGlobalIntAP, |
12224 | OP_GetGlobalIntAPS, |
12225 | OP_GetGlobalBool, |
12226 | OP_GetGlobalPtr, |
12227 | OP_GetGlobalFnPtr, |
12228 | OP_GetGlobalMemberPtr, |
12229 | OP_GetGlobalFloat, |
12230 | #endif |
12231 | #ifdef GET_INTERP |
12232 | case OP_GetGlobalSint8: { |
12233 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12234 | if (!GetGlobal<PT_Sint8>(S, OpPC, V0)) |
12235 | return false; |
12236 | continue; |
12237 | } |
12238 | case OP_GetGlobalUint8: { |
12239 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12240 | if (!GetGlobal<PT_Uint8>(S, OpPC, V0)) |
12241 | return false; |
12242 | continue; |
12243 | } |
12244 | case OP_GetGlobalSint16: { |
12245 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12246 | if (!GetGlobal<PT_Sint16>(S, OpPC, V0)) |
12247 | return false; |
12248 | continue; |
12249 | } |
12250 | case OP_GetGlobalUint16: { |
12251 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12252 | if (!GetGlobal<PT_Uint16>(S, OpPC, V0)) |
12253 | return false; |
12254 | continue; |
12255 | } |
12256 | case OP_GetGlobalSint32: { |
12257 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12258 | if (!GetGlobal<PT_Sint32>(S, OpPC, V0)) |
12259 | return false; |
12260 | continue; |
12261 | } |
12262 | case OP_GetGlobalUint32: { |
12263 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12264 | if (!GetGlobal<PT_Uint32>(S, OpPC, V0)) |
12265 | return false; |
12266 | continue; |
12267 | } |
12268 | case OP_GetGlobalSint64: { |
12269 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12270 | if (!GetGlobal<PT_Sint64>(S, OpPC, V0)) |
12271 | return false; |
12272 | continue; |
12273 | } |
12274 | case OP_GetGlobalUint64: { |
12275 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12276 | if (!GetGlobal<PT_Uint64>(S, OpPC, V0)) |
12277 | return false; |
12278 | continue; |
12279 | } |
12280 | case OP_GetGlobalIntAP: { |
12281 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12282 | if (!GetGlobal<PT_IntAP>(S, OpPC, V0)) |
12283 | return false; |
12284 | continue; |
12285 | } |
12286 | case OP_GetGlobalIntAPS: { |
12287 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12288 | if (!GetGlobal<PT_IntAPS>(S, OpPC, V0)) |
12289 | return false; |
12290 | continue; |
12291 | } |
12292 | case OP_GetGlobalBool: { |
12293 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12294 | if (!GetGlobal<PT_Bool>(S, OpPC, V0)) |
12295 | return false; |
12296 | continue; |
12297 | } |
12298 | case OP_GetGlobalPtr: { |
12299 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12300 | if (!GetGlobal<PT_Ptr>(S, OpPC, V0)) |
12301 | return false; |
12302 | continue; |
12303 | } |
12304 | case OP_GetGlobalFnPtr: { |
12305 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12306 | if (!GetGlobal<PT_FnPtr>(S, OpPC, V0)) |
12307 | return false; |
12308 | continue; |
12309 | } |
12310 | case OP_GetGlobalMemberPtr: { |
12311 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12312 | if (!GetGlobal<PT_MemberPtr>(S, OpPC, V0)) |
12313 | return false; |
12314 | continue; |
12315 | } |
12316 | case OP_GetGlobalFloat: { |
12317 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12318 | if (!GetGlobal<PT_Float>(S, OpPC, V0)) |
12319 | return false; |
12320 | continue; |
12321 | } |
12322 | #endif |
12323 | #ifdef GET_DISASM |
12324 | case OP_GetGlobalSint8: |
12325 | PrintName("GetGlobalSint8" ); |
12326 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12327 | continue; |
12328 | case OP_GetGlobalUint8: |
12329 | PrintName("GetGlobalUint8" ); |
12330 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12331 | continue; |
12332 | case OP_GetGlobalSint16: |
12333 | PrintName("GetGlobalSint16" ); |
12334 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12335 | continue; |
12336 | case OP_GetGlobalUint16: |
12337 | PrintName("GetGlobalUint16" ); |
12338 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12339 | continue; |
12340 | case OP_GetGlobalSint32: |
12341 | PrintName("GetGlobalSint32" ); |
12342 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12343 | continue; |
12344 | case OP_GetGlobalUint32: |
12345 | PrintName("GetGlobalUint32" ); |
12346 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12347 | continue; |
12348 | case OP_GetGlobalSint64: |
12349 | PrintName("GetGlobalSint64" ); |
12350 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12351 | continue; |
12352 | case OP_GetGlobalUint64: |
12353 | PrintName("GetGlobalUint64" ); |
12354 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12355 | continue; |
12356 | case OP_GetGlobalIntAP: |
12357 | PrintName("GetGlobalIntAP" ); |
12358 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12359 | continue; |
12360 | case OP_GetGlobalIntAPS: |
12361 | PrintName("GetGlobalIntAPS" ); |
12362 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12363 | continue; |
12364 | case OP_GetGlobalBool: |
12365 | PrintName("GetGlobalBool" ); |
12366 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12367 | continue; |
12368 | case OP_GetGlobalPtr: |
12369 | PrintName("GetGlobalPtr" ); |
12370 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12371 | continue; |
12372 | case OP_GetGlobalFnPtr: |
12373 | PrintName("GetGlobalFnPtr" ); |
12374 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12375 | continue; |
12376 | case OP_GetGlobalMemberPtr: |
12377 | PrintName("GetGlobalMemberPtr" ); |
12378 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12379 | continue; |
12380 | case OP_GetGlobalFloat: |
12381 | PrintName("GetGlobalFloat" ); |
12382 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12383 | continue; |
12384 | #endif |
12385 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12386 | bool emitGetGlobalSint8( uint32_t , const SourceInfo &); |
12387 | bool emitGetGlobalUint8( uint32_t , const SourceInfo &); |
12388 | bool emitGetGlobalSint16( uint32_t , const SourceInfo &); |
12389 | bool emitGetGlobalUint16( uint32_t , const SourceInfo &); |
12390 | bool emitGetGlobalSint32( uint32_t , const SourceInfo &); |
12391 | bool emitGetGlobalUint32( uint32_t , const SourceInfo &); |
12392 | bool emitGetGlobalSint64( uint32_t , const SourceInfo &); |
12393 | bool emitGetGlobalUint64( uint32_t , const SourceInfo &); |
12394 | bool emitGetGlobalIntAP( uint32_t , const SourceInfo &); |
12395 | bool emitGetGlobalIntAPS( uint32_t , const SourceInfo &); |
12396 | bool emitGetGlobalBool( uint32_t , const SourceInfo &); |
12397 | bool emitGetGlobalPtr( uint32_t , const SourceInfo &); |
12398 | bool emitGetGlobalFnPtr( uint32_t , const SourceInfo &); |
12399 | bool emitGetGlobalMemberPtr( uint32_t , const SourceInfo &); |
12400 | bool emitGetGlobalFloat( uint32_t , const SourceInfo &); |
12401 | #endif |
12402 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12403 | [[nodiscard]] bool emitGetGlobal(PrimType, uint32_t, const SourceInfo &I); |
12404 | #endif |
12405 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
12406 | bool |
12407 | #if defined(GET_EVAL_IMPL) |
12408 | EvalEmitter |
12409 | #else |
12410 | ByteCodeEmitter |
12411 | #endif |
12412 | ::emitGetGlobal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
12413 | switch (T0) { |
12414 | case PT_Sint8: |
12415 | return emitGetGlobalSint8(A0, I); |
12416 | case PT_Uint8: |
12417 | return emitGetGlobalUint8(A0, I); |
12418 | case PT_Sint16: |
12419 | return emitGetGlobalSint16(A0, I); |
12420 | case PT_Uint16: |
12421 | return emitGetGlobalUint16(A0, I); |
12422 | case PT_Sint32: |
12423 | return emitGetGlobalSint32(A0, I); |
12424 | case PT_Uint32: |
12425 | return emitGetGlobalUint32(A0, I); |
12426 | case PT_Sint64: |
12427 | return emitGetGlobalSint64(A0, I); |
12428 | case PT_Uint64: |
12429 | return emitGetGlobalUint64(A0, I); |
12430 | case PT_IntAP: |
12431 | return emitGetGlobalIntAP(A0, I); |
12432 | case PT_IntAPS: |
12433 | return emitGetGlobalIntAPS(A0, I); |
12434 | case PT_Bool: |
12435 | return emitGetGlobalBool(A0, I); |
12436 | case PT_Ptr: |
12437 | return emitGetGlobalPtr(A0, I); |
12438 | case PT_FnPtr: |
12439 | return emitGetGlobalFnPtr(A0, I); |
12440 | case PT_MemberPtr: |
12441 | return emitGetGlobalMemberPtr(A0, I); |
12442 | case PT_Float: |
12443 | return emitGetGlobalFloat(A0, I); |
12444 | } |
12445 | llvm_unreachable("invalid enum value" ); |
12446 | } |
12447 | #endif |
12448 | #ifdef GET_LINK_IMPL |
12449 | bool ByteCodeEmitter::emitGetGlobalSint8( uint32_t A0, const SourceInfo &L) { |
12450 | return emitOp<uint32_t>(OP_GetGlobalSint8, A0, L); |
12451 | } |
12452 | bool ByteCodeEmitter::emitGetGlobalUint8( uint32_t A0, const SourceInfo &L) { |
12453 | return emitOp<uint32_t>(OP_GetGlobalUint8, A0, L); |
12454 | } |
12455 | bool ByteCodeEmitter::emitGetGlobalSint16( uint32_t A0, const SourceInfo &L) { |
12456 | return emitOp<uint32_t>(OP_GetGlobalSint16, A0, L); |
12457 | } |
12458 | bool ByteCodeEmitter::emitGetGlobalUint16( uint32_t A0, const SourceInfo &L) { |
12459 | return emitOp<uint32_t>(OP_GetGlobalUint16, A0, L); |
12460 | } |
12461 | bool ByteCodeEmitter::emitGetGlobalSint32( uint32_t A0, const SourceInfo &L) { |
12462 | return emitOp<uint32_t>(OP_GetGlobalSint32, A0, L); |
12463 | } |
12464 | bool ByteCodeEmitter::emitGetGlobalUint32( uint32_t A0, const SourceInfo &L) { |
12465 | return emitOp<uint32_t>(OP_GetGlobalUint32, A0, L); |
12466 | } |
12467 | bool ByteCodeEmitter::emitGetGlobalSint64( uint32_t A0, const SourceInfo &L) { |
12468 | return emitOp<uint32_t>(OP_GetGlobalSint64, A0, L); |
12469 | } |
12470 | bool ByteCodeEmitter::emitGetGlobalUint64( uint32_t A0, const SourceInfo &L) { |
12471 | return emitOp<uint32_t>(OP_GetGlobalUint64, A0, L); |
12472 | } |
12473 | bool ByteCodeEmitter::emitGetGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
12474 | return emitOp<uint32_t>(OP_GetGlobalIntAP, A0, L); |
12475 | } |
12476 | bool ByteCodeEmitter::emitGetGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
12477 | return emitOp<uint32_t>(OP_GetGlobalIntAPS, A0, L); |
12478 | } |
12479 | bool ByteCodeEmitter::emitGetGlobalBool( uint32_t A0, const SourceInfo &L) { |
12480 | return emitOp<uint32_t>(OP_GetGlobalBool, A0, L); |
12481 | } |
12482 | bool ByteCodeEmitter::emitGetGlobalPtr( uint32_t A0, const SourceInfo &L) { |
12483 | return emitOp<uint32_t>(OP_GetGlobalPtr, A0, L); |
12484 | } |
12485 | bool ByteCodeEmitter::emitGetGlobalFnPtr( uint32_t A0, const SourceInfo &L) { |
12486 | return emitOp<uint32_t>(OP_GetGlobalFnPtr, A0, L); |
12487 | } |
12488 | bool ByteCodeEmitter::emitGetGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
12489 | return emitOp<uint32_t>(OP_GetGlobalMemberPtr, A0, L); |
12490 | } |
12491 | bool ByteCodeEmitter::emitGetGlobalFloat( uint32_t A0, const SourceInfo &L) { |
12492 | return emitOp<uint32_t>(OP_GetGlobalFloat, A0, L); |
12493 | } |
12494 | #endif |
12495 | #ifdef GET_EVAL_IMPL |
12496 | bool EvalEmitter::emitGetGlobalSint8( uint32_t A0, const SourceInfo &L) { |
12497 | if (!isActive()) return true; |
12498 | CurrentSource = L; |
12499 | return GetGlobal<PT_Sint8>(S, OpPC, A0); |
12500 | } |
12501 | bool EvalEmitter::emitGetGlobalUint8( uint32_t A0, const SourceInfo &L) { |
12502 | if (!isActive()) return true; |
12503 | CurrentSource = L; |
12504 | return GetGlobal<PT_Uint8>(S, OpPC, A0); |
12505 | } |
12506 | bool EvalEmitter::emitGetGlobalSint16( uint32_t A0, const SourceInfo &L) { |
12507 | if (!isActive()) return true; |
12508 | CurrentSource = L; |
12509 | return GetGlobal<PT_Sint16>(S, OpPC, A0); |
12510 | } |
12511 | bool EvalEmitter::emitGetGlobalUint16( uint32_t A0, const SourceInfo &L) { |
12512 | if (!isActive()) return true; |
12513 | CurrentSource = L; |
12514 | return GetGlobal<PT_Uint16>(S, OpPC, A0); |
12515 | } |
12516 | bool EvalEmitter::emitGetGlobalSint32( uint32_t A0, const SourceInfo &L) { |
12517 | if (!isActive()) return true; |
12518 | CurrentSource = L; |
12519 | return GetGlobal<PT_Sint32>(S, OpPC, A0); |
12520 | } |
12521 | bool EvalEmitter::emitGetGlobalUint32( uint32_t A0, const SourceInfo &L) { |
12522 | if (!isActive()) return true; |
12523 | CurrentSource = L; |
12524 | return GetGlobal<PT_Uint32>(S, OpPC, A0); |
12525 | } |
12526 | bool EvalEmitter::emitGetGlobalSint64( uint32_t A0, const SourceInfo &L) { |
12527 | if (!isActive()) return true; |
12528 | CurrentSource = L; |
12529 | return GetGlobal<PT_Sint64>(S, OpPC, A0); |
12530 | } |
12531 | bool EvalEmitter::emitGetGlobalUint64( uint32_t A0, const SourceInfo &L) { |
12532 | if (!isActive()) return true; |
12533 | CurrentSource = L; |
12534 | return GetGlobal<PT_Uint64>(S, OpPC, A0); |
12535 | } |
12536 | bool EvalEmitter::emitGetGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
12537 | if (!isActive()) return true; |
12538 | CurrentSource = L; |
12539 | return GetGlobal<PT_IntAP>(S, OpPC, A0); |
12540 | } |
12541 | bool EvalEmitter::emitGetGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
12542 | if (!isActive()) return true; |
12543 | CurrentSource = L; |
12544 | return GetGlobal<PT_IntAPS>(S, OpPC, A0); |
12545 | } |
12546 | bool EvalEmitter::emitGetGlobalBool( uint32_t A0, const SourceInfo &L) { |
12547 | if (!isActive()) return true; |
12548 | CurrentSource = L; |
12549 | return GetGlobal<PT_Bool>(S, OpPC, A0); |
12550 | } |
12551 | bool EvalEmitter::emitGetGlobalPtr( uint32_t A0, const SourceInfo &L) { |
12552 | if (!isActive()) return true; |
12553 | CurrentSource = L; |
12554 | return GetGlobal<PT_Ptr>(S, OpPC, A0); |
12555 | } |
12556 | bool EvalEmitter::emitGetGlobalFnPtr( uint32_t A0, const SourceInfo &L) { |
12557 | if (!isActive()) return true; |
12558 | CurrentSource = L; |
12559 | return GetGlobal<PT_FnPtr>(S, OpPC, A0); |
12560 | } |
12561 | bool EvalEmitter::emitGetGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
12562 | if (!isActive()) return true; |
12563 | CurrentSource = L; |
12564 | return GetGlobal<PT_MemberPtr>(S, OpPC, A0); |
12565 | } |
12566 | bool EvalEmitter::emitGetGlobalFloat( uint32_t A0, const SourceInfo &L) { |
12567 | if (!isActive()) return true; |
12568 | CurrentSource = L; |
12569 | return GetGlobal<PT_Float>(S, OpPC, A0); |
12570 | } |
12571 | #endif |
12572 | #ifdef GET_OPCODE_NAMES |
12573 | OP_GetGlobalUncheckedSint8, |
12574 | OP_GetGlobalUncheckedUint8, |
12575 | OP_GetGlobalUncheckedSint16, |
12576 | OP_GetGlobalUncheckedUint16, |
12577 | OP_GetGlobalUncheckedSint32, |
12578 | OP_GetGlobalUncheckedUint32, |
12579 | OP_GetGlobalUncheckedSint64, |
12580 | OP_GetGlobalUncheckedUint64, |
12581 | OP_GetGlobalUncheckedIntAP, |
12582 | OP_GetGlobalUncheckedIntAPS, |
12583 | OP_GetGlobalUncheckedBool, |
12584 | OP_GetGlobalUncheckedPtr, |
12585 | OP_GetGlobalUncheckedFnPtr, |
12586 | OP_GetGlobalUncheckedMemberPtr, |
12587 | OP_GetGlobalUncheckedFloat, |
12588 | #endif |
12589 | #ifdef GET_INTERP |
12590 | case OP_GetGlobalUncheckedSint8: { |
12591 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12592 | if (!GetGlobalUnchecked<PT_Sint8>(S, OpPC, V0)) |
12593 | return false; |
12594 | continue; |
12595 | } |
12596 | case OP_GetGlobalUncheckedUint8: { |
12597 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12598 | if (!GetGlobalUnchecked<PT_Uint8>(S, OpPC, V0)) |
12599 | return false; |
12600 | continue; |
12601 | } |
12602 | case OP_GetGlobalUncheckedSint16: { |
12603 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12604 | if (!GetGlobalUnchecked<PT_Sint16>(S, OpPC, V0)) |
12605 | return false; |
12606 | continue; |
12607 | } |
12608 | case OP_GetGlobalUncheckedUint16: { |
12609 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12610 | if (!GetGlobalUnchecked<PT_Uint16>(S, OpPC, V0)) |
12611 | return false; |
12612 | continue; |
12613 | } |
12614 | case OP_GetGlobalUncheckedSint32: { |
12615 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12616 | if (!GetGlobalUnchecked<PT_Sint32>(S, OpPC, V0)) |
12617 | return false; |
12618 | continue; |
12619 | } |
12620 | case OP_GetGlobalUncheckedUint32: { |
12621 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12622 | if (!GetGlobalUnchecked<PT_Uint32>(S, OpPC, V0)) |
12623 | return false; |
12624 | continue; |
12625 | } |
12626 | case OP_GetGlobalUncheckedSint64: { |
12627 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12628 | if (!GetGlobalUnchecked<PT_Sint64>(S, OpPC, V0)) |
12629 | return false; |
12630 | continue; |
12631 | } |
12632 | case OP_GetGlobalUncheckedUint64: { |
12633 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12634 | if (!GetGlobalUnchecked<PT_Uint64>(S, OpPC, V0)) |
12635 | return false; |
12636 | continue; |
12637 | } |
12638 | case OP_GetGlobalUncheckedIntAP: { |
12639 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12640 | if (!GetGlobalUnchecked<PT_IntAP>(S, OpPC, V0)) |
12641 | return false; |
12642 | continue; |
12643 | } |
12644 | case OP_GetGlobalUncheckedIntAPS: { |
12645 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12646 | if (!GetGlobalUnchecked<PT_IntAPS>(S, OpPC, V0)) |
12647 | return false; |
12648 | continue; |
12649 | } |
12650 | case OP_GetGlobalUncheckedBool: { |
12651 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12652 | if (!GetGlobalUnchecked<PT_Bool>(S, OpPC, V0)) |
12653 | return false; |
12654 | continue; |
12655 | } |
12656 | case OP_GetGlobalUncheckedPtr: { |
12657 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12658 | if (!GetGlobalUnchecked<PT_Ptr>(S, OpPC, V0)) |
12659 | return false; |
12660 | continue; |
12661 | } |
12662 | case OP_GetGlobalUncheckedFnPtr: { |
12663 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12664 | if (!GetGlobalUnchecked<PT_FnPtr>(S, OpPC, V0)) |
12665 | return false; |
12666 | continue; |
12667 | } |
12668 | case OP_GetGlobalUncheckedMemberPtr: { |
12669 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12670 | if (!GetGlobalUnchecked<PT_MemberPtr>(S, OpPC, V0)) |
12671 | return false; |
12672 | continue; |
12673 | } |
12674 | case OP_GetGlobalUncheckedFloat: { |
12675 | const auto V0 = ReadArg<uint32_t>(S, PC); |
12676 | if (!GetGlobalUnchecked<PT_Float>(S, OpPC, V0)) |
12677 | return false; |
12678 | continue; |
12679 | } |
12680 | #endif |
12681 | #ifdef GET_DISASM |
12682 | case OP_GetGlobalUncheckedSint8: |
12683 | PrintName("GetGlobalUncheckedSint8" ); |
12684 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12685 | continue; |
12686 | case OP_GetGlobalUncheckedUint8: |
12687 | PrintName("GetGlobalUncheckedUint8" ); |
12688 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12689 | continue; |
12690 | case OP_GetGlobalUncheckedSint16: |
12691 | PrintName("GetGlobalUncheckedSint16" ); |
12692 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12693 | continue; |
12694 | case OP_GetGlobalUncheckedUint16: |
12695 | PrintName("GetGlobalUncheckedUint16" ); |
12696 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12697 | continue; |
12698 | case OP_GetGlobalUncheckedSint32: |
12699 | PrintName("GetGlobalUncheckedSint32" ); |
12700 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12701 | continue; |
12702 | case OP_GetGlobalUncheckedUint32: |
12703 | PrintName("GetGlobalUncheckedUint32" ); |
12704 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12705 | continue; |
12706 | case OP_GetGlobalUncheckedSint64: |
12707 | PrintName("GetGlobalUncheckedSint64" ); |
12708 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12709 | continue; |
12710 | case OP_GetGlobalUncheckedUint64: |
12711 | PrintName("GetGlobalUncheckedUint64" ); |
12712 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12713 | continue; |
12714 | case OP_GetGlobalUncheckedIntAP: |
12715 | PrintName("GetGlobalUncheckedIntAP" ); |
12716 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12717 | continue; |
12718 | case OP_GetGlobalUncheckedIntAPS: |
12719 | PrintName("GetGlobalUncheckedIntAPS" ); |
12720 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12721 | continue; |
12722 | case OP_GetGlobalUncheckedBool: |
12723 | PrintName("GetGlobalUncheckedBool" ); |
12724 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12725 | continue; |
12726 | case OP_GetGlobalUncheckedPtr: |
12727 | PrintName("GetGlobalUncheckedPtr" ); |
12728 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12729 | continue; |
12730 | case OP_GetGlobalUncheckedFnPtr: |
12731 | PrintName("GetGlobalUncheckedFnPtr" ); |
12732 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12733 | continue; |
12734 | case OP_GetGlobalUncheckedMemberPtr: |
12735 | PrintName("GetGlobalUncheckedMemberPtr" ); |
12736 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12737 | continue; |
12738 | case OP_GetGlobalUncheckedFloat: |
12739 | PrintName("GetGlobalUncheckedFloat" ); |
12740 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
12741 | continue; |
12742 | #endif |
12743 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12744 | bool emitGetGlobalUncheckedSint8( uint32_t , const SourceInfo &); |
12745 | bool emitGetGlobalUncheckedUint8( uint32_t , const SourceInfo &); |
12746 | bool emitGetGlobalUncheckedSint16( uint32_t , const SourceInfo &); |
12747 | bool emitGetGlobalUncheckedUint16( uint32_t , const SourceInfo &); |
12748 | bool emitGetGlobalUncheckedSint32( uint32_t , const SourceInfo &); |
12749 | bool emitGetGlobalUncheckedUint32( uint32_t , const SourceInfo &); |
12750 | bool emitGetGlobalUncheckedSint64( uint32_t , const SourceInfo &); |
12751 | bool emitGetGlobalUncheckedUint64( uint32_t , const SourceInfo &); |
12752 | bool emitGetGlobalUncheckedIntAP( uint32_t , const SourceInfo &); |
12753 | bool emitGetGlobalUncheckedIntAPS( uint32_t , const SourceInfo &); |
12754 | bool emitGetGlobalUncheckedBool( uint32_t , const SourceInfo &); |
12755 | bool emitGetGlobalUncheckedPtr( uint32_t , const SourceInfo &); |
12756 | bool emitGetGlobalUncheckedFnPtr( uint32_t , const SourceInfo &); |
12757 | bool emitGetGlobalUncheckedMemberPtr( uint32_t , const SourceInfo &); |
12758 | bool emitGetGlobalUncheckedFloat( uint32_t , const SourceInfo &); |
12759 | #endif |
12760 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
12761 | [[nodiscard]] bool emitGetGlobalUnchecked(PrimType, uint32_t, const SourceInfo &I); |
12762 | #endif |
12763 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
12764 | bool |
12765 | #if defined(GET_EVAL_IMPL) |
12766 | EvalEmitter |
12767 | #else |
12768 | ByteCodeEmitter |
12769 | #endif |
12770 | ::emitGetGlobalUnchecked(PrimType T0, uint32_t A0, const SourceInfo &I) { |
12771 | switch (T0) { |
12772 | case PT_Sint8: |
12773 | return emitGetGlobalUncheckedSint8(A0, I); |
12774 | case PT_Uint8: |
12775 | return emitGetGlobalUncheckedUint8(A0, I); |
12776 | case PT_Sint16: |
12777 | return emitGetGlobalUncheckedSint16(A0, I); |
12778 | case PT_Uint16: |
12779 | return emitGetGlobalUncheckedUint16(A0, I); |
12780 | case PT_Sint32: |
12781 | return emitGetGlobalUncheckedSint32(A0, I); |
12782 | case PT_Uint32: |
12783 | return emitGetGlobalUncheckedUint32(A0, I); |
12784 | case PT_Sint64: |
12785 | return emitGetGlobalUncheckedSint64(A0, I); |
12786 | case PT_Uint64: |
12787 | return emitGetGlobalUncheckedUint64(A0, I); |
12788 | case PT_IntAP: |
12789 | return emitGetGlobalUncheckedIntAP(A0, I); |
12790 | case PT_IntAPS: |
12791 | return emitGetGlobalUncheckedIntAPS(A0, I); |
12792 | case PT_Bool: |
12793 | return emitGetGlobalUncheckedBool(A0, I); |
12794 | case PT_Ptr: |
12795 | return emitGetGlobalUncheckedPtr(A0, I); |
12796 | case PT_FnPtr: |
12797 | return emitGetGlobalUncheckedFnPtr(A0, I); |
12798 | case PT_MemberPtr: |
12799 | return emitGetGlobalUncheckedMemberPtr(A0, I); |
12800 | case PT_Float: |
12801 | return emitGetGlobalUncheckedFloat(A0, I); |
12802 | } |
12803 | llvm_unreachable("invalid enum value" ); |
12804 | } |
12805 | #endif |
12806 | #ifdef GET_LINK_IMPL |
12807 | bool ByteCodeEmitter::emitGetGlobalUncheckedSint8( uint32_t A0, const SourceInfo &L) { |
12808 | return emitOp<uint32_t>(OP_GetGlobalUncheckedSint8, A0, L); |
12809 | } |
12810 | bool ByteCodeEmitter::emitGetGlobalUncheckedUint8( uint32_t A0, const SourceInfo &L) { |
12811 | return emitOp<uint32_t>(OP_GetGlobalUncheckedUint8, A0, L); |
12812 | } |
12813 | bool ByteCodeEmitter::emitGetGlobalUncheckedSint16( uint32_t A0, const SourceInfo &L) { |
12814 | return emitOp<uint32_t>(OP_GetGlobalUncheckedSint16, A0, L); |
12815 | } |
12816 | bool ByteCodeEmitter::emitGetGlobalUncheckedUint16( uint32_t A0, const SourceInfo &L) { |
12817 | return emitOp<uint32_t>(OP_GetGlobalUncheckedUint16, A0, L); |
12818 | } |
12819 | bool ByteCodeEmitter::emitGetGlobalUncheckedSint32( uint32_t A0, const SourceInfo &L) { |
12820 | return emitOp<uint32_t>(OP_GetGlobalUncheckedSint32, A0, L); |
12821 | } |
12822 | bool ByteCodeEmitter::emitGetGlobalUncheckedUint32( uint32_t A0, const SourceInfo &L) { |
12823 | return emitOp<uint32_t>(OP_GetGlobalUncheckedUint32, A0, L); |
12824 | } |
12825 | bool ByteCodeEmitter::emitGetGlobalUncheckedSint64( uint32_t A0, const SourceInfo &L) { |
12826 | return emitOp<uint32_t>(OP_GetGlobalUncheckedSint64, A0, L); |
12827 | } |
12828 | bool ByteCodeEmitter::emitGetGlobalUncheckedUint64( uint32_t A0, const SourceInfo &L) { |
12829 | return emitOp<uint32_t>(OP_GetGlobalUncheckedUint64, A0, L); |
12830 | } |
12831 | bool ByteCodeEmitter::emitGetGlobalUncheckedIntAP( uint32_t A0, const SourceInfo &L) { |
12832 | return emitOp<uint32_t>(OP_GetGlobalUncheckedIntAP, A0, L); |
12833 | } |
12834 | bool ByteCodeEmitter::emitGetGlobalUncheckedIntAPS( uint32_t A0, const SourceInfo &L) { |
12835 | return emitOp<uint32_t>(OP_GetGlobalUncheckedIntAPS, A0, L); |
12836 | } |
12837 | bool ByteCodeEmitter::emitGetGlobalUncheckedBool( uint32_t A0, const SourceInfo &L) { |
12838 | return emitOp<uint32_t>(OP_GetGlobalUncheckedBool, A0, L); |
12839 | } |
12840 | bool ByteCodeEmitter::emitGetGlobalUncheckedPtr( uint32_t A0, const SourceInfo &L) { |
12841 | return emitOp<uint32_t>(OP_GetGlobalUncheckedPtr, A0, L); |
12842 | } |
12843 | bool ByteCodeEmitter::emitGetGlobalUncheckedFnPtr( uint32_t A0, const SourceInfo &L) { |
12844 | return emitOp<uint32_t>(OP_GetGlobalUncheckedFnPtr, A0, L); |
12845 | } |
12846 | bool ByteCodeEmitter::emitGetGlobalUncheckedMemberPtr( uint32_t A0, const SourceInfo &L) { |
12847 | return emitOp<uint32_t>(OP_GetGlobalUncheckedMemberPtr, A0, L); |
12848 | } |
12849 | bool ByteCodeEmitter::emitGetGlobalUncheckedFloat( uint32_t A0, const SourceInfo &L) { |
12850 | return emitOp<uint32_t>(OP_GetGlobalUncheckedFloat, A0, L); |
12851 | } |
12852 | #endif |
12853 | #ifdef GET_EVAL_IMPL |
12854 | bool EvalEmitter::emitGetGlobalUncheckedSint8( uint32_t A0, const SourceInfo &L) { |
12855 | if (!isActive()) return true; |
12856 | CurrentSource = L; |
12857 | return GetGlobalUnchecked<PT_Sint8>(S, OpPC, A0); |
12858 | } |
12859 | bool EvalEmitter::emitGetGlobalUncheckedUint8( uint32_t A0, const SourceInfo &L) { |
12860 | if (!isActive()) return true; |
12861 | CurrentSource = L; |
12862 | return GetGlobalUnchecked<PT_Uint8>(S, OpPC, A0); |
12863 | } |
12864 | bool EvalEmitter::emitGetGlobalUncheckedSint16( uint32_t A0, const SourceInfo &L) { |
12865 | if (!isActive()) return true; |
12866 | CurrentSource = L; |
12867 | return GetGlobalUnchecked<PT_Sint16>(S, OpPC, A0); |
12868 | } |
12869 | bool EvalEmitter::emitGetGlobalUncheckedUint16( uint32_t A0, const SourceInfo &L) { |
12870 | if (!isActive()) return true; |
12871 | CurrentSource = L; |
12872 | return GetGlobalUnchecked<PT_Uint16>(S, OpPC, A0); |
12873 | } |
12874 | bool EvalEmitter::emitGetGlobalUncheckedSint32( uint32_t A0, const SourceInfo &L) { |
12875 | if (!isActive()) return true; |
12876 | CurrentSource = L; |
12877 | return GetGlobalUnchecked<PT_Sint32>(S, OpPC, A0); |
12878 | } |
12879 | bool EvalEmitter::emitGetGlobalUncheckedUint32( uint32_t A0, const SourceInfo &L) { |
12880 | if (!isActive()) return true; |
12881 | CurrentSource = L; |
12882 | return GetGlobalUnchecked<PT_Uint32>(S, OpPC, A0); |
12883 | } |
12884 | bool EvalEmitter::emitGetGlobalUncheckedSint64( uint32_t A0, const SourceInfo &L) { |
12885 | if (!isActive()) return true; |
12886 | CurrentSource = L; |
12887 | return GetGlobalUnchecked<PT_Sint64>(S, OpPC, A0); |
12888 | } |
12889 | bool EvalEmitter::emitGetGlobalUncheckedUint64( uint32_t A0, const SourceInfo &L) { |
12890 | if (!isActive()) return true; |
12891 | CurrentSource = L; |
12892 | return GetGlobalUnchecked<PT_Uint64>(S, OpPC, A0); |
12893 | } |
12894 | bool EvalEmitter::emitGetGlobalUncheckedIntAP( uint32_t A0, const SourceInfo &L) { |
12895 | if (!isActive()) return true; |
12896 | CurrentSource = L; |
12897 | return GetGlobalUnchecked<PT_IntAP>(S, OpPC, A0); |
12898 | } |
12899 | bool EvalEmitter::emitGetGlobalUncheckedIntAPS( uint32_t A0, const SourceInfo &L) { |
12900 | if (!isActive()) return true; |
12901 | CurrentSource = L; |
12902 | return GetGlobalUnchecked<PT_IntAPS>(S, OpPC, A0); |
12903 | } |
12904 | bool EvalEmitter::emitGetGlobalUncheckedBool( uint32_t A0, const SourceInfo &L) { |
12905 | if (!isActive()) return true; |
12906 | CurrentSource = L; |
12907 | return GetGlobalUnchecked<PT_Bool>(S, OpPC, A0); |
12908 | } |
12909 | bool EvalEmitter::emitGetGlobalUncheckedPtr( uint32_t A0, const SourceInfo &L) { |
12910 | if (!isActive()) return true; |
12911 | CurrentSource = L; |
12912 | return GetGlobalUnchecked<PT_Ptr>(S, OpPC, A0); |
12913 | } |
12914 | bool EvalEmitter::emitGetGlobalUncheckedFnPtr( uint32_t A0, const SourceInfo &L) { |
12915 | if (!isActive()) return true; |
12916 | CurrentSource = L; |
12917 | return GetGlobalUnchecked<PT_FnPtr>(S, OpPC, A0); |
12918 | } |
12919 | bool EvalEmitter::emitGetGlobalUncheckedMemberPtr( uint32_t A0, const SourceInfo &L) { |
12920 | if (!isActive()) return true; |
12921 | CurrentSource = L; |
12922 | return GetGlobalUnchecked<PT_MemberPtr>(S, OpPC, A0); |
12923 | } |
12924 | bool EvalEmitter::emitGetGlobalUncheckedFloat( uint32_t A0, const SourceInfo &L) { |
12925 | if (!isActive()) return true; |
12926 | CurrentSource = L; |
12927 | return GetGlobalUnchecked<PT_Float>(S, OpPC, A0); |
12928 | } |
12929 | #endif |
12930 | #ifdef GET_OPCODE_NAMES |
12931 | OP_GetIntPtrSint8, |
12932 | OP_GetIntPtrUint8, |
12933 | OP_GetIntPtrSint16, |
12934 | OP_GetIntPtrUint16, |
12935 | OP_GetIntPtrSint32, |
12936 | OP_GetIntPtrUint32, |
12937 | OP_GetIntPtrSint64, |
12938 | OP_GetIntPtrUint64, |
12939 | OP_GetIntPtrIntAP, |
12940 | OP_GetIntPtrIntAPS, |
12941 | OP_GetIntPtrBool, |
12942 | #endif |
12943 | #ifdef GET_INTERP |
12944 | case OP_GetIntPtrSint8: { |
12945 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12946 | if (!GetIntPtr<PT_Sint8>(S, OpPC, V0)) |
12947 | return false; |
12948 | continue; |
12949 | } |
12950 | case OP_GetIntPtrUint8: { |
12951 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12952 | if (!GetIntPtr<PT_Uint8>(S, OpPC, V0)) |
12953 | return false; |
12954 | continue; |
12955 | } |
12956 | case OP_GetIntPtrSint16: { |
12957 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12958 | if (!GetIntPtr<PT_Sint16>(S, OpPC, V0)) |
12959 | return false; |
12960 | continue; |
12961 | } |
12962 | case OP_GetIntPtrUint16: { |
12963 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12964 | if (!GetIntPtr<PT_Uint16>(S, OpPC, V0)) |
12965 | return false; |
12966 | continue; |
12967 | } |
12968 | case OP_GetIntPtrSint32: { |
12969 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12970 | if (!GetIntPtr<PT_Sint32>(S, OpPC, V0)) |
12971 | return false; |
12972 | continue; |
12973 | } |
12974 | case OP_GetIntPtrUint32: { |
12975 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12976 | if (!GetIntPtr<PT_Uint32>(S, OpPC, V0)) |
12977 | return false; |
12978 | continue; |
12979 | } |
12980 | case OP_GetIntPtrSint64: { |
12981 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12982 | if (!GetIntPtr<PT_Sint64>(S, OpPC, V0)) |
12983 | return false; |
12984 | continue; |
12985 | } |
12986 | case OP_GetIntPtrUint64: { |
12987 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12988 | if (!GetIntPtr<PT_Uint64>(S, OpPC, V0)) |
12989 | return false; |
12990 | continue; |
12991 | } |
12992 | case OP_GetIntPtrIntAP: { |
12993 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
12994 | if (!GetIntPtr<PT_IntAP>(S, OpPC, V0)) |
12995 | return false; |
12996 | continue; |
12997 | } |
12998 | case OP_GetIntPtrIntAPS: { |
12999 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
13000 | if (!GetIntPtr<PT_IntAPS>(S, OpPC, V0)) |
13001 | return false; |
13002 | continue; |
13003 | } |
13004 | case OP_GetIntPtrBool: { |
13005 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
13006 | if (!GetIntPtr<PT_Bool>(S, OpPC, V0)) |
13007 | return false; |
13008 | continue; |
13009 | } |
13010 | #endif |
13011 | #ifdef GET_DISASM |
13012 | case OP_GetIntPtrSint8: |
13013 | PrintName("GetIntPtrSint8" ); |
13014 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13015 | continue; |
13016 | case OP_GetIntPtrUint8: |
13017 | PrintName("GetIntPtrUint8" ); |
13018 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13019 | continue; |
13020 | case OP_GetIntPtrSint16: |
13021 | PrintName("GetIntPtrSint16" ); |
13022 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13023 | continue; |
13024 | case OP_GetIntPtrUint16: |
13025 | PrintName("GetIntPtrUint16" ); |
13026 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13027 | continue; |
13028 | case OP_GetIntPtrSint32: |
13029 | PrintName("GetIntPtrSint32" ); |
13030 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13031 | continue; |
13032 | case OP_GetIntPtrUint32: |
13033 | PrintName("GetIntPtrUint32" ); |
13034 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13035 | continue; |
13036 | case OP_GetIntPtrSint64: |
13037 | PrintName("GetIntPtrSint64" ); |
13038 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13039 | continue; |
13040 | case OP_GetIntPtrUint64: |
13041 | PrintName("GetIntPtrUint64" ); |
13042 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13043 | continue; |
13044 | case OP_GetIntPtrIntAP: |
13045 | PrintName("GetIntPtrIntAP" ); |
13046 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13047 | continue; |
13048 | case OP_GetIntPtrIntAPS: |
13049 | PrintName("GetIntPtrIntAPS" ); |
13050 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13051 | continue; |
13052 | case OP_GetIntPtrBool: |
13053 | PrintName("GetIntPtrBool" ); |
13054 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
13055 | continue; |
13056 | #endif |
13057 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13058 | bool emitGetIntPtrSint8( const Descriptor * , const SourceInfo &); |
13059 | bool emitGetIntPtrUint8( const Descriptor * , const SourceInfo &); |
13060 | bool emitGetIntPtrSint16( const Descriptor * , const SourceInfo &); |
13061 | bool emitGetIntPtrUint16( const Descriptor * , const SourceInfo &); |
13062 | bool emitGetIntPtrSint32( const Descriptor * , const SourceInfo &); |
13063 | bool emitGetIntPtrUint32( const Descriptor * , const SourceInfo &); |
13064 | bool emitGetIntPtrSint64( const Descriptor * , const SourceInfo &); |
13065 | bool emitGetIntPtrUint64( const Descriptor * , const SourceInfo &); |
13066 | bool emitGetIntPtrIntAP( const Descriptor * , const SourceInfo &); |
13067 | bool emitGetIntPtrIntAPS( const Descriptor * , const SourceInfo &); |
13068 | bool emitGetIntPtrBool( const Descriptor * , const SourceInfo &); |
13069 | #endif |
13070 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13071 | [[nodiscard]] bool emitGetIntPtr(PrimType, const Descriptor *, const SourceInfo &I); |
13072 | #endif |
13073 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
13074 | bool |
13075 | #if defined(GET_EVAL_IMPL) |
13076 | EvalEmitter |
13077 | #else |
13078 | ByteCodeEmitter |
13079 | #endif |
13080 | ::emitGetIntPtr(PrimType T0, const Descriptor * A0, const SourceInfo &I) { |
13081 | switch (T0) { |
13082 | case PT_Sint8: |
13083 | return emitGetIntPtrSint8(A0, I); |
13084 | case PT_Uint8: |
13085 | return emitGetIntPtrUint8(A0, I); |
13086 | case PT_Sint16: |
13087 | return emitGetIntPtrSint16(A0, I); |
13088 | case PT_Uint16: |
13089 | return emitGetIntPtrUint16(A0, I); |
13090 | case PT_Sint32: |
13091 | return emitGetIntPtrSint32(A0, I); |
13092 | case PT_Uint32: |
13093 | return emitGetIntPtrUint32(A0, I); |
13094 | case PT_Sint64: |
13095 | return emitGetIntPtrSint64(A0, I); |
13096 | case PT_Uint64: |
13097 | return emitGetIntPtrUint64(A0, I); |
13098 | case PT_IntAP: |
13099 | return emitGetIntPtrIntAP(A0, I); |
13100 | case PT_IntAPS: |
13101 | return emitGetIntPtrIntAPS(A0, I); |
13102 | case PT_Bool: |
13103 | return emitGetIntPtrBool(A0, I); |
13104 | default: llvm_unreachable("invalid type: emitGetIntPtr" ); |
13105 | } |
13106 | llvm_unreachable("invalid enum value" ); |
13107 | } |
13108 | #endif |
13109 | #ifdef GET_LINK_IMPL |
13110 | bool ByteCodeEmitter::emitGetIntPtrSint8( const Descriptor * A0, const SourceInfo &L) { |
13111 | return emitOp<const Descriptor *>(OP_GetIntPtrSint8, A0, L); |
13112 | } |
13113 | bool ByteCodeEmitter::emitGetIntPtrUint8( const Descriptor * A0, const SourceInfo &L) { |
13114 | return emitOp<const Descriptor *>(OP_GetIntPtrUint8, A0, L); |
13115 | } |
13116 | bool ByteCodeEmitter::emitGetIntPtrSint16( const Descriptor * A0, const SourceInfo &L) { |
13117 | return emitOp<const Descriptor *>(OP_GetIntPtrSint16, A0, L); |
13118 | } |
13119 | bool ByteCodeEmitter::emitGetIntPtrUint16( const Descriptor * A0, const SourceInfo &L) { |
13120 | return emitOp<const Descriptor *>(OP_GetIntPtrUint16, A0, L); |
13121 | } |
13122 | bool ByteCodeEmitter::emitGetIntPtrSint32( const Descriptor * A0, const SourceInfo &L) { |
13123 | return emitOp<const Descriptor *>(OP_GetIntPtrSint32, A0, L); |
13124 | } |
13125 | bool ByteCodeEmitter::emitGetIntPtrUint32( const Descriptor * A0, const SourceInfo &L) { |
13126 | return emitOp<const Descriptor *>(OP_GetIntPtrUint32, A0, L); |
13127 | } |
13128 | bool ByteCodeEmitter::emitGetIntPtrSint64( const Descriptor * A0, const SourceInfo &L) { |
13129 | return emitOp<const Descriptor *>(OP_GetIntPtrSint64, A0, L); |
13130 | } |
13131 | bool ByteCodeEmitter::emitGetIntPtrUint64( const Descriptor * A0, const SourceInfo &L) { |
13132 | return emitOp<const Descriptor *>(OP_GetIntPtrUint64, A0, L); |
13133 | } |
13134 | bool ByteCodeEmitter::emitGetIntPtrIntAP( const Descriptor * A0, const SourceInfo &L) { |
13135 | return emitOp<const Descriptor *>(OP_GetIntPtrIntAP, A0, L); |
13136 | } |
13137 | bool ByteCodeEmitter::emitGetIntPtrIntAPS( const Descriptor * A0, const SourceInfo &L) { |
13138 | return emitOp<const Descriptor *>(OP_GetIntPtrIntAPS, A0, L); |
13139 | } |
13140 | bool ByteCodeEmitter::emitGetIntPtrBool( const Descriptor * A0, const SourceInfo &L) { |
13141 | return emitOp<const Descriptor *>(OP_GetIntPtrBool, A0, L); |
13142 | } |
13143 | #endif |
13144 | #ifdef GET_EVAL_IMPL |
13145 | bool EvalEmitter::emitGetIntPtrSint8( const Descriptor * A0, const SourceInfo &L) { |
13146 | if (!isActive()) return true; |
13147 | CurrentSource = L; |
13148 | return GetIntPtr<PT_Sint8>(S, OpPC, A0); |
13149 | } |
13150 | bool EvalEmitter::emitGetIntPtrUint8( const Descriptor * A0, const SourceInfo &L) { |
13151 | if (!isActive()) return true; |
13152 | CurrentSource = L; |
13153 | return GetIntPtr<PT_Uint8>(S, OpPC, A0); |
13154 | } |
13155 | bool EvalEmitter::emitGetIntPtrSint16( const Descriptor * A0, const SourceInfo &L) { |
13156 | if (!isActive()) return true; |
13157 | CurrentSource = L; |
13158 | return GetIntPtr<PT_Sint16>(S, OpPC, A0); |
13159 | } |
13160 | bool EvalEmitter::emitGetIntPtrUint16( const Descriptor * A0, const SourceInfo &L) { |
13161 | if (!isActive()) return true; |
13162 | CurrentSource = L; |
13163 | return GetIntPtr<PT_Uint16>(S, OpPC, A0); |
13164 | } |
13165 | bool EvalEmitter::emitGetIntPtrSint32( const Descriptor * A0, const SourceInfo &L) { |
13166 | if (!isActive()) return true; |
13167 | CurrentSource = L; |
13168 | return GetIntPtr<PT_Sint32>(S, OpPC, A0); |
13169 | } |
13170 | bool EvalEmitter::emitGetIntPtrUint32( const Descriptor * A0, const SourceInfo &L) { |
13171 | if (!isActive()) return true; |
13172 | CurrentSource = L; |
13173 | return GetIntPtr<PT_Uint32>(S, OpPC, A0); |
13174 | } |
13175 | bool EvalEmitter::emitGetIntPtrSint64( const Descriptor * A0, const SourceInfo &L) { |
13176 | if (!isActive()) return true; |
13177 | CurrentSource = L; |
13178 | return GetIntPtr<PT_Sint64>(S, OpPC, A0); |
13179 | } |
13180 | bool EvalEmitter::emitGetIntPtrUint64( const Descriptor * A0, const SourceInfo &L) { |
13181 | if (!isActive()) return true; |
13182 | CurrentSource = L; |
13183 | return GetIntPtr<PT_Uint64>(S, OpPC, A0); |
13184 | } |
13185 | bool EvalEmitter::emitGetIntPtrIntAP( const Descriptor * A0, const SourceInfo &L) { |
13186 | if (!isActive()) return true; |
13187 | CurrentSource = L; |
13188 | return GetIntPtr<PT_IntAP>(S, OpPC, A0); |
13189 | } |
13190 | bool EvalEmitter::emitGetIntPtrIntAPS( const Descriptor * A0, const SourceInfo &L) { |
13191 | if (!isActive()) return true; |
13192 | CurrentSource = L; |
13193 | return GetIntPtr<PT_IntAPS>(S, OpPC, A0); |
13194 | } |
13195 | bool EvalEmitter::emitGetIntPtrBool( const Descriptor * A0, const SourceInfo &L) { |
13196 | if (!isActive()) return true; |
13197 | CurrentSource = L; |
13198 | return GetIntPtr<PT_Bool>(S, OpPC, A0); |
13199 | } |
13200 | #endif |
13201 | #ifdef GET_OPCODE_NAMES |
13202 | OP_GetLocalSint8, |
13203 | OP_GetLocalUint8, |
13204 | OP_GetLocalSint16, |
13205 | OP_GetLocalUint16, |
13206 | OP_GetLocalSint32, |
13207 | OP_GetLocalUint32, |
13208 | OP_GetLocalSint64, |
13209 | OP_GetLocalUint64, |
13210 | OP_GetLocalIntAP, |
13211 | OP_GetLocalIntAPS, |
13212 | OP_GetLocalBool, |
13213 | OP_GetLocalPtr, |
13214 | OP_GetLocalFnPtr, |
13215 | OP_GetLocalMemberPtr, |
13216 | OP_GetLocalFloat, |
13217 | #endif |
13218 | #ifdef GET_INTERP |
13219 | case OP_GetLocalSint8: { |
13220 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13221 | if (!GetLocal<PT_Sint8>(S, OpPC, V0)) |
13222 | return false; |
13223 | continue; |
13224 | } |
13225 | case OP_GetLocalUint8: { |
13226 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13227 | if (!GetLocal<PT_Uint8>(S, OpPC, V0)) |
13228 | return false; |
13229 | continue; |
13230 | } |
13231 | case OP_GetLocalSint16: { |
13232 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13233 | if (!GetLocal<PT_Sint16>(S, OpPC, V0)) |
13234 | return false; |
13235 | continue; |
13236 | } |
13237 | case OP_GetLocalUint16: { |
13238 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13239 | if (!GetLocal<PT_Uint16>(S, OpPC, V0)) |
13240 | return false; |
13241 | continue; |
13242 | } |
13243 | case OP_GetLocalSint32: { |
13244 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13245 | if (!GetLocal<PT_Sint32>(S, OpPC, V0)) |
13246 | return false; |
13247 | continue; |
13248 | } |
13249 | case OP_GetLocalUint32: { |
13250 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13251 | if (!GetLocal<PT_Uint32>(S, OpPC, V0)) |
13252 | return false; |
13253 | continue; |
13254 | } |
13255 | case OP_GetLocalSint64: { |
13256 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13257 | if (!GetLocal<PT_Sint64>(S, OpPC, V0)) |
13258 | return false; |
13259 | continue; |
13260 | } |
13261 | case OP_GetLocalUint64: { |
13262 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13263 | if (!GetLocal<PT_Uint64>(S, OpPC, V0)) |
13264 | return false; |
13265 | continue; |
13266 | } |
13267 | case OP_GetLocalIntAP: { |
13268 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13269 | if (!GetLocal<PT_IntAP>(S, OpPC, V0)) |
13270 | return false; |
13271 | continue; |
13272 | } |
13273 | case OP_GetLocalIntAPS: { |
13274 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13275 | if (!GetLocal<PT_IntAPS>(S, OpPC, V0)) |
13276 | return false; |
13277 | continue; |
13278 | } |
13279 | case OP_GetLocalBool: { |
13280 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13281 | if (!GetLocal<PT_Bool>(S, OpPC, V0)) |
13282 | return false; |
13283 | continue; |
13284 | } |
13285 | case OP_GetLocalPtr: { |
13286 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13287 | if (!GetLocal<PT_Ptr>(S, OpPC, V0)) |
13288 | return false; |
13289 | continue; |
13290 | } |
13291 | case OP_GetLocalFnPtr: { |
13292 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13293 | if (!GetLocal<PT_FnPtr>(S, OpPC, V0)) |
13294 | return false; |
13295 | continue; |
13296 | } |
13297 | case OP_GetLocalMemberPtr: { |
13298 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13299 | if (!GetLocal<PT_MemberPtr>(S, OpPC, V0)) |
13300 | return false; |
13301 | continue; |
13302 | } |
13303 | case OP_GetLocalFloat: { |
13304 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13305 | if (!GetLocal<PT_Float>(S, OpPC, V0)) |
13306 | return false; |
13307 | continue; |
13308 | } |
13309 | #endif |
13310 | #ifdef GET_DISASM |
13311 | case OP_GetLocalSint8: |
13312 | PrintName("GetLocalSint8" ); |
13313 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13314 | continue; |
13315 | case OP_GetLocalUint8: |
13316 | PrintName("GetLocalUint8" ); |
13317 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13318 | continue; |
13319 | case OP_GetLocalSint16: |
13320 | PrintName("GetLocalSint16" ); |
13321 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13322 | continue; |
13323 | case OP_GetLocalUint16: |
13324 | PrintName("GetLocalUint16" ); |
13325 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13326 | continue; |
13327 | case OP_GetLocalSint32: |
13328 | PrintName("GetLocalSint32" ); |
13329 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13330 | continue; |
13331 | case OP_GetLocalUint32: |
13332 | PrintName("GetLocalUint32" ); |
13333 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13334 | continue; |
13335 | case OP_GetLocalSint64: |
13336 | PrintName("GetLocalSint64" ); |
13337 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13338 | continue; |
13339 | case OP_GetLocalUint64: |
13340 | PrintName("GetLocalUint64" ); |
13341 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13342 | continue; |
13343 | case OP_GetLocalIntAP: |
13344 | PrintName("GetLocalIntAP" ); |
13345 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13346 | continue; |
13347 | case OP_GetLocalIntAPS: |
13348 | PrintName("GetLocalIntAPS" ); |
13349 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13350 | continue; |
13351 | case OP_GetLocalBool: |
13352 | PrintName("GetLocalBool" ); |
13353 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13354 | continue; |
13355 | case OP_GetLocalPtr: |
13356 | PrintName("GetLocalPtr" ); |
13357 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13358 | continue; |
13359 | case OP_GetLocalFnPtr: |
13360 | PrintName("GetLocalFnPtr" ); |
13361 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13362 | continue; |
13363 | case OP_GetLocalMemberPtr: |
13364 | PrintName("GetLocalMemberPtr" ); |
13365 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13366 | continue; |
13367 | case OP_GetLocalFloat: |
13368 | PrintName("GetLocalFloat" ); |
13369 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13370 | continue; |
13371 | #endif |
13372 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13373 | bool emitGetLocalSint8( uint32_t , const SourceInfo &); |
13374 | bool emitGetLocalUint8( uint32_t , const SourceInfo &); |
13375 | bool emitGetLocalSint16( uint32_t , const SourceInfo &); |
13376 | bool emitGetLocalUint16( uint32_t , const SourceInfo &); |
13377 | bool emitGetLocalSint32( uint32_t , const SourceInfo &); |
13378 | bool emitGetLocalUint32( uint32_t , const SourceInfo &); |
13379 | bool emitGetLocalSint64( uint32_t , const SourceInfo &); |
13380 | bool emitGetLocalUint64( uint32_t , const SourceInfo &); |
13381 | bool emitGetLocalIntAP( uint32_t , const SourceInfo &); |
13382 | bool emitGetLocalIntAPS( uint32_t , const SourceInfo &); |
13383 | bool emitGetLocalBool( uint32_t , const SourceInfo &); |
13384 | bool emitGetLocalPtr( uint32_t , const SourceInfo &); |
13385 | bool emitGetLocalFnPtr( uint32_t , const SourceInfo &); |
13386 | bool emitGetLocalMemberPtr( uint32_t , const SourceInfo &); |
13387 | bool emitGetLocalFloat( uint32_t , const SourceInfo &); |
13388 | #if defined(GET_EVAL_PROTO) |
13389 | template<PrimType> |
13390 | bool emitGetLocal(uint32_t, const SourceInfo &); |
13391 | #endif |
13392 | #endif |
13393 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13394 | [[nodiscard]] bool emitGetLocal(PrimType, uint32_t, const SourceInfo &I); |
13395 | #endif |
13396 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
13397 | bool |
13398 | #if defined(GET_EVAL_IMPL) |
13399 | EvalEmitter |
13400 | #else |
13401 | ByteCodeEmitter |
13402 | #endif |
13403 | ::emitGetLocal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
13404 | switch (T0) { |
13405 | case PT_Sint8: |
13406 | #ifdef GET_LINK_IMPL |
13407 | return emitGetLocalSint8 |
13408 | #else |
13409 | return emitGetLocal<PT_Sint8> |
13410 | #endif |
13411 | (A0, I); |
13412 | case PT_Uint8: |
13413 | #ifdef GET_LINK_IMPL |
13414 | return emitGetLocalUint8 |
13415 | #else |
13416 | return emitGetLocal<PT_Uint8> |
13417 | #endif |
13418 | (A0, I); |
13419 | case PT_Sint16: |
13420 | #ifdef GET_LINK_IMPL |
13421 | return emitGetLocalSint16 |
13422 | #else |
13423 | return emitGetLocal<PT_Sint16> |
13424 | #endif |
13425 | (A0, I); |
13426 | case PT_Uint16: |
13427 | #ifdef GET_LINK_IMPL |
13428 | return emitGetLocalUint16 |
13429 | #else |
13430 | return emitGetLocal<PT_Uint16> |
13431 | #endif |
13432 | (A0, I); |
13433 | case PT_Sint32: |
13434 | #ifdef GET_LINK_IMPL |
13435 | return emitGetLocalSint32 |
13436 | #else |
13437 | return emitGetLocal<PT_Sint32> |
13438 | #endif |
13439 | (A0, I); |
13440 | case PT_Uint32: |
13441 | #ifdef GET_LINK_IMPL |
13442 | return emitGetLocalUint32 |
13443 | #else |
13444 | return emitGetLocal<PT_Uint32> |
13445 | #endif |
13446 | (A0, I); |
13447 | case PT_Sint64: |
13448 | #ifdef GET_LINK_IMPL |
13449 | return emitGetLocalSint64 |
13450 | #else |
13451 | return emitGetLocal<PT_Sint64> |
13452 | #endif |
13453 | (A0, I); |
13454 | case PT_Uint64: |
13455 | #ifdef GET_LINK_IMPL |
13456 | return emitGetLocalUint64 |
13457 | #else |
13458 | return emitGetLocal<PT_Uint64> |
13459 | #endif |
13460 | (A0, I); |
13461 | case PT_IntAP: |
13462 | #ifdef GET_LINK_IMPL |
13463 | return emitGetLocalIntAP |
13464 | #else |
13465 | return emitGetLocal<PT_IntAP> |
13466 | #endif |
13467 | (A0, I); |
13468 | case PT_IntAPS: |
13469 | #ifdef GET_LINK_IMPL |
13470 | return emitGetLocalIntAPS |
13471 | #else |
13472 | return emitGetLocal<PT_IntAPS> |
13473 | #endif |
13474 | (A0, I); |
13475 | case PT_Bool: |
13476 | #ifdef GET_LINK_IMPL |
13477 | return emitGetLocalBool |
13478 | #else |
13479 | return emitGetLocal<PT_Bool> |
13480 | #endif |
13481 | (A0, I); |
13482 | case PT_Ptr: |
13483 | #ifdef GET_LINK_IMPL |
13484 | return emitGetLocalPtr |
13485 | #else |
13486 | return emitGetLocal<PT_Ptr> |
13487 | #endif |
13488 | (A0, I); |
13489 | case PT_FnPtr: |
13490 | #ifdef GET_LINK_IMPL |
13491 | return emitGetLocalFnPtr |
13492 | #else |
13493 | return emitGetLocal<PT_FnPtr> |
13494 | #endif |
13495 | (A0, I); |
13496 | case PT_MemberPtr: |
13497 | #ifdef GET_LINK_IMPL |
13498 | return emitGetLocalMemberPtr |
13499 | #else |
13500 | return emitGetLocal<PT_MemberPtr> |
13501 | #endif |
13502 | (A0, I); |
13503 | case PT_Float: |
13504 | #ifdef GET_LINK_IMPL |
13505 | return emitGetLocalFloat |
13506 | #else |
13507 | return emitGetLocal<PT_Float> |
13508 | #endif |
13509 | (A0, I); |
13510 | } |
13511 | llvm_unreachable("invalid enum value" ); |
13512 | } |
13513 | #endif |
13514 | #ifdef GET_LINK_IMPL |
13515 | bool ByteCodeEmitter::emitGetLocalSint8( uint32_t A0, const SourceInfo &L) { |
13516 | return emitOp<uint32_t>(OP_GetLocalSint8, A0, L); |
13517 | } |
13518 | bool ByteCodeEmitter::emitGetLocalUint8( uint32_t A0, const SourceInfo &L) { |
13519 | return emitOp<uint32_t>(OP_GetLocalUint8, A0, L); |
13520 | } |
13521 | bool ByteCodeEmitter::emitGetLocalSint16( uint32_t A0, const SourceInfo &L) { |
13522 | return emitOp<uint32_t>(OP_GetLocalSint16, A0, L); |
13523 | } |
13524 | bool ByteCodeEmitter::emitGetLocalUint16( uint32_t A0, const SourceInfo &L) { |
13525 | return emitOp<uint32_t>(OP_GetLocalUint16, A0, L); |
13526 | } |
13527 | bool ByteCodeEmitter::emitGetLocalSint32( uint32_t A0, const SourceInfo &L) { |
13528 | return emitOp<uint32_t>(OP_GetLocalSint32, A0, L); |
13529 | } |
13530 | bool ByteCodeEmitter::emitGetLocalUint32( uint32_t A0, const SourceInfo &L) { |
13531 | return emitOp<uint32_t>(OP_GetLocalUint32, A0, L); |
13532 | } |
13533 | bool ByteCodeEmitter::emitGetLocalSint64( uint32_t A0, const SourceInfo &L) { |
13534 | return emitOp<uint32_t>(OP_GetLocalSint64, A0, L); |
13535 | } |
13536 | bool ByteCodeEmitter::emitGetLocalUint64( uint32_t A0, const SourceInfo &L) { |
13537 | return emitOp<uint32_t>(OP_GetLocalUint64, A0, L); |
13538 | } |
13539 | bool ByteCodeEmitter::emitGetLocalIntAP( uint32_t A0, const SourceInfo &L) { |
13540 | return emitOp<uint32_t>(OP_GetLocalIntAP, A0, L); |
13541 | } |
13542 | bool ByteCodeEmitter::emitGetLocalIntAPS( uint32_t A0, const SourceInfo &L) { |
13543 | return emitOp<uint32_t>(OP_GetLocalIntAPS, A0, L); |
13544 | } |
13545 | bool ByteCodeEmitter::emitGetLocalBool( uint32_t A0, const SourceInfo &L) { |
13546 | return emitOp<uint32_t>(OP_GetLocalBool, A0, L); |
13547 | } |
13548 | bool ByteCodeEmitter::emitGetLocalPtr( uint32_t A0, const SourceInfo &L) { |
13549 | return emitOp<uint32_t>(OP_GetLocalPtr, A0, L); |
13550 | } |
13551 | bool ByteCodeEmitter::emitGetLocalFnPtr( uint32_t A0, const SourceInfo &L) { |
13552 | return emitOp<uint32_t>(OP_GetLocalFnPtr, A0, L); |
13553 | } |
13554 | bool ByteCodeEmitter::emitGetLocalMemberPtr( uint32_t A0, const SourceInfo &L) { |
13555 | return emitOp<uint32_t>(OP_GetLocalMemberPtr, A0, L); |
13556 | } |
13557 | bool ByteCodeEmitter::emitGetLocalFloat( uint32_t A0, const SourceInfo &L) { |
13558 | return emitOp<uint32_t>(OP_GetLocalFloat, A0, L); |
13559 | } |
13560 | #endif |
13561 | #ifdef GET_OPCODE_NAMES |
13562 | OP_GetMemberPtr, |
13563 | #endif |
13564 | #ifdef GET_INTERP |
13565 | case OP_GetMemberPtr: { |
13566 | const auto V0 = ReadArg<const Decl*>(S, PC); |
13567 | if (!GetMemberPtr(S, OpPC, V0)) |
13568 | return false; |
13569 | continue; |
13570 | } |
13571 | #endif |
13572 | #ifdef GET_DISASM |
13573 | case OP_GetMemberPtr: |
13574 | PrintName("GetMemberPtr" ); |
13575 | OS << "\t" << ReadArg<const Decl*>(P, PC) << " " << "\n" ; |
13576 | continue; |
13577 | #endif |
13578 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13579 | bool emitGetMemberPtr( const Decl* , const SourceInfo &); |
13580 | #endif |
13581 | #ifdef GET_LINK_IMPL |
13582 | bool ByteCodeEmitter::emitGetMemberPtr( const Decl* A0, const SourceInfo &L) { |
13583 | return emitOp<const Decl*>(OP_GetMemberPtr, A0, L); |
13584 | } |
13585 | #endif |
13586 | #ifdef GET_EVAL_IMPL |
13587 | bool EvalEmitter::emitGetMemberPtr( const Decl* A0, const SourceInfo &L) { |
13588 | if (!isActive()) return true; |
13589 | CurrentSource = L; |
13590 | return GetMemberPtr(S, OpPC, A0); |
13591 | } |
13592 | #endif |
13593 | #ifdef GET_OPCODE_NAMES |
13594 | OP_GetMemberPtrBase, |
13595 | #endif |
13596 | #ifdef GET_INTERP |
13597 | case OP_GetMemberPtrBase: { |
13598 | if (!GetMemberPtrBase(S, OpPC)) |
13599 | return false; |
13600 | continue; |
13601 | } |
13602 | #endif |
13603 | #ifdef GET_DISASM |
13604 | case OP_GetMemberPtrBase: |
13605 | PrintName("GetMemberPtrBase" ); |
13606 | OS << "\t" << "\n" ; |
13607 | continue; |
13608 | #endif |
13609 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13610 | bool emitGetMemberPtrBase(const SourceInfo &); |
13611 | #endif |
13612 | #ifdef GET_LINK_IMPL |
13613 | bool ByteCodeEmitter::emitGetMemberPtrBase(const SourceInfo &L) { |
13614 | return emitOp<>(OP_GetMemberPtrBase, L); |
13615 | } |
13616 | #endif |
13617 | #ifdef GET_EVAL_IMPL |
13618 | bool EvalEmitter::emitGetMemberPtrBase(const SourceInfo &L) { |
13619 | if (!isActive()) return true; |
13620 | CurrentSource = L; |
13621 | return GetMemberPtrBase(S, OpPC); |
13622 | } |
13623 | #endif |
13624 | #ifdef GET_OPCODE_NAMES |
13625 | OP_GetMemberPtrBasePop, |
13626 | #endif |
13627 | #ifdef GET_INTERP |
13628 | case OP_GetMemberPtrBasePop: { |
13629 | const auto V0 = ReadArg<int32_t>(S, PC); |
13630 | if (!GetMemberPtrBasePop(S, OpPC, V0)) |
13631 | return false; |
13632 | continue; |
13633 | } |
13634 | #endif |
13635 | #ifdef GET_DISASM |
13636 | case OP_GetMemberPtrBasePop: |
13637 | PrintName("GetMemberPtrBasePop" ); |
13638 | OS << "\t" << ReadArg<int32_t>(P, PC) << " " << "\n" ; |
13639 | continue; |
13640 | #endif |
13641 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13642 | bool emitGetMemberPtrBasePop( int32_t , const SourceInfo &); |
13643 | #endif |
13644 | #ifdef GET_LINK_IMPL |
13645 | bool ByteCodeEmitter::emitGetMemberPtrBasePop( int32_t A0, const SourceInfo &L) { |
13646 | return emitOp<int32_t>(OP_GetMemberPtrBasePop, A0, L); |
13647 | } |
13648 | #endif |
13649 | #ifdef GET_EVAL_IMPL |
13650 | bool EvalEmitter::emitGetMemberPtrBasePop( int32_t A0, const SourceInfo &L) { |
13651 | if (!isActive()) return true; |
13652 | CurrentSource = L; |
13653 | return GetMemberPtrBasePop(S, OpPC, A0); |
13654 | } |
13655 | #endif |
13656 | #ifdef GET_OPCODE_NAMES |
13657 | OP_GetMemberPtrDecl, |
13658 | #endif |
13659 | #ifdef GET_INTERP |
13660 | case OP_GetMemberPtrDecl: { |
13661 | if (!GetMemberPtrDecl(S, OpPC)) |
13662 | return false; |
13663 | continue; |
13664 | } |
13665 | #endif |
13666 | #ifdef GET_DISASM |
13667 | case OP_GetMemberPtrDecl: |
13668 | PrintName("GetMemberPtrDecl" ); |
13669 | OS << "\t" << "\n" ; |
13670 | continue; |
13671 | #endif |
13672 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13673 | bool emitGetMemberPtrDecl(const SourceInfo &); |
13674 | #endif |
13675 | #ifdef GET_LINK_IMPL |
13676 | bool ByteCodeEmitter::emitGetMemberPtrDecl(const SourceInfo &L) { |
13677 | return emitOp<>(OP_GetMemberPtrDecl, L); |
13678 | } |
13679 | #endif |
13680 | #ifdef GET_EVAL_IMPL |
13681 | bool EvalEmitter::emitGetMemberPtrDecl(const SourceInfo &L) { |
13682 | if (!isActive()) return true; |
13683 | CurrentSource = L; |
13684 | return GetMemberPtrDecl(S, OpPC); |
13685 | } |
13686 | #endif |
13687 | #ifdef GET_OPCODE_NAMES |
13688 | OP_GetParamSint8, |
13689 | OP_GetParamUint8, |
13690 | OP_GetParamSint16, |
13691 | OP_GetParamUint16, |
13692 | OP_GetParamSint32, |
13693 | OP_GetParamUint32, |
13694 | OP_GetParamSint64, |
13695 | OP_GetParamUint64, |
13696 | OP_GetParamIntAP, |
13697 | OP_GetParamIntAPS, |
13698 | OP_GetParamBool, |
13699 | OP_GetParamPtr, |
13700 | OP_GetParamFnPtr, |
13701 | OP_GetParamMemberPtr, |
13702 | OP_GetParamFloat, |
13703 | #endif |
13704 | #ifdef GET_INTERP |
13705 | case OP_GetParamSint8: { |
13706 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13707 | if (!GetParam<PT_Sint8>(S, OpPC, V0)) |
13708 | return false; |
13709 | continue; |
13710 | } |
13711 | case OP_GetParamUint8: { |
13712 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13713 | if (!GetParam<PT_Uint8>(S, OpPC, V0)) |
13714 | return false; |
13715 | continue; |
13716 | } |
13717 | case OP_GetParamSint16: { |
13718 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13719 | if (!GetParam<PT_Sint16>(S, OpPC, V0)) |
13720 | return false; |
13721 | continue; |
13722 | } |
13723 | case OP_GetParamUint16: { |
13724 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13725 | if (!GetParam<PT_Uint16>(S, OpPC, V0)) |
13726 | return false; |
13727 | continue; |
13728 | } |
13729 | case OP_GetParamSint32: { |
13730 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13731 | if (!GetParam<PT_Sint32>(S, OpPC, V0)) |
13732 | return false; |
13733 | continue; |
13734 | } |
13735 | case OP_GetParamUint32: { |
13736 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13737 | if (!GetParam<PT_Uint32>(S, OpPC, V0)) |
13738 | return false; |
13739 | continue; |
13740 | } |
13741 | case OP_GetParamSint64: { |
13742 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13743 | if (!GetParam<PT_Sint64>(S, OpPC, V0)) |
13744 | return false; |
13745 | continue; |
13746 | } |
13747 | case OP_GetParamUint64: { |
13748 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13749 | if (!GetParam<PT_Uint64>(S, OpPC, V0)) |
13750 | return false; |
13751 | continue; |
13752 | } |
13753 | case OP_GetParamIntAP: { |
13754 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13755 | if (!GetParam<PT_IntAP>(S, OpPC, V0)) |
13756 | return false; |
13757 | continue; |
13758 | } |
13759 | case OP_GetParamIntAPS: { |
13760 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13761 | if (!GetParam<PT_IntAPS>(S, OpPC, V0)) |
13762 | return false; |
13763 | continue; |
13764 | } |
13765 | case OP_GetParamBool: { |
13766 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13767 | if (!GetParam<PT_Bool>(S, OpPC, V0)) |
13768 | return false; |
13769 | continue; |
13770 | } |
13771 | case OP_GetParamPtr: { |
13772 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13773 | if (!GetParam<PT_Ptr>(S, OpPC, V0)) |
13774 | return false; |
13775 | continue; |
13776 | } |
13777 | case OP_GetParamFnPtr: { |
13778 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13779 | if (!GetParam<PT_FnPtr>(S, OpPC, V0)) |
13780 | return false; |
13781 | continue; |
13782 | } |
13783 | case OP_GetParamMemberPtr: { |
13784 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13785 | if (!GetParam<PT_MemberPtr>(S, OpPC, V0)) |
13786 | return false; |
13787 | continue; |
13788 | } |
13789 | case OP_GetParamFloat: { |
13790 | const auto V0 = ReadArg<uint32_t>(S, PC); |
13791 | if (!GetParam<PT_Float>(S, OpPC, V0)) |
13792 | return false; |
13793 | continue; |
13794 | } |
13795 | #endif |
13796 | #ifdef GET_DISASM |
13797 | case OP_GetParamSint8: |
13798 | PrintName("GetParamSint8" ); |
13799 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13800 | continue; |
13801 | case OP_GetParamUint8: |
13802 | PrintName("GetParamUint8" ); |
13803 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13804 | continue; |
13805 | case OP_GetParamSint16: |
13806 | PrintName("GetParamSint16" ); |
13807 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13808 | continue; |
13809 | case OP_GetParamUint16: |
13810 | PrintName("GetParamUint16" ); |
13811 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13812 | continue; |
13813 | case OP_GetParamSint32: |
13814 | PrintName("GetParamSint32" ); |
13815 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13816 | continue; |
13817 | case OP_GetParamUint32: |
13818 | PrintName("GetParamUint32" ); |
13819 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13820 | continue; |
13821 | case OP_GetParamSint64: |
13822 | PrintName("GetParamSint64" ); |
13823 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13824 | continue; |
13825 | case OP_GetParamUint64: |
13826 | PrintName("GetParamUint64" ); |
13827 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13828 | continue; |
13829 | case OP_GetParamIntAP: |
13830 | PrintName("GetParamIntAP" ); |
13831 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13832 | continue; |
13833 | case OP_GetParamIntAPS: |
13834 | PrintName("GetParamIntAPS" ); |
13835 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13836 | continue; |
13837 | case OP_GetParamBool: |
13838 | PrintName("GetParamBool" ); |
13839 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13840 | continue; |
13841 | case OP_GetParamPtr: |
13842 | PrintName("GetParamPtr" ); |
13843 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13844 | continue; |
13845 | case OP_GetParamFnPtr: |
13846 | PrintName("GetParamFnPtr" ); |
13847 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13848 | continue; |
13849 | case OP_GetParamMemberPtr: |
13850 | PrintName("GetParamMemberPtr" ); |
13851 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13852 | continue; |
13853 | case OP_GetParamFloat: |
13854 | PrintName("GetParamFloat" ); |
13855 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
13856 | continue; |
13857 | #endif |
13858 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13859 | bool emitGetParamSint8( uint32_t , const SourceInfo &); |
13860 | bool emitGetParamUint8( uint32_t , const SourceInfo &); |
13861 | bool emitGetParamSint16( uint32_t , const SourceInfo &); |
13862 | bool emitGetParamUint16( uint32_t , const SourceInfo &); |
13863 | bool emitGetParamSint32( uint32_t , const SourceInfo &); |
13864 | bool emitGetParamUint32( uint32_t , const SourceInfo &); |
13865 | bool emitGetParamSint64( uint32_t , const SourceInfo &); |
13866 | bool emitGetParamUint64( uint32_t , const SourceInfo &); |
13867 | bool emitGetParamIntAP( uint32_t , const SourceInfo &); |
13868 | bool emitGetParamIntAPS( uint32_t , const SourceInfo &); |
13869 | bool emitGetParamBool( uint32_t , const SourceInfo &); |
13870 | bool emitGetParamPtr( uint32_t , const SourceInfo &); |
13871 | bool emitGetParamFnPtr( uint32_t , const SourceInfo &); |
13872 | bool emitGetParamMemberPtr( uint32_t , const SourceInfo &); |
13873 | bool emitGetParamFloat( uint32_t , const SourceInfo &); |
13874 | #endif |
13875 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
13876 | [[nodiscard]] bool emitGetParam(PrimType, uint32_t, const SourceInfo &I); |
13877 | #endif |
13878 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
13879 | bool |
13880 | #if defined(GET_EVAL_IMPL) |
13881 | EvalEmitter |
13882 | #else |
13883 | ByteCodeEmitter |
13884 | #endif |
13885 | ::emitGetParam(PrimType T0, uint32_t A0, const SourceInfo &I) { |
13886 | switch (T0) { |
13887 | case PT_Sint8: |
13888 | return emitGetParamSint8(A0, I); |
13889 | case PT_Uint8: |
13890 | return emitGetParamUint8(A0, I); |
13891 | case PT_Sint16: |
13892 | return emitGetParamSint16(A0, I); |
13893 | case PT_Uint16: |
13894 | return emitGetParamUint16(A0, I); |
13895 | case PT_Sint32: |
13896 | return emitGetParamSint32(A0, I); |
13897 | case PT_Uint32: |
13898 | return emitGetParamUint32(A0, I); |
13899 | case PT_Sint64: |
13900 | return emitGetParamSint64(A0, I); |
13901 | case PT_Uint64: |
13902 | return emitGetParamUint64(A0, I); |
13903 | case PT_IntAP: |
13904 | return emitGetParamIntAP(A0, I); |
13905 | case PT_IntAPS: |
13906 | return emitGetParamIntAPS(A0, I); |
13907 | case PT_Bool: |
13908 | return emitGetParamBool(A0, I); |
13909 | case PT_Ptr: |
13910 | return emitGetParamPtr(A0, I); |
13911 | case PT_FnPtr: |
13912 | return emitGetParamFnPtr(A0, I); |
13913 | case PT_MemberPtr: |
13914 | return emitGetParamMemberPtr(A0, I); |
13915 | case PT_Float: |
13916 | return emitGetParamFloat(A0, I); |
13917 | } |
13918 | llvm_unreachable("invalid enum value" ); |
13919 | } |
13920 | #endif |
13921 | #ifdef GET_LINK_IMPL |
13922 | bool ByteCodeEmitter::emitGetParamSint8( uint32_t A0, const SourceInfo &L) { |
13923 | return emitOp<uint32_t>(OP_GetParamSint8, A0, L); |
13924 | } |
13925 | bool ByteCodeEmitter::emitGetParamUint8( uint32_t A0, const SourceInfo &L) { |
13926 | return emitOp<uint32_t>(OP_GetParamUint8, A0, L); |
13927 | } |
13928 | bool ByteCodeEmitter::emitGetParamSint16( uint32_t A0, const SourceInfo &L) { |
13929 | return emitOp<uint32_t>(OP_GetParamSint16, A0, L); |
13930 | } |
13931 | bool ByteCodeEmitter::emitGetParamUint16( uint32_t A0, const SourceInfo &L) { |
13932 | return emitOp<uint32_t>(OP_GetParamUint16, A0, L); |
13933 | } |
13934 | bool ByteCodeEmitter::emitGetParamSint32( uint32_t A0, const SourceInfo &L) { |
13935 | return emitOp<uint32_t>(OP_GetParamSint32, A0, L); |
13936 | } |
13937 | bool ByteCodeEmitter::emitGetParamUint32( uint32_t A0, const SourceInfo &L) { |
13938 | return emitOp<uint32_t>(OP_GetParamUint32, A0, L); |
13939 | } |
13940 | bool ByteCodeEmitter::emitGetParamSint64( uint32_t A0, const SourceInfo &L) { |
13941 | return emitOp<uint32_t>(OP_GetParamSint64, A0, L); |
13942 | } |
13943 | bool ByteCodeEmitter::emitGetParamUint64( uint32_t A0, const SourceInfo &L) { |
13944 | return emitOp<uint32_t>(OP_GetParamUint64, A0, L); |
13945 | } |
13946 | bool ByteCodeEmitter::emitGetParamIntAP( uint32_t A0, const SourceInfo &L) { |
13947 | return emitOp<uint32_t>(OP_GetParamIntAP, A0, L); |
13948 | } |
13949 | bool ByteCodeEmitter::emitGetParamIntAPS( uint32_t A0, const SourceInfo &L) { |
13950 | return emitOp<uint32_t>(OP_GetParamIntAPS, A0, L); |
13951 | } |
13952 | bool ByteCodeEmitter::emitGetParamBool( uint32_t A0, const SourceInfo &L) { |
13953 | return emitOp<uint32_t>(OP_GetParamBool, A0, L); |
13954 | } |
13955 | bool ByteCodeEmitter::emitGetParamPtr( uint32_t A0, const SourceInfo &L) { |
13956 | return emitOp<uint32_t>(OP_GetParamPtr, A0, L); |
13957 | } |
13958 | bool ByteCodeEmitter::emitGetParamFnPtr( uint32_t A0, const SourceInfo &L) { |
13959 | return emitOp<uint32_t>(OP_GetParamFnPtr, A0, L); |
13960 | } |
13961 | bool ByteCodeEmitter::emitGetParamMemberPtr( uint32_t A0, const SourceInfo &L) { |
13962 | return emitOp<uint32_t>(OP_GetParamMemberPtr, A0, L); |
13963 | } |
13964 | bool ByteCodeEmitter::emitGetParamFloat( uint32_t A0, const SourceInfo &L) { |
13965 | return emitOp<uint32_t>(OP_GetParamFloat, A0, L); |
13966 | } |
13967 | #endif |
13968 | #ifdef GET_EVAL_IMPL |
13969 | bool EvalEmitter::emitGetParamSint8( uint32_t A0, const SourceInfo &L) { |
13970 | if (!isActive()) return true; |
13971 | CurrentSource = L; |
13972 | return GetParam<PT_Sint8>(S, OpPC, A0); |
13973 | } |
13974 | bool EvalEmitter::emitGetParamUint8( uint32_t A0, const SourceInfo &L) { |
13975 | if (!isActive()) return true; |
13976 | CurrentSource = L; |
13977 | return GetParam<PT_Uint8>(S, OpPC, A0); |
13978 | } |
13979 | bool EvalEmitter::emitGetParamSint16( uint32_t A0, const SourceInfo &L) { |
13980 | if (!isActive()) return true; |
13981 | CurrentSource = L; |
13982 | return GetParam<PT_Sint16>(S, OpPC, A0); |
13983 | } |
13984 | bool EvalEmitter::emitGetParamUint16( uint32_t A0, const SourceInfo &L) { |
13985 | if (!isActive()) return true; |
13986 | CurrentSource = L; |
13987 | return GetParam<PT_Uint16>(S, OpPC, A0); |
13988 | } |
13989 | bool EvalEmitter::emitGetParamSint32( uint32_t A0, const SourceInfo &L) { |
13990 | if (!isActive()) return true; |
13991 | CurrentSource = L; |
13992 | return GetParam<PT_Sint32>(S, OpPC, A0); |
13993 | } |
13994 | bool EvalEmitter::emitGetParamUint32( uint32_t A0, const SourceInfo &L) { |
13995 | if (!isActive()) return true; |
13996 | CurrentSource = L; |
13997 | return GetParam<PT_Uint32>(S, OpPC, A0); |
13998 | } |
13999 | bool EvalEmitter::emitGetParamSint64( uint32_t A0, const SourceInfo &L) { |
14000 | if (!isActive()) return true; |
14001 | CurrentSource = L; |
14002 | return GetParam<PT_Sint64>(S, OpPC, A0); |
14003 | } |
14004 | bool EvalEmitter::emitGetParamUint64( uint32_t A0, const SourceInfo &L) { |
14005 | if (!isActive()) return true; |
14006 | CurrentSource = L; |
14007 | return GetParam<PT_Uint64>(S, OpPC, A0); |
14008 | } |
14009 | bool EvalEmitter::emitGetParamIntAP( uint32_t A0, const SourceInfo &L) { |
14010 | if (!isActive()) return true; |
14011 | CurrentSource = L; |
14012 | return GetParam<PT_IntAP>(S, OpPC, A0); |
14013 | } |
14014 | bool EvalEmitter::emitGetParamIntAPS( uint32_t A0, const SourceInfo &L) { |
14015 | if (!isActive()) return true; |
14016 | CurrentSource = L; |
14017 | return GetParam<PT_IntAPS>(S, OpPC, A0); |
14018 | } |
14019 | bool EvalEmitter::emitGetParamBool( uint32_t A0, const SourceInfo &L) { |
14020 | if (!isActive()) return true; |
14021 | CurrentSource = L; |
14022 | return GetParam<PT_Bool>(S, OpPC, A0); |
14023 | } |
14024 | bool EvalEmitter::emitGetParamPtr( uint32_t A0, const SourceInfo &L) { |
14025 | if (!isActive()) return true; |
14026 | CurrentSource = L; |
14027 | return GetParam<PT_Ptr>(S, OpPC, A0); |
14028 | } |
14029 | bool EvalEmitter::emitGetParamFnPtr( uint32_t A0, const SourceInfo &L) { |
14030 | if (!isActive()) return true; |
14031 | CurrentSource = L; |
14032 | return GetParam<PT_FnPtr>(S, OpPC, A0); |
14033 | } |
14034 | bool EvalEmitter::emitGetParamMemberPtr( uint32_t A0, const SourceInfo &L) { |
14035 | if (!isActive()) return true; |
14036 | CurrentSource = L; |
14037 | return GetParam<PT_MemberPtr>(S, OpPC, A0); |
14038 | } |
14039 | bool EvalEmitter::emitGetParamFloat( uint32_t A0, const SourceInfo &L) { |
14040 | if (!isActive()) return true; |
14041 | CurrentSource = L; |
14042 | return GetParam<PT_Float>(S, OpPC, A0); |
14043 | } |
14044 | #endif |
14045 | #ifdef GET_OPCODE_NAMES |
14046 | OP_GetPtrActiveField, |
14047 | #endif |
14048 | #ifdef GET_INTERP |
14049 | case OP_GetPtrActiveField: { |
14050 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14051 | if (!GetPtrActiveField(S, OpPC, V0)) |
14052 | return false; |
14053 | continue; |
14054 | } |
14055 | #endif |
14056 | #ifdef GET_DISASM |
14057 | case OP_GetPtrActiveField: |
14058 | PrintName("GetPtrActiveField" ); |
14059 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14060 | continue; |
14061 | #endif |
14062 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14063 | bool emitGetPtrActiveField( uint32_t , const SourceInfo &); |
14064 | #endif |
14065 | #ifdef GET_LINK_IMPL |
14066 | bool ByteCodeEmitter::emitGetPtrActiveField( uint32_t A0, const SourceInfo &L) { |
14067 | return emitOp<uint32_t>(OP_GetPtrActiveField, A0, L); |
14068 | } |
14069 | #endif |
14070 | #ifdef GET_EVAL_IMPL |
14071 | bool EvalEmitter::emitGetPtrActiveField( uint32_t A0, const SourceInfo &L) { |
14072 | if (!isActive()) return true; |
14073 | CurrentSource = L; |
14074 | return GetPtrActiveField(S, OpPC, A0); |
14075 | } |
14076 | #endif |
14077 | #ifdef GET_OPCODE_NAMES |
14078 | OP_GetPtrActiveThisField, |
14079 | #endif |
14080 | #ifdef GET_INTERP |
14081 | case OP_GetPtrActiveThisField: { |
14082 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14083 | if (!GetPtrActiveThisField(S, OpPC, V0)) |
14084 | return false; |
14085 | continue; |
14086 | } |
14087 | #endif |
14088 | #ifdef GET_DISASM |
14089 | case OP_GetPtrActiveThisField: |
14090 | PrintName("GetPtrActiveThisField" ); |
14091 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14092 | continue; |
14093 | #endif |
14094 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14095 | bool emitGetPtrActiveThisField( uint32_t , const SourceInfo &); |
14096 | #endif |
14097 | #ifdef GET_LINK_IMPL |
14098 | bool ByteCodeEmitter::emitGetPtrActiveThisField( uint32_t A0, const SourceInfo &L) { |
14099 | return emitOp<uint32_t>(OP_GetPtrActiveThisField, A0, L); |
14100 | } |
14101 | #endif |
14102 | #ifdef GET_EVAL_IMPL |
14103 | bool EvalEmitter::emitGetPtrActiveThisField( uint32_t A0, const SourceInfo &L) { |
14104 | if (!isActive()) return true; |
14105 | CurrentSource = L; |
14106 | return GetPtrActiveThisField(S, OpPC, A0); |
14107 | } |
14108 | #endif |
14109 | #ifdef GET_OPCODE_NAMES |
14110 | OP_GetPtrBase, |
14111 | #endif |
14112 | #ifdef GET_INTERP |
14113 | case OP_GetPtrBase: { |
14114 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14115 | if (!GetPtrBase(S, OpPC, V0)) |
14116 | return false; |
14117 | continue; |
14118 | } |
14119 | #endif |
14120 | #ifdef GET_DISASM |
14121 | case OP_GetPtrBase: |
14122 | PrintName("GetPtrBase" ); |
14123 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14124 | continue; |
14125 | #endif |
14126 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14127 | bool emitGetPtrBase( uint32_t , const SourceInfo &); |
14128 | #endif |
14129 | #ifdef GET_LINK_IMPL |
14130 | bool ByteCodeEmitter::emitGetPtrBase( uint32_t A0, const SourceInfo &L) { |
14131 | return emitOp<uint32_t>(OP_GetPtrBase, A0, L); |
14132 | } |
14133 | #endif |
14134 | #ifdef GET_EVAL_IMPL |
14135 | bool EvalEmitter::emitGetPtrBase( uint32_t A0, const SourceInfo &L) { |
14136 | if (!isActive()) return true; |
14137 | CurrentSource = L; |
14138 | return GetPtrBase(S, OpPC, A0); |
14139 | } |
14140 | #endif |
14141 | #ifdef GET_OPCODE_NAMES |
14142 | OP_GetPtrBasePop, |
14143 | #endif |
14144 | #ifdef GET_INTERP |
14145 | case OP_GetPtrBasePop: { |
14146 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14147 | if (!GetPtrBasePop(S, OpPC, V0)) |
14148 | return false; |
14149 | continue; |
14150 | } |
14151 | #endif |
14152 | #ifdef GET_DISASM |
14153 | case OP_GetPtrBasePop: |
14154 | PrintName("GetPtrBasePop" ); |
14155 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14156 | continue; |
14157 | #endif |
14158 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14159 | bool emitGetPtrBasePop( uint32_t , const SourceInfo &); |
14160 | #endif |
14161 | #ifdef GET_LINK_IMPL |
14162 | bool ByteCodeEmitter::emitGetPtrBasePop( uint32_t A0, const SourceInfo &L) { |
14163 | return emitOp<uint32_t>(OP_GetPtrBasePop, A0, L); |
14164 | } |
14165 | #endif |
14166 | #ifdef GET_EVAL_IMPL |
14167 | bool EvalEmitter::emitGetPtrBasePop( uint32_t A0, const SourceInfo &L) { |
14168 | if (!isActive()) return true; |
14169 | CurrentSource = L; |
14170 | return GetPtrBasePop(S, OpPC, A0); |
14171 | } |
14172 | #endif |
14173 | #ifdef GET_OPCODE_NAMES |
14174 | OP_GetPtrDerivedPop, |
14175 | #endif |
14176 | #ifdef GET_INTERP |
14177 | case OP_GetPtrDerivedPop: { |
14178 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14179 | if (!GetPtrDerivedPop(S, OpPC, V0)) |
14180 | return false; |
14181 | continue; |
14182 | } |
14183 | #endif |
14184 | #ifdef GET_DISASM |
14185 | case OP_GetPtrDerivedPop: |
14186 | PrintName("GetPtrDerivedPop" ); |
14187 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14188 | continue; |
14189 | #endif |
14190 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14191 | bool emitGetPtrDerivedPop( uint32_t , const SourceInfo &); |
14192 | #endif |
14193 | #ifdef GET_LINK_IMPL |
14194 | bool ByteCodeEmitter::emitGetPtrDerivedPop( uint32_t A0, const SourceInfo &L) { |
14195 | return emitOp<uint32_t>(OP_GetPtrDerivedPop, A0, L); |
14196 | } |
14197 | #endif |
14198 | #ifdef GET_EVAL_IMPL |
14199 | bool EvalEmitter::emitGetPtrDerivedPop( uint32_t A0, const SourceInfo &L) { |
14200 | if (!isActive()) return true; |
14201 | CurrentSource = L; |
14202 | return GetPtrDerivedPop(S, OpPC, A0); |
14203 | } |
14204 | #endif |
14205 | #ifdef GET_OPCODE_NAMES |
14206 | OP_GetPtrField, |
14207 | #endif |
14208 | #ifdef GET_INTERP |
14209 | case OP_GetPtrField: { |
14210 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14211 | if (!GetPtrField(S, OpPC, V0)) |
14212 | return false; |
14213 | continue; |
14214 | } |
14215 | #endif |
14216 | #ifdef GET_DISASM |
14217 | case OP_GetPtrField: |
14218 | PrintName("GetPtrField" ); |
14219 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14220 | continue; |
14221 | #endif |
14222 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14223 | bool emitGetPtrField( uint32_t , const SourceInfo &); |
14224 | #endif |
14225 | #ifdef GET_LINK_IMPL |
14226 | bool ByteCodeEmitter::emitGetPtrField( uint32_t A0, const SourceInfo &L) { |
14227 | return emitOp<uint32_t>(OP_GetPtrField, A0, L); |
14228 | } |
14229 | #endif |
14230 | #ifdef GET_EVAL_IMPL |
14231 | bool EvalEmitter::emitGetPtrField( uint32_t A0, const SourceInfo &L) { |
14232 | if (!isActive()) return true; |
14233 | CurrentSource = L; |
14234 | return GetPtrField(S, OpPC, A0); |
14235 | } |
14236 | #endif |
14237 | #ifdef GET_OPCODE_NAMES |
14238 | OP_GetPtrFieldPop, |
14239 | #endif |
14240 | #ifdef GET_INTERP |
14241 | case OP_GetPtrFieldPop: { |
14242 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14243 | if (!GetPtrFieldPop(S, OpPC, V0)) |
14244 | return false; |
14245 | continue; |
14246 | } |
14247 | #endif |
14248 | #ifdef GET_DISASM |
14249 | case OP_GetPtrFieldPop: |
14250 | PrintName("GetPtrFieldPop" ); |
14251 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14252 | continue; |
14253 | #endif |
14254 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14255 | bool emitGetPtrFieldPop( uint32_t , const SourceInfo &); |
14256 | #endif |
14257 | #ifdef GET_LINK_IMPL |
14258 | bool ByteCodeEmitter::emitGetPtrFieldPop( uint32_t A0, const SourceInfo &L) { |
14259 | return emitOp<uint32_t>(OP_GetPtrFieldPop, A0, L); |
14260 | } |
14261 | #endif |
14262 | #ifdef GET_EVAL_IMPL |
14263 | bool EvalEmitter::emitGetPtrFieldPop( uint32_t A0, const SourceInfo &L) { |
14264 | if (!isActive()) return true; |
14265 | CurrentSource = L; |
14266 | return GetPtrFieldPop(S, OpPC, A0); |
14267 | } |
14268 | #endif |
14269 | #ifdef GET_OPCODE_NAMES |
14270 | OP_GetPtrGlobal, |
14271 | #endif |
14272 | #ifdef GET_INTERP |
14273 | case OP_GetPtrGlobal: { |
14274 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14275 | if (!GetPtrGlobal(S, OpPC, V0)) |
14276 | return false; |
14277 | continue; |
14278 | } |
14279 | #endif |
14280 | #ifdef GET_DISASM |
14281 | case OP_GetPtrGlobal: |
14282 | PrintName("GetPtrGlobal" ); |
14283 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14284 | continue; |
14285 | #endif |
14286 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14287 | bool emitGetPtrGlobal( uint32_t , const SourceInfo &); |
14288 | #endif |
14289 | #ifdef GET_LINK_IMPL |
14290 | bool ByteCodeEmitter::emitGetPtrGlobal( uint32_t A0, const SourceInfo &L) { |
14291 | return emitOp<uint32_t>(OP_GetPtrGlobal, A0, L); |
14292 | } |
14293 | #endif |
14294 | #ifdef GET_EVAL_IMPL |
14295 | bool EvalEmitter::emitGetPtrGlobal( uint32_t A0, const SourceInfo &L) { |
14296 | if (!isActive()) return true; |
14297 | CurrentSource = L; |
14298 | return GetPtrGlobal(S, OpPC, A0); |
14299 | } |
14300 | #endif |
14301 | #ifdef GET_OPCODE_NAMES |
14302 | OP_GetPtrLocal, |
14303 | #endif |
14304 | #ifdef GET_INTERP |
14305 | case OP_GetPtrLocal: { |
14306 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14307 | if (!GetPtrLocal(S, OpPC, V0)) |
14308 | return false; |
14309 | continue; |
14310 | } |
14311 | #endif |
14312 | #ifdef GET_DISASM |
14313 | case OP_GetPtrLocal: |
14314 | PrintName("GetPtrLocal" ); |
14315 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14316 | continue; |
14317 | #endif |
14318 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14319 | bool emitGetPtrLocal( uint32_t , const SourceInfo &); |
14320 | #endif |
14321 | #ifdef GET_LINK_IMPL |
14322 | bool ByteCodeEmitter::emitGetPtrLocal( uint32_t A0, const SourceInfo &L) { |
14323 | return emitOp<uint32_t>(OP_GetPtrLocal, A0, L); |
14324 | } |
14325 | #endif |
14326 | #ifdef GET_OPCODE_NAMES |
14327 | OP_GetPtrParam, |
14328 | #endif |
14329 | #ifdef GET_INTERP |
14330 | case OP_GetPtrParam: { |
14331 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14332 | if (!GetPtrParam(S, OpPC, V0)) |
14333 | return false; |
14334 | continue; |
14335 | } |
14336 | #endif |
14337 | #ifdef GET_DISASM |
14338 | case OP_GetPtrParam: |
14339 | PrintName("GetPtrParam" ); |
14340 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14341 | continue; |
14342 | #endif |
14343 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14344 | bool emitGetPtrParam( uint32_t , const SourceInfo &); |
14345 | #endif |
14346 | #ifdef GET_LINK_IMPL |
14347 | bool ByteCodeEmitter::emitGetPtrParam( uint32_t A0, const SourceInfo &L) { |
14348 | return emitOp<uint32_t>(OP_GetPtrParam, A0, L); |
14349 | } |
14350 | #endif |
14351 | #ifdef GET_EVAL_IMPL |
14352 | bool EvalEmitter::emitGetPtrParam( uint32_t A0, const SourceInfo &L) { |
14353 | if (!isActive()) return true; |
14354 | CurrentSource = L; |
14355 | return GetPtrParam(S, OpPC, A0); |
14356 | } |
14357 | #endif |
14358 | #ifdef GET_OPCODE_NAMES |
14359 | OP_GetPtrThisBase, |
14360 | #endif |
14361 | #ifdef GET_INTERP |
14362 | case OP_GetPtrThisBase: { |
14363 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14364 | if (!GetPtrThisBase(S, OpPC, V0)) |
14365 | return false; |
14366 | continue; |
14367 | } |
14368 | #endif |
14369 | #ifdef GET_DISASM |
14370 | case OP_GetPtrThisBase: |
14371 | PrintName("GetPtrThisBase" ); |
14372 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14373 | continue; |
14374 | #endif |
14375 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14376 | bool emitGetPtrThisBase( uint32_t , const SourceInfo &); |
14377 | #endif |
14378 | #ifdef GET_LINK_IMPL |
14379 | bool ByteCodeEmitter::emitGetPtrThisBase( uint32_t A0, const SourceInfo &L) { |
14380 | return emitOp<uint32_t>(OP_GetPtrThisBase, A0, L); |
14381 | } |
14382 | #endif |
14383 | #ifdef GET_EVAL_IMPL |
14384 | bool EvalEmitter::emitGetPtrThisBase( uint32_t A0, const SourceInfo &L) { |
14385 | if (!isActive()) return true; |
14386 | CurrentSource = L; |
14387 | return GetPtrThisBase(S, OpPC, A0); |
14388 | } |
14389 | #endif |
14390 | #ifdef GET_OPCODE_NAMES |
14391 | OP_GetPtrThisField, |
14392 | #endif |
14393 | #ifdef GET_INTERP |
14394 | case OP_GetPtrThisField: { |
14395 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14396 | if (!GetPtrThisField(S, OpPC, V0)) |
14397 | return false; |
14398 | continue; |
14399 | } |
14400 | #endif |
14401 | #ifdef GET_DISASM |
14402 | case OP_GetPtrThisField: |
14403 | PrintName("GetPtrThisField" ); |
14404 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14405 | continue; |
14406 | #endif |
14407 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14408 | bool emitGetPtrThisField( uint32_t , const SourceInfo &); |
14409 | #endif |
14410 | #ifdef GET_LINK_IMPL |
14411 | bool ByteCodeEmitter::emitGetPtrThisField( uint32_t A0, const SourceInfo &L) { |
14412 | return emitOp<uint32_t>(OP_GetPtrThisField, A0, L); |
14413 | } |
14414 | #endif |
14415 | #ifdef GET_EVAL_IMPL |
14416 | bool EvalEmitter::emitGetPtrThisField( uint32_t A0, const SourceInfo &L) { |
14417 | if (!isActive()) return true; |
14418 | CurrentSource = L; |
14419 | return GetPtrThisField(S, OpPC, A0); |
14420 | } |
14421 | #endif |
14422 | #ifdef GET_OPCODE_NAMES |
14423 | OP_GetPtrThisVirtBase, |
14424 | #endif |
14425 | #ifdef GET_INTERP |
14426 | case OP_GetPtrThisVirtBase: { |
14427 | const auto V0 = ReadArg<const RecordDecl *>(S, PC); |
14428 | if (!GetPtrThisVirtBase(S, OpPC, V0)) |
14429 | return false; |
14430 | continue; |
14431 | } |
14432 | #endif |
14433 | #ifdef GET_DISASM |
14434 | case OP_GetPtrThisVirtBase: |
14435 | PrintName("GetPtrThisVirtBase" ); |
14436 | OS << "\t" << ReadArg<const RecordDecl *>(P, PC) << " " << "\n" ; |
14437 | continue; |
14438 | #endif |
14439 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14440 | bool emitGetPtrThisVirtBase( const RecordDecl * , const SourceInfo &); |
14441 | #endif |
14442 | #ifdef GET_LINK_IMPL |
14443 | bool ByteCodeEmitter::emitGetPtrThisVirtBase( const RecordDecl * A0, const SourceInfo &L) { |
14444 | return emitOp<const RecordDecl *>(OP_GetPtrThisVirtBase, A0, L); |
14445 | } |
14446 | #endif |
14447 | #ifdef GET_EVAL_IMPL |
14448 | bool EvalEmitter::emitGetPtrThisVirtBase( const RecordDecl * A0, const SourceInfo &L) { |
14449 | if (!isActive()) return true; |
14450 | CurrentSource = L; |
14451 | return GetPtrThisVirtBase(S, OpPC, A0); |
14452 | } |
14453 | #endif |
14454 | #ifdef GET_OPCODE_NAMES |
14455 | OP_GetPtrVirtBasePop, |
14456 | #endif |
14457 | #ifdef GET_INTERP |
14458 | case OP_GetPtrVirtBasePop: { |
14459 | const auto V0 = ReadArg<const RecordDecl *>(S, PC); |
14460 | if (!GetPtrVirtBasePop(S, OpPC, V0)) |
14461 | return false; |
14462 | continue; |
14463 | } |
14464 | #endif |
14465 | #ifdef GET_DISASM |
14466 | case OP_GetPtrVirtBasePop: |
14467 | PrintName("GetPtrVirtBasePop" ); |
14468 | OS << "\t" << ReadArg<const RecordDecl *>(P, PC) << " " << "\n" ; |
14469 | continue; |
14470 | #endif |
14471 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14472 | bool emitGetPtrVirtBasePop( const RecordDecl * , const SourceInfo &); |
14473 | #endif |
14474 | #ifdef GET_LINK_IMPL |
14475 | bool ByteCodeEmitter::emitGetPtrVirtBasePop( const RecordDecl * A0, const SourceInfo &L) { |
14476 | return emitOp<const RecordDecl *>(OP_GetPtrVirtBasePop, A0, L); |
14477 | } |
14478 | #endif |
14479 | #ifdef GET_EVAL_IMPL |
14480 | bool EvalEmitter::emitGetPtrVirtBasePop( const RecordDecl * A0, const SourceInfo &L) { |
14481 | if (!isActive()) return true; |
14482 | CurrentSource = L; |
14483 | return GetPtrVirtBasePop(S, OpPC, A0); |
14484 | } |
14485 | #endif |
14486 | #ifdef GET_OPCODE_NAMES |
14487 | OP_GetThisFieldSint8, |
14488 | OP_GetThisFieldUint8, |
14489 | OP_GetThisFieldSint16, |
14490 | OP_GetThisFieldUint16, |
14491 | OP_GetThisFieldSint32, |
14492 | OP_GetThisFieldUint32, |
14493 | OP_GetThisFieldSint64, |
14494 | OP_GetThisFieldUint64, |
14495 | OP_GetThisFieldIntAP, |
14496 | OP_GetThisFieldIntAPS, |
14497 | OP_GetThisFieldBool, |
14498 | OP_GetThisFieldPtr, |
14499 | OP_GetThisFieldFnPtr, |
14500 | OP_GetThisFieldMemberPtr, |
14501 | OP_GetThisFieldFloat, |
14502 | #endif |
14503 | #ifdef GET_INTERP |
14504 | case OP_GetThisFieldSint8: { |
14505 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14506 | if (!GetThisField<PT_Sint8>(S, OpPC, V0)) |
14507 | return false; |
14508 | continue; |
14509 | } |
14510 | case OP_GetThisFieldUint8: { |
14511 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14512 | if (!GetThisField<PT_Uint8>(S, OpPC, V0)) |
14513 | return false; |
14514 | continue; |
14515 | } |
14516 | case OP_GetThisFieldSint16: { |
14517 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14518 | if (!GetThisField<PT_Sint16>(S, OpPC, V0)) |
14519 | return false; |
14520 | continue; |
14521 | } |
14522 | case OP_GetThisFieldUint16: { |
14523 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14524 | if (!GetThisField<PT_Uint16>(S, OpPC, V0)) |
14525 | return false; |
14526 | continue; |
14527 | } |
14528 | case OP_GetThisFieldSint32: { |
14529 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14530 | if (!GetThisField<PT_Sint32>(S, OpPC, V0)) |
14531 | return false; |
14532 | continue; |
14533 | } |
14534 | case OP_GetThisFieldUint32: { |
14535 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14536 | if (!GetThisField<PT_Uint32>(S, OpPC, V0)) |
14537 | return false; |
14538 | continue; |
14539 | } |
14540 | case OP_GetThisFieldSint64: { |
14541 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14542 | if (!GetThisField<PT_Sint64>(S, OpPC, V0)) |
14543 | return false; |
14544 | continue; |
14545 | } |
14546 | case OP_GetThisFieldUint64: { |
14547 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14548 | if (!GetThisField<PT_Uint64>(S, OpPC, V0)) |
14549 | return false; |
14550 | continue; |
14551 | } |
14552 | case OP_GetThisFieldIntAP: { |
14553 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14554 | if (!GetThisField<PT_IntAP>(S, OpPC, V0)) |
14555 | return false; |
14556 | continue; |
14557 | } |
14558 | case OP_GetThisFieldIntAPS: { |
14559 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14560 | if (!GetThisField<PT_IntAPS>(S, OpPC, V0)) |
14561 | return false; |
14562 | continue; |
14563 | } |
14564 | case OP_GetThisFieldBool: { |
14565 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14566 | if (!GetThisField<PT_Bool>(S, OpPC, V0)) |
14567 | return false; |
14568 | continue; |
14569 | } |
14570 | case OP_GetThisFieldPtr: { |
14571 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14572 | if (!GetThisField<PT_Ptr>(S, OpPC, V0)) |
14573 | return false; |
14574 | continue; |
14575 | } |
14576 | case OP_GetThisFieldFnPtr: { |
14577 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14578 | if (!GetThisField<PT_FnPtr>(S, OpPC, V0)) |
14579 | return false; |
14580 | continue; |
14581 | } |
14582 | case OP_GetThisFieldMemberPtr: { |
14583 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14584 | if (!GetThisField<PT_MemberPtr>(S, OpPC, V0)) |
14585 | return false; |
14586 | continue; |
14587 | } |
14588 | case OP_GetThisFieldFloat: { |
14589 | const auto V0 = ReadArg<uint32_t>(S, PC); |
14590 | if (!GetThisField<PT_Float>(S, OpPC, V0)) |
14591 | return false; |
14592 | continue; |
14593 | } |
14594 | #endif |
14595 | #ifdef GET_DISASM |
14596 | case OP_GetThisFieldSint8: |
14597 | PrintName("GetThisFieldSint8" ); |
14598 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14599 | continue; |
14600 | case OP_GetThisFieldUint8: |
14601 | PrintName("GetThisFieldUint8" ); |
14602 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14603 | continue; |
14604 | case OP_GetThisFieldSint16: |
14605 | PrintName("GetThisFieldSint16" ); |
14606 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14607 | continue; |
14608 | case OP_GetThisFieldUint16: |
14609 | PrintName("GetThisFieldUint16" ); |
14610 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14611 | continue; |
14612 | case OP_GetThisFieldSint32: |
14613 | PrintName("GetThisFieldSint32" ); |
14614 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14615 | continue; |
14616 | case OP_GetThisFieldUint32: |
14617 | PrintName("GetThisFieldUint32" ); |
14618 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14619 | continue; |
14620 | case OP_GetThisFieldSint64: |
14621 | PrintName("GetThisFieldSint64" ); |
14622 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14623 | continue; |
14624 | case OP_GetThisFieldUint64: |
14625 | PrintName("GetThisFieldUint64" ); |
14626 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14627 | continue; |
14628 | case OP_GetThisFieldIntAP: |
14629 | PrintName("GetThisFieldIntAP" ); |
14630 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14631 | continue; |
14632 | case OP_GetThisFieldIntAPS: |
14633 | PrintName("GetThisFieldIntAPS" ); |
14634 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14635 | continue; |
14636 | case OP_GetThisFieldBool: |
14637 | PrintName("GetThisFieldBool" ); |
14638 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14639 | continue; |
14640 | case OP_GetThisFieldPtr: |
14641 | PrintName("GetThisFieldPtr" ); |
14642 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14643 | continue; |
14644 | case OP_GetThisFieldFnPtr: |
14645 | PrintName("GetThisFieldFnPtr" ); |
14646 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14647 | continue; |
14648 | case OP_GetThisFieldMemberPtr: |
14649 | PrintName("GetThisFieldMemberPtr" ); |
14650 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14651 | continue; |
14652 | case OP_GetThisFieldFloat: |
14653 | PrintName("GetThisFieldFloat" ); |
14654 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
14655 | continue; |
14656 | #endif |
14657 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14658 | bool emitGetThisFieldSint8( uint32_t , const SourceInfo &); |
14659 | bool emitGetThisFieldUint8( uint32_t , const SourceInfo &); |
14660 | bool emitGetThisFieldSint16( uint32_t , const SourceInfo &); |
14661 | bool emitGetThisFieldUint16( uint32_t , const SourceInfo &); |
14662 | bool emitGetThisFieldSint32( uint32_t , const SourceInfo &); |
14663 | bool emitGetThisFieldUint32( uint32_t , const SourceInfo &); |
14664 | bool emitGetThisFieldSint64( uint32_t , const SourceInfo &); |
14665 | bool emitGetThisFieldUint64( uint32_t , const SourceInfo &); |
14666 | bool emitGetThisFieldIntAP( uint32_t , const SourceInfo &); |
14667 | bool emitGetThisFieldIntAPS( uint32_t , const SourceInfo &); |
14668 | bool emitGetThisFieldBool( uint32_t , const SourceInfo &); |
14669 | bool emitGetThisFieldPtr( uint32_t , const SourceInfo &); |
14670 | bool emitGetThisFieldFnPtr( uint32_t , const SourceInfo &); |
14671 | bool emitGetThisFieldMemberPtr( uint32_t , const SourceInfo &); |
14672 | bool emitGetThisFieldFloat( uint32_t , const SourceInfo &); |
14673 | #endif |
14674 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14675 | [[nodiscard]] bool emitGetThisField(PrimType, uint32_t, const SourceInfo &I); |
14676 | #endif |
14677 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
14678 | bool |
14679 | #if defined(GET_EVAL_IMPL) |
14680 | EvalEmitter |
14681 | #else |
14682 | ByteCodeEmitter |
14683 | #endif |
14684 | ::emitGetThisField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
14685 | switch (T0) { |
14686 | case PT_Sint8: |
14687 | return emitGetThisFieldSint8(A0, I); |
14688 | case PT_Uint8: |
14689 | return emitGetThisFieldUint8(A0, I); |
14690 | case PT_Sint16: |
14691 | return emitGetThisFieldSint16(A0, I); |
14692 | case PT_Uint16: |
14693 | return emitGetThisFieldUint16(A0, I); |
14694 | case PT_Sint32: |
14695 | return emitGetThisFieldSint32(A0, I); |
14696 | case PT_Uint32: |
14697 | return emitGetThisFieldUint32(A0, I); |
14698 | case PT_Sint64: |
14699 | return emitGetThisFieldSint64(A0, I); |
14700 | case PT_Uint64: |
14701 | return emitGetThisFieldUint64(A0, I); |
14702 | case PT_IntAP: |
14703 | return emitGetThisFieldIntAP(A0, I); |
14704 | case PT_IntAPS: |
14705 | return emitGetThisFieldIntAPS(A0, I); |
14706 | case PT_Bool: |
14707 | return emitGetThisFieldBool(A0, I); |
14708 | case PT_Ptr: |
14709 | return emitGetThisFieldPtr(A0, I); |
14710 | case PT_FnPtr: |
14711 | return emitGetThisFieldFnPtr(A0, I); |
14712 | case PT_MemberPtr: |
14713 | return emitGetThisFieldMemberPtr(A0, I); |
14714 | case PT_Float: |
14715 | return emitGetThisFieldFloat(A0, I); |
14716 | } |
14717 | llvm_unreachable("invalid enum value" ); |
14718 | } |
14719 | #endif |
14720 | #ifdef GET_LINK_IMPL |
14721 | bool ByteCodeEmitter::emitGetThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
14722 | return emitOp<uint32_t>(OP_GetThisFieldSint8, A0, L); |
14723 | } |
14724 | bool ByteCodeEmitter::emitGetThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
14725 | return emitOp<uint32_t>(OP_GetThisFieldUint8, A0, L); |
14726 | } |
14727 | bool ByteCodeEmitter::emitGetThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
14728 | return emitOp<uint32_t>(OP_GetThisFieldSint16, A0, L); |
14729 | } |
14730 | bool ByteCodeEmitter::emitGetThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
14731 | return emitOp<uint32_t>(OP_GetThisFieldUint16, A0, L); |
14732 | } |
14733 | bool ByteCodeEmitter::emitGetThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
14734 | return emitOp<uint32_t>(OP_GetThisFieldSint32, A0, L); |
14735 | } |
14736 | bool ByteCodeEmitter::emitGetThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
14737 | return emitOp<uint32_t>(OP_GetThisFieldUint32, A0, L); |
14738 | } |
14739 | bool ByteCodeEmitter::emitGetThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
14740 | return emitOp<uint32_t>(OP_GetThisFieldSint64, A0, L); |
14741 | } |
14742 | bool ByteCodeEmitter::emitGetThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
14743 | return emitOp<uint32_t>(OP_GetThisFieldUint64, A0, L); |
14744 | } |
14745 | bool ByteCodeEmitter::emitGetThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
14746 | return emitOp<uint32_t>(OP_GetThisFieldIntAP, A0, L); |
14747 | } |
14748 | bool ByteCodeEmitter::emitGetThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
14749 | return emitOp<uint32_t>(OP_GetThisFieldIntAPS, A0, L); |
14750 | } |
14751 | bool ByteCodeEmitter::emitGetThisFieldBool( uint32_t A0, const SourceInfo &L) { |
14752 | return emitOp<uint32_t>(OP_GetThisFieldBool, A0, L); |
14753 | } |
14754 | bool ByteCodeEmitter::emitGetThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
14755 | return emitOp<uint32_t>(OP_GetThisFieldPtr, A0, L); |
14756 | } |
14757 | bool ByteCodeEmitter::emitGetThisFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
14758 | return emitOp<uint32_t>(OP_GetThisFieldFnPtr, A0, L); |
14759 | } |
14760 | bool ByteCodeEmitter::emitGetThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
14761 | return emitOp<uint32_t>(OP_GetThisFieldMemberPtr, A0, L); |
14762 | } |
14763 | bool ByteCodeEmitter::emitGetThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
14764 | return emitOp<uint32_t>(OP_GetThisFieldFloat, A0, L); |
14765 | } |
14766 | #endif |
14767 | #ifdef GET_EVAL_IMPL |
14768 | bool EvalEmitter::emitGetThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
14769 | if (!isActive()) return true; |
14770 | CurrentSource = L; |
14771 | return GetThisField<PT_Sint8>(S, OpPC, A0); |
14772 | } |
14773 | bool EvalEmitter::emitGetThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
14774 | if (!isActive()) return true; |
14775 | CurrentSource = L; |
14776 | return GetThisField<PT_Uint8>(S, OpPC, A0); |
14777 | } |
14778 | bool EvalEmitter::emitGetThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
14779 | if (!isActive()) return true; |
14780 | CurrentSource = L; |
14781 | return GetThisField<PT_Sint16>(S, OpPC, A0); |
14782 | } |
14783 | bool EvalEmitter::emitGetThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
14784 | if (!isActive()) return true; |
14785 | CurrentSource = L; |
14786 | return GetThisField<PT_Uint16>(S, OpPC, A0); |
14787 | } |
14788 | bool EvalEmitter::emitGetThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
14789 | if (!isActive()) return true; |
14790 | CurrentSource = L; |
14791 | return GetThisField<PT_Sint32>(S, OpPC, A0); |
14792 | } |
14793 | bool EvalEmitter::emitGetThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
14794 | if (!isActive()) return true; |
14795 | CurrentSource = L; |
14796 | return GetThisField<PT_Uint32>(S, OpPC, A0); |
14797 | } |
14798 | bool EvalEmitter::emitGetThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
14799 | if (!isActive()) return true; |
14800 | CurrentSource = L; |
14801 | return GetThisField<PT_Sint64>(S, OpPC, A0); |
14802 | } |
14803 | bool EvalEmitter::emitGetThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
14804 | if (!isActive()) return true; |
14805 | CurrentSource = L; |
14806 | return GetThisField<PT_Uint64>(S, OpPC, A0); |
14807 | } |
14808 | bool EvalEmitter::emitGetThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
14809 | if (!isActive()) return true; |
14810 | CurrentSource = L; |
14811 | return GetThisField<PT_IntAP>(S, OpPC, A0); |
14812 | } |
14813 | bool EvalEmitter::emitGetThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
14814 | if (!isActive()) return true; |
14815 | CurrentSource = L; |
14816 | return GetThisField<PT_IntAPS>(S, OpPC, A0); |
14817 | } |
14818 | bool EvalEmitter::emitGetThisFieldBool( uint32_t A0, const SourceInfo &L) { |
14819 | if (!isActive()) return true; |
14820 | CurrentSource = L; |
14821 | return GetThisField<PT_Bool>(S, OpPC, A0); |
14822 | } |
14823 | bool EvalEmitter::emitGetThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
14824 | if (!isActive()) return true; |
14825 | CurrentSource = L; |
14826 | return GetThisField<PT_Ptr>(S, OpPC, A0); |
14827 | } |
14828 | bool EvalEmitter::emitGetThisFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
14829 | if (!isActive()) return true; |
14830 | CurrentSource = L; |
14831 | return GetThisField<PT_FnPtr>(S, OpPC, A0); |
14832 | } |
14833 | bool EvalEmitter::emitGetThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
14834 | if (!isActive()) return true; |
14835 | CurrentSource = L; |
14836 | return GetThisField<PT_MemberPtr>(S, OpPC, A0); |
14837 | } |
14838 | bool EvalEmitter::emitGetThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
14839 | if (!isActive()) return true; |
14840 | CurrentSource = L; |
14841 | return GetThisField<PT_Float>(S, OpPC, A0); |
14842 | } |
14843 | #endif |
14844 | #ifdef GET_OPCODE_NAMES |
14845 | OP_IncSint8, |
14846 | OP_IncUint8, |
14847 | OP_IncSint16, |
14848 | OP_IncUint16, |
14849 | OP_IncSint32, |
14850 | OP_IncUint32, |
14851 | OP_IncSint64, |
14852 | OP_IncUint64, |
14853 | OP_IncIntAP, |
14854 | OP_IncIntAPS, |
14855 | OP_IncBool, |
14856 | #endif |
14857 | #ifdef GET_INTERP |
14858 | case OP_IncSint8: { |
14859 | if (!Inc<PT_Sint8>(S, OpPC)) |
14860 | return false; |
14861 | continue; |
14862 | } |
14863 | case OP_IncUint8: { |
14864 | if (!Inc<PT_Uint8>(S, OpPC)) |
14865 | return false; |
14866 | continue; |
14867 | } |
14868 | case OP_IncSint16: { |
14869 | if (!Inc<PT_Sint16>(S, OpPC)) |
14870 | return false; |
14871 | continue; |
14872 | } |
14873 | case OP_IncUint16: { |
14874 | if (!Inc<PT_Uint16>(S, OpPC)) |
14875 | return false; |
14876 | continue; |
14877 | } |
14878 | case OP_IncSint32: { |
14879 | if (!Inc<PT_Sint32>(S, OpPC)) |
14880 | return false; |
14881 | continue; |
14882 | } |
14883 | case OP_IncUint32: { |
14884 | if (!Inc<PT_Uint32>(S, OpPC)) |
14885 | return false; |
14886 | continue; |
14887 | } |
14888 | case OP_IncSint64: { |
14889 | if (!Inc<PT_Sint64>(S, OpPC)) |
14890 | return false; |
14891 | continue; |
14892 | } |
14893 | case OP_IncUint64: { |
14894 | if (!Inc<PT_Uint64>(S, OpPC)) |
14895 | return false; |
14896 | continue; |
14897 | } |
14898 | case OP_IncIntAP: { |
14899 | if (!Inc<PT_IntAP>(S, OpPC)) |
14900 | return false; |
14901 | continue; |
14902 | } |
14903 | case OP_IncIntAPS: { |
14904 | if (!Inc<PT_IntAPS>(S, OpPC)) |
14905 | return false; |
14906 | continue; |
14907 | } |
14908 | case OP_IncBool: { |
14909 | if (!Inc<PT_Bool>(S, OpPC)) |
14910 | return false; |
14911 | continue; |
14912 | } |
14913 | #endif |
14914 | #ifdef GET_DISASM |
14915 | case OP_IncSint8: |
14916 | PrintName("IncSint8" ); |
14917 | OS << "\t" << "\n" ; |
14918 | continue; |
14919 | case OP_IncUint8: |
14920 | PrintName("IncUint8" ); |
14921 | OS << "\t" << "\n" ; |
14922 | continue; |
14923 | case OP_IncSint16: |
14924 | PrintName("IncSint16" ); |
14925 | OS << "\t" << "\n" ; |
14926 | continue; |
14927 | case OP_IncUint16: |
14928 | PrintName("IncUint16" ); |
14929 | OS << "\t" << "\n" ; |
14930 | continue; |
14931 | case OP_IncSint32: |
14932 | PrintName("IncSint32" ); |
14933 | OS << "\t" << "\n" ; |
14934 | continue; |
14935 | case OP_IncUint32: |
14936 | PrintName("IncUint32" ); |
14937 | OS << "\t" << "\n" ; |
14938 | continue; |
14939 | case OP_IncSint64: |
14940 | PrintName("IncSint64" ); |
14941 | OS << "\t" << "\n" ; |
14942 | continue; |
14943 | case OP_IncUint64: |
14944 | PrintName("IncUint64" ); |
14945 | OS << "\t" << "\n" ; |
14946 | continue; |
14947 | case OP_IncIntAP: |
14948 | PrintName("IncIntAP" ); |
14949 | OS << "\t" << "\n" ; |
14950 | continue; |
14951 | case OP_IncIntAPS: |
14952 | PrintName("IncIntAPS" ); |
14953 | OS << "\t" << "\n" ; |
14954 | continue; |
14955 | case OP_IncBool: |
14956 | PrintName("IncBool" ); |
14957 | OS << "\t" << "\n" ; |
14958 | continue; |
14959 | #endif |
14960 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14961 | bool emitIncSint8(const SourceInfo &); |
14962 | bool emitIncUint8(const SourceInfo &); |
14963 | bool emitIncSint16(const SourceInfo &); |
14964 | bool emitIncUint16(const SourceInfo &); |
14965 | bool emitIncSint32(const SourceInfo &); |
14966 | bool emitIncUint32(const SourceInfo &); |
14967 | bool emitIncSint64(const SourceInfo &); |
14968 | bool emitIncUint64(const SourceInfo &); |
14969 | bool emitIncIntAP(const SourceInfo &); |
14970 | bool emitIncIntAPS(const SourceInfo &); |
14971 | bool emitIncBool(const SourceInfo &); |
14972 | #endif |
14973 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
14974 | [[nodiscard]] bool emitInc(PrimType, const SourceInfo &I); |
14975 | #endif |
14976 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
14977 | bool |
14978 | #if defined(GET_EVAL_IMPL) |
14979 | EvalEmitter |
14980 | #else |
14981 | ByteCodeEmitter |
14982 | #endif |
14983 | ::emitInc(PrimType T0, const SourceInfo &I) { |
14984 | switch (T0) { |
14985 | case PT_Sint8: |
14986 | return emitIncSint8(I); |
14987 | case PT_Uint8: |
14988 | return emitIncUint8(I); |
14989 | case PT_Sint16: |
14990 | return emitIncSint16(I); |
14991 | case PT_Uint16: |
14992 | return emitIncUint16(I); |
14993 | case PT_Sint32: |
14994 | return emitIncSint32(I); |
14995 | case PT_Uint32: |
14996 | return emitIncUint32(I); |
14997 | case PT_Sint64: |
14998 | return emitIncSint64(I); |
14999 | case PT_Uint64: |
15000 | return emitIncUint64(I); |
15001 | case PT_IntAP: |
15002 | return emitIncIntAP(I); |
15003 | case PT_IntAPS: |
15004 | return emitIncIntAPS(I); |
15005 | case PT_Bool: |
15006 | return emitIncBool(I); |
15007 | default: llvm_unreachable("invalid type: emitInc" ); |
15008 | } |
15009 | llvm_unreachable("invalid enum value" ); |
15010 | } |
15011 | #endif |
15012 | #ifdef GET_LINK_IMPL |
15013 | bool ByteCodeEmitter::emitIncSint8(const SourceInfo &L) { |
15014 | return emitOp<>(OP_IncSint8, L); |
15015 | } |
15016 | bool ByteCodeEmitter::emitIncUint8(const SourceInfo &L) { |
15017 | return emitOp<>(OP_IncUint8, L); |
15018 | } |
15019 | bool ByteCodeEmitter::emitIncSint16(const SourceInfo &L) { |
15020 | return emitOp<>(OP_IncSint16, L); |
15021 | } |
15022 | bool ByteCodeEmitter::emitIncUint16(const SourceInfo &L) { |
15023 | return emitOp<>(OP_IncUint16, L); |
15024 | } |
15025 | bool ByteCodeEmitter::emitIncSint32(const SourceInfo &L) { |
15026 | return emitOp<>(OP_IncSint32, L); |
15027 | } |
15028 | bool ByteCodeEmitter::emitIncUint32(const SourceInfo &L) { |
15029 | return emitOp<>(OP_IncUint32, L); |
15030 | } |
15031 | bool ByteCodeEmitter::emitIncSint64(const SourceInfo &L) { |
15032 | return emitOp<>(OP_IncSint64, L); |
15033 | } |
15034 | bool ByteCodeEmitter::emitIncUint64(const SourceInfo &L) { |
15035 | return emitOp<>(OP_IncUint64, L); |
15036 | } |
15037 | bool ByteCodeEmitter::emitIncIntAP(const SourceInfo &L) { |
15038 | return emitOp<>(OP_IncIntAP, L); |
15039 | } |
15040 | bool ByteCodeEmitter::emitIncIntAPS(const SourceInfo &L) { |
15041 | return emitOp<>(OP_IncIntAPS, L); |
15042 | } |
15043 | bool ByteCodeEmitter::emitIncBool(const SourceInfo &L) { |
15044 | return emitOp<>(OP_IncBool, L); |
15045 | } |
15046 | #endif |
15047 | #ifdef GET_EVAL_IMPL |
15048 | bool EvalEmitter::emitIncSint8(const SourceInfo &L) { |
15049 | if (!isActive()) return true; |
15050 | CurrentSource = L; |
15051 | return Inc<PT_Sint8>(S, OpPC); |
15052 | } |
15053 | bool EvalEmitter::emitIncUint8(const SourceInfo &L) { |
15054 | if (!isActive()) return true; |
15055 | CurrentSource = L; |
15056 | return Inc<PT_Uint8>(S, OpPC); |
15057 | } |
15058 | bool EvalEmitter::emitIncSint16(const SourceInfo &L) { |
15059 | if (!isActive()) return true; |
15060 | CurrentSource = L; |
15061 | return Inc<PT_Sint16>(S, OpPC); |
15062 | } |
15063 | bool EvalEmitter::emitIncUint16(const SourceInfo &L) { |
15064 | if (!isActive()) return true; |
15065 | CurrentSource = L; |
15066 | return Inc<PT_Uint16>(S, OpPC); |
15067 | } |
15068 | bool EvalEmitter::emitIncSint32(const SourceInfo &L) { |
15069 | if (!isActive()) return true; |
15070 | CurrentSource = L; |
15071 | return Inc<PT_Sint32>(S, OpPC); |
15072 | } |
15073 | bool EvalEmitter::emitIncUint32(const SourceInfo &L) { |
15074 | if (!isActive()) return true; |
15075 | CurrentSource = L; |
15076 | return Inc<PT_Uint32>(S, OpPC); |
15077 | } |
15078 | bool EvalEmitter::emitIncSint64(const SourceInfo &L) { |
15079 | if (!isActive()) return true; |
15080 | CurrentSource = L; |
15081 | return Inc<PT_Sint64>(S, OpPC); |
15082 | } |
15083 | bool EvalEmitter::emitIncUint64(const SourceInfo &L) { |
15084 | if (!isActive()) return true; |
15085 | CurrentSource = L; |
15086 | return Inc<PT_Uint64>(S, OpPC); |
15087 | } |
15088 | bool EvalEmitter::emitIncIntAP(const SourceInfo &L) { |
15089 | if (!isActive()) return true; |
15090 | CurrentSource = L; |
15091 | return Inc<PT_IntAP>(S, OpPC); |
15092 | } |
15093 | bool EvalEmitter::emitIncIntAPS(const SourceInfo &L) { |
15094 | if (!isActive()) return true; |
15095 | CurrentSource = L; |
15096 | return Inc<PT_IntAPS>(S, OpPC); |
15097 | } |
15098 | bool EvalEmitter::emitIncBool(const SourceInfo &L) { |
15099 | if (!isActive()) return true; |
15100 | CurrentSource = L; |
15101 | return Inc<PT_Bool>(S, OpPC); |
15102 | } |
15103 | #endif |
15104 | #ifdef GET_OPCODE_NAMES |
15105 | OP_IncPopSint8, |
15106 | OP_IncPopUint8, |
15107 | OP_IncPopSint16, |
15108 | OP_IncPopUint16, |
15109 | OP_IncPopSint32, |
15110 | OP_IncPopUint32, |
15111 | OP_IncPopSint64, |
15112 | OP_IncPopUint64, |
15113 | OP_IncPopIntAP, |
15114 | OP_IncPopIntAPS, |
15115 | OP_IncPopBool, |
15116 | #endif |
15117 | #ifdef GET_INTERP |
15118 | case OP_IncPopSint8: { |
15119 | if (!IncPop<PT_Sint8>(S, OpPC)) |
15120 | return false; |
15121 | continue; |
15122 | } |
15123 | case OP_IncPopUint8: { |
15124 | if (!IncPop<PT_Uint8>(S, OpPC)) |
15125 | return false; |
15126 | continue; |
15127 | } |
15128 | case OP_IncPopSint16: { |
15129 | if (!IncPop<PT_Sint16>(S, OpPC)) |
15130 | return false; |
15131 | continue; |
15132 | } |
15133 | case OP_IncPopUint16: { |
15134 | if (!IncPop<PT_Uint16>(S, OpPC)) |
15135 | return false; |
15136 | continue; |
15137 | } |
15138 | case OP_IncPopSint32: { |
15139 | if (!IncPop<PT_Sint32>(S, OpPC)) |
15140 | return false; |
15141 | continue; |
15142 | } |
15143 | case OP_IncPopUint32: { |
15144 | if (!IncPop<PT_Uint32>(S, OpPC)) |
15145 | return false; |
15146 | continue; |
15147 | } |
15148 | case OP_IncPopSint64: { |
15149 | if (!IncPop<PT_Sint64>(S, OpPC)) |
15150 | return false; |
15151 | continue; |
15152 | } |
15153 | case OP_IncPopUint64: { |
15154 | if (!IncPop<PT_Uint64>(S, OpPC)) |
15155 | return false; |
15156 | continue; |
15157 | } |
15158 | case OP_IncPopIntAP: { |
15159 | if (!IncPop<PT_IntAP>(S, OpPC)) |
15160 | return false; |
15161 | continue; |
15162 | } |
15163 | case OP_IncPopIntAPS: { |
15164 | if (!IncPop<PT_IntAPS>(S, OpPC)) |
15165 | return false; |
15166 | continue; |
15167 | } |
15168 | case OP_IncPopBool: { |
15169 | if (!IncPop<PT_Bool>(S, OpPC)) |
15170 | return false; |
15171 | continue; |
15172 | } |
15173 | #endif |
15174 | #ifdef GET_DISASM |
15175 | case OP_IncPopSint8: |
15176 | PrintName("IncPopSint8" ); |
15177 | OS << "\t" << "\n" ; |
15178 | continue; |
15179 | case OP_IncPopUint8: |
15180 | PrintName("IncPopUint8" ); |
15181 | OS << "\t" << "\n" ; |
15182 | continue; |
15183 | case OP_IncPopSint16: |
15184 | PrintName("IncPopSint16" ); |
15185 | OS << "\t" << "\n" ; |
15186 | continue; |
15187 | case OP_IncPopUint16: |
15188 | PrintName("IncPopUint16" ); |
15189 | OS << "\t" << "\n" ; |
15190 | continue; |
15191 | case OP_IncPopSint32: |
15192 | PrintName("IncPopSint32" ); |
15193 | OS << "\t" << "\n" ; |
15194 | continue; |
15195 | case OP_IncPopUint32: |
15196 | PrintName("IncPopUint32" ); |
15197 | OS << "\t" << "\n" ; |
15198 | continue; |
15199 | case OP_IncPopSint64: |
15200 | PrintName("IncPopSint64" ); |
15201 | OS << "\t" << "\n" ; |
15202 | continue; |
15203 | case OP_IncPopUint64: |
15204 | PrintName("IncPopUint64" ); |
15205 | OS << "\t" << "\n" ; |
15206 | continue; |
15207 | case OP_IncPopIntAP: |
15208 | PrintName("IncPopIntAP" ); |
15209 | OS << "\t" << "\n" ; |
15210 | continue; |
15211 | case OP_IncPopIntAPS: |
15212 | PrintName("IncPopIntAPS" ); |
15213 | OS << "\t" << "\n" ; |
15214 | continue; |
15215 | case OP_IncPopBool: |
15216 | PrintName("IncPopBool" ); |
15217 | OS << "\t" << "\n" ; |
15218 | continue; |
15219 | #endif |
15220 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15221 | bool emitIncPopSint8(const SourceInfo &); |
15222 | bool emitIncPopUint8(const SourceInfo &); |
15223 | bool emitIncPopSint16(const SourceInfo &); |
15224 | bool emitIncPopUint16(const SourceInfo &); |
15225 | bool emitIncPopSint32(const SourceInfo &); |
15226 | bool emitIncPopUint32(const SourceInfo &); |
15227 | bool emitIncPopSint64(const SourceInfo &); |
15228 | bool emitIncPopUint64(const SourceInfo &); |
15229 | bool emitIncPopIntAP(const SourceInfo &); |
15230 | bool emitIncPopIntAPS(const SourceInfo &); |
15231 | bool emitIncPopBool(const SourceInfo &); |
15232 | #endif |
15233 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15234 | [[nodiscard]] bool emitIncPop(PrimType, const SourceInfo &I); |
15235 | #endif |
15236 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
15237 | bool |
15238 | #if defined(GET_EVAL_IMPL) |
15239 | EvalEmitter |
15240 | #else |
15241 | ByteCodeEmitter |
15242 | #endif |
15243 | ::emitIncPop(PrimType T0, const SourceInfo &I) { |
15244 | switch (T0) { |
15245 | case PT_Sint8: |
15246 | return emitIncPopSint8(I); |
15247 | case PT_Uint8: |
15248 | return emitIncPopUint8(I); |
15249 | case PT_Sint16: |
15250 | return emitIncPopSint16(I); |
15251 | case PT_Uint16: |
15252 | return emitIncPopUint16(I); |
15253 | case PT_Sint32: |
15254 | return emitIncPopSint32(I); |
15255 | case PT_Uint32: |
15256 | return emitIncPopUint32(I); |
15257 | case PT_Sint64: |
15258 | return emitIncPopSint64(I); |
15259 | case PT_Uint64: |
15260 | return emitIncPopUint64(I); |
15261 | case PT_IntAP: |
15262 | return emitIncPopIntAP(I); |
15263 | case PT_IntAPS: |
15264 | return emitIncPopIntAPS(I); |
15265 | case PT_Bool: |
15266 | return emitIncPopBool(I); |
15267 | default: llvm_unreachable("invalid type: emitIncPop" ); |
15268 | } |
15269 | llvm_unreachable("invalid enum value" ); |
15270 | } |
15271 | #endif |
15272 | #ifdef GET_LINK_IMPL |
15273 | bool ByteCodeEmitter::emitIncPopSint8(const SourceInfo &L) { |
15274 | return emitOp<>(OP_IncPopSint8, L); |
15275 | } |
15276 | bool ByteCodeEmitter::emitIncPopUint8(const SourceInfo &L) { |
15277 | return emitOp<>(OP_IncPopUint8, L); |
15278 | } |
15279 | bool ByteCodeEmitter::emitIncPopSint16(const SourceInfo &L) { |
15280 | return emitOp<>(OP_IncPopSint16, L); |
15281 | } |
15282 | bool ByteCodeEmitter::emitIncPopUint16(const SourceInfo &L) { |
15283 | return emitOp<>(OP_IncPopUint16, L); |
15284 | } |
15285 | bool ByteCodeEmitter::emitIncPopSint32(const SourceInfo &L) { |
15286 | return emitOp<>(OP_IncPopSint32, L); |
15287 | } |
15288 | bool ByteCodeEmitter::emitIncPopUint32(const SourceInfo &L) { |
15289 | return emitOp<>(OP_IncPopUint32, L); |
15290 | } |
15291 | bool ByteCodeEmitter::emitIncPopSint64(const SourceInfo &L) { |
15292 | return emitOp<>(OP_IncPopSint64, L); |
15293 | } |
15294 | bool ByteCodeEmitter::emitIncPopUint64(const SourceInfo &L) { |
15295 | return emitOp<>(OP_IncPopUint64, L); |
15296 | } |
15297 | bool ByteCodeEmitter::emitIncPopIntAP(const SourceInfo &L) { |
15298 | return emitOp<>(OP_IncPopIntAP, L); |
15299 | } |
15300 | bool ByteCodeEmitter::emitIncPopIntAPS(const SourceInfo &L) { |
15301 | return emitOp<>(OP_IncPopIntAPS, L); |
15302 | } |
15303 | bool ByteCodeEmitter::emitIncPopBool(const SourceInfo &L) { |
15304 | return emitOp<>(OP_IncPopBool, L); |
15305 | } |
15306 | #endif |
15307 | #ifdef GET_EVAL_IMPL |
15308 | bool EvalEmitter::emitIncPopSint8(const SourceInfo &L) { |
15309 | if (!isActive()) return true; |
15310 | CurrentSource = L; |
15311 | return IncPop<PT_Sint8>(S, OpPC); |
15312 | } |
15313 | bool EvalEmitter::emitIncPopUint8(const SourceInfo &L) { |
15314 | if (!isActive()) return true; |
15315 | CurrentSource = L; |
15316 | return IncPop<PT_Uint8>(S, OpPC); |
15317 | } |
15318 | bool EvalEmitter::emitIncPopSint16(const SourceInfo &L) { |
15319 | if (!isActive()) return true; |
15320 | CurrentSource = L; |
15321 | return IncPop<PT_Sint16>(S, OpPC); |
15322 | } |
15323 | bool EvalEmitter::emitIncPopUint16(const SourceInfo &L) { |
15324 | if (!isActive()) return true; |
15325 | CurrentSource = L; |
15326 | return IncPop<PT_Uint16>(S, OpPC); |
15327 | } |
15328 | bool EvalEmitter::emitIncPopSint32(const SourceInfo &L) { |
15329 | if (!isActive()) return true; |
15330 | CurrentSource = L; |
15331 | return IncPop<PT_Sint32>(S, OpPC); |
15332 | } |
15333 | bool EvalEmitter::emitIncPopUint32(const SourceInfo &L) { |
15334 | if (!isActive()) return true; |
15335 | CurrentSource = L; |
15336 | return IncPop<PT_Uint32>(S, OpPC); |
15337 | } |
15338 | bool EvalEmitter::emitIncPopSint64(const SourceInfo &L) { |
15339 | if (!isActive()) return true; |
15340 | CurrentSource = L; |
15341 | return IncPop<PT_Sint64>(S, OpPC); |
15342 | } |
15343 | bool EvalEmitter::emitIncPopUint64(const SourceInfo &L) { |
15344 | if (!isActive()) return true; |
15345 | CurrentSource = L; |
15346 | return IncPop<PT_Uint64>(S, OpPC); |
15347 | } |
15348 | bool EvalEmitter::emitIncPopIntAP(const SourceInfo &L) { |
15349 | if (!isActive()) return true; |
15350 | CurrentSource = L; |
15351 | return IncPop<PT_IntAP>(S, OpPC); |
15352 | } |
15353 | bool EvalEmitter::emitIncPopIntAPS(const SourceInfo &L) { |
15354 | if (!isActive()) return true; |
15355 | CurrentSource = L; |
15356 | return IncPop<PT_IntAPS>(S, OpPC); |
15357 | } |
15358 | bool EvalEmitter::emitIncPopBool(const SourceInfo &L) { |
15359 | if (!isActive()) return true; |
15360 | CurrentSource = L; |
15361 | return IncPop<PT_Bool>(S, OpPC); |
15362 | } |
15363 | #endif |
15364 | #ifdef GET_OPCODE_NAMES |
15365 | OP_IncPtr, |
15366 | #endif |
15367 | #ifdef GET_INTERP |
15368 | case OP_IncPtr: { |
15369 | if (!IncPtr(S, OpPC)) |
15370 | return false; |
15371 | continue; |
15372 | } |
15373 | #endif |
15374 | #ifdef GET_DISASM |
15375 | case OP_IncPtr: |
15376 | PrintName("IncPtr" ); |
15377 | OS << "\t" << "\n" ; |
15378 | continue; |
15379 | #endif |
15380 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15381 | bool emitIncPtr(const SourceInfo &); |
15382 | #endif |
15383 | #ifdef GET_LINK_IMPL |
15384 | bool ByteCodeEmitter::emitIncPtr(const SourceInfo &L) { |
15385 | return emitOp<>(OP_IncPtr, L); |
15386 | } |
15387 | #endif |
15388 | #ifdef GET_EVAL_IMPL |
15389 | bool EvalEmitter::emitIncPtr(const SourceInfo &L) { |
15390 | if (!isActive()) return true; |
15391 | CurrentSource = L; |
15392 | return IncPtr(S, OpPC); |
15393 | } |
15394 | #endif |
15395 | #ifdef GET_OPCODE_NAMES |
15396 | OP_Incf, |
15397 | #endif |
15398 | #ifdef GET_INTERP |
15399 | case OP_Incf: { |
15400 | const auto V0 = ReadArg<llvm::RoundingMode>(S, PC); |
15401 | if (!Incf(S, OpPC, V0)) |
15402 | return false; |
15403 | continue; |
15404 | } |
15405 | #endif |
15406 | #ifdef GET_DISASM |
15407 | case OP_Incf: |
15408 | PrintName("Incf" ); |
15409 | OS << "\t" << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
15410 | continue; |
15411 | #endif |
15412 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15413 | bool emitIncf( llvm::RoundingMode , const SourceInfo &); |
15414 | #endif |
15415 | #ifdef GET_LINK_IMPL |
15416 | bool ByteCodeEmitter::emitIncf( llvm::RoundingMode A0, const SourceInfo &L) { |
15417 | return emitOp<llvm::RoundingMode>(OP_Incf, A0, L); |
15418 | } |
15419 | #endif |
15420 | #ifdef GET_EVAL_IMPL |
15421 | bool EvalEmitter::emitIncf( llvm::RoundingMode A0, const SourceInfo &L) { |
15422 | if (!isActive()) return true; |
15423 | CurrentSource = L; |
15424 | return Incf(S, OpPC, A0); |
15425 | } |
15426 | #endif |
15427 | #ifdef GET_OPCODE_NAMES |
15428 | OP_IncfPop, |
15429 | #endif |
15430 | #ifdef GET_INTERP |
15431 | case OP_IncfPop: { |
15432 | const auto V0 = ReadArg<llvm::RoundingMode>(S, PC); |
15433 | if (!IncfPop(S, OpPC, V0)) |
15434 | return false; |
15435 | continue; |
15436 | } |
15437 | #endif |
15438 | #ifdef GET_DISASM |
15439 | case OP_IncfPop: |
15440 | PrintName("IncfPop" ); |
15441 | OS << "\t" << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
15442 | continue; |
15443 | #endif |
15444 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15445 | bool emitIncfPop( llvm::RoundingMode , const SourceInfo &); |
15446 | #endif |
15447 | #ifdef GET_LINK_IMPL |
15448 | bool ByteCodeEmitter::emitIncfPop( llvm::RoundingMode A0, const SourceInfo &L) { |
15449 | return emitOp<llvm::RoundingMode>(OP_IncfPop, A0, L); |
15450 | } |
15451 | #endif |
15452 | #ifdef GET_EVAL_IMPL |
15453 | bool EvalEmitter::emitIncfPop( llvm::RoundingMode A0, const SourceInfo &L) { |
15454 | if (!isActive()) return true; |
15455 | CurrentSource = L; |
15456 | return IncfPop(S, OpPC, A0); |
15457 | } |
15458 | #endif |
15459 | #ifdef GET_OPCODE_NAMES |
15460 | OP_InitSint8, |
15461 | OP_InitUint8, |
15462 | OP_InitSint16, |
15463 | OP_InitUint16, |
15464 | OP_InitSint32, |
15465 | OP_InitUint32, |
15466 | OP_InitSint64, |
15467 | OP_InitUint64, |
15468 | OP_InitIntAP, |
15469 | OP_InitIntAPS, |
15470 | OP_InitBool, |
15471 | OP_InitPtr, |
15472 | OP_InitFnPtr, |
15473 | OP_InitMemberPtr, |
15474 | OP_InitFloat, |
15475 | #endif |
15476 | #ifdef GET_INTERP |
15477 | case OP_InitSint8: { |
15478 | if (!Init<PT_Sint8>(S, OpPC)) |
15479 | return false; |
15480 | continue; |
15481 | } |
15482 | case OP_InitUint8: { |
15483 | if (!Init<PT_Uint8>(S, OpPC)) |
15484 | return false; |
15485 | continue; |
15486 | } |
15487 | case OP_InitSint16: { |
15488 | if (!Init<PT_Sint16>(S, OpPC)) |
15489 | return false; |
15490 | continue; |
15491 | } |
15492 | case OP_InitUint16: { |
15493 | if (!Init<PT_Uint16>(S, OpPC)) |
15494 | return false; |
15495 | continue; |
15496 | } |
15497 | case OP_InitSint32: { |
15498 | if (!Init<PT_Sint32>(S, OpPC)) |
15499 | return false; |
15500 | continue; |
15501 | } |
15502 | case OP_InitUint32: { |
15503 | if (!Init<PT_Uint32>(S, OpPC)) |
15504 | return false; |
15505 | continue; |
15506 | } |
15507 | case OP_InitSint64: { |
15508 | if (!Init<PT_Sint64>(S, OpPC)) |
15509 | return false; |
15510 | continue; |
15511 | } |
15512 | case OP_InitUint64: { |
15513 | if (!Init<PT_Uint64>(S, OpPC)) |
15514 | return false; |
15515 | continue; |
15516 | } |
15517 | case OP_InitIntAP: { |
15518 | if (!Init<PT_IntAP>(S, OpPC)) |
15519 | return false; |
15520 | continue; |
15521 | } |
15522 | case OP_InitIntAPS: { |
15523 | if (!Init<PT_IntAPS>(S, OpPC)) |
15524 | return false; |
15525 | continue; |
15526 | } |
15527 | case OP_InitBool: { |
15528 | if (!Init<PT_Bool>(S, OpPC)) |
15529 | return false; |
15530 | continue; |
15531 | } |
15532 | case OP_InitPtr: { |
15533 | if (!Init<PT_Ptr>(S, OpPC)) |
15534 | return false; |
15535 | continue; |
15536 | } |
15537 | case OP_InitFnPtr: { |
15538 | if (!Init<PT_FnPtr>(S, OpPC)) |
15539 | return false; |
15540 | continue; |
15541 | } |
15542 | case OP_InitMemberPtr: { |
15543 | if (!Init<PT_MemberPtr>(S, OpPC)) |
15544 | return false; |
15545 | continue; |
15546 | } |
15547 | case OP_InitFloat: { |
15548 | if (!Init<PT_Float>(S, OpPC)) |
15549 | return false; |
15550 | continue; |
15551 | } |
15552 | #endif |
15553 | #ifdef GET_DISASM |
15554 | case OP_InitSint8: |
15555 | PrintName("InitSint8" ); |
15556 | OS << "\t" << "\n" ; |
15557 | continue; |
15558 | case OP_InitUint8: |
15559 | PrintName("InitUint8" ); |
15560 | OS << "\t" << "\n" ; |
15561 | continue; |
15562 | case OP_InitSint16: |
15563 | PrintName("InitSint16" ); |
15564 | OS << "\t" << "\n" ; |
15565 | continue; |
15566 | case OP_InitUint16: |
15567 | PrintName("InitUint16" ); |
15568 | OS << "\t" << "\n" ; |
15569 | continue; |
15570 | case OP_InitSint32: |
15571 | PrintName("InitSint32" ); |
15572 | OS << "\t" << "\n" ; |
15573 | continue; |
15574 | case OP_InitUint32: |
15575 | PrintName("InitUint32" ); |
15576 | OS << "\t" << "\n" ; |
15577 | continue; |
15578 | case OP_InitSint64: |
15579 | PrintName("InitSint64" ); |
15580 | OS << "\t" << "\n" ; |
15581 | continue; |
15582 | case OP_InitUint64: |
15583 | PrintName("InitUint64" ); |
15584 | OS << "\t" << "\n" ; |
15585 | continue; |
15586 | case OP_InitIntAP: |
15587 | PrintName("InitIntAP" ); |
15588 | OS << "\t" << "\n" ; |
15589 | continue; |
15590 | case OP_InitIntAPS: |
15591 | PrintName("InitIntAPS" ); |
15592 | OS << "\t" << "\n" ; |
15593 | continue; |
15594 | case OP_InitBool: |
15595 | PrintName("InitBool" ); |
15596 | OS << "\t" << "\n" ; |
15597 | continue; |
15598 | case OP_InitPtr: |
15599 | PrintName("InitPtr" ); |
15600 | OS << "\t" << "\n" ; |
15601 | continue; |
15602 | case OP_InitFnPtr: |
15603 | PrintName("InitFnPtr" ); |
15604 | OS << "\t" << "\n" ; |
15605 | continue; |
15606 | case OP_InitMemberPtr: |
15607 | PrintName("InitMemberPtr" ); |
15608 | OS << "\t" << "\n" ; |
15609 | continue; |
15610 | case OP_InitFloat: |
15611 | PrintName("InitFloat" ); |
15612 | OS << "\t" << "\n" ; |
15613 | continue; |
15614 | #endif |
15615 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15616 | bool emitInitSint8(const SourceInfo &); |
15617 | bool emitInitUint8(const SourceInfo &); |
15618 | bool emitInitSint16(const SourceInfo &); |
15619 | bool emitInitUint16(const SourceInfo &); |
15620 | bool emitInitSint32(const SourceInfo &); |
15621 | bool emitInitUint32(const SourceInfo &); |
15622 | bool emitInitSint64(const SourceInfo &); |
15623 | bool emitInitUint64(const SourceInfo &); |
15624 | bool emitInitIntAP(const SourceInfo &); |
15625 | bool emitInitIntAPS(const SourceInfo &); |
15626 | bool emitInitBool(const SourceInfo &); |
15627 | bool emitInitPtr(const SourceInfo &); |
15628 | bool emitInitFnPtr(const SourceInfo &); |
15629 | bool emitInitMemberPtr(const SourceInfo &); |
15630 | bool emitInitFloat(const SourceInfo &); |
15631 | #endif |
15632 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15633 | [[nodiscard]] bool emitInit(PrimType, const SourceInfo &I); |
15634 | #endif |
15635 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
15636 | bool |
15637 | #if defined(GET_EVAL_IMPL) |
15638 | EvalEmitter |
15639 | #else |
15640 | ByteCodeEmitter |
15641 | #endif |
15642 | ::emitInit(PrimType T0, const SourceInfo &I) { |
15643 | switch (T0) { |
15644 | case PT_Sint8: |
15645 | return emitInitSint8(I); |
15646 | case PT_Uint8: |
15647 | return emitInitUint8(I); |
15648 | case PT_Sint16: |
15649 | return emitInitSint16(I); |
15650 | case PT_Uint16: |
15651 | return emitInitUint16(I); |
15652 | case PT_Sint32: |
15653 | return emitInitSint32(I); |
15654 | case PT_Uint32: |
15655 | return emitInitUint32(I); |
15656 | case PT_Sint64: |
15657 | return emitInitSint64(I); |
15658 | case PT_Uint64: |
15659 | return emitInitUint64(I); |
15660 | case PT_IntAP: |
15661 | return emitInitIntAP(I); |
15662 | case PT_IntAPS: |
15663 | return emitInitIntAPS(I); |
15664 | case PT_Bool: |
15665 | return emitInitBool(I); |
15666 | case PT_Ptr: |
15667 | return emitInitPtr(I); |
15668 | case PT_FnPtr: |
15669 | return emitInitFnPtr(I); |
15670 | case PT_MemberPtr: |
15671 | return emitInitMemberPtr(I); |
15672 | case PT_Float: |
15673 | return emitInitFloat(I); |
15674 | } |
15675 | llvm_unreachable("invalid enum value" ); |
15676 | } |
15677 | #endif |
15678 | #ifdef GET_LINK_IMPL |
15679 | bool ByteCodeEmitter::emitInitSint8(const SourceInfo &L) { |
15680 | return emitOp<>(OP_InitSint8, L); |
15681 | } |
15682 | bool ByteCodeEmitter::emitInitUint8(const SourceInfo &L) { |
15683 | return emitOp<>(OP_InitUint8, L); |
15684 | } |
15685 | bool ByteCodeEmitter::emitInitSint16(const SourceInfo &L) { |
15686 | return emitOp<>(OP_InitSint16, L); |
15687 | } |
15688 | bool ByteCodeEmitter::emitInitUint16(const SourceInfo &L) { |
15689 | return emitOp<>(OP_InitUint16, L); |
15690 | } |
15691 | bool ByteCodeEmitter::emitInitSint32(const SourceInfo &L) { |
15692 | return emitOp<>(OP_InitSint32, L); |
15693 | } |
15694 | bool ByteCodeEmitter::emitInitUint32(const SourceInfo &L) { |
15695 | return emitOp<>(OP_InitUint32, L); |
15696 | } |
15697 | bool ByteCodeEmitter::emitInitSint64(const SourceInfo &L) { |
15698 | return emitOp<>(OP_InitSint64, L); |
15699 | } |
15700 | bool ByteCodeEmitter::emitInitUint64(const SourceInfo &L) { |
15701 | return emitOp<>(OP_InitUint64, L); |
15702 | } |
15703 | bool ByteCodeEmitter::emitInitIntAP(const SourceInfo &L) { |
15704 | return emitOp<>(OP_InitIntAP, L); |
15705 | } |
15706 | bool ByteCodeEmitter::emitInitIntAPS(const SourceInfo &L) { |
15707 | return emitOp<>(OP_InitIntAPS, L); |
15708 | } |
15709 | bool ByteCodeEmitter::emitInitBool(const SourceInfo &L) { |
15710 | return emitOp<>(OP_InitBool, L); |
15711 | } |
15712 | bool ByteCodeEmitter::emitInitPtr(const SourceInfo &L) { |
15713 | return emitOp<>(OP_InitPtr, L); |
15714 | } |
15715 | bool ByteCodeEmitter::emitInitFnPtr(const SourceInfo &L) { |
15716 | return emitOp<>(OP_InitFnPtr, L); |
15717 | } |
15718 | bool ByteCodeEmitter::emitInitMemberPtr(const SourceInfo &L) { |
15719 | return emitOp<>(OP_InitMemberPtr, L); |
15720 | } |
15721 | bool ByteCodeEmitter::emitInitFloat(const SourceInfo &L) { |
15722 | return emitOp<>(OP_InitFloat, L); |
15723 | } |
15724 | #endif |
15725 | #ifdef GET_EVAL_IMPL |
15726 | bool EvalEmitter::emitInitSint8(const SourceInfo &L) { |
15727 | if (!isActive()) return true; |
15728 | CurrentSource = L; |
15729 | return Init<PT_Sint8>(S, OpPC); |
15730 | } |
15731 | bool EvalEmitter::emitInitUint8(const SourceInfo &L) { |
15732 | if (!isActive()) return true; |
15733 | CurrentSource = L; |
15734 | return Init<PT_Uint8>(S, OpPC); |
15735 | } |
15736 | bool EvalEmitter::emitInitSint16(const SourceInfo &L) { |
15737 | if (!isActive()) return true; |
15738 | CurrentSource = L; |
15739 | return Init<PT_Sint16>(S, OpPC); |
15740 | } |
15741 | bool EvalEmitter::emitInitUint16(const SourceInfo &L) { |
15742 | if (!isActive()) return true; |
15743 | CurrentSource = L; |
15744 | return Init<PT_Uint16>(S, OpPC); |
15745 | } |
15746 | bool EvalEmitter::emitInitSint32(const SourceInfo &L) { |
15747 | if (!isActive()) return true; |
15748 | CurrentSource = L; |
15749 | return Init<PT_Sint32>(S, OpPC); |
15750 | } |
15751 | bool EvalEmitter::emitInitUint32(const SourceInfo &L) { |
15752 | if (!isActive()) return true; |
15753 | CurrentSource = L; |
15754 | return Init<PT_Uint32>(S, OpPC); |
15755 | } |
15756 | bool EvalEmitter::emitInitSint64(const SourceInfo &L) { |
15757 | if (!isActive()) return true; |
15758 | CurrentSource = L; |
15759 | return Init<PT_Sint64>(S, OpPC); |
15760 | } |
15761 | bool EvalEmitter::emitInitUint64(const SourceInfo &L) { |
15762 | if (!isActive()) return true; |
15763 | CurrentSource = L; |
15764 | return Init<PT_Uint64>(S, OpPC); |
15765 | } |
15766 | bool EvalEmitter::emitInitIntAP(const SourceInfo &L) { |
15767 | if (!isActive()) return true; |
15768 | CurrentSource = L; |
15769 | return Init<PT_IntAP>(S, OpPC); |
15770 | } |
15771 | bool EvalEmitter::emitInitIntAPS(const SourceInfo &L) { |
15772 | if (!isActive()) return true; |
15773 | CurrentSource = L; |
15774 | return Init<PT_IntAPS>(S, OpPC); |
15775 | } |
15776 | bool EvalEmitter::emitInitBool(const SourceInfo &L) { |
15777 | if (!isActive()) return true; |
15778 | CurrentSource = L; |
15779 | return Init<PT_Bool>(S, OpPC); |
15780 | } |
15781 | bool EvalEmitter::emitInitPtr(const SourceInfo &L) { |
15782 | if (!isActive()) return true; |
15783 | CurrentSource = L; |
15784 | return Init<PT_Ptr>(S, OpPC); |
15785 | } |
15786 | bool EvalEmitter::emitInitFnPtr(const SourceInfo &L) { |
15787 | if (!isActive()) return true; |
15788 | CurrentSource = L; |
15789 | return Init<PT_FnPtr>(S, OpPC); |
15790 | } |
15791 | bool EvalEmitter::emitInitMemberPtr(const SourceInfo &L) { |
15792 | if (!isActive()) return true; |
15793 | CurrentSource = L; |
15794 | return Init<PT_MemberPtr>(S, OpPC); |
15795 | } |
15796 | bool EvalEmitter::emitInitFloat(const SourceInfo &L) { |
15797 | if (!isActive()) return true; |
15798 | CurrentSource = L; |
15799 | return Init<PT_Float>(S, OpPC); |
15800 | } |
15801 | #endif |
15802 | #ifdef GET_OPCODE_NAMES |
15803 | OP_InitBitFieldSint8, |
15804 | OP_InitBitFieldUint8, |
15805 | OP_InitBitFieldSint16, |
15806 | OP_InitBitFieldUint16, |
15807 | OP_InitBitFieldSint32, |
15808 | OP_InitBitFieldUint32, |
15809 | OP_InitBitFieldSint64, |
15810 | OP_InitBitFieldUint64, |
15811 | OP_InitBitFieldIntAP, |
15812 | OP_InitBitFieldIntAPS, |
15813 | OP_InitBitFieldBool, |
15814 | #endif |
15815 | #ifdef GET_INTERP |
15816 | case OP_InitBitFieldSint8: { |
15817 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15818 | if (!InitBitField<PT_Sint8>(S, OpPC, V0)) |
15819 | return false; |
15820 | continue; |
15821 | } |
15822 | case OP_InitBitFieldUint8: { |
15823 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15824 | if (!InitBitField<PT_Uint8>(S, OpPC, V0)) |
15825 | return false; |
15826 | continue; |
15827 | } |
15828 | case OP_InitBitFieldSint16: { |
15829 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15830 | if (!InitBitField<PT_Sint16>(S, OpPC, V0)) |
15831 | return false; |
15832 | continue; |
15833 | } |
15834 | case OP_InitBitFieldUint16: { |
15835 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15836 | if (!InitBitField<PT_Uint16>(S, OpPC, V0)) |
15837 | return false; |
15838 | continue; |
15839 | } |
15840 | case OP_InitBitFieldSint32: { |
15841 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15842 | if (!InitBitField<PT_Sint32>(S, OpPC, V0)) |
15843 | return false; |
15844 | continue; |
15845 | } |
15846 | case OP_InitBitFieldUint32: { |
15847 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15848 | if (!InitBitField<PT_Uint32>(S, OpPC, V0)) |
15849 | return false; |
15850 | continue; |
15851 | } |
15852 | case OP_InitBitFieldSint64: { |
15853 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15854 | if (!InitBitField<PT_Sint64>(S, OpPC, V0)) |
15855 | return false; |
15856 | continue; |
15857 | } |
15858 | case OP_InitBitFieldUint64: { |
15859 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15860 | if (!InitBitField<PT_Uint64>(S, OpPC, V0)) |
15861 | return false; |
15862 | continue; |
15863 | } |
15864 | case OP_InitBitFieldIntAP: { |
15865 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15866 | if (!InitBitField<PT_IntAP>(S, OpPC, V0)) |
15867 | return false; |
15868 | continue; |
15869 | } |
15870 | case OP_InitBitFieldIntAPS: { |
15871 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15872 | if (!InitBitField<PT_IntAPS>(S, OpPC, V0)) |
15873 | return false; |
15874 | continue; |
15875 | } |
15876 | case OP_InitBitFieldBool: { |
15877 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
15878 | if (!InitBitField<PT_Bool>(S, OpPC, V0)) |
15879 | return false; |
15880 | continue; |
15881 | } |
15882 | #endif |
15883 | #ifdef GET_DISASM |
15884 | case OP_InitBitFieldSint8: |
15885 | PrintName("InitBitFieldSint8" ); |
15886 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15887 | continue; |
15888 | case OP_InitBitFieldUint8: |
15889 | PrintName("InitBitFieldUint8" ); |
15890 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15891 | continue; |
15892 | case OP_InitBitFieldSint16: |
15893 | PrintName("InitBitFieldSint16" ); |
15894 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15895 | continue; |
15896 | case OP_InitBitFieldUint16: |
15897 | PrintName("InitBitFieldUint16" ); |
15898 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15899 | continue; |
15900 | case OP_InitBitFieldSint32: |
15901 | PrintName("InitBitFieldSint32" ); |
15902 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15903 | continue; |
15904 | case OP_InitBitFieldUint32: |
15905 | PrintName("InitBitFieldUint32" ); |
15906 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15907 | continue; |
15908 | case OP_InitBitFieldSint64: |
15909 | PrintName("InitBitFieldSint64" ); |
15910 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15911 | continue; |
15912 | case OP_InitBitFieldUint64: |
15913 | PrintName("InitBitFieldUint64" ); |
15914 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15915 | continue; |
15916 | case OP_InitBitFieldIntAP: |
15917 | PrintName("InitBitFieldIntAP" ); |
15918 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15919 | continue; |
15920 | case OP_InitBitFieldIntAPS: |
15921 | PrintName("InitBitFieldIntAPS" ); |
15922 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15923 | continue; |
15924 | case OP_InitBitFieldBool: |
15925 | PrintName("InitBitFieldBool" ); |
15926 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << "\n" ; |
15927 | continue; |
15928 | #endif |
15929 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15930 | bool emitInitBitFieldSint8( const Record::Field * , const SourceInfo &); |
15931 | bool emitInitBitFieldUint8( const Record::Field * , const SourceInfo &); |
15932 | bool emitInitBitFieldSint16( const Record::Field * , const SourceInfo &); |
15933 | bool emitInitBitFieldUint16( const Record::Field * , const SourceInfo &); |
15934 | bool emitInitBitFieldSint32( const Record::Field * , const SourceInfo &); |
15935 | bool emitInitBitFieldUint32( const Record::Field * , const SourceInfo &); |
15936 | bool emitInitBitFieldSint64( const Record::Field * , const SourceInfo &); |
15937 | bool emitInitBitFieldUint64( const Record::Field * , const SourceInfo &); |
15938 | bool emitInitBitFieldIntAP( const Record::Field * , const SourceInfo &); |
15939 | bool emitInitBitFieldIntAPS( const Record::Field * , const SourceInfo &); |
15940 | bool emitInitBitFieldBool( const Record::Field * , const SourceInfo &); |
15941 | #endif |
15942 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
15943 | [[nodiscard]] bool emitInitBitField(PrimType, const Record::Field *, const SourceInfo &I); |
15944 | #endif |
15945 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
15946 | bool |
15947 | #if defined(GET_EVAL_IMPL) |
15948 | EvalEmitter |
15949 | #else |
15950 | ByteCodeEmitter |
15951 | #endif |
15952 | ::emitInitBitField(PrimType T0, const Record::Field * A0, const SourceInfo &I) { |
15953 | switch (T0) { |
15954 | case PT_Sint8: |
15955 | return emitInitBitFieldSint8(A0, I); |
15956 | case PT_Uint8: |
15957 | return emitInitBitFieldUint8(A0, I); |
15958 | case PT_Sint16: |
15959 | return emitInitBitFieldSint16(A0, I); |
15960 | case PT_Uint16: |
15961 | return emitInitBitFieldUint16(A0, I); |
15962 | case PT_Sint32: |
15963 | return emitInitBitFieldSint32(A0, I); |
15964 | case PT_Uint32: |
15965 | return emitInitBitFieldUint32(A0, I); |
15966 | case PT_Sint64: |
15967 | return emitInitBitFieldSint64(A0, I); |
15968 | case PT_Uint64: |
15969 | return emitInitBitFieldUint64(A0, I); |
15970 | case PT_IntAP: |
15971 | return emitInitBitFieldIntAP(A0, I); |
15972 | case PT_IntAPS: |
15973 | return emitInitBitFieldIntAPS(A0, I); |
15974 | case PT_Bool: |
15975 | return emitInitBitFieldBool(A0, I); |
15976 | default: llvm_unreachable("invalid type: emitInitBitField" ); |
15977 | } |
15978 | llvm_unreachable("invalid enum value" ); |
15979 | } |
15980 | #endif |
15981 | #ifdef GET_LINK_IMPL |
15982 | bool ByteCodeEmitter::emitInitBitFieldSint8( const Record::Field * A0, const SourceInfo &L) { |
15983 | return emitOp<const Record::Field *>(OP_InitBitFieldSint8, A0, L); |
15984 | } |
15985 | bool ByteCodeEmitter::emitInitBitFieldUint8( const Record::Field * A0, const SourceInfo &L) { |
15986 | return emitOp<const Record::Field *>(OP_InitBitFieldUint8, A0, L); |
15987 | } |
15988 | bool ByteCodeEmitter::emitInitBitFieldSint16( const Record::Field * A0, const SourceInfo &L) { |
15989 | return emitOp<const Record::Field *>(OP_InitBitFieldSint16, A0, L); |
15990 | } |
15991 | bool ByteCodeEmitter::emitInitBitFieldUint16( const Record::Field * A0, const SourceInfo &L) { |
15992 | return emitOp<const Record::Field *>(OP_InitBitFieldUint16, A0, L); |
15993 | } |
15994 | bool ByteCodeEmitter::emitInitBitFieldSint32( const Record::Field * A0, const SourceInfo &L) { |
15995 | return emitOp<const Record::Field *>(OP_InitBitFieldSint32, A0, L); |
15996 | } |
15997 | bool ByteCodeEmitter::emitInitBitFieldUint32( const Record::Field * A0, const SourceInfo &L) { |
15998 | return emitOp<const Record::Field *>(OP_InitBitFieldUint32, A0, L); |
15999 | } |
16000 | bool ByteCodeEmitter::emitInitBitFieldSint64( const Record::Field * A0, const SourceInfo &L) { |
16001 | return emitOp<const Record::Field *>(OP_InitBitFieldSint64, A0, L); |
16002 | } |
16003 | bool ByteCodeEmitter::emitInitBitFieldUint64( const Record::Field * A0, const SourceInfo &L) { |
16004 | return emitOp<const Record::Field *>(OP_InitBitFieldUint64, A0, L); |
16005 | } |
16006 | bool ByteCodeEmitter::emitInitBitFieldIntAP( const Record::Field * A0, const SourceInfo &L) { |
16007 | return emitOp<const Record::Field *>(OP_InitBitFieldIntAP, A0, L); |
16008 | } |
16009 | bool ByteCodeEmitter::emitInitBitFieldIntAPS( const Record::Field * A0, const SourceInfo &L) { |
16010 | return emitOp<const Record::Field *>(OP_InitBitFieldIntAPS, A0, L); |
16011 | } |
16012 | bool ByteCodeEmitter::emitInitBitFieldBool( const Record::Field * A0, const SourceInfo &L) { |
16013 | return emitOp<const Record::Field *>(OP_InitBitFieldBool, A0, L); |
16014 | } |
16015 | #endif |
16016 | #ifdef GET_EVAL_IMPL |
16017 | bool EvalEmitter::emitInitBitFieldSint8( const Record::Field * A0, const SourceInfo &L) { |
16018 | if (!isActive()) return true; |
16019 | CurrentSource = L; |
16020 | return InitBitField<PT_Sint8>(S, OpPC, A0); |
16021 | } |
16022 | bool EvalEmitter::emitInitBitFieldUint8( const Record::Field * A0, const SourceInfo &L) { |
16023 | if (!isActive()) return true; |
16024 | CurrentSource = L; |
16025 | return InitBitField<PT_Uint8>(S, OpPC, A0); |
16026 | } |
16027 | bool EvalEmitter::emitInitBitFieldSint16( const Record::Field * A0, const SourceInfo &L) { |
16028 | if (!isActive()) return true; |
16029 | CurrentSource = L; |
16030 | return InitBitField<PT_Sint16>(S, OpPC, A0); |
16031 | } |
16032 | bool EvalEmitter::emitInitBitFieldUint16( const Record::Field * A0, const SourceInfo &L) { |
16033 | if (!isActive()) return true; |
16034 | CurrentSource = L; |
16035 | return InitBitField<PT_Uint16>(S, OpPC, A0); |
16036 | } |
16037 | bool EvalEmitter::emitInitBitFieldSint32( const Record::Field * A0, const SourceInfo &L) { |
16038 | if (!isActive()) return true; |
16039 | CurrentSource = L; |
16040 | return InitBitField<PT_Sint32>(S, OpPC, A0); |
16041 | } |
16042 | bool EvalEmitter::emitInitBitFieldUint32( const Record::Field * A0, const SourceInfo &L) { |
16043 | if (!isActive()) return true; |
16044 | CurrentSource = L; |
16045 | return InitBitField<PT_Uint32>(S, OpPC, A0); |
16046 | } |
16047 | bool EvalEmitter::emitInitBitFieldSint64( const Record::Field * A0, const SourceInfo &L) { |
16048 | if (!isActive()) return true; |
16049 | CurrentSource = L; |
16050 | return InitBitField<PT_Sint64>(S, OpPC, A0); |
16051 | } |
16052 | bool EvalEmitter::emitInitBitFieldUint64( const Record::Field * A0, const SourceInfo &L) { |
16053 | if (!isActive()) return true; |
16054 | CurrentSource = L; |
16055 | return InitBitField<PT_Uint64>(S, OpPC, A0); |
16056 | } |
16057 | bool EvalEmitter::emitInitBitFieldIntAP( const Record::Field * A0, const SourceInfo &L) { |
16058 | if (!isActive()) return true; |
16059 | CurrentSource = L; |
16060 | return InitBitField<PT_IntAP>(S, OpPC, A0); |
16061 | } |
16062 | bool EvalEmitter::emitInitBitFieldIntAPS( const Record::Field * A0, const SourceInfo &L) { |
16063 | if (!isActive()) return true; |
16064 | CurrentSource = L; |
16065 | return InitBitField<PT_IntAPS>(S, OpPC, A0); |
16066 | } |
16067 | bool EvalEmitter::emitInitBitFieldBool( const Record::Field * A0, const SourceInfo &L) { |
16068 | if (!isActive()) return true; |
16069 | CurrentSource = L; |
16070 | return InitBitField<PT_Bool>(S, OpPC, A0); |
16071 | } |
16072 | #endif |
16073 | #ifdef GET_OPCODE_NAMES |
16074 | OP_InitElemSint8, |
16075 | OP_InitElemUint8, |
16076 | OP_InitElemSint16, |
16077 | OP_InitElemUint16, |
16078 | OP_InitElemSint32, |
16079 | OP_InitElemUint32, |
16080 | OP_InitElemSint64, |
16081 | OP_InitElemUint64, |
16082 | OP_InitElemIntAP, |
16083 | OP_InitElemIntAPS, |
16084 | OP_InitElemBool, |
16085 | OP_InitElemPtr, |
16086 | OP_InitElemFnPtr, |
16087 | OP_InitElemMemberPtr, |
16088 | OP_InitElemFloat, |
16089 | #endif |
16090 | #ifdef GET_INTERP |
16091 | case OP_InitElemSint8: { |
16092 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16093 | if (!InitElem<PT_Sint8>(S, OpPC, V0)) |
16094 | return false; |
16095 | continue; |
16096 | } |
16097 | case OP_InitElemUint8: { |
16098 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16099 | if (!InitElem<PT_Uint8>(S, OpPC, V0)) |
16100 | return false; |
16101 | continue; |
16102 | } |
16103 | case OP_InitElemSint16: { |
16104 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16105 | if (!InitElem<PT_Sint16>(S, OpPC, V0)) |
16106 | return false; |
16107 | continue; |
16108 | } |
16109 | case OP_InitElemUint16: { |
16110 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16111 | if (!InitElem<PT_Uint16>(S, OpPC, V0)) |
16112 | return false; |
16113 | continue; |
16114 | } |
16115 | case OP_InitElemSint32: { |
16116 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16117 | if (!InitElem<PT_Sint32>(S, OpPC, V0)) |
16118 | return false; |
16119 | continue; |
16120 | } |
16121 | case OP_InitElemUint32: { |
16122 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16123 | if (!InitElem<PT_Uint32>(S, OpPC, V0)) |
16124 | return false; |
16125 | continue; |
16126 | } |
16127 | case OP_InitElemSint64: { |
16128 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16129 | if (!InitElem<PT_Sint64>(S, OpPC, V0)) |
16130 | return false; |
16131 | continue; |
16132 | } |
16133 | case OP_InitElemUint64: { |
16134 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16135 | if (!InitElem<PT_Uint64>(S, OpPC, V0)) |
16136 | return false; |
16137 | continue; |
16138 | } |
16139 | case OP_InitElemIntAP: { |
16140 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16141 | if (!InitElem<PT_IntAP>(S, OpPC, V0)) |
16142 | return false; |
16143 | continue; |
16144 | } |
16145 | case OP_InitElemIntAPS: { |
16146 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16147 | if (!InitElem<PT_IntAPS>(S, OpPC, V0)) |
16148 | return false; |
16149 | continue; |
16150 | } |
16151 | case OP_InitElemBool: { |
16152 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16153 | if (!InitElem<PT_Bool>(S, OpPC, V0)) |
16154 | return false; |
16155 | continue; |
16156 | } |
16157 | case OP_InitElemPtr: { |
16158 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16159 | if (!InitElem<PT_Ptr>(S, OpPC, V0)) |
16160 | return false; |
16161 | continue; |
16162 | } |
16163 | case OP_InitElemFnPtr: { |
16164 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16165 | if (!InitElem<PT_FnPtr>(S, OpPC, V0)) |
16166 | return false; |
16167 | continue; |
16168 | } |
16169 | case OP_InitElemMemberPtr: { |
16170 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16171 | if (!InitElem<PT_MemberPtr>(S, OpPC, V0)) |
16172 | return false; |
16173 | continue; |
16174 | } |
16175 | case OP_InitElemFloat: { |
16176 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16177 | if (!InitElem<PT_Float>(S, OpPC, V0)) |
16178 | return false; |
16179 | continue; |
16180 | } |
16181 | #endif |
16182 | #ifdef GET_DISASM |
16183 | case OP_InitElemSint8: |
16184 | PrintName("InitElemSint8" ); |
16185 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16186 | continue; |
16187 | case OP_InitElemUint8: |
16188 | PrintName("InitElemUint8" ); |
16189 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16190 | continue; |
16191 | case OP_InitElemSint16: |
16192 | PrintName("InitElemSint16" ); |
16193 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16194 | continue; |
16195 | case OP_InitElemUint16: |
16196 | PrintName("InitElemUint16" ); |
16197 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16198 | continue; |
16199 | case OP_InitElemSint32: |
16200 | PrintName("InitElemSint32" ); |
16201 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16202 | continue; |
16203 | case OP_InitElemUint32: |
16204 | PrintName("InitElemUint32" ); |
16205 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16206 | continue; |
16207 | case OP_InitElemSint64: |
16208 | PrintName("InitElemSint64" ); |
16209 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16210 | continue; |
16211 | case OP_InitElemUint64: |
16212 | PrintName("InitElemUint64" ); |
16213 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16214 | continue; |
16215 | case OP_InitElemIntAP: |
16216 | PrintName("InitElemIntAP" ); |
16217 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16218 | continue; |
16219 | case OP_InitElemIntAPS: |
16220 | PrintName("InitElemIntAPS" ); |
16221 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16222 | continue; |
16223 | case OP_InitElemBool: |
16224 | PrintName("InitElemBool" ); |
16225 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16226 | continue; |
16227 | case OP_InitElemPtr: |
16228 | PrintName("InitElemPtr" ); |
16229 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16230 | continue; |
16231 | case OP_InitElemFnPtr: |
16232 | PrintName("InitElemFnPtr" ); |
16233 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16234 | continue; |
16235 | case OP_InitElemMemberPtr: |
16236 | PrintName("InitElemMemberPtr" ); |
16237 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16238 | continue; |
16239 | case OP_InitElemFloat: |
16240 | PrintName("InitElemFloat" ); |
16241 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16242 | continue; |
16243 | #endif |
16244 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
16245 | bool emitInitElemSint8( uint32_t , const SourceInfo &); |
16246 | bool emitInitElemUint8( uint32_t , const SourceInfo &); |
16247 | bool emitInitElemSint16( uint32_t , const SourceInfo &); |
16248 | bool emitInitElemUint16( uint32_t , const SourceInfo &); |
16249 | bool emitInitElemSint32( uint32_t , const SourceInfo &); |
16250 | bool emitInitElemUint32( uint32_t , const SourceInfo &); |
16251 | bool emitInitElemSint64( uint32_t , const SourceInfo &); |
16252 | bool emitInitElemUint64( uint32_t , const SourceInfo &); |
16253 | bool emitInitElemIntAP( uint32_t , const SourceInfo &); |
16254 | bool emitInitElemIntAPS( uint32_t , const SourceInfo &); |
16255 | bool emitInitElemBool( uint32_t , const SourceInfo &); |
16256 | bool emitInitElemPtr( uint32_t , const SourceInfo &); |
16257 | bool emitInitElemFnPtr( uint32_t , const SourceInfo &); |
16258 | bool emitInitElemMemberPtr( uint32_t , const SourceInfo &); |
16259 | bool emitInitElemFloat( uint32_t , const SourceInfo &); |
16260 | #endif |
16261 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
16262 | [[nodiscard]] bool emitInitElem(PrimType, uint32_t, const SourceInfo &I); |
16263 | #endif |
16264 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
16265 | bool |
16266 | #if defined(GET_EVAL_IMPL) |
16267 | EvalEmitter |
16268 | #else |
16269 | ByteCodeEmitter |
16270 | #endif |
16271 | ::emitInitElem(PrimType T0, uint32_t A0, const SourceInfo &I) { |
16272 | switch (T0) { |
16273 | case PT_Sint8: |
16274 | return emitInitElemSint8(A0, I); |
16275 | case PT_Uint8: |
16276 | return emitInitElemUint8(A0, I); |
16277 | case PT_Sint16: |
16278 | return emitInitElemSint16(A0, I); |
16279 | case PT_Uint16: |
16280 | return emitInitElemUint16(A0, I); |
16281 | case PT_Sint32: |
16282 | return emitInitElemSint32(A0, I); |
16283 | case PT_Uint32: |
16284 | return emitInitElemUint32(A0, I); |
16285 | case PT_Sint64: |
16286 | return emitInitElemSint64(A0, I); |
16287 | case PT_Uint64: |
16288 | return emitInitElemUint64(A0, I); |
16289 | case PT_IntAP: |
16290 | return emitInitElemIntAP(A0, I); |
16291 | case PT_IntAPS: |
16292 | return emitInitElemIntAPS(A0, I); |
16293 | case PT_Bool: |
16294 | return emitInitElemBool(A0, I); |
16295 | case PT_Ptr: |
16296 | return emitInitElemPtr(A0, I); |
16297 | case PT_FnPtr: |
16298 | return emitInitElemFnPtr(A0, I); |
16299 | case PT_MemberPtr: |
16300 | return emitInitElemMemberPtr(A0, I); |
16301 | case PT_Float: |
16302 | return emitInitElemFloat(A0, I); |
16303 | } |
16304 | llvm_unreachable("invalid enum value" ); |
16305 | } |
16306 | #endif |
16307 | #ifdef GET_LINK_IMPL |
16308 | bool ByteCodeEmitter::emitInitElemSint8( uint32_t A0, const SourceInfo &L) { |
16309 | return emitOp<uint32_t>(OP_InitElemSint8, A0, L); |
16310 | } |
16311 | bool ByteCodeEmitter::emitInitElemUint8( uint32_t A0, const SourceInfo &L) { |
16312 | return emitOp<uint32_t>(OP_InitElemUint8, A0, L); |
16313 | } |
16314 | bool ByteCodeEmitter::emitInitElemSint16( uint32_t A0, const SourceInfo &L) { |
16315 | return emitOp<uint32_t>(OP_InitElemSint16, A0, L); |
16316 | } |
16317 | bool ByteCodeEmitter::emitInitElemUint16( uint32_t A0, const SourceInfo &L) { |
16318 | return emitOp<uint32_t>(OP_InitElemUint16, A0, L); |
16319 | } |
16320 | bool ByteCodeEmitter::emitInitElemSint32( uint32_t A0, const SourceInfo &L) { |
16321 | return emitOp<uint32_t>(OP_InitElemSint32, A0, L); |
16322 | } |
16323 | bool ByteCodeEmitter::emitInitElemUint32( uint32_t A0, const SourceInfo &L) { |
16324 | return emitOp<uint32_t>(OP_InitElemUint32, A0, L); |
16325 | } |
16326 | bool ByteCodeEmitter::emitInitElemSint64( uint32_t A0, const SourceInfo &L) { |
16327 | return emitOp<uint32_t>(OP_InitElemSint64, A0, L); |
16328 | } |
16329 | bool ByteCodeEmitter::emitInitElemUint64( uint32_t A0, const SourceInfo &L) { |
16330 | return emitOp<uint32_t>(OP_InitElemUint64, A0, L); |
16331 | } |
16332 | bool ByteCodeEmitter::emitInitElemIntAP( uint32_t A0, const SourceInfo &L) { |
16333 | return emitOp<uint32_t>(OP_InitElemIntAP, A0, L); |
16334 | } |
16335 | bool ByteCodeEmitter::emitInitElemIntAPS( uint32_t A0, const SourceInfo &L) { |
16336 | return emitOp<uint32_t>(OP_InitElemIntAPS, A0, L); |
16337 | } |
16338 | bool ByteCodeEmitter::emitInitElemBool( uint32_t A0, const SourceInfo &L) { |
16339 | return emitOp<uint32_t>(OP_InitElemBool, A0, L); |
16340 | } |
16341 | bool ByteCodeEmitter::emitInitElemPtr( uint32_t A0, const SourceInfo &L) { |
16342 | return emitOp<uint32_t>(OP_InitElemPtr, A0, L); |
16343 | } |
16344 | bool ByteCodeEmitter::emitInitElemFnPtr( uint32_t A0, const SourceInfo &L) { |
16345 | return emitOp<uint32_t>(OP_InitElemFnPtr, A0, L); |
16346 | } |
16347 | bool ByteCodeEmitter::emitInitElemMemberPtr( uint32_t A0, const SourceInfo &L) { |
16348 | return emitOp<uint32_t>(OP_InitElemMemberPtr, A0, L); |
16349 | } |
16350 | bool ByteCodeEmitter::emitInitElemFloat( uint32_t A0, const SourceInfo &L) { |
16351 | return emitOp<uint32_t>(OP_InitElemFloat, A0, L); |
16352 | } |
16353 | #endif |
16354 | #ifdef GET_EVAL_IMPL |
16355 | bool EvalEmitter::emitInitElemSint8( uint32_t A0, const SourceInfo &L) { |
16356 | if (!isActive()) return true; |
16357 | CurrentSource = L; |
16358 | return InitElem<PT_Sint8>(S, OpPC, A0); |
16359 | } |
16360 | bool EvalEmitter::emitInitElemUint8( uint32_t A0, const SourceInfo &L) { |
16361 | if (!isActive()) return true; |
16362 | CurrentSource = L; |
16363 | return InitElem<PT_Uint8>(S, OpPC, A0); |
16364 | } |
16365 | bool EvalEmitter::emitInitElemSint16( uint32_t A0, const SourceInfo &L) { |
16366 | if (!isActive()) return true; |
16367 | CurrentSource = L; |
16368 | return InitElem<PT_Sint16>(S, OpPC, A0); |
16369 | } |
16370 | bool EvalEmitter::emitInitElemUint16( uint32_t A0, const SourceInfo &L) { |
16371 | if (!isActive()) return true; |
16372 | CurrentSource = L; |
16373 | return InitElem<PT_Uint16>(S, OpPC, A0); |
16374 | } |
16375 | bool EvalEmitter::emitInitElemSint32( uint32_t A0, const SourceInfo &L) { |
16376 | if (!isActive()) return true; |
16377 | CurrentSource = L; |
16378 | return InitElem<PT_Sint32>(S, OpPC, A0); |
16379 | } |
16380 | bool EvalEmitter::emitInitElemUint32( uint32_t A0, const SourceInfo &L) { |
16381 | if (!isActive()) return true; |
16382 | CurrentSource = L; |
16383 | return InitElem<PT_Uint32>(S, OpPC, A0); |
16384 | } |
16385 | bool EvalEmitter::emitInitElemSint64( uint32_t A0, const SourceInfo &L) { |
16386 | if (!isActive()) return true; |
16387 | CurrentSource = L; |
16388 | return InitElem<PT_Sint64>(S, OpPC, A0); |
16389 | } |
16390 | bool EvalEmitter::emitInitElemUint64( uint32_t A0, const SourceInfo &L) { |
16391 | if (!isActive()) return true; |
16392 | CurrentSource = L; |
16393 | return InitElem<PT_Uint64>(S, OpPC, A0); |
16394 | } |
16395 | bool EvalEmitter::emitInitElemIntAP( uint32_t A0, const SourceInfo &L) { |
16396 | if (!isActive()) return true; |
16397 | CurrentSource = L; |
16398 | return InitElem<PT_IntAP>(S, OpPC, A0); |
16399 | } |
16400 | bool EvalEmitter::emitInitElemIntAPS( uint32_t A0, const SourceInfo &L) { |
16401 | if (!isActive()) return true; |
16402 | CurrentSource = L; |
16403 | return InitElem<PT_IntAPS>(S, OpPC, A0); |
16404 | } |
16405 | bool EvalEmitter::emitInitElemBool( uint32_t A0, const SourceInfo &L) { |
16406 | if (!isActive()) return true; |
16407 | CurrentSource = L; |
16408 | return InitElem<PT_Bool>(S, OpPC, A0); |
16409 | } |
16410 | bool EvalEmitter::emitInitElemPtr( uint32_t A0, const SourceInfo &L) { |
16411 | if (!isActive()) return true; |
16412 | CurrentSource = L; |
16413 | return InitElem<PT_Ptr>(S, OpPC, A0); |
16414 | } |
16415 | bool EvalEmitter::emitInitElemFnPtr( uint32_t A0, const SourceInfo &L) { |
16416 | if (!isActive()) return true; |
16417 | CurrentSource = L; |
16418 | return InitElem<PT_FnPtr>(S, OpPC, A0); |
16419 | } |
16420 | bool EvalEmitter::emitInitElemMemberPtr( uint32_t A0, const SourceInfo &L) { |
16421 | if (!isActive()) return true; |
16422 | CurrentSource = L; |
16423 | return InitElem<PT_MemberPtr>(S, OpPC, A0); |
16424 | } |
16425 | bool EvalEmitter::emitInitElemFloat( uint32_t A0, const SourceInfo &L) { |
16426 | if (!isActive()) return true; |
16427 | CurrentSource = L; |
16428 | return InitElem<PT_Float>(S, OpPC, A0); |
16429 | } |
16430 | #endif |
16431 | #ifdef GET_OPCODE_NAMES |
16432 | OP_InitElemPopSint8, |
16433 | OP_InitElemPopUint8, |
16434 | OP_InitElemPopSint16, |
16435 | OP_InitElemPopUint16, |
16436 | OP_InitElemPopSint32, |
16437 | OP_InitElemPopUint32, |
16438 | OP_InitElemPopSint64, |
16439 | OP_InitElemPopUint64, |
16440 | OP_InitElemPopIntAP, |
16441 | OP_InitElemPopIntAPS, |
16442 | OP_InitElemPopBool, |
16443 | OP_InitElemPopPtr, |
16444 | OP_InitElemPopFnPtr, |
16445 | OP_InitElemPopMemberPtr, |
16446 | OP_InitElemPopFloat, |
16447 | #endif |
16448 | #ifdef GET_INTERP |
16449 | case OP_InitElemPopSint8: { |
16450 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16451 | if (!InitElemPop<PT_Sint8>(S, OpPC, V0)) |
16452 | return false; |
16453 | continue; |
16454 | } |
16455 | case OP_InitElemPopUint8: { |
16456 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16457 | if (!InitElemPop<PT_Uint8>(S, OpPC, V0)) |
16458 | return false; |
16459 | continue; |
16460 | } |
16461 | case OP_InitElemPopSint16: { |
16462 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16463 | if (!InitElemPop<PT_Sint16>(S, OpPC, V0)) |
16464 | return false; |
16465 | continue; |
16466 | } |
16467 | case OP_InitElemPopUint16: { |
16468 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16469 | if (!InitElemPop<PT_Uint16>(S, OpPC, V0)) |
16470 | return false; |
16471 | continue; |
16472 | } |
16473 | case OP_InitElemPopSint32: { |
16474 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16475 | if (!InitElemPop<PT_Sint32>(S, OpPC, V0)) |
16476 | return false; |
16477 | continue; |
16478 | } |
16479 | case OP_InitElemPopUint32: { |
16480 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16481 | if (!InitElemPop<PT_Uint32>(S, OpPC, V0)) |
16482 | return false; |
16483 | continue; |
16484 | } |
16485 | case OP_InitElemPopSint64: { |
16486 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16487 | if (!InitElemPop<PT_Sint64>(S, OpPC, V0)) |
16488 | return false; |
16489 | continue; |
16490 | } |
16491 | case OP_InitElemPopUint64: { |
16492 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16493 | if (!InitElemPop<PT_Uint64>(S, OpPC, V0)) |
16494 | return false; |
16495 | continue; |
16496 | } |
16497 | case OP_InitElemPopIntAP: { |
16498 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16499 | if (!InitElemPop<PT_IntAP>(S, OpPC, V0)) |
16500 | return false; |
16501 | continue; |
16502 | } |
16503 | case OP_InitElemPopIntAPS: { |
16504 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16505 | if (!InitElemPop<PT_IntAPS>(S, OpPC, V0)) |
16506 | return false; |
16507 | continue; |
16508 | } |
16509 | case OP_InitElemPopBool: { |
16510 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16511 | if (!InitElemPop<PT_Bool>(S, OpPC, V0)) |
16512 | return false; |
16513 | continue; |
16514 | } |
16515 | case OP_InitElemPopPtr: { |
16516 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16517 | if (!InitElemPop<PT_Ptr>(S, OpPC, V0)) |
16518 | return false; |
16519 | continue; |
16520 | } |
16521 | case OP_InitElemPopFnPtr: { |
16522 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16523 | if (!InitElemPop<PT_FnPtr>(S, OpPC, V0)) |
16524 | return false; |
16525 | continue; |
16526 | } |
16527 | case OP_InitElemPopMemberPtr: { |
16528 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16529 | if (!InitElemPop<PT_MemberPtr>(S, OpPC, V0)) |
16530 | return false; |
16531 | continue; |
16532 | } |
16533 | case OP_InitElemPopFloat: { |
16534 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16535 | if (!InitElemPop<PT_Float>(S, OpPC, V0)) |
16536 | return false; |
16537 | continue; |
16538 | } |
16539 | #endif |
16540 | #ifdef GET_DISASM |
16541 | case OP_InitElemPopSint8: |
16542 | PrintName("InitElemPopSint8" ); |
16543 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16544 | continue; |
16545 | case OP_InitElemPopUint8: |
16546 | PrintName("InitElemPopUint8" ); |
16547 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16548 | continue; |
16549 | case OP_InitElemPopSint16: |
16550 | PrintName("InitElemPopSint16" ); |
16551 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16552 | continue; |
16553 | case OP_InitElemPopUint16: |
16554 | PrintName("InitElemPopUint16" ); |
16555 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16556 | continue; |
16557 | case OP_InitElemPopSint32: |
16558 | PrintName("InitElemPopSint32" ); |
16559 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16560 | continue; |
16561 | case OP_InitElemPopUint32: |
16562 | PrintName("InitElemPopUint32" ); |
16563 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16564 | continue; |
16565 | case OP_InitElemPopSint64: |
16566 | PrintName("InitElemPopSint64" ); |
16567 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16568 | continue; |
16569 | case OP_InitElemPopUint64: |
16570 | PrintName("InitElemPopUint64" ); |
16571 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16572 | continue; |
16573 | case OP_InitElemPopIntAP: |
16574 | PrintName("InitElemPopIntAP" ); |
16575 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16576 | continue; |
16577 | case OP_InitElemPopIntAPS: |
16578 | PrintName("InitElemPopIntAPS" ); |
16579 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16580 | continue; |
16581 | case OP_InitElemPopBool: |
16582 | PrintName("InitElemPopBool" ); |
16583 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16584 | continue; |
16585 | case OP_InitElemPopPtr: |
16586 | PrintName("InitElemPopPtr" ); |
16587 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16588 | continue; |
16589 | case OP_InitElemPopFnPtr: |
16590 | PrintName("InitElemPopFnPtr" ); |
16591 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16592 | continue; |
16593 | case OP_InitElemPopMemberPtr: |
16594 | PrintName("InitElemPopMemberPtr" ); |
16595 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16596 | continue; |
16597 | case OP_InitElemPopFloat: |
16598 | PrintName("InitElemPopFloat" ); |
16599 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16600 | continue; |
16601 | #endif |
16602 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
16603 | bool emitInitElemPopSint8( uint32_t , const SourceInfo &); |
16604 | bool emitInitElemPopUint8( uint32_t , const SourceInfo &); |
16605 | bool emitInitElemPopSint16( uint32_t , const SourceInfo &); |
16606 | bool emitInitElemPopUint16( uint32_t , const SourceInfo &); |
16607 | bool emitInitElemPopSint32( uint32_t , const SourceInfo &); |
16608 | bool emitInitElemPopUint32( uint32_t , const SourceInfo &); |
16609 | bool emitInitElemPopSint64( uint32_t , const SourceInfo &); |
16610 | bool emitInitElemPopUint64( uint32_t , const SourceInfo &); |
16611 | bool emitInitElemPopIntAP( uint32_t , const SourceInfo &); |
16612 | bool emitInitElemPopIntAPS( uint32_t , const SourceInfo &); |
16613 | bool emitInitElemPopBool( uint32_t , const SourceInfo &); |
16614 | bool emitInitElemPopPtr( uint32_t , const SourceInfo &); |
16615 | bool emitInitElemPopFnPtr( uint32_t , const SourceInfo &); |
16616 | bool emitInitElemPopMemberPtr( uint32_t , const SourceInfo &); |
16617 | bool emitInitElemPopFloat( uint32_t , const SourceInfo &); |
16618 | #endif |
16619 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
16620 | [[nodiscard]] bool emitInitElemPop(PrimType, uint32_t, const SourceInfo &I); |
16621 | #endif |
16622 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
16623 | bool |
16624 | #if defined(GET_EVAL_IMPL) |
16625 | EvalEmitter |
16626 | #else |
16627 | ByteCodeEmitter |
16628 | #endif |
16629 | ::emitInitElemPop(PrimType T0, uint32_t A0, const SourceInfo &I) { |
16630 | switch (T0) { |
16631 | case PT_Sint8: |
16632 | return emitInitElemPopSint8(A0, I); |
16633 | case PT_Uint8: |
16634 | return emitInitElemPopUint8(A0, I); |
16635 | case PT_Sint16: |
16636 | return emitInitElemPopSint16(A0, I); |
16637 | case PT_Uint16: |
16638 | return emitInitElemPopUint16(A0, I); |
16639 | case PT_Sint32: |
16640 | return emitInitElemPopSint32(A0, I); |
16641 | case PT_Uint32: |
16642 | return emitInitElemPopUint32(A0, I); |
16643 | case PT_Sint64: |
16644 | return emitInitElemPopSint64(A0, I); |
16645 | case PT_Uint64: |
16646 | return emitInitElemPopUint64(A0, I); |
16647 | case PT_IntAP: |
16648 | return emitInitElemPopIntAP(A0, I); |
16649 | case PT_IntAPS: |
16650 | return emitInitElemPopIntAPS(A0, I); |
16651 | case PT_Bool: |
16652 | return emitInitElemPopBool(A0, I); |
16653 | case PT_Ptr: |
16654 | return emitInitElemPopPtr(A0, I); |
16655 | case PT_FnPtr: |
16656 | return emitInitElemPopFnPtr(A0, I); |
16657 | case PT_MemberPtr: |
16658 | return emitInitElemPopMemberPtr(A0, I); |
16659 | case PT_Float: |
16660 | return emitInitElemPopFloat(A0, I); |
16661 | } |
16662 | llvm_unreachable("invalid enum value" ); |
16663 | } |
16664 | #endif |
16665 | #ifdef GET_LINK_IMPL |
16666 | bool ByteCodeEmitter::emitInitElemPopSint8( uint32_t A0, const SourceInfo &L) { |
16667 | return emitOp<uint32_t>(OP_InitElemPopSint8, A0, L); |
16668 | } |
16669 | bool ByteCodeEmitter::emitInitElemPopUint8( uint32_t A0, const SourceInfo &L) { |
16670 | return emitOp<uint32_t>(OP_InitElemPopUint8, A0, L); |
16671 | } |
16672 | bool ByteCodeEmitter::emitInitElemPopSint16( uint32_t A0, const SourceInfo &L) { |
16673 | return emitOp<uint32_t>(OP_InitElemPopSint16, A0, L); |
16674 | } |
16675 | bool ByteCodeEmitter::emitInitElemPopUint16( uint32_t A0, const SourceInfo &L) { |
16676 | return emitOp<uint32_t>(OP_InitElemPopUint16, A0, L); |
16677 | } |
16678 | bool ByteCodeEmitter::emitInitElemPopSint32( uint32_t A0, const SourceInfo &L) { |
16679 | return emitOp<uint32_t>(OP_InitElemPopSint32, A0, L); |
16680 | } |
16681 | bool ByteCodeEmitter::emitInitElemPopUint32( uint32_t A0, const SourceInfo &L) { |
16682 | return emitOp<uint32_t>(OP_InitElemPopUint32, A0, L); |
16683 | } |
16684 | bool ByteCodeEmitter::emitInitElemPopSint64( uint32_t A0, const SourceInfo &L) { |
16685 | return emitOp<uint32_t>(OP_InitElemPopSint64, A0, L); |
16686 | } |
16687 | bool ByteCodeEmitter::emitInitElemPopUint64( uint32_t A0, const SourceInfo &L) { |
16688 | return emitOp<uint32_t>(OP_InitElemPopUint64, A0, L); |
16689 | } |
16690 | bool ByteCodeEmitter::emitInitElemPopIntAP( uint32_t A0, const SourceInfo &L) { |
16691 | return emitOp<uint32_t>(OP_InitElemPopIntAP, A0, L); |
16692 | } |
16693 | bool ByteCodeEmitter::emitInitElemPopIntAPS( uint32_t A0, const SourceInfo &L) { |
16694 | return emitOp<uint32_t>(OP_InitElemPopIntAPS, A0, L); |
16695 | } |
16696 | bool ByteCodeEmitter::emitInitElemPopBool( uint32_t A0, const SourceInfo &L) { |
16697 | return emitOp<uint32_t>(OP_InitElemPopBool, A0, L); |
16698 | } |
16699 | bool ByteCodeEmitter::emitInitElemPopPtr( uint32_t A0, const SourceInfo &L) { |
16700 | return emitOp<uint32_t>(OP_InitElemPopPtr, A0, L); |
16701 | } |
16702 | bool ByteCodeEmitter::emitInitElemPopFnPtr( uint32_t A0, const SourceInfo &L) { |
16703 | return emitOp<uint32_t>(OP_InitElemPopFnPtr, A0, L); |
16704 | } |
16705 | bool ByteCodeEmitter::emitInitElemPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
16706 | return emitOp<uint32_t>(OP_InitElemPopMemberPtr, A0, L); |
16707 | } |
16708 | bool ByteCodeEmitter::emitInitElemPopFloat( uint32_t A0, const SourceInfo &L) { |
16709 | return emitOp<uint32_t>(OP_InitElemPopFloat, A0, L); |
16710 | } |
16711 | #endif |
16712 | #ifdef GET_EVAL_IMPL |
16713 | bool EvalEmitter::emitInitElemPopSint8( uint32_t A0, const SourceInfo &L) { |
16714 | if (!isActive()) return true; |
16715 | CurrentSource = L; |
16716 | return InitElemPop<PT_Sint8>(S, OpPC, A0); |
16717 | } |
16718 | bool EvalEmitter::emitInitElemPopUint8( uint32_t A0, const SourceInfo &L) { |
16719 | if (!isActive()) return true; |
16720 | CurrentSource = L; |
16721 | return InitElemPop<PT_Uint8>(S, OpPC, A0); |
16722 | } |
16723 | bool EvalEmitter::emitInitElemPopSint16( uint32_t A0, const SourceInfo &L) { |
16724 | if (!isActive()) return true; |
16725 | CurrentSource = L; |
16726 | return InitElemPop<PT_Sint16>(S, OpPC, A0); |
16727 | } |
16728 | bool EvalEmitter::emitInitElemPopUint16( uint32_t A0, const SourceInfo &L) { |
16729 | if (!isActive()) return true; |
16730 | CurrentSource = L; |
16731 | return InitElemPop<PT_Uint16>(S, OpPC, A0); |
16732 | } |
16733 | bool EvalEmitter::emitInitElemPopSint32( uint32_t A0, const SourceInfo &L) { |
16734 | if (!isActive()) return true; |
16735 | CurrentSource = L; |
16736 | return InitElemPop<PT_Sint32>(S, OpPC, A0); |
16737 | } |
16738 | bool EvalEmitter::emitInitElemPopUint32( uint32_t A0, const SourceInfo &L) { |
16739 | if (!isActive()) return true; |
16740 | CurrentSource = L; |
16741 | return InitElemPop<PT_Uint32>(S, OpPC, A0); |
16742 | } |
16743 | bool EvalEmitter::emitInitElemPopSint64( uint32_t A0, const SourceInfo &L) { |
16744 | if (!isActive()) return true; |
16745 | CurrentSource = L; |
16746 | return InitElemPop<PT_Sint64>(S, OpPC, A0); |
16747 | } |
16748 | bool EvalEmitter::emitInitElemPopUint64( uint32_t A0, const SourceInfo &L) { |
16749 | if (!isActive()) return true; |
16750 | CurrentSource = L; |
16751 | return InitElemPop<PT_Uint64>(S, OpPC, A0); |
16752 | } |
16753 | bool EvalEmitter::emitInitElemPopIntAP( uint32_t A0, const SourceInfo &L) { |
16754 | if (!isActive()) return true; |
16755 | CurrentSource = L; |
16756 | return InitElemPop<PT_IntAP>(S, OpPC, A0); |
16757 | } |
16758 | bool EvalEmitter::emitInitElemPopIntAPS( uint32_t A0, const SourceInfo &L) { |
16759 | if (!isActive()) return true; |
16760 | CurrentSource = L; |
16761 | return InitElemPop<PT_IntAPS>(S, OpPC, A0); |
16762 | } |
16763 | bool EvalEmitter::emitInitElemPopBool( uint32_t A0, const SourceInfo &L) { |
16764 | if (!isActive()) return true; |
16765 | CurrentSource = L; |
16766 | return InitElemPop<PT_Bool>(S, OpPC, A0); |
16767 | } |
16768 | bool EvalEmitter::emitInitElemPopPtr( uint32_t A0, const SourceInfo &L) { |
16769 | if (!isActive()) return true; |
16770 | CurrentSource = L; |
16771 | return InitElemPop<PT_Ptr>(S, OpPC, A0); |
16772 | } |
16773 | bool EvalEmitter::emitInitElemPopFnPtr( uint32_t A0, const SourceInfo &L) { |
16774 | if (!isActive()) return true; |
16775 | CurrentSource = L; |
16776 | return InitElemPop<PT_FnPtr>(S, OpPC, A0); |
16777 | } |
16778 | bool EvalEmitter::emitInitElemPopMemberPtr( uint32_t A0, const SourceInfo &L) { |
16779 | if (!isActive()) return true; |
16780 | CurrentSource = L; |
16781 | return InitElemPop<PT_MemberPtr>(S, OpPC, A0); |
16782 | } |
16783 | bool EvalEmitter::emitInitElemPopFloat( uint32_t A0, const SourceInfo &L) { |
16784 | if (!isActive()) return true; |
16785 | CurrentSource = L; |
16786 | return InitElemPop<PT_Float>(S, OpPC, A0); |
16787 | } |
16788 | #endif |
16789 | #ifdef GET_OPCODE_NAMES |
16790 | OP_InitFieldSint8, |
16791 | OP_InitFieldUint8, |
16792 | OP_InitFieldSint16, |
16793 | OP_InitFieldUint16, |
16794 | OP_InitFieldSint32, |
16795 | OP_InitFieldUint32, |
16796 | OP_InitFieldSint64, |
16797 | OP_InitFieldUint64, |
16798 | OP_InitFieldIntAP, |
16799 | OP_InitFieldIntAPS, |
16800 | OP_InitFieldBool, |
16801 | OP_InitFieldPtr, |
16802 | OP_InitFieldFnPtr, |
16803 | OP_InitFieldMemberPtr, |
16804 | OP_InitFieldFloat, |
16805 | #endif |
16806 | #ifdef GET_INTERP |
16807 | case OP_InitFieldSint8: { |
16808 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16809 | if (!InitField<PT_Sint8>(S, OpPC, V0)) |
16810 | return false; |
16811 | continue; |
16812 | } |
16813 | case OP_InitFieldUint8: { |
16814 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16815 | if (!InitField<PT_Uint8>(S, OpPC, V0)) |
16816 | return false; |
16817 | continue; |
16818 | } |
16819 | case OP_InitFieldSint16: { |
16820 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16821 | if (!InitField<PT_Sint16>(S, OpPC, V0)) |
16822 | return false; |
16823 | continue; |
16824 | } |
16825 | case OP_InitFieldUint16: { |
16826 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16827 | if (!InitField<PT_Uint16>(S, OpPC, V0)) |
16828 | return false; |
16829 | continue; |
16830 | } |
16831 | case OP_InitFieldSint32: { |
16832 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16833 | if (!InitField<PT_Sint32>(S, OpPC, V0)) |
16834 | return false; |
16835 | continue; |
16836 | } |
16837 | case OP_InitFieldUint32: { |
16838 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16839 | if (!InitField<PT_Uint32>(S, OpPC, V0)) |
16840 | return false; |
16841 | continue; |
16842 | } |
16843 | case OP_InitFieldSint64: { |
16844 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16845 | if (!InitField<PT_Sint64>(S, OpPC, V0)) |
16846 | return false; |
16847 | continue; |
16848 | } |
16849 | case OP_InitFieldUint64: { |
16850 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16851 | if (!InitField<PT_Uint64>(S, OpPC, V0)) |
16852 | return false; |
16853 | continue; |
16854 | } |
16855 | case OP_InitFieldIntAP: { |
16856 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16857 | if (!InitField<PT_IntAP>(S, OpPC, V0)) |
16858 | return false; |
16859 | continue; |
16860 | } |
16861 | case OP_InitFieldIntAPS: { |
16862 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16863 | if (!InitField<PT_IntAPS>(S, OpPC, V0)) |
16864 | return false; |
16865 | continue; |
16866 | } |
16867 | case OP_InitFieldBool: { |
16868 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16869 | if (!InitField<PT_Bool>(S, OpPC, V0)) |
16870 | return false; |
16871 | continue; |
16872 | } |
16873 | case OP_InitFieldPtr: { |
16874 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16875 | if (!InitField<PT_Ptr>(S, OpPC, V0)) |
16876 | return false; |
16877 | continue; |
16878 | } |
16879 | case OP_InitFieldFnPtr: { |
16880 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16881 | if (!InitField<PT_FnPtr>(S, OpPC, V0)) |
16882 | return false; |
16883 | continue; |
16884 | } |
16885 | case OP_InitFieldMemberPtr: { |
16886 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16887 | if (!InitField<PT_MemberPtr>(S, OpPC, V0)) |
16888 | return false; |
16889 | continue; |
16890 | } |
16891 | case OP_InitFieldFloat: { |
16892 | const auto V0 = ReadArg<uint32_t>(S, PC); |
16893 | if (!InitField<PT_Float>(S, OpPC, V0)) |
16894 | return false; |
16895 | continue; |
16896 | } |
16897 | #endif |
16898 | #ifdef GET_DISASM |
16899 | case OP_InitFieldSint8: |
16900 | PrintName("InitFieldSint8" ); |
16901 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16902 | continue; |
16903 | case OP_InitFieldUint8: |
16904 | PrintName("InitFieldUint8" ); |
16905 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16906 | continue; |
16907 | case OP_InitFieldSint16: |
16908 | PrintName("InitFieldSint16" ); |
16909 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16910 | continue; |
16911 | case OP_InitFieldUint16: |
16912 | PrintName("InitFieldUint16" ); |
16913 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16914 | continue; |
16915 | case OP_InitFieldSint32: |
16916 | PrintName("InitFieldSint32" ); |
16917 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16918 | continue; |
16919 | case OP_InitFieldUint32: |
16920 | PrintName("InitFieldUint32" ); |
16921 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16922 | continue; |
16923 | case OP_InitFieldSint64: |
16924 | PrintName("InitFieldSint64" ); |
16925 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16926 | continue; |
16927 | case OP_InitFieldUint64: |
16928 | PrintName("InitFieldUint64" ); |
16929 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16930 | continue; |
16931 | case OP_InitFieldIntAP: |
16932 | PrintName("InitFieldIntAP" ); |
16933 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16934 | continue; |
16935 | case OP_InitFieldIntAPS: |
16936 | PrintName("InitFieldIntAPS" ); |
16937 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16938 | continue; |
16939 | case OP_InitFieldBool: |
16940 | PrintName("InitFieldBool" ); |
16941 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16942 | continue; |
16943 | case OP_InitFieldPtr: |
16944 | PrintName("InitFieldPtr" ); |
16945 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16946 | continue; |
16947 | case OP_InitFieldFnPtr: |
16948 | PrintName("InitFieldFnPtr" ); |
16949 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16950 | continue; |
16951 | case OP_InitFieldMemberPtr: |
16952 | PrintName("InitFieldMemberPtr" ); |
16953 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16954 | continue; |
16955 | case OP_InitFieldFloat: |
16956 | PrintName("InitFieldFloat" ); |
16957 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
16958 | continue; |
16959 | #endif |
16960 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
16961 | bool emitInitFieldSint8( uint32_t , const SourceInfo &); |
16962 | bool emitInitFieldUint8( uint32_t , const SourceInfo &); |
16963 | bool emitInitFieldSint16( uint32_t , const SourceInfo &); |
16964 | bool emitInitFieldUint16( uint32_t , const SourceInfo &); |
16965 | bool emitInitFieldSint32( uint32_t , const SourceInfo &); |
16966 | bool emitInitFieldUint32( uint32_t , const SourceInfo &); |
16967 | bool emitInitFieldSint64( uint32_t , const SourceInfo &); |
16968 | bool emitInitFieldUint64( uint32_t , const SourceInfo &); |
16969 | bool emitInitFieldIntAP( uint32_t , const SourceInfo &); |
16970 | bool emitInitFieldIntAPS( uint32_t , const SourceInfo &); |
16971 | bool emitInitFieldBool( uint32_t , const SourceInfo &); |
16972 | bool emitInitFieldPtr( uint32_t , const SourceInfo &); |
16973 | bool emitInitFieldFnPtr( uint32_t , const SourceInfo &); |
16974 | bool emitInitFieldMemberPtr( uint32_t , const SourceInfo &); |
16975 | bool emitInitFieldFloat( uint32_t , const SourceInfo &); |
16976 | #endif |
16977 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
16978 | [[nodiscard]] bool emitInitField(PrimType, uint32_t, const SourceInfo &I); |
16979 | #endif |
16980 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
16981 | bool |
16982 | #if defined(GET_EVAL_IMPL) |
16983 | EvalEmitter |
16984 | #else |
16985 | ByteCodeEmitter |
16986 | #endif |
16987 | ::emitInitField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
16988 | switch (T0) { |
16989 | case PT_Sint8: |
16990 | return emitInitFieldSint8(A0, I); |
16991 | case PT_Uint8: |
16992 | return emitInitFieldUint8(A0, I); |
16993 | case PT_Sint16: |
16994 | return emitInitFieldSint16(A0, I); |
16995 | case PT_Uint16: |
16996 | return emitInitFieldUint16(A0, I); |
16997 | case PT_Sint32: |
16998 | return emitInitFieldSint32(A0, I); |
16999 | case PT_Uint32: |
17000 | return emitInitFieldUint32(A0, I); |
17001 | case PT_Sint64: |
17002 | return emitInitFieldSint64(A0, I); |
17003 | case PT_Uint64: |
17004 | return emitInitFieldUint64(A0, I); |
17005 | case PT_IntAP: |
17006 | return emitInitFieldIntAP(A0, I); |
17007 | case PT_IntAPS: |
17008 | return emitInitFieldIntAPS(A0, I); |
17009 | case PT_Bool: |
17010 | return emitInitFieldBool(A0, I); |
17011 | case PT_Ptr: |
17012 | return emitInitFieldPtr(A0, I); |
17013 | case PT_FnPtr: |
17014 | return emitInitFieldFnPtr(A0, I); |
17015 | case PT_MemberPtr: |
17016 | return emitInitFieldMemberPtr(A0, I); |
17017 | case PT_Float: |
17018 | return emitInitFieldFloat(A0, I); |
17019 | } |
17020 | llvm_unreachable("invalid enum value" ); |
17021 | } |
17022 | #endif |
17023 | #ifdef GET_LINK_IMPL |
17024 | bool ByteCodeEmitter::emitInitFieldSint8( uint32_t A0, const SourceInfo &L) { |
17025 | return emitOp<uint32_t>(OP_InitFieldSint8, A0, L); |
17026 | } |
17027 | bool ByteCodeEmitter::emitInitFieldUint8( uint32_t A0, const SourceInfo &L) { |
17028 | return emitOp<uint32_t>(OP_InitFieldUint8, A0, L); |
17029 | } |
17030 | bool ByteCodeEmitter::emitInitFieldSint16( uint32_t A0, const SourceInfo &L) { |
17031 | return emitOp<uint32_t>(OP_InitFieldSint16, A0, L); |
17032 | } |
17033 | bool ByteCodeEmitter::emitInitFieldUint16( uint32_t A0, const SourceInfo &L) { |
17034 | return emitOp<uint32_t>(OP_InitFieldUint16, A0, L); |
17035 | } |
17036 | bool ByteCodeEmitter::emitInitFieldSint32( uint32_t A0, const SourceInfo &L) { |
17037 | return emitOp<uint32_t>(OP_InitFieldSint32, A0, L); |
17038 | } |
17039 | bool ByteCodeEmitter::emitInitFieldUint32( uint32_t A0, const SourceInfo &L) { |
17040 | return emitOp<uint32_t>(OP_InitFieldUint32, A0, L); |
17041 | } |
17042 | bool ByteCodeEmitter::emitInitFieldSint64( uint32_t A0, const SourceInfo &L) { |
17043 | return emitOp<uint32_t>(OP_InitFieldSint64, A0, L); |
17044 | } |
17045 | bool ByteCodeEmitter::emitInitFieldUint64( uint32_t A0, const SourceInfo &L) { |
17046 | return emitOp<uint32_t>(OP_InitFieldUint64, A0, L); |
17047 | } |
17048 | bool ByteCodeEmitter::emitInitFieldIntAP( uint32_t A0, const SourceInfo &L) { |
17049 | return emitOp<uint32_t>(OP_InitFieldIntAP, A0, L); |
17050 | } |
17051 | bool ByteCodeEmitter::emitInitFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
17052 | return emitOp<uint32_t>(OP_InitFieldIntAPS, A0, L); |
17053 | } |
17054 | bool ByteCodeEmitter::emitInitFieldBool( uint32_t A0, const SourceInfo &L) { |
17055 | return emitOp<uint32_t>(OP_InitFieldBool, A0, L); |
17056 | } |
17057 | bool ByteCodeEmitter::emitInitFieldPtr( uint32_t A0, const SourceInfo &L) { |
17058 | return emitOp<uint32_t>(OP_InitFieldPtr, A0, L); |
17059 | } |
17060 | bool ByteCodeEmitter::emitInitFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
17061 | return emitOp<uint32_t>(OP_InitFieldFnPtr, A0, L); |
17062 | } |
17063 | bool ByteCodeEmitter::emitInitFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
17064 | return emitOp<uint32_t>(OP_InitFieldMemberPtr, A0, L); |
17065 | } |
17066 | bool ByteCodeEmitter::emitInitFieldFloat( uint32_t A0, const SourceInfo &L) { |
17067 | return emitOp<uint32_t>(OP_InitFieldFloat, A0, L); |
17068 | } |
17069 | #endif |
17070 | #ifdef GET_EVAL_IMPL |
17071 | bool EvalEmitter::emitInitFieldSint8( uint32_t A0, const SourceInfo &L) { |
17072 | if (!isActive()) return true; |
17073 | CurrentSource = L; |
17074 | return InitField<PT_Sint8>(S, OpPC, A0); |
17075 | } |
17076 | bool EvalEmitter::emitInitFieldUint8( uint32_t A0, const SourceInfo &L) { |
17077 | if (!isActive()) return true; |
17078 | CurrentSource = L; |
17079 | return InitField<PT_Uint8>(S, OpPC, A0); |
17080 | } |
17081 | bool EvalEmitter::emitInitFieldSint16( uint32_t A0, const SourceInfo &L) { |
17082 | if (!isActive()) return true; |
17083 | CurrentSource = L; |
17084 | return InitField<PT_Sint16>(S, OpPC, A0); |
17085 | } |
17086 | bool EvalEmitter::emitInitFieldUint16( uint32_t A0, const SourceInfo &L) { |
17087 | if (!isActive()) return true; |
17088 | CurrentSource = L; |
17089 | return InitField<PT_Uint16>(S, OpPC, A0); |
17090 | } |
17091 | bool EvalEmitter::emitInitFieldSint32( uint32_t A0, const SourceInfo &L) { |
17092 | if (!isActive()) return true; |
17093 | CurrentSource = L; |
17094 | return InitField<PT_Sint32>(S, OpPC, A0); |
17095 | } |
17096 | bool EvalEmitter::emitInitFieldUint32( uint32_t A0, const SourceInfo &L) { |
17097 | if (!isActive()) return true; |
17098 | CurrentSource = L; |
17099 | return InitField<PT_Uint32>(S, OpPC, A0); |
17100 | } |
17101 | bool EvalEmitter::emitInitFieldSint64( uint32_t A0, const SourceInfo &L) { |
17102 | if (!isActive()) return true; |
17103 | CurrentSource = L; |
17104 | return InitField<PT_Sint64>(S, OpPC, A0); |
17105 | } |
17106 | bool EvalEmitter::emitInitFieldUint64( uint32_t A0, const SourceInfo &L) { |
17107 | if (!isActive()) return true; |
17108 | CurrentSource = L; |
17109 | return InitField<PT_Uint64>(S, OpPC, A0); |
17110 | } |
17111 | bool EvalEmitter::emitInitFieldIntAP( uint32_t A0, const SourceInfo &L) { |
17112 | if (!isActive()) return true; |
17113 | CurrentSource = L; |
17114 | return InitField<PT_IntAP>(S, OpPC, A0); |
17115 | } |
17116 | bool EvalEmitter::emitInitFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
17117 | if (!isActive()) return true; |
17118 | CurrentSource = L; |
17119 | return InitField<PT_IntAPS>(S, OpPC, A0); |
17120 | } |
17121 | bool EvalEmitter::emitInitFieldBool( uint32_t A0, const SourceInfo &L) { |
17122 | if (!isActive()) return true; |
17123 | CurrentSource = L; |
17124 | return InitField<PT_Bool>(S, OpPC, A0); |
17125 | } |
17126 | bool EvalEmitter::emitInitFieldPtr( uint32_t A0, const SourceInfo &L) { |
17127 | if (!isActive()) return true; |
17128 | CurrentSource = L; |
17129 | return InitField<PT_Ptr>(S, OpPC, A0); |
17130 | } |
17131 | bool EvalEmitter::emitInitFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
17132 | if (!isActive()) return true; |
17133 | CurrentSource = L; |
17134 | return InitField<PT_FnPtr>(S, OpPC, A0); |
17135 | } |
17136 | bool EvalEmitter::emitInitFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
17137 | if (!isActive()) return true; |
17138 | CurrentSource = L; |
17139 | return InitField<PT_MemberPtr>(S, OpPC, A0); |
17140 | } |
17141 | bool EvalEmitter::emitInitFieldFloat( uint32_t A0, const SourceInfo &L) { |
17142 | if (!isActive()) return true; |
17143 | CurrentSource = L; |
17144 | return InitField<PT_Float>(S, OpPC, A0); |
17145 | } |
17146 | #endif |
17147 | #ifdef GET_OPCODE_NAMES |
17148 | OP_InitFieldActiveSint8, |
17149 | OP_InitFieldActiveUint8, |
17150 | OP_InitFieldActiveSint16, |
17151 | OP_InitFieldActiveUint16, |
17152 | OP_InitFieldActiveSint32, |
17153 | OP_InitFieldActiveUint32, |
17154 | OP_InitFieldActiveSint64, |
17155 | OP_InitFieldActiveUint64, |
17156 | OP_InitFieldActiveIntAP, |
17157 | OP_InitFieldActiveIntAPS, |
17158 | OP_InitFieldActiveBool, |
17159 | OP_InitFieldActivePtr, |
17160 | OP_InitFieldActiveFnPtr, |
17161 | OP_InitFieldActiveMemberPtr, |
17162 | OP_InitFieldActiveFloat, |
17163 | #endif |
17164 | #ifdef GET_INTERP |
17165 | case OP_InitFieldActiveSint8: { |
17166 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17167 | if (!InitFieldActive<PT_Sint8>(S, OpPC, V0)) |
17168 | return false; |
17169 | continue; |
17170 | } |
17171 | case OP_InitFieldActiveUint8: { |
17172 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17173 | if (!InitFieldActive<PT_Uint8>(S, OpPC, V0)) |
17174 | return false; |
17175 | continue; |
17176 | } |
17177 | case OP_InitFieldActiveSint16: { |
17178 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17179 | if (!InitFieldActive<PT_Sint16>(S, OpPC, V0)) |
17180 | return false; |
17181 | continue; |
17182 | } |
17183 | case OP_InitFieldActiveUint16: { |
17184 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17185 | if (!InitFieldActive<PT_Uint16>(S, OpPC, V0)) |
17186 | return false; |
17187 | continue; |
17188 | } |
17189 | case OP_InitFieldActiveSint32: { |
17190 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17191 | if (!InitFieldActive<PT_Sint32>(S, OpPC, V0)) |
17192 | return false; |
17193 | continue; |
17194 | } |
17195 | case OP_InitFieldActiveUint32: { |
17196 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17197 | if (!InitFieldActive<PT_Uint32>(S, OpPC, V0)) |
17198 | return false; |
17199 | continue; |
17200 | } |
17201 | case OP_InitFieldActiveSint64: { |
17202 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17203 | if (!InitFieldActive<PT_Sint64>(S, OpPC, V0)) |
17204 | return false; |
17205 | continue; |
17206 | } |
17207 | case OP_InitFieldActiveUint64: { |
17208 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17209 | if (!InitFieldActive<PT_Uint64>(S, OpPC, V0)) |
17210 | return false; |
17211 | continue; |
17212 | } |
17213 | case OP_InitFieldActiveIntAP: { |
17214 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17215 | if (!InitFieldActive<PT_IntAP>(S, OpPC, V0)) |
17216 | return false; |
17217 | continue; |
17218 | } |
17219 | case OP_InitFieldActiveIntAPS: { |
17220 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17221 | if (!InitFieldActive<PT_IntAPS>(S, OpPC, V0)) |
17222 | return false; |
17223 | continue; |
17224 | } |
17225 | case OP_InitFieldActiveBool: { |
17226 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17227 | if (!InitFieldActive<PT_Bool>(S, OpPC, V0)) |
17228 | return false; |
17229 | continue; |
17230 | } |
17231 | case OP_InitFieldActivePtr: { |
17232 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17233 | if (!InitFieldActive<PT_Ptr>(S, OpPC, V0)) |
17234 | return false; |
17235 | continue; |
17236 | } |
17237 | case OP_InitFieldActiveFnPtr: { |
17238 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17239 | if (!InitFieldActive<PT_FnPtr>(S, OpPC, V0)) |
17240 | return false; |
17241 | continue; |
17242 | } |
17243 | case OP_InitFieldActiveMemberPtr: { |
17244 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17245 | if (!InitFieldActive<PT_MemberPtr>(S, OpPC, V0)) |
17246 | return false; |
17247 | continue; |
17248 | } |
17249 | case OP_InitFieldActiveFloat: { |
17250 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17251 | if (!InitFieldActive<PT_Float>(S, OpPC, V0)) |
17252 | return false; |
17253 | continue; |
17254 | } |
17255 | #endif |
17256 | #ifdef GET_DISASM |
17257 | case OP_InitFieldActiveSint8: |
17258 | PrintName("InitFieldActiveSint8" ); |
17259 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17260 | continue; |
17261 | case OP_InitFieldActiveUint8: |
17262 | PrintName("InitFieldActiveUint8" ); |
17263 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17264 | continue; |
17265 | case OP_InitFieldActiveSint16: |
17266 | PrintName("InitFieldActiveSint16" ); |
17267 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17268 | continue; |
17269 | case OP_InitFieldActiveUint16: |
17270 | PrintName("InitFieldActiveUint16" ); |
17271 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17272 | continue; |
17273 | case OP_InitFieldActiveSint32: |
17274 | PrintName("InitFieldActiveSint32" ); |
17275 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17276 | continue; |
17277 | case OP_InitFieldActiveUint32: |
17278 | PrintName("InitFieldActiveUint32" ); |
17279 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17280 | continue; |
17281 | case OP_InitFieldActiveSint64: |
17282 | PrintName("InitFieldActiveSint64" ); |
17283 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17284 | continue; |
17285 | case OP_InitFieldActiveUint64: |
17286 | PrintName("InitFieldActiveUint64" ); |
17287 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17288 | continue; |
17289 | case OP_InitFieldActiveIntAP: |
17290 | PrintName("InitFieldActiveIntAP" ); |
17291 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17292 | continue; |
17293 | case OP_InitFieldActiveIntAPS: |
17294 | PrintName("InitFieldActiveIntAPS" ); |
17295 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17296 | continue; |
17297 | case OP_InitFieldActiveBool: |
17298 | PrintName("InitFieldActiveBool" ); |
17299 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17300 | continue; |
17301 | case OP_InitFieldActivePtr: |
17302 | PrintName("InitFieldActivePtr" ); |
17303 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17304 | continue; |
17305 | case OP_InitFieldActiveFnPtr: |
17306 | PrintName("InitFieldActiveFnPtr" ); |
17307 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17308 | continue; |
17309 | case OP_InitFieldActiveMemberPtr: |
17310 | PrintName("InitFieldActiveMemberPtr" ); |
17311 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17312 | continue; |
17313 | case OP_InitFieldActiveFloat: |
17314 | PrintName("InitFieldActiveFloat" ); |
17315 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17316 | continue; |
17317 | #endif |
17318 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17319 | bool emitInitFieldActiveSint8( uint32_t , const SourceInfo &); |
17320 | bool emitInitFieldActiveUint8( uint32_t , const SourceInfo &); |
17321 | bool emitInitFieldActiveSint16( uint32_t , const SourceInfo &); |
17322 | bool emitInitFieldActiveUint16( uint32_t , const SourceInfo &); |
17323 | bool emitInitFieldActiveSint32( uint32_t , const SourceInfo &); |
17324 | bool emitInitFieldActiveUint32( uint32_t , const SourceInfo &); |
17325 | bool emitInitFieldActiveSint64( uint32_t , const SourceInfo &); |
17326 | bool emitInitFieldActiveUint64( uint32_t , const SourceInfo &); |
17327 | bool emitInitFieldActiveIntAP( uint32_t , const SourceInfo &); |
17328 | bool emitInitFieldActiveIntAPS( uint32_t , const SourceInfo &); |
17329 | bool emitInitFieldActiveBool( uint32_t , const SourceInfo &); |
17330 | bool emitInitFieldActivePtr( uint32_t , const SourceInfo &); |
17331 | bool emitInitFieldActiveFnPtr( uint32_t , const SourceInfo &); |
17332 | bool emitInitFieldActiveMemberPtr( uint32_t , const SourceInfo &); |
17333 | bool emitInitFieldActiveFloat( uint32_t , const SourceInfo &); |
17334 | #endif |
17335 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17336 | [[nodiscard]] bool emitInitFieldActive(PrimType, uint32_t, const SourceInfo &I); |
17337 | #endif |
17338 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
17339 | bool |
17340 | #if defined(GET_EVAL_IMPL) |
17341 | EvalEmitter |
17342 | #else |
17343 | ByteCodeEmitter |
17344 | #endif |
17345 | ::emitInitFieldActive(PrimType T0, uint32_t A0, const SourceInfo &I) { |
17346 | switch (T0) { |
17347 | case PT_Sint8: |
17348 | return emitInitFieldActiveSint8(A0, I); |
17349 | case PT_Uint8: |
17350 | return emitInitFieldActiveUint8(A0, I); |
17351 | case PT_Sint16: |
17352 | return emitInitFieldActiveSint16(A0, I); |
17353 | case PT_Uint16: |
17354 | return emitInitFieldActiveUint16(A0, I); |
17355 | case PT_Sint32: |
17356 | return emitInitFieldActiveSint32(A0, I); |
17357 | case PT_Uint32: |
17358 | return emitInitFieldActiveUint32(A0, I); |
17359 | case PT_Sint64: |
17360 | return emitInitFieldActiveSint64(A0, I); |
17361 | case PT_Uint64: |
17362 | return emitInitFieldActiveUint64(A0, I); |
17363 | case PT_IntAP: |
17364 | return emitInitFieldActiveIntAP(A0, I); |
17365 | case PT_IntAPS: |
17366 | return emitInitFieldActiveIntAPS(A0, I); |
17367 | case PT_Bool: |
17368 | return emitInitFieldActiveBool(A0, I); |
17369 | case PT_Ptr: |
17370 | return emitInitFieldActivePtr(A0, I); |
17371 | case PT_FnPtr: |
17372 | return emitInitFieldActiveFnPtr(A0, I); |
17373 | case PT_MemberPtr: |
17374 | return emitInitFieldActiveMemberPtr(A0, I); |
17375 | case PT_Float: |
17376 | return emitInitFieldActiveFloat(A0, I); |
17377 | } |
17378 | llvm_unreachable("invalid enum value" ); |
17379 | } |
17380 | #endif |
17381 | #ifdef GET_LINK_IMPL |
17382 | bool ByteCodeEmitter::emitInitFieldActiveSint8( uint32_t A0, const SourceInfo &L) { |
17383 | return emitOp<uint32_t>(OP_InitFieldActiveSint8, A0, L); |
17384 | } |
17385 | bool ByteCodeEmitter::emitInitFieldActiveUint8( uint32_t A0, const SourceInfo &L) { |
17386 | return emitOp<uint32_t>(OP_InitFieldActiveUint8, A0, L); |
17387 | } |
17388 | bool ByteCodeEmitter::emitInitFieldActiveSint16( uint32_t A0, const SourceInfo &L) { |
17389 | return emitOp<uint32_t>(OP_InitFieldActiveSint16, A0, L); |
17390 | } |
17391 | bool ByteCodeEmitter::emitInitFieldActiveUint16( uint32_t A0, const SourceInfo &L) { |
17392 | return emitOp<uint32_t>(OP_InitFieldActiveUint16, A0, L); |
17393 | } |
17394 | bool ByteCodeEmitter::emitInitFieldActiveSint32( uint32_t A0, const SourceInfo &L) { |
17395 | return emitOp<uint32_t>(OP_InitFieldActiveSint32, A0, L); |
17396 | } |
17397 | bool ByteCodeEmitter::emitInitFieldActiveUint32( uint32_t A0, const SourceInfo &L) { |
17398 | return emitOp<uint32_t>(OP_InitFieldActiveUint32, A0, L); |
17399 | } |
17400 | bool ByteCodeEmitter::emitInitFieldActiveSint64( uint32_t A0, const SourceInfo &L) { |
17401 | return emitOp<uint32_t>(OP_InitFieldActiveSint64, A0, L); |
17402 | } |
17403 | bool ByteCodeEmitter::emitInitFieldActiveUint64( uint32_t A0, const SourceInfo &L) { |
17404 | return emitOp<uint32_t>(OP_InitFieldActiveUint64, A0, L); |
17405 | } |
17406 | bool ByteCodeEmitter::emitInitFieldActiveIntAP( uint32_t A0, const SourceInfo &L) { |
17407 | return emitOp<uint32_t>(OP_InitFieldActiveIntAP, A0, L); |
17408 | } |
17409 | bool ByteCodeEmitter::emitInitFieldActiveIntAPS( uint32_t A0, const SourceInfo &L) { |
17410 | return emitOp<uint32_t>(OP_InitFieldActiveIntAPS, A0, L); |
17411 | } |
17412 | bool ByteCodeEmitter::emitInitFieldActiveBool( uint32_t A0, const SourceInfo &L) { |
17413 | return emitOp<uint32_t>(OP_InitFieldActiveBool, A0, L); |
17414 | } |
17415 | bool ByteCodeEmitter::emitInitFieldActivePtr( uint32_t A0, const SourceInfo &L) { |
17416 | return emitOp<uint32_t>(OP_InitFieldActivePtr, A0, L); |
17417 | } |
17418 | bool ByteCodeEmitter::emitInitFieldActiveFnPtr( uint32_t A0, const SourceInfo &L) { |
17419 | return emitOp<uint32_t>(OP_InitFieldActiveFnPtr, A0, L); |
17420 | } |
17421 | bool ByteCodeEmitter::emitInitFieldActiveMemberPtr( uint32_t A0, const SourceInfo &L) { |
17422 | return emitOp<uint32_t>(OP_InitFieldActiveMemberPtr, A0, L); |
17423 | } |
17424 | bool ByteCodeEmitter::emitInitFieldActiveFloat( uint32_t A0, const SourceInfo &L) { |
17425 | return emitOp<uint32_t>(OP_InitFieldActiveFloat, A0, L); |
17426 | } |
17427 | #endif |
17428 | #ifdef GET_EVAL_IMPL |
17429 | bool EvalEmitter::emitInitFieldActiveSint8( uint32_t A0, const SourceInfo &L) { |
17430 | if (!isActive()) return true; |
17431 | CurrentSource = L; |
17432 | return InitFieldActive<PT_Sint8>(S, OpPC, A0); |
17433 | } |
17434 | bool EvalEmitter::emitInitFieldActiveUint8( uint32_t A0, const SourceInfo &L) { |
17435 | if (!isActive()) return true; |
17436 | CurrentSource = L; |
17437 | return InitFieldActive<PT_Uint8>(S, OpPC, A0); |
17438 | } |
17439 | bool EvalEmitter::emitInitFieldActiveSint16( uint32_t A0, const SourceInfo &L) { |
17440 | if (!isActive()) return true; |
17441 | CurrentSource = L; |
17442 | return InitFieldActive<PT_Sint16>(S, OpPC, A0); |
17443 | } |
17444 | bool EvalEmitter::emitInitFieldActiveUint16( uint32_t A0, const SourceInfo &L) { |
17445 | if (!isActive()) return true; |
17446 | CurrentSource = L; |
17447 | return InitFieldActive<PT_Uint16>(S, OpPC, A0); |
17448 | } |
17449 | bool EvalEmitter::emitInitFieldActiveSint32( uint32_t A0, const SourceInfo &L) { |
17450 | if (!isActive()) return true; |
17451 | CurrentSource = L; |
17452 | return InitFieldActive<PT_Sint32>(S, OpPC, A0); |
17453 | } |
17454 | bool EvalEmitter::emitInitFieldActiveUint32( uint32_t A0, const SourceInfo &L) { |
17455 | if (!isActive()) return true; |
17456 | CurrentSource = L; |
17457 | return InitFieldActive<PT_Uint32>(S, OpPC, A0); |
17458 | } |
17459 | bool EvalEmitter::emitInitFieldActiveSint64( uint32_t A0, const SourceInfo &L) { |
17460 | if (!isActive()) return true; |
17461 | CurrentSource = L; |
17462 | return InitFieldActive<PT_Sint64>(S, OpPC, A0); |
17463 | } |
17464 | bool EvalEmitter::emitInitFieldActiveUint64( uint32_t A0, const SourceInfo &L) { |
17465 | if (!isActive()) return true; |
17466 | CurrentSource = L; |
17467 | return InitFieldActive<PT_Uint64>(S, OpPC, A0); |
17468 | } |
17469 | bool EvalEmitter::emitInitFieldActiveIntAP( uint32_t A0, const SourceInfo &L) { |
17470 | if (!isActive()) return true; |
17471 | CurrentSource = L; |
17472 | return InitFieldActive<PT_IntAP>(S, OpPC, A0); |
17473 | } |
17474 | bool EvalEmitter::emitInitFieldActiveIntAPS( uint32_t A0, const SourceInfo &L) { |
17475 | if (!isActive()) return true; |
17476 | CurrentSource = L; |
17477 | return InitFieldActive<PT_IntAPS>(S, OpPC, A0); |
17478 | } |
17479 | bool EvalEmitter::emitInitFieldActiveBool( uint32_t A0, const SourceInfo &L) { |
17480 | if (!isActive()) return true; |
17481 | CurrentSource = L; |
17482 | return InitFieldActive<PT_Bool>(S, OpPC, A0); |
17483 | } |
17484 | bool EvalEmitter::emitInitFieldActivePtr( uint32_t A0, const SourceInfo &L) { |
17485 | if (!isActive()) return true; |
17486 | CurrentSource = L; |
17487 | return InitFieldActive<PT_Ptr>(S, OpPC, A0); |
17488 | } |
17489 | bool EvalEmitter::emitInitFieldActiveFnPtr( uint32_t A0, const SourceInfo &L) { |
17490 | if (!isActive()) return true; |
17491 | CurrentSource = L; |
17492 | return InitFieldActive<PT_FnPtr>(S, OpPC, A0); |
17493 | } |
17494 | bool EvalEmitter::emitInitFieldActiveMemberPtr( uint32_t A0, const SourceInfo &L) { |
17495 | if (!isActive()) return true; |
17496 | CurrentSource = L; |
17497 | return InitFieldActive<PT_MemberPtr>(S, OpPC, A0); |
17498 | } |
17499 | bool EvalEmitter::emitInitFieldActiveFloat( uint32_t A0, const SourceInfo &L) { |
17500 | if (!isActive()) return true; |
17501 | CurrentSource = L; |
17502 | return InitFieldActive<PT_Float>(S, OpPC, A0); |
17503 | } |
17504 | #endif |
17505 | #ifdef GET_OPCODE_NAMES |
17506 | OP_InitGlobalSint8, |
17507 | OP_InitGlobalUint8, |
17508 | OP_InitGlobalSint16, |
17509 | OP_InitGlobalUint16, |
17510 | OP_InitGlobalSint32, |
17511 | OP_InitGlobalUint32, |
17512 | OP_InitGlobalSint64, |
17513 | OP_InitGlobalUint64, |
17514 | OP_InitGlobalIntAP, |
17515 | OP_InitGlobalIntAPS, |
17516 | OP_InitGlobalBool, |
17517 | OP_InitGlobalPtr, |
17518 | OP_InitGlobalFnPtr, |
17519 | OP_InitGlobalMemberPtr, |
17520 | OP_InitGlobalFloat, |
17521 | #endif |
17522 | #ifdef GET_INTERP |
17523 | case OP_InitGlobalSint8: { |
17524 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17525 | if (!InitGlobal<PT_Sint8>(S, OpPC, V0)) |
17526 | return false; |
17527 | continue; |
17528 | } |
17529 | case OP_InitGlobalUint8: { |
17530 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17531 | if (!InitGlobal<PT_Uint8>(S, OpPC, V0)) |
17532 | return false; |
17533 | continue; |
17534 | } |
17535 | case OP_InitGlobalSint16: { |
17536 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17537 | if (!InitGlobal<PT_Sint16>(S, OpPC, V0)) |
17538 | return false; |
17539 | continue; |
17540 | } |
17541 | case OP_InitGlobalUint16: { |
17542 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17543 | if (!InitGlobal<PT_Uint16>(S, OpPC, V0)) |
17544 | return false; |
17545 | continue; |
17546 | } |
17547 | case OP_InitGlobalSint32: { |
17548 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17549 | if (!InitGlobal<PT_Sint32>(S, OpPC, V0)) |
17550 | return false; |
17551 | continue; |
17552 | } |
17553 | case OP_InitGlobalUint32: { |
17554 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17555 | if (!InitGlobal<PT_Uint32>(S, OpPC, V0)) |
17556 | return false; |
17557 | continue; |
17558 | } |
17559 | case OP_InitGlobalSint64: { |
17560 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17561 | if (!InitGlobal<PT_Sint64>(S, OpPC, V0)) |
17562 | return false; |
17563 | continue; |
17564 | } |
17565 | case OP_InitGlobalUint64: { |
17566 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17567 | if (!InitGlobal<PT_Uint64>(S, OpPC, V0)) |
17568 | return false; |
17569 | continue; |
17570 | } |
17571 | case OP_InitGlobalIntAP: { |
17572 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17573 | if (!InitGlobal<PT_IntAP>(S, OpPC, V0)) |
17574 | return false; |
17575 | continue; |
17576 | } |
17577 | case OP_InitGlobalIntAPS: { |
17578 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17579 | if (!InitGlobal<PT_IntAPS>(S, OpPC, V0)) |
17580 | return false; |
17581 | continue; |
17582 | } |
17583 | case OP_InitGlobalBool: { |
17584 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17585 | if (!InitGlobal<PT_Bool>(S, OpPC, V0)) |
17586 | return false; |
17587 | continue; |
17588 | } |
17589 | case OP_InitGlobalPtr: { |
17590 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17591 | if (!InitGlobal<PT_Ptr>(S, OpPC, V0)) |
17592 | return false; |
17593 | continue; |
17594 | } |
17595 | case OP_InitGlobalFnPtr: { |
17596 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17597 | if (!InitGlobal<PT_FnPtr>(S, OpPC, V0)) |
17598 | return false; |
17599 | continue; |
17600 | } |
17601 | case OP_InitGlobalMemberPtr: { |
17602 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17603 | if (!InitGlobal<PT_MemberPtr>(S, OpPC, V0)) |
17604 | return false; |
17605 | continue; |
17606 | } |
17607 | case OP_InitGlobalFloat: { |
17608 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17609 | if (!InitGlobal<PT_Float>(S, OpPC, V0)) |
17610 | return false; |
17611 | continue; |
17612 | } |
17613 | #endif |
17614 | #ifdef GET_DISASM |
17615 | case OP_InitGlobalSint8: |
17616 | PrintName("InitGlobalSint8" ); |
17617 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17618 | continue; |
17619 | case OP_InitGlobalUint8: |
17620 | PrintName("InitGlobalUint8" ); |
17621 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17622 | continue; |
17623 | case OP_InitGlobalSint16: |
17624 | PrintName("InitGlobalSint16" ); |
17625 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17626 | continue; |
17627 | case OP_InitGlobalUint16: |
17628 | PrintName("InitGlobalUint16" ); |
17629 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17630 | continue; |
17631 | case OP_InitGlobalSint32: |
17632 | PrintName("InitGlobalSint32" ); |
17633 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17634 | continue; |
17635 | case OP_InitGlobalUint32: |
17636 | PrintName("InitGlobalUint32" ); |
17637 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17638 | continue; |
17639 | case OP_InitGlobalSint64: |
17640 | PrintName("InitGlobalSint64" ); |
17641 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17642 | continue; |
17643 | case OP_InitGlobalUint64: |
17644 | PrintName("InitGlobalUint64" ); |
17645 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17646 | continue; |
17647 | case OP_InitGlobalIntAP: |
17648 | PrintName("InitGlobalIntAP" ); |
17649 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17650 | continue; |
17651 | case OP_InitGlobalIntAPS: |
17652 | PrintName("InitGlobalIntAPS" ); |
17653 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17654 | continue; |
17655 | case OP_InitGlobalBool: |
17656 | PrintName("InitGlobalBool" ); |
17657 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17658 | continue; |
17659 | case OP_InitGlobalPtr: |
17660 | PrintName("InitGlobalPtr" ); |
17661 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17662 | continue; |
17663 | case OP_InitGlobalFnPtr: |
17664 | PrintName("InitGlobalFnPtr" ); |
17665 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17666 | continue; |
17667 | case OP_InitGlobalMemberPtr: |
17668 | PrintName("InitGlobalMemberPtr" ); |
17669 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17670 | continue; |
17671 | case OP_InitGlobalFloat: |
17672 | PrintName("InitGlobalFloat" ); |
17673 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
17674 | continue; |
17675 | #endif |
17676 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17677 | bool emitInitGlobalSint8( uint32_t , const SourceInfo &); |
17678 | bool emitInitGlobalUint8( uint32_t , const SourceInfo &); |
17679 | bool emitInitGlobalSint16( uint32_t , const SourceInfo &); |
17680 | bool emitInitGlobalUint16( uint32_t , const SourceInfo &); |
17681 | bool emitInitGlobalSint32( uint32_t , const SourceInfo &); |
17682 | bool emitInitGlobalUint32( uint32_t , const SourceInfo &); |
17683 | bool emitInitGlobalSint64( uint32_t , const SourceInfo &); |
17684 | bool emitInitGlobalUint64( uint32_t , const SourceInfo &); |
17685 | bool emitInitGlobalIntAP( uint32_t , const SourceInfo &); |
17686 | bool emitInitGlobalIntAPS( uint32_t , const SourceInfo &); |
17687 | bool emitInitGlobalBool( uint32_t , const SourceInfo &); |
17688 | bool emitInitGlobalPtr( uint32_t , const SourceInfo &); |
17689 | bool emitInitGlobalFnPtr( uint32_t , const SourceInfo &); |
17690 | bool emitInitGlobalMemberPtr( uint32_t , const SourceInfo &); |
17691 | bool emitInitGlobalFloat( uint32_t , const SourceInfo &); |
17692 | #endif |
17693 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
17694 | [[nodiscard]] bool emitInitGlobal(PrimType, uint32_t, const SourceInfo &I); |
17695 | #endif |
17696 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
17697 | bool |
17698 | #if defined(GET_EVAL_IMPL) |
17699 | EvalEmitter |
17700 | #else |
17701 | ByteCodeEmitter |
17702 | #endif |
17703 | ::emitInitGlobal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
17704 | switch (T0) { |
17705 | case PT_Sint8: |
17706 | return emitInitGlobalSint8(A0, I); |
17707 | case PT_Uint8: |
17708 | return emitInitGlobalUint8(A0, I); |
17709 | case PT_Sint16: |
17710 | return emitInitGlobalSint16(A0, I); |
17711 | case PT_Uint16: |
17712 | return emitInitGlobalUint16(A0, I); |
17713 | case PT_Sint32: |
17714 | return emitInitGlobalSint32(A0, I); |
17715 | case PT_Uint32: |
17716 | return emitInitGlobalUint32(A0, I); |
17717 | case PT_Sint64: |
17718 | return emitInitGlobalSint64(A0, I); |
17719 | case PT_Uint64: |
17720 | return emitInitGlobalUint64(A0, I); |
17721 | case PT_IntAP: |
17722 | return emitInitGlobalIntAP(A0, I); |
17723 | case PT_IntAPS: |
17724 | return emitInitGlobalIntAPS(A0, I); |
17725 | case PT_Bool: |
17726 | return emitInitGlobalBool(A0, I); |
17727 | case PT_Ptr: |
17728 | return emitInitGlobalPtr(A0, I); |
17729 | case PT_FnPtr: |
17730 | return emitInitGlobalFnPtr(A0, I); |
17731 | case PT_MemberPtr: |
17732 | return emitInitGlobalMemberPtr(A0, I); |
17733 | case PT_Float: |
17734 | return emitInitGlobalFloat(A0, I); |
17735 | } |
17736 | llvm_unreachable("invalid enum value" ); |
17737 | } |
17738 | #endif |
17739 | #ifdef GET_LINK_IMPL |
17740 | bool ByteCodeEmitter::emitInitGlobalSint8( uint32_t A0, const SourceInfo &L) { |
17741 | return emitOp<uint32_t>(OP_InitGlobalSint8, A0, L); |
17742 | } |
17743 | bool ByteCodeEmitter::emitInitGlobalUint8( uint32_t A0, const SourceInfo &L) { |
17744 | return emitOp<uint32_t>(OP_InitGlobalUint8, A0, L); |
17745 | } |
17746 | bool ByteCodeEmitter::emitInitGlobalSint16( uint32_t A0, const SourceInfo &L) { |
17747 | return emitOp<uint32_t>(OP_InitGlobalSint16, A0, L); |
17748 | } |
17749 | bool ByteCodeEmitter::emitInitGlobalUint16( uint32_t A0, const SourceInfo &L) { |
17750 | return emitOp<uint32_t>(OP_InitGlobalUint16, A0, L); |
17751 | } |
17752 | bool ByteCodeEmitter::emitInitGlobalSint32( uint32_t A0, const SourceInfo &L) { |
17753 | return emitOp<uint32_t>(OP_InitGlobalSint32, A0, L); |
17754 | } |
17755 | bool ByteCodeEmitter::emitInitGlobalUint32( uint32_t A0, const SourceInfo &L) { |
17756 | return emitOp<uint32_t>(OP_InitGlobalUint32, A0, L); |
17757 | } |
17758 | bool ByteCodeEmitter::emitInitGlobalSint64( uint32_t A0, const SourceInfo &L) { |
17759 | return emitOp<uint32_t>(OP_InitGlobalSint64, A0, L); |
17760 | } |
17761 | bool ByteCodeEmitter::emitInitGlobalUint64( uint32_t A0, const SourceInfo &L) { |
17762 | return emitOp<uint32_t>(OP_InitGlobalUint64, A0, L); |
17763 | } |
17764 | bool ByteCodeEmitter::emitInitGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
17765 | return emitOp<uint32_t>(OP_InitGlobalIntAP, A0, L); |
17766 | } |
17767 | bool ByteCodeEmitter::emitInitGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
17768 | return emitOp<uint32_t>(OP_InitGlobalIntAPS, A0, L); |
17769 | } |
17770 | bool ByteCodeEmitter::emitInitGlobalBool( uint32_t A0, const SourceInfo &L) { |
17771 | return emitOp<uint32_t>(OP_InitGlobalBool, A0, L); |
17772 | } |
17773 | bool ByteCodeEmitter::emitInitGlobalPtr( uint32_t A0, const SourceInfo &L) { |
17774 | return emitOp<uint32_t>(OP_InitGlobalPtr, A0, L); |
17775 | } |
17776 | bool ByteCodeEmitter::emitInitGlobalFnPtr( uint32_t A0, const SourceInfo &L) { |
17777 | return emitOp<uint32_t>(OP_InitGlobalFnPtr, A0, L); |
17778 | } |
17779 | bool ByteCodeEmitter::emitInitGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
17780 | return emitOp<uint32_t>(OP_InitGlobalMemberPtr, A0, L); |
17781 | } |
17782 | bool ByteCodeEmitter::emitInitGlobalFloat( uint32_t A0, const SourceInfo &L) { |
17783 | return emitOp<uint32_t>(OP_InitGlobalFloat, A0, L); |
17784 | } |
17785 | #endif |
17786 | #ifdef GET_EVAL_IMPL |
17787 | bool EvalEmitter::emitInitGlobalSint8( uint32_t A0, const SourceInfo &L) { |
17788 | if (!isActive()) return true; |
17789 | CurrentSource = L; |
17790 | return InitGlobal<PT_Sint8>(S, OpPC, A0); |
17791 | } |
17792 | bool EvalEmitter::emitInitGlobalUint8( uint32_t A0, const SourceInfo &L) { |
17793 | if (!isActive()) return true; |
17794 | CurrentSource = L; |
17795 | return InitGlobal<PT_Uint8>(S, OpPC, A0); |
17796 | } |
17797 | bool EvalEmitter::emitInitGlobalSint16( uint32_t A0, const SourceInfo &L) { |
17798 | if (!isActive()) return true; |
17799 | CurrentSource = L; |
17800 | return InitGlobal<PT_Sint16>(S, OpPC, A0); |
17801 | } |
17802 | bool EvalEmitter::emitInitGlobalUint16( uint32_t A0, const SourceInfo &L) { |
17803 | if (!isActive()) return true; |
17804 | CurrentSource = L; |
17805 | return InitGlobal<PT_Uint16>(S, OpPC, A0); |
17806 | } |
17807 | bool EvalEmitter::emitInitGlobalSint32( uint32_t A0, const SourceInfo &L) { |
17808 | if (!isActive()) return true; |
17809 | CurrentSource = L; |
17810 | return InitGlobal<PT_Sint32>(S, OpPC, A0); |
17811 | } |
17812 | bool EvalEmitter::emitInitGlobalUint32( uint32_t A0, const SourceInfo &L) { |
17813 | if (!isActive()) return true; |
17814 | CurrentSource = L; |
17815 | return InitGlobal<PT_Uint32>(S, OpPC, A0); |
17816 | } |
17817 | bool EvalEmitter::emitInitGlobalSint64( uint32_t A0, const SourceInfo &L) { |
17818 | if (!isActive()) return true; |
17819 | CurrentSource = L; |
17820 | return InitGlobal<PT_Sint64>(S, OpPC, A0); |
17821 | } |
17822 | bool EvalEmitter::emitInitGlobalUint64( uint32_t A0, const SourceInfo &L) { |
17823 | if (!isActive()) return true; |
17824 | CurrentSource = L; |
17825 | return InitGlobal<PT_Uint64>(S, OpPC, A0); |
17826 | } |
17827 | bool EvalEmitter::emitInitGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
17828 | if (!isActive()) return true; |
17829 | CurrentSource = L; |
17830 | return InitGlobal<PT_IntAP>(S, OpPC, A0); |
17831 | } |
17832 | bool EvalEmitter::emitInitGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
17833 | if (!isActive()) return true; |
17834 | CurrentSource = L; |
17835 | return InitGlobal<PT_IntAPS>(S, OpPC, A0); |
17836 | } |
17837 | bool EvalEmitter::emitInitGlobalBool( uint32_t A0, const SourceInfo &L) { |
17838 | if (!isActive()) return true; |
17839 | CurrentSource = L; |
17840 | return InitGlobal<PT_Bool>(S, OpPC, A0); |
17841 | } |
17842 | bool EvalEmitter::emitInitGlobalPtr( uint32_t A0, const SourceInfo &L) { |
17843 | if (!isActive()) return true; |
17844 | CurrentSource = L; |
17845 | return InitGlobal<PT_Ptr>(S, OpPC, A0); |
17846 | } |
17847 | bool EvalEmitter::emitInitGlobalFnPtr( uint32_t A0, const SourceInfo &L) { |
17848 | if (!isActive()) return true; |
17849 | CurrentSource = L; |
17850 | return InitGlobal<PT_FnPtr>(S, OpPC, A0); |
17851 | } |
17852 | bool EvalEmitter::emitInitGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
17853 | if (!isActive()) return true; |
17854 | CurrentSource = L; |
17855 | return InitGlobal<PT_MemberPtr>(S, OpPC, A0); |
17856 | } |
17857 | bool EvalEmitter::emitInitGlobalFloat( uint32_t A0, const SourceInfo &L) { |
17858 | if (!isActive()) return true; |
17859 | CurrentSource = L; |
17860 | return InitGlobal<PT_Float>(S, OpPC, A0); |
17861 | } |
17862 | #endif |
17863 | #ifdef GET_OPCODE_NAMES |
17864 | OP_InitGlobalTempSint8, |
17865 | OP_InitGlobalTempUint8, |
17866 | OP_InitGlobalTempSint16, |
17867 | OP_InitGlobalTempUint16, |
17868 | OP_InitGlobalTempSint32, |
17869 | OP_InitGlobalTempUint32, |
17870 | OP_InitGlobalTempSint64, |
17871 | OP_InitGlobalTempUint64, |
17872 | OP_InitGlobalTempIntAP, |
17873 | OP_InitGlobalTempIntAPS, |
17874 | OP_InitGlobalTempBool, |
17875 | OP_InitGlobalTempPtr, |
17876 | OP_InitGlobalTempFnPtr, |
17877 | OP_InitGlobalTempMemberPtr, |
17878 | OP_InitGlobalTempFloat, |
17879 | #endif |
17880 | #ifdef GET_INTERP |
17881 | case OP_InitGlobalTempSint8: { |
17882 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17883 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17884 | if (!InitGlobalTemp<PT_Sint8>(S, OpPC, V0, V1)) |
17885 | return false; |
17886 | continue; |
17887 | } |
17888 | case OP_InitGlobalTempUint8: { |
17889 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17890 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17891 | if (!InitGlobalTemp<PT_Uint8>(S, OpPC, V0, V1)) |
17892 | return false; |
17893 | continue; |
17894 | } |
17895 | case OP_InitGlobalTempSint16: { |
17896 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17897 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17898 | if (!InitGlobalTemp<PT_Sint16>(S, OpPC, V0, V1)) |
17899 | return false; |
17900 | continue; |
17901 | } |
17902 | case OP_InitGlobalTempUint16: { |
17903 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17904 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17905 | if (!InitGlobalTemp<PT_Uint16>(S, OpPC, V0, V1)) |
17906 | return false; |
17907 | continue; |
17908 | } |
17909 | case OP_InitGlobalTempSint32: { |
17910 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17911 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17912 | if (!InitGlobalTemp<PT_Sint32>(S, OpPC, V0, V1)) |
17913 | return false; |
17914 | continue; |
17915 | } |
17916 | case OP_InitGlobalTempUint32: { |
17917 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17918 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17919 | if (!InitGlobalTemp<PT_Uint32>(S, OpPC, V0, V1)) |
17920 | return false; |
17921 | continue; |
17922 | } |
17923 | case OP_InitGlobalTempSint64: { |
17924 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17925 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17926 | if (!InitGlobalTemp<PT_Sint64>(S, OpPC, V0, V1)) |
17927 | return false; |
17928 | continue; |
17929 | } |
17930 | case OP_InitGlobalTempUint64: { |
17931 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17932 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17933 | if (!InitGlobalTemp<PT_Uint64>(S, OpPC, V0, V1)) |
17934 | return false; |
17935 | continue; |
17936 | } |
17937 | case OP_InitGlobalTempIntAP: { |
17938 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17939 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17940 | if (!InitGlobalTemp<PT_IntAP>(S, OpPC, V0, V1)) |
17941 | return false; |
17942 | continue; |
17943 | } |
17944 | case OP_InitGlobalTempIntAPS: { |
17945 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17946 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17947 | if (!InitGlobalTemp<PT_IntAPS>(S, OpPC, V0, V1)) |
17948 | return false; |
17949 | continue; |
17950 | } |
17951 | case OP_InitGlobalTempBool: { |
17952 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17953 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17954 | if (!InitGlobalTemp<PT_Bool>(S, OpPC, V0, V1)) |
17955 | return false; |
17956 | continue; |
17957 | } |
17958 | case OP_InitGlobalTempPtr: { |
17959 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17960 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17961 | if (!InitGlobalTemp<PT_Ptr>(S, OpPC, V0, V1)) |
17962 | return false; |
17963 | continue; |
17964 | } |
17965 | case OP_InitGlobalTempFnPtr: { |
17966 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17967 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17968 | if (!InitGlobalTemp<PT_FnPtr>(S, OpPC, V0, V1)) |
17969 | return false; |
17970 | continue; |
17971 | } |
17972 | case OP_InitGlobalTempMemberPtr: { |
17973 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17974 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17975 | if (!InitGlobalTemp<PT_MemberPtr>(S, OpPC, V0, V1)) |
17976 | return false; |
17977 | continue; |
17978 | } |
17979 | case OP_InitGlobalTempFloat: { |
17980 | const auto V0 = ReadArg<uint32_t>(S, PC); |
17981 | const auto V1 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
17982 | if (!InitGlobalTemp<PT_Float>(S, OpPC, V0, V1)) |
17983 | return false; |
17984 | continue; |
17985 | } |
17986 | #endif |
17987 | #ifdef GET_DISASM |
17988 | case OP_InitGlobalTempSint8: |
17989 | PrintName("InitGlobalTempSint8" ); |
17990 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
17991 | continue; |
17992 | case OP_InitGlobalTempUint8: |
17993 | PrintName("InitGlobalTempUint8" ); |
17994 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
17995 | continue; |
17996 | case OP_InitGlobalTempSint16: |
17997 | PrintName("InitGlobalTempSint16" ); |
17998 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
17999 | continue; |
18000 | case OP_InitGlobalTempUint16: |
18001 | PrintName("InitGlobalTempUint16" ); |
18002 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18003 | continue; |
18004 | case OP_InitGlobalTempSint32: |
18005 | PrintName("InitGlobalTempSint32" ); |
18006 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18007 | continue; |
18008 | case OP_InitGlobalTempUint32: |
18009 | PrintName("InitGlobalTempUint32" ); |
18010 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18011 | continue; |
18012 | case OP_InitGlobalTempSint64: |
18013 | PrintName("InitGlobalTempSint64" ); |
18014 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18015 | continue; |
18016 | case OP_InitGlobalTempUint64: |
18017 | PrintName("InitGlobalTempUint64" ); |
18018 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18019 | continue; |
18020 | case OP_InitGlobalTempIntAP: |
18021 | PrintName("InitGlobalTempIntAP" ); |
18022 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18023 | continue; |
18024 | case OP_InitGlobalTempIntAPS: |
18025 | PrintName("InitGlobalTempIntAPS" ); |
18026 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18027 | continue; |
18028 | case OP_InitGlobalTempBool: |
18029 | PrintName("InitGlobalTempBool" ); |
18030 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18031 | continue; |
18032 | case OP_InitGlobalTempPtr: |
18033 | PrintName("InitGlobalTempPtr" ); |
18034 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18035 | continue; |
18036 | case OP_InitGlobalTempFnPtr: |
18037 | PrintName("InitGlobalTempFnPtr" ); |
18038 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18039 | continue; |
18040 | case OP_InitGlobalTempMemberPtr: |
18041 | PrintName("InitGlobalTempMemberPtr" ); |
18042 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18043 | continue; |
18044 | case OP_InitGlobalTempFloat: |
18045 | PrintName("InitGlobalTempFloat" ); |
18046 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18047 | continue; |
18048 | #endif |
18049 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18050 | bool emitInitGlobalTempSint8( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18051 | bool emitInitGlobalTempUint8( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18052 | bool emitInitGlobalTempSint16( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18053 | bool emitInitGlobalTempUint16( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18054 | bool emitInitGlobalTempSint32( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18055 | bool emitInitGlobalTempUint32( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18056 | bool emitInitGlobalTempSint64( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18057 | bool emitInitGlobalTempUint64( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18058 | bool emitInitGlobalTempIntAP( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18059 | bool emitInitGlobalTempIntAPS( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18060 | bool emitInitGlobalTempBool( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18061 | bool emitInitGlobalTempPtr( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18062 | bool emitInitGlobalTempFnPtr( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18063 | bool emitInitGlobalTempMemberPtr( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18064 | bool emitInitGlobalTempFloat( uint32_t , const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18065 | #endif |
18066 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18067 | [[nodiscard]] bool emitInitGlobalTemp(PrimType, uint32_t, const LifetimeExtendedTemporaryDecl *, const SourceInfo &I); |
18068 | #endif |
18069 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
18070 | bool |
18071 | #if defined(GET_EVAL_IMPL) |
18072 | EvalEmitter |
18073 | #else |
18074 | ByteCodeEmitter |
18075 | #endif |
18076 | ::emitInitGlobalTemp(PrimType T0, uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &I) { |
18077 | switch (T0) { |
18078 | case PT_Sint8: |
18079 | return emitInitGlobalTempSint8(A0, A1, I); |
18080 | case PT_Uint8: |
18081 | return emitInitGlobalTempUint8(A0, A1, I); |
18082 | case PT_Sint16: |
18083 | return emitInitGlobalTempSint16(A0, A1, I); |
18084 | case PT_Uint16: |
18085 | return emitInitGlobalTempUint16(A0, A1, I); |
18086 | case PT_Sint32: |
18087 | return emitInitGlobalTempSint32(A0, A1, I); |
18088 | case PT_Uint32: |
18089 | return emitInitGlobalTempUint32(A0, A1, I); |
18090 | case PT_Sint64: |
18091 | return emitInitGlobalTempSint64(A0, A1, I); |
18092 | case PT_Uint64: |
18093 | return emitInitGlobalTempUint64(A0, A1, I); |
18094 | case PT_IntAP: |
18095 | return emitInitGlobalTempIntAP(A0, A1, I); |
18096 | case PT_IntAPS: |
18097 | return emitInitGlobalTempIntAPS(A0, A1, I); |
18098 | case PT_Bool: |
18099 | return emitInitGlobalTempBool(A0, A1, I); |
18100 | case PT_Ptr: |
18101 | return emitInitGlobalTempPtr(A0, A1, I); |
18102 | case PT_FnPtr: |
18103 | return emitInitGlobalTempFnPtr(A0, A1, I); |
18104 | case PT_MemberPtr: |
18105 | return emitInitGlobalTempMemberPtr(A0, A1, I); |
18106 | case PT_Float: |
18107 | return emitInitGlobalTempFloat(A0, A1, I); |
18108 | } |
18109 | llvm_unreachable("invalid enum value" ); |
18110 | } |
18111 | #endif |
18112 | #ifdef GET_LINK_IMPL |
18113 | bool ByteCodeEmitter::emitInitGlobalTempSint8( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18114 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempSint8, A0, A1, L); |
18115 | } |
18116 | bool ByteCodeEmitter::emitInitGlobalTempUint8( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18117 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempUint8, A0, A1, L); |
18118 | } |
18119 | bool ByteCodeEmitter::emitInitGlobalTempSint16( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18120 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempSint16, A0, A1, L); |
18121 | } |
18122 | bool ByteCodeEmitter::emitInitGlobalTempUint16( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18123 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempUint16, A0, A1, L); |
18124 | } |
18125 | bool ByteCodeEmitter::emitInitGlobalTempSint32( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18126 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempSint32, A0, A1, L); |
18127 | } |
18128 | bool ByteCodeEmitter::emitInitGlobalTempUint32( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18129 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempUint32, A0, A1, L); |
18130 | } |
18131 | bool ByteCodeEmitter::emitInitGlobalTempSint64( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18132 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempSint64, A0, A1, L); |
18133 | } |
18134 | bool ByteCodeEmitter::emitInitGlobalTempUint64( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18135 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempUint64, A0, A1, L); |
18136 | } |
18137 | bool ByteCodeEmitter::emitInitGlobalTempIntAP( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18138 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempIntAP, A0, A1, L); |
18139 | } |
18140 | bool ByteCodeEmitter::emitInitGlobalTempIntAPS( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18141 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempIntAPS, A0, A1, L); |
18142 | } |
18143 | bool ByteCodeEmitter::emitInitGlobalTempBool( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18144 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempBool, A0, A1, L); |
18145 | } |
18146 | bool ByteCodeEmitter::emitInitGlobalTempPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18147 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempPtr, A0, A1, L); |
18148 | } |
18149 | bool ByteCodeEmitter::emitInitGlobalTempFnPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18150 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempFnPtr, A0, A1, L); |
18151 | } |
18152 | bool ByteCodeEmitter::emitInitGlobalTempMemberPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18153 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempMemberPtr, A0, A1, L); |
18154 | } |
18155 | bool ByteCodeEmitter::emitInitGlobalTempFloat( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18156 | return emitOp<uint32_t, const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempFloat, A0, A1, L); |
18157 | } |
18158 | #endif |
18159 | #ifdef GET_EVAL_IMPL |
18160 | bool EvalEmitter::emitInitGlobalTempSint8( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18161 | if (!isActive()) return true; |
18162 | CurrentSource = L; |
18163 | return InitGlobalTemp<PT_Sint8>(S, OpPC, A0, A1); |
18164 | } |
18165 | bool EvalEmitter::emitInitGlobalTempUint8( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18166 | if (!isActive()) return true; |
18167 | CurrentSource = L; |
18168 | return InitGlobalTemp<PT_Uint8>(S, OpPC, A0, A1); |
18169 | } |
18170 | bool EvalEmitter::emitInitGlobalTempSint16( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18171 | if (!isActive()) return true; |
18172 | CurrentSource = L; |
18173 | return InitGlobalTemp<PT_Sint16>(S, OpPC, A0, A1); |
18174 | } |
18175 | bool EvalEmitter::emitInitGlobalTempUint16( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18176 | if (!isActive()) return true; |
18177 | CurrentSource = L; |
18178 | return InitGlobalTemp<PT_Uint16>(S, OpPC, A0, A1); |
18179 | } |
18180 | bool EvalEmitter::emitInitGlobalTempSint32( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18181 | if (!isActive()) return true; |
18182 | CurrentSource = L; |
18183 | return InitGlobalTemp<PT_Sint32>(S, OpPC, A0, A1); |
18184 | } |
18185 | bool EvalEmitter::emitInitGlobalTempUint32( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18186 | if (!isActive()) return true; |
18187 | CurrentSource = L; |
18188 | return InitGlobalTemp<PT_Uint32>(S, OpPC, A0, A1); |
18189 | } |
18190 | bool EvalEmitter::emitInitGlobalTempSint64( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18191 | if (!isActive()) return true; |
18192 | CurrentSource = L; |
18193 | return InitGlobalTemp<PT_Sint64>(S, OpPC, A0, A1); |
18194 | } |
18195 | bool EvalEmitter::emitInitGlobalTempUint64( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18196 | if (!isActive()) return true; |
18197 | CurrentSource = L; |
18198 | return InitGlobalTemp<PT_Uint64>(S, OpPC, A0, A1); |
18199 | } |
18200 | bool EvalEmitter::emitInitGlobalTempIntAP( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18201 | if (!isActive()) return true; |
18202 | CurrentSource = L; |
18203 | return InitGlobalTemp<PT_IntAP>(S, OpPC, A0, A1); |
18204 | } |
18205 | bool EvalEmitter::emitInitGlobalTempIntAPS( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18206 | if (!isActive()) return true; |
18207 | CurrentSource = L; |
18208 | return InitGlobalTemp<PT_IntAPS>(S, OpPC, A0, A1); |
18209 | } |
18210 | bool EvalEmitter::emitInitGlobalTempBool( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18211 | if (!isActive()) return true; |
18212 | CurrentSource = L; |
18213 | return InitGlobalTemp<PT_Bool>(S, OpPC, A0, A1); |
18214 | } |
18215 | bool EvalEmitter::emitInitGlobalTempPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18216 | if (!isActive()) return true; |
18217 | CurrentSource = L; |
18218 | return InitGlobalTemp<PT_Ptr>(S, OpPC, A0, A1); |
18219 | } |
18220 | bool EvalEmitter::emitInitGlobalTempFnPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18221 | if (!isActive()) return true; |
18222 | CurrentSource = L; |
18223 | return InitGlobalTemp<PT_FnPtr>(S, OpPC, A0, A1); |
18224 | } |
18225 | bool EvalEmitter::emitInitGlobalTempMemberPtr( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18226 | if (!isActive()) return true; |
18227 | CurrentSource = L; |
18228 | return InitGlobalTemp<PT_MemberPtr>(S, OpPC, A0, A1); |
18229 | } |
18230 | bool EvalEmitter::emitInitGlobalTempFloat( uint32_t A0, const LifetimeExtendedTemporaryDecl * A1, const SourceInfo &L) { |
18231 | if (!isActive()) return true; |
18232 | CurrentSource = L; |
18233 | return InitGlobalTemp<PT_Float>(S, OpPC, A0, A1); |
18234 | } |
18235 | #endif |
18236 | #ifdef GET_OPCODE_NAMES |
18237 | OP_InitGlobalTempComp, |
18238 | #endif |
18239 | #ifdef GET_INTERP |
18240 | case OP_InitGlobalTempComp: { |
18241 | const auto V0 = ReadArg<const LifetimeExtendedTemporaryDecl *>(S, PC); |
18242 | if (!InitGlobalTempComp(S, OpPC, V0)) |
18243 | return false; |
18244 | continue; |
18245 | } |
18246 | #endif |
18247 | #ifdef GET_DISASM |
18248 | case OP_InitGlobalTempComp: |
18249 | PrintName("InitGlobalTempComp" ); |
18250 | OS << "\t" << ReadArg<const LifetimeExtendedTemporaryDecl *>(P, PC) << " " << "\n" ; |
18251 | continue; |
18252 | #endif |
18253 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18254 | bool emitInitGlobalTempComp( const LifetimeExtendedTemporaryDecl * , const SourceInfo &); |
18255 | #endif |
18256 | #ifdef GET_LINK_IMPL |
18257 | bool ByteCodeEmitter::emitInitGlobalTempComp( const LifetimeExtendedTemporaryDecl * A0, const SourceInfo &L) { |
18258 | return emitOp<const LifetimeExtendedTemporaryDecl *>(OP_InitGlobalTempComp, A0, L); |
18259 | } |
18260 | #endif |
18261 | #ifdef GET_EVAL_IMPL |
18262 | bool EvalEmitter::emitInitGlobalTempComp( const LifetimeExtendedTemporaryDecl * A0, const SourceInfo &L) { |
18263 | if (!isActive()) return true; |
18264 | CurrentSource = L; |
18265 | return InitGlobalTempComp(S, OpPC, A0); |
18266 | } |
18267 | #endif |
18268 | #ifdef GET_OPCODE_NAMES |
18269 | OP_InitPopSint8, |
18270 | OP_InitPopUint8, |
18271 | OP_InitPopSint16, |
18272 | OP_InitPopUint16, |
18273 | OP_InitPopSint32, |
18274 | OP_InitPopUint32, |
18275 | OP_InitPopSint64, |
18276 | OP_InitPopUint64, |
18277 | OP_InitPopIntAP, |
18278 | OP_InitPopIntAPS, |
18279 | OP_InitPopBool, |
18280 | OP_InitPopPtr, |
18281 | OP_InitPopFnPtr, |
18282 | OP_InitPopMemberPtr, |
18283 | OP_InitPopFloat, |
18284 | #endif |
18285 | #ifdef GET_INTERP |
18286 | case OP_InitPopSint8: { |
18287 | if (!InitPop<PT_Sint8>(S, OpPC)) |
18288 | return false; |
18289 | continue; |
18290 | } |
18291 | case OP_InitPopUint8: { |
18292 | if (!InitPop<PT_Uint8>(S, OpPC)) |
18293 | return false; |
18294 | continue; |
18295 | } |
18296 | case OP_InitPopSint16: { |
18297 | if (!InitPop<PT_Sint16>(S, OpPC)) |
18298 | return false; |
18299 | continue; |
18300 | } |
18301 | case OP_InitPopUint16: { |
18302 | if (!InitPop<PT_Uint16>(S, OpPC)) |
18303 | return false; |
18304 | continue; |
18305 | } |
18306 | case OP_InitPopSint32: { |
18307 | if (!InitPop<PT_Sint32>(S, OpPC)) |
18308 | return false; |
18309 | continue; |
18310 | } |
18311 | case OP_InitPopUint32: { |
18312 | if (!InitPop<PT_Uint32>(S, OpPC)) |
18313 | return false; |
18314 | continue; |
18315 | } |
18316 | case OP_InitPopSint64: { |
18317 | if (!InitPop<PT_Sint64>(S, OpPC)) |
18318 | return false; |
18319 | continue; |
18320 | } |
18321 | case OP_InitPopUint64: { |
18322 | if (!InitPop<PT_Uint64>(S, OpPC)) |
18323 | return false; |
18324 | continue; |
18325 | } |
18326 | case OP_InitPopIntAP: { |
18327 | if (!InitPop<PT_IntAP>(S, OpPC)) |
18328 | return false; |
18329 | continue; |
18330 | } |
18331 | case OP_InitPopIntAPS: { |
18332 | if (!InitPop<PT_IntAPS>(S, OpPC)) |
18333 | return false; |
18334 | continue; |
18335 | } |
18336 | case OP_InitPopBool: { |
18337 | if (!InitPop<PT_Bool>(S, OpPC)) |
18338 | return false; |
18339 | continue; |
18340 | } |
18341 | case OP_InitPopPtr: { |
18342 | if (!InitPop<PT_Ptr>(S, OpPC)) |
18343 | return false; |
18344 | continue; |
18345 | } |
18346 | case OP_InitPopFnPtr: { |
18347 | if (!InitPop<PT_FnPtr>(S, OpPC)) |
18348 | return false; |
18349 | continue; |
18350 | } |
18351 | case OP_InitPopMemberPtr: { |
18352 | if (!InitPop<PT_MemberPtr>(S, OpPC)) |
18353 | return false; |
18354 | continue; |
18355 | } |
18356 | case OP_InitPopFloat: { |
18357 | if (!InitPop<PT_Float>(S, OpPC)) |
18358 | return false; |
18359 | continue; |
18360 | } |
18361 | #endif |
18362 | #ifdef GET_DISASM |
18363 | case OP_InitPopSint8: |
18364 | PrintName("InitPopSint8" ); |
18365 | OS << "\t" << "\n" ; |
18366 | continue; |
18367 | case OP_InitPopUint8: |
18368 | PrintName("InitPopUint8" ); |
18369 | OS << "\t" << "\n" ; |
18370 | continue; |
18371 | case OP_InitPopSint16: |
18372 | PrintName("InitPopSint16" ); |
18373 | OS << "\t" << "\n" ; |
18374 | continue; |
18375 | case OP_InitPopUint16: |
18376 | PrintName("InitPopUint16" ); |
18377 | OS << "\t" << "\n" ; |
18378 | continue; |
18379 | case OP_InitPopSint32: |
18380 | PrintName("InitPopSint32" ); |
18381 | OS << "\t" << "\n" ; |
18382 | continue; |
18383 | case OP_InitPopUint32: |
18384 | PrintName("InitPopUint32" ); |
18385 | OS << "\t" << "\n" ; |
18386 | continue; |
18387 | case OP_InitPopSint64: |
18388 | PrintName("InitPopSint64" ); |
18389 | OS << "\t" << "\n" ; |
18390 | continue; |
18391 | case OP_InitPopUint64: |
18392 | PrintName("InitPopUint64" ); |
18393 | OS << "\t" << "\n" ; |
18394 | continue; |
18395 | case OP_InitPopIntAP: |
18396 | PrintName("InitPopIntAP" ); |
18397 | OS << "\t" << "\n" ; |
18398 | continue; |
18399 | case OP_InitPopIntAPS: |
18400 | PrintName("InitPopIntAPS" ); |
18401 | OS << "\t" << "\n" ; |
18402 | continue; |
18403 | case OP_InitPopBool: |
18404 | PrintName("InitPopBool" ); |
18405 | OS << "\t" << "\n" ; |
18406 | continue; |
18407 | case OP_InitPopPtr: |
18408 | PrintName("InitPopPtr" ); |
18409 | OS << "\t" << "\n" ; |
18410 | continue; |
18411 | case OP_InitPopFnPtr: |
18412 | PrintName("InitPopFnPtr" ); |
18413 | OS << "\t" << "\n" ; |
18414 | continue; |
18415 | case OP_InitPopMemberPtr: |
18416 | PrintName("InitPopMemberPtr" ); |
18417 | OS << "\t" << "\n" ; |
18418 | continue; |
18419 | case OP_InitPopFloat: |
18420 | PrintName("InitPopFloat" ); |
18421 | OS << "\t" << "\n" ; |
18422 | continue; |
18423 | #endif |
18424 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18425 | bool emitInitPopSint8(const SourceInfo &); |
18426 | bool emitInitPopUint8(const SourceInfo &); |
18427 | bool emitInitPopSint16(const SourceInfo &); |
18428 | bool emitInitPopUint16(const SourceInfo &); |
18429 | bool emitInitPopSint32(const SourceInfo &); |
18430 | bool emitInitPopUint32(const SourceInfo &); |
18431 | bool emitInitPopSint64(const SourceInfo &); |
18432 | bool emitInitPopUint64(const SourceInfo &); |
18433 | bool emitInitPopIntAP(const SourceInfo &); |
18434 | bool emitInitPopIntAPS(const SourceInfo &); |
18435 | bool emitInitPopBool(const SourceInfo &); |
18436 | bool emitInitPopPtr(const SourceInfo &); |
18437 | bool emitInitPopFnPtr(const SourceInfo &); |
18438 | bool emitInitPopMemberPtr(const SourceInfo &); |
18439 | bool emitInitPopFloat(const SourceInfo &); |
18440 | #endif |
18441 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18442 | [[nodiscard]] bool emitInitPop(PrimType, const SourceInfo &I); |
18443 | #endif |
18444 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
18445 | bool |
18446 | #if defined(GET_EVAL_IMPL) |
18447 | EvalEmitter |
18448 | #else |
18449 | ByteCodeEmitter |
18450 | #endif |
18451 | ::emitInitPop(PrimType T0, const SourceInfo &I) { |
18452 | switch (T0) { |
18453 | case PT_Sint8: |
18454 | return emitInitPopSint8(I); |
18455 | case PT_Uint8: |
18456 | return emitInitPopUint8(I); |
18457 | case PT_Sint16: |
18458 | return emitInitPopSint16(I); |
18459 | case PT_Uint16: |
18460 | return emitInitPopUint16(I); |
18461 | case PT_Sint32: |
18462 | return emitInitPopSint32(I); |
18463 | case PT_Uint32: |
18464 | return emitInitPopUint32(I); |
18465 | case PT_Sint64: |
18466 | return emitInitPopSint64(I); |
18467 | case PT_Uint64: |
18468 | return emitInitPopUint64(I); |
18469 | case PT_IntAP: |
18470 | return emitInitPopIntAP(I); |
18471 | case PT_IntAPS: |
18472 | return emitInitPopIntAPS(I); |
18473 | case PT_Bool: |
18474 | return emitInitPopBool(I); |
18475 | case PT_Ptr: |
18476 | return emitInitPopPtr(I); |
18477 | case PT_FnPtr: |
18478 | return emitInitPopFnPtr(I); |
18479 | case PT_MemberPtr: |
18480 | return emitInitPopMemberPtr(I); |
18481 | case PT_Float: |
18482 | return emitInitPopFloat(I); |
18483 | } |
18484 | llvm_unreachable("invalid enum value" ); |
18485 | } |
18486 | #endif |
18487 | #ifdef GET_LINK_IMPL |
18488 | bool ByteCodeEmitter::emitInitPopSint8(const SourceInfo &L) { |
18489 | return emitOp<>(OP_InitPopSint8, L); |
18490 | } |
18491 | bool ByteCodeEmitter::emitInitPopUint8(const SourceInfo &L) { |
18492 | return emitOp<>(OP_InitPopUint8, L); |
18493 | } |
18494 | bool ByteCodeEmitter::emitInitPopSint16(const SourceInfo &L) { |
18495 | return emitOp<>(OP_InitPopSint16, L); |
18496 | } |
18497 | bool ByteCodeEmitter::emitInitPopUint16(const SourceInfo &L) { |
18498 | return emitOp<>(OP_InitPopUint16, L); |
18499 | } |
18500 | bool ByteCodeEmitter::emitInitPopSint32(const SourceInfo &L) { |
18501 | return emitOp<>(OP_InitPopSint32, L); |
18502 | } |
18503 | bool ByteCodeEmitter::emitInitPopUint32(const SourceInfo &L) { |
18504 | return emitOp<>(OP_InitPopUint32, L); |
18505 | } |
18506 | bool ByteCodeEmitter::emitInitPopSint64(const SourceInfo &L) { |
18507 | return emitOp<>(OP_InitPopSint64, L); |
18508 | } |
18509 | bool ByteCodeEmitter::emitInitPopUint64(const SourceInfo &L) { |
18510 | return emitOp<>(OP_InitPopUint64, L); |
18511 | } |
18512 | bool ByteCodeEmitter::emitInitPopIntAP(const SourceInfo &L) { |
18513 | return emitOp<>(OP_InitPopIntAP, L); |
18514 | } |
18515 | bool ByteCodeEmitter::emitInitPopIntAPS(const SourceInfo &L) { |
18516 | return emitOp<>(OP_InitPopIntAPS, L); |
18517 | } |
18518 | bool ByteCodeEmitter::emitInitPopBool(const SourceInfo &L) { |
18519 | return emitOp<>(OP_InitPopBool, L); |
18520 | } |
18521 | bool ByteCodeEmitter::emitInitPopPtr(const SourceInfo &L) { |
18522 | return emitOp<>(OP_InitPopPtr, L); |
18523 | } |
18524 | bool ByteCodeEmitter::emitInitPopFnPtr(const SourceInfo &L) { |
18525 | return emitOp<>(OP_InitPopFnPtr, L); |
18526 | } |
18527 | bool ByteCodeEmitter::emitInitPopMemberPtr(const SourceInfo &L) { |
18528 | return emitOp<>(OP_InitPopMemberPtr, L); |
18529 | } |
18530 | bool ByteCodeEmitter::emitInitPopFloat(const SourceInfo &L) { |
18531 | return emitOp<>(OP_InitPopFloat, L); |
18532 | } |
18533 | #endif |
18534 | #ifdef GET_EVAL_IMPL |
18535 | bool EvalEmitter::emitInitPopSint8(const SourceInfo &L) { |
18536 | if (!isActive()) return true; |
18537 | CurrentSource = L; |
18538 | return InitPop<PT_Sint8>(S, OpPC); |
18539 | } |
18540 | bool EvalEmitter::emitInitPopUint8(const SourceInfo &L) { |
18541 | if (!isActive()) return true; |
18542 | CurrentSource = L; |
18543 | return InitPop<PT_Uint8>(S, OpPC); |
18544 | } |
18545 | bool EvalEmitter::emitInitPopSint16(const SourceInfo &L) { |
18546 | if (!isActive()) return true; |
18547 | CurrentSource = L; |
18548 | return InitPop<PT_Sint16>(S, OpPC); |
18549 | } |
18550 | bool EvalEmitter::emitInitPopUint16(const SourceInfo &L) { |
18551 | if (!isActive()) return true; |
18552 | CurrentSource = L; |
18553 | return InitPop<PT_Uint16>(S, OpPC); |
18554 | } |
18555 | bool EvalEmitter::emitInitPopSint32(const SourceInfo &L) { |
18556 | if (!isActive()) return true; |
18557 | CurrentSource = L; |
18558 | return InitPop<PT_Sint32>(S, OpPC); |
18559 | } |
18560 | bool EvalEmitter::emitInitPopUint32(const SourceInfo &L) { |
18561 | if (!isActive()) return true; |
18562 | CurrentSource = L; |
18563 | return InitPop<PT_Uint32>(S, OpPC); |
18564 | } |
18565 | bool EvalEmitter::emitInitPopSint64(const SourceInfo &L) { |
18566 | if (!isActive()) return true; |
18567 | CurrentSource = L; |
18568 | return InitPop<PT_Sint64>(S, OpPC); |
18569 | } |
18570 | bool EvalEmitter::emitInitPopUint64(const SourceInfo &L) { |
18571 | if (!isActive()) return true; |
18572 | CurrentSource = L; |
18573 | return InitPop<PT_Uint64>(S, OpPC); |
18574 | } |
18575 | bool EvalEmitter::emitInitPopIntAP(const SourceInfo &L) { |
18576 | if (!isActive()) return true; |
18577 | CurrentSource = L; |
18578 | return InitPop<PT_IntAP>(S, OpPC); |
18579 | } |
18580 | bool EvalEmitter::emitInitPopIntAPS(const SourceInfo &L) { |
18581 | if (!isActive()) return true; |
18582 | CurrentSource = L; |
18583 | return InitPop<PT_IntAPS>(S, OpPC); |
18584 | } |
18585 | bool EvalEmitter::emitInitPopBool(const SourceInfo &L) { |
18586 | if (!isActive()) return true; |
18587 | CurrentSource = L; |
18588 | return InitPop<PT_Bool>(S, OpPC); |
18589 | } |
18590 | bool EvalEmitter::emitInitPopPtr(const SourceInfo &L) { |
18591 | if (!isActive()) return true; |
18592 | CurrentSource = L; |
18593 | return InitPop<PT_Ptr>(S, OpPC); |
18594 | } |
18595 | bool EvalEmitter::emitInitPopFnPtr(const SourceInfo &L) { |
18596 | if (!isActive()) return true; |
18597 | CurrentSource = L; |
18598 | return InitPop<PT_FnPtr>(S, OpPC); |
18599 | } |
18600 | bool EvalEmitter::emitInitPopMemberPtr(const SourceInfo &L) { |
18601 | if (!isActive()) return true; |
18602 | CurrentSource = L; |
18603 | return InitPop<PT_MemberPtr>(S, OpPC); |
18604 | } |
18605 | bool EvalEmitter::emitInitPopFloat(const SourceInfo &L) { |
18606 | if (!isActive()) return true; |
18607 | CurrentSource = L; |
18608 | return InitPop<PT_Float>(S, OpPC); |
18609 | } |
18610 | #endif |
18611 | #ifdef GET_OPCODE_NAMES |
18612 | OP_InitThisBitFieldSint8, |
18613 | OP_InitThisBitFieldUint8, |
18614 | OP_InitThisBitFieldSint16, |
18615 | OP_InitThisBitFieldUint16, |
18616 | OP_InitThisBitFieldSint32, |
18617 | OP_InitThisBitFieldUint32, |
18618 | OP_InitThisBitFieldSint64, |
18619 | OP_InitThisBitFieldUint64, |
18620 | OP_InitThisBitFieldIntAP, |
18621 | OP_InitThisBitFieldIntAPS, |
18622 | OP_InitThisBitFieldBool, |
18623 | #endif |
18624 | #ifdef GET_INTERP |
18625 | case OP_InitThisBitFieldSint8: { |
18626 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18627 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18628 | if (!InitThisBitField<PT_Sint8>(S, OpPC, V0, V1)) |
18629 | return false; |
18630 | continue; |
18631 | } |
18632 | case OP_InitThisBitFieldUint8: { |
18633 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18634 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18635 | if (!InitThisBitField<PT_Uint8>(S, OpPC, V0, V1)) |
18636 | return false; |
18637 | continue; |
18638 | } |
18639 | case OP_InitThisBitFieldSint16: { |
18640 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18641 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18642 | if (!InitThisBitField<PT_Sint16>(S, OpPC, V0, V1)) |
18643 | return false; |
18644 | continue; |
18645 | } |
18646 | case OP_InitThisBitFieldUint16: { |
18647 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18648 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18649 | if (!InitThisBitField<PT_Uint16>(S, OpPC, V0, V1)) |
18650 | return false; |
18651 | continue; |
18652 | } |
18653 | case OP_InitThisBitFieldSint32: { |
18654 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18655 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18656 | if (!InitThisBitField<PT_Sint32>(S, OpPC, V0, V1)) |
18657 | return false; |
18658 | continue; |
18659 | } |
18660 | case OP_InitThisBitFieldUint32: { |
18661 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18662 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18663 | if (!InitThisBitField<PT_Uint32>(S, OpPC, V0, V1)) |
18664 | return false; |
18665 | continue; |
18666 | } |
18667 | case OP_InitThisBitFieldSint64: { |
18668 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18669 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18670 | if (!InitThisBitField<PT_Sint64>(S, OpPC, V0, V1)) |
18671 | return false; |
18672 | continue; |
18673 | } |
18674 | case OP_InitThisBitFieldUint64: { |
18675 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18676 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18677 | if (!InitThisBitField<PT_Uint64>(S, OpPC, V0, V1)) |
18678 | return false; |
18679 | continue; |
18680 | } |
18681 | case OP_InitThisBitFieldIntAP: { |
18682 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18683 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18684 | if (!InitThisBitField<PT_IntAP>(S, OpPC, V0, V1)) |
18685 | return false; |
18686 | continue; |
18687 | } |
18688 | case OP_InitThisBitFieldIntAPS: { |
18689 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18690 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18691 | if (!InitThisBitField<PT_IntAPS>(S, OpPC, V0, V1)) |
18692 | return false; |
18693 | continue; |
18694 | } |
18695 | case OP_InitThisBitFieldBool: { |
18696 | const auto V0 = ReadArg<const Record::Field *>(S, PC); |
18697 | const auto V1 = ReadArg<uint32_t>(S, PC); |
18698 | if (!InitThisBitField<PT_Bool>(S, OpPC, V0, V1)) |
18699 | return false; |
18700 | continue; |
18701 | } |
18702 | #endif |
18703 | #ifdef GET_DISASM |
18704 | case OP_InitThisBitFieldSint8: |
18705 | PrintName("InitThisBitFieldSint8" ); |
18706 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18707 | continue; |
18708 | case OP_InitThisBitFieldUint8: |
18709 | PrintName("InitThisBitFieldUint8" ); |
18710 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18711 | continue; |
18712 | case OP_InitThisBitFieldSint16: |
18713 | PrintName("InitThisBitFieldSint16" ); |
18714 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18715 | continue; |
18716 | case OP_InitThisBitFieldUint16: |
18717 | PrintName("InitThisBitFieldUint16" ); |
18718 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18719 | continue; |
18720 | case OP_InitThisBitFieldSint32: |
18721 | PrintName("InitThisBitFieldSint32" ); |
18722 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18723 | continue; |
18724 | case OP_InitThisBitFieldUint32: |
18725 | PrintName("InitThisBitFieldUint32" ); |
18726 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18727 | continue; |
18728 | case OP_InitThisBitFieldSint64: |
18729 | PrintName("InitThisBitFieldSint64" ); |
18730 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18731 | continue; |
18732 | case OP_InitThisBitFieldUint64: |
18733 | PrintName("InitThisBitFieldUint64" ); |
18734 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18735 | continue; |
18736 | case OP_InitThisBitFieldIntAP: |
18737 | PrintName("InitThisBitFieldIntAP" ); |
18738 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18739 | continue; |
18740 | case OP_InitThisBitFieldIntAPS: |
18741 | PrintName("InitThisBitFieldIntAPS" ); |
18742 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18743 | continue; |
18744 | case OP_InitThisBitFieldBool: |
18745 | PrintName("InitThisBitFieldBool" ); |
18746 | OS << "\t" << ReadArg<const Record::Field *>(P, PC) << " " << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
18747 | continue; |
18748 | #endif |
18749 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18750 | bool emitInitThisBitFieldSint8( const Record::Field * , uint32_t , const SourceInfo &); |
18751 | bool emitInitThisBitFieldUint8( const Record::Field * , uint32_t , const SourceInfo &); |
18752 | bool emitInitThisBitFieldSint16( const Record::Field * , uint32_t , const SourceInfo &); |
18753 | bool emitInitThisBitFieldUint16( const Record::Field * , uint32_t , const SourceInfo &); |
18754 | bool emitInitThisBitFieldSint32( const Record::Field * , uint32_t , const SourceInfo &); |
18755 | bool emitInitThisBitFieldUint32( const Record::Field * , uint32_t , const SourceInfo &); |
18756 | bool emitInitThisBitFieldSint64( const Record::Field * , uint32_t , const SourceInfo &); |
18757 | bool emitInitThisBitFieldUint64( const Record::Field * , uint32_t , const SourceInfo &); |
18758 | bool emitInitThisBitFieldIntAP( const Record::Field * , uint32_t , const SourceInfo &); |
18759 | bool emitInitThisBitFieldIntAPS( const Record::Field * , uint32_t , const SourceInfo &); |
18760 | bool emitInitThisBitFieldBool( const Record::Field * , uint32_t , const SourceInfo &); |
18761 | #endif |
18762 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
18763 | [[nodiscard]] bool emitInitThisBitField(PrimType, const Record::Field *, uint32_t, const SourceInfo &I); |
18764 | #endif |
18765 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
18766 | bool |
18767 | #if defined(GET_EVAL_IMPL) |
18768 | EvalEmitter |
18769 | #else |
18770 | ByteCodeEmitter |
18771 | #endif |
18772 | ::emitInitThisBitField(PrimType T0, const Record::Field * A0, uint32_t A1, const SourceInfo &I) { |
18773 | switch (T0) { |
18774 | case PT_Sint8: |
18775 | return emitInitThisBitFieldSint8(A0, A1, I); |
18776 | case PT_Uint8: |
18777 | return emitInitThisBitFieldUint8(A0, A1, I); |
18778 | case PT_Sint16: |
18779 | return emitInitThisBitFieldSint16(A0, A1, I); |
18780 | case PT_Uint16: |
18781 | return emitInitThisBitFieldUint16(A0, A1, I); |
18782 | case PT_Sint32: |
18783 | return emitInitThisBitFieldSint32(A0, A1, I); |
18784 | case PT_Uint32: |
18785 | return emitInitThisBitFieldUint32(A0, A1, I); |
18786 | case PT_Sint64: |
18787 | return emitInitThisBitFieldSint64(A0, A1, I); |
18788 | case PT_Uint64: |
18789 | return emitInitThisBitFieldUint64(A0, A1, I); |
18790 | case PT_IntAP: |
18791 | return emitInitThisBitFieldIntAP(A0, A1, I); |
18792 | case PT_IntAPS: |
18793 | return emitInitThisBitFieldIntAPS(A0, A1, I); |
18794 | case PT_Bool: |
18795 | return emitInitThisBitFieldBool(A0, A1, I); |
18796 | default: llvm_unreachable("invalid type: emitInitThisBitField" ); |
18797 | } |
18798 | llvm_unreachable("invalid enum value" ); |
18799 | } |
18800 | #endif |
18801 | #ifdef GET_LINK_IMPL |
18802 | bool ByteCodeEmitter::emitInitThisBitFieldSint8( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18803 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldSint8, A0, A1, L); |
18804 | } |
18805 | bool ByteCodeEmitter::emitInitThisBitFieldUint8( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18806 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldUint8, A0, A1, L); |
18807 | } |
18808 | bool ByteCodeEmitter::emitInitThisBitFieldSint16( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18809 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldSint16, A0, A1, L); |
18810 | } |
18811 | bool ByteCodeEmitter::emitInitThisBitFieldUint16( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18812 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldUint16, A0, A1, L); |
18813 | } |
18814 | bool ByteCodeEmitter::emitInitThisBitFieldSint32( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18815 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldSint32, A0, A1, L); |
18816 | } |
18817 | bool ByteCodeEmitter::emitInitThisBitFieldUint32( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18818 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldUint32, A0, A1, L); |
18819 | } |
18820 | bool ByteCodeEmitter::emitInitThisBitFieldSint64( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18821 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldSint64, A0, A1, L); |
18822 | } |
18823 | bool ByteCodeEmitter::emitInitThisBitFieldUint64( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18824 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldUint64, A0, A1, L); |
18825 | } |
18826 | bool ByteCodeEmitter::emitInitThisBitFieldIntAP( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18827 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldIntAP, A0, A1, L); |
18828 | } |
18829 | bool ByteCodeEmitter::emitInitThisBitFieldIntAPS( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18830 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldIntAPS, A0, A1, L); |
18831 | } |
18832 | bool ByteCodeEmitter::emitInitThisBitFieldBool( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18833 | return emitOp<const Record::Field *, uint32_t>(OP_InitThisBitFieldBool, A0, A1, L); |
18834 | } |
18835 | #endif |
18836 | #ifdef GET_EVAL_IMPL |
18837 | bool EvalEmitter::emitInitThisBitFieldSint8( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18838 | if (!isActive()) return true; |
18839 | CurrentSource = L; |
18840 | return InitThisBitField<PT_Sint8>(S, OpPC, A0, A1); |
18841 | } |
18842 | bool EvalEmitter::emitInitThisBitFieldUint8( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18843 | if (!isActive()) return true; |
18844 | CurrentSource = L; |
18845 | return InitThisBitField<PT_Uint8>(S, OpPC, A0, A1); |
18846 | } |
18847 | bool EvalEmitter::emitInitThisBitFieldSint16( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18848 | if (!isActive()) return true; |
18849 | CurrentSource = L; |
18850 | return InitThisBitField<PT_Sint16>(S, OpPC, A0, A1); |
18851 | } |
18852 | bool EvalEmitter::emitInitThisBitFieldUint16( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18853 | if (!isActive()) return true; |
18854 | CurrentSource = L; |
18855 | return InitThisBitField<PT_Uint16>(S, OpPC, A0, A1); |
18856 | } |
18857 | bool EvalEmitter::emitInitThisBitFieldSint32( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18858 | if (!isActive()) return true; |
18859 | CurrentSource = L; |
18860 | return InitThisBitField<PT_Sint32>(S, OpPC, A0, A1); |
18861 | } |
18862 | bool EvalEmitter::emitInitThisBitFieldUint32( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18863 | if (!isActive()) return true; |
18864 | CurrentSource = L; |
18865 | return InitThisBitField<PT_Uint32>(S, OpPC, A0, A1); |
18866 | } |
18867 | bool EvalEmitter::emitInitThisBitFieldSint64( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18868 | if (!isActive()) return true; |
18869 | CurrentSource = L; |
18870 | return InitThisBitField<PT_Sint64>(S, OpPC, A0, A1); |
18871 | } |
18872 | bool EvalEmitter::emitInitThisBitFieldUint64( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18873 | if (!isActive()) return true; |
18874 | CurrentSource = L; |
18875 | return InitThisBitField<PT_Uint64>(S, OpPC, A0, A1); |
18876 | } |
18877 | bool EvalEmitter::emitInitThisBitFieldIntAP( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18878 | if (!isActive()) return true; |
18879 | CurrentSource = L; |
18880 | return InitThisBitField<PT_IntAP>(S, OpPC, A0, A1); |
18881 | } |
18882 | bool EvalEmitter::emitInitThisBitFieldIntAPS( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18883 | if (!isActive()) return true; |
18884 | CurrentSource = L; |
18885 | return InitThisBitField<PT_IntAPS>(S, OpPC, A0, A1); |
18886 | } |
18887 | bool EvalEmitter::emitInitThisBitFieldBool( const Record::Field * A0, uint32_t A1, const SourceInfo &L) { |
18888 | if (!isActive()) return true; |
18889 | CurrentSource = L; |
18890 | return InitThisBitField<PT_Bool>(S, OpPC, A0, A1); |
18891 | } |
18892 | #endif |
18893 | #ifdef GET_OPCODE_NAMES |
18894 | OP_InitThisFieldSint8, |
18895 | OP_InitThisFieldUint8, |
18896 | OP_InitThisFieldSint16, |
18897 | OP_InitThisFieldUint16, |
18898 | OP_InitThisFieldSint32, |
18899 | OP_InitThisFieldUint32, |
18900 | OP_InitThisFieldSint64, |
18901 | OP_InitThisFieldUint64, |
18902 | OP_InitThisFieldIntAP, |
18903 | OP_InitThisFieldIntAPS, |
18904 | OP_InitThisFieldBool, |
18905 | OP_InitThisFieldPtr, |
18906 | OP_InitThisFieldFnPtr, |
18907 | OP_InitThisFieldMemberPtr, |
18908 | OP_InitThisFieldFloat, |
18909 | #endif |
18910 | #ifdef GET_INTERP |
18911 | case OP_InitThisFieldSint8: { |
18912 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18913 | if (!InitThisField<PT_Sint8>(S, OpPC, V0)) |
18914 | return false; |
18915 | continue; |
18916 | } |
18917 | case OP_InitThisFieldUint8: { |
18918 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18919 | if (!InitThisField<PT_Uint8>(S, OpPC, V0)) |
18920 | return false; |
18921 | continue; |
18922 | } |
18923 | case OP_InitThisFieldSint16: { |
18924 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18925 | if (!InitThisField<PT_Sint16>(S, OpPC, V0)) |
18926 | return false; |
18927 | continue; |
18928 | } |
18929 | case OP_InitThisFieldUint16: { |
18930 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18931 | if (!InitThisField<PT_Uint16>(S, OpPC, V0)) |
18932 | return false; |
18933 | continue; |
18934 | } |
18935 | case OP_InitThisFieldSint32: { |
18936 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18937 | if (!InitThisField<PT_Sint32>(S, OpPC, V0)) |
18938 | return false; |
18939 | continue; |
18940 | } |
18941 | case OP_InitThisFieldUint32: { |
18942 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18943 | if (!InitThisField<PT_Uint32>(S, OpPC, V0)) |
18944 | return false; |
18945 | continue; |
18946 | } |
18947 | case OP_InitThisFieldSint64: { |
18948 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18949 | if (!InitThisField<PT_Sint64>(S, OpPC, V0)) |
18950 | return false; |
18951 | continue; |
18952 | } |
18953 | case OP_InitThisFieldUint64: { |
18954 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18955 | if (!InitThisField<PT_Uint64>(S, OpPC, V0)) |
18956 | return false; |
18957 | continue; |
18958 | } |
18959 | case OP_InitThisFieldIntAP: { |
18960 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18961 | if (!InitThisField<PT_IntAP>(S, OpPC, V0)) |
18962 | return false; |
18963 | continue; |
18964 | } |
18965 | case OP_InitThisFieldIntAPS: { |
18966 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18967 | if (!InitThisField<PT_IntAPS>(S, OpPC, V0)) |
18968 | return false; |
18969 | continue; |
18970 | } |
18971 | case OP_InitThisFieldBool: { |
18972 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18973 | if (!InitThisField<PT_Bool>(S, OpPC, V0)) |
18974 | return false; |
18975 | continue; |
18976 | } |
18977 | case OP_InitThisFieldPtr: { |
18978 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18979 | if (!InitThisField<PT_Ptr>(S, OpPC, V0)) |
18980 | return false; |
18981 | continue; |
18982 | } |
18983 | case OP_InitThisFieldFnPtr: { |
18984 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18985 | if (!InitThisField<PT_FnPtr>(S, OpPC, V0)) |
18986 | return false; |
18987 | continue; |
18988 | } |
18989 | case OP_InitThisFieldMemberPtr: { |
18990 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18991 | if (!InitThisField<PT_MemberPtr>(S, OpPC, V0)) |
18992 | return false; |
18993 | continue; |
18994 | } |
18995 | case OP_InitThisFieldFloat: { |
18996 | const auto V0 = ReadArg<uint32_t>(S, PC); |
18997 | if (!InitThisField<PT_Float>(S, OpPC, V0)) |
18998 | return false; |
18999 | continue; |
19000 | } |
19001 | #endif |
19002 | #ifdef GET_DISASM |
19003 | case OP_InitThisFieldSint8: |
19004 | PrintName("InitThisFieldSint8" ); |
19005 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19006 | continue; |
19007 | case OP_InitThisFieldUint8: |
19008 | PrintName("InitThisFieldUint8" ); |
19009 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19010 | continue; |
19011 | case OP_InitThisFieldSint16: |
19012 | PrintName("InitThisFieldSint16" ); |
19013 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19014 | continue; |
19015 | case OP_InitThisFieldUint16: |
19016 | PrintName("InitThisFieldUint16" ); |
19017 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19018 | continue; |
19019 | case OP_InitThisFieldSint32: |
19020 | PrintName("InitThisFieldSint32" ); |
19021 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19022 | continue; |
19023 | case OP_InitThisFieldUint32: |
19024 | PrintName("InitThisFieldUint32" ); |
19025 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19026 | continue; |
19027 | case OP_InitThisFieldSint64: |
19028 | PrintName("InitThisFieldSint64" ); |
19029 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19030 | continue; |
19031 | case OP_InitThisFieldUint64: |
19032 | PrintName("InitThisFieldUint64" ); |
19033 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19034 | continue; |
19035 | case OP_InitThisFieldIntAP: |
19036 | PrintName("InitThisFieldIntAP" ); |
19037 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19038 | continue; |
19039 | case OP_InitThisFieldIntAPS: |
19040 | PrintName("InitThisFieldIntAPS" ); |
19041 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19042 | continue; |
19043 | case OP_InitThisFieldBool: |
19044 | PrintName("InitThisFieldBool" ); |
19045 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19046 | continue; |
19047 | case OP_InitThisFieldPtr: |
19048 | PrintName("InitThisFieldPtr" ); |
19049 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19050 | continue; |
19051 | case OP_InitThisFieldFnPtr: |
19052 | PrintName("InitThisFieldFnPtr" ); |
19053 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19054 | continue; |
19055 | case OP_InitThisFieldMemberPtr: |
19056 | PrintName("InitThisFieldMemberPtr" ); |
19057 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19058 | continue; |
19059 | case OP_InitThisFieldFloat: |
19060 | PrintName("InitThisFieldFloat" ); |
19061 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19062 | continue; |
19063 | #endif |
19064 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19065 | bool emitInitThisFieldSint8( uint32_t , const SourceInfo &); |
19066 | bool emitInitThisFieldUint8( uint32_t , const SourceInfo &); |
19067 | bool emitInitThisFieldSint16( uint32_t , const SourceInfo &); |
19068 | bool emitInitThisFieldUint16( uint32_t , const SourceInfo &); |
19069 | bool emitInitThisFieldSint32( uint32_t , const SourceInfo &); |
19070 | bool emitInitThisFieldUint32( uint32_t , const SourceInfo &); |
19071 | bool emitInitThisFieldSint64( uint32_t , const SourceInfo &); |
19072 | bool emitInitThisFieldUint64( uint32_t , const SourceInfo &); |
19073 | bool emitInitThisFieldIntAP( uint32_t , const SourceInfo &); |
19074 | bool emitInitThisFieldIntAPS( uint32_t , const SourceInfo &); |
19075 | bool emitInitThisFieldBool( uint32_t , const SourceInfo &); |
19076 | bool emitInitThisFieldPtr( uint32_t , const SourceInfo &); |
19077 | bool emitInitThisFieldFnPtr( uint32_t , const SourceInfo &); |
19078 | bool emitInitThisFieldMemberPtr( uint32_t , const SourceInfo &); |
19079 | bool emitInitThisFieldFloat( uint32_t , const SourceInfo &); |
19080 | #endif |
19081 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19082 | [[nodiscard]] bool emitInitThisField(PrimType, uint32_t, const SourceInfo &I); |
19083 | #endif |
19084 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
19085 | bool |
19086 | #if defined(GET_EVAL_IMPL) |
19087 | EvalEmitter |
19088 | #else |
19089 | ByteCodeEmitter |
19090 | #endif |
19091 | ::emitInitThisField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
19092 | switch (T0) { |
19093 | case PT_Sint8: |
19094 | return emitInitThisFieldSint8(A0, I); |
19095 | case PT_Uint8: |
19096 | return emitInitThisFieldUint8(A0, I); |
19097 | case PT_Sint16: |
19098 | return emitInitThisFieldSint16(A0, I); |
19099 | case PT_Uint16: |
19100 | return emitInitThisFieldUint16(A0, I); |
19101 | case PT_Sint32: |
19102 | return emitInitThisFieldSint32(A0, I); |
19103 | case PT_Uint32: |
19104 | return emitInitThisFieldUint32(A0, I); |
19105 | case PT_Sint64: |
19106 | return emitInitThisFieldSint64(A0, I); |
19107 | case PT_Uint64: |
19108 | return emitInitThisFieldUint64(A0, I); |
19109 | case PT_IntAP: |
19110 | return emitInitThisFieldIntAP(A0, I); |
19111 | case PT_IntAPS: |
19112 | return emitInitThisFieldIntAPS(A0, I); |
19113 | case PT_Bool: |
19114 | return emitInitThisFieldBool(A0, I); |
19115 | case PT_Ptr: |
19116 | return emitInitThisFieldPtr(A0, I); |
19117 | case PT_FnPtr: |
19118 | return emitInitThisFieldFnPtr(A0, I); |
19119 | case PT_MemberPtr: |
19120 | return emitInitThisFieldMemberPtr(A0, I); |
19121 | case PT_Float: |
19122 | return emitInitThisFieldFloat(A0, I); |
19123 | } |
19124 | llvm_unreachable("invalid enum value" ); |
19125 | } |
19126 | #endif |
19127 | #ifdef GET_LINK_IMPL |
19128 | bool ByteCodeEmitter::emitInitThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
19129 | return emitOp<uint32_t>(OP_InitThisFieldSint8, A0, L); |
19130 | } |
19131 | bool ByteCodeEmitter::emitInitThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
19132 | return emitOp<uint32_t>(OP_InitThisFieldUint8, A0, L); |
19133 | } |
19134 | bool ByteCodeEmitter::emitInitThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
19135 | return emitOp<uint32_t>(OP_InitThisFieldSint16, A0, L); |
19136 | } |
19137 | bool ByteCodeEmitter::emitInitThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
19138 | return emitOp<uint32_t>(OP_InitThisFieldUint16, A0, L); |
19139 | } |
19140 | bool ByteCodeEmitter::emitInitThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
19141 | return emitOp<uint32_t>(OP_InitThisFieldSint32, A0, L); |
19142 | } |
19143 | bool ByteCodeEmitter::emitInitThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
19144 | return emitOp<uint32_t>(OP_InitThisFieldUint32, A0, L); |
19145 | } |
19146 | bool ByteCodeEmitter::emitInitThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
19147 | return emitOp<uint32_t>(OP_InitThisFieldSint64, A0, L); |
19148 | } |
19149 | bool ByteCodeEmitter::emitInitThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
19150 | return emitOp<uint32_t>(OP_InitThisFieldUint64, A0, L); |
19151 | } |
19152 | bool ByteCodeEmitter::emitInitThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
19153 | return emitOp<uint32_t>(OP_InitThisFieldIntAP, A0, L); |
19154 | } |
19155 | bool ByteCodeEmitter::emitInitThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
19156 | return emitOp<uint32_t>(OP_InitThisFieldIntAPS, A0, L); |
19157 | } |
19158 | bool ByteCodeEmitter::emitInitThisFieldBool( uint32_t A0, const SourceInfo &L) { |
19159 | return emitOp<uint32_t>(OP_InitThisFieldBool, A0, L); |
19160 | } |
19161 | bool ByteCodeEmitter::emitInitThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
19162 | return emitOp<uint32_t>(OP_InitThisFieldPtr, A0, L); |
19163 | } |
19164 | bool ByteCodeEmitter::emitInitThisFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
19165 | return emitOp<uint32_t>(OP_InitThisFieldFnPtr, A0, L); |
19166 | } |
19167 | bool ByteCodeEmitter::emitInitThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
19168 | return emitOp<uint32_t>(OP_InitThisFieldMemberPtr, A0, L); |
19169 | } |
19170 | bool ByteCodeEmitter::emitInitThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
19171 | return emitOp<uint32_t>(OP_InitThisFieldFloat, A0, L); |
19172 | } |
19173 | #endif |
19174 | #ifdef GET_EVAL_IMPL |
19175 | bool EvalEmitter::emitInitThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
19176 | if (!isActive()) return true; |
19177 | CurrentSource = L; |
19178 | return InitThisField<PT_Sint8>(S, OpPC, A0); |
19179 | } |
19180 | bool EvalEmitter::emitInitThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
19181 | if (!isActive()) return true; |
19182 | CurrentSource = L; |
19183 | return InitThisField<PT_Uint8>(S, OpPC, A0); |
19184 | } |
19185 | bool EvalEmitter::emitInitThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
19186 | if (!isActive()) return true; |
19187 | CurrentSource = L; |
19188 | return InitThisField<PT_Sint16>(S, OpPC, A0); |
19189 | } |
19190 | bool EvalEmitter::emitInitThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
19191 | if (!isActive()) return true; |
19192 | CurrentSource = L; |
19193 | return InitThisField<PT_Uint16>(S, OpPC, A0); |
19194 | } |
19195 | bool EvalEmitter::emitInitThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
19196 | if (!isActive()) return true; |
19197 | CurrentSource = L; |
19198 | return InitThisField<PT_Sint32>(S, OpPC, A0); |
19199 | } |
19200 | bool EvalEmitter::emitInitThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
19201 | if (!isActive()) return true; |
19202 | CurrentSource = L; |
19203 | return InitThisField<PT_Uint32>(S, OpPC, A0); |
19204 | } |
19205 | bool EvalEmitter::emitInitThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
19206 | if (!isActive()) return true; |
19207 | CurrentSource = L; |
19208 | return InitThisField<PT_Sint64>(S, OpPC, A0); |
19209 | } |
19210 | bool EvalEmitter::emitInitThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
19211 | if (!isActive()) return true; |
19212 | CurrentSource = L; |
19213 | return InitThisField<PT_Uint64>(S, OpPC, A0); |
19214 | } |
19215 | bool EvalEmitter::emitInitThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
19216 | if (!isActive()) return true; |
19217 | CurrentSource = L; |
19218 | return InitThisField<PT_IntAP>(S, OpPC, A0); |
19219 | } |
19220 | bool EvalEmitter::emitInitThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
19221 | if (!isActive()) return true; |
19222 | CurrentSource = L; |
19223 | return InitThisField<PT_IntAPS>(S, OpPC, A0); |
19224 | } |
19225 | bool EvalEmitter::emitInitThisFieldBool( uint32_t A0, const SourceInfo &L) { |
19226 | if (!isActive()) return true; |
19227 | CurrentSource = L; |
19228 | return InitThisField<PT_Bool>(S, OpPC, A0); |
19229 | } |
19230 | bool EvalEmitter::emitInitThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
19231 | if (!isActive()) return true; |
19232 | CurrentSource = L; |
19233 | return InitThisField<PT_Ptr>(S, OpPC, A0); |
19234 | } |
19235 | bool EvalEmitter::emitInitThisFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
19236 | if (!isActive()) return true; |
19237 | CurrentSource = L; |
19238 | return InitThisField<PT_FnPtr>(S, OpPC, A0); |
19239 | } |
19240 | bool EvalEmitter::emitInitThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
19241 | if (!isActive()) return true; |
19242 | CurrentSource = L; |
19243 | return InitThisField<PT_MemberPtr>(S, OpPC, A0); |
19244 | } |
19245 | bool EvalEmitter::emitInitThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
19246 | if (!isActive()) return true; |
19247 | CurrentSource = L; |
19248 | return InitThisField<PT_Float>(S, OpPC, A0); |
19249 | } |
19250 | #endif |
19251 | #ifdef GET_OPCODE_NAMES |
19252 | OP_InitThisFieldActiveSint8, |
19253 | OP_InitThisFieldActiveUint8, |
19254 | OP_InitThisFieldActiveSint16, |
19255 | OP_InitThisFieldActiveUint16, |
19256 | OP_InitThisFieldActiveSint32, |
19257 | OP_InitThisFieldActiveUint32, |
19258 | OP_InitThisFieldActiveSint64, |
19259 | OP_InitThisFieldActiveUint64, |
19260 | OP_InitThisFieldActiveIntAP, |
19261 | OP_InitThisFieldActiveIntAPS, |
19262 | OP_InitThisFieldActiveBool, |
19263 | OP_InitThisFieldActivePtr, |
19264 | OP_InitThisFieldActiveFnPtr, |
19265 | OP_InitThisFieldActiveMemberPtr, |
19266 | OP_InitThisFieldActiveFloat, |
19267 | #endif |
19268 | #ifdef GET_INTERP |
19269 | case OP_InitThisFieldActiveSint8: { |
19270 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19271 | if (!InitThisFieldActive<PT_Sint8>(S, OpPC, V0)) |
19272 | return false; |
19273 | continue; |
19274 | } |
19275 | case OP_InitThisFieldActiveUint8: { |
19276 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19277 | if (!InitThisFieldActive<PT_Uint8>(S, OpPC, V0)) |
19278 | return false; |
19279 | continue; |
19280 | } |
19281 | case OP_InitThisFieldActiveSint16: { |
19282 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19283 | if (!InitThisFieldActive<PT_Sint16>(S, OpPC, V0)) |
19284 | return false; |
19285 | continue; |
19286 | } |
19287 | case OP_InitThisFieldActiveUint16: { |
19288 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19289 | if (!InitThisFieldActive<PT_Uint16>(S, OpPC, V0)) |
19290 | return false; |
19291 | continue; |
19292 | } |
19293 | case OP_InitThisFieldActiveSint32: { |
19294 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19295 | if (!InitThisFieldActive<PT_Sint32>(S, OpPC, V0)) |
19296 | return false; |
19297 | continue; |
19298 | } |
19299 | case OP_InitThisFieldActiveUint32: { |
19300 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19301 | if (!InitThisFieldActive<PT_Uint32>(S, OpPC, V0)) |
19302 | return false; |
19303 | continue; |
19304 | } |
19305 | case OP_InitThisFieldActiveSint64: { |
19306 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19307 | if (!InitThisFieldActive<PT_Sint64>(S, OpPC, V0)) |
19308 | return false; |
19309 | continue; |
19310 | } |
19311 | case OP_InitThisFieldActiveUint64: { |
19312 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19313 | if (!InitThisFieldActive<PT_Uint64>(S, OpPC, V0)) |
19314 | return false; |
19315 | continue; |
19316 | } |
19317 | case OP_InitThisFieldActiveIntAP: { |
19318 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19319 | if (!InitThisFieldActive<PT_IntAP>(S, OpPC, V0)) |
19320 | return false; |
19321 | continue; |
19322 | } |
19323 | case OP_InitThisFieldActiveIntAPS: { |
19324 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19325 | if (!InitThisFieldActive<PT_IntAPS>(S, OpPC, V0)) |
19326 | return false; |
19327 | continue; |
19328 | } |
19329 | case OP_InitThisFieldActiveBool: { |
19330 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19331 | if (!InitThisFieldActive<PT_Bool>(S, OpPC, V0)) |
19332 | return false; |
19333 | continue; |
19334 | } |
19335 | case OP_InitThisFieldActivePtr: { |
19336 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19337 | if (!InitThisFieldActive<PT_Ptr>(S, OpPC, V0)) |
19338 | return false; |
19339 | continue; |
19340 | } |
19341 | case OP_InitThisFieldActiveFnPtr: { |
19342 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19343 | if (!InitThisFieldActive<PT_FnPtr>(S, OpPC, V0)) |
19344 | return false; |
19345 | continue; |
19346 | } |
19347 | case OP_InitThisFieldActiveMemberPtr: { |
19348 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19349 | if (!InitThisFieldActive<PT_MemberPtr>(S, OpPC, V0)) |
19350 | return false; |
19351 | continue; |
19352 | } |
19353 | case OP_InitThisFieldActiveFloat: { |
19354 | const auto V0 = ReadArg<uint32_t>(S, PC); |
19355 | if (!InitThisFieldActive<PT_Float>(S, OpPC, V0)) |
19356 | return false; |
19357 | continue; |
19358 | } |
19359 | #endif |
19360 | #ifdef GET_DISASM |
19361 | case OP_InitThisFieldActiveSint8: |
19362 | PrintName("InitThisFieldActiveSint8" ); |
19363 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19364 | continue; |
19365 | case OP_InitThisFieldActiveUint8: |
19366 | PrintName("InitThisFieldActiveUint8" ); |
19367 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19368 | continue; |
19369 | case OP_InitThisFieldActiveSint16: |
19370 | PrintName("InitThisFieldActiveSint16" ); |
19371 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19372 | continue; |
19373 | case OP_InitThisFieldActiveUint16: |
19374 | PrintName("InitThisFieldActiveUint16" ); |
19375 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19376 | continue; |
19377 | case OP_InitThisFieldActiveSint32: |
19378 | PrintName("InitThisFieldActiveSint32" ); |
19379 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19380 | continue; |
19381 | case OP_InitThisFieldActiveUint32: |
19382 | PrintName("InitThisFieldActiveUint32" ); |
19383 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19384 | continue; |
19385 | case OP_InitThisFieldActiveSint64: |
19386 | PrintName("InitThisFieldActiveSint64" ); |
19387 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19388 | continue; |
19389 | case OP_InitThisFieldActiveUint64: |
19390 | PrintName("InitThisFieldActiveUint64" ); |
19391 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19392 | continue; |
19393 | case OP_InitThisFieldActiveIntAP: |
19394 | PrintName("InitThisFieldActiveIntAP" ); |
19395 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19396 | continue; |
19397 | case OP_InitThisFieldActiveIntAPS: |
19398 | PrintName("InitThisFieldActiveIntAPS" ); |
19399 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19400 | continue; |
19401 | case OP_InitThisFieldActiveBool: |
19402 | PrintName("InitThisFieldActiveBool" ); |
19403 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19404 | continue; |
19405 | case OP_InitThisFieldActivePtr: |
19406 | PrintName("InitThisFieldActivePtr" ); |
19407 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19408 | continue; |
19409 | case OP_InitThisFieldActiveFnPtr: |
19410 | PrintName("InitThisFieldActiveFnPtr" ); |
19411 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19412 | continue; |
19413 | case OP_InitThisFieldActiveMemberPtr: |
19414 | PrintName("InitThisFieldActiveMemberPtr" ); |
19415 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19416 | continue; |
19417 | case OP_InitThisFieldActiveFloat: |
19418 | PrintName("InitThisFieldActiveFloat" ); |
19419 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
19420 | continue; |
19421 | #endif |
19422 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19423 | bool emitInitThisFieldActiveSint8( uint32_t , const SourceInfo &); |
19424 | bool emitInitThisFieldActiveUint8( uint32_t , const SourceInfo &); |
19425 | bool emitInitThisFieldActiveSint16( uint32_t , const SourceInfo &); |
19426 | bool emitInitThisFieldActiveUint16( uint32_t , const SourceInfo &); |
19427 | bool emitInitThisFieldActiveSint32( uint32_t , const SourceInfo &); |
19428 | bool emitInitThisFieldActiveUint32( uint32_t , const SourceInfo &); |
19429 | bool emitInitThisFieldActiveSint64( uint32_t , const SourceInfo &); |
19430 | bool emitInitThisFieldActiveUint64( uint32_t , const SourceInfo &); |
19431 | bool emitInitThisFieldActiveIntAP( uint32_t , const SourceInfo &); |
19432 | bool emitInitThisFieldActiveIntAPS( uint32_t , const SourceInfo &); |
19433 | bool emitInitThisFieldActiveBool( uint32_t , const SourceInfo &); |
19434 | bool emitInitThisFieldActivePtr( uint32_t , const SourceInfo &); |
19435 | bool emitInitThisFieldActiveFnPtr( uint32_t , const SourceInfo &); |
19436 | bool emitInitThisFieldActiveMemberPtr( uint32_t , const SourceInfo &); |
19437 | bool emitInitThisFieldActiveFloat( uint32_t , const SourceInfo &); |
19438 | #endif |
19439 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19440 | [[nodiscard]] bool emitInitThisFieldActive(PrimType, uint32_t, const SourceInfo &I); |
19441 | #endif |
19442 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
19443 | bool |
19444 | #if defined(GET_EVAL_IMPL) |
19445 | EvalEmitter |
19446 | #else |
19447 | ByteCodeEmitter |
19448 | #endif |
19449 | ::emitInitThisFieldActive(PrimType T0, uint32_t A0, const SourceInfo &I) { |
19450 | switch (T0) { |
19451 | case PT_Sint8: |
19452 | return emitInitThisFieldActiveSint8(A0, I); |
19453 | case PT_Uint8: |
19454 | return emitInitThisFieldActiveUint8(A0, I); |
19455 | case PT_Sint16: |
19456 | return emitInitThisFieldActiveSint16(A0, I); |
19457 | case PT_Uint16: |
19458 | return emitInitThisFieldActiveUint16(A0, I); |
19459 | case PT_Sint32: |
19460 | return emitInitThisFieldActiveSint32(A0, I); |
19461 | case PT_Uint32: |
19462 | return emitInitThisFieldActiveUint32(A0, I); |
19463 | case PT_Sint64: |
19464 | return emitInitThisFieldActiveSint64(A0, I); |
19465 | case PT_Uint64: |
19466 | return emitInitThisFieldActiveUint64(A0, I); |
19467 | case PT_IntAP: |
19468 | return emitInitThisFieldActiveIntAP(A0, I); |
19469 | case PT_IntAPS: |
19470 | return emitInitThisFieldActiveIntAPS(A0, I); |
19471 | case PT_Bool: |
19472 | return emitInitThisFieldActiveBool(A0, I); |
19473 | case PT_Ptr: |
19474 | return emitInitThisFieldActivePtr(A0, I); |
19475 | case PT_FnPtr: |
19476 | return emitInitThisFieldActiveFnPtr(A0, I); |
19477 | case PT_MemberPtr: |
19478 | return emitInitThisFieldActiveMemberPtr(A0, I); |
19479 | case PT_Float: |
19480 | return emitInitThisFieldActiveFloat(A0, I); |
19481 | } |
19482 | llvm_unreachable("invalid enum value" ); |
19483 | } |
19484 | #endif |
19485 | #ifdef GET_LINK_IMPL |
19486 | bool ByteCodeEmitter::emitInitThisFieldActiveSint8( uint32_t A0, const SourceInfo &L) { |
19487 | return emitOp<uint32_t>(OP_InitThisFieldActiveSint8, A0, L); |
19488 | } |
19489 | bool ByteCodeEmitter::emitInitThisFieldActiveUint8( uint32_t A0, const SourceInfo &L) { |
19490 | return emitOp<uint32_t>(OP_InitThisFieldActiveUint8, A0, L); |
19491 | } |
19492 | bool ByteCodeEmitter::emitInitThisFieldActiveSint16( uint32_t A0, const SourceInfo &L) { |
19493 | return emitOp<uint32_t>(OP_InitThisFieldActiveSint16, A0, L); |
19494 | } |
19495 | bool ByteCodeEmitter::emitInitThisFieldActiveUint16( uint32_t A0, const SourceInfo &L) { |
19496 | return emitOp<uint32_t>(OP_InitThisFieldActiveUint16, A0, L); |
19497 | } |
19498 | bool ByteCodeEmitter::emitInitThisFieldActiveSint32( uint32_t A0, const SourceInfo &L) { |
19499 | return emitOp<uint32_t>(OP_InitThisFieldActiveSint32, A0, L); |
19500 | } |
19501 | bool ByteCodeEmitter::emitInitThisFieldActiveUint32( uint32_t A0, const SourceInfo &L) { |
19502 | return emitOp<uint32_t>(OP_InitThisFieldActiveUint32, A0, L); |
19503 | } |
19504 | bool ByteCodeEmitter::emitInitThisFieldActiveSint64( uint32_t A0, const SourceInfo &L) { |
19505 | return emitOp<uint32_t>(OP_InitThisFieldActiveSint64, A0, L); |
19506 | } |
19507 | bool ByteCodeEmitter::emitInitThisFieldActiveUint64( uint32_t A0, const SourceInfo &L) { |
19508 | return emitOp<uint32_t>(OP_InitThisFieldActiveUint64, A0, L); |
19509 | } |
19510 | bool ByteCodeEmitter::emitInitThisFieldActiveIntAP( uint32_t A0, const SourceInfo &L) { |
19511 | return emitOp<uint32_t>(OP_InitThisFieldActiveIntAP, A0, L); |
19512 | } |
19513 | bool ByteCodeEmitter::emitInitThisFieldActiveIntAPS( uint32_t A0, const SourceInfo &L) { |
19514 | return emitOp<uint32_t>(OP_InitThisFieldActiveIntAPS, A0, L); |
19515 | } |
19516 | bool ByteCodeEmitter::emitInitThisFieldActiveBool( uint32_t A0, const SourceInfo &L) { |
19517 | return emitOp<uint32_t>(OP_InitThisFieldActiveBool, A0, L); |
19518 | } |
19519 | bool ByteCodeEmitter::emitInitThisFieldActivePtr( uint32_t A0, const SourceInfo &L) { |
19520 | return emitOp<uint32_t>(OP_InitThisFieldActivePtr, A0, L); |
19521 | } |
19522 | bool ByteCodeEmitter::emitInitThisFieldActiveFnPtr( uint32_t A0, const SourceInfo &L) { |
19523 | return emitOp<uint32_t>(OP_InitThisFieldActiveFnPtr, A0, L); |
19524 | } |
19525 | bool ByteCodeEmitter::emitInitThisFieldActiveMemberPtr( uint32_t A0, const SourceInfo &L) { |
19526 | return emitOp<uint32_t>(OP_InitThisFieldActiveMemberPtr, A0, L); |
19527 | } |
19528 | bool ByteCodeEmitter::emitInitThisFieldActiveFloat( uint32_t A0, const SourceInfo &L) { |
19529 | return emitOp<uint32_t>(OP_InitThisFieldActiveFloat, A0, L); |
19530 | } |
19531 | #endif |
19532 | #ifdef GET_EVAL_IMPL |
19533 | bool EvalEmitter::emitInitThisFieldActiveSint8( uint32_t A0, const SourceInfo &L) { |
19534 | if (!isActive()) return true; |
19535 | CurrentSource = L; |
19536 | return InitThisFieldActive<PT_Sint8>(S, OpPC, A0); |
19537 | } |
19538 | bool EvalEmitter::emitInitThisFieldActiveUint8( uint32_t A0, const SourceInfo &L) { |
19539 | if (!isActive()) return true; |
19540 | CurrentSource = L; |
19541 | return InitThisFieldActive<PT_Uint8>(S, OpPC, A0); |
19542 | } |
19543 | bool EvalEmitter::emitInitThisFieldActiveSint16( uint32_t A0, const SourceInfo &L) { |
19544 | if (!isActive()) return true; |
19545 | CurrentSource = L; |
19546 | return InitThisFieldActive<PT_Sint16>(S, OpPC, A0); |
19547 | } |
19548 | bool EvalEmitter::emitInitThisFieldActiveUint16( uint32_t A0, const SourceInfo &L) { |
19549 | if (!isActive()) return true; |
19550 | CurrentSource = L; |
19551 | return InitThisFieldActive<PT_Uint16>(S, OpPC, A0); |
19552 | } |
19553 | bool EvalEmitter::emitInitThisFieldActiveSint32( uint32_t A0, const SourceInfo &L) { |
19554 | if (!isActive()) return true; |
19555 | CurrentSource = L; |
19556 | return InitThisFieldActive<PT_Sint32>(S, OpPC, A0); |
19557 | } |
19558 | bool EvalEmitter::emitInitThisFieldActiveUint32( uint32_t A0, const SourceInfo &L) { |
19559 | if (!isActive()) return true; |
19560 | CurrentSource = L; |
19561 | return InitThisFieldActive<PT_Uint32>(S, OpPC, A0); |
19562 | } |
19563 | bool EvalEmitter::emitInitThisFieldActiveSint64( uint32_t A0, const SourceInfo &L) { |
19564 | if (!isActive()) return true; |
19565 | CurrentSource = L; |
19566 | return InitThisFieldActive<PT_Sint64>(S, OpPC, A0); |
19567 | } |
19568 | bool EvalEmitter::emitInitThisFieldActiveUint64( uint32_t A0, const SourceInfo &L) { |
19569 | if (!isActive()) return true; |
19570 | CurrentSource = L; |
19571 | return InitThisFieldActive<PT_Uint64>(S, OpPC, A0); |
19572 | } |
19573 | bool EvalEmitter::emitInitThisFieldActiveIntAP( uint32_t A0, const SourceInfo &L) { |
19574 | if (!isActive()) return true; |
19575 | CurrentSource = L; |
19576 | return InitThisFieldActive<PT_IntAP>(S, OpPC, A0); |
19577 | } |
19578 | bool EvalEmitter::emitInitThisFieldActiveIntAPS( uint32_t A0, const SourceInfo &L) { |
19579 | if (!isActive()) return true; |
19580 | CurrentSource = L; |
19581 | return InitThisFieldActive<PT_IntAPS>(S, OpPC, A0); |
19582 | } |
19583 | bool EvalEmitter::emitInitThisFieldActiveBool( uint32_t A0, const SourceInfo &L) { |
19584 | if (!isActive()) return true; |
19585 | CurrentSource = L; |
19586 | return InitThisFieldActive<PT_Bool>(S, OpPC, A0); |
19587 | } |
19588 | bool EvalEmitter::emitInitThisFieldActivePtr( uint32_t A0, const SourceInfo &L) { |
19589 | if (!isActive()) return true; |
19590 | CurrentSource = L; |
19591 | return InitThisFieldActive<PT_Ptr>(S, OpPC, A0); |
19592 | } |
19593 | bool EvalEmitter::emitInitThisFieldActiveFnPtr( uint32_t A0, const SourceInfo &L) { |
19594 | if (!isActive()) return true; |
19595 | CurrentSource = L; |
19596 | return InitThisFieldActive<PT_FnPtr>(S, OpPC, A0); |
19597 | } |
19598 | bool EvalEmitter::emitInitThisFieldActiveMemberPtr( uint32_t A0, const SourceInfo &L) { |
19599 | if (!isActive()) return true; |
19600 | CurrentSource = L; |
19601 | return InitThisFieldActive<PT_MemberPtr>(S, OpPC, A0); |
19602 | } |
19603 | bool EvalEmitter::emitInitThisFieldActiveFloat( uint32_t A0, const SourceInfo &L) { |
19604 | if (!isActive()) return true; |
19605 | CurrentSource = L; |
19606 | return InitThisFieldActive<PT_Float>(S, OpPC, A0); |
19607 | } |
19608 | #endif |
19609 | #ifdef GET_OPCODE_NAMES |
19610 | OP_InvBool, |
19611 | #endif |
19612 | #ifdef GET_INTERP |
19613 | case OP_InvBool: { |
19614 | if (!Inv<PT_Bool>(S, OpPC)) |
19615 | return false; |
19616 | continue; |
19617 | } |
19618 | #endif |
19619 | #ifdef GET_DISASM |
19620 | case OP_InvBool: |
19621 | PrintName("InvBool" ); |
19622 | OS << "\t" << "\n" ; |
19623 | continue; |
19624 | #endif |
19625 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19626 | bool emitInvBool(const SourceInfo &); |
19627 | #endif |
19628 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19629 | [[nodiscard]] bool emitInv(PrimType, const SourceInfo &I); |
19630 | #endif |
19631 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
19632 | bool |
19633 | #if defined(GET_EVAL_IMPL) |
19634 | EvalEmitter |
19635 | #else |
19636 | ByteCodeEmitter |
19637 | #endif |
19638 | ::emitInv(PrimType T0, const SourceInfo &I) { |
19639 | switch (T0) { |
19640 | case PT_Bool: |
19641 | return emitInvBool(I); |
19642 | default: llvm_unreachable("invalid type: emitInv" ); |
19643 | } |
19644 | llvm_unreachable("invalid enum value" ); |
19645 | } |
19646 | #endif |
19647 | #ifdef GET_LINK_IMPL |
19648 | bool ByteCodeEmitter::emitInvBool(const SourceInfo &L) { |
19649 | return emitOp<>(OP_InvBool, L); |
19650 | } |
19651 | #endif |
19652 | #ifdef GET_EVAL_IMPL |
19653 | bool EvalEmitter::emitInvBool(const SourceInfo &L) { |
19654 | if (!isActive()) return true; |
19655 | CurrentSource = L; |
19656 | return Inv<PT_Bool>(S, OpPC); |
19657 | } |
19658 | #endif |
19659 | #ifdef GET_OPCODE_NAMES |
19660 | OP_Invalid, |
19661 | #endif |
19662 | #ifdef GET_INTERP |
19663 | case OP_Invalid: { |
19664 | if (!Invalid(S, OpPC)) |
19665 | return false; |
19666 | continue; |
19667 | } |
19668 | #endif |
19669 | #ifdef GET_DISASM |
19670 | case OP_Invalid: |
19671 | PrintName("Invalid" ); |
19672 | OS << "\t" << "\n" ; |
19673 | continue; |
19674 | #endif |
19675 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19676 | bool emitInvalid(const SourceInfo &); |
19677 | #endif |
19678 | #ifdef GET_LINK_IMPL |
19679 | bool ByteCodeEmitter::emitInvalid(const SourceInfo &L) { |
19680 | return emitOp<>(OP_Invalid, L); |
19681 | } |
19682 | #endif |
19683 | #ifdef GET_EVAL_IMPL |
19684 | bool EvalEmitter::emitInvalid(const SourceInfo &L) { |
19685 | if (!isActive()) return true; |
19686 | CurrentSource = L; |
19687 | return Invalid(S, OpPC); |
19688 | } |
19689 | #endif |
19690 | #ifdef GET_OPCODE_NAMES |
19691 | OP_InvalidCast, |
19692 | #endif |
19693 | #ifdef GET_INTERP |
19694 | case OP_InvalidCast: { |
19695 | const auto V0 = ReadArg<CastKind>(S, PC); |
19696 | if (!InvalidCast(S, OpPC, V0)) |
19697 | return false; |
19698 | continue; |
19699 | } |
19700 | #endif |
19701 | #ifdef GET_DISASM |
19702 | case OP_InvalidCast: |
19703 | PrintName("InvalidCast" ); |
19704 | OS << "\t" << ReadArg<CastKind>(P, PC) << " " << "\n" ; |
19705 | continue; |
19706 | #endif |
19707 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19708 | bool emitInvalidCast( CastKind , const SourceInfo &); |
19709 | #endif |
19710 | #ifdef GET_LINK_IMPL |
19711 | bool ByteCodeEmitter::emitInvalidCast( CastKind A0, const SourceInfo &L) { |
19712 | return emitOp<CastKind>(OP_InvalidCast, A0, L); |
19713 | } |
19714 | #endif |
19715 | #ifdef GET_EVAL_IMPL |
19716 | bool EvalEmitter::emitInvalidCast( CastKind A0, const SourceInfo &L) { |
19717 | if (!isActive()) return true; |
19718 | CurrentSource = L; |
19719 | return InvalidCast(S, OpPC, A0); |
19720 | } |
19721 | #endif |
19722 | #ifdef GET_OPCODE_NAMES |
19723 | OP_InvalidDeclRef, |
19724 | #endif |
19725 | #ifdef GET_INTERP |
19726 | case OP_InvalidDeclRef: { |
19727 | const auto V0 = ReadArg<const DeclRefExpr *>(S, PC); |
19728 | if (!InvalidDeclRef(S, OpPC, V0)) |
19729 | return false; |
19730 | continue; |
19731 | } |
19732 | #endif |
19733 | #ifdef GET_DISASM |
19734 | case OP_InvalidDeclRef: |
19735 | PrintName("InvalidDeclRef" ); |
19736 | OS << "\t" << ReadArg<const DeclRefExpr *>(P, PC) << " " << "\n" ; |
19737 | continue; |
19738 | #endif |
19739 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19740 | bool emitInvalidDeclRef( const DeclRefExpr * , const SourceInfo &); |
19741 | #endif |
19742 | #ifdef GET_LINK_IMPL |
19743 | bool ByteCodeEmitter::emitInvalidDeclRef( const DeclRefExpr * A0, const SourceInfo &L) { |
19744 | return emitOp<const DeclRefExpr *>(OP_InvalidDeclRef, A0, L); |
19745 | } |
19746 | #endif |
19747 | #ifdef GET_EVAL_IMPL |
19748 | bool EvalEmitter::emitInvalidDeclRef( const DeclRefExpr * A0, const SourceInfo &L) { |
19749 | if (!isActive()) return true; |
19750 | CurrentSource = L; |
19751 | return InvalidDeclRef(S, OpPC, A0); |
19752 | } |
19753 | #endif |
19754 | #ifdef GET_OPCODE_NAMES |
19755 | OP_Jf, |
19756 | #endif |
19757 | #ifdef GET_INTERP |
19758 | case OP_Jf: { |
19759 | const auto V0 = ReadArg<int32_t>(S, PC); |
19760 | if (!Jf(S, PC, V0)) |
19761 | return false; |
19762 | continue; |
19763 | } |
19764 | #endif |
19765 | #ifdef GET_DISASM |
19766 | case OP_Jf: |
19767 | PrintName("Jf" ); |
19768 | OS << "\t" << ReadArg<int32_t>(P, PC) << " " << "\n" ; |
19769 | continue; |
19770 | #endif |
19771 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19772 | bool emitJf( int32_t , const SourceInfo &); |
19773 | #endif |
19774 | #ifdef GET_LINK_IMPL |
19775 | bool ByteCodeEmitter::emitJf( int32_t A0, const SourceInfo &L) { |
19776 | return emitOp<int32_t>(OP_Jf, A0, L); |
19777 | } |
19778 | #endif |
19779 | #ifdef GET_OPCODE_NAMES |
19780 | OP_Jmp, |
19781 | #endif |
19782 | #ifdef GET_INTERP |
19783 | case OP_Jmp: { |
19784 | const auto V0 = ReadArg<int32_t>(S, PC); |
19785 | if (!Jmp(S, PC, V0)) |
19786 | return false; |
19787 | continue; |
19788 | } |
19789 | #endif |
19790 | #ifdef GET_DISASM |
19791 | case OP_Jmp: |
19792 | PrintName("Jmp" ); |
19793 | OS << "\t" << ReadArg<int32_t>(P, PC) << " " << "\n" ; |
19794 | continue; |
19795 | #endif |
19796 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19797 | bool emitJmp( int32_t , const SourceInfo &); |
19798 | #endif |
19799 | #ifdef GET_LINK_IMPL |
19800 | bool ByteCodeEmitter::emitJmp( int32_t A0, const SourceInfo &L) { |
19801 | return emitOp<int32_t>(OP_Jmp, A0, L); |
19802 | } |
19803 | #endif |
19804 | #ifdef GET_OPCODE_NAMES |
19805 | OP_Jt, |
19806 | #endif |
19807 | #ifdef GET_INTERP |
19808 | case OP_Jt: { |
19809 | const auto V0 = ReadArg<int32_t>(S, PC); |
19810 | if (!Jt(S, PC, V0)) |
19811 | return false; |
19812 | continue; |
19813 | } |
19814 | #endif |
19815 | #ifdef GET_DISASM |
19816 | case OP_Jt: |
19817 | PrintName("Jt" ); |
19818 | OS << "\t" << ReadArg<int32_t>(P, PC) << " " << "\n" ; |
19819 | continue; |
19820 | #endif |
19821 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19822 | bool emitJt( int32_t , const SourceInfo &); |
19823 | #endif |
19824 | #ifdef GET_LINK_IMPL |
19825 | bool ByteCodeEmitter::emitJt( int32_t A0, const SourceInfo &L) { |
19826 | return emitOp<int32_t>(OP_Jt, A0, L); |
19827 | } |
19828 | #endif |
19829 | #ifdef GET_OPCODE_NAMES |
19830 | OP_LESint8, |
19831 | OP_LEUint8, |
19832 | OP_LESint16, |
19833 | OP_LEUint16, |
19834 | OP_LESint32, |
19835 | OP_LEUint32, |
19836 | OP_LESint64, |
19837 | OP_LEUint64, |
19838 | OP_LEIntAP, |
19839 | OP_LEIntAPS, |
19840 | OP_LEBool, |
19841 | OP_LEPtr, |
19842 | OP_LEFloat, |
19843 | OP_LEFnPtr, |
19844 | #endif |
19845 | #ifdef GET_INTERP |
19846 | case OP_LESint8: { |
19847 | if (!LE<PT_Sint8>(S, OpPC)) |
19848 | return false; |
19849 | continue; |
19850 | } |
19851 | case OP_LEUint8: { |
19852 | if (!LE<PT_Uint8>(S, OpPC)) |
19853 | return false; |
19854 | continue; |
19855 | } |
19856 | case OP_LESint16: { |
19857 | if (!LE<PT_Sint16>(S, OpPC)) |
19858 | return false; |
19859 | continue; |
19860 | } |
19861 | case OP_LEUint16: { |
19862 | if (!LE<PT_Uint16>(S, OpPC)) |
19863 | return false; |
19864 | continue; |
19865 | } |
19866 | case OP_LESint32: { |
19867 | if (!LE<PT_Sint32>(S, OpPC)) |
19868 | return false; |
19869 | continue; |
19870 | } |
19871 | case OP_LEUint32: { |
19872 | if (!LE<PT_Uint32>(S, OpPC)) |
19873 | return false; |
19874 | continue; |
19875 | } |
19876 | case OP_LESint64: { |
19877 | if (!LE<PT_Sint64>(S, OpPC)) |
19878 | return false; |
19879 | continue; |
19880 | } |
19881 | case OP_LEUint64: { |
19882 | if (!LE<PT_Uint64>(S, OpPC)) |
19883 | return false; |
19884 | continue; |
19885 | } |
19886 | case OP_LEIntAP: { |
19887 | if (!LE<PT_IntAP>(S, OpPC)) |
19888 | return false; |
19889 | continue; |
19890 | } |
19891 | case OP_LEIntAPS: { |
19892 | if (!LE<PT_IntAPS>(S, OpPC)) |
19893 | return false; |
19894 | continue; |
19895 | } |
19896 | case OP_LEBool: { |
19897 | if (!LE<PT_Bool>(S, OpPC)) |
19898 | return false; |
19899 | continue; |
19900 | } |
19901 | case OP_LEPtr: { |
19902 | if (!LE<PT_Ptr>(S, OpPC)) |
19903 | return false; |
19904 | continue; |
19905 | } |
19906 | case OP_LEFloat: { |
19907 | if (!LE<PT_Float>(S, OpPC)) |
19908 | return false; |
19909 | continue; |
19910 | } |
19911 | case OP_LEFnPtr: { |
19912 | if (!LE<PT_FnPtr>(S, OpPC)) |
19913 | return false; |
19914 | continue; |
19915 | } |
19916 | #endif |
19917 | #ifdef GET_DISASM |
19918 | case OP_LESint8: |
19919 | PrintName("LESint8" ); |
19920 | OS << "\t" << "\n" ; |
19921 | continue; |
19922 | case OP_LEUint8: |
19923 | PrintName("LEUint8" ); |
19924 | OS << "\t" << "\n" ; |
19925 | continue; |
19926 | case OP_LESint16: |
19927 | PrintName("LESint16" ); |
19928 | OS << "\t" << "\n" ; |
19929 | continue; |
19930 | case OP_LEUint16: |
19931 | PrintName("LEUint16" ); |
19932 | OS << "\t" << "\n" ; |
19933 | continue; |
19934 | case OP_LESint32: |
19935 | PrintName("LESint32" ); |
19936 | OS << "\t" << "\n" ; |
19937 | continue; |
19938 | case OP_LEUint32: |
19939 | PrintName("LEUint32" ); |
19940 | OS << "\t" << "\n" ; |
19941 | continue; |
19942 | case OP_LESint64: |
19943 | PrintName("LESint64" ); |
19944 | OS << "\t" << "\n" ; |
19945 | continue; |
19946 | case OP_LEUint64: |
19947 | PrintName("LEUint64" ); |
19948 | OS << "\t" << "\n" ; |
19949 | continue; |
19950 | case OP_LEIntAP: |
19951 | PrintName("LEIntAP" ); |
19952 | OS << "\t" << "\n" ; |
19953 | continue; |
19954 | case OP_LEIntAPS: |
19955 | PrintName("LEIntAPS" ); |
19956 | OS << "\t" << "\n" ; |
19957 | continue; |
19958 | case OP_LEBool: |
19959 | PrintName("LEBool" ); |
19960 | OS << "\t" << "\n" ; |
19961 | continue; |
19962 | case OP_LEPtr: |
19963 | PrintName("LEPtr" ); |
19964 | OS << "\t" << "\n" ; |
19965 | continue; |
19966 | case OP_LEFloat: |
19967 | PrintName("LEFloat" ); |
19968 | OS << "\t" << "\n" ; |
19969 | continue; |
19970 | case OP_LEFnPtr: |
19971 | PrintName("LEFnPtr" ); |
19972 | OS << "\t" << "\n" ; |
19973 | continue; |
19974 | #endif |
19975 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19976 | bool emitLESint8(const SourceInfo &); |
19977 | bool emitLEUint8(const SourceInfo &); |
19978 | bool emitLESint16(const SourceInfo &); |
19979 | bool emitLEUint16(const SourceInfo &); |
19980 | bool emitLESint32(const SourceInfo &); |
19981 | bool emitLEUint32(const SourceInfo &); |
19982 | bool emitLESint64(const SourceInfo &); |
19983 | bool emitLEUint64(const SourceInfo &); |
19984 | bool emitLEIntAP(const SourceInfo &); |
19985 | bool emitLEIntAPS(const SourceInfo &); |
19986 | bool emitLEBool(const SourceInfo &); |
19987 | bool emitLEPtr(const SourceInfo &); |
19988 | bool emitLEFloat(const SourceInfo &); |
19989 | bool emitLEFnPtr(const SourceInfo &); |
19990 | #endif |
19991 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
19992 | [[nodiscard]] bool emitLE(PrimType, const SourceInfo &I); |
19993 | #endif |
19994 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
19995 | bool |
19996 | #if defined(GET_EVAL_IMPL) |
19997 | EvalEmitter |
19998 | #else |
19999 | ByteCodeEmitter |
20000 | #endif |
20001 | ::emitLE(PrimType T0, const SourceInfo &I) { |
20002 | switch (T0) { |
20003 | case PT_Sint8: |
20004 | return emitLESint8(I); |
20005 | case PT_Uint8: |
20006 | return emitLEUint8(I); |
20007 | case PT_Sint16: |
20008 | return emitLESint16(I); |
20009 | case PT_Uint16: |
20010 | return emitLEUint16(I); |
20011 | case PT_Sint32: |
20012 | return emitLESint32(I); |
20013 | case PT_Uint32: |
20014 | return emitLEUint32(I); |
20015 | case PT_Sint64: |
20016 | return emitLESint64(I); |
20017 | case PT_Uint64: |
20018 | return emitLEUint64(I); |
20019 | case PT_IntAP: |
20020 | return emitLEIntAP(I); |
20021 | case PT_IntAPS: |
20022 | return emitLEIntAPS(I); |
20023 | case PT_Bool: |
20024 | return emitLEBool(I); |
20025 | case PT_Ptr: |
20026 | return emitLEPtr(I); |
20027 | case PT_Float: |
20028 | return emitLEFloat(I); |
20029 | case PT_FnPtr: |
20030 | return emitLEFnPtr(I); |
20031 | default: llvm_unreachable("invalid type: emitLE" ); |
20032 | } |
20033 | llvm_unreachable("invalid enum value" ); |
20034 | } |
20035 | #endif |
20036 | #ifdef GET_LINK_IMPL |
20037 | bool ByteCodeEmitter::emitLESint8(const SourceInfo &L) { |
20038 | return emitOp<>(OP_LESint8, L); |
20039 | } |
20040 | bool ByteCodeEmitter::emitLEUint8(const SourceInfo &L) { |
20041 | return emitOp<>(OP_LEUint8, L); |
20042 | } |
20043 | bool ByteCodeEmitter::emitLESint16(const SourceInfo &L) { |
20044 | return emitOp<>(OP_LESint16, L); |
20045 | } |
20046 | bool ByteCodeEmitter::emitLEUint16(const SourceInfo &L) { |
20047 | return emitOp<>(OP_LEUint16, L); |
20048 | } |
20049 | bool ByteCodeEmitter::emitLESint32(const SourceInfo &L) { |
20050 | return emitOp<>(OP_LESint32, L); |
20051 | } |
20052 | bool ByteCodeEmitter::emitLEUint32(const SourceInfo &L) { |
20053 | return emitOp<>(OP_LEUint32, L); |
20054 | } |
20055 | bool ByteCodeEmitter::emitLESint64(const SourceInfo &L) { |
20056 | return emitOp<>(OP_LESint64, L); |
20057 | } |
20058 | bool ByteCodeEmitter::emitLEUint64(const SourceInfo &L) { |
20059 | return emitOp<>(OP_LEUint64, L); |
20060 | } |
20061 | bool ByteCodeEmitter::emitLEIntAP(const SourceInfo &L) { |
20062 | return emitOp<>(OP_LEIntAP, L); |
20063 | } |
20064 | bool ByteCodeEmitter::emitLEIntAPS(const SourceInfo &L) { |
20065 | return emitOp<>(OP_LEIntAPS, L); |
20066 | } |
20067 | bool ByteCodeEmitter::emitLEBool(const SourceInfo &L) { |
20068 | return emitOp<>(OP_LEBool, L); |
20069 | } |
20070 | bool ByteCodeEmitter::emitLEPtr(const SourceInfo &L) { |
20071 | return emitOp<>(OP_LEPtr, L); |
20072 | } |
20073 | bool ByteCodeEmitter::emitLEFloat(const SourceInfo &L) { |
20074 | return emitOp<>(OP_LEFloat, L); |
20075 | } |
20076 | bool ByteCodeEmitter::emitLEFnPtr(const SourceInfo &L) { |
20077 | return emitOp<>(OP_LEFnPtr, L); |
20078 | } |
20079 | #endif |
20080 | #ifdef GET_EVAL_IMPL |
20081 | bool EvalEmitter::emitLESint8(const SourceInfo &L) { |
20082 | if (!isActive()) return true; |
20083 | CurrentSource = L; |
20084 | return LE<PT_Sint8>(S, OpPC); |
20085 | } |
20086 | bool EvalEmitter::emitLEUint8(const SourceInfo &L) { |
20087 | if (!isActive()) return true; |
20088 | CurrentSource = L; |
20089 | return LE<PT_Uint8>(S, OpPC); |
20090 | } |
20091 | bool EvalEmitter::emitLESint16(const SourceInfo &L) { |
20092 | if (!isActive()) return true; |
20093 | CurrentSource = L; |
20094 | return LE<PT_Sint16>(S, OpPC); |
20095 | } |
20096 | bool EvalEmitter::emitLEUint16(const SourceInfo &L) { |
20097 | if (!isActive()) return true; |
20098 | CurrentSource = L; |
20099 | return LE<PT_Uint16>(S, OpPC); |
20100 | } |
20101 | bool EvalEmitter::emitLESint32(const SourceInfo &L) { |
20102 | if (!isActive()) return true; |
20103 | CurrentSource = L; |
20104 | return LE<PT_Sint32>(S, OpPC); |
20105 | } |
20106 | bool EvalEmitter::emitLEUint32(const SourceInfo &L) { |
20107 | if (!isActive()) return true; |
20108 | CurrentSource = L; |
20109 | return LE<PT_Uint32>(S, OpPC); |
20110 | } |
20111 | bool EvalEmitter::emitLESint64(const SourceInfo &L) { |
20112 | if (!isActive()) return true; |
20113 | CurrentSource = L; |
20114 | return LE<PT_Sint64>(S, OpPC); |
20115 | } |
20116 | bool EvalEmitter::emitLEUint64(const SourceInfo &L) { |
20117 | if (!isActive()) return true; |
20118 | CurrentSource = L; |
20119 | return LE<PT_Uint64>(S, OpPC); |
20120 | } |
20121 | bool EvalEmitter::emitLEIntAP(const SourceInfo &L) { |
20122 | if (!isActive()) return true; |
20123 | CurrentSource = L; |
20124 | return LE<PT_IntAP>(S, OpPC); |
20125 | } |
20126 | bool EvalEmitter::emitLEIntAPS(const SourceInfo &L) { |
20127 | if (!isActive()) return true; |
20128 | CurrentSource = L; |
20129 | return LE<PT_IntAPS>(S, OpPC); |
20130 | } |
20131 | bool EvalEmitter::emitLEBool(const SourceInfo &L) { |
20132 | if (!isActive()) return true; |
20133 | CurrentSource = L; |
20134 | return LE<PT_Bool>(S, OpPC); |
20135 | } |
20136 | bool EvalEmitter::emitLEPtr(const SourceInfo &L) { |
20137 | if (!isActive()) return true; |
20138 | CurrentSource = L; |
20139 | return LE<PT_Ptr>(S, OpPC); |
20140 | } |
20141 | bool EvalEmitter::emitLEFloat(const SourceInfo &L) { |
20142 | if (!isActive()) return true; |
20143 | CurrentSource = L; |
20144 | return LE<PT_Float>(S, OpPC); |
20145 | } |
20146 | bool EvalEmitter::emitLEFnPtr(const SourceInfo &L) { |
20147 | if (!isActive()) return true; |
20148 | CurrentSource = L; |
20149 | return LE<PT_FnPtr>(S, OpPC); |
20150 | } |
20151 | #endif |
20152 | #ifdef GET_OPCODE_NAMES |
20153 | OP_LTSint8, |
20154 | OP_LTUint8, |
20155 | OP_LTSint16, |
20156 | OP_LTUint16, |
20157 | OP_LTSint32, |
20158 | OP_LTUint32, |
20159 | OP_LTSint64, |
20160 | OP_LTUint64, |
20161 | OP_LTIntAP, |
20162 | OP_LTIntAPS, |
20163 | OP_LTBool, |
20164 | OP_LTPtr, |
20165 | OP_LTFloat, |
20166 | OP_LTFnPtr, |
20167 | #endif |
20168 | #ifdef GET_INTERP |
20169 | case OP_LTSint8: { |
20170 | if (!LT<PT_Sint8>(S, OpPC)) |
20171 | return false; |
20172 | continue; |
20173 | } |
20174 | case OP_LTUint8: { |
20175 | if (!LT<PT_Uint8>(S, OpPC)) |
20176 | return false; |
20177 | continue; |
20178 | } |
20179 | case OP_LTSint16: { |
20180 | if (!LT<PT_Sint16>(S, OpPC)) |
20181 | return false; |
20182 | continue; |
20183 | } |
20184 | case OP_LTUint16: { |
20185 | if (!LT<PT_Uint16>(S, OpPC)) |
20186 | return false; |
20187 | continue; |
20188 | } |
20189 | case OP_LTSint32: { |
20190 | if (!LT<PT_Sint32>(S, OpPC)) |
20191 | return false; |
20192 | continue; |
20193 | } |
20194 | case OP_LTUint32: { |
20195 | if (!LT<PT_Uint32>(S, OpPC)) |
20196 | return false; |
20197 | continue; |
20198 | } |
20199 | case OP_LTSint64: { |
20200 | if (!LT<PT_Sint64>(S, OpPC)) |
20201 | return false; |
20202 | continue; |
20203 | } |
20204 | case OP_LTUint64: { |
20205 | if (!LT<PT_Uint64>(S, OpPC)) |
20206 | return false; |
20207 | continue; |
20208 | } |
20209 | case OP_LTIntAP: { |
20210 | if (!LT<PT_IntAP>(S, OpPC)) |
20211 | return false; |
20212 | continue; |
20213 | } |
20214 | case OP_LTIntAPS: { |
20215 | if (!LT<PT_IntAPS>(S, OpPC)) |
20216 | return false; |
20217 | continue; |
20218 | } |
20219 | case OP_LTBool: { |
20220 | if (!LT<PT_Bool>(S, OpPC)) |
20221 | return false; |
20222 | continue; |
20223 | } |
20224 | case OP_LTPtr: { |
20225 | if (!LT<PT_Ptr>(S, OpPC)) |
20226 | return false; |
20227 | continue; |
20228 | } |
20229 | case OP_LTFloat: { |
20230 | if (!LT<PT_Float>(S, OpPC)) |
20231 | return false; |
20232 | continue; |
20233 | } |
20234 | case OP_LTFnPtr: { |
20235 | if (!LT<PT_FnPtr>(S, OpPC)) |
20236 | return false; |
20237 | continue; |
20238 | } |
20239 | #endif |
20240 | #ifdef GET_DISASM |
20241 | case OP_LTSint8: |
20242 | PrintName("LTSint8" ); |
20243 | OS << "\t" << "\n" ; |
20244 | continue; |
20245 | case OP_LTUint8: |
20246 | PrintName("LTUint8" ); |
20247 | OS << "\t" << "\n" ; |
20248 | continue; |
20249 | case OP_LTSint16: |
20250 | PrintName("LTSint16" ); |
20251 | OS << "\t" << "\n" ; |
20252 | continue; |
20253 | case OP_LTUint16: |
20254 | PrintName("LTUint16" ); |
20255 | OS << "\t" << "\n" ; |
20256 | continue; |
20257 | case OP_LTSint32: |
20258 | PrintName("LTSint32" ); |
20259 | OS << "\t" << "\n" ; |
20260 | continue; |
20261 | case OP_LTUint32: |
20262 | PrintName("LTUint32" ); |
20263 | OS << "\t" << "\n" ; |
20264 | continue; |
20265 | case OP_LTSint64: |
20266 | PrintName("LTSint64" ); |
20267 | OS << "\t" << "\n" ; |
20268 | continue; |
20269 | case OP_LTUint64: |
20270 | PrintName("LTUint64" ); |
20271 | OS << "\t" << "\n" ; |
20272 | continue; |
20273 | case OP_LTIntAP: |
20274 | PrintName("LTIntAP" ); |
20275 | OS << "\t" << "\n" ; |
20276 | continue; |
20277 | case OP_LTIntAPS: |
20278 | PrintName("LTIntAPS" ); |
20279 | OS << "\t" << "\n" ; |
20280 | continue; |
20281 | case OP_LTBool: |
20282 | PrintName("LTBool" ); |
20283 | OS << "\t" << "\n" ; |
20284 | continue; |
20285 | case OP_LTPtr: |
20286 | PrintName("LTPtr" ); |
20287 | OS << "\t" << "\n" ; |
20288 | continue; |
20289 | case OP_LTFloat: |
20290 | PrintName("LTFloat" ); |
20291 | OS << "\t" << "\n" ; |
20292 | continue; |
20293 | case OP_LTFnPtr: |
20294 | PrintName("LTFnPtr" ); |
20295 | OS << "\t" << "\n" ; |
20296 | continue; |
20297 | #endif |
20298 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20299 | bool emitLTSint8(const SourceInfo &); |
20300 | bool emitLTUint8(const SourceInfo &); |
20301 | bool emitLTSint16(const SourceInfo &); |
20302 | bool emitLTUint16(const SourceInfo &); |
20303 | bool emitLTSint32(const SourceInfo &); |
20304 | bool emitLTUint32(const SourceInfo &); |
20305 | bool emitLTSint64(const SourceInfo &); |
20306 | bool emitLTUint64(const SourceInfo &); |
20307 | bool emitLTIntAP(const SourceInfo &); |
20308 | bool emitLTIntAPS(const SourceInfo &); |
20309 | bool emitLTBool(const SourceInfo &); |
20310 | bool emitLTPtr(const SourceInfo &); |
20311 | bool emitLTFloat(const SourceInfo &); |
20312 | bool emitLTFnPtr(const SourceInfo &); |
20313 | #endif |
20314 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20315 | [[nodiscard]] bool emitLT(PrimType, const SourceInfo &I); |
20316 | #endif |
20317 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
20318 | bool |
20319 | #if defined(GET_EVAL_IMPL) |
20320 | EvalEmitter |
20321 | #else |
20322 | ByteCodeEmitter |
20323 | #endif |
20324 | ::emitLT(PrimType T0, const SourceInfo &I) { |
20325 | switch (T0) { |
20326 | case PT_Sint8: |
20327 | return emitLTSint8(I); |
20328 | case PT_Uint8: |
20329 | return emitLTUint8(I); |
20330 | case PT_Sint16: |
20331 | return emitLTSint16(I); |
20332 | case PT_Uint16: |
20333 | return emitLTUint16(I); |
20334 | case PT_Sint32: |
20335 | return emitLTSint32(I); |
20336 | case PT_Uint32: |
20337 | return emitLTUint32(I); |
20338 | case PT_Sint64: |
20339 | return emitLTSint64(I); |
20340 | case PT_Uint64: |
20341 | return emitLTUint64(I); |
20342 | case PT_IntAP: |
20343 | return emitLTIntAP(I); |
20344 | case PT_IntAPS: |
20345 | return emitLTIntAPS(I); |
20346 | case PT_Bool: |
20347 | return emitLTBool(I); |
20348 | case PT_Ptr: |
20349 | return emitLTPtr(I); |
20350 | case PT_Float: |
20351 | return emitLTFloat(I); |
20352 | case PT_FnPtr: |
20353 | return emitLTFnPtr(I); |
20354 | default: llvm_unreachable("invalid type: emitLT" ); |
20355 | } |
20356 | llvm_unreachable("invalid enum value" ); |
20357 | } |
20358 | #endif |
20359 | #ifdef GET_LINK_IMPL |
20360 | bool ByteCodeEmitter::emitLTSint8(const SourceInfo &L) { |
20361 | return emitOp<>(OP_LTSint8, L); |
20362 | } |
20363 | bool ByteCodeEmitter::emitLTUint8(const SourceInfo &L) { |
20364 | return emitOp<>(OP_LTUint8, L); |
20365 | } |
20366 | bool ByteCodeEmitter::emitLTSint16(const SourceInfo &L) { |
20367 | return emitOp<>(OP_LTSint16, L); |
20368 | } |
20369 | bool ByteCodeEmitter::emitLTUint16(const SourceInfo &L) { |
20370 | return emitOp<>(OP_LTUint16, L); |
20371 | } |
20372 | bool ByteCodeEmitter::emitLTSint32(const SourceInfo &L) { |
20373 | return emitOp<>(OP_LTSint32, L); |
20374 | } |
20375 | bool ByteCodeEmitter::emitLTUint32(const SourceInfo &L) { |
20376 | return emitOp<>(OP_LTUint32, L); |
20377 | } |
20378 | bool ByteCodeEmitter::emitLTSint64(const SourceInfo &L) { |
20379 | return emitOp<>(OP_LTSint64, L); |
20380 | } |
20381 | bool ByteCodeEmitter::emitLTUint64(const SourceInfo &L) { |
20382 | return emitOp<>(OP_LTUint64, L); |
20383 | } |
20384 | bool ByteCodeEmitter::emitLTIntAP(const SourceInfo &L) { |
20385 | return emitOp<>(OP_LTIntAP, L); |
20386 | } |
20387 | bool ByteCodeEmitter::emitLTIntAPS(const SourceInfo &L) { |
20388 | return emitOp<>(OP_LTIntAPS, L); |
20389 | } |
20390 | bool ByteCodeEmitter::emitLTBool(const SourceInfo &L) { |
20391 | return emitOp<>(OP_LTBool, L); |
20392 | } |
20393 | bool ByteCodeEmitter::emitLTPtr(const SourceInfo &L) { |
20394 | return emitOp<>(OP_LTPtr, L); |
20395 | } |
20396 | bool ByteCodeEmitter::emitLTFloat(const SourceInfo &L) { |
20397 | return emitOp<>(OP_LTFloat, L); |
20398 | } |
20399 | bool ByteCodeEmitter::emitLTFnPtr(const SourceInfo &L) { |
20400 | return emitOp<>(OP_LTFnPtr, L); |
20401 | } |
20402 | #endif |
20403 | #ifdef GET_EVAL_IMPL |
20404 | bool EvalEmitter::emitLTSint8(const SourceInfo &L) { |
20405 | if (!isActive()) return true; |
20406 | CurrentSource = L; |
20407 | return LT<PT_Sint8>(S, OpPC); |
20408 | } |
20409 | bool EvalEmitter::emitLTUint8(const SourceInfo &L) { |
20410 | if (!isActive()) return true; |
20411 | CurrentSource = L; |
20412 | return LT<PT_Uint8>(S, OpPC); |
20413 | } |
20414 | bool EvalEmitter::emitLTSint16(const SourceInfo &L) { |
20415 | if (!isActive()) return true; |
20416 | CurrentSource = L; |
20417 | return LT<PT_Sint16>(S, OpPC); |
20418 | } |
20419 | bool EvalEmitter::emitLTUint16(const SourceInfo &L) { |
20420 | if (!isActive()) return true; |
20421 | CurrentSource = L; |
20422 | return LT<PT_Uint16>(S, OpPC); |
20423 | } |
20424 | bool EvalEmitter::emitLTSint32(const SourceInfo &L) { |
20425 | if (!isActive()) return true; |
20426 | CurrentSource = L; |
20427 | return LT<PT_Sint32>(S, OpPC); |
20428 | } |
20429 | bool EvalEmitter::emitLTUint32(const SourceInfo &L) { |
20430 | if (!isActive()) return true; |
20431 | CurrentSource = L; |
20432 | return LT<PT_Uint32>(S, OpPC); |
20433 | } |
20434 | bool EvalEmitter::emitLTSint64(const SourceInfo &L) { |
20435 | if (!isActive()) return true; |
20436 | CurrentSource = L; |
20437 | return LT<PT_Sint64>(S, OpPC); |
20438 | } |
20439 | bool EvalEmitter::emitLTUint64(const SourceInfo &L) { |
20440 | if (!isActive()) return true; |
20441 | CurrentSource = L; |
20442 | return LT<PT_Uint64>(S, OpPC); |
20443 | } |
20444 | bool EvalEmitter::emitLTIntAP(const SourceInfo &L) { |
20445 | if (!isActive()) return true; |
20446 | CurrentSource = L; |
20447 | return LT<PT_IntAP>(S, OpPC); |
20448 | } |
20449 | bool EvalEmitter::emitLTIntAPS(const SourceInfo &L) { |
20450 | if (!isActive()) return true; |
20451 | CurrentSource = L; |
20452 | return LT<PT_IntAPS>(S, OpPC); |
20453 | } |
20454 | bool EvalEmitter::emitLTBool(const SourceInfo &L) { |
20455 | if (!isActive()) return true; |
20456 | CurrentSource = L; |
20457 | return LT<PT_Bool>(S, OpPC); |
20458 | } |
20459 | bool EvalEmitter::emitLTPtr(const SourceInfo &L) { |
20460 | if (!isActive()) return true; |
20461 | CurrentSource = L; |
20462 | return LT<PT_Ptr>(S, OpPC); |
20463 | } |
20464 | bool EvalEmitter::emitLTFloat(const SourceInfo &L) { |
20465 | if (!isActive()) return true; |
20466 | CurrentSource = L; |
20467 | return LT<PT_Float>(S, OpPC); |
20468 | } |
20469 | bool EvalEmitter::emitLTFnPtr(const SourceInfo &L) { |
20470 | if (!isActive()) return true; |
20471 | CurrentSource = L; |
20472 | return LT<PT_FnPtr>(S, OpPC); |
20473 | } |
20474 | #endif |
20475 | #ifdef GET_OPCODE_NAMES |
20476 | OP_LoadSint8, |
20477 | OP_LoadUint8, |
20478 | OP_LoadSint16, |
20479 | OP_LoadUint16, |
20480 | OP_LoadSint32, |
20481 | OP_LoadUint32, |
20482 | OP_LoadSint64, |
20483 | OP_LoadUint64, |
20484 | OP_LoadIntAP, |
20485 | OP_LoadIntAPS, |
20486 | OP_LoadBool, |
20487 | OP_LoadPtr, |
20488 | OP_LoadFnPtr, |
20489 | OP_LoadMemberPtr, |
20490 | OP_LoadFloat, |
20491 | #endif |
20492 | #ifdef GET_INTERP |
20493 | case OP_LoadSint8: { |
20494 | if (!Load<PT_Sint8>(S, OpPC)) |
20495 | return false; |
20496 | continue; |
20497 | } |
20498 | case OP_LoadUint8: { |
20499 | if (!Load<PT_Uint8>(S, OpPC)) |
20500 | return false; |
20501 | continue; |
20502 | } |
20503 | case OP_LoadSint16: { |
20504 | if (!Load<PT_Sint16>(S, OpPC)) |
20505 | return false; |
20506 | continue; |
20507 | } |
20508 | case OP_LoadUint16: { |
20509 | if (!Load<PT_Uint16>(S, OpPC)) |
20510 | return false; |
20511 | continue; |
20512 | } |
20513 | case OP_LoadSint32: { |
20514 | if (!Load<PT_Sint32>(S, OpPC)) |
20515 | return false; |
20516 | continue; |
20517 | } |
20518 | case OP_LoadUint32: { |
20519 | if (!Load<PT_Uint32>(S, OpPC)) |
20520 | return false; |
20521 | continue; |
20522 | } |
20523 | case OP_LoadSint64: { |
20524 | if (!Load<PT_Sint64>(S, OpPC)) |
20525 | return false; |
20526 | continue; |
20527 | } |
20528 | case OP_LoadUint64: { |
20529 | if (!Load<PT_Uint64>(S, OpPC)) |
20530 | return false; |
20531 | continue; |
20532 | } |
20533 | case OP_LoadIntAP: { |
20534 | if (!Load<PT_IntAP>(S, OpPC)) |
20535 | return false; |
20536 | continue; |
20537 | } |
20538 | case OP_LoadIntAPS: { |
20539 | if (!Load<PT_IntAPS>(S, OpPC)) |
20540 | return false; |
20541 | continue; |
20542 | } |
20543 | case OP_LoadBool: { |
20544 | if (!Load<PT_Bool>(S, OpPC)) |
20545 | return false; |
20546 | continue; |
20547 | } |
20548 | case OP_LoadPtr: { |
20549 | if (!Load<PT_Ptr>(S, OpPC)) |
20550 | return false; |
20551 | continue; |
20552 | } |
20553 | case OP_LoadFnPtr: { |
20554 | if (!Load<PT_FnPtr>(S, OpPC)) |
20555 | return false; |
20556 | continue; |
20557 | } |
20558 | case OP_LoadMemberPtr: { |
20559 | if (!Load<PT_MemberPtr>(S, OpPC)) |
20560 | return false; |
20561 | continue; |
20562 | } |
20563 | case OP_LoadFloat: { |
20564 | if (!Load<PT_Float>(S, OpPC)) |
20565 | return false; |
20566 | continue; |
20567 | } |
20568 | #endif |
20569 | #ifdef GET_DISASM |
20570 | case OP_LoadSint8: |
20571 | PrintName("LoadSint8" ); |
20572 | OS << "\t" << "\n" ; |
20573 | continue; |
20574 | case OP_LoadUint8: |
20575 | PrintName("LoadUint8" ); |
20576 | OS << "\t" << "\n" ; |
20577 | continue; |
20578 | case OP_LoadSint16: |
20579 | PrintName("LoadSint16" ); |
20580 | OS << "\t" << "\n" ; |
20581 | continue; |
20582 | case OP_LoadUint16: |
20583 | PrintName("LoadUint16" ); |
20584 | OS << "\t" << "\n" ; |
20585 | continue; |
20586 | case OP_LoadSint32: |
20587 | PrintName("LoadSint32" ); |
20588 | OS << "\t" << "\n" ; |
20589 | continue; |
20590 | case OP_LoadUint32: |
20591 | PrintName("LoadUint32" ); |
20592 | OS << "\t" << "\n" ; |
20593 | continue; |
20594 | case OP_LoadSint64: |
20595 | PrintName("LoadSint64" ); |
20596 | OS << "\t" << "\n" ; |
20597 | continue; |
20598 | case OP_LoadUint64: |
20599 | PrintName("LoadUint64" ); |
20600 | OS << "\t" << "\n" ; |
20601 | continue; |
20602 | case OP_LoadIntAP: |
20603 | PrintName("LoadIntAP" ); |
20604 | OS << "\t" << "\n" ; |
20605 | continue; |
20606 | case OP_LoadIntAPS: |
20607 | PrintName("LoadIntAPS" ); |
20608 | OS << "\t" << "\n" ; |
20609 | continue; |
20610 | case OP_LoadBool: |
20611 | PrintName("LoadBool" ); |
20612 | OS << "\t" << "\n" ; |
20613 | continue; |
20614 | case OP_LoadPtr: |
20615 | PrintName("LoadPtr" ); |
20616 | OS << "\t" << "\n" ; |
20617 | continue; |
20618 | case OP_LoadFnPtr: |
20619 | PrintName("LoadFnPtr" ); |
20620 | OS << "\t" << "\n" ; |
20621 | continue; |
20622 | case OP_LoadMemberPtr: |
20623 | PrintName("LoadMemberPtr" ); |
20624 | OS << "\t" << "\n" ; |
20625 | continue; |
20626 | case OP_LoadFloat: |
20627 | PrintName("LoadFloat" ); |
20628 | OS << "\t" << "\n" ; |
20629 | continue; |
20630 | #endif |
20631 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20632 | bool emitLoadSint8(const SourceInfo &); |
20633 | bool emitLoadUint8(const SourceInfo &); |
20634 | bool emitLoadSint16(const SourceInfo &); |
20635 | bool emitLoadUint16(const SourceInfo &); |
20636 | bool emitLoadSint32(const SourceInfo &); |
20637 | bool emitLoadUint32(const SourceInfo &); |
20638 | bool emitLoadSint64(const SourceInfo &); |
20639 | bool emitLoadUint64(const SourceInfo &); |
20640 | bool emitLoadIntAP(const SourceInfo &); |
20641 | bool emitLoadIntAPS(const SourceInfo &); |
20642 | bool emitLoadBool(const SourceInfo &); |
20643 | bool emitLoadPtr(const SourceInfo &); |
20644 | bool emitLoadFnPtr(const SourceInfo &); |
20645 | bool emitLoadMemberPtr(const SourceInfo &); |
20646 | bool emitLoadFloat(const SourceInfo &); |
20647 | #endif |
20648 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20649 | [[nodiscard]] bool emitLoad(PrimType, const SourceInfo &I); |
20650 | #endif |
20651 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
20652 | bool |
20653 | #if defined(GET_EVAL_IMPL) |
20654 | EvalEmitter |
20655 | #else |
20656 | ByteCodeEmitter |
20657 | #endif |
20658 | ::emitLoad(PrimType T0, const SourceInfo &I) { |
20659 | switch (T0) { |
20660 | case PT_Sint8: |
20661 | return emitLoadSint8(I); |
20662 | case PT_Uint8: |
20663 | return emitLoadUint8(I); |
20664 | case PT_Sint16: |
20665 | return emitLoadSint16(I); |
20666 | case PT_Uint16: |
20667 | return emitLoadUint16(I); |
20668 | case PT_Sint32: |
20669 | return emitLoadSint32(I); |
20670 | case PT_Uint32: |
20671 | return emitLoadUint32(I); |
20672 | case PT_Sint64: |
20673 | return emitLoadSint64(I); |
20674 | case PT_Uint64: |
20675 | return emitLoadUint64(I); |
20676 | case PT_IntAP: |
20677 | return emitLoadIntAP(I); |
20678 | case PT_IntAPS: |
20679 | return emitLoadIntAPS(I); |
20680 | case PT_Bool: |
20681 | return emitLoadBool(I); |
20682 | case PT_Ptr: |
20683 | return emitLoadPtr(I); |
20684 | case PT_FnPtr: |
20685 | return emitLoadFnPtr(I); |
20686 | case PT_MemberPtr: |
20687 | return emitLoadMemberPtr(I); |
20688 | case PT_Float: |
20689 | return emitLoadFloat(I); |
20690 | } |
20691 | llvm_unreachable("invalid enum value" ); |
20692 | } |
20693 | #endif |
20694 | #ifdef GET_LINK_IMPL |
20695 | bool ByteCodeEmitter::emitLoadSint8(const SourceInfo &L) { |
20696 | return emitOp<>(OP_LoadSint8, L); |
20697 | } |
20698 | bool ByteCodeEmitter::emitLoadUint8(const SourceInfo &L) { |
20699 | return emitOp<>(OP_LoadUint8, L); |
20700 | } |
20701 | bool ByteCodeEmitter::emitLoadSint16(const SourceInfo &L) { |
20702 | return emitOp<>(OP_LoadSint16, L); |
20703 | } |
20704 | bool ByteCodeEmitter::emitLoadUint16(const SourceInfo &L) { |
20705 | return emitOp<>(OP_LoadUint16, L); |
20706 | } |
20707 | bool ByteCodeEmitter::emitLoadSint32(const SourceInfo &L) { |
20708 | return emitOp<>(OP_LoadSint32, L); |
20709 | } |
20710 | bool ByteCodeEmitter::emitLoadUint32(const SourceInfo &L) { |
20711 | return emitOp<>(OP_LoadUint32, L); |
20712 | } |
20713 | bool ByteCodeEmitter::emitLoadSint64(const SourceInfo &L) { |
20714 | return emitOp<>(OP_LoadSint64, L); |
20715 | } |
20716 | bool ByteCodeEmitter::emitLoadUint64(const SourceInfo &L) { |
20717 | return emitOp<>(OP_LoadUint64, L); |
20718 | } |
20719 | bool ByteCodeEmitter::emitLoadIntAP(const SourceInfo &L) { |
20720 | return emitOp<>(OP_LoadIntAP, L); |
20721 | } |
20722 | bool ByteCodeEmitter::emitLoadIntAPS(const SourceInfo &L) { |
20723 | return emitOp<>(OP_LoadIntAPS, L); |
20724 | } |
20725 | bool ByteCodeEmitter::emitLoadBool(const SourceInfo &L) { |
20726 | return emitOp<>(OP_LoadBool, L); |
20727 | } |
20728 | bool ByteCodeEmitter::emitLoadPtr(const SourceInfo &L) { |
20729 | return emitOp<>(OP_LoadPtr, L); |
20730 | } |
20731 | bool ByteCodeEmitter::emitLoadFnPtr(const SourceInfo &L) { |
20732 | return emitOp<>(OP_LoadFnPtr, L); |
20733 | } |
20734 | bool ByteCodeEmitter::emitLoadMemberPtr(const SourceInfo &L) { |
20735 | return emitOp<>(OP_LoadMemberPtr, L); |
20736 | } |
20737 | bool ByteCodeEmitter::emitLoadFloat(const SourceInfo &L) { |
20738 | return emitOp<>(OP_LoadFloat, L); |
20739 | } |
20740 | #endif |
20741 | #ifdef GET_EVAL_IMPL |
20742 | bool EvalEmitter::emitLoadSint8(const SourceInfo &L) { |
20743 | if (!isActive()) return true; |
20744 | CurrentSource = L; |
20745 | return Load<PT_Sint8>(S, OpPC); |
20746 | } |
20747 | bool EvalEmitter::emitLoadUint8(const SourceInfo &L) { |
20748 | if (!isActive()) return true; |
20749 | CurrentSource = L; |
20750 | return Load<PT_Uint8>(S, OpPC); |
20751 | } |
20752 | bool EvalEmitter::emitLoadSint16(const SourceInfo &L) { |
20753 | if (!isActive()) return true; |
20754 | CurrentSource = L; |
20755 | return Load<PT_Sint16>(S, OpPC); |
20756 | } |
20757 | bool EvalEmitter::emitLoadUint16(const SourceInfo &L) { |
20758 | if (!isActive()) return true; |
20759 | CurrentSource = L; |
20760 | return Load<PT_Uint16>(S, OpPC); |
20761 | } |
20762 | bool EvalEmitter::emitLoadSint32(const SourceInfo &L) { |
20763 | if (!isActive()) return true; |
20764 | CurrentSource = L; |
20765 | return Load<PT_Sint32>(S, OpPC); |
20766 | } |
20767 | bool EvalEmitter::emitLoadUint32(const SourceInfo &L) { |
20768 | if (!isActive()) return true; |
20769 | CurrentSource = L; |
20770 | return Load<PT_Uint32>(S, OpPC); |
20771 | } |
20772 | bool EvalEmitter::emitLoadSint64(const SourceInfo &L) { |
20773 | if (!isActive()) return true; |
20774 | CurrentSource = L; |
20775 | return Load<PT_Sint64>(S, OpPC); |
20776 | } |
20777 | bool EvalEmitter::emitLoadUint64(const SourceInfo &L) { |
20778 | if (!isActive()) return true; |
20779 | CurrentSource = L; |
20780 | return Load<PT_Uint64>(S, OpPC); |
20781 | } |
20782 | bool EvalEmitter::emitLoadIntAP(const SourceInfo &L) { |
20783 | if (!isActive()) return true; |
20784 | CurrentSource = L; |
20785 | return Load<PT_IntAP>(S, OpPC); |
20786 | } |
20787 | bool EvalEmitter::emitLoadIntAPS(const SourceInfo &L) { |
20788 | if (!isActive()) return true; |
20789 | CurrentSource = L; |
20790 | return Load<PT_IntAPS>(S, OpPC); |
20791 | } |
20792 | bool EvalEmitter::emitLoadBool(const SourceInfo &L) { |
20793 | if (!isActive()) return true; |
20794 | CurrentSource = L; |
20795 | return Load<PT_Bool>(S, OpPC); |
20796 | } |
20797 | bool EvalEmitter::emitLoadPtr(const SourceInfo &L) { |
20798 | if (!isActive()) return true; |
20799 | CurrentSource = L; |
20800 | return Load<PT_Ptr>(S, OpPC); |
20801 | } |
20802 | bool EvalEmitter::emitLoadFnPtr(const SourceInfo &L) { |
20803 | if (!isActive()) return true; |
20804 | CurrentSource = L; |
20805 | return Load<PT_FnPtr>(S, OpPC); |
20806 | } |
20807 | bool EvalEmitter::emitLoadMemberPtr(const SourceInfo &L) { |
20808 | if (!isActive()) return true; |
20809 | CurrentSource = L; |
20810 | return Load<PT_MemberPtr>(S, OpPC); |
20811 | } |
20812 | bool EvalEmitter::emitLoadFloat(const SourceInfo &L) { |
20813 | if (!isActive()) return true; |
20814 | CurrentSource = L; |
20815 | return Load<PT_Float>(S, OpPC); |
20816 | } |
20817 | #endif |
20818 | #ifdef GET_OPCODE_NAMES |
20819 | OP_LoadPopSint8, |
20820 | OP_LoadPopUint8, |
20821 | OP_LoadPopSint16, |
20822 | OP_LoadPopUint16, |
20823 | OP_LoadPopSint32, |
20824 | OP_LoadPopUint32, |
20825 | OP_LoadPopSint64, |
20826 | OP_LoadPopUint64, |
20827 | OP_LoadPopIntAP, |
20828 | OP_LoadPopIntAPS, |
20829 | OP_LoadPopBool, |
20830 | OP_LoadPopPtr, |
20831 | OP_LoadPopFnPtr, |
20832 | OP_LoadPopMemberPtr, |
20833 | OP_LoadPopFloat, |
20834 | #endif |
20835 | #ifdef GET_INTERP |
20836 | case OP_LoadPopSint8: { |
20837 | if (!LoadPop<PT_Sint8>(S, OpPC)) |
20838 | return false; |
20839 | continue; |
20840 | } |
20841 | case OP_LoadPopUint8: { |
20842 | if (!LoadPop<PT_Uint8>(S, OpPC)) |
20843 | return false; |
20844 | continue; |
20845 | } |
20846 | case OP_LoadPopSint16: { |
20847 | if (!LoadPop<PT_Sint16>(S, OpPC)) |
20848 | return false; |
20849 | continue; |
20850 | } |
20851 | case OP_LoadPopUint16: { |
20852 | if (!LoadPop<PT_Uint16>(S, OpPC)) |
20853 | return false; |
20854 | continue; |
20855 | } |
20856 | case OP_LoadPopSint32: { |
20857 | if (!LoadPop<PT_Sint32>(S, OpPC)) |
20858 | return false; |
20859 | continue; |
20860 | } |
20861 | case OP_LoadPopUint32: { |
20862 | if (!LoadPop<PT_Uint32>(S, OpPC)) |
20863 | return false; |
20864 | continue; |
20865 | } |
20866 | case OP_LoadPopSint64: { |
20867 | if (!LoadPop<PT_Sint64>(S, OpPC)) |
20868 | return false; |
20869 | continue; |
20870 | } |
20871 | case OP_LoadPopUint64: { |
20872 | if (!LoadPop<PT_Uint64>(S, OpPC)) |
20873 | return false; |
20874 | continue; |
20875 | } |
20876 | case OP_LoadPopIntAP: { |
20877 | if (!LoadPop<PT_IntAP>(S, OpPC)) |
20878 | return false; |
20879 | continue; |
20880 | } |
20881 | case OP_LoadPopIntAPS: { |
20882 | if (!LoadPop<PT_IntAPS>(S, OpPC)) |
20883 | return false; |
20884 | continue; |
20885 | } |
20886 | case OP_LoadPopBool: { |
20887 | if (!LoadPop<PT_Bool>(S, OpPC)) |
20888 | return false; |
20889 | continue; |
20890 | } |
20891 | case OP_LoadPopPtr: { |
20892 | if (!LoadPop<PT_Ptr>(S, OpPC)) |
20893 | return false; |
20894 | continue; |
20895 | } |
20896 | case OP_LoadPopFnPtr: { |
20897 | if (!LoadPop<PT_FnPtr>(S, OpPC)) |
20898 | return false; |
20899 | continue; |
20900 | } |
20901 | case OP_LoadPopMemberPtr: { |
20902 | if (!LoadPop<PT_MemberPtr>(S, OpPC)) |
20903 | return false; |
20904 | continue; |
20905 | } |
20906 | case OP_LoadPopFloat: { |
20907 | if (!LoadPop<PT_Float>(S, OpPC)) |
20908 | return false; |
20909 | continue; |
20910 | } |
20911 | #endif |
20912 | #ifdef GET_DISASM |
20913 | case OP_LoadPopSint8: |
20914 | PrintName("LoadPopSint8" ); |
20915 | OS << "\t" << "\n" ; |
20916 | continue; |
20917 | case OP_LoadPopUint8: |
20918 | PrintName("LoadPopUint8" ); |
20919 | OS << "\t" << "\n" ; |
20920 | continue; |
20921 | case OP_LoadPopSint16: |
20922 | PrintName("LoadPopSint16" ); |
20923 | OS << "\t" << "\n" ; |
20924 | continue; |
20925 | case OP_LoadPopUint16: |
20926 | PrintName("LoadPopUint16" ); |
20927 | OS << "\t" << "\n" ; |
20928 | continue; |
20929 | case OP_LoadPopSint32: |
20930 | PrintName("LoadPopSint32" ); |
20931 | OS << "\t" << "\n" ; |
20932 | continue; |
20933 | case OP_LoadPopUint32: |
20934 | PrintName("LoadPopUint32" ); |
20935 | OS << "\t" << "\n" ; |
20936 | continue; |
20937 | case OP_LoadPopSint64: |
20938 | PrintName("LoadPopSint64" ); |
20939 | OS << "\t" << "\n" ; |
20940 | continue; |
20941 | case OP_LoadPopUint64: |
20942 | PrintName("LoadPopUint64" ); |
20943 | OS << "\t" << "\n" ; |
20944 | continue; |
20945 | case OP_LoadPopIntAP: |
20946 | PrintName("LoadPopIntAP" ); |
20947 | OS << "\t" << "\n" ; |
20948 | continue; |
20949 | case OP_LoadPopIntAPS: |
20950 | PrintName("LoadPopIntAPS" ); |
20951 | OS << "\t" << "\n" ; |
20952 | continue; |
20953 | case OP_LoadPopBool: |
20954 | PrintName("LoadPopBool" ); |
20955 | OS << "\t" << "\n" ; |
20956 | continue; |
20957 | case OP_LoadPopPtr: |
20958 | PrintName("LoadPopPtr" ); |
20959 | OS << "\t" << "\n" ; |
20960 | continue; |
20961 | case OP_LoadPopFnPtr: |
20962 | PrintName("LoadPopFnPtr" ); |
20963 | OS << "\t" << "\n" ; |
20964 | continue; |
20965 | case OP_LoadPopMemberPtr: |
20966 | PrintName("LoadPopMemberPtr" ); |
20967 | OS << "\t" << "\n" ; |
20968 | continue; |
20969 | case OP_LoadPopFloat: |
20970 | PrintName("LoadPopFloat" ); |
20971 | OS << "\t" << "\n" ; |
20972 | continue; |
20973 | #endif |
20974 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20975 | bool emitLoadPopSint8(const SourceInfo &); |
20976 | bool emitLoadPopUint8(const SourceInfo &); |
20977 | bool emitLoadPopSint16(const SourceInfo &); |
20978 | bool emitLoadPopUint16(const SourceInfo &); |
20979 | bool emitLoadPopSint32(const SourceInfo &); |
20980 | bool emitLoadPopUint32(const SourceInfo &); |
20981 | bool emitLoadPopSint64(const SourceInfo &); |
20982 | bool emitLoadPopUint64(const SourceInfo &); |
20983 | bool emitLoadPopIntAP(const SourceInfo &); |
20984 | bool emitLoadPopIntAPS(const SourceInfo &); |
20985 | bool emitLoadPopBool(const SourceInfo &); |
20986 | bool emitLoadPopPtr(const SourceInfo &); |
20987 | bool emitLoadPopFnPtr(const SourceInfo &); |
20988 | bool emitLoadPopMemberPtr(const SourceInfo &); |
20989 | bool emitLoadPopFloat(const SourceInfo &); |
20990 | #endif |
20991 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
20992 | [[nodiscard]] bool emitLoadPop(PrimType, const SourceInfo &I); |
20993 | #endif |
20994 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
20995 | bool |
20996 | #if defined(GET_EVAL_IMPL) |
20997 | EvalEmitter |
20998 | #else |
20999 | ByteCodeEmitter |
21000 | #endif |
21001 | ::emitLoadPop(PrimType T0, const SourceInfo &I) { |
21002 | switch (T0) { |
21003 | case PT_Sint8: |
21004 | return emitLoadPopSint8(I); |
21005 | case PT_Uint8: |
21006 | return emitLoadPopUint8(I); |
21007 | case PT_Sint16: |
21008 | return emitLoadPopSint16(I); |
21009 | case PT_Uint16: |
21010 | return emitLoadPopUint16(I); |
21011 | case PT_Sint32: |
21012 | return emitLoadPopSint32(I); |
21013 | case PT_Uint32: |
21014 | return emitLoadPopUint32(I); |
21015 | case PT_Sint64: |
21016 | return emitLoadPopSint64(I); |
21017 | case PT_Uint64: |
21018 | return emitLoadPopUint64(I); |
21019 | case PT_IntAP: |
21020 | return emitLoadPopIntAP(I); |
21021 | case PT_IntAPS: |
21022 | return emitLoadPopIntAPS(I); |
21023 | case PT_Bool: |
21024 | return emitLoadPopBool(I); |
21025 | case PT_Ptr: |
21026 | return emitLoadPopPtr(I); |
21027 | case PT_FnPtr: |
21028 | return emitLoadPopFnPtr(I); |
21029 | case PT_MemberPtr: |
21030 | return emitLoadPopMemberPtr(I); |
21031 | case PT_Float: |
21032 | return emitLoadPopFloat(I); |
21033 | } |
21034 | llvm_unreachable("invalid enum value" ); |
21035 | } |
21036 | #endif |
21037 | #ifdef GET_LINK_IMPL |
21038 | bool ByteCodeEmitter::emitLoadPopSint8(const SourceInfo &L) { |
21039 | return emitOp<>(OP_LoadPopSint8, L); |
21040 | } |
21041 | bool ByteCodeEmitter::emitLoadPopUint8(const SourceInfo &L) { |
21042 | return emitOp<>(OP_LoadPopUint8, L); |
21043 | } |
21044 | bool ByteCodeEmitter::emitLoadPopSint16(const SourceInfo &L) { |
21045 | return emitOp<>(OP_LoadPopSint16, L); |
21046 | } |
21047 | bool ByteCodeEmitter::emitLoadPopUint16(const SourceInfo &L) { |
21048 | return emitOp<>(OP_LoadPopUint16, L); |
21049 | } |
21050 | bool ByteCodeEmitter::emitLoadPopSint32(const SourceInfo &L) { |
21051 | return emitOp<>(OP_LoadPopSint32, L); |
21052 | } |
21053 | bool ByteCodeEmitter::emitLoadPopUint32(const SourceInfo &L) { |
21054 | return emitOp<>(OP_LoadPopUint32, L); |
21055 | } |
21056 | bool ByteCodeEmitter::emitLoadPopSint64(const SourceInfo &L) { |
21057 | return emitOp<>(OP_LoadPopSint64, L); |
21058 | } |
21059 | bool ByteCodeEmitter::emitLoadPopUint64(const SourceInfo &L) { |
21060 | return emitOp<>(OP_LoadPopUint64, L); |
21061 | } |
21062 | bool ByteCodeEmitter::emitLoadPopIntAP(const SourceInfo &L) { |
21063 | return emitOp<>(OP_LoadPopIntAP, L); |
21064 | } |
21065 | bool ByteCodeEmitter::emitLoadPopIntAPS(const SourceInfo &L) { |
21066 | return emitOp<>(OP_LoadPopIntAPS, L); |
21067 | } |
21068 | bool ByteCodeEmitter::emitLoadPopBool(const SourceInfo &L) { |
21069 | return emitOp<>(OP_LoadPopBool, L); |
21070 | } |
21071 | bool ByteCodeEmitter::emitLoadPopPtr(const SourceInfo &L) { |
21072 | return emitOp<>(OP_LoadPopPtr, L); |
21073 | } |
21074 | bool ByteCodeEmitter::emitLoadPopFnPtr(const SourceInfo &L) { |
21075 | return emitOp<>(OP_LoadPopFnPtr, L); |
21076 | } |
21077 | bool ByteCodeEmitter::emitLoadPopMemberPtr(const SourceInfo &L) { |
21078 | return emitOp<>(OP_LoadPopMemberPtr, L); |
21079 | } |
21080 | bool ByteCodeEmitter::emitLoadPopFloat(const SourceInfo &L) { |
21081 | return emitOp<>(OP_LoadPopFloat, L); |
21082 | } |
21083 | #endif |
21084 | #ifdef GET_EVAL_IMPL |
21085 | bool EvalEmitter::emitLoadPopSint8(const SourceInfo &L) { |
21086 | if (!isActive()) return true; |
21087 | CurrentSource = L; |
21088 | return LoadPop<PT_Sint8>(S, OpPC); |
21089 | } |
21090 | bool EvalEmitter::emitLoadPopUint8(const SourceInfo &L) { |
21091 | if (!isActive()) return true; |
21092 | CurrentSource = L; |
21093 | return LoadPop<PT_Uint8>(S, OpPC); |
21094 | } |
21095 | bool EvalEmitter::emitLoadPopSint16(const SourceInfo &L) { |
21096 | if (!isActive()) return true; |
21097 | CurrentSource = L; |
21098 | return LoadPop<PT_Sint16>(S, OpPC); |
21099 | } |
21100 | bool EvalEmitter::emitLoadPopUint16(const SourceInfo &L) { |
21101 | if (!isActive()) return true; |
21102 | CurrentSource = L; |
21103 | return LoadPop<PT_Uint16>(S, OpPC); |
21104 | } |
21105 | bool EvalEmitter::emitLoadPopSint32(const SourceInfo &L) { |
21106 | if (!isActive()) return true; |
21107 | CurrentSource = L; |
21108 | return LoadPop<PT_Sint32>(S, OpPC); |
21109 | } |
21110 | bool EvalEmitter::emitLoadPopUint32(const SourceInfo &L) { |
21111 | if (!isActive()) return true; |
21112 | CurrentSource = L; |
21113 | return LoadPop<PT_Uint32>(S, OpPC); |
21114 | } |
21115 | bool EvalEmitter::emitLoadPopSint64(const SourceInfo &L) { |
21116 | if (!isActive()) return true; |
21117 | CurrentSource = L; |
21118 | return LoadPop<PT_Sint64>(S, OpPC); |
21119 | } |
21120 | bool EvalEmitter::emitLoadPopUint64(const SourceInfo &L) { |
21121 | if (!isActive()) return true; |
21122 | CurrentSource = L; |
21123 | return LoadPop<PT_Uint64>(S, OpPC); |
21124 | } |
21125 | bool EvalEmitter::emitLoadPopIntAP(const SourceInfo &L) { |
21126 | if (!isActive()) return true; |
21127 | CurrentSource = L; |
21128 | return LoadPop<PT_IntAP>(S, OpPC); |
21129 | } |
21130 | bool EvalEmitter::emitLoadPopIntAPS(const SourceInfo &L) { |
21131 | if (!isActive()) return true; |
21132 | CurrentSource = L; |
21133 | return LoadPop<PT_IntAPS>(S, OpPC); |
21134 | } |
21135 | bool EvalEmitter::emitLoadPopBool(const SourceInfo &L) { |
21136 | if (!isActive()) return true; |
21137 | CurrentSource = L; |
21138 | return LoadPop<PT_Bool>(S, OpPC); |
21139 | } |
21140 | bool EvalEmitter::emitLoadPopPtr(const SourceInfo &L) { |
21141 | if (!isActive()) return true; |
21142 | CurrentSource = L; |
21143 | return LoadPop<PT_Ptr>(S, OpPC); |
21144 | } |
21145 | bool EvalEmitter::emitLoadPopFnPtr(const SourceInfo &L) { |
21146 | if (!isActive()) return true; |
21147 | CurrentSource = L; |
21148 | return LoadPop<PT_FnPtr>(S, OpPC); |
21149 | } |
21150 | bool EvalEmitter::emitLoadPopMemberPtr(const SourceInfo &L) { |
21151 | if (!isActive()) return true; |
21152 | CurrentSource = L; |
21153 | return LoadPop<PT_MemberPtr>(S, OpPC); |
21154 | } |
21155 | bool EvalEmitter::emitLoadPopFloat(const SourceInfo &L) { |
21156 | if (!isActive()) return true; |
21157 | CurrentSource = L; |
21158 | return LoadPop<PT_Float>(S, OpPC); |
21159 | } |
21160 | #endif |
21161 | #ifdef GET_OPCODE_NAMES |
21162 | OP_Memcpy, |
21163 | #endif |
21164 | #ifdef GET_INTERP |
21165 | case OP_Memcpy: { |
21166 | if (!Memcpy(S, OpPC)) |
21167 | return false; |
21168 | continue; |
21169 | } |
21170 | #endif |
21171 | #ifdef GET_DISASM |
21172 | case OP_Memcpy: |
21173 | PrintName("Memcpy" ); |
21174 | OS << "\t" << "\n" ; |
21175 | continue; |
21176 | #endif |
21177 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21178 | bool emitMemcpy(const SourceInfo &); |
21179 | #endif |
21180 | #ifdef GET_LINK_IMPL |
21181 | bool ByteCodeEmitter::emitMemcpy(const SourceInfo &L) { |
21182 | return emitOp<>(OP_Memcpy, L); |
21183 | } |
21184 | #endif |
21185 | #ifdef GET_EVAL_IMPL |
21186 | bool EvalEmitter::emitMemcpy(const SourceInfo &L) { |
21187 | if (!isActive()) return true; |
21188 | CurrentSource = L; |
21189 | return Memcpy(S, OpPC); |
21190 | } |
21191 | #endif |
21192 | #ifdef GET_OPCODE_NAMES |
21193 | OP_MulSint8, |
21194 | OP_MulUint8, |
21195 | OP_MulSint16, |
21196 | OP_MulUint16, |
21197 | OP_MulSint32, |
21198 | OP_MulUint32, |
21199 | OP_MulSint64, |
21200 | OP_MulUint64, |
21201 | OP_MulIntAP, |
21202 | OP_MulIntAPS, |
21203 | OP_MulBool, |
21204 | #endif |
21205 | #ifdef GET_INTERP |
21206 | case OP_MulSint8: { |
21207 | if (!Mul<PT_Sint8>(S, OpPC)) |
21208 | return false; |
21209 | continue; |
21210 | } |
21211 | case OP_MulUint8: { |
21212 | if (!Mul<PT_Uint8>(S, OpPC)) |
21213 | return false; |
21214 | continue; |
21215 | } |
21216 | case OP_MulSint16: { |
21217 | if (!Mul<PT_Sint16>(S, OpPC)) |
21218 | return false; |
21219 | continue; |
21220 | } |
21221 | case OP_MulUint16: { |
21222 | if (!Mul<PT_Uint16>(S, OpPC)) |
21223 | return false; |
21224 | continue; |
21225 | } |
21226 | case OP_MulSint32: { |
21227 | if (!Mul<PT_Sint32>(S, OpPC)) |
21228 | return false; |
21229 | continue; |
21230 | } |
21231 | case OP_MulUint32: { |
21232 | if (!Mul<PT_Uint32>(S, OpPC)) |
21233 | return false; |
21234 | continue; |
21235 | } |
21236 | case OP_MulSint64: { |
21237 | if (!Mul<PT_Sint64>(S, OpPC)) |
21238 | return false; |
21239 | continue; |
21240 | } |
21241 | case OP_MulUint64: { |
21242 | if (!Mul<PT_Uint64>(S, OpPC)) |
21243 | return false; |
21244 | continue; |
21245 | } |
21246 | case OP_MulIntAP: { |
21247 | if (!Mul<PT_IntAP>(S, OpPC)) |
21248 | return false; |
21249 | continue; |
21250 | } |
21251 | case OP_MulIntAPS: { |
21252 | if (!Mul<PT_IntAPS>(S, OpPC)) |
21253 | return false; |
21254 | continue; |
21255 | } |
21256 | case OP_MulBool: { |
21257 | if (!Mul<PT_Bool>(S, OpPC)) |
21258 | return false; |
21259 | continue; |
21260 | } |
21261 | #endif |
21262 | #ifdef GET_DISASM |
21263 | case OP_MulSint8: |
21264 | PrintName("MulSint8" ); |
21265 | OS << "\t" << "\n" ; |
21266 | continue; |
21267 | case OP_MulUint8: |
21268 | PrintName("MulUint8" ); |
21269 | OS << "\t" << "\n" ; |
21270 | continue; |
21271 | case OP_MulSint16: |
21272 | PrintName("MulSint16" ); |
21273 | OS << "\t" << "\n" ; |
21274 | continue; |
21275 | case OP_MulUint16: |
21276 | PrintName("MulUint16" ); |
21277 | OS << "\t" << "\n" ; |
21278 | continue; |
21279 | case OP_MulSint32: |
21280 | PrintName("MulSint32" ); |
21281 | OS << "\t" << "\n" ; |
21282 | continue; |
21283 | case OP_MulUint32: |
21284 | PrintName("MulUint32" ); |
21285 | OS << "\t" << "\n" ; |
21286 | continue; |
21287 | case OP_MulSint64: |
21288 | PrintName("MulSint64" ); |
21289 | OS << "\t" << "\n" ; |
21290 | continue; |
21291 | case OP_MulUint64: |
21292 | PrintName("MulUint64" ); |
21293 | OS << "\t" << "\n" ; |
21294 | continue; |
21295 | case OP_MulIntAP: |
21296 | PrintName("MulIntAP" ); |
21297 | OS << "\t" << "\n" ; |
21298 | continue; |
21299 | case OP_MulIntAPS: |
21300 | PrintName("MulIntAPS" ); |
21301 | OS << "\t" << "\n" ; |
21302 | continue; |
21303 | case OP_MulBool: |
21304 | PrintName("MulBool" ); |
21305 | OS << "\t" << "\n" ; |
21306 | continue; |
21307 | #endif |
21308 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21309 | bool emitMulSint8(const SourceInfo &); |
21310 | bool emitMulUint8(const SourceInfo &); |
21311 | bool emitMulSint16(const SourceInfo &); |
21312 | bool emitMulUint16(const SourceInfo &); |
21313 | bool emitMulSint32(const SourceInfo &); |
21314 | bool emitMulUint32(const SourceInfo &); |
21315 | bool emitMulSint64(const SourceInfo &); |
21316 | bool emitMulUint64(const SourceInfo &); |
21317 | bool emitMulIntAP(const SourceInfo &); |
21318 | bool emitMulIntAPS(const SourceInfo &); |
21319 | bool emitMulBool(const SourceInfo &); |
21320 | #endif |
21321 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21322 | [[nodiscard]] bool emitMul(PrimType, const SourceInfo &I); |
21323 | #endif |
21324 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
21325 | bool |
21326 | #if defined(GET_EVAL_IMPL) |
21327 | EvalEmitter |
21328 | #else |
21329 | ByteCodeEmitter |
21330 | #endif |
21331 | ::emitMul(PrimType T0, const SourceInfo &I) { |
21332 | switch (T0) { |
21333 | case PT_Sint8: |
21334 | return emitMulSint8(I); |
21335 | case PT_Uint8: |
21336 | return emitMulUint8(I); |
21337 | case PT_Sint16: |
21338 | return emitMulSint16(I); |
21339 | case PT_Uint16: |
21340 | return emitMulUint16(I); |
21341 | case PT_Sint32: |
21342 | return emitMulSint32(I); |
21343 | case PT_Uint32: |
21344 | return emitMulUint32(I); |
21345 | case PT_Sint64: |
21346 | return emitMulSint64(I); |
21347 | case PT_Uint64: |
21348 | return emitMulUint64(I); |
21349 | case PT_IntAP: |
21350 | return emitMulIntAP(I); |
21351 | case PT_IntAPS: |
21352 | return emitMulIntAPS(I); |
21353 | case PT_Bool: |
21354 | return emitMulBool(I); |
21355 | default: llvm_unreachable("invalid type: emitMul" ); |
21356 | } |
21357 | llvm_unreachable("invalid enum value" ); |
21358 | } |
21359 | #endif |
21360 | #ifdef GET_LINK_IMPL |
21361 | bool ByteCodeEmitter::emitMulSint8(const SourceInfo &L) { |
21362 | return emitOp<>(OP_MulSint8, L); |
21363 | } |
21364 | bool ByteCodeEmitter::emitMulUint8(const SourceInfo &L) { |
21365 | return emitOp<>(OP_MulUint8, L); |
21366 | } |
21367 | bool ByteCodeEmitter::emitMulSint16(const SourceInfo &L) { |
21368 | return emitOp<>(OP_MulSint16, L); |
21369 | } |
21370 | bool ByteCodeEmitter::emitMulUint16(const SourceInfo &L) { |
21371 | return emitOp<>(OP_MulUint16, L); |
21372 | } |
21373 | bool ByteCodeEmitter::emitMulSint32(const SourceInfo &L) { |
21374 | return emitOp<>(OP_MulSint32, L); |
21375 | } |
21376 | bool ByteCodeEmitter::emitMulUint32(const SourceInfo &L) { |
21377 | return emitOp<>(OP_MulUint32, L); |
21378 | } |
21379 | bool ByteCodeEmitter::emitMulSint64(const SourceInfo &L) { |
21380 | return emitOp<>(OP_MulSint64, L); |
21381 | } |
21382 | bool ByteCodeEmitter::emitMulUint64(const SourceInfo &L) { |
21383 | return emitOp<>(OP_MulUint64, L); |
21384 | } |
21385 | bool ByteCodeEmitter::emitMulIntAP(const SourceInfo &L) { |
21386 | return emitOp<>(OP_MulIntAP, L); |
21387 | } |
21388 | bool ByteCodeEmitter::emitMulIntAPS(const SourceInfo &L) { |
21389 | return emitOp<>(OP_MulIntAPS, L); |
21390 | } |
21391 | bool ByteCodeEmitter::emitMulBool(const SourceInfo &L) { |
21392 | return emitOp<>(OP_MulBool, L); |
21393 | } |
21394 | #endif |
21395 | #ifdef GET_EVAL_IMPL |
21396 | bool EvalEmitter::emitMulSint8(const SourceInfo &L) { |
21397 | if (!isActive()) return true; |
21398 | CurrentSource = L; |
21399 | return Mul<PT_Sint8>(S, OpPC); |
21400 | } |
21401 | bool EvalEmitter::emitMulUint8(const SourceInfo &L) { |
21402 | if (!isActive()) return true; |
21403 | CurrentSource = L; |
21404 | return Mul<PT_Uint8>(S, OpPC); |
21405 | } |
21406 | bool EvalEmitter::emitMulSint16(const SourceInfo &L) { |
21407 | if (!isActive()) return true; |
21408 | CurrentSource = L; |
21409 | return Mul<PT_Sint16>(S, OpPC); |
21410 | } |
21411 | bool EvalEmitter::emitMulUint16(const SourceInfo &L) { |
21412 | if (!isActive()) return true; |
21413 | CurrentSource = L; |
21414 | return Mul<PT_Uint16>(S, OpPC); |
21415 | } |
21416 | bool EvalEmitter::emitMulSint32(const SourceInfo &L) { |
21417 | if (!isActive()) return true; |
21418 | CurrentSource = L; |
21419 | return Mul<PT_Sint32>(S, OpPC); |
21420 | } |
21421 | bool EvalEmitter::emitMulUint32(const SourceInfo &L) { |
21422 | if (!isActive()) return true; |
21423 | CurrentSource = L; |
21424 | return Mul<PT_Uint32>(S, OpPC); |
21425 | } |
21426 | bool EvalEmitter::emitMulSint64(const SourceInfo &L) { |
21427 | if (!isActive()) return true; |
21428 | CurrentSource = L; |
21429 | return Mul<PT_Sint64>(S, OpPC); |
21430 | } |
21431 | bool EvalEmitter::emitMulUint64(const SourceInfo &L) { |
21432 | if (!isActive()) return true; |
21433 | CurrentSource = L; |
21434 | return Mul<PT_Uint64>(S, OpPC); |
21435 | } |
21436 | bool EvalEmitter::emitMulIntAP(const SourceInfo &L) { |
21437 | if (!isActive()) return true; |
21438 | CurrentSource = L; |
21439 | return Mul<PT_IntAP>(S, OpPC); |
21440 | } |
21441 | bool EvalEmitter::emitMulIntAPS(const SourceInfo &L) { |
21442 | if (!isActive()) return true; |
21443 | CurrentSource = L; |
21444 | return Mul<PT_IntAPS>(S, OpPC); |
21445 | } |
21446 | bool EvalEmitter::emitMulBool(const SourceInfo &L) { |
21447 | if (!isActive()) return true; |
21448 | CurrentSource = L; |
21449 | return Mul<PT_Bool>(S, OpPC); |
21450 | } |
21451 | #endif |
21452 | #ifdef GET_OPCODE_NAMES |
21453 | OP_MulcSint8, |
21454 | OP_MulcUint8, |
21455 | OP_MulcSint16, |
21456 | OP_MulcUint16, |
21457 | OP_MulcSint32, |
21458 | OP_MulcUint32, |
21459 | OP_MulcSint64, |
21460 | OP_MulcUint64, |
21461 | OP_MulcIntAP, |
21462 | OP_MulcIntAPS, |
21463 | OP_MulcFloat, |
21464 | #endif |
21465 | #ifdef GET_INTERP |
21466 | case OP_MulcSint8: { |
21467 | if (!Mulc<PT_Sint8>(S, OpPC)) |
21468 | return false; |
21469 | continue; |
21470 | } |
21471 | case OP_MulcUint8: { |
21472 | if (!Mulc<PT_Uint8>(S, OpPC)) |
21473 | return false; |
21474 | continue; |
21475 | } |
21476 | case OP_MulcSint16: { |
21477 | if (!Mulc<PT_Sint16>(S, OpPC)) |
21478 | return false; |
21479 | continue; |
21480 | } |
21481 | case OP_MulcUint16: { |
21482 | if (!Mulc<PT_Uint16>(S, OpPC)) |
21483 | return false; |
21484 | continue; |
21485 | } |
21486 | case OP_MulcSint32: { |
21487 | if (!Mulc<PT_Sint32>(S, OpPC)) |
21488 | return false; |
21489 | continue; |
21490 | } |
21491 | case OP_MulcUint32: { |
21492 | if (!Mulc<PT_Uint32>(S, OpPC)) |
21493 | return false; |
21494 | continue; |
21495 | } |
21496 | case OP_MulcSint64: { |
21497 | if (!Mulc<PT_Sint64>(S, OpPC)) |
21498 | return false; |
21499 | continue; |
21500 | } |
21501 | case OP_MulcUint64: { |
21502 | if (!Mulc<PT_Uint64>(S, OpPC)) |
21503 | return false; |
21504 | continue; |
21505 | } |
21506 | case OP_MulcIntAP: { |
21507 | if (!Mulc<PT_IntAP>(S, OpPC)) |
21508 | return false; |
21509 | continue; |
21510 | } |
21511 | case OP_MulcIntAPS: { |
21512 | if (!Mulc<PT_IntAPS>(S, OpPC)) |
21513 | return false; |
21514 | continue; |
21515 | } |
21516 | case OP_MulcFloat: { |
21517 | if (!Mulc<PT_Float>(S, OpPC)) |
21518 | return false; |
21519 | continue; |
21520 | } |
21521 | #endif |
21522 | #ifdef GET_DISASM |
21523 | case OP_MulcSint8: |
21524 | PrintName("MulcSint8" ); |
21525 | OS << "\t" << "\n" ; |
21526 | continue; |
21527 | case OP_MulcUint8: |
21528 | PrintName("MulcUint8" ); |
21529 | OS << "\t" << "\n" ; |
21530 | continue; |
21531 | case OP_MulcSint16: |
21532 | PrintName("MulcSint16" ); |
21533 | OS << "\t" << "\n" ; |
21534 | continue; |
21535 | case OP_MulcUint16: |
21536 | PrintName("MulcUint16" ); |
21537 | OS << "\t" << "\n" ; |
21538 | continue; |
21539 | case OP_MulcSint32: |
21540 | PrintName("MulcSint32" ); |
21541 | OS << "\t" << "\n" ; |
21542 | continue; |
21543 | case OP_MulcUint32: |
21544 | PrintName("MulcUint32" ); |
21545 | OS << "\t" << "\n" ; |
21546 | continue; |
21547 | case OP_MulcSint64: |
21548 | PrintName("MulcSint64" ); |
21549 | OS << "\t" << "\n" ; |
21550 | continue; |
21551 | case OP_MulcUint64: |
21552 | PrintName("MulcUint64" ); |
21553 | OS << "\t" << "\n" ; |
21554 | continue; |
21555 | case OP_MulcIntAP: |
21556 | PrintName("MulcIntAP" ); |
21557 | OS << "\t" << "\n" ; |
21558 | continue; |
21559 | case OP_MulcIntAPS: |
21560 | PrintName("MulcIntAPS" ); |
21561 | OS << "\t" << "\n" ; |
21562 | continue; |
21563 | case OP_MulcFloat: |
21564 | PrintName("MulcFloat" ); |
21565 | OS << "\t" << "\n" ; |
21566 | continue; |
21567 | #endif |
21568 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21569 | bool emitMulcSint8(const SourceInfo &); |
21570 | bool emitMulcUint8(const SourceInfo &); |
21571 | bool emitMulcSint16(const SourceInfo &); |
21572 | bool emitMulcUint16(const SourceInfo &); |
21573 | bool emitMulcSint32(const SourceInfo &); |
21574 | bool emitMulcUint32(const SourceInfo &); |
21575 | bool emitMulcSint64(const SourceInfo &); |
21576 | bool emitMulcUint64(const SourceInfo &); |
21577 | bool emitMulcIntAP(const SourceInfo &); |
21578 | bool emitMulcIntAPS(const SourceInfo &); |
21579 | bool emitMulcFloat(const SourceInfo &); |
21580 | #endif |
21581 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21582 | [[nodiscard]] bool emitMulc(PrimType, const SourceInfo &I); |
21583 | #endif |
21584 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
21585 | bool |
21586 | #if defined(GET_EVAL_IMPL) |
21587 | EvalEmitter |
21588 | #else |
21589 | ByteCodeEmitter |
21590 | #endif |
21591 | ::emitMulc(PrimType T0, const SourceInfo &I) { |
21592 | switch (T0) { |
21593 | case PT_Sint8: |
21594 | return emitMulcSint8(I); |
21595 | case PT_Uint8: |
21596 | return emitMulcUint8(I); |
21597 | case PT_Sint16: |
21598 | return emitMulcSint16(I); |
21599 | case PT_Uint16: |
21600 | return emitMulcUint16(I); |
21601 | case PT_Sint32: |
21602 | return emitMulcSint32(I); |
21603 | case PT_Uint32: |
21604 | return emitMulcUint32(I); |
21605 | case PT_Sint64: |
21606 | return emitMulcSint64(I); |
21607 | case PT_Uint64: |
21608 | return emitMulcUint64(I); |
21609 | case PT_IntAP: |
21610 | return emitMulcIntAP(I); |
21611 | case PT_IntAPS: |
21612 | return emitMulcIntAPS(I); |
21613 | case PT_Float: |
21614 | return emitMulcFloat(I); |
21615 | default: llvm_unreachable("invalid type: emitMulc" ); |
21616 | } |
21617 | llvm_unreachable("invalid enum value" ); |
21618 | } |
21619 | #endif |
21620 | #ifdef GET_LINK_IMPL |
21621 | bool ByteCodeEmitter::emitMulcSint8(const SourceInfo &L) { |
21622 | return emitOp<>(OP_MulcSint8, L); |
21623 | } |
21624 | bool ByteCodeEmitter::emitMulcUint8(const SourceInfo &L) { |
21625 | return emitOp<>(OP_MulcUint8, L); |
21626 | } |
21627 | bool ByteCodeEmitter::emitMulcSint16(const SourceInfo &L) { |
21628 | return emitOp<>(OP_MulcSint16, L); |
21629 | } |
21630 | bool ByteCodeEmitter::emitMulcUint16(const SourceInfo &L) { |
21631 | return emitOp<>(OP_MulcUint16, L); |
21632 | } |
21633 | bool ByteCodeEmitter::emitMulcSint32(const SourceInfo &L) { |
21634 | return emitOp<>(OP_MulcSint32, L); |
21635 | } |
21636 | bool ByteCodeEmitter::emitMulcUint32(const SourceInfo &L) { |
21637 | return emitOp<>(OP_MulcUint32, L); |
21638 | } |
21639 | bool ByteCodeEmitter::emitMulcSint64(const SourceInfo &L) { |
21640 | return emitOp<>(OP_MulcSint64, L); |
21641 | } |
21642 | bool ByteCodeEmitter::emitMulcUint64(const SourceInfo &L) { |
21643 | return emitOp<>(OP_MulcUint64, L); |
21644 | } |
21645 | bool ByteCodeEmitter::emitMulcIntAP(const SourceInfo &L) { |
21646 | return emitOp<>(OP_MulcIntAP, L); |
21647 | } |
21648 | bool ByteCodeEmitter::emitMulcIntAPS(const SourceInfo &L) { |
21649 | return emitOp<>(OP_MulcIntAPS, L); |
21650 | } |
21651 | bool ByteCodeEmitter::emitMulcFloat(const SourceInfo &L) { |
21652 | return emitOp<>(OP_MulcFloat, L); |
21653 | } |
21654 | #endif |
21655 | #ifdef GET_EVAL_IMPL |
21656 | bool EvalEmitter::emitMulcSint8(const SourceInfo &L) { |
21657 | if (!isActive()) return true; |
21658 | CurrentSource = L; |
21659 | return Mulc<PT_Sint8>(S, OpPC); |
21660 | } |
21661 | bool EvalEmitter::emitMulcUint8(const SourceInfo &L) { |
21662 | if (!isActive()) return true; |
21663 | CurrentSource = L; |
21664 | return Mulc<PT_Uint8>(S, OpPC); |
21665 | } |
21666 | bool EvalEmitter::emitMulcSint16(const SourceInfo &L) { |
21667 | if (!isActive()) return true; |
21668 | CurrentSource = L; |
21669 | return Mulc<PT_Sint16>(S, OpPC); |
21670 | } |
21671 | bool EvalEmitter::emitMulcUint16(const SourceInfo &L) { |
21672 | if (!isActive()) return true; |
21673 | CurrentSource = L; |
21674 | return Mulc<PT_Uint16>(S, OpPC); |
21675 | } |
21676 | bool EvalEmitter::emitMulcSint32(const SourceInfo &L) { |
21677 | if (!isActive()) return true; |
21678 | CurrentSource = L; |
21679 | return Mulc<PT_Sint32>(S, OpPC); |
21680 | } |
21681 | bool EvalEmitter::emitMulcUint32(const SourceInfo &L) { |
21682 | if (!isActive()) return true; |
21683 | CurrentSource = L; |
21684 | return Mulc<PT_Uint32>(S, OpPC); |
21685 | } |
21686 | bool EvalEmitter::emitMulcSint64(const SourceInfo &L) { |
21687 | if (!isActive()) return true; |
21688 | CurrentSource = L; |
21689 | return Mulc<PT_Sint64>(S, OpPC); |
21690 | } |
21691 | bool EvalEmitter::emitMulcUint64(const SourceInfo &L) { |
21692 | if (!isActive()) return true; |
21693 | CurrentSource = L; |
21694 | return Mulc<PT_Uint64>(S, OpPC); |
21695 | } |
21696 | bool EvalEmitter::emitMulcIntAP(const SourceInfo &L) { |
21697 | if (!isActive()) return true; |
21698 | CurrentSource = L; |
21699 | return Mulc<PT_IntAP>(S, OpPC); |
21700 | } |
21701 | bool EvalEmitter::emitMulcIntAPS(const SourceInfo &L) { |
21702 | if (!isActive()) return true; |
21703 | CurrentSource = L; |
21704 | return Mulc<PT_IntAPS>(S, OpPC); |
21705 | } |
21706 | bool EvalEmitter::emitMulcFloat(const SourceInfo &L) { |
21707 | if (!isActive()) return true; |
21708 | CurrentSource = L; |
21709 | return Mulc<PT_Float>(S, OpPC); |
21710 | } |
21711 | #endif |
21712 | #ifdef GET_OPCODE_NAMES |
21713 | OP_Mulf, |
21714 | #endif |
21715 | #ifdef GET_INTERP |
21716 | case OP_Mulf: { |
21717 | const auto V0 = ReadArg<llvm::RoundingMode>(S, PC); |
21718 | if (!Mulf(S, OpPC, V0)) |
21719 | return false; |
21720 | continue; |
21721 | } |
21722 | #endif |
21723 | #ifdef GET_DISASM |
21724 | case OP_Mulf: |
21725 | PrintName("Mulf" ); |
21726 | OS << "\t" << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
21727 | continue; |
21728 | #endif |
21729 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21730 | bool emitMulf( llvm::RoundingMode , const SourceInfo &); |
21731 | #endif |
21732 | #ifdef GET_LINK_IMPL |
21733 | bool ByteCodeEmitter::emitMulf( llvm::RoundingMode A0, const SourceInfo &L) { |
21734 | return emitOp<llvm::RoundingMode>(OP_Mulf, A0, L); |
21735 | } |
21736 | #endif |
21737 | #ifdef GET_EVAL_IMPL |
21738 | bool EvalEmitter::emitMulf( llvm::RoundingMode A0, const SourceInfo &L) { |
21739 | if (!isActive()) return true; |
21740 | CurrentSource = L; |
21741 | return Mulf(S, OpPC, A0); |
21742 | } |
21743 | #endif |
21744 | #ifdef GET_OPCODE_NAMES |
21745 | OP_NESint8, |
21746 | OP_NEUint8, |
21747 | OP_NESint16, |
21748 | OP_NEUint16, |
21749 | OP_NESint32, |
21750 | OP_NEUint32, |
21751 | OP_NESint64, |
21752 | OP_NEUint64, |
21753 | OP_NEIntAP, |
21754 | OP_NEIntAPS, |
21755 | OP_NEBool, |
21756 | OP_NEPtr, |
21757 | OP_NEFnPtr, |
21758 | OP_NEMemberPtr, |
21759 | OP_NEFloat, |
21760 | #endif |
21761 | #ifdef GET_INTERP |
21762 | case OP_NESint8: { |
21763 | if (!NE<PT_Sint8>(S, OpPC)) |
21764 | return false; |
21765 | continue; |
21766 | } |
21767 | case OP_NEUint8: { |
21768 | if (!NE<PT_Uint8>(S, OpPC)) |
21769 | return false; |
21770 | continue; |
21771 | } |
21772 | case OP_NESint16: { |
21773 | if (!NE<PT_Sint16>(S, OpPC)) |
21774 | return false; |
21775 | continue; |
21776 | } |
21777 | case OP_NEUint16: { |
21778 | if (!NE<PT_Uint16>(S, OpPC)) |
21779 | return false; |
21780 | continue; |
21781 | } |
21782 | case OP_NESint32: { |
21783 | if (!NE<PT_Sint32>(S, OpPC)) |
21784 | return false; |
21785 | continue; |
21786 | } |
21787 | case OP_NEUint32: { |
21788 | if (!NE<PT_Uint32>(S, OpPC)) |
21789 | return false; |
21790 | continue; |
21791 | } |
21792 | case OP_NESint64: { |
21793 | if (!NE<PT_Sint64>(S, OpPC)) |
21794 | return false; |
21795 | continue; |
21796 | } |
21797 | case OP_NEUint64: { |
21798 | if (!NE<PT_Uint64>(S, OpPC)) |
21799 | return false; |
21800 | continue; |
21801 | } |
21802 | case OP_NEIntAP: { |
21803 | if (!NE<PT_IntAP>(S, OpPC)) |
21804 | return false; |
21805 | continue; |
21806 | } |
21807 | case OP_NEIntAPS: { |
21808 | if (!NE<PT_IntAPS>(S, OpPC)) |
21809 | return false; |
21810 | continue; |
21811 | } |
21812 | case OP_NEBool: { |
21813 | if (!NE<PT_Bool>(S, OpPC)) |
21814 | return false; |
21815 | continue; |
21816 | } |
21817 | case OP_NEPtr: { |
21818 | if (!NE<PT_Ptr>(S, OpPC)) |
21819 | return false; |
21820 | continue; |
21821 | } |
21822 | case OP_NEFnPtr: { |
21823 | if (!NE<PT_FnPtr>(S, OpPC)) |
21824 | return false; |
21825 | continue; |
21826 | } |
21827 | case OP_NEMemberPtr: { |
21828 | if (!NE<PT_MemberPtr>(S, OpPC)) |
21829 | return false; |
21830 | continue; |
21831 | } |
21832 | case OP_NEFloat: { |
21833 | if (!NE<PT_Float>(S, OpPC)) |
21834 | return false; |
21835 | continue; |
21836 | } |
21837 | #endif |
21838 | #ifdef GET_DISASM |
21839 | case OP_NESint8: |
21840 | PrintName("NESint8" ); |
21841 | OS << "\t" << "\n" ; |
21842 | continue; |
21843 | case OP_NEUint8: |
21844 | PrintName("NEUint8" ); |
21845 | OS << "\t" << "\n" ; |
21846 | continue; |
21847 | case OP_NESint16: |
21848 | PrintName("NESint16" ); |
21849 | OS << "\t" << "\n" ; |
21850 | continue; |
21851 | case OP_NEUint16: |
21852 | PrintName("NEUint16" ); |
21853 | OS << "\t" << "\n" ; |
21854 | continue; |
21855 | case OP_NESint32: |
21856 | PrintName("NESint32" ); |
21857 | OS << "\t" << "\n" ; |
21858 | continue; |
21859 | case OP_NEUint32: |
21860 | PrintName("NEUint32" ); |
21861 | OS << "\t" << "\n" ; |
21862 | continue; |
21863 | case OP_NESint64: |
21864 | PrintName("NESint64" ); |
21865 | OS << "\t" << "\n" ; |
21866 | continue; |
21867 | case OP_NEUint64: |
21868 | PrintName("NEUint64" ); |
21869 | OS << "\t" << "\n" ; |
21870 | continue; |
21871 | case OP_NEIntAP: |
21872 | PrintName("NEIntAP" ); |
21873 | OS << "\t" << "\n" ; |
21874 | continue; |
21875 | case OP_NEIntAPS: |
21876 | PrintName("NEIntAPS" ); |
21877 | OS << "\t" << "\n" ; |
21878 | continue; |
21879 | case OP_NEBool: |
21880 | PrintName("NEBool" ); |
21881 | OS << "\t" << "\n" ; |
21882 | continue; |
21883 | case OP_NEPtr: |
21884 | PrintName("NEPtr" ); |
21885 | OS << "\t" << "\n" ; |
21886 | continue; |
21887 | case OP_NEFnPtr: |
21888 | PrintName("NEFnPtr" ); |
21889 | OS << "\t" << "\n" ; |
21890 | continue; |
21891 | case OP_NEMemberPtr: |
21892 | PrintName("NEMemberPtr" ); |
21893 | OS << "\t" << "\n" ; |
21894 | continue; |
21895 | case OP_NEFloat: |
21896 | PrintName("NEFloat" ); |
21897 | OS << "\t" << "\n" ; |
21898 | continue; |
21899 | #endif |
21900 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21901 | bool emitNESint8(const SourceInfo &); |
21902 | bool emitNEUint8(const SourceInfo &); |
21903 | bool emitNESint16(const SourceInfo &); |
21904 | bool emitNEUint16(const SourceInfo &); |
21905 | bool emitNESint32(const SourceInfo &); |
21906 | bool emitNEUint32(const SourceInfo &); |
21907 | bool emitNESint64(const SourceInfo &); |
21908 | bool emitNEUint64(const SourceInfo &); |
21909 | bool emitNEIntAP(const SourceInfo &); |
21910 | bool emitNEIntAPS(const SourceInfo &); |
21911 | bool emitNEBool(const SourceInfo &); |
21912 | bool emitNEPtr(const SourceInfo &); |
21913 | bool emitNEFnPtr(const SourceInfo &); |
21914 | bool emitNEMemberPtr(const SourceInfo &); |
21915 | bool emitNEFloat(const SourceInfo &); |
21916 | #endif |
21917 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
21918 | [[nodiscard]] bool emitNE(PrimType, const SourceInfo &I); |
21919 | #endif |
21920 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
21921 | bool |
21922 | #if defined(GET_EVAL_IMPL) |
21923 | EvalEmitter |
21924 | #else |
21925 | ByteCodeEmitter |
21926 | #endif |
21927 | ::emitNE(PrimType T0, const SourceInfo &I) { |
21928 | switch (T0) { |
21929 | case PT_Sint8: |
21930 | return emitNESint8(I); |
21931 | case PT_Uint8: |
21932 | return emitNEUint8(I); |
21933 | case PT_Sint16: |
21934 | return emitNESint16(I); |
21935 | case PT_Uint16: |
21936 | return emitNEUint16(I); |
21937 | case PT_Sint32: |
21938 | return emitNESint32(I); |
21939 | case PT_Uint32: |
21940 | return emitNEUint32(I); |
21941 | case PT_Sint64: |
21942 | return emitNESint64(I); |
21943 | case PT_Uint64: |
21944 | return emitNEUint64(I); |
21945 | case PT_IntAP: |
21946 | return emitNEIntAP(I); |
21947 | case PT_IntAPS: |
21948 | return emitNEIntAPS(I); |
21949 | case PT_Bool: |
21950 | return emitNEBool(I); |
21951 | case PT_Ptr: |
21952 | return emitNEPtr(I); |
21953 | case PT_FnPtr: |
21954 | return emitNEFnPtr(I); |
21955 | case PT_MemberPtr: |
21956 | return emitNEMemberPtr(I); |
21957 | case PT_Float: |
21958 | return emitNEFloat(I); |
21959 | } |
21960 | llvm_unreachable("invalid enum value" ); |
21961 | } |
21962 | #endif |
21963 | #ifdef GET_LINK_IMPL |
21964 | bool ByteCodeEmitter::emitNESint8(const SourceInfo &L) { |
21965 | return emitOp<>(OP_NESint8, L); |
21966 | } |
21967 | bool ByteCodeEmitter::emitNEUint8(const SourceInfo &L) { |
21968 | return emitOp<>(OP_NEUint8, L); |
21969 | } |
21970 | bool ByteCodeEmitter::emitNESint16(const SourceInfo &L) { |
21971 | return emitOp<>(OP_NESint16, L); |
21972 | } |
21973 | bool ByteCodeEmitter::emitNEUint16(const SourceInfo &L) { |
21974 | return emitOp<>(OP_NEUint16, L); |
21975 | } |
21976 | bool ByteCodeEmitter::emitNESint32(const SourceInfo &L) { |
21977 | return emitOp<>(OP_NESint32, L); |
21978 | } |
21979 | bool ByteCodeEmitter::emitNEUint32(const SourceInfo &L) { |
21980 | return emitOp<>(OP_NEUint32, L); |
21981 | } |
21982 | bool ByteCodeEmitter::emitNESint64(const SourceInfo &L) { |
21983 | return emitOp<>(OP_NESint64, L); |
21984 | } |
21985 | bool ByteCodeEmitter::emitNEUint64(const SourceInfo &L) { |
21986 | return emitOp<>(OP_NEUint64, L); |
21987 | } |
21988 | bool ByteCodeEmitter::emitNEIntAP(const SourceInfo &L) { |
21989 | return emitOp<>(OP_NEIntAP, L); |
21990 | } |
21991 | bool ByteCodeEmitter::emitNEIntAPS(const SourceInfo &L) { |
21992 | return emitOp<>(OP_NEIntAPS, L); |
21993 | } |
21994 | bool ByteCodeEmitter::emitNEBool(const SourceInfo &L) { |
21995 | return emitOp<>(OP_NEBool, L); |
21996 | } |
21997 | bool ByteCodeEmitter::emitNEPtr(const SourceInfo &L) { |
21998 | return emitOp<>(OP_NEPtr, L); |
21999 | } |
22000 | bool ByteCodeEmitter::emitNEFnPtr(const SourceInfo &L) { |
22001 | return emitOp<>(OP_NEFnPtr, L); |
22002 | } |
22003 | bool ByteCodeEmitter::emitNEMemberPtr(const SourceInfo &L) { |
22004 | return emitOp<>(OP_NEMemberPtr, L); |
22005 | } |
22006 | bool ByteCodeEmitter::emitNEFloat(const SourceInfo &L) { |
22007 | return emitOp<>(OP_NEFloat, L); |
22008 | } |
22009 | #endif |
22010 | #ifdef GET_EVAL_IMPL |
22011 | bool EvalEmitter::emitNESint8(const SourceInfo &L) { |
22012 | if (!isActive()) return true; |
22013 | CurrentSource = L; |
22014 | return NE<PT_Sint8>(S, OpPC); |
22015 | } |
22016 | bool EvalEmitter::emitNEUint8(const SourceInfo &L) { |
22017 | if (!isActive()) return true; |
22018 | CurrentSource = L; |
22019 | return NE<PT_Uint8>(S, OpPC); |
22020 | } |
22021 | bool EvalEmitter::emitNESint16(const SourceInfo &L) { |
22022 | if (!isActive()) return true; |
22023 | CurrentSource = L; |
22024 | return NE<PT_Sint16>(S, OpPC); |
22025 | } |
22026 | bool EvalEmitter::emitNEUint16(const SourceInfo &L) { |
22027 | if (!isActive()) return true; |
22028 | CurrentSource = L; |
22029 | return NE<PT_Uint16>(S, OpPC); |
22030 | } |
22031 | bool EvalEmitter::emitNESint32(const SourceInfo &L) { |
22032 | if (!isActive()) return true; |
22033 | CurrentSource = L; |
22034 | return NE<PT_Sint32>(S, OpPC); |
22035 | } |
22036 | bool EvalEmitter::emitNEUint32(const SourceInfo &L) { |
22037 | if (!isActive()) return true; |
22038 | CurrentSource = L; |
22039 | return NE<PT_Uint32>(S, OpPC); |
22040 | } |
22041 | bool EvalEmitter::emitNESint64(const SourceInfo &L) { |
22042 | if (!isActive()) return true; |
22043 | CurrentSource = L; |
22044 | return NE<PT_Sint64>(S, OpPC); |
22045 | } |
22046 | bool EvalEmitter::emitNEUint64(const SourceInfo &L) { |
22047 | if (!isActive()) return true; |
22048 | CurrentSource = L; |
22049 | return NE<PT_Uint64>(S, OpPC); |
22050 | } |
22051 | bool EvalEmitter::emitNEIntAP(const SourceInfo &L) { |
22052 | if (!isActive()) return true; |
22053 | CurrentSource = L; |
22054 | return NE<PT_IntAP>(S, OpPC); |
22055 | } |
22056 | bool EvalEmitter::emitNEIntAPS(const SourceInfo &L) { |
22057 | if (!isActive()) return true; |
22058 | CurrentSource = L; |
22059 | return NE<PT_IntAPS>(S, OpPC); |
22060 | } |
22061 | bool EvalEmitter::emitNEBool(const SourceInfo &L) { |
22062 | if (!isActive()) return true; |
22063 | CurrentSource = L; |
22064 | return NE<PT_Bool>(S, OpPC); |
22065 | } |
22066 | bool EvalEmitter::emitNEPtr(const SourceInfo &L) { |
22067 | if (!isActive()) return true; |
22068 | CurrentSource = L; |
22069 | return NE<PT_Ptr>(S, OpPC); |
22070 | } |
22071 | bool EvalEmitter::emitNEFnPtr(const SourceInfo &L) { |
22072 | if (!isActive()) return true; |
22073 | CurrentSource = L; |
22074 | return NE<PT_FnPtr>(S, OpPC); |
22075 | } |
22076 | bool EvalEmitter::emitNEMemberPtr(const SourceInfo &L) { |
22077 | if (!isActive()) return true; |
22078 | CurrentSource = L; |
22079 | return NE<PT_MemberPtr>(S, OpPC); |
22080 | } |
22081 | bool EvalEmitter::emitNEFloat(const SourceInfo &L) { |
22082 | if (!isActive()) return true; |
22083 | CurrentSource = L; |
22084 | return NE<PT_Float>(S, OpPC); |
22085 | } |
22086 | #endif |
22087 | #ifdef GET_OPCODE_NAMES |
22088 | OP_NarrowPtr, |
22089 | #endif |
22090 | #ifdef GET_INTERP |
22091 | case OP_NarrowPtr: { |
22092 | if (!NarrowPtr(S, OpPC)) |
22093 | return false; |
22094 | continue; |
22095 | } |
22096 | #endif |
22097 | #ifdef GET_DISASM |
22098 | case OP_NarrowPtr: |
22099 | PrintName("NarrowPtr" ); |
22100 | OS << "\t" << "\n" ; |
22101 | continue; |
22102 | #endif |
22103 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22104 | bool emitNarrowPtr(const SourceInfo &); |
22105 | #endif |
22106 | #ifdef GET_LINK_IMPL |
22107 | bool ByteCodeEmitter::emitNarrowPtr(const SourceInfo &L) { |
22108 | return emitOp<>(OP_NarrowPtr, L); |
22109 | } |
22110 | #endif |
22111 | #ifdef GET_EVAL_IMPL |
22112 | bool EvalEmitter::emitNarrowPtr(const SourceInfo &L) { |
22113 | if (!isActive()) return true; |
22114 | CurrentSource = L; |
22115 | return NarrowPtr(S, OpPC); |
22116 | } |
22117 | #endif |
22118 | #ifdef GET_OPCODE_NAMES |
22119 | OP_NegSint8, |
22120 | OP_NegUint8, |
22121 | OP_NegSint16, |
22122 | OP_NegUint16, |
22123 | OP_NegSint32, |
22124 | OP_NegUint32, |
22125 | OP_NegSint64, |
22126 | OP_NegUint64, |
22127 | OP_NegIntAP, |
22128 | OP_NegIntAPS, |
22129 | OP_NegBool, |
22130 | OP_NegFloat, |
22131 | #endif |
22132 | #ifdef GET_INTERP |
22133 | case OP_NegSint8: { |
22134 | if (!Neg<PT_Sint8>(S, OpPC)) |
22135 | return false; |
22136 | continue; |
22137 | } |
22138 | case OP_NegUint8: { |
22139 | if (!Neg<PT_Uint8>(S, OpPC)) |
22140 | return false; |
22141 | continue; |
22142 | } |
22143 | case OP_NegSint16: { |
22144 | if (!Neg<PT_Sint16>(S, OpPC)) |
22145 | return false; |
22146 | continue; |
22147 | } |
22148 | case OP_NegUint16: { |
22149 | if (!Neg<PT_Uint16>(S, OpPC)) |
22150 | return false; |
22151 | continue; |
22152 | } |
22153 | case OP_NegSint32: { |
22154 | if (!Neg<PT_Sint32>(S, OpPC)) |
22155 | return false; |
22156 | continue; |
22157 | } |
22158 | case OP_NegUint32: { |
22159 | if (!Neg<PT_Uint32>(S, OpPC)) |
22160 | return false; |
22161 | continue; |
22162 | } |
22163 | case OP_NegSint64: { |
22164 | if (!Neg<PT_Sint64>(S, OpPC)) |
22165 | return false; |
22166 | continue; |
22167 | } |
22168 | case OP_NegUint64: { |
22169 | if (!Neg<PT_Uint64>(S, OpPC)) |
22170 | return false; |
22171 | continue; |
22172 | } |
22173 | case OP_NegIntAP: { |
22174 | if (!Neg<PT_IntAP>(S, OpPC)) |
22175 | return false; |
22176 | continue; |
22177 | } |
22178 | case OP_NegIntAPS: { |
22179 | if (!Neg<PT_IntAPS>(S, OpPC)) |
22180 | return false; |
22181 | continue; |
22182 | } |
22183 | case OP_NegBool: { |
22184 | if (!Neg<PT_Bool>(S, OpPC)) |
22185 | return false; |
22186 | continue; |
22187 | } |
22188 | case OP_NegFloat: { |
22189 | if (!Neg<PT_Float>(S, OpPC)) |
22190 | return false; |
22191 | continue; |
22192 | } |
22193 | #endif |
22194 | #ifdef GET_DISASM |
22195 | case OP_NegSint8: |
22196 | PrintName("NegSint8" ); |
22197 | OS << "\t" << "\n" ; |
22198 | continue; |
22199 | case OP_NegUint8: |
22200 | PrintName("NegUint8" ); |
22201 | OS << "\t" << "\n" ; |
22202 | continue; |
22203 | case OP_NegSint16: |
22204 | PrintName("NegSint16" ); |
22205 | OS << "\t" << "\n" ; |
22206 | continue; |
22207 | case OP_NegUint16: |
22208 | PrintName("NegUint16" ); |
22209 | OS << "\t" << "\n" ; |
22210 | continue; |
22211 | case OP_NegSint32: |
22212 | PrintName("NegSint32" ); |
22213 | OS << "\t" << "\n" ; |
22214 | continue; |
22215 | case OP_NegUint32: |
22216 | PrintName("NegUint32" ); |
22217 | OS << "\t" << "\n" ; |
22218 | continue; |
22219 | case OP_NegSint64: |
22220 | PrintName("NegSint64" ); |
22221 | OS << "\t" << "\n" ; |
22222 | continue; |
22223 | case OP_NegUint64: |
22224 | PrintName("NegUint64" ); |
22225 | OS << "\t" << "\n" ; |
22226 | continue; |
22227 | case OP_NegIntAP: |
22228 | PrintName("NegIntAP" ); |
22229 | OS << "\t" << "\n" ; |
22230 | continue; |
22231 | case OP_NegIntAPS: |
22232 | PrintName("NegIntAPS" ); |
22233 | OS << "\t" << "\n" ; |
22234 | continue; |
22235 | case OP_NegBool: |
22236 | PrintName("NegBool" ); |
22237 | OS << "\t" << "\n" ; |
22238 | continue; |
22239 | case OP_NegFloat: |
22240 | PrintName("NegFloat" ); |
22241 | OS << "\t" << "\n" ; |
22242 | continue; |
22243 | #endif |
22244 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22245 | bool emitNegSint8(const SourceInfo &); |
22246 | bool emitNegUint8(const SourceInfo &); |
22247 | bool emitNegSint16(const SourceInfo &); |
22248 | bool emitNegUint16(const SourceInfo &); |
22249 | bool emitNegSint32(const SourceInfo &); |
22250 | bool emitNegUint32(const SourceInfo &); |
22251 | bool emitNegSint64(const SourceInfo &); |
22252 | bool emitNegUint64(const SourceInfo &); |
22253 | bool emitNegIntAP(const SourceInfo &); |
22254 | bool emitNegIntAPS(const SourceInfo &); |
22255 | bool emitNegBool(const SourceInfo &); |
22256 | bool emitNegFloat(const SourceInfo &); |
22257 | #endif |
22258 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22259 | [[nodiscard]] bool emitNeg(PrimType, const SourceInfo &I); |
22260 | #endif |
22261 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
22262 | bool |
22263 | #if defined(GET_EVAL_IMPL) |
22264 | EvalEmitter |
22265 | #else |
22266 | ByteCodeEmitter |
22267 | #endif |
22268 | ::emitNeg(PrimType T0, const SourceInfo &I) { |
22269 | switch (T0) { |
22270 | case PT_Sint8: |
22271 | return emitNegSint8(I); |
22272 | case PT_Uint8: |
22273 | return emitNegUint8(I); |
22274 | case PT_Sint16: |
22275 | return emitNegSint16(I); |
22276 | case PT_Uint16: |
22277 | return emitNegUint16(I); |
22278 | case PT_Sint32: |
22279 | return emitNegSint32(I); |
22280 | case PT_Uint32: |
22281 | return emitNegUint32(I); |
22282 | case PT_Sint64: |
22283 | return emitNegSint64(I); |
22284 | case PT_Uint64: |
22285 | return emitNegUint64(I); |
22286 | case PT_IntAP: |
22287 | return emitNegIntAP(I); |
22288 | case PT_IntAPS: |
22289 | return emitNegIntAPS(I); |
22290 | case PT_Bool: |
22291 | return emitNegBool(I); |
22292 | case PT_Float: |
22293 | return emitNegFloat(I); |
22294 | default: llvm_unreachable("invalid type: emitNeg" ); |
22295 | } |
22296 | llvm_unreachable("invalid enum value" ); |
22297 | } |
22298 | #endif |
22299 | #ifdef GET_LINK_IMPL |
22300 | bool ByteCodeEmitter::emitNegSint8(const SourceInfo &L) { |
22301 | return emitOp<>(OP_NegSint8, L); |
22302 | } |
22303 | bool ByteCodeEmitter::emitNegUint8(const SourceInfo &L) { |
22304 | return emitOp<>(OP_NegUint8, L); |
22305 | } |
22306 | bool ByteCodeEmitter::emitNegSint16(const SourceInfo &L) { |
22307 | return emitOp<>(OP_NegSint16, L); |
22308 | } |
22309 | bool ByteCodeEmitter::emitNegUint16(const SourceInfo &L) { |
22310 | return emitOp<>(OP_NegUint16, L); |
22311 | } |
22312 | bool ByteCodeEmitter::emitNegSint32(const SourceInfo &L) { |
22313 | return emitOp<>(OP_NegSint32, L); |
22314 | } |
22315 | bool ByteCodeEmitter::emitNegUint32(const SourceInfo &L) { |
22316 | return emitOp<>(OP_NegUint32, L); |
22317 | } |
22318 | bool ByteCodeEmitter::emitNegSint64(const SourceInfo &L) { |
22319 | return emitOp<>(OP_NegSint64, L); |
22320 | } |
22321 | bool ByteCodeEmitter::emitNegUint64(const SourceInfo &L) { |
22322 | return emitOp<>(OP_NegUint64, L); |
22323 | } |
22324 | bool ByteCodeEmitter::emitNegIntAP(const SourceInfo &L) { |
22325 | return emitOp<>(OP_NegIntAP, L); |
22326 | } |
22327 | bool ByteCodeEmitter::emitNegIntAPS(const SourceInfo &L) { |
22328 | return emitOp<>(OP_NegIntAPS, L); |
22329 | } |
22330 | bool ByteCodeEmitter::emitNegBool(const SourceInfo &L) { |
22331 | return emitOp<>(OP_NegBool, L); |
22332 | } |
22333 | bool ByteCodeEmitter::emitNegFloat(const SourceInfo &L) { |
22334 | return emitOp<>(OP_NegFloat, L); |
22335 | } |
22336 | #endif |
22337 | #ifdef GET_EVAL_IMPL |
22338 | bool EvalEmitter::emitNegSint8(const SourceInfo &L) { |
22339 | if (!isActive()) return true; |
22340 | CurrentSource = L; |
22341 | return Neg<PT_Sint8>(S, OpPC); |
22342 | } |
22343 | bool EvalEmitter::emitNegUint8(const SourceInfo &L) { |
22344 | if (!isActive()) return true; |
22345 | CurrentSource = L; |
22346 | return Neg<PT_Uint8>(S, OpPC); |
22347 | } |
22348 | bool EvalEmitter::emitNegSint16(const SourceInfo &L) { |
22349 | if (!isActive()) return true; |
22350 | CurrentSource = L; |
22351 | return Neg<PT_Sint16>(S, OpPC); |
22352 | } |
22353 | bool EvalEmitter::emitNegUint16(const SourceInfo &L) { |
22354 | if (!isActive()) return true; |
22355 | CurrentSource = L; |
22356 | return Neg<PT_Uint16>(S, OpPC); |
22357 | } |
22358 | bool EvalEmitter::emitNegSint32(const SourceInfo &L) { |
22359 | if (!isActive()) return true; |
22360 | CurrentSource = L; |
22361 | return Neg<PT_Sint32>(S, OpPC); |
22362 | } |
22363 | bool EvalEmitter::emitNegUint32(const SourceInfo &L) { |
22364 | if (!isActive()) return true; |
22365 | CurrentSource = L; |
22366 | return Neg<PT_Uint32>(S, OpPC); |
22367 | } |
22368 | bool EvalEmitter::emitNegSint64(const SourceInfo &L) { |
22369 | if (!isActive()) return true; |
22370 | CurrentSource = L; |
22371 | return Neg<PT_Sint64>(S, OpPC); |
22372 | } |
22373 | bool EvalEmitter::emitNegUint64(const SourceInfo &L) { |
22374 | if (!isActive()) return true; |
22375 | CurrentSource = L; |
22376 | return Neg<PT_Uint64>(S, OpPC); |
22377 | } |
22378 | bool EvalEmitter::emitNegIntAP(const SourceInfo &L) { |
22379 | if (!isActive()) return true; |
22380 | CurrentSource = L; |
22381 | return Neg<PT_IntAP>(S, OpPC); |
22382 | } |
22383 | bool EvalEmitter::emitNegIntAPS(const SourceInfo &L) { |
22384 | if (!isActive()) return true; |
22385 | CurrentSource = L; |
22386 | return Neg<PT_IntAPS>(S, OpPC); |
22387 | } |
22388 | bool EvalEmitter::emitNegBool(const SourceInfo &L) { |
22389 | if (!isActive()) return true; |
22390 | CurrentSource = L; |
22391 | return Neg<PT_Bool>(S, OpPC); |
22392 | } |
22393 | bool EvalEmitter::emitNegFloat(const SourceInfo &L) { |
22394 | if (!isActive()) return true; |
22395 | CurrentSource = L; |
22396 | return Neg<PT_Float>(S, OpPC); |
22397 | } |
22398 | #endif |
22399 | #ifdef GET_OPCODE_NAMES |
22400 | OP_NoRet, |
22401 | #endif |
22402 | #ifdef GET_INTERP |
22403 | case OP_NoRet: { |
22404 | if (!NoRet(S, OpPC)) |
22405 | return false; |
22406 | continue; |
22407 | } |
22408 | #endif |
22409 | #ifdef GET_DISASM |
22410 | case OP_NoRet: |
22411 | PrintName("NoRet" ); |
22412 | OS << "\t" << "\n" ; |
22413 | continue; |
22414 | #endif |
22415 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22416 | bool emitNoRet(const SourceInfo &); |
22417 | #endif |
22418 | #ifdef GET_LINK_IMPL |
22419 | bool ByteCodeEmitter::emitNoRet(const SourceInfo &L) { |
22420 | return emitOp<>(OP_NoRet, L); |
22421 | } |
22422 | #endif |
22423 | #ifdef GET_EVAL_IMPL |
22424 | bool EvalEmitter::emitNoRet(const SourceInfo &L) { |
22425 | if (!isActive()) return true; |
22426 | CurrentSource = L; |
22427 | return NoRet(S, OpPC); |
22428 | } |
22429 | #endif |
22430 | #ifdef GET_OPCODE_NAMES |
22431 | OP_NullPtr, |
22432 | OP_NullFnPtr, |
22433 | OP_NullMemberPtr, |
22434 | #endif |
22435 | #ifdef GET_INTERP |
22436 | case OP_NullPtr: { |
22437 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
22438 | if (!Null<PT_Ptr>(S, OpPC, V0)) |
22439 | return false; |
22440 | continue; |
22441 | } |
22442 | case OP_NullFnPtr: { |
22443 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
22444 | if (!Null<PT_FnPtr>(S, OpPC, V0)) |
22445 | return false; |
22446 | continue; |
22447 | } |
22448 | case OP_NullMemberPtr: { |
22449 | const auto V0 = ReadArg<const Descriptor *>(S, PC); |
22450 | if (!Null<PT_MemberPtr>(S, OpPC, V0)) |
22451 | return false; |
22452 | continue; |
22453 | } |
22454 | #endif |
22455 | #ifdef GET_DISASM |
22456 | case OP_NullPtr: |
22457 | PrintName("NullPtr" ); |
22458 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
22459 | continue; |
22460 | case OP_NullFnPtr: |
22461 | PrintName("NullFnPtr" ); |
22462 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
22463 | continue; |
22464 | case OP_NullMemberPtr: |
22465 | PrintName("NullMemberPtr" ); |
22466 | OS << "\t" << ReadArg<const Descriptor *>(P, PC) << " " << "\n" ; |
22467 | continue; |
22468 | #endif |
22469 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22470 | bool emitNullPtr( const Descriptor * , const SourceInfo &); |
22471 | bool emitNullFnPtr( const Descriptor * , const SourceInfo &); |
22472 | bool emitNullMemberPtr( const Descriptor * , const SourceInfo &); |
22473 | #endif |
22474 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22475 | [[nodiscard]] bool emitNull(PrimType, const Descriptor *, const SourceInfo &I); |
22476 | #endif |
22477 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
22478 | bool |
22479 | #if defined(GET_EVAL_IMPL) |
22480 | EvalEmitter |
22481 | #else |
22482 | ByteCodeEmitter |
22483 | #endif |
22484 | ::emitNull(PrimType T0, const Descriptor * A0, const SourceInfo &I) { |
22485 | switch (T0) { |
22486 | case PT_Ptr: |
22487 | return emitNullPtr(A0, I); |
22488 | case PT_FnPtr: |
22489 | return emitNullFnPtr(A0, I); |
22490 | case PT_MemberPtr: |
22491 | return emitNullMemberPtr(A0, I); |
22492 | default: llvm_unreachable("invalid type: emitNull" ); |
22493 | } |
22494 | llvm_unreachable("invalid enum value" ); |
22495 | } |
22496 | #endif |
22497 | #ifdef GET_LINK_IMPL |
22498 | bool ByteCodeEmitter::emitNullPtr( const Descriptor * A0, const SourceInfo &L) { |
22499 | return emitOp<const Descriptor *>(OP_NullPtr, A0, L); |
22500 | } |
22501 | bool ByteCodeEmitter::emitNullFnPtr( const Descriptor * A0, const SourceInfo &L) { |
22502 | return emitOp<const Descriptor *>(OP_NullFnPtr, A0, L); |
22503 | } |
22504 | bool ByteCodeEmitter::emitNullMemberPtr( const Descriptor * A0, const SourceInfo &L) { |
22505 | return emitOp<const Descriptor *>(OP_NullMemberPtr, A0, L); |
22506 | } |
22507 | #endif |
22508 | #ifdef GET_EVAL_IMPL |
22509 | bool EvalEmitter::emitNullPtr( const Descriptor * A0, const SourceInfo &L) { |
22510 | if (!isActive()) return true; |
22511 | CurrentSource = L; |
22512 | return Null<PT_Ptr>(S, OpPC, A0); |
22513 | } |
22514 | bool EvalEmitter::emitNullFnPtr( const Descriptor * A0, const SourceInfo &L) { |
22515 | if (!isActive()) return true; |
22516 | CurrentSource = L; |
22517 | return Null<PT_FnPtr>(S, OpPC, A0); |
22518 | } |
22519 | bool EvalEmitter::emitNullMemberPtr( const Descriptor * A0, const SourceInfo &L) { |
22520 | if (!isActive()) return true; |
22521 | CurrentSource = L; |
22522 | return Null<PT_MemberPtr>(S, OpPC, A0); |
22523 | } |
22524 | #endif |
22525 | #ifdef GET_OPCODE_NAMES |
22526 | OP_OffsetOfSint8, |
22527 | OP_OffsetOfUint8, |
22528 | OP_OffsetOfSint16, |
22529 | OP_OffsetOfUint16, |
22530 | OP_OffsetOfSint32, |
22531 | OP_OffsetOfUint32, |
22532 | OP_OffsetOfSint64, |
22533 | OP_OffsetOfUint64, |
22534 | OP_OffsetOfIntAP, |
22535 | OP_OffsetOfIntAPS, |
22536 | #endif |
22537 | #ifdef GET_INTERP |
22538 | case OP_OffsetOfSint8: { |
22539 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22540 | if (!OffsetOf<PT_Sint8>(S, OpPC, V0)) |
22541 | return false; |
22542 | continue; |
22543 | } |
22544 | case OP_OffsetOfUint8: { |
22545 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22546 | if (!OffsetOf<PT_Uint8>(S, OpPC, V0)) |
22547 | return false; |
22548 | continue; |
22549 | } |
22550 | case OP_OffsetOfSint16: { |
22551 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22552 | if (!OffsetOf<PT_Sint16>(S, OpPC, V0)) |
22553 | return false; |
22554 | continue; |
22555 | } |
22556 | case OP_OffsetOfUint16: { |
22557 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22558 | if (!OffsetOf<PT_Uint16>(S, OpPC, V0)) |
22559 | return false; |
22560 | continue; |
22561 | } |
22562 | case OP_OffsetOfSint32: { |
22563 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22564 | if (!OffsetOf<PT_Sint32>(S, OpPC, V0)) |
22565 | return false; |
22566 | continue; |
22567 | } |
22568 | case OP_OffsetOfUint32: { |
22569 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22570 | if (!OffsetOf<PT_Uint32>(S, OpPC, V0)) |
22571 | return false; |
22572 | continue; |
22573 | } |
22574 | case OP_OffsetOfSint64: { |
22575 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22576 | if (!OffsetOf<PT_Sint64>(S, OpPC, V0)) |
22577 | return false; |
22578 | continue; |
22579 | } |
22580 | case OP_OffsetOfUint64: { |
22581 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22582 | if (!OffsetOf<PT_Uint64>(S, OpPC, V0)) |
22583 | return false; |
22584 | continue; |
22585 | } |
22586 | case OP_OffsetOfIntAP: { |
22587 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22588 | if (!OffsetOf<PT_IntAP>(S, OpPC, V0)) |
22589 | return false; |
22590 | continue; |
22591 | } |
22592 | case OP_OffsetOfIntAPS: { |
22593 | const auto V0 = ReadArg<const OffsetOfExpr *>(S, PC); |
22594 | if (!OffsetOf<PT_IntAPS>(S, OpPC, V0)) |
22595 | return false; |
22596 | continue; |
22597 | } |
22598 | #endif |
22599 | #ifdef GET_DISASM |
22600 | case OP_OffsetOfSint8: |
22601 | PrintName("OffsetOfSint8" ); |
22602 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22603 | continue; |
22604 | case OP_OffsetOfUint8: |
22605 | PrintName("OffsetOfUint8" ); |
22606 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22607 | continue; |
22608 | case OP_OffsetOfSint16: |
22609 | PrintName("OffsetOfSint16" ); |
22610 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22611 | continue; |
22612 | case OP_OffsetOfUint16: |
22613 | PrintName("OffsetOfUint16" ); |
22614 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22615 | continue; |
22616 | case OP_OffsetOfSint32: |
22617 | PrintName("OffsetOfSint32" ); |
22618 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22619 | continue; |
22620 | case OP_OffsetOfUint32: |
22621 | PrintName("OffsetOfUint32" ); |
22622 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22623 | continue; |
22624 | case OP_OffsetOfSint64: |
22625 | PrintName("OffsetOfSint64" ); |
22626 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22627 | continue; |
22628 | case OP_OffsetOfUint64: |
22629 | PrintName("OffsetOfUint64" ); |
22630 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22631 | continue; |
22632 | case OP_OffsetOfIntAP: |
22633 | PrintName("OffsetOfIntAP" ); |
22634 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22635 | continue; |
22636 | case OP_OffsetOfIntAPS: |
22637 | PrintName("OffsetOfIntAPS" ); |
22638 | OS << "\t" << ReadArg<const OffsetOfExpr *>(P, PC) << " " << "\n" ; |
22639 | continue; |
22640 | #endif |
22641 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22642 | bool emitOffsetOfSint8( const OffsetOfExpr * , const SourceInfo &); |
22643 | bool emitOffsetOfUint8( const OffsetOfExpr * , const SourceInfo &); |
22644 | bool emitOffsetOfSint16( const OffsetOfExpr * , const SourceInfo &); |
22645 | bool emitOffsetOfUint16( const OffsetOfExpr * , const SourceInfo &); |
22646 | bool emitOffsetOfSint32( const OffsetOfExpr * , const SourceInfo &); |
22647 | bool emitOffsetOfUint32( const OffsetOfExpr * , const SourceInfo &); |
22648 | bool emitOffsetOfSint64( const OffsetOfExpr * , const SourceInfo &); |
22649 | bool emitOffsetOfUint64( const OffsetOfExpr * , const SourceInfo &); |
22650 | bool emitOffsetOfIntAP( const OffsetOfExpr * , const SourceInfo &); |
22651 | bool emitOffsetOfIntAPS( const OffsetOfExpr * , const SourceInfo &); |
22652 | #endif |
22653 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22654 | [[nodiscard]] bool emitOffsetOf(PrimType, const OffsetOfExpr *, const SourceInfo &I); |
22655 | #endif |
22656 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
22657 | bool |
22658 | #if defined(GET_EVAL_IMPL) |
22659 | EvalEmitter |
22660 | #else |
22661 | ByteCodeEmitter |
22662 | #endif |
22663 | ::emitOffsetOf(PrimType T0, const OffsetOfExpr * A0, const SourceInfo &I) { |
22664 | switch (T0) { |
22665 | case PT_Sint8: |
22666 | return emitOffsetOfSint8(A0, I); |
22667 | case PT_Uint8: |
22668 | return emitOffsetOfUint8(A0, I); |
22669 | case PT_Sint16: |
22670 | return emitOffsetOfSint16(A0, I); |
22671 | case PT_Uint16: |
22672 | return emitOffsetOfUint16(A0, I); |
22673 | case PT_Sint32: |
22674 | return emitOffsetOfSint32(A0, I); |
22675 | case PT_Uint32: |
22676 | return emitOffsetOfUint32(A0, I); |
22677 | case PT_Sint64: |
22678 | return emitOffsetOfSint64(A0, I); |
22679 | case PT_Uint64: |
22680 | return emitOffsetOfUint64(A0, I); |
22681 | case PT_IntAP: |
22682 | return emitOffsetOfIntAP(A0, I); |
22683 | case PT_IntAPS: |
22684 | return emitOffsetOfIntAPS(A0, I); |
22685 | default: llvm_unreachable("invalid type: emitOffsetOf" ); |
22686 | } |
22687 | llvm_unreachable("invalid enum value" ); |
22688 | } |
22689 | #endif |
22690 | #ifdef GET_LINK_IMPL |
22691 | bool ByteCodeEmitter::emitOffsetOfSint8( const OffsetOfExpr * A0, const SourceInfo &L) { |
22692 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfSint8, A0, L); |
22693 | } |
22694 | bool ByteCodeEmitter::emitOffsetOfUint8( const OffsetOfExpr * A0, const SourceInfo &L) { |
22695 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfUint8, A0, L); |
22696 | } |
22697 | bool ByteCodeEmitter::emitOffsetOfSint16( const OffsetOfExpr * A0, const SourceInfo &L) { |
22698 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfSint16, A0, L); |
22699 | } |
22700 | bool ByteCodeEmitter::emitOffsetOfUint16( const OffsetOfExpr * A0, const SourceInfo &L) { |
22701 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfUint16, A0, L); |
22702 | } |
22703 | bool ByteCodeEmitter::emitOffsetOfSint32( const OffsetOfExpr * A0, const SourceInfo &L) { |
22704 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfSint32, A0, L); |
22705 | } |
22706 | bool ByteCodeEmitter::emitOffsetOfUint32( const OffsetOfExpr * A0, const SourceInfo &L) { |
22707 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfUint32, A0, L); |
22708 | } |
22709 | bool ByteCodeEmitter::emitOffsetOfSint64( const OffsetOfExpr * A0, const SourceInfo &L) { |
22710 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfSint64, A0, L); |
22711 | } |
22712 | bool ByteCodeEmitter::emitOffsetOfUint64( const OffsetOfExpr * A0, const SourceInfo &L) { |
22713 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfUint64, A0, L); |
22714 | } |
22715 | bool ByteCodeEmitter::emitOffsetOfIntAP( const OffsetOfExpr * A0, const SourceInfo &L) { |
22716 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfIntAP, A0, L); |
22717 | } |
22718 | bool ByteCodeEmitter::emitOffsetOfIntAPS( const OffsetOfExpr * A0, const SourceInfo &L) { |
22719 | return emitOp<const OffsetOfExpr *>(OP_OffsetOfIntAPS, A0, L); |
22720 | } |
22721 | #endif |
22722 | #ifdef GET_EVAL_IMPL |
22723 | bool EvalEmitter::emitOffsetOfSint8( const OffsetOfExpr * A0, const SourceInfo &L) { |
22724 | if (!isActive()) return true; |
22725 | CurrentSource = L; |
22726 | return OffsetOf<PT_Sint8>(S, OpPC, A0); |
22727 | } |
22728 | bool EvalEmitter::emitOffsetOfUint8( const OffsetOfExpr * A0, const SourceInfo &L) { |
22729 | if (!isActive()) return true; |
22730 | CurrentSource = L; |
22731 | return OffsetOf<PT_Uint8>(S, OpPC, A0); |
22732 | } |
22733 | bool EvalEmitter::emitOffsetOfSint16( const OffsetOfExpr * A0, const SourceInfo &L) { |
22734 | if (!isActive()) return true; |
22735 | CurrentSource = L; |
22736 | return OffsetOf<PT_Sint16>(S, OpPC, A0); |
22737 | } |
22738 | bool EvalEmitter::emitOffsetOfUint16( const OffsetOfExpr * A0, const SourceInfo &L) { |
22739 | if (!isActive()) return true; |
22740 | CurrentSource = L; |
22741 | return OffsetOf<PT_Uint16>(S, OpPC, A0); |
22742 | } |
22743 | bool EvalEmitter::emitOffsetOfSint32( const OffsetOfExpr * A0, const SourceInfo &L) { |
22744 | if (!isActive()) return true; |
22745 | CurrentSource = L; |
22746 | return OffsetOf<PT_Sint32>(S, OpPC, A0); |
22747 | } |
22748 | bool EvalEmitter::emitOffsetOfUint32( const OffsetOfExpr * A0, const SourceInfo &L) { |
22749 | if (!isActive()) return true; |
22750 | CurrentSource = L; |
22751 | return OffsetOf<PT_Uint32>(S, OpPC, A0); |
22752 | } |
22753 | bool EvalEmitter::emitOffsetOfSint64( const OffsetOfExpr * A0, const SourceInfo &L) { |
22754 | if (!isActive()) return true; |
22755 | CurrentSource = L; |
22756 | return OffsetOf<PT_Sint64>(S, OpPC, A0); |
22757 | } |
22758 | bool EvalEmitter::emitOffsetOfUint64( const OffsetOfExpr * A0, const SourceInfo &L) { |
22759 | if (!isActive()) return true; |
22760 | CurrentSource = L; |
22761 | return OffsetOf<PT_Uint64>(S, OpPC, A0); |
22762 | } |
22763 | bool EvalEmitter::emitOffsetOfIntAP( const OffsetOfExpr * A0, const SourceInfo &L) { |
22764 | if (!isActive()) return true; |
22765 | CurrentSource = L; |
22766 | return OffsetOf<PT_IntAP>(S, OpPC, A0); |
22767 | } |
22768 | bool EvalEmitter::emitOffsetOfIntAPS( const OffsetOfExpr * A0, const SourceInfo &L) { |
22769 | if (!isActive()) return true; |
22770 | CurrentSource = L; |
22771 | return OffsetOf<PT_IntAPS>(S, OpPC, A0); |
22772 | } |
22773 | #endif |
22774 | #ifdef GET_OPCODE_NAMES |
22775 | OP_PopSint8, |
22776 | OP_PopUint8, |
22777 | OP_PopSint16, |
22778 | OP_PopUint16, |
22779 | OP_PopSint32, |
22780 | OP_PopUint32, |
22781 | OP_PopSint64, |
22782 | OP_PopUint64, |
22783 | OP_PopIntAP, |
22784 | OP_PopIntAPS, |
22785 | OP_PopBool, |
22786 | OP_PopPtr, |
22787 | OP_PopFnPtr, |
22788 | OP_PopMemberPtr, |
22789 | OP_PopFloat, |
22790 | #endif |
22791 | #ifdef GET_INTERP |
22792 | case OP_PopSint8: { |
22793 | if (!Pop<PT_Sint8>(S, OpPC)) |
22794 | return false; |
22795 | continue; |
22796 | } |
22797 | case OP_PopUint8: { |
22798 | if (!Pop<PT_Uint8>(S, OpPC)) |
22799 | return false; |
22800 | continue; |
22801 | } |
22802 | case OP_PopSint16: { |
22803 | if (!Pop<PT_Sint16>(S, OpPC)) |
22804 | return false; |
22805 | continue; |
22806 | } |
22807 | case OP_PopUint16: { |
22808 | if (!Pop<PT_Uint16>(S, OpPC)) |
22809 | return false; |
22810 | continue; |
22811 | } |
22812 | case OP_PopSint32: { |
22813 | if (!Pop<PT_Sint32>(S, OpPC)) |
22814 | return false; |
22815 | continue; |
22816 | } |
22817 | case OP_PopUint32: { |
22818 | if (!Pop<PT_Uint32>(S, OpPC)) |
22819 | return false; |
22820 | continue; |
22821 | } |
22822 | case OP_PopSint64: { |
22823 | if (!Pop<PT_Sint64>(S, OpPC)) |
22824 | return false; |
22825 | continue; |
22826 | } |
22827 | case OP_PopUint64: { |
22828 | if (!Pop<PT_Uint64>(S, OpPC)) |
22829 | return false; |
22830 | continue; |
22831 | } |
22832 | case OP_PopIntAP: { |
22833 | if (!Pop<PT_IntAP>(S, OpPC)) |
22834 | return false; |
22835 | continue; |
22836 | } |
22837 | case OP_PopIntAPS: { |
22838 | if (!Pop<PT_IntAPS>(S, OpPC)) |
22839 | return false; |
22840 | continue; |
22841 | } |
22842 | case OP_PopBool: { |
22843 | if (!Pop<PT_Bool>(S, OpPC)) |
22844 | return false; |
22845 | continue; |
22846 | } |
22847 | case OP_PopPtr: { |
22848 | if (!Pop<PT_Ptr>(S, OpPC)) |
22849 | return false; |
22850 | continue; |
22851 | } |
22852 | case OP_PopFnPtr: { |
22853 | if (!Pop<PT_FnPtr>(S, OpPC)) |
22854 | return false; |
22855 | continue; |
22856 | } |
22857 | case OP_PopMemberPtr: { |
22858 | if (!Pop<PT_MemberPtr>(S, OpPC)) |
22859 | return false; |
22860 | continue; |
22861 | } |
22862 | case OP_PopFloat: { |
22863 | if (!Pop<PT_Float>(S, OpPC)) |
22864 | return false; |
22865 | continue; |
22866 | } |
22867 | #endif |
22868 | #ifdef GET_DISASM |
22869 | case OP_PopSint8: |
22870 | PrintName("PopSint8" ); |
22871 | OS << "\t" << "\n" ; |
22872 | continue; |
22873 | case OP_PopUint8: |
22874 | PrintName("PopUint8" ); |
22875 | OS << "\t" << "\n" ; |
22876 | continue; |
22877 | case OP_PopSint16: |
22878 | PrintName("PopSint16" ); |
22879 | OS << "\t" << "\n" ; |
22880 | continue; |
22881 | case OP_PopUint16: |
22882 | PrintName("PopUint16" ); |
22883 | OS << "\t" << "\n" ; |
22884 | continue; |
22885 | case OP_PopSint32: |
22886 | PrintName("PopSint32" ); |
22887 | OS << "\t" << "\n" ; |
22888 | continue; |
22889 | case OP_PopUint32: |
22890 | PrintName("PopUint32" ); |
22891 | OS << "\t" << "\n" ; |
22892 | continue; |
22893 | case OP_PopSint64: |
22894 | PrintName("PopSint64" ); |
22895 | OS << "\t" << "\n" ; |
22896 | continue; |
22897 | case OP_PopUint64: |
22898 | PrintName("PopUint64" ); |
22899 | OS << "\t" << "\n" ; |
22900 | continue; |
22901 | case OP_PopIntAP: |
22902 | PrintName("PopIntAP" ); |
22903 | OS << "\t" << "\n" ; |
22904 | continue; |
22905 | case OP_PopIntAPS: |
22906 | PrintName("PopIntAPS" ); |
22907 | OS << "\t" << "\n" ; |
22908 | continue; |
22909 | case OP_PopBool: |
22910 | PrintName("PopBool" ); |
22911 | OS << "\t" << "\n" ; |
22912 | continue; |
22913 | case OP_PopPtr: |
22914 | PrintName("PopPtr" ); |
22915 | OS << "\t" << "\n" ; |
22916 | continue; |
22917 | case OP_PopFnPtr: |
22918 | PrintName("PopFnPtr" ); |
22919 | OS << "\t" << "\n" ; |
22920 | continue; |
22921 | case OP_PopMemberPtr: |
22922 | PrintName("PopMemberPtr" ); |
22923 | OS << "\t" << "\n" ; |
22924 | continue; |
22925 | case OP_PopFloat: |
22926 | PrintName("PopFloat" ); |
22927 | OS << "\t" << "\n" ; |
22928 | continue; |
22929 | #endif |
22930 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22931 | bool emitPopSint8(const SourceInfo &); |
22932 | bool emitPopUint8(const SourceInfo &); |
22933 | bool emitPopSint16(const SourceInfo &); |
22934 | bool emitPopUint16(const SourceInfo &); |
22935 | bool emitPopSint32(const SourceInfo &); |
22936 | bool emitPopUint32(const SourceInfo &); |
22937 | bool emitPopSint64(const SourceInfo &); |
22938 | bool emitPopUint64(const SourceInfo &); |
22939 | bool emitPopIntAP(const SourceInfo &); |
22940 | bool emitPopIntAPS(const SourceInfo &); |
22941 | bool emitPopBool(const SourceInfo &); |
22942 | bool emitPopPtr(const SourceInfo &); |
22943 | bool emitPopFnPtr(const SourceInfo &); |
22944 | bool emitPopMemberPtr(const SourceInfo &); |
22945 | bool emitPopFloat(const SourceInfo &); |
22946 | #endif |
22947 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
22948 | [[nodiscard]] bool emitPop(PrimType, const SourceInfo &I); |
22949 | #endif |
22950 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
22951 | bool |
22952 | #if defined(GET_EVAL_IMPL) |
22953 | EvalEmitter |
22954 | #else |
22955 | ByteCodeEmitter |
22956 | #endif |
22957 | ::emitPop(PrimType T0, const SourceInfo &I) { |
22958 | switch (T0) { |
22959 | case PT_Sint8: |
22960 | return emitPopSint8(I); |
22961 | case PT_Uint8: |
22962 | return emitPopUint8(I); |
22963 | case PT_Sint16: |
22964 | return emitPopSint16(I); |
22965 | case PT_Uint16: |
22966 | return emitPopUint16(I); |
22967 | case PT_Sint32: |
22968 | return emitPopSint32(I); |
22969 | case PT_Uint32: |
22970 | return emitPopUint32(I); |
22971 | case PT_Sint64: |
22972 | return emitPopSint64(I); |
22973 | case PT_Uint64: |
22974 | return emitPopUint64(I); |
22975 | case PT_IntAP: |
22976 | return emitPopIntAP(I); |
22977 | case PT_IntAPS: |
22978 | return emitPopIntAPS(I); |
22979 | case PT_Bool: |
22980 | return emitPopBool(I); |
22981 | case PT_Ptr: |
22982 | return emitPopPtr(I); |
22983 | case PT_FnPtr: |
22984 | return emitPopFnPtr(I); |
22985 | case PT_MemberPtr: |
22986 | return emitPopMemberPtr(I); |
22987 | case PT_Float: |
22988 | return emitPopFloat(I); |
22989 | } |
22990 | llvm_unreachable("invalid enum value" ); |
22991 | } |
22992 | #endif |
22993 | #ifdef GET_LINK_IMPL |
22994 | bool ByteCodeEmitter::emitPopSint8(const SourceInfo &L) { |
22995 | return emitOp<>(OP_PopSint8, L); |
22996 | } |
22997 | bool ByteCodeEmitter::emitPopUint8(const SourceInfo &L) { |
22998 | return emitOp<>(OP_PopUint8, L); |
22999 | } |
23000 | bool ByteCodeEmitter::emitPopSint16(const SourceInfo &L) { |
23001 | return emitOp<>(OP_PopSint16, L); |
23002 | } |
23003 | bool ByteCodeEmitter::emitPopUint16(const SourceInfo &L) { |
23004 | return emitOp<>(OP_PopUint16, L); |
23005 | } |
23006 | bool ByteCodeEmitter::emitPopSint32(const SourceInfo &L) { |
23007 | return emitOp<>(OP_PopSint32, L); |
23008 | } |
23009 | bool ByteCodeEmitter::emitPopUint32(const SourceInfo &L) { |
23010 | return emitOp<>(OP_PopUint32, L); |
23011 | } |
23012 | bool ByteCodeEmitter::emitPopSint64(const SourceInfo &L) { |
23013 | return emitOp<>(OP_PopSint64, L); |
23014 | } |
23015 | bool ByteCodeEmitter::emitPopUint64(const SourceInfo &L) { |
23016 | return emitOp<>(OP_PopUint64, L); |
23017 | } |
23018 | bool ByteCodeEmitter::emitPopIntAP(const SourceInfo &L) { |
23019 | return emitOp<>(OP_PopIntAP, L); |
23020 | } |
23021 | bool ByteCodeEmitter::emitPopIntAPS(const SourceInfo &L) { |
23022 | return emitOp<>(OP_PopIntAPS, L); |
23023 | } |
23024 | bool ByteCodeEmitter::emitPopBool(const SourceInfo &L) { |
23025 | return emitOp<>(OP_PopBool, L); |
23026 | } |
23027 | bool ByteCodeEmitter::emitPopPtr(const SourceInfo &L) { |
23028 | return emitOp<>(OP_PopPtr, L); |
23029 | } |
23030 | bool ByteCodeEmitter::emitPopFnPtr(const SourceInfo &L) { |
23031 | return emitOp<>(OP_PopFnPtr, L); |
23032 | } |
23033 | bool ByteCodeEmitter::emitPopMemberPtr(const SourceInfo &L) { |
23034 | return emitOp<>(OP_PopMemberPtr, L); |
23035 | } |
23036 | bool ByteCodeEmitter::emitPopFloat(const SourceInfo &L) { |
23037 | return emitOp<>(OP_PopFloat, L); |
23038 | } |
23039 | #endif |
23040 | #ifdef GET_EVAL_IMPL |
23041 | bool EvalEmitter::emitPopSint8(const SourceInfo &L) { |
23042 | if (!isActive()) return true; |
23043 | CurrentSource = L; |
23044 | return Pop<PT_Sint8>(S, OpPC); |
23045 | } |
23046 | bool EvalEmitter::emitPopUint8(const SourceInfo &L) { |
23047 | if (!isActive()) return true; |
23048 | CurrentSource = L; |
23049 | return Pop<PT_Uint8>(S, OpPC); |
23050 | } |
23051 | bool EvalEmitter::emitPopSint16(const SourceInfo &L) { |
23052 | if (!isActive()) return true; |
23053 | CurrentSource = L; |
23054 | return Pop<PT_Sint16>(S, OpPC); |
23055 | } |
23056 | bool EvalEmitter::emitPopUint16(const SourceInfo &L) { |
23057 | if (!isActive()) return true; |
23058 | CurrentSource = L; |
23059 | return Pop<PT_Uint16>(S, OpPC); |
23060 | } |
23061 | bool EvalEmitter::emitPopSint32(const SourceInfo &L) { |
23062 | if (!isActive()) return true; |
23063 | CurrentSource = L; |
23064 | return Pop<PT_Sint32>(S, OpPC); |
23065 | } |
23066 | bool EvalEmitter::emitPopUint32(const SourceInfo &L) { |
23067 | if (!isActive()) return true; |
23068 | CurrentSource = L; |
23069 | return Pop<PT_Uint32>(S, OpPC); |
23070 | } |
23071 | bool EvalEmitter::emitPopSint64(const SourceInfo &L) { |
23072 | if (!isActive()) return true; |
23073 | CurrentSource = L; |
23074 | return Pop<PT_Sint64>(S, OpPC); |
23075 | } |
23076 | bool EvalEmitter::emitPopUint64(const SourceInfo &L) { |
23077 | if (!isActive()) return true; |
23078 | CurrentSource = L; |
23079 | return Pop<PT_Uint64>(S, OpPC); |
23080 | } |
23081 | bool EvalEmitter::emitPopIntAP(const SourceInfo &L) { |
23082 | if (!isActive()) return true; |
23083 | CurrentSource = L; |
23084 | return Pop<PT_IntAP>(S, OpPC); |
23085 | } |
23086 | bool EvalEmitter::emitPopIntAPS(const SourceInfo &L) { |
23087 | if (!isActive()) return true; |
23088 | CurrentSource = L; |
23089 | return Pop<PT_IntAPS>(S, OpPC); |
23090 | } |
23091 | bool EvalEmitter::emitPopBool(const SourceInfo &L) { |
23092 | if (!isActive()) return true; |
23093 | CurrentSource = L; |
23094 | return Pop<PT_Bool>(S, OpPC); |
23095 | } |
23096 | bool EvalEmitter::emitPopPtr(const SourceInfo &L) { |
23097 | if (!isActive()) return true; |
23098 | CurrentSource = L; |
23099 | return Pop<PT_Ptr>(S, OpPC); |
23100 | } |
23101 | bool EvalEmitter::emitPopFnPtr(const SourceInfo &L) { |
23102 | if (!isActive()) return true; |
23103 | CurrentSource = L; |
23104 | return Pop<PT_FnPtr>(S, OpPC); |
23105 | } |
23106 | bool EvalEmitter::emitPopMemberPtr(const SourceInfo &L) { |
23107 | if (!isActive()) return true; |
23108 | CurrentSource = L; |
23109 | return Pop<PT_MemberPtr>(S, OpPC); |
23110 | } |
23111 | bool EvalEmitter::emitPopFloat(const SourceInfo &L) { |
23112 | if (!isActive()) return true; |
23113 | CurrentSource = L; |
23114 | return Pop<PT_Float>(S, OpPC); |
23115 | } |
23116 | #endif |
23117 | #ifdef GET_OPCODE_NAMES |
23118 | OP_PtrPtrCast, |
23119 | #endif |
23120 | #ifdef GET_INTERP |
23121 | case OP_PtrPtrCast: { |
23122 | const auto V0 = ReadArg<bool>(S, PC); |
23123 | if (!PtrPtrCast(S, OpPC, V0)) |
23124 | return false; |
23125 | continue; |
23126 | } |
23127 | #endif |
23128 | #ifdef GET_DISASM |
23129 | case OP_PtrPtrCast: |
23130 | PrintName("PtrPtrCast" ); |
23131 | OS << "\t" << ReadArg<bool>(P, PC) << " " << "\n" ; |
23132 | continue; |
23133 | #endif |
23134 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23135 | bool emitPtrPtrCast( bool , const SourceInfo &); |
23136 | #endif |
23137 | #ifdef GET_LINK_IMPL |
23138 | bool ByteCodeEmitter::emitPtrPtrCast( bool A0, const SourceInfo &L) { |
23139 | return emitOp<bool>(OP_PtrPtrCast, A0, L); |
23140 | } |
23141 | #endif |
23142 | #ifdef GET_EVAL_IMPL |
23143 | bool EvalEmitter::emitPtrPtrCast( bool A0, const SourceInfo &L) { |
23144 | if (!isActive()) return true; |
23145 | CurrentSource = L; |
23146 | return PtrPtrCast(S, OpPC, A0); |
23147 | } |
23148 | #endif |
23149 | #ifdef GET_OPCODE_NAMES |
23150 | OP_RVOPtr, |
23151 | #endif |
23152 | #ifdef GET_INTERP |
23153 | case OP_RVOPtr: { |
23154 | if (!RVOPtr(S, OpPC)) |
23155 | return false; |
23156 | continue; |
23157 | } |
23158 | #endif |
23159 | #ifdef GET_DISASM |
23160 | case OP_RVOPtr: |
23161 | PrintName("RVOPtr" ); |
23162 | OS << "\t" << "\n" ; |
23163 | continue; |
23164 | #endif |
23165 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23166 | bool emitRVOPtr(const SourceInfo &); |
23167 | #endif |
23168 | #ifdef GET_LINK_IMPL |
23169 | bool ByteCodeEmitter::emitRVOPtr(const SourceInfo &L) { |
23170 | return emitOp<>(OP_RVOPtr, L); |
23171 | } |
23172 | #endif |
23173 | #ifdef GET_EVAL_IMPL |
23174 | bool EvalEmitter::emitRVOPtr(const SourceInfo &L) { |
23175 | if (!isActive()) return true; |
23176 | CurrentSource = L; |
23177 | return RVOPtr(S, OpPC); |
23178 | } |
23179 | #endif |
23180 | #ifdef GET_OPCODE_NAMES |
23181 | OP_RemSint8, |
23182 | OP_RemUint8, |
23183 | OP_RemSint16, |
23184 | OP_RemUint16, |
23185 | OP_RemSint32, |
23186 | OP_RemUint32, |
23187 | OP_RemSint64, |
23188 | OP_RemUint64, |
23189 | OP_RemIntAP, |
23190 | OP_RemIntAPS, |
23191 | #endif |
23192 | #ifdef GET_INTERP |
23193 | case OP_RemSint8: { |
23194 | if (!Rem<PT_Sint8>(S, OpPC)) |
23195 | return false; |
23196 | continue; |
23197 | } |
23198 | case OP_RemUint8: { |
23199 | if (!Rem<PT_Uint8>(S, OpPC)) |
23200 | return false; |
23201 | continue; |
23202 | } |
23203 | case OP_RemSint16: { |
23204 | if (!Rem<PT_Sint16>(S, OpPC)) |
23205 | return false; |
23206 | continue; |
23207 | } |
23208 | case OP_RemUint16: { |
23209 | if (!Rem<PT_Uint16>(S, OpPC)) |
23210 | return false; |
23211 | continue; |
23212 | } |
23213 | case OP_RemSint32: { |
23214 | if (!Rem<PT_Sint32>(S, OpPC)) |
23215 | return false; |
23216 | continue; |
23217 | } |
23218 | case OP_RemUint32: { |
23219 | if (!Rem<PT_Uint32>(S, OpPC)) |
23220 | return false; |
23221 | continue; |
23222 | } |
23223 | case OP_RemSint64: { |
23224 | if (!Rem<PT_Sint64>(S, OpPC)) |
23225 | return false; |
23226 | continue; |
23227 | } |
23228 | case OP_RemUint64: { |
23229 | if (!Rem<PT_Uint64>(S, OpPC)) |
23230 | return false; |
23231 | continue; |
23232 | } |
23233 | case OP_RemIntAP: { |
23234 | if (!Rem<PT_IntAP>(S, OpPC)) |
23235 | return false; |
23236 | continue; |
23237 | } |
23238 | case OP_RemIntAPS: { |
23239 | if (!Rem<PT_IntAPS>(S, OpPC)) |
23240 | return false; |
23241 | continue; |
23242 | } |
23243 | #endif |
23244 | #ifdef GET_DISASM |
23245 | case OP_RemSint8: |
23246 | PrintName("RemSint8" ); |
23247 | OS << "\t" << "\n" ; |
23248 | continue; |
23249 | case OP_RemUint8: |
23250 | PrintName("RemUint8" ); |
23251 | OS << "\t" << "\n" ; |
23252 | continue; |
23253 | case OP_RemSint16: |
23254 | PrintName("RemSint16" ); |
23255 | OS << "\t" << "\n" ; |
23256 | continue; |
23257 | case OP_RemUint16: |
23258 | PrintName("RemUint16" ); |
23259 | OS << "\t" << "\n" ; |
23260 | continue; |
23261 | case OP_RemSint32: |
23262 | PrintName("RemSint32" ); |
23263 | OS << "\t" << "\n" ; |
23264 | continue; |
23265 | case OP_RemUint32: |
23266 | PrintName("RemUint32" ); |
23267 | OS << "\t" << "\n" ; |
23268 | continue; |
23269 | case OP_RemSint64: |
23270 | PrintName("RemSint64" ); |
23271 | OS << "\t" << "\n" ; |
23272 | continue; |
23273 | case OP_RemUint64: |
23274 | PrintName("RemUint64" ); |
23275 | OS << "\t" << "\n" ; |
23276 | continue; |
23277 | case OP_RemIntAP: |
23278 | PrintName("RemIntAP" ); |
23279 | OS << "\t" << "\n" ; |
23280 | continue; |
23281 | case OP_RemIntAPS: |
23282 | PrintName("RemIntAPS" ); |
23283 | OS << "\t" << "\n" ; |
23284 | continue; |
23285 | #endif |
23286 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23287 | bool emitRemSint8(const SourceInfo &); |
23288 | bool emitRemUint8(const SourceInfo &); |
23289 | bool emitRemSint16(const SourceInfo &); |
23290 | bool emitRemUint16(const SourceInfo &); |
23291 | bool emitRemSint32(const SourceInfo &); |
23292 | bool emitRemUint32(const SourceInfo &); |
23293 | bool emitRemSint64(const SourceInfo &); |
23294 | bool emitRemUint64(const SourceInfo &); |
23295 | bool emitRemIntAP(const SourceInfo &); |
23296 | bool emitRemIntAPS(const SourceInfo &); |
23297 | #endif |
23298 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23299 | [[nodiscard]] bool emitRem(PrimType, const SourceInfo &I); |
23300 | #endif |
23301 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
23302 | bool |
23303 | #if defined(GET_EVAL_IMPL) |
23304 | EvalEmitter |
23305 | #else |
23306 | ByteCodeEmitter |
23307 | #endif |
23308 | ::emitRem(PrimType T0, const SourceInfo &I) { |
23309 | switch (T0) { |
23310 | case PT_Sint8: |
23311 | return emitRemSint8(I); |
23312 | case PT_Uint8: |
23313 | return emitRemUint8(I); |
23314 | case PT_Sint16: |
23315 | return emitRemSint16(I); |
23316 | case PT_Uint16: |
23317 | return emitRemUint16(I); |
23318 | case PT_Sint32: |
23319 | return emitRemSint32(I); |
23320 | case PT_Uint32: |
23321 | return emitRemUint32(I); |
23322 | case PT_Sint64: |
23323 | return emitRemSint64(I); |
23324 | case PT_Uint64: |
23325 | return emitRemUint64(I); |
23326 | case PT_IntAP: |
23327 | return emitRemIntAP(I); |
23328 | case PT_IntAPS: |
23329 | return emitRemIntAPS(I); |
23330 | default: llvm_unreachable("invalid type: emitRem" ); |
23331 | } |
23332 | llvm_unreachable("invalid enum value" ); |
23333 | } |
23334 | #endif |
23335 | #ifdef GET_LINK_IMPL |
23336 | bool ByteCodeEmitter::emitRemSint8(const SourceInfo &L) { |
23337 | return emitOp<>(OP_RemSint8, L); |
23338 | } |
23339 | bool ByteCodeEmitter::emitRemUint8(const SourceInfo &L) { |
23340 | return emitOp<>(OP_RemUint8, L); |
23341 | } |
23342 | bool ByteCodeEmitter::emitRemSint16(const SourceInfo &L) { |
23343 | return emitOp<>(OP_RemSint16, L); |
23344 | } |
23345 | bool ByteCodeEmitter::emitRemUint16(const SourceInfo &L) { |
23346 | return emitOp<>(OP_RemUint16, L); |
23347 | } |
23348 | bool ByteCodeEmitter::emitRemSint32(const SourceInfo &L) { |
23349 | return emitOp<>(OP_RemSint32, L); |
23350 | } |
23351 | bool ByteCodeEmitter::emitRemUint32(const SourceInfo &L) { |
23352 | return emitOp<>(OP_RemUint32, L); |
23353 | } |
23354 | bool ByteCodeEmitter::emitRemSint64(const SourceInfo &L) { |
23355 | return emitOp<>(OP_RemSint64, L); |
23356 | } |
23357 | bool ByteCodeEmitter::emitRemUint64(const SourceInfo &L) { |
23358 | return emitOp<>(OP_RemUint64, L); |
23359 | } |
23360 | bool ByteCodeEmitter::emitRemIntAP(const SourceInfo &L) { |
23361 | return emitOp<>(OP_RemIntAP, L); |
23362 | } |
23363 | bool ByteCodeEmitter::emitRemIntAPS(const SourceInfo &L) { |
23364 | return emitOp<>(OP_RemIntAPS, L); |
23365 | } |
23366 | #endif |
23367 | #ifdef GET_EVAL_IMPL |
23368 | bool EvalEmitter::emitRemSint8(const SourceInfo &L) { |
23369 | if (!isActive()) return true; |
23370 | CurrentSource = L; |
23371 | return Rem<PT_Sint8>(S, OpPC); |
23372 | } |
23373 | bool EvalEmitter::emitRemUint8(const SourceInfo &L) { |
23374 | if (!isActive()) return true; |
23375 | CurrentSource = L; |
23376 | return Rem<PT_Uint8>(S, OpPC); |
23377 | } |
23378 | bool EvalEmitter::emitRemSint16(const SourceInfo &L) { |
23379 | if (!isActive()) return true; |
23380 | CurrentSource = L; |
23381 | return Rem<PT_Sint16>(S, OpPC); |
23382 | } |
23383 | bool EvalEmitter::emitRemUint16(const SourceInfo &L) { |
23384 | if (!isActive()) return true; |
23385 | CurrentSource = L; |
23386 | return Rem<PT_Uint16>(S, OpPC); |
23387 | } |
23388 | bool EvalEmitter::emitRemSint32(const SourceInfo &L) { |
23389 | if (!isActive()) return true; |
23390 | CurrentSource = L; |
23391 | return Rem<PT_Sint32>(S, OpPC); |
23392 | } |
23393 | bool EvalEmitter::emitRemUint32(const SourceInfo &L) { |
23394 | if (!isActive()) return true; |
23395 | CurrentSource = L; |
23396 | return Rem<PT_Uint32>(S, OpPC); |
23397 | } |
23398 | bool EvalEmitter::emitRemSint64(const SourceInfo &L) { |
23399 | if (!isActive()) return true; |
23400 | CurrentSource = L; |
23401 | return Rem<PT_Sint64>(S, OpPC); |
23402 | } |
23403 | bool EvalEmitter::emitRemUint64(const SourceInfo &L) { |
23404 | if (!isActive()) return true; |
23405 | CurrentSource = L; |
23406 | return Rem<PT_Uint64>(S, OpPC); |
23407 | } |
23408 | bool EvalEmitter::emitRemIntAP(const SourceInfo &L) { |
23409 | if (!isActive()) return true; |
23410 | CurrentSource = L; |
23411 | return Rem<PT_IntAP>(S, OpPC); |
23412 | } |
23413 | bool EvalEmitter::emitRemIntAPS(const SourceInfo &L) { |
23414 | if (!isActive()) return true; |
23415 | CurrentSource = L; |
23416 | return Rem<PT_IntAPS>(S, OpPC); |
23417 | } |
23418 | #endif |
23419 | #ifdef GET_OPCODE_NAMES |
23420 | OP_RetSint8, |
23421 | OP_RetUint8, |
23422 | OP_RetSint16, |
23423 | OP_RetUint16, |
23424 | OP_RetSint32, |
23425 | OP_RetUint32, |
23426 | OP_RetSint64, |
23427 | OP_RetUint64, |
23428 | OP_RetIntAP, |
23429 | OP_RetIntAPS, |
23430 | OP_RetBool, |
23431 | OP_RetPtr, |
23432 | OP_RetFnPtr, |
23433 | OP_RetMemberPtr, |
23434 | OP_RetFloat, |
23435 | #endif |
23436 | #ifdef GET_INTERP |
23437 | case OP_RetSint8: { |
23438 | bool DoReturn = (S.Current == StartFrame); |
23439 | if (!Ret<PT_Sint8>(S, PC, Result)) |
23440 | return false; |
23441 | if (!S.Current || S.Current->isRoot()) |
23442 | return true; |
23443 | if (DoReturn) |
23444 | return true; |
23445 | continue; |
23446 | } |
23447 | case OP_RetUint8: { |
23448 | bool DoReturn = (S.Current == StartFrame); |
23449 | if (!Ret<PT_Uint8>(S, PC, Result)) |
23450 | return false; |
23451 | if (!S.Current || S.Current->isRoot()) |
23452 | return true; |
23453 | if (DoReturn) |
23454 | return true; |
23455 | continue; |
23456 | } |
23457 | case OP_RetSint16: { |
23458 | bool DoReturn = (S.Current == StartFrame); |
23459 | if (!Ret<PT_Sint16>(S, PC, Result)) |
23460 | return false; |
23461 | if (!S.Current || S.Current->isRoot()) |
23462 | return true; |
23463 | if (DoReturn) |
23464 | return true; |
23465 | continue; |
23466 | } |
23467 | case OP_RetUint16: { |
23468 | bool DoReturn = (S.Current == StartFrame); |
23469 | if (!Ret<PT_Uint16>(S, PC, Result)) |
23470 | return false; |
23471 | if (!S.Current || S.Current->isRoot()) |
23472 | return true; |
23473 | if (DoReturn) |
23474 | return true; |
23475 | continue; |
23476 | } |
23477 | case OP_RetSint32: { |
23478 | bool DoReturn = (S.Current == StartFrame); |
23479 | if (!Ret<PT_Sint32>(S, PC, Result)) |
23480 | return false; |
23481 | if (!S.Current || S.Current->isRoot()) |
23482 | return true; |
23483 | if (DoReturn) |
23484 | return true; |
23485 | continue; |
23486 | } |
23487 | case OP_RetUint32: { |
23488 | bool DoReturn = (S.Current == StartFrame); |
23489 | if (!Ret<PT_Uint32>(S, PC, Result)) |
23490 | return false; |
23491 | if (!S.Current || S.Current->isRoot()) |
23492 | return true; |
23493 | if (DoReturn) |
23494 | return true; |
23495 | continue; |
23496 | } |
23497 | case OP_RetSint64: { |
23498 | bool DoReturn = (S.Current == StartFrame); |
23499 | if (!Ret<PT_Sint64>(S, PC, Result)) |
23500 | return false; |
23501 | if (!S.Current || S.Current->isRoot()) |
23502 | return true; |
23503 | if (DoReturn) |
23504 | return true; |
23505 | continue; |
23506 | } |
23507 | case OP_RetUint64: { |
23508 | bool DoReturn = (S.Current == StartFrame); |
23509 | if (!Ret<PT_Uint64>(S, PC, Result)) |
23510 | return false; |
23511 | if (!S.Current || S.Current->isRoot()) |
23512 | return true; |
23513 | if (DoReturn) |
23514 | return true; |
23515 | continue; |
23516 | } |
23517 | case OP_RetIntAP: { |
23518 | bool DoReturn = (S.Current == StartFrame); |
23519 | if (!Ret<PT_IntAP>(S, PC, Result)) |
23520 | return false; |
23521 | if (!S.Current || S.Current->isRoot()) |
23522 | return true; |
23523 | if (DoReturn) |
23524 | return true; |
23525 | continue; |
23526 | } |
23527 | case OP_RetIntAPS: { |
23528 | bool DoReturn = (S.Current == StartFrame); |
23529 | if (!Ret<PT_IntAPS>(S, PC, Result)) |
23530 | return false; |
23531 | if (!S.Current || S.Current->isRoot()) |
23532 | return true; |
23533 | if (DoReturn) |
23534 | return true; |
23535 | continue; |
23536 | } |
23537 | case OP_RetBool: { |
23538 | bool DoReturn = (S.Current == StartFrame); |
23539 | if (!Ret<PT_Bool>(S, PC, Result)) |
23540 | return false; |
23541 | if (!S.Current || S.Current->isRoot()) |
23542 | return true; |
23543 | if (DoReturn) |
23544 | return true; |
23545 | continue; |
23546 | } |
23547 | case OP_RetPtr: { |
23548 | bool DoReturn = (S.Current == StartFrame); |
23549 | if (!Ret<PT_Ptr>(S, PC, Result)) |
23550 | return false; |
23551 | if (!S.Current || S.Current->isRoot()) |
23552 | return true; |
23553 | if (DoReturn) |
23554 | return true; |
23555 | continue; |
23556 | } |
23557 | case OP_RetFnPtr: { |
23558 | bool DoReturn = (S.Current == StartFrame); |
23559 | if (!Ret<PT_FnPtr>(S, PC, Result)) |
23560 | return false; |
23561 | if (!S.Current || S.Current->isRoot()) |
23562 | return true; |
23563 | if (DoReturn) |
23564 | return true; |
23565 | continue; |
23566 | } |
23567 | case OP_RetMemberPtr: { |
23568 | bool DoReturn = (S.Current == StartFrame); |
23569 | if (!Ret<PT_MemberPtr>(S, PC, Result)) |
23570 | return false; |
23571 | if (!S.Current || S.Current->isRoot()) |
23572 | return true; |
23573 | if (DoReturn) |
23574 | return true; |
23575 | continue; |
23576 | } |
23577 | case OP_RetFloat: { |
23578 | bool DoReturn = (S.Current == StartFrame); |
23579 | if (!Ret<PT_Float>(S, PC, Result)) |
23580 | return false; |
23581 | if (!S.Current || S.Current->isRoot()) |
23582 | return true; |
23583 | if (DoReturn) |
23584 | return true; |
23585 | continue; |
23586 | } |
23587 | #endif |
23588 | #ifdef GET_DISASM |
23589 | case OP_RetSint8: |
23590 | PrintName("RetSint8" ); |
23591 | OS << "\t" << "\n" ; |
23592 | continue; |
23593 | case OP_RetUint8: |
23594 | PrintName("RetUint8" ); |
23595 | OS << "\t" << "\n" ; |
23596 | continue; |
23597 | case OP_RetSint16: |
23598 | PrintName("RetSint16" ); |
23599 | OS << "\t" << "\n" ; |
23600 | continue; |
23601 | case OP_RetUint16: |
23602 | PrintName("RetUint16" ); |
23603 | OS << "\t" << "\n" ; |
23604 | continue; |
23605 | case OP_RetSint32: |
23606 | PrintName("RetSint32" ); |
23607 | OS << "\t" << "\n" ; |
23608 | continue; |
23609 | case OP_RetUint32: |
23610 | PrintName("RetUint32" ); |
23611 | OS << "\t" << "\n" ; |
23612 | continue; |
23613 | case OP_RetSint64: |
23614 | PrintName("RetSint64" ); |
23615 | OS << "\t" << "\n" ; |
23616 | continue; |
23617 | case OP_RetUint64: |
23618 | PrintName("RetUint64" ); |
23619 | OS << "\t" << "\n" ; |
23620 | continue; |
23621 | case OP_RetIntAP: |
23622 | PrintName("RetIntAP" ); |
23623 | OS << "\t" << "\n" ; |
23624 | continue; |
23625 | case OP_RetIntAPS: |
23626 | PrintName("RetIntAPS" ); |
23627 | OS << "\t" << "\n" ; |
23628 | continue; |
23629 | case OP_RetBool: |
23630 | PrintName("RetBool" ); |
23631 | OS << "\t" << "\n" ; |
23632 | continue; |
23633 | case OP_RetPtr: |
23634 | PrintName("RetPtr" ); |
23635 | OS << "\t" << "\n" ; |
23636 | continue; |
23637 | case OP_RetFnPtr: |
23638 | PrintName("RetFnPtr" ); |
23639 | OS << "\t" << "\n" ; |
23640 | continue; |
23641 | case OP_RetMemberPtr: |
23642 | PrintName("RetMemberPtr" ); |
23643 | OS << "\t" << "\n" ; |
23644 | continue; |
23645 | case OP_RetFloat: |
23646 | PrintName("RetFloat" ); |
23647 | OS << "\t" << "\n" ; |
23648 | continue; |
23649 | #endif |
23650 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23651 | bool emitRetSint8(const SourceInfo &); |
23652 | bool emitRetUint8(const SourceInfo &); |
23653 | bool emitRetSint16(const SourceInfo &); |
23654 | bool emitRetUint16(const SourceInfo &); |
23655 | bool emitRetSint32(const SourceInfo &); |
23656 | bool emitRetUint32(const SourceInfo &); |
23657 | bool emitRetSint64(const SourceInfo &); |
23658 | bool emitRetUint64(const SourceInfo &); |
23659 | bool emitRetIntAP(const SourceInfo &); |
23660 | bool emitRetIntAPS(const SourceInfo &); |
23661 | bool emitRetBool(const SourceInfo &); |
23662 | bool emitRetPtr(const SourceInfo &); |
23663 | bool emitRetFnPtr(const SourceInfo &); |
23664 | bool emitRetMemberPtr(const SourceInfo &); |
23665 | bool emitRetFloat(const SourceInfo &); |
23666 | #if defined(GET_EVAL_PROTO) |
23667 | template<PrimType> |
23668 | bool emitRet(const SourceInfo &); |
23669 | #endif |
23670 | #endif |
23671 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23672 | [[nodiscard]] bool emitRet(PrimType, const SourceInfo &I); |
23673 | #endif |
23674 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
23675 | bool |
23676 | #if defined(GET_EVAL_IMPL) |
23677 | EvalEmitter |
23678 | #else |
23679 | ByteCodeEmitter |
23680 | #endif |
23681 | ::emitRet(PrimType T0, const SourceInfo &I) { |
23682 | switch (T0) { |
23683 | case PT_Sint8: |
23684 | #ifdef GET_LINK_IMPL |
23685 | return emitRetSint8 |
23686 | #else |
23687 | return emitRet<PT_Sint8> |
23688 | #endif |
23689 | (I); |
23690 | case PT_Uint8: |
23691 | #ifdef GET_LINK_IMPL |
23692 | return emitRetUint8 |
23693 | #else |
23694 | return emitRet<PT_Uint8> |
23695 | #endif |
23696 | (I); |
23697 | case PT_Sint16: |
23698 | #ifdef GET_LINK_IMPL |
23699 | return emitRetSint16 |
23700 | #else |
23701 | return emitRet<PT_Sint16> |
23702 | #endif |
23703 | (I); |
23704 | case PT_Uint16: |
23705 | #ifdef GET_LINK_IMPL |
23706 | return emitRetUint16 |
23707 | #else |
23708 | return emitRet<PT_Uint16> |
23709 | #endif |
23710 | (I); |
23711 | case PT_Sint32: |
23712 | #ifdef GET_LINK_IMPL |
23713 | return emitRetSint32 |
23714 | #else |
23715 | return emitRet<PT_Sint32> |
23716 | #endif |
23717 | (I); |
23718 | case PT_Uint32: |
23719 | #ifdef GET_LINK_IMPL |
23720 | return emitRetUint32 |
23721 | #else |
23722 | return emitRet<PT_Uint32> |
23723 | #endif |
23724 | (I); |
23725 | case PT_Sint64: |
23726 | #ifdef GET_LINK_IMPL |
23727 | return emitRetSint64 |
23728 | #else |
23729 | return emitRet<PT_Sint64> |
23730 | #endif |
23731 | (I); |
23732 | case PT_Uint64: |
23733 | #ifdef GET_LINK_IMPL |
23734 | return emitRetUint64 |
23735 | #else |
23736 | return emitRet<PT_Uint64> |
23737 | #endif |
23738 | (I); |
23739 | case PT_IntAP: |
23740 | #ifdef GET_LINK_IMPL |
23741 | return emitRetIntAP |
23742 | #else |
23743 | return emitRet<PT_IntAP> |
23744 | #endif |
23745 | (I); |
23746 | case PT_IntAPS: |
23747 | #ifdef GET_LINK_IMPL |
23748 | return emitRetIntAPS |
23749 | #else |
23750 | return emitRet<PT_IntAPS> |
23751 | #endif |
23752 | (I); |
23753 | case PT_Bool: |
23754 | #ifdef GET_LINK_IMPL |
23755 | return emitRetBool |
23756 | #else |
23757 | return emitRet<PT_Bool> |
23758 | #endif |
23759 | (I); |
23760 | case PT_Ptr: |
23761 | #ifdef GET_LINK_IMPL |
23762 | return emitRetPtr |
23763 | #else |
23764 | return emitRet<PT_Ptr> |
23765 | #endif |
23766 | (I); |
23767 | case PT_FnPtr: |
23768 | #ifdef GET_LINK_IMPL |
23769 | return emitRetFnPtr |
23770 | #else |
23771 | return emitRet<PT_FnPtr> |
23772 | #endif |
23773 | (I); |
23774 | case PT_MemberPtr: |
23775 | #ifdef GET_LINK_IMPL |
23776 | return emitRetMemberPtr |
23777 | #else |
23778 | return emitRet<PT_MemberPtr> |
23779 | #endif |
23780 | (I); |
23781 | case PT_Float: |
23782 | #ifdef GET_LINK_IMPL |
23783 | return emitRetFloat |
23784 | #else |
23785 | return emitRet<PT_Float> |
23786 | #endif |
23787 | (I); |
23788 | } |
23789 | llvm_unreachable("invalid enum value" ); |
23790 | } |
23791 | #endif |
23792 | #ifdef GET_LINK_IMPL |
23793 | bool ByteCodeEmitter::emitRetSint8(const SourceInfo &L) { |
23794 | return emitOp<>(OP_RetSint8, L); |
23795 | } |
23796 | bool ByteCodeEmitter::emitRetUint8(const SourceInfo &L) { |
23797 | return emitOp<>(OP_RetUint8, L); |
23798 | } |
23799 | bool ByteCodeEmitter::emitRetSint16(const SourceInfo &L) { |
23800 | return emitOp<>(OP_RetSint16, L); |
23801 | } |
23802 | bool ByteCodeEmitter::emitRetUint16(const SourceInfo &L) { |
23803 | return emitOp<>(OP_RetUint16, L); |
23804 | } |
23805 | bool ByteCodeEmitter::emitRetSint32(const SourceInfo &L) { |
23806 | return emitOp<>(OP_RetSint32, L); |
23807 | } |
23808 | bool ByteCodeEmitter::emitRetUint32(const SourceInfo &L) { |
23809 | return emitOp<>(OP_RetUint32, L); |
23810 | } |
23811 | bool ByteCodeEmitter::emitRetSint64(const SourceInfo &L) { |
23812 | return emitOp<>(OP_RetSint64, L); |
23813 | } |
23814 | bool ByteCodeEmitter::emitRetUint64(const SourceInfo &L) { |
23815 | return emitOp<>(OP_RetUint64, L); |
23816 | } |
23817 | bool ByteCodeEmitter::emitRetIntAP(const SourceInfo &L) { |
23818 | return emitOp<>(OP_RetIntAP, L); |
23819 | } |
23820 | bool ByteCodeEmitter::emitRetIntAPS(const SourceInfo &L) { |
23821 | return emitOp<>(OP_RetIntAPS, L); |
23822 | } |
23823 | bool ByteCodeEmitter::emitRetBool(const SourceInfo &L) { |
23824 | return emitOp<>(OP_RetBool, L); |
23825 | } |
23826 | bool ByteCodeEmitter::emitRetPtr(const SourceInfo &L) { |
23827 | return emitOp<>(OP_RetPtr, L); |
23828 | } |
23829 | bool ByteCodeEmitter::emitRetFnPtr(const SourceInfo &L) { |
23830 | return emitOp<>(OP_RetFnPtr, L); |
23831 | } |
23832 | bool ByteCodeEmitter::emitRetMemberPtr(const SourceInfo &L) { |
23833 | return emitOp<>(OP_RetMemberPtr, L); |
23834 | } |
23835 | bool ByteCodeEmitter::emitRetFloat(const SourceInfo &L) { |
23836 | return emitOp<>(OP_RetFloat, L); |
23837 | } |
23838 | #endif |
23839 | #ifdef GET_OPCODE_NAMES |
23840 | OP_RetValue, |
23841 | #endif |
23842 | #ifdef GET_INTERP |
23843 | case OP_RetValue: { |
23844 | bool DoReturn = (S.Current == StartFrame); |
23845 | if (!RetValue(S, PC, Result)) |
23846 | return false; |
23847 | if (!S.Current || S.Current->isRoot()) |
23848 | return true; |
23849 | if (DoReturn) |
23850 | return true; |
23851 | continue; |
23852 | } |
23853 | #endif |
23854 | #ifdef GET_DISASM |
23855 | case OP_RetValue: |
23856 | PrintName("RetValue" ); |
23857 | OS << "\t" << "\n" ; |
23858 | continue; |
23859 | #endif |
23860 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23861 | bool emitRetValue(const SourceInfo &); |
23862 | #endif |
23863 | #ifdef GET_LINK_IMPL |
23864 | bool ByteCodeEmitter::emitRetValue(const SourceInfo &L) { |
23865 | return emitOp<>(OP_RetValue, L); |
23866 | } |
23867 | #endif |
23868 | #ifdef GET_OPCODE_NAMES |
23869 | OP_RetVoid, |
23870 | #endif |
23871 | #ifdef GET_INTERP |
23872 | case OP_RetVoid: { |
23873 | bool DoReturn = (S.Current == StartFrame); |
23874 | if (!RetVoid(S, PC, Result)) |
23875 | return false; |
23876 | if (!S.Current || S.Current->isRoot()) |
23877 | return true; |
23878 | if (DoReturn) |
23879 | return true; |
23880 | continue; |
23881 | } |
23882 | #endif |
23883 | #ifdef GET_DISASM |
23884 | case OP_RetVoid: |
23885 | PrintName("RetVoid" ); |
23886 | OS << "\t" << "\n" ; |
23887 | continue; |
23888 | #endif |
23889 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
23890 | bool emitRetVoid(const SourceInfo &); |
23891 | #endif |
23892 | #ifdef GET_LINK_IMPL |
23893 | bool ByteCodeEmitter::emitRetVoid(const SourceInfo &L) { |
23894 | return emitOp<>(OP_RetVoid, L); |
23895 | } |
23896 | #endif |
23897 | #ifdef GET_OPCODE_NAMES |
23898 | OP_SetFieldSint8, |
23899 | OP_SetFieldUint8, |
23900 | OP_SetFieldSint16, |
23901 | OP_SetFieldUint16, |
23902 | OP_SetFieldSint32, |
23903 | OP_SetFieldUint32, |
23904 | OP_SetFieldSint64, |
23905 | OP_SetFieldUint64, |
23906 | OP_SetFieldIntAP, |
23907 | OP_SetFieldIntAPS, |
23908 | OP_SetFieldBool, |
23909 | OP_SetFieldPtr, |
23910 | OP_SetFieldFnPtr, |
23911 | OP_SetFieldMemberPtr, |
23912 | OP_SetFieldFloat, |
23913 | #endif |
23914 | #ifdef GET_INTERP |
23915 | case OP_SetFieldSint8: { |
23916 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23917 | if (!SetField<PT_Sint8>(S, OpPC, V0)) |
23918 | return false; |
23919 | continue; |
23920 | } |
23921 | case OP_SetFieldUint8: { |
23922 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23923 | if (!SetField<PT_Uint8>(S, OpPC, V0)) |
23924 | return false; |
23925 | continue; |
23926 | } |
23927 | case OP_SetFieldSint16: { |
23928 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23929 | if (!SetField<PT_Sint16>(S, OpPC, V0)) |
23930 | return false; |
23931 | continue; |
23932 | } |
23933 | case OP_SetFieldUint16: { |
23934 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23935 | if (!SetField<PT_Uint16>(S, OpPC, V0)) |
23936 | return false; |
23937 | continue; |
23938 | } |
23939 | case OP_SetFieldSint32: { |
23940 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23941 | if (!SetField<PT_Sint32>(S, OpPC, V0)) |
23942 | return false; |
23943 | continue; |
23944 | } |
23945 | case OP_SetFieldUint32: { |
23946 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23947 | if (!SetField<PT_Uint32>(S, OpPC, V0)) |
23948 | return false; |
23949 | continue; |
23950 | } |
23951 | case OP_SetFieldSint64: { |
23952 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23953 | if (!SetField<PT_Sint64>(S, OpPC, V0)) |
23954 | return false; |
23955 | continue; |
23956 | } |
23957 | case OP_SetFieldUint64: { |
23958 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23959 | if (!SetField<PT_Uint64>(S, OpPC, V0)) |
23960 | return false; |
23961 | continue; |
23962 | } |
23963 | case OP_SetFieldIntAP: { |
23964 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23965 | if (!SetField<PT_IntAP>(S, OpPC, V0)) |
23966 | return false; |
23967 | continue; |
23968 | } |
23969 | case OP_SetFieldIntAPS: { |
23970 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23971 | if (!SetField<PT_IntAPS>(S, OpPC, V0)) |
23972 | return false; |
23973 | continue; |
23974 | } |
23975 | case OP_SetFieldBool: { |
23976 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23977 | if (!SetField<PT_Bool>(S, OpPC, V0)) |
23978 | return false; |
23979 | continue; |
23980 | } |
23981 | case OP_SetFieldPtr: { |
23982 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23983 | if (!SetField<PT_Ptr>(S, OpPC, V0)) |
23984 | return false; |
23985 | continue; |
23986 | } |
23987 | case OP_SetFieldFnPtr: { |
23988 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23989 | if (!SetField<PT_FnPtr>(S, OpPC, V0)) |
23990 | return false; |
23991 | continue; |
23992 | } |
23993 | case OP_SetFieldMemberPtr: { |
23994 | const auto V0 = ReadArg<uint32_t>(S, PC); |
23995 | if (!SetField<PT_MemberPtr>(S, OpPC, V0)) |
23996 | return false; |
23997 | continue; |
23998 | } |
23999 | case OP_SetFieldFloat: { |
24000 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24001 | if (!SetField<PT_Float>(S, OpPC, V0)) |
24002 | return false; |
24003 | continue; |
24004 | } |
24005 | #endif |
24006 | #ifdef GET_DISASM |
24007 | case OP_SetFieldSint8: |
24008 | PrintName("SetFieldSint8" ); |
24009 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24010 | continue; |
24011 | case OP_SetFieldUint8: |
24012 | PrintName("SetFieldUint8" ); |
24013 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24014 | continue; |
24015 | case OP_SetFieldSint16: |
24016 | PrintName("SetFieldSint16" ); |
24017 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24018 | continue; |
24019 | case OP_SetFieldUint16: |
24020 | PrintName("SetFieldUint16" ); |
24021 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24022 | continue; |
24023 | case OP_SetFieldSint32: |
24024 | PrintName("SetFieldSint32" ); |
24025 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24026 | continue; |
24027 | case OP_SetFieldUint32: |
24028 | PrintName("SetFieldUint32" ); |
24029 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24030 | continue; |
24031 | case OP_SetFieldSint64: |
24032 | PrintName("SetFieldSint64" ); |
24033 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24034 | continue; |
24035 | case OP_SetFieldUint64: |
24036 | PrintName("SetFieldUint64" ); |
24037 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24038 | continue; |
24039 | case OP_SetFieldIntAP: |
24040 | PrintName("SetFieldIntAP" ); |
24041 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24042 | continue; |
24043 | case OP_SetFieldIntAPS: |
24044 | PrintName("SetFieldIntAPS" ); |
24045 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24046 | continue; |
24047 | case OP_SetFieldBool: |
24048 | PrintName("SetFieldBool" ); |
24049 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24050 | continue; |
24051 | case OP_SetFieldPtr: |
24052 | PrintName("SetFieldPtr" ); |
24053 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24054 | continue; |
24055 | case OP_SetFieldFnPtr: |
24056 | PrintName("SetFieldFnPtr" ); |
24057 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24058 | continue; |
24059 | case OP_SetFieldMemberPtr: |
24060 | PrintName("SetFieldMemberPtr" ); |
24061 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24062 | continue; |
24063 | case OP_SetFieldFloat: |
24064 | PrintName("SetFieldFloat" ); |
24065 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24066 | continue; |
24067 | #endif |
24068 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24069 | bool emitSetFieldSint8( uint32_t , const SourceInfo &); |
24070 | bool emitSetFieldUint8( uint32_t , const SourceInfo &); |
24071 | bool emitSetFieldSint16( uint32_t , const SourceInfo &); |
24072 | bool emitSetFieldUint16( uint32_t , const SourceInfo &); |
24073 | bool emitSetFieldSint32( uint32_t , const SourceInfo &); |
24074 | bool emitSetFieldUint32( uint32_t , const SourceInfo &); |
24075 | bool emitSetFieldSint64( uint32_t , const SourceInfo &); |
24076 | bool emitSetFieldUint64( uint32_t , const SourceInfo &); |
24077 | bool emitSetFieldIntAP( uint32_t , const SourceInfo &); |
24078 | bool emitSetFieldIntAPS( uint32_t , const SourceInfo &); |
24079 | bool emitSetFieldBool( uint32_t , const SourceInfo &); |
24080 | bool emitSetFieldPtr( uint32_t , const SourceInfo &); |
24081 | bool emitSetFieldFnPtr( uint32_t , const SourceInfo &); |
24082 | bool emitSetFieldMemberPtr( uint32_t , const SourceInfo &); |
24083 | bool emitSetFieldFloat( uint32_t , const SourceInfo &); |
24084 | #endif |
24085 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24086 | [[nodiscard]] bool emitSetField(PrimType, uint32_t, const SourceInfo &I); |
24087 | #endif |
24088 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
24089 | bool |
24090 | #if defined(GET_EVAL_IMPL) |
24091 | EvalEmitter |
24092 | #else |
24093 | ByteCodeEmitter |
24094 | #endif |
24095 | ::emitSetField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
24096 | switch (T0) { |
24097 | case PT_Sint8: |
24098 | return emitSetFieldSint8(A0, I); |
24099 | case PT_Uint8: |
24100 | return emitSetFieldUint8(A0, I); |
24101 | case PT_Sint16: |
24102 | return emitSetFieldSint16(A0, I); |
24103 | case PT_Uint16: |
24104 | return emitSetFieldUint16(A0, I); |
24105 | case PT_Sint32: |
24106 | return emitSetFieldSint32(A0, I); |
24107 | case PT_Uint32: |
24108 | return emitSetFieldUint32(A0, I); |
24109 | case PT_Sint64: |
24110 | return emitSetFieldSint64(A0, I); |
24111 | case PT_Uint64: |
24112 | return emitSetFieldUint64(A0, I); |
24113 | case PT_IntAP: |
24114 | return emitSetFieldIntAP(A0, I); |
24115 | case PT_IntAPS: |
24116 | return emitSetFieldIntAPS(A0, I); |
24117 | case PT_Bool: |
24118 | return emitSetFieldBool(A0, I); |
24119 | case PT_Ptr: |
24120 | return emitSetFieldPtr(A0, I); |
24121 | case PT_FnPtr: |
24122 | return emitSetFieldFnPtr(A0, I); |
24123 | case PT_MemberPtr: |
24124 | return emitSetFieldMemberPtr(A0, I); |
24125 | case PT_Float: |
24126 | return emitSetFieldFloat(A0, I); |
24127 | } |
24128 | llvm_unreachable("invalid enum value" ); |
24129 | } |
24130 | #endif |
24131 | #ifdef GET_LINK_IMPL |
24132 | bool ByteCodeEmitter::emitSetFieldSint8( uint32_t A0, const SourceInfo &L) { |
24133 | return emitOp<uint32_t>(OP_SetFieldSint8, A0, L); |
24134 | } |
24135 | bool ByteCodeEmitter::emitSetFieldUint8( uint32_t A0, const SourceInfo &L) { |
24136 | return emitOp<uint32_t>(OP_SetFieldUint8, A0, L); |
24137 | } |
24138 | bool ByteCodeEmitter::emitSetFieldSint16( uint32_t A0, const SourceInfo &L) { |
24139 | return emitOp<uint32_t>(OP_SetFieldSint16, A0, L); |
24140 | } |
24141 | bool ByteCodeEmitter::emitSetFieldUint16( uint32_t A0, const SourceInfo &L) { |
24142 | return emitOp<uint32_t>(OP_SetFieldUint16, A0, L); |
24143 | } |
24144 | bool ByteCodeEmitter::emitSetFieldSint32( uint32_t A0, const SourceInfo &L) { |
24145 | return emitOp<uint32_t>(OP_SetFieldSint32, A0, L); |
24146 | } |
24147 | bool ByteCodeEmitter::emitSetFieldUint32( uint32_t A0, const SourceInfo &L) { |
24148 | return emitOp<uint32_t>(OP_SetFieldUint32, A0, L); |
24149 | } |
24150 | bool ByteCodeEmitter::emitSetFieldSint64( uint32_t A0, const SourceInfo &L) { |
24151 | return emitOp<uint32_t>(OP_SetFieldSint64, A0, L); |
24152 | } |
24153 | bool ByteCodeEmitter::emitSetFieldUint64( uint32_t A0, const SourceInfo &L) { |
24154 | return emitOp<uint32_t>(OP_SetFieldUint64, A0, L); |
24155 | } |
24156 | bool ByteCodeEmitter::emitSetFieldIntAP( uint32_t A0, const SourceInfo &L) { |
24157 | return emitOp<uint32_t>(OP_SetFieldIntAP, A0, L); |
24158 | } |
24159 | bool ByteCodeEmitter::emitSetFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
24160 | return emitOp<uint32_t>(OP_SetFieldIntAPS, A0, L); |
24161 | } |
24162 | bool ByteCodeEmitter::emitSetFieldBool( uint32_t A0, const SourceInfo &L) { |
24163 | return emitOp<uint32_t>(OP_SetFieldBool, A0, L); |
24164 | } |
24165 | bool ByteCodeEmitter::emitSetFieldPtr( uint32_t A0, const SourceInfo &L) { |
24166 | return emitOp<uint32_t>(OP_SetFieldPtr, A0, L); |
24167 | } |
24168 | bool ByteCodeEmitter::emitSetFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
24169 | return emitOp<uint32_t>(OP_SetFieldFnPtr, A0, L); |
24170 | } |
24171 | bool ByteCodeEmitter::emitSetFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
24172 | return emitOp<uint32_t>(OP_SetFieldMemberPtr, A0, L); |
24173 | } |
24174 | bool ByteCodeEmitter::emitSetFieldFloat( uint32_t A0, const SourceInfo &L) { |
24175 | return emitOp<uint32_t>(OP_SetFieldFloat, A0, L); |
24176 | } |
24177 | #endif |
24178 | #ifdef GET_EVAL_IMPL |
24179 | bool EvalEmitter::emitSetFieldSint8( uint32_t A0, const SourceInfo &L) { |
24180 | if (!isActive()) return true; |
24181 | CurrentSource = L; |
24182 | return SetField<PT_Sint8>(S, OpPC, A0); |
24183 | } |
24184 | bool EvalEmitter::emitSetFieldUint8( uint32_t A0, const SourceInfo &L) { |
24185 | if (!isActive()) return true; |
24186 | CurrentSource = L; |
24187 | return SetField<PT_Uint8>(S, OpPC, A0); |
24188 | } |
24189 | bool EvalEmitter::emitSetFieldSint16( uint32_t A0, const SourceInfo &L) { |
24190 | if (!isActive()) return true; |
24191 | CurrentSource = L; |
24192 | return SetField<PT_Sint16>(S, OpPC, A0); |
24193 | } |
24194 | bool EvalEmitter::emitSetFieldUint16( uint32_t A0, const SourceInfo &L) { |
24195 | if (!isActive()) return true; |
24196 | CurrentSource = L; |
24197 | return SetField<PT_Uint16>(S, OpPC, A0); |
24198 | } |
24199 | bool EvalEmitter::emitSetFieldSint32( uint32_t A0, const SourceInfo &L) { |
24200 | if (!isActive()) return true; |
24201 | CurrentSource = L; |
24202 | return SetField<PT_Sint32>(S, OpPC, A0); |
24203 | } |
24204 | bool EvalEmitter::emitSetFieldUint32( uint32_t A0, const SourceInfo &L) { |
24205 | if (!isActive()) return true; |
24206 | CurrentSource = L; |
24207 | return SetField<PT_Uint32>(S, OpPC, A0); |
24208 | } |
24209 | bool EvalEmitter::emitSetFieldSint64( uint32_t A0, const SourceInfo &L) { |
24210 | if (!isActive()) return true; |
24211 | CurrentSource = L; |
24212 | return SetField<PT_Sint64>(S, OpPC, A0); |
24213 | } |
24214 | bool EvalEmitter::emitSetFieldUint64( uint32_t A0, const SourceInfo &L) { |
24215 | if (!isActive()) return true; |
24216 | CurrentSource = L; |
24217 | return SetField<PT_Uint64>(S, OpPC, A0); |
24218 | } |
24219 | bool EvalEmitter::emitSetFieldIntAP( uint32_t A0, const SourceInfo &L) { |
24220 | if (!isActive()) return true; |
24221 | CurrentSource = L; |
24222 | return SetField<PT_IntAP>(S, OpPC, A0); |
24223 | } |
24224 | bool EvalEmitter::emitSetFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
24225 | if (!isActive()) return true; |
24226 | CurrentSource = L; |
24227 | return SetField<PT_IntAPS>(S, OpPC, A0); |
24228 | } |
24229 | bool EvalEmitter::emitSetFieldBool( uint32_t A0, const SourceInfo &L) { |
24230 | if (!isActive()) return true; |
24231 | CurrentSource = L; |
24232 | return SetField<PT_Bool>(S, OpPC, A0); |
24233 | } |
24234 | bool EvalEmitter::emitSetFieldPtr( uint32_t A0, const SourceInfo &L) { |
24235 | if (!isActive()) return true; |
24236 | CurrentSource = L; |
24237 | return SetField<PT_Ptr>(S, OpPC, A0); |
24238 | } |
24239 | bool EvalEmitter::emitSetFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
24240 | if (!isActive()) return true; |
24241 | CurrentSource = L; |
24242 | return SetField<PT_FnPtr>(S, OpPC, A0); |
24243 | } |
24244 | bool EvalEmitter::emitSetFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
24245 | if (!isActive()) return true; |
24246 | CurrentSource = L; |
24247 | return SetField<PT_MemberPtr>(S, OpPC, A0); |
24248 | } |
24249 | bool EvalEmitter::emitSetFieldFloat( uint32_t A0, const SourceInfo &L) { |
24250 | if (!isActive()) return true; |
24251 | CurrentSource = L; |
24252 | return SetField<PT_Float>(S, OpPC, A0); |
24253 | } |
24254 | #endif |
24255 | #ifdef GET_OPCODE_NAMES |
24256 | OP_SetGlobalSint8, |
24257 | OP_SetGlobalUint8, |
24258 | OP_SetGlobalSint16, |
24259 | OP_SetGlobalUint16, |
24260 | OP_SetGlobalSint32, |
24261 | OP_SetGlobalUint32, |
24262 | OP_SetGlobalSint64, |
24263 | OP_SetGlobalUint64, |
24264 | OP_SetGlobalIntAP, |
24265 | OP_SetGlobalIntAPS, |
24266 | OP_SetGlobalBool, |
24267 | OP_SetGlobalPtr, |
24268 | OP_SetGlobalFnPtr, |
24269 | OP_SetGlobalMemberPtr, |
24270 | OP_SetGlobalFloat, |
24271 | #endif |
24272 | #ifdef GET_INTERP |
24273 | case OP_SetGlobalSint8: { |
24274 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24275 | if (!SetGlobal<PT_Sint8>(S, OpPC, V0)) |
24276 | return false; |
24277 | continue; |
24278 | } |
24279 | case OP_SetGlobalUint8: { |
24280 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24281 | if (!SetGlobal<PT_Uint8>(S, OpPC, V0)) |
24282 | return false; |
24283 | continue; |
24284 | } |
24285 | case OP_SetGlobalSint16: { |
24286 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24287 | if (!SetGlobal<PT_Sint16>(S, OpPC, V0)) |
24288 | return false; |
24289 | continue; |
24290 | } |
24291 | case OP_SetGlobalUint16: { |
24292 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24293 | if (!SetGlobal<PT_Uint16>(S, OpPC, V0)) |
24294 | return false; |
24295 | continue; |
24296 | } |
24297 | case OP_SetGlobalSint32: { |
24298 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24299 | if (!SetGlobal<PT_Sint32>(S, OpPC, V0)) |
24300 | return false; |
24301 | continue; |
24302 | } |
24303 | case OP_SetGlobalUint32: { |
24304 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24305 | if (!SetGlobal<PT_Uint32>(S, OpPC, V0)) |
24306 | return false; |
24307 | continue; |
24308 | } |
24309 | case OP_SetGlobalSint64: { |
24310 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24311 | if (!SetGlobal<PT_Sint64>(S, OpPC, V0)) |
24312 | return false; |
24313 | continue; |
24314 | } |
24315 | case OP_SetGlobalUint64: { |
24316 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24317 | if (!SetGlobal<PT_Uint64>(S, OpPC, V0)) |
24318 | return false; |
24319 | continue; |
24320 | } |
24321 | case OP_SetGlobalIntAP: { |
24322 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24323 | if (!SetGlobal<PT_IntAP>(S, OpPC, V0)) |
24324 | return false; |
24325 | continue; |
24326 | } |
24327 | case OP_SetGlobalIntAPS: { |
24328 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24329 | if (!SetGlobal<PT_IntAPS>(S, OpPC, V0)) |
24330 | return false; |
24331 | continue; |
24332 | } |
24333 | case OP_SetGlobalBool: { |
24334 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24335 | if (!SetGlobal<PT_Bool>(S, OpPC, V0)) |
24336 | return false; |
24337 | continue; |
24338 | } |
24339 | case OP_SetGlobalPtr: { |
24340 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24341 | if (!SetGlobal<PT_Ptr>(S, OpPC, V0)) |
24342 | return false; |
24343 | continue; |
24344 | } |
24345 | case OP_SetGlobalFnPtr: { |
24346 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24347 | if (!SetGlobal<PT_FnPtr>(S, OpPC, V0)) |
24348 | return false; |
24349 | continue; |
24350 | } |
24351 | case OP_SetGlobalMemberPtr: { |
24352 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24353 | if (!SetGlobal<PT_MemberPtr>(S, OpPC, V0)) |
24354 | return false; |
24355 | continue; |
24356 | } |
24357 | case OP_SetGlobalFloat: { |
24358 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24359 | if (!SetGlobal<PT_Float>(S, OpPC, V0)) |
24360 | return false; |
24361 | continue; |
24362 | } |
24363 | #endif |
24364 | #ifdef GET_DISASM |
24365 | case OP_SetGlobalSint8: |
24366 | PrintName("SetGlobalSint8" ); |
24367 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24368 | continue; |
24369 | case OP_SetGlobalUint8: |
24370 | PrintName("SetGlobalUint8" ); |
24371 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24372 | continue; |
24373 | case OP_SetGlobalSint16: |
24374 | PrintName("SetGlobalSint16" ); |
24375 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24376 | continue; |
24377 | case OP_SetGlobalUint16: |
24378 | PrintName("SetGlobalUint16" ); |
24379 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24380 | continue; |
24381 | case OP_SetGlobalSint32: |
24382 | PrintName("SetGlobalSint32" ); |
24383 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24384 | continue; |
24385 | case OP_SetGlobalUint32: |
24386 | PrintName("SetGlobalUint32" ); |
24387 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24388 | continue; |
24389 | case OP_SetGlobalSint64: |
24390 | PrintName("SetGlobalSint64" ); |
24391 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24392 | continue; |
24393 | case OP_SetGlobalUint64: |
24394 | PrintName("SetGlobalUint64" ); |
24395 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24396 | continue; |
24397 | case OP_SetGlobalIntAP: |
24398 | PrintName("SetGlobalIntAP" ); |
24399 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24400 | continue; |
24401 | case OP_SetGlobalIntAPS: |
24402 | PrintName("SetGlobalIntAPS" ); |
24403 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24404 | continue; |
24405 | case OP_SetGlobalBool: |
24406 | PrintName("SetGlobalBool" ); |
24407 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24408 | continue; |
24409 | case OP_SetGlobalPtr: |
24410 | PrintName("SetGlobalPtr" ); |
24411 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24412 | continue; |
24413 | case OP_SetGlobalFnPtr: |
24414 | PrintName("SetGlobalFnPtr" ); |
24415 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24416 | continue; |
24417 | case OP_SetGlobalMemberPtr: |
24418 | PrintName("SetGlobalMemberPtr" ); |
24419 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24420 | continue; |
24421 | case OP_SetGlobalFloat: |
24422 | PrintName("SetGlobalFloat" ); |
24423 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24424 | continue; |
24425 | #endif |
24426 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24427 | bool emitSetGlobalSint8( uint32_t , const SourceInfo &); |
24428 | bool emitSetGlobalUint8( uint32_t , const SourceInfo &); |
24429 | bool emitSetGlobalSint16( uint32_t , const SourceInfo &); |
24430 | bool emitSetGlobalUint16( uint32_t , const SourceInfo &); |
24431 | bool emitSetGlobalSint32( uint32_t , const SourceInfo &); |
24432 | bool emitSetGlobalUint32( uint32_t , const SourceInfo &); |
24433 | bool emitSetGlobalSint64( uint32_t , const SourceInfo &); |
24434 | bool emitSetGlobalUint64( uint32_t , const SourceInfo &); |
24435 | bool emitSetGlobalIntAP( uint32_t , const SourceInfo &); |
24436 | bool emitSetGlobalIntAPS( uint32_t , const SourceInfo &); |
24437 | bool emitSetGlobalBool( uint32_t , const SourceInfo &); |
24438 | bool emitSetGlobalPtr( uint32_t , const SourceInfo &); |
24439 | bool emitSetGlobalFnPtr( uint32_t , const SourceInfo &); |
24440 | bool emitSetGlobalMemberPtr( uint32_t , const SourceInfo &); |
24441 | bool emitSetGlobalFloat( uint32_t , const SourceInfo &); |
24442 | #endif |
24443 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24444 | [[nodiscard]] bool emitSetGlobal(PrimType, uint32_t, const SourceInfo &I); |
24445 | #endif |
24446 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
24447 | bool |
24448 | #if defined(GET_EVAL_IMPL) |
24449 | EvalEmitter |
24450 | #else |
24451 | ByteCodeEmitter |
24452 | #endif |
24453 | ::emitSetGlobal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
24454 | switch (T0) { |
24455 | case PT_Sint8: |
24456 | return emitSetGlobalSint8(A0, I); |
24457 | case PT_Uint8: |
24458 | return emitSetGlobalUint8(A0, I); |
24459 | case PT_Sint16: |
24460 | return emitSetGlobalSint16(A0, I); |
24461 | case PT_Uint16: |
24462 | return emitSetGlobalUint16(A0, I); |
24463 | case PT_Sint32: |
24464 | return emitSetGlobalSint32(A0, I); |
24465 | case PT_Uint32: |
24466 | return emitSetGlobalUint32(A0, I); |
24467 | case PT_Sint64: |
24468 | return emitSetGlobalSint64(A0, I); |
24469 | case PT_Uint64: |
24470 | return emitSetGlobalUint64(A0, I); |
24471 | case PT_IntAP: |
24472 | return emitSetGlobalIntAP(A0, I); |
24473 | case PT_IntAPS: |
24474 | return emitSetGlobalIntAPS(A0, I); |
24475 | case PT_Bool: |
24476 | return emitSetGlobalBool(A0, I); |
24477 | case PT_Ptr: |
24478 | return emitSetGlobalPtr(A0, I); |
24479 | case PT_FnPtr: |
24480 | return emitSetGlobalFnPtr(A0, I); |
24481 | case PT_MemberPtr: |
24482 | return emitSetGlobalMemberPtr(A0, I); |
24483 | case PT_Float: |
24484 | return emitSetGlobalFloat(A0, I); |
24485 | } |
24486 | llvm_unreachable("invalid enum value" ); |
24487 | } |
24488 | #endif |
24489 | #ifdef GET_LINK_IMPL |
24490 | bool ByteCodeEmitter::emitSetGlobalSint8( uint32_t A0, const SourceInfo &L) { |
24491 | return emitOp<uint32_t>(OP_SetGlobalSint8, A0, L); |
24492 | } |
24493 | bool ByteCodeEmitter::emitSetGlobalUint8( uint32_t A0, const SourceInfo &L) { |
24494 | return emitOp<uint32_t>(OP_SetGlobalUint8, A0, L); |
24495 | } |
24496 | bool ByteCodeEmitter::emitSetGlobalSint16( uint32_t A0, const SourceInfo &L) { |
24497 | return emitOp<uint32_t>(OP_SetGlobalSint16, A0, L); |
24498 | } |
24499 | bool ByteCodeEmitter::emitSetGlobalUint16( uint32_t A0, const SourceInfo &L) { |
24500 | return emitOp<uint32_t>(OP_SetGlobalUint16, A0, L); |
24501 | } |
24502 | bool ByteCodeEmitter::emitSetGlobalSint32( uint32_t A0, const SourceInfo &L) { |
24503 | return emitOp<uint32_t>(OP_SetGlobalSint32, A0, L); |
24504 | } |
24505 | bool ByteCodeEmitter::emitSetGlobalUint32( uint32_t A0, const SourceInfo &L) { |
24506 | return emitOp<uint32_t>(OP_SetGlobalUint32, A0, L); |
24507 | } |
24508 | bool ByteCodeEmitter::emitSetGlobalSint64( uint32_t A0, const SourceInfo &L) { |
24509 | return emitOp<uint32_t>(OP_SetGlobalSint64, A0, L); |
24510 | } |
24511 | bool ByteCodeEmitter::emitSetGlobalUint64( uint32_t A0, const SourceInfo &L) { |
24512 | return emitOp<uint32_t>(OP_SetGlobalUint64, A0, L); |
24513 | } |
24514 | bool ByteCodeEmitter::emitSetGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
24515 | return emitOp<uint32_t>(OP_SetGlobalIntAP, A0, L); |
24516 | } |
24517 | bool ByteCodeEmitter::emitSetGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
24518 | return emitOp<uint32_t>(OP_SetGlobalIntAPS, A0, L); |
24519 | } |
24520 | bool ByteCodeEmitter::emitSetGlobalBool( uint32_t A0, const SourceInfo &L) { |
24521 | return emitOp<uint32_t>(OP_SetGlobalBool, A0, L); |
24522 | } |
24523 | bool ByteCodeEmitter::emitSetGlobalPtr( uint32_t A0, const SourceInfo &L) { |
24524 | return emitOp<uint32_t>(OP_SetGlobalPtr, A0, L); |
24525 | } |
24526 | bool ByteCodeEmitter::emitSetGlobalFnPtr( uint32_t A0, const SourceInfo &L) { |
24527 | return emitOp<uint32_t>(OP_SetGlobalFnPtr, A0, L); |
24528 | } |
24529 | bool ByteCodeEmitter::emitSetGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
24530 | return emitOp<uint32_t>(OP_SetGlobalMemberPtr, A0, L); |
24531 | } |
24532 | bool ByteCodeEmitter::emitSetGlobalFloat( uint32_t A0, const SourceInfo &L) { |
24533 | return emitOp<uint32_t>(OP_SetGlobalFloat, A0, L); |
24534 | } |
24535 | #endif |
24536 | #ifdef GET_EVAL_IMPL |
24537 | bool EvalEmitter::emitSetGlobalSint8( uint32_t A0, const SourceInfo &L) { |
24538 | if (!isActive()) return true; |
24539 | CurrentSource = L; |
24540 | return SetGlobal<PT_Sint8>(S, OpPC, A0); |
24541 | } |
24542 | bool EvalEmitter::emitSetGlobalUint8( uint32_t A0, const SourceInfo &L) { |
24543 | if (!isActive()) return true; |
24544 | CurrentSource = L; |
24545 | return SetGlobal<PT_Uint8>(S, OpPC, A0); |
24546 | } |
24547 | bool EvalEmitter::emitSetGlobalSint16( uint32_t A0, const SourceInfo &L) { |
24548 | if (!isActive()) return true; |
24549 | CurrentSource = L; |
24550 | return SetGlobal<PT_Sint16>(S, OpPC, A0); |
24551 | } |
24552 | bool EvalEmitter::emitSetGlobalUint16( uint32_t A0, const SourceInfo &L) { |
24553 | if (!isActive()) return true; |
24554 | CurrentSource = L; |
24555 | return SetGlobal<PT_Uint16>(S, OpPC, A0); |
24556 | } |
24557 | bool EvalEmitter::emitSetGlobalSint32( uint32_t A0, const SourceInfo &L) { |
24558 | if (!isActive()) return true; |
24559 | CurrentSource = L; |
24560 | return SetGlobal<PT_Sint32>(S, OpPC, A0); |
24561 | } |
24562 | bool EvalEmitter::emitSetGlobalUint32( uint32_t A0, const SourceInfo &L) { |
24563 | if (!isActive()) return true; |
24564 | CurrentSource = L; |
24565 | return SetGlobal<PT_Uint32>(S, OpPC, A0); |
24566 | } |
24567 | bool EvalEmitter::emitSetGlobalSint64( uint32_t A0, const SourceInfo &L) { |
24568 | if (!isActive()) return true; |
24569 | CurrentSource = L; |
24570 | return SetGlobal<PT_Sint64>(S, OpPC, A0); |
24571 | } |
24572 | bool EvalEmitter::emitSetGlobalUint64( uint32_t A0, const SourceInfo &L) { |
24573 | if (!isActive()) return true; |
24574 | CurrentSource = L; |
24575 | return SetGlobal<PT_Uint64>(S, OpPC, A0); |
24576 | } |
24577 | bool EvalEmitter::emitSetGlobalIntAP( uint32_t A0, const SourceInfo &L) { |
24578 | if (!isActive()) return true; |
24579 | CurrentSource = L; |
24580 | return SetGlobal<PT_IntAP>(S, OpPC, A0); |
24581 | } |
24582 | bool EvalEmitter::emitSetGlobalIntAPS( uint32_t A0, const SourceInfo &L) { |
24583 | if (!isActive()) return true; |
24584 | CurrentSource = L; |
24585 | return SetGlobal<PT_IntAPS>(S, OpPC, A0); |
24586 | } |
24587 | bool EvalEmitter::emitSetGlobalBool( uint32_t A0, const SourceInfo &L) { |
24588 | if (!isActive()) return true; |
24589 | CurrentSource = L; |
24590 | return SetGlobal<PT_Bool>(S, OpPC, A0); |
24591 | } |
24592 | bool EvalEmitter::emitSetGlobalPtr( uint32_t A0, const SourceInfo &L) { |
24593 | if (!isActive()) return true; |
24594 | CurrentSource = L; |
24595 | return SetGlobal<PT_Ptr>(S, OpPC, A0); |
24596 | } |
24597 | bool EvalEmitter::emitSetGlobalFnPtr( uint32_t A0, const SourceInfo &L) { |
24598 | if (!isActive()) return true; |
24599 | CurrentSource = L; |
24600 | return SetGlobal<PT_FnPtr>(S, OpPC, A0); |
24601 | } |
24602 | bool EvalEmitter::emitSetGlobalMemberPtr( uint32_t A0, const SourceInfo &L) { |
24603 | if (!isActive()) return true; |
24604 | CurrentSource = L; |
24605 | return SetGlobal<PT_MemberPtr>(S, OpPC, A0); |
24606 | } |
24607 | bool EvalEmitter::emitSetGlobalFloat( uint32_t A0, const SourceInfo &L) { |
24608 | if (!isActive()) return true; |
24609 | CurrentSource = L; |
24610 | return SetGlobal<PT_Float>(S, OpPC, A0); |
24611 | } |
24612 | #endif |
24613 | #ifdef GET_OPCODE_NAMES |
24614 | OP_SetLocalSint8, |
24615 | OP_SetLocalUint8, |
24616 | OP_SetLocalSint16, |
24617 | OP_SetLocalUint16, |
24618 | OP_SetLocalSint32, |
24619 | OP_SetLocalUint32, |
24620 | OP_SetLocalSint64, |
24621 | OP_SetLocalUint64, |
24622 | OP_SetLocalIntAP, |
24623 | OP_SetLocalIntAPS, |
24624 | OP_SetLocalBool, |
24625 | OP_SetLocalPtr, |
24626 | OP_SetLocalFnPtr, |
24627 | OP_SetLocalMemberPtr, |
24628 | OP_SetLocalFloat, |
24629 | #endif |
24630 | #ifdef GET_INTERP |
24631 | case OP_SetLocalSint8: { |
24632 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24633 | if (!SetLocal<PT_Sint8>(S, OpPC, V0)) |
24634 | return false; |
24635 | continue; |
24636 | } |
24637 | case OP_SetLocalUint8: { |
24638 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24639 | if (!SetLocal<PT_Uint8>(S, OpPC, V0)) |
24640 | return false; |
24641 | continue; |
24642 | } |
24643 | case OP_SetLocalSint16: { |
24644 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24645 | if (!SetLocal<PT_Sint16>(S, OpPC, V0)) |
24646 | return false; |
24647 | continue; |
24648 | } |
24649 | case OP_SetLocalUint16: { |
24650 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24651 | if (!SetLocal<PT_Uint16>(S, OpPC, V0)) |
24652 | return false; |
24653 | continue; |
24654 | } |
24655 | case OP_SetLocalSint32: { |
24656 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24657 | if (!SetLocal<PT_Sint32>(S, OpPC, V0)) |
24658 | return false; |
24659 | continue; |
24660 | } |
24661 | case OP_SetLocalUint32: { |
24662 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24663 | if (!SetLocal<PT_Uint32>(S, OpPC, V0)) |
24664 | return false; |
24665 | continue; |
24666 | } |
24667 | case OP_SetLocalSint64: { |
24668 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24669 | if (!SetLocal<PT_Sint64>(S, OpPC, V0)) |
24670 | return false; |
24671 | continue; |
24672 | } |
24673 | case OP_SetLocalUint64: { |
24674 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24675 | if (!SetLocal<PT_Uint64>(S, OpPC, V0)) |
24676 | return false; |
24677 | continue; |
24678 | } |
24679 | case OP_SetLocalIntAP: { |
24680 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24681 | if (!SetLocal<PT_IntAP>(S, OpPC, V0)) |
24682 | return false; |
24683 | continue; |
24684 | } |
24685 | case OP_SetLocalIntAPS: { |
24686 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24687 | if (!SetLocal<PT_IntAPS>(S, OpPC, V0)) |
24688 | return false; |
24689 | continue; |
24690 | } |
24691 | case OP_SetLocalBool: { |
24692 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24693 | if (!SetLocal<PT_Bool>(S, OpPC, V0)) |
24694 | return false; |
24695 | continue; |
24696 | } |
24697 | case OP_SetLocalPtr: { |
24698 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24699 | if (!SetLocal<PT_Ptr>(S, OpPC, V0)) |
24700 | return false; |
24701 | continue; |
24702 | } |
24703 | case OP_SetLocalFnPtr: { |
24704 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24705 | if (!SetLocal<PT_FnPtr>(S, OpPC, V0)) |
24706 | return false; |
24707 | continue; |
24708 | } |
24709 | case OP_SetLocalMemberPtr: { |
24710 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24711 | if (!SetLocal<PT_MemberPtr>(S, OpPC, V0)) |
24712 | return false; |
24713 | continue; |
24714 | } |
24715 | case OP_SetLocalFloat: { |
24716 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24717 | if (!SetLocal<PT_Float>(S, OpPC, V0)) |
24718 | return false; |
24719 | continue; |
24720 | } |
24721 | #endif |
24722 | #ifdef GET_DISASM |
24723 | case OP_SetLocalSint8: |
24724 | PrintName("SetLocalSint8" ); |
24725 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24726 | continue; |
24727 | case OP_SetLocalUint8: |
24728 | PrintName("SetLocalUint8" ); |
24729 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24730 | continue; |
24731 | case OP_SetLocalSint16: |
24732 | PrintName("SetLocalSint16" ); |
24733 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24734 | continue; |
24735 | case OP_SetLocalUint16: |
24736 | PrintName("SetLocalUint16" ); |
24737 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24738 | continue; |
24739 | case OP_SetLocalSint32: |
24740 | PrintName("SetLocalSint32" ); |
24741 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24742 | continue; |
24743 | case OP_SetLocalUint32: |
24744 | PrintName("SetLocalUint32" ); |
24745 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24746 | continue; |
24747 | case OP_SetLocalSint64: |
24748 | PrintName("SetLocalSint64" ); |
24749 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24750 | continue; |
24751 | case OP_SetLocalUint64: |
24752 | PrintName("SetLocalUint64" ); |
24753 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24754 | continue; |
24755 | case OP_SetLocalIntAP: |
24756 | PrintName("SetLocalIntAP" ); |
24757 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24758 | continue; |
24759 | case OP_SetLocalIntAPS: |
24760 | PrintName("SetLocalIntAPS" ); |
24761 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24762 | continue; |
24763 | case OP_SetLocalBool: |
24764 | PrintName("SetLocalBool" ); |
24765 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24766 | continue; |
24767 | case OP_SetLocalPtr: |
24768 | PrintName("SetLocalPtr" ); |
24769 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24770 | continue; |
24771 | case OP_SetLocalFnPtr: |
24772 | PrintName("SetLocalFnPtr" ); |
24773 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24774 | continue; |
24775 | case OP_SetLocalMemberPtr: |
24776 | PrintName("SetLocalMemberPtr" ); |
24777 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24778 | continue; |
24779 | case OP_SetLocalFloat: |
24780 | PrintName("SetLocalFloat" ); |
24781 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
24782 | continue; |
24783 | #endif |
24784 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24785 | bool emitSetLocalSint8( uint32_t , const SourceInfo &); |
24786 | bool emitSetLocalUint8( uint32_t , const SourceInfo &); |
24787 | bool emitSetLocalSint16( uint32_t , const SourceInfo &); |
24788 | bool emitSetLocalUint16( uint32_t , const SourceInfo &); |
24789 | bool emitSetLocalSint32( uint32_t , const SourceInfo &); |
24790 | bool emitSetLocalUint32( uint32_t , const SourceInfo &); |
24791 | bool emitSetLocalSint64( uint32_t , const SourceInfo &); |
24792 | bool emitSetLocalUint64( uint32_t , const SourceInfo &); |
24793 | bool emitSetLocalIntAP( uint32_t , const SourceInfo &); |
24794 | bool emitSetLocalIntAPS( uint32_t , const SourceInfo &); |
24795 | bool emitSetLocalBool( uint32_t , const SourceInfo &); |
24796 | bool emitSetLocalPtr( uint32_t , const SourceInfo &); |
24797 | bool emitSetLocalFnPtr( uint32_t , const SourceInfo &); |
24798 | bool emitSetLocalMemberPtr( uint32_t , const SourceInfo &); |
24799 | bool emitSetLocalFloat( uint32_t , const SourceInfo &); |
24800 | #if defined(GET_EVAL_PROTO) |
24801 | template<PrimType> |
24802 | bool emitSetLocal(uint32_t, const SourceInfo &); |
24803 | #endif |
24804 | #endif |
24805 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
24806 | [[nodiscard]] bool emitSetLocal(PrimType, uint32_t, const SourceInfo &I); |
24807 | #endif |
24808 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
24809 | bool |
24810 | #if defined(GET_EVAL_IMPL) |
24811 | EvalEmitter |
24812 | #else |
24813 | ByteCodeEmitter |
24814 | #endif |
24815 | ::emitSetLocal(PrimType T0, uint32_t A0, const SourceInfo &I) { |
24816 | switch (T0) { |
24817 | case PT_Sint8: |
24818 | #ifdef GET_LINK_IMPL |
24819 | return emitSetLocalSint8 |
24820 | #else |
24821 | return emitSetLocal<PT_Sint8> |
24822 | #endif |
24823 | (A0, I); |
24824 | case PT_Uint8: |
24825 | #ifdef GET_LINK_IMPL |
24826 | return emitSetLocalUint8 |
24827 | #else |
24828 | return emitSetLocal<PT_Uint8> |
24829 | #endif |
24830 | (A0, I); |
24831 | case PT_Sint16: |
24832 | #ifdef GET_LINK_IMPL |
24833 | return emitSetLocalSint16 |
24834 | #else |
24835 | return emitSetLocal<PT_Sint16> |
24836 | #endif |
24837 | (A0, I); |
24838 | case PT_Uint16: |
24839 | #ifdef GET_LINK_IMPL |
24840 | return emitSetLocalUint16 |
24841 | #else |
24842 | return emitSetLocal<PT_Uint16> |
24843 | #endif |
24844 | (A0, I); |
24845 | case PT_Sint32: |
24846 | #ifdef GET_LINK_IMPL |
24847 | return emitSetLocalSint32 |
24848 | #else |
24849 | return emitSetLocal<PT_Sint32> |
24850 | #endif |
24851 | (A0, I); |
24852 | case PT_Uint32: |
24853 | #ifdef GET_LINK_IMPL |
24854 | return emitSetLocalUint32 |
24855 | #else |
24856 | return emitSetLocal<PT_Uint32> |
24857 | #endif |
24858 | (A0, I); |
24859 | case PT_Sint64: |
24860 | #ifdef GET_LINK_IMPL |
24861 | return emitSetLocalSint64 |
24862 | #else |
24863 | return emitSetLocal<PT_Sint64> |
24864 | #endif |
24865 | (A0, I); |
24866 | case PT_Uint64: |
24867 | #ifdef GET_LINK_IMPL |
24868 | return emitSetLocalUint64 |
24869 | #else |
24870 | return emitSetLocal<PT_Uint64> |
24871 | #endif |
24872 | (A0, I); |
24873 | case PT_IntAP: |
24874 | #ifdef GET_LINK_IMPL |
24875 | return emitSetLocalIntAP |
24876 | #else |
24877 | return emitSetLocal<PT_IntAP> |
24878 | #endif |
24879 | (A0, I); |
24880 | case PT_IntAPS: |
24881 | #ifdef GET_LINK_IMPL |
24882 | return emitSetLocalIntAPS |
24883 | #else |
24884 | return emitSetLocal<PT_IntAPS> |
24885 | #endif |
24886 | (A0, I); |
24887 | case PT_Bool: |
24888 | #ifdef GET_LINK_IMPL |
24889 | return emitSetLocalBool |
24890 | #else |
24891 | return emitSetLocal<PT_Bool> |
24892 | #endif |
24893 | (A0, I); |
24894 | case PT_Ptr: |
24895 | #ifdef GET_LINK_IMPL |
24896 | return emitSetLocalPtr |
24897 | #else |
24898 | return emitSetLocal<PT_Ptr> |
24899 | #endif |
24900 | (A0, I); |
24901 | case PT_FnPtr: |
24902 | #ifdef GET_LINK_IMPL |
24903 | return emitSetLocalFnPtr |
24904 | #else |
24905 | return emitSetLocal<PT_FnPtr> |
24906 | #endif |
24907 | (A0, I); |
24908 | case PT_MemberPtr: |
24909 | #ifdef GET_LINK_IMPL |
24910 | return emitSetLocalMemberPtr |
24911 | #else |
24912 | return emitSetLocal<PT_MemberPtr> |
24913 | #endif |
24914 | (A0, I); |
24915 | case PT_Float: |
24916 | #ifdef GET_LINK_IMPL |
24917 | return emitSetLocalFloat |
24918 | #else |
24919 | return emitSetLocal<PT_Float> |
24920 | #endif |
24921 | (A0, I); |
24922 | } |
24923 | llvm_unreachable("invalid enum value" ); |
24924 | } |
24925 | #endif |
24926 | #ifdef GET_LINK_IMPL |
24927 | bool ByteCodeEmitter::emitSetLocalSint8( uint32_t A0, const SourceInfo &L) { |
24928 | return emitOp<uint32_t>(OP_SetLocalSint8, A0, L); |
24929 | } |
24930 | bool ByteCodeEmitter::emitSetLocalUint8( uint32_t A0, const SourceInfo &L) { |
24931 | return emitOp<uint32_t>(OP_SetLocalUint8, A0, L); |
24932 | } |
24933 | bool ByteCodeEmitter::emitSetLocalSint16( uint32_t A0, const SourceInfo &L) { |
24934 | return emitOp<uint32_t>(OP_SetLocalSint16, A0, L); |
24935 | } |
24936 | bool ByteCodeEmitter::emitSetLocalUint16( uint32_t A0, const SourceInfo &L) { |
24937 | return emitOp<uint32_t>(OP_SetLocalUint16, A0, L); |
24938 | } |
24939 | bool ByteCodeEmitter::emitSetLocalSint32( uint32_t A0, const SourceInfo &L) { |
24940 | return emitOp<uint32_t>(OP_SetLocalSint32, A0, L); |
24941 | } |
24942 | bool ByteCodeEmitter::emitSetLocalUint32( uint32_t A0, const SourceInfo &L) { |
24943 | return emitOp<uint32_t>(OP_SetLocalUint32, A0, L); |
24944 | } |
24945 | bool ByteCodeEmitter::emitSetLocalSint64( uint32_t A0, const SourceInfo &L) { |
24946 | return emitOp<uint32_t>(OP_SetLocalSint64, A0, L); |
24947 | } |
24948 | bool ByteCodeEmitter::emitSetLocalUint64( uint32_t A0, const SourceInfo &L) { |
24949 | return emitOp<uint32_t>(OP_SetLocalUint64, A0, L); |
24950 | } |
24951 | bool ByteCodeEmitter::emitSetLocalIntAP( uint32_t A0, const SourceInfo &L) { |
24952 | return emitOp<uint32_t>(OP_SetLocalIntAP, A0, L); |
24953 | } |
24954 | bool ByteCodeEmitter::emitSetLocalIntAPS( uint32_t A0, const SourceInfo &L) { |
24955 | return emitOp<uint32_t>(OP_SetLocalIntAPS, A0, L); |
24956 | } |
24957 | bool ByteCodeEmitter::emitSetLocalBool( uint32_t A0, const SourceInfo &L) { |
24958 | return emitOp<uint32_t>(OP_SetLocalBool, A0, L); |
24959 | } |
24960 | bool ByteCodeEmitter::emitSetLocalPtr( uint32_t A0, const SourceInfo &L) { |
24961 | return emitOp<uint32_t>(OP_SetLocalPtr, A0, L); |
24962 | } |
24963 | bool ByteCodeEmitter::emitSetLocalFnPtr( uint32_t A0, const SourceInfo &L) { |
24964 | return emitOp<uint32_t>(OP_SetLocalFnPtr, A0, L); |
24965 | } |
24966 | bool ByteCodeEmitter::emitSetLocalMemberPtr( uint32_t A0, const SourceInfo &L) { |
24967 | return emitOp<uint32_t>(OP_SetLocalMemberPtr, A0, L); |
24968 | } |
24969 | bool ByteCodeEmitter::emitSetLocalFloat( uint32_t A0, const SourceInfo &L) { |
24970 | return emitOp<uint32_t>(OP_SetLocalFloat, A0, L); |
24971 | } |
24972 | #endif |
24973 | #ifdef GET_OPCODE_NAMES |
24974 | OP_SetParamSint8, |
24975 | OP_SetParamUint8, |
24976 | OP_SetParamSint16, |
24977 | OP_SetParamUint16, |
24978 | OP_SetParamSint32, |
24979 | OP_SetParamUint32, |
24980 | OP_SetParamSint64, |
24981 | OP_SetParamUint64, |
24982 | OP_SetParamIntAP, |
24983 | OP_SetParamIntAPS, |
24984 | OP_SetParamBool, |
24985 | OP_SetParamPtr, |
24986 | OP_SetParamFnPtr, |
24987 | OP_SetParamMemberPtr, |
24988 | OP_SetParamFloat, |
24989 | #endif |
24990 | #ifdef GET_INTERP |
24991 | case OP_SetParamSint8: { |
24992 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24993 | if (!SetParam<PT_Sint8>(S, OpPC, V0)) |
24994 | return false; |
24995 | continue; |
24996 | } |
24997 | case OP_SetParamUint8: { |
24998 | const auto V0 = ReadArg<uint32_t>(S, PC); |
24999 | if (!SetParam<PT_Uint8>(S, OpPC, V0)) |
25000 | return false; |
25001 | continue; |
25002 | } |
25003 | case OP_SetParamSint16: { |
25004 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25005 | if (!SetParam<PT_Sint16>(S, OpPC, V0)) |
25006 | return false; |
25007 | continue; |
25008 | } |
25009 | case OP_SetParamUint16: { |
25010 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25011 | if (!SetParam<PT_Uint16>(S, OpPC, V0)) |
25012 | return false; |
25013 | continue; |
25014 | } |
25015 | case OP_SetParamSint32: { |
25016 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25017 | if (!SetParam<PT_Sint32>(S, OpPC, V0)) |
25018 | return false; |
25019 | continue; |
25020 | } |
25021 | case OP_SetParamUint32: { |
25022 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25023 | if (!SetParam<PT_Uint32>(S, OpPC, V0)) |
25024 | return false; |
25025 | continue; |
25026 | } |
25027 | case OP_SetParamSint64: { |
25028 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25029 | if (!SetParam<PT_Sint64>(S, OpPC, V0)) |
25030 | return false; |
25031 | continue; |
25032 | } |
25033 | case OP_SetParamUint64: { |
25034 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25035 | if (!SetParam<PT_Uint64>(S, OpPC, V0)) |
25036 | return false; |
25037 | continue; |
25038 | } |
25039 | case OP_SetParamIntAP: { |
25040 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25041 | if (!SetParam<PT_IntAP>(S, OpPC, V0)) |
25042 | return false; |
25043 | continue; |
25044 | } |
25045 | case OP_SetParamIntAPS: { |
25046 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25047 | if (!SetParam<PT_IntAPS>(S, OpPC, V0)) |
25048 | return false; |
25049 | continue; |
25050 | } |
25051 | case OP_SetParamBool: { |
25052 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25053 | if (!SetParam<PT_Bool>(S, OpPC, V0)) |
25054 | return false; |
25055 | continue; |
25056 | } |
25057 | case OP_SetParamPtr: { |
25058 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25059 | if (!SetParam<PT_Ptr>(S, OpPC, V0)) |
25060 | return false; |
25061 | continue; |
25062 | } |
25063 | case OP_SetParamFnPtr: { |
25064 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25065 | if (!SetParam<PT_FnPtr>(S, OpPC, V0)) |
25066 | return false; |
25067 | continue; |
25068 | } |
25069 | case OP_SetParamMemberPtr: { |
25070 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25071 | if (!SetParam<PT_MemberPtr>(S, OpPC, V0)) |
25072 | return false; |
25073 | continue; |
25074 | } |
25075 | case OP_SetParamFloat: { |
25076 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25077 | if (!SetParam<PT_Float>(S, OpPC, V0)) |
25078 | return false; |
25079 | continue; |
25080 | } |
25081 | #endif |
25082 | #ifdef GET_DISASM |
25083 | case OP_SetParamSint8: |
25084 | PrintName("SetParamSint8" ); |
25085 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25086 | continue; |
25087 | case OP_SetParamUint8: |
25088 | PrintName("SetParamUint8" ); |
25089 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25090 | continue; |
25091 | case OP_SetParamSint16: |
25092 | PrintName("SetParamSint16" ); |
25093 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25094 | continue; |
25095 | case OP_SetParamUint16: |
25096 | PrintName("SetParamUint16" ); |
25097 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25098 | continue; |
25099 | case OP_SetParamSint32: |
25100 | PrintName("SetParamSint32" ); |
25101 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25102 | continue; |
25103 | case OP_SetParamUint32: |
25104 | PrintName("SetParamUint32" ); |
25105 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25106 | continue; |
25107 | case OP_SetParamSint64: |
25108 | PrintName("SetParamSint64" ); |
25109 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25110 | continue; |
25111 | case OP_SetParamUint64: |
25112 | PrintName("SetParamUint64" ); |
25113 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25114 | continue; |
25115 | case OP_SetParamIntAP: |
25116 | PrintName("SetParamIntAP" ); |
25117 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25118 | continue; |
25119 | case OP_SetParamIntAPS: |
25120 | PrintName("SetParamIntAPS" ); |
25121 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25122 | continue; |
25123 | case OP_SetParamBool: |
25124 | PrintName("SetParamBool" ); |
25125 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25126 | continue; |
25127 | case OP_SetParamPtr: |
25128 | PrintName("SetParamPtr" ); |
25129 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25130 | continue; |
25131 | case OP_SetParamFnPtr: |
25132 | PrintName("SetParamFnPtr" ); |
25133 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25134 | continue; |
25135 | case OP_SetParamMemberPtr: |
25136 | PrintName("SetParamMemberPtr" ); |
25137 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25138 | continue; |
25139 | case OP_SetParamFloat: |
25140 | PrintName("SetParamFloat" ); |
25141 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25142 | continue; |
25143 | #endif |
25144 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25145 | bool emitSetParamSint8( uint32_t , const SourceInfo &); |
25146 | bool emitSetParamUint8( uint32_t , const SourceInfo &); |
25147 | bool emitSetParamSint16( uint32_t , const SourceInfo &); |
25148 | bool emitSetParamUint16( uint32_t , const SourceInfo &); |
25149 | bool emitSetParamSint32( uint32_t , const SourceInfo &); |
25150 | bool emitSetParamUint32( uint32_t , const SourceInfo &); |
25151 | bool emitSetParamSint64( uint32_t , const SourceInfo &); |
25152 | bool emitSetParamUint64( uint32_t , const SourceInfo &); |
25153 | bool emitSetParamIntAP( uint32_t , const SourceInfo &); |
25154 | bool emitSetParamIntAPS( uint32_t , const SourceInfo &); |
25155 | bool emitSetParamBool( uint32_t , const SourceInfo &); |
25156 | bool emitSetParamPtr( uint32_t , const SourceInfo &); |
25157 | bool emitSetParamFnPtr( uint32_t , const SourceInfo &); |
25158 | bool emitSetParamMemberPtr( uint32_t , const SourceInfo &); |
25159 | bool emitSetParamFloat( uint32_t , const SourceInfo &); |
25160 | #endif |
25161 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25162 | [[nodiscard]] bool emitSetParam(PrimType, uint32_t, const SourceInfo &I); |
25163 | #endif |
25164 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
25165 | bool |
25166 | #if defined(GET_EVAL_IMPL) |
25167 | EvalEmitter |
25168 | #else |
25169 | ByteCodeEmitter |
25170 | #endif |
25171 | ::emitSetParam(PrimType T0, uint32_t A0, const SourceInfo &I) { |
25172 | switch (T0) { |
25173 | case PT_Sint8: |
25174 | return emitSetParamSint8(A0, I); |
25175 | case PT_Uint8: |
25176 | return emitSetParamUint8(A0, I); |
25177 | case PT_Sint16: |
25178 | return emitSetParamSint16(A0, I); |
25179 | case PT_Uint16: |
25180 | return emitSetParamUint16(A0, I); |
25181 | case PT_Sint32: |
25182 | return emitSetParamSint32(A0, I); |
25183 | case PT_Uint32: |
25184 | return emitSetParamUint32(A0, I); |
25185 | case PT_Sint64: |
25186 | return emitSetParamSint64(A0, I); |
25187 | case PT_Uint64: |
25188 | return emitSetParamUint64(A0, I); |
25189 | case PT_IntAP: |
25190 | return emitSetParamIntAP(A0, I); |
25191 | case PT_IntAPS: |
25192 | return emitSetParamIntAPS(A0, I); |
25193 | case PT_Bool: |
25194 | return emitSetParamBool(A0, I); |
25195 | case PT_Ptr: |
25196 | return emitSetParamPtr(A0, I); |
25197 | case PT_FnPtr: |
25198 | return emitSetParamFnPtr(A0, I); |
25199 | case PT_MemberPtr: |
25200 | return emitSetParamMemberPtr(A0, I); |
25201 | case PT_Float: |
25202 | return emitSetParamFloat(A0, I); |
25203 | } |
25204 | llvm_unreachable("invalid enum value" ); |
25205 | } |
25206 | #endif |
25207 | #ifdef GET_LINK_IMPL |
25208 | bool ByteCodeEmitter::emitSetParamSint8( uint32_t A0, const SourceInfo &L) { |
25209 | return emitOp<uint32_t>(OP_SetParamSint8, A0, L); |
25210 | } |
25211 | bool ByteCodeEmitter::emitSetParamUint8( uint32_t A0, const SourceInfo &L) { |
25212 | return emitOp<uint32_t>(OP_SetParamUint8, A0, L); |
25213 | } |
25214 | bool ByteCodeEmitter::emitSetParamSint16( uint32_t A0, const SourceInfo &L) { |
25215 | return emitOp<uint32_t>(OP_SetParamSint16, A0, L); |
25216 | } |
25217 | bool ByteCodeEmitter::emitSetParamUint16( uint32_t A0, const SourceInfo &L) { |
25218 | return emitOp<uint32_t>(OP_SetParamUint16, A0, L); |
25219 | } |
25220 | bool ByteCodeEmitter::emitSetParamSint32( uint32_t A0, const SourceInfo &L) { |
25221 | return emitOp<uint32_t>(OP_SetParamSint32, A0, L); |
25222 | } |
25223 | bool ByteCodeEmitter::emitSetParamUint32( uint32_t A0, const SourceInfo &L) { |
25224 | return emitOp<uint32_t>(OP_SetParamUint32, A0, L); |
25225 | } |
25226 | bool ByteCodeEmitter::emitSetParamSint64( uint32_t A0, const SourceInfo &L) { |
25227 | return emitOp<uint32_t>(OP_SetParamSint64, A0, L); |
25228 | } |
25229 | bool ByteCodeEmitter::emitSetParamUint64( uint32_t A0, const SourceInfo &L) { |
25230 | return emitOp<uint32_t>(OP_SetParamUint64, A0, L); |
25231 | } |
25232 | bool ByteCodeEmitter::emitSetParamIntAP( uint32_t A0, const SourceInfo &L) { |
25233 | return emitOp<uint32_t>(OP_SetParamIntAP, A0, L); |
25234 | } |
25235 | bool ByteCodeEmitter::emitSetParamIntAPS( uint32_t A0, const SourceInfo &L) { |
25236 | return emitOp<uint32_t>(OP_SetParamIntAPS, A0, L); |
25237 | } |
25238 | bool ByteCodeEmitter::emitSetParamBool( uint32_t A0, const SourceInfo &L) { |
25239 | return emitOp<uint32_t>(OP_SetParamBool, A0, L); |
25240 | } |
25241 | bool ByteCodeEmitter::emitSetParamPtr( uint32_t A0, const SourceInfo &L) { |
25242 | return emitOp<uint32_t>(OP_SetParamPtr, A0, L); |
25243 | } |
25244 | bool ByteCodeEmitter::emitSetParamFnPtr( uint32_t A0, const SourceInfo &L) { |
25245 | return emitOp<uint32_t>(OP_SetParamFnPtr, A0, L); |
25246 | } |
25247 | bool ByteCodeEmitter::emitSetParamMemberPtr( uint32_t A0, const SourceInfo &L) { |
25248 | return emitOp<uint32_t>(OP_SetParamMemberPtr, A0, L); |
25249 | } |
25250 | bool ByteCodeEmitter::emitSetParamFloat( uint32_t A0, const SourceInfo &L) { |
25251 | return emitOp<uint32_t>(OP_SetParamFloat, A0, L); |
25252 | } |
25253 | #endif |
25254 | #ifdef GET_EVAL_IMPL |
25255 | bool EvalEmitter::emitSetParamSint8( uint32_t A0, const SourceInfo &L) { |
25256 | if (!isActive()) return true; |
25257 | CurrentSource = L; |
25258 | return SetParam<PT_Sint8>(S, OpPC, A0); |
25259 | } |
25260 | bool EvalEmitter::emitSetParamUint8( uint32_t A0, const SourceInfo &L) { |
25261 | if (!isActive()) return true; |
25262 | CurrentSource = L; |
25263 | return SetParam<PT_Uint8>(S, OpPC, A0); |
25264 | } |
25265 | bool EvalEmitter::emitSetParamSint16( uint32_t A0, const SourceInfo &L) { |
25266 | if (!isActive()) return true; |
25267 | CurrentSource = L; |
25268 | return SetParam<PT_Sint16>(S, OpPC, A0); |
25269 | } |
25270 | bool EvalEmitter::emitSetParamUint16( uint32_t A0, const SourceInfo &L) { |
25271 | if (!isActive()) return true; |
25272 | CurrentSource = L; |
25273 | return SetParam<PT_Uint16>(S, OpPC, A0); |
25274 | } |
25275 | bool EvalEmitter::emitSetParamSint32( uint32_t A0, const SourceInfo &L) { |
25276 | if (!isActive()) return true; |
25277 | CurrentSource = L; |
25278 | return SetParam<PT_Sint32>(S, OpPC, A0); |
25279 | } |
25280 | bool EvalEmitter::emitSetParamUint32( uint32_t A0, const SourceInfo &L) { |
25281 | if (!isActive()) return true; |
25282 | CurrentSource = L; |
25283 | return SetParam<PT_Uint32>(S, OpPC, A0); |
25284 | } |
25285 | bool EvalEmitter::emitSetParamSint64( uint32_t A0, const SourceInfo &L) { |
25286 | if (!isActive()) return true; |
25287 | CurrentSource = L; |
25288 | return SetParam<PT_Sint64>(S, OpPC, A0); |
25289 | } |
25290 | bool EvalEmitter::emitSetParamUint64( uint32_t A0, const SourceInfo &L) { |
25291 | if (!isActive()) return true; |
25292 | CurrentSource = L; |
25293 | return SetParam<PT_Uint64>(S, OpPC, A0); |
25294 | } |
25295 | bool EvalEmitter::emitSetParamIntAP( uint32_t A0, const SourceInfo &L) { |
25296 | if (!isActive()) return true; |
25297 | CurrentSource = L; |
25298 | return SetParam<PT_IntAP>(S, OpPC, A0); |
25299 | } |
25300 | bool EvalEmitter::emitSetParamIntAPS( uint32_t A0, const SourceInfo &L) { |
25301 | if (!isActive()) return true; |
25302 | CurrentSource = L; |
25303 | return SetParam<PT_IntAPS>(S, OpPC, A0); |
25304 | } |
25305 | bool EvalEmitter::emitSetParamBool( uint32_t A0, const SourceInfo &L) { |
25306 | if (!isActive()) return true; |
25307 | CurrentSource = L; |
25308 | return SetParam<PT_Bool>(S, OpPC, A0); |
25309 | } |
25310 | bool EvalEmitter::emitSetParamPtr( uint32_t A0, const SourceInfo &L) { |
25311 | if (!isActive()) return true; |
25312 | CurrentSource = L; |
25313 | return SetParam<PT_Ptr>(S, OpPC, A0); |
25314 | } |
25315 | bool EvalEmitter::emitSetParamFnPtr( uint32_t A0, const SourceInfo &L) { |
25316 | if (!isActive()) return true; |
25317 | CurrentSource = L; |
25318 | return SetParam<PT_FnPtr>(S, OpPC, A0); |
25319 | } |
25320 | bool EvalEmitter::emitSetParamMemberPtr( uint32_t A0, const SourceInfo &L) { |
25321 | if (!isActive()) return true; |
25322 | CurrentSource = L; |
25323 | return SetParam<PT_MemberPtr>(S, OpPC, A0); |
25324 | } |
25325 | bool EvalEmitter::emitSetParamFloat( uint32_t A0, const SourceInfo &L) { |
25326 | if (!isActive()) return true; |
25327 | CurrentSource = L; |
25328 | return SetParam<PT_Float>(S, OpPC, A0); |
25329 | } |
25330 | #endif |
25331 | #ifdef GET_OPCODE_NAMES |
25332 | OP_SetThisFieldSint8, |
25333 | OP_SetThisFieldUint8, |
25334 | OP_SetThisFieldSint16, |
25335 | OP_SetThisFieldUint16, |
25336 | OP_SetThisFieldSint32, |
25337 | OP_SetThisFieldUint32, |
25338 | OP_SetThisFieldSint64, |
25339 | OP_SetThisFieldUint64, |
25340 | OP_SetThisFieldIntAP, |
25341 | OP_SetThisFieldIntAPS, |
25342 | OP_SetThisFieldBool, |
25343 | OP_SetThisFieldPtr, |
25344 | OP_SetThisFieldFnPtr, |
25345 | OP_SetThisFieldMemberPtr, |
25346 | OP_SetThisFieldFloat, |
25347 | #endif |
25348 | #ifdef GET_INTERP |
25349 | case OP_SetThisFieldSint8: { |
25350 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25351 | if (!SetThisField<PT_Sint8>(S, OpPC, V0)) |
25352 | return false; |
25353 | continue; |
25354 | } |
25355 | case OP_SetThisFieldUint8: { |
25356 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25357 | if (!SetThisField<PT_Uint8>(S, OpPC, V0)) |
25358 | return false; |
25359 | continue; |
25360 | } |
25361 | case OP_SetThisFieldSint16: { |
25362 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25363 | if (!SetThisField<PT_Sint16>(S, OpPC, V0)) |
25364 | return false; |
25365 | continue; |
25366 | } |
25367 | case OP_SetThisFieldUint16: { |
25368 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25369 | if (!SetThisField<PT_Uint16>(S, OpPC, V0)) |
25370 | return false; |
25371 | continue; |
25372 | } |
25373 | case OP_SetThisFieldSint32: { |
25374 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25375 | if (!SetThisField<PT_Sint32>(S, OpPC, V0)) |
25376 | return false; |
25377 | continue; |
25378 | } |
25379 | case OP_SetThisFieldUint32: { |
25380 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25381 | if (!SetThisField<PT_Uint32>(S, OpPC, V0)) |
25382 | return false; |
25383 | continue; |
25384 | } |
25385 | case OP_SetThisFieldSint64: { |
25386 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25387 | if (!SetThisField<PT_Sint64>(S, OpPC, V0)) |
25388 | return false; |
25389 | continue; |
25390 | } |
25391 | case OP_SetThisFieldUint64: { |
25392 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25393 | if (!SetThisField<PT_Uint64>(S, OpPC, V0)) |
25394 | return false; |
25395 | continue; |
25396 | } |
25397 | case OP_SetThisFieldIntAP: { |
25398 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25399 | if (!SetThisField<PT_IntAP>(S, OpPC, V0)) |
25400 | return false; |
25401 | continue; |
25402 | } |
25403 | case OP_SetThisFieldIntAPS: { |
25404 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25405 | if (!SetThisField<PT_IntAPS>(S, OpPC, V0)) |
25406 | return false; |
25407 | continue; |
25408 | } |
25409 | case OP_SetThisFieldBool: { |
25410 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25411 | if (!SetThisField<PT_Bool>(S, OpPC, V0)) |
25412 | return false; |
25413 | continue; |
25414 | } |
25415 | case OP_SetThisFieldPtr: { |
25416 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25417 | if (!SetThisField<PT_Ptr>(S, OpPC, V0)) |
25418 | return false; |
25419 | continue; |
25420 | } |
25421 | case OP_SetThisFieldFnPtr: { |
25422 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25423 | if (!SetThisField<PT_FnPtr>(S, OpPC, V0)) |
25424 | return false; |
25425 | continue; |
25426 | } |
25427 | case OP_SetThisFieldMemberPtr: { |
25428 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25429 | if (!SetThisField<PT_MemberPtr>(S, OpPC, V0)) |
25430 | return false; |
25431 | continue; |
25432 | } |
25433 | case OP_SetThisFieldFloat: { |
25434 | const auto V0 = ReadArg<uint32_t>(S, PC); |
25435 | if (!SetThisField<PT_Float>(S, OpPC, V0)) |
25436 | return false; |
25437 | continue; |
25438 | } |
25439 | #endif |
25440 | #ifdef GET_DISASM |
25441 | case OP_SetThisFieldSint8: |
25442 | PrintName("SetThisFieldSint8" ); |
25443 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25444 | continue; |
25445 | case OP_SetThisFieldUint8: |
25446 | PrintName("SetThisFieldUint8" ); |
25447 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25448 | continue; |
25449 | case OP_SetThisFieldSint16: |
25450 | PrintName("SetThisFieldSint16" ); |
25451 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25452 | continue; |
25453 | case OP_SetThisFieldUint16: |
25454 | PrintName("SetThisFieldUint16" ); |
25455 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25456 | continue; |
25457 | case OP_SetThisFieldSint32: |
25458 | PrintName("SetThisFieldSint32" ); |
25459 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25460 | continue; |
25461 | case OP_SetThisFieldUint32: |
25462 | PrintName("SetThisFieldUint32" ); |
25463 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25464 | continue; |
25465 | case OP_SetThisFieldSint64: |
25466 | PrintName("SetThisFieldSint64" ); |
25467 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25468 | continue; |
25469 | case OP_SetThisFieldUint64: |
25470 | PrintName("SetThisFieldUint64" ); |
25471 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25472 | continue; |
25473 | case OP_SetThisFieldIntAP: |
25474 | PrintName("SetThisFieldIntAP" ); |
25475 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25476 | continue; |
25477 | case OP_SetThisFieldIntAPS: |
25478 | PrintName("SetThisFieldIntAPS" ); |
25479 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25480 | continue; |
25481 | case OP_SetThisFieldBool: |
25482 | PrintName("SetThisFieldBool" ); |
25483 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25484 | continue; |
25485 | case OP_SetThisFieldPtr: |
25486 | PrintName("SetThisFieldPtr" ); |
25487 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25488 | continue; |
25489 | case OP_SetThisFieldFnPtr: |
25490 | PrintName("SetThisFieldFnPtr" ); |
25491 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25492 | continue; |
25493 | case OP_SetThisFieldMemberPtr: |
25494 | PrintName("SetThisFieldMemberPtr" ); |
25495 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25496 | continue; |
25497 | case OP_SetThisFieldFloat: |
25498 | PrintName("SetThisFieldFloat" ); |
25499 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
25500 | continue; |
25501 | #endif |
25502 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25503 | bool emitSetThisFieldSint8( uint32_t , const SourceInfo &); |
25504 | bool emitSetThisFieldUint8( uint32_t , const SourceInfo &); |
25505 | bool emitSetThisFieldSint16( uint32_t , const SourceInfo &); |
25506 | bool emitSetThisFieldUint16( uint32_t , const SourceInfo &); |
25507 | bool emitSetThisFieldSint32( uint32_t , const SourceInfo &); |
25508 | bool emitSetThisFieldUint32( uint32_t , const SourceInfo &); |
25509 | bool emitSetThisFieldSint64( uint32_t , const SourceInfo &); |
25510 | bool emitSetThisFieldUint64( uint32_t , const SourceInfo &); |
25511 | bool emitSetThisFieldIntAP( uint32_t , const SourceInfo &); |
25512 | bool emitSetThisFieldIntAPS( uint32_t , const SourceInfo &); |
25513 | bool emitSetThisFieldBool( uint32_t , const SourceInfo &); |
25514 | bool emitSetThisFieldPtr( uint32_t , const SourceInfo &); |
25515 | bool emitSetThisFieldFnPtr( uint32_t , const SourceInfo &); |
25516 | bool emitSetThisFieldMemberPtr( uint32_t , const SourceInfo &); |
25517 | bool emitSetThisFieldFloat( uint32_t , const SourceInfo &); |
25518 | #endif |
25519 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
25520 | [[nodiscard]] bool emitSetThisField(PrimType, uint32_t, const SourceInfo &I); |
25521 | #endif |
25522 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
25523 | bool |
25524 | #if defined(GET_EVAL_IMPL) |
25525 | EvalEmitter |
25526 | #else |
25527 | ByteCodeEmitter |
25528 | #endif |
25529 | ::emitSetThisField(PrimType T0, uint32_t A0, const SourceInfo &I) { |
25530 | switch (T0) { |
25531 | case PT_Sint8: |
25532 | return emitSetThisFieldSint8(A0, I); |
25533 | case PT_Uint8: |
25534 | return emitSetThisFieldUint8(A0, I); |
25535 | case PT_Sint16: |
25536 | return emitSetThisFieldSint16(A0, I); |
25537 | case PT_Uint16: |
25538 | return emitSetThisFieldUint16(A0, I); |
25539 | case PT_Sint32: |
25540 | return emitSetThisFieldSint32(A0, I); |
25541 | case PT_Uint32: |
25542 | return emitSetThisFieldUint32(A0, I); |
25543 | case PT_Sint64: |
25544 | return emitSetThisFieldSint64(A0, I); |
25545 | case PT_Uint64: |
25546 | return emitSetThisFieldUint64(A0, I); |
25547 | case PT_IntAP: |
25548 | return emitSetThisFieldIntAP(A0, I); |
25549 | case PT_IntAPS: |
25550 | return emitSetThisFieldIntAPS(A0, I); |
25551 | case PT_Bool: |
25552 | return emitSetThisFieldBool(A0, I); |
25553 | case PT_Ptr: |
25554 | return emitSetThisFieldPtr(A0, I); |
25555 | case PT_FnPtr: |
25556 | return emitSetThisFieldFnPtr(A0, I); |
25557 | case PT_MemberPtr: |
25558 | return emitSetThisFieldMemberPtr(A0, I); |
25559 | case PT_Float: |
25560 | return emitSetThisFieldFloat(A0, I); |
25561 | } |
25562 | llvm_unreachable("invalid enum value" ); |
25563 | } |
25564 | #endif |
25565 | #ifdef GET_LINK_IMPL |
25566 | bool ByteCodeEmitter::emitSetThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
25567 | return emitOp<uint32_t>(OP_SetThisFieldSint8, A0, L); |
25568 | } |
25569 | bool ByteCodeEmitter::emitSetThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
25570 | return emitOp<uint32_t>(OP_SetThisFieldUint8, A0, L); |
25571 | } |
25572 | bool ByteCodeEmitter::emitSetThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
25573 | return emitOp<uint32_t>(OP_SetThisFieldSint16, A0, L); |
25574 | } |
25575 | bool ByteCodeEmitter::emitSetThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
25576 | return emitOp<uint32_t>(OP_SetThisFieldUint16, A0, L); |
25577 | } |
25578 | bool ByteCodeEmitter::emitSetThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
25579 | return emitOp<uint32_t>(OP_SetThisFieldSint32, A0, L); |
25580 | } |
25581 | bool ByteCodeEmitter::emitSetThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
25582 | return emitOp<uint32_t>(OP_SetThisFieldUint32, A0, L); |
25583 | } |
25584 | bool ByteCodeEmitter::emitSetThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
25585 | return emitOp<uint32_t>(OP_SetThisFieldSint64, A0, L); |
25586 | } |
25587 | bool ByteCodeEmitter::emitSetThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
25588 | return emitOp<uint32_t>(OP_SetThisFieldUint64, A0, L); |
25589 | } |
25590 | bool ByteCodeEmitter::emitSetThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
25591 | return emitOp<uint32_t>(OP_SetThisFieldIntAP, A0, L); |
25592 | } |
25593 | bool ByteCodeEmitter::emitSetThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
25594 | return emitOp<uint32_t>(OP_SetThisFieldIntAPS, A0, L); |
25595 | } |
25596 | bool ByteCodeEmitter::emitSetThisFieldBool( uint32_t A0, const SourceInfo &L) { |
25597 | return emitOp<uint32_t>(OP_SetThisFieldBool, A0, L); |
25598 | } |
25599 | bool ByteCodeEmitter::emitSetThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
25600 | return emitOp<uint32_t>(OP_SetThisFieldPtr, A0, L); |
25601 | } |
25602 | bool ByteCodeEmitter::emitSetThisFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
25603 | return emitOp<uint32_t>(OP_SetThisFieldFnPtr, A0, L); |
25604 | } |
25605 | bool ByteCodeEmitter::emitSetThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
25606 | return emitOp<uint32_t>(OP_SetThisFieldMemberPtr, A0, L); |
25607 | } |
25608 | bool ByteCodeEmitter::emitSetThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
25609 | return emitOp<uint32_t>(OP_SetThisFieldFloat, A0, L); |
25610 | } |
25611 | #endif |
25612 | #ifdef GET_EVAL_IMPL |
25613 | bool EvalEmitter::emitSetThisFieldSint8( uint32_t A0, const SourceInfo &L) { |
25614 | if (!isActive()) return true; |
25615 | CurrentSource = L; |
25616 | return SetThisField<PT_Sint8>(S, OpPC, A0); |
25617 | } |
25618 | bool EvalEmitter::emitSetThisFieldUint8( uint32_t A0, const SourceInfo &L) { |
25619 | if (!isActive()) return true; |
25620 | CurrentSource = L; |
25621 | return SetThisField<PT_Uint8>(S, OpPC, A0); |
25622 | } |
25623 | bool EvalEmitter::emitSetThisFieldSint16( uint32_t A0, const SourceInfo &L) { |
25624 | if (!isActive()) return true; |
25625 | CurrentSource = L; |
25626 | return SetThisField<PT_Sint16>(S, OpPC, A0); |
25627 | } |
25628 | bool EvalEmitter::emitSetThisFieldUint16( uint32_t A0, const SourceInfo &L) { |
25629 | if (!isActive()) return true; |
25630 | CurrentSource = L; |
25631 | return SetThisField<PT_Uint16>(S, OpPC, A0); |
25632 | } |
25633 | bool EvalEmitter::emitSetThisFieldSint32( uint32_t A0, const SourceInfo &L) { |
25634 | if (!isActive()) return true; |
25635 | CurrentSource = L; |
25636 | return SetThisField<PT_Sint32>(S, OpPC, A0); |
25637 | } |
25638 | bool EvalEmitter::emitSetThisFieldUint32( uint32_t A0, const SourceInfo &L) { |
25639 | if (!isActive()) return true; |
25640 | CurrentSource = L; |
25641 | return SetThisField<PT_Uint32>(S, OpPC, A0); |
25642 | } |
25643 | bool EvalEmitter::emitSetThisFieldSint64( uint32_t A0, const SourceInfo &L) { |
25644 | if (!isActive()) return true; |
25645 | CurrentSource = L; |
25646 | return SetThisField<PT_Sint64>(S, OpPC, A0); |
25647 | } |
25648 | bool EvalEmitter::emitSetThisFieldUint64( uint32_t A0, const SourceInfo &L) { |
25649 | if (!isActive()) return true; |
25650 | CurrentSource = L; |
25651 | return SetThisField<PT_Uint64>(S, OpPC, A0); |
25652 | } |
25653 | bool EvalEmitter::emitSetThisFieldIntAP( uint32_t A0, const SourceInfo &L) { |
25654 | if (!isActive()) return true; |
25655 | CurrentSource = L; |
25656 | return SetThisField<PT_IntAP>(S, OpPC, A0); |
25657 | } |
25658 | bool EvalEmitter::emitSetThisFieldIntAPS( uint32_t A0, const SourceInfo &L) { |
25659 | if (!isActive()) return true; |
25660 | CurrentSource = L; |
25661 | return SetThisField<PT_IntAPS>(S, OpPC, A0); |
25662 | } |
25663 | bool EvalEmitter::emitSetThisFieldBool( uint32_t A0, const SourceInfo &L) { |
25664 | if (!isActive()) return true; |
25665 | CurrentSource = L; |
25666 | return SetThisField<PT_Bool>(S, OpPC, A0); |
25667 | } |
25668 | bool EvalEmitter::emitSetThisFieldPtr( uint32_t A0, const SourceInfo &L) { |
25669 | if (!isActive()) return true; |
25670 | CurrentSource = L; |
25671 | return SetThisField<PT_Ptr>(S, OpPC, A0); |
25672 | } |
25673 | bool EvalEmitter::emitSetThisFieldFnPtr( uint32_t A0, const SourceInfo &L) { |
25674 | if (!isActive()) return true; |
25675 | CurrentSource = L; |
25676 | return SetThisField<PT_FnPtr>(S, OpPC, A0); |
25677 | } |
25678 | bool EvalEmitter::emitSetThisFieldMemberPtr( uint32_t A0, const SourceInfo &L) { |
25679 | if (!isActive()) return true; |
25680 | CurrentSource = L; |
25681 | return SetThisField<PT_MemberPtr>(S, OpPC, A0); |
25682 | } |
25683 | bool EvalEmitter::emitSetThisFieldFloat( uint32_t A0, const SourceInfo &L) { |
25684 | if (!isActive()) return true; |
25685 | CurrentSource = L; |
25686 | return SetThisField<PT_Float>(S, OpPC, A0); |
25687 | } |
25688 | #endif |
25689 | #ifdef GET_OPCODE_NAMES |
25690 | OP_ShlSint8Sint8, |
25691 | OP_ShlSint8Uint8, |
25692 | OP_ShlSint8Sint16, |
25693 | OP_ShlSint8Uint16, |
25694 | OP_ShlSint8Sint32, |
25695 | OP_ShlSint8Uint32, |
25696 | OP_ShlSint8Sint64, |
25697 | OP_ShlSint8Uint64, |
25698 | OP_ShlSint8IntAP, |
25699 | OP_ShlSint8IntAPS, |
25700 | OP_ShlUint8Sint8, |
25701 | OP_ShlUint8Uint8, |
25702 | OP_ShlUint8Sint16, |
25703 | OP_ShlUint8Uint16, |
25704 | OP_ShlUint8Sint32, |
25705 | OP_ShlUint8Uint32, |
25706 | OP_ShlUint8Sint64, |
25707 | OP_ShlUint8Uint64, |
25708 | OP_ShlUint8IntAP, |
25709 | OP_ShlUint8IntAPS, |
25710 | OP_ShlSint16Sint8, |
25711 | OP_ShlSint16Uint8, |
25712 | OP_ShlSint16Sint16, |
25713 | OP_ShlSint16Uint16, |
25714 | OP_ShlSint16Sint32, |
25715 | OP_ShlSint16Uint32, |
25716 | OP_ShlSint16Sint64, |
25717 | OP_ShlSint16Uint64, |
25718 | OP_ShlSint16IntAP, |
25719 | OP_ShlSint16IntAPS, |
25720 | OP_ShlUint16Sint8, |
25721 | OP_ShlUint16Uint8, |
25722 | OP_ShlUint16Sint16, |
25723 | OP_ShlUint16Uint16, |
25724 | OP_ShlUint16Sint32, |
25725 | OP_ShlUint16Uint32, |
25726 | OP_ShlUint16Sint64, |
25727 | OP_ShlUint16Uint64, |
25728 | OP_ShlUint16IntAP, |
25729 | OP_ShlUint16IntAPS, |
25730 | OP_ShlSint32Sint8, |
25731 | OP_ShlSint32Uint8, |
25732 | OP_ShlSint32Sint16, |
25733 | OP_ShlSint32Uint16, |
25734 | OP_ShlSint32Sint32, |
25735 | OP_ShlSint32Uint32, |
25736 | OP_ShlSint32Sint64, |
25737 | OP_ShlSint32Uint64, |
25738 | OP_ShlSint32IntAP, |
25739 | OP_ShlSint32IntAPS, |
25740 | OP_ShlUint32Sint8, |
25741 | OP_ShlUint32Uint8, |
25742 | OP_ShlUint32Sint16, |
25743 | OP_ShlUint32Uint16, |
25744 | OP_ShlUint32Sint32, |
25745 | OP_ShlUint32Uint32, |
25746 | OP_ShlUint32Sint64, |
25747 | OP_ShlUint32Uint64, |
25748 | OP_ShlUint32IntAP, |
25749 | OP_ShlUint32IntAPS, |
25750 | OP_ShlSint64Sint8, |
25751 | OP_ShlSint64Uint8, |
25752 | OP_ShlSint64Sint16, |
25753 | OP_ShlSint64Uint16, |
25754 | OP_ShlSint64Sint32, |
25755 | OP_ShlSint64Uint32, |
25756 | OP_ShlSint64Sint64, |
25757 | OP_ShlSint64Uint64, |
25758 | OP_ShlSint64IntAP, |
25759 | OP_ShlSint64IntAPS, |
25760 | OP_ShlUint64Sint8, |
25761 | OP_ShlUint64Uint8, |
25762 | OP_ShlUint64Sint16, |
25763 | OP_ShlUint64Uint16, |
25764 | OP_ShlUint64Sint32, |
25765 | OP_ShlUint64Uint32, |
25766 | OP_ShlUint64Sint64, |
25767 | OP_ShlUint64Uint64, |
25768 | OP_ShlUint64IntAP, |
25769 | OP_ShlUint64IntAPS, |
25770 | OP_ShlIntAPSint8, |
25771 | OP_ShlIntAPUint8, |
25772 | OP_ShlIntAPSint16, |
25773 | OP_ShlIntAPUint16, |
25774 | OP_ShlIntAPSint32, |
25775 | OP_ShlIntAPUint32, |
25776 | OP_ShlIntAPSint64, |
25777 | OP_ShlIntAPUint64, |
25778 | OP_ShlIntAPIntAP, |
25779 | OP_ShlIntAPIntAPS, |
25780 | OP_ShlIntAPSSint8, |
25781 | OP_ShlIntAPSUint8, |
25782 | OP_ShlIntAPSSint16, |
25783 | OP_ShlIntAPSUint16, |
25784 | OP_ShlIntAPSSint32, |
25785 | OP_ShlIntAPSUint32, |
25786 | OP_ShlIntAPSSint64, |
25787 | OP_ShlIntAPSUint64, |
25788 | OP_ShlIntAPSIntAP, |
25789 | OP_ShlIntAPSIntAPS, |
25790 | #endif |
25791 | #ifdef GET_INTERP |
25792 | case OP_ShlSint8Sint8: { |
25793 | if (!Shl<PT_Sint8, PT_Sint8>(S, OpPC)) |
25794 | return false; |
25795 | continue; |
25796 | } |
25797 | case OP_ShlSint8Uint8: { |
25798 | if (!Shl<PT_Sint8, PT_Uint8>(S, OpPC)) |
25799 | return false; |
25800 | continue; |
25801 | } |
25802 | case OP_ShlSint8Sint16: { |
25803 | if (!Shl<PT_Sint8, PT_Sint16>(S, OpPC)) |
25804 | return false; |
25805 | continue; |
25806 | } |
25807 | case OP_ShlSint8Uint16: { |
25808 | if (!Shl<PT_Sint8, PT_Uint16>(S, OpPC)) |
25809 | return false; |
25810 | continue; |
25811 | } |
25812 | case OP_ShlSint8Sint32: { |
25813 | if (!Shl<PT_Sint8, PT_Sint32>(S, OpPC)) |
25814 | return false; |
25815 | continue; |
25816 | } |
25817 | case OP_ShlSint8Uint32: { |
25818 | if (!Shl<PT_Sint8, PT_Uint32>(S, OpPC)) |
25819 | return false; |
25820 | continue; |
25821 | } |
25822 | case OP_ShlSint8Sint64: { |
25823 | if (!Shl<PT_Sint8, PT_Sint64>(S, OpPC)) |
25824 | return false; |
25825 | continue; |
25826 | } |
25827 | case OP_ShlSint8Uint64: { |
25828 | if (!Shl<PT_Sint8, PT_Uint64>(S, OpPC)) |
25829 | return false; |
25830 | continue; |
25831 | } |
25832 | case OP_ShlSint8IntAP: { |
25833 | if (!Shl<PT_Sint8, PT_IntAP>(S, OpPC)) |
25834 | return false; |
25835 | continue; |
25836 | } |
25837 | case OP_ShlSint8IntAPS: { |
25838 | if (!Shl<PT_Sint8, PT_IntAPS>(S, OpPC)) |
25839 | return false; |
25840 | continue; |
25841 | } |
25842 | case OP_ShlUint8Sint8: { |
25843 | if (!Shl<PT_Uint8, PT_Sint8>(S, OpPC)) |
25844 | return false; |
25845 | continue; |
25846 | } |
25847 | case OP_ShlUint8Uint8: { |
25848 | if (!Shl<PT_Uint8, PT_Uint8>(S, OpPC)) |
25849 | return false; |
25850 | continue; |
25851 | } |
25852 | case OP_ShlUint8Sint16: { |
25853 | if (!Shl<PT_Uint8, PT_Sint16>(S, OpPC)) |
25854 | return false; |
25855 | continue; |
25856 | } |
25857 | case OP_ShlUint8Uint16: { |
25858 | if (!Shl<PT_Uint8, PT_Uint16>(S, OpPC)) |
25859 | return false; |
25860 | continue; |
25861 | } |
25862 | case OP_ShlUint8Sint32: { |
25863 | if (!Shl<PT_Uint8, PT_Sint32>(S, OpPC)) |
25864 | return false; |
25865 | continue; |
25866 | } |
25867 | case OP_ShlUint8Uint32: { |
25868 | if (!Shl<PT_Uint8, PT_Uint32>(S, OpPC)) |
25869 | return false; |
25870 | continue; |
25871 | } |
25872 | case OP_ShlUint8Sint64: { |
25873 | if (!Shl<PT_Uint8, PT_Sint64>(S, OpPC)) |
25874 | return false; |
25875 | continue; |
25876 | } |
25877 | case OP_ShlUint8Uint64: { |
25878 | if (!Shl<PT_Uint8, PT_Uint64>(S, OpPC)) |
25879 | return false; |
25880 | continue; |
25881 | } |
25882 | case OP_ShlUint8IntAP: { |
25883 | if (!Shl<PT_Uint8, PT_IntAP>(S, OpPC)) |
25884 | return false; |
25885 | continue; |
25886 | } |
25887 | case OP_ShlUint8IntAPS: { |
25888 | if (!Shl<PT_Uint8, PT_IntAPS>(S, OpPC)) |
25889 | return false; |
25890 | continue; |
25891 | } |
25892 | case OP_ShlSint16Sint8: { |
25893 | if (!Shl<PT_Sint16, PT_Sint8>(S, OpPC)) |
25894 | return false; |
25895 | continue; |
25896 | } |
25897 | case OP_ShlSint16Uint8: { |
25898 | if (!Shl<PT_Sint16, PT_Uint8>(S, OpPC)) |
25899 | return false; |
25900 | continue; |
25901 | } |
25902 | case OP_ShlSint16Sint16: { |
25903 | if (!Shl<PT_Sint16, PT_Sint16>(S, OpPC)) |
25904 | return false; |
25905 | continue; |
25906 | } |
25907 | case OP_ShlSint16Uint16: { |
25908 | if (!Shl<PT_Sint16, PT_Uint16>(S, OpPC)) |
25909 | return false; |
25910 | continue; |
25911 | } |
25912 | case OP_ShlSint16Sint32: { |
25913 | if (!Shl<PT_Sint16, PT_Sint32>(S, OpPC)) |
25914 | return false; |
25915 | continue; |
25916 | } |
25917 | case OP_ShlSint16Uint32: { |
25918 | if (!Shl<PT_Sint16, PT_Uint32>(S, OpPC)) |
25919 | return false; |
25920 | continue; |
25921 | } |
25922 | case OP_ShlSint16Sint64: { |
25923 | if (!Shl<PT_Sint16, PT_Sint64>(S, OpPC)) |
25924 | return false; |
25925 | continue; |
25926 | } |
25927 | case OP_ShlSint16Uint64: { |
25928 | if (!Shl<PT_Sint16, PT_Uint64>(S, OpPC)) |
25929 | return false; |
25930 | continue; |
25931 | } |
25932 | case OP_ShlSint16IntAP: { |
25933 | if (!Shl<PT_Sint16, PT_IntAP>(S, OpPC)) |
25934 | return false; |
25935 | continue; |
25936 | } |
25937 | case OP_ShlSint16IntAPS: { |
25938 | if (!Shl<PT_Sint16, PT_IntAPS>(S, OpPC)) |
25939 | return false; |
25940 | continue; |
25941 | } |
25942 | case OP_ShlUint16Sint8: { |
25943 | if (!Shl<PT_Uint16, PT_Sint8>(S, OpPC)) |
25944 | return false; |
25945 | continue; |
25946 | } |
25947 | case OP_ShlUint16Uint8: { |
25948 | if (!Shl<PT_Uint16, PT_Uint8>(S, OpPC)) |
25949 | return false; |
25950 | continue; |
25951 | } |
25952 | case OP_ShlUint16Sint16: { |
25953 | if (!Shl<PT_Uint16, PT_Sint16>(S, OpPC)) |
25954 | return false; |
25955 | continue; |
25956 | } |
25957 | case OP_ShlUint16Uint16: { |
25958 | if (!Shl<PT_Uint16, PT_Uint16>(S, OpPC)) |
25959 | return false; |
25960 | continue; |
25961 | } |
25962 | case OP_ShlUint16Sint32: { |
25963 | if (!Shl<PT_Uint16, PT_Sint32>(S, OpPC)) |
25964 | return false; |
25965 | continue; |
25966 | } |
25967 | case OP_ShlUint16Uint32: { |
25968 | if (!Shl<PT_Uint16, PT_Uint32>(S, OpPC)) |
25969 | return false; |
25970 | continue; |
25971 | } |
25972 | case OP_ShlUint16Sint64: { |
25973 | if (!Shl<PT_Uint16, PT_Sint64>(S, OpPC)) |
25974 | return false; |
25975 | continue; |
25976 | } |
25977 | case OP_ShlUint16Uint64: { |
25978 | if (!Shl<PT_Uint16, PT_Uint64>(S, OpPC)) |
25979 | return false; |
25980 | continue; |
25981 | } |
25982 | case OP_ShlUint16IntAP: { |
25983 | if (!Shl<PT_Uint16, PT_IntAP>(S, OpPC)) |
25984 | return false; |
25985 | continue; |
25986 | } |
25987 | case OP_ShlUint16IntAPS: { |
25988 | if (!Shl<PT_Uint16, PT_IntAPS>(S, OpPC)) |
25989 | return false; |
25990 | continue; |
25991 | } |
25992 | case OP_ShlSint32Sint8: { |
25993 | if (!Shl<PT_Sint32, PT_Sint8>(S, OpPC)) |
25994 | return false; |
25995 | continue; |
25996 | } |
25997 | case OP_ShlSint32Uint8: { |
25998 | if (!Shl<PT_Sint32, PT_Uint8>(S, OpPC)) |
25999 | return false; |
26000 | continue; |
26001 | } |
26002 | case OP_ShlSint32Sint16: { |
26003 | if (!Shl<PT_Sint32, PT_Sint16>(S, OpPC)) |
26004 | return false; |
26005 | continue; |
26006 | } |
26007 | case OP_ShlSint32Uint16: { |
26008 | if (!Shl<PT_Sint32, PT_Uint16>(S, OpPC)) |
26009 | return false; |
26010 | continue; |
26011 | } |
26012 | case OP_ShlSint32Sint32: { |
26013 | if (!Shl<PT_Sint32, PT_Sint32>(S, OpPC)) |
26014 | return false; |
26015 | continue; |
26016 | } |
26017 | case OP_ShlSint32Uint32: { |
26018 | if (!Shl<PT_Sint32, PT_Uint32>(S, OpPC)) |
26019 | return false; |
26020 | continue; |
26021 | } |
26022 | case OP_ShlSint32Sint64: { |
26023 | if (!Shl<PT_Sint32, PT_Sint64>(S, OpPC)) |
26024 | return false; |
26025 | continue; |
26026 | } |
26027 | case OP_ShlSint32Uint64: { |
26028 | if (!Shl<PT_Sint32, PT_Uint64>(S, OpPC)) |
26029 | return false; |
26030 | continue; |
26031 | } |
26032 | case OP_ShlSint32IntAP: { |
26033 | if (!Shl<PT_Sint32, PT_IntAP>(S, OpPC)) |
26034 | return false; |
26035 | continue; |
26036 | } |
26037 | case OP_ShlSint32IntAPS: { |
26038 | if (!Shl<PT_Sint32, PT_IntAPS>(S, OpPC)) |
26039 | return false; |
26040 | continue; |
26041 | } |
26042 | case OP_ShlUint32Sint8: { |
26043 | if (!Shl<PT_Uint32, PT_Sint8>(S, OpPC)) |
26044 | return false; |
26045 | continue; |
26046 | } |
26047 | case OP_ShlUint32Uint8: { |
26048 | if (!Shl<PT_Uint32, PT_Uint8>(S, OpPC)) |
26049 | return false; |
26050 | continue; |
26051 | } |
26052 | case OP_ShlUint32Sint16: { |
26053 | if (!Shl<PT_Uint32, PT_Sint16>(S, OpPC)) |
26054 | return false; |
26055 | continue; |
26056 | } |
26057 | case OP_ShlUint32Uint16: { |
26058 | if (!Shl<PT_Uint32, PT_Uint16>(S, OpPC)) |
26059 | return false; |
26060 | continue; |
26061 | } |
26062 | case OP_ShlUint32Sint32: { |
26063 | if (!Shl<PT_Uint32, PT_Sint32>(S, OpPC)) |
26064 | return false; |
26065 | continue; |
26066 | } |
26067 | case OP_ShlUint32Uint32: { |
26068 | if (!Shl<PT_Uint32, PT_Uint32>(S, OpPC)) |
26069 | return false; |
26070 | continue; |
26071 | } |
26072 | case OP_ShlUint32Sint64: { |
26073 | if (!Shl<PT_Uint32, PT_Sint64>(S, OpPC)) |
26074 | return false; |
26075 | continue; |
26076 | } |
26077 | case OP_ShlUint32Uint64: { |
26078 | if (!Shl<PT_Uint32, PT_Uint64>(S, OpPC)) |
26079 | return false; |
26080 | continue; |
26081 | } |
26082 | case OP_ShlUint32IntAP: { |
26083 | if (!Shl<PT_Uint32, PT_IntAP>(S, OpPC)) |
26084 | return false; |
26085 | continue; |
26086 | } |
26087 | case OP_ShlUint32IntAPS: { |
26088 | if (!Shl<PT_Uint32, PT_IntAPS>(S, OpPC)) |
26089 | return false; |
26090 | continue; |
26091 | } |
26092 | case OP_ShlSint64Sint8: { |
26093 | if (!Shl<PT_Sint64, PT_Sint8>(S, OpPC)) |
26094 | return false; |
26095 | continue; |
26096 | } |
26097 | case OP_ShlSint64Uint8: { |
26098 | if (!Shl<PT_Sint64, PT_Uint8>(S, OpPC)) |
26099 | return false; |
26100 | continue; |
26101 | } |
26102 | case OP_ShlSint64Sint16: { |
26103 | if (!Shl<PT_Sint64, PT_Sint16>(S, OpPC)) |
26104 | return false; |
26105 | continue; |
26106 | } |
26107 | case OP_ShlSint64Uint16: { |
26108 | if (!Shl<PT_Sint64, PT_Uint16>(S, OpPC)) |
26109 | return false; |
26110 | continue; |
26111 | } |
26112 | case OP_ShlSint64Sint32: { |
26113 | if (!Shl<PT_Sint64, PT_Sint32>(S, OpPC)) |
26114 | return false; |
26115 | continue; |
26116 | } |
26117 | case OP_ShlSint64Uint32: { |
26118 | if (!Shl<PT_Sint64, PT_Uint32>(S, OpPC)) |
26119 | return false; |
26120 | continue; |
26121 | } |
26122 | case OP_ShlSint64Sint64: { |
26123 | if (!Shl<PT_Sint64, PT_Sint64>(S, OpPC)) |
26124 | return false; |
26125 | continue; |
26126 | } |
26127 | case OP_ShlSint64Uint64: { |
26128 | if (!Shl<PT_Sint64, PT_Uint64>(S, OpPC)) |
26129 | return false; |
26130 | continue; |
26131 | } |
26132 | case OP_ShlSint64IntAP: { |
26133 | if (!Shl<PT_Sint64, PT_IntAP>(S, OpPC)) |
26134 | return false; |
26135 | continue; |
26136 | } |
26137 | case OP_ShlSint64IntAPS: { |
26138 | if (!Shl<PT_Sint64, PT_IntAPS>(S, OpPC)) |
26139 | return false; |
26140 | continue; |
26141 | } |
26142 | case OP_ShlUint64Sint8: { |
26143 | if (!Shl<PT_Uint64, PT_Sint8>(S, OpPC)) |
26144 | return false; |
26145 | continue; |
26146 | } |
26147 | case OP_ShlUint64Uint8: { |
26148 | if (!Shl<PT_Uint64, PT_Uint8>(S, OpPC)) |
26149 | return false; |
26150 | continue; |
26151 | } |
26152 | case OP_ShlUint64Sint16: { |
26153 | if (!Shl<PT_Uint64, PT_Sint16>(S, OpPC)) |
26154 | return false; |
26155 | continue; |
26156 | } |
26157 | case OP_ShlUint64Uint16: { |
26158 | if (!Shl<PT_Uint64, PT_Uint16>(S, OpPC)) |
26159 | return false; |
26160 | continue; |
26161 | } |
26162 | case OP_ShlUint64Sint32: { |
26163 | if (!Shl<PT_Uint64, PT_Sint32>(S, OpPC)) |
26164 | return false; |
26165 | continue; |
26166 | } |
26167 | case OP_ShlUint64Uint32: { |
26168 | if (!Shl<PT_Uint64, PT_Uint32>(S, OpPC)) |
26169 | return false; |
26170 | continue; |
26171 | } |
26172 | case OP_ShlUint64Sint64: { |
26173 | if (!Shl<PT_Uint64, PT_Sint64>(S, OpPC)) |
26174 | return false; |
26175 | continue; |
26176 | } |
26177 | case OP_ShlUint64Uint64: { |
26178 | if (!Shl<PT_Uint64, PT_Uint64>(S, OpPC)) |
26179 | return false; |
26180 | continue; |
26181 | } |
26182 | case OP_ShlUint64IntAP: { |
26183 | if (!Shl<PT_Uint64, PT_IntAP>(S, OpPC)) |
26184 | return false; |
26185 | continue; |
26186 | } |
26187 | case OP_ShlUint64IntAPS: { |
26188 | if (!Shl<PT_Uint64, PT_IntAPS>(S, OpPC)) |
26189 | return false; |
26190 | continue; |
26191 | } |
26192 | case OP_ShlIntAPSint8: { |
26193 | if (!Shl<PT_IntAP, PT_Sint8>(S, OpPC)) |
26194 | return false; |
26195 | continue; |
26196 | } |
26197 | case OP_ShlIntAPUint8: { |
26198 | if (!Shl<PT_IntAP, PT_Uint8>(S, OpPC)) |
26199 | return false; |
26200 | continue; |
26201 | } |
26202 | case OP_ShlIntAPSint16: { |
26203 | if (!Shl<PT_IntAP, PT_Sint16>(S, OpPC)) |
26204 | return false; |
26205 | continue; |
26206 | } |
26207 | case OP_ShlIntAPUint16: { |
26208 | if (!Shl<PT_IntAP, PT_Uint16>(S, OpPC)) |
26209 | return false; |
26210 | continue; |
26211 | } |
26212 | case OP_ShlIntAPSint32: { |
26213 | if (!Shl<PT_IntAP, PT_Sint32>(S, OpPC)) |
26214 | return false; |
26215 | continue; |
26216 | } |
26217 | case OP_ShlIntAPUint32: { |
26218 | if (!Shl<PT_IntAP, PT_Uint32>(S, OpPC)) |
26219 | return false; |
26220 | continue; |
26221 | } |
26222 | case OP_ShlIntAPSint64: { |
26223 | if (!Shl<PT_IntAP, PT_Sint64>(S, OpPC)) |
26224 | return false; |
26225 | continue; |
26226 | } |
26227 | case OP_ShlIntAPUint64: { |
26228 | if (!Shl<PT_IntAP, PT_Uint64>(S, OpPC)) |
26229 | return false; |
26230 | continue; |
26231 | } |
26232 | case OP_ShlIntAPIntAP: { |
26233 | if (!Shl<PT_IntAP, PT_IntAP>(S, OpPC)) |
26234 | return false; |
26235 | continue; |
26236 | } |
26237 | case OP_ShlIntAPIntAPS: { |
26238 | if (!Shl<PT_IntAP, PT_IntAPS>(S, OpPC)) |
26239 | return false; |
26240 | continue; |
26241 | } |
26242 | case OP_ShlIntAPSSint8: { |
26243 | if (!Shl<PT_IntAPS, PT_Sint8>(S, OpPC)) |
26244 | return false; |
26245 | continue; |
26246 | } |
26247 | case OP_ShlIntAPSUint8: { |
26248 | if (!Shl<PT_IntAPS, PT_Uint8>(S, OpPC)) |
26249 | return false; |
26250 | continue; |
26251 | } |
26252 | case OP_ShlIntAPSSint16: { |
26253 | if (!Shl<PT_IntAPS, PT_Sint16>(S, OpPC)) |
26254 | return false; |
26255 | continue; |
26256 | } |
26257 | case OP_ShlIntAPSUint16: { |
26258 | if (!Shl<PT_IntAPS, PT_Uint16>(S, OpPC)) |
26259 | return false; |
26260 | continue; |
26261 | } |
26262 | case OP_ShlIntAPSSint32: { |
26263 | if (!Shl<PT_IntAPS, PT_Sint32>(S, OpPC)) |
26264 | return false; |
26265 | continue; |
26266 | } |
26267 | case OP_ShlIntAPSUint32: { |
26268 | if (!Shl<PT_IntAPS, PT_Uint32>(S, OpPC)) |
26269 | return false; |
26270 | continue; |
26271 | } |
26272 | case OP_ShlIntAPSSint64: { |
26273 | if (!Shl<PT_IntAPS, PT_Sint64>(S, OpPC)) |
26274 | return false; |
26275 | continue; |
26276 | } |
26277 | case OP_ShlIntAPSUint64: { |
26278 | if (!Shl<PT_IntAPS, PT_Uint64>(S, OpPC)) |
26279 | return false; |
26280 | continue; |
26281 | } |
26282 | case OP_ShlIntAPSIntAP: { |
26283 | if (!Shl<PT_IntAPS, PT_IntAP>(S, OpPC)) |
26284 | return false; |
26285 | continue; |
26286 | } |
26287 | case OP_ShlIntAPSIntAPS: { |
26288 | if (!Shl<PT_IntAPS, PT_IntAPS>(S, OpPC)) |
26289 | return false; |
26290 | continue; |
26291 | } |
26292 | #endif |
26293 | #ifdef GET_DISASM |
26294 | case OP_ShlSint8Sint8: |
26295 | PrintName("ShlSint8Sint8" ); |
26296 | OS << "\t" << "\n" ; |
26297 | continue; |
26298 | case OP_ShlSint8Uint8: |
26299 | PrintName("ShlSint8Uint8" ); |
26300 | OS << "\t" << "\n" ; |
26301 | continue; |
26302 | case OP_ShlSint8Sint16: |
26303 | PrintName("ShlSint8Sint16" ); |
26304 | OS << "\t" << "\n" ; |
26305 | continue; |
26306 | case OP_ShlSint8Uint16: |
26307 | PrintName("ShlSint8Uint16" ); |
26308 | OS << "\t" << "\n" ; |
26309 | continue; |
26310 | case OP_ShlSint8Sint32: |
26311 | PrintName("ShlSint8Sint32" ); |
26312 | OS << "\t" << "\n" ; |
26313 | continue; |
26314 | case OP_ShlSint8Uint32: |
26315 | PrintName("ShlSint8Uint32" ); |
26316 | OS << "\t" << "\n" ; |
26317 | continue; |
26318 | case OP_ShlSint8Sint64: |
26319 | PrintName("ShlSint8Sint64" ); |
26320 | OS << "\t" << "\n" ; |
26321 | continue; |
26322 | case OP_ShlSint8Uint64: |
26323 | PrintName("ShlSint8Uint64" ); |
26324 | OS << "\t" << "\n" ; |
26325 | continue; |
26326 | case OP_ShlSint8IntAP: |
26327 | PrintName("ShlSint8IntAP" ); |
26328 | OS << "\t" << "\n" ; |
26329 | continue; |
26330 | case OP_ShlSint8IntAPS: |
26331 | PrintName("ShlSint8IntAPS" ); |
26332 | OS << "\t" << "\n" ; |
26333 | continue; |
26334 | case OP_ShlUint8Sint8: |
26335 | PrintName("ShlUint8Sint8" ); |
26336 | OS << "\t" << "\n" ; |
26337 | continue; |
26338 | case OP_ShlUint8Uint8: |
26339 | PrintName("ShlUint8Uint8" ); |
26340 | OS << "\t" << "\n" ; |
26341 | continue; |
26342 | case OP_ShlUint8Sint16: |
26343 | PrintName("ShlUint8Sint16" ); |
26344 | OS << "\t" << "\n" ; |
26345 | continue; |
26346 | case OP_ShlUint8Uint16: |
26347 | PrintName("ShlUint8Uint16" ); |
26348 | OS << "\t" << "\n" ; |
26349 | continue; |
26350 | case OP_ShlUint8Sint32: |
26351 | PrintName("ShlUint8Sint32" ); |
26352 | OS << "\t" << "\n" ; |
26353 | continue; |
26354 | case OP_ShlUint8Uint32: |
26355 | PrintName("ShlUint8Uint32" ); |
26356 | OS << "\t" << "\n" ; |
26357 | continue; |
26358 | case OP_ShlUint8Sint64: |
26359 | PrintName("ShlUint8Sint64" ); |
26360 | OS << "\t" << "\n" ; |
26361 | continue; |
26362 | case OP_ShlUint8Uint64: |
26363 | PrintName("ShlUint8Uint64" ); |
26364 | OS << "\t" << "\n" ; |
26365 | continue; |
26366 | case OP_ShlUint8IntAP: |
26367 | PrintName("ShlUint8IntAP" ); |
26368 | OS << "\t" << "\n" ; |
26369 | continue; |
26370 | case OP_ShlUint8IntAPS: |
26371 | PrintName("ShlUint8IntAPS" ); |
26372 | OS << "\t" << "\n" ; |
26373 | continue; |
26374 | case OP_ShlSint16Sint8: |
26375 | PrintName("ShlSint16Sint8" ); |
26376 | OS << "\t" << "\n" ; |
26377 | continue; |
26378 | case OP_ShlSint16Uint8: |
26379 | PrintName("ShlSint16Uint8" ); |
26380 | OS << "\t" << "\n" ; |
26381 | continue; |
26382 | case OP_ShlSint16Sint16: |
26383 | PrintName("ShlSint16Sint16" ); |
26384 | OS << "\t" << "\n" ; |
26385 | continue; |
26386 | case OP_ShlSint16Uint16: |
26387 | PrintName("ShlSint16Uint16" ); |
26388 | OS << "\t" << "\n" ; |
26389 | continue; |
26390 | case OP_ShlSint16Sint32: |
26391 | PrintName("ShlSint16Sint32" ); |
26392 | OS << "\t" << "\n" ; |
26393 | continue; |
26394 | case OP_ShlSint16Uint32: |
26395 | PrintName("ShlSint16Uint32" ); |
26396 | OS << "\t" << "\n" ; |
26397 | continue; |
26398 | case OP_ShlSint16Sint64: |
26399 | PrintName("ShlSint16Sint64" ); |
26400 | OS << "\t" << "\n" ; |
26401 | continue; |
26402 | case OP_ShlSint16Uint64: |
26403 | PrintName("ShlSint16Uint64" ); |
26404 | OS << "\t" << "\n" ; |
26405 | continue; |
26406 | case OP_ShlSint16IntAP: |
26407 | PrintName("ShlSint16IntAP" ); |
26408 | OS << "\t" << "\n" ; |
26409 | continue; |
26410 | case OP_ShlSint16IntAPS: |
26411 | PrintName("ShlSint16IntAPS" ); |
26412 | OS << "\t" << "\n" ; |
26413 | continue; |
26414 | case OP_ShlUint16Sint8: |
26415 | PrintName("ShlUint16Sint8" ); |
26416 | OS << "\t" << "\n" ; |
26417 | continue; |
26418 | case OP_ShlUint16Uint8: |
26419 | PrintName("ShlUint16Uint8" ); |
26420 | OS << "\t" << "\n" ; |
26421 | continue; |
26422 | case OP_ShlUint16Sint16: |
26423 | PrintName("ShlUint16Sint16" ); |
26424 | OS << "\t" << "\n" ; |
26425 | continue; |
26426 | case OP_ShlUint16Uint16: |
26427 | PrintName("ShlUint16Uint16" ); |
26428 | OS << "\t" << "\n" ; |
26429 | continue; |
26430 | case OP_ShlUint16Sint32: |
26431 | PrintName("ShlUint16Sint32" ); |
26432 | OS << "\t" << "\n" ; |
26433 | continue; |
26434 | case OP_ShlUint16Uint32: |
26435 | PrintName("ShlUint16Uint32" ); |
26436 | OS << "\t" << "\n" ; |
26437 | continue; |
26438 | case OP_ShlUint16Sint64: |
26439 | PrintName("ShlUint16Sint64" ); |
26440 | OS << "\t" << "\n" ; |
26441 | continue; |
26442 | case OP_ShlUint16Uint64: |
26443 | PrintName("ShlUint16Uint64" ); |
26444 | OS << "\t" << "\n" ; |
26445 | continue; |
26446 | case OP_ShlUint16IntAP: |
26447 | PrintName("ShlUint16IntAP" ); |
26448 | OS << "\t" << "\n" ; |
26449 | continue; |
26450 | case OP_ShlUint16IntAPS: |
26451 | PrintName("ShlUint16IntAPS" ); |
26452 | OS << "\t" << "\n" ; |
26453 | continue; |
26454 | case OP_ShlSint32Sint8: |
26455 | PrintName("ShlSint32Sint8" ); |
26456 | OS << "\t" << "\n" ; |
26457 | continue; |
26458 | case OP_ShlSint32Uint8: |
26459 | PrintName("ShlSint32Uint8" ); |
26460 | OS << "\t" << "\n" ; |
26461 | continue; |
26462 | case OP_ShlSint32Sint16: |
26463 | PrintName("ShlSint32Sint16" ); |
26464 | OS << "\t" << "\n" ; |
26465 | continue; |
26466 | case OP_ShlSint32Uint16: |
26467 | PrintName("ShlSint32Uint16" ); |
26468 | OS << "\t" << "\n" ; |
26469 | continue; |
26470 | case OP_ShlSint32Sint32: |
26471 | PrintName("ShlSint32Sint32" ); |
26472 | OS << "\t" << "\n" ; |
26473 | continue; |
26474 | case OP_ShlSint32Uint32: |
26475 | PrintName("ShlSint32Uint32" ); |
26476 | OS << "\t" << "\n" ; |
26477 | continue; |
26478 | case OP_ShlSint32Sint64: |
26479 | PrintName("ShlSint32Sint64" ); |
26480 | OS << "\t" << "\n" ; |
26481 | continue; |
26482 | case OP_ShlSint32Uint64: |
26483 | PrintName("ShlSint32Uint64" ); |
26484 | OS << "\t" << "\n" ; |
26485 | continue; |
26486 | case OP_ShlSint32IntAP: |
26487 | PrintName("ShlSint32IntAP" ); |
26488 | OS << "\t" << "\n" ; |
26489 | continue; |
26490 | case OP_ShlSint32IntAPS: |
26491 | PrintName("ShlSint32IntAPS" ); |
26492 | OS << "\t" << "\n" ; |
26493 | continue; |
26494 | case OP_ShlUint32Sint8: |
26495 | PrintName("ShlUint32Sint8" ); |
26496 | OS << "\t" << "\n" ; |
26497 | continue; |
26498 | case OP_ShlUint32Uint8: |
26499 | PrintName("ShlUint32Uint8" ); |
26500 | OS << "\t" << "\n" ; |
26501 | continue; |
26502 | case OP_ShlUint32Sint16: |
26503 | PrintName("ShlUint32Sint16" ); |
26504 | OS << "\t" << "\n" ; |
26505 | continue; |
26506 | case OP_ShlUint32Uint16: |
26507 | PrintName("ShlUint32Uint16" ); |
26508 | OS << "\t" << "\n" ; |
26509 | continue; |
26510 | case OP_ShlUint32Sint32: |
26511 | PrintName("ShlUint32Sint32" ); |
26512 | OS << "\t" << "\n" ; |
26513 | continue; |
26514 | case OP_ShlUint32Uint32: |
26515 | PrintName("ShlUint32Uint32" ); |
26516 | OS << "\t" << "\n" ; |
26517 | continue; |
26518 | case OP_ShlUint32Sint64: |
26519 | PrintName("ShlUint32Sint64" ); |
26520 | OS << "\t" << "\n" ; |
26521 | continue; |
26522 | case OP_ShlUint32Uint64: |
26523 | PrintName("ShlUint32Uint64" ); |
26524 | OS << "\t" << "\n" ; |
26525 | continue; |
26526 | case OP_ShlUint32IntAP: |
26527 | PrintName("ShlUint32IntAP" ); |
26528 | OS << "\t" << "\n" ; |
26529 | continue; |
26530 | case OP_ShlUint32IntAPS: |
26531 | PrintName("ShlUint32IntAPS" ); |
26532 | OS << "\t" << "\n" ; |
26533 | continue; |
26534 | case OP_ShlSint64Sint8: |
26535 | PrintName("ShlSint64Sint8" ); |
26536 | OS << "\t" << "\n" ; |
26537 | continue; |
26538 | case OP_ShlSint64Uint8: |
26539 | PrintName("ShlSint64Uint8" ); |
26540 | OS << "\t" << "\n" ; |
26541 | continue; |
26542 | case OP_ShlSint64Sint16: |
26543 | PrintName("ShlSint64Sint16" ); |
26544 | OS << "\t" << "\n" ; |
26545 | continue; |
26546 | case OP_ShlSint64Uint16: |
26547 | PrintName("ShlSint64Uint16" ); |
26548 | OS << "\t" << "\n" ; |
26549 | continue; |
26550 | case OP_ShlSint64Sint32: |
26551 | PrintName("ShlSint64Sint32" ); |
26552 | OS << "\t" << "\n" ; |
26553 | continue; |
26554 | case OP_ShlSint64Uint32: |
26555 | PrintName("ShlSint64Uint32" ); |
26556 | OS << "\t" << "\n" ; |
26557 | continue; |
26558 | case OP_ShlSint64Sint64: |
26559 | PrintName("ShlSint64Sint64" ); |
26560 | OS << "\t" << "\n" ; |
26561 | continue; |
26562 | case OP_ShlSint64Uint64: |
26563 | PrintName("ShlSint64Uint64" ); |
26564 | OS << "\t" << "\n" ; |
26565 | continue; |
26566 | case OP_ShlSint64IntAP: |
26567 | PrintName("ShlSint64IntAP" ); |
26568 | OS << "\t" << "\n" ; |
26569 | continue; |
26570 | case OP_ShlSint64IntAPS: |
26571 | PrintName("ShlSint64IntAPS" ); |
26572 | OS << "\t" << "\n" ; |
26573 | continue; |
26574 | case OP_ShlUint64Sint8: |
26575 | PrintName("ShlUint64Sint8" ); |
26576 | OS << "\t" << "\n" ; |
26577 | continue; |
26578 | case OP_ShlUint64Uint8: |
26579 | PrintName("ShlUint64Uint8" ); |
26580 | OS << "\t" << "\n" ; |
26581 | continue; |
26582 | case OP_ShlUint64Sint16: |
26583 | PrintName("ShlUint64Sint16" ); |
26584 | OS << "\t" << "\n" ; |
26585 | continue; |
26586 | case OP_ShlUint64Uint16: |
26587 | PrintName("ShlUint64Uint16" ); |
26588 | OS << "\t" << "\n" ; |
26589 | continue; |
26590 | case OP_ShlUint64Sint32: |
26591 | PrintName("ShlUint64Sint32" ); |
26592 | OS << "\t" << "\n" ; |
26593 | continue; |
26594 | case OP_ShlUint64Uint32: |
26595 | PrintName("ShlUint64Uint32" ); |
26596 | OS << "\t" << "\n" ; |
26597 | continue; |
26598 | case OP_ShlUint64Sint64: |
26599 | PrintName("ShlUint64Sint64" ); |
26600 | OS << "\t" << "\n" ; |
26601 | continue; |
26602 | case OP_ShlUint64Uint64: |
26603 | PrintName("ShlUint64Uint64" ); |
26604 | OS << "\t" << "\n" ; |
26605 | continue; |
26606 | case OP_ShlUint64IntAP: |
26607 | PrintName("ShlUint64IntAP" ); |
26608 | OS << "\t" << "\n" ; |
26609 | continue; |
26610 | case OP_ShlUint64IntAPS: |
26611 | PrintName("ShlUint64IntAPS" ); |
26612 | OS << "\t" << "\n" ; |
26613 | continue; |
26614 | case OP_ShlIntAPSint8: |
26615 | PrintName("ShlIntAPSint8" ); |
26616 | OS << "\t" << "\n" ; |
26617 | continue; |
26618 | case OP_ShlIntAPUint8: |
26619 | PrintName("ShlIntAPUint8" ); |
26620 | OS << "\t" << "\n" ; |
26621 | continue; |
26622 | case OP_ShlIntAPSint16: |
26623 | PrintName("ShlIntAPSint16" ); |
26624 | OS << "\t" << "\n" ; |
26625 | continue; |
26626 | case OP_ShlIntAPUint16: |
26627 | PrintName("ShlIntAPUint16" ); |
26628 | OS << "\t" << "\n" ; |
26629 | continue; |
26630 | case OP_ShlIntAPSint32: |
26631 | PrintName("ShlIntAPSint32" ); |
26632 | OS << "\t" << "\n" ; |
26633 | continue; |
26634 | case OP_ShlIntAPUint32: |
26635 | PrintName("ShlIntAPUint32" ); |
26636 | OS << "\t" << "\n" ; |
26637 | continue; |
26638 | case OP_ShlIntAPSint64: |
26639 | PrintName("ShlIntAPSint64" ); |
26640 | OS << "\t" << "\n" ; |
26641 | continue; |
26642 | case OP_ShlIntAPUint64: |
26643 | PrintName("ShlIntAPUint64" ); |
26644 | OS << "\t" << "\n" ; |
26645 | continue; |
26646 | case OP_ShlIntAPIntAP: |
26647 | PrintName("ShlIntAPIntAP" ); |
26648 | OS << "\t" << "\n" ; |
26649 | continue; |
26650 | case OP_ShlIntAPIntAPS: |
26651 | PrintName("ShlIntAPIntAPS" ); |
26652 | OS << "\t" << "\n" ; |
26653 | continue; |
26654 | case OP_ShlIntAPSSint8: |
26655 | PrintName("ShlIntAPSSint8" ); |
26656 | OS << "\t" << "\n" ; |
26657 | continue; |
26658 | case OP_ShlIntAPSUint8: |
26659 | PrintName("ShlIntAPSUint8" ); |
26660 | OS << "\t" << "\n" ; |
26661 | continue; |
26662 | case OP_ShlIntAPSSint16: |
26663 | PrintName("ShlIntAPSSint16" ); |
26664 | OS << "\t" << "\n" ; |
26665 | continue; |
26666 | case OP_ShlIntAPSUint16: |
26667 | PrintName("ShlIntAPSUint16" ); |
26668 | OS << "\t" << "\n" ; |
26669 | continue; |
26670 | case OP_ShlIntAPSSint32: |
26671 | PrintName("ShlIntAPSSint32" ); |
26672 | OS << "\t" << "\n" ; |
26673 | continue; |
26674 | case OP_ShlIntAPSUint32: |
26675 | PrintName("ShlIntAPSUint32" ); |
26676 | OS << "\t" << "\n" ; |
26677 | continue; |
26678 | case OP_ShlIntAPSSint64: |
26679 | PrintName("ShlIntAPSSint64" ); |
26680 | OS << "\t" << "\n" ; |
26681 | continue; |
26682 | case OP_ShlIntAPSUint64: |
26683 | PrintName("ShlIntAPSUint64" ); |
26684 | OS << "\t" << "\n" ; |
26685 | continue; |
26686 | case OP_ShlIntAPSIntAP: |
26687 | PrintName("ShlIntAPSIntAP" ); |
26688 | OS << "\t" << "\n" ; |
26689 | continue; |
26690 | case OP_ShlIntAPSIntAPS: |
26691 | PrintName("ShlIntAPSIntAPS" ); |
26692 | OS << "\t" << "\n" ; |
26693 | continue; |
26694 | #endif |
26695 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
26696 | bool emitShlSint8Sint8(const SourceInfo &); |
26697 | bool emitShlSint8Uint8(const SourceInfo &); |
26698 | bool emitShlSint8Sint16(const SourceInfo &); |
26699 | bool emitShlSint8Uint16(const SourceInfo &); |
26700 | bool emitShlSint8Sint32(const SourceInfo &); |
26701 | bool emitShlSint8Uint32(const SourceInfo &); |
26702 | bool emitShlSint8Sint64(const SourceInfo &); |
26703 | bool emitShlSint8Uint64(const SourceInfo &); |
26704 | bool emitShlSint8IntAP(const SourceInfo &); |
26705 | bool emitShlSint8IntAPS(const SourceInfo &); |
26706 | bool emitShlUint8Sint8(const SourceInfo &); |
26707 | bool emitShlUint8Uint8(const SourceInfo &); |
26708 | bool emitShlUint8Sint16(const SourceInfo &); |
26709 | bool emitShlUint8Uint16(const SourceInfo &); |
26710 | bool emitShlUint8Sint32(const SourceInfo &); |
26711 | bool emitShlUint8Uint32(const SourceInfo &); |
26712 | bool emitShlUint8Sint64(const SourceInfo &); |
26713 | bool emitShlUint8Uint64(const SourceInfo &); |
26714 | bool emitShlUint8IntAP(const SourceInfo &); |
26715 | bool emitShlUint8IntAPS(const SourceInfo &); |
26716 | bool emitShlSint16Sint8(const SourceInfo &); |
26717 | bool emitShlSint16Uint8(const SourceInfo &); |
26718 | bool emitShlSint16Sint16(const SourceInfo &); |
26719 | bool emitShlSint16Uint16(const SourceInfo &); |
26720 | bool emitShlSint16Sint32(const SourceInfo &); |
26721 | bool emitShlSint16Uint32(const SourceInfo &); |
26722 | bool emitShlSint16Sint64(const SourceInfo &); |
26723 | bool emitShlSint16Uint64(const SourceInfo &); |
26724 | bool emitShlSint16IntAP(const SourceInfo &); |
26725 | bool emitShlSint16IntAPS(const SourceInfo &); |
26726 | bool emitShlUint16Sint8(const SourceInfo &); |
26727 | bool emitShlUint16Uint8(const SourceInfo &); |
26728 | bool emitShlUint16Sint16(const SourceInfo &); |
26729 | bool emitShlUint16Uint16(const SourceInfo &); |
26730 | bool emitShlUint16Sint32(const SourceInfo &); |
26731 | bool emitShlUint16Uint32(const SourceInfo &); |
26732 | bool emitShlUint16Sint64(const SourceInfo &); |
26733 | bool emitShlUint16Uint64(const SourceInfo &); |
26734 | bool emitShlUint16IntAP(const SourceInfo &); |
26735 | bool emitShlUint16IntAPS(const SourceInfo &); |
26736 | bool emitShlSint32Sint8(const SourceInfo &); |
26737 | bool emitShlSint32Uint8(const SourceInfo &); |
26738 | bool emitShlSint32Sint16(const SourceInfo &); |
26739 | bool emitShlSint32Uint16(const SourceInfo &); |
26740 | bool emitShlSint32Sint32(const SourceInfo &); |
26741 | bool emitShlSint32Uint32(const SourceInfo &); |
26742 | bool emitShlSint32Sint64(const SourceInfo &); |
26743 | bool emitShlSint32Uint64(const SourceInfo &); |
26744 | bool emitShlSint32IntAP(const SourceInfo &); |
26745 | bool emitShlSint32IntAPS(const SourceInfo &); |
26746 | bool emitShlUint32Sint8(const SourceInfo &); |
26747 | bool emitShlUint32Uint8(const SourceInfo &); |
26748 | bool emitShlUint32Sint16(const SourceInfo &); |
26749 | bool emitShlUint32Uint16(const SourceInfo &); |
26750 | bool emitShlUint32Sint32(const SourceInfo &); |
26751 | bool emitShlUint32Uint32(const SourceInfo &); |
26752 | bool emitShlUint32Sint64(const SourceInfo &); |
26753 | bool emitShlUint32Uint64(const SourceInfo &); |
26754 | bool emitShlUint32IntAP(const SourceInfo &); |
26755 | bool emitShlUint32IntAPS(const SourceInfo &); |
26756 | bool emitShlSint64Sint8(const SourceInfo &); |
26757 | bool emitShlSint64Uint8(const SourceInfo &); |
26758 | bool emitShlSint64Sint16(const SourceInfo &); |
26759 | bool emitShlSint64Uint16(const SourceInfo &); |
26760 | bool emitShlSint64Sint32(const SourceInfo &); |
26761 | bool emitShlSint64Uint32(const SourceInfo &); |
26762 | bool emitShlSint64Sint64(const SourceInfo &); |
26763 | bool emitShlSint64Uint64(const SourceInfo &); |
26764 | bool emitShlSint64IntAP(const SourceInfo &); |
26765 | bool emitShlSint64IntAPS(const SourceInfo &); |
26766 | bool emitShlUint64Sint8(const SourceInfo &); |
26767 | bool emitShlUint64Uint8(const SourceInfo &); |
26768 | bool emitShlUint64Sint16(const SourceInfo &); |
26769 | bool emitShlUint64Uint16(const SourceInfo &); |
26770 | bool emitShlUint64Sint32(const SourceInfo &); |
26771 | bool emitShlUint64Uint32(const SourceInfo &); |
26772 | bool emitShlUint64Sint64(const SourceInfo &); |
26773 | bool emitShlUint64Uint64(const SourceInfo &); |
26774 | bool emitShlUint64IntAP(const SourceInfo &); |
26775 | bool emitShlUint64IntAPS(const SourceInfo &); |
26776 | bool emitShlIntAPSint8(const SourceInfo &); |
26777 | bool emitShlIntAPUint8(const SourceInfo &); |
26778 | bool emitShlIntAPSint16(const SourceInfo &); |
26779 | bool emitShlIntAPUint16(const SourceInfo &); |
26780 | bool emitShlIntAPSint32(const SourceInfo &); |
26781 | bool emitShlIntAPUint32(const SourceInfo &); |
26782 | bool emitShlIntAPSint64(const SourceInfo &); |
26783 | bool emitShlIntAPUint64(const SourceInfo &); |
26784 | bool emitShlIntAPIntAP(const SourceInfo &); |
26785 | bool emitShlIntAPIntAPS(const SourceInfo &); |
26786 | bool emitShlIntAPSSint8(const SourceInfo &); |
26787 | bool emitShlIntAPSUint8(const SourceInfo &); |
26788 | bool emitShlIntAPSSint16(const SourceInfo &); |
26789 | bool emitShlIntAPSUint16(const SourceInfo &); |
26790 | bool emitShlIntAPSSint32(const SourceInfo &); |
26791 | bool emitShlIntAPSUint32(const SourceInfo &); |
26792 | bool emitShlIntAPSSint64(const SourceInfo &); |
26793 | bool emitShlIntAPSUint64(const SourceInfo &); |
26794 | bool emitShlIntAPSIntAP(const SourceInfo &); |
26795 | bool emitShlIntAPSIntAPS(const SourceInfo &); |
26796 | #endif |
26797 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
26798 | [[nodiscard]] bool emitShl(PrimType, PrimType, const SourceInfo &I); |
26799 | #endif |
26800 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
26801 | bool |
26802 | #if defined(GET_EVAL_IMPL) |
26803 | EvalEmitter |
26804 | #else |
26805 | ByteCodeEmitter |
26806 | #endif |
26807 | ::emitShl(PrimType T0, PrimType T1, const SourceInfo &I) { |
26808 | switch (T0) { |
26809 | case PT_Sint8: |
26810 | switch (T1) { |
26811 | case PT_Sint8: |
26812 | return emitShlSint8Sint8(I); |
26813 | case PT_Uint8: |
26814 | return emitShlSint8Uint8(I); |
26815 | case PT_Sint16: |
26816 | return emitShlSint8Sint16(I); |
26817 | case PT_Uint16: |
26818 | return emitShlSint8Uint16(I); |
26819 | case PT_Sint32: |
26820 | return emitShlSint8Sint32(I); |
26821 | case PT_Uint32: |
26822 | return emitShlSint8Uint32(I); |
26823 | case PT_Sint64: |
26824 | return emitShlSint8Sint64(I); |
26825 | case PT_Uint64: |
26826 | return emitShlSint8Uint64(I); |
26827 | case PT_IntAP: |
26828 | return emitShlSint8IntAP(I); |
26829 | case PT_IntAPS: |
26830 | return emitShlSint8IntAPS(I); |
26831 | default: llvm_unreachable("invalid type: emitShl" ); |
26832 | } |
26833 | llvm_unreachable("invalid enum value" ); |
26834 | case PT_Uint8: |
26835 | switch (T1) { |
26836 | case PT_Sint8: |
26837 | return emitShlUint8Sint8(I); |
26838 | case PT_Uint8: |
26839 | return emitShlUint8Uint8(I); |
26840 | case PT_Sint16: |
26841 | return emitShlUint8Sint16(I); |
26842 | case PT_Uint16: |
26843 | return emitShlUint8Uint16(I); |
26844 | case PT_Sint32: |
26845 | return emitShlUint8Sint32(I); |
26846 | case PT_Uint32: |
26847 | return emitShlUint8Uint32(I); |
26848 | case PT_Sint64: |
26849 | return emitShlUint8Sint64(I); |
26850 | case PT_Uint64: |
26851 | return emitShlUint8Uint64(I); |
26852 | case PT_IntAP: |
26853 | return emitShlUint8IntAP(I); |
26854 | case PT_IntAPS: |
26855 | return emitShlUint8IntAPS(I); |
26856 | default: llvm_unreachable("invalid type: emitShl" ); |
26857 | } |
26858 | llvm_unreachable("invalid enum value" ); |
26859 | case PT_Sint16: |
26860 | switch (T1) { |
26861 | case PT_Sint8: |
26862 | return emitShlSint16Sint8(I); |
26863 | case PT_Uint8: |
26864 | return emitShlSint16Uint8(I); |
26865 | case PT_Sint16: |
26866 | return emitShlSint16Sint16(I); |
26867 | case PT_Uint16: |
26868 | return emitShlSint16Uint16(I); |
26869 | case PT_Sint32: |
26870 | return emitShlSint16Sint32(I); |
26871 | case PT_Uint32: |
26872 | return emitShlSint16Uint32(I); |
26873 | case PT_Sint64: |
26874 | return emitShlSint16Sint64(I); |
26875 | case PT_Uint64: |
26876 | return emitShlSint16Uint64(I); |
26877 | case PT_IntAP: |
26878 | return emitShlSint16IntAP(I); |
26879 | case PT_IntAPS: |
26880 | return emitShlSint16IntAPS(I); |
26881 | default: llvm_unreachable("invalid type: emitShl" ); |
26882 | } |
26883 | llvm_unreachable("invalid enum value" ); |
26884 | case PT_Uint16: |
26885 | switch (T1) { |
26886 | case PT_Sint8: |
26887 | return emitShlUint16Sint8(I); |
26888 | case PT_Uint8: |
26889 | return emitShlUint16Uint8(I); |
26890 | case PT_Sint16: |
26891 | return emitShlUint16Sint16(I); |
26892 | case PT_Uint16: |
26893 | return emitShlUint16Uint16(I); |
26894 | case PT_Sint32: |
26895 | return emitShlUint16Sint32(I); |
26896 | case PT_Uint32: |
26897 | return emitShlUint16Uint32(I); |
26898 | case PT_Sint64: |
26899 | return emitShlUint16Sint64(I); |
26900 | case PT_Uint64: |
26901 | return emitShlUint16Uint64(I); |
26902 | case PT_IntAP: |
26903 | return emitShlUint16IntAP(I); |
26904 | case PT_IntAPS: |
26905 | return emitShlUint16IntAPS(I); |
26906 | default: llvm_unreachable("invalid type: emitShl" ); |
26907 | } |
26908 | llvm_unreachable("invalid enum value" ); |
26909 | case PT_Sint32: |
26910 | switch (T1) { |
26911 | case PT_Sint8: |
26912 | return emitShlSint32Sint8(I); |
26913 | case PT_Uint8: |
26914 | return emitShlSint32Uint8(I); |
26915 | case PT_Sint16: |
26916 | return emitShlSint32Sint16(I); |
26917 | case PT_Uint16: |
26918 | return emitShlSint32Uint16(I); |
26919 | case PT_Sint32: |
26920 | return emitShlSint32Sint32(I); |
26921 | case PT_Uint32: |
26922 | return emitShlSint32Uint32(I); |
26923 | case PT_Sint64: |
26924 | return emitShlSint32Sint64(I); |
26925 | case PT_Uint64: |
26926 | return emitShlSint32Uint64(I); |
26927 | case PT_IntAP: |
26928 | return emitShlSint32IntAP(I); |
26929 | case PT_IntAPS: |
26930 | return emitShlSint32IntAPS(I); |
26931 | default: llvm_unreachable("invalid type: emitShl" ); |
26932 | } |
26933 | llvm_unreachable("invalid enum value" ); |
26934 | case PT_Uint32: |
26935 | switch (T1) { |
26936 | case PT_Sint8: |
26937 | return emitShlUint32Sint8(I); |
26938 | case PT_Uint8: |
26939 | return emitShlUint32Uint8(I); |
26940 | case PT_Sint16: |
26941 | return emitShlUint32Sint16(I); |
26942 | case PT_Uint16: |
26943 | return emitShlUint32Uint16(I); |
26944 | case PT_Sint32: |
26945 | return emitShlUint32Sint32(I); |
26946 | case PT_Uint32: |
26947 | return emitShlUint32Uint32(I); |
26948 | case PT_Sint64: |
26949 | return emitShlUint32Sint64(I); |
26950 | case PT_Uint64: |
26951 | return emitShlUint32Uint64(I); |
26952 | case PT_IntAP: |
26953 | return emitShlUint32IntAP(I); |
26954 | case PT_IntAPS: |
26955 | return emitShlUint32IntAPS(I); |
26956 | default: llvm_unreachable("invalid type: emitShl" ); |
26957 | } |
26958 | llvm_unreachable("invalid enum value" ); |
26959 | case PT_Sint64: |
26960 | switch (T1) { |
26961 | case PT_Sint8: |
26962 | return emitShlSint64Sint8(I); |
26963 | case PT_Uint8: |
26964 | return emitShlSint64Uint8(I); |
26965 | case PT_Sint16: |
26966 | return emitShlSint64Sint16(I); |
26967 | case PT_Uint16: |
26968 | return emitShlSint64Uint16(I); |
26969 | case PT_Sint32: |
26970 | return emitShlSint64Sint32(I); |
26971 | case PT_Uint32: |
26972 | return emitShlSint64Uint32(I); |
26973 | case PT_Sint64: |
26974 | return emitShlSint64Sint64(I); |
26975 | case PT_Uint64: |
26976 | return emitShlSint64Uint64(I); |
26977 | case PT_IntAP: |
26978 | return emitShlSint64IntAP(I); |
26979 | case PT_IntAPS: |
26980 | return emitShlSint64IntAPS(I); |
26981 | default: llvm_unreachable("invalid type: emitShl" ); |
26982 | } |
26983 | llvm_unreachable("invalid enum value" ); |
26984 | case PT_Uint64: |
26985 | switch (T1) { |
26986 | case PT_Sint8: |
26987 | return emitShlUint64Sint8(I); |
26988 | case PT_Uint8: |
26989 | return emitShlUint64Uint8(I); |
26990 | case PT_Sint16: |
26991 | return emitShlUint64Sint16(I); |
26992 | case PT_Uint16: |
26993 | return emitShlUint64Uint16(I); |
26994 | case PT_Sint32: |
26995 | return emitShlUint64Sint32(I); |
26996 | case PT_Uint32: |
26997 | return emitShlUint64Uint32(I); |
26998 | case PT_Sint64: |
26999 | return emitShlUint64Sint64(I); |
27000 | case PT_Uint64: |
27001 | return emitShlUint64Uint64(I); |
27002 | case PT_IntAP: |
27003 | return emitShlUint64IntAP(I); |
27004 | case PT_IntAPS: |
27005 | return emitShlUint64IntAPS(I); |
27006 | default: llvm_unreachable("invalid type: emitShl" ); |
27007 | } |
27008 | llvm_unreachable("invalid enum value" ); |
27009 | case PT_IntAP: |
27010 | switch (T1) { |
27011 | case PT_Sint8: |
27012 | return emitShlIntAPSint8(I); |
27013 | case PT_Uint8: |
27014 | return emitShlIntAPUint8(I); |
27015 | case PT_Sint16: |
27016 | return emitShlIntAPSint16(I); |
27017 | case PT_Uint16: |
27018 | return emitShlIntAPUint16(I); |
27019 | case PT_Sint32: |
27020 | return emitShlIntAPSint32(I); |
27021 | case PT_Uint32: |
27022 | return emitShlIntAPUint32(I); |
27023 | case PT_Sint64: |
27024 | return emitShlIntAPSint64(I); |
27025 | case PT_Uint64: |
27026 | return emitShlIntAPUint64(I); |
27027 | case PT_IntAP: |
27028 | return emitShlIntAPIntAP(I); |
27029 | case PT_IntAPS: |
27030 | return emitShlIntAPIntAPS(I); |
27031 | default: llvm_unreachable("invalid type: emitShl" ); |
27032 | } |
27033 | llvm_unreachable("invalid enum value" ); |
27034 | case PT_IntAPS: |
27035 | switch (T1) { |
27036 | case PT_Sint8: |
27037 | return emitShlIntAPSSint8(I); |
27038 | case PT_Uint8: |
27039 | return emitShlIntAPSUint8(I); |
27040 | case PT_Sint16: |
27041 | return emitShlIntAPSSint16(I); |
27042 | case PT_Uint16: |
27043 | return emitShlIntAPSUint16(I); |
27044 | case PT_Sint32: |
27045 | return emitShlIntAPSSint32(I); |
27046 | case PT_Uint32: |
27047 | return emitShlIntAPSUint32(I); |
27048 | case PT_Sint64: |
27049 | return emitShlIntAPSSint64(I); |
27050 | case PT_Uint64: |
27051 | return emitShlIntAPSUint64(I); |
27052 | case PT_IntAP: |
27053 | return emitShlIntAPSIntAP(I); |
27054 | case PT_IntAPS: |
27055 | return emitShlIntAPSIntAPS(I); |
27056 | default: llvm_unreachable("invalid type: emitShl" ); |
27057 | } |
27058 | llvm_unreachable("invalid enum value" ); |
27059 | default: llvm_unreachable("invalid type: emitShl" ); |
27060 | } |
27061 | llvm_unreachable("invalid enum value" ); |
27062 | } |
27063 | #endif |
27064 | #ifdef GET_LINK_IMPL |
27065 | bool ByteCodeEmitter::emitShlSint8Sint8(const SourceInfo &L) { |
27066 | return emitOp<>(OP_ShlSint8Sint8, L); |
27067 | } |
27068 | bool ByteCodeEmitter::emitShlSint8Uint8(const SourceInfo &L) { |
27069 | return emitOp<>(OP_ShlSint8Uint8, L); |
27070 | } |
27071 | bool ByteCodeEmitter::emitShlSint8Sint16(const SourceInfo &L) { |
27072 | return emitOp<>(OP_ShlSint8Sint16, L); |
27073 | } |
27074 | bool ByteCodeEmitter::emitShlSint8Uint16(const SourceInfo &L) { |
27075 | return emitOp<>(OP_ShlSint8Uint16, L); |
27076 | } |
27077 | bool ByteCodeEmitter::emitShlSint8Sint32(const SourceInfo &L) { |
27078 | return emitOp<>(OP_ShlSint8Sint32, L); |
27079 | } |
27080 | bool ByteCodeEmitter::emitShlSint8Uint32(const SourceInfo &L) { |
27081 | return emitOp<>(OP_ShlSint8Uint32, L); |
27082 | } |
27083 | bool ByteCodeEmitter::emitShlSint8Sint64(const SourceInfo &L) { |
27084 | return emitOp<>(OP_ShlSint8Sint64, L); |
27085 | } |
27086 | bool ByteCodeEmitter::emitShlSint8Uint64(const SourceInfo &L) { |
27087 | return emitOp<>(OP_ShlSint8Uint64, L); |
27088 | } |
27089 | bool ByteCodeEmitter::emitShlSint8IntAP(const SourceInfo &L) { |
27090 | return emitOp<>(OP_ShlSint8IntAP, L); |
27091 | } |
27092 | bool ByteCodeEmitter::emitShlSint8IntAPS(const SourceInfo &L) { |
27093 | return emitOp<>(OP_ShlSint8IntAPS, L); |
27094 | } |
27095 | bool ByteCodeEmitter::emitShlUint8Sint8(const SourceInfo &L) { |
27096 | return emitOp<>(OP_ShlUint8Sint8, L); |
27097 | } |
27098 | bool ByteCodeEmitter::emitShlUint8Uint8(const SourceInfo &L) { |
27099 | return emitOp<>(OP_ShlUint8Uint8, L); |
27100 | } |
27101 | bool ByteCodeEmitter::emitShlUint8Sint16(const SourceInfo &L) { |
27102 | return emitOp<>(OP_ShlUint8Sint16, L); |
27103 | } |
27104 | bool ByteCodeEmitter::emitShlUint8Uint16(const SourceInfo &L) { |
27105 | return emitOp<>(OP_ShlUint8Uint16, L); |
27106 | } |
27107 | bool ByteCodeEmitter::emitShlUint8Sint32(const SourceInfo &L) { |
27108 | return emitOp<>(OP_ShlUint8Sint32, L); |
27109 | } |
27110 | bool ByteCodeEmitter::emitShlUint8Uint32(const SourceInfo &L) { |
27111 | return emitOp<>(OP_ShlUint8Uint32, L); |
27112 | } |
27113 | bool ByteCodeEmitter::emitShlUint8Sint64(const SourceInfo &L) { |
27114 | return emitOp<>(OP_ShlUint8Sint64, L); |
27115 | } |
27116 | bool ByteCodeEmitter::emitShlUint8Uint64(const SourceInfo &L) { |
27117 | return emitOp<>(OP_ShlUint8Uint64, L); |
27118 | } |
27119 | bool ByteCodeEmitter::emitShlUint8IntAP(const SourceInfo &L) { |
27120 | return emitOp<>(OP_ShlUint8IntAP, L); |
27121 | } |
27122 | bool ByteCodeEmitter::emitShlUint8IntAPS(const SourceInfo &L) { |
27123 | return emitOp<>(OP_ShlUint8IntAPS, L); |
27124 | } |
27125 | bool ByteCodeEmitter::emitShlSint16Sint8(const SourceInfo &L) { |
27126 | return emitOp<>(OP_ShlSint16Sint8, L); |
27127 | } |
27128 | bool ByteCodeEmitter::emitShlSint16Uint8(const SourceInfo &L) { |
27129 | return emitOp<>(OP_ShlSint16Uint8, L); |
27130 | } |
27131 | bool ByteCodeEmitter::emitShlSint16Sint16(const SourceInfo &L) { |
27132 | return emitOp<>(OP_ShlSint16Sint16, L); |
27133 | } |
27134 | bool ByteCodeEmitter::emitShlSint16Uint16(const SourceInfo &L) { |
27135 | return emitOp<>(OP_ShlSint16Uint16, L); |
27136 | } |
27137 | bool ByteCodeEmitter::emitShlSint16Sint32(const SourceInfo &L) { |
27138 | return emitOp<>(OP_ShlSint16Sint32, L); |
27139 | } |
27140 | bool ByteCodeEmitter::emitShlSint16Uint32(const SourceInfo &L) { |
27141 | return emitOp<>(OP_ShlSint16Uint32, L); |
27142 | } |
27143 | bool ByteCodeEmitter::emitShlSint16Sint64(const SourceInfo &L) { |
27144 | return emitOp<>(OP_ShlSint16Sint64, L); |
27145 | } |
27146 | bool ByteCodeEmitter::emitShlSint16Uint64(const SourceInfo &L) { |
27147 | return emitOp<>(OP_ShlSint16Uint64, L); |
27148 | } |
27149 | bool ByteCodeEmitter::emitShlSint16IntAP(const SourceInfo &L) { |
27150 | return emitOp<>(OP_ShlSint16IntAP, L); |
27151 | } |
27152 | bool ByteCodeEmitter::emitShlSint16IntAPS(const SourceInfo &L) { |
27153 | return emitOp<>(OP_ShlSint16IntAPS, L); |
27154 | } |
27155 | bool ByteCodeEmitter::emitShlUint16Sint8(const SourceInfo &L) { |
27156 | return emitOp<>(OP_ShlUint16Sint8, L); |
27157 | } |
27158 | bool ByteCodeEmitter::emitShlUint16Uint8(const SourceInfo &L) { |
27159 | return emitOp<>(OP_ShlUint16Uint8, L); |
27160 | } |
27161 | bool ByteCodeEmitter::emitShlUint16Sint16(const SourceInfo &L) { |
27162 | return emitOp<>(OP_ShlUint16Sint16, L); |
27163 | } |
27164 | bool ByteCodeEmitter::emitShlUint16Uint16(const SourceInfo &L) { |
27165 | return emitOp<>(OP_ShlUint16Uint16, L); |
27166 | } |
27167 | bool ByteCodeEmitter::emitShlUint16Sint32(const SourceInfo &L) { |
27168 | return emitOp<>(OP_ShlUint16Sint32, L); |
27169 | } |
27170 | bool ByteCodeEmitter::emitShlUint16Uint32(const SourceInfo &L) { |
27171 | return emitOp<>(OP_ShlUint16Uint32, L); |
27172 | } |
27173 | bool ByteCodeEmitter::emitShlUint16Sint64(const SourceInfo &L) { |
27174 | return emitOp<>(OP_ShlUint16Sint64, L); |
27175 | } |
27176 | bool ByteCodeEmitter::emitShlUint16Uint64(const SourceInfo &L) { |
27177 | return emitOp<>(OP_ShlUint16Uint64, L); |
27178 | } |
27179 | bool ByteCodeEmitter::emitShlUint16IntAP(const SourceInfo &L) { |
27180 | return emitOp<>(OP_ShlUint16IntAP, L); |
27181 | } |
27182 | bool ByteCodeEmitter::emitShlUint16IntAPS(const SourceInfo &L) { |
27183 | return emitOp<>(OP_ShlUint16IntAPS, L); |
27184 | } |
27185 | bool ByteCodeEmitter::emitShlSint32Sint8(const SourceInfo &L) { |
27186 | return emitOp<>(OP_ShlSint32Sint8, L); |
27187 | } |
27188 | bool ByteCodeEmitter::emitShlSint32Uint8(const SourceInfo &L) { |
27189 | return emitOp<>(OP_ShlSint32Uint8, L); |
27190 | } |
27191 | bool ByteCodeEmitter::emitShlSint32Sint16(const SourceInfo &L) { |
27192 | return emitOp<>(OP_ShlSint32Sint16, L); |
27193 | } |
27194 | bool ByteCodeEmitter::emitShlSint32Uint16(const SourceInfo &L) { |
27195 | return emitOp<>(OP_ShlSint32Uint16, L); |
27196 | } |
27197 | bool ByteCodeEmitter::emitShlSint32Sint32(const SourceInfo &L) { |
27198 | return emitOp<>(OP_ShlSint32Sint32, L); |
27199 | } |
27200 | bool ByteCodeEmitter::emitShlSint32Uint32(const SourceInfo &L) { |
27201 | return emitOp<>(OP_ShlSint32Uint32, L); |
27202 | } |
27203 | bool ByteCodeEmitter::emitShlSint32Sint64(const SourceInfo &L) { |
27204 | return emitOp<>(OP_ShlSint32Sint64, L); |
27205 | } |
27206 | bool ByteCodeEmitter::emitShlSint32Uint64(const SourceInfo &L) { |
27207 | return emitOp<>(OP_ShlSint32Uint64, L); |
27208 | } |
27209 | bool ByteCodeEmitter::emitShlSint32IntAP(const SourceInfo &L) { |
27210 | return emitOp<>(OP_ShlSint32IntAP, L); |
27211 | } |
27212 | bool ByteCodeEmitter::emitShlSint32IntAPS(const SourceInfo &L) { |
27213 | return emitOp<>(OP_ShlSint32IntAPS, L); |
27214 | } |
27215 | bool ByteCodeEmitter::emitShlUint32Sint8(const SourceInfo &L) { |
27216 | return emitOp<>(OP_ShlUint32Sint8, L); |
27217 | } |
27218 | bool ByteCodeEmitter::emitShlUint32Uint8(const SourceInfo &L) { |
27219 | return emitOp<>(OP_ShlUint32Uint8, L); |
27220 | } |
27221 | bool ByteCodeEmitter::emitShlUint32Sint16(const SourceInfo &L) { |
27222 | return emitOp<>(OP_ShlUint32Sint16, L); |
27223 | } |
27224 | bool ByteCodeEmitter::emitShlUint32Uint16(const SourceInfo &L) { |
27225 | return emitOp<>(OP_ShlUint32Uint16, L); |
27226 | } |
27227 | bool ByteCodeEmitter::emitShlUint32Sint32(const SourceInfo &L) { |
27228 | return emitOp<>(OP_ShlUint32Sint32, L); |
27229 | } |
27230 | bool ByteCodeEmitter::emitShlUint32Uint32(const SourceInfo &L) { |
27231 | return emitOp<>(OP_ShlUint32Uint32, L); |
27232 | } |
27233 | bool ByteCodeEmitter::emitShlUint32Sint64(const SourceInfo &L) { |
27234 | return emitOp<>(OP_ShlUint32Sint64, L); |
27235 | } |
27236 | bool ByteCodeEmitter::emitShlUint32Uint64(const SourceInfo &L) { |
27237 | return emitOp<>(OP_ShlUint32Uint64, L); |
27238 | } |
27239 | bool ByteCodeEmitter::emitShlUint32IntAP(const SourceInfo &L) { |
27240 | return emitOp<>(OP_ShlUint32IntAP, L); |
27241 | } |
27242 | bool ByteCodeEmitter::emitShlUint32IntAPS(const SourceInfo &L) { |
27243 | return emitOp<>(OP_ShlUint32IntAPS, L); |
27244 | } |
27245 | bool ByteCodeEmitter::emitShlSint64Sint8(const SourceInfo &L) { |
27246 | return emitOp<>(OP_ShlSint64Sint8, L); |
27247 | } |
27248 | bool ByteCodeEmitter::emitShlSint64Uint8(const SourceInfo &L) { |
27249 | return emitOp<>(OP_ShlSint64Uint8, L); |
27250 | } |
27251 | bool ByteCodeEmitter::emitShlSint64Sint16(const SourceInfo &L) { |
27252 | return emitOp<>(OP_ShlSint64Sint16, L); |
27253 | } |
27254 | bool ByteCodeEmitter::emitShlSint64Uint16(const SourceInfo &L) { |
27255 | return emitOp<>(OP_ShlSint64Uint16, L); |
27256 | } |
27257 | bool ByteCodeEmitter::emitShlSint64Sint32(const SourceInfo &L) { |
27258 | return emitOp<>(OP_ShlSint64Sint32, L); |
27259 | } |
27260 | bool ByteCodeEmitter::emitShlSint64Uint32(const SourceInfo &L) { |
27261 | return emitOp<>(OP_ShlSint64Uint32, L); |
27262 | } |
27263 | bool ByteCodeEmitter::emitShlSint64Sint64(const SourceInfo &L) { |
27264 | return emitOp<>(OP_ShlSint64Sint64, L); |
27265 | } |
27266 | bool ByteCodeEmitter::emitShlSint64Uint64(const SourceInfo &L) { |
27267 | return emitOp<>(OP_ShlSint64Uint64, L); |
27268 | } |
27269 | bool ByteCodeEmitter::emitShlSint64IntAP(const SourceInfo &L) { |
27270 | return emitOp<>(OP_ShlSint64IntAP, L); |
27271 | } |
27272 | bool ByteCodeEmitter::emitShlSint64IntAPS(const SourceInfo &L) { |
27273 | return emitOp<>(OP_ShlSint64IntAPS, L); |
27274 | } |
27275 | bool ByteCodeEmitter::emitShlUint64Sint8(const SourceInfo &L) { |
27276 | return emitOp<>(OP_ShlUint64Sint8, L); |
27277 | } |
27278 | bool ByteCodeEmitter::emitShlUint64Uint8(const SourceInfo &L) { |
27279 | return emitOp<>(OP_ShlUint64Uint8, L); |
27280 | } |
27281 | bool ByteCodeEmitter::emitShlUint64Sint16(const SourceInfo &L) { |
27282 | return emitOp<>(OP_ShlUint64Sint16, L); |
27283 | } |
27284 | bool ByteCodeEmitter::emitShlUint64Uint16(const SourceInfo &L) { |
27285 | return emitOp<>(OP_ShlUint64Uint16, L); |
27286 | } |
27287 | bool ByteCodeEmitter::emitShlUint64Sint32(const SourceInfo &L) { |
27288 | return emitOp<>(OP_ShlUint64Sint32, L); |
27289 | } |
27290 | bool ByteCodeEmitter::emitShlUint64Uint32(const SourceInfo &L) { |
27291 | return emitOp<>(OP_ShlUint64Uint32, L); |
27292 | } |
27293 | bool ByteCodeEmitter::emitShlUint64Sint64(const SourceInfo &L) { |
27294 | return emitOp<>(OP_ShlUint64Sint64, L); |
27295 | } |
27296 | bool ByteCodeEmitter::emitShlUint64Uint64(const SourceInfo &L) { |
27297 | return emitOp<>(OP_ShlUint64Uint64, L); |
27298 | } |
27299 | bool ByteCodeEmitter::emitShlUint64IntAP(const SourceInfo &L) { |
27300 | return emitOp<>(OP_ShlUint64IntAP, L); |
27301 | } |
27302 | bool ByteCodeEmitter::emitShlUint64IntAPS(const SourceInfo &L) { |
27303 | return emitOp<>(OP_ShlUint64IntAPS, L); |
27304 | } |
27305 | bool ByteCodeEmitter::emitShlIntAPSint8(const SourceInfo &L) { |
27306 | return emitOp<>(OP_ShlIntAPSint8, L); |
27307 | } |
27308 | bool ByteCodeEmitter::emitShlIntAPUint8(const SourceInfo &L) { |
27309 | return emitOp<>(OP_ShlIntAPUint8, L); |
27310 | } |
27311 | bool ByteCodeEmitter::emitShlIntAPSint16(const SourceInfo &L) { |
27312 | return emitOp<>(OP_ShlIntAPSint16, L); |
27313 | } |
27314 | bool ByteCodeEmitter::emitShlIntAPUint16(const SourceInfo &L) { |
27315 | return emitOp<>(OP_ShlIntAPUint16, L); |
27316 | } |
27317 | bool ByteCodeEmitter::emitShlIntAPSint32(const SourceInfo &L) { |
27318 | return emitOp<>(OP_ShlIntAPSint32, L); |
27319 | } |
27320 | bool ByteCodeEmitter::emitShlIntAPUint32(const SourceInfo &L) { |
27321 | return emitOp<>(OP_ShlIntAPUint32, L); |
27322 | } |
27323 | bool ByteCodeEmitter::emitShlIntAPSint64(const SourceInfo &L) { |
27324 | return emitOp<>(OP_ShlIntAPSint64, L); |
27325 | } |
27326 | bool ByteCodeEmitter::emitShlIntAPUint64(const SourceInfo &L) { |
27327 | return emitOp<>(OP_ShlIntAPUint64, L); |
27328 | } |
27329 | bool ByteCodeEmitter::emitShlIntAPIntAP(const SourceInfo &L) { |
27330 | return emitOp<>(OP_ShlIntAPIntAP, L); |
27331 | } |
27332 | bool ByteCodeEmitter::emitShlIntAPIntAPS(const SourceInfo &L) { |
27333 | return emitOp<>(OP_ShlIntAPIntAPS, L); |
27334 | } |
27335 | bool ByteCodeEmitter::emitShlIntAPSSint8(const SourceInfo &L) { |
27336 | return emitOp<>(OP_ShlIntAPSSint8, L); |
27337 | } |
27338 | bool ByteCodeEmitter::emitShlIntAPSUint8(const SourceInfo &L) { |
27339 | return emitOp<>(OP_ShlIntAPSUint8, L); |
27340 | } |
27341 | bool ByteCodeEmitter::emitShlIntAPSSint16(const SourceInfo &L) { |
27342 | return emitOp<>(OP_ShlIntAPSSint16, L); |
27343 | } |
27344 | bool ByteCodeEmitter::emitShlIntAPSUint16(const SourceInfo &L) { |
27345 | return emitOp<>(OP_ShlIntAPSUint16, L); |
27346 | } |
27347 | bool ByteCodeEmitter::emitShlIntAPSSint32(const SourceInfo &L) { |
27348 | return emitOp<>(OP_ShlIntAPSSint32, L); |
27349 | } |
27350 | bool ByteCodeEmitter::emitShlIntAPSUint32(const SourceInfo &L) { |
27351 | return emitOp<>(OP_ShlIntAPSUint32, L); |
27352 | } |
27353 | bool ByteCodeEmitter::emitShlIntAPSSint64(const SourceInfo &L) { |
27354 | return emitOp<>(OP_ShlIntAPSSint64, L); |
27355 | } |
27356 | bool ByteCodeEmitter::emitShlIntAPSUint64(const SourceInfo &L) { |
27357 | return emitOp<>(OP_ShlIntAPSUint64, L); |
27358 | } |
27359 | bool ByteCodeEmitter::emitShlIntAPSIntAP(const SourceInfo &L) { |
27360 | return emitOp<>(OP_ShlIntAPSIntAP, L); |
27361 | } |
27362 | bool ByteCodeEmitter::emitShlIntAPSIntAPS(const SourceInfo &L) { |
27363 | return emitOp<>(OP_ShlIntAPSIntAPS, L); |
27364 | } |
27365 | #endif |
27366 | #ifdef GET_EVAL_IMPL |
27367 | bool EvalEmitter::emitShlSint8Sint8(const SourceInfo &L) { |
27368 | if (!isActive()) return true; |
27369 | CurrentSource = L; |
27370 | return Shl<PT_Sint8, PT_Sint8>(S, OpPC); |
27371 | } |
27372 | bool EvalEmitter::emitShlSint8Uint8(const SourceInfo &L) { |
27373 | if (!isActive()) return true; |
27374 | CurrentSource = L; |
27375 | return Shl<PT_Sint8, PT_Uint8>(S, OpPC); |
27376 | } |
27377 | bool EvalEmitter::emitShlSint8Sint16(const SourceInfo &L) { |
27378 | if (!isActive()) return true; |
27379 | CurrentSource = L; |
27380 | return Shl<PT_Sint8, PT_Sint16>(S, OpPC); |
27381 | } |
27382 | bool EvalEmitter::emitShlSint8Uint16(const SourceInfo &L) { |
27383 | if (!isActive()) return true; |
27384 | CurrentSource = L; |
27385 | return Shl<PT_Sint8, PT_Uint16>(S, OpPC); |
27386 | } |
27387 | bool EvalEmitter::emitShlSint8Sint32(const SourceInfo &L) { |
27388 | if (!isActive()) return true; |
27389 | CurrentSource = L; |
27390 | return Shl<PT_Sint8, PT_Sint32>(S, OpPC); |
27391 | } |
27392 | bool EvalEmitter::emitShlSint8Uint32(const SourceInfo &L) { |
27393 | if (!isActive()) return true; |
27394 | CurrentSource = L; |
27395 | return Shl<PT_Sint8, PT_Uint32>(S, OpPC); |
27396 | } |
27397 | bool EvalEmitter::emitShlSint8Sint64(const SourceInfo &L) { |
27398 | if (!isActive()) return true; |
27399 | CurrentSource = L; |
27400 | return Shl<PT_Sint8, PT_Sint64>(S, OpPC); |
27401 | } |
27402 | bool EvalEmitter::emitShlSint8Uint64(const SourceInfo &L) { |
27403 | if (!isActive()) return true; |
27404 | CurrentSource = L; |
27405 | return Shl<PT_Sint8, PT_Uint64>(S, OpPC); |
27406 | } |
27407 | bool EvalEmitter::emitShlSint8IntAP(const SourceInfo &L) { |
27408 | if (!isActive()) return true; |
27409 | CurrentSource = L; |
27410 | return Shl<PT_Sint8, PT_IntAP>(S, OpPC); |
27411 | } |
27412 | bool EvalEmitter::emitShlSint8IntAPS(const SourceInfo &L) { |
27413 | if (!isActive()) return true; |
27414 | CurrentSource = L; |
27415 | return Shl<PT_Sint8, PT_IntAPS>(S, OpPC); |
27416 | } |
27417 | bool EvalEmitter::emitShlUint8Sint8(const SourceInfo &L) { |
27418 | if (!isActive()) return true; |
27419 | CurrentSource = L; |
27420 | return Shl<PT_Uint8, PT_Sint8>(S, OpPC); |
27421 | } |
27422 | bool EvalEmitter::emitShlUint8Uint8(const SourceInfo &L) { |
27423 | if (!isActive()) return true; |
27424 | CurrentSource = L; |
27425 | return Shl<PT_Uint8, PT_Uint8>(S, OpPC); |
27426 | } |
27427 | bool EvalEmitter::emitShlUint8Sint16(const SourceInfo &L) { |
27428 | if (!isActive()) return true; |
27429 | CurrentSource = L; |
27430 | return Shl<PT_Uint8, PT_Sint16>(S, OpPC); |
27431 | } |
27432 | bool EvalEmitter::emitShlUint8Uint16(const SourceInfo &L) { |
27433 | if (!isActive()) return true; |
27434 | CurrentSource = L; |
27435 | return Shl<PT_Uint8, PT_Uint16>(S, OpPC); |
27436 | } |
27437 | bool EvalEmitter::emitShlUint8Sint32(const SourceInfo &L) { |
27438 | if (!isActive()) return true; |
27439 | CurrentSource = L; |
27440 | return Shl<PT_Uint8, PT_Sint32>(S, OpPC); |
27441 | } |
27442 | bool EvalEmitter::emitShlUint8Uint32(const SourceInfo &L) { |
27443 | if (!isActive()) return true; |
27444 | CurrentSource = L; |
27445 | return Shl<PT_Uint8, PT_Uint32>(S, OpPC); |
27446 | } |
27447 | bool EvalEmitter::emitShlUint8Sint64(const SourceInfo &L) { |
27448 | if (!isActive()) return true; |
27449 | CurrentSource = L; |
27450 | return Shl<PT_Uint8, PT_Sint64>(S, OpPC); |
27451 | } |
27452 | bool EvalEmitter::emitShlUint8Uint64(const SourceInfo &L) { |
27453 | if (!isActive()) return true; |
27454 | CurrentSource = L; |
27455 | return Shl<PT_Uint8, PT_Uint64>(S, OpPC); |
27456 | } |
27457 | bool EvalEmitter::emitShlUint8IntAP(const SourceInfo &L) { |
27458 | if (!isActive()) return true; |
27459 | CurrentSource = L; |
27460 | return Shl<PT_Uint8, PT_IntAP>(S, OpPC); |
27461 | } |
27462 | bool EvalEmitter::emitShlUint8IntAPS(const SourceInfo &L) { |
27463 | if (!isActive()) return true; |
27464 | CurrentSource = L; |
27465 | return Shl<PT_Uint8, PT_IntAPS>(S, OpPC); |
27466 | } |
27467 | bool EvalEmitter::emitShlSint16Sint8(const SourceInfo &L) { |
27468 | if (!isActive()) return true; |
27469 | CurrentSource = L; |
27470 | return Shl<PT_Sint16, PT_Sint8>(S, OpPC); |
27471 | } |
27472 | bool EvalEmitter::emitShlSint16Uint8(const SourceInfo &L) { |
27473 | if (!isActive()) return true; |
27474 | CurrentSource = L; |
27475 | return Shl<PT_Sint16, PT_Uint8>(S, OpPC); |
27476 | } |
27477 | bool EvalEmitter::emitShlSint16Sint16(const SourceInfo &L) { |
27478 | if (!isActive()) return true; |
27479 | CurrentSource = L; |
27480 | return Shl<PT_Sint16, PT_Sint16>(S, OpPC); |
27481 | } |
27482 | bool EvalEmitter::emitShlSint16Uint16(const SourceInfo &L) { |
27483 | if (!isActive()) return true; |
27484 | CurrentSource = L; |
27485 | return Shl<PT_Sint16, PT_Uint16>(S, OpPC); |
27486 | } |
27487 | bool EvalEmitter::emitShlSint16Sint32(const SourceInfo &L) { |
27488 | if (!isActive()) return true; |
27489 | CurrentSource = L; |
27490 | return Shl<PT_Sint16, PT_Sint32>(S, OpPC); |
27491 | } |
27492 | bool EvalEmitter::emitShlSint16Uint32(const SourceInfo &L) { |
27493 | if (!isActive()) return true; |
27494 | CurrentSource = L; |
27495 | return Shl<PT_Sint16, PT_Uint32>(S, OpPC); |
27496 | } |
27497 | bool EvalEmitter::emitShlSint16Sint64(const SourceInfo &L) { |
27498 | if (!isActive()) return true; |
27499 | CurrentSource = L; |
27500 | return Shl<PT_Sint16, PT_Sint64>(S, OpPC); |
27501 | } |
27502 | bool EvalEmitter::emitShlSint16Uint64(const SourceInfo &L) { |
27503 | if (!isActive()) return true; |
27504 | CurrentSource = L; |
27505 | return Shl<PT_Sint16, PT_Uint64>(S, OpPC); |
27506 | } |
27507 | bool EvalEmitter::emitShlSint16IntAP(const SourceInfo &L) { |
27508 | if (!isActive()) return true; |
27509 | CurrentSource = L; |
27510 | return Shl<PT_Sint16, PT_IntAP>(S, OpPC); |
27511 | } |
27512 | bool EvalEmitter::emitShlSint16IntAPS(const SourceInfo &L) { |
27513 | if (!isActive()) return true; |
27514 | CurrentSource = L; |
27515 | return Shl<PT_Sint16, PT_IntAPS>(S, OpPC); |
27516 | } |
27517 | bool EvalEmitter::emitShlUint16Sint8(const SourceInfo &L) { |
27518 | if (!isActive()) return true; |
27519 | CurrentSource = L; |
27520 | return Shl<PT_Uint16, PT_Sint8>(S, OpPC); |
27521 | } |
27522 | bool EvalEmitter::emitShlUint16Uint8(const SourceInfo &L) { |
27523 | if (!isActive()) return true; |
27524 | CurrentSource = L; |
27525 | return Shl<PT_Uint16, PT_Uint8>(S, OpPC); |
27526 | } |
27527 | bool EvalEmitter::emitShlUint16Sint16(const SourceInfo &L) { |
27528 | if (!isActive()) return true; |
27529 | CurrentSource = L; |
27530 | return Shl<PT_Uint16, PT_Sint16>(S, OpPC); |
27531 | } |
27532 | bool EvalEmitter::emitShlUint16Uint16(const SourceInfo &L) { |
27533 | if (!isActive()) return true; |
27534 | CurrentSource = L; |
27535 | return Shl<PT_Uint16, PT_Uint16>(S, OpPC); |
27536 | } |
27537 | bool EvalEmitter::emitShlUint16Sint32(const SourceInfo &L) { |
27538 | if (!isActive()) return true; |
27539 | CurrentSource = L; |
27540 | return Shl<PT_Uint16, PT_Sint32>(S, OpPC); |
27541 | } |
27542 | bool EvalEmitter::emitShlUint16Uint32(const SourceInfo &L) { |
27543 | if (!isActive()) return true; |
27544 | CurrentSource = L; |
27545 | return Shl<PT_Uint16, PT_Uint32>(S, OpPC); |
27546 | } |
27547 | bool EvalEmitter::emitShlUint16Sint64(const SourceInfo &L) { |
27548 | if (!isActive()) return true; |
27549 | CurrentSource = L; |
27550 | return Shl<PT_Uint16, PT_Sint64>(S, OpPC); |
27551 | } |
27552 | bool EvalEmitter::emitShlUint16Uint64(const SourceInfo &L) { |
27553 | if (!isActive()) return true; |
27554 | CurrentSource = L; |
27555 | return Shl<PT_Uint16, PT_Uint64>(S, OpPC); |
27556 | } |
27557 | bool EvalEmitter::emitShlUint16IntAP(const SourceInfo &L) { |
27558 | if (!isActive()) return true; |
27559 | CurrentSource = L; |
27560 | return Shl<PT_Uint16, PT_IntAP>(S, OpPC); |
27561 | } |
27562 | bool EvalEmitter::emitShlUint16IntAPS(const SourceInfo &L) { |
27563 | if (!isActive()) return true; |
27564 | CurrentSource = L; |
27565 | return Shl<PT_Uint16, PT_IntAPS>(S, OpPC); |
27566 | } |
27567 | bool EvalEmitter::emitShlSint32Sint8(const SourceInfo &L) { |
27568 | if (!isActive()) return true; |
27569 | CurrentSource = L; |
27570 | return Shl<PT_Sint32, PT_Sint8>(S, OpPC); |
27571 | } |
27572 | bool EvalEmitter::emitShlSint32Uint8(const SourceInfo &L) { |
27573 | if (!isActive()) return true; |
27574 | CurrentSource = L; |
27575 | return Shl<PT_Sint32, PT_Uint8>(S, OpPC); |
27576 | } |
27577 | bool EvalEmitter::emitShlSint32Sint16(const SourceInfo &L) { |
27578 | if (!isActive()) return true; |
27579 | CurrentSource = L; |
27580 | return Shl<PT_Sint32, PT_Sint16>(S, OpPC); |
27581 | } |
27582 | bool EvalEmitter::emitShlSint32Uint16(const SourceInfo &L) { |
27583 | if (!isActive()) return true; |
27584 | CurrentSource = L; |
27585 | return Shl<PT_Sint32, PT_Uint16>(S, OpPC); |
27586 | } |
27587 | bool EvalEmitter::emitShlSint32Sint32(const SourceInfo &L) { |
27588 | if (!isActive()) return true; |
27589 | CurrentSource = L; |
27590 | return Shl<PT_Sint32, PT_Sint32>(S, OpPC); |
27591 | } |
27592 | bool EvalEmitter::emitShlSint32Uint32(const SourceInfo &L) { |
27593 | if (!isActive()) return true; |
27594 | CurrentSource = L; |
27595 | return Shl<PT_Sint32, PT_Uint32>(S, OpPC); |
27596 | } |
27597 | bool EvalEmitter::emitShlSint32Sint64(const SourceInfo &L) { |
27598 | if (!isActive()) return true; |
27599 | CurrentSource = L; |
27600 | return Shl<PT_Sint32, PT_Sint64>(S, OpPC); |
27601 | } |
27602 | bool EvalEmitter::emitShlSint32Uint64(const SourceInfo &L) { |
27603 | if (!isActive()) return true; |
27604 | CurrentSource = L; |
27605 | return Shl<PT_Sint32, PT_Uint64>(S, OpPC); |
27606 | } |
27607 | bool EvalEmitter::emitShlSint32IntAP(const SourceInfo &L) { |
27608 | if (!isActive()) return true; |
27609 | CurrentSource = L; |
27610 | return Shl<PT_Sint32, PT_IntAP>(S, OpPC); |
27611 | } |
27612 | bool EvalEmitter::emitShlSint32IntAPS(const SourceInfo &L) { |
27613 | if (!isActive()) return true; |
27614 | CurrentSource = L; |
27615 | return Shl<PT_Sint32, PT_IntAPS>(S, OpPC); |
27616 | } |
27617 | bool EvalEmitter::emitShlUint32Sint8(const SourceInfo &L) { |
27618 | if (!isActive()) return true; |
27619 | CurrentSource = L; |
27620 | return Shl<PT_Uint32, PT_Sint8>(S, OpPC); |
27621 | } |
27622 | bool EvalEmitter::emitShlUint32Uint8(const SourceInfo &L) { |
27623 | if (!isActive()) return true; |
27624 | CurrentSource = L; |
27625 | return Shl<PT_Uint32, PT_Uint8>(S, OpPC); |
27626 | } |
27627 | bool EvalEmitter::emitShlUint32Sint16(const SourceInfo &L) { |
27628 | if (!isActive()) return true; |
27629 | CurrentSource = L; |
27630 | return Shl<PT_Uint32, PT_Sint16>(S, OpPC); |
27631 | } |
27632 | bool EvalEmitter::emitShlUint32Uint16(const SourceInfo &L) { |
27633 | if (!isActive()) return true; |
27634 | CurrentSource = L; |
27635 | return Shl<PT_Uint32, PT_Uint16>(S, OpPC); |
27636 | } |
27637 | bool EvalEmitter::emitShlUint32Sint32(const SourceInfo &L) { |
27638 | if (!isActive()) return true; |
27639 | CurrentSource = L; |
27640 | return Shl<PT_Uint32, PT_Sint32>(S, OpPC); |
27641 | } |
27642 | bool EvalEmitter::emitShlUint32Uint32(const SourceInfo &L) { |
27643 | if (!isActive()) return true; |
27644 | CurrentSource = L; |
27645 | return Shl<PT_Uint32, PT_Uint32>(S, OpPC); |
27646 | } |
27647 | bool EvalEmitter::emitShlUint32Sint64(const SourceInfo &L) { |
27648 | if (!isActive()) return true; |
27649 | CurrentSource = L; |
27650 | return Shl<PT_Uint32, PT_Sint64>(S, OpPC); |
27651 | } |
27652 | bool EvalEmitter::emitShlUint32Uint64(const SourceInfo &L) { |
27653 | if (!isActive()) return true; |
27654 | CurrentSource = L; |
27655 | return Shl<PT_Uint32, PT_Uint64>(S, OpPC); |
27656 | } |
27657 | bool EvalEmitter::emitShlUint32IntAP(const SourceInfo &L) { |
27658 | if (!isActive()) return true; |
27659 | CurrentSource = L; |
27660 | return Shl<PT_Uint32, PT_IntAP>(S, OpPC); |
27661 | } |
27662 | bool EvalEmitter::emitShlUint32IntAPS(const SourceInfo &L) { |
27663 | if (!isActive()) return true; |
27664 | CurrentSource = L; |
27665 | return Shl<PT_Uint32, PT_IntAPS>(S, OpPC); |
27666 | } |
27667 | bool EvalEmitter::emitShlSint64Sint8(const SourceInfo &L) { |
27668 | if (!isActive()) return true; |
27669 | CurrentSource = L; |
27670 | return Shl<PT_Sint64, PT_Sint8>(S, OpPC); |
27671 | } |
27672 | bool EvalEmitter::emitShlSint64Uint8(const SourceInfo &L) { |
27673 | if (!isActive()) return true; |
27674 | CurrentSource = L; |
27675 | return Shl<PT_Sint64, PT_Uint8>(S, OpPC); |
27676 | } |
27677 | bool EvalEmitter::emitShlSint64Sint16(const SourceInfo &L) { |
27678 | if (!isActive()) return true; |
27679 | CurrentSource = L; |
27680 | return Shl<PT_Sint64, PT_Sint16>(S, OpPC); |
27681 | } |
27682 | bool EvalEmitter::emitShlSint64Uint16(const SourceInfo &L) { |
27683 | if (!isActive()) return true; |
27684 | CurrentSource = L; |
27685 | return Shl<PT_Sint64, PT_Uint16>(S, OpPC); |
27686 | } |
27687 | bool EvalEmitter::emitShlSint64Sint32(const SourceInfo &L) { |
27688 | if (!isActive()) return true; |
27689 | CurrentSource = L; |
27690 | return Shl<PT_Sint64, PT_Sint32>(S, OpPC); |
27691 | } |
27692 | bool EvalEmitter::emitShlSint64Uint32(const SourceInfo &L) { |
27693 | if (!isActive()) return true; |
27694 | CurrentSource = L; |
27695 | return Shl<PT_Sint64, PT_Uint32>(S, OpPC); |
27696 | } |
27697 | bool EvalEmitter::emitShlSint64Sint64(const SourceInfo &L) { |
27698 | if (!isActive()) return true; |
27699 | CurrentSource = L; |
27700 | return Shl<PT_Sint64, PT_Sint64>(S, OpPC); |
27701 | } |
27702 | bool EvalEmitter::emitShlSint64Uint64(const SourceInfo &L) { |
27703 | if (!isActive()) return true; |
27704 | CurrentSource = L; |
27705 | return Shl<PT_Sint64, PT_Uint64>(S, OpPC); |
27706 | } |
27707 | bool EvalEmitter::emitShlSint64IntAP(const SourceInfo &L) { |
27708 | if (!isActive()) return true; |
27709 | CurrentSource = L; |
27710 | return Shl<PT_Sint64, PT_IntAP>(S, OpPC); |
27711 | } |
27712 | bool EvalEmitter::emitShlSint64IntAPS(const SourceInfo &L) { |
27713 | if (!isActive()) return true; |
27714 | CurrentSource = L; |
27715 | return Shl<PT_Sint64, PT_IntAPS>(S, OpPC); |
27716 | } |
27717 | bool EvalEmitter::emitShlUint64Sint8(const SourceInfo &L) { |
27718 | if (!isActive()) return true; |
27719 | CurrentSource = L; |
27720 | return Shl<PT_Uint64, PT_Sint8>(S, OpPC); |
27721 | } |
27722 | bool EvalEmitter::emitShlUint64Uint8(const SourceInfo &L) { |
27723 | if (!isActive()) return true; |
27724 | CurrentSource = L; |
27725 | return Shl<PT_Uint64, PT_Uint8>(S, OpPC); |
27726 | } |
27727 | bool EvalEmitter::emitShlUint64Sint16(const SourceInfo &L) { |
27728 | if (!isActive()) return true; |
27729 | CurrentSource = L; |
27730 | return Shl<PT_Uint64, PT_Sint16>(S, OpPC); |
27731 | } |
27732 | bool EvalEmitter::emitShlUint64Uint16(const SourceInfo &L) { |
27733 | if (!isActive()) return true; |
27734 | CurrentSource = L; |
27735 | return Shl<PT_Uint64, PT_Uint16>(S, OpPC); |
27736 | } |
27737 | bool EvalEmitter::emitShlUint64Sint32(const SourceInfo &L) { |
27738 | if (!isActive()) return true; |
27739 | CurrentSource = L; |
27740 | return Shl<PT_Uint64, PT_Sint32>(S, OpPC); |
27741 | } |
27742 | bool EvalEmitter::emitShlUint64Uint32(const SourceInfo &L) { |
27743 | if (!isActive()) return true; |
27744 | CurrentSource = L; |
27745 | return Shl<PT_Uint64, PT_Uint32>(S, OpPC); |
27746 | } |
27747 | bool EvalEmitter::emitShlUint64Sint64(const SourceInfo &L) { |
27748 | if (!isActive()) return true; |
27749 | CurrentSource = L; |
27750 | return Shl<PT_Uint64, PT_Sint64>(S, OpPC); |
27751 | } |
27752 | bool EvalEmitter::emitShlUint64Uint64(const SourceInfo &L) { |
27753 | if (!isActive()) return true; |
27754 | CurrentSource = L; |
27755 | return Shl<PT_Uint64, PT_Uint64>(S, OpPC); |
27756 | } |
27757 | bool EvalEmitter::emitShlUint64IntAP(const SourceInfo &L) { |
27758 | if (!isActive()) return true; |
27759 | CurrentSource = L; |
27760 | return Shl<PT_Uint64, PT_IntAP>(S, OpPC); |
27761 | } |
27762 | bool EvalEmitter::emitShlUint64IntAPS(const SourceInfo &L) { |
27763 | if (!isActive()) return true; |
27764 | CurrentSource = L; |
27765 | return Shl<PT_Uint64, PT_IntAPS>(S, OpPC); |
27766 | } |
27767 | bool EvalEmitter::emitShlIntAPSint8(const SourceInfo &L) { |
27768 | if (!isActive()) return true; |
27769 | CurrentSource = L; |
27770 | return Shl<PT_IntAP, PT_Sint8>(S, OpPC); |
27771 | } |
27772 | bool EvalEmitter::emitShlIntAPUint8(const SourceInfo &L) { |
27773 | if (!isActive()) return true; |
27774 | CurrentSource = L; |
27775 | return Shl<PT_IntAP, PT_Uint8>(S, OpPC); |
27776 | } |
27777 | bool EvalEmitter::emitShlIntAPSint16(const SourceInfo &L) { |
27778 | if (!isActive()) return true; |
27779 | CurrentSource = L; |
27780 | return Shl<PT_IntAP, PT_Sint16>(S, OpPC); |
27781 | } |
27782 | bool EvalEmitter::emitShlIntAPUint16(const SourceInfo &L) { |
27783 | if (!isActive()) return true; |
27784 | CurrentSource = L; |
27785 | return Shl<PT_IntAP, PT_Uint16>(S, OpPC); |
27786 | } |
27787 | bool EvalEmitter::emitShlIntAPSint32(const SourceInfo &L) { |
27788 | if (!isActive()) return true; |
27789 | CurrentSource = L; |
27790 | return Shl<PT_IntAP, PT_Sint32>(S, OpPC); |
27791 | } |
27792 | bool EvalEmitter::emitShlIntAPUint32(const SourceInfo &L) { |
27793 | if (!isActive()) return true; |
27794 | CurrentSource = L; |
27795 | return Shl<PT_IntAP, PT_Uint32>(S, OpPC); |
27796 | } |
27797 | bool EvalEmitter::emitShlIntAPSint64(const SourceInfo &L) { |
27798 | if (!isActive()) return true; |
27799 | CurrentSource = L; |
27800 | return Shl<PT_IntAP, PT_Sint64>(S, OpPC); |
27801 | } |
27802 | bool EvalEmitter::emitShlIntAPUint64(const SourceInfo &L) { |
27803 | if (!isActive()) return true; |
27804 | CurrentSource = L; |
27805 | return Shl<PT_IntAP, PT_Uint64>(S, OpPC); |
27806 | } |
27807 | bool EvalEmitter::emitShlIntAPIntAP(const SourceInfo &L) { |
27808 | if (!isActive()) return true; |
27809 | CurrentSource = L; |
27810 | return Shl<PT_IntAP, PT_IntAP>(S, OpPC); |
27811 | } |
27812 | bool EvalEmitter::emitShlIntAPIntAPS(const SourceInfo &L) { |
27813 | if (!isActive()) return true; |
27814 | CurrentSource = L; |
27815 | return Shl<PT_IntAP, PT_IntAPS>(S, OpPC); |
27816 | } |
27817 | bool EvalEmitter::emitShlIntAPSSint8(const SourceInfo &L) { |
27818 | if (!isActive()) return true; |
27819 | CurrentSource = L; |
27820 | return Shl<PT_IntAPS, PT_Sint8>(S, OpPC); |
27821 | } |
27822 | bool EvalEmitter::emitShlIntAPSUint8(const SourceInfo &L) { |
27823 | if (!isActive()) return true; |
27824 | CurrentSource = L; |
27825 | return Shl<PT_IntAPS, PT_Uint8>(S, OpPC); |
27826 | } |
27827 | bool EvalEmitter::emitShlIntAPSSint16(const SourceInfo &L) { |
27828 | if (!isActive()) return true; |
27829 | CurrentSource = L; |
27830 | return Shl<PT_IntAPS, PT_Sint16>(S, OpPC); |
27831 | } |
27832 | bool EvalEmitter::emitShlIntAPSUint16(const SourceInfo &L) { |
27833 | if (!isActive()) return true; |
27834 | CurrentSource = L; |
27835 | return Shl<PT_IntAPS, PT_Uint16>(S, OpPC); |
27836 | } |
27837 | bool EvalEmitter::emitShlIntAPSSint32(const SourceInfo &L) { |
27838 | if (!isActive()) return true; |
27839 | CurrentSource = L; |
27840 | return Shl<PT_IntAPS, PT_Sint32>(S, OpPC); |
27841 | } |
27842 | bool EvalEmitter::emitShlIntAPSUint32(const SourceInfo &L) { |
27843 | if (!isActive()) return true; |
27844 | CurrentSource = L; |
27845 | return Shl<PT_IntAPS, PT_Uint32>(S, OpPC); |
27846 | } |
27847 | bool EvalEmitter::emitShlIntAPSSint64(const SourceInfo &L) { |
27848 | if (!isActive()) return true; |
27849 | CurrentSource = L; |
27850 | return Shl<PT_IntAPS, PT_Sint64>(S, OpPC); |
27851 | } |
27852 | bool EvalEmitter::emitShlIntAPSUint64(const SourceInfo &L) { |
27853 | if (!isActive()) return true; |
27854 | CurrentSource = L; |
27855 | return Shl<PT_IntAPS, PT_Uint64>(S, OpPC); |
27856 | } |
27857 | bool EvalEmitter::emitShlIntAPSIntAP(const SourceInfo &L) { |
27858 | if (!isActive()) return true; |
27859 | CurrentSource = L; |
27860 | return Shl<PT_IntAPS, PT_IntAP>(S, OpPC); |
27861 | } |
27862 | bool EvalEmitter::emitShlIntAPSIntAPS(const SourceInfo &L) { |
27863 | if (!isActive()) return true; |
27864 | CurrentSource = L; |
27865 | return Shl<PT_IntAPS, PT_IntAPS>(S, OpPC); |
27866 | } |
27867 | #endif |
27868 | #ifdef GET_OPCODE_NAMES |
27869 | OP_ShrSint8Sint8, |
27870 | OP_ShrSint8Uint8, |
27871 | OP_ShrSint8Sint16, |
27872 | OP_ShrSint8Uint16, |
27873 | OP_ShrSint8Sint32, |
27874 | OP_ShrSint8Uint32, |
27875 | OP_ShrSint8Sint64, |
27876 | OP_ShrSint8Uint64, |
27877 | OP_ShrSint8IntAP, |
27878 | OP_ShrSint8IntAPS, |
27879 | OP_ShrUint8Sint8, |
27880 | OP_ShrUint8Uint8, |
27881 | OP_ShrUint8Sint16, |
27882 | OP_ShrUint8Uint16, |
27883 | OP_ShrUint8Sint32, |
27884 | OP_ShrUint8Uint32, |
27885 | OP_ShrUint8Sint64, |
27886 | OP_ShrUint8Uint64, |
27887 | OP_ShrUint8IntAP, |
27888 | OP_ShrUint8IntAPS, |
27889 | OP_ShrSint16Sint8, |
27890 | OP_ShrSint16Uint8, |
27891 | OP_ShrSint16Sint16, |
27892 | OP_ShrSint16Uint16, |
27893 | OP_ShrSint16Sint32, |
27894 | OP_ShrSint16Uint32, |
27895 | OP_ShrSint16Sint64, |
27896 | OP_ShrSint16Uint64, |
27897 | OP_ShrSint16IntAP, |
27898 | OP_ShrSint16IntAPS, |
27899 | OP_ShrUint16Sint8, |
27900 | OP_ShrUint16Uint8, |
27901 | OP_ShrUint16Sint16, |
27902 | OP_ShrUint16Uint16, |
27903 | OP_ShrUint16Sint32, |
27904 | OP_ShrUint16Uint32, |
27905 | OP_ShrUint16Sint64, |
27906 | OP_ShrUint16Uint64, |
27907 | OP_ShrUint16IntAP, |
27908 | OP_ShrUint16IntAPS, |
27909 | OP_ShrSint32Sint8, |
27910 | OP_ShrSint32Uint8, |
27911 | OP_ShrSint32Sint16, |
27912 | OP_ShrSint32Uint16, |
27913 | OP_ShrSint32Sint32, |
27914 | OP_ShrSint32Uint32, |
27915 | OP_ShrSint32Sint64, |
27916 | OP_ShrSint32Uint64, |
27917 | OP_ShrSint32IntAP, |
27918 | OP_ShrSint32IntAPS, |
27919 | OP_ShrUint32Sint8, |
27920 | OP_ShrUint32Uint8, |
27921 | OP_ShrUint32Sint16, |
27922 | OP_ShrUint32Uint16, |
27923 | OP_ShrUint32Sint32, |
27924 | OP_ShrUint32Uint32, |
27925 | OP_ShrUint32Sint64, |
27926 | OP_ShrUint32Uint64, |
27927 | OP_ShrUint32IntAP, |
27928 | OP_ShrUint32IntAPS, |
27929 | OP_ShrSint64Sint8, |
27930 | OP_ShrSint64Uint8, |
27931 | OP_ShrSint64Sint16, |
27932 | OP_ShrSint64Uint16, |
27933 | OP_ShrSint64Sint32, |
27934 | OP_ShrSint64Uint32, |
27935 | OP_ShrSint64Sint64, |
27936 | OP_ShrSint64Uint64, |
27937 | OP_ShrSint64IntAP, |
27938 | OP_ShrSint64IntAPS, |
27939 | OP_ShrUint64Sint8, |
27940 | OP_ShrUint64Uint8, |
27941 | OP_ShrUint64Sint16, |
27942 | OP_ShrUint64Uint16, |
27943 | OP_ShrUint64Sint32, |
27944 | OP_ShrUint64Uint32, |
27945 | OP_ShrUint64Sint64, |
27946 | OP_ShrUint64Uint64, |
27947 | OP_ShrUint64IntAP, |
27948 | OP_ShrUint64IntAPS, |
27949 | OP_ShrIntAPSint8, |
27950 | OP_ShrIntAPUint8, |
27951 | OP_ShrIntAPSint16, |
27952 | OP_ShrIntAPUint16, |
27953 | OP_ShrIntAPSint32, |
27954 | OP_ShrIntAPUint32, |
27955 | OP_ShrIntAPSint64, |
27956 | OP_ShrIntAPUint64, |
27957 | OP_ShrIntAPIntAP, |
27958 | OP_ShrIntAPIntAPS, |
27959 | OP_ShrIntAPSSint8, |
27960 | OP_ShrIntAPSUint8, |
27961 | OP_ShrIntAPSSint16, |
27962 | OP_ShrIntAPSUint16, |
27963 | OP_ShrIntAPSSint32, |
27964 | OP_ShrIntAPSUint32, |
27965 | OP_ShrIntAPSSint64, |
27966 | OP_ShrIntAPSUint64, |
27967 | OP_ShrIntAPSIntAP, |
27968 | OP_ShrIntAPSIntAPS, |
27969 | #endif |
27970 | #ifdef GET_INTERP |
27971 | case OP_ShrSint8Sint8: { |
27972 | if (!Shr<PT_Sint8, PT_Sint8>(S, OpPC)) |
27973 | return false; |
27974 | continue; |
27975 | } |
27976 | case OP_ShrSint8Uint8: { |
27977 | if (!Shr<PT_Sint8, PT_Uint8>(S, OpPC)) |
27978 | return false; |
27979 | continue; |
27980 | } |
27981 | case OP_ShrSint8Sint16: { |
27982 | if (!Shr<PT_Sint8, PT_Sint16>(S, OpPC)) |
27983 | return false; |
27984 | continue; |
27985 | } |
27986 | case OP_ShrSint8Uint16: { |
27987 | if (!Shr<PT_Sint8, PT_Uint16>(S, OpPC)) |
27988 | return false; |
27989 | continue; |
27990 | } |
27991 | case OP_ShrSint8Sint32: { |
27992 | if (!Shr<PT_Sint8, PT_Sint32>(S, OpPC)) |
27993 | return false; |
27994 | continue; |
27995 | } |
27996 | case OP_ShrSint8Uint32: { |
27997 | if (!Shr<PT_Sint8, PT_Uint32>(S, OpPC)) |
27998 | return false; |
27999 | continue; |
28000 | } |
28001 | case OP_ShrSint8Sint64: { |
28002 | if (!Shr<PT_Sint8, PT_Sint64>(S, OpPC)) |
28003 | return false; |
28004 | continue; |
28005 | } |
28006 | case OP_ShrSint8Uint64: { |
28007 | if (!Shr<PT_Sint8, PT_Uint64>(S, OpPC)) |
28008 | return false; |
28009 | continue; |
28010 | } |
28011 | case OP_ShrSint8IntAP: { |
28012 | if (!Shr<PT_Sint8, PT_IntAP>(S, OpPC)) |
28013 | return false; |
28014 | continue; |
28015 | } |
28016 | case OP_ShrSint8IntAPS: { |
28017 | if (!Shr<PT_Sint8, PT_IntAPS>(S, OpPC)) |
28018 | return false; |
28019 | continue; |
28020 | } |
28021 | case OP_ShrUint8Sint8: { |
28022 | if (!Shr<PT_Uint8, PT_Sint8>(S, OpPC)) |
28023 | return false; |
28024 | continue; |
28025 | } |
28026 | case OP_ShrUint8Uint8: { |
28027 | if (!Shr<PT_Uint8, PT_Uint8>(S, OpPC)) |
28028 | return false; |
28029 | continue; |
28030 | } |
28031 | case OP_ShrUint8Sint16: { |
28032 | if (!Shr<PT_Uint8, PT_Sint16>(S, OpPC)) |
28033 | return false; |
28034 | continue; |
28035 | } |
28036 | case OP_ShrUint8Uint16: { |
28037 | if (!Shr<PT_Uint8, PT_Uint16>(S, OpPC)) |
28038 | return false; |
28039 | continue; |
28040 | } |
28041 | case OP_ShrUint8Sint32: { |
28042 | if (!Shr<PT_Uint8, PT_Sint32>(S, OpPC)) |
28043 | return false; |
28044 | continue; |
28045 | } |
28046 | case OP_ShrUint8Uint32: { |
28047 | if (!Shr<PT_Uint8, PT_Uint32>(S, OpPC)) |
28048 | return false; |
28049 | continue; |
28050 | } |
28051 | case OP_ShrUint8Sint64: { |
28052 | if (!Shr<PT_Uint8, PT_Sint64>(S, OpPC)) |
28053 | return false; |
28054 | continue; |
28055 | } |
28056 | case OP_ShrUint8Uint64: { |
28057 | if (!Shr<PT_Uint8, PT_Uint64>(S, OpPC)) |
28058 | return false; |
28059 | continue; |
28060 | } |
28061 | case OP_ShrUint8IntAP: { |
28062 | if (!Shr<PT_Uint8, PT_IntAP>(S, OpPC)) |
28063 | return false; |
28064 | continue; |
28065 | } |
28066 | case OP_ShrUint8IntAPS: { |
28067 | if (!Shr<PT_Uint8, PT_IntAPS>(S, OpPC)) |
28068 | return false; |
28069 | continue; |
28070 | } |
28071 | case OP_ShrSint16Sint8: { |
28072 | if (!Shr<PT_Sint16, PT_Sint8>(S, OpPC)) |
28073 | return false; |
28074 | continue; |
28075 | } |
28076 | case OP_ShrSint16Uint8: { |
28077 | if (!Shr<PT_Sint16, PT_Uint8>(S, OpPC)) |
28078 | return false; |
28079 | continue; |
28080 | } |
28081 | case OP_ShrSint16Sint16: { |
28082 | if (!Shr<PT_Sint16, PT_Sint16>(S, OpPC)) |
28083 | return false; |
28084 | continue; |
28085 | } |
28086 | case OP_ShrSint16Uint16: { |
28087 | if (!Shr<PT_Sint16, PT_Uint16>(S, OpPC)) |
28088 | return false; |
28089 | continue; |
28090 | } |
28091 | case OP_ShrSint16Sint32: { |
28092 | if (!Shr<PT_Sint16, PT_Sint32>(S, OpPC)) |
28093 | return false; |
28094 | continue; |
28095 | } |
28096 | case OP_ShrSint16Uint32: { |
28097 | if (!Shr<PT_Sint16, PT_Uint32>(S, OpPC)) |
28098 | return false; |
28099 | continue; |
28100 | } |
28101 | case OP_ShrSint16Sint64: { |
28102 | if (!Shr<PT_Sint16, PT_Sint64>(S, OpPC)) |
28103 | return false; |
28104 | continue; |
28105 | } |
28106 | case OP_ShrSint16Uint64: { |
28107 | if (!Shr<PT_Sint16, PT_Uint64>(S, OpPC)) |
28108 | return false; |
28109 | continue; |
28110 | } |
28111 | case OP_ShrSint16IntAP: { |
28112 | if (!Shr<PT_Sint16, PT_IntAP>(S, OpPC)) |
28113 | return false; |
28114 | continue; |
28115 | } |
28116 | case OP_ShrSint16IntAPS: { |
28117 | if (!Shr<PT_Sint16, PT_IntAPS>(S, OpPC)) |
28118 | return false; |
28119 | continue; |
28120 | } |
28121 | case OP_ShrUint16Sint8: { |
28122 | if (!Shr<PT_Uint16, PT_Sint8>(S, OpPC)) |
28123 | return false; |
28124 | continue; |
28125 | } |
28126 | case OP_ShrUint16Uint8: { |
28127 | if (!Shr<PT_Uint16, PT_Uint8>(S, OpPC)) |
28128 | return false; |
28129 | continue; |
28130 | } |
28131 | case OP_ShrUint16Sint16: { |
28132 | if (!Shr<PT_Uint16, PT_Sint16>(S, OpPC)) |
28133 | return false; |
28134 | continue; |
28135 | } |
28136 | case OP_ShrUint16Uint16: { |
28137 | if (!Shr<PT_Uint16, PT_Uint16>(S, OpPC)) |
28138 | return false; |
28139 | continue; |
28140 | } |
28141 | case OP_ShrUint16Sint32: { |
28142 | if (!Shr<PT_Uint16, PT_Sint32>(S, OpPC)) |
28143 | return false; |
28144 | continue; |
28145 | } |
28146 | case OP_ShrUint16Uint32: { |
28147 | if (!Shr<PT_Uint16, PT_Uint32>(S, OpPC)) |
28148 | return false; |
28149 | continue; |
28150 | } |
28151 | case OP_ShrUint16Sint64: { |
28152 | if (!Shr<PT_Uint16, PT_Sint64>(S, OpPC)) |
28153 | return false; |
28154 | continue; |
28155 | } |
28156 | case OP_ShrUint16Uint64: { |
28157 | if (!Shr<PT_Uint16, PT_Uint64>(S, OpPC)) |
28158 | return false; |
28159 | continue; |
28160 | } |
28161 | case OP_ShrUint16IntAP: { |
28162 | if (!Shr<PT_Uint16, PT_IntAP>(S, OpPC)) |
28163 | return false; |
28164 | continue; |
28165 | } |
28166 | case OP_ShrUint16IntAPS: { |
28167 | if (!Shr<PT_Uint16, PT_IntAPS>(S, OpPC)) |
28168 | return false; |
28169 | continue; |
28170 | } |
28171 | case OP_ShrSint32Sint8: { |
28172 | if (!Shr<PT_Sint32, PT_Sint8>(S, OpPC)) |
28173 | return false; |
28174 | continue; |
28175 | } |
28176 | case OP_ShrSint32Uint8: { |
28177 | if (!Shr<PT_Sint32, PT_Uint8>(S, OpPC)) |
28178 | return false; |
28179 | continue; |
28180 | } |
28181 | case OP_ShrSint32Sint16: { |
28182 | if (!Shr<PT_Sint32, PT_Sint16>(S, OpPC)) |
28183 | return false; |
28184 | continue; |
28185 | } |
28186 | case OP_ShrSint32Uint16: { |
28187 | if (!Shr<PT_Sint32, PT_Uint16>(S, OpPC)) |
28188 | return false; |
28189 | continue; |
28190 | } |
28191 | case OP_ShrSint32Sint32: { |
28192 | if (!Shr<PT_Sint32, PT_Sint32>(S, OpPC)) |
28193 | return false; |
28194 | continue; |
28195 | } |
28196 | case OP_ShrSint32Uint32: { |
28197 | if (!Shr<PT_Sint32, PT_Uint32>(S, OpPC)) |
28198 | return false; |
28199 | continue; |
28200 | } |
28201 | case OP_ShrSint32Sint64: { |
28202 | if (!Shr<PT_Sint32, PT_Sint64>(S, OpPC)) |
28203 | return false; |
28204 | continue; |
28205 | } |
28206 | case OP_ShrSint32Uint64: { |
28207 | if (!Shr<PT_Sint32, PT_Uint64>(S, OpPC)) |
28208 | return false; |
28209 | continue; |
28210 | } |
28211 | case OP_ShrSint32IntAP: { |
28212 | if (!Shr<PT_Sint32, PT_IntAP>(S, OpPC)) |
28213 | return false; |
28214 | continue; |
28215 | } |
28216 | case OP_ShrSint32IntAPS: { |
28217 | if (!Shr<PT_Sint32, PT_IntAPS>(S, OpPC)) |
28218 | return false; |
28219 | continue; |
28220 | } |
28221 | case OP_ShrUint32Sint8: { |
28222 | if (!Shr<PT_Uint32, PT_Sint8>(S, OpPC)) |
28223 | return false; |
28224 | continue; |
28225 | } |
28226 | case OP_ShrUint32Uint8: { |
28227 | if (!Shr<PT_Uint32, PT_Uint8>(S, OpPC)) |
28228 | return false; |
28229 | continue; |
28230 | } |
28231 | case OP_ShrUint32Sint16: { |
28232 | if (!Shr<PT_Uint32, PT_Sint16>(S, OpPC)) |
28233 | return false; |
28234 | continue; |
28235 | } |
28236 | case OP_ShrUint32Uint16: { |
28237 | if (!Shr<PT_Uint32, PT_Uint16>(S, OpPC)) |
28238 | return false; |
28239 | continue; |
28240 | } |
28241 | case OP_ShrUint32Sint32: { |
28242 | if (!Shr<PT_Uint32, PT_Sint32>(S, OpPC)) |
28243 | return false; |
28244 | continue; |
28245 | } |
28246 | case OP_ShrUint32Uint32: { |
28247 | if (!Shr<PT_Uint32, PT_Uint32>(S, OpPC)) |
28248 | return false; |
28249 | continue; |
28250 | } |
28251 | case OP_ShrUint32Sint64: { |
28252 | if (!Shr<PT_Uint32, PT_Sint64>(S, OpPC)) |
28253 | return false; |
28254 | continue; |
28255 | } |
28256 | case OP_ShrUint32Uint64: { |
28257 | if (!Shr<PT_Uint32, PT_Uint64>(S, OpPC)) |
28258 | return false; |
28259 | continue; |
28260 | } |
28261 | case OP_ShrUint32IntAP: { |
28262 | if (!Shr<PT_Uint32, PT_IntAP>(S, OpPC)) |
28263 | return false; |
28264 | continue; |
28265 | } |
28266 | case OP_ShrUint32IntAPS: { |
28267 | if (!Shr<PT_Uint32, PT_IntAPS>(S, OpPC)) |
28268 | return false; |
28269 | continue; |
28270 | } |
28271 | case OP_ShrSint64Sint8: { |
28272 | if (!Shr<PT_Sint64, PT_Sint8>(S, OpPC)) |
28273 | return false; |
28274 | continue; |
28275 | } |
28276 | case OP_ShrSint64Uint8: { |
28277 | if (!Shr<PT_Sint64, PT_Uint8>(S, OpPC)) |
28278 | return false; |
28279 | continue; |
28280 | } |
28281 | case OP_ShrSint64Sint16: { |
28282 | if (!Shr<PT_Sint64, PT_Sint16>(S, OpPC)) |
28283 | return false; |
28284 | continue; |
28285 | } |
28286 | case OP_ShrSint64Uint16: { |
28287 | if (!Shr<PT_Sint64, PT_Uint16>(S, OpPC)) |
28288 | return false; |
28289 | continue; |
28290 | } |
28291 | case OP_ShrSint64Sint32: { |
28292 | if (!Shr<PT_Sint64, PT_Sint32>(S, OpPC)) |
28293 | return false; |
28294 | continue; |
28295 | } |
28296 | case OP_ShrSint64Uint32: { |
28297 | if (!Shr<PT_Sint64, PT_Uint32>(S, OpPC)) |
28298 | return false; |
28299 | continue; |
28300 | } |
28301 | case OP_ShrSint64Sint64: { |
28302 | if (!Shr<PT_Sint64, PT_Sint64>(S, OpPC)) |
28303 | return false; |
28304 | continue; |
28305 | } |
28306 | case OP_ShrSint64Uint64: { |
28307 | if (!Shr<PT_Sint64, PT_Uint64>(S, OpPC)) |
28308 | return false; |
28309 | continue; |
28310 | } |
28311 | case OP_ShrSint64IntAP: { |
28312 | if (!Shr<PT_Sint64, PT_IntAP>(S, OpPC)) |
28313 | return false; |
28314 | continue; |
28315 | } |
28316 | case OP_ShrSint64IntAPS: { |
28317 | if (!Shr<PT_Sint64, PT_IntAPS>(S, OpPC)) |
28318 | return false; |
28319 | continue; |
28320 | } |
28321 | case OP_ShrUint64Sint8: { |
28322 | if (!Shr<PT_Uint64, PT_Sint8>(S, OpPC)) |
28323 | return false; |
28324 | continue; |
28325 | } |
28326 | case OP_ShrUint64Uint8: { |
28327 | if (!Shr<PT_Uint64, PT_Uint8>(S, OpPC)) |
28328 | return false; |
28329 | continue; |
28330 | } |
28331 | case OP_ShrUint64Sint16: { |
28332 | if (!Shr<PT_Uint64, PT_Sint16>(S, OpPC)) |
28333 | return false; |
28334 | continue; |
28335 | } |
28336 | case OP_ShrUint64Uint16: { |
28337 | if (!Shr<PT_Uint64, PT_Uint16>(S, OpPC)) |
28338 | return false; |
28339 | continue; |
28340 | } |
28341 | case OP_ShrUint64Sint32: { |
28342 | if (!Shr<PT_Uint64, PT_Sint32>(S, OpPC)) |
28343 | return false; |
28344 | continue; |
28345 | } |
28346 | case OP_ShrUint64Uint32: { |
28347 | if (!Shr<PT_Uint64, PT_Uint32>(S, OpPC)) |
28348 | return false; |
28349 | continue; |
28350 | } |
28351 | case OP_ShrUint64Sint64: { |
28352 | if (!Shr<PT_Uint64, PT_Sint64>(S, OpPC)) |
28353 | return false; |
28354 | continue; |
28355 | } |
28356 | case OP_ShrUint64Uint64: { |
28357 | if (!Shr<PT_Uint64, PT_Uint64>(S, OpPC)) |
28358 | return false; |
28359 | continue; |
28360 | } |
28361 | case OP_ShrUint64IntAP: { |
28362 | if (!Shr<PT_Uint64, PT_IntAP>(S, OpPC)) |
28363 | return false; |
28364 | continue; |
28365 | } |
28366 | case OP_ShrUint64IntAPS: { |
28367 | if (!Shr<PT_Uint64, PT_IntAPS>(S, OpPC)) |
28368 | return false; |
28369 | continue; |
28370 | } |
28371 | case OP_ShrIntAPSint8: { |
28372 | if (!Shr<PT_IntAP, PT_Sint8>(S, OpPC)) |
28373 | return false; |
28374 | continue; |
28375 | } |
28376 | case OP_ShrIntAPUint8: { |
28377 | if (!Shr<PT_IntAP, PT_Uint8>(S, OpPC)) |
28378 | return false; |
28379 | continue; |
28380 | } |
28381 | case OP_ShrIntAPSint16: { |
28382 | if (!Shr<PT_IntAP, PT_Sint16>(S, OpPC)) |
28383 | return false; |
28384 | continue; |
28385 | } |
28386 | case OP_ShrIntAPUint16: { |
28387 | if (!Shr<PT_IntAP, PT_Uint16>(S, OpPC)) |
28388 | return false; |
28389 | continue; |
28390 | } |
28391 | case OP_ShrIntAPSint32: { |
28392 | if (!Shr<PT_IntAP, PT_Sint32>(S, OpPC)) |
28393 | return false; |
28394 | continue; |
28395 | } |
28396 | case OP_ShrIntAPUint32: { |
28397 | if (!Shr<PT_IntAP, PT_Uint32>(S, OpPC)) |
28398 | return false; |
28399 | continue; |
28400 | } |
28401 | case OP_ShrIntAPSint64: { |
28402 | if (!Shr<PT_IntAP, PT_Sint64>(S, OpPC)) |
28403 | return false; |
28404 | continue; |
28405 | } |
28406 | case OP_ShrIntAPUint64: { |
28407 | if (!Shr<PT_IntAP, PT_Uint64>(S, OpPC)) |
28408 | return false; |
28409 | continue; |
28410 | } |
28411 | case OP_ShrIntAPIntAP: { |
28412 | if (!Shr<PT_IntAP, PT_IntAP>(S, OpPC)) |
28413 | return false; |
28414 | continue; |
28415 | } |
28416 | case OP_ShrIntAPIntAPS: { |
28417 | if (!Shr<PT_IntAP, PT_IntAPS>(S, OpPC)) |
28418 | return false; |
28419 | continue; |
28420 | } |
28421 | case OP_ShrIntAPSSint8: { |
28422 | if (!Shr<PT_IntAPS, PT_Sint8>(S, OpPC)) |
28423 | return false; |
28424 | continue; |
28425 | } |
28426 | case OP_ShrIntAPSUint8: { |
28427 | if (!Shr<PT_IntAPS, PT_Uint8>(S, OpPC)) |
28428 | return false; |
28429 | continue; |
28430 | } |
28431 | case OP_ShrIntAPSSint16: { |
28432 | if (!Shr<PT_IntAPS, PT_Sint16>(S, OpPC)) |
28433 | return false; |
28434 | continue; |
28435 | } |
28436 | case OP_ShrIntAPSUint16: { |
28437 | if (!Shr<PT_IntAPS, PT_Uint16>(S, OpPC)) |
28438 | return false; |
28439 | continue; |
28440 | } |
28441 | case OP_ShrIntAPSSint32: { |
28442 | if (!Shr<PT_IntAPS, PT_Sint32>(S, OpPC)) |
28443 | return false; |
28444 | continue; |
28445 | } |
28446 | case OP_ShrIntAPSUint32: { |
28447 | if (!Shr<PT_IntAPS, PT_Uint32>(S, OpPC)) |
28448 | return false; |
28449 | continue; |
28450 | } |
28451 | case OP_ShrIntAPSSint64: { |
28452 | if (!Shr<PT_IntAPS, PT_Sint64>(S, OpPC)) |
28453 | return false; |
28454 | continue; |
28455 | } |
28456 | case OP_ShrIntAPSUint64: { |
28457 | if (!Shr<PT_IntAPS, PT_Uint64>(S, OpPC)) |
28458 | return false; |
28459 | continue; |
28460 | } |
28461 | case OP_ShrIntAPSIntAP: { |
28462 | if (!Shr<PT_IntAPS, PT_IntAP>(S, OpPC)) |
28463 | return false; |
28464 | continue; |
28465 | } |
28466 | case OP_ShrIntAPSIntAPS: { |
28467 | if (!Shr<PT_IntAPS, PT_IntAPS>(S, OpPC)) |
28468 | return false; |
28469 | continue; |
28470 | } |
28471 | #endif |
28472 | #ifdef GET_DISASM |
28473 | case OP_ShrSint8Sint8: |
28474 | PrintName("ShrSint8Sint8" ); |
28475 | OS << "\t" << "\n" ; |
28476 | continue; |
28477 | case OP_ShrSint8Uint8: |
28478 | PrintName("ShrSint8Uint8" ); |
28479 | OS << "\t" << "\n" ; |
28480 | continue; |
28481 | case OP_ShrSint8Sint16: |
28482 | PrintName("ShrSint8Sint16" ); |
28483 | OS << "\t" << "\n" ; |
28484 | continue; |
28485 | case OP_ShrSint8Uint16: |
28486 | PrintName("ShrSint8Uint16" ); |
28487 | OS << "\t" << "\n" ; |
28488 | continue; |
28489 | case OP_ShrSint8Sint32: |
28490 | PrintName("ShrSint8Sint32" ); |
28491 | OS << "\t" << "\n" ; |
28492 | continue; |
28493 | case OP_ShrSint8Uint32: |
28494 | PrintName("ShrSint8Uint32" ); |
28495 | OS << "\t" << "\n" ; |
28496 | continue; |
28497 | case OP_ShrSint8Sint64: |
28498 | PrintName("ShrSint8Sint64" ); |
28499 | OS << "\t" << "\n" ; |
28500 | continue; |
28501 | case OP_ShrSint8Uint64: |
28502 | PrintName("ShrSint8Uint64" ); |
28503 | OS << "\t" << "\n" ; |
28504 | continue; |
28505 | case OP_ShrSint8IntAP: |
28506 | PrintName("ShrSint8IntAP" ); |
28507 | OS << "\t" << "\n" ; |
28508 | continue; |
28509 | case OP_ShrSint8IntAPS: |
28510 | PrintName("ShrSint8IntAPS" ); |
28511 | OS << "\t" << "\n" ; |
28512 | continue; |
28513 | case OP_ShrUint8Sint8: |
28514 | PrintName("ShrUint8Sint8" ); |
28515 | OS << "\t" << "\n" ; |
28516 | continue; |
28517 | case OP_ShrUint8Uint8: |
28518 | PrintName("ShrUint8Uint8" ); |
28519 | OS << "\t" << "\n" ; |
28520 | continue; |
28521 | case OP_ShrUint8Sint16: |
28522 | PrintName("ShrUint8Sint16" ); |
28523 | OS << "\t" << "\n" ; |
28524 | continue; |
28525 | case OP_ShrUint8Uint16: |
28526 | PrintName("ShrUint8Uint16" ); |
28527 | OS << "\t" << "\n" ; |
28528 | continue; |
28529 | case OP_ShrUint8Sint32: |
28530 | PrintName("ShrUint8Sint32" ); |
28531 | OS << "\t" << "\n" ; |
28532 | continue; |
28533 | case OP_ShrUint8Uint32: |
28534 | PrintName("ShrUint8Uint32" ); |
28535 | OS << "\t" << "\n" ; |
28536 | continue; |
28537 | case OP_ShrUint8Sint64: |
28538 | PrintName("ShrUint8Sint64" ); |
28539 | OS << "\t" << "\n" ; |
28540 | continue; |
28541 | case OP_ShrUint8Uint64: |
28542 | PrintName("ShrUint8Uint64" ); |
28543 | OS << "\t" << "\n" ; |
28544 | continue; |
28545 | case OP_ShrUint8IntAP: |
28546 | PrintName("ShrUint8IntAP" ); |
28547 | OS << "\t" << "\n" ; |
28548 | continue; |
28549 | case OP_ShrUint8IntAPS: |
28550 | PrintName("ShrUint8IntAPS" ); |
28551 | OS << "\t" << "\n" ; |
28552 | continue; |
28553 | case OP_ShrSint16Sint8: |
28554 | PrintName("ShrSint16Sint8" ); |
28555 | OS << "\t" << "\n" ; |
28556 | continue; |
28557 | case OP_ShrSint16Uint8: |
28558 | PrintName("ShrSint16Uint8" ); |
28559 | OS << "\t" << "\n" ; |
28560 | continue; |
28561 | case OP_ShrSint16Sint16: |
28562 | PrintName("ShrSint16Sint16" ); |
28563 | OS << "\t" << "\n" ; |
28564 | continue; |
28565 | case OP_ShrSint16Uint16: |
28566 | PrintName("ShrSint16Uint16" ); |
28567 | OS << "\t" << "\n" ; |
28568 | continue; |
28569 | case OP_ShrSint16Sint32: |
28570 | PrintName("ShrSint16Sint32" ); |
28571 | OS << "\t" << "\n" ; |
28572 | continue; |
28573 | case OP_ShrSint16Uint32: |
28574 | PrintName("ShrSint16Uint32" ); |
28575 | OS << "\t" << "\n" ; |
28576 | continue; |
28577 | case OP_ShrSint16Sint64: |
28578 | PrintName("ShrSint16Sint64" ); |
28579 | OS << "\t" << "\n" ; |
28580 | continue; |
28581 | case OP_ShrSint16Uint64: |
28582 | PrintName("ShrSint16Uint64" ); |
28583 | OS << "\t" << "\n" ; |
28584 | continue; |
28585 | case OP_ShrSint16IntAP: |
28586 | PrintName("ShrSint16IntAP" ); |
28587 | OS << "\t" << "\n" ; |
28588 | continue; |
28589 | case OP_ShrSint16IntAPS: |
28590 | PrintName("ShrSint16IntAPS" ); |
28591 | OS << "\t" << "\n" ; |
28592 | continue; |
28593 | case OP_ShrUint16Sint8: |
28594 | PrintName("ShrUint16Sint8" ); |
28595 | OS << "\t" << "\n" ; |
28596 | continue; |
28597 | case OP_ShrUint16Uint8: |
28598 | PrintName("ShrUint16Uint8" ); |
28599 | OS << "\t" << "\n" ; |
28600 | continue; |
28601 | case OP_ShrUint16Sint16: |
28602 | PrintName("ShrUint16Sint16" ); |
28603 | OS << "\t" << "\n" ; |
28604 | continue; |
28605 | case OP_ShrUint16Uint16: |
28606 | PrintName("ShrUint16Uint16" ); |
28607 | OS << "\t" << "\n" ; |
28608 | continue; |
28609 | case OP_ShrUint16Sint32: |
28610 | PrintName("ShrUint16Sint32" ); |
28611 | OS << "\t" << "\n" ; |
28612 | continue; |
28613 | case OP_ShrUint16Uint32: |
28614 | PrintName("ShrUint16Uint32" ); |
28615 | OS << "\t" << "\n" ; |
28616 | continue; |
28617 | case OP_ShrUint16Sint64: |
28618 | PrintName("ShrUint16Sint64" ); |
28619 | OS << "\t" << "\n" ; |
28620 | continue; |
28621 | case OP_ShrUint16Uint64: |
28622 | PrintName("ShrUint16Uint64" ); |
28623 | OS << "\t" << "\n" ; |
28624 | continue; |
28625 | case OP_ShrUint16IntAP: |
28626 | PrintName("ShrUint16IntAP" ); |
28627 | OS << "\t" << "\n" ; |
28628 | continue; |
28629 | case OP_ShrUint16IntAPS: |
28630 | PrintName("ShrUint16IntAPS" ); |
28631 | OS << "\t" << "\n" ; |
28632 | continue; |
28633 | case OP_ShrSint32Sint8: |
28634 | PrintName("ShrSint32Sint8" ); |
28635 | OS << "\t" << "\n" ; |
28636 | continue; |
28637 | case OP_ShrSint32Uint8: |
28638 | PrintName("ShrSint32Uint8" ); |
28639 | OS << "\t" << "\n" ; |
28640 | continue; |
28641 | case OP_ShrSint32Sint16: |
28642 | PrintName("ShrSint32Sint16" ); |
28643 | OS << "\t" << "\n" ; |
28644 | continue; |
28645 | case OP_ShrSint32Uint16: |
28646 | PrintName("ShrSint32Uint16" ); |
28647 | OS << "\t" << "\n" ; |
28648 | continue; |
28649 | case OP_ShrSint32Sint32: |
28650 | PrintName("ShrSint32Sint32" ); |
28651 | OS << "\t" << "\n" ; |
28652 | continue; |
28653 | case OP_ShrSint32Uint32: |
28654 | PrintName("ShrSint32Uint32" ); |
28655 | OS << "\t" << "\n" ; |
28656 | continue; |
28657 | case OP_ShrSint32Sint64: |
28658 | PrintName("ShrSint32Sint64" ); |
28659 | OS << "\t" << "\n" ; |
28660 | continue; |
28661 | case OP_ShrSint32Uint64: |
28662 | PrintName("ShrSint32Uint64" ); |
28663 | OS << "\t" << "\n" ; |
28664 | continue; |
28665 | case OP_ShrSint32IntAP: |
28666 | PrintName("ShrSint32IntAP" ); |
28667 | OS << "\t" << "\n" ; |
28668 | continue; |
28669 | case OP_ShrSint32IntAPS: |
28670 | PrintName("ShrSint32IntAPS" ); |
28671 | OS << "\t" << "\n" ; |
28672 | continue; |
28673 | case OP_ShrUint32Sint8: |
28674 | PrintName("ShrUint32Sint8" ); |
28675 | OS << "\t" << "\n" ; |
28676 | continue; |
28677 | case OP_ShrUint32Uint8: |
28678 | PrintName("ShrUint32Uint8" ); |
28679 | OS << "\t" << "\n" ; |
28680 | continue; |
28681 | case OP_ShrUint32Sint16: |
28682 | PrintName("ShrUint32Sint16" ); |
28683 | OS << "\t" << "\n" ; |
28684 | continue; |
28685 | case OP_ShrUint32Uint16: |
28686 | PrintName("ShrUint32Uint16" ); |
28687 | OS << "\t" << "\n" ; |
28688 | continue; |
28689 | case OP_ShrUint32Sint32: |
28690 | PrintName("ShrUint32Sint32" ); |
28691 | OS << "\t" << "\n" ; |
28692 | continue; |
28693 | case OP_ShrUint32Uint32: |
28694 | PrintName("ShrUint32Uint32" ); |
28695 | OS << "\t" << "\n" ; |
28696 | continue; |
28697 | case OP_ShrUint32Sint64: |
28698 | PrintName("ShrUint32Sint64" ); |
28699 | OS << "\t" << "\n" ; |
28700 | continue; |
28701 | case OP_ShrUint32Uint64: |
28702 | PrintName("ShrUint32Uint64" ); |
28703 | OS << "\t" << "\n" ; |
28704 | continue; |
28705 | case OP_ShrUint32IntAP: |
28706 | PrintName("ShrUint32IntAP" ); |
28707 | OS << "\t" << "\n" ; |
28708 | continue; |
28709 | case OP_ShrUint32IntAPS: |
28710 | PrintName("ShrUint32IntAPS" ); |
28711 | OS << "\t" << "\n" ; |
28712 | continue; |
28713 | case OP_ShrSint64Sint8: |
28714 | PrintName("ShrSint64Sint8" ); |
28715 | OS << "\t" << "\n" ; |
28716 | continue; |
28717 | case OP_ShrSint64Uint8: |
28718 | PrintName("ShrSint64Uint8" ); |
28719 | OS << "\t" << "\n" ; |
28720 | continue; |
28721 | case OP_ShrSint64Sint16: |
28722 | PrintName("ShrSint64Sint16" ); |
28723 | OS << "\t" << "\n" ; |
28724 | continue; |
28725 | case OP_ShrSint64Uint16: |
28726 | PrintName("ShrSint64Uint16" ); |
28727 | OS << "\t" << "\n" ; |
28728 | continue; |
28729 | case OP_ShrSint64Sint32: |
28730 | PrintName("ShrSint64Sint32" ); |
28731 | OS << "\t" << "\n" ; |
28732 | continue; |
28733 | case OP_ShrSint64Uint32: |
28734 | PrintName("ShrSint64Uint32" ); |
28735 | OS << "\t" << "\n" ; |
28736 | continue; |
28737 | case OP_ShrSint64Sint64: |
28738 | PrintName("ShrSint64Sint64" ); |
28739 | OS << "\t" << "\n" ; |
28740 | continue; |
28741 | case OP_ShrSint64Uint64: |
28742 | PrintName("ShrSint64Uint64" ); |
28743 | OS << "\t" << "\n" ; |
28744 | continue; |
28745 | case OP_ShrSint64IntAP: |
28746 | PrintName("ShrSint64IntAP" ); |
28747 | OS << "\t" << "\n" ; |
28748 | continue; |
28749 | case OP_ShrSint64IntAPS: |
28750 | PrintName("ShrSint64IntAPS" ); |
28751 | OS << "\t" << "\n" ; |
28752 | continue; |
28753 | case OP_ShrUint64Sint8: |
28754 | PrintName("ShrUint64Sint8" ); |
28755 | OS << "\t" << "\n" ; |
28756 | continue; |
28757 | case OP_ShrUint64Uint8: |
28758 | PrintName("ShrUint64Uint8" ); |
28759 | OS << "\t" << "\n" ; |
28760 | continue; |
28761 | case OP_ShrUint64Sint16: |
28762 | PrintName("ShrUint64Sint16" ); |
28763 | OS << "\t" << "\n" ; |
28764 | continue; |
28765 | case OP_ShrUint64Uint16: |
28766 | PrintName("ShrUint64Uint16" ); |
28767 | OS << "\t" << "\n" ; |
28768 | continue; |
28769 | case OP_ShrUint64Sint32: |
28770 | PrintName("ShrUint64Sint32" ); |
28771 | OS << "\t" << "\n" ; |
28772 | continue; |
28773 | case OP_ShrUint64Uint32: |
28774 | PrintName("ShrUint64Uint32" ); |
28775 | OS << "\t" << "\n" ; |
28776 | continue; |
28777 | case OP_ShrUint64Sint64: |
28778 | PrintName("ShrUint64Sint64" ); |
28779 | OS << "\t" << "\n" ; |
28780 | continue; |
28781 | case OP_ShrUint64Uint64: |
28782 | PrintName("ShrUint64Uint64" ); |
28783 | OS << "\t" << "\n" ; |
28784 | continue; |
28785 | case OP_ShrUint64IntAP: |
28786 | PrintName("ShrUint64IntAP" ); |
28787 | OS << "\t" << "\n" ; |
28788 | continue; |
28789 | case OP_ShrUint64IntAPS: |
28790 | PrintName("ShrUint64IntAPS" ); |
28791 | OS << "\t" << "\n" ; |
28792 | continue; |
28793 | case OP_ShrIntAPSint8: |
28794 | PrintName("ShrIntAPSint8" ); |
28795 | OS << "\t" << "\n" ; |
28796 | continue; |
28797 | case OP_ShrIntAPUint8: |
28798 | PrintName("ShrIntAPUint8" ); |
28799 | OS << "\t" << "\n" ; |
28800 | continue; |
28801 | case OP_ShrIntAPSint16: |
28802 | PrintName("ShrIntAPSint16" ); |
28803 | OS << "\t" << "\n" ; |
28804 | continue; |
28805 | case OP_ShrIntAPUint16: |
28806 | PrintName("ShrIntAPUint16" ); |
28807 | OS << "\t" << "\n" ; |
28808 | continue; |
28809 | case OP_ShrIntAPSint32: |
28810 | PrintName("ShrIntAPSint32" ); |
28811 | OS << "\t" << "\n" ; |
28812 | continue; |
28813 | case OP_ShrIntAPUint32: |
28814 | PrintName("ShrIntAPUint32" ); |
28815 | OS << "\t" << "\n" ; |
28816 | continue; |
28817 | case OP_ShrIntAPSint64: |
28818 | PrintName("ShrIntAPSint64" ); |
28819 | OS << "\t" << "\n" ; |
28820 | continue; |
28821 | case OP_ShrIntAPUint64: |
28822 | PrintName("ShrIntAPUint64" ); |
28823 | OS << "\t" << "\n" ; |
28824 | continue; |
28825 | case OP_ShrIntAPIntAP: |
28826 | PrintName("ShrIntAPIntAP" ); |
28827 | OS << "\t" << "\n" ; |
28828 | continue; |
28829 | case OP_ShrIntAPIntAPS: |
28830 | PrintName("ShrIntAPIntAPS" ); |
28831 | OS << "\t" << "\n" ; |
28832 | continue; |
28833 | case OP_ShrIntAPSSint8: |
28834 | PrintName("ShrIntAPSSint8" ); |
28835 | OS << "\t" << "\n" ; |
28836 | continue; |
28837 | case OP_ShrIntAPSUint8: |
28838 | PrintName("ShrIntAPSUint8" ); |
28839 | OS << "\t" << "\n" ; |
28840 | continue; |
28841 | case OP_ShrIntAPSSint16: |
28842 | PrintName("ShrIntAPSSint16" ); |
28843 | OS << "\t" << "\n" ; |
28844 | continue; |
28845 | case OP_ShrIntAPSUint16: |
28846 | PrintName("ShrIntAPSUint16" ); |
28847 | OS << "\t" << "\n" ; |
28848 | continue; |
28849 | case OP_ShrIntAPSSint32: |
28850 | PrintName("ShrIntAPSSint32" ); |
28851 | OS << "\t" << "\n" ; |
28852 | continue; |
28853 | case OP_ShrIntAPSUint32: |
28854 | PrintName("ShrIntAPSUint32" ); |
28855 | OS << "\t" << "\n" ; |
28856 | continue; |
28857 | case OP_ShrIntAPSSint64: |
28858 | PrintName("ShrIntAPSSint64" ); |
28859 | OS << "\t" << "\n" ; |
28860 | continue; |
28861 | case OP_ShrIntAPSUint64: |
28862 | PrintName("ShrIntAPSUint64" ); |
28863 | OS << "\t" << "\n" ; |
28864 | continue; |
28865 | case OP_ShrIntAPSIntAP: |
28866 | PrintName("ShrIntAPSIntAP" ); |
28867 | OS << "\t" << "\n" ; |
28868 | continue; |
28869 | case OP_ShrIntAPSIntAPS: |
28870 | PrintName("ShrIntAPSIntAPS" ); |
28871 | OS << "\t" << "\n" ; |
28872 | continue; |
28873 | #endif |
28874 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28875 | bool emitShrSint8Sint8(const SourceInfo &); |
28876 | bool emitShrSint8Uint8(const SourceInfo &); |
28877 | bool emitShrSint8Sint16(const SourceInfo &); |
28878 | bool emitShrSint8Uint16(const SourceInfo &); |
28879 | bool emitShrSint8Sint32(const SourceInfo &); |
28880 | bool emitShrSint8Uint32(const SourceInfo &); |
28881 | bool emitShrSint8Sint64(const SourceInfo &); |
28882 | bool emitShrSint8Uint64(const SourceInfo &); |
28883 | bool emitShrSint8IntAP(const SourceInfo &); |
28884 | bool emitShrSint8IntAPS(const SourceInfo &); |
28885 | bool emitShrUint8Sint8(const SourceInfo &); |
28886 | bool emitShrUint8Uint8(const SourceInfo &); |
28887 | bool emitShrUint8Sint16(const SourceInfo &); |
28888 | bool emitShrUint8Uint16(const SourceInfo &); |
28889 | bool emitShrUint8Sint32(const SourceInfo &); |
28890 | bool emitShrUint8Uint32(const SourceInfo &); |
28891 | bool emitShrUint8Sint64(const SourceInfo &); |
28892 | bool emitShrUint8Uint64(const SourceInfo &); |
28893 | bool emitShrUint8IntAP(const SourceInfo &); |
28894 | bool emitShrUint8IntAPS(const SourceInfo &); |
28895 | bool emitShrSint16Sint8(const SourceInfo &); |
28896 | bool emitShrSint16Uint8(const SourceInfo &); |
28897 | bool emitShrSint16Sint16(const SourceInfo &); |
28898 | bool emitShrSint16Uint16(const SourceInfo &); |
28899 | bool emitShrSint16Sint32(const SourceInfo &); |
28900 | bool emitShrSint16Uint32(const SourceInfo &); |
28901 | bool emitShrSint16Sint64(const SourceInfo &); |
28902 | bool emitShrSint16Uint64(const SourceInfo &); |
28903 | bool emitShrSint16IntAP(const SourceInfo &); |
28904 | bool emitShrSint16IntAPS(const SourceInfo &); |
28905 | bool emitShrUint16Sint8(const SourceInfo &); |
28906 | bool emitShrUint16Uint8(const SourceInfo &); |
28907 | bool emitShrUint16Sint16(const SourceInfo &); |
28908 | bool emitShrUint16Uint16(const SourceInfo &); |
28909 | bool emitShrUint16Sint32(const SourceInfo &); |
28910 | bool emitShrUint16Uint32(const SourceInfo &); |
28911 | bool emitShrUint16Sint64(const SourceInfo &); |
28912 | bool emitShrUint16Uint64(const SourceInfo &); |
28913 | bool emitShrUint16IntAP(const SourceInfo &); |
28914 | bool emitShrUint16IntAPS(const SourceInfo &); |
28915 | bool emitShrSint32Sint8(const SourceInfo &); |
28916 | bool emitShrSint32Uint8(const SourceInfo &); |
28917 | bool emitShrSint32Sint16(const SourceInfo &); |
28918 | bool emitShrSint32Uint16(const SourceInfo &); |
28919 | bool emitShrSint32Sint32(const SourceInfo &); |
28920 | bool emitShrSint32Uint32(const SourceInfo &); |
28921 | bool emitShrSint32Sint64(const SourceInfo &); |
28922 | bool emitShrSint32Uint64(const SourceInfo &); |
28923 | bool emitShrSint32IntAP(const SourceInfo &); |
28924 | bool emitShrSint32IntAPS(const SourceInfo &); |
28925 | bool emitShrUint32Sint8(const SourceInfo &); |
28926 | bool emitShrUint32Uint8(const SourceInfo &); |
28927 | bool emitShrUint32Sint16(const SourceInfo &); |
28928 | bool emitShrUint32Uint16(const SourceInfo &); |
28929 | bool emitShrUint32Sint32(const SourceInfo &); |
28930 | bool emitShrUint32Uint32(const SourceInfo &); |
28931 | bool emitShrUint32Sint64(const SourceInfo &); |
28932 | bool emitShrUint32Uint64(const SourceInfo &); |
28933 | bool emitShrUint32IntAP(const SourceInfo &); |
28934 | bool emitShrUint32IntAPS(const SourceInfo &); |
28935 | bool emitShrSint64Sint8(const SourceInfo &); |
28936 | bool emitShrSint64Uint8(const SourceInfo &); |
28937 | bool emitShrSint64Sint16(const SourceInfo &); |
28938 | bool emitShrSint64Uint16(const SourceInfo &); |
28939 | bool emitShrSint64Sint32(const SourceInfo &); |
28940 | bool emitShrSint64Uint32(const SourceInfo &); |
28941 | bool emitShrSint64Sint64(const SourceInfo &); |
28942 | bool emitShrSint64Uint64(const SourceInfo &); |
28943 | bool emitShrSint64IntAP(const SourceInfo &); |
28944 | bool emitShrSint64IntAPS(const SourceInfo &); |
28945 | bool emitShrUint64Sint8(const SourceInfo &); |
28946 | bool emitShrUint64Uint8(const SourceInfo &); |
28947 | bool emitShrUint64Sint16(const SourceInfo &); |
28948 | bool emitShrUint64Uint16(const SourceInfo &); |
28949 | bool emitShrUint64Sint32(const SourceInfo &); |
28950 | bool emitShrUint64Uint32(const SourceInfo &); |
28951 | bool emitShrUint64Sint64(const SourceInfo &); |
28952 | bool emitShrUint64Uint64(const SourceInfo &); |
28953 | bool emitShrUint64IntAP(const SourceInfo &); |
28954 | bool emitShrUint64IntAPS(const SourceInfo &); |
28955 | bool emitShrIntAPSint8(const SourceInfo &); |
28956 | bool emitShrIntAPUint8(const SourceInfo &); |
28957 | bool emitShrIntAPSint16(const SourceInfo &); |
28958 | bool emitShrIntAPUint16(const SourceInfo &); |
28959 | bool emitShrIntAPSint32(const SourceInfo &); |
28960 | bool emitShrIntAPUint32(const SourceInfo &); |
28961 | bool emitShrIntAPSint64(const SourceInfo &); |
28962 | bool emitShrIntAPUint64(const SourceInfo &); |
28963 | bool emitShrIntAPIntAP(const SourceInfo &); |
28964 | bool emitShrIntAPIntAPS(const SourceInfo &); |
28965 | bool emitShrIntAPSSint8(const SourceInfo &); |
28966 | bool emitShrIntAPSUint8(const SourceInfo &); |
28967 | bool emitShrIntAPSSint16(const SourceInfo &); |
28968 | bool emitShrIntAPSUint16(const SourceInfo &); |
28969 | bool emitShrIntAPSSint32(const SourceInfo &); |
28970 | bool emitShrIntAPSUint32(const SourceInfo &); |
28971 | bool emitShrIntAPSSint64(const SourceInfo &); |
28972 | bool emitShrIntAPSUint64(const SourceInfo &); |
28973 | bool emitShrIntAPSIntAP(const SourceInfo &); |
28974 | bool emitShrIntAPSIntAPS(const SourceInfo &); |
28975 | #endif |
28976 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
28977 | [[nodiscard]] bool emitShr(PrimType, PrimType, const SourceInfo &I); |
28978 | #endif |
28979 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
28980 | bool |
28981 | #if defined(GET_EVAL_IMPL) |
28982 | EvalEmitter |
28983 | #else |
28984 | ByteCodeEmitter |
28985 | #endif |
28986 | ::emitShr(PrimType T0, PrimType T1, const SourceInfo &I) { |
28987 | switch (T0) { |
28988 | case PT_Sint8: |
28989 | switch (T1) { |
28990 | case PT_Sint8: |
28991 | return emitShrSint8Sint8(I); |
28992 | case PT_Uint8: |
28993 | return emitShrSint8Uint8(I); |
28994 | case PT_Sint16: |
28995 | return emitShrSint8Sint16(I); |
28996 | case PT_Uint16: |
28997 | return emitShrSint8Uint16(I); |
28998 | case PT_Sint32: |
28999 | return emitShrSint8Sint32(I); |
29000 | case PT_Uint32: |
29001 | return emitShrSint8Uint32(I); |
29002 | case PT_Sint64: |
29003 | return emitShrSint8Sint64(I); |
29004 | case PT_Uint64: |
29005 | return emitShrSint8Uint64(I); |
29006 | case PT_IntAP: |
29007 | return emitShrSint8IntAP(I); |
29008 | case PT_IntAPS: |
29009 | return emitShrSint8IntAPS(I); |
29010 | default: llvm_unreachable("invalid type: emitShr" ); |
29011 | } |
29012 | llvm_unreachable("invalid enum value" ); |
29013 | case PT_Uint8: |
29014 | switch (T1) { |
29015 | case PT_Sint8: |
29016 | return emitShrUint8Sint8(I); |
29017 | case PT_Uint8: |
29018 | return emitShrUint8Uint8(I); |
29019 | case PT_Sint16: |
29020 | return emitShrUint8Sint16(I); |
29021 | case PT_Uint16: |
29022 | return emitShrUint8Uint16(I); |
29023 | case PT_Sint32: |
29024 | return emitShrUint8Sint32(I); |
29025 | case PT_Uint32: |
29026 | return emitShrUint8Uint32(I); |
29027 | case PT_Sint64: |
29028 | return emitShrUint8Sint64(I); |
29029 | case PT_Uint64: |
29030 | return emitShrUint8Uint64(I); |
29031 | case PT_IntAP: |
29032 | return emitShrUint8IntAP(I); |
29033 | case PT_IntAPS: |
29034 | return emitShrUint8IntAPS(I); |
29035 | default: llvm_unreachable("invalid type: emitShr" ); |
29036 | } |
29037 | llvm_unreachable("invalid enum value" ); |
29038 | case PT_Sint16: |
29039 | switch (T1) { |
29040 | case PT_Sint8: |
29041 | return emitShrSint16Sint8(I); |
29042 | case PT_Uint8: |
29043 | return emitShrSint16Uint8(I); |
29044 | case PT_Sint16: |
29045 | return emitShrSint16Sint16(I); |
29046 | case PT_Uint16: |
29047 | return emitShrSint16Uint16(I); |
29048 | case PT_Sint32: |
29049 | return emitShrSint16Sint32(I); |
29050 | case PT_Uint32: |
29051 | return emitShrSint16Uint32(I); |
29052 | case PT_Sint64: |
29053 | return emitShrSint16Sint64(I); |
29054 | case PT_Uint64: |
29055 | return emitShrSint16Uint64(I); |
29056 | case PT_IntAP: |
29057 | return emitShrSint16IntAP(I); |
29058 | case PT_IntAPS: |
29059 | return emitShrSint16IntAPS(I); |
29060 | default: llvm_unreachable("invalid type: emitShr" ); |
29061 | } |
29062 | llvm_unreachable("invalid enum value" ); |
29063 | case PT_Uint16: |
29064 | switch (T1) { |
29065 | case PT_Sint8: |
29066 | return emitShrUint16Sint8(I); |
29067 | case PT_Uint8: |
29068 | return emitShrUint16Uint8(I); |
29069 | case PT_Sint16: |
29070 | return emitShrUint16Sint16(I); |
29071 | case PT_Uint16: |
29072 | return emitShrUint16Uint16(I); |
29073 | case PT_Sint32: |
29074 | return emitShrUint16Sint32(I); |
29075 | case PT_Uint32: |
29076 | return emitShrUint16Uint32(I); |
29077 | case PT_Sint64: |
29078 | return emitShrUint16Sint64(I); |
29079 | case PT_Uint64: |
29080 | return emitShrUint16Uint64(I); |
29081 | case PT_IntAP: |
29082 | return emitShrUint16IntAP(I); |
29083 | case PT_IntAPS: |
29084 | return emitShrUint16IntAPS(I); |
29085 | default: llvm_unreachable("invalid type: emitShr" ); |
29086 | } |
29087 | llvm_unreachable("invalid enum value" ); |
29088 | case PT_Sint32: |
29089 | switch (T1) { |
29090 | case PT_Sint8: |
29091 | return emitShrSint32Sint8(I); |
29092 | case PT_Uint8: |
29093 | return emitShrSint32Uint8(I); |
29094 | case PT_Sint16: |
29095 | return emitShrSint32Sint16(I); |
29096 | case PT_Uint16: |
29097 | return emitShrSint32Uint16(I); |
29098 | case PT_Sint32: |
29099 | return emitShrSint32Sint32(I); |
29100 | case PT_Uint32: |
29101 | return emitShrSint32Uint32(I); |
29102 | case PT_Sint64: |
29103 | return emitShrSint32Sint64(I); |
29104 | case PT_Uint64: |
29105 | return emitShrSint32Uint64(I); |
29106 | case PT_IntAP: |
29107 | return emitShrSint32IntAP(I); |
29108 | case PT_IntAPS: |
29109 | return emitShrSint32IntAPS(I); |
29110 | default: llvm_unreachable("invalid type: emitShr" ); |
29111 | } |
29112 | llvm_unreachable("invalid enum value" ); |
29113 | case PT_Uint32: |
29114 | switch (T1) { |
29115 | case PT_Sint8: |
29116 | return emitShrUint32Sint8(I); |
29117 | case PT_Uint8: |
29118 | return emitShrUint32Uint8(I); |
29119 | case PT_Sint16: |
29120 | return emitShrUint32Sint16(I); |
29121 | case PT_Uint16: |
29122 | return emitShrUint32Uint16(I); |
29123 | case PT_Sint32: |
29124 | return emitShrUint32Sint32(I); |
29125 | case PT_Uint32: |
29126 | return emitShrUint32Uint32(I); |
29127 | case PT_Sint64: |
29128 | return emitShrUint32Sint64(I); |
29129 | case PT_Uint64: |
29130 | return emitShrUint32Uint64(I); |
29131 | case PT_IntAP: |
29132 | return emitShrUint32IntAP(I); |
29133 | case PT_IntAPS: |
29134 | return emitShrUint32IntAPS(I); |
29135 | default: llvm_unreachable("invalid type: emitShr" ); |
29136 | } |
29137 | llvm_unreachable("invalid enum value" ); |
29138 | case PT_Sint64: |
29139 | switch (T1) { |
29140 | case PT_Sint8: |
29141 | return emitShrSint64Sint8(I); |
29142 | case PT_Uint8: |
29143 | return emitShrSint64Uint8(I); |
29144 | case PT_Sint16: |
29145 | return emitShrSint64Sint16(I); |
29146 | case PT_Uint16: |
29147 | return emitShrSint64Uint16(I); |
29148 | case PT_Sint32: |
29149 | return emitShrSint64Sint32(I); |
29150 | case PT_Uint32: |
29151 | return emitShrSint64Uint32(I); |
29152 | case PT_Sint64: |
29153 | return emitShrSint64Sint64(I); |
29154 | case PT_Uint64: |
29155 | return emitShrSint64Uint64(I); |
29156 | case PT_IntAP: |
29157 | return emitShrSint64IntAP(I); |
29158 | case PT_IntAPS: |
29159 | return emitShrSint64IntAPS(I); |
29160 | default: llvm_unreachable("invalid type: emitShr" ); |
29161 | } |
29162 | llvm_unreachable("invalid enum value" ); |
29163 | case PT_Uint64: |
29164 | switch (T1) { |
29165 | case PT_Sint8: |
29166 | return emitShrUint64Sint8(I); |
29167 | case PT_Uint8: |
29168 | return emitShrUint64Uint8(I); |
29169 | case PT_Sint16: |
29170 | return emitShrUint64Sint16(I); |
29171 | case PT_Uint16: |
29172 | return emitShrUint64Uint16(I); |
29173 | case PT_Sint32: |
29174 | return emitShrUint64Sint32(I); |
29175 | case PT_Uint32: |
29176 | return emitShrUint64Uint32(I); |
29177 | case PT_Sint64: |
29178 | return emitShrUint64Sint64(I); |
29179 | case PT_Uint64: |
29180 | return emitShrUint64Uint64(I); |
29181 | case PT_IntAP: |
29182 | return emitShrUint64IntAP(I); |
29183 | case PT_IntAPS: |
29184 | return emitShrUint64IntAPS(I); |
29185 | default: llvm_unreachable("invalid type: emitShr" ); |
29186 | } |
29187 | llvm_unreachable("invalid enum value" ); |
29188 | case PT_IntAP: |
29189 | switch (T1) { |
29190 | case PT_Sint8: |
29191 | return emitShrIntAPSint8(I); |
29192 | case PT_Uint8: |
29193 | return emitShrIntAPUint8(I); |
29194 | case PT_Sint16: |
29195 | return emitShrIntAPSint16(I); |
29196 | case PT_Uint16: |
29197 | return emitShrIntAPUint16(I); |
29198 | case PT_Sint32: |
29199 | return emitShrIntAPSint32(I); |
29200 | case PT_Uint32: |
29201 | return emitShrIntAPUint32(I); |
29202 | case PT_Sint64: |
29203 | return emitShrIntAPSint64(I); |
29204 | case PT_Uint64: |
29205 | return emitShrIntAPUint64(I); |
29206 | case PT_IntAP: |
29207 | return emitShrIntAPIntAP(I); |
29208 | case PT_IntAPS: |
29209 | return emitShrIntAPIntAPS(I); |
29210 | default: llvm_unreachable("invalid type: emitShr" ); |
29211 | } |
29212 | llvm_unreachable("invalid enum value" ); |
29213 | case PT_IntAPS: |
29214 | switch (T1) { |
29215 | case PT_Sint8: |
29216 | return emitShrIntAPSSint8(I); |
29217 | case PT_Uint8: |
29218 | return emitShrIntAPSUint8(I); |
29219 | case PT_Sint16: |
29220 | return emitShrIntAPSSint16(I); |
29221 | case PT_Uint16: |
29222 | return emitShrIntAPSUint16(I); |
29223 | case PT_Sint32: |
29224 | return emitShrIntAPSSint32(I); |
29225 | case PT_Uint32: |
29226 | return emitShrIntAPSUint32(I); |
29227 | case PT_Sint64: |
29228 | return emitShrIntAPSSint64(I); |
29229 | case PT_Uint64: |
29230 | return emitShrIntAPSUint64(I); |
29231 | case PT_IntAP: |
29232 | return emitShrIntAPSIntAP(I); |
29233 | case PT_IntAPS: |
29234 | return emitShrIntAPSIntAPS(I); |
29235 | default: llvm_unreachable("invalid type: emitShr" ); |
29236 | } |
29237 | llvm_unreachable("invalid enum value" ); |
29238 | default: llvm_unreachable("invalid type: emitShr" ); |
29239 | } |
29240 | llvm_unreachable("invalid enum value" ); |
29241 | } |
29242 | #endif |
29243 | #ifdef GET_LINK_IMPL |
29244 | bool ByteCodeEmitter::emitShrSint8Sint8(const SourceInfo &L) { |
29245 | return emitOp<>(OP_ShrSint8Sint8, L); |
29246 | } |
29247 | bool ByteCodeEmitter::emitShrSint8Uint8(const SourceInfo &L) { |
29248 | return emitOp<>(OP_ShrSint8Uint8, L); |
29249 | } |
29250 | bool ByteCodeEmitter::emitShrSint8Sint16(const SourceInfo &L) { |
29251 | return emitOp<>(OP_ShrSint8Sint16, L); |
29252 | } |
29253 | bool ByteCodeEmitter::emitShrSint8Uint16(const SourceInfo &L) { |
29254 | return emitOp<>(OP_ShrSint8Uint16, L); |
29255 | } |
29256 | bool ByteCodeEmitter::emitShrSint8Sint32(const SourceInfo &L) { |
29257 | return emitOp<>(OP_ShrSint8Sint32, L); |
29258 | } |
29259 | bool ByteCodeEmitter::emitShrSint8Uint32(const SourceInfo &L) { |
29260 | return emitOp<>(OP_ShrSint8Uint32, L); |
29261 | } |
29262 | bool ByteCodeEmitter::emitShrSint8Sint64(const SourceInfo &L) { |
29263 | return emitOp<>(OP_ShrSint8Sint64, L); |
29264 | } |
29265 | bool ByteCodeEmitter::emitShrSint8Uint64(const SourceInfo &L) { |
29266 | return emitOp<>(OP_ShrSint8Uint64, L); |
29267 | } |
29268 | bool ByteCodeEmitter::emitShrSint8IntAP(const SourceInfo &L) { |
29269 | return emitOp<>(OP_ShrSint8IntAP, L); |
29270 | } |
29271 | bool ByteCodeEmitter::emitShrSint8IntAPS(const SourceInfo &L) { |
29272 | return emitOp<>(OP_ShrSint8IntAPS, L); |
29273 | } |
29274 | bool ByteCodeEmitter::emitShrUint8Sint8(const SourceInfo &L) { |
29275 | return emitOp<>(OP_ShrUint8Sint8, L); |
29276 | } |
29277 | bool ByteCodeEmitter::emitShrUint8Uint8(const SourceInfo &L) { |
29278 | return emitOp<>(OP_ShrUint8Uint8, L); |
29279 | } |
29280 | bool ByteCodeEmitter::emitShrUint8Sint16(const SourceInfo &L) { |
29281 | return emitOp<>(OP_ShrUint8Sint16, L); |
29282 | } |
29283 | bool ByteCodeEmitter::emitShrUint8Uint16(const SourceInfo &L) { |
29284 | return emitOp<>(OP_ShrUint8Uint16, L); |
29285 | } |
29286 | bool ByteCodeEmitter::emitShrUint8Sint32(const SourceInfo &L) { |
29287 | return emitOp<>(OP_ShrUint8Sint32, L); |
29288 | } |
29289 | bool ByteCodeEmitter::emitShrUint8Uint32(const SourceInfo &L) { |
29290 | return emitOp<>(OP_ShrUint8Uint32, L); |
29291 | } |
29292 | bool ByteCodeEmitter::emitShrUint8Sint64(const SourceInfo &L) { |
29293 | return emitOp<>(OP_ShrUint8Sint64, L); |
29294 | } |
29295 | bool ByteCodeEmitter::emitShrUint8Uint64(const SourceInfo &L) { |
29296 | return emitOp<>(OP_ShrUint8Uint64, L); |
29297 | } |
29298 | bool ByteCodeEmitter::emitShrUint8IntAP(const SourceInfo &L) { |
29299 | return emitOp<>(OP_ShrUint8IntAP, L); |
29300 | } |
29301 | bool ByteCodeEmitter::emitShrUint8IntAPS(const SourceInfo &L) { |
29302 | return emitOp<>(OP_ShrUint8IntAPS, L); |
29303 | } |
29304 | bool ByteCodeEmitter::emitShrSint16Sint8(const SourceInfo &L) { |
29305 | return emitOp<>(OP_ShrSint16Sint8, L); |
29306 | } |
29307 | bool ByteCodeEmitter::emitShrSint16Uint8(const SourceInfo &L) { |
29308 | return emitOp<>(OP_ShrSint16Uint8, L); |
29309 | } |
29310 | bool ByteCodeEmitter::emitShrSint16Sint16(const SourceInfo &L) { |
29311 | return emitOp<>(OP_ShrSint16Sint16, L); |
29312 | } |
29313 | bool ByteCodeEmitter::emitShrSint16Uint16(const SourceInfo &L) { |
29314 | return emitOp<>(OP_ShrSint16Uint16, L); |
29315 | } |
29316 | bool ByteCodeEmitter::emitShrSint16Sint32(const SourceInfo &L) { |
29317 | return emitOp<>(OP_ShrSint16Sint32, L); |
29318 | } |
29319 | bool ByteCodeEmitter::emitShrSint16Uint32(const SourceInfo &L) { |
29320 | return emitOp<>(OP_ShrSint16Uint32, L); |
29321 | } |
29322 | bool ByteCodeEmitter::emitShrSint16Sint64(const SourceInfo &L) { |
29323 | return emitOp<>(OP_ShrSint16Sint64, L); |
29324 | } |
29325 | bool ByteCodeEmitter::emitShrSint16Uint64(const SourceInfo &L) { |
29326 | return emitOp<>(OP_ShrSint16Uint64, L); |
29327 | } |
29328 | bool ByteCodeEmitter::emitShrSint16IntAP(const SourceInfo &L) { |
29329 | return emitOp<>(OP_ShrSint16IntAP, L); |
29330 | } |
29331 | bool ByteCodeEmitter::emitShrSint16IntAPS(const SourceInfo &L) { |
29332 | return emitOp<>(OP_ShrSint16IntAPS, L); |
29333 | } |
29334 | bool ByteCodeEmitter::emitShrUint16Sint8(const SourceInfo &L) { |
29335 | return emitOp<>(OP_ShrUint16Sint8, L); |
29336 | } |
29337 | bool ByteCodeEmitter::emitShrUint16Uint8(const SourceInfo &L) { |
29338 | return emitOp<>(OP_ShrUint16Uint8, L); |
29339 | } |
29340 | bool ByteCodeEmitter::emitShrUint16Sint16(const SourceInfo &L) { |
29341 | return emitOp<>(OP_ShrUint16Sint16, L); |
29342 | } |
29343 | bool ByteCodeEmitter::emitShrUint16Uint16(const SourceInfo &L) { |
29344 | return emitOp<>(OP_ShrUint16Uint16, L); |
29345 | } |
29346 | bool ByteCodeEmitter::emitShrUint16Sint32(const SourceInfo &L) { |
29347 | return emitOp<>(OP_ShrUint16Sint32, L); |
29348 | } |
29349 | bool ByteCodeEmitter::emitShrUint16Uint32(const SourceInfo &L) { |
29350 | return emitOp<>(OP_ShrUint16Uint32, L); |
29351 | } |
29352 | bool ByteCodeEmitter::emitShrUint16Sint64(const SourceInfo &L) { |
29353 | return emitOp<>(OP_ShrUint16Sint64, L); |
29354 | } |
29355 | bool ByteCodeEmitter::emitShrUint16Uint64(const SourceInfo &L) { |
29356 | return emitOp<>(OP_ShrUint16Uint64, L); |
29357 | } |
29358 | bool ByteCodeEmitter::emitShrUint16IntAP(const SourceInfo &L) { |
29359 | return emitOp<>(OP_ShrUint16IntAP, L); |
29360 | } |
29361 | bool ByteCodeEmitter::emitShrUint16IntAPS(const SourceInfo &L) { |
29362 | return emitOp<>(OP_ShrUint16IntAPS, L); |
29363 | } |
29364 | bool ByteCodeEmitter::emitShrSint32Sint8(const SourceInfo &L) { |
29365 | return emitOp<>(OP_ShrSint32Sint8, L); |
29366 | } |
29367 | bool ByteCodeEmitter::emitShrSint32Uint8(const SourceInfo &L) { |
29368 | return emitOp<>(OP_ShrSint32Uint8, L); |
29369 | } |
29370 | bool ByteCodeEmitter::emitShrSint32Sint16(const SourceInfo &L) { |
29371 | return emitOp<>(OP_ShrSint32Sint16, L); |
29372 | } |
29373 | bool ByteCodeEmitter::emitShrSint32Uint16(const SourceInfo &L) { |
29374 | return emitOp<>(OP_ShrSint32Uint16, L); |
29375 | } |
29376 | bool ByteCodeEmitter::emitShrSint32Sint32(const SourceInfo &L) { |
29377 | return emitOp<>(OP_ShrSint32Sint32, L); |
29378 | } |
29379 | bool ByteCodeEmitter::emitShrSint32Uint32(const SourceInfo &L) { |
29380 | return emitOp<>(OP_ShrSint32Uint32, L); |
29381 | } |
29382 | bool ByteCodeEmitter::emitShrSint32Sint64(const SourceInfo &L) { |
29383 | return emitOp<>(OP_ShrSint32Sint64, L); |
29384 | } |
29385 | bool ByteCodeEmitter::emitShrSint32Uint64(const SourceInfo &L) { |
29386 | return emitOp<>(OP_ShrSint32Uint64, L); |
29387 | } |
29388 | bool ByteCodeEmitter::emitShrSint32IntAP(const SourceInfo &L) { |
29389 | return emitOp<>(OP_ShrSint32IntAP, L); |
29390 | } |
29391 | bool ByteCodeEmitter::emitShrSint32IntAPS(const SourceInfo &L) { |
29392 | return emitOp<>(OP_ShrSint32IntAPS, L); |
29393 | } |
29394 | bool ByteCodeEmitter::emitShrUint32Sint8(const SourceInfo &L) { |
29395 | return emitOp<>(OP_ShrUint32Sint8, L); |
29396 | } |
29397 | bool ByteCodeEmitter::emitShrUint32Uint8(const SourceInfo &L) { |
29398 | return emitOp<>(OP_ShrUint32Uint8, L); |
29399 | } |
29400 | bool ByteCodeEmitter::emitShrUint32Sint16(const SourceInfo &L) { |
29401 | return emitOp<>(OP_ShrUint32Sint16, L); |
29402 | } |
29403 | bool ByteCodeEmitter::emitShrUint32Uint16(const SourceInfo &L) { |
29404 | return emitOp<>(OP_ShrUint32Uint16, L); |
29405 | } |
29406 | bool ByteCodeEmitter::emitShrUint32Sint32(const SourceInfo &L) { |
29407 | return emitOp<>(OP_ShrUint32Sint32, L); |
29408 | } |
29409 | bool ByteCodeEmitter::emitShrUint32Uint32(const SourceInfo &L) { |
29410 | return emitOp<>(OP_ShrUint32Uint32, L); |
29411 | } |
29412 | bool ByteCodeEmitter::emitShrUint32Sint64(const SourceInfo &L) { |
29413 | return emitOp<>(OP_ShrUint32Sint64, L); |
29414 | } |
29415 | bool ByteCodeEmitter::emitShrUint32Uint64(const SourceInfo &L) { |
29416 | return emitOp<>(OP_ShrUint32Uint64, L); |
29417 | } |
29418 | bool ByteCodeEmitter::emitShrUint32IntAP(const SourceInfo &L) { |
29419 | return emitOp<>(OP_ShrUint32IntAP, L); |
29420 | } |
29421 | bool ByteCodeEmitter::emitShrUint32IntAPS(const SourceInfo &L) { |
29422 | return emitOp<>(OP_ShrUint32IntAPS, L); |
29423 | } |
29424 | bool ByteCodeEmitter::emitShrSint64Sint8(const SourceInfo &L) { |
29425 | return emitOp<>(OP_ShrSint64Sint8, L); |
29426 | } |
29427 | bool ByteCodeEmitter::emitShrSint64Uint8(const SourceInfo &L) { |
29428 | return emitOp<>(OP_ShrSint64Uint8, L); |
29429 | } |
29430 | bool ByteCodeEmitter::emitShrSint64Sint16(const SourceInfo &L) { |
29431 | return emitOp<>(OP_ShrSint64Sint16, L); |
29432 | } |
29433 | bool ByteCodeEmitter::emitShrSint64Uint16(const SourceInfo &L) { |
29434 | return emitOp<>(OP_ShrSint64Uint16, L); |
29435 | } |
29436 | bool ByteCodeEmitter::emitShrSint64Sint32(const SourceInfo &L) { |
29437 | return emitOp<>(OP_ShrSint64Sint32, L); |
29438 | } |
29439 | bool ByteCodeEmitter::emitShrSint64Uint32(const SourceInfo &L) { |
29440 | return emitOp<>(OP_ShrSint64Uint32, L); |
29441 | } |
29442 | bool ByteCodeEmitter::emitShrSint64Sint64(const SourceInfo &L) { |
29443 | return emitOp<>(OP_ShrSint64Sint64, L); |
29444 | } |
29445 | bool ByteCodeEmitter::emitShrSint64Uint64(const SourceInfo &L) { |
29446 | return emitOp<>(OP_ShrSint64Uint64, L); |
29447 | } |
29448 | bool ByteCodeEmitter::emitShrSint64IntAP(const SourceInfo &L) { |
29449 | return emitOp<>(OP_ShrSint64IntAP, L); |
29450 | } |
29451 | bool ByteCodeEmitter::emitShrSint64IntAPS(const SourceInfo &L) { |
29452 | return emitOp<>(OP_ShrSint64IntAPS, L); |
29453 | } |
29454 | bool ByteCodeEmitter::emitShrUint64Sint8(const SourceInfo &L) { |
29455 | return emitOp<>(OP_ShrUint64Sint8, L); |
29456 | } |
29457 | bool ByteCodeEmitter::emitShrUint64Uint8(const SourceInfo &L) { |
29458 | return emitOp<>(OP_ShrUint64Uint8, L); |
29459 | } |
29460 | bool ByteCodeEmitter::emitShrUint64Sint16(const SourceInfo &L) { |
29461 | return emitOp<>(OP_ShrUint64Sint16, L); |
29462 | } |
29463 | bool ByteCodeEmitter::emitShrUint64Uint16(const SourceInfo &L) { |
29464 | return emitOp<>(OP_ShrUint64Uint16, L); |
29465 | } |
29466 | bool ByteCodeEmitter::emitShrUint64Sint32(const SourceInfo &L) { |
29467 | return emitOp<>(OP_ShrUint64Sint32, L); |
29468 | } |
29469 | bool ByteCodeEmitter::emitShrUint64Uint32(const SourceInfo &L) { |
29470 | return emitOp<>(OP_ShrUint64Uint32, L); |
29471 | } |
29472 | bool ByteCodeEmitter::emitShrUint64Sint64(const SourceInfo &L) { |
29473 | return emitOp<>(OP_ShrUint64Sint64, L); |
29474 | } |
29475 | bool ByteCodeEmitter::emitShrUint64Uint64(const SourceInfo &L) { |
29476 | return emitOp<>(OP_ShrUint64Uint64, L); |
29477 | } |
29478 | bool ByteCodeEmitter::emitShrUint64IntAP(const SourceInfo &L) { |
29479 | return emitOp<>(OP_ShrUint64IntAP, L); |
29480 | } |
29481 | bool ByteCodeEmitter::emitShrUint64IntAPS(const SourceInfo &L) { |
29482 | return emitOp<>(OP_ShrUint64IntAPS, L); |
29483 | } |
29484 | bool ByteCodeEmitter::emitShrIntAPSint8(const SourceInfo &L) { |
29485 | return emitOp<>(OP_ShrIntAPSint8, L); |
29486 | } |
29487 | bool ByteCodeEmitter::emitShrIntAPUint8(const SourceInfo &L) { |
29488 | return emitOp<>(OP_ShrIntAPUint8, L); |
29489 | } |
29490 | bool ByteCodeEmitter::emitShrIntAPSint16(const SourceInfo &L) { |
29491 | return emitOp<>(OP_ShrIntAPSint16, L); |
29492 | } |
29493 | bool ByteCodeEmitter::emitShrIntAPUint16(const SourceInfo &L) { |
29494 | return emitOp<>(OP_ShrIntAPUint16, L); |
29495 | } |
29496 | bool ByteCodeEmitter::emitShrIntAPSint32(const SourceInfo &L) { |
29497 | return emitOp<>(OP_ShrIntAPSint32, L); |
29498 | } |
29499 | bool ByteCodeEmitter::emitShrIntAPUint32(const SourceInfo &L) { |
29500 | return emitOp<>(OP_ShrIntAPUint32, L); |
29501 | } |
29502 | bool ByteCodeEmitter::emitShrIntAPSint64(const SourceInfo &L) { |
29503 | return emitOp<>(OP_ShrIntAPSint64, L); |
29504 | } |
29505 | bool ByteCodeEmitter::emitShrIntAPUint64(const SourceInfo &L) { |
29506 | return emitOp<>(OP_ShrIntAPUint64, L); |
29507 | } |
29508 | bool ByteCodeEmitter::emitShrIntAPIntAP(const SourceInfo &L) { |
29509 | return emitOp<>(OP_ShrIntAPIntAP, L); |
29510 | } |
29511 | bool ByteCodeEmitter::emitShrIntAPIntAPS(const SourceInfo &L) { |
29512 | return emitOp<>(OP_ShrIntAPIntAPS, L); |
29513 | } |
29514 | bool ByteCodeEmitter::emitShrIntAPSSint8(const SourceInfo &L) { |
29515 | return emitOp<>(OP_ShrIntAPSSint8, L); |
29516 | } |
29517 | bool ByteCodeEmitter::emitShrIntAPSUint8(const SourceInfo &L) { |
29518 | return emitOp<>(OP_ShrIntAPSUint8, L); |
29519 | } |
29520 | bool ByteCodeEmitter::emitShrIntAPSSint16(const SourceInfo &L) { |
29521 | return emitOp<>(OP_ShrIntAPSSint16, L); |
29522 | } |
29523 | bool ByteCodeEmitter::emitShrIntAPSUint16(const SourceInfo &L) { |
29524 | return emitOp<>(OP_ShrIntAPSUint16, L); |
29525 | } |
29526 | bool ByteCodeEmitter::emitShrIntAPSSint32(const SourceInfo &L) { |
29527 | return emitOp<>(OP_ShrIntAPSSint32, L); |
29528 | } |
29529 | bool ByteCodeEmitter::emitShrIntAPSUint32(const SourceInfo &L) { |
29530 | return emitOp<>(OP_ShrIntAPSUint32, L); |
29531 | } |
29532 | bool ByteCodeEmitter::emitShrIntAPSSint64(const SourceInfo &L) { |
29533 | return emitOp<>(OP_ShrIntAPSSint64, L); |
29534 | } |
29535 | bool ByteCodeEmitter::emitShrIntAPSUint64(const SourceInfo &L) { |
29536 | return emitOp<>(OP_ShrIntAPSUint64, L); |
29537 | } |
29538 | bool ByteCodeEmitter::emitShrIntAPSIntAP(const SourceInfo &L) { |
29539 | return emitOp<>(OP_ShrIntAPSIntAP, L); |
29540 | } |
29541 | bool ByteCodeEmitter::emitShrIntAPSIntAPS(const SourceInfo &L) { |
29542 | return emitOp<>(OP_ShrIntAPSIntAPS, L); |
29543 | } |
29544 | #endif |
29545 | #ifdef GET_EVAL_IMPL |
29546 | bool EvalEmitter::emitShrSint8Sint8(const SourceInfo &L) { |
29547 | if (!isActive()) return true; |
29548 | CurrentSource = L; |
29549 | return Shr<PT_Sint8, PT_Sint8>(S, OpPC); |
29550 | } |
29551 | bool EvalEmitter::emitShrSint8Uint8(const SourceInfo &L) { |
29552 | if (!isActive()) return true; |
29553 | CurrentSource = L; |
29554 | return Shr<PT_Sint8, PT_Uint8>(S, OpPC); |
29555 | } |
29556 | bool EvalEmitter::emitShrSint8Sint16(const SourceInfo &L) { |
29557 | if (!isActive()) return true; |
29558 | CurrentSource = L; |
29559 | return Shr<PT_Sint8, PT_Sint16>(S, OpPC); |
29560 | } |
29561 | bool EvalEmitter::emitShrSint8Uint16(const SourceInfo &L) { |
29562 | if (!isActive()) return true; |
29563 | CurrentSource = L; |
29564 | return Shr<PT_Sint8, PT_Uint16>(S, OpPC); |
29565 | } |
29566 | bool EvalEmitter::emitShrSint8Sint32(const SourceInfo &L) { |
29567 | if (!isActive()) return true; |
29568 | CurrentSource = L; |
29569 | return Shr<PT_Sint8, PT_Sint32>(S, OpPC); |
29570 | } |
29571 | bool EvalEmitter::emitShrSint8Uint32(const SourceInfo &L) { |
29572 | if (!isActive()) return true; |
29573 | CurrentSource = L; |
29574 | return Shr<PT_Sint8, PT_Uint32>(S, OpPC); |
29575 | } |
29576 | bool EvalEmitter::emitShrSint8Sint64(const SourceInfo &L) { |
29577 | if (!isActive()) return true; |
29578 | CurrentSource = L; |
29579 | return Shr<PT_Sint8, PT_Sint64>(S, OpPC); |
29580 | } |
29581 | bool EvalEmitter::emitShrSint8Uint64(const SourceInfo &L) { |
29582 | if (!isActive()) return true; |
29583 | CurrentSource = L; |
29584 | return Shr<PT_Sint8, PT_Uint64>(S, OpPC); |
29585 | } |
29586 | bool EvalEmitter::emitShrSint8IntAP(const SourceInfo &L) { |
29587 | if (!isActive()) return true; |
29588 | CurrentSource = L; |
29589 | return Shr<PT_Sint8, PT_IntAP>(S, OpPC); |
29590 | } |
29591 | bool EvalEmitter::emitShrSint8IntAPS(const SourceInfo &L) { |
29592 | if (!isActive()) return true; |
29593 | CurrentSource = L; |
29594 | return Shr<PT_Sint8, PT_IntAPS>(S, OpPC); |
29595 | } |
29596 | bool EvalEmitter::emitShrUint8Sint8(const SourceInfo &L) { |
29597 | if (!isActive()) return true; |
29598 | CurrentSource = L; |
29599 | return Shr<PT_Uint8, PT_Sint8>(S, OpPC); |
29600 | } |
29601 | bool EvalEmitter::emitShrUint8Uint8(const SourceInfo &L) { |
29602 | if (!isActive()) return true; |
29603 | CurrentSource = L; |
29604 | return Shr<PT_Uint8, PT_Uint8>(S, OpPC); |
29605 | } |
29606 | bool EvalEmitter::emitShrUint8Sint16(const SourceInfo &L) { |
29607 | if (!isActive()) return true; |
29608 | CurrentSource = L; |
29609 | return Shr<PT_Uint8, PT_Sint16>(S, OpPC); |
29610 | } |
29611 | bool EvalEmitter::emitShrUint8Uint16(const SourceInfo &L) { |
29612 | if (!isActive()) return true; |
29613 | CurrentSource = L; |
29614 | return Shr<PT_Uint8, PT_Uint16>(S, OpPC); |
29615 | } |
29616 | bool EvalEmitter::emitShrUint8Sint32(const SourceInfo &L) { |
29617 | if (!isActive()) return true; |
29618 | CurrentSource = L; |
29619 | return Shr<PT_Uint8, PT_Sint32>(S, OpPC); |
29620 | } |
29621 | bool EvalEmitter::emitShrUint8Uint32(const SourceInfo &L) { |
29622 | if (!isActive()) return true; |
29623 | CurrentSource = L; |
29624 | return Shr<PT_Uint8, PT_Uint32>(S, OpPC); |
29625 | } |
29626 | bool EvalEmitter::emitShrUint8Sint64(const SourceInfo &L) { |
29627 | if (!isActive()) return true; |
29628 | CurrentSource = L; |
29629 | return Shr<PT_Uint8, PT_Sint64>(S, OpPC); |
29630 | } |
29631 | bool EvalEmitter::emitShrUint8Uint64(const SourceInfo &L) { |
29632 | if (!isActive()) return true; |
29633 | CurrentSource = L; |
29634 | return Shr<PT_Uint8, PT_Uint64>(S, OpPC); |
29635 | } |
29636 | bool EvalEmitter::emitShrUint8IntAP(const SourceInfo &L) { |
29637 | if (!isActive()) return true; |
29638 | CurrentSource = L; |
29639 | return Shr<PT_Uint8, PT_IntAP>(S, OpPC); |
29640 | } |
29641 | bool EvalEmitter::emitShrUint8IntAPS(const SourceInfo &L) { |
29642 | if (!isActive()) return true; |
29643 | CurrentSource = L; |
29644 | return Shr<PT_Uint8, PT_IntAPS>(S, OpPC); |
29645 | } |
29646 | bool EvalEmitter::emitShrSint16Sint8(const SourceInfo &L) { |
29647 | if (!isActive()) return true; |
29648 | CurrentSource = L; |
29649 | return Shr<PT_Sint16, PT_Sint8>(S, OpPC); |
29650 | } |
29651 | bool EvalEmitter::emitShrSint16Uint8(const SourceInfo &L) { |
29652 | if (!isActive()) return true; |
29653 | CurrentSource = L; |
29654 | return Shr<PT_Sint16, PT_Uint8>(S, OpPC); |
29655 | } |
29656 | bool EvalEmitter::emitShrSint16Sint16(const SourceInfo &L) { |
29657 | if (!isActive()) return true; |
29658 | CurrentSource = L; |
29659 | return Shr<PT_Sint16, PT_Sint16>(S, OpPC); |
29660 | } |
29661 | bool EvalEmitter::emitShrSint16Uint16(const SourceInfo &L) { |
29662 | if (!isActive()) return true; |
29663 | CurrentSource = L; |
29664 | return Shr<PT_Sint16, PT_Uint16>(S, OpPC); |
29665 | } |
29666 | bool EvalEmitter::emitShrSint16Sint32(const SourceInfo &L) { |
29667 | if (!isActive()) return true; |
29668 | CurrentSource = L; |
29669 | return Shr<PT_Sint16, PT_Sint32>(S, OpPC); |
29670 | } |
29671 | bool EvalEmitter::emitShrSint16Uint32(const SourceInfo &L) { |
29672 | if (!isActive()) return true; |
29673 | CurrentSource = L; |
29674 | return Shr<PT_Sint16, PT_Uint32>(S, OpPC); |
29675 | } |
29676 | bool EvalEmitter::emitShrSint16Sint64(const SourceInfo &L) { |
29677 | if (!isActive()) return true; |
29678 | CurrentSource = L; |
29679 | return Shr<PT_Sint16, PT_Sint64>(S, OpPC); |
29680 | } |
29681 | bool EvalEmitter::emitShrSint16Uint64(const SourceInfo &L) { |
29682 | if (!isActive()) return true; |
29683 | CurrentSource = L; |
29684 | return Shr<PT_Sint16, PT_Uint64>(S, OpPC); |
29685 | } |
29686 | bool EvalEmitter::emitShrSint16IntAP(const SourceInfo &L) { |
29687 | if (!isActive()) return true; |
29688 | CurrentSource = L; |
29689 | return Shr<PT_Sint16, PT_IntAP>(S, OpPC); |
29690 | } |
29691 | bool EvalEmitter::emitShrSint16IntAPS(const SourceInfo &L) { |
29692 | if (!isActive()) return true; |
29693 | CurrentSource = L; |
29694 | return Shr<PT_Sint16, PT_IntAPS>(S, OpPC); |
29695 | } |
29696 | bool EvalEmitter::emitShrUint16Sint8(const SourceInfo &L) { |
29697 | if (!isActive()) return true; |
29698 | CurrentSource = L; |
29699 | return Shr<PT_Uint16, PT_Sint8>(S, OpPC); |
29700 | } |
29701 | bool EvalEmitter::emitShrUint16Uint8(const SourceInfo &L) { |
29702 | if (!isActive()) return true; |
29703 | CurrentSource = L; |
29704 | return Shr<PT_Uint16, PT_Uint8>(S, OpPC); |
29705 | } |
29706 | bool EvalEmitter::emitShrUint16Sint16(const SourceInfo &L) { |
29707 | if (!isActive()) return true; |
29708 | CurrentSource = L; |
29709 | return Shr<PT_Uint16, PT_Sint16>(S, OpPC); |
29710 | } |
29711 | bool EvalEmitter::emitShrUint16Uint16(const SourceInfo &L) { |
29712 | if (!isActive()) return true; |
29713 | CurrentSource = L; |
29714 | return Shr<PT_Uint16, PT_Uint16>(S, OpPC); |
29715 | } |
29716 | bool EvalEmitter::emitShrUint16Sint32(const SourceInfo &L) { |
29717 | if (!isActive()) return true; |
29718 | CurrentSource = L; |
29719 | return Shr<PT_Uint16, PT_Sint32>(S, OpPC); |
29720 | } |
29721 | bool EvalEmitter::emitShrUint16Uint32(const SourceInfo &L) { |
29722 | if (!isActive()) return true; |
29723 | CurrentSource = L; |
29724 | return Shr<PT_Uint16, PT_Uint32>(S, OpPC); |
29725 | } |
29726 | bool EvalEmitter::emitShrUint16Sint64(const SourceInfo &L) { |
29727 | if (!isActive()) return true; |
29728 | CurrentSource = L; |
29729 | return Shr<PT_Uint16, PT_Sint64>(S, OpPC); |
29730 | } |
29731 | bool EvalEmitter::emitShrUint16Uint64(const SourceInfo &L) { |
29732 | if (!isActive()) return true; |
29733 | CurrentSource = L; |
29734 | return Shr<PT_Uint16, PT_Uint64>(S, OpPC); |
29735 | } |
29736 | bool EvalEmitter::emitShrUint16IntAP(const SourceInfo &L) { |
29737 | if (!isActive()) return true; |
29738 | CurrentSource = L; |
29739 | return Shr<PT_Uint16, PT_IntAP>(S, OpPC); |
29740 | } |
29741 | bool EvalEmitter::emitShrUint16IntAPS(const SourceInfo &L) { |
29742 | if (!isActive()) return true; |
29743 | CurrentSource = L; |
29744 | return Shr<PT_Uint16, PT_IntAPS>(S, OpPC); |
29745 | } |
29746 | bool EvalEmitter::emitShrSint32Sint8(const SourceInfo &L) { |
29747 | if (!isActive()) return true; |
29748 | CurrentSource = L; |
29749 | return Shr<PT_Sint32, PT_Sint8>(S, OpPC); |
29750 | } |
29751 | bool EvalEmitter::emitShrSint32Uint8(const SourceInfo &L) { |
29752 | if (!isActive()) return true; |
29753 | CurrentSource = L; |
29754 | return Shr<PT_Sint32, PT_Uint8>(S, OpPC); |
29755 | } |
29756 | bool EvalEmitter::emitShrSint32Sint16(const SourceInfo &L) { |
29757 | if (!isActive()) return true; |
29758 | CurrentSource = L; |
29759 | return Shr<PT_Sint32, PT_Sint16>(S, OpPC); |
29760 | } |
29761 | bool EvalEmitter::emitShrSint32Uint16(const SourceInfo &L) { |
29762 | if (!isActive()) return true; |
29763 | CurrentSource = L; |
29764 | return Shr<PT_Sint32, PT_Uint16>(S, OpPC); |
29765 | } |
29766 | bool EvalEmitter::emitShrSint32Sint32(const SourceInfo &L) { |
29767 | if (!isActive()) return true; |
29768 | CurrentSource = L; |
29769 | return Shr<PT_Sint32, PT_Sint32>(S, OpPC); |
29770 | } |
29771 | bool EvalEmitter::emitShrSint32Uint32(const SourceInfo &L) { |
29772 | if (!isActive()) return true; |
29773 | CurrentSource = L; |
29774 | return Shr<PT_Sint32, PT_Uint32>(S, OpPC); |
29775 | } |
29776 | bool EvalEmitter::emitShrSint32Sint64(const SourceInfo &L) { |
29777 | if (!isActive()) return true; |
29778 | CurrentSource = L; |
29779 | return Shr<PT_Sint32, PT_Sint64>(S, OpPC); |
29780 | } |
29781 | bool EvalEmitter::emitShrSint32Uint64(const SourceInfo &L) { |
29782 | if (!isActive()) return true; |
29783 | CurrentSource = L; |
29784 | return Shr<PT_Sint32, PT_Uint64>(S, OpPC); |
29785 | } |
29786 | bool EvalEmitter::emitShrSint32IntAP(const SourceInfo &L) { |
29787 | if (!isActive()) return true; |
29788 | CurrentSource = L; |
29789 | return Shr<PT_Sint32, PT_IntAP>(S, OpPC); |
29790 | } |
29791 | bool EvalEmitter::emitShrSint32IntAPS(const SourceInfo &L) { |
29792 | if (!isActive()) return true; |
29793 | CurrentSource = L; |
29794 | return Shr<PT_Sint32, PT_IntAPS>(S, OpPC); |
29795 | } |
29796 | bool EvalEmitter::emitShrUint32Sint8(const SourceInfo &L) { |
29797 | if (!isActive()) return true; |
29798 | CurrentSource = L; |
29799 | return Shr<PT_Uint32, PT_Sint8>(S, OpPC); |
29800 | } |
29801 | bool EvalEmitter::emitShrUint32Uint8(const SourceInfo &L) { |
29802 | if (!isActive()) return true; |
29803 | CurrentSource = L; |
29804 | return Shr<PT_Uint32, PT_Uint8>(S, OpPC); |
29805 | } |
29806 | bool EvalEmitter::emitShrUint32Sint16(const SourceInfo &L) { |
29807 | if (!isActive()) return true; |
29808 | CurrentSource = L; |
29809 | return Shr<PT_Uint32, PT_Sint16>(S, OpPC); |
29810 | } |
29811 | bool EvalEmitter::emitShrUint32Uint16(const SourceInfo &L) { |
29812 | if (!isActive()) return true; |
29813 | CurrentSource = L; |
29814 | return Shr<PT_Uint32, PT_Uint16>(S, OpPC); |
29815 | } |
29816 | bool EvalEmitter::emitShrUint32Sint32(const SourceInfo &L) { |
29817 | if (!isActive()) return true; |
29818 | CurrentSource = L; |
29819 | return Shr<PT_Uint32, PT_Sint32>(S, OpPC); |
29820 | } |
29821 | bool EvalEmitter::emitShrUint32Uint32(const SourceInfo &L) { |
29822 | if (!isActive()) return true; |
29823 | CurrentSource = L; |
29824 | return Shr<PT_Uint32, PT_Uint32>(S, OpPC); |
29825 | } |
29826 | bool EvalEmitter::emitShrUint32Sint64(const SourceInfo &L) { |
29827 | if (!isActive()) return true; |
29828 | CurrentSource = L; |
29829 | return Shr<PT_Uint32, PT_Sint64>(S, OpPC); |
29830 | } |
29831 | bool EvalEmitter::emitShrUint32Uint64(const SourceInfo &L) { |
29832 | if (!isActive()) return true; |
29833 | CurrentSource = L; |
29834 | return Shr<PT_Uint32, PT_Uint64>(S, OpPC); |
29835 | } |
29836 | bool EvalEmitter::emitShrUint32IntAP(const SourceInfo &L) { |
29837 | if (!isActive()) return true; |
29838 | CurrentSource = L; |
29839 | return Shr<PT_Uint32, PT_IntAP>(S, OpPC); |
29840 | } |
29841 | bool EvalEmitter::emitShrUint32IntAPS(const SourceInfo &L) { |
29842 | if (!isActive()) return true; |
29843 | CurrentSource = L; |
29844 | return Shr<PT_Uint32, PT_IntAPS>(S, OpPC); |
29845 | } |
29846 | bool EvalEmitter::emitShrSint64Sint8(const SourceInfo &L) { |
29847 | if (!isActive()) return true; |
29848 | CurrentSource = L; |
29849 | return Shr<PT_Sint64, PT_Sint8>(S, OpPC); |
29850 | } |
29851 | bool EvalEmitter::emitShrSint64Uint8(const SourceInfo &L) { |
29852 | if (!isActive()) return true; |
29853 | CurrentSource = L; |
29854 | return Shr<PT_Sint64, PT_Uint8>(S, OpPC); |
29855 | } |
29856 | bool EvalEmitter::emitShrSint64Sint16(const SourceInfo &L) { |
29857 | if (!isActive()) return true; |
29858 | CurrentSource = L; |
29859 | return Shr<PT_Sint64, PT_Sint16>(S, OpPC); |
29860 | } |
29861 | bool EvalEmitter::emitShrSint64Uint16(const SourceInfo &L) { |
29862 | if (!isActive()) return true; |
29863 | CurrentSource = L; |
29864 | return Shr<PT_Sint64, PT_Uint16>(S, OpPC); |
29865 | } |
29866 | bool EvalEmitter::emitShrSint64Sint32(const SourceInfo &L) { |
29867 | if (!isActive()) return true; |
29868 | CurrentSource = L; |
29869 | return Shr<PT_Sint64, PT_Sint32>(S, OpPC); |
29870 | } |
29871 | bool EvalEmitter::emitShrSint64Uint32(const SourceInfo &L) { |
29872 | if (!isActive()) return true; |
29873 | CurrentSource = L; |
29874 | return Shr<PT_Sint64, PT_Uint32>(S, OpPC); |
29875 | } |
29876 | bool EvalEmitter::emitShrSint64Sint64(const SourceInfo &L) { |
29877 | if (!isActive()) return true; |
29878 | CurrentSource = L; |
29879 | return Shr<PT_Sint64, PT_Sint64>(S, OpPC); |
29880 | } |
29881 | bool EvalEmitter::emitShrSint64Uint64(const SourceInfo &L) { |
29882 | if (!isActive()) return true; |
29883 | CurrentSource = L; |
29884 | return Shr<PT_Sint64, PT_Uint64>(S, OpPC); |
29885 | } |
29886 | bool EvalEmitter::emitShrSint64IntAP(const SourceInfo &L) { |
29887 | if (!isActive()) return true; |
29888 | CurrentSource = L; |
29889 | return Shr<PT_Sint64, PT_IntAP>(S, OpPC); |
29890 | } |
29891 | bool EvalEmitter::emitShrSint64IntAPS(const SourceInfo &L) { |
29892 | if (!isActive()) return true; |
29893 | CurrentSource = L; |
29894 | return Shr<PT_Sint64, PT_IntAPS>(S, OpPC); |
29895 | } |
29896 | bool EvalEmitter::emitShrUint64Sint8(const SourceInfo &L) { |
29897 | if (!isActive()) return true; |
29898 | CurrentSource = L; |
29899 | return Shr<PT_Uint64, PT_Sint8>(S, OpPC); |
29900 | } |
29901 | bool EvalEmitter::emitShrUint64Uint8(const SourceInfo &L) { |
29902 | if (!isActive()) return true; |
29903 | CurrentSource = L; |
29904 | return Shr<PT_Uint64, PT_Uint8>(S, OpPC); |
29905 | } |
29906 | bool EvalEmitter::emitShrUint64Sint16(const SourceInfo &L) { |
29907 | if (!isActive()) return true; |
29908 | CurrentSource = L; |
29909 | return Shr<PT_Uint64, PT_Sint16>(S, OpPC); |
29910 | } |
29911 | bool EvalEmitter::emitShrUint64Uint16(const SourceInfo &L) { |
29912 | if (!isActive()) return true; |
29913 | CurrentSource = L; |
29914 | return Shr<PT_Uint64, PT_Uint16>(S, OpPC); |
29915 | } |
29916 | bool EvalEmitter::emitShrUint64Sint32(const SourceInfo &L) { |
29917 | if (!isActive()) return true; |
29918 | CurrentSource = L; |
29919 | return Shr<PT_Uint64, PT_Sint32>(S, OpPC); |
29920 | } |
29921 | bool EvalEmitter::emitShrUint64Uint32(const SourceInfo &L) { |
29922 | if (!isActive()) return true; |
29923 | CurrentSource = L; |
29924 | return Shr<PT_Uint64, PT_Uint32>(S, OpPC); |
29925 | } |
29926 | bool EvalEmitter::emitShrUint64Sint64(const SourceInfo &L) { |
29927 | if (!isActive()) return true; |
29928 | CurrentSource = L; |
29929 | return Shr<PT_Uint64, PT_Sint64>(S, OpPC); |
29930 | } |
29931 | bool EvalEmitter::emitShrUint64Uint64(const SourceInfo &L) { |
29932 | if (!isActive()) return true; |
29933 | CurrentSource = L; |
29934 | return Shr<PT_Uint64, PT_Uint64>(S, OpPC); |
29935 | } |
29936 | bool EvalEmitter::emitShrUint64IntAP(const SourceInfo &L) { |
29937 | if (!isActive()) return true; |
29938 | CurrentSource = L; |
29939 | return Shr<PT_Uint64, PT_IntAP>(S, OpPC); |
29940 | } |
29941 | bool EvalEmitter::emitShrUint64IntAPS(const SourceInfo &L) { |
29942 | if (!isActive()) return true; |
29943 | CurrentSource = L; |
29944 | return Shr<PT_Uint64, PT_IntAPS>(S, OpPC); |
29945 | } |
29946 | bool EvalEmitter::emitShrIntAPSint8(const SourceInfo &L) { |
29947 | if (!isActive()) return true; |
29948 | CurrentSource = L; |
29949 | return Shr<PT_IntAP, PT_Sint8>(S, OpPC); |
29950 | } |
29951 | bool EvalEmitter::emitShrIntAPUint8(const SourceInfo &L) { |
29952 | if (!isActive()) return true; |
29953 | CurrentSource = L; |
29954 | return Shr<PT_IntAP, PT_Uint8>(S, OpPC); |
29955 | } |
29956 | bool EvalEmitter::emitShrIntAPSint16(const SourceInfo &L) { |
29957 | if (!isActive()) return true; |
29958 | CurrentSource = L; |
29959 | return Shr<PT_IntAP, PT_Sint16>(S, OpPC); |
29960 | } |
29961 | bool EvalEmitter::emitShrIntAPUint16(const SourceInfo &L) { |
29962 | if (!isActive()) return true; |
29963 | CurrentSource = L; |
29964 | return Shr<PT_IntAP, PT_Uint16>(S, OpPC); |
29965 | } |
29966 | bool EvalEmitter::emitShrIntAPSint32(const SourceInfo &L) { |
29967 | if (!isActive()) return true; |
29968 | CurrentSource = L; |
29969 | return Shr<PT_IntAP, PT_Sint32>(S, OpPC); |
29970 | } |
29971 | bool EvalEmitter::emitShrIntAPUint32(const SourceInfo &L) { |
29972 | if (!isActive()) return true; |
29973 | CurrentSource = L; |
29974 | return Shr<PT_IntAP, PT_Uint32>(S, OpPC); |
29975 | } |
29976 | bool EvalEmitter::emitShrIntAPSint64(const SourceInfo &L) { |
29977 | if (!isActive()) return true; |
29978 | CurrentSource = L; |
29979 | return Shr<PT_IntAP, PT_Sint64>(S, OpPC); |
29980 | } |
29981 | bool EvalEmitter::emitShrIntAPUint64(const SourceInfo &L) { |
29982 | if (!isActive()) return true; |
29983 | CurrentSource = L; |
29984 | return Shr<PT_IntAP, PT_Uint64>(S, OpPC); |
29985 | } |
29986 | bool EvalEmitter::emitShrIntAPIntAP(const SourceInfo &L) { |
29987 | if (!isActive()) return true; |
29988 | CurrentSource = L; |
29989 | return Shr<PT_IntAP, PT_IntAP>(S, OpPC); |
29990 | } |
29991 | bool EvalEmitter::emitShrIntAPIntAPS(const SourceInfo &L) { |
29992 | if (!isActive()) return true; |
29993 | CurrentSource = L; |
29994 | return Shr<PT_IntAP, PT_IntAPS>(S, OpPC); |
29995 | } |
29996 | bool EvalEmitter::emitShrIntAPSSint8(const SourceInfo &L) { |
29997 | if (!isActive()) return true; |
29998 | CurrentSource = L; |
29999 | return Shr<PT_IntAPS, PT_Sint8>(S, OpPC); |
30000 | } |
30001 | bool EvalEmitter::emitShrIntAPSUint8(const SourceInfo &L) { |
30002 | if (!isActive()) return true; |
30003 | CurrentSource = L; |
30004 | return Shr<PT_IntAPS, PT_Uint8>(S, OpPC); |
30005 | } |
30006 | bool EvalEmitter::emitShrIntAPSSint16(const SourceInfo &L) { |
30007 | if (!isActive()) return true; |
30008 | CurrentSource = L; |
30009 | return Shr<PT_IntAPS, PT_Sint16>(S, OpPC); |
30010 | } |
30011 | bool EvalEmitter::emitShrIntAPSUint16(const SourceInfo &L) { |
30012 | if (!isActive()) return true; |
30013 | CurrentSource = L; |
30014 | return Shr<PT_IntAPS, PT_Uint16>(S, OpPC); |
30015 | } |
30016 | bool EvalEmitter::emitShrIntAPSSint32(const SourceInfo &L) { |
30017 | if (!isActive()) return true; |
30018 | CurrentSource = L; |
30019 | return Shr<PT_IntAPS, PT_Sint32>(S, OpPC); |
30020 | } |
30021 | bool EvalEmitter::emitShrIntAPSUint32(const SourceInfo &L) { |
30022 | if (!isActive()) return true; |
30023 | CurrentSource = L; |
30024 | return Shr<PT_IntAPS, PT_Uint32>(S, OpPC); |
30025 | } |
30026 | bool EvalEmitter::emitShrIntAPSSint64(const SourceInfo &L) { |
30027 | if (!isActive()) return true; |
30028 | CurrentSource = L; |
30029 | return Shr<PT_IntAPS, PT_Sint64>(S, OpPC); |
30030 | } |
30031 | bool EvalEmitter::emitShrIntAPSUint64(const SourceInfo &L) { |
30032 | if (!isActive()) return true; |
30033 | CurrentSource = L; |
30034 | return Shr<PT_IntAPS, PT_Uint64>(S, OpPC); |
30035 | } |
30036 | bool EvalEmitter::emitShrIntAPSIntAP(const SourceInfo &L) { |
30037 | if (!isActive()) return true; |
30038 | CurrentSource = L; |
30039 | return Shr<PT_IntAPS, PT_IntAP>(S, OpPC); |
30040 | } |
30041 | bool EvalEmitter::emitShrIntAPSIntAPS(const SourceInfo &L) { |
30042 | if (!isActive()) return true; |
30043 | CurrentSource = L; |
30044 | return Shr<PT_IntAPS, PT_IntAPS>(S, OpPC); |
30045 | } |
30046 | #endif |
30047 | #ifdef GET_OPCODE_NAMES |
30048 | OP_SizelessVectorElementSize, |
30049 | #endif |
30050 | #ifdef GET_INTERP |
30051 | case OP_SizelessVectorElementSize: { |
30052 | if (!SizelessVectorElementSize(S, OpPC)) |
30053 | return false; |
30054 | continue; |
30055 | } |
30056 | #endif |
30057 | #ifdef GET_DISASM |
30058 | case OP_SizelessVectorElementSize: |
30059 | PrintName("SizelessVectorElementSize" ); |
30060 | OS << "\t" << "\n" ; |
30061 | continue; |
30062 | #endif |
30063 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30064 | bool emitSizelessVectorElementSize(const SourceInfo &); |
30065 | #endif |
30066 | #ifdef GET_LINK_IMPL |
30067 | bool ByteCodeEmitter::emitSizelessVectorElementSize(const SourceInfo &L) { |
30068 | return emitOp<>(OP_SizelessVectorElementSize, L); |
30069 | } |
30070 | #endif |
30071 | #ifdef GET_EVAL_IMPL |
30072 | bool EvalEmitter::emitSizelessVectorElementSize(const SourceInfo &L) { |
30073 | if (!isActive()) return true; |
30074 | CurrentSource = L; |
30075 | return SizelessVectorElementSize(S, OpPC); |
30076 | } |
30077 | #endif |
30078 | #ifdef GET_OPCODE_NAMES |
30079 | OP_StoreSint8, |
30080 | OP_StoreUint8, |
30081 | OP_StoreSint16, |
30082 | OP_StoreUint16, |
30083 | OP_StoreSint32, |
30084 | OP_StoreUint32, |
30085 | OP_StoreSint64, |
30086 | OP_StoreUint64, |
30087 | OP_StoreIntAP, |
30088 | OP_StoreIntAPS, |
30089 | OP_StoreBool, |
30090 | OP_StorePtr, |
30091 | OP_StoreFnPtr, |
30092 | OP_StoreMemberPtr, |
30093 | OP_StoreFloat, |
30094 | #endif |
30095 | #ifdef GET_INTERP |
30096 | case OP_StoreSint8: { |
30097 | if (!Store<PT_Sint8>(S, OpPC)) |
30098 | return false; |
30099 | continue; |
30100 | } |
30101 | case OP_StoreUint8: { |
30102 | if (!Store<PT_Uint8>(S, OpPC)) |
30103 | return false; |
30104 | continue; |
30105 | } |
30106 | case OP_StoreSint16: { |
30107 | if (!Store<PT_Sint16>(S, OpPC)) |
30108 | return false; |
30109 | continue; |
30110 | } |
30111 | case OP_StoreUint16: { |
30112 | if (!Store<PT_Uint16>(S, OpPC)) |
30113 | return false; |
30114 | continue; |
30115 | } |
30116 | case OP_StoreSint32: { |
30117 | if (!Store<PT_Sint32>(S, OpPC)) |
30118 | return false; |
30119 | continue; |
30120 | } |
30121 | case OP_StoreUint32: { |
30122 | if (!Store<PT_Uint32>(S, OpPC)) |
30123 | return false; |
30124 | continue; |
30125 | } |
30126 | case OP_StoreSint64: { |
30127 | if (!Store<PT_Sint64>(S, OpPC)) |
30128 | return false; |
30129 | continue; |
30130 | } |
30131 | case OP_StoreUint64: { |
30132 | if (!Store<PT_Uint64>(S, OpPC)) |
30133 | return false; |
30134 | continue; |
30135 | } |
30136 | case OP_StoreIntAP: { |
30137 | if (!Store<PT_IntAP>(S, OpPC)) |
30138 | return false; |
30139 | continue; |
30140 | } |
30141 | case OP_StoreIntAPS: { |
30142 | if (!Store<PT_IntAPS>(S, OpPC)) |
30143 | return false; |
30144 | continue; |
30145 | } |
30146 | case OP_StoreBool: { |
30147 | if (!Store<PT_Bool>(S, OpPC)) |
30148 | return false; |
30149 | continue; |
30150 | } |
30151 | case OP_StorePtr: { |
30152 | if (!Store<PT_Ptr>(S, OpPC)) |
30153 | return false; |
30154 | continue; |
30155 | } |
30156 | case OP_StoreFnPtr: { |
30157 | if (!Store<PT_FnPtr>(S, OpPC)) |
30158 | return false; |
30159 | continue; |
30160 | } |
30161 | case OP_StoreMemberPtr: { |
30162 | if (!Store<PT_MemberPtr>(S, OpPC)) |
30163 | return false; |
30164 | continue; |
30165 | } |
30166 | case OP_StoreFloat: { |
30167 | if (!Store<PT_Float>(S, OpPC)) |
30168 | return false; |
30169 | continue; |
30170 | } |
30171 | #endif |
30172 | #ifdef GET_DISASM |
30173 | case OP_StoreSint8: |
30174 | PrintName("StoreSint8" ); |
30175 | OS << "\t" << "\n" ; |
30176 | continue; |
30177 | case OP_StoreUint8: |
30178 | PrintName("StoreUint8" ); |
30179 | OS << "\t" << "\n" ; |
30180 | continue; |
30181 | case OP_StoreSint16: |
30182 | PrintName("StoreSint16" ); |
30183 | OS << "\t" << "\n" ; |
30184 | continue; |
30185 | case OP_StoreUint16: |
30186 | PrintName("StoreUint16" ); |
30187 | OS << "\t" << "\n" ; |
30188 | continue; |
30189 | case OP_StoreSint32: |
30190 | PrintName("StoreSint32" ); |
30191 | OS << "\t" << "\n" ; |
30192 | continue; |
30193 | case OP_StoreUint32: |
30194 | PrintName("StoreUint32" ); |
30195 | OS << "\t" << "\n" ; |
30196 | continue; |
30197 | case OP_StoreSint64: |
30198 | PrintName("StoreSint64" ); |
30199 | OS << "\t" << "\n" ; |
30200 | continue; |
30201 | case OP_StoreUint64: |
30202 | PrintName("StoreUint64" ); |
30203 | OS << "\t" << "\n" ; |
30204 | continue; |
30205 | case OP_StoreIntAP: |
30206 | PrintName("StoreIntAP" ); |
30207 | OS << "\t" << "\n" ; |
30208 | continue; |
30209 | case OP_StoreIntAPS: |
30210 | PrintName("StoreIntAPS" ); |
30211 | OS << "\t" << "\n" ; |
30212 | continue; |
30213 | case OP_StoreBool: |
30214 | PrintName("StoreBool" ); |
30215 | OS << "\t" << "\n" ; |
30216 | continue; |
30217 | case OP_StorePtr: |
30218 | PrintName("StorePtr" ); |
30219 | OS << "\t" << "\n" ; |
30220 | continue; |
30221 | case OP_StoreFnPtr: |
30222 | PrintName("StoreFnPtr" ); |
30223 | OS << "\t" << "\n" ; |
30224 | continue; |
30225 | case OP_StoreMemberPtr: |
30226 | PrintName("StoreMemberPtr" ); |
30227 | OS << "\t" << "\n" ; |
30228 | continue; |
30229 | case OP_StoreFloat: |
30230 | PrintName("StoreFloat" ); |
30231 | OS << "\t" << "\n" ; |
30232 | continue; |
30233 | #endif |
30234 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30235 | bool emitStoreSint8(const SourceInfo &); |
30236 | bool emitStoreUint8(const SourceInfo &); |
30237 | bool emitStoreSint16(const SourceInfo &); |
30238 | bool emitStoreUint16(const SourceInfo &); |
30239 | bool emitStoreSint32(const SourceInfo &); |
30240 | bool emitStoreUint32(const SourceInfo &); |
30241 | bool emitStoreSint64(const SourceInfo &); |
30242 | bool emitStoreUint64(const SourceInfo &); |
30243 | bool emitStoreIntAP(const SourceInfo &); |
30244 | bool emitStoreIntAPS(const SourceInfo &); |
30245 | bool emitStoreBool(const SourceInfo &); |
30246 | bool emitStorePtr(const SourceInfo &); |
30247 | bool emitStoreFnPtr(const SourceInfo &); |
30248 | bool emitStoreMemberPtr(const SourceInfo &); |
30249 | bool emitStoreFloat(const SourceInfo &); |
30250 | #endif |
30251 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30252 | [[nodiscard]] bool emitStore(PrimType, const SourceInfo &I); |
30253 | #endif |
30254 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
30255 | bool |
30256 | #if defined(GET_EVAL_IMPL) |
30257 | EvalEmitter |
30258 | #else |
30259 | ByteCodeEmitter |
30260 | #endif |
30261 | ::emitStore(PrimType T0, const SourceInfo &I) { |
30262 | switch (T0) { |
30263 | case PT_Sint8: |
30264 | return emitStoreSint8(I); |
30265 | case PT_Uint8: |
30266 | return emitStoreUint8(I); |
30267 | case PT_Sint16: |
30268 | return emitStoreSint16(I); |
30269 | case PT_Uint16: |
30270 | return emitStoreUint16(I); |
30271 | case PT_Sint32: |
30272 | return emitStoreSint32(I); |
30273 | case PT_Uint32: |
30274 | return emitStoreUint32(I); |
30275 | case PT_Sint64: |
30276 | return emitStoreSint64(I); |
30277 | case PT_Uint64: |
30278 | return emitStoreUint64(I); |
30279 | case PT_IntAP: |
30280 | return emitStoreIntAP(I); |
30281 | case PT_IntAPS: |
30282 | return emitStoreIntAPS(I); |
30283 | case PT_Bool: |
30284 | return emitStoreBool(I); |
30285 | case PT_Ptr: |
30286 | return emitStorePtr(I); |
30287 | case PT_FnPtr: |
30288 | return emitStoreFnPtr(I); |
30289 | case PT_MemberPtr: |
30290 | return emitStoreMemberPtr(I); |
30291 | case PT_Float: |
30292 | return emitStoreFloat(I); |
30293 | } |
30294 | llvm_unreachable("invalid enum value" ); |
30295 | } |
30296 | #endif |
30297 | #ifdef GET_LINK_IMPL |
30298 | bool ByteCodeEmitter::emitStoreSint8(const SourceInfo &L) { |
30299 | return emitOp<>(OP_StoreSint8, L); |
30300 | } |
30301 | bool ByteCodeEmitter::emitStoreUint8(const SourceInfo &L) { |
30302 | return emitOp<>(OP_StoreUint8, L); |
30303 | } |
30304 | bool ByteCodeEmitter::emitStoreSint16(const SourceInfo &L) { |
30305 | return emitOp<>(OP_StoreSint16, L); |
30306 | } |
30307 | bool ByteCodeEmitter::emitStoreUint16(const SourceInfo &L) { |
30308 | return emitOp<>(OP_StoreUint16, L); |
30309 | } |
30310 | bool ByteCodeEmitter::emitStoreSint32(const SourceInfo &L) { |
30311 | return emitOp<>(OP_StoreSint32, L); |
30312 | } |
30313 | bool ByteCodeEmitter::emitStoreUint32(const SourceInfo &L) { |
30314 | return emitOp<>(OP_StoreUint32, L); |
30315 | } |
30316 | bool ByteCodeEmitter::emitStoreSint64(const SourceInfo &L) { |
30317 | return emitOp<>(OP_StoreSint64, L); |
30318 | } |
30319 | bool ByteCodeEmitter::emitStoreUint64(const SourceInfo &L) { |
30320 | return emitOp<>(OP_StoreUint64, L); |
30321 | } |
30322 | bool ByteCodeEmitter::emitStoreIntAP(const SourceInfo &L) { |
30323 | return emitOp<>(OP_StoreIntAP, L); |
30324 | } |
30325 | bool ByteCodeEmitter::emitStoreIntAPS(const SourceInfo &L) { |
30326 | return emitOp<>(OP_StoreIntAPS, L); |
30327 | } |
30328 | bool ByteCodeEmitter::emitStoreBool(const SourceInfo &L) { |
30329 | return emitOp<>(OP_StoreBool, L); |
30330 | } |
30331 | bool ByteCodeEmitter::emitStorePtr(const SourceInfo &L) { |
30332 | return emitOp<>(OP_StorePtr, L); |
30333 | } |
30334 | bool ByteCodeEmitter::emitStoreFnPtr(const SourceInfo &L) { |
30335 | return emitOp<>(OP_StoreFnPtr, L); |
30336 | } |
30337 | bool ByteCodeEmitter::emitStoreMemberPtr(const SourceInfo &L) { |
30338 | return emitOp<>(OP_StoreMemberPtr, L); |
30339 | } |
30340 | bool ByteCodeEmitter::emitStoreFloat(const SourceInfo &L) { |
30341 | return emitOp<>(OP_StoreFloat, L); |
30342 | } |
30343 | #endif |
30344 | #ifdef GET_EVAL_IMPL |
30345 | bool EvalEmitter::emitStoreSint8(const SourceInfo &L) { |
30346 | if (!isActive()) return true; |
30347 | CurrentSource = L; |
30348 | return Store<PT_Sint8>(S, OpPC); |
30349 | } |
30350 | bool EvalEmitter::emitStoreUint8(const SourceInfo &L) { |
30351 | if (!isActive()) return true; |
30352 | CurrentSource = L; |
30353 | return Store<PT_Uint8>(S, OpPC); |
30354 | } |
30355 | bool EvalEmitter::emitStoreSint16(const SourceInfo &L) { |
30356 | if (!isActive()) return true; |
30357 | CurrentSource = L; |
30358 | return Store<PT_Sint16>(S, OpPC); |
30359 | } |
30360 | bool EvalEmitter::emitStoreUint16(const SourceInfo &L) { |
30361 | if (!isActive()) return true; |
30362 | CurrentSource = L; |
30363 | return Store<PT_Uint16>(S, OpPC); |
30364 | } |
30365 | bool EvalEmitter::emitStoreSint32(const SourceInfo &L) { |
30366 | if (!isActive()) return true; |
30367 | CurrentSource = L; |
30368 | return Store<PT_Sint32>(S, OpPC); |
30369 | } |
30370 | bool EvalEmitter::emitStoreUint32(const SourceInfo &L) { |
30371 | if (!isActive()) return true; |
30372 | CurrentSource = L; |
30373 | return Store<PT_Uint32>(S, OpPC); |
30374 | } |
30375 | bool EvalEmitter::emitStoreSint64(const SourceInfo &L) { |
30376 | if (!isActive()) return true; |
30377 | CurrentSource = L; |
30378 | return Store<PT_Sint64>(S, OpPC); |
30379 | } |
30380 | bool EvalEmitter::emitStoreUint64(const SourceInfo &L) { |
30381 | if (!isActive()) return true; |
30382 | CurrentSource = L; |
30383 | return Store<PT_Uint64>(S, OpPC); |
30384 | } |
30385 | bool EvalEmitter::emitStoreIntAP(const SourceInfo &L) { |
30386 | if (!isActive()) return true; |
30387 | CurrentSource = L; |
30388 | return Store<PT_IntAP>(S, OpPC); |
30389 | } |
30390 | bool EvalEmitter::emitStoreIntAPS(const SourceInfo &L) { |
30391 | if (!isActive()) return true; |
30392 | CurrentSource = L; |
30393 | return Store<PT_IntAPS>(S, OpPC); |
30394 | } |
30395 | bool EvalEmitter::emitStoreBool(const SourceInfo &L) { |
30396 | if (!isActive()) return true; |
30397 | CurrentSource = L; |
30398 | return Store<PT_Bool>(S, OpPC); |
30399 | } |
30400 | bool EvalEmitter::emitStorePtr(const SourceInfo &L) { |
30401 | if (!isActive()) return true; |
30402 | CurrentSource = L; |
30403 | return Store<PT_Ptr>(S, OpPC); |
30404 | } |
30405 | bool EvalEmitter::emitStoreFnPtr(const SourceInfo &L) { |
30406 | if (!isActive()) return true; |
30407 | CurrentSource = L; |
30408 | return Store<PT_FnPtr>(S, OpPC); |
30409 | } |
30410 | bool EvalEmitter::emitStoreMemberPtr(const SourceInfo &L) { |
30411 | if (!isActive()) return true; |
30412 | CurrentSource = L; |
30413 | return Store<PT_MemberPtr>(S, OpPC); |
30414 | } |
30415 | bool EvalEmitter::emitStoreFloat(const SourceInfo &L) { |
30416 | if (!isActive()) return true; |
30417 | CurrentSource = L; |
30418 | return Store<PT_Float>(S, OpPC); |
30419 | } |
30420 | #endif |
30421 | #ifdef GET_OPCODE_NAMES |
30422 | OP_StoreBitFieldSint8, |
30423 | OP_StoreBitFieldUint8, |
30424 | OP_StoreBitFieldSint16, |
30425 | OP_StoreBitFieldUint16, |
30426 | OP_StoreBitFieldSint32, |
30427 | OP_StoreBitFieldUint32, |
30428 | OP_StoreBitFieldSint64, |
30429 | OP_StoreBitFieldUint64, |
30430 | OP_StoreBitFieldIntAP, |
30431 | OP_StoreBitFieldIntAPS, |
30432 | OP_StoreBitFieldBool, |
30433 | #endif |
30434 | #ifdef GET_INTERP |
30435 | case OP_StoreBitFieldSint8: { |
30436 | if (!StoreBitField<PT_Sint8>(S, OpPC)) |
30437 | return false; |
30438 | continue; |
30439 | } |
30440 | case OP_StoreBitFieldUint8: { |
30441 | if (!StoreBitField<PT_Uint8>(S, OpPC)) |
30442 | return false; |
30443 | continue; |
30444 | } |
30445 | case OP_StoreBitFieldSint16: { |
30446 | if (!StoreBitField<PT_Sint16>(S, OpPC)) |
30447 | return false; |
30448 | continue; |
30449 | } |
30450 | case OP_StoreBitFieldUint16: { |
30451 | if (!StoreBitField<PT_Uint16>(S, OpPC)) |
30452 | return false; |
30453 | continue; |
30454 | } |
30455 | case OP_StoreBitFieldSint32: { |
30456 | if (!StoreBitField<PT_Sint32>(S, OpPC)) |
30457 | return false; |
30458 | continue; |
30459 | } |
30460 | case OP_StoreBitFieldUint32: { |
30461 | if (!StoreBitField<PT_Uint32>(S, OpPC)) |
30462 | return false; |
30463 | continue; |
30464 | } |
30465 | case OP_StoreBitFieldSint64: { |
30466 | if (!StoreBitField<PT_Sint64>(S, OpPC)) |
30467 | return false; |
30468 | continue; |
30469 | } |
30470 | case OP_StoreBitFieldUint64: { |
30471 | if (!StoreBitField<PT_Uint64>(S, OpPC)) |
30472 | return false; |
30473 | continue; |
30474 | } |
30475 | case OP_StoreBitFieldIntAP: { |
30476 | if (!StoreBitField<PT_IntAP>(S, OpPC)) |
30477 | return false; |
30478 | continue; |
30479 | } |
30480 | case OP_StoreBitFieldIntAPS: { |
30481 | if (!StoreBitField<PT_IntAPS>(S, OpPC)) |
30482 | return false; |
30483 | continue; |
30484 | } |
30485 | case OP_StoreBitFieldBool: { |
30486 | if (!StoreBitField<PT_Bool>(S, OpPC)) |
30487 | return false; |
30488 | continue; |
30489 | } |
30490 | #endif |
30491 | #ifdef GET_DISASM |
30492 | case OP_StoreBitFieldSint8: |
30493 | PrintName("StoreBitFieldSint8" ); |
30494 | OS << "\t" << "\n" ; |
30495 | continue; |
30496 | case OP_StoreBitFieldUint8: |
30497 | PrintName("StoreBitFieldUint8" ); |
30498 | OS << "\t" << "\n" ; |
30499 | continue; |
30500 | case OP_StoreBitFieldSint16: |
30501 | PrintName("StoreBitFieldSint16" ); |
30502 | OS << "\t" << "\n" ; |
30503 | continue; |
30504 | case OP_StoreBitFieldUint16: |
30505 | PrintName("StoreBitFieldUint16" ); |
30506 | OS << "\t" << "\n" ; |
30507 | continue; |
30508 | case OP_StoreBitFieldSint32: |
30509 | PrintName("StoreBitFieldSint32" ); |
30510 | OS << "\t" << "\n" ; |
30511 | continue; |
30512 | case OP_StoreBitFieldUint32: |
30513 | PrintName("StoreBitFieldUint32" ); |
30514 | OS << "\t" << "\n" ; |
30515 | continue; |
30516 | case OP_StoreBitFieldSint64: |
30517 | PrintName("StoreBitFieldSint64" ); |
30518 | OS << "\t" << "\n" ; |
30519 | continue; |
30520 | case OP_StoreBitFieldUint64: |
30521 | PrintName("StoreBitFieldUint64" ); |
30522 | OS << "\t" << "\n" ; |
30523 | continue; |
30524 | case OP_StoreBitFieldIntAP: |
30525 | PrintName("StoreBitFieldIntAP" ); |
30526 | OS << "\t" << "\n" ; |
30527 | continue; |
30528 | case OP_StoreBitFieldIntAPS: |
30529 | PrintName("StoreBitFieldIntAPS" ); |
30530 | OS << "\t" << "\n" ; |
30531 | continue; |
30532 | case OP_StoreBitFieldBool: |
30533 | PrintName("StoreBitFieldBool" ); |
30534 | OS << "\t" << "\n" ; |
30535 | continue; |
30536 | #endif |
30537 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30538 | bool emitStoreBitFieldSint8(const SourceInfo &); |
30539 | bool emitStoreBitFieldUint8(const SourceInfo &); |
30540 | bool emitStoreBitFieldSint16(const SourceInfo &); |
30541 | bool emitStoreBitFieldUint16(const SourceInfo &); |
30542 | bool emitStoreBitFieldSint32(const SourceInfo &); |
30543 | bool emitStoreBitFieldUint32(const SourceInfo &); |
30544 | bool emitStoreBitFieldSint64(const SourceInfo &); |
30545 | bool emitStoreBitFieldUint64(const SourceInfo &); |
30546 | bool emitStoreBitFieldIntAP(const SourceInfo &); |
30547 | bool emitStoreBitFieldIntAPS(const SourceInfo &); |
30548 | bool emitStoreBitFieldBool(const SourceInfo &); |
30549 | #endif |
30550 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30551 | [[nodiscard]] bool emitStoreBitField(PrimType, const SourceInfo &I); |
30552 | #endif |
30553 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
30554 | bool |
30555 | #if defined(GET_EVAL_IMPL) |
30556 | EvalEmitter |
30557 | #else |
30558 | ByteCodeEmitter |
30559 | #endif |
30560 | ::emitStoreBitField(PrimType T0, const SourceInfo &I) { |
30561 | switch (T0) { |
30562 | case PT_Sint8: |
30563 | return emitStoreBitFieldSint8(I); |
30564 | case PT_Uint8: |
30565 | return emitStoreBitFieldUint8(I); |
30566 | case PT_Sint16: |
30567 | return emitStoreBitFieldSint16(I); |
30568 | case PT_Uint16: |
30569 | return emitStoreBitFieldUint16(I); |
30570 | case PT_Sint32: |
30571 | return emitStoreBitFieldSint32(I); |
30572 | case PT_Uint32: |
30573 | return emitStoreBitFieldUint32(I); |
30574 | case PT_Sint64: |
30575 | return emitStoreBitFieldSint64(I); |
30576 | case PT_Uint64: |
30577 | return emitStoreBitFieldUint64(I); |
30578 | case PT_IntAP: |
30579 | return emitStoreBitFieldIntAP(I); |
30580 | case PT_IntAPS: |
30581 | return emitStoreBitFieldIntAPS(I); |
30582 | case PT_Bool: |
30583 | return emitStoreBitFieldBool(I); |
30584 | default: llvm_unreachable("invalid type: emitStoreBitField" ); |
30585 | } |
30586 | llvm_unreachable("invalid enum value" ); |
30587 | } |
30588 | #endif |
30589 | #ifdef GET_LINK_IMPL |
30590 | bool ByteCodeEmitter::emitStoreBitFieldSint8(const SourceInfo &L) { |
30591 | return emitOp<>(OP_StoreBitFieldSint8, L); |
30592 | } |
30593 | bool ByteCodeEmitter::emitStoreBitFieldUint8(const SourceInfo &L) { |
30594 | return emitOp<>(OP_StoreBitFieldUint8, L); |
30595 | } |
30596 | bool ByteCodeEmitter::emitStoreBitFieldSint16(const SourceInfo &L) { |
30597 | return emitOp<>(OP_StoreBitFieldSint16, L); |
30598 | } |
30599 | bool ByteCodeEmitter::emitStoreBitFieldUint16(const SourceInfo &L) { |
30600 | return emitOp<>(OP_StoreBitFieldUint16, L); |
30601 | } |
30602 | bool ByteCodeEmitter::emitStoreBitFieldSint32(const SourceInfo &L) { |
30603 | return emitOp<>(OP_StoreBitFieldSint32, L); |
30604 | } |
30605 | bool ByteCodeEmitter::emitStoreBitFieldUint32(const SourceInfo &L) { |
30606 | return emitOp<>(OP_StoreBitFieldUint32, L); |
30607 | } |
30608 | bool ByteCodeEmitter::emitStoreBitFieldSint64(const SourceInfo &L) { |
30609 | return emitOp<>(OP_StoreBitFieldSint64, L); |
30610 | } |
30611 | bool ByteCodeEmitter::emitStoreBitFieldUint64(const SourceInfo &L) { |
30612 | return emitOp<>(OP_StoreBitFieldUint64, L); |
30613 | } |
30614 | bool ByteCodeEmitter::emitStoreBitFieldIntAP(const SourceInfo &L) { |
30615 | return emitOp<>(OP_StoreBitFieldIntAP, L); |
30616 | } |
30617 | bool ByteCodeEmitter::emitStoreBitFieldIntAPS(const SourceInfo &L) { |
30618 | return emitOp<>(OP_StoreBitFieldIntAPS, L); |
30619 | } |
30620 | bool ByteCodeEmitter::emitStoreBitFieldBool(const SourceInfo &L) { |
30621 | return emitOp<>(OP_StoreBitFieldBool, L); |
30622 | } |
30623 | #endif |
30624 | #ifdef GET_EVAL_IMPL |
30625 | bool EvalEmitter::emitStoreBitFieldSint8(const SourceInfo &L) { |
30626 | if (!isActive()) return true; |
30627 | CurrentSource = L; |
30628 | return StoreBitField<PT_Sint8>(S, OpPC); |
30629 | } |
30630 | bool EvalEmitter::emitStoreBitFieldUint8(const SourceInfo &L) { |
30631 | if (!isActive()) return true; |
30632 | CurrentSource = L; |
30633 | return StoreBitField<PT_Uint8>(S, OpPC); |
30634 | } |
30635 | bool EvalEmitter::emitStoreBitFieldSint16(const SourceInfo &L) { |
30636 | if (!isActive()) return true; |
30637 | CurrentSource = L; |
30638 | return StoreBitField<PT_Sint16>(S, OpPC); |
30639 | } |
30640 | bool EvalEmitter::emitStoreBitFieldUint16(const SourceInfo &L) { |
30641 | if (!isActive()) return true; |
30642 | CurrentSource = L; |
30643 | return StoreBitField<PT_Uint16>(S, OpPC); |
30644 | } |
30645 | bool EvalEmitter::emitStoreBitFieldSint32(const SourceInfo &L) { |
30646 | if (!isActive()) return true; |
30647 | CurrentSource = L; |
30648 | return StoreBitField<PT_Sint32>(S, OpPC); |
30649 | } |
30650 | bool EvalEmitter::emitStoreBitFieldUint32(const SourceInfo &L) { |
30651 | if (!isActive()) return true; |
30652 | CurrentSource = L; |
30653 | return StoreBitField<PT_Uint32>(S, OpPC); |
30654 | } |
30655 | bool EvalEmitter::emitStoreBitFieldSint64(const SourceInfo &L) { |
30656 | if (!isActive()) return true; |
30657 | CurrentSource = L; |
30658 | return StoreBitField<PT_Sint64>(S, OpPC); |
30659 | } |
30660 | bool EvalEmitter::emitStoreBitFieldUint64(const SourceInfo &L) { |
30661 | if (!isActive()) return true; |
30662 | CurrentSource = L; |
30663 | return StoreBitField<PT_Uint64>(S, OpPC); |
30664 | } |
30665 | bool EvalEmitter::emitStoreBitFieldIntAP(const SourceInfo &L) { |
30666 | if (!isActive()) return true; |
30667 | CurrentSource = L; |
30668 | return StoreBitField<PT_IntAP>(S, OpPC); |
30669 | } |
30670 | bool EvalEmitter::emitStoreBitFieldIntAPS(const SourceInfo &L) { |
30671 | if (!isActive()) return true; |
30672 | CurrentSource = L; |
30673 | return StoreBitField<PT_IntAPS>(S, OpPC); |
30674 | } |
30675 | bool EvalEmitter::emitStoreBitFieldBool(const SourceInfo &L) { |
30676 | if (!isActive()) return true; |
30677 | CurrentSource = L; |
30678 | return StoreBitField<PT_Bool>(S, OpPC); |
30679 | } |
30680 | #endif |
30681 | #ifdef GET_OPCODE_NAMES |
30682 | OP_StoreBitFieldPopSint8, |
30683 | OP_StoreBitFieldPopUint8, |
30684 | OP_StoreBitFieldPopSint16, |
30685 | OP_StoreBitFieldPopUint16, |
30686 | OP_StoreBitFieldPopSint32, |
30687 | OP_StoreBitFieldPopUint32, |
30688 | OP_StoreBitFieldPopSint64, |
30689 | OP_StoreBitFieldPopUint64, |
30690 | OP_StoreBitFieldPopIntAP, |
30691 | OP_StoreBitFieldPopIntAPS, |
30692 | OP_StoreBitFieldPopBool, |
30693 | #endif |
30694 | #ifdef GET_INTERP |
30695 | case OP_StoreBitFieldPopSint8: { |
30696 | if (!StoreBitFieldPop<PT_Sint8>(S, OpPC)) |
30697 | return false; |
30698 | continue; |
30699 | } |
30700 | case OP_StoreBitFieldPopUint8: { |
30701 | if (!StoreBitFieldPop<PT_Uint8>(S, OpPC)) |
30702 | return false; |
30703 | continue; |
30704 | } |
30705 | case OP_StoreBitFieldPopSint16: { |
30706 | if (!StoreBitFieldPop<PT_Sint16>(S, OpPC)) |
30707 | return false; |
30708 | continue; |
30709 | } |
30710 | case OP_StoreBitFieldPopUint16: { |
30711 | if (!StoreBitFieldPop<PT_Uint16>(S, OpPC)) |
30712 | return false; |
30713 | continue; |
30714 | } |
30715 | case OP_StoreBitFieldPopSint32: { |
30716 | if (!StoreBitFieldPop<PT_Sint32>(S, OpPC)) |
30717 | return false; |
30718 | continue; |
30719 | } |
30720 | case OP_StoreBitFieldPopUint32: { |
30721 | if (!StoreBitFieldPop<PT_Uint32>(S, OpPC)) |
30722 | return false; |
30723 | continue; |
30724 | } |
30725 | case OP_StoreBitFieldPopSint64: { |
30726 | if (!StoreBitFieldPop<PT_Sint64>(S, OpPC)) |
30727 | return false; |
30728 | continue; |
30729 | } |
30730 | case OP_StoreBitFieldPopUint64: { |
30731 | if (!StoreBitFieldPop<PT_Uint64>(S, OpPC)) |
30732 | return false; |
30733 | continue; |
30734 | } |
30735 | case OP_StoreBitFieldPopIntAP: { |
30736 | if (!StoreBitFieldPop<PT_IntAP>(S, OpPC)) |
30737 | return false; |
30738 | continue; |
30739 | } |
30740 | case OP_StoreBitFieldPopIntAPS: { |
30741 | if (!StoreBitFieldPop<PT_IntAPS>(S, OpPC)) |
30742 | return false; |
30743 | continue; |
30744 | } |
30745 | case OP_StoreBitFieldPopBool: { |
30746 | if (!StoreBitFieldPop<PT_Bool>(S, OpPC)) |
30747 | return false; |
30748 | continue; |
30749 | } |
30750 | #endif |
30751 | #ifdef GET_DISASM |
30752 | case OP_StoreBitFieldPopSint8: |
30753 | PrintName("StoreBitFieldPopSint8" ); |
30754 | OS << "\t" << "\n" ; |
30755 | continue; |
30756 | case OP_StoreBitFieldPopUint8: |
30757 | PrintName("StoreBitFieldPopUint8" ); |
30758 | OS << "\t" << "\n" ; |
30759 | continue; |
30760 | case OP_StoreBitFieldPopSint16: |
30761 | PrintName("StoreBitFieldPopSint16" ); |
30762 | OS << "\t" << "\n" ; |
30763 | continue; |
30764 | case OP_StoreBitFieldPopUint16: |
30765 | PrintName("StoreBitFieldPopUint16" ); |
30766 | OS << "\t" << "\n" ; |
30767 | continue; |
30768 | case OP_StoreBitFieldPopSint32: |
30769 | PrintName("StoreBitFieldPopSint32" ); |
30770 | OS << "\t" << "\n" ; |
30771 | continue; |
30772 | case OP_StoreBitFieldPopUint32: |
30773 | PrintName("StoreBitFieldPopUint32" ); |
30774 | OS << "\t" << "\n" ; |
30775 | continue; |
30776 | case OP_StoreBitFieldPopSint64: |
30777 | PrintName("StoreBitFieldPopSint64" ); |
30778 | OS << "\t" << "\n" ; |
30779 | continue; |
30780 | case OP_StoreBitFieldPopUint64: |
30781 | PrintName("StoreBitFieldPopUint64" ); |
30782 | OS << "\t" << "\n" ; |
30783 | continue; |
30784 | case OP_StoreBitFieldPopIntAP: |
30785 | PrintName("StoreBitFieldPopIntAP" ); |
30786 | OS << "\t" << "\n" ; |
30787 | continue; |
30788 | case OP_StoreBitFieldPopIntAPS: |
30789 | PrintName("StoreBitFieldPopIntAPS" ); |
30790 | OS << "\t" << "\n" ; |
30791 | continue; |
30792 | case OP_StoreBitFieldPopBool: |
30793 | PrintName("StoreBitFieldPopBool" ); |
30794 | OS << "\t" << "\n" ; |
30795 | continue; |
30796 | #endif |
30797 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30798 | bool emitStoreBitFieldPopSint8(const SourceInfo &); |
30799 | bool emitStoreBitFieldPopUint8(const SourceInfo &); |
30800 | bool emitStoreBitFieldPopSint16(const SourceInfo &); |
30801 | bool emitStoreBitFieldPopUint16(const SourceInfo &); |
30802 | bool emitStoreBitFieldPopSint32(const SourceInfo &); |
30803 | bool emitStoreBitFieldPopUint32(const SourceInfo &); |
30804 | bool emitStoreBitFieldPopSint64(const SourceInfo &); |
30805 | bool emitStoreBitFieldPopUint64(const SourceInfo &); |
30806 | bool emitStoreBitFieldPopIntAP(const SourceInfo &); |
30807 | bool emitStoreBitFieldPopIntAPS(const SourceInfo &); |
30808 | bool emitStoreBitFieldPopBool(const SourceInfo &); |
30809 | #endif |
30810 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
30811 | [[nodiscard]] bool emitStoreBitFieldPop(PrimType, const SourceInfo &I); |
30812 | #endif |
30813 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
30814 | bool |
30815 | #if defined(GET_EVAL_IMPL) |
30816 | EvalEmitter |
30817 | #else |
30818 | ByteCodeEmitter |
30819 | #endif |
30820 | ::emitStoreBitFieldPop(PrimType T0, const SourceInfo &I) { |
30821 | switch (T0) { |
30822 | case PT_Sint8: |
30823 | return emitStoreBitFieldPopSint8(I); |
30824 | case PT_Uint8: |
30825 | return emitStoreBitFieldPopUint8(I); |
30826 | case PT_Sint16: |
30827 | return emitStoreBitFieldPopSint16(I); |
30828 | case PT_Uint16: |
30829 | return emitStoreBitFieldPopUint16(I); |
30830 | case PT_Sint32: |
30831 | return emitStoreBitFieldPopSint32(I); |
30832 | case PT_Uint32: |
30833 | return emitStoreBitFieldPopUint32(I); |
30834 | case PT_Sint64: |
30835 | return emitStoreBitFieldPopSint64(I); |
30836 | case PT_Uint64: |
30837 | return emitStoreBitFieldPopUint64(I); |
30838 | case PT_IntAP: |
30839 | return emitStoreBitFieldPopIntAP(I); |
30840 | case PT_IntAPS: |
30841 | return emitStoreBitFieldPopIntAPS(I); |
30842 | case PT_Bool: |
30843 | return emitStoreBitFieldPopBool(I); |
30844 | default: llvm_unreachable("invalid type: emitStoreBitFieldPop" ); |
30845 | } |
30846 | llvm_unreachable("invalid enum value" ); |
30847 | } |
30848 | #endif |
30849 | #ifdef GET_LINK_IMPL |
30850 | bool ByteCodeEmitter::emitStoreBitFieldPopSint8(const SourceInfo &L) { |
30851 | return emitOp<>(OP_StoreBitFieldPopSint8, L); |
30852 | } |
30853 | bool ByteCodeEmitter::emitStoreBitFieldPopUint8(const SourceInfo &L) { |
30854 | return emitOp<>(OP_StoreBitFieldPopUint8, L); |
30855 | } |
30856 | bool ByteCodeEmitter::emitStoreBitFieldPopSint16(const SourceInfo &L) { |
30857 | return emitOp<>(OP_StoreBitFieldPopSint16, L); |
30858 | } |
30859 | bool ByteCodeEmitter::emitStoreBitFieldPopUint16(const SourceInfo &L) { |
30860 | return emitOp<>(OP_StoreBitFieldPopUint16, L); |
30861 | } |
30862 | bool ByteCodeEmitter::emitStoreBitFieldPopSint32(const SourceInfo &L) { |
30863 | return emitOp<>(OP_StoreBitFieldPopSint32, L); |
30864 | } |
30865 | bool ByteCodeEmitter::emitStoreBitFieldPopUint32(const SourceInfo &L) { |
30866 | return emitOp<>(OP_StoreBitFieldPopUint32, L); |
30867 | } |
30868 | bool ByteCodeEmitter::emitStoreBitFieldPopSint64(const SourceInfo &L) { |
30869 | return emitOp<>(OP_StoreBitFieldPopSint64, L); |
30870 | } |
30871 | bool ByteCodeEmitter::emitStoreBitFieldPopUint64(const SourceInfo &L) { |
30872 | return emitOp<>(OP_StoreBitFieldPopUint64, L); |
30873 | } |
30874 | bool ByteCodeEmitter::emitStoreBitFieldPopIntAP(const SourceInfo &L) { |
30875 | return emitOp<>(OP_StoreBitFieldPopIntAP, L); |
30876 | } |
30877 | bool ByteCodeEmitter::emitStoreBitFieldPopIntAPS(const SourceInfo &L) { |
30878 | return emitOp<>(OP_StoreBitFieldPopIntAPS, L); |
30879 | } |
30880 | bool ByteCodeEmitter::emitStoreBitFieldPopBool(const SourceInfo &L) { |
30881 | return emitOp<>(OP_StoreBitFieldPopBool, L); |
30882 | } |
30883 | #endif |
30884 | #ifdef GET_EVAL_IMPL |
30885 | bool EvalEmitter::emitStoreBitFieldPopSint8(const SourceInfo &L) { |
30886 | if (!isActive()) return true; |
30887 | CurrentSource = L; |
30888 | return StoreBitFieldPop<PT_Sint8>(S, OpPC); |
30889 | } |
30890 | bool EvalEmitter::emitStoreBitFieldPopUint8(const SourceInfo &L) { |
30891 | if (!isActive()) return true; |
30892 | CurrentSource = L; |
30893 | return StoreBitFieldPop<PT_Uint8>(S, OpPC); |
30894 | } |
30895 | bool EvalEmitter::emitStoreBitFieldPopSint16(const SourceInfo &L) { |
30896 | if (!isActive()) return true; |
30897 | CurrentSource = L; |
30898 | return StoreBitFieldPop<PT_Sint16>(S, OpPC); |
30899 | } |
30900 | bool EvalEmitter::emitStoreBitFieldPopUint16(const SourceInfo &L) { |
30901 | if (!isActive()) return true; |
30902 | CurrentSource = L; |
30903 | return StoreBitFieldPop<PT_Uint16>(S, OpPC); |
30904 | } |
30905 | bool EvalEmitter::emitStoreBitFieldPopSint32(const SourceInfo &L) { |
30906 | if (!isActive()) return true; |
30907 | CurrentSource = L; |
30908 | return StoreBitFieldPop<PT_Sint32>(S, OpPC); |
30909 | } |
30910 | bool EvalEmitter::emitStoreBitFieldPopUint32(const SourceInfo &L) { |
30911 | if (!isActive()) return true; |
30912 | CurrentSource = L; |
30913 | return StoreBitFieldPop<PT_Uint32>(S, OpPC); |
30914 | } |
30915 | bool EvalEmitter::emitStoreBitFieldPopSint64(const SourceInfo &L) { |
30916 | if (!isActive()) return true; |
30917 | CurrentSource = L; |
30918 | return StoreBitFieldPop<PT_Sint64>(S, OpPC); |
30919 | } |
30920 | bool EvalEmitter::emitStoreBitFieldPopUint64(const SourceInfo &L) { |
30921 | if (!isActive()) return true; |
30922 | CurrentSource = L; |
30923 | return StoreBitFieldPop<PT_Uint64>(S, OpPC); |
30924 | } |
30925 | bool EvalEmitter::emitStoreBitFieldPopIntAP(const SourceInfo &L) { |
30926 | if (!isActive()) return true; |
30927 | CurrentSource = L; |
30928 | return StoreBitFieldPop<PT_IntAP>(S, OpPC); |
30929 | } |
30930 | bool EvalEmitter::emitStoreBitFieldPopIntAPS(const SourceInfo &L) { |
30931 | if (!isActive()) return true; |
30932 | CurrentSource = L; |
30933 | return StoreBitFieldPop<PT_IntAPS>(S, OpPC); |
30934 | } |
30935 | bool EvalEmitter::emitStoreBitFieldPopBool(const SourceInfo &L) { |
30936 | if (!isActive()) return true; |
30937 | CurrentSource = L; |
30938 | return StoreBitFieldPop<PT_Bool>(S, OpPC); |
30939 | } |
30940 | #endif |
30941 | #ifdef GET_OPCODE_NAMES |
30942 | OP_StorePopSint8, |
30943 | OP_StorePopUint8, |
30944 | OP_StorePopSint16, |
30945 | OP_StorePopUint16, |
30946 | OP_StorePopSint32, |
30947 | OP_StorePopUint32, |
30948 | OP_StorePopSint64, |
30949 | OP_StorePopUint64, |
30950 | OP_StorePopIntAP, |
30951 | OP_StorePopIntAPS, |
30952 | OP_StorePopBool, |
30953 | OP_StorePopPtr, |
30954 | OP_StorePopFnPtr, |
30955 | OP_StorePopMemberPtr, |
30956 | OP_StorePopFloat, |
30957 | #endif |
30958 | #ifdef GET_INTERP |
30959 | case OP_StorePopSint8: { |
30960 | if (!StorePop<PT_Sint8>(S, OpPC)) |
30961 | return false; |
30962 | continue; |
30963 | } |
30964 | case OP_StorePopUint8: { |
30965 | if (!StorePop<PT_Uint8>(S, OpPC)) |
30966 | return false; |
30967 | continue; |
30968 | } |
30969 | case OP_StorePopSint16: { |
30970 | if (!StorePop<PT_Sint16>(S, OpPC)) |
30971 | return false; |
30972 | continue; |
30973 | } |
30974 | case OP_StorePopUint16: { |
30975 | if (!StorePop<PT_Uint16>(S, OpPC)) |
30976 | return false; |
30977 | continue; |
30978 | } |
30979 | case OP_StorePopSint32: { |
30980 | if (!StorePop<PT_Sint32>(S, OpPC)) |
30981 | return false; |
30982 | continue; |
30983 | } |
30984 | case OP_StorePopUint32: { |
30985 | if (!StorePop<PT_Uint32>(S, OpPC)) |
30986 | return false; |
30987 | continue; |
30988 | } |
30989 | case OP_StorePopSint64: { |
30990 | if (!StorePop<PT_Sint64>(S, OpPC)) |
30991 | return false; |
30992 | continue; |
30993 | } |
30994 | case OP_StorePopUint64: { |
30995 | if (!StorePop<PT_Uint64>(S, OpPC)) |
30996 | return false; |
30997 | continue; |
30998 | } |
30999 | case OP_StorePopIntAP: { |
31000 | if (!StorePop<PT_IntAP>(S, OpPC)) |
31001 | return false; |
31002 | continue; |
31003 | } |
31004 | case OP_StorePopIntAPS: { |
31005 | if (!StorePop<PT_IntAPS>(S, OpPC)) |
31006 | return false; |
31007 | continue; |
31008 | } |
31009 | case OP_StorePopBool: { |
31010 | if (!StorePop<PT_Bool>(S, OpPC)) |
31011 | return false; |
31012 | continue; |
31013 | } |
31014 | case OP_StorePopPtr: { |
31015 | if (!StorePop<PT_Ptr>(S, OpPC)) |
31016 | return false; |
31017 | continue; |
31018 | } |
31019 | case OP_StorePopFnPtr: { |
31020 | if (!StorePop<PT_FnPtr>(S, OpPC)) |
31021 | return false; |
31022 | continue; |
31023 | } |
31024 | case OP_StorePopMemberPtr: { |
31025 | if (!StorePop<PT_MemberPtr>(S, OpPC)) |
31026 | return false; |
31027 | continue; |
31028 | } |
31029 | case OP_StorePopFloat: { |
31030 | if (!StorePop<PT_Float>(S, OpPC)) |
31031 | return false; |
31032 | continue; |
31033 | } |
31034 | #endif |
31035 | #ifdef GET_DISASM |
31036 | case OP_StorePopSint8: |
31037 | PrintName("StorePopSint8" ); |
31038 | OS << "\t" << "\n" ; |
31039 | continue; |
31040 | case OP_StorePopUint8: |
31041 | PrintName("StorePopUint8" ); |
31042 | OS << "\t" << "\n" ; |
31043 | continue; |
31044 | case OP_StorePopSint16: |
31045 | PrintName("StorePopSint16" ); |
31046 | OS << "\t" << "\n" ; |
31047 | continue; |
31048 | case OP_StorePopUint16: |
31049 | PrintName("StorePopUint16" ); |
31050 | OS << "\t" << "\n" ; |
31051 | continue; |
31052 | case OP_StorePopSint32: |
31053 | PrintName("StorePopSint32" ); |
31054 | OS << "\t" << "\n" ; |
31055 | continue; |
31056 | case OP_StorePopUint32: |
31057 | PrintName("StorePopUint32" ); |
31058 | OS << "\t" << "\n" ; |
31059 | continue; |
31060 | case OP_StorePopSint64: |
31061 | PrintName("StorePopSint64" ); |
31062 | OS << "\t" << "\n" ; |
31063 | continue; |
31064 | case OP_StorePopUint64: |
31065 | PrintName("StorePopUint64" ); |
31066 | OS << "\t" << "\n" ; |
31067 | continue; |
31068 | case OP_StorePopIntAP: |
31069 | PrintName("StorePopIntAP" ); |
31070 | OS << "\t" << "\n" ; |
31071 | continue; |
31072 | case OP_StorePopIntAPS: |
31073 | PrintName("StorePopIntAPS" ); |
31074 | OS << "\t" << "\n" ; |
31075 | continue; |
31076 | case OP_StorePopBool: |
31077 | PrintName("StorePopBool" ); |
31078 | OS << "\t" << "\n" ; |
31079 | continue; |
31080 | case OP_StorePopPtr: |
31081 | PrintName("StorePopPtr" ); |
31082 | OS << "\t" << "\n" ; |
31083 | continue; |
31084 | case OP_StorePopFnPtr: |
31085 | PrintName("StorePopFnPtr" ); |
31086 | OS << "\t" << "\n" ; |
31087 | continue; |
31088 | case OP_StorePopMemberPtr: |
31089 | PrintName("StorePopMemberPtr" ); |
31090 | OS << "\t" << "\n" ; |
31091 | continue; |
31092 | case OP_StorePopFloat: |
31093 | PrintName("StorePopFloat" ); |
31094 | OS << "\t" << "\n" ; |
31095 | continue; |
31096 | #endif |
31097 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31098 | bool emitStorePopSint8(const SourceInfo &); |
31099 | bool emitStorePopUint8(const SourceInfo &); |
31100 | bool emitStorePopSint16(const SourceInfo &); |
31101 | bool emitStorePopUint16(const SourceInfo &); |
31102 | bool emitStorePopSint32(const SourceInfo &); |
31103 | bool emitStorePopUint32(const SourceInfo &); |
31104 | bool emitStorePopSint64(const SourceInfo &); |
31105 | bool emitStorePopUint64(const SourceInfo &); |
31106 | bool emitStorePopIntAP(const SourceInfo &); |
31107 | bool emitStorePopIntAPS(const SourceInfo &); |
31108 | bool emitStorePopBool(const SourceInfo &); |
31109 | bool emitStorePopPtr(const SourceInfo &); |
31110 | bool emitStorePopFnPtr(const SourceInfo &); |
31111 | bool emitStorePopMemberPtr(const SourceInfo &); |
31112 | bool emitStorePopFloat(const SourceInfo &); |
31113 | #endif |
31114 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31115 | [[nodiscard]] bool emitStorePop(PrimType, const SourceInfo &I); |
31116 | #endif |
31117 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
31118 | bool |
31119 | #if defined(GET_EVAL_IMPL) |
31120 | EvalEmitter |
31121 | #else |
31122 | ByteCodeEmitter |
31123 | #endif |
31124 | ::emitStorePop(PrimType T0, const SourceInfo &I) { |
31125 | switch (T0) { |
31126 | case PT_Sint8: |
31127 | return emitStorePopSint8(I); |
31128 | case PT_Uint8: |
31129 | return emitStorePopUint8(I); |
31130 | case PT_Sint16: |
31131 | return emitStorePopSint16(I); |
31132 | case PT_Uint16: |
31133 | return emitStorePopUint16(I); |
31134 | case PT_Sint32: |
31135 | return emitStorePopSint32(I); |
31136 | case PT_Uint32: |
31137 | return emitStorePopUint32(I); |
31138 | case PT_Sint64: |
31139 | return emitStorePopSint64(I); |
31140 | case PT_Uint64: |
31141 | return emitStorePopUint64(I); |
31142 | case PT_IntAP: |
31143 | return emitStorePopIntAP(I); |
31144 | case PT_IntAPS: |
31145 | return emitStorePopIntAPS(I); |
31146 | case PT_Bool: |
31147 | return emitStorePopBool(I); |
31148 | case PT_Ptr: |
31149 | return emitStorePopPtr(I); |
31150 | case PT_FnPtr: |
31151 | return emitStorePopFnPtr(I); |
31152 | case PT_MemberPtr: |
31153 | return emitStorePopMemberPtr(I); |
31154 | case PT_Float: |
31155 | return emitStorePopFloat(I); |
31156 | } |
31157 | llvm_unreachable("invalid enum value" ); |
31158 | } |
31159 | #endif |
31160 | #ifdef GET_LINK_IMPL |
31161 | bool ByteCodeEmitter::emitStorePopSint8(const SourceInfo &L) { |
31162 | return emitOp<>(OP_StorePopSint8, L); |
31163 | } |
31164 | bool ByteCodeEmitter::emitStorePopUint8(const SourceInfo &L) { |
31165 | return emitOp<>(OP_StorePopUint8, L); |
31166 | } |
31167 | bool ByteCodeEmitter::emitStorePopSint16(const SourceInfo &L) { |
31168 | return emitOp<>(OP_StorePopSint16, L); |
31169 | } |
31170 | bool ByteCodeEmitter::emitStorePopUint16(const SourceInfo &L) { |
31171 | return emitOp<>(OP_StorePopUint16, L); |
31172 | } |
31173 | bool ByteCodeEmitter::emitStorePopSint32(const SourceInfo &L) { |
31174 | return emitOp<>(OP_StorePopSint32, L); |
31175 | } |
31176 | bool ByteCodeEmitter::emitStorePopUint32(const SourceInfo &L) { |
31177 | return emitOp<>(OP_StorePopUint32, L); |
31178 | } |
31179 | bool ByteCodeEmitter::emitStorePopSint64(const SourceInfo &L) { |
31180 | return emitOp<>(OP_StorePopSint64, L); |
31181 | } |
31182 | bool ByteCodeEmitter::emitStorePopUint64(const SourceInfo &L) { |
31183 | return emitOp<>(OP_StorePopUint64, L); |
31184 | } |
31185 | bool ByteCodeEmitter::emitStorePopIntAP(const SourceInfo &L) { |
31186 | return emitOp<>(OP_StorePopIntAP, L); |
31187 | } |
31188 | bool ByteCodeEmitter::emitStorePopIntAPS(const SourceInfo &L) { |
31189 | return emitOp<>(OP_StorePopIntAPS, L); |
31190 | } |
31191 | bool ByteCodeEmitter::emitStorePopBool(const SourceInfo &L) { |
31192 | return emitOp<>(OP_StorePopBool, L); |
31193 | } |
31194 | bool ByteCodeEmitter::emitStorePopPtr(const SourceInfo &L) { |
31195 | return emitOp<>(OP_StorePopPtr, L); |
31196 | } |
31197 | bool ByteCodeEmitter::emitStorePopFnPtr(const SourceInfo &L) { |
31198 | return emitOp<>(OP_StorePopFnPtr, L); |
31199 | } |
31200 | bool ByteCodeEmitter::emitStorePopMemberPtr(const SourceInfo &L) { |
31201 | return emitOp<>(OP_StorePopMemberPtr, L); |
31202 | } |
31203 | bool ByteCodeEmitter::emitStorePopFloat(const SourceInfo &L) { |
31204 | return emitOp<>(OP_StorePopFloat, L); |
31205 | } |
31206 | #endif |
31207 | #ifdef GET_EVAL_IMPL |
31208 | bool EvalEmitter::emitStorePopSint8(const SourceInfo &L) { |
31209 | if (!isActive()) return true; |
31210 | CurrentSource = L; |
31211 | return StorePop<PT_Sint8>(S, OpPC); |
31212 | } |
31213 | bool EvalEmitter::emitStorePopUint8(const SourceInfo &L) { |
31214 | if (!isActive()) return true; |
31215 | CurrentSource = L; |
31216 | return StorePop<PT_Uint8>(S, OpPC); |
31217 | } |
31218 | bool EvalEmitter::emitStorePopSint16(const SourceInfo &L) { |
31219 | if (!isActive()) return true; |
31220 | CurrentSource = L; |
31221 | return StorePop<PT_Sint16>(S, OpPC); |
31222 | } |
31223 | bool EvalEmitter::emitStorePopUint16(const SourceInfo &L) { |
31224 | if (!isActive()) return true; |
31225 | CurrentSource = L; |
31226 | return StorePop<PT_Uint16>(S, OpPC); |
31227 | } |
31228 | bool EvalEmitter::emitStorePopSint32(const SourceInfo &L) { |
31229 | if (!isActive()) return true; |
31230 | CurrentSource = L; |
31231 | return StorePop<PT_Sint32>(S, OpPC); |
31232 | } |
31233 | bool EvalEmitter::emitStorePopUint32(const SourceInfo &L) { |
31234 | if (!isActive()) return true; |
31235 | CurrentSource = L; |
31236 | return StorePop<PT_Uint32>(S, OpPC); |
31237 | } |
31238 | bool EvalEmitter::emitStorePopSint64(const SourceInfo &L) { |
31239 | if (!isActive()) return true; |
31240 | CurrentSource = L; |
31241 | return StorePop<PT_Sint64>(S, OpPC); |
31242 | } |
31243 | bool EvalEmitter::emitStorePopUint64(const SourceInfo &L) { |
31244 | if (!isActive()) return true; |
31245 | CurrentSource = L; |
31246 | return StorePop<PT_Uint64>(S, OpPC); |
31247 | } |
31248 | bool EvalEmitter::emitStorePopIntAP(const SourceInfo &L) { |
31249 | if (!isActive()) return true; |
31250 | CurrentSource = L; |
31251 | return StorePop<PT_IntAP>(S, OpPC); |
31252 | } |
31253 | bool EvalEmitter::emitStorePopIntAPS(const SourceInfo &L) { |
31254 | if (!isActive()) return true; |
31255 | CurrentSource = L; |
31256 | return StorePop<PT_IntAPS>(S, OpPC); |
31257 | } |
31258 | bool EvalEmitter::emitStorePopBool(const SourceInfo &L) { |
31259 | if (!isActive()) return true; |
31260 | CurrentSource = L; |
31261 | return StorePop<PT_Bool>(S, OpPC); |
31262 | } |
31263 | bool EvalEmitter::emitStorePopPtr(const SourceInfo &L) { |
31264 | if (!isActive()) return true; |
31265 | CurrentSource = L; |
31266 | return StorePop<PT_Ptr>(S, OpPC); |
31267 | } |
31268 | bool EvalEmitter::emitStorePopFnPtr(const SourceInfo &L) { |
31269 | if (!isActive()) return true; |
31270 | CurrentSource = L; |
31271 | return StorePop<PT_FnPtr>(S, OpPC); |
31272 | } |
31273 | bool EvalEmitter::emitStorePopMemberPtr(const SourceInfo &L) { |
31274 | if (!isActive()) return true; |
31275 | CurrentSource = L; |
31276 | return StorePop<PT_MemberPtr>(S, OpPC); |
31277 | } |
31278 | bool EvalEmitter::emitStorePopFloat(const SourceInfo &L) { |
31279 | if (!isActive()) return true; |
31280 | CurrentSource = L; |
31281 | return StorePop<PT_Float>(S, OpPC); |
31282 | } |
31283 | #endif |
31284 | #ifdef GET_OPCODE_NAMES |
31285 | OP_SubSint8, |
31286 | OP_SubUint8, |
31287 | OP_SubSint16, |
31288 | OP_SubUint16, |
31289 | OP_SubSint32, |
31290 | OP_SubUint32, |
31291 | OP_SubSint64, |
31292 | OP_SubUint64, |
31293 | OP_SubIntAP, |
31294 | OP_SubIntAPS, |
31295 | OP_SubBool, |
31296 | #endif |
31297 | #ifdef GET_INTERP |
31298 | case OP_SubSint8: { |
31299 | if (!Sub<PT_Sint8>(S, OpPC)) |
31300 | return false; |
31301 | continue; |
31302 | } |
31303 | case OP_SubUint8: { |
31304 | if (!Sub<PT_Uint8>(S, OpPC)) |
31305 | return false; |
31306 | continue; |
31307 | } |
31308 | case OP_SubSint16: { |
31309 | if (!Sub<PT_Sint16>(S, OpPC)) |
31310 | return false; |
31311 | continue; |
31312 | } |
31313 | case OP_SubUint16: { |
31314 | if (!Sub<PT_Uint16>(S, OpPC)) |
31315 | return false; |
31316 | continue; |
31317 | } |
31318 | case OP_SubSint32: { |
31319 | if (!Sub<PT_Sint32>(S, OpPC)) |
31320 | return false; |
31321 | continue; |
31322 | } |
31323 | case OP_SubUint32: { |
31324 | if (!Sub<PT_Uint32>(S, OpPC)) |
31325 | return false; |
31326 | continue; |
31327 | } |
31328 | case OP_SubSint64: { |
31329 | if (!Sub<PT_Sint64>(S, OpPC)) |
31330 | return false; |
31331 | continue; |
31332 | } |
31333 | case OP_SubUint64: { |
31334 | if (!Sub<PT_Uint64>(S, OpPC)) |
31335 | return false; |
31336 | continue; |
31337 | } |
31338 | case OP_SubIntAP: { |
31339 | if (!Sub<PT_IntAP>(S, OpPC)) |
31340 | return false; |
31341 | continue; |
31342 | } |
31343 | case OP_SubIntAPS: { |
31344 | if (!Sub<PT_IntAPS>(S, OpPC)) |
31345 | return false; |
31346 | continue; |
31347 | } |
31348 | case OP_SubBool: { |
31349 | if (!Sub<PT_Bool>(S, OpPC)) |
31350 | return false; |
31351 | continue; |
31352 | } |
31353 | #endif |
31354 | #ifdef GET_DISASM |
31355 | case OP_SubSint8: |
31356 | PrintName("SubSint8" ); |
31357 | OS << "\t" << "\n" ; |
31358 | continue; |
31359 | case OP_SubUint8: |
31360 | PrintName("SubUint8" ); |
31361 | OS << "\t" << "\n" ; |
31362 | continue; |
31363 | case OP_SubSint16: |
31364 | PrintName("SubSint16" ); |
31365 | OS << "\t" << "\n" ; |
31366 | continue; |
31367 | case OP_SubUint16: |
31368 | PrintName("SubUint16" ); |
31369 | OS << "\t" << "\n" ; |
31370 | continue; |
31371 | case OP_SubSint32: |
31372 | PrintName("SubSint32" ); |
31373 | OS << "\t" << "\n" ; |
31374 | continue; |
31375 | case OP_SubUint32: |
31376 | PrintName("SubUint32" ); |
31377 | OS << "\t" << "\n" ; |
31378 | continue; |
31379 | case OP_SubSint64: |
31380 | PrintName("SubSint64" ); |
31381 | OS << "\t" << "\n" ; |
31382 | continue; |
31383 | case OP_SubUint64: |
31384 | PrintName("SubUint64" ); |
31385 | OS << "\t" << "\n" ; |
31386 | continue; |
31387 | case OP_SubIntAP: |
31388 | PrintName("SubIntAP" ); |
31389 | OS << "\t" << "\n" ; |
31390 | continue; |
31391 | case OP_SubIntAPS: |
31392 | PrintName("SubIntAPS" ); |
31393 | OS << "\t" << "\n" ; |
31394 | continue; |
31395 | case OP_SubBool: |
31396 | PrintName("SubBool" ); |
31397 | OS << "\t" << "\n" ; |
31398 | continue; |
31399 | #endif |
31400 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31401 | bool emitSubSint8(const SourceInfo &); |
31402 | bool emitSubUint8(const SourceInfo &); |
31403 | bool emitSubSint16(const SourceInfo &); |
31404 | bool emitSubUint16(const SourceInfo &); |
31405 | bool emitSubSint32(const SourceInfo &); |
31406 | bool emitSubUint32(const SourceInfo &); |
31407 | bool emitSubSint64(const SourceInfo &); |
31408 | bool emitSubUint64(const SourceInfo &); |
31409 | bool emitSubIntAP(const SourceInfo &); |
31410 | bool emitSubIntAPS(const SourceInfo &); |
31411 | bool emitSubBool(const SourceInfo &); |
31412 | #endif |
31413 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31414 | [[nodiscard]] bool emitSub(PrimType, const SourceInfo &I); |
31415 | #endif |
31416 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
31417 | bool |
31418 | #if defined(GET_EVAL_IMPL) |
31419 | EvalEmitter |
31420 | #else |
31421 | ByteCodeEmitter |
31422 | #endif |
31423 | ::emitSub(PrimType T0, const SourceInfo &I) { |
31424 | switch (T0) { |
31425 | case PT_Sint8: |
31426 | return emitSubSint8(I); |
31427 | case PT_Uint8: |
31428 | return emitSubUint8(I); |
31429 | case PT_Sint16: |
31430 | return emitSubSint16(I); |
31431 | case PT_Uint16: |
31432 | return emitSubUint16(I); |
31433 | case PT_Sint32: |
31434 | return emitSubSint32(I); |
31435 | case PT_Uint32: |
31436 | return emitSubUint32(I); |
31437 | case PT_Sint64: |
31438 | return emitSubSint64(I); |
31439 | case PT_Uint64: |
31440 | return emitSubUint64(I); |
31441 | case PT_IntAP: |
31442 | return emitSubIntAP(I); |
31443 | case PT_IntAPS: |
31444 | return emitSubIntAPS(I); |
31445 | case PT_Bool: |
31446 | return emitSubBool(I); |
31447 | default: llvm_unreachable("invalid type: emitSub" ); |
31448 | } |
31449 | llvm_unreachable("invalid enum value" ); |
31450 | } |
31451 | #endif |
31452 | #ifdef GET_LINK_IMPL |
31453 | bool ByteCodeEmitter::emitSubSint8(const SourceInfo &L) { |
31454 | return emitOp<>(OP_SubSint8, L); |
31455 | } |
31456 | bool ByteCodeEmitter::emitSubUint8(const SourceInfo &L) { |
31457 | return emitOp<>(OP_SubUint8, L); |
31458 | } |
31459 | bool ByteCodeEmitter::emitSubSint16(const SourceInfo &L) { |
31460 | return emitOp<>(OP_SubSint16, L); |
31461 | } |
31462 | bool ByteCodeEmitter::emitSubUint16(const SourceInfo &L) { |
31463 | return emitOp<>(OP_SubUint16, L); |
31464 | } |
31465 | bool ByteCodeEmitter::emitSubSint32(const SourceInfo &L) { |
31466 | return emitOp<>(OP_SubSint32, L); |
31467 | } |
31468 | bool ByteCodeEmitter::emitSubUint32(const SourceInfo &L) { |
31469 | return emitOp<>(OP_SubUint32, L); |
31470 | } |
31471 | bool ByteCodeEmitter::emitSubSint64(const SourceInfo &L) { |
31472 | return emitOp<>(OP_SubSint64, L); |
31473 | } |
31474 | bool ByteCodeEmitter::emitSubUint64(const SourceInfo &L) { |
31475 | return emitOp<>(OP_SubUint64, L); |
31476 | } |
31477 | bool ByteCodeEmitter::emitSubIntAP(const SourceInfo &L) { |
31478 | return emitOp<>(OP_SubIntAP, L); |
31479 | } |
31480 | bool ByteCodeEmitter::emitSubIntAPS(const SourceInfo &L) { |
31481 | return emitOp<>(OP_SubIntAPS, L); |
31482 | } |
31483 | bool ByteCodeEmitter::emitSubBool(const SourceInfo &L) { |
31484 | return emitOp<>(OP_SubBool, L); |
31485 | } |
31486 | #endif |
31487 | #ifdef GET_EVAL_IMPL |
31488 | bool EvalEmitter::emitSubSint8(const SourceInfo &L) { |
31489 | if (!isActive()) return true; |
31490 | CurrentSource = L; |
31491 | return Sub<PT_Sint8>(S, OpPC); |
31492 | } |
31493 | bool EvalEmitter::emitSubUint8(const SourceInfo &L) { |
31494 | if (!isActive()) return true; |
31495 | CurrentSource = L; |
31496 | return Sub<PT_Uint8>(S, OpPC); |
31497 | } |
31498 | bool EvalEmitter::emitSubSint16(const SourceInfo &L) { |
31499 | if (!isActive()) return true; |
31500 | CurrentSource = L; |
31501 | return Sub<PT_Sint16>(S, OpPC); |
31502 | } |
31503 | bool EvalEmitter::emitSubUint16(const SourceInfo &L) { |
31504 | if (!isActive()) return true; |
31505 | CurrentSource = L; |
31506 | return Sub<PT_Uint16>(S, OpPC); |
31507 | } |
31508 | bool EvalEmitter::emitSubSint32(const SourceInfo &L) { |
31509 | if (!isActive()) return true; |
31510 | CurrentSource = L; |
31511 | return Sub<PT_Sint32>(S, OpPC); |
31512 | } |
31513 | bool EvalEmitter::emitSubUint32(const SourceInfo &L) { |
31514 | if (!isActive()) return true; |
31515 | CurrentSource = L; |
31516 | return Sub<PT_Uint32>(S, OpPC); |
31517 | } |
31518 | bool EvalEmitter::emitSubSint64(const SourceInfo &L) { |
31519 | if (!isActive()) return true; |
31520 | CurrentSource = L; |
31521 | return Sub<PT_Sint64>(S, OpPC); |
31522 | } |
31523 | bool EvalEmitter::emitSubUint64(const SourceInfo &L) { |
31524 | if (!isActive()) return true; |
31525 | CurrentSource = L; |
31526 | return Sub<PT_Uint64>(S, OpPC); |
31527 | } |
31528 | bool EvalEmitter::emitSubIntAP(const SourceInfo &L) { |
31529 | if (!isActive()) return true; |
31530 | CurrentSource = L; |
31531 | return Sub<PT_IntAP>(S, OpPC); |
31532 | } |
31533 | bool EvalEmitter::emitSubIntAPS(const SourceInfo &L) { |
31534 | if (!isActive()) return true; |
31535 | CurrentSource = L; |
31536 | return Sub<PT_IntAPS>(S, OpPC); |
31537 | } |
31538 | bool EvalEmitter::emitSubBool(const SourceInfo &L) { |
31539 | if (!isActive()) return true; |
31540 | CurrentSource = L; |
31541 | return Sub<PT_Bool>(S, OpPC); |
31542 | } |
31543 | #endif |
31544 | #ifdef GET_OPCODE_NAMES |
31545 | OP_SubOffsetSint8, |
31546 | OP_SubOffsetUint8, |
31547 | OP_SubOffsetSint16, |
31548 | OP_SubOffsetUint16, |
31549 | OP_SubOffsetSint32, |
31550 | OP_SubOffsetUint32, |
31551 | OP_SubOffsetSint64, |
31552 | OP_SubOffsetUint64, |
31553 | OP_SubOffsetIntAP, |
31554 | OP_SubOffsetIntAPS, |
31555 | OP_SubOffsetBool, |
31556 | #endif |
31557 | #ifdef GET_INTERP |
31558 | case OP_SubOffsetSint8: { |
31559 | if (!SubOffset<PT_Sint8>(S, OpPC)) |
31560 | return false; |
31561 | continue; |
31562 | } |
31563 | case OP_SubOffsetUint8: { |
31564 | if (!SubOffset<PT_Uint8>(S, OpPC)) |
31565 | return false; |
31566 | continue; |
31567 | } |
31568 | case OP_SubOffsetSint16: { |
31569 | if (!SubOffset<PT_Sint16>(S, OpPC)) |
31570 | return false; |
31571 | continue; |
31572 | } |
31573 | case OP_SubOffsetUint16: { |
31574 | if (!SubOffset<PT_Uint16>(S, OpPC)) |
31575 | return false; |
31576 | continue; |
31577 | } |
31578 | case OP_SubOffsetSint32: { |
31579 | if (!SubOffset<PT_Sint32>(S, OpPC)) |
31580 | return false; |
31581 | continue; |
31582 | } |
31583 | case OP_SubOffsetUint32: { |
31584 | if (!SubOffset<PT_Uint32>(S, OpPC)) |
31585 | return false; |
31586 | continue; |
31587 | } |
31588 | case OP_SubOffsetSint64: { |
31589 | if (!SubOffset<PT_Sint64>(S, OpPC)) |
31590 | return false; |
31591 | continue; |
31592 | } |
31593 | case OP_SubOffsetUint64: { |
31594 | if (!SubOffset<PT_Uint64>(S, OpPC)) |
31595 | return false; |
31596 | continue; |
31597 | } |
31598 | case OP_SubOffsetIntAP: { |
31599 | if (!SubOffset<PT_IntAP>(S, OpPC)) |
31600 | return false; |
31601 | continue; |
31602 | } |
31603 | case OP_SubOffsetIntAPS: { |
31604 | if (!SubOffset<PT_IntAPS>(S, OpPC)) |
31605 | return false; |
31606 | continue; |
31607 | } |
31608 | case OP_SubOffsetBool: { |
31609 | if (!SubOffset<PT_Bool>(S, OpPC)) |
31610 | return false; |
31611 | continue; |
31612 | } |
31613 | #endif |
31614 | #ifdef GET_DISASM |
31615 | case OP_SubOffsetSint8: |
31616 | PrintName("SubOffsetSint8" ); |
31617 | OS << "\t" << "\n" ; |
31618 | continue; |
31619 | case OP_SubOffsetUint8: |
31620 | PrintName("SubOffsetUint8" ); |
31621 | OS << "\t" << "\n" ; |
31622 | continue; |
31623 | case OP_SubOffsetSint16: |
31624 | PrintName("SubOffsetSint16" ); |
31625 | OS << "\t" << "\n" ; |
31626 | continue; |
31627 | case OP_SubOffsetUint16: |
31628 | PrintName("SubOffsetUint16" ); |
31629 | OS << "\t" << "\n" ; |
31630 | continue; |
31631 | case OP_SubOffsetSint32: |
31632 | PrintName("SubOffsetSint32" ); |
31633 | OS << "\t" << "\n" ; |
31634 | continue; |
31635 | case OP_SubOffsetUint32: |
31636 | PrintName("SubOffsetUint32" ); |
31637 | OS << "\t" << "\n" ; |
31638 | continue; |
31639 | case OP_SubOffsetSint64: |
31640 | PrintName("SubOffsetSint64" ); |
31641 | OS << "\t" << "\n" ; |
31642 | continue; |
31643 | case OP_SubOffsetUint64: |
31644 | PrintName("SubOffsetUint64" ); |
31645 | OS << "\t" << "\n" ; |
31646 | continue; |
31647 | case OP_SubOffsetIntAP: |
31648 | PrintName("SubOffsetIntAP" ); |
31649 | OS << "\t" << "\n" ; |
31650 | continue; |
31651 | case OP_SubOffsetIntAPS: |
31652 | PrintName("SubOffsetIntAPS" ); |
31653 | OS << "\t" << "\n" ; |
31654 | continue; |
31655 | case OP_SubOffsetBool: |
31656 | PrintName("SubOffsetBool" ); |
31657 | OS << "\t" << "\n" ; |
31658 | continue; |
31659 | #endif |
31660 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31661 | bool emitSubOffsetSint8(const SourceInfo &); |
31662 | bool emitSubOffsetUint8(const SourceInfo &); |
31663 | bool emitSubOffsetSint16(const SourceInfo &); |
31664 | bool emitSubOffsetUint16(const SourceInfo &); |
31665 | bool emitSubOffsetSint32(const SourceInfo &); |
31666 | bool emitSubOffsetUint32(const SourceInfo &); |
31667 | bool emitSubOffsetSint64(const SourceInfo &); |
31668 | bool emitSubOffsetUint64(const SourceInfo &); |
31669 | bool emitSubOffsetIntAP(const SourceInfo &); |
31670 | bool emitSubOffsetIntAPS(const SourceInfo &); |
31671 | bool emitSubOffsetBool(const SourceInfo &); |
31672 | #endif |
31673 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31674 | [[nodiscard]] bool emitSubOffset(PrimType, const SourceInfo &I); |
31675 | #endif |
31676 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
31677 | bool |
31678 | #if defined(GET_EVAL_IMPL) |
31679 | EvalEmitter |
31680 | #else |
31681 | ByteCodeEmitter |
31682 | #endif |
31683 | ::emitSubOffset(PrimType T0, const SourceInfo &I) { |
31684 | switch (T0) { |
31685 | case PT_Sint8: |
31686 | return emitSubOffsetSint8(I); |
31687 | case PT_Uint8: |
31688 | return emitSubOffsetUint8(I); |
31689 | case PT_Sint16: |
31690 | return emitSubOffsetSint16(I); |
31691 | case PT_Uint16: |
31692 | return emitSubOffsetUint16(I); |
31693 | case PT_Sint32: |
31694 | return emitSubOffsetSint32(I); |
31695 | case PT_Uint32: |
31696 | return emitSubOffsetUint32(I); |
31697 | case PT_Sint64: |
31698 | return emitSubOffsetSint64(I); |
31699 | case PT_Uint64: |
31700 | return emitSubOffsetUint64(I); |
31701 | case PT_IntAP: |
31702 | return emitSubOffsetIntAP(I); |
31703 | case PT_IntAPS: |
31704 | return emitSubOffsetIntAPS(I); |
31705 | case PT_Bool: |
31706 | return emitSubOffsetBool(I); |
31707 | default: llvm_unreachable("invalid type: emitSubOffset" ); |
31708 | } |
31709 | llvm_unreachable("invalid enum value" ); |
31710 | } |
31711 | #endif |
31712 | #ifdef GET_LINK_IMPL |
31713 | bool ByteCodeEmitter::emitSubOffsetSint8(const SourceInfo &L) { |
31714 | return emitOp<>(OP_SubOffsetSint8, L); |
31715 | } |
31716 | bool ByteCodeEmitter::emitSubOffsetUint8(const SourceInfo &L) { |
31717 | return emitOp<>(OP_SubOffsetUint8, L); |
31718 | } |
31719 | bool ByteCodeEmitter::emitSubOffsetSint16(const SourceInfo &L) { |
31720 | return emitOp<>(OP_SubOffsetSint16, L); |
31721 | } |
31722 | bool ByteCodeEmitter::emitSubOffsetUint16(const SourceInfo &L) { |
31723 | return emitOp<>(OP_SubOffsetUint16, L); |
31724 | } |
31725 | bool ByteCodeEmitter::emitSubOffsetSint32(const SourceInfo &L) { |
31726 | return emitOp<>(OP_SubOffsetSint32, L); |
31727 | } |
31728 | bool ByteCodeEmitter::emitSubOffsetUint32(const SourceInfo &L) { |
31729 | return emitOp<>(OP_SubOffsetUint32, L); |
31730 | } |
31731 | bool ByteCodeEmitter::emitSubOffsetSint64(const SourceInfo &L) { |
31732 | return emitOp<>(OP_SubOffsetSint64, L); |
31733 | } |
31734 | bool ByteCodeEmitter::emitSubOffsetUint64(const SourceInfo &L) { |
31735 | return emitOp<>(OP_SubOffsetUint64, L); |
31736 | } |
31737 | bool ByteCodeEmitter::emitSubOffsetIntAP(const SourceInfo &L) { |
31738 | return emitOp<>(OP_SubOffsetIntAP, L); |
31739 | } |
31740 | bool ByteCodeEmitter::emitSubOffsetIntAPS(const SourceInfo &L) { |
31741 | return emitOp<>(OP_SubOffsetIntAPS, L); |
31742 | } |
31743 | bool ByteCodeEmitter::emitSubOffsetBool(const SourceInfo &L) { |
31744 | return emitOp<>(OP_SubOffsetBool, L); |
31745 | } |
31746 | #endif |
31747 | #ifdef GET_EVAL_IMPL |
31748 | bool EvalEmitter::emitSubOffsetSint8(const SourceInfo &L) { |
31749 | if (!isActive()) return true; |
31750 | CurrentSource = L; |
31751 | return SubOffset<PT_Sint8>(S, OpPC); |
31752 | } |
31753 | bool EvalEmitter::emitSubOffsetUint8(const SourceInfo &L) { |
31754 | if (!isActive()) return true; |
31755 | CurrentSource = L; |
31756 | return SubOffset<PT_Uint8>(S, OpPC); |
31757 | } |
31758 | bool EvalEmitter::emitSubOffsetSint16(const SourceInfo &L) { |
31759 | if (!isActive()) return true; |
31760 | CurrentSource = L; |
31761 | return SubOffset<PT_Sint16>(S, OpPC); |
31762 | } |
31763 | bool EvalEmitter::emitSubOffsetUint16(const SourceInfo &L) { |
31764 | if (!isActive()) return true; |
31765 | CurrentSource = L; |
31766 | return SubOffset<PT_Uint16>(S, OpPC); |
31767 | } |
31768 | bool EvalEmitter::emitSubOffsetSint32(const SourceInfo &L) { |
31769 | if (!isActive()) return true; |
31770 | CurrentSource = L; |
31771 | return SubOffset<PT_Sint32>(S, OpPC); |
31772 | } |
31773 | bool EvalEmitter::emitSubOffsetUint32(const SourceInfo &L) { |
31774 | if (!isActive()) return true; |
31775 | CurrentSource = L; |
31776 | return SubOffset<PT_Uint32>(S, OpPC); |
31777 | } |
31778 | bool EvalEmitter::emitSubOffsetSint64(const SourceInfo &L) { |
31779 | if (!isActive()) return true; |
31780 | CurrentSource = L; |
31781 | return SubOffset<PT_Sint64>(S, OpPC); |
31782 | } |
31783 | bool EvalEmitter::emitSubOffsetUint64(const SourceInfo &L) { |
31784 | if (!isActive()) return true; |
31785 | CurrentSource = L; |
31786 | return SubOffset<PT_Uint64>(S, OpPC); |
31787 | } |
31788 | bool EvalEmitter::emitSubOffsetIntAP(const SourceInfo &L) { |
31789 | if (!isActive()) return true; |
31790 | CurrentSource = L; |
31791 | return SubOffset<PT_IntAP>(S, OpPC); |
31792 | } |
31793 | bool EvalEmitter::emitSubOffsetIntAPS(const SourceInfo &L) { |
31794 | if (!isActive()) return true; |
31795 | CurrentSource = L; |
31796 | return SubOffset<PT_IntAPS>(S, OpPC); |
31797 | } |
31798 | bool EvalEmitter::emitSubOffsetBool(const SourceInfo &L) { |
31799 | if (!isActive()) return true; |
31800 | CurrentSource = L; |
31801 | return SubOffset<PT_Bool>(S, OpPC); |
31802 | } |
31803 | #endif |
31804 | #ifdef GET_OPCODE_NAMES |
31805 | OP_SubPtrSint8, |
31806 | OP_SubPtrUint8, |
31807 | OP_SubPtrSint16, |
31808 | OP_SubPtrUint16, |
31809 | OP_SubPtrSint32, |
31810 | OP_SubPtrUint32, |
31811 | OP_SubPtrSint64, |
31812 | OP_SubPtrUint64, |
31813 | OP_SubPtrIntAP, |
31814 | OP_SubPtrIntAPS, |
31815 | #endif |
31816 | #ifdef GET_INTERP |
31817 | case OP_SubPtrSint8: { |
31818 | if (!SubPtr<PT_Sint8>(S, OpPC)) |
31819 | return false; |
31820 | continue; |
31821 | } |
31822 | case OP_SubPtrUint8: { |
31823 | if (!SubPtr<PT_Uint8>(S, OpPC)) |
31824 | return false; |
31825 | continue; |
31826 | } |
31827 | case OP_SubPtrSint16: { |
31828 | if (!SubPtr<PT_Sint16>(S, OpPC)) |
31829 | return false; |
31830 | continue; |
31831 | } |
31832 | case OP_SubPtrUint16: { |
31833 | if (!SubPtr<PT_Uint16>(S, OpPC)) |
31834 | return false; |
31835 | continue; |
31836 | } |
31837 | case OP_SubPtrSint32: { |
31838 | if (!SubPtr<PT_Sint32>(S, OpPC)) |
31839 | return false; |
31840 | continue; |
31841 | } |
31842 | case OP_SubPtrUint32: { |
31843 | if (!SubPtr<PT_Uint32>(S, OpPC)) |
31844 | return false; |
31845 | continue; |
31846 | } |
31847 | case OP_SubPtrSint64: { |
31848 | if (!SubPtr<PT_Sint64>(S, OpPC)) |
31849 | return false; |
31850 | continue; |
31851 | } |
31852 | case OP_SubPtrUint64: { |
31853 | if (!SubPtr<PT_Uint64>(S, OpPC)) |
31854 | return false; |
31855 | continue; |
31856 | } |
31857 | case OP_SubPtrIntAP: { |
31858 | if (!SubPtr<PT_IntAP>(S, OpPC)) |
31859 | return false; |
31860 | continue; |
31861 | } |
31862 | case OP_SubPtrIntAPS: { |
31863 | if (!SubPtr<PT_IntAPS>(S, OpPC)) |
31864 | return false; |
31865 | continue; |
31866 | } |
31867 | #endif |
31868 | #ifdef GET_DISASM |
31869 | case OP_SubPtrSint8: |
31870 | PrintName("SubPtrSint8" ); |
31871 | OS << "\t" << "\n" ; |
31872 | continue; |
31873 | case OP_SubPtrUint8: |
31874 | PrintName("SubPtrUint8" ); |
31875 | OS << "\t" << "\n" ; |
31876 | continue; |
31877 | case OP_SubPtrSint16: |
31878 | PrintName("SubPtrSint16" ); |
31879 | OS << "\t" << "\n" ; |
31880 | continue; |
31881 | case OP_SubPtrUint16: |
31882 | PrintName("SubPtrUint16" ); |
31883 | OS << "\t" << "\n" ; |
31884 | continue; |
31885 | case OP_SubPtrSint32: |
31886 | PrintName("SubPtrSint32" ); |
31887 | OS << "\t" << "\n" ; |
31888 | continue; |
31889 | case OP_SubPtrUint32: |
31890 | PrintName("SubPtrUint32" ); |
31891 | OS << "\t" << "\n" ; |
31892 | continue; |
31893 | case OP_SubPtrSint64: |
31894 | PrintName("SubPtrSint64" ); |
31895 | OS << "\t" << "\n" ; |
31896 | continue; |
31897 | case OP_SubPtrUint64: |
31898 | PrintName("SubPtrUint64" ); |
31899 | OS << "\t" << "\n" ; |
31900 | continue; |
31901 | case OP_SubPtrIntAP: |
31902 | PrintName("SubPtrIntAP" ); |
31903 | OS << "\t" << "\n" ; |
31904 | continue; |
31905 | case OP_SubPtrIntAPS: |
31906 | PrintName("SubPtrIntAPS" ); |
31907 | OS << "\t" << "\n" ; |
31908 | continue; |
31909 | #endif |
31910 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31911 | bool emitSubPtrSint8(const SourceInfo &); |
31912 | bool emitSubPtrUint8(const SourceInfo &); |
31913 | bool emitSubPtrSint16(const SourceInfo &); |
31914 | bool emitSubPtrUint16(const SourceInfo &); |
31915 | bool emitSubPtrSint32(const SourceInfo &); |
31916 | bool emitSubPtrUint32(const SourceInfo &); |
31917 | bool emitSubPtrSint64(const SourceInfo &); |
31918 | bool emitSubPtrUint64(const SourceInfo &); |
31919 | bool emitSubPtrIntAP(const SourceInfo &); |
31920 | bool emitSubPtrIntAPS(const SourceInfo &); |
31921 | #endif |
31922 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
31923 | [[nodiscard]] bool emitSubPtr(PrimType, const SourceInfo &I); |
31924 | #endif |
31925 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
31926 | bool |
31927 | #if defined(GET_EVAL_IMPL) |
31928 | EvalEmitter |
31929 | #else |
31930 | ByteCodeEmitter |
31931 | #endif |
31932 | ::emitSubPtr(PrimType T0, const SourceInfo &I) { |
31933 | switch (T0) { |
31934 | case PT_Sint8: |
31935 | return emitSubPtrSint8(I); |
31936 | case PT_Uint8: |
31937 | return emitSubPtrUint8(I); |
31938 | case PT_Sint16: |
31939 | return emitSubPtrSint16(I); |
31940 | case PT_Uint16: |
31941 | return emitSubPtrUint16(I); |
31942 | case PT_Sint32: |
31943 | return emitSubPtrSint32(I); |
31944 | case PT_Uint32: |
31945 | return emitSubPtrUint32(I); |
31946 | case PT_Sint64: |
31947 | return emitSubPtrSint64(I); |
31948 | case PT_Uint64: |
31949 | return emitSubPtrUint64(I); |
31950 | case PT_IntAP: |
31951 | return emitSubPtrIntAP(I); |
31952 | case PT_IntAPS: |
31953 | return emitSubPtrIntAPS(I); |
31954 | default: llvm_unreachable("invalid type: emitSubPtr" ); |
31955 | } |
31956 | llvm_unreachable("invalid enum value" ); |
31957 | } |
31958 | #endif |
31959 | #ifdef GET_LINK_IMPL |
31960 | bool ByteCodeEmitter::emitSubPtrSint8(const SourceInfo &L) { |
31961 | return emitOp<>(OP_SubPtrSint8, L); |
31962 | } |
31963 | bool ByteCodeEmitter::emitSubPtrUint8(const SourceInfo &L) { |
31964 | return emitOp<>(OP_SubPtrUint8, L); |
31965 | } |
31966 | bool ByteCodeEmitter::emitSubPtrSint16(const SourceInfo &L) { |
31967 | return emitOp<>(OP_SubPtrSint16, L); |
31968 | } |
31969 | bool ByteCodeEmitter::emitSubPtrUint16(const SourceInfo &L) { |
31970 | return emitOp<>(OP_SubPtrUint16, L); |
31971 | } |
31972 | bool ByteCodeEmitter::emitSubPtrSint32(const SourceInfo &L) { |
31973 | return emitOp<>(OP_SubPtrSint32, L); |
31974 | } |
31975 | bool ByteCodeEmitter::emitSubPtrUint32(const SourceInfo &L) { |
31976 | return emitOp<>(OP_SubPtrUint32, L); |
31977 | } |
31978 | bool ByteCodeEmitter::emitSubPtrSint64(const SourceInfo &L) { |
31979 | return emitOp<>(OP_SubPtrSint64, L); |
31980 | } |
31981 | bool ByteCodeEmitter::emitSubPtrUint64(const SourceInfo &L) { |
31982 | return emitOp<>(OP_SubPtrUint64, L); |
31983 | } |
31984 | bool ByteCodeEmitter::emitSubPtrIntAP(const SourceInfo &L) { |
31985 | return emitOp<>(OP_SubPtrIntAP, L); |
31986 | } |
31987 | bool ByteCodeEmitter::emitSubPtrIntAPS(const SourceInfo &L) { |
31988 | return emitOp<>(OP_SubPtrIntAPS, L); |
31989 | } |
31990 | #endif |
31991 | #ifdef GET_EVAL_IMPL |
31992 | bool EvalEmitter::emitSubPtrSint8(const SourceInfo &L) { |
31993 | if (!isActive()) return true; |
31994 | CurrentSource = L; |
31995 | return SubPtr<PT_Sint8>(S, OpPC); |
31996 | } |
31997 | bool EvalEmitter::emitSubPtrUint8(const SourceInfo &L) { |
31998 | if (!isActive()) return true; |
31999 | CurrentSource = L; |
32000 | return SubPtr<PT_Uint8>(S, OpPC); |
32001 | } |
32002 | bool EvalEmitter::emitSubPtrSint16(const SourceInfo &L) { |
32003 | if (!isActive()) return true; |
32004 | CurrentSource = L; |
32005 | return SubPtr<PT_Sint16>(S, OpPC); |
32006 | } |
32007 | bool EvalEmitter::emitSubPtrUint16(const SourceInfo &L) { |
32008 | if (!isActive()) return true; |
32009 | CurrentSource = L; |
32010 | return SubPtr<PT_Uint16>(S, OpPC); |
32011 | } |
32012 | bool EvalEmitter::emitSubPtrSint32(const SourceInfo &L) { |
32013 | if (!isActive()) return true; |
32014 | CurrentSource = L; |
32015 | return SubPtr<PT_Sint32>(S, OpPC); |
32016 | } |
32017 | bool EvalEmitter::emitSubPtrUint32(const SourceInfo &L) { |
32018 | if (!isActive()) return true; |
32019 | CurrentSource = L; |
32020 | return SubPtr<PT_Uint32>(S, OpPC); |
32021 | } |
32022 | bool EvalEmitter::emitSubPtrSint64(const SourceInfo &L) { |
32023 | if (!isActive()) return true; |
32024 | CurrentSource = L; |
32025 | return SubPtr<PT_Sint64>(S, OpPC); |
32026 | } |
32027 | bool EvalEmitter::emitSubPtrUint64(const SourceInfo &L) { |
32028 | if (!isActive()) return true; |
32029 | CurrentSource = L; |
32030 | return SubPtr<PT_Uint64>(S, OpPC); |
32031 | } |
32032 | bool EvalEmitter::emitSubPtrIntAP(const SourceInfo &L) { |
32033 | if (!isActive()) return true; |
32034 | CurrentSource = L; |
32035 | return SubPtr<PT_IntAP>(S, OpPC); |
32036 | } |
32037 | bool EvalEmitter::emitSubPtrIntAPS(const SourceInfo &L) { |
32038 | if (!isActive()) return true; |
32039 | CurrentSource = L; |
32040 | return SubPtr<PT_IntAPS>(S, OpPC); |
32041 | } |
32042 | #endif |
32043 | #ifdef GET_OPCODE_NAMES |
32044 | OP_Subf, |
32045 | #endif |
32046 | #ifdef GET_INTERP |
32047 | case OP_Subf: { |
32048 | const auto V0 = ReadArg<llvm::RoundingMode>(S, PC); |
32049 | if (!Subf(S, OpPC, V0)) |
32050 | return false; |
32051 | continue; |
32052 | } |
32053 | #endif |
32054 | #ifdef GET_DISASM |
32055 | case OP_Subf: |
32056 | PrintName("Subf" ); |
32057 | OS << "\t" << ReadArg<llvm::RoundingMode>(P, PC) << " " << "\n" ; |
32058 | continue; |
32059 | #endif |
32060 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32061 | bool emitSubf( llvm::RoundingMode , const SourceInfo &); |
32062 | #endif |
32063 | #ifdef GET_LINK_IMPL |
32064 | bool ByteCodeEmitter::emitSubf( llvm::RoundingMode A0, const SourceInfo &L) { |
32065 | return emitOp<llvm::RoundingMode>(OP_Subf, A0, L); |
32066 | } |
32067 | #endif |
32068 | #ifdef GET_EVAL_IMPL |
32069 | bool EvalEmitter::emitSubf( llvm::RoundingMode A0, const SourceInfo &L) { |
32070 | if (!isActive()) return true; |
32071 | CurrentSource = L; |
32072 | return Subf(S, OpPC, A0); |
32073 | } |
32074 | #endif |
32075 | #ifdef GET_OPCODE_NAMES |
32076 | OP_This, |
32077 | #endif |
32078 | #ifdef GET_INTERP |
32079 | case OP_This: { |
32080 | if (!This(S, OpPC)) |
32081 | return false; |
32082 | continue; |
32083 | } |
32084 | #endif |
32085 | #ifdef GET_DISASM |
32086 | case OP_This: |
32087 | PrintName("This" ); |
32088 | OS << "\t" << "\n" ; |
32089 | continue; |
32090 | #endif |
32091 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32092 | bool emitThis(const SourceInfo &); |
32093 | #endif |
32094 | #ifdef GET_LINK_IMPL |
32095 | bool ByteCodeEmitter::emitThis(const SourceInfo &L) { |
32096 | return emitOp<>(OP_This, L); |
32097 | } |
32098 | #endif |
32099 | #ifdef GET_EVAL_IMPL |
32100 | bool EvalEmitter::emitThis(const SourceInfo &L) { |
32101 | if (!isActive()) return true; |
32102 | CurrentSource = L; |
32103 | return This(S, OpPC); |
32104 | } |
32105 | #endif |
32106 | #ifdef GET_OPCODE_NAMES |
32107 | OP_ToMemberPtr, |
32108 | #endif |
32109 | #ifdef GET_INTERP |
32110 | case OP_ToMemberPtr: { |
32111 | if (!ToMemberPtr(S, OpPC)) |
32112 | return false; |
32113 | continue; |
32114 | } |
32115 | #endif |
32116 | #ifdef GET_DISASM |
32117 | case OP_ToMemberPtr: |
32118 | PrintName("ToMemberPtr" ); |
32119 | OS << "\t" << "\n" ; |
32120 | continue; |
32121 | #endif |
32122 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32123 | bool emitToMemberPtr(const SourceInfo &); |
32124 | #endif |
32125 | #ifdef GET_LINK_IMPL |
32126 | bool ByteCodeEmitter::emitToMemberPtr(const SourceInfo &L) { |
32127 | return emitOp<>(OP_ToMemberPtr, L); |
32128 | } |
32129 | #endif |
32130 | #ifdef GET_EVAL_IMPL |
32131 | bool EvalEmitter::emitToMemberPtr(const SourceInfo &L) { |
32132 | if (!isActive()) return true; |
32133 | CurrentSource = L; |
32134 | return ToMemberPtr(S, OpPC); |
32135 | } |
32136 | #endif |
32137 | #ifdef GET_OPCODE_NAMES |
32138 | OP_Unsupported, |
32139 | #endif |
32140 | #ifdef GET_INTERP |
32141 | case OP_Unsupported: { |
32142 | if (!Unsupported(S, OpPC)) |
32143 | return false; |
32144 | continue; |
32145 | } |
32146 | #endif |
32147 | #ifdef GET_DISASM |
32148 | case OP_Unsupported: |
32149 | PrintName("Unsupported" ); |
32150 | OS << "\t" << "\n" ; |
32151 | continue; |
32152 | #endif |
32153 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32154 | bool emitUnsupported(const SourceInfo &); |
32155 | #endif |
32156 | #ifdef GET_LINK_IMPL |
32157 | bool ByteCodeEmitter::emitUnsupported(const SourceInfo &L) { |
32158 | return emitOp<>(OP_Unsupported, L); |
32159 | } |
32160 | #endif |
32161 | #ifdef GET_EVAL_IMPL |
32162 | bool EvalEmitter::emitUnsupported(const SourceInfo &L) { |
32163 | if (!isActive()) return true; |
32164 | CurrentSource = L; |
32165 | return Unsupported(S, OpPC); |
32166 | } |
32167 | #endif |
32168 | #ifdef GET_OPCODE_NAMES |
32169 | OP_ZeroSint8, |
32170 | OP_ZeroUint8, |
32171 | OP_ZeroSint16, |
32172 | OP_ZeroUint16, |
32173 | OP_ZeroSint32, |
32174 | OP_ZeroUint32, |
32175 | OP_ZeroSint64, |
32176 | OP_ZeroUint64, |
32177 | OP_ZeroBool, |
32178 | #endif |
32179 | #ifdef GET_INTERP |
32180 | case OP_ZeroSint8: { |
32181 | if (!Zero<PT_Sint8>(S, OpPC)) |
32182 | return false; |
32183 | continue; |
32184 | } |
32185 | case OP_ZeroUint8: { |
32186 | if (!Zero<PT_Uint8>(S, OpPC)) |
32187 | return false; |
32188 | continue; |
32189 | } |
32190 | case OP_ZeroSint16: { |
32191 | if (!Zero<PT_Sint16>(S, OpPC)) |
32192 | return false; |
32193 | continue; |
32194 | } |
32195 | case OP_ZeroUint16: { |
32196 | if (!Zero<PT_Uint16>(S, OpPC)) |
32197 | return false; |
32198 | continue; |
32199 | } |
32200 | case OP_ZeroSint32: { |
32201 | if (!Zero<PT_Sint32>(S, OpPC)) |
32202 | return false; |
32203 | continue; |
32204 | } |
32205 | case OP_ZeroUint32: { |
32206 | if (!Zero<PT_Uint32>(S, OpPC)) |
32207 | return false; |
32208 | continue; |
32209 | } |
32210 | case OP_ZeroSint64: { |
32211 | if (!Zero<PT_Sint64>(S, OpPC)) |
32212 | return false; |
32213 | continue; |
32214 | } |
32215 | case OP_ZeroUint64: { |
32216 | if (!Zero<PT_Uint64>(S, OpPC)) |
32217 | return false; |
32218 | continue; |
32219 | } |
32220 | case OP_ZeroBool: { |
32221 | if (!Zero<PT_Bool>(S, OpPC)) |
32222 | return false; |
32223 | continue; |
32224 | } |
32225 | #endif |
32226 | #ifdef GET_DISASM |
32227 | case OP_ZeroSint8: |
32228 | PrintName("ZeroSint8" ); |
32229 | OS << "\t" << "\n" ; |
32230 | continue; |
32231 | case OP_ZeroUint8: |
32232 | PrintName("ZeroUint8" ); |
32233 | OS << "\t" << "\n" ; |
32234 | continue; |
32235 | case OP_ZeroSint16: |
32236 | PrintName("ZeroSint16" ); |
32237 | OS << "\t" << "\n" ; |
32238 | continue; |
32239 | case OP_ZeroUint16: |
32240 | PrintName("ZeroUint16" ); |
32241 | OS << "\t" << "\n" ; |
32242 | continue; |
32243 | case OP_ZeroSint32: |
32244 | PrintName("ZeroSint32" ); |
32245 | OS << "\t" << "\n" ; |
32246 | continue; |
32247 | case OP_ZeroUint32: |
32248 | PrintName("ZeroUint32" ); |
32249 | OS << "\t" << "\n" ; |
32250 | continue; |
32251 | case OP_ZeroSint64: |
32252 | PrintName("ZeroSint64" ); |
32253 | OS << "\t" << "\n" ; |
32254 | continue; |
32255 | case OP_ZeroUint64: |
32256 | PrintName("ZeroUint64" ); |
32257 | OS << "\t" << "\n" ; |
32258 | continue; |
32259 | case OP_ZeroBool: |
32260 | PrintName("ZeroBool" ); |
32261 | OS << "\t" << "\n" ; |
32262 | continue; |
32263 | #endif |
32264 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32265 | bool emitZeroSint8(const SourceInfo &); |
32266 | bool emitZeroUint8(const SourceInfo &); |
32267 | bool emitZeroSint16(const SourceInfo &); |
32268 | bool emitZeroUint16(const SourceInfo &); |
32269 | bool emitZeroSint32(const SourceInfo &); |
32270 | bool emitZeroUint32(const SourceInfo &); |
32271 | bool emitZeroSint64(const SourceInfo &); |
32272 | bool emitZeroUint64(const SourceInfo &); |
32273 | bool emitZeroBool(const SourceInfo &); |
32274 | #endif |
32275 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32276 | [[nodiscard]] bool emitZero(PrimType, const SourceInfo &I); |
32277 | #endif |
32278 | #if defined(GET_EVAL_IMPL) || defined(GET_LINK_IMPL) |
32279 | bool |
32280 | #if defined(GET_EVAL_IMPL) |
32281 | EvalEmitter |
32282 | #else |
32283 | ByteCodeEmitter |
32284 | #endif |
32285 | ::emitZero(PrimType T0, const SourceInfo &I) { |
32286 | switch (T0) { |
32287 | case PT_Sint8: |
32288 | return emitZeroSint8(I); |
32289 | case PT_Uint8: |
32290 | return emitZeroUint8(I); |
32291 | case PT_Sint16: |
32292 | return emitZeroSint16(I); |
32293 | case PT_Uint16: |
32294 | return emitZeroUint16(I); |
32295 | case PT_Sint32: |
32296 | return emitZeroSint32(I); |
32297 | case PT_Uint32: |
32298 | return emitZeroUint32(I); |
32299 | case PT_Sint64: |
32300 | return emitZeroSint64(I); |
32301 | case PT_Uint64: |
32302 | return emitZeroUint64(I); |
32303 | case PT_Bool: |
32304 | return emitZeroBool(I); |
32305 | default: llvm_unreachable("invalid type: emitZero" ); |
32306 | } |
32307 | llvm_unreachable("invalid enum value" ); |
32308 | } |
32309 | #endif |
32310 | #ifdef GET_LINK_IMPL |
32311 | bool ByteCodeEmitter::emitZeroSint8(const SourceInfo &L) { |
32312 | return emitOp<>(OP_ZeroSint8, L); |
32313 | } |
32314 | bool ByteCodeEmitter::emitZeroUint8(const SourceInfo &L) { |
32315 | return emitOp<>(OP_ZeroUint8, L); |
32316 | } |
32317 | bool ByteCodeEmitter::emitZeroSint16(const SourceInfo &L) { |
32318 | return emitOp<>(OP_ZeroSint16, L); |
32319 | } |
32320 | bool ByteCodeEmitter::emitZeroUint16(const SourceInfo &L) { |
32321 | return emitOp<>(OP_ZeroUint16, L); |
32322 | } |
32323 | bool ByteCodeEmitter::emitZeroSint32(const SourceInfo &L) { |
32324 | return emitOp<>(OP_ZeroSint32, L); |
32325 | } |
32326 | bool ByteCodeEmitter::emitZeroUint32(const SourceInfo &L) { |
32327 | return emitOp<>(OP_ZeroUint32, L); |
32328 | } |
32329 | bool ByteCodeEmitter::emitZeroSint64(const SourceInfo &L) { |
32330 | return emitOp<>(OP_ZeroSint64, L); |
32331 | } |
32332 | bool ByteCodeEmitter::emitZeroUint64(const SourceInfo &L) { |
32333 | return emitOp<>(OP_ZeroUint64, L); |
32334 | } |
32335 | bool ByteCodeEmitter::emitZeroBool(const SourceInfo &L) { |
32336 | return emitOp<>(OP_ZeroBool, L); |
32337 | } |
32338 | #endif |
32339 | #ifdef GET_EVAL_IMPL |
32340 | bool EvalEmitter::emitZeroSint8(const SourceInfo &L) { |
32341 | if (!isActive()) return true; |
32342 | CurrentSource = L; |
32343 | return Zero<PT_Sint8>(S, OpPC); |
32344 | } |
32345 | bool EvalEmitter::emitZeroUint8(const SourceInfo &L) { |
32346 | if (!isActive()) return true; |
32347 | CurrentSource = L; |
32348 | return Zero<PT_Uint8>(S, OpPC); |
32349 | } |
32350 | bool EvalEmitter::emitZeroSint16(const SourceInfo &L) { |
32351 | if (!isActive()) return true; |
32352 | CurrentSource = L; |
32353 | return Zero<PT_Sint16>(S, OpPC); |
32354 | } |
32355 | bool EvalEmitter::emitZeroUint16(const SourceInfo &L) { |
32356 | if (!isActive()) return true; |
32357 | CurrentSource = L; |
32358 | return Zero<PT_Uint16>(S, OpPC); |
32359 | } |
32360 | bool EvalEmitter::emitZeroSint32(const SourceInfo &L) { |
32361 | if (!isActive()) return true; |
32362 | CurrentSource = L; |
32363 | return Zero<PT_Sint32>(S, OpPC); |
32364 | } |
32365 | bool EvalEmitter::emitZeroUint32(const SourceInfo &L) { |
32366 | if (!isActive()) return true; |
32367 | CurrentSource = L; |
32368 | return Zero<PT_Uint32>(S, OpPC); |
32369 | } |
32370 | bool EvalEmitter::emitZeroSint64(const SourceInfo &L) { |
32371 | if (!isActive()) return true; |
32372 | CurrentSource = L; |
32373 | return Zero<PT_Sint64>(S, OpPC); |
32374 | } |
32375 | bool EvalEmitter::emitZeroUint64(const SourceInfo &L) { |
32376 | if (!isActive()) return true; |
32377 | CurrentSource = L; |
32378 | return Zero<PT_Uint64>(S, OpPC); |
32379 | } |
32380 | bool EvalEmitter::emitZeroBool(const SourceInfo &L) { |
32381 | if (!isActive()) return true; |
32382 | CurrentSource = L; |
32383 | return Zero<PT_Bool>(S, OpPC); |
32384 | } |
32385 | #endif |
32386 | #ifdef GET_OPCODE_NAMES |
32387 | OP_ZeroIntAP, |
32388 | #endif |
32389 | #ifdef GET_INTERP |
32390 | case OP_ZeroIntAP: { |
32391 | const auto V0 = ReadArg<uint32_t>(S, PC); |
32392 | if (!ZeroIntAP(S, OpPC, V0)) |
32393 | return false; |
32394 | continue; |
32395 | } |
32396 | #endif |
32397 | #ifdef GET_DISASM |
32398 | case OP_ZeroIntAP: |
32399 | PrintName("ZeroIntAP" ); |
32400 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
32401 | continue; |
32402 | #endif |
32403 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32404 | bool emitZeroIntAP( uint32_t , const SourceInfo &); |
32405 | #endif |
32406 | #ifdef GET_LINK_IMPL |
32407 | bool ByteCodeEmitter::emitZeroIntAP( uint32_t A0, const SourceInfo &L) { |
32408 | return emitOp<uint32_t>(OP_ZeroIntAP, A0, L); |
32409 | } |
32410 | #endif |
32411 | #ifdef GET_EVAL_IMPL |
32412 | bool EvalEmitter::emitZeroIntAP( uint32_t A0, const SourceInfo &L) { |
32413 | if (!isActive()) return true; |
32414 | CurrentSource = L; |
32415 | return ZeroIntAP(S, OpPC, A0); |
32416 | } |
32417 | #endif |
32418 | #ifdef GET_OPCODE_NAMES |
32419 | OP_ZeroIntAPS, |
32420 | #endif |
32421 | #ifdef GET_INTERP |
32422 | case OP_ZeroIntAPS: { |
32423 | const auto V0 = ReadArg<uint32_t>(S, PC); |
32424 | if (!ZeroIntAPS(S, OpPC, V0)) |
32425 | return false; |
32426 | continue; |
32427 | } |
32428 | #endif |
32429 | #ifdef GET_DISASM |
32430 | case OP_ZeroIntAPS: |
32431 | PrintName("ZeroIntAPS" ); |
32432 | OS << "\t" << ReadArg<uint32_t>(P, PC) << " " << "\n" ; |
32433 | continue; |
32434 | #endif |
32435 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32436 | bool emitZeroIntAPS( uint32_t , const SourceInfo &); |
32437 | #endif |
32438 | #ifdef GET_LINK_IMPL |
32439 | bool ByteCodeEmitter::emitZeroIntAPS( uint32_t A0, const SourceInfo &L) { |
32440 | return emitOp<uint32_t>(OP_ZeroIntAPS, A0, L); |
32441 | } |
32442 | #endif |
32443 | #ifdef GET_EVAL_IMPL |
32444 | bool EvalEmitter::emitZeroIntAPS( uint32_t A0, const SourceInfo &L) { |
32445 | if (!isActive()) return true; |
32446 | CurrentSource = L; |
32447 | return ZeroIntAPS(S, OpPC, A0); |
32448 | } |
32449 | #endif |
32450 | #ifdef GET_OPCODE_NAMES |
32451 | OP_ConstIntAP, |
32452 | #endif |
32453 | #ifdef GET_INTERP |
32454 | case OP_ConstIntAP: { |
32455 | const auto &V0 = ReadArg<IntegralAP<false>>(S, PC); |
32456 | if (!Const<PT_IntAP>(S, OpPC, V0)) |
32457 | return false; |
32458 | continue; |
32459 | } |
32460 | #endif |
32461 | #ifdef GET_DISASM |
32462 | case OP_ConstIntAP: |
32463 | PrintName("ConstIntAP" ); |
32464 | OS << "\t" << ReadArg<IntegralAP<false>>(P, PC) << " " << "\n" ; |
32465 | continue; |
32466 | #endif |
32467 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32468 | bool emitConstIntAP(const IntegralAP<false> &, const SourceInfo &); |
32469 | #endif |
32470 | #ifdef GET_LINK_IMPL |
32471 | bool ByteCodeEmitter::emitConstIntAP(const IntegralAP<false> &A0, const SourceInfo &L) { |
32472 | return emitOp<IntegralAP<false>>(OP_ConstIntAP, A0, L); |
32473 | } |
32474 | #endif |
32475 | #ifdef GET_EVAL_IMPL |
32476 | bool EvalEmitter::emitConstIntAP(const IntegralAP<false> &A0, const SourceInfo &L) { |
32477 | if (!isActive()) return true; |
32478 | CurrentSource = L; |
32479 | return Const<PT_IntAP>(S, OpPC, A0); |
32480 | } |
32481 | #endif |
32482 | #ifdef GET_OPCODE_NAMES |
32483 | OP_ConstIntAPS, |
32484 | #endif |
32485 | #ifdef GET_INTERP |
32486 | case OP_ConstIntAPS: { |
32487 | const auto &V0 = ReadArg<IntegralAP<true>>(S, PC); |
32488 | if (!Const<PT_IntAPS>(S, OpPC, V0)) |
32489 | return false; |
32490 | continue; |
32491 | } |
32492 | #endif |
32493 | #ifdef GET_DISASM |
32494 | case OP_ConstIntAPS: |
32495 | PrintName("ConstIntAPS" ); |
32496 | OS << "\t" << ReadArg<IntegralAP<true>>(P, PC) << " " << "\n" ; |
32497 | continue; |
32498 | #endif |
32499 | #if defined(GET_EVAL_PROTO) || defined(GET_LINK_PROTO) |
32500 | bool emitConstIntAPS(const IntegralAP<true> &, const SourceInfo &); |
32501 | #endif |
32502 | #ifdef GET_LINK_IMPL |
32503 | bool ByteCodeEmitter::emitConstIntAPS(const IntegralAP<true> &A0, const SourceInfo &L) { |
32504 | return emitOp<IntegralAP<true>>(OP_ConstIntAPS, A0, L); |
32505 | } |
32506 | #endif |
32507 | #ifdef GET_EVAL_IMPL |
32508 | bool EvalEmitter::emitConstIntAPS(const IntegralAP<true> &A0, const SourceInfo &L) { |
32509 | if (!isActive()) return true; |
32510 | CurrentSource = L; |
32511 | return Const<PT_IntAPS>(S, OpPC, A0); |
32512 | } |
32513 | #endif |
32514 | |