Home | History | Annotate | Download | only in config

Lines Matching full:fixp

520 tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
525 if ( ((fixP->fx_addsy)
526 && (S_GET_SEGMENT (fixP->fx_addsy) == absolute_section))
527 || ((fixP->fx_subsy)
528 && (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section)))
533 *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
534 reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
535 reloc->addend = fixP->fx_offset;
537 if (fixP->fx_subsy != NULL)
539 if (SWITCH_TABLE (fixP))
542 reloc->addend = (S_GET_VALUE (fixP->fx_addsy)
543 - S_GET_VALUE (fixP->fx_subsy) + fixP->fx_offset);
545 switch (fixP->fx_r_type)
548 fixP->fx_r_type = BFD_RELOC_CR16_SWITCH8;
551 fixP->fx_r_type = BFD_RELOC_CR16_SWITCH16;
554 fixP->fx_r_type = BFD_RELOC_CR16_SWITCH32;
557 fixP->fx_r_type = BFD_RELOC_CR16_NUM32a;
567 as_bad_where (fixP->fx_file, fixP->fx_line,
569 fixP->fx_addsy ? S_GET_NAME (fixP->fx_addsy) : "0",
570 segment_name (fixP->fx_addsy
571 ? S_GET_SEGMENT (fixP->fx_addsy)
573 S_GET_NAME (fixP->fx_subsy),
574 segment_name (S_GET_SEGMENT (fixP->fx_addsy)));
578 if ((fixP->fx_r_type == BFD_RELOC_CR16_GOT_REGREL20)
580 && fixP->fx_addsy == GOT_symbol)
582 reloc->addend = fixP->fx_offset = reloc->address;
584 else if ((fixP->fx_r_type == BFD_RELOC_CR16_GOTC_REGREL20)
586 && fixP->fx_addsy == GOT_symbol)
588 reloc->addend = fixP->fx_offset = reloc->address;
592 gas_assert ((int) fixP->fx_r_type > 0);
593 reloc->howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
597 as_bad_where (fixP->fx_file, fixP->fx_line,
599 fixP->fx_r_type,
600 bfd_get_reloc_code_name (fixP->fx_r_type));
603 gas_assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
731 md_apply_fix (fixS *fixP, valueT *valP, segT seg)
735 if (fixP->fx_addsy == NULL
736 && fixP->fx_pcrel == 0)
737 fixP->fx_done = 1;
738 else if (fixP->fx_pcrel == 1
739 && fixP->fx_addsy != NULL
740 && S_GET_SEGMENT (fixP->fx_addsy) == seg)
741 fixP->fx_done = 1;
743 fixP->fx_done = 0;
745 if (fixP->fx_addsy != NULL && !fixP->fx_pcrel)
747 val = fixP->fx_offset;
748 fixP->fx_done = 1;
751 if (fixP->fx_done)
753 char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
755 fixP->fx_offset = 0;
757 switch (fixP->fx_r_type)
776 fixP->fx_done = 0;
779 fixP->fx_offset = * valP;
786 md_pcrel_from (fixS *fixp)
788 return fixp->fx_frag->fr_address + fixp->fx_where;