Lines Matching defs:DEF
111 #define DEF(s, oargs, iargs, cargs, flags) { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags },
113 #undef DEF
291 TCGOpDef *def;
303 def = &tcg_op_defs[op];
304 n = def->nb_iargs + def->nb_oargs;
312 def = &tcg_op_defs[op];
313 def->args_ct = args_ct;
314 def->sorted_args = sorted_args;
315 n = def->nb_iargs + def->nb_oargs;
1099 const TCGOpDef *def;
1107 def = &tcg_op_defs[c];
1120 nb_oargs = def->nb_oargs;
1121 nb_iargs = def->nb_iargs;
1122 nb_cargs = def->nb_cargs;
1130 nb_cargs = def->nb_cargs;
1132 qemu_log(" %s ", def->name);
1160 nb_oargs = def->nb_oargs;
1161 nb_iargs = def->nb_iargs;
1162 def->nb_cargs;
1163 qemu_log(" %s %s,$", def->name,
1177 qemu_log(" %s ", def->name);
1184 nb_oargs = def->nb_oargs;
1185 nb_iargs = def->nb_iargs;
1186 nb_cargs = def->nb_cargs;
1249 static int get_constraint_priority(const TCGOpDef *def, int k)
1254 arg_ct = &def->args_ct[k];
1271 static void sort_constraints(TCGOpDef *def, int start, int n)
1276 def->sorted_args[start + i] = start + i;
1281 p1 = get_constraint_priority(def, def->sorted_args[start + i]);
1282 p2 = get_constraint_priority(def, def->sorted_args[start + j]);
1284 tmp = def->sorted_args[start + i];
1285 def->sorted_args[start + i] = def->sorted_args[start + j];
1286 def->sorted_args[start + j] = tmp;
1295 TCGOpDef *def;
1304 def = &tcg_op_defs[op];
1307 assert(!def->used);
1308 def->used = 1;
1310 nb_args = def->nb_iargs + def->nb_oargs;
1315 tcg_regset_clear(def->args_ct[i].u.regs);
1316 def->args_ct[i].ct = 0;
1320 assert(oarg < def->nb_oargs);
1321 assert(def->args_ct[oarg].ct & TCG_CT_REG);
1324 def->args_ct[i] = def->args_ct[oarg];
1325 def->args_ct[oarg].ct = TCG_CT_ALIAS;
1326 def->args_ct[oarg].alias_index = i;
1327 def->args_ct[i].ct |= TCG_CT_IALIAS;
1328 def->args_ct[i].alias_index = oarg;
1335 def->args_ct[i].ct |= TCG_CT_CONST;
1339 if (target_parse_constraint(&def->args_ct[i], &ct_str) < 0) {
1341 ct_str, i, def->name);
1353 sort_constraints(def, 0, def->nb_oargs);
1354 sort_constraints(def, def->nb_oargs, def->nb_iargs);
1360 printf("%s: sorted=", def->name);
1361 for(i = 0; i < def->nb_oargs + def->nb_iargs; i++)
1362 printf(" %d", def->sorted_args[i]);
1372 const TCGOpDef *def = &tcg_op_defs[op];
1373 if (def->flags & TCG_OPF_NOT_PRESENT) {
1375 if (def->used) {
1376 fprintf(stderr, "Invalid op definition for %s\n", def->name);
1381 if (!def->used) {
1382 fprintf(stderr, "Missing op definition for %s\n", def->name);
1440 const TCGOpDef *def;
1461 def = &tcg_op_defs[op];
1530 args -= def->nb_args;
1631 args -= def->nb_args;
1632 def->nb_iargs;
1633 nb_oargs = def->nb_oargs;
1638 if (!(def->flags & TCG_OPF_SIDE_EFFECTS) && nb_oargs != 0) {
1646 tcg_set_nop(s, s->gen_opc_buf + op_index, args, def->nb_args);
1669 if (def->flags & TCG_OPF_BB_END) {
1671 } else if (def->flags & TCG_OPF_SIDE_EFFECTS) {
2007 static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def,
2018 oarg_ct = &def->args_ct[0];
2019 arg_ct = &def->args_ct[1];
2089 const TCGOpDef *def, TCGOpcode opc,
2101 nb_oargs = def->nb_oargs;
2102 nb_iargs = def->nb_iargs;
2107 sizeof(TCGArg) * def->nb_cargs);
2112 i = def->sorted_args[nb_oargs + k];
2114 arg_ct = &def->args_ct[i];
2178 if (def->flags & TCG_OPF_BB_END) {
2181 if (def->flags & TCG_OPF_CALL_CLOBBER) {
2189 if (def->flags & TCG_OPF_SIDE_EFFECTS) {
2198 i = def->sorted_args[k];
2200 arg_ct = &def->args_ct[i];
2256 static int tcg_reg_alloc_call(TCGContext *s, const TCGOpDef *def,
2350 arg_ct = &def->args_ct[0];
2435 return nb_iargs + nb_oargs + def->nb_cargs + 1;
2460 const TCGOpDef *def;
2514 def = &tcg_op_defs[opc];
2516 printf("%s: %d %d %d\n", def->name,
2517 def->nb_oargs, def->nb_iargs, def->nb_cargs);
2523 tcg_reg_alloc_mov(s, def, args, s->op_dead_args[op_index],
2550 args += tcg_reg_alloc_call(s, def, opc, args,
2558 if (def->flags & TCG_OPF_NOT_PRESENT) {
2564 tcg_reg_alloc_op(s, def, opc, args, s->op_dead_args[op_index],
2568 args += def->nb_args;