Home | History | Annotate | Download | only in config

Lines Matching refs:fragP

371 md_estimate_size_before_relax (fragS *fragP, segT segment)
373 if (RELAX_LENGTH (fragP->fr_subtype) == STATE_UNDF)
375 if (S_GET_SEGMENT (fragP->fr_symbol) != segment
377 || S_IS_WEAK (fragP->fr_symbol)
378 || S_IS_EXTERNAL (fragP->fr_symbol)
387 old_fr_fix = fragP->fr_fix;
388 p = fragP->fr_literal + old_fr_fix;
399 if ((GOT_symbol == NULL || fragP->fr_symbol != GOT_symbol)
400 && (PLT_symbol == NULL || fragP->fr_symbol != PLT_symbol)
401 && fragP->fr_symbol != NULL
403 && (!S_IS_DEFINED (fragP->fr_symbol)
404 || S_IS_WEAK (fragP->fr_symbol)
405 || S_IS_EXTERNAL (fragP->fr_symbol)))
409 if ((ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol))
413 else if (((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLS
414 || ((unsigned char *) fragP->fr_opcode)[0] == VAX_CALLG
415 || ((unsigned char *) fragP->fr_opcode)[0] == VAX_JSB
416 || ((unsigned char *) fragP->fr_opcode)[0] == VAX_JMP
417 || S_IS_FUNCTION (fragP->fr_symbol))
423 switch (RELAX_STATE (fragP->fr_subtype))
427 fragP->fr_fix += 1 + 4;
428 fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
429 fragP->fr_offset, 1, reloc_type);
433 *fragP->fr_opcode ^= 1; /* Reverse sense of branch. */
437 fragP->fr_fix += 1 + 1 + 1 + 4;
438 fix_new (fragP, old_fr_fix + 3, 4, fragP->fr_symbol,
439 fragP->fr_offset, 1, NO_RELOC);
449 fragP->fr_fix += 2 + 2 + 1 + 1 + 4;
450 fix_new (fragP, old_fr_fix + 6, 4, fragP->fr_symbol,
451 fragP->fr_offset, 1, NO_RELOC);
460 fragP->fr_fix += 1 + 2 + 1 + 1 + 4;
461 fix_new (fragP, old_fr_fix + 5, 4, fragP->fr_symbol,
462 fragP->fr_offset, 1, NO_RELOC);
466 *fragP->fr_opcode += VAX_WIDEN_LONG;
468 fragP->fr_fix += 1 + 4;
469 fix_new (fragP, old_fr_fix + 1, 4, fragP->fr_symbol,
470 fragP->fr_offset, 1, NO_RELOC);
476 frag_wane (fragP);
479 return fragP->fr_fix - old_fr_fix;
484 switch (RELAX_STATE (fragP->fr_subtype))
487 fragP->fr_subtype = ENCODE_RELAX (STATE_PC_RELATIVE, STATE_BYTE);
490 fragP->fr_subtype = ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_BYTE);
493 fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_BRANCH, STATE_WORD);
496 fragP->fr_subtype = ENCODE_RELAX (STATE_COMPLEX_HOP, STATE_BYTE);
499 fragP->fr_subtype = ENCODE_RELAX (STATE_ALWAYS_BRANCH, STATE_BYTE);
504 if (fragP->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0]))
508 return md_relax_table[fragP->fr_subtype].rlx_length;
522 fragS *fragP)
531 know (fragP->fr_type == rs_machine_dependent);
532 where = fragP->fr_fix;
533 addressP = fragP->fr_literal + where;
534 opcodeP = fragP->fr_opcode;
535 fragP->fr_symbol;
538 switch (fragP->fr_subtype)
543 fix_new (fragP, fragP->fr_fix + 1, 1, fragP->fr_symbol,
544 fragP->fr_offset, 1, NO_RELOC);
551 fix_new (fragP, fragP->fr_fix + 1, 2, fragP->fr_symbol,
552 fragP->fr_offset, 1, NO_RELOC);
559 fix_new (fragP, fragP->fr_fix + 1, 4, fragP->fr_symbol,
560 fragP->fr_offset, 1, NO_RELOC);
565 fix_new (fragP, fragP->fr_fix, 1, fragP->fr_symbol,
566 fragP->fr_offset, 1, NO_RELOC);
574 fix_new (fragP, fragP->fr_fix + 2, 2, fragP->fr_symbol,
575 fragP->fr_offset, 1, NO_RELOC);
584 fix_new (fragP, fragP->fr_fix + 3, 4, fragP->fr_symbol,
585 fragP->fr_offset, 1, NO_RELOC);
590 fix_new (fragP, fragP->fr_fix, 1, fragP->fr_symbol,
591 fragP->fr_offset, 1, NO_RELOC);
597 fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset,
605 fix_new (fragP, fragP->fr_fix + 1, 4, fragP->fr_symbol,
606 fragP->fr_offset, 1, NO_RELOC);
611 fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol,
612 fragP->fr_offset, 1, NO_RELOC);
623 fix_new (fragP, fragP->fr_fix + 6, 4, fragP->fr_symbol,
624 fragP->fr_offset, 1, NO_RELOC);
629 fix_new (fragP, fragP->fr_fix, 1, fragP->fr_symbol,
630 fragP->fr_offset, 1, NO_RELOC);
639 fix_new (fragP, fragP->fr_fix + 4, 2, fragP->fr_symbol,
640 fragP->fr_offset, 1, NO_RELOC);
650 fix_new (fragP, fragP->fr_fix + 5, 4, fragP->fr_symbol,
651 fragP->fr_offset, 1, NO_RELOC);
656 BAD_CASE (fragP->fr_subtype);
659 fragP->fr_fix += extension;