Lines Matching refs:DEF
69 #define DEF(s, n, copy_size) { #s, 0, 0, n, n, 0, copy_size },
72 #undef DEF
222 TCGOpDef *def;
234 def = &tcg_op_defs[op];
235 n = def->nb_iargs + def->nb_oargs;
243 def = &tcg_op_defs[op];
244 def->args_ct = args_ct;
245 def->sorted_args = sorted_args;
246 n = def->nb_iargs + def->nb_oargs;
796 const TCGOpDef *def;
804 def = &tcg_op_defs[c];
816 nb_oargs = def->nb_oargs;
817 nb_iargs = def->nb_iargs;
818 nb_cargs = def->nb_cargs;
826 nb_cargs = def->nb_cargs;
828 fprintf(outfile, " %s ", def->name);
860 nb_oargs = def->nb_oargs;
861 nb_iargs = def->nb_iargs;
862 nb_cargs = def->nb_cargs;
863 fprintf(outfile, " %s %s,$", def->name,
876 fprintf(outfile, " %s ", def->name);
883 nb_oargs = def->nb_oargs;
884 nb_iargs = def->nb_iargs;
885 nb_cargs = def->nb_cargs;
937 static int get_constraint_priority(const TCGOpDef *def, int k)
942 arg_ct = &def->args_ct[k];
959 static void sort_constraints(TCGOpDef *def, int start, int n)
964 def->sorted_args[start + i] = start + i;
969 p1 = get_constraint_priority(def, def->sorted_args[start + i]);
970 p2 = get_constraint_priority(def, def->sorted_args[start + j]);
972 tmp = def->sorted_args[start + i];
973 def->sorted_args[start + i] = def->sorted_args[start + j];
974 def->sorted_args[start + j] = tmp;
983 TCGOpDef *def;
992 def = &tcg_op_defs[op];
995 assert(!def->used);
996 def->used = 1;
998 nb_args = def->nb_iargs + def->nb_oargs;
1003 tcg_regset_clear(def->args_ct[i].u.regs);
1004 def->args_ct[i].ct = 0;
1008 assert(oarg < def->nb_oargs);
1009 assert(def->args_ct[oarg].ct & TCG_CT_REG);
1012 def->args_ct[i] = def->args_ct[oarg];
1013 def->args_ct[oarg].ct = TCG_CT_ALIAS;
1014 def->args_ct[oarg].alias_index = i;
1015 def->args_ct[i].ct |= TCG_CT_IALIAS;
1016 def->args_ct[i].alias_index = oarg;
1023 def->args_ct[i].ct |= TCG_CT_CONST;
1027 if (target_parse_constraint(&def->args_ct[i], &ct_str) < 0) {
1029 ct_str, i, def->name);
1041 sort_constraints(def, 0, def->nb_oargs);
1042 sort_constraints(def, def->nb_oargs, def->nb_iargs);
1048 printf("%s: sorted=", def->name);
1049 for(i = 0; i < def->nb_oargs + def->nb_iargs; i++)
1050 printf(" %d", def->sorted_args[i]);
1120 const TCGOpDef *def;
1144 def = &tcg_op_defs[op];
1203 args -= def->nb_args;
1218 args -= def->nb_args;
1219 nb_iargs = def->nb_iargs;
1220 nb_oargs = def->nb_oargs;
1225 if (!(def->flags & TCG_OPF_SIDE_EFFECTS) && nb_oargs != 0) {
1231 tcg_set_nop(s, gen_opc_buf + op_index, args, def->nb_args);
1245 if (def->flags & TCG_OPF_BB_END) {
1247 } else if (def->flags & TCG_OPF_CALL_CLOBBER) {
1506 static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def,
1516 arg_ct = &def->args_ct[0];
1566 const TCGOpDef *def, int opc,
1578 nb_oargs = def->nb_oargs;
1579 nb_iargs = def->nb_iargs;
1584 sizeof(TCGArg) * def->nb_cargs);
1589 i = def->sorted_args[nb_oargs + k];
1591 arg_ct = &def->args_ct[i];
1647 if (def->flags & TCG_OPF_BB_END) {
1663 def->flags & TCG_OPF_CALL_CLOBBER) {
1681 i = def->sorted_args[k];
1683 arg_ct = &def->args_ct[i];
1732 static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def,
1823 arg_ct = &def->args_ct[0];
1907 return nb_iargs + nb_oargs + def->nb_cargs + 1;
1931 const TCGOpDef *def;
1995 def = &tcg_op_defs[opc];
1997 printf("%s: %d %d %d\n", def->name,
1998 def->nb_oargs, def->nb_iargs, def->nb_cargs);
2007 tcg_reg_alloc_mov(s, def, args, dead_iargs);
2044 args += tcg_reg_alloc_call(s, def, opc, args, dead_iargs);
2053 tcg_reg_alloc_op(s, def, opc, args, dead_iargs);
2056 args += def->nb_args;