• Home
  • Raw
  • Download

Lines Matching full:reg

67 scan_register_key(const scan_register *reg)  in scan_register_key()  argument
69 unsigned key = reg->file; in scan_register_key()
70 key |= (reg->indices[0] << 4); in scan_register_key()
71 key |= (reg->indices[1] << 18); in scan_register_key()
77 fill_scan_register1d(scan_register *reg, in fill_scan_register1d() argument
80 reg->file = file; in fill_scan_register1d()
81 reg->dimensions = 1; in fill_scan_register1d()
82 reg->indices[0] = index; in fill_scan_register1d()
83 reg->indices[1] = 0; in fill_scan_register1d()
87 fill_scan_register2d(scan_register *reg, in fill_scan_register2d() argument
90 reg->file = file; in fill_scan_register2d()
91 reg->dimensions = 2; in fill_scan_register2d()
92 reg->indices[0] = index1; in fill_scan_register2d()
93 reg->indices[1] = index2; in fill_scan_register2d()
97 scan_register_dst(scan_register *reg, in scan_register_dst() argument
103 fill_scan_register2d(reg, in scan_register_dst()
108 fill_scan_register1d(reg, in scan_register_dst()
115 scan_register_src(scan_register *reg, in scan_register_src() argument
121 fill_scan_register2d(reg, in scan_register_src()
126 fill_scan_register1d(reg, in scan_register_src()
135 scan_register *reg = MALLOC(sizeof(scan_register)); in create_scan_register_src() local
136 scan_register_src(reg, src); in create_scan_register_src()
138 return reg; in create_scan_register_src()
144 scan_register *reg = MALLOC(sizeof(scan_register)); in create_scan_register_dst() local
145 scan_register_dst(reg, dst); in create_scan_register_dst()
147 return reg; in create_scan_register_dst()
203 const scan_register *reg) in is_register_declared() argument
206 &ctx->regs_decl, scan_register_key(reg), in is_register_declared()
207 (void*)reg, sizeof(scan_register)); in is_register_declared()
220 scan_register *reg = (scan_register *)cso_hash_iter_data(iter); in is_any_register_declared() local
221 if (reg->file == file) in is_any_register_declared()
232 scan_register *reg) in is_register_used() argument
235 &ctx->regs_used, scan_register_key(reg), in is_register_used()
236 reg, sizeof(scan_register)); in is_register_used()
244 scan_register *reg) in is_ind_register_used() argument
246 return cso_hash_contains(&ctx->regs_ind_used, reg->file); in is_ind_register_used()
266 scan_register *reg, in check_register_usage() argument
270 if (!check_file_name( ctx, reg->file )) { in check_register_usage()
271 FREE(reg); in check_register_usage()
278 reg->indices[0] = 0; in check_register_usage()
279 reg->indices[1] = 0; in check_register_usage()
280 if (!is_any_register_declared( ctx, reg->file )) in check_register_usage()
281 report_error( ctx, "%s: Undeclared %s register", file_names[reg->file], name ); in check_register_usage()
282 if (!is_ind_register_used(ctx, reg)) in check_register_usage()
283 cso_hash_insert(&ctx->regs_ind_used, reg->file, reg); in check_register_usage()
285 FREE(reg); in check_register_usage()
288 if (!is_register_declared( ctx, reg )) { in check_register_usage()
289 if (reg->dimensions == 2) { in check_register_usage()
290 report_error( ctx, "%s[%d][%d]: Undeclared %s register", file_names[reg->file], in check_register_usage()
291 reg->indices[0], reg->indices[1], name ); in check_register_usage()
294 report_error( ctx, "%s[%d]: Undeclared %s register", file_names[reg->file], in check_register_usage()
295 reg->indices[0], name ); in check_register_usage()
298 if (!is_register_used( ctx, reg )) in check_register_usage()
299 cso_hash_insert(&ctx->regs_used, scan_register_key(reg), reg); in check_register_usage()
301 FREE(reg); in check_register_usage()
341 scan_register *reg = create_scan_register_dst(&inst->Dst[i]); in iter_instruction() local
344 reg, in iter_instruction()
352 scan_register *reg = create_scan_register_src(&inst->Src[i]); in iter_instruction() local
355 reg, in iter_instruction()
379 scan_register *reg) in check_and_declare() argument
381 if (is_register_declared( ctx, reg)) in check_and_declare()
383 file_names[reg->file], reg->indices[0] ); in check_and_declare()
385 scan_register_key(reg), in check_and_declare()
386 reg); in check_and_declare()
423 scan_register *reg = MALLOC(sizeof(scan_register)); in iter_declaration() local
424 fill_scan_register2d(reg, file, i, vert); in iter_declaration()
425 check_and_declare(ctx, reg); in iter_declaration()
431 scan_register *reg = MALLOC(sizeof(scan_register)); in iter_declaration() local
432 fill_scan_register2d(reg, file, i, vert); in iter_declaration()
433 check_and_declare(ctx, reg); in iter_declaration()
436 scan_register *reg = MALLOC(sizeof(scan_register)); in iter_declaration() local
438 fill_scan_register2d(reg, file, i, decl->Dim.Index2D); in iter_declaration()
440 fill_scan_register1d(reg, file, i); in iter_declaration()
442 check_and_declare(ctx, reg); in iter_declaration()
455 scan_register *reg; in iter_immediate() local
464 reg = MALLOC(sizeof(scan_register)); in iter_immediate()
465 fill_scan_register1d(reg, TGSI_FILE_IMMEDIATE, ctx->num_imms); in iter_immediate()
466 cso_hash_insert(&ctx->regs_decl, scan_register_key(reg), reg); in iter_immediate()
528 scan_register *reg = (scan_register *)cso_hash_iter_data(iter); in epilog() local
529 if (!is_register_used(ctx, reg) && !is_ind_register_used(ctx, reg)) { in epilog()
531 file_names[reg->file], reg->indices[0] ); in epilog()
550 scan_register *reg = (scan_register *)cso_hash_iter_data(iter); in regs_hash_destroy() local
552 assert(reg->file < TGSI_FILE_COUNT); in regs_hash_destroy()
553 FREE(reg); in regs_hash_destroy()