3 * config/tc-mips.c (IS_SEXT_32BIT_NUM): Move closer to top of file.
4 (IS_SEXT_16BIT_NUM): New macro.
5 (macro_build_ldst_constoffset): New function, to build a set of
6 instructions to do a load or store from a constant offset relative
8 (macro, s_cprestore): Use macro_build_ldst_constoffset to implement
13 * config/tc-mips.c (md_apply_fix3): Just return for BFD_RELOC_8.
17 * config/tc-mips.c (s_change_section): Fix parsing. Code cleanup.
21 * tc-mips.c (load_address): Use BFD_RELOC_MIPS_GOT_DISP for newabi.
22 (macro): Likewise for la. Likewise for ld.
23 (mips_after_parse_args): Make -xgot optional, not the default.
24 (md_apply_fix3): Allow composite relocation to set up gp.
25 (tc_gen_reloc): Allow relaxing for newabi.
26 Relax R_MIPS_CALL16 to R_MIPS_GOT_PAGE/R_MIPS_GOT_OFST if local.
27 Relax R_MIPS_GOT16/R_MIPS_LO16 to R_MIPS_GOT_DISP if local.
31 * config/tc-arm.c (md_apply_fix3): Note that an implemented
32 BFD_RELOC_ARM_IMMEDIATE has been done.
33 (tc_gen_reloc): Do not issue reloc number of unimplemented
34 BFD_RELOC_ARM_IMMEDIATE and BFD_RELOC_ARM_OFFSET_IMM relocs -
35 their name is already in the error message - plus remove them
36 from the default case.
38 * config/tc-arm.c (do_ldmstm): Warn about unpredictable
39 behavior of instructions.
43 * config/tc-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
44 Convert functions to K&R format.
48 * config/tc-mips.c (pdr_seg): Define only for ELF.
49 (s_change_section): Remove unused variable. Don't use for nonELF.
53 * config/obj-elf.c (obj_elf_change_section): Move prototype to
55 * config/obj-elf.h (obj_elf_change_section): Likewise.
59 * dwarf2dbg.c (out_debug_abbrev): Add support for the DW_AT_name field.
60 (out_debug_info): Likewise.
64 * config/tc-i386.h (ELF_TARGET_FORMAT): New macro.
65 (TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf32-i386".
66 * config/tc-i386.c (i386_target_format): Likewise.
67 * config/tc-alpha.h (ELF_TARGET_FORMAT): New macro.
68 (TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf64-alpha".
72 * config/tc-ppc.c (md_assemble): Do not count FAKE operands
73 when deciding if any operands have been skipped.
77 * NEWS: New TI port supports both C4x and C3x series of DSPs.
79 * po/tr.po: Updated Turkish translation.
83 * config/tc-i386.c (md_apply_fix3): Allow addend for
84 BFD_RELOC_386_TLS_LDO_32, BFD_RELOC_386_TLS_LE and
85 BFD_RELOC_386_TLS_LE_32.
89 * config/tc-hppa.c (md_apply_fix3): Don't set fx_done for
90 marker relocations such as ENTRY/EXIT.
91 * config/tc-hppa.h (MD_APPLY_SYM_VALUE): Definition applies
92 to both OBJ_ELF and OBJ_SOM.
96 * doc/internals.texi (md_apply_fix3): Expand.
97 (TC_VALIDATE_FIX, TC_FORCE_RELOCATION, TC_FORCE_RELOCATION_ABS,
98 TC_FORCE_RELOCATION_LOCAL, TC_FORCE_RELOCATION_SUB_SAME,
99 TC_FORCE_RELOCATION_SUB_ABS, TC_FORCE_RELOCATION_SUB_LOCAL,
100 TC_VALIDATE_FIX_SUB, MD_APPLY_SYM_VALUE, S_FORCE_RELOC,
101 EXTERN_FORCE_RELOC): Document.
102 (TC_HANDLES_FX_DONE, obj_fix_adjustable): Remove.
103 * as.h: Don't include struc-symbol.h for arc.
105 * cgen.c (gas_cgen_md_apply_fix3): Remove *valP fudges and code to
106 subtract absolute symbol.
107 * obj.h (struct format_ops): Add frob_file_before_fix.
108 * subsegs.c (section_symbol): Set BSF_SECTION_SYM flag.
109 * symbols.c (S_FORCE_RELOC): New function.
110 * symbols.h (S_FORCE_RELOC): Declare.
111 * write.c (TC_FORCE_RELOCATION): Change default.
112 (TC_FORCE_RELOCATION_ABS): Define.
113 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
114 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
115 (TC_FORCE_RELOCATION_SECTION): Don't define.
116 (TC_FORCE_RELOCATION_SUB_SAME): Define this instead.
117 (TC_FORCE_RELOCATION_SUB_ABS): Define.
118 (TC_FORCE_RELOCATION_SUB_LOCAL): Define.
119 (TC_VALIDATE_FIX_SUB): Define.
120 (TC_FIX_ADJUSTABLE): Don't define.
121 (MD_APPLY_SYM_VALUE): Define this instead.
122 (abs_section_sym): New variable.
123 (adjust_reloc_syms): Use S_FORCE_RELOC. Remove obj_fix_adjustable
124 call. Don't symbol_mark_used_in_reloc here. Simplify link_once tests.
125 Don't put the absolute section sym on fixups here.
126 (fix_segment): New function.
127 (write_relocs): Don't call fixup_segment from here.
128 (write_object_file): Instead call tc_frob_file_before_fix,
129 obj_frob_file_before_fix, and fix_segment prior to symbol table code.
130 Don't output the absolute section symbol.
131 (fixup_segment): Rewrite.
132 * write.h (abs_section_sym): Declare.
133 * config/obj-aout.c (obj_aout_frob_file_before_fix): Rename from
135 (aout_format_ops): Adjust to suit.
136 * config/obj-aout.h (obj_frob_file): Don't define.
137 (obj_frob_file_before_fix): Define.
138 (obj_aout_frob_file_before_fix): Rename from obj_aout_frob_file.
139 (S_FORCE_RELOC): Define.
140 * config/obj-bout.h (S_FORCE_RELOC): Define.
141 * config/obj-coff.c (coff_format_ops): Init new field.
142 * config/obj-coff.h: Formatting fixes.
143 (obj_sec_sym_ok_for_reloc): Define.
144 (S_FORCE_RELOC): Define.
145 * config/obj-ecoff.c (ecoff_frob_file_before_fix): Split out ..
146 (ecoff_frob_file): .. from here.
147 (ecoff_format_ops): Add new function.
148 * config/obj-ecoff.h (ecoff_frob_file_before_fix): Declare.
149 (obj_frob_file_before_fix): Define.
150 * config/obj-elf.c (elf_format_ops): Init new field.
151 * config/obj-elf.h (obj_sec_sym_ok_for_reloc): Expand comment.
152 * config/obj-ieee.h: Formatting fixes.
153 (S_FORCE_RELOC): Define.
154 * config/obj-multi.h (obj_frob_file_before_fix): Define.
155 * config/obj-vms.h (S_FORCE_RELOC): Define.
156 * config/tc-alpha.c (md_apply_fix3): Correct GPDISP comment.
157 (alpha_force_relocation): Use S_FORCE_RELOC, and don't return 0
158 for BFD_RELOC_32 and BFD_RELOC_64.
159 (alpha_fix_adjustable): Remove extern and weak tests.
160 (alpha_before_fix): Rename from alpha_adjust_symtab.
161 (alpha_adjust_relocs): Rename from alpha_adjust_symtab_relocs.
162 * config/tc-alpha.h (struct fix, struct alpha_reloc_tag): Declare.
163 (TC_VALIDATE_FIX): Tweak param name.
164 (TC_FORCE_RELOCATION, tc_fix_adjustable): Likewise.
165 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
166 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
167 (MD_APPLY_SYM_VALUE): Define.
168 (tc_adjust_symtab): Don't define.
169 (alpha_adjust_symtab): Don't declare.
170 (tc_frob_file_before_fix): Define.
171 (alpha_before_fix): Declare.
172 (TC_INIT_FIX_DATA): Tweak param names.
173 * config/tc-arc.c: Include "struc-symbol.h".
174 (md_pcrel_from): Remove undefined sym fudge.
175 (md_apply_fix3): Remove *valP fudges and code to subtract abs sym.
176 Don't set fx_addnumber.
177 (tc_gen_reloc): Remove spurious fx_addnumber comment.
178 * config/tc-arc.h (MD_APPLY_SYM_VALUE): Define.
179 (EXTERN_FORCE_RELOC): Define.
180 * config/tc-arm.c (md_apply_fix3 <case BFD_RELOC_ARM_GOTPC>): Remove.
181 (tc_gen_reloc): Fudge ARM_GOTPC addend.
182 (arm_validate_fix): Return void.
183 (arm_fix_adjustable <elf version>): Remove extern and weak tests.
184 Add plt and got reloc tests.
185 (arm_force_relocation): Call S_FORCE_RELOC.
186 * config/tc-arm.h (struct fix): Forward declare.
187 (TC_VALIDATE_FIX): No longer set add_symbolP.
188 (arm_validate_fix): Adjust declaration.
189 (TC_FORCE_RELOCATION <pe version): Call S_FORCE_RELOC.
190 (TC_FORCE_RELOCATION): Tweak param name.
191 (TC_INIT_FIX_DATA): Likewise.
192 (obj_fix_adjustable): Don't define.
193 (tc_fix_adjustable): Call arm_fix_adjustable.
194 (TC_FIX_ADJUSTABLE): Don't define.
195 (MD_APPLY_SYM_VALUE): Define.
196 (EXTERN_FORCE_RELOC): Define.
197 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
198 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
199 * config/tc-avr.c (md_apply_fix3): Don't cast valP pointer type.
200 Remove *valP fudges and code to subtract abs sym. Don't set
202 * config/tc-avr.h: Formatting.
203 (EXTERN_FORCE_RELOC): Define.
204 (MD_APPLY_SYM_VALUE): Define.
205 * config/tc-cris.c (tc_gen_reloc): Don't use fx_addnumber.
206 (md_apply_fix3): Remove code to subtract abs sym.
207 (md_cris_force_relocation): Update comment. Call S_FORCE_RELOC.
208 * config/tc-cris.h (TC_FORCE_RELOCATION): Tweak param name.
209 (IS_CRIS_PIC_RELOC, tc_fix_adjustable): Likewise.
210 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
211 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
212 (tc_fix_adjustable): Remove extern, weak tests.
213 * config/tc-d10v.c (tc_gen_reloc): Don't fiddle address of
214 BFD_RELOC_VTABLE_INHERIT relocs. Don't use fx_addnumber.
215 (md_apply_fix3): Don't cast valP pointer type. Remove *valP fudges
216 and code to subtract abs sym.
217 (d10v_fix_adjustable): Remove extern, weak, SEC_MERGE tests.
218 (d10v_force_relocation): Call S_FORCE_RELOC.
219 * config/tc-d10v.h: Don't include write.h.
220 (struct fix): Instead, forward declare.
221 (MD_PCREL_FROM_SECTION): Tweak param names.
222 (md_pcrel_from_section): Use "struct fix" instead of "fixS".
223 (d10v_fix_adjustable): Likewise.
224 (obj_fix_adjustable): Don't define.
225 (tc_fix_adjustable): Define.
226 (TC_FORCE_RELOCATION): Tweak param name.
227 (MD_APPLY_SYM_VALUE): Define.
228 (EXTERN_FORCE_RELOC): Define.
229 * config/tc-d30v.c (tc_gen_reloc): Don't use fx_addnumber.
230 (md_apply_fix3): Don't cast valP pointer type. Remove *valP fudges
231 and code to subtract abs sym.
232 * config/tc-d30v.h: Don't include write.h.
233 (struct fix): Instead, forward declare.
234 (MD_PCREL_FROM_SECTION): Tweak param names.
235 (md_pcrel_from_section): Use "struct fix" instead of "fixS".
236 (MD_APPLY_SYM_VALUE): Define.
237 (EXTERN_FORCE_RELOC): Define.
238 * config/tc-dlx.c (md_dlx_force_relocation): Call S_FORCE_RELOC.
239 (md_dlx_fix_adjustable): Don't test for NULL fx_addsy.
240 (md_apply_fix3): No need to test fx_pcrel before setting fx_done.
241 (tc_gen_reloc): Don't fiddle with BFD_RELOC_VTABLE_INHERIT relocs.
242 Adjust the address for BFD_RELOC_VTABLE_ENTRY, not the addend.
243 Don't use fx_addnumber.
244 * config/tc-dlx.h: Don't include write.h.
245 (md_convert_frag): We're not alpha twice over.
246 (EXTERN_FORCE_RELOC): Define.
247 (obj_fix_adjustable): Don't define.
248 (tc_fix_adjustable): Define.
249 (TC_FIX_ADJUSTABLE): Don't define.
250 (MD_APPLY_SYM_VALUE): Define.
251 (LOCAL_LABELS_DOLLAR): Undef always.
252 * config/tc-fr30.c (fr30_force_relocation): Call S_FORCE_RELOC.
253 (fr30_fix_adjustable): Remove extern, weak tests.
254 * config/tc-fr30.h (MD_APPLY_SYM_VALUE): Define.
255 (obj_fix_adjustable): Don't define.
256 (tc_fix_adjustable): Define.
257 (struct fix): Forward declare.
258 (MD_PCREL_FROM_SECTION): Tweak param name. Remove duplicate.
259 * config/tc-frv.c (frv_force_relocation): Call S_FORCE_RELOC.
260 (frv_fix_adjustable): Don't do extern, weak tests.
261 * config/tc-frv.h (MD_APPLY_SYM_VALUE): Define.
262 (TC_FIX_ADJUSTABLE): Don't define.
263 (obj_fix_adjustable): Don't define.
264 (tc_fix_adjustable): Define.
265 (struct fix): Forward declare.
266 (MD_PCREL_FROM_SECTION): Tweak param name. Remove duplicate.\
267 * config/tc-h8300.c (md_apply_fix3): Don't cast valP pointer type.
268 * config/tc-h8300.h (struct fix): Forward declare.
269 (EXTERN_FORCE_RELOC): Define.
270 * config/tc-hppa.c (md_apply_fix3): Remove subtraction of sym value.
271 (hppa_fix_adjustable): Don't test extern or weak. Don't
272 symbol_mark_used_in_reloc.
273 (hppa_force_relocation): Use S_FORCE_RELOC instead of S_IS_EXTERNAL
275 * config/tc-hppa.h (EXTERN_FORCE_RELOC): Define
276 (TC_FORCE_RELOCATION, TC_INIT_FIX_DATA): Tweak param name.
277 (TC_FORCE_RELOCATION_SECTION): Don't define.
278 (MD_APPLY_SYM_VALUE): Define.
279 * config/tc-i370.c (md_apply_fix3): Remove *valP fudges and code
281 * config/tc-i370.h: Remove ifdef OBJ_ELF tests.
282 (MD_APPLY_SYM_VALUE): Define.
283 (MD_PCREL_FROM_SECTION): Tweak param name.
284 * config/tc-i386.c (tc_i386_fix_adjustable): Remove weak, extern tests.
285 (md_apply_fix3): Test fx_addsy, not fx_pcrel.
286 (i386_force_relocation): New function.
287 * config/tc-i386.h (TC_COFF_FIX2RTYPE): Tweak param name.
288 (TC_VALIDATE_FIX): Likewise.
289 (TC_FIX_ADJUSTABLE): Don't define.
290 (MD_APPLY_SYM_VALUE): Define.
291 (TC_FORCE_RELOCATION <elf version>): Call i386_force_relocation.
292 (i386_force_relocation): Declare.
293 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
294 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
295 (TC_FORCE_RELOCATION <coff version>): Call S_FORCE_RELOC.
296 * config/tc-i860.c (md_apply_fix3): Don't cast valP pointer type.
297 * config/tc-i860.h (MD_APPLY_SYM_VALUE): Define.
298 (EXTERN_FORCE_RELOC): Define.
299 * config/tc-i960.c (reloc_callj): Remove declaration. Return false.
300 (md_apply_fix3): Don't cast valP pointer type. Move code here from
301 old fixup_segment. No need to test fx_pcrel before setting fx_done.
302 (i960_validate_fix): Remove add_symbolPP arg and add_symbolP macro.
303 Use fx_addsy instead of add_symbolP, as_bad_where instead of as_bad.
304 Remove #if 0 code. Invert return boolean.
305 * config/tc-i960.h (TC_COUNT_RELOC): Tweak param name.
306 (TC_COFF_FIX2RTYPE, TC_ADJUST_RELOC_COUNT, TC_VALIDATE_FIX): Likewise.
307 (tc_headers_hook, tc_coff_fix2rtype): Remove declaration.
308 (tc_coff_sizemachdep): Prototype.
309 (i960_handle_align): Likewise.
310 (i960_validate_fix): Adjust declaration.
311 (reloc_callj): Likewise.
312 (EXTERN_FORCE_RELOC): Define.
313 (TC_FORCE_RELOCATION_SUB_SAME): Define.
314 (TC_FORCE_RELOCATION_ABS): Define.
315 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
316 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
317 (TC_FIX_ADJUSTABLE): Don't define.
318 (MD_APPLY_SYM_VALUE): Define.
319 * config/tc-ia64.c (ia64_force_relocation): Call S_FORCE_RELOC.
320 * config/tc-ia64.h (MD_APPLY_SYM_VALUE): Define.
321 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
322 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
323 * config/tc-ip2k.c (ip2k_force_relocation): Call S_FORCE_RELOC.
324 * config/tc-ip2k.h (MD_APPLY_FIX3): Don't define.
325 (MD_APPLY_SYM_VALUE): Define.
326 (EXTERN_FORCE_RELOC): Define.
327 (TC_FORCE_RELOCATION): Tweak param name.
328 * config/tc-m32r.c (m32r_force_relocation): Call S_FORCE_RELOC.
329 (m32r_fix_adjustable): Don't test extern, weak.
330 * config/tc-m32r.h (MD_PCREL_FROM_SECTION): Tweak param name.
331 (MD_APPLY_SYM_VALUE): Define.
332 (obj_fix_adjustable): Don't define.
333 (tc_fix_adjustable): Define.
334 (tc_frob_file): Don't define.
335 (tc_frob_file_before_fix): Define.
336 (EXTERN_FORCE_RELOC): Define.
337 * config/tc-m68hc11.c (tc_gen_reloc): Set addend to zero. Adjust
338 BFD_RELOC_VTABLE_ENTRY address.
339 (tc_m68hc11_force_relocation): Call S_FORCE_RELOC.
340 (tc_m68hc11_fix_adjustable): Don't test relaxable_symbol.
341 (md_apply_fix3): Remove *valP fudges and code to subtract abs sym.
342 Remove duplicated fx_done code.
343 * config/tc-m68hc11.h (MD_APPLY_SYM_VALUE): Define.
344 (EXTERN_FORCE_RELOC): Define.
345 * config/tc-m68k.c (tc_m68k_fix_adjustable): Don't test
347 * config/tc-m68k.h (TC_COFF_FIX2RTYPE): Tweak param name.
348 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
349 (TC_FIX_ADJUSTABLE): Don't define.
350 (EXTERN_FORCE_RELOC): Define.
351 (MD_APPLY_SYM_VALUE): Define.
352 (TC_FORCE_RELOCATION): Call S_FORCE_RELOC.
353 * config/tc-mcore.c (md_apply_fix3): Don't cast valP pointer type.
354 Remove fx_addsy tests.
355 (mcore_force_relocation): Call S_FORCE_RELOC.
356 (mcore_fix_adjustable): Don't test fx_addsy.
357 * config/tc-mcore.h (MD_PCREL_FROM_SECTION): Tweak param name.
358 (EXTERN_FORCE_RELOC): Define.
359 (obj_fix_adjustable): Don't define.
360 (tc_fix_adjustable): Define.
361 (MD_APPLY_SYM_VALUE): Define.
362 * config/tc-mips.c (enum mips_pic_level): Move to tc-mips.h.
363 (mips_pic): No longer static.
364 (mips_force_relocation): Call S_FORCE_RELOC.
365 (mips_fix_adjustable): Remove extern, weak tests.
366 * config/tc-mips.h (enum mips_pic_level): Declare.
368 (tc_frob_file): Don't define.
369 (tc_frob_file_before_fix): Define this instead.
370 (EXTERN_FORCE_RELOC): Define.
371 * config/tc-mmix.c (md_apply_fix3): Replace real_reg_section tests
372 with reg_section tests. Set fx_done instead of calling
373 symbol_clear_used_in_reloc on bad relocs.
374 (tc_gen_reloc): Zero fx_addsy on bad relocs.
375 (mmix_force_relocation): Remove weak sym test. Call S_FORCE_RELOC.
376 (mmix_adjust_symtab): Simplify list handling. Abort on any
378 * config/tc-mmix.h (tc_fix_adjustable): Remove weak tests. Check
379 BFD_RELOC_MMIX_LOCAL.
380 (tc_frob_symbol): Keep user defined syms in reg_section. Don't punt.
381 (EXTERN_FORCE_RELOC): Define.
382 (MD_PCREL_FROM_SECTION): Tweak param name.
383 (tc_frob_file): Don't define.
384 (tc_frob_file_before_fix): Define this instead.
385 * config/tc-mn10300.c (mn10300_force_relocation): Call S_FORCE_RELOC.
386 Remove SEC_CODE checks.
387 (mn10300_fix_adjustable): Remove extern and weak tests.
388 * config/tc-mn10300.h (EXTERN_FORCE_RELOC): Define.
389 (TC_FORCE_RELOCATION): Tweak param name.
390 (obj_fix_adjustable): Don't define.
391 (TC_FORCE_RELOCATION_SUB_SAME): Define to handle SEC_CODE.
392 * config/tc-ns32k.h (TC_FIX_DATA_PRINT): Tweak param name.
393 * config/tc-openrisc.c (openrisc_force_relocation): Call S_FORCE_RELOC.
394 (openrisc_fix_adjustable): Don't test fx_addsy.
395 * config/tc-openrisc.h (MD_APPLY_SYM_VALUE): Define.
396 (obj_fix_adjustable): Don't define.
397 (tc_fix_adjustable): Define this instead.
398 (MD_PCREL_FROM_SECTION): Remove duplicate. Tweak param name.
399 * config/tc-or32.c (md_apply_fix3): Don't cast valP pointer type.
400 (tc_gen_reloc): Don't fiddle with BFD_RELOC_VTABLE_INHERIT relocs.
401 Adjust the address for BFD_RELOC_VTABLE_ENTRY, not the addend.
402 * config/tc-or32.h (EXTERN_FORCE_RELOC): Define.
403 (MD_APPLY_SYM_VALUE): Define.
404 * config/tc-pj.c (md_apply_fix3): Don't cast valP pointer type.
405 Don't subtract symbol value.
406 * config/tc-pj.h (md_pcrel_from): Tweak param name.
407 (EXTERN_FORCE_RELOC): Define.
408 (TC_FORCE_RELOCATION): Call S_FORCE_RELOC.
409 (MD_APPLY_SYM_VALUE): Define.
410 (obj_fix_adjustable): Don't define.
411 (tc_fix_adjustable): Define this instead.
412 * config/tc-ppc.c (ppc_frob_symbol <coff version>): Ignore absolute
414 (ppc_force_relocation <coff version>): Call S_FORCE_RELOC.
415 (ppc_force_relocation <elf version>): New.
416 (ppc_fix_adjustable <elf version>): Remove extern and weak tests.
417 (md_apply_fix3): Don't subtract symbol values for ELF. Update
418 comments. Don't subtract fx_subsy as that is already done.
419 * config/tc-ppc.h (tc_fix_adjustable): Tweak param name.
420 (MD_PCREL_FROM_SECTION): Likewise.
421 (TC_FORCE_RELOCATION): Define for both ELF and XCOFF as calling
422 ppc_force_relocation.
423 (TC_FORCE_RELOCATION_SECTION): Delete.
424 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
425 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
426 (MD_APPLY_SYM_VALUE): Define.
427 * config/tc-s390.c: #include "dwarf2dbg.h".
428 (s390_insn): Remove excess parens.
429 (tc_s390_fix_adjustable): Remove extern, weak, SEC_MERGE tests.
430 (tc_s390_force_relocation): Call S_FORCE_RELOC.
431 (md_apply_fix3): Add ATTRIBUTE_UNUSED on "seg". Abort when fx_subsy
432 non-NULL. Don't subtract off fx_addsy value.
433 * config/tc-s390.h (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
434 (TC_FORCE_RELOCATION, MD_PCREL_FROM_SECTION): Tweak param name.
435 (TC_FIX_ADJUSTABLE): Don't define.
436 (MD_APPLY_SYM_VALUE): Define.
437 * config/tc-sh.c (SWITCH_TABLE_CONS): Move to tc-sh.h.
438 (SWITCH_TABLE): Likewise.
439 (sh_force_relocation): Call S_FORCE_RELOC.
440 (sh_fix_adjustable): Remove "return 1" cases handled by the default.
441 Replace TC_RELOC_RTSYM_LOC_FIXUP with reloc type tests.
442 (md_apply_fix3 <case BFD_RELOC_32_PLT_PCREL>): Simplify,
443 fx_addnumber is zero on entry. Save val in fx_addnumber.
444 (tc_gen_reloc): Don't subtract fx_subsy.
445 * config/tc-sh.h (struct fix): Move.
446 (obj_fix_adjustable): Don't define.
447 (tc_fix_adjustable): Define this instead.
448 (TC_FIX_ADJUSTABLE): Don't define.
449 (MD_APPLY_SYM_VALUE): Define.
450 (SWITCH_TABLE_CONS): Define.
451 (SWITCH_TABLE): Define.
452 (TC_FORCE_RELOCATION_SUB_SAME): Define.
453 (TC_VALIDATE_FIX_SUB): Define.
454 (MD_PCREL_FROM_SECTION): Tweak param name.
455 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
456 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
457 (TC_FORCE_RELOCATION_SUB_ABS): Define.
458 * config/tc-sh64.h (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
459 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
460 (TC_FORCE_RELOCATION_SUB_SAME): Define.
461 (TC_VALIDATE_FIX_SUB): Define.
462 (MD_PCREL_FROM_SECTION): Tweak param name.
463 * config/tc-sparc.c (md_apply_fix3): Don't subtract off symbol value.
464 (tc_gen_reloc): Use S_FORCE_RELOC.
465 (elf32_sparc_force_relocation): Call S_FORCE_RELOC.
466 * config/tc-sparc.h (TC_FORCE_RELOCATION <coff version>): Remove.
467 (TC_FORCE_RELOCATION_ABS): Define this instead.
468 (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
469 (TC_FORCE_RELOCATION_LOCAL): Define this instead.
470 (tc_fix_adjustable): Remove extern and weak tests. Use S_FORCE_RELOC.
471 (MD_APPLY_SYM_VALUE): Define.
472 (TC_FIX_DATA_PRINT): Tweak param name.
473 * config/tc-tic30.c (USE_STDOUT): Don't define.
474 (md_parse_option): Remove stupid debug code.
475 (tc_gen_reloc): Don't use fx_addnumber.
476 * config/tc-v850.c (v850_fix_adjustable): Remove extern and weak tests.
477 (v850_force_relocation): Remove weak test. Call S_FORCE_RELOC.
478 * config/tc-v850.h (obj_fix_adjustable): Don't define.
479 (tc_fix_adjustable): Define this instead.
480 (TC_FIX_ADJUSTABLE): Don't define.
481 (MD_APPLY_SYM_VALUE): Define this instead.
482 (TC_FORCE_RELOCATION, MD_PCREL_FROM_SECTION): Tweak param name.
483 * config/tc-vax.h (TC_RELOC_RTSYM_LOC_FIXUP): Don't define.
484 (TC_FIX_ADJUSTABLE): Don't define.
485 (MD_APPLY_SYM_VALUE): Define this instead.
486 (tc_fix_adjustable): Remove extern and weak tests.
487 * config/tc-w65.h (struct fix): Forward declare.
488 * config/tc-xstormy16.c (xstormy16_force_relocation): Call
490 (xstormy16_fix_adjustable): Remove extern and weak tests. Don't
491 call xstormy16_force_relocation; Instead test for FPTR16 reloc.
492 (xstormy16_md_apply_fix3): Remove *valP fudges and code to subtract
494 * config/tc-xstormy16.h (MD_APPLY_FIX3): Don't define.
495 (MD_APPLY_SYM_VALUE): Define.
496 (obj_fix_adjustable): Don't define.
497 (tc_fix_adjustable): Define this instead.
498 (MD_PCREL_FROM_SECTION): Remove duplicate. Tweak param name.
502 * config/tc-ppc.c (ppc_frob_symbol): Formatting, warning fix.
503 (ppc_fix_adjustable <coff version>): Cleanup.
505 * config/tc-ppc.c (PPC_HIGHER, PPC_HIGHEST): Fix warning.
506 (md_parse_option): No -a64 without BFD64.
507 (ppc_set_cpu): Select appropriate cpu when ppc_obj64.
508 (ppc_arch): Use bfd_mach_rs6k for bfd_arch_rs6000.
512 * config/tc-ppc.c (md_begin): Do not insert non-BookE32
513 instructions into the hash table if the target cpu is the BookE32.
517 * read.c (do_align): Use ATTRIBUTE_UNUSED_LABEL for label, not
522 * tc-v850.c (v850_relax): Declare.
523 (v850_longcode): New routine.
524 (v850_handle_align): New routine.
525 (md_pseudo_table): Add longcall and longjump.
526 (md_parse_option): Check for relax option.
527 (tc_gen_reloc): Handle BFD_RELOC_V850_LONGCALL,
528 BFD_RELOC_V850_LONGJUMP, and BFD_RELOC_V850_ALIGN.
529 (md_apply_fix3): Likewise.
530 (v850_force_relocation): Likewise.
531 (v850_comm): Change the current section.
532 (md_assemble): Ensure that the correct value is put in the
534 (v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
535 v850_zbss, v850_rosdata, v850_rozdata): Fix section book keeping.
536 Remove redundant v850ea support.
537 * tc-v850.h (HANDLE_ALIGN): Define.
538 (v850_handle_align): Declare.
539 * doc/c-v850.c: Document -mrelax, .longcall and .longjump.
543 * configure.in: Add tic4x-coff* and c4x-coff*-coff-coff targets.
544 * configure: Regenerate.
545 * NEWS: Mention new port.
549 * config/obj-coff.c: Add sdef definition.
550 * config/obj-coff.h: Add tic4x include file and set
552 * config/tc-tic4x.c: New file.
553 * config/tc-tic4x.h: New file.
557 * write.c (BFD_FAST_SECTION_FILL): Remove unused macro.
558 (TC_ADJUST_RELOC_COUNT): Tweak param name.
559 (TC_FORCE_RELOCATION, TC_FORCE_RELOCATION_SECTION): Likewise.
560 (TC_FIX_ADJUSTABLE, MD_PCREL_FROM_SECTION): Likewise.
561 (RELOC_ENUM): Define.
562 (fix_new_internal): Use RELOC_ENUM.
563 (fix_new, fix_new_exp): Likewise.
564 (adjust_reloc_syms): Comment. Remove unnecessary tests on sym != NULL.
565 Replace gotos with continue.
566 (write_relocs): Formatting. Avoid symbol loops in
567 RELOC_EXPANSION_POSSIBLE case too. Report bfd_reloc_outofrange
568 errors, and error number in other cases.
569 (fixup_segment): Remove param names from prototype. Rename
570 "this_segment_type" to "this_segment". Update linkrelax comment.
571 Remove "size, "place" and "where" local vars. Formatting. Update
572 "no symbol" comment. Remove #if 0 and #if 1.
574 * app.c (do_scrub_chars): Don't test IGNORE_NONSTANDARD_ESCAPES. Tidy.
578 * dwarf2dbg.c: Always include dwarf2dbg.h.
579 (dwarf2_directive_file): Adjust dummy version args.
580 * ecoff.c (ecoff_directive_weakext): Add ATTRIBUTE_UNUSED.
581 * expr.c (clean_up_expression <O_subtract>): Allow subtraction
582 when symbol values differ.
583 * read.c (do_align): Add ATTRIBUTE_UNUSED to label.
584 (pseudo_set <O_subtract>): Remove unnecessary segment test.
585 * config/obj-bout.c (obj_pseudo_table): Warning fix.
589 * config/tc-w65.c (md_section_align): Fix typo.
590 (md_parse_option): Return 0, not 1.
594 * doc/as.texinfo (Section): Note that if '@' is a comment
595 character then another symbol is used to prefix the section's
600 * config/tc-z8k.c (get_operands): Adjust ptr variable also in
605 * configure.in: Add support for sh-**-nto* target.
606 * configure: Regenerate.
610 * config/tc-h8300.h (TC_LINKRELAX_FIXUP): Define.
614 * config/tc-ppc.c (ppc_cleanup): Do something only if format
616 (ppc_apuinfo_section_add): Define only if format is ELF.
617 (md_assemble): Emit APUinfo section only if format is ELF.
622 * config/tc-arc.c (md_pseudo_table <dwarf2_directive_file>): Cast.
623 * config/tc-frv.c: Likewise.
624 * config/tc-hppa.c: Likewise.
625 * config/tc-ia64.c: Likewise.
626 * config/tc-ip2k.c: Likewise.
627 * config/tc-m68hc11.c: Likewise.
628 * config/tc-m68k.c: Likewise.
629 * config/tc-mmix.c: Likewise.
630 * config/tc-mn10300.c: Likewise.
631 * config/tc-sh.c: Likewise.
632 * config/tc-sparc.c: Likewise.
633 * config/tc-v850.c: Likewise.
637 * config/tc-mips.c (macro2): Implement rotates by zero using shifts
644 * config/tc-ppc.c (PPC_OPCODE_CLASSIC): Enable this everywhere
645 PPC_OPCODE_PPC is, except for BookE architectures.
646 (md_parse_option): Add support for -mspe.
647 (md_show_usage): Add -mspe.
648 (md_parse_option): Add support for -me500 and
649 -me500x2 to generate code for Motorola e500 core complex.
650 (md_show_usage): Add -me500 and -me500x2.
652 (PPC_APUINFO_ISEL, PPC_APUINFO_PMR, PPC_APUINFO_RFMCI,
653 PPC_APUINFO_CACHELCK, PPC_APUINFO_SPE, PPC_APUINFO_EFS,
654 PPC_APUINFO_BRLOCK): New macros.
656 (ppc_cleanup): New function.
657 (ppc_apuinfo_section_add): New function.
659 (md_assemble): Collect info and write the APUinfo section.
661 * config/tc-ppc.h (md_cleanup): Define.
662 (ppc_cleanup): Export.
663 (ELF_TC_SPECIAL_SECTIONS): Add .PPC.EMB.apuinfo section.
667 * config/obj-elf.c (obj_elf_change_section): Make non-static.
668 config/tc-mips.c (s_change_section): New function to support
669 IRIX .section pseudo-op.
673 * config/tc-v850.c (md_assemble): Fix assembling of "callt 0x3f".
677 * config/tc-mips.c (macro_build_jalr): Make sure we generate
678 the fix-up against on the right frag.
679 (s_cpsetup): Likewise. Parse third argument as expression, to
680 handle global symbols and forward/backward labels correctly.
684 * read.c (stringer): Catch attempts to create strings in the abs
687 * config/tc-alpha.c: Fix compiling for COFF targets.
688 Some minor formatting tidyups.
692 * config/tc-m68hc11.h (MD_PCREL_FROM_SECTION): Remove.
693 (TC_HANDLES_FX_DONE): Define to let md_apply_fix3 set fx_done flag
694 according to the reloc.
695 (tc_fix_adjustable, tc_m68hc11_fix_adjustable): Define.
696 (TC_FORCE_RELOCATION): Define.
697 (tc_m68hc11_force_relocation): Declare.
699 * config/tc-m68hc11.c (md_pseudo_table): Add relax command.
700 (s_m68hc11_relax): New function for relax group.
701 (build_insn, build_jump_insn): Emit a M68HC11_RL_JUMP reloc at
702 beginning of jump instruction.
703 (md_pcrel_from): Rename from md_pcrel_from_section and fix
705 (tc-gen_reloc): Update.
706 (md_estimate_size_before_relax): Create the BFD_RELOC_16_PCREL as
708 (tc_m68hc11_force_relocation): New function, handle new relocs.
709 (tc_m68hc11_fix_adjustable): New to make sure there are enough
710 reloc for the linker relax pass.
711 (md_apply_fix3): Handle M68HC11_RL_JUMP, M68HC11_RL_GROUP
716 * config/tc-m68hc11.c (m68hc11_elf_final_processing): New function.
717 (md_pseudo_table): Add .mode, .far and .interrupt pseudo op.
718 (s_m68hc11_mode): New function for .mode pseudo op.
719 (s_m68hc11_mark_symbol): New function for .far and .interrupt
721 * config/tc-m68hc11.h (elf_tc_final_processing): Define.
722 (m68hc11_elf_final_processing): Declare.
726 * config/tc-m68hc11.c (md_begin): Take into account additional
727 page operand for call instruction.
728 (print_opcode_format): Likewise.
729 (check_range): Likewise for page range checking.
730 (get_operand): Don't skip a possible comma in operands.
731 (fixup8): Generate BFD_RELOC_M68HC11_PAGE reloc.
732 (fixup16): Likwise with BFD_RELOC_M68HC11_LO16.
733 (fixup24): New to handle call reloc.
734 (build_insn): Handle missing page operand for call instruction.
736 (md_apply_fix3): Take into account new relocs.
737 (get_operand): Fix the mode for indexed indirect addressing.
738 (build_indexed_byte): Fix post index byte for indexed indirect mode.
742 * config/tc-mips.c (mips_ip): Don't work out the value of
743 constant %hi()s here.
747 * config/tc-i386.c (tc_i386_fix_adjustable): Test OUTPUT_FLAVOR
748 for ELF, and don't bother checking ELF relocs when non-ELF.
749 (i386_immediate): Allow absolute_section expressions for aout.
750 (i386_displacement): Likewise. Also test bfd_is_com_section.
751 (md_estimate_size_before_relax): Test OUTPUT_FLAVOR for ELF.
752 (md_apply_fix3): Hack for bfd_install_relocation when fx_pcrel,
753 not when fx_addsy. Remove dead code.
757 * configure.in: Add support for ppc-*-nto* target.
758 * configure: Regenerate.
762 * config/tc-i386.h: Reorganize.
766 * config/tc-mips.c (macro): Handle a register plus a 16-bit
767 immediate offset in "dla" and "la" expansions.
771 * configure.in: bfd_gas=yes for all i386 targets. Formatting.
772 Remove "bfd_gas=yes" from target table when covered later.
773 Consolidate some entries.
774 * configure: Regenerate
778 * config/tc-i386.c (output_insn): Save frag_now and frag_now_fix ()
779 at start of insn, pass it to output_disp and output_imm.
780 (output_disp): Added arguments. If _GLOBAL_OFFSET_TABLE_ is seen
781 in displacement for R_386_32 reloc, use R_386_GOTPC and compute
783 (output_imm): Added arguments. Compute properly addend for
785 (md_apply_fix3): Remove R_386_GOTPC handling.
786 * testsuite/gas/i386/gotpc.s: New.
787 * testsuite/gas/i386/gotpc.d: New.
788 * testsuite/gas/i386/i386.exp: Add gotpc test.
792 * config/tc-alpha.c (cpu_types): Enabled ev67, ev68, -m21264a
793 and m21264b processor names and cpu types.
794 * doc/c-alpha.texi: Documented new types.
798 * config/tc-ppc.c (md_apply_fix3): Adjust 16 bit XCOFF reloc offset.
802 * config/tc-mips.c (tc_gen_reloc): Extend GP-relative addend
803 handling to BFD_RELOC_MIPS16_GPREL.
807 * config/tc-arm.c (add_to_lit_pool): Ensure that offset to literal
808 pool is computed using signed arithmetic so that proper sign
809 extension is performed if X_add_number is a 64-bit integer.
814 * dwarf2dbg.c (dwarf2_finish): Don't emit unreferenced
815 .debug_line section unless it has line information.
819 * config/tc-ns32k.h (md_pcrel_adjust): Supply prototype.
820 * config/tc-ns32k.c (convert_iif, md_parse_option, md_show_usage):
821 Allow default displacement size to be an option "--disp-size-default".
822 (md_number_to_disp): Make error messages include value. Use %d to
823 print integers, not %s.
824 (fix_new_ns32k): Conditionally set fx_no_overflow so we don't
825 get duplicate messages sometimes.
826 (convert_iif): Grow frag to max possible instruction size. Avoid
827 creating unnecessary fixes.
828 (md_number_to_field) Add prototype.
829 (encode_operand, parse, convert_iif, md_fix_pcrel_adjust): Add
830 prototypes and make static.
831 (struct addr_mode): Make mode and scaled_mode explicitly signed.
832 (evaluate_expr): Use resultP argument instead of exprP global.
833 (get_addr_mode): Quiten compiler warnings.
834 (encode_operand): eliminate unused variables. Quiten compiler
835 warnings. Eliminate nul character in format strings.
836 (parse): argc is unsigned.
837 (reloc): Type cast index to quieten compiler.
838 (md_pcrel_adjust, md_apply_fix3): Remove unused variable.
839 (md_convert_frag): Note unused parameters. Remove unused
841 (md_create_long_jump, md_create_short_jump,
842 md_undefined_symbol_name, md_section_align, tc_gen_reloc): Note
847 * NEWS: Retroactively add entry for Lars Brinkhoff's contribution
848 of the PDP-11 and 2.11BSD a.out support.
852 * config/tc-v850.c (md_assemble): Fix range check for immediate
857 * config/tc-mips.c (mips_cpu_info_table): Clean up entries related
858 to Broadcom SB-1 core support.
862 * config/tc-mips.c (mips_target_format): Fix formatting.
863 Add recognition of n32 ABI formats.
867 * tc-mips.c (load_address): Don't clobber $at when loading a
868 64-bit address in non-PIC code if noat is in effect.
873 * config/tc-mips.c (macro): Use codes 6 and 7 in trap instructions
874 used in division/multiply macro expansions similarly to how they
875 are used in the variants with break instructions.
880 * configure.in: Add support for arm-*-nto target.
881 * configure: Regenerate.
885 * config/tc-arm.c (struct literal_pool): Add fields to allow
886 multiple literal pools to be maintained.
887 (find_literal_pool): New function.
888 (find_or_make_literal_pool): New function.
889 (add_to_literal_pool): Use find_or_make_literal_pool.
890 (arm_s_text, arm_s_data, arm_s_section): Remove - no longer
892 (s_ltorg): Use find_literal_pool.
893 (arm_cleanup): Dump all literal pools.
894 * doc/c-arm.texi: Document new behaviour of only dumping literal
899 * config/tc-ppc.c (ppc_set_cpu): Use PPC_OPCODE_64 as the default
900 rather than PPC_OPCODE_32 for powerpc64*.
904 * po/es.po: Updated Spanish translation.
905 * po/fr.po: Updated French translation.
909 * doc/c-mips.texi: Remove -mcpu. Document -mabi.
910 * configure.in (MIPS_CPU_STRING_DEFAULT): New configuration macro.
911 (USE_E_MIPS_ABI_O32, MIPS_DEFAULT_64BIT): New configuration macros.
912 * configure, config.in: Regenerate.
913 * config/tc-mips.c (file_mips_abi): Rename to mips_abi.
914 (mips_set_options): Remove "abi" field.
915 (mips_opts): Update accordingly. Replace all uses of mips_opts.abi
918 (mips_arch_string, mips_arch_info): New vars.
919 (mips_tune_string, mips_tune_info): New vars.
920 (ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New macros.
921 (HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): Don't check the ABI.
922 (mips_isa_to_str, mips_cpu_to_str): Remove.
923 (mips_ip): If the selected architecture is a generic ISA rather
924 than a processor, only mention the ISA level in error messages.
925 (OPTION_MCPU): Remove.
927 (md_longopts): Add -mfp64, remove -mcpu.
928 (mips_set_option_string): New fn.
929 (md_parse_option): Make -mipsN update file_mips_isa rather than
930 mips_opts.isa. Use mips_set_option_string to set -march or -mtune.
931 Don't let -mgp32 and -mfp32 change the ABI.
932 (show): Move to end of file. Constify string argument.
933 (md_show_usage): Move to the end of the file. Read available
934 architectures from mips_cpu_info_table.
935 (mips_set_architecture): New fn.
936 (mips_after_parse_args): Rework. Remove -mcpu handling. -mipsN
937 is an alias for -march=mipsN. Don't change the ABI based on other
938 flags. Infer the register size from the ABI as well as the
939 architecture. Complain about more conflicting arguments.
940 Unify logic with GCC.
941 (s_mipsset): Don't change the ABI.
942 (mips_elf_final_processing): Check USE_E_MIPS_ABI_O32.
943 (mips_cpu_info_table): Remove Generic-MIPS* entries, keeping just
944 "mipsN"-type entries. Remove entries that vary only in the
945 manufacturer's prefix, or that have "000" replaced by "k".
946 Remove TARGET_CPU entries. Make r2000 entry use CPU_R3000.
947 (mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
948 (mips_parse_cpu): New fn.
949 (mips_cpu_info_from_name, mips_cpu_info_from_cpu): Remove.
950 (mips_cpu_info_from_isa): Minor formatting tweak.
954 * po/sv.po: Updated Swedish translation.
955 * po/es.po: Updated Spanish translation.
959 * Makefile.am: Run "make dep-am".
960 * Makefile.in: Regenerate.
961 * doc/Makefile.in: Regenerate.
962 * config.in: Regenerate.
963 * po/POTFILES.in: Regenerate.
967 * po/fr.po: Updated French translation.
971 * CONTRIBUTORS: Ken Raeburn is no longer the maintainer for
976 * config/tc-mips.c (mips_need_elf_addend_fixup): Use S_IS_EXTERNAL
977 instead of S_IS_EXTERN.
978 (md_estimate_size_before_relax): Likewise.
979 (mips_fix_adjustable): Likewise.
983 * config/tc-mips.c (mips_pic_level): Remove IRIX4_PIC.
988 * cond.c (s_ifdef): Treat a referenced but not yet defined
989 symbol as if it were undefined, in exactly the same way as
992 * doc/as.texinfo: Document that .ifdef, .ifndef and .equiv
993 consider referenced bug not yet defined symbols to be
1002 * configure.in: Add ip2k configuraton.
1003 * configure: Regenerate.
1004 * Makefile.am: Add ip2k configuraton.
1005 * Makefile.in: Regenerate.
1006 * configure: Regenerate.
1007 * Makefile.in: Regenerate.
1008 * config/tc-ip2k.c: New file.
1009 * config/tc-ip2k.h: New files.
1010 * NEWS: Mention new support.
1011 * doc/Makefile.am (CPU_DOCS): Add c-ip2k.texi.
1012 * doc/Makefile.in: Regenerate.
1013 * doc/all.texi: Set IP2K
1014 * doc/as.texinfo: Add IP2K description.
1015 * doc/c-ip2k.texi: New file.
1019 * NEWS: Reformat to match style of other NEWS files.
1023 * tc-i386.c (i386_align_code): Implement x86_64 neutral code fillers.
1027 * config/tc-z8k.c (build_bytes): Correct order of memset args.
1031 * NEWS: Add 'Changes in 2.13'.
1035 * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define if TE_NetBSD.
1039 * config/tc-i386.c (process_suffix): Merge CODE_64BIT JumpByte
1040 case with non CODE_64BIT case. Don't warn on "qword ptr" if
1045 * config/tc-ppc.c (ppc_elf_frob_symbol): Delete.
1046 (ppc_frob_file_before_adjust): New function.
1047 * config/tc-ppc.h (tc_frob_symbol): Don't define.
1048 (ppc_elf_frob_symbol): Don't declare.
1049 (tc_frob_file_before_adjust): Define.
1050 (ppc_frob_file_before_adjust): Declare.
1052 * config/tc-ppc.c (md_pseudo_table): Warning fix.
1053 (ppc_cpu): Make it unsigned long to agree with struct powerpc_opcode
1056 (ppc_xcoff64): Rename to ppc_obj64.
1057 (md_parse_option <m>): Encode old ppc_size value in ppc_cpu.
1058 (ppc_set_cpu): Set PPC_OPCODE_32 too.
1059 (ppc_arch): Use ppc_obj64 instead of ppc_size to select bfd_mach_ppc64
1061 (ppc_target_format): Use ppc_obj64 to select format.
1062 (md_begin): Adjust for PPC_OPCODE_32/64 in ppc_cpu.
1063 (ppc_insert_operand): Use ppc_obj64 instead of ppc_size.
1064 (ppc_elf_suffix): Likewise. Don't depend on BFD_DEFAULT_TARGET_SIZE.
1065 (tc_frob_symbol): Likewise.
1066 (md_assemble): Use ppc_obj64 instead of ppc_size. Don't depend on
1067 BFD_DEFAULT_TARGET_SIZE.
1069 (ppc_is_toc_sym): Likewise.
1070 (md_apply_fix3): Likewise.
1071 * config/tc-ppc.h (TC_FORCE_RELOCATION): Don't depend on
1072 BFD_DEFAULT_TARGET_SIZE.
1073 (ELF_TC_SPECIAL_SECTIONS): Likewise.
1074 (tc_frob_symbol): Likewise.
1078 * config/tc-mips.c (macro_build): Handle MIPS16 insns.
1079 (mips_ip): Likewise.
1083 * config/tc-i386.c (md_pseudo_table <file>): Warning fix.
1084 (BFD_RELOC_8, BFD_RELOC_8_PCREL): Define for non-BFD.
1085 (md_apply_fix3): Formatting. Remove redundant test.
1086 (tc_gen_reloc): Remove redundant code.
1087 (tc_i386_force_relocation): Delete. Movy body of function to..
1088 * config/tc-i386.h (TC_FORCE_RELOCATION): .. here.
1092 * configure.in: Add hppa-*-openbsd* target, change
1093 alpha*-*-openbsd* format to elf, and use elf for sparc-*-openbsd*
1095 * configure: Regenerate.
1099 * config/tc-mips.c (macro): Shift the 32-bit address range
1100 accessible with a lone "lui" down by 32768.
1104 * config/tc-mips.c (load_address): Use non-trapping "daddu"
1105 instead of "dadd" in address calculations.
1110 * config/tc-i386.c (process_suffix): Remove intel mode movsx and
1112 (md_assemble): Instead, zap the suffix here.
1116 * NEWS: Remove next release number until the release is actually
1121 * Makefile.am (check-DEJAGNU): Revert 2002-06-25 change.
1123 * Makefile.in: Regenerate.
1127 * config/tc-s390.c (tc_s390_fix_adjustable): Prevent any adjustment
1128 to symbols in merge sections, even non pc-relative ones.
1132 * config/tc-m68hc11.h (m68hc11_listing_header): Fix warning.
1136 * config/tc-m68hc11.h (ELF_TC_SPECIAL_SECTIONS): New sections
1137 .softregs and .eeprom.
1141 * NEWS: Note the next release is 2.13.
1145 * po/tr.po: New translation imported.
1149 * ecoff.c: (get_tag): Replace strcpy with xstrdup.
1150 (ecoff_directive_def): Likewise.
1151 (ecoff_directive_tag): Likewise.
1152 * listing.c (file_info): Likewise.
1153 * hash.c (what): Likewise.
1157 * Makefile.am (check-DEJAGNU): Set LC_ALL=C and export it.
1158 * Makefile.in: Regenerated.
1162 * config/tc-sh.c (get_specific): Revert 2002-05-01 change.
1163 (assemble_ppi): Generate warning if the same register is used
1164 twice as destination in the same padd / pmuls instruction.
1168 From Catherine Moore, Michael Meissner, Richard Sandiford, Dave Brolley
1169 * po/POTFILES.in: Add tc-frv.c, tc-frv.h.
1170 * configure.in: Support frv-*-*.
1171 * Makefile.am (CPU_TYPES): Add frv.
1172 (TARGET_CPU_CFILES): Add tc-frv.c.
1173 (TARGET_CPU_HFILES): Add tc-frv.h.
1174 (DEPTC_frv_coff): New variable.
1175 (DEPTC_frv_elf): New variable.
1176 (DEPOBJ_frv_coff): New variable.
1177 (DEPOBJ_frv_elf): New variable.
1178 (DEP_frv_coff): New variable.
1179 (DEP_frv_elf): New variable.
1180 * tc-frv.c: New file.
1181 * tc-frv.h: New file.
1185 * config/obj-elf.h (TARGET_SYMBOL_FIELDS): Conditionally define.
1189 * config/tc-sh.c (assemble_ppi): Initialize reg_n.
1193 * config/tc-i370.h (tc_comment_chars): Define for i370-elf.
1198 * dwarf2dbg.h (dwarf2_directive_file): Return char *.
1199 * dwarf2dbg.c (dwarf2_directive_file): Return filename.
1200 * config/tc-mips.c (s_mips_file): Call s_app_file_string
1201 and new_logical_line for the first .file directive.
1202 * read.c (s_app_file_string): New function.
1203 (s_app_file): Call it.
1204 * read.h (s_app_file_string): Add declaration.
1208 * configure.in: Remove MIPS_STABS_ELF.
1209 * configure: Regenerated.
1210 * config.in: Regenerated.
1211 * config/obj-elf.h (ECOFF_DEBUGGING): Define to mips_flag_mdebug
1213 * config/tc-mips.c (mips_pseudo_table): Remove #ifdef around
1215 (pdr_seg): Declare unconditionally.
1216 (md_begin): Always generate .pdr unless ECOFF_DEBUGGING or not ELF.
1217 (s_mips_end): Likewise. Generate stabs function markers.
1218 (s_mips_ent): Generate stabs function markers.
1219 (s_mips_frame): Always generate .pdr unless ECOFF_DEBUGGING or not
1221 (s_mips_mask): Likewise.
1222 (mips_flag_mdebug): New.
1223 (md_longopts): Add "mdebug" and "no-mdebug".
1224 (md_parse_options): Add OPTION_MDEBUG and OPTION_NO_MDEBUG.
1225 (mips_after_parse_args): Set mips_flag_mdebug.
1226 * doc/as.texinfo: Add "-mdebug" and "-no-mdebug" for MIPS.
1230 * config/tc-mips.c (md_apply_fix3): Don't subtract the symbol's
1231 value twice for RELA relocations.
1235 * symbols.c (resolve_symbol_value): Initialise final_val.
1237 * subsegs.c (subsegs_print_statistics): Cast frchp to void *.
1241 * config/tc-ppc.c (ppc_subseg_align): Delete.
1242 (ppc_change_csect): Default csect align is 2.
1243 * config/tc-ppc.h (SUB_SEGMENT_ALIGN): Delete
1247 * config/tc-avr.c (mcu_types): Update.
1251 * configure.in (vax-*-netbsdelf*, vax-*-netbsdaout*)
1252 (vax-*-netbsd*): New targets.
1253 * configure: Regenerate.
1254 * config/aout_gnu.h (enum machine_type): Add M_VAX4K_NETBSD.
1255 * config/tc-vax.c: Add support for ELF and PIC.
1256 (flag_want_pic): New flag.
1257 (float_cons): Fix prototype.
1258 (md_apply_fix3): Adjust for BFD_ASSEMBLER.
1259 (md_assemble): Introduce a new is_absolute local, and use it
1260 rather than repeating the test. Make fatal errors actually
1261 fatal by using as_fatal as appropriate. Adjust for BFD_ASSEMBLER.
1262 Add support for ELF. Add support for PIC.
1263 (md_convert_frag): Adjust for BFD_ASSEMBLER.
1264 (tc_aout_fix_to_chars): Only include if OBJ_AOUT and not
1266 (vax_reg_parse): Make the % register prefix mandatory for ELF,
1267 optional for a.out, and not allowed for VMS. Adjust all callers.
1268 (md_create_short_jump): Add ATTRIBUTE_UNUSED to unused arguments.
1269 (md_create_long_jump): Likewise.
1270 (md_undefined_symbol): Likewise.
1271 (md_section_align): Likewise.
1272 (md_shortopts): Allow -k and -K for ELF.
1273 (md_parse_option): Set flag_want_pic if -k or -K.
1274 (tc_headers_hook): New function if OBJ_AOUT and not BFD_ASSEMBLER.
1275 (tc_gen_reloc): New function if BFD_ASSEMBLER.
1276 * config/tc-vax.h (tc_headers_hook): Remove.
1277 (TARGET_FORMAT): Set according to object format and target
1279 (BFD_ARCH, TARGET_ARCH): Define.
1280 (NO_RELOC): Adjust for BFD_ASSEMBLER.
1281 (TC_RELOC_RTSYM_LOC_FIXUP, TC_FIX_ADJUSTABLE)
1282 (tc_fix_adjustable): Define if BFD_ASSEMBLER.
1283 * config/vax-inst.h (VAX_JSB, VAX_CALLS, VAX_CALLG): Define.
1287 * Makefile.am: Run "make dep-am".
1288 * Makefile.in: Regenerate.
1290 * as.c: Replace CONST with const.
1291 * write.c: Likewise.
1292 * config/obj-coff.c: Likewise.
1293 * config/tc-a29k.c: Likewise.
1294 * config/tc-arm.c: Likewise.
1295 * config/tc-dlx.c: Likewise.
1296 * config/tc-h8300.c: Likewise.
1297 * config/tc-h8500.c: Likewise.
1298 * config/tc-i370.c: Likewise.
1299 * config/tc-i860.c: Likewise.
1300 * config/tc-i960.c: Likewise.
1301 * config/tc-m68hc11.c: Likewise.
1302 * config/tc-m68k.c: Likewise.
1303 * config/tc-m88k.c: Likewise.
1304 * config/tc-mcore.c: Likewise.
1305 * config/tc-mips.c: Likewise.
1306 * config/tc-ns32k.c: Likewise.
1307 * config/tc-pdp11.c: Likewise.
1308 * config/tc-pj.c: Likewise.
1309 * config/tc-s390.c: Likewise.
1310 * config/tc-sh.c: Likewise.
1311 * config/tc-sparc.c: Likewise.
1312 * config/tc-tahoe.c: Likewise.
1313 * config/tc-tic80.c: Likewise.
1314 * config/tc-v850.c: Likewise.
1315 * config/tc-vax.c: Likewise.
1316 * config/tc-w65.c: Likewise.
1317 * config/tc-z8k.c: Likewise.
1321 Based on patch from Matt Green:
1322 * config/obj-elf.h (ECOFF_DEBUGGING): Make configurable.
1323 * config/tc-mips.c (s_mips_file): Renamed from s_file.
1324 (s_mips_loc): New function.
1325 (mips_nonecoff_pseudo_table): Call them.
1326 (append_insn): Call dwarf2_emit_insn.
1330 * config/tc-mips.c (mips_opts): Fix comment, all ASE fields are set
1332 (file_ase_mips16): New veriable.
1333 (mips_eabi64): Remove.
1334 (CPU_HAS_MIPS16): New define.
1335 (CPU_HAS_MDMX): Fix data type.
1336 (md_begin): Code cleanup. Use file_ase_mips16.
1337 (mips_elf_final_processing): Handle mips16 header flag.
1338 Handle EABI flag without intermediate variable.
1342 * doc/as.texinfo: Update MIPS documentation.
1346 * config/tc-mips.c: Add define for $zero register.
1347 (md_begin): Add $zero as alias name for $0.
1348 (insn_uses_reg): Use ZERO define.
1349 (mips_ip): Add $zero as alias name for $0.
1350 (mips16_ip): Likewise.
1351 (s_cplocal): Demand empty rest of input line.
1352 (tc_get_register): Likewise. Add support for $kt0, kt1 register
1353 names. Use ZERO define. Fix input_line_pointer progress.
1357 * symbols.c: Replace CONST by const throughout.
1358 (symbol_find_exact): Split out from..
1359 (symbol_find_base): ..here.
1360 * symbols.h: Replace CONST by const throughout.
1361 (symbol_find_exact): Declare.
1362 * config/obj-elf.c: #include "struc-symbol.h".
1363 (elf_frob_file): If group name matches an exported symbol, use that
1364 symbol for the signature and ".group" as the section name.
1368 * config/tc-sh.c (parse_at): @(symbol,pc) is A_DISP_PC again,
1370 * testsuite/gas/sh/pcrel.s: Also test @(symbol,pc).
1371 * testsuite/gas/sh/pcrel.d: Update.
1372 * testsuite/gas/sh/pcrel.l: New file.
1376 * tc-mips.c (mips_after_parse_args): Always set mips_opts.ase_mips3d
1377 and mips_opts.ase_mdmx if they are uninitialized.
1381 * gas/config/tc-hppa.c (pa_ip): Replace "L$0\001" with FAKE_LABEL_NAME.
1382 (hppa_force_relocation): Check if a stub just before the start symbol
1383 of the last call_info is reachable before forcing relocation. Fix
1388 * config/tc-mips.c (mips_after_parse_args): New function.
1389 (md_begin): Move processing of defaults to mips_after_parse_args.
1390 config/tc-mips.h (md_after_parse_args): Define.
1394 * configure.in (sh5*): Set cpu_type to sh64 and endian to big.
1395 (sh5le*, sh64le*): Set cpu_type to sh64 and endian to little.
1396 (sh5*-*-netbsd*, sh64*-*-netbsd*): New targets.
1397 * configure: Regenerate.
1398 * config/tc-sh64.c (sh64_target_format): Add support for NetBSD
1403 * config/tc-sh64.h (MD_PCREL_FROM_SECTION): Undef before redefining.
1407 * config/obj-elf.c (obj_elf_change_section): Set and check elf
1408 linkonce flag. Print all warnings.
1409 (obj_elf_section): Parse ",comdat" for groups.
1410 (elf_frob_file): Set SEC_LINK_ONCE on COMDAT groups. Check
1411 consistency of comdat flag.
1415 * config/tc-alpha.c (alpha_adjust_symtab_relocs): Fix thinko
1416 with LITERALs without sequence numbers.
1420 * config/tc-alpha.c: Move LITUSE constants to "elf/alpha.h".
1421 Rename them LITUSE_ALPHA_*.
1425 * config/tc-h8300.c (get_operand): Allow stm.l and ldm.l insns to
1426 accept parentheses enclosed register lists.
1430 * Makefile.am: Run "make dep-am".
1431 * Makefile.in: Regenerate.
1432 * po/POTFILES.in: Regenerate.
1436 * configure.in: Add i386-*-nto-qnx*.
1437 * configure: Regenerate.
1441 * config/tc-mips.c (mips_ip): Use unsigned long values for
1446 * config/tc-mips.c (s_cpsetup): Fix initialization of
1447 mips_cpreturn_register and mips_cpreturn_offset.
1451 * config/tc-mips.c (s_cpsetup): Fix comment.
1455 * config/tc-mips.c (md_begin): Add $ra as alias name for $31.
1456 (mips_ip): Likewise.
1457 (mips16_ip): Likewise.
1458 (tc_get_register): Likewise.
1463 * config/tc-mips.c (mips_set_options): New "ase_mdmx" member.
1464 (mips_opts): Initialize "ase_mdmx" member.
1465 (file_ase_mdmx): New variable.
1466 (CPU_HAS_MDMX): New macro.
1467 (md_begin): Initialize mips_opts.ase_mdmx and file_ase_mdmx
1468 based on command line options and configuration defaults.
1469 (macro_build): Note in comment that use of MDMX in macros is
1470 not currently allowed.
1471 (validate_mips_insn): Add support for the "O", "Q", "X", "Y", and
1472 "Z" MDMX operand types.
1473 (mips_ip): Accept MDMX instructions if mips_opts.ase_mdmx is set,
1474 and add support for the "O", "Q", "X", "Y", and "Z" MDMX operand
1476 (OPTION_MDMX, OPTION_NO_MDMX, md_longopts, md_parse_option):
1477 Add support for "-mdmx" and "-no-mdmx" options.
1478 (OPTION_ELF_BASE): Move to accomodate new options.
1479 (s_mipsset): Support ".set mdmx" and ".set nomdmx".
1480 (mips_elf_final_processing): Set MDMX ASE ELF header flag if
1481 file_ase_mdmx was set.
1482 * doc/as.texinfo: Document -mdmx and -no-mdmx options.
1483 * doc/c-mips.texi: Likewise, and document ".set mdmx" and ".set
1488 * config/tc-mips.c (OPTION_NO_M7000_HILO_FIX): Rename to
1489 OPTION_MNO_7000_HILO_FIX. Add alternate "mno-fix7000"
1490 command line switch conforming to gcc conventions.
1491 * doc/c-mips.texi: Document -mno-fix7000 instead of no-mfix-7000.
1495 * config/tc-mips.c (macro_build_jalr): New Function.
1496 (md_begin): NewABI uses big GOTs.
1497 (macro_build): Recognize BFD_RELOC_MIPS_GOT_DISP,
1498 BFD_RELOC_MIPS_GOT_PAGE, BFD_RELOC_MIPS_GOT_OFST as valid.
1499 (load_address): Add some NewABI PIC support.
1501 (md_apply_fix): Special handling for BFD_RELOC_MIPS_JALR.
1502 (tc_gen_reloc): Don't encode NewABI vtables in REL relocations.
1506 * config/tc-mips.c (load_address): Use mips_gp_register instead
1507 of hardcoded value. Remove dbl parameter, use HAVE_32BIT_ADDRESSES
1509 (macro): Use mips_gp_register instead of hardcoded value.
1513 * expr.h (operatorT): Add O_md17..O_md32.
1514 * config/tc-alpha.c (O_lituse_tlsgd, O_lituse_tlsldm, O_tlsgd,
1515 O_tlsldm, O_gotdtprel, O_dtprelhi, O_dtprello, O_dtprel, O_gottprel,
1516 O_tprelhi, O_tprello, O_tprel): New.
1517 (USER_RELOC_P, alpha_reloc_op_tag, debug_exp): Include them.
1518 (DUMMY_RELOC_LITUSE_TLSGD, DUMMY_RELOC_LITUSE_TLSLDM): New.
1519 (LITUSE_TLSGD, LITUSE_TLSLDM): New.
1520 (struct alpha_reloc_tag): Add master, saw_tlsgd, saw_tlsld,
1521 saw_lu_tlsgd, saw_lu_tlsldm. Make multi_section_p a bit field.
1522 (md_apply_fix3): Handle TLS relocations.
1523 (alpha_force_relocation, alpha_fix_adjustable): Likewise.
1524 (alpha_adjust_symtab_relocs): Sort LITERAL relocs after the
1525 associated TLS reloc. Check lituse_tls relocs match up.
1526 (emit_insn): Handle TLS relocations.
1529 * doc/c-alpha.texi: Add docs for tls relocations.
1533 * config/tc-mips.c (mips_gprel_offset): New variable.
1534 (s_gpvalue): Use it.
1538 * gas/config/tc-d10v.c (check_resource_conflict): Only check
1539 write-write conflicts.
1540 (md_assemble): Reformat introductory comment.
1541 (parallel_ok): Prevent packing only if the first
1542 instruction cannot be packed.
1547 * config/tc-d10v.c (build_insn): Check for immediates.
1551 * config/tc-mips.c: Replace GP in comments by $gp.
1552 (mips_big_got): Initialize.
1553 (mips_trap): Initialize.
1554 (load_address): Use mips_gp_register instead of hardcoded value.
1555 Remove dbl parameter, use HAVE_32BIT_ADDRESSES instead.
1556 (macro): Use mips_gp_register instead of hardcoded value.
1557 (macro2): Change load_address calls.
1558 (md_pcrel_from): Comment formatting.
1559 (s_cpload): Use mips_gp_register instead of hardcoded value.
1560 (s_cprestore): Likewise. Comment formatting.
1561 (s_gpword): Fix data type.
1562 (s_cpadd): Use mips_gp_register instead of hardcoded value.
1563 (nopic_need_relax): Replace GP in comments by $gp.
1564 (mips_elf_final_processing): Better comment.
1568 * configure.in: Add DLX configuraton
1569 * Makefile.am: Add DLX configuraton
1570 * configure: Regenerate.
1571 * Makefile.in: Regenerate.
1572 * config/tc-dlx.c: New file.
1573 * config/tc-dlx.h: New files.
1574 * NEWS: Mention new support.
1578 * config/obj-coff.c (write_object_file): Add missing semicolon.
1582 * config/tc-mips.c (mips_emit_delays): Replace magic constant for RA
1583 by the define. Remove superfluous check of mips_opts.mips16.
1584 (append_insn): Likewise. Canonicalize variable increments.
1585 (macro_build): Canonicalize variable increments.
1586 (macro_build_lui): Likewise.
1587 (load_register): Likewise.
1588 (load_address): Move pointer initialization.
1589 (macro): Move pointer to a more local scope. Canonicalize variable
1590 increments. Better comments. Replace magic constant for RA by the
1592 (macro2): Replace magic constant for RA by the define. Canonicalize
1593 variable increments.
1594 (mips_ip): Canonicalize variable increments.
1595 (mips16_ip): Replace magic constant for RA by the define.
1596 (my_getSmallParser): Canonicalize variable increments/decrements.
1597 (my_getPercentOp): Likewise.
1598 (my_getSmallExpression): Likewise.
1599 (s_align): Likewise.
1600 (s_mipsset): Likewise.
1601 (s_cpsetup): Likewise.
1602 (s_insn): Remove superfluous check of mips_opts.mips16.
1603 (s_mips_stab): Likewise.
1604 (mips_handle_align): Canonicalize variable increments.
1605 (s_mips_ent): Likewise.
1606 (s_mips_end): Add comment.
1610 * configure.in: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
1611 * configure: Regenerate.
1615 * Makefile.am (OBJS): Depend on ansidecl.h and fopen-same.h.
1616 * Makefile.in: Regenerate.
1617 * dep-in.sed: Reorder to match OBJS in Makefile.am.
1618 * configure.in (ALL_OBJ_DEPS): Add symcat.h when need_bfd.
1619 * configure: Regenerate.
1620 * as.h: Use #include "" instead of <> for local header files.
1621 * flonum-konst.c: Likewise.
1622 * flonum-mult.c: Likewise.
1624 * listing.c: Likewise.
1625 * config/tc-ia64.h: Likewise.
1626 * config/tc-v850.h: Likewise.
1630 * configure.in: Add a target for i386-netbsdpe.
1631 * configure: Regenerate.
1635 * config/obj-elf.c (elf_common): Renamed from obj_elf_common.
1636 (obj_elf_common): Call elf_common.
1637 (obj_elf_tls_common): New function.
1638 (elf_pseudo_tab): Support .tls_common.
1639 (special_sections): Add .tdata and .tbss.
1640 (obj_elf_change_section): Set SEC_THREAD_LOCAL for SHF_TLS
1642 (obj_elf_parse_section_letters): Support T in section flags (SHF_TLS).
1643 (obj_elf_parse_section_letters): Include T in error message.
1644 * config/tc-ppc.c (ppc_section_letter): Likewise.
1645 * config/tc-alpha.c (alpha_elf_section_letter): Likewise.
1646 (tc_gen_reloc): Handle SEC_THREAD_LOCAL the same way as
1648 * config/tc-sparc.c (md_apply_fix3): Likewise.
1649 * config/tc-i386.c (tc_i386_fix_adjustable): Add TLS relocs.
1650 Define them if not BFD_ASSEMBLER.
1651 (lex_got): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF, @DTPOFF
1653 (md_apply_fix3): Add TLS relocs.
1654 * config/tc-ia64.c (enum reloc_func): Add FUNC_DTP_MODULE,
1655 FUNC_DTP_RELATIVE, FUNC_TP_RELATIVE, FUNC_LT_DTP_MODULE,
1656 FUNC_LT_DTP_RELATIVE, FUNC_LT_TP_RELATIVE.
1657 (pseudo_func): Support @dtpmod(), @dtprel() and @tprel().
1658 (ia64_elf_section_letter): Include T in error message.
1659 (md_begin): Support TLS operators.
1660 (md_operand): Likewise.
1661 (ia64_gen_real_reloc_type): Support TLS relocs.
1662 * testsuite/gas/i386/tlspic.s: New file.
1663 * testsuite/gas/i386/tlsd.s: New file.
1664 * testsuite/gas/i386/tlsnopic.s: New file.
1665 * testsuite/gas/i386/tlsd.d: New file.
1666 * testsuite/gas/i386/tlsnopic.d: New file.
1667 * testsuite/gas/i386/tlspic.d: New file.
1668 * testsuite/gas/i386/i386.exp: Add tlsd, tlsnopic and tlspic tests.
1669 * testsuite/gas/ia64/tls.s: New file.
1670 * testsuite/gas/ia64/tls.d: New file.
1671 * testsuite/gas/ia64/ia64.exp: Add tls test.
1672 * write.c (adjust_reloc_syms): Don't change symbols in
1673 SEC_THREAD_LOCAL sections to STT_SECTION + addend.
1677 * config/tc-arm.c (md_apply_fix3): For the Thumb BLX reloc
1678 round the relocation up rather than down.
1682 * config/obj-coff.c (obj_coff_section): Silently ignore an 'a'
1684 * doc/as.texinfo: Document that the COFF version of .section
1685 ignores the 'a' flag.
1689 * config/tc-alpha.c (assemble_tokens): Protect use of
1690 ALPHA_RELOC_TABLE with #ifdef RELOC_OP_P.
1692 * write.c (size_seg): Check adjustment to last frag.
1693 (SUB_SEGMENT_ALIGN): If HANDLE_ALIGN defined, pad out last frag to
1695 * config/obj-coff.c (SUB_SEGMENT_ALIGN): Likewise.
1696 * config/obj-ieee.c (SUB_SEGMENT_ALIGN): Likewise.
1697 (write_object_file): Invoke md_do_align if available, and use
1698 frag_align_code on text sections.
1699 * config/obj-vms.h (SUB_SEGMENT_ALIGN): Now two args.
1700 * config/tc-m88k.h (SUB_SEGMENT_ALIGN): Likewise.
1701 * config/tc-ppc.h (SUB_SEGMENT_ALIGN): Likewise.
1702 * config/tc-sh.h (SUB_SEGMENT_ALIGN): Likewise.
1703 * config/tc-i386.h (SUB_SEGMENT_ALIGN): Likewise. Define for
1708 * dwarf2dbg.c (dwarf2_directive_loc): Call listing_source_file
1713 * config/tc-arm.c (arm_s_section): Enable for COFF builds as well
1718 * dwarf2dbg.c (dwarf2_emit_insn): Emit only one line symbol
1719 for one .loc for compiler.
1723 * config/tc-mips.c (macro): Relax warning, it's toot strict for
1728 * config/tc-mips.c (macro2): Add 64 bit drol, dror macros.
1729 Optimize the rotate by zero case.
1733 * configure.in: Remove accidental enabling of bfd_gas=yes for
1735 * configure: Regenerate.
1739 * app.c: Fix formatting.
1741 * ehopt.c: Likewise.
1743 * input-file.c: Likewise.
1744 * listing.c: Likewise.
1745 * macro.h: Likewise.
1746 * stabs.c: Likewise.
1747 * symbols.c: Likewise.
1751 * config/obj-generic.c: Delete file.
1752 * config/obj-generic.h: Likewise.
1756 * config/tc-avr.c (mcu_types): Update for new devices.
1760 * config/tc-mips.c (macro): Warn about wrong la/dla use.
1764 * config/tc_mips.c (s_cpsetup): Fix completely bogus code which had
1765 worked sometimes by accident. Fix copy&paste comment.
1769 * config/tc-mips.c (md_begin): Fix .reginfo and .MIPS.option section
1770 alignment for NewABI. Let n32 use .reginfo. Remove useless casts.
1771 (mips_elf_final_processing): Let n32 use .reginfo.
1775 * config/tc-mips.c (append_insn): Fix too small range of variable.
1779 * config/tc-arm.c (arm_cleanup): Remove redundant call to
1780 listing_prev_line().
1784 * config/tc-arm.c (md_assemble): Remove redundant call to
1787 * dwarf2dbg.c (dwarf2_emit_insn): Do not reset
1790 * stabs.c (s_stab_generic): Fix grammatical error in warning
1795 * write.c (subsegs_finish): Don't specially align last subseg.
1799 * stabs.c (s_stab_generic): Warn about a description field that is
1802 * config/obj-coff.c: Fix compile time warnings when compiling
1803 without BFD_ASSEMBLER defined.
1806 * config/tc-sh.c (md_pcrel_from): Define for use with sh-hms
1808 (md_pcrel_from_section): Use md_pcrel_from().
1812 * dwarf2dbg.c (dwarf2_emit_insn): Use the 'current' struct filled
1813 by dwarf2_directive_loc, instead of calling dwarf2_where.
1817 * config/obj-coff.h: Fix formatting.
1818 * config/tc-mcore.c: Likewise.
1819 * config/tc-mn10300.c: Likewise.
1820 * config/tc-openrisc.c: Likewise.
1821 * config/tc-or32.c: Likewise.
1822 * config/tc-pdp11.c: Likewise.
1823 * config/tc-ppc.c: Likewise.
1824 * config/tc-ppc.h: Likewise.
1825 * config/tc-sh64.c: Likewise.
1826 * config/tc-sh.c: Likewise.
1827 * config/tc-tic54x.c: Likewise.
1828 * config/tc-xstormy16.c: Likewise.
1829 * config/tc-xstormy16.h: Likewise.
1833 * config/obj-coff.c: Fix formatting.
1834 * config/obj-elf.c: Likewise.
1835 * config/tc-alpha.c: Likewise.
1836 * config/tc-arm.c: Likewise.
1837 * config/tc-d10v.c: Likewise.
1838 * config/tc-d30v.c: Likewise.
1839 * config/tc-h8300.c: Likewise.
1840 * config/tc-hppa.c: Likewise.
1844 * config/tc-i386.c (md_estimate_size_before_relax) Don't lose
1845 reloc when no_cond_jump_promotion.
1849 * config/tc-i960.c (md_estimate_size_before_relax): Return size of
1850 current variable part of frag.
1854 * config/tc-mmix.c: Fix formatting.
1855 * config/tc-mmix.h: Likewise.
1859 * configure: Regenerate.
1863 * config/tc-m68k.c: Fix formatting.
1867 * Makefile.am: Honour DESTDIR.
1868 * Makefile.in: Regenerate.
1872 * config/tc-ia64.c: Fix formatting.
1873 * config/tc-ia64.h: Likewise.
1877 * config/tc-mips.c: Fix formatting.
1878 * config/tc-s390.c: Likewise.
1879 * config/tc-s390.h: Likewise.
1883 * config/tc-s390.c (md_gather_operands): Emit dwarf2 line-number
1884 information for instructions.
1888 * as.h: Fix formatting.
1891 * dwarf2dbg.c: Likewise.
1892 * frags.h: Likewise.
1894 * macro.c: Likewise.
1896 * stabs.c: Likewise.
1897 * symbols.c: Likewise.
1901 * app.c (mri_pseudo): Only declare for TC_M68K.
1903 * config/tc-ppc.c (mapping): Map sectoff to BFD_RELOC_16_BASEREL.
1904 (ppc_elf_validate_fix): Replace BFD_RELOC_32_BASEREL with
1905 BFD_RELOC_16_BASEREL.
1906 (md_assemble): Likewise.
1907 (md_apply_fix3): Likewise.
1911 * config/tc-arm.c (thumb_add_sub): Do not convert a subtract of
1912 zero into an add of zero - it is not the same.
1916 * tc-sh.c (get_specific): Generate warning if the same
1917 destination register is used in parallel instructions.
1921 * config/tc-i386.c (extra_symbol_chars): Add '[' to the list.
1925 * write.c (cvt_frag_to_fill): Set fr_offset to zero on .org
1926 backwards to prevent cascading errors.
1930 * configure.in: Add support for powerpc-*-windiss.
1931 * configure: Regenerated.
1935 * config/tc-s390.c (md_parse_option): Formatting.
1937 * config/tc-i386.c: Formatting fixes, add missing space in error
1942 * config/tc-z8k.c (build_bytes): Add support for new cases:
1943 CLASS_IGNORE and ARG_NIM4.
1944 (md_assemble): Prevent destruction of input_line_pointer if
1945 get_operands returns failure.
1949 * config/tc-mips.c (macro_build): Do _not_ allow MIPS-3D
1950 instructions to be generated by macros.
1954 * config/tc-i386.c (output_jump, output_disp)
1955 (md_estimate_size_before_relax): Don't set fx_pcrel_adjust any
1957 (md_apply_fix3): Remember addend value for rela relocations.
1958 (tc_gen_reloc): Correctly compute pc-relative relocation addend.
1962 * config/tc-mips.c (macro_build): Add close-parenthesis missing
1963 from previous change.
1967 * config/tc-mips.c (macro_build): Add warning if macro instructions
1968 are expanded into a branch delay slot.
1972 * dwarf2dbg.c (dwarf2_gen_line_info): Do emit duplicate line
1973 numbers, gdb relies on them to detect the start of the prologue.
1977 * config/tc-s390.c (tc_s390_fix_adjustable): Prevent adjustments to
1978 symbols in merge sections.
1982 * as.c (main): Don't reference _bfd_chunksize.
1986 * config/tc-d10v.c (d10v_fix_adjustable): Prevent adjustments to
1987 symbols in merge sections.
1991 * doc/invoke.texi (TC_LARGEST_EXPONENT_IS_NORMAL): Document.
1992 * config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): Add an
1993 argument for the precision.
1994 (gen_to_words): Update accordingly.
1998 * as.c (parse_args <OPTION_VERSION>): Use VERSION is
1999 BFD_VERSION_STRING unavailable.
2000 * config/tc-i386.c (INLINE): Define (for non-BFD assembler).
2004 * config/tc-sh.h (TC_FIX_ADJUSTABLE): Disable adjusting if
2005 symbol_used_in_reloc_p is true.
2007 * config/tc-sh.c (md_apply_fix3): Don't zero relocations on big
2012 * dep-in.sed: Cope with absolute paths.
2013 * Makefile.am (dep.sed): Subst TOPDIR.
2015 * Makefile.in: Regenerate.
2019 * config/tc-mips.c (mips16_macro_build): Cast type mismatch.
2020 (mips_ip): Remove unused variable.
2021 (md_apply_fix3): Cast signed/unsignes mismatches. Replace
2022 unsigned char with bfd_byte.
2023 (s_file): Remove unused variable.
2024 (s_mips_ent): Likewise.
2028 * config/tc-d10v.c (d10v_insert_operand): Fix warning in as_bad_where.
2030 (find_opcode): Fix warning in as_warn.
2031 * config/tc-d10v.h: Update Copyright.
2037 * config/tc-d10v.c (check_resource_conflict): New function to
2038 check for resource conflicts.
2041 * config/tc-d10v.c (build_insn): Check for unresolved imm4 or
2043 * config/tc-d10v.c (find_opcode): Emit a warning if one of the
2044 reserved control registers is used.
2045 * config/tc-d10v.c (build_insn): Check for unresolved imm4 or
2049 * tc-d10v.c (parallel_ok): Prevent packing only if the first
2050 instruction cannot be packed.
2053 * gas/config/tc-d10v.c (check_resource_conflict): Only check
2054 write-write conflicts.
2055 (md_assemble): Reformat introductory comment.
2056 * opcodes/d10v-opc.c (d10v_opcodes): `btsti' does not modify its
2061 * symbols.c (resolve_symbol_value <O_uminus, O_bit_not,
2062 O_logical_not>): Derive final_seg from add_symbol.
2063 <O_multiply..O_logical_or>: More final_seg twiddles.
2067 * config/tc-ia64.c (ia64_cons_fix_new): Handle 8 byte iplt reloc
2072 * config/tc-i386.c (output_jump): Set fx_pcrel_adjust to size of
2073 field for pc-relative fixups.
2074 (output_disp): Likewise.
2075 (md_estimate_size_before_relax): Likewise.
2076 (tc_gen_reloc): Subtract fx_pcrel_adjust instead of fx_size for
2077 pc-relative fixups in 64bit mode.
2081 * config/te-aix5.h: Typo fix.
2085 * Makefile.am: Run "make dep-am".
2086 * Makefile.in: Regenerate.
2087 * doc/Makefile.in: Regenerate.
2091 * config/tc-arm.c (vfp_dp_reg_required_here): Fix typo
2092 (vfp_sp_reg_pos -> vfp_dp_reg_pos).
2096 * config/tc-mips.c (md_estimate_size_before_relax): Do not modify
2097 the EXTENDED bit here; report the estimate according to the
2102 * configure.in: Add AIX 5 support.
2103 * config/tc-ppc.c (ppc_target_format): Add AIX 5 64 bit target.
2104 * config/te-aix5.h: New file. AIX 5 support.
2105 * configure: Regenerate.
2109 * po/fr.po: Updated version.
2113 * doc/c-mips.texi (Machine Dependencies): Add new node.
2117 * config/tc-mips.c (mips_set_options): New "ase_mips3d" member.
2118 (mips_opts): Initialize "ase_mips3d" member.
2119 (file_ase_mips3d): New variable.
2120 (CPU_HAS_MIPS3D): New macro.
2121 (md_begin): Initialize mips_opts.ase_mips3d and file_ase_mips3d
2122 based on command line options and configuration defaults.
2123 (macro_build, mips_ip): Accept MIPS-3D instructions if
2124 mips_opts.ase_mips3d is set.
2125 (OPTION_MIPS3D, OPTION_NO_MIPS3D, md_longopts, md_parse_option):
2126 Add support for "-mips3d" and "-no-mips3d" options.
2127 (OPTION_ELF_BASE): Move to accomodate new options.
2128 (s_mipsset): Support ".set mips3d" and ".set nomips3d".
2129 (mips_elf_final_processing): Add a comment indicating that a
2130 MIPS-3D ASE ELF header flag should be set, when one exists.
2131 * doc/as.texinfo: Document -mips3d and -no-mips3d options.
2132 * doc/c-mips.texi: Likewise, and document ".set mips3d" and ".set
2133 nomips3d" directives.
2137 * config/tc-mmix.c (md_estimate_size_before_relax): Don't consider
2138 a weak symbol in same section to be within reach.
2142 * po/fr.po: Updated version.
2146 * config/tc-ia64.c (fixup_unw_records): Clear region when seeing a
2147 body record so that an error is given for misplaced .save
2152 * config/tc-i386.h (REX_OPCODE): Define.
2153 (REX_MODE64, REX_EXTX, REX_EXTY, REX_EXTZ): Define.
2154 (rex_byte): typedef to int.
2155 * config/tc-i386.c: Group prototypes and vars together.
2156 Formatting fixes. Remove occurrences of "register" keyword.
2159 (mode_from_disp_size): Add INLINE keyword to prototype.
2160 (fits_in_signed_byte): Likewise.
2161 (fits_in_unsigned_byte): Likewise.
2162 (fits_in_unsigned_word): Likewise.
2163 (fits_in_signed_word): Likewise.
2164 (fits_in_unsigned_long): Likewise.
2165 (fits_in_signed_long): Likewise.
2166 (type_names): Constify.
2167 (intel_float_operand): Constify param.
2168 (add_prefix): Use REX_OPCODE.
2169 (md_assemble): Likewise. Modify for changed rex_byte.
2170 (parse_insn): Split out of md_assemble.
2171 (parse_operands): Likewise.
2172 (swap_operands): Likewise.
2173 (optimize_imm): Likewise.
2174 (optimize_disp): Likewise.
2175 (match_template): Likewise.
2176 (check_string): Likewise.
2177 (process_suffix): Likewise.
2178 (check_byte_reg): Likewise.
2179 (check_long_reg): Likewise.
2180 (check_qword_reg): Likewise.
2181 (check_word_reg): Likewise.
2182 (finalize_imm): Likewise.
2183 (process_operands): Likewise.
2184 (build_modrm_byte): Likewise.
2185 (output_insn): Likewise.
2186 (output_branch): Likewise.
2187 (output_jump): Likewise.
2188 (output_interseg_jump): Likewise.
2189 (output_disp): Likewise.
2190 (output_imm): Likewise.
2194 * doc/as.texinfo: Wrap @menu in @ifnottex, not @ifinfo.
2198 * config/tc-i386.c (tc_gen_reloc): Don't attempt to handle 8 byte
2199 relocs except when BFD64.
2201 * write.c (number_to_chars_bigendian): Don't abort when N is
2202 larger than sizeof (VAL).
2203 (number_to_chars_littleendian): Likewise.
2207 * config/tc-hppa.c (md_apply_fix3): Add cast.
2208 (hppa_fix_adjustable): Adjust list of selectors using e_lrsel and
2213 * tc-pdp11.c: Use VAX float format support for PDP-11 target.
2214 (parse_ac5): New function for parsing float regs in float operand.
2215 (parse_expression): Remove attempt to make literals be octal.
2216 (parse_op_no_deferred): Support float literals.
2217 (parse_op): Reject attempts to refer to float regs.
2218 (parse_fop): New function, like parse_op but for float operand.
2219 (md_assemble): Add cases to parse float operands. Also fix
2220 IMM3, IMM6, IMM8 cases to pick up the operand from the right spot.
2224 * config/obj-elf.c (special_section): Add .init_array,
2225 .fini_array and .preinit_array.
2227 * config/tc-ia64.h (ELF_TC_SPECIAL_SECTIONS): Remove
2228 .init_array and .fini_array.
2232 * config/obj-elf.c (elf_copy_symbol_attributes): Don't copy
2234 (obj_frob_symbol): Copy visibility.
2238 * config/tc-alpha.c (s_alpha_text): Use obj_elf_text for OBJ_ELF, not
2240 (s_alpha_data): Use obj_elf_data for OBJ_ELF, not s_data.
2244 * po/es.po: Updated.
2248 * config/tc-mips.c (mips_need_elf_addend_fixup): For embedded-PIC
2249 only, undo the changes made on 2001-06-08, with the
2250 effect being that common or extern symbols are
2251 adjusted for embedded-PIC, but weak symbols are not.
2252 (md_estimate_size_before_relax: Likewise, with the effect
2253 that extern symbols are treated the same as weak symbols
2254 only if not embedded-PIC.
2255 (mips_fix_adjustable) Likewise, with the effect that
2256 weak or extern symbols are not adjusted for embedded-PIC.
2257 (md_apply_fix3): Tweak so that the case where value is zero
2258 is handled more correctly for embedded-PIC code.
2262 * doc/as.texinfo (Overview): Add missing @ifset IA64
2264 * configure.in (LINGUAS): Add es.po.
2265 * configure: Regenerate.
2266 * po/es.po: New file.
2270 * config/tc-mips.c (set_at): Fix handling of 64bit register loads.
2271 (macro): Likewise. Fix la/dla address expansions for EMBEDDED_PIC
2272 and NO_PIC cases. Code cleanup.
2273 (macro2): Fix handling of 64bit register loads.
2277 * doc/as.texinfo: Add entry for IA64.
2278 * doc/c-ia64.texi: New file.
2282 * config/tc-hppa.c: Update copyright date.
2284 * doc/c-ppc.texi (PowerPC-Opts): Add -mpower4, -maltivec and -m7400
2285 Remove references to chip manufacturers.
2286 * config/tc-ppc.c (md_parse_option): Handle -mpower4 option.
2288 (md_show_usage): Remove references to chip manufacturers. Mention
2290 (md_begin): Test power4 opcode flag bits.
2294 * config/tc-ia64.c (dot_restore): Issue error message of epilogue
2295 count exceeds prologue count.
2296 (md_show_usage): Describe -mconstant-gp and -mauto-pic.
2297 (unwind.label_prologue_count): New member.
2301 (get_saved_prologue_count): New function.
2302 (save_prologue_count): New function.
2303 (free_saved_prologue_count): New function.
2304 (dot_label_state): Record state label by calling save_prologue_count().
2305 (dot_copy_state): Restore prologue count by calling
2306 get_saved_prologue_count().
2307 (generate_unwind_image): Free up list of saved prologue
2308 counts by calling free_saved_prologue_counts().
2312 * config/tc-tic54x.c: Add missing prototypes and remove ANSI style
2313 function declarations.
2317 * NEWS: Note that GASP is now deprecated.
2318 * Makefile.am: Do not build gasp-new by default.
2319 * Makefile.in: Regenerate.
2320 * doc/Makefile.am: Do not install gasp.info.
2321 * doc/Makefile.in: Regenerate.
2322 * gas/gasp.texi: Note that gasp is now deprecated.
2326 * NEWS: Mark 2.12 branch.
2330 * config/tc-xstormy16.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
2334 * config/tc-mips.c (md_parse_option): Complain about invalid -mabi
2339 * config/tc-s390.c (md_parse_option): Add switches -m31 and -m64.
2340 Make bit size independent of architecture switch.
2341 (md_begin): Add warning for -m64 with -Aesa.
2342 (s390_md_end): Use renamed architecture defines.
2346 * config/obj-coff.h: Check !target_big_endian, not shl, for coff-sh.
2350 * doc/as.texinfo (Machine Dependencies): Fix typo: MMIX used
2355 * config/tc-mips.c (md_estimate_size_before_relax): Really
2356 make sure we treat weak like extern only for ELF. (Fixes
2357 patch from 2001-07-25.)
2361 * doc/as.texinfo: Add duplicate directory entry so that "info gas"
2366 * NEWS: Mention support for MMIX.
2370 * config/tc-mips.c (mips_need_elf_addend_fixup): Restructure into
2371 a sequence of indpendent 'if' statements for easier debugging
2372 and future modification.
2376 * config/tc-m68k.c (md_show_usage): No longer display a
2377 hard-coded "68020" for the default CPU, instead display the
2378 canonical name of the true, configured default CPU.
2379 (m68k_elf_final_processing): Mark objects for sub-68020
2380 CPUs with the new EF_M68000 flag.
2384 * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
2385 pc-relative relocations to merge sections in 64-bit mode.
2389 * NEWS: Document floating point number handling in gasp.
2390 * gasp.c: Include <assert.h> and "xregex.h".
2391 (is_flonum): New function.
2392 (chew_flownum): Likewise.
2393 (change_base): Consume flonums from the input, where possible.
2394 * doc/gasp.texi (Constants): Document floating point numbers.
2398 * config/tc-hppa.c (hppa_fix_adjustable): Don't adjust final types
2399 that implicitly use LR and RR selectors.
2403 * config/tc-mn10300.c (other_registers): Added `epsw'. Mark `pc'
2404 and `epsw' as available on AM33 and above only.
2405 (other_register_name): Add logic to handle machine type encoded in
2410 * config/tc-ppc.c (md_apply_fix3): Check for insert fop invalid for
2415 * config/tc-sparc.c (U0x80000000, U0xffffffff): New constants.
2420 * i386.c (md_assemble): Support 32bit address prefix.
2421 (i386_displacement): Likewise.
2422 (i386_index_check): Accept 32bit addressing in 64bit mode.
2426 * config/tc-sh.c (dot): Removed unused function.
2430 * Makefile.am: "make dep-am".
2431 * Makefile.in: Regenerate.
2432 * aclocal.m4: Regenerate.
2433 * config.in: Regenerate.
2434 * configure: Regenerate.
2435 * doc/Makefile.in: Regenerate.
2439 * doc/c-alpha.texi: New file.
2440 * doc/Makefile.am (CPU_DOCS): Add it.
2441 * doc/all.texi, doc/as.texinfo: Add hooks for Alpha.
2445 * config/tc-alpha.c (O_samegp): New.
2446 (USER_RELOC_P): Include it.
2447 (alpha_reloc_op_tag, debug_exp, find_macro_match): Add it.
2448 (md_apply_fix3): Handle BFD_RELOC_ALPHA_BRSGP.
2449 (alpha_force_relocation, alpha_fix_adjustable): Likewise.
2450 (alpha_validate_fix): New.
2451 * config/tc-alpha.h (TC_VALIDATE_FIX): New.
2455 * doc/c-cris.texi: New.
2456 * doc/all.texi: @set CRIS.
2457 * doc/as.texinfo: Ditto. Add CRIS gas manpage option overview.
2458 Include c-cris.texi.
2459 * doc/Makefile.am (CPU_DOCS): Add c-cris.texi
2460 * doc/Makefile.in: Regenerate.
2464 * config/tc-mips.c (IS_SEXT_32BIT_NUM): New macro to
2465 determine if a number is a sign-extended 32-bit number.
2466 (load_register): Use IS_SEXT_32BIT_NUM.
2467 (macro): Check if load/store macro handling is using a
2468 constant 32-bit address on 64-bit address systems, and if
2469 so optimize the generation of that address.
2473 * config/tc-alpha.c (alpha_force_relocation): Don't assert that
2474 we've eliminated all foreign relocation types yet.
2475 (alpha_fix_adjustable): Likewise.
2479 Contribute sh64-elf.
2482 * doc/c-sh64.texi: Fix citation of SH64 architecture manual.
2484 * config/tc-sh.c (md_relax_table): Added default sizes for
2485 non-PC-relative UNDEF_MOVI, and relaxation sequences for
2486 MOVI_16, MOVI_32 and MOVI_48.
2487 * config/tc-sh64.c (shmedia_md_apply_fix3): Fix warning.
2488 (shmedia_md_convert_frag): Handle non-PC-relative UNDEF_MOVI
2490 (shmedia_md_estimate_size_before_relax): Remove redundant
2491 blocks. Set fragP->fr_var even if relaxation type unchanged.
2492 Retain UNDEF_MOVI until expression decays to number.
2494 * config/tc-sh64.c (shmedia_init_reloc): Handle new SHmedia PIC
2495 relocation types. Take fixP->fx_addnumber into account too.
2496 (shmedia_md_apply_fix): Likewise.
2497 (shmedia_md_convert_frag): Likewise.
2498 (shmedia_build_Mytes): Likewise.
2499 (sh64_consume_datalabel): Complain about nested datalabel.
2500 Support PIC relocs. Call sh_parse_name.
2501 * config/tc-sh64.h (TC_RELOC_RTSYM_LOC_FIXUP): Extend definition
2502 in tc-sh.h to SHmedia reloc types.
2503 * config/tc-sh.c (SH64PCRELPLT, MOVI_PLT, MOVI_GOTOFF,
2504 MOVI_GOTPC): New relaxation constants.
2505 (md_relax_table): Introduce relaxation directives for PIC-related
2507 (sh_PIC_related_p): Handle datalabel.
2508 (sh_check_fixup): Choose SH5 PIC relocations.
2509 (sh_cons_fix_new): Added BDF_RELOC_64.
2510 (md_apply_fix3, sh_parse_name): Handle GOTPLT.
2512 * config/tc-sh64.c (sh64_max_mem_for_rs_align_code): If the
2513 current ISA is SHmedia, get 7 bytes.
2515 * config/tc-sh.c (md_apply_fix3): Treat shmedia_md_apply_fix3 as a
2517 * config/tc-sh64.c (shmedia_apply_fix): Rename to
2518 shmedia_apply_fix3 and make void.
2520 * config/tc-sh64.c (s_sh64_abi): Remove unused arguments passed to
2523 * config/tc-sh64.h (md_parse_name): Take &c as argument.
2525 * doc/Makefile.am (CPU_DOCS): Added c-sh64.texi
2526 * doc/Makefile.in(CPU_DOCS): Ditto.
2527 * doc/c-sh64.texi: New file.
2528 * doc/as.texinfo: Add SH64 support.
2530 * config/tc-sh64.c (shmedia_get_operands): Rename A_RESV_Fx to
2531 A_REUSE_PREV so that its purpose is more obvious.
2532 (shmedia_build_Mytes): Ditto.
2534 * config/tc-sh64.c (sh64_vtable_entry): New, strip datalabels
2536 (sh64_vtable_inherit): Ditto.
2537 (strip_datalabels): New, strip "datalabel" from given line.
2538 * config/tc-sh.c (md_pseudo_table): Add sh64-specific vtable
2541 * config/tc-sh64.c (shmedia_md_assemble): Move dwarf2_emit_insn
2543 (shmedia_build_Mytes): ... to here.
2545 * config/tc-sh.c: Remove sh64-specific uaquad now that there
2548 * config/tc-sh64.h (DWARF2_LINE_MIN_INSN_LENGTH): Override.
2549 * config/tc-sh64.c (shmedia_md_assemble): Offset recorded insn
2550 address by one in call to dwarf2_emit_insn.
2552 Implement ".abi" pseudo and correct .cranges descriptors. Correct
2553 alignment handling broken by imported changes.
2554 * config/tc-sh64.h (HANDLE_ALIGN): Override definition in tc-sh.h.
2555 (sh64_handle_align): Declare.
2556 (MAX_MEM_FOR_RS_ALIGN_CODE): Override definition in tc-sh.h.
2557 (sh64_max_mem_for_rs_align_code): Declare.
2558 (enum sh64_isa_values): Moved here from tc-sh64.c.
2559 (md_do_align): Define.
2560 (sh64_do_align): Declare.
2561 (struct sh64_tc_frag_data): New.
2562 (TC_FRAG_TYPE): Change to struct sh64_tc_frag_data. Users
2564 (TC_FRAG_INIT): Change to set new datatype.
2565 (struct sh64_segment_info_type): Rename member
2566 last_flushed_location to last_contents_mark. All users changed.
2567 (md_elf_section_change_hook, TC_CONS_FIX_NEW): Do not define.
2568 (shmedia_elf_new_section, sh64_tc_cons_fix_new): Do not prototype.
2569 * config/tc-sh.c (md_pseudo_table): Add ".abi".
2570 (sh_elf_cons) [HAVE_SH64]: Call sh64_update_contents_mark instead
2571 of unsetting seen_insn.
2572 (md_assemble) [HAVE_SH64] <before new SHcompact sequence>: Also
2573 call sh64_update_contents_mark.
2574 (sh_handle_align): Remove HAVE_SH64-conditioned code.
2575 * config/tc-sh64.c (sh64_isa_mode): Correct type from boolean to
2576 enum sh64_isa_values.
2577 (sh64_set_contents_type): Drop segT parameter. All callers changed.
2578 (emitting_crange): Boolean guard moved to file scope from function
2579 scope in sh64_set_contents_type.
2581 (sh64_update_contents_mark): New; most split out from
2582 sh64_flush_pending_output.
2583 (shmedia_md_end): Call sh64_update_contents_mark. Set
2584 sh64_isa_mode to sh64_isa_sh5_guard unless sh64_isa_unspecified.
2585 (sh64_do_align): New function.
2586 (sh64_max_mem_for_rs_align_code): New function.
2587 (sh64_handle_align): Rename from shmedia_do_align. Make
2588 non-static. Add head comment. Emit zero bytes for n bytes modulo
2589 four. Change return-type to void.
2590 (shmedia_elf_new_section): Remove.
2591 (shmedia_md_assemble): Call sh64_update_contents_mark.
2592 (s_sh64_mode): Ditto. Do not call md_flush_pending_output. Make
2593 new frag. Call sh64_update_contents_mark after making the new
2595 (sh64_flush_pending_output): Just call sh64_update_contents_mark
2596 and sh_flush_pending_output.
2597 (sh64_flag_output): Also call md_flush_pending_output, but add
2598 condition on not emitting_crange.
2599 (sh64_tc_cons_fix_new): Remove.
2601 * config/tc-sh64.c (shmedia_do_align): Fix to work with new
2602 alignment handling scheme imported from sourceware.
2604 * config/tc-sh64.h (TARGET_FORMAT): Define.
2605 (sh64_target_format): Prototype.
2606 * config/tc-sh64.c (sh64_target_mach): New function.
2608 * config/tc-sh64.c (shmedia_md_end): When equating a symbol, use
2609 zero_address_frag instead of copying the frag of the symbol.
2610 (shmedia_frob_file_before_adjust): Ditto.
2611 (shmedia_md_apply_fix) <case BFD_RELOC_SH_IMM_MEDLOW16>: Cast mask
2612 to valueT to remove signedness.
2613 (shmedia_md_convert_frag): Add parameter final. Rename parameter
2614 headers to output_bfd. Do not evaluate symbols if final is false;
2616 (shmedia_md_estimate_size_before_relax) <case C (MOVI_IMM_32,
2617 UNDEF_MOVI) et al>: If symbol cannot be modified to be PC-relative
2618 to the current frag, call shmedia_md_convert_frag to emit fixups
2619 and make frag_wane neutralize the frag. Update comments.
2620 * config/tc-sh.c (md_convert_frag): Change caller of
2621 shmedia_md_convert_frag.
2623 * config/tc-sh64.h: Tweak comments and correct formatting.
2624 * config/tc-sh64.c: Ditto.
2625 (shmedia_md_convert_frag) <PT/PTA/PTB 32, 48 and 64 bit
2626 expansion, MOVI pcrel expansion>: Fix thinko calculating offset
2627 for the no-relocation case.
2628 (shmedia_check_limits): Fix range check being off-by-one for PTA.
2629 * config/tc-sh.c: Ditto. Add proper comments to #ifdef/#ifndef
2631 (SH64PCREL16_F): Increment for proper max-PTA handling. Update
2633 (SH64PCREL16_M, MOVI_16_M): Correct range thinko.
2634 (SH64PCREL48_M, MOVI_48_M): Similar; don't count in length of
2636 (SH64PCREL32_M, MOVI_32_M): Ditto; handle overflowing expression.
2639 * config/tc-sh64.c (shmedia_md_apply_fix) <second switch, case
2640 BFD_RELOC_SH_PT_16>: Set lowest bit in field to be relocated to 1.
2641 (shmedia_md_convert_frag) <case C (SH64PCREL16_32, SH64PCREL16) et
2642 al>: Set lowest bit of field to relocate to 1 and rest to empty,
2643 if reloc is emitted.
2645 New options plus bugfixes.
2646 * config/tc-sh.c (md_longopts): New options "-no-expand" and
2648 (md_parse_option): Handle new options.
2649 (md_show_usage): Add blurb for new options.
2650 * config/tc-sh64.c (SHMEDIA_BFD_RELOC_PT): New macro.
2651 (sh64_expand, sh64_pt32): New variables.
2652 (shmedia_init_reloc): Handle BFD_RELOC_SH_PT_16.
2653 (shmedia_md_apply_fix): Hold original fixP->fx_r_type in
2654 orig_fx_r_type. Change SHMEDIA_BFD_RELOC_PT into
2655 BFD_RELOC_SH_PT_16. Handle BFD_RELOC_SH_PT_16 as pc-relative.
2656 <resolved previously-pc-relative relocs>: Handle
2657 SHMEDIA_BFD_RELOC_PT and BFD_RELOC_SH_PT_16.
2658 (shmedia_md_convert_frag) <case C (SH64PCREL16PT_64, SH64PCREL16),
2659 case C (SH64PCREL16PT_32, SH64PCREL16)>: Modify to PTB if operand
2660 points to SHcompact code.
2661 <case C (SH64PCREL16_32, SH64PCREL16), case C (SH64PCREL16_64,
2662 SH64PCREL16)>: Check that ISA of what operand points at and
2663 PTA/PTB matches, or emit error.
2664 (shmedia_check_limits): Handle BFD_RELOC_SH_PT_16 and
2665 SHMEDIA_BFD_RELOC_PT.
2666 (shmedia_immediate_op): If pcrel, emit fixup also for constant
2668 (shmedia_build_Mytes) <case A_IMMS16>: Also check sh64_expand in
2669 condition for MOVI expansion.
2670 <case A_PCIMMS16BY4>: Handle expansion to 32 bits only, if
2671 sh64_pt32. Emit only a BFD_RELOC_SH_PT_16 fixup if not
2673 <case A_PCIMMS16BY4_PT>: Likewise, but emit a SHMEDIA_BFD_RELOC_PT
2675 (sh64_target_format): Error-check setting of sh64_pt32 and
2676 sh64_expand. Fix typo in check for sh64_shcompact_const_crange.
2677 (shmedia_md_pcrel_from_section): Handle BFD_RELOC_SH_PT_16 and
2678 SHMEDIA_BFD_RELOC_PT as coming from SHmedia code.
2680 * config/tc-sh64.c: Improve comments.
2681 (shmedia_md_convert_frag): Remove inactive is_pt_variant code. Do
2682 not say the linker will check correctness of PTA/PTB expansion.
2683 (shmedia_md_end): Make non-static.
2684 * config/tc-sh64.h (md_end): Define to shmedia_md_end. Add
2686 * config/tc-sh.c (sh_finalize): Remove.
2687 * config/tc-sh.h (md_end): Do not define.
2688 Remove prototype for sh_finalize.
2690 * config/tc-sh64.c (shmedia_frob_section_type): Use a struct
2691 sh64_section_data container when storing section type in tdata
2692 field in elf_section_data.
2693 * config/tc-sh.c (sh_elf_final_processing): Change from EF_SH64 to
2695 * Makefile.am: Update dependencies.
2696 * Makefile.in: Regenerate.
2698 * config/tc-sh64.c (shmedia_md_assemble): Don't protect
2699 dwarf2_emit_insn call with test on debug_type.
2701 * config/tc-sh64.c (sh64_set_contents_type): Make contents-type
2702 CRT_SH5_ISA32 sticky for 64-bit.
2704 Generate .crange sections when switching ISA mode or emitting
2705 constants in same section as code.
2706 * config/tc-sh64.c: Reformat structure definitions.
2707 (sh64_end_of_assembly, sh64_mix, sh64_shcompact_const_crange): New
2709 (sh64_set_contents_type): Rename from sh64_init_section. Rewrite
2710 to emit a .cranges descriptor when contents type changes. Only
2711 emit error if changing contents type and -no-mix is in effect.
2712 (sh64_emit_crange, sh64_flush_last_crange, sh64_flag_output,
2713 sh64_flush_pending_output, sh64_tc_cons_fix_new): New functions.
2714 (shmedia_md_end): Set sh64_end_of_assembly. Pass
2715 sh64_flush_last_crange over sections.
2716 When checking main symbol of datalabel symbol, check for
2717 STO_SH5_ISA32, not ISA type of section in definition.
2718 (shmedia_frob_file_before_adjust): Check main symbol for
2719 STO_SH5_ISA32; don't check ISA type of section in definition.
2720 (shmedia_frob_section_type): Adjust for .cranges; set section flag
2721 to SHF_SH5_ISA32_MIXED or SHF_SH5_ISA32 according to whether
2722 .cranges entries have been output.
2723 (shmedia_elf_new_section): Just call md_flush_pending_output.
2724 (shmedia_md_assemble): Do not emit a BFD_RELOC_SH_SHMEDIA_CODE
2725 fix. Do not set tc_segment_info_data.in_code for section. Call
2726 sh64_set_contents_type for SHmedia code.
2727 (s_sh64_mode): Do not call sh64_init_section or set seen_insn to
2728 false. Call md_flush_pending_output.
2729 (sh64_target_format): Check that -no-mix and
2730 -shcompact-const-crange are used in sane combination with other
2732 (shmedia_md_pcrel_from_section): Check type of fix for how to
2734 (sh64_consume_datalabel): Check symbol for having STO_SH5_ISA32,
2735 not ISA type of section in definition.
2736 * config/tc-sh64.h (struct sh64_segment_info_type): Rewrite to
2737 hold contents-type state.
2738 (md_flush_pending_output): Redefine to sh64_flush_pending_output.
2739 (sh64_flush_pending_output): Declare.
2740 (TC_CONS_FIX_NEW): Define to sh64_tc_cons_fix_new.
2741 (sh64_tc_cons_fix_new): Declare.
2742 * config/tc-sh.c (sh_elf_cons) [HAVE_SH64]: Unset seen_insn and
2743 call sh64_flag_output.
2744 (md_assemble) [HAVE_SH64]: Do not emit BFD_RELOC_SH_CODE. Just
2745 call sh64_set_contents_type to mark SHcompact code and set
2747 (md_longopts): New options "-no-mix" and
2748 "-shcompact-const-crange".
2749 (md_parse_option): Handle new options.
2750 (md_show_usage): Add blurb for new options.
2751 (md_number_to_chars) [HAVE_SH64]: Call sh64_flag_output.
2753 * config/tc-sh64.c: Delete investigated and obsolete fixme:s.
2754 (sh64_last_insn_frag): New.
2755 (shmedia_md_convert_frag): Use tc_frag_data field of incoming frag
2756 to get frag for insn opcode for generating fixups; do not assume it
2758 (shmedia_build_Mytes): Set sh64_last_insn_frag after growing frag
2760 * config/tc-sh64.h (ELF_TC_SPECIAL_SECTIONS): Define for .cranges
2762 (TC_FRAG_TYPE): Define as fragS *.
2763 (TC_FRAG_INIT): Define to set tc_frag_data to sh64_last_insn_frag.
2764 (sh64_last_insn_frag): Declare.
2765 (sh64_consume_datalabel): Fix typo; check for seginfo != NULL,
2766 not == NULL before dereferencing.
2768 Get rid of BFD section flag and EF_SH64_ABI64.
2769 * config/tc-sh64.c (shmedia_frob_section_type): Use
2770 elf_section_data (sec)->tdata, not a specific BFD section flag, to
2771 communicate the section as containing SHmedia code. Describe why.
2772 * config/tc-sh.c (sh_elf_final_processing): Tweak comment. Set
2773 EF_SH64 regardless of ABI.
2774 * config/tc-sh64.c (shmedia_md_apply_fix): Decapitalize "invalid"
2775 in error message. Handle resolved expressions for
2776 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2777 BFD_RELOC_SH_IMMS10BY4 and BFD_RELOC_64.
2778 (shmedia_check_limits): Handle BFD_RELOC_64.
2779 (sh64_adjust_symtab): Do not decrement the GAS symbol value for
2780 a STO_SH5_ISA32 symbol, only the BFD value.
2782 * config/tc-sh64.c: Call dwarf2_emit_insn, not the defunct
2783 dwarf2_generate_asm_lineno.
2785 Handle PC-relative MOVI expansions with assembler relaxation.
2786 Generate PC-relative relocs from 16-bit PC-relative expressions.
2787 * config/tc-sh64.c (SHMEDIA_MD_PCREL_FROM_FIX): Break out from...
2788 (shmedia_md_pcrel_from_section): ...here.
2789 (shmedia_md_apply_fix): Handle fixups for 16-bit operands that has
2790 turned completely resolved. Adjust relocation type for 16-bit
2791 immediate operands that has turned PC-relative. Adjust back for
2792 MD_PCREL_FROM_SECTION being applied twice.
2793 (shmedia_md_convert_frag): Always emit reloc for expression with
2794 global or weak symbol. Handle relaxation result for PC-relative
2796 (shmedia_md_estimate_size_before_relax): An expression with a weak
2797 or global symbol can not be relaxed. Break out tests for
2798 relaxable symbol into variable sym_relaxable.
2799 <cases C (MOVI_IMM_64, UNDEF_MOVI) and C (MOVI_IMM_32,
2800 UNDEF_MOVI)>: Break out any PC-relative expression and change
2802 (shmedia_build_Mytes): CSE &operands->operands[j] into variable
2804 <case A_IMMS16>: Fix typo for initial minor relaxation type of
2805 MOVI expansion. If X_op_symbol of the immediate expression is
2806 set, make an expression symbol for the argument to frag_var.
2807 * config/tc-sh.c (MOVI_IMM_32_PCREL, MOVI_IMM_64_PCREL): New
2809 (END): Adjust for new relaxations.
2810 (md_relax_table): Add entries for new relaxations.
2812 * config/tc-sh64.c (shmedia_parse_reg): Initialize variable len.
2814 * config/tc-sh64.c (shmedia_md_convert_frag): Correct all MOVI and
2815 SHORI operand offsets in PT/PTA/PTB expansions.
2817 Implement DataLabel semantics.
2818 * config/tc-sh.c (sh_frob_file) [HAVE_SH64]: Call
2819 shmedia_frob_file_before_adjust.
2820 * config/tc-sh64.c [! OBJ_ELF]: Emit #error.
2821 (DATALABEL_SUFFIX): Define.
2822 (shmedia_md_end) <before adjusting STO_SH5_ISA32 symbols>: Walk
2823 symbol list to update "datalabel" symbols to their main symbol
2825 (shmedia_frob_file_before_adjust): New.
2826 (sh64_adjust_symtab): For remaining datalabel symbols, set to
2827 undefined and set STT_DATALABEL.
2828 (sh64_frob_label): Initialize TC symbol field.
2829 (sh64_consume_datalabel): Actually implement semantics. New
2830 parameter operandf, call it instead of expression.
2831 (sh64_exclude_symbol): New.
2832 * config/tc-sh64.h (md_parse_name): Pass on the function operand
2833 to sh64_consume_datalabel.
2834 (tc_symbol_new_hook): Define to tc_frob_symbol.
2835 (TC_SYMFIELD_TYPE): Define to symbolS *.
2836 (tc_frob_symbol): Define to call sh64_exclude_symbol.
2838 * config/tc-sh64.c (shmedia_init_reloc): Tweak comment for default
2840 (shmedia_md_assemble): Call dwarf2_generate_asm_lineno if
2841 generating dwarf2 debug information.
2843 * config/tc-sh64.c (sh64_target_format): Use elf64-sh64l and
2844 elf64-sh64 for the 64-bit ABI.
2845 * config/tc-sh.c (md_show_usage): Tweak usage output for -abi=*
2848 * config/tc-sh.c: Remove conditionalizing on HAVE_SH64 for
2851 * config/tc-sh64.c: Tweak comments, formatting and error messages.
2852 (enum sh64_abi_values): New type.
2853 (enum sh64_isa_values): New type.
2854 (sh64_isa_mode): Replace shmedia_mode. All referers changed.
2855 (seen_shcompact_mode, seen_shmedia_mode): Delete.
2856 (sh64_abi): Replace shmedia_64.
2857 (shmedia_md_convert_frag) <C (MOVI_IMM_64, MOVI_64),
2858 C (MOVI_IMM_32, MOVI_32)>: Correct register number handling.
2859 (s_sh64_mode): Check validity for this target.
2860 (sh64_target_format): Initialize defaults for ISA and ABI.
2861 Fallback to old object format if no SH64 ISA or ABI has been
2863 * config/tc-sh.c (md_parse_option): Check combinations for errors.
2864 (sh_elf_final_processing): Change to have EF_SH64_ABI64 for 64-bit
2865 ABI and EF_SH64 for 32-bit ABI, if SH64 options are specified.
2866 * config/tc-sh64.h: Fix typo in comment.
2868 * config/tc-sh64.c (shmedia_md_estimate_size_before_relax)
2869 <PT fixups for absolute values>: Size will be longest, not
2871 (shmedia_md_convert_frag): Disable PTB-warning machinery. Correct
2872 all MOVI and SHORI operand offsets in PT/PTA/PTB expansions.
2873 * config/tc-sh.c (parse_reg) [HAVE_SH64]: Add local variables l0
2874 and l1 to hold lowercase of two first characters. Change all
2875 remaining TO_LOWER to tolower.
2876 * config/tc-sh64.c (TO_LOWER): Delete.
2877 (shmedia_find_cooked_opcode): Use tolower, not TO_LOWER.
2878 (md_parse_name): Define.
2879 (sh64_consume_datalabel): Declare.
2880 (DOLLAR_DOT): Define.
2881 * config/tc-sh64.c (shmedia_parse_exp): New.
2882 (sh64_consume_datalabel): New; just ignoring datalabel semantics.
2883 (shmedia_parse_reg): Remove const from src
2885 (shmedia_get_operands): Ditto for args parameter and ptr variable.
2886 (shmedia_md_assemble): Ditto for op_end variable.
2887 (shmedia_get_operand): Ditto for ptr parameter and src variable.
2888 Use shmedia_parse_exp, not parse_exp.
2889 * config/tc-sh64.c (shmedia_parse_reg): Add shmedia_arg_type
2890 parameter. All callers changed.
2891 (shmedia_get_operand): Add shmedia_arg_type parameter. All
2893 (shmedia_parse_reg): Put first two character in local variables.
2894 Use tolower, not TO_LOWER. If no register is found and argtype
2895 indicates a control register, scan shmedia_creg_table
2898 * Makefile.am (CPU_TYPES): Add sh64.
2899 (TARGET_CPU_CFILES): Add config/tc-sh64.c.
2900 (TARGET_CPU_HFILES): Add config/tc-sh64.h.
2901 Regenerate dependencies.
2902 * Makefile.in: Regenerate.
2903 * configure.in: Add support for sh64-*-elf*.
2904 * configure: Regenerate.
2905 * config/tc-sh64.h: New.
2906 * config/tc-sh64.c: New.
2907 * config/tc-sh.c (md_pseudo_table) [HAVE_SH64]: New pseudos
2908 .mode, .isa and .uaquad.
2909 [HAVE_SH64] (SH64PCREL16_32, SH64PCREL16_64, SH64PCREL16PT_32,
2910 SH64PCREL16PT_64, MOVI_IMM_32, MOVI_IMM_64): Define.
2911 [HAVE_SH64] (END): Define as 10.
2912 [HAVE_SH64] (UNDEF_SH64PCREL, SH64PCREL16, SH64PCREL32,
2913 SH64PCREL48, SH64PCREL64, UNDEF_MOVI, MOVI_16, MOVI_32, MOVI_48,
2915 [HAVE_SH64] (SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH,
2916 SH64PCREL32_F, SH64PCREL32_M, SH64PCREL32_LENGTH, SH64PCREL48_F,
2917 SH64PCREL48_M, SH64PCREL48_LENGTH, SH64PCREL64_LENGTH,
2918 MOVI_16_LENGTH, MOVI_32_LENGTH, MOVI_48_LENGTH, MOVI_64_LENGTH):
2920 (md_relax_table) [HAVE_SH64]: Provide relaxations for SHmedia.
2921 (md_begin) [HAVE_SH64]: Call shmedia_md_begin.
2922 (parse_reg) [HAVE_SH64]: Parse register names case-insensitive.
2923 (md_assemble) [HAVE_SH64]: Call shmedia_md_assemble if assembling
2924 SHmedia instructions. Handle state-change after switching to
2926 (md_longopts) [HAVE_SH64]: New options --isa=* and --abi=*.
2927 (md_parse_option) [HAVE_SH64]: Parse new options.
2928 (md_show_usage) [HAVE_SH64]: Show usage of new options.
2929 (md_convert_frag) [HAVE_SH64] <default>: Call
2930 shmedia_md_convert_frag instead of abort.
2931 (sh_force_relocation) [HAVE_SH64]: Also force relocation for
2932 BFD_RELOC_SH_SHMEDIA_CODE.
2933 (sh_elf_final_processing) [HAVE_SH64]: Set flags identifying
2934 SHcompact or SHmedia code.
2935 (md_apply_fix) [HAVE_SH64] <default>: Return result from calling
2936 shmedia_md_apply_fix instead of abort.
2937 (md_estimate_size_before_relax) [HAVE_SH64] <default>: Return
2938 result from calling shmedia_md_estimate_size_before_relax instead
2940 (sh_do_align) [HAVE_SH64]: If shmedia_mode, let shmedia_do_align
2942 (tc_gen_reloc) [HAVE_SH64]: For unrecognized relocs, call
2943 shmedia_init_reloc and do nothing more if it returns non-zero.
2944 (sh_finalize) [HAVE_SH64]: Call shmedia_md_end.
2945 * po/POTFILES.in: Regenerate.
2946 * po/gas.pot: Regenerate.
2950 * config/tc-sh.c (parse_at): Install the correct version of
2953 * config/tc-sh.c (md_apply_fix3) <BFD_RELOC_32_PLT_PCREL>: Don't
2954 assume fixP->fx_subsy is non-NULL.
2958 * config/tc-sh.c (parse_at): Set arg type of @(expr,pc) to
2959 A_DISP_PC_ABS, and adjust it by -4.
2960 (get_specific): Accept A_DISP_PC_ABS where A_DISP_PC is
2962 (build_Mytes): Mark PCRELIMM fix-ups as pc-relative only if
2963 the operand type is not A_DISP_PC_ABS.
2967 * config/tc-mmix.c (tc_gen_reloc): Don't try and take the value of
2968 common and weak symbols. Handle common and weak symbols as
2969 undefined symbols with regards to GREG handling and merging.
2970 (mmix_frob_file): Ditto.
2974 * configure.in (hppa-*-netbsd*): New target.
2975 * configure: Regenerate.
2976 * config/tc-hppa.h: Also define WARN_COMMENTS if TE_NetBSD.
2980 * config/tc-v850.c: Add missing prototypes amd use old-style
2981 function definitions.
2982 (AREA_ZDA, AREA_SDA, AREA_TDA): Delete.
2983 (sdata_section tdata_section, zdata_section, sbss_section,
2984 tbss_section, zbss_section, rosdata_section, rozdata_section,
2985 scommon_section, tcommon_section, zcommon_section,
2986 call_table_data_section, call_table_text_section): Delete.
2987 (v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
2988 v850_zbss, v850_bss, v850_rosdata, v850_rozdata,
2989 v850_call_table_data, v850_call_table_text): Delete.
2990 (struct v850_seg_entry): New.
2991 (v850_seg_table): New.
2992 (SDATA_SECTION TDATA_SECTION, ZDATA_SECTION, SBSS_SECTION,
2993 TBSS_SECTION, ZBSS_SECTION, BSS_SECTION, ROSDATA_SECTION,
2994 ROZDATA_SECTION, SCOMMON_SECTION, TCOMMON_SECTION, ZCOMMON_SECTION,
2995 CALL_TABLE_DATA_SECTION, CALL_TABLE_TEXT_SECTION): Define.
2998 (v850_comm): Use do_v850_seg and v850_seg_table. Simplify
2999 recording of alignment.
3000 (md_pseudo_table): Use v850_seg.
3001 (md_begin): Don't init .call_table_data and .call_table_text here.
3002 Set v850_seg_table bss entry.
3006 Support on-demand global register allocation by passing on
3007 base-plus-offset relocs to the linker.
3008 * config/tc-mmix.c: Tweak and fix typos in comments.
3009 (allocate_undefined_gregs_in_linker): New variable.
3010 (OPTION_LINKER_ALLOCATED_GREGS): New option macro.
3011 (md_longopts): Add --linker-allocated-gregs.
3012 (md_parse_option) <case 'x'>: Imply --linker-allocated-gregs.
3013 <case OPTION_LINKER_ALLOCATED_GREGS>: New.
3014 (md_show_usage): Update text for -x. Add text for
3015 --linker-allocated-gregs.
3016 (tc_gen_reloc): Derive default value for addend from val and
3017 baddsy. Use addsec and bfd_is_abs_section in more places. Don't
3018 emit error for BFD_RELOC_MMIX_BASE_PLUS_OFFSET without suitable
3019 GREG if allocate_undefined_gregs_in_linker.
3020 * doc/as.texinfo (Overview) <Target MMIX options>: Add
3021 --linker-allocated-gregs.
3022 * doc/c-mmix.texi (MMIX-Opts): Add blurb about
3023 --linker-allocated-gregs. Mention that it's implied by -x.
3024 (MMIX-Pseudos) <GREG>: Mention when and how a GREG can be omitted.
3025 (MMIX-mmixal): Clarify dated comparison and location of MMIXware.
3027 * config/tc-mmix.h (md_parse_name): Use ISUPPER, not isupper.
3031 * Makefile.am: Run "make dep-am"
3032 * Makefile.in: Regenerate.
3036 * config/tc-or32.c: New file.
3037 * config/tc-or32.h: New file.
3038 * configure.in: Add support for or32 targets.
3039 * configure: Regenerate.
3040 * config/obj-coff.c: Add support for or32 targets.
3041 * config/obj-coff.h: Add support for or32 targets.
3042 * Makefile.am: Add support for or32 targets.
3043 * Makefile.in: Regenerate.
3044 * NEWS: Mention support for OpenRISC.
3045 * doc/Makefile.in: Regenerate.
3046 * po/POTFILES.in: Regenerate.
3047 * po/gas.pot: Regenerate.
3051 * config/tc-sh.c (parse_reg): Fix end-of-word check for is, ix, iy
3056 * config/tc-mips.c (tc_gen_reloc): Arrange for
3057 BFD_RELOC_PCREL_HI16_S relocations to be output relative to
3058 their LO16 parts, even for ELF.
3062 * config/tc-i386.c: Protect definitions of true and false
3067 * config/obj-elf.c (elf_frob_file_before_adjust): Remove symbols
3068 made because of .weak, if they are neither defined nor used in any
3073 * configure: Regenerated.
3077 * doc/Makefile.am (install): Depend on install-info.
3078 * doc/Makefile.in: Regenerate.
3082 * po/fr.po: Updated version
3086 * config/tc-h8300.c (check_operand): Don't print a warning
3087 when a valid 24-bit address is given to a 16-bit address
3092 * config/tc-sh.c (sh_elf_suffix): Removed.
3093 (sh_PIC_related_p, sh_check_fixup, sh_cons_fix_new,
3094 sh_end_of_match, sh_parse_name): New functions.
3095 (sh_elf_cons): Simplify.
3096 (parse_exp): Reject misplaced PIC operands.
3097 (md_undefined_symbol): Simplify.
3098 (sh_fix_adjustable): Let @GOTOFF be adjusted.
3099 (md_apply_fix3): Write @PLT and @GOTOFF addends in place.
3100 (tc_gen_reloc): Move fixp subsy absolute value into addnumber.
3101 Complain if subsy remains at the end.
3102 * config/tc-sh.h (sh_parse_name, sh_cons_fix_new): Declare.
3103 (md_parse_name, TC_CONS_FIX_NEW, O_PIC_reloc): Define.
3107 * config/tc-mn10300.c (xr_registers): Move `pc'...
3108 (other_registers): ... here.
3112 * Makefile.am: Run "make dep-am".
3113 * Makefile.in: Regenerate.
3114 * gas/po/POTFILES.in: Regenerate.
3118 * config/obj-coff.c (obj_coff_init_stab_section): Make the
3119 stabstr_name allocation permanent, as it will be referenced from
3124 * configure.in (ia64-*-netbsd*): New target.
3125 * configure: Regenerate.
3129 * doc/as.texinfo (Overview) <Target ARM options>: Add missing {}
3131 <Detailed description, ARM options>: Ditto.
3132 * doc/c-arm.texi (ARM Options): Ditto.
3136 * tc-arm.c (do_xsc_mia, do_xsc_mar, do_xsc_mra): Renamed from
3137 do_mia, do_mar and do_mra respectively.
3138 (do_mav_*): Renamed from do_c_*.
3139 (mav_reg_required_here, mav_parse_offset): Renamed from
3140 cirrus_reg_required_here and cirrus_parse_offset respectively.
3141 (MAV_MODE?): Renamed from CIRRUS_MODE?.
3146 * tc-arm.c (ARM_EXT_V5J, ARM_ARCH_V5TEJ): Define.
3147 (insns): Add pattern for bxj instruction.
3148 (do_bxj): New function.
3149 (arm_cpus): Add arm926ej.
3150 (arm_archs): Add armv5tej.
3154 * doc/c-arm.texi: Add new fpe options to list of supported flags.
3158 * tc-arm.c (arm_fpus): Add fpe2 and fpe3.
3162 * NEWS: Mention new ARM command-line options and VFP support.
3164 * config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
3166 (ARM_CEXT_MAVERICK): Similarly.
3167 (ARM_ANY): Now means any core instruction.
3168 (CPU_DEFAULT): Default to ARM_ANY.
3169 (uses_apcs_26, atcps, support_interwork, uses_apcs_float)
3170 (pic_code): Declare for all object types. Make type int.
3171 (legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
3172 (march_fpu_opt, mfpu_opt): Declare.
3173 (md_longopts): Tidy up conditional definitions.
3174 (arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
3175 (arm_long_opts): New tables.
3176 (arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
3177 (arm_parse_extension): New function.
3178 (md_parse_option): Rewrite using new table-driven system.
3179 (md_show_usage): Use new table-driven system.
3180 (md_begin): Calculate cpu_variant from command line option data.
3181 * doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
3182 command-line options.
3183 * doc/c-arm.texi: Likewise.
3187 * as.c (parse_args): Update year.
3191 * config/tc-tic54x.c (encode_address): Add a more informative
3192 warning about incorrect syntax.
3196 * po/gas.pot: Regenerate.
3200 * macro.c (get_any_string): Add no-c-format comment to prevent
3201 confusion when translating string.
3202 * gasp.c (get_any_string): Add no-c-format comment to prevent
3203 confusion when translating string.
3207 * config/tc-mips.c (percent_op): Ensure longer percent_op's are
3208 matched before the shorter ones.
3209 (my_getSmallParser): Fix handling of nested parentheses in
3210 percent_op's. Code cleanup.
3211 (my_getPercentOp): New function, code from my_getSmallParser.
3212 (my_getSmallExpression): Fix handling of closing parentheses.
3213 Code cleanup. Better comments.
3217 po/tr.po: New file: Turkish translation.
3218 configure.in (LINGUAS): Add "tr".
3219 configure: Regenerate.
3223 Support for VFP instructions
3224 * tc-arm.c (CP_WB_OK, CP_NO_WB): New defines.
3225 (cp_address_required_here): New argument wb_ok. When false, do not
3226 accept write-back forms of addressing. Change all callers.
3227 (FPU_VFP_EXT_NONE, FPU_VFP_EXT_V1xD, FPU_VFP_VFP_V1)
3228 (FPU_VFP_EXT_V2): Define.
3229 (FPU_ARCH_VFP, FPU_ARCH_VFP_V1xD, FPU_ARCH_VFP_V1, FPU_ARCH_VFP_V2):
3230 Define in terms of above.
3231 (vfp_dp_reg_pos, vfp_sp_reg_pos, vfp_ldstm_type): New enums.
3232 (vfp_reg): New struct.
3233 (vfp_regs): New array of registers.
3234 (insns): Add VFP instructions.
3235 (sn_table): New array of VFP single-precision register names.
3236 (dn_table): New array of VFP double-precision register names.
3237 (all_reg_maps): Add the new register tables.
3238 (arm_reg_type): Add new values for above. Increase RET_TYPE_MAX.
3239 (vfp_sp_reg_required_here, vfp_dp_reg_required_here, do_vfp_sp_monadic)
3240 (do_vfp_dp_monadic, do_vfp_sp_dyadic, do_vfp_dp_dyadic)
3241 (do_vfp_reg_from_sp, do_vfp_sp_reg2, do_vfp_sp_from_reg)
3242 (do_vfp_reg_from_dp, do_vfp_reg2_from_dp, do_vfp_dp_from_reg)
3243 (do_vfp_dp_from_reg2, vfp_psr_parse, vfp_psr_required_here)
3244 (do_vfp_reg_from_ctrl, do_vfp_ctrl_from_reg, do_vfp_sp_ldst)
3245 (do_vfp_dp_ldst, vfp_sp_reg_list, vfp_dp_reg_list, vfp_sp_ldstm)
3246 (vfp_dp_ldstm, do_vfp_sp_ldstmia, do_vfp_sp_ldstmdb, do_vfp_ldstmia)
3247 (do_vfp_dp_ldstmdb, do_vfp_xp_ldstmia, do_vfp_xp_ldstmdb)
3248 (do_vfp_sp_compare_z, do_vfp_dp_compare_z, do_vfp_dp_sp_cvt)
3249 (do_vfp_sp_dp_cvt): New functions.
3250 (md_begin): Set soft-float flag for appropriate VFP work.
3251 (md_atof): Handle VFP-format doubles.
3252 (md_parse_option): Handle VFP command-line options.
3253 (md_show_usage): Display VFP command-line options.
3257 * tc-arm.c (md_parse_option): Tidy up setting of cpu_variant for
3258 various command line options.
3262 * config/tc-xstormy16.c: (xstormy16_fix_adjustable): Do not fix
3264 (xstormy16_md_apply_fix3): Do not return a value.
3268 * tc-arm.c (md_longopts): On targets that aren't bi-endian, support
3269 the -EL/-EB option that matches the target's endianness.
3270 (md_parse_option): Likewise.
3274 * tc-arm.c (md_longopts): Fix misplaced #endif -- the -oabi option
3275 is not dependent on ARM_BI_ENDIAN.
3279 * tc-arm.c (all error messages): Normalize capitalization of messages.
3281 * tc-arm.h (md_operand): Delete define.
3282 * tc-arm.c (in_my_get_expression): New static variable.
3283 (my_get_expression): Set and clear it.
3284 (md_operand): New function. If called from my_get_expression
3285 put the error in inst.error.
3286 (output_inst): Now takes argument of instruction being assembled.
3287 Print it out with any error message.
3288 (do_ldst, do_ldstv4, thumb_load_store): Fault attempt to use a store
3290 (end_of_line): Don't update inst.error if it is already set.
3294 * tc-arm.c (do_ldst): Fix handling an immediate expression pseudo
3295 op that can be translated into a mvn instruction.
3299 * gas/config/tc-ia64.h (MD_FLAGS_DEFAULT): New Macro for
3300 setting default md.flags.
3301 (SHT_INIT_ARRAY): New elf special section used by HP-UX.
3302 (SHT_FINI_ARRAY): New elf special section used by HP-UX.
3303 * gas/config/tc-ia64.c (setup_unwind_header): Add support
3304 for 32 bit unwind info blocks.
3305 (generate_unwind_image): Add support for different types
3306 of unwind images (32 bits and/or big-endian).
3307 (ia64_init): Use MD_FLAGS_DEFAULT to set md.flags.
3308 (ia64_target_format): Add support for hpux target formats.
3309 (ia64_gen_real_reloc_type): Add support for FUNC_IPLT_RELOC.
3310 (ia64_elf_section_type): Add support for SHT_INIT_ARRAY and
3311 SHT_FINI_ARRAY elf section types.
3315 * tc-arm.c (struct reg_entry): Move before prototypes.
3316 (int_register, cp_register, fp_register): Delete.
3317 (reg_table): Delete. Replaced with ...
3318 (rn_table, cp_table, cn_table, fn_table, mav_mvf_table)
3319 (mav_mvd_table, mav_mvfx_table, mav_mvdx_table, mav_mvax_table)
3320 (mav_dspsc_table): ... one table per register set.
3321 (arm_reg_hsh): Delete.
3322 (struct reg_map): New structure.
3323 (all_reg_maps): New array.
3324 (enum arm_reg_type): New enums.
3325 (build_reg_hsh): New function.
3326 (insert_reg_alias): Use hash table passed by caller. Adjust all
3328 (create_register_alias): New function, split out from ...
3329 (md_assemble): ... here.
3330 (md_begin): Build new register hash tables.
3331 (arm_reg_parse): New argument for the hash table to search. Adjust all
3333 (arm_reg_parse_any): New function.
3334 (co_proc_number): Look up the processor number in the processor hash
3336 (cirrus_regtype): Delete.
3337 (cirrus_register, cirrus_mvf_register, cirrus_mvd_register)
3338 (cirrus_mvfx_register, cirrus_mvdx_register, cirrus_mvax_register)
3339 (ARM_EXT_MAVERICKsc_register): Delete.
3340 (do_c_binops_1, do_c_binops_2, do_c_binops_3): Delete.
3341 (do_c_binops_1[a-o], do_c_binops_2[a-c], do_c_binops_3[a-d]): New
3343 (do_c_triple_4, do_c_triple_5): Delete.
3344 (do_c_triple_4[ab], do_c_triple_5[a-h]): New functions.
3345 (do_c_quad_6): Delete.
3346 (do_c_quad_6[ab]): New functions.
3347 (do_c_binops, do_c_triple, do_c_quad, do_c_shift, do_c_ldst): Rework
3348 arguments to use new register parsing methods.
3349 (cirrus_reg_required_here): Likewise.
3350 (insns): Reclassify cirrus maverick worker functions.
3351 (cirrus_valid_reg): Delete.
3355 * configure.in (sh*le): Set cpu_type=sh and endian=little.
3356 (sh*-*-netbsdelf*): New target.
3357 * configure: Regenerate.
3358 * tc-sh.h: Update copyright years.
3359 (TARGET_FORMAT): Add version for TE_NetBSD.
3363 * read.c (emit_expr): Do not allow 'size' or 'nbytes' to go
3368 * config/tc-m68k.h (md_prepare_relax_scan): Rewrite.
3369 * config/tc-m68k.c (md_relax_table): Add md_prepare_relax_scan comment.
3373 * tc-mips.c (mips_cprestore_valid): New flag.
3374 (mips_frame_reg_valid): New flag.
3375 (macro) [M_JAL_2]: Check both flags.
3376 [M_JAL_A]: Likewise.
3377 (s_cprestore): Set mips_cprestore_valid.
3378 (tc_get_register): If setting mips_frame_reg, set
3379 mips_frame_reg_valid and clear mips_cprestore_valid.
3380 (s_mips_ent): Clear both flags.
3381 (s_mips_end): Clear both flags.
3385 * write.c (write_object_file): Make use of bfd_section_list_remove.
3386 * config/obj-ecoff.c (ecoff_frob_file): Likewise.
3387 * config/tc-mmix.c (mmix_frob_file): Likewise.
3391 * configure.in (i386-*-netbsdelf*): Collapse target into...
3392 (i386-*-netbsd*): ...this. Add support for x86-64.
3393 * configure: Regenerated.
3397 * config/tc-ppc.c (md_parse_option): BookE is not Motorola specific.
3401 * config/tc-m68k.c (md_estimate_size_before_relax): Test for a
3404 For older changes see ChangeLog-0001
3410 version-control: never