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