Lines Matching refs:ebb
6217 ebb_t ebb; member
6257 init_ebb (ebb_t *ebb, in init_ebb() argument
6266 memset (ebb, 0, sizeof (ebb_t)); in init_ebb()
6267 ebb->sec = sec; in init_ebb()
6268 ebb->contents = contents; in init_ebb()
6269 ebb->content_length = content_length; in init_ebb()
6270 ebb->ptbl = prop_table; in init_ebb()
6271 ebb->pte_count = ptblsize; in init_ebb()
6272 ebb->relocs = internal_relocs; in init_ebb()
6273 ebb->reloc_count = reloc_count; in init_ebb()
6274 ebb->start_offset = 0; in init_ebb()
6275 ebb->end_offset = ebb->content_length - 1; in init_ebb()
6276 ebb->start_ptbl_idx = 0; in init_ebb()
6277 ebb->end_ptbl_idx = ptblsize; in init_ebb()
6278 ebb->start_reloc_idx = 0; in init_ebb()
6279 ebb->end_reloc_idx = reloc_count; in init_ebb()
6295 extend_ebb_bounds (ebb_t *ebb) in extend_ebb_bounds() argument
6297 if (!extend_ebb_bounds_forward (ebb)) in extend_ebb_bounds()
6299 if (!extend_ebb_bounds_backward (ebb)) in extend_ebb_bounds()
6306 extend_ebb_bounds_forward (ebb_t *ebb) in extend_ebb_bounds_forward() argument
6310 the_entry = &ebb->ptbl[ebb->end_ptbl_idx]; in extend_ebb_bounds_forward()
6321 entry_end = the_entry->address - ebb->sec->vma + the_entry->size; in extend_ebb_bounds_forward()
6323 insn_block_decodable_len (ebb->contents, ebb->content_length, in extend_ebb_bounds_forward()
6324 ebb->end_offset, in extend_ebb_bounds_forward()
6325 entry_end - ebb->end_offset); in extend_ebb_bounds_forward()
6326 if (insn_block_len != (entry_end - ebb->end_offset)) in extend_ebb_bounds_forward()
6330 ebb->sec->owner, ebb->sec, ebb->end_offset + insn_block_len); in extend_ebb_bounds_forward()
6333 ebb->end_offset += insn_block_len; in extend_ebb_bounds_forward()
6335 if (ebb->end_offset == ebb->sec->size) in extend_ebb_bounds_forward()
6336 ebb->ends_section = TRUE; in extend_ebb_bounds_forward()
6339 while (ebb->end_reloc_idx + 1 < ebb->reloc_count in extend_ebb_bounds_forward()
6340 && (ebb->relocs[ebb->end_reloc_idx + 1].r_offset in extend_ebb_bounds_forward()
6341 < ebb->end_offset)) in extend_ebb_bounds_forward()
6343 ebb->end_reloc_idx++; in extend_ebb_bounds_forward()
6346 if (ebb->end_ptbl_idx + 1 == ebb->pte_count) in extend_ebb_bounds_forward()
6349 new_entry = &ebb->ptbl[ebb->end_ptbl_idx + 1]; in extend_ebb_bounds_forward()
6359 ebb->end_ptbl_idx++; in extend_ebb_bounds_forward()
6363 if (ebb->end_ptbl_idx + 1 == ebb->pte_count) in extend_ebb_bounds_forward()
6365 if (ebb->end_offset == ebb->content_length) in extend_ebb_bounds_forward()
6366 ebb->ends_section = TRUE; in extend_ebb_bounds_forward()
6370 new_entry = &ebb->ptbl[ebb->end_ptbl_idx + 1]; in extend_ebb_bounds_forward()
6373 ebb->ends_unreachable = new_entry; in extend_ebb_bounds_forward()
6382 extend_ebb_bounds_backward (ebb_t *ebb) in extend_ebb_bounds_backward() argument
6386 the_entry = &ebb->ptbl[ebb->start_ptbl_idx]; in extend_ebb_bounds_backward()
6397 block_begin = the_entry->address - ebb->sec->vma; in extend_ebb_bounds_backward()
6399 insn_block_decodable_len (ebb->contents, ebb->content_length, in extend_ebb_bounds_backward()
6401 ebb->start_offset - block_begin); in extend_ebb_bounds_backward()
6402 if (insn_block_len != ebb->start_offset - block_begin) in extend_ebb_bounds_backward()
6406 ebb->sec->owner, ebb->sec, ebb->end_offset + insn_block_len); in extend_ebb_bounds_backward()
6409 ebb->start_offset -= insn_block_len; in extend_ebb_bounds_backward()
6412 while (ebb->start_reloc_idx > 0 in extend_ebb_bounds_backward()
6413 && (ebb->relocs[ebb->start_reloc_idx - 1].r_offset in extend_ebb_bounds_backward()
6414 >= ebb->start_offset)) in extend_ebb_bounds_backward()
6416 ebb->start_reloc_idx--; in extend_ebb_bounds_backward()
6419 if (ebb->start_ptbl_idx == 0) in extend_ebb_bounds_backward()
6422 new_entry = &ebb->ptbl[ebb->start_ptbl_idx - 1]; in extend_ebb_bounds_backward()
6431 ebb->start_ptbl_idx--; in extend_ebb_bounds_backward()
7282 ebb_t *ebb; in compute_text_actions() local
7329 ebb = &ebb_table.ebb; in compute_text_actions()
7330 init_ebb (ebb, sec, contents, sec_size, prop_table, ptblsize, in compute_text_actions()
7332 ebb->start_offset = r_offset + simplify_size; in compute_text_actions()
7333 ebb->end_offset = r_offset + simplify_size; in compute_text_actions()
7334 ebb->start_ptbl_idx = ptbl_idx; in compute_text_actions()
7335 ebb->end_ptbl_idx = ptbl_idx; in compute_text_actions()
7336 ebb->start_reloc_idx = i; in compute_text_actions()
7337 ebb->end_reloc_idx = i; in compute_text_actions()
7344 if (!extend_ebb_bounds (ebb) in compute_text_actions()
7358 i = ebb_table.ebb.end_reloc_idx; in compute_text_actions()
7367 i = ebb_table.ebb.end_reloc_idx; in compute_text_actions()
7410 const ebb_t *ebb = &ebb_table->ebb; in compute_ebb_proposed_actions() local
7411 unsigned rel_idx = ebb->start_reloc_idx; in compute_ebb_proposed_actions()
7425 start_entry = &ebb->ptbl[ebb->start_ptbl_idx]; in compute_ebb_proposed_actions()
7426 end_entry = &ebb->ptbl[ebb->end_ptbl_idx]; in compute_ebb_proposed_actions()
7433 start_offset = entry->address - ebb->sec->vma; in compute_ebb_proposed_actions()
7434 end_offset = entry->address + entry->size - ebb->sec->vma; in compute_ebb_proposed_actions()
7437 start_offset = ebb->start_offset; in compute_ebb_proposed_actions()
7439 end_offset = ebb->end_offset; in compute_ebb_proposed_actions()
7442 if (offset == entry->address - ebb->sec->vma in compute_ebb_proposed_actions()
7450 insn_len = insn_decode_len (ebb->contents, ebb->content_length, in compute_ebb_proposed_actions()
7467 while (rel_idx < ebb->end_reloc_idx in compute_ebb_proposed_actions()
7468 && (ebb->relocs[rel_idx].r_offset < offset in compute_ebb_proposed_actions()
7469 || (ebb->relocs[rel_idx].r_offset == offset in compute_ebb_proposed_actions()
7470 && (ELF32_R_TYPE (ebb->relocs[rel_idx].r_info) in compute_ebb_proposed_actions()
7475 irel = &ebb->relocs[rel_idx]; in compute_ebb_proposed_actions()
7481 simplify_size = get_asm_simplify_size (ebb->contents, in compute_ebb_proposed_actions()
7482 ebb->content_length, in compute_ebb_proposed_actions()
7494 if (offset + MIN_INSN_LENGTH > ebb->content_length) in compute_ebb_proposed_actions()
7496 xtensa_insnbuf_from_chars (isa, insnbuf, &ebb->contents[offset], in compute_ebb_proposed_actions()
7497 ebb->content_length - offset); in compute_ebb_proposed_actions()
7526 && ! prev_instr_is_a_loop (ebb->contents, in compute_ebb_proposed_actions()
7527 ebb->content_length, offset)) in compute_ebb_proposed_actions()
7544 if (ebb->ends_unreachable) in compute_ebb_proposed_actions()
7547 ta_fill, ebb->end_offset, 0, TRUE); in compute_ebb_proposed_actions()
7555 ebb->sec->owner, ebb->sec, offset); in compute_ebb_proposed_actions()
7583 ebb_t *ebb = &ebb_table->ebb; in compute_ebb_actions() local
7605 int align = (1 << ebb_table->ebb.sec->alignment_power); in compute_ebb_actions()
7628 if (seg_idx_end == ebb_table->action_count && !ebb->ends_unreachable) in compute_ebb_actions()
7711 if (ebb_table->ebb.ends_section || ebb_table->ebb.ends_unreachable) in compute_ebb_actions()
7730 (ebb_table->ebb.contents, in compute_ebb_actions()
7731 ebb_table->ebb.content_length, in compute_ebb_actions()
7740 if (!check_loop_aligned (ebb_table->ebb.contents, in compute_ebb_actions()
7741 ebb_table->ebb.content_length, in compute_ebb_actions()
7751 && ebb_table->ebb.sec->alignment_power == 2) in compute_ebb_actions()
7761 && ebb_table->ebb.sec->alignment_power == 2) in compute_ebb_actions()
7793 if ((removed_bytes % (1 << ebb_table->ebb.sec->alignment_power)) != 0 in compute_ebb_actions()
7794 && ebb->ends_unreachable) in compute_ebb_actions()
7803 BFD_ASSERT (ebb->ends_unreachable->flags & XTENSA_PROP_UNREACHABLE); in compute_ebb_actions()
7805 extra_space = compute_fill_extra_space (ebb->ends_unreachable); in compute_ebb_actions()
7807 br = br & ((1 << ebb->sec->alignment_power ) - 1); in compute_ebb_actions()
8724 ebb_t *ebb; in move_shared_literal() local
8762 ebb = &ebb_table.ebb; in move_shared_literal()
8763 init_ebb (ebb, target_sec_cache->sec, target_sec_cache->contents, in move_shared_literal()