ifdef HAVE_INT128
[m6w6/ext-psi] / src / calc / cmp.h
1 /*******************************************************************************
2 Copyright (c) 2016, Michael Wallner <mike@php.net>.
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in the
12 documentation and/or other materials provided with the distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
18 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *******************************************************************************/
25
26 #include "php_psi_stdinc.h"
27 #include <assert.h>
28
29 #include "token.h"
30
31 static inline token_t psi_calc_cmp_eq(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res)
32 {
33 switch (t1) {
34 case PSI_T_INT8:
35 switch (t2) {
36 case PSI_T_INT8:
37 res->u8 = v1->i8 == v2->i8;
38 break;
39 case PSI_T_UINT8:
40 res->u8 = v1->i8 == v2->u8;
41 break;
42 case PSI_T_INT16:
43 res->u8 = v1->i8 == v2->i16;
44 break;
45 case PSI_T_UINT16:
46 res->u8 = v1->i8 == v2->u16;
47 break;
48 case PSI_T_INT32:
49 res->u8 = v1->i8 == v2->i32;
50 break;
51 case PSI_T_UINT32:
52 res->u8 = v1->i8 == v2->u32;
53 break;
54 case PSI_T_INT64:
55 res->u8 = v1->i8 == v2->i64;
56 break;
57 case PSI_T_UINT64:
58 res->u8 = v1->i8 == v2->u64;
59 break;
60 # if HAVE_INT128
61 case PSI_T_INT128:
62 res->u8 = v1->i8 == v2->i128;
63 break;
64 # endif
65
66 # if HAVE_UINT128
67 case PSI_T_UINT128:
68 res->u8 = v1->i8 == v2->u128;
69 break;
70 # endif
71
72 case PSI_T_FLOAT:
73 res->u8 = v1->i8 == v2->fval;
74 break;
75 case PSI_T_DOUBLE:
76 res->u8 = v1->i8 == v2->dval;
77 break;
78 # if HAVE_LONG_DOUBLE
79 case PSI_T_LONG_DOUBLE:
80 res->u8 = v1->i8 == v2->ldval;
81 break;
82 # endif
83
84 default:
85 assert(0);
86 break;
87 }
88 break;
89 case PSI_T_UINT8:
90 switch (t2) {
91 case PSI_T_INT8:
92 res->u8 = v1->u8 == v2->i8;
93 break;
94 case PSI_T_UINT8:
95 res->u8 = v1->u8 == v2->u8;
96 break;
97 case PSI_T_INT16:
98 res->u8 = v1->u8 == v2->i16;
99 break;
100 case PSI_T_UINT16:
101 res->u8 = v1->u8 == v2->u16;
102 break;
103 case PSI_T_INT32:
104 res->u8 = v1->u8 == v2->i32;
105 break;
106 case PSI_T_UINT32:
107 res->u8 = v1->u8 == v2->u32;
108 break;
109 case PSI_T_INT64:
110 res->u8 = v1->u8 == v2->i64;
111 break;
112 case PSI_T_UINT64:
113 res->u8 = v1->u8 == v2->u64;
114 break;
115 # if HAVE_INT128
116 case PSI_T_INT128:
117 res->u8 = v1->u8 == v2->i128;
118 break;
119 # endif
120
121 # if HAVE_UINT128
122 case PSI_T_UINT128:
123 res->u8 = v1->u8 == v2->u128;
124 break;
125 # endif
126
127 case PSI_T_FLOAT:
128 res->u8 = v1->u8 == v2->fval;
129 break;
130 case PSI_T_DOUBLE:
131 res->u8 = v1->u8 == v2->dval;
132 break;
133 # if HAVE_LONG_DOUBLE
134 case PSI_T_LONG_DOUBLE:
135 res->u8 = v1->u8 == v2->ldval;
136 break;
137 # endif
138
139 default:
140 assert(0);
141 break;
142 }
143 break;
144 case PSI_T_INT16:
145 switch (t2) {
146 case PSI_T_INT8:
147 res->u8 = v1->i16 == v2->i8;
148 break;
149 case PSI_T_UINT8:
150 res->u8 = v1->i16 == v2->u8;
151 break;
152 case PSI_T_INT16:
153 res->u8 = v1->i16 == v2->i16;
154 break;
155 case PSI_T_UINT16:
156 res->u8 = v1->i16 == v2->u16;
157 break;
158 case PSI_T_INT32:
159 res->u8 = v1->i16 == v2->i32;
160 break;
161 case PSI_T_UINT32:
162 res->u8 = v1->i16 == v2->u32;
163 break;
164 case PSI_T_INT64:
165 res->u8 = v1->i16 == v2->i64;
166 break;
167 case PSI_T_UINT64:
168 res->u8 = v1->i16 == v2->u64;
169 break;
170 # if HAVE_INT128
171 case PSI_T_INT128:
172 res->u8 = v1->i16 == v2->i128;
173 break;
174 # endif
175
176 # if HAVE_UINT128
177 case PSI_T_UINT128:
178 res->u8 = v1->i16 == v2->u128;
179 break;
180 # endif
181
182 case PSI_T_FLOAT:
183 res->u8 = v1->i16 == v2->fval;
184 break;
185 case PSI_T_DOUBLE:
186 res->u8 = v1->i16 == v2->dval;
187 break;
188 # if HAVE_LONG_DOUBLE
189 case PSI_T_LONG_DOUBLE:
190 res->u8 = v1->i16 == v2->ldval;
191 break;
192 # endif
193
194 default:
195 assert(0);
196 break;
197 }
198 break;
199 case PSI_T_UINT16:
200 switch (t2) {
201 case PSI_T_INT8:
202 res->u8 = v1->u16 == v2->i8;
203 break;
204 case PSI_T_UINT8:
205 res->u8 = v1->u16 == v2->u8;
206 break;
207 case PSI_T_INT16:
208 res->u8 = v1->u16 == v2->i16;
209 break;
210 case PSI_T_UINT16:
211 res->u8 = v1->u16 == v2->u16;
212 break;
213 case PSI_T_INT32:
214 res->u8 = v1->u16 == v2->i32;
215 break;
216 case PSI_T_UINT32:
217 res->u8 = v1->u16 == v2->u32;
218 break;
219 case PSI_T_INT64:
220 res->u8 = v1->u16 == v2->i64;
221 break;
222 case PSI_T_UINT64:
223 res->u8 = v1->u16 == v2->u64;
224 break;
225 # if HAVE_INT128
226 case PSI_T_INT128:
227 res->u8 = v1->u16 == v2->i128;
228 break;
229 # endif
230
231 # if HAVE_UINT128
232 case PSI_T_UINT128:
233 res->u8 = v1->u16 == v2->u128;
234 break;
235 # endif
236
237 case PSI_T_FLOAT:
238 res->u8 = v1->u16 == v2->fval;
239 break;
240 case PSI_T_DOUBLE:
241 res->u8 = v1->u16 == v2->dval;
242 break;
243 # if HAVE_LONG_DOUBLE
244 case PSI_T_LONG_DOUBLE:
245 res->u8 = v1->u16 == v2->ldval;
246 break;
247 # endif
248
249 default:
250 assert(0);
251 break;
252 }
253 break;
254 case PSI_T_INT32:
255 switch (t2) {
256 case PSI_T_INT8:
257 res->u8 = v1->i32 == v2->i8;
258 break;
259 case PSI_T_UINT8:
260 res->u8 = v1->i32 == v2->u8;
261 break;
262 case PSI_T_INT16:
263 res->u8 = v1->i32 == v2->i16;
264 break;
265 case PSI_T_UINT16:
266 res->u8 = v1->i32 == v2->u16;
267 break;
268 case PSI_T_INT32:
269 res->u8 = v1->i32 == v2->i32;
270 break;
271 case PSI_T_UINT32:
272 res->u8 = v1->i32 == v2->u32;
273 break;
274 case PSI_T_INT64:
275 res->u8 = v1->i32 == v2->i64;
276 break;
277 case PSI_T_UINT64:
278 res->u8 = v1->i32 == v2->u64;
279 break;
280 # if HAVE_INT128
281 case PSI_T_INT128:
282 res->u8 = v1->i32 == v2->i128;
283 break;
284 # endif
285
286 # if HAVE_UINT128
287 case PSI_T_UINT128:
288 res->u8 = v1->i32 == v2->u128;
289 break;
290 # endif
291
292 case PSI_T_FLOAT:
293 res->u8 = v1->i32 == v2->fval;
294 break;
295 case PSI_T_DOUBLE:
296 res->u8 = v1->i32 == v2->dval;
297 break;
298 # if HAVE_LONG_DOUBLE
299 case PSI_T_LONG_DOUBLE:
300 res->u8 = v1->i32 == v2->ldval;
301 break;
302 # endif
303
304 default:
305 assert(0);
306 break;
307 }
308 break;
309 case PSI_T_UINT32:
310 switch (t2) {
311 case PSI_T_INT8:
312 res->u8 = v1->u32 == v2->i8;
313 break;
314 case PSI_T_UINT8:
315 res->u8 = v1->u32 == v2->u8;
316 break;
317 case PSI_T_INT16:
318 res->u8 = v1->u32 == v2->i16;
319 break;
320 case PSI_T_UINT16:
321 res->u8 = v1->u32 == v2->u16;
322 break;
323 case PSI_T_INT32:
324 res->u8 = v1->u32 == v2->i32;
325 break;
326 case PSI_T_UINT32:
327 res->u8 = v1->u32 == v2->u32;
328 break;
329 case PSI_T_INT64:
330 res->u8 = v1->u32 == v2->i64;
331 break;
332 case PSI_T_UINT64:
333 res->u8 = v1->u32 == v2->u64;
334 break;
335 # if HAVE_INT128
336 case PSI_T_INT128:
337 res->u8 = v1->u32 == v2->i128;
338 break;
339 # endif
340
341 # if HAVE_UINT128
342 case PSI_T_UINT128:
343 res->u8 = v1->u32 == v2->u128;
344 break;
345 # endif
346
347 case PSI_T_FLOAT:
348 res->u8 = v1->u32 == v2->fval;
349 break;
350 case PSI_T_DOUBLE:
351 res->u8 = v1->u32 == v2->dval;
352 break;
353 # if HAVE_LONG_DOUBLE
354 case PSI_T_LONG_DOUBLE:
355 res->u8 = v1->u32 == v2->ldval;
356 break;
357 # endif
358
359 default:
360 assert(0);
361 break;
362 }
363 break;
364 case PSI_T_INT64:
365 switch (t2) {
366 case PSI_T_INT8:
367 res->u8 = v1->i64 == v2->i8;
368 break;
369 case PSI_T_UINT8:
370 res->u8 = v1->i64 == v2->u8;
371 break;
372 case PSI_T_INT16:
373 res->u8 = v1->i64 == v2->i16;
374 break;
375 case PSI_T_UINT16:
376 res->u8 = v1->i64 == v2->u16;
377 break;
378 case PSI_T_INT32:
379 res->u8 = v1->i64 == v2->i32;
380 break;
381 case PSI_T_UINT32:
382 res->u8 = v1->i64 == v2->u32;
383 break;
384 case PSI_T_INT64:
385 res->u8 = v1->i64 == v2->i64;
386 break;
387 case PSI_T_UINT64:
388 res->u8 = v1->i64 == v2->u64;
389 break;
390 # if HAVE_INT128
391 case PSI_T_INT128:
392 res->u8 = v1->i64 == v2->i128;
393 break;
394 # endif
395
396 # if HAVE_UINT128
397 case PSI_T_UINT128:
398 res->u8 = v1->i64 == v2->u128;
399 break;
400 # endif
401
402 case PSI_T_FLOAT:
403 res->u8 = v1->i64 == v2->fval;
404 break;
405 case PSI_T_DOUBLE:
406 res->u8 = v1->i64 == v2->dval;
407 break;
408 # if HAVE_LONG_DOUBLE
409 case PSI_T_LONG_DOUBLE:
410 res->u8 = v1->i64 == v2->ldval;
411 break;
412 # endif
413
414 default:
415 assert(0);
416 break;
417 }
418 break;
419 case PSI_T_UINT64:
420 switch (t2) {
421 case PSI_T_INT8:
422 res->u8 = v1->u64 == v2->i8;
423 break;
424 case PSI_T_UINT8:
425 res->u8 = v1->u64 == v2->u8;
426 break;
427 case PSI_T_INT16:
428 res->u8 = v1->u64 == v2->i16;
429 break;
430 case PSI_T_UINT16:
431 res->u8 = v1->u64 == v2->u16;
432 break;
433 case PSI_T_INT32:
434 res->u8 = v1->u64 == v2->i32;
435 break;
436 case PSI_T_UINT32:
437 res->u8 = v1->u64 == v2->u32;
438 break;
439 case PSI_T_INT64:
440 res->u8 = v1->u64 == v2->i64;
441 break;
442 case PSI_T_UINT64:
443 res->u8 = v1->u64 == v2->u64;
444 break;
445 # if HAVE_INT128
446 case PSI_T_INT128:
447 res->u8 = v1->u64 == v2->i128;
448 break;
449 # endif
450
451 # if HAVE_UINT128
452 case PSI_T_UINT128:
453 res->u8 = v1->u64 == v2->u128;
454 break;
455 # endif
456
457 case PSI_T_FLOAT:
458 res->u8 = v1->u64 == v2->fval;
459 break;
460 case PSI_T_DOUBLE:
461 res->u8 = v1->u64 == v2->dval;
462 break;
463 # if HAVE_LONG_DOUBLE
464 case PSI_T_LONG_DOUBLE:
465 res->u8 = v1->u64 == v2->ldval;
466 break;
467 # endif
468
469 default:
470 assert(0);
471 break;
472 }
473 break;
474 #if HAVE_INT128
475 case PSI_T_INT128:
476 switch (t2) {
477 case PSI_T_INT8:
478 res->u8 = v1->i128 == v2->i8;
479 break;
480 case PSI_T_UINT8:
481 res->u8 = v1->i128 == v2->u8;
482 break;
483 case PSI_T_INT16:
484 res->u8 = v1->i128 == v2->i16;
485 break;
486 case PSI_T_UINT16:
487 res->u8 = v1->i128 == v2->u16;
488 break;
489 case PSI_T_INT32:
490 res->u8 = v1->i128 == v2->i32;
491 break;
492 case PSI_T_UINT32:
493 res->u8 = v1->i128 == v2->u32;
494 break;
495 case PSI_T_INT64:
496 res->u8 = v1->i128 == v2->i64;
497 break;
498 case PSI_T_UINT64:
499 res->u8 = v1->i128 == v2->u64;
500 break;
501 # if HAVE_INT128
502 case PSI_T_INT128:
503 res->u8 = v1->i128 == v2->i128;
504 break;
505 # endif
506
507 # if HAVE_UINT128
508 case PSI_T_UINT128:
509 res->u8 = v1->i128 == v2->u128;
510 break;
511 # endif
512
513 case PSI_T_FLOAT:
514 res->u8 = v1->i128 == v2->fval;
515 break;
516 case PSI_T_DOUBLE:
517 res->u8 = v1->i128 == v2->dval;
518 break;
519 # if HAVE_LONG_DOUBLE
520 case PSI_T_LONG_DOUBLE:
521 res->u8 = v1->i128 == v2->ldval;
522 break;
523 # endif
524
525 default:
526 assert(0);
527 break;
528 }
529 break;
530 #endif
531
532 #if HAVE_UINT128
533 case PSI_T_UINT128:
534 switch (t2) {
535 case PSI_T_INT8:
536 res->u8 = v1->u128 == v2->i8;
537 break;
538 case PSI_T_UINT8:
539 res->u8 = v1->u128 == v2->u8;
540 break;
541 case PSI_T_INT16:
542 res->u8 = v1->u128 == v2->i16;
543 break;
544 case PSI_T_UINT16:
545 res->u8 = v1->u128 == v2->u16;
546 break;
547 case PSI_T_INT32:
548 res->u8 = v1->u128 == v2->i32;
549 break;
550 case PSI_T_UINT32:
551 res->u8 = v1->u128 == v2->u32;
552 break;
553 case PSI_T_INT64:
554 res->u8 = v1->u128 == v2->i64;
555 break;
556 case PSI_T_UINT64:
557 res->u8 = v1->u128 == v2->u64;
558 break;
559 # if HAVE_INT128
560 case PSI_T_INT128:
561 res->u8 = v1->u128 == v2->i128;
562 break;
563 # endif
564
565 # if HAVE_UINT128
566 case PSI_T_UINT128:
567 res->u8 = v1->u128 == v2->u128;
568 break;
569 # endif
570
571 case PSI_T_FLOAT:
572 res->u8 = v1->u128 == v2->fval;
573 break;
574 case PSI_T_DOUBLE:
575 res->u8 = v1->u128 == v2->dval;
576 break;
577 # if HAVE_LONG_DOUBLE
578 case PSI_T_LONG_DOUBLE:
579 res->u8 = v1->u128 == v2->ldval;
580 break;
581 # endif
582
583 default:
584 assert(0);
585 break;
586 }
587 break;
588 #endif
589
590 case PSI_T_FLOAT:
591 switch (t2) {
592 case PSI_T_INT8:
593 res->u8 = v1->fval == v2->i8;
594 break;
595 case PSI_T_UINT8:
596 res->u8 = v1->fval == v2->u8;
597 break;
598 case PSI_T_INT16:
599 res->u8 = v1->fval == v2->i16;
600 break;
601 case PSI_T_UINT16:
602 res->u8 = v1->fval == v2->u16;
603 break;
604 case PSI_T_INT32:
605 res->u8 = v1->fval == v2->i32;
606 break;
607 case PSI_T_UINT32:
608 res->u8 = v1->fval == v2->u32;
609 break;
610 case PSI_T_INT64:
611 res->u8 = v1->fval == v2->i64;
612 break;
613 case PSI_T_UINT64:
614 res->u8 = v1->fval == v2->u64;
615 break;
616 # if HAVE_INT128
617 case PSI_T_INT128:
618 res->u8 = v1->fval == v2->i128;
619 break;
620 # endif
621
622 # if HAVE_UINT128
623 case PSI_T_UINT128:
624 res->u8 = v1->fval == v2->u128;
625 break;
626 # endif
627
628 case PSI_T_FLOAT:
629 res->u8 = v1->fval == v2->fval;
630 break;
631 case PSI_T_DOUBLE:
632 res->u8 = v1->fval == v2->dval;
633 break;
634 # if HAVE_LONG_DOUBLE
635 case PSI_T_LONG_DOUBLE:
636 res->u8 = v1->fval == v2->ldval;
637 break;
638 # endif
639
640 default:
641 assert(0);
642 break;
643 }
644 break;
645 case PSI_T_DOUBLE:
646 switch (t2) {
647 case PSI_T_INT8:
648 res->u8 = v1->dval == v2->i8;
649 break;
650 case PSI_T_UINT8:
651 res->u8 = v1->dval == v2->u8;
652 break;
653 case PSI_T_INT16:
654 res->u8 = v1->dval == v2->i16;
655 break;
656 case PSI_T_UINT16:
657 res->u8 = v1->dval == v2->u16;
658 break;
659 case PSI_T_INT32:
660 res->u8 = v1->dval == v2->i32;
661 break;
662 case PSI_T_UINT32:
663 res->u8 = v1->dval == v2->u32;
664 break;
665 case PSI_T_INT64:
666 res->u8 = v1->dval == v2->i64;
667 break;
668 case PSI_T_UINT64:
669 res->u8 = v1->dval == v2->u64;
670 break;
671 # if HAVE_INT128
672 case PSI_T_INT128:
673 res->u8 = v1->dval == v2->i128;
674 break;
675 # endif
676
677 # if HAVE_UINT128
678 case PSI_T_UINT128:
679 res->u8 = v1->dval == v2->u128;
680 break;
681 # endif
682
683 case PSI_T_FLOAT:
684 res->u8 = v1->dval == v2->fval;
685 break;
686 case PSI_T_DOUBLE:
687 res->u8 = v1->dval == v2->dval;
688 break;
689 # if HAVE_LONG_DOUBLE
690 case PSI_T_LONG_DOUBLE:
691 res->u8 = v1->dval == v2->ldval;
692 break;
693 # endif
694
695 default:
696 assert(0);
697 break;
698 }
699 break;
700 #if HAVE_LONG_DOUBLE
701 case PSI_T_LONG_DOUBLE:
702 switch (t2) {
703 case PSI_T_INT8:
704 res->u8 = v1->ldval == v2->i8;
705 break;
706 case PSI_T_UINT8:
707 res->u8 = v1->ldval == v2->u8;
708 break;
709 case PSI_T_INT16:
710 res->u8 = v1->ldval == v2->i16;
711 break;
712 case PSI_T_UINT16:
713 res->u8 = v1->ldval == v2->u16;
714 break;
715 case PSI_T_INT32:
716 res->u8 = v1->ldval == v2->i32;
717 break;
718 case PSI_T_UINT32:
719 res->u8 = v1->ldval == v2->u32;
720 break;
721 case PSI_T_INT64:
722 res->u8 = v1->ldval == v2->i64;
723 break;
724 case PSI_T_UINT64:
725 res->u8 = v1->ldval == v2->u64;
726 break;
727 # if HAVE_INT128
728 case PSI_T_INT128:
729 res->u8 = v1->ldval == v2->i128;
730 break;
731 # endif
732
733 # if HAVE_UINT128
734 case PSI_T_UINT128:
735 res->u8 = v1->ldval == v2->u128;
736 break;
737 # endif
738
739 case PSI_T_FLOAT:
740 res->u8 = v1->ldval == v2->fval;
741 break;
742 case PSI_T_DOUBLE:
743 res->u8 = v1->ldval == v2->dval;
744 break;
745 # if HAVE_LONG_DOUBLE
746 case PSI_T_LONG_DOUBLE:
747 res->u8 = v1->ldval == v2->ldval;
748 break;
749 # endif
750
751 default:
752 assert(0);
753 break;
754 }
755 break;
756 #endif
757
758 default:
759 assert(0);
760 break;
761 }
762 return PSI_T_UINT8;
763 }
764
765 static inline token_t psi_calc_cmp_ne(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res)
766 {
767 switch (t1) {
768 case PSI_T_INT8:
769 switch (t2) {
770 case PSI_T_INT8:
771 res->u8 = v1->i8 != v2->i8;
772 break;
773 case PSI_T_UINT8:
774 res->u8 = v1->i8 != v2->u8;
775 break;
776 case PSI_T_INT16:
777 res->u8 = v1->i8 != v2->i16;
778 break;
779 case PSI_T_UINT16:
780 res->u8 = v1->i8 != v2->u16;
781 break;
782 case PSI_T_INT32:
783 res->u8 = v1->i8 != v2->i32;
784 break;
785 case PSI_T_UINT32:
786 res->u8 = v1->i8 != v2->u32;
787 break;
788 case PSI_T_INT64:
789 res->u8 = v1->i8 != v2->i64;
790 break;
791 case PSI_T_UINT64:
792 res->u8 = v1->i8 != v2->u64;
793 break;
794 # if HAVE_INT128
795 case PSI_T_INT128:
796 res->u8 = v1->i8 != v2->i128;
797 break;
798 # endif
799
800 # if HAVE_UINT128
801 case PSI_T_UINT128:
802 res->u8 = v1->i8 != v2->u128;
803 break;
804 # endif
805
806 case PSI_T_FLOAT:
807 res->u8 = v1->i8 != v2->fval;
808 break;
809 case PSI_T_DOUBLE:
810 res->u8 = v1->i8 != v2->dval;
811 break;
812 # if HAVE_LONG_DOUBLE
813 case PSI_T_LONG_DOUBLE:
814 res->u8 = v1->i8 != v2->ldval;
815 break;
816 # endif
817
818 default:
819 assert(0);
820 break;
821 }
822 break;
823 case PSI_T_UINT8:
824 switch (t2) {
825 case PSI_T_INT8:
826 res->u8 = v1->u8 != v2->i8;
827 break;
828 case PSI_T_UINT8:
829 res->u8 = v1->u8 != v2->u8;
830 break;
831 case PSI_T_INT16:
832 res->u8 = v1->u8 != v2->i16;
833 break;
834 case PSI_T_UINT16:
835 res->u8 = v1->u8 != v2->u16;
836 break;
837 case PSI_T_INT32:
838 res->u8 = v1->u8 != v2->i32;
839 break;
840 case PSI_T_UINT32:
841 res->u8 = v1->u8 != v2->u32;
842 break;
843 case PSI_T_INT64:
844 res->u8 = v1->u8 != v2->i64;
845 break;
846 case PSI_T_UINT64:
847 res->u8 = v1->u8 != v2->u64;
848 break;
849 # if HAVE_INT128
850 case PSI_T_INT128:
851 res->u8 = v1->u8 != v2->i128;
852 break;
853 # endif
854
855 # if HAVE_UINT128
856 case PSI_T_UINT128:
857 res->u8 = v1->u8 != v2->u128;
858 break;
859 # endif
860
861 case PSI_T_FLOAT:
862 res->u8 = v1->u8 != v2->fval;
863 break;
864 case PSI_T_DOUBLE:
865 res->u8 = v1->u8 != v2->dval;
866 break;
867 # if HAVE_LONG_DOUBLE
868 case PSI_T_LONG_DOUBLE:
869 res->u8 = v1->u8 != v2->ldval;
870 break;
871 # endif
872
873 default:
874 assert(0);
875 break;
876 }
877 break;
878 case PSI_T_INT16:
879 switch (t2) {
880 case PSI_T_INT8:
881 res->u8 = v1->i16 != v2->i8;
882 break;
883 case PSI_T_UINT8:
884 res->u8 = v1->i16 != v2->u8;
885 break;
886 case PSI_T_INT16:
887 res->u8 = v1->i16 != v2->i16;
888 break;
889 case PSI_T_UINT16:
890 res->u8 = v1->i16 != v2->u16;
891 break;
892 case PSI_T_INT32:
893 res->u8 = v1->i16 != v2->i32;
894 break;
895 case PSI_T_UINT32:
896 res->u8 = v1->i16 != v2->u32;
897 break;
898 case PSI_T_INT64:
899 res->u8 = v1->i16 != v2->i64;
900 break;
901 case PSI_T_UINT64:
902 res->u8 = v1->i16 != v2->u64;
903 break;
904 # if HAVE_INT128
905 case PSI_T_INT128:
906 res->u8 = v1->i16 != v2->i128;
907 break;
908 # endif
909
910 # if HAVE_UINT128
911 case PSI_T_UINT128:
912 res->u8 = v1->i16 != v2->u128;
913 break;
914 # endif
915
916 case PSI_T_FLOAT:
917 res->u8 = v1->i16 != v2->fval;
918 break;
919 case PSI_T_DOUBLE:
920 res->u8 = v1->i16 != v2->dval;
921 break;
922 # if HAVE_LONG_DOUBLE
923 case PSI_T_LONG_DOUBLE:
924 res->u8 = v1->i16 != v2->ldval;
925 break;
926 # endif
927
928 default:
929 assert(0);
930 break;
931 }
932 break;
933 case PSI_T_UINT16:
934 switch (t2) {
935 case PSI_T_INT8:
936 res->u8 = v1->u16 != v2->i8;
937 break;
938 case PSI_T_UINT8:
939 res->u8 = v1->u16 != v2->u8;
940 break;
941 case PSI_T_INT16:
942 res->u8 = v1->u16 != v2->i16;
943 break;
944 case PSI_T_UINT16:
945 res->u8 = v1->u16 != v2->u16;
946 break;
947 case PSI_T_INT32:
948 res->u8 = v1->u16 != v2->i32;
949 break;
950 case PSI_T_UINT32:
951 res->u8 = v1->u16 != v2->u32;
952 break;
953 case PSI_T_INT64:
954 res->u8 = v1->u16 != v2->i64;
955 break;
956 case PSI_T_UINT64:
957 res->u8 = v1->u16 != v2->u64;
958 break;
959 # if HAVE_INT128
960 case PSI_T_INT128:
961 res->u8 = v1->u16 != v2->i128;
962 break;
963 # endif
964
965 # if HAVE_UINT128
966 case PSI_T_UINT128:
967 res->u8 = v1->u16 != v2->u128;
968 break;
969 # endif
970
971 case PSI_T_FLOAT:
972 res->u8 = v1->u16 != v2->fval;
973 break;
974 case PSI_T_DOUBLE:
975 res->u8 = v1->u16 != v2->dval;
976 break;
977 # if HAVE_LONG_DOUBLE
978 case PSI_T_LONG_DOUBLE:
979 res->u8 = v1->u16 != v2->ldval;
980 break;
981 # endif
982
983 default:
984 assert(0);
985 break;
986 }
987 break;
988 case PSI_T_INT32:
989 switch (t2) {
990 case PSI_T_INT8:
991 res->u8 = v1->i32 != v2->i8;
992 break;
993 case PSI_T_UINT8:
994 res->u8 = v1->i32 != v2->u8;
995 break;
996 case PSI_T_INT16:
997 res->u8 = v1->i32 != v2->i16;
998 break;
999 case PSI_T_UINT16:
1000 res->u8 = v1->i32 != v2->u16;
1001 break;
1002 case PSI_T_INT32:
1003 res->u8 = v1->i32 != v2->i32;
1004 break;
1005 case PSI_T_UINT32:
1006 res->u8 = v1->i32 != v2->u32;
1007 break;
1008 case PSI_T_INT64:
1009 res->u8 = v1->i32 != v2->i64;
1010 break;
1011 case PSI_T_UINT64:
1012 res->u8 = v1->i32 != v2->u64;
1013 break;
1014 # if HAVE_INT128
1015 case PSI_T_INT128:
1016 res->u8 = v1->i32 != v2->i128;
1017 break;
1018 # endif
1019
1020 # if HAVE_UINT128
1021 case PSI_T_UINT128:
1022 res->u8 = v1->i32 != v2->u128;
1023 break;
1024 # endif
1025
1026 case PSI_T_FLOAT:
1027 res->u8 = v1->i32 != v2->fval;
1028 break;
1029 case PSI_T_DOUBLE:
1030 res->u8 = v1->i32 != v2->dval;
1031 break;
1032 # if HAVE_LONG_DOUBLE
1033 case PSI_T_LONG_DOUBLE:
1034 res->u8 = v1->i32 != v2->ldval;
1035 break;
1036 # endif
1037
1038 default:
1039 assert(0);
1040 break;
1041 }
1042 break;
1043 case PSI_T_UINT32:
1044 switch (t2) {
1045 case PSI_T_INT8:
1046 res->u8 = v1->u32 != v2->i8;
1047 break;
1048 case PSI_T_UINT8:
1049 res->u8 = v1->u32 != v2->u8;
1050 break;
1051 case PSI_T_INT16:
1052 res->u8 = v1->u32 != v2->i16;
1053 break;
1054 case PSI_T_UINT16:
1055 res->u8 = v1->u32 != v2->u16;
1056 break;
1057 case PSI_T_INT32:
1058 res->u8 = v1->u32 != v2->i32;
1059 break;
1060 case PSI_T_UINT32:
1061 res->u8 = v1->u32 != v2->u32;
1062 break;
1063 case PSI_T_INT64:
1064 res->u8 = v1->u32 != v2->i64;
1065 break;
1066 case PSI_T_UINT64:
1067 res->u8 = v1->u32 != v2->u64;
1068 break;
1069 # if HAVE_INT128
1070 case PSI_T_INT128:
1071 res->u8 = v1->u32 != v2->i128;
1072 break;
1073 # endif
1074
1075 # if HAVE_UINT128
1076 case PSI_T_UINT128:
1077 res->u8 = v1->u32 != v2->u128;
1078 break;
1079 # endif
1080
1081 case PSI_T_FLOAT:
1082 res->u8 = v1->u32 != v2->fval;
1083 break;
1084 case PSI_T_DOUBLE:
1085 res->u8 = v1->u32 != v2->dval;
1086 break;
1087 # if HAVE_LONG_DOUBLE
1088 case PSI_T_LONG_DOUBLE:
1089 res->u8 = v1->u32 != v2->ldval;
1090 break;
1091 # endif
1092
1093 default:
1094 assert(0);
1095 break;
1096 }
1097 break;
1098 case PSI_T_INT64:
1099 switch (t2) {
1100 case PSI_T_INT8:
1101 res->u8 = v1->i64 != v2->i8;
1102 break;
1103 case PSI_T_UINT8:
1104 res->u8 = v1->i64 != v2->u8;
1105 break;
1106 case PSI_T_INT16:
1107 res->u8 = v1->i64 != v2->i16;
1108 break;
1109 case PSI_T_UINT16:
1110 res->u8 = v1->i64 != v2->u16;
1111 break;
1112 case PSI_T_INT32:
1113 res->u8 = v1->i64 != v2->i32;
1114 break;
1115 case PSI_T_UINT32:
1116 res->u8 = v1->i64 != v2->u32;
1117 break;
1118 case PSI_T_INT64:
1119 res->u8 = v1->i64 != v2->i64;
1120 break;
1121 case PSI_T_UINT64:
1122 res->u8 = v1->i64 != v2->u64;
1123 break;
1124 # if HAVE_INT128
1125 case PSI_T_INT128:
1126 res->u8 = v1->i64 != v2->i128;
1127 break;
1128 # endif
1129
1130 # if HAVE_UINT128
1131 case PSI_T_UINT128:
1132 res->u8 = v1->i64 != v2->u128;
1133 break;
1134 # endif
1135
1136 case PSI_T_FLOAT:
1137 res->u8 = v1->i64 != v2->fval;
1138 break;
1139 case PSI_T_DOUBLE:
1140 res->u8 = v1->i64 != v2->dval;
1141 break;
1142 # if HAVE_LONG_DOUBLE
1143 case PSI_T_LONG_DOUBLE:
1144 res->u8 = v1->i64 != v2->ldval;
1145 break;
1146 # endif
1147
1148 default:
1149 assert(0);
1150 break;
1151 }
1152 break;
1153 case PSI_T_UINT64:
1154 switch (t2) {
1155 case PSI_T_INT8:
1156 res->u8 = v1->u64 != v2->i8;
1157 break;
1158 case PSI_T_UINT8:
1159 res->u8 = v1->u64 != v2->u8;
1160 break;
1161 case PSI_T_INT16:
1162 res->u8 = v1->u64 != v2->i16;
1163 break;
1164 case PSI_T_UINT16:
1165 res->u8 = v1->u64 != v2->u16;
1166 break;
1167 case PSI_T_INT32:
1168 res->u8 = v1->u64 != v2->i32;
1169 break;
1170 case PSI_T_UINT32:
1171 res->u8 = v1->u64 != v2->u32;
1172 break;
1173 case PSI_T_INT64:
1174 res->u8 = v1->u64 != v2->i64;
1175 break;
1176 case PSI_T_UINT64:
1177 res->u8 = v1->u64 != v2->u64;
1178 break;
1179 # if HAVE_INT128
1180 case PSI_T_INT128:
1181 res->u8 = v1->u64 != v2->i128;
1182 break;
1183 # endif
1184
1185 # if HAVE_UINT128
1186 case PSI_T_UINT128:
1187 res->u8 = v1->u64 != v2->u128;
1188 break;
1189 # endif
1190
1191 case PSI_T_FLOAT:
1192 res->u8 = v1->u64 != v2->fval;
1193 break;
1194 case PSI_T_DOUBLE:
1195 res->u8 = v1->u64 != v2->dval;
1196 break;
1197 # if HAVE_LONG_DOUBLE
1198 case PSI_T_LONG_DOUBLE:
1199 res->u8 = v1->u64 != v2->ldval;
1200 break;
1201 # endif
1202
1203 default:
1204 assert(0);
1205 break;
1206 }
1207 break;
1208 #if HAVE_INT128
1209 case PSI_T_INT128:
1210 switch (t2) {
1211 case PSI_T_INT8:
1212 res->u8 = v1->i128 != v2->i8;
1213 break;
1214 case PSI_T_UINT8:
1215 res->u8 = v1->i128 != v2->u8;
1216 break;
1217 case PSI_T_INT16:
1218 res->u8 = v1->i128 != v2->i16;
1219 break;
1220 case PSI_T_UINT16:
1221 res->u8 = v1->i128 != v2->u16;
1222 break;
1223 case PSI_T_INT32:
1224 res->u8 = v1->i128 != v2->i32;
1225 break;
1226 case PSI_T_UINT32:
1227 res->u8 = v1->i128 != v2->u32;
1228 break;
1229 case PSI_T_INT64:
1230 res->u8 = v1->i128 != v2->i64;
1231 break;
1232 case PSI_T_UINT64:
1233 res->u8 = v1->i128 != v2->u64;
1234 break;
1235 # if HAVE_INT128
1236 case PSI_T_INT128:
1237 res->u8 = v1->i128 != v2->i128;
1238 break;
1239 # endif
1240
1241 # if HAVE_UINT128
1242 case PSI_T_UINT128:
1243 res->u8 = v1->i128 != v2->u128;
1244 break;
1245 # endif
1246
1247 case PSI_T_FLOAT:
1248 res->u8 = v1->i128 != v2->fval;
1249 break;
1250 case PSI_T_DOUBLE:
1251 res->u8 = v1->i128 != v2->dval;
1252 break;
1253 # if HAVE_LONG_DOUBLE
1254 case PSI_T_LONG_DOUBLE:
1255 res->u8 = v1->i128 != v2->ldval;
1256 break;
1257 # endif
1258
1259 default:
1260 assert(0);
1261 break;
1262 }
1263 break;
1264 #endif
1265
1266 #if HAVE_UINT128
1267 case PSI_T_UINT128:
1268 switch (t2) {
1269 case PSI_T_INT8:
1270 res->u8 = v1->u128 != v2->i8;
1271 break;
1272 case PSI_T_UINT8:
1273 res->u8 = v1->u128 != v2->u8;
1274 break;
1275 case PSI_T_INT16:
1276 res->u8 = v1->u128 != v2->i16;
1277 break;
1278 case PSI_T_UINT16:
1279 res->u8 = v1->u128 != v2->u16;
1280 break;
1281 case PSI_T_INT32:
1282 res->u8 = v1->u128 != v2->i32;
1283 break;
1284 case PSI_T_UINT32:
1285 res->u8 = v1->u128 != v2->u32;
1286 break;
1287 case PSI_T_INT64:
1288 res->u8 = v1->u128 != v2->i64;
1289 break;
1290 case PSI_T_UINT64:
1291 res->u8 = v1->u128 != v2->u64;
1292 break;
1293 # if HAVE_INT128
1294 case PSI_T_INT128:
1295 res->u8 = v1->u128 != v2->i128;
1296 break;
1297 # endif
1298
1299 # if HAVE_UINT128
1300 case PSI_T_UINT128:
1301 res->u8 = v1->u128 != v2->u128;
1302 break;
1303 # endif
1304
1305 case PSI_T_FLOAT:
1306 res->u8 = v1->u128 != v2->fval;
1307 break;
1308 case PSI_T_DOUBLE:
1309 res->u8 = v1->u128 != v2->dval;
1310 break;
1311 # if HAVE_LONG_DOUBLE
1312 case PSI_T_LONG_DOUBLE:
1313 res->u8 = v1->u128 != v2->ldval;
1314 break;
1315 # endif
1316
1317 default:
1318 assert(0);
1319 break;
1320 }
1321 break;
1322 #endif
1323
1324 case PSI_T_FLOAT:
1325 switch (t2) {
1326 case PSI_T_INT8:
1327 res->u8 = v1->fval != v2->i8;
1328 break;
1329 case PSI_T_UINT8:
1330 res->u8 = v1->fval != v2->u8;
1331 break;
1332 case PSI_T_INT16:
1333 res->u8 = v1->fval != v2->i16;
1334 break;
1335 case PSI_T_UINT16:
1336 res->u8 = v1->fval != v2->u16;
1337 break;
1338 case PSI_T_INT32:
1339 res->u8 = v1->fval != v2->i32;
1340 break;
1341 case PSI_T_UINT32:
1342 res->u8 = v1->fval != v2->u32;
1343 break;
1344 case PSI_T_INT64:
1345 res->u8 = v1->fval != v2->i64;
1346 break;
1347 case PSI_T_UINT64:
1348 res->u8 = v1->fval != v2->u64;
1349 break;
1350 # if HAVE_INT128
1351 case PSI_T_INT128:
1352 res->u8 = v1->fval != v2->i128;
1353 break;
1354 # endif
1355
1356 # if HAVE_UINT128
1357 case PSI_T_UINT128:
1358 res->u8 = v1->fval != v2->u128;
1359 break;
1360 # endif
1361
1362 case PSI_T_FLOAT:
1363 res->u8 = v1->fval != v2->fval;
1364 break;
1365 case PSI_T_DOUBLE:
1366 res->u8 = v1->fval != v2->dval;
1367 break;
1368 # if HAVE_LONG_DOUBLE
1369 case PSI_T_LONG_DOUBLE:
1370 res->u8 = v1->fval != v2->ldval;
1371 break;
1372 # endif
1373
1374 default:
1375 assert(0);
1376 break;
1377 }
1378 break;
1379 case PSI_T_DOUBLE:
1380 switch (t2) {
1381 case PSI_T_INT8:
1382 res->u8 = v1->dval != v2->i8;
1383 break;
1384 case PSI_T_UINT8:
1385 res->u8 = v1->dval != v2->u8;
1386 break;
1387 case PSI_T_INT16:
1388 res->u8 = v1->dval != v2->i16;
1389 break;
1390 case PSI_T_UINT16:
1391 res->u8 = v1->dval != v2->u16;
1392 break;
1393 case PSI_T_INT32:
1394 res->u8 = v1->dval != v2->i32;
1395 break;
1396 case PSI_T_UINT32:
1397 res->u8 = v1->dval != v2->u32;
1398 break;
1399 case PSI_T_INT64:
1400 res->u8 = v1->dval != v2->i64;
1401 break;
1402 case PSI_T_UINT64:
1403 res->u8 = v1->dval != v2->u64;
1404 break;
1405 # if HAVE_INT128
1406 case PSI_T_INT128:
1407 res->u8 = v1->dval != v2->i128;
1408 break;
1409 # endif
1410
1411 # if HAVE_UINT128
1412 case PSI_T_UINT128:
1413 res->u8 = v1->dval != v2->u128;
1414 break;
1415 # endif
1416
1417 case PSI_T_FLOAT:
1418 res->u8 = v1->dval != v2->fval;
1419 break;
1420 case PSI_T_DOUBLE:
1421 res->u8 = v1->dval != v2->dval;
1422 break;
1423 # if HAVE_LONG_DOUBLE
1424 case PSI_T_LONG_DOUBLE:
1425 res->u8 = v1->dval != v2->ldval;
1426 break;
1427 # endif
1428
1429 default:
1430 assert(0);
1431 break;
1432 }
1433 break;
1434 #if HAVE_LONG_DOUBLE
1435 case PSI_T_LONG_DOUBLE:
1436 switch (t2) {
1437 case PSI_T_INT8:
1438 res->u8 = v1->ldval != v2->i8;
1439 break;
1440 case PSI_T_UINT8:
1441 res->u8 = v1->ldval != v2->u8;
1442 break;
1443 case PSI_T_INT16:
1444 res->u8 = v1->ldval != v2->i16;
1445 break;
1446 case PSI_T_UINT16:
1447 res->u8 = v1->ldval != v2->u16;
1448 break;
1449 case PSI_T_INT32:
1450 res->u8 = v1->ldval != v2->i32;
1451 break;
1452 case PSI_T_UINT32:
1453 res->u8 = v1->ldval != v2->u32;
1454 break;
1455 case PSI_T_INT64:
1456 res->u8 = v1->ldval != v2->i64;
1457 break;
1458 case PSI_T_UINT64:
1459 res->u8 = v1->ldval != v2->u64;
1460 break;
1461 # if HAVE_INT128
1462 case PSI_T_INT128:
1463 res->u8 = v1->ldval != v2->i128;
1464 break;
1465 # endif
1466
1467 # if HAVE_UINT128
1468 case PSI_T_UINT128:
1469 res->u8 = v1->ldval != v2->u128;
1470 break;
1471 # endif
1472
1473 case PSI_T_FLOAT:
1474 res->u8 = v1->ldval != v2->fval;
1475 break;
1476 case PSI_T_DOUBLE:
1477 res->u8 = v1->ldval != v2->dval;
1478 break;
1479 # if HAVE_LONG_DOUBLE
1480 case PSI_T_LONG_DOUBLE:
1481 res->u8 = v1->ldval != v2->ldval;
1482 break;
1483 # endif
1484
1485 default:
1486 assert(0);
1487 break;
1488 }
1489 break;
1490 #endif
1491
1492 default:
1493 assert(0);
1494 break;
1495 }
1496 return PSI_T_UINT8;
1497 }
1498
1499 static inline token_t psi_calc_cmp_lt(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res)
1500 {
1501 switch (t1) {
1502 case PSI_T_INT8:
1503 switch (t2) {
1504 case PSI_T_INT8:
1505 res->u8 = v1->i8 < v2->i8;
1506 break;
1507 case PSI_T_UINT8:
1508 res->u8 = v1->i8 < v2->u8;
1509 break;
1510 case PSI_T_INT16:
1511 res->u8 = v1->i8 < v2->i16;
1512 break;
1513 case PSI_T_UINT16:
1514 res->u8 = v1->i8 < v2->u16;
1515 break;
1516 case PSI_T_INT32:
1517 res->u8 = v1->i8 < v2->i32;
1518 break;
1519 case PSI_T_UINT32:
1520 res->u8 = v1->i8 < v2->u32;
1521 break;
1522 case PSI_T_INT64:
1523 res->u8 = v1->i8 < v2->i64;
1524 break;
1525 case PSI_T_UINT64:
1526 res->u8 = v1->i8 < v2->u64;
1527 break;
1528 # if HAVE_INT128
1529 case PSI_T_INT128:
1530 res->u8 = v1->i8 < v2->i128;
1531 break;
1532 # endif
1533
1534 # if HAVE_UINT128
1535 case PSI_T_UINT128:
1536 res->u8 = v1->i8 < v2->u128;
1537 break;
1538 # endif
1539
1540 case PSI_T_FLOAT:
1541 res->u8 = v1->i8 < v2->fval;
1542 break;
1543 case PSI_T_DOUBLE:
1544 res->u8 = v1->i8 < v2->dval;
1545 break;
1546 # if HAVE_LONG_DOUBLE
1547 case PSI_T_LONG_DOUBLE:
1548 res->u8 = v1->i8 < v2->ldval;
1549 break;
1550 # endif
1551
1552 default:
1553 assert(0);
1554 break;
1555 }
1556 break;
1557 case PSI_T_UINT8:
1558 switch (t2) {
1559 case PSI_T_INT8:
1560 res->u8 = v1->u8 < v2->i8;
1561 break;
1562 case PSI_T_UINT8:
1563 res->u8 = v1->u8 < v2->u8;
1564 break;
1565 case PSI_T_INT16:
1566 res->u8 = v1->u8 < v2->i16;
1567 break;
1568 case PSI_T_UINT16:
1569 res->u8 = v1->u8 < v2->u16;
1570 break;
1571 case PSI_T_INT32:
1572 res->u8 = v1->u8 < v2->i32;
1573 break;
1574 case PSI_T_UINT32:
1575 res->u8 = v1->u8 < v2->u32;
1576 break;
1577 case PSI_T_INT64:
1578 res->u8 = v1->u8 < v2->i64;
1579 break;
1580 case PSI_T_UINT64:
1581 res->u8 = v1->u8 < v2->u64;
1582 break;
1583 # if HAVE_INT128
1584 case PSI_T_INT128:
1585 res->u8 = v1->u8 < v2->i128;
1586 break;
1587 # endif
1588
1589 # if HAVE_UINT128
1590 case PSI_T_UINT128:
1591 res->u8 = v1->u8 < v2->u128;
1592 break;
1593 # endif
1594
1595 case PSI_T_FLOAT:
1596 res->u8 = v1->u8 < v2->fval;
1597 break;
1598 case PSI_T_DOUBLE:
1599 res->u8 = v1->u8 < v2->dval;
1600 break;
1601 # if HAVE_LONG_DOUBLE
1602 case PSI_T_LONG_DOUBLE:
1603 res->u8 = v1->u8 < v2->ldval;
1604 break;
1605 # endif
1606
1607 default:
1608 assert(0);
1609 break;
1610 }
1611 break;
1612 case PSI_T_INT16:
1613 switch (t2) {
1614 case PSI_T_INT8:
1615 res->u8 = v1->i16 < v2->i8;
1616 break;
1617 case PSI_T_UINT8:
1618 res->u8 = v1->i16 < v2->u8;
1619 break;
1620 case PSI_T_INT16:
1621 res->u8 = v1->i16 < v2->i16;
1622 break;
1623 case PSI_T_UINT16:
1624 res->u8 = v1->i16 < v2->u16;
1625 break;
1626 case PSI_T_INT32:
1627 res->u8 = v1->i16 < v2->i32;
1628 break;
1629 case PSI_T_UINT32:
1630 res->u8 = v1->i16 < v2->u32;
1631 break;
1632 case PSI_T_INT64:
1633 res->u8 = v1->i16 < v2->i64;
1634 break;
1635 case PSI_T_UINT64:
1636 res->u8 = v1->i16 < v2->u64;
1637 break;
1638 # if HAVE_INT128
1639 case PSI_T_INT128:
1640 res->u8 = v1->i16 < v2->i128;
1641 break;
1642 # endif
1643
1644 # if HAVE_UINT128
1645 case PSI_T_UINT128:
1646 res->u8 = v1->i16 < v2->u128;
1647 break;
1648 # endif
1649
1650 case PSI_T_FLOAT:
1651 res->u8 = v1->i16 < v2->fval;
1652 break;
1653 case PSI_T_DOUBLE:
1654 res->u8 = v1->i16 < v2->dval;
1655 break;
1656 # if HAVE_LONG_DOUBLE
1657 case PSI_T_LONG_DOUBLE:
1658 res->u8 = v1->i16 < v2->ldval;
1659 break;
1660 # endif
1661
1662 default:
1663 assert(0);
1664 break;
1665 }
1666 break;
1667 case PSI_T_UINT16:
1668 switch (t2) {
1669 case PSI_T_INT8:
1670 res->u8 = v1->u16 < v2->i8;
1671 break;
1672 case PSI_T_UINT8:
1673 res->u8 = v1->u16 < v2->u8;
1674 break;
1675 case PSI_T_INT16:
1676 res->u8 = v1->u16 < v2->i16;
1677 break;
1678 case PSI_T_UINT16:
1679 res->u8 = v1->u16 < v2->u16;
1680 break;
1681 case PSI_T_INT32:
1682 res->u8 = v1->u16 < v2->i32;
1683 break;
1684 case PSI_T_UINT32:
1685 res->u8 = v1->u16 < v2->u32;
1686 break;
1687 case PSI_T_INT64:
1688 res->u8 = v1->u16 < v2->i64;
1689 break;
1690 case PSI_T_UINT64:
1691 res->u8 = v1->u16 < v2->u64;
1692 break;
1693 # if HAVE_INT128
1694 case PSI_T_INT128:
1695 res->u8 = v1->u16 < v2->i128;
1696 break;
1697 # endif
1698
1699 # if HAVE_UINT128
1700 case PSI_T_UINT128:
1701 res->u8 = v1->u16 < v2->u128;
1702 break;
1703 # endif
1704
1705 case PSI_T_FLOAT:
1706 res->u8 = v1->u16 < v2->fval;
1707 break;
1708 case PSI_T_DOUBLE:
1709 res->u8 = v1->u16 < v2->dval;
1710 break;
1711 # if HAVE_LONG_DOUBLE
1712 case PSI_T_LONG_DOUBLE:
1713 res->u8 = v1->u16 < v2->ldval;
1714 break;
1715 # endif
1716
1717 default:
1718 assert(0);
1719 break;
1720 }
1721 break;
1722 case PSI_T_INT32:
1723 switch (t2) {
1724 case PSI_T_INT8:
1725 res->u8 = v1->i32 < v2->i8;
1726 break;
1727 case PSI_T_UINT8:
1728 res->u8 = v1->i32 < v2->u8;
1729 break;
1730 case PSI_T_INT16:
1731 res->u8 = v1->i32 < v2->i16;
1732 break;
1733 case PSI_T_UINT16:
1734 res->u8 = v1->i32 < v2->u16;
1735 break;
1736 case PSI_T_INT32:
1737 res->u8 = v1->i32 < v2->i32;
1738 break;
1739 case PSI_T_UINT32:
1740 res->u8 = v1->i32 < v2->u32;
1741 break;
1742 case PSI_T_INT64:
1743 res->u8 = v1->i32 < v2->i64;
1744 break;
1745 case PSI_T_UINT64:
1746 res->u8 = v1->i32 < v2->u64;
1747 break;
1748 # if HAVE_INT128
1749 case PSI_T_INT128:
1750 res->u8 = v1->i32 < v2->i128;
1751 break;
1752 # endif
1753
1754 # if HAVE_UINT128
1755 case PSI_T_UINT128:
1756 res->u8 = v1->i32 < v2->u128;
1757 break;
1758 # endif
1759
1760 case PSI_T_FLOAT:
1761 res->u8 = v1->i32 < v2->fval;
1762 break;
1763 case PSI_T_DOUBLE:
1764 res->u8 = v1->i32 < v2->dval;
1765 break;
1766 # if HAVE_LONG_DOUBLE
1767 case PSI_T_LONG_DOUBLE:
1768 res->u8 = v1->i32 < v2->ldval;
1769 break;
1770 # endif
1771
1772 default:
1773 assert(0);
1774 break;
1775 }
1776 break;
1777 case PSI_T_UINT32:
1778 switch (t2) {
1779 case PSI_T_INT8:
1780 res->u8 = v1->u32 < v2->i8;
1781 break;
1782 case PSI_T_UINT8:
1783 res->u8 = v1->u32 < v2->u8;
1784 break;
1785 case PSI_T_INT16:
1786 res->u8 = v1->u32 < v2->i16;
1787 break;
1788 case PSI_T_UINT16:
1789 res->u8 = v1->u32 < v2->u16;
1790 break;
1791 case PSI_T_INT32:
1792 res->u8 = v1->u32 < v2->i32;
1793 break;
1794 case PSI_T_UINT32:
1795 res->u8 = v1->u32 < v2->u32;
1796 break;
1797 case PSI_T_INT64:
1798 res->u8 = v1->u32 < v2->i64;
1799 break;
1800 case PSI_T_UINT64:
1801 res->u8 = v1->u32 < v2->u64;
1802 break;
1803 # if HAVE_INT128
1804 case PSI_T_INT128:
1805 res->u8 = v1->u32 < v2->i128;
1806 break;
1807 # endif
1808
1809 # if HAVE_UINT128
1810 case PSI_T_UINT128:
1811 res->u8 = v1->u32 < v2->u128;
1812 break;
1813 # endif
1814
1815 case PSI_T_FLOAT:
1816 res->u8 = v1->u32 < v2->fval;
1817 break;
1818 case PSI_T_DOUBLE:
1819 res->u8 = v1->u32 < v2->dval;
1820 break;
1821 # if HAVE_LONG_DOUBLE
1822 case PSI_T_LONG_DOUBLE:
1823 res->u8 = v1->u32 < v2->ldval;
1824 break;
1825 # endif
1826
1827 default:
1828 assert(0);
1829 break;
1830 }
1831 break;
1832 case PSI_T_INT64:
1833 switch (t2) {
1834 case PSI_T_INT8:
1835 res->u8 = v1->i64 < v2->i8;
1836 break;
1837 case PSI_T_UINT8:
1838 res->u8 = v1->i64 < v2->u8;
1839 break;
1840 case PSI_T_INT16:
1841 res->u8 = v1->i64 < v2->i16;
1842 break;
1843 case PSI_T_UINT16:
1844 res->u8 = v1->i64 < v2->u16;
1845 break;
1846 case PSI_T_INT32:
1847 res->u8 = v1->i64 < v2->i32;
1848 break;
1849 case PSI_T_UINT32:
1850 res->u8 = v1->i64 < v2->u32;
1851 break;
1852 case PSI_T_INT64:
1853 res->u8 = v1->i64 < v2->i64;
1854 break;
1855 case PSI_T_UINT64:
1856 res->u8 = v1->i64 < v2->u64;
1857 break;
1858 # if HAVE_INT128
1859 case PSI_T_INT128:
1860 res->u8 = v1->i64 < v2->i128;
1861 break;
1862 # endif
1863
1864 # if HAVE_UINT128
1865 case PSI_T_UINT128:
1866 res->u8 = v1->i64 < v2->u128;
1867 break;
1868 # endif
1869
1870 case PSI_T_FLOAT:
1871 res->u8 = v1->i64 < v2->fval;
1872 break;
1873 case PSI_T_DOUBLE:
1874 res->u8 = v1->i64 < v2->dval;
1875 break;
1876 # if HAVE_LONG_DOUBLE
1877 case PSI_T_LONG_DOUBLE:
1878 res->u8 = v1->i64 < v2->ldval;
1879 break;
1880 # endif
1881
1882 default:
1883 assert(0);
1884 break;
1885 }
1886 break;
1887 case PSI_T_UINT64:
1888 switch (t2) {
1889 case PSI_T_INT8:
1890 res->u8 = v1->u64 < v2->i8;
1891 break;
1892 case PSI_T_UINT8:
1893 res->u8 = v1->u64 < v2->u8;
1894 break;
1895 case PSI_T_INT16:
1896 res->u8 = v1->u64 < v2->i16;
1897 break;
1898 case PSI_T_UINT16:
1899 res->u8 = v1->u64 < v2->u16;
1900 break;
1901 case PSI_T_INT32:
1902 res->u8 = v1->u64 < v2->i32;
1903 break;
1904 case PSI_T_UINT32:
1905 res->u8 = v1->u64 < v2->u32;
1906 break;
1907 case PSI_T_INT64:
1908 res->u8 = v1->u64 < v2->i64;
1909 break;
1910 case PSI_T_UINT64:
1911 res->u8 = v1->u64 < v2->u64;
1912 break;
1913 # if HAVE_INT128
1914 case PSI_T_INT128:
1915 res->u8 = v1->u64 < v2->i128;
1916 break;
1917 # endif
1918
1919 # if HAVE_UINT128
1920 case PSI_T_UINT128:
1921 res->u8 = v1->u64 < v2->u128;
1922 break;
1923 # endif
1924
1925 case PSI_T_FLOAT:
1926 res->u8 = v1->u64 < v2->fval;
1927 break;
1928 case PSI_T_DOUBLE:
1929 res->u8 = v1->u64 < v2->dval;
1930 break;
1931 # if HAVE_LONG_DOUBLE
1932 case PSI_T_LONG_DOUBLE:
1933 res->u8 = v1->u64 < v2->ldval;
1934 break;
1935 # endif
1936
1937 default:
1938 assert(0);
1939 break;
1940 }
1941 break;
1942 #if HAVE_INT128
1943 case PSI_T_INT128:
1944 switch (t2) {
1945 case PSI_T_INT8:
1946 res->u8 = v1->i128 < v2->i8;
1947 break;
1948 case PSI_T_UINT8:
1949 res->u8 = v1->i128 < v2->u8;
1950 break;
1951 case PSI_T_INT16:
1952 res->u8 = v1->i128 < v2->i16;
1953 break;
1954 case PSI_T_UINT16:
1955 res->u8 = v1->i128 < v2->u16;
1956 break;
1957 case PSI_T_INT32:
1958 res->u8 = v1->i128 < v2->i32;
1959 break;
1960 case PSI_T_UINT32:
1961 res->u8 = v1->i128 < v2->u32;
1962 break;
1963 case PSI_T_INT64:
1964 res->u8 = v1->i128 < v2->i64;
1965 break;
1966 case PSI_T_UINT64:
1967 res->u8 = v1->i128 < v2->u64;
1968 break;
1969 # if HAVE_INT128
1970 case PSI_T_INT128:
1971 res->u8 = v1->i128 < v2->i128;
1972 break;
1973 # endif
1974
1975 # if HAVE_UINT128
1976 case PSI_T_UINT128:
1977 res->u8 = v1->i128 < v2->u128;
1978 break;
1979 # endif
1980
1981 case PSI_T_FLOAT:
1982 res->u8 = v1->i128 < v2->fval;
1983 break;
1984 case PSI_T_DOUBLE:
1985 res->u8 = v1->i128 < v2->dval;
1986 break;
1987 # if HAVE_LONG_DOUBLE
1988 case PSI_T_LONG_DOUBLE:
1989 res->u8 = v1->i128 < v2->ldval;
1990 break;
1991 # endif
1992
1993 default:
1994 assert(0);
1995 break;
1996 }
1997 break;
1998 #endif
1999
2000 #if HAVE_UINT128
2001 case PSI_T_UINT128:
2002 switch (t2) {
2003 case PSI_T_INT8:
2004 res->u8 = v1->u128 < v2->i8;
2005 break;
2006 case PSI_T_UINT8:
2007 res->u8 = v1->u128 < v2->u8;
2008 break;
2009 case PSI_T_INT16:
2010 res->u8 = v1->u128 < v2->i16;
2011 break;
2012 case PSI_T_UINT16:
2013 res->u8 = v1->u128 < v2->u16;
2014 break;
2015 case PSI_T_INT32:
2016 res->u8 = v1->u128 < v2->i32;
2017 break;
2018 case PSI_T_UINT32:
2019 res->u8 = v1->u128 < v2->u32;
2020 break;
2021 case PSI_T_INT64:
2022 res->u8 = v1->u128 < v2->i64;
2023 break;
2024 case PSI_T_UINT64:
2025 res->u8 = v1->u128 < v2->u64;
2026 break;
2027 # if HAVE_INT128
2028 case PSI_T_INT128:
2029 res->u8 = v1->u128 < v2->i128;
2030 break;
2031 # endif
2032
2033 # if HAVE_UINT128
2034 case PSI_T_UINT128:
2035 res->u8 = v1->u128 < v2->u128;
2036 break;
2037 # endif
2038
2039 case PSI_T_FLOAT:
2040 res->u8 = v1->u128 < v2->fval;
2041 break;
2042 case PSI_T_DOUBLE:
2043 res->u8 = v1->u128 < v2->dval;
2044 break;
2045 # if HAVE_LONG_DOUBLE
2046 case PSI_T_LONG_DOUBLE:
2047 res->u8 = v1->u128 < v2->ldval;
2048 break;
2049 # endif
2050
2051 default:
2052 assert(0);
2053 break;
2054 }
2055 break;
2056 #endif
2057
2058 case PSI_T_FLOAT:
2059 switch (t2) {
2060 case PSI_T_INT8:
2061 res->u8 = v1->fval < v2->i8;
2062 break;
2063 case PSI_T_UINT8:
2064 res->u8 = v1->fval < v2->u8;
2065 break;
2066 case PSI_T_INT16:
2067 res->u8 = v1->fval < v2->i16;
2068 break;
2069 case PSI_T_UINT16:
2070 res->u8 = v1->fval < v2->u16;
2071 break;
2072 case PSI_T_INT32:
2073 res->u8 = v1->fval < v2->i32;
2074 break;
2075 case PSI_T_UINT32:
2076 res->u8 = v1->fval < v2->u32;
2077 break;
2078 case PSI_T_INT64:
2079 res->u8 = v1->fval < v2->i64;
2080 break;
2081 case PSI_T_UINT64:
2082 res->u8 = v1->fval < v2->u64;
2083 break;
2084 # if HAVE_INT128
2085 case PSI_T_INT128:
2086 res->u8 = v1->fval < v2->i128;
2087 break;
2088 # endif
2089
2090 # if HAVE_UINT128
2091 case PSI_T_UINT128:
2092 res->u8 = v1->fval < v2->u128;
2093 break;
2094 # endif
2095
2096 case PSI_T_FLOAT:
2097 res->u8 = v1->fval < v2->fval;
2098 break;
2099 case PSI_T_DOUBLE:
2100 res->u8 = v1->fval < v2->dval;
2101 break;
2102 # if HAVE_LONG_DOUBLE
2103 case PSI_T_LONG_DOUBLE:
2104 res->u8 = v1->fval < v2->ldval;
2105 break;
2106 # endif
2107
2108 default:
2109 assert(0);
2110 break;
2111 }
2112 break;
2113 case PSI_T_DOUBLE:
2114 switch (t2) {
2115 case PSI_T_INT8:
2116 res->u8 = v1->dval < v2->i8;
2117 break;
2118 case PSI_T_UINT8:
2119 res->u8 = v1->dval < v2->u8;
2120 break;
2121 case PSI_T_INT16:
2122 res->u8 = v1->dval < v2->i16;
2123 break;
2124 case PSI_T_UINT16:
2125 res->u8 = v1->dval < v2->u16;
2126 break;
2127 case PSI_T_INT32:
2128 res->u8 = v1->dval < v2->i32;
2129 break;
2130 case PSI_T_UINT32:
2131 res->u8 = v1->dval < v2->u32;
2132 break;
2133 case PSI_T_INT64:
2134 res->u8 = v1->dval < v2->i64;
2135 break;
2136 case PSI_T_UINT64:
2137 res->u8 = v1->dval < v2->u64;
2138 break;
2139 # if HAVE_INT128
2140 case PSI_T_INT128:
2141 res->u8 = v1->dval < v2->i128;
2142 break;
2143 # endif
2144
2145 # if HAVE_UINT128
2146 case PSI_T_UINT128:
2147 res->u8 = v1->dval < v2->u128;
2148 break;
2149 # endif
2150
2151 case PSI_T_FLOAT:
2152 res->u8 = v1->dval < v2->fval;
2153 break;
2154 case PSI_T_DOUBLE:
2155 res->u8 = v1->dval < v2->dval;
2156 break;
2157 # if HAVE_LONG_DOUBLE
2158 case PSI_T_LONG_DOUBLE:
2159 res->u8 = v1->dval < v2->ldval;
2160 break;
2161 # endif
2162
2163 default:
2164 assert(0);
2165 break;
2166 }
2167 break;
2168 #if HAVE_LONG_DOUBLE
2169 case PSI_T_LONG_DOUBLE:
2170 switch (t2) {
2171 case PSI_T_INT8:
2172 res->u8 = v1->ldval < v2->i8;
2173 break;
2174 case PSI_T_UINT8:
2175 res->u8 = v1->ldval < v2->u8;
2176 break;
2177 case PSI_T_INT16:
2178 res->u8 = v1->ldval < v2->i16;
2179 break;
2180 case PSI_T_UINT16:
2181 res->u8 = v1->ldval < v2->u16;
2182 break;
2183 case PSI_T_INT32:
2184 res->u8 = v1->ldval < v2->i32;
2185 break;
2186 case PSI_T_UINT32:
2187 res->u8 = v1->ldval < v2->u32;
2188 break;
2189 case PSI_T_INT64:
2190 res->u8 = v1->ldval < v2->i64;
2191 break;
2192 case PSI_T_UINT64:
2193 res->u8 = v1->ldval < v2->u64;
2194 break;
2195 # if HAVE_INT128
2196 case PSI_T_INT128:
2197 res->u8 = v1->ldval < v2->i128;
2198 break;
2199 # endif
2200
2201 # if HAVE_UINT128
2202 case PSI_T_UINT128:
2203 res->u8 = v1->ldval < v2->u128;
2204 break;
2205 # endif
2206
2207 case PSI_T_FLOAT:
2208 res->u8 = v1->ldval < v2->fval;
2209 break;
2210 case PSI_T_DOUBLE:
2211 res->u8 = v1->ldval < v2->dval;
2212 break;
2213 # if HAVE_LONG_DOUBLE
2214 case PSI_T_LONG_DOUBLE:
2215 res->u8 = v1->ldval < v2->ldval;
2216 break;
2217 # endif
2218
2219 default:
2220 assert(0);
2221 break;
2222 }
2223 break;
2224 #endif
2225
2226 default:
2227 assert(0);
2228 break;
2229 }
2230 return PSI_T_UINT8;
2231 }
2232
2233 static inline token_t psi_calc_cmp_gt(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res)
2234 {
2235 switch (t1) {
2236 case PSI_T_INT8:
2237 switch (t2) {
2238 case PSI_T_INT8:
2239 res->u8 = v1->i8 > v2->i8;
2240 break;
2241 case PSI_T_UINT8:
2242 res->u8 = v1->i8 > v2->u8;
2243 break;
2244 case PSI_T_INT16:
2245 res->u8 = v1->i8 > v2->i16;
2246 break;
2247 case PSI_T_UINT16:
2248 res->u8 = v1->i8 > v2->u16;
2249 break;
2250 case PSI_T_INT32:
2251 res->u8 = v1->i8 > v2->i32;
2252 break;
2253 case PSI_T_UINT32:
2254 res->u8 = v1->i8 > v2->u32;
2255 break;
2256 case PSI_T_INT64:
2257 res->u8 = v1->i8 > v2->i64;
2258 break;
2259 case PSI_T_UINT64:
2260 res->u8 = v1->i8 > v2->u64;
2261 break;
2262 # if HAVE_INT128
2263 case PSI_T_INT128:
2264 res->u8 = v1->i8 > v2->i128;
2265 break;
2266 # endif
2267
2268 # if HAVE_UINT128
2269 case PSI_T_UINT128:
2270 res->u8 = v1->i8 > v2->u128;
2271 break;
2272 # endif
2273
2274 case PSI_T_FLOAT:
2275 res->u8 = v1->i8 > v2->fval;
2276 break;
2277 case PSI_T_DOUBLE:
2278 res->u8 = v1->i8 > v2->dval;
2279 break;
2280 # if HAVE_LONG_DOUBLE
2281 case PSI_T_LONG_DOUBLE:
2282 res->u8 = v1->i8 > v2->ldval;
2283 break;
2284 # endif
2285
2286 default:
2287 assert(0);
2288 break;
2289 }
2290 break;
2291 case PSI_T_UINT8:
2292 switch (t2) {
2293 case PSI_T_INT8:
2294 res->u8 = v1->u8 > v2->i8;
2295 break;
2296 case PSI_T_UINT8:
2297 res->u8 = v1->u8 > v2->u8;
2298 break;
2299 case PSI_T_INT16:
2300 res->u8 = v1->u8 > v2->i16;
2301 break;
2302 case PSI_T_UINT16:
2303 res->u8 = v1->u8 > v2->u16;
2304 break;
2305 case PSI_T_INT32:
2306 res->u8 = v1->u8 > v2->i32;
2307 break;
2308 case PSI_T_UINT32:
2309 res->u8 = v1->u8 > v2->u32;
2310 break;
2311 case PSI_T_INT64:
2312 res->u8 = v1->u8 > v2->i64;
2313 break;
2314 case PSI_T_UINT64:
2315 res->u8 = v1->u8 > v2->u64;
2316 break;
2317 # if HAVE_INT128
2318 case PSI_T_INT128:
2319 res->u8 = v1->u8 > v2->i128;
2320 break;
2321 # endif
2322
2323 # if HAVE_UINT128
2324 case PSI_T_UINT128:
2325 res->u8 = v1->u8 > v2->u128;
2326 break;
2327 # endif
2328
2329 case PSI_T_FLOAT:
2330 res->u8 = v1->u8 > v2->fval;
2331 break;
2332 case PSI_T_DOUBLE:
2333 res->u8 = v1->u8 > v2->dval;
2334 break;
2335 # if HAVE_LONG_DOUBLE
2336 case PSI_T_LONG_DOUBLE:
2337 res->u8 = v1->u8 > v2->ldval;
2338 break;
2339 # endif
2340
2341 default:
2342 assert(0);
2343 break;
2344 }
2345 break;
2346 case PSI_T_INT16:
2347 switch (t2) {
2348 case PSI_T_INT8:
2349 res->u8 = v1->i16 > v2->i8;
2350 break;
2351 case PSI_T_UINT8:
2352 res->u8 = v1->i16 > v2->u8;
2353 break;
2354 case PSI_T_INT16:
2355 res->u8 = v1->i16 > v2->i16;
2356 break;
2357 case PSI_T_UINT16:
2358 res->u8 = v1->i16 > v2->u16;
2359 break;
2360 case PSI_T_INT32:
2361 res->u8 = v1->i16 > v2->i32;
2362 break;
2363 case PSI_T_UINT32:
2364 res->u8 = v1->i16 > v2->u32;
2365 break;
2366 case PSI_T_INT64:
2367 res->u8 = v1->i16 > v2->i64;
2368 break;
2369 case PSI_T_UINT64:
2370 res->u8 = v1->i16 > v2->u64;
2371 break;
2372 # if HAVE_INT128
2373 case PSI_T_INT128:
2374 res->u8 = v1->i16 > v2->i128;
2375 break;
2376 # endif
2377
2378 # if HAVE_UINT128
2379 case PSI_T_UINT128:
2380 res->u8 = v1->i16 > v2->u128;
2381 break;
2382 # endif
2383
2384 case PSI_T_FLOAT:
2385 res->u8 = v1->i16 > v2->fval;
2386 break;
2387 case PSI_T_DOUBLE:
2388 res->u8 = v1->i16 > v2->dval;
2389 break;
2390 # if HAVE_LONG_DOUBLE
2391 case PSI_T_LONG_DOUBLE:
2392 res->u8 = v1->i16 > v2->ldval;
2393 break;
2394 # endif
2395
2396 default:
2397 assert(0);
2398 break;
2399 }
2400 break;
2401 case PSI_T_UINT16:
2402 switch (t2) {
2403 case PSI_T_INT8:
2404 res->u8 = v1->u16 > v2->i8;
2405 break;
2406 case PSI_T_UINT8:
2407 res->u8 = v1->u16 > v2->u8;
2408 break;
2409 case PSI_T_INT16:
2410 res->u8 = v1->u16 > v2->i16;
2411 break;
2412 case PSI_T_UINT16:
2413 res->u8 = v1->u16 > v2->u16;
2414 break;
2415 case PSI_T_INT32:
2416 res->u8 = v1->u16 > v2->i32;
2417 break;
2418 case PSI_T_UINT32:
2419 res->u8 = v1->u16 > v2->u32;
2420 break;
2421 case PSI_T_INT64:
2422 res->u8 = v1->u16 > v2->i64;
2423 break;
2424 case PSI_T_UINT64:
2425 res->u8 = v1->u16 > v2->u64;
2426 break;
2427 # if HAVE_INT128
2428 case PSI_T_INT128:
2429 res->u8 = v1->u16 > v2->i128;
2430 break;
2431 # endif
2432
2433 # if HAVE_UINT128
2434 case PSI_T_UINT128:
2435 res->u8 = v1->u16 > v2->u128;
2436 break;
2437 # endif
2438
2439 case PSI_T_FLOAT:
2440 res->u8 = v1->u16 > v2->fval;
2441 break;
2442 case PSI_T_DOUBLE:
2443 res->u8 = v1->u16 > v2->dval;
2444 break;
2445 # if HAVE_LONG_DOUBLE
2446 case PSI_T_LONG_DOUBLE:
2447 res->u8 = v1->u16 > v2->ldval;
2448 break;
2449 # endif
2450
2451 default:
2452 assert(0);
2453 break;
2454 }
2455 break;
2456 case PSI_T_INT32:
2457 switch (t2) {
2458 case PSI_T_INT8:
2459 res->u8 = v1->i32 > v2->i8;
2460 break;
2461 case PSI_T_UINT8:
2462 res->u8 = v1->i32 > v2->u8;
2463 break;
2464 case PSI_T_INT16:
2465 res->u8 = v1->i32 > v2->i16;
2466 break;
2467 case PSI_T_UINT16:
2468 res->u8 = v1->i32 > v2->u16;
2469 break;
2470 case PSI_T_INT32:
2471 res->u8 = v1->i32 > v2->i32;
2472 break;
2473 case PSI_T_UINT32:
2474 res->u8 = v1->i32 > v2->u32;
2475 break;
2476 case PSI_T_INT64:
2477 res->u8 = v1->i32 > v2->i64;
2478 break;
2479 case PSI_T_UINT64:
2480 res->u8 = v1->i32 > v2->u64;
2481 break;
2482 # if HAVE_INT128
2483 case PSI_T_INT128:
2484 res->u8 = v1->i32 > v2->i128;
2485 break;
2486 # endif
2487
2488 # if HAVE_UINT128
2489 case PSI_T_UINT128:
2490 res->u8 = v1->i32 > v2->u128;
2491 break;
2492 # endif
2493
2494 case PSI_T_FLOAT:
2495 res->u8 = v1->i32 > v2->fval;
2496 break;
2497 case PSI_T_DOUBLE:
2498 res->u8 = v1->i32 > v2->dval;
2499 break;
2500 # if HAVE_LONG_DOUBLE
2501 case PSI_T_LONG_DOUBLE:
2502 res->u8 = v1->i32 > v2->ldval;
2503 break;
2504 # endif
2505
2506 default:
2507 assert(0);
2508 break;
2509 }
2510 break;
2511 case PSI_T_UINT32:
2512 switch (t2) {
2513 case PSI_T_INT8:
2514 res->u8 = v1->u32 > v2->i8;
2515 break;
2516 case PSI_T_UINT8:
2517 res->u8 = v1->u32 > v2->u8;
2518 break;
2519 case PSI_T_INT16:
2520 res->u8 = v1->u32 > v2->i16;
2521 break;
2522 case PSI_T_UINT16:
2523 res->u8 = v1->u32 > v2->u16;
2524 break;
2525 case PSI_T_INT32:
2526 res->u8 = v1->u32 > v2->i32;
2527 break;
2528 case PSI_T_UINT32:
2529 res->u8 = v1->u32 > v2->u32;
2530 break;
2531 case PSI_T_INT64:
2532 res->u8 = v1->u32 > v2->i64;
2533 break;
2534 case PSI_T_UINT64:
2535 res->u8 = v1->u32 > v2->u64;
2536 break;
2537 # if HAVE_INT128
2538 case PSI_T_INT128:
2539 res->u8 = v1->u32 > v2->i128;
2540 break;
2541 # endif
2542
2543 # if HAVE_UINT128
2544 case PSI_T_UINT128:
2545 res->u8 = v1->u32 > v2->u128;
2546 break;
2547 # endif
2548
2549 case PSI_T_FLOAT:
2550 res->u8 = v1->u32 > v2->fval;
2551 break;
2552 case PSI_T_DOUBLE:
2553 res->u8 = v1->u32 > v2->dval;
2554 break;
2555 # if HAVE_LONG_DOUBLE
2556 case PSI_T_LONG_DOUBLE:
2557 res->u8 = v1->u32 > v2->ldval;
2558 break;
2559 # endif
2560
2561 default:
2562 assert(0);
2563 break;
2564 }
2565 break;
2566 case PSI_T_INT64:
2567 switch (t2) {
2568 case PSI_T_INT8:
2569 res->u8 = v1->i64 > v2->i8;
2570 break;
2571 case PSI_T_UINT8:
2572 res->u8 = v1->i64 > v2->u8;
2573 break;
2574 case PSI_T_INT16:
2575 res->u8 = v1->i64 > v2->i16;
2576 break;
2577 case PSI_T_UINT16:
2578 res->u8 = v1->i64 > v2->u16;
2579 break;
2580 case PSI_T_INT32:
2581 res->u8 = v1->i64 > v2->i32;
2582 break;
2583 case PSI_T_UINT32:
2584 res->u8 = v1->i64 > v2->u32;
2585 break;
2586 case PSI_T_INT64:
2587 res->u8 = v1->i64 > v2->i64;
2588 break;
2589 case PSI_T_UINT64:
2590 res->u8 = v1->i64 > v2->u64;
2591 break;
2592 # if HAVE_INT128
2593 case PSI_T_INT128:
2594 res->u8 = v1->i64 > v2->i128;
2595 break;
2596 # endif
2597
2598 # if HAVE_UINT128
2599 case PSI_T_UINT128:
2600 res->u8 = v1->i64 > v2->u128;
2601 break;
2602 # endif
2603
2604 case PSI_T_FLOAT:
2605 res->u8 = v1->i64 > v2->fval;
2606 break;
2607 case PSI_T_DOUBLE:
2608 res->u8 = v1->i64 > v2->dval;
2609 break;
2610 # if HAVE_LONG_DOUBLE
2611 case PSI_T_LONG_DOUBLE:
2612 res->u8 = v1->i64 > v2->ldval;
2613 break;
2614 # endif
2615
2616 default:
2617 assert(0);
2618 break;
2619 }
2620 break;
2621 case PSI_T_UINT64:
2622 switch (t2) {
2623 case PSI_T_INT8:
2624 res->u8 = v1->u64 > v2->i8;
2625 break;
2626 case PSI_T_UINT8:
2627 res->u8 = v1->u64 > v2->u8;
2628 break;
2629 case PSI_T_INT16:
2630 res->u8 = v1->u64 > v2->i16;
2631 break;
2632 case PSI_T_UINT16:
2633 res->u8 = v1->u64 > v2->u16;
2634 break;
2635 case PSI_T_INT32:
2636 res->u8 = v1->u64 > v2->i32;
2637 break;
2638 case PSI_T_UINT32:
2639 res->u8 = v1->u64 > v2->u32;
2640 break;
2641 case PSI_T_INT64:
2642 res->u8 = v1->u64 > v2->i64;
2643 break;
2644 case PSI_T_UINT64:
2645 res->u8 = v1->u64 > v2->u64;
2646 break;
2647 # if HAVE_INT128
2648 case PSI_T_INT128:
2649 res->u8 = v1->u64 > v2->i128;
2650 break;
2651 # endif
2652
2653 # if HAVE_UINT128
2654 case PSI_T_UINT128:
2655 res->u8 = v1->u64 > v2->u128;
2656 break;
2657 # endif
2658
2659 case PSI_T_FLOAT:
2660 res->u8 = v1->u64 > v2->fval;
2661 break;
2662 case PSI_T_DOUBLE:
2663 res->u8 = v1->u64 > v2->dval;
2664 break;
2665 # if HAVE_LONG_DOUBLE
2666 case PSI_T_LONG_DOUBLE:
2667 res->u8 = v1->u64 > v2->ldval;
2668 break;
2669 # endif
2670
2671 default:
2672 assert(0);
2673 break;
2674 }
2675 break;
2676 #if HAVE_INT128
2677 case PSI_T_INT128:
2678 switch (t2) {
2679 case PSI_T_INT8:
2680 res->u8 = v1->i128 > v2->i8;
2681 break;
2682 case PSI_T_UINT8:
2683 res->u8 = v1->i128 > v2->u8;
2684 break;
2685 case PSI_T_INT16:
2686 res->u8 = v1->i128 > v2->i16;
2687 break;
2688 case PSI_T_UINT16:
2689 res->u8 = v1->i128 > v2->u16;
2690 break;
2691 case PSI_T_INT32:
2692 res->u8 = v1->i128 > v2->i32;
2693 break;
2694 case PSI_T_UINT32:
2695 res->u8 = v1->i128 > v2->u32;
2696 break;
2697 case PSI_T_INT64:
2698 res->u8 = v1->i128 > v2->i64;
2699 break;
2700 case PSI_T_UINT64:
2701 res->u8 = v1->i128 > v2->u64;
2702 break;
2703 # if HAVE_INT128
2704 case PSI_T_INT128:
2705 res->u8 = v1->i128 > v2->i128;
2706 break;
2707 # endif
2708
2709 # if HAVE_UINT128
2710 case PSI_T_UINT128:
2711 res->u8 = v1->i128 > v2->u128;
2712 break;
2713 # endif
2714
2715 case PSI_T_FLOAT:
2716 res->u8 = v1->i128 > v2->fval;
2717 break;
2718 case PSI_T_DOUBLE:
2719 res->u8 = v1->i128 > v2->dval;
2720 break;
2721 # if HAVE_LONG_DOUBLE
2722 case PSI_T_LONG_DOUBLE:
2723 res->u8 = v1->i128 > v2->ldval;
2724 break;
2725 # endif
2726
2727 default:
2728 assert(0);
2729 break;
2730 }
2731 break;
2732 #endif
2733
2734 #if HAVE_UINT128
2735 case PSI_T_UINT128:
2736 switch (t2) {
2737 case PSI_T_INT8:
2738 res->u8 = v1->u128 > v2->i8;
2739 break;
2740 case PSI_T_UINT8:
2741 res->u8 = v1->u128 > v2->u8;
2742 break;
2743 case PSI_T_INT16:
2744 res->u8 = v1->u128 > v2->i16;
2745 break;
2746 case PSI_T_UINT16:
2747 res->u8 = v1->u128 > v2->u16;
2748 break;
2749 case PSI_T_INT32:
2750 res->u8 = v1->u128 > v2->i32;
2751 break;
2752 case PSI_T_UINT32:
2753 res->u8 = v1->u128 > v2->u32;
2754 break;
2755 case PSI_T_INT64:
2756 res->u8 = v1->u128 > v2->i64;
2757 break;
2758 case PSI_T_UINT64:
2759 res->u8 = v1->u128 > v2->u64;
2760 break;
2761 # if HAVE_INT128
2762 case PSI_T_INT128:
2763 res->u8 = v1->u128 > v2->i128;
2764 break;
2765 # endif
2766
2767 # if HAVE_UINT128
2768 case PSI_T_UINT128:
2769 res->u8 = v1->u128 > v2->u128;
2770 break;
2771 # endif
2772
2773 case PSI_T_FLOAT:
2774 res->u8 = v1->u128 > v2->fval;
2775 break;
2776 case PSI_T_DOUBLE:
2777 res->u8 = v1->u128 > v2->dval;
2778 break;
2779 # if HAVE_LONG_DOUBLE
2780 case PSI_T_LONG_DOUBLE:
2781 res->u8 = v1->u128 > v2->ldval;
2782 break;
2783 # endif
2784
2785 default:
2786 assert(0);
2787 break;
2788 }
2789 break;
2790 #endif
2791
2792 case PSI_T_FLOAT:
2793 switch (t2) {
2794 case PSI_T_INT8:
2795 res->u8 = v1->fval > v2->i8;
2796 break;
2797 case PSI_T_UINT8:
2798 res->u8 = v1->fval > v2->u8;
2799 break;
2800 case PSI_T_INT16:
2801 res->u8 = v1->fval > v2->i16;
2802 break;
2803 case PSI_T_UINT16:
2804 res->u8 = v1->fval > v2->u16;
2805 break;
2806 case PSI_T_INT32:
2807 res->u8 = v1->fval > v2->i32;
2808 break;
2809 case PSI_T_UINT32:
2810 res->u8 = v1->fval > v2->u32;
2811 break;
2812 case PSI_T_INT64:
2813 res->u8 = v1->fval > v2->i64;
2814 break;
2815 case PSI_T_UINT64:
2816 res->u8 = v1->fval > v2->u64;
2817 break;
2818 # if HAVE_INT128
2819 case PSI_T_INT128:
2820 res->u8 = v1->fval > v2->i128;
2821 break;
2822 # endif
2823
2824 # if HAVE_UINT128
2825 case PSI_T_UINT128:
2826 res->u8 = v1->fval > v2->u128;
2827 break;
2828 # endif
2829
2830 case PSI_T_FLOAT:
2831 res->u8 = v1->fval > v2->fval;
2832 break;
2833 case PSI_T_DOUBLE:
2834 res->u8 = v1->fval > v2->dval;
2835 break;
2836 # if HAVE_LONG_DOUBLE
2837 case PSI_T_LONG_DOUBLE:
2838 res->u8 = v1->fval > v2->ldval;
2839 break;
2840 # endif
2841
2842 default:
2843 assert(0);
2844 break;
2845 }
2846 break;
2847 case PSI_T_DOUBLE:
2848 switch (t2) {
2849 case PSI_T_INT8:
2850 res->u8 = v1->dval > v2->i8;
2851 break;
2852 case PSI_T_UINT8:
2853 res->u8 = v1->dval > v2->u8;
2854 break;
2855 case PSI_T_INT16:
2856 res->u8 = v1->dval > v2->i16;
2857 break;
2858 case PSI_T_UINT16:
2859 res->u8 = v1->dval > v2->u16;
2860 break;
2861 case PSI_T_INT32:
2862 res->u8 = v1->dval > v2->i32;
2863 break;
2864 case PSI_T_UINT32:
2865 res->u8 = v1->dval > v2->u32;
2866 break;
2867 case PSI_T_INT64:
2868 res->u8 = v1->dval > v2->i64;
2869 break;
2870 case PSI_T_UINT64:
2871 res->u8 = v1->dval > v2->u64;
2872 break;
2873 # if HAVE_INT128
2874 case PSI_T_INT128:
2875 res->u8 = v1->dval > v2->i128;
2876 break;
2877 # endif
2878
2879 # if HAVE_UINT128
2880 case PSI_T_UINT128:
2881 res->u8 = v1->dval > v2->u128;
2882 break;
2883 # endif
2884
2885 case PSI_T_FLOAT:
2886 res->u8 = v1->dval > v2->fval;
2887 break;
2888 case PSI_T_DOUBLE:
2889 res->u8 = v1->dval > v2->dval;
2890 break;
2891 # if HAVE_LONG_DOUBLE
2892 case PSI_T_LONG_DOUBLE:
2893 res->u8 = v1->dval > v2->ldval;
2894 break;
2895 # endif
2896
2897 default:
2898 assert(0);
2899 break;
2900 }
2901 break;
2902 #if HAVE_LONG_DOUBLE
2903 case PSI_T_LONG_DOUBLE:
2904 switch (t2) {
2905 case PSI_T_INT8:
2906 res->u8 = v1->ldval > v2->i8;
2907 break;
2908 case PSI_T_UINT8:
2909 res->u8 = v1->ldval > v2->u8;
2910 break;
2911 case PSI_T_INT16:
2912 res->u8 = v1->ldval > v2->i16;
2913 break;
2914 case PSI_T_UINT16:
2915 res->u8 = v1->ldval > v2->u16;
2916 break;
2917 case PSI_T_INT32:
2918 res->u8 = v1->ldval > v2->i32;
2919 break;
2920 case PSI_T_UINT32:
2921 res->u8 = v1->ldval > v2->u32;
2922 break;
2923 case PSI_T_INT64:
2924 res->u8 = v1->ldval > v2->i64;
2925 break;
2926 case PSI_T_UINT64:
2927 res->u8 = v1->ldval > v2->u64;
2928 break;
2929 # if HAVE_INT128
2930 case PSI_T_INT128:
2931 res->u8 = v1->ldval > v2->i128;
2932 break;
2933 # endif
2934
2935 # if HAVE_UINT128
2936 case PSI_T_UINT128:
2937 res->u8 = v1->ldval > v2->u128;
2938 break;
2939 # endif
2940
2941 case PSI_T_FLOAT:
2942 res->u8 = v1->ldval > v2->fval;
2943 break;
2944 case PSI_T_DOUBLE:
2945 res->u8 = v1->ldval > v2->dval;
2946 break;
2947 # if HAVE_LONG_DOUBLE
2948 case PSI_T_LONG_DOUBLE:
2949 res->u8 = v1->ldval > v2->ldval;
2950 break;
2951 # endif
2952
2953 default:
2954 assert(0);
2955 break;
2956 }
2957 break;
2958 #endif
2959
2960 default:
2961 assert(0);
2962 break;
2963 }
2964 return PSI_T_UINT8;
2965 }
2966
2967 static inline token_t psi_calc_cmp_le(token_t t1, impl_val *v1, token_t t2, impl_val *v2, impl_val *res)
2968 {
2969 switch (t1) {
2970 case PSI_T_INT8:
2971 switch (t2) {
2972 case PSI_T_INT8:
2973 res->u8 = v1->i8 <= v2->i8;
2974 break;
2975 case PSI_T_UINT8:
2976 res->u8 = v1->i8 <= v2->u8;
2977 break;
2978 case PSI_T_INT16:
2979 res->u8 = v1->i8 <= v2->i16;
2980 break;
2981 case PSI_T_UINT16:
2982 res->u8 = v1->i8 <= v2->u16;
2983 break;
2984 case PSI_T_INT32:
2985 res->u8 = v1->i8 <= v2->i32;
2986 break;
2987 case PSI_T_UINT32:
2988 res->u8 = v1->i8 <= v2->u32;
2989 break;
2990 case PSI_T_INT64:
2991 res->u8 = v1->i8 <= v2->i64;
2992 break;
2993 case PSI_T_UINT64:
2994 res->u8 = v1->i8 <= v2->u64;
2995 break;
2996 # if HAVE_INT128
2997 case PSI_T_INT128:
2998 res->u8 = v1->i8 <= v2->i128;
2999 break;
3000 # endif
3001
3002 # if HAVE_UINT128
3003 case PSI_T_UINT128:
3004 res->u8 = v1->i8 <= v2->u128;
3005 break;
3006 # endif
3007
3008 case PSI_T_FLOAT:
3009 res->u8 = v1->i8 <= v2->fval;
3010 break;
3011 case PSI_T_DOUBLE:
3012 res->u8 = v1->i8 <= v2->dval;
3013 break;
3014 # if HAVE_LONG_DOUBLE
3015 case PSI_T_LONG_DOUBLE:
3016 res->u8 = v1->i8 <= v2->ldval;
3017 break;
3018 # endif
3019
3020 default:
3021 assert(0);
3022 break;
3023 }
3024 break;
3025 case PSI_T_UINT8:
3026 switch (t2) {
3027 case PSI_T_INT8:
3028 res->u8 = v1->u8 <= v2->i8;
3029 break;
3030 case PSI_T_UINT8:
3031 res->u8 = v1->u8 <= v2->u8;
3032 break;
3033 case PSI_T_INT16:
3034 res->u8 = v1->u8 <= v2->i16;
3035 break;
3036 case PSI_T_UINT16:
3037 res->u8 = v1->u8 <= v2->u16;
3038 break;
3039 case PSI_T_INT32:
3040 res->u8 = v1->u8 <= v2->i32;
3041 break;
3042 case PSI_T_UINT32:
3043 res->u8 = v1->u8 <= v2->u32;
3044 break;
3045 case PSI_T_INT64:
3046 res->u8 = v1->u8 <= v2->i64;
3047 break;
3048 case PSI_T_UINT64:
3049 res->u8 = v1->u8 <= v2->u64;
3050 break;
3051 # if HAVE_INT128
3052 case PSI_T_INT128:
3053 res->u8 = v1->u8 <= v2->i128;
3054 break;
3055 # endif
3056
3057 # if HAVE_UINT128
3058 case PSI_T_UINT128:
3059 res->u8 = v1->u8 <= v2->u128;
3060 break;
3061 # endif
3062
3063 case PSI_T_FLOAT:
3064 res->u8 = v1->u8 <= v2->fval;
3065 break;
3066 case PSI_T_DOUBLE:
3067 res->u8 = v1->u8 <= v2->dval;
3068 break;
3069 # if HAVE_LONG_DOUBLE
3070 case PSI_T_LONG_DOUBLE:
3071 res->u8 = v1->u8 <= v2->ldval;
3072 break;
3073 # endif
3074
3075 default:
3076 assert(0);
3077 break;
3078 }
3079 break;
3080 case PSI_T_INT16:
3081 switch (t2) {
3082 case PSI_T_INT8:
3083 res->u8 = v1->i16 <= v2->i8;
3084 break;
3085 case PSI_T_UINT8:
3086 res->u8 = v1->i16 <= v2->u8;
3087 break;
3088 case PSI_T_INT16:
3089 res->u8 = v1->i16 <= v2->i16;
3090 break;
3091 case PSI_T_UINT16:
3092 res->u8 = v1->i16 <= v2->u16;
3093 break;
3094 case PSI_T_INT32:
3095 res->u8 = v1->i16 <= v2->i32;
3096 break;
3097 case PSI_T_UINT32:
3098 res->u8 = v1->i16 <= v2->u32;
3099 break;
3100 case PSI_T_INT64:
3101 res->u8 = v1->i16 <= v2->i64;
3102 break;
3103 case PSI_T_UINT64:
3104 res->u8 = v1->i16 <= v2->u64;
3105 break;
3106 # if HAVE_INT128
3107 case PSI_T_INT128:
3108 res->u8 = v1->i16 <= v2->i128;
3109 break;
3110 # endif
3111
3112 # if HAVE_UINT128
3113 case PSI_T_UINT128:
3114 res->u8 = v1->i16 <= v2->u128;
3115 break;
3116 # endif
3117
3118 case PSI_T_FLOAT:
3119 res->u8 = v1->i16 <= v2->fval;
3120 break;
3121 case PSI_T_DOUBLE:
3122 res->u8 = v1->i16 <= v2->dval;
3123 break;
3124 # if HAVE_LONG_DOUBLE
3125 case PSI_T_LONG_DOUBLE:
3126 res->u8 = v1->i16 <= v2->ldval;
3127 break;
3128 # endif
3129
3130 default:
3131 assert(0);
3132 break;
3133 }
3134 break;
3135 case PSI_T_UINT16:
3136 switch (t2) {
3137 case PSI_T_INT8:
3138 res->u8 = v1->u16 <= v2->i8;
3139 break;
3140 case PSI_T_UINT8:
3141 res->u8 = v1->u16 <= v2->u8;
3142 break;
3143 case PSI_T_INT16:
3144 res->u8 = v1->u16 <= v2->i16;
3145 break;
3146 case PSI_T_UINT16:
3147 res->u8 = v1->u16 <= v2->u16;
3148 break;
3149 case PSI_T_INT32:
3150 res->u8 = v1->u16 <= v2->i32;
3151 break;
3152 case PSI_T_UINT32:
3153 res->u8 = v1->u16 <= v2->u32;
3154 break;
3155 case PSI_T_INT64:
3156 res->u8 = v1->u16 <= v2->i64;
3157 break;
3158 case PSI_T_UINT64:
3159 res->u8 = v1->u16 <= v2->u64;
3160 break;
3161 # if HAVE_INT128
3162 case PSI_T_INT128:
3163 res->u8 = v1->u16 <= v2->i128;
3164 break;
3165 # endif
3166
3167 # if HAVE_UINT128
3168 case PSI_T_UINT128:
3169 res->u8 = v1->u16 <= v2->u128;
3170 break;
3171 # endif
3172
3173 case PSI_T_FLOAT:
3174 res->u8 = v1->u16 <= v2->fval;
3175 break;
3176 case PSI_T_DOUBLE:
3177 res->u8 = v1->u16 <= v2->dval;
3178 break;
3179 # if HAVE_LONG_DOUBLE
3180 case PSI_T_LONG_DOUBLE:
3181 res->u8 = v1->u16 <= v2->ldval;
3182 break;
3183 # endif
3184
3185 default:
3186 assert(0);
3187 break;
3188 }
3189 break;
3190 case PSI_T_INT32:
3191 switch (t2) {
3192 case PSI_T_INT8:
3193 res->u8 = v1->i32 <= v2->i8;
3194 break;
3195 case PSI_T_UINT8:
3196 res->u8 = v1->i32 <= v2->u8;
3197 break;
3198 case PSI_T_INT16:
3199 res->u8 = v1->i32 <= v2->i16;
3200 break;
3201 case PSI_T_UINT16:
3202 res->u8 = v1->i32 <= v2->u16;
3203 break;
3204 case PSI_T_INT32:
3205 res->u8 = v1->i32 <= v2->i32;
3206 break;
3207 case PSI_T_UINT32:
3208 res->u8 = v1->i32 <= v2->u32;
3209 break;
3210 case PSI_T_INT64:
3211 res->u8 = v1->i32 <= v2->i64;
3212 break;
3213 case PSI_T_UINT64:
3214 res->u8 = v1->i32 <= v2->u64;
3215 break;
3216 # if HAVE_INT128
3217 case PSI_T_INT128:
3218 res->u8 = v1->i32 <= v2->i128;
3219 break;
3220 # endif
3221
3222 # if HAVE_UINT128
3223 case PSI_T_UINT128:
3224 res->u8 = v1->i32 <= v2->u128;
3225 break;
3226 # endif
3227
3228 case PSI_T_FLOAT:
3229 res->u8 = v1->i32 <= v2->fval;
3230 break;
3231 case PSI_T_DOUBLE:
3232 res->u8 = v1->i32 <= v2->dval;
3233 break;
3234 # if HAVE_LONG_DOUBLE
3235 case PSI_T_LONG_DOUBLE:
3236 res->u8 = v1->i32 <= v2->ldval;
3237 break;
3238 # endif
3239
3240 default:
3241 assert(0);
3242 break;
3243 }
3244 break;
3245 case PSI_T_UINT32:
3246 switch (t2) {
3247 case PSI_T_INT8:
3248 res->u8 = v1->u32 <= v2->i8;
3249 break;
3250 case PSI_T_UINT8:
3251 res->u8 = v1->u32 <= v2->u8;
3252 break;
3253 case PSI_T_INT16:
3254 res->u8 = v1->u32 <= v2->i16;
3255 break;
3256 case PSI_T_UINT16:
3257 res->u8 = v1->u32 <= v2->u16;
3258 break;
3259 case PSI_T_INT32:
3260 res->u8 = v1->u32 <= v2->i32;
3261 break;
3262 case PSI_T_UINT32:
3263 res->u8 = v1->u32 <= v2->u32;
3264 break;
3265 case PSI_T_INT64:
3266 res->u8 = v1->u32 <= v2->i64;
3267 break;
3268 case PSI_T_UINT64:
3269 res->u8 = v1->u32 <= v2->u64;
3270 break;
3271 # if HAVE_INT128
3272 case PSI_T_INT128:
3273 res->u8 = v1->u32 <= v2->i128;
3274 break;
3275 # endif
3276
3277 # if HAVE_UINT128
3278 case PSI_T_UINT128:
3279 res->u8 = v1->u32 <= v2->u128;
3280 break;
3281 # endif
3282
3283 case PSI_T_FLOAT:
3284 res->u8 = v1->u32 <= v2->fval;
3285 break;
3286 case PSI_T_DOUBLE:
3287 res->u8 = v1->u32 <= v2->dval;
3288 break;
3289 # if HAVE_LONG_DOUBLE
3290 case PSI_T_LONG_DOUBLE:
3291 res->u8 = v1->u32 <= v2->ldval;
3292 break;
3293 # endif
3294
3295 default:
3296 assert(0);
3297 break;
3298 }
3299 break;
3300 case PSI_T_INT64:
3301 switch (t2) {
3302 case PSI_T_INT8:
3303 res->u8 = v1->i64 <= v2->i8;
3304 break;
3305 case PSI_T_UINT8:
3306 res->u8 = v1->i64 <= v2->u8;
3307 break;
3308 case PSI_T_INT16:
3309 res->u8 = v1->i64 <= v2->i16;
3310 break;
3311 case PSI_T_UINT16:
3312 res->u8 = v1->i64 <= v2->u16;
3313 break;
3314 case PSI_T_INT32:
3315 res->u8 = v1->i64 <= v2->i32;
3316 break;
3317 case PSI_T_UINT32:
3318 res->u8 = v1->i64 <= v2->u32;
3319 break;
3320 case PSI_T_INT64:
3321 res->u8 = v1->i64 <= v2->i64;
3322 break;
3323 case PSI_T_UINT64:
3324 res->u8 = v1->i64 <= v2->u64;
3325 break;