3 * config/tc-hppa.c (pa_ip): Do not allow '*' in 32bit completers.
7 * config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!'
9 * config/tc-hppa.c (pa_ip): Add case for 'I'.
13 * dwarf2dbg.c (MAX_SPECIAL_ADDR_DELTA): Correct typo in comment.
14 (struct ls): Add frag field. Initialize it to zero.
15 (out_end_sequence): New local text_frag. Set it while in text section.
16 Replace address check with frag check. Set ls.frag to text_frag if
18 (dwarf2_gen_line_info): Add explanatory comment. New local saved_frag.
19 Set it before switching sections. Replace address check with frag
20 check. Set ls.frag to saved_frag if out_set_addr called.
24 * dwarf2dbg.c (out_end_sequence): If address changed, directly
25 output "advance_pc" opcode instead of calling gen_addr_line().
26 The latter has the undesired side-effect of creating a new row
27 in the debug line info matrix.
31 * dwarf2dbg.c (out_end_sequence): Correct comments. Set last to
32 ls.last_filename if last is less than zero. Set ls.last_filename
33 when allocating new entry.
34 (dwarf2_gen_line_info): Save seg and subseg info before subseg_new
39 * config/tc-i386.c (i386_index_check): Fix the displacement size
40 when INFER_ADDR_PREFIX.
44 * config/tc-arm.c (md_apply_fix3): If an offset is invalid,
49 * config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to
50 handle 0xffffNNNN constants correctly.
54 * config/tc-arm.c (do_ldst): Look for register conflicts on stores
59 * config/tc-arm.c (validate_offset_imm): Work on unsigned values.
60 (md_apply_fix3): Always pass positive values to
65 * config/tc-arm.c (skip_whitespace): New macro.
68 (md_apply_fix3): Store relocation offset in addend for ELF based
70 (arm_force_relocation): Always generate relocs for Thumb function
75 * config/tc-i386.c (md_assemble): Remove dead code. intel_syntax
76 LONG_DOUBLE_MNEM_SUFFIX floating point is done in opcode/i386.h
80 * config/tc-hppa.c (pa_build_unwind_subspace): Use sane section
81 flags for the unwind subspace.
83 * config/tc-hppa.c (UNWIND_SECTION_NAME): Define for ELF.
84 (pa_build_unwind_subspace): Remove #if 0 wrapper. Select a
85 suitable relocation based on the size of the target's pointer.
86 Always Use subsegment zero for the unwinders.
87 (pa_level): Handle "2.0w".
91 * config/tc-d30v.c (write_2_short): Don't group repeat instructions
92 with the following instruction unless this was specified.
96 * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 for
97 certain sections, to match BFD changes.
101 * Makefile.am (noinst_SCRIPTS): Change .gdbinit to $(GDBINIT).
102 (EXTRA_SCRIPTS): Define to keep automake happy.
103 * Makefile.in: Rebuild.
107 * Makefile.am: Rename .dep* files to DEP*.
108 (MKDEP): Rename from DEP. Change all uses. Use $${srcdir} rather
109 than $(srcdir). Rename TCDEP targets to DEPTC. Rename OBJDEP
111 * Makefile.in: Rebuild.
115 * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg.
119 * Makefile.am: Change all uses of itbl-test-ops to itbl-tops to
120 avoid problems on DOS filesystems.
121 * Makefile.in: Rebuild.
123 * doc/as.texinfo (Section): Document 's' flag for COFF version.
127 * config/obj-coff.c (obj_coff_section): Handle 's' (shared)
132 * configure.in: Define and substitute GDBINIT. Change AC_OUTPUT
133 line to create ${GDBINIT} rather than .gdbinit.
134 * configure, Makefile.in, doc/Makefile.in: Rebuild.
138 * config/tc-hppa.c (pa_ip, case '?'): Add missing break.
142 * config/tc-hppa.c (pa_ip): Add 64 bit condition completers.
146 * config/tc-sparc.h (tc_fix_adjustable): Fix check for PIC local
147 non-adjustable symbols.
151 * config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix.
155 * config/tc-sh.c (md_assemble): Call as_bad when there are excess
160 * config/te-interix.h: New file.
161 * configure.in (i386-*-interix*): New target.
162 * configure: Rebuild.
166 * config/tc-hppa.c (pa_chk_field_selector): Allow 3 byte
167 selectors for ELF too.
168 (selector_table): Add "ltp" and "rtp" selectors.
172 * config/tc-i386.c (i386_operand): No need to change
173 operand_string pointer in segment reg case before goto
174 do_memory_reference. Initialise displacement_string_start and
175 displacement_string_end after do_memory_reference label.
176 (i386_index_check): Add operand_string param, and print error
177 message on failure here.
178 (i386_intel_memory_operand): Instead of here.
179 (i386_operand): And here.
180 (INFER_ADDR_PREFIX): Enable.
182 * doc/c-i386.texi (i386-16bit): Document .code16gcc.
184 * config/tc-i386.h (DefaultSize): Define. Renumber following
185 opcode_modifier defines.
188 * config/tc-i386.c (stackop_size): New variable.
189 (set_16bit_code_flag): Clear it here.
190 (set_16bit_gcc_code_flag): New function.
191 (md_pseudo_table): Add "code16gcc" entry.
192 (md_assemble): Set i.suffix for insns with DefaultSize modifier.
196 * config/obj-coff.c (coff_frob_symbol): Always update set_end with
197 next_set_end even if the end symbol is being discarded.
199 * gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER.
200 * output-file.c, symbols.c, config/tc-i386.c: Likewise.
201 * config/obj-coff.c: Likewise.
202 (seg_info_type): Remove.
203 (seg_info_off_by_4): Change to array of segT.
204 (s_get_segment): Adjust accordingly.
205 (obj_pseudo_table): Fully initialize sentinel entry.
207 * config/tc-mips.c (append_insn): Correct INSN_SYNC test. From
212 * config/tc-i386.c (f16_3): New. Fixes 16 bit 3 byte nop.
216 * config/tc-i386.c: Indentation and white space changes.
217 (i386_index_check): New function. Add INFER_ADDR_PREFIX code, but
218 don't enable it by default.
219 (i386_intel_operand): Remove redundant prototype.
220 Move check on number of memory operands, and i.mem_operands++
221 (i386_intel_memory_operand): To here.
222 Remove i386_immediate code from here. Remove special case code
223 for input and output using (%dx). Remove base/index checks and
224 call i386_index_check instead. Save initial operand_string
225 argument for error message.
226 (i386_operand): Remove redundant prototype. Move base/index
227 checks to i386_index_check.
228 (i386_displacement): Move intel mode check for non-zero
230 (i386_intel_memory_operand): To here.
234 * config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option.
235 (sparc_ip): Warn if %g2 or %g3 register is used and not covered
236 by .register pseudo-op if -64 and --no-undeclared-regs.
237 (s_register, sparc_adjust_symtab): New functions.
238 * config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab):
239 Declare sparc_adjust_symtab as tc_adjust_symtab.
240 * doc/c-sparc.texi: Add description of #ignore special literal
241 for .register pseudo-op.
245 * config/tc-arm.c (tc_gen_reloc): Record the vtable entry in
246 the relocation's section offset.
250 * write.c (fixup_segment): Fix generic error check overflow test.
252 * config/tc-i386.c (pe): Change %d to %ld, %x to %lx, and cast
253 X_add_number to long.
257 * config/tc-hppa.c (pa_ip): Add 'J' and 'K' code
262 * config/tc-sparc.h (tc_fix_adjustable): Don't adjust GOT, PLT, or
267 * config/te-go32.h (COFF_LONG_SECTION_NAMES): Define.
269 * configure.bat: Remove; obsolete.
270 * config/go32.cfg: Likewise.
274 * configure.in (i386-*-vxworks*): New target.
275 * configure: Rebuild.
279 * doc/c-sparc.texi: Document .register and .nword pseudo-ops.
283 * config/tc-sparc.c (sparc_ip): Allow OLO10 relocations
285 (output_insn): Put OLO10's secondary addend into tc_fix_data.
286 (md_apply_fix3): Handle BFD_RELOC_SPARC_OLO10.
287 (tc_gen_reloc): Return two relocs for OLO10, LO10 and SPARC13.
288 * config/tc-sparc.h (RELOC_EXPANSION_POSSIBLE,
289 MAX_RELOC_EXPANSION): Define.
290 (TC_FIX_TYPE, TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise.
294 * config/tc-i386.c (intel_float_operand): Add prototype, make static.
295 (md_assemble): Localize *exp variable to if (fake_zero_displacement)
296 block. Print a warning if an 8-bit or 16-bit constant
297 displacement or immediate is truncated on output.
298 (i386_immediate): Ensure Imm16 is always legal for a 16-bit mode
300 (i386_operand): Disallow immediate jump absolute operand.
304 * configure.in: Bump version number to 2.9.5.
305 * configure: Rebuild.
307 * dwarf2dbg.c (dwarf2_gen_line_info): Don't assume that long long
312 * config/tc-hppa.c (md_pseudo_table): Add ".dword" pseudo-op.
313 (cons_fix_new_hppa): Derive size of fixup from size of the object.
317 * symbols.c (dollar_label_name): Prepend LOCAL_LABEL_PREFIX if it
319 * config/tc-arm.h (LOCAL_LABEL_PREFIX): Define to '.' for ELF.
321 * config/tc-arm.c (md_begin): Set F_SOFTFLOAT in the output file
322 if -mno-fpu was given.
323 (tc_gen_reloc): Fix typo. Delete bogus code related to GOTPC
325 (cons_fix_new_arm): Remove misleading comments.
329 * write.c (cvt_frag_to_fill): Use frag file and line in rs_org
331 (relax_segment): Likewise. After giving a rs_org error, convert
332 the frag to rs_align to avoid cascading errors.
336 * config/tc-m68k.c: Add some ATTRIBUTE_UNUSED.
340 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
341 as appropriate. Fill in structure initializations. Add variable
342 initializations. Add casts.
343 * dwarf2dbg.c (print_stats): Change i to size_t.
344 * listing.c (listing_listing): Change list_line to unsigned int.
348 * config/tc-ppc.h (tc_fix_adjustable) [OBJ_ELF]: Call S_IS_LOCAL
349 rather than checking for \001 and \002 in symbol name.
350 * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: Likewise.
354 * configure.in (hppa*-linux-gnu*): New target.
355 * configure: Rebuilt.
359 * doc/c-arm.texi (ARM Directives): Document .thumb_set directive.
363 * config/tc-v850.c (v850_comm): Use symbol_get_obj() rather than
364 accessing symbolP directly.
368 * config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol
373 * config/tc-arm.c (ARM_EXT_V5): Define.
374 (ARM_ARCH_V5, ARM_ARCH_V5T): Define.
375 (md_begin): Detect ARM v5 architectures.
376 (md_parse_option): Accept arm v5 specification.
377 (md_show_usage): Documment -marmv5 switch.
379 * doc/c-arm.texi: Document -marmv5 command line option.
381 * config/tc-arm.c (do_adrl): New function. Implement ADRL pseudo
383 (validate_immediate_twopart): New function. Determine if a
384 constant can be computed by two ADD instructions.
385 (output_inst): Remove its command line parameter - it was never
387 (md_apply_fix3): Support BFD_RELOC_ARM_ADRL_IMMEDIATE, used to
388 implememt the ADRL pseudo op.
389 (tc_gen_reloc): Generate a suitable error message if an ADRL
390 instruction tries to generate a real reloc.
392 * doc/c-arm.texi: Document NOP, ADR and ADRL pseudo ops.
396 * config/tc-hppa.c (pa_ip): Convert the opcode and all completers
401 * subsegs.c (subseg_text_p): Use 1/0 instead of true/false for
402 non BFD_ASSEMBLER case.
406 * config/obj-coff.c (obj_coff_section): Mark writable sections as
411 * dwarf2dbg.c (dwarf2_gen_line_info): Don't call
412 out_end_sequence() when the address decreases due to a new frag.
413 (gen_dir_list): Set ls.file[i].dir to j + 1 (not j) because file
414 numbering starts with 1.
418 * config/tc-mcore.c (md_pseudo_table): Add .comm for ELF and allow
420 (mcore_s_text): Call obj_elf_text for ELF target.
421 (mcore_s_data): Call obj_elf_data for ELF target.
422 (mcore_s_section): No longer ELF specific. Call obj_coff_section
424 (mcore_s_bss): New function: Dump literal table before changing
426 (mcore_s_comm): New function: Dump literal table before changing
429 * config/obj-elf.c (obj_elf_common, obj_elf_data, obj_elf_text):
430 No longer static functions.
431 * config/obj-elf.h (obj_elf_common, obj_elf_data, obj_elf_text):
432 Provide prototypes for these functions.
436 * subsegs.c (subseg_text_p): Rewrite non BFD_ASSEMBLER case to use
437 a list of names, to try obj_segment_name, and to try abbreviated
438 names when using COFF without long section names.
440 * config/tc-alpha.c: More use of symbol accessor functions.
441 * config/tc-arc.c: Likewise.
442 * config/tc-d30v.c: Likewise.
443 * config/tc-fr30.c: Likewise.
444 * config/tc-i860.c: Likewise.
445 * config/tc-m88k.c: Likewise.
446 * config/tc-mcore.c: Likewise.
447 * config/tc-ns32k.c: Likewise.
448 * config/tc-sparc.c: Likewise.
449 * config/tc-v850.c: Likewise.
451 * config/tc-arc.c (get_arc_exp_reloc_type): Change uses of
452 sy_value with appropriate accessor functions.
453 * config/tc-arm.c (md_apply_fix3): Likewise.
454 * config/tc-d10v.c (AT_WORD_P): Likewise.
455 * config/tc-v850.c (reg_name_search): Likewise.
457 * config/obj-ecoff.c (obj_ecoff_set_ext): Change uses of bsym to
458 use symbol_get_bfdsym instead.
459 * config/tc-ppc.c (md_assemble): Likewise.
460 * config/tc-v850.c (v850_comm): Likewise.
464 * config/tc-arc.c (tc_gen_reloc): Use symbol_get_bfdsym to get at
465 the symbol, rather than accessing the bsym member.
466 * config/tc-d10v.c (tc_gen_reloc): Likewise.
467 * config/tc-d30v.c (tc_gen_reloc): Likewise.
468 * config/tc-mcore.c (tc_gen_reloc): Likewise.
469 * config/tc-mn10200.c (tc_gen_reloc): Likewise.
470 * config/tc-mn10300.c (tc_gen_reloc): Likewise.
471 * config/tc-ns32k.c (tc_gen_reloc): Likewise.
472 * config/tc-tic30.c (tc_gen_reloc): Likewise.
473 * config/tc-v850.c (tc_gen_reloc): Likewise.
477 * tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
478 (hppa_gen_reloc_type): Conditionalize on BFD64.
479 (tc_gen_reloc): Re-enable ELF relocations.
480 * tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format.
484 * config/tc-arm.c (ldst_extend): Add parentheses to avoid
486 (do_ldst): Move assignment out of if condition.
487 (md_apply_fix3): Add casts to avoid printf format warnings. Add
488 parentheses to avoid warning.
492 * config/tc-arm.c (arm_adjust_symtab): Use symbol_get_bfdsym()
493 macro to get at the BFD symbol associated with a GAS symbol.
497 * config/tc-ppc.c: Update for symbol handling changes.
498 * config/obj-coff.c: Likewise.
502 * tc-hppa.c: General cleanups of ELF support. No more spaces
503 and subspaces for ELF.
504 (GDB_DEBUG_SPACE_NAME): Delete definition for ELF.
505 (GDB_STRINGS_SUBSPACE_NAME): Likewise.
506 (GDB_SYMBOLS_SUBSPACE_NAME): Likewise
507 (UNWIND_SECTION_NAME): Likewise.
508 (space/subspace related structures): Conditionalize definitions
510 (space/subspace directives and support routines): Conditionalize
511 definitions and references/uses on OBJ_SOM.
512 (label_symbol_struct): For ELF, track the symbol's segment. For
514 (pa_define_label, pa_undefine_label, pa_get_label): Corresponding
516 (USE_ALIASES): Kill for both SOM & ELF.
517 (pa_def_subspaces, pa_def_spaces): Corresponding changes.
518 (pa_space, pa_subspace): Corresponding changes.
519 (pa_spaces_begin): Corresponding chagnes.
520 (md_begin): Do not muck around with space/subspace stuff for
522 (md_apply_fix): Temporarily disable argument relocation stuff
524 (tc_gen_reloc): Temporarily disable relocation generation for
526 (pa_build_unwind_subspace): Similarly.
530 * config/tc-arm.c (thumb_set): New pseudo op.
531 (text, data, section): Override these pseudo ops with ARM
533 (s_thumb_set): New function: Perform the same as a .set pseudo
534 op, but also mark the alias'ed symbol as being a Thumb
536 (arm_s_text): New function: Perform the same as the .text
537 pseudo op, but dump the literal pool before changing
539 (arm_s_data): New function: Perform the same as the .data
540 pseudo op, but dump the literal pool before changing
542 (arm_s_section): New function: Perform the same as the
543 .section pseudo op, but dump the literal pool before changing
545 (arm_cleanup): Do not reset the current section before dumping
550 * config/tc-m32r.c (md_longopts): Fix OPTION_WARN_UNMATCHED and
551 OPTION_NO_WARN_UNMATCHED entries.
552 (md_parse_option): Generate a warning message if an unrecognised
553 option is encountered.
555 * config/tc-d10v.c (do_not_ignore_hash): New variable.
556 (get_operands): When parsing an expression after an '@' symbol
557 has been detected, do not ignore '#' symbols.
558 (md_operand): Only ignore '#' symbols if do_not_ignore_hash is
564 * configure.in (ppc-*-vxworks*): New target.
565 * configure: Rebuild.
569 * config/tc-arm.c (tc_gen_reloc): Fix handling of GOTPC relocs.
573 * write.c (adjust_reloc_syms): Rather than never reducing reloc
574 which refer to symbols in linkonce sections, permit reducing the
575 relocs if the symbol is local.
579 * subsegs.c (subseg_text_p): New function.
580 * as.h (subseg_text_p): Declare.
581 * read.c (do_align): Use subseg_text_p to set the default fill.
582 * write.c (subsegs_finish): Likewise.
583 * config/obj-coff.c (write_object_file): Likewise.
584 * config/tc-i386.h (md_maybe_text): Don't define.
585 (md_do_align): Use subseg_text_p to set the default fill.
586 * config/tc-m32r.c (m32r_do_align): Likewise.
587 * config/tc-sh.c (sh_do_align): Likewise.
588 * config/tc-sparc.h (md_do_align): Likewise.
592 * configure.in: (i[3456]86-*-freebsd*): Now defaults to ELF.
593 * configure: Rebuild.
597 * dwarf2dbg.c: Include elf/dwarf2.h with "", not <>.
598 * Makefile.am: Rebuild dependencies.
599 * Makefile.in: Rebuild.
601 * config/tc-i386.c (i386_immediate): Remove unused label
604 * struc-symbol.h: Put local_symbol code in ifdef BFD_ASSEMBLER.
605 * symbols.c: Likewise.
606 * config/obj-aout.c (obj_crawl_symbol_chain): Refer directly to
607 sy_next field when taking address, rather than symbol_next.
609 * dwarf2dbg.c: Change bfd_vma to addressT and bfd_signed_vma to
611 (out_set_addr): Don't use BYTES_PER_ADDRESS. Instead, get the
612 value from the output file architecture.
613 (dwarf2_gen_line_info): Ifdef BFD_ASSEMBLER specific code.
614 * dwarf2dbg.h: Change bfd_vma to addressT.
618 * dwarf2dbg.h: Use PARAMS in function declarations.
622 * write.c (fixup_segment): Don't add symbol value for i960 ELF.
623 * config/tc-i960.c (s_leafproc): Don't call tc_set_bal_of_cal if
625 (md_apply_fix): Simplify BFD_ASSEMBLER handling.
629 * config/tc-i386.c (md_apply_fix3): Add default case to switch.
631 * config/tc-sparc.c (md_pseudo_table): Remove pushsection and
634 * config/tc-sparc.c (sparc_ip): Add default case to reloc switch.
636 * read.c (read_a_source_file): Only declare inescape if
639 * itbl-ops.c (itbl_disassemble): Change sprintf format strings to
641 (find_entry_byval): Add parens to avoid warning.
643 * as.c: If HAVE_ITBL_CPU, include "itbl-ops.h".
645 * symbols.c (resolve_symbol_value): Don't permit subtraction of
650 * config/tc-sparc.c (sparc_ip): Don't use side-effect expression
653 * config/tc-sparc.c (synthetize_setuw, synthetize_setsw,
654 synthetize_setx): New functions.
655 (md_assemble): Broken the special cases into the above
656 functions. Make compiler happy if sizeof(bfd_vma)==4.
657 Fix sethi generated from set/setuw. If instructions have a relloc,
658 always clear the fields to be relocated in the opcode.
659 (sparc_ip): Remove special_case global variable.
664 * itbl-ops.c (itbl_get_reg_val): Add pval parameter. Return
665 indication of success rather than a value.
666 (itbl_get_val): Likewise.
667 (itbl_get_field): Use strcspn. Change delimiters to include
669 * itbl-ops.h (itbl_get_reg_val): Update declaration.
670 (itbl_get_val): Likewise.
671 * config/tc-mips.c (mips_ip): Update call to itbl_get_reg_val.
673 * symbols.c (copy_symbol_attributes): Convert local symbols to
678 * config/tc-arm.c (md_parse_option): Add support for ARM920 and
683 * config/tc-sparc.c (md_assemble): Fix up setx, support setsw.
684 Optimize set if sizeof(bfd_vma) == 64.
685 (sparc_ip): Fix sethi - without %hi() it should generate
686 R_SPARC_22 reloc, not R_SPARC_HI22.
687 (tc_gen_reloc): Handle BFD_RELOC_SPARC22.
691 * config/tc-sparc.c (md_begin): Handle native wordsize aliases.
692 (s_ncons): New function.
693 (native_op_table): New table.
694 (sparc_ip): Be more strict on %hi() etc.; prepare assembler for
695 R_SPARC_OLO10 handling.
699 * expr.h (struct expressionS): Revert last change; widen X_op.
700 * config/tc-alpha.c (md_begin): Check the field is wide enough.
704 * Makefile.am (TARGET_CPU_CFILES): Add config/tc-fr30.c.
705 (TARGET_CPU_HFILES): Add config/tc-fr30.h.
706 (TARG_ENV_HFILES): Add config/te-epoc-pe.h.
707 * Makefile.in: Regenerated.
709 * config/obj-elf.c (obj_elf_common): In MRI mode if called as
710 `common' pass on to s_mri_common.
711 (elf_pseudo_table): Pass 1 to obj_elf_common for `common'.
715 * config/obj-elf.c (obj_elf_section): Don't free the return
716 value of demand_copy_C_string.
720 * dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol
721 creation logic from obj_elf_create_section.
723 * config/obj-elf.c (elf_pseudo_tab): Add pushsection/popsection.
724 (section_stack): New.
725 (special_sections): Make const.
726 (obj_elf_section): Gut and rewrite parsing.
727 (obj_elf_change_section): New function broken out of obj_elf_section.
728 (obj_elf_parse_section_letters): Likewise.
729 (obj_elf_section_word): Likewise.
730 (obj_elf_section_type): Likewise.
731 (obj_elf_previous): Treat as a toggle.
732 (obj_elf_popsection): New.
733 * config/tc-ppc.c (ppc_section_word): Take str+len not ptr_str.
734 (ppc_section_type): Likewise.
735 * config/tc-ppc.h: Likewise.
737 * expr.h (struct expressionS): Don't make X_op a bitfield.
738 * config/tc-alpha.c: Update for symbol handling changes.
739 (md_apply_fix) [case GPREL]: Use now_seg instead of absolute_section.
740 (load_expression, emit_ir_load, emit_loadstore, emit_jsrjmp): Likewise.
744 * dwarf2dbg.c (*): Convert to K&R + prototypes.
745 (dwarf2_gen_line_info): Kill unused variables.
746 (dwarf2_finish): Likewise.
747 (dwarf2_where): Likewise.
748 (dwarf2_directive_file): If we've only got a string,
749 hand off to s_app_file.
750 * ecoff.c: Move the include of ecoff.h.
751 * symbols.h (S_IS_FUNCTION): Prototype.
753 * read.c (LEX_HASH): Supply a default.
755 (s_globl): Update `c' after skipping whitespace.
756 * read.h (LEX_END_NAME, is_name_ender): New.
757 * expr.c (get_symbol_end): Respect it.
761 * config/tc-hppa.c (md_begin): Convert local symbol dummy_symbol
763 (tc_gen_reloc): Still need bfd_abs_symbol in some relocs.
765 * config/tc-hppa.c: Update for symbol handling changes.
769 * cgen.c: Update for symbol handling changes.
770 * config/tc-m32r.c: Likewise.
772 * config/tc-hppa.h: Update for symbol handling changes.
773 * config/tc-hppa.c: Likewise.
775 * config/tc-arm.h: Update for symbol handling changes.
776 * config/tc-arm.c: Likewise.
777 (symbol_make_empty): Remove. Just use symbol_create.
779 * symbols.c (symbol_set_tc): Correct name.
781 * Makefile.am: Rebuild dependencies.
782 ($(OBJS)): Don't depend upon struc-symbol.h.
783 (.dep1, .tcdep, .objdep): Create itbl-parse.h.
784 * dep-in.sed: Don't remove struc-symbol.h.
785 * Makefile.in: Rebuild.
787 * doc/internals.texi (Symbols): Describe changes in symbol
792 * dwarf2dbg.c (dwarf2_gen_line_info): Use section_symbol
793 instead of doing the work by hand.
797 * dwarf2dbg.c (INITIAL_STATE): New macro encapsulating initial
798 state of line state-machine.
799 (struct ls): Collect DWARF2 line state-machine state in new member
800 SM. Add member EMPTY_SEQUENCE to keep track if a code sequence
801 resulted in any DWARF2 directives.
802 (reset_state_machine): New function.
803 (out_end_sequence): Ditto.
804 (dwarf2_gen_line_info): When switching sections or switching to a
805 lower text address, call out_end_sequence() first to terminate the
806 previous code sequence as code sequences MUST have monotonically
807 increasing addresses.
808 (dwarf2_finish): Call out_end_sequence() instead of open coding it.
812 * as.c (parse_args): Add option -gdwarf2 to allow requesting
813 DWARF2 debug info (line information only, at this point).
814 * as.h: Update comment about supported debug formats.
815 * dwarf2dbg.c, dwarf2dbg.h: New files.
816 * Makefile.am (GAS_CFILES, HFILES, GENERIC_OBJS): Add them.
818 * expr.c (operand): Don't use [ for parens if we want an index op.
819 (op_encoding): Switch [ into O_index, if desired.
820 (op_rank): Renumber with O_index on bottom.
821 (expr): If O_index, match closing bracket.
822 * expr.h (O_index): New.
824 * read.c (read_a_source_file): Conditionally allow matched "
825 in lines passed to md_assemble.
827 * config/obj-elf.c (elf_pseudo_table): Add `common'.
831 Add support for storing local symbols in a small structure to save
832 memory when assembling large files.
833 * as.h: Don't include struc-symbol.h.
834 (symbolS): Add typedef.
835 * symbols.c: Include struc-symbol.h.
836 (local_hash): New static variable.
837 (save_symbol_name): New static function, from symbol_create.
838 (symbol_create): Call save_symbol_name.
839 (local_symbol_count): New static variable.
840 (local_symbol_conversion_count): Likewise.
841 (LOCAL_SYMBOL_CHECK): Define.
842 (local_symbol_make): New static function.
843 (local_symbol_convert): New static function.
844 (colon): Handle local symbols. Create local symbol for local
846 (symbol_table_insert): Handle local symbols.
847 (symbol_find_or_make): Create local symbol for local label name.
848 (symbol_find_base): Check for local symbol.
849 (symbol_append, symbol_insert): Check for local symbols.
850 (symbol_clear_list_pointers, symbol_remove): Likewise.
851 (verify_symbol_chain): Likewise.
852 (copy_symbol_attributes): Likewise.
853 (resolve_symbol_value): Handle local symbols.
854 (resolve_local_symbol): New static function.
855 (resolve_local_symbol_values): New function.
856 (S_GET_VALUE, S_SET_VALUE): Handle local symbols.
857 (S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise.
858 (S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise.
859 (S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise.
860 (S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise.
861 (symbol_previous, symbol_next): New functions.
862 (symbol_get_value_expression): Likewise.
863 (symbol_set_value_expression): Likewise.
864 (symbol_set_frag, symbol_get_frag): Likewise.
865 (symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise.
866 (symbol_mark_used_in_reloc): Likewise.
867 (symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise.
868 (symbol_mark_mri_common, symbol_clear_mri_common): Likewise.
869 (symbol_mri_common_p): Likewise.
870 (symbol_mark_written, symbol_clear_written): Likewise.
871 (symbol_written_p): Likewise.
872 (symbol_mark_resolved, symbol_resolved_p): Likewise.
873 (symbol_section_p, symbol_equated_p): Likewise.
874 (symbol_constant_p): Likewise.
875 (symbol_get_bfdsym, symbol_set_bfdsym): Likewise.
876 (symbol_get_obj, symbol_set_obj): Likewise.
877 (symbol_get_tc, symbol_set_tc): Likewise.
878 (symbol_begin): Initialize local_hash.
879 (print_symbol_value_1): Handle local symbols.
880 (symbol_print_statistics): Print local symbol statistics.
881 * symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER.
882 Declare new symbols.c functions. Move many declarations here from
884 (SYMBOLS_NEED_BACKPOINTERS): Define if needed.
885 * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set.
886 (struct symbol): Move bsym to make it clearly the first field.
887 Remove TARGET_SYMBOL_FIELDS.
888 (symbolS): Don't typedef.
889 (struct broken_word): Remove.
890 (N_TYPE_seg, seg_N_TYPE): Move to symbol.h.
891 (SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise.
892 (symbol_clear_list_pointers): Likewise.
893 (symbol_insert, symbol_remove): Likewise.
894 (symbol_previous, symbol_append): Likewise.
895 (verify_symbol_chain, verify_symbol_chain_2): Likewise.
896 (struct local_symbol): Define.
897 (local_symbol_converted_p, local_symbol_mark_converted): Define.
898 (local_symbol_resolved_p, local_symbol_mark_resolved): Define.
899 (local_symbol_get_frag, local_symbol_set_frag): Define.
900 (local_symbol_get_real_symbol): Define.
901 (local_symbol_set_real_symbol): Define.
903 * write.c (write_object_file): Call resolve_local_symbol_values.
904 * config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define.
905 (TARGET_SYMBOL_FIELDS): Don't define.
906 * config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field. If
907 ECOFF_DEBUGGING, add ECOFF fields.
908 (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
909 * config/obj-multi.h (struct elf_obj_sy): Add local field. If
910 ECOFF_DEBUGGING, add ECOFF fields.
911 (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define.
912 (ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define.
913 * config/tc-mcore.h: Don't include struc-symbol.h.
914 (TARGET_SYMBOL_FIELDS): Don't define.
915 (struct mcore_tc_sy): Define.
916 (TC_SYMFIELD_TYPE): Define.
917 * Many files: Use symbolS instead of struct symbol. Use new
918 accessor functions rather than referring to symbolS fields
921 * read.c (s_mri_common): Don't add in value of line_label.
923 * config/tc-mips.c (md_apply_fix): Correct parenthesization when
924 checking for SEC_LINK_ONCE.
926 * config/tc-sh.h (sh_fix_adjustable): Declare.
928 * app.c (input_buffer): New static variable.
929 (app_push): Save saved_input in allocated buffer.
930 (app_pop): Restored saved_input.
931 (do_scrub_chars): Change get parameter to take char * and int as
932 arguments. Change GET macro to pass input_buffer to get
933 function. Don't save input into allocated buffer.
934 * as.h (do_scrub_chars): Update declaration.
935 * input-file.c (input_file_get): Change to take char * and int.
936 Read data into passed in buffer. Remove static buffer.
937 * read.c (scrub_from_string): Change to take char * and int. Copy
938 data into passed in buffer.
940 * hash.h: Neaten. Declare hash_traverse.
941 * hash.c: Complete rewrite based on BFD hashing code.
942 * gasp.c (chunksize): New variable.
943 * macro.c (macro_expand_body): Call hash_jam with NULL rather than
948 * config/tc-arm.c (md_apply_fix3): Add pipeline offset into reloc
949 addend unless the target uses an old ABI.
953 -Wchar-subscripts cleanup
954 * listing.c (listing_newline): Use unsigned char variable, so
955 calls to isascii,iscntrl are correct.
956 * atof-generic.c (atof_generic): Cast arg to isdigit, et. al. with
958 * ecoff.c (ecoff_directive_ent,ecoff_stab): Ditto.
959 * config/obj-elf.c (obj_elf_vtable_inherit): Ditto.
960 * config/tc-mips.c (mips_ip,mips16_ip): Ditto.
961 (my_getSmallExpression,get_number,s_mips_ent): Ditto.
965 * config/tc-m68k.c (m68k_ip): Check for disallowed index register
967 (arch_coldfire_p): New #define.
968 (m68k_ip, m68k_init_after_args): Use arch_coldfire_p.
972 * config/tc-m68k.c (install_operand): Add places `n', `o'.
974 * config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'.
975 (install_operand): Add place `N'.
976 (init_table): Add registers ACC, MACSR, MASK.
978 * config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK.
980 * config/tc-m68k.c: Change mcf5200 --> mcf.
981 (archs): Add mcf5206e, mcf5307.
982 (m68k_ip): Add format `u'.
983 (install_operand): Add place `m', `M', `h'.
984 (init_table): Add upper/lower registers.
986 * config/m68k-parse.h (m68k_register): Add upper/lower registers.
990 * config/tc-i960.c: Several minor changes to add ELF and
991 BFD_ASSEMBLER support.
992 * config/tc-i960.h: Likewise.
993 * configure.in (i960-*-elf*): New target.
994 * aclocal.m4, configure: Rebuild.
998 * config/tc-i386.c (md_apply_fix3): Only do 1999-05-17 fx_pcrel
999 reloc changes when defined(BFD_ASSEMBLER).
1003 * config/tc-i386.c (tc_gen_reloc): Remove F and MAP macros.
1005 * write.c (write_print_statistics): Output to file, not stderr.
1007 * expr.c (generic_bignum_to_int32,64): Prototype.
1009 * read.c (s_lcomm_internal, sizeof_sleb128, sizeof_uleb128,
1010 output_sleb128, output_uleb128, output_big_sleb128,
1011 output_big_uleb128, output_big_leb128): Prototype.
1012 (output_big_sleb128, output_big_uleb128): Make inline.
1013 (output_big_leb128): Remove inline
1016 * config/tc-i386.c (md_apply_fix3): Convert BFD_RELOC_16 with
1017 fx_pcrel set to BFD_RELOC_16_PCREL. Similarly for BFD_RELOC_8.
1018 Handle BFD_RELOC_16_PCREL and BFD_RELOC_8_PCREL. Return changed
1019 value for correct overflow check in write.c:fixup_segment.
1020 * write.c (fixup_segment): Move bitfield overflow checks to after
1021 the md_apply_fix call.
1022 * config/obj-coff.c (fixup_segment): Likewise.
1023 * doc/internals.texi (CPU backend): Mention md_apply_fix modifying
1024 valueT *val argument.
1028 * config/atof-ieee.c (gen_to_words): Correctly round a
1029 denormalized number. Fix off-by-one in range checking for
1030 exponent in a denormal.
1034 * config/tc-mcore.c (parse_reg): Accept 'sp' as a valid register
1039 * configure.in (i386-*-rtemself*, sh-*-rtemself*): New targets.
1043 * config/tc-i386.h (InvMem): New flag. Add to AnyMem.
1044 (ReverseRegRegmem): Remove.
1045 (ImmExt): New flag. Renumber some of the opcode_modifier bits.
1046 * config/tc-i386.c (md_assemble): Test for PIII SIMD and AMD
1047 3DNow! via ImmExt opcode_modifier. Remove ReverseRegRegmem
1051 * config/tc-i386.h (RegXMM): New for P/III.
1052 * config/tc-i386.c: Add support for P/III.
1056 * config/tc-ppc.c (md_parse_option): Recognize -mppc64bridge.
1057 (md_begin): Allow ppc32 insns in ppc64bridge mode.
1058 (ppc_insert_operand): Accept SIGNOPT in ppc64 mode.
1062 * config/tc-i386.c (i386_immediate): Skip whitespace before
1063 complaining about junk after expression.
1064 (i386_displacement): Likewise.
1068 * symbols.c (symbol_find_base): Use memcpy instead of strcpy.
1069 Don't copy before downcaseing.
1073 * tc-m68k.c: Include elf/m68k.h.
1074 (m68k_elf_final_processing): New routine.
1075 * tc-m68k.h (elf_tc_final_processing m68k_elf_final_processing):
1080 * config/tc-hppa.c (md_apply_fix): Handle 22 bit fmt insn like a
1085 * config/tc-mcore.c (mcore_s_section): Dump literals before
1090 * config/tc-mcore.c (md_apply_fix3): Insert reloc addend into insn
1095 * config/tc-fr30.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h.
1096 (TC_INIT_FIX_DATA): Delete.
1097 * config/tc-m32r.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h.
1098 (TC_INIT_FIX_DATA): Delete.
1099 * write.h (struct fix): New member fx_cgen, ifdef USING_CGEN.
1100 * write.c (fix_new_internal): Initialize fx_cgen member.
1101 * cgen.c (gas_cgen_record_fixup,gas_cgen_record_fixup_exp): Update.
1102 (gas_cgen_md_apply_fix3): Update.
1103 * config/tc-m32r.c (md_cgen_lookup_reloc): Update.
1104 (md_cgen_record_fixup_exp): Update.
1105 (FX_OPINFO_R_TYPE): Update.
1107 * frags.c (frag_var,frag_variant): Initialize fr_cgen here.
1108 * config/tc-fr30.h (TC_FRAG_INIT): Delete.
1109 * config/tc-m32r.h (TC_FRAG_INIT): Delete.
1110 * frags.h (struct frag): Make opindex, opinfo ints.
1112 * config/tc-fr30.c (FX_OPINFO_R_TYPE): Delete, unused.
1116 * aclocal.m4, configure: Updated for new version of libtool.
1120 * config/tc-mcore.c (md_apply_fix3): Renamed function from
1122 (md_apply_fix3): Do not fix up absolute relocations against
1125 * config/tc-mcore.h (MD_APPLY_FIX3): Define.
1129 * config/tc-mcore.c (md_pseudo_table): Add intercepts for section
1130 changes and data-in-text directives.
1131 (mcore_cons): New function: intercept cons() operations.
1132 (mcore_float_cons): New function: intercept float_cons()
1134 (mcore_stringer): New function: intercept stringer() operations.
1138 * obj.h (struct format_ops): Change generate_asm_lineno field to
1140 * config/obj-ecoff.h (OBJ_GENERATE_ASM_LINENO): Don't define.
1142 * config/tc-alpha.c (find_opcode_match): Add default case to
1144 (find_macro_match): Likewise.
1145 (load_expression): Parenthesize && within ||.
1147 * config/tc-alpha.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
1151 * config/tc-mcore.c (md_pseudo_table): Add overrides for .bss
1152 .text .data .section pseudo ops.
1153 (mcore_s_section): New function. Dump lits before changing secs.
1154 (mcore_s_text): New function. Dump lits before changing secs.
1155 (mcore_s_data): New function. Dump lits before changing secs.
1159 * config/tc-mips.c (mips_32bitmode): New.
1160 (md_begin): Set mips_32bitmode if needed.
1161 (mips_elf_final_processing): Don't set EF_MIPS_ARCH.
1162 Set EF_MIPS_32BITMODE.
1166 * config/obj-coff.c (c_section_symbol): Fix typo in previous
1171 * config/tc-mcore.h (LOCAL_LABELS_FB): Define to 1.
1175 * tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3"
1176 expressions correctly.
1181 * config/tc-mips.c (mips_elf_final_processing): Set EF_MIPS_ARCH.
1185 * tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd
1186 and fmpynfadd instructions.
1190 * as.h (environ): Declare it, if needed.
1191 * as.c (dump_statistics): Don't declare environ.
1192 * configure.in (environ): Detect declaration.
1193 * configure, config.in: Rebuild
1195 * config/tc-i386.c (i386_immediate): Accept @GOT relocations.
1196 (i386_displacement): Allocate enough space for replacement buffer.
1197 Clean up replacement buffer initialization.
1201 * subsegs.c (section_symbol): Don't create a new symbol if one
1202 already exists; instead, use the existing one, but set its segment
1203 and frag data if it hasn't already been defined.
1204 * config/obj-coff.c (c_section_symbol): Likewise.
1208 * tc-alpha.c (load_expression): Call as_bad instead of abort.
1212 * config/tc-mcore.c: New File: Support routines for MCore
1214 * config/tc-mcore.h: New File: Definitions for MCore assembler.
1215 * config/obj-coff.c: Add support for mcore-pe target.
1217 * Makefile.am: Add support for MCore targets.
1218 * Makefile.in: Regenerate.
1219 * configure.in: Add support for MCore targets.
1220 * configure: Regenerate.
1222 * doc/all.texi: Set MCORE.
1223 * doc/as.texinfo: Document MCore specific command line options.
1225 * write.h: Prevent multiple inclusion.
1229 * asintl.h (LC_MESSAGES): Never define.
1230 * as.c (main): Don't pass LC_MESSAGES to setlocale if the system
1232 * gasp.c (main): Don't pass LC_MESSAGES to setlocale if the system
1235 * Makefile.am (m68k-parse.c): If configuring in the source
1236 directory, copy m68k-parse.y into the local directory before
1237 running ylwrap, to remove spurious differences when generating
1239 * Makefile.in: Rebuild.
1241 * config/tc-sparc.h (md_do_align): Just allocate the number of
1242 bytes necessary, rather than always allocating 1024.
1246 * listing.c (listing_newline): Add cast to avoid warning.
1247 * read.c (generate_lineno_debug): Add cases to switch. Reindent.
1248 * config/tc-i386.c (i386_scale): Add return value.
1249 (build_displacement_string): Remove unused local temp_disp2.
1250 (i386_intel_memory_operand): Add parentheses to avoid warning.
1251 (i386_intel_operand): Remove unused local end_of_operand_string.
1252 (i386_operand): Remove unused local operand_modifier.
1253 (i386_operand): Add parens to avoid warning.
1257 * configure.in: Add mips*-*-vxworks* target; have it define
1259 * configure, config.in: Rebuild.
1263 * configure.in (emulations): Add support for arm-epoc-pe.
1264 * configure: Regenerate.
1265 * config/te-epoc-pe.h: New file. Define macros specific to
1267 * config/tc-arm.h: Select epoc-pe-arm target format if configured
1268 for arm-epoc-pe target.
1272 * tc-mips.c (md_apply_fix): Adjust value for linkonce sections.
1276 * tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Clean up code to
1277 detect ",n" without a condition.
1278 (pa_parse_neg_cmpsub_cmpltr): Likewise.
1283 * tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit
1284 instruction is encoded with one bit.
1289 * doc/internals.texi (CPU backend): Mention that
1290 line_separator_chars should not include newline. From thi
1295 * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open.
1296 * config/tc-m32r.c (md_begin): Update call to m32r_cgen_cpu_open.
1300 * tc-alpha.c (md_assemble): Allow '6' in an opcode.
1304 * tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr.
1309 * tc-hppa.c (pa_ip, case 'd'): Do not allow ",n".
1313 * app.c (do_scrub_begin): Change '-' back to a symbol char
1314 so we can use multiple opcodes on a line again.
1316 * config/tc-d30v.c: By default, warn if a symbol has
1317 the same name as a register. Plus some minor
1318 updates from the branch.
1322 * config/tc-d30v.c (md_apply_fix3): Handle BFD_RELOC_8,
1323 BFD_RELOC_16 and BFD_RELOC_64.
1327 * expr.c (expr): Add missing else.
1331 * config/tc-arm.c (md_apply_fix3): Improve error message.
1335 * Makefile.am (CPU_TYPES): Add fr30.
1336 (cgen.o): Add $(CGEN_CPU_PREFIX)-desc.h dependency.
1337 (fr30,m32r dependencies): Update.
1338 * Makefile.in: Rebuild.
1340 * cgen.c (gas_cgen_record_fixup): Update use of operand->type.
1341 (gas_cgen_record_fixup_exp): Ditto.
1342 (gas_cgen_finish_insn): Call cgen_operand_lookup_by_num.
1343 (gas_cgen_md_apply_fix3): Ditto. Update call to set_vma_operand.
1344 * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open.
1345 (md_cgen_lookup_reloc): Update use of operand->type.
1346 * config/tc-m32r.c (md_begin): Update call to fr30_cgen_cpu_open.
1347 (md_convert_frag): Call cgen_operand_lookup_by_num.
1348 (md_cgen_lookup_reloc): Update use of operand->type.
1349 (m32r_cgen_record_fixup_exp): Ditto.
1353 * config/tc-mips.c (md_show_usage): Fix message.
1357 * doc/c-arm.texi (ARM Syntax): Document new command line switches
1358 and LDR reg,=<expr> instruction.
1360 * config/tc-arm.c: Add support for -mcpu=arm810, -mcpu=arm9 and
1365 * doc/c-arm.texi (ARM-Chars): Fix typo in use of '@'.
1369 This patch was created by: Scott Bambrough
1373 Special cased '@' character. The '@' character is used as the
1374 ARM assembler comment character, as a special character
1375 and in ELF .symver pseudo-op's, and as a special character in
1376 .type and .section pseudo-ops.
1377 (symver_pseudo): New static variable.
1378 (symver_state): New static variable.
1379 (struct app_save): Add field 'symver_state'.
1380 (app_push): Save global symver_state int struct app_save.
1381 (app_pop): Restore global symver_state from struct app_save.
1382 (do_scrub_chars): Special case handling of '@' character in
1385 * configure.in: Modified to recognize armv* uname syntax from ARM
1387 * configure: Regenerated.
1389 * config/obj-elf.c (obj_elf_section): Allow '%' as well as '@' as
1390 a prefix to the section's type.
1391 (obj_elf_type): Allow '%' as well as '@' and '#' as prefixes to
1392 the type's typename.
1394 * config/tc-arm.h: Add support for PIC generation:
1395 (pic_code): New boolean.
1396 (obj_relocate_extern): Define.
1397 (TC_RELOC_RTSYM_LOC_FIXUP): Define
1398 (TC_CONS_FIX_NEW): Define.
1399 (tc_fix_adjustable): Define.
1400 (GLOBAL_OFFSET_TABLE_NAME): Define.
1402 * config/tc-arm.c: Add support for PIC generation:
1403 (line_seperator_chars): Allow ';' as a seperator for Linux.
1404 (is_immediate_prefix): New macro.
1405 (arm_parse_reloc): New function.
1406 (s_arm_elf_cons): New function.
1407 (do_branch): Special case for BFD_RELOC_ARM_PLT32.
1408 (md_undefined_symbol): Special case handling for the Global Offset
1410 (md_apply_fix3): Handle PIC relocs.
1411 (tc_gen_reloc): Handle PIC relocs.
1412 (md_parse_option): Add support for '-k' command line switch to
1413 enable PIC generation.
1414 (cons_fix_new_arm): New function.
1415 (s_arm_elf_cons): New function.
1419 * configure.in: Add comments for uses of AC_DEFINE.
1420 * acinclude.m4: Likewise.
1421 * acconfig.h: Remove.
1422 * aclocal.m4: Rebuild.
1423 * configure: Rebuild.
1424 * Makefile.in: Rebuild.
1425 * config.in: Rebuild.
1429 * config/tc-mips.c (mips_ip: case 'o'): Fix assertion failure for
1430 non-constant offset from a base register.
1434 * config/tc-alpha.c (md_show_usage): Put \ before newline in
1439 * config/tc-alpha.c (cpu_types): Enable EV6 PALcode with -m21264.
1440 (emit_insn): Look for pc-relative and no-overflow specifiers on
1441 internal relocation types.
1445 * doc/c-mips.texi (MIPS Opts): Updated list of -mNNNN and
1448 * config/tc-mips.c: Remove all the mips_NNNN variables; just use
1450 (mips_4650, mips_4010, mips_4100): Variables removed.
1451 (hilo_interlocks, gpr_interlocks, append_insn, macro_build, macro,
1452 macro2, mips16_macro, mips_ip): Test mips_cpu, not the mips_NNNN
1454 (md_begin): Don't bother initializing the mips_NNNN variables;
1455 mips_cpu is set, and that's good enough now.
1456 (md_parse_option): Have the -mNNNN options set mips_cpu instead of
1457 the mips_NNNN variable. The -no-mNNNN flags are now no-ops.
1458 (show): New function, to handle wrapping in the CPU lists.
1459 (md_show_usage): Update lists of -mcpu and -mNNNN switches.
1463 * config/tc-i386.c (i386_intel_operand): Ignore `SHORT' rather
1464 than treat as an immediate specifier.
1468 * config/tc-i386.c: Prototype many functions.
1469 (set_intel_syntax): Accept `prefix'/`noprefix' specifiers.
1470 (i386_immediate): Remove unused second argument.
1471 (i386_intel_operand): Fix i386_is_reg typo.
1472 (i386_operand): Use allow_naked_reg.
1473 (output_invalid): Make operand int for K&R.
1477 * Makefile.am (EXTRA_as_new_SOURCES): Uncomment--fixed by automake
1479 * Makefile.in: Rebuild.
1483 * Makefile.am (DISTCLEANFILES): Change cgen-opc.h to cgen-desc.h.
1485 (EXTRA_as_new_SOURCES): Comment out.
1486 (.tcdep): <arch>-opc.h renamed to <arch>-desc.h.
1487 * Makefile.in: Rebuild.
1488 * doc/Makefile.in: Rebuild.
1489 * configure.in: Require autoconf 2.13. Redo using_cgen handling.
1490 Delete call to AM_CYGWIN32. Replace AM_EXEEXT with AC_EXEEXT.
1491 (AC_OUTPUT): <arch>-opc.h renamed to <arch>-desc.h.
1492 * configure: Rebuild.
1493 * aclocal.m4: Rebuild.
1494 * config.in: Rebuild.
1495 * cgen.c: Include cgen-desc.h, not cgen-opc.h.
1496 (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
1497 (gas_cgen_cpu_desc): Renamed from gas_cgen_opcode_desc.
1498 CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
1499 CGEN_OPERAND_ATTR renamed to CGEN_OPERAND_ATTR_VALUE.
1500 (gas_cgen_record_fixup): Remove unnecessary != 0 test.
1501 (gas_cgen_record_fixup_exp): Ditto.
1502 (gas_cgen_finish_insn): Ditto. Refer to operand table via cpu
1503 descriptor, not global variable.
1504 (gas_cgen_md_apply_fix3): Refer to operand_table via cpu
1505 descriptor, not global variable. Refer to insert_operand handler
1506 via cpu descriptor, not global function.
1507 * cgen.h (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
1508 * config/tc-fr30.c: Include opcodes/fr30-desc.h.
1509 (*): gas_cgen_opcode_desc renamed to gas_cgen_cpu_desc.
1510 CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
1511 Update call to CGEN_OPERAND_TYPE,CGEN_INSN_OPERANDS.
1512 * config/tc-m32r.c: Ditto.
1513 (assemble_two_insns): Update calls to cgen_lookup_get_insn_operands.
1514 (md_assemble): Ditto.
1515 (md_convert_frag): Update call to CGEN_OPERAND_ENTRY.
1519 * config/tc-arm.c (md_apply_fix3): Fix handling of label1 - label2
1520 relocations for ELF targets.
1524 * configure.in: Add support for StrongARM target.
1525 * configure: Regenerate.
1529 * config/tc-arm.h: Tidy OBJ_ELF and OBJ_COFF definitions.
1531 * config/tc-arm.c (md_apply_fix3): Fix BFD_RELOC_ARM_PCREL_BRANCH
1536 * config/tc-alpha.c (md_show_usage): Document pca56 and ev6 options.
1540 * config/tc-i386.h (LONG_DOUBLE_MNEM_SUFFIX): Define.
1541 (INTEL_DWORD_MNEM_SUFFIX): Define.
1544 (DWORD_PTR): Define.
1545 (XWORD_PTR): Define.
1547 (OFFSET_FLAT): Define.
1549 (NONE_FOUND): Define.
1552 * config/tc-i386.c (set_intel_syntax): New routine.
1553 (intel_syntax): Declare.
1554 (allow_naked_reg): Declare.
1555 (md_pseudo_table): Support .intel_syntax and .att_syntax.
1556 (intel_float_operand): New routine.
1557 (md_assemble): Handle INTEL_DWORD_MNEM_SUFFIX.
1558 Handle brackets as well as parens. Call i386_intel_operand for
1559 intel syntax. Reverse operands if appropriate. Handle new
1560 suffixes. Handle movzx and movsx.
1561 (i386_is_reg): New routine.
1562 (i386_immediate): New routine.
1563 (i386_scale): New routine.
1564 (i386_displacement): New routine.
1565 (i386_operand_modifier): New routine.
1566 (build_displacement_string): New routine.
1567 (i386_parse_seg): New routine.
1568 (i386_intel_memory_operand): New routine.
1569 (i386_intel_operand): New routine.
1570 (i386_operand): Call i386_displacement, i386_immediate,
1571 i386_scale, etc. instead of handling inline.
1572 (parse_register): Handle registers without prefix.
1576 * configure: Regenerate.
1577 * configure.in (arm-*-oabi): New.
1578 (thumb-*-oabi): New.
1579 * config/tc-arm.c (target_oabi): Declare.
1580 (md_apply_fix3): Support REL relocs.
1581 (md_parse_option): Handle -oabi.
1582 (elf32_arm_target_format): New routine.
1583 (md_longopts): Add OPTION_OABI.
1584 * config/tc-arm.h: Redefine TARGET_FORMAT.
1589 * write.c (write_relocs): Handle out of range error.
1591 * config/tc-fr30.c (fr30_fix_adjustable): New function.
1592 (fr30_force_relocation): Default to 0.
1594 * config/tc-fr30.h (obj_fix_adjustable): Define.
1595 (TC_FORCE_RELOCATION): Define.
1597 * cgen.c (gas_cgen_md_apply_fix3): Do not apply fixes to VTABLE
1602 * config/tc-d30v.c (write_2_short): Do not generate a sequential
1603 merge of two instructions if the left instruciton kills the right.
1607 * Makefile.in: Regenerate.
1608 * configure.in: Redo test for using cgen.
1609 * configure: Regenerate.
1613 * config/obj-coff.h (obj_adjust_symtab): Prevent accidental
1614 redefinition of this macro.
1618 * config/tc-mips.c (mips_frob_file): Disable "Unmatched %hi reloc"
1623 * config/tc-mips.c (append_insn): For mips16, insert a nop between
1624 a read of HI or LO and an immediatly following branch.
1628 * config/tc-mips.c (md_begin): Another correction to the setting of
1633 * config/tc-mips.c (md_begin): Correct type-o in setting of mips_eabi64.
1637 * config/tc-m32r.c (md_assemble): Emit a NOP after a relaxable 16
1638 bit insn when optimizing, so that parallelised instructions will
1639 start on a 32 bit boundary.
1643 * config/tc-mips.c (mips_eabi64): New.
1644 (md_begin): Set mips_eabi64.
1645 (mips_elf_final_processing): Use it.
1649 * config/tc-mips.c (mips_elf_final_processing):
1650 Correct setting of ABI in e_flags.
1654 * config/tc-fr30.c (md_assemble): Warn about invalid instructions in delay slots.
1658 * config/tc-mips.c (md_begin,md_parse_option): Handle vr4111.
1662 * cgen.c (gas_cgen_md_apply_fix3): Mark as an error, rather than a
1663 warning, values that don't fit in the field.
1667 * config/tc-mips.c (mips_abi_string): New.
1668 (md_parse_option,md_longopts): Add mabi.
1669 (mips_elf_final_processing): Set e_flags based on mabi flag.
1673 * config/tc-mips.c (md_parse_option): Handle vr4111.
1677 * config/tc-h8300.c (build_bytes): Change message given if the
1678 instruction requires H8/300H mode and we're not in Hmode, to
1679 suggest that it may be the operand modes that are the problem, not
1680 necessarily the opcode.
1684 * config/tc-fr30.c: Add line separator character.
1688 * configure.in (hppa-*-mpeix*): New target.
1689 * config/obj-som.h (obj_som_compiler): Declare.
1690 * config/obj-som.c (compiler_seen): New static variable.
1691 (obj_som_compiler): New function.
1692 * config/tc-hppa.c: Update tc_data uses for change to bfd/som.h.
1693 (md_pseudo_table): Add "compiler" if OBJ_SOM.
1694 (pa_type_args): Set hppa_priv_level.
1695 (pa_compiler): New static function if OBJ_SOM.
1696 * configure: Rebuild.
1700 * read.c (output_leb128): Don't mark as inline.
1704 * config/tc-ppc.c (ppc_vbyte): Prototype and new function for
1705 AIX .vbyte unaligned data support.
1706 (md_pseudo_table): Add 'vbyte' to list of valid pseudos.
1707 (ppc_elf_validate_fix): Add eh_frame to list of ELF relocatable
1712 * config/tc-d30v.c (md_assemble, do_assemble): Improve erroneous
1717 * config/tc-arm.c (elf32_arm_force_relocation): Check for
1718 BFD_RELOC_ARM_PCREL_BRANCH.
1722 * configure.in: Define TARGET_BYTES_{BIG,LITTLE}_ENDIAN after
1723 checking the target type.
1724 (mips-dec-bsd*): Set endian to little.
1725 * configure: Rebuild.
1727 COFF weak symbol support, based on patches from Mark Elbrecht
1729 * config/obj-coff.h (S_IS_WEAK): Define if not BFD_ASSEMBLER.
1730 * config/obj-coff.c (obj_coff_weak): New static function.
1731 (obj_coff_endef) [both versions]: Handle weak symbols.
1732 (coff_frob_symbol): Likewise.
1733 (yank_symbols): Likewise.
1734 (obj_pseudo_table): Add "weak".
1736 * configure.in (m68k-*-gnu*): New target. From Aymeric Vincent
1738 * aclocal.m4: Rebuild with current tools.
1739 * configure: Rebuild.
1741 * config/tc-alpha.c (emit_ldgp): Give an error message rather than
1742 an assertion failure for a case we can't handle when OBJ_ECOFF.
1744 * expr.c (operator): And with 0xff to avoid problems with signed
1749 * config/tc-fr30.c (md_cgen_lookup_reloc): Generate
1750 BFD_RELOC_FR30_48 instead of BFD_RELOC_FR30_32.
1754 * config/tc-fr30.c (md_cgen_lookup_reloc): Enable relocs for
1759 * config/tc-fr30.c (md_pcrel_from_section): Restore previous calculation
1764 * config/tc-fr30.c (md_pcrel_from_section): Fix calculation of
1769 * config/tc-d10v.c (md_assemble): Make static 'etype' have file
1771 (d10v_cleanup): Only generate previous insn if a multiline insn is
1776 * config/tc-fr30.c (md_cgen_lookup_reloc): Add support for
1781 * config/tc-arm.c (md_parse_option): Add support for -marm7xxx and
1782 -marm6xxx command line switches.
1786 * Makefile.am (DEP): Use $(srcdir)/../mkdep.
1787 (itbl-ops.o): Delete duplicate dependencies.
1788 Rebuild dependencies.
1789 Add fr30 dependencies.
1790 * Makefile.in: Rebuild.
1794 * config/tc-fr30.c (md_cgen_lookup_reloc): Updated to match latest
1796 * listing.c: Ignore line terminator characters found inside
1801 * po/gas.pot: Regenerated.
1805 * config/tc-fr30.c (fr30_is_colon_insn): New name for
1806 fr30_is_label_start(). Also checks for delay slot insns.
1808 * config/tc-fr30.c (fr30_is_label_start): New function: Handle
1809 FR30 instructions which contain a colon in the mnemonic.
1811 * config/tc-fr30.h (TC_START_LABEL): Define this macro.
1815 * config/tc-fr30.c: Removed currently superflous code.
1819 * config/tc-fr30.h: New file.
1820 * config/tc-fr30.c: Tweaking so that it will compile.
1824 * config/tc-d10v.h (obj_fix_adjustable): Define.
1825 (TC_FORCE_RELOCATION): Define.
1826 (d10v_force_relocation): Declare.
1827 * config/tc-d10v.c (tc_gen_reloc): Handle Vtable relocs.
1828 (md_apply_fix3): Handle Vtable relocs.
1829 (d10v_fix_adjustable): New.
1830 (d10v_force_relocation): New.
1834 * config/tc-d30v.c: Change default behaviour to ignore potential
1835 conflicts between register name and symbol names.
1839 * configure.in: Add fr30-*-*.
1840 * config/tc-fr30.c: New file.
1841 * Makefile.in: Regenerated.
1842 * config.in: Regenerated.
1843 * configure: Regenerated.
1844 * doc/Makefile.in: Regenerated.
1845 * po/gas.pot: Regenerated.
1849 * config/tc-m32r.c (assemble_two_insns): Ensure both insns
1854 * app.c (do_scrub_begin): Set characters above 127 to be symbol
1856 (do_scrub_chars): Add some casts to unsigned char to avoid
1857 unwanted sign extension.
1858 * read.c (lex_type): Set characters about 127 to be symbol
1860 * config/tc-i386.c (md_begin): Set identifier_chars and
1861 operand_chars for values above 127.
1865 * configure.in: detect cygwin* instead of cygwin32*
1866 * configure: regenerate
1870 * listing.c: Add support for producing a listing from piped
1875 * config/tc-mips.c (hilo_interlocks): Remove mips_3900.
1876 (append_insn): Account for the tx39's multiply behavior.
1880 * config/tc-m32r.c (assemble_two_insns): Rename assemble_two_insns
1881 from assemble_parallel_insns. Add support for '->' to indicate
1882 explicitly serializing the instructions.
1883 (md_assemble): Ditto.
1887 * config/tc-sh.c (sh_fix_adjustable): Adjust EXTERN and
1892 * cgen.c (gas_cgen_md_apply_fix3): Revert last change.
1896 * config/tc-mips.c : support frame and regmask/fregmask when
1897 MIPS_STABS_ELF is specified.
1901 * config/tc-sh.c (sh_fix_adjustable): Only include if OBJ_ELF.
1902 (md_apply_fix): Don't return 1 for VTABLE relocs.
1903 * config/tc-sh.h (obj_fix_adjustable): Define only if OBJ_ELF.
1907 * doc/c-i386.texi: Replace occurences of "opcode" with
1908 "instruction mnemonic", "instruction", or "mnemonic" when
1909 referring to the name of an instruction. Use "opcode" when
1910 referring to the sequence of machine bytes.
1912 * config/tc-i386.c (opcode_chars): Rename to mnemonic_chars.
1913 (is_opcode_char): Rename to is_mnemonic_char.
1914 (md_assemble and i386_operand): Correct error messages from
1915 "opcode" to "instruction mnemonic"
1916 Rename throughout opcode[] -> mnemonic[], opp -> mnem_p,
1917 MAX_OPCODE_SIZE -> MAX_MNEM_SIZE,
1918 DWORD_OPCODE_SUFFIX -> DWORD_MNEM_SUFFIX,
1919 WORD_OPCODE_SUFFIX -> WORD_MNEM_SUFFIX,
1920 BYTE_OPCODE_SUFFIX -> BYTE_MNEM_SUFFIX,
1921 SHORT_OPCODE_SUFFIX -> SHORT_MNEM_SUFFIX
1922 LONG_OPCODE_SUFFIX -> LONG_MNEM_SUFFIX
1924 * config/tc-i386.h (*_MNEM_SUFFIX): Rename from *_OPCODE_SUFFIX.
1926 * config/tc-i386.c (i386_operand): Check for garbage after
1931 * config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc
1932 for BFD_ASSEMBLER to only change value when COFF if TE_PE.
1936 * config/tc-sh.h (obj_fix_adjustable): Define.
1937 * config/tc-sh.c (sh_force_relocation): Handle VT relocs.
1938 (md_apply_fix): Likewise.
1939 (tc_gen_reloc): Likewise.
1940 (sh_fix_adjustable): New.
1944 * cgen.c (gas_cgen_finish_insn): Update handling of CGEN_INT_INSN_P.
1945 * cgen.h (gas_cgen_finish_insn): Update prototype.
1946 * config/tc-m32r.c (m32r_insn): CGEN_INT_INSN -> CGEN_INT_INSN_P.
1947 cgen_insn_t -> CGEN_INSN_INT.
1948 (make_parallel): Update handling of CGEN_INT_INSN_P.
1949 (assemble_parallel_insn): Ditto.
1950 (target_make_parallel): New function.
1951 (md_assemble): Use it.
1955 * config/tc-m32r.c (m32r_force_relocation): Fix typo.
1959 * config/tc-sh.c (md_assemble): Make sure the entire opcode is
1960 converted into lower case.
1964 * cgen.c (gas_cgen_md_apply_fix3): Handle VTABLE relocs.
1965 (gas_cgen_tc_gen_reloc): Likewise.
1966 * config/tc-m32r.h (obj_fix_adjustable): Define.
1967 * config/tc-m32r.c (m32r_fix_adjustable): New.
1968 (m32r_force_relocation): Handle VTABLE relocs.
1972 * doc/c-arm.texi (ARM Directives): Document .ltorn directive.
1976 * config/tc-m32r.c (assemble_parallel_insn): Convert second opcode
1977 to lower case before parsing.
1979 * config/tc-d30v.c (parallel_ok): Ignore conflicts when explicitly
1980 parallel insns modift buts in the PSW as a side effect.
1984 * config/tc-d30v.c (find_format): Test for missing flag and
1987 (md_apply_fix3): Fix error messages to avoid
1988 assumption about presence of a symbol.
1990 (parallel_ok): Disallow parallel instructions that both modify the
1993 (find_format): Generate a warning if an odd numbered register is
1994 used as the first register in a mutli-register instruction.
1998 * config/tc-d30v.c (md_apply_fix3): Do not assume that bad
1999 relocations are always associated with a symbol.
2003 * tc-sparc.h (TC_FORCE_RELOCATION): Define.
2004 (elf32_sparc_force_relocation): Declare.
2005 * tc-sparc.c (md_apply_fix3): Handle vtable relocs.
2006 (tc_gen_reloc): Handle vtable relocs.
2007 (elf32_sparc_force_relocation): New.
2011 * symbols.c (S_IS_FUNCTION): New.
2012 * config/tc-v850.h (obj_fix_adjustable): Define.
2013 (TC_FORCE_RELOCATION): Define.
2014 (v850_force_relocation): Declare.
2015 * config/tc-v850.c (tc_gen_reloc): Use offset instead
2016 of fx_addnumber for VTABLE reloc addends.
2017 (md_apply_fix3): Handle VTABLE relocs.
2018 (v850_fix_adjustable): New.
2019 (v850_force_relocation): New.
2023 * tc-hppa.c (fp_operand_format): Add some additional formats.
2024 (pa_ip): Do not automatically promote into pa2.0 mode.
2025 (pa_level): Handle ".level 2.0".
2029 * config/tc-i386.c (md_assemble): Handle AMD_3DNOW_OPCODE.
2030 * config/tc-i386.h (template.extension_opcode): Change to
2031 unsigned int to allow full range of 8-bit opcode suffixes.
2032 (None): Redefine as 0xffff.
2035 * doc/c-i386.texi (i386-SIMD): New section.
2039 * read.c (discard_rest_of_line): New function.
2040 * read.h: Declare it.
2041 * config/tc-alpha.c (s_alpha_mask, s_alpha_frame): Use it.
2045 * config/tc-d10v.c (find_symbol_matching_register): New function.
2046 (find_opcode): Cope with the case where a register name matches
2051 * config/tc-v850.c (md_pcrel_from): Rename to
2052 v850_pcrel_from_section.
2053 (v850_pcrel_from_section): Do not resolves symbols in other
2056 * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define.
2060 * config/tc-d10v.c (find_opcode): Generate an error if a register
2061 is supplied for an operand that should not be a register.
2065 * config/tc-d30v.c (write_2_short): But do allow delayed branch
2066 instructions to have another instruction in the right bin.
2070 * config/tc-d30v.c (write_2_short): Do not allow instructions in
2071 the right container if the left container holds a branch
2076 * config/tc-d30v.c (reg_name_search): Only warn if a name matches
2077 both a register name and symbol name.
2078 (find_format): Allow correct parsing of MVTSYS and MVFSYS insns.
2082 * config/tc-d30v.c (write_2_short): Implement EITHER_BUT_PREFER_MU
2083 execution unit class.
2085 (reg_name_search): If a name matches a register and a symbol,
2086 prefer the register.
2087 (find_format): Disallow flag registers when a general purpose
2088 register is required.
2089 If a number is required, but a register has been given, check to
2090 see if a symbol with the same name as the register exists, and if
2091 so, use that symbol.
2095 * config/obj-elf.h (ECOFF_DEBUGGING): Add missing parens.
2099 * config/tc-d30v.c (find_format): Do not accept flag registers as
2100 general purpose registers.
2101 (find_format): If an immediate value is expected at a given place
2102 in a format, but a register name has been provided instead, check
2103 to see if that register name matches the name of a predefined
2104 symbol and if it does, then use the symbol instead.
2105 (reg_name_search): If a register name matches a symbol name,
2106 prefer the register name to the symbol name.
2110 * config/tc-m32r.c (m32r_do_align): After inserting NOPs, reset
2111 the previous insn to empty.
2115 * config/tc-ppc.c (md_apply_fix3): Do not break string into two
2116 pieces, forcing the use of an ANSI compiler.
2120 * config/tc-m68k.h (TC_FORCE_RELOCATION): New macro. Force vtable
2122 * config/tc-m68k.c (md_apply_fix_2): Do nothing for vtable relocs.
2126 * config/obj-elf.c (obj_elf_vtable_inherit): Handle arm
2128 (obj_elf_vtable_entry): Likewise.
2129 * config/tc-arm.h: Define TC_FORCE_RELOCATION for OBJ_ELF.
2130 * config/tc-arm.c (md_apply_fix3): Handle VTABLE relocations.
2131 (tc_gen_reloc): Likewise.
2132 (arm_fix_adjustable): Likewise.
2133 (elf32_arm_force_relocation): New.
2134 (armelf_frob_symbol): Remove coff-style symbol support.
2138 * config/tc-i386.c (i386_operand): Fix typo in last patch.
2142 * config/tc-arm.c (arm_adjust_symtab): Move #ifdef
2143 OBJ_COFF so that routine is defined for a.out format.
2147 * config/tc-i386.c (i386_operand): Detect non-segment registers
2148 used as segment prefixes.
2152 * ehopt.c (check_eh_frame): Check the size of the FDE, and don't
2153 optimize across FDE boundaries.
2155 * config/obj-coff.c (obj_coff_section): Preserve any link once
2156 flags when setting the section flags.
2160 * config/tc-arm.h (obj_adjust_symtab): Fixed typo.
2161 * config/tc-arm.c (armelf_adjust_symtab): Reformatted.
2165 * config/tc-sparc.c (in_signed_range): Sign extend 32-bit words
2170 * frags.c (frag_grow): Include the size of the frag struct in the
2173 * subsegs.c (subseg_set_rest): Adjust the seginfo frchain start
2174 if the new subseg comes before the old.
2178 * config/tc-sparc.c (sparc_ip): Allow all digits in an instruction
2179 to handle edge8 and edge16.
2183 * config/obj-elf.c (obj_elf_vtable_inherit): Print error message
2184 before we clobber the symbol involved.
2188 * config/tc-arm.c: Remove OBJ_ELF definitions for
2189 S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. Only
2190 use arm_adjust_symtab for OBJ_COFF.
2191 (armelf_adjust_symtab): New Routine.
2192 * config/tc-arm.h: Define obj_adjust_symtab to
2193 armelf_adjust_symtab for OBJ_ELF.
2197 * configure.in: Make all i386-elf targets use bfd_gas.
2198 * config/tc-i386.c (tc_i386_force_relocation): New.
2199 (tc_i386_fix_adjustable): Don't fix vtable relocs.
2200 (md_apply_fix3): Likewise.
2201 (tc_gen_reloc): Handle them.
2202 * config/tc-i386.h (TC_FORCE_RELOCATION): Always define, calling
2203 tc_i386_force_relocation.
2207 * config/tc-arm.c (md_show_usage): Improve formatting of --help output.
2211 * config/tc-d30v.c (md_assemble): Copy previous opcode over
2212 current opcode after writing the first insturction of a reverse
2217 * read.h (generate_lineno_debug): Add prototype.
2218 * read.c (generate_lineno_debug): Make non-static.
2222 * config/tc-i386.c (md_assemble): Only warn for address/data size
2227 * config/tc-arm.c (arm_fix_adjustable): Do not adjust relocations
2228 against Thumb function names, as the linker needs this information.
2232 * expr.c (operand): Check also that there is no advance in operand
2233 after atof_generic in order to decide "is it label 0f or floating
2238 * config/tc-m32r.c: Replace double dash prefix to M32R specific
2239 command line options with a single dash.
2240 * doc/c-m32r.texi: Replace double dash prefix with a single dash.
2244 * tc-arm.h: Define obj_fix_adjustable for OBJ_ELF.
2245 * tc-arm.c (arm_fix_adjustable): New routine.
2249 * read.c (s_align, s_comm, s_mri_common, s_fail, s_globl, s_space,
2250 s_float_space, s_struct, cons_worker): Move ignore_rest_of_line or
2251 demand_empty_rest_of_line before mri_comment_end.
2252 (equals): Check garbage after expression before
2253 mri_comment_end in MRI mode.
2257 * config/tc-mips.c (macro): Correct M_SGE_I/M_SGEUI_I case for a
2258 small immediate constant to use the constant itself rather than
2263 * config/tc-hppa.c (pa_enter): Call as_bad rather than abort.
2264 (pa_leave): Likewise.
2268 * config/tc-i386.c (md_assemble): Emit a warning for stand-alone
2270 (i386_operand): Fix an error message.
2274 * doc/c-arm.texi (ARM Directives): Document .req directive.
2276 * config/tc-arm.c (reg_required_here): Display erroneous string if
2277 the register name could not be decoded.
2278 Do not set inst.instruction if the sift is -1.
2282 * config/tc-alpha.c (tc_gen_reloc): Bias WEAK symbols just as
2287 * config/tc-d30v.c (d30v_align): Always perform alignment request,
2288 even if it is belived to be unnecessary.
2292 config/tc-i386.c (i386_operand): Size immediate constants by
2293 suffix (erroneously removed as part of July 7 change).
2297 * config/obj-elf.h: Check for redefinition of obj_frob_symbol.
2298 * config/tc-arm.c: Define S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS.
2299 (armelf_frob_symbol): New Routine.
2300 * config/tc-arm.h: Define obj_frob_symbol if OBJ_ELF.
2304 * config/tc-alpha.c (alpha_fix_adjustable): Don't adjust weak syms.
2308 * config/tc-arm.c (md_begin): Set BFD private flags depending upon
2309 command line switches passed to assembler.
2313 * cgen.h (GAS_CGEN_MAX_FIXUPS): GAS_ prepended, all uses updated.
2314 (gas_cgen_opcode_desc): Declare.
2315 (gas_cgen_parse_operand): Declare.
2316 (*): Prepend gas_ to gas specific fns to denote them as such.
2318 * cgen.c (gas_cgen_opcode_desc): New global
2319 (gas_cgen_init_parse): Renamed from cgen_asm_init_parse.
2320 (queue_fixup): Renamed from cgen_queue_fixup.
2321 (*): Prepend gas_ to gas specific fns to denote them as such.
2323 (gas_cgen_md_apply_fix3): Update call to insert_operand.
2324 (gas_cgen_finish_insn): Renamed from cgen_asm_finish_insn.
2325 * config/tc-m32r.c (md_begin): Remove use of CGEN_SYM.
2326 Open opcode table and initialize it.
2327 (make_parallel): Use gas_cgen_opcode_desc.
2328 (assemble_parallel_insn): Ditto. Remove use of CGEN_SYM.
2329 (md_assemble): Ditto.
2333 * as.h (debug_info_type): Add entries for unspecified and dwarf*.
2334 * ecoff.c (ecoff_generate_asm_lineno): Take no arguments; call
2335 as_where ourselves. Provide a stub for !ECOFF_DEBUGGING.
2336 * ecoff.h: Move ECOFF_DEBUGGING protection inside GAS_ECOFF_H.
2337 Move ecoff_generate_asm_lineno outside ECOFF_DEBUGGING protection.
2338 * read.c (generate_lineno_debug): Tidy ECOFF bits. Use
2339 DEBUG_UNSPECIFIED rather than DEBUG_NONE for initial test.
2340 * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Define to a variable.
2341 (SEPARATE_STAB_SECTIONS): Conditionalize on value of ECOFF_DEBUGGING.
2342 (INIT_STAB_SECTION): Likewise.
2343 (OBJ_PROCESS_STAB): Likewise.
2345 * config/tc-alpha.c (md_longopts): New options -mdebug/-no-mdebug.
2346 (md_parse_option): Watch for them.
2347 (alpha_cur_ent_sym, alpha_flag_mdebug): New variables.
2348 (md_begin): Kill neverdef code.
2349 (s_alpha_ent, s_alpha_end, s_alpha_mask, s_alpha_frame): New.
2350 (s_alpha_prologue): Watch alpha_cur_ent_sym.
2351 (s_alpha_coff_wrapper): New.
2352 (md_pseudo_table): Trap all ECOFF pseudos.
2356 Start of changes to remove mdebug section from mips*-elf
2357 Based on MIPS_STAB_ELF definition
2358 * acconfig.h: undef if not configured
2359 * config.in: undef if not configured
2360 * config/mips-elf.h: only set ECOFF debugging if not stabs-in-elf
2361 * config/tc-mips.c (s_ent): set BSF_FUNCTION
2362 * stabs.c (s_stab_generic): flush frag
2366 * configure.in: (arm-*-elf): Handle.
2367 (thumb-*-elf): Handle.
2368 * configure: Regenerate.
2369 * read.c (stringer): Fix typo in comment.
2370 * write.c (fixup_segment): Don't add symbol value to addend if
2372 * config/tc-arm.c (md_section_align): Don't align dwarf debug
2374 (tc_gen_reloc): Always set the reloc addend to fixp->fx_offset
2379 * config/tc-d30v.c ({cur,prev}_left_kills_right_p): New variables.
2380 (write_2_short): Emit warning if new flag is set.
2381 (do_assemble): Set flags if left instruction is one of special
2382 "right-instruction-killer" type.
2386 * config/tc-sparc.c (md_number_to_chars, cons_fix_new_sparc):
2387 Always output words in debug_info section as big endian.
2388 (sparc_target_format): Choose correct bfd target.
2389 (md_apply_fix3): Rename BFD_RELOC_SPARC_32LE to BFD_RELOC_SPARC_REV32.
2393 * config/tc-mn10300.c (md_assemble): Fix "errmsg" initialization
2394 to work with internationalization code. Issue an error when two
2395 operands match that are not allowed to match.
2399 * configure.in (install_tooldir): Allow target to specify whether
2400 it wants to be installed in $(tooldir)/bin.
2401 * configure: Regenerate.
2402 * Makefile.am (install-exec-local): Set install-exec-tooldir
2403 dependency via configure.
2404 * Makefile.in: Regenerate.
2408 * Makefile.am (install-exec-local): Split into two ...
2409 (install-exec-bindir,install-exec-tooldir): New rules.
2410 * Makefile.in: Regenerate.
2414 * Makefile.am (install-exec-local): Don't remove the file before
2415 checking whether $(bindir) == $(tooldir)/bin. From Maciej
2417 * Makefile.in: Rebuild.
2421 * cgen.c: Include libiberty.h.
2422 (cgen_md_apply_fix3): Update call to md_cgen_lookup_reloc.
2423 (cgen_tc_gen_reloc): Use xmalloc, not bfd_alloc.
2424 * cgen.h (cgen_md_apply_fix3,cgen_tc_gen_reloc): Declare.
2425 (md_cgen_lookup_reloc)): Declare.
2426 (md_cgen_record_fixup_exp): Declare.
2427 * config/tc-m32r.h (md_pcrel_from_section): Declare.
2428 (m32r_relax_frag): Declare.
2429 (cgen_md_apply_fix3): Decls moved to cgen.h.
2430 (cgen_record_fixup_exp,cgen_tc_gen_reloc): Ditto.
2431 (m32r_cgen_record_fixup_exp): Delete decl.
2432 * config/tc-m32r.c (m32r_cpu_desc): #if 0 out.
2433 (assemble_nop): Delete.
2434 (expand_debug_syms): Delete unused `exp'.
2435 (md_cgen_lookup_reloc): Renamed from CGEN_SYM (lookup_reloc).
2436 Add default case for -Wall.
2437 (m32r_cgen_record_fixup_exp): Add default case for -Wall.
2438 (md_atof): Delete unused wordP.
2442 * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL
2447 * doc/as.texinfo: Add documentation for .end, .exitm, .fail,
2448 .ifc, .ifeqs, .ifge, .ifgt, .ifle, .iflt, .ifnc, .ifne, .ifnes,
2449 .print, .purgem, and .struct. Remove documentation for
2454 * cgen.c (cgen_md_apply_fix3): set_operand renamed to set_vma_operand.
2455 Update call to insert_operand.
2459 * config/tc-m32r.c (ms_show_usage): Formatting changes.
2463 * config/tc-i386.c (md_assemble): Don't get confused by trailing
2464 whitespace after a prefix operator.
2468 * configure.in (i386-*-beos{pe,elf,}*): Recognize.
2472 * config/tc-sparc.c (log2): New static function.
2473 (s_reserve): Use log2 to convert alignment before calling
2475 (s_common): Use log2 to convert alignment before calling
2476 record_alignment and frag_align.
2477 (sparc_cons_align): Use log2.
2481 * config/tc-sparc.c (s_reserve): Set symbol size if OBJ_ELF.
2482 (s_common): Likewise.
2484 * config/tc-sparc.c (sparc_handle_align): Reindent a bit. Correct
2485 initialization of waddr.
2486 (sparc_elf_final_processing): Add default case to switch.
2490 * doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather
2491 than temporary real.
2495 * write.c (subsegs_finish): Don't align the segments if there were
2498 * config/obj-coff.c (c_symbol_merge): Correct number of bytes when
2499 copying aux information.
2501 * expr.c (make_expr_symbol): Catch attempts to turn an O_big
2502 expression into a symbol.
2506 * config/tc-i386.c (mode_from_disp_size): Change arg and return
2507 type to unsigned int.
2508 (md_assemble): Change type used to store offsets from unsigned
2510 (i386_operand): Switch error check to only call RESTORE_END_STRING
2511 once after parse_register.
2515 * config/tc-v850.c (md_show_usage): Changed format to match that
2518 * as.c (show_usage): Changed format to match that of gcc, ld, etc.
2522 * config/tc-m68k.c (tc_m68k_fix_adjustable): Don't adjust vtable
2524 (md_apply_fix_2): Force the symbol of the vtable reloc to be
2529 * doc/Makefile.am (MAINTAINERCLEANFILES): Define.
2530 * doc/Makefile.in: Rebuild.
2534 * config/tc-mips.c (mips_ip, case 'i' and 'j'): Mask off high bits
2535 for %lo expressions.
2536 (mips_ip, case 'u'): Move range check after code to mask
2537 off bits in %hi/%lo expressions. Mask off high bits for
2542 * doc/Makefile.am (gasver.texi): New target.
2543 (as.info, as.dvi): Depends upon gasver.texi.
2544 * doc/as.texinfo: Include gasver.texi. Mention version number on
2545 title page and in top node.
2546 * doc/Makefile.in: Rebuild.
2550 * listing.c (listing_listing): For EDICT_LIST, skip all lines up to
2551 but not including the line containing the edict.
2552 * listing.h (LISTING_EOF): New.
2553 * input-scrub.c (input_scrub_next_buffer): Call it.
2557 * config/tc-i386.c (i386_operand): Don't set the size of an
2558 immediate address based solely on the suffix and the mode.
2560 * config/tc-i386.c (md_assemble): Add assertion to make sure
2561 overlap2 does not set Imm.
2563 * config/tc-i386.c (space_chars): Remove. The scrubber converts
2564 sequences of whitespace to a single space.
2565 (is_space_chars): Just compare with space.
2566 (md_begin): Don't initialize space_chars.
2567 (md_assemble): Just skip a single whitespace character.
2568 (i386_operand): Rewrite base-index parsing to use new
2569 parse_register, and to skip white space. Skip white space in a
2570 number of other places too. Don't give error message if
2571 parse_register fails.
2572 (parse_register): Change reg_string parameter to be non-const.
2573 Add end_op parameter. Skip white space after the `%', and return
2574 end of register string. Give error message here rather than
2580 * expr.c (op_encoding): Make const.
2581 (expr_set_precedence): New function.
2582 (expr_begin): Don't set operator rankings, just call
2583 expr_set_precedence.
2584 * expr.h (expr_set_precedence): Declare.
2585 * read.c (s_mri): Call expr_set_precedence.
2589 * doc/as.texinfo (Statements): Remove paragraph discussing
2590 continuing lines with a backslash. This hasn't worked for years,
2595 * obj-vms.c: Add C++ support with ctors/dtors sections. Add weak
2597 (Ctors_Symbols, Dtors_Symbols): New symbol chains.
2598 (ps_CTORS, ps_DTORS): New section types.
2599 (vms_fixup_xtors_section): New function
2600 (Ctors_Psect, Dtors_Psect): Define.
2601 (IS_GXX_XTOR): Define
2602 (global_symbol_directory): Change check of gxx_bug_fixed to 0.
2603 Filter static constructors/destructors and add to
2604 Ctors_Symbols/Dtors_Symbols chain.
2605 (vms_write_object_file): Write Ctors_Symbols/Dtors_Symbols to
2606 appropriate section.
2608 * tc-alpha.h (TARGET_FORMAT): Rename "evax-alpha" to "vms-alpha".
2609 * makefile.vms: Merge vax/vms support.
2613 * config/obj-elf.c (obj_elf_vtable_inherit, obj_elf_vtable_entry): New.
2614 (elf_pseudo_table): Add them.
2615 * config/tc-mips.c (mips_force_relocation): Force vtable relocs.
2616 (md_apply_fix): Accept them.
2617 (mips_fix_adjustable): Don't adjust them.
2618 (tc_gen_reloc): Mung BFD_RELOC_VTABLE_ENTRY for Rel.
2619 * config/tc-ppc.c (md_apply_fix3): Accept vtable relocs.
2620 * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Force vtable relocs.
2621 (tc_fix_adjustable): Don't adjust them.
2625 * Makefile.am (CGEN_CPU_PREFIX): New variable.
2627 * Makefile.in: Regenerate.
2628 * configure.in: AC_SUBST cgen_cpu_prefix.
2629 * configure: Regenerate.
2633 * config/tc-sh (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define.
2634 Changed all users of COND12_DELAY.
2638 * config/tc-mn10300.c (set_arch_mach): New function.
2639 (md_pseudo_table): Add pseudo-ops to set the current machine type.
2640 (md_begin): Default to mn10300 mode.
2641 (md_assemble): Only accept instructions for the core mn10300
2642 chip and the active machine type.
2646 * subsegs.h (segment_info_type): Give the struct a name.
2647 * config/tc-h8300.h (tc_reloc_mangle): Add prototype.
2648 * config/tc-h8500.h (tc_reloc_mangle): Declare.
2649 * config/tc-sh.h (sh_coff_reloc_mangle): Add prototype.
2650 * config/tc-w65.h (tc_reloc_mangle): Declare.
2651 * config/tc-z8k.h (tc_reloc_mangle): Declare.
2655 * config/tc-v850.c (v850_comm): Restore old section
2656 after common processing.
2660 * config/obj-vms.c (Create_VMS_Object_File): Force binary file.
2664 * config/tc-h8300.c (do_a_fix_imm, build_bytes): Replace cast to
2665 char with code that explicitly sign-extends.
2669 * config/tc-v850.c (md_begin): Restore text section as the current
2670 section after creating call table sections.
2671 * config/obj-coff.h (SYM_AUXINFO): New macro to conceal ugly
2674 * config/obj-coff.c (c_symbol_merge): Replace complex expresion
2675 with call to macro SYM_AUXINFO.
2679 * Makefile.am (install-exec-local): Don't let EXEEXT interfere
2680 with the program transform name.
2681 * Makefile.in: Rebuild.
2685 * config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary
2690 * config/tc-i386.c (i386_operand): Be prepared for a space between
2691 the open parenthesis and the start of the register operand,
2692 because of the June 16 change.
2696 * config/tc-sh.c (md_apply_fix): Handle weak symbols correctly if
2701 * config/tc-d30v.c (d30v_align): Always perform alignment request,
2702 even if it is belived to be unnecessary.
2706 * write.c (adjust_reloc_syms): Never adjust relocs against weak
2708 * config/tc-mips.c (md_apply_fix): Adjust accordingly.
2712 * config/tc-mn10300.c (mn10300_insert_operand): Do not hardcode the
2713 shift amount for a repeated operand. The shift amount for the
2714 repeated copy comes from the size of the operand.
2718 * config/tc-h8300.c (get_operand): Fix typos in ldm/stm support.
2722 * config/tc-mips.c (md_show_usage): Fix -mipsN usage.
2726 * app.c (do_scrub_begin): If tc_symbol_chars is defined, treat all
2727 characters in it as LEX_IS_SYMBOL_COMPONENT.
2728 * config/tc-i386.h (tc_symbol_chars): Define.
2729 (extra_symbol_chars): Declare.
2730 * config/tc-i386.c (extra_symbol_chars): Define.
2731 (comment_chars): Don't use '/' as comment start if TE_LINUX.
2732 (line_comment_chars): Set to '/' if TE_LINUX.
2733 * doc/c-i386.texi (i386-prefixes): Update.
2734 * doc/internals.texi (CPU backend): Document tc_symbol_chars.
2738 * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
2739 ($(PACKAGE).pot): Unconditionally depend on POTFILES.
2743 * config/tc-d10v.c (md_apply_fix3): Checking displacement
2744 constraint in instructions REP & REPI.
2748 * config/tc-d30v.c (md_apply_fix3): Catch BFD_RELOC_8,
2749 BFD_RELOC_16, BFD_RELOC_64 and issue appropriate error messages.
2751 (check_range): If the operand is shifted, then shift the number
2752 before checking its range.
2754 * write.c (adjust_reloc_syms): Add more checks for NULL pointers.
2756 * config/tc-v850.c (v850_comm): Set SEC_COMMON bit on special
2761 * config/tc-v850.c (v850_comm): Create special sections as needed.
2765 * config/tc-d10v.c (write_2_short): Addition of swapping
2766 instructions for sequential and reverse sequential order when
2767 given order is not possible.
2771 * Makefile.am: Rebuild dependencies.
2772 (DEP_INCLUDES): Fix reference to intl build directory.
2773 * Makefile.in: Rebuild.
2777 * doc/c-i386.texi: Update 16 bit documentation.
2779 * config/tc-i386.h: Change Data16 to Size16, Data32 to Size32,
2780 IgnoreDataSize to IgnoreSize as they are used for address size as
2782 * config/tc-i386.c: Likewise. Add code to reject addr32/data32 in
2783 32-bit mode, similarly addr16/data16 and variants.
2787 * config/tc-d30v.c (md_assemble): Fix handling of reverse
2788 sequential word multiply instructions.
2790 (do_assemble): Add extra command line argument, to allow mul32
2791 attribute to be preserved across parallel insns.
2792 (md_assemble): Insert NOPs between explicitly parallel insns which
2793 contain an 32 bit multiply and a 16 multiply.
2797 * config/tc-i386.c: REPNE renamed to REPNE_PREFIX_OPCODE, and
2800 * config/tc-i386.c (reloc): Add braces.
2802 * config/tc-i386.c (struct _i386_insn): Rename bi to sib to be
2803 consistent with Intel naming.
2804 * config/tc-i386.h (base_index_byte): Rename to sib_byte. Don't
2805 use bitfields in sib_byte.
2806 (modrm_byte): Don't use bitfields here either.
2808 * config/tc-i386.c (current_templates): Add const.
2809 (parse_register): Add const to return, param, and char *s.
2810 (i386_operand): Add const to reg_entry *r.
2811 * config/tc-i386.h (templates): Add const to start, end.
2813 Inspired by code for 16 bit gas support from Martynas Kunigelis
2815 * config/tc-i386.c (md_assemble): Add full support for 16 bit
2816 modrm, and Jump, JumpByte, JumpDword, JumpInterSegment insns.
2817 (uses_mem_addrmode): Remove.
2818 (md_estimate_size_before_relax): Add support here too.
2819 (md_relax_table): Rewrite interface to md_relax for 16 bit
2821 (BYTE, WORD, DWORD, UNKNOWN_SIZE): Remove.
2822 (opcode_suffix_to_type): Remove.
2823 (CODE16, SMALL, SMALL16, BIG, BIG16): Define.
2824 (SIZE_FROM_RELAX_STATE): Modify to suit above.
2825 (md_convert_frag): Likewise.
2826 (i386_operand): Add support for 16 bit base/index regs,
2827 immediates, and displacements. Remove some unnecessary casts, and
2828 localise end_of_operand_string, displacement_string_start,
2829 displacement_string_end variables. Add GCC_ASM_O_HACK.
2830 * config/tc-i386.h (NO_BASE_REGISTER_16): Define.
2832 * config/tc-i386.c (prefix_hash): Remove.
2833 (md_begin): Rewrite without obstacks. Remove prefix hash table
2834 handling. Rewrite lexical table handling.
2835 (i386_print_statistics): Don't print prefix statistics.
2836 (md_assemble): Rewrite instruction parser so that line is not
2837 converted to lower case. Don't do a hash_find for prefixes,
2838 instead recognise them via opcode modifier.
2839 (expecting_operand, paren_not_balanced): Localise variables.
2840 * config/tc-i386.h (IsPrefix): Define.
2841 (prefix_entry): Remove.
2843 * config/tc-i386.h (PREFIX_SEPERATOR): Don't define.
2844 * config/tc-i386.c (PREFIX_SEPARATOR): Define here instead, using
2845 '\\' in case where comment_chars contains '/'.
2847 * config/tc-i386.c (MATCH): Ensure given operand and template
2848 match for JumpAbsolute. Makes e.g. `ljmp table(%ebx)' invalid;
2849 you must write `ljmp *table(%ebx)'.
2852 * config/tc-i386.c (BFD_RELOC_16, BFD_RELOC_16_PCREL): Define
2853 as 0 ifndef BFD_ASSEMBLER.
2854 (md_assemble): Allow immediate operands without suffix or
2855 other reg operand to default in size to the current code size.
2859 * config/tc-v850.c (md_begin): Restore creation of
2860 .call_table_text and .call_table_data sections.
2864 * config/tc-d30v.c (md_assemble): Set execution type to unknown
2865 after emitting a word of noops.
2869 * config/tc-i386.c (mode_from_disp_size): Disp16 is mode 2.
2870 (i386_operand): Simplify checks for valid base/index combinations.
2871 Disallow `in 4(%dx),%al'.
2873 * config/tc-i386.c (struct _i386_insn): Make regs, base_reg, and
2875 (add_prefix): Change parameter from char to int.
2877 * config/tc-i386.h (Ugh): Define opcode modifier.
2878 * config/tc-i386.c (md_assemble): Print warnings for Ugh insns.
2880 * config/tc-i386.c (md_assemble): Rewrite MATCH and
2881 CONSISTENT_REGISTER_MATCH macros to check register types more
2882 thoroughly. Check for illegal suffix/operand combinations
2883 when matching insns with operands. Handle new `s' suffix, and
2884 associated FloatMF opcode modifier for float insns with memory
2886 * config/tc-i386.h (FloatMF): Define new opcode modifier.
2887 (No_sSuf, No_bSuf, No_wSuf, No_lSuf): Likewise.
2888 (SHORT_OPCODE_SUFFIX, LONG_OPCODE_SUFFIX): Define.
2889 * config/tc-i386.c: Rename WORD_PREFIX_OPCODE to
2890 DATA_PREFIX_OPCODE throughout.
2892 * config/tc-i386.c (REGISTER_WARNINGS): Define.
2893 (md_assemble): Rewrite suffix/register operand checking code to be
2894 more thorough. Remove Abs8,16,32. Change occurrences of Mem to
2895 AnyMem, the better to grep.
2897 (i386_operand): Don't set Mem bits in i.types[this_operand] when
2898 given a memory operand. Don't set Abs bits either.
2899 (type_names): Remove Mem*, Abs*.
2900 * config/tc-i386.h (Mem8, Mem16, Mem32, Abs8, Abs16, Abs32): Don't
2901 define opcode_modifiers as these cases are handled by Disp8,
2902 Disp16, Disp32 and suffix checks.
2903 (COMES_IN_BOTH_DIRECTIONS): Remove.
2904 (FloatR): Define. It's OK to share the bit with ReverseRegRegmem.
2906 * config/tc-i386.c (md_assemble): Don't emit operand size prefix
2907 if IgnoreDataSize modifier given. Remove ShortformW modifier
2908 test. Add test for ShortForm in W base_opcode modification.
2909 Merge Seg2ShortForm and Seg3ShortForm code.
2910 * config/tc-i386.h (ShortFormW): Remove.
2911 (IgnoreDataSize): Define.
2915 * config/tc-d30v.c (md_assemble): Store previous segment state
2916 with previous instruction.
2920 * config/tc-i386.c (SCALE1_WHEN_NO_INDEX): Define.
2921 (ebp, esp): Remove static variables.
2922 (MATCH): Remove test for InOutPortReg.
2923 (i386_operand): Properly handle InOutPortReg here instead.
2924 Disallows `inb (%dx,2)', `inb %es:(%dx)' and `mov (%dx),%ax'
2925 (md_assemble): Simplify and correct modrm and sib generation.
2926 (i386_operand): Add warning for scale without index.
2927 Rewrite checks for valid base/index combinations.
2929 * config/tc-i386.c (END_STRING_AND_SAVE): Protect arguments of
2930 macros and enclose in do while(0).
2931 (RESTORE_END_STRING): Likewise.
2932 (md_assemble): Add one to printed operand number so we start
2933 from 1 not 0. Add some more gettext invocations.
2934 (i386_operand): Fix `%%s' -> `%%%s'. Inc printed operand
2937 * config/tc-i386.h (WAIT_PREFIX, LOCKREP_PREFIX, ADDR_PREFIX,
2938 DATA_PREFIX, SEG_PREFIX): Define.
2939 * config/tc-i386.c (struct _i386_insn): Remove wait_prefix field.
2940 (check_prefix): Remove function.
2941 (add_prefix): New function. Add prefix to i.prefix as well as
2943 (md_assemble): Changes for add_prefix. Remove hack for wait
2944 prefix, instead always output prefixes in fixed order. Test
2945 for jcxz/loop when selecting between word & dword operations,
2946 and add address size prefix rather than operand size prefix.
2947 Remove operand -> address size hack when emitting jcxz/loop.
2948 (i386_operand): Remove O_Absent check as it's done in expr.
2952 * configure.in: Recognize m5200 as a cpu_type of m68k.
2953 * aclocal.m4: Rebuild with current libtool.
2954 * configure: Rebuild.
2958 * config/tc-m68k.c (md_estimate_size_before_relax): Add more calls
2959 to relaxable_symbol to prevent references to external symbol from
2964 * config/tc-m68k.c (relaxable_symbol): If TARGET_OS is "elf", all
2965 symbols are relaxable.
2969 * config/tc-v850.c (md_begin): Don't create special
2970 sections by default.
2974 * config/tc-mips.c (macro): For div and udiv, close the
2975 reorder block as soon as possible.
2980 * macro.c (macro_mri_mode): New function.
2981 * macro.h (macro_mri_mode): Declare.
2982 * read.c (s_mri): Call macro_mri_mode when switching in and out of
2987 * config/tc-alpha.c (s_alpha_comm): Allow alignment parameter in
2990 * config/tc-alpha.c (s_alpha_comm): Defer restoring character
2991 until after xstrdup in OBJ_EVAX case.
2995 * config/tc-vax.c (md_create_short_jump): Fix off by two bug in
2996 offset calculation. Also, use VAX_BRW from vax-inst.h instead
2997 of hardcoded magic number.
2998 (md_create_long_jump): Use VAX_JMP and VAX_ABSOLUTE_MODE macros.
3002 * read.c (do_s_func): New function.
3004 * read.h (do_s_func): Add prototype.
3008 * config/tc-m32r.c (m32r_do_align): Only fill code sections with
3009 nops if fill pattern not specified.
3014 * config/te-go32.h (TE_GO32): Define.
3015 * config/tc-i386.h (LOCAL_LABEL): Don't define if TE_GO32.
3019 Implement .func/.endfunc pseudo-ops.
3020 * read.h (stabs_generate_asm_func,stabs_generate_asm_endfunc): Declare.
3022 * read.c (potable): Add .func,.endfunc.
3023 (s_func): New function.
3024 * stabs.c (stabs_generate_asm_func,stabs_generate_asm_endfunc): New
3026 (in_doc_func_p,current_function_label): New static globals.
3027 (stabs_generate_asm_lineno): Emit function relative stabs if in .func.
3031 * config/tc-a29k.h (WORKING_DOT_WORD): Define.
3032 * config/tc-alpha.h (WORKING_DOT_WORD): Define.
3033 * config/tc-arm.h (WORKING_DOT_WORD): Define.
3034 * config/tc-h8300.h (WORKING_DOT_WORD): Define.
3035 * config/tc-h8500.h (WORKING_DOT_WORD): Define.
3036 * config/tc-hppa.h (WORKING_DOT_WORD): Define.
3037 * config/tc-i860.h (WORKING_DOT_WORD): Define.
3038 * config/tc-i960.h (WORKING_DOT_WORD): Define.
3039 * config/tc-tic30.h (WORKING_DOT_WORD): Define.
3040 * config/tc-w65.h (WORKING_DOT_WORD): Define.
3041 * config/tc-z8k.h (WORKING_DOT_WORD): Define.
3042 * config/tc-a29k.c: Don't define md_short_jump_size,
3043 md_long_jump_size, md_create_short_jump or md_create_long_jump.
3044 * config/tc-alpha.c: Likewise.
3045 * config/tc-alpha.h: Likewise.
3046 * config/tc-arm.c: Likewise.
3047 * config/tc-h8300.c: Likewise.
3048 * config/tc-h8500.c: Likewise.
3049 * config/tc-hppa.c: Likewise.
3050 * config/tc-i860.c: Likewise.
3051 * config/tc-i960.c: Likewise.
3052 * config/tc-ppc.c: Likewise.
3053 * config/tc-sh.c: Likewise.
3054 * config/tc-sparc.h: Likewise.
3055 * config/tc-tic30.c: Likewise.
3056 * config/tc-w65.c: Likewise.
3057 * config/tc-z8k.c: Likewise.
3061 * config/tc-vax.c (_): Delete this macro used for placeholder
3062 values in vax_operand_width_size; it conflicts with the _() macro
3063 used for internationalization.
3067 * symbols.c (symbol_find_base): Fix case insensitive symbol name
3071 * struc-symbol.h (struct broken_word): Add seg and subseg fields.
3072 * read.c (emit_expr): Initialize seg and subseg fields of a new
3074 * write.c (write_object_file): Switch to the appropriate segment
3075 and subsegment when processing a broken word.
3077 * config/tc-m68k.c (mri_assemble): New static function.
3078 (build_mri_control_operand): Call mri_assemble rather than
3080 (s_mri_else, s_mri_break, s_mri_next, s_mri_for): Likewise.
3081 (s_mri_endf, s_mri_endw): Likewise.
3085 * read.c (s_org): Call md_flush_pending_output if it is defined.
3087 * config/tc-sparc.c (md_show_usage): Add \n\ to new string.
3091 * config/tc-sparc.c (OPTION_LITTLE_ENDIAN_DATA): New.
3092 (md_parse_option): Add for same.
3093 (sparc_md_end): Set bfd_mach_sparc_sparclite_le.
3094 (md_apply_fix3, tc_gen_reloc): Allow BFD_RELOC_SPARC_32LE.
3095 (cons_fix_new_sparc): Added to create BFD_RELOC_SPARC_32LE.
3097 * config/tc-sparc.h (cons_fix_new_sparc): Added.
3101 * config/tc-arm.c (find_real_start): Relax definition of local
3106 * config/tc-d30v.c (d30v_align): Apply address adjustment to all
3107 symbols at the given address, not just the last one specified.
3111 * config/tc-sparc.c (sparc_handle_align): Use number_to_chars_bigendian
3112 or number_to_chars_littleendian to write data.
3116 * config/tc-v850.c (md_assemble): Remove artificially created
3117 register name symbols.
3121 * write.c (fixup_segment): Change "segment" to "section" in
3126 * write.c (fixup_segment): Change sym1-sym2 message again.
3130 * write.c (fixup_segment): Improve error message for sym1-sym2
3131 errors when sym1 is in a different segment from sym2.
3135 * config/tc-m32r.c (warn_unmatched_high): New static local.
3136 (OPTION_WARN_PARALLEL): Rename from OPTION_WARN.
3137 (OPTION_NO_WARN_PARALLEL): Rename from OPTION_NO_WARN.
3138 (md_longopts): Recognize --{no-,}warn-unmatched-high.
3139 (md_parse_option): Likewise.
3140 (md_show_usage): Likewise.
3141 (m32r_frob_file): Likewise.
3143 * read.c (generate_file_debug,generate_lineno_debug): New functions.
3144 (read_a_source_file): Call them.
3145 * read.h (stabs_generate_asm_file): Declare.
3146 * stabs.c (stabs_generate_asm_file): New function.
3147 (generate_asm_file): New function.
3148 (stabs_generate_asm_lineno): Move file name handling into
3153 * config/tc-d30v.c (cur_mul32_p, prev_mul32_p): Make static.
3154 (d30v_current_align, d30v_current_align_seg): New variables.
3155 (d30v_last_label): New variable.
3156 (d30v_align, s_d30v_align, s_d30v_text): New functions.
3157 (s_d30v_data, s_d30v_section): Likewise.
3158 (md_pseudo_table): Call them.
3159 (md_begin): Initialize d30v_current_align_seg.
3160 (md_assemble): Call d30v_align when needed by known current alignment.
3161 (d30v_frob_label, d30v_cons_align): New functions.
3162 * config/tc-d30v.h (md_do_align): Remove.
3163 (tc_frob_label): Call d30v_frob_label.
3164 (md_cons_align): New.
3166 * config/tc-d30v.c (find_format): Convert complex expressions to
3167 expression symbols before processing. Clean up code formatting.
3171 * po/Make-in (install-info): New target.
3175 * config/tc-mn10200.c (md_assemble): Handle "bra" just like "jmp"
3177 * config/tc-mn10300.c (md_assemble): Likewise.
3181 * Makefile.am: Update with `make dep-am'.
3182 (HFILES): Add cgen.h.
3183 (cgen.o): Depend on cgen.h.
3184 * Makefile.in: Regenerate.
3186 * cgen.c (cgen_md_apply_fix3): Don't pass newline to as_warn_where.
3190 * gasp.c (grab_label): Permit a label to be a preprocessor
3191 variable by permitting a label to start with a backslash.
3195 * config/tc-mips.c (validate_mips_insn): Removed hack
3196 for previously inaccessible bitfields in some INSN_TRAP
3201 * config/tc-d30v.c (do_assemble): Abort with error message
3202 if opcode operands do not match.
3206 * config/tc-mips.c (macro_build, validate_mips_insn): Implement
3207 'q' operand format for 20-bit "break"/"sdbbp" instructions.
3208 (mips_ip): Truncate overflowed "break" 'c' operand. Implement
3209 similar new 'q' operand.
3213 * cgen.c (cgen_asm_finish_insn): Fix typo.
3218 * cgen.c: Include it.
3219 (MAX_FIXUPS): Renamed to CGEN_MAX_FIXUPS.
3220 (cgen_asm_finish_insn): Result is now void. New arg `result'.
3221 All callers updated.
3222 * config/tc-m32r.c: Include cgen.h.
3223 (m23r_insn): New members num_fixups,fixups.
3227 * config/tc-hppa.c (md_apply_fix): Slightly rework some code
3228 to avoid compiler warning.
3232 * makefile.vms: Run dec c with /nodebug. Pass CC value when
3235 * makefile.vms (OBJS): Add ehopt.obj
3239 * doc/c-vax.texi: Correct and extend vax/vms documentation.
3243 * config/tc-d30v.c (do_assemble): Accept a new parameter requesting
3244 a short format insn.
3245 (md_assemble): Set it for explicitly packed insns.
3249 * config/obj-coff.c (c_symbol_merge): Do not take address of
3250 native fields when performing the memcpy.
3254 * config/tc-mips.c (macro,macro2): Implement
3255 M_DMULO_I, M_MULO_I, M_DMULOU_I, and M_MULOU_I.
3259 * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Changed to keep
3260 relocations against globally visible symbols.
3261 * config/tc-m68k.c (relaxable_symbol): New macro.
3262 (m68k_ip, md_estimate_size_before_relax): Use it.
3263 (tc_m68k_fix_adjustable): Also handle weak symbols.
3267 * config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Keep relocs for all
3268 references to externally visible symbols.
3269 * config/tc-i386.c (md_apply_fix3): When OBJ_ELF, don't add the
3270 values in twice for a PC relative reloc if the symbol is
3273 * config/tc-sparc.h (tc_fix_adjustable) [OBJ_AOUT]: When PIC,
3274 don't adjust a PC relative reloc against an externally visible
3276 * config/tc-sparc.c (md_apply_fix3): When generating a.out PIC,
3277 for a PC relative fixup against an externally visible defined
3278 symbol, arrange to store object file and addend values as though
3279 the symbol were not defined.
3280 (tc_gen_reloc): Likewise.
3284 * read.c (sizeof_leb128): Referenced externally by write.c so
3289 * config/tc-m32r.c ({,expand_}debug_sym): New functions to record
3290 and expand a 'debug' symbol associated with the next instruction
3291 that does not cause a short instruction to be filled with a NOP.
3292 (md_pseudo_table): Add support for .debugsym.
3293 (assemble_parallel_insn): Add calls to expand_debug_sym as
3295 (md_assemble): Ditto.
3299 * as.c (main): Conditionally call setlocale.
3300 * gasp.c (main): Likewise.
3301 * asintl.h: Include <locale.h> if HAVE_LOCALE_H.
3302 (LC_MESSAGES): Now can be defined even when ENABLE_NLS.
3306 * config/tc-d30v.c (md_show_usage): Correct gettext typo.
3310 * config/tc-hppa.c: Change all calls to bzero to use memset.
3311 (pa_ip): Add cast to avoid warning.
3312 (tc_gen_reloc, md_apply_fix): Likewise.
3313 (pa_find_space_by_number): Likewise.
3314 (hppa_force_relocation): Likewise.
3315 (pa_block): Change i to unsigned int.
3316 * config/obj-som.h (obj_som_copyright): Declare.
3320 * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno
3321 for line numbers for assembly source.
3325 * configure.in: Change version number to 2.9.4
3326 * configure: Rebuild.
3330 * cgen.c (cgen_asm_finish_insn): New arg relax_p. All callers updated.
3334 * ecoff.h: Change symbolS in function declaration to struct
3339 * config/tc-sh.c (parse_reg): Add casts to avoid warnings.
3340 (md_convert_frag): Fix i18n typo.
3344 * ecoff.c (ecoff_get_cur_proc_sym): New function.
3345 * ecoff.h: Protoype it.
3346 * config/tc-alpha.c [ELF] (s_alpha_prologue): New function.
3347 [EVAX] (s_alpha_prologue): Delete.
3348 (md_pseudo_table): Update.
3352 * config/tc-i960.c (md_assemble): Change bp_error_msg from static
3353 array to local pointer.
3354 (get_args, parse_expr): Add casts to avoid warnings.
3358 * read.c (s_set): Cast xmalloc return value to fragS *.
3359 * config/tc-m68k.c (m68k_ip): Function made static to match
3360 previous forward declaration.
3361 (insert_reg, init_regtable, md_convert_frag_1): Likewise.
3365 * config/tc-v850.c: Add internationalisation macros to error
3368 * config/tc-m32r.c (can_make_parallel): Add internationalisation
3369 macros to error strings.
3373 * config/tc-ppc.c (ppc_fix_adjustable): Correct test of whether a
3374 reloc is in the TOC csect.
3375 (md_apply_fix3): Correct gettext typo.
3379 * config/tc-arm.c (find_real_start): Ignore symbols starting with
3380 .L - they are local labels and the branches are not really
3381 function calls but rather far jumps.
3385 * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
3389 * config/tc-i386.c (md_assemble): Print operand number rather than
3390 using ordinal_names.
3391 (i386_operand): Likewise.
3395 * Makefile.am (INTLLIBS): Define to work around apparent automake
3397 All Makefiles: Regenerated.
3399 * Many files: Added gettext invocations around user-visible
3401 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
3402 HAVE_LC_MESSAGES): Define.
3403 * dep-in.sed: Added asintl.h.
3404 * po/Make-in: New file.
3405 * gasp.c (main): Call setlocale, bindtextdomain, and textdomain.
3407 * read.c (Z_): Renamed from `_'.
3408 * Makefile.am (SUBDIRS): Added po.
3409 (POTFILES): new macro.
3410 (po/POTFILES.in): New target.
3411 ($(OBJS)): Added asintl.h.
3413 (INCLUDES): Added -DLOCALEDIR, -I$(top_srcdir)/../intl.
3414 (as_new_LDADD): Added $(INTLLIBS).
3415 (as_new_DEPENDENCIES): Added $(INTLDEPS).
3416 (gasp_new_LDADD): Added $(INTLLIBS).
3417 (gasp_new_DEPENDENCIES): New macro.
3418 * configure, aclocal.m4: Rebuilt.
3419 * configure.in: Call CY_GNU_GETTEXT. Generate po/Makefile.in and
3421 (ALL_LINGUAS): Define.
3422 * macro.c: Include "asintl.h".
3423 * as.c (main): Call setlocale, bindtextdomain, and textdomain.
3424 * as.h: Include "asintl.h".
3425 * config/tc-i386.c (ordinal_names): Removed.
3426 (md_assemble): Changed error text to avoid ordinal_names.
3427 (i386_operand): Likewise.
3428 (reloc): Added as_bad to avoid i18n problems.
3429 (tc_gen_reloc): Likewise.
3430 * config/tc-arm.c (bad_args): Now a #define.
3432 * config/obj-vms.c (VMS_stab_parse): Changed type of
3434 (global_symbol_directory): Unified strings to avoid i18n
3436 * config/tc-m68k.c (get_reloc_code): Added some as_bad calls to
3437 avoid i18n problems.
3438 * config/tc-ns32k.c (reloc): Added as_bad to avoid i18n problems.
3439 * config/tc-ppc.c (md_apply_fix3): Added as_bad_where to avoid
3441 * config/tc-sh.c (md_convert_frag): Added as_bad to avoid i18n
3443 * config/tc-v850.c (md_assemble): Changed C++ comment into C
3445 * config/tc-vax.c (md_assemble): Added as_warn to avoid i18n
3447 * as.c (print_version_id): Added an fprintf to avoid i18n
3449 * cond.c (cond_finish_check): Added as_bad call to avoid i18n
3451 * expr.c (expr): Added as_warn call to avoid i18n problems.
3452 * messages.c (as_assert): Changed code to avoid i18n problems.
3453 (as_abort): Likewise.
3454 * read.c (pseudo_set): Added as_bad call to avoid i18n problems.
3455 (s_space): Likewise.
3456 * po/Make-in, po/POTFILES.in, po/gas.pot: New files.
3460 * config/tc-i386.c (check_prefix): New static function, split out
3462 (struct _i386_insn): Add wait_prefix field.
3463 (md_assemble): Remove wait_prefix local variable. Use
3464 check_prefix when adding a prefix.
3466 * config/tc-i386.c (current_templates): New static variable.
3467 (md_assemble): Remove current_templates local variable.
3468 (md_assemble, i386_operand): Improve error and warning messages in
3469 many places. Add RESTORE_END_STRING in many places before error
3470 return. Clarify some comments.
3472 * config/tc-i386.c (struct _i386_insn): Change seg field to a two
3474 (md_assemble): Parse string instruction operands, looking for
3475 segment override prefixes. Check for invalid segment prefixes on
3477 (i386_operand): i.seg[] and max mem_operand changes for string
3479 * config/tc-i386.h (EsSeg): Define.
3481 * config/tc-i386.h (regKludge): Define.
3482 (iclrKludge, imulKludge): Don't define.
3483 * config/tc-i386.c (md_assemble): Merge imulKludge and iclrKludge
3484 code. Move ReverseRegRegmem fudges into Modrm case. Reorder
3485 opcode_modifier checks to look for more common cases first. Add
3486 default_seg for IsString case.
3490 * configure.in: Call AM_PROG_LEX rather than AC_PROG_LEX and
3492 * configure: Rebuild with new automake and libtool.
3493 * aclocal.m4, Makefile.in: Likewise.
3495 * doc/Makefile.am (as.dvi): New target.
3496 * doc/Makefile.in: Rebuild.
3500 * configure.in: Added sparc86x support.
3502 * configure: Rebuild.
3504 * config/tc-sparc.c (lookup_arch): Added arch_type to struct
3506 (md_parse_option): Warn if -EL is not supported for this architecture.
3508 * config/tc-sparc.h (SPARC_BIENDIAN) Always define.
3512 * config/tc-mips.c (mips_ip): Note when we use get match on
3513 the full instruction name.
3517 * symbols.c (resolve_symbol_value) [O_symbol]: Also store the symbol
3518 back into the expression to handle add/sub simplification correctly.
3522 * config/tc-mips.c (hilo_interlocks): Remove 4300.
3526 * config/tc-arm.c (do_msr): Support undocumented 'msr cpsr_flg,
3531 * symbols.c (max_indent_level): New global.
3532 (print_symbol_value_1): Use it.
3533 * expr.h (expr_build_dot): Declare.
3534 * expr.c (expr_build_dot): New function.
3538 * symbols.c (print_binary): New function.
3539 (print_expr_1): Call it.
3543 * config/tc-m68k.c (m68k_ip, case "#B"): Install the offset of the
3544 operand in the opcode.
3548 * config/tc-i386.h: Reorder operand flags and opcode modifier
3549 flags for clarity. Remove unused definitions: Unknown,
3550 ImmUnknown, DispUnknown, NoModrm.
3551 * config/tc-i386.c (type_names): Add missing Debug type.
3552 (md_assemble): Better duplicate prefix checking. Quicker string
3553 instruction check via new opcode_modifier flag.
3557 * doc/as.texinfo (Invoking): Clarify -Wa example.
3561 * config/tc-mips.c (mips_pseudo_table): Add weakext entry.
3562 (s_mips_weakext): Define.
3563 * ecoff.c (ecoff_directive_weakext): Don't define if defined(TC_MIPS).
3564 * config/obj-ecoff.c (obj_pseudo_table): Don't add weakext if
3569 * config/tc-mn10200.c (tc_gen_reloc): The difference of two symbols
3570 is an error if the value can not be computed at assembly time.
3571 * config/tc-mn10300.c (tc_gen-reloc): Likewise.
3575 * gasp.c (main): Set next field of new include_path structure to
3578 * read.c (s_mri_sect): Call as_bad rather than abort for an
3579 unsupported MRI target.
3583 * config/tc-arm.c (arm_validate_fix): New function. Determine if
3584 the destination of a branch instruction should be altered.
3585 (find_real_start): New function: Locate the real, Thumb coded
3586 start of a Thumb function.
3587 (do_t_branch23): Alter the destination of branches to Thumb
3590 * config/tc-arm.h: Define TC_VALIDATE_FIX.
3594 * config/tc-arm.c (decode_shift): Handle addressing mode 2 w/rrx
3599 * doc/as.texinfo: Use @itemx for a secondary item in a table.
3600 * doc/c-hppa.texi: Likewise.
3604 * Makefile.am: Rebuild dependencies.
3605 * Makefile.in: Rebuild.
3607 * Makefile.am (DEP_INCLUDES): New variable.
3608 (.dep1): Change to work when srcdir is not an absolute path.
3609 (.tcdep, .objdep, .dep2, dep.sed): Likewise.
3610 * Makefile.in: Rebuild.
3614 * config/tc-i386.h, config/tc-i386.c: Revert March 24
3615 LinearAddress patch.
3617 * configure.in: Set version to 2.9.1.
3618 * configure: Rebuild.
3620 * Branched binutils 2.9.
3624 * config/tc-i386.h (FWait): Define.
3625 * config/tc-i386.c (md_assemble): Emit fwait prefix before any
3626 other prefixes. Check FWait flag in opcode table to see which
3627 instructions require an fwait prefix.
3631 * stabs.c (get_stab_string_offset): Always create a stab string
3636 Fix some gcc -Wall warnings:
3637 * atof-generic.c (atof_generic): Add casts to avoid warnings.
3638 * ehopt.c (eh_frame_code_alignment): Likewise.
3639 * expr.c (integer_constant, operand): Likewise.
3640 * frags.c (frag_align): Likewise.
3641 * gasp.c (level_0, change_base, doinstr): Likewise.
3642 * hash.c (hash_ask): Likewise.
3643 * listing.c (listing_page, calc_hex, print_lines): Likewise.
3644 (debugging_pseudo): Likewise.
3645 * macro.c (define_macro, check_macro): Likewise.
3646 * read.c (read_a_source_file, s_align, s_float_space): Likewise.
3647 (ignore_rest_of_line, float_cons): Likewise.
3648 * symbols.c (decode_local_label_name): Likewise.
3649 * write.c (record_alignment, cvs_frag_to_fill): Likewise.
3650 (fixup_segment, number_to_chars_bigendian): Likewise.
3651 (number_to_chars_littleendian): Likewise.
3652 * config/atof-ieee.c (gen_to_words): Likewise.
3653 * config/tc-sparc.c (md_begin, md_assemble): Likewise.
3654 (sparc_ip, parse_keyword_arg, s_common): Likewise.
3655 * read.c (output_big_sleb128): Initialize locals to avoid
3657 (output_big_uleb128, equals): Likewise.
3658 * atof-generic.c (atof_generic): Change number_of_digits_* locals
3659 to unsigned int. Change zeros to unsigned int.
3660 * cond.c (s_if): Add return to default case.
3661 * frags.c (frag_now_fix): Change return type to addressT.
3662 * frags.h (frag_now_fix): Update declaration.
3663 * listing.c (file_info_struct): Change linenum to unsigned int.
3664 (struct list_info_struct): Change hll_line to unsigned int.
3665 (print_source): Update format string.
3666 * read.c (emit_expr): Change scan to unsigned int, and don't
3667 bother to initialize it.
3668 * symbols.c (dollar_label_count): Change to unsigned long.
3669 * write.c (adjust_reloc_syms): Remove unused label reduce_fixup.
3670 * config/tc-sparc.c (sparc_memory_model): Only define if OBJ_ELF.
3671 * config/tc-sparc.c (tc_gen_reloc): Add return to default case.
3675 * config/tc-m68k.c (m68k_ip): Check legal addressing modes for
3676 mcf5200 just as we do for m68000.
3677 (m68k_init_after_args): Likewise.
3678 (md_estimate_size_before_relax): Likewise.
3682 * config/tc-v850.c (md_assemble): Store relocation addend in
3683 fixup instead of instruction.
3687 * config/tc-i386.c (md_assemble): Swap template arguments to
3688 CONSISTENT_REGISTER_MATCH macro in reverse direction test.
3689 This macro is currently symmetric, so passing them the wrong
3690 way didn't cause any problem, but may if the macro is changed
3692 After copying template to i.tm, use i.tm. rather than t-> to
3693 access fields, and make t a const*
3694 Move i.tm.operand_types[] swap to immediately after the copy.
3698 * expr.h (expr_build_uconstant): Add prototype.
3699 (expr_build_unary,expr_build_binary): Add prototypes.
3700 * expr.c (expr_build_uconstant): New function.
3701 (expr_build_unary,expr_build_binary): New functions.
3705 * gasp.c (IS*): Cast argument to unsigned char, not unsigned int.
3706 * macro.c (macro_expand_body): Increase buffer size.
3707 * messages.c (as_warn): Likewise.
3708 (as_warn_where, as_bad, as_bad_where): Likewise.
3713 * Makefile.am (DISTSTUFF): New variable.
3714 (diststuff): New target.
3715 * Makefile.in: Rebuild.
3719 * config/tc-m32r.h (md_cleanup, md_elf_section_change_hook): Call
3720 m32r_elf_section_change_hook.
3722 * config/tc-m32r.c (m32r_elf_section_change_hook): New function to
3723 emit a nop if a section ends with a 16 bit instruction.
3727 * config/obj-coff.c (obj_coff_bss): Compile unconditionally. Call
3728 s_lcomm rather than obj_coff_lcomm.
3729 (obj_pseudo_table): Compile .bss pseudo-op unconditionally.
3733 * config/tc-i386.h (LinearAddress): Define.
3734 * config/tc-i386.c (md_assemble): If LinearAddress is set for the
3735 instruction, don't use a default segment.
3739 * configure.in: (sh*-*-rtems*): Switched from ELF to COFF.
3740 * configure: Rebuild.
3744 * aclocal.m4, configure: Rebuild with libtool 1.2.
3748 * config/tc-arm.c (md_apply_fix3): fix code to test the range of
3749 PC relative branches. Patch courtesy of Jonathan Walton.
3754 * configure.in (emulations): Add thumb-pe target.
3756 * configure (emulations): Add thumb-pe target.
3760 * itbl-lex.l (yywrap): Don't define if already defined as a
3765 * depend.c (quote_string_for_make): New function.
3766 (wrap_output): Use it.
3770 * config/obj-elf.c (obj_elf_section): Set bss flag in seg_info
3771 structure if type is SHT_NOBITS. [Bug fix courtesy of rth]
3775 * config/tc-alpha.c (md_shortopts, md_longopts, md_parse_option):
3776 Recognize -GN and -relax.
3777 (md_begin): Initialize gp size from -G switch.
3778 (alpha_force_relocation): Always force if -relax.
3779 (alpha_align): Take a new argument that will specify when to
3780 emit an R_ALPHA_ALIGN relocation (though we don't do that now).
3781 Change all callers. Emit nop alignment padding as nop+unop pair.
3785 * config/obj-elf.c [TC_ALPHA]: Include <elf/alpha.h>.
3786 * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): New.
3790 * config/tc-d30v.c (write_2_short): Delayed jsr instructions don't
3791 require padding to the next long word boundary.
3795 * cgen.c: #include symcat.h.
3796 * config/tc-m32r.c: Likewise.
3800 * config/tc-mips.c (mips_ip, case 'P'): Make 'P' arguments be
3801 absolute expressions instead of '$' prefixed register names.
3805 * read.c (s_set): Record file and line info for symbols when -as.
3806 (pseudo_set): Don't overwrite that dummy fragment.
3810 * config/tc-ppc.c (md_pseudo_table): Add "section".
3811 (ppc_named_section): New static function.
3815 * tc-ppc.c (ppc_biei): Cache the last symbol we inserted
3816 so we don't have to scan the entire list.
3820 * config/tc-d30v.c (parallel_ok): For the explicitly parallel
3821 case, allow the parallel instructions to modify the same flag
3826 * listing.c (list_symbol_table): Categorize symbols by
3827 undefined_section rather than sy_frag->line == NULL.
3831 * Makefile.am (install-exec-local): Install properly when ln
3832 fails or tooldir == prefix.
3836 * cgen.c (cgen_md_apply_fix3): Delete call to validate_operand.
3837 Test result of insert_operand for error.
3841 * Makefile.am (AUTOMAKE_OPTIONS): Add cygnus.
3842 * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
3843 * doc/Makefile.am (AUTOMAKE_OPTIONS): Define.
3844 * doc/Makefile.in: Rebuild.
3848 * config/tc-mips.c (macro_build): Handle operand type 'C'.
3849 (macro): Fix handling of M_COP[0-3].
3854 * macro.c (ISSEP): Only treat '<' and '>' as separator characters
3855 if macro_alternate or macro_mri.
3856 (getstring): Remove support for byte constants between < and >.
3857 (get_any_string): '<' only starts a string if macro_alternate or
3859 (macro_expand_body): Permit keyword parameters following
3860 positional parameters.
3863 * configure.in (alpha*-*-netbsd*): New target.
3864 * config/te-nbsd.h (LOCAL_LABELS_FB): Define.
3865 * configure: Rebuild.
3867 * as.h (flag_warn_suppress_instructionswap): Move from here...
3868 * config/tc-d10v.c (flag_warn_suppress_instructionswap): ...to
3869 here, and make static.
3871 * ehopt.c (eh_frame_code_alignment): Only use seg_info if
3872 BFD_ASSEMBLER or MANY_SEGMENTS.
3874 * as.c (show_usage): Update bug-gnu-utils address.
3875 * gasp.c (show_usage): Likewise.
3876 * doc/as.texinfo (Bug Reporting): Likewise.
3880 * config/tc-mips.c (load_address): Don't use mips III or mips IV
3881 insns regardless of the size of a pointer if we're in mips I or
3883 (macro, macro2, s_cprestore, s_cpadd): Likewise.
3887 Fix rac to accept only a0:
3888 * tc-d10v.c (parallel_ok, find_opcode):
3889 Split OPERAND_ACC into OPERAND_ACC0 and OPERAND_ACC1.
3890 Introduce OPERAND_GPR.
3894 * read.c (s_fill): Handle non-constant repeat counts by creating
3895 an rs_space fragment.
3899 * config/tc-i386.c (i386_operand): Change error added Jan 2 1998
3900 from as_bad to as_warn.
3904 * as.c: (perform_an_assembly_pass): Use [TEXT|DATA|BSS]_SECTION_NAME
3905 * as.h: Define default values of [TEXT|DATA|BSS]_SECTION_NAME
3906 * config/obj-elf.c (elf_begin): Use [TEXT|DATA|BSS]_SECTION_NAME
3910 * ehopt.c (eh_frame_code_alignment): If not BFD_ASSEMBLER, use
3911 seg_fix_rotP rather than fix_root from seg_info.
3915 * expr.c: Add support for 0x1_2_3_4 bignums.
3919 * configure.in: Change -linux* to -linux-gnu*.
3920 * configure: Rebuild.
3922 * app.c (do_scrub_begin): Treat \r as whitespace.
3926 * Makefile.am: Update dependencies.
3927 * Makefile.in: Rebuild.
3931 * configure, aclocal.m4: Rebuild with new libtool.
3935 * config/tc-mips.c (md_begin): If mips_cpu is set, then use it as
3936 the argument to bfd_set_arch_mach.
3937 (load_address): Use bfd_arch_bits_per_address to determine the
3938 bit size of an address instead of looking at the isa level.
3939 (macro, macro2, s_cprestore, s_cpadd): Likewise.
3943 * config/tc-v850.c (md_parse_option): Add -mv850any command line option.
3947 * ehopt.c: New file.
3948 * as.h (enum _relax_state): Add rs_cfa.
3949 (check_eh_frame, eh_frame_estimate_size_before_relax): Declare.
3950 (eh_frame_relax_frag, eh_frame_convert_frag): Declare.
3951 * read.c (emit_expr): Call check_eh_frame.
3952 * write.c (cvt_frag_to_fill): Handle rs_cfa.
3953 (relax_segment): Likewise.
3954 * Makefile.am: Rebuild dependencies.
3955 (GAS_CFILES): Add ehopt.c.
3956 (GENERIC_OBJS): Add ehopt.o.
3957 * doc/internals.texi (Frags): Document rs_cfa.
3959 * as.c (show_usage): Mention --traditional-format.
3960 (parse_args): Accept --traditional-format.
3961 * as.h (flag_traditional_format): Declare.
3962 * output-file.c (output_file_create): If flag_traditional_format,
3963 set BFD_TRADITIONAL_FORMAT on stdoutput.
3964 * doc/as.texinfo, doc/as.1: Document --traditional-format.
3966 * config/tc-mips.c (append_insn): Make sure that if we have a
3967 fixup for an unmatched %hi reloc, it does not associated with a
3970 * configure, Makefile.in, aclocal.m4: Rebuild with new libtool.
3971 * doc/Makefile.in: Likewise.
3975 * config/tc-m32r.c (check_for_side_effects): New function.
3976 (can_make_parallel): Add checks for instruction side effects
3977 clashing with the other instruction.
3978 (assemble_parallel_insn): Improve warning messages. Return error
3979 message from non-swapped instruction order.
3983 * config/tc-arm.c: Rename arm_after_pass_hook() to arm_cleanup().
3985 * config/tc-arm.h: Replace md_after_pass_hook definition with a
3986 md_cleanup definition. This moves the forced literal output to
3987 the end of the source pass, and avoids macro's inserting literals
3988 into the code immediately after the macro expansion.
3992 * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: A reloc against
3993 a gas internal symbol is adjustable.
3994 * config/tc-ppc.h (tc_fix_adjustable): Likewise.
3996 * as.h: If gcc version greater than 2.6, use `__format__' and
3997 `__printf__' in function attributes, rather than `format' and
4002 * config/tc-sparc.c: Only include elf/sparc.h if OBJ_ELF.
4006 Add tms320c30 support:
4007 * config/tc-tic30.h: New file.
4008 * config/tc-tic30.c: New file.
4009 * config/obj-coff.h: If TC_TIC30, include coff/tic30.h and define
4010 TARGET_FORMAT as "coff-tic30".
4011 * configure.in (tic30-*-*aout*, tic30-*-*coff*): New targets.
4012 * Makefile.am: Rebuild dependencies.
4013 (CPU_TYPES): Add tic30.
4014 (CPU_OBJ_VALID): tic30-aout is valid.
4015 (TARGET_CPU_CFILES): Add config/tc-tic30.c.
4016 (TARGET_CPU_HFILES): Add config/tc-tic30.h.
4017 * configure, Makefile.in: Rebuild.
4021 * config/tc-v850.c (md_assemble): Improvements to error messages.
4025 * config/tc-ppc.c (md_apply_fix3): Change BFD_RELOC_HI16 and
4026 BFD_RELOC_HI16_S to store the high bits of any value.
4028 * config/tc-ppc.h (tc_fix_adjustable): Undo change of Fri Jun 27.
4029 (TC_RELOC_RTSYM_LOC_FIXUP): Don't let the
4030 assembler calculate relocations to any external symbol at all.
4031 * config/tc-ppc.c (md_apply_fix3) [OBJ_ELF]: Correct bugs
4032 involving generation of pc-relative relocs.
4033 (md_pcrel_from_section) [OBJ_ELF]: The job this code used to do
4034 has been moved to md_apply_fix3.
4036 * config/tc-ppc.c (md_apply_fix3): Fix test for too-far branch.
4037 (ppc_elf_suffix): Warn about 'identifier+constant@got' syntax,
4038 which actually means (the address of identifier's GOT entry) +
4039 constant, which is not particularly useful.
4043 * read.h (include_dirs): Declare.
4044 (include_dir_count,include_dir_maxlen): Declare.
4048 * configure.in: Correct check for shared opcodes library.
4049 * configure: Rebuild.
4051 * listing.c (buffer_line): If we can't open the file, set at_end.
4052 (listing_print): Remove unused local variable fi.
4054 * config/m68k-parse.y (reglistpair): Handle register list in
4057 * config/vms-conf.h: Don't undef VERSION.
4061 * Makefile.am (CONFIG_OBJS): New variable, containing part of old
4063 (GENERIC_OBJS): New variable, with the rest of the old OBJS
4065 (OBJS): Now just $(CONFIG_OBJS) and $(GENERIC_OBJS).
4066 ($(srcdir)/make-gas.com): Rename from make-gas.com.
4067 (stamp-mk.com): Replace $(OBJS) with $(GENERIC_OBJS).
4068 (EXTRA_DIST): Define.
4069 * vmsconf.sh: Handle {targ-cpu, obj-format, atof-targ} modules
4070 explicitly rather than via the list of object files.
4071 (gcc-as.opt): New file created when make-gas.com is run.
4072 * config-gas.com: Create {targ-cpu.h, obj-format.h, targ-env.h,
4073 itbl-cpu.h} to #include appropriate file rather than copying that
4075 * config/vms-conf.h: Synchronize with current config.in.
4076 * Makefile.in: Rebuild.
4080 * config/tc-d30v.c (do_assemble): Added flag_explicitly_parallel.
4081 (parallel_ok): Relaxed parallel subinstruction dependency check.
4085 * as.h (flag_warn_suppress_instructionswap): added new flag.
4086 * tc-d10v.c (md_parse_option,md_longopts): added "--nowarnswap"
4087 command line argument.
4088 * tc-d10v.c (write_2_short): emit "Swapping instructions"
4089 warning only if flag_warn_suppress_instructionswap is false.
4093 * configure.in (i386-*-mingw32*): New target.
4094 * configure: Rebuild.
4098 * symbols.c (resolve_symbol_value): Don't set the segment if it
4099 hasn't changed, and this is OBJ_AOUT without BFD_ASSEMBLER.
4101 * config/obj-aout.h (S_IS_LOCAL): Correct typo--pass argument to
4106 as.h (unlink): Reverse 13-Feb-97 change; use of unlink vs remove
4107 depends upon HAVE_{UNLINK,REMOVE} values rather than host
4112 * config/obj-coff.h (RESOLVE_SYMBOL_REDEFINITION): Define.
4116 * config/tc-v850.c (v850_insert_operand): Display instruction when
4117 an error is encountered.
4121 * configure.in (i386-*-sco3.2v5*): Defaults to ELF now.
4122 (i386-*-sco3.2v5*coff): New target.
4123 (i386-*-sco3.2*): New target.
4124 * configure: Rebuild.
4128 * config/tc-v850.c: Tidy error message production.
4132 * config/tc-arm.c (md_apply_fix3): Add new variable newimm to hold
4133 validate_immediate return value in the right type for comparisons
4138 * listing.c (MAX_BYTES): Use listing variables not constants.
4139 (data_buffer): No longer an array, but a pointer.
4140 (calc_hex): sizeof(data_buffer) -> MAX_BYTES.
4141 (listing_listing): Allocate data_buffer.
4145 * as.c (parse_args): Add --listing-lhs-width, --listing-lhs-width2,
4146 --listing-rhs-width, --listing-cont-lines.
4147 (show_usage): Update.
4148 * listing.c (listing_lhs_width, listing_lhs_width_second): New vars.
4149 (listing_lhs_cont_lines, listing_rhs_width): New vars.
4150 (print_lines): Use the variables instead of the constants.
4151 (listing_listing): Likewise.
4152 * listing.h: Declare the new vars.
4156 * as.c (parse_args): Add --keep-locals alias for -L.
4157 Add --strip-local-absolute.
4158 (show_usage): Update.
4159 * as.h (flag_strip_local_absolute): New flag.
4160 * symbols.c (S_IS_LOCAL): Use it.
4161 * config/obj-aout.h (S_IS_LOCAL): Likewise.
4162 * config/obj-bout.h (S_IS_LOCAL): Likewise.
4163 * config/obj-coff.h (S_IS_LOCAL): Likewise.
4167 * config/tc-m32r.c: Detect if explicitly parallel instructions
4168 might have an io conflict and issue a warning message.
4172 * cgen.c (cgen_save_fixups, cgen_restore_fixups,
4173 cgen_swap_fixups): Functions to save, restore and swap the fixup
4174 chain with a backup copy.
4175 (cgen_asm_finish_insn): Returns address of constructed insn.
4179 * listing.c (file_info_struct): Remove FILE, add POS.
4180 (last_open_file_info, last_open_file): New; a one entry FILE* cache.
4181 (file_info): Don't open the file.
4182 (buffer_line): Check for the file in the last_open cache, updating
4184 (print_source): Don't reference file_info->file.
4185 (listing_listing): Likewise.
4186 (listing_print): Close the file in the cache, if any.
4190 * read.c (dwarf_file_string): New file static variable.
4191 (emit_expr): Look for constant sequence that leads up to a file
4192 name in DWARF debugging output.
4193 (stringer): Use dwarf_file_string to decide whether to accept a
4194 string as a file name.
4198 * tc-m68k.c (m68k_ip): Remove absl->reglst MRI hack.
4199 (crack_operand): Add reg->reglst MRI hack.
4200 (r_seg): Put reglst symbols in reg_section.
4201 (m68k_frob_symbol): Frob reglst symbols into absolute_section.
4205 * tc-sh.c (get_specific): Handle SGR & DBR.
4209 * tc-h8300.c (parse_reg): Take the length of the symbol into
4210 account when attempting to match a register name.
4211 * tc-h8500.c (parse_reg): Likewise.
4215 * cgen.c: Formatting changes to improve readability.
4219 * config/tc-mips.c (macro): Rework division code to avoid unfilled
4224 Based on a patch from Jim Wilson
4225 * config/tc-d30v.c (do_assemble): Remove non-ansi default case.
4226 (tc_gen_reloc): Handle cross section PC relative relocs
4231 * config/tc-mips.c (mips_ip): Don't test pinfo flags if INSN_MACRO.
4235 * cgen.c: #include setjmp.h. Clean up pass over `struct foo' usage.
4236 (expr_jmp_buf): New static local.
4237 (cgen_parse_operand): Allow use of longjmp in parsing to handle errors.
4238 (cgen_md_operand): New function.
4239 * tc-m32r.c: Clean up pass over `struct foo' usage.
4240 (md_estimate_size_before_relax): Use CGEN_INSN_MNEMONIC.
4244 * symbols.c (S_SET_SEGMENT): Don't set the segment for section syms.
4245 (S_IS_EXTERNAL, S_IS_LOCAL): Correct parenthetication.
4249 * config/tc-i386.c (i386_operand): Give an error if there are
4250 unrecognized characters after an expression.
4252 For older changes see ChangeLog-9697