Lines Matching refs:fragP

395 md_estimate_size_before_relax (fragS *fragP, segT segment)
397 if (RELAX_LENGTH (fragP->fr_subtype) == STATE_UNDF)
399 if (S_GET_SEGMENT (fragP->fr_symbol) != segment
401 || S_IS_WEAK (fragP->fr_symbol)
402 || S_IS_EXTERNAL (fragP->fr_symbol)
411 old_fr_fix = fragP->fr_fix;
412 p = &fragP->fr_literal[0] + old_fr_fix;
423 if ((GOT_symbol == NULL || fragP->fr_symbol != GOT_symbol)
424 && (PLT_symbol == NULL || fragP->fr_symbol != PLT_symbol)
425 && fragP->fr_symbol != NULL
428 && ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol)) != STV_HIDDEN
430 && (!S_IS_DEFINED (fragP->fr_symbol)
431 || S_IS_WEAK (fragP->fr_symbol)
432 || S_IS_EXTERNAL (fragP->fr_symbol)))
436 if ((ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol))
440 else if (((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLS
441 || ((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLG
442 || ((unsigned char *) fragP->fr_opcode)[0] == VAX_JSB
443 || ((unsigned char *) fragP->fr_opcode)[0] == VAX_JMP
444 || S_IS_FUNCTION (fragP->fr_symbol))
450 switch (RELAX_STATE (fragP->fr_subtype))
454 fragP->fr_fix += 1 + 4;
455 fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
456 fragP->fr_offset, 1, reloc_type);
460 *fragP->fr_opcode ^= 1; /* Reverse sense of branch. */
464 fragP->fr_fix += 1 + 1 + 1 + 4;
465 fix_new (fragP, old_fr_fix + 3, 4, fragP->fr_symbol,
466 fragP->fr_offset, 1, NO_RELOC);
476 fragP->fr_fix += 2 + 2 + 1 + 1 + 4;
477 fix_new (fragP, old_fr_fix + 6, 4, fragP->fr_symbol,
478 fragP->fr_offset, 1, NO_RELOC);
487 fragP->fr_fix += 1 + 2 + 1 + 1 + 4;
488 fix_new (fragP, old_fr_fix + 5, 4, fragP->fr_symbol,
489 fragP->fr_offset, 1, NO_RELOC);
493 *fragP->fr_opcode += VAX_WIDEN_LONG;
495 fragP->fr_fix += 1 + 4;
496 fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
497 fragP->fr_offset, 1, NO_RELOC);
503 frag_wane (fragP);
506 return fragP->fr_fix - old_fr_fix;
511 switch (RELAX_STATE (fragP->fr_subtype))
514 fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE);
517 fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE);
520 fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_BRANCH, STATE_WORD);
523 fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_HOP, STATE_BYTE);
526 fragP->fr_subtype = ENCODE_RELAX (STATE_ALWAYS_BRANCH, STATE_BYTE);
531 if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0]))
535 return md_relax_table[fragP->fr_subtype].rlx_length;
549 fragS *fragP)
558 know (fragP->fr_type == rs_machine_dependent);
559 where = fragP->fr_fix;
560 addressP = &fragP->fr_literal[0] + where;
561 opcodeP = fragP->fr_opcode;
562 symbolP = fragP->fr_symbol;
565 switch (fragP->fr_subtype)
570 fix_new (fragP, fragP->fr_fix + 1, 1, fragP->fr_symbol,
571 fragP->fr_offset, 1, NO_RELOC);
578 fix_new (fragP, fragP->fr_fix + 1, 2, fragP->fr_symbol,
579 fragP->fr_offset, 1, NO_RELOC);
586 fix_new (fragP, fragP->fr_fix + 1, 4, fragP->fr_symbol,
587 fragP->fr_offset, 1, NO_RELOC);
592 fix_new (fragP, fragP->fr_fix, 1, fragP->fr_symbol,
593 fragP->fr_offset, 1, NO_RELOC);
601 fix_new (fragP, fragP->fr_fix + 2, 2, fragP->fr_symbol,
602 fragP->fr_offset, 1, NO_RELOC);
611 fix_new (fragP, fragP->fr_fix + 3, 4, fragP->fr_symbol,
612 fragP->fr_offset, 1, NO_RELOC);
617 fix_new (fragP, fragP->fr_fix, 1, fragP->fr_symbol,
618 fragP->fr_offset, 1, NO_RELOC);
624 fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset,
632 fix_new (fragP, fragP->fr_fix + 1, 4, fragP->fr_symbol,
633 fragP->fr_offset, 1, NO_RELOC);
638 fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol,
639 fragP->fr_offset, 1, NO_RELOC);
650 fix_new (fragP, fragP->fr_fix + 6, 4, fragP->fr_symbol,
651 fragP->fr_offset, 1, NO_RELOC);
656 fix_new (fragP, fragP->fr_fix, 1, fragP->fr_symbol,
657 fragP->fr_offset, 1, NO_RELOC);
666 fix_new (fragP, fragP->fr_fix + 4, 2, fragP->fr_symbol,
667 fragP->fr_offset, 1, NO_RELOC);
677 fix_new (fragP, fragP->fr_fix + 5, 4, fragP->fr_symbol,
678 fragP->fr_offset, 1, NO_RELOC);
683 BAD_CASE (fragP->fr_subtype);
686 fragP->fr_fix += extension;