Lines Matching full:fixp
151 fixS *fixp[3];
855 fixS *fixp;
2151 for (i = 0; i < ARRAY_SIZE (insn->fixp); i++)
2152 insn->fixp[i] = NULL;
2304 for (i = 0; i < ARRAY_SIZE (insn->fixp); i++)
2305 if (insn->fixp[i] != NULL)
2307 insn->fixp[i]->fx_frag = frag;
2308 insn->fixp[i]->fx_where = where;
4225 fixup_has_matching_lo_p (fixS *fixp)
4227 return (fixp->fx_next != NULL
4228 && fixp->fx_next->fx_r_type == matching_lo_reloc (fixp->fx_r_type)
4229 && fixp->fx_addsy == fixp->fx_next->fx_addsy
4230 && fixp->fx_offset == fixp->fx_next->fx_offset);
6670 if (mips_opts.mips16 && history[0].fixp[0])
7416 ip->fixp[0] = fix_new_exp (ip->frag, ip->where,
7423 if (final_type[0] == BFD_RELOC_MIPS16_JMP && ip->fixp[0]->fx_addsy)
7424 *symbol_get_tc (ip->fixp[0]->fx_addsy) = 1;
7447 ip->fixp[0]->fx_no_overflow = 1;
7452 ip->fixp[0]->fx_no_overflow = 1;
7457 mips_relax.first_fixup = ip->fixp[0];
7466 || !fixup_has_matching_lo_p (hi_fixup->fixp))
7472 hi_fixup->fixp = ip->fixp[0];
7484 ip->fixp[i] = fix_new (ip->frag, ip->where,
7485 ip->fixp[0]->fx_size, NULL, 0,
7489 ip->fixp[0]->fx_tcbit = 1;
7490 ip->fixp[i]->fx_tcbit = 1;
14631 md_pcrel_from (fixS *fixP)
14633 valueT addr = fixP->fx_where + fixP->fx_frag->fr_address;
14634 switch (fixP->fx_r_type)
14739 gas_assert (reloc_needs_lo_p (l->fixp->fx_r_type));
14744 if (got16_reloc_p (l->fixp->fx_r_type)
14745 && !(l->fixp->fx_addsy
14746 && pic_need_relax (l->fixp->fx_addsy, l->seg)))
14750 if (fixup_has_matching_lo_p (l->fixp))
14763 looking_for_rtype = matching_lo_reloc (l->fixp->fx_r_type);
14767 if (*pos == l->fixp)
14771 && symbol_same_p ((*pos)->fx_addsy, l->fixp->fx_addsy)
14772 && (*pos)->fx_offset >= l->fixp->fx_offset
14793 l->fixp->fx_offset = (*lo_pos)->fx_offset;
14794 if (l->fixp->fx_next != *lo_pos)
14796 *hi_pos = l->fixp->fx_next;
14797 l->fixp->fx_next = *lo_pos;
14798 *lo_pos = l->fixp;
14805 mips_force_relocation (fixS *fixp)
14807 if (generic_force_reloc (fixp))
14812 if (fixp->fx_r_type == BFD_RELOC_MICROMIPS_7_PCREL_S1
14813 || fixp->fx_r_type == BFD_RELOC_MICROMIPS_10_PCREL_S1
14814 || fixp->fx_r_type == BFD_RELOC_MICROMIPS_16_PCREL_S1)
14819 && (fixp->fx_r_type == BFD_RELOC_16_PCREL_S2
14820 || fixp->fx_r_type == BFD_RELOC_MIPS_21_PCREL_S2
14821 || fixp->fx_r_type == BFD_RELOC_MIPS_26_PCREL_S2
14822 || fixp->fx_r_type == BFD_RELOC_MIPS_18_PCREL_S3
14823 || fixp->fx_r_type == BFD_RELOC_MIPS_19_PCREL_S2
14824 || fixp->fx_r_type == BFD_RELOC_HI16_S_PCREL
14825 || fixp->fx_r_type == BFD_RELOC_LO16_PCREL))
14858 md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
14864 if (fixP->fx_pcrel)
14865 switch (fixP->fx_r_type)
14882 fixP->fx_r_type = BFD_RELOC_32_PCREL;
14886 as_bad_where (fixP->fx_file, fixP->fx_line,
14893 if (fixP->fx_r_type != BFD_RELOC_8)
14895 howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
14900 gas_assert (fixP->fx_size == 2
14901 || fixP->fx_size == 4
14902 || fixP->fx_r_type == BFD_RELOC_8
14903 || fixP->fx_r_type == BFD_RELOC_16
14904 || fixP->fx_r_type == BFD_RELOC_64
14905 || fixP->fx_r_type == BFD_RELOC_CTOR
14906 || fixP->fx_r_type == BFD_RELOC_MIPS_SUB
14907 || fixP->fx_r_type == BFD_RELOC_MICROMIPS_SUB
14908 || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
14909 || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY
14910 || fixP->fx_r_type == BFD_RELOC_MIPS_TLS_DTPREL64
14911 || fixP->fx_r_type == BFD_RELOC_NONE);
14913 buf = fixP->fx_frag->fr_literal + fixP->fx_where;
14925 if (fixP->fx_addsy == NULL && !fixP->fx_pcrel && fixP->fx_tcbit == 0)
14926 fixP->fx_done = 1;
14928 switch (fixP->fx_r_type)
14955 if (fixP->fx_addsy)
14956 S_SET_THREAD_LOCAL (fixP->fx_addsy);
14958 as_bad_where (fixP->fx_file, fixP->fx_line,
15020 if (fixP->fx_done)
15024 if (calculate_reloc (fixP->fx_r_type, *valP, &value))
15026 insn = read_reloc_insn (buf, fixP->fx_r_type);
15027 if (mips16_reloc_p (fixP->fx_r_type))
15031 write_reloc_insn (buf, fixP->fx_r_type, insn);
15034 as_bad_where (fixP->fx_file, fixP->fx_line,
15042 if (fixP->fx_done)
15068 if (fixP->fx_done)
15069 md_number_to_chars (buf, *valP, fixP->fx_size);
15074 as_bad_where (fixP->fx_file, fixP->fx_line,
15076 if (!fixP->fx_done)
15086 as_bad_where (fixP->fx_file, fixP->fx_line,
15092 as_bad_where (fixP->fx_file, fixP->fx_line,
15094 if (!fixP->fx_done)
15104 as_bad_where (fixP->fx_file, fixP->fx_line,
15109 if (fixP->fx_addsy && (S_GET_VALUE (fixP->fx_addsy) & 0x7) != 0)
15110 as_bad_where (fixP->fx_file, fixP->fx_line,
15112 (long) S_GET_VALUE (fixP->fx_addsy));
15113 if ((fixP->fx_offset & 0x7) != 0)
15114 as_bad_where (fixP->fx_file, fixP->fx_line,
15116 (long) fixP->fx_offset);
15117 if (!fixP->fx_done)
15127 as_bad_where (fixP->fx_file, fixP->fx_line,
15133 as_bad_where (fixP->fx_file, fixP->fx_line,
15136 if (!fixP->fx_done)
15146 as_bad_where (fixP->fx_file, fixP->fx_line,
15152 as_bad_where (fixP->fx_file, fixP->fx_line,
15158 if (! fixP->fx_done)
15170 && fixP->fx_done
15171 && fixP->fx_frag->fr_address >= text_section->vma
15172 && (fixP->fx_frag->fr_address
15185 fixP->fx_r_type = BFD_RELOC_MIPS_JMP;
15186 fixP->fx_done = 0;
15187 fixP->fx_addsy = section_symbol (text_section);
15188 *valP += md_pcrel_from (fixP);
15196 as_bad_where (fixP->fx_file, fixP->fx_line,
15209 if (! fixP->fx_done)
15217 fixP->fx_done = 0;
15218 if (fixP->fx_addsy
15219 && !S_IS_DEFINED (fixP->fx_addsy)
15220 && !S_IS_WEAK (fixP->fx_addsy))
15221 S_SET_WEAK (fixP->fx_addsy);
15226 fixP->fx_done = 0;
15234 fixP->fx_addnumber = *valP;
17159 mips_fix_adjustable (fixS *fixp)
17161 if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
17162 || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
17165 if (fixp->fx_addsy == NULL)
17169 if (fixp->fx_r_type == BFD_RELOC_32_PCREL)
17186 if ((lo16_reloc_p (fixp->fx_r_type)
17187 || reloc_needs_lo_p (fixp->fx_r_type))
17189 && (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE) != 0)
17193 if (jalr_reloc_p (fixp->fx_r_type) && HAVE_IN_PLACE_ADDENDS)
17202 if (limited_pcrel_reloc_p (fixp->fx_r_type)
17251 if (fixp->fx_subsy == NULL
17252 && (ELF_ST_IS_MIPS16 (S_GET_OTHER (fixp->fx_addsy))
17253 || (ELF_ST_IS_MICROMIPS (S_GET_OTHER (fixp->fx_addsy))
17254 && (jmp_reloc_p (fixp->fx_r_type)
17255 || b_reloc_p (fixp->fx_r_type)))
17256 || *symbol_get_tc (fixp->fx_addsy)))
17266 tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
17275 *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
17276 reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
17278 if (fixp->fx_pcrel)
17280 gas_assert (fixp->fx_r_type == BFD_RELOC_16_PCREL_S2
17281 || fixp->fx_r_type == BFD_RELOC_MIPS16_16_PCREL_S1
17282 || fixp->fx_r_type == BFD_RELOC_MICROMIPS_7_PCREL_S1
17283 || fixp->fx_r_type == BFD_RELOC_MICROMIPS_10_PCREL_S1
17284 || fixp->fx_r_type == BFD_RELOC_MICROMIPS_16_PCREL_S1
17285 || fixp->fx_r_type == BFD_RELOC_32_PCREL
17286 || fixp->fx_r_type == BFD_RELOC_MIPS_21_PCREL_S2
17287 || fixp->fx_r_type == BFD_RELOC_MIPS_26_PCREL_S2
17288 || fixp->fx_r_type == BFD_RELOC_MIPS_18_PCREL_S3
17289 || fixp->fx_r_type == BFD_RELOC_MIPS_19_PCREL_S2
17290 || fixp->fx_r_type == BFD_RELOC_HI16_S_PCREL
17291 || fixp->fx_r_type == BFD_RELOC_LO16_PCREL);
17295 switch (fixp->fx_r_type)
17298 reloc->addend = fixp->fx_addnumber + (reloc->address & ~7);
17301 reloc->addend = fixp->fx_addnumber + reloc->address;
17306 && fixp->fx_r_type == BFD_RELOC_MICROMIPS_JMP
17307 && (read_compressed_insn (fixp->fx_frag->fr_literal
17308 + fixp->fx_where, 4) >> 26) == 0x3c)
17312 reloc->addend = fixp->fx_addnumber >> 1;
17315 reloc->addend = fixp->fx_addnumber;
17319 if (! HAVE_NEWABI && fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
17325 code = fixp->fx_r_type;
17330 as_bad_where (fixp->fx_file, fixp->fx_line,
17400 fixS *fixp;
17414 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 4, &exp, TRUE,
17416 fixp->fx_file = fragp->fr_file;
17417 fixp->fx_line = fragp->fr_line;
17535 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 4, &exp,
17537 fixp->fx_file = fragp->fr_file;
17538 fixp->fx_line = fragp->fr_line;
17559 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 4, &exp,
17561 fixp->fx_file = fragp->fr_file;
17562 fixp->fx_line = fragp->fr_line;
17574 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 4, &exp,
17576 fixp->fx_file = fragp->fr_file;
17577 fixp->fx_line = fragp->fr_line;
17607 fixS *fixp;
17622 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 2, &exp, TRUE,
17625 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 2, &exp, TRUE,
17630 fixp->fx_file = fragp->fr_file;
17631 fixp->fx_line = fragp->fr_line;
17635 fixp->fx_no_overflow = 1;
17647 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 4, &exp, TRUE,
17649 fixp->fx_file = fragp->fr_file;
17650 fixp->fx_line = fragp->fr_line;
17742 fixp = fix_new (fragp, buf - fragp->fr_literal, 4, l, 0, TRUE,
17744 fixp->fx_file = fragp->fr_file;
17745 fixp->fx_line = fragp->fr_line;
17761 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 4, &exp, FALSE,
17763 fixp->fx_file = fragp->fr_file;
17764 fixp->fx_line = fragp->fr_line;
17787 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 4, &exp, FALSE,
17789 fixp->fx_file = fragp->fr_file;
17790 fixp->fx_line = fragp->fr_line;
17798 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 4, &exp, FALSE,
17800 fixp->fx_file = fragp->fr_file;
17801 fixp->fx_line = fragp->fr_line;
17892 fixS *fixp;
17913 fixp = fix_new_exp (fragp, buf - fragp->fr_literal, 2, &exp,
17916 fixp->fx_file = fragp->fr_file;
17917 fixp->fx_line = fragp->fr_line;
17921 fixp->fx_no_overflow = 1;
17939 fixS *fixp;
17943 fixp = (fixS *) fragp->fr_opcode;
17979 while (fixp
17980 && fixp->fx_frag == fragp
17981 && fixp->fx_where < fragp->fr_fix - second)
17984 fixp->fx_done = 1;
17985 fixp = fixp->fx_next;
17991 while (fixp && fixp->fx_frag == fragp)
17994 fixp->fx_where -= first;
17996 fixp->fx_done = 1;
17997 fixp = fixp->fx_next;