Lines Matching refs:fragP
433 cvt_frag_to_fill (segT sec ATTRIBUTE_UNUSED, fragS *fragP) in cvt_frag_to_fill() argument
435 switch (fragP->fr_type) in cvt_frag_to_fill()
443 HANDLE_ALIGN (fragP); in cvt_frag_to_fill()
445 know (fragP->fr_next != NULL); in cvt_frag_to_fill()
446 fragP->fr_offset = (fragP->fr_next->fr_address in cvt_frag_to_fill()
447 - fragP->fr_address in cvt_frag_to_fill()
448 - fragP->fr_fix) / fragP->fr_var; in cvt_frag_to_fill()
449 if (fragP->fr_offset < 0) in cvt_frag_to_fill()
451 as_bad_where (fragP->fr_file, fragP->fr_line, in cvt_frag_to_fill()
453 (long) fragP->fr_offset); in cvt_frag_to_fill()
454 fragP->fr_offset = 0; in cvt_frag_to_fill()
456 fragP->fr_type = rs_fill; in cvt_frag_to_fill()
464 valueT value = S_GET_VALUE (fragP->fr_symbol); in cvt_frag_to_fill()
467 size = output_leb128 (fragP->fr_literal + fragP->fr_fix, value, in cvt_frag_to_fill()
468 fragP->fr_subtype); in cvt_frag_to_fill()
470 fragP->fr_fix += size; in cvt_frag_to_fill()
471 fragP->fr_type = rs_fill; in cvt_frag_to_fill()
472 fragP->fr_var = 0; in cvt_frag_to_fill()
473 fragP->fr_offset = 0; in cvt_frag_to_fill()
474 fragP->fr_symbol = NULL; in cvt_frag_to_fill()
479 eh_frame_convert_frag (fragP); in cvt_frag_to_fill()
483 dwarf2dbg_convert_frag (fragP); in cvt_frag_to_fill()
487 md_convert_frag (stdoutput, sec, fragP); in cvt_frag_to_fill()
489 gas_assert (fragP->fr_next == NULL in cvt_frag_to_fill()
490 || ((offsetT) (fragP->fr_next->fr_address - fragP->fr_address) in cvt_frag_to_fill()
491 == fragP->fr_fix)); in cvt_frag_to_fill()
496 frag_wane (fragP); in cvt_frag_to_fill()
504 if (fragP->fr_subtype) in cvt_frag_to_fill()
506 fragP->fr_fix += md_short_jump_size; in cvt_frag_to_fill()
507 for (lie = (struct broken_word *) (fragP->fr_symbol); in cvt_frag_to_fill()
508 lie && lie->dispfrag == fragP; in cvt_frag_to_fill()
511 fragP->fr_fix += md_long_jump_size; in cvt_frag_to_fill()
513 frag_wane (fragP); in cvt_frag_to_fill()
519 BAD_CASE (fragP->fr_type); in cvt_frag_to_fill()
523 md_frag_check (fragP); in cvt_frag_to_fill()
900 fragS *fragP; in fixup_segment() local
939 fragP = fixP->fx_frag; in fixup_segment()
940 know (fragP); in fixup_segment()
1090 sprint_value (buf, fragP->fr_address + fixP->fx_where); in fixup_segment()
1110 (long) (fragP->fr_address + fixP->fx_where)); in fixup_segment()
1797 fragS *fragP; /* Track along all frags. */ in write_object_file() local
1926 fragP = lie->dispfrag; in write_object_file()
1931 untruth && untruth->dispfrag == fragP; in write_object_file()
1949 lie && lie->dispfrag == fragP; in write_object_file()
1955 for (untruth = (struct broken_word *) (fragP->fr_symbol); in write_object_file()
1956 untruth && untruth->dispfrag == fragP; in write_object_file()
2198 relax_frag (segT segment, fragS *fragP, long stretch) in relax_frag() argument
2211 target = fragP->fr_offset; in relax_frag()
2212 address = fragP->fr_address; in relax_frag()
2214 this_state = fragP->fr_subtype; in relax_frag()
2216 symbolP = fragP->fr_symbol; in relax_frag()
2240 && sym_frag->relax_marker != fragP->relax_marker in relax_frag()
2244 || sym_frag->region == fragP->region) in relax_frag()
2252 target = fragP->fr_next->fr_address + stretch; in relax_frag()
2256 aim = target - address - fragP->fr_fix; in relax_frag()
2259 aim += TC_PCREL_ADJUST (fragP); in relax_frag()
2264 md_prepare_relax_scan (fragP, address, aim, this_state, this_type); in relax_frag()
2298 fragP->fr_subtype = this_state; in relax_frag()
2338 struct frag *fragP; in relax_segment() local
2350 for (frag_count = 0, fragP = segment_frag_root; in relax_segment()
2351 fragP; in relax_segment()
2352 fragP = fragP->fr_next, frag_count ++) in relax_segment()
2354 fragP->region = region; in relax_segment()
2355 fragP->relax_marker = 0; in relax_segment()
2356 fragP->fr_address = address; in relax_segment()
2357 address += fragP->fr_fix; in relax_segment()
2359 switch (fragP->fr_type) in relax_segment()
2362 address += fragP->fr_offset * fragP->fr_var; in relax_segment()
2369 addressT offset = relax_align (address, (int) fragP->fr_offset); in relax_segment()
2371 if (fragP->fr_subtype != 0 && offset > fragP->fr_subtype) in relax_segment()
2374 if (offset % fragP->fr_var != 0) in relax_segment()
2376 as_bad_where (fragP->fr_file, fragP->fr_line, in relax_segment()
2378 (unsigned long) offset, (long) fragP->fr_var); in relax_segment()
2379 offset -= (offset % fragP->fr_var); in relax_segment()
2399 if (fragP->fr_symbol) in relax_segment()
2400 resolve_symbol_value (fragP->fr_symbol); in relax_segment()
2402 address += md_estimate_size_before_relax (fragP, segment); in relax_segment()
2414 address += fragP->fr_offset = 1; in relax_segment()
2418 address += eh_frame_estimate_size_before_relax (fragP); in relax_segment()
2422 address += dwarf2dbg_estimate_size_before_relax (fragP); in relax_segment()
2426 BAD_CASE (fragP->fr_type); in relax_segment()
2487 for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next) in relax_segment()
2494 fragP->relax_marker ^= 1; in relax_segment()
2495 was_address = fragP->fr_address; in relax_segment()
2496 address = fragP->fr_address += stretch; in relax_segment()
2497 symbolP = fragP->fr_symbol; in relax_segment()
2498 offset = fragP->fr_offset; in relax_segment()
2500 switch (fragP->fr_type) in relax_segment()
2521 for (lie = (struct broken_word *) (fragP->fr_symbol); in relax_segment()
2522 lie && lie->dispfrag == fragP; in relax_segment()
2538 as_warn_where (fragP->fr_file, fragP->fr_line, in relax_segment()
2544 if (fragP->fr_subtype == 0) in relax_segment()
2546 fragP->fr_subtype++; in relax_segment()
2554 for (untruth = (struct broken_word *) (fragP->fr_symbol); in relax_segment()
2580 oldoff = relax_align (was_address + fragP->fr_fix, in relax_segment()
2582 newoff = relax_align (address + fragP->fr_fix, in relax_segment()
2585 if (fragP->fr_subtype != 0) in relax_segment()
2587 if (oldoff > fragP->fr_subtype) in relax_segment()
2589 if (newoff > fragP->fr_subtype) in relax_segment()
2608 obstack_blank_fast (ob, fragP->fr_var); in relax_segment()
2610 memcpy (newf, fragP, SIZEOF_STRUCT_FRAG); in relax_segment()
2612 fragP->fr_literal + fragP->fr_fix, in relax_segment()
2613 fragP->fr_var); in relax_segment()
2615 newf->fr_address = address + fragP->fr_fix + newoff; in relax_segment()
2617 newf->fr_offset = (((offsetT) 1 << fragP->fr_offset) in relax_segment()
2618 / fragP->fr_var); in relax_segment()
2620 != (offsetT) 1 << fragP->fr_offset) in relax_segment()
2622 newf->fr_offset = (offsetT) 1 << fragP->fr_offset; in relax_segment()
2631 fragP->fr_next = newf; in relax_segment()
2654 know (fragP->fr_next); in relax_segment()
2655 after = fragP->fr_next->fr_address + stretch; in relax_segment()
2682 as_bad_where (fragP->fr_file, fragP->fr_line, in relax_segment()
2687 fragP->fr_type = rs_align; in relax_segment()
2688 fragP->fr_subtype = 0; in relax_segment()
2689 fragP->fr_offset = 0; in relax_segment()
2690 fragP->fr_fix = after - address; in relax_segment()
2706 as_bad_where (fragP->fr_file, fragP->fr_line, in relax_segment()
2709 fragP->fr_symbol = 0; in relax_segment()
2721 as_warn_where (fragP->fr_file, fragP->fr_line, in relax_segment()
2723 fragP->fr_symbol = 0; in relax_segment()
2726 growth = (was_address + fragP->fr_fix + amount in relax_segment()
2727 - fragP->fr_next->fr_address); in relax_segment()
2733 growth = md_relax_frag (segment, fragP, stretch); in relax_segment()
2738 growth = relax_frag (segment, fragP, stretch); in relax_segment()
2748 value = resolve_symbol_value (fragP->fr_symbol); in relax_segment()
2749 size = sizeof_leb128 (value, fragP->fr_subtype); in relax_segment()
2750 growth = size - fragP->fr_offset; in relax_segment()
2751 fragP->fr_offset = size; in relax_segment()
2756 growth = eh_frame_relax_frag (fragP); in relax_segment()
2760 growth = dwarf2dbg_relax_frag (fragP); in relax_segment()
2764 BAD_CASE (fragP->fr_type); in relax_segment()
2771 if (fragP->fr_type == rs_leb128) in relax_segment()
2773 else if (fragP->fr_type == rs_align in relax_segment()
2797 for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next) in relax_segment()
2798 if (fragP->last_fr_address != fragP->fr_address) in relax_segment()
2800 fragP->last_fr_address = fragP->fr_address; in relax_segment()