• Home
  • Raw
  • Download

Lines Matching refs:args

515                                     TCGArg *args, TCGOpDef *tcg_op_defs)  in tcg_constant_folding()  argument
534 gen_args = args; in tcg_constant_folding()
540 int nb_oargs = args[0] >> 16; in tcg_constant_folding()
541 int nb_iargs = args[0] & 0xffff; in tcg_constant_folding()
543 if (temps[args[i]].state == TCG_TEMP_COPY) { in tcg_constant_folding()
544 args[i] = find_better_copy(s, args[i]); in tcg_constant_folding()
549 if (temps[args[i]].state == TCG_TEMP_COPY) { in tcg_constant_folding()
550 args[i] = find_better_copy(s, args[i]); in tcg_constant_folding()
567 swap_commutative(args[0], &args[1], &args[2]); in tcg_constant_folding()
570 if (swap_commutative(-1, &args[0], &args[1])) { in tcg_constant_folding()
571 args[2] = tcg_swap_cond(args[2]); in tcg_constant_folding()
575 if (swap_commutative(args[0], &args[1], &args[2])) { in tcg_constant_folding()
576 args[3] = tcg_swap_cond(args[3]); in tcg_constant_folding()
580 if (swap_commutative(-1, &args[1], &args[2])) { in tcg_constant_folding()
581 args[5] = tcg_swap_cond(args[5]); in tcg_constant_folding()
586 if (swap_commutative(args[0], &args[4], &args[3])) { in tcg_constant_folding()
587 args[5] = tcg_invert_cond(args[5]); in tcg_constant_folding()
591 swap_commutative(args[0], &args[2], &args[4]); in tcg_constant_folding()
592 swap_commutative(args[1], &args[3], &args[5]); in tcg_constant_folding()
596 swap_commutative(args[0], &args[2], &args[3]); in tcg_constant_folding()
599 if (swap_commutative2(&args[0], &args[2])) { in tcg_constant_folding()
600 args[4] = tcg_swap_cond(args[4]); in tcg_constant_folding()
604 if (swap_commutative2(&args[1], &args[3])) { in tcg_constant_folding()
605 args[5] = tcg_swap_cond(args[5]); in tcg_constant_folding()
620 if (temps[args[1]].state == TCG_TEMP_CONST in tcg_constant_folding()
621 && temps[args[1]].val == 0) { in tcg_constant_folding()
623 tcg_opt_gen_movi(gen_args, args[0], 0); in tcg_constant_folding()
624 args += 3; in tcg_constant_folding()
634 if (temps[args[2]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
648 if (temps[args[1]].state == TCG_TEMP_CONST in tcg_constant_folding()
649 && temps[args[1]].val == 0) { in tcg_constant_folding()
651 reset_temp(args[0]); in tcg_constant_folding()
652 gen_args[0] = args[0]; in tcg_constant_folding()
653 gen_args[1] = args[2]; in tcg_constant_folding()
654 args += 3; in tcg_constant_folding()
675 if (temps[args[1]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
679 if (temps[args[2]].state == TCG_TEMP_CONST in tcg_constant_folding()
680 && temps[args[2]].val == 0) { in tcg_constant_folding()
681 if (temps_are_copies(args[0], args[1])) { in tcg_constant_folding()
685 tcg_opt_gen_mov(s, gen_args, args[0], args[1]); in tcg_constant_folding()
688 args += 3; in tcg_constant_folding()
701 if ((temps[args[1]].mask & 0x80) != 0) { in tcg_constant_folding()
708 if ((temps[args[1]].mask & 0x8000) != 0) { in tcg_constant_folding()
715 if ((temps[args[1]].mask & 0x80000000) != 0) { in tcg_constant_folding()
723 mask = temps[args[2]].mask; in tcg_constant_folding()
724 if (temps[args[2]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
726 affected = temps[args[1]].mask & ~mask; in tcg_constant_folding()
728 mask = temps[args[1]].mask & mask; in tcg_constant_folding()
732 if (temps[args[2]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
733 mask = ((tcg_target_long)temps[args[1]].mask in tcg_constant_folding()
734 >> temps[args[2]].val); in tcg_constant_folding()
739 if (temps[args[2]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
740 mask = temps[args[1]].mask >> temps[args[2]].val; in tcg_constant_folding()
745 if (temps[args[2]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
746 mask = temps[args[1]].mask << temps[args[2]].val; in tcg_constant_folding()
752 mask = -(temps[args[1]].mask & -temps[args[1]].mask); in tcg_constant_folding()
756 tmp = ((1ull << args[4]) - 1); in tcg_constant_folding()
757 mask = ((temps[args[1]].mask & ~(tmp << args[3])) in tcg_constant_folding()
758 | ((temps[args[2]].mask & tmp) << args[3])); in tcg_constant_folding()
763 mask = temps[args[1]].mask | temps[args[2]].mask; in tcg_constant_folding()
771 mask = temps[args[3]].mask | temps[args[4]].mask; in tcg_constant_folding()
781 tcg_opt_gen_movi(gen_args, args[0], 0); in tcg_constant_folding()
782 args += def->nb_oargs + def->nb_iargs + def->nb_cargs; in tcg_constant_folding()
788 if (temps_are_copies(args[0], args[1])) { in tcg_constant_folding()
790 } else if (temps[args[1]].state != TCG_TEMP_CONST) { in tcg_constant_folding()
792 tcg_opt_gen_mov(s, gen_args, args[0], args[1]); in tcg_constant_folding()
796 tcg_opt_gen_movi(gen_args, args[0], temps[args[1]].val); in tcg_constant_folding()
799 args += def->nb_iargs + 1; in tcg_constant_folding()
809 if ((temps[args[2]].state == TCG_TEMP_CONST in tcg_constant_folding()
810 && temps[args[2]].val == 0)) { in tcg_constant_folding()
812 tcg_opt_gen_movi(gen_args, args[0], 0); in tcg_constant_folding()
813 args += 3; in tcg_constant_folding()
826 if (temps_are_copies(args[1], args[2])) { in tcg_constant_folding()
827 if (temps_are_copies(args[0], args[1])) { in tcg_constant_folding()
831 tcg_opt_gen_mov(s, gen_args, args[0], args[1]); in tcg_constant_folding()
834 args += 3; in tcg_constant_folding()
846 if (temps_are_copies(args[1], args[2])) { in tcg_constant_folding()
848 tcg_opt_gen_movi(gen_args, args[0], 0); in tcg_constant_folding()
850 args += 3; in tcg_constant_folding()
863 if (temps_are_copies(args[0], args[1])) { in tcg_constant_folding()
864 args += 2; in tcg_constant_folding()
868 if (temps[args[1]].state != TCG_TEMP_CONST) { in tcg_constant_folding()
869 tcg_opt_gen_mov(s, gen_args, args[0], args[1]); in tcg_constant_folding()
871 args += 2; in tcg_constant_folding()
878 args[1] = temps[args[1]].val; in tcg_constant_folding()
881 tcg_opt_gen_movi(gen_args, args[0], args[1]); in tcg_constant_folding()
883 args += 2; in tcg_constant_folding()
894 if (temps[args[1]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
896 tmp = do_constant_folding(op, temps[args[1]].val, 0); in tcg_constant_folding()
897 tcg_opt_gen_movi(gen_args, args[0], tmp); in tcg_constant_folding()
899 args += 2; in tcg_constant_folding()
926 if (temps[args[1]].state == TCG_TEMP_CONST in tcg_constant_folding()
927 && temps[args[2]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
929 tmp = do_constant_folding(op, temps[args[1]].val, in tcg_constant_folding()
930 temps[args[2]].val); in tcg_constant_folding()
931 tcg_opt_gen_movi(gen_args, args[0], tmp); in tcg_constant_folding()
933 args += 3; in tcg_constant_folding()
939 if (temps[args[1]].state == TCG_TEMP_CONST in tcg_constant_folding()
940 && temps[args[2]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
942 tmp = ((1ull << args[4]) - 1); in tcg_constant_folding()
943 tmp = (temps[args[1]].val & ~(tmp << args[3])) in tcg_constant_folding()
944 | ((temps[args[2]].val & tmp) << args[3]); in tcg_constant_folding()
945 tcg_opt_gen_movi(gen_args, args[0], tmp); in tcg_constant_folding()
947 args += 5; in tcg_constant_folding()
953 tmp = do_constant_folding_cond(op, args[1], args[2], args[3]); in tcg_constant_folding()
956 tcg_opt_gen_movi(gen_args, args[0], tmp); in tcg_constant_folding()
958 args += 4; in tcg_constant_folding()
964 tmp = do_constant_folding_cond(op, args[0], args[1], args[2]); in tcg_constant_folding()
969 gen_args[0] = args[3]; in tcg_constant_folding()
974 args += 4; in tcg_constant_folding()
980 tmp = do_constant_folding_cond(op, args[1], args[2], args[5]); in tcg_constant_folding()
982 if (temps_are_copies(args[0], args[4-tmp])) { in tcg_constant_folding()
984 } else if (temps[args[4-tmp]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
986 tcg_opt_gen_movi(gen_args, args[0], temps[args[4-tmp]].val); in tcg_constant_folding()
990 tcg_opt_gen_mov(s, gen_args, args[0], args[4-tmp]); in tcg_constant_folding()
993 args += 6; in tcg_constant_folding()
1000 if (temps[args[2]].state == TCG_TEMP_CONST in tcg_constant_folding()
1001 && temps[args[3]].state == TCG_TEMP_CONST in tcg_constant_folding()
1002 && temps[args[4]].state == TCG_TEMP_CONST in tcg_constant_folding()
1003 && temps[args[5]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
1004 uint32_t al = temps[args[2]].val; in tcg_constant_folding()
1005 uint32_t ah = temps[args[3]].val; in tcg_constant_folding()
1006 uint32_t bl = temps[args[4]].val; in tcg_constant_folding()
1007 uint32_t bh = temps[args[5]].val; in tcg_constant_folding()
1021 rl = args[0]; in tcg_constant_folding()
1022 rh = args[1]; in tcg_constant_folding()
1028 args += 6; in tcg_constant_folding()
1034 if (temps[args[2]].state == TCG_TEMP_CONST in tcg_constant_folding()
1035 && temps[args[3]].state == TCG_TEMP_CONST) { in tcg_constant_folding()
1036 uint32_t a = temps[args[2]].val; in tcg_constant_folding()
1037 uint32_t b = temps[args[3]].val; in tcg_constant_folding()
1044 rl = args[0]; in tcg_constant_folding()
1045 rh = args[1]; in tcg_constant_folding()
1051 args += 4; in tcg_constant_folding()
1057 tmp = do_constant_folding_cond2(&args[0], &args[2], args[4]); in tcg_constant_folding()
1062 gen_args[0] = args[5]; in tcg_constant_folding()
1067 } else if ((args[4] == TCG_COND_LT || args[4] == TCG_COND_GE) in tcg_constant_folding()
1068 && temps[args[2]].state == TCG_TEMP_CONST in tcg_constant_folding()
1069 && temps[args[3]].state == TCG_TEMP_CONST in tcg_constant_folding()
1070 && temps[args[2]].val == 0 in tcg_constant_folding()
1071 && temps[args[3]].val == 0) { in tcg_constant_folding()
1076 gen_args[0] = args[1]; in tcg_constant_folding()
1077 gen_args[1] = args[3]; in tcg_constant_folding()
1078 gen_args[2] = args[4]; in tcg_constant_folding()
1079 gen_args[3] = args[5]; in tcg_constant_folding()
1084 args += 6; in tcg_constant_folding()
1088 tmp = do_constant_folding_cond2(&args[1], &args[3], args[5]); in tcg_constant_folding()
1091 tcg_opt_gen_movi(gen_args, args[0], tmp); in tcg_constant_folding()
1093 } else if ((args[5] == TCG_COND_LT || args[5] == TCG_COND_GE) in tcg_constant_folding()
1094 && temps[args[3]].state == TCG_TEMP_CONST in tcg_constant_folding()
1095 && temps[args[4]].state == TCG_TEMP_CONST in tcg_constant_folding()
1096 && temps[args[3]].val == 0 in tcg_constant_folding()
1097 && temps[args[4]].val == 0) { in tcg_constant_folding()
1101 reset_temp(args[0]); in tcg_constant_folding()
1102 gen_args[0] = args[0]; in tcg_constant_folding()
1103 gen_args[1] = args[2]; in tcg_constant_folding()
1104 gen_args[2] = args[4]; in tcg_constant_folding()
1105 gen_args[3] = args[5]; in tcg_constant_folding()
1110 args += 6; in tcg_constant_folding()
1114 nb_call_args = (args[0] >> 16) + (args[0] & 0xffff); in tcg_constant_folding()
1115 if (!(args[nb_call_args + 1] & (TCG_CALL_NO_READ_GLOBALS | in tcg_constant_folding()
1121 for (i = 0; i < (args[0] >> 16); i++) { in tcg_constant_folding()
1122 reset_temp(args[i + 1]); in tcg_constant_folding()
1126 *gen_args = *args; in tcg_constant_folding()
1127 args++; in tcg_constant_folding()
1144 reset_temp(args[i]); in tcg_constant_folding()
1148 gen_args[i] = args[i]; in tcg_constant_folding()
1150 args += def->nb_args; in tcg_constant_folding()
1160 TCGArg *args, TCGOpDef *tcg_op_defs) in tcg_optimize() argument
1163 res = tcg_constant_folding(s, tcg_opc_ptr, args, tcg_op_defs); in tcg_optimize()