46 #define IFCONV_PATTERN_3_SIZE sizeof(ifconv_pattern_3) / (sizeof(s4) * 3 * 2)
70 #define IFCONV_PATTERN_4_SIZE sizeof(ifconv_pattern_4) / (sizeof(s4) * 4 * 2)
104 static s4 ifconv_condition_complement[6] = {
150 for (; bcount >= 0; bcount--, bptr++) {
205 if ((bptr[1].predecessorcount != 1) ||
206 (bptr[2].predecessorcount != 1))
248 vm_abort(
"ifconv_static: invalid instruction count %d", icount);
253 for (i = 0; i < patternsize; i++) {
260 for (j = 0; j < icount; j++, tiptr++) {
263 p = pattern + (icount * 2 *
i) + (icount * 0) + j;
267 if (tiptr->
opc != opcode)
340 vm_abort(
"ifconv_static: invalid opcode: %d", iptr->
opc);
352 for (; j < bptr[1].
icount; j++, tiptr++) {
355 p = pattern + (icount * 2 *
i) + (icount * 1) + j;
364 tiptr[1].
dst = tiptr[-1].
dst;
377 for (; j < bptr[1].
icount + bptr[2].
icount; j++, tiptr++) {
378 p = pattern + (icount * 2 *
i) + (icount * 1) + j;
383 tiptr->
opc = (
ICMD) (*p | (condition << 8));
394 iptr->
opc = (
ICMD) (iptr->
opc | (condition << 8));
459 if ((bptr[1].icount == 2) &&
460 (bptr[1].iinstr[0].opc ==
ICMD_POP) &&
486 if ((bptr[1].icount == 2) &&
490 (bptr[2].icount == 2) &&
503 if ((bptr[1].icount == 2) &&
507 (bptr[2].icount == 1) &&
513 if ((bptr[1].icount == 2) &&
517 (bptr[2].icount == 1) &&
523 if ((bptr[1].icount == 2) &&
527 (bptr[2].icount == 1) &&
533 if ((bptr[1].icount == 2) &&
537 (bptr[2].icount == 1) &&
543 if ((bptr[1].icount == 2) &&
547 (bptr[2].icount == 1) &&
556 if ((bptr[1].icount == 2) &&
560 (bptr[2].icount == 1) &&
566 if ((bptr[1].icount == 2) &&
570 (bptr[2].icount == 1) &&
576 if ((bptr[1].icount == 2) &&
580 (bptr[2].icount == 1) &&
586 if ((bptr[1].icount == 2) &&
590 (bptr[2].icount == 1) &&
596 if ((bptr[1].icount == 2) &&
600 (bptr[2].icount == 1) &&
608 if ((bptr[1].icount == 2) &&
612 (bptr[2].icount == 1) &&
618 if ((bptr[1].icount == 2) &&
622 (bptr[2].icount == 1) &&
628 if ((bptr[1].icount == 2) &&
632 (bptr[2].icount == 1) &&
638 if ((bptr[1].icount == 2) &&
642 (bptr[2].icount == 1) &&
648 if ((bptr[1].icount == 2) &&
652 (bptr[2].icount == 1) &&
660 if ((bptr[1].icount == 2) &&
664 (bptr[2].icount == 1) &&
670 if ((bptr[1].icount == 2) &&
674 (bptr[2].icount == 1) &&
680 if ((bptr[1].icount == 2) &&
684 (bptr[2].icount == 1) &&
690 if ((bptr[1].icount == 2) &&
694 (bptr[2].icount == 1) &&
700 if ((bptr[1].icount == 2) &&
704 (bptr[2].icount == 1) &&
714 if ((bptr[1].icount == 3) &&
719 (bptr[2].icount == 2) &&
726 if ((bptr[1].icount == 3) &&
731 (bptr[2].icount == 2) &&
738 if ((bptr[1].icount == 3) &&
743 (bptr[2].icount == 2) &&
753 if ((bptr[1].icount == 3) &&
758 (bptr[2].icount == 2) &&
768 if ((bptr[1].icount == 4) &&
774 (bptr[2].icount == 3) &&
783 if ((bptr[1].icount == 4) &&
789 (bptr[2].icount == 3) &&
798 if ((bptr[1].icount == 2) &&
802 (bptr[2].icount == 1) &&
808 if ((bptr[1].icount == 3) &&
813 (bptr[2].icount == 2) &&
820 if ((bptr[1].icount == 2) &&
824 (bptr[2].icount == 1) &&
830 if ((bptr[1].icount == 2) &&
834 (bptr[2].icount == 1) &&
841 if ((bptr[1].icount == 3) &&
846 (bptr[2].icount == 1) &&
852 if ((bptr[1].icount == 3) &&
857 (bptr[2].icount == 1) &&
863 if ((bptr[1].icount == 3) &&
868 (bptr[2].icount == 1) &&
874 if ((bptr[1].icount == 3) &&
879 (bptr[2].icount == 1) &&
885 if ((bptr[1].icount == 3) &&
890 (bptr[2].icount == 1) &&
896 if ((bptr[1].icount == 3) &&
901 (bptr[2].icount == 1) &&
982 if ((bptr[1].icount == 2) &&
983 (bptr[2].icount == 1) &&
996 if ((bptr[1].icount == 3) &&
997 (bptr[2].icount == 2) &&
1010 if ((bptr[1].icount == 4) &&
1011 (bptr[2].icount == 3) &&
1024 if ((bptr[1].icount == 3) &&
1025 (bptr[2].icount == 1) &&
#define IFCONV_PATTERN_3_SIZE
void vm_abort(const char *text,...)
static s4 ifconv_pattern_4[][2][4]
void show_basicblock(jitdata *jd, basicblock *bptr, int stage)
void method_println(methodinfo *m)
#define IFCONV_PATTERN_4_SIZE
static s4 ifconv_pattern_3[][2][3]
static void check(jitdata *jd, basicblock *bptr)
bool ifconv_static(jitdata *jd)