Lines Matching full:fixp
1020 fixS *fixP, valueT value)
1022 if (fixP->fx_r_type == BFD_RELOC_8
1023 || fixP->fx_r_type == BFD_RELOC_16
1024 || fixP->fx_r_type == BFD_RELOC_32)
1026 as_bad_where (fixP->fx_file, fixP->fx_line,
1043 gas_assert (fixP->fx_size == opcode->size);
1049 = ((fixP->fx_frag->fr_address + fixP->fx_where) & 0xf0000000);
1053 as_bad_where (fixP->fx_file, fixP->fx_line,
1058 as_bad_where (fixP->fx_file, fixP->fx_line,
1063 as_bad_where (fixP->fx_file, fixP->fx_line,
1068 as_bad_where (fixP->fx_file, fixP->fx_line,
1073 as_bad_where (fixP->fx_file, fixP->fx_line,
1078 as_bad_where (fixP->fx_file, fixP->fx_line,
1083 as_bad_where (fixP->fx_file, fixP->fx_line,
1088 as_bad_where (fixP->fx_file, fixP->fx_line,
1097 md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
1100 gas_assert (fixP != NULL && valP != NULL
1101 && (fixP->fx_r_type == BFD_RELOC_8
1102 || fixP->fx_r_type == BFD_RELOC_16
1103 || fixP->fx_r_type == BFD_RELOC_32
1104 || fixP->fx_r_type == BFD_RELOC_64
1105 || fixP->fx_r_type == BFD_RELOC_NIOS2_S16
1106 || fixP->fx_r_type == BFD_RELOC_NIOS2_U16
1107 || fixP->fx_r_type == BFD_RELOC_16_PCREL
1108 || fixP->fx_r_type == BFD_RELOC_NIOS2_CALL26
1109 || fixP->fx_r_type == BFD_RELOC_NIOS2_IMM5
1110 || fixP->fx_r_type == BFD_RELOC_NIOS2_CACHE_OPX
1111 || fixP->fx_r_type == BFD_RELOC_NIOS2_IMM6
1112 || fixP->fx_r_type == BFD_RELOC_NIOS2_IMM8
1113 || fixP->fx_r_type == BFD_RELOC_NIOS2_HI16
1114 || fixP->fx_r_type == BFD_RELOC_NIOS2_LO16
1115 || fixP->fx_r_type == BFD_RELOC_NIOS2_HIADJ16
1116 || fixP->fx_r_type == BFD_RELOC_NIOS2_GPREL
1117 || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
1118 || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY
1119 || fixP->fx_r_type == BFD_RELOC_NIOS2_UJMP
1120 || fixP->fx_r_type == BFD_RELOC_NIOS2_CJMP
1121 || fixP->fx_r_type == BFD_RELOC_NIOS2_CALLR
1122 || fixP->fx_r_type == BFD_RELOC_NIOS2_ALIGN
1123 || fixP->fx_r_type == BFD_RELOC_NIOS2_GOT16
1124 || fixP->fx_r_type == BFD_RELOC_NIOS2_CALL16
1125 || fixP->fx_r_type == BFD_RELOC_NIOS2_GOTOFF_LO
1126 || fixP->fx_r_type == BFD_RELOC_NIOS2_GOTOFF_HA
1127 || fixP->fx_r_type == BFD_RELOC_NIOS2_TLS_GD16
1128 || fixP->fx_r_type == BFD_RELOC_NIOS2_TLS_LDM16
1129 || fixP->fx_r_type == BFD_RELOC_NIOS2_TLS_LDO16
1130 || fixP->fx_r_type == BFD_RELOC_NIOS2_TLS_IE16
1131 || fixP->fx_r_type == BFD_RELOC_NIOS2_TLS_LE16
1132 || fixP->fx_r_type == BFD_RELOC_NIOS2_GOTOFF
1133 || fixP->fx_r_type == BFD_RELOC_NIOS2_TLS_DTPREL
1134 || fixP->fx_r_type == BFD_RELOC_NIOS2_CALL26_NOAT
1135 || fixP->fx_r_type == BFD_RELOC_NIOS2_GOT_LO
1136 || fixP->fx_r_type == BFD_RELOC_NIOS2_GOT_HA
1137 || fixP->fx_r_type == BFD_RELOC_NIOS2_CALL_LO
1138 || fixP->fx_r_type == BFD_RELOC_NIOS2_CALL_HA
1142 if (fixP->fx_r_type == BFD_RELOC_64)
1146 if (fixP->fx_addsy != NULL)
1147 as_bad_where (fixP->fx_file, fixP->fx_line,
1151 md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
1153 fixP->fx_done = 1;
1160 resolved expression. In the former case, both fixP->fx_addsy
1161 and fixP->fx_subsy are NULL, and fixP->fx_offset == *valP, and
1162 we can fix up the instruction that fixP relates to.
1163 In the latter case, one or both of fixP->fx_addsy and
1164 fixP->fx_subsy are not NULL, and fixP->fx_offset may or may not
1165 equal *valP. We don't need to check for fixP->fx_subsy being null
1168 if (fixP->fx_addsy != NULL)
1171 fixP->fx_addnumber = fixP->fx_offset;
1172 fixP->fx_done = 0;
1174 switch (fixP->fx_r_type)
1184 S_SET_THREAD_LOCAL (fixP->fx_addsy);
1194 = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
1197 as_bad_where (fixP->fx_file, fixP->fx_line,
1207 FIXME : for some reason fixP->fx_pcrel isn't 1 when it should be
1210 fixup = fixup - (fixP->fx_frag->fr_address + fixP->fx_where
1211 + fixP->fx_size);
1214 buf = fixP->fx_frag->fr_literal + fixP->fx_where;
1215 value = md_chars_to_number (buf, fixP->fx_size);
1219 nios2_diagnose_overflow (fixup, howto, fixP, value);
1225 switch (fixP->fx_r_type)
1247 md_number_to_chars (buf, value, fixP->fx_size);
1250 fixP->fx_done = 1;
1253 if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT)
1255 fixP->fx_done = 0;
1256 if (fixP->fx_addsy
1257 && !S_IS_DEFINED (fixP->fx_addsy) && !S_IS_WEAK (fixP->fx_addsy))
1258 S_SET_WEAK (fixP->fx_addsy);
1260 else if (fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
1261 fixP->fx_done = 0;
2585 nios2_force_relocation (fixS *fixp)
2587 if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
2588 || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY
2589 || fixp->fx_r_type == BFD_RELOC_NIOS2_ALIGN)
2592 return generic_force_reloc (fixp);
2597 nios2_fix_adjustable (fixS *fixp)
2599 if (fixp->fx_addsy == NULL)
2605 && (S_IS_EXTERNAL (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)))
2608 if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
2609 || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
2613 if (symbol_get_bfdsym (fixp->fx_addsy)->flags & BSF_FUNCTION)
2617 if (fixp->fx_r_type == BFD_RELOC_NIOS2_GOT16
2618 || fixp->fx_r_type == BFD_RELOC_NIOS2_CALL16
2619 || fixp->fx_r_type == BFD_RELOC_NIOS2_GOTOFF_LO
2620 || fixp->fx_r_type == BFD_RELOC_NIOS2_GOTOFF_HA
2621 || fixp->fx_r_type == BFD_RELOC_NIOS2_TLS_GD16
2622 || fixp->fx_r_type == BFD_RELOC_NIOS2_TLS_LDM16
2623 || fixp->fx_r_type == BFD_RELOC_NIOS2_TLS_LDO16
2624 || fixp->fx_r_type == BFD_RELOC_NIOS2_TLS_IE16
2625 || fixp->fx_r_type == BFD_RELOC_NIOS2_TLS_LE16
2626 || fixp->fx_r_type == BFD_RELOC_NIOS2_TLS_DTPMOD
2627 || fixp->fx_r_type == BFD_RELOC_NIOS2_TLS_DTPREL
2628 || fixp->fx_r_type == BFD_RELOC_NIOS2_TLS_TPREL
2629 || fixp->fx_r_type == BFD_RELOC_NIOS2_GOTOFF
2630 || fixp->fx_r_type == BFD_RELOC_NIOS2_GOT_LO
2631 || fixp->fx_r_type == BFD_RELOC_NIOS2_GOT_HA
2632 || fixp->fx_r_type == BFD_RELOC_NIOS2_CALL_LO
2633 || fixp->fx_r_type == BFD_RELOC_NIOS2_CALL_HA
2654 fixup fixp, and returns a pointer to it. This structure is passed
2658 tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
2662 *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
2664 reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
2665 reloc->addend = fixp->fx_offset; /* fixp->fx_addnumber; */
2667 if (fixp->fx_pcrel)
2669 switch (fixp->fx_r_type)
2672 fixp->fx_r_type = BFD_RELOC_16_PCREL;
2675 fixp->fx_r_type = BFD_RELOC_NIOS2_PCREL_LO;
2678 fixp->fx_r_type = BFD_RELOC_NIOS2_PCREL_HA;
2685 reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
2688 as_bad_where (fixp->fx_file, fixp->fx_line,
2690 bfd_get_reloc_code_name (fixp->fx_r_type));
2700 md_pcrel_from (fixS *fixP ATTRIBUTE_UNUSED)