Lines Matching refs:sinfo

2377   struct spu_elf_stack_info *sinfo = sec_data->u.i.stack_info;  in maybe_insert_function()  local
2381 if (sinfo == NULL) in maybe_insert_function()
2383 sinfo = alloc_stack_info (sec, 20); in maybe_insert_function()
2384 if (sinfo == NULL) in maybe_insert_function()
2401 for (i = sinfo->num_fun; --i >= 0; ) in maybe_insert_function()
2402 if (sinfo->fun[i].lo <= off) in maybe_insert_function()
2409 if (sinfo->fun[i].lo == off) in maybe_insert_function()
2412 if (global && !sinfo->fun[i].global) in maybe_insert_function()
2414 sinfo->fun[i].global = TRUE; in maybe_insert_function()
2415 sinfo->fun[i].u.h = sym_h; in maybe_insert_function()
2418 sinfo->fun[i].is_func = TRUE; in maybe_insert_function()
2419 return &sinfo->fun[i]; in maybe_insert_function()
2422 else if (sinfo->fun[i].hi > off && size == 0) in maybe_insert_function()
2423 return &sinfo->fun[i]; in maybe_insert_function()
2426 if (sinfo->num_fun >= sinfo->max_fun) in maybe_insert_function()
2431 old += (sinfo->max_fun - 1) * sizeof (struct function_info); in maybe_insert_function()
2432 sinfo->max_fun += 20 + (sinfo->max_fun >> 1); in maybe_insert_function()
2433 amt += (sinfo->max_fun - 1) * sizeof (struct function_info); in maybe_insert_function()
2434 sinfo = bfd_realloc (sinfo, amt); in maybe_insert_function()
2435 if (sinfo == NULL) in maybe_insert_function()
2437 memset ((char *) sinfo + old, 0, amt - old); in maybe_insert_function()
2438 sec_data->u.i.stack_info = sinfo; in maybe_insert_function()
2441 if (++i < sinfo->num_fun) in maybe_insert_function()
2442 memmove (&sinfo->fun[i + 1], &sinfo->fun[i], in maybe_insert_function()
2443 (sinfo->num_fun - i) * sizeof (sinfo->fun[i])); in maybe_insert_function()
2444 sinfo->fun[i].is_func = is_func; in maybe_insert_function()
2445 sinfo->fun[i].global = global; in maybe_insert_function()
2446 sinfo->fun[i].sec = sec; in maybe_insert_function()
2448 sinfo->fun[i].u.h = sym_h; in maybe_insert_function()
2450 sinfo->fun[i].u.sym = sym_h; in maybe_insert_function()
2451 sinfo->fun[i].lo = off; in maybe_insert_function()
2452 sinfo->fun[i].hi = off + size; in maybe_insert_function()
2453 sinfo->fun[i].lr_store = -1; in maybe_insert_function()
2454 sinfo->fun[i].sp_adjust = -1; in maybe_insert_function()
2455 sinfo->fun[i].stack = -find_function_stack_adjust (sec, off, in maybe_insert_function()
2456 &sinfo->fun[i].lr_store, in maybe_insert_function()
2457 &sinfo->fun[i].sp_adjust); in maybe_insert_function()
2458 sinfo->num_fun += 1; in maybe_insert_function()
2459 return &sinfo->fun[i]; in maybe_insert_function()
2537 struct spu_elf_stack_info *sinfo = sec_data->u.i.stack_info; in check_function_ranges() local
2541 if (sinfo == NULL) in check_function_ranges()
2544 for (i = 1; i < sinfo->num_fun; i++) in check_function_ranges()
2545 if (sinfo->fun[i - 1].hi > sinfo->fun[i].lo) in check_function_ranges()
2548 const char *f1 = func_name (&sinfo->fun[i - 1]); in check_function_ranges()
2549 const char *f2 = func_name (&sinfo->fun[i]); in check_function_ranges()
2552 sinfo->fun[i - 1].hi = sinfo->fun[i].lo; in check_function_ranges()
2554 else if (insns_at_end (&sinfo->fun[i - 1], sinfo->fun[i].lo)) in check_function_ranges()
2557 if (sinfo->num_fun == 0) in check_function_ranges()
2561 if (sinfo->fun[0].lo != 0) in check_function_ranges()
2563 if (sinfo->fun[sinfo->num_fun - 1].hi > sec->size) in check_function_ranges()
2565 const char *f1 = func_name (&sinfo->fun[sinfo->num_fun - 1]); in check_function_ranges()
2568 sinfo->fun[sinfo->num_fun - 1].hi = sec->size; in check_function_ranges()
2570 else if (insns_at_end (&sinfo->fun[sinfo->num_fun - 1], sec->size)) in check_function_ranges()
2583 struct spu_elf_stack_info *sinfo = sec_data->u.i.stack_info; in find_function() local
2587 hi = sinfo->num_fun; in find_function()
2591 if (offset < sinfo->fun[mid].lo) in find_function()
2593 else if (offset >= sinfo->fun[mid].hi) in find_function()
2596 return &sinfo->fun[mid]; in find_function()
2887 struct spu_elf_stack_info *sinfo; in pasted_function() local
2929 && (sinfo = sec_data->u.i.stack_info) != NULL in pasted_function()
2930 && sinfo->num_fun != 0) in pasted_function()
2931 fun_start = &sinfo->fun[sinfo->num_fun - 1]; in pasted_function()
3140 struct spu_elf_stack_info *sinfo; in discover_functions() local
3143 sinfo = sec_data->u.i.stack_info; in discover_functions()
3144 if (sinfo != NULL && sinfo->num_fun != 0) in discover_functions()
3149 for (fun_idx = sinfo->num_fun; --fun_idx >= 0; ) in discover_functions()
3151 sinfo->fun[fun_idx].hi = hi; in discover_functions()
3152 hi = sinfo->fun[fun_idx].lo; in discover_functions()
3155 sinfo->fun[0].lo = 0; in discover_functions()
3207 struct spu_elf_stack_info *sinfo; in for_each_node() local
3210 && (sinfo = sec_data->u.i.stack_info) != NULL) in for_each_node()
3213 for (i = 0; i < sinfo->num_fun; ++i) in for_each_node()
3214 if (!root_only || !sinfo->fun[i].non_root) in for_each_node()
3215 if (!doit (&sinfo->fun[i], info, param)) in for_each_node()
3681 struct spu_elf_stack_info *sinfo; in sort_lib() local
3686 && (sinfo = sec_data->u.i.stack_info) != NULL) in sort_lib()
3689 for (i = 0; i < sinfo->num_fun; ++i) in sort_lib()
3690 delta -= sinfo->fun[i].call_count; in sort_lib()
3694 && (sinfo = sec_data->u.i.stack_info) != NULL) in sort_lib()
3697 for (i = 0; i < sinfo->num_fun; ++i) in sort_lib()
3698 delta += sinfo->fun[i].call_count; in sort_lib()
3756 struct spu_elf_stack_info *sinfo; in auto_ovl_lib_functions() local
3768 && (sinfo = sec_data->u.i.stack_info) != NULL) in auto_ovl_lib_functions()
3773 for (k = 0; k < sinfo->num_fun; ++k) in auto_ovl_lib_functions()
3774 for (call = sinfo->fun[k].call_list; call; call = call->next) in auto_ovl_lib_functions()
3808 && (sinfo = sec_data->u.i.stack_info) != NULL) in auto_ovl_lib_functions()
3813 for (k = 0; k < sinfo->num_fun; ++k) in auto_ovl_lib_functions()
3814 for (call = sinfo->fun[k].call_list; in auto_ovl_lib_functions()
3915 struct spu_elf_stack_info *sinfo; in collect_overlays() local
3918 && (sinfo = sec_data->u.i.stack_info) != NULL) in collect_overlays()
3921 for (i = 0; i < sinfo->num_fun; ++i) in collect_overlays()
3922 if (!collect_overlays (&sinfo->fun[i], info, ovly_sections)) in collect_overlays()
4059 struct spu_elf_stack_info *sinfo = sec_data->u.i.stack_info; in find_pasted_call() local
4063 for (k = 0; k < sinfo->num_fun; ++k) in find_pasted_call()
4064 for (call = sinfo->fun[k].call_list; call != NULL; call = call->next) in find_pasted_call()
4418 struct spu_elf_stack_info *sinfo; in spu_elf_auto_overlay() local
4465 sinfo = sec_data->u.i.stack_info; in spu_elf_auto_overlay()
4466 for (k = 0; k < (unsigned) sinfo->num_fun; ++k) in spu_elf_auto_overlay()
4467 for (call = sinfo->fun[k].call_list; call; call = call->next) in spu_elf_auto_overlay()