diff options
author | obrien <obrien@FreeBSD.org> | 2001-05-28 05:21:37 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-05-28 05:21:37 +0000 |
commit | 328e45595b12375b6d16a846069507d25086abdb (patch) | |
tree | ae2a6f4f4987889b7bd2af7bdf0b86fa580df011 /contrib/binutils/gas | |
parent | 7fbb72605a1c3bcb81f8b6bb6297ffef30f84335 (diff) | |
download | FreeBSD-src-328e45595b12375b6d16a846069507d25086abdb.zip FreeBSD-src-328e45595b12375b6d16a846069507d25086abdb.tar.gz |
Import of GNU Binutils version 2.11.0.
Believe it or not, this is heavily stripped down.
Diffstat (limited to 'contrib/binutils/gas')
109 files changed, 30006 insertions, 18930 deletions
diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog index ce918a5..7f6a629 100644 --- a/contrib/binutils/gas/ChangeLog +++ b/contrib/binutils/gas/ChangeLog @@ -1,5849 +1,4565 @@ -2000-11-02 Theo Honohan <th@futuretv.com> - - * config/tc-arm.c (do_msr): Improve error message. +2001-04-02 Philip Blundell <philb@gnu.org> -2000-11-01 Philip Blundell <philb@gnu.org> - - From 2000-08-01 Nick Clifton <nickc@cygnus.com> - * config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag. + From 2001-03-17 Richard Henderson <rth@redhat.com> + * dwarf2dbg.c (user_filenum, user_filenum_allocated): Remove. + (dwarf2_directive_loc): Don't use them. + (dwarf2_directive_file): Reject duplicate file definitions. + (get_filenum): Zero allocated memory. + (out_file_list): Complain about missing file definitions. -2000-10-16 Philip Blundell <pb@futuretv.com> +2001-03-31 Alan Modra <alan@linuxcare.com.au> - * configure.in: Set version number to 2.10.1. - * configure: Regenerate. + * listing.c (listing_listing): Enable listing on EDICT_NOLIST_NEXT + for one line if not already enabled. + * cond.c (s_elseif): Correct conditional assembly listing. + (s_else): Likewise. -2000-10-14 Philip Blundell <philb@gnu.org> + * cond.c (s_endif): Correct handling of "if .. elseif .." trees. + Don't abort on NULL current_cframe. - From 2000-06-17 Mark Elbrecht <snowball3@bigfoot.com> +2001-03-30 Richard Henderson <rth@redhat.com> - * config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER - to BFD_ASSEMBLER. + * write.c (relax_seg, size_seg): Split from relax_and_size_seg. + (write_object_file): Relax code then data, then size sections. -2000-09-08 Philip Blundell <philb@gnu.org> + * config/tc-i386.c (md_convert_frag): Don't die on local symbols + that have been finalized. - * config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when - offset is negative. +2001-03-28 Alan Modra <alan@linuxcare.com.au> -2000-08-30 Matthew Jacob <mjacob@feral.com> + * config/tc-hppa.c (DEFAULT_LEVEL): Define. + (md_begin): Use it when setting default architecture. - * config/tc-alpha.c (md_undefined_symbol): Properly understand that - $at is the integer register $r28, vs. both $r28 and the floating - point register $f28. +2001-03-27 Hans-Peter Nilsson <hp@axis.com> -2000-04-14 Matthew Green <mrg@cygnus.com> - - * configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support. + * configure.in (cris-*-*): Change default emulation to criself. + (cris-*-*aout*): New rule. * configure: Regenerate. -2000-06-09 Nick Clifton <nickc@cygnus.com> +2001-03-19 Alan Modra <alan@linuxcare.com.au> - * config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value - for size 1 fixes. + * config/tc-i386.c (md_assemble <REGISTER_WARNINGS>): Correct + used register name. -2000-06-01 Scott Bambrough <scottb@netwinder.org> +2001-03-18 Stephane Carrez <Stephane.Carrez@worldnet.fr> - * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly. + * config/tc-m68hc11.c (md_pseudo_table): Recognize xrefb to comply + with 'Motorola specification for assembly language input standard'. -2000-05-22 David O'Brien <obrien@FreeBSD.org> +2001-03-18 Dave Brolley <brolley@redhat.com> - * configure.in: Recognize alpha-*-freebsd*. - * configure: Regenerate. + * config/tc-m32r.c (expand_debug_syms): Call frag_align_code rather + than m32r_do_align. -2000-05-26 Scott Bambrough <scottb@netwinder.org> +2001-03-16 Philip Blundell <philb@gnu.org> - Port of patch to mainline by Nick Clifton <nickc@cygnus.com>: - * config/tc-arm.c (struct asm_psr): Add boolean field - distinguishing between CSPR and SPSR. Rename 'number' field - to 'field'. - (psrs): Rearrange contents to match new asm_psr structure. - (arm_psr_parse): Move next to psr_required_here. Make it - return an asm_psr structure. - (psr_required_here): Use asm_psr structure returned by - arm_psr_parse. - (do_msr): Reorganise to allow psr_required_here to be called - only once. - (md_undefined_name): Mark 'name' parameter as unused, since - the COFF target does not use it. - - Port of patch to mainline by Nick Clifton <nickc@cygnus.com>: - * testsuite/gas/arm/arch4t.s: Add tests of new fields - to msr instruction. - - * NEWS: Mention change in behaviour when assembling msr - instruction. - -2000-04-24 Nick Clifton <nickc@cygnus.com> - - * doc/c-arm.texi (ARM Directives): Document behaviour of .align 0. - * doc/as.texinfo (Align): Include arm and strongarm in list of - targets that have the second form of the behaviour of the .align - directive. - -2000-05-29 Philip Blundell <philb@gnu.org> - - * doc/as.texinfo: Update copyright dates. - (Local Labels): Delete misplaced mention of ARM. - * NEWS: Mention ARM ELF support. - -Tue May 23 00:57:05 2000 Hans-Peter Nilsson <hp@axis.com> - - * configure.in (i386-*-freebsd a.out entry): Quote properly. * configure: Regenerate. -2000-05-23 Philip Blundell <pb@futuretv.com> +2001-03-15 David Mosberger <davidm@hpl.hp.com> - * configure.in: Set version to 2.10. - * configure: Regenerate. + * config/tc-ia64.c (md): New member keep_pending_output. + (ia64_flush_pending_output): Flush only if md.keep_pending_output + is not set. + (dot_xdata): Turn on md.keep_pending_output for the duration of + this function. + (dot_xfloat_cons): Ditto. + (dot_xstringer): Ditto. + (dot_xdata_ua): Ditto. + (dot_xfloat_cons_ua): Ditto. -2000-05-23 Alan Modra <alan@linuxcare.com.au> +2001-03-15 Jim Wilson <wilson@redhat.com> - * config/tc-i386.c (md_assemble): Pass jump reloc in fr_var... - (md_estimate_size_before_relax): so we can use it here instead of - old kludges. Localise vars to blocks. Comment. + * config/tc-ia64.c (ia64_unrecognized_line, case '['): Add local + label support. - * frags.c (frag_new): Update fr_var comments. - * frags.h (struct frag): Ditto. +2001-03-11 Philip Blundell <philb@gnu.org> - * config/tc-i386.c (tc_i386_fix_adjustable): Prevent adjustment - for OBJ_MAYBE_ELF too. Use S_IS_EXTERNAL instead of S_IS_EXTERN. - (md_estimate_size_before_relax): Ensure jumps to weak and - externally visible symbols are relocatable. + * configure.in: Set version to 2.11. -2000-05-14 David O'Brien <obrien@FreeBSD.org> +2001-02-28 Andreas Jaeger <aj@suse.de>, Bo Thorsen <bo@suse.de> - * config/te-freebsd.h: New file. + * config/tc-i386.c (tc_gen_reloc): Remove ugly hack which is not needed + anymore since we use bfd_elf_generic_reloc now. + (md_apply_fix3): Only apply hack for partial_inplace if not using RELA. - * doc/as.1: Fix unbalanced brackets. +2001-02-21 David Mosberger <davidm@hpl.hp.com> - * config/tc-i386.c (comment_chars): Don't use '/' as comment start if - TE_FreeBSD. - (line_comment_chars): Set to '/' if TE_FreeBSD. + * config/tc-ia64.c (enum operand_match_result): New type. + (operand_match): Change return type to operand_match_result. + Fix all returns appropriately, adding support for returning the + out-of-range result. + (parse_operands): New locals result, error_pos, out_of_range_pos, + curr_out_of_range_pos. Rewrite operand matching loop to give better + error messages. -1999-07-03 Joel Sherrill <joel@OARcorp.com> +2001-02-21 David Mosberger <davidm@hpl.hp.com> - * configure.in (*rtems except sh): Move RTEMS targets to elf. - * configure: Regenerate. + * config/tc-ia64.c (struct unwind): Add member "prologue_count". + (dot_proc): Clear unwind.prologue_count to zero. + (dot_prologue): Increment unwind.prologue_count. + (dot_restore): If second operand is omitted, use + unwind.prologue_count -1 for "ecount" (# of additional regions to + pop). Decrement unwind.prologue_count by number of regions + popped. -2000-05-08 Alan Modra <alan@linuxcare.com.au> +2001-02-20 Bo Thorsen <bo@suse.de> - * as.h: #include "file", not <file> on files from ../include. - (as_abort, as_fatal): Add ATTRIBUTE_NORETURN. - * config/tc-m68k.c (m68k_ip): Fix signed/unsigned warnings. - (md_convert_frag): Add ATTRIBUTE_UNUSED. - (tc_coff_symbol_emit_hook): Ditto. - (OPTCOUNT): Cast to int to avoid compiler warning. - (md_begin): Fix signed/unsigned warnings. + * config/tc-i386.c (tc_i386_fix_adjustable): Fix GOTPCREL GOT + entry. -2000-05-08 Michael Sokolov <msokolov@ivan.Harhan.ORG> +001-02-18 David O'Brien <obrien@FreeBSD.org> - * config/tc-m68k.c (md_convert_frag_1): Abort if we end up in the - ABRANCH LONG case for a conditional branch on a 68000. - (md_estimate_size_before_relax): Likewise. Also handle - flag_short_refs correctly for ABRANCH, BCC68000, and DBCC. - (m68k-ip: case ABSL): Relax absolute references to 16-bit - PC-relative on all CPUs. - (md_estimate_size_before_relax): Likewise. + * configure.in (cpu_type, arch): Add a generic FreeBSD specification as + all FreeBSD platforms should look the same at this level. + * configure: Rebuilt. + * config/tc-i386.c: Add support for old FreeBSD a.out hosts. + +2001-02-14 Philip Blundell <pb@futuretv.com> + + From 2001-02-06 H.J. Lu <hjl@gnu.org> + * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): Do fixup if + there is no relocation. + + From 2001-02-06 H.J. Lu <hjl@gnu.org> + * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): New. Defined. + * config/tc-ia64.c (md_parse_option): Only accept the valid + ia64 options on "-axxx". + +2001-02-13 Alan Modra <alan@linuxcare.com.au> + + * expr.c (operator): Don't bump input_line_pointer for two char + operators. Instead return operator size via new param num_chars. + (expr): Use above to parse multi-char operators correctly. -2000-05-04 Alan Modra <alan@linuxcare.com.au> +2001-02-12 Philip Blundell <pb@futuretv.com> - * as.c (parse_args): Just mention current year in printed - copyright message. + * config/tc-arm.c (do_ldst): Improve warnings for unpredictable + ldrt/strt instructions. -2000-05-03 Ian Lance Taylor <ian@zembu.com> +Mon Feb 12 17:44:08 CET 2001 Jan Hubicka <jh@suse.cz> - * config/atof-ieee.c (gen_to_words): When adding carry back in, - don't permit lp to become less than the words array. + * tc-i386.c (i386_displacement): Fix handling of + BFD_RELOC_X86_64_GOTPCREL. + (i386_validate_fix): Likewise. -2000-05-03 David O'Brien <obrien@NUXI.com> +2001-02-09 David Mosberger <davidm@hpl.hp.com> - * as.c (parse_args): Update copyright. + * config/tc-ia64.h (md_elf_section_type): New macro. + (ELF_TC_SPECIAL_SECTIONS): Drop .IA_64.unwind and .IA_64.unwind_info + (they're now handled via ia64_elf_section_type. -2000-05-03 Mark Elbrecht <snowball3@bigfoot.com> + * config/tc-ia64.c (unwind): New members saved_text_seg, + saved_text_subseg, and force_unwind_entry. + (optimize_unw_records): New function to optimize away unnecessary + unwind directives. + (ia64_elf_section_type): New function. + (output_unw_records): Generate unwind info only if the size is + non-zero or if it's forced for some other reason (e.g., + handlerdata or a personality routine). + (generate_unwind_image): Don't switch back to previous + section---stay inside the unwind info section instead so that + handlerdata that may follow goes into the right place. + (dot_handlerdata): Force generation of unwind entry and save the + current active text segment before generating unwind image. + (dot_unwentry): Force generation of unwind entry. + (dot_personality): Ditto. + (dot_endp): Generate unwind table entry only if there is + some unwind info or the unwind entry was forced. - * gas/config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 - for the .bss section too. + * config/tc-ia64.c (make_unw_section_name): New macro to form + unwind section name. + (generate_unwind_image): Add "text_name" argument. Use it to + form unwind section name. + (dot_handlerdata): Determine current segment (section) name and + pass it to generate_unwind_image(). + (dot_endp): Determine current segment (section) name and use + it to determine the appropriate unwind section name. + (ia64_md_do_align): Add missing ATTRIBUTE_UNUSED declarations to + n, fill, and max arguments. -2000-04-29 Andreas Jaeger <aj@suse.de> +2001-02-09 Alexandre Oliva <aoliva@redhat.com> - * as.h: Correctly check GCC version. + * config/tc-sh.c (md_pseudo_table): Add uaquad. Use s_uacons for + 2byte, 4byte and 8byte. -2000-04-20 Alexandre Oliva <aoliva@cygnus.com> +2001-02-08 Alan Modra <alan@linuxcare.com.au> - * config/tc-mn10300.c (HAVE_AM30): Define. - (md_assemble): Use it. + * config/tc-hppa.c (pa_build_unwind_subspace): Don't call + md_number_to_chars with size > sizeof (valueT). -2000-04-19 Alan Modra <alan@linuxcare.com.au> +2001-02-05 Jim Wilson <wilson@redhat.com> - * Makefile.am: (CPU_MULTI_VALID): Remove. - (MULTI_CPU_TYPES): Define. - (MULTI_CPU_OBJ_VALID): Define. - (DEPTC): Use the above. - (DEPOBJ): Same here. - (DEP2): And here. - Regenerate dependencies. - * Makefile.in: Regenerate. + * config/tc-ia64.c (errata_nop_necessary_p): Return 0 instead of + aborting for invalid operands. -2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG> +2001-02-06 Alan Modra <alan@linuxcare.com.au> - * Makefile.am (YACC, LEX): Get them from configure. + * config/tc-hppa.c (fix_new_hppa): Pass in unwind directly rather + than via pointer. Update all callers. + (UNWIND_LOW32): Define. + (UNWIND_HIGH32): Define. + (pa_build_unwind_subspace): Use the above macros instead of dumping + bitfields directly. Call frag_more once rather than multiple times. + (md_assemble): Use UNWIND_LOW32. + (pa_entry): Likewise + (pa_procend): Likewise. + (process_exit): Use UNWIND_HIGH32. - * as.h (SEEK_SET): Define if undefined. +2001-02-04 Stephane Carrez <Stephane.Carrez@worldnet.fr> -2000-04-09 Nick Clifton <nickc@cygnus.com> + * config/tc-m68hc11.h (LISTING_HEADER): Use m68hc11_listing_header + function to select the header according to the cpu. + (md_after_pass_hook, md_do_align): Remove. + (md_cleanup, m68hc11_cleanup): Remove. + (md_pcrel_from_section): Declare. + * config/tc-m68hc11.c (build_dbranch_insn): Remove insn_size. + (build_jump_insn, build_insn): Likewise. + (m68hc11_listing_header): New function. + (m68hc11_cleanup): Remove. + +2001-02-02 Stephane Carrez <Stephane.Carrez@worldnet.fr> + + * config/tc-m68hc11.c (relaxable_symbol): Relax externally visible + symbols because there is no support for shared libraries and these + symbols can't be overridden (unless they are weak). + +2001-02-01 Momchil Velikov <velco@fadata.bg> - * Makefile.am (CPU_TYPES): Add 'avr'. - (TARGET_CPU_CFILES): Add 'tc-avr.c'. - (TARGET_CPU_HFILES): Add 'tc-avr.h'. + * dwarf2dbg.c (out_debug_abbrev): Terminate the abbreviations + for the compilation unit with a zero byte. + +2001-01-30 Alan Modra <alan@linuxcare.com.au> + + * config/tc-hppa.c (pa_ip): Support 12 bit branches to absolute + destinations. Correct range check for 17 and 22 bit branches. + +2001-01-25 Nick Clifton <nickc@redhat.com> + + * config/tc-m68k.c (tc_gen_reloc): Do not abort if tcbit is + still set. Issue an error message instead. + (md_estimate_size_before_relax): Delete unused variable + 'buffer_address'. Fixup parentheses around if statement. + +2001-01-23 Kazu Hirata <kazu@hxi.com> + + * as.c: Fix formatting. + * ehopt.c: Likewise. + * messages.c: Likewise. + * stabs.c: Likewise. + * symbols.c: Likewise. -2000-04-05 Alexandre Oliva <oliva@lsd.ic.unicamp.br> +2001-01-23 Ben Elliston <bje@redhat.com> - * config/tc-sparc.c (sparc_ip): Avoid string pasting. + * config/tc-m32r.c (m32r_handle_align): Declare type of fragp. -2000-04-04 Alan Modra <alan@linuxcare.com.au> +2001-01-22 Kazu Hirata <kazu@hxi.com> - * po/gas.pot: Regenerate. + * config/tc-alpha.c: Fix formatting. - * as.c (show_usage): Restore translated part of bug string. - * gasp.c (show_usage): Likewise. +2001-01-19 Kazu Hirata <kazu@hxi.com> - * Makefile.am (MKDEP): Use gcc -MM rather than ../mkdep. - (DEP): Quote when passing vars to sub-make. Use "mv -f" rather - than move-if-change. - (DEP1): Modify for "gcc -MM". - (DEPTC): Likewise. - (DEPOBJ): Likewise. - (DEP2): Likewise. - (CLEANFILES): Add DEPTCA, DEPOBJA, DEP2a, DEPA. - Update dependencies. - * Makefile.in: Regenerate. + * config/tc-alpha.c: Fix formatting. -2000-04-04 Alexandre Oliva <aoliva@cygnus.com> +2001-01-18 Kazu Hirata <kazu@hxi.com> - * config/tc-mn10300.c (md_pseudo_table): Use constant names. - (md_begin): Likewise. - (HAVE_AM33): New macro. - (md_assemble): Use it. Match r_regs and xr_regs only if - HAVE_AM33. + * config/tc-alpha.c: Fix formatting. -2000-04-03 Alan Modra <alan@linuxcare.com.au> +2001-01-18 Nick Clifton <nickc@redhat.com> - * as.h: #include "bin-bugs.h" - * as.c (show_usage): Use REPORT_BUGS_TO. - * gasp.c: #include "bin-bugs.h" - (show_usage): Use REPORT_BUGS_TO. + * config/tc-arm.c (ldm_flags): Remove redundant bit from "fa" and + "da" flags. + (stm_flags): Remove redundant bit from "ed" and "da" flags. - * config/tc-sparc.c (md_show_usage): Add a trailing newline. +2001-01-18 Alexandre Oliva <aoliva@redhat.com> -2000-04-03 Alan Modra <alan@linuxcare.com.au> + * configure.in (cpu_type, arch): Match i386 too. + * configure: Rebuilt. - * config/tc-i386.c (i386_immediate): Don't assume a constant - immediate is necessarily 16 bits when in 16 bit code mode. - (md_assemble): Instead set guess_suffix here after we have checked - registers. +2001-01-16 Kazu Hirata <kazu@hxi.com> -2000-04-02 Richard Henderson <rth@cygnus.com> + * config/tc-i386.c: Fix formatting. - * config/tc-d30v.c (check_range): Allow signed or unsigned 32-bit - quantities. Correct right shift sign extension. - (build_insn): Make `number' unsigned long. Mask top 6 bits of - 32-bit value when shifting into place. +2001-01-16 Alan Modra <alan@linuxcare.com.au> -2000-04-01 Ian Lance Taylor <ian@zembu.com> + * config/tc-hppa.c (tc_gen_reloc): Use SEGREL32 instead of DIR32 + relocs for .PARISC.unwind section. - * app.c: Add ATTRIBUTE_UNUSED as needed. - * config/tc-ppc.c: Likewise. - (ppc_size): Make unsigned long. - (ppc_insert_operand): Add casts to avoid warnings. + * config/tc-hppa.c (pa_build_unwind_subspace): Build unwind + depending on section flags, not just for .text. -2000-03-31 Nick Clifton <nickc@cygnus.com> +2001-01-15 Jim Wilson <wilson@redhat.com> - * config/tc-d10v.h (md_flush_pending_output): Define. + * config/tc-ia64.c (ia64_flush_insns): Handle unwind directives + not immediately followed by an instruction. -2000-03-29 Nick Clifton <nickc@cygnus.com> - - * config/tc-sh.h (SEG_NAME): New macro: return the name of a - segment. Works for both BFD_ASSEMBLER and others. - (SUB_SEGMENT_ALIGN): Use SEG_NAME. - -2000-03-29 Nick Clifton <nickc@cygnus.com +2001-01-15 Kazu Hirata <kazu@hxi.com> - * config/tc-arm.c (tinsns): Add "bal" instruction pattern. + * config/tc-m68hc11.c: Fix formatting. -2000-03-28 Alan Modra <alan@linuxcare.com.au> +2001-01-15 Nick Clifton <nickc@redhat.com> - * listing.c (LISTING_LHS_WIDTH): Default depends on - LISTING_WORD_SIZE. - (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH. + * symbols.c (colon): Change 'already defined symbol' from a + fatal error to an ordinary error. There is no reason why this + error should be fatal. -2000-03-27 Ian Lance Taylor <ian@zembu.com> + * message.c (as_fatal): Delete output file, if one has been + created. - * config/tc-sh.c (md_show_usage): Use backslash before newline in - string literal. +2001-01-14 Alan Modra <alan@linuxcare.com.au> -2000-03-27 Alan Modra <alan@linuxcare.com.au> + * config/tc-hppa.h (TARGET_FORMAT): Add hppa-linux variants. - * config/tc-avr.h (TC_HANDLES_FX_DONE): Define. +2001-01-14 Kazu Hirata <kazu@hxi.com> - * config/tc-avr.c (mcu_types): Add missing initialiser. - (md_pcrel_from_section): Add prototype. - (avr_operand): Remove redundant test of unsigned < 0. - (avr_cons_fix_new): Ensure exp_mod_pm zero on function exit. + * config/tc-alpha.c: Fix formatting. + * config/tc-arc.c: Likewise. + * config/tc-arc.h: Likewise. + * config/tc-d10v.c: Likewise. + * config/tc-i370.c: Likewise. + * config/tc-i386.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-sparc.c: Likewise. + * config/tc-tahoe.c: Likewise. + * config/tc-vax.c: Likewise. -2000-03-27 Denis Chertykov <denisc@overta.ru> + * config/tc-arc.c: Fix formatting. - * config/tc-avr.c: New file for AVR support. - * config/tc-avr.h: Likewise. - * configure.in: Add AVR support. - * configure: Regenerate. + * config/tc-arc.c: Fix formatting. -2000-03-26 Timothy Wall <twall@cygnus.com> +2001-01-14 Alan Modra <alan@linuxcare.com.au> - * gasp.c (macro_op): Add new argument to check_macro call. - Macro structure definitions moved to macro.h - * sb.h: Add argument to prototype for input_scrub_include_sb. - * input-scrub.c (input_scrub_include_sb): Allow disabling of sb - nesting checks with an additional flag. - (struct input_save): Add flag to indicate whether current sb - should be checked for proper macro/conditional nesting. - (input_scrub_push/pop): Save/restore nest check flag. - (input_scrub_next_buffer): Ditto. Also call end of macro hook if - defined. - * macro.c (check_macro): Allow caller to retrieve parsed macro - information if a pointer is provided. This information may be - used by the new macro hooks. - * macro.h: Update prototype for check_macro. Macro struct - definitions moved here from macro.c/gasp.c. - * read.c (read_a_source_file): Add parameter to check_macro call, - and pass macro info to the macro hook, if defined. - (input_scrub_insert_line): New. Allow insertion of a line of - characters into the input stream. - (input_scrub_insert_file): New. Allow insertion of an arbitrary - file into the input stream. - (s_include): Use input_scrub_insert_file. - * internals.texi: Document new macro hooks. - * as.h: New prototypes added. - -2000-03-26 Alan Modra <alan@linuxcare.com.au> + * config/tc-hppa.c (pa_build_unwind_subspace): Use SEGREL32 for + both 32 and 64 bit ELF. - * config/tc-i386.c: Don't start any as_bad or as_warn message with - an initial capital letter. - (i386_index_check): Reindent. + * config/tc-hppa.c (pa_ip): Store `a' flag in bit zero of operand + and don't bother storing `m' for "ce" completer. Tidy handling of + 'J' and 'K' operands to suit. Handle '<' and '>' operands. -2000-03-19 Nick Clifton <nickc@cygnus.com> +Sun Jan 14 00:36:42 MET 2001 Jan Hubicka <jh@suse.cz> - * config/tc-arm.c (md_apply_fix3): Fix bug detectng overflow of pc - relative branches. + * tc-i386.h (TARGET_MACH): New macro. + (i386_mach): Declare. + * tc-i386.c (i386_mach): New function. -2000-03-17 Thomas de Lellis <tdel@windriver.com> +2001-01-13 Philip Blundell <philb@gnu.org> - * config/tc-arm.c (do_t_adr): Flag "adr Rd,label" - instruction operand bad if Rd > 7 when generating - thumb instructions. Prevents for example, - "adr r12,label" from silently failing and generating - the wrong instruction. - -2000-03-17 Nick Clifton <nickc@cygnus.com> + * doc/as.texinfo: Fix spelling and cross-references. - * config/tc-arm.c (md_apply_fix3): Handle same-section relocations - that have a destingation >= 0x400000. - Fix compile time warning messages. + * doc/c-arm.texi: Fix typos. Say that `;' is a line separator + character for all systems, not just GNU/Linux. Make it explicit + that `-k' doesn't affect code generation, just ELF flags. -Thu Mar 16 23:45:16 2000 J"orn Rennecke <amylaar@cygnus.co.uk> +Sat Jan 13 01:47:35 MET 2001 Jan Hubicka <jh@suse.cz> - * config/tc-sh.c (md_begin): When encountering insn that are - not supported by the current arch, only change the name if - its contents are the same as prev_name. - (get_specific): If the the architecture doesn't match, fail. + * config/tc-i386.c (md_assemble): Check cpu_flags even for nullary + instructions. -Thu Mar 16 21:18:13 2000 J"orn Rennecke <amylaar@cygnus.co.uk> +2001-01-12 Frank Ch. Eigler <fche@redhat.com> - * config/tc-sh.c (IDENT_CHAR): Define. - (parse_reg): Use it instead of isalnum. Put r[0..7]_bank operand - matching back where it came from. + * cgen.c (gas_cgen_finish_insn): Call dwarf2_emit_insn. -Thu Mar 16 20:58:10 2000 J"orn Rennecke <amylaar@cygnus.co.uk> +2001-01-12 Nick Clifton <nickc@redhat.com> - * config/tc-sh.c (md_show_usage): Add description of -dsp. + * as.c (print_args): Update copyright date to 2001. -2000-03-15 Jonathan Larmour <jlarmour@redhat.co.uk> +2001-01-12 Peter Targett <peter.targett@arccores.com> - * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before - normal operands. + * doc/c-arc.texi: New file. + Some sections to be expanded. -2000-03-15 Kazu Hirata <kazu@hxi.com> +2001-01-12 Alan Modra <alan@linuxcare.com.au> - * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate. + * config/tc-i386.c (md_longopts): Recognize "--64" only for ELF. + (md_parse_option): Always accept "--32". -Mon Mar 13 22:02:59 2000 Hans-Peter Nilsson <hp@axis.se> +2001-01-11 Peter Targett <peter.targett@arccores.com> - * expr.c (operand) [case 'f']: When testing if '0f' can start a - floating-point-number, make sure 'f' is in FLT_CHARS. + * as.h (TC_ARC): Ensure struc-symbol.h included. + * as.c (dwarf2dbg.h): Include to remove implicit declaration + warnings. + * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Define. + (TARGET_SYMBOL_FIELDS) added. -Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson <hp@axis.se> + * doc/Makefile.am (CPU_DOCS): Added c-arc.texi. + * doc/c-arc.texi: New file. + Some sections to be expanded. + * doc/as.texinfo: Update command-line options. + Removed outdated text for ARC dependant features, instead include + text from above file. - * read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition. - (s_lcomm_internal): Use it. - * doc/internals.texi (CPU backend): Document it. - * config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3 - bytes. + * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Define local flag. + (TARGET_SYMBOL_FIELDS): Alias to previous definition. + (targ-cpu.h) header. + * config/tc-arc.h: + * config/tc-arc.c: New updated configuration for + ARC, including selection of core variants, and extensibility of + instructions, registers etc. through directives. -2000-03-10 Geoffrey Keating <geoffk@cygnus.com> + * config/tc-arc.c (arc_extinst): Minor corrections for + error messages. + (arc_common) Likewise. Make alignment argument optional for local + symbols also, with default of zero. - * config/tc-mips.c (mips_ip): Don't put stuff in .rodata - when embedded-pic. +2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr> - * config/tc-mips.c (SWITCH_TABLE): The ELF embedded-pic - implementation doesn't have special handling for switch - statements. - (macro_build): Allow for code in sections other than .text. - (macro): Likewise. - (mips_ip): Likewise. - (md_apply_fix): Do pc-relative relocation madness for MIPS ELF. - Don't perform relocs if we will be outputting them. - (tc_gen_reloc): For ELF, just use fx_addnumber for pc-relative - relocations. Allow BFD_RELOC_16_PCREL_S2 relocs when - embedded-pic. + * config/tc-m68hc11.c (md_estimate_size_before_relax): Fix + STATE_INDEXED_OFFSET when the symbol is undefined (16-bit offset). + (build_indexed_byte): Don't relax indexed byte, use 16-bit offset + and fix_new_exp() instead. + (md_convert_frag): For indexed post byte use the symbol value + rather than the displacement. + (md_relax_table): Fix indexed offset relax. -2000-03-09 Catherine Moore <clm@cygnus.com> - - * config/tc-m32r.c (m32r_fix_adjustable): Look up the - relocation type based on the entry in the fixup structure. +2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr> -2000-03-08 H.J. Lu (hjl@gnu.org) + * config/tc-m68hc11.c (md_estimate_size_before_relax):Don't + relax weak symbols. + (relaxable_symbol): New function. - * Makefile.am (install-exec-tooldir): Depend on - install-exec-bindir for parallel make. - * Makefile.in: Regenerated. +2001-01-11 Andreas Jaeger <aj@suse.de> -2000-03-06 Nick Clifton <nickc@cygnus.com> + * config/tc-i386.h (TC_RELOC_GLOBAL_OFFSET_TABLE): Removed, it's + not used anywhere. - * config/tc-m32r.c (struct md_longopts): Add -m32r command line - switch. - (md_parse_option): Parse -m32r command line switch - disable m32rx - compatability. - (md_show_usage): Document new option. +2001-01-10 Nick Clifton <nickc@redhat.com> - * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi. - * doc/Makefile.in: Regenerate. - * doc/c-m32r.texi (M32R-Opts): Document new command line switch. + * config/tc-arm.c (arm_fix_adjustable): Define for OBJ_COFF. + * config/tc-arm.h (obj_fix_adjustable): Define for OBJ_COFF -2000-03-02 Michael Meissner <meissner@redhat.com> +2001-01-10 Nick Clifton <nickc@redhat.com> - * config/tc-d30v.c (check_range): Remove code that incorrectly - sign extended values where bits < 32. + * symbols.c (DOLLAR_LABEL_CHAR): New constant - the magic + character used to dollar local symbols. + (LOCAL_LABEL_CHAR): New constant - the magic character used to + local label symbols. + (dollar_label_name): Use DOLLAR_LABEL_CHAR. + (fb_label_name): Prefix local labels with LOCAL_LABEL_PREFIX, + if defined. + Use LOCAL_LABEL_CHAR. + (decode_local_label_name): Skip LOCAL_LABEL_PREFIX. + Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR. + (S_IS_LOCAL): Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR. -2000-03-02 H.J. Lu (hjl@gnu.org) +2001-01-08 Bo Thorsen <bo@suse.de> - * configure.in: Support --enable-targets=all on ia32. - * configure: Regenerated. + * config/tc-i386.c (i386_immediate, i386_displacement): + GOTPCREL check fix. -2000-03-01 Nick Clifton <nickc@cygnus.com> +2001-01-07 Ian Lance Taylor <ian@zembu.com> - * gasp.c (do_align): Remove bogus check of alignment value. + * doc/c-i386.texi (i386-Arch): Remove spaces incorrectly inserted + in last change. -2000-02-27 Thomas de Lellis <tdel@windriver.com> +2001-01-07 Philip Blundell <philb@gnu.org> - * config/obj-elf.c (elf_frob_symbol): Remove code which when - TC_PPC was defined forced the type of a symbol with no other type - to be BSF_OBJECT. + * doc/as.texinfo (Bug Reporting): Update email address for + reports. + * README: Likewise. -2000-02-27 Hans-Peter Nilsson <hp@axis.com> +Sat Jan 6 13:33:10 MET 2001 Jan Hubicka <jh@suse.cz> - * doc/internals.texi (CPU backend): Mention that - line_separator_chars do not break up comments. Fix typos for - LEX_AT and LEX_NAME descriptions. Document operands for - TC_EQUAL_IN_INSN, md_operand and md_section_align. Correct - description of md_create_short_jump usage. Document argument for - md_undefined_symbol. + * configure.in: Define DEFAULT_ARCH for i386. + * tc-i386.c (md_assemble): Return after the error message; + move testing for 64bit operands to proper place. -2000-02-27 Jakub Jelinek <jakub@redhat.com> +2001-01-06 Jan Hubicka <jh@suse.cz>, Andreas Jaeger <aj@suse.de> - * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option. - (md_parse_option): Handle it. - (md_show_usage): Document it. + * doc/as.texinfo: Document '#' as comment character for i386 and + x86_64. Add AMD x86-64 into menu of machine dependent information. -2000-02-27 Ian Lance Taylor <ian@zembu.com> + * doc/c-i386.texi: Document x86_64 extensions. - * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an - opcode, for the instruction `pal19'. From Andrea Arcangeli - <andrea@suse.de>. +Fri Jan 5 13:26:42 MET 2001 Jan Hubicka <jh@suse.cz> -2000-02-26 Alan Modra <alan@spri.levels.unisa.edu.au> + * tc-i386.c (md_assemble): Handle third byte of the opcode as prefix. - * config/tc-i386.c (i386_immediate): Move constant operand sizing - from here.. - (md_assemble): To here, before template operands are matched. - Also ensure a constant immediate is sign extended when we know the - size is at most 16 bits. This is to catch cases like "add - $0xffc0,%ax" where we don't know the size, and thus that the - immediate can be represented as Imm8S until after parsing the - register operand. - (i386_displacement): Similarly sign extend 16 bit constant - displacements. - (md_assemble): Relax 16-bit jump constant range check to suit sign - extended displacements. - -2000-02-26 Andreas Jaeger <aj@suse.de> - - * doc/c-mips.texi (MIPS Opts): Fix typo in last patch. +Thu Jan 4 22:25:26 MET 2001 Jan Hubicka <jh@suse.cz> -2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au> + * tc-i386.c (cpu_arch): Add Pentium4 and modify sledgehammer entry. + * NEWS: Add note about Pentium4 support. - * config/tc-i386.c (md_assemble): Don't swap intersegment jmp and - call operands when intel_syntax. - (intel_float_operand): Return 2 for "fi...". - (i386_operand_modifier): Change "DWORD PTR" test to suit above. - Return SHORT_MNEM_SUFFIX for "WORD PTR" when "fi...". Revert - earlier "SHORT" change. - (md_assemble): When determining suffix from Regs, exclude - InOutPortReg. +Wed Jan 3 17:26:32 MET 2001 Jan Hubicka <jh@suse.cz> -2000-02-24 Nick Clifton <nickc@cygnus.com> + * tc-i387.c (pi, pte, pt): Update. + (type_names): Add new types. - * configure: Add arm-wince, mips-pe and sh-pe targets. - * configure: Regenerate. - - * config/obj-coff.h (COFF_WITH_PE): Define for mips-pe and - sh-pe targets. - (TARGET_FORMAT): Set to "pe-shl" for the sh-pe target and to - "pe-mips" for the mips-pe target. +Wed Jan 3 16:26:52 MET 2001 Jan Hubicka <jh@suse.cz> - * config/tc-arm.c (insns): Change displacement encoded in BL - and B instructions if the target port is arm-wince. - (do_ldst): Do not bias the relocation offset if the target - port is arm-wince. - (md_pcrel_from): Add in missing relocation offset bias if the - target os arm-wince. + * tc-i386.h (CpuK6, CpuAthlon, CpuSledgehammer, CpuMMX, Cpu3dnow, + CpuUnknown): Renumber + (CpuP4, CpuSSE2): New. + (CpuUnknownFlags): Add CpuP4 and CpuSSE2 - * config/tc-mips.c (mips_target_format): Support COFF flavour. - (md_begin): Disable -G support for mips-pe target. - (md_apply_fix): Treat BFD_RELOC_RVA reloc as BFD_RELOC_32. - * config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Add support for - COFF flavour. +2001-01-03 Philip Blundell <pb@futuretv.com> - * config/tc-sh.c (md_begin): sh-pe target is little endian. - * config/tc-sh.h (SUB_SEGMENT_ALIGN): If using a BFD - assembler, just set the alignment to 4. + * config/tc-alpha.c (alpha_force_relocation): Handle vtable + relocs. + (alpha_fix_adjustable): Likewise. + (md_apply_fix): Likewise. - * config/te-wince-pe.h: New file for WinCE targets. Define - TE_WINCE. +2000-12-31 H.J. Lu <hjl@gnu.org> -2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au> + * listing.c (listing_message): Allocate string only if it is + used. - * config/tc-i386.c (md_assemble): Swap segments too for intel mode - string instructions. - (i386_operand_modifier): Set i.suffix = WORD_MNEM_SUFFIX for SHORT. - (i386_intel_memory_operand): After finding a segment override, - check again for no `[' before looking for a displacement. Bomb if - more than one displacement rather than silently discarding the - second and subsequent ones. Free strings malloc'd by - build_displacement_string. + * configure: Rebuild. -2000-02-24 Catherine Moore <clm@cygnus.com> +2000-12-31 Hans-Peter Nilsson <hp@bitrange.com> - * config/obj-som.c (obj_pseudo_table): Add "weak". - (obj_som_weak): New routine. + * doc/internals.texi (Relaxing with a table) <after relaxation>: + Point out caveats with generating fixups for the opcode in a frag. -2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au> +Sat Dec 30 19:02:48 MET 2000 Jan Hubicka <jh@suse.cz> - * config/tc-i386.c (union i386_op): New. - (struct _i386_insn): Delete disps[], imms[], regs[]. Add op[]. - Throughout file replace occurences of disps[n], imms[n], regs[n] - with equivalent op[n].disps, op[n].imms, op[n].regs. Simplify - intel mode operand swapping. Add assert in regKludge and - fake_zero_displacement code. Test i.types[n] when outputting - displacements and immediates. Combine output of Disp16 with - Disp32. - (md_assemble): Don't try to fix broken UNIXWARE_COMPAT opcodes - when in intel mode by (not) reversing fsub and fdiv operands - before the template search. This fails for single operand - shorthand forms of the instruction, and if UNIXWARE_COMPAT is - undefined. Instead fix the base_opcode after we've found the - template. Move base_opcode xor with found_reverse_match from - opcode output code to before this fix so we test for the correct - opcodes. - (md_assemble): Don't use strcmp when deciding to ignore the suffix - check in intel mode. Instead compare opcodes. + * configure.in: Add support for x86_64 and x86_64-*-linux-gnu* + * NEWS: Add x86_64. - * config/tc-i386.h (TC_RELOC): Delete. - * config/tc-i386.c (TC_RELOC): Delete. Replace usage of TC_RELOC - with equivalent call to reloc. +2000-12-29 H.J. Lu <hjl@gnu.org> - * as.h (flag_m68k_mri): Move declaration after target include, and - only declare when TC_M68K defined. Define as zero otherwise. - (LABELS_WITHOUT_COLONS, NO_PSEUDO_DOT): If undefined, define as 0. - * app.c (scrub_m68k_mri): Declare only when TC_M68K defined. - Define as zero otherwise. - (do_scrub_begin): Use m68k_mri parameter only when TC_M68K defined. - (struct app_save): Declare scrub_m68k_mri only when TC_M68K. - (app_push, app_pop): Save scrub_m68k_mri only when TC_M68K. - (do_scrub_chars): Use LABELS_WITHOUT_COLONS directly rather than - testing whether defined. - * cond.c (ignore_input): Use NO_PSEUDO_DOT directly. - * expr.c (operand): #ifdef unused case labels when TC_M68K undefined. - * read.c: Use LABELS_WITHOUT_COLONS and NO_PSEUDO_DOT directly - rather than testing whether defined. - (s_mri): Set flag_m68k_mri only when TC_M68K defined. - (parse_mri_cons): Declare and use only when TC_M68K. - * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define as 1. - * config/tc-m68k.h (NO_PSEUDO_DOT): Define as 1. - * config/tc-m88k.h (NO_PSEUDO_DOT): Define as 1. + * listing.c (calc_hex): Print the variable part only if the + fragment type is rs_fill. - * NEWS: Mention IBM 370 support. +2000-12-29 Hans-Peter Nilsson <hp@bitrange.com> -2000-02-23 Richard Henderson <rth@cygnus.com> + * doc/internals.texi (tc_conditional_pseudoop, + TC_LINKRELAX_FIXUP): Fix typos. - * config/tc-i386.c (md_assemble): When swapping operands for - intel_syntax, assume everything that's not Imm or Disp is a - register. +2000-12-28 Richard Henderson <rth@redhat.com> -2000-02-23 Linas Vepstas <linas@linas.org> + * write.c (subsegs_finish): Fix thinko last change -- don't + "optimize" the alignment == 0 case. - * config/tc-i370.c, config/tc-i370.h: New files. - * Makefile.am: Add support for Linux/IBM 370. - * configure.in: Likewise. - * app.c (do_scrub_begin): Don't lex single quote when TC_I370. - * config/obj-elf.c: Include elf/i370.h - (obj_elf_section): Don't do anything special for flag_mri if TC_I370. +2000-12-28 Richard Henderson <rth@redhat.com> - * Makefile.in: Regenerate. - * configure: Regenerate. + * as.h (rs_align_test): New. + * frags.c (NOP_OPCODE): Move default from read.c. + (MAX_MEM_FOR_RS_ALIGN_CODE): New default. + (frag_align_code): New. + * frags.h (frag_align_code): Declare. + * read.c (NOP_OPCODE): Remove. + (do_align): Use frag_align_code. + * write.c (NOP_OPCODE): Remove. + (get_recorded_alignment): New. + (cvt_frag_to_fill): Handle rs_align_test. + (relax_segment): Likewise. + (subsegs_finish): Align last subseg in section to the + section alignment. Use frag_align_code. + * write.h (get_recorded_alignment): Declare. + * config/obj-coff.c (size_section): Handle rs_align_test. + (fill_section, fixup_mdeps): Likewise. + (write_object_file): Use frag_align_code. + + * config/tc-alpha.c (alpha_align): Use frag_align_code. + (alpha_handle_align): New. + * config/tc-alpha.h (HANDLE_ALIGN): New. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + + * config/tc-i386.h (md_do_align): Use frag_align_code. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + + * config/tc-ia64.c (ia64_md_do_align): Don't do code alignment. + (ia64_handle_align): New. + * config/tc-ia64.h (HANDLE_ALIGN): New. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + + * config/tc-m32r.c (m32r_do_align): Remove. + (m32r_handle_align): New. + (fill_insn): Use frag_align_code. + * config/tc-m32r.h (md_do_align): Remove. + (HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New. + * config/tc-m88k.c, config/tc-m88k.h: Similarly. + * config/tc-mips.c, config/tc-mips.h: Similarly. + + * config/tc-sh.c (sh_cons_align): Use rs_align_test. + (sh_handle_align): Likewise. Handle rs_align_code. + (sh_do_align): Remove. + * config/tc-sh.h (md_do_align): Remove. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + + * config/tc-sparc.c (sparc_cons_align): Use rs_align_test. + (sparc_handle_align): Likewise. Handle rs_align_code. + * config/tc-sparc.h (md_do_align): Remove. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + +2000-12-22 DJ Delorie <dj@redhat.com> + + * config/tc-d10v.c (md_assemble): set prev_seg and prev_subseg + when we assemble the first half of a pair. + +2000-12-22 H.J. Lu <hjl@gnu.org> + + * config/tc-i386.c (reloc): Update the macro for non-bfd + assembler. + (BFD_RELOC_X86_64_GOTPCREL): Set to 0 for non-bfd assembler. + +2000-12-22 H.J. Lu <hjl@gnu.org> + + * dwarf2dbg.c (dwarf2_finish): Remove #if BFD_ASSEMBLER. + +Wed Dec 20 14:21:22 MET 2000 Jan Hubicka <jh@suse.cz> + + * tc-i386.h (i386_target_format): Define even for ELFs. + (QWORD_MNEM_SUFFIX): New macro. + (CpuK6,CpuAthlon,CpuSledgehammer, Cpu64, CpuNo64, CpuUnknownFlags): + New macros + (CpuMMX,CpuSSE,Cpu3dnow, CpuUnknown): Renumber. + (IgnoreSize, DefaultSize, No_?Suf, FWait, IsString, regKludge, IsPrefix, + ImmExt): Renumber. + (Size64, No_qSuf, NoRex64, Rex64): New macros. + (Reg64, Imm32S, Imm64, Disp32S, Disp64): New macros. + (Imm8, Imm8S, Imm16, Imm32, Imm1, BaseIndex, Disp8, Disp16, Disp32, + InOutPortReg,ShiftCount, Control, Debug, Test, FloatReg, FloatAcc, + SReg2, SReg3, Acc, JumpAbsolute, RegMMX, RegXMM, EsSeg, InvMem): + Renumber. + (Reg, WordReg): Add Reg64. + (Imm): Add Imm32S and Imm64. + (EncImm): New. + (Disp): Add Disp64 and Disp32S. + (AnyMem): Add Disp32S. + (RegRex, RegRex64): New macros. + (rex_byte): New type. + * tc-i386.c (set_16bit_code_flag): Kill. + (fits_in_unsigned_long, fits_in_signed_long): New functions. + (reloc): New parameter "signed"; support x86_64. + (set_code_flag): New. + (DEFAULT_ARCH): New macro; default to "i386". + (default_arch): New static variable. + (struct _i386_insn): New fields Operand_PCrel; rex. + (flag_16bit_code): Kill; All tests replaced to "flag_code == CODE_64BIT" + (flag_code): New enum and static variable. + (use_rela_relocations): New static variable. + (flag_code_names): New static variable. + (cpu_arch_flags): Default to CpuUnknownFlags|CpuNo64. + (cpu_arch): Add "sledgehammer"; Add CPUAthlon to Athlon and CpuK6 to + K6 and Athlon. + (i386_align_code): Return plain "nop" for x86_64. + (mode_from_disp_size): Support Disp32S. + (smallest_imm_type): Support Imm32S and Imm64. + (offset_in_range): Support size of 8. + (set_cpu_arch): Do not clobber to Cpu64/CpuNo64. + (md_pseudo_table): Add "code64"; use set_code_flat. + (md_begin): Emit sane error message on hash failure. + (tc_i386_fix_adjustable): Support x86_64 relocations. + (md_assemble): Support QWORD_MNEM_SUFFIX, REX registers, + instructions supported on particular arch just partially, + output of 64bit immediates, handling of Imm32S and Disp32S type. + (i386_immedaite): Support x86_64 relocations; support 64bit constants. + (i386_displacement): Likewise. + (i386_index_check): Cleanup; support 64bit addresses. + (md_apply_fix3): Support x86_64 relocation and rela. + (md_longopts): Add "32" and "64". + (md_parse_option): Add OPTION_32 and OPTION_64. + (i386_target_format): Call even for ELFs; choose between + elf64-x86-64 and elf32-i386. + (i386_validate_fix): Refuse GOTOFF in 64bit mode. + (tc_gen_reloc): Support rela relocations and x86_64. + (intel_e09_1): Support QWORD. - * doc/c-i370.texi: New file. - * doc/all.texi: Include it. - * doc/as.texinfo: And here. - * doc/Makefile.am(CPU_DOCS): Add c-i370.texi. - * doc/Makefile.in: Regenerate. +2000-12-15 Diego Novillo <dnovillo@redhat.com> -2000-02-19 Michael Meissner <meissner@redhat.com> + * config/tc-i386.c (intel_e09_1): Only flag as a memory operand if + it's not an offset expression. + (intel_e10_1): Ditto. Also, if the operand is an offset expression, + keep the braces '[' and ']' in the output string. + (intel_e11): Ditto. Also remove comparison intel_parser.op_modifier + != FLAT. There is no such op_modifier. - * config/tc-d30v.c (parallel_ok): Use FLAG_NOT_WITH_ADDSUBppp to - determine if an instruction can be used in parallel with an ADDppp - or SUBppp instruction. +2000-12-14 Michael Sokolov <msokolov@ivan.Harhan.ORG> -2000-02-22 Andrew Haley <aph@cygnus.com> + * dwarf2dbg.c: If we don't have <limits.h>, try including <sys/param.h> + if we have it. - * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64. +2000-12-13 Kazu Hirata <kazu@hxi.com> -1999-12-30 Andrew Haley <aph@cygnus.com> + * as.h: Fix formatting. + * cgen.h: Likewise. + * dwarf2dbg.c: Likewise. + * input-scrub.c: Likewise. + * read.h: Likewise. - * config/tc-mips.c (mips_gp32): New variable. - (macro_build) Use mips_gp32. - (mips_ip): Ditto. - (md_longopts): Add "-mgp32" and "-mgp64". - (md_parse_option): Add OPTION_GP32 and OPTION_GP64. - -2000-02-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br> +2000-12-13 Mark Elbrecht <snowball3@bigfoot.com> - * config/obj-coff.c (add_lineno): Accept non-positive lineno with - warning, and bump it to 1. + * configure.in (i386-*-msdosdjgpp): Set bfd_gas to yes. + configure: Regenerate. -2000-02-22 Ian Lance Taylor <ian@zembu.com> +2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG> - From Brad Lucier <lucier@math.purdue.edu>: - * dwarf2dbg.c (print_stats): Add cast to force printf argument to - match format. + * dwarf2dbg.c: #include <limits.h> only if it exists. -2000-02-21 Catherine Moore <clm@cygnus.com> +2000-12-13 Rodney Brown <RodneyBrown@mynd.com> - * config/tc-mips.c (MF_HILO_INSN): Define. - (mips_7000_hilo_fix): Declare. - (append_insn): Conditionally insert nops after an mfhi/mflo insn. - (md_parse_option): Check for 7000_HILO_FIX options. - (OPTION_M7000_HILO_FIX): Define. - (OPTION_NO_M7000_HILO_FIX): Define. - * doc/c-mips.texi (-mfix7000): Describe. + * config/tc-hppa.c (pa_ip): Correct CHECK_FIELD typo. + (md_apply_fix): Here too. -2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-12-12 Jim Wilson <wilson@redhat.com> - * listing.c (print_lines): Remove unused variable `end'. + * config/tc-ia64.h (ia64_init): Add prototype. - * config/tc-i386.c (md_assemble): Use `reloc()' to select reloc - type for JumpInterSegment output. Use enum bfd_reloc_code_real for - reloc_type when BFD_ASSEMBLER. - (md_estimate_size_before_relax): Use enum bfd_reloc_code_real for - reloc_type when BFD_ASSEMBLER. Move common code out of switch - statement and quell signed vs. unsigned comparison warning. +2000-12-12 H.J. Lu <hjl@gnu.org> -2000-02-18 Nick Clifton <nickc@cygnus.com> + * dwarf2dbg.c: Enabled only if BFD_ASSEMBLER is defined. - * config/tc-d10v.c (find_opcode): Add a symbol's value to - the computed frag offset, rather than overwriting it. + * read.h (outputting_stabs_line_debug): Change it to int. + * stabs.c (outputting_stabs_line_debug): Likewise. -Thu Feb 17 00:11:08 2000 J"orn Rennecke <amylaar@cygnus.co.uk> +2000-12-12 Geoffrey Keating <geoffk@redhat.com> - * config/tc-sh.c ("elf/sh.h"): Include. - (sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables. - (md.begin): Initialize target_arch. - Only include opcodes in has table that match selected architecture. - (parse_reg): Recognize register names for sh-dsp. - (parse_at): Recognize post-modify addressing. - (get_operands): The leading space is now optional. - (get_specific): Remove FDREG_N support. Add support for sh-dsp - arguments. Update valid_arch. - (build_Mytes): Add support for SDT_REG_N. - (find_cooked_opcode): New function, broken out of md_assemble. - (assemble_ppi, sh_elf_final_processing): New functions. - (md_assemble): Use find_cooked_opcode and assemble_ppi. - (md_longopts, md_parse_option): New option: -dsp. - * config/tc-sh.h (elf_tc_final_processing): Define. - (sh_elf_final_processing): Declare. + * config/obj-bout.c (obj_crawl_symbol_chain): Don't take + the address of a function result. -Fri Feb 11 14:21:51 2000 Jeffrey A Law (law@cygnus.com) +2000-12-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> - * config/tc-hppa.c (pa_build_unwind_subspace): Use subseg_new to create - the unwinder subspace. Save the current seg/subseg before creating - the new seg/subseg. + * config/tc-ppc.c (md_pseudo_table): Add .file and .loc. + (md_assemble): Call dwarf2_emit_insn. + (shlib): Fix typo SHILB -> SHLIB. + (md_parse_option): Likewise. + (ppc_elf_validate_fix): Likewise: + * config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): New. -2000-02-10 Nick Clifton <nickc@cygnus.com> +2000-12-12 Nick Clifton <nickc@redhat.com> - * config/tc-mcore.c (INST_BYTE0): Redefine to handle big and - little endian targets. - (INST_BYTE1): Redefine to handle big and little endian - targets. - (cpu_type): New type: Select between M340 and M210. - (parse_psrmod): New function: Parse the PSRCLR and PSRSET - instructions of the M340. - (md_assemble): Add support for the MULSH and OPSR classes of - instructions. - (md_atof): Add support for little endian targets. - (md_parse_option): Add support for -EL, -EB and -mcpu command - line switches. - (md_convert_frag): Add support for little endian targets. - (md_apply_fix3): Add support for little endian targets. - (md_number_to_chars): Add support for little endian targets. + * cgen.h: Fix formatting. + * input-scrub.c: Fix formatting. + * macro.c: Fix formatting. + * config/tc-mips.c: Fix formatting. + * doc/c-mips.texi: Fix formatting. -2000-02-10 Timothy Wall <twall@redhat.com> +Mon Dec 11 14:35:42 MET 2000 Jan hubicka <jh@suse.cz> - * read.c (read_a_source_file): If TC_START_LABEL_WITHOUT_COLON is - defined, use it to verify the symbol just read should be a label. + * tc-i386.c (md_assemble): Refuse 's' and 'l' suffixes in the intel + mode; convert 'd' suffix to 's' or 'l'; remove all DWORD_MNEM_SUFFIX + references. + (intel_e09_1): Convert QWORD to 'l' suffix for FP operations; refuse + otherwise. + * tc-i386.h (DWORD_MNEM_SUFFIX): Kill. + (No_dSuf): Kill. -2000-02-10 Timothy Wall <twall@redhat.com> + * i386.h (*_Suf): Remove No_dSuf. + (d_suf, wld_Suf,sld_Suf, sldx_Suf, bwld_Suf, d_FP, sld_FP, sldx_FP) + Remove. + (i386_optab): Remove 'd' in the suffixes. - * app.c (do_scrub_chars): Handle "||" for parallel instructions - when DOUBLEBAR_PARALLEL is defined. Avoid stripping whitespace - around colons when KEEP_WHITE_AROUND_COLON is defined. - * doc/internals.texi (CPU backend): Document DOUBLEBAR_PARALLEL - and KEEP_WHITE_AROUND_COLON. +2000-12-06 Mark Elbrecht <snowball3@bigfoot.com> -2000-02-08 Timothy Wall <twall@redhat.com> + * config/tc-i386.c (T_SHORT): Undefine before defining. - * read.c (s_rept): Call do_repeat, which abstracts the repeat - logic. - (do_repeat): New. Abstract repeat logic so that a "break" can be - implemented. - (end_repeat): New. Provide support for a "break" out of the - repeat loop. - * read.h: Add prototypes for new functions. - -2000-02-08 Timothy Wall <twall@redhat.com> +2000-12-05 Kazu Hirata <kazu@hxi.com> - * doc/internals.texi: Document NUMBERS_WITH_SUFFIX macro. - * as.h: Provide a default NUMBERS_WITH_SUFFIX definition (zero). - * expr.c: Handle numbers with suffixes if NUMBERS_WITH_SUFFIX is - non-zero. - -2000-02-08 Timothy Wall <twall@redhat.com> + * config/tc-mips.c: Fix formatting. - * read.c: Added elseif to directives table. - * read.h: Added prototype for s_elseif. - * doc/as.texinfo: Added description for elseif. - * cond.c (s_elseif): New function - -2000-02-04 Timothy Wall <twall@redhat.com> +2000-12-04 Matthew Hiller <hiller@redhat.com> - * listing.c (print_lines): Remove conditionals causing bug in - listings. + * config/tc-d10v.c (flag_allow_gstabs_packing): New variable. + (md_longopts): New options --gstabs-packing, --no-gstabs-packing. + (md_show_usage): Ditto. + (md_parse_option): Ditto. + (d10v_cleanup): Writes pending instruction only if + ! outputting_stabs_line_debug || ! flag_allow_gstabs_packing. + Fix compile time warning messages. -2000-02-03 Timothy Wall <twall@cygnus.com> - - * as.h: Define OCTETS_PER_BYTE and OCTETS_PER_BYTE_POWER - default values. - * frags.c (frag_new): Calculate fr_fix in octets - (frag_now_fix) Return offset as target address offset (bytes). - (frag_now_fix_octets) New - Return offset in octets (8-bit - quantities). - * frags.h: Added prototype for frag_now_fix_octets(). - Distinguish between octets and bytes in field descriptions. - * listing.c (calc_hex): Account for octets vs bytes when - printing addresses/offsets. - (print_lines) Ditto. Also, if LISTING_WORD_SIZE is not 1, and - target is little-endian, print the octets in a word in big-endian - order so that the display looks like a proper hexadecimal number, - instead of having the octets reversed. - * read.c (do_align): When recording alignment, alignment power - should be in terms of target bytes (minimum addressible unit) - instead of octets. - (do_org) Convert ORG target address (byte) argument into an - octet offset when generating a variable fragment. - * symbols.c (resolve_symbol_value): Symbol final value - converted to a target address offset (bytes) from its octet offset. - * config/obj-coff.c (coff_frob_symbol): Symbol target address - offset (bytes) is adjusted by the frag offset (octets) converted - to bytes. - (coff_frob_section) Section alignment power is in terms of bytes; - convert it to an octet alignment power when calculating size (and - size mask) in octets. Don't modify the section size in order to - "align" it for TI COFF, since that format has a different method - for storing alignment information. - -2000-02-01 Timothy Wall <twall@cygnus.com> - - * stabs.c (generate_asm_file): Escape backslashes in stabs file - entries, matching the way GCC generates them. If not escaped, the - filename is encoded incorrectly. - -2000-01-31 Nick Clifton <nickc@cygnus.com> - * config/tc-arm.c (reg_table): Add support for ATPCS register - naming conventions. + * doc/c-d10v.texi: Documents new options. -2000-01-31 Geoff Keating <geoffk@cygnus.com> - - * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if - already defined. - * config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES): - New macro. - * config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag - of a symbol when we really care about its value. - -2000-01-19 Chandra Chavva <cchavva@cygnus.com> +2000-12-04 Matthew Hiller <hiller@redhat.com> - * config/tc-mcore.c (md_assemble): Give warning message if - operands passes to instruction are more than the spec. - -2000-01-27 Thomas de Lellis <tdel@windriver.com> - - * config/tc-arm.c (armadjust_symtab): If the assembler is in - Thumb mode but the label seen was not declared as '.thumb_func' - then set the ST_INFO type to STT_ARM_16BIT mode. This allows - correct disassembly of Thumb code bounded by non function labels. + * stabs.c (outputting_stabs_line_debug): New variable. + (stabs_generate_asm_lineno): Set outputting_stabs_line_debug at + function entry and unset at function exit. -2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> + * read.h (outputting_stabs_line_debug): New extern declaration. - * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c - Add dependencies for e-i386aout.o. Fix 2 comment lines. + * as.c: Include dwarf2dbg.h for definition of dwarf2_finish. - * Makefile.in: Same here. - Update copyright. + * dwarf2dbg.c: Fix compile time warning messages. - * configure.in: Set bfd_gas for i386-aout when primary target - is bfd. Handle i386aout emulation. Don't use te_file=multi, as - we may need the primary te_file. Remove incorrect comment. +2000-12-03 Kazu Hirata <kazu@hxi.com> + * config/tc-a29k.c: Fix formatting. + * config/tc-alpha.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-cris.c: Likewise. + * config/tc-hppa.c: Likewise. + * config/tc-i370.c: Likewise. + * config/tc-i386.c: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-m68hc11.c: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-m88k.c: Likewise. + * config/tc-pj.c: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-sparc.c: Likewise. + * config/tc-tahoe.c: Likewise. + * config/tc-vax.c: Likewise. + +2000-12-01 Chris Demetriou <cgd@sibyte.com> + + * config/tc-mips.c (mips_ip): When calculating offsets, + don't accept as constant the difference between the + addresses of symbols in two different sections. + + * config/tc-mips.c (macro_build): Add new 'U' and 'J' operand + specifiers. + (validate_mips_insn): Likewise. Also, update 'B' operand + specifier to use OP_*_CODE20 constants and delete 'm' operand + specifier. + (mips_ip): Remove 'm' operand specifier, add 'U' and 'J' + operand specifiers. Change warning generated by 'B' operand + specifier to reflect its new multi-purpose usage. + + * config/tc-mips.c (mips_set_options): Use ISA_UNKNOWN rather than + -1, and update comment. + (file_mips_isa): Likewise. + (mips_cpu): Use CPU_UNKNOWN rather than -1, and update comment. + (ISA_HAS_COPROC_DELAYS, ISA_HAS_64BIT_REGS, gpr_interlocks): Use + ISA_* constants rather than hard-coded numbers. + (mips_cpu_info): New structure. + (mips_cpu_info_table): New table describing CPU and ISA names + and numbers. + (mips_cpu_info_from_name, mips_cpu_info_from_isa, + mips_cpu_info_from_cpu): New functions. + (mips_isa_to_str): New function to get string for ISA name. + (mips_cpu_to_str): Convert to use mips_cpu_info_from_cpu, and + return const char *. + (md_begin): Redo CPU and ISA selection logic, using + mips_cpu_info_from_*. Convert to use ISA_* constants rather + than hard-coded numbers. + (append_insn, mips_emit_delays, macro, macro2): Convert to use + ISA_* constants rather than hard-coded numbers. + (mips_ip): Convert to use mips_isa_to_str to get ISA name. + (md_longopts): Delete OPTION_NO_MIPS32. + (md_parse_option): Convert to use ISA_* constants rather than + hard-coded numbers. Make OPTIONS_MIPS32 case treat MIPS32 + as an ISA. Delete OPTION_NO_MIPS32 case. Convert OPTION_MCPU + to use strcasecmp to recognize "default" and to use + mips_cpu_info_from_name to get CPU numbers from argument. + (md_show_usage): Move -mips32 so it's with the rest of the ISA + flags. Change 4Kc, 4Kp and 4Km CPU entries to just be + mips32-4k. + (s_mipsset): Accept ISA value 32. + * doc/as.texinfo: Clean up MIPS options summary slightly, + remove -no-mips32. Add note about -mips4 and -mips32 + specifying those ISA levels. Delete -mips32 and -no-mips32 + cpu flag descriptions. + * doc/c-mips.texi: Add -mips32 to list of ISA switches. Clean + up the supported CPU switch list, and replace 4Kc, 4Km, and + 4Kp entries with a single mips32-4k entry. Note that you can + use ".set mips32". + + * tc-mips.c (ISA_HAS_64BIT_REGS): Add checks for ISA_MIPS5 and + ISA_MIPS64. + (md_longopts, OPTION_MIPS5, OPTION_MIPS64): Add options for + -mips5 and -mips64. + (md_parse_option): Add cases for OPTION_MIPS5 and + OPTION_MIPS64. + (md_show_usage): Mention -mips5 and -mips64 arguments. + (s_mipsset): Add cases for MIPS5 and MIPS64. + (mips_cpu_info_table): Add entries for MIPS5 and MIPS64 ISAs + and pseudo-CPUs. + * doc/as.texinfo: Mention -mips5 and -mips64 options + and their meanings. + * doc/c-mips.texi: Likewise. Also update introduction + and ".set" usage information. + + * config/tc-mips.c (md_show_usage): Add "sb1" to the + CPU list. + (mips_cpu_info_table): Add SB-1 entries. + * doc/c-mips.texi: Add "sb1" to the list of CPUs + known to the -mcpu option. + + * doc/as.texinfo: Correct description of MIPS -mcpu + option, by copying some of the text from doc/c-mips.texi. + +2000-12-01 Joel Sherrill <joel@OARcorp.com> + + * configure.in (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*): + New targets. + (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets. + (sparc*-*-rtems*): Switched from a.out to ELF. * configure: Regenerate. + * config.in: Regenerate. + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * po/gas.pot: Regenerate. - * config/e-i386aout.c: New file. - - * as.c (USE_EMULATIONS): Move to before print_version_id. - (struct emulation): Add i386aout. - (show_usage): Split text strings. Reformat -a text. Add --em - help. - Update copyright. - - * obj.h (struct format_ops): Add s_get_other and s_get_desc. - (aout_format_ops): New. - Update copyright. - - * read.c (s_lcomm_internal): Rewrite OBJ_AOUT,OBJ_BOUT - preprocessor conditional and add aout USE_EMULATIONS tests. - (read_a_source_file): Don't pass error strings to printf as - format arg. - Update copyright. - - * gasp.c (exp_get_abs): Don't pass error strings to printf as - format arg. - (do_data): Same here. - (process_file): And here. - Update copyright. +2000-11-30 Philip Blundell <pb@futuretv.com> - * symbols.c (colon): Rewrite "already defined" fatal message - code for aout with USE_EMULATIONS. - Update copyright. + * config/obj-coff.c (obj_coff_weak): Use S_SET_WEAK if it exists, + even in non BFD_ASSEMBLER case. - * config/obj-aout.c (OBJ_HEADER): Define. - (obj_pseudo_table): Rename to aout_pseudo_table. Init all - fields of sentinel. - (obj_aout_frob_symbol): Expand S_GET_DESC, S_GET_TYPE, - S_GET_OTHER, S_SET_TYPE macros since we don't need obj-multi - forms here. - (obj_aout_type): Expand S_SET_OTHER here too. - (obj_read_begin_hook): Remove. - (aout_pop_insert): New. - (obj_aout_s_get_other): New. - (obj_aout_s_get_desc): New. - (aout_format_ops): New. - Update copyright. +2000-11-30 Diego Novillo <dnovillo@redhat.com> - * config/obj-aout.h (obj_pop_insert): Define so non-multi usage - gets aout_pseudo_table. - (aout_pseudo_table): Declare. - (obj_read_begin_hook): Define. - Update copyright. + * tc-i386.c (md_assemble): Swap i.disp_relocs when using intel + syntax. - * config/obj-coff.c (obj_pseudo_table): Rename to - coff_pseudo_table. - (coff_pop_insert): Use coff_pseudo_table. - (coff_sec_sym_ok_for_reloc): Remove. - (coff_format_ops): Add 0 entries for s_get_size, s_set_size, - and comment all zero entries and remove #if 0 code. - Update copyright. +2000-11-29 Richard Henderson <rth@redhat.com> - * config/obj-coff.h (obj_pop_insert): Define. - (coff_pseudo_table): Declare. - Update copyright. + * dwarf2dbg.c: Rewrite from scratch. Queue all debugging output + until dwarf2_finish; use relaxation to get cross-fragment offsets; + thread multiple subsegments properly; handle multiple code + sections properly; emit proper compilation unit info for assembler + generated debugging. - * config/obj-ecoff.c (ecoff_format_ops): Add 0 entries for - s_get_size, s_set_size. Comment all zero entries. - Update copyright. + * as.h (enum _relax_state): Add rs_dwarf2dbg. + * dwarf2dbg.h (struct dwarf2_line_info): Remove filename. + (dwarf2dbg_estimate_size_before_relax): Declare. + (dwarf2dbg_relax_frag, dwarf2dbg_convert_frag): Declare. + * write.c: Include dwarf2dbg.h. + (cvt_frag_to_fill): Handle rs_dwarf2dbg. + (relax_segment): Likewise. - * config/obj-elf.c (elf_s_get_other): New function. - (obj_read_begin_hook): Rename to elf_obj_read_begin_hook. - (obj_symbol_new_hook): Rename to elf_obj_symbol_new_hook. - (elf_format_ops): Add elf_s_get_other, 0 s_get_size entry, and - comment. - (obj_elf_parse_section_letters): Don't pass error strings to - printf as format arg. - Update copyright. +2000-11-28 Hans-Peter Nilsson <hp@bitrange.com> - * config/obj-elf.h (ECOFF_DEBUGGING): Define when - OBJ_MAYBE_ECOFF. - (elf_s_get_other): Declare. - (S_GET_OTHER) Define as elf_s_get_other if not already - defined. - (S_SET_OTHER): Only define when not already defined. - (elf_obj_read_begin_hook): Declare. - (obj_read_begin_hook): Define. - (elf_obj_symbol_new_hook): Declare. - (obj_symbol_new_hook): Define. - Update copyright. + * config/tc-sh.c (md_convert_frag) <undefined symbol, conditional + jump>: Use as_bad_where instead of as_bad. Tweak error message + accordingly. Stabilize frag by updating fix part and resetting + variant part. + <undefined symbol, unconditional jump>: Ditto. + (sh_elf_cons): Cast *input_line_pointer to unsigned char when + indexing is_end_of_line[]. + (md_assemble): Initialize size to 0. + (md_section_align): Mark parameter seg as unused. + (parse_reg): Parse names case-insensitively. - * config/obj-multi.h: Add copyright header and protect against - multiple inclusion. Add * to all function pointers. - (OBJ_HEADER): If defined, include it rather than other defines - in this file. - (obj_frob_file_after_relocs): Test for NULL. - (obj_symbol_new_hook): Here too. - (obj_sec_sym_ok_for_reloc): And here. - (S_GET_OTHER): Define. - (S_GET_DESC): Define. - (ECOFF_DEBUGGING): Remove as it's done in obj-elf.h - (OBJ_MAYBE_ELF): Update comment. +2000-11-28 Kazu Hirata <kazu@hxi.com> - * config/tc-i386.c (i386_immediate): Add OBJ_MAYBE_AOUT to - OBJ_AOUT preprocessor conditional and handle emulation by - testing OUTPUT_FLAVOR. - (i386_displacement): Here too. - (md_section_align): Similarly here. - (i386_target_format): Conditionally compile when more than one - of OBJ_MAYBE_{ELF,COFF,AOUT} defined. Add aout case. - (i386_immediate): Fix error message for aout BFD_ASSMBLER. - (i386_displacement): Here too. - Update copyright. + * config/obj-aout.h: Fix formatting. + * config/obj-bout.h: Likewise. + * config/obj-coff.c: Likewise. + * config/obj-coff.h: Likewise. + * config/obj-elf.h: Likewise. + * config/obj-som.h: Likewise. + * config/obj-vms.c: Likewise. + * config/obj-vms.h: Likewise. + * config/tc-h8300.h: Likewise. + * config/tc-ns32k.h: Likewise. + * config/tc-sparc.h: Likewise. + * config/tc-tic54x.h: Likewise. + * config/tc-z8k.h: Likewise. - * config/tc-i386.h (AOUT_TARGET_FORMAT): Define for each TE_*. - Define TARGET_FORMAT for aout only when not multi. - Update copyright. +2000-11-28 Nick Clifton <nickc@redhat.com> - * config/te-multi.h: Delete file as it's identical to te-generic.h + * doc/as.1 (COPYING): Mention that the GNU Free Documentation + License is present in the sources, but not the output, and + also available from the GNU website. + (GNU Free Documentation License): Comment out this section. -2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-11-28 Hans-Peter Nilsson <hp@axis.com> - * config/tc-i386.h (DWORD_MNEM_SUFFIX): Delete. - * config/tc-i386.c (DWORD_MNEM_SUFFIX): Rename all occurrences to - LONG_MNEM_SUFFIX. + * Makefile.am (CPU_OBJ_VALID): Add case to filter out invalid coff + targets. Remove i860 from valid a.out targets. + * Makefile.in: Regenerate. - * config/tc-i386.h (INTEL_DWORD_MNEM_SUFFIX): Rename to - DWORD_MNEM_SUFFIX. - * config/tc-i386.c (INTEL_DWORD_MNEM_SUFFIX): Here too. Fix some - comments. + * config/tc-cris.c: Include dwarf2dbg.h. + (md_pseudo_table): Add .file and .loc. + (md_assemble): Call dwarf2_emit_insn if generating ELF. + (s_cris_file, s_cris_loc): New. + * config/tc-cris.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. + * Makefile.am: Regenerate dependencies. + * Makefile.in: Regenerate. -2000-01-13 Clinton Popetz <cpopetz@cygnus.com> +2000-11-28 Alan Modra <alan@linuxcare.com.au> - * config/tc-mips.c (mips_do_align): New function. - * config/tc-mips.h (md_do_align): Define. + * expr.c (STANDARD_MUL_PRECEDENCE): Correct value. + (MRI_MUL_PRECEDENCE): Likewise. + (op_rank): Fix a comment typo. -2000-01-10 Philip Blundell <philb@gnu.org> +2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr> - * doc/c-arm.texi (ARM Options): Fix typo. - (ARM-Chars): Correct description of `#'. Mention that `;' is a - line separator for Linux. - * doc/as.texinfo (Comments): Mention the ARM. + * config/tc-m68hc11.c (build_indexed_byte): Print the offset in + the error message. + (get_operand): Fix analysis for movw/movb instructions. -2000-01-10 Philip Blundell <pb@futuretv.com> +2000-11-24 Nick Clifton <nickc@redhat.com> - * configure.in (arm*-*-conix*): New target. - (arm*-*-linux-gnu*): Match instead of arm-*-linux* and - armv*-*-linux-gnu. + * configure.in (xscale-elf): Add target. + (xscale-coff): Add target. * configure: Regenerate. -2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de> - - * config/obj-elf.c (elf_pseudo_table): Define visibility pseudos. - (obj_elf_visibility): New function. - - * doc/as.texinfo (Visibility): New node: document visibility - pseudo ops. - -1999-12-27 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c (MATCH): Relax JumpAbsolute check. Emit a - warning for absolute jump/call without `*' in non-intel mode. No - need to set i.types[0] JumpAbsolute in intel mode. - -1999-12-22 Philip Blundell <pb@futuretv.com> - - * config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate - hook function when changing sections. - (arm_s_data): Likewise. - -1999-12-14 Nick Clifton <nickc@cygnus.com> - - * config/tc-arm.c (md_parse_option): Add support for -marm720 - command line switch. - -Tue Nov 30 22:59:00 1999 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10300.c (md_pseudo_table): Add ".am33" pseudo-op. - (r_registers, xr_registers): Define. - (r_register_name, xr_register_name): New functions. - (md_assemble): Handle new am33 operand types and instruction - formats. - (mn10300_insert_operand, check_operand): Likewise. - -1999-11-29 Nick Clifton <nickc@cygnus.com> - - * config/tc-arm.c (thumb_mode): Turn into a tristate variable. - (s_force_thumb): Set thumb_mode to 2. - (md_assemble): Do not complain about thumb instructions on a - non-thumb target if thumb_mode is set to 2. - -1999-11-28 Michael Meissner <meissner@cygnus.com> - - * config/tc-alpha.c (toplevel): Include struc-symbol.h. - (alpha_macro_arg): Add MACRO_{LITERAL,BASE,BYTOFF,JSR} cases. - (O_...): Add new machine dependent expressions if we are handling - explicit relocations. - (alpha_reloc_op): New static table holding the explicit relocation - information. - (alpha_literal_hash): New static to hold the hash table for - explicit relocations. - (alpha_macros): Add support for explicit relocations. - (md_begin): If explicit relocations, initialize hash table. - (md_assemble): Don't print a second error if tokenize_arguments - already printed an error message. - (md_apply_fix): Add support for explicit relocations. - (alpha_force_relocation): Ditto. - (alpha_fix_adjustable): Ditto. - (alpha_adjust_symtab): New function to support explicit - relocations. - (alpha_adjust_symtab_relocs): Ditto. - (debug_exp): Debug stub compiled if DEBUG_ALPHA is defined. - (tokenize_arguments): Add debug code if DEBUG_ALPHA is defined. - Add support for explicit relocations. Return -2 if an error - message was already printed. - (find_macro_match): Add support for explicit relocations. Comment - each of the cases. - (emit_insn): Add support for explicit relocations. - (assemble_tokens): Ditto. - (emit_ldgp): Ditto. - (load_expression): Ditto. - (emit_lda): Ditto. - (emit_ldah): Ditto. - (emit_ir_load): Ditto. - (emit_loadstore): Ditto. - (emit_ldXu): Ditto. - (emit_ldil): Ditto. - (emit_sextX): Ditto. - (emit_division): Ditto. - (emit_jsrjmp): Ditto. - (emit_retjcr): Ditto. - - * config/tc-alpha.h (RELOC_OP_P): Enable explicit relocations if - ELF object format. - (tc_adjust_symtab): If explicit relocations, call the function - alpha_adjust_symtab. - (TC_FIX_TYPE): Add fields to be able to move explicit lituse - relocations next to the literal relocation they reference. - (TC_INIT_FIX_DATA): Initialize the new fields. - (TC_FIX_DATA_PRINT): Print the new fields if DEBUG5 is defined. - -Wed Nov 24 20:27:58 1999 Jeffrey A Law (law@cygnus.com) - - * config/tc-hppa.c (pa_ip): Handle PA2.0 unit completers. Handle - 'B' operand for PA2.0 bb instruction. - -1999-11-18 Nick Clifton <nickc@cygnus.com> - - * config/tc-mcore.h (TC_FORCE_RELOCATION): Define for Mcore-pe - target. - - * config/tc-mcore.c (tc_gen_reloc): Support generation of RVA - relocs. - (mcore_force_relocation): Force relocations to be generated for - RVA relocs. - -1999-11-16 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c (i386_immediate): Disallow O_big immediates. - (i386_displacement): Disallow O_big displacements. - -Mon Nov 15 20:12:43 1999 Donald Lindsay <dlindsay@cygnus.com> - - * config/tc-arm.c (do_mia,do_mar,do_mra,do_pld,do_ldrl,do_co_reg): Small - improvements in error checking. - (md_assemble): Support for unconditional ARM instructions. - (md_parse_option): Support for -m[arm]v5e flag. - -1999-11-12 Nick Clifton <nickc@cygnus.com> - - * macro.c (buffer_and_nest): Do not check beyond the end of the - buffer. - -1999-11-11 Nick Clifton <nickc@cygnus.com> - - * macro.c (buffer_and_nest): Look for seperator after TO and - FROM tokens. - -1999-11-08 Andrew Haley <aph@cygnus.com> - - * app.c (do_scrub_chars): When in State 10, treat backslash - characters in the same way as as symbol characters. - -1999-11-07 Richard Henderson <rth@cygnus.com> - - * config/tc-alpha.c (alpha_align): Check, don't assert, that - the previous label was in the current section before playing - with auto-alignment. - -1999-11-06 Nick Clifton <nickc@cygnus.com> - - * config/tc-v850.c (v850_force_relocation): Force relocation - for weak symbols. - (v850_pcrel_from_selection): Do not compute a pcrel offset if - the symbol is weak. - -1999-11-05 Michael Meissner <meissner@cygnus.com> - - * expr.h (operatorT): Increase machine dependent operators to 16. - * expr.c (op_rank): Ditto. - -1999-11-03 Ian Lance Taylor <ian@zembu.com> - - * read.c (pseudo_set): Reject attempts to set the value of a - section symbol. - - * config/obj-elf.c (obj_elf_ident): Call md_flush_pending_output - if it is defined. - - * config/obj-elf.c (elf_set_index): Add ATTRIBUTE_UNUSED. - - * config/obj-elf.c (elf_frob_file_after_relocs): Don't pass NULL - to bfd_set_section_contents. - -1999-11-03 Nick Clifton <nickc@cygnus.com> - - * config/tc-mcore.h (TARGET_BYTES_BIG_ENDIAN): Change to false. - -1999-11-01 Gavin Romig-Koch <gavin@cygnus.com> - - * config/tc-mips.c (macro_build): Use OPCODE_IS_MEMBER. - (mips_ip): Use OPCODE_IS_MEMBER. - -Wed Oct 27 16:50:44 1999 Don Lindsay <dlindsay@cygnus.com> - - * config/tc-arm.c (reg_required_here): Improve comments. - - * config/tc-arm.c (thumb_opcode): Add "variants" field. - (tinsns): Initialize variants field. - - * config/tc-arm.c (bad_args, bad_pc): Renamed to BAD_ARGS and - BAD_PC respectively. - -1999-10-27 Scott Bambrough <scottb@netwinder.org> - - * config/tc-arm.c (reloc_map[]): Fix compiler warning. - * config/tc-arm.h: Fix compile time warnings. - -Mon Oct 18 18:11:10 MDT 1999 Diego Novillo <dnovillo@cygnus.com> - - * tc_d10v.c (find_opcode): Allow ATSIGN to match expressions of the - form @abs16, @(abs16) and @(abs16 + imm). - -1999-10-21 Gavin Romig-Koch <gavin@cygnus.com> - - * config/tc-mips.c (ISA_HAS_COPROC_DELAYS) : New. - (ISA_HAS_64_BIT_REGS) New. - (gpr_interlocks,md_begin,reg_needs_delay,append_insn, - mips_emit_delays,macro_build,load_register,load_addresss, - macro,macro2,mips_ip,s_cprestore,s_cpadd): Simplify - and/or use new ISA_xxx macros in expressions involving - ISA, particularly mips_opts.isa. - -1999-10-18 Michael Meissner <meissner@cygnus.com> - - * expr.h (operatorT): Add machine dependent operators md1..md8. - (expressionS): Make X_op 8 bits instead of 7. Add a X_md field - for the machine dependent operators to use. - - * expr.c (op_rank): Add machine dependent operators. + * config/tc-arm.c (ARM_EXT_V5E): New ARM architecture + extenstion. + (ARM_EXT_XSCALE): New ARM architecture extension. + (ARM_LONGMUL): Rename to ARM_EXT_LONGMUL. + (ARM_HALFWORD): Rename to ARM_EXT_HALFWORD. + (ARM_THUMB): Rename to ARM_EXT_THUMB. + (ARM_ARCH_V4): Remove processor from architecture. + (ARM_ARCH_3M): New architecutre definition. + (ARM_ARCH_V5TE): New architecutre definition. + (ARM_ARCH_XSCALE): New architecutre definition. + (CPU_DEFAULT): Allow to be defaulted to XScale. + (atpcs): New boolean variable. + (ldr_flags): Support 'd' flag for double word loads. + (str_flags): Support 'd' flag for double word stored. + (do_mia): New function. + (do_mar): New function. + (do_mra): New function. + (do_pld): New function. + (do_ldrd): New function. + (do_blx): New function. + (do_bkpt): New function. + (do_clz): New function. + (do_lstc2): New function. + (do_cdp2): New function. + (do_t_blx): New function. + (do_t_bkpt): New function. + (do_smla): New function. + (do_smlal): New function. + (do_smul): New function. + (do_qadd): New function. + (do_co_reg2c): New function. + (LONGEST_INSN): Redefine to 7. + + * doc/c-arm.texi: Document -mxscale, -mmarmv5te and -matpcs + command line switches. + +2000-11-22 Jim Wilson <wilson@redhat.com> + + * config/tc-ia64.c (pseudo_func): Add missing initializers. + (struct rsrc): Make line unsigned. + (gr_values): Add missing initializer. + (SLOT_NUM_NOT_SET): Add unsigned cast. + (ia64_elf_section_flags, output_vbyte_mem, count_output, dot_radix, + dot_fframe, dot_vframe, dot_vframesp, dot_vframepsp, dot_save, + dot_restore, dot_restorereg, dot_restorereg_p, dot_handlerdata, + dot_unwentry, dot_altrp, dot_saveg, dot_savef, dot_saveb, dot_savegf, + dot_spill, dot_spillreg, dot_spillreg_p, dot_label_state, + dot_copy_state, dot_unwabi, dot_personality, dot_proc, dot_body, + dot_prologue, dot_endp, dot_regstk, dot_psr, dot_alias, dot_ln, + dot_reg_val, dot_entry, dot_mem_offset, ia64_init, mark_resource, + md_undefined_symbol, md_apply_fix3, tc_gen_reloc, ia64_md_do_align): + Add ATTRIBUTE_UNUSED to unused parameters. + (convert_expr_to_ab_reg): Add parens. + (convert_expr_to_xy_reg): Add parens. Comment out >= REG_GR test. + (dot_prologue): Initialize grsave when declared. + (md_pseudo_table): Add missing initializers. + (operand_match): Add casts to bfd_vma. + (emit_one_bundle): Delete unused local prev. Make required_template + unsigned. + (specify_resource): Cast i to unsigned. + (note_register_values): Use fprintf_vma. + (print_dependency): Likewise. + +2000-11-21 Jim Wilson <wilson@redhat.com> + + * config/tc-ia64.c (generate_unwind_image): Call record_alignment + for unwind info section. + (dot_endp): Likewise for unwind section. + + * config/tc-ia64.c (emit_one_bundle): Pass size of 8 not 4 to + fix_new_exp. + +2000-11-21 Jakub Jelinek <jakub@redhat.com> + + * config/tc-sparc.c (md_pseudo_table): Add .file and .loc. + (output_insn): Call dwarf2_emit_insn. + * config/tc-sparc.h (DWARF2_LINE_MIN_INSN_LENGTH): New. + +2000-11-17 Richard Henderson <rth@redhat.com> + + * ehopt.c (eh_frame_code_alignment): New arg `in_seg', update all + callers. Don't switch segments. Expect CIE == -1 in .debug_frame. + (check_eh_frame): Handle .eh_frame and .debug_frame concurrently. + +2000-11-17 Nick Clifton <nickc@redhat.com> + + * config/tc-arm.c (md_pseudo_table): Add support for .line and + .file pseudo ops. + +2000-11-17 Richard Henderson <rth@redhat.com> + + * config/tc-i386.c (md_pseudo_table): Add .file and .loc. + +2000-11-17 Richard Henderson <rth@redhat.com> + + * dwarf2dbg.c (dwarf2_gen_line_info): Early out for no line number. + * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Adjust for + tri-state definition of alpha_flag_mdebug. + * config/tc-alpha.c (alpha_flag_mdebug): Init to -1. + (s_alpha_file): Store first .file directive. + (s_alpha_stab): New. + (md_pseudo_table): Add stabs and stabn. + +2000-11-17 Richard Henderson <rth@redhat.com> + + * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn. + +2000-11-17 Richard Henderson <rth@redhat.com> + + * as.c (debug_type): Init to DEBUG_UNSPECIFIED. + (main): Call dwarf2_finish. + * as.h (debug_type): Clarify documentation of the meaning + of this variable. + * dwarf2dbg.c (DWARF2_LINE_MIN_INSN_LENGTH): Default to 1. + (print_stats): Fix parenthesis problem. + (now_subseg_size): New. + (dwarf2_finish): Use it. If DEBUG_DWARF2, emit bits for .debug_info. + (dwarf2_directive_file): Don't set debug_type. + (dwarf2_where): Honor DEBUG_DWARF2 first. + (dwarf2_emit_insn): Renamed from dwarf2_generate_asm_lineno; + do nothing if not emitting dwarf2 debug info, or no work. + * dwarf2dbg.h (dwarf2_emit_insn): Update. + * ecoff.c (add_file): Turn on DEBUG_ECOFF only if DEBUG_UNSPECIFIED. + (ecoff_new_file): Likewise. + * read.c (generate_lineno_debug): Kill ecoff hackery. Update + commentary wrt dwarf2. + + * config/tc-alpha.c (alpha_adjust_symtab_relocs): Add + ATTRIBUTE_UNUSED as needed. + (emit_insn): Call dwarf2_emit_insn. + (s_alpha_file): New. + (s_alpha_loc): New. + (s_alpha_coff_wrapper): Don't handle them. + (md_pseudo_table): Update for .file and .loc. + * config/tc-alpha.h (DWARF2_LINE_MIN_INSN_LENGTH): New. + + * config/tc-arm.c (output_inst): Update for dwarf2_emit_insn; + don't protect with debug_type. + * config/tc-hppa.c (md_assemble): Likewise. + * config/tc-m68hc11.c (m68hc11_new_insn): Likewise. + * config/tc-mn10300.c (md_assemble): Likewise. + * config/tc-sh.c (md_assemble): Likewise. + * config/tc-v850.c (md_assemble): Likewise. - * config/tc-alpha.c (O_pregister): Define as a machine dependent - operator. - (O_cpregister): Ditto. - (md_begin): Change X_op test that field is wide enough to use - O_max instead of O_alpha_max. - (cpu_types): Fill in missing initializer. - (alpha_num_macros): Make unsigned. - (md_assemble): Make opnamelen be size_t. - (md_apply_fix): Cast alpha_num_operands to int before testing. - (alpha_force_relocation): Ditto. - (alpha_fix_adjustable): Ditto. - (alpha_fix_adjustable): Mark unused arguments ATTRIBUTE_UNUSED. - (tc_gen_reloc): Ditto. - (tc_get_register): Ditto. - (emit_ldgp): Ditto. - (emit_lda): Ditto. - (emit_ldah): Ditto. - (emit_ldil): Ditto. - (s_alpha_ent): Ditto. - (s_alpha_end): Ditto. - (s_alpha_frame): Ditto. - (s_alpha_prologue): Ditto. - (s_alpha_file): Ditto. - (s_alpha_gprel32): Ditto. - (s_alpha_proc): Ditto. - (s_alpha_set): Ditto. - (s_alpha_base): Ditto. - (s_alpha_align): Ditto. - (s_alpha_arch): Ditto. - (alpha_align): Ditto. - (assemble_insn): Suppress unused variable warning. - (emit_insn): Ditto. - (assemble_insn): Don't assume X_op and X_unsigned are in a given - order in the structure. - (s_alpha_coff_wrapper): Avoid int/unsigned comparison. + * config/tc-arm.c (arm_end_of_source): Remove. + * config/tc-hppa.c (pa_end_of_source): Remove. + * config/tc-m68hc11.c (m68hc11_end_of_source): Remove. + * config/tc-mn10300.c (mn10300_finalize): Remove. + * config/tc-sh.c (sh_finalize): Remove. + * config/tc-v850.c (sh_finalize): Remove. -Sun Oct 17 17:15:58 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-arm.h (md_end): Remove. + * config/tc-hppa.h (md_end): Remove. + (DWARF2_LINE_MIN_INSN_LENGTH): New. + * config/tc-m68hc11.h (md_end): Remove. + * config/tc-mn10300.h (md_end): Remove. + * config/tc-sh.h (md_end): Remove. + * config/tc-v850.h (md_end): Remove. - * config/tc-hppa.c (md_apply_fix): Make "fmt" an int. + * config/tc-ia64.c (emit_one_bundle): Don't protect + dwarf2 bits with debug_type. + (md_assemble): Likewise. + (ia64_end_of_source): Don't call dwarf2_finish. -1999-10-12 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-11-16 Jim Wilson <wilson@redhat.com> - * config/tc-i386.c (i386_index_check): Correct #endif location. + * config/tc-ia64.c (errata_nop_necessary_p): Abort if general regno + >= 128 instead of > 128. Abort if predicate regno is >= 64 instead of + > 16. -Mon Oct 11 14:02:40 1999 Geoffrey Keating <geoffk@cygnus.com> +2000-11-16 H.J. Lu <hjl@gnu.org> - * as.c (show_usage): Document new options. - (parse_args): Add --no-warn, --warn, --fatal-warnings, - which become 'W', OPTION_WARN, and OPTION_WARN_FATAL. - (parse_args): Parse the new options. - (main): If there were warnings, and --fatal-warnings - was specified, print an error. - * as.h: New variable, flag_fatal_warnings, for new option. + * config/obj-elf.c (obj_elf_symver): Don't check the missing + version name. -Sun Oct 10 01:47:23 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org> +2000-11-15 Kazu Hirata <kazu@hxi.com> - * config/tc-hppa.c (pa_ip): Add new codes 'cc', 'cd', 'cC', 'co', - '@'. Change autoincrement completers to fall through to cache control - completers. - - * config/tc-hppa.c (pa_ip): Remove unused args. Add code to '?W' - arg. - (pa_parse_addb_64_cmpltr): New function. - - * config/tc-hppa.c (pa_ip): Change error message. - (pa_ip,pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr) Fix '?N' and - '?Q' args to allow falling through. - - * configtc-hppa.c (pa_ip): Implement conditional codes "?N", "?Q". - Remove unused conditional codes. - (pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr): New. - -Thu Oct 7 00:23:53 MDT 1999 Diego Novillo <dnovillo@cygnus.com> - - * config/tc-d30v.c (CHAR_BIT): Define. - (check_range): Fix bit operations to support integers bigger than - 32 bits. - -Thu Oct 7 00:11:50 MDT 1999 Diego Novillo <dnovillo@cygnus.com> - - * config/tc-d10v.c (check_range): Check range for RESTRICTED_NUM3 - operands. - -Mon Oct 4 17:24:23 1999 Nick Clifton <nickc@cygnus.com> - Doug Evans <devans@cygnus.com> + * config/tc-tic30.c: Fix formatting. + * config/tc-tic80.c: Likewise. + * config/tc-v850.c: Likewise. + * config/tc-vax.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. - Add support for m32rx. - * config/tc-m32r.c (enable_m32rx): New static global. - (enable_special,warn_explicit_parallel_conflicts,optimize): Ditto. - (allow_m32rx): New function. - (M32R_SHORTOPTS): Add `O'. - (md_longopts): Add --m32rx plus several warning options. - (md_parse_option): Handle new options. - (md_show_usage): Print them. - (md_begin): Enable m32rx. - (OPERAND_IS_COND_BIT): New macro. - (first_writes_to_seconds_operands): New function. - (writes_to_pc,can_make_parallel,make_parallel): New functions. - (target_make_parallel,assemble_two_insns): New functions. - (md_assemble): Recognize "insn1 -> insn2" and "insn1 || insn2". - If optimizing and m32rx, try to make consecutive insns parallel. +2000-11-14 DJ Delorie <dj@redhat.com> -Tue Sep 28 14:06:44 1999 Geoffrey Keating <geoffk@cygnus.com> + * config/tc-v850.c: Support dwarf2. + * config/tc-v850.h: Ditto. - * config/tc-mips.c (nopic_need_relax): Allow for the - .sdata.foo sections generated by -fdata-sections, - and for the .gnu.linkonce.s sections generated by C++. + * config/tc-v850.c (cons_fix_new_v850): Don't rely on + parse_cons_expression_v850 to initialize hold_cons_reloc. -Thu Sep 23 07:13:45 1999 Jerry Quinn <jquinn@nortelnetworks.com> +2000-11-15 Bernd Schmidt <bernds@redhat.com> - * config/tc-hppa.c (pa_ip): Replace 'B', 'M', 'l' and 'g' handling - with cleaner code using completer prefixes. Add 'Y'. + * tc-ia64.c (struct md): New entries LAST_GROUPS, GROUP_IDX. + (errata_nops_necessary_p): New function. + (emit_one_bundle): Call it. Update the GROUP_IDX field in struct + md. - * config/tc-hppa.c (pa_ip): Add parens to silence compiler. +2000-11-14 Jim Wilson <wilson@redhat.com> -Wed Sep 22 09:37:19 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-ia64.c (ia64_target_format): If EF_IA_64_BE not set, then + return little endian bfd formats. - * config/tc-hppa.c (pa_ip): Avoid ANSI specific initialization. - (pa_ip, case 'm'): Failure to get a CBIT specifier just means the - insn does not match and we should try the next insn in the table. +2000-11-14 Kazu Hirata <kazu@hxi.com> -1999-09-22 Nick Clifton <nickc@cygnus.com> + * config/aout_gnu.h: Fix formatting. + * config/atof-vax.c: Likewise. + * config/m68k-parse.h: Likewise. + * config/m88k-opcode.h: Likewise. + * config/obj-elf.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-cris.c: Likewise. + * config/tc-i386.c: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-mn10300.c: Likewise. + * config/te-386bsd.h: Likewise. + * config/te-hppa.h: Likewise. + * config/te-nbsd.h: Likewise. + * config/te-ppcnw.h: Likewise. + * config/te-sparcaout.h: Likewise. + * config/te-tmips.h: Likewise. + * config/vax-inst.h: Likewise. + * config/vms-conf.h: Likewise. - * config/tc-arm.c (MULTI_SET_PSR): Rename to LDM_TYPE_2_OR_3. +2000-11-14 Jakub Jelinek <jakub@redhat.com> -Mon Sep 20 04:01:41 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-alpha.c (s_alpha_prologue): Preserve visibility bits. - * config/tc-hppa.c (pa_ip): Fix thinkos in recent cleanup - of PA2.0 support. +2000-11-13 H.J. Lu <hjl@gnu.org> -1999-09-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br> + * config/obj-elf.c (elf_frob_symbol): Support + ".symver name,name2@@@nodename". + (elf_frob_file_before_adjust): Likewise. - * config/tc-i386.c (md_shortopts): Check OBJ_MAYBE_ELF as well as - OBJ_ELF. If ELF, add "sq". - (md_parse_option): If ELF, ignore -s and -q. - (md_show_usage): Mention ELF options. + * doc/as.texinfo: Updated for ".symver name,name2@@@nodename" + and ".symver name,name2@@@nodename". + Fix a typo. -Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com) +2000-11-12 H.J. Lu (hjl@gnu.org) - * config/tc-hppa.c (pa_ip): Handle 'J', 'K' and 'cc' - operands. + * config/obj-elf.c (obj_elf_symver): Check missing version + name. - * config/tc-hppa.c (pa_ip); Handle "fe", and 'cJ'. +2000-11-12 H.J. Lu (hjl@gnu.org) - * config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'. + * dwarf2dbg.c (dwarf2_generate_asm_lineno): Use addressT + instead of bfd_vma for non-bfd assemblers. - * config/tc-hppa.c (struct pa_it): New field "trunc". - (pa_ip): Hadnle 'h', 'm', '=', '{', and '_' operands. - (pa_parse_ftest_gfx_completer): New function - (pa_parse_fp_cnv_format): New function. +2000-11-09 Kazu Hirata <kazu@hxi.com> - * config/tc-hppa.c (pa_ip): Handle 'X' operand. - (md_apply_fix): Handle 22bit pc-rel branches. + * itbl-ops.c: Fix comment typos. - * config/tc-hppa.c (pa_ip): Handle 'B' operand. +2000-11-08 Jim Wilson <wilson@redhat.com> - * config/tc-hppa.c (pa_ip): Handle 'L' and 'M' operands. + * config/tc-ia64.c (struct unw_rec_list): Add slot_frag field. + (struct unwind): Add next_slot_frag field. + (slot_index): New parameters slot_frag and first_frag. Add code + to add in frag sizes when different. Add comments. + (fixup_unw_records): New locals first_frag and last_frag. Pass new + arguments to slot_index. + (emit_one_bundle): Set slot_frag field. Set next_slot_number after + loop end. Set next_slot_frag field. - * config/tc-hppa.c (pa_ip): Handle 'l' operand. +2000-11-07 H.J. Lu <hjl@gnu.org> - * config/tc-hppa.c (pa_ip): Handle 'g' operand. + * doc/as.texinfo (.symver): Updated for versioned symbol + reference. -at Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com) + * obj.h (format_ops): Add the frob_file_before_adjust field. - * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling. - (pa_ip): Handle 'fX'. + * config/obj-aout.c (aout_format_ops): Set the + frob_file_before_adjust field to 0. + * config/obj-coff.c (coff_format_ops): Likewise. + * config/obj-ecoff.c (ecoff_format_ops): Likewise. -Sat Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com) + * config/obj-elf.c (obj_elf_symver): Allow duplicated version + name. + (elf_frob_file_before_adjust): New function to remove unneeded + versioned symbols from the symbol table. + (elf_format_ops): Set the frob_file_before_adjust field to + elf_frob_file_before_adjust. - * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling. - (pa_ip): Handle 'fX'. + * config/obj-elf.h (obj_frob_file_before_adjust): Defined if + not defined. -Fri Sep 17 11:57:34 1999 Jeffrey A Law (law@cygnus.com) + * config/obj-multi.h (obj_frob_file_before_adjust): Defined. - * config/tc-hppa.c (pa_build_unwind_subspace): Do not build - unwinds unless the function is in the text space. - (pa_type_args): Set BSF_FUNCTION for an exproted data symbol. +2000-11-07 Peter Targett <peter.targett@arccores.com> -Wed Sep 15 05:14:32 1999 Jeffrey A Law (law@cygnus.com) + * gas/config/tc-arc.h: Avoid warnings for LITTLE_ENDIAN and + BIG_ENDIAN macros. + * gas/config/tc-arc.c: Use S_IS_LOCAL to test local symbols. + Fix compile time warning messages. - * config/tc-hppa.c (pa_ip): Move dwarf2 stuff from here. - (md_assemble): To here. Tweak address generation. +2000-11-07 Nick Clifton <nickc@redhat.com> - * config/tc-hppa.c: Include dwarf2dbg.h if OBJ_ELF. Declare - debug_line. - (md_pseudo_table): Add .file and .line pseudo-ops for OBJ_ELF. - (md_assemble): Call dwarf2_where for OBJ_ELF. - (pa_ip): Call dwarf2_gen_line_info for OBJ_ELF. - (pa_end_of_source): New function. - * tc-hppa.h (md_end): Define for OBJ_ELF. + * stabs.c (generate_asm_file): Increase length of xmalloc'ed + buffer in order to avoid buffer overflows. -1999-09-14 Michael Meissner <meissner@cygnus.com> +2000-11-06 Steve Ellcey <sje@cup.hp.com> - * configure.in (Canonicalization of target names): Remove adding - ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 - generates $ac_config_sub with a ${CONFIG_SHELL} already. + * config/tc-ia64.c (md_shortopts, md_parse_option, md_show_usage): + Change M to m for -milp32 or -mlp64 to match gcc. + (dot_endp): Use bytes_per_address instead of 8. + (emit_one_bundle): Use number_to_chars_littleendian instead of + md_number_to_chars. + (fix_insn): Likewise. + (ia64_init): New function. + (ia64_target_format): New function. + (md_begin): Set endianness, arch, and machine as appropriate. + * config/tc-ia64.h: (TARGET_BYTES_BIG_ENDIAN, md_number_to_chars): + Make these macros depend on TE_HPUX macro. + (TARGET_FORMAT): Define. + (HOST_SPECIAL_INIT): Define. + * config/te-hpux.h: New file. + * configure.in: Add "ia64-*-hpux*" target to configure. * configure: Regenerate. -1999-09-14 Donn Terry <donn@interix.com> - - * config/te-interix.h (GLOBAL_OFFSET_TABLE_NAME): Define. +2000-11-06 Kazu Hirata <kazu@hxi.com> -1999-09-13 Alan Modra <alan@spri.levels.unisa.edu.au> + * as.c: Fix formatting. + * dwarf2dbg.c: Likewise. + * input-file.c: Likewise. + * input-file.h: Likewise. + * input-scrub.c: Likewise. + * itbl-ops.c: Likewise. + * listing.c: Likewise. + * macro.h: Likewise. + * messages.c: Likewise. + * read.c: Likewise. + * subsegs.c: Likewise. + * subsegs.h: Likewise. + * write.c: Likewise. - * config/tc-i386.c (md_assemble): Handle "jmp/call constant" as a - pc-relative jmp/call to an absolute symbol. - (md_apply_fix3): When OBJ_ELF, don't add the values in twice for - absolute section symbols. +2000-11-06 Nick Clifton <nickc@redhat.com> - * config/tc-i386.c (md_assemble): Correct frag_var size. Tidy - jump handling code and comments. + * doc/as.texinfo: Add GNU Free Documentation License. + * doc/gasp.texi: Add GNU Free Documentation License. + * doc/as.1: Add GNU Free Documentation License. -1999-09-12 Ian Lance Taylor <ian@zembu.com> +2000-11-05 Nick Clifton <nickc@redhat.com> - * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to - the value if TE_PE and a global defined symbol. + * config/tc-arm.c: Add include of "dwarf2dbg.h" -1999-09-11 Ian Lance Taylor <ian@zembu.com> - - * write.c (dump_section_relocs): Call print_symbol_value_1 to - print the symbol, rather than printing it here. - -1999-09-11 Donn Terry <donn@interix.com> - - * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust - BFD_RELOC_RVA relocations. - - * config/tc-i386.c (md_undefined_symbol): Compare the name against - the macro GLOBAL_OFFSET_TABLE_NAME, rather than assuming that it - starts with "_G". - - * write.c (write_relocs): Call SET_SECTION_RELOCS if it is - defined. - * config/obj-coff.h (SET_SECTION_RELOCS): Define. - * doc/internals.texi (Object format backend): Document - SET_SECTION_RELOCS. - - * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust - relocations against global symbols if TE_PE. - - * config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version. - (obj_pseudo_table): Always handle ".ident" with obj-coff_ident. - - * config/obj-coff.c (coff_frob_symbol): Prohibit weak common - symbols. - - * config/obj-coff.c (obj_coff_endef): Don't merge labels, or - symbols which do not have a constant value, or tags with - non-tags. Remove the symbol from the list before adding it at the - end. - - * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef - C_FCN symbol differently if TE_PE. - (obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which - appears in the pseudo-op, rather coff_line_base which is only set - for a .bf symbol. - - * config/obj-coff.c (obj_coff_loc): New static function. - (obj_pseudo_table): Add "loc". - - * config/obj-coff.c (add_lineno): Check that the line number is - positive. - - * config/atof-ieee.c (atof_ieee): Change what_kind to int. - * config/atof-vax.c (flonum_gen2vax): Change format_letter to - int. - (md_atof): Return NULL rather than 0. - * config/tc-i386.c (md_atof): Change type to int. - * expr.c (expr): Change first parameter to int. - * config/obj-coff.c: Add declarations for static functions. - (coff_frob_symbol): Use SYM_AUXENT. - * config/tc-i386.h (flag_16bit_code): Don't declare. +2000-11-02 Per Lundberg <plundis@chaosdev.org> - * config/obj-coff.c (obj_coff_section): Default to setting - SEC_LOAD. Don't set SEC_DATA for 'w' modifier. - - * write.c (adjust_reloc_syms): Print adjusted fixup. - - * expr.c (integer_constant): Correct too_many_digits calculation - in base 10 case. - -1999-09-09 Andreas Schwab <schwab@suse.de> - - * doc/c-arm.texi: Fix arguments of @var to not contain - punctuation. - -1999-09-08 Philip Blundell <pb@nexus.co.uk> - - * config/tc-arm.c (s_thumb_set): Only support interworking for ELF - and COFF targets. - (md_parse_option): Only support -k flag for ELF and COFF targets. - -Tue Sep 7 13:28:59 1999 Jeffrey A Law (law@cygnus.com) - - * config/tc-hppa.c (pa_ip): Put strict register checks before - call to pa_parse_number. - - * config/tc-hppa.c (pa_ip): Support 'Z' argument. - -1999-09-06 Ian Lance Taylor <ian@zembu.com> - - * config/obj-coff.c: Add ATTRIBUTE_UNUSED as needed for - BFD_ASSEMBLER code. - -1999-09-06 Donn Terry <donn@interix.com> - - * as.c (perform_an_assembly_pass): Set SEC_DATA for data_section. - -Mon Sep 6 04:26:56 1999 Jeffrey A Law (law@cygnus.com) - - * config/tc-hppa.c (pa_ip): Get strict/non-strict mode from the - candidate instruction. Require registers for register arguments - when in strict mode. Require assemble-time constants for - constants when in strict mode. - (pa_get_absolute_expression): Require a constant when in strict - mode. - -1999-09-06 Nick Clifton <nickc@cygnus.com> - - * config/tc-m32r.c (md_longopts): Fix value for -Wnuh. - -1999-09-04 Steve Chamberlain <sac@pobox.com> - - * config/tc-pj.c: New file, supports picoJava in ELF. - * config/tc-pj.h: Ditto. - * configure.in (pjl*, pj*): New targets. - * Makefile.am: Rebuild dependencies. - (CPU_TYPES): Add pj. - (TARGET_CPU_CFILES): Add config/tc-pj.c. - (TARGET_CPU_HFILES): Add config/tc-pj.h. - * doc/c-pj.texi: New file. - * doc/as.texinfo: Add some PJ specifics. - * doc/all.texi: Add PJ to the list of all architectures, sort them - all alphabetically. - * doc/Makefile.in (CPU_DOCS): Add c-pj.texi. - * configure, Makefile.in, doc/Makefile.in: Rebuild. - -1999-09-02 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/obj-multi.h: Include obj-elf.h if OBJ_MAYBE_ELF. Reformat. - (obj_frob_file): Test for null pointer. - (OBJ_COPY_SYMBOL_ATTRIBUTES): Here too. - (OBJ_PROCESS_STAB): And here. - (elf_obj_sy): Remove - - * config/obj-elf.h: #ifndef everything defined in obj-multi.h, - except OBJ_PROCESS_STAB, which we #undef for ecoff. - (elf_obj_sy): Remove #ifndef OBJ_SYMFIELD_TYPE. - - * config/obj-coff.c (no_func): Remove. - (coff_format_ops): Change occurrences of no_func to 0, as we test - for 0 in obj-multi.h. - - * configure.in: Enable bfd for i386-coff when primary target is - bfd. Enable i386 elf,coff emulation support. Don't set - USE_EMULATIONS=1 or te_file=multi unless there is more than one - emulation to support. - *configure: Regenerate. - -1999-09-02 Nick Clifton <nickc@cygnus.com> - - * config/tc-mcore.c (mcore_s_section): Do not dump literals if a - .section .line directive is encountered. - -1999-09-01 Nick Clifton <nickc@cygnus.com> - - * config/tc-arm.c (md_section_align): Do not align sections in ELF - format. - - * as.c (show_usage): Add --gdwarf2 to list of options displayed. - * as.texinfo: Document --gdwarf2 command line option. - Add additional documentation of ARM command line switches. - -1999-08-30 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c (i386_intel_memory_operand): Combine - i386_is_reg and parse_register calls. Remove END_STRING_AND_SAVE - and RESTORE_END_STRING around parse_register calls. - (i386_operand): Here too. - (i386_is_reg): Remove. - (parse_register): Move as_bad calls from within this function to - callers. - -1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au> - - Based on a patch from H.J. Lu <hjl@gnu.org> - * config/tc-i386.c (parse_register): Handle FP regs specially. - (md_begin): Remove '(' and ')' from register_chars. - -1999-08-29 Doug Evans <devans@casey.cygnus.com> - - * config/tc-m32r.c (md_parse_option): Delete unrecognized option - error message (done elsewhere). - -Sat Aug 28 01:23:11 1999 Jeffrey A Law (law@cygnus.com) - - * config/tc-hppa.c (pa_ip): Do not allow '*' in 32bit completers. - -Sat Aug 28 00:26:26 1999 Jerry Quinn <jquinn@nortelnetworks.com> - - * config/tc-hppa.c (pa_ip): Replace 'f' by 'v'. Prefix float register - args by 'f'. - - * config/tc-hppa.c (pa_ip): Add args q, %, and |. - - * config/tc-hppa.c (pa_ip): Absorb white space in instructions - between args. - Add new completers. Fix bug in 64 bit condition handling. - - * config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH', - 'cS', and 'c*'. - - * config/tc-hppa.c (pa_ip): Place completers behind prefix 'c'. - - * config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!' - - * config/tc-hppa.c (pa_ip): Add case for 'I'. - -1999-08-27 Jim Wilson <wilson@cygnus.com> - - * dwarf2dbg.c (MAX_SPECIAL_ADDR_DELTA): Correct typo in comment. - (struct ls): Add frag field. Initialize it to zero. - (out_end_sequence): New local text_frag. Set it while in text section. - Replace address check with frag check. Set ls.frag to text_frag if - out_set_addr called. - (dwarf2_gen_line_info): Add explanatory comment. New local saved_frag. - Set it before switching sections. Replace address check with frag - check. Set ls.frag to saved_frag if out_set_addr called. - -1999-08-26 David Mosberger <davidm@hpl.hp.com> - - * dwarf2dbg.c (out_end_sequence): If address changed, directly - output "advance_pc" opcode instead of calling gen_addr_line(). - The latter has the undesired side-effect of creating a new row - in the debug line info matrix. + * configure.in: Recognise i[3456]86-chaosdev-storm-chaos. + * configure: Regenerate. -1999-08-26 Jim Wilson <wilson@cygnus.com> +2000-11-01 Nick Clifton <nickc@redhat.com> - * dwarf2dbg.c (out_end_sequence): Correct comments. Set last to - ls.last_filename if last is less than zero. Set ls.last_filename - when allocating new entry. - (dwarf2_gen_line_info): Save seg and subseg info before subseg_new - call. + * read.c (original_case_string): New global variable. + (read_a_source_file): Copy opcode string into + original_case_string if clobbering the case of the opcode. + * read.h: Export the definition of original_case_string. + * config/tc-arm.c (md_assembler): When parsing a .req + directive use the original opcode string, not the case + clobbered version. -1999-08-20 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-11-02 Nick Clifton <nickc@redhat.com> - * config/tc-i386.c (i386_index_check): Fix the displacement size - when INFER_ADDR_PREFIX. + * config/tc-mn10300.c (debug_line): Remove this static + variable. + (md_assemble): Call dwarf2_generate_asm_lineno instead of + dwarf2_where and dwarf2_gen_line_info. -1999-08-18 Nick Clifton <nickc@cygnus.com> +2000-11-02 Theo Honohan <th@futuretv.com> - * config/tc-arm.c (md_apply_fix3): If an offset is invalid, - display its value. + * config/tc-arm.c (do_msr): Improve error message. -1999-08-17 Ian Lance Taylor <ian@zembu.com> +2000-10-31 Eric Christopher <echristo@redhat.com> - * config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to - handle 0xffffNNNN constants correctly. + * config/tc-mn10300.c (md_apply_fix3): Use valuep if fully resolved + or pc-relative, else use fx_offset. -1999-08-16 Nick Clifton <nickc@cygnus.com> +2000-10-31 Jim Wilson <wilson@redhat.com> - * config/tc-arm.c (do_ldst): Look for register conflicts on stores - as well as loads. + * config/tc-ia64.c (struct md): New field tag_fixups. + (ia64_flush_insns): Handle tag_fixups. Error if dangling + qualifying predicate. + (emit_one_bundle): Delete spurious multiplication by one. Handle + tag_fixups. + (ia64_start_line): Error if dangling qualifying predicate. + (defining_tag): New static variable. + (ia64_unrecognized_line, case '['): Parse tags. + (ia64_frob_label): Create tag_fixups. + (md_assemble): Reset md.qp.X_op after using it. -1999-08-13 Nick Clifton <nickc@cygnus.com> +2000-10-31 Kaz Kojima <kkojima@rr.iij4u.or.jp> - * config/tc-arm.c (validate_offset_imm): Work on unsigned values. - (md_apply_fix3): Always pass positive values to - validate_offset_imm. + * config/tc-sh.c (md_apply_fix [BFD_RELOC_SH_PCDISP12BY2]): Allow 4094. -1999-08-12 Nick Clifton <nickc@cygnus.com> +2000-10-31 Bernd Schmidt <bernds@redhat.co.uk> - * config/tc-arm.c (skip_whitespace): New macro. - Formatting tidy ups. - - (md_apply_fix3): Store relocation offset in addend for ELF based - relocs. - (arm_force_relocation): Always generate relocs for Thumb function - calls. - -1999-08-11 Alan Modra <alan@spri.levels.unisa.edu.au> + * tc-ia64.c (extra_goodness): Only prefer F in slot 1 and B in slot 2. - * config/tc-i386.c (md_assemble): Remove dead code. intel_syntax - LONG_DOUBLE_MNEM_SUFFIX floating point is done in opcode/i386.h +2000-10-30 Kazu Hirata <kazu@hxi.com> -Tue Aug 10 12:58:31 1999 Jeffrey A Law (law@cygnus.com) + * expr.c: Fix formatting. + * flonum-copy.c: Likewise. + * flonum.h: Likewise. + * gasp.c: Likewise. + * hash.c: Likewise. - * config/tc-hppa.c (pa_build_unwind_subspace): Use sane section - flags for the unwind subspace. +2000-10-30 Hans-Peter Nilsson <hp@bitrange.com> - * config/tc-hppa.c (UNWIND_SECTION_NAME): Define for ELF. - (pa_build_unwind_subspace): Remove #if 0 wrapper. Select a - suitable relocation based on the size of the target's pointer. - Always Use subsegment zero for the unwinders. - (pa_level): Handle "2.0w". + * as.h (OPTION_MD_BASE): Bump to 190. + * as.c (parse_args) <std_longopts>: Add comment about the need to + check OPTION_MD_BASE in as.h. -Mon Aug 9 20:02:22 1998 J"orn Rennecke <amylaar@cygnus.co.uk> + * config/tc-sh.c (md_apply_fix): For ELF, do not "adjust back" VAL + for weak symbols. - * config/tc-d30v.c (write_2_short): Don't group repeat instructions - with the following instruction unless this was specified. +2000-10-27 Nick Clifton <nickc@redhat.com> -1999-08-09 Ian Lance Taylor <ian@zembu.com> + * configure.in (emulations): Add m68hc12. + * configure: Regenerate. + * po/gas.pot: Regenerate. - * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 for - certain sections, to match BFD changes. +2000-10-27 Aldy Hernandez <aldyh@redhat.com> + + * config/tc-arm.c (psrs): Remove lowercase versions of spsr* and + cpsr*. + (arm_psr_parse): Handle lowercase CPSR and SPSR. + +2000-10-25 Nick Clifton <nickc@redhat.com> + + * dwarf2out.c (dwarf2_generate_asm_lineno): New function: Generate + a DWARF2 line number information sequence. + + *dwarf2out.h: Add prototype for dwarf2_generate_asm_lineno. + + * read.c (generate_lineno_debug): Update comment describing why + DWARF2 line number debug information is not generated + automatically by this function. + + * doc/as.texinfo: Note that --gdwarf2 only works on some targets, + not all. + + * config/tc-arm.h (md_end): Define. + (DWARF2_LINE_MIN_INSN_LENGTH): Define. + + * config/tc-arm.c (output_inst): Call dwarf2_generate_asm_lineno + if generating DWARF2 line numbers. + (arm_end_of_source): New function. Call dwarf2_finish if + necessary. + + * config/tc-hppa.c (md_assemble): Use dwarf2_generate_asm_lineno. + * config/tc-m68hc11.c (m68hc11_new_insn): Use dwarf2_generate_asm_lineno. + * config/tc-sh.c (md_assemble): Use dwarf2_generate_asm_lineno. + +2000-10-25 Diego Novillo <dnovillo@cygnus.com> + + * tc-i386.c: Fix prototype declarations for functions taking no + arguments. + +2000-10-24 Diego Novillo <dnovillo@cygnus.com> + + * tc-i386.c (i386_operand_modifier): Remove. + (build_displacement_string): Remove. + (i386_parse_seg): Remove. + (i386_intel_memory_operand): Remove. + (i386_intel_operand): Re-write using recursive descent parser based + on MASM documentation. + (struct intel_parser_s): New structure. + (intel_parser): New static variable. + (struct intel_token): New structure. + (cur_token, prev_token): New static variables. + (T_NIL): Define. + (T_CONST): Define. + (T_REG): Define. + (T_BYTE): Define. + (T_WORD): Define. + (T_DWORD): Define. + (T_QWORD): Define. + (T_XWORD): Define. + (T_SHORT): Define. + (T_OFFSET): Define. + (T_PTR): Define. + (T_ID): Define. + (intel_match_token): New function. + (intel_get_token): New function. + (intel_putback_token): New function. + (intel_expr): New function. + (intel_e05): New function. + (intel_e05_1): New function. + (intel_e06): New function. + (intel_e06_1): New function. + (intel_e09): New function. + (intel_e09_1): New function. + (intel_e10): New function. + (intel_e10_1): New function. + (intel_e11): New function. -1999-08-08 Mumit Khan <khan@xraylith.wisc.edu> +2000-10-20 Jakub Jelinek <jakub@redhat.com> - * Makefile.am (noinst_SCRIPTS): Change .gdbinit to $(GDBINIT). - (EXTRA_SCRIPTS): Define to keep automake happy. - * Makefile.in: Rebuild. + * config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p + instructions to loose any special insn->architecture mask. -1999-08-08 Ian Lance Taylor <ian@zembu.com> + * config/tc-sparc.c (v9a_asr_table): Add v9b ASRs. + (sparc_md_end, sparc_arch_types, sparc_arch, + sparc_elf_final_processing): Handle v8plusb and v9b architectures. + (sparc_ip): Handle siam mode operands. Support v9b ASRs (and + request v9b architecture if they are used). - * Makefile.am: Rename .dep* files to DEP*. - (MKDEP): Rename from DEP. Change all uses. Use $${srcdir} rather - than $(srcdir). Rename TCDEP targets to DEPTC. Rename OBJDEP - targets to DEPOBJ. - * Makefile.in: Rebuild. +2000-10-18 Michael Sokolov <msokolov@ivan.Harhan.ORG> + + * config/tc-m68k.c: Fix the previous misapplied patch. + +2000-10-18 Michael Sokolov <msokolov@ivan.Harhan.ORG> + + * config/tc-m68k.h (RELAX_RELOC_*): New definitions for both + BFD_ASSEMBLER and !BFD_ASSEMBLER. + * config/tc-m68k.c (md_convert_frag_1): Use them instead of + BFD_RELOC_*. + +2000-10-17 Kazu Hirata <kazu@hxi.com> + + * debug.c: Fix formatting. + * depend.c: Likewise. + * dwarf2dbg.c: Likewise. + * dwarf2dbg.h: Likewise. + * ecoff.c: Likewise. + * expr.c: Likewise. + * expr.h: Likewise. + * flonum-konst.c: Likewise. + * frags.h: Likewise. + +2000-10-17 Chandrakala Chavva <cchavva@redhat.com> + + * as.c: New option OPTION_TARGET_HELP. Prints all target specific + options. + * doc/as.texinfo: Added notes about this new option. + +2000-10-16 Hans-Peter Nilsson <hp@bitrange.com> + + * config/tc-sh.c (JREG): Remove. + (md_convert_frag): Remove #if 0:d code using JREG. + +2000-10-15 Diego Novillo <dnovillo@cygnus.com> + + * config/tc-i386.c (i386_operand_modifier): Only match + modifiers SHORT and FLAT if they are followed by a space. + (parse_register): When `allow_naked_reg' is set, do not confuse + identifiers that start with a register name with a register. + +2000-10-12 Kazu Hirata <kazu@hxi.com> + + * app.c: Fix formatting. + * as.c: Likewise. + * as.h: Likewise. + * bit_fix.h: Likewise. + * cgen.c: Likewise. + * cgen.h: Likewise. + * cond.c: Likewise. + +2000-10-11 Alan Modra <alan@linuxcare.com.au> + + * config/obj-elf.c (elf_frob_symbol): Revert 2000-10-07 change. + +2000-10-07 Alan Modra <alan@linuxcare.com.au> + + * config/tc-hppa.c (md_apply_fix): Remove plainly wrong assert. + Re-arrange function a little and improve error message. + + * write.c (write_relocs): Fix a comment. + + * config/obj-elf.c (elf_frob_symbol): Make section syms global on + link-once sections. + +2000-10-05 Jim Wilson <wilson@cygnus.com> + + * config/tc-ia64.c (resources_match): Handle IA64_RS_PRr. + +2000-10-05 Alan Modra <alan@linuxcare.com.au> + + * config/tc-i386.c: Delete some useless comments, reformat others. -1999-08-08 Jakub Jelinek <jj@ultra.linux.cz> + * config/tc-i386.h (TC_FIX_ADJUSTABLE): Add check to cover + non-global syms in linkonce sections. - * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg. +2000-10-04 Ralf Baechle <ralf@gnu.org> -1999-08-08 Ian Lance Taylor <ian@zembu.com> + * config/tc-ia64.c (operand_match): Don't use // style comments. + * config/tc-i370.c: Likewise. - * Makefile.am: Change all uses of itbl-test-ops to itbl-tops to - avoid problems on DOS filesystems. - * Makefile.in: Rebuild. +2000-09-29 Hans-Peter Nilsson <hp@axis.com> - * doc/as.texinfo (Section): Document 's' flag for COFF version. + Changes to handle varying register prefix and user symbol prefix. + * config/tc-cris.c (SYNTAX_RELAX_REG_PREFIX, + SYNTAX_ENFORCE_REG_PREFIX, SYNTAX_USER_SYM_LEADING_UNDERSCORE, + SYNTAX_USER_SYM_NO_LEADING_UNDERSCORE, REGISTER_PREFIX_CHAR): New. + (s_syntax, cris_force_reg_prefix, cris_relax_reg_prefix, + cris_sym_leading_underscore, cris_sym_no_leading_underscore): New. + (demand_register_prefix): New variable. + (md_pseudo_table): New pseudo ".syntax". + (md_longopts): New options --no-underscore and --underscore. + (cris_target_format): Return elf32-us-cris or elf32-cris depending + on symbols_have_leading_underscore. + (get_gen_reg): Accept or require REGISTER_PREFIX_CHAR. + (get_spec_reg): Ditto. + (cris_number_to_imm) <case BFD_RELOC_VTABLE_ENTRY>: Remove FIXME. + Fix formatting. + (md_parse_option) <case 'h' 'H'>: Deprecate; add reference to + --help. + <case OPTION_NO_US, case OPTION_US>: New. + (md_show_usage): Be brief and reformat to match continuation of + --help. + * po/gas.pot: Regenerate. -1999-08-08 Mumit Khan <khan@xraylith.wisc.edu> +2000-09-28 Alan Modra <alan@linuxcare.com.au> - * config/obj-coff.c (obj_coff_section): Handle 's' (shared) - section flag. + * config/tc-hppa.c (hppa_force_relocation): If OBJ_SOM, don't + force relocs for 12 bit branches. + (md_apply_fix): Similarly, adjust logic here. -1999-08-08 Ian Lance Taylor <ian@zembu.com> +2000-09-28 Alan Modra <alan@linuxcare.com.au> - * configure.in: Define and substitute GDBINIT. Change AC_OUTPUT - line to create ${GDBINIT} rather than .gdbinit. - * configure, Makefile.in, doc/Makefile.in: Rebuild. + * config/tc-hppa.c (md_apply_fix): Add fmt assertion. Don't + adjust for external and weak syms as we will use a reloc. Allow + for +8 offset when calculating limits of branches. + (hppa_fix_adjustable): Undo 2000-09-23 change. + (hppa_force_relocation): Likewise. Add fx_addsy assertion. + Correct distance calculation. + (tc_gen_reloc): Print the file name and line number if we can't + handle a fixup. -Fri Aug 6 12:12:44 1999 Jeffrey A Law (law@cygnus.com) + From John David Anglin <dave@hiauly1.hia.nrc.ca> + * config/tc-hppa.c (nonzero_dibits): Define. + (arg_reloc_stub_needed): Check each arg and return value + separately for zero case. + (pa_align): Declare argument `bytes'. - * config/tc-hppa.c (pa_ip, case '?'): Add missing break. +2000-09-25 Kazu Hirata <kazu@hxi.com> -Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com> + * config/tc-cris.c: Fix formatting. + * config/tc-d10v.h: Likewise. + * config/tc-d30v.c: Likewise. + * config/tc-d30v.h: Likewise. + * config/tc-fr30.c: Likewise. + * config/tc-fr30.h: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-m68k.h: Likewise. + * config/tc-pj.h: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-ppc.h: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-sh.h: Likewise. + * config/tc-sparc.c: Likewise. + * config/tc-v850.h: Likewise. + * config/tc-vax.h: Likewise. + * config/tc-w65.h: Likewise. + * config/tc-z8k.h: Likewise. - * config/tc-hppa.c (pa_ip): Add 64 bit condition completers. +2000-09-23 Alan Modra <alan@linuxcare.com.au> -1999-08-06 Jakub Jelinek <jj@ultra.linux.cz> + * config/tc-hppa.c (hppa_fix_adjustable): Do the external and weak + checks only for ELF. + (hppa_force_relocation): Likewise. - * config/tc-sparc.h (tc_fix_adjustable): Fix check for PIC local - non-adjustable symbols. +2000-09-22 Jim Wilson <wilson@cygnus.com> -Thu Aug 5 16:52:51 1999 Jerry Quinn <jquinn@nortelnetworks.com> + * config/tc-ia64.c (dv_sem): Add "stop". + (specify_resource, case IA64_RS_PR): Only handles regs 1 to 15 now. + (specify_resource, case IA64_RS_PRr): New for regs 16 to 62. + (specify_resource, case IA64_RS_PR63): Reorder (note == 7) test to + match above. + (mark_resources): Check IA64_RS_PRr. - * config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix. +2000-09-22 Michael Sokolov <msokolov@ivan.Harhan.ORG> -Thu Aug 5 23:05:56 1999 J"orn Rennecke <amylaar@cygnus.co.uk> + * config/tc-m68k.c (md_relax_table, m68k_ip, md_convert_frag_1, + md_estimate_size_before_relax): Redesign and clean up the + relaxation mechanism. - * config/tc-sh.c (md_assemble): Call as_bad when there are excess - operands. +2000-09-21 Kazu Hirata <kazu@hxi.com> -1999-08-05 Donn Terry <donn@interix.com> + * config/tc-ns32k.c: Fix formatting. + * config/tc-ns32k.h: Likewise. - * config/te-interix.h: New file. - * configure.in (i386-*-interix*): New target. - * configure: Rebuild. +2000-09-20 Kazu Hirata <kazu@hxi.com> -Wed Aug 4 13:12:17 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-m32r.c: Fix formatting. + * config/tc-m32r.h: Likewise. + * config/tc-m68851.h: Likewise. + * config/tc-m68hc11.c: Likewise. + * config/tc-m68hc11.h: Likewise. + * config/tc-m88k.c: Likewise. + * config/tc-mcore.c: Likewise. + * config/tc-mcore.h: Likewise. + * config/tc-mips.c: Likewise. + * config/tc-mips.h: Likewise. + * config/tc-mn10200.h: Likewise. + * config/tc-mn10300.h: Likewise. + * config/tc-tahoe.c: Likewise. + * config/tc-tahoe.h: Likewise. - * config/tc-hppa.c (pa_chk_field_selector): Allow 3 byte - selectors for ELF too. - (selector_table): Add "ltp" and "rtp" selectors. +2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG> -1999-08-04 Alan Modra <alan@spri.levels.unisa.edu.au> + * config/tc-vax.c (synthetic_votstrs): Remove jbssi and jbcci. + Likewise in relaxation description comments. - * config/tc-i386.c (i386_operand): No need to change - operand_string pointer in segment reg case before goto - do_memory_reference. Initialise displacement_string_start and - displacement_string_end after do_memory_reference label. - (i386_index_check): Add operand_string param, and print error - message on failure here. - (i386_intel_memory_operand): Instead of here. - (i386_operand): And here. - (INFER_ADDR_PREFIX): Enable. +2000-09-18 Alan Modra <alan@linuxcare.com.au> - * doc/c-i386.texi (i386-16bit): Document .code16gcc. + * config/tc-hppa.h (TC_FORCE_RELOCATION_SECTION): Allow + subtraction of two syms without emitting a relocation. - * config/tc-i386.h (DefaultSize): Define. Renumber following - opcode_modifier defines. + From David Huggins-Daines <dhd@linuxcare.com> + * config/tc-hppa.c (hppa_force_relocation): Force relocations for + global or weak symbols. - From Etienne Lorrain <etienne.lorrain@ibm.net> - * config/tc-i386.c (stackop_size): New variable. - (set_16bit_code_flag): Clear it here. - (set_16bit_gcc_code_flag): New function. - (md_pseudo_table): Add "code16gcc" entry. - (md_assemble): Set i.suffix for insns with DefaultSize modifier. +2000-09-15 Kazu Hirata <kazu@hxi.com> -1999-08-03 Ian Lance Taylor <ian@zembu.com> + * config/tc-h8300.h: Fix formatting. + * config/tc-h8500.c: Likewise. + * config/tc-h8500.h: Likewise. + * config/tc-hppa.h: Likewise. + * config/tc-i370.h: Likewise. + * config/tc-i386.h: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-i860.h: Likewise. + * config/tc-i960.h: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-ia64.h: Likewise. - * config/obj-coff.c (coff_frob_symbol): Always update set_end with - next_set_end even if the end symbol is being discarded. +2000-09-14 Kazu Hirata <kazu@hxi.com> - * gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER. - * output-file.c, symbols.c, config/tc-i386.c: Likewise. + * config/tc-a29k.c: Fix formatting. + * config/tc-alpha.c: Likewise. + * config/tc-arc.c: Likewise. + * config/tc-arc.h: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-arm.h: Likewise. + * config/tc-avr.c: Likewise. + * config/tc-avr.h: Likewise. + * config/tc-tic30.c: Likewise. + * config/tc-tic30.h: Likewise. + * config/tc-tic54x.c: Likewise. + * config/tc-tic54x.h: Likewise. + * config/tc-tic80.c: Likewise. + * config/tc-tic80.h: Likewise. + +2000-09-14 Timothy Wall <twall@cygnus.com> + + * config/tc-ia64.c (specify_resource): For PR%/PR63, note types of + parallel comparisons for later use. + (struct rsrc): Add parallel comparison type. + (resources_match): Skip special cases of PR usage (non-conflicting + parallel compares). + +2000-09-13 Kazu Hirata <kazu@hxi.com> + + * config/obj-ecoff.c: Fix formatting. + * config/obj-elf.c: Likewise. + * config/obj-elf.h: Likewise. + * config/obj-evax.h: Likewise. + * config/obj-generic.h: Likewise. + * config/obj-hp300.c: Likewise. + * config/obj-hp300.h: Likewise. + * config/obj-ieee.h: Likewise. + * config/obj-vms.c: Likewise. + * config/obj-vms.h: Likewise. + +2000-09-13 Anders Norlander <anorland@acc.umu.se> + + * config/tc-mips.c (md_begin): Recognize 4Kc, 4Km and 4Kp processors. + (md_parse_option): Ditto. + (md_longopts): Add -mips32 option. + (md_show_usage): Document new options. + (mips_ip): Assemble sdbbp 20 bit 'm' args for MIPS32. + (mips_ip): Assemble mfc0 with a sub-selection code. + (validate_mips_insn): Handle 'H' (OP_*_SEL) and 'm' (OP_*_CODE20). + (mips_cpu_to_str): New function. + (mips_ip): Use mips_cpu_to_str instead of printing numeric cpu value. + Use CPU_* defines instead of hardcoded numbers. + + * doc/as.texinfo: Document new options. + * doc/c-mips.texi: Ditto. + +2000-09-12 Kazu Hirata <kazu@hxi.com> + + * as.h: Fix formatting. + * asintl.h: Likewise. + * bit_fix.h: Likewise. + * config/obj-aout.c: Likewise. + * config/obj-aout.h: Likewise. + * config/obj-bout.c: Likewise. + * config/obj-bout.h: Likewise. * config/obj-coff.c: Likewise. - (seg_info_type): Remove. - (seg_info_off_by_4): Change to array of segT. - (s_get_segment): Adjust accordingly. - (obj_pseudo_table): Fully initialize sentinel entry. - - * config/tc-mips.c (append_insn): Correct INSN_SYNC test. From - Ralf Baechle <ralf@uni-koblenz.de>. - -1999-08-03 Etienne Lorrain <etienne.lorrain@ibm.net> - - * config/tc-i386.c (f16_3): New. Fixes 16 bit 3 byte nop. - -1999-08-03 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c: Indentation and white space changes. - (i386_index_check): New function. Add INFER_ADDR_PREFIX code, but - don't enable it by default. - (i386_intel_operand): Remove redundant prototype. - Move check on number of memory operands, and i.mem_operands++ - (i386_intel_memory_operand): To here. - Remove i386_immediate code from here. Remove special case code - for input and output using (%dx). Remove base/index checks and - call i386_index_check instead. Save initial operand_string - argument for error message. - (i386_operand): Remove redundant prototype. Move base/index - checks to i386_index_check. - (i386_displacement): Move intel mode check for non-zero - i.disp_operand - (i386_intel_memory_operand): To here. - -1999-07-30 Jakub Jelinek <jj@ultra.linux.cz> - - * config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option. - (sparc_ip): Warn if %g2 or %g3 register is used and not covered - by .register pseudo-op if -64 and --no-undeclared-regs. - (s_register, sparc_adjust_symtab): New functions. - * config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab): - Declare sparc_adjust_symtab as tc_adjust_symtab. - * doc/c-sparc.texi: Add description of #ignore special literal - for .register pseudo-op. - -1999-07-30 Catherine Moore <clm@cygnus.com> - - * config/tc-arm.c (tc_gen_reloc): Record the vtable entry in - the relocation's section offset. - -1999-07-29 Alan Modra <alan@spri.levels.unisa.edu.au> - - * write.c (fixup_segment): Fix generic error check overflow test. - - * config/tc-i386.c (pe): Change %d to %ld, %x to %lx, and cast - X_add_number to long. - -Wed Jul 28 02:04:24 1999 "Jerry Quinn" <jquinn@nortelnetworks.com> - - * config/tc-hppa.c (pa_ip): Add 'J' and 'K' code - processing. - -1999-07-27 Ian Lance Taylor <ian@zembu.com> - - * config/tc-sparc.h (tc_fix_adjustable): Don't adjust GOT, PLT, or - VTABLE relocations. - -1999-07-21 Mark Elbrecht <snowball3@bigfoot.com> - - * config/te-go32.h (COFF_LONG_SECTION_NAMES): Define. - - * configure.bat: Remove; obsolete. - * config/go32.cfg: Likewise. - -1999-07-21 Brad M. Garcia <bgarcia@fore.com> - - * configure.in (i386-*-vxworks*): New target. - * configure: Rebuild. - -1999-07-16 Jakub Jelinek <jj@ultra.linux.cz> - - * doc/c-sparc.texi: Document .register and .nword pseudo-ops. + * config/obj-coff.h: Likewise. + * dwarf2dbg.h: Likewise. + * expr.h: Likewise. + * flonum.h: Likewise. + * frags.h: Likewise. + * itbl-ops.h: Likewise. + * macro.h: Likewise. + * read.h: Likewise. + * sb.h: Likewise. + * struc-symbol.h: Likewise. + * subsegs.h: Likewise. + * symbols.h: Likewise. + * tc.h: Likewise. + * write.h: Likewise. + +2000-09-11 Kazu Hirata <kazu@hxi.com> + + * bignum-copy.c: Fix formatting. + * config/tc-i370.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-m68k.c: Likewise. + * ehopt.c: Likewise. + * flonum-copy.c: Likewise. + * flonum-konst.c: Likewise. + * flonum-mult.c: Likewise. + * literal.c: Likewise. + * read.c: Likewise. + * sb.c: Likewise. + * stabs.c: Likewise. + * subsegs.c: Likewise. + +2000-09-09 Philip Blundell <philb@gnu.org> + + * configure.in (arm*-*-uclinux*): New target. + * configure: Regenerate. -1999-07-16 Jakub Jelinek <jj@ultra.linux.cz> +2000-09-09 Kazu Hirata <kazu@hxi.com> - * config/tc-sparc.c (sparc_ip): Allow OLO10 relocations - on -64 and not pic. - (output_insn): Put OLO10's secondary addend into tc_fix_data. - (md_apply_fix3): Handle BFD_RELOC_SPARC_OLO10. - (tc_gen_reloc): Return two relocs for OLO10, LO10 and SPARC13. - * config/tc-sparc.h (RELOC_EXPANSION_POSSIBLE, - MAX_RELOC_EXPANSION): Define. - (TC_FIX_TYPE, TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise. + * input-file.c: Fix formatting. + * itbl-ops.c: Likewise. + * messages.c: Likewise. -1999-07-16 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-09-08 Philip Blundell <philb@gnu.org> - * config/tc-i386.c (intel_float_operand): Add prototype, make static. - (md_assemble): Localize *exp variable to if (fake_zero_displacement) - block. Print a warning if an 8-bit or 16-bit constant - displacement or immediate is truncated on output. - (i386_immediate): Ensure Imm16 is always legal for a 16-bit mode - immediate. - (i386_operand): Disallow immediate jump absolute operand. + * config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when + offset is negative. -1999-07-15 Ian Lance Taylor <ian@zembu.com> +2000-09-07 H.J. Lu <hjl@gnu.org> - * configure.in: Bump version number to 2.9.5. + * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM. * configure: Rebuild. - * dwarf2dbg.c (dwarf2_gen_line_info): Don't assume that long long - or %llx work. +2000-09-07 Kazu Hirata <kazu@hxi.com> -Thu Jul 15 02:45:30 1999 Jeffrey A Law (law@cygnus.com) + * atof-generic.c: Fix formatting. + * config/tc-mips.c: Likewise. + * config/tc-vax.c: Likewise. + * input-scrub.c: Likewise. - * config/tc-hppa.c (md_pseudo_table): Add ".dword" pseudo-op. - (cons_fix_new_hppa): Derive size of fixup from size of the object. +2000-09-07 Alexandre Oliva <aoliva@redhat.com> -1999-07-14 Philip Blundell <pb@nexus.co.uk> - - * symbols.c (dollar_label_name): Prepend LOCAL_LABEL_PREFIX if it - is defined. - * config/tc-arm.h (LOCAL_LABEL_PREFIX): Define to '.' for ELF. - - * config/tc-arm.c (md_begin): Set F_SOFTFLOAT in the output file - if -mno-fpu was given. - (tc_gen_reloc): Fix typo. Delete bogus code related to GOTPC - relocs. - (cons_fix_new_arm): Remove misleading comments. - -1999-07-14 Ian Lance Taylor <ian@zembu.com> - - * write.c (cvt_frag_to_fill): Use frag file and line in rs_org - error message. - (relax_segment): Likewise. After giving a rs_org error, convert - the frag to rs_align to avoid cascading errors. - -1999-07-12 Andreas Schwab <schwab@suse.de> - - * config/tc-m68k.c: Add some ATTRIBUTE_UNUSED. - -1999-07-11 Ian Lance Taylor <ian@zembu.com> - - * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED - as appropriate. Fill in structure initializations. Add variable - initializations. Add casts. - * dwarf2dbg.c (print_stats): Change i to size_t. - * listing.c (listing_listing): Change list_line to unsigned int. - -1999-07-10 Ian Lance Taylor <ian@zembu.com> - - * config/tc-ppc.h (tc_fix_adjustable) [OBJ_ELF]: Call S_IS_LOCAL - rather than checking for \001 and \002 in symbol name. - * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: Likewise. - -Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca> - - * configure.in (hppa*-linux-gnu*): New target. + * config/tc-sh.h (TARGET_FORMAT): Use sh-linux targets. + * configure.in (sh-*-linux*): Added. * configure: Rebuilt. -1999-07-08 Nick Clifton <nickc@cygnus.com> +2000-09-06 Kazu Hirata <kazu@hxi.com> - * doc/c-arm.texi (ARM Directives): Document .thumb_set directive. + * config/tc-hppa.c: Fix formatting. -1999-07-07 Nick Clifton <nickc@cygnus.com> + * ecoff.c: Fix formatting. - * config/tc-v850.c (v850_comm): Use symbol_get_obj() rather than - accessing symbolP directly. +2000-09-06 Alexandre Oliva <aoliva@redhat.com> -Tue Jul 6 10:41:42 1999 Jeffrey A Law (law@cygnus.com) + * configure: Rebuilt with new libtool.m4. - * config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol - for ELF. +2000-09-05 Kazu Hirata <kazu@hxi.com> -1999-07-05 Nick Clifton <nickc@cygnus.com> + * cgen.c: Fix formatting. + * config/tc-ia64.c: Likewise. - * config/tc-arm.c (ARM_EXT_V5): Define. - (ARM_ARCH_V5, ARM_ARCH_V5T): Define. - (md_begin): Detect ARM v5 architectures. - (md_parse_option): Accept arm v5 specification. - (md_show_usage): Documment -marmv5 switch. +2000-09-05 Nick Clifton <nickc@redhat.com> - * doc/c-arm.texi: Document -marmv5 command line option. - - * config/tc-arm.c (do_adrl): New function. Implement ADRL pseudo - op. - (validate_immediate_twopart): New function. Determine if a - constant can be computed by two ADD instructions. - (output_inst): Remove its command line parameter - it was never - used. - (md_apply_fix3): Support BFD_RELOC_ARM_ADRL_IMMEDIATE, used to - implememt the ADRL pseudo op. - (tc_gen_reloc): Generate a suitable error message if an ADRL - instruction tries to generate a real reloc. - - * doc/c-arm.texi: Document NOP, ADR and ADRL pseudo ops. - -Thu Jul 1 15:33:10 1999 Jeffrey A Law (law@cygnus.com) - - * config/tc-hppa.c (pa_ip): Convert the opcode and all completers - into lower case. - -1999-06-27 H.J. Lu <hjl@gnu.org> + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + * po/gas.pot: Regenerate. - * subsegs.c (subseg_text_p): Use 1/0 instead of true/false for - non BFD_ASSEMBLER case. +2000-09-05 Hans-Peter Nilsson <hp@axis.com> + + * config/tc-cris.c: Correct comment typos. + +2000-09-05 Eric Christopher <echristo@cygnus.com> + + * config/tc-mn10300.c: Cleanup. + (md_pcrel_from): Enable. + +2000-09-05 Alan Modra <alan@linuxcare.com.au> + + * expr.c (operand): Fix a comment typo. + * write.c (write_relocs): Fix a signed/unsigned warning. + + * config/tc-hppa.c (fudge_reg_expressions): New + (hppa_force_reg_syms_absolute): New. + (pa_equ): Allow reg_section expressions. + * config/tc-hppa.c (md_optimize_expr): Define. + (hppa_force_reg_syms_absolute): Prototype. + + * config/tc-hppa.c (pa_11_fp_reg_struct): Delete. + (pa_parse_number): Pass in arg to select fp reg parsing. + Return 1 to indicate format checks pass. If strict, then only + accept a register or register symbol. Return value in... + (pa_number): New static for pa_parse_number. + (FP_REG_BASE): Define. + (FP_REG_RSEL): Define. + (pre_defined_registers): Apply FP_REG_BASE and FP_REG_RSEL as + appropriate. White space changes. + (need_pa11_opcode): Don't bother passing any params, get them from + globals instead. + (pa_ip): Modify all calls to pa_parse_number and need_pa11_opcode. + Remove extraneous check in case 'Q'. + (pa_equ): Modify call to pa_parse_number to do strict parsing. If + reg, set section of resulting symbol to reg_section. + (pa_parse_space_stmt): Modify call to pa_parse_number. + (pa_space): Likewise. + + * config/tc-hppa.c: (md_apply_fix): Handle vtable relocs. + (hppa_force_relocation): Handle vtable relocs. + (pa_vtable_entry): New. + (pa_vtable_inherit): New. + (md_pseudo_table): Add entries for vtable pseudos. + (hppa_fix_adjustable): Reject reduction of R_PARISC_GNU_VTINHERIT + and R_PARISC_GNU_VTENTRY relocs. Reject reduction of relocs + against weak syms. + (tc_gen_reloc): Remove ELF_ARG_RELOC_INSN code. + (pa_type_args): Don't call symbol_get_bfdsym multiple times. + Set STT_PARISC_MILLICODE for OBJ_ELF when encountering a + millicode import. + * config/obj-elf.c (obj_elf_type): Allow md_elf_symbol_type to + specify a symbol type. + + * config/tc-hppa.h: Reorganize file a little, grouping OBJ_ELF + dependent things together. + (md_elf_symbol_type): Define. + + * config/tc-hppa.c (fix_new_hppa): Elide "$PIC_pcrel$0" pseudo + symbol. + * config/tc-hppa.h (tc_frob_symbol): Elide "$PIC_pcrel$0" here too. -1999-06-26 Mumit Khan <khan@xraylith.wisc.edu> + * config/obj-elf.h (obj_elf_vtable_inherit): Declare. + (obj_elf_vtable_entry): Declare. - * config/obj-coff.c (obj_coff_section): Mark writable sections as - data. + * config/obj-elf.c (obj_elf_vtable_inherit): Return struct fix * + and export function. + (obj_elf_vtable_entry): Similarly. + (elf_pseudo_table): Fix the damage with a cast. -1999-06-26 David Mosberger <davidm@hpl.hp.com> +2000-09-03 Richard Henderson <rth@cygnus.com> - * dwarf2dbg.c (dwarf2_gen_line_info): Don't call - out_end_sequence() when the address decreases due to a new frag. - (gen_dir_list): Set ls.file[i].dir to j + 1 (not j) because file - numbering starts with 1. + * config/tc-ia64.c (emit_one_bundle): Stop collecting insns + for template selection when a label is needed. -1999-06-23 Nick Clifton <nickc@cygnus.com> +2000-09-02 Kazu Hirata <kazu@hxi.com> - * config/tc-mcore.c (md_pseudo_table): Add .comm for ELF and allow - .section for COFF. - (mcore_s_text): Call obj_elf_text for ELF target. - (mcore_s_data): Call obj_elf_data for ELF target. - (mcore_s_section): No longer ELF specific. Call obj_coff_section - for COFF target. - (mcore_s_bss): New function: Dump literal table before changing - sections. - (mcore_s_comm): New function: Dump literal table before changing - sections. - - * config/obj-elf.c (obj_elf_common, obj_elf_data, obj_elf_text): - No longer static functions. - * config/obj-elf.h (obj_elf_common, obj_elf_data, obj_elf_text): - Provide prototypes for these functions. + * config/tc-ia64.c: Fix formatting. -1999-06-22 Ian Lance Taylor <ian@zembu.com> +2000-09-02 Nick Clifton <nickc@redhat.com> - * subsegs.c (subseg_text_p): Rewrite non BFD_ASSEMBLER case to use - a list of names, to try obj_segment_name, and to try abbreviated - names when using COFF without long section names. + * configure.in: Increase version number to 2.10.91. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * po/gas.pot: Regenerate. + * Makefile.in: Regenerate. - * config/tc-alpha.c: More use of symbol accessor functions. - * config/tc-arc.c: Likewise. - * config/tc-d30v.c: Likewise. - * config/tc-fr30.c: Likewise. - * config/tc-i860.c: Likewise. - * config/tc-m88k.c: Likewise. - * config/tc-mcore.c: Likewise. - * config/tc-ns32k.c: Likewise. - * config/tc-sparc.c: Likewise. - * config/tc-v850.c: Likewise. +2000-09-01 Alexandre Oliva <aoliva@redhat.com> - * config/tc-arc.c (get_arc_exp_reloc_type): Change uses of - sy_value with appropriate accessor functions. - * config/tc-arm.c (md_apply_fix3): Likewise. - * config/tc-d10v.c (AT_WORD_P): Likewise. - * config/tc-v850.c (reg_name_search): Likewise. + * config/tc-sh.h [OBJ_ELF] (TC_FIX_ADJUSTABLE): Define. + * config/tc-sh.c (md_apply_fix): Map 32-bit relocations that + become PC-relative to BFD_RELOC_32_PCREL. Reject 16- or 8-bit + similar relocs. + (sh_obj_adjustable): Return 1 for PC-relative offsets used in + branches. - * config/obj-ecoff.c (obj_ecoff_set_ext): Change uses of bsym to - use symbol_get_bfdsym instead. - * config/tc-ppc.c (md_assemble): Likewise. - * config/tc-v850.c (v850_comm): Likewise. +2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com> -1999-06-22 Jonathan Larmour <jlarmour@cygnus.co.uk> + * config/tc-sh.h (DIFF_EXPR_OK, GLOBAL_OFFSET_TABLE_NAME, + TC_RELOC_GLOBAL_OFFSET_TABLE, TC_RELOC_RTSYM_LOC_FIXUP): Define. + * config/tc-sh.c (sh_elf_cons, sh_elf_suffix): New functions. + [OBJ_ELF] (md_pseudo_table) <long, int, word, short>: Use them. + (GOT_symbol): New variable. + (md_undefined_symbol): Set it. - * config/tc-arc.c (tc_gen_reloc): Use symbol_get_bfdsym to get at - the symbol, rather than accessing the bsym member. - * config/tc-d10v.c (tc_gen_reloc): Likewise. - * config/tc-d30v.c (tc_gen_reloc): Likewise. - * config/tc-mcore.c (tc_gen_reloc): Likewise. - * config/tc-mn10200.c (tc_gen_reloc): Likewise. - * config/tc-mn10300.c (tc_gen_reloc): Likewise. - * config/tc-ns32k.c (tc_gen_reloc): Likewise. - * config/tc-tic30.c (tc_gen_reloc): Likewise. - * config/tc-v850.c (tc_gen_reloc): Likewise. +2000-09-01 Richard Henderson <rth@cygnus.com> -Mon Jun 21 16:45:19 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-ia64.c (match): Don't inline. + (extra_goodness): New. + (md_begin): Prefer nop.f and nop.b for best_template. - * tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type. - (hppa_gen_reloc_type): Conditionalize on BFD64. - (tc_gen_reloc): Re-enable ELF relocations. - * tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format. +2000-08-31 Kazu Hirata <kazu@hxi.com> -1999-06-21 Ian Lance Taylor <ian@zembu.com> + * as.c: Fix formatting. + * cond.c: Likewise. + * frags.c: Likewise. + * macro.c: Likewise. - * config/tc-arm.c (ldst_extend): Add parentheses to avoid - warning. - (do_ldst): Move assignment out of if condition. - (md_apply_fix3): Add casts to avoid printf format warnings. Add - parentheses to avoid warning. +2000-08-31 Eric Christopher <echristo@cygnus.com> -1999-06-21 Nick Clifton <nickc@cygnus.com> + * config/tc-mn10300.c: Cleanup and fix warnings. + (md_pseudo_table): Add initializers. + (md_show_usage): Cleanup. + (md_parse_option): Fix warnings. + (md_undefined_symbol): Fix warnings. + (md_conver_frag): Fix warnings. + (tc_gen_reloc): Fix warnings. + (md_apply_fix3): Fix warnings. + (check_operand): Fix warnings. - * config/tc-arm.c (arm_adjust_symtab): Use symbol_get_bfdsym() - macro to get at the BFD symbol associated with a GAS symbol. +2000-08-31 Alexandre Oliva <aoliva@redhat.com> -1999-06-19 Ian Lance Taylor <ian@zembu.com> + * acinclude.m4: Include libtool and gettext macros from the + top level. + * aclocal.m4, configure: Rebuilt. - * config/tc-ppc.c: Update for symbol handling changes. - * config/obj-coff.c: Likewise. +2000-08-30 Mark Hatle <mhatle@mvista.com> -Fri Jun 18 14:34:18 1999 Jeffrey A Law (law@cygnus.com) - - * tc-hppa.c: General cleanups of ELF support. No more spaces - and subspaces for ELF. - (GDB_DEBUG_SPACE_NAME): Delete definition for ELF. - (GDB_STRINGS_SUBSPACE_NAME): Likewise. - (GDB_SYMBOLS_SUBSPACE_NAME): Likewise - (UNWIND_SECTION_NAME): Likewise. - (space/subspace related structures): Conditionalize definitions - on OBJ_SOM. - (space/subspace directives and support routines): Conditionalize - definitions and references/uses on OBJ_SOM. - (label_symbol_struct): For ELF, track the symbol's segment. For - SOM track its space. - (pa_define_label, pa_undefine_label, pa_get_label): Corresponding - changes. - (USE_ALIASES): Kill for both SOM & ELF. - (pa_def_subspaces, pa_def_spaces): Corresponding changes. - (pa_space, pa_subspace): Corresponding changes. - (pa_spaces_begin): Corresponding chagnes. - (md_begin): Do not muck around with space/subspace stuff for - OBJ_ELF. - (md_apply_fix): Temporarily disable argument relocation stuff - for OBJ_ELF. - (tc_gen_reloc): Temporarily disable relocation generation for - OBJ_ELF - (pa_build_unwind_subspace): Similarly. - -1999-06-16 Nick Clifton <nickc@cygnus.com> - - * config/tc-arm.c (thumb_set): New pseudo op. - (text, data, section): Override these pseudo ops with ARM - specific versions. - (s_thumb_set): New function: Perform the same as a .set pseudo - op, but also mark the alias'ed symbol as being a Thumb - function. - (arm_s_text): New function: Perform the same as the .text - pseudo op, but dump the literal pool before changing - sections. - (arm_s_data): New function: Perform the same as the .data - pseudo op, but dump the literal pool before changing - sections. - (arm_s_section): New function: Perform the same as the - .section pseudo op, but dump the literal pool before changing - sections. - (arm_cleanup): Do not reset the current section before dumping - the literal pool. - -1999-06-17 Nick Clifton <nickc@cygnus.com> - - * config/tc-m32r.c (md_longopts): Fix OPTION_WARN_UNMATCHED and - OPTION_NO_WARN_UNMATCHED entries. - (md_parse_option): Generate a warning message if an unrecognised - option is encountered. - - * config/tc-d10v.c (do_not_ignore_hash): New variable. - (get_operands): When parsing an expression after an '@' symbol - has been detected, do not ignore '#' symbols. - (md_operand): Only ignore '#' symbols if do_not_ignore_hash is - false. - -1999-06-13 Ian Lance Taylor <ian@zembu.com> - - From K. Richard Pixley <rich@noir.com>: - * configure.in (ppc-*-vxworks*): New target. - * configure: Rebuild. + * config/tc-ppc.c (md_parse_option): Recognize -m405. -1999-06-12 Philip Blundell <philb@gnu.org> +2000-08-31 Kazu Hirata <kazu@hxi.com> - * config/tc-arm.c (tc_gen_reloc): Fix handling of GOTPC relocs. + * listing.c: Fix formatting. -1999-06-13 Ian Lance Taylor <ian@zembu.com> +2000-08-29 Kazu Hirata <kazu@hxi.com> - * write.c (adjust_reloc_syms): Rather than never reducing reloc - which refer to symbols in linkonce sections, permit reducing the - relocs if the symbol is local. + * app.c: Fix a comment typo. Fix formatting. -1999-06-12 Ian Lance Taylor <ian@zembu.com> +2000-08-25 J. David Anglin <dave@hiauly1.hia.nrc.ca> - * subsegs.c (subseg_text_p): New function. - * as.h (subseg_text_p): Declare. - * read.c (do_align): Use subseg_text_p to set the default fill. - * write.c (subsegs_finish): Likewise. - * config/obj-coff.c (write_object_file): Likewise. - * config/tc-i386.h (md_maybe_text): Don't define. - (md_do_align): Use subseg_text_p to set the default fill. - * config/tc-m32r.c (m32r_do_align): Likewise. - * config/tc-sh.c (sh_do_align): Likewise. - * config/tc-sparc.h (md_do_align): Likewise. + * tc-vax.c (md_convert_frag): Correctly calculate the pc relative + offset of the target destination for jmp instructions. + (md_assemble): Change mode to VAX_ABSOLUTE_MODE as per comments. -1999-06-12 David O'Brien <obrien@freebsd.org> +2000-08-24 Hans-Peter Nilsson <hp@axis.com> - * configure.in: (i[3456]86-*-freebsd*): Now defaults to ELF. - * configure: Rebuild. + * NEWS: Mention support for CRIS. -1999-06-12 Ian Lance Taylor <ian@zembu.com> +Thu Aug 24 20:41:05 2000 Denis Chertykov <denisc@overta.ru> - * dwarf2dbg.c: Include elf/dwarf2.h with "", not <>. - * Makefile.am: Rebuild dependencies. - * Makefile.in: Rebuild. + * config/tc-avr.h (TC_IMPLICIT_LCOMM_ALIGNMENT): New macros. + Sets `.lcomm' alignment to zero. - * config/tc-i386.c (i386_immediate): Remove unused label - seg_unimplemented. +2000-08-23 Alexandre Oliva <aoliva@redhat.com> - * struc-symbol.h: Put local_symbol code in ifdef BFD_ASSEMBLER. - * symbols.c: Likewise. - * config/obj-aout.c (obj_crawl_symbol_chain): Refer directly to - sy_next field when taking address, rather than symbol_next. + * config/tc-i386.h <OBJ_MAYBE_ELF, OBJ_MAYBE_COFF> + (TC_FIX_ADJUSTABLE): Define. - * dwarf2dbg.c: Change bfd_vma to addressT and bfd_signed_vma to - offsetT. - (out_set_addr): Don't use BYTES_PER_ADDRESS. Instead, get the - value from the output file architecture. - (dwarf2_gen_line_info): Ifdef BFD_ASSEMBLER specific code. - * dwarf2dbg.h: Change bfd_vma to addressT. +2000-08-23 Jim Wilson <wilson@cygnus.com> -1999-06-11 Ian Lance Taylor <ian@zembu.com> + * config/tc-ia64.c (output_unw_records): Set U & E flags only if + unwind.personality_routine is set. - * dwarf2dbg.h: Use PARAMS in function declarations. +2000-08-23 H.J. Lu <hjl@gnu.org> -1999-06-11 Martin Dorey <mdorey@madge.com> + * write.c (TC_FIX_ADJUSTABLE): Remove the duplicate. - * write.c (fixup_segment): Don't add symbol value for i960 ELF. - * config/tc-i960.c (s_leafproc): Don't call tc_set_bal_of_cal if - OBJ_ELF. - (md_apply_fix): Simplify BFD_ASSEMBLER handling. +2000-08-23 Alexandre Oliva <aoliva@redhat.com> -1999-06-11 Ian Lance Taylor <ian@zembu.com> + * config/tc-i386.h (TC_FIX_ADJUSTABLE): Do *NOT* define if target + environment is pe. - * config/tc-i386.c (md_apply_fix3): Add default case to switch. +2000-08-22 H.J. Lu <hjl@gnu.org> - * config/tc-sparc.c (md_pseudo_table): Remove pushsection and - popsection. + * config.in (STRICTCOFF): New for strict COFF. - * config/tc-sparc.c (sparc_ip): Add default case to reloc switch. + * configure.in: Define STRICTCOFF for i386-*-msdosdjgpp*, + i386-*-go32* and i386-go32-rtems*. + * configure: Rebuilt. - * read.c (read_a_source_file): Only declare inescape if - QUOTES_IN_INSN. + * config/obj-coff.c (obj_coff_endef): Follow the historical + behavior if STRICTCOFF is not defined. - * itbl-ops.c (itbl_disassemble): Change sprintf format strings to - match parameters. - (find_entry_byval): Add parens to avoid warning. + * doc/internals.texi: Document STRICTCOFF. - * as.c: If HAVE_ITBL_CPU, include "itbl-ops.h". +2000-08-22 Alexandre Oliva <aoliva@redhat.com> - * symbols.c (resolve_symbol_value): Don't permit subtraction of - undefined symbols. + * write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined. + (fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE. + * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove. + <OBJ_ELF, OBJ_COFF, TE_PE> (TC_FIX_ADJUSTABLE): Define. + * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove. + <OBJ_ELF> (TC_FIX_ADJUSTABLE): Define. + * config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h: + Likewise. -1999-06-10 Jakub Jelinek <jj@ultra.linux.cz> +2000-08-22 Eric Christopher <echristo@cygnus.com> - * config/tc-sparc.c (sparc_ip): Don't use side-effect expression - with isoctal. + * config/tc-mn10300.c: (md_apply_fix): New function. + (mn10300_force_relocation): New function. + (mn10300_fix_adjustable): New function. - * config/tc-sparc.c (synthetize_setuw, synthetize_setsw, - synthetize_setx): New functions. - (md_assemble): Broken the special cases into the above - functions. Make compiler happy if sizeof(bfd_vma)==4. - Fix sethi generated from set/setuw. If instructions have a relloc, - always clear the fields to be relocated in the opcode. - (sparc_ip): Remove special_case global variable. + * config/tc-mn10300.h: (TC_FORCE_RELOCATION): Define. + (TC_HANDLES_FX_DONE): Define. + (obj_fix_adjustable): Define. + (MD_APPLY_FIX3): Define. + (TC_LINKRELAX_FIXUP): Define. -1999-06-10 Ian Lance Taylor <ian@zembu.com> + * write.c: (TC_LINKRELAX_FIXUP): Define if not + previously defined. + (fixup_segment): Use TC_LINKRELAX_FIXUP. - Based on patches from John W. Woznack <jwoznack@concentric.net>: - * itbl-ops.c (itbl_get_reg_val): Add pval parameter. Return - indication of success rather than a value. - (itbl_get_val): Likewise. - (itbl_get_field): Use strcspn. Change delimiters to include - parens. - * itbl-ops.h (itbl_get_reg_val): Update declaration. - (itbl_get_val): Likewise. - * config/tc-mips.c (mips_ip): Update call to itbl_get_reg_val. + * doc/internals.texi: Document TC_LINKRELAX_FIXUP. - * symbols.c (copy_symbol_attributes): Convert local symbols to - regular symbols. +2000-08-21 Jason Eckhardt <jle@cygnus.com> -1999-06-10 Nick Clifton <nickc@cygnus.com> + * config/tc-i860.c (md_apply_fix3): Do not insert the immediate + if the fixup resulted in a relocation. - * config/tc-arm.c (md_parse_option): Add support for ARM920 and - ARM920t. +2000-08-18 Nick Clifton <nickc@redhat.com> -1999-06-07 Jakub Jelinek <jj@ultra.linux.cz> + * config/tc-arm.c (decode_shift): Replace as_tsktsk with as_warn. + Make reference to first element of shift_names explicit. - * config/tc-sparc.c (md_assemble): Fix up setx, support setsw. - Optimize set if sizeof(bfd_vma) == 64. - (sparc_ip): Fix sethi - without %hi() it should generate - R_SPARC_22 reloc, not R_SPARC_HI22. - (tc_gen_reloc): Handle BFD_RELOC_SPARC22. +2000-08-18 Alexandre Oliva <aoliva@redhat.com> -1999-06-07 Jakub Jelinek <jj@ultra.linux.cz> + * write.c (fixup_segment) [TC_DONT_FIX_NON_ADJUSTABLE]: Use + obj_fix_adjustable() and tc_fix_adjustable() to tell whether to + add a symbol's address. Removed all target-specific #ifdefs that + used to accomplished the same. + * config/tc-v850.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. + * config/tc-m68k.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. + * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. + * config/tc-i960.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. + * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. - * config/tc-sparc.c (md_begin): Handle native wordsize aliases. - (s_ncons): New function. - (native_op_table): New table. - (sparc_ip): Be more strict on %hi() etc.; prepare assembler for - R_SPARC_OLO10 handling. +2000-08-17 Kazu Hirata <kazu@hxi.com> -Mon Jun 7 10:22:16 1999 Richard Henderson <rth@cygnus.com> + * dwarf2dbg.c: Fix formatting. - * expr.h (struct expressionS): Revert last change; widen X_op. - * config/tc-alpha.c (md_begin): Check the field is wide enough. +2000-08-17 Nick Clifton <nickc@redhat.com> -Mon Jun 7 11:25:16 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + * config/tc-arm.c (decode_shift): Allow illegal shifts by zero + to be recoded as logical shift lefts by zero. - * Makefile.am (TARGET_CPU_CFILES): Add config/tc-fr30.c. - (TARGET_CPU_HFILES): Add config/tc-fr30.h. - (TARG_ENV_HFILES): Add config/te-epoc-pe.h. - * Makefile.in: Regenerated. +2000-08-16 Jim Wilson <wilson@cygnus.com> - * config/obj-elf.c (obj_elf_common): In MRI mode if called as - `common' pass on to s_mri_common. - (elf_pseudo_table): Pass 1 to obj_elf_common for `common'. + * config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle + postincrement modified registers. Handle IA64_OPND_R3_2 addl + source registers. + (note_register_values): Handle IA64_OPND_R3_2 operands. -1999-06-06 Richard Henderson <rth@cygnus.com> +2000-08-16 Jason Eckhardt <jle@cygnus.com> - * config/obj-elf.c (obj_elf_section): Don't free the return - value of demand_copy_C_string. + * config/tc-i860.c (md_operand): Silly typo fixed. -1999-06-05 Richard Henderson <rth@cygnus.com> +2000-08-16 Nick Clifton <nickc@redhat.com> - * dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol - creation logic from obj_elf_create_section. + * config/tc-arm.c (struct asm_shift): Delete. + (shift[]): Delete. + (enum asm_shift_index): New. + (struct asm_shift_properties): New. + (struct asm_shift_name): New. + (shift_properties[]); New. + (shift_names[]); New. - * config/obj-elf.c (elf_pseudo_tab): Add pushsection/popsection. - (section_stack): New. - (special_sections): Make const. - (obj_elf_section): Gut and rewrite parsing. - (obj_elf_change_section): New function broken out of obj_elf_section. - (obj_elf_parse_section_letters): Likewise. - (obj_elf_section_word): Likewise. - (obj_elf_section_type): Likewise. - (obj_elf_previous): Treat as a toggle. - (obj_elf_popsection): New. - * config/tc-ppc.c (ppc_section_word): Take str+len not ptr_str. - (ppc_section_type): Likewise. - * config/tc-ppc.h: Likewise. + (decode_shift): Use new structures. + Issue a warning is "ROR #0" is used. + Issue a warning if "ASR #0" or "LSR #0" is used. - * expr.h (struct expressionS): Don't make X_op a bitfield. - * config/tc-alpha.c: Update for symbol handling changes. - (md_apply_fix) [case GPREL]: Use now_seg instead of absolute_section. - (load_expression, emit_ir_load, emit_loadstore, emit_jsrjmp): Likewise. + (md_begin): Initialise arm_shift_hsh table from new + asm_shift_name array. -1999-06-05 Richard Henderson <rth@cygnus.com> +2000-08-16 Jakub Jelinek <jakub@redhat.com> - * dwarf2dbg.c (*): Convert to K&R + prototypes. - (dwarf2_gen_line_info): Kill unused variables. - (dwarf2_finish): Likewise. - (dwarf2_where): Likewise. - (dwarf2_directive_file): If we've only got a string, - hand off to s_app_file. - * ecoff.c: Move the include of ecoff.h. - * symbols.h (S_IS_FUNCTION): Prototype. + * config/tc-sparc.c: Kill all warnings. + (md_parse_option): Set -32/-64 for -xarch=, allow all -A archs + in -xarch= as well. + (md_show_usage): Update usage text. - * read.c (LEX_HASH): Supply a default. - (lex_type): Use it. - (s_globl): Update `c' after skipping whitespace. - * read.h (LEX_END_NAME, is_name_ender): New. - * expr.c (get_symbol_end): Respect it. +2000-08-16 Nick Clifton <nickc@redhat.com> -1999-06-04 Mark Klein <mklein@dis.com> + * config/tc-arm.c (do_bx): Warn about "bx px" not being very + useful. - * config/tc-hppa.c (md_begin): Convert local symbol dummy_symbol - to real if OBJ_SOM - (tc_gen_reloc): Still need bfd_abs_symbol in some relocs. +2000-08-15 Will Cohen <wcohen@redhat.com> - * config/tc-hppa.c: Update for symbol handling changes. + * config/tc-sh.h (DWARF2_LINE_MIN_INSN_LENGTH): Defined. -1999-06-03 Ian Lance Taylor <ian@zembu.com> + * config/tc-sh.c (md_assemble): Changed so debug_type + test performed for ppi_assemble + * config/tc-sh.c: Included dwarf2dbg.h. + (debug_line): Defined. + (md_assemble): Generates dwarf2 line info. + (sh_finalize): New function. Finalize dwarf2 info. + (assemble_ppi): Returns size of code generated. + (build_Mytes): Returns size of code generated. + (md_pseudo_table): Added "file" and "loc" psuedo ops. + * config/tc-sh.h (md_end): Defined. + (sh_finalize): Declared. - * cgen.c: Update for symbol handling changes. - * config/tc-m32r.c: Likewise. +2000-08-15 Alexandre Oliva <aoliva@redhat.com> - * config/tc-hppa.h: Update for symbol handling changes. - * config/tc-hppa.c: Likewise. + * config/tc-sh.c (md_apply_fix) [BFD_RELOC_32, BFD_RELOC_16]: Use + md_number_to_chars. - * config/tc-arm.h: Update for symbol handling changes. - * config/tc-arm.c: Likewise. - (symbol_make_empty): Remove. Just use symbol_create. +2000-08-14 Nick Clifton <nickc@redhat.com> - * symbols.c (symbol_set_tc): Correct name. + * config/tc-arm.c (do_bx): Allow "bx pc". - * Makefile.am: Rebuild dependencies. - ($(OBJS)): Don't depend upon struc-symbol.h. - (.dep1, .tcdep, .objdep): Create itbl-parse.h. - * dep-in.sed: Don't remove struc-symbol.h. - * Makefile.in: Rebuild. +2000-08-14 Jim Wilson <wilson@cygnus.com> - * doc/internals.texi (Symbols): Describe changes in symbol - handling. - -1999-06-03 Richard Henderson <rth@cygnus.com> - - * dwarf2dbg.c (dwarf2_gen_line_info): Use section_symbol - instead of doing the work by hand. - -1999-06-03 David Mosberger <davidm@hpl.hp.com> - - * dwarf2dbg.c (INITIAL_STATE): New macro encapsulating initial - state of line state-machine. - (struct ls): Collect DWARF2 line state-machine state in new member - SM. Add member EMPTY_SEQUENCE to keep track if a code sequence - resulted in any DWARF2 directives. - (reset_state_machine): New function. - (out_end_sequence): Ditto. - (dwarf2_gen_line_info): When switching sections or switching to a - lower text address, call out_end_sequence() first to terminate the - previous code sequence as code sequences MUST have monotonically - increasing addresses. - (dwarf2_finish): Call out_end_sequence() instead of open coding it. - -1999-06-03 David Mosberger <davidm@hpl.hp.com> - - * as.c (parse_args): Add option -gdwarf2 to allow requesting - DWARF2 debug info (line information only, at this point). - * as.h: Update comment about supported debug formats. - * dwarf2dbg.c, dwarf2dbg.h: New files. - * Makefile.am (GAS_CFILES, HFILES, GENERIC_OBJS): Add them. - - * expr.c (operand): Don't use [ for parens if we want an index op. - (op_encoding): Switch [ into O_index, if desired. - (op_rank): Renumber with O_index on bottom. - (expr): If O_index, match closing bracket. - * expr.h (O_index): New. - - * read.c (read_a_source_file): Conditionally allow matched " - in lines passed to md_assemble. - - * config/obj-elf.c (elf_pseudo_table): Add `common'. - -1999-06-03 Ian Lance Taylor <ian@zembu.com> - - Add support for storing local symbols in a small structure to save - memory when assembling large files. - * as.h: Don't include struc-symbol.h. - (symbolS): Add typedef. - * symbols.c: Include struc-symbol.h. - (local_hash): New static variable. - (save_symbol_name): New static function, from symbol_create. - (symbol_create): Call save_symbol_name. - (local_symbol_count): New static variable. - (local_symbol_conversion_count): Likewise. - (LOCAL_SYMBOL_CHECK): Define. - (local_symbol_make): New static function. - (local_symbol_convert): New static function. - (colon): Handle local symbols. Create local symbol for local - label name. - (symbol_table_insert): Handle local symbols. - (symbol_find_or_make): Create local symbol for local label name. - (symbol_find_base): Check for local symbol. - (symbol_append, symbol_insert): Check for local symbols. - (symbol_clear_list_pointers, symbol_remove): Likewise. - (verify_symbol_chain): Likewise. - (copy_symbol_attributes): Likewise. - (resolve_symbol_value): Handle local symbols. - (resolve_local_symbol): New static function. - (resolve_local_symbol_values): New function. - (S_GET_VALUE, S_SET_VALUE): Handle local symbols. - (S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise. - (S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise. - (S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise. - (S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise. - (symbol_previous, symbol_next): New functions. - (symbol_get_value_expression): Likewise. - (symbol_set_value_expression): Likewise. - (symbol_set_frag, symbol_get_frag): Likewise. - (symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise. - (symbol_mark_used_in_reloc): Likewise. - (symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise. - (symbol_mark_mri_common, symbol_clear_mri_common): Likewise. - (symbol_mri_common_p): Likewise. - (symbol_mark_written, symbol_clear_written): Likewise. - (symbol_written_p): Likewise. - (symbol_mark_resolved, symbol_resolved_p): Likewise. - (symbol_section_p, symbol_equated_p): Likewise. - (symbol_constant_p): Likewise. - (symbol_get_bfdsym, symbol_set_bfdsym): Likewise. - (symbol_get_obj, symbol_set_obj): Likewise. - (symbol_get_tc, symbol_set_tc): Likewise. - (symbol_begin): Initialize local_hash. - (print_symbol_value_1): Handle local symbols. - (symbol_print_statistics): Print local symbol statistics. - * symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER. - Declare new symbols.c functions. Move many declarations here from - struc-symbol.h. - (SYMBOLS_NEED_BACKPOINTERS): Define if needed. - * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set. - (struct symbol): Move bsym to make it clearly the first field. - Remove TARGET_SYMBOL_FIELDS. - (symbolS): Don't typedef. - (struct broken_word): Remove. - (N_TYPE_seg, seg_N_TYPE): Move to symbol.h. - (SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise. - (symbol_clear_list_pointers): Likewise. - (symbol_insert, symbol_remove): Likewise. - (symbol_previous, symbol_append): Likewise. - (verify_symbol_chain, verify_symbol_chain_2): Likewise. - (struct local_symbol): Define. - (local_symbol_converted_p, local_symbol_mark_converted): Define. - (local_symbol_resolved_p, local_symbol_mark_resolved): Define. - (local_symbol_get_frag, local_symbol_set_frag): Define. - (local_symbol_get_real_symbol): Define. - (local_symbol_set_real_symbol): Define. - Define. - * write.c (write_object_file): Call resolve_local_symbol_values. - * config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define. - (TARGET_SYMBOL_FIELDS): Don't define. - * config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field. If - ECOFF_DEBUGGING, add ECOFF fields. - (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. - * config/obj-multi.h (struct elf_obj_sy): Add local field. If - ECOFF_DEBUGGING, add ECOFF fields. - (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. - (ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define. - * config/tc-mcore.h: Don't include struc-symbol.h. - (TARGET_SYMBOL_FIELDS): Don't define. - (struct mcore_tc_sy): Define. - (TC_SYMFIELD_TYPE): Define. - * Many files: Use symbolS instead of struct symbol. Use new - accessor functions rather than referring to symbolS fields - directly. - - * read.c (s_mri_common): Don't add in value of line_label. - - * config/tc-mips.c (md_apply_fix): Correct parenthesization when - checking for SEC_LINK_ONCE. - - * config/tc-sh.h (sh_fix_adjustable): Declare. - - * app.c (input_buffer): New static variable. - (app_push): Save saved_input in allocated buffer. - (app_pop): Restored saved_input. - (do_scrub_chars): Change get parameter to take char * and int as - arguments. Change GET macro to pass input_buffer to get - function. Don't save input into allocated buffer. - * as.h (do_scrub_chars): Update declaration. - * input-file.c (input_file_get): Change to take char * and int. - Read data into passed in buffer. Remove static buffer. - * read.c (scrub_from_string): Change to take char * and int. Copy - data into passed in buffer. - - * hash.h: Neaten. Declare hash_traverse. - * hash.c: Complete rewrite based on BFD hashing code. - * gasp.c (chunksize): New variable. - * macro.c (macro_expand_body): Call hash_jam with NULL rather than - hash_delete. - -1999-05-28 Nick Clifton <nickc@cygnus.com> - - * config/tc-arm.c (md_apply_fix3): Add pipeline offset into reloc - addend unless the target uses an old ABI. - -Mon May 24 13:36:55 1999 Doug Evans <devans@canuck.cygnus.com> - - -Wchar-subscripts cleanup - * listing.c (listing_newline): Use unsigned char variable, so - calls to isascii,iscntrl are correct. - * atof-generic.c (atof_generic): Cast arg to isdigit, et. al. with - (unsigned char). - * ecoff.c (ecoff_directive_ent,ecoff_stab): Ditto. - * config/obj-elf.c (obj_elf_vtable_inherit): Ditto. - * config/tc-mips.c (mips_ip,mips16_ip): Ditto. - (my_getSmallExpression,get_number,s_mips_ent): Ditto. - -1999-05-28 Torbjorn Granlund <tege@matematik.su.se> - - * config/tc-m68k.c (m68k_ip): Check for disallowed index register - width for Coldfire. - (arch_coldfire_p): New #define. - (m68k_ip, m68k_init_after_args): Use arch_coldfire_p. - -1999-05-28 Linus Nordberg <linus.nordberg@canit.se> - - * config/tc-m68k.c (install_operand): Add places `n', `o'. - - * config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'. - (install_operand): Add place `N'. - (init_table): Add registers ACC, MACSR, MASK. - - * config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK. - - * config/tc-m68k.c: Change mcf5200 --> mcf. - (archs): Add mcf5206e, mcf5307. - (m68k_ip): Add format `u'. - (install_operand): Add place `m', `M', `h'. - (init_table): Add upper/lower registers. - - * config/m68k-parse.h (m68k_register): Add upper/lower registers. - -1999-05-28 Martin Dorey <mdorey@madge.com> - - * config/tc-i960.c: Several minor changes to add ELF and - BFD_ASSEMBLER support. - * config/tc-i960.h: Likewise. - * configure.in (i960-*-elf*): New target. - * aclocal.m4, configure: Rebuild. + * config/tc-ia64.c (md_longopts): Add -mconstant-gp and -mauto-pic. + (md_parse_option): Add OPTION_MCONSTANT_GP and OPTION_MAUTO_PIC. + (md_begin): Change assignment to md.flag to OR in the new bit. -1999-05-25 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-08-14 Mark Elbrecht <snowball3@bigfoot.com> - * config/tc-i386.c (md_apply_fix3): Only do 1999-05-17 fx_pcrel - reloc changes when defined(BFD_ASSEMBLER). + * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Set the debug + flag for storage types C_ARG, C_REGPARM, C_FIELD, C_MOS, C_MOE, + C_MOU, and C_EOS. -1999-05-17 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-08-14 Jason Eckhardt <jle@cygnus.com> - * config/tc-i386.c (tc_gen_reloc): Remove F and MAP macros. + * NEWS: Mention i860 support. - * write.c (write_print_statistics): Output to file, not stderr. +Mon Aug 14 11:49:12 2000 Jeffrey A Law (law@cygnus.com) - * expr.c (generic_bignum_to_int32,64): Prototype. + * config/tc-mn10300.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. - * read.c (s_lcomm_internal, sizeof_sleb128, sizeof_uleb128, - output_sleb128, output_uleb128, output_big_sleb128, - output_big_uleb128, output_big_leb128): Prototype. - (output_big_sleb128, output_big_uleb128): Make inline. - (output_big_leb128): Remove inline +2000-08-14 Andreas Schwab <schwab@suse.de> - From Maciej W. Rozycki <macro@ds2.pg.gda.pl> - * config/tc-i386.c (md_apply_fix3): Convert BFD_RELOC_16 with - fx_pcrel set to BFD_RELOC_16_PCREL. Similarly for BFD_RELOC_8. - Handle BFD_RELOC_16_PCREL and BFD_RELOC_8_PCREL. Return changed - value for correct overflow check in write.c:fixup_segment. - * write.c (fixup_segment): Move bitfield overflow checks to after - the md_apply_fix call. - * config/obj-coff.c (fixup_segment): Likewise. - * doc/internals.texi (CPU backend): Mention md_apply_fix modifying - valueT *val argument. + * doc/c-arm.texi (ARM Directives): Fix warnings from makeinfo. -Fri May 14 10:52:13 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> +2000-08-11 Andreas Schwab <schwab@suse.de> - * config/atof-ieee.c (gen_to_words): Correctly round a - denormalized number. Fix off-by-one in range checking for - exponent in a denormal. + * doc/c-i860.texi (Opcodes for i860): Remove braces from @item + argument. -1999-05-10 Nick Clifton <nickc@cygnus.com> +2000-08-11 Kazu Hirata <kazu@hxi.com> - * config/tc-mcore.c (parse_reg): Accept 'sp' as a valid register - name. + * expr.c: Fix formatting. + * config/obj-bout.c: Likewise. -Thu May 13 09:46:59 1999 Joel Sherrill (joel@OARcorp.com) +2000-08-10 Jason Eckhardt <jle@cygnus.com> - * configure.in (i386-*-rtemself*, sh-*-rtemself*): New targets. + * doc/c-i860.texi: Flesh out the i860 section more. -1999-05-12 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-08-10 Kazu Hirata <kazu@hxi.com> - * config/tc-i386.h (InvMem): New flag. Add to AnyMem. - (ReverseRegRegmem): Remove. - (ImmExt): New flag. Renumber some of the opcode_modifier bits. - * config/tc-i386.c (md_assemble): Test for PIII SIMD and AMD - 3DNow! via ImmExt opcode_modifier. Remove ReverseRegRegmem - kludge. + * symbols.c: Fix formatting. + * expr.c: Likewise. - From Doug Ledford <dledford@redhat.com> - * config/tc-i386.h (RegXMM): New for P/III. - * config/tc-i386.c: Add support for P/III. +Wed Aug 9 16:28:21 EDT 2000 Diego Novillo <dnovillo@cygnus.com> -Sat May 8 23:28:50 1999 Richard Henderson <rth@cygnus.com> + * tc-i386.c (md_assemble): Skip suffix check if the opcode modifier + has the IgnoreSize bit set. - * config/tc-ppc.c (md_parse_option): Recognize -mppc64bridge. - (md_begin): Allow ppc32 insns in ppc64bridge mode. - (ppc_insert_operand): Accept SIGNOPT in ppc64 mode. +2000-08-09 Alan Modra <alan@linuxcare.com.au> -Thu May 6 23:13:39 1999 Richard Henderson <rth@cygnus.com> + From Rodney Brown <RodneyBrown@mynd.com> + * configure.in: Use elf on Unixware 7 (i586-sco-sysv5uw7.1.0) + * configure: Regenerate. - * config/tc-i386.c (i386_immediate): Skip whitespace before - complaining about junk after expression. - (i386_displacement): Likewise. +2000-08-09 Kazu Hirata <kazu@hxi.com> -Thu May 6 19:50:14 1999 Richard Henderson <rth@cygnus.com> + * hash.c: Fix formatting. + * gasp.c: Likewise. - * symbols.c (symbol_find_base): Use memcpy instead of strcpy. - Don't copy before downcaseing. +2000-08-08 Jason Eckhardt <jle@cygnus.com> -1999-05-05 Catherine Moore <clm@cygnus.com> - - * tc-m68k.c: Include elf/m68k.h. - (m68k_elf_final_processing): New routine. - * tc-m68k.h (elf_tc_final_processing m68k_elf_final_processing): - Define. - -Mon May 3 10:26:03 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-i860.h: Rework completely for BFD_ASSEMBLER. + (i860_fix_info): New enum. + (MD_APPLY_FIX3): Define. + (WORKING_DOT_WORD): Define. + (TC_HANDLES_FX_DONE): Define. + (DIFF_EXPR_OK): Define. + (LISTING_HEADER): Define. + (TARGET_FORMAT): Select target format based on endian flag. + (TARGET_BYTES_BIG_ENDIAN): Default to little endian. + (target_big_endian): Add external declaration. - * config/tc-hppa.c (md_apply_fix): Handle 22 bit fmt insn like a - 17 bit fmt insn. + * config/tc-i860.c: All existing code reworked completely. Other + new code shown below. + (SYNTAX_SVR4): Define. + (target_warn_expand): New variable. + (md_shortopts): Declare and define (-Qy, -Qn, and -V options). + (md_longopts): Declare and define with new options (-EL, -EB, + and -mwarn-expand). + (md_show_usage): New function. + (md_operand): New function. + (obtain_reloc_for_imm16): New function. + (md_apply_fix3): New function. + (tc_gen_reloc): New function. -1999-04-30 Nick Clifton <nickc@cygnus.com> +2000-08-08 Stephane Carrez <Stephane.Carrez@worldnet.fr> - * config/tc-mcore.c (mcore_s_section): Dump literals before - changing section. + * config/tc-m68hc11.c (build_jump_insn): Make sure the + 2 bytes of the jump address are in the same frag. + (find): Accept 68hc12 register indirect modes. -1999-04-29 Nick Clifton <nickc@cygnus.com> + * NEWS: Mention 68HC11 & 68HC12 support. - * config/tc-mcore.c (md_apply_fix3): Insert reloc addend into insn - for COFF/PE port. +2000-08-07 Richard Henderson <rth@cygnus.com> -Mon Apr 26 12:34:37 1999 Doug Evans <devans@canuck.cygnus.com> + * config/tc-ia64.c (unwind): Add prologue_mask member. + (dot_vframe): Elide psp_gr record if it overlaps prologue_gr. + (dot_save): Likewise for pfs_gr, rp_gr, and preds_gr. + (dot_body): Clear unwind.prologue_mask. + (dot_prologue): Set it. Accept a register second argument. - * config/tc-fr30.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h. - (TC_INIT_FIX_DATA): Delete. - * config/tc-m32r.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h. - (TC_INIT_FIX_DATA): Delete. - * write.h (struct fix): New member fx_cgen, ifdef USING_CGEN. - * write.c (fix_new_internal): Initialize fx_cgen member. - * cgen.c (gas_cgen_record_fixup,gas_cgen_record_fixup_exp): Update. - (gas_cgen_md_apply_fix3): Update. - * config/tc-m32r.c (md_cgen_lookup_reloc): Update. - (md_cgen_record_fixup_exp): Update. - (FX_OPINFO_R_TYPE): Update. +2000-08-07 Kazu Hirata <kazu@hxi.com> - * frags.c (frag_var,frag_variant): Initialize fr_cgen here. - * config/tc-fr30.h (TC_FRAG_INIT): Delete. - * config/tc-m32r.h (TC_FRAG_INIT): Delete. - * frags.h (struct frag): Make opindex, opinfo ints. + * config/atof-ieee.c: Fix formatting. + * config/atof-tahoe.c: Likewise. - * config/tc-fr30.c (FX_OPINFO_R_TYPE): Delete, unused. +2000-08-06 Nick Clifton <nickc@cygnus.com> -1999-04-26 Tom Tromey <tromey@cygnus.com> + * config/tc-sparc.c (md_begin): Fix typo in recent formatting + work. - * aclocal.m4, configure: Updated for new version of libtool. + * doc/as.texinfo (Pseudo Ops): Update to include descriptions + of .popsection, .previous, .pushsection, .subsection, + .version, .vtable_entry, .vtable_inherit and .weak. -1999-04-22 Nick Clifton <nickc@cygnus.com> +2000-08-05 Kazu Hirata <kazu@hxi.com> - * config/tc-mcore.c (md_apply_fix3): Renamed function from - md_apply_fix. - (md_apply_fix3): Do not fix up absolute relocations against - symbolic values. + * config/tc-cris.c: Fix formatting. + * config/tc-i386.c: Likewise. + * config/tc-sparc.c (sparc_ip): Simplify the code. - * config/tc-mcore.h (MD_APPLY_FIX3): Define. +2000-08-04 Kazu Hirata <kazu@hxi.com> -1999-04-20 Nick Clifton <nickc@cygnus.com> + * config/tc-cris.c: Rearrange code for readability. + * config/tc-d10v.c: Fix formatting. + * config/tc-m32r.c: Likewise. + * config/tc-sparc.c: Likewise. - * config/tc-mcore.c (md_pseudo_table): Add intercepts for section - changes and data-in-text directives. - (mcore_cons): New function: intercept cons() operations. - (mcore_float_cons): New function: intercept float_cons() - operations. - (mcore_stringer): New function: intercept stringer() operations. +2000-08-02 Jim Wilson <wilson@cygnus.com> -1999-04-18 Ian Lance Taylor <ian@zembu.com> + * config/tc-ia64.c (emit_one_bundle): Call ia64_free_opcode + before ia64_find_opcode. + (md_assemble): Likewise. - * obj.h (struct format_ops): Change generate_asm_lineno field to - take no parameters. - * config/obj-ecoff.h (OBJ_GENERATE_ASM_LINENO): Don't define. +2000-08-01 Nick Clifton <nickc@cygnus.com> - * config/tc-alpha.c (find_opcode_match): Add default case to - switch. - (find_macro_match): Likewise. - (load_expression): Parenthesize && within ||. + * config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag. + Undo some formatting fixes. - * config/tc-alpha.h (TC_RELOC_RTSYM_LOC_FIXUP): Define. +2000-08-01 Kazu Hirata <kazu@hxi.com> -1999-04-17 Nick Clifton <nickc@cygnus.com> + * config/obj-som.c: Fix formatting. + * config/obj-ieee.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-v850.c: Likewise. - * config/tc-mcore.c (md_pseudo_table): Add overrides for .bss - .text .data .section pseudo ops. - (mcore_s_section): New function. Dump lits before changing secs. - (mcore_s_text): New function. Dump lits before changing secs. - (mcore_s_data): New function. Dump lits before changing secs. +2000-08-01 Nick Clifton <nickc@redhat.com> -1999-04-16 Gavin Romig-Koch <gavin@cygnus.com> + * doc/c-m68k.texi (section M680x0 Options): Turn into a table + index by command line option. - * config/tc-mips.c (mips_32bitmode): New. - (md_begin): Set mips_32bitmode if needed. - (mips_elf_final_processing): Don't set EF_MIPS_ARCH. - Set EF_MIPS_32BITMODE. +2000-08-01 Michael Sokolov <msokolov@ivan.Harhan.ORG> -Fri Apr 16 12:26:39 1999 Bob Manson <manson@charmed.cygnus.com> + * doc/c-m68k.texi (@cindex @samp{--pcrel}): Rewrite option description. + (@node M68K-Branch): Rewrite to match the reality. - * config/obj-coff.c (c_section_symbol): Fix typo in previous - change. +2000-07-31 Jason Eckhardt <jle@cygnus.com> -1999-04-16 Nick Clifton <nickc@cygnus.com> + * doc/c-i860.texi: New file. + * doc/Makefile.am (CPU_DOCS): Add c-i860.texi. + * doc/Makefile.in: Regenerate. + * doc/all.texi: Add I860 as relevant architecture. + * doc/as.texinfo: Include i860 dependent file c-i860.texi. - * config/tc-mcore.h (LOCAL_LABELS_FB): Define to 1. +2000-07-31 Kazu Hirata <kazu@hxi.com> -Thu Apr 15 16:52:09 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-d30v.c: Fix formatting. - * tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3" - expressions correctly. +2000-07-31 Michael Sokolov <msokolov@ivan.Harhan.ORG> + * config/tc-m68k.c (flag_keep_pcrel, OPTION_PCREL): Add --pcrel option. + (md_convert_frag_1, md_estimate_size_before_relax): When making DBcc + long emit a long branch if available instead of an absolute jump, never + emit absolute jumps for anything with --pcrel. -1999-04-15 Gavin Romig-Koch <gavin@cygnus.com> + * doc/c-m68k.texi: Document new command line option. - * config/tc-mips.c (mips_elf_final_processing): Set EF_MIPS_ARCH. +2000-07-29 Marek Michalkiewicz <marekm@linux.org.pl> -Mon Apr 12 23:45:07 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-avr.c: Use PARAMS macro in function declarations. + Don't declare md_pcrel_from_section (already in tc-avr.h). + (avr_operands): Use AVR_UNDEF_P and AVR_SKIP_P macros. + (avr_operand): Don't set (unsigned) op_mask to -1. - * tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd - and fmpynfadd instructions. +2000-07-28 Jason Eckhardt <jle@cygnus.com> -1999-04-11 Richard Henderson <rth@cygnus.com> + * configure.in: Add bits for i860-stardent-{sysv4, elf}*. + * configure: Regenerated. + * config/obj-elf.c (obj_elf_type): Recognize a fifth type + of operand to the .type directive (.e.g, "type"). - * as.h (environ): Declare it, if needed. - * as.c (dump_statistics): Don't declare environ. - * configure.in (environ): Detect declaration. - * configure, config.in: Rebuild +2000-07-28 Alan Modra <alan@linuxcare.com.au> - * config/tc-i386.c (i386_immediate): Accept @GOT relocations. - (i386_displacement): Allocate enough space for replacement buffer. - Clean up replacement buffer initialization. + * as.h (warn_comment, found_comment, found_comment_file): Declare. + * app.c (do_scrub_chars): Record where first comment found. + * read.c (read_a_source_file): Init found_comment on entry, and + notify whether comments found on exit. + * config/tc-hppa.c (md_shortopts): Add "c". + (md_longopts): Add warn-comment. + (md_parse_option): Handle it. + (md_show_usage): Show available options. + * config/tc-hppa.h (WARN_COMMENTS): Define if TE_LINUX -1999-04-11 Bob Manson <manson@charmed.cygnus.com>: +Thu Jul 27 11:25:01 2000 Andrew Cagney <cagney@b1.cygnus.com> - * subsegs.c (section_symbol): Don't create a new symbol if one - already exists; instead, use the existing one, but set its segment - and frag data if it hasn't already been defined. - * config/obj-coff.c (c_section_symbol): Likewise. + * config/tc-mn10300.c (md_convert_frag): Fix printfs. + (tc_gen_reloc): Add cast when assigning bfd_abs_symbol to + sym_ptr_ptr + (md_estimate_size_before_relax): Don't fall off end of function. -Sat Apr 10 20:10:02 1999 Richard Henderson <rth@cygnus.com> +2000-07-27 Kazu Hirata <kazu@hxi.com> - * tc-alpha.c (load_expression): Call as_bad instead of abort. + * config/tc-avr.c: Fix formatting. + * config/tc-ns32k.c: Likewise. -1999-04-08 Nick Clifton <nickc@cygnus.com> +2000-07-27 Alan Modra <alan@linuxcare.com.au> - * config/tc-mcore.c: New File: Support routines for MCore - assembler. - * config/tc-mcore.h: New File: Definitions for MCore assembler. - * config/obj-coff.c: Add support for mcore-pe target. + * config/tc-d10v.c (find_opcode): Remove extraneous `='. - * Makefile.am: Add support for MCore targets. - * Makefile.in: Regenerate. - * configure.in: Add support for MCore targets. - * configure: Regenerate. +2000-07-27 Kazu Hirata <kazu@hxi.com> - * doc/all.texi: Set MCORE. - * doc/as.texinfo: Document MCore specific command line options. - - * write.h: Prevent multiple inclusion. + * config/tc-d10v.c: Fix formatting. + * config/tc-z8k.c: Likewise. + * config/tc-sparc.c: Likewise. -1999-04-06 Ian Lance Taylor <ian@zembu.com> +2000-07-26 Dave Brolley <brolley@redhat.com> - * asintl.h (LC_MESSAGES): Never define. - * as.c (main): Don't pass LC_MESSAGES to setlocale if the system - does not define it. - * gasp.c (main): Don't pass LC_MESSAGES to setlocale if the system - does not define it. + * cgen.c (queue_fixup): Declare opinfo. + (gas_cgen_parse_operand): Mark unused parameters with ATTRIBUTE_UNUSED. + (gas_cgen_md_operand): Ditto. + (gas_cgen_md_apply_fix3): Ditto. - * Makefile.am (m68k-parse.c): If configuring in the source - directory, copy m68k-parse.y into the local directory before - running ylwrap, to remove spurious differences when generating - snapshots. - * Makefile.in: Rebuild. +2000-07-24 Mark Elbrecht <snowball3@bigfoot.com> - * config/tc-sparc.h (md_do_align): Just allocate the number of - bytes necessary, rather than always allocating 1024. + * config/obj-coff.c (obj_frob_symbol): Don't merge + labels. Don't merge if the symbol isn't constant. Return + immediately if a symbol is merged. -1999-04-04 Ian Lance Taylor <ian@zembu.com> +2000-07-22 Alan Modra <alan@linuxcare.com.au> - * listing.c (listing_newline): Add cast to avoid warning. - * read.c (generate_lineno_debug): Add cases to switch. Reindent. - * config/tc-i386.c (i386_scale): Add return value. - (build_displacement_string): Remove unused local temp_disp2. - (i386_intel_memory_operand): Add parentheses to avoid warning. - (i386_intel_operand): Remove unused local end_of_operand_string. - (i386_operand): Remove unused local operand_modifier. - (i386_operand): Add parens to avoid warning. + * frags.c (frag_align): Correct absolute section alignment. -1999-04-04 Don Bowman <don@pixsci.com> +2000-07-20 DJ Delorie <dj@redhat.com> - * configure.in: Add mips*-*-vxworks* target; have it define - MIPS_STABS_ELF. - * configure, config.in: Rebuild. + * config/obj-coff.c (obj_frob_symbol): revert previous change, + it breaks linking against DLLs. -1999-03-31 Nick Clifton <nickc@cygnus.com> +2000-07-20 Hans-Peter Nilsson <hp@axis.com> - * configure.in (emulations): Add support for arm-epoc-pe. + * configure.in: Add CRIS support. * configure: Regenerate. - * config/te-epoc-pe.h: New file. Define macros specific to - arm-epoc-pe target. - * config/tc-arm.h: Select epoc-pe-arm target format if configured - for arm-epoc-pe target. - -Mon Mar 29 10:15:40 CST 1999 Catherine Moore <clm@cygnus.com> - - * tc-mips.c (md_apply_fix): Adjust value for linkonce sections. - -Wed Mar 24 14:11:10 1999 Jeffrey A Law (law@cygnus.com) - - * tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Clean up code to - detect ",n" without a condition. - (pa_parse_neg_cmpsub_cmpltr): Likewise. - - -Tue Mar 23 11:28:23 1999 Jeffrey A Law (law@cygnus.com) - - * tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit - instruction is encoded with one bit. - - -1999-03-23 Ian Lance Taylor <ian@zembu.com> - - * doc/internals.texi (CPU backend): Mention that - line_separator_chars should not include newline. From thi - <ttn@mingle.glug.org>. - -1999-03-22 Doug Evans <devans@casey.cygnus.com> - - * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open. - * config/tc-m32r.c (md_begin): Update call to m32r_cgen_cpu_open. - -Sun Mar 21 18:08:18 1999 Richard Henderson <rth@cygnus.com> - - * tc-alpha.c (md_assemble): Allow '6' in an opcode. - -Thu Mar 18 10:55:30 1999 Jeffrey A Law (law@cygnus.com) - - * tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr. - - -Thu Mar 18 02:30:07 1999 Jeffrey A Law (law@cygnus.com) - - * tc-hppa.c (pa_ip, case 'd'): Do not allow ",n". - -1999-03-15 Martin Hunt <hunt@cygnus.com> - - * app.c (do_scrub_begin): Change '-' back to a symbol char - so we can use multiple opcodes on a line again. - - * config/tc-d30v.c: By default, warn if a symbol has - the same name as a register. Plus some minor - updates from the branch. - -1999-03-13 Nick Clifton <nickc@cygnus.com> - - * config/tc-d30v.c (md_apply_fix3): Handle BFD_RELOC_8, - BFD_RELOC_16 and BFD_RELOC_64. - -1999-03-12 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> - - * expr.c (expr): Add missing else. - -1999-03-12 Nick Clifton <nickc@cygnus.com> + * Makefile.am: (CPU_TYPES): Add cris. + (CPU_OBJ_VALID) [aout]: Add cris. + (MULTI_CPU_TYPES): Add cris. + (MULTI_CPU_OBJ_VALID) [aout]: Add cris. + [coff]: Only i386 and mips are valid. + (TARGET_CPU_CFILES): Add config/tc-cris.c. + (TARGET_CPU_HFILES): Add config/tc-cris.h. + (MULTI_CFILES): Add config/e-crisaout.c and config/e-criself.c. + Regenerate dependencies. + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * as.c: Declare crisaout, criself. + * config/tc-cris.h, config/tc-cris.c: New. + * config/e-criself.c, config/e-crisaout.c: New. + * po/POTFILES.in, po/gas.pot: Regenerate. - * config/tc-arm.c (md_apply_fix3): Improve error message. +2000-07-20 Kazu Hirata <kazu@hxi.com> -1999-03-11 Doug Evans <devans@casey.cygnus.com> + * read.c: Fix formatting. + * write.c: Fix formatting. - * Makefile.am (CPU_TYPES): Add fr30. - (cgen.o): Add $(CGEN_CPU_PREFIX)-desc.h dependency. - (fr30,m32r dependencies): Update. - * Makefile.in: Rebuild. +2000-07-19 H.J. Lu <hjl@gnu.org> - * cgen.c (gas_cgen_record_fixup): Update use of operand->type. - (gas_cgen_record_fixup_exp): Ditto. - (gas_cgen_finish_insn): Call cgen_operand_lookup_by_num. - (gas_cgen_md_apply_fix3): Ditto. Update call to set_vma_operand. - * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open. - (md_cgen_lookup_reloc): Update use of operand->type. - * config/tc-m32r.c (md_begin): Update call to fr30_cgen_cpu_open. - (md_convert_frag): Call cgen_operand_lookup_by_num. - (md_cgen_lookup_reloc): Update use of operand->type. - (m32r_cgen_record_fixup_exp): Ditto. - -1999-03-09 Jim Blandy <jimb@zwingli.cygnus.com> - - * config/tc-mips.c (md_show_usage): Fix message. - -1999-03-03 Nick Clifton <nickc@cygnus.com> - - * doc/c-arm.texi (ARM Syntax): Document new command line switches - and LDR reg,=<expr> instruction. - - * config/tc-arm.c: Add support for -mcpu=arm810, -mcpu=arm9 and - -mcpu=arm9tdmi. - -Fri Feb 19 09:36:30 1999 Ian Lance Taylor <ian@cygnus.com> - - * doc/c-arm.texi (ARM-Chars): Fix typo in use of '@'. - -1999-02-17 Nick Clifton <nickc@cygnus.com> - - This patch was created by: Scott Bambrough - <scottb@corelcomputer.com> - - * app.c: - Special cased '@' character. The '@' character is used as the - ARM assembler comment character, as a special character - and in ELF .symver pseudo-op's, and as a special character in - .type and .section pseudo-ops. - (symver_pseudo): New static variable. - (symver_state): New static variable. - (struct app_save): Add field 'symver_state'. - (app_push): Save global symver_state int struct app_save. - (app_pop): Restore global symver_state from struct app_save. - (do_scrub_chars): Special case handling of '@' character in - .symver pseudo-ops. - - * configure.in: Modified to recognize armv* uname syntax from ARM - Linux kernel. - * configure: Regenerated. - - * config/obj-elf.c (obj_elf_section): Allow '%' as well as '@' as - a prefix to the section's type. - (obj_elf_type): Allow '%' as well as '@' and '#' as prefixes to - the type's typename. - - * config/tc-arm.h: Add support for PIC generation: - (pic_code): New boolean. - (obj_relocate_extern): Define. - (TC_RELOC_RTSYM_LOC_FIXUP): Define - (TC_CONS_FIX_NEW): Define. - (tc_fix_adjustable): Define. - (GLOBAL_OFFSET_TABLE_NAME): Define. - - * config/tc-arm.c: Add support for PIC generation: - (line_seperator_chars): Allow ';' as a seperator for Linux. - (is_immediate_prefix): New macro. - (arm_parse_reloc): New function. - (s_arm_elf_cons): New function. - (do_branch): Special case for BFD_RELOC_ARM_PLT32. - (md_undefined_symbol): Special case handling for the Global Offset - Table's symbol. - (md_apply_fix3): Handle PIC relocs. - (tc_gen_reloc): Handle PIC relocs. - (md_parse_option): Add support for '-k' command line switch to - enable PIC generation. - (cons_fix_new_arm): New function. - (s_arm_elf_cons): New function. - -Tue Feb 16 16:31:53 1999 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Add comments for uses of AC_DEFINE. - * acinclude.m4: Likewise. - * acconfig.h: Remove. - * aclocal.m4: Rebuild. - * configure: Rebuild. - * Makefile.in: Rebuild. - * config.in: Rebuild. + * sb.c: Include <stdlib.h> if exists for abort (). -1999-02-15 Jim Lemke <jlemke@cygnus.com> +2000-07-19 Alan Modra <alan@linuxcare.com.au> - * config/tc-mips.c (mips_ip: case 'o'): Fix assertion failure for - non-constant offset from a base register. + * config/tc-hppa.c (hppa_fix_adjustable): Correct LR%/RR% comment. + (arg_reloc_stub_needed): #ifdef OBJ_SOM, not #ifdef SOM. + (pa_type_args): Same here. -1999-02-14 Ken Raeburn <raeburn@raeburn.org> +2000-07-17 Mark Elbrecht <snowball3@bigfoot.com> - * config/tc-alpha.c (md_show_usage): Put \ before newline in - strings always. + * config/obj-coff.c (obj_frob_symbol): Don't merge labels. Don't + merge if the symbol isn't constant. Don't call S_SET_EXTERNAL if + the storage class is already set. -Sat Feb 13 14:10:10 1999 Richard Henderson <rth@cygnus.com> +2000-07-17 Kazu Hirata <kazu@hxi.com> - * config/tc-alpha.c (cpu_types): Enable EV6 PALcode with -m21264. - (emit_insn): Look for pc-relative and no-overflow specifiers on - internal relocation types. + * config/tc-m68hc11.c: Fix formatting. + * config/tc-mn10200.c: Likewise. + * config/tc-mn10300.c: Likewise. + * config/tc-pj.c: Likewise. + * config/tc-tic80.c: Likewise. + * config/tc-w65.c: Likewise. -1999-02-13 Jim Blandy <jimb@zwingli.cygnus.com> +2000-07-17 Frank Ch. Eigler <fche@redhat.com> - * doc/c-mips.texi (MIPS Opts): Updated list of -mNNNN and - -mcpu=NNNN flags. + * expr.c (operand): Permit %bin literals if LITERAL_PREFIXPERCENT_BIN + is defined. - * config/tc-mips.c: Remove all the mips_NNNN variables; just use - mips_cpu instead. - (mips_4650, mips_4010, mips_4100): Variables removed. - (hilo_interlocks, gpr_interlocks, append_insn, macro_build, macro, - macro2, mips16_macro, mips_ip): Test mips_cpu, not the mips_NNNN - variables. - (md_begin): Don't bother initializing the mips_NNNN variables; - mips_cpu is set, and that's good enough now. - (md_parse_option): Have the -mNNNN options set mips_cpu instead of - the mips_NNNN variable. The -no-mNNNN flags are now no-ops. - (show): New function, to handle wrapping in the CPU lists. - (md_show_usage): Update lists of -mcpu and -mNNNN switches. +2000-07-15 Ian Lance Taylor <ian@zembu.com> -Sat Feb 13 00:17:26 1999 Richard Henderson <rth@cygnus.com> + * doc/c-mips.texi (MIPS Opts): Remove erroneous space after + @code. - * config/tc-i386.c (i386_intel_operand): Ignore `SHORT' rather - than treat as an immediate specifier. +2000-07-15 Alan Modra <alan@linuxcare.com.au> -Thu Feb 11 16:18:31 1999 Richard Henderson <rth@cygnus.com> + * config/tc-hppa.c (hppa_fix_adjustable): Use the same checks for + ELF as are used for SOM (except the 32-bit reloc one) to decide + whether a symbol can be reduced to a section symbol. Expand on + the comment for symbols involved in LR% and RR% expressions. - * config/tc-i386.c: Prototype many functions. - (set_intel_syntax): Accept `prefix'/`noprefix' specifiers. - (i386_immediate): Remove unused second argument. - (i386_intel_operand): Fix i386_is_reg typo. - (i386_operand): Use allow_naked_reg. - (output_invalid): Make operand int for K&R. +2000-07-14 Nick Clifton <nickc@cygnus.com> -Thu Feb 11 11:21:02 1999 Ian Lance Taylor <ian@cygnus.com> + * config/tc-mips.c (mips_disable_float_construction): New + static variable. Set to true if doubles should not be + constructed by loading two single width fp registers with + halves of the value. + (mips_ip): Test mips_disable_float_construction. + (md_longopts): Add command line switches --construct-floats + and --no-construct-floats. + (md_parse_option): Parse new command line options. + (md_show_usage): Describe new command line options. - * Makefile.am (EXTRA_as_new_SOURCES): Uncomment--fixed by automake - patch. - * Makefile.in: Rebuild. + * doc/c-mips.texi: Document new command line options. -1999-02-09 Doug Evans <devans@casey.cygnus.com> +2000-07-13 Koundinya K <kk@ddeorg.soft.net> - * Makefile.am (DISTCLEANFILES): Change cgen-opc.h to cgen-desc.h. - (cgen.o): Ditto. - (EXTRA_as_new_SOURCES): Comment out. - (.tcdep): <arch>-opc.h renamed to <arch>-desc.h. - * Makefile.in: Rebuild. - * doc/Makefile.in: Rebuild. - * configure.in: Require autoconf 2.13. Redo using_cgen handling. - Delete call to AM_CYGWIN32. Replace AM_EXEEXT with AC_EXEEXT. - (AC_OUTPUT): <arch>-opc.h renamed to <arch>-desc.h. - * configure: Rebuild. - * aclocal.m4: Rebuild. - * config.in: Rebuild. - * cgen.c: Include cgen-desc.h, not cgen-opc.h. - (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC. - (gas_cgen_cpu_desc): Renamed from gas_cgen_opcode_desc. - CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE. - CGEN_OPERAND_ATTR renamed to CGEN_OPERAND_ATTR_VALUE. - (gas_cgen_record_fixup): Remove unnecessary != 0 test. - (gas_cgen_record_fixup_exp): Ditto. - (gas_cgen_finish_insn): Ditto. Refer to operand table via cpu - descriptor, not global variable. - (gas_cgen_md_apply_fix3): Refer to operand_table via cpu - descriptor, not global variable. Refer to insert_operand handler - via cpu descriptor, not global function. - * cgen.h (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC. - * config/tc-fr30.c: Include opcodes/fr30-desc.h. - (*): gas_cgen_opcode_desc renamed to gas_cgen_cpu_desc. - CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE. - Update call to CGEN_OPERAND_TYPE,CGEN_INSN_OPERANDS. - * config/tc-m32r.c: Ditto. - (assemble_two_insns): Update calls to cgen_lookup_get_insn_operands. - (md_assemble): Ditto. - (md_convert_frag): Update call to CGEN_OPERAND_ENTRY. - -1999-02-09 Nick Clifton <nickc@cygnus.com> - - * config/tc-arm.c (md_apply_fix3): Fix handling of label1 - label2 - relocations for ELF targets. - -1999-02-08 Nick Clifton <nickc@cygnus.com> - - * configure.in: Add support for StrongARM target. + * configure.in: Remove the test /usr/dde for mips-*-sysv4*MP* * configure: Regenerate. -1999-02-05 Nick Clifton <nickc@cygnus.com> - - * config/tc-arm.h: Tidy OBJ_ELF and OBJ_COFF definitions. - - * config/tc-arm.c (md_apply_fix3): Fix BFD_RELOC_ARM_PCREL_BRANCH - for COFF ports. - -Wed Feb 3 11:35:47 1999 Richard Henderson <rth@cygnus.com> - - * config/tc-alpha.c (md_show_usage): Document pca56 and ev6 options. - -Mon Feb 1 20:37:30 1999 Catherine Moore <clm@cygnus.com> - - * config/tc-i386.h (LONG_DOUBLE_MNEM_SUFFIX): Define. - (INTEL_DWORD_MNEM_SUFFIX): Define. - (BYTE_PTR): Define. - (WORD_PTR): Define. - (DWORD_PTR): Define. - (XWORD_PTR): Define. - (SHORT): Define. - (OFFSET_FLAT): Define. - (FLAT): Define. - (NONE_FOUND): Define. - (No_dSuf): Define. - (No_xSuf): Define. - * config/tc-i386.c (set_intel_syntax): New routine. - (intel_syntax): Declare. - (allow_naked_reg): Declare. - (md_pseudo_table): Support .intel_syntax and .att_syntax. - (intel_float_operand): New routine. - (md_assemble): Handle INTEL_DWORD_MNEM_SUFFIX. - Handle brackets as well as parens. Call i386_intel_operand for - intel syntax. Reverse operands if appropriate. Handle new - suffixes. Handle movzx and movsx. - (i386_is_reg): New routine. - (i386_immediate): New routine. - (i386_scale): New routine. - (i386_displacement): New routine. - (i386_operand_modifier): New routine. - (build_displacement_string): New routine. - (i386_parse_seg): New routine. - (i386_intel_memory_operand): New routine. - (i386_intel_operand): New routine. - (i386_operand): Call i386_displacement, i386_immediate, - i386_scale, etc. instead of handling inline. - (parse_register): Handle registers without prefix. - -Mon Feb 1 12:24:58 1999 Catherine Moore <clm@cygnus.com> - - * configure: Regenerate. - * configure.in (arm-*-oabi): New. - (thumb-*-oabi): New. - * config/tc-arm.c (target_oabi): Declare. - (md_apply_fix3): Support REL relocs. - (md_parse_option): Handle -oabi. - (elf32_arm_target_format): New routine. - (md_longopts): Add OPTION_OABI. - * config/tc-arm.h: Redefine TARGET_FORMAT. - - -1999-01-28 Nick Clifton <nickc@cygnus.com> - - * write.c (write_relocs): Handle out of range error. - - * config/tc-fr30.c (fr30_fix_adjustable): New function. - (fr30_force_relocation): Default to 0. - - * config/tc-fr30.h (obj_fix_adjustable): Define. - (TC_FORCE_RELOCATION): Define. - - * cgen.c (gas_cgen_md_apply_fix3): Do not apply fixes to VTABLE - relocs. - -1999-01-16 Nick Clifton <nickc@cygnus.com> - - * config/tc-d30v.c (write_2_short): Do not generate a sequential - merge of two instructions if the left instruciton kills the right. - -1999-01-11 Doug Evans <devans@casey.cygnus.com> +2000-07-13 Hans-Peter Nilsson <hp@axis.com> - * Makefile.in: Regenerate. - * configure.in: Redo test for using cgen. + * configure.in (DEFAULT_EMULATION setting): Revert part of + 2000-07-01 change that set te_multi=multi unless set to tmips. * configure: Regenerate. -1999-01-09 Nick Clifton <nickc@cygnus.com> +2000-07-12 Mark Elbrecht <snowball3@bigfoot.com> - * config/obj-coff.h (obj_adjust_symtab): Prevent accidental - redefinition of this macro. + * config/obj-coff.c (coff_frob_section): Add padding to the last + section when aligning it increases its size. -Tue Jan 5 21:58:03 1999 Doug Evans <devans@canuck.cygnus.com> +2000-07-11 Kazu Hirata <kazu@hxi.com> - * config/tc-mips.c (mips_frob_file): Disable "Unmatched %hi reloc" - warning. + * config/tc-tic54x.c: Fix formatting. -1998-12-29 Gavin Romig-Koch <gavin@cygnus.com> +2000-07-10 Kazu Hirata <kazu@hxi.com> - * config/tc-mips.c (append_insn): For mips16, insert a nop between - a read of HI or LO and an immediatly following branch. + * config/tc-h8500.c: Fix formatting. + * config/tc-tic54x.c: Fix formatting. -1998-12-29 Gavin Romig-Koch <gavin@cygnus.com> +2000-07-10 Alan Modra <alan@linuxcare.com.au> - * config/tc-mips.c (md_begin): Another correction to the setting of - mips_eabi64. + * config/tc-hppa.c (md_apply_fix): Check fmt 12 and 22 pc-rel + displacements correctly. -1998-12-23 Gavin Romig-Koch <gavin@cygnus.com> + * read.h (s_abort): Add ATTRIBUTE_NORETURN. - * config/tc-mips.c (md_begin): Correct type-o in setting of mips_eabi64. +2000-07-10 Ryan Bradetich <rbradetich@uswest.net> -1998-12-21 Nick Clifton <nickc@cygnus.com> - - * config/tc-m32r.c (md_assemble): Emit a NOP after a relaxable 16 - bit insn when optimizing, so that parallelised instructions will - start on a 32 bit boundary. - -1998-12-19 Gavin Romig-Koch <gavin@cygnus.com> - - * config/tc-mips.c (mips_eabi64): New. - (md_begin): Set mips_eabi64. - (mips_elf_final_processing): Use it. - -1998-12-18 Gavin Romig-Koch <gavin@cygnus.com> - - * config/tc-mips.c (mips_elf_final_processing): - Correct setting of ABI in e_flags. + * hash.c (hash_insert): Add cast to obstruct_alloc to fix + warning. + (hash_jam): Ditto. -Wed Dec 16 16:17:22 1998 Dave Brolley <brolley@cygnus.com> +2000-07-09 Alan Modra <alan@linuxcare.com.au> - * config/tc-fr30.c (md_assemble): Warn about invalid instructions in delay slots. + From David Huggins-Daines <dhd@linuxcare.com> + * config/te-hppalinux64.h: Add a new emulation. + * configure.in (emulations): Add configure bits to support the + 64-bit Linux/parisc target. + * configure: Regenerate. -1998-12-16 Gavin Romig-Koch <gavin@cygnus.com> + * config/tc-hppa.c (md_parse_option): Support `-V' for ELF. + (md_shortopts): Add `V' for ELF. + + * config/tc-hppa.c (arg_reloc_stub_needed): Define as zero except + when SOM or ELF_ARG_RELOC are defined. + (pa_type_args): Only set symbol_arg_reloc_info when SOM or + ELF_ARG_RELOC are defined. + (pa_stringer_aux): Don't pa_check_current_space_and_subspace here.. + (pa_stringer): ..Do it here instead. Fix comment typos. + (hppa_force_relocation): Cast enums to int before comparing with + ints. + + From Ryan Bradetich <rbradetich@uswest.net> + * config/tc-hppa.c: Removed unneeded libbfd.h to fix macro + redifinition warning. + (md_apply_fix): Added cast from enum to int for fixP->fx_r_type. + (hppa_force_relocation): ditto + (md_apply_fix): Added cast to buf to fix warnings. + + * config/tc-hppa.h (pa_define_label, parse_cons_expression_hppa, + cons_fix_new_hppa, hppa_force_relocation): Prototype. + + * config/tc-hppa.c (reloc_type): It's an enum for OBJ_ELF. + (R_N0SEL, R_N1SEL): Define only for OBJ_SOM. + (tc_gen_reloc): Make `code' a reloc_type and `codes' a + reloc_type** to avoid warnings in switch. + (md_apply_fix): Make insn, val signed. Zap buf_wd and read insn a + little earlier instead. + + * config/tc-hppa.c (symbol_arg_reloc_info): Define for both som + and elf. + (pa_type_args): Use symbol_arg_reloc_info. + (struct pa_it): Make arg_reloc unsigned int. + (struct hppa_fix_struct): Likewise for fx_arg_reloc. + (pa_text, pa_data, pa_comm): Don't compile for TE_LINUX. + (pa_code): Delete. pa_text duplicates this function. + (md_pseudo_table): Call obj_elf_text for ".code" if TE_LINUX. + (fix_new_hppa): Argument offset is offsetT, arg_reloc is unsigned + int. + (cons_fix_new_hppa): Actually change selector to e_fsel when + warning about assuming so. + (tc_gen_reloc): More example elf arg reloc code. + (md_apply_fix): Use arg_reloc_stub_needed for elf too. + (hppa_force_relocation): Likewise. - * config/tc-mips.c (md_begin,md_parse_option): Handle vr4111. - -1998-12-15 Doug Evans <devans@casey.cygnus.com> + * config/tc-hppa.h: Use TARGET_ARCH_SIZE to select target include + files. + (pa_end_of_source): Prototype. + (hppa_fix_adjustable): Prototype. + (LABELS_WITHOUT_COLONS): Move it.. + * config/te-hppa.h: To here. - * cgen.c (gas_cgen_md_apply_fix3): Mark as an error, rather than a - warning, values that don't fit in the field. + * config/te-hppa64.h: New file. -1998-12-15 Gavin Romig-Koch <gavin@cygnus.com> + * config/tc-hppa.c: Use TARGET_ARCH_SIZE to select target reloc + type. + (md_apply_fix): Pass stdoutput to bfd_hppa_insn2fmt. Handle + format -10, -16, 16 relocs. + (hppa_elf_mark_end_of_function): Test for null + last_call_info->start_symbol - * config/tc-mips.c (mips_abi_string): New. - (md_parse_option,md_longopts): Add mabi. - (mips_elf_final_processing): Set e_flags based on mabi flag. + * config/tc-hppa.c (pa_ip): In case 'V', pass `strict' to + CHECK_FIELD, not INSERT_FIELD_AND_CONTINUE. Don't pass opcode to + re_assesmble_* functions. Delete extraneous statements. Fix + typos in comments. + (md_apply_fix): Compare against 1048575 in case 21. Don't pass + insn to re_assemble_*. -1998-12-15 Gavin Romig-Koch <gavin@cygnus.com> +2000-07-08 Ulf Carlsson <ulfc@engr.sgi.com> - * config/tc-mips.c (md_parse_option): Handle vr4111. + * doc/internals.texi (Expressions): Fix typo. -98-12-11 Ken Raeburn <raeburn@cygnus.com> +2000-07-08 Kazu Hirata <kazu@hxi.com> - * config/tc-h8300.c (build_bytes): Change message given if the - instruction requires H8/300H mode and we're not in Hmode, to - suggest that it may be the operand modes that are the problem, not - necessarily the opcode. + * config/tc-sh.c: Fix formatting. + * config/tc-tic54x.c: Fix formatting. + * depend.c: Fix formatting. + * flonum-konst.c: Likewise. + * flonum-mult.c: Likewise. -1998-12-10 Nick Clifton <nickc@cygnus.com> +2000-07-07 Kazu Hirata <kazu@hxi.com> - * config/tc-fr30.c: Add line separator character. + * config/tc-sh.c: Fix comments. + * config/obj-vms.c: Fix comments. + * config/tc-a29k.c: Likewise. + * config/tc-alpha.c: Likewise. + * config/tc-h8300.c: Likewise. + * config/tc-h8500.c: Likewise. + * config/tc-i370.c: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-m68hc11.c: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-mips.c: Likewise. + * config/tc-ns32k.c: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-z8k.c: Likewise. -Tue Dec 8 19:51:50 1998 Mark Klein <mklein@dis.com> +2000-07-06 Mark Elbrecht <snowball3@bigfoot.com> - * configure.in (hppa-*-mpeix*): New target. - * config/obj-som.h (obj_som_compiler): Declare. - * config/obj-som.c (compiler_seen): New static variable. - (obj_som_compiler): New function. - * config/tc-hppa.c: Update tc_data uses for change to bfd/som.h. - (md_pseudo_table): Add "compiler" if OBJ_SOM. - (pa_type_args): Set hppa_priv_level. - (pa_compiler): New static function if OBJ_SOM. - * configure: Rebuild. + * config/obj-coff.c (TC_COFF_SECTION_DEFAULT_ATTRIBUTES): New. + Default to '(SEC_LOAD | SEC_DATA)'. + (obj_coff_section) [BFD_ASSEMBLER]: Use it. -Tue Dec 8 15:00:50 1998 Ian Lance Taylor <ian@cygnus.com> + * doc/internals.texi (CPU Backend): Describe + TC_COFF_SECTION_DEFAULT_ATTRIBUTES. - * read.c (output_leb128): Don't mark as inline. +Thu Jul 6 17:20:58 2000 Andrew Cagney <cagney@b1.cygnus.com> -1998-12-08 Andrew MacLeod <amacleod@cygnus.com> + * as.c (parse_args): NULL terminate the long option list. - * config/tc-ppc.c (ppc_vbyte): Prototype and new function for - AIX .vbyte unaligned data support. - (md_pseudo_table): Add 'vbyte' to list of valid pseudos. - (ppc_elf_validate_fix): Add eh_frame to list of ELF relocatable - sections. +Tue Jul 4 14:08:28 2000 Andrew Cagney <cagney@b1.cygnus.com> -1998-12-07 Nick Clifton <nickc@cygnus.com> + * config/tc-d30v.h: Include "write.h" for fixS. + (d30v_start_line, md_pcrel_from_section): Add function prototypes. - * config/tc-d30v.c (md_assemble, do_assemble): Improve erroneous - input handling. +2000-07-05 Nick Clifton <nickc@cygnus.com> -Mon Dec 7 09:48:34 1998 Catherine Moore <clm@cygnus.com> + * config/tc-d30v.c (write_2_short): Further changes to warning + messages produced when combining EITHER_BUT_PREFER_MU attributed + opcodes. - * config/tc-arm.c (elf32_arm_force_relocation): Check for - BFD_RELOC_ARM_PCREL_BRANCH. +2000-07-05 DJ Delorie <dj@redhat.com> + + * MAINTAINERS: new + +2000-07-04 Alexandre Oliva <aoliva@redhat.com> + + * config/tc-arm.c (psrs): Accept combinations of flags. + +2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl> + + * config/tc-avr.c: Change _ () to _() around all strings marked + for translation (exception from the usual coding style). + (avr_opt): New struct variable, how the new switches are set. + (OPTION_MMCU): Define as 'm' and actually use. + (md_longopts): Add -mall-opcodes, -mno-skip-bug, -mno-wrap. + (show_mcu_list): New function, display the list of known MCUs. + (md_show_usage): Document the new switches. Call show_mcu_list. + (avr_set_arch): Change 'm' to OPTION_MMCU. + (md_parse_option): Call show_mcu_list if unknown MCU specified. + Handle the new switches. + (avr_operands): Disable warnings for undefined combinations of + operands if -mall-opcodes. Disable warnings for skipping two-word + instructions if enhanced core or -mno-skip-bug. + (avr_operand): Accept all addressing modes on avr1 if -mall-opcodes. + (md_apply_fix3): Reject 8K wrap if >8K or -mno-wrap. + (md_assemble): Accept opcodes not supported by MCU if -mall-opcodes. + (avr_ldi_expression): Warn about implicit lo8(). + * config/tc-avr.h (md_pcrel_from_section): Add prototype. + +2000-07-01 Koundinya K <kk@ddeorg.soft.net> + + * configure.in: Add entry for mips-*-sysv4*MP* + * configure: Rebuild + * config/tc-mips.c (mips_target_format): Return elf32-tradbigmips or + elf32-tradlittlemips for traditional mips targets. + * config/tc-mips.c (md_estimate_size_before_relax): Duplicate the + test for Link Once sections as in adjust_reloc_syms. + * config/te-tmips.h: New file for traditional mips targets. Define + TE_TMIPS. + +2000-06-29 Mark Elbrecht <snowball3@bigfoot.com> + + * config/obj-coff.c (obj_coff_setcion) [BFD_ASSEMBLER]: If the + flags argument is not present, don't change an existing section's + section's attributes. If the flags argument is present, warn if the + attributes don't match the section's current attributes. When + long section names are supported, set SEC_LINK_ONCE and + SEC_LINK_DUPLICATES_DISCARD for a new .gnu.linkonce section. + +Thu Jun 29 21:30:00 2000 Hans-Peter Nilsson <hp@axis.com> + + * config/obj-aout.c (obj_aout_type): Do not ignore for undefined + symbols; create them. + +2000-06-29 Mark Elbrecht <snowball3@bigfoot.com> + + * write.c (set_segment_vma): New: Set vma and lma for a segment. + (write_object_file) [BFD_ASSEMBLER && OBJ_COFF && TE_GO32]: Use it. + +2000-06-27 Aldy Hernandez <aldyh@redhat.com> + + * config/tc-mips.c (mips_ip): handle "(foo-.-4)" type of + expressions. Ignore the problem when handling 16 bit signed + immediates, because the assembler will take care of the relocation + later. + +2000-06-27 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (write_2_short): Do not allow opcodes with + the EITHER_BUT_PREFER_MU attribute to be combined into a reverse + sequential order, and emit warning messages if the input source + code contains constructs like that, or parallel constructs + containing such opcodes. + +2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl> + + * config/tc-avr.c (mcu_types): Rename avr4 to avr5, add avr4. + Add more MCU types for avr4 and avr5. Replace at94k{10,20,40} + with just at94k. Change AVR_ISA_85xx back to AVR_ISA_2xxx. + (md_show_usage): Update usage message. + (md_parse_option): Allow redefinition of MCU type within the + same avr[1-5] bfd machine type. Show both old and new MCU type + in the error message. + (md_apply_fix3): Support 8K wrap if AVR_ISA_MEGA is not set. + Simplify 8K wrap code. + +2000-06-25 Kazu Hirata <kazu@hxi.com> + + * config/obj-aout.c: Remove all uses of DEFUN. + * config/obj-ieee.c: Likewise. + * config/tc-sh.c: Fix comment typos. + * config/tc-tahoe.c: Likewise. + * config/tc-vax.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. + * config/tc-h8300.c (build_bytes): Assemble ldmac correctly. -Sun Dec 6 12:46:36 1998 Ian Lance Taylor <ian@cygnus.com> +2000-06-24 DJ Delorie <dj@cygnus.com> - * configure.in: Define TARGET_BYTES_{BIG,LITTLE}_ENDIAN after - checking the target type. - (mips-dec-bsd*): Set endian to little. - * configure: Rebuild. + * config/tc-i386.c (md_estimate_size_before_relax): Revert + more changes from Sept 1999 + (tc_i386_fix_adjustable): ditto + (md_apply_fix3): ditto - COFF weak symbol support, based on patches from Mark Elbrecht - <snowball3@usa.net>: - * config/obj-coff.h (S_IS_WEAK): Define if not BFD_ASSEMBLER. - * config/obj-coff.c (obj_coff_weak): New static function. - (obj_coff_endef) [both versions]: Handle weak symbols. - (coff_frob_symbol): Likewise. - (yank_symbols): Likewise. - (obj_pseudo_table): Add "weak". - - * configure.in (m68k-*-gnu*): New target. From Aymeric Vincent - <aymeric.vincent@emi.u-bordeaux.fr>. - * aclocal.m4: Rebuild with current tools. - * configure: Rebuild. +2000-06-24 Frank Ch. Eigler <fche@redhat.com> - * config/tc-alpha.c (emit_ldgp): Give an error message rather than - an assertion failure for a case we can't handle when OBJ_ECOFF. + * cgen.c (expr_jmp_buf_p): New validity flag for expr_jmp_buf. + (gas_cgen_parse_operand): Set it around expression() call. + (gas_cgen_md_operand): Test for it before longjmp(). - * expr.c (operator): And with 0xff to avoid problems with signed - char. +2000-06-24 Kazu Hirata <kazu@hxi.com> -1998-12-03 Nick Clifton <nickc@cygnus.com> + * config/tc-h8500.c: Remove all uses of DEFUN. + * config/tc-sh.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. - * config/tc-fr30.c (md_cgen_lookup_reloc): Generate - BFD_RELOC_FR30_48 instead of BFD_RELOC_FR30_32. + * config/tc-h8500.c: Fix typos in comments. -1998-12-02 Nick Clifton <nickc@cygnus.com> +2000-06-23 Frank Ch. Eigler <fche@redhat.com> - * config/tc-fr30.c (md_cgen_lookup_reloc): Enable relocs for - LDI:20 insn. + * expr.c (operand): Permit $hex literals if LITERAL_PREFIXDOLLAR_HEX + is defined. -Thu Nov 26 11:23:48 1998 Dave Brolley <brolley@cygnus.com> +2000-06-23 matthew green <mrg@redhat.com> - * config/tc-fr30.c (md_pcrel_from_section): Restore previous calculation - of pcrel point. + * expr.c (operand): Do not as_bad() if RELAX_PAREN_GROUPING is + defined. Fix error message for `[' grouping. -Tue Nov 24 17:21:52 1998 Nick Clifton <nickc@cygnus.com> +2000-06-22 Kazu Hirata <kazu@hxi.com> - * config/tc-fr30.c (md_pcrel_from_section): Fix calculation of - pcrel point. + * config/tc-h8300.c: Fix formatting and comment typos. -Tue Nov 24 14:54:38 1998 Nick Clifton <nickc@cygnus.com> +2000-06-22 Timothy Wall <twall@cygnus.com> - * config/tc-d10v.c (md_assemble): Make static 'etype' have file - scope. - (d10v_cleanup): Only generate previous insn if a multiline insn is - not pending. + * config/tc-ia64.c (note_register_values): Move premature QP + notation clearing into the appropriate place. -Fri Nov 20 11:41:13 1998 Nick Clifton <nickc@cygnus.com> +2000-06-22 Alan Modra <alan@linuxcare.com.au> - * config/tc-fr30.c (md_cgen_lookup_reloc): Add support for - FR30_OPERAND_I32. + * dep-in.sed: Escape literal `.'s on patterns. Trim off `../' + first before anything else. Add bin-bugs.h, emul.h and progress.h + Sort list of files as for $(OBJS) in Makefile.am. -Thu Nov 19 15:01:29 1998 Nick Clifton <nickc@cygnus.com> + * Makefile.am (DEP): grep for leading `/' in DEPA, and fail if we + find one. Remake dependencies. + ($(OBJS)): Add bin-bugs.h, emul.h, and progress.h Sort the list. + * Makefile.in: Regenerate. + * doc/Makefile.in: Regenerate. - * config/tc-arm.c (md_parse_option): Add support for -marm7xxx and - -marm6xxx command line switches. + * config/tc-i386.c (i386_displacement): Don't assume a constant + displacement is necessarily 16 bits when in 16 bit code mode. + (md_assemble): Instead size the displacement here after we know + for sure that a .code16gcc operand hasn't automatically added + operand size prefixes. -1998-11-18 Doug Evans <devans@casey.cygnus.com> +2000-06-21 H.J. Lu <hjl@gnu.org> - * Makefile.am (DEP): Use $(srcdir)/../mkdep. - (itbl-ops.o): Delete duplicate dependencies. - Rebuild dependencies. - Add fr30 dependencies. + * Makefile.am: Rebuild dependency. * Makefile.in: Rebuild. -Tue Nov 17 13:42:42 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-fr30.c (md_cgen_lookup_reloc): Updated to match latest - opcode list. - * listing.c: Ignore line terminator characters found inside - strings. - -Thu Nov 12 19:21:24 1998 Dave Brolley <brolley@cygnus.com> - - * po/gas.pot: Regenerated. +2000-06-21 Kazu Hirata <kazu@hxi.com> -Thu Nov 12 10:54:16 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-h8300.c (parse_reg): Make the function static. + (parse_exp): Likewise. - * config/tc-fr30.c (fr30_is_colon_insn): New name for - fr30_is_label_start(). Also checks for delay slot insns. +2000-06-20 DJ Delorie <dj@cygnus.com> - * config/tc-fr30.c (fr30_is_label_start): New function: Handle - FR30 instructions which contain a colon in the mnemonic. + * config/tc-i386.c (tc_i386_fix_adjustable): Revert change from + Sept 1999; RVA relocs need to be treated more like DIR32 relocs + for cygwin import libraries to work properly. - * config/tc-fr30.h (TC_START_LABEL): Define this macro. +2000-06-20 H.J. Lu <hjl@gnu.org> -Wed Nov 11 09:58:21 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-fr30.c: Removed currently superflous code. - -Tue Nov 10 13:13:05 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-fr30.h: New file. - * config/tc-fr30.c: Tweaking so that it will compile. - -Tue Nov 10 14:41:33 1998 Catherine Moore <clm@cygnus.com> - - * config/tc-d10v.h (obj_fix_adjustable): Define. - (TC_FORCE_RELOCATION): Define. - (d10v_force_relocation): Declare. - * config/tc-d10v.c (tc_gen_reloc): Handle Vtable relocs. - (md_apply_fix3): Handle Vtable relocs. - (d10v_fix_adjustable): New. - (d10v_force_relocation): New. - -Mon Nov 9 14:25:06 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-d30v.c: Change default behaviour to ignore potential - conflicts between register name and symbol names. - -Wed Nov 4 18:42:00 1998 Dave Brolley <brolley@cygnus.com> - - * configure.in: Add fr30-*-*. - * config/tc-fr30.c: New file. - * Makefile.in: Regenerated. - * config.in: Regenerated. - * configure: Regenerated. - * doc/Makefile.in: Regenerated. - * po/gas.pot: Regenerated. - -Mon Nov 2 20:54:16 1998 Doug Evans <devans@canuck.cygnus.com> - - * config/tc-m32r.c (assemble_two_insns): Ensure both insns - are 16 bit insns. - -Mon Nov 2 20:10:18 1998 Martin von Loewis <loewis@informatik.hu-berlin.de> - - * app.c (do_scrub_begin): Set characters above 127 to be symbol - characters. - (do_scrub_chars): Add some casts to unsigned char to avoid - unwanted sign extension. - * read.c (lex_type): Set characters about 127 to be symbol - characters. - * config/tc-i386.c (md_begin): Set identifier_chars and - operand_chars for values above 127. - -Mon Nov 2 15:05:33 1998 Geoffrey Noer <noer@cygnus.com> - - * configure.in: detect cygwin* instead of cygwin32* - * configure: regenerate - -Tue Oct 27 13:18:40 1998 Nick Clifton <nickc@cygnus.com> - - * listing.c: Add support for producing a listing from piped - input. - -Tue Oct 27 08:56:44 1998 Gavin Romig-Koch <gavin@cygnus.com> - - * config/tc-mips.c (hilo_interlocks): Remove mips_3900. - (append_insn): Account for the tx39's multiply behavior. - -1998-10-26 Michael Meissner <meissner@cygnus.com> - - * config/tc-m32r.c (assemble_two_insns): Rename assemble_two_insns - from assemble_parallel_insns. Add support for '->' to indicate - explicitly serializing the instructions. - (md_assemble): Ditto. - -Sat Oct 24 15:12:19 1998 Catherine Moore <clm@cygnus.com> - - * config/tc-sh.c (sh_fix_adjustable): Adjust EXTERN and - WEAK handling. - -Thu Oct 22 12:41:33 1998 Catherine Moore <clm@cygnus.com> - - * cgen.c (gas_cgen_md_apply_fix3): Revert last change. - -Thu Oct 22 10:03:15 1998 Ron Unrau <runrau@cygnus.com> - - * config/tc-mips.c : support frame and regmask/fregmask when - MIPS_STABS_ELF is specified. - -Wed Oct 21 11;34:51 1998 Catherine Moore <clm@cygnus.com> - - * config/tc-sh.c (sh_fix_adjustable): Only include if OBJ_ELF. - (md_apply_fix): Don't return 1 for VTABLE relocs. - * config/tc-sh.h (obj_fix_adjustable): Define only if OBJ_ELF. + * Makefile.am: Rebuild dependency. + * Makefile.in: Rebuild. + * configure: Likewise. + * doc/Makefile.in: Likewise. -Tue Oct 20 11:18:28 1998 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-06-20 Timothy Wall <twall@cygnus.com> - * doc/c-i386.texi: Replace occurences of "opcode" with - "instruction mnemonic", "instruction", or "mnemonic" when - referring to the name of an instruction. Use "opcode" when - referring to the sequence of machine bytes. + * doc/internals.texi (CPU backend): Add @itemx for + TC_START_LABEL_WITHOUT_COLON. + * doc/c-tic54x.texi: New. + * doc/as.texinfo: Add tic54x features and include primary tic54x + documentation file. + * doc/all.texi: Add C54X. + * doc/Makefile.am (CPU_DOCS): Add c-tic54x.texi. + * doc/Makefile.in: Regenerate. + * configure.in: Add tic54x and define LIBM for tic54x. + * configure: Regenrate. + * config/tc-tic54x.[ch]: New. + * config/obj-coff.h: Add tic54x. + * Makefile.am: (CPU_TYPES): Add tic54x. + (TARGET_CPU_CFILES): Add 'tc-tic54x.c'. + (TARGET_CPU_HFILES): Add 'tc-tic54x.h'. + (as_new_LDADD): Add $(LIBM). + * Makefile.in: Regenerate. - * config/tc-i386.c (opcode_chars): Rename to mnemonic_chars. - (is_opcode_char): Rename to is_mnemonic_char. - (md_assemble and i386_operand): Correct error messages from - "opcode" to "instruction mnemonic" - Rename throughout opcode[] -> mnemonic[], opp -> mnem_p, - MAX_OPCODE_SIZE -> MAX_MNEM_SIZE, - DWORD_OPCODE_SUFFIX -> DWORD_MNEM_SUFFIX, - WORD_OPCODE_SUFFIX -> WORD_MNEM_SUFFIX, - BYTE_OPCODE_SUFFIX -> BYTE_MNEM_SUFFIX, - SHORT_OPCODE_SUFFIX -> SHORT_MNEM_SUFFIX - LONG_OPCODE_SUFFIX -> LONG_MNEM_SUFFIX +2000-06-18 Stephane Carrez <stcarrez@worldnet.fr> - * config/tc-i386.h (*_MNEM_SUFFIX): Rename from *_OPCODE_SUFFIX. + * doc/Makefile.am (CPU_DOCS): Added 68hc11 file. + * doc/c-m68hc11.texi: Document 68HC11 and 68HC12 port. + * doc/as.texinfo: Likewise. - * config/tc-i386.c (i386_operand): Check for garbage after - register name. + * configure, Makefile.in: Regenerate. + * configure.in (emulations): Recognize m6811 and m6812. + * Makefile.am (CPU_TYPES, TARGET_CPU_CFILES, TARGET_CPU_HFILES): + Added files for 68hc11 and 68hc12 assembler. + * config/tc-m68hc11.c: Assembler for 68hc11 and 68hc12. + * config/tc-m68hc11.h: Header definition for that assembler. -Tue Oct 20 10:49:42 1998 Ian Lance Taylor <ian@cygnus.com> +2000-06-18 Nick Clifton <nickc@redhat.com> - * config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc - for BFD_ASSEMBLER to only change value when COFF if TE_PE. + * symbols.c (resolve_symbol_value): Use bfd_octets_per_byte + instead of OCTETS_PER_BYTE. -Mon Oct 19 20:20:42 1998 Catherine Moore <clm@cygnus.com> + * config/tc-v850.c: Fix compile time warnings. + * config/tc-ppc.c: Fix compile time warnings. - * config/tc-sh.h (obj_fix_adjustable): Define. - * config/tc-sh.c (sh_force_relocation): Handle VT relocs. - (md_apply_fix): Likewise. - (tc_gen_reloc): Likewise. - (sh_fix_adjustable): New. +2000-06-18 H.J. Lu <hjl@gnu.org> -Mon Oct 19 12:35:43 1998 Doug Evans <devans@seba.cygnus.com> + * configure.in: Don't emulate i386-pc-pe-coff with i386coff. + * configure: Rebuild. - * cgen.c (gas_cgen_finish_insn): Update handling of CGEN_INT_INSN_P. - * cgen.h (gas_cgen_finish_insn): Update prototype. - * config/tc-m32r.c (m32r_insn): CGEN_INT_INSN -> CGEN_INT_INSN_P. - cgen_insn_t -> CGEN_INSN_INT. - (make_parallel): Update handling of CGEN_INT_INSN_P. - (assemble_parallel_insn): Ditto. - (target_make_parallel): New function. - (md_assemble): Use it. +2000-06-17 Mark Elbrecht <snowball3@bigfoot.com> -Mon Oct 19 13:16:12 1998 Catherine Moore <clm@cygnus.com> + * config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER + to BFD_ASSEMBLER. - * config/tc-m32r.c (m32r_force_relocation): Fix typo. +2000-06-16 Nick Clifton <nickc@cygnus.com> -Sun Oct 18 18:48:57 1998 Jeffrey A Law (law@cygnus.com) + * config/tc-mips.c (md_parse_option): Accept RM5200,RM5230, + RM5231, RM5261, RM5721 and RM7000 as r5000 cpu variants. - * config/tc-sh.c (md_assemble): Make sure the entire opcode is - converted into lower case. + * doc/c-mips.texi: Document newly accepted cpu variants. -Fri Oct 16 13:36:34 CDT Catherine Moore <clm@cygnus.com> +2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com> - * cgen.c (gas_cgen_md_apply_fix3): Handle VTABLE relocs. - (gas_cgen_tc_gen_reloc): Likewise. - * config/tc-m32r.h (obj_fix_adjustable): Define. - * config/tc-m32r.c (m32r_fix_adjustable): New. - (m32r_force_relocation): Handle VTABLE relocs. + * config/tc-mips.h: Remove definition of ONLY_STANDARD_ESCAPES. -Wed Oct 14 11:33:38 1998 Nick Clifton <nickc@cygnus.com> +2000-06-13 Ulf Carlsson <ulfc@engr.sgi.com> - * doc/c-arm.texi (ARM Directives): Document .ltorn directive. + * macro.c (getstring): Make it possible to escape the quote + character. -Mon Oct 12 11:07:21 1998 Nick Clifton <nickc@cygnus.com> +Tue Jun 13 20:58:28 2000 Catherine Moore <clm@redhat.com> - * config/tc-m32r.c (assemble_parallel_insn): Convert second opcode - to lower case before parsing. + * config/tc-hppa.c (pa_export): Weak symbols can be global. - * config/tc-d30v.c (parallel_ok): Ignore conflicts when explicitly - parallel insns modift buts in the PSW as a side effect. +2000-06-13 H.J. Lu <hjl@gnu.org> -Thu Oct 8 10:18:33 1998 Nick Clifton <nickc@cygnus.com> + * configure: Regenerate. - * config/tc-d30v.c (find_format): Test for missing flag and - control registers. - - (md_apply_fix3): Fix error messages to avoid - assumption about presence of a symbol. +2000-06-09 Alan Modra <alan@linuxcare.com.au> - (parallel_ok): Disallow parallel instructions that both modify the - same flag register. + * app.c (do_scrub_begin): Don't default lex[';'] as a line + separator. + * doc/internals.texi (line_separator_chars): Semicolon is no + longer a default. Mention null and newline as defaults. - (find_format): Generate a warning if an odd numbered register is - used as the first register in a mutli-register instruction. + * read.c (is_end_of_line): Remove ifdef TC_HPPA. -Wed Oct 7 14:09:14 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-i386.h (line_separator_chars): Explicitly mention `;' + * config/tc-i860.h (line_separator_chars): Likewise. + * config/tc-h8300.c (line_separator_chars): Likewise. + * config/tc-i960.c (line_separator_chars): Likewise. + * config/tc-m68k.c (line_separator_chars): Likewise. + * config/tc-mips.c (line_separator_chars): Likewise. + * config/tc-ns32k.c (line_separator_chars): Likewise. + * config/tc-sparc.c (line_separator_chars): Likewise. + * config/tc-vax.c (line_separator_chars): Likewise. - * config/tc-d30v.c (md_apply_fix3): Do not assume that bad - relocations are always associated with a symbol. + * config/tc-h8300.c (comment_chars): Use string initialiser. + * config/tc-i960.c (line_comment_chars): Likewise. + * config/tc-z8k.c (comment_chars, line_comment_chars, + line_separator_chars): Likewise. -Tue Oct 6 09:31:15 1998 Catherine Moore <clm@cygnus.com> + * config/tc-arm.c (line_separator_chars): Always use `;', not just + for TE_LINUX. - * tc-sparc.h (TC_FORCE_RELOCATION): Define. - (elf32_sparc_force_relocation): Declare. - * tc-sparc.c (md_apply_fix3): Handle vtable relocs. - (tc_gen_reloc): Handle vtable relocs. - (elf32_sparc_force_relocation): New. +2000-06-08 Nick Clifton <nickc@cygnus.com> -Mon Oct 5 09:25:32 1998 Catherine Moore <clm@cygnsu.com> + * config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value + for size 1 fixes. - * symbols.c (S_IS_FUNCTION): New. - * config/tc-v850.h (obj_fix_adjustable): Define. - (TC_FORCE_RELOCATION): Define. - (v850_force_relocation): Declare. - * config/tc-v850.c (tc_gen_reloc): Use offset instead - of fx_addnumber for VTABLE reloc addends. - (md_apply_fix3): Handle VTABLE relocs. - (v850_fix_adjustable): New. - (v850_force_relocation): New. +2000-06-08 David O'Brien <obrien@FreeBSD.org> -Mon Oct 5 00:48:52 1998 Jeffrey A Law (law@cygnus.com) + * configure.in (VERSION): Update to show this is the CVS mainline. - * tc-hppa.c (fp_operand_format): Add some additional formats. - (pa_ip): Do not automatically promote into pa2.0 mode. - (pa_level): Handle ".level 2.0". +2000-06-08 Matthew Jacob <mjacob@feral.com> -Sun Oct 4 20:57:43 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + * config/tc-alpha.c (md_undefined_symbol): Properly understand that + $at is the integer register $r28, vs. both $r28 and the floating + point register $f28. - * config/tc-i386.c (md_assemble): Handle AMD_3DNOW_OPCODE. - * config/tc-i386.h (template.extension_opcode): Change to - unsigned int to allow full range of 8-bit opcode suffixes. - (None): Redefine as 0xffff. +2000-06-08 James E. Wilson <wilson@cygnus.com> - From Jeff B Epler <jepler@usgs.gov> - * doc/c-i386.texi (i386-SIMD): New section. + * config/tc-ia64.c (generate_unwind_image): Call ia64_flush_insns. + (dot_endp): Don't call ia64_flush_insns. + (emit_one_bundle): Don't delete prologue/body records from + unwind_record list in first loop. Rewrite second loop to account for + this. -Thu Oct 1 15:37:54 1998 Richard Henderson <rth@cygnus.com> +2000-06-07 David Mosberger <davidm@hpl.hp.com> - * read.c (discard_rest_of_line): New function. - * read.h: Declare it. - * config/tc-alpha.c (s_alpha_mask, s_alpha_frame): Use it. + * config/tc-ia64.c: Add missing prototypes. + (generate_unwind_image): Cast argument to output_unw_records call. -Thu Oct 1 10:33:53 1998 Nick Clifton <nickc@cygnus.com> +Wed Jun 7 22:44:14 2000 Denis Chertykov <denisc@overta.ru> - * config/tc-d10v.c (find_symbol_matching_register): New function. - (find_opcode): Cope with the case where a register name matches - a symbol name. + * config/tc-avr.c (avr_operand): fix the formatting of the comment. -Wed Sep 30 10:52:32 1998 Nick Clifton <nickc@cygnus.com> +Wed Jun 7 21:26:15 2000 Denis Chertykov <denisc@overta.ru> - * config/tc-v850.c (md_pcrel_from): Rename to - v850_pcrel_from_section. - (v850_pcrel_from_section): Do not resolves symbols in other - sections. + * config/tc-avr.c (AVR_ISA_???): moved to include/opcode/avr.h + (REGISTER_P): likewise. + (avr_opcodes): uses include/opcode/avr.h + (avr_operand): enable ld r,Z or st r,Z for at90s1200. - * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define. +2000-06-04 Alan Modra <alan@linuxcare.com.au> -Mon Sep 28 11:01:20 1998 Nick Clifton <nickc@cygnus.com> + * read.c (is_end_of_line): No ';' for TC_HPPA. Add missing + initializers too. - * config/tc-d10v.c (find_opcode): Generate an error if a register - is supplied for an operand that should not be a register. +2000-06-03 H.J. Lu <hjl@gnu.org> -Fri Sep 25 10:04:21 1998 Nick Clifton <nickc@cygnus.com> + * read.c (is_end_of_line): Put back `;'. - * config/tc-d30v.c (write_2_short): But do allow delayed branch - instructions to have another instruction in the right bin. +2000-06-03 Alan Modra <alan@linuxcare.com.au> -Thu Sep 24 09:28:34 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-i386.c (md_shortopts): Remove 'm', add 'q' to non-elf. - * config/tc-d30v.c (write_2_short): Do not allow instructions in - the right container if the left container holds a branch - instruction. +2000-06-01 Alan Modra <alan@linuxcare.com.au> -Wed Sep 23 10:54:29 1998 Nick Clifton <nickc@cygnus.com> + * expr.c (operand): Test is_end_of_line outside switch to catch + line separator chars that are also operators. + (operator): Return O_illegal for line separator chars. - * config/tc-d30v.c (reg_name_search): Only warn if a name matches - both a register name and symbol name. - (find_format): Allow correct parsing of MVTSYS and MVFSYS insns. + * read.c (is_end_of_line): Use 1 instead of 99. Don't set `;' + entry (or `!' entry for TC_HPPA). -Tue Sep 22 17:49:16 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-arm.c (my_get_float_expression): Cast to unsigned char + before indexing is_end_of_line. Remove redundant check for '\0'. + (fp_op2): Likewise. + * config/tc-h8500.c (md_assemble): Likewise. + * config/tc-mcore.c (md_assemble): Likewise. + * config/tc-tic30.c (tic30_find_parallel_insn): Likewise. + (md_atof): Likewise - * config/tc-d30v.c (write_2_short): Implement EITHER_BUT_PREFER_MU - execution unit class. + * config/tc-m88k.c (s_bss): Cast to unsigned char before indexing + is_end_of_line. + * config/tc-mcore.c (mcore_cons): Likewise. + (mcore_float_cons): Likewise. + (mcore_stringer): Likewise. + * config/tc-tic30.c (tic30_find_parallel_insn): Likewise. - (reg_name_search): If a name matches a register and a symbol, - prefer the register. - (find_format): Disallow flag registers when a general purpose - register is required. - If a number is required, but a register has been given, check to - see if a symbol with the same name as the register exists, and if - so, use that symbol. +2000-06-01 Scott Bambrough <scottb@netwinder.org> -Tue Sep 22 16:40:52 1998 Jim Wilson <wilson@cygnus.com> + * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly. - * config/obj-elf.h (ECOFF_DEBUGGING): Add missing parens. +2000-05-29 Nick Clifton <nickc@cygnus.com> -Tue Sep 22 15:44:21 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-sh.c: Fix compile time warning messages. - * config/tc-d30v.c (find_format): Do not accept flag registers as - general purpose registers. - (find_format): If an immediate value is expected at a given place - in a format, but a register name has been provided instead, check - to see if that register name matches the name of a predefined - symbol and if it does, then use the symbol instead. - (reg_name_search): If a register name matches a symbol name, - prefer the register name to the symbol name. + * config/tc-mips.c: Fix compile time warning messages. -Mon Sep 21 10:42:57 1998 Nick Clifton <nickc@cygnus.com> +2000-05-29 Philip Blundell <philb@gnu.org> - * config/tc-m32r.c (m32r_do_align): After inserting NOPs, reset - the previous insn to empty. + * doc/as.texinfo: Update copyright dates. + (Local Labels): Delete misplaced mention of ARM. + * NEWS: Mention ARM ELF support. -1998-09-20 Michael Meissner <meissner@cygnus.com> +2000-05-27 Alexandre Oliva <aoliva@cygnus.com> - * config/tc-ppc.c (md_apply_fix3): Do not break string into two - pieces, forcing the use of an ANSI compiler. + * config/tc-mn10300.c (md_assemble): Copy size to real_size before + it is modified, and use the real_size to compute the frag address + for dwarf2 line info. -Sun Sep 20 00:58:12 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> +2000-05-27 Alan Modra <alan@linuxcare.com.au> - * config/tc-m68k.h (TC_FORCE_RELOCATION): New macro. Force vtable - relocs. - * config/tc-m68k.c (md_apply_fix_2): Do nothing for vtable relocs. + * Makefile.am (DEP, DEP1, dep, dep-in, dep-am): Use a better sed + line-matching scheme to cope with automake moving variables around. + ($(TARG_CPU_O)): Remove dependency on TARG_CPU_DEP_@target_cpu_type@ + * Makefile.in: Regenerate. -Tue Sep 15 08:51:07 1998 Catherine Moore <clm@cygnus.com> - - * config/obj-elf.c (obj_elf_vtable_inherit): Handle arm - assembler syntax. - (obj_elf_vtable_entry): Likewise. - * config/tc-arm.h: Define TC_FORCE_RELOCATION for OBJ_ELF. - * config/tc-arm.c (md_apply_fix3): Handle VTABLE relocations. - (tc_gen_reloc): Likewise. - (arm_fix_adjustable): Likewise. - (elf32_arm_force_relocation): New. - (armelf_frob_symbol): Remove coff-style symbol support. +2000-05-26 Jakub Jelinek <jakub@redhat.com> + + * config/tc-sparc.c (sparc_relax): New. + (md_longopts): Add -relax and -no-relax options. + (md_parse_options, md_show_usage): Likewise. + (md_apply_fix3): Optimize tail call into branch always if possible. + +Thu May 4 15:27:07 2000 Donald Lindsay <dlindsay@cygnus.com> + + * config/tc-d10v.c (write_2_short, parallel_ok, md_assemble, + d10v_cleanup) implement Mitsubishi's newly explained branch-packing + rules, with warning when a GAS statement specifies a packing that + will result in an instruction being squashed. + Added typdef packing_type and enumerals, changed various integer + literals to use the enumerals. + +2000-05-24 David Mosberger <davidm@hpl.hp.com> + + * config/tc-ia64.c (dot_restorereg_p): New function. + (md_pseudo_table): Add restorereg.p. + (output_X3_format): Fix typo: record type should be UNW_X3, not UNW_X1. + (output_X4_format): Fix typo: record type should be UNW_X4, not UNW_X2. + + * config/tc-ia64.h (unw_record_type): Add unwabi. + (unw_r_record): Rename member MASK to GRMASK. Add sub-structure + called MASK with members for imask, and the masks produced by + fr_mem, gr_mem, br_mem, and frgr_mem. + (unw_p_record): Add members ABI and CONTEXT. + (unw_x_record): Add member AB. + * config/tc-ia64.c (enum reg_symbol): Add REG_PSP and REG_PRIUNAT + as pseudo-register for use during unwind info generation. + (AR_PFS, AR_LC): New macros. + (enum pseudo_type): Add PSEUDO_FUNC_REG to permit declaring registers + whose names start with an at sign (as in "@priunat"). + (pseudo_func): Add "svr4", "hpux", "nt" constants and "priunat" + register. + (unwind_list, unwind_tail, current_unwind_entry, proc_start, + proc_end, unwind_info, personality_routine): Consolidate into + "unwind" structure to reduce offset-table use. Add member + NEXT_SLOT_NUMBER to track the slot number for the next instruction + to be emitted. + (output_R1_format, output_R3_format, output_P3_format, + output_P6_format): Initialize R with zero to reduce compiler warnings. + (output_P7_format): Ditto. Add `default' branch to switch + statement to reduce compiler warnings. + (output_P8_format, output_B1_format, output_B4_format): Ditto. + (output_P4_format): Rename 2nd & 3rd arg to IMASK and IMASK_SIZE. + (format_ab_reg): Rename from format_a_b_reg. Merge A and B args + into single argument. + (output_X1_format, output_X3_format): Initialize R with zero to reduce + compiler warnings. Merge A and B args into single argument. + (output_X2_format, output_X4_format): Remove unused variable R. Merge + A and B args into single argument. + (free_record): Removed (wasn't used). + (free_list_records): Also free imasks in prologue records. + (output_prologue, output_prologue_gr): Initialize mask bits to zero. + (output_spill_mask): Remove. + (output_unwabi): New function. + (output_epilogue, output_label_state, output_copy_state): Call + alloc_record. + (output_spill_psprel, output_spill_sprel, output_spill_psprel_p, + output_spill_sprel_p, output_spill_reg, output_spill_reg_p): Add AB + argument. + (process_one_record): New locals FR_MASK and GR_MASK. Ignore + gr_mem, fr_mem, br_mem, and frgr_mem records and instead emit them + as part of handling the prologue records. Emit region's imask if + we have one. Handle unwabi, epilogue, label_state, copy_state, + spill_psprel, spill_sprel, spill_reg, spill_psprel_p, + spill_sprel_p, and spill_reg_p records. + (set_imask, count_bits, slot_index): New function. + (fixup_unw_records): Fix region size computation. Handle + epilogue, spill_reg, spill_sprel, spill_psprel, spill_reg_p, + spill_sprel_p, and spill_psprel_p records. Merge mask bits of + frgr_mem, fr_mem, gr_mem, br_mem on a per-region basis and + set_imask accordingly. Update imask for gr_gr, and br_gr records. + (convert_expr_to_ab_reg, convert_expr_to_xy_reg): New function. + (dot_save): Use manifest constants for applicaton registers. + Handle REG_PR and REG_PRIUNAT. + (dot_restore): Don't just ignore it. + (dot_restorereg): New function.. + (generate_unwind_image): Ensure unwind info is a multiple of eight + bytes, not just four bytes. + (dot_handlerdata, dot_unwentry): Demand empty rest of line. + (dot_altrp): Don't just ignore it. + (dot_savemem): New function. Replaces dot_savesp() and + dot_savepsp(). Use manifest constants for applicaton registers. + Handle REG_PR and REG_PRIUNAT. + (dot_savef): Simplify. + (dot_saveb): Support generation of br_gr. + (dot_spillreg, dot_spillmem, dot_spillreg_p, dot_spillmem_p, + dot_label_state, dot_copy_state): New function. + (dot_unwabi): Don't just ignore it. + (md_pseudo_table): Add restorereg, spillreg, spillsp, spillpsp, + spillreg.p, spillsp.p, spillpsp, label_state, copy_state, + unwabi, vframesp, and vframepsp. Fix typo alprp->altrp. + (emit_one_bundle): Set slot number for prologue/body records + *before* emitting the first insn. + (emit_one_bundle): Set UNWIND.NEXT_SLOT_NUMBER. + (md_begin): Declare "psp" pseudo-register. + (md_operand): Handle PSEUDO_FUNC_REG. Fix printing of error message + so we don't get segfault. + (output_psp_sprel): Output sp/psp relative offsets as 4-byte word + counts as required per SW Conventions manual + (output_rp_psprel, output_rp_sprel, output_pfs_psprel,output_pfs_sprel, + output_preds_psprel, output_preds_sprel, output_spill_base, + output_unat_psprel, output_unat_sprel, output_lc_psprel, + output_lc_sprel, output_fpsr_psprel, output_fpsr_sprel, + output_priunat_psprel, output_priunat_sprel, output_bsp_psprel, + output_bsp_sprel, output_bspstore_psprel, output_bspstore_sprel, + output_rnat_psprel, output_rnat_sprel, output_spill_psprel, + output_spill_sprel, output_spill_psprel_p, output_spill_sprel_p):Ditto. + (dot_vframe): Implement. + (dot_vframesp, dot_vframepsp): New function. -Wed Sep 9 11:27:16 1998 Richard Henderson <rth@cygnus.com> +Tue May 23 00:57:05 2000 Hans-Peter Nilsson <hp@axis.com> - * config/tc-i386.c (i386_operand): Fix typo in last patch. + * configure.in (i386-*-freebsd a.out entry): Quote properly. + * configure: Regenerate. -Tue Sep 8 18:10:01 1998 Catherine Moore <clm@cygnus.com> - - * config/tc-arm.c (arm_adjust_symtab): Move #ifdef - OBJ_COFF so that routine is defined for a.out format. +2000-05-23 Alan Modra <alan@linuxcare.com.au> -Tue Sep 8 15:56:19 1998 Richard Henderson <rth@cygnus.com> + * config/tc-i386.c (md_assemble): Pass jump reloc in fr_var... + (md_estimate_size_before_relax): so we can use it here instead of + old kludges. Localise vars to blocks. Comment. - * config/tc-i386.c (i386_operand): Detect non-segment registers - used as segment prefixes. + * frags.c (frag_new): Update fr_var comments. + * frags.h (struct frag): Ditto. -Sat Sep 5 19:00:38 1998 Ian Lance Taylor <ian@cygnus.com> +2000-05-22 Richard Henderson <rth@cygnus.com> + + * config/tc-ia64.c (FUNC_PC_RELATIVE): New. + (pseudo_func): Add pcrel. + (operand_match): Handle IA64_OPND_TGT64. + (build_insn): Likewise. + (md_begin): Initialize pseudo_func[FUNC_PC_RELATIVE]. + (ia64_gen_real_reloc_type): Handle FUNC_PC_RELATIVE. + (fix_insn): Handle all three 64-bit relocation types. + +Mon May 22 22:43:32 2000 Hans-Peter Nilsson <hp@axis.com> + + * obj.h (struct format_ops): New members begin, app_file, + s_set_other, s_set_desc, s_get_type, s_set_type, + separate_stab_sections, init_stab_section. + + * config/obj-multi.h: Update GPL notice to v2. + (obj_begin): New. + (obj_app_file): New. + (S_SET_SIZE): Test s_set_size for NULL before calling. + (S_SET_ALIGN): Similar for s_set_align. + (S_SET_OTHER): New. + (S_SET_DESC): New. + (S_GET_TYPE): New. + (S_SET_TYPE): New. + (SEPARATE_STAB_SECTIONS): New. + (INIT_STAB_SECTION): New. + (EMIT_SECTION_SYMBOLS): New. + (AOUT_STABS) [OBJ_MAYBE_AOUT]: Define. + + * config/obj-elf.h: Update GPL notice to v2. + Mention that this file is included from obj-multi.h. + (obj_begin): Wrap definition in ifndef. + (elf_file_symbol): Constify declaration. + (obj_app_file): Ditto. + (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB): + Wrap in ifndef SEPARATE_STAB_SECTIONS. + + * config/obj-elf.c (elf_s_set_other): New. + (elf_file_symbol): Constify argument. + (elf_separate_stab_sections): New. + (elf_init_stab_section): New. + (elf_format_ops): Add new members. Remove comma at end. + + * config/obj-ecoff.c (ecoff_separate_stab_sections): New. + (ecoff_format_ops): Add new fields. Remove comma at end. + Mention inconsistency for emit_section_symbols. + + * config/obj-coff.h (c_dot_file_symbol): Constify declaration. + + * config/obj-coff.c (c_dot_file_symbol): Constify argument. + (coff_separate_stab_sections): New. + (coff_format_ops): Add new members. + + * config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New. + (obj_aout_s_set_other): New. + (obj_aout_s_set_desc): New. + (obj_aout_s_get_type): New. + (obj_aout_s_set_type): New. + (obj_aout_separate_stab_sections): New. + (aout_format_ops): New members added. Use obj_aout_process_stab, + not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0. + (obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as + appropriate. + (obj_aout_line, obj_aout_weak, obj_aout_type): Ditto. - * ehopt.c (check_eh_frame): Check the size of the FDE, and don't - optimize across FDE boundaries. +2000-05-22 Alan Modra <alan@linuxcare.com.au> - * config/obj-coff.c (obj_coff_section): Preserve any link once - flags when setting the section flags. + * config/tc-i386.c (tc_i386_fix_adjustable): Prevent adjustment + for OBJ_MAYBE_ELF too. Use S_IS_EXTERNAL instead of S_IS_EXTERN. + (md_estimate_size_before_relax): Ensure jumps to weak and + externally visible symbols are relocatable. -Fri Sep 4 17:07:14 1998 Nick Clifton <nickc@cygnus.com> +Sat May 20 16:41:55 2000 Hans-Peter Nilsson <hp@axis.com> - * config/tc-arm.h (obj_adjust_symtab): Fixed typo. - * config/tc-arm.c (armelf_adjust_symtab): Reformatted. + * stabs.c (aout_process_stab): Make global. + (s_desc): Add ATTRIBUTE_UNUSED to args as appropriate. + * read.h (aout_process_stab): Declare. -Fri Sep 4 13:57:43 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> + * configure.in (EMULATIONS) [i386aout, i386coff, i386elf]: + Generalize to *aout, *coff *elf. + * configure: Regenerated. - * config/tc-sparc.c (in_signed_range): Sign extend 32-bit words - to the host width. + * doc/internals.texi (Object format backend): Say + SEPARATE_STAB_SECTIONS needs to be nonzero, not just defined. -Wed Sep 2 11:31:14 1998 Richard Henderson <rth@cygnus.com> + * Makefile.am (TARG_ENV_HFILES): Delete te-multi.h. + * Makefile.in: Regenerated. - * frags.c (frag_grow): Include the size of the frag struct in the - obstack chunk size. +2000-05-19 Catherine Moore <clm@cygnus.com> - * subsegs.c (subseg_set_rest): Adjust the seginfo frchain start - if the new subseg comes before the old. + * cgen.h (GAS_CGEN_MAX_FIXUPS): Check if already defined. -Tue Sep 1 15:01:33 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> +2000-05-18 Alan Modra <alan@linuxcare.com.au> - * config/tc-sparc.c (sparc_ip): Allow all digits in an instruction - to handle edge8 and edge16. + * config/tc-hppa.c (md_apply_fix): Mask out immediate bits of + instruction to reflect change in re_assemble_*. -Mon Aug 31 09:51:14 1998 Richard Henderson <rth@cygnus.com> +Thu May 18 10:52:14 2000 Jeffrey A Law (law@cygnus.com) - * config/obj-elf.c (obj_elf_vtable_inherit): Print error message - before we clobber the symbol involved. + * configure.in (hppa-*-hpux11*): If the cpu is hppa*64*, then + build PA64 ELF tools. + * configure: Rebuilt. -Mon Aug 31 10:58:06 1998 Catherine Moore <clm@cygnus.com> +2000-05-17 Alan Modra <alan@linuxcare.com.au> - * config/tc-arm.c: Remove OBJ_ELF definitions for - S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. Only - use arm_adjust_symtab for OBJ_COFF. - (armelf_adjust_symtab): New Routine. - * config/tc-arm.h: Define obj_adjust_symtab to - armelf_adjust_symtab for OBJ_ELF. - -Sat Aug 29 22:18:51 1998 Richard Henderson <rth@cygnus.com> + * Makefile.am: Regenerate dependencies. + * Makefile.in: Regenerate. - * configure.in: Make all i386-elf targets use bfd_gas. - * config/tc-i386.c (tc_i386_force_relocation): New. - (tc_i386_fix_adjustable): Don't fix vtable relocs. - (md_apply_fix3): Likewise. - (tc_gen_reloc): Handle them. - * config/tc-i386.h (TC_FORCE_RELOCATION): Always define, calling - tc_i386_force_relocation. +2000-05-15 Nick Clifton <nickc@cygnus.com> -Mon Aug 24 13:40:21 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-arm.c (struct asm_psr): Add boolean field + distinguishing between CSPR and SPSR. Rename 'number' field + to 'field'. + (psrs): Rearrange contents to match new asm_psr structure. + (arm_psr_parse): Move next to psr_required_here. Make it + return an asm_psr structure. + (psr_required_here): Use asm_psr structure returned by + arm_psr_parse. + (do_msr): Reorganise to allow psr_required_here to be called + only once. + (md_undefined_name): Mark 'name' parameter as unused, since + the COFF target does not use it. - * config/tc-arm.c (md_show_usage): Improve formatting of --help output. +2000-05-14 David O'Brien <obrien@FreeBSD.org> -Fri Aug 21 18:43:48 1998 Nick Clifton <nickc@cygnus.com> + * config/te-386bsd.h: Clean up comments to adhere to the GNU coding + standards. + * config/te-aux.h: Likewise. + * config/te-dpx2.h: Likewise. + * config/te-go32.h: Likewise. + * config/te-hp300.h: Likewise. + * config/te-hppa.h: Likewise. + * config/te-i386aix.h: Likewise. + * config/te-ic960.h: Likewise. + * config/te-interix.h: Likewise. + * config/te-nbsd532.h: Likewise. + * config/te-pc532mach.h: Likewise. + * config/te-ppcnw.h: Likewise. + * config/te-psos.h: Likewise. + * config/te-sparcaout.h: Likewise. + * config/te-sun3.h: Likewise. + * config/te-sysv32.h: Likewise. + +2000-05-14 Alan Modra <alan@linuxcare.com.au> + + * config/tc-h8300.c (do_a_fix_imm): Don't rely on `short' being 16 + bits. Instead explicitly mask and sign extend. Do the 8 bit mask + and sign extend without an if statement. + (build_bytes): Likewise. + +2000-05-14 Kazu Hirata <kazu@hxi.com> + + * config/tc-h8300.c (do_a_fix_imm): Output a reloc for no + X_add_symbol L_32 case. - * config/tc-d30v.c (md_assemble): Copy previous opcode over - current opcode after writing the first insturction of a reverse - sequential pair. - -Fri Aug 21 07:30:35 1998 Doug Evans <devans@canuck.cygnus.com> +2000-05-14 David O'Brien <obrien@FreeBSD.org> - * read.h (generate_lineno_debug): Add prototype. - * read.c (generate_lineno_debug): Make non-static. + * config/te-freebsd.h: New file. -Thu Aug 20 23:17:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-05-13 Alan Modra <alan@linuxcare.com.au> - * config/tc-i386.c (md_assemble): Only warn for address/data size - prefixes. + * asintl.h (gettext, dgettext, dcgettext, textdomain, + bindtextdomain): Replace defines with those from intl/libgettext.h + to quieten gcc warnings. -Thu Aug 20 14:45:08 1998 Nick Clifton <nickc@cygnus.com> + * NEWS: Mention x86 .arch and -q. - * config/tc-arm.c (arm_fix_adjustable): Do not adjust relocations - against Thumb function names, as the linker needs this information. + * config/tc-i386.c (quiet_warnings): New. + (md_assemble): Use quiet_warnings. + (md_parse_option): Set quiet_warnings from -q. + (md_show_usage): Mention -q, delete -m. + (flag_do_long_jump): Delete. + (md_parse_option): Remove -m. + (md_show_usage): Remove -m. + (md_create_long_jump): Remove useless flag_do_long_jump code. -1998-08-20 Vladimir N. Makarov <vmakarov@cygnus.com> + * as.c (parse_args): In case OPTION_DEFSYM, use a valueT to hold + the symbol value, and use bfd_scan_vma if BFD_ASSEMBLER. - * expr.c (operand): Check also that there is no advance in operand - after atof_generic in order to decide "is it label 0f or floating - point number?". +2000-05-13 Alan Modra <alan@linuxcare.com.au> + Alexander Sokolov <robocop@netlink.ru> -Wed Aug 19 09:30:16 1998 Nick Clifton <nickc@cygnus.com> + * doc/c-i386.texi (i386-Arch): New section. + (i386-Syntax): Mention .intel_syntax and .att_syntax. - * config/tc-m32r.c: Replace double dash prefix to M32R specific - command line options with a single dash. - * doc/c-m32r.texi: Replace double dash prefix with a single dash. + * config/tc-i386.c (cpu_arch_name, cpu_arch_flags): New. + (smallest_imm_type): Use smallest opcode for shift by one if cpu + architecture has been given and is not 486. + (set_cpu_arch): New. + (md_pseudo_table): Add .arch. + (md_assemble): Warn if cpu architecture has been given and an + unsupported instruction. -Tue Aug 18 11:59:43 1998 Catherine Moore <clm@cygnus.com> + * config/tc-i386.h (SMALLEST_DISP_TYPE): Delete. + Move operand_types bit defines after relevant template field. + (template): Add cpu_flags. + (Cpu*): Define. + (arch_entry): New. - * tc-arm.h: Define obj_fix_adjustable for OBJ_ELF. - * tc-arm.c (arm_fix_adjustable): New routine. +2000-05-12 Alexandre Oliva <aoliva@cygnus.com> -1998-08-13 Vladimir N. Makarov <vmakarov@cygnus.com> + * config/tc-mn10300.h (md_end): Define. + (mn10300_finalize): Declare. + * config/tc-mn10300.c: Include dwarf2dbg.h. + (debug_line): Define. + (md_assemble): Generate dwarf2 line info. + (mn10300_finalize): New function. Finalize dwarf2 info. - * read.c (s_align, s_comm, s_mri_common, s_fail, s_globl, s_space, - s_float_space, s_struct, cons_worker): Move ignore_rest_of_line or - demand_empty_rest_of_line before mri_comment_end. - (equals): Check garbage after expression before - mri_comment_end in MRI mode. +2000-05-11 Ulf Carlsson <ulfc@engr.sgi.com> -Thu Aug 13 15:08:42 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-mips.c (md_estimate_size_before_relax): Use the + external version of the relocation for weak symbols. - * config/tc-mips.c (macro): Correct M_SGE_I/M_SGEUI_I case for a - small immediate constant to use the constant itself rather than - always using 1. +2000-05-08 David Mosberger <davidm@hpl.hp.com> -Wed Aug 12 18:47:38 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-ia64.c (output_P7_format, case mem_stack_f): Output fixed + frame size in units of 16 bytes, as required per SW Conventions manual. + (output_unw_records): Output info-block header as a dword to get + byte-order right. - * config/tc-hppa.c (pa_enter): Call as_bad rather than abort. - (pa_leave): Likewise. +2000-05-08 Alan Modra <alan@linuxcare.com.au> -Wed Aug 12 13:25:03 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + * as.h: #include "file", not <file> on files from ../include. + (as_abort, as_fatal): Add ATTRIBUTE_NORETURN. + * config/tc-m68k.c (m68k_ip): Fix signed/unsigned warnings. + (md_convert_frag): Add ATTRIBUTE_UNUSED. + (tc_coff_symbol_emit_hook): Ditto. + (OPTCOUNT): Cast to int to avoid compiler warning. + (md_begin): Fix signed/unsigned warnings. - * config/tc-i386.c (md_assemble): Emit a warning for stand-alone - prefixes. - (i386_operand): Fix an error message. +2000-05-08 Michael Sokolov <msokolov@ivan.Harhan.ORG> -Tue Aug 11 14:44:32 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-m68k.c (md_convert_frag_1): Abort if we end up in the + ABRANCH LONG case for a conditional branch on a 68000. + (md_estimate_size_before_relax): Likewise. Also handle + flag_short_refs correctly for ABRANCH, BCC68000, and DBCC. + (m68k-ip: case ABSL): Relax absolute references to 16-bit + PC-relative on all CPUs. + (md_estimate_size_before_relax): Likewise. - * doc/c-arm.texi (ARM Directives): Document .req directive. +2000-05-04 Alan Modra <alan@linuxcare.com.au> - * config/tc-arm.c (reg_required_here): Display erroneous string if - the register name could not be decoded. - Do not set inst.instruction if the sift is -1. + * as.c (parse_args): Just mention current year in printed + copyright message. -Mon Aug 10 15:39:56 1998 Richard Henderson <rth@cygnus.com> +2000-05-03 J.T. Conklin <jtc@redback.com> - * config/tc-alpha.c (tc_gen_reloc): Bias WEAK symbols just as - we do for EXTERN. + * config/tc-ppc.c (pre_defined_registers): Add entries for vector + unit registers. + (md_parse_option): Recognize -m7400. -Mon Aug 10 15:06:18 1998 Nick Clifton <nickc@cygnus.com> +2000-05-03 Ian Lance Taylor <ian@zembu.com> - * config/tc-d30v.c (d30v_align): Always perform alignment request, - even if it is belived to be unnecessary. - -Mon Aug 10 17:48:09 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - config/tc-i386.c (i386_operand): Size immediate constants by - suffix (erroneously removed as part of July 7 change). + * config/atof-ieee.c (gen_to_words): When adding carry back in, + don't permit lp to become less than the words array. -Sun Aug 9 20:45:32 1998 Catherine Moore <clm@cygnus.com> +2000-05-03 Rodney Brown <RodneyBrown@pmsc.com> - * config/obj-elf.h: Check for redefinition of obj_frob_symbol. - * config/tc-arm.c: Define S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. - (armelf_frob_symbol): New Routine. - * config/tc-arm.h: Define obj_frob_symbol if OBJ_ELF. + config/tc-mcore.c (md_apply_fix3): BFD_RELOC_MCORE_PCREL_IMM11BY2 + Fix little-endian case. -Sat Aug 8 15:21:28 1998 Richard Henderson <rth@cygnus.com> +2000-05-03 David O'Brien <obrien@NUXI.com> - * config/tc-alpha.c (alpha_fix_adjustable): Don't adjust weak syms. + * as.c (parse_args): Update copyright. -Wed Aug 5 15:54:14 1998 Nick Clifton <nickc@cygnus.com> +2000-05-03 Mark Elbrecht <snowball3@bigfoot.com> - * config/tc-arm.c (md_begin): Set BFD private flags depending upon - command line switches passed to assembler. + * gas/config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 + for the .bss section too. -Mon Aug 3 14:02:52 1998 Doug Evans <devans@seba.cygnus.com> +2000-05-02 Alan Modra <alan@linuxcare.com.au> - * cgen.h (GAS_CGEN_MAX_FIXUPS): GAS_ prepended, all uses updated. - (gas_cgen_opcode_desc): Declare. - (gas_cgen_parse_operand): Declare. - (*): Prepend gas_ to gas specific fns to denote them as such. - All uses updated. - * cgen.c (gas_cgen_opcode_desc): New global - (gas_cgen_init_parse): Renamed from cgen_asm_init_parse. - (queue_fixup): Renamed from cgen_queue_fixup. - (*): Prepend gas_ to gas specific fns to denote them as such. - All uses updated. - (gas_cgen_md_apply_fix3): Update call to insert_operand. - (gas_cgen_finish_insn): Renamed from cgen_asm_finish_insn. - * config/tc-m32r.c (md_begin): Remove use of CGEN_SYM. - Open opcode table and initialize it. - (make_parallel): Use gas_cgen_opcode_desc. - (assemble_parallel_insn): Ditto. Remove use of CGEN_SYM. - (md_assemble): Ditto. - -Sat Aug 1 19:27:30 1998 Richard Henderson <rth@cygnus.com> - - * as.h (debug_info_type): Add entries for unspecified and dwarf*. - * ecoff.c (ecoff_generate_asm_lineno): Take no arguments; call - as_where ourselves. Provide a stub for !ECOFF_DEBUGGING. - * ecoff.h: Move ECOFF_DEBUGGING protection inside GAS_ECOFF_H. - Move ecoff_generate_asm_lineno outside ECOFF_DEBUGGING protection. - * read.c (generate_lineno_debug): Tidy ECOFF bits. Use - DEBUG_UNSPECIFIED rather than DEBUG_NONE for initial test. - * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Define to a variable. - (SEPARATE_STAB_SECTIONS): Conditionalize on value of ECOFF_DEBUGGING. - (INIT_STAB_SECTION): Likewise. - (OBJ_PROCESS_STAB): Likewise. - - * config/tc-alpha.c (md_longopts): New options -mdebug/-no-mdebug. - (md_parse_option): Watch for them. - (alpha_cur_ent_sym, alpha_flag_mdebug): New variables. - (md_begin): Kill neverdef code. - (s_alpha_ent, s_alpha_end, s_alpha_mask, s_alpha_frame): New. - (s_alpha_prologue): Watch alpha_cur_ent_sym. - (s_alpha_coff_wrapper): New. - (md_pseudo_table): Trap all ECOFF pseudos. - -Fri Jul 31 16:45:54 1998 Ron Unrau <runrau@cygnus.com> - - Start of changes to remove mdebug section from mips*-elf - Based on MIPS_STAB_ELF definition - * acconfig.h: undef if not configured - * config.in: undef if not configured - * config/mips-elf.h: only set ECOFF debugging if not stabs-in-elf - * config/tc-mips.c (s_ent): set BSF_FUNCTION - * stabs.c (s_stab_generic): flush frag - -Fri Jul 31 16:14:45 1998 Catherine Moore <clm@cygnus.com> - - * configure.in: (arm-*-elf): Handle. - (thumb-*-elf): Handle. - * configure: Regenerate. - * read.c (stringer): Fix typo in comment. - * write.c (fixup_segment): Don't add symbol value to addend if - TC_ARM and OBJ_ELF. - * config/tc-arm.c (md_section_align): Don't align dwarf debug - sections. - (tc_gen_reloc): Always set the reloc addend to fixp->fx_offset - for OBJ_ELF. - -Thu Jul 30 21:38:43 1998 Frank Ch. Eigler <fche@cygnus.com> - - * config/tc-d30v.c ({cur,prev}_left_kills_right_p): New variables. - (write_2_short): Emit warning if new flag is set. - (do_assemble): Set flags if left instruction is one of special - "right-instruction-killer" type. - -Tue Jun 28 18:12:28 1998 Stan Cox <scox@cygnus.com> - - * config/tc-sparc.c (md_number_to_chars, cons_fix_new_sparc): - Always output words in debug_info section as big endian. - (sparc_target_format): Choose correct bfd target. - (md_apply_fix3): Rename BFD_RELOC_SPARC_32LE to BFD_RELOC_SPARC_REV32. - -Tue Jul 28 11:01:21 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10300.c (md_assemble): Fix "errmsg" initialization - to work with internationalization code. Issue an error when two - operands match that are not allowed to match. - -Mon Jul 27 16:25:58 1998 Doug Evans <devans@canuck.cygnus.com> - - * configure.in (install_tooldir): Allow target to specify whether - it wants to be installed in $(tooldir)/bin. + * configure.in: Set em=linux for hppa-*-linux. * configure: Regenerate. - * Makefile.am (install-exec-local): Set install-exec-tooldir - dependency via configure. - * Makefile.in: Regenerate. - -Fri Jul 24 19:58:59 1998 Doug Evans <devans@canuck.cygnus.com> - - * Makefile.am (install-exec-local): Split into two ... - (install-exec-bindir,install-exec-tooldir): New rules. - * Makefile.in: Regenerate. - -Fri Jul 24 16:31:49 1998 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.am (install-exec-local): Don't remove the file before - checking whether $(bindir) == $(tooldir)/bin. From Maciej - W. Rozycki <macro@ds2.pg.gda.pl>. - * Makefile.in: Rebuild. - -Fri Jul 24 09:13:46 1998 Doug Evans <devans@canuck.cygnus.com> - - * cgen.c: Include libiberty.h. - (cgen_md_apply_fix3): Update call to md_cgen_lookup_reloc. - (cgen_tc_gen_reloc): Use xmalloc, not bfd_alloc. - * cgen.h (cgen_md_apply_fix3,cgen_tc_gen_reloc): Declare. - (md_cgen_lookup_reloc)): Declare. - (md_cgen_record_fixup_exp): Declare. - * config/tc-m32r.h (md_pcrel_from_section): Declare. - (m32r_relax_frag): Declare. - (cgen_md_apply_fix3): Decls moved to cgen.h. - (cgen_record_fixup_exp,cgen_tc_gen_reloc): Ditto. - (m32r_cgen_record_fixup_exp): Delete decl. - * config/tc-m32r.c (m32r_cpu_desc): #if 0 out. - (assemble_nop): Delete. - (expand_debug_syms): Delete unused `exp'. - (md_cgen_lookup_reloc): Renamed from CGEN_SYM (lookup_reloc). - Add default case for -Wall. - (m32r_cgen_record_fixup_exp): Add default case for -Wall. - (md_atof): Delete unused wordP. - -Thu Jul 23 13:19:50 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL - value. - -Wed Jul 22 14:36:56 1998 Ian Lance Taylor <ian@cygnus.com> - - * doc/as.texinfo: Add documentation for .end, .exitm, .fail, - .ifc, .ifeqs, .ifge, .ifgt, .ifle, .iflt, .ifnc, .ifne, .ifnes, - .print, .purgem, and .struct. Remove documentation for - .app-file. - -Tue Jul 21 16:50:52 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen.c (cgen_md_apply_fix3): set_operand renamed to set_vma_operand. - Update call to insert_operand. - -Fri Jul 17 11:42:20 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-m32r.c (ms_show_usage): Formatting changes. - -Wed Jul 15 15:38:28 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-i386.c (md_assemble): Don't get confused by trailing - whitespace after a prefix operator. - -Tue Jul 14 15:32:56 1998 Richard Henderson <rth@cygnus.com> - - * configure.in (i386-*-beos{pe,elf,}*): Recognize. - -Tue Jul 14 12:33:44 1998 Chris Torek <torek@bsdi.com> - - * config/tc-sparc.c (log2): New static function. - (s_reserve): Use log2 to convert alignment before calling - record_alignment. - (s_common): Use log2 to convert alignment before calling - record_alignment and frag_align. - (sparc_cons_align): Use log2. - -Tue Jul 14 11:58:40 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-sparc.c (s_reserve): Set symbol size if OBJ_ELF. - (s_common): Likewise. - - * config/tc-sparc.c (sparc_handle_align): Reindent a bit. Correct - initialization of waddr. - (sparc_elf_final_processing): Add default case to switch. - -Tue Jul 14 11:00:16 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather - than temporary real. - -Mon Jul 13 13:55:42 1998 Ian Lance Taylor <ian@cygnus.com> - - * write.c (subsegs_finish): Don't align the segments if there were - any errors. - - * config/obj-coff.c (c_symbol_merge): Correct number of bytes when - copying aux information. - - * expr.c (make_expr_symbol): Catch attempts to turn an O_big - expression into a symbol. - -Mon Jul 13 13:29:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c (mode_from_disp_size): Change arg and return - type to unsigned int. - (md_assemble): Change type used to store offsets from unsigned - long to long. - (i386_operand): Switch error check to only call RESTORE_END_STRING - once after parse_register. - -Fri Jul 10 16:00:04 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-v850.c (md_show_usage): Changed format to match that - of gcc, ld, etc. - - * as.c (show_usage): Changed format to match that of gcc, ld, etc. + * doc/Makefile.in: Regenerate with correct automake. + + * frags.c (frag_grow): Sanity check chunk_size. + + * config/obj-elf.h: #include "bfd.h" not <bfd.h> + * config/obj-som.h: Likewise. + * config/obj-ieee.h: Likewise. + + * config/tc-hppa.h: Test BFD_ARCH_SIZE, not BFD64. + + * config/tc-hppa.c (log2): Only compile when OBJ_SOM. + (md_pseudo_table): Fully initialise OBJ_ELF cases. + (fix_new_hppa): Add ATTRIBUTE_UNUSED to args as appropriate. + (pa_ip): low_sign_unext now returns via function value. Use + re_assemble_* instead of dis_assemble_* and + INSERT_FIELD_AND_CONTINUE combination. Don't call sign_unext + unnecessarily. + (md_convert_frag): Add ATTRIBUTE_UNUSED to args as appropriate. + (md_section_align, md_parse_option, md_show_usage, + md_undefined_symbol, pa_align, pa_block, pa_brtab, pa_try, + pa_callinfo, pa_code, pa_comm, pa_end, pa_enter, pa_entry, + pa_exit, pa_export, pa_import, pa_label, pa_leave, pa_level, + pa_origin, pa_param, pa_proc, pa_procend, pa_space, pa_spnum, + pa_version, pa_compiler, pa_copyright, pa_data, pa_fill, pa_lsym, + pa_text): Likewise. + (md_apply_fix): Change type of new_val to offsetT. Delete w1, w2, + w, resulti. Add insn, val. Move bfd_get_32 and bfd_put_32 + outside of switch. Correct mask and shifting errors in case 10 + and case -11. In case 21, compare against signed range to suit + hppa_field_adjust changes. In case 12, use re_assemble_12. In + case 17 and case 22, use offsetT variable to properly check range. + Use re_assemble_* here too. + (evaluate_absolute): Change type of value to offsetT. Call + hppa_field_adjust to do the work for us. + (pa_parse_cmpb_64_cmpltr): Delete save_s. + (pa_parse_cmpib_64_cmpltr): Ditto. + (pa_build_unwind_subspace): Delete unused var subseg. Change type + of i to unsigned int. + (pa_type_args): Conditionally declare symbol if OBJ_SOM. + (pa_end_of_source): Return type is void. + +Mon May 1 08:54:23 2000 Catherine Moore <clm@cygnus.com> + + * macro.c (macro_expand_body): Don't prepend macro number with zeroes. + +Mon May 1 14:19:39 2000 Denis Chertykov <denisc@overta.ru> + + * config/tc-avr.c: ATTRIBUTE_UNUSED added to the necessary places. + More comments added. + (md_begin): Removed "construct symbols for each register name". + Because register names conflicts with GCC generated function + names. + (avr_operand): Now constant numbers can be used as a register + identifiers (0 as r0, 31 as r31). + (md_assemble): use skip_space () before parsing instruction + operands. -Thu Jul 9 12:09:57 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> +2000-05-01 Alan Modra <alan@linuxcare.com.au> - * config/tc-m68k.c (tc_m68k_fix_adjustable): Don't adjust vtable - relocs. - (md_apply_fix_2): Force the symbol of the vtable reloc to be - weak. - -Thu Jul 9 11:31:54 1998 Ian Lance Taylor <ian@cygnus.com> - - * doc/Makefile.am (MAINTAINERCLEANFILES): Define. - * doc/Makefile.in: Rebuild. - -Wed Jul 8 12:18:56 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (mips_ip, case 'i' and 'j'): Mask off high bits - for %lo expressions. - (mips_ip, case 'u'): Move range check after code to mask - off bits in %hi/%lo expressions. Mask off high bits for - %lo expressions. - -Tue Jul 7 17:57:38 1998 Ian Lance Taylor <ian@cygnus.com> - - * doc/Makefile.am (gasver.texi): New target. - (as.info, as.dvi): Depends upon gasver.texi. - * doc/as.texinfo: Include gasver.texi. Mention version number on - title page and in top node. - * doc/Makefile.in: Rebuild. - -Tue Jul 7 11:42:16 1998 Richard Henderson <rth@cygnus.com> - - * listing.c (listing_listing): For EDICT_LIST, skip all lines up to - but not including the line containing the edict. - * listing.h (LISTING_EOF): New. - * input-scrub.c (input_scrub_next_buffer): Call it. - -Tue Jul 7 13:00:37 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c (i386_operand): Don't set the size of an - immediate address based solely on the suffix and the mode. - - * config/tc-i386.c (md_assemble): Add assertion to make sure - overlap2 does not set Imm. - - * config/tc-i386.c (space_chars): Remove. The scrubber converts - sequences of whitespace to a single space. - (is_space_chars): Just compare with space. - (md_begin): Don't initialize space_chars. - (md_assemble): Just skip a single whitespace character. - (i386_operand): Rewrite base-index parsing to use new - parse_register, and to skip white space. Skip white space in a - number of other places too. Don't give error message if - parse_register fails. - (parse_register): Change reg_string parameter to be non-const. - Add end_op parameter. Skip white space after the `%', and return - end of register string. Give error message here rather than - caller. - -Fri Jul 3 15:34:34 1998 Ian Lance Taylor <ian@cygnus.com> - - Based on patch from Matt Semersky <matts@scd.hp.com>: - * expr.c (op_encoding): Make const. - (expr_set_precedence): New function. - (expr_begin): Don't set operator rankings, just call - expr_set_precedence. - * expr.h (expr_set_precedence): Declare. - * read.c (s_mri): Call expr_set_precedence. - -Thu Jul 2 16:24:58 1998 Ian Lance Taylor <ian@cygnus.com> - - * doc/as.texinfo (Statements): Remove paragraph discussing - continuing lines with a backslash. This hasn't worked for years, - if it ever did. - -Thu Jul 2 14:06:22 1998 Klaus Kaempf <kkaempf@rmi.de> - - * obj-vms.c: Add C++ support with ctors/dtors sections. Add weak - symbol definitions. - (Ctors_Symbols, Dtors_Symbols): New symbol chains. - (ps_CTORS, ps_DTORS): New section types. - (vms_fixup_xtors_section): New function - (Ctors_Psect, Dtors_Psect): Define. - (IS_GXX_XTOR): Define - (global_symbol_directory): Change check of gxx_bug_fixed to 0. - Filter static constructors/destructors and add to - Ctors_Symbols/Dtors_Symbols chain. - (vms_write_object_file): Write Ctors_Symbols/Dtors_Symbols to - appropriate section. - - * tc-alpha.h (TARGET_FORMAT): Rename "evax-alpha" to "vms-alpha". - * makefile.vms: Merge vax/vms support. - -Wed Jul 1 20:06:20 1998 Richard Henderson <rth@cygnus.com> - - * config/obj-elf.c (obj_elf_vtable_inherit, obj_elf_vtable_entry): New. - (elf_pseudo_table): Add them. - * config/tc-mips.c (mips_force_relocation): Force vtable relocs. - (md_apply_fix): Accept them. - (mips_fix_adjustable): Don't adjust them. - (tc_gen_reloc): Mung BFD_RELOC_VTABLE_ENTRY for Rel. - * config/tc-ppc.c (md_apply_fix3): Accept vtable relocs. - * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Force vtable relocs. - (tc_fix_adjustable): Don't adjust them. - -Wed Jul 1 16:35:32 1998 Doug Evans <devans@seba.cygnus.com> - - * Makefile.am (CGEN_CPU_PREFIX): New variable. - (cgen.o): Use it. - * Makefile.in: Regenerate. - * configure.in: AC_SUBST cgen_cpu_prefix. + * configure.in: Set bfd_gas=yes on i386-*-pe and i386-*-nt* to + ensure all pe targets use bfd. Remove unnecessary bfd_gas=yes on + arm-*-netbsd* and arm-*-wince as this is set for all arm*. * configure: Regenerate. -Wed Jul 1 21:38:56 1998 J"orn Rennecke <amylaar@cygnus.co.uk> - - * config/tc-sh (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define. - Changed all users of COND12_DELAY. - -Fri Jun 26 11:21:11 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10300.c (set_arch_mach): New function. - (md_pseudo_table): Add pseudo-ops to set the current machine type. - (md_begin): Default to mn10300 mode. - (md_assemble): Only accept instructions for the core mn10300 - chip and the active machine type. - -Wed Jun 24 19:06:04 1998 Ian Lance Taylor <ian@cygnus.com> - - * subsegs.h (segment_info_type): Give the struct a name. - * config/tc-h8300.h (tc_reloc_mangle): Add prototype. - * config/tc-h8500.h (tc_reloc_mangle): Declare. - * config/tc-sh.h (sh_coff_reloc_mangle): Add prototype. - * config/tc-w65.h (tc_reloc_mangle): Declare. - * config/tc-z8k.h (tc_reloc_mangle): Declare. - -Wed Jun 24 13:45:00 1998 Catherine Moore <clm@cygnus.com> - - * config/tc-v850.c (v850_comm): Restore old section - after common processing. - -Wed Jun 24 11:50:54 1998 Klaus Kaempf <kkaempf@progis.de> - - * config/obj-vms.c (Create_VMS_Object_File): Force binary file. - -Tue Jun 23 17:47:31 1998 Jim Wilson <wilson@cygnus.com> - - * config/tc-h8300.c (do_a_fix_imm, build_bytes): Replace cast to - char with code that explicitly sign-extends. - -Tue Jun 23 13:54:57 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-v850.c (md_begin): Restore text section as the current - section after creating call table sections. - * config/obj-coff.h (SYM_AUXINFO): New macro to conceal ugly - code. - - * config/obj-coff.c (c_symbol_merge): Replace complex expresion - with call to macro SYM_AUXINFO. - -Tue Jun 23 15:09:27 1998 Mike Stump <mrs@wrs.com> - - * Makefile.am (install-exec-local): Don't let EXEEXT interfere - with the program transform name. - * Makefile.in: Rebuild. - -Mon Jun 22 19:52:42 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary - information. - -Mon Jun 22 15:18:58 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-i386.c (i386_operand): Be prepared for a space between - the open parenthesis and the start of the register operand, - because of the June 16 change. - -Sun Jun 21 21:27:03 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-sh.c (md_apply_fix): Handle weak symbols correctly if - BFD_ASSEMBLER. - -Sun Jun 21 12:26:36 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-d30v.c (d30v_align): Always perform alignment request, - even if it is belived to be unnecessary. - -Fri Jun 19 13:57:06 1998 Ian Lance Taylor <ian@cygnus.com> - - * write.c (adjust_reloc_syms): Never adjust relocs against weak - symbols. - * config/tc-mips.c (md_apply_fix): Adjust accordingly. +2000-04-29 Andreas Jaeger <aj@suse.de> -Fri Jun 19 09:50:17 1998 Jeffrey A Law (law@cygnus.com) + * as.h: Correctly check GCC version. - * config/tc-mn10300.c (mn10300_insert_operand): Do not hardcode the - shift amount for a repeated operand. The shift amount for the - repeated copy comes from the size of the operand. +2000-04-26 David O'Brien <obrien@FreeBSD.org> -Fri Jun 19 00:44:19 1998 Jeffrey A Law (law@cygnus.com) + * doc/as.1: Fix unbalanced brackets. - * config/tc-h8300.c (get_operand): Fix typos in ldm/stm support. + * config/tc-i386.c (comment_chars): Don't use '/' as comment start if + TE_FreeBSD. + (line_comment_chars): Set to '/' if TE_FreeBSD. -Wed Jun 17 13:07:05 1998 Ian Lance Taylor <ian@cygnus.com> +Tue Apr 25 11:02:02 2000 Jeffrey A Law (law@cygnus.com) - * config/tc-mips.c (md_show_usage): Fix -mipsN usage. + * configure.in: Configury support for PA64 (currently disabled). + * configure: Rebuilt. -Tue Jun 16 13:06:21 1998 Alan Modra <alan@spri.levels.unisa.edu.au> +2000-04-25 Machida Hiroyuki <machida@sm.sony.co.jp> - * app.c (do_scrub_begin): If tc_symbol_chars is defined, treat all - characters in it as LEX_IS_SYMBOL_COMPONENT. - * config/tc-i386.h (tc_symbol_chars): Define. - (extra_symbol_chars): Declare. - * config/tc-i386.c (extra_symbol_chars): Define. - (comment_chars): Don't use '/' as comment start if TE_LINUX. - (line_comment_chars): Set to '/' if TE_LINUX. - * doc/c-i386.texi (i386-prefixes): Update. - * doc/internals.texi (CPU backend): Document tc_symbol_chars. + * config/tc-mips.c (s_change_sec): Use record_alignment, not + bfd_set_section_alignment. -Fri Jun 12 13:36:54 1998 Tom Tromey <tromey@cygnus.com> +2000-04-25 Alan Modra <alan@linuxcare.com.au> - * po/Make-in (all-yes): If maintainer mode, depend on .pot file. - ($(PACKAGE).pot): Unconditionally depend on POTFILES. + * config/tc-i386.c (offset_in_range): Ensure shift counts are less + than 32. -1998-06-12 Vladimir N. Makarov <vmakarov@cygnus.com> +2000-04-24 Nick Clifton <nickc@cygnus.com> - * config/tc-d10v.c (md_apply_fix3): Checking displacement - constraint in instructions REP & REPI. + * doc/c-arm.texi (ARM Directives): Document behaviour of .align 0. + * doc/as.texinfo (Align): Include arm and strongarm in list of + targets that have the second form of the behaviour of the .align + directive. -Thu Jun 11 08:56:46 1998 Nick Clifton <nickc@cygnus.com> +2000-04-24 Mark Klein <mklein@dis.com> - * config/tc-d30v.c (md_apply_fix3): Catch BFD_RELOC_8, - BFD_RELOC_16, BFD_RELOC_64 and issue appropriate error messages. + * obj-som.c: Terminate obj_pseudo_table. - (check_range): If the operand is shifted, then shift the number - before checking its range. +Mon Apr 24 15:21:11 2000 Clinton Popetz <cpopetz@cygnus.com> - * write.c (adjust_reloc_syms): Add more checks for NULL pointers. + * as.c (parse_args): Allow md_parse_option to override -a listing + option. + * config/obj-coff.c (add_lineno): Change type of offset parameter + from "int" to "bfd_vma." + * config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine." + (ppc_mach, ppc_subseg_align, ppc_target_format): New. + (ppc_change_csect): Align correctly for XCOFF64. + (ppc_machine): New function, which discards "ppc_machine" line. + (ppc_tc): Cons for 8 when code is 64 bit. + (md_apply_fix3): Don't check operand->insert. Handle 64 bit + relocations. + (md_parse_option): Handle -a64 and -a32. + (ppc_xcoff64): New. + * config/tc-ppc.h (TARGET_MACH): Define. + (TARGET_FORMAT): Move to function. + (SUB_SEGMENT_ALIGN): Use ppc_subseg_align. + +Sun Apr 23 16:45:45 2000 Denis Chertykov <denisc@overta.ru> + + * config/tc-avr.c: New AVR_ISA_ defined. + (md_assemble): Handle opcodes with optional operands (lpm,elpm). + (avr_operand): Handle 'a', 'v' and 'z' constraint letters needed + for `fmul', `movw' and `lpm R,Z' instructions. + (avr_operands): Warn if current opcode is a two-word instruction + and previous opcode was cpse/sbic/sbis/sbrc/sbrs. + (avr_opcodes): New commands added. + (REGISTER_P): Check 'a' and 'v' constraint letters. + (mcu_types): New MCU added. + +2000-04-22 Timothy Wall <twall@cygnus.com> + + * config/tc-ia64.c (pseudo_func[]): Add new "nat" entry equivalent + to "natval". + (operand_match): Conditionally insert default bit values for IMMU9. - * config/tc-v850.c (v850_comm): Set SEC_COMMON bit on special - common sections. +2000-04-14 Matthew Green <mrg@cygnus.com> -Wed Jun 10 17:26:35 1998 Nick Clifton <nickc@cygnus.com> + * configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support. + * configure: Rebuilt. - * config/tc-v850.c (v850_comm): Create special sections as needed. +Fri Apr 21 14:29:43 2000 Jeffrey A Law (law@cygnus.com) + Jason Eckhardt <jle@cygnus.com> -1998-06-10 Vladimir N. Makarov <vmakarov@cygnus.com> + * config/tc-hppa.c (md_apply_fix): Handle new PA2.0 formats. - * config/tc-d10v.c (write_2_short): Addition of swapping - instructions for sequential and reverse sequential order when - given order is not possible. + * config/tc-hppa.c (CHECK_ALIGN): New macro. + Added handling of new operand types l,y,&,fe,fE,fx. -Tue Jun 9 13:52:53 1998 Ian Lance Taylor <ian@cygnus.com> +Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com> + David Mosberger <davidm@hpl.hp.com> + Timothy Wall <twall@cygnus.com> + Andrew MacLeod <amacleod@cygnus.com> + Jim Wilson <wilson@cygnus.com> - * Makefile.am: Rebuild dependencies. - (DEP_INCLUDES): Fix reference to intl build directory. + * Makefile.am (CPU_TYPES): Add ia64. + (TARGET_CPU_CFILES): Add config/tc-ia64.c. + (TARGET_CPU_HFILES): Add config/tc-ia64.h. * Makefile.in: Rebuild. - -Tue Jun 9 12:20:05 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * doc/c-i386.texi: Update 16 bit documentation. - - * config/tc-i386.h: Change Data16 to Size16, Data32 to Size32, - IgnoreDataSize to IgnoreSize as they are used for address size as - well as data size. - * config/tc-i386.c: Likewise. Add code to reject addr32/data32 in - 32-bit mode, similarly addr16/data16 and variants. - -Mon Jun 8 18:32:01 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-d30v.c (md_assemble): Fix handling of reverse - sequential word multiply instructions. - - (do_assemble): Add extra command line argument, to allow mul32 - attribute to be preserved across parallel insns. - (md_assemble): Insert NOPs between explicitly parallel insns which - contain an 32 bit multiply and a 16 multiply. - -Mon Jun 8 12:20:30 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c: REPNE renamed to REPNE_PREFIX_OPCODE, and - likewise for REPE. - - * config/tc-i386.c (reloc): Add braces. - - * config/tc-i386.c (struct _i386_insn): Rename bi to sib to be - consistent with Intel naming. - * config/tc-i386.h (base_index_byte): Rename to sib_byte. Don't - use bitfields in sib_byte. - (modrm_byte): Don't use bitfields here either. - - * config/tc-i386.c (current_templates): Add const. - (parse_register): Add const to return, param, and char *s. - (i386_operand): Add const to reg_entry *r. - * config/tc-i386.h (templates): Add const to start, end. - - Inspired by code for 16 bit gas support from Martynas Kunigelis - <martynas@nm3.ktu.lt>: - * config/tc-i386.c (md_assemble): Add full support for 16 bit - modrm, and Jump, JumpByte, JumpDword, JumpInterSegment insns. - (uses_mem_addrmode): Remove. - (md_estimate_size_before_relax): Add support here too. - (md_relax_table): Rewrite interface to md_relax for 16 bit - support. - (BYTE, WORD, DWORD, UNKNOWN_SIZE): Remove. - (opcode_suffix_to_type): Remove. - (CODE16, SMALL, SMALL16, BIG, BIG16): Define. - (SIZE_FROM_RELAX_STATE): Modify to suit above. - (md_convert_frag): Likewise. - (i386_operand): Add support for 16 bit base/index regs, - immediates, and displacements. Remove some unnecessary casts, and - localise end_of_operand_string, displacement_string_start, - displacement_string_end variables. Add GCC_ASM_O_HACK. - * config/tc-i386.h (NO_BASE_REGISTER_16): Define. - - * config/tc-i386.c (prefix_hash): Remove. - (md_begin): Rewrite without obstacks. Remove prefix hash table - handling. Rewrite lexical table handling. - (i386_print_statistics): Don't print prefix statistics. - (md_assemble): Rewrite instruction parser so that line is not - converted to lower case. Don't do a hash_find for prefixes, - instead recognise them via opcode modifier. - (expecting_operand, paren_not_balanced): Localise variables. - * config/tc-i386.h (IsPrefix): Define. - (prefix_entry): Remove. - - * config/tc-i386.h (PREFIX_SEPERATOR): Don't define. - * config/tc-i386.c (PREFIX_SEPARATOR): Define here instead, using - '\\' in case where comment_chars contains '/'. - - * config/tc-i386.c (MATCH): Ensure given operand and template - match for JumpAbsolute. Makes e.g. `ljmp table(%ebx)' invalid; - you must write `ljmp *table(%ebx)'. - - From H.J. Lu <hjl@gnu.org>: - * config/tc-i386.c (BFD_RELOC_16, BFD_RELOC_16_PCREL): Define - as 0 ifndef BFD_ASSEMBLER. - (md_assemble): Allow immediate operands without suffix or - other reg operand to default in size to the current code size. - -Mon Jun 8 09:45:00 1998 Catherine Moore <clm@cygnus.com> - - * config/tc-v850.c (md_begin): Restore creation of - .call_table_text and .call_table_data sections. - -Sat Jun 6 00:02:41 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-d30v.c (md_assemble): Set execution type to unknown - after emitting a word of noops. - -Fri Jun 5 23:27:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c (mode_from_disp_size): Disp16 is mode 2. - (i386_operand): Simplify checks for valid base/index combinations. - Disallow `in 4(%dx),%al'. - - * config/tc-i386.c (struct _i386_insn): Make regs, base_reg, and - index_reg const. - (add_prefix): Change parameter from char to int. - - * config/tc-i386.h (Ugh): Define opcode modifier. - * config/tc-i386.c (md_assemble): Print warnings for Ugh insns. - - * config/tc-i386.c (md_assemble): Rewrite MATCH and - CONSISTENT_REGISTER_MATCH macros to check register types more - thoroughly. Check for illegal suffix/operand combinations - when matching insns with operands. Handle new `s' suffix, and - associated FloatMF opcode modifier for float insns with memory - operands. - * config/tc-i386.h (FloatMF): Define new opcode modifier. - (No_sSuf, No_bSuf, No_wSuf, No_lSuf): Likewise. - (SHORT_OPCODE_SUFFIX, LONG_OPCODE_SUFFIX): Define. - * config/tc-i386.c: Rename WORD_PREFIX_OPCODE to - DATA_PREFIX_OPCODE throughout. - - * config/tc-i386.c (REGISTER_WARNINGS): Define. - (md_assemble): Rewrite suffix/register operand checking code to be - more thorough. Remove Abs8,16,32. Change occurrences of Mem to - AnyMem, the better to grep. - (pi): Remove Abs. - (i386_operand): Don't set Mem bits in i.types[this_operand] when - given a memory operand. Don't set Abs bits either. - (type_names): Remove Mem*, Abs*. - * config/tc-i386.h (Mem8, Mem16, Mem32, Abs8, Abs16, Abs32): Don't - define opcode_modifiers as these cases are handled by Disp8, - Disp16, Disp32 and suffix checks. - (COMES_IN_BOTH_DIRECTIONS): Remove. - (FloatR): Define. It's OK to share the bit with ReverseRegRegmem. - - * config/tc-i386.c (md_assemble): Don't emit operand size prefix - if IgnoreDataSize modifier given. Remove ShortformW modifier - test. Add test for ShortForm in W base_opcode modification. - Merge Seg2ShortForm and Seg3ShortForm code. - * config/tc-i386.h (ShortFormW): Remove. - (IgnoreDataSize): Define. - -Fri Jun 5 10:50:53 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-d30v.c (md_assemble): Store previous segment state - with previous instruction. - -Wed Jun 3 18:21:56 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c (SCALE1_WHEN_NO_INDEX): Define. - (ebp, esp): Remove static variables. - (MATCH): Remove test for InOutPortReg. - (i386_operand): Properly handle InOutPortReg here instead. - Disallows `inb (%dx,2)', `inb %es:(%dx)' and `mov (%dx),%ax' - (md_assemble): Simplify and correct modrm and sib generation. - (i386_operand): Add warning for scale without index. - Rewrite checks for valid base/index combinations. - - * config/tc-i386.c (END_STRING_AND_SAVE): Protect arguments of - macros and enclose in do while(0). - (RESTORE_END_STRING): Likewise. - (md_assemble): Add one to printed operand number so we start - from 1 not 0. Add some more gettext invocations. - (i386_operand): Fix `%%s' -> `%%%s'. Inc printed operand - number here too. - - * config/tc-i386.h (WAIT_PREFIX, LOCKREP_PREFIX, ADDR_PREFIX, - DATA_PREFIX, SEG_PREFIX): Define. - * config/tc-i386.c (struct _i386_insn): Remove wait_prefix field. - (check_prefix): Remove function. - (add_prefix): New function. Add prefix to i.prefix as well as - doing checks. - (md_assemble): Changes for add_prefix. Remove hack for wait - prefix, instead always output prefixes in fixed order. Test - for jcxz/loop when selecting between word & dword operations, - and add address size prefix rather than operand size prefix. - Remove operand -> address size hack when emitting jcxz/loop. - (i386_operand): Remove O_Absent check as it's done in expr. - -Wed Jun 3 15:09:10 1998 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Recognize m5200 as a cpu_type of m68k. - * aclocal.m4: Rebuild with current libtool. + * app.c (do_scrub_chars): Handle DOUBLESLASH_COMMENTS. * configure: Rebuild. + * configure.in: Recognize ia64 as cpu type. Set bfd_gas. + (ia64-*-elf*, ia64-*-linux-gnu*): New targets. + * expr.c (expr): Handle md_optimize_expr. + * read.c (LEX_HASH): Add comment. + * config/tc-ia64.c, config/tc-ia64.h: New files. -Wed Jun 3 14:11:59 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * config/tc-m68k.c (md_estimate_size_before_relax): Add more calls - to relaxable_symbol to prevent references to external symbol from - being relaxed. - -Wed Jun 3 14:10:36 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-m68k.c (relaxable_symbol): If TARGET_OS is "elf", all - symbols are relaxable. - -Wed Jun 3 09:16:00 1998 Catherine Moore <clm@cygnus.com> - - * config/tc-v850.c (md_begin): Don't create special - sections by default. - -Tue Jun 2 14:52:56 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (macro): For div and udiv, close the - reorder block as soon as possible. - -Tue Jun 2 15:36:13 1998 Ian Lance Taylor <ian@cygnus.com> - - From Matt Semersky <matts@scd.hp.com>: - * macro.c (macro_mri_mode): New function. - * macro.h (macro_mri_mode): Declare. - * read.c (s_mri): Call macro_mri_mode when switching in and out of - MRI mode. - -Tue Jun 2 13:32:22 1998 Klaus Kaempf <kkaempf@progis.de> - - * config/tc-alpha.c (s_alpha_comm): Allow alignment parameter in - OBJ_EVAX case. - - * config/tc-alpha.c (s_alpha_comm): Defer restoring character - until after xstrdup in OBJ_EVAX case. - -Tue Jun 2 13:11:13 1998 Pat Rankin <rankin@eql.caltech.edu> - - * config/tc-vax.c (md_create_short_jump): Fix off by two bug in - offset calculation. Also, use VAX_BRW from vax-inst.h instead - of hardcoded magic number. - (md_create_long_jump): Use VAX_JMP and VAX_ABSOLUTE_MODE macros. - -Tue Jun 2 09:25:34 1998 Doug Evans <devans@canuck.cygnus.com> - - * read.c (do_s_func): New function. - (s_func): Call it. - * read.h (do_s_func): Add prototype. - -Mon Jun 1 12:47:30 1998 Doug Evans <devans@canuck.cygnus.com> - - * config/tc-m32r.c (m32r_do_align): Only fill code sections with - nops if fill pattern not specified. - -Mon Jun 1 14:08:35 1998 Ian Lance Taylor <ian@cygnus.com> - - From Andrew Crabtree <andrewc@typhoon.rose.hp.com>: - * config/te-go32.h (TE_GO32): Define. - * config/tc-i386.h (LOCAL_LABEL): Don't define if TE_GO32. - -Sun May 31 15:43:06 1998 Doug Evans <devans@canuck.cygnus.com> - - Implement .func/.endfunc pseudo-ops. - * read.h (stabs_generate_asm_func,stabs_generate_asm_endfunc): Declare. - (s_func): Declare. - * read.c (potable): Add .func,.endfunc. - (s_func): New function. - * stabs.c (stabs_generate_asm_func,stabs_generate_asm_endfunc): New - functions. - (in_doc_func_p,current_function_label): New static globals. - (stabs_generate_asm_lineno): Emit function relative stabs if in .func. - -Fri May 29 18:13:12 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-a29k.h (WORKING_DOT_WORD): Define. - * config/tc-alpha.h (WORKING_DOT_WORD): Define. - * config/tc-arm.h (WORKING_DOT_WORD): Define. - * config/tc-h8300.h (WORKING_DOT_WORD): Define. - * config/tc-h8500.h (WORKING_DOT_WORD): Define. - * config/tc-hppa.h (WORKING_DOT_WORD): Define. - * config/tc-i860.h (WORKING_DOT_WORD): Define. - * config/tc-i960.h (WORKING_DOT_WORD): Define. - * config/tc-tic30.h (WORKING_DOT_WORD): Define. - * config/tc-w65.h (WORKING_DOT_WORD): Define. - * config/tc-z8k.h (WORKING_DOT_WORD): Define. - * config/tc-a29k.c: Don't define md_short_jump_size, - md_long_jump_size, md_create_short_jump or md_create_long_jump. - * config/tc-alpha.c: Likewise. - * config/tc-alpha.h: Likewise. - * config/tc-arm.c: Likewise. - * config/tc-h8300.c: Likewise. - * config/tc-h8500.c: Likewise. - * config/tc-hppa.c: Likewise. - * config/tc-i860.c: Likewise. - * config/tc-i960.c: Likewise. - * config/tc-ppc.c: Likewise. - * config/tc-sh.c: Likewise. - * config/tc-sparc.h: Likewise. - * config/tc-tic30.c: Likewise. - * config/tc-w65.c: Likewise. - * config/tc-z8k.c: Likewise. - -Fri May 29 16:03:26 1998 Pat Rankin <rankin@eql.caltech.edu> - - * config/tc-vax.c (_): Delete this macro used for placeholder - values in vax_operand_width_size; it conflicts with the _() macro - used for internationalization. - -Fri May 29 13:46:07 1998 Ian Lance Taylor <ian@cygnus.com> - - * symbols.c (symbol_find_base): Fix case insensitive symbol name - code. From Chris Moller <moller@bops.com>. - - Based on patch from Klaus Kaempf <kkaempf@progis.de>: - * struc-symbol.h (struct broken_word): Add seg and subseg fields. - * read.c (emit_expr): Initialize seg and subseg fields of a new - broken word. - * write.c (write_object_file): Switch to the appropriate segment - and subsegment when processing a broken word. - - * config/tc-m68k.c (mri_assemble): New static function. - (build_mri_control_operand): Call mri_assemble rather than - md_assemble. - (s_mri_else, s_mri_break, s_mri_next, s_mri_for): Likewise. - (s_mri_endf, s_mri_endw): Likewise. - -Wed May 27 11:16:25 1998 Ian Lance Taylor <ian@cygnus.com> - - * read.c (s_org): Call md_flush_pending_output if it is defined. - - * config/tc-sparc.c (md_show_usage): Add \n\ to new string. - -Tue May 26 19:27:52 1998 Stan Cox <scox@equinox.cygnus.com> - - * config/tc-sparc.c (OPTION_LITTLE_ENDIAN_DATA): New. - (md_parse_option): Add for same. - (sparc_md_end): Set bfd_mach_sparc_sparclite_le. - (md_apply_fix3, tc_gen_reloc): Allow BFD_RELOC_SPARC_32LE. - (cons_fix_new_sparc): Added to create BFD_RELOC_SPARC_32LE. +2000-04-21 Richard Henderson <rth@cygnus.com> - * config/tc-sparc.h (cons_fix_new_sparc): Added. - -Thu May 21 15:02:41 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-d30v.c (write_2_short): Disregard opcode1->ecc when + bundling a non-delayed branch type instruction. - * config/tc-arm.c (find_real_start): Relax definition of local - labels. - -Tue May 19 16:59:44 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-d30v.c (d30v_align): Apply address adjustment to all - symbols at the given address, not just the last one specified. - -Tue May 19 08:25:19 1998 Catherine Moore <clm@cygnus.com> - - * config/tc-sparc.c (sparc_handle_align): Use number_to_chars_bigendian - or number_to_chars_littleendian to write data. - -Mon May 18 17:09:30 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-v850.c (md_assemble): Remove artificially created - register name symbols. - -Mon May 18 13:47:06 1998 Doug Evans <devans@canuck.cygnus.com> - - * write.c (fixup_segment): Change "segment" to "section" in - error message. - -Mon May 18 16:55:40 1998 Michael Meissner <meissner@cygnus.com> - - * write.c (fixup_segment): Change sym1-sym2 message again. - -Mon May 18 09:31:43 1998 Michael Meissner <meissner@cygnus.com> - - * write.c (fixup_segment): Improve error message for sym1-sym2 - errors when sym1 is in a different segment from sym2. +2000-04-20 Alexandre Oliva <aoliva@cygnus.com> -Wed May 13 10:16:37 1998 Doug Evans <devans@canuck.cygnus.com> + * config/tc-mn10300.c (HAVE_AM30): Define. + (md_assemble): Use it. - * config/tc-m32r.c (warn_unmatched_high): New static local. - (OPTION_WARN_PARALLEL): Rename from OPTION_WARN. - (OPTION_NO_WARN_PARALLEL): Rename from OPTION_NO_WARN. - (md_longopts): Recognize --{no-,}warn-unmatched-high. - (md_parse_option): Likewise. - (md_show_usage): Likewise. - (m32r_frob_file): Likewise. - - * read.c (generate_file_debug,generate_lineno_debug): New functions. - (read_a_source_file): Call them. - * read.h (stabs_generate_asm_file): Declare. - * stabs.c (stabs_generate_asm_file): New function. - (generate_asm_file): New function. - (stabs_generate_asm_lineno): Move file name handling into - generate_asm_file. - -Tue May 12 12:03:44 1998 Richard Henderson <rth@cygnus.com> - - * config/tc-d30v.c (cur_mul32_p, prev_mul32_p): Make static. - (d30v_current_align, d30v_current_align_seg): New variables. - (d30v_last_label): New variable. - (d30v_align, s_d30v_align, s_d30v_text): New functions. - (s_d30v_data, s_d30v_section): Likewise. - (md_pseudo_table): Call them. - (md_begin): Initialize d30v_current_align_seg. - (md_assemble): Call d30v_align when needed by known current alignment. - (d30v_frob_label, d30v_cons_align): New functions. - * config/tc-d30v.h (md_do_align): Remove. - (tc_frob_label): Call d30v_frob_label. - (md_cons_align): New. - - * config/tc-d30v.c (find_format): Convert complex expressions to - expression symbols before processing. Clean up code formatting. - -Sun May 10 22:35:02 1998 Jeffrey A Law (law@cygnus.com) - - * po/Make-in (install-info): New target. - -Thu May 7 15:49:07 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10200.c (md_assemble): Handle "bra" just like "jmp" - instructions. - * config/tc-mn10300.c (md_assemble): Likewise. +2000-04-19 Alan Modra <alan@linuxcare.com.au> -Thu May 7 11:47:22 1998 Doug Evans <devans@canuck.cygnus.com> + * config/obj-elf.c (obj_elf_change_section): Check for changed + section attributes. - * Makefile.am: Update with `make dep-am'. - (HFILES): Add cgen.h. - (cgen.o): Depend on cgen.h. + * Makefile.am: (CPU_MULTI_VALID): Remove. + (MULTI_CPU_TYPES): Define. + (MULTI_CPU_OBJ_VALID): Define. + (DEPTC): Use the above. + (DEPOBJ): Same here. + (DEP2): And here. + Regenerate dependencies. * Makefile.in: Regenerate. - * cgen.c (cgen_md_apply_fix3): Don't pass newline to as_warn_where. - -Thu May 7 13:20:56 1998 Anders Blomdell <anders.blomdell@control.lth.se> - - * gasp.c (grab_label): Permit a label to be a preprocessor - variable by permitting a label to start with a backslash. - -Thu May 7 12:50:33 1998 Frank Ch. Eigler <fche@cygnus.com> - - * config/tc-mips.c (validate_mips_insn): Removed hack - for previously inaccessible bitfields in some INSN_TRAP - instructions. - -Thu May 7 11:13:00 1998 Frank Ch. Eigler <fche@cygnus.com> - - * config/tc-d30v.c (do_assemble): Abort with error message - if opcode operands do not match. - -Thu May 7 09:36:06 1998 Frank Ch. Eigler <fche@cygnus.com> - - * config/tc-mips.c (macro_build, validate_mips_insn): Implement - 'q' operand format for 20-bit "break"/"sdbbp" instructions. - (mips_ip): Truncate overflowed "break" 'c' operand. Implement - similar new 'q' operand. - -Thu May 7 07:47:14 1998 Michael Meissner <meissner@cygnus.com> - - * cgen.c (cgen_asm_finish_insn): Fix typo. - -Thu May 7 02:19:14 1998 Doug Evans <devans@charmed.cygnus.com> - - * cgen.h: New file. - * cgen.c: Include it. - (MAX_FIXUPS): Renamed to CGEN_MAX_FIXUPS. - (cgen_asm_finish_insn): Result is now void. New arg `result'. - All callers updated. - * config/tc-m32r.c: Include cgen.h. - (m23r_insn): New members num_fixups,fixups. - -Wed May 6 16:29:19 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-hppa.c (md_apply_fix): Slightly rework some code - to avoid compiler warning. - -Wed May 6 15:26:34 1998 Klaus Kaempf <kkaempf@progis.de> - - * makefile.vms: Run dec c with /nodebug. Pass CC value when - calling make. - - * makefile.vms (OBJS): Add ehopt.obj - -Wed May 6 15:11:12 1998 Klaus Kaempf <kkaempf@progis.de> - - * doc/c-vax.texi: Correct and extend vax/vms documentation. - -Wed May 6 11:51:51 1998 Richard Henderson <rth@cygnus.com> - - * config/tc-d30v.c (do_assemble): Accept a new parameter requesting - a short format insn. - (md_assemble): Set it for explicitly packed insns. - -Tue May 5 13:23:13 1998 Nick Clifton <nickc@cygnus.com> - - * config/obj-coff.c (c_symbol_merge): Do not take address of - native fields when performing the memcpy. - -Tue May 5 13:10:41 1998 Gavin Koch <gavin@cygnus.com> - - * config/tc-mips.c (macro,macro2): Implement - M_DMULO_I, M_MULO_I, M_DMULOU_I, and M_MULOU_I. - -Mon May 4 17:49:14 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Changed to keep - relocations against globally visible symbols. - * config/tc-m68k.c (relaxable_symbol): New macro. - (m68k_ip, md_estimate_size_before_relax): Use it. - (tc_m68k_fix_adjustable): Also handle weak symbols. - -Mon May 4 16:12:23 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Keep relocs for all - references to externally visible symbols. - * config/tc-i386.c (md_apply_fix3): When OBJ_ELF, don't add the - values in twice for a PC relative reloc if the symbol is - externally defined. - - * config/tc-sparc.h (tc_fix_adjustable) [OBJ_AOUT]: When PIC, - don't adjust a PC relative reloc against an externally visible - symbol. - * config/tc-sparc.c (md_apply_fix3): When generating a.out PIC, - for a PC relative fixup against an externally visible defined - symbol, arrange to store object file and addend values as though - the symbol were not defined. - (tc_gen_reloc): Likewise. - -Thu Apr 30 13:09:39 1998 Fred Fish <fnf@ninemoons.com> - - * read.c (sizeof_leb128): Referenced externally by write.c so - don't inline. - -Wed Apr 29 15:45:57 1998 Michael Meissner <meissner@cygnus.com> - - * config/tc-m32r.c ({,expand_}debug_sym): New functions to record - and expand a 'debug' symbol associated with the next instruction - that does not cause a short instruction to be filled with a NOP. - (md_pseudo_table): Add support for .debugsym. - (assemble_parallel_insn): Add calls to expand_debug_sym as - appropriate. - (md_assemble): Ditto. - -Tue Apr 28 19:16:26 1998 Tom Tromey <tromey@cygnus.com> - - * as.c (main): Conditionally call setlocale. - * gasp.c (main): Likewise. - * asintl.h: Include <locale.h> if HAVE_LOCALE_H. - (LC_MESSAGES): Now can be defined even when ENABLE_NLS. - -Tue Apr 28 18:33:23 1998 Frank Ch. Eigler <fche@cygnus.com> - - * config/tc-d30v.c (md_show_usage): Correct gettext typo. - -Tue Apr 28 12:16:30 1998 Ian Lance Taylor <ian@cygnus.com> +2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG> - * config/tc-hppa.c: Change all calls to bzero to use memset. - (pa_ip): Add cast to avoid warning. - (tc_gen_reloc, md_apply_fix): Likewise. - (pa_find_space_by_number): Likewise. - (hppa_force_relocation): Likewise. - (pa_block): Change i to unsigned int. - * config/obj-som.h (obj_som_copyright): Declare. + * Makefile.am (YACC, LEX): Get them from configure. -Tue Apr 28 11:35:56 1998 Frank Ch. Eigler <fche@cygnus.com> +2000-04-18 H.J. Lu (hjl@gnu.org) - * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno - for line numbers for assembly source. + * config/tc-i386.c (offset_in_range): Use addressT instead of + bfd_vma for non-bfd assemblers. -Mon Apr 27 15:58:46 1998 Ian Lance Taylor <ian@cygnus.com> +2000-04-17 Alan Modra <alan@linuxcare.com.au> - * configure.in: Change version number to 2.9.4 - * configure: Rebuild. + * config/tc-i386.c (offset_in_range): Sign extend val so BFD64 + doesn't give spurious errors. -Mon Apr 27 12:07:33 1998 Doug Evans <devans@seba.cygnus.com> +2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG> - * cgen.c (cgen_asm_finish_insn): New arg relax_p. All callers updated. + * as.h (SEEK_SET): Define if undefined. -Mon Apr 27 15:16:12 1998 Ian Lance Taylor <ian@cygnus.com> +2000-04-13 Alan Modra <alan@linuxcare.com.au> - * ecoff.h: Change symbolS in function declaration to struct - symbol. + * config/tc-arm.c (md_apply_fix3): Don't use UL suffix on + constants, and don't assume offsetT is 32 bits. -Sun Apr 26 13:44:22 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-sh.c (parse_reg): Add casts to avoid warnings. - (md_convert_frag): Fix i18n typo. - -Sat Apr 25 20:12:02 1998 Richard Henderson <rth@cygnus.com> - - * ecoff.c (ecoff_get_cur_proc_sym): New function. - * ecoff.h: Protoype it. - * config/tc-alpha.c [ELF] (s_alpha_prologue): New function. - [EVAX] (s_alpha_prologue): Delete. - (md_pseudo_table): Update. - -Sat Apr 25 14:00:52 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-i960.c (md_assemble): Change bp_error_msg from static - array to local pointer. - (get_args, parse_expr): Add casts to avoid warnings. - -Fri Apr 24 12:47:42 1998 Philippe De Muyter <phdm@macqel.be> - - * read.c (s_set): Cast xmalloc return value to fragS *. - * config/tc-m68k.c (m68k_ip): Function made static to match - previous forward declaration. - (insert_reg, init_regtable, md_convert_frag_1): Likewise. - -Fri Apr 24 09:26:46 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-v850.c: Add internationalisation macros to error - strings. - - * config/tc-m32r.c (can_make_parallel): Add internationalisation - macros to error strings. - -Thu Apr 23 19:23:23 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-ppc.c (ppc_fix_adjustable): Correct test of whether a - reloc is in the TOC csect. - (md_apply_fix3): Correct gettext typo. - -Thu Apr 23 14:58:31 1998 Nick Clifton <nickc@cygnus.com> - - * config/tc-arm.c (find_real_start): Ignore symbols starting with - .L - they are local labels and the branches are not really - function calls but rather far jumps. - -Wed Apr 22 15:57:21 1998 Tom Tromey <tromey@cygnus.com> - - * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). - -Wed Apr 22 14:52:36 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-i386.c (md_assemble): Print operand number rather than - using ordinal_names. - (i386_operand): Likewise. - -Tue Apr 21 22:34:25 1998 Tom Tromey <tromey@scribbles.cygnus.com> - - * Makefile.am (INTLLIBS): Define to work around apparent automake - bug. - All Makefiles: Regenerated. - - * Many files: Added gettext invocations around user-visible - strings. - * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, - HAVE_LC_MESSAGES): Define. - * dep-in.sed: Added asintl.h. - * po/Make-in: New file. - * gasp.c (main): Call setlocale, bindtextdomain, and textdomain. - Include "asintl.h". - * read.c (Z_): Renamed from `_'. - * Makefile.am (SUBDIRS): Added po. - (POTFILES): new macro. - (po/POTFILES.in): New target. - ($(OBJS)): Added asintl.h. - (HFILES): Likewise. - (INCLUDES): Added -DLOCALEDIR, -I$(top_srcdir)/../intl. - (as_new_LDADD): Added $(INTLLIBS). - (as_new_DEPENDENCIES): Added $(INTLDEPS). - (gasp_new_LDADD): Added $(INTLLIBS). - (gasp_new_DEPENDENCIES): New macro. - * configure, aclocal.m4: Rebuilt. - * configure.in: Call CY_GNU_GETTEXT. Generate po/Makefile.in and - po/Makefile. - (ALL_LINGUAS): Define. - * macro.c: Include "asintl.h". - * as.c (main): Call setlocale, bindtextdomain, and textdomain. - * as.h: Include "asintl.h". - * config/tc-i386.c (ordinal_names): Removed. - (md_assemble): Changed error text to avoid ordinal_names. - (i386_operand): Likewise. - (reloc): Added as_bad to avoid i18n problems. - (tc_gen_reloc): Likewise. - * config/tc-arm.c (bad_args): Now a #define. - (bad_pc): Likewise. - * config/obj-vms.c (VMS_stab_parse): Changed type of - `long_const_msg'. - (global_symbol_directory): Unified strings to avoid i18n - problems. - * config/tc-m68k.c (get_reloc_code): Added some as_bad calls to - avoid i18n problems. - * config/tc-ns32k.c (reloc): Added as_bad to avoid i18n problems. - * config/tc-ppc.c (md_apply_fix3): Added as_bad_where to avoid - i18n problems. - * config/tc-sh.c (md_convert_frag): Added as_bad to avoid i18n - problems. - * config/tc-v850.c (md_assemble): Changed C++ comment into C - comment. - * config/tc-vax.c (md_assemble): Added as_warn to avoid i18n - problems. - * as.c (print_version_id): Added an fprintf to avoid i18n - problems. - * cond.c (cond_finish_check): Added as_bad call to avoid i18n - problems. - * expr.c (expr): Added as_warn call to avoid i18n problems. - * messages.c (as_assert): Changed code to avoid i18n problems. - (as_abort): Likewise. - * read.c (pseudo_set): Added as_bad call to avoid i18n problems. - (s_space): Likewise. - * po/Make-in, po/POTFILES.in, po/gas.pot: New files. - -Tue Apr 21 17:01:22 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.c (check_prefix): New static function, split out - from md_assemble. - (struct _i386_insn): Add wait_prefix field. - (md_assemble): Remove wait_prefix local variable. Use - check_prefix when adding a prefix. - - * config/tc-i386.c (current_templates): New static variable. - (md_assemble): Remove current_templates local variable. - (md_assemble, i386_operand): Improve error and warning messages in - many places. Add RESTORE_END_STRING in many places before error - return. Clarify some comments. - - * config/tc-i386.c (struct _i386_insn): Change seg field to a two - element array. - (md_assemble): Parse string instruction operands, looking for - segment override prefixes. Check for invalid segment prefixes on - string instruction. - (i386_operand): i.seg[] and max mem_operand changes for string - insns. - * config/tc-i386.h (EsSeg): Define. - - * config/tc-i386.h (regKludge): Define. - (iclrKludge, imulKludge): Don't define. - * config/tc-i386.c (md_assemble): Merge imulKludge and iclrKludge - code. Move ReverseRegRegmem fudges into Modrm case. Reorder - opcode_modifier checks to look for more common cases first. Add - default_seg for IsString case. - -Tue Apr 21 16:18:12 1998 Ian Lance Taylor <ian@cygnus.com> - - * configure.in: Call AM_PROG_LEX rather than AC_PROG_LEX and - AC_DECL_YYTEXT. - * configure: Rebuild with new automake and libtool. - * aclocal.m4, Makefile.in: Likewise. - - * doc/Makefile.am (as.dvi): New target. - * doc/Makefile.in: Rebuild. - -Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com> - - * configure.in: Added sparc86x support. - - * configure: Rebuild. - - * config/tc-sparc.c (lookup_arch): Added arch_type to struct - sparc_arch. - (md_parse_option): Warn if -EL is not supported for this architecture. +2000-04-12 Andrew Cagney <cagney@b1.cygnus.com> - * config/tc-sparc.h (SPARC_BIENDIAN) Always define. - -Sat Apr 18 01:19:01 1998 Jeffrey A Law (law@cygnus.com) + * config/tc-d10v.h: Include "write.h" to get definition of fixS. + (md_pcrel_from_section): Add prototype. + (d10v_fix_adjustable): Add prototype. + (d10v_force_relocation): Replace 'struct fix' with 'fixS'. - * config/tc-mips.c (mips_ip): Note when we use get match on - the full instruction name. + * config/tc-d10v.c (md_apply_fix3): Add paren around &&. -Wed Apr 15 15:17:27 1998 Richard Henderson <rth@cygnus.com> +2000-04-12 Nick Clifton <nickc@cygnus.com> - * symbols.c (resolve_symbol_value) [O_symbol]: Also store the symbol - back into the expression to handle add/sub simplification correctly. + * config/tc-d10v.c (find_opcode): Correctly calculate position of + symbol in frag chain. -Wed Apr 15 07:06:04 1998 Catherine Moore <clm@cygnus.com> +2000-04-10 Alan Modra <alan@linuxcare.com.au> - * config/tc-mips.c (hilo_interlocks): Remove 4300. + * config/tc-i386.c (fits_in_signed_byte): Change arg to offsetT. + (fits_in_unsigned_byte, fits_in_unsigned_word): Ditto. + (fits_in_signed_word, smallest_imm_type): Ditto. + (md_assemble): Use an offsetT var to hold offsetT values, not a + long. + (offset_in_range): New. + (md_assemble): Use it. + (md_convert_frag): Change type of target_address, opcode_address, + and displacement_from_opcode_start to offsetT. + (md_create_short_jump): Change type of offset to offsetT. + (md_create_long_jump): Ditto. + (md_apply_fix3): Use -4, not 0xfffffffc for BFD_RELOC_386_PLT32. + (md_chars_to_number): Remove. + (output_invalid): Remove duplicate prototype. -Mon Apr 13 16:51:04 1998 Nick Clifton <nickc@cygnus.com> +2000-04-09 Nick Clifton <nickc@cygnus.com> - * config/tc-arm.c (do_msr): Support undocumented 'msr cpsr_flg, - #<n>' instruction. + * Makefile.am (CPU_TYPES): Add 'avr'. + (TARGET_CPU_CFILES): Add 'tc-avr.c'. + (TARGET_CPU_HFILES): Add 'tc-avr.h'. -Thu Apr 9 10:29:42 1998 Doug Evans <devans@canuck.cygnus.com> + * Makefile.in: Regenerate. - * symbols.c (max_indent_level): New global. - (print_symbol_value_1): Use it. - * expr.h (expr_build_dot): Declare. - * expr.c (expr_build_dot): New function. + * doc/as.texinfo: Add M32R documentation. -Wed Apr 8 16:16:11 1998 Doug Evans <devans@canuck.cygnus.com> +Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com> - * symbols.c (print_binary): New function. - (print_expr_1): Call it. + * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add + --enable-build-warnings option. + * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions. + * Makefile.in, configure: Re-generate. -Mon Apr 6 12:06:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> +2000-04-07 Nick Clifton <nickc@cygnus.com> - * config/tc-m68k.c (m68k_ip, case "#B"): Install the offset of the - operand in the opcode. + * config/tc-arm.c (md_apply_fix3): Treat BFD_RELOC_ARM_PCREL_BLX + in the same way as BFD_RELOC_ARM_PCREL_BRANCH, and + BFD_RELOC_THUMB_PCREL_BLX lie BFD_RELOC_THUMB_PCREL_BRANCH. + (tc_gen_reloc): Accept BFD_RELOC_{ARM|THUMB}_PCREL_BLX. + (arm_force_relocation): Force relocations for + BFD_RELOC_{ARM|THUMB}_PCREL_BLX as well. -Fri Apr 3 11:58:19 1998 Alan Modra <alan@spri.levels.unisa.edu.au> +Wed Apr 5 22:26:32 2000 J"orn Rennecke <amylaar@cygnus.co.uk> - * config/tc-i386.h: Reorder operand flags and opcode modifier - flags for clarity. Remove unused definitions: Unknown, - ImmUnknown, DispUnknown, NoModrm. - * config/tc-i386.c (type_names): Add missing Debug type. - (md_assemble): Better duplicate prefix checking. Quicker string - instruction check via new opcode_modifier flag. + * config/tc-sh.c (get_operands): There's no third operand if the + first operand is an immediate. -Fri Apr 3 11:44:34 1998 Ian Lance Taylor <ian@cygnus.com> +Wed Apr 5 22:07:19 2000 J"orn Rennecke <amylaar@cygnus.co.uk> - * doc/as.texinfo (Invoking): Clarify -Wa example. + * config/tc-sh.c (immediate): Delete. + (sh_operand_info): Add immediate member. + (parse_reg): Use A_PC for pc. + (parse_exp): Add second argument 'op'. All callers changed. + (parse_at): Expect pc to be coded as A_PC. + Use immediate field in *op. + (insert): Add fourth argument 'op'. All callers changed. + (build_relax): Add second argument 'op'. All callers changed. + (insert_loop_bounds): New function. + (build_Mytes): Remove DISP_4. + Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}. Add REPEAT. + (assemble_ppi): Use immediate field in *operand. + (sh_force_relocation): Handle BFD_RELOC_SH_LOOP_{START,END}. + (md_apply_fix): Likewise. + (tc_gen_reloc): Likewise. Check for a pcrel BFD_RELOC_SH_LABEL. -Fri Apr 3 09:12:23 1998 Gavin Koch <gavin@cetus.cygnus.com> +Wed Apr 5 06:35:45 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br> - * config/tc-mips.c (mips_pseudo_table): Add weakext entry. - (s_mips_weakext): Define. - * ecoff.c (ecoff_directive_weakext): Don't define if defined(TC_MIPS). - * config/obj-ecoff.c (obj_pseudo_table): Don't add weakext if - defined(TC_MIPS). - -Thu Apr 2 22:42:02 1998 Jeffrey A Law (law@cygnus.com) + * config/tc-sparc.c (sparc_ip): Avoid string pasting. - * config/tc-mn10200.c (tc_gen_reloc): The difference of two symbols - is an error if the value can not be computed at assembly time. - * config/tc-mn10300.c (tc_gen-reloc): Likewise. +Tue Apr 4 19:27:50 2000 Hans-Peter Nilsson <hp@axis.com> -Thu Apr 2 16:36:47 1998 Ian Lance Taylor <ian@cygnus.com> + * internals.texi (CPU backend): Document + TC_CHECK_ADJUSTED_BROKEN_DOT_WORD. - * gasp.c (main): Set next field of new include_path structure to - NULL. From Avery Pennarun <averyp@gdc.ca>. +2000-04-04 Alan Modra <alan@linuxcare.com.au> - * read.c (s_mri_sect): Call as_bad rather than abort for an - unsupported MRI target. + * po/gas.pot: Regenerate. -Wed Apr 1 11:08:27 1998 Nick Clifton <nickc@cygnus.com> + * as.c (show_usage): Restore translated part of bug string. + * gasp.c (show_usage): Likewise. - * config/tc-arm.c (arm_validate_fix): New function. Determine if - the destination of a branch instruction should be altered. - (find_real_start): New function: Locate the real, Thumb coded - start of a Thumb function. - (do_t_branch23): Alter the destination of branches to Thumb - functions. + * Makefile.am (MKDEP): Use gcc -MM rather than ../mkdep. + (DEP): Quote when passing vars to sub-make. Use "mv -f" rather + than move-if-change. + (DEP1): Modify for "gcc -MM". + (DEPTC): Likewise. + (DEPOBJ): Likewise. + (DEP2): Likewise. + (CLEANFILES): Add DEPTCA, DEPOBJA, DEP2a, DEPA. + Update dependencies. + * Makefile.in: Regenerate. - * config/tc-arm.h: Define TC_VALIDATE_FIX. +2000-04-03 Alexandre Oliva <aoliva@cygnus.com> -Tue Mar 31 13:27:33 1998 Dean M. Deaver <deaver@amt.tay1.dec.com> + * config/tc-mn10300.c (md_pseudo_table): Use constant names. + (md_begin): Likewise. + (HAVE_AM33): New macro. + (md_assemble): Use it. Match r_regs and xr_regs only if + HAVE_AM33. - * config/tc-arm.c (decode_shift): Handle addressing mode 2 w/rrx - also. +2000-04-03 Alan Modra <alan@linuxcare.com.au> -Wed Apr 1 13:13:20 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + * as.h: #include "bin-bugs.h" + * as.c (show_usage): Use REPORT_BUGS_TO. + * gasp.c: #include "bin-bugs.h" + (show_usage): Use REPORT_BUGS_TO. - * doc/as.texinfo: Use @itemx for a secondary item in a table. - * doc/c-hppa.texi: Likewise. + * config/tc-sparc.c (md_show_usage): Add a trailing newline. -Tue Mar 31 17:52:40 1998 Ian Lance Taylor <ian@cygnus.com> +Mon Apr 3 13:56:03 2000 Hans-Peter Nilsson <hp@axis.com> - * Makefile.am: Rebuild dependencies. - * Makefile.in: Rebuild. + * write.c (write_object_file) [! WORKING_DOT_WORD]: If defined, + call TC_CHECK_ADJUSTED_BROKEN_DOT_WORD for each word after + adjustments. - * Makefile.am (DEP_INCLUDES): New variable. - (.dep1): Change to work when srcdir is not an absolute path. - (.tcdep, .objdep, .dep2, dep.sed): Likewise. - * Makefile.in: Rebuild. +2000-04-03 Alan Modra <alan@linuxcare.com.au> -Mon Mar 30 12:46:48 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-i386.c (i386_immediate): Don't assume a constant + immediate is necessarily 16 bits when in 16 bit code mode. + (md_assemble): Instead set guess_suffix here after we have checked + registers. - * config/tc-i386.h, config/tc-i386.c: Revert March 24 - LinearAddress patch. +2000-04-02 Richard Henderson <rth@cygnus.com> - * configure.in: Set version to 2.9.1. - * configure: Rebuild. + * config/tc-d30v.c (check_range): Allow signed or unsigned 32-bit + quantities. Correct right shift sign extension. + (build_insn): Make `number' unsigned long. Mask top 6 bits of + 32-bit value when shifting into place. - * Branched binutils 2.9. - -Mon Mar 30 11:22:08 1998 Alan Modra <alan@spri.levels.unisa.edu.au> - - * config/tc-i386.h (FWait): Define. - * config/tc-i386.c (md_assemble): Emit fwait prefix before any - other prefixes. Check FWait flag in opcode table to see which - instructions require an fwait prefix. - -Mon Mar 30 10:12:00 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> - - * stabs.c (get_stab_string_offset): Always create a stab string - section. - -Sat Mar 28 22:28:02 1998 Ian Lance Taylor <ian@cygnus.com> - - Fix some gcc -Wall warnings: - * atof-generic.c (atof_generic): Add casts to avoid warnings. - * ehopt.c (eh_frame_code_alignment): Likewise. - * expr.c (integer_constant, operand): Likewise. - * frags.c (frag_align): Likewise. - * gasp.c (level_0, change_base, doinstr): Likewise. - * hash.c (hash_ask): Likewise. - * listing.c (listing_page, calc_hex, print_lines): Likewise. - (debugging_pseudo): Likewise. - * macro.c (define_macro, check_macro): Likewise. - * read.c (read_a_source_file, s_align, s_float_space): Likewise. - (ignore_rest_of_line, float_cons): Likewise. - * symbols.c (decode_local_label_name): Likewise. - * write.c (record_alignment, cvs_frag_to_fill): Likewise. - (fixup_segment, number_to_chars_bigendian): Likewise. - (number_to_chars_littleendian): Likewise. - * config/atof-ieee.c (gen_to_words): Likewise. - * config/tc-sparc.c (md_begin, md_assemble): Likewise. - (sparc_ip, parse_keyword_arg, s_common): Likewise. - * read.c (output_big_sleb128): Initialize locals to avoid - warnings. - (output_big_uleb128, equals): Likewise. - * atof-generic.c (atof_generic): Change number_of_digits_* locals - to unsigned int. Change zeros to unsigned int. - * cond.c (s_if): Add return to default case. - * frags.c (frag_now_fix): Change return type to addressT. - * frags.h (frag_now_fix): Update declaration. - * listing.c (file_info_struct): Change linenum to unsigned int. - (struct list_info_struct): Change hll_line to unsigned int. - (print_source): Update format string. - * read.c (emit_expr): Change scan to unsigned int, and don't - bother to initialize it. - * symbols.c (dollar_label_count): Change to unsigned long. - * write.c (adjust_reloc_syms): Remove unused label reduce_fixup. - * config/tc-sparc.c (sparc_memory_model): Only define if OBJ_ELF. - * config/tc-sparc.c (tc_gen_reloc): Add return to default case. - -Fri Mar 27 12:46:47 1998 Ian Lance Taylor <ian@cygnus.com> - - * config/tc-m68k.c (m68k_ip): Check legal addressing modes for - mcf5200 just as we do for m68000. - (m68k_init_after_args): Likewise. - (md_estimate_size_before_relax): Likewise. +2000-04-01 Ian Lance Taylor <ian@zembu.com> -Fri Mar 27 10:30:01 1998 Catherine Moore <clm@cygnus.com> + * app.c: Add ATTRIBUTE_UNUSED as needed. + * config/tc-ppc.c: Likewise. + (ppc_size): Make unsigned long. + (ppc_insert_operand): Add casts to avoid warnings. - * config/tc-v850.c (md_assemble): Store relocation addend in - fixup instead of instruction. +2000-03-31 Nick Clifton <nickc@cygnus.com> -Thu Mar 26 23:07:18 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + * config/tc-d10v.h (md_flush_pending_output): Define. - * config/tc-i386.c (md_assemble): Swap template arguments to - CONSISTENT_REGISTER_MATCH macro in reverse direction test. - This macro is currently symmetric, so passing them the wrong - way didn't cause any problem, but may if the macro is changed - in the future. - After copying template to i.tm, use i.tm. rather than t-> to - access fields, and make t a const* - Move i.tm.operand_types[] swap to immediately after the copy. +2000-03-29 Nick Clifton <nickc@cygnus.com> -Wed Mar 25 13:44:18 1998 Doug Evans <devans@canuck.cygnus.com> + * config/tc-sh.h (SEG_NAME): New macro: return the name of a + segment. Works for both BFD_ASSEMBLER and others. + (SUB_SEGMENT_ALIGN): Use SEG_NAME. - * expr.h (expr_build_uconstant): Add prototype. - (expr_build_unary,expr_build_binary): Add prototypes. - * expr.c (expr_build_uconstant): New function. - (expr_build_unary,expr_build_binary): New functions. +2000-03-29 Nick Clifton <nickc@cygnus.com -Wed Mar 25 13:10:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> + * config/tc-arm.c (tinsns): Add "bal" instruction pattern. - * gasp.c (IS*): Cast argument to unsigned char, not unsigned int. - * macro.c (macro_expand_body): Increase buffer size. - * messages.c (as_warn): Likewise. - (as_warn_where, as_bad, as_bad_where): Likewise. +2000-03-28 Alan Modra <alan@linuxcare.com.au> -Wed Mar 25 12:59:07 1998 Ian Lance Taylor <ian@cygnus.com> + * listing.c (LISTING_LHS_WIDTH): Default depends on + LISTING_WORD_SIZE. + (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH. - Based on patch from H.J. Lu <hjl@gnu.org>: - * Makefile.am (DISTSTUFF): New variable. - (diststuff): New target. - * Makefile.in: Rebuild. +2000-03-27 Ian Lance Taylor <ian@zembu.com> -Tue Mar 24 16:51:29 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-sh.c (md_show_usage): Use backslash before newline in + string literal. - * config/tc-m32r.h (md_cleanup, md_elf_section_change_hook): Call - m32r_elf_section_change_hook. +2000-03-27 Alan Modra <alan@linuxcare.com.au> - * config/tc-m32r.c (m32r_elf_section_change_hook): New function to - emit a nop if a section ends with a 16 bit instruction. + * config/tc-avr.h (TC_HANDLES_FX_DONE): Define. -Tue Mar 24 19:48:09 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-avr.c (mcu_types): Add missing initialiser. + (md_pcrel_from_section): Add prototype. + (avr_operand): Remove redundant test of unsigned < 0. + (avr_cons_fix_new): Ensure exp_mod_pm zero on function exit. - * config/obj-coff.c (obj_coff_bss): Compile unconditionally. Call - s_lcomm rather than obj_coff_lcomm. - (obj_pseudo_table): Compile .bss pseudo-op unconditionally. +2000-03-27 Denis Chertykov <denisc@overta.ru> -Tue Mar 24 18:30:58 1998 H.J. Lu <hjl@gnu.org> + * config/tc-avr.c: New file for AVR support. + * config/tc-avr.h: Likewise. + * configure.in: Add AVR support. + * configure: Regenerate. - * config/tc-i386.h (LinearAddress): Define. - * config/tc-i386.c (md_assemble): If LinearAddress is set for the - instruction, don't use a default segment. +2000-03-26 Timothy Wall <twall@cygnus.com> -Mon Mar 23 18:53:40 1998 Joel Sherrill <joel@OARcorp.com> + * gasp.c (macro_op): Add new argument to check_macro call. + Macro structure definitions moved to macro.h + * sb.h: Add argument to prototype for input_scrub_include_sb. + * input-scrub.c (input_scrub_include_sb): Allow disabling of sb + nesting checks with an additional flag. + (struct input_save): Add flag to indicate whether current sb + should be checked for proper macro/conditional nesting. + (input_scrub_push/pop): Save/restore nest check flag. + (input_scrub_next_buffer): Ditto. Also call end of macro hook if + defined. + * macro.c (check_macro): Allow caller to retrieve parsed macro + information if a pointer is provided. This information may be + used by the new macro hooks. + * macro.h: Update prototype for check_macro. Macro struct + definitions moved here from macro.c/gasp.c. + * read.c (read_a_source_file): Add parameter to check_macro call, + and pass macro info to the macro hook, if defined. + (input_scrub_insert_line): New. Allow insertion of a line of + characters into the input stream. + (input_scrub_insert_file): New. Allow insertion of an arbitrary + file into the input stream. + (s_include): Use input_scrub_insert_file. + * internals.texi: Document new macro hooks. + * as.h: New prototypes added. - * configure.in: (sh*-*-rtems*): Switched from ELF to COFF. - * configure: Rebuild. +2000-03-26 Alan Modra <alan@linuxcare.com.au> -Fri Mar 20 19:15:44 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-i386.c: Don't start any as_bad or as_warn message with + an initial capital letter. + (i386_index_check): Reindent. - * aclocal.m4, configure: Rebuild with libtool 1.2. +2000-03-19 Nick Clifton <nickc@cygnus.com> -Thu Mar 19 16:03:12 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-arm.c (md_apply_fix3): Fix bug detecting overflow of pc + relative branches. - * config/tc-arm.c (md_apply_fix3): fix code to test the range of - PC relative branches. Patch courtesy of Jonathan Walton. +2000-03-17 Thomas de Lellis <tdel@windriver.com> - -Wed Mar 18 09:29:51 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-arm.c (do_t_adr): Flag "adr Rd,label" + instruction operand bad if Rd > 7 when generating + thumb instructions. Prevents for example, + "adr r12,label" from silently failing and generating + the wrong instruction. - * configure.in (emulations): Add thumb-pe target. +2000-03-17 Nick Clifton <nickc@cygnus.com> - * configure (emulations): Add thumb-pe target. + * config/tc-arm.c (md_apply_fix3): Handle same-section relocations + that have a destingation >= 0x400000. + Fix compile time warning messages. -1998-03-17 Ken Raeburn <raeburn@cygnus.com> +Thu Mar 16 23:45:16 2000 J"orn Rennecke <amylaar@cygnus.co.uk> - * itbl-lex.l (yywrap): Don't define if already defined as a - macro. + * config/tc-sh.c (md_begin): When encountering insn that are + not supported by the current arch, only change the name if + its contents are the same as prev_name. + (get_specific): If the the architecture doesn't match, fail. -Fri Mar 13 16:31:38 1998 Tom Tromey <tromey@cygnus.com> +Thu Mar 16 21:18:13 2000 J"orn Rennecke <amylaar@cygnus.co.uk> - * depend.c (quote_string_for_make): New function. - (wrap_output): Use it. + * config/tc-sh.c (IDENT_CHAR): Define. + (parse_reg): Use it instead of isalnum. Put r[0..7]_bank operand + matching back where it came from. -Thu Mar 12 18:28:22 1998 Nick Clifton <nickc@cygnus.com> +Thu Mar 16 20:58:10 2000 J"orn Rennecke <amylaar@cygnus.co.uk> - * config/obj-elf.c (obj_elf_section): Set bss flag in seg_info - structure if type is SHT_NOBITS. [Bug fix courtesy of rth] + * config/tc-sh.c (md_show_usage): Add description of -dsp. -Sat Feb 28 17:28:55 1998 Richard Henderson <rth@cygnus.com> +2000-03-15 Jonathan Larmour <jlarmour@redhat.co.uk> - * config/tc-alpha.c (md_shortopts, md_longopts, md_parse_option): - Recognize -GN and -relax. - (md_begin): Initialize gp size from -G switch. - (alpha_force_relocation): Always force if -relax. - (alpha_align): Take a new argument that will specify when to - emit an R_ALPHA_ALIGN relocation (though we don't do that now). - Change all callers. Emit nop alignment padding as nop+unop pair. + * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before + normal operands. -Sat Feb 28 17:06:22 1998 Richard Henderson <rth@cygnus.com> +2000-03-15 Kazu Hirata <kazu@hxi.com> - * config/obj-elf.c [TC_ALPHA]: Include <elf/alpha.h>. - * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): New. + * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate. -Thu Feb 26 15:49:04 1998 Michael Meissner <meissner@cygnus.com> +Mon Mar 13 22:02:59 2000 Hans-Peter Nilsson <hp@axis.se> - * config/tc-d30v.c (write_2_short): Delayed jsr instructions don't - require padding to the next long word boundary. + * expr.c (operand) [case 'f']: When testing if '0f' can start a + floating-point-number, make sure 'f' is in FLT_CHARS. -Mon Feb 23 11:29:06 1998 Doug Evans <devans@seba.cygnus.com> +Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson <hp@axis.se> - * cgen.c: #include symcat.h. - * config/tc-m32r.c: Likewise. + * read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition. + (s_lcomm_internal): Use it. + * doc/internals.texi (CPU backend): Document it. + * config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3 + bytes. -Mon Feb 23 10:27:40 1998 Jeffrey A Law (law@cygnus.com) +2000-03-10 Geoffrey Keating <geoffk@cygnus.com> - * config/tc-mips.c (mips_ip, case 'P'): Make 'P' arguments be - absolute expressions instead of '$' prefixed register names. + * config/tc-mips.c (mips_ip): Don't put stuff in .rodata + when embedded-pic. -Sat Feb 21 22:36:52 1998 Richard Henderson <rth@cygnus.com> + * config/tc-mips.c (SWITCH_TABLE): The ELF embedded-pic + implementation doesn't have special handling for switch + statements. + (macro_build): Allow for code in sections other than .text. + (macro): Likewise. + (mips_ip): Likewise. + (md_apply_fix): Do pc-relative relocation madness for MIPS ELF. + Don't perform relocs if we will be outputting them. + (tc_gen_reloc): For ELF, just use fx_addnumber for pc-relative + relocations. Allow BFD_RELOC_16_PCREL_S2 relocs when + embedded-pic. - * read.c (s_set): Record file and line info for symbols when -as. - (pseudo_set): Don't overwrite that dummy fragment. +2000-03-09 Catherine Moore <clm@cygnus.com> -Fri Feb 20 15:03:13 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-m32r.c (m32r_fix_adjustable): Look up the + relocation type based on the entry in the fixup structure. + Put S_IS_EXTERN processing back in. - * config/tc-ppc.c (md_pseudo_table): Add "section". - (ppc_named_section): New static function. +2000-03-08 H.J. Lu (hjl@gnu.org) -Thu Feb 19 22:25:42 1998 Richard Henderson <rth@cygnus.com> + * Makefile.am (install-exec-tooldir): Depend on + install-exec-bindir for parallel make. + * Makefile.in: Regenerated. - * tc-ppc.c (ppc_biei): Cache the last symbol we inserted - so we don't have to scan the entire list. +2000-03-06 Nick Clifton <nickc@cygnus.com> -Tue Feb 17 17:02:15 1998 Fred Fish <fnf@cygnus.com> + * config/tc-m32r.c (struct md_longopts): Add -m32r command line + switch. + (md_parse_option): Parse -m32r command line switch - disable m32rx + compatability. + (md_show_usage): Document new option. - * config/tc-d30v.c (parallel_ok): For the explicitly parallel - case, allow the parallel instructions to modify the same flag - bits. + * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi. + * doc/Makefile.in: Regenerate. + * doc/c-m32r.texi (M32R-Opts): Document new command line switch. -Thu Feb 19 16:08:15 1998 Richard Henderson <rth@cygnus.com> +2000-03-02 Michael Meissner <meissner@redhat.com> - * listing.c (list_symbol_table): Categorize symbols by - undefined_section rather than sy_frag->line == NULL. + * config/tc-d30v.c (check_range): Remove code that incorrectly + sign extended values where bits < 32. -Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com> +2000-03-02 H.J. Lu (hjl@gnu.org) - * Makefile.am (install-exec-local): Install properly when ln - fails or tooldir == prefix. + * configure.in: Support --enable-targets=all on ia32. + * configure: Regenerated. -Tue Feb 17 18:58:51 1998 Doug Evans <devans@seba.cygnus.com> +2000-03-01 Nick Clifton <nickc@cygnus.com> - * cgen.c (cgen_md_apply_fix3): Delete call to validate_operand. - Test result of insert_operand for error. + * gasp.c (do_align): Remove bogus check of alignment value. -Fri Feb 13 16:41:42 1998 Ian Lance Taylor <ian@cygnus.com> +2000-02-27 Thomas de Lellis <tdel@windriver.com> - * Makefile.am (AUTOMAKE_OPTIONS): Add cygnus. - * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. - * doc/Makefile.am (AUTOMAKE_OPTIONS): Define. - * doc/Makefile.in: Rebuild. + * config/obj-elf.c (elf_frob_symbol): Remove code which when + TC_PPC was defined forced the type of a symbol with no other type + to be BSF_OBJECT. -Fri Feb 13 00:47:44 1998 Ian Lance Taylor <ian@cygnus.com> +2000-02-27 Hans-Peter Nilsson <hp@axis.com> - * config/tc-mips.c (macro_build): Handle operand type 'C'. - (macro): Fix handling of M_COP[0-3]. + * doc/internals.texi (CPU backend): Mention that + line_separator_chars do not break up comments. Fix typos for + LEX_AT and LEX_NAME descriptions. Document operands for + TC_EQUAL_IN_INSN, md_operand and md_section_align. Correct + description of md_create_short_jump usage. Document argument for + md_undefined_symbol. -Thu Feb 12 14:06:59 1998 Ian Lance Taylor <ian@cygnus.com> +2000-02-27 Jakub Jelinek <jakub@redhat.com> - Based on patches from Ross Harvey <ross@teraflop.com>: - * macro.c (ISSEP): Only treat '<' and '>' as separator characters - if macro_alternate or macro_mri. - (getstring): Remove support for byte constants between < and >. - (get_any_string): '<' only starts a string if macro_alternate or - macro_mri. - (macro_expand_body): Permit keyword parameters following - positional parameters. + * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option. + (md_parse_option): Handle it. + (md_show_usage): Document it. - NetBSD patches from Gordon W. Ross <gwr@mc.com>: - * configure.in (alpha*-*-netbsd*): New target. - * config/te-nbsd.h (LOCAL_LABELS_FB): Define. - * configure: Rebuild. +2000-02-27 Ian Lance Taylor <ian@zembu.com> - * as.h (flag_warn_suppress_instructionswap): Move from here... - * config/tc-d10v.c (flag_warn_suppress_instructionswap): ...to - here, and make static. + * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an + opcode, for the instruction `pal19'. From Andrea Arcangeli + <andrea@suse.de>. - * ehopt.c (eh_frame_code_alignment): Only use seg_info if - BFD_ASSEMBLER or MANY_SEGMENTS. +2000-02-26 Alan Modra <alan@spri.levels.unisa.edu.au> - * as.c (show_usage): Update bug-gnu-utils address. - * gasp.c (show_usage): Likewise. - * doc/as.texinfo (Bug Reporting): Likewise. + * config/tc-i386.c (i386_immediate): Move constant operand sizing + from here.. + (md_assemble): To here, before template operands are matched. + Also ensure a constant immediate is sign extended when we know the + size is at most 16 bits. This is to catch cases like "add + $0xffc0,%ax" where we don't know the size, and thus that the + immediate can be represented as Imm8S until after parsing the + register operand. + (i386_displacement): Similarly sign extend 16 bit constant + displacements. + (md_assemble): Relax 16-bit jump constant range check to suit sign + extended displacements. -Wed Feb 11 23:26:28 1998 Jeffrey A Law (law@cygnus.com) +2000-02-26 Andreas Jaeger <aj@suse.de> - * config/tc-mips.c (load_address): Don't use mips III or mips IV - insns regardless of the size of a pointer if we're in mips I or - MIPS II mode. - (macro, macro2, s_cprestore, s_cpadd): Likewise. + * doc/c-mips.texi (MIPS Opts): Fix typo in last patch. -Thu Feb 12 03:41:00 1998 J"orn Rennecke <amylaar@cygnus.co.uk> +2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au> -Fix rac to accept only a0: - * tc-d10v.c (parallel_ok, find_opcode): - Split OPERAND_ACC into OPERAND_ACC0 and OPERAND_ACC1. - Introduce OPERAND_GPR. + * config/tc-i386.c (md_assemble): Don't swap intersegment jmp and + call operands when intel_syntax. + (intel_float_operand): Return 2 for "fi...". + (i386_operand_modifier): Change "DWORD PTR" test to suit above. + Return SHORT_MNEM_SUFFIX for "WORD PTR" when "fi...". Revert + earlier "SHORT" change. + (md_assemble): When determining suffix from Regs, exclude + InOutPortReg. -Wed Feb 11 16:28:13 1998 Richard Henderson <rth@cygnus.com> +2000-02-24 Nick Clifton <nickc@cygnus.com> - * read.c (s_fill): Handle non-constant repeat counts by creating - an rs_space fragment. + * configure: Add arm-wince, mips-pe and sh-pe targets. + * configure: Regenerate. -Tue Feb 10 18:31:31 1998 Ian Lance Taylor <ian@cygnus.com> + * config/obj-coff.h (COFF_WITH_PE): Define for mips-pe and + sh-pe targets. + (TARGET_FORMAT): Set to "pe-shl" for the sh-pe target and to + "pe-mips" for the mips-pe target. - * config/tc-i386.c (i386_operand): Change error added Jan 2 1998 - from as_bad to as_warn. + * config/tc-arm.c (insns): Change displacement encoded in BL + and B instructions if the target port is arm-wince. + (do_ldst): Do not bias the relocation offset if the target + port is arm-wince. + (md_pcrel_from): Add in missing relocation offset bias if the + target os arm-wince. -Tue Feb 10 18:04:00 1998 Jim Lemke <jlemke@cygnus.com> + * config/tc-mips.c (mips_target_format): Support COFF flavour. + (md_begin): Disable -G support for mips-pe target. + (md_apply_fix): Treat BFD_RELOC_RVA reloc as BFD_RELOC_32. + * config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Add support for + COFF flavour. - * as.c: (perform_an_assembly_pass): Use [TEXT|DATA|BSS]_SECTION_NAME - * as.h: Define default values of [TEXT|DATA|BSS]_SECTION_NAME - * config/obj-elf.c (elf_begin): Use [TEXT|DATA|BSS]_SECTION_NAME + * config/tc-sh.c (md_begin): sh-pe target is little endian. + * config/tc-sh.h (SUB_SEGMENT_ALIGN): If using a BFD + assembler, just set the alignment to 4. -Tue Feb 10 17:58:18 1998 Ian Lance Taylor <ian@cygnus.com> + * config/te-wince-pe.h: New file for WinCE targets. Define + TE_WINCE. - * ehopt.c (eh_frame_code_alignment): If not BFD_ASSEMBLER, use - seg_fix_rotP rather than fix_root from seg_info. +2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au> -Tue Feb 10 15:32:22 1998 Ian Carmichael <iancarm@cygnus.com> + * config/tc-i386.c (md_assemble): Swap segments too for intel mode + string instructions. + (i386_operand_modifier): Set i.suffix = WORD_MNEM_SUFFIX for SHORT. + (i386_intel_memory_operand): After finding a segment override, + check again for no `[' before looking for a displacement. Bomb if + more than one displacement rather than silently discarding the + second and subsequent ones. Free strings malloc'd by + build_displacement_string. - * expr.c: Add support for 0x1_2_3_4 bignums. +2000-02-24 Catherine Moore <clm@cygnus.com> -Tue Feb 10 14:43:40 1998 Ian Lance Taylor <ian@cygnus.com> + * config/obj-som.c (obj_pseudo_table): Add "weak". + (obj_som_weak): New routine. - * configure.in: Change -linux* to -linux-gnu*. - * configure: Rebuild. +2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au> - * app.c (do_scrub_begin): Treat \r as whitespace. + * config/tc-i386.c (union i386_op): New. + (struct _i386_insn): Delete disps[], imms[], regs[]. Add op[]. + Throughout file replace occurences of disps[n], imms[n], regs[n] + with equivalent op[n].disps, op[n].imms, op[n].regs. Simplify + intel mode operand swapping. Add assert in regKludge and + fake_zero_displacement code. Test i.types[n] when outputting + displacements and immediates. Combine output of Disp16 with + Disp32. + (md_assemble): Don't try to fix broken UNIXWARE_COMPAT opcodes + when in intel mode by (not) reversing fsub and fdiv operands + before the template search. This fails for single operand + shorthand forms of the instruction, and if UNIXWARE_COMPAT is + undefined. Instead fix the base_opcode after we've found the + template. Move base_opcode xor with found_reverse_match from + opcode output code to before this fix so we test for the correct + opcodes. + (md_assemble): Don't use strcmp when deciding to ignore the suffix + check in intel mode. Instead compare opcodes. -Mon Feb 9 14:16:11 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-i386.h (TC_RELOC): Delete. + * config/tc-i386.c (TC_RELOC): Delete. Replace usage of TC_RELOC + with equivalent call to reloc. - * Makefile.am: Update dependencies. - * Makefile.in: Rebuild. + * as.h (flag_m68k_mri): Move declaration after target include, and + only declare when TC_M68K defined. Define as zero otherwise. + (LABELS_WITHOUT_COLONS, NO_PSEUDO_DOT): If undefined, define as 0. + * app.c (scrub_m68k_mri): Declare only when TC_M68K defined. + Define as zero otherwise. + (do_scrub_begin): Use m68k_mri parameter only when TC_M68K defined. + (struct app_save): Declare scrub_m68k_mri only when TC_M68K. + (app_push, app_pop): Save scrub_m68k_mri only when TC_M68K. + (do_scrub_chars): Use LABELS_WITHOUT_COLONS directly rather than + testing whether defined. + * cond.c (ignore_input): Use NO_PSEUDO_DOT directly. + * expr.c (operand): #ifdef unused case labels when TC_M68K undefined. + * read.c: Use LABELS_WITHOUT_COLONS and NO_PSEUDO_DOT directly + rather than testing whether defined. + (s_mri): Set flag_m68k_mri only when TC_M68K defined. + (parse_mri_cons): Declare and use only when TC_M68K. + * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define as 1. + * config/tc-m68k.h (NO_PSEUDO_DOT): Define as 1. + * config/tc-m88k.h (NO_PSEUDO_DOT): Define as 1. -Sat Feb 7 15:33:51 1998 Ian Lance Taylor <ian@cygnus.com> + * NEWS: Mention IBM 370 support. - * configure, aclocal.m4: Rebuild with new libtool. +2000-02-23 Richard Henderson <rth@cygnus.com> -Fri Feb 6 16:08:30 1998 Jeffrey A Law (law@cygnus.com) + * config/tc-i386.c (md_assemble): When swapping operands for + intel_syntax, assume everything that's not Imm or Disp is a + register. - * config/tc-mips.c (md_begin): If mips_cpu is set, then use it as - the argument to bfd_set_arch_mach. - (load_address): Use bfd_arch_bits_per_address to determine the - bit size of an address instead of looking at the isa level. - (macro, macro2, s_cprestore, s_cpadd): Likewise. +2000-02-23 Linas Vepstas <linas@linas.org> -Fri Feb 6 14:44:34 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-i370.c, config/tc-i370.h: New files. + * Makefile.am: Add support for Linux/IBM 370. + * configure.in: Likewise. + * app.c (do_scrub_begin): Don't lex single quote when TC_I370. + * config/obj-elf.c: Include elf/i370.h + (obj_elf_section): Don't do anything special for flag_mri if TC_I370. - * config/tc-v850.c (md_parse_option): Add -mv850any command line option. + * Makefile.in: Regenerate. + * configure: Regenerate. -Thu Feb 5 12:39:08 1998 Ian Lance Taylor <ian@cygnus.com> + * doc/c-i370.texi: New file. + * doc/all.texi: Include it. + * doc/as.texinfo: And here. + * doc/Makefile.am(CPU_DOCS): Add c-i370.texi. + * doc/Makefile.in: Regenerate. - * ehopt.c: New file. - * as.h (enum _relax_state): Add rs_cfa. - (check_eh_frame, eh_frame_estimate_size_before_relax): Declare. - (eh_frame_relax_frag, eh_frame_convert_frag): Declare. - * read.c (emit_expr): Call check_eh_frame. - * write.c (cvt_frag_to_fill): Handle rs_cfa. - (relax_segment): Likewise. - * Makefile.am: Rebuild dependencies. - (GAS_CFILES): Add ehopt.c. - (GENERIC_OBJS): Add ehopt.o. - * doc/internals.texi (Frags): Document rs_cfa. - - * as.c (show_usage): Mention --traditional-format. - (parse_args): Accept --traditional-format. - * as.h (flag_traditional_format): Declare. - * output-file.c (output_file_create): If flag_traditional_format, - set BFD_TRADITIONAL_FORMAT on stdoutput. - * doc/as.texinfo, doc/as.1: Document --traditional-format. - - * config/tc-mips.c (append_insn): Make sure that if we have a - fixup for an unmatched %hi reloc, it does not associated with a - variant frag. - - * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. - * doc/Makefile.in: Likewise. +2000-02-19 Michael Meissner <meissner@redhat.com> -Wed Feb 4 15:41:54 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-d30v.c (parallel_ok): Use FLAG_NOT_WITH_ADDSUBppp to + determine if an instruction can be used in parallel with an ADDppp + or SUBppp instruction. - * config/tc-m32r.c (check_for_side_effects): New function. - (can_make_parallel): Add checks for instruction side effects - clashing with the other instruction. - (assemble_parallel_insn): Improve warning messages. Return error - message from non-swapped instruction order. +2000-02-22 Andrew Haley <aph@cygnus.com> -Wed Feb 4 20:00:26 1998 James G. Smith <jsmith@teknema.demon.co.uk> + * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64. - * config/tc-arm.c: Rename arm_after_pass_hook() to arm_cleanup(). +2000-02-22 Andrew Haley <aph@cygnus.com> - * config/tc-arm.h: Replace md_after_pass_hook definition with a - md_cleanup definition. This moves the forced literal output to - the end of the source pass, and avoids macro's inserting literals - into the code immediately after the macro expansion. + * config/tc-mips.c (mips_gp32): New variable. + (macro_build) Use mips_gp32. + (mips_ip): Ditto. + (md_longopts): Add "-mgp32" and "-mgp64". + (md_parse_option): Add OPTION_GP32 and OPTION_GP64. -Wed Feb 4 13:17:19 1998 Ian Lance Taylor <ian@cygnus.com> + (OPTION_M7900): Change offset + (OPTION_NO_M7900): Ditto. - * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: A reloc against - a gas internal symbol is adjustable. - * config/tc-ppc.h (tc_fix_adjustable): Likewise. +2000-02-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br> - * as.h: If gcc version greater than 2.6, use `__format__' and - `__printf__' in function attributes, rather than `format' and - `printf'. + * config/obj-coff.c (add_lineno): Accept non-positive lineno with + warning, and bump it to 1. -Mon Feb 2 18:38:18 1998 Ian Lance Taylor <ian@cygnus.com> +2000-02-22 Ian Lance Taylor <ian@zembu.com> - * config/tc-sparc.c: Only include elf/sparc.h if OBJ_ELF. + From Brad Lucier <lucier@math.purdue.edu>: + * dwarf2dbg.c (print_stats): Add cast to force printf argument to + match format. -Mon Feb 2 18:30:34 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU> +2000-02-21 Catherine Moore <clm@cygnus.com> - Add tms320c30 support: - * config/tc-tic30.h: New file. - * config/tc-tic30.c: New file. - * config/obj-coff.h: If TC_TIC30, include coff/tic30.h and define - TARGET_FORMAT as "coff-tic30". - * configure.in (tic30-*-*aout*, tic30-*-*coff*): New targets. - * Makefile.am: Rebuild dependencies. - (CPU_TYPES): Add tic30. - (CPU_OBJ_VALID): tic30-aout is valid. - (TARGET_CPU_CFILES): Add config/tc-tic30.c. - (TARGET_CPU_HFILES): Add config/tc-tic30.h. - * configure, Makefile.in: Rebuild. + * config/tc-mips.c (MF_HILO_INSN): Define. + (mips_7000_hilo_fix): Declare. + (append_insn): Conditionally insert nops after an mfhi/mflo insn. + (md_parse_option): Check for 7000_HILO_FIX options. + (OPTION_M7000_HILO_FIX): Define. + (OPTION_NO_M7000_HILO_FIX): Define. + * doc/c-mips.texi (-mfix7000): Describe. -Mon Feb 2 10:20:37 1998 Nick Clifton <nickc@cygnus.com> +2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au> - * config/tc-v850.c (md_assemble): Improvements to error messages. + * listing.c (print_lines): Remove unused variable `end'. -Mon Feb 2 12:39:05 1998 Geoff Keating <geoffk@ozemail.com.au> + * config/tc-i386.c (md_assemble): Use `reloc()' to select reloc + type for JumpInterSegment output. Use enum bfd_reloc_code_real for + reloc_type when BFD_ASSEMBLER. + (md_estimate_size_before_relax): Use enum bfd_reloc_code_real for + reloc_type when BFD_ASSEMBLER. Move common code out of switch + statement and quell signed vs. unsigned comparison warning. - * config/tc-ppc.c (md_apply_fix3): Change BFD_RELOC_HI16 and - BFD_RELOC_HI16_S to store the high bits of any value. +2000-02-18 Nick Clifton <nickc@cygnus.com> - * config/tc-ppc.h (tc_fix_adjustable): Undo change of Fri Jun 27. - (TC_RELOC_RTSYM_LOC_FIXUP): Don't let the - assembler calculate relocations to any external symbol at all. - * config/tc-ppc.c (md_apply_fix3) [OBJ_ELF]: Correct bugs - involving generation of pc-relative relocs. - (md_pcrel_from_section) [OBJ_ELF]: The job this code used to do - has been moved to md_apply_fix3. + * config/tc-d10v.c (find_opcode): Add a symbol's value to + the computed frag offset, rather than overwriting it. - * config/tc-ppc.c (md_apply_fix3): Fix test for too-far branch. - (ppc_elf_suffix): Warn about 'identifier+constant@got' syntax, - which actually means (the address of identifier's GOT entry) + - constant, which is not particularly useful. +Thu Feb 17 00:11:08 2000 J"orn Rennecke <amylaar@cygnus.co.uk> -Fri Jan 30 11:02:35 1998 Doug Evans <devans@canuck.cygnus.com> + * config/tc-sh.c ("elf/sh.h"): Include. + (sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables. + (md.begin): Initialize target_arch. + Only include opcodes in has table that match selected architecture. + (parse_reg): Recognize register names for sh-dsp. + (parse_at): Recognize post-modify addressing. + (get_operands): The leading space is now optional. + (get_specific): Remove FDREG_N support. Add support for sh-dsp + arguments. Update valid_arch. + (build_Mytes): Add support for SDT_REG_N. + (find_cooked_opcode): New function, broken out of md_assemble. + (assemble_ppi, sh_elf_final_processing): New functions. + (md_assemble): Use find_cooked_opcode and assemble_ppi. + (md_longopts, md_parse_option): New option: -dsp. + * config/tc-sh.h (elf_tc_final_processing): Define. + (sh_elf_final_processing): Declare. - * read.h (include_dirs): Declare. - (include_dir_count,include_dir_maxlen): Declare. +Fri Feb 11 14:21:51 2000 Jeffrey A Law (law@cygnus.com) -Fri Jan 30 11:47:02 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-hppa.c (pa_build_unwind_subspace): Use subseg_new to create + the unwinder subspace. Save the current seg/subseg before creating + the new seg/subseg. - * configure.in: Correct check for shared opcodes library. - * configure: Rebuild. +2000-02-10 Nick Clifton <nickc@cygnus.com> - * listing.c (buffer_line): If we can't open the file, set at_end. - (listing_print): Remove unused local variable fi. + * config/tc-mcore.c (INST_BYTE0): Redefine to handle big and + little endian targets. + (INST_BYTE1): Redefine to handle big and little endian + targets. + (cpu_type): New type: Select between M340 and M210. + (parse_psrmod): New function: Parse the PSRCLR and PSRSET + instructions of the M340. + (md_assemble): Add support for the MULSH and OPSR classes of + instructions. + (md_atof): Add support for little endian targets. + (md_parse_option): Add support for -EL, -EB and -mcpu command + line switches. + (md_convert_frag): Add support for little endian targets. + (md_apply_fix3): Add support for little endian targets. + (md_number_to_chars): Add support for little endian targets. - * config/m68k-parse.y (reglistpair): Handle register list in - either order. +2000-02-10 Timothy Wall <twall@redhat.com> - * config/vms-conf.h: Don't undef VERSION. + * read.c (read_a_source_file): If TC_START_LABEL_WITHOUT_COLON is + defined, use it to verify the symbol just read should be a label. -Thu Jan 29 14:42:44 1998 Pat Rankin <rankin@eql.caltech.edu> +2000-02-10 Timothy Wall <twall@redhat.com> - * Makefile.am (CONFIG_OBJS): New variable, containing part of old - OBJS variable. - (GENERIC_OBJS): New variable, with the rest of the old OBJS - variable. - (OBJS): Now just $(CONFIG_OBJS) and $(GENERIC_OBJS). - ($(srcdir)/make-gas.com): Rename from make-gas.com. - (stamp-mk.com): Replace $(OBJS) with $(GENERIC_OBJS). - (EXTRA_DIST): Define. - * vmsconf.sh: Handle {targ-cpu, obj-format, atof-targ} modules - explicitly rather than via the list of object files. - (gcc-as.opt): New file created when make-gas.com is run. - * config-gas.com: Create {targ-cpu.h, obj-format.h, targ-env.h, - itbl-cpu.h} to #include appropriate file rather than copying that - file. - * config/vms-conf.h: Synchronize with current config.in. - * Makefile.in: Rebuild. + * app.c (do_scrub_chars): Handle "||" for parallel instructions + when DOUBLEBAR_PARALLEL is defined. Avoid stripping whitespace + around colons when KEEP_WHITE_AROUND_COLON is defined. + * doc/internals.texi (CPU backend): Document DOUBLEBAR_PARALLEL + and KEEP_WHITE_AROUND_COLON. -Thu Jan 29 18:48:19 1998 Bill Moyer <billm@cygnus.com> +2000-02-08 Timothy Wall <twall@redhat.com> - * config/tc-d30v.c (do_assemble): Added flag_explicitly_parallel. - (parallel_ok): Relaxed parallel subinstruction dependency check. + * read.c (s_rept): Call do_repeat, which abstracts the repeat + logic. + (do_repeat): New. Abstract repeat logic so that a "break" can be + implemented. + (end_repeat): New. Provide support for a "break" out of the + repeat loop. + * read.h: Add prototypes for new functions. -Wed Jan 28 14:35:00 1998 Bill Moyer <billm@cygnus.com> +2000-02-08 Timothy Wall <twall@redhat.com> - * as.h (flag_warn_suppress_instructionswap): added new flag. - * tc-d10v.c (md_parse_option,md_longopts): added "--nowarnswap" - command line argument. - * tc-d10v.c (write_2_short): emit "Swapping instructions" - warning only if flag_warn_suppress_instructionswap is false. + * doc/internals.texi: Document NUMBERS_WITH_SUFFIX macro. + * as.h: Provide a default NUMBERS_WITH_SUFFIX definition (zero). + * expr.c: Handle numbers with suffixes if NUMBERS_WITH_SUFFIX is + non-zero. -Wed Jan 28 16:41:19 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> +2000-02-08 Timothy Wall <twall@redhat.com> - * configure.in (i386-*-mingw32*): New target. - * configure: Rebuild. + * read.c: Added elseif to directives table. + * read.h: Added prototype for s_elseif. + * doc/as.texinfo: Added description for elseif. + * cond.c (s_elseif): New function -Wed Jan 28 14:51:18 1998 Ian Lance Taylor <ian@cygnus.com> +2000-02-04 Timothy Wall <twall@redhat.com> - * symbols.c (resolve_symbol_value): Don't set the segment if it - hasn't changed, and this is OBJ_AOUT without BFD_ASSEMBLER. + * listing.c (print_lines): Remove conditionals causing bug in + listings. - * config/obj-aout.h (S_IS_LOCAL): Correct typo--pass argument to - S_GET_SEGMENT. +2000-02-03 Timothy Wall <twall@cygnus.com> -Wed Jan 28 13:54:50 1998 Pat Rankin <rankin@eql.caltech.edu> + * as.h: Define OCTETS_PER_BYTE and OCTETS_PER_BYTE_POWER + default values. + * frags.c (frag_new): Calculate fr_fix in octets + (frag_now_fix) Return offset as target address offset (bytes). + (frag_now_fix_octets) New - Return offset in octets (8-bit + quantities). + * frags.h: Added prototype for frag_now_fix_octets(). + Distinguish between octets and bytes in field descriptions. + * listing.c (calc_hex): Account for octets vs bytes when + printing addresses/offsets. + (print_lines) Ditto. Also, if LISTING_WORD_SIZE is not 1, and + target is little-endian, print the octets in a word in big-endian + order so that the display looks like a proper hexadecimal number, + instead of having the octets reversed. + * read.c (do_align): When recording alignment, alignment power + should be in terms of target bytes (minimum addressible unit) + instead of octets. + (do_org) Convert ORG target address (byte) argument into an + octet offset when generating a variable fragment. + * symbols.c (resolve_symbol_value): Symbol final value + converted to a target address offset (bytes) from its octet offset. + * config/obj-coff.c (coff_frob_symbol): Symbol target address + offset (bytes) is adjusted by the frag offset (octets) converted + to bytes. + (coff_frob_section) Section alignment power is in terms of bytes; + convert it to an octet alignment power when calculating size (and + size mask) in octets. Don't modify the section size in order to + "align" it for TI COFF, since that format has a different method + for storing alignment information. - as.h (unlink): Reverse 13-Feb-97 change; use of unlink vs remove - depends upon HAVE_{UNLINK,REMOVE} values rather than host - compiler. +2000-02-01 Timothy Wall <twall@cygnus.com> -Wed Jan 28 13:48:08 1998 Ian Lance Taylor <ian@cygnus.com> + * stabs.c (generate_asm_file): Escape backslashes in stabs file + entries, matching the way GCC generates them. If not escaped, the + filename is encoded incorrectly. - * config/obj-coff.h (RESOLVE_SYMBOL_REDEFINITION): Define. +2000-01-31 Nick Clifton <nickc@cygnus.com> -Wed Jan 28 09:52:00 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-arm.c (reg_table): Add support for ATPCS register + naming conventions. - * config/tc-v850.c (v850_insert_operand): Display instruction when - an error is encountered. +2000-01-31 Geoff Keating <geoffk@cygnus.com> -Tue Jan 27 13:32:01 1998 Robert Lipe <robertl@dgii.com> + * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if + already defined. + * config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES): + New macro. + * config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag + of a symbol when we really care about its value. - * configure.in (i386-*-sco3.2v5*): Defaults to ELF now. - (i386-*-sco3.2v5*coff): New target. - (i386-*-sco3.2*): New target. - * configure: Rebuild. +2000-01-19 Chandra Chavva <cchavva@cygnus.com> -Tue Jan 27 11:06:52 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-mcore.c (md_assemble): Give warning message if + operands passes to instruction are more than the spec. - * config/tc-v850.c: Tidy error message production. +2000-01-27 Thomas de Lellis <tdel@windriver.com> -Tue Jan 27 12:24:32 1998 Ian Lance Taylor <ian@cygnus.com> + * config/tc-arm.c (armadjust_symtab): If the assembler is in + Thumb mode but the label seen was not declared as '.thumb_func' + then set the ST_INFO type to STT_ARM_16BIT mode. This allows + correct disassembly of Thumb code bounded by non function labels. - * config/tc-arm.c (md_apply_fix3): Add new variable newimm to hold - validate_immediate return value in the right type for comparisons - to FAIL. +2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> -Tue Jan 27 06:51:59 1998 Richard Henderson <rth@cygnus.com> + * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c + Add dependencies for e-i386aout.o. Fix 2 comment lines. - * listing.c (MAX_BYTES): Use listing variables not constants. - (data_buffer): No longer an array, but a pointer. - (calc_hex): sizeof(data_buffer) -> MAX_BYTES. - (listing_listing): Allocate data_buffer. + * Makefile.in: Same here. + Update copyright. -Tue Jan 27 06:38:35 1998 Richard Henderson <rth@cygnus.com> + * configure.in: Set bfd_gas for i386-aout when primary target + is bfd. Handle i386aout emulation. Don't use te_file=multi, as + we may need the primary te_file. Remove incorrect comment. - * as.c (parse_args): Add --listing-lhs-width, --listing-lhs-width2, - --listing-rhs-width, --listing-cont-lines. - (show_usage): Update. - * listing.c (listing_lhs_width, listing_lhs_width_second): New vars. - (listing_lhs_cont_lines, listing_rhs_width): New vars. - (print_lines): Use the variables instead of the constants. - (listing_listing): Likewise. - * listing.h: Declare the new vars. - -Tue Jan 27 05:32:05 1998 Richard Henderson <rth@cygnus.com> + * configure: Regenerate. - * as.c (parse_args): Add --keep-locals alias for -L. - Add --strip-local-absolute. - (show_usage): Update. - * as.h (flag_strip_local_absolute): New flag. - * symbols.c (S_IS_LOCAL): Use it. - * config/obj-aout.h (S_IS_LOCAL): Likewise. - * config/obj-bout.h (S_IS_LOCAL): Likewise. - * config/obj-coff.h (S_IS_LOCAL): Likewise. + * config/e-i386aout.c: New file. -Mon Jan 26 13:07:41 1998 Nick Clifton <nickc@cygnus.com> + * as.c (USE_EMULATIONS): Move to before print_version_id. + (struct emulation): Add i386aout. + (show_usage): Split text strings. Reformat -a text. Add --em + help. + Update copyright. - * config/tc-m32r.c: Detect if explicitly parallel instructions - might have an io conflict and issue a warning message. + * obj.h (struct format_ops): Add s_get_other and s_get_desc. + (aout_format_ops): New. + Update copyright. -Thu Jan 22 17:51:44 1998 Nick Clifton <nickc@cygnus.com> + * read.c (s_lcomm_internal): Rewrite OBJ_AOUT,OBJ_BOUT + preprocessor conditional and add aout USE_EMULATIONS tests. + (read_a_source_file): Don't pass error strings to printf as + format arg. + Update copyright. - * cgen.c (cgen_save_fixups, cgen_restore_fixups, - cgen_swap_fixups): Functions to save, restore and swap the fixup - chain with a backup copy. - (cgen_asm_finish_insn): Returns address of constructed insn. + * gasp.c (exp_get_abs): Don't pass error strings to printf as + format arg. + (do_data): Same here. + (process_file): And here. + Update copyright. -Wed Jan 21 16:49:10 1998 Richard Henderson <rth@cygnus.com> + * symbols.c (colon): Rewrite "already defined" fatal message + code for aout with USE_EMULATIONS. + Update copyright. - * listing.c (file_info_struct): Remove FILE, add POS. - (last_open_file_info, last_open_file): New; a one entry FILE* cache. - (file_info): Don't open the file. - (buffer_line): Check for the file in the last_open cache, updating - as necessary. - (print_source): Don't reference file_info->file. - (listing_listing): Likewise. - (listing_print): Close the file in the cache, if any. + * config/obj-aout.c (OBJ_HEADER): Define. + (obj_pseudo_table): Rename to aout_pseudo_table. Init all + fields of sentinel. + (obj_aout_frob_symbol): Expand S_GET_DESC, S_GET_TYPE, + S_GET_OTHER, S_SET_TYPE macros since we don't need obj-multi + forms here. + (obj_aout_type): Expand S_SET_OTHER here too. + (obj_read_begin_hook): Remove. + (aout_pop_insert): New. + (obj_aout_s_get_other): New. + (obj_aout_s_get_desc): New. + (aout_format_ops): New. + Update copyright. -Fri Jan 16 14:51:48 1998 Ian Lance Taylor <ian@cygnus.com> + * config/obj-aout.h (obj_pop_insert): Define so non-multi usage + gets aout_pseudo_table. + (aout_pseudo_table): Declare. + (obj_read_begin_hook): Define. + Update copyright. - * read.c (dwarf_file_string): New file static variable. - (emit_expr): Look for constant sequence that leads up to a file - name in DWARF debugging output. - (stringer): Use dwarf_file_string to decide whether to accept a - string as a file name. + * config/obj-coff.c (obj_pseudo_table): Rename to + coff_pseudo_table. + (coff_pop_insert): Use coff_pseudo_table. + (coff_sec_sym_ok_for_reloc): Remove. + (coff_format_ops): Add 0 entries for s_get_size, s_set_size, + and comment all zero entries and remove #if 0 code. + Update copyright. -Fri Jan 16 11:30:37 1998 Richard Henderson <rth@cygnus.com> + * config/obj-coff.h (obj_pop_insert): Define. + (coff_pseudo_table): Declare. + Update copyright. - * tc-m68k.c (m68k_ip): Remove absl->reglst MRI hack. - (crack_operand): Add reg->reglst MRI hack. - (r_seg): Put reglst symbols in reg_section. - (m68k_frob_symbol): Frob reglst symbols into absolute_section. + * config/obj-ecoff.c (ecoff_format_ops): Add 0 entries for + s_get_size, s_set_size. Comment all zero entries. + Update copyright. -Thu Jan 15 14:19:01 1998 Richard Henderson <rth@cygnus.com> + * config/obj-elf.c (elf_s_get_other): New function. + (obj_read_begin_hook): Rename to elf_obj_read_begin_hook. + (obj_symbol_new_hook): Rename to elf_obj_symbol_new_hook. + (elf_format_ops): Add elf_s_get_other, 0 s_get_size entry, and + comment. + (obj_elf_parse_section_letters): Don't pass error strings to + printf as format arg. + Update copyright. - * tc-sh.c (get_specific): Handle SGR & DBR. + * config/obj-elf.h (ECOFF_DEBUGGING): Define when + OBJ_MAYBE_ECOFF. + (elf_s_get_other): Declare. + (S_GET_OTHER) Define as elf_s_get_other if not already + defined. + (S_SET_OTHER): Only define when not already defined. + (elf_obj_read_begin_hook): Declare. + (obj_read_begin_hook): Define. + (elf_obj_symbol_new_hook): Declare. + (obj_symbol_new_hook): Define. + Update copyright. -Thu Jan 15 13:46:48 1998 Richard Henderson <rth@cygnus.com> + * config/obj-multi.h: Add copyright header and protect against + multiple inclusion. Add * to all function pointers. + (OBJ_HEADER): If defined, include it rather than other defines + in this file. + (obj_frob_file_after_relocs): Test for NULL. + (obj_symbol_new_hook): Here too. + (obj_sec_sym_ok_for_reloc): And here. + (S_GET_OTHER): Define. + (S_GET_DESC): Define. + (ECOFF_DEBUGGING): Remove as it's done in obj-elf.h + (OBJ_MAYBE_ELF): Update comment. - * tc-h8300.c (parse_reg): Take the length of the symbol into - account when attempting to match a register name. - * tc-h8500.c (parse_reg): Likewise. + * config/tc-i386.c (i386_immediate): Add OBJ_MAYBE_AOUT to + OBJ_AOUT preprocessor conditional and handle emulation by + testing OUTPUT_FLAVOR. + (i386_displacement): Here too. + (md_section_align): Similarly here. + (i386_target_format): Conditionally compile when more than one + of OBJ_MAYBE_{ELF,COFF,AOUT} defined. Add aout case. + (i386_immediate): Fix error message for aout BFD_ASSMBLER. + (i386_displacement): Here too. + Update copyright. -Wed Jan 14 17:52:33 1998 Nick Clifton <nickc@cygnus.com> + * config/tc-i386.h (AOUT_TARGET_FORMAT): Define for each TE_*. + Define TARGET_FORMAT for aout only when not multi. + Update copyright. - * cgen.c: Formatting changes to improve readability. + * config/te-multi.h: Delete file as it's identical to te-generic.h -Wed Jan 14 15:41:41 1998 Jeffrey A Law (law@cygnus.com) +2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au> - * config/tc-mips.c (macro): Rework division code to avoid unfilled - delay slot. + * config/tc-i386.h (DWORD_MNEM_SUFFIX): Delete. + * config/tc-i386.c (DWORD_MNEM_SUFFIX): Rename all occurrences to + LONG_MNEM_SUFFIX. -Wed Jan 14 18:04:20 1998 Michael Meissner <meissner@cygnus.com> + * config/tc-i386.h (INTEL_DWORD_MNEM_SUFFIX): Rename to + DWORD_MNEM_SUFFIX. + * config/tc-i386.c (INTEL_DWORD_MNEM_SUFFIX): Here too. Fix some + comments. - Based on a patch from Jim Wilson - * config/tc-d30v.c (do_assemble): Remove non-ansi default case. - (tc_gen_reloc): Handle cross section PC relative relocs - correctly. +2000-01-13 Clinton Popetz <cpopetz@cygnus.com> -Wed Jan 14 15:02:19 1998 Doug Evans <devans@seba.cygnus.com> + * config/tc-mips.c (mips_do_align): New function. + * config/tc-mips.h (md_do_align): Define. - * config/tc-mips.c (mips_ip): Don't test pinfo flags if INSN_MACRO. +2000-01-10 Philip Blundell <philb@gnu.org> -Mon Jan 12 13:04:57 1998 Doug Evans <devans@seba.cygnus.com> + * doc/c-arm.texi (ARM Options): Fix typo. + (ARM-Chars): Correct description of `#'. Mention that `;' is a + line separator for Linux. + * doc/as.texinfo (Comments): Mention the ARM. - * cgen.c: #include setjmp.h. Clean up pass over `struct foo' usage. - (expr_jmp_buf): New static local. - (cgen_parse_operand): Allow use of longjmp in parsing to handle errors. - (cgen_md_operand): New function. - * tc-m32r.c: Clean up pass over `struct foo' usage. - (md_estimate_size_before_relax): Use CGEN_INSN_MNEMONIC. +2000-01-10 Philip Blundell <pb@futuretv.com> -Tue Jan 6 15:36:02 1998 Richard Henderson <rth@cygnus.com> + * configure.in (arm*-*-conix*): New target. + (arm*-*-linux-gnu*): Match instead of arm-*-linux* and + armv*-*-linux-gnu. + * configure: Regenerate. - * symbols.c (S_SET_SEGMENT): Don't set the segment for section syms. - (S_IS_EXTERNAL, S_IS_LOCAL): Correct parenthetication. +2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de> -Fri Jan 2 16:08:54 1998 Ian Lance Taylor <ian@cygnus.com> + * config/obj-elf.c (elf_pseudo_table): Define visibility pseudos. + (obj_elf_visibility): New function. - * config/tc-i386.c (i386_operand): Give an error if there are - unrecognized characters after an expression. + * doc/as.texinfo (Visibility): New node: document visibility + pseudo ops. -For older changes see ChangeLog-9697 +For older changes see ChangeLog-9899 diff --git a/contrib/binutils/gas/ChangeLog-9697 b/contrib/binutils/gas/ChangeLog-9697 index dd2af82..7b93733 100644 --- a/contrib/binutils/gas/ChangeLog-9697 +++ b/contrib/binutils/gas/ChangeLog-9697 @@ -98,7 +98,6 @@ Mon Dec 15 15:20:32 1997 Nick Clifton <nickc@cygnus.com> * doc/c-m32r.texi: New file, documenting m32r specific features. - Mon Dec 15 10:32:28 1997 Jeffrey A Law (law@cygnus.com) * config/tc-mips.c (mips_ip): Correctly insert 'P' operands into diff --git a/contrib/binutils/gas/ChangeLog-9899 b/contrib/binutils/gas/ChangeLog-9899 new file mode 100644 index 0000000..a853b88 --- /dev/null +++ b/contrib/binutils/gas/ChangeLog-9899 @@ -0,0 +1,4854 @@ +1999-12-22 Philip Blundell <pb@futuretv.com> + + * config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate + hook function when changing sections. + (arm_s_data): Likewise. + +1999-12-14 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_parse_option): Add support for -marm720 + command line switch. + +Tue Nov 30 22:59:00 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (md_pseudo_table): Add ".am33" pseudo-op. + (r_registers, xr_registers): Define. + (r_register_name, xr_register_name): New functions. + (md_assemble): Handle new am33 operand types and instruction + formats. + (mn10300_insert_operand, check_operand): Likewise. + +1999-11-29 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (thumb_mode): Turn into a tristate variable. + (s_force_thumb): Set thumb_mode to 2. + (md_assemble): Do not complain about thumb instructions on a + non-thumb target if thumb_mode is set to 2. + +1999-11-28 Michael Meissner <meissner@cygnus.com> + + * config/tc-alpha.c (toplevel): Include struc-symbol.h. + (alpha_macro_arg): Add MACRO_{LITERAL,BASE,BYTOFF,JSR} cases. + (O_...): Add new machine dependent expressions if we are handling + explicit relocations. + (alpha_reloc_op): New static table holding the explicit relocation + information. + (alpha_literal_hash): New static to hold the hash table for + explicit relocations. + (alpha_macros): Add support for explicit relocations. + (md_begin): If explicit relocations, initialize hash table. + (md_assemble): Don't print a second error if tokenize_arguments + already printed an error message. + (md_apply_fix): Add support for explicit relocations. + (alpha_force_relocation): Ditto. + (alpha_fix_adjustable): Ditto. + (alpha_adjust_symtab): New function to support explicit + relocations. + (alpha_adjust_symtab_relocs): Ditto. + (debug_exp): Debug stub compiled if DEBUG_ALPHA is defined. + (tokenize_arguments): Add debug code if DEBUG_ALPHA is defined. + Add support for explicit relocations. Return -2 if an error + message was already printed. + (find_macro_match): Add support for explicit relocations. Comment + each of the cases. + (emit_insn): Add support for explicit relocations. + (assemble_tokens): Ditto. + (emit_ldgp): Ditto. + (load_expression): Ditto. + (emit_lda): Ditto. + (emit_ldah): Ditto. + (emit_ir_load): Ditto. + (emit_loadstore): Ditto. + (emit_ldXu): Ditto. + (emit_ldil): Ditto. + (emit_sextX): Ditto. + (emit_division): Ditto. + (emit_jsrjmp): Ditto. + (emit_retjcr): Ditto. + + * config/tc-alpha.h (RELOC_OP_P): Enable explicit relocations if + ELF object format. + (tc_adjust_symtab): If explicit relocations, call the function + alpha_adjust_symtab. + (TC_FIX_TYPE): Add fields to be able to move explicit lituse + relocations next to the literal relocation they reference. + (TC_INIT_FIX_DATA): Initialize the new fields. + (TC_FIX_DATA_PRINT): Print the new fields if DEBUG5 is defined. + +Wed Nov 24 20:27:58 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Handle PA2.0 unit completers. Handle + 'B' operand for PA2.0 bb instruction. + +1999-11-18 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.h (TC_FORCE_RELOCATION): Define for Mcore-pe + target. + + * config/tc-mcore.c (tc_gen_reloc): Support generation of RVA + relocs. + (mcore_force_relocation): Force relocations to be generated for + RVA relocs. + +1999-11-16 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (i386_immediate): Disallow O_big immediates. + (i386_displacement): Disallow O_big displacements. + +Mon Nov 15 20:12:43 1999 Donald Lindsay <dlindsay@cygnus.com> + + * config/tc-arm.c (do_mia,do_mar,do_mra,do_pld,do_ldrl,do_co_reg): + Small improvements in error checking. + (md_assemble): Support for unconditional ARM instructions. + (md_parse_option): Support for -m[arm]v5e flag. + +1999-11-12 Nick Clifton <nickc@cygnus.com> + + * macro.c (buffer_and_nest): Do not check beyond the end of the + buffer. + +1999-11-11 Nick Clifton <nickc@cygnus.com> + + * macro.c (buffer_and_nest): Look for seperator after TO and + FROM tokens. + +1999-11-08 Andrew Haley <aph@cygnus.com> + + * app.c (do_scrub_chars): When in State 10, treat backslash + characters in the same way as as symbol characters. + +1999-11-07 Richard Henderson <rth@cygnus.com> + + * config/tc-alpha.c (alpha_align): Check, don't assert, that + the previous label was in the current section before playing + with auto-alignment. + +1999-11-06 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (v850_force_relocation): Force relocation + for weak symbols. + (v850_pcrel_from_selection): Do not compute a pcrel offset if + the symbol is weak. + +1999-11-05 Michael Meissner <meissner@cygnus.com> + + * expr.h (operatorT): Increase machine dependent operators to 16. + * expr.c (op_rank): Ditto. + +1999-11-03 Ian Lance Taylor <ian@zembu.com> + + * read.c (pseudo_set): Reject attempts to set the value of a + section symbol. + + * config/obj-elf.c (obj_elf_ident): Call md_flush_pending_output + if it is defined. + + * config/obj-elf.c (elf_set_index): Add ATTRIBUTE_UNUSED. + + * config/obj-elf.c (elf_frob_file_after_relocs): Don't pass NULL + to bfd_set_section_contents. + +1999-11-03 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.h (TARGET_BYTES_BIG_ENDIAN): Change to false. + +1999-11-01 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (macro_build): Use OPCODE_IS_MEMBER. + (mips_ip): Use OPCODE_IS_MEMBER. + +Wed Oct 27 16:50:44 1999 Don Lindsay <dlindsay@cygnus.com> + + * config/tc-arm.c (reg_required_here): Improve comments. + + * config/tc-arm.c (thumb_opcode): Add "variants" field. + (tinsns): Initialize variants field. + + * config/tc-arm.c (bad_args, bad_pc): Renamed to BAD_ARGS and + BAD_PC respectively. + +1999-10-27 Scott Bambrough <scottb@netwinder.org> + + * config/tc-arm.c (reloc_map[]): Fix compiler warning. + * config/tc-arm.h: Fix compile time warnings. + +Mon Oct 18 18:11:10 MDT 1999 Diego Novillo <dnovillo@cygnus.com> + + * tc_d10v.c (find_opcode): Allow ATSIGN to match expressions of the + form @abs16, @(abs16) and @(abs16 + imm). + +1999-10-21 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (ISA_HAS_COPROC_DELAYS) : New. + (ISA_HAS_64_BIT_REGS) New. + (gpr_interlocks,md_begin,reg_needs_delay,append_insn, + mips_emit_delays,macro_build,load_register,load_addresss, + macro,macro2,mips_ip,s_cprestore,s_cpadd): Simplify + and/or use new ISA_xxx macros in expressions involving + ISA, particularly mips_opts.isa. + +1999-10-18 Michael Meissner <meissner@cygnus.com> + + * expr.h (operatorT): Add machine dependent operators md1..md8. + (expressionS): Make X_op 8 bits instead of 7. Add a X_md field + for the machine dependent operators to use. + + * expr.c (op_rank): Add machine dependent operators. + + * config/tc-alpha.c (O_pregister): Define as a machine dependent + operator. + (O_cpregister): Ditto. + (md_begin): Change X_op test that field is wide enough to use + O_max instead of O_alpha_max. + (cpu_types): Fill in missing initializer. + (alpha_num_macros): Make unsigned. + (md_assemble): Make opnamelen be size_t. + (md_apply_fix): Cast alpha_num_operands to int before testing. + (alpha_force_relocation): Ditto. + (alpha_fix_adjustable): Ditto. + (alpha_fix_adjustable): Mark unused arguments ATTRIBUTE_UNUSED. + (tc_gen_reloc): Ditto. + (tc_get_register): Ditto. + (emit_ldgp): Ditto. + (emit_lda): Ditto. + (emit_ldah): Ditto. + (emit_ldil): Ditto. + (s_alpha_ent): Ditto. + (s_alpha_end): Ditto. + (s_alpha_frame): Ditto. + (s_alpha_prologue): Ditto. + (s_alpha_file): Ditto. + (s_alpha_gprel32): Ditto. + (s_alpha_proc): Ditto. + (s_alpha_set): Ditto. + (s_alpha_base): Ditto. + (s_alpha_align): Ditto. + (s_alpha_arch): Ditto. + (alpha_align): Ditto. + (assemble_insn): Suppress unused variable warning. + (emit_insn): Ditto. + (assemble_insn): Don't assume X_op and X_unsigned are in a given + order in the structure. + (s_alpha_coff_wrapper): Avoid int/unsigned comparison. + +Sun Oct 17 17:15:58 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_apply_fix): Make "fmt" an int. + +1999-10-12 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (i386_index_check): Correct #endif location. + +Mon Oct 11 14:02:40 1999 Geoffrey Keating <geoffk@cygnus.com> + + * as.c (show_usage): Document new options. + (parse_args): Add --no-warn, --warn, --fatal-warnings, + which become 'W', OPTION_WARN, and OPTION_WARN_FATAL. + (parse_args): Parse the new options. + (main): If there were warnings, and --fatal-warnings + was specified, print an error. + * as.h: New variable, flag_fatal_warnings, for new option. + +Sun Oct 10 01:47:23 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org> + + * config/tc-hppa.c (pa_ip): Add new codes 'cc', 'cd', 'cC', 'co', + '@'. Change autoincrement completers to fall through to cache control + completers. + + * config/tc-hppa.c (pa_ip): Remove unused args. Add code to '?W' + arg. + (pa_parse_addb_64_cmpltr): New function. + + * config/tc-hppa.c (pa_ip): Change error message. + (pa_ip,pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr) Fix '?N' and + '?Q' args to allow falling through. + + * config/tc-hppa.c (pa_ip): Implement conditional codes "?N", "?Q". + Remove unused conditional codes. + (pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr): New. + +Thu Oct 7 00:23:53 MDT 1999 Diego Novillo <dnovillo@cygnus.com> + + * config/tc-d30v.c (CHAR_BIT): Define. + (check_range): Fix bit operations to support integers bigger than + 32 bits. + +Thu Oct 7 00:11:50 MDT 1999 Diego Novillo <dnovillo@cygnus.com> + + * config/tc-d10v.c (check_range): Check range for RESTRICTED_NUM3 + operands. + +Mon Oct 4 17:24:23 1999 Nick Clifton <nickc@cygnus.com> + Doug Evans <devans@cygnus.com> + + Add support for m32rx. + * config/tc-m32r.c (enable_m32rx): New static global. + (enable_special,warn_explicit_parallel_conflicts,optimize): Ditto. + (allow_m32rx): New function. + (M32R_SHORTOPTS): Add `O'. + (md_longopts): Add --m32rx plus several warning options. + (md_parse_option): Handle new options. + (md_show_usage): Print them. + (md_begin): Enable m32rx. + (OPERAND_IS_COND_BIT): New macro. + (first_writes_to_seconds_operands): New function. + (writes_to_pc,can_make_parallel,make_parallel): New functions. + (target_make_parallel,assemble_two_insns): New functions. + (md_assemble): Recognize "insn1 -> insn2" and "insn1 || insn2". + If optimizing and m32rx, try to make consecutive insns parallel. + +Tue Sep 28 14:06:44 1999 Geoffrey Keating <geoffk@cygnus.com> + + * config/tc-mips.c (nopic_need_relax): Allow for the + .sdata.foo sections generated by -fdata-sections, + and for the .gnu.linkonce.s sections generated by C++. + +Thu Sep 23 07:13:45 1999 Jerry Quinn <jquinn@nortelnetworks.com> + + * config/tc-hppa.c (pa_ip): Replace 'B', 'M', 'l' and 'g' handling + with cleaner code using completer prefixes. Add 'Y'. + + * config/tc-hppa.c (pa_ip): Add parens to silence compiler. + +Wed Sep 22 09:37:19 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Avoid ANSI specific initialization. + (pa_ip, case 'm'): Failure to get a CBIT specifier just means the + insn does not match and we should try the next insn in the table. + +1999-09-22 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (MULTI_SET_PSR): Rename to LDM_TYPE_2_OR_3. + +Mon Sep 20 04:01:41 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Fix thinkos in recent cleanup + of PA2.0 support. + +1999-09-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br> + + * config/tc-i386.c (md_shortopts): Check OBJ_MAYBE_ELF as well as + OBJ_ELF. If ELF, add "sq". + (md_parse_option): If ELF, ignore -s and -q. + (md_show_usage): Mention ELF options. + +Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Handle 'J', 'K' and 'cc' + operands. + + * config/tc-hppa.c (pa_ip): Handle "fe", and 'cJ'. + + * config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'. + + * config/tc-hppa.c (struct pa_it): New field "trunc". + (pa_ip): Handle 'h', 'm', '=', '{', and '_' operands. + (pa_parse_ftest_gfx_completer): New function + (pa_parse_fp_cnv_format): New function. + + * config/tc-hppa.c (pa_ip): Handle 'X' operand. + (md_apply_fix): Handle 22bit pc-rel branches. + + * config/tc-hppa.c (pa_ip): Handle 'B' operand. + + * config/tc-hppa.c (pa_ip): Handle 'L' and 'M' operands. + + * config/tc-hppa.c (pa_ip): Handle 'l' operand. + + * config/tc-hppa.c (pa_ip): Handle 'g' operand. + +Sat Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling. + (pa_ip): Handle 'fX'. + +Fri Sep 17 11:57:34 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_build_unwind_subspace): Do not build + unwinds unless the function is in the text space. + (pa_type_args): Set BSF_FUNCTION for an exproted data symbol. + +Wed Sep 15 05:14:32 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Move dwarf2 stuff from here. + (md_assemble): To here. Tweak address generation. + + * config/tc-hppa.c: Include dwarf2dbg.h if OBJ_ELF. Declare + debug_line. + (md_pseudo_table): Add .file and .line pseudo-ops for OBJ_ELF. + (md_assemble): Call dwarf2_where for OBJ_ELF. + (pa_ip): Call dwarf2_gen_line_info for OBJ_ELF. + (pa_end_of_source): New function. + * tc-hppa.h (md_end): Define for OBJ_ELF. + +1999-09-14 Michael Meissner <meissner@cygnus.com> + + * configure.in (Canonicalization of target names): Remove adding + ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 + generates $ac_config_sub with a ${CONFIG_SHELL} already. + * configure: Regenerate. + +1999-09-14 Donn Terry <donn@interix.com> + + * config/te-interix.h (GLOBAL_OFFSET_TABLE_NAME): Define. + +1999-09-13 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (md_assemble): Handle "jmp/call constant" as a + pc-relative jmp/call to an absolute symbol. + (md_apply_fix3): When OBJ_ELF, don't add the values in twice for + absolute section symbols. + + * config/tc-i386.c (md_assemble): Correct frag_var size. Tidy + jump handling code and comments. + +1999-09-12 Ian Lance Taylor <ian@zembu.com> + + * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to + the value if TE_PE and a global defined symbol. + +1999-09-11 Ian Lance Taylor <ian@zembu.com> + + * write.c (dump_section_relocs): Call print_symbol_value_1 to + print the symbol, rather than printing it here. + +1999-09-11 Donn Terry <donn@interix.com> + + * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust + BFD_RELOC_RVA relocations. + + * config/tc-i386.c (md_undefined_symbol): Compare the name against + the macro GLOBAL_OFFSET_TABLE_NAME, rather than assuming that it + starts with "_G". + + * write.c (write_relocs): Call SET_SECTION_RELOCS if it is + defined. + * config/obj-coff.h (SET_SECTION_RELOCS): Define. + * doc/internals.texi (Object format backend): Document + SET_SECTION_RELOCS. + + * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust + relocations against global symbols if TE_PE. + + * config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version. + (obj_pseudo_table): Always handle ".ident" with obj-coff_ident. + + * config/obj-coff.c (coff_frob_symbol): Prohibit weak common + symbols. + + * config/obj-coff.c (obj_coff_endef): Don't merge labels, or + symbols which do not have a constant value, or tags with + non-tags. Remove the symbol from the list before adding it at the + end. + + * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef + C_FCN symbol differently if TE_PE. + (obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which + appears in the pseudo-op, rather coff_line_base which is only set + for a .bf symbol. + + * config/obj-coff.c (obj_coff_loc): New static function. + (obj_pseudo_table): Add "loc". + + * config/obj-coff.c (add_lineno): Check that the line number is + positive. + + * config/atof-ieee.c (atof_ieee): Change what_kind to int. + * config/atof-vax.c (flonum_gen2vax): Change format_letter to + int. + (md_atof): Return NULL rather than 0. + * config/tc-i386.c (md_atof): Change type to int. + * expr.c (expr): Change first parameter to int. + * config/obj-coff.c: Add declarations for static functions. + (coff_frob_symbol): Use SYM_AUXENT. + * config/tc-i386.h (flag_16bit_code): Don't declare. + + * config/obj-coff.c (obj_coff_section): Default to setting + SEC_LOAD. Don't set SEC_DATA for 'w' modifier. + + * write.c (adjust_reloc_syms): Print adjusted fixup. + + * expr.c (integer_constant): Correct too_many_digits calculation + in base 10 case. + +1999-09-09 Andreas Schwab <schwab@suse.de> + + * doc/c-arm.texi: Fix arguments of @var to not contain + punctuation. + +1999-09-08 Philip Blundell <pb@nexus.co.uk> + + * config/tc-arm.c (s_thumb_set): Only support interworking for ELF + and COFF targets. + (md_parse_option): Only support -k flag for ELF and COFF targets. + +Tue Sep 7 13:28:59 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Put strict register checks before + call to pa_parse_number. + + * config/tc-hppa.c (pa_ip): Support 'Z' argument. + +1999-09-06 Ian Lance Taylor <ian@zembu.com> + + * config/obj-coff.c: Add ATTRIBUTE_UNUSED as needed for + BFD_ASSEMBLER code. + +1999-09-06 Donn Terry <donn@interix.com> + + * as.c (perform_an_assembly_pass): Set SEC_DATA for data_section. + +Mon Sep 6 04:26:56 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Get strict/non-strict mode from the + candidate instruction. Require registers for register arguments + when in strict mode. Require assemble-time constants for + constants when in strict mode. + (pa_get_absolute_expression): Require a constant when in strict + mode. + +1999-09-06 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c (md_longopts): Fix value for -Wnuh. + +1999-09-04 Steve Chamberlain <sac@pobox.com> + + * config/tc-pj.c: New file, supports picoJava in ELF. + * config/tc-pj.h: Ditto. + * configure.in (pjl*, pj*): New targets. + * Makefile.am: Rebuild dependencies. + (CPU_TYPES): Add pj. + (TARGET_CPU_CFILES): Add config/tc-pj.c. + (TARGET_CPU_HFILES): Add config/tc-pj.h. + * doc/c-pj.texi: New file. + * doc/as.texinfo: Add some PJ specifics. + * doc/all.texi: Add PJ to the list of all architectures, sort them + all alphabetically. + * doc/Makefile.in (CPU_DOCS): Add c-pj.texi. + * configure, Makefile.in, doc/Makefile.in: Rebuild. + +1999-09-02 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/obj-multi.h: Include obj-elf.h if OBJ_MAYBE_ELF. Reformat. + (obj_frob_file): Test for null pointer. + (OBJ_COPY_SYMBOL_ATTRIBUTES): Here too. + (OBJ_PROCESS_STAB): And here. + (elf_obj_sy): Remove + + * config/obj-elf.h: #ifndef everything defined in obj-multi.h, + except OBJ_PROCESS_STAB, which we #undef for ecoff. + (elf_obj_sy): Remove #ifndef OBJ_SYMFIELD_TYPE. + + * config/obj-coff.c (no_func): Remove. + (coff_format_ops): Change occurrences of no_func to 0, as we test + for 0 in obj-multi.h. + + * configure.in: Enable bfd for i386-coff when primary target is + bfd. Enable i386 elf,coff emulation support. Don't set + USE_EMULATIONS=1 or te_file=multi unless there is more than one + emulation to support. + *configure: Regenerate. + +1999-09-02 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c (mcore_s_section): Do not dump literals if a + .section .line directive is encountered. + +1999-09-01 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_section_align): Do not align sections in ELF + format. + + * as.c (show_usage): Add --gdwarf2 to list of options displayed. + * as.texinfo: Document --gdwarf2 command line option. + Add additional documentation of ARM command line switches. + +1999-08-30 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (i386_intel_memory_operand): Combine + i386_is_reg and parse_register calls. Remove END_STRING_AND_SAVE + and RESTORE_END_STRING around parse_register calls. + (i386_operand): Here too. + (i386_is_reg): Remove. + (parse_register): Move as_bad calls from within this function to + callers. + +1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au> + + Based on a patch from H.J. Lu <hjl@gnu.org> + * config/tc-i386.c (parse_register): Handle FP regs specially. + (md_begin): Remove '(' and ')' from register_chars. + +1999-08-29 Doug Evans <devans@casey.cygnus.com> + + * config/tc-m32r.c (md_parse_option): Delete unrecognized option + error message (done elsewhere). + +Sat Aug 28 01:23:11 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Do not allow '*' in 32bit completers. + +Sat Aug 28 00:26:26 1999 Jerry Quinn <jquinn@nortelnetworks.com> + + * config/tc-hppa.c (pa_ip): Replace 'f' by 'v'. Prefix float register + args by 'f'. + + * config/tc-hppa.c (pa_ip): Add args q, %, and |. + + * config/tc-hppa.c (pa_ip): Absorb white space in instructions + between args. + Add new completers. Fix bug in 64 bit condition handling. + + * config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH', + 'cS', and 'c*'. + + * config/tc-hppa.c (pa_ip): Place completers behind prefix 'c'. + + * config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!' + + * config/tc-hppa.c (pa_ip): Add case for 'I'. + +1999-08-27 Jim Wilson <wilson@cygnus.com> + + * dwarf2dbg.c (MAX_SPECIAL_ADDR_DELTA): Correct typo in comment. + (struct ls): Add frag field. Initialize it to zero. + (out_end_sequence): New local text_frag. Set it while in text section. + Replace address check with frag check. Set ls.frag to text_frag if + out_set_addr called. + (dwarf2_gen_line_info): Add explanatory comment. New local saved_frag. + Set it before switching sections. Replace address check with frag + check. Set ls.frag to saved_frag if out_set_addr called. + +1999-08-26 David Mosberger <davidm@hpl.hp.com> + + * dwarf2dbg.c (out_end_sequence): If address changed, directly + output "advance_pc" opcode instead of calling gen_addr_line(). + The latter has the undesired side-effect of creating a new row + in the debug line info matrix. + +1999-08-26 Jim Wilson <wilson@cygnus.com> + + * dwarf2dbg.c (out_end_sequence): Correct comments. Set last to + ls.last_filename if last is less than zero. Set ls.last_filename + when allocating new entry. + (dwarf2_gen_line_info): Save seg and subseg info before subseg_new + call. + +1999-08-20 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (i386_index_check): Fix the displacement size + when INFER_ADDR_PREFIX. + +1999-08-18 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_apply_fix3): If an offset is invalid, + display its value. + +1999-08-17 Ian Lance Taylor <ian@zembu.com> + + * config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to + handle 0xffffNNNN constants correctly. + +1999-08-16 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (do_ldst): Look for register conflicts on stores + as well as loads. + +1999-08-13 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (validate_offset_imm): Work on unsigned values. + (md_apply_fix3): Always pass positive values to + validate_offset_imm. + +1999-08-12 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (skip_whitespace): New macro. + Formatting tidy ups. + + (md_apply_fix3): Store relocation offset in addend for ELF based + relocs. + (arm_force_relocation): Always generate relocs for Thumb function + calls. + +1999-08-11 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (md_assemble): Remove dead code. intel_syntax + LONG_DOUBLE_MNEM_SUFFIX floating point is done in opcode/i386.h + +Tue Aug 10 12:58:31 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_build_unwind_subspace): Use sane section + flags for the unwind subspace. + + * config/tc-hppa.c (UNWIND_SECTION_NAME): Define for ELF. + (pa_build_unwind_subspace): Remove #if 0 wrapper. Select a + suitable relocation based on the size of the target's pointer. + Always Use subsegment zero for the unwinders. + (pa_level): Handle "2.0w". + +Mon Aug 9 20:02:22 1999 J"orn Rennecke <amylaar@cygnus.co.uk> + + * config/tc-d30v.c (write_2_short): Don't group repeat instructions + with the following instruction unless this was specified. + +1999-08-09 Ian Lance Taylor <ian@zembu.com> + + * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 for + certain sections, to match BFD changes. + +1999-08-08 Mumit Khan <khan@xraylith.wisc.edu> + + * Makefile.am (noinst_SCRIPTS): Change .gdbinit to $(GDBINIT). + (EXTRA_SCRIPTS): Define to keep automake happy. + * Makefile.in: Rebuild. + +1999-08-08 Ian Lance Taylor <ian@zembu.com> + + * Makefile.am: Rename .dep* files to DEP*. + (MKDEP): Rename from DEP. Change all uses. Use $${srcdir} rather + than $(srcdir). Rename TCDEP targets to DEPTC. Rename OBJDEP + targets to DEPOBJ. + * Makefile.in: Rebuild. + +1999-08-08 Jakub Jelinek <jj@ultra.linux.cz> + + * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg. + +1999-08-08 Ian Lance Taylor <ian@zembu.com> + + * Makefile.am: Change all uses of itbl-test-ops to itbl-tops to + avoid problems on DOS filesystems. + * Makefile.in: Rebuild. + + * doc/as.texinfo (Section): Document 's' flag for COFF version. + +1999-08-08 Mumit Khan <khan@xraylith.wisc.edu> + + * config/obj-coff.c (obj_coff_section): Handle 's' (shared) + section flag. + +1999-08-08 Ian Lance Taylor <ian@zembu.com> + + * configure.in: Define and substitute GDBINIT. Change AC_OUTPUT + line to create ${GDBINIT} rather than .gdbinit. + * configure, Makefile.in, doc/Makefile.in: Rebuild. + +Fri Aug 6 12:12:44 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip, case '?'): Add missing break. + +Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com> + + * config/tc-hppa.c (pa_ip): Add 64 bit condition completers. + +1999-08-06 Jakub Jelinek <jj@ultra.linux.cz> + + * config/tc-sparc.h (tc_fix_adjustable): Fix check for PIC local + non-adjustable symbols. + +Thu Aug 5 16:52:51 1999 Jerry Quinn <jquinn@nortelnetworks.com> + + * config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix. + +Thu Aug 5 23:05:56 1999 J"orn Rennecke <amylaar@cygnus.co.uk> + + * config/tc-sh.c (md_assemble): Call as_bad when there are excess + operands. + +1999-08-05 Donn Terry <donn@interix.com> + + * config/te-interix.h: New file. + * configure.in (i386-*-interix*): New target. + * configure: Rebuild. + +Wed Aug 4 13:12:17 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_chk_field_selector): Allow 3 byte + selectors for ELF too. + (selector_table): Add "ltp" and "rtp" selectors. + +1999-08-04 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (i386_operand): No need to change + operand_string pointer in segment reg case before goto + do_memory_reference. Initialise displacement_string_start and + displacement_string_end after do_memory_reference label. + (i386_index_check): Add operand_string param, and print error + message on failure here. + (i386_intel_memory_operand): Instead of here. + (i386_operand): And here. + (INFER_ADDR_PREFIX): Enable. + + * doc/c-i386.texi (i386-16bit): Document .code16gcc. + + * config/tc-i386.h (DefaultSize): Define. Renumber following + opcode_modifier defines. + + From Etienne Lorrain <etienne.lorrain@ibm.net> + * config/tc-i386.c (stackop_size): New variable. + (set_16bit_code_flag): Clear it here. + (set_16bit_gcc_code_flag): New function. + (md_pseudo_table): Add "code16gcc" entry. + (md_assemble): Set i.suffix for insns with DefaultSize modifier. + +1999-08-03 Ian Lance Taylor <ian@zembu.com> + + * config/obj-coff.c (coff_frob_symbol): Always update set_end with + next_set_end even if the end symbol is being discarded. + + * gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER. + * output-file.c, symbols.c, config/tc-i386.c: Likewise. + * config/obj-coff.c: Likewise. + (seg_info_type): Remove. + (seg_info_off_by_4): Change to array of segT. + (s_get_segment): Adjust accordingly. + (obj_pseudo_table): Fully initialize sentinel entry. + + * config/tc-mips.c (append_insn): Correct INSN_SYNC test. From + Ralf Baechle <ralf@uni-koblenz.de>. + +1999-08-03 Etienne Lorrain <etienne.lorrain@ibm.net> + + * config/tc-i386.c (f16_3): New. Fixes 16 bit 3 byte nop. + +1999-08-03 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c: Indentation and white space changes. + (i386_index_check): New function. Add INFER_ADDR_PREFIX code, but + don't enable it by default. + (i386_intel_operand): Remove redundant prototype. + Move check on number of memory operands, and i.mem_operands++ + (i386_intel_memory_operand): To here. + Remove i386_immediate code from here. Remove special case code + for input and output using (%dx). Remove base/index checks and + call i386_index_check instead. Save initial operand_string + argument for error message. + (i386_operand): Remove redundant prototype. Move base/index + checks to i386_index_check. + (i386_displacement): Move intel mode check for non-zero + i.disp_operand + (i386_intel_memory_operand): To here. + +1999-07-30 Jakub Jelinek <jj@ultra.linux.cz> + + * config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option. + (sparc_ip): Warn if %g2 or %g3 register is used and not covered + by .register pseudo-op if -64 and --no-undeclared-regs. + (s_register, sparc_adjust_symtab): New functions. + * config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab): + Declare sparc_adjust_symtab as tc_adjust_symtab. + * doc/c-sparc.texi: Add description of #ignore special literal + for .register pseudo-op. + +1999-07-30 Catherine Moore <clm@cygnus.com> + + * config/tc-arm.c (tc_gen_reloc): Record the vtable entry in + the relocation's section offset. + +1999-07-29 Alan Modra <alan@spri.levels.unisa.edu.au> + + * write.c (fixup_segment): Fix generic error check overflow test. + + * config/tc-i386.c (pe): Change %d to %ld, %x to %lx, and cast + X_add_number to long. + +Wed Jul 28 02:04:24 1999 "Jerry Quinn" <jquinn@nortelnetworks.com> + + * config/tc-hppa.c (pa_ip): Add 'J' and 'K' code + processing. + +1999-07-27 Ian Lance Taylor <ian@zembu.com> + + * config/tc-sparc.h (tc_fix_adjustable): Don't adjust GOT, PLT, or + VTABLE relocations. + +1999-07-21 Mark Elbrecht <snowball3@bigfoot.com> + + * config/te-go32.h (COFF_LONG_SECTION_NAMES): Define. + + * configure.bat: Remove; obsolete. + * config/go32.cfg: Likewise. + +1999-07-21 Brad M. Garcia <bgarcia@fore.com> + + * configure.in (i386-*-vxworks*): New target. + * configure: Rebuild. + +1999-07-16 Jakub Jelinek <jj@ultra.linux.cz> + + * doc/c-sparc.texi: Document .register and .nword pseudo-ops. + +1999-07-16 Jakub Jelinek <jj@ultra.linux.cz> + + * config/tc-sparc.c (sparc_ip): Allow OLO10 relocations + on -64 and not pic. + (output_insn): Put OLO10's secondary addend into tc_fix_data. + (md_apply_fix3): Handle BFD_RELOC_SPARC_OLO10. + (tc_gen_reloc): Return two relocs for OLO10, LO10 and SPARC13. + * config/tc-sparc.h (RELOC_EXPANSION_POSSIBLE, + MAX_RELOC_EXPANSION): Define. + (TC_FIX_TYPE, TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise. + +1999-07-16 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (intel_float_operand): Add prototype, make static. + (md_assemble): Localize *exp variable to if (fake_zero_displacement) + block. Print a warning if an 8-bit or 16-bit constant + displacement or immediate is truncated on output. + (i386_immediate): Ensure Imm16 is always legal for a 16-bit mode + immediate. + (i386_operand): Disallow immediate jump absolute operand. + +1999-07-15 Ian Lance Taylor <ian@zembu.com> + + * configure.in: Bump version number to 2.9.5. + * configure: Rebuild. + + * dwarf2dbg.c (dwarf2_gen_line_info): Don't assume that long long + or %llx work. + +Thu Jul 15 02:45:30 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_pseudo_table): Add ".dword" pseudo-op. + (cons_fix_new_hppa): Derive size of fixup from size of the object. + +1999-07-14 Philip Blundell <pb@nexus.co.uk> + + * symbols.c (dollar_label_name): Prepend LOCAL_LABEL_PREFIX if it + is defined. + * config/tc-arm.h (LOCAL_LABEL_PREFIX): Define to '.' for ELF. + + * config/tc-arm.c (md_begin): Set F_SOFTFLOAT in the output file + if -mno-fpu was given. + (tc_gen_reloc): Fix typo. Delete bogus code related to GOTPC + relocs. + (cons_fix_new_arm): Remove misleading comments. + +1999-07-14 Ian Lance Taylor <ian@zembu.com> + + * write.c (cvt_frag_to_fill): Use frag file and line in rs_org + error message. + (relax_segment): Likewise. After giving a rs_org error, convert + the frag to rs_align to avoid cascading errors. + +1999-07-12 Andreas Schwab <schwab@suse.de> + + * config/tc-m68k.c: Add some ATTRIBUTE_UNUSED. + +1999-07-11 Ian Lance Taylor <ian@zembu.com> + + * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED + as appropriate. Fill in structure initializations. Add variable + initializations. Add casts. + * dwarf2dbg.c (print_stats): Change i to size_t. + * listing.c (listing_listing): Change list_line to unsigned int. + +1999-07-10 Ian Lance Taylor <ian@zembu.com> + + * config/tc-ppc.h (tc_fix_adjustable) [OBJ_ELF]: Call S_IS_LOCAL + rather than checking for \001 and \002 in symbol name. + * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: Likewise. + +Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * configure.in (hppa*-linux-gnu*): New target. + * configure: Rebuilt. + +1999-07-08 Nick Clifton <nickc@cygnus.com> + + * doc/c-arm.texi (ARM Directives): Document .thumb_set directive. + +1999-07-07 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (v850_comm): Use symbol_get_obj() rather than + accessing symbolP directly. + +Tue Jul 6 10:41:42 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol + for ELF. + +1999-07-05 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (ARM_EXT_V5): Define. + (ARM_ARCH_V5, ARM_ARCH_V5T): Define. + (md_begin): Detect ARM v5 architectures. + (md_parse_option): Accept arm v5 specification. + (md_show_usage): Documment -marmv5 switch. + + * doc/c-arm.texi: Document -marmv5 command line option. + + * config/tc-arm.c (do_adrl): New function. Implement ADRL pseudo + op. + (validate_immediate_twopart): New function. Determine if a + constant can be computed by two ADD instructions. + (output_inst): Remove its command line parameter - it was never + used. + (md_apply_fix3): Support BFD_RELOC_ARM_ADRL_IMMEDIATE, used to + implememt the ADRL pseudo op. + (tc_gen_reloc): Generate a suitable error message if an ADRL + instruction tries to generate a real reloc. + + * doc/c-arm.texi: Document NOP, ADR and ADRL pseudo ops. + +Thu Jul 1 15:33:10 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Convert the opcode and all completers + into lower case. + +1999-06-27 H.J. Lu <hjl@gnu.org> + + * subsegs.c (subseg_text_p): Use 1/0 instead of true/false for + non BFD_ASSEMBLER case. + +1999-06-26 Mumit Khan <khan@xraylith.wisc.edu> + + * config/obj-coff.c (obj_coff_section): Mark writable sections as + data. + +1999-06-26 David Mosberger <davidm@hpl.hp.com> + + * dwarf2dbg.c (dwarf2_gen_line_info): Don't call + out_end_sequence() when the address decreases due to a new frag. + (gen_dir_list): Set ls.file[i].dir to j + 1 (not j) because file + numbering starts with 1. + +1999-06-23 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c (md_pseudo_table): Add .comm for ELF and allow + .section for COFF. + (mcore_s_text): Call obj_elf_text for ELF target. + (mcore_s_data): Call obj_elf_data for ELF target. + (mcore_s_section): No longer ELF specific. Call obj_coff_section + for COFF target. + (mcore_s_bss): New function: Dump literal table before changing + sections. + (mcore_s_comm): New function: Dump literal table before changing + sections. + + * config/obj-elf.c (obj_elf_common, obj_elf_data, obj_elf_text): + No longer static functions. + * config/obj-elf.h (obj_elf_common, obj_elf_data, obj_elf_text): + Provide prototypes for these functions. + +1999-06-22 Ian Lance Taylor <ian@zembu.com> + + * subsegs.c (subseg_text_p): Rewrite non BFD_ASSEMBLER case to use + a list of names, to try obj_segment_name, and to try abbreviated + names when using COFF without long section names. + + * config/tc-alpha.c: More use of symbol accessor functions. + * config/tc-arc.c: Likewise. + * config/tc-d30v.c: Likewise. + * config/tc-fr30.c: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-m88k.c: Likewise. + * config/tc-mcore.c: Likewise. + * config/tc-ns32k.c: Likewise. + * config/tc-sparc.c: Likewise. + * config/tc-v850.c: Likewise. + + * config/tc-arc.c (get_arc_exp_reloc_type): Change uses of + sy_value with appropriate accessor functions. + * config/tc-arm.c (md_apply_fix3): Likewise. + * config/tc-d10v.c (AT_WORD_P): Likewise. + * config/tc-v850.c (reg_name_search): Likewise. + + * config/obj-ecoff.c (obj_ecoff_set_ext): Change uses of bsym to + use symbol_get_bfdsym instead. + * config/tc-ppc.c (md_assemble): Likewise. + * config/tc-v850.c (v850_comm): Likewise. + +1999-06-22 Jonathan Larmour <jlarmour@cygnus.co.uk> + + * config/tc-arc.c (tc_gen_reloc): Use symbol_get_bfdsym to get at + the symbol, rather than accessing the bsym member. + * config/tc-d10v.c (tc_gen_reloc): Likewise. + * config/tc-d30v.c (tc_gen_reloc): Likewise. + * config/tc-mcore.c (tc_gen_reloc): Likewise. + * config/tc-mn10200.c (tc_gen_reloc): Likewise. + * config/tc-mn10300.c (tc_gen_reloc): Likewise. + * config/tc-ns32k.c (tc_gen_reloc): Likewise. + * config/tc-tic30.c (tc_gen_reloc): Likewise. + * config/tc-v850.c (tc_gen_reloc): Likewise. + +Mon Jun 21 16:45:19 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type. + (hppa_gen_reloc_type): Conditionalize on BFD64. + (tc_gen_reloc): Re-enable ELF relocations. + * tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format. + +1999-06-21 Ian Lance Taylor <ian@zembu.com> + + * config/tc-arm.c (ldst_extend): Add parentheses to avoid + warning. + (do_ldst): Move assignment out of if condition. + (md_apply_fix3): Add casts to avoid printf format warnings. Add + parentheses to avoid warning. + +1999-06-21 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (arm_adjust_symtab): Use symbol_get_bfdsym() + macro to get at the BFD symbol associated with a GAS symbol. + +1999-06-19 Ian Lance Taylor <ian@zembu.com> + + * config/tc-ppc.c: Update for symbol handling changes. + * config/obj-coff.c: Likewise. + +Fri Jun 18 14:34:18 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c: General cleanups of ELF support. No more spaces + and subspaces for ELF. + (GDB_DEBUG_SPACE_NAME): Delete definition for ELF. + (GDB_STRINGS_SUBSPACE_NAME): Likewise. + (GDB_SYMBOLS_SUBSPACE_NAME): Likewise + (UNWIND_SECTION_NAME): Likewise. + (space/subspace related structures): Conditionalize definitions + on OBJ_SOM. + (space/subspace directives and support routines): Conditionalize + definitions and references/uses on OBJ_SOM. + (label_symbol_struct): For ELF, track the symbol's segment. For + SOM track its space. + (pa_define_label, pa_undefine_label, pa_get_label): Corresponding + changes. + (USE_ALIASES): Kill for both SOM & ELF. + (pa_def_subspaces, pa_def_spaces): Corresponding changes. + (pa_space, pa_subspace): Corresponding changes. + (pa_spaces_begin): Corresponding chagnes. + (md_begin): Do not muck around with space/subspace stuff for + OBJ_ELF. + (md_apply_fix): Temporarily disable argument relocation stuff + for OBJ_ELF. + (tc_gen_reloc): Temporarily disable relocation generation for + OBJ_ELF + (pa_build_unwind_subspace): Similarly. + +1999-06-16 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (thumb_set): New pseudo op. + (text, data, section): Override these pseudo ops with ARM + specific versions. + (s_thumb_set): New function: Perform the same as a .set pseudo + op, but also mark the alias'ed symbol as being a Thumb + function. + (arm_s_text): New function: Perform the same as the .text + pseudo op, but dump the literal pool before changing + sections. + (arm_s_data): New function: Perform the same as the .data + pseudo op, but dump the literal pool before changing + sections. + (arm_s_section): New function: Perform the same as the + .section pseudo op, but dump the literal pool before changing + sections. + (arm_cleanup): Do not reset the current section before dumping + the literal pool. + +1999-06-17 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c (md_longopts): Fix OPTION_WARN_UNMATCHED and + OPTION_NO_WARN_UNMATCHED entries. + (md_parse_option): Generate a warning message if an unrecognised + option is encountered. + + * config/tc-d10v.c (do_not_ignore_hash): New variable. + (get_operands): When parsing an expression after an '@' symbol + has been detected, do not ignore '#' symbols. + (md_operand): Only ignore '#' symbols if do_not_ignore_hash is + false. + +1999-06-13 Ian Lance Taylor <ian@zembu.com> + + From K. Richard Pixley <rich@noir.com>: + * configure.in (ppc-*-vxworks*): New target. + * configure: Rebuild. + +1999-06-12 Philip Blundell <philb@gnu.org> + + * config/tc-arm.c (tc_gen_reloc): Fix handling of GOTPC relocs. + +1999-06-13 Ian Lance Taylor <ian@zembu.com> + + * write.c (adjust_reloc_syms): Rather than never reducing reloc + which refer to symbols in linkonce sections, permit reducing the + relocs if the symbol is local. + +1999-06-12 Ian Lance Taylor <ian@zembu.com> + + * subsegs.c (subseg_text_p): New function. + * as.h (subseg_text_p): Declare. + * read.c (do_align): Use subseg_text_p to set the default fill. + * write.c (subsegs_finish): Likewise. + * config/obj-coff.c (write_object_file): Likewise. + * config/tc-i386.h (md_maybe_text): Don't define. + (md_do_align): Use subseg_text_p to set the default fill. + * config/tc-m32r.c (m32r_do_align): Likewise. + * config/tc-sh.c (sh_do_align): Likewise. + * config/tc-sparc.h (md_do_align): Likewise. + +1999-06-12 David O'Brien <obrien@freebsd.org> + + * configure.in: (i[3456]86-*-freebsd*): Now defaults to ELF. + * configure: Rebuild. + +1999-06-12 Ian Lance Taylor <ian@zembu.com> + + * dwarf2dbg.c: Include elf/dwarf2.h with "", not <>. + * Makefile.am: Rebuild dependencies. + * Makefile.in: Rebuild. + + * config/tc-i386.c (i386_immediate): Remove unused label + seg_unimplemented. + + * struc-symbol.h: Put local_symbol code in ifdef BFD_ASSEMBLER. + * symbols.c: Likewise. + * config/obj-aout.c (obj_crawl_symbol_chain): Refer directly to + sy_next field when taking address, rather than symbol_next. + + * dwarf2dbg.c: Change bfd_vma to addressT and bfd_signed_vma to + offsetT. + (out_set_addr): Don't use BYTES_PER_ADDRESS. Instead, get the + value from the output file architecture. + (dwarf2_gen_line_info): Ifdef BFD_ASSEMBLER specific code. + * dwarf2dbg.h: Change bfd_vma to addressT. + +1999-06-11 Ian Lance Taylor <ian@zembu.com> + + * dwarf2dbg.h: Use PARAMS in function declarations. + +1999-06-11 Martin Dorey <mdorey@madge.com> + + * write.c (fixup_segment): Don't add symbol value for i960 ELF. + * config/tc-i960.c (s_leafproc): Don't call tc_set_bal_of_cal if + OBJ_ELF. + (md_apply_fix): Simplify BFD_ASSEMBLER handling. + +1999-06-11 Ian Lance Taylor <ian@zembu.com> + + * config/tc-i386.c (md_apply_fix3): Add default case to switch. + + * config/tc-sparc.c (md_pseudo_table): Remove pushsection and + popsection. + + * config/tc-sparc.c (sparc_ip): Add default case to reloc switch. + + * read.c (read_a_source_file): Only declare inescape if + QUOTES_IN_INSN. + + * itbl-ops.c (itbl_disassemble): Change sprintf format strings to + match parameters. + (find_entry_byval): Add parens to avoid warning. + + * as.c: If HAVE_ITBL_CPU, include "itbl-ops.h". + + * symbols.c (resolve_symbol_value): Don't permit subtraction of + undefined symbols. + +1999-06-10 Jakub Jelinek <jj@ultra.linux.cz> + + * config/tc-sparc.c (sparc_ip): Don't use side-effect expression + with isoctal. + + * config/tc-sparc.c (synthetize_setuw, synthetize_setsw, + synthetize_setx): New functions. + (md_assemble): Broken the special cases into the above + functions. Make compiler happy if sizeof(bfd_vma)==4. + Fix sethi generated from set/setuw. If instructions have a relloc, + always clear the fields to be relocated in the opcode. + (sparc_ip): Remove special_case global variable. + +1999-06-10 Ian Lance Taylor <ian@zembu.com> + + Based on patches from John W. Woznack <jwoznack@concentric.net>: + * itbl-ops.c (itbl_get_reg_val): Add pval parameter. Return + indication of success rather than a value. + (itbl_get_val): Likewise. + (itbl_get_field): Use strcspn. Change delimiters to include + parens. + * itbl-ops.h (itbl_get_reg_val): Update declaration. + (itbl_get_val): Likewise. + * config/tc-mips.c (mips_ip): Update call to itbl_get_reg_val. + + * symbols.c (copy_symbol_attributes): Convert local symbols to + regular symbols. + +1999-06-10 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_parse_option): Add support for ARM920 and + ARM920t. + +1999-06-07 Jakub Jelinek <jj@ultra.linux.cz> + + * config/tc-sparc.c (md_assemble): Fix up setx, support setsw. + Optimize set if sizeof(bfd_vma) == 64. + (sparc_ip): Fix sethi - without %hi() it should generate + R_SPARC_22 reloc, not R_SPARC_HI22. + (tc_gen_reloc): Handle BFD_RELOC_SPARC22. + +1999-06-07 Jakub Jelinek <jj@ultra.linux.cz> + + * config/tc-sparc.c (md_begin): Handle native wordsize aliases. + (s_ncons): New function. + (native_op_table): New table. + (sparc_ip): Be more strict on %hi() etc.; prepare assembler for + R_SPARC_OLO10 handling. + +Mon Jun 7 10:22:16 1999 Richard Henderson <rth@cygnus.com> + + * expr.h (struct expressionS): Revert last change; widen X_op. + * config/tc-alpha.c (md_begin): Check the field is wide enough. + +Mon Jun 7 11:25:16 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * Makefile.am (TARGET_CPU_CFILES): Add config/tc-fr30.c. + (TARGET_CPU_HFILES): Add config/tc-fr30.h. + (TARG_ENV_HFILES): Add config/te-epoc-pe.h. + * Makefile.in: Regenerated. + + * config/obj-elf.c (obj_elf_common): In MRI mode if called as + `common' pass on to s_mri_common. + (elf_pseudo_table): Pass 1 to obj_elf_common for `common'. + +1999-06-06 Richard Henderson <rth@cygnus.com> + + * config/obj-elf.c (obj_elf_section): Don't free the return + value of demand_copy_C_string. + +1999-06-05 Richard Henderson <rth@cygnus.com> + + * dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol + creation logic from obj_elf_create_section. + + * config/obj-elf.c (elf_pseudo_tab): Add pushsection/popsection. + (section_stack): New. + (special_sections): Make const. + (obj_elf_section): Gut and rewrite parsing. + (obj_elf_change_section): New function broken out of obj_elf_section. + (obj_elf_parse_section_letters): Likewise. + (obj_elf_section_word): Likewise. + (obj_elf_section_type): Likewise. + (obj_elf_previous): Treat as a toggle. + (obj_elf_popsection): New. + * config/tc-ppc.c (ppc_section_word): Take str+len not ptr_str. + (ppc_section_type): Likewise. + * config/tc-ppc.h: Likewise. + + * expr.h (struct expressionS): Don't make X_op a bitfield. + * config/tc-alpha.c: Update for symbol handling changes. + (md_apply_fix) [case GPREL]: Use now_seg instead of absolute_section. + (load_expression, emit_ir_load, emit_loadstore, emit_jsrjmp): Likewise. + +1999-06-05 Richard Henderson <rth@cygnus.com> + + * dwarf2dbg.c (*): Convert to K&R + prototypes. + (dwarf2_gen_line_info): Kill unused variables. + (dwarf2_finish): Likewise. + (dwarf2_where): Likewise. + (dwarf2_directive_file): If we've only got a string, + hand off to s_app_file. + * ecoff.c: Move the include of ecoff.h. + * symbols.h (S_IS_FUNCTION): Prototype. + + * read.c (LEX_HASH): Supply a default. + (lex_type): Use it. + (s_globl): Update `c' after skipping whitespace. + * read.h (LEX_END_NAME, is_name_ender): New. + * expr.c (get_symbol_end): Respect it. + +1999-06-04 Mark Klein <mklein@dis.com> + + * config/tc-hppa.c (md_begin): Convert local symbol dummy_symbol + to real if OBJ_SOM + (tc_gen_reloc): Still need bfd_abs_symbol in some relocs. + + * config/tc-hppa.c: Update for symbol handling changes. + +1999-06-03 Ian Lance Taylor <ian@zembu.com> + + * cgen.c: Update for symbol handling changes. + * config/tc-m32r.c: Likewise. + + * config/tc-hppa.h: Update for symbol handling changes. + * config/tc-hppa.c: Likewise. + + * config/tc-arm.h: Update for symbol handling changes. + * config/tc-arm.c: Likewise. + (symbol_make_empty): Remove. Just use symbol_create. + + * symbols.c (symbol_set_tc): Correct name. + + * Makefile.am: Rebuild dependencies. + ($(OBJS)): Don't depend upon struc-symbol.h. + (.dep1, .tcdep, .objdep): Create itbl-parse.h. + * dep-in.sed: Don't remove struc-symbol.h. + * Makefile.in: Rebuild. + + * doc/internals.texi (Symbols): Describe changes in symbol + handling. + +1999-06-03 Richard Henderson <rth@cygnus.com> + + * dwarf2dbg.c (dwarf2_gen_line_info): Use section_symbol + instead of doing the work by hand. + +1999-06-03 David Mosberger <davidm@hpl.hp.com> + + * dwarf2dbg.c (INITIAL_STATE): New macro encapsulating initial + state of line state-machine. + (struct ls): Collect DWARF2 line state-machine state in new member + SM. Add member EMPTY_SEQUENCE to keep track if a code sequence + resulted in any DWARF2 directives. + (reset_state_machine): New function. + (out_end_sequence): Ditto. + (dwarf2_gen_line_info): When switching sections or switching to a + lower text address, call out_end_sequence() first to terminate the + previous code sequence as code sequences MUST have monotonically + increasing addresses. + (dwarf2_finish): Call out_end_sequence() instead of open coding it. + +1999-06-03 David Mosberger <davidm@hpl.hp.com> + + * as.c (parse_args): Add option -gdwarf2 to allow requesting + DWARF2 debug info (line information only, at this point). + * as.h: Update comment about supported debug formats. + * dwarf2dbg.c, dwarf2dbg.h: New files. + * Makefile.am (GAS_CFILES, HFILES, GENERIC_OBJS): Add them. + + * expr.c (operand): Don't use [ for parens if we want an index op. + (op_encoding): Switch [ into O_index, if desired. + (op_rank): Renumber with O_index on bottom. + (expr): If O_index, match closing bracket. + * expr.h (O_index): New. + + * read.c (read_a_source_file): Conditionally allow matched " + in lines passed to md_assemble. + + * config/obj-elf.c (elf_pseudo_table): Add `common'. + +1999-06-03 Ian Lance Taylor <ian@zembu.com> + + Add support for storing local symbols in a small structure to save + memory when assembling large files. + * as.h: Don't include struc-symbol.h. + (symbolS): Add typedef. + * symbols.c: Include struc-symbol.h. + (local_hash): New static variable. + (save_symbol_name): New static function, from symbol_create. + (symbol_create): Call save_symbol_name. + (local_symbol_count): New static variable. + (local_symbol_conversion_count): Likewise. + (LOCAL_SYMBOL_CHECK): Define. + (local_symbol_make): New static function. + (local_symbol_convert): New static function. + (colon): Handle local symbols. Create local symbol for local + label name. + (symbol_table_insert): Handle local symbols. + (symbol_find_or_make): Create local symbol for local label name. + (symbol_find_base): Check for local symbol. + (symbol_append, symbol_insert): Check for local symbols. + (symbol_clear_list_pointers, symbol_remove): Likewise. + (verify_symbol_chain): Likewise. + (copy_symbol_attributes): Likewise. + (resolve_symbol_value): Handle local symbols. + (resolve_local_symbol): New static function. + (resolve_local_symbol_values): New function. + (S_GET_VALUE, S_SET_VALUE): Handle local symbols. + (S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise. + (S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise. + (S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise. + (S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise. + (symbol_previous, symbol_next): New functions. + (symbol_get_value_expression): Likewise. + (symbol_set_value_expression): Likewise. + (symbol_set_frag, symbol_get_frag): Likewise. + (symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise. + (symbol_mark_used_in_reloc): Likewise. + (symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise. + (symbol_mark_mri_common, symbol_clear_mri_common): Likewise. + (symbol_mri_common_p): Likewise. + (symbol_mark_written, symbol_clear_written): Likewise. + (symbol_written_p): Likewise. + (symbol_mark_resolved, symbol_resolved_p): Likewise. + (symbol_section_p, symbol_equated_p): Likewise. + (symbol_constant_p): Likewise. + (symbol_get_bfdsym, symbol_set_bfdsym): Likewise. + (symbol_get_obj, symbol_set_obj): Likewise. + (symbol_get_tc, symbol_set_tc): Likewise. + (symbol_begin): Initialize local_hash. + (print_symbol_value_1): Handle local symbols. + (symbol_print_statistics): Print local symbol statistics. + * symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER. + Declare new symbols.c functions. Move many declarations here from + struc-symbol.h. + (SYMBOLS_NEED_BACKPOINTERS): Define if needed. + * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set. + (struct symbol): Move bsym to make it clearly the first field. + Remove TARGET_SYMBOL_FIELDS. + (symbolS): Don't typedef. + (struct broken_word): Remove. + (N_TYPE_seg, seg_N_TYPE): Move to symbol.h. + (SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise. + (symbol_clear_list_pointers): Likewise. + (symbol_insert, symbol_remove): Likewise. + (symbol_previous, symbol_append): Likewise. + (verify_symbol_chain, verify_symbol_chain_2): Likewise. + (struct local_symbol): Define. + (local_symbol_converted_p, local_symbol_mark_converted): Define. + (local_symbol_resolved_p, local_symbol_mark_resolved): Define. + (local_symbol_get_frag, local_symbol_set_frag): Define. + (local_symbol_get_real_symbol): Define. + (local_symbol_set_real_symbol): Define. + Define. + * write.c (write_object_file): Call resolve_local_symbol_values. + * config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define. + (TARGET_SYMBOL_FIELDS): Don't define. + * config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field. If + ECOFF_DEBUGGING, add ECOFF fields. + (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. + * config/obj-multi.h (struct elf_obj_sy): Add local field. If + ECOFF_DEBUGGING, add ECOFF fields. + (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. + (ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define. + * config/tc-mcore.h: Don't include struc-symbol.h. + (TARGET_SYMBOL_FIELDS): Don't define. + (struct mcore_tc_sy): Define. + (TC_SYMFIELD_TYPE): Define. + * Many files: Use symbolS instead of struct symbol. Use new + accessor functions rather than referring to symbolS fields + directly. + + * read.c (s_mri_common): Don't add in value of line_label. + + * config/tc-mips.c (md_apply_fix): Correct parenthesization when + checking for SEC_LINK_ONCE. + + * config/tc-sh.h (sh_fix_adjustable): Declare. + + * app.c (input_buffer): New static variable. + (app_push): Save saved_input in allocated buffer. + (app_pop): Restored saved_input. + (do_scrub_chars): Change get parameter to take char * and int as + arguments. Change GET macro to pass input_buffer to get + function. Don't save input into allocated buffer. + * as.h (do_scrub_chars): Update declaration. + * input-file.c (input_file_get): Change to take char * and int. + Read data into passed in buffer. Remove static buffer. + * read.c (scrub_from_string): Change to take char * and int. Copy + data into passed in buffer. + + * hash.h: Neaten. Declare hash_traverse. + * hash.c: Complete rewrite based on BFD hashing code. + * gasp.c (chunksize): New variable. + * macro.c (macro_expand_body): Call hash_jam with NULL rather than + hash_delete. + +1999-05-28 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_apply_fix3): Add pipeline offset into reloc + addend unless the target uses an old ABI. + +Mon May 24 13:36:55 1999 Doug Evans <devans@canuck.cygnus.com> + + -Wchar-subscripts cleanup + * listing.c (listing_newline): Use unsigned char variable, so + calls to isascii,iscntrl are correct. + * atof-generic.c (atof_generic): Cast arg to isdigit, et. al. with + (unsigned char). + * ecoff.c (ecoff_directive_ent,ecoff_stab): Ditto. + * config/obj-elf.c (obj_elf_vtable_inherit): Ditto. + * config/tc-mips.c (mips_ip,mips16_ip): Ditto. + (my_getSmallExpression,get_number,s_mips_ent): Ditto. + +1999-05-28 Torbjorn Granlund <tege@matematik.su.se> + + * config/tc-m68k.c (m68k_ip): Check for disallowed index register + width for Coldfire. + (arch_coldfire_p): New #define. + (m68k_ip, m68k_init_after_args): Use arch_coldfire_p. + +1999-05-28 Linus Nordberg <linus.nordberg@canit.se> + + * config/tc-m68k.c (install_operand): Add places `n', `o'. + + * config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'. + (install_operand): Add place `N'. + (init_table): Add registers ACC, MACSR, MASK. + + * config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK. + + * config/tc-m68k.c: Change mcf5200 --> mcf. + (archs): Add mcf5206e, mcf5307. + (m68k_ip): Add format `u'. + (install_operand): Add place `m', `M', `h'. + (init_table): Add upper/lower registers. + + * config/m68k-parse.h (m68k_register): Add upper/lower registers. + +1999-05-28 Martin Dorey <mdorey@madge.com> + + * config/tc-i960.c: Several minor changes to add ELF and + BFD_ASSEMBLER support. + * config/tc-i960.h: Likewise. + * configure.in (i960-*-elf*): New target. + * aclocal.m4, configure: Rebuild. + +1999-05-25 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (md_apply_fix3): Only do 1999-05-17 fx_pcrel + reloc changes when defined(BFD_ASSEMBLER). + +1999-05-17 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (tc_gen_reloc): Remove F and MAP macros. + + * write.c (write_print_statistics): Output to file, not stderr. + + * expr.c (generic_bignum_to_int32,64): Prototype. + + * read.c (s_lcomm_internal, sizeof_sleb128, sizeof_uleb128, + output_sleb128, output_uleb128, output_big_sleb128, + output_big_uleb128, output_big_leb128): Prototype. + (output_big_sleb128, output_big_uleb128): Make inline. + (output_big_leb128): Remove inline + + From Maciej W. Rozycki <macro@ds2.pg.gda.pl> + * config/tc-i386.c (md_apply_fix3): Convert BFD_RELOC_16 with + fx_pcrel set to BFD_RELOC_16_PCREL. Similarly for BFD_RELOC_8. + Handle BFD_RELOC_16_PCREL and BFD_RELOC_8_PCREL. Return changed + value for correct overflow check in write.c:fixup_segment. + * write.c (fixup_segment): Move bitfield overflow checks to after + the md_apply_fix call. + * config/obj-coff.c (fixup_segment): Likewise. + * doc/internals.texi (CPU backend): Mention md_apply_fix modifying + valueT *val argument. + +Fri May 14 10:52:13 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * config/atof-ieee.c (gen_to_words): Correctly round a + denormalized number. Fix off-by-one in range checking for + exponent in a denormal. + +1999-05-10 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c (parse_reg): Accept 'sp' as a valid register + name. + +Thu May 13 09:46:59 1999 Joel Sherrill (joel@OARcorp.com) + + * configure.in (i386-*-rtemself*, sh-*-rtemself*): New targets. + +1999-05-12 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.h (InvMem): New flag. Add to AnyMem. + (ReverseRegRegmem): Remove. + (ImmExt): New flag. Renumber some of the opcode_modifier bits. + * config/tc-i386.c (md_assemble): Test for PIII SIMD and AMD + 3DNow! via ImmExt opcode_modifier. Remove ReverseRegRegmem + kludge. + + From Doug Ledford <dledford@redhat.com> + * config/tc-i386.h (RegXMM): New for P/III. + * config/tc-i386.c: Add support for P/III. + +Sat May 8 23:28:50 1999 Richard Henderson <rth@cygnus.com> + + * config/tc-ppc.c (md_parse_option): Recognize -mppc64bridge. + (md_begin): Allow ppc32 insns in ppc64bridge mode. + (ppc_insert_operand): Accept SIGNOPT in ppc64 mode. + +Thu May 6 23:13:39 1999 Richard Henderson <rth@cygnus.com> + + * config/tc-i386.c (i386_immediate): Skip whitespace before + complaining about junk after expression. + (i386_displacement): Likewise. + +Thu May 6 19:50:14 1999 Richard Henderson <rth@cygnus.com> + + * symbols.c (symbol_find_base): Use memcpy instead of strcpy. + Don't copy before downcaseing. + +1999-05-05 Catherine Moore <clm@cygnus.com> + + * tc-m68k.c: Include elf/m68k.h. + (m68k_elf_final_processing): New routine. + * tc-m68k.h (elf_tc_final_processing m68k_elf_final_processing): + Define. + +Mon May 3 10:26:03 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_apply_fix): Handle 22 bit fmt insn like a + 17 bit fmt insn. + +1999-04-30 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c (mcore_s_section): Dump literals before + changing section. + +1999-04-29 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c (md_apply_fix3): Insert reloc addend into insn + for COFF/PE port. + +Mon Apr 26 12:34:37 1999 Doug Evans <devans@canuck.cygnus.com> + + * config/tc-fr30.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h. + (TC_INIT_FIX_DATA): Delete. + * config/tc-m32r.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h. + (TC_INIT_FIX_DATA): Delete. + * write.h (struct fix): New member fx_cgen, ifdef USING_CGEN. + * write.c (fix_new_internal): Initialize fx_cgen member. + * cgen.c (gas_cgen_record_fixup,gas_cgen_record_fixup_exp): Update. + (gas_cgen_md_apply_fix3): Update. + * config/tc-m32r.c (md_cgen_lookup_reloc): Update. + (md_cgen_record_fixup_exp): Update. + (FX_OPINFO_R_TYPE): Update. + + * frags.c (frag_var,frag_variant): Initialize fr_cgen here. + * config/tc-fr30.h (TC_FRAG_INIT): Delete. + * config/tc-m32r.h (TC_FRAG_INIT): Delete. + * frags.h (struct frag): Make opindex, opinfo ints. + + * config/tc-fr30.c (FX_OPINFO_R_TYPE): Delete, unused. + +1999-04-26 Tom Tromey <tromey@cygnus.com> + + * aclocal.m4, configure: Updated for new version of libtool. + +1999-04-22 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c (md_apply_fix3): Renamed function from + md_apply_fix. + (md_apply_fix3): Do not fix up absolute relocations against + symbolic values. + + * config/tc-mcore.h (MD_APPLY_FIX3): Define. + +1999-04-20 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c (md_pseudo_table): Add intercepts for section + changes and data-in-text directives. + (mcore_cons): New function: intercept cons() operations. + (mcore_float_cons): New function: intercept float_cons() + operations. + (mcore_stringer): New function: intercept stringer() operations. + +1999-04-18 Ian Lance Taylor <ian@zembu.com> + + * obj.h (struct format_ops): Change generate_asm_lineno field to + take no parameters. + * config/obj-ecoff.h (OBJ_GENERATE_ASM_LINENO): Don't define. + + * config/tc-alpha.c (find_opcode_match): Add default case to + switch. + (find_macro_match): Likewise. + (load_expression): Parenthesize && within ||. + + * config/tc-alpha.h (TC_RELOC_RTSYM_LOC_FIXUP): Define. + +1999-04-17 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c (md_pseudo_table): Add overrides for .bss + .text .data .section pseudo ops. + (mcore_s_section): New function. Dump lits before changing secs. + (mcore_s_text): New function. Dump lits before changing secs. + (mcore_s_data): New function. Dump lits before changing secs. + +1999-04-16 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (mips_32bitmode): New. + (md_begin): Set mips_32bitmode if needed. + (mips_elf_final_processing): Don't set EF_MIPS_ARCH. + Set EF_MIPS_32BITMODE. + +Fri Apr 16 12:26:39 1999 Bob Manson <manson@charmed.cygnus.com> + + * config/obj-coff.c (c_section_symbol): Fix typo in previous + change. + +1999-04-16 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.h (LOCAL_LABELS_FB): Define to 1. + +Thu Apr 15 16:52:09 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3" + expressions correctly. + + +1999-04-15 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (mips_elf_final_processing): Set EF_MIPS_ARCH. + +Mon Apr 12 23:45:07 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd + and fmpynfadd instructions. + +1999-04-11 Richard Henderson <rth@cygnus.com> + + * as.h (environ): Declare it, if needed. + * as.c (dump_statistics): Don't declare environ. + * configure.in (environ): Detect declaration. + * configure, config.in: Rebuild + + * config/tc-i386.c (i386_immediate): Accept @GOT relocations. + (i386_displacement): Allocate enough space for replacement buffer. + Clean up replacement buffer initialization. + +1999-04-11 Bob Manson <manson@charmed.cygnus.com>: + + * subsegs.c (section_symbol): Don't create a new symbol if one + already exists; instead, use the existing one, but set its segment + and frag data if it hasn't already been defined. + * config/obj-coff.c (c_section_symbol): Likewise. + +Sat Apr 10 20:10:02 1999 Richard Henderson <rth@cygnus.com> + + * tc-alpha.c (load_expression): Call as_bad instead of abort. + +1999-04-08 Nick Clifton <nickc@cygnus.com> + + * config/tc-mcore.c: New File: Support routines for MCore + assembler. + * config/tc-mcore.h: New File: Definitions for MCore assembler. + * config/obj-coff.c: Add support for mcore-pe target. + + * Makefile.am: Add support for MCore targets. + * Makefile.in: Regenerate. + * configure.in: Add support for MCore targets. + * configure: Regenerate. + + * doc/all.texi: Set MCORE. + * doc/as.texinfo: Document MCore specific command line options. + + * write.h: Prevent multiple inclusion. + +1999-04-06 Ian Lance Taylor <ian@zembu.com> + + * asintl.h (LC_MESSAGES): Never define. + * as.c (main): Don't pass LC_MESSAGES to setlocale if the system + does not define it. + * gasp.c (main): Don't pass LC_MESSAGES to setlocale if the system + does not define it. + + * Makefile.am (m68k-parse.c): If configuring in the source + directory, copy m68k-parse.y into the local directory before + running ylwrap, to remove spurious differences when generating + snapshots. + * Makefile.in: Rebuild. + + * config/tc-sparc.h (md_do_align): Just allocate the number of + bytes necessary, rather than always allocating 1024. + +1999-04-04 Ian Lance Taylor <ian@zembu.com> + + * listing.c (listing_newline): Add cast to avoid warning. + * read.c (generate_lineno_debug): Add cases to switch. Reindent. + * config/tc-i386.c (i386_scale): Add return value. + (build_displacement_string): Remove unused local temp_disp2. + (i386_intel_memory_operand): Add parentheses to avoid warning. + (i386_intel_operand): Remove unused local end_of_operand_string. + (i386_operand): Remove unused local operand_modifier. + (i386_operand): Add parens to avoid warning. + +1999-04-04 Don Bowman <don@pixsci.com> + + * configure.in: Add mips*-*-vxworks* target; have it define + MIPS_STABS_ELF. + * configure, config.in: Rebuild. + +1999-03-31 Nick Clifton <nickc@cygnus.com> + + * configure.in (emulations): Add support for arm-epoc-pe. + * configure: Regenerate. + * config/te-epoc-pe.h: New file. Define macros specific to + arm-epoc-pe target. + * config/tc-arm.h: Select epoc-pe-arm target format if configured + for arm-epoc-pe target. + +Mon Mar 29 10:15:40 CST 1999 Catherine Moore <clm@cygnus.com> + + * tc-mips.c (md_apply_fix): Adjust value for linkonce sections. + +Wed Mar 24 14:11:10 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Clean up code to + detect ",n" without a condition. + (pa_parse_neg_cmpsub_cmpltr): Likewise. + + +Tue Mar 23 11:28:23 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit + instruction is encoded with one bit. + + +1999-03-23 Ian Lance Taylor <ian@zembu.com> + + * doc/internals.texi (CPU backend): Mention that + line_separator_chars should not include newline. From thi + <ttn@mingle.glug.org>. + +1999-03-22 Doug Evans <devans@casey.cygnus.com> + + * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open. + * config/tc-m32r.c (md_begin): Update call to m32r_cgen_cpu_open. + +Sun Mar 21 18:08:18 1999 Richard Henderson <rth@cygnus.com> + + * tc-alpha.c (md_assemble): Allow '6' in an opcode. + +Thu Mar 18 10:55:30 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr. + + +Thu Mar 18 02:30:07 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_ip, case 'd'): Do not allow ",n". + +1999-03-15 Martin Hunt <hunt@cygnus.com> + + * app.c (do_scrub_begin): Change '-' back to a symbol char + so we can use multiple opcodes on a line again. + + * config/tc-d30v.c: By default, warn if a symbol has + the same name as a register. Plus some minor + updates from the branch. + +1999-03-13 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (md_apply_fix3): Handle BFD_RELOC_8, + BFD_RELOC_16 and BFD_RELOC_64. + +1999-03-12 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> + + * expr.c (expr): Add missing else. + +1999-03-12 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_apply_fix3): Improve error message. + +1999-03-11 Doug Evans <devans@casey.cygnus.com> + + * Makefile.am (CPU_TYPES): Add fr30. + (cgen.o): Add $(CGEN_CPU_PREFIX)-desc.h dependency. + (fr30,m32r dependencies): Update. + * Makefile.in: Rebuild. + + * cgen.c (gas_cgen_record_fixup): Update use of operand->type. + (gas_cgen_record_fixup_exp): Ditto. + (gas_cgen_finish_insn): Call cgen_operand_lookup_by_num. + (gas_cgen_md_apply_fix3): Ditto. Update call to set_vma_operand. + * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open. + (md_cgen_lookup_reloc): Update use of operand->type. + * config/tc-m32r.c (md_begin): Update call to fr30_cgen_cpu_open. + (md_convert_frag): Call cgen_operand_lookup_by_num. + (md_cgen_lookup_reloc): Update use of operand->type. + (m32r_cgen_record_fixup_exp): Ditto. + +1999-03-09 Jim Blandy <jimb@zwingli.cygnus.com> + + * config/tc-mips.c (md_show_usage): Fix message. + +1999-03-03 Nick Clifton <nickc@cygnus.com> + + * doc/c-arm.texi (ARM Syntax): Document new command line switches + and LDR reg,=<expr> instruction. + + * config/tc-arm.c: Add support for -mcpu=arm810, -mcpu=arm9 and + -mcpu=arm9tdmi. + +Fri Feb 19 09:36:30 1999 Ian Lance Taylor <ian@cygnus.com> + + * doc/c-arm.texi (ARM-Chars): Fix typo in use of '@'. + +1999-02-17 Nick Clifton <nickc@cygnus.com> + + This patch was created by: Scott Bambrough + <scottb@corelcomputer.com> + + * app.c: + Special cased '@' character. The '@' character is used as the + ARM assembler comment character, as a special character + and in ELF .symver pseudo-op's, and as a special character in + .type and .section pseudo-ops. + (symver_pseudo): New static variable. + (symver_state): New static variable. + (struct app_save): Add field 'symver_state'. + (app_push): Save global symver_state int struct app_save. + (app_pop): Restore global symver_state from struct app_save. + (do_scrub_chars): Special case handling of '@' character in + .symver pseudo-ops. + + * configure.in: Modified to recognize armv* uname syntax from ARM + Linux kernel. + * configure: Regenerated. + + * config/obj-elf.c (obj_elf_section): Allow '%' as well as '@' as + a prefix to the section's type. + (obj_elf_type): Allow '%' as well as '@' and '#' as prefixes to + the type's typename. + + * config/tc-arm.h: Add support for PIC generation: + (pic_code): New boolean. + (obj_relocate_extern): Define. + (TC_RELOC_RTSYM_LOC_FIXUP): Define + (TC_CONS_FIX_NEW): Define. + (tc_fix_adjustable): Define. + (GLOBAL_OFFSET_TABLE_NAME): Define. + + * config/tc-arm.c: Add support for PIC generation: + (line_seperator_chars): Allow ';' as a seperator for Linux. + (is_immediate_prefix): New macro. + (arm_parse_reloc): New function. + (s_arm_elf_cons): New function. + (do_branch): Special case for BFD_RELOC_ARM_PLT32. + (md_undefined_symbol): Special case handling for the Global Offset + Table's symbol. + (md_apply_fix3): Handle PIC relocs. + (tc_gen_reloc): Handle PIC relocs. + (md_parse_option): Add support for '-k' command line switch to + enable PIC generation. + (cons_fix_new_arm): New function. + (s_arm_elf_cons): New function. + +Tue Feb 16 16:31:53 1999 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Add comments for uses of AC_DEFINE. + * acinclude.m4: Likewise. + * acconfig.h: Remove. + * aclocal.m4: Rebuild. + * configure: Rebuild. + * Makefile.in: Rebuild. + * config.in: Rebuild. + +1999-02-15 Jim Lemke <jlemke@cygnus.com> + + * config/tc-mips.c (mips_ip: case 'o'): Fix assertion failure for + non-constant offset from a base register. + +1999-02-14 Ken Raeburn <raeburn@raeburn.org> + + * config/tc-alpha.c (md_show_usage): Put \ before newline in + strings always. + +Sat Feb 13 14:10:10 1999 Richard Henderson <rth@cygnus.com> + + * config/tc-alpha.c (cpu_types): Enable EV6 PALcode with -m21264. + (emit_insn): Look for pc-relative and no-overflow specifiers on + internal relocation types. + +1999-02-13 Jim Blandy <jimb@zwingli.cygnus.com> + + * doc/c-mips.texi (MIPS Opts): Updated list of -mNNNN and + -mcpu=NNNN flags. + + * config/tc-mips.c: Remove all the mips_NNNN variables; just use + mips_cpu instead. + (mips_4650, mips_4010, mips_4100): Variables removed. + (hilo_interlocks, gpr_interlocks, append_insn, macro_build, macro, + macro2, mips16_macro, mips_ip): Test mips_cpu, not the mips_NNNN + variables. + (md_begin): Don't bother initializing the mips_NNNN variables; + mips_cpu is set, and that's good enough now. + (md_parse_option): Have the -mNNNN options set mips_cpu instead of + the mips_NNNN variable. The -no-mNNNN flags are now no-ops. + (show): New function, to handle wrapping in the CPU lists. + (md_show_usage): Update lists of -mcpu and -mNNNN switches. + +Sat Feb 13 00:17:26 1999 Richard Henderson <rth@cygnus.com> + + * config/tc-i386.c (i386_intel_operand): Ignore `SHORT' rather + than treat as an immediate specifier. + +Thu Feb 11 16:18:31 1999 Richard Henderson <rth@cygnus.com> + + * config/tc-i386.c: Prototype many functions. + (set_intel_syntax): Accept `prefix'/`noprefix' specifiers. + (i386_immediate): Remove unused second argument. + (i386_intel_operand): Fix i386_is_reg typo. + (i386_operand): Use allow_naked_reg. + (output_invalid): Make operand int for K&R. + +Thu Feb 11 11:21:02 1999 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (EXTRA_as_new_SOURCES): Uncomment--fixed by automake + patch. + * Makefile.in: Rebuild. + +1999-02-09 Doug Evans <devans@casey.cygnus.com> + + * Makefile.am (DISTCLEANFILES): Change cgen-opc.h to cgen-desc.h. + (cgen.o): Ditto. + (EXTRA_as_new_SOURCES): Comment out. + (.tcdep): <arch>-opc.h renamed to <arch>-desc.h. + * Makefile.in: Rebuild. + * doc/Makefile.in: Rebuild. + * configure.in: Require autoconf 2.13. Redo using_cgen handling. + Delete call to AM_CYGWIN32. Replace AM_EXEEXT with AC_EXEEXT. + (AC_OUTPUT): <arch>-opc.h renamed to <arch>-desc.h. + * configure: Rebuild. + * aclocal.m4: Rebuild. + * config.in: Rebuild. + * cgen.c: Include cgen-desc.h, not cgen-opc.h. + (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC. + (gas_cgen_cpu_desc): Renamed from gas_cgen_opcode_desc. + CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE. + CGEN_OPERAND_ATTR renamed to CGEN_OPERAND_ATTR_VALUE. + (gas_cgen_record_fixup): Remove unnecessary != 0 test. + (gas_cgen_record_fixup_exp): Ditto. + (gas_cgen_finish_insn): Ditto. Refer to operand table via cpu + descriptor, not global variable. + (gas_cgen_md_apply_fix3): Refer to operand_table via cpu + descriptor, not global variable. Refer to insert_operand handler + via cpu descriptor, not global function. + * cgen.h (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC. + * config/tc-fr30.c: Include opcodes/fr30-desc.h. + (*): gas_cgen_opcode_desc renamed to gas_cgen_cpu_desc. + CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE. + Update call to CGEN_OPERAND_TYPE,CGEN_INSN_OPERANDS. + * config/tc-m32r.c: Ditto. + (assemble_two_insns): Update calls to cgen_lookup_get_insn_operands. + (md_assemble): Ditto. + (md_convert_frag): Update call to CGEN_OPERAND_ENTRY. + +1999-02-09 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_apply_fix3): Fix handling of label1 - label2 + relocations for ELF targets. + +1999-02-08 Nick Clifton <nickc@cygnus.com> + + * configure.in: Add support for StrongARM target. + * configure: Regenerate. + +1999-02-05 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.h: Tidy OBJ_ELF and OBJ_COFF definitions. + + * config/tc-arm.c (md_apply_fix3): Fix BFD_RELOC_ARM_PCREL_BRANCH + for COFF ports. + +Wed Feb 3 11:35:47 1999 Richard Henderson <rth@cygnus.com> + + * config/tc-alpha.c (md_show_usage): Document pca56 and ev6 options. + +Mon Feb 1 20:37:30 1999 Catherine Moore <clm@cygnus.com> + + * config/tc-i386.h (LONG_DOUBLE_MNEM_SUFFIX): Define. + (INTEL_DWORD_MNEM_SUFFIX): Define. + (BYTE_PTR): Define. + (WORD_PTR): Define. + (DWORD_PTR): Define. + (XWORD_PTR): Define. + (SHORT): Define. + (OFFSET_FLAT): Define. + (FLAT): Define. + (NONE_FOUND): Define. + (No_dSuf): Define. + (No_xSuf): Define. + * config/tc-i386.c (set_intel_syntax): New routine. + (intel_syntax): Declare. + (allow_naked_reg): Declare. + (md_pseudo_table): Support .intel_syntax and .att_syntax. + (intel_float_operand): New routine. + (md_assemble): Handle INTEL_DWORD_MNEM_SUFFIX. + Handle brackets as well as parens. Call i386_intel_operand for + intel syntax. Reverse operands if appropriate. Handle new + suffixes. Handle movzx and movsx. + (i386_is_reg): New routine. + (i386_immediate): New routine. + (i386_scale): New routine. + (i386_displacement): New routine. + (i386_operand_modifier): New routine. + (build_displacement_string): New routine. + (i386_parse_seg): New routine. + (i386_intel_memory_operand): New routine. + (i386_intel_operand): New routine. + (i386_operand): Call i386_displacement, i386_immediate, + i386_scale, etc. instead of handling inline. + (parse_register): Handle registers without prefix. + +Mon Feb 1 12:24:58 1999 Catherine Moore <clm@cygnus.com> + + * configure: Regenerate. + * configure.in (arm-*-oabi): New. + (thumb-*-oabi): New. + * config/tc-arm.c (target_oabi): Declare. + (md_apply_fix3): Support REL relocs. + (md_parse_option): Handle -oabi. + (elf32_arm_target_format): New routine. + (md_longopts): Add OPTION_OABI. + * config/tc-arm.h: Redefine TARGET_FORMAT. + + +1999-01-28 Nick Clifton <nickc@cygnus.com> + + * write.c (write_relocs): Handle out of range error. + + * config/tc-fr30.c (fr30_fix_adjustable): New function. + (fr30_force_relocation): Default to 0. + + * config/tc-fr30.h (obj_fix_adjustable): Define. + (TC_FORCE_RELOCATION): Define. + + * cgen.c (gas_cgen_md_apply_fix3): Do not apply fixes to VTABLE + relocs. + +1999-01-16 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (write_2_short): Do not generate a sequential + merge of two instructions if the left instruciton kills the right. + +1999-01-11 Doug Evans <devans@casey.cygnus.com> + + * Makefile.in: Regenerate. + * configure.in: Redo test for using cgen. + * configure: Regenerate. + +1999-01-09 Nick Clifton <nickc@cygnus.com> + + * config/obj-coff.h (obj_adjust_symtab): Prevent accidental + redefinition of this macro. + +Tue Jan 5 21:58:03 1999 Doug Evans <devans@canuck.cygnus.com> + + * config/tc-mips.c (mips_frob_file): Disable "Unmatched %hi reloc" + warning. + +1998-12-29 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (append_insn): For mips16, insert a nop between + a read of HI or LO and an immediatly following branch. + +1998-12-29 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (md_begin): Another correction to the setting of + mips_eabi64. + +1998-12-23 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (md_begin): Correct type-o in setting of + mips_eabi64. + +1998-12-21 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c (md_assemble): Emit a NOP after a relaxable 16 + bit insn when optimizing, so that parallelised instructions will + start on a 32 bit boundary. + +1998-12-19 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (mips_eabi64): New. + (md_begin): Set mips_eabi64. + (mips_elf_final_processing): Use it. + +1998-12-18 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (mips_elf_final_processing): + Correct setting of ABI in e_flags. + +Wed Dec 16 16:17:22 1998 Dave Brolley <brolley@cygnus.com> + + * config/tc-fr30.c (md_assemble): Warn about invalid instructions + in delay slots. + +1998-12-16 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (md_begin,md_parse_option): Handle vr4111. + +1998-12-15 Doug Evans <devans@casey.cygnus.com> + + * cgen.c (gas_cgen_md_apply_fix3): Mark as an error, rather than a + warning, values that don't fit in the field. + +1998-12-15 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (mips_abi_string): New. + (md_parse_option,md_longopts): Add mabi. + (mips_elf_final_processing): Set e_flags based on mabi flag. + +1998-12-15 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (md_parse_option): Handle vr4111. + +98-12-11 Ken Raeburn <raeburn@cygnus.com> + + * config/tc-h8300.c (build_bytes): Change message given if the + instruction requires H8/300H mode and we're not in Hmode, to + suggest that it may be the operand modes that are the problem, not + necessarily the opcode. + +1998-12-10 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.c: Add line separator character. + +Tue Dec 8 19:51:50 1998 Mark Klein <mklein@dis.com> + + * configure.in (hppa-*-mpeix*): New target. + * config/obj-som.h (obj_som_compiler): Declare. + * config/obj-som.c (compiler_seen): New static variable. + (obj_som_compiler): New function. + * config/tc-hppa.c: Update tc_data uses for change to bfd/som.h. + (md_pseudo_table): Add "compiler" if OBJ_SOM. + (pa_type_args): Set hppa_priv_level. + (pa_compiler): New static function if OBJ_SOM. + * configure: Rebuild. + +Tue Dec 8 15:00:50 1998 Ian Lance Taylor <ian@cygnus.com> + + * read.c (output_leb128): Don't mark as inline. + +1998-12-08 Andrew MacLeod <amacleod@cygnus.com> + + * config/tc-ppc.c (ppc_vbyte): Prototype and new function for + AIX .vbyte unaligned data support. + (md_pseudo_table): Add 'vbyte' to list of valid pseudos. + (ppc_elf_validate_fix): Add eh_frame to list of ELF relocatable + sections. + +1998-12-07 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (md_assemble, do_assemble): Improve erroneous + input handling. + +Mon Dec 7 09:48:34 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-arm.c (elf32_arm_force_relocation): Check for + BFD_RELOC_ARM_PCREL_BRANCH. + +Sun Dec 6 12:46:36 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Define TARGET_BYTES_{BIG,LITTLE}_ENDIAN after + checking the target type. + (mips-dec-bsd*): Set endian to little. + * configure: Rebuild. + + COFF weak symbol support, based on patches from Mark Elbrecht + <snowball3@usa.net>: + * config/obj-coff.h (S_IS_WEAK): Define if not BFD_ASSEMBLER. + * config/obj-coff.c (obj_coff_weak): New static function. + (obj_coff_endef) [both versions]: Handle weak symbols. + (coff_frob_symbol): Likewise. + (yank_symbols): Likewise. + (obj_pseudo_table): Add "weak". + + * configure.in (m68k-*-gnu*): New target. From Aymeric Vincent + <aymeric.vincent@emi.u-bordeaux.fr>. + * aclocal.m4: Rebuild with current tools. + * configure: Rebuild. + + * config/tc-alpha.c (emit_ldgp): Give an error message rather than + an assertion failure for a case we can't handle when OBJ_ECOFF. + + * expr.c (operator): And with 0xff to avoid problems with signed + char. + +1998-12-03 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.c (md_cgen_lookup_reloc): Generate + BFD_RELOC_FR30_48 instead of BFD_RELOC_FR30_32. + +1998-12-02 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.c (md_cgen_lookup_reloc): Enable relocs for + LDI:20 insn. + +Thu Nov 26 11:23:48 1998 Dave Brolley <brolley@cygnus.com> + + * config/tc-fr30.c (md_pcrel_from_section): Restore previous + calculation of pcrel point. + +Tue Nov 24 17:21:52 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.c (md_pcrel_from_section): Fix calculation of + pcrel point. + +Tue Nov 24 14:54:38 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d10v.c (md_assemble): Make static 'etype' have file + scope. + (d10v_cleanup): Only generate previous insn if a multiline insn is + not pending. + +Fri Nov 20 11:41:13 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.c (md_cgen_lookup_reloc): Add support for + FR30_OPERAND_I32. + +Thu Nov 19 15:01:29 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_parse_option): Add support for -marm7xxx and + -marm6xxx command line switches. + +1998-11-18 Doug Evans <devans@casey.cygnus.com> + + * Makefile.am (DEP): Use $(srcdir)/../mkdep. + (itbl-ops.o): Delete duplicate dependencies. + Rebuild dependencies. + Add fr30 dependencies. + * Makefile.in: Rebuild. + +Tue Nov 17 13:42:42 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.c (md_cgen_lookup_reloc): Updated to match latest + opcode list. + * listing.c: Ignore line terminator characters found inside + strings. + +Thu Nov 12 19:21:24 1998 Dave Brolley <brolley@cygnus.com> + + * po/gas.pot: Regenerated. + +Thu Nov 12 10:54:16 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.c (fr30_is_colon_insn): New name for + fr30_is_label_start(). Also checks for delay slot insns. + + * config/tc-fr30.c (fr30_is_label_start): New function: Handle + FR30 instructions which contain a colon in the mnemonic. + + * config/tc-fr30.h (TC_START_LABEL): Define this macro. + +Wed Nov 11 09:58:21 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.c: Removed currently superflous code. + +Tue Nov 10 13:13:05 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-fr30.h: New file. + * config/tc-fr30.c: Tweaking so that it will compile. + +Tue Nov 10 14:41:33 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-d10v.h (obj_fix_adjustable): Define. + (TC_FORCE_RELOCATION): Define. + (d10v_force_relocation): Declare. + * config/tc-d10v.c (tc_gen_reloc): Handle Vtable relocs. + (md_apply_fix3): Handle Vtable relocs. + (d10v_fix_adjustable): New. + (d10v_force_relocation): New. + +Mon Nov 9 14:25:06 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c: Change default behaviour to ignore potential + conflicts between register name and symbol names. + +Wed Nov 4 18:42:00 1998 Dave Brolley <brolley@cygnus.com> + + * configure.in: Add fr30-*-*. + * config/tc-fr30.c: New file. + * Makefile.in: Regenerated. + * config.in: Regenerated. + * configure: Regenerated. + * doc/Makefile.in: Regenerated. + * po/gas.pot: Regenerated. + +Mon Nov 2 20:54:16 1998 Doug Evans <devans@canuck.cygnus.com> + + * config/tc-m32r.c (assemble_two_insns): Ensure both insns + are 16 bit insns. + +Mon Nov 2 20:10:18 1998 Martin von Loewis <loewis@informatik.hu-berlin.de> + + * app.c (do_scrub_begin): Set characters above 127 to be symbol + characters. + (do_scrub_chars): Add some casts to unsigned char to avoid + unwanted sign extension. + * read.c (lex_type): Set characters about 127 to be symbol + characters. + * config/tc-i386.c (md_begin): Set identifier_chars and + operand_chars for values above 127. + +Mon Nov 2 15:05:33 1998 Geoffrey Noer <noer@cygnus.com> + + * configure.in: detect cygwin* instead of cygwin32* + * configure: regenerate + +Tue Oct 27 13:18:40 1998 Nick Clifton <nickc@cygnus.com> + + * listing.c: Add support for producing a listing from piped + input. + +Tue Oct 27 08:56:44 1998 Gavin Romig-Koch <gavin@cygnus.com> + + * config/tc-mips.c (hilo_interlocks): Remove mips_3900. + (append_insn): Account for the tx39's multiply behavior. + +1998-10-26 Michael Meissner <meissner@cygnus.com> + + * config/tc-m32r.c (assemble_two_insns): Rename assemble_two_insns + from assemble_parallel_insns. Add support for '->' to indicate + explicitly serializing the instructions. + (md_assemble): Ditto. + +Sat Oct 24 15:12:19 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-sh.c (sh_fix_adjustable): Adjust EXTERN and + WEAK handling. + +Thu Oct 22 12:41:33 1998 Catherine Moore <clm@cygnus.com> + + * cgen.c (gas_cgen_md_apply_fix3): Revert last change. + +Thu Oct 22 10:03:15 1998 Ron Unrau <runrau@cygnus.com> + + * config/tc-mips.c: support frame and regmask/fregmask when + MIPS_STABS_ELF is specified. + +Wed Oct 21 11:34:51 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-sh.c (sh_fix_adjustable): Only include if OBJ_ELF. + (md_apply_fix): Don't return 1 for VTABLE relocs. + * config/tc-sh.h (obj_fix_adjustable): Define only if OBJ_ELF. + +Tue Oct 20 11:18:28 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * doc/c-i386.texi: Replace occurences of "opcode" with + "instruction mnemonic", "instruction", or "mnemonic" when + referring to the name of an instruction. Use "opcode" when + referring to the sequence of machine bytes. + + * config/tc-i386.c (opcode_chars): Rename to mnemonic_chars. + (is_opcode_char): Rename to is_mnemonic_char. + (md_assemble and i386_operand): Correct error messages from + "opcode" to "instruction mnemonic" + Rename throughout opcode[] -> mnemonic[], opp -> mnem_p, + MAX_OPCODE_SIZE -> MAX_MNEM_SIZE, + DWORD_OPCODE_SUFFIX -> DWORD_MNEM_SUFFIX, + WORD_OPCODE_SUFFIX -> WORD_MNEM_SUFFIX, + BYTE_OPCODE_SUFFIX -> BYTE_MNEM_SUFFIX, + SHORT_OPCODE_SUFFIX -> SHORT_MNEM_SUFFIX + LONG_OPCODE_SUFFIX -> LONG_MNEM_SUFFIX + + * config/tc-i386.h (*_MNEM_SUFFIX): Rename from *_OPCODE_SUFFIX. + + * config/tc-i386.c (i386_operand): Check for garbage after + register name. + +Tue Oct 20 10:49:42 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc + for BFD_ASSEMBLER to only change value when COFF if TE_PE. + +Mon Oct 19 20:20:42 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-sh.h (obj_fix_adjustable): Define. + * config/tc-sh.c (sh_force_relocation): Handle VT relocs. + (md_apply_fix): Likewise. + (tc_gen_reloc): Likewise. + (sh_fix_adjustable): New. + +Mon Oct 19 12:35:43 1998 Doug Evans <devans@seba.cygnus.com> + + * cgen.c (gas_cgen_finish_insn): Update handling of CGEN_INT_INSN_P. + * cgen.h (gas_cgen_finish_insn): Update prototype. + * config/tc-m32r.c (m32r_insn): CGEN_INT_INSN -> CGEN_INT_INSN_P. + cgen_insn_t -> CGEN_INSN_INT. + (make_parallel): Update handling of CGEN_INT_INSN_P. + (assemble_parallel_insn): Ditto. + (target_make_parallel): New function. + (md_assemble): Use it. + +Mon Oct 19 13:16:12 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-m32r.c (m32r_force_relocation): Fix typo. + +Sun Oct 18 18:48:57 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-sh.c (md_assemble): Make sure the entire opcode is + converted into lower case. + +Fri Oct 16 13:36:34 CDT Catherine Moore <clm@cygnus.com> + + * cgen.c (gas_cgen_md_apply_fix3): Handle VTABLE relocs. + (gas_cgen_tc_gen_reloc): Likewise. + * config/tc-m32r.h (obj_fix_adjustable): Define. + * config/tc-m32r.c (m32r_fix_adjustable): New. + (m32r_force_relocation): Handle VTABLE relocs. + +Wed Oct 14 11:33:38 1998 Nick Clifton <nickc@cygnus.com> + + * doc/c-arm.texi (ARM Directives): Document .ltorn directive. + +Mon Oct 12 11:07:21 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c (assemble_parallel_insn): Convert second opcode + to lower case before parsing. + + * config/tc-d30v.c (parallel_ok): Ignore conflicts when explicitly + parallel insns modift buts in the PSW as a side effect. + +Thu Oct 8 10:18:33 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (find_format): Test for missing flag and + control registers. + + (md_apply_fix3): Fix error messages to avoid + assumption about presence of a symbol. + + (parallel_ok): Disallow parallel instructions that both modify the + same flag register. + + (find_format): Generate a warning if an odd numbered register is + used as the first register in a mutli-register instruction. + +Wed Oct 7 14:09:14 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (md_apply_fix3): Do not assume that bad + relocations are always associated with a symbol. + +Tue Oct 6 09:31:15 1998 Catherine Moore <clm@cygnus.com> + + * tc-sparc.h (TC_FORCE_RELOCATION): Define. + (elf32_sparc_force_relocation): Declare. + * tc-sparc.c (md_apply_fix3): Handle vtable relocs. + (tc_gen_reloc): Handle vtable relocs. + (elf32_sparc_force_relocation): New. + +Mon Oct 5 09:25:32 1998 Catherine Moore <clm@cygnsu.com> + + * symbols.c (S_IS_FUNCTION): New. + * config/tc-v850.h (obj_fix_adjustable): Define. + (TC_FORCE_RELOCATION): Define. + (v850_force_relocation): Declare. + * config/tc-v850.c (tc_gen_reloc): Use offset instead + of fx_addnumber for VTABLE reloc addends. + (md_apply_fix3): Handle VTABLE relocs. + (v850_fix_adjustable): New. + (v850_force_relocation): New. + +Mon Oct 5 00:48:52 1998 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (fp_operand_format): Add some additional formats. + (pa_ip): Do not automatically promote into pa2.0 mode. + (pa_level): Handle ".level 2.0". + +Sun Oct 4 20:57:43 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (md_assemble): Handle AMD_3DNOW_OPCODE. + * config/tc-i386.h (template.extension_opcode): Change to + unsigned int to allow full range of 8-bit opcode suffixes. + (None): Redefine as 0xffff. + + From Jeff B Epler <jepler@usgs.gov> + * doc/c-i386.texi (i386-SIMD): New section. + +Thu Oct 1 15:37:54 1998 Richard Henderson <rth@cygnus.com> + + * read.c (discard_rest_of_line): New function. + * read.h: Declare it. + * config/tc-alpha.c (s_alpha_mask, s_alpha_frame): Use it. + +Thu Oct 1 10:33:53 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d10v.c (find_symbol_matching_register): New function. + (find_opcode): Cope with the case where a register name matches + a symbol name. + +Wed Sep 30 10:52:32 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (md_pcrel_from): Rename to + v850_pcrel_from_section. + (v850_pcrel_from_section): Do not resolves symbols in other + sections. + + * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define. + +Mon Sep 28 11:01:20 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d10v.c (find_opcode): Generate an error if a register + is supplied for an operand that should not be a register. + +Fri Sep 25 10:04:21 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (write_2_short): But do allow delayed branch + instructions to have another instruction in the right bin. + +Thu Sep 24 09:28:34 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (write_2_short): Do not allow instructions in + the right container if the left container holds a branch + instruction. + +Wed Sep 23 10:54:29 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (reg_name_search): Only warn if a name matches + both a register name and symbol name. + (find_format): Allow correct parsing of MVTSYS and MVFSYS insns. + +Tue Sep 22 17:49:16 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (write_2_short): Implement EITHER_BUT_PREFER_MU + execution unit class. + + (reg_name_search): If a name matches a register and a symbol, + prefer the register. + (find_format): Disallow flag registers when a general purpose + register is required. + If a number is required, but a register has been given, check to + see if a symbol with the same name as the register exists, and if + so, use that symbol. + +Tue Sep 22 16:40:52 1998 Jim Wilson <wilson@cygnus.com> + + * config/obj-elf.h (ECOFF_DEBUGGING): Add missing parens. + +Tue Sep 22 15:44:21 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (find_format): Do not accept flag registers as + general purpose registers. + (find_format): If an immediate value is expected at a given place + in a format, but a register name has been provided instead, check + to see if that register name matches the name of a predefined + symbol and if it does, then use the symbol instead. + (reg_name_search): If a register name matches a symbol name, + prefer the register name to the symbol name. + +Mon Sep 21 10:42:57 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c (m32r_do_align): After inserting NOPs, reset + the previous insn to empty. + +1998-09-20 Michael Meissner <meissner@cygnus.com> + + * config/tc-ppc.c (md_apply_fix3): Do not break string into two + pieces, forcing the use of an ANSI compiler. + +Sun Sep 20 00:58:12 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * config/tc-m68k.h (TC_FORCE_RELOCATION): New macro. Force vtable + relocs. + * config/tc-m68k.c (md_apply_fix_2): Do nothing for vtable relocs. + +Tue Sep 15 08:51:07 1998 Catherine Moore <clm@cygnus.com> + + * config/obj-elf.c (obj_elf_vtable_inherit): Handle arm + assembler syntax. + (obj_elf_vtable_entry): Likewise. + * config/tc-arm.h: Define TC_FORCE_RELOCATION for OBJ_ELF. + * config/tc-arm.c (md_apply_fix3): Handle VTABLE relocations. + (tc_gen_reloc): Likewise. + (arm_fix_adjustable): Likewise. + (elf32_arm_force_relocation): New. + (armelf_frob_symbol): Remove coff-style symbol support. + +Wed Sep 9 11:27:16 1998 Richard Henderson <rth@cygnus.com> + + * config/tc-i386.c (i386_operand): Fix typo in last patch. + +Tue Sep 8 18:10:01 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-arm.c (arm_adjust_symtab): Move #ifdef + OBJ_COFF so that routine is defined for a.out format. + +Tue Sep 8 15:56:19 1998 Richard Henderson <rth@cygnus.com> + + * config/tc-i386.c (i386_operand): Detect non-segment registers + used as segment prefixes. + +Sat Sep 5 19:00:38 1998 Ian Lance Taylor <ian@cygnus.com> + + * ehopt.c (check_eh_frame): Check the size of the FDE, and don't + optimize across FDE boundaries. + + * config/obj-coff.c (obj_coff_section): Preserve any link once + flags when setting the section flags. + +Fri Sep 4 17:07:14 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.h (obj_adjust_symtab): Fixed typo. + * config/tc-arm.c (armelf_adjust_symtab): Reformatted. + +Fri Sep 4 13:57:43 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> + + * config/tc-sparc.c (in_signed_range): Sign extend 32-bit words + to the host width. + +Wed Sep 2 11:31:14 1998 Richard Henderson <rth@cygnus.com> + + * frags.c (frag_grow): Include the size of the frag struct in the + obstack chunk size. + + * subsegs.c (subseg_set_rest): Adjust the seginfo frchain start + if the new subseg comes before the old. + +Tue Sep 1 15:01:33 1998 Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> + + * config/tc-sparc.c (sparc_ip): Allow all digits in an instruction + to handle edge8 and edge16. + +Mon Aug 31 09:51:14 1998 Richard Henderson <rth@cygnus.com> + + * config/obj-elf.c (obj_elf_vtable_inherit): Print error message + before we clobber the symbol involved. + +Mon Aug 31 10:58:06 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-arm.c: Remove OBJ_ELF definitions for + S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. Only + use arm_adjust_symtab for OBJ_COFF. + (armelf_adjust_symtab): New Routine. + * config/tc-arm.h: Define obj_adjust_symtab to + armelf_adjust_symtab for OBJ_ELF. + +Sat Aug 29 22:18:51 1998 Richard Henderson <rth@cygnus.com> + + * configure.in: Make all i386-elf targets use bfd_gas. + * config/tc-i386.c (tc_i386_force_relocation): New. + (tc_i386_fix_adjustable): Don't fix vtable relocs. + (md_apply_fix3): Likewise. + (tc_gen_reloc): Handle them. + * config/tc-i386.h (TC_FORCE_RELOCATION): Always define, calling + tc_i386_force_relocation. + +Mon Aug 24 13:40:21 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_show_usage): Improve formatting of --help output. + +Fri Aug 21 18:43:48 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (md_assemble): Copy previous opcode over + current opcode after writing the first insturction of a reverse + sequential pair. + +Fri Aug 21 07:30:35 1998 Doug Evans <devans@canuck.cygnus.com> + + * read.h (generate_lineno_debug): Add prototype. + * read.c (generate_lineno_debug): Make non-static. + +Thu Aug 20 23:17:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (md_assemble): Only warn for address/data size + prefixes. + +Thu Aug 20 14:45:08 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (arm_fix_adjustable): Do not adjust relocations + against Thumb function names, as the linker needs this information. + +1998-08-20 Vladimir N. Makarov <vmakarov@cygnus.com> + + * expr.c (operand): Check also that there is no advance in operand + after atof_generic in order to decide "is it label 0f or floating + point number?". + +Wed Aug 19 09:30:16 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c: Replace double dash prefix to M32R specific + command line options with a single dash. + * doc/c-m32r.texi: Replace double dash prefix with a single dash. + +Tue Aug 18 11:59:43 1998 Catherine Moore <clm@cygnus.com> + + * tc-arm.h: Define obj_fix_adjustable for OBJ_ELF. + * tc-arm.c (arm_fix_adjustable): New routine. + +1998-08-13 Vladimir N. Makarov <vmakarov@cygnus.com> + + * read.c (s_align, s_comm, s_mri_common, s_fail, s_globl, s_space, + s_float_space, s_struct, cons_worker): Move ignore_rest_of_line or + demand_empty_rest_of_line before mri_comment_end. + (equals): Check garbage after expression before + mri_comment_end in MRI mode. + +Thu Aug 13 15:08:42 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-mips.c (macro): Correct M_SGE_I/M_SGEUI_I case for a + small immediate constant to use the constant itself rather than + always using 1. + +Wed Aug 12 18:47:38 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-hppa.c (pa_enter): Call as_bad rather than abort. + (pa_leave): Likewise. + +Wed Aug 12 13:25:03 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (md_assemble): Emit a warning for stand-alone + prefixes. + (i386_operand): Fix an error message. + +Tue Aug 11 14:44:32 1998 Nick Clifton <nickc@cygnus.com> + + * doc/c-arm.texi (ARM Directives): Document .req directive. + + * config/tc-arm.c (reg_required_here): Display erroneous string if + the register name could not be decoded. + Do not set inst.instruction if the sift is -1. + +Mon Aug 10 15:39:56 1998 Richard Henderson <rth@cygnus.com> + + * config/tc-alpha.c (tc_gen_reloc): Bias WEAK symbols just as + we do for EXTERN. + +Mon Aug 10 15:06:18 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (d30v_align): Always perform alignment request, + even if it is belived to be unnecessary. + +Mon Aug 10 17:48:09 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + config/tc-i386.c (i386_operand): Size immediate constants by + suffix (erroneously removed as part of July 7 change). + +Sun Aug 9 20:45:32 1998 Catherine Moore <clm@cygnus.com> + + * config/obj-elf.h: Check for redefinition of obj_frob_symbol. + * config/tc-arm.c: Define S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. + (armelf_frob_symbol): New Routine. + * config/tc-arm.h: Define obj_frob_symbol if OBJ_ELF. + +Sat Aug 8 15:21:28 1998 Richard Henderson <rth@cygnus.com> + + * config/tc-alpha.c (alpha_fix_adjustable): Don't adjust weak syms. + +Wed Aug 5 15:54:14 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_begin): Set BFD private flags depending upon + command line switches passed to assembler. + +Mon Aug 3 14:02:52 1998 Doug Evans <devans@seba.cygnus.com> + + * cgen.h (GAS_CGEN_MAX_FIXUPS): GAS_ prepended, all uses updated. + (gas_cgen_opcode_desc): Declare. + (gas_cgen_parse_operand): Declare. + (*): Prepend gas_ to gas specific fns to denote them as such. + All uses updated. + * cgen.c (gas_cgen_opcode_desc): New global + (gas_cgen_init_parse): Renamed from cgen_asm_init_parse. + (queue_fixup): Renamed from cgen_queue_fixup. + (*): Prepend gas_ to gas specific fns to denote them as such. + All uses updated. + (gas_cgen_md_apply_fix3): Update call to insert_operand. + (gas_cgen_finish_insn): Renamed from cgen_asm_finish_insn. + * config/tc-m32r.c (md_begin): Remove use of CGEN_SYM. + Open opcode table and initialize it. + (make_parallel): Use gas_cgen_opcode_desc. + (assemble_parallel_insn): Ditto. Remove use of CGEN_SYM. + (md_assemble): Ditto. + +Sat Aug 1 19:27:30 1998 Richard Henderson <rth@cygnus.com> + + * as.h (debug_info_type): Add entries for unspecified and dwarf*. + * ecoff.c (ecoff_generate_asm_lineno): Take no arguments; call + as_where ourselves. Provide a stub for !ECOFF_DEBUGGING. + * ecoff.h: Move ECOFF_DEBUGGING protection inside GAS_ECOFF_H. + Move ecoff_generate_asm_lineno outside ECOFF_DEBUGGING protection. + * read.c (generate_lineno_debug): Tidy ECOFF bits. Use + DEBUG_UNSPECIFIED rather than DEBUG_NONE for initial test. + * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Define to a variable. + (SEPARATE_STAB_SECTIONS): Conditionalize on value of ECOFF_DEBUGGING. + (INIT_STAB_SECTION): Likewise. + (OBJ_PROCESS_STAB): Likewise. + + * config/tc-alpha.c (md_longopts): New options -mdebug/-no-mdebug. + (md_parse_option): Watch for them. + (alpha_cur_ent_sym, alpha_flag_mdebug): New variables. + (md_begin): Kill neverdef code. + (s_alpha_ent, s_alpha_end, s_alpha_mask, s_alpha_frame): New. + (s_alpha_prologue): Watch alpha_cur_ent_sym. + (s_alpha_coff_wrapper): New. + (md_pseudo_table): Trap all ECOFF pseudos. + +Fri Jul 31 16:45:54 1998 Ron Unrau <runrau@cygnus.com> + + Start of changes to remove mdebug section from mips*-elf + Based on MIPS_STAB_ELF definition + * acconfig.h: undef if not configured + * config.in: undef if not configured + * config/mips-elf.h: only set ECOFF debugging if not stabs-in-elf + * config/tc-mips.c (s_ent): set BSF_FUNCTION + * stabs.c (s_stab_generic): flush frag + +Fri Jul 31 16:14:45 1998 Catherine Moore <clm@cygnus.com> + + * configure.in: (arm-*-elf): Handle. + (thumb-*-elf): Handle. + * configure: Regenerate. + * read.c (stringer): Fix typo in comment. + * write.c (fixup_segment): Don't add symbol value to addend if + TC_ARM and OBJ_ELF. + * config/tc-arm.c (md_section_align): Don't align dwarf debug + sections. + (tc_gen_reloc): Always set the reloc addend to fixp->fx_offset + for OBJ_ELF. + +Thu Jul 30 21:38:43 1998 Frank Ch. Eigler <fche@cygnus.com> + + * config/tc-d30v.c ({cur,prev}_left_kills_right_p): New variables. + (write_2_short): Emit warning if new flag is set. + (do_assemble): Set flags if left instruction is one of special + "right-instruction-killer" type. + +Tue Jun 28 18:12:28 1998 Stan Cox <scox@cygnus.com> + + * config/tc-sparc.c (md_number_to_chars, cons_fix_new_sparc): + Always output words in debug_info section as big endian. + (sparc_target_format): Choose correct bfd target. + (md_apply_fix3): Rename BFD_RELOC_SPARC_32LE to BFD_RELOC_SPARC_REV32. + +Tue Jul 28 11:01:21 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (md_assemble): Fix "errmsg" initialization + to work with internationalization code. Issue an error when two + operands match that are not allowed to match. + +Mon Jul 27 16:25:58 1998 Doug Evans <devans@canuck.cygnus.com> + + * configure.in (install_tooldir): Allow target to specify whether + it wants to be installed in $(tooldir)/bin. + * configure: Regenerate. + * Makefile.am (install-exec-local): Set install-exec-tooldir + dependency via configure. + * Makefile.in: Regenerate. + +Fri Jul 24 19:58:59 1998 Doug Evans <devans@canuck.cygnus.com> + + * Makefile.am (install-exec-local): Split into two ... + (install-exec-bindir,install-exec-tooldir): New rules. + * Makefile.in: Regenerate. + +Fri Jul 24 16:31:49 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (install-exec-local): Don't remove the file before + checking whether $(bindir) == $(tooldir)/bin. From Maciej + W. Rozycki <macro@ds2.pg.gda.pl>. + * Makefile.in: Rebuild. + +Fri Jul 24 09:13:46 1998 Doug Evans <devans@canuck.cygnus.com> + + * cgen.c: Include libiberty.h. + (cgen_md_apply_fix3): Update call to md_cgen_lookup_reloc. + (cgen_tc_gen_reloc): Use xmalloc, not bfd_alloc. + * cgen.h (cgen_md_apply_fix3,cgen_tc_gen_reloc): Declare. + (md_cgen_lookup_reloc)): Declare. + (md_cgen_record_fixup_exp): Declare. + * config/tc-m32r.h (md_pcrel_from_section): Declare. + (m32r_relax_frag): Declare. + (cgen_md_apply_fix3): Decls moved to cgen.h. + (cgen_record_fixup_exp,cgen_tc_gen_reloc): Ditto. + (m32r_cgen_record_fixup_exp): Delete decl. + * config/tc-m32r.c (m32r_cpu_desc): #if 0 out. + (assemble_nop): Delete. + (expand_debug_syms): Delete unused `exp'. + (md_cgen_lookup_reloc): Renamed from CGEN_SYM (lookup_reloc). + Add default case for -Wall. + (m32r_cgen_record_fixup_exp): Add default case for -Wall. + (md_atof): Delete unused wordP. + +Thu Jul 23 13:19:50 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL + value. + +Wed Jul 22 14:36:56 1998 Ian Lance Taylor <ian@cygnus.com> + + * doc/as.texinfo: Add documentation for .end, .exitm, .fail, + .ifc, .ifeqs, .ifge, .ifgt, .ifle, .iflt, .ifnc, .ifne, .ifnes, + .print, .purgem, and .struct. Remove documentation for + .app-file. + +Tue Jul 21 16:50:52 1998 Doug Evans <devans@seba.cygnus.com> + + * cgen.c (cgen_md_apply_fix3): set_operand renamed to set_vma_operand. + Update call to insert_operand. + +Fri Jul 17 11:42:20 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c (ms_show_usage): Formatting changes. + +Wed Jul 15 15:38:28 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i386.c (md_assemble): Don't get confused by trailing + whitespace after a prefix operator. + +Tue Jul 14 15:32:56 1998 Richard Henderson <rth@cygnus.com> + + * configure.in (i386-*-beos{pe,elf,}*): Recognize. + +Tue Jul 14 12:33:44 1998 Chris Torek <torek@bsdi.com> + + * config/tc-sparc.c (log2): New static function. + (s_reserve): Use log2 to convert alignment before calling + record_alignment. + (s_common): Use log2 to convert alignment before calling + record_alignment and frag_align. + (sparc_cons_align): Use log2. + +Tue Jul 14 11:58:40 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-sparc.c (s_reserve): Set symbol size if OBJ_ELF. + (s_common): Likewise. + + * config/tc-sparc.c (sparc_handle_align): Reindent a bit. Correct + initialization of waddr. + (sparc_elf_final_processing): Add default case to switch. + +Tue Jul 14 11:00:16 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather + than temporary real. + +Mon Jul 13 13:55:42 1998 Ian Lance Taylor <ian@cygnus.com> + + * write.c (subsegs_finish): Don't align the segments if there were + any errors. + + * config/obj-coff.c (c_symbol_merge): Correct number of bytes when + copying aux information. + + * expr.c (make_expr_symbol): Catch attempts to turn an O_big + expression into a symbol. + +Mon Jul 13 13:29:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (mode_from_disp_size): Change arg and return + type to unsigned int. + (md_assemble): Change type used to store offsets from unsigned + long to long. + (i386_operand): Switch error check to only call RESTORE_END_STRING + once after parse_register. + +Fri Jul 10 16:00:04 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (md_show_usage): Changed format to match that + of gcc, ld, etc. + + * as.c (show_usage): Changed format to match that of gcc, ld, etc. + +Thu Jul 9 12:09:57 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * config/tc-m68k.c (tc_m68k_fix_adjustable): Don't adjust vtable + relocs. + (md_apply_fix_2): Force the symbol of the vtable reloc to be + weak. + +Thu Jul 9 11:31:54 1998 Ian Lance Taylor <ian@cygnus.com> + + * doc/Makefile.am (MAINTAINERCLEANFILES): Define. + * doc/Makefile.in: Rebuild. + +Wed Jul 8 12:18:56 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (mips_ip, case 'i' and 'j'): Mask off high bits + for %lo expressions. + (mips_ip, case 'u'): Move range check after code to mask + off bits in %hi/%lo expressions. Mask off high bits for + %lo expressions. + +Tue Jul 7 17:57:38 1998 Ian Lance Taylor <ian@cygnus.com> + + * doc/Makefile.am (gasver.texi): New target. + (as.info, as.dvi): Depends upon gasver.texi. + * doc/as.texinfo: Include gasver.texi. Mention version number on + title page and in top node. + * doc/Makefile.in: Rebuild. + +Tue Jul 7 11:42:16 1998 Richard Henderson <rth@cygnus.com> + + * listing.c (listing_listing): For EDICT_LIST, skip all lines up to + but not including the line containing the edict. + * listing.h (LISTING_EOF): New. + * input-scrub.c (input_scrub_next_buffer): Call it. + +Tue Jul 7 13:00:37 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (i386_operand): Don't set the size of an + immediate address based solely on the suffix and the mode. + + * config/tc-i386.c (md_assemble): Add assertion to make sure + overlap2 does not set Imm. + + * config/tc-i386.c (space_chars): Remove. The scrubber converts + sequences of whitespace to a single space. + (is_space_chars): Just compare with space. + (md_begin): Don't initialize space_chars. + (md_assemble): Just skip a single whitespace character. + (i386_operand): Rewrite base-index parsing to use new + parse_register, and to skip white space. Skip white space in a + number of other places too. Don't give error message if + parse_register fails. + (parse_register): Change reg_string parameter to be non-const. + Add end_op parameter. Skip white space after the `%', and return + end of register string. Give error message here rather than + caller. + +Fri Jul 3 15:34:34 1998 Ian Lance Taylor <ian@cygnus.com> + + Based on patch from Matt Semersky <matts@scd.hp.com>: + * expr.c (op_encoding): Make const. + (expr_set_precedence): New function. + (expr_begin): Don't set operator rankings, just call + expr_set_precedence. + * expr.h (expr_set_precedence): Declare. + * read.c (s_mri): Call expr_set_precedence. + +Thu Jul 2 16:24:58 1998 Ian Lance Taylor <ian@cygnus.com> + + * doc/as.texinfo (Statements): Remove paragraph discussing + continuing lines with a backslash. This hasn't worked for years, + if it ever did. + +Thu Jul 2 14:06:22 1998 Klaus Kaempf <kkaempf@rmi.de> + + * obj-vms.c: Add C++ support with ctors/dtors sections. Add weak + symbol definitions. + (Ctors_Symbols, Dtors_Symbols): New symbol chains. + (ps_CTORS, ps_DTORS): New section types. + (vms_fixup_xtors_section): New function + (Ctors_Psect, Dtors_Psect): Define. + (IS_GXX_XTOR): Define + (global_symbol_directory): Change check of gxx_bug_fixed to 0. + Filter static constructors/destructors and add to + Ctors_Symbols/Dtors_Symbols chain. + (vms_write_object_file): Write Ctors_Symbols/Dtors_Symbols to + appropriate section. + + * tc-alpha.h (TARGET_FORMAT): Rename "evax-alpha" to "vms-alpha". + * makefile.vms: Merge vax/vms support. + +Wed Jul 1 20:06:20 1998 Richard Henderson <rth@cygnus.com> + + * config/obj-elf.c (obj_elf_vtable_inherit, obj_elf_vtable_entry): New. + (elf_pseudo_table): Add them. + * config/tc-mips.c (mips_force_relocation): Force vtable relocs. + (md_apply_fix): Accept them. + (mips_fix_adjustable): Don't adjust them. + (tc_gen_reloc): Mung BFD_RELOC_VTABLE_ENTRY for Rel. + * config/tc-ppc.c (md_apply_fix3): Accept vtable relocs. + * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Force vtable relocs. + (tc_fix_adjustable): Don't adjust them. + +Wed Jul 1 16:35:32 1998 Doug Evans <devans@seba.cygnus.com> + + * Makefile.am (CGEN_CPU_PREFIX): New variable. + (cgen.o): Use it. + * Makefile.in: Regenerate. + * configure.in: AC_SUBST cgen_cpu_prefix. + * configure: Regenerate. + +Wed Jul 1 21:38:56 1998 J"orn Rennecke <amylaar@cygnus.co.uk> + + * config/tc-sh (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define. + Changed all users of COND12_DELAY. + +Fri Jun 26 11:21:11 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (set_arch_mach): New function. + (md_pseudo_table): Add pseudo-ops to set the current machine type. + (md_begin): Default to mn10300 mode. + (md_assemble): Only accept instructions for the core mn10300 + chip and the active machine type. + +Wed Jun 24 19:06:04 1998 Ian Lance Taylor <ian@cygnus.com> + + * subsegs.h (segment_info_type): Give the struct a name. + * config/tc-h8300.h (tc_reloc_mangle): Add prototype. + * config/tc-h8500.h (tc_reloc_mangle): Declare. + * config/tc-sh.h (sh_coff_reloc_mangle): Add prototype. + * config/tc-w65.h (tc_reloc_mangle): Declare. + * config/tc-z8k.h (tc_reloc_mangle): Declare. + +Wed Jun 24 13:45:00 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-v850.c (v850_comm): Restore old section + after common processing. + +Wed Jun 24 11:50:54 1998 Klaus Kaempf <kkaempf@progis.de> + + * config/obj-vms.c (Create_VMS_Object_File): Force binary file. + +Tue Jun 23 17:47:31 1998 Jim Wilson <wilson@cygnus.com> + + * config/tc-h8300.c (do_a_fix_imm, build_bytes): Replace cast to + char with code that explicitly sign-extends. + +Tue Jun 23 13:54:57 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (md_begin): Restore text section as the current + section after creating call table sections. + * config/obj-coff.h (SYM_AUXINFO): New macro to conceal ugly + code. + + * config/obj-coff.c (c_symbol_merge): Replace complex expresion + with call to macro SYM_AUXINFO. + +Tue Jun 23 15:09:27 1998 Mike Stump <mrs@wrs.com> + + * Makefile.am (install-exec-local): Don't let EXEEXT interfere + with the program transform name. + * Makefile.in: Rebuild. + +Mon Jun 22 19:52:42 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary + information. + +Mon Jun 22 15:18:58 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i386.c (i386_operand): Be prepared for a space between + the open parenthesis and the start of the register operand, + because of the June 16 change. + +Sun Jun 21 21:27:03 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-sh.c (md_apply_fix): Handle weak symbols correctly if + BFD_ASSEMBLER. + +Sun Jun 21 12:26:36 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (d30v_align): Always perform alignment request, + even if it is belived to be unnecessary. + +Fri Jun 19 13:57:06 1998 Ian Lance Taylor <ian@cygnus.com> + + * write.c (adjust_reloc_syms): Never adjust relocs against weak + symbols. + * config/tc-mips.c (md_apply_fix): Adjust accordingly. + +Fri Jun 19 09:50:17 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (mn10300_insert_operand): Do not hardcode the + shift amount for a repeated operand. The shift amount for the + repeated copy comes from the size of the operand. + +Fri Jun 19 00:44:19 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-h8300.c (get_operand): Fix typos in ldm/stm support. + +Wed Jun 17 13:07:05 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-mips.c (md_show_usage): Fix -mipsN usage. + +Tue Jun 16 13:06:21 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * app.c (do_scrub_begin): If tc_symbol_chars is defined, treat all + characters in it as LEX_IS_SYMBOL_COMPONENT. + * config/tc-i386.h (tc_symbol_chars): Define. + (extra_symbol_chars): Declare. + * config/tc-i386.c (extra_symbol_chars): Define. + (comment_chars): Don't use '/' as comment start if TE_LINUX. + (line_comment_chars): Set to '/' if TE_LINUX. + * doc/c-i386.texi (i386-prefixes): Update. + * doc/internals.texi (CPU backend): Document tc_symbol_chars. + +Fri Jun 12 13:36:54 1998 Tom Tromey <tromey@cygnus.com> + + * po/Make-in (all-yes): If maintainer mode, depend on .pot file. + ($(PACKAGE).pot): Unconditionally depend on POTFILES. + +1998-06-12 Vladimir N. Makarov <vmakarov@cygnus.com> + + * config/tc-d10v.c (md_apply_fix3): Checking displacement + constraint in instructions REP & REPI. + +Thu Jun 11 08:56:46 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (md_apply_fix3): Catch BFD_RELOC_8, + BFD_RELOC_16, BFD_RELOC_64 and issue appropriate error messages. + + (check_range): If the operand is shifted, then shift the number + before checking its range. + + * write.c (adjust_reloc_syms): Add more checks for NULL pointers. + + * config/tc-v850.c (v850_comm): Set SEC_COMMON bit on special + common sections. + +Wed Jun 10 17:26:35 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (v850_comm): Create special sections as needed. + +1998-06-10 Vladimir N. Makarov <vmakarov@cygnus.com> + + * config/tc-d10v.c (write_2_short): Addition of swapping + instructions for sequential and reverse sequential order when + given order is not possible. + +Tue Jun 9 13:52:53 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am: Rebuild dependencies. + (DEP_INCLUDES): Fix reference to intl build directory. + * Makefile.in: Rebuild. + +Tue Jun 9 12:20:05 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * doc/c-i386.texi: Update 16 bit documentation. + + * config/tc-i386.h: Change Data16 to Size16, Data32 to Size32, + IgnoreDataSize to IgnoreSize as they are used for address size as + well as data size. + * config/tc-i386.c: Likewise. Add code to reject addr32/data32 in + 32-bit mode, similarly addr16/data16 and variants. + +Mon Jun 8 18:32:01 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (md_assemble): Fix handling of reverse + sequential word multiply instructions. + + (do_assemble): Add extra command line argument, to allow mul32 + attribute to be preserved across parallel insns. + (md_assemble): Insert NOPs between explicitly parallel insns which + contain an 32 bit multiply and a 16 multiply. + +Mon Jun 8 12:20:30 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c: REPNE renamed to REPNE_PREFIX_OPCODE, and + likewise for REPE. + + * config/tc-i386.c (reloc): Add braces. + + * config/tc-i386.c (struct _i386_insn): Rename bi to sib to be + consistent with Intel naming. + * config/tc-i386.h (base_index_byte): Rename to sib_byte. Don't + use bitfields in sib_byte. + (modrm_byte): Don't use bitfields here either. + + * config/tc-i386.c (current_templates): Add const. + (parse_register): Add const to return, param, and char *s. + (i386_operand): Add const to reg_entry *r. + * config/tc-i386.h (templates): Add const to start, end. + + Inspired by code for 16 bit gas support from Martynas Kunigelis + <martynas@nm3.ktu.lt>: + * config/tc-i386.c (md_assemble): Add full support for 16 bit + modrm, and Jump, JumpByte, JumpDword, JumpInterSegment insns. + (uses_mem_addrmode): Remove. + (md_estimate_size_before_relax): Add support here too. + (md_relax_table): Rewrite interface to md_relax for 16 bit + support. + (BYTE, WORD, DWORD, UNKNOWN_SIZE): Remove. + (opcode_suffix_to_type): Remove. + (CODE16, SMALL, SMALL16, BIG, BIG16): Define. + (SIZE_FROM_RELAX_STATE): Modify to suit above. + (md_convert_frag): Likewise. + (i386_operand): Add support for 16 bit base/index regs, + immediates, and displacements. Remove some unnecessary casts, and + localise end_of_operand_string, displacement_string_start, + displacement_string_end variables. Add GCC_ASM_O_HACK. + * config/tc-i386.h (NO_BASE_REGISTER_16): Define. + + * config/tc-i386.c (prefix_hash): Remove. + (md_begin): Rewrite without obstacks. Remove prefix hash table + handling. Rewrite lexical table handling. + (i386_print_statistics): Don't print prefix statistics. + (md_assemble): Rewrite instruction parser so that line is not + converted to lower case. Don't do a hash_find for prefixes, + instead recognise them via opcode modifier. + (expecting_operand, paren_not_balanced): Localise variables. + * config/tc-i386.h (IsPrefix): Define. + (prefix_entry): Remove. + + * config/tc-i386.h (PREFIX_SEPERATOR): Don't define. + * config/tc-i386.c (PREFIX_SEPARATOR): Define here instead, using + '\\' in case where comment_chars contains '/'. + + * config/tc-i386.c (MATCH): Ensure given operand and template + match for JumpAbsolute. Makes e.g. `ljmp table(%ebx)' invalid; + you must write `ljmp *table(%ebx)'. + + From H.J. Lu <hjl@gnu.org>: + * config/tc-i386.c (BFD_RELOC_16, BFD_RELOC_16_PCREL): Define + as 0 ifndef BFD_ASSEMBLER. + (md_assemble): Allow immediate operands without suffix or + other reg operand to default in size to the current code size. + +Mon Jun 8 09:45:00 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-v850.c (md_begin): Restore creation of + .call_table_text and .call_table_data sections. + +Sat Jun 6 00:02:41 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (md_assemble): Set execution type to unknown + after emitting a word of noops. + +Fri Jun 5 23:27:04 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (mode_from_disp_size): Disp16 is mode 2. + (i386_operand): Simplify checks for valid base/index combinations. + Disallow `in 4(%dx),%al'. + + * config/tc-i386.c (struct _i386_insn): Make regs, base_reg, and + index_reg const. + (add_prefix): Change parameter from char to int. + + * config/tc-i386.h (Ugh): Define opcode modifier. + * config/tc-i386.c (md_assemble): Print warnings for Ugh insns. + + * config/tc-i386.c (md_assemble): Rewrite MATCH and + CONSISTENT_REGISTER_MATCH macros to check register types more + thoroughly. Check for illegal suffix/operand combinations + when matching insns with operands. Handle new `s' suffix, and + associated FloatMF opcode modifier for float insns with memory + operands. + * config/tc-i386.h (FloatMF): Define new opcode modifier. + (No_sSuf, No_bSuf, No_wSuf, No_lSuf): Likewise. + (SHORT_OPCODE_SUFFIX, LONG_OPCODE_SUFFIX): Define. + * config/tc-i386.c: Rename WORD_PREFIX_OPCODE to + DATA_PREFIX_OPCODE throughout. + + * config/tc-i386.c (REGISTER_WARNINGS): Define. + (md_assemble): Rewrite suffix/register operand checking code to be + more thorough. Remove Abs8,16,32. Change occurrences of Mem to + AnyMem, the better to grep. + (pi): Remove Abs. + (i386_operand): Don't set Mem bits in i.types[this_operand] when + given a memory operand. Don't set Abs bits either. + (type_names): Remove Mem*, Abs*. + * config/tc-i386.h (Mem8, Mem16, Mem32, Abs8, Abs16, Abs32): Don't + define opcode_modifiers as these cases are handled by Disp8, + Disp16, Disp32 and suffix checks. + (COMES_IN_BOTH_DIRECTIONS): Remove. + (FloatR): Define. It's OK to share the bit with ReverseRegRegmem. + + * config/tc-i386.c (md_assemble): Don't emit operand size prefix + if IgnoreDataSize modifier given. Remove ShortformW modifier + test. Add test for ShortForm in W base_opcode modification. + Merge Seg2ShortForm and Seg3ShortForm code. + * config/tc-i386.h (ShortFormW): Remove. + (IgnoreDataSize): Define. + +Fri Jun 5 10:50:53 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (md_assemble): Store previous segment state + with previous instruction. + +Wed Jun 3 18:21:56 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (SCALE1_WHEN_NO_INDEX): Define. + (ebp, esp): Remove static variables. + (MATCH): Remove test for InOutPortReg. + (i386_operand): Properly handle InOutPortReg here instead. + Disallows `inb (%dx,2)', `inb %es:(%dx)' and `mov (%dx),%ax' + (md_assemble): Simplify and correct modrm and sib generation. + (i386_operand): Add warning for scale without index. + Rewrite checks for valid base/index combinations. + + * config/tc-i386.c (END_STRING_AND_SAVE): Protect arguments of + macros and enclose in do while(0). + (RESTORE_END_STRING): Likewise. + (md_assemble): Add one to printed operand number so we start + from 1 not 0. Add some more gettext invocations. + (i386_operand): Fix `%%s' -> `%%%s'. Inc printed operand + number here too. + + * config/tc-i386.h (WAIT_PREFIX, LOCKREP_PREFIX, ADDR_PREFIX, + DATA_PREFIX, SEG_PREFIX): Define. + * config/tc-i386.c (struct _i386_insn): Remove wait_prefix field. + (check_prefix): Remove function. + (add_prefix): New function. Add prefix to i.prefix as well as + doing checks. + (md_assemble): Changes for add_prefix. Remove hack for wait + prefix, instead always output prefixes in fixed order. Test + for jcxz/loop when selecting between word & dword operations, + and add address size prefix rather than operand size prefix. + Remove operand -> address size hack when emitting jcxz/loop. + (i386_operand): Remove O_Absent check as it's done in expr. + +Wed Jun 3 15:09:10 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Recognize m5200 as a cpu_type of m68k. + * aclocal.m4: Rebuild with current libtool. + * configure: Rebuild. + +Wed Jun 3 14:11:59 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * config/tc-m68k.c (md_estimate_size_before_relax): Add more calls + to relaxable_symbol to prevent references to external symbol from + being relaxed. + +Wed Jun 3 14:10:36 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-m68k.c (relaxable_symbol): If TARGET_OS is "elf", all + symbols are relaxable. + +Wed Jun 3 09:16:00 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-v850.c (md_begin): Don't create special + sections by default. + +Tue Jun 2 14:52:56 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (macro): For div and udiv, close the + reorder block as soon as possible. + +Tue Jun 2 15:36:13 1998 Ian Lance Taylor <ian@cygnus.com> + + From Matt Semersky <matts@scd.hp.com>: + * macro.c (macro_mri_mode): New function. + * macro.h (macro_mri_mode): Declare. + * read.c (s_mri): Call macro_mri_mode when switching in and out of + MRI mode. + +Tue Jun 2 13:32:22 1998 Klaus Kaempf <kkaempf@progis.de> + + * config/tc-alpha.c (s_alpha_comm): Allow alignment parameter in + OBJ_EVAX case. + + * config/tc-alpha.c (s_alpha_comm): Defer restoring character + until after xstrdup in OBJ_EVAX case. + +Tue Jun 2 13:11:13 1998 Pat Rankin <rankin@eql.caltech.edu> + + * config/tc-vax.c (md_create_short_jump): Fix off by two bug in + offset calculation. Also, use VAX_BRW from vax-inst.h instead + of hardcoded magic number. + (md_create_long_jump): Use VAX_JMP and VAX_ABSOLUTE_MODE macros. + +Tue Jun 2 09:25:34 1998 Doug Evans <devans@canuck.cygnus.com> + + * read.c (do_s_func): New function. + (s_func): Call it. + * read.h (do_s_func): Add prototype. + +Mon Jun 1 12:47:30 1998 Doug Evans <devans@canuck.cygnus.com> + + * config/tc-m32r.c (m32r_do_align): Only fill code sections with + nops if fill pattern not specified. + +Mon Jun 1 14:08:35 1998 Ian Lance Taylor <ian@cygnus.com> + + From Andrew Crabtree <andrewc@typhoon.rose.hp.com>: + * config/te-go32.h (TE_GO32): Define. + * config/tc-i386.h (LOCAL_LABEL): Don't define if TE_GO32. + +Sun May 31 15:43:06 1998 Doug Evans <devans@canuck.cygnus.com> + + Implement .func/.endfunc pseudo-ops. + * read.h (stabs_generate_asm_func,stabs_generate_asm_endfunc): Declare. + (s_func): Declare. + * read.c (potable): Add .func,.endfunc. + (s_func): New function. + * stabs.c (stabs_generate_asm_func,stabs_generate_asm_endfunc): New + functions. + (in_doc_func_p,current_function_label): New static globals. + (stabs_generate_asm_lineno): Emit function relative stabs if in .func. + +Fri May 29 18:13:12 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-a29k.h (WORKING_DOT_WORD): Define. + * config/tc-alpha.h (WORKING_DOT_WORD): Define. + * config/tc-arm.h (WORKING_DOT_WORD): Define. + * config/tc-h8300.h (WORKING_DOT_WORD): Define. + * config/tc-h8500.h (WORKING_DOT_WORD): Define. + * config/tc-hppa.h (WORKING_DOT_WORD): Define. + * config/tc-i860.h (WORKING_DOT_WORD): Define. + * config/tc-i960.h (WORKING_DOT_WORD): Define. + * config/tc-tic30.h (WORKING_DOT_WORD): Define. + * config/tc-w65.h (WORKING_DOT_WORD): Define. + * config/tc-z8k.h (WORKING_DOT_WORD): Define. + * config/tc-a29k.c: Don't define md_short_jump_size, + md_long_jump_size, md_create_short_jump or md_create_long_jump. + * config/tc-alpha.c: Likewise. + * config/tc-alpha.h: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-h8300.c: Likewise. + * config/tc-h8500.c: Likewise. + * config/tc-hppa.c: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-sparc.h: Likewise. + * config/tc-tic30.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. + +Fri May 29 16:03:26 1998 Pat Rankin <rankin@eql.caltech.edu> + + * config/tc-vax.c (_): Delete this macro used for placeholder + values in vax_operand_width_size; it conflicts with the _() macro + used for internationalization. + +Fri May 29 13:46:07 1998 Ian Lance Taylor <ian@cygnus.com> + + * symbols.c (symbol_find_base): Fix case insensitive symbol name + code. From Chris Moller <moller@bops.com>. + + Based on patch from Klaus Kaempf <kkaempf@progis.de>: + * struc-symbol.h (struct broken_word): Add seg and subseg fields. + * read.c (emit_expr): Initialize seg and subseg fields of a new + broken word. + * write.c (write_object_file): Switch to the appropriate segment + and subsegment when processing a broken word. + + * config/tc-m68k.c (mri_assemble): New static function. + (build_mri_control_operand): Call mri_assemble rather than + md_assemble. + (s_mri_else, s_mri_break, s_mri_next, s_mri_for): Likewise. + (s_mri_endf, s_mri_endw): Likewise. + +Wed May 27 11:16:25 1998 Ian Lance Taylor <ian@cygnus.com> + + * read.c (s_org): Call md_flush_pending_output if it is defined. + + * config/tc-sparc.c (md_show_usage): Add \n\ to new string. + +Tue May 26 19:27:52 1998 Stan Cox <scox@equinox.cygnus.com> + + * config/tc-sparc.c (OPTION_LITTLE_ENDIAN_DATA): New. + (md_parse_option): Add for same. + (sparc_md_end): Set bfd_mach_sparc_sparclite_le. + (md_apply_fix3, tc_gen_reloc): Allow BFD_RELOC_SPARC_32LE. + (cons_fix_new_sparc): Added to create BFD_RELOC_SPARC_32LE. + + * config/tc-sparc.h (cons_fix_new_sparc): Added. + +Thu May 21 15:02:41 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (find_real_start): Relax definition of local + labels. + +Tue May 19 16:59:44 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-d30v.c (d30v_align): Apply address adjustment to all + symbols at the given address, not just the last one specified. + +Tue May 19 08:25:19 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-sparc.c (sparc_handle_align): Use number_to_chars_bigendian + or number_to_chars_littleendian to write data. + +Mon May 18 17:09:30 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (md_assemble): Remove artificially created + register name symbols. + +Mon May 18 13:47:06 1998 Doug Evans <devans@canuck.cygnus.com> + + * write.c (fixup_segment): Change "segment" to "section" in + error message. + +Mon May 18 16:55:40 1998 Michael Meissner <meissner@cygnus.com> + + * write.c (fixup_segment): Change sym1-sym2 message again. + +Mon May 18 09:31:43 1998 Michael Meissner <meissner@cygnus.com> + + * write.c (fixup_segment): Improve error message for sym1-sym2 + errors when sym1 is in a different segment from sym2. + +Wed May 13 10:16:37 1998 Doug Evans <devans@canuck.cygnus.com> + + * config/tc-m32r.c (warn_unmatched_high): New static local. + (OPTION_WARN_PARALLEL): Rename from OPTION_WARN. + (OPTION_NO_WARN_PARALLEL): Rename from OPTION_NO_WARN. + (md_longopts): Recognize --{no-,}warn-unmatched-high. + (md_parse_option): Likewise. + (md_show_usage): Likewise. + (m32r_frob_file): Likewise. + + * read.c (generate_file_debug,generate_lineno_debug): New functions. + (read_a_source_file): Call them. + * read.h (stabs_generate_asm_file): Declare. + * stabs.c (stabs_generate_asm_file): New function. + (generate_asm_file): New function. + (stabs_generate_asm_lineno): Move file name handling into + generate_asm_file. + +Tue May 12 12:03:44 1998 Richard Henderson <rth@cygnus.com> + + * config/tc-d30v.c (cur_mul32_p, prev_mul32_p): Make static. + (d30v_current_align, d30v_current_align_seg): New variables. + (d30v_last_label): New variable. + (d30v_align, s_d30v_align, s_d30v_text): New functions. + (s_d30v_data, s_d30v_section): Likewise. + (md_pseudo_table): Call them. + (md_begin): Initialize d30v_current_align_seg. + (md_assemble): Call d30v_align when needed by known current alignment. + (d30v_frob_label, d30v_cons_align): New functions. + * config/tc-d30v.h (md_do_align): Remove. + (tc_frob_label): Call d30v_frob_label. + (md_cons_align): New. + + * config/tc-d30v.c (find_format): Convert complex expressions to + expression symbols before processing. Clean up code formatting. + +Sun May 10 22:35:02 1998 Jeffrey A Law (law@cygnus.com) + + * po/Make-in (install-info): New target. + +Thu May 7 15:49:07 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10200.c (md_assemble): Handle "bra" just like "jmp" + instructions. + * config/tc-mn10300.c (md_assemble): Likewise. + +Thu May 7 11:47:22 1998 Doug Evans <devans@canuck.cygnus.com> + + * Makefile.am: Update with `make dep-am'. + (HFILES): Add cgen.h. + (cgen.o): Depend on cgen.h. + * Makefile.in: Regenerate. + + * cgen.c (cgen_md_apply_fix3): Don't pass newline to as_warn_where. + +Thu May 7 13:20:56 1998 Anders Blomdell <anders.blomdell@control.lth.se> + + * gasp.c (grab_label): Permit a label to be a preprocessor + variable by permitting a label to start with a backslash. + +Thu May 7 12:50:33 1998 Frank Ch. Eigler <fche@cygnus.com> + + * config/tc-mips.c (validate_mips_insn): Removed hack + for previously inaccessible bitfields in some INSN_TRAP + instructions. + +Thu May 7 11:13:00 1998 Frank Ch. Eigler <fche@cygnus.com> + + * config/tc-d30v.c (do_assemble): Abort with error message + if opcode operands do not match. + +Thu May 7 09:36:06 1998 Frank Ch. Eigler <fche@cygnus.com> + + * config/tc-mips.c (macro_build, validate_mips_insn): Implement + 'q' operand format for 20-bit "break"/"sdbbp" instructions. + (mips_ip): Truncate overflowed "break" 'c' operand. Implement + similar new 'q' operand. + +Thu May 7 07:47:14 1998 Michael Meissner <meissner@cygnus.com> + + * cgen.c (cgen_asm_finish_insn): Fix typo. + +Thu May 7 02:19:14 1998 Doug Evans <devans@charmed.cygnus.com> + + * cgen.h: New file. + * cgen.c: Include it. + (MAX_FIXUPS): Renamed to CGEN_MAX_FIXUPS. + (cgen_asm_finish_insn): Result is now void. New arg `result'. + All callers updated. + * config/tc-m32r.c: Include cgen.h. + (m23r_insn): New members num_fixups,fixups. + +Wed May 6 16:29:19 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_apply_fix): Slightly rework some code + to avoid compiler warning. + +Wed May 6 15:26:34 1998 Klaus Kaempf <kkaempf@progis.de> + + * makefile.vms: Run dec c with /nodebug. Pass CC value when + calling make. + + * makefile.vms (OBJS): Add ehopt.obj + +Wed May 6 15:11:12 1998 Klaus Kaempf <kkaempf@progis.de> + + * doc/c-vax.texi: Correct and extend vax/vms documentation. + +Wed May 6 11:51:51 1998 Richard Henderson <rth@cygnus.com> + + * config/tc-d30v.c (do_assemble): Accept a new parameter requesting + a short format insn. + (md_assemble): Set it for explicitly packed insns. + +Tue May 5 13:23:13 1998 Nick Clifton <nickc@cygnus.com> + + * config/obj-coff.c (c_symbol_merge): Do not take address of + native fields when performing the memcpy. + +Tue May 5 13:10:41 1998 Gavin Koch <gavin@cygnus.com> + + * config/tc-mips.c (macro,macro2): Implement + M_DMULO_I, M_MULO_I, M_DMULOU_I, and M_MULOU_I. + +Mon May 4 17:49:14 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Changed to keep + relocations against globally visible symbols. + * config/tc-m68k.c (relaxable_symbol): New macro. + (m68k_ip, md_estimate_size_before_relax): Use it. + (tc_m68k_fix_adjustable): Also handle weak symbols. + +Mon May 4 16:12:23 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Keep relocs for all + references to externally visible symbols. + * config/tc-i386.c (md_apply_fix3): When OBJ_ELF, don't add the + values in twice for a PC relative reloc if the symbol is + externally defined. + + * config/tc-sparc.h (tc_fix_adjustable) [OBJ_AOUT]: When PIC, + don't adjust a PC relative reloc against an externally visible + symbol. + * config/tc-sparc.c (md_apply_fix3): When generating a.out PIC, + for a PC relative fixup against an externally visible defined + symbol, arrange to store object file and addend values as though + the symbol were not defined. + (tc_gen_reloc): Likewise. + +Thu Apr 30 13:09:39 1998 Fred Fish <fnf@ninemoons.com> + + * read.c (sizeof_leb128): Referenced externally by write.c so + don't inline. + +Wed Apr 29 15:45:57 1998 Michael Meissner <meissner@cygnus.com> + + * config/tc-m32r.c ({,expand_}debug_sym): New functions to record + and expand a 'debug' symbol associated with the next instruction + that does not cause a short instruction to be filled with a NOP. + (md_pseudo_table): Add support for .debugsym. + (assemble_parallel_insn): Add calls to expand_debug_sym as + appropriate. + (md_assemble): Ditto. + +Tue Apr 28 19:16:26 1998 Tom Tromey <tromey@cygnus.com> + + * as.c (main): Conditionally call setlocale. + * gasp.c (main): Likewise. + * asintl.h: Include <locale.h> if HAVE_LOCALE_H. + (LC_MESSAGES): Now can be defined even when ENABLE_NLS. + +Tue Apr 28 18:33:23 1998 Frank Ch. Eigler <fche@cygnus.com> + + * config/tc-d30v.c (md_show_usage): Correct gettext typo. + +Tue Apr 28 12:16:30 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-hppa.c: Change all calls to bzero to use memset. + (pa_ip): Add cast to avoid warning. + (tc_gen_reloc, md_apply_fix): Likewise. + (pa_find_space_by_number): Likewise. + (hppa_force_relocation): Likewise. + (pa_block): Change i to unsigned int. + * config/obj-som.h (obj_som_copyright): Declare. + +Tue Apr 28 11:35:56 1998 Frank Ch. Eigler <fche@cygnus.com> + + * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno + for line numbers for assembly source. + +Mon Apr 27 15:58:46 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Change version number to 2.9.4 + * configure: Rebuild. + +Mon Apr 27 12:07:33 1998 Doug Evans <devans@seba.cygnus.com> + + * cgen.c (cgen_asm_finish_insn): New arg relax_p. All callers updated. + +Mon Apr 27 15:16:12 1998 Ian Lance Taylor <ian@cygnus.com> + + * ecoff.h: Change symbolS in function declaration to struct + symbol. + +Sun Apr 26 13:44:22 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-sh.c (parse_reg): Add casts to avoid warnings. + (md_convert_frag): Fix i18n typo. + +Sat Apr 25 20:12:02 1998 Richard Henderson <rth@cygnus.com> + + * ecoff.c (ecoff_get_cur_proc_sym): New function. + * ecoff.h: Protoype it. + * config/tc-alpha.c [ELF] (s_alpha_prologue): New function. + [EVAX] (s_alpha_prologue): Delete. + (md_pseudo_table): Update. + +Sat Apr 25 14:00:52 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i960.c (md_assemble): Change bp_error_msg from static + array to local pointer. + (get_args, parse_expr): Add casts to avoid warnings. + +Fri Apr 24 12:47:42 1998 Philippe De Muyter <phdm@macqel.be> + + * read.c (s_set): Cast xmalloc return value to fragS *. + * config/tc-m68k.c (m68k_ip): Function made static to match + previous forward declaration. + (insert_reg, init_regtable, md_convert_frag_1): Likewise. + +Fri Apr 24 09:26:46 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c: Add internationalisation macros to error + strings. + + * config/tc-m32r.c (can_make_parallel): Add internationalisation + macros to error strings. + +Thu Apr 23 19:23:23 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-ppc.c (ppc_fix_adjustable): Correct test of whether a + reloc is in the TOC csect. + (md_apply_fix3): Correct gettext typo. + +Thu Apr 23 14:58:31 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (find_real_start): Ignore symbols starting with + .L - they are local labels and the branches are not really + function calls but rather far jumps. + +Wed Apr 22 15:57:21 1998 Tom Tromey <tromey@cygnus.com> + + * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). + +Wed Apr 22 14:52:36 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i386.c (md_assemble): Print operand number rather than + using ordinal_names. + (i386_operand): Likewise. + +Tue Apr 21 22:34:25 1998 Tom Tromey <tromey@scribbles.cygnus.com> + + * Makefile.am (INTLLIBS): Define to work around apparent automake + bug. + All Makefiles: Regenerated. + + * Many files: Added gettext invocations around user-visible + strings. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, + HAVE_LC_MESSAGES): Define. + * dep-in.sed: Added asintl.h. + * po/Make-in: New file. + * gasp.c (main): Call setlocale, bindtextdomain, and textdomain. + Include "asintl.h". + * read.c (Z_): Renamed from `_'. + * Makefile.am (SUBDIRS): Added po. + (POTFILES): new macro. + (po/POTFILES.in): New target. + ($(OBJS)): Added asintl.h. + (HFILES): Likewise. + (INCLUDES): Added -DLOCALEDIR, -I$(top_srcdir)/../intl. + (as_new_LDADD): Added $(INTLLIBS). + (as_new_DEPENDENCIES): Added $(INTLDEPS). + (gasp_new_LDADD): Added $(INTLLIBS). + (gasp_new_DEPENDENCIES): New macro. + * configure, aclocal.m4: Rebuilt. + * configure.in: Call CY_GNU_GETTEXT. Generate po/Makefile.in and + po/Makefile. + (ALL_LINGUAS): Define. + * macro.c: Include "asintl.h". + * as.c (main): Call setlocale, bindtextdomain, and textdomain. + * as.h: Include "asintl.h". + * config/tc-i386.c (ordinal_names): Removed. + (md_assemble): Changed error text to avoid ordinal_names. + (i386_operand): Likewise. + (reloc): Added as_bad to avoid i18n problems. + (tc_gen_reloc): Likewise. + * config/tc-arm.c (bad_args): Now a #define. + (bad_pc): Likewise. + * config/obj-vms.c (VMS_stab_parse): Changed type of + `long_const_msg'. + (global_symbol_directory): Unified strings to avoid i18n + problems. + * config/tc-m68k.c (get_reloc_code): Added some as_bad calls to + avoid i18n problems. + * config/tc-ns32k.c (reloc): Added as_bad to avoid i18n problems. + * config/tc-ppc.c (md_apply_fix3): Added as_bad_where to avoid + i18n problems. + * config/tc-sh.c (md_convert_frag): Added as_bad to avoid i18n + problems. + * config/tc-v850.c (md_assemble): Changed C++ comment into C + comment. + * config/tc-vax.c (md_assemble): Added as_warn to avoid i18n + problems. + * as.c (print_version_id): Added an fprintf to avoid i18n + problems. + * cond.c (cond_finish_check): Added as_bad call to avoid i18n + problems. + * expr.c (expr): Added as_warn call to avoid i18n problems. + * messages.c (as_assert): Changed code to avoid i18n problems. + (as_abort): Likewise. + * read.c (pseudo_set): Added as_bad call to avoid i18n problems. + (s_space): Likewise. + * po/Make-in, po/POTFILES.in, po/gas.pot: New files. + +Tue Apr 21 17:01:22 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (check_prefix): New static function, split out + from md_assemble. + (struct _i386_insn): Add wait_prefix field. + (md_assemble): Remove wait_prefix local variable. Use + check_prefix when adding a prefix. + + * config/tc-i386.c (current_templates): New static variable. + (md_assemble): Remove current_templates local variable. + (md_assemble, i386_operand): Improve error and warning messages in + many places. Add RESTORE_END_STRING in many places before error + return. Clarify some comments. + + * config/tc-i386.c (struct _i386_insn): Change seg field to a two + element array. + (md_assemble): Parse string instruction operands, looking for + segment override prefixes. Check for invalid segment prefixes on + string instruction. + (i386_operand): i.seg[] and max mem_operand changes for string + insns. + * config/tc-i386.h (EsSeg): Define. + + * config/tc-i386.h (regKludge): Define. + (iclrKludge, imulKludge): Don't define. + * config/tc-i386.c (md_assemble): Merge imulKludge and iclrKludge + code. Move ReverseRegRegmem fudges into Modrm case. Reorder + opcode_modifier checks to look for more common cases first. Add + default_seg for IsString case. + +Tue Apr 21 16:18:12 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Call AM_PROG_LEX rather than AC_PROG_LEX and + AC_DECL_YYTEXT. + * configure: Rebuild with new automake and libtool. + * aclocal.m4, Makefile.in: Likewise. + + * doc/Makefile.am (as.dvi): New target. + * doc/Makefile.in: Rebuild. + +Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com> + + * configure.in: Added sparc86x support. + + * configure: Rebuild. + + * config/tc-sparc.c (lookup_arch): Added arch_type to struct + sparc_arch. + (md_parse_option): Warn if -EL is not supported for this architecture. + + * config/tc-sparc.h (SPARC_BIENDIAN) Always define. + +Sat Apr 18 01:19:01 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (mips_ip): Note when we use get match on + the full instruction name. + +Wed Apr 15 15:17:27 1998 Richard Henderson <rth@cygnus.com> + + * symbols.c (resolve_symbol_value) [O_symbol]: Also store the symbol + back into the expression to handle add/sub simplification correctly. + +Wed Apr 15 07:06:04 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-mips.c (hilo_interlocks): Remove 4300. + +Mon Apr 13 16:51:04 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (do_msr): Support undocumented 'msr cpsr_flg, + #<n>' instruction. + +Thu Apr 9 10:29:42 1998 Doug Evans <devans@canuck.cygnus.com> + + * symbols.c (max_indent_level): New global. + (print_symbol_value_1): Use it. + * expr.h (expr_build_dot): Declare. + * expr.c (expr_build_dot): New function. + +Wed Apr 8 16:16:11 1998 Doug Evans <devans@canuck.cygnus.com> + + * symbols.c (print_binary): New function. + (print_expr_1): Call it. + +Mon Apr 6 12:06:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * config/tc-m68k.c (m68k_ip, case "#B"): Install the offset of the + operand in the opcode. + +Fri Apr 3 11:58:19 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.h: Reorder operand flags and opcode modifier + flags for clarity. Remove unused definitions: Unknown, + ImmUnknown, DispUnknown, NoModrm. + * config/tc-i386.c (type_names): Add missing Debug type. + (md_assemble): Better duplicate prefix checking. Quicker string + instruction check via new opcode_modifier flag. + +Fri Apr 3 11:44:34 1998 Ian Lance Taylor <ian@cygnus.com> + + * doc/as.texinfo (Invoking): Clarify -Wa example. + +Fri Apr 3 09:12:23 1998 Gavin Koch <gavin@cetus.cygnus.com> + + * config/tc-mips.c (mips_pseudo_table): Add weakext entry. + (s_mips_weakext): Define. + * ecoff.c (ecoff_directive_weakext): Don't define if defined(TC_MIPS). + * config/obj-ecoff.c (obj_pseudo_table): Don't add weakext if + defined(TC_MIPS). + +Thu Apr 2 22:42:02 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10200.c (tc_gen_reloc): The difference of two symbols + is an error if the value can not be computed at assembly time. + * config/tc-mn10300.c (tc_gen-reloc): Likewise. + +Thu Apr 2 16:36:47 1998 Ian Lance Taylor <ian@cygnus.com> + + * gasp.c (main): Set next field of new include_path structure to + NULL. From Avery Pennarun <averyp@gdc.ca>. + + * read.c (s_mri_sect): Call as_bad rather than abort for an + unsupported MRI target. + +Wed Apr 1 11:08:27 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (arm_validate_fix): New function. Determine if + the destination of a branch instruction should be altered. + (find_real_start): New function: Locate the real, Thumb coded + start of a Thumb function. + (do_t_branch23): Alter the destination of branches to Thumb + functions. + + * config/tc-arm.h: Define TC_VALIDATE_FIX. + +Tue Mar 31 13:27:33 1998 Dean M. Deaver <deaver@amt.tay1.dec.com> + + * config/tc-arm.c (decode_shift): Handle addressing mode 2 w/rrx + also. + +Wed Apr 1 13:13:20 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * doc/as.texinfo: Use @itemx for a secondary item in a table. + * doc/c-hppa.texi: Likewise. + +Tue Mar 31 17:52:40 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am: Rebuild dependencies. + * Makefile.in: Rebuild. + + * Makefile.am (DEP_INCLUDES): New variable. + (.dep1): Change to work when srcdir is not an absolute path. + (.tcdep, .objdep, .dep2, dep.sed): Likewise. + * Makefile.in: Rebuild. + +Mon Mar 30 12:46:48 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i386.h, config/tc-i386.c: Revert March 24 + LinearAddress patch. + + * configure.in: Set version to 2.9.1. + * configure: Rebuild. + + * Branched binutils 2.9. + +Mon Mar 30 11:22:08 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.h (FWait): Define. + * config/tc-i386.c (md_assemble): Emit fwait prefix before any + other prefixes. Check FWait flag in opcode table to see which + instructions require an fwait prefix. + +Mon Mar 30 10:12:00 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * stabs.c (get_stab_string_offset): Always create a stab string + section. + +Sat Mar 28 22:28:02 1998 Ian Lance Taylor <ian@cygnus.com> + + Fix some gcc -Wall warnings: + * atof-generic.c (atof_generic): Add casts to avoid warnings. + * ehopt.c (eh_frame_code_alignment): Likewise. + * expr.c (integer_constant, operand): Likewise. + * frags.c (frag_align): Likewise. + * gasp.c (level_0, change_base, doinstr): Likewise. + * hash.c (hash_ask): Likewise. + * listing.c (listing_page, calc_hex, print_lines): Likewise. + (debugging_pseudo): Likewise. + * macro.c (define_macro, check_macro): Likewise. + * read.c (read_a_source_file, s_align, s_float_space): Likewise. + (ignore_rest_of_line, float_cons): Likewise. + * symbols.c (decode_local_label_name): Likewise. + * write.c (record_alignment, cvs_frag_to_fill): Likewise. + (fixup_segment, number_to_chars_bigendian): Likewise. + (number_to_chars_littleendian): Likewise. + * config/atof-ieee.c (gen_to_words): Likewise. + * config/tc-sparc.c (md_begin, md_assemble): Likewise. + (sparc_ip, parse_keyword_arg, s_common): Likewise. + * read.c (output_big_sleb128): Initialize locals to avoid + warnings. + (output_big_uleb128, equals): Likewise. + * atof-generic.c (atof_generic): Change number_of_digits_* locals + to unsigned int. Change zeros to unsigned int. + * cond.c (s_if): Add return to default case. + * frags.c (frag_now_fix): Change return type to addressT. + * frags.h (frag_now_fix): Update declaration. + * listing.c (file_info_struct): Change linenum to unsigned int. + (struct list_info_struct): Change hll_line to unsigned int. + (print_source): Update format string. + * read.c (emit_expr): Change scan to unsigned int, and don't + bother to initialize it. + * symbols.c (dollar_label_count): Change to unsigned long. + * write.c (adjust_reloc_syms): Remove unused label reduce_fixup. + * config/tc-sparc.c (sparc_memory_model): Only define if OBJ_ELF. + * config/tc-sparc.c (tc_gen_reloc): Add return to default case. + +Fri Mar 27 12:46:47 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-m68k.c (m68k_ip): Check legal addressing modes for + mcf5200 just as we do for m68000. + (m68k_init_after_args): Likewise. + (md_estimate_size_before_relax): Likewise. + +Fri Mar 27 10:30:01 1998 Catherine Moore <clm@cygnus.com> + + * config/tc-v850.c (md_assemble): Store relocation addend in + fixup instead of instruction. + +Thu Mar 26 23:07:18 1998 Alan Modra <alan@spri.levels.unisa.edu.au> + + * config/tc-i386.c (md_assemble): Swap template arguments to + CONSISTENT_REGISTER_MATCH macro in reverse direction test. + This macro is currently symmetric, so passing them the wrong + way didn't cause any problem, but may if the macro is changed + in the future. + After copying template to i.tm, use i.tm. rather than t-> to + access fields, and make t a const* + Move i.tm.operand_types[] swap to immediately after the copy. + +Wed Mar 25 13:44:18 1998 Doug Evans <devans@canuck.cygnus.com> + + * expr.h (expr_build_uconstant): Add prototype. + (expr_build_unary,expr_build_binary): Add prototypes. + * expr.c (expr_build_uconstant): New function. + (expr_build_unary,expr_build_binary): New functions. + +Wed Mar 25 13:10:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de> + + * gasp.c (IS*): Cast argument to unsigned char, not unsigned int. + * macro.c (macro_expand_body): Increase buffer size. + * messages.c (as_warn): Likewise. + (as_warn_where, as_bad, as_bad_where): Likewise. + +Wed Mar 25 12:59:07 1998 Ian Lance Taylor <ian@cygnus.com> + + Based on patch from H.J. Lu <hjl@gnu.org>: + * Makefile.am (DISTSTUFF): New variable. + (diststuff): New target. + * Makefile.in: Rebuild. + +Tue Mar 24 16:51:29 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.h (md_cleanup, md_elf_section_change_hook): Call + m32r_elf_section_change_hook. + + * config/tc-m32r.c (m32r_elf_section_change_hook): New function to + emit a nop if a section ends with a 16 bit instruction. + +Tue Mar 24 19:48:09 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/obj-coff.c (obj_coff_bss): Compile unconditionally. Call + s_lcomm rather than obj_coff_lcomm. + (obj_pseudo_table): Compile .bss pseudo-op unconditionally. + +Tue Mar 24 18:30:58 1998 H.J. Lu <hjl@gnu.org> + + * config/tc-i386.h (LinearAddress): Define. + * config/tc-i386.c (md_assemble): If LinearAddress is set for the + instruction, don't use a default segment. + +Mon Mar 23 18:53:40 1998 Joel Sherrill <joel@OARcorp.com> + + * configure.in: (sh*-*-rtems*): Switched from ELF to COFF. + * configure: Rebuild. + +Fri Mar 20 19:15:44 1998 Ian Lance Taylor <ian@cygnus.com> + + * aclocal.m4, configure: Rebuild with libtool 1.2. + +Thu Mar 19 16:03:12 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-arm.c (md_apply_fix3): fix code to test the range of + PC relative branches. Patch courtesy of Jonathan Walton. + + +Wed Mar 18 09:29:51 1998 Nick Clifton <nickc@cygnus.com> + + * configure.in (emulations): Add thumb-pe target. + + * configure (emulations): Add thumb-pe target. + +1998-03-17 Ken Raeburn <raeburn@cygnus.com> + + * itbl-lex.l (yywrap): Don't define if already defined as a + macro. + +Fri Mar 13 16:31:38 1998 Tom Tromey <tromey@cygnus.com> + + * depend.c (quote_string_for_make): New function. + (wrap_output): Use it. + +Thu Mar 12 18:28:22 1998 Nick Clifton <nickc@cygnus.com> + + * config/obj-elf.c (obj_elf_section): Set bss flag in seg_info + structure if type is SHT_NOBITS. [Bug fix courtesy of rth] + +Sat Feb 28 17:28:55 1998 Richard Henderson <rth@cygnus.com> + + * config/tc-alpha.c (md_shortopts, md_longopts, md_parse_option): + Recognize -GN and -relax. + (md_begin): Initialize gp size from -G switch. + (alpha_force_relocation): Always force if -relax. + (alpha_align): Take a new argument that will specify when to + emit an R_ALPHA_ALIGN relocation (though we don't do that now). + Change all callers. Emit nop alignment padding as nop+unop pair. + +Sat Feb 28 17:06:22 1998 Richard Henderson <rth@cygnus.com> + + * config/obj-elf.c [TC_ALPHA]: Include <elf/alpha.h>. + * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): New. + +Thu Feb 26 15:49:04 1998 Michael Meissner <meissner@cygnus.com> + + * config/tc-d30v.c (write_2_short): Delayed jsr instructions don't + require padding to the next long word boundary. + +Mon Feb 23 11:29:06 1998 Doug Evans <devans@seba.cygnus.com> + + * cgen.c: #include symcat.h. + * config/tc-m32r.c: Likewise. + +Mon Feb 23 10:27:40 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (mips_ip, case 'P'): Make 'P' arguments be + absolute expressions instead of '$' prefixed register names. + +Sat Feb 21 22:36:52 1998 Richard Henderson <rth@cygnus.com> + + * read.c (s_set): Record file and line info for symbols when -as. + (pseudo_set): Don't overwrite that dummy fragment. + +Fri Feb 20 15:03:13 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-ppc.c (md_pseudo_table): Add "section". + (ppc_named_section): New static function. + +Thu Feb 19 22:25:42 1998 Richard Henderson <rth@cygnus.com> + + * tc-ppc.c (ppc_biei): Cache the last symbol we inserted + so we don't have to scan the entire list. + +Tue Feb 17 17:02:15 1998 Fred Fish <fnf@cygnus.com> + + * config/tc-d30v.c (parallel_ok): For the explicitly parallel + case, allow the parallel instructions to modify the same flag + bits. + +Thu Feb 19 16:08:15 1998 Richard Henderson <rth@cygnus.com> + + * listing.c (list_symbol_table): Categorize symbols by + undefined_section rather than sy_frag->line == NULL. + +Wed Feb 18 23:39:46 1998 Richard Henderson <rth@cygnus.com> + + * Makefile.am (install-exec-local): Install properly when ln + fails or tooldir == prefix. + +Tue Feb 17 18:58:51 1998 Doug Evans <devans@seba.cygnus.com> + + * cgen.c (cgen_md_apply_fix3): Delete call to validate_operand. + Test result of insert_operand for error. + +Fri Feb 13 16:41:42 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am (AUTOMAKE_OPTIONS): Add cygnus. + * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. + * doc/Makefile.am (AUTOMAKE_OPTIONS): Define. + * doc/Makefile.in: Rebuild. + +Fri Feb 13 00:47:44 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-mips.c (macro_build): Handle operand type 'C'. + (macro): Fix handling of M_COP[0-3]. + +Thu Feb 12 14:06:59 1998 Ian Lance Taylor <ian@cygnus.com> + + Based on patches from Ross Harvey <ross@teraflop.com>: + * macro.c (ISSEP): Only treat '<' and '>' as separator characters + if macro_alternate or macro_mri. + (getstring): Remove support for byte constants between < and >. + (get_any_string): '<' only starts a string if macro_alternate or + macro_mri. + (macro_expand_body): Permit keyword parameters following + positional parameters. + + NetBSD patches from Gordon W. Ross <gwr@mc.com>: + * configure.in (alpha*-*-netbsd*): New target. + * config/te-nbsd.h (LOCAL_LABELS_FB): Define. + * configure: Rebuild. + + * as.h (flag_warn_suppress_instructionswap): Move from here... + * config/tc-d10v.c (flag_warn_suppress_instructionswap): ...to + here, and make static. + + * ehopt.c (eh_frame_code_alignment): Only use seg_info if + BFD_ASSEMBLER or MANY_SEGMENTS. + + * as.c (show_usage): Update bug-gnu-utils address. + * gasp.c (show_usage): Likewise. + * doc/as.texinfo (Bug Reporting): Likewise. + +Wed Feb 11 23:26:28 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (load_address): Don't use mips III or mips IV + insns regardless of the size of a pointer if we're in mips I or + MIPS II mode. + (macro, macro2, s_cprestore, s_cpadd): Likewise. + +Thu Feb 12 03:41:00 1998 J"orn Rennecke <amylaar@cygnus.co.uk> + + Fix rac to accept only a0: + * tc-d10v.c (parallel_ok, find_opcode): + Split OPERAND_ACC into OPERAND_ACC0 and OPERAND_ACC1. + Introduce OPERAND_GPR. + +Wed Feb 11 16:28:13 1998 Richard Henderson <rth@cygnus.com> + + * read.c (s_fill): Handle non-constant repeat counts by creating + an rs_space fragment. + +Tue Feb 10 18:31:31 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i386.c (i386_operand): Change error added Jan 2 1998 + from as_bad to as_warn. + +Tue Feb 10 18:04:00 1998 Jim Lemke <jlemke@cygnus.com> + + * as.c: (perform_an_assembly_pass): Use [TEXT|DATA|BSS]_SECTION_NAME + * as.h: Define default values of [TEXT|DATA|BSS]_SECTION_NAME + * config/obj-elf.c (elf_begin): Use [TEXT|DATA|BSS]_SECTION_NAME + +Tue Feb 10 17:58:18 1998 Ian Lance Taylor <ian@cygnus.com> + + * ehopt.c (eh_frame_code_alignment): If not BFD_ASSEMBLER, use + seg_fix_rotP rather than fix_root from seg_info. + +Tue Feb 10 15:32:22 1998 Ian Carmichael <iancarm@cygnus.com> + + * expr.c: Add support for 0x1_2_3_4 bignums. + +Tue Feb 10 14:43:40 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Change -linux* to -linux-gnu*. + * configure: Rebuild. + + * app.c (do_scrub_begin): Treat \r as whitespace. + +Mon Feb 9 14:16:11 1998 Ian Lance Taylor <ian@cygnus.com> + + * Makefile.am: Update dependencies. + * Makefile.in: Rebuild. + +Sat Feb 7 15:33:51 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure, aclocal.m4: Rebuild with new libtool. + +Fri Feb 6 16:08:30 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (md_begin): If mips_cpu is set, then use it as + the argument to bfd_set_arch_mach. + (load_address): Use bfd_arch_bits_per_address to determine the + bit size of an address instead of looking at the isa level. + (macro, macro2, s_cprestore, s_cpadd): Likewise. + +Fri Feb 6 14:44:34 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (md_parse_option): Add -mv850any command line option. + +Thu Feb 5 12:39:08 1998 Ian Lance Taylor <ian@cygnus.com> + + * ehopt.c: New file. + * as.h (enum _relax_state): Add rs_cfa. + (check_eh_frame, eh_frame_estimate_size_before_relax): Declare. + (eh_frame_relax_frag, eh_frame_convert_frag): Declare. + * read.c (emit_expr): Call check_eh_frame. + * write.c (cvt_frag_to_fill): Handle rs_cfa. + (relax_segment): Likewise. + * Makefile.am: Rebuild dependencies. + (GAS_CFILES): Add ehopt.c. + (GENERIC_OBJS): Add ehopt.o. + * doc/internals.texi (Frags): Document rs_cfa. + + * as.c (show_usage): Mention --traditional-format. + (parse_args): Accept --traditional-format. + * as.h (flag_traditional_format): Declare. + * output-file.c (output_file_create): If flag_traditional_format, + set BFD_TRADITIONAL_FORMAT on stdoutput. + * doc/as.texinfo, doc/as.1: Document --traditional-format. + + * config/tc-mips.c (append_insn): Make sure that if we have a + fixup for an unmatched %hi reloc, it does not associated with a + variant frag. + + * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. + * doc/Makefile.in: Likewise. + +Wed Feb 4 15:41:54 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c (check_for_side_effects): New function. + (can_make_parallel): Add checks for instruction side effects + clashing with the other instruction. + (assemble_parallel_insn): Improve warning messages. Return error + message from non-swapped instruction order. + +Wed Feb 4 20:00:26 1998 James G. Smith <jsmith@teknema.demon.co.uk> + + * config/tc-arm.c: Rename arm_after_pass_hook() to arm_cleanup(). + + * config/tc-arm.h: Replace md_after_pass_hook definition with a + md_cleanup definition. This moves the forced literal output to + the end of the source pass, and avoids macro's inserting literals + into the code immediately after the macro expansion. + +Wed Feb 4 13:17:19 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: A reloc against + a gas internal symbol is adjustable. + * config/tc-ppc.h (tc_fix_adjustable): Likewise. + + * as.h: If gcc version greater than 2.6, use `__format__' and + `__printf__' in function attributes, rather than `format' and + `printf'. + +Mon Feb 2 18:38:18 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-sparc.c: Only include elf/sparc.h if OBJ_ELF. + +Mon Feb 2 18:30:34 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU> + + Add tms320c30 support: + * config/tc-tic30.h: New file. + * config/tc-tic30.c: New file. + * config/obj-coff.h: If TC_TIC30, include coff/tic30.h and define + TARGET_FORMAT as "coff-tic30". + * configure.in (tic30-*-*aout*, tic30-*-*coff*): New targets. + * Makefile.am: Rebuild dependencies. + (CPU_TYPES): Add tic30. + (CPU_OBJ_VALID): tic30-aout is valid. + (TARGET_CPU_CFILES): Add config/tc-tic30.c. + (TARGET_CPU_HFILES): Add config/tc-tic30.h. + * configure, Makefile.in: Rebuild. + +Mon Feb 2 10:20:37 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (md_assemble): Improvements to error messages. + +Mon Feb 2 12:39:05 1998 Geoff Keating <geoffk@ozemail.com.au> + + * config/tc-ppc.c (md_apply_fix3): Change BFD_RELOC_HI16 and + BFD_RELOC_HI16_S to store the high bits of any value. + + * config/tc-ppc.h (tc_fix_adjustable): Undo change of Fri Jun 27. + (TC_RELOC_RTSYM_LOC_FIXUP): Don't let the + assembler calculate relocations to any external symbol at all. + * config/tc-ppc.c (md_apply_fix3) [OBJ_ELF]: Correct bugs + involving generation of pc-relative relocs. + (md_pcrel_from_section) [OBJ_ELF]: The job this code used to do + has been moved to md_apply_fix3. + + * config/tc-ppc.c (md_apply_fix3): Fix test for too-far branch. + (ppc_elf_suffix): Warn about 'identifier+constant@got' syntax, + which actually means (the address of identifier's GOT entry) + + constant, which is not particularly useful. + +Fri Jan 30 11:02:35 1998 Doug Evans <devans@canuck.cygnus.com> + + * read.h (include_dirs): Declare. + (include_dir_count,include_dir_maxlen): Declare. + +Fri Jan 30 11:47:02 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Correct check for shared opcodes library. + * configure: Rebuild. + + * listing.c (buffer_line): If we can't open the file, set at_end. + (listing_print): Remove unused local variable fi. + + * config/m68k-parse.y (reglistpair): Handle register list in + either order. + + * config/vms-conf.h: Don't undef VERSION. + +Thu Jan 29 14:42:44 1998 Pat Rankin <rankin@eql.caltech.edu> + + * Makefile.am (CONFIG_OBJS): New variable, containing part of old + OBJS variable. + (GENERIC_OBJS): New variable, with the rest of the old OBJS + variable. + (OBJS): Now just $(CONFIG_OBJS) and $(GENERIC_OBJS). + ($(srcdir)/make-gas.com): Rename from make-gas.com. + (stamp-mk.com): Replace $(OBJS) with $(GENERIC_OBJS). + (EXTRA_DIST): Define. + * vmsconf.sh: Handle {targ-cpu, obj-format, atof-targ} modules + explicitly rather than via the list of object files. + (gcc-as.opt): New file created when make-gas.com is run. + * config-gas.com: Create {targ-cpu.h, obj-format.h, targ-env.h, + itbl-cpu.h} to #include appropriate file rather than copying that + file. + * config/vms-conf.h: Synchronize with current config.in. + * Makefile.in: Rebuild. + +Thu Jan 29 18:48:19 1998 Bill Moyer <billm@cygnus.com> + + * config/tc-d30v.c (do_assemble): Added flag_explicitly_parallel. + (parallel_ok): Relaxed parallel subinstruction dependency check. + +Wed Jan 28 14:35:00 1998 Bill Moyer <billm@cygnus.com> + + * as.h (flag_warn_suppress_instructionswap): added new flag. + * tc-d10v.c (md_parse_option,md_longopts): added "--nowarnswap" + command line argument. + * tc-d10v.c (write_2_short): emit "Swapping instructions" + warning only if flag_warn_suppress_instructionswap is false. + +Wed Jan 28 16:41:19 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> + + * configure.in (i386-*-mingw32*): New target. + * configure: Rebuild. + +Wed Jan 28 14:51:18 1998 Ian Lance Taylor <ian@cygnus.com> + + * symbols.c (resolve_symbol_value): Don't set the segment if it + hasn't changed, and this is OBJ_AOUT without BFD_ASSEMBLER. + + * config/obj-aout.h (S_IS_LOCAL): Correct typo--pass argument to + S_GET_SEGMENT. + +Wed Jan 28 13:54:50 1998 Pat Rankin <rankin@eql.caltech.edu> + + as.h (unlink): Reverse 13-Feb-97 change; use of unlink vs remove + depends upon HAVE_{UNLINK,REMOVE} values rather than host + compiler. + +Wed Jan 28 13:48:08 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/obj-coff.h (RESOLVE_SYMBOL_REDEFINITION): Define. + +Wed Jan 28 09:52:00 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c (v850_insert_operand): Display instruction when + an error is encountered. + +Tue Jan 27 13:32:01 1998 Robert Lipe <robertl@dgii.com> + + * configure.in (i386-*-sco3.2v5*): Defaults to ELF now. + (i386-*-sco3.2v5*coff): New target. + (i386-*-sco3.2*): New target. + * configure: Rebuild. + +Tue Jan 27 11:06:52 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-v850.c: Tidy error message production. + +Tue Jan 27 12:24:32 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-arm.c (md_apply_fix3): Add new variable newimm to hold + validate_immediate return value in the right type for comparisons + to FAIL. + +Tue Jan 27 06:51:59 1998 Richard Henderson <rth@cygnus.com> + + * listing.c (MAX_BYTES): Use listing variables not constants. + (data_buffer): No longer an array, but a pointer. + (calc_hex): sizeof(data_buffer) -> MAX_BYTES. + (listing_listing): Allocate data_buffer. + +Tue Jan 27 06:38:35 1998 Richard Henderson <rth@cygnus.com> + + * as.c (parse_args): Add --listing-lhs-width, --listing-lhs-width2, + --listing-rhs-width, --listing-cont-lines. + (show_usage): Update. + * listing.c (listing_lhs_width, listing_lhs_width_second): New vars. + (listing_lhs_cont_lines, listing_rhs_width): New vars. + (print_lines): Use the variables instead of the constants. + (listing_listing): Likewise. + * listing.h: Declare the new vars. + +Tue Jan 27 05:32:05 1998 Richard Henderson <rth@cygnus.com> + + * as.c (parse_args): Add --keep-locals alias for -L. + Add --strip-local-absolute. + (show_usage): Update. + * as.h (flag_strip_local_absolute): New flag. + * symbols.c (S_IS_LOCAL): Use it. + * config/obj-aout.h (S_IS_LOCAL): Likewise. + * config/obj-bout.h (S_IS_LOCAL): Likewise. + * config/obj-coff.h (S_IS_LOCAL): Likewise. + +Mon Jan 26 13:07:41 1998 Nick Clifton <nickc@cygnus.com> + + * config/tc-m32r.c: Detect if explicitly parallel instructions + might have an io conflict and issue a warning message. + +Thu Jan 22 17:51:44 1998 Nick Clifton <nickc@cygnus.com> + + * cgen.c (cgen_save_fixups, cgen_restore_fixups, + cgen_swap_fixups): Functions to save, restore and swap the fixup + chain with a backup copy. + (cgen_asm_finish_insn): Returns address of constructed insn. + +Wed Jan 21 16:49:10 1998 Richard Henderson <rth@cygnus.com> + + * listing.c (file_info_struct): Remove FILE, add POS. + (last_open_file_info, last_open_file): New; a one entry FILE* cache. + (file_info): Don't open the file. + (buffer_line): Check for the file in the last_open cache, updating + as necessary. + (print_source): Don't reference file_info->file. + (listing_listing): Likewise. + (listing_print): Close the file in the cache, if any. + +Fri Jan 16 14:51:48 1998 Ian Lance Taylor <ian@cygnus.com> + + * read.c (dwarf_file_string): New file static variable. + (emit_expr): Look for constant sequence that leads up to a file + name in DWARF debugging output. + (stringer): Use dwarf_file_string to decide whether to accept a + string as a file name. + +Fri Jan 16 11:30:37 1998 Richard Henderson <rth@cygnus.com> + + * tc-m68k.c (m68k_ip): Remove absl->reglst MRI hack. + (crack_operand): Add reg->reglst MRI hack. + (r_seg): Put reglst symbols in reg_section. + (m68k_frob_symbol): Frob reglst symbols into absolute_section. + +Thu Jan 15 14:19:01 1998 Richard Henderson <rth@cygnus.com> + + * tc-sh.c (get_specific): Handle SGR & DBR. + +Thu Jan 15 13:46:48 1998 Richard Henderson <rth@cygnus.com> + + * tc-h8300.c (parse_reg): Take the length of the symbol into + account when attempting to match a register name. + * tc-h8500.c (parse_reg): Likewise. + +Wed Jan 14 17:52:33 1998 Nick Clifton <nickc@cygnus.com> + + * cgen.c: Formatting changes to improve readability. + +Wed Jan 14 15:41:41 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (macro): Rework division code to avoid unfilled + delay slot. + +Wed Jan 14 18:04:20 1998 Michael Meissner <meissner@cygnus.com> + + Based on a patch from Jim Wilson + * config/tc-d30v.c (do_assemble): Remove non-ansi default case. + (tc_gen_reloc): Handle cross section PC relative relocs + correctly. + +Wed Jan 14 15:02:19 1998 Doug Evans <devans@seba.cygnus.com> + + * config/tc-mips.c (mips_ip): Don't test pinfo flags if INSN_MACRO. + +Mon Jan 12 13:04:57 1998 Doug Evans <devans@seba.cygnus.com> + + * cgen.c: #include setjmp.h. Clean up pass over `struct foo' usage. + (expr_jmp_buf): New static local. + (cgen_parse_operand): Allow use of longjmp in parsing to handle errors. + (cgen_md_operand): New function. + * tc-m32r.c: Clean up pass over `struct foo' usage. + (md_estimate_size_before_relax): Use CGEN_INSN_MNEMONIC. + +Tue Jan 6 15:36:02 1998 Richard Henderson <rth@cygnus.com> + + * symbols.c (S_SET_SEGMENT): Don't set the segment for section syms. + (S_IS_EXTERNAL, S_IS_LOCAL): Correct parenthetication. + +Fri Jan 2 16:08:54 1998 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-i386.c (i386_operand): Give an error if there are + unrecognized characters after an expression. + +For older changes see ChangeLog-9697 diff --git a/contrib/binutils/gas/MAINTAINERS b/contrib/binutils/gas/MAINTAINERS new file mode 100644 index 0000000..d59a3bd --- /dev/null +++ b/contrib/binutils/gas/MAINTAINERS @@ -0,0 +1 @@ +See ../binutils/MAINTAINERS diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am index 49b52f7..47b6253 100644 --- a/contrib/binutils/gas/Makefile.am +++ b/contrib/binutils/gas/Makefile.am @@ -12,6 +12,9 @@ tooldir = $(exec_prefix)/$(target_alias) YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi` LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi` +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + MKDEP = gcc -MM TARG_CPU = @target_cpu_type@ @@ -39,17 +42,20 @@ CPU_TYPES = \ arc \ arm \ avr \ + cris \ d10v \ d30v \ fr30 \ h8300 \ h8500 \ hppa \ + ia64 \ i370 \ i386 \ i860 \ i960 \ m32r \ + m68hc11 \ m68k \ m88k \ mcore \ @@ -63,6 +69,7 @@ CPU_TYPES = \ sparc \ tahoe \ tic30 \ + tic54x \ tic80 \ vax \ w65 \ @@ -93,14 +100,18 @@ CPU_OBJ_VALID = \ case $$o in \ aout) \ case $$c in \ - a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \ + a29k | arm | cris | i386 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \ valid=yes ;; \ esac ;; \ bout) \ case $$c in \ i960) valid=yes ;; \ esac ;; \ - coff) valid=yes ;; \ + coff) valid=yes; \ + case $$c in \ + cris | i860) \ + valid= ;; \ + esac ;; \ ecoff) \ case $$c in \ mips | alpha) valid=yes ;; \ @@ -122,16 +133,19 @@ CPU_OBJ_VALID = \ # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case. -MULTI_CPU_TYPES = i386 mips +MULTI_CPU_TYPES = i386 mips cris MULTI_CPU_OBJ_VALID = \ valid= ; \ case $$o in \ aout) \ case $$c in \ - i386) valid=yes ;; \ + i386 | cris) valid=yes ;; \ + esac ;; \ + coff) \ + case $$c in \ + i386 | mips) valid=yes ;; \ esac ;; \ - coff) valid=yes ;; \ ecoff) \ case $$c in \ mips) valid=yes ;; \ @@ -209,17 +223,20 @@ TARGET_CPU_CFILES = \ config/tc-arc.c \ config/tc-arm.c \ config/tc-avr.c \ + config/tc-cris.c \ config/tc-d10v.c \ config/tc-d30v.c \ config/tc-fr30.c \ config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ + config/tc-ia64.c \ config/tc-i370.c \ config/tc-i386.c \ config/tc-i860.c \ config/tc-i960.c \ config/tc-m32r.c \ + config/tc-m68hc11.c \ config/tc-m68k.c \ config/tc-m88k.c \ config/tc-mcore.c \ @@ -233,6 +250,7 @@ TARGET_CPU_CFILES = \ config/tc-sparc.c \ config/tc-tahoe.c \ config/tc-tic30.c \ + config/tc-tic54x.c \ config/tc-tic80.c \ config/tc-vax.c \ config/tc-w65.c \ @@ -245,17 +263,20 @@ TARGET_CPU_HFILES = \ config/tc-arc.h \ config/tc-arm.h \ config/tc-avr.h \ + config/tc-cris.h \ config/tc-d10v.h \ config/tc-d30v.h \ config/tc-fr30.h \ config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ + config/tc-ia64.h \ config/tc-i370.h \ config/tc-i386.h \ config/tc-i860.h \ config/tc-i960.h \ config/tc-m32r.h \ + config/tc-m68hc11.h \ config/tc-m68k.h \ config/tc-m88k.h \ config/tc-mcore.h \ @@ -269,6 +290,7 @@ TARGET_CPU_HFILES = \ config/tc-sparc.h \ config/tc-tahoe.h \ config/tc-tic30.h \ + config/tc-tic54x.h \ config/tc-tic80.h \ config/tc-vax.h \ config/tc-w65.h \ @@ -322,7 +344,6 @@ TARG_ENV_HFILES = \ config/te-lynx.h \ config/te-mach.h \ config/te-macos.h \ - config/te-multi.h \ config/te-nbsd.h \ config/te-nbsd532.h \ config/te-pc532mach.h \ @@ -338,6 +359,8 @@ TARG_ENV_HFILES = \ # Multi files in config MULTI_CFILES = \ + config/e-crisaout.c \ + config/e-criself.c \ config/e-i386aout.c \ config/e-i386coff.c \ config/e-i386elf.c \ @@ -437,15 +460,16 @@ $(OBJS): @ALL_OBJ_DEPS@ as_new_SOURCES = $(GAS_CFILES) as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ - $(extra_objects) $(GASLIBS) $(INTLLIBS) + $(extra_objects) $(GASLIBS) $(INTLLIBS) $(LIBM) as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ $(extra_objects) $(GASLIBS) $(INTLDEPS) # Stuff that every object file depends upon. If anything is removed # from this list, remove it from dep-in.sed as well. -$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \ - expr.h write.h frags.h hash.h read.h symbols.h tc.h \ - obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h asintl.h +$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \ + $(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \ + as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \ + frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h gasp_new_SOURCES = gasp.c macro.c sb.c hash.c gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS) @@ -485,7 +509,7 @@ check-DEJAGNU: site.exp # The implicit .c.o rule doesn't work for these, perhaps because of # the variables, or perhaps because the sources are not on vpath. -$(TARG_CPU_O): $(TARG_CPU_C) $(TARG_CPU_DEP_@target_cpu_type@) +$(TARG_CPU_O): $(TARG_CPU_C) $(COMPILE) -c $(TARG_CPU_C) $(ATOF_TARG_O): $(ATOF_TARG_C) $(COMPILE) -c $(ATOF_TARG_C) @@ -532,6 +556,10 @@ e-i386coff.o: $(srcdir)/config/e-i386coff.c $(COMPILE) -c $(srcdir)/config/e-i386coff.c e-i386elf.o: $(srcdir)/config/e-i386elf.c $(COMPILE) -c $(srcdir)/config/e-i386elf.c +e-crisaout.o: $(srcdir)/config/e-crisaout.c + $(COMPILE) -c $(srcdir)/config/e-crisaout.c +e-criself.o: $(srcdir)/config/e-criself.c + $(COMPILE) -c $(srcdir)/config/e-criself.c # The m68k operand parser. @@ -604,7 +632,7 @@ MOSTLYCLEANFILES = $(STAGESTUFF) core stamp-mk.com \ testsuite/*.o testsuite/*.out testsuite/gas.log testsuite/gas.sum \ testsuite/site.exp site.bak site.exp stage stage1 stage2 -CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2a DEP1 DEPA DEP DEPDIR +CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2A DEP1 DEPA DEP DEPDIR .PHONY: install-exec-local install-data-local .PHONY: install-exec-bindir install-exec-tooldir @@ -708,27 +736,36 @@ de-stage3: - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..) - rmdir stage3 -# Automatic dependency computation. This is a real pain, because the -# dependencies change based on target_cpu_type and obj_format. We -# currently ignore any dependencies caused by emulation files. - DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \ $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) +# Automatic dependency computation. This is a real pain, because the +# dependencies change based on target_cpu_type and obj_format. +# Just to make things even more complicated, automake separates the +# dependency variable assignments from the dependency rules, and tacks +# on a .NOEXPORT at the end of Makefile.in. + DEP: dep.sed $(DEP_FILE_DEPS) DEPTC DEPOBJ DEP2 - rm -f DEP1 + rm -f DEP1 # delete because we use $? in DEP1 rule srcdir=`cd $(srcdir); pwd`; \ $(MAKE) MKDEP="$(MKDEP)" srcdir="$${srcdir}" VPATH="$${srcdir}" DEP1 rm -rf DEPDIR - sed -f dep.sed < DEP1 > DEPA + echo 'AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' > DEPA sed -f dep.sed < DEPTC >> DEPA sed -f dep.sed < DEPOBJ >> DEPA sed -f dep.sed < DEP2 >> DEPA + echo 'BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA + echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' >> DEPA + sed -f dep.sed < DEP1 >> DEPA echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> DEPA echo '$$(TARG_CPU_O): $$(DEPTC_@target''_cpu_type@_@obj''_format@)' >> DEPA echo '$$(OBJ_FORMAT_O): $$(DEPOBJ_@target''_cpu_type@_@obj''_format@)' >> DEPA - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA - mv -f DEPA $@ + echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) $(MULTI_CFILES) if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi @@ -739,9 +776,7 @@ DEP1: $(CFILES) $(MULTI_CFILES) echo '' > targ-env.h; \ echo '' > itbl-cpu.h; \ echo '' > itbl-parse.h; \ - echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP; \ - echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP; \ - $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? >> DEP + $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? > DEP mv -f DEPDIR/DEP $@ # Work out the special dependencies for the tc-*.c files. @@ -772,7 +807,7 @@ DEPTC: $(TARGET_CPU_CFILES) echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPTCA echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> DEPTCA for c in $(MULTI_CPU_TYPES); do \ - echo 'DEPTC_'"$${c}"'_multi = \' >> DEPTCA; \ + echo "DEPTC_$${c}"'_multi = \' >> DEPTCA; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -811,7 +846,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> DEPOBJA echo ' $$(INCDIR)/aout/stab.def' >> DEPOBJA for c in $(MULTI_CPU_TYPES); do \ - echo 'DEPOBJ_'"$${c}"'_multi = \' >> DEPOBJA; \ + echo "DEPOBJ_$${c}"'_multi = \' >> DEPOBJA; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -825,7 +860,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) # Work out the dependencies for each CPU/OBJ combination. # Note that SOM is a special case, because it only works native. DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES) - rm -f DEP2a + rm -f DEP2A if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi srcdir=`cd $(srcdir); pwd`; \ cd DEPDIR; \ @@ -836,22 +871,22 @@ DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES) echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \ echo '#include "obj-'"$${o}"'.h"' > dummy.c; \ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \ - sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2a; \ + sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2A; \ else true; fi; \ done; \ done - echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2a + echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2A for c in $(MULTI_CPU_TYPES); do \ - echo 'DEP_'"$${c}"'_multi = \' >> DEP2a; \ + echo "DEP_$${c}"'_multi = \' >> DEP2A; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ - echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2a; \ + echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2A; \ else true; fi; \ done; \ - echo '' >> DEP2a; \ + echo '' >> DEP2A; \ done - mv -f DEP2a DEP2 + mv -f DEP2A DEP2 dep.sed: dep-in.sed config.status srcdir=`cd $(srcdir); pwd`; \ @@ -861,444 +896,379 @@ dep.sed: dep-in.sed config.status -e "s!@SRCDIR@!$${srcdir}!" dep: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < Makefile > tmp-Makefile cat DEP >> tmp-Makefile $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile dep-in: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < $(srcdir)/Makefile.in > tmp-Makefile.in cat DEP >> tmp-Makefile.in $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in dep-am: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < $(srcdir)/Makefile.am > tmp-Makefile.am cat DEP >> tmp-Makefile.am $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am +# HEED THE MKDEP WARNINGS. +# ANYTHING CHANGED OR ADDED BETWEEN THE WARNING LINES MAY GO AWAY. .PHONY: dep dep-in dep-am -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -app.o: app.c $(INCDIR)/bin-bugs.h emul.h -as.o: as.c $(INCDIR)/bin-bugs.h emul.h subsegs.h $(INCDIR)/obstack.h \ - output-file.h sb.h macro.h -atof-generic.o: atof-generic.c $(INCDIR)/bin-bugs.h \ - emul.h -bignum-copy.o: bignum-copy.c $(INCDIR)/bin-bugs.h emul.h -cond.o: cond.c $(INCDIR)/bin-bugs.h emul.h macro.h \ - sb.h $(INCDIR)/obstack.h -depend.o: depend.c $(INCDIR)/bin-bugs.h emul.h -dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/bin-bugs.h emul.h \ - dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h -ecoff.o: ecoff.c $(INCDIR)/bin-bugs.h emul.h ecoff.h -ehopt.o: ehopt.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h -expr.o: expr.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h -flonum-copy.o: flonum-copy.c $(INCDIR)/bin-bugs.h emul.h -flonum-konst.o: flonum-konst.c -flonum-mult.o: flonum-mult.c -frags.o: frags.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -hash.o: hash.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h -input-file.o: input-file.c $(INCDIR)/bin-bugs.h emul.h \ - input-file.h -input-scrub.o: input-scrub.c $(INCDIR)/bin-bugs.h emul.h \ - input-file.h sb.h -listing.o: listing.c $(INCDIR)/bin-bugs.h emul.h input-file.h \ - subsegs.h -literal.o: literal.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -macro.o: macro.c sb.h macro.h -messages.o: messages.c $(INCDIR)/bin-bugs.h emul.h -output-file.o: output-file.c $(INCDIR)/bin-bugs.h emul.h \ - output-file.h -read.o: read.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h sb.h macro.h ecoff.h -sb.o: sb.c sb.h -stabs.o: stabs.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \ - subsegs.h ecoff.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def -subsegs.o: subsegs.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -symbols.o: symbols.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \ - subsegs.h struc-symbol.h -write.o: write.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h output-file.h -gasp.o: gasp.c $(INCDIR)/bin-bugs.h sb.h macro.h -itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/bin-bugs.h \ - emul.h itbl-parse.h -e-i386aout.o: $(srcdir)/config/e-i386aout.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-i386coff.o: $(srcdir)/config/e-i386coff.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-i386elf.o: $(srcdir)/config/e-i386elf.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-mipself.o: $(srcdir)/config/e-mipself.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -DEPTC_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/a29k.h -DEPTC_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/a29k.h -DEPTC_a29k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \ - emul.h $(INCDIR)/opcode/a29k.h -DEPTC_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h \ - $(srcdir)/config/atof-vax.c -DEPTC_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \ - struc-symbol.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c -DEPTC_alpha_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \ - emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ +AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW. +DEPTC_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h +DEPTC_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h +DEPTC_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h $(INCDIR)/opcode/a29k.h +DEPTC_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \ + $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c +DEPTC_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/alpha.h \ $(srcdir)/config/atof-vax.c -DEPTC_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \ - $(srcdir)/config/tc-alpha.h emul.h subsegs.h $(INCDIR)/obstack.h \ - struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c -DEPTC_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \ - $(INCDIR)/elf/reloc-macros.h -DEPTC_arc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ +DEPTC_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \ + $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/atof-vax.c +DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \ + $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c +DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h -DEPTC_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h -DEPTC_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h -DEPTC_arm_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h \ +DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \ $(INCDIR)/elf/reloc-macros.h -DEPTC_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -DEPTC_avr_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \ - emul.h subsegs.h $(INCDIR)/obstack.h -DEPTC_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h +DEPTC_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h +DEPTC_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ + dwarf2dbg.h +DEPTC_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h +DEPTC_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h +DEPTC_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/cris.h dwarf2dbg.h +DEPTC_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h dwarf2dbg.h +DEPTC_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \ + $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h +DEPTC_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h \ $(INCDIR)/elf/reloc-macros.h -DEPTC_d10v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h -DEPTC_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h +DEPTC_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h -DEPTC_d30v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h -DEPTC_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \ + cgen.h +DEPTC_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \ cgen.h -DEPTC_fr30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \ - $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \ - $(srcdir)/../opcodes/fr30-opc.h cgen.h -DEPTC_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h -DEPTC_h8300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h -DEPTC_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h -DEPTC_h8500_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h -DEPTC_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/libbfd.h \ - $(INCDIR)/opcode/hppa.h -DEPTC_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h -DEPTC_i370_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \ - emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ - $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h -DEPTC_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h -DEPTC_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h -DEPTC_i386_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h -DEPTC_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/i860.h -DEPTC_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/i860.h -DEPTC_i860_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \ - emul.h $(INCDIR)/opcode/i860.h -DEPTC_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \ - $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h \ +DEPTC_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h +DEPTC_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h +DEPTC_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h +DEPTC_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h +DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h +DEPTC_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \ + dwarf2dbg.h +DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h +DEPTC_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h dwarf2dbg.h \ + subsegs.h $(INCDIR)/obstack.h +DEPTC_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h +DEPTC_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \ + $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h \ + $(INCDIR)/elf/i370.h +DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + dwarf2dbg.h $(INCDIR)/opcode/i386.h +DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \ + $(INCDIR)/opcode/i386.h +DEPTC_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \ + $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/i386.h +DEPTC_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h \ + $(INCDIR)/elf/reloc-macros.h +DEPTC_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h +DEPTC_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h +DEPTC_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/i960.h -DEPTC_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h -DEPTC_i960_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h -DEPTC_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \ + cgen.h +DEPTC_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \ cgen.h -DEPTC_m32r_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \ - $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \ - $(srcdir)/../opcodes/m32r-opc.h cgen.h -DEPTC_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ +DEPTC_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h \ + dwarf2dbg.h +DEPTC_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h +DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h +DEPTC_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ $(srcdir)/config/m68k-parse.h -DEPTC_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ +DEPTC_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \ + $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h +DEPTC_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \ + $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ $(srcdir)/config/m68k-parse.h -DEPTC_m68k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ - $(srcdir)/config/m68k-parse.h $(INCDIR)/elf/m68k.h \ - $(INCDIR)/elf/reloc-macros.h -DEPTC_m68k_hp300 = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-hp300.h \ - $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h -DEPTC_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h -DEPTC_m88k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h -DEPTC_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h -DEPTC_mcore_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \ +DEPTC_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h +DEPTC_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h +DEPTC_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h +DEPTC_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h -DEPTC_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ +DEPTC_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h +DEPTC_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ +DEPTC_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h +DEPTC_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h itbl-ops.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h \ - $(INCDIR)/elf/reloc-macros.h -DEPTC_mips_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ - itbl-ops.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h +DEPTC_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h -DEPTC_mn10200_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h -DEPTC_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h -DEPTC_mn10300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h -DEPTC_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h -DEPTC_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/ns32k.h \ +DEPTC_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h \ + dwarf2dbg.h +DEPTC_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h dwarf2dbg.h +DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \ $(INCDIR)/obstack.h -DEPTC_ns32k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \ - emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h -DEPTC_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/pj.h -DEPTC_pj_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \ - emul.h $(INCDIR)/opcode/pj.h -DEPTC_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h -DEPTC_ppc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h -DEPTC_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h -DEPTC_sh_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h -DEPTC_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h -DEPTC_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h -DEPTC_sparc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h \ - $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h -DEPTC_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ +DEPTC_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h +DEPTC_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h $(INCDIR)/opcode/ns32k.h \ + $(INCDIR)/obstack.h +DEPTC_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/pj.h +DEPTC_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h $(INCDIR)/opcode/pj.h +DEPTC_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h +DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \ + $(INCDIR)/elf/reloc-macros.h +DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ + struc-symbol.h dwarf2dbg.h +DEPTC_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h struc-symbol.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h +DEPTC_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/sparc.h +DEPTC_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h +DEPTC_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h +DEPTC_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h -DEPTC_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \ - emul.h $(INCDIR)/opcode/tic30.h -DEPTC_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic80.h -DEPTC_tic80_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \ - emul.h $(INCDIR)/opcode/tic80.h -DEPTC_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/vax.h -DEPTC_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(srcdir)/config/vax-inst.h \ +DEPTC_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h +DEPTC_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/tahoe.h +DEPTC_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h +DEPTC_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h +DEPTC_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h $(INCDIR)/opcode/tic30.h +DEPTC_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sb.h macro.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/tic54x.h +DEPTC_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h sb.h \ + macro.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ + $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h +DEPTC_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic80.h +DEPTC_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h $(INCDIR)/opcode/tic80.h +DEPTC_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_vax_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \ - emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/vax.h -DEPTC_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def emul.h $(srcdir)/config/vax-inst.h \ +DEPTC_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h +DEPTC_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h $(srcdir)/config/vax-inst.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h -DEPTC_w65_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h -DEPTC_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h -DEPTC_v850_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ +DEPTC_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h +DEPTC_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h +DEPTC_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h +DEPTC_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ + dwarf2dbg.h +DEPTC_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h dwarf2dbg.h +DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-elf.h \ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h -DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h emul.h -DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(srcdir)/config/tc-z8k.h emul.h + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \ $(BFDDIR)/som.h @@ -1306,332 +1276,323 @@ DEPTC_i386_multi = $(DEPTC_i386_aout) $(DEPTC_i386_coff) \ $(DEPTC_i386_elf) DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \ $(DEPTC_mips_elf) -DEPOBJ_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_a29k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h -DEPOBJ_alpha_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \ - emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/aout/aout64.h -DEPOBJ_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \ - $(srcdir)/config/tc-alpha.h emul.h -DEPOBJ_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_arc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_arm_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_avr_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_d10v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_d30v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_fr30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_h8300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_h8500_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_i370_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h \ +DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf) +DEPOBJ_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(BFDDIR)/libecoff.h +DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \ + $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/aout/aout64.h -DEPOBJ_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i386_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_i860_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \ - $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h -DEPOBJ_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i960_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_m32r_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ +DEPOBJ_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h +DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h +DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/obstack.h +DEPOBJ_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m68k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/obstack.h -DEPOBJ_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m88k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mcore_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h -DEPOBJ_mips_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \ - emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ +DEPOBJ_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(BFDDIR)/libecoff.h +DEPOBJ_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \ + $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h +DEPOBJ_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/aout/aout64.h -DEPOBJ_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_mn10200_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_mn10300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_ns32k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_pj_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_ppc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h -DEPOBJ_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sh_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sparc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_tahoe_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_tic30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_tic80_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_vax_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def emul.h subsegs.h $(INCDIR)/obstack.h -DEPOBJ_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_w65_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ +DEPOBJ_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ subsegs.h -DEPOBJ_v850_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_z8k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_z8k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def subsegs.h \ + $(INCDIR)/obstack.h +DEPOBJ_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_z8k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def @@ -1639,6 +1600,7 @@ DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \ $(DEPOBJ_i386_elf) DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \ $(DEPOBJ_mips_elf) +DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf) DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h DEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ @@ -1673,6 +1635,11 @@ DEP_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ DEP_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h +DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h +DEP_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h DEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ @@ -1702,6 +1669,15 @@ DEP_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h DEP_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h +DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ @@ -1715,10 +1691,6 @@ DEP_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ DEP_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h -DEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h -DEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \ - $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h @@ -1734,6 +1706,12 @@ DEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ DEP_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h +DEP_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h +DEP_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h DEP_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ @@ -1823,6 +1801,12 @@ DEP_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ DEP_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h +DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -1860,7 +1844,52 @@ DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \ $(DEP_i386_elf) DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \ $(DEP_mips_elf) +DEP_cris_multi = $(DEP_cris_aout) $(DEP_cris_elf) +BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE. +#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW. +app.o: app.c +as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \ + sb.h macro.h +atof-generic.o: atof-generic.c +bignum-copy.o: bignum-copy.c +cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h +depend.o: depend.c +dwarf2dbg.o: dwarf2dbg.c dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/elf/dwarf2.h +ecoff.o: ecoff.c ecoff.h +ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h +expr.o: expr.c $(INCDIR)/obstack.h +flonum-copy.o: flonum-copy.c +flonum-konst.o: flonum-konst.c +flonum-mult.o: flonum-mult.c +frags.o: frags.c subsegs.h $(INCDIR)/obstack.h +hash.o: hash.c $(INCDIR)/obstack.h +input-file.o: input-file.c input-file.h +input-scrub.o: input-scrub.c input-file.h sb.h +listing.o: listing.c input-file.h subsegs.h +literal.o: literal.c subsegs.h $(INCDIR)/obstack.h +macro.o: macro.c sb.h macro.h +messages.o: messages.c +output-file.o: output-file.c output-file.h +read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \ + ecoff.h +sb.o: sb.c sb.h +stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def +subsegs.o: subsegs.c subsegs.h $(INCDIR)/obstack.h +symbols.o: symbols.c $(INCDIR)/obstack.h subsegs.h \ + struc-symbol.h +write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h +gasp.o: gasp.c sb.h macro.h +itbl-ops.o: itbl-ops.c itbl-ops.h +e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h +e-criself.o: $(srcdir)/config/e-criself.c emul-target.h +e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h +e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h +e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h +e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h +e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h $(OBJS): $(DEP_@target_cpu_type@_@obj_format@) $(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@) $(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@) -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY +#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE. diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in index 569b98e..bd1a89e 100644 --- a/contrib/binutils/gas/Makefile.in +++ b/contrib/binutils/gas/Makefile.in @@ -69,9 +69,13 @@ BFDLIB = @BFDLIB@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GDBINIT = @GDBINIT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ @@ -81,6 +85,7 @@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLOBJS = @INTLOBJS@ +LIBM = @LIBM@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAINT = @MAINT@ @@ -88,11 +93,13 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ OPCODES_LIB = @OPCODES_LIB@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ +STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -116,6 +123,9 @@ tooldir = $(exec_prefix)/$(target_alias) YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi` LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi` +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + MKDEP = gcc -MM TARG_CPU = @target_cpu_type@ @@ -143,17 +153,20 @@ CPU_TYPES = \ arc \ arm \ avr \ + cris \ d10v \ d30v \ fr30 \ h8300 \ h8500 \ hppa \ + ia64 \ i370 \ i386 \ i860 \ i960 \ m32r \ + m68hc11 \ m68k \ m88k \ mcore \ @@ -167,6 +180,7 @@ CPU_TYPES = \ sparc \ tahoe \ tic30 \ + tic54x \ tic80 \ vax \ w65 \ @@ -199,14 +213,18 @@ CPU_OBJ_VALID = \ case $$o in \ aout) \ case $$c in \ - a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \ + a29k | arm | cris | i386 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \ valid=yes ;; \ esac ;; \ bout) \ case $$c in \ i960) valid=yes ;; \ esac ;; \ - coff) valid=yes ;; \ + coff) valid=yes; \ + case $$c in \ + cris | i860) \ + valid= ;; \ + esac ;; \ ecoff) \ case $$c in \ mips | alpha) valid=yes ;; \ @@ -229,16 +247,19 @@ CPU_OBJ_VALID = \ # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case. -MULTI_CPU_TYPES = i386 mips +MULTI_CPU_TYPES = i386 mips cris MULTI_CPU_OBJ_VALID = \ valid= ; \ case $$o in \ aout) \ case $$c in \ - i386) valid=yes ;; \ + i386 | cris) valid=yes ;; \ + esac ;; \ + coff) \ + case $$c in \ + i386 | mips) valid=yes ;; \ esac ;; \ - coff) valid=yes ;; \ ecoff) \ case $$c in \ mips) valid=yes ;; \ @@ -319,17 +340,20 @@ TARGET_CPU_CFILES = \ config/tc-arc.c \ config/tc-arm.c \ config/tc-avr.c \ + config/tc-cris.c \ config/tc-d10v.c \ config/tc-d30v.c \ config/tc-fr30.c \ config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ + config/tc-ia64.c \ config/tc-i370.c \ config/tc-i386.c \ config/tc-i860.c \ config/tc-i960.c \ config/tc-m32r.c \ + config/tc-m68hc11.c \ config/tc-m68k.c \ config/tc-m88k.c \ config/tc-mcore.c \ @@ -343,6 +367,7 @@ TARGET_CPU_CFILES = \ config/tc-sparc.c \ config/tc-tahoe.c \ config/tc-tic30.c \ + config/tc-tic54x.c \ config/tc-tic80.c \ config/tc-vax.c \ config/tc-w65.c \ @@ -356,17 +381,20 @@ TARGET_CPU_HFILES = \ config/tc-arc.h \ config/tc-arm.h \ config/tc-avr.h \ + config/tc-cris.h \ config/tc-d10v.h \ config/tc-d30v.h \ config/tc-fr30.h \ config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ + config/tc-ia64.h \ config/tc-i370.h \ config/tc-i386.h \ config/tc-i860.h \ config/tc-i960.h \ config/tc-m32r.h \ + config/tc-m68hc11.h \ config/tc-m68k.h \ config/tc-m88k.h \ config/tc-mcore.h \ @@ -380,6 +408,7 @@ TARGET_CPU_HFILES = \ config/tc-sparc.h \ config/tc-tahoe.h \ config/tc-tic30.h \ + config/tc-tic54x.h \ config/tc-tic80.h \ config/tc-vax.h \ config/tc-w65.h \ @@ -436,7 +465,6 @@ TARG_ENV_HFILES = \ config/te-lynx.h \ config/te-mach.h \ config/te-macos.h \ - config/te-multi.h \ config/te-nbsd.h \ config/te-nbsd532.h \ config/te-pc532mach.h \ @@ -453,6 +481,8 @@ TARG_ENV_HFILES = \ # Multi files in config MULTI_CFILES = \ + config/e-crisaout.c \ + config/e-criself.c \ config/e-i386aout.c \ config/e-i386coff.c \ config/e-i386elf.c \ @@ -544,7 +574,7 @@ STAGESTUFF = *.o $(noinst_PROGRAMS) as_new_SOURCES = $(GAS_CFILES) as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ - $(extra_objects) $(GASLIBS) $(INTLLIBS) + $(extra_objects) $(GASLIBS) $(INTLLIBS) $(LIBM) as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ $(extra_objects) $(GASLIBS) $(INTLDEPS) @@ -586,463 +616,456 @@ MOSTLYCLEANFILES = $(STAGESTUFF) core stamp-mk.com \ testsuite/site.exp site.bak site.exp stage stage1 stage2 -CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2a DEP1 DEPA DEP DEPDIR +CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2A DEP1 DEPA DEP DEPDIR against = stage2 -# Automatic dependency computation. This is a real pain, because the -# dependencies change based on target_cpu_type and obj_format. We -# currently ignore any dependencies caused by emulation files. - DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \ $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) -DEPTC_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/a29k.h -DEPTC_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/a29k.h +AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW. +DEPTC_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h -DEPTC_a29k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \ - emul.h $(INCDIR)/opcode/a29k.h +DEPTC_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h -DEPTC_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h \ - $(srcdir)/config/atof-vax.c +DEPTC_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h $(INCDIR)/opcode/a29k.h -DEPTC_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \ - struc-symbol.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c +DEPTC_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \ + $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c -DEPTC_alpha_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \ - emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ +DEPTC_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/alpha.h \ $(srcdir)/config/atof-vax.c -DEPTC_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \ - $(srcdir)/config/tc-alpha.h emul.h subsegs.h $(INCDIR)/obstack.h \ - struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c +DEPTC_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \ + $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/atof-vax.c + +DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \ + $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c + +DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ + $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h -DEPTC_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \ $(INCDIR)/elf/reloc-macros.h -DEPTC_arc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ - $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h +DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h + +DEPTC_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h -DEPTC_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h +DEPTC_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ + dwarf2dbg.h -DEPTC_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h +DEPTC_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h -DEPTC_arm_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h \ - $(INCDIR)/elf/reloc-macros.h +DEPTC_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h -DEPTC_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h +DEPTC_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/cris.h dwarf2dbg.h -DEPTC_avr_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \ - emul.h subsegs.h $(INCDIR)/obstack.h +DEPTC_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h dwarf2dbg.h -DEPTC_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \ + $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h + +DEPTC_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h \ $(INCDIR)/elf/reloc-macros.h -DEPTC_d10v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h +DEPTC_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h -DEPTC_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h -DEPTC_d30v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h +DEPTC_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \ + cgen.h -DEPTC_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \ cgen.h -DEPTC_fr30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \ - $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \ - $(srcdir)/../opcodes/fr30-opc.h cgen.h +DEPTC_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h -DEPTC_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h +DEPTC_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h -DEPTC_h8300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h +DEPTC_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h -DEPTC_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h +DEPTC_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h -DEPTC_h8500_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h +DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h -DEPTC_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/libbfd.h \ - $(INCDIR)/opcode/hppa.h +DEPTC_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \ + dwarf2dbg.h -DEPTC_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h +DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h -DEPTC_i370_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \ - emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ - $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h +DEPTC_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h dwarf2dbg.h \ + subsegs.h $(INCDIR)/obstack.h -DEPTC_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h +DEPTC_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h -DEPTC_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h +DEPTC_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \ + $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h \ + $(INCDIR)/elf/i370.h -DEPTC_i386_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h +DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + dwarf2dbg.h $(INCDIR)/opcode/i386.h -DEPTC_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/i860.h +DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \ + $(INCDIR)/opcode/i386.h -DEPTC_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/i860.h +DEPTC_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \ + $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/i386.h -DEPTC_i860_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \ - emul.h $(INCDIR)/opcode/i860.h +DEPTC_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h \ + $(INCDIR)/elf/reloc-macros.h -DEPTC_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \ - $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/i960.h +DEPTC_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h -DEPTC_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h +DEPTC_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h -DEPTC_i960_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h +DEPTC_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/i960.h -DEPTC_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \ + cgen.h + +DEPTC_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \ cgen.h -DEPTC_m32r_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \ - $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \ - $(srcdir)/../opcodes/m32r-opc.h cgen.h +DEPTC_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h \ + dwarf2dbg.h -DEPTC_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ - $(srcdir)/config/m68k-parse.h +DEPTC_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h -DEPTC_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ +DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h + +DEPTC_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ $(srcdir)/config/m68k-parse.h -DEPTC_m68k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ - $(srcdir)/config/m68k-parse.h $(INCDIR)/elf/m68k.h \ - $(INCDIR)/elf/reloc-macros.h +DEPTC_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \ + $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h -DEPTC_m68k_hp300 = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-hp300.h \ - $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h +DEPTC_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \ + $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ + $(srcdir)/config/m68k-parse.h -DEPTC_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h +DEPTC_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h -DEPTC_m88k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h +DEPTC_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h -DEPTC_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h +DEPTC_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h -DEPTC_mcore_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \ +DEPTC_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h -DEPTC_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ +DEPTC_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h + +DEPTC_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ +DEPTC_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h + +DEPTC_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h itbl-ops.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h \ - $(INCDIR)/elf/reloc-macros.h - -DEPTC_mips_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ - itbl-ops.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h +DEPTC_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h -DEPTC_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h -DEPTC_mn10200_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h +DEPTC_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h \ + dwarf2dbg.h -DEPTC_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h +DEPTC_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h dwarf2dbg.h -DEPTC_mn10300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h +DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \ + $(INCDIR)/obstack.h -DEPTC_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h +DEPTC_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h -DEPTC_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/ns32k.h \ +DEPTC_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h $(INCDIR)/opcode/ns32k.h \ $(INCDIR)/obstack.h -DEPTC_ns32k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \ - emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h +DEPTC_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/pj.h -DEPTC_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/pj.h +DEPTC_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h $(INCDIR)/opcode/pj.h -DEPTC_pj_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \ - emul.h $(INCDIR)/opcode/pj.h +DEPTC_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h -DEPTC_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h +DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \ + $(INCDIR)/elf/reloc-macros.h -DEPTC_ppc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h +DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ + struc-symbol.h dwarf2dbg.h -DEPTC_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h +DEPTC_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h struc-symbol.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h -DEPTC_sh_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h +DEPTC_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/sparc.h -DEPTC_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h +DEPTC_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h -DEPTC_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h +DEPTC_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h -DEPTC_sparc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h \ - $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h +DEPTC_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h +DEPTC_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ +DEPTC_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h +DEPTC_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic30.h +DEPTC_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic30.h +DEPTC_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \ - emul.h $(INCDIR)/opcode/tic30.h +DEPTC_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sb.h macro.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/tic54x.h -DEPTC_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic80.h +DEPTC_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h sb.h \ + macro.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ + $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h -DEPTC_tic80_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \ - emul.h $(INCDIR)/opcode/tic80.h +DEPTC_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic80.h -DEPTC_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/vax.h +DEPTC_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h $(INCDIR)/opcode/tic80.h -DEPTC_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(srcdir)/config/vax-inst.h \ +DEPTC_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_vax_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \ - emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/vax.h +DEPTC_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def emul.h $(srcdir)/config/vax-inst.h \ +DEPTC_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h $(srcdir)/config/vax-inst.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h +DEPTC_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_w65_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h +DEPTC_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h -DEPTC_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h +DEPTC_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h -DEPTC_v850_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h +DEPTC_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ + dwarf2dbg.h -DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h emul.h +DEPTC_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h dwarf2dbg.h -DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(srcdir)/config/tc-z8k.h emul.h +DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + +DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \ @@ -1054,415 +1077,412 @@ DEPTC_i386_multi = $(DEPTC_i386_aout) $(DEPTC_i386_coff) \ DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \ $(DEPTC_mips_elf) -DEPOBJ_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf) +DEPOBJ_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_a29k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h +DEPOBJ_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(BFDDIR)/libecoff.h -DEPOBJ_alpha_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \ - emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ +DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \ + $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/aout/aout64.h -DEPOBJ_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \ - $(srcdir)/config/tc-alpha.h emul.h +DEPOBJ_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h +DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_arc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h + +DEPOBJ_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_arm_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_avr_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_d10v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_d30v_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_fr30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_h8300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_h8500_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i370_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h \ - $(INCDIR)/aout/aout64.h +DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i386_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h -DEPOBJ_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i860_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \ - $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h +DEPOBJ_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/obstack.h -DEPOBJ_i960_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m32r_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m68k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/aout/aout64.h \ +DEPOBJ_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/obstack.h -DEPOBJ_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m88k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-aout.h \ + $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_mcore_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h +DEPOBJ_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mips_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h \ - emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/aout/aout64.h +DEPOBJ_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mn10200_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(BFDDIR)/libecoff.h -DEPOBJ_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \ + $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h -DEPOBJ_mn10300_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_ns32k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_pj_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_ppc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h +DEPOBJ_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_sh_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/aout/aout64.h -DEPOBJ_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sparc_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_tahoe_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_tic30_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_tic80_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ +DEPOBJ_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ subsegs.h -DEPOBJ_vax_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def emul.h subsegs.h $(INCDIR)/obstack.h +DEPOBJ_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_w65_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_v850_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_z8k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def subsegs.h \ + $(INCDIR)/obstack.h -DEPOBJ_z8k_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h + +DEPOBJ_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + +DEPOBJ_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h + +DEPOBJ_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + +DEPOBJ_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h + +DEPOBJ_z8k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \ @@ -1474,6 +1494,7 @@ DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \ DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \ $(DEPOBJ_mips_elf) +DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf) DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h @@ -1521,6 +1542,13 @@ DEP_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h +DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h + +DEP_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h + DEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h @@ -1561,6 +1589,18 @@ DEP_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ DEP_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h + +DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + +DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h + DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h @@ -1579,12 +1619,6 @@ DEP_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h -DEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h - -DEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \ - $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h - DEP_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h @@ -1605,6 +1639,14 @@ DEP_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h +DEP_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h + +DEP_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h + DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h @@ -1728,6 +1770,14 @@ DEP_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h +DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + +DEP_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h + DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -1779,6 +1829,8 @@ DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \ DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \ $(DEP_mips_elf) +DEP_cris_multi = $(DEP_cris_aout) $(DEP_cris_elf) +BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h @@ -1791,17 +1843,22 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ -itbl_test_OBJECTS = itbl-parse.o itbl-lex.o +itbl_test_OBJECTS = itbl-parse.$(OBJEXT) itbl-lex.$(OBJEXT) itbl_test_DEPENDENCIES = itbl-tops.o itbl-test.o \ ../libiberty/libiberty.a itbl_test_LDFLAGS = -as_new_OBJECTS = app.o as.o atof-generic.o bignum-copy.o cond.o \ -depend.o dwarf2dbg.o ecoff.o ehopt.o expr.o flonum-copy.o \ -flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o \ -listing.o literal.o macro.o messages.o output-file.o read.o sb.o \ -stabs.o subsegs.o symbols.o write.o +as_new_OBJECTS = app.$(OBJEXT) as.$(OBJEXT) atof-generic.$(OBJEXT) \ +bignum-copy.$(OBJEXT) cond.$(OBJEXT) depend.$(OBJEXT) \ +dwarf2dbg.$(OBJEXT) ecoff.$(OBJEXT) ehopt.$(OBJEXT) expr.$(OBJEXT) \ +flonum-copy.$(OBJEXT) flonum-konst.$(OBJEXT) flonum-mult.$(OBJEXT) \ +frags.$(OBJEXT) hash.$(OBJEXT) input-file.$(OBJEXT) \ +input-scrub.$(OBJEXT) listing.$(OBJEXT) literal.$(OBJEXT) \ +macro.$(OBJEXT) messages.$(OBJEXT) output-file.$(OBJEXT) read.$(OBJEXT) \ +sb.$(OBJEXT) stabs.$(OBJEXT) subsegs.$(OBJEXT) symbols.$(OBJEXT) \ +write.$(OBJEXT) as_new_LDFLAGS = -gasp_new_OBJECTS = gasp.o macro.o sb.o hash.o +gasp_new_OBJECTS = gasp.$(OBJEXT) macro.$(OBJEXT) sb.$(OBJEXT) \ +hash.$(OBJEXT) gasp_new_LDFLAGS = SCRIPTS = $(noinst_SCRIPTS) @@ -1820,14 +1877,14 @@ configure configure.in gdbinit.in itbl-lex.c itbl-parse.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(gasp_new_SOURCES) OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS) all: all-redirect .SUFFIXES: -.SUFFIXES: .S .c .l .lo .o .s .y +.SUFFIXES: .S .c .l .lo .o .obj .s .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile @@ -1885,6 +1942,11 @@ maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< +# FIXME: We should only use cygpath when building on Windows, +# and only if it is available. +.c.obj: + $(COMPILE) -c `cygpath -w $<` + .s.o: $(COMPILE) -c $< @@ -1893,6 +1955,7 @@ maintainer-clean-noinstPROGRAMS: mostlyclean-compile: -rm -f *.o core *.core + -rm -f *.$(OBJEXT) clean-compile: @@ -2219,9 +2282,10 @@ $(OBJS): @ALL_OBJ_DEPS@ # Stuff that every object file depends upon. If anything is removed # from this list, remove it from dep-in.sed as well. -$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \ - expr.h write.h frags.h hash.h read.h symbols.h tc.h \ - obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h asintl.h +$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \ + $(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \ + as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \ + frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h check-DEJAGNU: site.exp if [ -d testsuite ]; then \ @@ -2248,7 +2312,7 @@ check-DEJAGNU: site.exp # The implicit .c.o rule doesn't work for these, perhaps because of # the variables, or perhaps because the sources are not on vpath. -$(TARG_CPU_O): $(TARG_CPU_C) $(TARG_CPU_DEP_@target_cpu_type@) +$(TARG_CPU_O): $(TARG_CPU_C) $(COMPILE) -c $(TARG_CPU_C) $(ATOF_TARG_O): $(ATOF_TARG_C) $(COMPILE) -c $(ATOF_TARG_C) @@ -2295,6 +2359,10 @@ e-i386coff.o: $(srcdir)/config/e-i386coff.c $(COMPILE) -c $(srcdir)/config/e-i386coff.c e-i386elf.o: $(srcdir)/config/e-i386elf.c $(COMPILE) -c $(srcdir)/config/e-i386elf.c +e-crisaout.o: $(srcdir)/config/e-crisaout.c + $(COMPILE) -c $(srcdir)/config/e-crisaout.c +e-criself.o: $(srcdir)/config/e-criself.c + $(COMPILE) -c $(srcdir)/config/e-criself.c # If m68k-parse.y is in a different directory, then ylwrap will use an # absolute path when it invokes yacc, which will cause yacc to put the @@ -2447,20 +2515,33 @@ de-stage3: - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..) - rmdir stage3 +# Automatic dependency computation. This is a real pain, because the +# dependencies change based on target_cpu_type and obj_format. +# Just to make things even more complicated, automake separates the +# dependency variable assignments from the dependency rules, and tacks +# on a .NOEXPORT at the end of Makefile.in. + DEP: dep.sed $(DEP_FILE_DEPS) DEPTC DEPOBJ DEP2 - rm -f DEP1 + rm -f DEP1 # delete because we use $? in DEP1 rule srcdir=`cd $(srcdir); pwd`; \ $(MAKE) MKDEP="$(MKDEP)" srcdir="$${srcdir}" VPATH="$${srcdir}" DEP1 rm -rf DEPDIR - sed -f dep.sed < DEP1 > DEPA + echo 'AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' > DEPA sed -f dep.sed < DEPTC >> DEPA sed -f dep.sed < DEPOBJ >> DEPA sed -f dep.sed < DEP2 >> DEPA + echo 'BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA + echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' >> DEPA + sed -f dep.sed < DEP1 >> DEPA echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> DEPA echo '$$(TARG_CPU_O): $$(DEPTC_@target''_cpu_type@_@obj''_format@)' >> DEPA echo '$$(OBJ_FORMAT_O): $$(DEPOBJ_@target''_cpu_type@_@obj''_format@)' >> DEPA - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA - mv -f DEPA $@ + echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) $(MULTI_CFILES) if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi @@ -2471,9 +2552,7 @@ DEP1: $(CFILES) $(MULTI_CFILES) echo '' > targ-env.h; \ echo '' > itbl-cpu.h; \ echo '' > itbl-parse.h; \ - echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP; \ - echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP; \ - $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? >> DEP + $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? > DEP mv -f DEPDIR/DEP $@ # Work out the special dependencies for the tc-*.c files. @@ -2504,7 +2583,7 @@ DEPTC: $(TARGET_CPU_CFILES) echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPTCA echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> DEPTCA for c in $(MULTI_CPU_TYPES); do \ - echo 'DEPTC_'"$${c}"'_multi = \' >> DEPTCA; \ + echo "DEPTC_$${c}"'_multi = \' >> DEPTCA; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -2543,7 +2622,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> DEPOBJA echo ' $$(INCDIR)/aout/stab.def' >> DEPOBJA for c in $(MULTI_CPU_TYPES); do \ - echo 'DEPOBJ_'"$${c}"'_multi = \' >> DEPOBJA; \ + echo "DEPOBJ_$${c}"'_multi = \' >> DEPOBJA; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -2557,7 +2636,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) # Work out the dependencies for each CPU/OBJ combination. # Note that SOM is a special case, because it only works native. DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES) - rm -f DEP2a + rm -f DEP2A if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi srcdir=`cd $(srcdir); pwd`; \ cd DEPDIR; \ @@ -2568,22 +2647,22 @@ DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES) echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \ echo '#include "obj-'"$${o}"'.h"' > dummy.c; \ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \ - sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2a; \ + sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2A; \ else true; fi; \ done; \ done - echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2a + echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2A for c in $(MULTI_CPU_TYPES); do \ - echo 'DEP_'"$${c}"'_multi = \' >> DEP2a; \ + echo "DEP_$${c}"'_multi = \' >> DEP2A; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ - echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2a; \ + echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2A; \ else true; fi; \ done; \ - echo '' >> DEP2a; \ + echo '' >> DEP2A; \ done - mv -f DEP2a DEP2 + mv -f DEP2A DEP2 dep.sed: dep-in.sed config.status srcdir=`cd $(srcdir); pwd`; \ @@ -2593,85 +2672,73 @@ dep.sed: dep-in.sed config.status -e "s!@SRCDIR@!$${srcdir}!" dep: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < Makefile > tmp-Makefile cat DEP >> tmp-Makefile $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile dep-in: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < $(srcdir)/Makefile.in > tmp-Makefile.in cat DEP >> tmp-Makefile.in $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in dep-am: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < $(srcdir)/Makefile.am > tmp-Makefile.am cat DEP >> tmp-Makefile.am $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am +# HEED THE MKDEP WARNINGS. +# ANYTHING CHANGED OR ADDED BETWEEN THE WARNING LINES MAY GO AWAY. .PHONY: dep dep-in dep-am - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -app.o: app.c $(INCDIR)/bin-bugs.h emul.h -as.o: as.c $(INCDIR)/bin-bugs.h emul.h subsegs.h $(INCDIR)/obstack.h \ - output-file.h sb.h macro.h -atof-generic.o: atof-generic.c $(INCDIR)/bin-bugs.h \ - emul.h -bignum-copy.o: bignum-copy.c $(INCDIR)/bin-bugs.h emul.h -cond.o: cond.c $(INCDIR)/bin-bugs.h emul.h macro.h \ - sb.h $(INCDIR)/obstack.h -depend.o: depend.c $(INCDIR)/bin-bugs.h emul.h -dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/bin-bugs.h emul.h \ - dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h -ecoff.o: ecoff.c $(INCDIR)/bin-bugs.h emul.h ecoff.h -ehopt.o: ehopt.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h -expr.o: expr.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h -flonum-copy.o: flonum-copy.c $(INCDIR)/bin-bugs.h emul.h +#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW. +app.o: app.c +as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \ + sb.h macro.h +atof-generic.o: atof-generic.c +bignum-copy.o: bignum-copy.c +cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h +depend.o: depend.c +dwarf2dbg.o: dwarf2dbg.c dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/elf/dwarf2.h +ecoff.o: ecoff.c ecoff.h +ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h +expr.o: expr.c $(INCDIR)/obstack.h +flonum-copy.o: flonum-copy.c flonum-konst.o: flonum-konst.c flonum-mult.o: flonum-mult.c -frags.o: frags.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -hash.o: hash.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h -input-file.o: input-file.c $(INCDIR)/bin-bugs.h emul.h \ - input-file.h -input-scrub.o: input-scrub.c $(INCDIR)/bin-bugs.h emul.h \ - input-file.h sb.h -listing.o: listing.c $(INCDIR)/bin-bugs.h emul.h input-file.h \ - subsegs.h -literal.o: literal.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h +frags.o: frags.c subsegs.h $(INCDIR)/obstack.h +hash.o: hash.c $(INCDIR)/obstack.h +input-file.o: input-file.c input-file.h +input-scrub.o: input-scrub.c input-file.h sb.h +listing.o: listing.c input-file.h subsegs.h +literal.o: literal.c subsegs.h $(INCDIR)/obstack.h macro.o: macro.c sb.h macro.h -messages.o: messages.c $(INCDIR)/bin-bugs.h emul.h -output-file.o: output-file.c $(INCDIR)/bin-bugs.h emul.h \ - output-file.h -read.o: read.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h sb.h macro.h ecoff.h +messages.o: messages.c +output-file.o: output-file.c output-file.h +read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \ + ecoff.h sb.o: sb.c sb.h -stabs.o: stabs.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \ - subsegs.h ecoff.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def -subsegs.o: subsegs.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -symbols.o: symbols.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \ - subsegs.h struc-symbol.h -write.o: write.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h output-file.h -gasp.o: gasp.c $(INCDIR)/bin-bugs.h sb.h macro.h -itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/bin-bugs.h \ - emul.h itbl-parse.h -e-i386aout.o: $(srcdir)/config/e-i386aout.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-i386coff.o: $(srcdir)/config/e-i386coff.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-i386elf.o: $(srcdir)/config/e-i386elf.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-mipself.o: $(srcdir)/config/e-mipself.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h +stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def +subsegs.o: subsegs.c subsegs.h $(INCDIR)/obstack.h +symbols.o: symbols.c $(INCDIR)/obstack.h subsegs.h \ + struc-symbol.h +write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h +gasp.o: gasp.c sb.h macro.h +itbl-ops.o: itbl-ops.c itbl-ops.h +e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h +e-criself.o: $(srcdir)/config/e-criself.c emul-target.h +e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h +e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h +e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h +e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h +e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h $(OBJS): $(DEP_@target_cpu_type@_@obj_format@) $(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@) $(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@) -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY +#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE. # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/contrib/binutils/gas/NEWS b/contrib/binutils/gas/NEWS index 4143540..6c3439d 100644 --- a/contrib/binutils/gas/NEWS +++ b/contrib/binutils/gas/NEWS @@ -1,5 +1,27 @@ -*- text -*- +Changes in 2.11: + +x86 gas now supports the full Pentium4 instruction set. + +Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs. + +Support for Motorola 68HC11 and 68HC12. + +Support for Texas Instruments TMS320C54x (tic54x). + +Support for IA-64. + +Support for i860, by Jason Eckhardt. + +Support for CRIS (Axis Communications ETRAX series). + +x86 gas has a new .arch pseudo op to specify the target CPU architecture. + +x86 gas -q command line option quietens warnings about register size changes +due to suffix, indirect jmp/call without `*', stand-alone prefixes, and +translating various deprecated floating point instructions. + Changes in 2.10: Support for the ARM msr instruction was changed to only allow an immediate diff --git a/contrib/binutils/gas/README b/contrib/binutils/gas/README index 4ac27db..87666df 100644 --- a/contrib/binutils/gas/README +++ b/contrib/binutils/gas/README @@ -229,7 +229,7 @@ warning message when this happens. REPORTING BUGS IN GAS ===================== -Bugs in gas should be reported to bug-gnu-utils@gnu.org. They may be +Bugs in gas should be reported to bug-binutils@gnu.org. They may be cross-posted to bug-gcc if they affect the use of gas with gcc. They should not be reported just to bug-gcc, since I don't read that list, and therefore wouldn't see them. diff --git a/contrib/binutils/gas/acinclude.m4 b/contrib/binutils/gas/acinclude.m4 index 31a2c16..f16eefc 100644 --- a/contrib/binutils/gas/acinclude.m4 +++ b/contrib/binutils/gas/acinclude.m4 @@ -54,3 +54,19 @@ for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do done $1=[$]_gas_uniq_newlist ])dnl + +sinclude(../libtool.m4) +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_DEFUN([AC_CHECK_LIBM],) +AC_SUBST(LIBTOOL) +]) + +sinclude(../gettext.m4) +ifelse(yes,no,[ +AC_DEFUN([CY_WITH_NLS],) +AC_SUBST(INTLLIBS) +]) diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4 index 4b4ca84..338b221 100644 --- a/contrib/binutils/gas/aclocal.m4 +++ b/contrib/binutils/gas/aclocal.m4 @@ -67,6 +67,40 @@ done $1=[$]_gas_uniq_newlist ])dnl +sinclude(../libtool.m4) +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_DEFUN([AC_CHECK_LIBM],) +AC_SUBST(LIBTOOL) +]) + +sinclude(../gettext.m4) +ifelse(yes,no,[ +AC_DEFUN([CY_WITH_NLS],) +AC_SUBST(INTLLIBS) +]) + +#serial 1 +# This test replaces the one in autoconf. +# Currently this macro should have the same name as the autoconf macro +# because gettext's gettext.m4 (distributed in the automake package) +# still uses it. Otherwise, the use in gettext.m4 makes autoheader +# give these diagnostics: +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX + +undefine([AC_ISC_POSIX]) + +AC_DEFUN(AC_ISC_POSIX, + [ + dnl This test replaces the obsolescent AC_ISC_POSIX kludge. + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) + ] +) + # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. @@ -159,415 +193,6 @@ else fi AC_SUBST($1)]) - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$lt_target" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$lt_target" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library, adds --enable-ltdl-convenience to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library, and adds --enable-ltdl-install to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl - # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, @@ -600,351 +225,6 @@ AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") AC_PROG_LEX AC_DECL_YYTEXT]) -# This file is derived from `gettext.m4'. The difference is that the -# included macros assume Cygnus-style source and build trees. - -# Macro to add for using GNU gettext. -# Ulrich Drepper <drepper@cygnus.com>, 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 3 - -AC_DEFUN(CY_WITH_NLS, - [AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) - - USE_INCLUDED_LIBINTL=no - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested]) - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_TRY_LINK([], [return (int) gettext ("")], - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)])]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT, 1, - [Define as 1 if you have gettext and don't want to use GNU gettext.]) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - ]) - - dnl In the standard gettext, we would now check for catgets. - dnl However, we never want to use catgets for our releases. - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - INTLOBJS="\$(GETTOBJS)" - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_SUBST(MSGFMT) - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.gmo - INSTOBJEXT=.mo - DATADIRNAME=share - INTLDEPS='$(top_builddir)/../intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext programs is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - # If this is used in GNU gettext we have to set USE_NLS to `yes' - # because some of the sources are only built for this goal. - if test "$PACKAGE" = gettext; then - USE_NLS=yes - USE_INCLUDED_LIBINTL=yes - fi - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLDEPS) - AC_SUBST(INTLLIBS) - AC_SUBST(INTLOBJS) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -AC_DEFUN(CY_GNU_GETTEXT, - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_OFF_T])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ -unistd.h values.h sys/param.h]) - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ -__argz_count __argz_stringify __argz_next]) - - if test "${ac_cv_func_stpcpy+set}" != "set"; then - AC_CHECK_FUNCS(stpcpy) - fi - if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function]) - fi - - AM_LC_MESSAGES - CY_WITH_NLS - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - for lang in ${LINGUAS=$ALL_LINGUAS}; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl The reference to <locale.h> in the installed <libintl.h> file - dnl must be resolved because we cannot expect the users of this - dnl to define HAVE_LOCALE_H. - if test $ac_cv_header_locale_h = yes; then - INCLUDE_LOCALE_H="#include <locale.h>" - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header <locale.h>. Take care yourself. */" - fi - AC_SUBST(INCLUDE_LOCALE_H) - - dnl Determine which catalog format we have (if any is needed) - dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format - if test -f $srcdir/po2tbl.sed.in; then - if test "$CATOBJEXT" = ".cat"; then - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) - - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/po2tbl.sed.in > po2tbl.sed - fi - - dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext - dnl packages. - if test "$PACKAGE" = "gettext"; then - GT_NO="#NO#" - GT_YES= - else - GT_NO= - GT_YES="#YES#" - fi - AC_SUBST(GT_NO) - AC_SUBST(GT_YES) - - MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" - AC_SUBST(MKINSTALLDIRS) - - dnl *** For now the libtool support in intl/Makefile is not for real. - l= - AC_SUBST(l) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. But only do this if the po directory - dnl exists in srcdir. - if test -d $srcdir/po; then - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - fi - ]) - -# Search path for a program which passes the given test. -# Ulrich Drepper <drepper@cygnus.com>, 1996. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AM_PATH_PROG_WITH_TEST, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in ifelse([$5], , $PATH, [$5]); do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -# Check whether LC_MESSAGES is available in <locale.h>. -# Ulrich Drepper <drepper@cygnus.com>, 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -AC_DEFUN(AM_LC_MESSAGES, - [if test $ac_cv_header_locale_h = yes; then - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) - if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your locale.h file contains LC_MESSAGES.]) - fi - fi]) - # Add --enable-maintainer-mode option to configure. # From Jim Meyering diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c index 2613e74..46273c2 100644 --- a/contrib/binutils/gas/app.c +++ b/contrib/binutils/gas/app.c @@ -48,7 +48,7 @@ static int scrub_m68k_mri; static const char mri_pseudo[] = ".mri 0"; #if defined TC_ARM && defined OBJ_ELF -/* The pseudo-op for which we need to special-case `@' characters. +/* The pseudo-op for which we need to special-case `@' characters. See the comment in do_scrub_chars. */ static const char symver_pseudo[] = ".symver"; static const char * symver_state; @@ -88,9 +88,9 @@ static int process_escape PARAMS ((int)); /* FIXME-soon: The entire lexer/parser thingy should be built statically at compile time rather than dynamically - each and every time the assembler is run. xoxorich. */ + each and every time the assembler is run. xoxorich. */ -void +void do_scrub_begin (m68k_mri) int m68k_mri ATTRIBUTE_UNUSED; { @@ -101,7 +101,6 @@ do_scrub_begin (m68k_mri) lex['\t'] = LEX_IS_WHITESPACE; lex['\r'] = LEX_IS_WHITESPACE; lex['\n'] = LEX_IS_NEWLINE; - lex[';'] = LEX_IS_LINE_SEPARATOR; lex[':'] = LEX_IS_COLON; #ifdef TC_M68K @@ -212,24 +211,23 @@ static char mri_last_ch; state at the time .include is interpreted is completely unrelated. That's why we have to save it all. */ -struct app_save - { - int state; - int old_state; - char * out_string; - char out_buf[sizeof (out_buf)]; - int add_newlines; - char * saved_input; - int saved_input_len; +struct app_save { + int state; + int old_state; + char * out_string; + char out_buf[sizeof (out_buf)]; + int add_newlines; + char * saved_input; + int saved_input_len; #ifdef TC_M68K - int scrub_m68k_mri; + int scrub_m68k_mri; #endif - const char * mri_state; - char mri_last_ch; + const char * mri_state; + char mri_last_ch; #if defined TC_ARM && defined OBJ_ELF - const char * symver_state; + const char * symver_state; #endif - }; +}; char * app_push () @@ -259,7 +257,7 @@ app_push () saved->symver_state = symver_state; #endif - /* do_scrub_begin() is not useful, just wastes time. */ + /* do_scrub_begin() is not useful, just wastes time. */ state = 0; saved_input = NULL; @@ -267,13 +265,13 @@ app_push () return (char *) saved; } -void +void app_pop (arg) char *arg; { register struct app_save *saved = (struct app_save *) arg; - /* There is no do_scrub_end (). */ + /* There is no do_scrub_end (). */ state = saved->state; old_state = saved->old_state; out_string = saved->out_string; @@ -303,7 +301,7 @@ app_pop (arg) /* @@ This assumes that \n &c are the same on host and target. This is not necessarily true. */ -static int +static int process_escape (ch) int ch; { @@ -780,19 +778,20 @@ do_scrub_chars (get, tostart, tolen) } #ifdef KEEP_WHITE_AROUND_COLON - if (lex[ch] == LEX_IS_COLON) - { - /* only keep this white if there's no white *after* the colon */ - ch2 = GET (); - UNGET (ch2); - if (!IS_WHITESPACE (ch2)) - { - state = 9; - UNGET (ch); - PUT (' '); - break; - } - } + if (lex[ch] == LEX_IS_COLON) + { + /* Only keep this white if there's no white *after* the + colon. */ + ch2 = GET (); + UNGET (ch2); + if (!IS_WHITESPACE (ch2)) + { + state = 9; + UNGET (ch); + PUT (' '); + break; + } + } #endif if (IS_COMMENT (ch) || ch == '/' @@ -913,6 +912,21 @@ do_scrub_chars (get, tostart, tolen) ch = ' '; goto recycle; } +#ifdef DOUBLESLASH_LINE_COMMENTS + else if (ch2 == '/') + { + do + { + ch = GET (); + } + while (ch != EOF && !IS_NEWLINE (ch)); + if (ch == EOF) + as_warn ("end of file in comment; newline inserted"); + state = 0; + PUT ('\n'); + break; + } +#endif else { if (ch2 != EOF) @@ -1000,7 +1014,7 @@ do_scrub_chars (get, tostart, tolen) case LEX_IS_COLON: #ifdef KEEP_WHITE_AROUND_COLON - state = 9; + state = 9; #else if (state == 9 || state == 10) state = 3; @@ -1017,7 +1031,7 @@ do_scrub_chars (get, tostart, tolen) --add_newlines; UNGET (ch); } - /* fall thru into... */ + /* Fall through. */ case LEX_IS_LINE_SEPARATOR: state = 0; @@ -1026,13 +1040,13 @@ do_scrub_chars (get, tostart, tolen) #ifdef TC_V850 case LEX_IS_DOUBLEDASH_1ST: - ch2 = GET(); + ch2 = GET (); if (ch2 != '-') { UNGET (ch2); goto de_fault; } - /* read and skip to end of line */ + /* Read and skip to end of line. */ do { ch = GET (); @@ -1045,10 +1059,10 @@ do_scrub_chars (get, tostart, tolen) state = 0; PUT ('\n'); break; -#endif +#endif #ifdef DOUBLEBAR_PARALLEL case LEX_IS_DOUBLEBAR_1ST: - ch2 = GET(); + ch2 = GET (); if (ch2 != '|') { UNGET (ch2); @@ -1060,7 +1074,7 @@ do_scrub_chars (get, tostart, tolen) PUT ('|'); PUT ('|'); break; -#endif +#endif case LEX_IS_LINE_COMMENT_START: /* FIXME-someday: The two character comment stuff was badly thought out. On i386, we want '/' as line comment start @@ -1109,7 +1123,7 @@ do_scrub_chars (get, tostart, tolen) PUT ('\n'); break; } - /* Loks like `# 123 "filename"' from cpp. */ + /* Looks like `# 123 "filename"' from cpp. */ UNGET (ch); old_state = 4; state = -1; @@ -1126,12 +1140,14 @@ do_scrub_chars (get, tostart, tolen) Trap is the only short insn that has a first operand that is neither register nor label. We must prevent exef0f ||trap #1 to degenerate to exef0f ||trap#1 . - We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is already - LEX_IS_LINE_COMMENT_START. However, it is the only character in - line_comment_chars for d10v, hence we can recognize it as such. */ + We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is + already LEX_IS_LINE_COMMENT_START. However, it is the + only character in line_comment_chars for d10v, hence we + can recognize it as such. */ /* An alternative approach would be to reset the state to 1 when we see '||', '<'- or '->', but that seems to be overkill. */ - if (state == 10) PUT (' '); + if (state == 10) + PUT (' '); #endif /* We have a line comment character which is not at the start of a line. If this is also a normal comment @@ -1151,12 +1167,16 @@ do_scrub_chars (get, tostart, tolen) #if defined TC_ARM && defined OBJ_ELF /* On the ARM, `@' is the comment character. Unfortunately this is also a special character in ELF .symver - directives (and .type, though we deal with those another way). So - we check if this line is such a directive, and treat the character - as default if so. This is a hack. */ + directives (and .type, though we deal with those another way). + So we check if this line is such a directive, and treat + the character as default if so. This is a hack. */ if ((symver_state != NULL) && (*symver_state == 0)) goto de_fault; #endif +#ifdef WARN_COMMENTS + if (!found_comment) + as_where (&found_comment_file, &found_comment); +#endif do { ch = GET (); @@ -1199,7 +1219,7 @@ do_scrub_chars (get, tostart, tolen) { int type; - ch2 = * (unsigned char *) s; + ch2 = *(unsigned char *) s; type = lex[ch2]; if (type != 0 && type != LEX_IS_SYMBOL_COMPONENT) @@ -1236,7 +1256,7 @@ do_scrub_chars (get, tostart, tolen) case 2: *to++ = *from++; case 1: *to++ = *from++; } - } + } ch = GET (); } } diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c index f02c42a..8c7493d 100644 --- a/contrib/binutils/gas/as.c +++ b/contrib/binutils/gas/as.c @@ -1,5 +1,5 @@ /* as.c - GAS main program. - Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,21 +17,18 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ -/* - * Main program for AS; a 32-bit assembler of GNU. +/* Main program for AS; a 32-bit assembler of GNU. * Understands command arguments. * Has a few routines that don't fit in other modules because they * are shared. * - * * bugs * * : initialisers * Since no-one else says they will support them in future: I * don't support them now. - * */ #include "ansidecl.h" @@ -43,6 +40,7 @@ #include "output-file.h" #include "sb.h" #include "macro.h" +#include "dwarf2dbg.h" #ifdef HAVE_ITBL_CPU #include "itbl-ops.h" @@ -63,19 +61,21 @@ static void dump_statistics PARAMS ((void)); static void perform_an_assembly_pass PARAMS ((int argc, char **argv)); static int macro_expr PARAMS ((const char *, int, sb *, int *)); -int listing; /* true if a listing is wanted */ +/* True if a listing is wanted. */ +int listing; -static char *listing_filename = NULL; /* Name of listing file. */ +/* Name of listing file. */ +static char *listing_filename = NULL; /* Type of debugging to generate. */ -enum debug_info_type debug_type = DEBUG_NONE; +enum debug_info_type debug_type = DEBUG_UNSPECIFIED; /* Maximum level of macro nesting. */ - int max_macro_nest = 100; -char *myname; /* argv[0] */ +/* argv[0] */ +char *myname; #ifdef BFD_ASSEMBLER segT reg_section, expr_section; segT text_section, data_section, bss_section; @@ -92,8 +92,7 @@ int debug_memory = 0; /* We build a list of defsyms as we read the options, and then define them after we have initialized everything. */ -struct defsym_list -{ +struct defsym_list { struct defsym_list *next; char *name; valueT value; @@ -101,10 +100,9 @@ struct defsym_list static struct defsym_list *defsyms; -/* Keep a record of the itbl files we read in. */ +/* Keep a record of the itbl files we read in. */ -struct itbl_file_list -{ +struct itbl_file_list { struct itbl_file_list *next; char *name; }; @@ -117,6 +115,7 @@ static struct itbl_file_list *itbl_files; extern struct emulation mipsbelf, mipslelf, mipself; extern struct emulation mipsbecoff, mipslecoff, mipsecoff; extern struct emulation i386coff, i386elf, i386aout; +extern struct emulation crisaout, criself; static struct emulation *const emulations[] = { EMULATIONS }; static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]); @@ -142,7 +141,7 @@ select_emulation_mode (argc, argv) if (p) p++; else - p = argv[i+1]; + p = argv[i + 1]; if (!p || !*p) as_fatal (_("missing emulation mode name")); @@ -246,12 +245,12 @@ Options:\n\ fprintf (stream, "\ --em=["); - for (i = 0; i < n_emulations-1; i++) + for (i = 0; i < n_emulations - 1; i++) fprintf (stream, "%s | ", emulations[i]->name); fprintf (stream, "%s]\n", emulations[i]->name); def_em = getenv (EMULATION_ENVIRON); - if (!def_em) + if (!def_em) def_em = DEFAULT_EMULATION; fprintf (stream, _("\ emulate output (default %s)\n"), def_em); @@ -266,6 +265,8 @@ Options:\n\ fprintf (stream, _("\ --help show this message and exit\n")); fprintf (stream, _("\ + --target-help show target specific options\n")); + fprintf (stream, _("\ -I DIR add DIR to search list for .include directives\n")); fprintf (stream, _("\ -J don't warn about signed overflow\n")); @@ -326,16 +327,14 @@ Options:\n\ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO); } -/* - * Since it is easy to do here we interpret the special arg "-" - * to mean "use stdin" and we set that argv[] pointing to "". - * After we have munged argv[], the only things left are source file - * name(s) and ""(s) denoting stdin. These file names are used - * (perhaps more than once) later. - * - * check for new machine-dep cmdline options in - * md_parse_option definitions in config/tc-*.c - */ +/* Since it is easy to do here we interpret the special arg "-" + to mean "use stdin" and we set that argv[] pointing to "". + After we have munged argv[], the only things left are source file + name(s) and ""(s) denoting stdin. These file names are used + (perhaps more than once) later. + + check for new machine-dep cmdline options in + md_parse_option definitions in config/tc-*.c. */ static void parse_args (pargc, pargv) @@ -352,24 +351,23 @@ parse_args (pargc, pargv) char *shortopts; extern CONST char *md_shortopts; - static const char std_shortopts[] = - { - '-', 'J', + static const char std_shortopts[] = { + '-', 'J', #ifndef WORKING_DOT_WORD - /* -K is not meaningful if .word is not being hacked. */ - 'K', + /* -K is not meaningful if .word is not being hacked. */ + 'K', #endif - 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':', + 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':', #ifndef VMS - /* -v takes an argument on VMS, so we don't make it a generic - option. */ - 'v', + /* -v takes an argument on VMS, so we don't make it a generic + option. */ + 'v', #endif - 'w', 'X', - /* New option for extending instruction set (see also --itbl below) */ - 't', ':', - '\0' - }; + 'w', 'X', + /* New option for extending instruction set (see also --itbl below) */ + 't', ':', + '\0' + }; struct option *longopts; extern struct option md_longopts[]; extern size_t md_longopts_size; @@ -421,17 +419,26 @@ parse_args (pargc, pargv) {"no-warn", no_argument, NULL, 'W'}, #define OPTION_WARN (OPTION_STD_BASE + 18) {"warn", no_argument, NULL, OPTION_WARN}, -#define OPTION_WARN_FATAL (OPTION_STD_BASE + 19) +#define OPTION_TARGET_HELP (OPTION_STD_BASE + 19) + {"target-help", no_argument, NULL, OPTION_TARGET_HELP}, +#define OPTION_WARN_FATAL (OPTION_STD_BASE + 20) {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL} + /* When you add options here, check that they do not collide with + OPTION_MD_BASE. See as.h. */ }; - /* Construct the option lists from the standard list and the - target dependent list. */ + /* Construct the option lists from the standard list and the target + dependent list. Include space for an extra NULL option and + always NULL terminate. */ shortopts = concat (std_shortopts, md_shortopts, (char *) NULL); - longopts = (struct option *) xmalloc (sizeof (std_longopts) + md_longopts_size); + longopts = (struct option *) xmalloc (sizeof (std_longopts) + + md_longopts_size + + sizeof (struct option)); memcpy (longopts, std_longopts, sizeof (std_longopts)); memcpy ((char *) longopts + sizeof (std_longopts), md_longopts, md_longopts_size); + memset ((char *) longopts + sizeof (std_longopts) + md_longopts_size, + 0, sizeof (struct option)); /* Make a local copy of the old argv. */ old_argc = *pargc; @@ -471,7 +478,7 @@ parse_args (pargc, pargv) VMS code in md_parse_option can return 0 in that case, but it has no way of pushing the filename argument back. */ if (optarg && *optarg) - new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL; + new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL; else #else case 'v': @@ -480,7 +487,7 @@ parse_args (pargc, pargv) print_version_id (); break; } - /*FALLTHRU*/ + /* Fall through. */ case '?': exit (EXIT_FAILURE); @@ -492,6 +499,10 @@ parse_args (pargc, pargv) new_argv[new_argc] = NULL; break; + case OPTION_TARGET_HELP: + md_show_usage (stdout); + exit (EXIT_SUCCESS); + case OPTION_HELP: show_usage (stdout); exit (EXIT_SUCCESS); @@ -514,7 +525,7 @@ parse_args (pargc, pargv) case OPTION_VERSION: /* This output is intended to follow the GNU standards document. */ printf (_("GNU assembler %s\n"), VERSION); - printf (_("Copyright 2000 Free Software Foundation, Inc.\n")); + printf (_("Copyright 2001 Free Software Foundation, Inc.\n")); printf (_("\ This program is free software; you may redistribute it under the terms of\n\ the GNU General Public License. This program has absolutely no warranty.\n")); @@ -546,7 +557,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case OPTION_DEFSYM: { char *s; - long i; + valueT i; struct defsym_list *n; for (s = optarg; *s != '\0' && *s != '='; s++) @@ -554,7 +565,11 @@ the GNU General Public License. This program has absolutely no warranty.\n")); if (*s == '\0') as_fatal (_("bad defsym; format is --defsym name=value")); *s++ = '\0'; +#ifdef BFD_ASSEMBLER + i = bfd_scan_vma (s, (const char **) NULL, 0); +#else i = strtol (s, (char **) NULL, 0); +#endif n = (struct defsym_list *) xmalloc (sizeof *n); n->next = defsyms; n->name = optarg; @@ -566,29 +581,29 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case OPTION_INSTTBL: case 't': { - /* optarg is the name of the file containing the instruction - formats, opcodes, register names, etc. */ + /* optarg is the name of the file containing the instruction + formats, opcodes, register names, etc. */ struct itbl_file_list *n; if (optarg == NULL) { - as_warn ( _("No file name following -t option\n") ); + as_warn (_("No file name following -t option\n")); break; } - + n = (struct itbl_file_list *) xmalloc (sizeof *n); n->next = itbl_files; n->name = optarg; itbl_files = n; /* Parse the file and add the new instructions to our internal - table. If multiple instruction tables are specified, the - information from this table gets appended onto the existing - internal table. */ + table. If multiple instruction tables are specified, the + information from this table gets appended onto the existing + internal table. */ itbl_files->name = xstrdup (optarg); if (itbl_parse (itbl_files->name) != 0) { - fprintf (stderr, _("Failed to read instruction table %s\n"), + fprintf (stderr, _("Failed to read instruction table %s\n"), itbl_files->name); exit (EXIT_SUCCESS); } @@ -602,7 +617,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case OPTION_GSTABS: debug_type = DEBUG_STABS; break; - + case OPTION_GDWARF2: debug_type = DEBUG_DWARF2; break; @@ -622,22 +637,22 @@ the GNU General Public License. This program has absolutely no warranty.\n")); break; case OPTION_LISTING_LHS_WIDTH: - listing_lhs_width = atoi(optarg); + listing_lhs_width = atoi (optarg); if (listing_lhs_width_second < listing_lhs_width) listing_lhs_width_second = listing_lhs_width; break; case OPTION_LISTING_LHS_WIDTH2: { - int tmp = atoi(optarg); + int tmp = atoi (optarg); if (tmp > listing_lhs_width) listing_lhs_width_second = tmp; } break; case OPTION_LISTING_RHS_WIDTH: - listing_rhs_width = atoi(optarg); + listing_rhs_width = atoi (optarg); break; case OPTION_LISTING_CONT_LINES: - listing_lhs_cont_lines = atoi(optarg); + listing_lhs_cont_lines = atoi (optarg); break; case 'M': @@ -672,6 +687,9 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case 'a': if (optarg) { + if (md_parse_option (optc, optarg) != 0) + break; + while (*optarg) { switch (*optarg) @@ -713,8 +731,8 @@ the GNU General Public License. This program has absolutely no warranty.\n")); break; case 'D': - /* DEBUG is implemented: it debugs different */ - /* things from other people's assemblers. */ + /* DEBUG is implemented: it debugs different + things from other people's assemblers. */ flag_debug = 1; break; @@ -723,7 +741,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); break; case 'I': - { /* Include file directory */ + { /* Include file directory. */ char *temp = xstrdup (optarg); add_include_dir (temp); break; @@ -737,7 +755,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); break; case 'X': - /* -X means treat warnings as errors */ + /* -X means treat warnings as errors. */ break; } } @@ -751,7 +769,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); static long start_time; -int +int main (argc, argv) int argc; char **argv; @@ -806,7 +824,7 @@ main (argc, argv) symbol_begin (); frag_init (); subsegs_begin (); - parse_args (&argc, &argv); + parse_args (&argc, &argv); read_begin (); input_scrub_begin (); expr_begin (); @@ -859,7 +877,8 @@ main (argc, argv) PROGRESS (1); - perform_an_assembly_pass (argc, argv); /* Assemble it. */ + /* Assemble it. */ + perform_an_assembly_pass (argc, argv); cond_finish_check (-1); @@ -867,6 +886,10 @@ main (argc, argv) md_end (); #endif + /* If we've been collecting dwarf2 .debug_line info, either for + assembly debugging or on behalf of the compiler, emit it now. */ + dwarf2_finish (); + if (seen_at_least_1_file () && (flag_always_generate_output || had_errors () == 0)) keep_it = 1; @@ -895,8 +918,8 @@ main (argc, argv) output_file_close (out_file_name); #endif - if (flag_fatal_warnings && had_warnings() > 0 && had_errors () == 0) - as_bad (_("%d warnings, treating warnings as errors"), had_warnings()); + if (flag_fatal_warnings && had_warnings () > 0 && had_errors () == 0) + as_bad (_("%d warnings, treating warnings as errors"), had_warnings ()); if (had_errors () > 0 && ! flag_always_generate_output) keep_it = 0; @@ -947,19 +970,16 @@ dump_statistics () #endif } +/* Here to attempt 1 pass over each input file. + We scan argv[*] looking for filenames or exactly "" which is + shorthand for stdin. Any argv that is NULL is not a file-name. + We set need_pass_2 TRUE if, after this, we still have unresolved + expressions of the form (unknown value)+-(unknown value). -/* perform_an_assembly_pass() - * - * Here to attempt 1 pass over each input file. - * We scan argv[*] looking for filenames or exactly "" which is - * shorthand for stdin. Any argv that is NULL is not a file-name. - * We set need_pass_2 TRUE if, after this, we still have unresolved - * expressions of the form (unknown value)+-(unknown value). - * - * Note the un*x semantics: there is only 1 logical input file, but it - * may be a catenation of many 'physical' input files. - */ -static void + Note the un*x semantics: there is only 1 logical input file, but it + may be a catenation of many 'physical' input files. */ + +static void perform_an_assembly_pass (argc, argv) int argc; char **argv; @@ -978,7 +998,7 @@ perform_an_assembly_pass (argc, argv) for (i = SEG_E0; i < SEG_UNKNOWN; i++) segment_info[i].fix_root = 0; } - /* Create the three fixed ones */ + /* Create the three fixed ones. */ { segT seg; @@ -1009,7 +1029,7 @@ perform_an_assembly_pass (argc, argv) data_section = subseg_new (DATA_SECTION_NAME, 0); bss_section = subseg_new (BSS_SECTION_NAME, 0); /* @@ FIXME -- we're setting the RELOC flag so that sections are assumed - to have relocs, otherwise we don't find out in time. */ + to have relocs, otherwise we don't find out in time. */ applicable = bfd_applicable_section_flags (stdoutput); bfd_set_section_flags (stdoutput, text_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC @@ -1036,22 +1056,24 @@ perform_an_assembly_pass (argc, argv) obj_begin (); #endif - argv++; /* skip argv[0] */ - argc--; /* skip argv[0] */ + /* Skip argv[0]. */ + argv++; + argc--; + while (argc--) { if (*argv) - { /* Is it a file-name argument? */ + { /* Is it a file-name argument? */ PROGRESS (1); saw_a_file++; - /* argv->"" if stdin desired, else->filename */ + /* argv->"" if stdin desired, else->filename */ read_a_source_file (*argv); } - argv++; /* completed that argv */ + argv++; /* completed that argv */ } if (!saw_a_file) read_a_source_file (""); -} /* perform_an_assembly_pass() */ +} /* The interface between the macro code and gas expression handling. */ @@ -1080,5 +1102,3 @@ macro_expr (emsg, idx, in, val) return idx; } - -/* end of as.c */ diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h index e56d6cd..a98acfe 100644 --- a/contrib/binutils/gas/as.h +++ b/contrib/binutils/gas/as.h @@ -21,8 +21,7 @@ #ifndef GAS #define GAS 1 -/* - * I think this stuff is largely out of date. xoxorich. +/* I think this stuff is largely out of date. xoxorich. * * CAPITALISED names are #defined. * "lowercaseH" is #defined if "lowercase.h" has been #include-d. @@ -80,7 +79,7 @@ extern void *alloca (); /* Now, tend to the rest of the configuration. */ -/* System include files first... */ +/* System include files first... */ #include <stdio.h> #include <ctype.h> #ifdef HAVE_STRING_H @@ -106,8 +105,8 @@ extern void *alloca (); 150 isn't special; it's just an arbitrary non-ASCII char value. */ #define OPTION_STD_BASE 150 /* The first getopt value for machine-dependent long options. - 170 gives the standard options room to grow. */ -#define OPTION_MD_BASE 170 + 190 gives the standard options room to grow. */ +#define OPTION_MD_BASE 190 #ifdef DEBUG #undef NDEBUG @@ -136,8 +135,7 @@ extern void *alloca (); #endif - -/* Now GNU header files... */ +/* Now GNU header files... */ #include "ansidecl.h" #ifdef BFD_ASSEMBLER #include "bfd.h" @@ -185,9 +183,9 @@ extern char **environ; /* Make Saber happier on obstack.h. */ #ifdef SABER #undef __PTR_TO_INT -#define __PTR_TO_INT(P) ((int)(P)) +#define __PTR_TO_INT(P) ((int) (P)) #undef __INT_TO_PTR -#define __INT_TO_PTR(P) ((char *)(P)) +#define __INT_TO_PTR(P) ((char *) (P)) #endif #ifndef __LINE__ @@ -222,11 +220,11 @@ extern char **environ; #include "asintl.h" -#define BAD_CASE(val) \ -{ \ - as_fatal(_("Case value %ld unexpected at line %d of file \"%s\"\n"), \ - (long) val, __LINE__, __FILE__); \ - } +#define BAD_CASE(val) \ + { \ + as_fatal (_("Case value %ld unexpected at line %d of file \"%s\"\n"), \ + (long) val, __LINE__, __FILE__); \ + } #include "flonum.h" @@ -246,7 +244,7 @@ typedef addressT valueT; #ifndef COMMON #ifdef TEST -#define COMMON /* declare our COMMONs storage here. */ +#define COMMON /* declare our COMMONs storage here. */ #else #define COMMON extern /* our commons live elswhere */ #endif @@ -263,12 +261,9 @@ typedef addressT valueT; /* input_scrub.c */ -/* - * Supplies sanitised buffers to read.c. - * Also understands printing line-number part of error messages. - */ +/* Supplies sanitised buffers to read.c. + Also understands printing line-number part of error messages. */ - /* subsegs.c Sub-segments. Also, segment(=expression type)s.*/ #ifndef BFD_ASSEMBLER @@ -291,20 +286,19 @@ typedef addressT valueT; #define SEG_LIST SEG_TEXT,SEG_DATA,SEG_BSS #endif -typedef enum _segT - { - SEG_ABSOLUTE = 0, - SEG_LIST, - SEG_UNKNOWN, - SEG_GOOF, /* Only happens if AS has a logic error. */ - /* Invented so we don't crash printing */ - /* error message involving weird segment. */ - SEG_EXPR, /* Intermediate expression values. */ - SEG_DEBUG, /* Debug segment */ - SEG_NTV, /* Transfert vector preload segment */ - SEG_PTV, /* Transfert vector postload segment */ - SEG_REGISTER /* Mythical: a register-valued expression */ - } segT; +typedef enum _segT { + SEG_ABSOLUTE = 0, + SEG_LIST, + SEG_UNKNOWN, + SEG_GOOF, /* Only happens if AS has a logic error. */ + /* Invented so we don't crash printing */ + /* error message involving weird segment. */ + SEG_EXPR, /* Intermediate expression values. */ + SEG_DEBUG, /* Debug segment */ + SEG_NTV, /* Transfert vector preload segment */ + SEG_PTV, /* Transfert vector postload segment */ + SEG_REGISTER /* Mythical: a register-valued expression */ +} segT; #define SEG_MAXIMUM_ORDINAL (SEG_REGISTER) #else @@ -319,7 +313,7 @@ typedef int subsegT; /* What subseg we are accreting now? */ COMMON subsegT now_subseg; -/* Segment our instructions emit to. */ +/* Segment our instructions emit to. */ COMMON segT now_seg; #ifdef BFD_ASSEMBLER @@ -351,51 +345,57 @@ extern segT text_section, data_section, bss_section; /* relax() */ -enum _relax_state - { - /* Variable chars to be repeated fr_offset times. - Fr_symbol unused. Used with fr_offset == 0 for a - constant length frag. */ - rs_fill = 1, - - /* Align. The fr_offset field holds the power of 2 to which to - align. The fr_var field holds the number of characters in the - fill pattern. The fr_subtype field holds the maximum number of - bytes to skip when aligning, or 0 if there is no maximum. */ - rs_align, - - /* Align code. The fr_offset field holds the power of 2 to which - to align. This type is only generated by machine specific - code, which is normally responsible for handling the fill - pattern. The fr_subtype field holds the maximum number of - bytes to skip when aligning, or 0 if there is no maximum. */ - rs_align_code, - - /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill - character. */ - rs_org, +enum _relax_state { + /* Variable chars to be repeated fr_offset times. + Fr_symbol unused. Used with fr_offset == 0 for a + constant length frag. */ + rs_fill = 1, + + /* Align. The fr_offset field holds the power of 2 to which to + align. The fr_var field holds the number of characters in the + fill pattern. The fr_subtype field holds the maximum number of + bytes to skip when aligning, or 0 if there is no maximum. */ + rs_align, + + /* Align code. The fr_offset field holds the power of 2 to which + to align. This type is only generated by machine specific + code, which is normally responsible for handling the fill + pattern. The fr_subtype field holds the maximum number of + bytes to skip when aligning, or 0 if there is no maximum. */ + rs_align_code, + + /* Test for alignment. Like rs_align, but used by several targets + to warn if data is not properly aligned. */ + rs_align_test, + + /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill + character. */ + rs_org, #ifndef WORKING_DOT_WORD - /* JF: gunpoint */ - rs_broken_word, + /* JF: gunpoint */ + rs_broken_word, #endif - /* machine-specific relaxable (or similarly alterable) instruction */ - rs_machine_dependent, + /* machine-specific relaxable (or similarly alterable) instruction */ + rs_machine_dependent, - /* .space directive with expression operand that needs to be computed - later. Similar to rs_org, but different. - fr_symbol: operand - 1 variable char: fill character */ - rs_space, + /* .space directive with expression operand that needs to be computed + later. Similar to rs_org, but different. + fr_symbol: operand + 1 variable char: fill character */ + rs_space, - /* A DWARF leb128 value; only ELF uses this. The subtype is 0 for - unsigned, 1 for signed. */ - rs_leb128, + /* A DWARF leb128 value; only ELF uses this. The subtype is 0 for + unsigned, 1 for signed. */ + rs_leb128, - /* Exception frame information which we may be able to optimize. */ - rs_cfa - }; + /* Exception frame information which we may be able to optimize. */ + rs_cfa, + + /* Cross-fragment dwarf2 line number optimization. */ + rs_dwarf2dbg +}; typedef enum _relax_state relax_stateT; @@ -436,7 +436,7 @@ COMMON int flag_fatal_warnings; /* --fatal-warnings */ are detected. */ COMMON unsigned char flag_always_generate_output; /* -Z */ -/* This is true if the assembler should output time and space usage. */ +/* This is true if the assembler should output time and space usage. */ COMMON unsigned char flag_print_statistics; /* True if local absolute symbols are to be stripped. */ @@ -451,7 +451,7 @@ COMMON char *out_file_name; /* name of file defining extensions to the basic instruction set */ COMMON char *insttbl_file_name; -/* TRUE if we need a second pass. */ +/* TRUE if we need a second pass. */ COMMON int need_pass_2; /* TRUE if we should do no relaxing, and @@ -461,18 +461,22 @@ COMMON int linkrelax; /* TRUE if we should produce a listing. */ extern int listing; -/* Type of debugging information we should generate. We currently - support stabs, ECOFF, and DWARF2. */ +/* Type of debugging information we should generate. We currently support + stabs, ECOFF, and DWARF2. + + NOTE! This means debug information about the assembly source code itself + and _not_ about possible debug information from a high-level language. + This is especially relevant to DWARF2, since the compiler may emit line + number directives that the assembler resolves. */ -enum debug_info_type - { - DEBUG_UNSPECIFIED, - DEBUG_NONE, - DEBUG_STABS, - DEBUG_ECOFF, - DEBUG_DWARF, - DEBUG_DWARF2 - }; +enum debug_info_type { + DEBUG_UNSPECIFIED, + DEBUG_NONE, + DEBUG_STABS, + DEBUG_ECOFF, + DEBUG_DWARF, + DEBUG_DWARF2 +}; extern enum debug_info_type debug_type; @@ -483,15 +487,14 @@ extern int max_macro_nest; increase malloc calls for monitoring memory allocation. */ extern int chunksize; -struct _pseudo_type - { - /* assembler mnemonic, lower case, no '.' */ - const char *poc_name; - /* Do the work */ - void (*poc_handler) PARAMS ((int)); - /* Value to pass to handler */ - int poc_val; - }; +struct _pseudo_type { + /* assembler mnemonic, lower case, no '.' */ + const char *poc_name; + /* Do the work */ + void (*poc_handler) PARAMS ((int)); + /* Value to pass to handler */ + int poc_val; +}; typedef struct _pseudo_type pseudo_typeS; @@ -619,6 +622,10 @@ void eh_frame_convert_frag PARAMS ((fragS *)); /* this one starts the chain of target dependant headers */ #include "targ-env.h" +#ifdef TC_ARC +#include "struc-symbol.h" +#endif + #include "write.h" #include "frags.h" #include "hash.h" @@ -640,6 +647,12 @@ COMMON int flag_m68k_mri; #define flag_m68k_mri 0 #endif +#ifdef WARN_COMMENTS +COMMON int warn_comment; +COMMON unsigned int found_comment; +COMMON char *found_comment_file; +#endif + #ifndef NUMBERS_WITH_SUFFIX #define NUMBERS_WITH_SUFFIX 0 #endif @@ -677,5 +690,3 @@ COMMON int flag_m68k_mri; #endif #endif /* GAS */ - -/* end of as.h */ diff --git a/contrib/binutils/gas/asintl.h b/contrib/binutils/gas/asintl.h index b733c85..5b6369f 100644 --- a/contrib/binutils/gas/asintl.h +++ b/contrib/binutils/gas/asintl.h @@ -1,5 +1,5 @@ /* asintl.h - gas-specific header for gettext code. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Written by Tom Tromey <tromey@cygnus.com> @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #ifdef HAVE_LOCALE_H # include <locale.h> @@ -33,12 +33,11 @@ # define N_(String) (String) # endif #else -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) while (0) /* nothing */ +# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ # define _(String) (String) # define N_(String) (String) #endif diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c index de29f21..93eadc1 100644 --- a/contrib/binutils/gas/atof-generic.c +++ b/contrib/binutils/gas/atof-generic.c @@ -1,5 +1,5 @@ /* atof_generic.c - turn a string of digits into a Flonum - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1998 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,8 +15,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #include <ctype.h> #include <string.h> @@ -78,14 +79,14 @@ atof_generic (address_of_string_pointer, string_of_decimal_marks, string_of_decimal_exponent_marks, address_of_generic_floating_point_number) - /* return pointer to just AFTER number we read. */ + /* return pointer to just AFTER number we read. */ char **address_of_string_pointer; - /* At most one per number. */ + /* At most one per number. */ const char *string_of_decimal_marks; const char *string_of_decimal_exponent_marks; FLONUM_TYPE *address_of_generic_floating_point_number; { - int return_value; /* 0 means OK. */ + int return_value; /* 0 means OK. */ char *first_digit; unsigned int number_of_digits_before_decimal; unsigned int number_of_digits_after_decimal; @@ -184,9 +185,9 @@ atof_generic (address_of_string_pointer, } else { - break; /* p -> char after pre-decimal digits. */ + break; /* p -> char after pre-decimal digits. */ } - } /* For each digit before decimal mark. */ + } /* For each digit before decimal mark. */ #ifndef OLD_FLOAT_READS /* Ignore trailing 0's after the decimal point. The original code here @@ -222,7 +223,7 @@ atof_generic (address_of_string_pointer, { if (isdigit ((unsigned char) c)) { - /* This may be retracted below. */ + /* This may be retracted below. */ number_of_digits_after_decimal++; if ( /* seen_significant_digit || */ c > '0') @@ -238,7 +239,7 @@ atof_generic (address_of_string_pointer, } break; } - } /* For each digit after decimal mark. */ + } /* For each digit after decimal mark. */ } while (number_of_digits_after_decimal @@ -295,8 +296,6 @@ atof_generic (address_of_string_pointer, *address_of_string_pointer = p; - - number_of_digits_available = number_of_digits_before_decimal + number_of_digits_after_decimal; return_value = 0; @@ -311,7 +310,7 @@ atof_generic (address_of_string_pointer, } else { - int count; /* Number of useful digits left to scan. */ + int count; /* Number of useful digits left to scan. */ LITTLENUM_TYPE *digits_binary_low; unsigned int precision; @@ -326,7 +325,7 @@ atof_generic (address_of_string_pointer, precision = (address_of_generic_floating_point_number->high - address_of_generic_floating_point_number->low - + 1); /* Number of destination littlenums. */ + + 1); /* Number of destination littlenums. */ /* Includes guard bits (two littlenums worth) */ #if 0 /* The integer version below is very close, and it doesn't @@ -335,12 +334,12 @@ atof_generic (address_of_string_pointer, maximum_useful_digits = (((double) (precision - 2)) * ((double) (LITTLENUM_NUMBER_OF_BITS)) / (LOG_TO_BASE_2_OF_10)) - + 2; /* 2 :: guard digits. */ + + 2; /* 2 :: guard digits. */ #else maximum_useful_digits = (((precision - 2)) * ( (LITTLENUM_NUMBER_OF_BITS)) * 1000000 / 3321928) - + 2; /* 2 :: guard digits. */ + + 2; /* 2 :: guard digits. */ #endif if (number_of_digits_available > maximum_useful_digits) @@ -388,7 +387,7 @@ atof_generic (address_of_string_pointer, memset ((char *) digits_binary_low, '\0', size_of_digits_in_chars); - /* Digits_binary_low[] is allocated and zeroed. */ + /* Digits_binary_low[] is allocated and zeroed. */ /* * Parse the decimal digits as if * digits_low was in the units position. @@ -440,11 +439,10 @@ atof_generic (address_of_string_pointer, } else { - ++count; /* '.' doesn't alter digits used count. */ + ++count; /* '.' doesn't alter digits used count. */ } } - /* * Digits_binary_low[] properly encodes the value of the digits. * Forget about any high-order littlenums that are 0. @@ -480,7 +478,7 @@ atof_generic (address_of_string_pointer, LITTLENUM_TYPE *power_binary_low; int decimal_exponent_is_negative; - /* This refers to the "-56" in "12.34E-56". */ + /* This refers to the "-56" in "12.34E-56". */ /* FALSE: decimal_exponent is positive (or 0) */ /* TRUE: decimal_exponent is negative */ FLONUM_TYPE temporary_flonum; @@ -489,7 +487,7 @@ atof_generic (address_of_string_pointer, unsigned int size_of_power_in_chars; size_of_power_in_littlenums = precision; - /* Precision has a built-in fudge factor so we get a few guard bits. */ + /* Precision has a built-in fudge factor so we get a few guard bits. */ decimal_exponent_is_negative = decimal_exponent < 0; if (decimal_exponent_is_negative) @@ -497,7 +495,7 @@ atof_generic (address_of_string_pointer, decimal_exponent = -decimal_exponent; } - /* From now on: the decimal exponent is > 0. Its sign is separate. */ + /* From now on: the decimal exponent is > 0. Its sign is separate. */ size_of_power_in_chars = size_of_power_in_littlenums * sizeof (LITTLENUM_TYPE) + 2; @@ -530,7 +528,7 @@ atof_generic (address_of_string_pointer, int place_number_limit; /* Any 10^(2^n) whose "n" exceeds this */ /* value will fall off the end of */ - /* flonum_XXXX_powers_of_ten[]. */ + /* flonum_XXXX_powers_of_ten[]. */ int place_number; const FLONUM_TYPE *multiplicand; /* -> 10^(2^n) */ @@ -540,8 +538,8 @@ atof_generic (address_of_string_pointer, ? flonum_negative_powers_of_ten : flonum_positive_powers_of_ten); - for (place_number = 1;/* Place value of this bit of exponent. */ - decimal_exponent;/* Quit when no more 1 bits in exponent. */ + for (place_number = 1;/* Place value of this bit of exponent. */ + decimal_exponent;/* Quit when no more 1 bits in exponent. */ decimal_exponent >>= 1, place_number++) { if (decimal_exponent & 1) @@ -586,7 +584,7 @@ atof_generic (address_of_string_pointer, (void) putchar ('\n'); #endif } /* If this bit of decimal_exponent was computable.*/ - } /* If this bit of decimal_exponent was set. */ + } /* If this bit of decimal_exponent was set. */ } /* For each bit of binary representation of exponent */ #ifdef TRACE printf ("after computing power_of_10_flonum:\n"); @@ -605,7 +603,7 @@ atof_generic (address_of_string_pointer, */ flonum_multip (&power_of_10_flonum, &digits_flonum, address_of_generic_floating_point_number); - /* Assert sign of the number we made is '+'. */ + /* Assert sign of the number we made is '+'. */ address_of_generic_floating_point_number->sign = digits_sign_char; } diff --git a/contrib/binutils/gas/bignum-copy.c b/contrib/binutils/gas/bignum-copy.c index 2bffcbf..8384ff1 100644 --- a/contrib/binutils/gas/bignum-copy.c +++ b/contrib/binutils/gas/bignum-copy.c @@ -1,5 +1,6 @@ /* bignum_copy.c - copy a bignum - Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1990, 1991, 1992, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,7 +16,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "as.h" @@ -43,7 +44,7 @@ bignum_copy (in, in_length, out, out_length) if (out_length < in_length) { LITTLENUM_TYPE *p; /* -> most significant (non-zero) input - littlenum. */ + littlenum. */ memcpy ((void *) out, (void *) in, (unsigned int) out_length << LITTLENUM_SHIFT); diff --git a/contrib/binutils/gas/bit_fix.h b/contrib/binutils/gas/bit_fix.h index 6a729a7..b9768fd 100644 --- a/contrib/binutils/gas/bit_fix.h +++ b/contrib/binutils/gas/bit_fix.h @@ -1,6 +1,5 @@ -/* write.h - - Copyright (C) 1987, 1992 Free Software Foundation, Inc. +/* bit_fix.h + Copyright (C) 1987, 1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,8 +14,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* The bit_fix was implemented to support machines that need variables to be inserted in bitfields other than 1, 2 and 4 bytes. @@ -33,19 +33,16 @@ #ifndef __bit_fix_h__ #define __bit_fix_h__ -struct bit_fix - { - int fx_bit_size; /* Length of bitfield */ - int fx_bit_offset; /* Bit offset to bitfield */ - long fx_bit_base; /* Where do we apply the bitfix. - If this is zero, default is assumed. */ - long fx_bit_base_adj; /* Adjustment of base */ - long fx_bit_max; /* Signextended max for bitfield */ - long fx_bit_min; /* Signextended min for bitfield */ - long fx_bit_add; /* Or mask, used for huffman prefix */ - }; +struct bit_fix { + int fx_bit_size; /* Length of bitfield */ + int fx_bit_offset; /* Bit offset to bitfield */ + long fx_bit_base; /* Where do we apply the bitfix. + If this is zero, default is assumed. */ + long fx_bit_base_adj; /* Adjustment of base */ + long fx_bit_max; /* Signextended max for bitfield */ + long fx_bit_min; /* Signextended min for bitfield */ + long fx_bit_add; /* Or mask, used for huffman prefix */ +}; typedef struct bit_fix bit_fixS; #endif /* __bit_fix_h__ */ - -/* end of bit_fix.h */ diff --git a/contrib/binutils/gas/cond.c b/contrib/binutils/gas/cond.c index 025ca51..6c6e8ad 100644 --- a/contrib/binutils/gas/cond.c +++ b/contrib/binutils/gas/cond.c @@ -1,5 +1,5 @@ /* cond.c - conditional assembly pseudo-ops, and .include - Copyright (C) 1990, 91, 92, 93, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -24,11 +24,11 @@ #include "obstack.h" -/* This is allocated to grow and shrink as .ifdef/.endif pairs are scanned. */ +/* This is allocated to grow and shrink as .ifdef/.endif pairs are + scanned. */ struct obstack cond_obstack; -struct file_line -{ +struct file_line { char *file; unsigned int line; }; @@ -36,8 +36,7 @@ struct file_line /* We push one of these structures for each .if, and pop it at the .endif. */ -struct conditional_frame -{ +struct conditional_frame { /* The source file & line number of the "if". */ struct file_line if_file_line; /* The source file & line of the "else". */ @@ -48,7 +47,9 @@ struct conditional_frame int else_seen; /* Whether we are currently ignoring input. */ int ignoring; - /* Whether a conditional at a higher level is ignoring input. */ + /* Whether a conditional at a higher level is ignoring input. + Set also when a branch of an "if .. elseif .." tree has matched + to prevent further matches. */ int dead_tree; /* Macro nesting level at which this conditional was created. */ int macro_nest; @@ -59,15 +60,18 @@ static char *get_mri_string PARAMS ((int, int *)); static struct conditional_frame *current_cframe = NULL; -void +void s_ifdef (arg) int arg; { - register char *name; /* points to name of symbol */ - register symbolS *symbolP; /* Points to symbol */ + /* Points to name of symbol. */ + register char *name; + /* Points to symbol. */ + register symbolS *symbolP; struct conditional_frame cframe; - SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */ + /* Leading whitespace is part of operand. */ + SKIP_WHITESPACE (); name = input_line_pointer; if (!is_name_beginner (*name)) @@ -98,9 +102,9 @@ s_ifdef (arg) demand_empty_rest_of_line (); } /* if a valid identifyer name */ -} /* s_ifdef() */ +} -void +void s_if (arg) int arg; { @@ -113,7 +117,8 @@ s_if (arg) if (flag_mri) stop = mri_comment_field (&stopc); - SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */ + /* Leading whitespace is part of operand. */ + SKIP_WHITESPACE (); if (current_cframe != NULL && current_cframe->ignoring) { @@ -158,7 +163,7 @@ s_if (arg) mri_comment_end (stop, stopc); demand_empty_rest_of_line (); -} /* s_if() */ +} /* Get a string for the MRI IFC or IFNC pseudo-ops. */ @@ -246,17 +251,13 @@ s_ifc (arg) demand_empty_rest_of_line (); } -void +void s_elseif (arg) int arg; { - expressionS operand; - int t; - if (current_cframe == NULL) { as_bad (_("\".elseif\" without matching \".if\" - ignored")); - } else if (current_cframe->else_seen) { @@ -273,60 +274,60 @@ s_elseif (arg) as_where (¤t_cframe->else_file_line.file, ¤t_cframe->else_file_line.line); - if (!current_cframe->dead_tree) - { - current_cframe->ignoring = !current_cframe->ignoring; - if (LISTING_SKIP_COND ()) - { - if (! current_cframe->ignoring) - listing_list (1); - else - listing_list (2); - } - } /* if not a dead tree */ - } /* if error else do it */ - - - SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */ + current_cframe->dead_tree |= !current_cframe->ignoring; + current_cframe->ignoring = current_cframe->dead_tree; + } - if (current_cframe != NULL && current_cframe->ignoring) + if (current_cframe == NULL || current_cframe->ignoring) { - operand.X_add_number = 0; while (! is_end_of_line[(unsigned char) *input_line_pointer]) ++input_line_pointer; + + if (current_cframe == NULL) + return; } else { + expressionS operand; + int t; + + /* Leading whitespace is part of operand. */ + SKIP_WHITESPACE (); + expression (&operand); if (operand.X_op != O_constant) as_bad (_("non-constant expression in \".elseif\" statement")); - } - - switch ((operatorT) arg) - { - case O_eq: t = operand.X_add_number == 0; break; - case O_ne: t = operand.X_add_number != 0; break; - case O_lt: t = operand.X_add_number < 0; break; - case O_le: t = operand.X_add_number <= 0; break; - case O_ge: t = operand.X_add_number >= 0; break; - case O_gt: t = operand.X_add_number > 0; break; - default: - abort (); - return; - } - current_cframe->ignoring = current_cframe->dead_tree || ! t; + switch ((operatorT) arg) + { + case O_eq: t = operand.X_add_number == 0; break; + case O_ne: t = operand.X_add_number != 0; break; + case O_lt: t = operand.X_add_number < 0; break; + case O_le: t = operand.X_add_number <= 0; break; + case O_ge: t = operand.X_add_number >= 0; break; + case O_gt: t = operand.X_add_number > 0; break; + default: + abort (); + return; + } + + current_cframe->ignoring = current_cframe->dead_tree || ! t; + } if (LISTING_SKIP_COND () - && current_cframe->ignoring && (current_cframe->previous_cframe == NULL || ! current_cframe->previous_cframe->ignoring)) - listing_list (2); + { + if (! current_cframe->ignoring) + listing_list (1); + else + listing_list (2); + } demand_empty_rest_of_line (); } -void +void s_endif (arg) int arg ATTRIBUTE_UNUSED; { @@ -356,16 +357,15 @@ s_endif (arg) } demand_empty_rest_of_line (); -} /* s_endif() */ +} -void +void s_else (arg) int arg ATTRIBUTE_UNUSED; { if (current_cframe == NULL) { as_bad (_(".else without matching .if - ignored")); - } else if (current_cframe->else_seen) { @@ -382,20 +382,21 @@ s_else (arg) as_where (¤t_cframe->else_file_line.file, ¤t_cframe->else_file_line.line); - if (!current_cframe->dead_tree) + current_cframe->ignoring = + current_cframe->dead_tree | !current_cframe->ignoring; + + if (LISTING_SKIP_COND () + && (current_cframe->previous_cframe == NULL + || ! current_cframe->previous_cframe->ignoring)) { - current_cframe->ignoring = !current_cframe->ignoring; - if (LISTING_SKIP_COND ()) - { - if (! current_cframe->ignoring) - listing_list (1); - else - listing_list (2); - } - } /* if not a dead tree */ + if (! current_cframe->ignoring) + listing_list (1); + else + listing_list (2); + } current_cframe->else_seen = 1; - } /* if error else do it */ + } if (flag_mri) { @@ -404,9 +405,9 @@ s_else (arg) } demand_empty_rest_of_line (); -} /* s_else() */ +} -void +void s_ifeqs (arg) int arg; { @@ -443,9 +444,9 @@ s_ifeqs (arg) listing_list (2); demand_empty_rest_of_line (); -} /* s_ifeqs() */ +} -int +int ignore_input () { char *s; @@ -477,9 +478,9 @@ ignore_input () return 0; return (current_cframe != NULL) && (current_cframe->ignoring); -} /* ignore_input() */ +} -static void +static void initialize_cframe (cframe) struct conditional_frame *cframe; { @@ -533,5 +534,3 @@ cond_exit_macro (nest) obstack_free (&cond_obstack, hold); } } - -/* end of cond.c */ diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in index 81f2ada..fc7ef2b 100644 --- a/contrib/binutils/gas/config.in +++ b/contrib/binutils/gas/config.in @@ -25,9 +25,6 @@ /* Define to `long' if <sys/types.h> doesn't define. */ #undef off_t -/* Define if you need to in order for stat and other things to work. */ -#undef _POSIX_SOURCE - /* Define to `unsigned' if <sys/types.h> doesn't define. */ #undef size_t @@ -151,6 +148,9 @@ /* Define if defaulting to ELF on SCO 5. */ #undef SCO_ELF +/* Using strict COFF? */ +#undef STRICTCOFF + /* Use ELF stabs for MIPS, not ECOFF stabs */ #undef MIPS_STABS_ELF diff --git a/contrib/binutils/gas/config/aout_gnu.h b/contrib/binutils/gas/config/aout_gnu.h index badf9cb..52ea70d 100644 --- a/contrib/binutils/gas/config/aout_gnu.h +++ b/contrib/binutils/gas/config/aout_gnu.h @@ -63,7 +63,6 @@ enum reloc_type #endif /* TC_SPARC or TC_A29K */ - #define __GNU_EXEC_MACROS__ #ifndef __STRUCT_EXEC_OVERRIDE__ @@ -183,7 +182,6 @@ enum machine_type sizeof (struct exec)) #endif - #ifndef N_DATOFF #define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text ) #endif @@ -317,7 +315,6 @@ struct reloc_ext_bytes unsigned char r_addend[4]; }; - #define RELOC_EXT_BITS_EXTERN_BIG 0x80 #define RELOC_EXT_BITS_EXTERN_LITTLE 0x01 @@ -345,8 +342,6 @@ struct reloc_info_extended /* The standard, old-fashioned, Berkeley compatible relocation struct */ - - #ifdef TC_I860 /* NOTE: three bits max, see struct reloc_info_i860.r_type */ enum i860_reloc_type @@ -362,7 +357,6 @@ enum highlow_type NO_SPEC = 0, PAIR, HIGH, HIGHADJ, }; - struct reloc_info_i860 { unsigned long r_address; @@ -381,7 +375,6 @@ struct reloc_info_i860 #endif /* TC_I860 */ - struct reloc_std_bytes { unsigned char r_address[4]; diff --git a/contrib/binutils/gas/config/atof-ieee.c b/contrib/binutils/gas/config/atof-ieee.c index 2e3c0dc..2a916cd 100644 --- a/contrib/binutils/gas/config/atof-ieee.c +++ b/contrib/binutils/gas/config/atof-ieee.c @@ -29,7 +29,7 @@ static void unget_bits PARAMS ((int)); static void make_invalid_floating_point_number PARAMS ((LITTLENUM_TYPE *)); extern const char EXP_CHARS[]; -/* Precision in LittleNums. */ +/* Precision in LittleNums. */ /* Don't count the gap in the m68k extended precision format. */ #define MAX_PRECISION (5) #define F_PRECISION (2) @@ -37,7 +37,7 @@ extern const char EXP_CHARS[]; #define X_PRECISION (5) #define P_PRECISION (5) -/* Length in LittleNums of guard bits. */ +/* Length in LittleNums of guard bits. */ #define GUARD (2) static const unsigned long mask[] = @@ -77,7 +77,6 @@ static const unsigned long mask[] = 0xffffffff, }; - static int bits_left_in_littlenum; static int littlenums_left; static LITTLENUM_TYPE *littlenum_pointer; @@ -100,18 +99,22 @@ next_bits (number_of_bits) { bits_left_in_littlenum = LITTLENUM_NUMBER_OF_BITS - number_of_bits; --littlenum_pointer; - return_value |= (*littlenum_pointer >> bits_left_in_littlenum) & mask[number_of_bits]; + return_value |= + (*littlenum_pointer >> bits_left_in_littlenum) + & mask[number_of_bits]; } } else { bits_left_in_littlenum -= number_of_bits; - return_value = mask[number_of_bits] & (*littlenum_pointer >> bits_left_in_littlenum); + return_value = + mask[number_of_bits] & (*littlenum_pointer >> bits_left_in_littlenum); } - return (return_value); + return return_value; } -/* Num had better be less than LITTLENUM_NUMBER_OF_BITS */ +/* Num had better be less than LITTLENUM_NUMBER_OF_BITS. */ + static void unget_bits (num) int num; @@ -124,7 +127,8 @@ unget_bits (num) } else if (bits_left_in_littlenum + num > LITTLENUM_NUMBER_OF_BITS) { - bits_left_in_littlenum = num - (LITTLENUM_NUMBER_OF_BITS - bits_left_in_littlenum); + bits_left_in_littlenum = + num - (LITTLENUM_NUMBER_OF_BITS - bits_left_in_littlenum); ++littlenum_pointer; ++littlenums_left; } @@ -137,7 +141,8 @@ make_invalid_floating_point_number (words) LITTLENUM_TYPE *words; { as_bad (_("cannot create floating-point number")); - words[0] = (LITTLENUM_TYPE) ((unsigned) -1) >> 1; /* Zero the leftmost bit */ + /* Zero the leftmost bit. */ + words[0] = (LITTLENUM_TYPE) ((unsigned) -1) >> 1; words[1] = (LITTLENUM_TYPE) -1; words[2] = (LITTLENUM_TYPE) -1; words[3] = (LITTLENUM_TYPE) -1; @@ -145,29 +150,27 @@ make_invalid_floating_point_number (words) words[5] = (LITTLENUM_TYPE) -1; } -/************************************************************************\ - * Warning: this returns 16-bit LITTLENUMs. It is up to the caller * - * to figure out any alignment problems and to conspire for the * - * bytes/word to be emitted in the right order. Bigendians beware! * - * * -\************************************************************************/ +/* Warning: This returns 16-bit LITTLENUMs. It is up to the caller to + figure out any alignment problems and to conspire for the + bytes/word to be emitted in the right order. Bigendians beware! */ /* Note that atof-ieee always has X and P precisions enabled. it is up to md_atof to filter them out if the target machine does not support them. */ -/* Returns pointer past text consumed. */ +/* Returns pointer past text consumed. */ + char * atof_ieee (str, what_kind, words) - char *str; /* Text to convert to binary. */ - int what_kind; /* 'd', 'f', 'g', 'h' */ - LITTLENUM_TYPE *words; /* Build the binary here. */ + char *str; /* Text to convert to binary. */ + int what_kind; /* 'd', 'f', 'g', 'h'. */ + LITTLENUM_TYPE *words; /* Build the binary here. */ { - /* Extra bits for zeroed low-order bits. The 1st MAX_PRECISION are - zeroed, the last contain flonum bits. */ + /* Extra bits for zeroed low-order bits. + The 1st MAX_PRECISION are zeroed, the last contain flonum bits. */ static LITTLENUM_TYPE bits[MAX_PRECISION + MAX_PRECISION + GUARD]; char *return_value; - /* Number of 16-bit words in the format. */ + /* Number of 16-bit words in the format. */ int precision; long exponent_bits; FLONUM_TYPE save_gen_flonum; @@ -186,7 +189,7 @@ atof_ieee (str, what_kind, words) generic_floating_point_number.sign = '\0'; /* Use more LittleNums than seems necessary: the highest flonum may - have 15 leading 0 bits, so could be useless. */ + have 15 leading 0 bits, so could be useless. */ memset (bits, '\0', sizeof (LITTLENUM_TYPE) * MAX_PRECISION); @@ -247,6 +250,7 @@ atof_ieee (str, what_kind, words) } /* Turn generic_floating_point_number into a real float/double/extended. */ + int gen_to_words (words, precision, exponent_bits) LITTLENUM_TYPE *words; @@ -274,17 +278,17 @@ gen_to_words (words, precision, exponent_bits) if (generic_floating_point_number.low > generic_floating_point_number.leader) { - /* 0.0e0 seen. */ + /* 0.0e0 seen. */ if (generic_floating_point_number.sign == '+') words[0] = 0x0000; else words[0] = 0x8000; memset (&words[1], '\0', (words_end - words - 1) * sizeof (LITTLENUM_TYPE)); - return (return_value); + return return_value; } - /* NaN: Do the right thing */ + /* NaN: Do the right thing. */ if (generic_floating_point_number.sign == 0) { if (precision == F_PRECISION) @@ -301,17 +305,17 @@ gen_to_words (words, precision, exponent_bits) words[3] = 0xffff; words[4] = 0xffff; words[5] = 0xffff; -#else /* ! TC_M68K */ +#else /* ! TC_M68K */ #ifdef TC_I386 words[0] = 0xffff; words[1] = 0xc000; words[2] = 0; words[3] = 0; words[4] = 0; -#else /* ! TC_I386 */ +#else /* ! TC_I386 */ abort (); -#endif /* ! TC_I386 */ -#endif /* ! TC_M68K */ +#endif /* ! TC_I386 */ +#endif /* ! TC_M68K */ } else { @@ -324,7 +328,7 @@ gen_to_words (words, precision, exponent_bits) } else if (generic_floating_point_number.sign == 'P') { - /* +INF: Do the right thing */ + /* +INF: Do the right thing. */ if (precision == F_PRECISION) { words[0] = 0x7f80; @@ -339,17 +343,17 @@ gen_to_words (words, precision, exponent_bits) words[3] = 0; words[4] = 0; words[5] = 0; -#else /* ! TC_M68K */ +#else /* ! TC_M68K */ #ifdef TC_I386 words[0] = 0x7fff; words[1] = 0x8000; words[2] = 0; words[3] = 0; words[4] = 0; -#else /* ! TC_I386 */ +#else /* ! TC_I386 */ abort (); -#endif /* ! TC_I386 */ -#endif /* ! TC_M68K */ +#endif /* ! TC_I386 */ +#endif /* ! TC_M68K */ } else { @@ -358,11 +362,11 @@ gen_to_words (words, precision, exponent_bits) words[2] = 0; words[3] = 0; } - return (return_value); + return return_value; } else if (generic_floating_point_number.sign == 'N') { - /* Negative INF */ + /* Negative INF. */ if (precision == F_PRECISION) { words[0] = 0xff80; @@ -377,17 +381,17 @@ gen_to_words (words, precision, exponent_bits) words[3] = 0; words[4] = 0; words[5] = 0; -#else /* ! TC_M68K */ +#else /* ! TC_M68K */ #ifdef TC_I386 words[0] = 0xffff; words[1] = 0x8000; words[2] = 0; words[3] = 0; words[4] = 0; -#else /* ! TC_I386 */ +#else /* ! TC_I386 */ abort (); -#endif /* ! TC_I386 */ -#endif /* ! TC_M68K */ +#endif /* ! TC_I386 */ +#endif /* ! TC_M68K */ } else { @@ -396,46 +400,49 @@ gen_to_words (words, precision, exponent_bits) words[2] = 0x0; words[3] = 0x0; } - return (return_value); + return return_value; } - /* - * The floating point formats we support have: - * Bit 15 is sign bit. - * Bits 14:n are excess-whatever exponent. - * Bits n-1:0 (if any) are most significant bits of fraction. - * Bits 15:0 of the next word(s) are the next most significant bits. - * - * So we need: number of bits of exponent, number of bits of - * mantissa. - */ + + /* The floating point formats we support have: + Bit 15 is sign bit. + Bits 14:n are excess-whatever exponent. + Bits n-1:0 (if any) are most significant bits of fraction. + Bits 15:0 of the next word(s) are the next most significant bits. + + So we need: number of bits of exponent, number of bits of + mantissa. */ bits_left_in_littlenum = LITTLENUM_NUMBER_OF_BITS; littlenum_pointer = generic_floating_point_number.leader; littlenums_left = (1 + generic_floating_point_number.leader - generic_floating_point_number.low); - /* Seek (and forget) 1st significant bit */ + + /* Seek (and forget) 1st significant bit. */ for (exponent_skippage = 0; !next_bits (1); ++exponent_skippage);; exponent_1 = (generic_floating_point_number.exponent + generic_floating_point_number.leader + 1 - generic_floating_point_number.low); + /* Radix LITTLENUM_RADIX, point just higher than - generic_floating_point_number.leader. */ + generic_floating_point_number.leader. */ exponent_2 = exponent_1 * LITTLENUM_NUMBER_OF_BITS; - /* Radix 2. */ + + /* Radix 2. */ exponent_3 = exponent_2 - exponent_skippage; - /* Forget leading zeros, forget 1st bit. */ + + /* Forget leading zeros, forget 1st bit. */ exponent_4 = exponent_3 + ((1 << (exponent_bits - 1)) - 2); - /* Offset exponent. */ + /* Offset exponent. */ lp = words; - /* Word 1. Sign, exponent and perhaps high bits. */ + /* Word 1. Sign, exponent and perhaps high bits. */ word1 = ((generic_floating_point_number.sign == '+') ? 0 : (1 << (LITTLENUM_NUMBER_OF_BITS - 1))); - /* Assume 2's complement integers. */ + /* Assume 2's complement integers. */ if (exponent_4 <= 0) { int prec_bits; @@ -443,7 +450,8 @@ gen_to_words (words, precision, exponent_bits) unget_bits (1); num_bits = -exponent_4; - prec_bits = LITTLENUM_NUMBER_OF_BITS * precision - (exponent_bits + 1 + num_bits); + prec_bits = + LITTLENUM_NUMBER_OF_BITS * precision - (exponent_bits + 1 + num_bits); #ifdef TC_I386 if (precision == X_PRECISION && exponent_bits == 15) { @@ -457,14 +465,15 @@ gen_to_words (words, precision, exponent_bits) if (num_bits >= LITTLENUM_NUMBER_OF_BITS - exponent_bits) { - /* Bigger than one littlenum */ + /* Bigger than one littlenum. */ num_bits -= (LITTLENUM_NUMBER_OF_BITS - 1) - exponent_bits; *lp++ = word1; - if (num_bits + exponent_bits + 1 > precision * LITTLENUM_NUMBER_OF_BITS) + if (num_bits + exponent_bits + 1 + > precision * LITTLENUM_NUMBER_OF_BITS) { - /* Exponent overflow */ + /* Exponent overflow. */ make_invalid_floating_point_number (words); - return (return_value); + return return_value; } #ifdef TC_M68K if (precision == X_PRECISION && exponent_bits == 15) @@ -490,14 +499,15 @@ gen_to_words (words, precision, exponent_bits) } else { - word1 |= next_bits ((LITTLENUM_NUMBER_OF_BITS - 1) - (exponent_bits + num_bits)); + word1 |= next_bits ((LITTLENUM_NUMBER_OF_BITS - 1) + - (exponent_bits + num_bits)); *lp++ = word1; } } while (lp < words_end) *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS); - /* Round the mantissa up, but don't change the number */ + /* Round the mantissa up, but don't change the number. */ if (next_bits (1)) { --lp; @@ -570,15 +580,11 @@ gen_to_words (words, precision, exponent_bits) } else if ((unsigned long) exponent_4 >= mask[exponent_bits]) { - /* - * Exponent overflow. Lose immediately. - */ - - /* - * We leave return_value alone: admit we read the - * number, but return a floating exception - * because we can't encode the number. - */ + /* Exponent overflow. Lose immediately. */ + + /* We leave return_value alone: admit we read the + number, but return a floating exception + because we can't encode the number. */ make_invalid_floating_point_number (words); return return_value; } @@ -591,7 +597,7 @@ gen_to_words (words, precision, exponent_bits) *lp++ = word1; /* X_PRECISION is special: on the 68k, it has 16 bits of zero in the - middle. Either way, it is then followed by a 1 bit. */ + middle. Either way, it is then followed by a 1 bit. */ if (exponent_bits == 15 && precision == X_PRECISION) { #ifdef TC_M68K @@ -601,21 +607,19 @@ gen_to_words (words, precision, exponent_bits) | next_bits (LITTLENUM_NUMBER_OF_BITS - 1)); } - /* The rest of the words are just mantissa bits. */ + /* The rest of the words are just mantissa bits. */ while (lp < words_end) *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS); if (next_bits (1)) { unsigned long carry; - /* - * Since the NEXT bit is a 1, round UP the mantissa. - * The cunning design of these hidden-1 floats permits - * us to let the mantissa overflow into the exponent, and - * it 'does the right thing'. However, we lose if the - * highest-order bit of the lowest-order word flips. - * Is that clear? - */ + /* Since the NEXT bit is a 1, round UP the mantissa. + The cunning design of these hidden-1 floats permits + us to let the mantissa overflow into the exponent, and + it 'does the right thing'. However, we lose if the + highest-order bit of the lowest-order word flips. + Is that clear? */ /* #if (sizeof(carry)) < ((sizeof(bits[0]) * BITS_PER_CHAR) + 2) Please allow at least 1 more bit in carry than is in a LITTLENUM. @@ -640,33 +644,36 @@ gen_to_words (words, precision, exponent_bits) { #ifdef TC_M68K /* On the m68k there is a gap of 16 bits. We must - explicitly propagate the carry into the exponent. */ + explicitly propagate the carry into the exponent. */ words[0] += words[1]; words[1] = 0; lp++; #endif - /* Put back the integer bit. */ + /* Put back the integer bit. */ lp[1] |= 1 << (LITTLENUM_NUMBER_OF_BITS - 1); } - } + } if ((word1 ^ *words) & (1 << (LITTLENUM_NUMBER_OF_BITS - 1))) { - /* We leave return_value alone: admit we read the - * number, but return a floating exception - * because we can't encode the number. - */ + /* We leave return_value alone: admit we read the number, + but return a floating exception because we can't encode + the number. */ *words &= ~(1 << (LITTLENUM_NUMBER_OF_BITS - 1)); - /* make_invalid_floating_point_number (words); */ - /* return return_value; */ +#if 0 + make_invalid_floating_point_number (words); + return return_value; +#endif } } - return (return_value); + return return_value; } -#if 0 /* unused */ +#if 0 +/* Unused. */ /* This routine is a real kludge. Someone really should do it better, but I'm too lazy, and I don't understand this stuff all too well anyway. (JF) */ + static void int_to_gen (x) long x; @@ -705,13 +712,9 @@ print_gen (gen) sprintf (sbuf + strlen (sbuf), "%x %x %.12g\n", arr[0], arr[1], fv); if (gen) - { - generic_floating_point_number = f; - } + generic_floating_point_number = f; return (sbuf); } #endif - -/* end of atof-ieee.c */ diff --git a/contrib/binutils/gas/config/obj-aout.c b/contrib/binutils/gas/config/obj-aout.c index eabbe92..67bb18e 100644 --- a/contrib/binutils/gas/config/obj-aout.c +++ b/contrib/binutils/gas/config/obj-aout.c @@ -17,7 +17,7 @@ the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +02111-1307, USA. */ #define OBJ_HEADER "obj-aout.h" @@ -99,13 +99,12 @@ const pseudo_typeS aout_pseudo_table[] = {NULL, NULL, 0} /* end sentinel */ }; /* aout_pseudo_table */ - #ifdef BFD_ASSEMBLER void obj_aout_frob_symbol (sym, punt) symbolS *sym; - int *punt; + int *punt ATTRIBUTE_UNUSED; { flagword flags; asection *sec; @@ -223,7 +222,7 @@ obj_aout_frob_file () #else /* ! BFD_ASSEMBLER */ -/* Relocation. */ +/* Relocation. */ /* * emit_relocations() @@ -233,7 +232,7 @@ obj_aout_frob_file () void obj_emit_relocations (where, fixP, segment_address_in_file) char **where; - fixS *fixP; /* Fixup chain for this segment. */ + fixS *fixP; /* Fixup chain for this segment. */ relax_addressT segment_address_in_file; { for (; fixP; fixP = fixP->fx_next) @@ -322,13 +321,13 @@ obj_emit_symbols (where, symbol_rootP) for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) { /* Used to save the offset of the name. It is used to point - to the string in memory but must be a file offset. */ + to the string in memory but must be a file offset. */ register char *temp; temp = S_GET_NAME (symbolP); S_SET_OFFSET (symbolP, symbolP->sy_name_offset); - /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */ + /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */ if (!S_IS_DEBUG (symbolP) && !S_IS_DEFINED (symbolP)) S_SET_EXTERNAL (symbolP); @@ -355,11 +354,11 @@ obj_emit_symbols (where, symbol_rootP) static void obj_aout_line (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* Assume delimiter is part of expression. BSD4.2 as fails with delightful bug, so we - are not being incompatible here. */ + are not being incompatible here. */ new_logical_line ((char *) NULL, (int) (get_absolute_expression ())); demand_empty_rest_of_line (); } /* obj_aout_line() */ @@ -368,7 +367,7 @@ obj_aout_line (ignore) static void obj_aout_weak (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int c; @@ -396,12 +395,12 @@ obj_aout_weak (ignore) /* Handle .type. On {Net,Open}BSD, this is used to set the n_other field, which is then apparently used when doing dynamic linking. Older - versions ogas ignored the .type pseudo-op, so we also ignore it if + versions of gas ignored the .type pseudo-op, so we also ignore it if we can't parse it. */ static void obj_aout_type (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int c; @@ -409,31 +408,28 @@ obj_aout_type (ignore) name = input_line_pointer; c = get_symbol_end (); - sym = symbol_find (name); + sym = symbol_find_or_make (name); *input_line_pointer = c; - if (sym != NULL) + SKIP_WHITESPACE (); + if (*input_line_pointer == ',') { + ++input_line_pointer; SKIP_WHITESPACE (); - if (*input_line_pointer == ',') + if (*input_line_pointer == '@') { ++input_line_pointer; - SKIP_WHITESPACE (); - if (*input_line_pointer == '@') - { - ++input_line_pointer; - if (strncmp (input_line_pointer, "object", 6) == 0) + if (strncmp (input_line_pointer, "object", 6) == 0) #ifdef BFD_ASSEMBLER - aout_symbol (symbol_get_bfdsym (sym))->other = 1; + aout_symbol (symbol_get_bfdsym (sym))->other = 1; #else - S_SET_OTHER (sym, 1); + S_SET_OTHER (sym, 1); #endif - else if (strncmp (input_line_pointer, "function", 8) == 0) + else if (strncmp (input_line_pointer, "function", 8) == 0) #ifdef BFD_ASSEMBLER - aout_symbol (symbol_get_bfdsym (sym))->other = 2; + aout_symbol (symbol_get_bfdsym (sym))->other = 2; #else - S_SET_OTHER (sym, 2); + S_SET_OTHER (sym, 2); #endif - } } } @@ -453,7 +449,7 @@ obj_crawl_symbol_chain (headers) tc_crawl_symbol_chain (headers); - symbolPP = &symbol_rootP; /*->last symbol chain link. */ + symbolPP = &symbol_rootP; /*->last symbol chain link. */ while ((symbolP = *symbolPP) != NULL) { if (symbolP->sy_mri_common) @@ -494,8 +490,7 @@ obj_crawl_symbol_chain (headers) switch was passed to gas. All other symbols are output. We complain if a deleted - symbol was marked external. */ - + symbol was marked external. */ if (!S_IS_REGISTER (symbolP) && (!S_GET_NAME (symbolP) @@ -511,11 +506,11 @@ obj_crawl_symbol_chain (headers) end of each string */ if (!S_IS_STABD (symbolP)) { - /* Ordinary case. */ + /* Ordinary case. */ symbolP->sy_name_offset = string_byte_count; string_byte_count += strlen (S_GET_NAME (symbolP)) + 1; } - else /* .Stabd case. */ + else /* .Stabd case. */ symbolP->sy_name_offset = 0; symbolPP = &symbolP->sy_next; } @@ -527,7 +522,7 @@ obj_crawl_symbol_chain (headers) register names... */ { as_bad (_("Local symbol %s never defined."), decode_local_label_name (S_GET_NAME (symbolP))); - } /* oops. */ + } /* oops. */ /* Unhook it from the chain */ *symbolPP = symbol_next (symbolP); @@ -578,7 +573,7 @@ obj_pre_write_hook (headers) } void -DEFUN_VOID (s_sect) +s_sect () { /* Strip out the section name */ char *section_name; @@ -641,7 +636,14 @@ DEFUN_VOID (s_sect) static void aout_pop_insert PARAMS ((void)); static int obj_aout_s_get_other PARAMS ((symbolS *)); +static void obj_aout_s_set_other PARAMS ((symbolS *, int)); static int obj_aout_s_get_desc PARAMS ((symbolS *)); +static void obj_aout_s_set_desc PARAMS ((symbolS *, int)); +static int obj_aout_s_get_type PARAMS ((symbolS *)); +static void obj_aout_s_set_type PARAMS ((symbolS *, int)); +static int obj_aout_separate_stab_sections PARAMS ((void)); +static int obj_aout_sec_sym_ok_for_reloc PARAMS ((asection *)); +static void obj_aout_process_stab PARAMS ((segT, int, const char *, int, int, int)); static void aout_pop_insert () @@ -656,6 +658,33 @@ obj_aout_s_get_other (sym) return aout_symbol (symbol_get_bfdsym (sym))->other; } +static void +obj_aout_s_set_other (sym, o) + symbolS *sym; + int o; +{ + aout_symbol (symbol_get_bfdsym (sym))->other = o; +} + +static int +obj_aout_sec_sym_ok_for_reloc (sec) + asection *sec ATTRIBUTE_UNUSED; +{ + return obj_sec_sym_ok_for_reloc (sec); +} + +static void +obj_aout_process_stab (seg, w, s, t, o, d) + segT seg ATTRIBUTE_UNUSED; + int w; + const char *s; + int t; + int o; + int d; +{ + aout_process_stab (w, s, t, o, d); +} + static int obj_aout_s_get_desc (sym) symbolS *sym; @@ -663,30 +692,67 @@ obj_aout_s_get_desc (sym) return aout_symbol (symbol_get_bfdsym (sym))->desc; } +static void +obj_aout_s_set_desc (sym, d) + symbolS *sym; + int d; +{ + aout_symbol (symbol_get_bfdsym (sym))->desc = d; +} + +static int +obj_aout_s_get_type (sym) + symbolS *sym; +{ + return aout_symbol (symbol_get_bfdsym (sym))->type; +} +static void +obj_aout_s_set_type (sym, t) + symbolS *sym; + int t; +{ + aout_symbol (symbol_get_bfdsym (sym))->type = t; +} + +static int +obj_aout_separate_stab_sections () +{ + return 0; +} + +/* When changed, make sure these table entries match the single-format + definitions in obj-aout.h. */ const struct format_ops aout_format_ops = { bfd_target_aout_flavour, 1, /* dfl_leading_underscore */ 0, /* emit_section_symbols */ + 0, /* begin */ + 0, /* app_file */ obj_aout_frob_symbol, obj_aout_frob_file, + 0, /* frob_file_before_adjust */ 0, /* frob_file_after_relocs */ 0, /* s_get_size */ 0, /* s_set_size */ 0, /* s_get_align */ 0, /* s_set_align */ obj_aout_s_get_other, + obj_aout_s_set_other, obj_aout_s_get_desc, + obj_aout_s_set_desc, + obj_aout_s_get_type, + obj_aout_s_set_type, 0, /* copy_symbol_attributes */ 0, /* generate_asm_lineno */ - 0, /* process_stab */ - 0, /* sec_sym_ok_for_reloc */ + obj_aout_process_stab, + obj_aout_separate_stab_sections, + 0, /* init_stab_section */ + obj_aout_sec_sym_ok_for_reloc, aout_pop_insert, 0, /* ecoff_set_ext */ 0, /* read_begin_hook */ 0 /* symbol_new_hook */ }; #endif BFD_ASSEMBLER - -/* end of obj-aout.c */ diff --git a/contrib/binutils/gas/config/obj-aout.h b/contrib/binutils/gas/config/obj-aout.h index d08302a..d91cc48 100644 --- a/contrib/binutils/gas/config/obj-aout.h +++ b/contrib/binutils/gas/config/obj-aout.h @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ /* Tag to validate a.out object file format processing */ #define OBJ_AOUT 1 @@ -33,7 +33,7 @@ #else /* ! BFD_ASSEMBLER */ #ifndef VMS -#include "aout_gnu.h" /* Needed to define struct nlist. Sigh. */ +#include "aout_gnu.h" /* Needed to define struct nlist. Sigh. */ #else #include "a_out.h" #endif @@ -229,12 +229,12 @@ extern void obj_aout_frob_file PARAMS ((void)); typedef struct { struct exec header; /* a.out header */ - long string_table_size; /* names + '\0' + sizeof(int) */ + long string_table_size; /* names + '\0' + sizeof (int) */ } object_headers; -/* line numbering stuff. */ +/* line numbering stuff. */ #define OBJ_EMIT_LINENO(a, b, c) {;} struct fix; @@ -248,5 +248,3 @@ void tc_aout_fix_to_chars PARAMS ((char *where, struct fix *fixP, relax_addressT #define EMIT_SECTION_SYMBOLS 0 #define AOUT_STABS - -/* end of obj-aout.h */ diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c index a0847c4..e16e5df 100644 --- a/contrib/binutils/gas/config/obj-coff.c +++ b/contrib/binutils/gas/config/obj-coff.c @@ -30,6 +30,13 @@ #define KEEP_RELOC_INFO #endif +/* The BFD_ASSEMBLER version of obj_coff_section will use this macro to set + a new section's attributes when a directive has no valid flags or the + "w" flag is used. This default should be appropriate for most. */ +#ifndef TC_COFF_SECTION_DEFAULT_ATTRIBUTES +#define TC_COFF_SECTION_DEFAULT_ATTRIBUTES (SEC_LOAD | SEC_DATA) +#endif + static void obj_coff_bss PARAMS ((int)); const char *s_get_name PARAMS ((symbolS * s)); static void obj_coff_ln PARAMS ((int)); @@ -204,7 +211,7 @@ obj_coff_weak (ignore) char *name; int c; symbolS *symbolP; - + do { name = input_line_pointer; @@ -213,7 +220,7 @@ obj_coff_weak (ignore) *input_line_pointer = c; SKIP_WHITESPACE (); -#ifdef BFD_ASSEMBLER +#if defined BFD_ASSEMBLER || defined S_SET_WEAK S_SET_WEAK (symbolP); #endif @@ -241,7 +248,7 @@ obj_coff_weak (ignore) static void SA_SET_SYM_TAGNDX PARAMS ((symbolS *, symbolS *)); #define GET_FILENAME_STRING(X) \ -((char*)(&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1]) +((char*) (&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1]) /* @@ Ick. */ static segT @@ -316,7 +323,7 @@ S_SET_STORAGE_CLASS (sym, val) return val; } -/* Merge a debug symbol containing debug information into a normal symbol. */ +/* Merge a debug symbol containing debug information into a normal symbol. */ void c_symbol_merge (debug, normal) @@ -340,13 +347,13 @@ c_symbol_merge (debug, normal) * sizeof (*SYM_AUXINFO (debug)))); } - /* Move the debug flags. */ + /* Move the debug flags. */ SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug)); } void c_dot_file_symbol (filename) - char *filename; + const char *filename; { symbolS *symbolP; @@ -401,7 +408,7 @@ coff_obj_symbol_new_hook (symbolP) { long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type); char * s = (char *) xmalloc (sz); - + memset (s, 0, sz); coffsymbol (symbol_get_bfdsym (symbolP))->native = (combined_entry_type *) s; @@ -411,7 +418,7 @@ coff_obj_symbol_new_hook (symbolP) if (S_IS_STRING (symbolP)) SF_SET_STRING (symbolP); - + if (S_IS_LOCAL (symbolP)) SF_SET_LOCAL (symbolP); } @@ -429,7 +436,7 @@ int coff_n_line_nos; static void add_lineno (frag, offset, num) fragS *frag; - int offset; + addressT offset; int num; { struct line_no *new_line = @@ -438,7 +445,7 @@ add_lineno (frag, offset, num) { abort (); } - if (num <= 0) + if (num <= 0) { /* Zero is used as an end marker in the file. */ as_warn (_("Line numbers must be positive integers\n")); @@ -652,7 +659,7 @@ static void obj_coff_endef (ignore) int ignore ATTRIBUTE_UNUSED; { - symbolS *symbolP; + symbolS *symbolP = NULL; /* DIM BUG FIX sac@cygnus.com */ dim_index = 0; @@ -663,7 +670,7 @@ obj_coff_endef (ignore) return; } /* if not inside .def/.endef */ - /* Set the section number according to storage class. */ + /* Set the section number according to storage class. */ switch (S_GET_STORAGE_CLASS (def_symbol_in_progress)) { case C_STRTAG: @@ -678,7 +685,7 @@ obj_coff_endef (ignore) break; case C_EFCN: - SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ + SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ /* intentional fallthrough */ case C_BLOCK: SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing */ @@ -693,7 +700,7 @@ obj_coff_endef (ignore) { switch (name[1]) { - case 'b': + case 'b': /* .bf */ if (! in_function ()) as_warn (_("`%s' symbol without preceding function"), name); @@ -702,12 +709,12 @@ obj_coff_endef (ignore) clear_function (); break; #ifdef TE_PE - case 'e': + case 'e': /* .ef */ /* The MS compilers output the actual endline, not the function-relative one... we want to match without changing the assembler input. */ - SA_SET_SYM_LNNO (def_symbol_in_progress, + SA_SET_SYM_LNNO (def_symbol_in_progress, (SA_GET_SYM_LNNO (def_symbol_in_progress) + coff_line_base)); break; @@ -725,16 +732,49 @@ obj_coff_endef (ignore) case C_ARG: case C_REGPARM: case C_FIELD: + + /* According to the COFF documentation: + + http://osr5doc.sco.com:1996/topics/COFF_SectNumFld.html + + A special section number (-2) marks symbolic debugging symbols, + including structure/union/enumeration tag names, typedefs, and + the name of the file. A section number of -1 indicates that the + symbol has a value but is not relocatable. Examples of + absolute-valued symbols include automatic and register variables, + function arguments, and .eos symbols. + + But from Ian Lance Taylor: + + http://sources.redhat.com/ml/binutils/2000-08/msg00202.html + + the actual tools all marked them as section -1. So the GNU COFF + assembler follows historical COFF assemblers. + + However, it causes problems for djgpp + + http://sources.redhat.com/ml/binutils/2000-08/msg00210.html + + By defining STRICTCOFF, a COFF port can make the assembler to + follow the documented behavior. */ +#ifdef STRICTCOFF + case C_MOS: + case C_MOE: + case C_MOU: + case C_EOS: +#endif SF_SET_DEBUG (def_symbol_in_progress); S_SET_SEGMENT (def_symbol_in_progress, absolute_section); break; +#ifndef STRICTCOFF case C_MOS: case C_MOE: case C_MOU: case C_EOS: S_SET_SEGMENT (def_symbol_in_progress, absolute_section); break; +#endif case C_EXT: case C_WEAKEXT: @@ -768,11 +808,11 @@ obj_coff_endef (ignore) lineno entry MUST point to the definition function or else it will point off into space when obj_crawl_symbol_chain() merges the debug symbol into the real symbol. Therefor, let's presume - the debug symbol is a real function reference. */ + the debug symbol is a real function reference. */ /* FIXME-SOON If for some reason the definition label/symbol is never seen, this will probably leave an undefined symbol at link - time. */ + time. */ if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN || S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL @@ -803,7 +843,7 @@ obj_coff_endef (ignore) symbols. [loic] */ /* The debug entry (def_symbol_in_progress) is merged into the - previous definition. */ + previous definition. */ c_symbol_merge (def_symbol_in_progress, symbolP); symbol_remove (def_symbol_in_progress, &symbol_rootP, &symbol_lastP); @@ -816,7 +856,7 @@ obj_coff_endef (ignore) { /* For functions, and tags, and static symbols, the symbol *must* be where the debug symbol appears. Move the - existing symbol to the current place. */ + existing symbol to the current place. */ /* If it already is at the end of the symbol list, do nothing */ if (def_symbol_in_progress != symbol_lastP) { @@ -846,7 +886,7 @@ obj_coff_endef (ignore) if (symbolP == NULL) { /* That is, if this is the first time we've seen the - function... */ + function... */ symbol_table_insert (def_symbol_in_progress); } /* definition follows debug */ } /* Create the line number entry pointing to the function being defined */ @@ -982,7 +1022,7 @@ obj_coff_tag (ignore) #endif /* Assume that the symbol referred to by .tag is always defined. - This was a bad assumption. I've added find_or_make. xoxorich. */ + This was a bad assumption. I've added find_or_make. xoxorich. */ SA_SET_SYM_TAGNDX (def_symbol_in_progress, tag_find_or_make (symbol_name)); if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L) @@ -1065,7 +1105,7 @@ obj_coff_val (ignore) just below. */ } /* Otherwise, it is the name of a non debug symbol and its value - will be calculated later. */ + will be calculated later. */ *input_line_pointer = name_end; } else @@ -1079,7 +1119,7 @@ obj_coff_val (ignore) void coff_obj_read_begin_hook () { - /* These had better be the same. Usually 18 bytes. */ + /* These had better be the same. Usually 18 bytes. */ #ifndef BFD_HEADERS know (sizeof (SYMENT) == sizeof (AUXENT)); know (SYMESZ == AUXESZ); @@ -1087,7 +1127,6 @@ coff_obj_read_begin_hook () tag_init (); } - symbolS *coff_last_function; static symbolS *coff_last_bf; @@ -1132,11 +1171,14 @@ coff_frob_symbol (symp, punt) symbolS *real; if (!SF_GET_LOCAL (symp) && !SF_GET_STATICS (symp) + && S_GET_STORAGE_CLASS (symp) != C_LABEL + && symbol_constant_p(symp) && (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP)) && real != symp) { c_symbol_merge (symp, real); *punt = 1; + return; } if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp)) { @@ -1196,7 +1238,7 @@ coff_frob_symbol (symp, punt) if (SF_GET_FUNCTION (symp)) symbol_get_bfdsym (symp)->flags |= BSF_FUNCTION; - /* more ... */ + /* more ... */ } /* Double check weak symbols. */ @@ -1353,7 +1395,7 @@ obj_coff_section (ignore) char c; char *name; unsigned int exp; - flagword flags; + flagword flags, oldflags; asection *sec; if (flag_mri) @@ -1375,7 +1417,7 @@ obj_coff_section (ignore) SKIP_WHITESPACE (); exp = 0; - flags = SEC_LOAD; + flags = SEC_NO_FLAGS; if (*input_line_pointer == ',') { @@ -1420,18 +1462,35 @@ obj_coff_section (ignore) sec = subseg_new (name, (subsegT) exp); - if (flags != SEC_NO_FLAGS) + oldflags = bfd_get_section_flags (stdoutput, sec); + if (oldflags == SEC_NO_FLAGS) { - flagword oldflags; + /* Set section flags for a new section just created by subseg_new. + Provide a default if no flags were parsed. */ + if (flags == SEC_NO_FLAGS) + flags = TC_COFF_SECTION_DEFAULT_ATTRIBUTES; - oldflags = bfd_get_section_flags (stdoutput, sec); - oldflags &= SEC_LINK_ONCE | SEC_LINK_DUPLICATES; - flags |= oldflags; +#ifdef COFF_LONG_SECTION_NAMES + /* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce + sections so adjust_reloc_syms in write.c will correctly handle + relocs which refer to non-local symbols in these sections. */ + if (strncmp (name, ".gnu.linkonce", sizeof (".gnu.linkonce") - 1) == 0) + flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; +#endif if (! bfd_set_section_flags (stdoutput, sec, flags)) - as_warn (_("error setting flags for \"%s\": %s"), - bfd_section_name (stdoutput, sec), - bfd_errmsg (bfd_get_error ())); + as_warn (_("error setting flags for \"%s\": %s"), + bfd_section_name (stdoutput, sec), + bfd_errmsg (bfd_get_error ())); + } + else if (flags != SEC_NO_FLAGS) + { + /* This section's attributes have already been set. Warn if the + attributes don't match. */ + flagword matchflags = SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE + | SEC_DATA | SEC_SHARED; + if ((flags ^ oldflags) & matchflags) + as_warn (_("Ignoring changed section attributes for %s"), name); } demand_empty_rest_of_line (); @@ -1459,14 +1518,26 @@ coff_frob_section (sec) rounded up to multiples of the corresponding section alignments, supposedly because standard COFF has no other way of encoding alignment for sections. If your COFF flavor has a different way of encoding - section alignment, then skip this step, as TICOFF does. */ + section alignment, then skip this step, as TICOFF does. */ size = bfd_get_section_size_before_reloc (sec); mask = ((bfd_vma) 1 << align_power) - 1; #if !defined(TICOFF) if (size & mask) { - size = (size + mask) & ~mask; - bfd_set_section_size (stdoutput, sec, size); + bfd_vma new_size; + fragS *last; + + new_size = (size + mask) & ~mask; + bfd_set_section_size (stdoutput, sec, new_size); + + /* If the size had to be rounded up, add some padding in + the last non-empty frag. */ + fragp = seg_info (sec)->frchainP->frch_root; + last = seg_info (sec)->frchainP->frch_last; + while (fragp->fr_next != last) + fragp = fragp->fr_next; + last->fr_address = size; + fragp->fr_offset += new_size - size; } #endif @@ -1526,9 +1597,9 @@ obj_coff_init_stab_section (seg) char *stabstr_name; unsigned int stroff; - /* Make space for this first symbol. */ + /* Make space for this first symbol. */ p = frag_more (12); - /* Zero it out. */ + /* Zero it out. */ memset (p, 0, 12); as_where (&file, (unsigned int *) NULL); stabstr_name = (char *) alloca (strlen (seg->name) + 4); @@ -1555,7 +1626,7 @@ symbol_dump () for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) { - printf(_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"), + printf (_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"), (unsigned long) symbolP, S_GET_NAME(symbolP), (long) S_GET_DATA_TYPE(symbolP), @@ -1569,7 +1640,7 @@ symbol_dump () #else /* not BFD_ASSEMBLER */ #include "frags.h" -/* This is needed because we include internal bfd things. */ +/* This is needed because we include internal bfd things. */ #include <time.h> #include "libbfd.h" @@ -1616,7 +1687,7 @@ int function_lineoff = -1; /* Offset in line#s where the last function /* structure used to keep the filenames which are too long around so that we can stick them into the string table */ -struct filename_list +struct filename_list { char *filename; struct filename_list *next; @@ -1641,22 +1712,18 @@ bfd *abfd; static void fixup_segment PARAMS ((segment_info_type *segP, segT this_segment_type)); - static void fixup_mdeps PARAMS ((fragS *, object_headers *, segT)); - static void fill_section PARAMS ((bfd * abfd, object_headers *, unsigned long *)); - static int c_line_new PARAMS ((symbolS * symbol, long paddr, int line_number, fragS * frag)); - static void w_symbols PARAMS ((bfd * abfd, char *where, symbolS * symbol_rootP)); @@ -1717,7 +1784,6 @@ relax_align (address, alignment) return (new_address - address); } - segT s_get_segment (x) symbolS * x; @@ -1760,6 +1826,7 @@ size_section (abfd, idx) break; case rs_align: case rs_align_code: + case rs_align_test: { addressT off; @@ -1780,7 +1847,6 @@ size_section (abfd, idx) return size; } - static unsigned int count_entries_in_chain (idx) unsigned int idx; @@ -1986,7 +2052,6 @@ do_relocs_for (abfd, h, file_cursor) H_SET_RELOCATION_SIZE (h, *file_cursor - reloc_start, 0); } - /* run through a frag chain and write out the data to go with it, fill in the scnhdrs with the info on the file postions */ @@ -2071,6 +2136,7 @@ fill_section (abfd, h, file_cursor) case rs_fill: case rs_align: case rs_align_code: + case rs_align_test: case rs_org: if (frag->fr_fix) { @@ -2181,7 +2247,6 @@ coff_header_append (abfd, h) } } - char * symbol_to_chars (abfd, where, symbolP) bfd * abfd; @@ -2232,7 +2297,7 @@ coff_obj_symbol_new_hook (symbolP) char underscore = 0; /* Symbol has leading _ */ /* Effective symbol */ - /* Store the pointer in the offset. */ + /* Store the pointer in the offset. */ S_SET_ZEROES (symbolP, 0L); S_SET_DATA_TYPE (symbolP, T_NULL); S_SET_STORAGE_CLASS (symbolP, 0); @@ -2360,7 +2425,6 @@ obj_coff_def (what) unsigned int dim_index; - static void obj_coff_endef (ignore) int ignore ATTRIBUTE_UNUSED; @@ -2375,7 +2439,7 @@ obj_coff_endef (ignore) return; } /* if not inside .def/.endef */ - /* Set the section number according to storage class. */ + /* Set the section number according to storage class. */ switch (S_GET_STORAGE_CLASS (def_symbol_in_progress)) { case C_STRTAG: @@ -2390,7 +2454,7 @@ obj_coff_endef (ignore) break; case C_EFCN: - SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ + SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ /* intentional fallthrough */ case C_BLOCK: SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing */ @@ -2411,7 +2475,7 @@ obj_coff_endef (ignore) SF_SET_PROCESS (def_symbol_in_progress); function_lineoff = -1; } - /* Value is always set to . */ + /* Value is always set to . */ def_symbol_in_progress->sy_frag = frag_now; S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ()); break; @@ -2462,11 +2526,11 @@ obj_coff_endef (ignore) lineno entry MUST point to the definition function or else it will point off into space when crawl_symbols() merges the debug symbol into the real symbol. Therefor, let's presume the debug - symbol is a real function reference. */ + symbol is a real function reference. */ /* FIXME-SOON If for some reason the definition label/symbol is never seen, this will probably leave an undefined symbol at link - time. */ + time. */ if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN || S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL @@ -2492,7 +2556,7 @@ obj_coff_endef (ignore) previous definition. */ c_symbol_merge (def_symbol_in_progress, symbolP); - /* FIXME-SOON Should *def_symbol_in_progress be free'd? xoxorich. */ + /* FIXME-SOON Should *def_symbol_in_progress be free'd? xoxorich. */ def_symbol_in_progress = symbolP; if (SF_GET_FUNCTION (def_symbol_in_progress) @@ -2501,7 +2565,7 @@ obj_coff_endef (ignore) { /* For functions, and tags, and static symbols, the symbol *must* be where the debug symbol appears. Move the - existing symbol to the current place. */ + existing symbol to the current place. */ /* If it already is at the end of the symbol list, do nothing */ if (def_symbol_in_progress != symbol_lastP) { @@ -2535,7 +2599,7 @@ obj_coff_endef (ignore) if (symbolP == NULL) { /* That is, if this is the first time we've seen the - function... */ + function... */ symbol_table_insert (def_symbol_in_progress); } /* definition follows debug */ } /* Create the line number entry pointing to the function being defined */ @@ -2682,7 +2746,7 @@ obj_coff_tag (ignore) #endif /* Assume that the symbol referred to by .tag is always defined. - This was a bad assumption. I've added find_or_make. xoxorich. */ + This was a bad assumption. I've added find_or_make. xoxorich. */ SA_SET_SYM_TAGNDX (def_symbol_in_progress, (long) tag_find_or_make (symbol_name)); if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L) @@ -2764,7 +2828,7 @@ obj_coff_val (ignore) just below. */ } /* Otherwise, it is the name of a non debug symbol and - its value will be calculated later. */ + its value will be calculated later. */ *input_line_pointer = name_end; /* FIXME: this is to avoid an error message in the @@ -2802,7 +2866,7 @@ obj_coff_pe_handle_link_once (type) void coff_obj_read_begin_hook () { - /* These had better be the same. Usually 18 bytes. */ + /* These had better be the same. Usually 18 bytes. */ #ifndef BFD_HEADERS know (sizeof (SYMENT) == sizeof (AUXENT)); know (SYMESZ == AUXESZ); @@ -2857,7 +2921,7 @@ yank_symbols () /* Debug symbols do not need all this rubbish */ symbolS *real_symbolP; - /* L* and C_EFCN symbols never merge. */ + /* L* and C_EFCN symbols never merge. */ if (!SF_GET_LOCAL (symbolP) && !SF_GET_STATICS (symbolP) && S_GET_STORAGE_CLASS (symbolP) != C_LABEL @@ -2866,12 +2930,12 @@ yank_symbols () && real_symbolP != symbolP) { /* FIXME-SOON: where do dups come from? - Maybe tag references before definitions? xoxorich. */ + Maybe tag references before definitions? xoxorich. */ /* Move the debug data from the debug symbol to the real symbol. Do NOT do the oposite (i.e. move from real symbol to debug symbol and remove real symbol from the list.) Because some pointers refer to the real symbol - whereas no pointers refer to the debug symbol. */ + whereas no pointers refer to the debug symbol. */ c_symbol_merge (symbolP, real_symbolP); /* Replace the current symbol by the real one */ /* The symbols will never be the last or the first @@ -2909,7 +2973,7 @@ yank_symbols () /* Mainly to speed up if not -g */ if (SF_GET_PROCESS (symbolP)) { - /* Handle the nested blocks auxiliary info. */ + /* Handle the nested blocks auxiliary info. */ if (S_GET_STORAGE_CLASS (symbolP) == C_BLOCK) { if (!strcmp (S_GET_NAME (symbolP), ".bb")) @@ -2927,7 +2991,7 @@ yank_symbols () /* If we are able to identify the type of a function, and we are out of a function (last_functionP == 0) then, the function symbol will be associated with an auxiliary - entry. */ + entry. */ if (last_functionP == (symbolS *) 0 && SF_GET_FUNCTION (symbolP)) { @@ -2938,7 +3002,7 @@ yank_symbols () S_SET_NUMBER_AUXILIARY (symbolP, 1); } /* make it at least 1 */ - /* Clobber possible stale .dim information. */ + /* Clobber possible stale .dim information. */ #if 0 /* Iffed out by steve - this fries the lnnoptr info too */ bzero (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen, @@ -2971,7 +3035,7 @@ yank_symbols () else if (SF_GET_TAG (symbolP)) { /* First descriptor of a structure must point to - the first slot after the structure description. */ + the first slot after the structure description. */ last_tagP = symbolP; } @@ -3011,8 +3075,7 @@ yank_symbols () [21] foo external [22] .be ld will move the symbol 21 to the end of the list but - endndx will still be 22 instead of 21. */ - + endndx will still be 22 instead of 21. */ if (SF_GET_LOCAL (symbolP)) { @@ -3086,7 +3149,6 @@ yank_symbols () } - static unsigned int glue_symbols (head, tail) symbolS **head; @@ -3165,7 +3227,7 @@ crawl_symbols (h, abfd) * undefined symbols at the end of the list. */ - /* Is there a .file symbol ? If not insert one at the beginning. */ + /* Is there a .file symbol ? If not insert one at the beginning. */ if (symbol_rootP == NULL || S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE) { @@ -3176,7 +3238,6 @@ crawl_symbols (h, abfd) * Build up static symbols for the sections, they are filled in later */ - for (i = SEG_E0; i < SEG_LAST; i++) if (segment_info[i].scnhdr.s_name[0]) segment_info[i].dot = c_section_symbol (segment_info[i].name, @@ -3272,7 +3333,6 @@ do_linenos_for (abfd, h, file_cursor) { segment_info_type *s = segment_info + idx; - if (s->scnhdr.s_nlnno != 0) { struct lineno_list *line_ptr; @@ -3301,7 +3361,6 @@ do_linenos_for (abfd, h, file_cursor) line_ptr->line.l_addr.l_paddr += ((struct frag *) (line_ptr->frag))->fr_address; } - (void) bfd_coff_swap_lineno_out (abfd, &(line_ptr->line), dst); dst++; @@ -3318,7 +3377,6 @@ do_linenos_for (abfd, h, file_cursor) H_SET_LINENO_SIZE (h, *file_cursor - start); } - /* Now we run through the list of frag chains in a segment and make all the subsegment frags appear at the end of the list, as if the seg 0 was extra long */ @@ -3359,7 +3417,6 @@ write_object_file () unsigned int addr; abfd = bfd_openw (out_file_name, TARGET_FORMAT); - if (abfd == 0) { as_perror (_("FATAL: Can't create %s"), out_file_name); @@ -3388,21 +3445,22 @@ write_object_file () md_do_align (SUB_SEGMENT_ALIGN (now_seg), (char *) NULL, 0, 0, alignment_done); #endif - frag_align (SUB_SEGMENT_ALIGN (now_seg), - subseg_text_p (now_seg) ? NOP_OPCODE : 0, - 0); + if (subseg_text_p (now_seg)) + frag_align_code (SUB_SEGMENT_ALIGN (now_seg), 0); + else + frag_align (SUB_SEGMENT_ALIGN (now_seg), 0, 0); + #ifdef md_do_align alignment_done: #endif + frag_wane (frag_now); frag_now->fr_fix = 0; know (frag_now->fr_next == NULL); } - remove_subsegs (); - for (i = SEG_E0; i < SEG_UNKNOWN; i++) { relax_segment (segment_info[i].frchainP->frch_root, i); @@ -3476,7 +3534,7 @@ write_object_file () } /* Look for ".stab" segments and fill in their initial symbols - correctly. */ + correctly. */ for (i = SEG_E0; i < SEG_UNKNOWN; i++) { name = segment_info[i].name; @@ -3537,7 +3595,7 @@ write_object_file () coff_header_append (abfd, &headers); #if 0 /* Recent changes to write need this, but where it should - go is up to Ken.. */ + go is up to Ken.. */ if (bfd_close_all_done (abfd) == false) as_fatal (_("Can't close %s: %s"), out_file_name, bfd_errmsg (bfd_get_error ())); @@ -3683,7 +3741,6 @@ obj_coff_section (ignore) demand_empty_rest_of_line (); } - static void obj_coff_text (ignore) int ignore ATTRIBUTE_UNUSED; @@ -3691,7 +3748,6 @@ obj_coff_text (ignore) subseg_new (".text", get_absolute_expression ()); } - static void obj_coff_data (ignore) int ignore ATTRIBUTE_UNUSED; @@ -3733,7 +3789,7 @@ c_symbol_merge (debug, normal) (unsigned int) (S_GET_NUMBER_AUXILIARY (debug) * AUXESZ)); } /* Move all the auxiliary information */ - /* Move the debug flags. */ + /* Move the debug flags. */ SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug)); } /* c_symbol_merge() */ @@ -3763,7 +3819,6 @@ c_line_new (symbol, paddr, line_number, frag) new_line->frag = (char *) frag; new_line->next = (struct lineno_list *) NULL; - if (s->lineno_list_head == (struct lineno_list *) NULL) { s->lineno_list_head = new_line; @@ -3805,13 +3860,13 @@ c_dot_file_symbol (filename) SA_SET_FILE_FNAME_ZEROS (symbolP, 0); SA_SET_FILE_FNAME_OFFSET (symbolP, 1); - if (filename_list_tail) + if (filename_list_tail) filename_list_tail->next = f; else filename_list_head = f; - filename_list_tail = f; + filename_list_tail = f; } - else + else { SA_SET_FILE_FNAME (symbolP, filename); } @@ -3930,7 +3985,7 @@ w_symbols (abfd, where, symbol_rootP) for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) { /* Used to save the offset of the name. It is used to point - to the string in memory but must be a file offset. */ + to the string in memory but must be a file offset. */ register char *temp; /* We can't fix the lnnoptr field in yank_symbols with the other @@ -4042,6 +4097,7 @@ fixup_mdeps (frags, h, this_segment) { case rs_align: case rs_align_code: + case rs_align_test: case rs_org: #ifdef HANDLE_ALIGN HANDLE_ALIGN (frags); @@ -4112,7 +4168,7 @@ fixup_segment (segP, this_segment_type) if (fixP->fx_tcbit && SF_GET_CALLNAME (add_symbolP)) { /* Relocation should be done via the associated 'bal' entry - point symbol. */ + point symbol. */ if (!SF_GET_BALNAME (tc_get_bal_of_call (add_symbolP))) { @@ -4210,7 +4266,7 @@ fixup_segment (segP, this_segment_type) { /* Difference of 2 symbols from same segment. Can't make difference of 2 undefineds: 'value' means - something different for N_UNDF. */ + something different for N_UNDF. */ #ifdef TC_I960 /* Makes no sense to use the difference of 2 arbitrary symbols as the target of a call instruction. */ @@ -4237,7 +4293,7 @@ fixup_segment (segP, this_segment_type) } else { - /* Different segments in subtraction. */ + /* Different segments in subtraction. */ know (!(S_IS_EXTERNAL (sub_symbolP) && (S_GET_SEGMENT (sub_symbolP) == absolute_section))); if ((S_GET_SEGMENT (sub_symbolP) == absolute_section)) @@ -4246,7 +4302,7 @@ fixup_segment (segP, this_segment_type) } #ifdef DIFF_EXPR_OK else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type -#if 0 /* Okay for 68k, at least... */ +#if 0 /* Okay for 68k, at least... */ && !pcrel #endif ) @@ -4306,7 +4362,7 @@ fixup_segment (segP, this_segment_type) the i386 are relaxed, this could only arise with a call instruction. */ - pcrel = 0; /* Lie. Don't want further pcrel processing. */ + pcrel = 0; /* Lie. Don't want further pcrel processing. */ if (!TC_FORCE_RELOCATION (fixP)) { fixP->fx_addsy = NULL; @@ -4332,7 +4388,6 @@ fixup_segment (segP, this_segment_type) break; default: - #if defined(TC_A29K) || (defined(TE_PE) && defined(TC_I386)) || defined(TC_M88K) /* This really should be handled in the linker, but backward compatibility forbids. */ @@ -4367,13 +4422,12 @@ fixup_segment (segP, this_segment_type) /* This is also true for 68k COFF on sysv machines (Checked on Motorola sysv68 R3V6 and R3V7.1, and also on UNIX System V/M68000, Release 1.0 from ATT/Bell Labs) - Philippe De Muyter <phdm@info.ucl.ac.be>. */ + Philippe De Muyter <phdm@info.ucl.ac.be>. */ if (S_IS_COMMON (add_symbolP)) add_number += S_GET_VALUE (add_symbolP); #endif break; - } /* switch on symbol seg */ } /* if not in local seg */ } /* if there was a + symbol */ @@ -4452,7 +4506,7 @@ fixup_segment (segP, this_segment_type) (unsigned long) (fragP->fr_address + where)); #endif } /* not a bit fix */ - } /* For each fixS in this segment. */ + } /* For each fixS in this segment. */ } /* fixup_segment() */ #endif @@ -4468,9 +4522,9 @@ obj_coff_init_stab_section (seg) char *stabstr_name; unsigned int stroff; - /* Make space for this first symbol. */ + /* Make space for this first symbol. */ p = frag_more (12); - /* Zero it out. */ + /* Zero it out. */ memset (p, 0, 12); as_where (&file, (unsigned int *) NULL); stabstr_name = (char *) alloca (strlen (segment_info[seg].name) + 4); @@ -4495,7 +4549,7 @@ adjust_stab_section(abfd, seg) int i, strsz = 0, nsyms; fragS *frag = segment_info[seg].frchainP->frch_root; - /* Look for the associated string table section. */ + /* Look for the associated string table section. */ secname = segment_info[seg].name; name = (char *) alloca (strlen (secname) + 4); @@ -4512,14 +4566,14 @@ adjust_stab_section(abfd, seg) } } - /* If we found the section, get its size. */ + /* If we found the section, get its size. */ if (stabstrseg != SEG_UNKNOWN) strsz = size_section (abfd, stabstrseg); nsyms = size_section (abfd, seg) / 12 - 1; /* Look for the first frag of sufficient size for the initial stab - symbol, and collect a pointer to it. */ + symbol, and collect a pointer to it. */ while (frag && frag->fr_fix < 12) frag = frag->fr_next; assert (frag != 0); @@ -4527,7 +4581,7 @@ adjust_stab_section(abfd, seg) assert (p != 0); /* Write in the number of stab symbols and the size of the string - table. */ + table. */ bfd_h_put_16 (abfd, (bfd_vma) nsyms, (bfd_byte *) p + 6); bfd_h_put_32 (abfd, (bfd_vma) strsz, (bfd_byte *) p + 8); } @@ -4582,6 +4636,7 @@ const pseudo_typeS coff_pseudo_table[] = /* Support for a COFF emulation. */ static void coff_pop_insert PARAMS ((void)); +static int coff_separate_stab_sections PARAMS ((void)); static void coff_pop_insert () @@ -4589,23 +4644,38 @@ coff_pop_insert () pop_insert (coff_pseudo_table); } +static int +coff_separate_stab_sections () +{ + return 1; +} + const struct format_ops coff_format_ops = { bfd_target_coff_flavour, 0, /* dfl_leading_underscore */ 1, /* emit_section_symbols */ + 0, /* begin */ + c_dot_file_symbol, coff_frob_symbol, 0, /* frob_file */ + 0, /* frob_file_before_adjust */ coff_frob_file_after_relocs, 0, /* s_get_size */ 0, /* s_set_size */ 0, /* s_get_align */ 0, /* s_set_align */ 0, /* s_get_other */ + 0, /* s_set_other */ 0, /* s_get_desc */ + 0, /* s_set_desc */ + 0, /* s_get_type */ + 0, /* s_set_type */ 0, /* copy_symbol_attributes */ 0, /* generate_asm_lineno */ 0, /* process_stab */ + coff_separate_stab_sections, + obj_coff_init_stab_section, 0, /* sec_sym_ok_for_reloc */ coff_pop_insert, 0, /* ecoff_set_ext */ diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h index f60ae36..8cf7999 100644 --- a/contrib/binutils/gas/config/obj-coff.h +++ b/contrib/binutils/gas/config/obj-coff.h @@ -39,7 +39,7 @@ #include "bfd.h" /* This internal_lineno crap is to stop namespace pollution from the - bfd internal coff headerfile. */ + bfd internal coff headerfile. */ #define internal_lineno bfd_internal_lineno #include "coff/internal.h" #undef internal_lineno @@ -149,6 +149,11 @@ #define TARGET_FORMAT "coff-tic30" #endif +#ifdef TC_TIC54X +#include "coff/tic54x.h" +#define TARGET_FORMAT "coff1-c54x" +#endif + #ifdef TC_TIC80 #include "coff/tic80.h" #define TARGET_FORMAT "coff-tic80" @@ -250,7 +255,7 @@ extern void obj_coff_section PARAMS ((int)); /* The number of auxiliary entries */ #define S_SET_NUMBER_AUXILIARY(s,v) (S_GET_NUMBER_AUXILIARY (s) = (v)) -/* True if a symbol name is in the string table, i.e. its length is > 8. */ +/* True if a symbol name is in the string table, i.e. its length is > 8. */ #define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0) extern int S_SET_DATA_TYPE PARAMS ((symbolS *, int)); @@ -294,13 +299,13 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *)); * differently. */ -#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */ +#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */ #define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */ #define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */ #define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */ #define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */ -#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */ +#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */ #define SF_STATICS (0x00001000) /* Mark the .text & all symbols */ #define SF_DEFINED (0x00002000) /* Symbol is defined in this file */ @@ -314,8 +319,8 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *)); #define SF_TAGGED (0x00040000) /* Is associated with a tag */ #define SF_TAG (0x00080000) /* Is a tag */ #define SF_DEBUG (0x00100000) /* Is in debug or abs section */ -#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */ -/* All other bits are unused. */ +#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */ +/* All other bits are unused. */ /* Accessors */ #define SF_GET(s) (*symbol_get_obj (s)) @@ -341,7 +346,7 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *)); /* Modifiers */ #define SF_SET(s,v) (SF_GET (s) = (v)) -#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK)) +#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK)) #define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK)) #define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE) #define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS) @@ -368,8 +373,7 @@ extern int coff_n_line_nos; #define obj_emit_lineno(WHERE,LINE,FILE_START) abort () extern void coff_add_linesym PARAMS ((symbolS *)); - -void c_dot_file_symbol PARAMS ((char *filename)); +void c_dot_file_symbol PARAMS ((const char *filename)); #define obj_app_file c_dot_file_symbol extern void coff_frob_symbol PARAMS ((symbolS *, int *)); @@ -430,10 +434,9 @@ hey ! Where is the C_LEAFSTAT definition ? i960 - coff support is depending on i extern const segT N_TYPE_seg[]; -/* Magic number of paged executable. */ +/* Magic number of paged executable. */ #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 0x8300 - /* SYMBOL TABLE */ /* Symbol table entry data type */ @@ -442,7 +445,7 @@ typedef struct { /* Basic symbol */ struct internal_syment ost_entry; - /* Auxiliary entry. */ + /* Auxiliary entry. */ union internal_auxent ost_auxent[OBJ_COFF_MAX_AUXENTRIES]; /* obj_coff internal use only flags */ unsigned int ost_flags; @@ -502,7 +505,7 @@ typedef struct */ #define S_IS_COMMON(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \ && S_GET_VALUE (s) != 0) -/* True if a symbol name is in the string table, i.e. its length is > 8. */ +/* True if a symbol name is in the string table, i.e. its length is > 8. */ #define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0) /* True if a symbol is defined as weak. */ @@ -517,7 +520,7 @@ typedef struct /* Accessors */ /* The name of the symbol */ -#define S_GET_NAME(s) ((char*)(s)->sy_symbol.ost_entry.n_offset) +#define S_GET_NAME(s) ((char*) (s)->sy_symbol.ost_entry.n_offset) /* The pointer to the string table */ #define S_GET_OFFSET(s) ((s)->sy_symbol.ost_entry.n_offset) /* The numeric value of the segment */ @@ -531,7 +534,7 @@ typedef struct /* Modifiers */ /* Set the name of the symbol */ -#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long)(v)) +#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long) (v)) /* Set the offset of the symbol */ #define S_SET_OFFSET(s,v) ((s)->sy_symbol.ost_entry.n_offset = (v)) /* The numeric value of the segment */ @@ -591,13 +594,13 @@ typedef struct * differently. */ -#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */ +#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */ #define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */ #define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */ #define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */ #define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */ -#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */ +#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */ #define SF_STATICS (0x00001000) /* Mark the .text & all symbols */ #define SF_DEFINED (0x00002000) /* Symbol is defined in this file */ @@ -611,9 +614,9 @@ typedef struct #define SF_TAGGED (0x00040000) /* Is associated with a tag */ #define SF_TAG (0x00080000) /* Is a tag */ #define SF_DEBUG (0x00100000) /* Is in debug or abs section */ -#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */ +#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */ #define SF_ADJ_LNNOPTR (0x00400000) /* Has a lnnoptr */ -/* All other bits are unused. */ +/* All other bits are unused. */ /* Accessors */ #define SF_GET(s) ((s)->sy_symbol.ost_flags) @@ -639,7 +642,7 @@ typedef struct /* Modifiers */ #define SF_SET(s,v) (SF_GET (s) = (v)) -#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK)) +#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK)) #define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK)) #define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE) #define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS) @@ -674,31 +677,31 @@ typedef struct #endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ #define H_GET_FILE_SIZE(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h) + \ H_GET_SYMBOL_TABLE_SIZE(h) + \ (h)->string_table_size) #define H_GET_TEXT_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ) #define H_GET_DATA_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h)) #define H_GET_BSS_FILE_OFFSET(h) 0 #define H_GET_RELOCATION_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h)) #define H_GET_LINENO_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h)) #define H_GET_SYMBOL_TABLE_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h)) @@ -728,11 +731,11 @@ typedef struct #define H_GET_LINENO_SIZE(h) ((h)->lineno_size) #ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER -#define H_GET_HEADER_SIZE(h) (sizeof(FILHDR) \ - + sizeof(AOUTHDR)\ +#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \ + + sizeof (AOUTHDR)\ + (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ)) #else /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ -#define H_GET_HEADER_SIZE(h) (sizeof(FILHDR) \ +#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \ + (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ)) #endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ @@ -767,17 +770,15 @@ typedef struct typedef struct { struct internal_aouthdr aouthdr; /* a.out header */ - struct internal_filehdr filehdr; /* File header, not machine dep. */ - long string_table_size; /* names + '\0' + sizeof(int) */ + struct internal_filehdr filehdr; /* File header, not machine dep. */ + long string_table_size; /* names + '\0' + sizeof (int) */ long relocation_size; /* Cumulated size of relocation information for all sections in - bytes. */ + bytes. */ long lineno_size; /* Size of the line number information table in bytes */ } object_headers; - - struct lineno_list { struct bfd_internal_lineno line; @@ -785,9 +786,6 @@ struct lineno_list struct lineno_list *next; /* Forward chain pointer */ }; - - - #define obj_segment_name(i) (segment_info[(int) (i)].scnhdr.s_name) #define obj_add_segment(s) obj_coff_add_segment (s) diff --git a/contrib/binutils/gas/config/obj-ecoff.c b/contrib/binutils/gas/config/obj-ecoff.c index 767dc58..3f80e7d 100644 --- a/contrib/binutils/gas/config/obj-ecoff.c +++ b/contrib/binutils/gas/config/obj-ecoff.c @@ -34,6 +34,7 @@ static int ecoff_sec_sym_ok_for_reloc PARAMS ((asection *)); static void obj_ecoff_frob_symbol PARAMS ((symbolS *, int *)); static void ecoff_pop_insert PARAMS ((void)); +static int ecoff_separate_stab_sections PARAMS ((void)); /* These are the pseudo-ops we support in this file. Only those relating to debugging information are supported here. @@ -84,7 +85,7 @@ const pseudo_typeS obj_pseudo_table[] = { "extern", ecoff_directive_extern, 0 }, #ifndef TC_MIPS - /* For TC_MIPS, tc-mips.c adds this. */ + /* For TC_MIPS, tc-mips.c adds this. */ { "weakext", ecoff_directive_weakext, 0 }, #endif @@ -290,26 +291,44 @@ ecoff_pop_insert () pop_insert (obj_pseudo_table); } +static int +ecoff_separate_stab_sections () +{ + return 0; +} + const struct format_ops ecoff_format_ops = { bfd_target_ecoff_flavour, 0, /* dfl_leading_underscore */ + + /* FIXME: A comment why emit_section_symbols is different here (1) from + the single-format definition (0) would be in order. */ 1, /* emit_section_symbols */ + 0, /* begin */ + ecoff_new_file, obj_ecoff_frob_symbol, ecoff_frob_file, + 0, /* frob_file_before_adjust */ 0, /* frob_file_after_relocs */ 0, /* s_get_size */ 0, /* s_set_size */ 0, /* s_get_align */ 0, /* s_set_align */ 0, /* s_get_other */ + 0, /* s_set_other */ 0, /* s_get_desc */ + 0, /* s_set_desc */ + 0, /* s_get_type */ + 0, /* s_set_type */ 0, /* copy_symbol_attributes */ ecoff_generate_asm_lineno, ecoff_stab, + ecoff_separate_stab_sections, + 0, /* init_stab_section */ ecoff_sec_sym_ok_for_reloc, ecoff_pop_insert, ecoff_set_ext, ecoff_read_begin_hook, - ecoff_symbol_new_hook, + ecoff_symbol_new_hook }; diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c index 21fd0fa..d56eaa9 100644 --- a/contrib/binutils/gas/config/obj-elf.c +++ b/contrib/binutils/gas/config/obj-elf.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #define OBJ_HEADER "obj-elf.h" #include "as.h" @@ -54,9 +54,12 @@ static bfd_vma elf_s_get_size PARAMS ((symbolS *)); static void elf_s_set_size PARAMS ((symbolS *, bfd_vma)); static bfd_vma elf_s_get_align PARAMS ((symbolS *)); static void elf_s_set_align PARAMS ((symbolS *, bfd_vma)); +static void elf_s_set_other PARAMS ((symbolS *, int)); static void elf_copy_symbol_attributes PARAMS ((symbolS *, symbolS *)); static int elf_sec_sym_ok_for_reloc PARAMS ((asection *)); static void adjust_stab_sections PARAMS ((bfd *, asection *, PTR)); +static int elf_separate_stab_sections PARAMS ((void)); +static void elf_init_stab_section PARAMS ((segT)); #ifdef NEED_ECOFF_DEBUG static boolean elf_get_extr PARAMS ((asymbol *, EXTR *)); @@ -72,8 +75,6 @@ static void obj_elf_weak PARAMS ((int)); static void obj_elf_local PARAMS ((int)); static void obj_elf_visibility PARAMS ((int)); static void obj_elf_symver PARAMS ((int)); -static void obj_elf_vtable_inherit PARAMS ((int)); -static void obj_elf_vtable_entry PARAMS ((int)); static void obj_elf_subsection PARAMS ((int)); static void obj_elf_popsection PARAMS ((int)); @@ -95,7 +96,7 @@ static const pseudo_typeS elf_pseudo_table[] = {"version", obj_elf_version, 0}, {"weak", obj_elf_weak, 0}, - /* These define symbol visibility. */ + /* These define symbol visibility. */ {"internal", obj_elf_visibility, STV_INTERNAL}, {"hidden", obj_elf_visibility, STV_HIDDEN}, {"protected", obj_elf_visibility, STV_PROTECTED}, @@ -110,10 +111,10 @@ static const pseudo_typeS elf_pseudo_table[] = {"subsection", obj_elf_subsection, 0}, /* These are GNU extensions to aid in garbage collecting C++ vtables. */ - {"vtable_inherit", obj_elf_vtable_inherit, 0}, - {"vtable_entry", obj_elf_vtable_entry, 0}, + {"vtable_inherit", (void (*) PARAMS ((int))) &obj_elf_vtable_inherit, 0}, + {"vtable_entry", (void (*) PARAMS ((int))) &obj_elf_vtable_entry, 0}, - /* These are used for dwarf. */ + /* These are used for dwarf. */ {"2byte", cons, 2}, {"4byte", cons, 4}, {"8byte", cons, 8}, @@ -234,6 +235,14 @@ elf_s_get_other (sym) } static void +elf_s_set_other (sym, other) + symbolS *sym; + int other; +{ + S_SET_OTHER (sym, other); +} + +static void elf_copy_symbol_attributes (dest, src) symbolS *dest, *src; { @@ -249,7 +258,7 @@ elf_sec_sym_ok_for_reloc (sec) void elf_file_symbol (s) - char *s; + const char *s; { symbolS *sym; @@ -533,7 +542,6 @@ obj_elf_visibility (visibility) demand_empty_rest_of_line (); } - static segT previous_section; static int previous_subsection; @@ -546,7 +554,6 @@ struct section_stack static struct section_stack *section_stack; - /* Handle the .section pseudo-op. This code supports two different syntaxes. @@ -617,8 +624,10 @@ obj_elf_change_section (name, type, attr, push) char *name; int type, attr, push; { - int new_sec; + asection *old_sec; segT sec; + flagword flags; + int i; #ifdef md_flush_pending_output md_flush_pending_output (); @@ -639,49 +648,57 @@ obj_elf_change_section (name, type, attr, push) previous_section = now_seg; previous_subsection = now_subseg; - new_sec = bfd_get_section_by_name (stdoutput, name) == NULL; + old_sec = bfd_get_section_by_name (stdoutput, name); sec = subseg_new (name, 0); - if (new_sec) - { - flagword flags; - symbolS *secsym; - int i; - - /* See if this is one of the special sections. */ - for (i = 0; special_sections[i].name != NULL; i++) - if (strcmp (name, special_sections[i].name) == 0) - { - if (type == SHT_NULL) - type = special_sections[i].type; - else if (type != special_sections[i].type) - as_warn (_("Setting incorrect section type for %s"), name); - - if ((attr &~ special_sections[i].attributes) != 0) + /* See if this is one of the special sections. */ + for (i = 0; special_sections[i].name != NULL; i++) + if (strcmp (name, special_sections[i].name) == 0) + { + if (type == SHT_NULL) + type = special_sections[i].type; + else if (type != special_sections[i].type) + { + if (old_sec == NULL) + { + as_warn (_("Setting incorrect section type for %s"), name); + } + else { - /* As a GNU extension, we permit a .note section to be - allocatable. If the linker sees an allocateable .note - section, it will create a PT_NOTE segment in the output - file. */ - if (strcmp (name, ".note") != 0 - || attr != SHF_ALLOC) - as_warn (_("Setting incorrect section attributes for %s"), - name); + as_warn (_("Ignoring incorrect section type for %s"), name); + type = special_sections[i].type; } - attr |= special_sections[i].attributes; - break; } - - /* Convert ELF type and flags to BFD flags. */ - flags = (SEC_RELOC - | ((attr & SHF_WRITE) ? 0 : SEC_READONLY) - | ((attr & SHF_ALLOC) ? SEC_ALLOC : 0) - | (((attr & SHF_ALLOC) && type != SHT_NOBITS) ? SEC_LOAD : 0) - | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0)); + if ((attr &~ special_sections[i].attributes) != 0 + && old_sec == NULL) + { + /* As a GNU extension, we permit a .note section to be + allocatable. If the linker sees an allocateable .note + section, it will create a PT_NOTE segment in the output + file. */ + if (strcmp (name, ".note") != 0 + || attr != SHF_ALLOC) + as_warn (_("Setting incorrect section attributes for %s"), + name); + } + attr |= special_sections[i].attributes; + break; + } + + /* Convert ELF type and flags to BFD flags. */ + flags = (SEC_RELOC + | ((attr & SHF_WRITE) ? 0 : SEC_READONLY) + | ((attr & SHF_ALLOC) ? SEC_ALLOC : 0) + | (((attr & SHF_ALLOC) && type != SHT_NOBITS) ? SEC_LOAD : 0) + | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0)); #ifdef md_elf_section_flags - flags = md_elf_section_flags (flags, attr, type); + flags = md_elf_section_flags (flags, attr, type); #endif + if (old_sec == NULL) + { + symbolS *secsym; + /* Prevent SEC_HAS_CONTENTS from being inadvertently set. */ if (type == SHT_NOBITS) seg_info (sec)->bss = 1; @@ -695,9 +712,19 @@ obj_elf_change_section (name, type, attr, push) else symbol_table_insert (section_symbol (sec)); } + else if (attr != 0) + { + /* If section attributes are specified the second time we see a + particular section, then check that they are the same as we + saw the first time. */ + if ((old_sec->flags ^ flags) + & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE + | SEC_EXCLUDE | SEC_SORT_ENTRIES)) + as_warn (_("Ignoring changed section attributes for %s"), name); + } #ifdef md_elf_section_change_hook - md_elf_section_change_hook (); + md_elf_section_change_hook (); #endif } @@ -802,7 +829,7 @@ obj_elf_section (push) char mri_type; #ifdef md_flush_pending_output - md_flush_pending_output (); + md_flush_pending_output (); #endif previous_section = now_seg; @@ -1054,7 +1081,7 @@ obj_elf_line (ignore) int ignore ATTRIBUTE_UNUSED; { /* Assume delimiter is part of expression. BSD4.2 as fails with - delightful bug, so we are not being incompatible here. */ + delightful bug, so we are not being incompatible here. */ new_logical_line ((char *) NULL, (int) (get_absolute_expression ())); demand_empty_rest_of_line (); } @@ -1080,14 +1107,6 @@ obj_elf_symver (ignore) *input_line_pointer = c; - if (symbol_get_obj (sym)->versioned_name != NULL) - { - as_bad (_("multiple .symver directives for symbol `%s'"), - S_GET_NAME (sym)); - ignore_rest_of_line (); - return; - } - SKIP_WHITESPACE (); if (*input_line_pointer != ',') { @@ -1106,16 +1125,34 @@ obj_elf_symver (ignore) *input_line_pointer++ = c; } - symbol_get_obj (sym)->versioned_name = xstrdup (name); + if (symbol_get_obj (sym)->versioned_name == NULL) + { + symbol_get_obj (sym)->versioned_name = xstrdup (name); - *input_line_pointer = c; + *input_line_pointer = c; - if (strchr (symbol_get_obj (sym)->versioned_name, ELF_VER_CHR) == NULL) + if (strchr (symbol_get_obj (sym)->versioned_name, + ELF_VER_CHR) == NULL) + { + as_bad (_("missing version name in `%s' for symbol `%s'"), + symbol_get_obj (sym)->versioned_name, + S_GET_NAME (sym)); + ignore_rest_of_line (); + return; + } + } + else { - as_bad (_("missing version name in `%s' for symbol `%s'"), - symbol_get_obj (sym)->versioned_name, S_GET_NAME (sym)); - ignore_rest_of_line (); - return; + if (strcmp (symbol_get_obj (sym)->versioned_name, name)) + { + as_bad (_("multiple versions [`%s'|`%s'] for symbol `%s'"), + name, symbol_get_obj (sym)->versioned_name, + S_GET_NAME (sym)); + ignore_rest_of_line (); + return; + } + + *input_line_pointer = c; } demand_empty_rest_of_line (); @@ -1125,7 +1162,7 @@ obj_elf_symver (ignore) to the linker the hierarchy in which a particular table resides. The syntax is ".vtable_inherit CHILDNAME, PARENTNAME". */ -static void +struct fix * obj_elf_vtable_inherit (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -1158,7 +1195,7 @@ obj_elf_vtable_inherit (ignore) { as_bad ("expected comma after name in .vtable_inherit"); ignore_rest_of_line (); - return; + return NULL; } ++input_line_pointer; @@ -1185,19 +1222,19 @@ obj_elf_vtable_inherit (ignore) demand_empty_rest_of_line (); if (bad) - return; + return NULL; assert (symbol_get_value_expression (csym)->X_op == O_constant); - fix_new (symbol_get_frag (csym), - symbol_get_value_expression (csym)->X_add_number, 0, psym, 0, 0, - BFD_RELOC_VTABLE_INHERIT); + return fix_new (symbol_get_frag (csym), + symbol_get_value_expression (csym)->X_add_number, + 0, psym, 0, 0, BFD_RELOC_VTABLE_INHERIT); } /* This handles the .vtable_entry pseudo-op, which is used to indicate to the linker that a vtable slot was used. The syntax is ".vtable_entry tablename, offset". */ -static void +struct fix * obj_elf_vtable_entry (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -1219,7 +1256,7 @@ obj_elf_vtable_entry (ignore) { as_bad ("expected comma after name in .vtable_entry"); ignore_rest_of_line (); - return; + return NULL; } ++input_line_pointer; @@ -1228,10 +1265,10 @@ obj_elf_vtable_entry (ignore) offset = get_absolute_expression (); - fix_new (frag_now, frag_now_fix (), 0, sym, offset, 0, - BFD_RELOC_VTABLE_ENTRY); - demand_empty_rest_of_line (); + + return fix_new (frag_now, frag_now_fix (), 0, sym, offset, 0, + BFD_RELOC_VTABLE_ENTRY); } void @@ -1277,7 +1314,7 @@ obj_elf_version (ignore) SKIP_WHITESPACE (); if (*input_line_pointer == '\"') { - ++input_line_pointer; /* -> 1st char of string. */ + ++input_line_pointer; /* -> 1st char of string. */ name = input_line_pointer; while (is_a_char (c = next_char_of_string ())) @@ -1370,7 +1407,7 @@ obj_elf_size (ignore) } /* Handle the ELF .type pseudo-op. This sets the type of a symbol. - There are four syntaxes: + There are five syntaxes: The first (used on Solaris) is .type SYM,#function @@ -1380,6 +1417,8 @@ obj_elf_size (ignore) .type SYM STT_FUNC The fourth (used on NetBSD/Arm and Linux/ARM) is .type SYM,%function + The fifth (used on SVR4/860) is + .type SYM,"function" */ static void @@ -1391,10 +1430,12 @@ obj_elf_type (ignore) int type; const char *typename; symbolS *sym; + elf_symbol_type *elfsym; name = input_line_pointer; c = get_symbol_end (); sym = symbol_find_or_make (name); + elfsym = (elf_symbol_type *) symbol_get_bfdsym (sym); *input_line_pointer = c; SKIP_WHITESPACE (); @@ -1404,6 +1445,7 @@ obj_elf_type (ignore) SKIP_WHITESPACE (); if ( *input_line_pointer == '#' || *input_line_pointer == '@' + || *input_line_pointer == '"' || *input_line_pointer == '%') ++input_line_pointer; @@ -1417,12 +1459,19 @@ obj_elf_type (ignore) else if (strcmp (typename, "object") == 0 || strcmp (typename, "STT_OBJECT") == 0) type = BSF_OBJECT; +#ifdef md_elf_symbol_type + else if ((type = md_elf_symbol_type (typename, sym, elfsym)) != -1) + ; +#endif else as_bad (_("ignoring unrecognized symbol type \"%s\""), typename); *input_line_pointer = c; - symbol_get_bfdsym (sym)->flags |= type; + if (*input_line_pointer == '"') + ++input_line_pointer; + + elfsym->symbol.flags |= type; demand_empty_rest_of_line (); } @@ -1471,9 +1520,9 @@ obj_elf_init_stab_section (seg) UnixWare ar crashes. */ bfd_set_section_alignment (stdoutput, seg, 2); - /* Make space for this first symbol. */ + /* Make space for this first symbol. */ p = frag_more (12); - /* Zero it out. */ + /* Zero it out. */ memset (p, 0, 12); as_where (&file, (unsigned int *) NULL); stabstr_name = (char *) alloca (strlen (segment_name (seg)) + 4); @@ -1605,6 +1654,11 @@ elf_frob_symbol (symp, puntp) if (sy_obj->versioned_name != NULL) { + char *p; + + p = strchr (sy_obj->versioned_name, ELF_VER_CHR); + know (p != NULL); + /* This symbol was given a new name with the .symver directive. If this is an external reference, just rename the symbol to @@ -1618,13 +1672,9 @@ elf_frob_symbol (symp, puntp) if (! S_IS_DEFINED (symp)) { - char *p; - /* Verify that the name isn't using the @@ syntax--this is reserved for definitions of the default version to link against. */ - p = strchr (sy_obj->versioned_name, ELF_VER_CHR); - know (p != NULL); if (p[1] == ELF_VER_CHR) { as_bad (_("invalid attempt to declare external version name as default in symbol `%s'"), @@ -1635,36 +1685,50 @@ elf_frob_symbol (symp, puntp) } else { - symbolS *symp2; + if (p [1] == ELF_VER_CHR && p [2] == ELF_VER_CHR) + { + size_t l; + + /* The @@@ syntax is a special case. It renames the + symbol name to versioned_name with one `@' removed. */ + l = strlen (&p[3]) + 1; + memmove (&p [2], &p[3], l); + S_SET_NAME (symp, sy_obj->versioned_name); + } + else + { + symbolS *symp2; - /* FIXME: Creating a new symbol here is risky. We're in the - final loop over the symbol table. We can get away with - it only because the symbol goes to the end of the list, - where the loop will still see it. It would probably be - better to do this in obj_frob_file_before_adjust. */ + /* FIXME: Creating a new symbol here is risky. We're + in the final loop over the symbol table. We can + get away with it only because the symbol goes to + the end of the list, where the loop will still see + it. It would probably be better to do this in + obj_frob_file_before_adjust. */ - symp2 = symbol_find_or_make (sy_obj->versioned_name); + symp2 = symbol_find_or_make (sy_obj->versioned_name); - /* Now we act as though we saw symp2 = sym. */ + /* Now we act as though we saw symp2 = sym. */ - S_SET_SEGMENT (symp2, S_GET_SEGMENT (symp)); + S_SET_SEGMENT (symp2, S_GET_SEGMENT (symp)); - /* Subtracting out the frag address here is a hack because - we are in the middle of the final loop. */ - S_SET_VALUE (symp2, - (S_GET_VALUE (symp) - - symbol_get_frag (symp)->fr_address)); + /* Subtracting out the frag address here is a hack + because we are in the middle of the final loop. */ + S_SET_VALUE (symp2, + (S_GET_VALUE (symp) + - symbol_get_frag (symp)->fr_address)); - symbol_set_frag (symp2, symbol_get_frag (symp)); + symbol_set_frag (symp2, symbol_get_frag (symp)); - /* This will copy over the size information. */ - copy_symbol_attributes (symp2, symp); + /* This will copy over the size information. */ + copy_symbol_attributes (symp2, symp); - if (S_IS_WEAK (symp)) - S_SET_WEAK (symp2); + if (S_IS_WEAK (symp)) + S_SET_WEAK (symp2); - if (S_IS_EXTERNAL (symp)) - S_SET_EXTERNAL (symp2); + if (S_IS_EXTERNAL (symp)) + S_SET_EXTERNAL (symp2); + } } } @@ -1715,6 +1779,42 @@ elf_frob_file () #endif } +/* It removes any unneeded versioned symbols from the symbol table. */ + +void +elf_frob_file_before_adjust () +{ + if (symbol_rootP) + { + symbolS *symp; + + for (symp = symbol_rootP; symp; symp = symbol_next (symp)) + if (symbol_get_obj (symp)->versioned_name) + { + if (!S_IS_DEFINED (symp)) + { + char *p; + + /* The @@@ syntax is a special case. If the symbol is + not defined, 2 `@'s will be removed from the + versioned_name. */ + + p = strchr (symbol_get_obj (symp)->versioned_name, + ELF_VER_CHR); + know (p != NULL); + if (p [1] == ELF_VER_CHR && p [2] == ELF_VER_CHR) + { + size_t l = strlen (&p[3]) + 1; + memmove (&p [1], &p[3], l); + } + if (symbol_used_p (symp) == 0 + && symbol_used_in_reloc_p (symp) == 0) + symbol_remove (symp, &symbol_rootP, &symbol_lastP); + } + } + } +} + /* It is required that we let write_relocs have the opportunity to optimize away fixups before output has begun, since it is possible to eliminate all fixups for a section and thus we never should @@ -1890,18 +1990,45 @@ sco_id () #endif /* SCO_ELF */ +static int +elf_separate_stab_sections () +{ +#ifdef NEED_ECOFF_DEBUG + return (!ECOFF_DEBUGGING); +#else + return 1; +#endif +} + +static void +elf_init_stab_section (seg) + segT seg; +{ +#ifdef NEED_ECOFF_DEBUG + if (!ECOFF_DEBUGGING) +#endif + obj_elf_init_stab_section (seg); +} + const struct format_ops elf_format_ops = { bfd_target_elf_flavour, 0, /* dfl_leading_underscore */ 1, /* emit_section_symbols */ + elf_begin, + elf_file_symbol, elf_frob_symbol, elf_frob_file, + elf_frob_file_before_adjust, elf_frob_file_after_relocs, elf_s_get_size, elf_s_set_size, elf_s_get_align, elf_s_set_align, elf_s_get_other, + elf_s_set_other, 0, /* s_get_desc */ + 0, /* s_set_desc */ + 0, /* s_get_type */ + 0, /* s_set_type */ elf_copy_symbol_attributes, #ifdef NEED_ECOFF_DEBUG ecoff_generate_asm_lineno, @@ -1910,6 +2037,8 @@ const struct format_ops elf_format_ops = 0, /* generate_asm_lineno */ 0, /* process_stab */ #endif + elf_separate_stab_sections, + elf_init_stab_section, elf_sec_sym_ok_for_reloc, elf_pop_insert, #ifdef NEED_ECOFF_DEBUG @@ -1918,5 +2047,5 @@ const struct format_ops elf_format_ops = 0, /* ecoff_set_ext */ #endif elf_obj_read_begin_hook, - elf_obj_symbol_new_hook, + elf_obj_symbol_new_hook }; diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h index 722c5fd..43daf64 100644 --- a/contrib/binutils/gas/config/obj-elf.h +++ b/contrib/binutils/gas/config/obj-elf.h @@ -6,7 +6,7 @@ GAS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. GAS is distributed in the hope that it will be useful, @@ -19,7 +19,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* HP PA-RISC support was contributed by the Center for Software Science at the University of Utah. */ @@ -28,11 +27,14 @@ #define OBJ_ELF 1 +/* Note that all macros in this file should be wrapped in #ifndef, for + sake of obj-multi.h which includes this file. */ + #ifndef OUTPUT_FLAVOR #define OUTPUT_FLAVOR bfd_target_elf_flavour #endif -#include <bfd.h> +#include "bfd.h" #define BYTES_IN_WORD 4 /* for now */ #include "bfd/elf-bfd.h" @@ -40,7 +42,7 @@ #include "targ-cpu.h" #ifdef TC_ALPHA -#define ECOFF_DEBUGGING alpha_flag_mdebug +#define ECOFF_DEBUGGING (alpha_flag_mdebug > 0) extern int alpha_flag_mdebug; #endif @@ -83,16 +85,26 @@ struct elf_obj_sy #define OBJ_SYMFIELD_TYPE struct elf_obj_sy +/* Symbol fields used by the ELF back end. */ +#define ELF_TARGET_SYMBOL_FIELDS int local:1; + +/* Don't change this; change ELF_TARGET_SYMBOL_FIELDS instead. */ +#define TARGET_SYMBOL_FIELDS ELF_TARGET_SYMBOL_FIELDS + +/* #include "targ-cpu.h" */ + #ifndef FALSE #define FALSE 0 #define TRUE !FALSE #endif +#ifndef obj_begin #define obj_begin() elf_begin () +#endif extern void elf_begin PARAMS ((void)); /* should be conditional on address size! */ -#define elf_symbol(asymbol) ((elf_symbol_type *)(&(asymbol)->the_bfd)) +#define elf_symbol(asymbol) ((elf_symbol_type *) (&(asymbol)->the_bfd)) #ifndef S_GET_SIZE #define S_GET_SIZE(S) \ @@ -128,13 +140,20 @@ extern asection *gdb_section; #endif extern void elf_frob_file PARAMS ((void)); +#ifndef obj_frob_file_before_adjust +#define obj_frob_file_before_adjust elf_frob_file_before_adjust +#endif +extern void elf_frob_file_before_adjust PARAMS ((void)); + #ifndef obj_frob_file_after_relocs #define obj_frob_file_after_relocs elf_frob_file_after_relocs #endif extern void elf_frob_file_after_relocs PARAMS ((void)); +#ifndef obj_app_file #define obj_app_file elf_file_symbol -extern void elf_file_symbol PARAMS ((char *)); +#endif +extern void elf_file_symbol PARAMS ((const char *)); extern void obj_elf_section_change_hook PARAMS ((void)); @@ -144,6 +163,8 @@ extern void obj_elf_version PARAMS ((int)); extern void obj_elf_common PARAMS ((int)); extern void obj_elf_data PARAMS ((int)); extern void obj_elf_text PARAMS ((int)); +extern struct fix *obj_elf_vtable_inherit PARAMS ((int)); +extern struct fix *obj_elf_vtable_entry PARAMS ((int)); /* BFD wants to write the udata field, which is a no-no for the globally defined sections. */ @@ -189,6 +210,12 @@ do \ while (0) #endif +#ifndef SEPARATE_STAB_SECTIONS +/* Avoid ifndef each separate macro setting by wrapping the whole of the + stab group on the assumption that whoever sets SEPARATE_STAB_SECTIONS + caters to ECOFF_DEBUGGING and the right setting of INIT_STAB_SECTIONS + and OBJ_PROCESS_STAB too, without needing the tweaks below. */ + /* Stabs go in a separate section. */ #define SEPARATE_STAB_SECTIONS 1 @@ -206,7 +233,7 @@ extern void obj_elf_init_stab_section PARAMS ((segT)); #undef INIT_STAB_SECTION #define INIT_STAB_SECTION(seg) \ - ((void)(ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0))) + ((void) (ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0))) #undef OBJ_PROCESS_STAB #define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \ @@ -214,6 +241,8 @@ extern void obj_elf_init_stab_section PARAMS ((segT)); ecoff_stab ((seg), (what), (string), (type), (other), (desc)) #endif /* ECOFF_DEBUGGING */ +#endif /* SEPARATE_STAB_SECTIONS not defined. */ + extern void elf_frob_symbol PARAMS ((symbolS *, int *)); #ifndef obj_frob_symbol #define obj_frob_symbol(symp, punt) elf_frob_symbol (symp, &punt) diff --git a/contrib/binutils/gas/config/obj-generic.h b/contrib/binutils/gas/config/obj-generic.h index dc18e43..00e4638 100644 --- a/contrib/binutils/gas/config/obj-generic.h +++ b/contrib/binutils/gas/config/obj-generic.h @@ -1,5 +1,5 @@ /* This file is obj-generic.h - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -14,18 +14,19 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* * This file is obj-generic.h and is intended to be a template for * object format specific header files. */ -/* define an obj specific macro off which target cpu back ends may key. */ +/* define an obj specific macro off which target cpu back ends may key. */ #define OBJ_GENERIC 1 -/* include whatever target cpu is appropriate. */ +/* include whatever target cpu is appropriate. */ #include "targ-cpu.h" /* @@ -65,10 +66,9 @@ typedef void *object_headers; /* symbols may or may not be defined */ #define S_IS_DEFINED(s) (0) - #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (0) /* your magic number */ -#define OBJ_EMIT_LINENO(a,b,c) /* must be *something*. This no-op's it out. */ +#define OBJ_EMIT_LINENO(a,b,c) /* must be *something*. This no-op's it out. */ /* * Local Variables: @@ -76,5 +76,3 @@ typedef void *object_headers; * fill-column: 131 * End: */ - -/* end of obj-generic.h */ diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c index 30a0798..35b49da 100644 --- a/contrib/binutils/gas/config/obj-ieee.c +++ b/contrib/binutils/gas/config/obj-ieee.c @@ -1,5 +1,6 @@ /* obj-format for ieee-695 records. - Copyright (C) 1991, 92, 93, 94, 95, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -16,19 +17,12 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ +/* Created by Steve Chamberlain <steve@cygnus.com>. */ -/* - created by - - steve chamberlain steve@cygnus.com - */ - -/* - this will hopefully become the port through which bfd and gas talk, - for the moment, only ieee is known to work well. - */ +/* This will hopefully become the port through which bfd and gas talk, + for the moment, only ieee is known to work well. */ #include "bfd.h" #include "as.h" @@ -38,11 +32,15 @@ bfd *abfd; -/* How many addresses does the .align take? */ +/* How many addresses does the .align take? */ + static relax_addressT relax_align (address, alignment) - register relax_addressT address; /* Address now. */ - register long alignment; /* Alignment (binary). */ + /* Address now. */ + register relax_addressT address; + + /* Alignment (binary). */ + register long alignment; { relax_addressT mask; relax_addressT new_address; @@ -50,18 +48,20 @@ relax_align (address, alignment) mask = ~((~0) << alignment); new_address = (address + mask) & (~mask); return (new_address - address); -} /* relax_align() */ +} + +/* Calculate the size of the frag chain + and create a bfd section to contain all of it. */ -/* calculate the size of the frag chain and create a bfd section - to contain all of it */ static void -DEFUN (size_section, (abfd, idx), - bfd * abfd AND - unsigned int idx) +size_section (abfd, idx) + bfd *abfd; + unsigned int idx; { asection *sec; unsigned int size = 0; fragS *frag = segment_info[idx].frag_root; + while (frag) { if (frag->fr_address != size) @@ -92,25 +92,28 @@ DEFUN (size_section, (abfd, idx), if (size) { char *name = segment_info[idx].name; + if (name == (char *) NULL) - { - name = ".data"; - } - segment_info[idx].user_stuff = (char *) (sec = bfd_make_section (abfd, name)); - /* Make it output through itself */ + name = ".data"; + + segment_info[idx].user_stuff = + (char *) (sec = bfd_make_section (abfd, name)); + /* Make it output through itself. */ sec->output_section = sec; sec->flags |= SEC_HAS_CONTENTS; bfd_set_section_size (abfd, sec, size); } } -/* run through a frag chain and write out the data to go with it */ +/* Run through a frag chain and write out the data to go with it. */ + static void -DEFUN (fill_section, (abfd, idx), - bfd * abfd AND - unsigned int idx) +fill_section (abfd, idx) + bfd *abfd; + unsigned int idx; { asection *sec = segment_info[idx].user_stuff; + if (sec) { fragS *frag = segment_info[idx].frag_root; @@ -156,16 +159,16 @@ DEFUN (fill_section, (abfd, idx), } } -/* Count the relocations in a chain */ +/* Count the relocations in a chain. */ static unsigned int -DEFUN (count_entries_in_chain, (idx), - unsigned int idx) +count_entries_in_chain (idx) + unsigned int idx; { unsigned int nrelocs; fixS *fixup_ptr; - /* Count the relocations */ + /* Count the relocations. */ fixup_ptr = segment_info[idx].fix_root; nrelocs = 0; while (fixup_ptr != (fixS *) NULL) @@ -176,10 +179,11 @@ DEFUN (count_entries_in_chain, (idx), return nrelocs; } -/* output all the relocations for a section */ +/* Output all the relocations for a section. */ + void -DEFUN (do_relocs_for, (idx), - unsigned int idx) +do_relocs_for (idx) + unsigned int idx; { unsigned int nrelocs; arelent **reloc_ptr_vector; @@ -188,11 +192,13 @@ DEFUN (do_relocs_for, (idx), asection *section = (asection *) (segment_info[idx].user_stuff); unsigned int i; fixS *from; + if (section) { nrelocs = count_entries_in_chain (idx); - reloc_ptr_vector = (arelent **) malloc ((nrelocs + 1) * sizeof (arelent *)); + reloc_ptr_vector = + (arelent **) malloc ((nrelocs + 1) * sizeof (arelent *)); reloc_vector = (arelent *) malloc (nrelocs * sizeof (arelent)); ptrs = (asymbol **) malloc (nrelocs * sizeof (asymbol *)); from = segment_info[idx].fix_root; @@ -203,8 +209,10 @@ DEFUN (do_relocs_for, (idx), reloc_ptr_vector[i] = to; to->howto = (reloc_howto_type *) (from->fx_r_type); -#if 0 /* We can't represent complicated things in a reloc yet */ - if (from->fx_addsy == 0 || from->fx_subsy != 0) abort(); +#if 0 + /* We can't represent complicated things in a reloc yet. */ + if (from->fx_addsy == 0 || from->fx_subsy != 0) + abort (); #endif s = &(from->fx_addsy->sy_symbol.sy); @@ -218,7 +226,7 @@ DEFUN (do_relocs_for, (idx), If this relocation is pcrelative, and we know the destination, we still want to keep the relocation - since the linker might relax some of the bytes, but it stops - being pc relative and turns into an absolute relocation. */ + being pc relative and turns into an absolute relocation. */ if (s) { if ((s->flags & BSF_UNDEFINED) == 0) @@ -233,10 +241,9 @@ DEFUN (do_relocs_for, (idx), to->sym_ptr_ptr = 0; if (to->howto->pcrel_offset) - { - /* This is a pcrel relocation, the addend should be adjusted */ - to->addend -= to->address + 1; - } + /* This is a pcrel relocation, the addend should + be adjusted. */ + to->addend -= to->address + 1; } else { @@ -245,33 +252,30 @@ DEFUN (do_relocs_for, (idx), to->sym_ptr_ptr = ptrs; if (to->howto->pcrel_offset) - { - /* This is a pcrel relocation, the addend should be adjusted */ - to->addend -= to->address - 1; - } + /* This is a pcrel relocation, the addend should + be adjusted. */ + to->addend -= to->address - 1; } - } else - { - to->section = 0; - } + to->section = 0; ptrs++; from = from->fx_next; } - /* attatch to the section */ + /* Attatch to the section. */ section->orelocation = reloc_ptr_vector; section->reloc_count = nrelocs; section->flags |= SEC_LOAD; } } -/* do the symbols.. */ +/* Do the symbols. */ + static void -DEFUN (do_symbols, (abfd), - bfd * abfd) +do_symbols (abfd) + bfd *abfd; { extern symbolS *symbol_rootP; symbolS *ptr; @@ -280,7 +284,6 @@ DEFUN (do_symbols, (abfd), unsigned int count = 0; unsigned int index; - for (ptr = symbol_rootP; ptr != (symbolS *) NULL; ptr = ptr->sy_next) @@ -291,9 +294,7 @@ DEFUN (do_symbols, (abfd), (asection *) (segment_info[ptr->sy_symbol.seg].user_stuff); S_SET_VALUE (ptr, S_GET_VALUE (ptr) + ptr->sy_frag->fr_address); if (ptr->sy_symbol.sy.flags == 0) - { - ptr->sy_symbol.sy.flags = BSF_LOCAL; - } + ptr->sy_symbol.sy.flags = BSF_LOCAL; } else { @@ -330,18 +331,15 @@ DEFUN (do_symbols, (abfd), } /* The generic as->bfd converter. Other backends may have special case - code */ + code. */ void -DEFUN_VOID (bfd_as_write_hook) +bfd_as_write_hook () { int i; for (i = SEG_E0; i < SEG_UNKNOWN; i++) - { - size_section (abfd, i); - } - + size_section (abfd, i); for (i = SEG_E0; i < SEG_UNKNOWN; i++) fill_section (abfd, i); @@ -350,7 +348,6 @@ DEFUN_VOID (bfd_as_write_hook) for (i = SEG_E0; i < SEG_UNKNOWN; i++) do_relocs_for (i); - } S_SET_SEGMENT (x, y) @@ -437,7 +434,8 @@ obj_ieee_section (ignore) char *p = input_line_pointer; char *s = p; int i; - /* Look up the name, if it doesn't exist, make it */ + + /* Look up the name, if it doesn't exist, make it. */ while (*p && *p != ' ' && *p != ',' && !is_end_of_line[*p]) { p++; @@ -447,10 +445,7 @@ obj_ieee_section (ignore) if (segment_info[i].hadone) { if (strncmp (segment_info[i].name, s, p - s) == 0) - { - goto ok; - - } + goto ok; } else break; @@ -470,32 +465,26 @@ ok: while (!is_end_of_line[*p]) p++; input_line_pointer = p; - } - void cons (); void s_ignore (); - void s_globl (); const pseudo_typeS obj_pseudo_table[] = { {"section", obj_ieee_section, 0}, - {"data.b", cons, 1}, - {"data.w", cons, 2}, - {"data.l", cons, 4}, - {"export", s_globl, 0}, - {"option", s_ignore, 0}, - {"end", s_ignore, 0}, - {"import", s_ignore, 0}, - {"sdata", stringer, 0}, + {"data.b" , cons , 1}, + {"data.w" , cons , 2}, + {"data.l" , cons , 4}, + {"export" , s_globl , 0}, + {"option" , s_ignore , 0}, + {"end" , s_ignore , 0}, + {"import" , s_ignore , 0}, + {"sdata" , stringer , 0}, 0, - }; - - void obj_symbol_new_hook (symbolP) symbolS *symbolP; @@ -503,13 +492,9 @@ obj_symbol_new_hook (symbolP) symbolP->sy_symbol.sy.the_bfd = abfd; } - - - - #if 1 extern void -DEFUN_VOID (write_object_file) +write_object_file () { int i; struct frchain *frchain_ptr; @@ -531,10 +516,10 @@ DEFUN_VOID (write_object_file) frchain_ptr != (struct frchain *) NULL; frchain_ptr = frchain_ptr->frch_next) { - /* Run through all the sub-segments and align them up. Also close any - open frags. We tack a .fill onto the end of the frag chain so - that any .align's size can be worked by looking at the next - frag. */ + /* Run through all the sub-segments and align them up. Also + close any open frags. We tack a .fill onto the end of the + frag chain so that any .align's size can be worked by looking + at the next frag. */ subseg_set (frchain_ptr->frch_seg, frchain_ptr->frch_subseg); #ifndef SUB_SEGMENT_ALIGN @@ -547,18 +532,19 @@ DEFUN_VOID (write_object_file) } /* Now build one big frag chain for each segment, linked through - fr_next. */ + fr_next. */ for (i = SEG_E0; i < SEG_UNKNOWN; i++) { - fragS **prev_frag_ptr_ptr; struct frchain *next_frchain_ptr; - /* struct frag **head_ptr = segment_info[i].frag_root;*/ +#if 0 + struct frag **head_ptr = segment_info[i].frag_root; +#endif segment_info[i].frag_root = segment_info[i].frchainP->frch_root; #if 0 - /* Im not sure what this is for */ + /* I'm not sure what this is for. */ for (frchain_ptr = segment_info[i].frchainP->frch_root; frchain_ptr != (struct frchain *) NULL; frchain_ptr = frchain_ptr->frch_next) @@ -566,17 +552,13 @@ DEFUN_VOID (write_object_file) *head_ptr = frchain_ptr; head_ptr = &frchain_ptr->next; } - - #endif } for (i = SEG_E0; i < SEG_UNKNOWN; i++) - { - relax_segment (segment_info[i].frag_root, i); - } + relax_segment (segment_info[i].frag_root, i); - /* Now the addresses of the frags are correct within the segment */ + /* Now the addresses of the frags are correct within the segment. */ bfd_as_write_hook (); bfd_close (abfd); @@ -623,5 +605,3 @@ H_GET_TEXT_RELOCATION_SIZE () { abort (); } - -/* end of obj-ieee.c */ diff --git a/contrib/binutils/gas/config/obj-ieee.h b/contrib/binutils/gas/config/obj-ieee.h index 4a0f126..fbef1cd 100644 --- a/contrib/binutils/gas/config/obj-ieee.h +++ b/contrib/binutils/gas/config/obj-ieee.h @@ -1,6 +1,5 @@ /* This file is obj-ieee.h - - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,12 +14,13 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #define BFD 1 -#include <bfd.h> +#include "bfd.h" typedef struct { @@ -41,10 +41,6 @@ object_headers; #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 1 - int lineno_rootP; - #define IEEE_STYLE - -/* end of obj-ieee.h */ diff --git a/contrib/binutils/gas/config/obj-multi.h b/contrib/binutils/gas/config/obj-multi.h index 42b7eb3..1d68a0c 100644 --- a/contrib/binutils/gas/config/obj-multi.h +++ b/contrib/binutils/gas/config/obj-multi.h @@ -6,7 +6,7 @@ GAS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. GAS is distributed in the hope that it will be useful, @@ -32,6 +32,16 @@ #define OUTPUT_FLAVOR \ (this_format->flavor) +#define obj_begin() \ + (this_format->begin \ + ? (*this_format->begin) () \ + : (void) 0) + +#define obj_app_file(NAME) \ + (this_format->app_file \ + ? (*this_format->app_file) (NAME) \ + : (void) 0) + #define obj_frob_symbol(S,P) \ (*this_format->frob_symbol) (S, &(P)) @@ -40,6 +50,11 @@ ? (*this_format->frob_file) () \ : (void) 0) +#define obj_frob_file_before_adjust() \ + (this_format->frob_file_before_adjust \ + ? (*this_format->frob_file_before_adjust) () \ + : (void) 0) + #define obj_frob_file_after_relocs() \ (this_format->frob_file_after_relocs \ ? (*this_format->frob_file_after_relocs) () \ @@ -69,21 +84,43 @@ #define S_GET_SIZE \ (*this_format->s_get_size) -#define S_SET_SIZE \ - (*this_format->s_set_size) +#define S_SET_SIZE(S, N) \ + (this_format->s_set_size \ + ? (*this_format->s_set_size) (S, N) \ + : (void) 0) #define S_GET_ALIGN \ (*this_format->s_get_align) -#define S_SET_ALIGN \ - (*this_format->s_set_align) +#define S_SET_ALIGN(S, N) \ + (this_format->s_set_align \ + ? (*this_format->s_set_align) (S, N) \ + : (void) 0) #define S_GET_OTHER \ (*this_format->s_get_other) +#define S_SET_OTHER(S, O) \ + (this_format->s_set_other \ + ? (*this_format->s_set_other) (S, O) \ + : (void) 0) + #define S_GET_DESC \ (*this_format->s_get_desc) +#define S_SET_DESC(S, D) \ + (this_format->s_set_desc \ + ? (*this_format->s_set_desc) (S, D) \ + : (void) 0) + +#define S_GET_TYPE \ + (*this_format->s_get_desc) + +#define S_SET_TYPE(S, T) \ + (this_format->s_set_type \ + ? (*this_format->s_set_type) (S, T) \ + : (void) 0) + #define OBJ_COPY_SYMBOL_ATTRIBUTES(d,s) \ (this_format->copy_symbol_attributes \ ? (*this_format->copy_symbol_attributes) (d, s) \ @@ -94,11 +131,27 @@ ? (*this_format->process_stab) (SEG,W,S,T,O,D) \ : (void) 0) +#define SEPARATE_STAB_SECTIONS \ + ((*this_format->separate_stab_sections) ()) + +#define INIT_STAB_SECTION(S) \ + (this_format->init_stab_section \ + ? (*this_format->init_stab_section) (S) \ + : (void) 0) + +#define EMIT_SECTION_SYMBOLS (this_format->emit_section_symbols) + #ifdef OBJ_MAYBE_ELF /* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c We also need various STAB defines for stab.c */ #include "obj-elf.h" #endif +#ifdef OBJ_MAYBE_AOUT +/* We want aout_process_stab in stabs.c for the aout table. Defining this + macro will have no other effect. */ +#define AOUT_STABS +#endif + #endif /* !OBJ_HEADER */ #endif /* _OBJ_MULTI_H */ diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c index 0eed2e2..ae42d95 100644 --- a/contrib/binutils/gas/config/tc-alpha.c +++ b/contrib/binutils/gas/config/tc-alpha.c @@ -1,5 +1,5 @@ /* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU. - Copyright (C) 1989, 93-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1989, 93-98, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Carnegie Mellon University, 1993. Written by Alessandro Forin, based on earlier gas-1.38 target CPU files. Modified by Ken Raeburn for gas-2.x and ECOFF support. @@ -58,10 +58,10 @@ #ifdef OBJ_ELF #include "elf/alpha.h" +#include "dwarf2dbg.h" #endif #include <ctype.h> - /* Local types */ @@ -71,22 +71,19 @@ #define MAX_INSN_FIXUPS 2 #define MAX_INSN_ARGS 5 -struct alpha_fixup -{ +struct alpha_fixup { expressionS exp; bfd_reloc_code_real_type reloc; }; -struct alpha_insn -{ +struct alpha_insn { unsigned insn; int nfixups; struct alpha_fixup fixups[MAX_INSN_FIXUPS]; unsigned sequence[MAX_INSN_FIXUPS]; }; -enum alpha_macro_arg -{ +enum alpha_macro_arg { MACRO_EOA = 1, MACRO_IR, MACRO_PIR, @@ -100,15 +97,14 @@ enum alpha_macro_arg MACRO_JSR }; -struct alpha_macro -{ +struct alpha_macro { const char *name; void (*emit) PARAMS ((const expressionS *, int, const PTR)); const PTR arg; enum alpha_macro_arg argsets[16]; }; -/* Extra expression types. */ +/* Extra expression types. */ #define O_pregister O_md1 /* O_register, in parentheses */ #define O_cpregister O_md2 /* + a leading comma */ @@ -127,7 +123,6 @@ struct alpha_macro #define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_gprellow) #endif - /* Macros for extracting the type and number of encoded register tokens */ #define is_ir_num(x) (((x) & 32) == 0) @@ -145,14 +140,14 @@ struct alpha_macro #if 1 #define range_signed_16(x) \ - (((offsetT)(x) >> 15) == 0 || ((offsetT)(x) >> 15) == -1) + (((offsetT) (x) >> 15) == 0 || ((offsetT) (x) >> 15) == -1) #define range_signed_32(x) \ - (((offsetT)(x) >> 31) == 0 || ((offsetT)(x) >> 31) == -1) + (((offsetT) (x) >> 31) == 0 || ((offsetT) (x) >> 31) == -1) #else -#define range_signed_16(x) ((offsetT)(x) >= -(offsetT)0x8000 && \ - (offsetT)(x) <= (offsetT)0x7FFF) -#define range_signed_32(x) ((offsetT)(x) >= -(offsetT)0x80000000 && \ - (offsetT)(x) <= (offsetT)0x7FFFFFFF) +#define range_signed_16(x) ((offsetT) (x) >= -(offsetT) 0x8000 && \ + (offsetT) (x) <= (offsetT) 0x7FFF) +#define range_signed_32(x) ((offsetT) (x) >= -(offsetT) 0x80000000 && \ + (offsetT) (x) <= (offsetT) 0x7FFFFFFF) #endif /* Macros for sign extending from 16- and 32-bits. */ @@ -160,36 +155,35 @@ struct alpha_macro but really a predicate should be found to use the non-cast forms. */ #if 1 -#define sign_extend_16(x) ((short)(x)) -#define sign_extend_32(x) ((int)(x)) +#define sign_extend_16(x) ((short) (x)) +#define sign_extend_32(x) ((int) (x)) #else -#define sign_extend_16(x) ((offsetT)(((x) & 0xFFFF) ^ 0x8000) - 0x8000) -#define sign_extend_32(x) ((offsetT)(((x) & 0xFFFFFFFF) \ +#define sign_extend_16(x) ((offsetT) (((x) & 0xFFFF) ^ 0x8000) - 0x8000) +#define sign_extend_32(x) ((offsetT) (((x) & 0xFFFFFFFF) \ ^ 0x80000000) - 0x80000000) #endif /* Macros to build tokens */ -#define set_tok_reg(t, r) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_reg(t, r) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_register, \ (t).X_add_number = (r)) -#define set_tok_preg(t, r) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_preg(t, r) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_pregister, \ (t).X_add_number = (r)) -#define set_tok_cpreg(t, r) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_cpreg(t, r) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_cpregister, \ (t).X_add_number = (r)) -#define set_tok_freg(t, r) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_freg(t, r) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_register, \ - (t).X_add_number = (r)+32) -#define set_tok_sym(t, s, a) (memset(&(t), 0, sizeof(t)), \ + (t).X_add_number = (r) + 32) +#define set_tok_sym(t, s, a) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_symbol, \ (t).X_add_symbol = (s), \ (t).X_add_number = (a)) -#define set_tok_const(t, n) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_const(t, n) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_constant, \ (t).X_add_number = (n)) - /* Prototypes for all local functions */ @@ -246,6 +240,9 @@ static void s_alpha_end PARAMS ((int)); static void s_alpha_mask PARAMS ((int)); static void s_alpha_frame PARAMS ((int)); static void s_alpha_prologue PARAMS ((int)); +static void s_alpha_file PARAMS ((int)); +static void s_alpha_loc PARAMS ((int)); +static void s_alpha_stab PARAMS ((int)); static void s_alpha_coff_wrapper PARAMS ((int)); #endif #ifdef OBJ_EVAX @@ -269,7 +266,6 @@ static void alpha_align PARAMS ((int, char *, symbolS *, int)); #ifdef RELOC_OP_P static void alpha_adjust_symtab_relocs PARAMS ((bfd *, asection *, PTR)); #endif - /* Generic assembler global variables which must be defined by all targets. */ @@ -306,19 +302,18 @@ const char *md_shortopts = "Fm:gG:"; struct option md_longopts[] = { #define OPTION_32ADDR (OPTION_MD_BASE) { "32addr", no_argument, NULL, OPTION_32ADDR }, -#define OPTION_RELAX (OPTION_32ADDR+1) +#define OPTION_RELAX (OPTION_32ADDR + 1) { "relax", no_argument, NULL, OPTION_RELAX }, #ifdef OBJ_ELF -#define OPTION_MDEBUG (OPTION_RELAX+1) -#define OPTION_NO_MDEBUG (OPTION_MDEBUG+1) +#define OPTION_MDEBUG (OPTION_RELAX + 1) +#define OPTION_NO_MDEBUG (OPTION_MDEBUG + 1) { "mdebug", no_argument, NULL, OPTION_MDEBUG }, { "no-mdebug", no_argument, NULL, OPTION_NO_MDEBUG }, #endif { NULL, no_argument, NULL, 0 } }; -size_t md_longopts_size = sizeof(md_longopts); - +size_t md_longopts_size = sizeof (md_longopts); #ifdef OBJ_EVAX #define AXP_REG_R0 0 @@ -376,7 +371,7 @@ static segT alpha_dtors_section; #endif static segT alpha_lit8_section; -/* Symbols referring to said sections. */ +/* Symbols referring to said sections. */ #ifdef OBJ_ECOFF static symbolS *alpha_lita_symbol; static symbolS *alpha_lit4_symbol; @@ -394,8 +389,8 @@ static offsetT alpha_lit4_literal; static offsetT alpha_lit8_literal; #endif -/* The active .ent symbol. */ #ifdef OBJ_ELF +/* The active .ent symbol. */ static symbolS *alpha_cur_ent_sym; #endif @@ -433,7 +428,7 @@ static int alpha_debug; #ifdef OBJ_ELF /* Whether we are emitting an mdebug section. */ -int alpha_flag_mdebug = 1; +int alpha_flag_mdebug = -1; #endif /* Don't fully resolve relocations, allowing code movement in the linker. */ @@ -475,7 +470,7 @@ static int alpha_flag_show_after_trunc = 0; /* -H */ #define ALPHA_RELOC_TABLE(op) \ &alpha_reloc_op[ ((!USER_RELOC_P (op)) \ ? (abort (), 0) \ - : (int)(op) - (int)O_literal) ] + : (int) (op) - (int) O_literal) ] #define LITUSE_BASE 1 #define LITUSE_BYTOFF 2 @@ -547,13 +542,13 @@ static const struct alpha_reloc_op_tag { }; static const int alpha_num_reloc_op - = sizeof(alpha_reloc_op) / sizeof(*alpha_reloc_op); + = sizeof (alpha_reloc_op) / sizeof (*alpha_reloc_op); /* Maximum # digits needed to hold the largest sequence # */ #define ALPHA_RELOC_DIGITS 25 /* Whether a sequence number is valid. */ -#define ALPHA_RELOC_SEQUENCE_OK(X) ((X) > 0 && ((unsigned)(X)) == (X)) +#define ALPHA_RELOC_SEQUENCE_OK(X) ((X) > 0 && ((unsigned) (X)) == (X)) /* Structure to hold explict sequence information. */ struct alpha_literal_tag @@ -573,14 +568,12 @@ static struct hash_control *alpha_literal_hash; /* A table of CPU names and opcode sets. */ -static const struct cpu_type -{ +static const struct cpu_type { const char *name; unsigned flags; -} cpu_types[] = -{ +} cpu_types[] = { /* Ad hoc convention: cpu number gets palcode, process code doesn't. - This supports usage under DU 4.0b that does ".arch ev4", and + This supports usage under DU 4.0b that does ".arch ev4", and usage in MILO that does -m21064. Probably something more specific like -m21064-pal should be used, but oh well. */ @@ -635,24 +628,24 @@ static const struct alpha_macro alpha_macros[] = { { "ldt", emit_loadstore, "ldt", { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ldb", emit_ldX, (PTR)0, + { "ldb", emit_ldX, (PTR) 0, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ldbu", emit_ldXu, (PTR)0, + { "ldbu", emit_ldXu, (PTR) 0, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ldw", emit_ldX, (PTR)1, + { "ldw", emit_ldX, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ldwu", emit_ldXu, (PTR)1, + { "ldwu", emit_ldXu, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldw", emit_uldX, (PTR)1, + { "uldw", emit_uldX, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldwu", emit_uldXu, (PTR)1, + { "uldwu", emit_uldXu, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldl", emit_uldX, (PTR)2, + { "uldl", emit_uldX, (PTR) 2, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldlu", emit_uldXu, (PTR)2, + { "uldlu", emit_uldXu, (PTR) 2, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldq", emit_uldXu, (PTR)3, + { "uldq", emit_uldXu, (PTR) 3, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, { "ldgp", emit_ldgp, NULL, @@ -696,15 +689,15 @@ static const struct alpha_macro alpha_macros[] = { { "stt", emit_loadstore, "stt", { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "stb", emit_stX, (PTR)0, + { "stb", emit_stX, (PTR) 0, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "stw", emit_stX, (PTR)1, + { "stw", emit_stX, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ustw", emit_ustX, (PTR)1, + { "ustw", emit_ustX, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ustl", emit_ustX, (PTR)2, + { "ustl", emit_ustX, (PTR) 2, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ustq", emit_ustX, (PTR)3, + { "ustq", emit_ustX, (PTR) 3, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, /* Arithmetic macros */ @@ -717,11 +710,11 @@ static const struct alpha_macro alpha_macros[] = { { "absq" emit_absq, 2, { EXP, IR } }, #endif - { "sextb", emit_sextX, (PTR)0, + { "sextb", emit_sextX, (PTR) 0, { MACRO_IR, MACRO_IR, MACRO_EOA, MACRO_IR, MACRO_EOA, /* MACRO_EXP, MACRO_IR, MACRO_EOA */ } }, - { "sextw", emit_sextX, (PTR)1, + { "sextw", emit_sextX, (PTR) 1, { MACRO_IR, MACRO_IR, MACRO_EOA, MACRO_IR, MACRO_EOA, /* MACRO_EXP, MACRO_IR, MACRO_EOA */ } }, @@ -801,7 +794,7 @@ static const struct alpha_macro alpha_macros[] = { }; static const unsigned int alpha_num_macros - = sizeof(alpha_macros) / sizeof(*alpha_macros); + = sizeof (alpha_macros) / sizeof (*alpha_macros); /* Public interface functions */ @@ -824,12 +817,12 @@ md_begin () /* Create the opcode hash table */ alpha_opcode_hash = hash_new (); - for (i = 0; i < alpha_num_opcodes; ) + for (i = 0; i < alpha_num_opcodes;) { const char *name, *retval, *slash; name = alpha_opcodes[i].name; - retval = hash_insert (alpha_opcode_hash, name, (PTR)&alpha_opcodes[i]); + retval = hash_insert (alpha_opcode_hash, name, (PTR) &alpha_opcodes[i]); if (retval) as_fatal (_("internal error: can't hash opcode `%s': %s"), name, retval); @@ -844,7 +837,7 @@ md_begin () memcpy (p, name, slash - name); strcpy (p + (slash - name), slash + 1); - (void)hash_insert(alpha_opcode_hash, p, (PTR)&alpha_opcodes[i]); + (void) hash_insert (alpha_opcode_hash, p, (PTR) &alpha_opcodes[i]); /* Ignore failures -- the opcode table does duplicate some variants in different forms, like "hw_stq" and "hw_st/q". */ } @@ -858,14 +851,15 @@ md_begin () /* Create the macro hash table */ alpha_macro_hash = hash_new (); - for (i = 0; i < alpha_num_macros; ) + for (i = 0; i < alpha_num_macros;) { const char *name, *retval; name = alpha_macros[i].name; - retval = hash_insert (alpha_macro_hash, name, (PTR)&alpha_macros[i]); + retval = hash_insert (alpha_macro_hash, name, (PTR) &alpha_macros[i]); if (retval) - as_fatal (_("internal error: can't hash macro `%s': %s"), name, retval); + as_fatal (_("internal error: can't hash macro `%s': %s"), + name, retval); while (++i < alpha_num_macros && (alpha_macros[i].name == name @@ -878,16 +872,16 @@ md_begin () for (i = 0; i < 32; ++i) { char name[4]; - sprintf(name, "$%d", i); - alpha_register_table[i] = symbol_create(name, reg_section, i, - &zero_address_frag); + sprintf (name, "$%d", i); + alpha_register_table[i] = symbol_create (name, reg_section, i, + &zero_address_frag); } for (; i < 64; ++i) { char name[5]; - sprintf(name, "$f%d", i-32); - alpha_register_table[i] = symbol_create(name, reg_section, i, - &zero_address_frag); + sprintf (name, "$f%d", i - 32); + alpha_register_table[i] = symbol_create (name, reg_section, i, + &zero_address_frag); } /* Create the special symbols and sections we'll be using */ @@ -911,17 +905,17 @@ md_begin () #ifdef OBJ_ELF if (ECOFF_DEBUGGING) { - segT sec = subseg_new(".mdebug", (subsegT)0); - bfd_set_section_flags(stdoutput, sec, SEC_HAS_CONTENTS|SEC_READONLY); - bfd_set_section_alignment(stdoutput, sec, 3); + segT sec = subseg_new (".mdebug", (subsegT) 0); + bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY); + bfd_set_section_alignment (stdoutput, sec, 3); } #endif /* OBJ_ELF */ - subseg_set(text_section, 0); + subseg_set (text_section, 0); #ifdef RELOC_OP_P /* Create literal lookup hash table. */ - alpha_literal_hash = hash_new(); + alpha_literal_hash = hash_new (); #endif } @@ -964,15 +958,15 @@ md_section_align (seg, size) segT seg; valueT size; { - int align = bfd_get_section_alignment(stdoutput, seg); - valueT mask = ((valueT)1 << align) - 1; + int align = bfd_get_section_alignment (stdoutput, seg); + valueT mask = ((valueT) 1 << align) - 1; return (size + mask) & ~mask; } /* Turn a string in input_line_pointer into a floating point constant - of type type, and store the appropriate bytes in *litP. The number - of LITTLENUMS emitted is stored in *sizeP. An error message is + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is returned, or NULL on OK. */ /* Equal to MAX_PRECISION in atof-ieee.c */ @@ -1060,25 +1054,25 @@ md_parse_option (c, arg) break; case 'G': - g_switch_value = atoi(arg); + g_switch_value = atoi (arg); break; case 'm': { const struct cpu_type *p; for (p = cpu_types; p->name; ++p) - if (strcmp(arg, p->name) == 0) + if (strcmp (arg, p->name) == 0) { alpha_target_name = p->name, alpha_target = p->flags; goto found; } - as_warn(_("Unknown CPU identifier `%s'"), arg); + as_warn (_("Unknown CPU identifier `%s'"), arg); found:; } break; #ifdef OBJ_EVAX - case '+': /* For g++. Hash any name > 63 chars long. */ + case '+': /* For g++. Hash any name > 63 chars long. */ alpha_flag_hash_long_names = 1; break; @@ -1116,7 +1110,7 @@ void md_show_usage (stream) FILE *stream; { - fputs(_("\ + fputs (_("\ Alpha options:\n\ -32addr treat addresses as 32-bit values\n\ -F lack floating point instructions support\n\ @@ -1243,7 +1237,7 @@ md_apply_fix (fixP, valueP) case BFD_RELOC_23_PCREL_S2: if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0) { - image = bfd_getl32(fixpos); + image = bfd_getl32 (fixpos); image = (image & ~0x1FFFFF) | ((value >> 2) & 0x1FFFFF); goto write_done; } @@ -1252,7 +1246,7 @@ md_apply_fix (fixP, valueP) case BFD_RELOC_ALPHA_HINT: if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0) { - image = bfd_getl32(fixpos); + image = bfd_getl32 (fixpos); image = (image & ~0x3FFF) | ((value >> 2) & 0x3FFF); goto write_done; } @@ -1290,16 +1284,20 @@ md_apply_fix (fixP, valueP) abort (); #endif + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + return 1; + default: { const struct alpha_operand *operand; - if ((int)fixP->fx_r_type >= 0) + if ((int) fixP->fx_r_type >= 0) as_fatal (_("unhandled relocation type %s"), bfd_get_reloc_code_name (fixP->fx_r_type)); - assert (-(int)fixP->fx_r_type < (int)alpha_num_operands); - operand = &alpha_operands[-(int)fixP->fx_r_type]; + assert (-(int) fixP->fx_r_type < (int) alpha_num_operands); + operand = &alpha_operands[-(int) fixP->fx_r_type]; /* The rest of these fixups only exist internally during symbol resolution and have no representation in the object file. @@ -1310,9 +1308,9 @@ md_apply_fix (fixP, valueP) as_bad_where (fixP->fx_file, fixP->fx_line, _("non-absolute expression in constant field")); - image = bfd_getl32(fixpos); - image = insert_operand(image, operand, (offsetT)value, - fixP->fx_file, fixP->fx_line); + image = bfd_getl32 (fixpos); + image = insert_operand (image, operand, (offsetT) value, + fixP->fx_file, fixP->fx_line); } goto write_done; } @@ -1321,13 +1319,13 @@ md_apply_fix (fixP, valueP) return 1; else { - as_warn_where(fixP->fx_file, fixP->fx_line, - _("type %d reloc done?\n"), (int)fixP->fx_r_type); + as_warn_where (fixP->fx_file, fixP->fx_line, + _("type %d reloc done?\n"), (int) fixP->fx_r_type); goto done; } write_done: - md_number_to_chars(fixpos, image, 4); + md_number_to_chars (fixpos, image, 4); done: fixP->fx_done = 1; @@ -1339,7 +1337,7 @@ done: */ symbolS * -md_undefined_symbol(name) +md_undefined_symbol (name) char *name; { if (*name == '$') @@ -1355,7 +1353,7 @@ md_undefined_symbol(name) /* FALLTHRU */ case 'r': - if (!isdigit(*++name)) + if (!isdigit (*++name)) break; /* FALLTHRU */ @@ -1363,7 +1361,7 @@ md_undefined_symbol(name) case '5': case '6': case '7': case '8': case '9': if (name[1] == '\0') num = name[0] - '0'; - else if (name[0] != '0' && isdigit(name[1]) && name[2] == '\0') + else if (name[0] != '0' && isdigit (name[1]) && name[2] == '\0') { num = (name[0] - '0') * 10 + name[1] - '0'; if (num >= 32) @@ -1373,14 +1371,14 @@ md_undefined_symbol(name) break; if (!alpha_noat_on && (num + is_float) == AXP_REG_AT) - as_warn(_("Used $at without \".set noat\"")); + as_warn (_("Used $at without \".set noat\"")); return alpha_register_table[num + is_float]; case 'a': if (name[1] == 't' && name[2] == '\0') { if (!alpha_noat_on) - as_warn(_("Used $at without \".set noat\"")); + as_warn (_("Used $at without \".set noat\"")); return alpha_register_table[AXP_REG_AT]; } break; @@ -1459,6 +1457,8 @@ alpha_force_relocation (f) case BFD_RELOC_ALPHA_USER_GPRELHIGH: case BFD_RELOC_ALPHA_USER_GPRELLOW: #endif + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: return 1; case BFD_RELOC_23_PCREL_S2: @@ -1468,7 +1468,8 @@ alpha_force_relocation (f) return 0; default: - assert((int)f->fx_r_type < 0 && -(int)f->fx_r_type < (int)alpha_num_operands); + assert ((int) f->fx_r_type < 0 + && -(int) f->fx_r_type < (int) alpha_num_operands); return 0; } } @@ -1518,6 +1519,8 @@ alpha_fix_adjustable (f) case BFD_RELOC_ALPHA_USER_GPRELHIGH: case BFD_RELOC_ALPHA_USER_GPRELLOW: #endif + case BFD_RELOC_VTABLE_ENTRY: + case BFD_RELOC_VTABLE_INHERIT: return 0; case BFD_RELOC_GPREL32: @@ -1528,8 +1531,8 @@ alpha_fix_adjustable (f) return 1; default: - assert ((int)f->fx_r_type < 0 - && - (int)f->fx_r_type < (int)alpha_num_operands); + assert ((int) f->fx_r_type < 0 + && - (int) f->fx_r_type < (int) alpha_num_operands); return 1; } /*NOTREACHED*/ @@ -1552,7 +1555,7 @@ tc_gen_reloc (sec, fixp) /* Make sure none of our internal relocations make it this far. They'd better have been fully resolved by this point. */ - assert ((int)fixp->fx_r_type > 0); + assert ((int) fixp->fx_r_type > 0); reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); if (reloc->howto == NULL) @@ -1588,7 +1591,7 @@ tc_gen_reloc (sec, fixp) * of thing, and as a result we need to fake it out here. */ if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)) - && !S_IS_COMMON(fixp->fx_addsy)) + && !S_IS_COMMON (fixp->fx_addsy)) reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value; #endif } @@ -1615,7 +1618,7 @@ tc_get_register (frame) char c = get_symbol_end (); symbolS *sym = md_undefined_symbol (s); - *strchr(s, '\0') = c; + *strchr (s, '\0') = c; if (sym && (framereg = S_GET_VALUE (sym)) <= 31) goto found; } @@ -1647,10 +1650,10 @@ alpha_frob_file_before_adjust () #ifdef RELOC_OP_P -/* Before the relocations are written, reorder them, so that user supplied - !lituse relocations follow the appropriate !literal relocations. Also - convert the gas-internal relocations to the appropriate linker relocations. - */ +/* Before the relocations are written, reorder them, so that user + supplied !lituse relocations follow the appropriate !literal + relocations. Also convert the gas-internal relocations to the + appropriate linker relocations. */ void alpha_adjust_symtab () @@ -1661,20 +1664,21 @@ alpha_adjust_symtab () fprintf (stderr, "alpha_adjust_symtab called\n"); #endif - /* Go over each section, reordering the relocations so that all of the - explicit LITUSE's are adjacent to the explicit LITERAL's */ - bfd_map_over_sections (stdoutput, alpha_adjust_symtab_relocs, (char *) 0); + /* Go over each section, reordering the relocations so that all + of the explicit LITUSE's are adjacent to the explicit + LITERAL's. */ + bfd_map_over_sections (stdoutput, alpha_adjust_symtab_relocs, + (char *) 0); } } - /* Inner function to move LITUSE's next to the LITERAL. */ static void alpha_adjust_symtab_relocs (abfd, sec, ptr) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; asection *sec; - PTR ptr; + PTR ptr ATTRIBUTE_UNUSED; { segment_info_type *seginfo = seg_info (sec); fixS **prevP; @@ -1689,8 +1693,9 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) int n_dup_literals = 0; #endif - /* If seginfo is NULL, we did not create this section; don't do anything with - it. By using a pointer to a pointer, we can update the links in place. */ + /* If seginfo is NULL, we did not create this section; don't do + anything with it. By using a pointer to a pointer, we can update + the links in place. */ if (seginfo == NULL) return; @@ -1703,7 +1708,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) for (fixp = seginfo->fix_root; fixp; fixp = next) { next = fixp->fx_next; - fixp->fx_next = (fixS *)0; + fixp->fx_next = (fixS *) 0; #ifdef DEBUG2_ALPHA n++; #endif @@ -1716,7 +1721,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) #ifdef DEBUG2_ALPHA fprintf (stderr, "alpha_adjust_symtab_relocs: 0x%lx, other relocation %s\n", - (long)fixp, + (long) fixp, bfd_get_reloc_code_name (fixp->fx_r_type)); #endif break; @@ -1731,7 +1736,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) n_dup_literals++; fprintf (stderr, "alpha_adjust_symtab_relocs: 0x%lx, !literal!%.6d, # literals = %2d\n", - (long)fixp, + (long) fixp, fixp->tc_fix_data.info->sequence, fixp->tc_fix_data.info->n_literals); #endif @@ -1749,10 +1754,10 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) #ifdef DEBUG2_ALPHA fprintf (stderr, "alpha_adjust_symtab_relocs: 0x%lx, !lituse !%.6d, # lituses = %2d, next_lituse = 0x%lx\n", - (long)fixp, + (long) fixp, fixp->tc_fix_data.info->sequence, fixp->tc_fix_data.info->n_lituses, - (long)fixp->tc_fix_data.next_lituse); + (long) fixp->tc_fix_data.next_lituse); #endif break; } @@ -1785,7 +1790,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) && ! fixp->tc_fix_data.info->multi_section_p) { for (lituse = fixp->tc_fix_data.info->lituse; - lituse != (fixS *)0; + lituse != (fixS *) 0; lituse = lituse->tc_fix_data.next_lituse) { lituse->fx_next = fixp->fx_next; @@ -1813,7 +1818,6 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) } #endif /* RELOC_OP_P */ - #ifdef DEBUG_ALPHA static void @@ -1882,7 +1886,7 @@ debug_exp (tok, ntok) fprintf (stderr, ", %s(%s, %s, %d)", name, (t->X_add_symbol) ? S_GET_NAME (t->X_add_symbol) : "--", (t->X_op_symbol) ? S_GET_NAME (t->X_op_symbol) : "--", - (int)t->X_add_number); + (int) t->X_add_number); } fprintf (stderr, "\n"); fflush (stderr); @@ -1960,7 +1964,7 @@ tokenize_arguments (str, tok, ntok) } r = &alpha_reloc_op[0]; - for (i = alpha_num_reloc_op-1; i >= 0; i--, r++) + for (i = alpha_num_reloc_op - 1; i >= 0; i--, r++) { if (len == r->length && memcmp (input_line_pointer, r->name, len) == 0) @@ -1968,7 +1972,8 @@ tokenize_arguments (str, tok, ntok) } if (i < 0) { - as_bad (_("Unknown relocation operand: !%s"), input_line_pointer); + as_bad (_("Unknown relocation operand: !%s"), + input_line_pointer); goto err_report; } @@ -1981,7 +1986,8 @@ tokenize_arguments (str, tok, ntok) if (tok->X_op != O_constant || ! ALPHA_RELOC_SEQUENCE_OK (tok->X_add_number)) { - as_bad (_("Bad sequence number: !%s!%s"), r->name, input_line_pointer); + as_bad (_("Bad sequence number: !%s!%s"), + r->name, input_line_pointer); goto err_report; } @@ -2002,7 +2008,7 @@ tokenize_arguments (str, tok, ntok) { char *hold = input_line_pointer++; - /* First try for parenthesized register ... */ + /* First try for parenthesized register ... */ expression (tok); if (*input_line_pointer == ')' && tok->X_op == O_register) { @@ -2059,7 +2065,7 @@ err_report: syntax match. */ static const struct alpha_opcode * -find_opcode_match(first_opcode, tok, pntok, pcpumatch) +find_opcode_match (first_opcode, tok, pntok, pcpumatch) const struct alpha_opcode *first_opcode; const expressionS *tok; int *pntok; @@ -2101,22 +2107,22 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch) { case AXP_OPERAND_IR: if (tok[tokidx].X_op != O_register - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; break; case AXP_OPERAND_FPR: if (tok[tokidx].X_op != O_register - || !is_fpr_num(tok[tokidx].X_add_number)) + || !is_fpr_num (tok[tokidx].X_add_number)) goto match_failed; break; - case AXP_OPERAND_IR|AXP_OPERAND_PARENS: + case AXP_OPERAND_IR | AXP_OPERAND_PARENS: if (tok[tokidx].X_op != O_pregister - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; break; - case AXP_OPERAND_IR|AXP_OPERAND_PARENS|AXP_OPERAND_COMMA: + case AXP_OPERAND_IR | AXP_OPERAND_PARENS | AXP_OPERAND_COMMA: if (tok[tokidx].X_op != O_cpregister - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; break; @@ -2139,7 +2145,7 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch) default: /* everything else should have been fake */ - abort(); + abort (); } ++tokidx; } @@ -2153,11 +2159,11 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch) match_failed:; } - while (++opcode-alpha_opcodes < alpha_num_opcodes - && !strcmp(opcode->name, first_opcode->name)); + while (++opcode - alpha_opcodes < alpha_num_opcodes + && !strcmp (opcode->name, first_opcode->name)); if (*pcpumatch) - *pcpumatch = got_cpu_match; + *pcpumatch = got_cpu_match; return NULL; } @@ -2166,7 +2172,7 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch) match. */ static const struct alpha_macro * -find_macro_match(first_macro, tok, pntok) +find_macro_match (first_macro, tok, pntok) const struct alpha_macro *first_macro; const expressionS *tok; int *pntok; @@ -2193,7 +2199,7 @@ find_macro_match(first_macro, tok, pntok) /* index register */ case MACRO_IR: if (tokidx >= ntok || tok[tokidx].X_op != O_register - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; ++tokidx; break; @@ -2201,7 +2207,7 @@ find_macro_match(first_macro, tok, pntok) /* parenthesized index register */ case MACRO_PIR: if (tokidx >= ntok || tok[tokidx].X_op != O_pregister - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; ++tokidx; break; @@ -2209,14 +2215,14 @@ find_macro_match(first_macro, tok, pntok) /* optional parenthesized index register */ case MACRO_OPIR: if (tokidx < ntok && tok[tokidx].X_op == O_pregister - && is_ir_num(tok[tokidx].X_add_number)) + && is_ir_num (tok[tokidx].X_add_number)) ++tokidx; break; /* leading comma with a parenthesized index register */ case MACRO_CPIR: if (tokidx >= ntok || tok[tokidx].X_op != O_cpregister - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; ++tokidx; break; @@ -2224,7 +2230,7 @@ find_macro_match(first_macro, tok, pntok) /* floating point register */ case MACRO_FPR: if (tokidx >= ntok || tok[tokidx].X_op != O_register - || !is_fpr_num(tok[tokidx].X_add_number)) + || !is_fpr_num (tok[tokidx].X_add_number)) goto match_failed; ++tokidx; break; @@ -2298,8 +2304,8 @@ find_macro_match(first_macro, tok, pntok) ++arg; } } - while (++macro-alpha_macros < alpha_num_macros - && !strcmp(macro->name, first_macro->name)); + while (++macro - alpha_macros < alpha_num_macros + && !strcmp (macro->name, first_macro->name)); return NULL; } @@ -2307,7 +2313,7 @@ find_macro_match(first_macro, tok, pntok) /* Insert an operand value into an instruction. */ static unsigned -insert_operand(insn, operand, val, file, line) +insert_operand (insn, operand, val, file, line) unsigned insn; const struct alpha_operand *operand; offsetT val; @@ -2335,11 +2341,11 @@ insert_operand(insn, operand, val, file, line) _("operand out of range (%s not between %d and %d)"); char buf[sizeof (val) * 3 + 2]; - sprint_value(buf, val); + sprint_value (buf, val); if (file) - as_warn_where(file, line, err, buf, min, max); + as_warn_where (file, line, err, buf, min, max); else - as_warn(err, buf, min, max); + as_warn (err, buf, min, max); } } @@ -2363,7 +2369,7 @@ insert_operand(insn, operand, val, file, line) */ static void -assemble_insn(opcode, tok, ntok, insn) +assemble_insn (opcode, tok, ntok, insn) const struct alpha_opcode *opcode; const expressionS *tok; int ntok; @@ -2379,12 +2385,12 @@ assemble_insn(opcode, tok, ntok, insn) for (argidx = opcode->operands; *argidx; ++argidx) { const struct alpha_operand *operand = &alpha_operands[*argidx]; - const expressionS *t = (const expressionS *)0; + const expressionS *t = (const expressionS *) 0; if (operand->flags & AXP_OPERAND_FAKE) { /* fake operands take no value and generate no fixup */ - image = insert_operand(image, operand, 0, NULL, 0); + image = insert_operand (image, operand, 0, NULL, 0); continue; } @@ -2407,7 +2413,7 @@ assemble_insn(opcode, tok, ntok, insn) } break; default: - abort(); + abort (); } } else @@ -2418,12 +2424,12 @@ assemble_insn(opcode, tok, ntok, insn) case O_register: case O_pregister: case O_cpregister: - image = insert_operand(image, operand, regno(t->X_add_number), - NULL, 0); + image = insert_operand (image, operand, regno (t->X_add_number), + NULL, 0); break; case O_constant: - image = insert_operand(image, operand, t->X_add_number, NULL, 0); + image = insert_operand (image, operand, t->X_add_number, NULL, 0); break; default: @@ -2431,7 +2437,7 @@ assemble_insn(opcode, tok, ntok, insn) struct alpha_fixup *fixup; if (insn->nfixups >= MAX_INSN_FIXUPS) - as_fatal(_("too many fixups")); + as_fatal (_("too many fixups")); fixup = &insn->fixups[insn->nfixups++]; @@ -2451,12 +2457,12 @@ assemble_insn(opcode, tok, ntok, insn) static void emit_insn (insn) - struct alpha_insn *insn; + struct alpha_insn *insn; { char *f; int i; - /* Take care of alignment duties */ + /* Take care of alignment duties. */ if (alpha_auto_align_on && alpha_current_align < 2) alpha_align (2, (char *) NULL, alpha_insn_label, 0); if (alpha_current_align > 2) @@ -2467,10 +2473,14 @@ emit_insn (insn) f = frag_more (4); md_number_to_chars (f, insn->insn, 4); +#ifdef OBJ_ELF + dwarf2_emit_insn (4); +#endif + /* Apply the fixups in order */ for (i = 0; i < insn->nfixups; ++i) { - const struct alpha_operand *operand = (const struct alpha_operand *)0; + const struct alpha_operand *operand = (const struct alpha_operand *) 0; struct alpha_fixup *fixup = &insn->fixups[i]; int size, pcrel; fixS *fixP; @@ -2480,48 +2490,49 @@ emit_insn (insn) #endif /* Some fixups are only used internally and so have no howto */ - if ((int)fixup->reloc < 0) + if ((int) fixup->reloc < 0) { - operand = &alpha_operands[-(int)fixup->reloc]; + operand = &alpha_operands[-(int) fixup->reloc]; size = 4; pcrel = ((operand->flags & AXP_OPERAND_RELATIVE) != 0); } - else switch (fixup->reloc) - { + else + switch (fixup->reloc) + { #ifdef OBJ_ELF - /* These relocation types are only used internally. */ - case BFD_RELOC_ALPHA_GPDISP_HI16: - case BFD_RELOC_ALPHA_GPDISP_LO16: - size = 2; - pcrel = 0; - break; + /* These relocation types are only used internally. */ + case BFD_RELOC_ALPHA_GPDISP_HI16: + case BFD_RELOC_ALPHA_GPDISP_LO16: + size = 2; + pcrel = 0; + break; #endif #ifdef RELOC_OP_P - /* and these also are internal only relocations */ - case BFD_RELOC_ALPHA_USER_LITERAL: - case BFD_RELOC_ALPHA_USER_LITUSE_BASE: - case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF: - case BFD_RELOC_ALPHA_USER_LITUSE_JSR: - case BFD_RELOC_ALPHA_USER_GPDISP: - case BFD_RELOC_ALPHA_USER_GPRELHIGH: - case BFD_RELOC_ALPHA_USER_GPRELLOW: - size = 2; - pcrel = 0; - break; + /* and these also are internal only relocations */ + case BFD_RELOC_ALPHA_USER_LITERAL: + case BFD_RELOC_ALPHA_USER_LITUSE_BASE: + case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF: + case BFD_RELOC_ALPHA_USER_LITUSE_JSR: + case BFD_RELOC_ALPHA_USER_GPDISP: + case BFD_RELOC_ALPHA_USER_GPRELHIGH: + case BFD_RELOC_ALPHA_USER_GPRELLOW: + size = 2; + pcrel = 0; + break; #endif - default: - { - reloc_howto_type *reloc_howto - = bfd_reloc_type_lookup (stdoutput, fixup->reloc); - assert (reloc_howto); + default: + { + reloc_howto_type *reloc_howto + = bfd_reloc_type_lookup (stdoutput, fixup->reloc); + assert (reloc_howto); - size = bfd_get_reloc_size (reloc_howto); - pcrel = reloc_howto->pc_relative; + size = bfd_get_reloc_size (reloc_howto); + pcrel = reloc_howto->pc_relative; + } + assert (size >= 1 && size <= 4); + break; } - assert (size >= 1 && size <= 4); - break; - } fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size, &fixup->exp, pcrel, fixup->reloc); @@ -2559,7 +2570,7 @@ emit_insn (insn) info->segment = now_seg; info->sequence = insn->sequence[i]; strcpy (info->string, buffer); - errmsg = hash_insert (alpha_literal_hash, info->string, (PTR)info); + errmsg = hash_insert (alpha_literal_hash, info->string, (PTR) info); if (errmsg) as_bad (errmsg); } @@ -2590,7 +2601,7 @@ emit_insn (insn) info->segment = now_seg; info->sequence = insn->sequence[i]; strcpy (info->string, buffer); - errmsg = hash_insert (alpha_literal_hash, info->string, (PTR)info); + errmsg = hash_insert (alpha_literal_hash, info->string, (PTR) info); if (errmsg) as_bad (errmsg); } @@ -2605,7 +2616,7 @@ emit_insn (insn) #endif default: - if ((int)fixup->reloc < 0) + if ((int) fixup->reloc < 0) { if (operand->flags & AXP_OPERAND_NOOVERFLOW) fixP->fx_no_overflow = 1; @@ -2622,7 +2633,7 @@ emit_insn (insn) than one insn in an insn structure. */ static void -assemble_tokens_to_insn(opname, tok, ntok, insn) +assemble_tokens_to_insn (opname, tok, ntok, insn) const char *opname; const expressionS *tok; int ntok; @@ -2645,7 +2656,7 @@ assemble_tokens_to_insn(opname, tok, ntok, insn) as_bad (_("inappropriate arguments for opcode `%s'"), opname); else as_bad (_("opcode `%s' not supported for target %s"), opname, - alpha_target_name); + alpha_target_name); } else as_bad (_("unknown opcode `%s'"), opname); @@ -2684,12 +2695,12 @@ assemble_tokens (opname, tok, ntok, local_macros_on) } #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, opname); + (int) reloc_exp->X_add_number, opname); ntok--; } #endif @@ -2718,7 +2729,6 @@ assemble_tokens (opname, tok, ntok, local_macros_on) else as_bad (_("unknown opcode `%s'"), opname); } - /* Some instruction sets indexed by lg(size) */ static const char * const sextX_op[] = { "sextb", "sextw", "sextl", NULL }; @@ -2751,12 +2761,12 @@ FIXME expressionS addend; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "ldgp"); + (int) reloc_exp->X_add_number, "ldgp"); ntok--; } #endif @@ -2839,7 +2849,7 @@ add_to_link_pool (basesym, sym, addend) { if (range_signed_16 (offset)) { - return offset; + return offset; } } } @@ -2938,7 +2948,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) assemble_tokens_to_insn ("ldq", newtok, 3, &insn); - assert (explicit_reloc == (const expressionS *)0); + assert (explicit_reloc == (const expressionS *) 0); assert (insn.nfixups == 1); insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITERAL; #endif /* OBJ_ECOFF */ @@ -2960,8 +2970,9 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) /* XXX: Disable this .got minimizing optimization so that we can get better instruction offset knowledge in the compiler. This happens very infrequently anyway. */ - if (1 || (!range_signed_32 (addend) - && (alpha_noat_on || targreg == AXP_REG_AT))) + if (1 + || (!range_signed_32 (addend) + && (alpha_noat_on || targreg == AXP_REG_AT))) { newtok[1] = *exp; addend = 0; @@ -2994,7 +3005,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) /* Find symbol or symbol pointer in link section. */ - assert (explicit_reloc == (const expressionS *)0); + assert (explicit_reloc == (const expressionS *) 0); if (exp->X_add_symbol == alpha_evax_proc.symbol) { if (range_signed_16 (addend)) @@ -3033,7 +3044,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) } #endif /* OBJ_EVAX */ - emit_insn(&insn); + emit_insn (&insn); #ifndef OBJ_EVAX emit_lituse = 1; @@ -3053,14 +3064,14 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) break; case O_constant: - assert (explicit_reloc == (const expressionS *)0); + assert (explicit_reloc == (const expressionS *) 0); break; case O_subtract: /* Assume that this difference expression will be resolved to an - absolute value and that that value will fit in 16 bits. */ + absolute value and that that value will fit in 16 bits. */ - assert (explicit_reloc == (const expressionS *)0); + assert (explicit_reloc == (const expressionS *) 0); set_tok_reg (newtok[0], targreg); newtok[1] = *exp; set_tok_preg (newtok[2], basereg); @@ -3162,7 +3173,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) if (insn.nfixups > 0) { memmove (&insn.fixups[1], &insn.fixups[0], - sizeof(struct alpha_fixup) * insn.nfixups); + sizeof (struct alpha_fixup) * insn.nfixups); } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; @@ -3254,22 +3265,22 @@ emit_lda (tok, ntok, opname) const PTR opname; { int basereg; - const expressionS *reloc = (const expressionS *)0; + const expressionS *reloc = (const expressionS *) 0; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { const struct alpha_reloc_op_tag *r; - reloc = &tok[ntok-1]; + reloc = &tok[ntok - 1]; r = ALPHA_RELOC_TABLE (reloc->X_op); switch (reloc->X_op) { default: as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc->X_add_number, (const char *)opname); + (int) reloc->X_add_number, (const char *) opname); - reloc = (const expressionS *)0; + reloc = (const expressionS *) 0; ntok--; break; @@ -3283,15 +3294,15 @@ emit_lda (tok, ntok, opname) case O_lituse_base: if (ntok != 4 || tok[0].X_op != O_register - || !is_ir_num(tok[0].X_add_number) + || !is_ir_num (tok[0].X_add_number) || tok[1].X_op != O_constant || tok[2].X_op != O_pregister - || !is_ir_num(tok[2].X_add_number)) + || !is_ir_num (tok[2].X_add_number)) { - as_bad (_("bad instruction format for lda !%s!%d"), r->name, - reloc->X_add_number); + as_bad (_("bad instruction format for lda !%s!%ld"), r->name, + (long) reloc->X_add_number); - reloc = (const expressionS *)0; + reloc = (const expressionS *) 0; ntok--; break; } @@ -3322,12 +3333,12 @@ emit_ldah (tok, ntok, unused) expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "ldah"); + (int) reloc_exp->X_add_number, "ldah"); ntok--; } #endif @@ -3354,13 +3365,13 @@ emit_ir_load (tok, ntok, opname) struct alpha_insn insn; #ifdef RELOC_OP_P - const expressionS *reloc = (const expressionS *)0; + const expressionS *reloc = (const expressionS *) 0; - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { const struct alpha_reloc_op_tag *r; - reloc = &tok[ntok-1]; + reloc = &tok[ntok - 1]; switch (reloc->X_op) { case O_lituse_base: @@ -3368,7 +3379,7 @@ emit_ir_load (tok, ntok, opname) break; case O_literal: - if (strcmp ((const char *)opname, "ldq") == 0) + if (strcmp ((const char *) opname, "ldq") == 0) { emit_lda (tok, ntok, opname); return; @@ -3379,7 +3390,7 @@ emit_ir_load (tok, ntok, opname) ntok--; r = ALPHA_RELOC_TABLE (reloc->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc->X_add_number, (const char *)opname); + (int) reloc->X_add_number, (const char *) opname); } } #endif @@ -3390,12 +3401,12 @@ emit_ir_load (tok, ntok, opname) basereg = tok[2].X_add_number; lituse = load_expression (tok[0].X_add_number, &tok[1], &basereg, - &newtok[1], (const expressionS *)0); + &newtok[1], (const expressionS *) 0); newtok[0] = tok[0]; set_tok_preg (newtok[2], basereg); - assemble_tokens_to_insn ((const char *)opname, newtok, 3, &insn); + assemble_tokens_to_insn ((const char *) opname, newtok, 3, &insn); #ifdef RELOC_OP_P if (reloc) @@ -3419,7 +3430,7 @@ emit_ir_load (tok, ntok, opname) if (insn.nfixups > 0) { memmove (&insn.fixups[1], &insn.fixups[0], - sizeof(struct alpha_fixup) * insn.nfixups); + sizeof (struct alpha_fixup) * insn.nfixups); } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; @@ -3445,16 +3456,16 @@ emit_loadstore (tok, ntok, opname) struct alpha_insn insn; #ifdef RELOC_OP_P - const expressionS *reloc = (const expressionS *)0; + const expressionS *reloc = (const expressionS *) 0; - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { reloc = &tok[--ntok]; if (reloc->X_op != O_lituse_base) { - const struct alpha_reloc_op_tag *r = &alpha_reloc_op[ reloc->X_md ]; + const struct alpha_reloc_op_tag *r = &alpha_reloc_op[reloc->X_md]; as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc->X_add_number, (const char *)opname); + (int) reloc->X_add_number, (const char *) opname); } } #endif @@ -3464,13 +3475,13 @@ emit_loadstore (tok, ntok, opname) else basereg = tok[2].X_add_number; - if (tok[1].X_op != O_constant || !range_signed_16(tok[1].X_add_number)) + if (tok[1].X_op != O_constant || !range_signed_16 (tok[1].X_add_number)) { if (alpha_noat_on) as_bad (_("macro requires $at register while noat in effect")); lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1], - (const expressionS *)0); + (const expressionS *) 0); } else { @@ -3481,7 +3492,7 @@ emit_loadstore (tok, ntok, opname) newtok[0] = tok[0]; set_tok_preg (newtok[2], basereg); - assemble_tokens_to_insn ((const char *)opname, newtok, 3, &insn); + assemble_tokens_to_insn ((const char *) opname, newtok, 3, &insn); #ifdef RELOC_OP_P if (reloc) @@ -3505,7 +3516,7 @@ emit_loadstore (tok, ntok, opname) if (insn.nfixups > 0) { memmove (&insn.fixups[1], &insn.fixups[0], - sizeof(struct alpha_fixup) * insn.nfixups); + sizeof (struct alpha_fixup) * insn.nfixups); } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; @@ -3526,20 +3537,20 @@ emit_ldXu (tok, ntok, vlgsize) const PTR vlgsize; { if (alpha_target & AXP_OPCODE_BWX) - emit_ir_load (tok, ntok, ldXu_op[(long)vlgsize]); + emit_ir_load (tok, ntok, ldXu_op[(long) vlgsize]); else { expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "ldbu/ldwu"); + (int) reloc_exp->X_add_number, "ldbu/ldwu"); ntok--; } #endif @@ -3564,7 +3575,7 @@ emit_ldXu (tok, ntok, vlgsize) set_tok_reg (newtok[1], AXP_REG_AT); newtok[2] = newtok[0]; - assemble_tokens (extXl_op[(long)vlgsize], newtok, 3, 1); + assemble_tokens (extXl_op[(long) vlgsize], newtok, 3, 1); } } @@ -3577,7 +3588,7 @@ emit_ldX (tok, ntok, vlgsize) const PTR vlgsize; { emit_ldXu (tok, ntok, vlgsize); - assemble_tokens (sextX_op[(long)vlgsize], tok, 1, 1); + assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1); } /* Load an integral value from an unaligned address as an unsigned @@ -3589,7 +3600,7 @@ emit_uldXu (tok, ntok, vlgsize) int ntok; const PTR vlgsize; { - long lgsize = (long)vlgsize; + long lgsize = (long) vlgsize; expressionS newtok[3]; if (alpha_noat_on) @@ -3611,7 +3622,7 @@ emit_uldXu (tok, ntok, vlgsize) /* emit "ldq_u $t10, size-1($at)" */ set_tok_reg (newtok[0], AXP_REG_T10); - set_tok_const (newtok[1], (1<<lgsize)-1); + set_tok_const (newtok[1], (1 << lgsize) - 1); assemble_tokens ("ldq_u", newtok, 3, 1); /* emit "extXl $t9, $at, $t9" */ @@ -3646,7 +3657,7 @@ emit_uldX (tok, ntok, vlgsize) const PTR vlgsize; { emit_uldXu (tok, ntok, vlgsize); - assemble_tokens (sextX_op[(long)vlgsize], tok, 1, 1); + assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1); } /* Implement the ldil macro. */ @@ -3660,17 +3671,17 @@ emit_ldil (tok, ntok, unused) expressionS newtok[2]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "ldil"); + (int) reloc_exp->X_add_number, "ldil"); ntok--; } #endif - memcpy (newtok, tok, sizeof(newtok)); + memcpy (newtok, tok, sizeof (newtok)); newtok[1].X_add_number = sign_extend_32 (tok[1].X_add_number); assemble_tokens ("lda", newtok, ntok, 1); @@ -3684,7 +3695,7 @@ emit_stX (tok, ntok, vlgsize) int ntok; const PTR vlgsize; { - int lgsize = (int)(long)vlgsize; + int lgsize = (int) (long) vlgsize; if (alpha_target & AXP_OPCODE_BWX) emit_loadstore (tok, ntok, stX_op[lgsize]); @@ -3693,7 +3704,7 @@ emit_stX (tok, ntok, vlgsize) expressionS newtok[3]; if (alpha_noat_on) - as_bad(_("macro requires $at register while noat in effect")); + as_bad (_("macro requires $at register while noat in effect")); /* emit "lda $at, exp" */ @@ -3742,7 +3753,7 @@ emit_ustX (tok, ntok, vlgsize) int ntok; const PTR vlgsize; { - int lgsize = (int)(long)vlgsize; + int lgsize = (int) (long) vlgsize; expressionS newtok[3]; /* emit "lda $at, exp" */ @@ -3761,7 +3772,7 @@ emit_ustX (tok, ntok, vlgsize) /* emit "ldq_u $10, size-1($at)" */ set_tok_reg (newtok[0], AXP_REG_T10); - set_tok_const (newtok[1], (1 << lgsize)-1); + set_tok_const (newtok[1], (1 << lgsize) - 1); assemble_tokens ("ldq_u", newtok, 3, 1); /* emit "insXl src, $at, $t11" */ @@ -3812,7 +3823,7 @@ emit_ustX (tok, ntok, vlgsize) /* emit "stq_u $t10, size-1($at)" */ set_tok_reg (newtok[0], AXP_REG_T10); - set_tok_const (newtok[1], (1 << lgsize)-1); + set_tok_const (newtok[1], (1 << lgsize) - 1); assemble_tokens ("stq_u", newtok, 3, 1); } @@ -3825,7 +3836,7 @@ emit_sextX (tok, ntok, vlgsize) int ntok; const PTR vlgsize; { - long lgsize = (long)vlgsize; + long lgsize = (long) vlgsize; if (alpha_target & AXP_OPCODE_BWX) assemble_tokens (sextX_op[lgsize], tok, ntok, 0); @@ -3835,14 +3846,14 @@ emit_sextX (tok, ntok, vlgsize) expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "setxt"); + (int) reloc_exp->X_add_number, "setxt"); ntok--; } #endif @@ -3894,12 +3905,12 @@ emit_division (tok, ntok, symname) expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, (char char *)symname); + (int) reloc_exp->X_add_number, (char char *) symname); ntok--; } #endif @@ -3945,7 +3956,7 @@ emit_division (tok, ntok, symname) { set_tok_reg (newtok[0], xr); set_tok_reg (newtok[1], AXP_REG_R16); - assemble_tokens ("mov", newtok, 2, 1); + assemble_tokens ("mov", newtok, 2, 1); } if (yr != AXP_REG_R16 && yr != AXP_REG_R17) @@ -3956,7 +3967,7 @@ emit_division (tok, ntok, symname) } } - sym = symbol_find_or_make ((const char *)symname); + sym = symbol_find_or_make ((const char *) symname); set_tok_reg (newtok[0], AXP_REG_AT); set_tok_sym (newtok[1], sym, 0); @@ -4004,12 +4015,12 @@ emit_division (tok, ntok, symname) expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, (const char *)symname); + (int) reloc_exp->X_add_number, (const char *) symname); ntok--; } #endif @@ -4022,7 +4033,7 @@ emit_division (tok, ntok, symname) else rr = regno (tok[2].X_add_number); - sym = symbol_find_or_make ((const char *)symname); + sym = symbol_find_or_make ((const char *) symname); /* Move the operands into the right place */ if (yr == AXP_REG_T10 && xr == AXP_REG_T11) @@ -4057,7 +4068,7 @@ emit_division (tok, ntok, symname) { set_tok_reg (newtok[0], xr); set_tok_reg (newtok[1], AXP_REG_T10); - assemble_tokens ("mov", newtok, 2, 1); + assemble_tokens ("mov", newtok, 2, 1); } if (yr != AXP_REG_T10 && yr != AXP_REG_T11) @@ -4111,12 +4122,12 @@ emit_jsrjmp (tok, ntok, vopname) int r, tokidx = 0, lituse = 0; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, opname); + (int) reloc_exp->X_add_number, opname); ntok--; } #endif @@ -4138,7 +4149,7 @@ emit_jsrjmp (tok, ntok, vopname) { int basereg = alpha_gp_register; lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], &basereg, NULL, - (const expressionS *)0); + (const expressionS *) 0); } #endif @@ -4162,7 +4173,7 @@ emit_jsrjmp (tok, ntok, vopname) if (insn.nfixups > 0) { memmove (&insn.fixups[1], &insn.fixups[0], - sizeof(struct alpha_fixup) * insn.nfixups); + sizeof (struct alpha_fixup) * insn.nfixups); } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; @@ -4183,17 +4194,17 @@ emit_retjcr (tok, ntok, vopname) int ntok; const PTR vopname; { - const char *opname = (const char *)vopname; + const char *opname = (const char *) vopname; expressionS newtok[3]; int r, tokidx = 0; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, opname); + (int) reloc_exp->X_add_number, opname); ntok--; } #endif @@ -4216,7 +4227,7 @@ emit_retjcr (tok, ntok, vopname) if (tokidx < ntok) newtok[2] = tok[tokidx]; else - set_tok_const (newtok[2], strcmp(opname, "ret") == 0); + set_tok_const (newtok[2], strcmp (opname, "ret") == 0); assemble_tokens (opname, newtok, 3, 0); } @@ -4309,7 +4320,7 @@ s_alpha_comm (ignore) { offsetT align; - input_line_pointer++; + input_line_pointer++; align = get_absolute_expression (); bfd_set_section_alignment (stdoutput, new_seg, align); } @@ -4324,7 +4335,7 @@ s_alpha_comm (ignore) #ifdef OBJ_EVAX if (bfd_section_size (stdoutput, new_seg) > 0) - { + { if (bfd_section_size (stdoutput, new_seg) != temp) as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."), S_GET_NAME (symbolP), @@ -4343,7 +4354,7 @@ s_alpha_comm (ignore) #endif else { -#ifdef OBJ_EVAX +#ifdef OBJ_EVAX subseg_set (new_seg, 0); p = frag_more (temp); new_seg->flags |= SEC_IS_COMMON; @@ -4499,7 +4510,7 @@ s_alpha_end (dummy) (expressionS *) xmalloc (sizeof (expressionS)); symbol_get_obj (sym)->size->X_op = O_subtract; symbol_get_obj (sym)->size->X_add_symbol - = symbol_new ("L0\001", now_seg, frag_now_fix (), frag_now); + = symbol_new ("L0\001", now_seg, frag_now_fix (), frag_now); symbol_get_obj (sym)->size->X_op_symbol = sym; symbol_get_obj (sym)->size->X_add_number = 0; } @@ -4519,9 +4530,9 @@ s_alpha_mask (fp) if (ECOFF_DEBUGGING) { if (fp) - ecoff_directive_fmask (0); + ecoff_directive_fmask (0); else - ecoff_directive_mask (0); + ecoff_directive_mask (0); } else discard_rest_of_line (); @@ -4555,19 +4566,87 @@ s_alpha_prologue (ignore) switch (arg) { - case 0: /* No PV required. */ - S_SET_OTHER (sym, STO_ALPHA_NOPV); - break; - case 1: /* Std GP load. */ - S_SET_OTHER (sym, STO_ALPHA_STD_GPLOAD); - break; - case 2: /* Non-std use of PV. */ - break; - - default: - as_bad (_("Invalid argument %d to .prologue."), arg); - break; - } + case 0: /* No PV required. */ + S_SET_OTHER (sym, STO_ALPHA_NOPV + | (S_GET_OTHER (sym) & ~STO_ALPHA_STD_GPLOAD)); + break; + case 1: /* Std GP load. */ + S_SET_OTHER (sym, STO_ALPHA_STD_GPLOAD + | (S_GET_OTHER (sym) & ~STO_ALPHA_STD_GPLOAD)); + break; + case 2: /* Non-std use of PV. */ + break; + + default: + as_bad (_("Invalid argument %d to .prologue."), arg); + break; + } +} + +static char *first_file_directive; + +static void +s_alpha_file (ignore) + int ignore ATTRIBUTE_UNUSED; +{ + /* Save the first .file directive we see, so that we can change our + minds about whether ecoff debugging should or shouldn't be enabled. */ + if (alpha_flag_mdebug < 0 && ! first_file_directive) + { + char *start = input_line_pointer; + size_t len; + + discard_rest_of_line (); + + len = input_line_pointer - start; + first_file_directive = xmalloc (len + 1); + memcpy (first_file_directive, start, len); + first_file_directive[len] = '\0'; + + input_line_pointer = start; + } + + if (ECOFF_DEBUGGING) + ecoff_directive_file (0); + else + dwarf2_directive_file (0); +} + +static void +s_alpha_loc (ignore) + int ignore ATTRIBUTE_UNUSED; +{ + if (ECOFF_DEBUGGING) + ecoff_directive_loc (0); + else + dwarf2_directive_loc (0); +} + +static void +s_alpha_stab (n) + int n; +{ + /* If we've been undecided about mdebug, make up our minds in favour. */ + if (alpha_flag_mdebug < 0) + { + segT sec = subseg_new (".mdebug", 0); + bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY); + bfd_set_section_alignment (stdoutput, sec, 3); + + ecoff_read_begin_hook (); + + if (first_file_directive) + { + char *save_ilp = input_line_pointer; + input_line_pointer = first_file_directive; + ecoff_directive_file (0); + input_line_pointer = save_ilp; + free (first_file_directive); + } + + alpha_flag_mdebug = 1; + } + s_stab (n); } static void @@ -4580,17 +4659,15 @@ s_alpha_coff_wrapper (which) ecoff_directive_def, ecoff_directive_dim, ecoff_directive_endef, - ecoff_directive_file, ecoff_directive_scl, ecoff_directive_tag, ecoff_directive_val, - ecoff_directive_loc, }; - assert (which >= 0 && which < (int)(sizeof(fns)/sizeof(*fns))); + assert (which >= 0 && which < (int) (sizeof (fns)/sizeof (*fns))); if (ECOFF_DEBUGGING) - (*fns[which])(0); + (*fns[which]) (0); else { as_bad (_("ECOFF debugging is disabled.")); @@ -4600,16 +4677,16 @@ s_alpha_coff_wrapper (which) #endif /* OBJ_ELF */ #ifdef OBJ_EVAX - + /* Handle the section specific pseudo-op. */ - + static void s_alpha_section (secid) int secid; { int temp; #define EVAX_SECTION_COUNT 5 - static char *section_name[EVAX_SECTION_COUNT+1] = + static char *section_name[EVAX_SECTION_COUNT + 1] = { "NULL", ".rdata", ".comm", ".link", ".ctors", ".dtors" }; if ((secid <= 0) || (secid > EVAX_SECTION_COUNT)) @@ -4626,7 +4703,6 @@ s_alpha_section (secid) alpha_current_align = 0; } - /* Parse .ent directives. */ static void @@ -4664,7 +4740,6 @@ s_alpha_ent (ignore) return; } - /* Parse .frame <framreg>,<framesize>,RA,<rsa_offset> directives. */ static void @@ -4757,15 +4832,15 @@ s_alpha_pdesc (ignore) name = input_line_pointer; name_end = get_symbol_end (); - if (strncmp(name, "stack", 5) == 0) + if (strncmp (name, "stack", 5) == 0) { alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_STACK; } - else if (strncmp(name, "reg", 3) == 0) + else if (strncmp (name, "reg", 3) == 0) { alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_REGISTER; } - else if (strncmp(name, "null", 4) == 0) + else if (strncmp (name, "null", 4) == 0) { alpha_evax_proc.pdsckind = PDSC_S_K_KIND_NULL; } @@ -4790,34 +4865,33 @@ s_alpha_pdesc (ignore) seginfo->literal_pool_size += 16; *p = alpha_evax_proc.pdsckind - | ((alpha_evax_proc.framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0); - *(p+1) = PDSC_S_M_NATIVE - | PDSC_S_M_NO_JACKET; + | ((alpha_evax_proc.framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0); + *(p + 1) = PDSC_S_M_NATIVE | PDSC_S_M_NO_JACKET; switch (alpha_evax_proc.pdsckind) { - case PDSC_S_K_KIND_NULL: - *(p+2) = 0; - *(p+3) = 0; - break; - case PDSC_S_K_KIND_FP_REGISTER: - *(p+2) = alpha_evax_proc.fp_save; - *(p+3) = alpha_evax_proc.ra_save; - break; - case PDSC_S_K_KIND_FP_STACK: - md_number_to_chars (p+2, (valueT)alpha_evax_proc.rsa_offset, 2); - break; - default: /* impossible */ - break; + case PDSC_S_K_KIND_NULL: + *(p + 2) = 0; + *(p + 3) = 0; + break; + case PDSC_S_K_KIND_FP_REGISTER: + *(p + 2) = alpha_evax_proc.fp_save; + *(p + 3) = alpha_evax_proc.ra_save; + break; + case PDSC_S_K_KIND_FP_STACK: + md_number_to_chars (p + 2, (valueT) alpha_evax_proc.rsa_offset, 2); + break; + default: /* impossible */ + break; } - *(p+4) = 0; - *(p+5) = alpha_evax_proc.type & 0x0f; + *(p + 4) = 0; + *(p + 5) = alpha_evax_proc.type & 0x0f; /* Signature offset. */ - md_number_to_chars (p+6, (valueT)0, 2); + md_number_to_chars (p + 6, (valueT) 0, 2); - fix_new_exp (frag_now, p-frag_now->fr_literal+8, 8, &exp, 0, BFD_RELOC_64); + fix_new_exp (frag_now, p - frag_now->fr_literal+8, 8, &exp, 0, BFD_RELOC_64); if (alpha_evax_proc.pdsckind == PDSC_S_K_KIND_NULL) return; @@ -4829,12 +4903,12 @@ s_alpha_pdesc (ignore) seginfo->literal_pool_size += 8; /* pdesc+16: Size. */ - md_number_to_chars (p, (valueT)alpha_evax_proc.framesize, 4); + md_number_to_chars (p, (valueT) alpha_evax_proc.framesize, 4); - md_number_to_chars (p+4, (valueT)0, 2); + md_number_to_chars (p + 4, (valueT) 0, 2); /* Entry length. */ - md_number_to_chars (p+6, alpha_evax_proc.prologue, 2); + md_number_to_chars (p + 6, alpha_evax_proc.prologue, 2); if (alpha_evax_proc.pdsckind == PDSC_S_K_KIND_FP_REGISTER) return; @@ -4848,12 +4922,11 @@ s_alpha_pdesc (ignore) /* pdesc+24: register masks. */ md_number_to_chars (p, alpha_evax_proc.imask, 4); - md_number_to_chars (p+4, alpha_evax_proc.fmask, 4); + md_number_to_chars (p + 4, alpha_evax_proc.fmask, 4); return; } - /* Support for crash debug on vms. */ static void @@ -4889,12 +4962,11 @@ s_alpha_name (ignore) p = frag_more (8); seginfo->literal_pool_size += 8; - fix_new_exp (frag_now, p-frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64); + fix_new_exp (frag_now, p - frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64); return; } - static void s_alpha_linkage (ignore) int ignore; @@ -4923,7 +4995,6 @@ s_alpha_linkage (ignore) return; } - static void s_alpha_code_address (ignore) int ignore; @@ -4952,7 +5023,6 @@ s_alpha_code_address (ignore) return; } - static void s_alpha_fp_save (ignore) int ignore; @@ -4964,7 +5034,6 @@ s_alpha_fp_save (ignore) return; } - static void s_alpha_mask (ignore) int ignore; @@ -4979,14 +5048,13 @@ s_alpha_mask (ignore) else { alpha_evax_proc.imask = val; - (void)get_absolute_expression (); + (void) get_absolute_expression (); } demand_empty_rest_of_line (); return; } - static void s_alpha_fmask (ignore) int ignore; @@ -5022,7 +5090,6 @@ s_alpha_end (ignore) return; } - static void s_alpha_file (ignore) int ignore; @@ -5064,13 +5131,13 @@ s_alpha_gprel32 (ignore) switch (e.X_op) { case O_constant: - e.X_add_symbol = section_symbol(absolute_section); + e.X_add_symbol = section_symbol (absolute_section); e.X_op = O_symbol; /* FALLTHRU */ case O_symbol: break; default: - abort(); + abort (); } #else #ifdef OBJ_ECOFF @@ -5097,7 +5164,7 @@ s_alpha_gprel32 (ignore) p = frag_more (4); memset (p, 0, 4); - fix_new_exp (frag_now, p-frag_now->fr_literal, 4, + fix_new_exp (frag_now, p - frag_now->fr_literal, 4, &e, 0, BFD_RELOC_GPREL32); } @@ -5366,45 +5433,43 @@ s_alpha_arch (ignored) ch = get_symbol_end (); for (p = cpu_types; p->name; ++p) - if (strcmp(name, p->name) == 0) + if (strcmp (name, p->name) == 0) { - alpha_target_name = p->name, alpha_target = p->flags; + alpha_target_name = p->name, alpha_target = p->flags; goto found; } - as_warn("Unknown CPU identifier `%s'", name); + as_warn ("Unknown CPU identifier `%s'", name); found: *input_line_pointer = ch; demand_empty_rest_of_line (); } - - #ifdef DEBUG1 /* print token expression with alpha specific extension. */ static void -alpha_print_token(f, exp) - FILE *f; - const expressionS *exp; +alpha_print_token (f, exp) + FILE *f; + const expressionS *exp; { switch (exp->X_op) { - case O_cpregister: - putc (',', f); - /* FALLTHRU */ - case O_pregister: - putc ('(', f); - { - expressionS nexp = *exp; - nexp.X_op = O_register; - print_expr (f, &nexp); - } - putc (')', f); - break; - default: - print_expr (f, exp); - break; + case O_cpregister: + putc (',', f); + /* FALLTHRU */ + case O_pregister: + putc ('(', f); + { + expressionS nexp = *exp; + nexp.X_op = O_register; + print_expr (f, &nexp); + } + putc (')', f); + break; + default: + print_expr (f, exp); + break; } return; } @@ -5412,8 +5477,7 @@ alpha_print_token(f, exp) /* The target specific pseudo-ops which we support. */ -const pseudo_typeS md_pseudo_table[] = -{ +const pseudo_typeS md_pseudo_table[] = { #ifdef OBJ_ECOFF {"comm", s_alpha_comm, 0}, /* osf1 compiler does this */ {"rdata", s_alpha_rdata, 0}, @@ -5455,17 +5519,19 @@ const pseudo_typeS md_pseudo_table[] = {"fmask", s_alpha_mask, 1}, {"frame", s_alpha_frame, 0}, {"prologue", s_alpha_prologue, 0}, + {"file", s_alpha_file, 5}, + {"loc", s_alpha_loc, 9}, + {"stabs", s_alpha_stab, 's'}, + {"stabn", s_alpha_stab, 'n'}, /* COFF debugging related pseudos. */ {"begin", s_alpha_coff_wrapper, 0}, {"bend", s_alpha_coff_wrapper, 1}, {"def", s_alpha_coff_wrapper, 2}, {"dim", s_alpha_coff_wrapper, 3}, {"endef", s_alpha_coff_wrapper, 4}, - {"file", s_alpha_coff_wrapper, 5}, - {"scl", s_alpha_coff_wrapper, 6}, - {"tag", s_alpha_coff_wrapper, 7}, - {"val", s_alpha_coff_wrapper, 8}, - {"loc", s_alpha_coff_wrapper, 9}, + {"scl", s_alpha_coff_wrapper, 5}, + {"tag", s_alpha_coff_wrapper, 6}, + {"val", s_alpha_coff_wrapper, 7}, #else {"prologue", s_ignore, 0}, #endif @@ -5518,7 +5584,6 @@ const pseudo_typeS md_pseudo_table[] = {NULL, 0, 0}, }; - /* Build a BFD section with its flags set appropriately for the .lita, .lit8, or .lit4 sections. */ @@ -5566,7 +5631,8 @@ select_gp_value () assert (alpha_gp_value == 0); /* Get minus-one in whatever width... */ - alpha_gp_value = 0; alpha_gp_value--; + alpha_gp_value = 0; + alpha_gp_value--; /* Select the smallest VMA of these existing sections. */ maybe_set_gp (alpha_lita_section); @@ -5607,27 +5673,8 @@ alpha_align (n, pfill, label, force) if (pfill == NULL) { - if (n > 2 - && (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) - { - static char const unop[4] = { 0x00, 0x00, 0xe0, 0x2f }; - static char const nopunop[8] = { - 0x1f, 0x04, 0xff, 0x47, - 0x00, 0x00, 0xe0, 0x2f - }; - - /* First, make sure we're on a four-byte boundary, in case - someone has been putting .byte values into the text - section. The DEC assembler silently fills with unaligned - no-op instructions. This will zero-fill, then nop-fill - with proper alignment. */ - if (alpha_current_align < 2) - frag_align (2, 0, 0); - if (alpha_current_align < 3) - frag_align_pattern (3, unop, sizeof unop, 0); - if (n > 3) - frag_align_pattern (n, nopunop, sizeof nopunop, 0); - } + if (subseg_text_p (now_seg)) + frag_align_code (n, 0); else frag_align (n, 0, 0); } @@ -5644,10 +5691,55 @@ alpha_align (n, pfill, label, force) record_alignment (now_seg, n); - /* ??? if alpha_flag_relax && force && elf, record the requested alignment + /* ??? If alpha_flag_relax && force && elf, record the requested alignment in a reloc for the linker to see. */ } +/* This is called from HANDLE_ALIGN in write.c. Fill in the contents + of an rs_align_code fragment. */ + +void +alpha_handle_align (fragp) + fragS *fragp; +{ + static char const unop[4] = { 0x00, 0x00, 0xe0, 0x2f }; + static char const nopunop[8] = { + 0x1f, 0x04, 0xff, 0x47, + 0x00, 0x00, 0xe0, 0x2f + }; + + int bytes, fix; + char *p; + + if (fragp->fr_type != rs_align_code) + return; + + bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix; + p = fragp->fr_literal + fragp->fr_fix; + fix = 0; + + if (bytes & 3) + { + fix = bytes & 3; + memset (p, 0, fix); + p += fix; + bytes -= fix; + } + + if (bytes & 4) + { + memcpy (p, unop, 4); + p += 4; + bytes -= 4; + fix += 4; + } + + memcpy (p, nopunop, 8); + + fragp->fr_fix += fix; + fragp->fr_var = 8; +} + /* The Alpha has support for some VAX floating point types, as well as for IEEE floating point. We consider IEEE to be the primary floating point format, and sneak in the VAX floating point support here. */ diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h index 632b04e..7edc412 100644 --- a/contrib/binutils/gas/config/tc-alpha.h +++ b/contrib/binutils/gas/config/tc-alpha.h @@ -90,6 +90,11 @@ extern void alpha_define_label PARAMS ((symbolS *)); #define md_cons_align(nbytes) alpha_cons_align (nbytes) extern void alpha_cons_align PARAMS ((int)); +#define HANDLE_ALIGN(fragp) alpha_handle_align (fragp) +extern void alpha_handle_align PARAMS ((struct frag *)); + +#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 8) + #ifdef OBJ_ECOFF #define tc_frob_file_before_adjust() alpha_frob_file_before_adjust () extern void alpha_frob_file_before_adjust PARAMS ((void)); @@ -146,3 +151,5 @@ do { \ (long)fixP->tc_fix_data.next_lituse); \ } while (0) #endif + +#define DWARF2_LINE_MIN_INSN_LENGTH 4 diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c index 04f0060..514dba7 100644 --- a/contrib/binutils/gas/config/tc-arm.c +++ b/contrib/binutils/gas/config/tc-arm.c @@ -1,5 +1,6 @@ /* tc-arm.c -- Assemble for the ARM - Copyright (C) 1994, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 1999, 2000 + Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modified by David Taylor (dtaylor@armltd.co.uk) @@ -25,7 +26,7 @@ #define NO_RELOC 0 #include "as.h" -/* need TARGET_CPU */ +/* Need TARGET_CPU. */ #include "config.h" #include "subsegs.h" #include "obstack.h" @@ -34,6 +35,7 @@ #ifdef OBJ_ELF #include "elf/arm.h" +#include "dwarf2dbg.h" #endif /* Types of processor to assemble for. */ @@ -42,46 +44,53 @@ #define ARM_3 0x00000004 #define ARM_250 ARM_3 #define ARM_6 0x00000008 -#define ARM_7 ARM_6 /* same core instruction set */ -#define ARM_8 ARM_6 /* same core instruction set */ -#define ARM_9 ARM_6 /* same core instruction set */ +#define ARM_7 ARM_6 /* Same core instruction set. */ +#define ARM_8 ARM_6 /* Same core instruction set. */ +#define ARM_9 ARM_6 /* Same core instruction set. */ #define ARM_CPU_MASK 0x0000000f -/* The following bitmasks control CPU extensions (ARM7 onwards): */ -#define ARM_LONGMUL 0x00000010 /* allow long multiplies */ -#define ARM_HALFWORD 0x00000020 /* allow half word loads */ -#define ARM_THUMB 0x00000040 /* allow BX instruction */ -#define ARM_EXT_V5 0x00000080 /* allow CLZ etc */ -#define ARM_EXT_V5E 0x00000200 /* "El Segundo" */ +/* The following bitmasks control CPU extensions (ARM7 onwards): */ +#define ARM_EXT_LONGMUL 0x00000010 /* Allow long multiplies. */ +#define ARM_EXT_HALFWORD 0x00000020 /* Allow half word loads. */ +#define ARM_EXT_THUMB 0x00000040 /* Allow BX instruction. */ +#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */ +#define ARM_EXT_V5E 0x00000100 /* "El Segundo". */ +#define ARM_EXT_XSCALE 0x00000200 /* Allow MIA etc. */ /* Architectures are the sum of the base and extensions. */ -#define ARM_ARCH_V4 (ARM_7 | ARM_LONGMUL | ARM_HALFWORD) -#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_THUMB) +#define ARM_ARCH_V3M ARM_EXT_LONGMUL +#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_HALFWORD) +#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_THUMB) #define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5) -#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_THUMB) +#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_THUMB) +#define ARM_ARCH_V5TE (ARM_ARCH_V5T | ARM_EXT_V5E) +#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_EXT_XSCALE) /* Some useful combinations: */ #define ARM_ANY 0x00ffffff #define ARM_2UP (ARM_ANY - ARM_1) -#define ARM_ALL ARM_2UP /* Not arm1 only */ +#define ARM_ALL ARM_2UP /* Not arm1 only. */ #define ARM_3UP 0x00fffffc -#define ARM_6UP 0x00fffff8 /* Includes ARM7 */ +#define ARM_6UP 0x00fffff8 /* Includes ARM7. */ #define FPU_CORE 0x80000000 #define FPU_FPA10 0x40000000 #define FPU_FPA11 0x40000000 #define FPU_NONE 0 -/* Some useful combinations */ -#define FPU_ALL 0xff000000 /* Note this is ~ARM_ANY */ -#define FPU_MEMMULTI 0x7f000000 /* Not fpu_core */ +/* Some useful combinations. */ +#define FPU_ALL 0xff000000 /* Note this is ~ARM_ANY. */ +#define FPU_MEMMULTI 0x7f000000 /* Not fpu_core. */ - #ifndef CPU_DEFAULT +#if defined __XSCALE__ +#define CPU_DEFAULT (ARM_9 | ARM_ARCH_XSCALE) +#else #if defined __thumb__ -#define CPU_DEFAULT (ARM_ARCH_V4 | ARM_THUMB) +#define CPU_DEFAULT (ARM_7 | ARM_ARCH_V4T) #else -#define CPU_DEFAULT ARM_ALL +#define CPU_DEFAULT ARM_ALL +#endif #endif #endif @@ -90,17 +99,18 @@ #endif #define streq(a, b) (strcmp (a, b) == 0) -#define skip_whitespace(str) while (* (str) == ' ') ++ (str) +#define skip_whitespace(str) while (*(str) == ' ') ++(str) -static unsigned long cpu_variant = CPU_DEFAULT | FPU_DEFAULT; +static unsigned long cpu_variant = CPU_DEFAULT | FPU_DEFAULT; static int target_oabi = 0; #if defined OBJ_COFF || defined OBJ_ELF -/* Flags stored in private area of BFD structure */ -static boolean uses_apcs_26 = false; -static boolean support_interwork = false; -static boolean uses_apcs_float = false; -static boolean pic_code = false; +/* Flags stored in private area of BFD structure. */ +static boolean uses_apcs_26 = false; +static boolean atpcs = false; +static boolean support_interwork = false; +static boolean uses_apcs_float = false; +static boolean pic_code = false; #endif /* This array holds the chars that always start a comment. If the @@ -116,19 +126,15 @@ CONST char comment_chars[] = "@"; /* Also note that comments like this one will always work. */ CONST char line_comment_chars[] = "#"; -#ifdef TE_LINUX CONST char line_separator_chars[] = ";"; -#else -CONST char line_separator_chars[] = ""; -#endif /* Chars that can be used to separate mant from exp in floating point numbers. */ CONST char EXP_CHARS[] = "eE"; -/* Chars that mean this number is a floating point constant */ -/* As in 0f12.456 */ -/* or 0d1.2345e12 */ +/* Chars that mean this number is a floating point constant. */ +/* As in 0f12.456 */ +/* or 0d1.2345e12 */ CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP"; @@ -137,14 +143,19 @@ CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP"; #define is_immediate_prefix(C) ((C) == '#' || (C) == '$') #ifdef OBJ_ELF -symbolS * GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ +/* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ +symbolS * GOT_symbol; #endif -CONST int md_reloc_size = 8; /* Size of relocation record */ +/* Size of relocation record. */ +CONST int md_reloc_size = 8; + +/* 0: assemble for ARM, + 1: assemble for Thumb, + 2: assemble for Thumb even though target CPU does not support thumb + instructions. */ +static int thumb_mode = 0; -static int thumb_mode = 0; /* 0: assemble for ARM, 1: assemble for Thumb, - 2: assemble for Thumb even though target cpu - does not support thumb instructions. */ typedef struct arm_fix { int thumb_mode; @@ -157,35 +168,61 @@ struct arm_it int suffix; int size; struct - { - bfd_reloc_code_real_type type; - expressionS exp; - int pc_rel; - } reloc; + { + bfd_reloc_code_real_type type; + expressionS exp; + int pc_rel; + } reloc; }; struct arm_it inst; -struct asm_shift +enum asm_shift_index { - CONST char * template; - unsigned long value; + SHIFT_LSL = 0, + SHIFT_LSR, + SHIFT_ASR, + SHIFT_ROR, + SHIFT_RRX }; -static CONST struct asm_shift shift[] = -{ - {"asl", 0}, - {"lsl", 0}, - {"lsr", 0x00000020}, - {"asr", 0x00000040}, - {"ror", 0x00000060}, - {"rrx", 0x00000060}, - {"ASL", 0}, - {"LSL", 0}, - {"LSR", 0x00000020}, - {"ASR", 0x00000040}, - {"ROR", 0x00000060}, - {"RRX", 0x00000060} +struct asm_shift_properties +{ + enum asm_shift_index index; + unsigned long bit_field; + unsigned int allows_0 : 1; + unsigned int allows_32 : 1; +}; + +static const struct asm_shift_properties shift_properties [] = +{ + { SHIFT_LSL, 0, 1, 0}, + { SHIFT_LSR, 0x20, 0, 1}, + { SHIFT_ASR, 0x40, 0, 1}, + { SHIFT_ROR, 0x60, 0, 0}, + { SHIFT_RRX, 0x60, 0, 0} +}; + +struct asm_shift_name +{ + const char * name; + const struct asm_shift_properties * properties; +}; + +static const struct asm_shift_name shift_names [] = +{ + { "asl", shift_properties + SHIFT_LSL }, + { "lsl", shift_properties + SHIFT_LSL }, + { "lsr", shift_properties + SHIFT_LSR }, + { "asr", shift_properties + SHIFT_ASR }, + { "ror", shift_properties + SHIFT_ROR }, + { "rrx", shift_properties + SHIFT_RRX }, + { "ASL", shift_properties + SHIFT_LSL }, + { "LSL", shift_properties + SHIFT_LSL }, + { "LSR", shift_properties + SHIFT_LSR }, + { "ASR", shift_properties + SHIFT_ASR }, + { "ROR", shift_properties + SHIFT_ROR }, + { "RRX", shift_properties + SHIFT_RRX } }; #define NO_SHIFT_RESTRICT 1 @@ -193,7 +230,7 @@ static CONST struct asm_shift shift[] = #define NUM_FLOAT_VALS 8 -CONST char * fp_const[] = +CONST char * fp_const[] = { "0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0", 0 }; @@ -217,9 +254,11 @@ LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS]; #define CP_T_UD 0x00800000 #define CP_T_WB 0x00200000 -#define CONDS_BIT (0x00100000) -#define LOAD_BIT (0x00100000) -#define TRANS_BIT (0x00200000) +#define CONDS_BIT 0x00100000 +#define LOAD_BIT 0x00100000 +#define TRANS_BIT 0x00200000 + +#define DOUBLE_LOAD_FLAG 0x00000001 struct asm_cond { @@ -230,7 +269,7 @@ struct asm_cond /* This is to save a hash look-up in the common case. */ #define COND_ALWAYS 0xe0000000 -static CONST struct asm_cond conds[] = +static CONST struct asm_cond conds[] = { {"eq", 0x00000000}, {"ne", 0x10000000}, @@ -255,8 +294,8 @@ static CONST struct asm_cond conds[] = the set_bits: */ struct asm_flg { - CONST char * template; /* Basic flag string */ - unsigned long set_bits; /* Bits to set */ + CONST char * template; /* Basic flag string. */ + unsigned long set_bits; /* Bits to set. */ }; static CONST struct asm_flg s_flag[] = @@ -267,6 +306,7 @@ static CONST struct asm_flg s_flag[] = static CONST struct asm_flg ldr_flags[] = { + {"d", DOUBLE_LOAD_FLAG}, {"b", 0x00400000}, {"t", TRANS_BIT}, {"bt", 0x00400000 | TRANS_BIT}, @@ -278,6 +318,7 @@ static CONST struct asm_flg ldr_flags[] = static CONST struct asm_flg str_flags[] = { + {"d", DOUBLE_LOAD_FLAG}, {"b", 0x00400000}, {"t", TRANS_BIT}, {"bt", 0x00400000 | TRANS_BIT}, @@ -303,24 +344,24 @@ static CONST struct asm_flg ldm_flags[] = {"ed", 0x01800000}, {"fd", 0x00800000}, {"ea", 0x01000000}, - {"fa", 0x08000000}, + {"fa", 0x00000000}, {"ib", 0x01800000}, {"ia", 0x00800000}, {"db", 0x01000000}, - {"da", 0x08000000}, + {"da", 0x00000000}, {NULL, 0} }; static CONST struct asm_flg stm_flags[] = { - {"ed", 0x08000000}, + {"ed", 0x00000000}, {"fd", 0x01000000}, {"ea", 0x00800000}, {"fa", 0x01800000}, {"ib", 0x01800000}, {"ia", 0x00800000}, {"db", 0x01000000}, - {"da", 0x08000000}, + {"da", 0x00000000}, {NULL, 0} }; @@ -386,8 +427,11 @@ struct asm_psr unsigned long field; }; -#define SPSR_BIT (1 << 22) /* The bit that distnguishes CPSR and SPSR. */ -#define PSR_SHIFT 16 /* How many bits to shift the PSR_xxx bits up by. */ +/* The bit that distnguishes CPSR and SPSR. */ +#define SPSR_BIT (1 << 22) + +/* How many bits to shift the PSR_xxx bits up by. */ +#define PSR_SHIFT 16 #define PSR_c (1 << 0) #define PSR_x (1 << 1) @@ -403,7 +447,7 @@ static CONST struct asm_psr psrs[] = {"CPSR_flg", true, PSR_f}, {"CPSR_f", true, PSR_f}, {"SPSR_flg", false, PSR_f}, - {"SPSR_f", false, PSR_f}, + {"SPSR_f", false, PSR_f}, {"CPSR_c", true, PSR_c}, {"CPSR_ctl", true, PSR_c}, {"SPSR_c", false, PSR_c}, @@ -412,24 +456,131 @@ static CONST struct asm_psr psrs[] = {"CPSR_s", true, PSR_s}, {"SPSR_x", false, PSR_x}, {"SPSR_s", false, PSR_s}, - /* For backwards compatability with older toolchain we also - support lower case versions of some of these flags. */ - {"cpsr", true, PSR_c | PSR_f}, - {"cpsr_all", true, PSR_c | PSR_f}, - {"spsr", false, PSR_c | PSR_f}, - {"spsr_all", false, PSR_c | PSR_f}, - {"cpsr_flg", true, PSR_f}, - {"cpsr_f", true, PSR_f}, - {"spsr_flg", false, PSR_f}, - {"spsr_f", false, PSR_f}, - {"cpsr_c", true, PSR_c}, - {"cpsr_ctl", true, PSR_c}, - {"spsr_c", false, PSR_c}, - {"spsr_ctl", false, PSR_c} + /* Combinations of flags. */ + {"CPSR_fs", true, PSR_f | PSR_s}, + {"CPSR_fx", true, PSR_f | PSR_x}, + {"CPSR_fc", true, PSR_f | PSR_c}, + {"CPSR_sf", true, PSR_s | PSR_f}, + {"CPSR_sx", true, PSR_s | PSR_x}, + {"CPSR_sc", true, PSR_s | PSR_c}, + {"CPSR_xf", true, PSR_x | PSR_f}, + {"CPSR_xs", true, PSR_x | PSR_s}, + {"CPSR_xc", true, PSR_x | PSR_c}, + {"CPSR_cf", true, PSR_c | PSR_f}, + {"CPSR_cs", true, PSR_c | PSR_s}, + {"CPSR_cx", true, PSR_c | PSR_x}, + {"CPSR_fsx", true, PSR_f | PSR_s | PSR_x}, + {"CPSR_fsc", true, PSR_f | PSR_s | PSR_c}, + {"CPSR_fxs", true, PSR_f | PSR_x | PSR_s}, + {"CPSR_fxc", true, PSR_f | PSR_x | PSR_c}, + {"CPSR_fcs", true, PSR_f | PSR_c | PSR_s}, + {"CPSR_fcx", true, PSR_f | PSR_c | PSR_x}, + {"CPSR_sfx", true, PSR_s | PSR_f | PSR_x}, + {"CPSR_sfc", true, PSR_s | PSR_f | PSR_c}, + {"CPSR_sxf", true, PSR_s | PSR_x | PSR_f}, + {"CPSR_sxc", true, PSR_s | PSR_x | PSR_c}, + {"CPSR_scf", true, PSR_s | PSR_c | PSR_f}, + {"CPSR_scx", true, PSR_s | PSR_c | PSR_x}, + {"CPSR_xfs", true, PSR_x | PSR_f | PSR_s}, + {"CPSR_xfc", true, PSR_x | PSR_f | PSR_c}, + {"CPSR_xsf", true, PSR_x | PSR_s | PSR_f}, + {"CPSR_xsc", true, PSR_x | PSR_s | PSR_c}, + {"CPSR_xcf", true, PSR_x | PSR_c | PSR_f}, + {"CPSR_xcs", true, PSR_x | PSR_c | PSR_s}, + {"CPSR_cfs", true, PSR_c | PSR_f | PSR_s}, + {"CPSR_cfx", true, PSR_c | PSR_f | PSR_x}, + {"CPSR_csf", true, PSR_c | PSR_s | PSR_f}, + {"CPSR_csx", true, PSR_c | PSR_s | PSR_x}, + {"CPSR_cxf", true, PSR_c | PSR_x | PSR_f}, + {"CPSR_cxs", true, PSR_c | PSR_x | PSR_s}, + {"CPSR_fsxc", true, PSR_f | PSR_s | PSR_x | PSR_c}, + {"CPSR_fscx", true, PSR_f | PSR_s | PSR_c | PSR_x}, + {"CPSR_fxsc", true, PSR_f | PSR_x | PSR_s | PSR_c}, + {"CPSR_fxcs", true, PSR_f | PSR_x | PSR_c | PSR_s}, + {"CPSR_fcsx", true, PSR_f | PSR_c | PSR_s | PSR_x}, + {"CPSR_fcxs", true, PSR_f | PSR_c | PSR_x | PSR_s}, + {"CPSR_sfxc", true, PSR_s | PSR_f | PSR_x | PSR_c}, + {"CPSR_sfcx", true, PSR_s | PSR_f | PSR_c | PSR_x}, + {"CPSR_sxfc", true, PSR_s | PSR_x | PSR_f | PSR_c}, + {"CPSR_sxcf", true, PSR_s | PSR_x | PSR_c | PSR_f}, + {"CPSR_scfx", true, PSR_s | PSR_c | PSR_f | PSR_x}, + {"CPSR_scxf", true, PSR_s | PSR_c | PSR_x | PSR_f}, + {"CPSR_xfsc", true, PSR_x | PSR_f | PSR_s | PSR_c}, + {"CPSR_xfcs", true, PSR_x | PSR_f | PSR_c | PSR_s}, + {"CPSR_xsfc", true, PSR_x | PSR_s | PSR_f | PSR_c}, + {"CPSR_xscf", true, PSR_x | PSR_s | PSR_c | PSR_f}, + {"CPSR_xcfs", true, PSR_x | PSR_c | PSR_f | PSR_s}, + {"CPSR_xcsf", true, PSR_x | PSR_c | PSR_s | PSR_f}, + {"CPSR_cfsx", true, PSR_c | PSR_f | PSR_s | PSR_x}, + {"CPSR_cfxs", true, PSR_c | PSR_f | PSR_x | PSR_s}, + {"CPSR_csfx", true, PSR_c | PSR_s | PSR_f | PSR_x}, + {"CPSR_csxf", true, PSR_c | PSR_s | PSR_x | PSR_f}, + {"CPSR_cxfs", true, PSR_c | PSR_x | PSR_f | PSR_s}, + {"CPSR_cxsf", true, PSR_c | PSR_x | PSR_s | PSR_f}, + {"SPSR_fs", false, PSR_f | PSR_s}, + {"SPSR_fx", false, PSR_f | PSR_x}, + {"SPSR_fc", false, PSR_f | PSR_c}, + {"SPSR_sf", false, PSR_s | PSR_f}, + {"SPSR_sx", false, PSR_s | PSR_x}, + {"SPSR_sc", false, PSR_s | PSR_c}, + {"SPSR_xf", false, PSR_x | PSR_f}, + {"SPSR_xs", false, PSR_x | PSR_s}, + {"SPSR_xc", false, PSR_x | PSR_c}, + {"SPSR_cf", false, PSR_c | PSR_f}, + {"SPSR_cs", false, PSR_c | PSR_s}, + {"SPSR_cx", false, PSR_c | PSR_x}, + {"SPSR_fsx", false, PSR_f | PSR_s | PSR_x}, + {"SPSR_fsc", false, PSR_f | PSR_s | PSR_c}, + {"SPSR_fxs", false, PSR_f | PSR_x | PSR_s}, + {"SPSR_fxc", false, PSR_f | PSR_x | PSR_c}, + {"SPSR_fcs", false, PSR_f | PSR_c | PSR_s}, + {"SPSR_fcx", false, PSR_f | PSR_c | PSR_x}, + {"SPSR_sfx", false, PSR_s | PSR_f | PSR_x}, + {"SPSR_sfc", false, PSR_s | PSR_f | PSR_c}, + {"SPSR_sxf", false, PSR_s | PSR_x | PSR_f}, + {"SPSR_sxc", false, PSR_s | PSR_x | PSR_c}, + {"SPSR_scf", false, PSR_s | PSR_c | PSR_f}, + {"SPSR_scx", false, PSR_s | PSR_c | PSR_x}, + {"SPSR_xfs", false, PSR_x | PSR_f | PSR_s}, + {"SPSR_xfc", false, PSR_x | PSR_f | PSR_c}, + {"SPSR_xsf", false, PSR_x | PSR_s | PSR_f}, + {"SPSR_xsc", false, PSR_x | PSR_s | PSR_c}, + {"SPSR_xcf", false, PSR_x | PSR_c | PSR_f}, + {"SPSR_xcs", false, PSR_x | PSR_c | PSR_s}, + {"SPSR_cfs", false, PSR_c | PSR_f | PSR_s}, + {"SPSR_cfx", false, PSR_c | PSR_f | PSR_x}, + {"SPSR_csf", false, PSR_c | PSR_s | PSR_f}, + {"SPSR_csx", false, PSR_c | PSR_s | PSR_x}, + {"SPSR_cxf", false, PSR_c | PSR_x | PSR_f}, + {"SPSR_cxs", false, PSR_c | PSR_x | PSR_s}, + {"SPSR_fsxc", false, PSR_f | PSR_s | PSR_x | PSR_c}, + {"SPSR_fscx", false, PSR_f | PSR_s | PSR_c | PSR_x}, + {"SPSR_fxsc", false, PSR_f | PSR_x | PSR_s | PSR_c}, + {"SPSR_fxcs", false, PSR_f | PSR_x | PSR_c | PSR_s}, + {"SPSR_fcsx", false, PSR_f | PSR_c | PSR_s | PSR_x}, + {"SPSR_fcxs", false, PSR_f | PSR_c | PSR_x | PSR_s}, + {"SPSR_sfxc", false, PSR_s | PSR_f | PSR_x | PSR_c}, + {"SPSR_sfcx", false, PSR_s | PSR_f | PSR_c | PSR_x}, + {"SPSR_sxfc", false, PSR_s | PSR_x | PSR_f | PSR_c}, + {"SPSR_sxcf", false, PSR_s | PSR_x | PSR_c | PSR_f}, + {"SPSR_scfx", false, PSR_s | PSR_c | PSR_f | PSR_x}, + {"SPSR_scxf", false, PSR_s | PSR_c | PSR_x | PSR_f}, + {"SPSR_xfsc", false, PSR_x | PSR_f | PSR_s | PSR_c}, + {"SPSR_xfcs", false, PSR_x | PSR_f | PSR_c | PSR_s}, + {"SPSR_xsfc", false, PSR_x | PSR_s | PSR_f | PSR_c}, + {"SPSR_xscf", false, PSR_x | PSR_s | PSR_c | PSR_f}, + {"SPSR_xcfs", false, PSR_x | PSR_c | PSR_f | PSR_s}, + {"SPSR_xcsf", false, PSR_x | PSR_c | PSR_s | PSR_f}, + {"SPSR_cfsx", false, PSR_c | PSR_f | PSR_s | PSR_x}, + {"SPSR_cfxs", false, PSR_c | PSR_f | PSR_x | PSR_s}, + {"SPSR_csfx", false, PSR_c | PSR_s | PSR_f | PSR_x}, + {"SPSR_csxf", false, PSR_c | PSR_s | PSR_x | PSR_f}, + {"SPSR_cxfs", false, PSR_c | PSR_x | PSR_f | PSR_s}, + {"SPSR_cxsf", false, PSR_c | PSR_x | PSR_s | PSR_f}, }; /* Functions called by parser. */ -/* ARM instructions */ +/* ARM instructions. */ static void do_arit PARAMS ((char *, unsigned long)); static void do_cmp PARAMS ((char *, unsigned long)); static void do_mov PARAMS ((char *, unsigned long)); @@ -437,25 +588,49 @@ static void do_ldst PARAMS ((char *, unsigned long)); static void do_ldmstm PARAMS ((char *, unsigned long)); static void do_branch PARAMS ((char *, unsigned long)); static void do_swi PARAMS ((char *, unsigned long)); -/* Pseudo Op codes */ +/* Pseudo Op codes. */ static void do_adr PARAMS ((char *, unsigned long)); static void do_adrl PARAMS ((char *, unsigned long)); static void do_nop PARAMS ((char *, unsigned long)); -/* ARM 2 */ +/* ARM 2. */ static void do_mul PARAMS ((char *, unsigned long)); static void do_mla PARAMS ((char *, unsigned long)); -/* ARM 3 */ +/* ARM 3. */ static void do_swap PARAMS ((char *, unsigned long)); -/* ARM 6 */ +/* ARM 6. */ static void do_msr PARAMS ((char *, unsigned long)); static void do_mrs PARAMS ((char *, unsigned long)); -/* ARM 7M */ +/* ARM 7M. */ static void do_mull PARAMS ((char *, unsigned long)); -/* ARM THUMB */ +/* ARM THUMB. */ static void do_bx PARAMS ((char *, unsigned long)); - -/* Coprocessor Instructions */ +/* ARM_EXT_XScale. */ +static void do_mia PARAMS ((char *, unsigned long)); +static void do_mar PARAMS ((char *, unsigned long)); +static void do_mra PARAMS ((char *, unsigned long)); +static void do_pld PARAMS ((char *, unsigned long)); +static void do_ldrd PARAMS ((char *, unsigned long)); + +/* ARM_EXT_V5. */ +static void do_blx PARAMS ((char *, unsigned long)); +static void do_bkpt PARAMS ((char *, unsigned long)); +static void do_clz PARAMS ((char *, unsigned long)); +static void do_lstc2 PARAMS ((char *, unsigned long)); +static void do_cdp2 PARAMS ((char *, unsigned long)); +static void do_co_reg2 PARAMS ((char *, unsigned long)); + +static void do_t_blx PARAMS ((char *)); +static void do_t_bkpt PARAMS ((char *)); + +/* ARM_EXT_V5E. */ +static void do_smla PARAMS ((char *, unsigned long)); +static void do_smlal PARAMS ((char *, unsigned long)); +static void do_smul PARAMS ((char *, unsigned long)); +static void do_qadd PARAMS ((char *, unsigned long)); +static void do_co_reg2c PARAMS ((char *, unsigned long)); + +/* Coprocessor Instructions. */ static void do_cdp PARAMS ((char *, unsigned long)); static void do_lstc PARAMS ((char *, unsigned long)); static void do_co_reg PARAMS ((char *, unsigned long)); @@ -512,30 +687,49 @@ static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void)); take 2: */ #define INSN_SIZE 4 -/* LONGEST_INST is the longest basic instruction name without conditions or - flags. ARM7M has 4 of length 5. */ +/* LONGEST_INST is the longest basic instruction name without + conditions or flags. ARM7M has 4 of length 5. El Segundo + has one basic instruction name of length 7 (SMLALxy). */ +#define LONGEST_INST 7 -#define LONGEST_INST 5 +struct asm_opcode +{ + /* Basic string to match. */ + CONST char * template; + /* Basic instruction code. */ + unsigned long value; -struct asm_opcode -{ - CONST char * template; /* Basic string to match */ - unsigned long value; /* Basic instruction code */ + /* Compulsory suffix that must follow conds. If "", then the + instruction is not conditional and must have no suffix. */ + CONST char * comp_suffix; + + /* Bits to toggle if flag 'n' set. */ + CONST struct asm_flg * flags; - /* Compulsory suffix that must follow conds. If "", then the - instruction is not conditional and must have no suffix. */ - CONST char * comp_suffix; + /* Which CPU variants this exists for. */ + unsigned long variants; - CONST struct asm_flg * flags; /* Bits to toggle if flag 'n' set */ - unsigned long variants; /* Which CPU variants this exists for */ - /* Function to call to parse args */ - void (* parms) PARAMS ((char *, unsigned long)); + /* Function to call to parse args. */ + void (* parms) PARAMS ((char *, unsigned long)); }; -static CONST struct asm_opcode insns[] = -{ -/* ARM Instructions */ +static CONST struct asm_opcode insns[] = +{ +/* Intel XScale extensions to ARM V5 ISA. */ + {"mia", 0x0e200010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miaph", 0x0e280010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miabb", 0x0e2c0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miabt", 0x0e2d0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miatb", 0x0e2e0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miatt", 0x0e2f0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"mar", 0x0c400000, NULL, NULL, ARM_EXT_XSCALE, do_mar}, + {"mra", 0x0c500000, NULL, NULL, ARM_EXT_XSCALE, do_mra}, + {"pld", 0xf450f000, "", NULL, ARM_EXT_XSCALE, do_pld}, + {"ldr", 0x000000d0, NULL, ldr_flags, ARM_ANY, do_ldrd}, + {"str", 0x000000f0, NULL, str_flags, ARM_ANY, do_ldrd}, + +/* ARM Instructions. */ {"and", 0x00000000, NULL, s_flag, ARM_ANY, do_arit}, {"eor", 0x00200000, NULL, s_flag, ARM_ANY, do_arit}, {"sub", 0x00400000, NULL, s_flag, ARM_ANY, do_arit}, @@ -564,36 +758,36 @@ static CONST struct asm_opcode insns[] = {"bl", 0x0bfffffe, NULL, NULL, ARM_ANY, do_branch}, {"b", 0x0afffffe, NULL, NULL, ARM_ANY, do_branch}, #endif - -/* Pseudo ops */ + +/* Pseudo ops. */ {"adr", 0x028f0000, NULL, NULL, ARM_ANY, do_adr}, {"adrl", 0x028f0000, NULL, NULL, ARM_ANY, do_adrl}, {"nop", 0x01a00000, NULL, NULL, ARM_ANY, do_nop}, -/* ARM 2 multiplies */ +/* ARM 2 multiplies. */ {"mul", 0x00000090, NULL, s_flag, ARM_2UP, do_mul}, {"mla", 0x00200090, NULL, s_flag, ARM_2UP, do_mla}, -/* ARM 3 - swp instructions */ +/* ARM 3 - swp instructions. */ {"swp", 0x01000090, NULL, byte_flag, ARM_3UP, do_swap}, -/* ARM 6 Coprocessor instructions */ +/* ARM 6 Coprocessor instructions. */ {"mrs", 0x010f0000, NULL, NULL, ARM_6UP, do_mrs}, {"msr", 0x0120f000, NULL, NULL, ARM_6UP, do_msr}, /* ScottB: our code uses 0x0128f000 for msr. NickC: but this is wrong because the bits 16 through 19 are handled by the PSR_xxx defines above. */ -/* ARM 7M long multiplies - need signed/unsigned flags! */ - {"smull", 0x00c00090, NULL, s_flag, ARM_LONGMUL, do_mull}, - {"umull", 0x00800090, NULL, s_flag, ARM_LONGMUL, do_mull}, - {"smlal", 0x00e00090, NULL, s_flag, ARM_LONGMUL, do_mull}, - {"umlal", 0x00a00090, NULL, s_flag, ARM_LONGMUL, do_mull}, +/* ARM 7M long multiplies - need signed/unsigned flags! */ + {"smull", 0x00c00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, + {"umull", 0x00800090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, + {"smlal", 0x00e00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, + {"umlal", 0x00a00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, -/* ARM THUMB interworking */ - {"bx", 0x012fff10, NULL, NULL, ARM_THUMB, do_bx}, +/* ARM THUMB interworking. */ + {"bx", 0x012fff10, NULL, NULL, ARM_EXT_THUMB, do_bx}, -/* Floating point instructions */ +/* Floating point instructions. */ {"wfs", 0x0e200110, NULL, NULL, FPU_ALL, do_fp_ctrl}, {"rfs", 0x0e300110, NULL, NULL, FPU_ALL, do_fp_ctrl}, {"wfc", 0x0e400110, NULL, NULL, FPU_ALL, do_fp_ctrl}, @@ -647,6 +841,48 @@ static CONST struct asm_opcode insns[] = {"stc", 0x0c000000, NULL, cplong_flag, ARM_2UP, do_lstc}, {"mcr", 0x0e000010, NULL, NULL, ARM_2UP, do_co_reg}, {"mrc", 0x0e100010, NULL, NULL, ARM_2UP, do_co_reg}, + +/* ARM ISA extension 5. */ +/* Note: blx is actually 2 opcodes, so the .value is set dynamically. + And it's sometimes conditional and sometimes not. */ + {"blx", 0, NULL, NULL, ARM_EXT_V5, do_blx}, + {"clz", 0x016f0f10, NULL, NULL, ARM_EXT_V5, do_clz}, + {"bkpt", 0xe1200070, "", NULL, ARM_EXT_V5, do_bkpt}, + {"ldc2", 0xfc100000, "", cplong_flag, ARM_EXT_V5, do_lstc2}, + {"stc2", 0xfc000000, "", cplong_flag, ARM_EXT_V5, do_lstc2}, + {"cdp2", 0xfe000000, "", NULL, ARM_EXT_V5, do_cdp2}, + {"mcr2", 0xfe000010, "", NULL, ARM_EXT_V5, do_co_reg2}, + {"mrc2", 0xfe100010, "", NULL, ARM_EXT_V5, do_co_reg2}, + +/* ARM ISA extension 5E, El Segundo. */ + {"smlabb", 0x01000080, NULL, NULL, ARM_EXT_V5E, do_smla}, + {"smlatb", 0x010000a0, NULL, NULL, ARM_EXT_V5E, do_smla}, + {"smlabt", 0x010000c0, NULL, NULL, ARM_EXT_V5E, do_smla}, + {"smlatt", 0x010000e0, NULL, NULL, ARM_EXT_V5E, do_smla}, + + {"smlawb", 0x01200080, NULL, NULL, ARM_EXT_V5E, do_smla}, + {"smlawt", 0x012000c0, NULL, NULL, ARM_EXT_V5E, do_smla}, + + {"smlalbb",0x01400080, NULL, NULL, ARM_EXT_V5E, do_smlal}, + {"smlaltb",0x014000a0, NULL, NULL, ARM_EXT_V5E, do_smlal}, + {"smlalbt",0x014000c0, NULL, NULL, ARM_EXT_V5E, do_smlal}, + {"smlaltt",0x014000e0, NULL, NULL, ARM_EXT_V5E, do_smlal}, + + {"smulbb", 0x01600080, NULL, NULL, ARM_EXT_V5E, do_smul}, + {"smultb", 0x016000a0, NULL, NULL, ARM_EXT_V5E, do_smul}, + {"smulbt", 0x016000c0, NULL, NULL, ARM_EXT_V5E, do_smul}, + {"smultt", 0x016000e0, NULL, NULL, ARM_EXT_V5E, do_smul}, + + {"smulwb", 0x012000a0, NULL, NULL, ARM_EXT_V5E, do_smul}, + {"smulwt", 0x012000e0, NULL, NULL, ARM_EXT_V5E, do_smul}, + + {"qadd", 0x01000050, NULL, NULL, ARM_EXT_V5E, do_qadd}, + {"qdadd", 0x01400050, NULL, NULL, ARM_EXT_V5E, do_qadd}, + {"qsub", 0x01200050, NULL, NULL, ARM_EXT_V5E, do_qadd}, + {"qdsub", 0x01600050, NULL, NULL, ARM_EXT_V5E, do_qadd}, + + {"mcrr", 0x0c400000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c}, + {"mrrc", 0x0c500000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c}, }; /* Defines for various bits that we will want to toggle. */ @@ -786,75 +1022,85 @@ static int thumb_reg PARAMS ((char ** str, int hi_lo)); #define THUMB_HALFWORD 1 #define THUMB_BYTE 0 -struct thumb_opcode +struct thumb_opcode { - CONST char * template; /* Basic string to match */ - unsigned long value; /* Basic instruction code */ - int size; - unsigned long variants; /* Which CPU variants this exists for */ - void (* parms) PARAMS ((char *)); /* Function to call to parse args */ + /* Basic string to match. */ + CONST char * template; + + /* Basic instruction code. */ + unsigned long value; + + int size; + + /* Which CPU variants this exists for. */ + unsigned long variants; + + /* Function to call to parse args. */ + void (* parms) PARAMS ((char *)); }; static CONST struct thumb_opcode tinsns[] = { - {"adc", 0x4140, 2, ARM_THUMB, do_t_arit}, - {"add", 0x0000, 2, ARM_THUMB, do_t_add}, - {"and", 0x4000, 2, ARM_THUMB, do_t_arit}, - {"asr", 0x0000, 2, ARM_THUMB, do_t_asr}, - {"b", T_OPCODE_BRANCH, 2, ARM_THUMB, do_t_branch12}, - {"beq", 0xd0fe, 2, ARM_THUMB, do_t_branch9}, - {"bne", 0xd1fe, 2, ARM_THUMB, do_t_branch9}, - {"bcs", 0xd2fe, 2, ARM_THUMB, do_t_branch9}, - {"bhs", 0xd2fe, 2, ARM_THUMB, do_t_branch9}, - {"bcc", 0xd3fe, 2, ARM_THUMB, do_t_branch9}, - {"bul", 0xd3fe, 2, ARM_THUMB, do_t_branch9}, - {"blo", 0xd3fe, 2, ARM_THUMB, do_t_branch9}, - {"bmi", 0xd4fe, 2, ARM_THUMB, do_t_branch9}, - {"bpl", 0xd5fe, 2, ARM_THUMB, do_t_branch9}, - {"bvs", 0xd6fe, 2, ARM_THUMB, do_t_branch9}, - {"bvc", 0xd7fe, 2, ARM_THUMB, do_t_branch9}, - {"bhi", 0xd8fe, 2, ARM_THUMB, do_t_branch9}, - {"bls", 0xd9fe, 2, ARM_THUMB, do_t_branch9}, - {"bge", 0xdafe, 2, ARM_THUMB, do_t_branch9}, - {"blt", 0xdbfe, 2, ARM_THUMB, do_t_branch9}, - {"bgt", 0xdcfe, 2, ARM_THUMB, do_t_branch9}, - {"ble", 0xddfe, 2, ARM_THUMB, do_t_branch9}, - {"bal", 0xdefe, 2, ARM_THUMB, do_t_branch9}, - {"bic", 0x4380, 2, ARM_THUMB, do_t_arit}, - {"bl", 0xf7fffffe, 4, ARM_THUMB, do_t_branch23}, - {"bx", 0x4700, 2, ARM_THUMB, do_t_bx}, - {"cmn", T_OPCODE_CMN, 2, ARM_THUMB, do_t_arit}, - {"cmp", 0x0000, 2, ARM_THUMB, do_t_compare}, - {"eor", 0x4040, 2, ARM_THUMB, do_t_arit}, - {"ldmia", 0xc800, 2, ARM_THUMB, do_t_ldmstm}, - {"ldr", 0x0000, 2, ARM_THUMB, do_t_ldr}, - {"ldrb", 0x0000, 2, ARM_THUMB, do_t_ldrb}, - {"ldrh", 0x0000, 2, ARM_THUMB, do_t_ldrh}, - {"ldrsb", 0x5600, 2, ARM_THUMB, do_t_lds}, - {"ldrsh", 0x5e00, 2, ARM_THUMB, do_t_lds}, - {"ldsb", 0x5600, 2, ARM_THUMB, do_t_lds}, - {"ldsh", 0x5e00, 2, ARM_THUMB, do_t_lds}, - {"lsl", 0x0000, 2, ARM_THUMB, do_t_lsl}, - {"lsr", 0x0000, 2, ARM_THUMB, do_t_lsr}, - {"mov", 0x0000, 2, ARM_THUMB, do_t_mov}, - {"mul", T_OPCODE_MUL, 2, ARM_THUMB, do_t_arit}, - {"mvn", T_OPCODE_MVN, 2, ARM_THUMB, do_t_arit}, - {"neg", T_OPCODE_NEG, 2, ARM_THUMB, do_t_arit}, - {"orr", 0x4300, 2, ARM_THUMB, do_t_arit}, - {"pop", 0xbc00, 2, ARM_THUMB, do_t_push_pop}, - {"push", 0xb400, 2, ARM_THUMB, do_t_push_pop}, - {"ror", 0x41c0, 2, ARM_THUMB, do_t_arit}, - {"sbc", 0x4180, 2, ARM_THUMB, do_t_arit}, - {"stmia", 0xc000, 2, ARM_THUMB, do_t_ldmstm}, - {"str", 0x0000, 2, ARM_THUMB, do_t_str}, - {"strb", 0x0000, 2, ARM_THUMB, do_t_strb}, - {"strh", 0x0000, 2, ARM_THUMB, do_t_strh}, - {"swi", 0xdf00, 2, ARM_THUMB, do_t_swi}, - {"sub", 0x0000, 2, ARM_THUMB, do_t_sub}, - {"tst", T_OPCODE_TST, 2, ARM_THUMB, do_t_arit}, - /* Pseudo ops: */ - {"adr", 0x0000, 2, ARM_THUMB, do_t_adr}, - {"nop", 0x46C0, 2, ARM_THUMB, do_t_nop}, /* mov r8,r8 */ + {"adc", 0x4140, 2, ARM_EXT_THUMB, do_t_arit}, + {"add", 0x0000, 2, ARM_EXT_THUMB, do_t_add}, + {"and", 0x4000, 2, ARM_EXT_THUMB, do_t_arit}, + {"asr", 0x0000, 2, ARM_EXT_THUMB, do_t_asr}, + {"b", T_OPCODE_BRANCH, 2, ARM_EXT_THUMB, do_t_branch12}, + {"beq", 0xd0fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bne", 0xd1fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bcs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bhs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bcc", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bul", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"blo", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bmi", 0xd4fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bpl", 0xd5fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bvs", 0xd6fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bvc", 0xd7fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bhi", 0xd8fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bls", 0xd9fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bge", 0xdafe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"blt", 0xdbfe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bgt", 0xdcfe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"ble", 0xddfe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bal", 0xdefe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bic", 0x4380, 2, ARM_EXT_THUMB, do_t_arit}, + {"bl", 0xf7fffffe, 4, ARM_EXT_THUMB, do_t_branch23}, + {"blx", 0, 0, ARM_EXT_V5, do_t_blx}, + {"bkpt", 0xbe00, 2, ARM_EXT_V5, do_t_bkpt}, + {"bx", 0x4700, 2, ARM_EXT_THUMB, do_t_bx}, + {"cmn", T_OPCODE_CMN, 2, ARM_EXT_THUMB, do_t_arit}, + {"cmp", 0x0000, 2, ARM_EXT_THUMB, do_t_compare}, + {"eor", 0x4040, 2, ARM_EXT_THUMB, do_t_arit}, + {"ldmia", 0xc800, 2, ARM_EXT_THUMB, do_t_ldmstm}, + {"ldr", 0x0000, 2, ARM_EXT_THUMB, do_t_ldr}, + {"ldrb", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrb}, + {"ldrh", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrh}, + {"ldrsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds}, + {"ldrsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds}, + {"ldsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds}, + {"ldsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds}, + {"lsl", 0x0000, 2, ARM_EXT_THUMB, do_t_lsl}, + {"lsr", 0x0000, 2, ARM_EXT_THUMB, do_t_lsr}, + {"mov", 0x0000, 2, ARM_EXT_THUMB, do_t_mov}, + {"mul", T_OPCODE_MUL, 2, ARM_EXT_THUMB, do_t_arit}, + {"mvn", T_OPCODE_MVN, 2, ARM_EXT_THUMB, do_t_arit}, + {"neg", T_OPCODE_NEG, 2, ARM_EXT_THUMB, do_t_arit}, + {"orr", 0x4300, 2, ARM_EXT_THUMB, do_t_arit}, + {"pop", 0xbc00, 2, ARM_EXT_THUMB, do_t_push_pop}, + {"push", 0xb400, 2, ARM_EXT_THUMB, do_t_push_pop}, + {"ror", 0x41c0, 2, ARM_EXT_THUMB, do_t_arit}, + {"sbc", 0x4180, 2, ARM_EXT_THUMB, do_t_arit}, + {"stmia", 0xc000, 2, ARM_EXT_THUMB, do_t_ldmstm}, + {"str", 0x0000, 2, ARM_EXT_THUMB, do_t_str}, + {"strb", 0x0000, 2, ARM_EXT_THUMB, do_t_strb}, + {"strh", 0x0000, 2, ARM_EXT_THUMB, do_t_strh}, + {"swi", 0xdf00, 2, ARM_EXT_THUMB, do_t_swi}, + {"sub", 0x0000, 2, ARM_EXT_THUMB, do_t_sub}, + {"tst", T_OPCODE_TST, 2, ARM_EXT_THUMB, do_t_arit}, + /* Pseudo ops: */ + {"adr", 0x0000, 2, ARM_EXT_THUMB, do_t_adr}, + {"nop", 0x46C0, 2, ARM_EXT_THUMB, do_t_nop}, /* mov r8,r8 */ }; struct reg_entry @@ -871,7 +1117,7 @@ struct reg_entry #define REG_LR 14 #define REG_SP 13 -/* These are the standard names. Users can add aliases with .req */ +/* These are the standard names. Users can add aliases with .req. */ static CONST struct reg_entry reg_table[] = { /* Processor Register Numbers. */ @@ -911,13 +1157,14 @@ static CONST struct reg_entry reg_table[] = #define BAD_PC _("r15 not allowed here") #define BAD_FLAGS _("Instruction should not have flags") #define BAD_COND _("Instruction is not conditional") +#define ERR_NO_ACCUM _("acc0 expected") -static struct hash_control * arm_ops_hsh = NULL; -static struct hash_control * arm_tops_hsh = NULL; -static struct hash_control * arm_cond_hsh = NULL; +static struct hash_control * arm_ops_hsh = NULL; +static struct hash_control * arm_tops_hsh = NULL; +static struct hash_control * arm_cond_hsh = NULL; static struct hash_control * arm_shift_hsh = NULL; -static struct hash_control * arm_reg_hsh = NULL; -static struct hash_control * arm_psr_hsh = NULL; +static struct hash_control * arm_reg_hsh = NULL; +static struct hash_control * arm_psr_hsh = NULL; /* This table describes all the machine specific pseudo-ops the assembler has to support. The fields are: @@ -947,7 +1194,8 @@ static int my_get_expression PARAMS ((expressionS *, char **)); CONST pseudo_typeS md_pseudo_table[] = { - { "req", s_req, 0 }, /* Never called becasue '.req' does not start line */ + /* Never called becasue '.req' does not start line. */ + { "req", s_req, 0 }, { "bss", s_bss, 0 }, { "align", s_align, 0 }, { "arm", s_arm, 0 }, @@ -962,13 +1210,15 @@ CONST pseudo_typeS md_pseudo_table[] = /* Allow for the effect of section changes. */ { "text", arm_s_text, 0 }, { "data", arm_s_data, 0 }, -#ifdef OBJ_ELF +#ifdef OBJ_ELF { "section", arm_s_section, 0 }, { "section.s", arm_s_section, 0 }, { "sect", arm_s_section, 0 }, { "sect.s", arm_s_section, 0 }, { "word", s_arm_elf_cons, 4 }, { "long", s_arm_elf_cons, 4 }, + { "file", dwarf2_directive_file, 0 }, + { "loc", dwarf2_directive_loc, 0 }, #else { "word", cons, 4}, #endif @@ -991,19 +1241,24 @@ CONST pseudo_typeS md_pseudo_table[] = symbolS * last_label_seen; static int label_is_thumb_function_name = false; -/* Literal stuff */ +/* Literal stuff. */ #define MAX_LITERAL_POOL_SIZE 1024 typedef struct literalS { - struct expressionS exp; - struct arm_it * inst; + struct expressionS exp; + struct arm_it * inst; } literalT; -literalT literals[MAX_LITERAL_POOL_SIZE]; -int next_literal_pool_place = 0; /* Next free entry in the pool */ -int lit_pool_num = 1; /* Next literal pool number */ +literalT literals[MAX_LITERAL_POOL_SIZE]; + +/* Next free entry in the pool. */ +int next_literal_pool_place = 0; + +/* Next literal pool number. */ +int lit_pool_num = 1; + symbolS * current_poolP = NULL; static int @@ -1019,21 +1274,21 @@ add_to_lit_pool () while (lit_count < next_literal_pool_place) { if (literals[lit_count].exp.X_op == inst.reloc.exp.X_op - && inst.reloc.exp.X_op == O_constant - && literals[lit_count].exp.X_add_number - == inst.reloc.exp.X_add_number - && literals[lit_count].exp.X_unsigned == inst.reloc.exp.X_unsigned) - break; + && inst.reloc.exp.X_op == O_constant + && (literals[lit_count].exp.X_add_number + == inst.reloc.exp.X_add_number) + && literals[lit_count].exp.X_unsigned == inst.reloc.exp.X_unsigned) + break; lit_count++; } - if (lit_count == next_literal_pool_place) /* new entry */ + if (lit_count == next_literal_pool_place) /* New entry. */ { if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE) - { - inst.error = _("Literal Pool Overflow"); - return FAIL; - } + { + inst.error = _("Literal Pool Overflow"); + return FAIL; + } literals[next_literal_pool_place].exp = inst.reloc.exp; lit_count = next_literal_pool_place++; @@ -1045,21 +1300,22 @@ add_to_lit_pool () return SUCCESS; } - + /* Can't use symbol_new here, so have to create a symbol and then at a later date assign it a value. Thats what these functions do. */ + static void symbol_locate (symbolP, name, segment, valu, frag) - symbolS * symbolP; - CONST char * name; /* It is copied, the caller can modify */ - segT segment; /* Segment identifier (SEG_<something>) */ - valueT valu; /* Symbol value */ - fragS * frag; /* Associated fragment */ + symbolS * symbolP; + CONST char * name; /* It is copied, the caller can modify. */ + segT segment; /* Segment identifier (SEG_<something>). */ + valueT valu; /* Symbol value. */ + fragS * frag; /* Associated fragment. */ { unsigned int name_length; char * preserved_copy_of_name; - name_length = strlen (name) + 1; /* +1 for \0 */ + name_length = strlen (name) + 1; /* +1 for \0. */ obstack_grow (¬es, name, name_length); preserved_copy_of_name = obstack_finish (¬es); #ifdef STRIP_UNDERSCORE @@ -1094,41 +1350,43 @@ symbol_locate (symbolP, name, segment, valu, frag) #ifdef tc_symbol_new_hook tc_symbol_new_hook (symbolP); #endif - + #ifdef DEBUG_SYMS verify_symbol_chain (symbol_rootP, symbol_lastP); -#endif /* DEBUG_SYMS */ +#endif /* DEBUG_SYMS */ } -/* Check that an immediate is valid, and if so, - convert it to the right format. */ +/* Check that an immediate is valid. + If so, convert it to the right format. */ + static unsigned int validate_immediate (val) unsigned int val; { unsigned int a; unsigned int i; - + #define rotate_left(v, n) (v << n | v >> (32 - n)) - + for (i = 0; i < 32; i += 2) if ((a = rotate_left (val, i)) <= 0xff) - return a | (i << 7); /* 12-bit pack: [shift-cnt,const] */ - + return a | (i << 7); /* 12-bit pack: [shift-cnt,const]. */ + return FAIL; } /* Check to see if an immediate can be computed as two seperate immediate values, added together. We already know that this value cannot be computed by just one ARM instruction. */ + static unsigned int validate_immediate_twopart (val, highpart) - unsigned int val; + unsigned int val; unsigned int * highpart; { unsigned int a; unsigned int i; - + for (i = 0; i < 32; i += 2) if (((a = rotate_left (val, i)) & 0xff) != 0) { @@ -1142,19 +1400,17 @@ validate_immediate_twopart (val, highpart) { if (a & 0xff000000) continue; - * highpart = (a >> 16) | ((i + 16) << 7); } else { assert (a & 0xff000000); - * highpart = (a >> 24) | ((i + 8) << 7); } return (a & 0xff) | (i << 7); } - + return FAIL; } @@ -1164,11 +1420,10 @@ validate_offset_imm (val, hwse) int hwse; { if ((hwse && val > 255) || val > 4095) - return FAIL; + return FAIL; return val; } - static void s_req (a) int a ATTRIBUTE_UNUSED; @@ -1181,7 +1436,7 @@ s_bss (ignore) int ignore ATTRIBUTE_UNUSED; { /* We don't support putting frags in the BSS segment, we fake it by - marking in_bss, then looking at s_skip for clues?.. */ + marking in_bss, then looking at s_skip for clues. */ subseg_set (bss_section, 0); demand_empty_rest_of_line (); } @@ -1190,11 +1445,12 @@ static void s_even (ignore) int ignore ATTRIBUTE_UNUSED; { - if (!need_pass_2) /* Never make frag if expect extra pass. */ + /* Never make frag if expect extra pass. */ + if (!need_pass_2) frag_align (1, 0, 0); - + record_alignment (now_seg, 1); - + demand_empty_rest_of_line (); } @@ -1208,8 +1464,8 @@ s_ltorg (ignored) if (current_poolP == NULL) return; - /* Align pool as you have word accesses */ - /* Only make a frag if we have to ... */ + /* Align pool as you have word accesses. + Only make a frag if we have to. */ if (!need_pass_2) frag_align (2, 0, 0); @@ -1222,21 +1478,23 @@ s_ltorg (ignored) symbol_table_insert (current_poolP); ARM_SET_THUMB (current_poolP, thumb_mode); - + #if defined OBJ_COFF || defined OBJ_ELF ARM_SET_INTERWORK (current_poolP, support_interwork); #endif - + while (lit_count < next_literal_pool_place) /* First output the expression in the instruction to the pool. */ - emit_expr (&(literals[lit_count++].exp), 4); /* .word */ + emit_expr (&(literals[lit_count++].exp), 4); /* .word */ next_literal_pool_place = 0; current_poolP = NULL; } +/* Same as s_align_ptwo but align 0 => align 2. */ + static void -s_align (unused) /* Same as s_align_ptwo but align 0 => align 2 */ +s_align (unused) int unused ATTRIBUTE_UNUSED; { register int temp; @@ -1263,7 +1521,7 @@ s_align (unused) /* Same as s_align_ptwo but align 0 => align 2 */ if (!temp) temp = 2; - /* Only make a frag if we HAVE to. . . */ + /* Only make a frag if we HAVE to. */ if (temp && !need_pass_2) frag_align (temp, (int) temp_fill, 0); demand_empty_rest_of_line (); @@ -1280,14 +1538,13 @@ s_force_thumb (ignore) This is used by gcc/config/arm/lib1funcs.asm for example to compile interworking support functions even if the target processor should not support interworking. */ - if (! thumb_mode) { thumb_mode = 2; - + record_alignment (now_seg, 1); } - + demand_empty_rest_of_line (); } @@ -1295,11 +1552,13 @@ static void s_thumb_func (ignore) int ignore ATTRIBUTE_UNUSED; { + if (! thumb_mode) + opcode_select (16); + /* The following label is the name/address of the start of a Thumb function. We need to know this for the interworking support. */ - label_is_thumb_function_name = true; - + demand_empty_rest_of_line (); } @@ -1318,16 +1577,14 @@ s_thumb_set (equiv) register char * end_name; register symbolS * symbolP; - /* - * Especial apologies for the random logic: - * this just grew, and could be parsed much more simply! - * Dean in haste. - */ + /* Especial apologies for the random logic: + This just grew, and could be parsed much more simply! + Dean - in haste. */ name = input_line_pointer; delim = get_symbol_end (); end_name = input_line_pointer; *end_name = delim; - + SKIP_WHITESPACE (); if (*input_line_pointer != ',') @@ -1344,7 +1601,7 @@ s_thumb_set (equiv) if (name[0] == '.' && name[1] == '\0') { - /* XXX - this should not happen to .thumb_set */ + /* XXX - this should not happen to .thumb_set. */ abort (); } @@ -1358,8 +1615,9 @@ s_thumb_set (equiv) if (listing & LISTING_SYMBOLS) { extern struct list_info_struct * listing_tail; - fragS * dummy_frag = (fragS *) xmalloc (sizeof(fragS)); - memset (dummy_frag, 0, sizeof(fragS)); + fragS * dummy_frag = (fragS *) xmalloc (sizeof (fragS)); + + memset (dummy_frag, 0, sizeof (fragS)); dummy_frag->fr_type = rs_fill; dummy_frag->line = listing_tail; symbolP = symbol_new (name, undefined_section, 0, dummy_frag); @@ -1367,13 +1625,13 @@ s_thumb_set (equiv) } else #endif - symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag); - + symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag); + #ifdef OBJ_COFF - /* "set" symbols are local unless otherwise specified. */ + /* "set" symbols are local unless otherwise specified. */ SF_SET_LOCAL (symbolP); -#endif /* OBJ_COFF */ - } /* make a new symbol */ +#endif /* OBJ_COFF */ + } /* Make a new symbol. */ symbol_table_insert (symbolP); @@ -1385,11 +1643,11 @@ s_thumb_set (equiv) as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP)); pseudo_set (symbolP); - + demand_empty_rest_of_line (); /* XXX Now we come to the Thumb specific bit of code. */ - + THUMB_SET_FUNC (symbolP, 1); ARM_SET_THUMB (symbolP, 1); #if defined OBJ_ELF || defined OBJ_COFF @@ -1398,13 +1656,14 @@ s_thumb_set (equiv) } /* If we change section we must dump the literal pool first. */ + static void arm_s_text (ignore) int ignore; { if (now_seg != text_section) s_ltorg (0); - + #ifdef OBJ_ELF obj_elf_text (ignore); #else @@ -1423,7 +1682,7 @@ arm_s_data (ignore) } else if (now_seg != data_section) s_ltorg (0); - + #ifdef OBJ_ELF obj_elf_data (ignore); #else @@ -1451,23 +1710,27 @@ opcode_select (width) case 16: if (! thumb_mode) { - if (! (cpu_variant & ARM_THUMB)) + if (! (cpu_variant & ARM_EXT_THUMB)) as_bad (_("selected processor does not support THUMB opcodes")); + thumb_mode = 1; - /* No need to force the alignment, since we will have been - coming from ARM mode, which is word-aligned. */ - record_alignment (now_seg, 1); + /* No need to force the alignment, since we will have been + coming from ARM mode, which is word-aligned. */ + record_alignment (now_seg, 1); } break; case 32: if (thumb_mode) { - if ((cpu_variant & ARM_ANY) == ARM_THUMB) + if ((cpu_variant & ARM_ANY) == ARM_EXT_THUMB) as_bad (_("selected processor does not support ARM opcodes")); + thumb_mode = 0; - if (!need_pass_2) + + if (!need_pass_2) frag_align (2, 0, 0); + record_alignment (now_seg, 1); } break; @@ -1526,9 +1789,9 @@ static int skip_past_comma (str) char ** str; { - char *p = *str, c; + char * p = * str, c; int comma = 0; - + while ((c = *p) == ' ' || c == ',') { p++; @@ -1544,17 +1807,18 @@ skip_past_comma (str) } /* A standard register must be given at this point. - Shift is the place to put it in inst.instruction. - Restores input start point on err. + SHIFT is the place to put it in inst.instruction. + Restores input start point on error. Returns the reg#, or FAIL. */ + static int reg_required_here (str, shift) char ** str; int shift; { - static char buff [128]; /* XXX */ - int reg; - char * start = *str; + static char buff [128]; /* XXX */ + int reg; + char * start = * str; if ((reg = arm_reg_parse (str)) != FAIL && int_register (reg)) { @@ -1565,7 +1829,7 @@ reg_required_here (str, shift) /* Restore the start point, we may have got a reg of the wrong class. */ *str = start; - + /* In the few cases where we might be able to accept something else this error can be overridden. */ sprintf (buff, _("Register expected, not '%.100s'"), start); @@ -1595,6 +1859,13 @@ arm_psr_parse (ccp) /* Terminate the word. */ *--p = 0; + /* CPSR's and SPSR's can now be lowercase. This is just a convenience + feature for ease of use and backwards compatibility. */ + if (!strncmp (start, "cpsr", 4)) + strncpy (start, "CPSR", 4); + else if (!strncmp (start, "spsr", 4)) + strncpy (start, "SPSR", 4); + /* Now locate the word in the psr hash table. */ psr = (CONST struct asm_psr *) hash_find (arm_psr_hsh, start); @@ -1609,13 +1880,14 @@ arm_psr_parse (ccp) } /* Parse the input looking for a PSR flag. */ + static int psr_required_here (str) char ** str; { - char * start = *str; + char * start = * str; CONST struct asm_psr * psr; - + psr = arm_psr_parse (str); if (psr) @@ -1626,7 +1898,7 @@ psr_required_here (str) /* Set the psr flags in the MSR instruction. */ inst.instruction |= psr->field << PSR_SHIFT; - + return SUCCESS; } @@ -1736,8 +2008,8 @@ fp_reg_required_here (str, where) char ** str; int where; { - int reg; - char * start = *str; + int reg; + char * start = * str; if ((reg = arm_reg_parse (str)) != FAIL && fp_register (reg)) { @@ -1770,14 +2042,14 @@ cp_address_offset (str) } (*str)++; - + if (my_get_expression (& inst.reloc.exp, str)) return FAIL; - + if (inst.reloc.exp.X_op == O_constant) { offset = inst.reloc.exp.X_add_number; - + if (offset & 3) { inst.error = _("co-processor address must be word aligned"); @@ -1826,12 +2098,12 @@ cp_address_required_here (str) if (*p == ']') { p++; - + if (skip_past_comma (& p) == SUCCESS) { - /* [Rn], #expr */ + /* [Rn], #expr */ write_back = WRITE_BACK; - + if (reg == REG_PC) { inst.error = _("pc may not be used in post-increment"); @@ -1846,7 +2118,7 @@ cp_address_required_here (str) } else { - /* '['Rn, #expr']'[!] */ + /* '['Rn, #expr']'[!] */ if (skip_past_comma (& p) == FAIL) { @@ -1855,7 +2127,7 @@ cp_address_required_here (str) } pre_inc = PRE_INDEX; - + if (cp_address_offset (& p) == FAIL) return FAIL; @@ -1888,7 +2160,7 @@ cp_address_required_here (str) return FAIL; inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM; - inst.reloc.exp.X_add_number -= 8; /* PC rel adjust */ + inst.reloc.exp.X_add_number -= 8; /* PC rel adjust. */ inst.reloc.pc_rel = 1; inst.instruction |= (REG_PC << 16); pre_inc = PRE_INDEX; @@ -1916,7 +2188,7 @@ do_mrs (str, flags) unsigned long flags; { int skip = 0; - + /* Only one syntax. */ skip_whitespace (str); @@ -1940,8 +2212,9 @@ do_mrs (str, flags) || strcmp (str, "cpsr") == 0 || strcmp (str, "spsr") == 0) skip = 4; + /* This is for backwards compatability with older toolchains. */ - else if (strcmp (str, "cpsr_all") == 0 + else if ( strcmp (str, "cpsr_all") == 0 || strcmp (str, "spsr_all") == 0) skip = 8; else @@ -1953,7 +2226,7 @@ do_mrs (str, flags) if (* str == 's' || * str == 'S') inst.instruction |= SPSR_BIT; str += skip; - + inst.instruction |= flags; end_of_line (str); } @@ -1961,6 +2234,7 @@ do_mrs (str, flags) /* Two possible forms: "{C|S}PSR_<field>, Rm", "{C|S}PSR_f, #expression". */ + static void do_msr (str, flags) char * str; @@ -1970,7 +2244,7 @@ do_msr (str, flags) if (psr_required_here (& str) == FAIL) return; - + if (skip_past_comma (& str) == FAIL) { inst.error = _("comma missing after psr flags"); @@ -1981,7 +2255,7 @@ do_msr (str, flags) if (reg_required_here (& str, 0) != FAIL) { - inst.error = NULL; + inst.error = NULL; inst.instruction |= flags; end_of_line (str); return; @@ -1989,27 +2263,30 @@ do_msr (str, flags) if (! is_immediate_prefix (* str)) { - inst.error = _("only a register or immediate value can follow a psr flag"); + inst.error = + _("only a register or immediate value can follow a psr flag"); return; } str ++; inst.error = NULL; - + if (my_get_expression (& inst.reloc.exp, & str)) { - inst.error = _("only a register or immediate value can follow a psr flag"); + inst.error = + _("only a register or immediate value can follow a psr flag"); return; } - - if (inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT)) + + if ((cpu_variant & ARM_EXT_V5) != ARM_EXT_V5 + && inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT)) { - inst.error = _("only flag field of psr can be set with immediate value"); + inst.error = _("immediate value cannot be used to set this field"); return; } - + flags |= INST_IMMEDIATE; - + if (inst.reloc.exp.X_add_symbol) { inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE; @@ -2018,17 +2295,17 @@ do_msr (str, flags) else { unsigned value = validate_immediate (inst.reloc.exp.X_add_number); - + if (value == (unsigned) FAIL) { inst.error = _("Invalid constant"); return; } - + inst.instruction |= value; } - inst.error = NULL; + inst.error = NULL; inst.instruction |= flags; end_of_line (str); } @@ -2037,8 +2314,8 @@ do_msr (str, flags) UMULL RdLo, RdHi, Rm, Rs SMULL RdLo, RdHi, Rm, Rs UMLAL RdLo, RdHi, Rm, Rs - SMLAL RdLo, RdHi, Rm, Rs -*/ + SMLAL RdLo, RdHi, Rm, Rs. */ + static void do_mull (str, flags) char * str; @@ -2046,7 +2323,7 @@ do_mull (str, flags) { int rdlo, rdhi, rm, rs; - /* Only one format "rdlo, rdhi, rm, rs" */ + /* Only one format "rdlo, rdhi, rm, rs". */ skip_whitespace (str); if ((rdlo = reg_required_here (&str, 12)) == FAIL) @@ -2069,7 +2346,7 @@ do_mull (str, flags) return; } - /* rdhi, rdlo and rm must all be different */ + /* rdhi, rdlo and rm must all be different. */ if (rdlo == rdhi || rdlo == rm || rdhi == rm) as_tsktsk (_("rdhi, rdlo and rm must all be different")); @@ -2085,7 +2362,7 @@ do_mull (str, flags) inst.error = BAD_PC; return; } - + inst.instruction |= flags; end_of_line (str); return; @@ -2093,12 +2370,12 @@ do_mull (str, flags) static void do_mul (str, flags) - char * str; + char * str; unsigned long flags; { int rd, rm; - - /* Only one format "rd, rm, rs" */ + + /* Only one format "rd, rm, rs". */ skip_whitespace (str); if ((rd = reg_required_here (&str, 16)) == FAIL) @@ -2149,12 +2426,12 @@ do_mul (str, flags) static void do_mla (str, flags) - char * str; + char * str; unsigned long flags; { int rd, rm; - /* Only one format "rd, rm, rs, rn" */ + /* Only one format "rd, rm, rs, rn". */ skip_whitespace (str); if ((rd = reg_required_here (&str, 16)) == FAIL) @@ -2205,8 +2482,1073 @@ do_mla (str, flags) return; } -/* Returns the index into fp_values of a floating point number, or -1 if - not in the table. */ +/* Expects *str -> the characters "acc0", possibly with leading blanks. + Advances *str to the next non-alphanumeric. + Returns 0, or else FAIL (in which case sets inst.error). + + (In a future XScale, there may be accumulators other than zero. + At that time this routine and its callers can be upgraded to suit.) */ + +static int +accum0_required_here (str) + char ** str; +{ + static char buff [128]; /* Note the address is taken. Hence, static. */ + char * p = * str; + char c; + int result = 0; /* The accum number. */ + + skip_whitespace (p); + + *str = p; /* Advance caller's string pointer too. */ + c = *p++; + while (isalnum (c)) + c = *p++; + + *--p = 0; /* Aap nul into input buffer at non-alnum. */ + + if (! ( streq (*str, "acc0") || streq (*str, "ACC0"))) + { + sprintf (buff, _("acc0 expected, not '%.100s'"), *str); + inst.error = buff; + result = FAIL; + } + + *p = c; /* Unzap. */ + *str = p; /* Caller's string pointer to after match. */ + return result; +} + +/* Expects **str -> after a comma. May be leading blanks. + Advances *str, recognizing a load mode, and setting inst.instruction. + Returns rn, or else FAIL (in which case may set inst.error + and not advance str) + + Note: doesn't know Rd, so no err checks that require such knowledge. */ + +static int +ld_mode_required_here (string) + char ** string; +{ + char * str = * string; + int rn; + int pre_inc = 0; + + skip_whitespace (str); + + if (* str == '[') + { + str++; + + skip_whitespace (str); + + if ((rn = reg_required_here (& str, 16)) == FAIL) + return FAIL; + + skip_whitespace (str); + + if (* str == ']') + { + str ++; + + if (skip_past_comma (& str) == SUCCESS) + { + /* [Rn],... (post inc) */ + if (ldst_extend (& str, 1) == FAIL) + return FAIL; + } + else /* [Rn] */ + { + skip_whitespace (str); + + if (* str == '!') + { + str ++; + inst.instruction |= WRITE_BACK; + } + + inst.instruction |= INDEX_UP | HWOFFSET_IMM; + pre_inc = 1; + } + } + else /* [Rn,...] */ + { + if (skip_past_comma (& str) == FAIL) + { + inst.error = _("pre-indexed expression expected"); + return FAIL; + } + + pre_inc = 1; + + if (ldst_extend (& str, 1) == FAIL) + return FAIL; + + skip_whitespace (str); + + if (* str ++ != ']') + { + inst.error = _("missing ]"); + return FAIL; + } + + skip_whitespace (str); + + if (* str == '!') + { + str ++; + inst.instruction |= WRITE_BACK; + } + } + } + else if (* str == '=') /* ldr's "r,=label" syntax */ + /* We should never reach here, because <text> = <expression> is + caught gas/read.c read_a_source_file() as a .set operation. */ + return FAIL; + else /* PC +- 8 bit immediate offset. */ + { + if (my_get_expression (& inst.reloc.exp, & str)) + return FAIL; + + inst.instruction |= HWOFFSET_IMM; /* The I bit. */ + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; + inst.reloc.exp.X_add_number -= 8; /* PC rel adjust. */ + inst.reloc.pc_rel = 1; + inst.instruction |= (REG_PC << 16); + + rn = REG_PC; + pre_inc = 1; + } + + inst.instruction |= (pre_inc ? PRE_INDEX : 0); + * string = str; + + return rn; +} + +/* ARM V5E (El Segundo) signed-multiply-accumulate (argument parse) + SMLAxy{cond} Rd,Rm,Rs,Rn + SMLAWy{cond} Rd,Rm,Rs,Rn + Error if any register is R15. */ + +static void +do_smla (str, flags) + char * str; + unsigned long flags; +{ + int rd, rm, rs, rn; + + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 16)) == FAIL + || skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL + || skip_past_comma (& str) == FAIL + || (rs = reg_required_here (& str, 8)) == FAIL + || skip_past_comma (& str) == FAIL + || (rn = reg_required_here (& str, 12)) == FAIL) + inst.error = BAD_ARGS; + + else if (rd == REG_PC || rm == REG_PC || rs == REG_PC || rn == REG_PC) + inst.error = BAD_PC; + + else if (flags) + inst.error = BAD_FLAGS; + + else + end_of_line (str); +} + +/* ARM V5E (El Segundo) signed-multiply-accumulate-long (argument parse) + SMLALxy{cond} Rdlo,Rdhi,Rm,Rs + Error if any register is R15. + Warning if Rdlo == Rdhi. */ + +static void +do_smlal (str, flags) + char * str; + unsigned long flags; +{ + int rdlo, rdhi, rm, rs; + + skip_whitespace (str); + + if ((rdlo = reg_required_here (& str, 12)) == FAIL + || skip_past_comma (& str) == FAIL + || (rdhi = reg_required_here (& str, 16)) == FAIL + || skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL + || skip_past_comma (& str) == FAIL + || (rs = reg_required_here (& str, 8)) == FAIL) + { + inst.error = BAD_ARGS; + return; + } + + if (rdlo == REG_PC || rdhi == REG_PC || rm == REG_PC || rs == REG_PC) + { + inst.error = BAD_PC; + return; + } + + if (rdlo == rdhi) + as_tsktsk (_("rdhi and rdlo must be different")); + + if (flags) + inst.error = BAD_FLAGS; + else + end_of_line (str); +} + +/* ARM V5E (El Segundo) signed-multiply (argument parse) + SMULxy{cond} Rd,Rm,Rs + Error if any register is R15. */ + +static void +do_smul (str, flags) + char * str; + unsigned long flags; +{ + int rd, rm, rs; + + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 16)) == FAIL + || skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL + || skip_past_comma (& str) == FAIL + || (rs = reg_required_here (& str, 8)) == FAIL) + inst.error = BAD_ARGS; + + else if (rd == REG_PC || rm == REG_PC || rs == REG_PC) + inst.error = BAD_PC; + + else if (flags) + inst.error = BAD_FLAGS; + + else + end_of_line (str); +} + +/* ARM V5E (El Segundo) saturating-add/subtract (argument parse) + Q[D]{ADD,SUB}{cond} Rd,Rm,Rn + Error if any register is R15. */ + +static void +do_qadd (str, flags) + char * str; + unsigned long flags; +{ + int rd, rm, rn; + + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 12)) == FAIL + || skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL + || skip_past_comma (& str) == FAIL + || (rn = reg_required_here (& str, 16)) == FAIL) + inst.error = BAD_ARGS; + + else if (rd == REG_PC || rm == REG_PC || rn == REG_PC) + inst.error = BAD_PC; + + else if (flags) + inst.error = BAD_FLAGS; + + else + end_of_line (str); +} + +/* ARM V5E (el Segundo) + MCRRcc <coproc>, <opcode>, <Rd>, <Rn>, <CRm>. + MRRCcc <coproc>, <opcode>, <Rd>, <Rn>, <CRm>. + + These are equivalent to the XScale instructions MAR and MRA, + respectively, when coproc == 0, opcode == 0, and CRm == 0. + + Result unpredicatable if Rd or Rn is R15. */ + +static void +do_co_reg2c (str, flags) + char * str; + unsigned long flags; +{ + int rd, rn; + + skip_whitespace (str); + + if (co_proc_number (& str) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_opc_expr (& str, 4, 4) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || (rd = reg_required_here (& str, 12)) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || (rn = reg_required_here (& str, 16)) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + /* Unpredictable result if rd or rn is R15. */ + if (rd == REG_PC || rn == REG_PC) + as_tsktsk + (_("Warning: Instruction unpredictable when using r15")); + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 0) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (flags) + inst.error = BAD_COND; + + end_of_line (str); +} + +/* ARM V5 count-leading-zeroes instruction (argument parse) + CLZ{<cond>} <Rd>, <Rm> + Condition defaults to COND_ALWAYS. + Error if Rd or Rm are R15. */ + +static void +do_clz (str, flags) + char * str; + unsigned long flags; +{ + int rd, rm; + + if (flags) + { + as_bad (BAD_FLAGS); + return; + } + + skip_whitespace (str); + + if (((rd = reg_required_here (& str, 12)) == FAIL) + || (skip_past_comma (& str) == FAIL) + || ((rm = reg_required_here (& str, 0)) == FAIL)) + inst.error = BAD_ARGS; + + else if (rd == REG_PC || rm == REG_PC ) + inst.error = BAD_PC; + + else + end_of_line (str); +} + +/* ARM V5 (argument parse) + LDC2{L} <coproc>, <CRd>, <addressing mode> + STC2{L} <coproc>, <CRd>, <addressing mode> + Instruction is not conditional, and has 0xf in the codition field. + Otherwise, it's the same as LDC/STC. */ + +static void +do_lstc2 (str, flags) + char * str; + unsigned long flags; +{ + if (flags) + inst.error = BAD_COND; + + skip_whitespace (str); + + if (co_proc_number (& str) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + } + else if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 12) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + } + else if (skip_past_comma (& str) == FAIL + || cp_address_required_here (& str) == FAIL) + { + if (! inst.error) + inst.error = BAD_ARGS; + } + else + end_of_line (str); +} + +/* ARM V5 (argument parse) + CDP2 <coproc>, <opcode_1>, <CRd>, <CRn>, <CRm>, <opcode_2> + Instruction is not conditional, and has 0xf in the condition field. + Otherwise, it's the same as CDP. */ + +static void +do_cdp2 (str, flags) + char * str; + unsigned long flags; +{ + skip_whitespace (str); + + if (co_proc_number (& str) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_opc_expr (& str, 20,4) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 12) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 16) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 0) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == SUCCESS) + { + if (cp_opc_expr (& str, 5, 3) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + } + + if (flags) + inst.error = BAD_FLAGS; + + end_of_line (str); +} + +/* ARM V5 (argument parse) + MCR2 <coproc>, <opcode_1>, <Rd>, <CRn>, <CRm>, <opcode_2> + MRC2 <coproc>, <opcode_1>, <Rd>, <CRn>, <CRm>, <opcode_2> + Instruction is not conditional, and has 0xf in the condition field. + Otherwise, it's the same as MCR/MRC. */ + +static void +do_co_reg2 (str, flags) + char * str; + unsigned long flags; +{ + skip_whitespace (str); + + if (co_proc_number (& str) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_opc_expr (& str, 21, 3) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || reg_required_here (& str, 12) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 16) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 0) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == SUCCESS) + { + if (cp_opc_expr (& str, 5, 3) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + } + + if (flags) + inst.error = BAD_COND; + + end_of_line (str); +} + +/* THUMB V5 breakpoint instruction (argument parse) + BKPT <immed_8>. */ + +static void +do_t_bkpt (str) + char * str; +{ + expressionS expr; + unsigned long number; + + skip_whitespace (str); + + /* Allow optional leading '#'. */ + if (is_immediate_prefix (*str)) + str ++; + + memset (& expr, '\0', sizeof (expr)); + if (my_get_expression (& expr, & str) || (expr.X_op != O_constant)) + { + inst.error = _("bad or missing expression"); + return; + } + + number = expr.X_add_number; + + /* Check it fits an 8 bit unsigned. */ + if (number != (number & 0xff)) + { + inst.error = _("immediate value out of range"); + return; + } + + inst.instruction |= number; + + end_of_line (str); +} + +/* ARM V5 branch-link-exchange (argument parse) for BLX(1) only. + Expects inst.instruction is set for BLX(1). + Note: this is cloned from do_branch, and the reloc changed to be a + new one that can cope with setting one extra bit (the H bit). */ + +static void +do_branch25 (str, flags) + char * str; + unsigned long flags ATTRIBUTE_UNUSED; +{ + if (my_get_expression (& inst.reloc.exp, & str)) + return; + +#ifdef OBJ_ELF + { + char * save_in; + + /* ScottB: February 5, 1998 */ + /* Check to see of PLT32 reloc required for the instruction. */ + + /* arm_parse_reloc() works on input_line_pointer. + We actually want to parse the operands to the branch instruction + passed in 'str'. Save the input pointer and restore it later. */ + save_in = input_line_pointer; + input_line_pointer = str; + + if (inst.reloc.exp.X_op == O_symbol + && *str == '(' + && arm_parse_reloc () == BFD_RELOC_ARM_PLT32) + { + inst.reloc.type = BFD_RELOC_ARM_PLT32; + inst.reloc.pc_rel = 0; + /* Modify str to point to after parsed operands, otherwise + end_of_line() will complain about the (PLT) left in str. */ + str = input_line_pointer; + } + else + { + inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX; + inst.reloc.pc_rel = 1; + } + + input_line_pointer = save_in; + } +#else + inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX; + inst.reloc.pc_rel = 1; +#endif /* OBJ_ELF */ + + end_of_line (str); +} + +/* ARM V5 branch-link-exchange instruction (argument parse) + BLX <target_addr> ie BLX(1) + BLX{<condition>} <Rm> ie BLX(2) + Unfortunately, there are two different opcodes for this mnemonic. + So, the insns[].value is not used, and the code here zaps values + into inst.instruction. + Also, the <target_addr> can be 25 bits, hence has its own reloc. */ + +static void +do_blx (str, flags) + char * str; + unsigned long flags; +{ + char * mystr = str; + int rm; + + if (flags) + { + as_bad (BAD_FLAGS); + return; + } + + skip_whitespace (mystr); + rm = reg_required_here (& mystr, 0); + + /* The above may set inst.error. Ignore his opinion. */ + inst.error = 0; + + if (rm != FAIL) + { + /* Arg is a register. + Use the condition code our caller put in inst.instruction. + Pass ourselves off as a BX with a funny opcode. */ + inst.instruction |= 0x012fff30; + do_bx (str, flags); + } + else + { + /* This must be is BLX <target address>, no condition allowed. */ + if (inst.instruction != COND_ALWAYS) + { + inst.error = BAD_COND; + return; + } + + inst.instruction = 0xfafffffe; + + /* Process like a B/BL, but with a different reloc. + Note that B/BL expecte fffffe, not 0, offset in the opcode table. */ + do_branch25 (str, flags); + } +} + +/* ARM V5 Thumb BLX (argument parse) + BLX <target_addr> which is BLX(1) + BLX <Rm> which is BLX(2) + Unfortunately, there are two different opcodes for this mnemonic. + So, the tinsns[].value is not used, and the code here zaps values + into inst.instruction. */ + +static void +do_t_blx (str) + char * str; +{ + char * mystr = str; + int rm; + + skip_whitespace (mystr); + inst.instruction = 0x4780; + + /* Note that this call is to the ARM register recognizer. BLX(2) + uses the ARM register space, not the Thumb one, so a call to + thumb_reg() would be wrong. */ + rm = reg_required_here (& mystr, 3); + inst.error = 0; + + if (rm != FAIL) + { + /* It's BLX(2). The .instruction was zapped with rm & is final. */ + inst.size = 2; + } + else + { + /* No ARM register. This must be BLX(1). Change the .instruction. */ + inst.instruction = 0xf7ffeffe; + inst.size = 4; + + if (my_get_expression (& inst.reloc.exp, & mystr)) + return; + + inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX; + inst.reloc.pc_rel = 1; + } + + end_of_line (mystr); +} + +/* ARM V5 breakpoint instruction (argument parse) + BKPT <16 bit unsigned immediate> + Instruction is not conditional. + The bit pattern given in insns[] has the COND_ALWAYS condition, + and it is an error if the caller tried to override that. + Note "flags" is nonzero if a flag was supplied (which is an error). */ + +static void +do_bkpt (str, flags) + char * str; + unsigned long flags; +{ + expressionS expr; + unsigned long number; + + skip_whitespace (str); + + /* Allow optional leading '#'. */ + if (is_immediate_prefix (* str)) + str++; + + memset (& expr, '\0', sizeof (expr)); + + if (my_get_expression (& expr, & str) || (expr.X_op != O_constant)) + { + inst.error = _("bad or missing expression"); + return; + } + + number = expr.X_add_number; + + /* Check it fits a 16 bit unsigned. */ + if (number != (number & 0xffff)) + { + inst.error = _("immediate value out of range"); + return; + } + + /* Top 12 of 16 bits to bits 19:8. */ + inst.instruction |= (number & 0xfff0) << 4; + + /* Bottom 4 of 16 bits to bits 3:0. */ + inst.instruction |= number & 0xf; + + end_of_line (str); + + if (flags) + inst.error = BAD_FLAGS; +} + +/* Xscale multiply-accumulate (argument parse) + MIAcc acc0,Rm,Rs + MIAPHcc acc0,Rm,Rs + MIAxycc acc0,Rm,Rs. */ + +static void +do_mia (str, flags) + char * str; + unsigned long flags; +{ + int rs; + int rm; + + if (flags) + as_bad (BAD_FLAGS); + + else if (accum0_required_here (& str) == FAIL) + inst.error = ERR_NO_ACCUM; + + else if (skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL) + inst.error = BAD_ARGS; + + else if (skip_past_comma (& str) == FAIL + || (rs = reg_required_here (& str, 12)) == FAIL) + inst.error = BAD_ARGS; + + /* inst.instruction has now been zapped with both rm and rs. */ + else if (rm == REG_PC || rs == REG_PC) + inst.error = BAD_PC; /* Undefined result if rm or rs is R15. */ + + else + end_of_line (str); +} + +/* Xscale move-accumulator-register (argument parse) + + MARcc acc0,RdLo,RdHi. */ + +static void +do_mar (str, flags) + char * str; + unsigned long flags; +{ + int rdlo, rdhi; + + if (flags) + as_bad (BAD_FLAGS); + + else if (accum0_required_here (& str) == FAIL) + inst.error = ERR_NO_ACCUM; + + else if (skip_past_comma (& str) == FAIL + || (rdlo = reg_required_here (& str, 12)) == FAIL) + inst.error = BAD_ARGS; + + else if (skip_past_comma (& str) == FAIL + || (rdhi = reg_required_here (& str, 16)) == FAIL) + inst.error = BAD_ARGS; + + /* inst.instruction has now been zapped with both rdlo and rdhi. */ + else if (rdlo == REG_PC || rdhi == REG_PC) + inst.error = BAD_PC; /* Undefined result if rdlo or rdhi is R15. */ + + else + end_of_line (str); +} + +/* Xscale move-register-accumulator (argument parse) + + MRAcc RdLo,RdHi,acc0. */ + +static void +do_mra (str, flags) + char * str; + unsigned long flags; +{ + int rdlo; + int rdhi; + + if (flags) + { + as_bad (BAD_FLAGS); + return; + } + + skip_whitespace (str); + + if ((rdlo = reg_required_here (& str, 12)) == FAIL) + inst.error = BAD_ARGS; + + else if (skip_past_comma (& str) == FAIL + || (rdhi = reg_required_here (& str, 16)) == FAIL) + inst.error = BAD_ARGS; + + else if (skip_past_comma (& str) == FAIL + || accum0_required_here (& str) == FAIL) + inst.error = ERR_NO_ACCUM; + + /* inst.instruction has now been zapped with both rdlo and rdhi. */ + else if (rdlo == rdhi) + inst.error = BAD_ARGS; /* Undefined result if 2 writes to same reg. */ + + else if (rdlo == REG_PC || rdhi == REG_PC) + inst.error = BAD_PC; /* Undefined result if rdlo or rdhi is R15. */ + else + end_of_line (str); +} + +/* Xscale: Preload-Cache + + PLD <addr_mode> + + Syntactically, like LDR with B=1, W=0, L=1. */ + +static void +do_pld (str, flags) + char * str; + unsigned long flags; +{ + int rd; + + if (flags) + { + as_bad (BAD_FLAGS); + return; + } + + skip_whitespace (str); + + if (* str != '[') + { + inst.error = _("'[' expected after PLD mnemonic"); + return; + } + + ++ str; + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 16)) == FAIL) + return; + + skip_whitespace (str); + + if (* str == ']') + { + /* [Rn], ... ? */ + ++ str; + skip_whitespace (str); + + if (skip_past_comma (& str) == SUCCESS) + { + if (ldst_extend (& str, 0) == FAIL) + return; + } + else if (* str == '!') /* [Rn]! */ + { + inst.error = _("writeback used in preload instruction"); + ++ str; + } + else /* [Rn] */ + inst.instruction |= INDEX_UP | PRE_INDEX; + } + else /* [Rn, ...] */ + { + if (skip_past_comma (& str) == FAIL) + { + inst.error = _("pre-indexed expression expected"); + return; + } + + if (ldst_extend (& str, 0) == FAIL) + return; + + skip_whitespace (str); + + if (* str != ']') + { + inst.error = _("missing ]"); + return; + } + + ++ str; + skip_whitespace (str); + + if (* str == '!') /* [Rn]! */ + { + inst.error = _("writeback used in preload instruction"); + ++ str; + } + + inst.instruction |= PRE_INDEX; + } + + end_of_line (str); +} + +/* Xscale load-consecutive (argument parse) + Mode is like LDRH. + + LDRccD R, mode + STRccD R, mode. */ + +static void +do_ldrd (str, flags) + char * str; + unsigned long flags; +{ + int rd; + int rn; + + if (flags != DOUBLE_LOAD_FLAG) + { + /* Change instruction pattern to normal ldr/str. */ + if (inst.instruction & 0x20) + inst.instruction = (inst.instruction & COND_MASK) | 0x04000000; /* str */ + else + inst.instruction = (inst.instruction & COND_MASK) | 0x04100000; /* ldr */ + + /* Perform a normal load/store instruction parse. */ + do_ldst (str, flags); + + return; + } + + if ((cpu_variant & ARM_EXT_XSCALE) != ARM_EXT_XSCALE) + { + static char buff[128]; + + --str; + while (isspace (*str)) + --str; + str -= 4; + + /* Deny all knowledge. */ + sprintf (buff, _("bad instruction '%.100s'"), str); + inst.error = buff; + return; + } + + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 12)) == FAIL) + { + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || (rn = ld_mode_required_here (& str)) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + /* inst.instruction has now been zapped with Rd and the addressing mode. */ + if (rd & 1) /* Unpredictable result if Rd is odd. */ + { + inst.error = _("Destination register must be even"); + return; + } + + if (rd == REG_LR || rd == 12) + { + inst.error = _("r12 or r14 not allowed here"); + return; + } + + if (((rd == rn) || (rd + 1 == rn)) + && + ((inst.instruction & WRITE_BACK) + || (!(inst.instruction & PRE_INDEX)))) + as_warn (_("pre/post-indexing used when modified address register is destination")); + + end_of_line (str); +} + +/* Returns the index into fp_values of a floating point number, + or -1 if not in the table. */ + static int my_get_float_expression (str) char ** str; @@ -2218,9 +3560,10 @@ my_get_float_expression (str) int j; memset (words, 0, MAX_LITTLENUMS * sizeof (LITTLENUM_TYPE)); - /* Look for a raw floating point number */ + + /* Look for a raw floating point number. */ if ((save_in = atof_ieee (*str, 'x', words)) != NULL - && (is_end_of_line [(int)(*save_in)] || *save_in == '\0')) + && is_end_of_line[(unsigned char) *save_in]) { for (i = 0; i < NUM_FLOAT_VALS; i++) { @@ -2239,7 +3582,7 @@ my_get_float_expression (str) } /* Try and parse a more complex expression, this will probably fail - unless the code uses a floating point prefix (eg "0f") */ + unless the code uses a floating point prefix (eg "0f"). */ save_in = input_line_pointer; input_line_pointer = *str; if (expression (&exp) == absolute_section @@ -2248,7 +3591,7 @@ my_get_float_expression (str) { /* FIXME: 5 = X_PRECISION, should be #define'd where we can use it. Ditto for 15. */ - if (gen_to_words (words, 5, (long)15) == 0) + if (gen_to_words (words, 5, (long) 15) == 0) { for (i = 0; i < NUM_FLOAT_VALS; i++) { @@ -2273,7 +3616,8 @@ my_get_float_expression (str) return -1; } -/* Return true if anything in the expression is a bignum */ +/* Return true if anything in the expression is a bignum. */ + static int walk_no_bignums (sp) symbolS * sp; @@ -2298,7 +3642,7 @@ my_get_expression (ep, str) { char * save_in; segT seg; - + save_in = input_line_pointer; input_line_pointer = *str; seg = expression (ep); @@ -2337,116 +3681,130 @@ my_get_expression (ep, str) return 0; } -/* unrestrict should be one if <shift> <register> is permitted for this - instruction */ +/* UNRESTRICT should be one if <shift> <register> is permitted for this + instruction. */ static int decode_shift (str, unrestrict) char ** str; int unrestrict; { - struct asm_shift * shft; + const struct asm_shift_name * shift; char * p; char c; - + skip_whitespace (* str); - - for (p = *str; isalpha (*p); p++) + + for (p = * str; isalpha (* p); p ++) ; - if (p == *str) + if (p == * str) { inst.error = _("Shift expression expected"); return FAIL; } - c = *p; - *p = '\0'; - shft = (struct asm_shift *) hash_find (arm_shift_hsh, *str); - *p = c; - if (shft) + c = * p; + * p = '\0'; + shift = (const struct asm_shift_name *) hash_find (arm_shift_hsh, * str); + * p = c; + + if (shift == NULL) { - if (!strncmp (*str, "rrx", 3) - || !strncmp (*str, "RRX", 3)) - { - *str = p; - inst.instruction |= shft->value; - return SUCCESS; - } + inst.error = _("Shift expression expected"); + return FAIL; + } - skip_whitespace (p); - - if (unrestrict && reg_required_here (&p, 8) != FAIL) - { - inst.instruction |= shft->value | SHIFT_BY_REG; - *str = p; - return SUCCESS; - } - else if (is_immediate_prefix (* p)) - { - inst.error = NULL; - p++; - if (my_get_expression (&inst.reloc.exp, &p)) - return FAIL; + assert (shift->properties->index == shift_properties[shift->properties->index].index); - /* Validate some simple #expressions */ - if (inst.reloc.exp.X_op == O_constant) - { - unsigned num = inst.reloc.exp.X_add_number; + if (shift->properties->index == SHIFT_RRX) + { + * str = p; + inst.instruction |= shift->properties->bit_field; + return SUCCESS; + } - /* Reject operations greater than 32, or lsl #32 */ - if (num > 32 || (num == 32 && shft->value == 0)) - { - inst.error = _("Invalid immediate shift"); - return FAIL; - } + skip_whitespace (p); - /* Shifts of zero should be converted to lsl (which is zero)*/ - if (num == 0) - { - *str = p; - return SUCCESS; - } + if (unrestrict && reg_required_here (& p, 8) != FAIL) + { + inst.instruction |= shift->properties->bit_field | SHIFT_BY_REG; + * str = p; + return SUCCESS; + } + else if (! is_immediate_prefix (* p)) + { + inst.error = (unrestrict + ? _("shift requires register or #expression") + : _("shift requires #expression")); + * str = p; + return FAIL; + } - /* Shifts of 32 are encoded as 0, for those shifts that - support it. */ - if (num == 32) - num = 0; + inst.error = NULL; + p ++; - inst.instruction |= (num << 7) | shft->value; - *str = p; - return SUCCESS; - } + if (my_get_expression (& inst.reloc.exp, & p)) + return FAIL; - inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM; - inst.reloc.pc_rel = 0; - inst.instruction |= shft->value; - *str = p; - return SUCCESS; - } - else + /* Validate some simple #expressions. */ + if (inst.reloc.exp.X_op == O_constant) + { + unsigned num = inst.reloc.exp.X_add_number; + + /* Reject operations greater than 32. */ + if (num > 32 + /* Reject a shift of 0 unless the mode allows it. */ + || (num == 0 && shift->properties->allows_0 == 0) + /* Reject a shift of 32 unless the mode allows it. */ + || (num == 32 && shift->properties->allows_32 == 0) + ) { - inst.error = unrestrict ? _("shift requires register or #expression") - : _("shift requires #expression"); - *str = p; - return FAIL; + /* As a special case we allow a shift of zero for + modes that do not support it to be recoded as an + logical shift left of zero (ie nothing). We warn + about this though. */ + if (num == 0) + { + as_warn (_("Shift of 0 ignored.")); + shift = & shift_names[0]; + assert (shift->properties->index == SHIFT_LSL); + } + else + { + inst.error = _("Invalid immediate shift"); + return FAIL; + } } + + /* Shifts of 32 are encoded as 0, for those shifts that + support it. */ + if (num == 32) + num = 0; + + inst.instruction |= (num << 7) | shift->properties->bit_field; + } + else + { + inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM; + inst.reloc.pc_rel = 0; + inst.instruction |= shift->properties->bit_field; } - inst.error = _("Shift expression expected"); - return FAIL; + * str = p; + return SUCCESS; } -/* Do those data_ops which can take a negative immediate constant */ -/* by altering the instuction. A bit of a hack really */ -/* MOV <-> MVN +/* Do those data_ops which can take a negative immediate constant + by altering the instuction. A bit of a hack really. + MOV <-> MVN AND <-> BIC ADC <-> SBC by inverting the second operand, and ADD <-> SUB CMP <-> CMN - by negating the second operand. -*/ + by negating the second operand. */ + static int negate_data_op (instruction, value) unsigned long * instruction; @@ -2461,60 +3819,60 @@ negate_data_op (instruction, value) op = (*instruction >> DATA_OP_SHIFT) & 0xf; switch (op) { - /* First negates */ - case OPCODE_SUB: /* ADD <-> SUB */ + /* First negates. */ + case OPCODE_SUB: /* ADD <-> SUB */ new_inst = OPCODE_ADD; value = negated; break; - case OPCODE_ADD: - new_inst = OPCODE_SUB; + case OPCODE_ADD: + new_inst = OPCODE_SUB; value = negated; break; - case OPCODE_CMP: /* CMP <-> CMN */ + case OPCODE_CMP: /* CMP <-> CMN */ new_inst = OPCODE_CMN; value = negated; break; - case OPCODE_CMN: - new_inst = OPCODE_CMP; + case OPCODE_CMN: + new_inst = OPCODE_CMP; value = negated; break; - /* Now Inverted ops */ - case OPCODE_MOV: /* MOV <-> MVN */ - new_inst = OPCODE_MVN; + /* Now Inverted ops. */ + case OPCODE_MOV: /* MOV <-> MVN */ + new_inst = OPCODE_MVN; value = inverted; break; - case OPCODE_MVN: + case OPCODE_MVN: new_inst = OPCODE_MOV; value = inverted; break; - case OPCODE_AND: /* AND <-> BIC */ - new_inst = OPCODE_BIC; + case OPCODE_AND: /* AND <-> BIC */ + new_inst = OPCODE_BIC; value = inverted; break; - case OPCODE_BIC: + case OPCODE_BIC: new_inst = OPCODE_AND; value = inverted; break; - case OPCODE_ADC: /* ADC <-> SBC */ - new_inst = OPCODE_SBC; + case OPCODE_ADC: /* ADC <-> SBC */ + new_inst = OPCODE_SBC; value = inverted; break; - case OPCODE_SBC: + case OPCODE_SBC: new_inst = OPCODE_ADC; value = inverted; break; - /* We cannot do anything */ - default: + /* We cannot do anything. */ + default: return FAIL; } @@ -2523,7 +3881,7 @@ negate_data_op (instruction, value) *instruction &= OPCODE_MASK; *instruction |= new_inst << DATA_OP_SHIFT; - return value; + return value; } static int @@ -2534,7 +3892,7 @@ data_op2 (str) expressionS expr; skip_whitespace (* str); - + if (reg_required_here (str, 0) != FAIL) { if (skip_past_comma (str) == SUCCESS) @@ -2545,12 +3903,12 @@ data_op2 (str) } else { - /* Immediate expression */ + /* Immediate expression. */ if (is_immediate_prefix (**str)) { (*str)++; inst.error = NULL; - + if (my_get_expression (&inst.reloc.exp, str)) return FAIL; @@ -2563,7 +3921,7 @@ data_op2 (str) { if (skip_past_comma (str) == SUCCESS) { - /* #x, y -- ie explicit rotation by Y */ + /* #x, y -- ie explicit rotation by Y. */ if (my_get_expression (&expr, str)) return FAIL; @@ -2572,8 +3930,8 @@ data_op2 (str) inst.error = _("Constant expression expected"); return FAIL; } - - /* Rotate must be a multiple of 2 */ + + /* Rotate must be a multiple of 2. */ if (((unsigned) expr.X_add_number) > 30 || (expr.X_add_number & 1) != 0 || ((unsigned) inst.reloc.exp.X_add_number) > 255) @@ -2587,13 +3945,13 @@ data_op2 (str) return SUCCESS; } - /* Implicit rotation, select a suitable one */ + /* Implicit rotation, select a suitable one. */ value = validate_immediate (inst.reloc.exp.X_add_number); if (value == FAIL) { - /* Can't be done, perhaps the code reads something like - "add Rd, Rn, #-n", where "sub Rd, Rn, #n" would be ok */ + /* Can't be done. Perhaps the code reads something like + "add Rd, Rn, #-n", where "sub Rd, Rn, #n" would be OK. */ if ((value = negate_data_op (&inst.instruction, inst.reloc.exp.X_add_number)) == FAIL) @@ -2626,7 +3984,7 @@ fp_op2 (str) return SUCCESS; else { - /* Immediate expression */ + /* Immediate expression. */ if (*((*str)++) == '#') { int i; @@ -2635,8 +3993,8 @@ fp_op2 (str) skip_whitespace (* str); - /* First try and match exact strings, this is to guarantee that - some formats will work even for cross assembly */ + /* First try and match exact strings, this is to guarantee + that some formats will work even for cross assembly. */ for (i = 0; fp_const[i]; i++) { @@ -2645,7 +4003,7 @@ fp_op2 (str) char *start = *str; *str += strlen (fp_const[i]); - if (is_end_of_line[(int)**str] || **str == '\0') + if (is_end_of_line[(unsigned char) **str]) { inst.instruction |= i + 8; return SUCCESS; @@ -2667,14 +4025,15 @@ fp_op2 (str) inst.error = _("Invalid floating point immediate expression"); return FAIL; } - inst.error = _("Floating point register or immediate expression expected"); + inst.error = + _("Floating point register or immediate expression expected"); return FAIL; } } static void do_arit (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -2697,7 +4056,7 @@ do_arit (str, flags) static void do_adr (str, flags) - char * str; + char * str; unsigned long flags; { /* This is a pseudo-op of the form "adr rd, label" to be converted @@ -2712,26 +4071,26 @@ do_adr (str, flags) inst.error = BAD_ARGS; return; } - + /* Frag hacking will turn this into a sub instruction if the offset turns out to be negative. */ inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE; inst.reloc.exp.X_add_number -= 8; /* PC relative adjust. */ inst.reloc.pc_rel = 1; inst.instruction |= flags; + end_of_line (str); - return; } static void do_adrl (str, flags) - char * str; + char * str; unsigned long flags; { /* This is a pseudo-op of the form "adrl rd, label" to be converted into a relative address of the form: add rd, pc, #low(label-.-8)" - add rd, rd, #high(label-.-8)" */ + add rd, rd, #high(label-.-8)" */ skip_whitespace (str); @@ -2743,23 +4102,23 @@ do_adrl (str, flags) inst.error = BAD_ARGS; return; } - + end_of_line (str); - + /* Frag hacking will turn this into a sub instruction if the offset turns out to be negative. */ inst.reloc.type = BFD_RELOC_ARM_ADRL_IMMEDIATE; - inst.reloc.exp.X_add_number -= 8; /* PC relative adjust */ + inst.reloc.exp.X_add_number -= 8; /* PC relative adjust */ inst.reloc.pc_rel = 1; inst.instruction |= flags; inst.size = INSN_SIZE * 2; - + return; } static void do_cmp (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -2789,7 +4148,7 @@ do_cmp (str, flags) static void do_mov (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -2833,8 +4192,8 @@ ldst_extend (str, hwse) { int value = inst.reloc.exp.X_add_number; - if ((hwse && (value < -255 || value > 255)) - || (value < -4095 || value > 4095)) + if ((hwse && (value < -255 || value > 255)) + || (value < -4095 || value > 4095)) { inst.error = _("address offset too large"); return FAIL; @@ -2846,42 +4205,47 @@ ldst_extend (str, hwse) add = 0; } - /* Halfword and signextension instructions have the - immediate value split across bits 11..8 and bits 3..0 */ - if (hwse) - inst.instruction |= add | HWOFFSET_IMM | ((value >> 4) << 8) | (value & 0xF); - else - inst.instruction |= add | value; + /* Halfword and signextension instructions have the + immediate value split across bits 11..8 and bits 3..0. */ + if (hwse) + inst.instruction |= (add | HWOFFSET_IMM + | ((value >> 4) << 8) | (value & 0xF)); + else + inst.instruction |= add | value; } else { - if (hwse) - { - inst.instruction |= HWOFFSET_IMM; - inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; - } - else - inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM; + if (hwse) + { + inst.instruction |= HWOFFSET_IMM; + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; + } + else + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM; inst.reloc.pc_rel = 0; } return SUCCESS; case '-': - add = 0; /* and fall through */ + add = 0; + /* Fall through. */ + case '+': - (*str)++; /* and fall through */ + (*str)++; + /* Fall through. */ + default: if (reg_required_here (str, 0) == FAIL) return FAIL; if (hwse) - inst.instruction |= add; + inst.instruction |= add; else - { - inst.instruction |= add | OFFSET_REG; - if (skip_past_comma (str) == SUCCESS) - return decode_shift (str, SHIFT_RESTRICT); - } + { + inst.instruction |= add | OFFSET_REG; + if (skip_past_comma (str) == SUCCESS) + return decode_shift (str, SHIFT_RESTRICT); + } return SUCCESS; } @@ -2899,27 +4263,27 @@ do_ldst (str, flags) /* This is not ideal, but it is the simplest way of dealing with the ARM7T halfword instructions (since they use a different - encoding, but the same mnemonic): */ + encoding, but the same mnemonic): */ halfword = (flags & 0x80000000) != 0; if (halfword) { /* This is actually a load/store of a halfword, or a - signed-extension load */ - if ((cpu_variant & ARM_HALFWORD) == 0) - { - inst.error + signed-extension load. */ + if ((cpu_variant & ARM_EXT_HALFWORD) == 0) + { + inst.error = _("Processor does not support halfwords or signed bytes"); - return; - } + return; + } - inst.instruction = (inst.instruction & COND_MASK) - | (flags & ~COND_MASK); + inst.instruction = ((inst.instruction & COND_MASK) + | (flags & ~COND_MASK)); flags = 0; } skip_whitespace (str); - + if ((conflict_reg = reg_required_here (& str, 12)) == FAIL) { if (!inst.error) @@ -2952,41 +4316,57 @@ do_ldst (str, flags) if (*str == ']') { str ++; - + if (skip_past_comma (&str) == SUCCESS) { - /* [Rn],... (post inc) */ + /* [Rn],... (post inc) */ if (ldst_extend (&str, halfword) == FAIL) return; if (conflict_reg) - as_warn (_("%s register same as write-back base"), - (inst.instruction & LOAD_BIT) ? _("destination") : _("source") ); + { + if (flags & TRANS_BIT) + as_warn (_("Rn and Rd must be different in %s"), + ((inst.instruction & LOAD_BIT) + ? "LDRT" : "STRT")); + else + as_warn (_("%s register same as write-back base"), + ((inst.instruction & LOAD_BIT) + ? _("destination") : _("source"))); + } } else { - /* [Rn] */ - if (halfword) - inst.instruction |= HWOFFSET_IMM; + /* [Rn] */ + if (halfword) + inst.instruction |= HWOFFSET_IMM; - skip_whitespace (str); + skip_whitespace (str); - if (*str == '!') - { - if (conflict_reg) - as_warn (_("%s register same as write-back base"), - (inst.instruction & LOAD_BIT) ? _("destination") : _("source") ); - str++; - inst.instruction |= WRITE_BACK; - } + if (*str == '!') + { + if (conflict_reg) + as_warn (_("%s register same as write-back base"), + ((inst.instruction & LOAD_BIT) + ? _("destination") : _("source"))); + str++; + inst.instruction |= WRITE_BACK; + } flags |= INDEX_UP; - if (! (flags & TRANS_BIT)) - pre_inc = 1; + if (flags & TRANS_BIT) + { + if (conflict_reg) + as_warn (_("Rn and Rd must be different in %s"), + ((inst.instruction & LOAD_BIT) + ? "LDRT" : "STRT")); + } + else + pre_inc = 1; } } else { - /* [Rn,...] */ + /* [Rn,...] */ if (skip_past_comma (&str) == FAIL) { inst.error = _("pre-indexed expression expected"); @@ -3011,7 +4391,8 @@ do_ldst (str, flags) { if (conflict_reg) as_warn (_("%s register same as write-back base"), - (inst.instruction & LOAD_BIT) ? _("destination") : _("source") ); + ((inst.instruction & LOAD_BIT) + ? _("destination") : _("source"))); str++; inst.instruction |= WRITE_BACK; } @@ -3019,7 +4400,7 @@ do_ldst (str, flags) } else if (*str == '=') { - /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op */ + /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */ str++; skip_whitespace (str); @@ -3035,36 +4416,36 @@ do_ldst (str, flags) } if (inst.reloc.exp.X_op == O_constant - && (value = validate_immediate(inst.reloc.exp.X_add_number)) != FAIL) + && (value = validate_immediate (inst.reloc.exp.X_add_number)) != FAIL) { - /* This can be done with a mov instruction */ + /* This can be done with a mov instruction. */ inst.instruction &= LITERAL_MASK; inst.instruction |= INST_IMMEDIATE | (OPCODE_MOV << DATA_OP_SHIFT); inst.instruction |= (flags & COND_MASK) | (value & 0xfff); - end_of_line(str); - return; + end_of_line (str); + return; } else { - /* Insert into literal pool */ + /* Insert into literal pool. */ if (add_to_lit_pool () == FAIL) { if (!inst.error) - inst.error = _("literal pool insertion failed"); + inst.error = _("literal pool insertion failed"); return; } - /* Change the instruction exp to point to the pool */ - if (halfword) - { - inst.instruction |= HWOFFSET_IMM; - inst.reloc.type = BFD_RELOC_ARM_HWLITERAL; - } - else + /* Change the instruction exp to point to the pool. */ + if (halfword) + { + inst.instruction |= HWOFFSET_IMM; + inst.reloc.type = BFD_RELOC_ARM_HWLITERAL; + } + else inst.reloc.type = BFD_RELOC_ARM_LITERAL; inst.reloc.pc_rel = 1; inst.instruction |= (REG_PC << 16); - pre_inc = 1; + pre_inc = 1; } } else @@ -3073,20 +4454,21 @@ do_ldst (str, flags) return; if (halfword) - { - inst.instruction |= HWOFFSET_IMM; - inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; - } + { + inst.instruction |= HWOFFSET_IMM; + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; + } else - inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM; + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM; #ifndef TE_WINCE - inst.reloc.exp.X_add_number -= 8; /* PC rel adjust */ + /* PC rel adjust. */ + inst.reloc.exp.X_add_number -= 8; #endif inst.reloc.pc_rel = 1; inst.instruction |= (REG_PC << 16); pre_inc = 1; } - + if (pre_inc && (flags & TRANS_BIT)) inst.error = _("Pre-increment instruction with translate"); @@ -3099,11 +4481,11 @@ static long reg_list (strp) char ** strp; { - char * str = *strp; + char * str = * strp; long range = 0; int another_range; - /* We come back here if we get ranges concatenated by '+' or '|' */ + /* We come back here if we get ranges concatenated by '+' or '|'. */ do { another_range = 0; @@ -3112,21 +4494,21 @@ reg_list (strp) { int in_range = 0; int cur_reg = -1; - + str++; do { int reg; - + skip_whitespace (str); if ((reg = reg_required_here (& str, -1)) == FAIL) return FAIL; - + if (in_range) { int i; - + if (reg <= cur_reg) { inst.error = _("Bad range in register list"); @@ -3136,7 +4518,7 @@ reg_list (strp) for (i = cur_reg + 1; i < reg; i++) { if (range & (1 << i)) - as_tsktsk + as_tsktsk (_("Warning: Duplicated register (r%d) in register list"), i); else @@ -3153,8 +4535,9 @@ reg_list (strp) range |= 1 << reg; cur_reg = reg; - } while (skip_past_comma (&str) != FAIL - || (in_range = 1, *str++ == '-')); + } + while (skip_past_comma (&str) != FAIL + || (in_range = 1, *str++ == '-')); str--; skip_whitespace (str); @@ -3173,7 +4556,7 @@ reg_list (strp) if (expr.X_op == O_constant) { - if (expr.X_add_number + if (expr.X_add_number != (expr.X_add_number & 0x0000ffff)) { inst.error = _("invalid register mask"); @@ -3186,7 +4569,7 @@ reg_list (strp) regno &= -regno; regno = (1 << regno) - 1; - as_tsktsk + as_tsktsk (_("Warning: Duplicated register (r%d) in register list"), regno); } @@ -3214,7 +4597,8 @@ reg_list (strp) str++; another_range = 1; } - } while (another_range); + } + while (another_range); *strp = str; return range; @@ -3222,7 +4606,7 @@ reg_list (strp) static void do_ldmstm (str, flags) - char * str; + char * str; unsigned long flags; { int base_reg; @@ -3268,11 +4652,11 @@ do_ldmstm (str, flags) static void do_swi (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); - + /* Allow optional leading '#'. */ if (is_immediate_prefix (*str)) str++; @@ -3283,19 +4667,19 @@ do_swi (str, flags) inst.reloc.type = BFD_RELOC_ARM_SWI; inst.reloc.pc_rel = 0; inst.instruction |= flags; - + end_of_line (str); - + return; } static void do_swap (str, flags) - char * str; + char * str; unsigned long flags; { int reg; - + skip_whitespace (str); if ((reg = reg_required_here (&str, 12)) == FAIL) @@ -3354,20 +4738,20 @@ do_swap (str, flags) static void do_branch (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { if (my_get_expression (&inst.reloc.exp, &str)) return; - + #ifdef OBJ_ELF { char * save_in; - - /* ScottB: February 5, 1998 */ - /* Check to see of PLT32 reloc required for the instruction. */ - - /* arm_parse_reloc() works on input_line_pointer. + + /* ScottB: February 5, 1998 - Check to see of PLT32 reloc + required for the instruction. */ + + /* arm_parse_reloc () works on input_line_pointer. We actually want to parse the operands to the branch instruction passed in 'str'. Save the input pointer and restore it later. */ save_in = input_line_pointer; @@ -3392,15 +4776,15 @@ do_branch (str, flags) #else inst.reloc.type = BFD_RELOC_ARM_PCREL_BRANCH; inst.reloc.pc_rel = 1; -#endif /* OBJ_ELF */ - +#endif /* OBJ_ELF */ + end_of_line (str); return; } static void do_bx (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { int reg; @@ -3413,15 +4797,16 @@ do_bx (str, flags) return; } + /* Note - it is not illegal to do a "bx pc". Useless, but not illegal. */ if (reg == REG_PC) - inst.error = BAD_PC; + as_tsktsk (_("Use of r15 in bx in ARM mode is not really useful")); end_of_line (str); } static void do_cdp (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { /* Co-processor data operation. @@ -3483,7 +4868,7 @@ do_cdp (str, flags) static void do_lstc (str, flags) - char * str; + char * str; unsigned long flags; { /* Co-processor register load/store. @@ -3521,7 +4906,7 @@ do_lstc (str, flags) static void do_co_reg (str, flags) - char * str; + char * str; unsigned long flags; { /* Co-processor register transfer. @@ -3588,7 +4973,7 @@ do_co_reg (str, flags) static void do_fp_ctrl (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { /* FP control registers. @@ -3609,7 +4994,7 @@ do_fp_ctrl (str, flags) static void do_fp_ldst (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { skip_whitespace (str); @@ -3651,7 +5036,7 @@ do_fp_ldst (str, flags) static void do_fp_ldmstm (str, flags) - char * str; + char * str; unsigned long flags; { int num_regs; @@ -3665,7 +5050,7 @@ do_fp_ldmstm (str, flags) return; } - /* Get Number of registers to transfer */ + /* Get Number of registers to transfer. */ if (skip_past_comma (&str) == FAIL || my_get_expression (&inst.reloc.exp, &str)) { @@ -3744,7 +5129,8 @@ do_fp_ldmstm (str, flags) str++; if (reg == REG_PC) { - inst.error = _("R15 not allowed as base register with write-back"); + inst.error = + _("R15 not allowed as base register with write-back"); return; } } @@ -3753,14 +5139,14 @@ do_fp_ldmstm (str, flags) if (flags & CP_T_Pre) { - /* Pre-decrement */ + /* Pre-decrement. */ offset = 3 * num_regs; if (write_back) flags |= CP_T_WB; } else { - /* Post-increment */ + /* Post-increment. */ if (write_back) { flags |= CP_T_WB; @@ -3790,7 +5176,7 @@ do_fp_ldmstm (str, flags) static void do_fp_dyadic (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3839,7 +5225,7 @@ do_fp_dyadic (str, flags) static void do_fp_monadic (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3880,7 +5266,7 @@ do_fp_monadic (str, flags) static void do_fp_cmp (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3907,7 +5293,7 @@ do_fp_cmp (str, flags) static void do_fp_from_reg (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3948,7 +5334,7 @@ do_fp_from_reg (str, flags) static void do_fp_to_reg (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3969,13 +5355,14 @@ do_fp_to_reg (str, flags) return; } -/* Thumb specific routines */ +/* Thumb specific routines. */ /* Parse and validate that a register is of the right form, this saves - repeated checking of this information in many similar cases. - Unlike the 32-bit case we do not insert the register into the opcode - here, since the position is often unknown until the full instruction + repeated checking of this information in many similar cases. + Unlike the 32-bit case we do not insert the register into the opcode + here, since the position is often unknown until the full instruction has been parsed. */ + static int thumb_reg (strp, hi_lo) char ** strp; @@ -4013,6 +5400,7 @@ thumb_reg (strp, hi_lo) /* Parse an add or subtract instruction, SUBTRACT is non-zero if the opcode was SUB. */ + static void thumb_add_sub (str, subtract) char * str; @@ -4044,8 +5432,8 @@ thumb_add_sub (str, subtract) if (skip_past_comma (&str) == FAIL) { - /* Two operand format, shuffle the registers and pretend there - are 3 */ + /* Two operand format, shuffle the registers + and pretend there are 3. */ Rn = Rs; Rs = Rd; } @@ -4060,7 +5448,7 @@ thumb_add_sub (str, subtract) } /* We now have Rd and Rs set to registers, and Rn set to a register or FAIL; - for the latter case, EXPR contains the immediate that was found. */ + for the latter case, EXPR contains the immediate that was found. */ if (Rn != FAIL) { /* All register format. */ @@ -4072,7 +5460,7 @@ thumb_add_sub (str, subtract) return; } - /* Can't do this for SUB */ + /* Can't do this for SUB. */ if (subtract) { inst.error = _("subtract valid only on lo regs"); @@ -4106,7 +5494,7 @@ thumb_add_sub (str, subtract) if (inst.reloc.exp.X_op != O_constant) { /* Value isn't known yet, all we can do is store all the fragments - we know about in the instruction and let the reloc hacking + we know about in the instruction and let the reloc hacking work it all out. */ inst.instruction = (subtract ? 0x8000 : 0) | (Rd << 4) | Rs; inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD; @@ -4123,7 +5511,7 @@ thumb_add_sub (str, subtract) offset = -offset; subtract = 1; - /* Quick check, in case offset is MIN_INT */ + /* Quick check, in case offset is MIN_INT. */ if (offset < 0) { inst.error = _("immediate value out of range"); @@ -4177,7 +5565,7 @@ thumb_add_sub (str, subtract) } } } - + end_of_line (str); } @@ -4208,13 +5596,13 @@ thumb_shift (str, shift) } else { - if ((Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL) + if ((Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL) return; if (skip_past_comma (&str) == FAIL) { - /* Two operand format, shuffle the registers and pretend there - are 3 */ + /* Two operand format, shuffle the registers + and pretend there are 3. */ Rn = Rs; Rs = Rd; } @@ -4229,7 +5617,7 @@ thumb_shift (str, shift) } /* We now have Rd and Rs set to registers, and Rn set to a register or FAIL; - for the latter case, EXPR contains the immediate that was found. */ + for the latter case, EXPR contains the immediate that was found. */ if (Rn != FAIL) { @@ -4260,8 +5648,7 @@ thumb_shift (str, shift) if (inst.reloc.exp.X_op != O_constant) { /* Value isn't known yet, create a dummy reloc and let reloc - hacking fix it up */ - + hacking fix it up. */ inst.reloc.type = BFD_RELOC_ARM_THUMB_SHIFT; } else @@ -4274,11 +5661,11 @@ thumb_shift (str, shift) return; } - /* Shifts of zero are handled by converting to LSL */ + /* Shifts of zero are handled by converting to LSL. */ if (shift_value == 0) inst.instruction = T_OPCODE_LSL_I; - /* Shifts of 32 are encoded as a shift of zero */ + /* Shifts of 32 are encoded as a shift of zero. */ if (shift_value == 32) shift_value = 0; @@ -4287,7 +5674,7 @@ thumb_shift (str, shift) inst.instruction |= Rd | (Rs << 3); } - + end_of_line (str); } @@ -4323,7 +5710,7 @@ thumb_mov_compare (str, move) { if (move == THUMB_MOVE) /* A move of two lowregs is encoded as ADD Rd, Rs, #0 - since a MOV instruction produces unpredictable results */ + since a MOV instruction produces unpredictable results. */ inst.instruction = T_OPCODE_ADD_I3; else inst.instruction = T_OPCODE_CMP_LR; @@ -4429,7 +5816,7 @@ thumb_load_store (str, load_store, size) } else if (*str == '=') { - /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op */ + /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */ str++; skip_whitespace (str); @@ -4438,7 +5825,7 @@ thumb_load_store (str, load_store, size) return; end_of_line (str); - + if ( inst.reloc.exp.X_op != O_constant && inst.reloc.exp.X_op != O_symbol) { @@ -4449,25 +5836,26 @@ thumb_load_store (str, load_store, size) if (inst.reloc.exp.X_op == O_constant && ((inst.reloc.exp.X_add_number & ~0xFF) == 0)) { - /* This can be done with a mov instruction */ + /* This can be done with a mov instruction. */ inst.instruction = T_OPCODE_MOV_I8 | (Rd << 8); inst.instruction |= inst.reloc.exp.X_add_number; - return; + return; } - /* Insert into literal pool */ + /* Insert into literal pool. */ if (add_to_lit_pool () == FAIL) { if (!inst.error) - inst.error = "literal pool insertion failed"; + inst.error = "literal pool insertion failed"; return; } inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET; inst.reloc.pc_rel = 1; inst.instruction = T_OPCODE_LDR_PC | (Rd << 8); - inst.reloc.exp.X_add_number += 4; /* Adjust ARM pipeline offset to Thumb */ + /* Adjust ARM pipeline offset to Thumb. */ + inst.reloc.exp.X_add_number += 4; return; } @@ -4478,7 +5866,7 @@ thumb_load_store (str, load_store, size) inst.instruction = T_OPCODE_LDR_PC | (Rd << 8); inst.reloc.pc_rel = 1; - inst.reloc.exp.X_add_number -= 4; /* Pipeline offset */ + inst.reloc.exp.X_add_number -= 4; /* Pipeline offset. */ inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET; end_of_line (str); return; @@ -4532,7 +5920,7 @@ thumb_load_store (str, load_store, size) } else if (Ro == FAIL) { - /* Immediate offset */ + /* Immediate offset. */ if (size == THUMB_WORD) inst.instruction = (load_store == THUMB_LOAD ? T_OPCODE_LDR_IW : T_OPCODE_STR_IW); @@ -4548,7 +5936,7 @@ thumb_load_store (str, load_store, size) if (inst.reloc.exp.X_op == O_constant) { unsigned offset = inst.reloc.exp.X_add_number; - + if (offset & ~(0x1f << size)) { inst.error = _("Invalid offset"); @@ -4561,7 +5949,7 @@ thumb_load_store (str, load_store, size) } else { - /* Register offset */ + /* Register offset. */ if (size == THUMB_WORD) inst.instruction = (load_store == THUMB_LOAD ? T_OPCODE_LDR_RW : T_OPCODE_STR_RW); @@ -4582,14 +5970,15 @@ static void do_t_nop (str) char * str; { - /* Do nothing */ + /* Do nothing. */ end_of_line (str); return; } -/* Handle the Format 4 instructions that do not have equivalents in other +/* Handle the Format 4 instructions that do not have equivalents in other formats. That is, ADC, AND, EOR, SBC, ROR, TST, NEG, CMN, ORR, MUL, BIC and MVN. */ + static void do_t_arit (str) char * str; @@ -4602,8 +5991,8 @@ do_t_arit (str) || skip_past_comma (&str) == FAIL || (Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL) { - inst.error = BAD_ARGS; - return; + inst.error = BAD_ARGS; + return; } if (skip_past_comma (&str) != FAIL) @@ -4614,7 +6003,7 @@ do_t_arit (str) if (inst.instruction == T_OPCODE_TST || inst.instruction == T_OPCODE_CMN || inst.instruction == T_OPCODE_NEG - || inst.instruction == T_OPCODE_MVN) + || inst.instruction == T_OPCODE_MVN) { inst.error = BAD_ARGS; return; @@ -4685,23 +6074,23 @@ find_real_start (symbolP) const char * name = S_GET_NAME (symbolP); symbolS * new_target; - /* This definiton must agree with the one in gcc/config/arm/thumb.c */ + /* This definiton must agree with the one in gcc/config/arm/thumb.c. */ #define STUB_NAME ".real_start_of" if (name == NULL) - abort(); + abort (); /* Names that start with '.' are local labels, not function entry points. The compiler may generate BL instructions to these labels because it needs to perform a branch to a far away location. */ if (name[0] == '.') return symbolP; - + real_start = malloc (strlen (name) + strlen (STUB_NAME) + 1); sprintf (real_start, "%s%s", STUB_NAME, name); new_target = symbol_find (real_start); - + if (new_target == NULL) { as_warn ("Failed to find real start of function: %s\n", name); @@ -4713,14 +6102,13 @@ find_real_start (symbolP) return new_target; } - static void do_t_branch23 (str) char * str; { if (my_get_expression (& inst.reloc.exp, & str)) return; - + inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23; inst.reloc.pc_rel = 1; end_of_line (str); @@ -4733,7 +6121,8 @@ do_t_branch23 (str) && inst.reloc.exp.X_add_symbol != NULL && S_IS_DEFINED (inst.reloc.exp.X_add_symbol) && ! THUMB_IS_FUNC (inst.reloc.exp.X_add_symbol)) - inst.reloc.exp.X_add_symbol = find_real_start (inst.reloc.exp.X_add_symbol); + inst.reloc.exp.X_add_symbol = + find_real_start (inst.reloc.exp.X_add_symbol); } static void @@ -4791,7 +6180,7 @@ do_t_ldmstm (str) if (inst.reloc.type != BFD_RELOC_NONE) { - /* This really doesn't seem worth it. */ + /* This really doesn't seem worth it. */ inst.reloc.type = BFD_RELOC_NONE; inst.error = _("Expression too complex"); return; @@ -4891,7 +6280,7 @@ do_t_push_pop (str) if (inst.reloc.type != BFD_RELOC_NONE) { - /* This really doesn't seem worth it. */ + /* This really doesn't seem worth it. */ inst.reloc.type = BFD_RELOC_NONE; inst.error = _("Expression too complex"); return; @@ -4985,7 +6374,7 @@ do_t_adr (str) inst.reloc.exp.X_add_number -= 4; /* PC relative adjust. */ inst.reloc.pc_rel = 1; inst.instruction |= REG_PC; /* Rd is already placed into the instruction. */ - + end_of_line (str); } @@ -4993,10 +6382,10 @@ static void insert_reg (entry) int entry; { - int len = strlen (reg_table[entry].name) + 2; - char * buf = (char *) xmalloc (len); + int len = strlen (reg_table[entry].name) + 2; + char * buf = (char *) xmalloc (len); char * buf2 = (char *) xmalloc (len); - int i = 0; + int i = 0; #ifdef REGISTER_PREFIX buf[i++] = REGISTER_PREFIX; @@ -5009,8 +6398,8 @@ insert_reg (entry) buf2[i] = '\0'; - hash_insert (arm_reg_hsh, buf, (PTR) ®_table[entry]); - hash_insert (arm_reg_hsh, buf2, (PTR) ®_table[entry]); + hash_insert (arm_reg_hsh, buf, (PTR) & reg_table[entry]); + hash_insert (arm_reg_hsh, buf2, (PTR) & reg_table[entry]); } static void @@ -5019,7 +6408,7 @@ insert_reg_alias (str, regnum) int regnum; { struct reg_entry *new = - (struct reg_entry *)xmalloc (sizeof (struct reg_entry)); + (struct reg_entry *) xmalloc (sizeof (struct reg_entry)); char *name = xmalloc (strlen (str) + 1); strcpy (name, str); @@ -5035,7 +6424,7 @@ set_constant_flonums () int i; for (i = 0; i < NUM_FLOAT_VALS; i++) - if (atof_ieee ((char *)fp_const[i], 'x', fp_values[i]) == NULL) + if (atof_ieee ((char *) fp_const[i], 'x', fp_values[i]) == NULL) abort (); } @@ -5044,7 +6433,7 @@ md_begin () { unsigned mach; unsigned int i; - + if ( (arm_ops_hsh = hash_new ()) == NULL || (arm_tops_hsh = hash_new ()) == NULL || (arm_cond_hsh = hash_new ()) == NULL @@ -5052,15 +6441,15 @@ md_begin () || (arm_reg_hsh = hash_new ()) == NULL || (arm_psr_hsh = hash_new ()) == NULL) as_fatal (_("Virtual memory exhausted")); - + for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++) hash_insert (arm_ops_hsh, insns[i].template, (PTR) (insns + i)); for (i = 0; i < sizeof (tinsns) / sizeof (struct thumb_opcode); i++) hash_insert (arm_tops_hsh, tinsns[i].template, (PTR) (tinsns + i)); for (i = 0; i < sizeof (conds) / sizeof (struct asm_cond); i++) hash_insert (arm_cond_hsh, conds[i].template, (PTR) (conds + i)); - for (i = 0; i < sizeof (shift) / sizeof (struct asm_shift); i++) - hash_insert (arm_shift_hsh, shift[i].template, (PTR) (shift + i)); + for (i = 0; i < sizeof (shift_names) / sizeof (struct asm_shift_name); i++) + hash_insert (arm_shift_hsh, shift_names[i].name, (PTR) (shift_names + i)); for (i = 0; i < sizeof (psrs) / sizeof (struct asm_psr); i++) hash_insert (arm_psr_hsh, psrs[i].template, (PTR) (psrs + i)); @@ -5072,7 +6461,7 @@ md_begin () #if defined OBJ_COFF || defined OBJ_ELF { unsigned int flags = 0; - + /* Set the flags in the private structure. */ if (uses_apcs_26) flags |= F_APCS26; if (support_interwork) flags |= F_INTERWORK; @@ -5081,45 +6470,73 @@ md_begin () if ((cpu_variant & FPU_ALL) == FPU_NONE) flags |= F_SOFT_FLOAT; bfd_set_private_flags (stdoutput, flags); + + /* We have run out flags in the COFF header to encode the + status of ATPCS support, so instead we create a dummy, + empty, debug section called .arm.atpcs. */ + if (atpcs) + { + asection * sec; + + sec = bfd_make_section (stdoutput, ".arm.atpcs"); + + if (sec != NULL) + { + bfd_set_section_flags + (stdoutput, sec, SEC_READONLY | SEC_DEBUGGING /* | SEC_HAS_CONTENTS */); + bfd_set_section_size (stdoutput, sec, 0); + bfd_set_section_contents (stdoutput, sec, NULL, 0, 0); + } + } } #endif - + /* Record the CPU type as well. */ switch (cpu_variant & ARM_CPU_MASK) { case ARM_2: mach = bfd_mach_arm_2; break; - + case ARM_3: /* Also ARM_250. */ mach = bfd_mach_arm_2a; break; - + default: case ARM_6 | ARM_3 | ARM_2: /* Actually no CPU type defined. */ mach = bfd_mach_arm_4; break; - + case ARM_7: /* Also ARM_6. */ mach = bfd_mach_arm_3; break; } - + /* Catch special cases. */ if (cpu_variant != (FPU_DEFAULT | CPU_DEFAULT)) { - if (cpu_variant & (ARM_EXT_V5 & ARM_THUMB)) - mach = bfd_mach_arm_5T; + if (cpu_variant & ARM_EXT_XSCALE) + mach = bfd_mach_arm_XScale; + else if (cpu_variant & ARM_EXT_V5E) + mach = bfd_mach_arm_5TE; else if (cpu_variant & ARM_EXT_V5) - mach = bfd_mach_arm_5; - else if (cpu_variant & ARM_THUMB) - mach = bfd_mach_arm_4T; - else if ((cpu_variant & ARM_ARCH_V4) == ARM_ARCH_V4) - mach = bfd_mach_arm_4; - else if (cpu_variant & ARM_LONGMUL) + { + if (cpu_variant & ARM_EXT_THUMB) + mach = bfd_mach_arm_5T; + else + mach = bfd_mach_arm_5; + } + else if (cpu_variant & ARM_EXT_HALFWORD) + { + if (cpu_variant & ARM_EXT_THUMB) + mach = bfd_mach_arm_4T; + else + mach = bfd_mach_arm_4; + } + else if (cpu_variant & ARM_EXT_LONGMUL) mach = bfd_mach_arm_3M; } - + bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach); } @@ -5129,6 +6546,7 @@ md_begin () THE RIGHT THING, whatever it is. Possible values for n are 1 (byte) 2 (short) and 4 (long) Floating numbers are put out as a series of LITTLENUMS (shorts, here at least). */ + void md_number_to_chars (buf, val, n) char * buf; @@ -5141,10 +6559,10 @@ md_number_to_chars (buf, val, n) number_to_chars_littleendian (buf, val, n); } -static valueT +static valueT md_chars_to_number (buf, n) char * buf; - int n; + int n; { valueT result = 0; unsigned char * where = (unsigned char *) buf; @@ -5170,8 +6588,8 @@ md_chars_to_number (buf, n) } /* Turn a string in input_line_pointer into a floating point constant - of type TYPE, and store the appropriate bytes in *litP. The number - of LITTLENUMS emitted is stored in *sizeP . An error message is + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is returned, or NULL on OK. Note that fp constants aren't represent in the normal way on the ARM. @@ -5253,16 +6671,18 @@ md_atof (type, litP, sizeP) return 0; } -/* The knowledge of the PC's pipeline offset is built into the insns themselves. */ +/* The knowledge of the PC's pipeline offset is built into the insns + themselves. */ + long md_pcrel_from (fixP) fixS * fixP; { - if ( fixP->fx_addsy + if (fixP->fx_addsy && S_GET_SEGMENT (fixP->fx_addsy) == undefined_section && fixP->fx_subsy == NULL) return 0; - + if (fixP->fx_pcrel && (fixP->fx_r_type == BFD_RELOC_ARM_THUMB_ADD)) { /* PC relative addressing on the Thumb is slightly odd @@ -5280,7 +6700,8 @@ md_pcrel_from (fixP) #endif } -/* Round up a section size to the appropriate boundary. */ +/* Round up a section size to the appropriate boundary. */ + valueT md_section_align (segment, size) segT segment ATTRIBUTE_UNUSED; @@ -5289,15 +6710,14 @@ md_section_align (segment, size) #ifdef OBJ_ELF return size; #else - /* Round all sects to multiple of 4 */ + /* Round all sects to multiple of 4. */ return (size + 3) & ~3; #endif } -/* Under ELF we need to default _GLOBAL_OFFSET_TABLE. Otherwise - we have no need to default values of symbols. */ +/* Under ELF we need to default _GLOBAL_OFFSET_TABLE. + Otherwise we have no need to default values of symbols. */ -/* ARGSUSED */ symbolS * md_undefined_symbol (name) char * name ATTRIBUTE_UNUSED; @@ -5310,20 +6730,20 @@ md_undefined_symbol (name) { if (symbol_find (name)) as_bad ("GOT already in the symbol table"); - + GOT_symbol = symbol_new (name, undefined_section, - (valueT)0, & zero_address_frag); + (valueT) 0, & zero_address_frag); } - + return GOT_symbol; } #endif - + return 0; } -/* arm_reg_parse () := if it looks like a register, return its token and - advance the pointer. */ +/* arm_reg_parse () := if it looks like a register, return its token and + advance the pointer. */ static int arm_reg_parse (ccp) @@ -5355,7 +6775,7 @@ arm_reg_parse (ccp) *--p = 0; reg = (struct reg_entry *) hash_find (arm_reg_hsh, start); *p = c; - + if (reg) { *ccp = p; @@ -5367,9 +6787,9 @@ arm_reg_parse (ccp) int md_apply_fix3 (fixP, val, seg) - fixS * fixP; - valueT * val; - segT seg; + fixS * fixP; + valueT * val; + segT seg; { offsetT value = * val; offsetT newval; @@ -5382,7 +6802,9 @@ md_apply_fix3 (fixP, val, seg) assert (fixP->fx_r_type < BFD_RELOC_UNUSED); /* Note whether this will delete the relocation. */ -#if 0 /* patch from REarnshaw to JDavis (disabled for the moment, since it doesn't work fully) */ +#if 0 + /* Patch from REarnshaw to JDavis (disabled for the moment, since it + doesn't work fully.) */ if ((fixP->fx_addsy == 0 || symbol_constant_p (fixP->fx_addsy)) && !fixP->fx_pcrel) #else @@ -5401,14 +6823,16 @@ md_apply_fix3 (fixP, val, seg) { if (target_oabi && (fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH - )) + || fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BLX + )) value = 0; else value += md_pcrel_from (fixP); } } - fixP->fx_addnumber = value; /* Remember value for emit_reloc. */ + /* Remember value for emit_reloc. */ + fixP->fx_addnumber = value; switch (fixP->fx_r_type) { @@ -5434,7 +6858,7 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_ADRL_IMMEDIATE: { unsigned int highpart = 0; - unsigned int newinsn = 0xe1a00000; /* nop */ + unsigned int newinsn = 0xe1a00000; /* nop. */ newimm = validate_immediate (value); temp = md_chars_to_number (buf, INSN_SIZE); @@ -5443,26 +6867,30 @@ md_apply_fix3 (fixP, val, seg) if (newimm == (unsigned int) FAIL && (newimm = negate_data_op (& temp, value)) == (unsigned int) FAIL) { - /* No ? OK - try using two ADD instructions to generate the value. */ + /* No ? OK - try using two ADD instructions to generate + the value. */ newimm = validate_immediate_twopart (value, & highpart); - /* Yes - then make sure that the second instruction is also an add. */ + /* Yes - then make sure that the second instruction is + also an add. */ if (newimm != (unsigned int) FAIL) newinsn = temp; /* Still No ? Try using a negated value. */ else if ((newimm = validate_immediate_twopart (- value, & highpart)) != (unsigned int) FAIL) - temp = newinsn = (temp & OPCODE_MASK) | OPCODE_SUB << DATA_OP_SHIFT; + temp = newinsn = (temp & OPCODE_MASK) | OPCODE_SUB << DATA_OP_SHIFT; /* Otherwise - give up. */ else { as_bad_where (fixP->fx_file, fixP->fx_line, - _("Unable to compute ADRL instructions for PC offset of 0x%x"), value); + _("Unable to compute ADRL instructions for PC offset of 0x%lx"), + value); break; } - /* Replace the first operand in the 2nd instruction (which is the PC) - with the destination register. We have already added in the PC in the - first instruction and we do not want to do it again. */ + /* Replace the first operand in the 2nd instruction (which + is the PC) with the destination register. We have + already added in the PC in the first instruction and we + do not want to do it again. */ newinsn &= ~ 0xf0000; newinsn |= ((newinsn & 0x0f000) << 4); } @@ -5477,16 +6905,17 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_OFFSET_IMM: sign = value >= 0; - + if (value < 0) value = - value; - + if (validate_offset_imm (value, 0) == FAIL) - { - as_bad_where (fixP->fx_file, fixP->fx_line, - _("bad immediate value for offset (%ld)"), (long) value); - break; - } + { + as_bad_where (fixP->fx_file, fixP->fx_line, + _("bad immediate value for offset (%ld)"), + (long) value); + break; + } newval = md_chars_to_number (buf, INSN_SIZE); newval &= 0xff7ff000; @@ -5494,23 +6923,23 @@ md_apply_fix3 (fixP, val, seg) md_number_to_chars (buf, newval, INSN_SIZE); break; - case BFD_RELOC_ARM_OFFSET_IMM8: - case BFD_RELOC_ARM_HWLITERAL: + case BFD_RELOC_ARM_OFFSET_IMM8: + case BFD_RELOC_ARM_HWLITERAL: sign = value >= 0; - + if (value < 0) value = - value; if (validate_offset_imm (value, 1) == FAIL) - { - if (fixP->fx_r_type == BFD_RELOC_ARM_HWLITERAL) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("invalid literal constant: pool needs to be closer")); - else - as_bad (_("bad immediate value for half-word offset (%ld)"), + { + if (fixP->fx_r_type == BFD_RELOC_ARM_HWLITERAL) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("invalid literal constant: pool needs to be closer")); + else + as_bad (_("bad immediate value for half-word offset (%ld)"), (long) value); - break; - } + break; + } newval = md_chars_to_number (buf, INSN_SIZE); newval &= 0xff7ff0f0; @@ -5520,13 +6949,13 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_LITERAL: sign = value >= 0; - + if (value < 0) value = - value; if (validate_offset_imm (value, 0) == FAIL) { - as_bad_where (fixP->fx_file, fixP->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("invalid literal constant: pool needs to be closer")); break; } @@ -5540,7 +6969,7 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_SHIFT_IMM: newval = md_chars_to_number (buf, INSN_SIZE); if (((unsigned long) value) > 32 - || (value == 32 + || (value == 32 && (((newval & 0x60) == 0) || (newval & 0x60) == 0x60))) { as_bad_where (fixP->fx_file, fixP->fx_line, @@ -5549,12 +6978,13 @@ md_apply_fix3 (fixP, val, seg) } if (value == 0) - newval &= ~0x60; /* Shifts of zero must be done as lsl */ + /* Shifts of zero must be done as lsl. */ + newval &= ~0x60; else if (value == 32) value = 0; newval &= 0xfffff07f; newval |= (value & 0x1f) << 7; - md_number_to_chars (buf, newval , INSN_SIZE); + md_number_to_chars (buf, newval, INSN_SIZE); break; case BFD_RELOC_ARM_SWI: @@ -5570,11 +7000,11 @@ md_apply_fix3 (fixP, val, seg) else { if (((unsigned long) value) > 0x00ffffff) - as_bad_where (fixP->fx_file, fixP->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("Invalid swi expression")); newval = md_chars_to_number (buf, INSN_SIZE) & 0xff000000; newval |= value; - md_number_to_chars (buf, newval , INSN_SIZE); + md_number_to_chars (buf, newval, INSN_SIZE); } break; @@ -5601,8 +7031,8 @@ md_apply_fix3 (fixP, val, seg) instruction, in a 24 bit, signed field. Thus we need to check that none of the top 8 bits of the shifted value (top 7 bits of the unshifted, unsigned value) are set, or that they are all set. */ - if ((value & 0xfe000000UL) != 0 - && ((value & 0xfe000000UL) != 0xfe000000UL)) + if ((value & ~ ((offsetT) 0x1ffffff)) != 0 + && ((value & ~ ((offsetT) 0x1ffffff)) != ~ ((offsetT) 0x1ffffff))) { #ifdef OBJ_ELF /* Normally we would be stuck at this point, since we cannot store @@ -5611,7 +7041,7 @@ md_apply_fix3 (fixP, val, seg) that the destination of the branch is in the same section as the branch instruciton itself, then we can compute the relocation for ourselves and not have to bother the linker with it. - + FIXME: The tests for OBJ_ELF and ! target_oabi are only here because I have not worked out how to do this for OBJ_COFF or target_oabi. */ @@ -5623,13 +7053,14 @@ md_apply_fix3 (fixP, val, seg) /* Get pc relative value to go into the branch. */ value = * val; - /* Permit a backward branch provided that enough bits are set. - Allow a forwards branch, provided that enough bits are clear. */ - if ((value & 0xfe000000UL) == 0xfe000000UL - || (value & 0xfe000000UL) == 0) + /* Permit a backward branch provided that enough bits + are set. Allow a forwards branch, provided that + enough bits are clear. */ + if ( (value & ~ ((offsetT) 0x1ffffff)) == ~ ((offsetT) 0x1ffffff) + || (value & ~ ((offsetT) 0x1ffffff)) == 0) fixP->fx_done = 1; } - + if (! fixP->fx_done) #endif as_bad_where (fixP->fx_file, fixP->fx_line, @@ -5638,71 +7069,88 @@ md_apply_fix3 (fixP, val, seg) value >>= 2; value += SEXT24 (newval); - - if ((value & 0xff000000UL) != 0 - && ((value & 0xff000000UL) != 0xff000000UL)) + + if ( (value & ~ ((offsetT) 0xffffff)) != 0 + && ((value & ~ ((offsetT) 0xffffff)) != ~ ((offsetT) 0xffffff))) as_bad_where (fixP->fx_file, fixP->fx_line, _("out of range branch")); - + newval = (value & 0x00ffffff) | (newval & 0xff000000); md_number_to_chars (buf, newval, INSN_SIZE); break; + case BFD_RELOC_ARM_PCREL_BLX: + { + offsetT hbit; + newval = md_chars_to_number (buf, INSN_SIZE); + +#ifdef OBJ_ELF + if (! target_oabi) + value = fixP->fx_offset; +#endif + hbit = (value >> 1) & 1; + value = (value >> 2) & 0x00ffffff; + value = (value + (newval & 0x00ffffff)) & 0x00ffffff; + newval = value | (newval & 0xfe000000) | (hbit << 24); + md_number_to_chars (buf, newval, INSN_SIZE); + } + break; - case BFD_RELOC_THUMB_PCREL_BRANCH9: /* conditional branch */ + case BFD_RELOC_THUMB_PCREL_BRANCH9: /* Conditional branch. */ newval = md_chars_to_number (buf, THUMB_SIZE); { - addressT diff = (newval & 0xff) << 1; - if (diff & 0x100) - diff |= ~0xff; - - value += diff; - if ((value & ~0xff) && ((value & ~0xff) != ~0xff)) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Branch out of range")); - newval = (newval & 0xff00) | ((value & 0x1ff) >> 1); + addressT diff = (newval & 0xff) << 1; + if (diff & 0x100) + diff |= ~0xff; + + value += diff; + if ((value & ~0xff) && ((value & ~0xff) != ~0xff)) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Branch out of range")); + newval = (newval & 0xff00) | ((value & 0x1ff) >> 1); } md_number_to_chars (buf, newval, THUMB_SIZE); break; - case BFD_RELOC_THUMB_PCREL_BRANCH12: /* unconditional branch */ + case BFD_RELOC_THUMB_PCREL_BRANCH12: /* Unconditional branch. */ newval = md_chars_to_number (buf, THUMB_SIZE); { - addressT diff = (newval & 0x7ff) << 1; - if (diff & 0x800) - diff |= ~0x7ff; - - value += diff; - if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff)) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Branch out of range")); - newval = (newval & 0xf800) | ((value & 0xfff) >> 1); + addressT diff = (newval & 0x7ff) << 1; + if (diff & 0x800) + diff |= ~0x7ff; + + value += diff; + if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff)) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Branch out of range")); + newval = (newval & 0xf800) | ((value & 0xfff) >> 1); } md_number_to_chars (buf, newval, THUMB_SIZE); break; + case BFD_RELOC_THUMB_PCREL_BLX: case BFD_RELOC_THUMB_PCREL_BRANCH23: { - offsetT newval2; - addressT diff; + offsetT newval2; + addressT diff; newval = md_chars_to_number (buf, THUMB_SIZE); - newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE); - diff = ((newval & 0x7ff) << 12) | ((newval2 & 0x7ff) << 1); - if (diff & 0x400000) + newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE); + diff = ((newval & 0x7ff) << 12) | ((newval2 & 0x7ff) << 1); + if (diff & 0x400000) diff |= ~0x3fffff; #ifdef OBJ_ELF value = fixP->fx_offset; #endif - value += diff; - if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff)) + value += diff; + if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff)) as_bad_where (fixP->fx_file, fixP->fx_line, _("Branch with link out of range")); - newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12); - newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1); - md_number_to_chars (buf, newval, THUMB_SIZE); - md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE); + newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12); + newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1); + md_number_to_chars (buf, newval, THUMB_SIZE); + md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE); } break; @@ -5711,10 +7159,10 @@ md_apply_fix3 (fixP, val, seg) md_number_to_chars (buf, value, 1); #ifdef OBJ_ELF else if (!target_oabi) - { - value = fixP->fx_offset; - md_number_to_chars (buf, value, 1); - } + { + value = fixP->fx_offset; + md_number_to_chars (buf, value, 1); + } #endif break; @@ -5723,18 +7171,18 @@ md_apply_fix3 (fixP, val, seg) md_number_to_chars (buf, value, 2); #ifdef OBJ_ELF else if (!target_oabi) - { - value = fixP->fx_offset; - md_number_to_chars (buf, value, 2); - } + { + value = fixP->fx_offset; + md_number_to_chars (buf, value, 2); + } #endif break; #ifdef OBJ_ELF case BFD_RELOC_ARM_GOT32: case BFD_RELOC_ARM_GOTOFF: - md_number_to_chars (buf, 0, 4); - break; + md_number_to_chars (buf, 0, 4); + break; #endif case BFD_RELOC_RVA: @@ -5743,23 +7191,23 @@ md_apply_fix3 (fixP, val, seg) md_number_to_chars (buf, value, 4); #ifdef OBJ_ELF else if (!target_oabi) - { - value = fixP->fx_offset; - md_number_to_chars (buf, value, 4); - } + { + value = fixP->fx_offset; + md_number_to_chars (buf, value, 4); + } #endif break; #ifdef OBJ_ELF case BFD_RELOC_ARM_PLT32: - /* It appears the instruction is fully prepared at this point. */ + /* It appears the instruction is fully prepared at this point. */ break; #endif case BFD_RELOC_ARM_GOTPC: md_number_to_chars (buf, value, 4); break; - + case BFD_RELOC_ARM_CP_OFF_IMM: sign = value >= 0; if (value < -1023 || value > 1023 || (value & 3)) @@ -5768,17 +7216,18 @@ md_apply_fix3 (fixP, val, seg) if (value < 0) value = -value; newval = md_chars_to_number (buf, INSN_SIZE) & 0xff7fff00; - newval |= (value >> 2) | (sign ? INDEX_UP : 0); - md_number_to_chars (buf, newval , INSN_SIZE); + newval |= (value >> 2) | (sign ? INDEX_UP : 0); + md_number_to_chars (buf, newval, INSN_SIZE); break; case BFD_RELOC_ARM_THUMB_OFFSET: newval = md_chars_to_number (buf, THUMB_SIZE); - /* Exactly what ranges, and where the offset is inserted depends on - the type of instruction, we can establish this from the top 4 bits */ + /* Exactly what ranges, and where the offset is inserted depends + on the type of instruction, we can establish this from the + top 4 bits. */ switch (newval >> 12) { - case 4: /* PC load */ + case 4: /* PC load. */ /* Thumb PC loads are somewhat odd, bit 1 of the PC is forced to zero for these loads, so we will need to round up the offset if the instruction address is not word @@ -5788,42 +7237,43 @@ md_apply_fix3 (fixP, val, seg) if ((fixP->fx_frag->fr_address + fixP->fx_where + value) & 3) as_bad_where (fixP->fx_file, fixP->fx_line, _("Invalid offset, target not word aligned (0x%08X)"), - (unsigned int)(fixP->fx_frag->fr_address + fixP->fx_where + value)); + (unsigned int) (fixP->fx_frag->fr_address + + fixP->fx_where + value)); if ((value + 2) & ~0x3fe) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); + _("Invalid offset, value too big (0x%08lX)"), value); - /* Round up, since pc will be rounded down. */ + /* Round up, since pc will be rounded down. */ newval |= (value + 2) >> 2; break; - case 9: /* SP load/store */ + case 9: /* SP load/store. */ if (value & ~0x3fc) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); + _("Invalid offset, value too big (0x%08lX)"), value); newval |= value >> 2; break; - case 6: /* Word load/store */ + case 6: /* Word load/store. */ if (value & ~0x7c) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); - newval |= value << 4; /* 6 - 2 */ + _("Invalid offset, value too big (0x%08lX)"), value); + newval |= value << 4; /* 6 - 2. */ break; - case 7: /* Byte load/store */ + case 7: /* Byte load/store. */ if (value & ~0x1f) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); + _("Invalid offset, value too big (0x%08lX)"), value); newval |= value << 6; break; - case 8: /* Halfword load/store */ + case 8: /* Halfword load/store. */ if (value & ~0x3e) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); - newval |= value << 5; /* 6 - 1 */ + _("Invalid offset, value too big (0x%08lX)"), value); + newval |= value << 5; /* 6 - 1. */ break; default: @@ -5838,89 +7288,91 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_THUMB_ADD: /* This is a complicated relocation, since we use it for all of the following immediate relocations: - 3bit ADD/SUB - 8bit ADD/SUB - 9bit ADD/SUB SP word-aligned - 10bit ADD PC/SP word-aligned + + 3bit ADD/SUB + 8bit ADD/SUB + 9bit ADD/SUB SP word-aligned + 10bit ADD PC/SP word-aligned The type of instruction being processed is encoded in the instruction field: - 0x8000 SUB - 0x00F0 Rd - 0x000F Rs + + 0x8000 SUB + 0x00F0 Rd + 0x000F Rs */ newval = md_chars_to_number (buf, THUMB_SIZE); { - int rd = (newval >> 4) & 0xf; - int rs = newval & 0xf; - int subtract = newval & 0x8000; - - if (rd == REG_SP) - { - if (value & ~0x1fc) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid immediate for stack address calculation")); - newval = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST; - newval |= value >> 2; - } - else if (rs == REG_PC || rs == REG_SP) - { - if (subtract || - value & ~0x3fc) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid immediate for address calculation (value = 0x%08lX)"), + int rd = (newval >> 4) & 0xf; + int rs = newval & 0xf; + int subtract = newval & 0x8000; + + if (rd == REG_SP) + { + if (value & ~0x1fc) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid immediate for stack address calculation")); + newval = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST; + newval |= value >> 2; + } + else if (rs == REG_PC || rs == REG_SP) + { + if (subtract || + value & ~0x3fc) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid immediate for address calculation (value = 0x%08lX)"), (unsigned long) value); - newval = (rs == REG_PC ? T_OPCODE_ADD_PC : T_OPCODE_ADD_SP); - newval |= rd << 8; - newval |= value >> 2; - } - else if (rs == rd) - { - if (value & ~0xff) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid 8bit immediate")); - newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8; - newval |= (rd << 8) | value; - } - else - { - if (value & ~0x7) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid 3bit immediate")); - newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3; - newval |= rd | (rs << 3) | (value << 6); - } + newval = (rs == REG_PC ? T_OPCODE_ADD_PC : T_OPCODE_ADD_SP); + newval |= rd << 8; + newval |= value >> 2; + } + else if (rs == rd) + { + if (value & ~0xff) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid 8bit immediate")); + newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8; + newval |= (rd << 8) | value; + } + else + { + if (value & ~0x7) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid 3bit immediate")); + newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3; + newval |= rd | (rs << 3) | (value << 6); + } } - md_number_to_chars (buf, newval , THUMB_SIZE); + md_number_to_chars (buf, newval, THUMB_SIZE); break; case BFD_RELOC_ARM_THUMB_IMM: newval = md_chars_to_number (buf, THUMB_SIZE); switch (newval >> 11) - { - case 0x04: /* 8bit immediate MOV */ - case 0x05: /* 8bit immediate CMP */ - if (value < 0 || value > 255) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid immediate: %ld is too large"), + { + case 0x04: /* 8bit immediate MOV. */ + case 0x05: /* 8bit immediate CMP. */ + if (value < 0 || value > 255) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid immediate: %ld is too large"), (long) value); - newval |= value; - break; + newval |= value; + break; - default: - abort (); - } - md_number_to_chars (buf, newval , THUMB_SIZE); + default: + abort (); + } + md_number_to_chars (buf, newval, THUMB_SIZE); break; case BFD_RELOC_ARM_THUMB_SHIFT: - /* 5bit shift value (0..31) */ + /* 5bit shift value (0..31). */ if (value < 0 || value > 31) as_bad_where (fixP->fx_file, fixP->fx_line, _("Illegal Thumb shift value: %ld"), (long) value); newval = md_chars_to_number (buf, THUMB_SIZE) & 0xf03f; newval |= value << 6; - md_number_to_chars (buf, newval , THUMB_SIZE); + md_number_to_chars (buf, newval, THUMB_SIZE); break; case BFD_RELOC_VTABLE_INHERIT: @@ -5939,6 +7391,7 @@ md_apply_fix3 (fixP, val, seg) /* Translate internal representation of relocation info to BFD target format. */ + arelent * tc_gen_reloc (section, fixp) asection * section ATTRIBUTE_UNUSED; @@ -5987,10 +7440,12 @@ tc_gen_reloc (section, fixp) } case BFD_RELOC_ARM_PCREL_BRANCH: - case BFD_RELOC_RVA: + case BFD_RELOC_ARM_PCREL_BLX: + case BFD_RELOC_RVA: case BFD_RELOC_THUMB_PCREL_BRANCH9: case BFD_RELOC_THUMB_PCREL_BRANCH12: case BFD_RELOC_THUMB_PCREL_BRANCH23: + case BFD_RELOC_THUMB_PCREL_BLX: case BFD_RELOC_VTABLE_ENTRY: case BFD_RELOC_VTABLE_INHERIT: code = fixp->fx_r_type; @@ -5999,7 +7454,7 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_ARM_LITERAL: case BFD_RELOC_ARM_HWLITERAL: /* If this is called then the a literal has been referenced across - a section boundary - possibly due to an implicit dump */ + a section boundary - possibly due to an implicit dump. */ as_bad_where (fixp->fx_file, fixp->fx_line, _("Literal referenced across section boundary (Implicit dump?)")); return NULL; @@ -6008,8 +7463,8 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_ARM_GOT32: case BFD_RELOC_ARM_GOTOFF: case BFD_RELOC_ARM_PLT32: - code = fixp->fx_r_type; - break; + code = fixp->fx_r_type; + break; #endif case BFD_RELOC_ARM_IMMEDIATE: @@ -6020,8 +7475,7 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_ARM_ADRL_IMMEDIATE: as_bad_where (fixp->fx_file, fixp->fx_line, - _("ADRL used for a symbol not defined in the same file"), - fixp->fx_r_type); + _("ADRL used for a symbol not defined in the same file")); return NULL; case BFD_RELOC_ARM_OFFSET_IMM: @@ -6033,6 +7487,7 @@ tc_gen_reloc (section, fixp) default: { char * type; + switch (fixp->fx_r_type) { case BFD_RELOC_ARM_IMMEDIATE: type = "IMMEDIATE"; break; @@ -6049,22 +7504,22 @@ tc_gen_reloc (section, fixp) default: type = _("<unknown>"); break; } as_bad_where (fixp->fx_file, fixp->fx_line, - _("Can not represent %s relocation in this object file format (%d)"), - type, fixp->fx_pcrel); + _("Cannot represent %s relocation in this object file format"), + type); return NULL; } } #ifdef OBJ_ELF - if (code == BFD_RELOC_32_PCREL - && GOT_symbol - && fixp->fx_addsy == GOT_symbol) - { - code = BFD_RELOC_ARM_GOTPC; - reloc->addend = fixp->fx_offset = reloc->address; - } + if (code == BFD_RELOC_32_PCREL + && GOT_symbol + && fixp->fx_addsy == GOT_symbol) + { + code = BFD_RELOC_ARM_GOTPC; + reloc->addend = fixp->fx_offset = reloc->address; + } #endif - + reloc->howto = bfd_reloc_type_lookup (stdoutput, code); if (reloc->howto == NULL) @@ -6075,10 +7530,10 @@ tc_gen_reloc (section, fixp) return NULL; } - /* HACK: Since arm ELF uses Rel instead of Rela, encode the - vtable entry to be used in the relocation's section offset. */ - if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) - reloc->address = fixp->fx_offset; + /* HACK: Since arm ELF uses Rel instead of Rela, encode the + vtable entry to be used in the relocation's section offset. */ + if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) + reloc->address = fixp->fx_offset; return reloc; } @@ -6096,7 +7551,7 @@ static void output_inst PARAMS ((void)) { char * to = NULL; - + if (inst.error) { as_bad (inst.error); @@ -6104,7 +7559,7 @@ output_inst PARAMS ((void)) } to = frag_more (inst.size); - + if (thumb_mode && (inst.size > THUMB_SIZE)) { assert (inst.size == (2 * THUMB_SIZE)); @@ -6125,7 +7580,9 @@ output_inst PARAMS ((void)) inst.size, & inst.reloc.exp, inst.reloc.pc_rel, inst.reloc.type); - return; +#ifdef OBJ_ELF + dwarf2_emit_insn (inst.size); +#endif } void @@ -6138,9 +7595,11 @@ md_assemble (str) char * start; /* Align the instruction. - This may not be the right thing to do but ... */ - /* arm_align (2, 0); */ - listing_prev_line (); /* Defined in listing.h */ + This may not be the right thing to do but ... */ +#if 0 + arm_align (2, 0); +#endif + listing_prev_line (); /* Defined in listing.h. */ /* Align the previous label if needed. */ if (last_label_seen != NULL) @@ -6154,13 +7613,13 @@ md_assemble (str) inst.reloc.type = BFD_RELOC_NONE; skip_whitespace (str); - + /* Scan up to the end of the op-code, which must end in white space or end of string. */ for (start = p = str; *p != '\0'; p++) if (*p == ' ') break; - + if (p == str) { as_bad (_("No operator -- statement `%s'\n"), str); @@ -6175,19 +7634,19 @@ md_assemble (str) *p = '\0'; opcode = (CONST struct thumb_opcode *) hash_find (arm_tops_hsh, str); *p = c; - + if (opcode) { /* Check that this instruction is supported for this CPU. */ if (thumb_mode == 1 && (opcode->variants & cpu_variant) == 0) - { - as_bad (_("selected processor does not support this opcode")); - return; - } + { + as_bad (_("selected processor does not support this opcode")); + return; + } inst.instruction = opcode->value; inst.size = opcode->size; - (*opcode->parms)(p); + (*opcode->parms) (p); output_inst (); return; } @@ -6198,18 +7657,20 @@ md_assemble (str) unsigned long cond_code; inst.size = INSN_SIZE; - /* p now points to the end of the opcode, probably white space, but we + /* P now points to the end of the opcode, probably white space, but we have to break the opcode up in case it contains condionals and flags; keep trying with progressively smaller basic instructions until one matches, or we run out of opcode. */ q = (p - str > LONGEST_INST) ? str + LONGEST_INST : p; + for (; q != str; q--) { c = *q; *q = '\0'; + opcode = (CONST struct asm_opcode *) hash_find (arm_ops_hsh, str); *q = c; - + if (opcode && opcode->template) { unsigned long flag_bits = 0; @@ -6224,24 +7685,25 @@ md_assemble (str) { if (opcode->comp_suffix) { - if (*opcode->comp_suffix != '\0') - as_bad (_("Opcode `%s' must have suffix from list: <%s>"), - str, opcode->comp_suffix); - else - /* Not a conditional instruction. */ - (*opcode->parms)(q, 0); + if (*opcode->comp_suffix != '\0') + as_bad (_("Opcode `%s' must have suffix from list: <%s>"), + str, opcode->comp_suffix); + else + /* Not a conditional instruction. */ + (*opcode->parms) (q, 0); } else { - /* A conditional instruction with default condition. */ + /* A conditional instruction with default condition. */ inst.instruction |= COND_ALWAYS; - (*opcode->parms)(q, 0); + (*opcode->parms) (q, 0); } output_inst (); return; } - /* Not just a simple opcode. Check if extra is a conditional. */ + /* Not just a simple opcode. Check if extra is a + conditional. */ r = q; if (p - r >= 2) { @@ -6266,23 +7728,22 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); else cond_code = COND_ALWAYS; - /* Apply the conditional, or complain it's not allowed. */ + /* Apply the conditional, or complain it's not allowed. */ if (opcode->comp_suffix && *opcode->comp_suffix == '\0') { - /* Instruction isn't conditional */ - if (cond_code != COND_ALWAYS) - { - as_bad (_("Opcode `%s' is unconditional\n"), str); - return; - } + /* Instruction isn't conditional. */ + if (cond_code != COND_ALWAYS) + { + as_bad (_("Opcode `%s' is unconditional\n"), str); + return; + } } else - /* Instruction is conditional: set the condition into it. */ - inst.instruction |= cond_code; - + /* Instruction is conditional: set the condition into it. */ + inst.instruction |= cond_code; - /* If there is a compulsory suffix, it should come here, before - any optional flags. */ + /* If there is a compulsory suffix, it should come here + before any optional flags. */ if (opcode->comp_suffix && *opcode->comp_suffix != '\0') { CONST char *s = opcode->comp_suffix; @@ -6297,8 +7758,8 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); if (*s == '\0') { - as_bad (_("Opcode `%s' must have suffix from <%s>\n"), str, - opcode->comp_suffix); + as_bad (_("Opcode `%s' must have suffix from <%s>\n"), + str, opcode->comp_suffix); return; } @@ -6347,26 +7808,31 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); } /* It wasn't an instruction, but it might be a register alias of the form - alias .req reg */ + alias .req reg. */ q = p; skip_whitespace (q); c = *p; *p = '\0'; - + if (*q && !strncmp (q, ".req ", 4)) { int reg; - char * copy_of_str = str; + char * copy_of_str; char * r; - + +#ifdef IGNORE_OPCODE_CASE + str = original_case_string; +#endif + copy_of_str = str; + q += 4; skip_whitespace (q); for (r = q; *r != '\0'; r++) if (*r == ' ') break; - + if (r != q) { int regnum; @@ -6377,7 +7843,7 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); *r = d; reg = arm_reg_parse (& str); - + if (reg == FAIL) { if (regnum != FAIL) @@ -6389,8 +7855,8 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); { if (reg != regnum) as_warn (_("ignoring redefinition of register alias '%s'"), - copy_of_str ); - + copy_of_str); + /* Do not warn about redefinitions to the same alias. */ } else @@ -6399,7 +7865,7 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); } else as_warn (_("ignoring incomplete .req pseuso op")); - + *p = c; return; } @@ -6408,38 +7874,39 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); as_bad (_("bad instruction `%s'"), start); } -/* - * md_parse_option - * Invocation line includes a switch not recognized by the base assembler. - * See if it's a processor-specific option. These are: - * Cpu variants, the arm part is optional: - * -m[arm]1 Currently not supported. - * -m[arm]2, -m[arm]250 Arm 2 and Arm 250 processor - * -m[arm]3 Arm 3 processor - * -m[arm]6[xx], Arm 6 processors - * -m[arm]7[xx][t][[d]m] Arm 7 processors - * -m[arm]8[10] Arm 8 processors - * -m[arm]9[20][tdmi] Arm 9 processors - * -mstrongarm[110[0]] StrongARM processors - * -m[arm]v[2345[t]] Arm architectures - * -mall All (except the ARM1) - * FP variants: - * -mfpa10, -mfpa11 FPA10 and 11 co-processor instructions - * -mfpe-old (No float load/store multiples) - * -mno-fpu Disable all floating point instructions - * Run-time endian selection: - * -EB big endian cpu - * -EL little endian cpu - * ARM Procedure Calling Standard: - * -mapcs-32 32 bit APCS - * -mapcs-26 26 bit APCS - * -mapcs-float Pass floats in float regs - * -mapcs-reentrant Position independent code - * -mthumb-interwork Code supports Arm/Thumb interworking - * -moabi Old ELF ABI - */ +/* md_parse_option + Invocation line includes a switch not recognized by the base assembler. + See if it's a processor-specific option. These are: + Cpu variants, the arm part is optional: + -m[arm]1 Currently not supported. + -m[arm]2, -m[arm]250 Arm 2 and Arm 250 processor + -m[arm]3 Arm 3 processor + -m[arm]6[xx], Arm 6 processors + -m[arm]7[xx][t][[d]m] Arm 7 processors + -m[arm]8[10] Arm 8 processors + -m[arm]9[20][tdmi] Arm 9 processors + -mstrongarm[110[0]] StrongARM processors + -mxscale XScale processors + -m[arm]v[2345[t[e]]] Arm architectures + -mall All (except the ARM1) + FP variants: + -mfpa10, -mfpa11 FPA10 and 11 co-processor instructions + -mfpe-old (No float load/store multiples) + -mno-fpu Disable all floating point instructions + Run-time endian selection: + -EB big endian cpu + -EL little endian cpu + ARM Procedure Calling Standard: + -mapcs-32 32 bit APCS + -mapcs-26 26 bit APCS + -mapcs-float Pass floats in float regs + -mapcs-reentrant Position independent code + -mthumb-interwork Code supports Arm/Thumb interworking + -matpcs ARM/Thumb Procedure Call Standard + -moabi Old ELF ABI */ CONST char * md_shortopts = "m:k"; + struct option md_longopts[] = { #ifdef ARM_BI_ENDIAN @@ -6454,6 +7921,7 @@ struct option md_longopts[] = #endif {NULL, no_argument, NULL, 0} }; + size_t md_longopts_size = sizeof (md_longopts); int @@ -6494,31 +7962,31 @@ md_parse_option (c, arg) break; #ifdef OBJ_ELF - case 'o': - if (streq (str, "oabi")) - target_oabi = true; - break; + case 'o': + if (streq (str, "oabi")) + target_oabi = true; + break; #endif - - case 't': - /* Limit assembler to generating only Thumb instructions: */ - if (streq (str, "thumb")) - { - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_THUMB; - cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_NONE; - thumb_mode = 1; - } - else if (streq (str, "thumb-interwork")) - { - if ((cpu_variant & ARM_THUMB) == 0) + + case 't': + /* Limit assembler to generating only Thumb instructions: */ + if (streq (str, "thumb")) + { + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_EXT_THUMB; + cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_NONE; + thumb_mode = 1; + } + else if (streq (str, "thumb-interwork")) + { + if ((cpu_variant & ARM_EXT_THUMB) == 0) cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4T; #if defined OBJ_COFF || defined OBJ_ELF - support_interwork = true; + support_interwork = true; #endif - } - else + } + else goto bad; - break; + break; default: if (streq (str, "all")) @@ -6533,7 +8001,7 @@ md_parse_option (c, arg) to us, so we must parse them here. */ str += 5; - + if (streq (str, "32")) { uses_apcs_26 = false; @@ -6573,16 +8041,22 @@ md_parse_option (c, arg) { /* Reentrant code has been generated. This does affect linking, since there is no point in linking reentrant/ - position independent code with absolute position code. */ + position independent code with absolute position code. */ pic_code = true; return 1; } - + as_bad (_("Unrecognised APCS switch -m%s"), arg); return 0; - } + } + + if (! strcmp (str, "atpcs")) + { + atpcs = true; + return 1; + } #endif - /* Strip off optional "arm" */ + /* Strip off optional "arm". */ if (! strncmp (str, "arm", 3)) str += 3; @@ -6627,7 +8101,8 @@ md_parse_option (c, arg) break; case '7': - switch (strtol (str, & str, 10)) /* Eat the processor name */ + /* Eat the processor name. */ + switch (strtol (str, & str, 10)) { case 7: case 70: @@ -6640,75 +8115,82 @@ md_parse_option (c, arg) default: goto bad; } - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7; - for (; *str; str++) - { - switch (* str) - { - case 't': - cpu_variant |= (ARM_THUMB | ARM_ARCH_V4); - break; - - case 'm': - cpu_variant |= ARM_LONGMUL; - break; - - case 'f': /* fe => fp enabled cpu. */ - if (str[1] == 'e') - ++ str; - else + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7; + for (; *str; str++) + { + switch (*str) + { + case 't': + cpu_variant |= ARM_ARCH_V4T; + break; + + case 'm': + cpu_variant |= ARM_EXT_LONGMUL; + break; + + case 'f': /* fe => fp enabled cpu. */ + if (str[1] == 'e') + ++ str; + else + goto bad; + + case 'c': /* Left over from 710c processor name. */ + case 'd': /* Debug. */ + case 'i': /* Embedded ICE. */ + /* Included for completeness in ARM processor naming. */ + break; + + default: goto bad; - - case 'c': /* Left over from 710c processor name. */ - case 'd': /* Debug */ - case 'i': /* Embedded ICE */ - /* Included for completeness in ARM processor naming. */ - break; - - default: - goto bad; - } - } + } + } break; case '8': if (streq (str, "8") || streq (str, "810")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_8 | ARM_ARCH_V4 | ARM_LONGMUL; + | ARM_8 | ARM_ARCH_V4; else goto bad; break; - + case '9': if (streq (str, "9")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB; + | ARM_9 | ARM_ARCH_V4T; else if (streq (str, "920")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL; + | ARM_9 | ARM_ARCH_V4; else if (streq (str, "920t")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB; + | ARM_9 | ARM_ARCH_V4T; else if (streq (str, "9tdmi")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB; + | ARM_9 | ARM_ARCH_V4T; else goto bad; break; - case 's': if (streq (str, "strongarm") || streq (str, "strongarm110") || streq (str, "strongarm1100")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_8 | ARM_ARCH_V4 | ARM_LONGMUL; + | ARM_8 | ARM_ARCH_V4; else goto bad; break; - + + case 'x': + if (streq (str, "xscale")) + cpu_variant = ARM_9 | ARM_ARCH_XSCALE; + else + goto bad; + break; + case 'v': - /* Select variant based on architecture rather than processor. */ + /* Select variant based on architecture rather than + processor. */ switch (*++str) { case '2': @@ -6725,26 +8207,26 @@ md_parse_option (c, arg) break; } break; - + case '3': - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7; - + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7; + switch (*++str) { - case 'm': cpu_variant |= ARM_LONGMUL; break; + case 'm': cpu_variant |= ARM_EXT_LONGMUL; break; case 0: break; default: as_bad (_("Invalid architecture variant -m%s"), arg); break; } break; - + case '4': - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4; - + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7 | ARM_ARCH_V4; + switch (*++str) { - case 't': cpu_variant |= ARM_THUMB; break; + case 't': cpu_variant |= ARM_EXT_THUMB; break; case 0: break; default: as_bad (_("Invalid architecture variant -m%s"), arg); @@ -6753,10 +8235,10 @@ md_parse_option (c, arg) break; case '5': - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V5; + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_9 | ARM_ARCH_V5; switch (*++str) { - case 't': cpu_variant |= ARM_THUMB; break; + case 't': cpu_variant |= ARM_EXT_THUMB; break; case 'e': cpu_variant |= ARM_EXT_V5E; break; case 0: break; default: @@ -6764,13 +8246,13 @@ md_parse_option (c, arg) break; } break; - + default: as_bad (_("Invalid architecture variant -m%s"), arg); break; } break; - + default: bad: as_bad (_("Invalid processor variant -m%s"), arg); @@ -6784,12 +8266,12 @@ md_parse_option (c, arg) pic_code = 1; break; #endif - + default: return 0; } - return 1; + return 1; } void @@ -6810,9 +8292,10 @@ md_show_usage (fp) #if defined OBJ_COFF || defined OBJ_ELF fprintf (fp, _("\ -mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to use\n\ + -matpcs use ARM/Thumb Procedure Calling Standard\n\ -mapcs-float floating point args are passed in FP regs\n\ -mapcs-reentrant the code is position independent/reentrant\n")); - #endif +#endif #ifdef OBJ_ELF fprintf (fp, _("\ -moabi support the old ELF ABI\n")); @@ -6840,8 +8323,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc) int pc_rel; int reloc; { - fixS * new_fix; - arm_fix_data * arm_data; + fixS * new_fix; + arm_fix_data * arm_data; switch (exp->X_op) { @@ -6858,7 +8341,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc) break; } - /* Mark whether the fix is to a THUMB instruction, or an ARM instruction */ + /* Mark whether the fix is to a THUMB instruction, or an ARM + instruction. */ arm_data = (arm_fix_data *) obstack_alloc (& notes, sizeof (arm_fix_data)); new_fix->tc_fix_data = (PTR) arm_data; arm_data->thumb_mode = thumb_mode; @@ -6866,8 +8350,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc) return; } - /* This fix_new is called by cons via TC_CONS_FIX_NEW. */ + void cons_fix_new_arm (frag, where, size, exp) fragS * frag; @@ -6877,10 +8361,10 @@ cons_fix_new_arm (frag, where, size, exp) { bfd_reloc_code_real_type type; int pcrel = 0; - + /* Pick a reloc. FIXME: @@ Should look at CPU word size. */ - switch (size) + switch (size) { case 1: type = BFD_RELOC_8; @@ -6896,20 +8380,22 @@ cons_fix_new_arm (frag, where, size, exp) type = BFD_RELOC_64; break; } - + fix_new_exp (frag, where, (int) size, exp, pcrel, type); } /* A good place to do this, although this was probably not intended for this kind of use. We need to dump the literal pool before references are made to a null symbol pointer. */ + void arm_cleanup () { if (current_poolP == NULL) return; - - subseg_set (text_section, 0); /* Put it at the end of text section. */ + + /* Put it at the end of text section. */ + subseg_set (text_section, 0); s_ltorg (0); listing_prev_line (); } @@ -6925,13 +8411,13 @@ arm_frob_label (sym) symbolS * sym; { last_label_seen = sym; - + ARM_SET_THUMB (sym, thumb_mode); - + #if defined OBJ_COFF || defined OBJ_ELF ARM_SET_INTERWORK (sym, support_interwork); #endif - + if (label_is_thumb_function_name) { /* When the address of a Thumb function is taken the bottom @@ -6940,7 +8426,7 @@ arm_frob_label (sym) correctly. */ THUMB_SET_FUNC (sym, 1); - + label_is_thumb_function_name = false; } } @@ -6957,12 +8443,12 @@ arm_adjust_symtab () for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym)) { if (ARM_IS_THUMB (sym)) - { + { if (THUMB_IS_FUNC (sym)) { /* Mark the symbol as a Thumb function. */ if ( S_GET_STORAGE_CLASS (sym) == C_STAT - || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */ + || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */ S_SET_STORAGE_CLASS (sym, C_THUMBSTATFUNC); else if (S_GET_STORAGE_CLASS (sym) == C_EXT) @@ -6972,38 +8458,39 @@ arm_adjust_symtab () S_GET_NAME (sym), S_GET_STORAGE_CLASS (sym)); } else switch (S_GET_STORAGE_CLASS (sym)) - { - case C_EXT: - S_SET_STORAGE_CLASS (sym, C_THUMBEXT); - break; - case C_STAT: - S_SET_STORAGE_CLASS (sym, C_THUMBSTAT); - break; - case C_LABEL: - S_SET_STORAGE_CLASS (sym, C_THUMBLABEL); - break; - default: /* do nothing */ - break; - } - } + { + case C_EXT: + S_SET_STORAGE_CLASS (sym, C_THUMBEXT); + break; + case C_STAT: + S_SET_STORAGE_CLASS (sym, C_THUMBSTAT); + break; + case C_LABEL: + S_SET_STORAGE_CLASS (sym, C_THUMBLABEL); + break; + default: + /* Do nothing. */ + break; + } + } if (ARM_IS_INTERWORK (sym)) coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_flags = 0xFF; } #endif #ifdef OBJ_ELF - symbolS * sym; - char bind; + symbolS * sym; + char bind; for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym)) { if (ARM_IS_THUMB (sym)) - { + { elf_symbol_type * elf_sym; - + elf_sym = elf_symbol (symbol_get_bfdsym (sym)); bind = ELF_ST_BIND (elf_sym); - + /* If it's a .thumb_func, declare it as so, otherwise tag label as .code 16. */ if (THUMB_IS_FUNC (sym)) @@ -7012,8 +8499,8 @@ arm_adjust_symtab () else elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_16BIT); - } - } + } + } #endif } @@ -7027,7 +8514,7 @@ arm_data_in_code () *input_line_pointer = 0; return 1; } - + return 0; } @@ -7052,7 +8539,7 @@ arm_validate_fix (fixP) the THUMB_FUNC attribute, then we must be calling a function which has the (interfacearm) attribute. We look for the Thumb entry point to that function and change the branch to refer to that function instead. */ - if ( fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23 + if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23 && fixP->fx_addsy != NULL && S_IS_DEFINED (fixP->fx_addsy) && ! THUMB_IS_FUNC (fixP->fx_addsy)) @@ -7064,6 +8551,22 @@ arm_validate_fix (fixP) return false; } +#ifdef OBJ_COFF +/* This is a little hack to help the gas/arm/adrl.s test. It prevents + local labels from being added to the output symbol table when they + are used with the ADRL pseudo op. The ADRL relocation should always + be resolved before the binbary is emitted, so it is safe to say that + it is adjustable. */ + +boolean +arm_fix_adjustable (fixP) + fixS * fixP; +{ + if (fixP->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE) + return 1; + return 0; +} +#endif #ifdef OBJ_ELF /* Relocations against Thumb function names must be left unadjusted, so that the linker can use this information to correctly set the @@ -7077,26 +8580,26 @@ arm_validate_fix (fixP) than a function) and then later jumping to that address. Such addresses also ought to have their bottom bit set (assuming that they reside in Thumb code), but at the moment they will not. */ - + boolean arm_fix_adjustable (fixP) fixS * fixP; { if (fixP->fx_addsy == NULL) return 1; - - /* Prevent all adjustments to global symbols. */ + + /* Prevent all adjustments to global symbols. */ if (S_IS_EXTERN (fixP->fx_addsy)) return 0; - + if (S_IS_WEAK (fixP->fx_addsy)) return 0; if (THUMB_IS_FUNC (fixP->fx_addsy) && fixP->fx_subsy == NULL) return 0; - - /* We need the symbol name for the VTABLE entries */ + + /* We need the symbol name for the VTABLE entries. */ if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; @@ -7108,24 +8611,28 @@ const char * elf32_arm_target_format () { if (target_big_endian) - if (target_oabi) - return "elf32-bigarm-oabi"; - else - return "elf32-bigarm"; + { + if (target_oabi) + return "elf32-bigarm-oabi"; + else + return "elf32-bigarm"; + } else - if (target_oabi) - return "elf32-littlearm-oabi"; - else - return "elf32-littlearm"; + { + if (target_oabi) + return "elf32-littlearm-oabi"; + else + return "elf32-littlearm"; + } } void armelf_frob_symbol (symp, puntp) symbolS * symp; - int * puntp; + int * puntp; { elf_frob_symbol (symp, puntp); -} +} int arm_force_relocation (fixp) @@ -7134,17 +8641,19 @@ arm_force_relocation (fixp) if ( fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH - || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23) + || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BLX + || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX + || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23) return 1; - + return 0; } static bfd_reloc_code_real_type arm_parse_reloc () { - char id[16]; - char * ip; + char id [16]; + char * ip; unsigned int i; static struct { @@ -7154,28 +8663,27 @@ arm_parse_reloc () } reloc_map[] = { -#define MAP(str,reloc) { str, sizeof (str)-1, reloc } +#define MAP(str,reloc) { str, sizeof (str) - 1, reloc } MAP ("(got)", BFD_RELOC_ARM_GOT32), MAP ("(gotoff)", BFD_RELOC_ARM_GOTOFF), - /* ScottB: Jan 30, 1998 */ - /* Added support for parsing "var(PLT)" branch instructions */ - /* generated by GCC for PLT relocs */ + /* ScottB: Jan 30, 1998 - Added support for parsing "var(PLT)" + branch instructions generated by GCC for PLT relocs. */ MAP ("(plt)", BFD_RELOC_ARM_PLT32), { NULL, 0, BFD_RELOC_UNUSED } -#undef MAP +#undef MAP }; for (i = 0, ip = input_line_pointer; i < sizeof (id) && (isalnum (*ip) || ispunct (*ip)); i++, ip++) id[i] = tolower (*ip); - + for (i = 0; reloc_map[i].str; i++) if (strncmp (id, reloc_map[i].str, reloc_map[i].len) == 0) break; - + input_line_pointer += reloc_map[i].len; - + return reloc_map[i].reloc; } @@ -7202,34 +8710,35 @@ s_arm_elf_cons (nbytes) do { bfd_reloc_code_real_type reloc; - + expression (& exp); if (exp.X_op == O_symbol - && * input_line_pointer == '(' - && (reloc = arm_parse_reloc()) != BFD_RELOC_UNUSED) - { - reloc_howto_type * howto = bfd_reloc_type_lookup (stdoutput, reloc); - int size = bfd_get_reloc_size (howto); - - if (size > nbytes) - as_bad ("%s relocations do not fit in %d bytes", + && * input_line_pointer == '(' + && (reloc = arm_parse_reloc ()) != BFD_RELOC_UNUSED) + { + reloc_howto_type *howto = bfd_reloc_type_lookup (stdoutput, reloc); + int size = bfd_get_reloc_size (howto); + + if (size > nbytes) + as_bad ("%s relocations do not fit in %d bytes", howto->name, nbytes); - else - { - register char * p = frag_more ((int) nbytes); - int offset = nbytes - size; - - fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size, - & exp, 0, reloc); - } - } + else + { + register char *p = frag_more ((int) nbytes); + int offset = nbytes - size; + + fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size, + &exp, 0, reloc); + } + } else - emit_expr (& exp, (unsigned int) nbytes); + emit_expr (&exp, (unsigned int) nbytes); } while (*input_line_pointer++ == ','); - input_line_pointer--; /* Put terminator back into stream. */ + /* Put terminator back into stream. */ + input_line_pointer --; demand_empty_rest_of_line (); } diff --git a/contrib/binutils/gas/config/tc-arm.h b/contrib/binutils/gas/config/tc-arm.h index c5ab887..0a823dd 100644 --- a/contrib/binutils/gas/config/tc-arm.h +++ b/contrib/binutils/gas/config/tc-arm.h @@ -1,5 +1,5 @@ /* This file is tc-arm.h - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modified by David Taylor (dtaylor@armltd.co.uk) @@ -68,12 +68,12 @@ #if defined OBJ_COFF || defined OBJ_ELF # define ARM_BI_ENDIAN - + # define TC_VALIDATE_FIX(fixP, segType, Label) \ if (arm_validate_fix (fixP)) add_symbolP = fixP->fx_addsy extern boolean arm_validate_fix PARAMS ((struct fix *)); #endif - + #ifdef OBJ_COFF # if defined TE_PE # define TC_FORCE_RELOCATION(x) ((x)->fx_r_type == BFD_RELOC_RVA) @@ -90,7 +90,7 @@ #ifdef OBJ_ELF # define TARGET_FORMAT elf32_arm_target_format() extern const char * elf32_arm_target_format PARAMS ((void)); - + # define TC_FORCE_RELOCATION(fixp) arm_force_relocation (fixp) extern int arm_force_relocation PARAMS ((struct fix *)); #endif @@ -116,10 +116,14 @@ #define TC_FIX_TYPE PTR #define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL) -#ifdef OBJ_ELF +#if defined OBJ_ELF || defined OBJ_COFF #include "write.h" /* For definition of fixS */ #define obj_fix_adjustable(fixP) arm_fix_adjustable (fixP) boolean arm_fix_adjustable PARAMS ((fixS *)); + +/* This arranges for gas/write.c to not apply a relocation if + obj_fix_adjustable() says it is not adjustable. */ +#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP) #else #define obj_fix_adjustable(fixP) 0 #endif @@ -143,7 +147,6 @@ boolean arm_fix_adjustable PARAMS ((fixS *)); #define ARM_SET_INTERWORK(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_INTERWORK) : ARM_RESET_FLAG (s, ARM_FLAG_INTERWORK)) #define THUMB_SET_FUNC(s,t) ((t) ? ARM_SET_FLAG (s, THUMB_FLAG_FUNC) : ARM_RESET_FLAG (s, THUMB_FLAG_FUNC)) - #define TC_START_LABEL(C,STR) \ (c == ':' || (c == '/' && arm_data_in_code ())) int arm_data_in_code PARAMS ((void)); @@ -194,18 +197,20 @@ void armelf_frob_symbol PARAMS ((symbolS *, int *)); extern void cons_fix_new_arm PARAMS ((fragS *, int, int, expressionS *)); /* Don't allow symbols to be discarded on GOT related relocs, - nor on globals. */ + nor on globals. */ #define tc_fix_adjustable(x) (\ ((x)->fx_r_type == BFD_RELOC_ARM_PLT32 \ || (x)->fx_r_type == BFD_RELOC_ARM_GOT32 \ || (x)->fx_r_type == BFD_RELOC_ARM_GOTOFF \ || S_IS_EXTERN ((x)->fx_addsy) \ || S_IS_WEAK ((x)->fx_addsy)) ? 0 : 1) - + #ifdef OBJ_ELF #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" #else #define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_" #endif - -/* end of tc-arm.h */ + +#ifdef OBJ_ELF +#define DWARF2_LINE_MIN_INSN_LENGTH 2 +#endif diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c index 17b1f79..05bdcdc 100644 --- a/contrib/binutils/gas/config/tc-i386.c +++ b/contrib/binutils/gas/config/tc-i386.c @@ -1,6 +1,6 @@ /* i386.c -- Assemble code for the Intel 80386 - Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 - Free Software Foundation. + Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -19,17 +19,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - Intel 80386 machine specific gas. - Written by Eliot Dresselhaus (eliot@mgm.mit.edu). - Bugs & suggestions are completely welcome. This is free software. - Please help us make it better. - */ +/* Intel 80386 machine specific gas. + Written by Eliot Dresselhaus (eliot@mgm.mit.edu). + x86_64 support by Jan Hubicka (jh@suse.cz) + Bugs & suggestions are completely welcome. This is free software. + Please help us make it better. */ #include <ctype.h> #include "as.h" #include "subsegs.h" +#include "dwarf2dbg.h" #include "opcode/i386.h" #ifndef REGISTER_WARNINGS @@ -52,23 +52,32 @@ #define false 0 static unsigned int mode_from_disp_size PARAMS ((unsigned int)); -static int fits_in_signed_byte PARAMS ((long)); -static int fits_in_unsigned_byte PARAMS ((long)); -static int fits_in_unsigned_word PARAMS ((long)); -static int fits_in_signed_word PARAMS ((long)); -static int smallest_imm_type PARAMS ((long)); +static int fits_in_signed_byte PARAMS ((offsetT)); +static int fits_in_unsigned_byte PARAMS ((offsetT)); +static int fits_in_unsigned_word PARAMS ((offsetT)); +static int fits_in_signed_word PARAMS ((offsetT)); +static int fits_in_unsigned_long PARAMS ((offsetT)); +static int fits_in_signed_long PARAMS ((offsetT)); +static int smallest_imm_type PARAMS ((offsetT)); +static offsetT offset_in_range PARAMS ((offsetT, int)); static int add_prefix PARAMS ((unsigned int)); -static void set_16bit_code_flag PARAMS ((int)); -static void set_16bit_gcc_code_flag PARAMS((int)); +static void set_code_flag PARAMS ((int)); +static void set_16bit_gcc_code_flag PARAMS ((int)); static void set_intel_syntax PARAMS ((int)); +static void set_cpu_arch PARAMS ((int)); #ifdef BFD_ASSEMBLER static bfd_reloc_code_real_type reloc - PARAMS ((int, int, bfd_reloc_code_real_type)); + PARAMS ((int, int, int, bfd_reloc_code_real_type)); #endif +#ifndef DEFAULT_ARCH +#define DEFAULT_ARCH "i386" +#endif +static char *default_arch = DEFAULT_ARCH; + /* 'md_assemble ()' gathers together information and puts it into a - i386_insn. */ + i386_insn. */ union i386_op { @@ -79,19 +88,19 @@ union i386_op struct _i386_insn { - /* TM holds the template for the insn were currently assembling. */ + /* TM holds the template for the insn were currently assembling. */ template tm; /* SUFFIX holds the instruction mnemonic suffix if given. (e.g. 'l' for 'movl') */ char suffix; - /* OPERANDS gives the number of given operands. */ + /* OPERANDS gives the number of given operands. */ unsigned int operands; /* REG_OPERANDS, DISP_OPERANDS, MEM_OPERANDS, IMM_OPERANDS give the number of given register, displacement, memory operands and immediate - operands. */ + operands. */ unsigned int reg_operands, disp_operands, mem_operands, imm_operands; /* TYPES [i] is the type (see above #defines) which tells us how to @@ -102,6 +111,10 @@ struct _i386_insn operand. */ union i386_op op[MAX_OPERANDS]; + /* Flags for operands. */ + unsigned int flags[MAX_OPERANDS]; +#define Operand_PCrel 1 + /* Relocation type for operand */ #ifdef BFD_ASSEMBLER enum bfd_reloc_code_real disp_reloc[MAX_OPERANDS]; @@ -116,8 +129,8 @@ struct _i386_insn unsigned int log2_scale_factor; /* SEG gives the seg_entries of this insn. They are zero unless - explicit segment overrides are given. */ - const seg_entry *seg[2]; /* segments for memory operands (if given) */ + explicit segment overrides are given. */ + const seg_entry *seg[2]; /* PREFIX holds all the given prefix opcodes (usually null). PREFIXES is the number of prefix opcodes. */ @@ -128,6 +141,7 @@ struct _i386_insn addressing modes of this insn are encoded. */ modrm_byte rm; + rex_byte rex; sib_byte sib; }; @@ -142,8 +156,8 @@ const char extra_symbol_chars[] = "*%-("; #endif /* This array holds the chars that always start a comment. If the - pre-processor is disabled, these aren't very useful */ -#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (TE_LINUX) && !defined(TE_FreeBSD)) + pre-processor is disabled, these aren't very useful. */ +#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX) && !defined(TE_FreeBSD)) /* Putting '/' here makes it impossible to use the divide operator. However, we need it for compatibility with SVR4 systems. */ const char comment_chars[] = "#/"; @@ -155,36 +169,37 @@ const char comment_chars[] = "#"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' - .line and .file directives will appear in the pre-processed output */ -/* Note that input_file.c hand checks for '#' at the beginning of the + .line and .file directives will appear in the pre-processed output. + Note that input_file.c hand checks for '#' at the beginning of the first line of the input file. This is because the compiler outputs - #NO_APP at the beginning of its output. */ -/* Also note that comments started like this one will always work if + #NO_APP at the beginning of its output. + Also note that comments started like this one will always work if '/' isn't otherwise defined. */ -#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (TE_LINUX) && !defined(TE_FreeBSD)) +#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX) && !defined(TE_FreeBSD)) const char line_comment_chars[] = ""; #else const char line_comment_chars[] = "/"; #endif -const char line_separator_chars[] = ""; +const char line_separator_chars[] = ";"; -/* Chars that can be used to separate mant from exp in floating point nums */ +/* Chars that can be used to separate mant from exp in floating point + nums. */ const char EXP_CHARS[] = "eE"; -/* Chars that mean this number is a floating point constant */ -/* As in 0f12.456 */ -/* or 0d1.2345e12 */ +/* Chars that mean this number is a floating point constant + As in 0f12.456 + or 0d1.2345e12. */ const char FLT_CHARS[] = "fFdDxX"; -/* tables for lexical analysis */ +/* Tables for lexical analysis. */ static char mnemonic_chars[256]; static char register_chars[256]; static char operand_chars[256]; static char identifier_chars[256]; static char digit_chars[256]; -/* lexical macros */ +/* Lexical macros. */ #define is_mnemonic_char(x) (mnemonic_chars[(unsigned char) x]) #define is_operand_char(x) (operand_chars[(unsigned char) x]) #define is_register_char(x) (register_chars[(unsigned char) x]) @@ -192,43 +207,71 @@ static char digit_chars[256]; #define is_identifier_char(x) (identifier_chars[(unsigned char) x]) #define is_digit_char(x) (digit_chars[(unsigned char) x]) -/* put here all non-digit non-letter charcters that may occur in an operand */ +/* All non-digit non-letter charcters that may occur in an operand. */ static char operand_special_chars[] = "%$-+(,)*._~/<>|&^!:[@]"; /* md_assemble() always leaves the strings it's passed unaltered. To effect this we maintain a stack of saved characters that we've smashed with '\0's (indicating end of strings for various sub-fields of the - assembler instruction). */ + assembler instruction). */ static char save_stack[32]; -static char *save_stack_p; /* stack pointer */ +static char *save_stack_p; #define END_STRING_AND_SAVE(s) \ do { *save_stack_p++ = *(s); *(s) = '\0'; } while (0) #define RESTORE_END_STRING(s) \ do { *(s) = *--save_stack_p; } while (0) -/* The instruction we're assembling. */ +/* The instruction we're assembling. */ static i386_insn i; /* Possible templates for current insn. */ static const templates *current_templates; -/* Per instruction expressionS buffers: 2 displacements & 2 immediate max. */ +/* Per instruction expressionS buffers: 2 displacements & 2 immediate max. */ static expressionS disp_expressions[2], im_expressions[2]; -static int this_operand; /* current operand we are working on */ +/* Current operand we are working on. */ +static int this_operand; + +/* We support four different modes. FLAG_CODE variable is used to distinguish + these. */ + +enum flag_code { + CODE_32BIT, + CODE_16BIT, + CODE_64BIT }; + +static enum flag_code flag_code; +static int use_rela_relocations = 0; + +/* The names used to print error messages. */ +static const char *flag_code_names[] = + { + "32", + "16", + "64" + }; -static int flag_do_long_jump; /* FIXME what does this do? */ +/* 1 for intel syntax, + 0 if att syntax. */ +static int intel_syntax = 0; -static int flag_16bit_code; /* 1 if we're writing 16-bit code, 0 if 32-bit */ +/* 1 if register prefix % not required. */ +static int allow_naked_reg = 0; -static int intel_syntax = 0; /* 1 for intel syntax, 0 if att syntax */ +/* Used in 16 bit gcc mode to add an l suffix to call, ret, enter, + leave, push, and pop instructions so that gcc has the same stack + frame as in 32 bit mode. */ +static char stackop_size = '\0'; -static int allow_naked_reg = 0; /* 1 if register prefix % not required */ +/* Non-zero to quieten some warnings. */ +static int quiet_warnings = 0; -static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l - suffix to call, ret, enter, leave, push, - and pop instructions so that gcc has the - same stack frame as in 32 bit mode. */ +/* CPU name. */ +static const char *cpu_arch_name = NULL; + +/* CPU feature flags. */ +static unsigned int cpu_arch_flags = CpuUnknownFlags|CpuNo64; /* Interface to relax_segment. There are 2 relax states for 386 jump insns: one for conditional & @@ -236,10 +279,10 @@ static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l jumps add different sizes to frags when we're figuring out what sort of jump to choose to reach a given label. */ -/* types */ -#define COND_JUMP 1 /* conditional jump */ -#define UNCOND_JUMP 2 /* unconditional jump */ -/* sizes */ +/* Types. */ +#define COND_JUMP 1 +#define UNCOND_JUMP 2 +/* Sizes. */ #define CODE16 1 #define SMALL 0 #define SMALL16 (SMALL|CODE16) @@ -255,7 +298,7 @@ static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l #endif #define ENCODE_RELAX_STATE(type,size) \ - ((relax_substateT)((type<<2) | (size))) + ((relax_substateT) ((type<<2) | (size))) #define SIZE_FROM_RELAX_STATE(s) \ ( (((s) & 0x3) == BIG ? 4 : (((s) & 0x3) == BIG16 ? 2 : 1)) ) @@ -273,8 +316,7 @@ const relax_typeS md_relax_table[] = 1) most positive reach of this state, 2) most negative reach of this state, 3) how many bytes this mode will add to the size of the current frag - 4) which index into the table to try if we can't fit into this one. - */ + 4) which index into the table to try if we can't fit into this one. */ {1, 1, 0, 0}, {1, 1, 0, 0}, {1, 1, 0, 0}, @@ -300,15 +342,31 @@ const relax_typeS md_relax_table[] = }; +static const arch_entry cpu_arch[] = { + {"i8086", Cpu086 }, + {"i186", Cpu086|Cpu186 }, + {"i286", Cpu086|Cpu186|Cpu286 }, + {"i386", Cpu086|Cpu186|Cpu286|Cpu386 }, + {"i486", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486 }, + {"i586", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuMMX }, + {"i686", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuSSE }, + {"pentium", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuMMX }, + {"pentiumpro",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuSSE }, + {"pentium4", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX|CpuSSE|CpuSSE2 }, + {"k6", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX|Cpu3dnow }, + {"athlon", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuMMX|Cpu3dnow }, + {"sledgehammer",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuSledgehammer|CpuMMX|Cpu3dnow|CpuSSE|CpuSSE2 }, + {NULL, 0 } +}; void i386_align_code (fragP, count) fragS *fragP; int count; { - /* Various efficient no-op patterns for aligning code labels. */ - /* Note: Don't try to assemble the instructions in the comments. */ - /* 0L and 0w are not legal */ + /* Various efficient no-op patterns for aligning code labels. + Note: Don't try to assemble the instructions in the comments. + 0L and 0w are not legal. */ static const char f32_1[] = {0x90}; /* nop */ static const char f32_2[] = @@ -373,18 +431,24 @@ i386_align_code (fragP, count) f32_15, f32_15, f32_15, f32_15, f32_15, f32_15, f32_15 }; + /* ??? We can't use these fillers for x86_64, since they often kills the + upper halves. Solve later. */ + if (flag_code == CODE_64BIT) + count = 1; + if (count > 0 && count <= 15) { - if (flag_16bit_code) + if (flag_code == CODE_16BIT) { - memcpy(fragP->fr_literal + fragP->fr_fix, - f16_patt[count - 1], count); - if (count > 8) /* adjust jump offset */ + memcpy (fragP->fr_literal + fragP->fr_fix, + f16_patt[count - 1], count); + if (count > 8) + /* Adjust jump offset. */ fragP->fr_literal[fragP->fr_fix + 1] = count - 2; } else - memcpy(fragP->fr_literal + fragP->fr_fix, - f32_patt[count - 1], count); + memcpy (fragP->fr_literal + fragP->fr_fix, + f32_patt[count - 1], count); fragP->fr_var = count; } } @@ -399,65 +463,125 @@ static const reg_entry *parse_register PARAMS ((char *reg_string, static void s_bss PARAMS ((int)); #endif -symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ +symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_". */ static INLINE unsigned int mode_from_disp_size (t) unsigned int t; { - return (t & Disp8) ? 1 : (t & (Disp16|Disp32)) ? 2 : 0; + return (t & Disp8) ? 1 : (t & (Disp16 | Disp32 | Disp32S)) ? 2 : 0; } static INLINE int fits_in_signed_byte (num) - long num; + offsetT num; { return (num >= -128) && (num <= 127); -} /* fits_in_signed_byte() */ +} static INLINE int fits_in_unsigned_byte (num) - long num; + offsetT num; { return (num & 0xff) == num; -} /* fits_in_unsigned_byte() */ +} static INLINE int fits_in_unsigned_word (num) - long num; + offsetT num; { return (num & 0xffff) == num; -} /* fits_in_unsigned_word() */ +} static INLINE int fits_in_signed_word (num) - long num; + offsetT num; { return (-32768 <= num) && (num <= 32767); -} /* fits_in_signed_word() */ +} +static INLINE int +fits_in_signed_long (num) + offsetT num ATTRIBUTE_UNUSED; +{ +#ifndef BFD64 + return 1; +#else + return (!(((offsetT) -1 << 31) & num) + || (((offsetT) -1 << 31) & num) == ((offsetT) -1 << 31)); +#endif +} /* fits_in_signed_long() */ +static INLINE int +fits_in_unsigned_long (num) + offsetT num ATTRIBUTE_UNUSED; +{ +#ifndef BFD64 + return 1; +#else + return (num & (((offsetT) 2 << 31) - 1)) == num; +#endif +} /* fits_in_unsigned_long() */ static int smallest_imm_type (num) - long num; + offsetT num; { -#if 0 - /* This code is disabled because all the Imm1 forms in the opcode table - are slower on the i486, and they're the versions with the implicitly - specified single-position displacement, which has another syntax if - you really want to use that form. If you really prefer to have the - one-byte-shorter Imm1 form despite these problems, re-enable this - code. */ - if (num == 1) - return Imm1 | Imm8 | Imm8S | Imm16 | Imm32; -#endif + if (cpu_arch_flags != (Cpu086 | Cpu186 | Cpu286 | Cpu386 | Cpu486 | CpuNo64) + && !(cpu_arch_flags & (CpuUnknown))) + { + /* This code is disabled on the 486 because all the Imm1 forms + in the opcode table are slower on the i486. They're the + versions with the implicitly specified single-position + displacement, which has another syntax if you really want to + use that form. */ + if (num == 1) + return Imm1 | Imm8 | Imm8S | Imm16 | Imm32 | Imm32S | Imm64; + } return (fits_in_signed_byte (num) - ? (Imm8S | Imm8 | Imm16 | Imm32) + ? (Imm8S | Imm8 | Imm16 | Imm32 | Imm32S | Imm64) : fits_in_unsigned_byte (num) - ? (Imm8 | Imm16 | Imm32) + ? (Imm8 | Imm16 | Imm32 | Imm32S | Imm64) : (fits_in_signed_word (num) || fits_in_unsigned_word (num)) - ? (Imm16 | Imm32) - : (Imm32)); -} /* smallest_imm_type() */ + ? (Imm16 | Imm32 | Imm32S | Imm64) + : fits_in_signed_long (num) + ? (Imm32 | Imm32S | Imm64) + : fits_in_unsigned_long (num) + ? (Imm32 | Imm64) + : Imm64); +} + +static offsetT +offset_in_range (val, size) + offsetT val; + int size; +{ + addressT mask; + + switch (size) + { + case 1: mask = ((addressT) 1 << 8) - 1; break; + case 2: mask = ((addressT) 1 << 16) - 1; break; + case 4: mask = ((addressT) 2 << 31) - 1; break; +#ifdef BFD64 + case 8: mask = ((addressT) 2 << 63) - 1; break; +#endif + default: abort (); + } + + /* If BFD64, sign extend val. */ + if (!use_rela_relocations) + if ((val & ~(((addressT) 2 << 31) - 1)) == 0) + val = (val ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31); + + if ((val & ~mask) != 0 && (val & ~mask) != ~mask) + { + char buf1[40], buf2[40]; + + sprint_value (buf1, val); + sprint_value (buf2, val & mask); + as_warn (_("%s shortened to %s"), buf1, buf2); + } + return val & mask; +} /* Returns 0 if attempting to add a prefix where one from the same class already exists, 1 if non rep/repne added, 2 if rep/repne @@ -469,40 +593,43 @@ add_prefix (prefix) int ret = 1; int q; - switch (prefix) - { - default: - abort (); - - case CS_PREFIX_OPCODE: - case DS_PREFIX_OPCODE: - case ES_PREFIX_OPCODE: - case FS_PREFIX_OPCODE: - case GS_PREFIX_OPCODE: - case SS_PREFIX_OPCODE: - q = SEG_PREFIX; - break; - - case REPNE_PREFIX_OPCODE: - case REPE_PREFIX_OPCODE: - ret = 2; - /* fall thru */ - case LOCK_PREFIX_OPCODE: - q = LOCKREP_PREFIX; - break; - - case FWAIT_OPCODE: - q = WAIT_PREFIX; - break; - - case ADDR_PREFIX_OPCODE: - q = ADDR_PREFIX; - break; - - case DATA_PREFIX_OPCODE: - q = DATA_PREFIX; - break; - } + if (prefix >= 0x40 && prefix < 0x50 && flag_code == CODE_64BIT) + q = REX_PREFIX; + else + switch (prefix) + { + default: + abort (); + + case CS_PREFIX_OPCODE: + case DS_PREFIX_OPCODE: + case ES_PREFIX_OPCODE: + case FS_PREFIX_OPCODE: + case GS_PREFIX_OPCODE: + case SS_PREFIX_OPCODE: + q = SEG_PREFIX; + break; + + case REPNE_PREFIX_OPCODE: + case REPE_PREFIX_OPCODE: + ret = 2; + /* fall thru */ + case LOCK_PREFIX_OPCODE: + q = LOCKREP_PREFIX; + break; + + case FWAIT_OPCODE: + q = WAIT_PREFIX; + break; + + case ADDR_PREFIX_OPCODE: + q = ADDR_PREFIX; + break; + + case DATA_PREFIX_OPCODE: + q = DATA_PREFIX; + break; + } if (i.prefix[q]) { @@ -516,19 +643,31 @@ add_prefix (prefix) } static void -set_16bit_code_flag (new_16bit_code_flag) - int new_16bit_code_flag; +set_code_flag (value) + int value; { - flag_16bit_code = new_16bit_code_flag; + flag_code = value; + cpu_arch_flags &= ~(Cpu64 | CpuNo64); + cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64); + if (value == CODE_64BIT && !(cpu_arch_flags & CpuSledgehammer)) + { + as_bad (_("64bit mode not supported on this CPU.")); + } + if (value == CODE_32BIT && !(cpu_arch_flags & Cpu386)) + { + as_bad (_("32bit mode not supported on this CPU.")); + } stackop_size = '\0'; } static void -set_16bit_gcc_code_flag (new_16bit_code_flag) - int new_16bit_code_flag; +set_16bit_gcc_code_flag (new_code_flag) + int new_code_flag; { - flag_16bit_code = new_16bit_code_flag; - stackop_size = new_16bit_code_flag ? 'l' : '\0'; + flag_code = new_code_flag; + cpu_arch_flags &= ~(Cpu64 | CpuNo64); + cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64); + stackop_size = 'l'; } static void @@ -544,9 +683,9 @@ set_intel_syntax (syntax_flag) char *string = input_line_pointer; int e = get_symbol_end (); - if (strcmp(string, "prefix") == 0) + if (strcmp (string, "prefix") == 0) ask_naked_reg = 1; - else if (strcmp(string, "noprefix") == 0) + else if (strcmp (string, "noprefix") == 0) ask_naked_reg = -1; else as_bad (_("bad argument to syntax directive.")); @@ -562,59 +701,110 @@ set_intel_syntax (syntax_flag) allow_naked_reg = (intel_syntax && (bfd_get_symbol_leading_char (stdoutput) != '\0')); #else - allow_naked_reg = 0; /* conservative default */ + /* Conservative default. */ + allow_naked_reg = 0; #endif } else allow_naked_reg = (ask_naked_reg < 0); } +static void +set_cpu_arch (dummy) + int dummy ATTRIBUTE_UNUSED; +{ + SKIP_WHITESPACE (); + + if (! is_end_of_line[(unsigned char) *input_line_pointer]) + { + char *string = input_line_pointer; + int e = get_symbol_end (); + int i; + + for (i = 0; cpu_arch[i].name; i++) + { + if (strcmp (string, cpu_arch[i].name) == 0) + { + cpu_arch_name = cpu_arch[i].name; + cpu_arch_flags = cpu_arch[i].flags | (flag_code == CODE_64BIT ? Cpu64 : CpuNo64); + break; + } + } + if (!cpu_arch[i].name) + as_bad (_("no such architecture: `%s'"), string); + + *input_line_pointer = e; + } + else + as_bad (_("missing cpu architecture")); + + demand_empty_rest_of_line (); +} + const pseudo_typeS md_pseudo_table[] = { -#ifndef I386COFF - {"bss", s_bss, 0}, -#endif #if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO) {"align", s_align_bytes, 0}, #else {"align", s_align_ptwo, 0}, #endif + {"arch", set_cpu_arch, 0}, +#ifndef I386COFF + {"bss", s_bss, 0}, +#endif {"ffloat", float_cons, 'f'}, {"dfloat", float_cons, 'd'}, {"tfloat", float_cons, 'x'}, {"value", cons, 2}, {"noopt", s_ignore, 0}, {"optim", s_ignore, 0}, - {"code16gcc", set_16bit_gcc_code_flag, 1}, - {"code16", set_16bit_code_flag, 1}, - {"code32", set_16bit_code_flag, 0}, + {"code16gcc", set_16bit_gcc_code_flag, CODE_16BIT}, + {"code16", set_code_flag, CODE_16BIT}, + {"code32", set_code_flag, CODE_32BIT}, + {"code64", set_code_flag, CODE_64BIT}, {"intel_syntax", set_intel_syntax, 1}, {"att_syntax", set_intel_syntax, 0}, + {"file", dwarf2_directive_file, 0}, + {"loc", dwarf2_directive_loc, 0}, {0, 0, 0} }; -/* for interface with expression () */ +/* For interface with expression (). */ extern char *input_line_pointer; -/* hash table for instruction mnemonic lookup */ +/* Hash table for instruction mnemonic lookup. */ static struct hash_control *op_hash; -/* hash table for register lookup */ + +/* Hash table for register lookup. */ static struct hash_control *reg_hash; - +#ifdef BFD_ASSEMBLER +unsigned long +i386_mach () +{ + if (!strcmp (default_arch, "x86_64")) + return bfd_mach_x86_64; + else if (!strcmp (default_arch, "i386")) + return bfd_mach_i386_i386; + else + as_fatal (_("Unknown architecture")); +} +#endif + void md_begin () { const char *hash_err; - /* initialize op_hash hash table */ + /* Initialize op_hash hash table. */ op_hash = hash_new (); { register const template *optab; register templates *core_optab; - optab = i386_optab; /* setup for loop */ + /* Setup for loop. */ + optab = i386_optab; core_optab = (templates *) xmalloc (sizeof (templates)); core_optab->start = optab; @@ -625,14 +815,13 @@ md_begin () || strcmp (optab->name, (optab - 1)->name) != 0) { /* different name --> ship out current template list; - add to hash table; & begin anew */ + add to hash table; & begin anew. */ core_optab->end = optab; hash_err = hash_insert (op_hash, (optab - 1)->name, (PTR) core_optab); if (hash_err) { - hash_error: as_fatal (_("Internal Error: Can't hash %s: %s"), (optab - 1)->name, hash_err); @@ -645,7 +834,7 @@ md_begin () } } - /* initialize reg_hash hash table */ + /* Initialize reg_hash hash table. */ reg_hash = hash_new (); { register const reg_entry *regtab; @@ -656,11 +845,13 @@ md_begin () { hash_err = hash_insert (reg_hash, regtab->reg_name, (PTR) regtab); if (hash_err) - goto hash_error; + as_fatal (_("Internal Error: Can't hash %s: %s"), + regtab->reg_name, + hash_err); } } - /* fill in lexical tables: mnemonic_chars, operand_chars. */ + /* Fill in lexical tables: mnemonic_chars, operand_chars. */ { register int c; register char *p; @@ -725,10 +916,9 @@ i386_print_statistics (file) hash_print_statistics (file, "i386 register", reg_hash); } - #ifdef DEBUG386 -/* debugging routines for md_assemble */ +/* Debugging routines for md_assemble. */ static void pi PARAMS ((char *, i386_insn *)); static void pte PARAMS ((template *)); static void pt PARAMS ((unsigned int)); @@ -740,15 +930,20 @@ pi (line, x) char *line; i386_insn *x; { - register template *p; - int i; + unsigned int i; fprintf (stdout, "%s: template ", line); pte (&x->tm); - fprintf (stdout, " modrm: mode %x reg %x reg/mem %x", + fprintf (stdout, " address: base %s index %s scale %x\n", + x->base_reg ? x->base_reg->reg_name : "none", + x->index_reg ? x->index_reg->reg_name : "none", + x->log2_scale_factor); + fprintf (stdout, " modrm: mode %x reg %x reg/mem %x\n", x->rm.mode, x->rm.reg, x->rm.regmem); - fprintf (stdout, " base %x index %x scale %x\n", - x->bi.base, x->bi.index, x->bi.scale); + fprintf (stdout, " sib: base %x index %x scale %x\n", + x->sib.base, x->sib.index, x->sib.scale); + fprintf (stdout, " rex: 64bit %x extX %x extY %x extZ %x\n", + x->rex.mode64, x->rex.extX, x->rex.extY, x->rex.extZ); for (i = 0; i < x->operands; i++) { fprintf (stdout, " #%d: ", i + 1); @@ -768,10 +963,9 @@ static void pte (t) template *t; { - int i; + unsigned int i; fprintf (stdout, " %d operands ", t->operands); - fprintf (stdout, "opcode %x ", - t->base_opcode); + fprintf (stdout, "opcode %x ", t->base_opcode); if (t->extension_opcode != None) fprintf (stdout, "ext %x ", t->extension_opcode); if (t->opcode_modifier & D) @@ -829,15 +1023,20 @@ type_names[] = { Reg8, "r8" }, { Reg16, "r16" }, { Reg32, "r32" }, + { Reg64, "r64" }, { Imm8, "i8" }, { Imm8S, "i8s" }, { Imm16, "i16" }, { Imm32, "i32" }, + { Imm32S, "i32s" }, + { Imm64, "i64" }, { Imm1, "i1" }, { BaseIndex, "BaseIndex" }, { Disp8, "d8" }, { Disp16, "d16" }, { Disp32, "d32" }, + { Disp32S, "d32s" }, + { Disp64, "d64" }, { InOutPortReg, "InOutPortReg" }, { ShiftCount, "ShiftCount" }, { Control, "control reg" }, @@ -861,16 +1060,9 @@ pt (t) { register struct type_name *ty; - if (t == Unknown) - { - fprintf (stdout, _("Unknown")); - } - else - { - for (ty = type_names; ty->mask; ty++) - if (t & ty->mask) - fprintf (stdout, "%s, ", ty->tname); - } + for (ty = type_names; ty->mask; ty++) + if (t & ty->mask) + fprintf (stdout, "%s, ", ty->tname); fflush (stdout); } @@ -886,25 +1078,27 @@ tc_i386_force_relocation (fixp) return 1; return 0; #else - /* For COFF */ + /* For COFF. */ return fixp->fx_r_type == 7; #endif } #ifdef BFD_ASSEMBLER -static bfd_reloc_code_real_type reloc - PARAMS ((int, int, bfd_reloc_code_real_type)); static bfd_reloc_code_real_type -reloc (size, pcrel, other) +reloc (size, pcrel, sign, other) int size; int pcrel; + int sign; bfd_reloc_code_real_type other; { - if (other != NO_RELOC) return other; + if (other != NO_RELOC) + return other; if (pcrel) { + if (!sign) + as_bad (_("There are no unsigned pc-relative relocations")); switch (size) { case 1: return BFD_RELOC_8_PCREL; @@ -915,64 +1109,76 @@ reloc (size, pcrel, other) } else { - switch (size) - { - case 1: return BFD_RELOC_8; - case 2: return BFD_RELOC_16; - case 4: return BFD_RELOC_32; - } - as_bad (_("can not do %d byte relocation"), size); + if (sign) + switch (size) + { + case 4: return BFD_RELOC_X86_64_32S; + } + else + switch (size) + { + case 1: return BFD_RELOC_8; + case 2: return BFD_RELOC_16; + case 4: return BFD_RELOC_32; + case 8: return BFD_RELOC_64; + } + as_bad (_("can not do %s %d byte relocation"), + sign ? "signed" : "unsigned", size); } + abort (); return BFD_RELOC_NONE; } -/* - * Here we decide which fixups can be adjusted to make them relative to - * the beginning of the section instead of the symbol. Basically we need - * to make sure that the dynamic relocations are done correctly, so in - * some cases we force the original symbol to be used. - */ +/* Here we decide which fixups can be adjusted to make them relative to + the beginning of the section instead of the symbol. Basically we need + to make sure that the dynamic relocations are done correctly, so in + some cases we force the original symbol to be used. */ + int tc_i386_fix_adjustable (fixP) fixS *fixP; { -#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (TE_PE) +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) /* Prevent all adjustments to global symbols, or else dynamic linking will not work correctly. */ if (S_IS_EXTERNAL (fixP->fx_addsy) || S_IS_WEAK (fixP->fx_addsy)) return 0; #endif - /* adjust_reloc_syms doesn't know about the GOT */ + /* adjust_reloc_syms doesn't know about the GOT. */ if (fixP->fx_r_type == BFD_RELOC_386_GOTOFF || fixP->fx_r_type == BFD_RELOC_386_PLT32 || fixP->fx_r_type == BFD_RELOC_386_GOT32 - || fixP->fx_r_type == BFD_RELOC_RVA + || fixP->fx_r_type == BFD_RELOC_X86_64_PLT32 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOT32 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCREL || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; return 1; } #else -#define reloc(SIZE,PCREL,OTHER) 0 -#define BFD_RELOC_16 0 -#define BFD_RELOC_32 0 -#define BFD_RELOC_16_PCREL 0 -#define BFD_RELOC_32_PCREL 0 -#define BFD_RELOC_386_PLT32 0 -#define BFD_RELOC_386_GOT32 0 -#define BFD_RELOC_386_GOTOFF 0 +#define reloc(SIZE,PCREL,SIGN,OTHER) 0 +#define BFD_RELOC_16 0 +#define BFD_RELOC_32 0 +#define BFD_RELOC_16_PCREL 0 +#define BFD_RELOC_32_PCREL 0 +#define BFD_RELOC_386_PLT32 0 +#define BFD_RELOC_386_GOT32 0 +#define BFD_RELOC_386_GOTOFF 0 +#define BFD_RELOC_X86_64_PLT32 0 +#define BFD_RELOC_X86_64_GOT32 0 +#define BFD_RELOC_X86_64_GOTPCREL 0 #endif -static int -intel_float_operand PARAMS ((char *mnemonic)); +static int intel_float_operand PARAMS ((char *mnemonic)); static int intel_float_operand (mnemonic) char *mnemonic; { - if (mnemonic[0] == 'f' && mnemonic[1] =='i') + if (mnemonic[0] == 'f' && mnemonic[1] == 'i') return 2; if (mnemonic[0] == 'f') @@ -989,7 +1195,7 @@ void md_assemble (line) char *line; { - /* Points to template once we've found it. */ + /* Points to template once we've found it. */ const template *t; /* Count the size of the instruction generated. */ @@ -999,23 +1205,23 @@ md_assemble (line) char mnemonic[MAX_MNEM_SIZE]; - /* Initialize globals. */ + /* Initialize globals. */ memset (&i, '\0', sizeof (i)); for (j = 0; j < MAX_OPERANDS; j++) i.disp_reloc[j] = NO_RELOC; memset (disp_expressions, '\0', sizeof (disp_expressions)); memset (im_expressions, '\0', sizeof (im_expressions)); - save_stack_p = save_stack; /* reset stack pointer */ + save_stack_p = save_stack; /* First parse an instruction mnemonic & call i386_operand for the operands. We assume that the scrubber has arranged it so that line[0] is the valid - start of a (possibly prefixed) mnemonic. */ + start of a (possibly prefixed) mnemonic. */ { char *l = line; char *token_start = l; char *mnem_p; - /* Non-zero if we found a prefix only acceptable with string insns. */ + /* Non-zero if we found a prefix only acceptable with string insns. */ const char *expecting_string_instruction = NULL; while (1) @@ -1026,7 +1232,7 @@ md_assemble (line) mnem_p++; if (mnem_p >= mnemonic + sizeof (mnemonic)) { - as_bad (_("no such 386 instruction: `%s'"), token_start); + as_bad (_("no such instruction: `%s'"), token_start); return; } l++; @@ -1060,7 +1266,7 @@ md_assemble (line) Similarly, in 32-bit mode, do not allow addr32 or data32. */ if ((current_templates->start->opcode_modifier & (Size16 | Size32)) && (((current_templates->start->opcode_modifier & Size32) != 0) - ^ flag_16bit_code)) + ^ (flag_code == CODE_16BIT))) { as_bad (_("redundant %s prefix"), current_templates->start->name); @@ -1072,8 +1278,7 @@ md_assemble (line) case 0: return; case 2: - expecting_string_instruction = - current_templates->start->name; + expecting_string_instruction = current_templates->start->name; break; } /* Skip past PREFIX_SEPARATOR and reset token_start. */ @@ -1090,31 +1295,57 @@ md_assemble (line) { case WORD_MNEM_SUFFIX: case BYTE_MNEM_SUFFIX: - case SHORT_MNEM_SUFFIX: - case LONG_MNEM_SUFFIX: + case QWORD_MNEM_SUFFIX: i.suffix = mnem_p[-1]; mnem_p[-1] = '\0'; current_templates = hash_find (op_hash, mnemonic); break; + case SHORT_MNEM_SUFFIX: + case LONG_MNEM_SUFFIX: + if (!intel_syntax) + { + i.suffix = mnem_p[-1]; + mnem_p[-1] = '\0'; + current_templates = hash_find (op_hash, mnemonic); + } + break; - /* Intel Syntax */ - case DWORD_MNEM_SUFFIX: + /* Intel Syntax. */ + case 'd': if (intel_syntax) { - i.suffix = mnem_p[-1]; + if (intel_float_operand (mnemonic)) + i.suffix = SHORT_MNEM_SUFFIX; + else + i.suffix = LONG_MNEM_SUFFIX; mnem_p[-1] = '\0'; current_templates = hash_find (op_hash, mnemonic); - break; } + break; } if (!current_templates) { - as_bad (_("no such 386 instruction: `%s'"), token_start); + as_bad (_("no such instruction: `%s'"), token_start); return; } } - /* check for rep/repne without a string instruction */ + /* Check if instruction is supported on specified architecture. */ + if (cpu_arch_flags != 0) + { + if ((current_templates->start->cpu_flags & ~(Cpu64 | CpuNo64)) + & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64))) + { + as_warn (_("`%s' is not supported on `%s'"), + current_templates->start->name, cpu_arch_name); + } + else if ((Cpu386 & ~cpu_arch_flags) && (flag_code != CODE_16BIT)) + { + as_warn (_("use .code16 to ensure correct addressing mode")); + } + } + + /* Check for rep/repne without a string instruction. */ if (expecting_string_instruction && !(current_templates->start->opcode_modifier & IsString)) { @@ -1123,20 +1354,18 @@ md_assemble (line) return; } - /* There may be operands to parse. */ + /* There may be operands to parse. */ if (*l != END_OF_INSN) { - /* parse operands */ - - /* 1 if operand is pending after ','. */ + /* 1 if operand is pending after ','. */ unsigned int expecting_operand = 0; - /* Non-zero if operand parens not balanced. */ + /* Non-zero if operand parens not balanced. */ unsigned int paren_not_balanced; do { - /* skip optional white space before operand */ + /* Skip optional white space before operand. */ if (is_space_char (*l)) ++l; if (!is_operand_char (*l) && *l != END_OF_INSN) @@ -1189,7 +1418,7 @@ md_assemble (line) l++; } if (l != token_start) - { /* yes, we've read in another operand */ + { /* Yes, we've read in another operand. */ unsigned int operand_ok; this_operand = i.operands++; if (i.operands > MAX_OPERANDS) @@ -1198,15 +1427,17 @@ md_assemble (line) MAX_OPERANDS); return; } - /* now parse operand adding info to 'i' as we go along */ + /* Now parse operand adding info to 'i' as we go along. */ END_STRING_AND_SAVE (l); if (intel_syntax) - operand_ok = i386_intel_operand (token_start, intel_float_operand (mnemonic)); + operand_ok = + i386_intel_operand (token_start, + intel_float_operand (mnemonic)); else operand_ok = i386_operand (token_start); - RESTORE_END_STRING (l); /* restore old contents */ + RESTORE_END_STRING (l); if (!operand_ok) return; } @@ -1225,17 +1456,18 @@ md_assemble (line) } } - /* now *l must be either ',' or END_OF_INSN */ + /* Now *l must be either ',' or END_OF_INSN. */ if (*l == ',') { if (*++l == END_OF_INSN) - { /* just skip it, if it's \n complain */ + { + /* Just skip it, if it's \n complain. */ goto expecting_operand_after_comma; } expecting_operand = 1; } } - while (*l != END_OF_INSN); /* until we get end of insn */ + while (*l != END_OF_INSN); } } @@ -1244,7 +1476,7 @@ md_assemble (line) Next, we find a template that matches the given insn, making sure the overlap of the given operands types is consistent - with the template operand types. */ + with the template operand types. */ #define MATCH(overlap, given, template) \ ((overlap & ~JumpAbsolute) \ @@ -1276,6 +1508,11 @@ md_assemble (line) { union i386_op temp_op; unsigned int temp_type; +#ifdef BFD_ASSEMBLER + enum bfd_reloc_code_real temp_reloc; +#else + int temp_reloc; +#endif int xchg1 = 0; int xchg2 = 0; @@ -1295,6 +1532,9 @@ md_assemble (line) temp_op = i.op[xchg2]; i.op[xchg2] = i.op[xchg1]; i.op[xchg1] = temp_op; + temp_reloc = i.disp_reloc[xchg2]; + i.disp_reloc[xchg2] = i.disp_reloc[xchg1]; + i.disp_reloc[xchg1] = temp_reloc; if (i.mem_operands == 2) { @@ -1320,45 +1560,131 @@ md_assemble (line) We can't do this properly yet, ie. excluding InOutPortReg, but the following works for instructions with immediates. In any case, we can't set i.suffix yet. */ - for (op = i.operands; --op >= 0; ) + for (op = i.operands; --op >= 0;) if (i.types[op] & Reg) { if (i.types[op] & Reg8) guess_suffix = BYTE_MNEM_SUFFIX; else if (i.types[op] & Reg16) guess_suffix = WORD_MNEM_SUFFIX; + else if (i.types[op] & Reg32) + guess_suffix = LONG_MNEM_SUFFIX; + else if (i.types[op] & Reg64) + guess_suffix = QWORD_MNEM_SUFFIX; break; } } - else if (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) + else if ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) guess_suffix = WORD_MNEM_SUFFIX; - for (op = i.operands; --op >= 0; ) - if ((i.types[op] & Imm) - && i.op[op].imms->X_op == O_constant) + for (op = i.operands; --op >= 0;) + if (i.types[op] & Imm) { - /* If a suffix is given, this operand may be shortened. */ - switch (guess_suffix) + switch (i.op[op].imms->X_op) { - case WORD_MNEM_SUFFIX: - i.types[op] |= Imm16; - break; - case BYTE_MNEM_SUFFIX: - i.types[op] |= Imm16 | Imm8 | Imm8S; - break; + case O_constant: + /* If a suffix is given, this operand may be shortened. */ + switch (guess_suffix) + { + case LONG_MNEM_SUFFIX: + i.types[op] |= Imm32 | Imm64; + break; + case WORD_MNEM_SUFFIX: + i.types[op] |= Imm16 | Imm32S | Imm32 | Imm64; + break; + case BYTE_MNEM_SUFFIX: + i.types[op] |= Imm16 | Imm8 | Imm8S | Imm32S | Imm32 | Imm64; + break; + } + + /* If this operand is at most 16 bits, convert it + to a signed 16 bit number before trying to see + whether it will fit in an even smaller size. + This allows a 16-bit operand such as $0xffe0 to + be recognised as within Imm8S range. */ + if ((i.types[op] & Imm16) + && (i.op[op].imms->X_add_number & ~(offsetT) 0xffff) == 0) + { + i.op[op].imms->X_add_number = + (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000); + } + if ((i.types[op] & Imm32) + && (i.op[op].imms->X_add_number & ~(((offsetT) 2 << 31) - 1)) == 0) + { + i.op[op].imms->X_add_number = + (i.op[op].imms->X_add_number ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31); + } + i.types[op] |= smallest_imm_type (i.op[op].imms->X_add_number); + /* We must avoid matching of Imm32 templates when 64bit only immediate is available. */ + if (guess_suffix == QWORD_MNEM_SUFFIX) + i.types[op] &= ~Imm32; + break; + case O_absent: + case O_register: + abort (); + /* Symbols and expressions. */ + default: + /* Convert symbolic operand to proper sizes for matching. */ + switch (guess_suffix) + { + case QWORD_MNEM_SUFFIX: + i.types[op] = Imm64 | Imm32S; + break; + case LONG_MNEM_SUFFIX: + i.types[op] = Imm32 | Imm64; + break; + case WORD_MNEM_SUFFIX: + i.types[op] = Imm16 | Imm32 | Imm64; + break; + break; + case BYTE_MNEM_SUFFIX: + i.types[op] = Imm8 | Imm8S | Imm16 | Imm32S | Imm32; + break; + break; + } + break; } + } + } - /* If this operand is at most 16 bits, convert it to a - signed 16 bit number before trying to see whether it will - fit in an even smaller size. This allows a 16-bit operand - such as $0xffe0 to be recognised as within Imm8S range. */ - if ((i.types[op] & Imm16) - && (i.op[op].imms->X_add_number & ~(offsetT)0xffff) == 0) + if (i.disp_operands) + { + /* Try to use the smallest displacement type too. */ + int op; + + for (op = i.operands; --op >= 0;) + if ((i.types[op] & Disp) + && i.op[op].imms->X_op == O_constant) + { + offsetT disp = i.op[op].disps->X_add_number; + + if (i.types[op] & Disp16) + { + /* We know this operand is at most 16 bits, so + convert to a signed 16 bit number before trying + to see whether it will fit in an even smaller + size. */ + + disp = (((disp & 0xffff) ^ 0x8000) - 0x8000); + } + else if (i.types[op] & Disp32) { - i.op[op].imms->X_add_number = - (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000); + /* We know this operand is at most 32 bits, so convert to a + signed 32 bit number before trying to see whether it will + fit in an even smaller size. */ + disp &= (((offsetT) 2 << 31) - 1); + disp = (disp ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31); } - i.types[op] |= smallest_imm_type ((long) i.op[op].imms->X_add_number); + if (flag_code == CODE_64BIT) + { + if (fits_in_signed_long (disp)) + i.types[op] |= Disp32S; + if (fits_in_unsigned_long (disp)) + i.types[op] |= Disp32; + } + if ((i.types[op] & (Disp32 | Disp32S | Disp16)) + && fits_in_signed_byte (disp)) + i.types[op] |= Disp8; } } @@ -1374,28 +1700,36 @@ md_assemble (line) ? No_sSuf : (i.suffix == LONG_MNEM_SUFFIX ? No_lSuf - : (i.suffix == DWORD_MNEM_SUFFIX - ? No_dSuf + : (i.suffix == QWORD_MNEM_SUFFIX + ? No_qSuf : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0)))))); for (t = current_templates->start; t < current_templates->end; t++) { - /* Must have right number of operands. */ + /* Must have right number of operands. */ if (i.operands != t->operands) continue; /* Check the suffix, except for some instructions in intel mode. */ if ((t->opcode_modifier & suffix_check) && !(intel_syntax + && (t->opcode_modifier & IgnoreSize)) + && !(intel_syntax && t->base_opcode == 0xd9 - && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */ - || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */ + && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */ + || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */ continue; + /* Do not verify operands when there are none. */ else if (!t->operands) - break; /* 0 operands always matches */ + { + if (t->cpu_flags & ~cpu_arch_flags) + continue; + /* We've found a match; break out of loop. */ + break; + } overlap0 = i.types[0] & t->operand_types[0]; switch (t->operands) @@ -1414,12 +1748,11 @@ md_assemble (line) overlap1, i.types[1], t->operand_types[1])) { - - /* check if other direction is valid ... */ + /* Check if other direction is valid ... */ if ((t->opcode_modifier & (D|FloatD)) == 0) continue; - /* try reversing direction of operands */ + /* Try reversing direction of operands. */ overlap0 = i.types[0] & t->operand_types[1]; overlap1 = i.types[1] & t->operand_types[0]; if (!MATCH (overlap0, i.types[0], t->operand_types[1]) @@ -1429,16 +1762,15 @@ md_assemble (line) overlap1, i.types[1], t->operand_types[0])) { - /* does not match either direction */ + /* Does not match either direction. */ continue; } /* found_reverse_match holds which of D or FloatDR we've found. */ found_reverse_match = t->opcode_modifier & (D|FloatDR); - break; } - /* found a forward 2 operand match here */ - if (t->operands == 3) + /* Found a forward 2 operand match here. */ + else if (t->operands == 3) { /* Here we make use of the fact that there are no reverse match 3 operand instructions, and all 3 @@ -1453,29 +1785,41 @@ md_assemble (line) continue; } - /* found either forward/reverse 2 or 3 operand match here: - slip through to break */ + /* Found either forward/reverse 2 or 3 operand match here: + slip through to break. */ } - break; /* we've found a match; break out of loop */ - } /* for (t = ... */ + if (t->cpu_flags & ~cpu_arch_flags) + { + found_reverse_match = 0; + continue; + } + /* We've found a match; break out of loop. */ + break; + } if (t == current_templates->end) - { /* we found no match */ + { + /* We found no match. */ as_bad (_("suffix or operands invalid for `%s'"), current_templates->start->name); return; } - if (!intel_syntax - && (i.types[0] & JumpAbsolute) != (t->operand_types[0] & JumpAbsolute)) + if (!quiet_warnings) { - as_warn (_("indirect %s without `*'"), t->name); - } + if (!intel_syntax + && ((i.types[0] & JumpAbsolute) + != (t->operand_types[0] & JumpAbsolute))) + { + as_warn (_("indirect %s without `*'"), t->name); + } - if ((t->opcode_modifier & (IsPrefix|IgnoreSize)) == (IsPrefix|IgnoreSize)) - { - /* Warn them that a data or address size prefix doesn't affect - assembly of the next line of code. */ - as_warn (_("stand-alone `%s' prefix"), t->name); + if ((t->opcode_modifier & (IsPrefix|IgnoreSize)) + == (IsPrefix|IgnoreSize)) + { + /* Warn them that a data or address size prefix doesn't + affect assembly of the next line of code. */ + as_warn (_("stand-alone `%s' prefix"), t->name); + } } /* Copy the template we found. */ @@ -1493,16 +1837,16 @@ md_assemble (line) } /* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */ - if (SYSV386_COMPAT - && intel_syntax - && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) - i.tm.base_opcode ^= FloatR; + if (SYSV386_COMPAT + && intel_syntax + && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) + i.tm.base_opcode ^= FloatR; if (i.tm.opcode_modifier & FWait) if (! add_prefix (FWAIT_OPCODE)) return; - /* Check string instruction segment overrides */ + /* Check string instruction segment overrides. */ if ((i.tm.opcode_modifier & IsString) != 0 && i.mem_operands != 0) { int mem_op = (i.types[0] & AnyMem) ? 0 : 1; @@ -1533,31 +1877,47 @@ md_assemble (line) } } + if (i.reg_operands && flag_code < CODE_64BIT) + { + int op; + for (op = i.operands; --op >= 0;) + if ((i.types[op] & Reg) + && (i.op[op].regs->reg_flags & (RegRex64|RegRex))) + { + as_bad (_("Extended register `%%%s' available only in 64bit mode."), + i.op[op].regs->reg_name); + return; + } + } + /* If matched instruction specifies an explicit instruction mnemonic suffix, use it. */ - if (i.tm.opcode_modifier & (Size16 | Size32)) + if (i.tm.opcode_modifier & (Size16 | Size32 | Size64)) { if (i.tm.opcode_modifier & Size16) i.suffix = WORD_MNEM_SUFFIX; + else if (i.tm.opcode_modifier & Size64) + i.suffix = QWORD_MNEM_SUFFIX; else i.suffix = LONG_MNEM_SUFFIX; } else if (i.reg_operands) { /* If there's no instruction mnemonic suffix we try to invent one - based on register operands. */ + based on register operands. */ if (!i.suffix) { /* We take i.suffix from the last register operand specified, Destination register type is more significant than source register type. */ int op; - for (op = i.operands; --op >= 0; ) + for (op = i.operands; --op >= 0;) if ((i.types[op] & Reg) && !(i.tm.operand_types[op] & InOutPortReg)) { i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX : (i.types[op] & Reg16) ? WORD_MNEM_SUFFIX : + (i.types[op] & Reg64) ? QWORD_MNEM_SUFFIX : LONG_MNEM_SUFFIX); break; } @@ -1565,18 +1925,19 @@ md_assemble (line) else if (i.suffix == BYTE_MNEM_SUFFIX) { int op; - for (op = i.operands; --op >= 0; ) + for (op = i.operands; --op >= 0;) { /* If this is an eight bit register, it's OK. If it's the 16 or 32 bit version of an eight bit register, - we will just use the low portion, and that's OK too. */ + we will just use the low portion, and that's OK too. */ if (i.types[op] & Reg8) continue; - /* movzx and movsx should not generate this warning. */ + /* movzx and movsx should not generate this warning. */ if (intel_syntax && (i.tm.base_opcode == 0xfb7 || i.tm.base_opcode == 0xfb6 + || i.tm.base_opcode == 0x63 || i.tm.base_opcode == 0xfbe || i.tm.base_opcode == 0xfbf)) continue; @@ -1590,16 +1951,27 @@ md_assemble (line) #endif ) { + /* Prohibit these changes in the 64bit mode, since + the lowering is more complicated. */ + if (flag_code == CODE_64BIT + && (i.tm.operand_types[op] & InOutPortReg) == 0) + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); #if REGISTER_WARNINGS - if ((i.tm.operand_types[op] & InOutPortReg) == 0) + if (!quiet_warnings + && (i.tm.operand_types[op] & InOutPortReg) == 0) as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs - (i.types[op] & Reg16 ? 8 : 16))->reg_name, + (i.op[op].regs + + (i.types[op] & Reg16 + ? REGNAM_AL - REGNAM_AX + : REGNAM_AL - REGNAM_EAX))->reg_name, i.op[op].regs->reg_name, i.suffix); #endif continue; } - /* Any other register is bad */ + /* Any other register is bad. */ if (i.types[op] & (Reg | RegMMX | RegXMM | SReg2 | SReg3 | Control | Debug | Test @@ -1616,6 +1988,51 @@ md_assemble (line) else if (i.suffix == LONG_MNEM_SUFFIX) { int op; + + for (op = i.operands; --op >= 0;) + /* Reject eight bit registers, except where the template + requires them. (eg. movzb) */ + if ((i.types[op] & Reg8) != 0 + && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0) + { + as_bad (_("`%%%s' not allowed with `%s%c'"), + i.op[op].regs->reg_name, + i.tm.name, + i.suffix); + return; + } + /* Warn if the e prefix on a general reg is missing. */ + else if ((!quiet_warnings || flag_code == CODE_64BIT) + && (i.types[op] & Reg16) != 0 + && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) + { + /* Prohibit these changes in the 64bit mode, since + the lowering is more complicated. */ + if (flag_code == CODE_64BIT) + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); +#if REGISTER_WARNINGS + else + as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), + (i.op[op].regs + REGNAM_EAX - REGNAM_AX)->reg_name, + i.op[op].regs->reg_name, + i.suffix); +#endif + } + /* Warn if the r prefix on a general reg is missing. */ + else if ((i.types[op] & Reg64) != 0 + && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) + { + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + } + } + else if (i.suffix == QWORD_MNEM_SUFFIX) + { + int op; + for (op = i.operands; --op >= 0; ) /* Reject eight bit registers, except where the template requires them. (eg. movzb) */ @@ -1628,22 +2045,22 @@ md_assemble (line) i.suffix); return; } -#if REGISTER_WARNINGS /* Warn if the e prefix on a general reg is missing. */ - else if ((i.types[op] & Reg16) != 0 + else if (((i.types[op] & Reg16) != 0 + || (i.types[op] & Reg32) != 0) && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) { - as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs + 8)->reg_name, - i.op[op].regs->reg_name, - i.suffix); + /* Prohibit these changes in the 64bit mode, since + the lowering is more complicated. */ + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); } -#endif } else if (i.suffix == WORD_MNEM_SUFFIX) { int op; - for (op = i.operands; --op >= 0; ) + for (op = i.operands; --op >= 0;) /* Reject eight bit registers, except where the template requires them. (eg. movzb) */ if ((i.types[op] & Reg8) != 0 @@ -1655,65 +2072,87 @@ md_assemble (line) i.suffix); return; } -#if REGISTER_WARNINGS /* Warn if the e prefix on a general reg is present. */ - else if ((i.types[op] & Reg32) != 0 + else if ((!quiet_warnings || flag_code == CODE_64BIT) + && (i.types[op] & Reg32) != 0 && (i.tm.operand_types[op] & (Reg16|Acc)) != 0) { - as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs - 8)->reg_name, - i.op[op].regs->reg_name, - i.suffix); - } + /* Prohibit these changes in the 64bit mode, since + the lowering is more complicated. */ + if (flag_code == CODE_64BIT) + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + else +#if REGISTER_WARNINGS + as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), + (i.op[op].regs + REGNAM_AX - REGNAM_EAX)->reg_name, + i.op[op].regs->reg_name, + i.suffix); #endif + } } + else if (intel_syntax && (i.tm.opcode_modifier & IgnoreSize)) + /* Do nothing if the instruction is going to ignore the prefix. */ + ; else - abort(); + abort (); } else if ((i.tm.opcode_modifier & DefaultSize) && !i.suffix) { i.suffix = stackop_size; } - /* Make still unresolved immediate matches conform to size of immediate given in i.suffix. Note: overlap2 cannot be an immediate! */ - if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32)) + if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32 | Imm32S)) && overlap0 != Imm8 && overlap0 != Imm8S - && overlap0 != Imm16 && overlap0 != Imm32) + && overlap0 != Imm16 && overlap0 != Imm32S + && overlap0 != Imm32 && overlap0 != Imm64) { if (i.suffix) { overlap0 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) : - (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : Imm32)); + (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : + (i.suffix == QWORD_MNEM_SUFFIX ? Imm64 | Imm32S : Imm32))); } - else if (overlap0 == (Imm16 | Imm32)) + else if (overlap0 == (Imm16 | Imm32S | Imm32) + || overlap0 == (Imm16 | Imm32) + || overlap0 == (Imm16 | Imm32S)) { overlap0 = - (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32; + ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32S; } - else + if (overlap0 != Imm8 && overlap0 != Imm8S + && overlap0 != Imm16 && overlap0 != Imm32S + && overlap0 != Imm32 && overlap0 != Imm64) { as_bad (_("no instruction mnemonic suffix given; can't determine immediate size")); return; } } - if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32)) + if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32)) && overlap1 != Imm8 && overlap1 != Imm8S - && overlap1 != Imm16 && overlap1 != Imm32) + && overlap1 != Imm16 && overlap1 != Imm32S + && overlap1 != Imm32 && overlap1 != Imm64) { if (i.suffix) { overlap1 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) : - (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : Imm32)); + (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : + (i.suffix == QWORD_MNEM_SUFFIX ? Imm64 | Imm32S : Imm32))); } - else if (overlap1 == (Imm16 | Imm32)) + else if (overlap1 == (Imm16 | Imm32 | Imm32S) + || overlap1 == (Imm16 | Imm32) + || overlap1 == (Imm16 | Imm32S)) { overlap1 = - (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32; + ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32S; } - else + if (overlap1 != Imm8 && overlap1 != Imm8S + && overlap1 != Imm16 && overlap1 != Imm32S + && overlap1 != Imm32 && overlap1 != Imm64) { - as_bad (_("no instruction mnemonic suffix given; can't determine immediate size")); + as_bad (_("no instruction mnemonic suffix given; can't determine immediate size %x %c"),overlap1, i.suffix); return; } } @@ -1723,7 +2162,7 @@ md_assemble (line) if (overlap0 & ImplicitRegister) i.reg_operands--; if (overlap0 & Imm1) - i.imm_operands = 0; /* kludge for shift insns */ + i.imm_operands = 0; /* kludge for shift insns. */ i.types[1] = overlap1; if (overlap1 & ImplicitRegister) @@ -1742,7 +2181,7 @@ md_assemble (line) return; } - /* For movzx and movsx, need to check the register type */ + /* For movzx and movsx, need to check the register type. */ if (intel_syntax && (i.tm.base_opcode == 0xfb6 || i.tm.base_opcode == 0xfbe)) if (i.suffix && i.suffix == BYTE_MNEM_SUFFIX) @@ -1767,8 +2206,8 @@ md_assemble (line) /* Now select between word & dword operations via the operand size prefix, except for instructions that will ignore this prefix anyway. */ - if (((intel_syntax && (i.suffix == DWORD_MNEM_SUFFIX)) - || i.suffix == LONG_MNEM_SUFFIX) == flag_16bit_code + if (i.suffix != QWORD_MNEM_SUFFIX + && (i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT) && !(i.tm.opcode_modifier & IgnoreSize)) { unsigned int prefix = DATA_PREFIX_OPCODE; @@ -1778,9 +2217,21 @@ md_assemble (line) if (! add_prefix (prefix)) return; } + + /* Set mode64 for an operand. */ + if (i.suffix == QWORD_MNEM_SUFFIX + && !(i.tm.opcode_modifier & NoRex64)) + { + i.rex.mode64 = 1; + if (flag_code < CODE_64BIT) + { + as_bad (_("64bit operations available only in 64bit modes.")); + return; + } + } + /* Size floating point instruction. */ - if (i.suffix == LONG_MNEM_SUFFIX - || (intel_syntax && i.suffix == DWORD_MNEM_SUFFIX)) + if (i.suffix == LONG_MNEM_SUFFIX) { if (i.tm.opcode_modifier & FloatMF) i.tm.base_opcode ^= 4; @@ -1796,7 +2247,7 @@ md_assemble (line) expressionS *exp; - assert(i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS); + assert (i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS); exp = &im_expressions[i.imm_operands++]; i.op[i.operands].imms = exp; @@ -1806,7 +2257,7 @@ md_assemble (line) i.tm.extension_opcode = None; } - /* For insns with operands there are more diddles to do to the opcode. */ + /* For insns with operands there are more diddles to do to the opcode. */ if (i.operands) { /* Default segment register this instruction will use @@ -1820,33 +2271,35 @@ md_assemble (line) if (i.tm.opcode_modifier & regKludge) { unsigned int first_reg_op = (i.types[0] & Reg) ? 0 : 1; - /* Pretend we saw the extra register operand. */ - assert (i.op[first_reg_op+1].regs == 0); - i.op[first_reg_op+1].regs = i.op[first_reg_op].regs; - i.types[first_reg_op+1] = i.types[first_reg_op]; + /* Pretend we saw the extra register operand. */ + assert (i.op[first_reg_op + 1].regs == 0); + i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs; + i.types[first_reg_op + 1] = i.types[first_reg_op]; i.reg_operands = 2; } if (i.tm.opcode_modifier & ShortForm) { - /* The register or float register operand is in operand 0 or 1. */ + /* The register or float register operand is in operand 0 or 1. */ unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1; - /* Register goes in low 3 bits of opcode. */ + /* Register goes in low 3 bits of opcode. */ i.tm.base_opcode |= i.op[op].regs->reg_num; - if ((i.tm.opcode_modifier & Ugh) != 0) + if (i.op[op].regs->reg_flags & RegRex) + i.rex.extZ = 1; + if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0) { /* Warn about some common errors, but press on regardless. The first case can be generated by gcc (<= 2.8.1). */ if (i.operands == 2) { - /* reversed arguments on faddp, fsubp, etc. */ + /* Reversed arguments on faddp, fsubp, etc. */ as_warn (_("translating to `%s %%%s,%%%s'"), i.tm.name, i.op[1].regs->reg_name, i.op[0].regs->reg_name); } else { - /* extraneous `l' suffix on fp insn */ + /* Extraneous `l' suffix on fp insn. */ as_warn (_("translating to `%s %%%s'"), i.tm.name, i.op[0].regs->reg_name); } @@ -1857,10 +2310,10 @@ md_assemble (line) /* The opcode is completed (modulo i.tm.extension_opcode which must be put into the modrm byte). Now, we make the modrm & index base bytes based on all the - info we've collected. */ + info we've collected. */ /* i.reg_operands MUST be the number of real register operands; - implicit registers do not count. */ + implicit registers do not count. */ if (i.reg_operands == 2) { unsigned int source, dest; @@ -1883,15 +2336,23 @@ md_assemble (line) { i.rm.reg = i.op[dest].regs->reg_num; i.rm.regmem = i.op[source].regs->reg_num; + if (i.op[dest].regs->reg_flags & RegRex) + i.rex.extX = 1; + if (i.op[source].regs->reg_flags & RegRex) + i.rex.extZ = 1; } else { i.rm.reg = i.op[source].regs->reg_num; i.rm.regmem = i.op[dest].regs->reg_num; + if (i.op[dest].regs->reg_flags & RegRex) + i.rex.extZ = 1; + if (i.op[source].regs->reg_flags & RegRex) + i.rex.extX = 1; } } else - { /* if it's not 2 reg operands... */ + { /* If it's not 2 reg operands... */ if (i.mem_operands) { unsigned int fake_zero_displacement = 0; @@ -1908,65 +2369,104 @@ md_assemble (line) fake_zero_displacement = 1; if (! i.index_reg) { - /* Operand is just <disp> */ - if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0)) + /* Operand is just <disp> */ + if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)) { i.rm.regmem = NO_BASE_REGISTER_16; i.types[op] &= ~Disp; i.types[op] |= Disp16; } - else + else if (flag_code != CODE_64BIT) { i.rm.regmem = NO_BASE_REGISTER; i.types[op] &= ~Disp; i.types[op] |= Disp32; } + else + { + /* 64bit mode overwrites the 32bit + absolute addressing by RIP relative + addressing and absolute addressing + is encoded by one of the redundant + SIB forms. */ + + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; + i.sib.base = NO_BASE_REGISTER; + i.sib.index = NO_INDEX_REGISTER; + i.types[op] &= ~Disp; + i.types[op] |= Disp32S; + } } - else /* ! i.base_reg && i.index_reg */ + else /* ! i.base_reg && i.index_reg */ { i.sib.index = i.index_reg->reg_num; i.sib.base = NO_BASE_REGISTER; i.sib.scale = i.log2_scale_factor; i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; i.types[op] &= ~Disp; - i.types[op] |= Disp32; /* Must be 32 bit */ + if (flag_code != CODE_64BIT) + i.types[op] |= Disp32; /* Must be 32 bit */ + else + i.types[op] |= Disp32S; + if (i.index_reg->reg_flags & RegRex) + i.rex.extY = 1; } } + /* RIP addressing for 64bit mode. */ + else if (i.base_reg->reg_type == BaseIndex) + { + i.rm.regmem = NO_BASE_REGISTER; + i.types[op] &= ~Disp; + i.types[op] |= Disp32S; + i.flags[op] = Operand_PCrel; + } else if (i.base_reg->reg_type & Reg16) { switch (i.base_reg->reg_num) { - case 3: /* (%bx) */ + case 3: /* (%bx) */ if (! i.index_reg) i.rm.regmem = 7; - else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */ + else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */ i.rm.regmem = i.index_reg->reg_num - 6; break; - case 5: /* (%bp) */ + case 5: /* (%bp) */ default_seg = &ss; if (! i.index_reg) { i.rm.regmem = 6; if ((i.types[op] & Disp) == 0) { - /* fake (%bp) into 0(%bp) */ + /* fake (%bp) into 0(%bp) */ i.types[op] |= Disp8; fake_zero_displacement = 1; } } - else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */ + else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */ i.rm.regmem = i.index_reg->reg_num - 6 + 2; break; - default: /* (%si) -> 4 or (%di) -> 5 */ + default: /* (%si) -> 4 or (%di) -> 5 */ i.rm.regmem = i.base_reg->reg_num - 6 + 4; } i.rm.mode = mode_from_disp_size (i.types[op]); } - else /* i.base_reg and 32 bit mode */ + else /* i.base_reg and 32/64 bit mode */ { + if (flag_code == CODE_64BIT + && (i.types[op] & Disp)) + { + if (i.types[op] & Disp8) + i.types[op] = Disp8 | Disp32S; + else + i.types[op] = Disp32S; + } i.rm.regmem = i.base_reg->reg_num; + if (i.base_reg->reg_flags & RegRex) + i.rex.extZ = 1; i.sib.base = i.base_reg->reg_num; - if (i.base_reg->reg_num == EBP_REG_NUM) + /* x86-64 ignores REX prefix bit here to avoid + decoder complications. */ + if ((i.base_reg->reg_num & 7) == EBP_REG_NUM) { default_seg = &ss; if (i.disp_operands == 0) @@ -2000,6 +2500,8 @@ md_assemble (line) { i.sib.index = i.index_reg->reg_num; i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; + if (i.index_reg->reg_flags & RegRex) + i.rex.extY = 1; } i.rm.mode = mode_from_disp_size (i.types[op]); } @@ -2007,7 +2509,7 @@ md_assemble (line) if (fake_zero_displacement) { /* Fakes a zero displacement assuming that i.types[op] - holds the correct displacement size. */ + holds the correct displacement size. */ expressionS *exp; assert (i.op[op].disps == 0); @@ -2024,7 +2526,7 @@ md_assemble (line) operand (if any) based on i.tm.extension_opcode. Again, we must be careful to make sure that segment/control/debug/test/MMX registers are coded - into the i.rm.reg field. */ + into the i.rm.reg field. */ if (i.reg_operands) { unsigned int op = @@ -2040,11 +2542,19 @@ md_assemble (line) ? 1 : 2)); /* If there is an extension opcode to put here, the - register number must be put into the regmem field. */ + register number must be put into the regmem field. */ if (i.tm.extension_opcode != None) - i.rm.regmem = i.op[op].regs->reg_num; + { + i.rm.regmem = i.op[op].regs->reg_num; + if (i.op[op].regs->reg_flags & RegRex) + i.rex.extZ = 1; + } else - i.rm.reg = i.op[op].regs->reg_num; + { + i.rm.reg = i.op[op].regs->reg_num; + if (i.op[op].regs->reg_flags & RegRex) + i.rex.extX = 1; + } /* Now, if no memory operand has set i.rm.mode = 0, 1, 2 we must set it to 3 to indicate this is a register @@ -2053,19 +2563,22 @@ md_assemble (line) i.rm.mode = 3; } - /* Fill in i.rm.reg field with extension opcode (if any). */ + /* Fill in i.rm.reg field with extension opcode (if any). */ if (i.tm.extension_opcode != None) i.rm.reg = i.tm.extension_opcode; } } else if (i.tm.opcode_modifier & (Seg2ShortForm | Seg3ShortForm)) { - if (i.tm.base_opcode == POP_SEG_SHORT && i.op[0].regs->reg_num == 1) + if (i.tm.base_opcode == POP_SEG_SHORT + && i.op[0].regs->reg_num == 1) { as_bad (_("you can't `pop %%cs'")); return; } i.tm.base_opcode |= (i.op[0].regs->reg_num << 3); + if (i.op[0].regs->reg_flags & RegRex) + i.rex.extZ = 1; } else if ((i.tm.base_opcode & ~(D|W)) == MOV_AX_DISP32) { @@ -2090,14 +2603,14 @@ md_assemble (line) return; } } - else if ((i.tm.opcode_modifier & Ugh) != 0) + else if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0) { /* UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. */ as_warn (_("translating to `%sp'"), i.tm.name); } } - /* Handle conversion of 'int $3' --> special int3 insn. */ + /* Handle conversion of 'int $3' --> special int3 insn. */ if (i.tm.base_opcode == INT_OPCODE && i.op[0].imms->X_add_number == 3) { i.tm.base_opcode = INT3_OPCODE; @@ -2114,11 +2627,52 @@ md_assemble (line) i.op[0].disps->X_op = O_symbol; } - /* We are ready to output the insn. */ + if (i.tm.opcode_modifier & Rex64) + i.rex.mode64 = 1; + + /* For 8bit registers we would need an empty rex prefix. + Also in the case instruction is already having prefix, + we need to convert old registers to new ones. */ + + if (((i.types[0] & Reg8) && (i.op[0].regs->reg_flags & RegRex64)) + || ((i.types[1] & Reg8) && (i.op[1].regs->reg_flags & RegRex64)) + || ((i.rex.mode64 || i.rex.extX || i.rex.extY || i.rex.extZ || i.rex.empty) + && ((i.types[0] & Reg8) || (i.types[1] & Reg8)))) + { + int x; + i.rex.empty = 1; + for (x = 0; x < 2; x++) + { + /* Look for 8bit operand that does use old registers. */ + if (i.types[x] & Reg8 + && !(i.op[x].regs->reg_flags & RegRex64)) + { + /* In case it is "hi" register, give up. */ + if (i.op[x].regs->reg_num > 3) + as_bad (_("Can't encode registers '%%%s' in the instruction requiring REX prefix.\n"), + i.op[x].regs->reg_name); + + /* Otherwise it is equivalent to the extended register. + Since the encoding don't change this is merely cosmetical + cleanup for debug output. */ + + i.op[x].regs = i.op[x].regs + 8; + } + } + } + + if (i.rex.mode64 || i.rex.extX || i.rex.extY || i.rex.extZ || i.rex.empty) + add_prefix (0x40 + | (i.rex.mode64 ? 8 : 0) + | (i.rex.extX ? 4 : 0) + | (i.rex.extY ? 2 : 0) + | (i.rex.extZ ? 1 : 0)); + + /* We are ready to output the insn. */ { register char *p; - /* Output jumps. */ + /* Output jumps. */ if (i.tm.opcode_modifier & Jump) { int size; @@ -2126,7 +2680,7 @@ md_assemble (line) int prefix; code16 = 0; - if (flag_16bit_code) + if (flag_code == CODE_16BIT) code16 = CODE16; prefix = 0; @@ -2136,6 +2690,11 @@ md_assemble (line) i.prefixes -= 1; code16 ^= CODE16; } + if (i.prefix[REX_PREFIX]) + { + prefix++; + i.prefixes--; + } size = 4; if (code16) @@ -2153,8 +2712,10 @@ md_assemble (line) insn_size += prefix + 1; /* Prefix and 1 opcode byte go in fr_fix. */ p = frag_more (prefix + 1); - if (prefix) + if (i.prefix[DATA_PREFIX]) *p++ = DATA_PREFIX_OPCODE; + if (i.prefix[REX_PREFIX]) + *p++ = i.prefix[REX_PREFIX]; *p = i.tm.base_opcode; /* 1 possible extra opcode + displacement go in var part. Pass reloc in fr_var. */ @@ -2188,7 +2749,7 @@ md_assemble (line) int code16; code16 = 0; - if (flag_16bit_code) + if (flag_code == CODE_16BIT) code16 = CODE16; if (i.prefix[DATA_PREFIX]) @@ -2204,6 +2765,13 @@ md_assemble (line) size = 2; } + if (i.prefix[REX_PREFIX]) + { + FRAG_APPEND_1_CHAR (i.prefix[REX_PREFIX]); + insn_size++; + i.prefixes -= 1; + } + if (i.prefixes != 0 && !intel_syntax) as_warn (_("skipping prefixes on this instruction")); @@ -2214,7 +2782,7 @@ md_assemble (line) } else { - /* opcode can be at most two bytes */ + /* Opcode can be at most two bytes. */ insn_size += 2 + size; p = frag_more (2 + size); *p++ = (i.tm.base_opcode >> 8) & 0xff; @@ -2222,7 +2790,7 @@ md_assemble (line) *p++ = i.tm.base_opcode & 0xff; fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[0].disps, 1, reloc (size, 1, i.disp_reloc[0])); + i.op[0].disps, 1, reloc (size, 1, 1, i.disp_reloc[0])); } else if (i.tm.opcode_modifier & JumpInterSegment) { @@ -2231,7 +2799,7 @@ md_assemble (line) int code16; code16 = 0; - if (flag_16bit_code) + if (flag_code == CODE_16BIT) code16 = CODE16; prefix = 0; @@ -2241,6 +2809,11 @@ md_assemble (line) i.prefixes -= 1; code16 ^= CODE16; } + if (i.prefix[REX_PREFIX]) + { + prefix++; + i.prefixes -= 1; + } size = 4; if (code16) @@ -2249,14 +2822,20 @@ md_assemble (line) if (i.prefixes != 0 && !intel_syntax) as_warn (_("skipping prefixes on this instruction")); - insn_size += prefix + 1 + 2 + size; /* 1 opcode; 2 segment; offset */ + /* 1 opcode; 2 segment; offset */ + insn_size += prefix + 1 + 2 + size; p = frag_more (prefix + 1 + 2 + size); - if (prefix) + + if (i.prefix[DATA_PREFIX]) *p++ = DATA_PREFIX_OPCODE; + + if (i.prefix[REX_PREFIX]) + *p++ = i.prefix[REX_PREFIX]; + *p++ = i.tm.base_opcode; if (i.op[1].imms->X_op == O_constant) { - long n = (long) i.op[1].imms->X_add_number; + offsetT n = i.op[1].imms->X_add_number; if (size == 2 && !fits_in_unsigned_word (n) @@ -2265,11 +2844,11 @@ md_assemble (line) as_bad (_("16-bit jump out of range")); return; } - md_number_to_chars (p, (valueT) n, size); + md_number_to_chars (p, n, size); } else fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[1].imms, 0, reloc (size, 0, i.disp_reloc[0])); + i.op[1].imms, 0, reloc (size, 0, 0, i.disp_reloc[0])); if (i.op[0].imms->X_op != O_constant) as_bad (_("can't handle non absolute segment in `%s'"), i.tm.name); @@ -2277,10 +2856,15 @@ md_assemble (line) } else { - /* Output normal instructions here. */ + /* Output normal instructions here. */ unsigned char *q; - /* The prefix bytes. */ + /* All opcodes on i386 have eighter 1 or 2 bytes. We may use third + byte for the SSE instructions to specify prefix they require. */ + if (i.tm.base_opcode & 0xff0000) + add_prefix ((i.tm.base_opcode >> 16) & 0xff); + + /* The prefix bytes. */ for (q = i.prefix; q < i.prefix + sizeof (i.prefix) / sizeof (i.prefix[0]); q++) @@ -2293,37 +2877,20 @@ md_assemble (line) } } - /* Now the opcode; be careful about word order here! */ + /* Now the opcode; be careful about word order here! */ if (fits_in_unsigned_byte (i.tm.base_opcode)) { insn_size += 1; FRAG_APPEND_1_CHAR (i.tm.base_opcode); } - else if (fits_in_unsigned_word (i.tm.base_opcode)) + else { insn_size += 2; p = frag_more (2); - /* put out high byte first: can't use md_number_to_chars! */ + /* Put out high byte first: can't use md_number_to_chars! */ *p++ = (i.tm.base_opcode >> 8) & 0xff; *p = i.tm.base_opcode & 0xff; } - else - { /* opcode is either 3 or 4 bytes */ - if (i.tm.base_opcode & 0xff000000) - { - insn_size += 4; - p = frag_more (4); - *p++ = (i.tm.base_opcode >> 24) & 0xff; - } - else - { - insn_size += 3; - p = frag_more (3); - } - *p++ = (i.tm.base_opcode >> 16) & 0xff; - *p++ = (i.tm.base_opcode >> 8) & 0xff; - *p = (i.tm.base_opcode) & 0xff; - } /* Now the modrm byte and sib byte (if present). */ if (i.tm.opcode_modifier & Modrm) @@ -2363,47 +2930,78 @@ md_assemble (line) { if (i.op[n].disps->X_op == O_constant) { - int size = 4; - long val = (long) i.op[n].disps->X_add_number; + int size; + offsetT val; - if (i.types[n] & (Disp8 | Disp16)) + size = 4; + if (i.types[n] & (Disp8 | Disp16 | Disp64)) { - long mask; - size = 2; - mask = ~ (long) 0xffff; if (i.types[n] & Disp8) - { - size = 1; - mask = ~ (long) 0xff; - } - - if ((val & mask) != 0 && (val & mask) != mask) - as_warn (_("%ld shortened to %ld"), - val, val & ~mask); + size = 1; + if (i.types[n] & Disp64) + size = 8; } + val = offset_in_range (i.op[n].disps->X_add_number, + size); insn_size += size; p = frag_more (size); - md_number_to_chars (p, (valueT) val, size); + md_number_to_chars (p, val, size); } else { int size = 4; + int sign = 0; + int pcrel = (i.flags[n] & Operand_PCrel) != 0; - if (i.types[n] & Disp16) - size = 2; + /* The PC relative address is computed relative + to the instruction boundary, so in case immediate + fields follows, we need to adjust the value. */ + if (pcrel && i.imm_operands) + { + int imm_size = 4; + register unsigned int n1; + + for (n1 = 0; n1 < i.operands; n1++) + if (i.types[n1] & Imm) + { + if (i.types[n1] & (Imm8 | Imm8S | Imm16 | Imm64)) + { + imm_size = 2; + if (i.types[n1] & (Imm8 | Imm8S)) + imm_size = 1; + if (i.types[n1] & Imm64) + imm_size = 8; + } + break; + } + /* We should find the immediate. */ + if (n1 == i.operands) + abort (); + i.op[n].disps->X_add_number -= imm_size; + } + + if (i.types[n] & Disp32S) + sign = 1; + + if (i.types[n] & (Disp16 | Disp64)) + { + size = 2; + if (i.types[n] & Disp64) + size = 8; + } insn_size += size; p = frag_more (size); fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[n].disps, 0, - reloc (size, 0, i.disp_reloc[n])); + i.op[n].disps, pcrel, + reloc (size, pcrel, sign, i.disp_reloc[n])); } } } - } /* end displacement output */ + } - /* output immediate */ + /* Output immediate. */ if (i.imm_operands) { register unsigned int n; @@ -2414,48 +3012,53 @@ md_assemble (line) { if (i.op[n].imms->X_op == O_constant) { - int size = 4; - long val = (long) i.op[n].imms->X_add_number; + int size; + offsetT val; - if (i.types[n] & (Imm8 | Imm8S | Imm16)) + size = 4; + if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64)) { - long mask; - size = 2; - mask = ~ (long) 0xffff; if (i.types[n] & (Imm8 | Imm8S)) - { - size = 1; - mask = ~ (long) 0xff; - } - if ((val & mask) != 0 && (val & mask) != mask) - as_warn (_("%ld shortened to %ld"), - val, val & ~mask); + size = 1; + else if (i.types[n] & Imm64) + size = 8; } + val = offset_in_range (i.op[n].imms->X_add_number, + size); insn_size += size; p = frag_more (size); - md_number_to_chars (p, (valueT) val, size); + md_number_to_chars (p, val, size); } else - { /* not absolute_section */ - /* Need a 32-bit fixup (don't support 8bit + { + /* Not absolute_section. + Need a 32-bit fixup (don't support 8bit non-absolute imms). Try to support other - sizes ... */ + sizes ... */ #ifdef BFD_ASSEMBLER enum bfd_reloc_code_real reloc_type; #else int reloc_type; #endif int size = 4; + int sign = 0; - if (i.types[n] & Imm16) - size = 2; - else if (i.types[n] & (Imm8 | Imm8S)) - size = 1; + if ((i.types[n] & (Imm32S)) + && i.suffix == QWORD_MNEM_SUFFIX) + sign = 1; + if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64)) + { + size = 2; + if (i.types[n] & (Imm8 | Imm8S)) + size = 1; + if (i.types[n] & Imm64) + size = 8; + } insn_size += size; p = frag_more (size); - reloc_type = reloc (size, 0, i.disp_reloc[0]); + reloc_type = reloc (size, 0, sign, i.disp_reloc[0]); #ifdef BFD_ASSEMBLER if (reloc_type == BFD_RELOC_32 && GOT_symbol @@ -2466,6 +3069,9 @@ md_assemble (line) (i.op[n].imms->X_op_symbol)->X_op) == O_subtract)))) { + /* We don't support dynamic linking on x86-64 yet. */ + if (flag_code == CODE_64BIT) + abort (); reloc_type = BFD_RELOC_386_GOTPC; i.op[n].imms->X_add_number += 3; } @@ -2475,15 +3081,17 @@ md_assemble (line) } } } - } /* end immediate output */ + } } + dwarf2_emit_insn (insn_size); + #ifdef DEBUG386 if (flag_debug) { pi (line, &i); } -#endif /* DEBUG386 */ +#endif /* DEBUG386 */ } } @@ -2495,7 +3103,7 @@ i386_immediate (imm_start) { char *save_input_line_pointer; segT exp_seg = 0; - expressionS * exp; + expressionS *exp; if (i.imm_operands == MAX_IMMEDIATE_OPERANDS) { @@ -2514,12 +3122,10 @@ i386_immediate (imm_start) #ifndef LEX_AT { - /* - * We can have operands of the form - * <symbol>@GOTOFF+<nnn> - * Take the easy way out here and copy everything - * into a temporary buffer... - */ + /* We can have operands of the form + <symbol>@GOTOFF+<nnn> + Take the easy way out here and copy everything + into a temporary buffer... */ register char *cp; cp = strchr (input_line_pointer, '@'); @@ -2529,8 +3135,8 @@ i386_immediate (imm_start) int len = 0; int first; - /* GOT relocations are not supported in 16 bit mode */ - if (flag_16bit_code) + /* GOT relocations are not supported in 16 bit mode. */ + if (flag_code == CODE_16BIT) as_bad (_("GOT relocations not supported in 16 bit mode")); if (GOT_symbol == NULL) @@ -2538,17 +3144,33 @@ i386_immediate (imm_start) if (strncmp (cp + 1, "PLT", 3) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; + if (flag_code == CODE_64BIT) + i.disp_reloc[this_operand] = BFD_RELOC_X86_64_PLT32; + else + i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; len = 3; } else if (strncmp (cp + 1, "GOTOFF", 6) == 0) { + if (flag_code == CODE_64BIT) + as_bad ("GOTOFF relocations are unsupported in 64bit mode."); i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF; len = 6; } + else if (strncmp (cp + 1, "GOTPCREL", 8) == 0) + { + if (flag_code == CODE_64BIT) + i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL; + else + as_bad ("GOTPCREL relocations are supported only in 64bit mode."); + len = 8; + } else if (strncmp (cp + 1, "GOT", 3) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; + if (flag_code == CODE_64BIT) + i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOT32; + else + i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; len = 3; } else @@ -2557,7 +3179,7 @@ i386_immediate (imm_start) /* Replace the relocation token with ' ', so that errors like foo@GOTOFF1 will be detected. */ first = cp - input_line_pointer; - tmpbuf = (char *) alloca (strlen(input_line_pointer)); + tmpbuf = (char *) alloca (strlen (input_line_pointer)); memcpy (tmpbuf, input_line_pointer, first); tmpbuf[first] = ' '; strcpy (tmpbuf + first + 1, cp + 1 + len); @@ -2576,7 +3198,7 @@ i386_immediate (imm_start) if (exp->X_op == O_absent || exp->X_op == O_big) { - /* missing or bad expr becomes absolute 0 */ + /* Missing or bad expr becomes absolute 0. */ as_bad (_("missing or invalid immediate expression `%s' taken as 0"), imm_start); exp->X_op = O_constant; @@ -2584,17 +3206,21 @@ i386_immediate (imm_start) exp->X_add_symbol = (symbolS *) 0; exp->X_op_symbol = (symbolS *) 0; } - - if (exp->X_op == O_constant) + else if (exp->X_op == O_constant) { - i.types[this_operand] |= Imm32; /* Size it properly later. */ + /* Size it properly later. */ + i.types[this_operand] |= Imm64; + /* If BFD64, sign extend val. */ + if (!use_rela_relocations) + if ((exp->X_add_number & ~(((addressT) 2 << 31) - 1)) == 0) + exp->X_add_number = (exp->X_add_number ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31); } #if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)) - else if ( + else if (1 #ifdef BFD_ASSEMBLER - OUTPUT_FLAVOR == bfd_target_aout_flavour && + && OUTPUT_FLAVOR == bfd_target_aout_flavour #endif - exp_seg != text_section + && exp_seg != text_section && exp_seg != data_section && exp_seg != bss_section && exp_seg != undefined_section @@ -2615,10 +3241,8 @@ i386_immediate (imm_start) { /* This is an address. The size of the address will be determined later, depending on destination register, - suffix, or the default for the section. We exclude - Imm8S here so that `push $foo' and other instructions - with an Imm8S form will use Imm16 or Imm32. */ - i.types[this_operand] |= (Imm8 | Imm16 | Imm32); + suffix, or the default for the section. */ + i.types[this_operand] |= Imm8 | Imm16 | Imm32 | Imm32S | Imm64; } return 1; @@ -2677,8 +3301,10 @@ i386_displacement (disp_start, disp_end) char *save_input_line_pointer; int bigdisp = Disp32; - if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0)) + if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)) bigdisp = Disp16; + if (flag_code == CODE_64BIT) + bigdisp = Disp64; i.types[this_operand] |= bigdisp; exp = &disp_expressions[i.disp_operands]; @@ -2727,20 +3353,17 @@ i386_displacement (disp_start, disp_end) rorl $16,%edx #NO_APP - So here we provide the missing zero. - */ + So here we provide the missing zero. */ *displacement_string_end = '0'; } #endif #ifndef LEX_AT { - /* - * We can have operands of the form - * <symbol>@GOTOFF+<nnn> - * Take the easy way out here and copy everything - * into a temporary buffer... - */ + /* We can have operands of the form + <symbol>@GOTOFF+<nnn> + Take the easy way out here and copy everything + into a temporary buffer... */ register char *cp; cp = strchr (input_line_pointer, '@'); @@ -2750,8 +3373,8 @@ i386_displacement (disp_start, disp_end) int len = 0; int first; - /* GOT relocations are not supported in 16 bit mode */ - if (flag_16bit_code) + /* GOT relocations are not supported in 16 bit mode. */ + if (flag_code == CODE_16BIT) as_bad (_("GOT relocations not supported in 16 bit mode")); if (GOT_symbol == NULL) @@ -2759,17 +3382,32 @@ i386_displacement (disp_start, disp_end) if (strncmp (cp + 1, "PLT", 3) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; + if (flag_code == CODE_64BIT) + i.disp_reloc[this_operand] = BFD_RELOC_X86_64_PLT32; + else + i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; len = 3; } else if (strncmp (cp + 1, "GOTOFF", 6) == 0) { + if (flag_code == CODE_64BIT) + as_bad ("GOTOFF relocation is not supported in 64bit mode."); i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF; len = 6; } + else if (strncmp (cp + 1, "GOTPCREL", 8) == 0) + { + if (flag_code != CODE_64BIT) + as_bad ("GOTPCREL relocation is supported only in 64bit mode."); + i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL; + len = 8; + } else if (strncmp (cp + 1, "GOT", 3) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; + if (flag_code == CODE_64BIT) + i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOT32; + else + i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; len = 3; } else @@ -2778,7 +3416,7 @@ i386_displacement (disp_start, disp_end) /* Replace the relocation token with ' ', so that errors like foo@GOTOFF1 will be detected. */ first = cp - input_line_pointer; - tmpbuf = (char *) alloca (strlen(input_line_pointer)); + tmpbuf = (char *) alloca (strlen (input_line_pointer)); memcpy (tmpbuf, input_line_pointer, first); tmpbuf[first] = ' '; strcpy (tmpbuf + first + 1, cp + 1 + len); @@ -2792,16 +3430,20 @@ i386_displacement (disp_start, disp_end) #ifdef BFD_ASSEMBLER /* We do this to make sure that the section symbol is in the symbol table. We will ultimately change the relocation - to be relative to the beginning of the section */ - if (i.disp_reloc[this_operand] == BFD_RELOC_386_GOTOFF) + to be relative to the beginning of the section. */ + if (i.disp_reloc[this_operand] == BFD_RELOC_386_GOTOFF + || i.disp_reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) { - if (S_IS_LOCAL(exp->X_add_symbol) + if (S_IS_LOCAL (exp->X_add_symbol) && S_GET_SEGMENT (exp->X_add_symbol) != undefined_section) section_symbol (S_GET_SEGMENT (exp->X_add_symbol)); assert (exp->X_op == O_symbol); exp->X_op = O_subtract; exp->X_op_symbol = GOT_symbol; - i.disp_reloc[this_operand] = BFD_RELOC_32; + if (i.disp_reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) + i.disp_reloc[this_operand] = BFD_RELOC_32_PCREL; + else + i.disp_reloc[this_operand] = BFD_RELOC_32; } #endif @@ -2817,7 +3459,7 @@ i386_displacement (disp_start, disp_end) if (exp->X_op == O_absent || exp->X_op == O_big) { - /* missing or bad expr becomes absolute 0 */ + /* Missing or bad expr becomes absolute 0. */ as_bad (_("missing or invalid displacement expression `%s' taken as 0"), disp_start); exp->X_op = O_constant; @@ -2826,28 +3468,15 @@ i386_displacement (disp_start, disp_end) exp->X_op_symbol = (symbolS *) 0; } - if (exp->X_op == O_constant) - { - if (i.types[this_operand] & Disp16) - { - /* We know this operand is at most 16 bits, so convert to a - signed 16 bit number before trying to see whether it will - fit in an even smaller size. */ - exp->X_add_number = - (((exp->X_add_number & 0xffff) ^ 0x8000) - 0x8000); - } - if (fits_in_signed_byte (exp->X_add_number)) - i.types[this_operand] |= Disp8; - } #if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)) - else if ( + if (exp->X_op != O_constant #ifdef BFD_ASSEMBLER - OUTPUT_FLAVOR == bfd_target_aout_flavour && + && OUTPUT_FLAVOR == bfd_target_aout_flavour #endif - exp_seg != text_section - && exp_seg != data_section - && exp_seg != bss_section - && exp_seg != undefined_section) + && exp_seg != text_section + && exp_seg != data_section + && exp_seg != bss_section + && exp_seg != undefined_section) { #ifdef BFD_ASSEMBLER as_bad (_("unimplemented segment %s in operand"), exp_seg->name); @@ -2857,239 +3486,72 @@ i386_displacement (disp_start, disp_end) return 0; } #endif + else if (flag_code == CODE_64BIT) + i.types[this_operand] |= Disp32S | Disp32; return 1; } -static int i386_operand_modifier PARAMS ((char **, int)); - -static int -i386_operand_modifier (op_string, got_a_float) - char **op_string; - int got_a_float; -{ - if (!strncasecmp (*op_string, "BYTE PTR", 8)) - { - i.suffix = BYTE_MNEM_SUFFIX; - *op_string += 8; - return BYTE_PTR; - - } - else if (!strncasecmp (*op_string, "WORD PTR", 8)) - { - if (got_a_float == 2) /* "fi..." */ - i.suffix = SHORT_MNEM_SUFFIX; - else - i.suffix = WORD_MNEM_SUFFIX; - *op_string += 8; - return WORD_PTR; - } - - else if (!strncasecmp (*op_string, "DWORD PTR", 9)) - { - if (got_a_float == 1) /* "f..." */ - i.suffix = SHORT_MNEM_SUFFIX; - else - i.suffix = LONG_MNEM_SUFFIX; - *op_string += 9; - return DWORD_PTR; - } - - else if (!strncasecmp (*op_string, "QWORD PTR", 9)) - { - i.suffix = DWORD_MNEM_SUFFIX; - *op_string += 9; - return QWORD_PTR; - } - - else if (!strncasecmp (*op_string, "XWORD PTR", 9)) - { - i.suffix = LONG_DOUBLE_MNEM_SUFFIX; - *op_string += 9; - return XWORD_PTR; - } - - else if (!strncasecmp (*op_string, "SHORT", 5)) - { - *op_string += 5; - return SHORT; - } - - else if (!strncasecmp (*op_string, "OFFSET FLAT:", 12)) - { - *op_string += 12; - return OFFSET_FLAT; - } - - else if (!strncasecmp (*op_string, "FLAT", 4)) - { - *op_string += 4; - return FLAT; - } - - else return NONE_FOUND; -} - -static char * build_displacement_string PARAMS ((int, char *)); - -static char * -build_displacement_string (initial_disp, op_string) - int initial_disp; - char *op_string; -{ - char *temp_string = (char *) malloc (strlen (op_string) + 1); - char *end_of_operand_string; - char *tc; - char *temp_disp; - - temp_string[0] = '\0'; - tc = end_of_operand_string = strchr (op_string, '['); - if (initial_disp && !end_of_operand_string) - { - strcpy (temp_string, op_string); - return temp_string; - } - - /* Build the whole displacement string */ - if (initial_disp) - { - strncpy (temp_string, op_string, end_of_operand_string - op_string); - temp_string[end_of_operand_string - op_string] = '\0'; - temp_disp = tc; - } - else - temp_disp = op_string; - - while (*temp_disp != '\0') - { - char *end_op; - int add_minus = (*temp_disp == '-'); - - if (*temp_disp == '+' || *temp_disp == '-' || *temp_disp == '[') - temp_disp++; - - if (is_space_char (*temp_disp)) - temp_disp++; - - /* Don't consider registers */ - if ( !((*temp_disp == REGISTER_PREFIX || allow_naked_reg) - && parse_register (temp_disp, &end_op)) ) - { - char *string_start = temp_disp; - - while (*temp_disp != ']' - && *temp_disp != '+' - && *temp_disp != '-' - && *temp_disp != '*') - ++temp_disp; - - if (add_minus) - strcat (temp_string, "-"); - else - strcat (temp_string, "+"); - - strncat (temp_string, string_start, temp_disp - string_start); - if (*temp_disp == '+' || *temp_disp == '-') - --temp_disp; - } - - while (*temp_disp != '\0' - && *temp_disp != '+' - && *temp_disp != '-') - ++temp_disp; - } - - return temp_string; -} - -static int i386_parse_seg PARAMS ((char *)); - -static int -i386_parse_seg (op_string) - char *op_string; -{ - if (is_space_char (*op_string)) - ++op_string; - - /* Should be one of es, cs, ss, ds fs or gs */ - switch (*op_string++) - { - case 'e': - i.seg[i.mem_operands] = &es; - break; - case 'c': - i.seg[i.mem_operands] = &cs; - break; - case 's': - i.seg[i.mem_operands] = &ss; - break; - case 'd': - i.seg[i.mem_operands] = &ds; - break; - case 'f': - i.seg[i.mem_operands] = &fs; - break; - case 'g': - i.seg[i.mem_operands] = &gs; - break; - default: - as_bad (_("bad segment name `%s'"), op_string); - return 0; - } - - if (*op_string++ != 's') - { - as_bad (_("bad segment name `%s'"), op_string); - return 0; - } - - if (is_space_char (*op_string)) - ++op_string; - - if (*op_string != ':') - { - as_bad (_("bad segment name `%s'"), op_string); - return 0; - } - - return 1; - -} - -static int i386_index_check PARAMS((const char *)); +static int i386_index_check PARAMS ((const char *)); /* Make sure the memory operand we've been dealt is valid. - Returns 1 on success, 0 on a failure. -*/ + Return 1 on success, 0 on a failure. */ + static int i386_index_check (operand_string) const char *operand_string; { + int ok; #if INFER_ADDR_PREFIX int fudged = 0; tryprefix: #endif - if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0) - /* 16 bit mode checks */ - ? ((i.base_reg - && ((i.base_reg->reg_type & (Reg16|BaseIndex)) - != (Reg16|BaseIndex))) - || (i.index_reg - && (((i.index_reg->reg_type & (Reg16|BaseIndex)) - != (Reg16|BaseIndex)) - || ! (i.base_reg - && i.base_reg->reg_num < 6 - && i.index_reg->reg_num >= 6 - && i.log2_scale_factor == 0)))) - /* 32 bit mode checks */ - : ((i.base_reg - && (i.base_reg->reg_type & Reg32) == 0) - || (i.index_reg - && ((i.index_reg->reg_type & (Reg32|BaseIndex)) - != (Reg32|BaseIndex))))) + ok = 1; + if (flag_code == CODE_64BIT) + { + /* 64bit checks. */ + if ((i.base_reg + && ((i.base_reg->reg_type & Reg64) == 0) + && (i.base_reg->reg_type != BaseIndex + || i.index_reg)) + || (i.index_reg + && ((i.index_reg->reg_type & (Reg64|BaseIndex)) + != (Reg64|BaseIndex)))) + ok = 0; + } + else + { + if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)) + { + /* 16bit checks. */ + if ((i.base_reg + && ((i.base_reg->reg_type & (Reg16|BaseIndex|RegRex)) + != (Reg16|BaseIndex))) + || (i.index_reg + && (((i.index_reg->reg_type & (Reg16|BaseIndex)) + != (Reg16|BaseIndex)) + || ! (i.base_reg + && i.base_reg->reg_num < 6 + && i.index_reg->reg_num >= 6 + && i.log2_scale_factor == 0)))) + ok = 0; + } + else + { + /* 32bit checks. */ + if ((i.base_reg + && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32) + || (i.index_reg + && ((i.index_reg->reg_type & (Reg32|BaseIndex|RegRex)) + != (Reg32|BaseIndex)))) + ok = 0; + } + } + if (!ok) { #if INFER_ADDR_PREFIX - if (i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0') + if (flag_code != CODE_64BIT + && i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0') { i.prefix[ADDR_PREFIX] = ADDR_PREFIX_OPCODE; i.prefixes += 1; @@ -3097,8 +3559,7 @@ i386_index_check (operand_string) Disp16 or Disp32 is set. FIXME. There doesn't seem to be any real need for separate Disp16 and Disp32 flags. The same goes for Imm16 and Imm32. - Removing them would probably clean up the code quite a lot. - */ + Removing them would probably clean up the code quite a lot. */ if (i.types[this_operand] & (Disp16|Disp32)) i.types[this_operand] ^= (Disp16|Disp32); fudged = 1; @@ -3111,260 +3572,14 @@ i386_index_check (operand_string) #endif as_bad (_("`%s' is not a valid %s bit base/index expression"), operand_string, - flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0) ? "16" : "32"); - return 0; - } - return 1; -} - -static int i386_intel_memory_operand PARAMS ((char *)); - -static int -i386_intel_memory_operand (operand_string) - char *operand_string; -{ - char *op_string = operand_string; - char *end_of_operand_string; - - if ((i.mem_operands == 1 - && (current_templates->start->opcode_modifier & IsString) == 0) - || i.mem_operands == 2) - { - as_bad (_("too many memory references for `%s'"), - current_templates->start->name); + flag_code_names[flag_code]); return 0; } - - /* First check for a segment override. */ - if (*op_string != '[') - { - char *end_seg; - - end_seg = strchr (op_string, ':'); - if (end_seg) - { - if (!i386_parse_seg (op_string)) - return 0; - op_string = end_seg + 1; - } - } - - /* Look for displacement preceding open bracket */ - if (*op_string != '[') - { - char *temp_string; - - if (i.disp_operands) - return 0; - - temp_string = build_displacement_string (true, op_string); - - if (!i386_displacement (temp_string, temp_string + strlen (temp_string))) - { - free (temp_string); - return 0; - } - free (temp_string); - - end_of_operand_string = strchr (op_string, '['); - if (!end_of_operand_string) - end_of_operand_string = op_string + strlen (op_string); - - if (is_space_char (*end_of_operand_string)) - --end_of_operand_string; - - op_string = end_of_operand_string; - } - - if (*op_string == '[') - { - ++op_string; - - /* Pick off each component and figure out where it belongs */ - - end_of_operand_string = op_string; - - while (*op_string != ']') - { - const reg_entry *temp_reg; - char *end_op; - char *temp_string; - - while (*end_of_operand_string != '+' - && *end_of_operand_string != '-' - && *end_of_operand_string != '*' - && *end_of_operand_string != ']') - end_of_operand_string++; - - temp_string = op_string; - if (*temp_string == '+') - { - ++temp_string; - if (is_space_char (*temp_string)) - ++temp_string; - } - - if ((*temp_string == REGISTER_PREFIX || allow_naked_reg) - && (temp_reg = parse_register (temp_string, &end_op)) != NULL) - { - if (i.base_reg == NULL) - i.base_reg = temp_reg; - else - i.index_reg = temp_reg; - - i.types[this_operand] |= BaseIndex; - } - else if (*temp_string == REGISTER_PREFIX) - { - as_bad (_("bad register name `%s'"), temp_string); - return 0; - } - else if (is_digit_char (*op_string) - || *op_string == '+' || *op_string == '-') - { - char *temp_str; - - if (i.disp_operands != 0) - return 0; - - temp_string = build_displacement_string (false, op_string); - - temp_str = temp_string; - if (*temp_str == '+') - ++temp_str; - - if (!i386_displacement (temp_str, temp_str + strlen (temp_str))) - { - free (temp_string); - return 0; - } - free (temp_string); - - ++op_string; - end_of_operand_string = op_string; - while (*end_of_operand_string != ']' - && *end_of_operand_string != '+' - && *end_of_operand_string != '-' - && *end_of_operand_string != '*') - ++end_of_operand_string; - } - else if (*op_string == '*') - { - ++op_string; - - if (i.base_reg && !i.index_reg) - { - i.index_reg = i.base_reg; - i.base_reg = 0; - } - - if (!i386_scale (op_string)) - return 0; - } - op_string = end_of_operand_string; - ++end_of_operand_string; - } - } - - if (i386_index_check (operand_string) == 0) - return 0; - - i.mem_operands++; - return 1; -} - -static int -i386_intel_operand (operand_string, got_a_float) - char *operand_string; - int got_a_float; -{ - const reg_entry * r; - char *end_op; - char *op_string = operand_string; - - int operand_modifier = i386_operand_modifier (&op_string, got_a_float); - if (is_space_char (*op_string)) - ++op_string; - - switch (operand_modifier) - { - case BYTE_PTR: - case WORD_PTR: - case DWORD_PTR: - case QWORD_PTR: - case XWORD_PTR: - if (!i386_intel_memory_operand (op_string)) - return 0; - break; - - case FLAT: - case OFFSET_FLAT: - if (!i386_immediate (op_string)) - return 0; - break; - - case SHORT: - case NONE_FOUND: - /* Should be register or immediate */ - if (is_digit_char (*op_string) - && strchr (op_string, '[') == 0) - { - if (!i386_immediate (op_string)) - return 0; - } - else if ((*op_string == REGISTER_PREFIX || allow_naked_reg) - && (r = parse_register (op_string, &end_op)) != NULL) - { - /* Check for a segment override by searching for ':' after a - segment register. */ - op_string = end_op; - if (is_space_char (*op_string)) - ++op_string; - if (*op_string == ':' && (r->reg_type & (SReg2 | SReg3))) - { - switch (r->reg_num) - { - case 0: - i.seg[i.mem_operands] = &es; - break; - case 1: - i.seg[i.mem_operands] = &cs; - break; - case 2: - i.seg[i.mem_operands] = &ss; - break; - case 3: - i.seg[i.mem_operands] = &ds; - break; - case 4: - i.seg[i.mem_operands] = &fs; - break; - case 5: - i.seg[i.mem_operands] = &gs; - break; - } - - } - i.types[this_operand] |= r->reg_type & ~BaseIndex; - i.op[this_operand].regs = r; - i.reg_operands++; - } - else if (*op_string == REGISTER_PREFIX) - { - as_bad (_("bad register name `%s'"), op_string); - return 0; - } - else if (!i386_intel_memory_operand (op_string)) - return 0; - - break; - } /* end switch */ - return 1; } /* Parse OPERAND_STRING into the i386_insn structure I. Returns non-zero - on error. */ + on error. */ static int i386_operand (operand_string) @@ -3378,7 +3593,7 @@ i386_operand (operand_string) ++op_string; /* We check for an absolute prefix (differentiating, - for example, 'jmp pc_relative_label' from 'jmp *absolute_label'. */ + for example, 'jmp pc_relative_label' from 'jmp *absolute_label'. */ if (*op_string == ABSOLUTE_PREFIX) { ++op_string; @@ -3387,7 +3602,7 @@ i386_operand (operand_string) i.types[this_operand] |= JumpAbsolute; } - /* Check if operand is a register. */ + /* Check if operand is a register. */ if ((*op_string == REGISTER_PREFIX || allow_naked_reg) && (r = parse_register (op_string, &end_op)) != NULL) { @@ -3433,7 +3648,7 @@ i386_operand (operand_string) as_bad (_("bad memory operand `%s'"), op_string); return 0; } - /* Handle case of %es:*foo. */ + /* Handle case of %es:*foo. */ if (*op_string == ABSOLUTE_PREFIX) { ++op_string; @@ -3458,7 +3673,7 @@ i386_operand (operand_string) return 0; } else if (*op_string == IMMEDIATE_PREFIX) - { /* ... or an immediate */ + { ++op_string; if (i.types[this_operand] & JumpAbsolute) { @@ -3470,12 +3685,12 @@ i386_operand (operand_string) } else if (is_digit_char (*op_string) || is_identifier_char (*op_string) - || *op_string == '(' ) + || *op_string == '(') { - /* This is a memory reference of some sort. */ + /* This is a memory reference of some sort. */ char *base_string; - /* Start and end of displacement string expression (if found). */ + /* Start and end of displacement string expression (if found). */ char *displacement_string_start; char *displacement_string_end; @@ -3499,7 +3714,7 @@ i386_operand (operand_string) if (is_space_char (*base_string)) --base_string; - /* If we only have a displacement, set-up for it to be parsed later. */ + /* If we only have a displacement, set-up for it to be parsed later. */ displacement_string_start = op_string; displacement_string_end = base_string + 1; @@ -3508,7 +3723,7 @@ i386_operand (operand_string) char *temp_string; unsigned int parens_balanced = 1; /* We've already checked that the number of left & right ()'s are - equal, so this loop will not be infinite. */ + equal, so this loop will not be infinite. */ do { base_string--; @@ -3560,7 +3775,7 @@ i386_operand (operand_string) if (is_space_char (*base_string)) ++base_string; } - else if (*base_string != ')' ) + else if (*base_string != ')') { as_bad (_("expecting `,' or `)' after index register in `%s'"), operand_string); @@ -3573,7 +3788,7 @@ i386_operand (operand_string) return 0; } - /* Check for scale factor. */ + /* Check for scale factor. */ if (isdigit ((unsigned char) *base_string)) { if (!i386_scale (base_string)) @@ -3637,14 +3852,15 @@ i386_operand (operand_string) i.mem_operands++; } else - { /* it's not a memory operand; argh! */ + { + /* It's not a memory operand; argh! */ as_bad (_("invalid char %s beginning operand %d `%s'"), output_invalid (*op_string), this_operand + 1, op_string); return 0; } - return 1; /* normal return */ + return 1; /* Normal return. */ } /* md_estimate_size_before_relax() @@ -3670,7 +3886,7 @@ md_estimate_size_before_relax (fragP, segment) an externally visible symbol, because it may be overridden by a shared library. */ if (S_GET_SEGMENT (fragP->fr_symbol) != segment -#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (TE_PE) +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || S_IS_EXTERNAL (fragP->fr_symbol) || S_IS_WEAK (fragP->fr_symbol) #endif @@ -3699,8 +3915,9 @@ md_estimate_size_before_relax (fragP, segment) switch (opcode[0]) { - case JUMP_PC_RELATIVE: /* make jmp (0xeb) a dword displacement jump */ - opcode[0] = 0xe9; /* dword disp jmp */ + case JUMP_PC_RELATIVE: + /* Make jmp (0xeb) a dword displacement jump. */ + opcode[0] = 0xe9; fragP->fr_fix += size; fix_new (fragP, old_fr_fix, size, fragP->fr_symbol, @@ -3713,7 +3930,8 @@ md_estimate_size_before_relax (fragP, segment) to the dword-displacement jump 0x0f,0x8N. */ opcode[1] = opcode[0] + 0x10; opcode[0] = TWO_BYTE_OPCODE_ESCAPE; - fragP->fr_fix += 1 + size; /* we've added an opcode byte */ + /* We've added an opcode byte. */ + fragP->fr_fix += 1 + size; fix_new (fragP, old_fr_fix + 1, size, fragP->fr_symbol, fragP->fr_offset, 1, @@ -3723,20 +3941,19 @@ md_estimate_size_before_relax (fragP, segment) frag_wane (fragP); return fragP->fr_fix - old_fr_fix; } - return 1; /* Guess a short jump. */ + /* Guess a short jump. */ + return 1; } -/* - * md_convert_frag(); - * - * Called after relax() is finished. - * In: Address of frag. - * fr_type == rs_machine_dependent. - * fr_subtype is what the address relaxed to. - * - * Out: Any fixSs and constants are set up. - * Caller will turn frag into a ".space 0". - */ +/* Called after relax() is finished. + + In: Address of frag. + fr_type == rs_machine_dependent. + fr_subtype is what the address relaxed to. + + Out: Any fixSs and constants are set up. + Caller will turn frag into a ".space 0". */ + #ifndef BFD_ASSEMBLER void md_convert_frag (headers, sec, fragP) @@ -3753,23 +3970,29 @@ md_convert_frag (abfd, sec, fragP) { register unsigned char *opcode; unsigned char *where_to_put_displacement = NULL; - unsigned int target_address; - unsigned int opcode_address; + offsetT target_address; + offsetT opcode_address; unsigned int extension = 0; - int displacement_from_opcode_start; + offsetT displacement_from_opcode_start; opcode = (unsigned char *) fragP->fr_opcode; - /* Address we want to reach in file space. */ + /* Address we want to reach in file space. */ target_address = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset; -#ifdef BFD_ASSEMBLER /* not needed otherwise? */ - target_address += symbol_get_frag (fragP->fr_symbol)->fr_address; +#ifdef BFD_ASSEMBLER + /* Not needed otherwise? */ + { + /* Local symbols which have already been resolved have a NULL frags. */ + fragS *sym_frag = symbol_get_frag (fragP->fr_symbol); + if (sym_frag) + target_address += sym_frag->fr_address; + } #endif - /* Address opcode resides at in file space. */ + /* Address opcode resides at in file space. */ opcode_address = fragP->fr_address + fragP->fr_fix; - /* Displacement from opcode start to fill into instruction. */ + /* Displacement from opcode start to fill into instruction. */ displacement_from_opcode_start = target_address - opcode_address; switch (fragP->fr_subtype) @@ -3778,33 +4001,33 @@ md_convert_frag (abfd, sec, fragP) case ENCODE_RELAX_STATE (COND_JUMP, SMALL16): case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL): case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL16): - /* don't have to change opcode */ - extension = 1; /* 1 opcode + 1 displacement */ + /* Don't have to change opcode. */ + extension = 1; /* 1 opcode + 1 displacement */ where_to_put_displacement = &opcode[1]; break; case ENCODE_RELAX_STATE (COND_JUMP, BIG): - extension = 5; /* 2 opcode + 4 displacement */ + extension = 5; /* 2 opcode + 4 displacement */ opcode[1] = opcode[0] + 0x10; opcode[0] = TWO_BYTE_OPCODE_ESCAPE; where_to_put_displacement = &opcode[2]; break; case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG): - extension = 4; /* 1 opcode + 4 displacement */ + extension = 4; /* 1 opcode + 4 displacement */ opcode[0] = 0xe9; where_to_put_displacement = &opcode[1]; break; case ENCODE_RELAX_STATE (COND_JUMP, BIG16): - extension = 3; /* 2 opcode + 2 displacement */ + extension = 3; /* 2 opcode + 2 displacement */ opcode[1] = opcode[0] + 0x10; opcode[0] = TWO_BYTE_OPCODE_ESCAPE; where_to_put_displacement = &opcode[2]; break; case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16): - extension = 2; /* 1 opcode + 2 displacement */ + extension = 2; /* 1 opcode + 2 displacement */ opcode[0] = 0xe9; where_to_put_displacement = &opcode[1]; break; @@ -3813,17 +4036,21 @@ md_convert_frag (abfd, sec, fragP) BAD_CASE (fragP->fr_subtype); break; } - /* now put displacement after opcode */ + /* Now put displacement after opcode. */ md_number_to_chars ((char *) where_to_put_displacement, (valueT) (displacement_from_opcode_start - extension), SIZE_FROM_RELAX_STATE (fragP->fr_subtype)); fragP->fr_fix += extension; } +/* Size of byte displacement jmp. */ +int md_short_jump_size = 2; + +/* Size of dword displacement jmp. */ +int md_long_jump_size = 5; -int md_short_jump_size = 2; /* size of byte displacement jmp */ -int md_long_jump_size = 5; /* size of dword displacement jmp */ -const int md_reloc_size = 8; /* Size of relocation record */ +/* Size of relocation record. */ +const int md_reloc_size = 8; void md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol) @@ -3832,10 +4059,11 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol) fragS *frag ATTRIBUTE_UNUSED; symbolS *to_symbol ATTRIBUTE_UNUSED; { - long offset; + offsetT offset; offset = to_addr - (from_addr + 2); - md_number_to_chars (ptr, (valueT) 0xeb, 1); /* opcode for byte-disp jump */ + /* Opcode for byte-disp jump. */ + md_number_to_chars (ptr, (valueT) 0xeb, 1); md_number_to_chars (ptr + 1, (valueT) offset, 1); } @@ -3843,25 +4071,14 @@ void md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol) char *ptr; addressT from_addr, to_addr; - fragS *frag; - symbolS *to_symbol; + fragS *frag ATTRIBUTE_UNUSED; + symbolS *to_symbol ATTRIBUTE_UNUSED; { - long offset; + offsetT offset; - if (flag_do_long_jump) - { - offset = to_addr - S_GET_VALUE (to_symbol); - md_number_to_chars (ptr, (valueT) 0xe9, 1);/* opcode for long jmp */ - md_number_to_chars (ptr + 1, (valueT) offset, 4); - fix_new (frag, (ptr + 1) - frag->fr_literal, 4, - to_symbol, (offsetT) 0, 0, BFD_RELOC_32); - } - else - { - offset = to_addr - (from_addr + 5); - md_number_to_chars (ptr, (valueT) 0xe9, 1); - md_number_to_chars (ptr + 1, (valueT) offset, 4); - } + offset = to_addr - (from_addr + 5); + md_number_to_chars (ptr, (valueT) 0xe9, 1); + md_number_to_chars (ptr + 1, (valueT) offset, 4); } /* Apply a fixup (fixS) to segment data, once it has been determined @@ -3873,9 +4090,14 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol) int md_apply_fix3 (fixP, valp, seg) - fixS *fixP; /* The fix we're to put in. */ - valueT *valp; /* Pointer to the value of the bits. */ - segT seg ATTRIBUTE_UNUSED; /* Segment fix is from. */ + /* The fix we're to put in. */ + fixS *fixP; + + /* Pointer to the value of the bits. */ + valueT *valp; + + /* Segment fix is from. */ + segT seg ATTRIBUTE_UNUSED; { register char *p = fixP->fx_where + fixP->fx_frag->fr_literal; valueT value = *valp; @@ -3907,7 +4129,7 @@ md_apply_fix3 (fixP, valp, seg) if ((fixP->fx_r_type == BFD_RELOC_32_PCREL || fixP->fx_r_type == BFD_RELOC_16_PCREL || fixP->fx_r_type == BFD_RELOC_8_PCREL) - && fixP->fx_addsy) + && fixP->fx_addsy && !use_rela_relocations) { #ifndef OBJ_AOUT if (OUTPUT_FLAVOR == bfd_target_elf_flavour @@ -3943,49 +4165,25 @@ md_apply_fix3 (fixP, valp, seg) address offset for a PC relative symbol. */ if (S_GET_SEGMENT (fixP->fx_addsy) != seg) value += md_pcrel_from (fixP); - else if (S_IS_EXTERNAL (fixP->fx_addsy) - || S_IS_WEAK (fixP->fx_addsy)) - { - /* We are generating an external relocation for this defined - symbol. We add the address, because - bfd_install_relocation will subtract it. VALUE already - holds the symbol value, because fixup_segment added it - in. We subtract it out, and then we subtract it out - again because bfd_install_relocation will add it in - again. */ - value += md_pcrel_from (fixP); - value -= 2 * S_GET_VALUE (fixP->fx_addsy); - } #endif } -#ifdef TE_PE - else if (fixP->fx_addsy != NULL - && S_IS_DEFINED (fixP->fx_addsy) - && (S_IS_EXTERNAL (fixP->fx_addsy) - || S_IS_WEAK (fixP->fx_addsy))) - { - /* We are generating an external relocation for this defined - symbol. VALUE already holds the symbol value, and - bfd_install_relocation will add it in again. We don't want - either addition. */ - value -= 2 * S_GET_VALUE (fixP->fx_addsy); - } -#endif /* Fix a few things - the dynamic linker expects certain values here, - and we must not dissappoint it. */ + and we must not dissappoint it. */ #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) if (OUTPUT_FLAVOR == bfd_target_elf_flavour && fixP->fx_addsy) - switch (fixP->fx_r_type) { - case BFD_RELOC_386_PLT32: - /* Make the jump instruction point to the address of the operand. At - runtime we merely add the offset to the actual PLT entry. */ - value = 0xfffffffc; - break; - case BFD_RELOC_386_GOTPC: -/* - * This is tough to explain. We end up with this one if we have + switch (fixP->fx_r_type) + { + case BFD_RELOC_386_PLT32: + case BFD_RELOC_X86_64_PLT32: + /* Make the jump instruction point to the address of the operand. At + runtime we merely add the offset to the actual PLT entry. */ + value = -4; + break; + case BFD_RELOC_386_GOTPC: + +/* This is tough to explain. We end up with this one if we have * operands that look like "_GLOBAL_OFFSET_TABLE_+[.-.L284]". The goal * here is to obtain the absolute address of the GOT, and it is strongly * preferable from a performance point of view to avoid using a runtime @@ -4020,55 +4218,55 @@ md_apply_fix3 (fixP, valp, seg) * explicitly mentioned, and I wonder whether it would simplify matters * to do it this way. Who knows. In earlier versions of the PIC patches, * the pcrel_adjust field was used to store the correction, but since the - * expression is not pcrel, I felt it would be confusing to do it this way. - */ - value -= 1; - break; - case BFD_RELOC_386_GOT32: - value = 0; /* Fully resolved at runtime. No addend. */ - break; - case BFD_RELOC_386_GOTOFF: - break; - - case BFD_RELOC_VTABLE_INHERIT: - case BFD_RELOC_VTABLE_ENTRY: - fixP->fx_done = 0; - return 1; + * expression is not pcrel, I felt it would be confusing to do it this + * way. */ + + value -= 1; + break; + case BFD_RELOC_386_GOT32: + case BFD_RELOC_X86_64_GOT32: + value = 0; /* Fully resolved at runtime. No addend. */ + break; + case BFD_RELOC_386_GOTOFF: + case BFD_RELOC_X86_64_GOTPCREL: + break; + + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + fixP->fx_done = 0; + return 1; + + default: + break; + } +#endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */ + *valp = value; +#endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */ - default: - break; +#ifndef BFD_ASSEMBLER + md_number_to_chars (p, value, fixP->fx_size); +#else + /* Are we finished with this relocation now? */ + if (fixP->fx_addsy == 0 && fixP->fx_pcrel == 0) + fixP->fx_done = 1; + else if (use_rela_relocations) + { + fixP->fx_no_overflow = 1; + value = 0; } -#endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */ - *valp = value; -#endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */ md_number_to_chars (p, value, fixP->fx_size); +#endif return 1; } - -#if 0 -/* This is never used. */ -long /* Knows about the byte order in a word. */ -md_chars_to_number (con, nbytes) - unsigned char con[]; /* Low order byte 1st. */ - int nbytes; /* Number of bytes in the input. */ -{ - long retval; - for (retval = 0, con += nbytes - 1; nbytes--; con--) - { - retval <<= BITS_PER_CHAR; - retval |= *con; - } - return retval; -} -#endif /* 0 */ - #define MAX_LITTLENUMS 6 -/* Turn the string pointed to by litP into a floating point constant of type - type, and emit the appropriate bytes. The number of LITTLENUMS emitted - is stored in *sizeP . An error message is returned, or NULL on OK. */ +/* Turn the string pointed to by litP into a floating point constant + of type TYPE, and emit the appropriate bytes. The number of + LITTLENUMS emitted is stored in *SIZEP. An error message is + returned, or NULL on OK. */ + char * md_atof (type, litP, sizeP) int type; @@ -4118,8 +4316,6 @@ md_atof (type, litP, sizeP) char output_invalid_buf[8]; -static char * output_invalid PARAMS ((int)); - static char * output_invalid (c) int c; @@ -4131,7 +4327,6 @@ output_invalid (c) return output_invalid_buf; } - /* REG_STRING starts *before* REGISTER_PREFIX. */ static const reg_entry * @@ -4159,12 +4354,18 @@ parse_register (reg_string, end_op) s++; } + /* For naked regs, make sure that we are not dealing with an identifier. + This prevents confusing an identifier like `eax_var' with register + `eax'. */ + if (allow_naked_reg && identifier_chars[(unsigned char) *s]) + return (const reg_entry *) NULL; + *end_op = s; r = (const reg_entry *) hash_find (reg_hash, reg_name_given); /* Handle floating point regs, allowing spaces in the (i) part. */ - if (r == i386_regtab /* %st is first entry of table */) + if (r == i386_regtab /* %st is first entry of table */) { if (is_space_char (*s)) ++s; @@ -4185,7 +4386,7 @@ parse_register (reg_string, end_op) return r; } } - /* We have "%st(" then garbage */ + /* We have "%st(" then garbage. */ return (const reg_entry *) NULL; } } @@ -4194,11 +4395,18 @@ parse_register (reg_string, end_op) } #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) -CONST char *md_shortopts = "kmVQ:sq"; +const char *md_shortopts = "kVQ:sq"; #else -CONST char *md_shortopts = "m"; +const char *md_shortopts = "q"; #endif + struct option md_longopts[] = { +#define OPTION_32 (OPTION_MD_BASE + 0) + {"32", no_argument, NULL, OPTION_32}, +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) +#define OPTION_64 (OPTION_MD_BASE + 1) + {"64", no_argument, NULL, OPTION_64}, +#endif {NULL, no_argument, NULL, 0} }; size_t md_longopts_size = sizeof (md_longopts); @@ -4210,13 +4418,14 @@ md_parse_option (c, arg) { switch (c) { - case 'm': - flag_do_long_jump = 1; + case 'q': + quiet_warnings = 1; break; #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) - /* -k: Ignore for FreeBSD compatibility. */ - case 'k': + /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section + should be emitted or not. FIXME: Not implemented. */ + case 'Q': break; /* -V: SVR4 argument to print version ID. */ @@ -4224,9 +4433,8 @@ md_parse_option (c, arg) print_version_id (); break; - /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section - should be emitted or not. FIXME: Not implemented. */ - case 'Q': + /* -k: Ignore for FreeBSD compatibility. */ + case 'k': break; case 's': @@ -4234,12 +4442,28 @@ md_parse_option (c, arg) .stab instead of .stab.excl. We always use .stab anyhow. */ break; - case 'q': - /* -q: On i386 Solaris, this tells the native assembler does - fewer checks. */ + case OPTION_64: + { + const char **list, **l; + + list = bfd_target_list (); + for (l = list; *l != NULL; l++) + if (strcmp (*l, "elf64-x86-64") == 0) + { + default_arch = "x86_64"; + break; + } + if (*l == NULL) + as_fatal (_("No compiled in support for x86_64")); + free (list); + } break; #endif + case OPTION_32: + default_arch = "i386"; + break; + default: return 0; } @@ -4250,41 +4474,51 @@ void md_show_usage (stream) FILE *stream; { - fprintf (stream, _("\ - -m do long jump\n")); #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) fprintf (stream, _("\ - -V print assembler version number\n\ - -k ignored\n\ - -Qy, -Qn ignored\n\ - -q ignored\n\ - -s ignored\n")); + -Q ignored\n\ + -V print assembler version number\n\ + -k ignored\n\ + -q quieten some warnings\n\ + -s ignored\n")); +#else + fprintf (stream, _("\ + -q quieten some warnings\n")); #endif } #ifdef BFD_ASSEMBLER -#if ((defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_COFF)) \ - || (defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_AOUT)) \ - || (defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT))) +#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ + || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) /* Pick the target format to use. */ -const char * +const char * i386_target_format () { + if (!strcmp (default_arch, "x86_64")) + set_code_flag (CODE_64BIT); + else if (!strcmp (default_arch, "i386")) + set_code_flag (CODE_32BIT); + else + as_fatal (_("Unknown architecture")); switch (OUTPUT_FLAVOR) { #ifdef OBJ_MAYBE_AOUT case bfd_target_aout_flavour: - return AOUT_TARGET_FORMAT; + return AOUT_TARGET_FORMAT; #endif #ifdef OBJ_MAYBE_COFF case bfd_target_coff_flavour: return "coff-i386"; #endif -#ifdef OBJ_MAYBE_ELF +#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF) case bfd_target_elf_flavour: - return "elf32-i386"; + { + if (flag_code == CODE_64BIT) + use_rela_relocations = 1; + return flag_code == CODE_64BIT ? "elf64-x86-64" : "elf32-i386"; + } #endif default: abort (); @@ -4292,8 +4526,8 @@ i386_target_format () } } -#endif /* OBJ_MAYBE_ more than one */ -#endif /* BFD_ASSEMBLER */ +#endif /* OBJ_MAYBE_ more than one */ +#endif /* BFD_ASSEMBLER */ symbolS * md_undefined_symbol (name) @@ -4317,6 +4551,7 @@ md_undefined_symbol (name) } /* Round up a section size to the appropriate boundary. */ + valueT md_section_align (segment, size) segT segment ATTRIBUTE_UNUSED; @@ -4368,7 +4603,6 @@ s_bss (ignore) #endif - #ifdef BFD_ASSEMBLER void @@ -4377,7 +4611,19 @@ i386_validate_fix (fixp) { if (fixp->fx_subsy && fixp->fx_subsy == GOT_symbol) { - fixp->fx_r_type = BFD_RELOC_386_GOTOFF; + /* GOTOFF relocation are nonsense in 64bit mode. */ + if (fixp->fx_r_type == BFD_RELOC_32_PCREL) + { + if (flag_code != CODE_64BIT) + abort (); + fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL; + } + else + { + if (flag_code == CODE_64BIT) + abort (); + fixp->fx_r_type = BFD_RELOC_386_GOTOFF; + } fixp->fx_subsy = 0; } } @@ -4392,10 +4638,14 @@ tc_gen_reloc (section, fixp) switch (fixp->fx_r_type) { + case BFD_RELOC_X86_64_PLT32: + case BFD_RELOC_X86_64_GOT32: + case BFD_RELOC_X86_64_GOTPCREL: case BFD_RELOC_386_PLT32: case BFD_RELOC_386_GOT32: case BFD_RELOC_386_GOTOFF: case BFD_RELOC_386_GOTPC: + case BFD_RELOC_X86_64_32S: case BFD_RELOC_RVA: case BFD_RELOC_VTABLE_ENTRY: case BFD_RELOC_VTABLE_INHERIT: @@ -4427,6 +4677,7 @@ tc_gen_reloc (section, fixp) case 1: code = BFD_RELOC_8; break; case 2: code = BFD_RELOC_16; break; case 4: code = BFD_RELOC_32; break; + case 8: code = BFD_RELOC_64; break; } } break; @@ -4435,22 +4686,37 @@ tc_gen_reloc (section, fixp) if (code == BFD_RELOC_32 && GOT_symbol && fixp->fx_addsy == GOT_symbol) - code = BFD_RELOC_386_GOTPC; + { + /* We don't support GOTPC on 64bit targets. */ + if (flag_code == CODE_64BIT) + abort (); + code = BFD_RELOC_386_GOTPC; + } rel = (arelent *) xmalloc (sizeof (arelent)); rel->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); rel->address = fixp->fx_frag->fr_address + fixp->fx_where; - /* HACK: Since i386 ELF uses Rel instead of Rela, encode the - vtable entry to be used in the relocation's section offset. */ - if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) - rel->address = fixp->fx_offset; + if (!use_rela_relocations) + { + /* HACK: Since i386 ELF uses Rel instead of Rela, encode the + vtable entry to be used in the relocation's section offset. */ + if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) + rel->address = fixp->fx_offset; - if (fixp->fx_pcrel) - rel->addend = fixp->fx_addnumber; + if (fixp->fx_pcrel) + rel->addend = fixp->fx_addnumber; + else + rel->addend = 0; + } + /* Use the rela in 64bit mode. */ else - rel->addend = 0; + { + rel->addend = fixp->fx_offset; + if (fixp->fx_pcrel) + rel->addend -= fixp->fx_size; + } rel->howto = bfd_reloc_type_lookup (stdoutput, code); if (rel->howto == NULL) @@ -4466,7 +4732,7 @@ tc_gen_reloc (section, fixp) return rel; } -#else /* ! BFD_ASSEMBLER */ +#else /* ! BFD_ASSEMBLER */ #if (defined(OBJ_AOUT) | defined(OBJ_BOUT)) void @@ -4475,12 +4741,10 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file) fixS *fixP; relax_addressT segment_address_in_file; { - /* - * In: length of relocation (or of address) in chars: 1, 2 or 4. - * Out: GNU LD relocation length code: 0, 1, or 2. - */ + /* In: length of relocation (or of address) in chars: 1, 2 or 4. + Out: GNU LD relocation length code: 0, 1, or 2. */ - static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2}; + static const unsigned char nbytes_r_length[] = { 42, 0, 1, 42, 2 }; long r_symbolnum; know (fixP->fx_addsy != NULL); @@ -4502,7 +4766,7 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file) | (((fixP->fx_pcrel << 0) & 0x01) & 0x0f)); } -#endif /* OBJ_AOUT or OBJ_BOUT */ +#endif /* OBJ_AOUT or OBJ_BOUT. */ #if defined (I386COFF) @@ -4532,8 +4796,956 @@ tc_coff_sizemachdep (frag) return 0; } -#endif /* I386COFF */ +#endif /* I386COFF */ -#endif /* ! BFD_ASSEMBLER */ +#endif /* ! BFD_ASSEMBLER */ -/* end of tc-i386.c */ +/* Parse operands using Intel syntax. This implements a recursive descent + parser based on the BNF grammar published in Appendix B of the MASM 6.1 + Programmer's Guide. + + FIXME: We do not recognize the full operand grammar defined in the MASM + documentation. In particular, all the structure/union and + high-level macro operands are missing. + + Uppercase words are terminals, lower case words are non-terminals. + Objects surrounded by double brackets '[[' ']]' are optional. Vertical + bars '|' denote choices. Most grammar productions are implemented in + functions called 'intel_<production>'. + + Initial production is 'expr'. + + addOp + | - + + alpha [a-zA-Z] + + byteRegister AL | AH | BL | BH | CL | CH | DL | DH + + constant digits [[ radixOverride ]] + + dataType BYTE | WORD | DWORD | QWORD | XWORD + + digits decdigit + | digits decdigit + | digits hexdigit + + decdigit [0-9] + + e05 e05 addOp e06 + | e06 + + e06 e06 mulOp e09 + | e09 + + e09 OFFSET e10 + | e09 PTR e10 + | e09 : e10 + | e10 + + e10 e10 [ expr ] + | e11 + + e11 ( expr ) + | [ expr ] + | constant + | dataType + | id + | $ + | register + + => expr SHORT e05 + | e05 + + gpRegister AX | EAX | BX | EBX | CX | ECX | DX | EDX + | BP | EBP | SP | ESP | DI | EDI | SI | ESI + + hexdigit a | b | c | d | e | f + | A | B | C | D | E | F + + id alpha + | id alpha + | id decdigit + + mulOp * | / | MOD + + quote " | ' + + register specialRegister + | gpRegister + | byteRegister + + segmentRegister CS | DS | ES | FS | GS | SS + + specialRegister CR0 | CR2 | CR3 + | DR0 | DR1 | DR2 | DR3 | DR6 | DR7 + | TR3 | TR4 | TR5 | TR6 | TR7 + + We simplify the grammar in obvious places (e.g., register parsing is + done by calling parse_register) and eliminate immediate left recursion + to implement a recursive-descent parser. + + expr SHORT e05 + | e05 + + e05 e06 e05' + + e05' addOp e06 e05' + | Empty + + e06 e09 e06' + + e06' mulOp e09 e06' + | Empty + + e09 OFFSET e10 e09' + | e10 e09' + + e09' PTR e10 e09' + | : e10 e09' + | Empty + + e10 e11 e10' + + e10' [ expr ] e10' + | Empty + + e11 ( expr ) + | [ expr ] + | BYTE + | WORD + | DWORD + | QWORD + | XWORD + | . + | $ + | register + | id + | constant */ + +/* Parsing structure for the intel syntax parser. Used to implement the + semantic actions for the operand grammar. */ +struct intel_parser_s + { + char *op_string; /* The string being parsed. */ + int got_a_float; /* Whether the operand is a float. */ + int op_modifier; /* Operand modifier. */ + int is_mem; /* 1 if operand is memory reference. */ + const reg_entry *reg; /* Last register reference found. */ + char *disp; /* Displacement string being built. */ + }; + +static struct intel_parser_s intel_parser; + +/* Token structure for parsing intel syntax. */ +struct intel_token + { + int code; /* Token code. */ + const reg_entry *reg; /* Register entry for register tokens. */ + char *str; /* String representation. */ + }; + +static struct intel_token cur_token, prev_token; + +/* Token codes for the intel parser. Since T_SHORT is already used + by COFF, undefine it first to prevent a warning. */ +#define T_NIL -1 +#define T_CONST 1 +#define T_REG 2 +#define T_BYTE 3 +#define T_WORD 4 +#define T_DWORD 5 +#define T_QWORD 6 +#define T_XWORD 7 +#undef T_SHORT +#define T_SHORT 8 +#define T_OFFSET 9 +#define T_PTR 10 +#define T_ID 11 + +/* Prototypes for intel parser functions. */ +static int intel_match_token PARAMS ((int code)); +static void intel_get_token PARAMS ((void)); +static void intel_putback_token PARAMS ((void)); +static int intel_expr PARAMS ((void)); +static int intel_e05 PARAMS ((void)); +static int intel_e05_1 PARAMS ((void)); +static int intel_e06 PARAMS ((void)); +static int intel_e06_1 PARAMS ((void)); +static int intel_e09 PARAMS ((void)); +static int intel_e09_1 PARAMS ((void)); +static int intel_e10 PARAMS ((void)); +static int intel_e10_1 PARAMS ((void)); +static int intel_e11 PARAMS ((void)); + +static int +i386_intel_operand (operand_string, got_a_float) + char *operand_string; + int got_a_float; +{ + int ret; + char *p; + + /* Initialize token holders. */ + cur_token.code = prev_token.code = T_NIL; + cur_token.reg = prev_token.reg = NULL; + cur_token.str = prev_token.str = NULL; + + /* Initialize parser structure. */ + p = intel_parser.op_string = (char *) malloc (strlen (operand_string) + 1); + if (p == NULL) + abort (); + strcpy (intel_parser.op_string, operand_string); + intel_parser.got_a_float = got_a_float; + intel_parser.op_modifier = -1; + intel_parser.is_mem = 0; + intel_parser.reg = NULL; + intel_parser.disp = (char *) malloc (strlen (operand_string) + 1); + if (intel_parser.disp == NULL) + abort (); + intel_parser.disp[0] = '\0'; + + /* Read the first token and start the parser. */ + intel_get_token (); + ret = intel_expr (); + + if (ret) + { + /* If we found a memory reference, hand it over to i386_displacement + to fill in the rest of the operand fields. */ + if (intel_parser.is_mem) + { + if ((i.mem_operands == 1 + && (current_templates->start->opcode_modifier & IsString) == 0) + || i.mem_operands == 2) + { + as_bad (_("too many memory references for '%s'"), + current_templates->start->name); + ret = 0; + } + else + { + char *s = intel_parser.disp; + i.mem_operands++; + + /* Add the displacement expression. */ + if (*s != '\0') + ret = i386_displacement (s, s + strlen (s)) + && i386_index_check (s); + } + } + + /* Constant and OFFSET expressions are handled by i386_immediate. */ + else if (intel_parser.op_modifier == OFFSET_FLAT + || intel_parser.reg == NULL) + ret = i386_immediate (intel_parser.disp); + } + + free (p); + free (intel_parser.disp); + + return ret; +} + +/* expr SHORT e05 + | e05 */ +static int +intel_expr () +{ + /* expr SHORT e05 */ + if (cur_token.code == T_SHORT) + { + intel_parser.op_modifier = SHORT; + intel_match_token (T_SHORT); + + return (intel_e05 ()); + } + + /* expr e05 */ + else + return intel_e05 (); +} + +/* e05 e06 e05' + + e05' addOp e06 e05' + | Empty */ +static int +intel_e05 () +{ + return (intel_e06 () && intel_e05_1 ()); +} + +static int +intel_e05_1 () +{ + /* e05' addOp e06 e05' */ + if (cur_token.code == '+' || cur_token.code == '-') + { + strcat (intel_parser.disp, cur_token.str); + intel_match_token (cur_token.code); + + return (intel_e06 () && intel_e05_1 ()); + } + + /* e05' Empty */ + else + return 1; +} + +/* e06 e09 e06' + + e06' mulOp e09 e06' + | Empty */ +static int +intel_e06 () +{ + return (intel_e09 () && intel_e06_1 ()); +} + +static int +intel_e06_1 () +{ + /* e06' mulOp e09 e06' */ + if (cur_token.code == '*' || cur_token.code == '/') + { + strcat (intel_parser.disp, cur_token.str); + intel_match_token (cur_token.code); + + return (intel_e09 () && intel_e06_1 ()); + } + + /* e06' Empty */ + else + return 1; +} + +/* e09 OFFSET e10 e09' + | e10 e09' + + e09' PTR e10 e09' + | : e10 e09' + | Empty */ +static int +intel_e09 () +{ + /* e09 OFFSET e10 e09' */ + if (cur_token.code == T_OFFSET) + { + intel_parser.is_mem = 0; + intel_parser.op_modifier = OFFSET_FLAT; + intel_match_token (T_OFFSET); + + return (intel_e10 () && intel_e09_1 ()); + } + + /* e09 e10 e09' */ + else + return (intel_e10 () && intel_e09_1 ()); +} + +static int +intel_e09_1 () +{ + /* e09' PTR e10 e09' */ + if (cur_token.code == T_PTR) + { + if (prev_token.code == T_BYTE) + i.suffix = BYTE_MNEM_SUFFIX; + + else if (prev_token.code == T_WORD) + { + if (intel_parser.got_a_float == 2) /* "fi..." */ + i.suffix = SHORT_MNEM_SUFFIX; + else + i.suffix = WORD_MNEM_SUFFIX; + } + + else if (prev_token.code == T_DWORD) + { + if (intel_parser.got_a_float == 1) /* "f..." */ + i.suffix = SHORT_MNEM_SUFFIX; + else + i.suffix = LONG_MNEM_SUFFIX; + } + + else if (prev_token.code == T_QWORD) + { + if (intel_parser.got_a_float == 1) /* "f..." */ + i.suffix = LONG_MNEM_SUFFIX; + else + i.suffix = QWORD_MNEM_SUFFIX; + } + + else if (prev_token.code == T_XWORD) + i.suffix = LONG_DOUBLE_MNEM_SUFFIX; + + else + { + as_bad (_("Unknown operand modifier `%s'\n"), prev_token.str); + return 0; + } + + intel_match_token (T_PTR); + + return (intel_e10 () && intel_e09_1 ()); + } + + /* e09 : e10 e09' */ + else if (cur_token.code == ':') + { + /* Mark as a memory operand only if it's not already known to be an + offset expression. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + + return (intel_match_token (':') && intel_e10 () && intel_e09_1 ()); + } + + /* e09' Empty */ + else + return 1; +} + +/* e10 e11 e10' + + e10' [ expr ] e10' + | Empty */ +static int +intel_e10 () +{ + return (intel_e11 () && intel_e10_1 ()); +} + +static int +intel_e10_1 () +{ + /* e10' [ expr ] e10' */ + if (cur_token.code == '[') + { + intel_match_token ('['); + + /* Mark as a memory operand only if it's not already known to be an + offset expression. If it's an offset expression, we need to keep + the brace in. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + else + strcat (intel_parser.disp, "["); + + /* Add a '+' to the displacement string if necessary. */ + if (*intel_parser.disp != '\0' + && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+') + strcat (intel_parser.disp, "+"); + + if (intel_expr () && intel_match_token (']')) + { + /* Preserve brackets when the operand is an offset expression. */ + if (intel_parser.op_modifier == OFFSET_FLAT) + strcat (intel_parser.disp, "]"); + + return intel_e10_1 (); + } + else + return 0; + } + + /* e10' Empty */ + else + return 1; +} + +/* e11 ( expr ) + | [ expr ] + | BYTE + | WORD + | DWORD + | QWORD + | XWORD + | $ + | . + | register + | id + | constant */ +static int +intel_e11 () +{ + /* e11 ( expr ) */ + if (cur_token.code == '(') + { + intel_match_token ('('); + strcat (intel_parser.disp, "("); + + if (intel_expr () && intel_match_token (')')) + { + strcat (intel_parser.disp, ")"); + return 1; + } + else + return 0; + } + + /* e11 [ expr ] */ + else if (cur_token.code == '[') + { + intel_match_token ('['); + + /* Mark as a memory operand only if it's not already known to be an + offset expression. If it's an offset expression, we need to keep + the brace in. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + else + strcat (intel_parser.disp, "["); + + /* Operands for jump/call inside brackets denote absolute addresses. */ + if (current_templates->start->opcode_modifier & Jump + || current_templates->start->opcode_modifier & JumpDword + || current_templates->start->opcode_modifier & JumpByte + || current_templates->start->opcode_modifier & JumpInterSegment) + i.types[this_operand] |= JumpAbsolute; + + /* Add a '+' to the displacement string if necessary. */ + if (*intel_parser.disp != '\0' + && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+') + strcat (intel_parser.disp, "+"); + + if (intel_expr () && intel_match_token (']')) + { + /* Preserve brackets when the operand is an offset expression. */ + if (intel_parser.op_modifier == OFFSET_FLAT) + strcat (intel_parser.disp, "]"); + + return 1; + } + else + return 0; + } + + /* e11 BYTE + | WORD + | DWORD + | QWORD + | XWORD */ + else if (cur_token.code == T_BYTE + || cur_token.code == T_WORD + || cur_token.code == T_DWORD + || cur_token.code == T_QWORD + || cur_token.code == T_XWORD) + { + intel_match_token (cur_token.code); + + return 1; + } + + /* e11 $ + | . */ + else if (cur_token.code == '$' || cur_token.code == '.') + { + strcat (intel_parser.disp, cur_token.str); + intel_match_token (cur_token.code); + + /* Mark as a memory operand only if it's not already known to be an + offset expression. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + + return 1; + } + + /* e11 register */ + else if (cur_token.code == T_REG) + { + const reg_entry *reg = intel_parser.reg = cur_token.reg; + + intel_match_token (T_REG); + + /* Check for segment change. */ + if (cur_token.code == ':') + { + if (reg->reg_type & (SReg2 | SReg3)) + { + switch (reg->reg_num) + { + case 0: + i.seg[i.mem_operands] = &es; + break; + case 1: + i.seg[i.mem_operands] = &cs; + break; + case 2: + i.seg[i.mem_operands] = &ss; + break; + case 3: + i.seg[i.mem_operands] = &ds; + break; + case 4: + i.seg[i.mem_operands] = &fs; + break; + case 5: + i.seg[i.mem_operands] = &gs; + break; + } + } + else + { + as_bad (_("`%s' is not a valid segment register"), reg->reg_name); + return 0; + } + } + + /* Not a segment register. Check for register scaling. */ + else if (cur_token.code == '*') + { + if (!intel_parser.is_mem) + { + as_bad (_("Register scaling only allowed in memory operands.")); + return 0; + } + + /* What follows must be a valid scale. */ + if (intel_match_token ('*') + && strchr ("01248", *cur_token.str)) + { + i.index_reg = reg; + i.types[this_operand] |= BaseIndex; + + /* Set the scale after setting the register (otherwise, + i386_scale will complain) */ + i386_scale (cur_token.str); + intel_match_token (T_CONST); + } + else + { + as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"), + cur_token.str); + return 0; + } + } + + /* No scaling. If this is a memory operand, the register is either a + base register (first occurrence) or an index register (second + occurrence). */ + else if (intel_parser.is_mem && !(reg->reg_type & (SReg2 | SReg3))) + { + if (i.base_reg && i.index_reg) + { + as_bad (_("Too many register references in memory operand.\n")); + return 0; + } + + if (i.base_reg == NULL) + i.base_reg = reg; + else + i.index_reg = reg; + + i.types[this_operand] |= BaseIndex; + } + + /* Offset modifier. Add the register to the displacement string to be + parsed as an immediate expression after we're done. */ + else if (intel_parser.op_modifier == OFFSET_FLAT) + strcat (intel_parser.disp, reg->reg_name); + + /* It's neither base nor index nor offset. */ + else + { + i.types[this_operand] |= reg->reg_type & ~BaseIndex; + i.op[this_operand].regs = reg; + i.reg_operands++; + } + + /* Since registers are not part of the displacement string (except + when we're parsing offset operands), we may need to remove any + preceding '+' from the displacement string. */ + if (*intel_parser.disp != '\0' + && intel_parser.op_modifier != OFFSET_FLAT) + { + char *s = intel_parser.disp; + s += strlen (s) - 1; + if (*s == '+') + *s = '\0'; + } + + return 1; + } + + /* e11 id */ + else if (cur_token.code == T_ID) + { + /* Add the identifier to the displacement string. */ + strcat (intel_parser.disp, cur_token.str); + intel_match_token (T_ID); + + /* The identifier represents a memory reference only if it's not + preceded by an offset modifier. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + + return 1; + } + + /* e11 constant */ + else if (cur_token.code == T_CONST + || cur_token.code == '-' + || cur_token.code == '+') + { + char *save_str; + + /* Allow constants that start with `+' or `-'. */ + if (cur_token.code == '-' || cur_token.code == '+') + { + strcat (intel_parser.disp, cur_token.str); + intel_match_token (cur_token.code); + if (cur_token.code != T_CONST) + { + as_bad (_("Syntax error. Expecting a constant. Got `%s'.\n"), + cur_token.str); + return 0; + } + } + + save_str = (char *) malloc (strlen (cur_token.str) + 1); + if (save_str == NULL) + abort (); + strcpy (save_str, cur_token.str); + + /* Get the next token to check for register scaling. */ + intel_match_token (cur_token.code); + + /* Check if this constant is a scaling factor for an index register. */ + if (cur_token.code == '*') + { + if (intel_match_token ('*') && cur_token.code == T_REG) + { + if (!intel_parser.is_mem) + { + as_bad (_("Register scaling only allowed in memory operands.")); + return 0; + } + + /* The constant is followed by `* reg', so it must be + a valid scale. */ + if (strchr ("01248", *save_str)) + { + i.index_reg = cur_token.reg; + i.types[this_operand] |= BaseIndex; + + /* Set the scale after setting the register (otherwise, + i386_scale will complain) */ + i386_scale (save_str); + intel_match_token (T_REG); + + /* Since registers are not part of the displacement + string, we may need to remove any preceding '+' from + the displacement string. */ + if (*intel_parser.disp != '\0') + { + char *s = intel_parser.disp; + s += strlen (s) - 1; + if (*s == '+') + *s = '\0'; + } + + free (save_str); + + return 1; + } + else + return 0; + } + + /* The constant was not used for register scaling. Since we have + already consumed the token following `*' we now need to put it + back in the stream. */ + else + intel_putback_token (); + } + + /* Add the constant to the displacement string. */ + strcat (intel_parser.disp, save_str); + free (save_str); + + return 1; + } + + as_bad (_("Unrecognized token '%s'"), cur_token.str); + return 0; +} + +/* Match the given token against cur_token. If they match, read the next + token from the operand string. */ +static int +intel_match_token (code) + int code; +{ + if (cur_token.code == code) + { + intel_get_token (); + return 1; + } + else + { + as_bad (_("Unexpected token `%s'\n"), cur_token.str); + return 0; + } +} + +/* Read a new token from intel_parser.op_string and store it in cur_token. */ +static void +intel_get_token () +{ + char *end_op; + const reg_entry *reg; + struct intel_token new_token; + + new_token.code = T_NIL; + new_token.reg = NULL; + new_token.str = NULL; + + /* Free the memory allocated to the previous token and move + cur_token to prev_token. */ + if (prev_token.str) + free (prev_token.str); + + prev_token = cur_token; + + /* Skip whitespace. */ + while (is_space_char (*intel_parser.op_string)) + intel_parser.op_string++; + + /* Return an empty token if we find nothing else on the line. */ + if (*intel_parser.op_string == '\0') + { + cur_token = new_token; + return; + } + + /* The new token cannot be larger than the remainder of the operand + string. */ + new_token.str = (char *) malloc (strlen (intel_parser.op_string) + 1); + if (new_token.str == NULL) + abort (); + new_token.str[0] = '\0'; + + if (strchr ("0123456789", *intel_parser.op_string)) + { + char *p = new_token.str; + char *q = intel_parser.op_string; + new_token.code = T_CONST; + + /* Allow any kind of identifier char to encompass floating point and + hexadecimal numbers. */ + while (is_identifier_char (*q)) + *p++ = *q++; + *p = '\0'; + + /* Recognize special symbol names [0-9][bf]. */ + if (strlen (intel_parser.op_string) == 2 + && (intel_parser.op_string[1] == 'b' + || intel_parser.op_string[1] == 'f')) + new_token.code = T_ID; + } + + else if (strchr ("+-/*:[]()", *intel_parser.op_string)) + { + new_token.code = *intel_parser.op_string; + new_token.str[0] = *intel_parser.op_string; + new_token.str[1] = '\0'; + } + + else if ((*intel_parser.op_string == REGISTER_PREFIX || allow_naked_reg) + && ((reg = parse_register (intel_parser.op_string, &end_op)) != NULL)) + { + new_token.code = T_REG; + new_token.reg = reg; + + if (*intel_parser.op_string == REGISTER_PREFIX) + { + new_token.str[0] = REGISTER_PREFIX; + new_token.str[1] = '\0'; + } + + strcat (new_token.str, reg->reg_name); + } + + else if (is_identifier_char (*intel_parser.op_string)) + { + char *p = new_token.str; + char *q = intel_parser.op_string; + + /* A '.' or '$' followed by an identifier char is an identifier. + Otherwise, it's operator '.' followed by an expression. */ + if ((*q == '.' || *q == '$') && !is_identifier_char (*(q + 1))) + { + new_token.code = *q; + new_token.str[0] = *q; + new_token.str[1] = '\0'; + } + else + { + while (is_identifier_char (*q) || *q == '@') + *p++ = *q++; + *p = '\0'; + + if (strcasecmp (new_token.str, "BYTE") == 0) + new_token.code = T_BYTE; + + else if (strcasecmp (new_token.str, "WORD") == 0) + new_token.code = T_WORD; + + else if (strcasecmp (new_token.str, "DWORD") == 0) + new_token.code = T_DWORD; + + else if (strcasecmp (new_token.str, "QWORD") == 0) + new_token.code = T_QWORD; + + else if (strcasecmp (new_token.str, "XWORD") == 0) + new_token.code = T_XWORD; + + else if (strcasecmp (new_token.str, "PTR") == 0) + new_token.code = T_PTR; + + else if (strcasecmp (new_token.str, "SHORT") == 0) + new_token.code = T_SHORT; + + else if (strcasecmp (new_token.str, "OFFSET") == 0) + { + new_token.code = T_OFFSET; + + /* ??? This is not mentioned in the MASM grammar but gcc + makes use of it with -mintel-syntax. OFFSET may be + followed by FLAT: */ + if (strncasecmp (q, " FLAT:", 6) == 0) + strcat (new_token.str, " FLAT:"); + } + + /* ??? This is not mentioned in the MASM grammar. */ + else if (strcasecmp (new_token.str, "FLAT") == 0) + new_token.code = T_OFFSET; + + else + new_token.code = T_ID; + } + } + + else + as_bad (_("Unrecognized token `%s'\n"), intel_parser.op_string); + + intel_parser.op_string += strlen (new_token.str); + cur_token = new_token; +} + +/* Put cur_token back into the token stream and make cur_token point to + prev_token. */ +static void +intel_putback_token () +{ + intel_parser.op_string -= strlen (cur_token.str); + free (cur_token.str); + cur_token = prev_token; + + /* Forget prev_token. */ + prev_token.code = T_NIL; + prev_token.reg = NULL; + prev_token.str = NULL; +} diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h index 2bf9a7f..a68d5e4 100644 --- a/contrib/binutils/gas/config/tc-i386.h +++ b/contrib/binutils/gas/config/tc-i386.h @@ -1,5 +1,5 @@ /* tc-i386.h -- Header file for tc-i386.c - Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -41,21 +41,25 @@ struct fix; #define tc_fix_adjustable(X) tc_i386_fix_adjustable(X) extern int tc_i386_fix_adjustable PARAMS ((struct fix *)); -/* This is the relocation type for direct references to GLOBAL_OFFSET_TABLE. - * It comes up in complicated expressions such as - * _GLOBAL_OFFSET_TABLE_+[.-.L284], which cannot be expressed normally with - * the regular expressions. The fixup specified here when used at runtime - * implies that we should add the address of the GOT to the specified location, - * and as a result we have simplified the expression into something we can use. - */ -#define TC_RELOC_GLOBAL_OFFSET_TABLE BFD_RELOC_386_GOTPC +#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF) || defined (OBJ_MAYBE_COFF) || defined (OBJ_COFF)) && !defined (TE_PE) +/* This arranges for gas/write.c to not apply a relocation if + tc_fix_adjustable() says it is not adjustable. + The "! symbol_used_in_reloc_p" test is there specifically to cover + the case of non-global symbols in linkonce sections. It's the + generally correct thing to do though; If a reloc is going to be + emitted against a symbol then we don't want to adjust the fixup by + applying the reloc during assembly. The reloc will be applied by + the linker during final link. */ +#define TC_FIX_ADJUSTABLE(fixP) \ + (! symbol_used_in_reloc_p ((fixP)->fx_addsy) && tc_fix_adjustable (fixP)) +#endif /* This expression evaluates to false if the relocation is for a local object for which we still want to do the relocation at runtime. True if we are willing to perform this relocation while building the .o file. This is only used for pcrel relocations, so GOTOFF does not need to be checked here. I am not sure if some of the others are ever used with - pcrel, but it is easier to be safe than sorry. */ + pcrel, but it is easier to be safe than sorry. */ #define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \ ((FIX)->fx_r_type != BFD_RELOC_386_PLT32 \ @@ -68,7 +72,12 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *)); && ! S_IS_COMMON ((FIX)->fx_addsy)))) #define TARGET_ARCH bfd_arch_i386 +#define TARGET_MACH (i386_mach ()) +extern unsigned long i386_mach PARAMS ((void)); +#ifdef TE_FreeBSD +#define AOUT_TARGET_FORMAT "a.out-i386-freebsd" +#endif #ifdef TE_NetBSD #define AOUT_TARGET_FORMAT "a.out-i386-netbsd" #endif @@ -88,9 +97,8 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *)); #define AOUT_TARGET_FORMAT "a.out-i386" #endif -#if ((defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_COFF)) \ - || (defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_AOUT)) \ - || (defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT))) +#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ + || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) extern const char *i386_target_format PARAMS ((void)); #define TARGET_FORMAT i386_target_format () #else @@ -134,7 +142,6 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag)); /* Need this for PIC relocations */ #define NEED_FX_R_TYPE - #ifdef TE_386BSD /* The BSDI linker apparently rejects objects with a machine type of M_386 (100). */ @@ -184,13 +191,14 @@ extern const char extra_symbol_chars[]; /* Prefixes will be emitted in the order defined below. WAIT_PREFIX must be the first prefix since FWAIT is really is an - instruction, and so must come before any prefixes. */ + instruction, and so must come before any prefixes. */ #define WAIT_PREFIX 0 #define LOCKREP_PREFIX 1 #define ADDR_PREFIX 2 #define DATA_PREFIX 3 #define SEG_PREFIX 4 -#define MAX_PREFIXES 5 /* max prefixes per opcode */ +#define REX_PREFIX 5 /* must come last. */ +#define MAX_PREFIXES 6 /* max prefixes per opcode */ /* we define the syntax here (modulo base,index,scale syntax) */ #define REGISTER_PREFIX '%' @@ -217,10 +225,9 @@ extern const char extra_symbol_chars[]; #define BYTE_MNEM_SUFFIX 'b' #define SHORT_MNEM_SUFFIX 's' #define LONG_MNEM_SUFFIX 'l' +#define QWORD_MNEM_SUFFIX 'q' /* Intel Syntax */ #define LONG_DOUBLE_MNEM_SUFFIX 'x' -/* Intel Syntax */ -#define DWORD_MNEM_SUFFIX 'd' /* modrm.mode = REGMEM_FIELD_HAS_REG when a register is in there */ #define REGMEM_FIELD_HAS_REG 0x3/* always = 0x3 */ @@ -239,77 +246,6 @@ extern const char extra_symbol_chars[]; #define OFFSET_FLAT 6 #define FLAT 7 #define NONE_FOUND 8 -/* - When an operand is read in it is classified by its type. This type includes - all the possible ways an operand can be used. Thus, '%eax' is both 'register - # 0' and 'The Accumulator'. In our language this is expressed by OR'ing - 'Reg32' (any 32 bit register) and 'Acc' (the accumulator). - Operands are classified so that we can match given operand types with - the opcode table in opcode/i386.h. - */ -/* register */ -#define Reg8 0x1 /* 8 bit reg */ -#define Reg16 0x2 /* 16 bit reg */ -#define Reg32 0x4 /* 32 bit reg */ -/* immediate */ -#define Imm8 0x8 /* 8 bit immediate */ -#define Imm8S 0x10 /* 8 bit immediate sign extended */ -#define Imm16 0x20 /* 16 bit immediate */ -#define Imm32 0x40 /* 32 bit immediate */ -#define Imm1 0x80 /* 1 bit immediate */ -/* memory */ -#define BaseIndex 0x100 -/* Disp8,16,32 are used in different ways, depending on the - instruction. For jumps, they specify the size of the PC relative - displacement, for baseindex type instructions, they specify the - size of the offset relative to the base register, and for memory - offset instructions such as `mov 1234,%al' they specify the size of - the offset relative to the segment base. */ -#define Disp8 0x200 /* 8 bit displacement */ -#define Disp16 0x400 /* 16 bit displacement */ -#define Disp32 0x800 /* 32 bit displacement */ -/* specials */ -#define InOutPortReg 0x1000 /* register to hold in/out port addr = dx */ -#define ShiftCount 0x2000 /* register to hold shift cound = cl */ -#define Control 0x4000 /* Control register */ -#define Debug 0x8000 /* Debug register */ -#define Test 0x10000 /* Test register */ -#define FloatReg 0x20000 /* Float register */ -#define FloatAcc 0x40000 /* Float stack top %st(0) */ -#define SReg2 0x80000 /* 2 bit segment register */ -#define SReg3 0x100000 /* 3 bit segment register */ -#define Acc 0x200000 /* Accumulator %al or %ax or %eax */ -#define JumpAbsolute 0x400000 -#define RegMMX 0x800000 /* MMX register */ -#define RegXMM 0x1000000 /* XMM registers in PIII */ -#define EsSeg 0x2000000 /* String insn operand with fixed es segment */ -/* InvMem is for instructions with a modrm byte that only allow a - general register encoding in the i.tm.mode and i.tm.regmem fields, - eg. control reg moves. They really ought to support a memory form, - but don't, so we add an InvMem flag to the register operand to - indicate that it should be encoded in the i.tm.regmem field. */ -#define InvMem 0x4000000 - -#define Reg (Reg8|Reg16|Reg32) /* gen'l register */ -#define WordReg (Reg16|Reg32) -#define ImplicitRegister (InOutPortReg|ShiftCount|Acc|FloatAcc) -#define Imm (Imm8|Imm8S|Imm16|Imm32) /* gen'l immediate */ -#define Disp (Disp8|Disp16|Disp32) /* General displacement */ -#define AnyMem (Disp|BaseIndex|InvMem) /* General memory */ -/* The following aliases are defined because the opcode table - carefully specifies the allowed memory types for each instruction. - At the moment we can only tell a memory reference size by the - instruction suffix, so there's not much point in defining Mem8, - Mem16, Mem32 and Mem64 opcode modifiers - We might as well just use - the suffix directly to check memory operands. */ -#define LLongMem AnyMem /* 64 bits (or more) */ -#define LongMem AnyMem /* 32 bit memory ref */ -#define ShortMem AnyMem /* 16 bit memory ref */ -#define WordMem AnyMem /* 16 or 32 bit memory ref */ -#define ByteMem AnyMem /* 8 bit memory ref */ - -#define SMALLEST_DISP_TYPE(num) \ - (fits_in_signed_byte(num) ? (Disp8|Disp32) : Disp32) typedef struct { @@ -328,7 +264,33 @@ typedef struct AMD 3DNow! instructions. If this template has no extension opcode (the usual case) use None */ unsigned int extension_opcode; -#define None 0xffff /* If no extension_opcode is possible. */ +#define None 0xffff /* If no extension_opcode is possible. */ + + /* cpu feature flags */ + unsigned int cpu_flags; +#define Cpu086 0x1 /* Any old cpu will do, 0 does the same */ +#define Cpu186 0x2 /* i186 or better required */ +#define Cpu286 0x4 /* i286 or better required */ +#define Cpu386 0x8 /* i386 or better required */ +#define Cpu486 0x10 /* i486 or better required */ +#define Cpu586 0x20 /* i585 or better required */ +#define Cpu686 0x40 /* i686 or better required */ +#define CpuP4 0x80 /* Pentium4 or better required */ +#define CpuK6 0x100 /* AMD K6 or better required*/ +#define CpuAthlon 0x200 /* AMD Athlon or better required*/ +#define CpuSledgehammer 0x400 /* Sledgehammer or better required */ +#define CpuMMX 0x800 /* MMX support required */ +#define CpuSSE 0x1000 /* Streaming SIMD extensions required */ +#define CpuSSE2 0x2000 /* Streaming SIMD extensions 2 required */ +#define Cpu3dnow 0x4000 /* 3dnow! support required */ +#define CpuUnknown 0x8000 /* The CPU is unknown, be on the safe side. */ + + /* These flags are set by gas depending on the flag_code. */ +#define Cpu64 0x4000000 /* 64bit support required */ +#define CpuNo64 0x8000000 /* Not supported in the 64bit mode */ + + /* The default value for unknown CPUs - enable all features to avoid problems. */ +#define CpuUnknownFlags (Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuSledgehammer|CpuMMX|CpuSSE|CpuSSE2|Cpu3dnow|CpuK6|CpuAthlon) /* the bits in opcode_modifier are used to generate the final opcode from the base_opcode. These bits also are used to detect alternate forms of @@ -344,35 +306,107 @@ typedef struct #define FloatR 0x8 /* src/dest swap for floats: MUST BE 0x8 */ #define ShortForm 0x10 /* register is in low 3 bits of opcode */ #define FloatMF 0x20 /* FP insn memory format bit, sized by 0x4 */ -#define Jump 0x40 /* special case for jump insns. */ +#define Jump 0x40 /* special case for jump insns. */ #define JumpDword 0x80 /* call and jump */ #define JumpByte 0x100 /* loop and jecxz */ #define JumpInterSegment 0x200 /* special case for intersegment leaps/calls */ #define FloatD 0x400 /* direction for float insns: MUST BE 0x400 */ #define Seg2ShortForm 0x800 /* encoding of load segment reg insns */ -#define Seg3ShortForm 0x1000 /* fs/gs segment register insns. */ +#define Seg3ShortForm 0x1000 /* fs/gs segment register insns. */ #define Size16 0x2000 /* needs size prefix if in 32-bit mode */ #define Size32 0x4000 /* needs size prefix if in 16-bit mode */ -#define IgnoreSize 0x8000 /* instruction ignores operand size prefix */ -#define DefaultSize 0x10000 /* default insn size depends on mode */ -#define No_bSuf 0x20000 /* b suffix on instruction illegal */ -#define No_wSuf 0x40000 /* w suffix on instruction illegal */ -#define No_lSuf 0x80000 /* l suffix on instruction illegal */ -#define No_sSuf 0x100000 /* s suffix on instruction illegal */ -#define No_dSuf 0x200000 /* d suffix on instruction illegal */ -#define No_xSuf 0x400000 /* x suffix on instruction illegal */ -#define FWait 0x800000 /* instruction needs FWAIT */ -#define IsString 0x1000000 /* quick test for string instructions */ -#define regKludge 0x2000000 /* fake an extra reg operand for clr, imul */ -#define IsPrefix 0x4000000 /* opcode is a prefix */ -#define ImmExt 0x8000000 /* instruction has extension in 8 bit imm */ +#define Size64 0x8000 /* needs size prefix if in 16-bit mode */ +#define IgnoreSize 0x10000 /* instruction ignores operand size prefix */ +#define DefaultSize 0x20000 /* default insn size depends on mode */ +#define No_bSuf 0x40000 /* b suffix on instruction illegal */ +#define No_wSuf 0x80000 /* w suffix on instruction illegal */ +#define No_lSuf 0x100000 /* l suffix on instruction illegal */ +#define No_sSuf 0x200000 /* s suffix on instruction illegal */ +#define No_qSuf 0x400000 /* q suffix on instruction illegal */ +#define No_xSuf 0x800000 /* x suffix on instruction illegal */ +#define FWait 0x1000000 /* instruction needs FWAIT */ +#define IsString 0x2000000 /* quick test for string instructions */ +#define regKludge 0x4000000 /* fake an extra reg operand for clr, imul */ +#define IsPrefix 0x8000000 /* opcode is a prefix */ +#define ImmExt 0x10000000 /* instruction has extension in 8 bit imm */ +#define NoRex64 0x20000000 /* instruction don't need Rex64 prefix. */ +#define Rex64 0x40000000 /* instruction require Rex64 prefix. */ #define Ugh 0x80000000 /* deprecated fp insn, gets a warning */ /* operand_types[i] describes the type of operand i. This is made by OR'ing together all of the possible type masks. (e.g. 'operand_types[i] = Reg|Imm' specifies that operand i can be - either a register or an immediate operand */ + either a register or an immediate operand. */ unsigned int operand_types[3]; + + /* operand_types[i] bits */ + /* register */ +#define Reg8 0x1 /* 8 bit reg */ +#define Reg16 0x2 /* 16 bit reg */ +#define Reg32 0x4 /* 32 bit reg */ +#define Reg64 0x8 /* 64 bit reg */ + /* immediate */ +#define Imm8 0x10 /* 8 bit immediate */ +#define Imm8S 0x20 /* 8 bit immediate sign extended */ +#define Imm16 0x40 /* 16 bit immediate */ +#define Imm32 0x80 /* 32 bit immediate */ +#define Imm32S 0x100 /* 32 bit immediate sign extended */ +#define Imm64 0x200 /* 64 bit immediate */ +#define Imm1 0x400 /* 1 bit immediate */ + /* memory */ +#define BaseIndex 0x800 + /* Disp8,16,32 are used in different ways, depending on the + instruction. For jumps, they specify the size of the PC relative + displacement, for baseindex type instructions, they specify the + size of the offset relative to the base register, and for memory + offset instructions such as `mov 1234,%al' they specify the size of + the offset relative to the segment base. */ +#define Disp8 0x1000 /* 8 bit displacement */ +#define Disp16 0x2000 /* 16 bit displacement */ +#define Disp32 0x4000 /* 32 bit displacement */ +#define Disp32S 0x8000 /* 32 bit signed displacement */ +#define Disp64 0x10000 /* 64 bit displacement */ + /* specials */ +#define InOutPortReg 0x20000 /* register to hold in/out port addr = dx */ +#define ShiftCount 0x40000 /* register to hold shift cound = cl */ +#define Control 0x80000 /* Control register */ +#define Debug 0x100000 /* Debug register */ +#define Test 0x200000 /* Test register */ +#define FloatReg 0x400000 /* Float register */ +#define FloatAcc 0x800000 /* Float stack top %st(0) */ +#define SReg2 0x1000000 /* 2 bit segment register */ +#define SReg3 0x2000000 /* 3 bit segment register */ +#define Acc 0x4000000 /* Accumulator %al or %ax or %eax */ +#define JumpAbsolute 0x8000000 +#define RegMMX 0x10000000 /* MMX register */ +#define RegXMM 0x20000000 /* XMM registers in PIII */ +#define EsSeg 0x40000000 /* String insn operand with fixed es segment */ + + /* InvMem is for instructions with a modrm byte that only allow a + general register encoding in the i.tm.mode and i.tm.regmem fields, + eg. control reg moves. They really ought to support a memory form, + but don't, so we add an InvMem flag to the register operand to + indicate that it should be encoded in the i.tm.regmem field. */ +#define InvMem 0x80000000 + +#define Reg (Reg8|Reg16|Reg32|Reg64) /* gen'l register */ +#define WordReg (Reg16|Reg32|Reg64) +#define ImplicitRegister (InOutPortReg|ShiftCount|Acc|FloatAcc) +#define Imm (Imm8|Imm8S|Imm16|Imm32S|Imm32|Imm64) /* gen'l immediate */ +#define EncImm (Imm8|Imm16|Imm32|Imm32S) /* Encodable gen'l immediate */ +#define Disp (Disp8|Disp16|Disp32|Disp32S|Disp64) /* General displacement */ +#define AnyMem (Disp8|Disp16|Disp32|Disp32S|BaseIndex|InvMem) /* General memory */ + /* The following aliases are defined because the opcode table + carefully specifies the allowed memory types for each instruction. + At the moment we can only tell a memory reference size by the + instruction suffix, so there's not much point in defining Mem8, + Mem16, Mem32 and Mem64 opcode modifiers - We might as well just use + the suffix directly to check memory operands. */ +#define LLongMem AnyMem /* 64 bits (or more) */ +#define LongMem AnyMem /* 32 bit memory ref */ +#define ShortMem AnyMem /* 16 bit memory ref */ +#define WordMem AnyMem /* 16 or 32 bit memory ref */ +#define ByteMem AnyMem /* 8 bit memory ref */ } template; @@ -384,47 +418,70 @@ template; END. */ typedef struct - { - const template *start; - const template *end; - } templates; +{ + const template *start; + const template *end; +} +templates; /* these are for register name --> number & type hash lookup */ typedef struct - { - char *reg_name; - unsigned int reg_type; - unsigned int reg_num; - } +{ + char *reg_name; + unsigned int reg_type; + unsigned int reg_flags; +#define RegRex 0x1 /* Extended register. */ +#define RegRex64 0x2 /* Extended 8 bit register. */ + unsigned int reg_num; +} reg_entry; typedef struct - { - char *seg_name; - unsigned int seg_prefix; - } +{ + char *seg_name; + unsigned int seg_prefix; +} seg_entry; -/* 386 operand encoding bytes: see 386 book for details of this. */ +/* 386 operand encoding bytes: see 386 book for details of this. */ typedef struct - { - unsigned int regmem; /* codes register or memory operand */ - unsigned int reg; /* codes register operand (or extended opcode) */ - unsigned int mode; /* how to interpret regmem & reg */ - } +{ + unsigned int regmem; /* codes register or memory operand */ + unsigned int reg; /* codes register operand (or extended opcode) */ + unsigned int mode; /* how to interpret regmem & reg */ +} modrm_byte; -/* 386 opcode byte to code indirect addressing. */ +/* x86-64 extension prefix. */ typedef struct { - unsigned base; - unsigned index; - unsigned scale; + unsigned int mode64; + unsigned int extX; /* Used to extend modrm reg field. */ + unsigned int extY; /* Used to extend SIB index field. */ + unsigned int extZ; /* Used to extend modrm reg/mem, SIB base, modrm base fields. */ + unsigned int empty; /* Used to old-style byte registers to new style. */ } +rex_byte; + +/* 386 opcode byte to code indirect addressing. */ +typedef struct +{ + unsigned base; + unsigned index; + unsigned scale; +} sib_byte; +/* x86 arch names and features */ +typedef struct +{ + const char *name; /* arch name */ + unsigned int flags; /* cpu feature flags */ +} +arch_entry; + /* The name of the global offset table generated by the compiler. Allow - this to be overridden if need be. */ + this to be overridden if need be. */ #ifndef GLOBAL_OFFSET_TABLE_NAME #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" #endif @@ -446,13 +503,12 @@ if ((n) && !need_pass_2 \ && (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1)) \ && subseg_text_p (now_seg)) \ { \ - char *p; \ - p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \ - (symbolS *) 0, (offsetT) (n), (char *) 0); \ - *p = 0x90; \ + frag_align_code ((n), (max)); \ goto around; \ } +#define MAX_MEM_FOR_RS_ALIGN_CODE 15 + extern void i386_align_code PARAMS ((fragS *, int)); #define HANDLE_ALIGN(fragP) \ @@ -475,5 +531,3 @@ extern void sco_id PARAMS ((void)); #endif #define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */ - -/* end of tc-i386.h */ diff --git a/contrib/binutils/gas/config/tc-m68851.h b/contrib/binutils/gas/config/tc-m68851.h index 0f6d741..398e1d2 100644 --- a/contrib/binutils/gas/config/tc-m68851.h +++ b/contrib/binutils/gas/config/tc-m68851.h @@ -1,22 +1,23 @@ /* This file is tc-m68851.h - Copyright (C) 1987-1992 Free Software Foundation, Inc. - + Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. + This file is part of GAS, the GNU Assembler. - + GAS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GAS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* * pmmu.h @@ -26,16 +27,16 @@ to us as part of the changes for the m68851 Memory Management Unit */ /* Copyright (C) 1987 Free Software Foundation, Inc. - + This file is part of Gas, the GNU Assembler. - + The GNU assembler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the GNU Assembler General Public License for full details. - + Everyone is granted permission to copy, modify and redistribute the GNU Assembler, but only under the conditions described in the GNU Assembler General Public License. A copy of this license is @@ -47,10 +48,10 @@ #ifdef m68851 /* - I didn't use much imagination in choosing the + I didn't use much imagination in choosing the following codes, so many of them aren't very mnemonic. -rab - + P pmmu register Possible values: 000 TC Translation Control reg @@ -58,28 +59,28 @@ 101 VAL Validate Access Level 110 SCC Stack Change Control 111 AC Access Control - + W wide pmmu registers Possible values: 001 DRP Dma Root Pointer 010 SRP Supervisor Root Pointer 011 CRP Cpu Root Pointer - + f function code register 0 SFC 1 DFC - + V VAL register only - + X BADx, BACx 100 BAD Breakpoint Acknowledge Data 101 BAC Breakpoint Acknowledge Control - + Y PSR Z PCSR - + | memory (modes 2-6, 7.*) - + */ /* @@ -136,8 +137,7 @@ {"pbwcw", one(0xf089), one(0xffbf), "Bc"}, {"pbws", one(0xf0c8), one(0xffbf), "Bc"}, {"pbwsw", one(0xf088), one(0xffbf), "Bc"}, - - + {"pdbac", two(0xf048, 0x0007), two(0xfff8, 0xffff), "DsBw"}, {"pdbas", two(0xf048, 0x0006), two(0xfff8, 0xffff), "DsBw"}, {"pdbbc", two(0xf048, 0x0001), two(0xfff8, 0xffff), "DsBw"}, @@ -154,53 +154,53 @@ {"pdbss", two(0xf048, 0x0004), two(0xfff8, 0xffff), "DsBw"}, {"pdbwc", two(0xf048, 0x0009), two(0xfff8, 0xffff), "DsBw"}, {"pdbws", two(0xf048, 0x0008), two(0xfff8, 0xffff), "DsBw"}, - + {"pflusha", two(0xf000, 0x2400), two(0xffff, 0xffff), "" }, - + {"pflush", two(0xf000, 0x3010), two(0xffc0, 0xfe10), "T3T9" }, {"pflush", two(0xf000, 0x3810), two(0xffc0, 0xfe10), "T3T9&s" }, {"pflush", two(0xf000, 0x3008), two(0xffc0, 0xfe18), "D3T9" }, {"pflush", two(0xf000, 0x3808), two(0xffc0, 0xfe18), "D3T9&s" }, {"pflush", two(0xf000, 0x3000), two(0xffc0, 0xfe1e), "f3T9" }, {"pflush", two(0xf000, 0x3800), two(0xffc0, 0xfe1e), "f3T9&s" }, - + {"pflushs", two(0xf000, 0x3410), two(0xfff8, 0xfe10), "T3T9" }, {"pflushs", two(0xf000, 0x3c00), two(0xfff8, 0xfe00), "T3T9&s" }, {"pflushs", two(0xf000, 0x3408), two(0xfff8, 0xfe18), "D3T9" }, {"pflushs", two(0xf000, 0x3c08), two(0xfff8, 0xfe18), "D3T9&s" }, {"pflushs", two(0xf000, 0x3400), two(0xfff8, 0xfe1e), "f3T9" }, {"pflushs", two(0xf000, 0x3c00), two(0xfff8, 0xfe1e), "f3T9&s"}, - + {"pflushr", two(0xf000, 0xa000), two(0xffc0, 0xffff), "|s" }, - + {"ploadr", two(0xf000, 0x2210), two(0xffc0, 0xfff0), "T3&s" }, {"ploadr", two(0xf000, 0x2208), two(0xffc0, 0xfff8), "D3&s" }, {"ploadr", two(0xf000, 0x2200), two(0xffc0, 0xfffe), "f3&s" }, {"ploadw", two(0xf000, 0x2010), two(0xffc0, 0xfff0), "T3&s" }, {"ploadw", two(0xf000, 0x2008), two(0xffc0, 0xfff8), "D3&s" }, {"ploadw", two(0xf000, 0x2000), two(0xffc0, 0xfffe), "f3&s" }, - + /* TC, CRP, DRP, SRP, CAL, VAL, SCC, AC */ {"pmove", two(0xf000, 0x4000), two(0xffc0, 0xe3ff), "*sP8" }, {"pmove", two(0xf000, 0x4200), two(0xffc0, 0xe3ff), "P8%s" }, {"pmove", two(0xf000, 0x4000), two(0xffc0, 0xe3ff), "|sW8" }, {"pmove", two(0xf000, 0x4200), two(0xffc0, 0xe3ff), "W8~s" }, - + /* BADx, BACx */ {"pmove", two(0xf000, 0x6200), two(0xffc0, 0xe3e3), "*sX3" }, {"pmove", two(0xf000, 0x6000), two(0xffc0, 0xe3e3), "X3%s" }, - + /* PSR, PCSR */ /* {"pmove", two(0xf000, 0x6100), two(oxffc0, oxffff), "*sZ8" }, */ {"pmove", two(0xf000, 0x6000), two(0xffc0, 0xffff), "*sY8" }, {"pmove", two(0xf000, 0x6200), two(0xffc0, 0xffff), "Y8%s" }, {"pmove", two(0xf000, 0x6600), two(0xffc0, 0xffff), "Z8%s" }, - + {"prestore", one(0xf140), one(0xffc0), "&s"}, {"prestore", one(0xf158), one(0xfff8), "+s"}, {"psave", one(0xf100), one(0xffc0), "&s"}, {"psave", one(0xf100), one(0xffc0), "+s"}, - + {"psac", two(0xf040, 0x0007), two(0xffc0, 0xffff), "@s"}, {"psas", two(0xf040, 0x0006), two(0xffc0, 0xffff), "@s"}, {"psbc", two(0xf040, 0x0001), two(0xffc0, 0xffff), "@s"}, @@ -217,88 +217,86 @@ {"psss", two(0xf040, 0x0004), two(0xffc0, 0xffff), "@s"}, {"pswc", two(0xf040, 0x0009), two(0xffc0, 0xffff), "@s"}, {"psws", two(0xf040, 0x0008), two(0xffc0, 0xffff), "@s"}, - + {"ptestr", two(0xf000, 0x8210), two(0xffc0, 0xe3f0), "T3&sQ8" }, {"ptestr", two(0xf000, 0x8310), two(0xffc0, 0xe310), "T3&sQ8A9" }, {"ptestr", two(0xf000, 0x8208), two(0xffc0, 0xe3f8), "D3&sQ8" }, {"ptestr", two(0xf000, 0x8308), two(0xffc0, 0xe318), "D3&sQ8A9" }, {"ptestr", two(0xf000, 0x8200), two(0xffc0, 0xe3fe), "f3&sQ8" }, {"ptestr", two(0xf000, 0x8300), two(0xffc0, 0xe31e), "f3&sQ8A9" }, - + {"ptestw", two(0xf000, 0x8010), two(0xffc0, 0xe3f0), "T3&sQ8" }, {"ptestw", two(0xf000, 0x8110), two(0xffc0, 0xe310), "T3&sQ8A9" }, {"ptestw", two(0xf000, 0x8008), two(0xffc0, 0xe3f8), "D3&sQ8" }, {"ptestw", two(0xf000, 0x8108), two(0xffc0, 0xe318), "D3&sQ8A9" }, {"ptestw", two(0xf000, 0x8000), two(0xffc0, 0xe3fe), "f3&sQ8" }, {"ptestw", two(0xf000, 0x8100), two(0xffc0, 0xe31e), "f3&sQ8A9" }, - + {"ptrapacw", two(0xf07a, 0x0007), two(0xffff, 0xffff), "#w"}, {"ptrapacl", two(0xf07b, 0x0007), two(0xffff, 0xffff), "#l"}, {"ptrapac", two(0xf07c, 0x0007), two(0xffff, 0xffff), ""}, - + {"ptrapasw", two(0xf07a, 0x0006), two(0xffff, 0xffff), "#w"}, {"ptrapasl", two(0xf07b, 0x0006), two(0xffff, 0xffff), "#l"}, {"ptrapas", two(0xf07c, 0x0006), two(0xffff, 0xffff), ""}, - + {"ptrapbcw", two(0xf07a, 0x0001), two(0xffff, 0xffff), "#w"}, {"ptrapbcl", two(0xf07b, 0x0001), two(0xffff, 0xffff), "#l"}, {"ptrapbc", two(0xf07c, 0x0001), two(0xffff, 0xffff), ""}, - + {"ptrapbsw", two(0xf07a, 0x0000), two(0xffff, 0xffff), "#w"}, {"ptrapbsl", two(0xf07b, 0x0000), two(0xffff, 0xffff), "#l"}, {"ptrapbs", two(0xf07c, 0x0000), two(0xffff, 0xffff), ""}, - + {"ptrapccw", two(0xf07a, 0x000f), two(0xffff, 0xffff), "#w"}, {"ptrapccl", two(0xf07b, 0x000f), two(0xffff, 0xffff), "#l"}, {"ptrapcc", two(0xf07c, 0x000f), two(0xffff, 0xffff), ""}, - + {"ptrapcsw", two(0xf07a, 0x000e), two(0xffff, 0xffff), "#w"}, {"ptrapcsl", two(0xf07b, 0x000e), two(0xffff, 0xffff), "#l"}, {"ptrapcs", two(0xf07c, 0x000e), two(0xffff, 0xffff), ""}, - + {"ptrapgcw", two(0xf07a, 0x000d), two(0xffff, 0xffff), "#w"}, {"ptrapgcl", two(0xf07b, 0x000d), two(0xffff, 0xffff), "#l"}, {"ptrapgc", two(0xf07c, 0x000d), two(0xffff, 0xffff), ""}, - + {"ptrapgsw", two(0xf07a, 0x000c), two(0xffff, 0xffff), "#w"}, {"ptrapgsl", two(0xf07b, 0x000c), two(0xffff, 0xffff), "#l"}, {"ptrapgs", two(0xf07c, 0x000c), two(0xffff, 0xffff), ""}, - + {"ptrapicw", two(0xf07a, 0x000b), two(0xffff, 0xffff), "#w"}, {"ptrapicl", two(0xf07b, 0x000b), two(0xffff, 0xffff), "#l"}, {"ptrapic", two(0xf07c, 0x000b), two(0xffff, 0xffff), ""}, - + {"ptrapisw", two(0xf07a, 0x000a), two(0xffff, 0xffff), "#w"}, {"ptrapisl", two(0xf07b, 0x000a), two(0xffff, 0xffff), "#l"}, {"ptrapis", two(0xf07c, 0x000a), two(0xffff, 0xffff), ""}, - + {"ptraplcw", two(0xf07a, 0x0003), two(0xffff, 0xffff), "#w"}, {"ptraplcl", two(0xf07b, 0x0003), two(0xffff, 0xffff), "#l"}, {"ptraplc", two(0xf07c, 0x0003), two(0xffff, 0xffff), ""}, - + {"ptraplsw", two(0xf07a, 0x0002), two(0xffff, 0xffff), "#w"}, {"ptraplsl", two(0xf07b, 0x0002), two(0xffff, 0xffff), "#l"}, {"ptrapls", two(0xf07c, 0x0002), two(0xffff, 0xffff), ""}, - + {"ptrapscw", two(0xf07a, 0x0005), two(0xffff, 0xffff), "#w"}, {"ptrapscl", two(0xf07b, 0x0005), two(0xffff, 0xffff), "#l"}, {"ptrapsc", two(0xf07c, 0x0005), two(0xffff, 0xffff), ""}, - + {"ptrapssw", two(0xf07a, 0x0004), two(0xffff, 0xffff), "#w"}, {"ptrapssl", two(0xf07b, 0x0004), two(0xffff, 0xffff), "#l"}, {"ptrapss", two(0xf07c, 0x0004), two(0xffff, 0xffff), ""}, - + {"ptrapwcw", two(0xf07a, 0x0009), two(0xffff, 0xffff), "#w"}, {"ptrapwcl", two(0xf07b, 0x0009), two(0xffff, 0xffff), "#l"}, {"ptrapwc", two(0xf07c, 0x0009), two(0xffff, 0xffff), ""}, - + {"ptrapwsw", two(0xf07a, 0x0008), two(0xffff, 0xffff), "#w"}, {"ptrapwsl", two(0xf07b, 0x0008), two(0xffff, 0xffff), "#l"}, {"ptrapws", two(0xf07c, 0x0008), two(0xffff, 0xffff), ""}, - + {"pvalid", two(0xf000, 0x2800), two(0xffc0, 0xffff), "Vs&s"}, {"pvalid", two(0xf000, 0x2c00), two(0xffc0, 0xfff8), "A3&s" }, - -#endif /* m68851 */ -/* end of tc-m68851.h */ +#endif /* m68851 */ diff --git a/contrib/binutils/gas/config/tc-ppc.c b/contrib/binutils/gas/config/tc-ppc.c index 365a535..2b826cb 100644 --- a/contrib/binutils/gas/config/tc-ppc.c +++ b/contrib/binutils/gas/config/tc-ppc.c @@ -1,5 +1,5 @@ /* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000) - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #include <stdio.h> #include <ctype.h> @@ -29,6 +29,7 @@ #ifdef OBJ_ELF #include "elf/ppc.h" +#include "dwarf2dbg.h" #endif #ifdef TE_PE @@ -86,6 +87,7 @@ static void ppc_stabx PARAMS ((int)); static void ppc_rename PARAMS ((int)); static void ppc_toc PARAMS ((int)); static void ppc_xcoff_cons PARAMS ((int)); +static void ppc_machine PARAMS ((int)); static void ppc_vbyte PARAMS ((int)); #endif @@ -182,9 +184,11 @@ const pseudo_typeS md_pseudo_table[] = { "text", ppc_section, 't' }, { "toc", ppc_toc, 0 }, { "long", ppc_xcoff_cons, 2 }, + { "llong", ppc_xcoff_cons, 3 }, { "word", ppc_xcoff_cons, 1 }, { "short", ppc_xcoff_cons, 1 }, { "vbyte", ppc_vbyte, 0 }, + { "machine", ppc_machine, 0 }, #endif #ifdef OBJ_ELF @@ -194,6 +198,8 @@ const pseudo_typeS md_pseudo_table[] = { "rdata", ppc_elf_rdata, 0 }, { "rodata", ppc_elf_rdata, 0 }, { "lcomm", ppc_elf_lcomm, 0 }, + { "file", dwarf2_directive_file, 0 }, + { "loc", dwarf2_directive_loc, 0 }, #endif #ifdef TE_PE @@ -236,11 +242,14 @@ struct pd_reg 1. r<reg_num> which has the value <reg_num>. 2. r.<reg_num> which has the value <reg_num>. - Each floating point register has predefined names of the form: 1. f<reg_num> which has the value <reg_num>. 2. f.<reg_num> which has the value <reg_num>. + Each vector unit register has predefined names of the form: + 1. v<reg_num> which has the value <reg_num>. + 2. v.<reg_num> which has the value <reg_num>. + Each condition register has predefined names of the form: 1. cr<reg_num> which has the value <reg_num>. 2. cr.<reg_num> which has the value <reg_num>. @@ -260,7 +269,7 @@ struct pd_reg srr0 has the value 26 srr1 has the value 27 - The table is sorted. Suitable for searching by a binary search. */ + The table is sorted. Suitable for searching by a binary search. */ static const struct pd_reg pre_defined_registers[] = { @@ -289,70 +298,70 @@ static const struct pd_reg pre_defined_registers[] = { "dsisr", 18 }, /* Data Storage Interrupt Status Register */ { "f.0", 0 }, /* Floating point registers */ - { "f.1", 1 }, - { "f.10", 10 }, - { "f.11", 11 }, - { "f.12", 12 }, - { "f.13", 13 }, - { "f.14", 14 }, - { "f.15", 15 }, - { "f.16", 16 }, - { "f.17", 17 }, - { "f.18", 18 }, - { "f.19", 19 }, - { "f.2", 2 }, - { "f.20", 20 }, - { "f.21", 21 }, - { "f.22", 22 }, - { "f.23", 23 }, - { "f.24", 24 }, - { "f.25", 25 }, - { "f.26", 26 }, - { "f.27", 27 }, - { "f.28", 28 }, - { "f.29", 29 }, - { "f.3", 3 }, + { "f.1", 1 }, + { "f.10", 10 }, + { "f.11", 11 }, + { "f.12", 12 }, + { "f.13", 13 }, + { "f.14", 14 }, + { "f.15", 15 }, + { "f.16", 16 }, + { "f.17", 17 }, + { "f.18", 18 }, + { "f.19", 19 }, + { "f.2", 2 }, + { "f.20", 20 }, + { "f.21", 21 }, + { "f.22", 22 }, + { "f.23", 23 }, + { "f.24", 24 }, + { "f.25", 25 }, + { "f.26", 26 }, + { "f.27", 27 }, + { "f.28", 28 }, + { "f.29", 29 }, + { "f.3", 3 }, { "f.30", 30 }, { "f.31", 31 }, - { "f.4", 4 }, - { "f.5", 5 }, - { "f.6", 6 }, - { "f.7", 7 }, - { "f.8", 8 }, - { "f.9", 9 }, - - { "f0", 0 }, - { "f1", 1 }, - { "f10", 10 }, - { "f11", 11 }, - { "f12", 12 }, - { "f13", 13 }, - { "f14", 14 }, - { "f15", 15 }, - { "f16", 16 }, - { "f17", 17 }, - { "f18", 18 }, - { "f19", 19 }, - { "f2", 2 }, - { "f20", 20 }, - { "f21", 21 }, - { "f22", 22 }, - { "f23", 23 }, - { "f24", 24 }, - { "f25", 25 }, - { "f26", 26 }, - { "f27", 27 }, - { "f28", 28 }, - { "f29", 29 }, - { "f3", 3 }, + { "f.4", 4 }, + { "f.5", 5 }, + { "f.6", 6 }, + { "f.7", 7 }, + { "f.8", 8 }, + { "f.9", 9 }, + + { "f0", 0 }, + { "f1", 1 }, + { "f10", 10 }, + { "f11", 11 }, + { "f12", 12 }, + { "f13", 13 }, + { "f14", 14 }, + { "f15", 15 }, + { "f16", 16 }, + { "f17", 17 }, + { "f18", 18 }, + { "f19", 19 }, + { "f2", 2 }, + { "f20", 20 }, + { "f21", 21 }, + { "f22", 22 }, + { "f23", 23 }, + { "f24", 24 }, + { "f25", 25 }, + { "f26", 26 }, + { "f27", 27 }, + { "f28", 28 }, + { "f29", 29 }, + { "f3", 3 }, { "f30", 30 }, { "f31", 31 }, - { "f4", 4 }, - { "f5", 5 }, - { "f6", 6 }, - { "f7", 7 }, - { "f8", 8 }, - { "f9", 9 }, + { "f4", 4 }, + { "f5", 5 }, + { "f6", 6 }, + { "f7", 7 }, + { "f8", 8 }, + { "f9", 9 }, { "fpscr", 0 }, @@ -439,11 +448,77 @@ static const struct pd_reg pre_defined_registers[] = { "srr0", 26 }, /* Machine Status Save/Restore Register 0 */ { "srr1", 27 }, /* Machine Status Save/Restore Register 1 */ + { "v.0", 0 }, /* Vector registers */ + { "v.1", 1 }, + { "v.10", 10 }, + { "v.11", 11 }, + { "v.12", 12 }, + { "v.13", 13 }, + { "v.14", 14 }, + { "v.15", 15 }, + { "v.16", 16 }, + { "v.17", 17 }, + { "v.18", 18 }, + { "v.19", 19 }, + { "v.2", 2 }, + { "v.20", 20 }, + { "v.21", 21 }, + { "v.22", 22 }, + { "v.23", 23 }, + { "v.24", 24 }, + { "v.25", 25 }, + { "v.26", 26 }, + { "v.27", 27 }, + { "v.28", 28 }, + { "v.29", 29 }, + { "v.3", 3 }, + { "v.30", 30 }, + { "v.31", 31 }, + { "v.4", 4 }, + { "v.5", 5 }, + { "v.6", 6 }, + { "v.7", 7 }, + { "v.8", 8 }, + { "v.9", 9 }, + + { "v0", 0 }, + { "v1", 1 }, + { "v10", 10 }, + { "v11", 11 }, + { "v12", 12 }, + { "v13", 13 }, + { "v14", 14 }, + { "v15", 15 }, + { "v16", 16 }, + { "v17", 17 }, + { "v18", 18 }, + { "v19", 19 }, + { "v2", 2 }, + { "v20", 20 }, + { "v21", 21 }, + { "v22", 22 }, + { "v23", 23 }, + { "v24", 24 }, + { "v25", 25 }, + { "v26", 26 }, + { "v27", 27 }, + { "v28", 28 }, + { "v29", 29 }, + { "v3", 3 }, + { "v30", 30 }, + { "v31", 31 }, + { "v4", 4 }, + { "v5", 5 }, + { "v6", 6 }, + { "v7", 7 }, + { "v8", 8 }, + { "v9", 9 }, + { "xer", 1 }, }; -#define REG_NAME_CNT (sizeof(pre_defined_registers) / sizeof(struct pd_reg)) +#define REG_NAME_CNT (sizeof (pre_defined_registers) / sizeof (struct pd_reg)) /* Given NAME, find the register number associated with that name, return the integer value associated with the given name or -1 on failure. */ @@ -512,11 +587,11 @@ register_name (expressionP) reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name); /* look to see if it's in the register table */ - if (reg_number >= 0) + if (reg_number >= 0) { expressionP->X_op = O_register; expressionP->X_add_number = reg_number; - + /* make the rest nice */ expressionP->X_add_symbol = NULL; expressionP->X_op_symbol = NULL; @@ -591,6 +666,9 @@ static int ppc_cpu = 0; PPC_OPCODE_32 or PPC_OPCODE_64. */ static unsigned long ppc_size = PPC_OPCODE_32; +/* Whether to target xcoff64 */ +static int ppc_xcoff64 = 0; + /* Opcode hash table. */ static struct hash_control *ppc_hash; @@ -599,7 +677,7 @@ static struct hash_control *ppc_macro_hash; #ifdef OBJ_ELF /* What type of shared library support to use */ -static enum { SHLIB_NONE, SHLIB_PIC, SHILB_MRELOCATABLE } shlib = SHLIB_NONE; +static enum { SHLIB_NONE, SHLIB_PIC, SHLIB_MRELOCATABLE } shlib = SHLIB_NONE; /* Flags to set in the elf header */ static flagword ppc_flags = 0; @@ -670,7 +748,7 @@ static segT reldata_section; static segT rdata_section; static segT tocdata_section; -/* The current section and the previous section. See ppc_previous. */ +/* The current section and the previous section. See ppc_previous. */ static segT ppc_previous_section; static segT ppc_current_section; @@ -688,7 +766,7 @@ CONST char *md_shortopts = "um:"; struct option md_longopts[] = { {NULL, no_argument, NULL, 0} }; -size_t md_longopts_size = sizeof(md_longopts); +size_t md_longopts_size = sizeof (md_longopts); int md_parse_option (c, arg) @@ -740,6 +818,16 @@ md_parse_option (c, arg) break; #endif + /* a64 and a32 determine whether to use XCOFF64 or XCOFF32. */ + case 'a': + if (strcmp (arg, "64") == 0) + ppc_xcoff64 = 1; + else if (strcmp (arg, "32") == 0) + ppc_xcoff64 = 0; + else + return 0; + break; + case 'm': /* -mpwrx and -mpwr2 mean to assemble for the IBM POWER/2 (RIOS2). */ @@ -749,7 +837,7 @@ md_parse_option (c, arg) else if (strcmp (arg, "pwr") == 0) ppc_cpu = PPC_OPCODE_POWER; /* -m601 means to assemble for the Motorola PowerPC 601, which includes - instructions that are holdovers from the Power. */ + instructions that are holdovers from the Power. */ else if (strcmp (arg, "601") == 0) ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_601; /* -mppc, -mppc32, -m603, and -m604 mean to assemble for the @@ -757,9 +845,12 @@ md_parse_option (c, arg) else if (strcmp (arg, "ppc") == 0 || strcmp (arg, "ppc32") == 0 || strcmp (arg, "403") == 0 + || strcmp (arg, "405") == 0 || strcmp (arg, "603") == 0 || strcmp (arg, "604") == 0) ppc_cpu = PPC_OPCODE_PPC; + else if (strcmp (arg, "7400") == 0) + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC; /* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC 620. */ else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0) @@ -791,13 +882,13 @@ md_parse_option (c, arg) /* -mrelocatable/-mrelocatable-lib -- warn about initializations that require relocation */ else if (strcmp (arg, "relocatable") == 0) { - shlib = SHILB_MRELOCATABLE; + shlib = SHLIB_MRELOCATABLE; ppc_flags |= EF_PPC_RELOCATABLE; } else if (strcmp (arg, "relocatable-lib") == 0) { - shlib = SHILB_MRELOCATABLE; + shlib = SHLIB_MRELOCATABLE; ppc_flags |= EF_PPC_RELOCATABLE_LIB; } @@ -869,13 +960,13 @@ void md_show_usage (stream) FILE *stream; { - fprintf(stream, _("\ + fprintf (stream, _("\ PowerPC options:\n\ -u ignored\n\ -mpwrx, -mpwr2 generate code for IBM POWER/2 (RIOS2)\n\ -mpwr generate code for IBM POWER (RIOS1)\n\ -m601 generate code for Motorola PowerPC 601\n\ --mppc, -mppc32, -m403, -m603, -m604\n\ +-mppc, -mppc32, -m403, -m405, -m603, -m604\n\ generate code for Motorola PowerPC 603/604\n\ -mppc64, -m620 generate code for Motorola PowerPC 620\n\ -mppc64bridge generate code for PowerPC 64, including bridge insns\n\ @@ -884,7 +975,7 @@ PowerPC options:\n\ -mregnames Allow symbolic names for registers\n\ -mno-regnames Do not allow symbolic names for registers\n")); #ifdef OBJ_ELF - fprintf(stream, _("\ + fprintf (stream, _("\ -mrelocatable support for GCC's -mrelocatble option\n\ -mrelocatable-lib support for GCC's -mrelocatble-lib option\n\ -memb set PPC_EMB bit in ELF flags\n\ @@ -948,6 +1039,37 @@ ppc_arch () return bfd_arch_unknown; } +unsigned long +ppc_mach () +{ + return (ppc_size == PPC_OPCODE_64) ? 620 : 0; +} + +int +ppc_subseg_align() +{ + return (ppc_xcoff64) ? 3 : 2; +} + +extern char* +ppc_target_format() +{ +#ifdef OBJ_COFF +#ifdef TE_PE + return (target_big_endian ? "pe-powerpc" : "pe-powerpcle"); +#elif TE_POWERMAC +#else + return (ppc_xcoff64 ? "aixcoff64-rs6000" : "aixcoff-rs6000"); +#endif +#ifdef TE_POWERMAC + return "xcoff-powermac"; +#endif +#endif +#ifdef OBJ_ELF + return (target_big_endian ? "elf32-powerpc" : "elf32-powerpcle"); +#endif +} + /* This function is called when the assembler starts up. It is called after the options have been parsed and the output file has been opened. */ @@ -964,7 +1086,7 @@ md_begin () ppc_set_cpu (); #ifdef OBJ_ELF - /* Set the ELF flags if desired. */ + /* Set the ELF flags if desired. */ if (ppc_flags && !msolaris) bfd_set_private_flags (stdoutput, ppc_flags); #endif @@ -1042,7 +1164,7 @@ md_begin () #ifdef TE_PE ppc_current_section = text_section; - ppc_previous_section = 0; + ppc_previous_section = 0; #endif } @@ -1147,7 +1269,7 @@ ppc_elf_suffix (str_p, exp_p) int len; struct map_bfd *ptr; -#define MAP(str,reloc) { str, sizeof(str)-1, reloc } +#define MAP(str,reloc) { str, sizeof (str)-1, reloc } static struct map_bfd mapping[] = { MAP ("l", BFD_RELOC_LO16), @@ -1248,9 +1370,9 @@ ppc_elf_suffix (str_p, exp_p) return BFD_RELOC_UNUSED; } -/* Like normal .long/.short/.word, except support @got, etc. */ +/* Like normal .long/.short/.word, except support @got, etc. */ /* clobbers input_line_pointer, checks */ -/* end-of-line. */ +/* end-of-line. */ static void ppc_elf_cons (nbytes) register int nbytes; /* 1=.byte, 2=.word, 4=.long */ @@ -1290,7 +1412,7 @@ ppc_elf_cons (nbytes) } while (*input_line_pointer++ == ','); - input_line_pointer--; /* Put terminator back into stream. */ + input_line_pointer--; /* Put terminator back into stream. */ demand_empty_rest_of_line (); } @@ -1434,7 +1556,7 @@ ppc_elf_validate_fix (fixp, seg) case SHLIB_PIC: return; - case SHILB_MRELOCATABLE: + case SHLIB_MRELOCATABLE: if (fixp->fx_r_type <= BFD_RELOC_UNUSED && fixp->fx_r_type != BFD_RELOC_16_GOTOFF && fixp->fx_r_type != BFD_RELOC_HI16_GOTOFF @@ -1476,7 +1598,7 @@ ppc_elf_validate_fix (fixp, seg) * * Anything else is an error of one kind or another. * - * out: + * out: * return value: success or failure * toc_kind: kind of toc reference * input_line_pointer: @@ -1492,8 +1614,8 @@ ppc_elf_validate_fix (fixp, seg) * */ -enum toc_size_qualifier -{ +enum toc_size_qualifier +{ default_toc, /* The toc cell constructed should be the system default size */ data_in_toc, /* This is a direct reference to a toc cell */ must_be_32, /* The toc cell constructed must be 32 bits wide */ @@ -1515,24 +1637,24 @@ parse_toc_entry(toc_kind) /* skip over the '[' , and whitespace */ ++input_line_pointer; SKIP_WHITESPACE (); - + /* find the spelling of the operand */ toc_spec = input_line_pointer; c = get_symbol_end (); - if (strcmp(toc_spec, "toc") == 0) + if (strcmp(toc_spec, "toc") == 0) { t = default_toc; } - else if (strcmp(toc_spec, "tocv") == 0) + else if (strcmp(toc_spec, "tocv") == 0) { t = data_in_toc; } - else if (strcmp(toc_spec, "toc32") == 0) + else if (strcmp(toc_spec, "toc32") == 0) { t = must_be_32; } - else if (strcmp(toc_spec, "toc64") == 0) + else if (strcmp(toc_spec, "toc64") == 0) { t = must_be_64; } @@ -1547,8 +1669,8 @@ parse_toc_entry(toc_kind) /* now find the ']' */ *input_line_pointer = c; /* put back the delimiting char */ - SKIP_WHITESPACE (); /* leading whitespace could be there. */ - c = *input_line_pointer++; /* input_line_pointer->past char in c. */ + SKIP_WHITESPACE (); /* leading whitespace could be there. */ + c = *input_line_pointer++; /* input_line_pointer->past char in c. */ if (c != ']') { @@ -1721,13 +1843,13 @@ md_assemble (str) input_line_pointer = str; #ifdef TE_PE - if (*input_line_pointer == '[') + if (*input_line_pointer == '[') { /* We are expecting something like the second argument here: lwz r4,[toc].GS.0.static_int(rtoc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - The argument following the `]' must be a symbol name, and the + The argument following the `]' must be a symbol name, and the register must be the toc register: 'rtoc' or '2' The effect is to 0 as the displacement field @@ -1755,7 +1877,7 @@ md_assemble (str) /* go parse off the [tocXX] part */ valid_toc = parse_toc_entry(&toc_kind); - if (!valid_toc) + if (!valid_toc) { /* Note: message has already been issued. */ /* FIXME: what sort of recovery should we do? */ @@ -1781,8 +1903,8 @@ md_assemble (str) /* FIXME: It's a little confusing what the tocv qualifier can */ /* be used for. At the very least, I've seen three */ /* uses, only one of which I'm sure I can explain. */ - if (ex.X_op == O_symbol) - { + if (ex.X_op == O_symbol) + { assert (ex.X_add_symbol != NULL); if (symbol_get_bfdsym (ex.X_add_symbol)->section != tocdata_section) @@ -1806,10 +1928,10 @@ md_assemble (str) as_bad (_("Unimplemented toc64 expression modifier")); break; default: - fprintf(stderr, + fprintf (stderr, _("Unexpected return value [%d] from parse_toc_entry!\n"), toc_kind); - abort(); + abort (); break; } @@ -1858,7 +1980,7 @@ md_assemble (str) else if (ex.X_op == O_constant) { #ifdef OBJ_ELF - /* Allow @HA, @L, @H on constants. */ + /* Allow @HA, @L, @H on constants. */ char *orig_str = str; if ((reloc = ppc_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED) @@ -1978,6 +2100,10 @@ md_assemble (str) f = frag_more (4); md_number_to_chars (f, insn, 4); +#ifdef OBJ_ELF + dwarf2_emit_insn (4); +#endif + /* Create any fixups. At this point we do not use a bfd_reloc_code_real_type, but instead just use the BFD_RELOC_UNUSED plus the operand index. This lets us easily @@ -2003,7 +2129,7 @@ md_assemble (str) offset = target_big_endian ? (4 - size) : 0; if (size < 1 || size > 4) - abort(); + abort (); fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size, &fixups[i].exp, reloc_howto->pc_relative, @@ -2064,7 +2190,7 @@ ppc_macro (str, macro) if (s == (char *) NULL) break; *s++ = '\0'; - } + } if (count != macro->operands) { @@ -2111,7 +2237,7 @@ ppc_macro (str, macro) /* Assemble the constructed instruction. */ md_assemble (complete); -} +} #ifdef OBJ_ELF /* For ELF, add support for SHF_EXCLUDE and SHT_ORDERED */ @@ -2296,7 +2422,7 @@ ppc_comm (lcomm) lcomm_name = input_line_pointer; lcomm_endc = get_symbol_end (); - + lcomm_sym = symbol_find_or_make (lcomm_name); *input_line_pointer = lcomm_endc; @@ -2313,9 +2439,9 @@ ppc_comm (lcomm) ignore_rest_of_line (); return; } - + record_alignment (bss_section, align); - + if (! lcomm || ! S_IS_DEFINED (lcomm_sym)) { @@ -2337,7 +2463,7 @@ ppc_comm (lcomm) subseg_set (bss_section, 1); frag_align (align, 0, 0); - + symbol_set_frag (def_sym, frag_now); pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, def_sym, def_size, (char *) NULL); @@ -2377,7 +2503,7 @@ ppc_comm (lcomm) static void ppc_csect (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2385,7 +2511,7 @@ ppc_csect (ignore) name = input_line_pointer; endc = get_symbol_end (); - + sym = symbol_find_or_make (name); *input_line_pointer = endc; @@ -2478,16 +2604,16 @@ ppc_change_csect (sym) symbol_set_frag (sym, frag_now); S_SET_VALUE (sym, (valueT) frag_now_fix ()); - symbol_get_tc (sym)->align = 2; + symbol_get_tc (sym)->align = (ppc_xcoff64) ? 3 : 2; symbol_get_tc (sym)->output = 1; symbol_get_tc (sym)->within = sym; - + for (list = *list_ptr; symbol_get_tc (list)->next != (symbolS *) NULL; list = symbol_get_tc (list)->next) ; symbol_get_tc (list)->next = sym; - + symbol_remove (sym, &symbol_rootP, &symbol_lastP); symbol_append (sym, symbol_get_tc (list)->within, &symbol_rootP, &symbol_lastP); @@ -2527,7 +2653,7 @@ ppc_section (type) static void ppc_named_section (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *user_name; const char *real_name; @@ -2562,7 +2688,7 @@ ppc_named_section (ignore) static void ppc_extern (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2581,7 +2707,7 @@ ppc_extern (ignore) static void ppc_lglobl (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2604,7 +2730,7 @@ ppc_lglobl (ignore) static void ppc_rename (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2640,7 +2766,7 @@ ppc_rename (ignore) static void ppc_stabx (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int len; @@ -2747,7 +2873,7 @@ ppc_stabx (ignore) static void ppc_function (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2838,7 +2964,7 @@ ppc_function (ignore) static void ppc_bf (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -2866,7 +2992,7 @@ ppc_bf (ignore) static void ppc_ef (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -2915,7 +3041,7 @@ ppc_biei (ei) S_SET_STORAGE_CLASS (sym, ei ? C_EINCL : C_BINCL); symbol_get_tc (sym)->output = 1; - + for (look = last_biei ? last_biei : symbol_rootP; (look != (symbolS *) NULL && (S_GET_STORAGE_CLASS (look) == C_FILE @@ -2939,7 +3065,7 @@ ppc_biei (ei) static void ppc_bs (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2975,7 +3101,7 @@ ppc_bs (ignore) static void ppc_es (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3000,7 +3126,7 @@ ppc_es (ignore) static void ppc_bb (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3027,7 +3153,7 @@ ppc_bb (ignore) static void ppc_eb (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3052,7 +3178,7 @@ ppc_eb (ignore) static void ppc_bc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int len; @@ -3075,7 +3201,7 @@ ppc_bc (ignore) static void ppc_ec (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3095,7 +3221,7 @@ ppc_ec (ignore) static void ppc_toc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (ppc_toc_csect != (symbolS *) NULL) subseg_set (data_section, symbol_get_tc (ppc_toc_csect)->subseg); @@ -3104,7 +3230,7 @@ ppc_toc (ignore) subsegT subseg; symbolS *sym; symbolS *list; - + subseg = ppc_data_subsegment; ++ppc_data_subsegment; @@ -3120,7 +3246,7 @@ ppc_toc (ignore) symbol_get_tc (sym)->within = sym; ppc_toc_csect = sym; - + for (list = ppc_data_csects; symbol_get_tc (list)->next != (symbolS *) NULL; list = symbol_get_tc (list)->next) @@ -3150,8 +3276,16 @@ ppc_xcoff_cons (log_size) } static void +ppc_machine(dummy) + int dummy ATTRIBUTE_UNUSED; +{ + discard_rest_of_line(); + /* What does aix use this for? */ +} + +static void ppc_vbyte (dummy) - int dummy; + int dummy ATTRIBUTE_UNUSED; { expressionS exp; int byte_count; @@ -3269,7 +3403,7 @@ ppc_tc (ignore) else { ++input_line_pointer; - cons (4); + cons ((ppc_size == PPC_OPCODE_64) ? 8 : 4); } } @@ -3293,11 +3427,11 @@ ppc_set_current_section (new) */ static void ppc_previous(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *tmp; - if (ppc_previous_section == NULL) + if (ppc_previous_section == NULL) { as_warn(_("No previous section to return to. Directive ignored.")); return; @@ -3326,16 +3460,16 @@ ppc_previous(ignore) */ static void ppc_pdata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { - if (pdata_section == 0) + if (pdata_section == 0) { pdata_section = subseg_new (".pdata", 0); - + bfd_set_section_flags (stdoutput, pdata_section, (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | SEC_DATA )); - + bfd_set_section_alignment (stdoutput, pdata_section, 2); } else @@ -3361,9 +3495,9 @@ ppc_pdata(ignore) */ static void ppc_ydata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { - if (ydata_section == 0) + if (ydata_section == 0) { ydata_section = subseg_new (".ydata", 0); bfd_set_section_flags (stdoutput, ydata_section, @@ -3398,14 +3532,14 @@ ppc_ydata(ignore) */ static void ppc_reldata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (reldata_section == 0) { reldata_section = subseg_new (".reldata", 0); bfd_set_section_flags (stdoutput, reldata_section, - ( SEC_ALLOC | SEC_LOAD | SEC_RELOC + ( SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA )); bfd_set_section_alignment (stdoutput, reldata_section, 2); @@ -3429,7 +3563,7 @@ ppc_reldata(ignore) */ static void ppc_rdata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (rdata_section == 0) { @@ -3448,7 +3582,7 @@ ppc_rdata(ignore) } /* pseudo-op: .ualong - behaviour: much like .int, with the exception that no alignment is + behaviour: much like .int, with the exception that no alignment is performed. FIXME: test the alignment statement errors: None @@ -3456,7 +3590,7 @@ ppc_rdata(ignore) */ static void ppc_ualong(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* try for long */ cons ( 4 ); @@ -3471,7 +3605,7 @@ ppc_ualong(ignore) */ static void ppc_znop(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { unsigned long insn; const struct powerpc_opcode *opcode; @@ -3519,10 +3653,10 @@ ppc_znop(ignore) } -/* pseudo-op: - behaviour: - errors: - warnings: +/* pseudo-op: + behaviour: + errors: + warnings: */ static void ppc_pe_comm(lcomm) @@ -3622,7 +3756,7 @@ ppc_pe_comm(lcomm) * additions/changes for the moto-pas assembler support. There are three * categories: * - * FIXME: I just noticed this. This doesn't work at all really. It it + * FIXME: I just noticed this. This doesn't work at all really. It it * setting bits that bfd probably neither understands or uses. The * correct approach (?) will have to incorporate extra fields attached * to the section to hold the system specific stuff. (krk) @@ -3655,7 +3789,7 @@ ppc_pe_comm(lcomm) void ppc_pe_section (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* Strip out the section name */ char *section_name; @@ -3721,7 +3855,7 @@ ppc_pe_section (ignore) as_bad (_("Unsupported section attribute -- 'a'")); break; case 'c': /* code section */ - flags |= SEC_CODE; + flags |= SEC_CODE; break; case 'd': /* section has initialized data */ flags |= SEC_DATA; @@ -3737,7 +3871,7 @@ ppc_pe_section (ignore) flags |= SEC_HAS_CONTENTS; break; case 'n': /* section can be discarded */ - flags &=~ SEC_LOAD; + flags &=~ SEC_LOAD; break; case 'R': /* Remove section at link time */ flags |= SEC_NEVER_LOAD; @@ -3817,7 +3951,7 @@ ppc_pe_section (ignore) static void ppc_pe_function (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -3840,7 +3974,7 @@ ppc_pe_function (ignore) static void ppc_pe_tocd (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (tocdata_section == 0) { @@ -4245,7 +4379,7 @@ ppc_frob_symbol (sym) } a->x_csect.x_smtyp = XTY_LD; } - + a->x_csect.x_parmhash = 0; a->x_csect.x_snhash = 0; if (symbol_get_tc (sym)->class == -1) @@ -4354,8 +4488,8 @@ ppc_frob_section (sec) #endif /* OBJ_XCOFF */ /* Turn a string in input_line_pointer into a floating point constant - of type type, and store the appropriate bytes in *litp. The number - of LITTLENUMS emitted is stored in *sizep . An error message is + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is returned, or NULL on OK. */ char * @@ -4406,7 +4540,7 @@ md_atof (type, litp, sizep) litp += 2; } } - + return NULL; } @@ -4461,7 +4595,6 @@ md_convert_frag (abfd, sec, fragp) /* We have no need to default values of symbols. */ -/*ARGSUSED*/ symbolS * md_undefined_symbol (name) char *name ATTRIBUTE_UNUSED; @@ -4802,7 +4935,6 @@ md_apply_fix3 (fixp, valuep, seg) else if ((operand->flags & PPC_OPERAND_PARENS) != 0 && operand->bits == 16 && operand->shift == 0 - && operand->insert == NULL && fixp->fx_addsy != NULL && ppc_is_toc_sym (fixp->fx_addsy)) { @@ -4849,6 +4981,14 @@ md_apply_fix3 (fixp, valuep, seg) value, 4); break; + case BFD_RELOC_64: + if (fixp->fx_pcrel) + fixp->fx_r_type = BFD_RELOC_64_PCREL; + /* fall through */ + case BFD_RELOC_64_PCREL: + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value, 8); + break; case BFD_RELOC_LO16: case BFD_RELOC_16: case BFD_RELOC_GPREL16: @@ -4934,7 +5074,7 @@ md_apply_fix3 (fixp, valuep, seg) { char *where; unsigned long insn; - + /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. */ where = fixp->fx_frag->fr_literal + fixp->fx_where; @@ -4971,7 +5111,7 @@ md_apply_fix3 (fixp, valuep, seg) break; default: - fprintf(stderr, + fprintf (stderr, _("Gas failure, reloc value %d\n"), fixp->fx_r_type); fflush(stderr); abort (); diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h index 783a215..f246cd7 100644 --- a/contrib/binutils/gas/config/tc-ppc.h +++ b/contrib/binutils/gas/config/tc-ppc.h @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #define TC_PPC @@ -47,31 +47,16 @@ struct fix; /* The target BFD architecture. */ #define TARGET_ARCH (ppc_arch ()) +#define TARGET_MACH (ppc_mach ()) extern enum bfd_architecture ppc_arch PARAMS ((void)); +extern unsigned long ppc_mach PARAMS ((void)); /* Whether or not the target is big endian */ extern int target_big_endian; /* The target BFD format. */ -#ifdef OBJ_COFF -#ifdef TE_PE -#define TARGET_FORMAT (target_big_endian ? "pe-powerpc" : "pe-powerpcle") -#else -#define TARGET_FORMAT "aixcoff-rs6000" -#endif -#endif - -/* PowerMac has a BFD slightly different from AIX's. */ -#ifdef TE_POWERMAC -#ifdef TARGET_FORMAT -#undef TARGET_FORMAT -#endif -#define TARGET_FORMAT "xcoff-powermac" -#endif - -#ifdef OBJ_ELF -#define TARGET_FORMAT (target_big_endian ? "elf32-powerpc" : "elf32-powerpcle") -#endif +#define TARGET_FORMAT (ppc_target_format ()) +extern char* ppc_target_format (); /* Permit temporary numeric labels. */ #define LOCAL_LABELS_FB 1 @@ -186,7 +171,8 @@ extern int ppc_frob_symbol PARAMS ((symbolS *)); extern void ppc_adjust_symtab PARAMS ((void)); /* Niclas Andersson <nican@ida.liu.se> says this is needed. */ -#define SUB_SEGMENT_ALIGN(SEG) 2 +extern int ppc_subseg_align PARAMS ((void)); +#define SUB_SEGMENT_ALIGN(SEG) ppc_subseg_align() /* We also need to copy, in particular, the class of the symbol, over what obj-coff would otherwise have copied. */ @@ -200,7 +186,6 @@ do { \ symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \ } while (0) - #endif /* OBJ_XCOFF */ #ifdef OBJ_ELF @@ -246,7 +231,7 @@ extern int ppc_section_flags PARAMS ((int, int, int)); #define tc_comment_chars ppc_comment_chars extern const char *ppc_comment_chars; -/* Keep relocations relative to the GOT, or non-PC relative. */ +/* Keep relocations relative to the GOT, or non-PC relative. */ #define tc_fix_adjustable(FIX) \ ((FIX)->fx_r_type != BFD_RELOC_16_GOTOFF \ && (FIX)->fx_r_type != BFD_RELOC_LO16_GOTOFF \ @@ -273,6 +258,7 @@ extern const char *ppc_comment_chars; && S_IS_DEFINED ((FIX)->fx_addsy) \ && ! S_IS_COMMON ((FIX)->fx_addsy))) +#define DWARF2_LINE_MIN_INSN_LENGTH 4 #endif /* OBJ_ELF */ /* call md_apply_fix3 with segment instead of md_apply_fix */ @@ -286,4 +272,3 @@ extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); extern int ppc_parse_name PARAMS ((const char *, struct expressionS *)); #define md_operand(x) - diff --git a/contrib/binutils/gas/config/tc-sparc.c b/contrib/binutils/gas/config/tc-sparc.c index 149610e..6c9827c 100644 --- a/contrib/binutils/gas/config/tc-sparc.c +++ b/contrib/binutils/gas/config/tc-sparc.c @@ -1,5 +1,6 @@ /* tc-sparc.c -- Assemble for the SPARC - Copyright (C) 1989, 90-96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. GAS is free software; you can redistribute it and/or modify @@ -15,7 +16,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Boston, MA 02111-1307, USA. */ #include <stdio.h> #include <ctype.h> @@ -27,6 +28,7 @@ #ifdef OBJ_ELF #include "elf/sparc.h" +#include "dwarf2dbg.h" #endif static struct sparc_arch *lookup_arch PARAMS ((char *)); @@ -91,6 +93,9 @@ static enum sparc_opcode_arch_val warn_after_architecture; has been used in -64. */ static int no_undeclared_regs; +/* Non-zero if we should try to relax jumps and calls. */ +static int sparc_relax; + /* Non-zero if we are generating PIC code. */ int sparc_pic_code; @@ -114,7 +119,7 @@ static symbolS *globals[8]; || SPARC_OPCODE_ARCH_V9_P (max_architecture)) #endif -/* handle of the OPCODE hash table */ +/* Handle of the OPCODE hash table. */ static struct hash_control *op_hash; static int log2 PARAMS ((int)); @@ -130,7 +135,7 @@ static void s_register PARAMS ((int)); const pseudo_typeS md_pseudo_table[] = { - {"align", s_align_bytes, 0}, /* Defaulting is invalid (0) */ + {"align", s_align_bytes, 0}, /* Defaulting is invalid (0). */ {"common", s_common, 0}, {"empty", s_empty, 0}, {"global", s_globl, 0}, @@ -147,7 +152,9 @@ const pseudo_typeS md_pseudo_table[] = {"uaword", s_uacons, 4}, {"uaxword", s_uacons, 8}, #ifdef OBJ_ELF - /* these are specific to sparc/svr4 */ + {"file", dwarf2_directive_file, 0}, + {"loc", dwarf2_directive_loc, 0}, + /* These are specific to sparc/svr4. */ {"2byte", s_uacons, 2}, {"4byte", s_uacons, 4}, {"8byte", s_uacons, 8}, @@ -156,37 +163,40 @@ const pseudo_typeS md_pseudo_table[] = {NULL, 0, 0}, }; -const int md_reloc_size = 12; /* Size of relocation record */ +/* Size of relocation record. */ +const int md_reloc_size = 12; /* This array holds the chars that always start a comment. If the - pre-processor is disabled, these aren't very useful */ -const char comment_chars[] = "!"; /* JF removed '|' from comment_chars */ + pre-processor is disabled, these aren't very useful. */ +const char comment_chars[] = "!"; /* JF removed '|' from + comment_chars. */ /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' - .line and .file directives will appear in the pre-processed output */ + .line and .file directives will appear in the pre-processed output. */ /* Note that input_file.c hand checks for '#' at the beginning of the first line of the input file. This is because the compiler outputs - #NO_APP at the beginning of its output. */ + #NO_APP at the beginning of its output. */ /* Also note that comments started like this one will always - work if '/' isn't otherwise defined. */ + work if '/' isn't otherwise defined. */ const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; +const char line_separator_chars[] = ";"; -/* Chars that can be used to separate mant from exp in floating point nums */ +/* Chars that can be used to separate mant from exp in floating point + nums. */ const char EXP_CHARS[] = "eE"; -/* Chars that mean this number is a floating point constant */ -/* As in 0f12.456 */ -/* or 0d1.2345e12 */ +/* Chars that mean this number is a floating point constant. + As in 0f12.456 + or 0d1.2345e12 */ const char FLT_CHARS[] = "rRsSfFdDxXpP"; /* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be changed in read.c. Ideally it shouldn't have to know about it at all, but nothing is ideal around here. */ -#define isoctal(c) ((unsigned)((c) - '0') < '8') +#define isoctal(c) ((unsigned) ((c) - '0') < '8') struct sparc_it { @@ -210,7 +220,7 @@ static void output_insn and file formats. */ enum sparc_arch_types {v6, v7, v8, sparclet, sparclite, sparc86x, v8plus, - v8plusa, v9, v9a, v9_64}; + v8plusa, v9, v9a, v9b, v9_64}; static struct sparc_arch { char *name; @@ -230,8 +240,10 @@ static struct sparc_arch { { "sparc86x", "sparclite", sparc86x, 32, 1 }, { "v8plus", "v9", v9, 0, 1 }, { "v8plusa", "v9a", v9, 0, 1 }, + { "v8plusb", "v9b", v9, 0, 1 }, { "v9", "v9", v9, 0, 1 }, { "v9a", "v9a", v9, 0, 1 }, + { "v9b", "v9b", v9, 0, 1 }, /* This exists to allow configure.in/Makefile.in to pass one value to specify both the default machine and default word size. */ { "v9-64", "v9", v9, 64, 0 }, @@ -294,7 +306,8 @@ sparc_target_format () return "a.out-sunos-big"; else if (default_arch_type == sparc86x && target_little_endian_data) return "a.out-sunos-big"; - else return "a.out-sparc-little"; + else + return "a.out-sparc-little"; #else return "a.out-sunos-big"; #endif @@ -320,8 +333,7 @@ sparc_target_format () abort (); } -/* - * md_parse_option +/* md_parse_option * Invocation line includes a switch not recognized by the base assembler. * See if it's a processor-specific option. These are: * @@ -330,16 +342,20 @@ sparc_target_format () * * -Av6, -Av7, -Av8, -Asparclite, -Asparclet * Standard 32 bit architectures. - * -Av8plus, -Av8plusa - * Sparc64 in a 32 bit world. - * -Av9, -Av9a + * -Av9, -Av9a, -Av9b * Sparc64 in either a 32 or 64 bit world (-32/-64 says which). * This used to only mean 64 bits, but properly specifying it * complicated gcc's ASM_SPECs, so now opcode selection is * specified orthogonally to word size (except when specifying * the default, but that is an internal implementation detail). - * -xarch=v8plus, -xarch=v8plusa - * Same as -Av8plus{,a}, for compatibility with Sun's assembler. + * -Av8plus, -Av8plusa, -Av8plusb + * Same as -Av9{,a,b}. + * -xarch=v8plus, -xarch=v8plusa, -xarch=v8plusb + * Same as -Av8plus{,a,b} -32, for compatibility with Sun's + * assembler. + * -xarch=v9, -xarch=v9a, -xarch=v9b + * Same as -Av9{,a,b} -64, for compatibility with Sun's + * assembler. * * Select the architecture and possibly the file format. * Instructions or features not supported by the selected @@ -348,7 +364,7 @@ sparc_target_format () * The default is to start at v6, and bump the architecture up * whenever an instruction is seen at a higher level. In 32 bit * environments, v9 is not bumped up to, the user must pass - * -Av8plus{,a}. + * -Av8plus{,a,b}. * * If -bump is specified, a warning is printing when bumping to * higher levels. @@ -415,9 +431,14 @@ struct option md_longopts[] = { #define OPTION_UNDECLARED_REGS (OPTION_MD_BASE + 13) {"undeclared-regs", no_argument, NULL, OPTION_UNDECLARED_REGS}, #endif +#define OPTION_RELAX (OPTION_MD_BASE + 14) + {"relax", no_argument, NULL, OPTION_RELAX}, +#define OPTION_NO_RELAX (OPTION_MD_BASE + 15) + {"no-relax", no_argument, NULL, OPTION_NO_RELAX}, {NULL, no_argument, NULL, 0} }; -size_t md_longopts_size = sizeof(md_longopts); + +size_t md_longopts_size = sizeof (md_longopts); int md_parse_option (c, arg) @@ -437,15 +458,13 @@ md_parse_option (c, arg) break; case OPTION_XARCH: - /* This is for compatibility with Sun's assembler. */ - if (strcmp (arg, "v8plus") != 0 - && strcmp (arg, "v8plusa") != 0) - { - as_bad (_("invalid architecture -xarch=%s"), arg); - return 0; - } - - /* fall through */ +#ifdef OBJ_ELF + if (strncmp (arg, "v9", 2) != 0) + md_parse_option (OPTION_32, NULL); + else + md_parse_option (OPTION_64, NULL); +#endif + /* Fall through. */ case 'A': { @@ -456,7 +475,10 @@ md_parse_option (c, arg) if (sa == NULL || ! sa->user_option_p) { - as_bad (_("invalid architecture -A%s"), arg); + if (c == OPTION_XARCH) + as_bad (_("invalid architecture -xarch=%s"), arg); + else + as_bad (_("invalid architecture -A%s"), arg); return 0; } @@ -547,15 +569,15 @@ md_parse_option (c, arg) case 'Q': /* Qy - do emit .comment - Qn - do not emit .comment */ + Qn - do not emit .comment. */ break; case 's': - /* use .stab instead of .stab.excl */ + /* Use .stab instead of .stab.excl. */ break; case 'q': - /* quick -- native assembler does fewer checks */ + /* quick -- Native assembler does fewer checks. */ break; case 'K': @@ -574,6 +596,14 @@ md_parse_option (c, arg) break; #endif + case OPTION_RELAX: + sparc_relax = 1; + break; + + case OPTION_NO_RELAX: + sparc_relax = 0; + break; + default: return 0; } @@ -586,26 +616,49 @@ md_show_usage (stream) FILE *stream; { const struct sparc_arch *arch; + int column; /* We don't get a chance to initialize anything before we're called, so handle that now. */ if (! default_init_p) init_default_arch (); - fprintf(stream, _("SPARC options:\n")); + fprintf (stream, _("SPARC options:\n")); + column = 0; for (arch = &sparc_arch_table[0]; arch->name; arch++) { + if (!arch->user_option_p) + continue; if (arch != &sparc_arch_table[0]) fprintf (stream, " | "); - if (arch->user_option_p) - fprintf (stream, "-A%s", arch->name); + if (column + strlen(arch->name) > 70) + { + column = 0; + fputc ('\n', stream); + } + column += 5 + 2 + strlen(arch->name); + fprintf (stream, "-A%s", arch->name); } - fprintf (stream, _("\n-xarch=v8plus | -xarch=v8plusa\n")); - fprintf (stream, _("\ + for (arch = &sparc_arch_table[0]; arch->name; arch++) + { + if (!arch->user_option_p) + continue; + fprintf (stream, " | "); + if (column + strlen(arch->name) > 65) + { + column = 0; + fputc ('\n', stream); + } + column += 5 + 7 + strlen(arch->name); + fprintf (stream, "-xarch=%s", arch->name); + } + fprintf (stream, _("\n\ specify variant of SPARC architecture\n\ -bump warn when assembler switches architectures\n\ -sparc ignored\n\ ---enforce-aligned-data force .long, etc., to be aligned correctly\n")); +--enforce-aligned-data force .long, etc., to be aligned correctly\n\ +-relax relax jumps and branches (default)\n\ +-no-relax avoid changing any jumps and branches\n")); #ifdef OBJ_AOUT fprintf (stream, _("\ -k generate PIC\n")); @@ -642,7 +695,7 @@ md_show_usage (stream) #endif } -/* native operand size opcode translation */ +/* Native operand size opcode translation. */ struct { char *name; @@ -663,13 +716,13 @@ struct {NULL, NULL, NULL}, }; -/* sparc64 priviledged registers */ +/* sparc64 priviledged registers. */ struct priv_reg_entry - { - char *name; - int regnum; - }; +{ + char *name; + int regnum; +}; struct priv_reg_entry priv_reg_table[] = { @@ -690,14 +743,16 @@ struct priv_reg_entry priv_reg_table[] = {"wstate", 14}, {"fq", 15}, {"ver", 31}, - {"", -1}, /* end marker */ + {"", -1}, /* End marker. */ }; -/* v9a specific asrs */ +/* v9a specific asrs. */ struct priv_reg_entry v9a_asr_table[] = { {"tick_cmpr", 23}, + {"sys_tick_cmpr", 25}, + {"sys_tick", 24}, {"softint", 22}, {"set_softint", 20}, {"pic", 17}, @@ -705,7 +760,7 @@ struct priv_reg_entry v9a_asr_table[] = {"gsr", 19}, {"dcr", 18}, {"clear_softint", 21}, - {"", -1}, /* end marker */ + {"", -1}, /* End marker. */ }; static int @@ -720,7 +775,8 @@ cmp_reg_entry (parg, qarg) } /* This function is called once, at assembler startup time. It should - set up all the tables, etc. that the MD part of the assembler will need. */ + set up all the tables, etc. that the MD part of the assembler will + need. */ void md_begin () @@ -764,15 +820,16 @@ md_begin () for (i = 0; native_op_table[i].name; i++) { const struct sparc_opcode *insn; - char *name = sparc_arch_size == 32 ? native_op_table[i].name32 : - native_op_table[i].name64; - insn = (struct sparc_opcode *)hash_find (op_hash, name); + char *name = ((sparc_arch_size == 32) + ? native_op_table[i].name32 + : native_op_table[i].name64); + insn = (struct sparc_opcode *) hash_find (op_hash, name); if (insn == NULL) - { - as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"), - name, native_op_table[i].name); - lose = 1; - } + { + as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"), + name, native_op_table[i].name); + lose = 1; + } else { retval = hash_insert (op_hash, native_op_table[i].name, (PTR) insn); @@ -821,31 +878,28 @@ md_begin () void sparc_md_end () { + unsigned long mach = bfd_mach_sparc; + if (sparc_arch_size == 64) - { - if (current_architecture == SPARC_OPCODE_ARCH_V9A) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v9a); - else - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v9); - } + switch (current_architecture) + { + case SPARC_OPCODE_ARCH_V9A: mach = bfd_mach_sparc_v9a; break; + case SPARC_OPCODE_ARCH_V9B: mach = bfd_mach_sparc_v9b; break; + default: mach = bfd_mach_sparc_v9; break; + } else - { - if (current_architecture == SPARC_OPCODE_ARCH_V9) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v8plus); - else if (current_architecture == SPARC_OPCODE_ARCH_V9A) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v8plusa); - else if (current_architecture == SPARC_OPCODE_ARCH_SPARCLET) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_sparclet); - else if (default_arch_type == sparc86x && target_little_endian_data) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_sparclite_le); - else - { - /* The sparclite is treated like a normal sparc. Perhaps it shouldn't - be but for now it is (since that's the way it's always been - treated). */ - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc); - } - } + switch (current_architecture) + { + case SPARC_OPCODE_ARCH_SPARCLET: mach = bfd_mach_sparc_sparclet; break; + case SPARC_OPCODE_ARCH_V9: mach = bfd_mach_sparc_v8plus; break; + case SPARC_OPCODE_ARCH_V9A: mach = bfd_mach_sparc_v8plusa; break; + case SPARC_OPCODE_ARCH_V9B: mach = bfd_mach_sparc_v8plusb; break; + /* The sparclite is treated like a normal sparc. Perhaps it shouldn't + be but for now it is (since that's the way it's always been + treated). */ + default: break; + } + bfd_set_arch_mach (stdoutput, bfd_arch_sparc, mach); } /* Return non-zero if VAL is in the range -(MAX+1) to MAX. */ @@ -860,7 +914,7 @@ in_signed_range (val, max) 0xffffffff is always considered -1 on sparc32. */ if (sparc_arch_size == 32) { - bfd_signed_vma sign = (bfd_signed_vma)1 << 31; + bfd_signed_vma sign = (bfd_signed_vma) 1 << 31; val = ((val & 0xffffffff) ^ sign) - sign; } if (val > max) @@ -950,6 +1004,7 @@ static const struct sparc_opcode *last_insn; static unsigned long last_opcode; /* Handle the set and setuw synthetic instructions. */ + static void synthetize_setuw (insn) const struct sparc_opcode *insn; @@ -961,18 +1016,18 @@ synthetize_setuw (insn) { if (SPARC_OPCODE_ARCH_V9_P (max_architecture)) { - if (sizeof(offsetT) > 4 + if (sizeof (offsetT) > 4 && (the_insn.exp.X_add_number < 0 || the_insn.exp.X_add_number > (offsetT) 0xffffffff)) as_warn (_("set: number not in 0..4294967295 range")); } else { - if (sizeof(offsetT) > 4 + if (sizeof (offsetT) > 4 && (the_insn.exp.X_add_number < -(offsetT) 0x80000000 || the_insn.exp.X_add_number > (offsetT) 0xffffffff)) as_warn (_("set: number not in -2147483648..4294967295 range")); - the_insn.exp.X_add_number = (int)the_insn.exp.X_add_number; + the_insn.exp.X_add_number = (int) the_insn.exp.X_add_number; } } @@ -983,10 +1038,10 @@ synthetize_setuw (insn) { the_insn.opcode = (SETHI_INSN | RD (rd) | ((the_insn.exp.X_add_number >> 10) - & (the_insn.exp.X_op == O_constant ? 0x3fffff : 0))); + & (the_insn.exp.X_op == O_constant + ? 0x3fffff : 0))); the_insn.reloc = (the_insn.exp.X_op != O_constant - ? BFD_RELOC_HI22 - : BFD_RELOC_NONE); + ? BFD_RELOC_HI22 : BFD_RELOC_NONE); output_insn (insn, &the_insn); need_hi22_p = 1; } @@ -999,16 +1054,16 @@ synthetize_setuw (insn) the_insn.opcode = (OR_INSN | (need_hi22_p ? RS1 (rd) : 0) | RD (rd) | IMMED | (the_insn.exp.X_add_number - & (the_insn.exp.X_op != O_constant ? 0 : - need_hi22_p ? 0x3ff : 0x1fff))); + & (the_insn.exp.X_op != O_constant + ? 0 : need_hi22_p ? 0x3ff : 0x1fff))); the_insn.reloc = (the_insn.exp.X_op != O_constant - ? BFD_RELOC_LO10 - : BFD_RELOC_NONE); + ? BFD_RELOC_LO10 : BFD_RELOC_NONE); output_insn (insn, &the_insn); } } - + /* Handle the setsw synthetic instruction. */ + static void synthetize_setsw (insn) const struct sparc_opcode *insn; @@ -1028,13 +1083,13 @@ synthetize_setsw (insn) return; } - if (sizeof(offsetT) > 4 + if (sizeof (offsetT) > 4 && (the_insn.exp.X_add_number < -(offsetT) 0x80000000 || the_insn.exp.X_add_number > (offsetT) 0xffffffff)) as_warn (_("setsw: number not in -2147483648..4294967295 range")); - low32 = the_insn.exp.X_add_number; - + low32 = the_insn.exp.X_add_number; + if (low32 >= 0) { synthetize_setuw (insn); @@ -1042,7 +1097,7 @@ synthetize_setsw (insn) } opc = OR_INSN; - + the_insn.reloc = BFD_RELOC_NONE; /* See if operand is absolute and small; skip sethi if so. */ if (low32 < -(1 << 12)) @@ -1060,6 +1115,7 @@ synthetize_setsw (insn) } /* Handle the setsw synthetic instruction. */ + static void synthetize_setx (insn) const struct sparc_opcode *insn; @@ -1070,7 +1126,7 @@ synthetize_setx (insn) int upper_dstreg; int need_hh22_p = 0, need_hm10_p = 0, need_hi22_p = 0, need_lo10_p = 0; int need_xor10_p = 0; - + #define SIGNEXT32(x) ((((x) & 0xffffffff) ^ 0x80000000) - 0x80000000) lower32 = SIGNEXT32 (the_insn.exp.X_add_number); upper32 = SIGNEXT32 (BSR (the_insn.exp.X_add_number, 32)); @@ -1098,7 +1154,8 @@ synthetize_setx (insn) return; } need_hh22_p = need_hm10_p = need_hi22_p = need_lo10_p = 1; - lower32 = 0; upper32 = 0; + lower32 = 0; + upper32 = 0; } else { @@ -1106,18 +1163,18 @@ synthetize_setx (insn) Otherwise fixup_segment will complain about not being able to write an 8 byte number in a 4 byte field. */ the_insn.exp.X_add_number = 0; - + /* Only need hh22 if `or' insn can't handle constant. */ if (upper32 < -(1 << 12) || upper32 >= (1 << 12)) need_hh22_p = 1; - + /* Does bottom part (after sethi) have bits? */ if ((need_hh22_p && (upper32 & 0x3ff) != 0) /* No hh22, but does upper32 still have bits we can't set from lower32? */ || (! need_hh22_p && upper32 != 0 && upper32 != -1)) need_hm10_p = 1; - + /* If the lower half is all zero, we build the upper half directly into the dst reg. */ if (lower32 != 0 @@ -1131,7 +1188,7 @@ synthetize_setx (insn) || (lower32 < 0 && upper32 != -1) || (lower32 >= 0 && upper32 == -1)) need_hi22_p = 1; - + if (need_hi22_p && upper32 == -1) need_xor10_p = 1; @@ -1147,7 +1204,7 @@ synthetize_setx (insn) /* Output directly to dst reg if lower 32 bits are all zero. */ upper_dstreg = dstreg; } - + if (!upper_dstreg && dstreg) as_warn (_("setx: illegal temporary register g0")); @@ -1159,12 +1216,12 @@ synthetize_setx (insn) ? BFD_RELOC_SPARC_HH22 : BFD_RELOC_NONE); output_insn (insn, &the_insn); } - + if (need_hi22_p) { the_insn.opcode = (SETHI_INSN | RD (dstreg) | (((need_xor10_p ? ~lower32 : lower32) - >> 10) & 0x3fffff)); + >> 10) & 0x3fffff)); the_insn.reloc = (the_insn.exp.X_op != O_constant ? BFD_RELOC_SPARC_LM22 : BFD_RELOC_NONE); output_insn (insn, &the_insn); @@ -1181,7 +1238,7 @@ synthetize_setx (insn) ? BFD_RELOC_SPARC_HM10 : BFD_RELOC_NONE); output_insn (insn, &the_insn); } - + if (need_lo10_p) { /* FIXME: One nice optimization to do here is to OR the low part @@ -1195,7 +1252,7 @@ synthetize_setx (insn) ? BFD_RELOC_LO10 : BFD_RELOC_NONE); output_insn (insn, &the_insn); } - + /* If we needed to build the upper part, shift it into place. */ if (need_hh22_p || need_hm10_p) { @@ -1204,7 +1261,7 @@ synthetize_setx (insn) the_insn.reloc = BFD_RELOC_NONE; output_insn (insn, &the_insn); } - + /* To get -1 in upper32, we do sethi %hi(~x), r; xor r, -0x400 | x, r. */ if (need_xor10_p) { @@ -1268,14 +1325,14 @@ md_assemble (str) switch (special_case) { case SPECIAL_CASE_NONE: - /* normal insn */ + /* Normal insn. */ output_insn (insn, &the_insn); break; case SPECIAL_CASE_SETSW: synthetize_setsw (insn); break; - + case SPECIAL_CASE_SET: synthetize_setuw (insn); break; @@ -1283,24 +1340,24 @@ md_assemble (str) case SPECIAL_CASE_SETX: synthetize_setx (insn); break; - + case SPECIAL_CASE_FDIV: { int rd = (the_insn.opcode >> 25) & 0x1f; - + output_insn (insn, &the_insn); - + /* According to information leaked from Sun, the "fdiv" instructions on early SPARC machines would produce incorrect results sometimes. The workaround is to add an fmovs of the destination register to itself just after the instruction. This was true on machines - with Weitek 1165 float chips, such as the Sun-4/260 and /280. */ + with Weitek 1165 float chips, such as the Sun-4/260 and /280. */ assert (the_insn.reloc == BFD_RELOC_NONE); the_insn.opcode = FMOVS_INSN | rd | RD (rd); output_insn (insn, &the_insn); return; } - + default: as_fatal (_("failed special case insn sanity check")); } @@ -1341,8 +1398,7 @@ sparc_ip (str, pinsn) case ',': comma = 1; - - /*FALLTHROUGH */ + /* Fall through. */ case ' ': *s++ = '\0'; @@ -1371,10 +1427,8 @@ sparc_ip (str, pinsn) the_insn.reloc = BFD_RELOC_NONE; v9_arg_p = 0; - /* - * Build the opcode, checking as we go to make - * sure that the operands match - */ + /* Build the opcode, checking as we go to make sure that the + operands match. */ for (args = insn->args;; ++args) { switch (*args) @@ -1397,10 +1451,12 @@ sparc_ip (str, pinsn) goto error; } kmask |= mask; - while (*s == ' ') { ++s; continue; } + while (*s == ' ') + ++s; if (*s == '|' || *s == '+') ++s; - while (*s == ' ') { ++s; continue; } + while (*s == ' ') + ++s; } } else @@ -1421,6 +1477,24 @@ sparc_ip (str, pinsn) continue; } + case '3': + { + int smask = 0; + + if (! parse_const_expr_arg (&s, &smask)) + { + error_message = _(": invalid siam mode expression"); + goto error; + } + if (smask < 0 || smask > 7) + { + error_message = _(": invalid siam mode number"); + goto error; + } + opcode |= smask; + continue; + } + case '*': { int fcn = 0; @@ -1457,7 +1531,7 @@ sparc_ip (str, pinsn) if (*s == '%') { struct priv_reg_entry *p = priv_reg_table; - unsigned int len = 9999999; /* init to make gcc happy */ + unsigned int len = 9999999; /* Init to make gcc happy. */ s += 1; while (p->name[0] > s[0]) @@ -1489,11 +1563,11 @@ sparc_ip (str, pinsn) case '_': case '/': - /* Parse a v9a ancillary state register. */ + /* Parse a v9a/v9b ancillary state register. */ if (*s == '%') { struct priv_reg_entry *p = v9a_asr_table; - unsigned int len = 9999999; /* init to make gcc happy */ + unsigned int len = 9999999; /* Init to make gcc happy. */ s += 1; while (p->name[0] > s[0]) @@ -1507,14 +1581,22 @@ sparc_ip (str, pinsn) } if (p->name[0] != s[0]) { - error_message = _(": unrecognizable v9a ancillary state register"); + error_message = _(": unrecognizable v9a or v9b ancillary state register"); goto error; } if (*args == '/' && (p->regnum == 20 || p->regnum == 21)) { error_message = _(": rd on write only ancillary state register"); goto error; - } + } + if (p->regnum >= 24 + && (insn->architecture + & SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A))) + { + /* %sys_tick and %sys_tick_cmpr are v9bnotv9a */ + error_message = _(": unrecognizable v9a ancillary state register"); + goto error; + } if (*args == '/') opcode |= (p->regnum << 14); else @@ -1524,7 +1606,7 @@ sparc_ip (str, pinsn) } else { - error_message = _(": unrecognizable v9a ancillary state register"); + error_message = _(": unrecognizable v9a or v9b ancillary state register"); goto error; } @@ -1569,7 +1651,7 @@ sparc_ip (str, pinsn) error_message = _(": expecting %asrN"); goto error; } - } /* if %asr */ + } /* if %asr */ break; case 'I': @@ -1714,7 +1796,7 @@ sparc_ip (str, pinsn) } break; - case '\0': /* end of args */ + case '\0': /* End of args. */ if (*s == '\0') { match = 1; @@ -1733,7 +1815,7 @@ sparc_ip (str, pinsn) } break; - case '[': /* these must match exactly */ + case '[': /* These must match exactly. */ case ']': case ',': case ' ': @@ -1741,7 +1823,7 @@ sparc_ip (str, pinsn) continue; break; - case '#': /* must be at least one digit */ + case '#': /* Must be at least one digit. */ if (isdigit ((unsigned char) *s++)) { while (isdigit ((unsigned char) *s)) @@ -1752,7 +1834,7 @@ sparc_ip (str, pinsn) } break; - case 'C': /* coprocessor state register */ + case 'C': /* Coprocessor state register. */ if (strncmp (s, "%csr", 4) == 0) { s += 4; @@ -1760,7 +1842,7 @@ sparc_ip (str, pinsn) } break; - case 'b': /* next operand is a coprocessor register */ + case 'b': /* Next operand is a coprocessor register. */ case 'c': case 'D': if (*s++ == '%' && *s++ == 'c' && isdigit ((unsigned char) *s)) @@ -1893,7 +1975,7 @@ sparc_ip (str, pinsn) } if ((mask & ~1) == 2 && sparc_arch_size == 64 - && no_undeclared_regs && ! globals [mask]) + && no_undeclared_regs && ! globals[mask]) as_bad (_("detected global register use not covered by .register pseudo-op")); /* Got the register, now figure out where @@ -1987,7 +2069,7 @@ sparc_ip (str, pinsn) else { break; - } /* if not an 'f' register. */ + } /* if not an 'f' register. */ switch (*args) { @@ -1997,7 +2079,6 @@ sparc_ip (str, pinsn) opcode |= RS1 (mask); continue; - case 'f': case 'B': case 'R': @@ -2009,11 +2090,11 @@ sparc_ip (str, pinsn) case 'J': opcode |= RD (mask); continue; - } /* pack it in. */ + } /* Pack it in. */ know (0); break; - } /* float arg */ + } /* float arg */ case 'F': if (strncmp (s, "%fsr", 4) == 0) @@ -2023,26 +2104,26 @@ sparc_ip (str, pinsn) } break; - case '0': /* 64 bit immediate (set, setsw, setx insn) */ - the_insn.reloc = BFD_RELOC_NONE; /* reloc handled elsewhere */ + case '0': /* 64 bit immediate (set, setsw, setx insn) */ + the_insn.reloc = BFD_RELOC_NONE; /* reloc handled elsewhere */ goto immediate; - case 'l': /* 22 bit PC relative immediate */ + case 'l': /* 22 bit PC relative immediate */ the_insn.reloc = BFD_RELOC_SPARC_WDISP22; the_insn.pcrel = 1; goto immediate; - case 'L': /* 30 bit immediate */ + case 'L': /* 30 bit immediate */ the_insn.reloc = BFD_RELOC_32_PCREL_S2; the_insn.pcrel = 1; goto immediate; case 'h': - case 'n': /* 22 bit immediate */ + case 'n': /* 22 bit immediate */ the_insn.reloc = BFD_RELOC_SPARC22; goto immediate; - case 'i': /* 13 bit immediate */ + case 'i': /* 13 bit immediate */ the_insn.reloc = BFD_RELOC_SPARC13; /* fallthrough */ @@ -2086,16 +2167,16 @@ sparc_ip (str, pinsn) { "l44", 3, BFD_RELOC_SPARC_L44, 1, 0 }, { "uhi", 3, BFD_RELOC_SPARC_HH22, 1, 0 }, { "ulo", 3, BFD_RELOC_SPARC_HM10, 1, 0 }, - { NULL } + { NULL, 0, 0, 0, 0 } }; const struct ops *o; - + for (o = ops; o->name; o++) if (strncmp (s + 1, o->name, o->len) == 0) break; if (o->name == NULL) break; - + if (s[o->len + 1] != '(') { as_bad (_("Illegal operands: %%%s requires arguments in ()"), o->name); @@ -2137,7 +2218,7 @@ sparc_ip (str, pinsn) as_bad (_("Illegal operands: %%%s requires arguments in ()"), op_arg); return special_case; } - + *s1 = '\0'; (void) get_expression (s); *s1 = ')'; @@ -2152,10 +2233,11 @@ sparc_ip (str, pinsn) *s1 = '0'; s = s1; op_exp = the_insn.exp; - memset (&the_insn.exp, 0, sizeof(the_insn.exp)); + memset (&the_insn.exp, 0, sizeof (the_insn.exp)); } - for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++) ; + for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++) + ; if (s1 != s && isdigit ((unsigned char) s1[-1])) { @@ -2210,7 +2292,7 @@ sparc_ip (str, pinsn) case BFD_RELOC_SPARC_HH22: val = BSR (val, 32); - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_SPARC_LM22: case BFD_RELOC_HI22: @@ -2219,7 +2301,7 @@ sparc_ip (str, pinsn) case BFD_RELOC_SPARC_HM10: val = BSR (val, 32); - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_LO10: val &= 0x3ff; @@ -2240,7 +2322,7 @@ sparc_ip (str, pinsn) break; case BFD_RELOC_SPARC_HIX22: - val = ~ val; + val = ~val; val = (val >> 10) & 0x3fffff; break; @@ -2335,7 +2417,7 @@ sparc_ip (str, pinsn) } opcode |= ASI (asi); continue; - } /* alternate space */ + } /* Alternate space. */ case 'p': if (strncmp (s, "%psr", 4) == 0) @@ -2345,7 +2427,7 @@ sparc_ip (str, pinsn) } break; - case 'q': /* floating point queue */ + case 'q': /* Floating point queue. */ if (strncmp (s, "%fq", 3) == 0) { s += 3; @@ -2353,7 +2435,7 @@ sparc_ip (str, pinsn) } break; - case 'Q': /* coprocessor queue */ + case 'Q': /* Coprocessor queue. */ if (strncmp (s, "%cq", 3) == 0) { s += 3; @@ -2459,16 +2541,16 @@ sparc_ip (str, pinsn) default: as_fatal (_("failed sanity check.")); - } /* switch on arg code */ + } /* switch on arg code. */ /* Break out of for() loop. */ break; - } /* for each arg that we expect */ + } /* For each arg that we expect. */ error: if (match == 0) { - /* Args don't match. */ + /* Args don't match. */ if (&insn[1] - sparc_opcodes < sparc_num_opcodes && (insn->name == insn[1].name || !strcmp (insn->name, insn[1].name))) @@ -2485,20 +2567,25 @@ sparc_ip (str, pinsn) } else { - /* We have a match. Now see if the architecture is ok. */ + /* We have a match. Now see if the architecture is OK. */ int needed_arch_mask = insn->architecture; if (v9_arg_p) { - needed_arch_mask &= ~ ((1 << SPARC_OPCODE_ARCH_V9) - | (1 << SPARC_OPCODE_ARCH_V9A)); - needed_arch_mask |= (1 << SPARC_OPCODE_ARCH_V9); + needed_arch_mask &= + ~(SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9) - 1); + if (! needed_arch_mask) + needed_arch_mask = + SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9); } - if (needed_arch_mask & SPARC_OPCODE_SUPPORTED (current_architecture)) - ; /* ok */ + if (needed_arch_mask + & SPARC_OPCODE_SUPPORTED (current_architecture)) + /* OK. */ + ; /* Can we bump up the architecture? */ - else if (needed_arch_mask & SPARC_OPCODE_SUPPORTED (max_architecture)) + else if (needed_arch_mask + & SPARC_OPCODE_SUPPORTED (max_architecture)) { enum sparc_opcode_arch_val needed_architecture = sparc_ffs (SPARC_OPCODE_SUPPORTED (max_architecture) @@ -2523,12 +2610,12 @@ sparc_ip (str, pinsn) happen but what about tomorrow? */ else { - int arch,printed_one_p = 0; + int arch, printed_one_p = 0; char *p; char required_archs[SPARC_OPCODE_ARCH_MAX * 16]; /* Create a list of the architectures that support the insn. */ - needed_arch_mask &= ~ SPARC_OPCODE_SUPPORTED (max_architecture); + needed_arch_mask &= ~SPARC_OPCODE_SUPPORTED (max_architecture); p = required_archs; arch = sparc_ffs (needed_arch_mask); while ((1 << arch) <= needed_arch_mask) @@ -2550,10 +2637,10 @@ sparc_ip (str, pinsn) sparc_opcode_archs[max_architecture].name); return special_case; } - } /* if no match */ + } /* If no match. */ break; - } /* forever looking for a match */ + } /* Forever looking for a match. */ the_insn.opcode = opcode; return special_case; @@ -2659,18 +2746,18 @@ output_insn (insn, the_insn) { char *toP = frag_more (4); - /* put out the opcode */ + /* Put out the opcode. */ if (INSN_BIG_ENDIAN) number_to_chars_bigendian (toP, (valueT) the_insn->opcode, 4); else number_to_chars_littleendian (toP, (valueT) the_insn->opcode, 4); - /* put out the symbol-dependent stuff */ + /* Put out the symbol-dependent stuff. */ if (the_insn->reloc != BFD_RELOC_NONE) { - fixS *fixP = fix_new_exp (frag_now, /* which frag */ - (toP - frag_now->fr_literal), /* where */ - 4, /* size */ + fixS *fixP = fix_new_exp (frag_now, /* Which frag. */ + (toP - frag_now->fr_literal), /* Where. */ + 4, /* Size. */ &the_insn->exp, the_insn->pcrel, the_insn->reloc); @@ -2685,18 +2772,21 @@ output_insn (insn, the_insn) last_insn = insn; last_opcode = the_insn->opcode; + +#ifdef OBJ_ELF + dwarf2_emit_insn (4); +#endif } -/* - This is identical to the md_atof in m68k.c. I think this is right, - but I'm not sure. +/* This is identical to the md_atof in m68k.c. I think this is right, + but I'm not sure. - Turn a string in input_line_pointer into a floating point constant of type - type, and store the appropriate bytes in *litP. The number of LITTLENUMS - emitted is stored in *sizeP . An error message is returned, or NULL on OK. - */ + Turn a string in input_line_pointer into a floating point constant + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is + returned, or NULL on OK. */ -/* Equal to MAX_PRECISION in atof-ieee.c */ +/* Equal to MAX_PRECISION in atof-ieee.c. */ #define MAX_LITTLENUMS 6 char * @@ -2705,7 +2795,7 @@ md_atof (type, litP, sizeP) char *litP; int *sizeP; { - int i,prec; + int i, prec; LITTLENUM_TYPE words[MAX_LITTLENUMS]; char *t; @@ -2749,7 +2839,8 @@ md_atof (type, litP, sizeP) { for (i = 0; i < prec; i++) { - md_number_to_chars (litP, (valueT) words[i], sizeof (LITTLENUM_TYPE)); + md_number_to_chars (litP, (valueT) words[i], + sizeof (LITTLENUM_TYPE)); litP += sizeof (LITTLENUM_TYPE); } } @@ -2757,11 +2848,12 @@ md_atof (type, litP, sizeP) { for (i = prec - 1; i >= 0; i--) { - md_number_to_chars (litP, (valueT) words[i], sizeof (LITTLENUM_TYPE)); + md_number_to_chars (litP, (valueT) words[i], + sizeof (LITTLENUM_TYPE)); litP += sizeof (LITTLENUM_TYPE); } } - + return 0; } @@ -2778,14 +2870,15 @@ md_number_to_chars (buf, val, n) number_to_chars_bigendian (buf, val, n); else if (target_little_endian_data && ((n == 4 || n == 2) && ~now_seg->flags & SEC_ALLOC)) - /* Output debug words, which are not in allocated sections, as big endian */ + /* Output debug words, which are not in allocated sections, as big + endian. */ number_to_chars_bigendian (buf, val, n); else if (target_little_endian_data || ! target_big_endian) number_to_chars_littleendian (buf, val, n); } /* Apply a fixS to the frags, now that we know the value it ought to - hold. */ + hold. */ int md_apply_fix3 (fixP, value, segment) @@ -2801,7 +2894,7 @@ md_apply_fix3 (fixP, value, segment) assert (fixP->fx_r_type < BFD_RELOC_UNUSED); - fixP->fx_addnumber = val; /* Remember value for emit_reloc */ + fixP->fx_addnumber = val; /* Remember value for emit_reloc. */ #ifdef OBJ_ELF /* FIXME: SPARC ELF relocations don't use an addend in the data @@ -2890,7 +2983,7 @@ md_apply_fix3 (fixP, value, segment) { md_number_to_chars (buf, val, 8); } - else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) { fixP->fx_done = 0; @@ -2904,7 +2997,7 @@ md_apply_fix3 (fixP, value, segment) insn = bfd_getb32 ((unsigned char *) buf); else insn = bfd_getl32 ((unsigned char *) buf); - + switch (fixP->fx_r_type) { case BFD_RELOC_32_PCREL_S2: @@ -2915,7 +3008,91 @@ md_apply_fix3 (fixP, value, segment) || fixP->fx_addsy == NULL || symbol_section_p (fixP->fx_addsy)) ++val; + insn |= val & 0x3fffffff; + + /* See if we have a delay slot. */ + if (sparc_relax && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix) + { +#define G0 0 +#define O7 15 +#define XCC (2 << 20) +#define COND(x) (((x)&0xf)<<25) +#define CONDA COND(0x8) +#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC) +#define INSN_BA (F2(0,2) | CONDA) +#define INSN_OR F3(2, 0x2, 0) +#define INSN_NOP F2(0,4) + + long delay; + + /* If the instruction is a call with either: + restore + arithmetic instruction with rd == %o7 + where rs1 != %o7 and rs2 if it is register != %o7 + then we can optimize if the call destination is near + by changing the call into a branch always. */ + if (INSN_BIG_ENDIAN) + delay = bfd_getb32 ((unsigned char *) buf + 4); + else + delay = bfd_getl32 ((unsigned char *) buf + 4); + if ((insn & OP (~0)) != OP (1) || (delay & OP (~0)) != OP (2)) + break; + if ((delay & OP3 (~0)) != OP3 (0x3d) /* Restore. */ + && ((delay & OP3 (0x28)) != 0 /* Arithmetic. */ + || ((delay & RD (~0)) != RD (O7)))) + break; + if ((delay & RS1 (~0)) == RS1 (O7) + || ((delay & F3I (~0)) == 0 + && (delay & RS2 (~0)) == RS2 (O7))) + break; + /* Ensure the branch will fit into simm22. */ + if ((val & 0x3fe00000) + && (val & 0x3fe00000) != 0x3fe00000) + break; + /* Check if the arch is v9 and branch will fit + into simm19. */ + if (((val & 0x3c0000) == 0 + || (val & 0x3c0000) == 0x3c0000) + && (sparc_arch_size == 64 + || current_architecture >= SPARC_OPCODE_ARCH_V9)) + /* ba,pt %xcc */ + insn = INSN_BPA | (val & 0x7ffff); + else + /* ba */ + insn = INSN_BA | (val & 0x3fffff); + if (fixP->fx_where >= 4 + && ((delay & (0xffffffff ^ RS1 (~0))) + == (INSN_OR | RD (O7) | RS2 (G0)))) + { + long setter; + int reg; + + if (INSN_BIG_ENDIAN) + setter = bfd_getb32 ((unsigned char *) buf - 4); + else + setter = bfd_getl32 ((unsigned char *) buf - 4); + if ((setter & (0xffffffff ^ RD (~0))) + != (INSN_OR | RS1 (O7) | RS2 (G0))) + break; + /* The sequence was + or %o7, %g0, %rN + call foo + or %rN, %g0, %o7 + + If call foo was replaced with ba, replace + or %rN, %g0, %o7 with nop. */ + reg = (delay & RS1 (~0)) >> 14; + if (reg != ((setter & RD (~0)) >> 25) + || reg == G0 || reg == O7) + break; + + if (INSN_BIG_ENDIAN) + bfd_putb32 (INSN_NOP, (unsigned char *) buf + 4); + else + bfd_putl32 (INSN_NOP, (unsigned char *) buf + 4); + } + } break; case BFD_RELOC_SPARC_11: @@ -2954,7 +3131,7 @@ md_apply_fix3 (fixP, value, segment) break; case BFD_RELOC_SPARC_WDISP16: - /* FIXME: simplify */ + /* FIXME: simplify. */ if (((val > 0) && (val & ~0x3fffc)) || ((val < 0) && (~(val - 1) & ~0x3fffc))) as_bad_where (fixP->fx_file, fixP->fx_line, @@ -2965,7 +3142,7 @@ md_apply_fix3 (fixP, value, segment) break; case BFD_RELOC_SPARC_WDISP19: - /* FIXME: simplify */ + /* FIXME: simplify. */ if (((val > 0) && (val & ~0x1ffffc)) || ((val < 0) && (~(val - 1) & ~0x1ffffc))) as_bad_where (fixP->fx_file, fixP->fx_line, @@ -2977,7 +3154,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_HH22: val = BSR (val, 32); - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_SPARC_LM22: case BFD_RELOC_HI22: @@ -3001,7 +3178,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_HM10: val = BSR (val, 32); - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_LO10: if (!fixP->fx_addsy) @@ -3018,7 +3195,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_OLO10: val &= 0x3ff; val += fixP->tc_fix_data; - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_SPARC13: if (! in_signed_range (val, 0x1fff)) @@ -3029,7 +3206,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_WDISP22: val = (val >> 2) + 1; - /* FALLTHROUGH */ + /* Fall through. */ case BFD_RELOC_SPARC_BASE22: insn |= val & 0x3fffff; break; @@ -3056,7 +3233,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_HIX22: if (!fixP->fx_addsy) { - val ^= ~ (offsetT) 0; + val ^= ~(offsetT) 0; insn |= (val >> 10) & 0x3fffff; } break; @@ -3089,6 +3266,7 @@ md_apply_fix3 (fixP, value, segment) /* Translate internal representation of relocation info to BFD target format. */ + arelent ** tc_gen_reloc (section, fixp) asection *section; @@ -3190,7 +3368,7 @@ tc_gen_reloc (section, fixp) break; } } -#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */ +#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */ if (code == BFD_RELOC_SPARC_OLO10) reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10); @@ -3224,7 +3402,7 @@ tc_gen_reloc (section, fixp) else reloc->addend = fixp->fx_offset - reloc->address; -#else /* elf or coff */ +#else /* elf or coff */ if (reloc->howto->pc_relative == 0 || code == BFD_RELOC_SPARC_PC10 @@ -3246,7 +3424,8 @@ tc_gen_reloc (section, fixp) relocs[2] = NULL; reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); - *reloc->sym_ptr_ptr = symbol_get_bfdsym (section_symbol (absolute_section)); + *reloc->sym_ptr_ptr + = symbol_get_bfdsym (section_symbol (absolute_section)); reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_SPARC13); reloc->addend = fixp->tc_fix_data; @@ -3255,20 +3434,20 @@ tc_gen_reloc (section, fixp) return relocs; } -/* We have no need to default values of symbols. */ +/* We have no need to default values of symbols. */ -/* ARGSUSED */ symbolS * md_undefined_symbol (name) - char *name; + char *name ATTRIBUTE_UNUSED; { return 0; -} /* md_undefined_symbol() */ +} + +/* Round up a section size to the appropriate boundary. */ -/* Round up a section size to the appropriate boundary. */ valueT md_section_align (segment, size) - segT segment; + segT segment ATTRIBUTE_UNUSED; valueT size; { #ifndef OBJ_ELF @@ -3277,7 +3456,8 @@ md_section_align (segment, size) valueT align = ((valueT) 1 << (valueT) bfd_get_section_alignment (stdoutput, segment)); valueT newsize; - /* turn alignment value into a mask */ + + /* Turn alignment value into a mask. */ align--; newsize = (size + align) & ~align; return newsize; @@ -3289,8 +3469,8 @@ md_section_align (segment, size) /* Exactly what point is a PC-relative offset relative TO? On the sparc, they're relative to the address of the offset, plus its size. This gets us to the following instruction. - (??? Is this right? FIXME-SOON) */ -long + (??? Is this right? FIXME-SOON) */ +long md_pcrel_from (fixP) fixS *fixP; { @@ -3322,9 +3502,7 @@ log2 (value) return (value == 1) ? shift : -1; } -/* - * sort of like s_lcomm - */ +/* Sort of like s_lcomm. */ #ifndef OBJ_ELF static int max_alignment = 15; @@ -3332,7 +3510,7 @@ static int max_alignment = 15; static void s_reserve (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char *p; @@ -3362,7 +3540,7 @@ s_reserve (ignore) as_bad (_("BSS length (%d.) <0! Ignored."), size); ignore_rest_of_line (); return; - } /* bad length */ + } /* Bad length. */ *p = 0; symbolP = symbol_find_or_make (name); @@ -3441,18 +3619,20 @@ s_reserve (ignore) segT current_seg = now_seg; subsegT current_subseg = now_subseg; - subseg_set (bss_section, 1); /* switch to bss */ + /* Switch to bss. */ + subseg_set (bss_section, 1); if (align) - frag_align (align, 0, 0); /* do alignment */ + /* Do alignment. */ + frag_align (align, 0, 0); - /* detach from old frag */ - if (S_GET_SEGMENT(symbolP) == bss_section) + /* Detach from old frag. */ + if (S_GET_SEGMENT (symbolP) == bss_section) symbol_get_frag (symbolP)->fr_symbol = NULL; symbol_set_frag (symbolP, frag_now); - pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP, - (offsetT) size, (char *)0); + pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, + (offsetT) size, (char *) 0); *pfrag = 0; S_SET_SEGMENT (symbolP, bss_section); @@ -3466,16 +3646,16 @@ s_reserve (ignore) } else { - as_warn("Ignoring attempt to re-define symbol %s", - S_GET_NAME (symbolP)); - } /* if not redefining */ + as_warn ("Ignoring attempt to re-define symbol %s", + S_GET_NAME (symbolP)); + } /* if not redefining. */ demand_empty_rest_of_line (); } static void s_common (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char c; @@ -3485,7 +3665,7 @@ s_common (ignore) name = input_line_pointer; c = get_symbol_end (); - /* just after name is now '\0' */ + /* Just after name is now '\0'. */ p = input_line_pointer; *p = c; SKIP_WHITESPACE (); @@ -3495,7 +3675,10 @@ s_common (ignore) ignore_rest_of_line (); return; } - input_line_pointer++; /* skip ',' */ + + /* Skip ','. */ + input_line_pointer++; + if ((temp = get_absolute_expression ()) < 0) { as_bad (_(".COMMon length (%d.) <0! Ignored."), temp); @@ -3594,7 +3777,7 @@ s_common (ignore) subseg_set (old_sec, old_subsec); } else -#endif /* OBJ_ELF */ +#endif /* OBJ_ELF */ { allocate_common: S_SET_VALUE (symbolP, (valueT) size); @@ -3653,7 +3836,7 @@ s_common (ignore) static void s_empty (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* The easy way to implement is to just forget about the last instruction. */ @@ -3662,7 +3845,7 @@ s_empty (ignore) static void s_seg (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (strncmp (input_line_pointer, "\"text\"", 6) == 0) @@ -3688,8 +3871,8 @@ s_seg (ignore) input_line_pointer += 5; /* We only support 2 segments -- text and data -- for now, so things in the "bss segment" will have to go into data for now. - You can still allocate SEG_BSS stuff with .lcomm or .reserve. */ - subseg_set (data_section, 255); /* FIXME-SOMEDAY */ + You can still allocate SEG_BSS stuff with .lcomm or .reserve. */ + subseg_set (data_section, 255); /* FIXME-SOMEDAY. */ return; } as_bad (_("Unknown segment type")); @@ -3705,7 +3888,7 @@ s_data1 () static void s_proc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { while (!is_end_of_line[(unsigned char) *input_line_pointer]) { @@ -3738,7 +3921,7 @@ s_uacons (bytes) static void s_ncons (bytes) - int bytes; + int bytes ATTRIBUTE_UNUSED; { cons (sparc_arch_size == 32 ? 4 : 8); } @@ -3747,13 +3930,13 @@ s_ncons (bytes) /* Handle the SPARC ELF .register pseudo-op. This sets the binding of a global register. The syntax is: - + .register %g[2367],{#scratch|symbolname|#ignore} - */ +*/ static void s_register (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char c; int reg; @@ -3776,7 +3959,7 @@ s_register (ignore) c = get_symbol_end (); if (strcmp (regname, "scratch") && strcmp (regname, "ignore")) as_bad (_("register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}")); - if (regname [0] == 'i') + if (regname[0] == 'i') regname = NULL; else regname = ""; @@ -3788,17 +3971,17 @@ s_register (ignore) } if (sparc_arch_size == 64) { - if (globals [reg]) + if (globals[reg]) { - if ((regname && globals [reg] != (symbolS *)1 - && strcmp (S_GET_NAME (globals [reg]), regname)) - || ((regname != NULL) ^ (globals [reg] != (symbolS *)1))) + if ((regname && globals[reg] != (symbolS *) 1 + && strcmp (S_GET_NAME (globals[reg]), regname)) + || ((regname != NULL) ^ (globals[reg] != (symbolS *) 1))) as_bad (_("redefinition of global register")); } else { if (regname == NULL) - globals [reg] = (symbolS *)1; + globals[reg] = (symbolS *) 1; else { if (*regname) @@ -3807,26 +3990,26 @@ s_register (ignore) as_bad (_("Register symbol %s already defined."), regname); } - globals [reg] = symbol_make (regname); - flags = symbol_get_bfdsym (globals [reg])->flags; + globals[reg] = symbol_make (regname); + flags = symbol_get_bfdsym (globals[reg])->flags; if (! *regname) flags = flags & ~(BSF_GLOBAL|BSF_LOCAL|BSF_WEAK); if (! (flags & (BSF_GLOBAL|BSF_LOCAL|BSF_WEAK))) flags |= BSF_GLOBAL; - symbol_get_bfdsym (globals [reg])->flags = flags; - S_SET_VALUE (globals [reg], (valueT)reg); - S_SET_ALIGN (globals [reg], reg); - S_SET_SIZE (globals [reg], 0); + symbol_get_bfdsym (globals[reg])->flags = flags; + S_SET_VALUE (globals[reg], (valueT) reg); + S_SET_ALIGN (globals[reg], reg); + S_SET_SIZE (globals[reg], 0); /* Although we actually want undefined_section here, we have to use absolute_section, because otherwise generic as code will make it a COM section. We fix this up in sparc_adjust_symtab. */ - S_SET_SEGMENT (globals [reg], absolute_section); - S_SET_OTHER (globals [reg], 0); - elf_symbol (symbol_get_bfdsym (globals [reg])) + S_SET_SEGMENT (globals[reg], absolute_section); + S_SET_OTHER (globals[reg], 0); + elf_symbol (symbol_get_bfdsym (globals[reg])) ->internal_elf_sym.st_info = ELF_ST_INFO(STB_GLOBAL, STT_REGISTER); - elf_symbol (symbol_get_bfdsym (globals [reg])) + elf_symbol (symbol_get_bfdsym (globals[reg])) ->internal_elf_sym.st_shndx = SHN_UNDEF; } } @@ -3839,12 +4022,12 @@ s_register (ignore) /* Adjust the symbol table. We set undefined sections for STT_REGISTER symbols which need it. */ - + void sparc_adjust_symtab () { symbolS *sym; - + for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym)) { if (ELF_ST_TYPE (elf_symbol (symbol_get_bfdsym (sym)) @@ -3902,51 +4085,65 @@ sparc_cons_align (nbytes) return; } - p = frag_var (rs_align_code, 1, 1, (relax_substateT) 0, + p = frag_var (rs_align_test, 1, 1, (relax_substateT) 0, (symbolS *) NULL, (offsetT) nalign, (char *) NULL); record_alignment (now_seg, nalign); } -/* This is where we do the unexpected alignment check. - This is called from HANDLE_ALIGN in tc-sparc.h. */ +/* This is called from HANDLE_ALIGN in tc-sparc.h. */ void sparc_handle_align (fragp) fragS *fragp; { - if (fragp->fr_type == rs_align_code && !fragp->fr_subtype - && fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix != 0) - as_bad_where (fragp->fr_file, fragp->fr_line, _("misaligned data")); - if (fragp->fr_type == rs_align_code && fragp->fr_subtype == 1024) - { - int count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix; - - if (count >= 4 - && !(count & 3) - && count <= 1024 - && !((long)(fragp->fr_literal + fragp->fr_fix) & 3)) - { - unsigned *p = (unsigned *)(fragp->fr_literal + fragp->fr_fix); - int i; - - for (i = 0; i < count; i += 4, p++) - if (INSN_BIG_ENDIAN) - number_to_chars_bigendian ((char *)p, 0x01000000, 4); /* emit nops */ - else - number_to_chars_littleendian ((char *)p, 0x10000000, 4); - - if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8) - { - char *waddr = &fragp->fr_literal[fragp->fr_fix]; - unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */ - if (INSN_BIG_ENDIAN) - number_to_chars_bigendian (waddr, wval, 4); - else - number_to_chars_littleendian (waddr, wval, 4); - } - fragp->fr_var = count; - } + int count, fix; + char *p; + + count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix; + + switch (fragp->fr_type) + { + case rs_align_test: + if (count != 0) + as_bad_where (fragp->fr_file, fragp->fr_line, _("misaligned data")); + break; + + case rs_align_code: + p = fragp->fr_literal + fragp->fr_fix; + fix = 0; + + if (count & 3) + { + fix = count & 3; + memset (p, 0, fix); + p += fix; + count -= fix; + } + + if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8) + { + unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */ + if (INSN_BIG_ENDIAN) + number_to_chars_bigendian (p, wval, 4); + else + number_to_chars_littleendian (p, wval, 4); + p += 4; + count -= 4; + fix += 4; + } + + if (INSN_BIG_ENDIAN) + number_to_chars_bigendian (p, 0x01000000, 4); + else + number_to_chars_littleendian (p, 0x01000000, 4); + + fragp->fr_fix += fix; + fragp->fr_var = 4; + break; + + default: + break; } } @@ -3976,6 +4173,8 @@ sparc_elf_final_processing () elf_elfheader (stdoutput)->e_flags |= EF_SPARC_32PLUS; if (current_architecture == SPARC_OPCODE_ARCH_V9A) elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1; + else if (current_architecture == SPARC_OPCODE_ARCH_V9B) + elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1|EF_SPARC_SUN_US3; } #endif @@ -3997,7 +4196,7 @@ cons_fix_new_sparc (frag, where, nbytes, exp) (nbytes == 4 ? BFD_RELOC_32 : BFD_RELOC_64))); if (target_little_endian_data && nbytes == 4 - && now_seg->flags & SEC_ALLOC) + && now_seg->flags & SEC_ALLOC) r = BFD_RELOC_SPARC_REV32; fix_new_exp (frag, where, (int) nbytes, exp, 0, r); } @@ -4005,13 +4204,12 @@ cons_fix_new_sparc (frag, where, nbytes, exp) #ifdef OBJ_ELF int elf32_sparc_force_relocation (fixp) - struct fix *fixp; + struct fix *fixp; { if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 1; - + return 0; } #endif - diff --git a/contrib/binutils/gas/config/tc-sparc.h b/contrib/binutils/gas/config/tc-sparc.h index 91fda22..17bef83 100644 --- a/contrib/binutils/gas/config/tc-sparc.h +++ b/contrib/binutils/gas/config/tc-sparc.h @@ -50,31 +50,24 @@ extern const char *sparc_target_format PARAMS ((void)); #define WORKING_DOT_WORD -#define md_convert_frag(b,s,f) {as_fatal (_("sparc convert_frag\n"));} +#define md_convert_frag(b,s,f) \ + as_fatal (_("sparc convert_frag\n")) #define md_estimate_size_before_relax(f,s) \ - (as_fatal(_("estimate_size_before_relax called")),1) + (as_fatal(_("estimate_size_before_relax called")), 1) #define LISTING_HEADER "SPARC GAS " extern int sparc_pic_code; -#define md_do_align(n, fill, len, max, around) \ -if ((n) && (n) <= 10 && !need_pass_2 && !(fill) \ - && subseg_text_p (now_seg)) \ - { \ - char *p; \ - p = frag_var (rs_align_code, 1 << n, 1, (relax_substateT) 1024, \ - (symbolS *) 0, (offsetT) (n), (char *) 0); \ - *p = 0x00; \ - goto around; \ - } - /* We require .word, et. al., to be aligned correctly. */ #define md_cons_align(nbytes) sparc_cons_align (nbytes) extern void sparc_cons_align PARAMS ((int)); + #define HANDLE_ALIGN(fragp) sparc_handle_align (fragp) extern void sparc_handle_align PARAMS ((struct frag *)); +#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 4) + #if defined (OBJ_ELF) || defined (OBJ_AOUT) /* This expression evaluates to false if the relocation is for a local @@ -186,14 +179,16 @@ extern void cons_fix_new_sparc { \ (X)->tc_fix_data = 0; \ } \ - while(0) + while (0) #define TC_FIX_DATA_PRINT(FILE, FIXP) \ do \ { \ - fprintf((FILE), "addend2=%ld\n", \ + fprintf ((FILE), "addend2=%ld\n", \ (unsigned long) (FIXP)->tc_fix_data); \ } \ - while(0) + while (0) + +#define DWARF2_LINE_MIN_INSN_LENGTH 4 /* end of tc-sparc.h */ diff --git a/contrib/binutils/gas/config/tc-tic30.c b/contrib/binutils/gas/config/tc-tic30.c index 255c06a..e11cb33 100644 --- a/contrib/binutils/gas/config/tc-tic30.c +++ b/contrib/binutils/gas/config/tc-tic30.c @@ -1,5 +1,5 @@ /* tc-c30.c -- Assembly code for the Texas Instruments TMS320C30 - Copyright (C) 1998, 1999 Free Software Foundation. + Copyright (C) 1998, 1999, 2000 Free Software Foundation. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of GAS, the GNU Assembler. @@ -19,20 +19,20 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - Texas Instruments TMS320C30 machine specific gas. +/* Texas Instruments TMS320C30 machine specific gas. Written by Steven Haworth (steve@pm.cse.rmit.edu.au). Bugs & suggestions are completely welcome. This is free software. - Please help us make it better. - */ + Please help us make it better. */ #include "as.h" #include "opcode/tic30.h" -/* put here all non-digit non-letter charcters that may occur in an operand */ +/* Put here all non-digit non-letter charcters that may occur in an + operand. */ static char operand_special_chars[] = "%$-+(,)*._~/<>&^!:[@]"; -static char *ordinal_names[] = -{"first", "second", "third", "fourth", "fifth"}; +static char *ordinal_names[] = { + "first", "second", "third", "fourth", "fifth" +}; const int md_reloc_size = 0; @@ -41,19 +41,19 @@ const char line_comment_chars[] = "*"; const char line_separator_chars[] = ""; const char *md_shortopts = ""; -struct option md_longopts[] = -{ +struct option md_longopts[] = { {NULL, no_argument, NULL, 0} }; size_t md_longopts_size = sizeof (md_longopts); -/* Chars that mean this number is a floating point constant */ +/* Chars that mean this number is a floating point constant. */ /* As in 0f12.456 */ /* or 0d1.2345e12 */ const char FLT_CHARS[] = "fFdDxX"; -/* Chars that can be used to separate mant from exp in floating point nums */ +/* Chars that can be used to separate mant from exp in floating point + nums. */ const char EXP_CHARS[] = "eE"; /* tables for lexical analysis */ @@ -72,8 +72,7 @@ static char digit_chars[256]; #define is_identifier_char(x) (identifier_chars[(unsigned char) x]) #define is_digit_char(x) (digit_chars[(unsigned char) x]) -const pseudo_typeS md_pseudo_table[] = -{ +const pseudo_typeS md_pseudo_table[] = { {0, 0, 0} }; @@ -85,7 +84,7 @@ const pseudo_typeS md_pseudo_table[] = #include <stdarg.h> int -debug (const char *string,...) +debug (const char *string, ...) { if (flag_debug) { @@ -230,42 +229,32 @@ md_begin () #define PC_Register 0x00000000 #define PC_Relative 0x02000000 -typedef struct -{ +typedef struct { unsigned op_type; - struct - { - int resolved; - unsigned address; - char *label; - expressionS direct_expr; - } - direct; - struct - { - unsigned mod; - int ARnum; - unsigned char disp; - } - indirect; - struct - { - unsigned opcode; - } - reg; - struct - { - int resolved; - int decimal_found; - float f_number; - int s_number; - unsigned int u_number; - char *label; - expressionS imm_expr; - } - immediate; -} -operand; + struct { + int resolved; + unsigned address; + char *label; + expressionS direct_expr; + } direct; + struct { + unsigned mod; + int ARnum; + unsigned char disp; + } indirect; + struct { + unsigned opcode; + } reg; + struct { + int resolved; + int decimal_found; + float f_number; + int s_number; + unsigned int u_number; + char *label; + expressionS imm_expr; + } immediate; +} operand; int tic30_parallel_insn PARAMS ((char *)); operand *tic30_operand PARAMS ((char *)); @@ -273,15 +262,14 @@ char *tic30_find_parallel_insn PARAMS ((char *, char *)); template *opcode; -struct tic30_insn - { - template *tm; /* Template of current instruction */ - unsigned opcode; /* Final opcode */ - int operands; /* Number of given operands */ - /* Type of operand given in instruction */ - operand *operand_type[MAX_OPERANDS]; - unsigned addressing_mode; /* Final addressing mode of instruction */ - }; +struct tic30_insn { + template *tm; /* Template of current instruction */ + unsigned opcode; /* Final opcode */ + int operands; /* Number of given operands */ + /* Type of operand given in instruction */ + operand *operand_type[MAX_OPERANDS]; + unsigned addressing_mode; /* Final addressing mode of instruction */ +}; struct tic30_insn insn; static int found_parallel_insn; @@ -317,7 +305,7 @@ md_assemble (line) return; } /* Check if instruction is a parallel instruction by seeing if the first - character is a q. */ + character is a q. */ if (*token_start == 'q') { if (tic30_parallel_insn (token_start)) @@ -444,7 +432,7 @@ md_assemble (line) int numops = insn.tm->operands; /* If operands are not the same, then see if any of the operands are not required. Then recheck with number of given operands. If they are still not - the same, then give an error, otherwise carry on. */ + the same, then give an error, otherwise carry on. */ for (i = 0; i < insn.tm->operands; i++) if (insn.tm->operand_types[i] & NotReq) numops--; @@ -465,7 +453,7 @@ md_assemble (line) if (insn.tm->opcode_modifier == AddressMode) { int addr_insn = 0; - /* Store instruction uses the second operand for the address mode. */ + /* Store instruction uses the second operand for the address mode. */ if ((insn.tm->operand_types[1] & (Indirect | Direct)) == (Indirect | Direct)) addr_insn = 1; if (insn.operand_type[addr_insn]->op_type & (AllReg)) @@ -484,11 +472,11 @@ md_assemble (line) return; } } - /* Now set the addressing mode for 3 operand instructions. */ + /* Now set the addressing mode for 3 operand instructions. */ if ((insn.tm->operand_types[0] & op3T1) && (insn.tm->operand_types[1] & op3T2)) { /* Set the addressing mode to the values used for 2 operand instructions in the - G addressing field of the opcode. */ + G addressing field of the opcode. */ char *p; switch (insn.operand_type[0]->op_type) { @@ -522,7 +510,7 @@ md_assemble (line) } /* Now make up the opcode for the 3 operand instructions. As in parallel instructions, there will be no unresolved values, so they can be fully formed - and added to the frag table. */ + and added to the frag table. */ insn.opcode = insn.tm->base_opcode; if (insn.operand_type[0]->op_type & Indirect) { @@ -549,7 +537,7 @@ md_assemble (line) char *p; int am_insn = -1; insn.opcode = insn.tm->base_opcode; - /* Create frag for instruction - all instructions are 4 bytes long. */ + /* Create frag for instruction - all instructions are 4 bytes long. */ p = frag_more (INSN_SIZE); if ((insn.operands > 0) && (insn.tm->opcode_modifier == AddressMode)) { @@ -746,7 +734,7 @@ md_assemble (line) md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE); fix = fix_new_exp (frag_now, p + 3 - (frag_now->fr_literal), 1, &insn.operand_type[0]->direct.direct_expr, 0, 0); /* Ensure that the assembler doesn't complain about fitting a 24-bit - address into 8 bits. */ + address into 8 bits. */ fix->fx_no_overflow = 1; } } @@ -790,12 +778,12 @@ md_assemble (line) } else if (insn.tm->operand_types[0] & NotReq) { - /* Check for NOP instruction without arguments. */ + /* Check for NOP instruction without arguments. */ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE); } else if (insn.tm->operands == 0) { - /* Check for instructions without operands. */ + /* Check for instructions without operands. */ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE); } } @@ -813,13 +801,12 @@ md_assemble (line) debug ("\n"); } -struct tic30_par_insn -{ +struct tic30_par_insn { partemplate *tm; /* Template of current parallel instruction */ int operands[2]; /* Number of given operands for each insn */ /* Type of operand given in instruction */ operand *operand_type[2][MAX_OPERANDS]; - int swap_operands; /* Whether to swap operands around. */ + int swap_operands; /* Whether to swap operands around. */ unsigned p_field; /* Value of p field in multiply add/sub instructions */ unsigned opcode; /* Final opcode */ }; @@ -1039,7 +1026,7 @@ tic30_parallel_insn (char *token) /* Get number of R register and indirect reference contained within the first two operands of each instruction. This is required for the multiply parallel instructions which require two R registers and two indirect - references, but not in any particular place. */ + references, but not in any particular place. */ if ((p_insn.operand_type[count][i]->op_type & Rn) && i < 2) num_rn++; else if ((p_insn.operand_type[count][i]->op_type & Indirect) && i < 2) @@ -1109,7 +1096,7 @@ tic30_parallel_insn (char *token) debug ("P field: %08X\n", p_insn.p_field); /* Finalise opcode. This is easier for parallel instructions as they have to be fully resolved, there are no memory addresses allowed, except through indirect - addressing, so there are no labels to resolve. */ + addressing, so there are no labels to resolve. */ { p_insn.opcode = p_insn.tm->base_opcode; switch (p_insn.tm->oporder) @@ -1201,7 +1188,7 @@ tic30_parallel_insn (char *token) } break; } - } /* Opcode is finalised at this point for all parallel instructions. */ + } /* Opcode is finalised at this point for all parallel instructions. */ { /* Output opcode */ char *p; p = frag_more (INSN_SIZE); @@ -1303,7 +1290,7 @@ tic30_operand (token) if (*(token + count) == '(') { /* Parenthesis found, so check if a displacement value is inside. If so, get - the value and remove it from the buffer. */ + the value and remove it from the buffer. */ if (is_digit_char (*(token + count + 1))) { char disp[10]; @@ -1459,7 +1446,7 @@ tic30_find_parallel_insn (current_line, next_line) char *parallel_insn; debug ("In tic30_find_parallel_insn()\n"); - while (!is_end_of_line[(int) *next_line]) + while (!is_end_of_line[(unsigned char) *next_line]) { if (*next_line == PARALLEL_SEPARATOR && *(next_line + 1) == PARALLEL_SEPARATOR) { @@ -1495,7 +1482,7 @@ tic30_find_parallel_insn (current_line, next_line) int char_ptr = 0; char c; - while (!is_end_of_line[(int) (c = *line)] && *line) + while (!is_end_of_line[(unsigned char) (c = *line)]) { if (is_opcode_char (c) && search_status == NONE) { @@ -1543,7 +1530,7 @@ tic30_find_parallel_insn (current_line, next_line) #undef END_OPERANDS /* In order to get gas to ignore any | chars at the start of a line, - this function returns true if a | is found in a line. */ + this function returns true if a | is found in a line. */ int tic30_unrecognized_line (c) @@ -1588,7 +1575,7 @@ md_apply_fix (fixP, valP) char *buf = fixP->fx_frag->fr_literal + fixP->fx_where; value /= INSN_SIZE; if (fixP->fx_size == 1) - { /* Special fix for LDP instruction. */ + { /* Special fix for LDP instruction. */ value = (value & 0x00FF0000) >> 16; } debug ("new value = %ld\n", (long) value); @@ -1650,7 +1637,7 @@ md_pcrel_from (fixP) debug ("fx_size = %d\n", fixP->fx_size); /* Find the opcode that represents the current instruction in the fr_literal storage area, and check bit 21. Bit 21 contains whether the current instruction - is a delayed one or not, and then set the offset value appropriately. */ + is a delayed one or not, and then set the offset value appropriately. */ if (fixP->fx_frag->fr_literal[fixP->fx_where - fixP->fx_size + 1] & 0x20) offset = 3; else @@ -1682,7 +1669,8 @@ md_atof (what_statement_type, literalP, sizeP) debug ("literal = %s\n", literalP); debug ("line = "); token = input_line_pointer; - while (!is_end_of_line[(unsigned) *input_line_pointer] && (*input_line_pointer) && (*input_line_pointer != ',')) + while (!is_end_of_line[(unsigned char) *input_line_pointer] + && (*input_line_pointer != ',')) { debug ("%c", *input_line_pointer); input_line_pointer++; diff --git a/contrib/binutils/gas/config/tc-tic30.h b/contrib/binutils/gas/config/tc-tic30.h index d172d2e..5b34cf1 100644 --- a/contrib/binutils/gas/config/tc-tic30.h +++ b/contrib/binutils/gas/config/tc-tic30.h @@ -1,5 +1,5 @@ /* tc-tic30.h -- Header file for tc-tic30.c - Copyright (C) 1998 Free Software Foundation. + Copyright (C) 1998, 2000 Free Software Foundation. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of GAS, the GNU Assembler. @@ -45,7 +45,7 @@ char *output_invalid PARAMS ((int c)); /* Define this to 1 if you want the debug output to be on stdout, otherwise stderr will be used. If stderr is used, there will be a better synchronisation with the as_bad outputs, but you can't - capture the output. */ + capture the output. */ #define USE_STDOUT 0 #define tc_unrecognized_line tic30_unrecognized_line diff --git a/contrib/binutils/gas/config/tc-v850.c b/contrib/binutils/gas/config/tc-v850.c index e53054d..57931950 100644 --- a/contrib/binutils/gas/config/tc-v850.c +++ b/contrib/binutils/gas/config/tc-v850.c @@ -1,5 +1,5 @@ /* tc-v850.c -- Assembler code for the NEC V850 - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation. + Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -21,60 +21,58 @@ #include <stdio.h> #include <ctype.h> #include "as.h" -#include "subsegs.h" +#include "subsegs.h" #include "opcode/v850.h" +#include "dwarf2dbg.h" #define AREA_ZDA 0 #define AREA_SDA 1 #define AREA_TDA 2 -/* sign-extend a 16-bit number */ -#define SEXT16(x) ((((x) & 0xffff) ^ (~ 0x7fff)) + 0x8000) +/* Sign-extend a 16-bit number. */ +#define SEXT16(x) ((((x) & 0xffff) ^ (~0x7fff)) + 0x8000) /* Temporarily holds the reloc in a cons expression. */ -static bfd_reloc_code_real_type hold_cons_reloc; +static bfd_reloc_code_real_type hold_cons_reloc = BFD_RELOC_UNUSED; /* Set to TRUE if we want to be pedantic about signed overflows. */ static boolean warn_signed_overflows = FALSE; static boolean warn_unsigned_overflows = FALSE; /* Indicates the target BFD machine number. */ -static int machine = -1; +static int machine = -1; /* Indicates the target processor(s) for the assemble. */ -static unsigned int processor_mask = -1; - +static int processor_mask = -1; /* Structure to hold information about predefined registers. */ -struct reg_name -{ - const char * name; - int value; +struct reg_name { + const char *name; + int value; }; -/* Generic assembler global variables which must be defined by all targets. */ +/* Generic assembler global variables which must be defined by all + targets. */ -/* Characters which always start a comment. */ +/* Characters which always start a comment. */ const char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ const char line_comment_chars[] = ";#"; -/* Characters which may be used to separate multiple commands on a +/* Characters which may be used to separate multiple commands on a single line. */ const char line_separator_chars[] = ";"; -/* Characters which are used to indicate an exponent in a floating +/* Characters which are used to indicate an exponent in a floating point number. */ const char EXP_CHARS[] = "eE"; -/* Characters which mean that a number is a floating point constant, +/* Characters which mean that a number is a floating point constant, as in 0d1.0. */ const char FLT_CHARS[] = "dD"; - -const relax_typeS md_relax_table[] = -{ +const relax_typeS md_relax_table[] = { /* Conditional branches. */ {0xff, -0x100, 2, 1}, {0x1fffff, -0x200000, 6, 0}, @@ -83,7 +81,6 @@ const relax_typeS md_relax_table[] = {0x1fffff, -0x200000, 4, 0}, }; - static segT sdata_section = NULL; static segT tdata_section = NULL; static segT zdata_section = NULL; @@ -98,207 +95,207 @@ static segT zcommon_section = NULL; static segT call_table_data_section = NULL; static segT call_table_text_section = NULL; -/* fixups */ +/* Fixups. */ #define MAX_INSN_FIXUPS (5) -struct v850_fixup -{ - expressionS exp; - int opindex; +struct v850_fixup { + expressionS exp; + int opindex; bfd_reloc_code_real_type reloc; }; -struct v850_fixup fixups [MAX_INSN_FIXUPS]; +struct v850_fixup fixups[MAX_INSN_FIXUPS]; static int fc; - void -v850_sdata (int ignore) +v850_sdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (sdata_section, (subsegT) get_absolute_expression ()); demand_empty_rest_of_line (); } void -v850_tdata (int ignore) +v850_tdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (tdata_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_zdata (int ignore) +v850_zdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (zdata_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_sbss (int ignore) +v850_sbss (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (sbss_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_tbss (int ignore) +v850_tbss (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (tbss_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_zbss (int ignore) +v850_zbss (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (zbss_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_rosdata (int ignore) +v850_rosdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (rosdata_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_rozdata (int ignore) +v850_rozdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (rozdata_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_call_table_data (int ignore) +v850_call_table_data (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (call_table_data_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_call_table_text (int ignore) +v850_call_table_text (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (call_table_text_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_bss (int ignore) +v850_bss (int ignore ATTRIBUTE_UNUSED) { register int temp = get_absolute_expression (); - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (bss_section, (subsegT) temp); - + demand_empty_rest_of_line (); } void -v850_offset (int ignore) +v850_offset (int ignore ATTRIBUTE_UNUSED) { int temp = get_absolute_expression (); - - temp -= frag_now_fix(); - + + temp -= frag_now_fix (); + if (temp > 0) (void) frag_more (temp); - + demand_empty_rest_of_line (); } -/* Copied from obj_elf_common() in gas/config/obj-elf.c */ +/* Copied from obj_elf_common() in gas/config/obj-elf.c. */ + static void v850_comm (area) int area; { - char * name; - char c; - char * p; - int temp; - int size; - symbolS * symbolP; - int have_align; + char *name; + char c; + char *p; + int temp; + unsigned int size; + symbolS *symbolP; + int have_align; name = input_line_pointer; c = get_symbol_end (); - - /* just after name is now '\0' */ + + /* Just after name is now '\0'. */ p = input_line_pointer; *p = c; - + SKIP_WHITESPACE (); - + if (*input_line_pointer != ',') { as_bad (_("Expected comma after symbol-name")); ignore_rest_of_line (); return; } - - input_line_pointer ++; /* skip ',' */ - + + /* Skip ','. */ + input_line_pointer++; + if ((temp = get_absolute_expression ()) < 0) { - /* xgettext:c-format */ + /* xgettext:c-format */ as_bad (_(".COMMon length (%d.) < 0! Ignored."), temp); ignore_rest_of_line (); return; } - + size = temp; *p = 0; symbolP = symbol_find_or_make (name); *p = c; - + if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP)) { as_bad (_("Ignoring attempt to re-define symbol")); ignore_rest_of_line (); return; } - + if (S_GET_VALUE (symbolP) != 0) { if (S_GET_VALUE (symbolP) != size) { - /* xgettext:c-format */ + /* xgettext:c-format */ as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %d."), S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size); } } - - know (symbol_get_frag (symbolP) == & zero_address_frag); - + + know (symbol_get_frag (symbolP) == &zero_address_frag); + if (*input_line_pointer != ',') have_align = 0; else @@ -307,7 +304,7 @@ v850_comm (area) input_line_pointer++; SKIP_WHITESPACE (); } - + if (! have_align || *input_line_pointer != '"') { if (! have_align) @@ -315,60 +312,60 @@ v850_comm (area) else { temp = get_absolute_expression (); - + if (temp < 0) { temp = 0; as_warn (_("Common alignment negative; 0 assumed")); } } - + if (symbol_get_obj (symbolP)->local) { - segT old_sec; - int old_subsec; - char * pfrag; - int align; - flagword applicable; + segT old_sec; + int old_subsec; + char *pfrag; + int align; + flagword applicable; old_sec = now_seg; old_subsec = now_subseg; - + applicable = bfd_applicable_section_flags (stdoutput); - + applicable &= SEC_ALLOC; - + switch (area) { case AREA_SDA: if (sbss_section == NULL) { sbss_section = subseg_new (".sbss", 0); - + bfd_set_section_flags (stdoutput, sbss_section, applicable); - + seg_info (sbss_section)->bss = 1; } break; - + case AREA_ZDA: if (zbss_section == NULL) { zbss_section = subseg_new (".zbss", 0); - + bfd_set_section_flags (stdoutput, sbss_section, applicable); - + seg_info (zbss_section)->bss = 1; } break; - + case AREA_TDA: if (tbss_section == NULL) { tbss_section = subseg_new (".tbss", 0); - + bfd_set_section_flags (stdoutput, tbss_section, applicable); - + seg_info (tbss_section)->bss = 1; } break; @@ -376,10 +373,10 @@ v850_comm (area) if (temp) { - /* convert to a power of 2 alignment */ + /* Convert to a power of 2 alignment. */ for (align = 0; (temp & 1) == 0; temp >>= 1, ++align) ; - + if (temp != 1) { as_bad (_("Common alignment not a power of 2")); @@ -389,31 +386,31 @@ v850_comm (area) } else align = 0; - + switch (area) { case AREA_SDA: record_alignment (sbss_section, align); - obj_elf_section_change_hook(); + obj_elf_section_change_hook (); subseg_set (sbss_section, 0); break; case AREA_ZDA: record_alignment (zbss_section, align); - obj_elf_section_change_hook(); + obj_elf_section_change_hook (); subseg_set (zbss_section, 0); break; case AREA_TDA: record_alignment (tbss_section, align); - obj_elf_section_change_hook(); + obj_elf_section_change_hook (); subseg_set (tbss_section, 0); break; default: - abort(); + abort (); } - + if (align) frag_align (align, 0, 0); @@ -437,33 +434,33 @@ v850_comm (area) default: abort (); } - + symbol_set_frag (symbolP, frag_now); pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, (offsetT) size, (char *) 0); *pfrag = 0; S_SET_SIZE (symbolP, size); - + switch (area) { case AREA_SDA: S_SET_SEGMENT (symbolP, sbss_section); break; - + case AREA_ZDA: S_SET_SEGMENT (symbolP, zbss_section); break; - + case AREA_TDA: S_SET_SEGMENT (symbolP, tbss_section); break; - + default: - abort(); + abort (); } - + S_CLEAR_EXTERNAL (symbolP); - obj_elf_section_change_hook(); + obj_elf_section_change_hook (); subseg_set (old_sec, old_subsec); } else @@ -472,68 +469,72 @@ v850_comm (area) S_SET_VALUE (symbolP, (valueT) size); S_SET_ALIGN (symbolP, temp); S_SET_EXTERNAL (symbolP); - + switch (area) { case AREA_SDA: if (scommon_section == NULL) { - flagword applicable; - - applicable = bfd_applicable_section_flags (stdoutput); - + flagword applicable = + bfd_applicable_section_flags (stdoutput); + scommon_section = subseg_new (".scommon", 0); - - bfd_set_section_flags (stdoutput, scommon_section, applicable + + bfd_set_section_flags (stdoutput, scommon_section, + (applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA - | SEC_HAS_CONTENTS) | SEC_IS_COMMON); + | SEC_HAS_CONTENTS)) | SEC_IS_COMMON); } S_SET_SEGMENT (symbolP, scommon_section); break; - + case AREA_ZDA: if (zcommon_section == NULL) { - flagword applicable; - - applicable = bfd_applicable_section_flags (stdoutput); - + flagword applicable = + bfd_applicable_section_flags (stdoutput); + zcommon_section = subseg_new (".zcommon", 0); - - bfd_set_section_flags (stdoutput, zcommon_section, applicable + + bfd_set_section_flags (stdoutput, zcommon_section, + (applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA - | SEC_HAS_CONTENTS) | SEC_IS_COMMON); + | SEC_HAS_CONTENTS)) | SEC_IS_COMMON); } S_SET_SEGMENT (symbolP, zcommon_section); break; - + case AREA_TDA: if (tcommon_section == NULL) { - flagword applicable; - - applicable = bfd_applicable_section_flags (stdoutput); - + flagword applicable = + bfd_applicable_section_flags (stdoutput); + tcommon_section = subseg_new (".tcommon", 0); - - bfd_set_section_flags (stdoutput, tcommon_section, applicable - & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA - | SEC_HAS_CONTENTS) | SEC_IS_COMMON); + + bfd_set_section_flags (stdoutput, tcommon_section, + ((applicable + & (SEC_ALLOC | SEC_LOAD + | SEC_RELOC | SEC_DATA + | SEC_HAS_CONTENTS)) + | SEC_IS_COMMON)); } S_SET_SEGMENT (symbolP, tcommon_section); break; - + default: - abort(); + abort (); } } } else { input_line_pointer++; + /* @@ Some use the dot, some don't. Can we get some consistency?? */ if (*input_line_pointer == '.') input_line_pointer++; + /* @@ Some say data, some say bss. */ if (strncmp (input_line_pointer, "bss\"", 4) && strncmp (input_line_pointer, "data\"", 5)) @@ -576,15 +577,14 @@ set_machine (int number) switch (machine) { - case 0: processor_mask = PROCESSOR_V850; break; - case bfd_mach_v850e: processor_mask = PROCESSOR_V850E; break; + case 0: processor_mask = PROCESSOR_V850; break; + case bfd_mach_v850e: processor_mask = PROCESSOR_V850E; break; case bfd_mach_v850ea: processor_mask = PROCESSOR_V850EA; break; } } /* The target specific pseudo-ops which we support. */ -const pseudo_typeS md_pseudo_table[] = -{ +const pseudo_typeS md_pseudo_table[] = { {"sdata", v850_sdata, 0}, {"tdata", v850_tdata, 0}, {"zdata", v850_zdata, 0}, @@ -604,19 +604,20 @@ const pseudo_typeS md_pseudo_table[] = {"call_table_text", v850_call_table_text, 0}, {"v850e", set_machine, bfd_mach_v850e}, {"v850ea", set_machine, bfd_mach_v850ea}, + {"file", dwarf2_directive_file }, + {"loc", dwarf2_directive_loc }, { NULL, NULL, 0} }; /* Opcode hash table. */ static struct hash_control *v850_hash; -/* This table is sorted. Suitable for searching by a binary search. */ -static const struct reg_name pre_defined_registers[] = -{ +/* This table is sorted. Suitable for searching by a binary search. */ +static const struct reg_name pre_defined_registers[] = { { "ep", 30 }, /* ep - element ptr */ - { "gp", 4 }, /* gp - global ptr */ - { "hp", 2 }, /* hp - handler stack ptr */ - { "lp", 31 }, /* lp - link ptr */ + { "gp", 4 }, /* gp - global ptr */ + { "hp", 2 }, /* hp - handler stack ptr */ + { "lp", 31 }, /* lp - link ptr */ { "r0", 0 }, { "r1", 1 }, { "r10", 10 }, @@ -649,15 +650,15 @@ static const struct reg_name pre_defined_registers[] = { "r7", 7 }, { "r8", 8 }, { "r9", 9 }, - { "sp", 3 }, /* sp - stack ptr */ - { "tp", 5 }, /* tp - text ptr */ + { "sp", 3 }, /* sp - stack ptr */ + { "tp", 5 }, /* tp - text ptr */ { "zero", 0 }, }; -#define REG_NAME_CNT (sizeof (pre_defined_registers) / sizeof (struct reg_name)) +#define REG_NAME_CNT \ + (sizeof (pre_defined_registers) / sizeof (struct reg_name)) -static const struct reg_name system_registers[] = -{ +static const struct reg_name system_registers[] = { { "ctbp", 20 }, { "ctpc", 16 }, { "ctpsw", 17 }, @@ -670,17 +671,19 @@ static const struct reg_name system_registers[] = { "fepsw", 3 }, { "psw", 5 }, }; -#define SYSREG_NAME_CNT (sizeof (system_registers) / sizeof (struct reg_name)) -static const struct reg_name system_list_registers[] = -{ +#define SYSREG_NAME_CNT \ + (sizeof (system_registers) / sizeof (struct reg_name)) + +static const struct reg_name system_list_registers[] = { {"PS", 5 }, {"SR", 0 + 1} }; -#define SYSREGLIST_NAME_CNT (sizeof (system_list_registers) / sizeof (struct reg_name)) -static const struct reg_name cc_names[] = -{ +#define SYSREGLIST_NAME_CNT \ + (sizeof (system_list_registers) / sizeof (struct reg_name)) + +static const struct reg_name cc_names[] = { { "c", 0x1 }, { "e", 0x2 }, { "ge", 0xe }, @@ -704,22 +707,24 @@ static const struct reg_name cc_names[] = { "v", 0x0 }, { "z", 0x2 }, }; -#define CC_NAME_CNT (sizeof (cc_names) / sizeof (struct reg_name)) -/* reg_name_search does a binary search of the given register table - to see if "name" is a valid regiter name. Returns the register - number from the array on success, or -1 on failure. */ +#define CC_NAME_CNT \ + (sizeof (cc_names) / sizeof (struct reg_name)) + +/* Do a binary search of the given register table to see if NAME is a + valid regiter name. Return the register number from the array on + success, or -1 on failure. */ static int reg_name_search (regs, regcount, name, accept_numbers) - const struct reg_name * regs; - int regcount; - const char * name; - boolean accept_numbers; + const struct reg_name *regs; + int regcount; + const char *name; + boolean accept_numbers; { int middle, low, high; int cmp; - symbolS * symbolP; + symbolS *symbolP; /* If the register name is a symbol, then evaluate it. */ if ((symbolP = symbol_find (name)) != NULL) @@ -728,19 +733,20 @@ reg_name_search (regs, regcount, name, accept_numbers) If the symbol is an alias for a number, then return the number. */ if (symbol_equated_p (symbolP)) { - name = S_GET_NAME (symbol_get_value_expression (symbolP)->X_add_symbol); + name + = S_GET_NAME (symbol_get_value_expression (symbolP)->X_add_symbol); } else if (accept_numbers) { int reg = S_GET_VALUE (symbolP); - + if (reg >= 0 && reg <= 31) return reg; } /* Otherwise drop through and try parsing name normally. */ } - + low = 0; high = regcount - 1; @@ -759,7 +765,6 @@ reg_name_search (regs, regcount, name, accept_numbers) return -1; } - /* Summary of register_name(). * * in: Input_line_pointer points to 1st char of operand. @@ -768,18 +773,18 @@ reg_name_search (regs, regcount, name, accept_numbers) * The operand may have been a register: in this case, X_op == O_register, * X_add_number is set to the register number, and truth is returned. * Input_line_pointer->(next non-blank) char after operand, or is in - * its original state. - */ + * its original state. */ + static boolean register_name (expressionP) - expressionS * expressionP; + expressionS *expressionP; { - int reg_number; - char * name; - char * start; - char c; + int reg_number; + char *name; + char *start; + char c; - /* Find the spelling of the operand */ + /* Find the spelling of the operand. */ start = name = input_line_pointer; c = get_symbol_end (); @@ -787,78 +792,79 @@ register_name (expressionP) reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name, FALSE); - * input_line_pointer = c; /* put back the delimiting char */ - - /* look to see if it's in the register table */ - if (reg_number >= 0) + /* Put back the delimiting char. */ + *input_line_pointer = c; + + /* Look to see if it's in the register table. */ + if (reg_number >= 0) { expressionP->X_op = O_register; expressionP->X_add_number = reg_number; - /* make the rest nice */ + /* Make the rest nice. */ expressionP->X_add_symbol = NULL; expressionP->X_op_symbol = NULL; - + return true; } else { - /* reset the line as if we had not done anything */ + /* Reset the line as if we had not done anything. */ input_line_pointer = start; - + return false; } } /* Summary of system_register_name(). * - * in: Input_line_pointer points to 1st char of operand. - * expressionP points to an expression structure to be filled in. - * accept_numbers is true iff numerical register names may be used. - * accept_list_names is true iff the special names PS and SR may be + * in: INPUT_LINE_POINTER points to 1st char of operand. + * EXPRESSIONP points to an expression structure to be filled in. + * ACCEPT_NUMBERS is true iff numerical register names may be used. + * ACCEPT_LIST_NAMES is true iff the special names PS and SR may be * accepted. * * out: A expressionS structure in expressionP. * The operand may have been a register: in this case, X_op == O_register, * X_add_number is set to the register number, and truth is returned. * Input_line_pointer->(next non-blank) char after operand, or is in - * its original state. - */ + * its original state. */ + static boolean system_register_name (expressionP, accept_numbers, accept_list_names) - expressionS * expressionP; - boolean accept_numbers; - boolean accept_list_names; + expressionS *expressionP; + boolean accept_numbers; + boolean accept_list_names; { - int reg_number; - char * name; - char * start; - char c; + int reg_number; + char *name; + char *start; + char c; - /* Find the spelling of the operand */ + /* Find the spelling of the operand. */ start = name = input_line_pointer; c = get_symbol_end (); reg_number = reg_name_search (system_registers, SYSREG_NAME_CNT, name, accept_numbers); - * input_line_pointer = c; /* put back the delimiting char */ - + /* Put back the delimiting char. */ + *input_line_pointer = c; + if (reg_number < 0 && accept_numbers) { - input_line_pointer = start; /* reset input_line pointer */ + /* Reset input_line pointer. */ + input_line_pointer = start; - if (isdigit (* input_line_pointer)) + if (isdigit (*input_line_pointer)) { - reg_number = strtol (input_line_pointer, & input_line_pointer, 10); - - /* Make sure that the register number is allowable. */ - if ( reg_number < 0 - || reg_number > 5 - && reg_number < 16 - || reg_number > 20 - ) + reg_number = strtol (input_line_pointer, &input_line_pointer, 10); + + /* Make sure that the register number is allowable. */ + if (reg_number < 0 + || (reg_number > 5 && reg_number < 16) + || reg_number > 20) { reg_number = -1; } @@ -869,17 +875,18 @@ system_register_name (expressionP, accept_numbers, accept_list_names) reg_number = reg_name_search (system_list_registers, SYSREGLIST_NAME_CNT, name, FALSE); - * input_line_pointer = c; /* put back the delimiting char */ + /* Put back the delimiting char. */ + *input_line_pointer = c; } } - - /* look to see if it's in the register table */ - if (reg_number >= 0) + + /* Look to see if it's in the register table. */ + if (reg_number >= 0) { expressionP->X_op = O_register; expressionP->X_add_number = reg_number; - /* make the rest nice */ + /* Make the rest nice. */ expressionP->X_add_symbol = NULL; expressionP->X_op_symbol = NULL; @@ -887,47 +894,48 @@ system_register_name (expressionP, accept_numbers, accept_list_names) } else { - /* reset the line as if we had not done anything */ + /* Reset the line as if we had not done anything. */ input_line_pointer = start; - + return false; } } /* Summary of cc_name(). * - * in: Input_line_pointer points to 1st char of operand. + * in: INPUT_LINE_POINTER points to 1st char of operand. * * out: A expressionS. * The operand may have been a register: in this case, X_op == O_register, * X_add_number is set to the register number, and truth is returned. * Input_line_pointer->(next non-blank) char after operand, or is in - * its original state. - */ + * its original state. */ + static boolean cc_name (expressionP) - expressionS * expressionP; + expressionS *expressionP; { - int reg_number; - char * name; - char * start; - char c; + int reg_number; + char *name; + char *start; + char c; - /* Find the spelling of the operand */ + /* Find the spelling of the operand. */ start = name = input_line_pointer; c = get_symbol_end (); reg_number = reg_name_search (cc_names, CC_NAME_CNT, name, FALSE); - * input_line_pointer = c; /* put back the delimiting char */ - - /* look to see if it's in the register table */ - if (reg_number >= 0) + /* Put back the delimiting char. */ + *input_line_pointer = c; + + /* Look to see if it's in the register table. */ + if (reg_number >= 0) { expressionP->X_op = O_constant; expressionP->X_add_number = reg_number; - /* make the rest nice */ + /* Make the rest nice. */ expressionP->X_add_symbol = NULL; expressionP->X_op_symbol = NULL; @@ -935,9 +943,9 @@ cc_name (expressionP) } else { - /* reset the line as if we had not done anything */ + /* Reset the line as if we had not done anything. */ input_line_pointer = start; - + return false; } } @@ -945,16 +953,16 @@ cc_name (expressionP) static void skip_white_space (void) { - while ( * input_line_pointer == ' ' - || * input_line_pointer == '\t') - ++ input_line_pointer; + while (*input_line_pointer == ' ' + || *input_line_pointer == '\t') + ++input_line_pointer; } /* Summary of parse_register_list (). * - * in: Input_line_pointer points to 1st char of a list of registers. - * insn is the partially constructed instruction. - * operand is the operand being inserted. + * in: INPUT_LINE_POINTER points to 1st char of a list of registers. + * INSN is the partially constructed instruction. + * OPERAND is the operand being inserted. * * out: NULL if the parse completed successfully, otherwise a * pointer to an error message is returned. If the parse @@ -973,24 +981,29 @@ skip_white_space (void) * registers in the lists. The LSB in the expression refers to * the lowest numbered permissable register in the register list, * and so on upwards. System registers are considered to be very - * high numbers. - * - */ + * high numbers. */ + static char * -parse_register_list -( - unsigned long * insn, - const struct v850_operand * operand -) +parse_register_list (insn, operand) + unsigned long *insn; + const struct v850_operand *operand; { - static int type1_regs[ 32 ] = { 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 }; - static int type2_regs[ 32 ] = { 19, 18, 17, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 }; - static int type3_regs[ 32 ] = { 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 15, 13, 12, 7, 6, 5, 4, 11, 10, 9, 8 }; - int * regs; + static int type1_regs[32] = { + 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 + }; + static int type2_regs[32] = { + 19, 18, 17, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 + }; + static int type3_regs[32] = { + 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 14, 15, 13, 12, 7, 6, 5, 4, 11, 10, 9, 8 + }; + int *regs; expressionS exp; - - /* Select a register array to parse. */ + /* Select a register array to parse. */ switch (operand->shift) { case 0xffe00001: regs = type1_regs; break; @@ -1006,15 +1019,14 @@ parse_register_list /* If the expression starts with a curly brace it is a register list. Otherwise it is a constant expression, whoes bits indicate which registers are to be included in the list. */ - - if (* input_line_pointer != '{') + + if (*input_line_pointer != '{') { - int bits; int reg; int i; - - expression (& exp); - + + expression (&exp); + if (exp.X_op != O_constant) return _("constant expression or register list expected"); @@ -1022,71 +1034,71 @@ parse_register_list { if (exp.X_add_number & 0xFFFFF000) return _("high bits set in register list expression"); - - for (reg = 20; reg < 32; reg ++) + + for (reg = 20; reg < 32; reg++) if (exp.X_add_number & (1 << (reg - 20))) { for (i = 0; i < 32; i++) if (regs[i] == reg) - * insn |= (1 << i); + *insn |= (1 << i); } } else if (regs == type2_regs) { if (exp.X_add_number & 0xFFFE0000) return _("high bits set in register list expression"); - - for (reg = 1; reg < 16; reg ++) + + for (reg = 1; reg < 16; reg++) if (exp.X_add_number & (1 << (reg - 1))) { for (i = 0; i < 32; i++) if (regs[i] == reg) - * insn |= (1 << i); + *insn |= (1 << i); } if (exp.X_add_number & (1 << 15)) - * insn |= (1 << 3); - + *insn |= (1 << 3); + if (exp.X_add_number & (1 << 16)) - * insn |= (1 << 19); + *insn |= (1 << 19); } - else /* regs == type3_regs */ + else /* regs == type3_regs */ { if (exp.X_add_number & 0xFFFE0000) return _("high bits set in register list expression"); - - for (reg = 16; reg < 32; reg ++) + + for (reg = 16; reg < 32; reg++) if (exp.X_add_number & (1 << (reg - 16))) { for (i = 0; i < 32; i++) if (regs[i] == reg) - * insn |= (1 << i); + *insn |= (1 << i); } if (exp.X_add_number & (1 << 16)) - * insn |= (1 << 19); + *insn |= (1 << 19); } return NULL; } - input_line_pointer ++; + input_line_pointer++; /* Parse the register list until a terminator (closing curly brace or new-line) is found. */ for (;;) { - if (register_name (& exp)) + if (register_name (&exp)) { - int i; - + int i; + /* Locate the given register in the list, and if it is there, insert the corresponding bit into the instruction. */ for (i = 0; i < 32; i++) { - if (regs[ i ] == exp.X_add_number) + if (regs[i] == exp.X_add_number) { - * insn |= (1 << i); + *insn |= (1 << i); break; } } @@ -1096,7 +1108,7 @@ parse_register_list return _("illegal register included in list"); } } - else if (system_register_name (& exp, true, true)) + else if (system_register_name (&exp, true, true)) { if (regs == type1_regs) { @@ -1107,34 +1119,34 @@ parse_register_list if (regs == type2_regs) return _("PSW cannot be included in list"); else - * insn |= 0x8; + *insn |= 0x8; } else if (exp.X_add_number < 4) - * insn |= 0x80000; + *insn |= 0x80000; else return _("High value system registers cannot be included in list"); } - else if (* input_line_pointer == '}') + else if (*input_line_pointer == '}') { - input_line_pointer ++; + input_line_pointer++; break; } - else if (* input_line_pointer == ',') + else if (*input_line_pointer == ',') { - input_line_pointer ++; + input_line_pointer++; continue; } - else if (* input_line_pointer == '-') + else if (*input_line_pointer == '-') { - /* We have encountered a range of registers: rX - rY */ - int j; + /* We have encountered a range of registers: rX - rY. */ + int j; expressionS exp2; /* Skip the dash. */ - ++ input_line_pointer; + ++input_line_pointer; /* Get the second register in the range. */ - if (! register_name (& exp2)) + if (! register_name (&exp2)) { return _("second register should follow dash in register list"); exp2.X_add_number = exp.X_add_number; @@ -1143,15 +1155,15 @@ parse_register_list /* Add the rest of the registers in the range. */ for (j = exp.X_add_number + 1; j <= exp2.X_add_number; j++) { - int i; - + int i; + /* Locate the given register in the list, and if it is there, insert the corresponding bit into the instruction. */ for (i = 0; i < 32; i++) { - if (regs[ i ] == j) + if (regs[i] == j) { - * insn |= (1 << i); + *insn |= (1 << i); break; } } @@ -1171,18 +1183,17 @@ parse_register_list return NULL; } -CONST char * md_shortopts = "m:"; +CONST char *md_shortopts = "m:"; -struct option md_longopts[] = -{ +struct option md_longopts[] = { {NULL, no_argument, NULL, 0} }; -size_t md_longopts_size = sizeof md_longopts; +size_t md_longopts_size = sizeof (md_longopts); void md_show_usage (stream) - FILE * stream; + FILE *stream; { fprintf (stream, _(" V850 options:\n")); fprintf (stream, _(" -mwarn-signed-overflow Warn if signed immediate values overflow\n")); @@ -1195,13 +1206,14 @@ md_show_usage (stream) int md_parse_option (c, arg) - int c; - char * arg; + int c; + char *arg; { if (c != 'm') { - /* xgettext:c-format */ - fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); + if (c != 'a') + /* xgettext:c-format */ + fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); return 0; } @@ -1230,36 +1242,39 @@ md_parse_option (c, arg) } else if (strcmp (arg, "v850any") == 0) { - machine = 0; /* Tell the world that this is for any v850 chip. */ - processor_mask = PROCESSOR_V850EA; /* But support instructions for the extended versions. */ + /* Tell the world that this is for any v850 chip. */ + machine = 0; + + /* But support instructions for the extended versions. */ + processor_mask = PROCESSOR_V850EA; } else { - /* xgettext:c-format */ + /* xgettext:c-format */ fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); return 0; } - + return 1; } symbolS * md_undefined_symbol (name) - char * name; + char *name ATTRIBUTE_UNUSED; { return 0; } char * md_atof (type, litp, sizep) - int type; - char * litp; - int * sizep; + int type; + char *litp; + int *sizep; { - int prec; + int prec; LITTLENUM_TYPE words[4]; - char * t; - int i; + char *t; + int i; switch (type) { @@ -1275,7 +1290,7 @@ md_atof (type, litp, sizep) *sizep = 0; return _("bad call to md_atof"); } - + t = atof_ieee (input_line_pointer, type, words); if (t) input_line_pointer = t; @@ -1291,16 +1306,16 @@ md_atof (type, litp, sizep) return NULL; } - /* Very gross. */ + void md_convert_frag (abfd, sec, fragP) - bfd * abfd; - asection * sec; - fragS * fragP; + bfd *abfd ATTRIBUTE_UNUSED; + asection *sec; + fragS *fragP; { subseg_change (sec, 0); - + /* In range conditional or unconditional branch. */ if (fragP->fr_subtype == 0 || fragP->fr_subtype == 2) { @@ -1312,7 +1327,7 @@ md_convert_frag (abfd, sec, fragP) /* Out of range conditional branch. Emit a branch around a jump. */ else if (fragP->fr_subtype == 1) { - unsigned char *buffer = + unsigned char *buffer = (unsigned char *) (fragP->fr_fix + fragP->fr_literal); /* Reverse the condition of the first branch. */ @@ -1349,8 +1364,8 @@ md_convert_frag (abfd, sec, fragP) valueT md_section_align (seg, addr) - asection * seg; - valueT addr; + asection *seg; + valueT addr; { int align = bfd_get_section_alignment (stdoutput, seg); return ((addr + (1 << align) - 1) & (-1 << align)); @@ -1359,41 +1374,40 @@ md_section_align (seg, addr) void md_begin () { - char * prev_name = ""; - register const struct v850_opcode * op; - flagword applicable; + char *prev_name = ""; + register const struct v850_opcode *op; + flagword applicable; if (strncmp (TARGET_CPU, "v850ea", 6) == 0) { if (machine == -1) machine = bfd_mach_v850ea; - + if (processor_mask == -1) processor_mask = PROCESSOR_V850EA; } else if (strncmp (TARGET_CPU, "v850e", 5) == 0) { if (machine == -1) - machine = bfd_mach_v850e; - + machine = bfd_mach_v850e; + if (processor_mask == -1) processor_mask = PROCESSOR_V850E; } - else - if (strncmp (TARGET_CPU, "v850", 4) == 0) + else if (strncmp (TARGET_CPU, "v850", 4) == 0) { if (machine == -1) - machine = 0; - + machine = 0; + if (processor_mask == -1) processor_mask = PROCESSOR_V850; } else - /* xgettext:c-format */ - as_bad (_("Unable to determine default target processor from string: %s"), + /* xgettext:c-format */ + as_bad (_("Unable to determine default target processor from string: %s"), TARGET_CPU); - v850_hash = hash_new(); + v850_hash = hash_new (); /* Insert unique names into hash table. The V850 instruction set has many identical opcode names that have different opcodes based @@ -1403,7 +1417,7 @@ md_begin () op = v850_opcodes; while (op->name) { - if (strcmp (prev_name, op->name)) + if (strcmp (prev_name, op->name)) { prev_name = (char *) op->name; hash_insert (v850_hash, op->name, (char *) op); @@ -1414,90 +1428,115 @@ md_begin () bfd_set_arch_mach (stdoutput, TARGET_ARCH, machine); applicable = bfd_applicable_section_flags (stdoutput); - + call_table_data_section = subseg_new (".call_table_data", 0); bfd_set_section_flags (stdoutput, call_table_data_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS)); - + call_table_text_section = subseg_new (".call_table_text", 0); bfd_set_section_flags (stdoutput, call_table_text_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE)); - + /* Restore text section as the current default. */ subseg_set (text_section, 0); } - static bfd_reloc_code_real_type -handle_ctoff (const struct v850_operand * operand) +handle_ctoff (const struct v850_operand *operand) { if (operand == NULL) return BFD_RELOC_V850_CALLT_16_16_OFFSET; - if ( operand->bits != 6 + if (operand->bits != 6 || operand->shift != 0) { as_bad (_("ctoff() relocation used on an instruction which does not support it")); return BFD_RELOC_64; /* Used to indicate an error condition. */ } - + return BFD_RELOC_V850_CALLT_6_7_OFFSET; } static bfd_reloc_code_real_type -handle_sdaoff (const struct v850_operand * operand) +handle_sdaoff (const struct v850_operand *operand) { - if (operand == NULL) return BFD_RELOC_V850_SDA_16_16_OFFSET; - if (operand->bits == 15 && operand->shift == 17) return BFD_RELOC_V850_SDA_15_16_OFFSET; - if (operand->bits == -1) return BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET; - - if ( operand->bits != 16 + if (operand == NULL) + return BFD_RELOC_V850_SDA_16_16_OFFSET; + + if (operand->bits == 15 && operand->shift == 17) + return BFD_RELOC_V850_SDA_15_16_OFFSET; + + if (operand->bits == -1) + return BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET; + + if (operand->bits != 16 || operand->shift != 16) { as_bad (_("sdaoff() relocation used on an instruction which does not support it")); return BFD_RELOC_64; /* Used to indicate an error condition. */ } - + return BFD_RELOC_V850_SDA_16_16_OFFSET; } static bfd_reloc_code_real_type -handle_zdaoff (const struct v850_operand * operand) +handle_zdaoff (const struct v850_operand *operand) { - if (operand == NULL) return BFD_RELOC_V850_ZDA_16_16_OFFSET; - if (operand->bits == 15 && operand->shift == 17) return BFD_RELOC_V850_ZDA_15_16_OFFSET; - if (operand->bits == -1) return BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET; + if (operand == NULL) + return BFD_RELOC_V850_ZDA_16_16_OFFSET; + + if (operand->bits == 15 && operand->shift == 17) + return BFD_RELOC_V850_ZDA_15_16_OFFSET; - if ( operand->bits != 16 + if (operand->bits == -1) + return BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET; + + if (operand->bits != 16 || operand->shift != 16) { as_bad (_("zdaoff() relocation used on an instruction which does not support it")); - return BFD_RELOC_64; /* Used to indicate an error condition. */ + /* Used to indicate an error condition. */ + return BFD_RELOC_64; } - + return BFD_RELOC_V850_ZDA_16_16_OFFSET; } static bfd_reloc_code_real_type -handle_tdaoff (const struct v850_operand * operand) +handle_tdaoff (const struct v850_operand *operand) { - if (operand == NULL) return BFD_RELOC_V850_TDA_7_7_OFFSET; /* data item, not an instruction. */ - if (operand->bits == 6 && operand->shift == 1) return BFD_RELOC_V850_TDA_6_8_OFFSET; /* sld.w/sst.w, operand: D8_6 */ - if (operand->bits == 4 && operand->insert != NULL) return BFD_RELOC_V850_TDA_4_5_OFFSET; /* sld.hu, operand: D5-4 */ - if (operand->bits == 4 && operand->insert == NULL) return BFD_RELOC_V850_TDA_4_4_OFFSET; /* sld.bu, operand: D4 */ - if (operand->bits == 16 && operand->shift == 16) return BFD_RELOC_V850_TDA_16_16_OFFSET; /* set1 & chums, operands: D16 */ - + if (operand == NULL) + /* Data item, not an instruction. */ + return BFD_RELOC_V850_TDA_7_7_OFFSET; + + if (operand->bits == 6 && operand->shift == 1) + /* sld.w/sst.w, operand: D8_6 */ + return BFD_RELOC_V850_TDA_6_8_OFFSET; + + if (operand->bits == 4 && operand->insert != NULL) + /* sld.hu, operand: D5-4 */ + return BFD_RELOC_V850_TDA_4_5_OFFSET; + + if (operand->bits == 4 && operand->insert == NULL) + /* sld.bu, operand: D4 */ + return BFD_RELOC_V850_TDA_4_4_OFFSET; + + if (operand->bits == 16 && operand->shift == 16) + /* set1 & chums, operands: D16 */ + return BFD_RELOC_V850_TDA_16_16_OFFSET; + if (operand->bits != 7) { as_bad (_("tdaoff() relocation used on an instruction which does not support it")); - return BFD_RELOC_64; /* Used to indicate an error condition. */ + /* Used to indicate an error condition. */ + return BFD_RELOC_64; } - + return operand->insert != NULL - ? BFD_RELOC_V850_TDA_7_8_OFFSET /* sld.h/sst.h, operand: D8_7 */ - : BFD_RELOC_V850_TDA_7_7_OFFSET; /* sld.b/sst.b, opreand: D7 */ + ? BFD_RELOC_V850_TDA_7_8_OFFSET /* sld.h/sst.h, operand: D8_7 */ + : BFD_RELOC_V850_TDA_7_7_OFFSET; /* sld.b/sst.b, opreand: D7 */ } /* Warning: The code in this function relies upon the definitions @@ -1505,15 +1544,14 @@ handle_tdaoff (const struct v850_operand * operand) matching the hard coded values contained herein. */ static bfd_reloc_code_real_type -v850_reloc_prefix (const struct v850_operand * operand) +v850_reloc_prefix (const struct v850_operand *operand) { boolean paren_skipped = false; - /* Skip leading opening parenthesis. */ - if (* input_line_pointer == '(') + if (*input_line_pointer == '(') { - ++ input_line_pointer; + ++input_line_pointer; paren_skipped = true; } @@ -1523,20 +1561,20 @@ v850_reloc_prefix (const struct v850_operand * operand) input_line_pointer += strlen (name); \ return reloc; \ } - - CHECK_ ("hi0", BFD_RELOC_HI16); - CHECK_ ("hi", BFD_RELOC_HI16_S); - CHECK_ ("lo", BFD_RELOC_LO16); + + CHECK_ ("hi0", BFD_RELOC_HI16 ); + CHECK_ ("hi", BFD_RELOC_HI16_S ); + CHECK_ ("lo", BFD_RELOC_LO16 ); CHECK_ ("sdaoff", handle_sdaoff (operand)); CHECK_ ("zdaoff", handle_zdaoff (operand)); CHECK_ ("tdaoff", handle_tdaoff (operand)); - CHECK_ ("hilo", BFD_RELOC_32); - CHECK_ ("ctoff", handle_ctoff (operand)); - + CHECK_ ("hilo", BFD_RELOC_32 ); + CHECK_ ("ctoff", handle_ctoff (operand) ); + /* Restore skipped parenthesis. */ if (paren_skipped) - -- input_line_pointer; - + --input_line_pointer; + return BFD_RELOC_UNUSED; } @@ -1544,31 +1582,31 @@ v850_reloc_prefix (const struct v850_operand * operand) static unsigned long v850_insert_operand (insn, operand, val, file, line, str) - unsigned long insn; - const struct v850_operand * operand; - offsetT val; - char * file; - unsigned int line; - char * str; + unsigned long insn; + const struct v850_operand *operand; + offsetT val; + char *file; + unsigned int line; + char *str; { if (operand->insert) { - const char * message = NULL; - - insn = operand->insert (insn, val, & message); + const char *message = NULL; + + insn = operand->insert (insn, val, &message); if (message != NULL) { if ((operand->flags & V850_OPERAND_SIGNED) && ! warn_signed_overflows && strstr (message, "out of range") != NULL) { - /* skip warning... */ + /* Skip warning... */ } else if ((operand->flags & V850_OPERAND_SIGNED) == 0 && ! warn_unsigned_overflows && strstr (message, "out of range") != NULL) { - /* skip warning... */ + /* Skip warning... */ } else if (str) { @@ -1590,8 +1628,7 @@ v850_insert_operand (insn, operand, val, file, line, str) { if (operand->bits != 32) { - long min, max; - offsetT test; + long min, max; if ((operand->flags & V850_OPERAND_SIGNED) != 0) { @@ -1599,25 +1636,26 @@ v850_insert_operand (insn, operand, val, file, line, str) max = (1 << operand->bits) - 1; else max = (1 << (operand->bits - 1)) - 1; - - min = - (1 << (operand->bits - 1)); + + min = -(1 << (operand->bits - 1)); } else { max = (1 << operand->bits) - 1; - + if (! warn_unsigned_overflows) - min = - (1 << (operand->bits - 1)); + min = -(1 << (operand->bits - 1)); else min = 0; } - + if (val < (offsetT) min || val > (offsetT) max) { - /* xgettext:c-format */ - const char * err = _("operand out of range (%s not between %ld and %ld)"); - char buf[100]; - + /* xgettext:c-format */ + const char *err = + _("operand out of range (%s not between %ld and %ld)"); + char buf[100]; + /* Restore min and mix to expected values for decimal ranges. */ if ((operand->flags & V850_OPERAND_SIGNED) && ! warn_signed_overflows) @@ -1630,12 +1668,12 @@ v850_insert_operand (insn, operand, val, file, line, str) if (str) { sprintf (buf, "%s: ", str); - + sprint_value (buf + strlen (buf), val); } else sprint_value (buf, val); - + if (file == (char *) NULL) as_warn (err, buf, min, max); else @@ -1645,74 +1683,73 @@ v850_insert_operand (insn, operand, val, file, line, str) insn |= (((long) val & ((1 << operand->bits) - 1)) << operand->shift); } - + return insn; } - -static char copy_of_instruction [128]; +static char copy_of_instruction[128]; void -md_assemble (str) - char * str; +md_assemble (str) + char *str; { - char * s; - char * start_of_operands; - struct v850_opcode * opcode; - struct v850_opcode * next_opcode; - const unsigned char * opindex_ptr; - int next_opindex; - int relaxable; - unsigned long insn; - unsigned long insn_size; - char * f; - int i; - int match; - boolean extra_data_after_insn = false; - unsigned extra_data_len; - unsigned long extra_data; - char * saved_input_line_pointer; - - + char *s; + char *start_of_operands; + struct v850_opcode *opcode; + struct v850_opcode *next_opcode; + const unsigned char *opindex_ptr; + int next_opindex; + int relaxable = 0; + unsigned long insn; + unsigned long insn_size; + unsigned long total_insn_size = 0; + char *f; + int i; + int match; + boolean extra_data_after_insn = false; + unsigned extra_data_len = 0; + unsigned long extra_data = 0; + char *saved_input_line_pointer; + strncpy (copy_of_instruction, str, sizeof (copy_of_instruction) - 1); - + /* Get the opcode. */ for (s = str; *s != '\0' && ! isspace (*s); s++) continue; - + if (*s != '\0') *s++ = '\0'; - /* find the first opcode with the proper name */ + /* Find the first opcode with the proper name. */ opcode = (struct v850_opcode *) hash_find (v850_hash, str); if (opcode == NULL) { - /* xgettext:c-format */ + /* xgettext:c-format */ as_bad (_("Unrecognized opcode: `%s'"), str); ignore_rest_of_line (); return; } str = s; - while (isspace (* str)) - ++ str; + while (isspace (*str)) + ++str; start_of_operands = str; saved_input_line_pointer = input_line_pointer; - + for (;;) { - const char * errmsg = NULL; + const char *errmsg = NULL; match = 0; - + if ((opcode->processors & processor_mask) == 0) { errmsg = _("Target processor does not support this instruction."); goto error; } - + relaxable = 0; fc = 0; next_opindex = 0; @@ -1721,36 +1758,36 @@ md_assemble (str) input_line_pointer = str = start_of_operands; - for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr ++) + for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++) { - const struct v850_operand * operand; - char * hold; - expressionS ex; - bfd_reloc_code_real_type reloc; + const struct v850_operand *operand; + char *hold; + expressionS ex; + bfd_reloc_code_real_type reloc; if (next_opindex == 0) { - operand = & v850_operands[ * opindex_ptr ]; + operand = &v850_operands[*opindex_ptr]; } else { - operand = & v850_operands[ next_opindex ]; + operand = &v850_operands[next_opindex]; next_opindex = 0; } errmsg = NULL; while (*str == ' ' || *str == ',' || *str == '[' || *str == ']') - ++ str; + ++str; if (operand->flags & V850_OPERAND_RELAX) relaxable = 1; - /* Gather the operand. */ + /* Gather the operand. */ hold = input_line_pointer; input_line_pointer = str; - - /* lo(), hi(), hi0(), etc... */ + + /* lo(), hi(), hi0(), etc... */ if ((reloc = v850_reloc_prefix (operand)) != BFD_RELOC_UNUSED) { /* This is a fake reloc, used to indicate an error condition. */ @@ -1759,8 +1796,8 @@ md_assemble (str) match = 1; goto error; } - - expression (& ex); + + expression (&ex); if (ex.X_op == O_constant) { @@ -1770,7 +1807,7 @@ md_assemble (str) /* To cope with "not1 7, zdaoff(0xfffff006)[r0]" and the like. */ /* Fall through. */ - + case BFD_RELOC_LO16: { /* Truncate, then sign extend the value. */ @@ -1788,27 +1825,27 @@ md_assemble (str) case BFD_RELOC_HI16_S: { /* Truncate, then sign extend the value. */ - int temp = (ex.X_add_number >> 16) & 0xffff; + int temp = (ex.X_add_number >> 16) & 0xffff; temp += (ex.X_add_number >> 15) & 1; ex.X_add_number = SEXT16 (temp); break; } - + case BFD_RELOC_32: if ((operand->flags & V850E_IMMEDIATE32) == 0) { errmsg = _("immediate operand is too large"); goto error; } - + extra_data_after_insn = true; extra_data_len = 4; extra_data = ex.X_add_number; ex.X_add_number = 0; break; - + default: fprintf (stderr, "reloc: %d\n", reloc); as_bad (_("AAARG -> unhandled constant reloc")); @@ -1817,10 +1854,10 @@ md_assemble (str) if (fc > MAX_INSN_FIXUPS) as_fatal (_("too many fixups")); - - fixups[ fc ].exp = ex; - fixups[ fc ].opindex = * opindex_ptr; - fixups[ fc ].reloc = reloc; + + fixups[fc].exp = ex; + fixups[fc].opindex = *opindex_ptr; + fixups[fc].reloc = reloc; fc++; } else @@ -1832,54 +1869,54 @@ md_assemble (str) errmsg = _("immediate operand is too large"); goto error; } - + extra_data_after_insn = true; extra_data_len = 4; extra_data = ex.X_add_number; } - + if (fc > MAX_INSN_FIXUPS) as_fatal (_("too many fixups")); - fixups[ fc ].exp = ex; - fixups[ fc ].opindex = * opindex_ptr; - fixups[ fc ].reloc = reloc; + fixups[fc].exp = ex; + fixups[fc].opindex = *opindex_ptr; + fixups[fc].reloc = reloc; fc++; } } else { errmsg = NULL; - - if ((operand->flags & V850_OPERAND_REG) != 0) + + if ((operand->flags & V850_OPERAND_REG) != 0) { - if (!register_name (& ex)) + if (!register_name (&ex)) { errmsg = _("invalid register name"); } else if ((operand->flags & V850_NOT_R0) - && ex.X_add_number == 0) + && ex.X_add_number == 0) { errmsg = _("register r0 cannot be used here"); - + /* Force an error message to be generated by skipping over any following potential matches for this opcode. */ opcode += 3; } } - else if ((operand->flags & V850_OPERAND_SRG) != 0) + else if ((operand->flags & V850_OPERAND_SRG) != 0) { - if (!system_register_name (& ex, true, false)) + if (!system_register_name (&ex, true, false)) { errmsg = _("invalid system register name"); } } else if ((operand->flags & V850_OPERAND_EP) != 0) { - char * start = input_line_pointer; - char c = get_symbol_end (); - + char *start = input_line_pointer; + char c = get_symbol_end (); + if (strcmp (start, "ep") != 0 && strcmp (start, "r30") != 0) { /* Put things back the way we found them. */ @@ -1888,34 +1925,35 @@ md_assemble (str) errmsg = _("expected EP register"); goto error; } - + *input_line_pointer = c; str = input_line_pointer; input_line_pointer = hold; - - while (*str == ' ' || *str == ',' || *str == '[' || *str == ']') - ++ str; + + while (*str == ' ' || *str == ',' + || *str == '[' || *str == ']') + ++str; continue; } - else if ((operand->flags & V850_OPERAND_CC) != 0) + else if ((operand->flags & V850_OPERAND_CC) != 0) { - if (!cc_name (& ex)) + if (!cc_name (&ex)) { errmsg = _("invalid condition code name"); } } - else if (operand->flags & V850E_PUSH_POP) + else if (operand->flags & V850E_PUSH_POP) { - errmsg = parse_register_list (& insn, operand); - + errmsg = parse_register_list (&insn, operand); + /* The parse_register_list() function has already done everything, so fake a dummy expression. */ ex.X_op = O_constant; ex.X_add_number = 0; } - else if (operand->flags & V850E_IMMEDIATE16) + else if (operand->flags & V850E_IMMEDIATE16) { - expression (& ex); + expression (&ex); if (ex.X_op != O_constant) errmsg = _("constant expression expected"); @@ -1928,30 +1966,30 @@ md_assemble (str) else errmsg = _("constant too big to fit into instruction"); } - + extra_data_after_insn = true; extra_data_len = 2; extra_data = ex.X_add_number; ex.X_add_number = 0; } - else if (operand->flags & V850E_IMMEDIATE32) + else if (operand->flags & V850E_IMMEDIATE32) { - expression (& ex); - + expression (&ex); + if (ex.X_op != O_constant) errmsg = _("constant expression expected"); - + extra_data_after_insn = true; extra_data_len = 4; extra_data = ex.X_add_number; ex.X_add_number = 0; } - else if (register_name (& ex) + else if (register_name (&ex) && (operand->flags & V850_OPERAND_REG) == 0) { char c; - int exists = 0; - + int exists = 0; + /* It is possible that an alias has been defined that matches a register name. For example the code may include a ".set ZERO, 0" directive, which matches @@ -1962,14 +2000,14 @@ md_assemble (str) input_line_pointer = str; c = get_symbol_end (); - + if (symbol_find (str) != NULL) exists = 1; - - * input_line_pointer = c; + + *input_line_pointer = c; input_line_pointer = str; - - expression (& ex); + + expression (&ex); if (ex.X_op != O_constant) { @@ -1977,21 +2015,22 @@ md_assemble (str) the parsing of the instruction, (because another field is missing) then report this. */ if (opindex_ptr[1] != 0 - && (v850_operands [opindex_ptr [1]].flags & V850_OPERAND_REG)) + && (v850_operands[opindex_ptr[1]].flags + & V850_OPERAND_REG)) errmsg = _("syntax error: value is missing before the register name"); else errmsg = _("syntax error: register not expected"); - /* If we created a symbol in the process of this test then - delete it now, so that it will not be output with the real - symbols... */ + /* If we created a symbol in the process of this + test then delete it now, so that it will not + be output with the real symbols... */ if (exists == 0 && ex.X_op == O_symbol) symbol_remove (ex.X_add_symbol, - & symbol_rootP, & symbol_lastP); + &symbol_rootP, &symbol_lastP); } } - else if (system_register_name (& ex, false, false) + else if (system_register_name (&ex, false, false) && (operand->flags & V850_OPERAND_SRG) == 0) { errmsg = _("syntax error: system register not expected"); @@ -2003,7 +2042,7 @@ md_assemble (str) } else { - expression (& ex); + expression (&ex); /* Special case: If we are assembling a MOV instruction (or a CALLT.... :-) and the immediate value does not fit into the bits @@ -2013,18 +2052,22 @@ md_assemble (str) if (((insn & 0x07e0) == 0x0200) && ex.X_op == O_constant - && (ex.X_add_number < (- (1 << (operand->bits - 1))) + && (ex.X_add_number < (-(1 << (operand->bits - 1))) || ex.X_add_number > ((1 << operand->bits) - 1))) errmsg = _("immediate operand is too large"); } if (errmsg) goto error; - -/* fprintf (stderr, " insn: %x, operand %d, op: %d, add_number: %d\n", - insn, opindex_ptr - opcode->operands, ex.X_op, ex.X_add_number); */ - switch (ex.X_op) +#if 0 + fprintf (stderr, + " insn: %x, operand %d, op: %d, add_number: %d\n", + insn, opindex_ptr - opcode->operands, + ex.X_op, ex.X_add_number); +#endif + + switch (ex.X_op) { case O_illegal: errmsg = _("illegal operand"); @@ -2033,7 +2076,8 @@ md_assemble (str) errmsg = _("missing operand"); goto error; case O_register: - if ((operand->flags & (V850_OPERAND_REG | V850_OPERAND_SRG)) == 0) + if ((operand->flags + & (V850_OPERAND_REG | V850_OPERAND_SRG)) == 0) { errmsg = _("invalid operand"); goto error; @@ -2054,9 +2098,9 @@ md_assemble (str) if (fc >= MAX_INSN_FIXUPS) as_fatal (_("too many fixups")); - fixups[ fc ].exp = ex; - fixups[ fc ].opindex = * opindex_ptr; - fixups[ fc ].reloc = BFD_RELOC_UNUSED; + fixups[fc].exp = ex; + fixups[fc].opindex = *opindex_ptr; + fixups[fc].reloc = BFD_RELOC_UNUSED; ++fc; break; } @@ -2073,7 +2117,7 @@ md_assemble (str) error: if (match == 0) - { + { next_opcode = opcode + 1; if (next_opcode->name != NULL && strcmp (next_opcode->name, opcode->name) == 0) @@ -2084,33 +2128,33 @@ md_assemble (str) processor. */ if ((opcode->processors & processor_mask) == 0) goto error; - + continue; } - + as_bad ("%s: %s", copy_of_instruction, errmsg); - - if (* input_line_pointer == ']') - ++ input_line_pointer; - + + if (*input_line_pointer == ']') + ++input_line_pointer; + ignore_rest_of_line (); input_line_pointer = saved_input_line_pointer; return; - } + } break; } - + while (isspace (*str)) ++str; if (*str != '\0') - /* xgettext:c-format */ + /* xgettext:c-format */ as_bad (_("junk at end of line: `%s'"), str); input_line_pointer = str; - /* Write out the instruction. */ - + /* Write out the instruction. */ + if (relaxable && fc > 0) { insn_size = 2; @@ -2121,7 +2165,7 @@ md_assemble (str) f = frag_var (rs_machine_dependent, 4, 2, 2, fixups[0].exp.X_add_symbol, fixups[0].exp.X_add_number, - (char *)fixups[0].opindex); + (char *) fixups[0].opindex); md_number_to_chars (f, insn, insn_size); md_number_to_chars (f + 2, 0, 2); } @@ -2130,12 +2174,13 @@ md_assemble (str) f = frag_var (rs_machine_dependent, 6, 4, 0, fixups[0].exp.X_add_symbol, fixups[0].exp.X_add_number, - (char *)fixups[0].opindex); + (char *) fixups[0].opindex); md_number_to_chars (f, insn, insn_size); md_number_to_chars (f + 2, 0, 4); } + total_insn_size = insn_size; } - else + else { /* Four byte insns have an opcode with the two high bits on. */ if ((insn & 0x0600) == 0x0600) @@ -2143,18 +2188,20 @@ md_assemble (str) else insn_size = 2; - /* Special case: 32 bit MOV */ + /* Special case: 32 bit MOV. */ if ((insn & 0xffe0) == 0x0620) insn_size = 2; - + f = frag_more (insn_size); - + total_insn_size = insn_size; + md_number_to_chars (f, insn, insn_size); if (extra_data_after_insn) { f = frag_more (extra_data_len); - + total_insn_size += extra_data_len; + md_number_to_chars (f, extra_data, extra_data_len); extra_data_after_insn = false; @@ -2166,43 +2213,41 @@ md_assemble (str) BFD_RELOC_UNUSED plus the operand index. This lets us easily handle fixups for any operand type, although that is admittedly not a very exciting feature. We pick a BFD reloc type in - md_apply_fix. */ + md_apply_fix. */ for (i = 0; i < fc; i++) { - const struct v850_operand * operand; - bfd_reloc_code_real_type reloc; - - operand = & v850_operands[ fixups[i].opindex ]; + const struct v850_operand *operand; + bfd_reloc_code_real_type reloc; + + operand = &v850_operands[fixups[i].opindex]; reloc = fixups[i].reloc; - + if (reloc != BFD_RELOC_UNUSED) { - reloc_howto_type * reloc_howto = bfd_reloc_type_lookup (stdoutput, - reloc); - int size; - int address; - fixS * fixP; + reloc_howto_type *reloc_howto = + bfd_reloc_type_lookup (stdoutput, reloc); + int size; + int address; + fixS *fixP; if (!reloc_howto) - abort(); - + abort (); + size = bfd_get_reloc_size (reloc_howto); /* XXX This will abort on an R_V850_8 reloc - - is this reloc actually used ? */ - if (size != 2 && size != 4) + is this reloc actually used? */ + if (size != 2 && size != 4) abort (); address = (f - frag_now->fr_literal) + insn_size - size; if (reloc == BFD_RELOC_32) - { - address += 2; - } - + address += 2; + fixP = fix_new_exp (frag_now, address, size, - & fixups[i].exp, + &fixups[i].exp, reloc_howto->pc_relative, reloc); @@ -2213,67 +2258,69 @@ md_assemble (str) case BFD_RELOC_HI16_S: fixP->fx_no_overflow = 1; break; + default: + break; } } else { - fix_new_exp ( - frag_now, + fix_new_exp (frag_now, f - frag_now->fr_literal, 4, & fixups[i].exp, - 1 /* FIXME: V850_OPERAND_RELATIVE ??? */, + 1 /* FIXME: V850_OPERAND_RELATIVE ??? */, (bfd_reloc_code_real_type) (fixups[i].opindex - + (int) BFD_RELOC_UNUSED) - ); + + (int) BFD_RELOC_UNUSED)); } } input_line_pointer = saved_input_line_pointer; + + dwarf2_emit_insn (total_insn_size); } +/* If while processing a fixup, a reloc really needs to be created + then it is done here. */ -/* If while processing a fixup, a reloc really needs to be created */ -/* then it is done here. */ - arelent * tc_gen_reloc (seg, fixp) - asection * seg; - fixS * fixp; + asection *seg ATTRIBUTE_UNUSED; + fixS *fixp; { - arelent * reloc; - - reloc = (arelent *) xmalloc (sizeof (arelent)); - reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); - *reloc->sym_ptr_ptr= symbol_get_bfdsym (fixp->fx_addsy); - reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; - reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); + arelent *reloc; + + reloc = (arelent *) xmalloc (sizeof (arelent)); + reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); + *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); + reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; + reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); if (reloc->howto == (reloc_howto_type *) NULL) { as_bad_where (fixp->fx_file, fixp->fx_line, - /* xgettext:c-format */ - _("reloc %d not supported by object file format"), + /* xgettext:c-format */ + _("reloc %d not supported by object file format"), (int) fixp->fx_r_type); xfree (reloc); - + return NULL; } - - if ( fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY + + if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY || fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT) reloc->addend = fixp->fx_offset; else reloc->addend = fixp->fx_addnumber; - + return reloc; } /* Assume everything will fit in two bytes, then expand as necessary. */ + int md_estimate_size_before_relax (fragp, seg) - fragS * fragp; - asection * seg; + fragS *fragp; + asection *seg ATTRIBUTE_UNUSED; { if (fragp->fr_subtype == 0) fragp->fr_var = 4; @@ -2282,12 +2329,12 @@ md_estimate_size_before_relax (fragp, seg) else abort (); return 2; -} +} long v850_pcrel_from_section (fixp, section) - fixS * fixp; - segT section; + fixS *fixp; + segT section; { /* If the symbol is undefined, or in a section other than our own, or it is weak (in which case it may well be in another section, @@ -2297,20 +2344,20 @@ v850_pcrel_from_section (fixp, section) || S_IS_WEAK (fixp->fx_addsy) || (S_GET_SEGMENT (fixp->fx_addsy) != section))) return 0; - + return fixp->fx_frag->fr_address + fixp->fx_where; } int md_apply_fix3 (fixp, valuep, seg) - fixS * fixp; - valueT * valuep; - segT seg; + fixS *fixp; + valueT *valuep; + segT seg ATTRIBUTE_UNUSED; { valueT value; - char * where; + char *where; - if ( fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT + if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) { fixp->fx_done = 0; @@ -2319,11 +2366,11 @@ md_apply_fix3 (fixp, valuep, seg) if (fixp->fx_addsy == (symbolS *) NULL) { - value = * valuep; + value = *valuep; fixp->fx_done = 1; } else if (fixp->fx_pcrel) - value = * valuep; + value = *valuep; else { value = fixp->fx_offset; @@ -2342,12 +2389,12 @@ md_apply_fix3 (fixp, valuep, seg) if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) { - int opindex; - const struct v850_operand * operand; - unsigned long insn; + int opindex; + const struct v850_operand *operand; + unsigned long insn; opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; - operand = & v850_operands[ opindex ]; + operand = &v850_operands[opindex]; /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. @@ -2363,12 +2410,12 @@ md_apply_fix3 (fixp, valuep, seg) if (fixp->fx_done) { - /* Nothing else to do here. */ + /* Nothing else to do here. */ return 1; } - /* Determine a BFD reloc value based on the operand information. - We are only prepared to turn a few of the operands into relocs. */ + /* Determine a BFD reloc value based on the operand information. + We are only prepared to turn a few of the operands into relocs. */ if (operand->bits == 22) fixp->fx_r_type = BFD_RELOC_V850_22_PCREL; @@ -2376,10 +2423,12 @@ md_apply_fix3 (fixp, valuep, seg) fixp->fx_r_type = BFD_RELOC_V850_9_PCREL; else { - /* fprintf (stderr, "bits: %d, insn: %x\n", operand->bits, insn); */ - +#if 0 + fprintf (stderr, "bits: %d, insn: %x\n", operand->bits, insn); +#endif + as_bad_where (fixp->fx_file, fixp->fx_line, - _("unresolved expression that must be resolved")); + _("unresolved expression that must be resolved")); fixp->fx_done = 1; return 1; } @@ -2390,23 +2439,23 @@ md_apply_fix3 (fixp, valuep, seg) where = fixp->fx_frag->fr_literal + fixp->fx_where; if (fixp->fx_size == 1) - * where = value & 0xff; + *where = value & 0xff; else if (fixp->fx_size == 2) bfd_putl16 (value & 0xffff, (unsigned char *) where); else if (fixp->fx_size == 4) bfd_putl32 (value, (unsigned char *) where); } - + fixp->fx_addnumber = value; return 1; } - /* Parse a cons expression. We have to handle hi(), lo(), etc on the v850. */ + void parse_cons_expression_v850 (exp) - expressionS * exp; + expressionS *exp; { /* See if there's a reloc prefix like hi() we have to handle. */ hold_cons_reloc = v850_reloc_prefix (NULL); @@ -2418,9 +2467,10 @@ parse_cons_expression_v850 (exp) /* Create a fixup for a cons expression. If parse_cons_expression_v850 found a reloc prefix, then we use that reloc, else we choose an appropriate one based on the size of the expression. */ + void cons_fix_new_v850 (frag, where, size, exp) - fragS * frag; + fragS *frag; int where; int size; expressionS *exp; @@ -2439,44 +2489,47 @@ cons_fix_new_v850 (frag, where, size, exp) fix_new_exp (frag, where, size, exp, 0, hold_cons_reloc); else fix_new (frag, where, size, NULL, 0, 0, hold_cons_reloc); + + hold_cons_reloc = BFD_RELOC_UNUSED; } boolean v850_fix_adjustable (fixP) - fixS * fixP; + fixS *fixP; { if (fixP->fx_addsy == NULL) return 1; - - /* Prevent all adjustments to global symbols. */ + + /* Prevent all adjustments to global symbols. */ if (S_IS_EXTERN (fixP->fx_addsy)) return 0; - + + /* Similarly for weak symbols. */ if (S_IS_WEAK (fixP->fx_addsy)) return 0; - - /* Don't adjust function names */ + + /* Don't adjust function names. */ if (S_IS_FUNCTION (fixP->fx_addsy)) return 0; - /* We need the symbol name for the VTABLE entries */ - if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + /* We need the symbol name for the VTABLE entries. */ + if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; - + return 1; } - + int v850_force_relocation (fixP) - struct fix * fixP; + struct fix *fixP; { if (fixP->fx_addsy && S_IS_WEAK (fixP->fx_addsy)) return 1; - - if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + + if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 1; - + return 0; } diff --git a/contrib/binutils/gas/config/tc-v850.h b/contrib/binutils/gas/config/tc-v850.h index fad4d1c..1e597f0 100644 --- a/contrib/binutils/gas/config/tc-v850.h +++ b/contrib/binutils/gas/config/tc-v850.h @@ -1,5 +1,5 @@ /* tc-v850.h -- Header file for tc-v850.c. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #define TC_V850 @@ -39,6 +39,13 @@ #define obj_fix_adjustable(fixP) v850_fix_adjustable(fixP) #define TC_FORCE_RELOCATION(fixp) v850_force_relocation(fixp) + +#ifdef OBJ_ELF +/* This arranges for gas/write.c to not apply a relocation if + obj_fix_adjustable() says it is not adjustable. */ +#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP) +#endif + extern int v850_force_relocation PARAMS ((struct fix *)); /* Permit temporary numeric labels. */ @@ -50,7 +57,7 @@ extern int v850_force_relocation PARAMS ((struct fix *)); #define WORKING_DOT_WORD #define md_number_to_chars number_to_chars_littleendian - + /* We need to handle lo(), hi(), etc etc in .hword, .word, etc directives, so we have to parse "cons" expressions ourselves. */ #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_cons_expression_v850 (EXP) @@ -58,7 +65,6 @@ extern int v850_force_relocation PARAMS ((struct fix *)); extern const struct relax_type md_relax_table[]; #define TC_GENERIC_RELAX_TABLE md_relax_table - /* This section must be in the small data area (pointed to by GP). */ #define SHF_V850_GPREL 0x10000000 /* This section must be in the tiny data area (pointed to by EP). */ @@ -83,3 +89,5 @@ extern const struct relax_type md_relax_table[]; #define MD_PCREL_FROM_SECTION(fixP,section) v850_pcrel_from_section (fixP, section) extern long v850_pcrel_from_section (); + +#define DWARF2_LINE_MIN_INSN_LENGTH 2 diff --git a/contrib/binutils/gas/config/tc-z8k.c b/contrib/binutils/gas/config/tc-z8k.c index f89b14b3..58c85ea 100644 --- a/contrib/binutils/gas/config/tc-z8k.c +++ b/contrib/binutils/gas/config/tc-z8k.c @@ -1,5 +1,6 @@ /* tc-z8k.c -- Assemble code for the Zilog Z800n - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation. + Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 + Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -18,10 +19,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - Written By Steve Chamberlain - sac@cygnus.com - */ +/* Written By Steve Chamberlain <sac@cygnus.com>. */ + #define DEFINE_TABLE #include <stdio.h> @@ -31,25 +30,15 @@ #include "bfd.h" #include <ctype.h> -const char comment_chars[] = -{'!', 0}; -const char line_separator_chars[] = -{';', 0}; -const char line_comment_chars[] = -{'#', 0}; +const char comment_chars[] = "!"; +const char line_comment_chars[] = "#"; +const char line_separator_chars[] = ";"; extern int machine; extern int coff_flags; int segmented_mode; const int md_reloc_size; -/* This table describes all the machine specific pseudo-ops the assembler - has to support. The fields are: - pseudo-op name without dot - function to call to execute this pseudo-op - Integer arg to pass to the function - */ - void cons (); void @@ -68,8 +57,7 @@ s_unseg () coff_flags = F_Z8002; } -static -void +static void even () { frag_align (1, 0, 0); @@ -92,7 +80,6 @@ tohex (c) void sval () { - SKIP_WHITESPACE (); if (*input_line_pointer == '\'') { @@ -112,47 +99,53 @@ sval () } demand_empty_rest_of_line (); } - } -const pseudo_typeS md_pseudo_table[] = -{ - {"int", cons, 2}, - {"data.b", cons, 1}, - {"data.w", cons, 2}, - {"data.l", cons, 4}, - {"form", listing_psize, 0}, - {"heading", listing_title, 0}, - {"import", s_ignore, 0}, - {"page", listing_eject, 0}, - {"program", s_ignore, 0}, - {"z8001", s_segm, 0}, - {"z8002", s_unseg, 0}, - - - {"segm", s_segm, 0}, - {"unsegm", s_unseg, 0}, - {"unseg", s_unseg, 0}, - {"name", s_app_file, 0}, - {"global", s_globl, 0}, - {"wval", cons, 2}, - {"lval", cons, 4}, - {"bval", cons, 1}, - {"sval", sval, 0}, - {"rsect", obj_coff_section, 0}, - {"sect", obj_coff_section, 0}, - {"block", s_space, 0}, - {"even", even, 0}, - {0, 0, 0} + +/* This table describes all the machine specific pseudo-ops the assembler + has to support. The fields are: + pseudo-op name without dot + function to call to execute this pseudo-op + Integer arg to pass to the function + */ + +const pseudo_typeS md_pseudo_table[] = { + {"int" , cons , 2}, + {"data.b" , cons , 1}, + {"data.w" , cons , 2}, + {"data.l" , cons , 4}, + {"form" , listing_psize , 0}, + {"heading", listing_title , 0}, + {"import" , s_ignore , 0}, + {"page" , listing_eject , 0}, + {"program", s_ignore , 0}, + {"z8001" , s_segm , 0}, + {"z8002" , s_unseg , 0}, + + {"segm" , s_segm , 0}, + {"unsegm" , s_unseg , 0}, + {"unseg" , s_unseg , 0}, + {"name" , s_app_file , 0}, + {"global" , s_globl , 0}, + {"wval" , cons , 2}, + {"lval" , cons , 4}, + {"bval" , cons , 1}, + {"sval" , sval , 0}, + {"rsect" , obj_coff_section, 0}, + {"sect" , obj_coff_section, 0}, + {"block" , s_space , 0}, + {"even" , even , 0}, + {0 , 0 , 0} }; const char EXP_CHARS[] = "eE"; -/* Chars that mean this number is a floating point constant */ -/* As in 0f12.456 */ -/* or 0d1.2345e12 */ +/* Chars that mean this number is a floating point constant. + As in 0f12.456 + or 0d1.2345e12 */ const char FLT_CHARS[] = "rRsSfFdDxXpP"; -static struct hash_control *opcode_hash_control; /* Opcode mnemonics */ +/* Opcode mnemonics. */ +static struct hash_control *opcode_hash_control; void md_begin () @@ -165,7 +158,7 @@ md_begin () for (opcode = z8k_table; opcode->name; opcode++) { - /* Only enter unique codes into the table */ + /* Only enter unique codes into the table. */ char *src = opcode->name; if (strcmp (opcode->name, prev_name)) @@ -177,10 +170,10 @@ md_begin () prev_name = opcode->name; } - /* default to z8002 */ + /* Default to z8002. */ s_unseg (); - /* insert the pseudo ops too */ + /* Insert the pseudo ops, too. */ for (idx = 0; md_pseudo_table[idx].poc_name; idx++) { opcode_entry_type *fake_opcode; @@ -194,24 +187,27 @@ md_begin () linkrelax = 1; } -struct z8k_exp -{ +struct z8k_exp { char *e_beg; char *e_end; expressionS e_exp; }; -typedef struct z8k_op -{ - char regsize; /* 'b','w','r','q' */ - unsigned int reg; /* 0..15 */ + +typedef struct z8k_op { + /* 'b','w','r','q'. */ + char regsize; + + /* 0 .. 15. */ + unsigned int reg; int mode; - unsigned int x_reg; /* any other register associated with the mode */ - expressionS exp; /* any expression */ -} + /* Any other register associated with the mode. */ + unsigned int x_reg; -op_type; + /* Any expression. */ + expressionS exp; +} op_type; static expressionS *da_operand; static expressionS *imm_operand; @@ -223,9 +219,9 @@ int the_flags; int the_interrupt; char * -DEFUN (whatreg, (reg, src), - int *reg AND - char *src) +whatreg (reg, src) + int *reg; + char *src; { if (isdigit (src[1])) { @@ -239,28 +235,28 @@ DEFUN (whatreg, (reg, src), } } -/* - parse operands +/* Parse operands - rh0-rh7, rl0-rl7 - r0-r15 - rr0-rr14 - rq0--rq12 - WREG r0,r1,r2,r3,r4,r5,r6,r7,fp,sp - r0l,r0h,..r7l,r7h - @WREG - @WREG+ - @-WREG - #const + rh0-rh7, rl0-rl7 + r0-r15 + rr0-rr14 + rq0--rq12 + WREG r0,r1,r2,r3,r4,r5,r6,r7,fp,sp + r0l,r0h,..r7l,r7h + @WREG + @WREG+ + @-WREG + #const +*/ - */ +/* Try to parse a reg name. Return a pointer to the first character + in SRC after the reg name. */ -/* try and parse a reg name, returns number of chars consumed */ char * -DEFUN (parse_reg, (src, mode, reg), - char *src AND - int *mode AND - unsigned int *reg) +parse_reg (src, mode, reg) + char *src; + int *mode; + unsigned int *reg; { char *res = 0; char regno; @@ -268,69 +264,68 @@ DEFUN (parse_reg, (src, mode, reg), if (src[0] == 's' && src[1] == 'p') { if (segmented_mode) - { - *mode = CLASS_REG_LONG; - *reg = 14; - } + { + *mode = CLASS_REG_LONG; + *reg = 14; + } else - { - *mode = CLASS_REG_WORD; - *reg = 15; - } + { + *mode = CLASS_REG_WORD; + *reg = 15; + } return src + 2; } if (src[0] == 'r') { if (src[1] == 'r') - { - *mode = CLASS_REG_LONG; - res = whatreg (reg, src + 2); + { + *mode = CLASS_REG_LONG; + res = whatreg (reg, src + 2); regno = *reg; if (regno > 14) - as_warn (_("register rr%d, out of range."),regno); - } + as_warn (_("register rr%d, out of range."), regno); + } else if (src[1] == 'h') - { - *mode = CLASS_REG_BYTE; - res = whatreg (reg, src + 2); + { + *mode = CLASS_REG_BYTE; + res = whatreg (reg, src + 2); regno = *reg; if (regno > 7) - as_warn (_("register rh%d, out of range."),regno); - } + as_warn (_("register rh%d, out of range."), regno); + } else if (src[1] == 'l') - { - *mode = CLASS_REG_BYTE; - res = whatreg (reg, src + 2); + { + *mode = CLASS_REG_BYTE; + res = whatreg (reg, src + 2); regno = *reg; if (regno > 7) - as_warn (_("register rl%d, out of range."),regno); - *reg += 8; - } + as_warn (_("register rl%d, out of range."), regno); + *reg += 8; + } else if (src[1] == 'q') - { - *mode = CLASS_REG_QUAD; - res = whatreg (reg, src + 2); + { + *mode = CLASS_REG_QUAD; + res = whatreg (reg, src + 2); regno = *reg; if (regno > 12) - as_warn (_("register rq%d, out of range."),regno); - } + as_warn (_("register rq%d, out of range."), regno); + } else - { - *mode = CLASS_REG_WORD; - res = whatreg (reg, src + 1); + { + *mode = CLASS_REG_WORD; + res = whatreg (reg, src + 1); regno = *reg; if (regno > 15) - as_warn (_("register r%d, out of range."),regno); - } + as_warn (_("register r%d, out of range."), regno); + } } return res; - } char * -DEFUN (parse_exp, (s, op), - char *s AND - expressionS * op) +parse_exp (s, op) + char *s; + expressionS *op; { char *save = input_line_pointer; char *new; @@ -356,31 +351,27 @@ DEFUN (parse_exp, (s, op), exp(r) r(#exp) r(r) - - - */ -static -char * -DEFUN (checkfor, (ptr, what), - char *ptr AND - char what) +static char * +checkfor (ptr, what) + char *ptr; + char what; { if (*ptr == what) ptr++; else - { - as_bad (_("expected %c"), what); - } + as_bad (_("expected %c"), what); + return ptr; } -/* Make sure the mode supplied is the size of a word */ +/* Make sure the mode supplied is the size of a word. */ + static void -DEFUN (regword, (mode, string), - int mode AND - char *string) +regword (mode, string) + int mode; + char *string; { int ok; @@ -391,11 +382,12 @@ DEFUN (regword, (mode, string), } } -/* Make sure the mode supplied is the size of an address */ +/* Make sure the mode supplied is the size of an address. */ + static void -DEFUN (regaddr, (mode, string), - int mode AND - char *string) +regaddr (mode, string) + int mode; + char *string; { int ok; @@ -406,30 +398,28 @@ DEFUN (regaddr, (mode, string), } } -struct ctrl_names -{ - int value; - char *name; +struct ctrl_names { + int value; + char *name; }; -struct ctrl_names ctrl_table[] = -{ - 0x2, "fcw", - 0X3, "refresh", - 0x4, "psapseg", - 0x5, "psapoff", - 0x5, "psap", - 0x6, "nspseg", - 0x7, "nspoff", - 0x7, "nsp", - 0, 0 +struct ctrl_names ctrl_table[] = { + 0x2, "fcw", + 0X3, "refresh", + 0x4, "psapseg", + 0x5, "psapoff", + 0x5, "psap", + 0x6, "nspseg", + 0x7, "nspoff", + 0x7, "nsp", + 0 , 0 }; - + static void -DEFUN (get_ctrl_operand, (ptr, mode, dst), - char **ptr AND - struct z8k_op *mode AND - unsigned int dst) +get_ctrl_operand (ptr, mode, dst) + char **ptr; + struct z8k_op *mode; + unsigned int dst; { char *src = *ptr; int r; @@ -444,28 +434,27 @@ DEFUN (get_ctrl_operand, (ptr, mode, dst), int j; for (j = 0; ctrl_table[i].name[j]; j++) - { - if (ctrl_table[i].name[j] != src[j]) - goto fail; - } + { + if (ctrl_table[i].name[j] != src[j]) + goto fail; + } the_ctrl = ctrl_table[i].value; *ptr = src + j; return; - fail:; + fail: + ; } the_ctrl = 0; return; } -struct flag_names -{ +struct flag_names { int value; char *name; }; -struct flag_names flag_table[] = -{ +struct flag_names flag_table[] = { 0x1, "p", 0x1, "v", 0x2, "s", @@ -476,10 +465,10 @@ struct flag_names flag_table[] = }; static void -DEFUN (get_flags_operand, (ptr, mode, dst), - char **ptr AND - struct z8k_op *mode AND - unsigned int dst) +get_flags_operand (ptr, mode, dst) + char **ptr; + struct z8k_op *mode; + unsigned int dst; { char *src = *ptr; int r; @@ -493,35 +482,32 @@ DEFUN (get_flags_operand, (ptr, mode, dst), the_flags = 0; for (j = 0; j <= 9; j++) { - if (!src[j]) + if (!src[j]) goto done; - for (i = 0; flag_table[i].name; i++) - { - if (flag_table[i].name[0] == src[j]) - { - the_flags = the_flags | flag_table[i].value; - goto match; - } - } + for (i = 0; flag_table[i].name; i++) + { + if (flag_table[i].name[0] == src[j]) + { + the_flags = the_flags | flag_table[i].value; + goto match; + } + } goto done; match: - ; + ; } - done: + done: *ptr = src + j; return; } - -struct interrupt_names -{ +struct interrupt_names { int value; char *name; }; -struct interrupt_names intr_table[] = -{ +struct interrupt_names intr_table[] = { 0x1, "nvi", 0x2, "vi", 0x3, "both", @@ -530,10 +516,10 @@ struct interrupt_names intr_table[] = }; static void -DEFUN (get_interrupt_operand, (ptr, mode, dst), - char **ptr AND - struct z8k_op *mode AND - unsigned int dst) +get_interrupt_operand (ptr, mode, dst) + char **ptr; + struct z8k_op *mode; + unsigned int dst; { char *src = *ptr; int r; @@ -548,28 +534,27 @@ DEFUN (get_interrupt_operand, (ptr, mode, dst), int j; for (j = 0; intr_table[i].name[j]; j++) - { - if (intr_table[i].name[j] != src[j]) - goto fail; - } + { + if (intr_table[i].name[j] != src[j]) + goto fail; + } the_interrupt = intr_table[i].value; *ptr = src + j; return; - fail:; + fail: + ; } the_interrupt = 0x0; return; } -struct cc_names -{ +struct cc_names { int value; char *name; }; -struct cc_names table[] = -{ +struct cc_names table[] = { 0x0, "f", 0x1, "lt", 0x2, "le", @@ -592,14 +577,14 @@ struct cc_names table[] = 0xe, "nz", 0xf, "nc", 0xf, "uge", - 0, 0 + 0 , 0 }; static void -DEFUN (get_cc_operand, (ptr, mode, dst), - char **ptr AND - struct z8k_op *mode AND - unsigned int dst) +get_cc_operand (ptr, mode, dst) + char **ptr; + struct z8k_op *mode; + unsigned int dst; { char *src = *ptr; int r; @@ -621,7 +606,8 @@ DEFUN (get_cc_operand, (ptr, mode, dst), the_cc = table[i].value; *ptr = src + j; return; - fail:; + fail: + ; } the_cc = 0x8; } @@ -672,20 +658,18 @@ get_operand (ptr, mode, dst) end = parse_reg (src, &nw, &nr); if (end) { - /* Got Ra(Rb) */ + /* Got Ra(Rb). */ src = end; if (*src != ')') - { - as_bad (_("Missing ) in ra(rb)")); - } + as_bad (_("Missing ) in ra(rb)")); else - { - src++; - } + src++; regaddr (mode->mode, "ra(rb) ra"); -/* regword (mode->mode, "ra(rb) rb");*/ +#if 0 + regword (mode->mode, "ra(rb) rb"); +#endif mode->mode = CLASS_BX; mode->reg = regn; mode->x_reg = nr; @@ -693,7 +677,7 @@ get_operand (ptr, mode, dst) } else { - /* Got Ra(disp) */ + /* Got Ra(disp). */ if (*src == '#') src++; src = parse_exp (src, &(mode->exp)); @@ -712,7 +696,7 @@ get_operand (ptr, mode, dst) } else { - /* No initial reg */ + /* No initial reg. */ src = parse_exp (src, &(mode->exp)); if (*src == '(') { @@ -727,7 +711,7 @@ get_operand (ptr, mode, dst) } else { - /* Just an address */ + /* Just an address. */ mode->mode = CLASS_DA; mode->reg = 0; mode->x_reg = 0; @@ -738,15 +722,15 @@ get_operand (ptr, mode, dst) *ptr = src; } -static -char * +static char * get_operands (opcode, op_end, operand) opcode_entry_type *opcode; char *op_end; op_type *operand; { char *ptr = op_end; -char *savptr; + char *savptr; + switch (opcode->noperands) { case 0: @@ -757,21 +741,21 @@ char *savptr; case 1: ptr++; if (opcode->arg_info[0] == CLASS_CC) - { - get_cc_operand (&ptr, operand + 0, 0); - } + { + get_cc_operand (&ptr, operand + 0, 0); + } else if (opcode->arg_info[0] == CLASS_FLAGS) - { - get_flags_operand (&ptr, operand + 0, 0); - } - else if (opcode->arg_info[0] == (CLASS_IMM +(ARG_IMM2))) - { - get_interrupt_operand (&ptr, operand + 0, 0); - } + { + get_flags_operand (&ptr, operand + 0, 0); + } + else if (opcode->arg_info[0] == (CLASS_IMM + (ARG_IMM2))) + { + get_interrupt_operand (&ptr, operand + 0, 0); + } else - { - get_operand (&ptr, operand + 0, 0); - } + { + get_operand (&ptr, operand + 0, 0); + } operand[1].mode = 0; break; @@ -779,32 +763,32 @@ char *savptr; ptr++; savptr = ptr; if (opcode->arg_info[0] == CLASS_CC) - { - get_cc_operand (&ptr, operand + 0, 0); - } + { + get_cc_operand (&ptr, operand + 0, 0); + } else if (opcode->arg_info[0] == CLASS_CTRL) - { - get_ctrl_operand (&ptr, operand + 0, 0); - if (the_ctrl == 0) - { - ptr = savptr; - get_operand (&ptr, operand + 0, 0); - if (ptr == 0) - return; - if (*ptr == ',') - ptr++; - get_ctrl_operand (&ptr, operand + 1, 1); - return ptr; - } - } + { + get_ctrl_operand (&ptr, operand + 0, 0); + if (the_ctrl == 0) + { + ptr = savptr; + get_operand (&ptr, operand + 0, 0); + if (ptr == 0) + return; + if (*ptr == ',') + ptr++; + get_ctrl_operand (&ptr, operand + 1, 1); + return ptr; + } + } else - { - get_operand (&ptr, operand + 0, 0); - } + { + get_operand (&ptr, operand + 0, 0); + } if (ptr == 0) - return; + return; if (*ptr == ',') - ptr++; + ptr++; get_operand (&ptr, operand + 1, 1); break; @@ -832,6 +816,7 @@ char *savptr; ptr++; get_cc_operand (&ptr, operand + 3, 3); break; + default: abort (); } @@ -840,15 +825,13 @@ char *savptr; } /* Passed a pointer to a list of opcodes which use different - addressing modes, return the opcode which matches the opcodes - provided - */ + addressing modes. Return the opcode which matches the opcodes + provided. */ -static -opcode_entry_type * -DEFUN (get_specific, (opcode, operands), - opcode_entry_type * opcode AND - op_type * operands) +static opcode_entry_type * +get_specific (opcode, operands) + opcode_entry_type *opcode; + op_type *operands; { opcode_entry_type *this_try = opcode; @@ -869,29 +852,29 @@ DEFUN (get_specific, (opcode, operands), if ((mode & CLASS_MASK) != (this_try->arg_info[i] & CLASS_MASK)) { - /* it could be an pc rel operand, if this is a da mode and - we like disps, then insert it */ + /* It could be an pc rel operand, if this is a da mode + and we like disps, then insert it. */ if (mode == CLASS_DA && this_try->arg_info[i] == CLASS_DISP) { - /* This is the case */ + /* This is the case. */ operands[i].mode = CLASS_DISP; } else if (mode == CLASS_BA && this_try->arg_info[i]) { - /* Can't think of a way to turn what we've been given into - something that's ok */ + /* Can't think of a way to turn what we've been + given into something that's OK. */ goto fail; } else if (this_try->arg_info[i] & CLASS_PR) { if (mode == CLASS_REG_LONG && segmented_mode) { - /* ok */ + /* OK. */ } else if (mode == CLASS_REG_WORD && !segmented_mode) { - /* ok */ + /* OK. */ } else goto fail; @@ -920,7 +903,8 @@ DEFUN (get_specific, (opcode, operands), } found = 1; - fail:; + fail: + ; } if (found) return this_try; @@ -929,22 +913,24 @@ DEFUN (get_specific, (opcode, operands), } static void -DEFUN (check_operand, (operand, width, string), - struct z8k_op *operand AND - unsigned int width AND - char *string) +check_operand (operand, width, string) + struct z8k_op *operand; + unsigned int width; + char *string; { if (operand->exp.X_add_symbol == 0 && operand->exp.X_op_symbol == 0) { - /* No symbol involved, let's look at offset, it's dangerous if any of - the high bits are not 0 or ff's, find out by oring or anding with - the width and seeing if the answer is 0 or all fs*/ + /* No symbol involved, let's look at offset, it's dangerous if + any of the high bits are not 0 or ff's, find out by oring or + anding with the width and seeing if the answer is 0 or all + fs. */ if ((operand->exp.X_add_number & ~width) != 0 && (operand->exp.X_add_number | width) != (~0)) { - as_warn (_("operand %s0x%x out of range."), string, operand->exp.X_add_number); + as_warn (_("operand %s0x%x out of range."), + string, operand->exp.X_add_number); } } @@ -953,10 +939,10 @@ DEFUN (check_operand, (operand, width, string), static char buffer[20]; static void -DEFUN (newfix, (ptr, type, operand), - int ptr AND - int type AND - expressionS * operand) +newfix (ptr, type, operand) + int ptr; + int type; + expressionS *operand; { if (operand->X_add_symbol || operand->X_op_symbol @@ -972,11 +958,11 @@ DEFUN (newfix, (ptr, type, operand), } static char * -DEFUN (apply_fix, (ptr, type, operand, size), - char *ptr AND - int type AND - expressionS * operand AND - int size) +apply_fix (ptr, type, operand, size) + char *ptr; + int type; + expressionS *operand; + int size; { int n = operand->X_add_number; @@ -985,12 +971,12 @@ DEFUN (apply_fix, (ptr, type, operand, size), #if 1 switch (size) { - case 8: /* 8 nibbles == 32 bits */ + case 8: /* 8 nibbles == 32 bits */ *ptr++ = n >> 28; *ptr++ = n >> 24; *ptr++ = n >> 20; *ptr++ = n >> 16; - case 4: /* 4 niblles == 16 bits */ + case 4: /* 4 niblles == 16 bits */ *ptr++ = n >> 12; *ptr++ = n >> 8; case 2: @@ -1004,12 +990,13 @@ DEFUN (apply_fix, (ptr, type, operand, size), } -/* Now we know what sort of opcodes it is, lets build the bytes - - */ +/* Now we know what sort of opcodes it is. Let's build the bytes. */ + #define INSERT(x,y) *x++ = y>>24; *x++ = y>> 16; *x++=y>>8; *x++ =y; + static void build_bytes (this_try, operand) - opcode_entry_type * this_try; + opcode_entry_type *this_try; struct z8k_op *operand; { unsigned int i; @@ -1029,18 +1016,18 @@ build_bytes (this_try, operand) memset (buffer, 20, 0); class_ptr = this_try->byte_info; -top:; + top: for (nibble = 0; c = *class_ptr++; nibble++) { switch (c & CLASS_MASK) { default: - abort (); + case CLASS_ADDRESS: - /* Direct address, we don't cope with the SS mode right now */ + /* Direct address, we don't cope with the SS mode right now. */ if (segmented_mode) { da_operand->X_add_number |= 0x80000000; @@ -1053,23 +1040,23 @@ top:; da_operand = 0; break; case CLASS_DISP8: - /* pc rel 8 bit */ + /* pc rel 8 bit */ output_ptr = apply_fix (output_ptr, R_JR, da_operand, 2); da_operand = 0; break; case CLASS_0DISP7: - /* pc rel 7 bit */ + /* pc rel 7 bit */ *output_ptr = 0; output_ptr = apply_fix (output_ptr, R_DISP7, da_operand, 2); da_operand = 0; break; case CLASS_1DISP7: - /* pc rel 7 bit */ + /* pc rel 7 bit */ *output_ptr = 0x80; output_ptr = apply_fix (output_ptr, R_DISP7, da_operand, 2); - output_ptr[-2] = 0x8; + output_ptr[-2] = 0x8; da_operand = 0; break; @@ -1078,53 +1065,45 @@ top:; if (imm_operand) { if (imm_operand->X_add_number == 2) - { - *output_ptr |= 2; - } + *output_ptr |= 2; else if (imm_operand->X_add_number != 1) - { - as_bad (_("immediate must be 1 or 2")); - } + as_bad (_("immediate must be 1 or 2")); } else - { - as_bad (_("immediate 1 or 2 expected")); - } + as_bad (_("immediate 1 or 2 expected")); output_ptr++; break; case CLASS_CC: *output_ptr++ = the_cc; break; - case CLASS_0CCC: - *output_ptr++ = the_ctrl; - break; - case CLASS_1CCC: - *output_ptr++ = the_ctrl | 0x8; - break; - case CLASS_00II: - *output_ptr++ = (~the_interrupt & 0x3); - break; - case CLASS_01II: - *output_ptr++ = (~the_interrupt & 0x3) | 0x4; - break; - case CLASS_FLAGS: - *output_ptr++ = the_flags; - break; + case CLASS_0CCC: + *output_ptr++ = the_ctrl; + break; + case CLASS_1CCC: + *output_ptr++ = the_ctrl | 0x8; + break; + case CLASS_00II: + *output_ptr++ = (~the_interrupt & 0x3); + break; + case CLASS_01II: + *output_ptr++ = (~the_interrupt & 0x3) | 0x4; + break; + case CLASS_FLAGS: + *output_ptr++ = the_flags; + break; case CLASS_BIT: *output_ptr++ = c & 0xf; break; case CLASS_REGN0: if (reg[c & 0xf] == 0) - { - as_bad (_("can't use R0 here")); - } + as_bad (_("can't use R0 here")); + /* Fall through. */ case CLASS_REG: case CLASS_REG_BYTE: case CLASS_REG_WORD: case CLASS_REG_LONG: case CLASS_REG_QUAD: - /* Insert bit mattern of - right reg */ + /* Insert bit mattern of right reg. */ *output_ptr++ = reg[c & 0xf]; break; case CLASS_DISP: @@ -1168,8 +1147,7 @@ top:; } } - /* Copy from the nibble buffer into the frag */ - + /* Copy from the nibble buffer into the frag. */ { int length = (output_ptr - buffer) / 2; char *src = buffer; @@ -1181,19 +1159,16 @@ top:; src += 2; fragp++; } - } - } /* This is the guts of the machine-dependent assembler. STR points to a - machine dependent instruction. This funciton is supposed to emit - the frags/bytes it assembles to. - */ + machine dependent instruction. This function is supposed to emit + the frags/bytes it assembles to. */ void -DEFUN (md_assemble, (str), - char *str) +md_assemble (str) + char *str; { char *op_start; char *op_end; @@ -1205,18 +1180,15 @@ DEFUN (md_assemble, (str), char *dot = 0; char c; - /* Drop leading whitespace */ + /* Drop leading whitespace. */ while (*str == ' ') str++; - /* find the op code end */ + /* Find the op code end. */ for (op_start = op_end = str; *op_end != 0 && *op_end != ' '; op_end++) - { - } - - ; + ; if (op_end == op_start) { @@ -1226,9 +1198,7 @@ DEFUN (md_assemble, (str), *op_end = 0; - opcode = (opcode_entry_type *) hash_find (opcode_hash_control, - op_start); - + opcode = (opcode_entry_type *) hash_find (opcode_hash_control, op_start); if (opcode == NULL) { @@ -1238,7 +1208,7 @@ DEFUN (md_assemble, (str), if (opcode->opcode == 250) { - /* was really a pseudo op */ + /* Was really a pseudo op. */ pseudo_typeS *p; char oc; @@ -1246,7 +1216,6 @@ DEFUN (md_assemble, (str), char *old = input_line_pointer; *op_end = c; - input_line_pointer = op_end; oc = *old; @@ -1261,15 +1230,14 @@ DEFUN (md_assemble, (str), } else { - input_line_pointer = get_operands (opcode, op_end, - operand); + input_line_pointer = get_operands (opcode, op_end, operand); prev_opcode = opcode; opcode = get_specific (opcode, operand); if (opcode == 0) { - /* Couldn't find an opcode which matched the operands */ + /* Couldn't find an opcode which matched the operands. */ char *where = frag_more (2); where[0] = 0x0; @@ -1284,34 +1252,35 @@ DEFUN (md_assemble, (str), } void -DEFUN (tc_crawl_symbol_chain, (headers), - object_headers * headers) +tc_crawl_symbol_chain (headers) + object_headers *headers; { printf (_("call to tc_crawl_symbol_chain \n")); } symbolS * -DEFUN (md_undefined_symbol, (name), - char *name) +md_undefined_symbol (name) + char *name; { return 0; } void -DEFUN (tc_headers_hook, (headers), - object_headers * headers) +tc_headers_hook (headers) + object_headers *headers; { printf (_("call to tc_headers_hook \n")); } -/* Various routines to kill one day */ -/* Equal to MAX_PRECISION in atof-ieee.c */ +/* Various routines to kill one day. */ +/* Equal to MAX_PRECISION in atof-ieee.c. */ #define MAX_LITTLENUMS 6 -/* Turn a string in input_line_pointer into a floating point constant of type - type, and store the appropriate bytes in *litP. The number of LITTLENUMS - emitted is stored in *sizeP . An error message is returned, or NULL on OK. - */ +/* Turn a string in input_line_pointer into a floating point constant + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is + returned, or NULL on OK. */ + char * md_atof (type, litP, sizeP) char type; @@ -1368,10 +1337,12 @@ md_atof (type, litP, sizeP) } CONST char *md_shortopts = "z:"; + struct option md_longopts[] = { {NULL, no_argument, NULL, 0} }; -size_t md_longopts_size = sizeof(md_longopts); + +size_t md_longopts_size = sizeof (md_longopts); int md_parse_option (c, arg) @@ -1403,7 +1374,7 @@ void md_show_usage (stream) FILE *stream; { - fprintf(stream, _("\ + fprintf (stream, _("\ Z8K options:\n\ -z8001 generate segmented code\n\ -z8002 generate unsegmented code\n")); @@ -1427,11 +1398,12 @@ md_convert_frag (headers, seg, fragP) } valueT -DEFUN (md_section_align, (seg, size), - segT seg AND - valueT size) +md_section_align (seg, size) + segT seg; + valueT size; { - return ((size + (1 << section_alignment[(int) seg]) - 1) & (-1 << section_alignment[(int) seg])); + return ((size + (1 << section_alignment[(int) seg]) - 1) + & (-1 << section_alignment[(int) seg])); } @@ -1451,13 +1423,19 @@ md_apply_fix (fixP, val) case R_JR: *buf++ = val; - /* if (val != 0) abort();*/ +#if 0 + if (val != 0) + abort (); +#endif break; case R_DISP7: *buf++ += val; - /* if (val != 0) abort();*/ +#if 0 + if (val != 0) + abort (); +#endif break; case R_IMM8: @@ -1488,7 +1466,6 @@ md_apply_fix (fixP, val) default: abort (); - } } @@ -1501,16 +1478,17 @@ md_estimate_size_before_relax (fragP, segment_type) abort (); } -/* Put number into target byte order */ +/* Put number into target byte order. */ void -DEFUN (md_number_to_chars, (ptr, use, nbytes), - char *ptr AND - valueT use AND - int nbytes) +md_number_to_chars (ptr, use, nbytes) + char *ptr; + valueT use; + int nbytes; { number_to_chars_bigendian (ptr, use, nbytes); } + long md_pcrel_from (fixP) fixS *fixP; @@ -1533,30 +1511,31 @@ tc_reloc_mangle (fix_ptr, intr, base) { symbolS *symbol_ptr; - if (fix_ptr->fx_addsy && - fix_ptr->fx_subsy) + if (fix_ptr->fx_addsy + && fix_ptr->fx_subsy) { symbolS *add = fix_ptr->fx_addsy; symbolS *sub = fix_ptr->fx_subsy; - if (S_GET_SEGMENT(add) != S_GET_SEGMENT(sub)) + + if (S_GET_SEGMENT (add) != S_GET_SEGMENT (sub)) + as_bad (_("Can't subtract symbols in different sections %s %s"), + S_GET_NAME (add), S_GET_NAME (sub)); + else { - as_bad(_("Can't subtract symbols in different sections %s %s"), - S_GET_NAME(add), S_GET_NAME(sub)); + int diff = S_GET_VALUE (add) - S_GET_VALUE (sub); + + fix_ptr->fx_addsy = 0; + fix_ptr->fx_subsy = 0; + fix_ptr->fx_offset += diff; } - else { - int diff = S_GET_VALUE(add) - S_GET_VALUE(sub); - fix_ptr->fx_addsy = 0; - fix_ptr->fx_subsy = 0; - fix_ptr->fx_offset += diff; - } } symbol_ptr = fix_ptr->fx_addsy; /* If this relocation is attached to a symbol then it's ok - to output it */ + to output it. */ if (fix_ptr->fx_r_type == 0) { - /* cons likes to create reloc32's whatever the size of the reloc.. */ + /* cons likes to create reloc32's whatever the size of the reloc. */ switch (fix_ptr->fx_size) { case 2: @@ -1571,12 +1550,9 @@ tc_reloc_mangle (fix_ptr, intr, base) default: abort (); } - } else - { - intr->r_type = fix_ptr->fx_r_type; - } + intr->r_type = fix_ptr->fx_r_type; intr->r_vaddr = fix_ptr->fx_frag->fr_address + fix_ptr->fx_where + base; intr->r_offset = fix_ptr->fx_offset; @@ -1586,4 +1562,3 @@ tc_reloc_mangle (fix_ptr, intr, base) else intr->r_symndx = -1; } - diff --git a/contrib/binutils/gas/config/tc-z8k.h b/contrib/binutils/gas/config/tc-z8k.h index d88b656..130c01c 100644 --- a/contrib/binutils/gas/config/tc-z8k.h +++ b/contrib/binutils/gas/config/tc-z8k.h @@ -1,5 +1,6 @@ /* This file is tc-z8k.h - Copyright (C) 1987-1992, 93, 95, 97, 1998 Free Software Foundation, Inc. + Copyright (C) 1987-1992, 93, 95, 97, 98, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -18,7 +19,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #define TC_Z8K #define TARGET_BYTES_BIG_ENDIAN 1 @@ -33,7 +33,7 @@ struct internal_reloc; #endif /* This macro translates between an internal fix and an coff reloc type */ -#define TC_COFF_FIX2RTYPE(fixP) abort(); +#define TC_COFF_FIX2RTYPE(fixP) abort (); #define BFD_ARCH bfd_arch_z8k #define COFF_MAGIC 0x8000 @@ -50,5 +50,3 @@ extern void tc_reloc_mangle #define RELOC_32 1234 #define md_operand(x) - -/* end of tc-z8k.h */ diff --git a/contrib/binutils/gas/config/te-386bsd.h b/contrib/binutils/gas/config/te-386bsd.h index dbff990..0f077b5 100644 --- a/contrib/binutils/gas/config/te-386bsd.h +++ b/contrib/binutils/gas/config/te-386bsd.h @@ -1,21 +1,22 @@ /* te-386bsd.h -- 386BSD target environment declarations. Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. - + This file is part of GAS, the GNU Assembler. - + GAS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GAS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #define TE_386BSD 1 @@ -28,4 +29,4 @@ * End: */ -/* end of te-sun3.h */ +/* end of te-386bsd.h */ diff --git a/contrib/binutils/gas/config/te-aux.h b/contrib/binutils/gas/config/te-aux.h index da6fa01..38445d9 100644 --- a/contrib/binutils/gas/config/te-aux.h +++ b/contrib/binutils/gas/config/te-aux.h @@ -2,7 +2,7 @@ /* From obj-coff.h: This internal_lineno crap is to stop namespace pollution from the - bfd internal coff headerfile. */ + bfd internal coff headerfile. */ #define internal_lineno bfd_internal_lineno #include "coff/aux-coff.h" /* override bits in coff/internal.h */ #undef internal_lineno diff --git a/contrib/binutils/gas/config/te-nbsd.h b/contrib/binutils/gas/config/te-nbsd.h index cee4600..010a711 100644 --- a/contrib/binutils/gas/config/te-nbsd.h +++ b/contrib/binutils/gas/config/te-nbsd.h @@ -1,18 +1,18 @@ /* te-nbsd.h -- NetBSD target environment declarations. Copyright (C) 1987, 90, 91, 92, 94, 95, 1998 Free Software Foundation, Inc. - + This file is part of GAS, the GNU Assembler. - + GAS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GAS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA diff --git a/contrib/binutils/gas/config/te-ppcnw.h b/contrib/binutils/gas/config/te-ppcnw.h index 2ddf050..d23e38c 100644 --- a/contrib/binutils/gas/config/te-ppcnw.h +++ b/contrib/binutils/gas/config/te-ppcnw.h @@ -1,21 +1,22 @@ /* te-ppcnw.h -- Power PC running Netware environment declarations. Copyright (C) 1994 Free Software Foundation, Inc. - + This file is part of GAS, the GNU Assembler. - + GAS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GAS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* Added these, because if we don't know what we're targetting we may need an assembler version of libgcc, and that will use local @@ -26,6 +27,6 @@ /* these define interfaces */ #include "obj-format.h" -/* gcc uses escape sequences for ppc/netware */ +/* gcc uses escape sequences for ppc/netware. */ #undef NO_STRING_ESCAPES diff --git a/contrib/binutils/gas/config/te-sparcaout.h b/contrib/binutils/gas/config/te-sparcaout.h index 6310184..6c92f63 100644 --- a/contrib/binutils/gas/config/te-sparcaout.h +++ b/contrib/binutils/gas/config/te-sparcaout.h @@ -1,21 +1,22 @@ /* te-sparcaout.h -- embedded sparc-aout target environment declarations. Copyright (C) 1996 Free Software Foundation, Inc. - + This file is part of GAS, the GNU Assembler. - + GAS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GAS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #define TE_SPARCAOUT 1 #include "obj-format.h" diff --git a/contrib/binutils/gas/config/te-sysv32.h b/contrib/binutils/gas/config/te-sysv32.h index 923e6e5..c60728a 100644 --- a/contrib/binutils/gas/config/te-sysv32.h +++ b/contrib/binutils/gas/config/te-sysv32.h @@ -1,4 +1,4 @@ -/* Remove leading underscore from the gcc generated symbol names */ +/* Remove leading underscore from the gcc generated symbol names. */ #define STRIP_UNDERSCORE #include "obj-format.h" diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure index 28f69be..dbdad71 100755 --- a/contrib/binutils/gas/configure +++ b/contrib/binutils/gas/configure @@ -22,12 +22,16 @@ ac_help="$ac_help ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" ac_help="$ac_help + --with-pic try to use only PIC/non-PIC objects [default=use both]" +ac_help="$ac_help --enable-bfd-assembler use BFD back end for writing object files" ac_help="$ac_help targets alternative target configurations besides the primary" ac_help="$ac_help --enable-commonbfdlib build shared BFD/opcodes/libiberty library" ac_help="$ac_help + --enable-build-warnings Enable build-time compiler warnings if gcc is used" +ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" @@ -51,6 +55,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -165,6 +170,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -335,6 +341,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -500,12 +511,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -543,6 +558,68 @@ else ac_n= ac_c='\c' ac_t= fi +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:563: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 568 "configure" +#include "confdefs.h" + +int main() { + +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ +#endif +return __CYGWIN__; +; return 0; } +EOF +if { (eval echo configure:579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:596: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 601 "configure" +#include "confdefs.h" + +int main() { +return __MINGW32__; +; return 0; } +EOF +if { (eval echo configure:608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes ac_aux_dir= @@ -592,7 +669,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:596: checking host system type" >&5 +echo "configure:673: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -613,7 +690,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:617: checking target system type" >&5 +echo "configure:694: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -631,7 +708,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:635: checking build system type" >&5 +echo "configure:712: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -654,6 +731,49 @@ test "$host_alias" != "$target_alias" && program_prefix=${target_alias}- + echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 +echo "configure:736: checking for strerror in -lcposix" >&5 +ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcposix $LIBS" +cat > conftest.$ac_ext <<EOF +#line 744 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror(); + +int main() { +strerror() +; return 0; } +EOF +if { (eval echo configure:755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lcposix" +else + echo "$ac_t""no" 1>&6 +fi + + + + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -666,7 +786,7 @@ test "$host_alias" != "$target_alias" && # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:670: checking for a BSD compatible install" >&5 +echo "configure:790: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -719,7 +839,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:723: checking whether build environment is sane" >&5 +echo "configure:843: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -776,7 +896,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:780: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:900: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -805,7 +925,7 @@ fi PACKAGE=gas -VERSION=2.10.1 +VERSION=2.11 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -822,7 +942,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:826: checking for working aclocal" >&5 +echo "configure:946: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -835,7 +955,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:839: checking for working autoconf" >&5 +echo "configure:959: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -848,7 +968,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:852: checking for working automake" >&5 +echo "configure:972: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -861,7 +981,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:865: checking for working autoheader" >&5 +echo "configure:985: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -874,7 +994,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:878: checking for working makeinfo" >&5 +echo "configure:998: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -957,40 +1077,10 @@ else enable_fast_install=yes fi -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:964: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:994: checking for $ac_word" >&5 +echo "configure:1084: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1020,7 +1110,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1024: checking for $ac_word" >&5 +echo "configure:1114: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1071,7 +1161,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1075: checking for $ac_word" >&5 +echo "configure:1165: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1103,7 +1193,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1197: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1114,12 +1204,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1118 "configure" +#line 1208 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1145,12 +1235,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1239: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1154: checking whether we are using GNU C" >&5 +echo "configure:1244: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1159,7 +1249,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1178,7 +1268,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1182: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1272: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1221,8 +1311,14 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1225: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` +echo "configure:1315: checking for ld used by GCC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) @@ -1245,10 +1341,10 @@ echo "configure:1225: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1249: checking for GNU ld" >&5 +echo "configure:1345: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1252: checking for non-GNU ld" >&5 +echo "configure:1348: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1283,7 +1379,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1287: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1383: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1296,10 +1392,23 @@ fi fi echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 +with_gnu_ld=$ac_cv_prog_gnu_ld + +echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 +echo "configure:1400: checking for $LD option to reload object files" >&5 +if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_ld_reload_flag='-r' +fi + +echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 +reload_flag=$lt_cv_ld_reload_flag +test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1303: checking for BSD-compatible nm" >&5 +echo "configure:1412: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1310,18 +1419,20 @@ else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then + tmp_nm=$ac_dir/${ac_tool_prefix}nm + if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" + # Tru64's nm complains that /dev/null is an invalid object file + if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then + ac_cv_path_NM="$tmp_nm -B" break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" + elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$tmp_nm -p" break else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi @@ -1335,7 +1446,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1339: checking whether ln -s works" >&5 +echo "configure:1450: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1355,12 +1466,484 @@ else echo "$ac_t""no" 1>&6 fi +echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 +echo "configure:1471: checking how to recognise dependant libraries" >&5 +if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [regex]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given egrep regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case "$host_os" in +aix4*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi4*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin* | mingw* |pw32*) + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +freebsd* ) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case "$host_cpu" in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20*) + # TODO: Does this work for hpux-11 too? + lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + +irix5* | irix6*) + case "$host_os" in + irix5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case "$LD" in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; +# This must be Linux ELF. +linux-gnu*) + case "$host_cpu" in + alpha* | i*86 | powerpc* | sparc* | ia64* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : + else + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case "$host_vendor" in + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac + ;; esac +fi + +echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method + +echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +echo "configure:1614: checking for object suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1640: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# Only perform the check for file, if the check method requires it +case "$deplibs_check_method" in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 +echo "configure:1683: checking for ${ac_tool_prefix}file" >&5 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <<EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo $ac_n "checking for file""... $ac_c" 1>&6 +echo "configure:1745: checking for file" >&5 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <<EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1816: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_RANLIB"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1848: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + RANLIB=":" +fi +fi + +# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1883: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_STRIP"; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1915: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="strip" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + STRIP=":" +fi +fi + + # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" @@ -1379,13 +1962,24 @@ fi test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi + +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" + # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$lt_target" in +case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1388 "configure"' > conftest.$ac_ext - if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1982 "configure"' > conftest.$ac_ext + if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1406,19 +2000,27 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1410: checking whether the C compiler needs -belf" >&5 +echo "configure:2004: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF -#line 1415 "configure" + + ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + cat > conftest.$ac_ext <<EOF +#line 2017 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1428,6 +2030,13 @@ else lt_cv_cc_needs_belf=no fi rm -f conftest* + ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + fi echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 @@ -1491,12 +2100,14 @@ rm -f confcache # Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ +AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ +objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ +deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig @@ -1510,7 +2121,7 @@ fi # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -1520,6 +2131,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' exec 5>>./config.log + + + + + + user_bfd_gas= # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given. if test "${enable_bfd_assembler+set}" = set; then @@ -1552,6 +2169,29 @@ fi using_cgen=no +build_warnings="-W -Wall" +# Check whether --enable-build-warnings or --disable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then + enableval="$enable_build_warnings" + case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi +fi +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi + + # Generate a header file @@ -1619,10 +2259,14 @@ for this_target in $target $canon_targets ; do armb*) cpu_type=arm endian=little ;; armv*l) cpu_type=arm endian=little ;; armv*b) cpu_type=arm endian=big ;; + xscale*) cpu_type=arm endian=little ;; strongarm*) cpu_type=arm endian=little ;; thumb*) cpu_type=arm endian=little ;; hppa*) cpu_type=hppa ;; - i[456]86) cpu_type=i386 ;; + i[3456]86) cpu_type=i386 arch=i386;; + x86_64) cpu_type=i386 arch=x86_64;; + ia64) cpu_type=ia64 ;; + m6811|m6812|m68hc12) cpu_type=m68hc11 ;; m680[012346]0) cpu_type=m68k ;; m68008) cpu_type=m68k ;; m683??) cpu_type=m68k ;; @@ -1661,6 +2305,7 @@ for this_target in $target $canon_targets ; do a29k-amd-udi) fmt=coff ;; a29k-amd-ebmon) fmt=coff ;; a29k-nyu-sym1) fmt=coff ;; + a29k-*-rtems*) fmt=coff ;; a29k-*-vxworks*) fmt=coff ;; alpha*-*-*vms*) fmt=evax ;; @@ -1669,42 +2314,57 @@ for this_target in $target $canon_targets ; do alpha*-*-osf*) fmt=ecoff ;; alpha*-*-linuxecoff*) fmt=ecoff ;; alpha*-*-linux-gnu*) fmt=elf em=linux ;; - alpha*-*-freebsd*) fmt=elf em=freebsd ;; alpha*-*-netbsd*) fmt=elf em=nbsd ;; arc-*-elf*) fmt=elf bfd_gas=yes ;; arm-*-aout) fmt=aout ;; arm-*-coff | thumb-*-coff) fmt=coff ;; + arm-*-rtems | thumb-*-rtems) fmt=elf ;; arm-*-elf | thumb-*-elf) fmt=elf ;; arm*-*-conix*) fmt=elf ;; arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; - arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; + arm*-*-linux-gnu* | arm*-*-uclinux*) + fmt=elf em=linux ;; + arm-*-netbsd*) fmt=aout em=nbsd ;; arm-*-oabi | thumb-*-oabi) fmt=elf ;; arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;; - arm-*-wince) fmt=coff em=wince-pe bfd_gas=yes;; + arm-*-wince) fmt=coff em=wince-pe ;; arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; arm-*-riscix*) fmt=aout em=riscix ;; avr-*-*) fmt=elf bfd_gas=yes ;; + cris-*-*) fmt=multi bfd_gas=yes ;; + d10v-*-*) fmt=elf bfd_gas=yes ;; d30v-*-*) fmt=elf bfd_gas=yes ;; fr30-*-*) fmt=elf bfd_gas=yes ;; + hppa-*-linux-gnu*) case ${cpu} in + hppa*64*) + fmt=elf em=hppalinux64;; + hppa*) + fmt=elf em=linux;; + esac ;; hppa-*-*elf*) fmt=elf em=hppa ;; - hppa-*-linux-gnu*) fmt=elf em=hppa ;; hppa-*-lites*) fmt=elf em=hppa ;; hppa-*-osf*) fmt=som em=hppa ;; hppa-*-rtems*) fmt=elf em=hppa ;; + hppa-*-hpux11*) case ${cpu} in + hppa*64*) + fmt=elf em=hppa64 ;; + hppa*) + fmt=som em=hppa ;; + esac ;; hppa-*-hpux*) fmt=som em=hppa ;; hppa-*-mpeix*) fmt=som em=hppa ;; hppa-*-bsd*) fmt=som em=hppa ;; hppa-*-hiux*) fmt=som em=hppa ;; + h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; i370-*-elf* | i370-*-linux*) fmt=elf ;; @@ -1719,12 +2379,12 @@ for this_target in $target $canon_targets ; do i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; i386-*-linux*coff*) fmt=coff em=linux ;; i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; + x86_64-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; i386-*-lynxos*) fmt=coff em=lynx ;; - i386-*-sysv4* | i386-*-solaris* | i386-*-elf) + i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf) fmt=elf bfd_gas=yes ;; i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12]) fmt=aout em=386bsd ;; - i386-*-freebsd*) fmt=elf bfd_gas=yes ;; i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) fmt=coff ;; i386-*-sco3.2v5*) fmt=elf @@ -1738,25 +2398,31 @@ EOF i386-*-sco3.2*) fmt=coff ;; i386-*-vsta) fmt=aout ;; i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) - fmt=coff em=go32;; - i386-*-rtemscoff*) fmt=coff ;; + fmt=coff em=go32 bfd_gas=yes + cat >> confdefs.h <<\EOF +#define STRICTCOFF 1 +EOF + + ;; i386-*-rtemself*) fmt=elf ;; - i386-*-rtems*) fmt=elf ;; + i386-*-rtems*) fmt=coff ;; i386-*-gnu*) fmt=elf ;; i386-*-mach*) fmt=aout em=mach bfd_gas=yes ;; i386-*-msdos*) fmt=aout ;; i386-*-moss*) fmt=elf ;; - i386-*-pe) fmt=coff em=pe ;; + i386-*-pe) fmt=coff em=pe bfd_gas=yes ;; i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;; i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;; i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; - i386-*-*nt*) fmt=coff em=pe ;; + i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;; i386-*-vxworks*) fmt=aout ;; + i386-*-chaos) fmt=elf ;; + i860-stardent-sysv4* | i860-stardent-elf*) + fmt=elf bfd_gas=yes endian=little + echo "configure: warning: GAS support for ${generic_target} is preliminary and a work in progress" 1>&2 ;; i960-*-bout) fmt=bout ;; i960-*-coff) fmt=coff em=ic960 ;; - i960-*-rtemscoff*) fmt=coff em=ic960 ;; - i960-*-rtemself*) fmt=elf ;; i960-*-rtems*) fmt=coff em=ic960 ;; i960-*-nindy*) fmt=bout ;; i960-*-vxworks4*) fmt=bout ;; @@ -1765,8 +2431,14 @@ EOF i960-*-vxworks*) fmt=bout ;; i960-*-elf*) fmt=elf ;; + ia64-*-elf*) fmt=elf ;; + ia64-*-linux-gnu*) fmt=elf em=linux ;; + ia64-*-hpux*) fmt=elf em=hpux ;; + m32r-*-*) fmt=elf bfd_gas=yes ;; + m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;; + m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) fmt=aout em=sun3 ;; m68k-motorola-sysv*) fmt=coff em=delta ;; @@ -1775,10 +2447,7 @@ EOF m68k-*-sysv4*) # must be before -sysv* fmt=elf em=svr4 ;; m68k-*-elf*) fmt=elf ;; - m68k-*-rtemscoff*) fmt=coff ;; - m68k-*-rtemself*) fmt=elf ;; - m68k-*-rtems*) fmt=elf ;; - m68k-*-coff | m68k-*-sysv*) + m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) fmt=coff ;; m68k-*-hpux*) fmt=hp300 em=hp300 ;; m68k-*-linux*aout*) fmt=aout em=linux ;; @@ -1812,6 +2481,7 @@ EOF mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; + mips-*-sysv4*MP*) fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) fmt=elf ;; @@ -1853,12 +2523,12 @@ EOF ppc-*-netware*) fmt=elf em=ppcnw ;; ppc-*-vxworks*) fmt=elf ;; + sh-*-linux*) fmt=elf em=linux ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff ;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes;; sh-*-rtemself*) fmt=elf ;; - sh-*-rtemscoff*) fmt=coff ;; - sh-*-rtems*) fmt=coff ;; + sh-*-rtems*) fmt=coff ;; ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; @@ -1890,9 +2560,13 @@ EOF strongarm-*-coff) fmt=coff ;; strongarm-*-elf) fmt=elf ;; + xscale-*-coff) fmt=coff ;; + xscale-*-elf) fmt=elf ;; tic30-*-*aout*) fmt=aout bfd_gas=yes ;; tic30-*-*coff*) fmt=coff bfd_gas=yes ;; + tic54x-*-* | c54x*-*-*) + fmt=coff bfd_gas=yes need_libm=yes;; tic80-*-*) fmt=coff ;; v850-*-*) fmt=elf bfd_gas=yes ;; @@ -1909,6 +2583,7 @@ EOF w65-*-*) fmt=coff ;; + *-*-freebsd*) fmt=elf bfd_gas=yes ;; *-*-aout | *-*-scout) fmt=aout ;; *-*-nindy*) @@ -1945,11 +2620,13 @@ EOF arm-*) bfd_gas=yes ;; # not yet # i386-aout) bfd_gas=preferred ;; + ia64*-*) bfd_gas=yes ;; mips-*) bfd_gas=yes ;; ns32k-*) bfd_gas=yes ;; ppc-*) bfd_gas=yes ;; sparc-*) bfd_gas=yes ;; strongarm-*) bfd_gas=yes ;; + xscale-*) bfd_gas=yes ;; *-elf) bfd_gas=yes ;; *-ecoff) bfd_gas=yes ;; *-som) bfd_gas=yes ;; @@ -2012,6 +2689,14 @@ EOF fi ;; + i386) + if test $this_target = $target ; then + cat >> confdefs.h <<EOF +#define DEFAULT_ARCH "${arch}" +EOF + + fi + ;; sparc) if test $this_target = $target ; then cat >> confdefs.h <<EOF @@ -2064,6 +2749,9 @@ EOF big) emulation="mipsbelf mipslelf mipself" ;; *) emulation="mipslelf mipsbelf mipself" ;; esac ;; + mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; + # i386-pc-pe-coff != i386-pc-coff. + i386-*-pe-coff) ;; # Uncommenting the next line will turn on support for i386 AOUT # for the default linux configuration # i386-*-linux*-elf) emulation="i386elf i386aout" ;; @@ -2071,6 +2759,10 @@ EOF i386-*-aout) emulation="i386aout" ;; i386-*-coff) emulation="i386coff" ;; i386-*-elf) emulation="i386elf" ;; + + # Always all formats. The first stated emulation becomes the default. + cris-*-*aout*) emulation="crisaout criself" ;; + cris-*-*) emulation="criself crisaout" ;; esac emulations="$emulations $emulation" @@ -2206,12 +2898,12 @@ for em in . $emulations ; do fmt=elf file=mipself ;; mipsbecoff | mipslecoff) fmt=ecoff file=mipsecoff ;; - i386aout) - fmt=aout file=i386aout ;; - i386coff) - fmt=coff file=i386coff ;; - i386elf) - fmt=elf file=i386elf ;; + *coff) + fmt=coff file=$em ;; + *aout) + fmt=aout file=$em ;; + *elf) + fmt=elf file=$em ;; esac formats="$formats $fmt" emfiles="$emfiles e-$file.o" @@ -2389,7 +3081,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2393: checking for $ac_word" >&5 +echo "configure:3085: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2419,7 +3111,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2423: checking for $ac_word" >&5 +echo "configure:3115: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2470,7 +3162,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2474: checking for $ac_word" >&5 +echo "configure:3166: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2502,7 +3194,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2506: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:3198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2513,12 +3205,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2517 "configure" +#line 3209 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2544,12 +3236,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2548: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3240: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2553: checking whether we are using GNU C" >&5 +echo "configure:3245: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2558,7 +3250,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2577,7 +3269,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2581: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3273: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2614,7 +3306,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2618: checking for $ac_word" >&5 +echo "configure:3310: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2645,7 +3337,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2649: checking how to run the C preprocessor" >&5 +echo "configure:3341: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2660,13 +3352,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2664 "configure" +#line 3356 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2677,13 +3369,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2681 "configure" +#line 3373 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2694,13 +3386,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2698 "configure" +#line 3390 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2730,7 +3422,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2734: checking for $ac_word" >&5 +echo "configure:3426: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2763,7 +3455,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex"" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2767: checking for $ac_word" >&5 +echo "configure:3459: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2797,7 +3489,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:2801: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3493: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2805,7 +3497,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 2809 "configure" +#line 3501 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2816,7 +3508,7 @@ int main() { yywrap() ; return 0; } EOF -if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2839,7 +3531,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:2843: checking lex output file root" >&5 +echo "configure:3535: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2860,7 +3552,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:2864: checking whether yytext is a pointer" >&5 +echo "configure:3556: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2872,14 +3564,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <<EOF -#line 2876 "configure" +#line 3568 "configure" #include "confdefs.h" `cat $LEX_OUTPUT_ROOT.c` int main() { ; return 0; } EOF -if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -2902,34 +3594,43 @@ fi ALL_LINGUAS= -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:2907: checking for POSIXized ISC" >&5 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$ac_t""yes" 1>&6 - ISC=yes # If later tests want to check for ISC. - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3601: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 - ISC= fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2928: checking for ANSI C header files" >&5 +echo "configure:3629: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2933 "configure" +#line 3634 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2937,7 +3638,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2954,7 +3655,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2958 "configure" +#line 3659 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2972,7 +3673,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2976 "configure" +#line 3677 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2993,7 +3694,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2997 "configure" +#line 3698 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3004,7 +3705,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3028,18 +3729,18 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3032: checking for working const" >&5 +echo "configure:3733: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3037 "configure" +#line 3738 "configure" #include "confdefs.h" int main() { /* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x = {0,0}; +typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; @@ -3082,7 +3783,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3103,21 +3804,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3107: checking for inline" >&5 +echo "configure:3808: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 3114 "configure" +#line 3815 "configure" #include "confdefs.h" int main() { -} int $ac_kw foo() { +} $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:3121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3143,12 +3844,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3147: checking for off_t" >&5 +echo "configure:3848: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3152 "configure" +#line 3853 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3176,12 +3877,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3180: checking for size_t" >&5 +echo "configure:3881: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3185 "configure" +#line 3886 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3211,19 +3912,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3215: checking for working alloca.h" >&5 +echo "configure:3916: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3220 "configure" +#line 3921 "configure" #include "confdefs.h" #include <alloca.h> int main() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3244,12 +3945,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3248: checking for alloca" >&5 +echo "configure:3949: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3253 "configure" +#line 3954 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -3277,7 +3978,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3309,12 +4010,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3313: checking whether alloca needs Cray hooks" >&5 +echo "configure:4014: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3318 "configure" +#line 4019 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -3339,12 +4040,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3343: checking for $ac_func" >&5 +echo "configure:4044: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3348 "configure" +#line 4049 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3367,7 +4068,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3394,7 +4095,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3398: checking stack direction for C alloca" >&5 +echo "configure:4099: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3402,7 +4103,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 3406 "configure" +#line 4107 "configure" #include "confdefs.h" find_stack_direction () { @@ -3421,7 +4122,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3446,17 +4147,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3450: checking for $ac_hdr" >&5 +echo "configure:4151: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3455 "configure" +#line 4156 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3485,12 +4186,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3489: checking for $ac_func" >&5 +echo "configure:4190: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3494 "configure" +#line 4195 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3513,7 +4214,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3538,7 +4239,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3542: checking for working mmap" >&5 +echo "configure:4243: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3546,7 +4247,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3550 "configure" +#line 4251 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3573,15 +4274,12 @@ else #include <sys/types.h> #include <fcntl.h> #include <sys/mman.h> -#include <stdlib.h> -#include <sys/stat.h> - -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include <unistd.h> +# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -3636,7 +4334,7 @@ main() /* * First, make a file with some known garbage in it. */ - data = (char*)malloc(pagesize); + data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) @@ -3657,7 +4355,7 @@ main() fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); - data2 = (char*)malloc(2 * pagesize); + data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); @@ -3675,7 +4373,7 @@ main() */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; - data3 = (char*)malloc(pagesize); + data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) @@ -3689,7 +4387,7 @@ main() } EOF -if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3717,17 +4415,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3721: checking for $ac_hdr" >&5 +echo "configure:4419: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3726 "configure" +#line 4424 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3757,12 +4455,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3761: checking for $ac_func" >&5 +echo "configure:4459: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3766 "configure" +#line 4464 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3785,7 +4483,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3814,12 +4512,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3818: checking for $ac_func" >&5 +echo "configure:4516: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3823 "configure" +#line 4521 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3842,7 +4540,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3876,19 +4574,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3880: checking for LC_MESSAGES" >&5 +echo "configure:4578: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3885 "configure" +#line 4583 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3909,7 +4607,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3913: checking whether NLS is requested" >&5 +echo "configure:4611: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3929,7 +4627,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3933: checking whether included gettext is requested" >&5 +echo "configure:4631: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3948,17 +4646,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3952: checking for libintl.h" >&5 +echo "configure:4650: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3957 "configure" +#line 4655 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3975,19 +4673,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3979: checking for gettext in libc" >&5 +echo "configure:4677: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3984 "configure" +#line 4682 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -4003,7 +4701,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:4007: checking for bindtextdomain in -lintl" >&5 +echo "configure:4705: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4011,7 +4709,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4015 "configure" +#line 4713 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4022,7 +4720,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:4026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4038,19 +4736,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:4042: checking for gettext in libintl" >&5 +echo "configure:4740: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4047 "configure" +#line 4745 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -4078,7 +4776,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4082: checking for $ac_word" >&5 +echo "configure:4780: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4112,12 +4810,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4116: checking for $ac_func" >&5 +echo "configure:4814: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4121 "configure" +#line 4819 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4140,7 +4838,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4167,7 +4865,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4171: checking for $ac_word" >&5 +echo "configure:4869: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4203,7 +4901,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4207: checking for $ac_word" >&5 +echo "configure:4905: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4235,7 +4933,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 4239 "configure" +#line 4937 "configure" #include "confdefs.h" int main() { @@ -4243,7 +4941,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4275,7 +4973,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4279: checking for $ac_word" >&5 +echo "configure:4977: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4309,7 +5007,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4313: checking for $ac_word" >&5 +echo "configure:5011: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4345,7 +5043,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4349: checking for $ac_word" >&5 +echo "configure:5047: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4435,7 +5133,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4439: checking for catalogs to be installed" >&5 +echo "configure:5137: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4463,17 +5161,17 @@ echo "configure:4439: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4467: checking for linux/version.h" >&5 +echo "configure:5165: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4472 "configure" +#line 5170 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4536,7 +5234,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4540: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:5238: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4558,72 +5256,10 @@ fi MAINT=$MAINTAINER_MODE_TRUE -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:4563: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 4568 "configure" -#include "confdefs.h" - -int main() { - -#ifndef __CYGWIN__ -#define __CYGWIN__ __CYGWIN32__ -#endif -return __CYGWIN__; -; return 0; } -EOF -if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:4596: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 4601 "configure" -#include "confdefs.h" - -int main() { -return __MINGW32__; -; return 0; } -EOF -if { (eval echo configure:4608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4627: checking for executable suffix" >&5 +echo "configure:5263: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4633,10 +5269,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:5273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -4658,17 +5294,17 @@ for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h e do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4662: checking for $ac_hdr" >&5 +echo "configure:5298: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4667 "configure" +#line 5303 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4698,7 +5334,7 @@ done # Put this here so that autoconf's "cross-compiling" message doesn't confuse # people who are not cross-compiling but are compiling cross-assemblers. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 -echo "configure:4702: checking whether compiling a cross-assembler" >&5 +echo "configure:5338: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -4713,19 +5349,19 @@ echo "$ac_t""$cross_gas" 1>&6 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:4717: checking for working alloca.h" >&5 +echo "configure:5353: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4722 "configure" +#line 5358 "configure" #include "confdefs.h" #include <alloca.h> int main() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -4746,12 +5382,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4750: checking for alloca" >&5 +echo "configure:5386: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4755 "configure" +#line 5391 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -4779,7 +5415,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -4811,12 +5447,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4815: checking whether alloca needs Cray hooks" >&5 +echo "configure:5451: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4820 "configure" +#line 5456 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -4841,12 +5477,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4845: checking for $ac_func" >&5 +echo "configure:5481: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4850 "configure" +#line 5486 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4869,7 +5505,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4896,7 +5532,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4900: checking stack direction for C alloca" >&5 +echo "configure:5536: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4904,7 +5540,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 4908 "configure" +#line 5544 "configure" #include "confdefs.h" find_stack_direction () { @@ -4923,7 +5559,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -4945,21 +5581,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:4949: checking for inline" >&5 +echo "configure:5585: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 4956 "configure" +#line 5592 "configure" #include "confdefs.h" int main() { -} int $ac_kw foo() { +} $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:4963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -4989,12 +5625,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4993: checking for $ac_func" >&5 +echo "configure:5629: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4998 "configure" +#line 5634 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5017,7 +5653,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5046,12 +5682,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5050: checking for $ac_func" >&5 +echo "configure:5686: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5055 "configure" +#line 5691 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5074,7 +5710,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5099,16 +5735,146 @@ fi done +# do we need the math library? +case "${need_libm}" in +yes) + LIBM= +case "$host" in +*-*-beos* | *-*-cygwin* | *-*-pw32*) + # These system don't have libm + ;; +*-ncr-sysv4.3*) + echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6 +echo "configure:5749: checking for _mwvalidcheckl in -lmw" >&5 +ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmw $LIBS" +cat > conftest.$ac_ext <<EOF +#line 5757 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _mwvalidcheckl(); + +int main() { +_mwvalidcheckl() +; return 0; } +EOF +if { (eval echo configure:5768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBM="-lmw" +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 +echo "configure:5789: checking for main in -lm" >&5 +ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <<EOF +#line 5797 "configure" +#include "confdefs.h" + +int main() { +main() +; return 0; } +EOF +if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBM="$LIBM -lm" +else + echo "$ac_t""no" 1>&6 +fi + + ;; +*) + echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 +echo "configure:5827: checking for main in -lm" >&5 +ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <<EOF +#line 5835 "configure" +#include "confdefs.h" + +int main() { +main() +; return 0; } +EOF +if { (eval echo configure:5842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBM="-lm" +else + echo "$ac_t""no" 1>&6 +fi + + ;; +esac + + + ;; +esac + # Some non-ANSI preprocessors botch requoting inside strings. That's bad # enough, but on some of those systems, the assert macro relies on requoting # working properly! echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 -echo "configure:5107: checking for working assert macro" >&5 +echo "configure:5873: checking for working assert macro" >&5 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5112 "configure" +#line 5878 "configure" #include "confdefs.h" #include <assert.h> #include <stdio.h> @@ -5124,7 +5890,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5165,12 +5931,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5169: checking whether declaration is required for strstr" >&5 +echo "configure:5935: checking whether declaration is required for strstr" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5174 "configure" +#line 5940 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5181,7 +5947,7 @@ x = (f) strstr; ; return 0; } EOF -if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_strstr=no else @@ -5202,12 +5968,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:5206: checking whether declaration is required for malloc" >&5 +echo "configure:5972: checking whether declaration is required for malloc" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5211 "configure" +#line 5977 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5218,7 +5984,7 @@ x = (f) malloc; ; return 0; } EOF -if { (eval echo configure:5222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_malloc=no else @@ -5239,12 +6005,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:5243: checking whether declaration is required for free" >&5 +echo "configure:6009: checking whether declaration is required for free" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5248 "configure" +#line 6014 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5255,7 +6021,7 @@ x = (f) free; ; return 0; } EOF -if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_free=no else @@ -5276,12 +6042,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:5280: checking whether declaration is required for sbrk" >&5 +echo "configure:6046: checking whether declaration is required for sbrk" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5285 "configure" +#line 6051 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5292,7 +6058,7 @@ x = (f) sbrk; ; return 0; } EOF -if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_sbrk=no else @@ -5313,12 +6079,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:5317: checking whether declaration is required for environ" >&5 +echo "configure:6083: checking whether declaration is required for environ" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5322 "configure" +#line 6088 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5329,7 +6095,7 @@ x = (f) environ; ; return 0; } EOF -if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_environ=no else @@ -5353,12 +6119,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:5357: checking whether declaration is required for errno" >&5 +echo "configure:6123: checking whether declaration is required for errno" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5362 "configure" +#line 6128 "configure" #include "confdefs.h" #ifdef HAVE_ERRNO_H @@ -5373,7 +6139,7 @@ x = (f) errno; ; return 0; } EOF -if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_errno=no else @@ -5554,10 +6320,14 @@ s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g -s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g s%@LN_S@%$LN_S%g +s%@OBJEXT@%$OBJEXT%g +s%@EXEEXT@%$EXEEXT%g +s%@RANLIB@%$RANLIB%g +s%@STRIP@%$STRIP%g s%@LIBTOOL@%$LIBTOOL%g +s%@WARN_CFLAGS@%$WARN_CFLAGS%g s%@GDBINIT@%$GDBINIT%g s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g s%@extra_objects@%$extra_objects%g @@ -5598,7 +6368,7 @@ s%@l@%$l%g s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g -s%@EXEEXT@%$EXEEXT%g +s%@LIBM@%$LIBM%g CEOF EOF diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in index 1707acd..62c50dd 100644 --- a/contrib/binutils/gas/configure.in +++ b/contrib/binutils/gas/configure.in @@ -9,8 +9,9 @@ AC_PREREQ(2.13) AC_INIT(as.h) AC_CANONICAL_SYSTEM +AC_ISC_POSIX -AM_INIT_AUTOMAKE(gas, 2.10.1) +AM_INIT_AUTOMAKE(gas, 2.11) AM_PROG_LIBTOOL @@ -40,6 +41,27 @@ esac])dnl using_cgen=no +build_warnings="-W -Wall" +AC_ARG_ENABLE(build-warnings, +[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], +[case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi])dnl +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi +AC_SUBST(WARN_CFLAGS) + # Generate a header file AM_CONFIG_HEADER(config.h:config.in) @@ -95,11 +117,15 @@ changequote([,])dnl armb*) cpu_type=arm endian=little ;; armv*l) cpu_type=arm endian=little ;; armv*b) cpu_type=arm endian=big ;; + xscale*) cpu_type=arm endian=little ;; strongarm*) cpu_type=arm endian=little ;; thumb*) cpu_type=arm endian=little ;; hppa*) cpu_type=hppa ;; changequote(,)dnl - i[456]86) cpu_type=i386 ;; + i[3456]86) cpu_type=i386 arch=i386;; + x86_64) cpu_type=i386 arch=x86_64;; + ia64) cpu_type=ia64 ;; + m6811|m6812|m68hc12) cpu_type=m68hc11 ;; m680[012346]0) cpu_type=m68k ;; changequote([,])dnl m68008) cpu_type=m68k ;; @@ -139,6 +165,7 @@ changequote([,])dnl a29k-amd-udi) fmt=coff ;; a29k-amd-ebmon) fmt=coff ;; a29k-nyu-sym1) fmt=coff ;; + a29k-*-rtems*) fmt=coff ;; a29k-*-vxworks*) fmt=coff ;; alpha*-*-*vms*) fmt=evax ;; @@ -147,42 +174,57 @@ changequote([,])dnl alpha*-*-osf*) fmt=ecoff ;; alpha*-*-linuxecoff*) fmt=ecoff ;; alpha*-*-linux-gnu*) fmt=elf em=linux ;; - alpha*-*-freebsd*) fmt=elf em=freebsd ;; alpha*-*-netbsd*) fmt=elf em=nbsd ;; arc-*-elf*) fmt=elf bfd_gas=yes ;; arm-*-aout) fmt=aout ;; arm-*-coff | thumb-*-coff) fmt=coff ;; + arm-*-rtems | thumb-*-rtems) fmt=elf ;; arm-*-elf | thumb-*-elf) fmt=elf ;; arm*-*-conix*) fmt=elf ;; arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; - arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; + arm*-*-linux-gnu* | arm*-*-uclinux*) + fmt=elf em=linux ;; + arm-*-netbsd*) fmt=aout em=nbsd ;; arm-*-oabi | thumb-*-oabi) fmt=elf ;; arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;; - arm-*-wince) fmt=coff em=wince-pe bfd_gas=yes;; + arm-*-wince) fmt=coff em=wince-pe ;; arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; arm-*-riscix*) fmt=aout em=riscix ;; avr-*-*) fmt=elf bfd_gas=yes ;; + cris-*-*) fmt=multi bfd_gas=yes ;; + d10v-*-*) fmt=elf bfd_gas=yes ;; d30v-*-*) fmt=elf bfd_gas=yes ;; fr30-*-*) fmt=elf bfd_gas=yes ;; + hppa-*-linux-gnu*) case ${cpu} in + hppa*64*) + fmt=elf em=hppalinux64;; + hppa*) + fmt=elf em=linux;; + esac ;; hppa-*-*elf*) fmt=elf em=hppa ;; - hppa-*-linux-gnu*) fmt=elf em=hppa ;; hppa-*-lites*) fmt=elf em=hppa ;; hppa-*-osf*) fmt=som em=hppa ;; hppa-*-rtems*) fmt=elf em=hppa ;; + hppa-*-hpux11*) case ${cpu} in + hppa*64*) + fmt=elf em=hppa64 ;; + hppa*) + fmt=som em=hppa ;; + esac ;; hppa-*-hpux*) fmt=som em=hppa ;; hppa-*-mpeix*) fmt=som em=hppa ;; hppa-*-bsd*) fmt=som em=hppa ;; hppa-*-hiux*) fmt=som em=hppa ;; + h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; i370-*-elf* | i370-*-linux*) fmt=elf ;; @@ -197,14 +239,14 @@ changequote([,])dnl i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; i386-*-linux*coff*) fmt=coff em=linux ;; i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; + x86_64-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; i386-*-lynxos*) fmt=coff em=lynx ;; - i386-*-sysv4* | i386-*-solaris* | i386-*-elf) - fmt=elf bfd_gas=yes ;; changequote(,)dnl + i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf) + fmt=elf bfd_gas=yes ;; i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12]) fmt=aout em=386bsd ;; changequote([,])dnl - i386-*-freebsd*) fmt=elf bfd_gas=yes ;; i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) fmt=coff ;; i386-*-sco3.2v5*) fmt=elf @@ -216,25 +258,28 @@ changequote([,])dnl i386-*-sco3.2*) fmt=coff ;; i386-*-vsta) fmt=aout ;; i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) - fmt=coff em=go32;; - i386-*-rtemscoff*) fmt=coff ;; + fmt=coff em=go32 bfd_gas=yes + AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) + ;; i386-*-rtemself*) fmt=elf ;; - i386-*-rtems*) fmt=elf ;; + i386-*-rtems*) fmt=coff ;; i386-*-gnu*) fmt=elf ;; i386-*-mach*) fmt=aout em=mach bfd_gas=yes ;; i386-*-msdos*) fmt=aout ;; i386-*-moss*) fmt=elf ;; - i386-*-pe) fmt=coff em=pe ;; + i386-*-pe) fmt=coff em=pe bfd_gas=yes ;; i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;; i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;; i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; - i386-*-*nt*) fmt=coff em=pe ;; + i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;; i386-*-vxworks*) fmt=aout ;; + i386-*-chaos) fmt=elf ;; + i860-stardent-sysv4* | i860-stardent-elf*) + fmt=elf bfd_gas=yes endian=little + AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) ;; i960-*-bout) fmt=bout ;; i960-*-coff) fmt=coff em=ic960 ;; - i960-*-rtemscoff*) fmt=coff em=ic960 ;; - i960-*-rtemself*) fmt=elf ;; i960-*-rtems*) fmt=coff em=ic960 ;; i960-*-nindy*) fmt=bout ;; i960-*-vxworks4*) fmt=bout ;; @@ -243,8 +288,14 @@ changequote([,])dnl i960-*-vxworks*) fmt=bout ;; i960-*-elf*) fmt=elf ;; + ia64-*-elf*) fmt=elf ;; + ia64-*-linux-gnu*) fmt=elf em=linux ;; + ia64-*-hpux*) fmt=elf em=hpux ;; + m32r-*-*) fmt=elf bfd_gas=yes ;; + m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;; + m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) fmt=aout em=sun3 ;; m68k-motorola-sysv*) fmt=coff em=delta ;; @@ -253,10 +304,7 @@ changequote([,])dnl m68k-*-sysv4*) # must be before -sysv* fmt=elf em=svr4 ;; m68k-*-elf*) fmt=elf ;; - m68k-*-rtemscoff*) fmt=coff ;; - m68k-*-rtemself*) fmt=elf ;; - m68k-*-rtems*) fmt=elf ;; - m68k-*-coff | m68k-*-sysv*) + m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) fmt=coff ;; m68k-*-hpux*) fmt=hp300 em=hp300 ;; m68k-*-linux*aout*) fmt=aout em=linux ;; @@ -290,6 +338,7 @@ changequote([,])dnl mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; + mips-*-sysv4*MP*) fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) fmt=elf ;; @@ -327,12 +376,12 @@ changequote([,])dnl ppc-*-netware*) fmt=elf em=ppcnw ;; ppc-*-vxworks*) fmt=elf ;; + sh-*-linux*) fmt=elf em=linux ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff ;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes;; sh-*-rtemself*) fmt=elf ;; - sh-*-rtemscoff*) fmt=coff ;; - sh-*-rtems*) fmt=coff ;; + sh-*-rtems*) fmt=coff ;; ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; @@ -364,9 +413,13 @@ changequote([,])dnl strongarm-*-coff) fmt=coff ;; strongarm-*-elf) fmt=elf ;; + xscale-*-coff) fmt=coff ;; + xscale-*-elf) fmt=elf ;; tic30-*-*aout*) fmt=aout bfd_gas=yes ;; tic30-*-*coff*) fmt=coff bfd_gas=yes ;; + tic54x-*-* | c54x*-*-*) + fmt=coff bfd_gas=yes need_libm=yes;; tic80-*-*) fmt=coff ;; v850-*-*) fmt=elf bfd_gas=yes ;; @@ -383,6 +436,7 @@ changequote([,])dnl w65-*-*) fmt=coff ;; + *-*-freebsd*) fmt=elf bfd_gas=yes ;; *-*-aout | *-*-scout) fmt=aout ;; *-*-nindy*) @@ -417,11 +471,13 @@ changequote([,])dnl arm-*) bfd_gas=yes ;; # not yet # i386-aout) bfd_gas=preferred ;; + ia64*-*) bfd_gas=yes ;; mips-*) bfd_gas=yes ;; ns32k-*) bfd_gas=yes ;; ppc-*) bfd_gas=yes ;; sparc-*) bfd_gas=yes ;; strongarm-*) bfd_gas=yes ;; + xscale-*) bfd_gas=yes ;; *-elf) bfd_gas=yes ;; *-ecoff) bfd_gas=yes ;; *-som) bfd_gas=yes ;; @@ -484,6 +540,11 @@ changequote([,])dnl fi ;; + i386) + if test $this_target = $target ; then + AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.]) + fi + ;; sparc) if test $this_target = $target ; then AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.]) @@ -533,6 +594,9 @@ changequote([,])dnl big) emulation="mipsbelf mipslelf mipself" ;; *) emulation="mipslelf mipsbelf mipself" ;; esac ;; + mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; + # i386-pc-pe-coff != i386-pc-coff. + i386-*-pe-coff) ;; # Uncommenting the next line will turn on support for i386 AOUT # for the default linux configuration # i386-*-linux*-elf) emulation="i386elf i386aout" ;; @@ -540,6 +604,10 @@ changequote([,])dnl i386-*-aout) emulation="i386aout" ;; i386-*-coff) emulation="i386coff" ;; i386-*-elf) emulation="i386elf" ;; + + # Always all formats. The first stated emulation becomes the default. + cris-*-*aout*) emulation="crisaout criself" ;; + cris-*-*) emulation="criself crisaout" ;; esac emulations="$emulations $emulation" @@ -654,12 +722,12 @@ for em in . $emulations ; do fmt=elf file=mipself ;; mipsbecoff | mipslecoff) fmt=ecoff file=mipsecoff ;; - i386aout) - fmt=aout file=i386aout ;; - i386coff) - fmt=coff file=i386coff ;; - i386elf) - fmt=elf file=i386elf ;; + *coff) + fmt=coff file=$em ;; + *aout) + fmt=aout file=$em ;; + *elf) + fmt=elf file=$em ;; esac formats="$formats $fmt" emfiles="$emfiles e-$file.o" @@ -787,6 +855,14 @@ AC_CHECK_FUNCS(unlink remove, break) # Some systems don't have sbrk(). AC_CHECK_FUNCS(sbrk) +# do we need the math library? +case "${need_libm}" in +yes) + AC_CHECK_LIBM + AC_SUBST(LIBM) + ;; +esac + # Some non-ANSI preprocessors botch requoting inside strings. That's bad # enough, but on some of those systems, the assert macro relies on requoting # working properly! diff --git a/contrib/binutils/gas/debug.c b/contrib/binutils/gas/debug.c index e99f23f..e9f6f09 100644 --- a/contrib/binutils/gas/debug.c +++ b/contrib/binutils/gas/debug.c @@ -62,8 +62,7 @@ dmp_frag (fp, indent) printf ("%srs_fill(%d)\n", indent, fp->fr_offset); printf ("%s", indent); var_chars (fp, fp->fr_var + fp->fr_fix); - printf ("%s\t repeated %d times,", - indent, fp->fr_offset); + printf ("%s\t repeated %d times,", indent, fp->fr_offset); printf (" fixed length if # chars == 0)\n"); break; case rs_org: diff --git a/contrib/binutils/gas/dep-in.sed b/contrib/binutils/gas/dep-in.sed index 8771f0f..fd1be2c 100644 --- a/contrib/binutils/gas/dep-in.sed +++ b/contrib/binutils/gas/dep-in.sed @@ -2,37 +2,41 @@ /\\$/N /\\$/b loop -s! ../config.h!!g -s! ../../bfd/bfd.h!!g -s! ../itbl-parse.h!!g +s! \.\./! !g s!@INCDIR@!$(INCDIR)!g s!@BFDDIR@!$(BFDDIR)!g s!@SRCDIR@/config!$(srcdir)/config!g -s!@SRCDIR@/../opcodes!$(srcdir)/../opcodes!g +s!@SRCDIR@/\.\./opcodes!$(srcdir)/../opcodes!g s!@SRCDIR@/!!g -s! config.h!!g -s! as.h!!g -s! asintl.h!!g -s! targ-env.h!!g -s! obj-format.h!!g -s! targ-cpu.h!!g -s! flonum.h!!g -s! expr.h!!g -s! write.h!!g -s! frags.h!!g -s! hash.h!!g -s! read.h!!g -s! symbols.h!!g -s! tc.h!!g -s! obj.h!!g -s! listing.h!!g -s! bignum.h!!g -s! bit_fix.h!!g -s! itbl-cpu.h!!g -s! \$(srcdir)/config/te-generic.h!!g -s! \$(INCDIR)/libiberty.h!!g -s! \$(INCDIR)/ansidecl.h!!g -s! \$(INCDIR)/fopen-same.h!!g +s! \$(INCDIR)/ansidecl\.h!!g +s! \$(INCDIR)/fopen-same\.h!!g +s! \$(srcdir)/config/te-generic\.h!!g +s! \.\./bfd/bfd\.h!!g +s! itbl-cpu\.h!!g +s! itbl-parse\.h!!g + +s! \$(INCDIR)/bin-bugs\.h!!g +s! \$(INCDIR)/libiberty\.h!!g +s! \$(INCDIR)/progress\.h!!g +s! obj-format\.h!!g +s! targ-cpu\.h!!g +s! targ-env\.h!!g +s! as\.h!!g +s! asintl\.h!!g +s! bignum\.h!!g +s! bit_fix\.h!!g +s! config\.h!!g +s! emul\.h!!g +s! expr\.h!!g +s! flonum\.h!!g +s! frags\.h!!g +s! hash\.h!!g +s! listing\.h!!g +s! obj\.h!!g +s! read\.h!!g +s! symbols\.h!!g +s! tc\.h!!g +s! write\.h!!g s/\\\n */ /g diff --git a/contrib/binutils/gas/depend.c b/contrib/binutils/gas/depend.c index f17c7c8..05a9708 100644 --- a/contrib/binutils/gas/depend.c +++ b/contrib/binutils/gas/depend.c @@ -23,8 +23,7 @@ /* The file to write to, or NULL if no dependencies being kept. */ static char *dep_file = NULL; -struct dependency -{ +struct dependency { char *file; struct dependency *next; }; @@ -40,9 +39,7 @@ static void wrap_output PARAMS ((FILE *, char *, int)); /* Number of columns allowable. */ #define MAX_COLUMNS 72 - - /* Start saving dependencies, to be written to FILENAME. If this is never called, then dependency tracking is simply skipped. */ @@ -66,7 +63,7 @@ register_dependency (filename) for (dep = dep_chain; dep != NULL; dep = dep->next) { - if (! strcmp (filename, dep->file)) + if (!strcmp (filename, dep->file)) return; } @@ -105,7 +102,7 @@ quote_string_for_make (file, src) the end of a file name; and backslashes in other contexts should not be doubled. */ char *q; - for (q = p - 1; src < q && q[-1] == '\\'; q--) + for (q = p - 1; src < q && q[-1] == '\\'; q--) { if (file) putc ('\\', file); @@ -118,7 +115,7 @@ quote_string_for_make (file, src) putc ('\\', file); i++; goto ordinary_char; - + case '$': if (file) putc (c, file); @@ -154,7 +151,11 @@ wrap_output (f, string, spacer) if (len == 0) return; - if (column && MAX_COLUMNS - 1 /*spacer*/ - 2 /*` \'*/ < column + len) + if (column + && (MAX_COLUMNS + - 1 /* spacer */ + - 2 /* ` \' */ + < column + len)) { fprintf (f, " \\\n "); column = 0; diff --git a/contrib/binutils/gas/doc/Makefile.am b/contrib/binutils/gas/doc/Makefile.am index c6eaf77..60761a4 100644 --- a/contrib/binutils/gas/doc/Makefile.am +++ b/contrib/binutils/gas/doc/Makefile.am @@ -17,6 +17,7 @@ asconfig.texi: $(CONFIG).texi CPU_DOCS = \ c-a29k.texi \ + c-arc.texi \ c-arm.texi \ c-d10v.texi \ c-h8300.texi \ @@ -24,14 +25,17 @@ CPU_DOCS = \ c-hppa.texi \ c-i370.texi \ c-i386.texi \ + c-i860.texi \ c-i960.texi \ c-m32r.texi \ + c-m68hc11.texi \ c-m68k.texi \ c-mips.texi \ c-ns32k.texi \ c-pj.texi \ c-sh.texi \ c-sparc.texi \ + c-tic54x.texi \ c-vax.texi \ c-v850.texi \ c-z8k.texi diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in index 0be6179..5f9b258 100644 --- a/contrib/binutils/gas/doc/Makefile.in +++ b/contrib/binutils/gas/doc/Makefile.in @@ -69,9 +69,13 @@ BFDLIB = @BFDLIB@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GDBINIT = @GDBINIT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ @@ -83,6 +87,7 @@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LEX = @LEX@ +LIBM = @LIBM@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAINT = @MAINT@ @@ -90,14 +95,17 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ OPCODES_LIB = @OPCODES_LIB@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ +STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ YACC = @YACC@ atof = @atof@ cgen_cpu_prefix = @cgen_cpu_prefix@ @@ -119,6 +127,7 @@ info_TEXINFOS = as.texinfo gasp.texi CPU_DOCS = \ c-a29k.texi \ + c-arc.texi \ c-arm.texi \ c-d10v.texi \ c-h8300.texi \ @@ -126,14 +135,17 @@ CPU_DOCS = \ c-hppa.texi \ c-i370.texi \ c-i386.texi \ + c-i860.texi \ c-i960.texi \ c-m32r.texi \ + c-m68hc11.texi \ c-m68k.texi \ c-mips.texi \ c-ns32k.texi \ c-pj.texi \ c-sh.texi \ c-sparc.texi \ + c-tic54x.texi \ c-vax.texi \ c-v850.texi \ c-z8k.texi @@ -163,7 +175,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/contrib/binutils/gas/doc/all.texi b/contrib/binutils/gas/doc/all.texi index d1058fb..22742b4 100644 --- a/contrib/binutils/gas/doc/all.texi +++ b/contrib/binutils/gas/doc/all.texi @@ -35,14 +35,17 @@ @set HPPA @set I370 @set I80386 +@set I860 @set I960 @set M32R +@set M68HC11 @set M680X0 @set MCORE @set MIPS @set PJ @set SH @set SPARC +@set C54X @set V850 @set VAX @set VXWORKS diff --git a/contrib/binutils/gas/doc/as.1 b/contrib/binutils/gas/doc/as.1 index 5fc517c..0e9d0ce 100644 --- a/contrib/binutils/gas/doc/as.1 +++ b/contrib/binutils/gas/doc/as.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991, 1992, 1996, 1997, 1998 Free Software Foundation +.\" Copyright (c) 1991, 1992, 1996, 1997, 1998, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH as 1 "29 March 1996" "cygnus support" "GNU Development Tools" +.TH as 1 "29 March 1996" "Free Software Foundation" "GNU Development Tools" .SH NAME GNU as \- the portable GNU assembler. @@ -290,19 +290,377 @@ Using as: The GNU Assembler\c .BR ld "(" 1 ")." .SH COPYING -Copyright (c) 1991, 1992 Free Software Foundation, Inc. +Copyright (c) 1991, 1992, 2000 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +This document is distributed under the terms of the GNU Free +Documentation License, version 1.1. That license is described in the +sources for this manual page, but it is not displayed here in order to +make this manual more consise. Copies of this license can also be +obtained from: http://www.gnu.org/copyleft/. + +\" GNU Free Documentation License +\" Version 1.1, March 2000 + +\" Copyright (C) 2000 Free Software Foundation, Inc. +\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +\" Everyone is permitted to copy and distribute verbatim +\" copies of this license document, but changing it is +\" not allowed. +\" .PP +\" 0. PREAMBLE +\" .PP +\" The purpose of this License is to make a manual, textbook, or other +\" written document "free" in the sense of freedom: to assure everyone +\" the effective freedom to copy and redistribute it, with or without +\" modifying it, either commercially or noncommercially. Secondarily, +\" this License preserves for the author and publisher a way to get +\" credit for their work, while not being considered responsible for +\" modifications made by others. +\" .PP +\" This License is a kind of "copyleft", which means that derivative +\" works of the document must themselves be free in the same sense. It +\" complements the GNU General Public License, which is a copyleft +\" license designed for free software. +\" .PP +\" We have designed this License in order to use it for manuals for free +\" software, because free software needs free documentation: a free +\" program should come with manuals providing the same freedoms that the +\" software does. But this License is not limited to software manuals; +\" it can be used for any textual work, regardless of subject matter or +\" whether it is published as a printed book. We recommend this License +\" principally for works whose purpose is instruction or reference. +\" .PP +\" 1. APPLICABILITY AND DEFINITIONS +\" .PP +\" This License applies to any manual or other work that contains a +\" notice placed by the copyright holder saying it can be distributed +\" under the terms of this License. The "Document", below, refers to any +\" such manual or work. Any member of the public is a licensee, and is +\" addressed as "you". +\" .PP +\" A "Modified Version" of the Document means any work containing the +\" Document or a portion of it, either copied verbatim, or with +\" modifications and/or translated into another language. +\" .PP +\" A "Secondary Section" is a named appendix or a front-matter section of +\" the Document that deals exclusively with the relationship of the +\" publishers or authors of the Document to the Document's overall subject +\" (or to related matters) and contains nothing that could fall directly +\" within that overall subject. (For example, if the Document is in part a +\" textbook of mathematics, a Secondary Section may not explain any +\" mathematics.) The relationship could be a matter of historical +\" connection with the subject or with related matters, or of legal, +\" commercial, philosophical, ethical or political position regarding +\" them. +\" .PP +\" The "Invariant Sections" are certain Secondary Sections whose titles +\" are designated, as being those of Invariant Sections, in the notice +\" that says that the Document is released under this License. +\" .PP +\" The "Cover Texts" are certain short passages of text that are listed, +\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that +\" the Document is released under this License. +\" .PP +\" A "Transparent" copy of the Document means a machine-readable copy, +\" represented in a format whose specification is available to the +\" general public, whose contents can be viewed and edited directly and +\" straightforwardly with generic text editors or (for images composed of +\" pixels) generic paint programs or (for drawings) some widely available +\" drawing editor, and that is suitable for input to text formatters or +\" for automatic translation to a variety of formats suitable for input +\" to text formatters. A copy made in an otherwise Transparent file +\" format whose markup has been designed to thwart or discourage +\" subsequent modification by readers is not Transparent. A copy that is +\" not "Transparent" is called "Opaque". +\" .PP +\" Examples of suitable formats for Transparent copies include plain +\" ASCII without markup, Texinfo input format, LaTeX input format, SGML +\" or XML using a publicly available DTD, and standard-conforming simple +\" HTML designed for human modification. Opaque formats include +\" PostScript, PDF, proprietary formats that can be read and edited only +\" by proprietary word processors, SGML or XML for which the DTD and/or +\" processing tools are not generally available, and the +\" machine-generated HTML produced by some word processors for output +\" purposes only. +\" .PP +\" The "Title Page" means, for a printed book, the title page itself, +\" plus such following pages as are needed to hold, legibly, the material +\" this License requires to appear in the title page. For works in +\" formats which do not have any title page as such, "Title Page" means +\" the text near the most prominent appearance of the work's title, +\" preceding the beginning of the body of the text. +\" .PP +\" 2. VERBATIM COPYING +\" .PP +\" You may copy and distribute the Document in any medium, either +\" commercially or noncommercially, provided that this License, the +\" copyright notices, and the license notice saying this License applies +\" to the Document are reproduced in all copies, and that you add no other +\" conditions whatsoever to those of this License. You may not use +\" technical measures to obstruct or control the reading or further +\" copying of the copies you make or distribute. However, you may accept +\" compensation in exchange for copies. If you distribute a large enough +\" number of copies you must also follow the conditions in section 3. +\" .PP +\" You may also lend copies, under the same conditions stated above, and +\" you may publicly display copies. +\" .PP +\" 3. COPYING IN QUANTITY +\" .PP +\" If you publish printed copies of the Document numbering more than 100, +\" and the Document's license notice requires Cover Texts, you must enclose +\" the copies in covers that carry, clearly and legibly, all these Cover +\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +\" the back cover. Both covers must also clearly and legibly identify +\" you as the publisher of these copies. The front cover must present +\" the full title with all words of the title equally prominent and +\" visible. You may add other material on the covers in addition. +\" Copying with changes limited to the covers, as long as they preserve +\" the title of the Document and satisfy these conditions, can be treated +\" as verbatim copying in other respects. +\" .PP +\" If the required texts for either cover are too voluminous to fit +\" legibly, you should put the first ones listed (as many as fit +\" reasonably) on the actual cover, and continue the rest onto adjacent +\" pages. +\" .PP +\" If you publish or distribute Opaque copies of the Document numbering +\" more than 100, you must either include a machine-readable Transparent +\" copy along with each Opaque copy, or state in or with each Opaque copy +\" a publicly-accessible computer-network location containing a complete +\" Transparent copy of the Document, free of added material, which the +\" general network-using public has access to download anonymously at no +\" charge using public-standard network protocols. If you use the latter +\" option, you must take reasonably prudent steps, when you begin +\" distribution of Opaque copies in quantity, to ensure that this +\" Transparent copy will remain thus accessible at the stated location +\" until at least one year after the last time you distribute an Opaque +\" copy (directly or through your agents or retailers) of that edition to +\" the public. +\" .PP +\" It is requested, but not required, that you contact the authors of the +\" Document well before redistributing any large number of copies, to give +\" them a chance to provide you with an updated version of the Document. +\" .PP +\" 4. MODIFICATIONS +\" .PP +\" You may copy and distribute a Modified Version of the Document under +\" the conditions of sections 2 and 3 above, provided that you release +\" the Modified Version under precisely this License, with the Modified +\" Version filling the role of the Document, thus licensing distribution +\" and modification of the Modified Version to whoever possesses a copy +\" of it. In addition, you must do these things in the Modified Version: +\" .PP +\" A. Use in the Title Page (and on the covers, if any) a title distinct +\" from that of the Document, and from those of previous versions +\" (which should, if there were any, be listed in the History section +\" of the Document). You may use the same title as a previous version +\" if the original publisher of that version gives permission. +\" .PP +\" B. List on the Title Page, as authors, one or more persons or entities +\" responsible for authorship of the modifications in the Modified +\" Version, together with at least five of the principal authors of the +\" Document (all of its principal authors, if it has less than five). +\" .PP +\" C. State on the Title page the name of the publisher of the +\" Modified Version, as the publisher. +\" .PP +\" D. Preserve all the copyright notices of the Document. +\" .PP +\" E. Add an appropriate copyright notice for your modifications +\" adjacent to the other copyright notices. +\" .PP +\" F. Include, immediately after the copyright notices, a license notice +\" giving the public permission to use the Modified Version under the +\" terms of this License, in the form shown in the Addendum below. +\" Preserve in that license notice the full lists of Invariant Sections +\" and required Cover Texts given in the Document's license notice. +\" .PP +\" H. Include an unaltered copy of this License. +\" .PP +\" I. Preserve the section entitled "History", and its title, and add to +\" it an item stating at least the title, year, new authors, and +\" publisher of the Modified Version as given on the Title Page. If +\" there is no section entitled "History" in the Document, create one +\" stating the title, year, authors, and publisher of the Document as +\" given on its Title Page, then add an item describing the Modified +\" Version as stated in the previous sentence. +\" .PP +\" J. Preserve the network location, if any, given in the Document for +\" public access to a Transparent copy of the Document, and likewise +\" the network locations given in the Document for previous versions +\" it was based on. These may be placed in the "History" section. +\" You may omit a network location for a work that was published at +\" least four years before the Document itself, or if the original +\" publisher of the version it refers to gives permission. +\" .PP +\" K. In any section entitled "Acknowledgements" or "Dedications", +\" preserve the section's title, and preserve in the section all the +\" substance and tone of each of the contributor acknowledgements +\" and/or dedications given therein. +\" .PP +\" L. Preserve all the Invariant Sections of the Document, +\" unaltered in their text and in their titles. Section numbers +\" or the equivalent are not considered part of the section titles. +\" .PP +\" M. Delete any section entitled "Endorsements". Such a section +\" may not be included in the Modified Version. +\" .PP +\" N. Do not retitle any existing section as "Endorsements" +\" or to conflict in title with any Invariant Section. +\" .PP +\" If the Modified Version includes new front-matter sections or +\" appendices that qualify as Secondary Sections and contain no material +\" copied from the Document, you may at your option designate some or all +\" of these sections as invariant. To do this, add their titles to the +\" list of Invariant Sections in the Modified Version's license notice. +\" These titles must be distinct from any other section titles. +\" .PP +\" You may add a section entitled "Endorsements", provided it contains +\" nothing but endorsements of your Modified Version by various +\" parties--for example, statements of peer review or that the text has +\" been approved by an organization as the authoritative definition of a +\" standard. +\" .PP +\" You may add a passage of up to five words as a Front-Cover Text, and a +\" passage of up to 25 words as a Back-Cover Text, to the end of the list +\" of Cover Texts in the Modified Version. Only one passage of +\" Front-Cover Text and one of Back-Cover Text may be added by (or +\" through arrangements made by) any one entity. If the Document already +\" includes a cover text for the same cover, previously added by you or +\" by arrangement made by the same entity you are acting on behalf of, +\" you may not add another; but you may replace the old one, on explicit +\" permission from the previous publisher that added the old one. +\" .PP +\" The author(s) and publisher(s) of the Document do not by this License +\" give permission to use their names for publicity for or to assert or +\" imply endorsement of any Modified Version. +\" .PP + +\" 5. COMBINING DOCUMENTS +\" .PP +\" You may combine the Document with other documents released under this +\" License, under the terms defined in section 4 above for modified +\" versions, provided that you include in the combination all of the +\" Invariant Sections of all of the original documents, unmodified, and +\" list them all as Invariant Sections of your combined work in its +\" license notice. +\" .PP +\" The combined work need only contain one copy of this License, and +\" multiple identical Invariant Sections may be replaced with a single +\" copy. If there are multiple Invariant Sections with the same name but +\" different contents, make the title of each such section unique by +\" adding at the end of it, in parentheses, the name of the original +\" author or publisher of that section if known, or else a unique number. +\" Make the same adjustment to the section titles in the list of +\" Invariant Sections in the license notice of the combined work. +\" .PP +\" In the combination, you must combine any sections entitled "History" +\" in the various original documents, forming one section entitled +\" "History"; likewise combine any sections entitled "Acknowledgements", +\" and any sections entitled "Dedications". You must delete all sections +\" entitled "Endorsements." +\" .PP + +\" 6. COLLECTIONS OF DOCUMENTS +\" .PP +\" You may make a collection consisting of the Document and other documents +\" released under this License, and replace the individual copies of this +\" License in the various documents with a single copy that is included in +\" the collection, provided that you follow the rules of this License for +\" verbatim copying of each of the documents in all other respects. +\" .PP +\" You may extract a single document from such a collection, and distribute +\" it individually under this License, provided you insert a copy of this +\" License into the extracted document, and follow this License in all +\" other respects regarding verbatim copying of that document. +\" .PP + +\" 7. AGGREGATION WITH INDEPENDENT WORKS +\" .PP +\" A compilation of the Document or its derivatives with other separate +\" and independent documents or works, in or on a volume of a storage or +\" distribution medium, does not as a whole count as a Modified Version +\" of the Document, provided no compilation copyright is claimed for the +\" compilation. Such a compilation is called an "aggregate", and this +\" License does not apply to the other self-contained works thus compiled +\" with the Document, on account of their being thus compiled, if they +\" are not themselves derivative works of the Document. +\" .PP +\" If the Cover Text requirement of section 3 is applicable to these +\" copies of the Document, then if the Document is less than one quarter +\" of the entire aggregate, the Document's Cover Texts may be placed on +\" covers that surround only the Document within the aggregate. +\" Otherwise they must appear on covers around the whole aggregate. +\" .PP + +\" 8. TRANSLATION +\" .PP +\" Translation is considered a kind of modification, so you may +\" distribute translations of the Document under the terms of section 4. +\" Replacing Invariant Sections with translations requires special +\" permission from their copyright holders, but you may include +\" translations of some or all Invariant Sections in addition to the +\" original versions of these Invariant Sections. You may include a +\" translation of this License provided that you also include the +\" original English version of this License. In case of a disagreement +\" between the translation and the original English version of this +\" License, the original English version will prevail. +\" .PP + +\" 9. TERMINATION +\" .PP +\" You may not copy, modify, sublicense, or distribute the Document except +\" as expressly provided for under this License. Any other attempt to +\" copy, modify, sublicense or distribute the Document is void, and will +\" automatically terminate your rights under this License. However, +\" parties who have received copies, or rights, from you under this +\" License will not have their licenses terminated so long as such +\" parties remain in full compliance. +\" .PP + +\" 10. FUTURE REVISIONS OF THIS LICENSE +\" .PP +\" The Free Software Foundation may publish new, revised versions +\" of the GNU Free Documentation License from time to time. Such new +\" versions will be similar in spirit to the present version, but may +\" differ in detail to address new problems or concerns. See +\" http://www.gnu.org/copyleft/. +\" .PP +\" Each version of the License is given a distinguishing version number. +\" If the Document specifies that a particular numbered version of this +\" License "or any later version" applies to it, you have the option of +\" following the terms and conditions either of that specified version or +\" of any later version that has been published (not as a draft) by the +\" Free Software Foundation. If the Document does not specify a version +\" number of this License, you may choose any version ever published (not +\" as a draft) by the Free Software Foundation. +\" .PP + +\" ADDENDUM: How to use this License for your documents +\" .PP +\" To use this License in a document you have written, include a copy of +\" the License in the document and put the following copyright and +\" license notices just after the title page: +\" .PP +\" Copyright (c) YEAR YOUR NAME. +\" Permission is granted to copy, distribute and/or +\" modify this document under the terms of the GNU +\" Free Documentation License, Version 1.1 or any later +\" version published by the Free Software Foundation; +\" with the Invariant Sections being LIST THEIR TITLES, +\" with the Front-Cover Texts being LIST, and with the +\" Back-Cover Texts being LIST. A copy of the license +\" is included in the section entitled "GNU Free +\" Documentation License". +\" .PP +\" If you have no Invariant Sections, write "with no Invariant Sections" +\" instead of saying which ones are invariant. If you have no +\" Front-Cover Texts, write "no Front-Cover Texts" instead of +\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. +\" .PP +\" If your document contains nontrivial examples of program code, we +\" recommend releasing these examples in parallel under your choice of +\" free software license, such as the GNU General Public License, +\" to permit their use in free software. diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo index 4ceb104..fb80ca5 100644 --- a/contrib/binutils/gas/doc/as.texinfo +++ b/contrib/binutils/gas/doc/as.texinfo @@ -1,5 +1,5 @@ \input texinfo @c -*-Texinfo-*- -@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000 +@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000, 2001 @c Free Software Foundation, Inc. @c UPDATE!! On future updates-- @c (1) check for new machine-dep cmdline options in @@ -87,11 +87,14 @@ END-INFO-DIR-ENTRY @ifinfo This file documents the GNU Assembler "@value{AS}". -Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with no Invariant Sections, with no Front-Cover Texts, and with no + Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". @ignore Permission is granted to process this file through Tex and print the @@ -100,13 +103,6 @@ notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore -Permission is granted to copy and distribute modified versions of this manual -under the conditions for verbatim copying, provided that the entire resulting -derived work is distributed under the terms of a permission notice identical to -this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end ifinfo @titlepage @@ -142,19 +138,15 @@ done. @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. +Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. -Permission is granted to copy and distribute modified versions of this manual -under the conditions for verbatim copying, provided that the entire resulting -derived work is distributed under the terms of a permission notice identical to -this one. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with no Invariant Sections, with no Front-Cover Texts, and with no + Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end titlepage @ifinfo @@ -167,6 +159,11 @@ This file is a user guide to the @sc{gnu} assembler @code{@value{AS}} version This version of the file describes @code{@value{AS}} configured to generate code for @value{TARGET} architectures. @end ifclear + +This document is distributed under the terms of the GNU Free +Documentation License. A copy of the license is included in the +section entitled "GNU Free Documentation License". + @menu * Overview:: Overview * Invoking:: Command-Line Options @@ -178,6 +175,7 @@ code for @value{TARGET} architectures. * Machine Dependencies:: Machine Dependent Features * Reporting Bugs:: Reporting Bugs * Acknowledgements:: Who Did What +* GNU Free Documentation License:: GNU Free Documentation License * Index:: Index @end menu @end ifinfo @@ -205,12 +203,13 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, [ -f ] [ --gstabs ] [ --gdwarf2 ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ] [ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ] [ -version ] [ --version ] [ -W ] [ --warn ] [ --fatal-warnings ] - [ -w ] [ -x ] [ -Z ] + [ -w ] [ -x ] [ -Z ] [ --target-help ] @ifset A29K @c am29k has no machine-dependent assembler options @end ifset @ifset ARC - [ -mbig-endian | -mlittle-endian ] + [ -marc[5|6|7|8] ] + [ -EB | -EL ] @end ifset @ifset ARM [ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]60 | @@ -219,7 +218,7 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, -m[arm]810 | -m[arm]9 | -m[arm]920 | -m[arm]920t | -m[arm]9tdmi | -mstrongarm | -mstrongarm110 | -mstrongarm1100 ] [ -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t | - -m[arm]v5 | -[arm]v5t ] + -m[arm]v5 | -[arm]v5t | -[arm]v5te ] [ -mthumb | -mall ] [ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ] [ -EB | -EL ] @@ -249,6 +248,10 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, -Av8plus | -Av8plusa | -Av9 | -Av9a ] [ -xarch=v8plus | -xarch=v8plusa ] [ -bump ] [ -32 | -64 ] @end ifset +@ifset TIC54X + [ -mcpu=54[123589] | -mcpu=54[56]lp ] [ -mfar-mode | -mf ] + [ -merrors-to-file <filename> | -me <filename> ] +@end ifset @ifset Z8000 @c Z8000 has no machine-dependent assembler options @end ifset @@ -257,15 +260,26 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, [ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ] [ -b ] [ -no-relax ] @end ifset +@ifset M32R + [ --m32rx | --[no-]warn-explicit-parallel-conflicts | --W[n]p ] +@end ifset @ifset M680X0 [ -l ] [ -m68000 | -m68010 | -m68020 | ... ] @end ifset @ifset MCORE [ -jsri2bsr ] [ -sifilter ] [ -relax ] + [ -mcpu=[210|340] ] +@end ifset +@ifset M68HC11 + [ -m68hc11 | -m68hc12 ] + [ --force-long-branchs ] [ --short-branchs ] [ --strict-direct-mode ] + [ --print-insn-syntax ] [ --print-opcodes ] [ --generate-example ] @end ifset @ifset MIPS [ -nocpp ] [ -EL ] [ -EB ] [ -G @var{num} ] [ -mcpu=@var{CPU} ] - [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -m4650 ] [ -no-m4650 ] + [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -mips4 ] [ -mips5 ] + [ -mips32 ] [ -mips64 ] + [ -m4650 ] [ -no-m4650 ] [ --trap ] [ --break ] [ --emulation=@var{name} ] @end ifset @@ -325,11 +339,15 @@ may help debugging assembler code, if the debugger can handle it. @item --gdwarf2 Generate DWARF2 debugging information for each assembler line. This -may help debugging assembler code, if the debugger can handle it. +may help debugging assembler code, if the debugger can handle it. Note - this +option is only supported by some targets, not all of them. @item --help Print a summary of the command line options and exit. +@item --target-help +Print a summary of all target specific options and exit. + @item -I @var{dir} Add directory @var{dir} to the search list for @code{.include} directives. @@ -399,17 +417,10 @@ The following options are available when @value{AS} is configured for an ARC processor. @table @code - -@cindex ARC endianness -@cindex endianness, ARC -@cindex big endian output, ARC -@item -mbig-endian -Generate ``big endian'' format output. - -@cindex little endian output, ARC -@item -mlittle-endian -Generate ``little endian'' format output. - +@item -marc[5|6|7|8] +This option selects the core processor variant. +@item -EB | -EL +Select either big-endian (-EB) or little-endian (-EL) output. @end table @end ifset @@ -425,7 +436,7 @@ Specify which ARM architecture variant is used by the target. @item -mthumb | -mall Enable or disable Thumb only instruction decoding. @item -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu -Select which Floating Point architcture is the target. +Select which Floating Point architecture is the target. @item -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi Select which procedure calling convention is in use. @item -EB | -EL @@ -486,6 +497,26 @@ error if necessary. @end table @end ifset +@ifset M32R +The following options are available when @value{AS} is configured for the +Mitsubishi M32R series. + +@table @code + +@item --m32rx +Specify which processor in the M32R family is the target. The default +is normally the M32R, but this option changes it to the M32RX. + +@item --warn-explicit-parallel-conflicts or --Wp +Produce warning messages when questionable parallel constructs are +encountered. + +@item --no-warn-explicit-parallel-conflicts or --Wnp +Do not produce warning messages when questionable parallel constructs are +encountered. + +@end table +@end ifset @ifset M680X0 The following options are available when @value{AS} is configured for the @@ -534,6 +565,41 @@ Generate ``little endian'' format output. @end table @end ifset +@ifset M68HC11 +The following options are available when @value{AS} is configured for the +Motorola 68HC11 or 68HC12 series. + +@table @code + +@item -m68hc11 | -m68hc12 +Specify what processor is the target. The default is +defined by the configuration option when building the assembler. + +@item --force-long-branchs +Relative branches are turned into absolute ones. This concerns +conditional branches, unconditional branches and branches to a +sub routine. + +@item -S | --short-branchs +Do not turn relative branchs into absolute ones +when the offset is out of range. + +@item --strict-direct-mode +Do not turn the direct addressing mode into extended addressing mode +when the instruction does not support direct addressing mode. + +@item --print-insn-syntax +Print the syntax of instruction in case of error. + +@item --print-opcodes +print the list of instructions with syntax and then exit. + +@item --generate-example +print an example of instruction for each possible instruction and then exit. +This option is only useful for testing @code{@value{AS}}. + +@end table +@end ifset @ifset SPARC The following options are available when @code{@value{AS}} is configured @@ -559,6 +625,22 @@ Warn when the assembler switches to another architecture. @end table @end ifset +@ifset TIC54X +The following options are available when @value{AS} is configured for the 'c54x +architecture. + +@table @code +@item -mfar-mode +Enable extended addressing mode. All addresses and relocations will assume +extended addressing (usually 23 bits). +@item -mcpu=@var{CPU_VERSION} +Sets the CPU version being compiled for. +@item -merrors-to-file @var{FILENAME} +Redirect error output to a file, for broken systems which don't support such +behaviour in the shell. +@end table +@end ifset + @ifset MIPS The following options are available when @value{AS} is configured for a MIPS processor. @@ -583,10 +665,15 @@ Generate ``little endian'' format output. @item -mips1 @itemx -mips2 @itemx -mips3 +@itemx -mips4 +@itemx -mips32 Generate code for a particular MIPS Instruction Set Architecture level. @samp{-mips1} corresponds to the @sc{r2000} and @sc{r3000} processors, @samp{-mips2} to the @sc{r6000} processor, and @samp{-mips3} to the @sc{r4000} processor. +@samp{-mips5}, @samp{-mips32}, and @samp{-mips64} correspond +to generic @sc{MIPS V}, @sc{MIPS32}, and @sc{MIPS64} ISA +processors, respectively. @item -m4650 @itemx -no-m4650 @@ -596,8 +683,9 @@ instructions around accesses to the @samp{HI} and @samp{LO} registers. @samp{-no-m4650} turns off this option. @item -mcpu=@var{CPU} -Generate code for a particular MIPS cpu. This has little effect on the -assembler, but it is passed by @code{@value{GCC}}. +Generate code for a particular MIPS cpu. It is exactly equivalent to +@samp{-m@var{cpu}}, except that there are more value of @var{cpu} +understood. @cindex emulation @item --emulation=@var{name} @@ -654,11 +742,20 @@ The command line option @samp{-nojsri2bsr} can be used to disable it. @item -sifilter @itemx -nosifilter Enable or disable the silicon filter behaviour. By default this is disabled. -The default can be overidden by the @samp{-sifilter} command line option. +The default can be overridden by the @samp{-sifilter} command line option. @item -relax Alter jump instructions for long displacements. +@item -mcpu=[210|340] +Select the cpu type on the target hardware. This controls which instructions +can be assembled. + +@item -EB +Assemble for a big endian target. + +@item -EL +Assemble for a little endian target. @end table @end ifset @@ -933,7 +1030,7 @@ information for the debugger. @node Errors @section Error and Warning Messages -@cindex error messsages +@cindex error messages @cindex warning messages @cindex messages from assembler @code{@value{AS}} may write warnings and error messages to the standard error @@ -1564,6 +1661,9 @@ is considered a comment and is ignored. The line comment character is @ifset HPPA @samp{;} for the HPPA; @end ifset +@ifset I80386 +@samp{#} on the i386 and x86-64; +@end ifset @ifset I960 @samp{#} on the i960; @end ifset @@ -1582,6 +1682,9 @@ is considered a comment and is ignored. The line comment character is @ifset M680X0 @samp{|} on the 680x0; @end ifset +@ifset M68HC11 +@samp{#} on the 68HC11 and 68HC12; +@end ifset @ifset VAX @samp{#} on the Vax; @end ifset @@ -1592,7 +1695,7 @@ is considered a comment and is ignored. The line comment character is @samp{#} on the V850; @end ifset see @ref{Machine Dependencies}. @refill -@c FIXME What about i386, m88k, i860? +@c FIXME What about m88k, i860? @ifset GENERIC On some machines there are two different line comment characters. One @@ -2297,7 +2400,7 @@ in the data section. @cindex bss section @item bss section This section contains zeroed bytes when your program begins running. It -is used to hold unitialized variables or common storage. The length of +is used to hold uninitialized variables or common storage. The length of each partial program's bss section is important, but because it starts out containing zeroed bytes there is no need to store explicit zero bytes in the object file. The bss section was invented to eliminate @@ -3128,11 +3231,19 @@ Some machine configurations provide additional directives. * Float:: @code{.float @var{flonums}} * Func:: @code{.func} * Global:: @code{.global @var{symbol}}, @code{.globl @var{symbol}} +@ifset ELF +* Hidden:: @code{.hidden @var{names}} +@end ifset + * hword:: @code{.hword @var{expressions}} * Ident:: @code{.ident} * If:: @code{.if @var{absolute expression}} * Include:: @code{.include "@var{file}"} * Int:: @code{.int @var{expressions}} +@ifset ELF +* Internal:: @code{.internal @var{names}} +@end ifset + * Irp:: @code{.irp @var{symbol},@var{values}}@dots{} * Irpc:: @code{.irpc @var{symbol},@var{values}}@dots{} * Lcomm:: @code{.lcomm @var{symbol} , @var{length}} @@ -3151,14 +3262,26 @@ Some machine configurations provide additional directives. * Macro:: @code{.macro @var{name} @var{args}}@dots{} * MRI:: @code{.mri @var{val}} - * Nolist:: @code{.nolist} * Octa:: @code{.octa @var{bignums}} * Org:: @code{.org @var{new-lc} , @var{fill}} * P2align:: @code{.p2align @var{abs-expr} , @var{abs-expr}} +@ifset ELF +* PopSection:: @code{.popsection} +* Previous:: @code{.previous} +@end ifset + * Print:: @code{.print @var{string}} +@ifset ELF +* Protected:: @code{.protected @var{names}} +@end ifset + * Psize:: @code{.psize @var{lines}, @var{columns}} * Purgem:: @code{.purgem @var{name}} +@ifset ELF +* PushSection:: @code{.pushsection @var{name}} +@end ifset + * Quad:: @code{.quad @var{bignums}} * Rept:: @code{.rept @var{count}} * Sbttl:: @code{.sbttl "@var{subheading}"} @@ -3170,10 +3293,7 @@ Some machine configurations provide additional directives. * Set:: @code{.set @var{symbol}, @var{expression}} * Short:: @code{.short @var{expressions}} * Single:: @code{.single @var{flonums}} -@ifset COFF -* Size:: @code{.size} -@end ifset - +* Size:: @code{.size [@var{name} , @var{expression}]} * Skip:: @code{.skip @var{size} , @var{fill}} * Sleb128:: @code{.sleb128 @var{expressions}} * Space:: @code{.space @var{size} , @var{fill}} @@ -3184,23 +3304,29 @@ Some machine configurations provide additional directives. * String:: @code{.string "@var{str}"} * Struct:: @code{.struct @var{expression}} @ifset ELF +* SubSection:: @code{.subsection} * Symver:: @code{.symver @var{name},@var{name2@@nodename}} @end ifset + @ifset COFF * Tag:: @code{.tag @var{structname}} @end ifset * Text:: @code{.text @var{subsection}} * Title:: @code{.title "@var{heading}"} +* Type:: @code{.type <@var{int} | @var{name} , @var{type description}>} +* Uleb128:: @code{.uleb128 @var{expressions}} @ifset COFF -* Type:: @code{.type @var{int}} * Val:: @code{.val @var{addr}} @end ifset + @ifset ELF -* Visibility:: @code{.internal @var{name}, .hidden @var{name}, .protected @var{name}} +* Version:: @code{.version "@var{string}"} +* VTableEntry:: @code{.vtable_entry @var{table}, @var{offset}} +* VTableInherit:: @code{.vtable_inherit @var{child}, @var{parent}} +* Weak:: @code{.weak @var{names}} @end ifset -* Uleb128:: @code{.uleb128 @var{expressions}} * Word:: @code{.word @var{expressions}} * Deprecated:: Deprecated Directives @end menu @@ -3658,6 +3784,22 @@ partial programs. You may need the HPPA-only @code{.EXPORT} directive as well. @xref{HPPA Directives,, HPPA Assembler Directives}. @end ifset +@ifset ELF +@node Hidden +@section @code{.hidden @var{names}} + +@cindex @code{.hidden} directive +@cindex Visibility +This one of the ELF visibility directives. The other two are +@code{.internal} (@pxref{Internal,,@code{.internal}}) and +@code{.protected} (@pxref{Protected,,@code{.protected}}). + +This directive overrides the named symbols default visibility (which is set by +their binding: local, global or weak). The directive sets the visibility to +@code{hidden} which means that the symbols are not visible to other components. +Such symbols are always considered to be @code{protected} as well. +@end ifset + @node hword @section @code{.hword @var{expressions}} @@ -3800,6 +3942,23 @@ integers. On the H8/300H and the Hitachi SH, however, @code{.int} emits @end ifset @end ifclear +@ifset ELF +@node Internal +@section @code{.internal @var{names}} + +@cindex @code{.internal} directive +@cindex Visibility +This one of the ELF visibility directives. The other two are +@code{.hidden} (@pxref{Hidden,,@code{.hidden}}) and +@code{.protected} (@pxref{Protected,,@code{.protected}}). + +This directive overrides the named symbols default visibility (which is set by +their binding: local, global or weak). The directive sets the visibility to +@code{internal} which means that the symbols are considered to be @code{hidden} +(ie not visible to other components), and that some extra, processor specific +processing must also be performed upon the symbols as well. +@end ifset + @node Irp @section @code{.irp @var{symbol},@var{values}}@dots{} @@ -4227,6 +4386,42 @@ filled in with the value 0x368d (the exact placement of the bytes depends upon the endianness of the processor). If it skips 1 or 3 bytes, the fill value is undefined. +@ifset ELF +@node Previous +@section @code{.previous} + +@cindex @code{.previous} directive +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}), +@code{.pushsection} (@pxref{PushSection}), and @code{.popsection} +(@pxref{PopSection}). + +This directive swaps the current section (and subsection) with most recently +referenced section (and subsection) prior to this one. Multiple +@code{.previous} directives in a row will flip between two sections (and their +subsections). + +In terms of the section stack, this directive swaps the current section with +the top section on the section stack. +@end ifset + +@ifset ELF +@node PopSection +@section @code{.popsection} + +@cindex @code{.popsection} directive +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}), +@code{.pushsection} (@pxref{PushSection}), and @code{.previous} +(@pxref{Previous}). + +This directive replaces the current section (and subsection) with the top +section (and subsection) on the section stack. This section is popped off the +stack. +@end ifset + @node Print @section @code{.print @var{string}} @@ -4234,6 +4429,23 @@ undefined. @code{@value{AS}} will print @var{string} on the standard output during assembly. You must put @var{string} in double quotes. +@ifset ELF +@node Protected +@section @code{.protected @var{names}} + +@cindex @code{.protected} directive +@cindex Visibility +This one of the ELF visibility directives. The other two are +@code{.hidden} (@pxref{Hidden}) and @code{.internal} (@pxref{Internal}). + +This directive overrides the named symbols default visibility (which is set by +their binding: local, global or weak). The directive sets the visibility to +@code{protected} which means that any references to the symbols from within the +components that defines them must be resolved to the definition in that +component, even if a definition in another component would normally preempt +this. +@end ifset + @node Psize @section @code{.psize @var{lines} , @var{columns}} @@ -4261,6 +4473,22 @@ those explicitly specified with @code{.eject}. Undefine the macro @var{name}, so that later uses of the string will not be expanded. @xref{Macro}. +@ifset ELF +@node PushSection +@section @code{.pushsection @var{name} , @var{subsection}} + +@cindex @code{.pushsection} directive +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}), +@code{.popsection} (@pxref{PopSection}), and @code{.previous} +(@pxref{Previous}). + +This directive is a synonym for @code{.section}. It pushes the current section +(and subsection) onto the top of the section stack, and then replaces the +current section and subsection with @code{name} and @code{subsection}. +@end ifset + @node Quad @section @code{.quad @var{bignums}} @@ -4338,7 +4566,7 @@ accepts this directive but ignores it. @end ifset @node Section -@section @code{.section @var{name}} +@section @code{.section @var{name}} (COFF version) @cindex @code{section} directive @cindex named section @@ -4349,9 +4577,9 @@ This directive is only supported for targets that actually support arbitrarily named sections; on @code{a.out} targets, for example, it is not accepted, even with a standard @code{a.out} section name. -@ifset COFF For COFF targets, the @code{.section} directive is used in one of the following ways: + @smallexample .section @var{name}[, "@var{flags}"] .section @var{name}[, @var{subsegment}] @@ -4382,15 +4610,28 @@ loaded and writable. If the optional argument to the @code{.section} directive is not quoted, it is taken as a subsegment number (@pxref{Sub-Sections}). -@end ifset + +@section @code{.section @var{name}} (ELF version) + +@cindex @code{section} directive +@cindex named section @ifset ELF +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.subsection} (@pxref{SubSection}), @code{.pushsection} +(@pxref{PushSection}), @code{.popsection} (@pxref{PopSection}), and +@code{.previous} (@pxref{Previous}). +@end ifset + For ELF targets, the @code{.section} directive is used like this: + @smallexample -.section @var{name}[, "@var{flags}"[, @@@var{type}]] +.section @var{name} [, "@var{flags}"[, @@@var{type}]] @end smallexample + The optional @var{flags} argument is a quoted string which may contain any -combintion of the following characters: +combination of the following characters: @table @code @item a section is allocatable @@ -4415,9 +4656,11 @@ executable. The section will contain data. For ELF targets, the assembler supports another type of @code{.section} directive for compatibility with the Solaris assembler: + @smallexample .section "@var{name}"[, @var{flags}...] @end smallexample + Note that the section name is quoted. There may be a sequence of comma separated flags: @table @code @@ -4428,7 +4671,11 @@ section is writable @item #execinstr section is executable @end table -@end ifset + +This directive replaces the current section and subsection. The replaced +section and subsection are pushed onto the section stack. See the contents of +the gas testsuite directory @code{gas/testsuite/gas/elf} for some examples of +how this directive and the other section stack directives work. @node Set @section @code{.set @var{symbol}, @var{expression}} @@ -4489,21 +4736,27 @@ numbers in @sc{ieee} format. @end ifset @end ifclear -@ifset COFF @node Size -@section @code{.size} +@section @code{.size} (COFF version) @cindex @code{size} directive This directive is generated by compilers to include auxiliary debugging information in the symbol table. It is only permitted inside @code{.def}/@code{.endef} pairs. -@ifset BOUT +@ifset BOUT @samp{.size} is only meaningful when generating COFF format output; when @code{@value{AS}} is generating @code{b.out}, it accepts this directive but ignores it. @end ifset -@end ifset + +@section @code{.size @var{name} , @var{expression}} (ELF version) +@cindex @code{size} directive + +This directive is used to set the size associated with a symbol @var{name}. +The size in bytes is computed from @var{expression} which can make use of label +arithmetic. This directive is typically used to set the size of function +symbols. @node Sleb128 @section @code{.sleb128 @var{expressions}} @@ -4658,6 +4911,22 @@ use a @code{.section} directive of some sort to change to some other section before further assembly. @ifset ELF +@node SubSection +@section @code{.subsection @var{name}} + +@cindex @code{.subsection} directive +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.section} (@pxref{Section}), @code{.pushsection} (@pxref{PushSection}), +@code{.popsection} (@pxref{PopSection}), and @code{.previous} +(@pxref{Previous}). + +This directive replaces the current subsection with @code{name}. The current +section is not changed. The replaced subsection is put onto the section stack +in place of the then current top of stack subsection. +@end ifset + +@ifset ELF @node Symver @section @code{.symver} @cindex @code{symver} directive @@ -4670,12 +4939,12 @@ There are cases where it may make sense to use this in objects to be bound into an application itself so as to override a versioned symbol from a shared library. -For ELF targets, the @code{.symver} directive is used like this: +For ELF targets, the @code{.symver} directive can be used like this: @smallexample .symver @var{name}, @var{name2@@nodename} @end smallexample -In this case, the symbol @var{name} must exist and be defined within the file -being assembled. The @code{.versym} directive effectively creates a symbol +If the symbol @var{name} is defined within the file +being assembled, the @code{.symver} directive effectively creates a symbol alias with the name @var{name2@@nodename}, and in fact the main reason that we just don't try and create a regular alias is that the @var{@@} character isn't permitted in symbol names. The @var{name2} part of the name is the actual name @@ -4688,6 +4957,29 @@ the name of a node specified in the version script supplied to the linker when building a shared library. If you are attempting to override a versioned symbol from a shared library, then @var{nodename} should correspond to the nodename of the symbol you are trying to override. + +If the symbol @var{name} is not defined within the file being assembled, all +references to @var{name} will be changed to @var{name2@@nodename}. If no +reference to @var{name} is made, @var{name2@@nodename} will be removed from the +symbol table. + +Another usage of the @code{.symver} directive is: +@smallexample +.symver @var{name}, @var{name2@@@@nodename} +@end smallexample +In this case, the symbol @var{name} must exist and be defined within +the file being assembled. It is similar to @var{name2@@nodename}. The +difference is @var{name2@@@@nodename} will also be used to resolve +references to @var{name2} by the linker. + +The third usage of the @code{.symver} directive is: +@smallexample +.symver @var{name}, @var{name2@@@@@@nodename} +@end smallexample +When @var{name} is not defined within the +file being assembled, it is treated as @var{name2@@nodename}. When +@var{name} is defined within the file being assembled, the symbol +name, @var{name}, will be changed to @var{name2@@@@nodename}. @end ifset @ifset COFF @@ -4729,22 +5021,55 @@ source file name and pagenumber) when generating assembly listings. This directive affects subsequent pages, as well as the current page if it appears within ten lines of the top of a page. -@ifset COFF @node Type -@section @code{.type @var{int}} +@section @code{.type @var{int}} (COFF version) @cindex COFF symbol type @cindex symbol type, COFF @cindex @code{type} directive This directive, permitted only within @code{.def}/@code{.endef} pairs, records the integer @var{int} as the type attribute of a symbol table entry. -@ifset BOUT +@ifset BOUT @samp{.type} is associated only with COFF format output; when @code{@value{AS}} is configured for @code{b.out} output, it accepts this directive but ignores it. @end ifset -@end ifset + +@section @code{.type @var{name} , @var{type description}} (ELF version) + +@cindex ELF symbol type +@cindex symbol type, ELF +@cindex @code{type} directive +This directive is used to set the type of symbol @var{name} to be either a +function symbol or an object symbol. There are five different syntaxes +supported for the @var{type description} field, in order to provide +compatibility with various other assemblers. The syntaxes supported are: + +@smallexample + .type <name>,#function + .type <name>,#object + + .type <name>,@@function + .type <name>,@@object + + .type <name>,%function + .type <name>,%object + + .type <name>,"function" + .type <name>,"object" + + .type <name> STT_FUNCTION + .type <name> STT_OBJECT +@end smallexample + +@node Uleb128 +@section @code{.uleb128 @var{expressions}} + +@cindex @code{uleb128} directive +@var{uleb128} stands for ``unsigned little endian base 128.'' This is a +compact, variable length representation of numbers used by the DWARF +symbolic debugging format. @xref{Sleb128,@code{.sleb128}}. @ifset COFF @node Val @@ -4763,46 +5088,40 @@ configured for @code{b.out}, it accepts this directive but ignores it. @end ifset @end ifset -@node Uleb128 -@section @code{.uleb128 @var{expressions}} - -@cindex @code{uleb128} directive -@var{uleb128} stands for ``unsigned little endian base 128.'' This is a -compact, variable length representation of numbers used by the DWARF -symbolic debugging format. @xref{Sleb128,@code{.sleb128}}. - @ifset ELF -@node Visibility -@section @code{.internal}, @code{.hidden}, @code{.protected} -@cindex @code{internal} directive -@cindex @code{hidden} directive -@cindex @code{protected} directive -@cindex symbol visibility +@node Version +@section @code{.version "@var{string}"} -These directives can be used to set the visibility of a specified symbol. By -default a symbol's visibility is set by its binding (local, global or weak), -but these directives can be used to override that. +@cindex @code{.version} +This directive creates a @code{.note} section and places into it an ELF +formatted note of type NT_VERSION. The note's name is set to @code{string}. +@end ifset -A visibility of @code{protected} means that any references to the symbol from -within the component that defines the symbol must be resolved to the definition -in that component, even if a definition in another component would normally -preempt this. +@ifset ELF +@node VTableEntry +@section @code{.vtable_entry @var{table}, @var{offset}} -A visibility of @code{hidden} means that the symbol is not visible to other -components. Such a symbol is always considered to be protected as well. +@cindex @code{.vtable_entry} +This directive finds or creates a symbol @code{table} and creates a +@code{VTABLE_ENTRY} relocation for it with an addend of @code{offset}. -A visibility of @code{internal} is the same as a visibility of @code{hidden}, -except that some extra, processor specific processing must also be performed -upon the symbol. +@node VTableInherit +@section @code{.vtable_inherit @var{child}, @var{parent}} -For ELF targets, the directives are used like this: +@cindex @code{.vtable_inherit} +This directive finds the symbol @code{child} and finds or creates the symbol +@code{parent} and then creates a @code{VTABLE_INHERIT} relocation for the +parent whose addend is the value of the child symbol. As a special case the +parent name of @code{0} is treated as refering the @code{*ABS*} section. +@end ifset -@smallexample -.internal @var{name} -.hidden @var{name} -.protected @var{name} -@end smallexample +@ifset ELF +@node Weak +@section @code{.weak @var{names}} +@cindex @code{.weak} +This directive sets the weak attribute on the comma separated list of symbol +@code{names}. If the symbols do not already exist, they will be created. @end ifset @node Word @@ -4842,7 +5161,7 @@ interest to you does 32-bit addressing (or doesn't require it; @end ifset In order to assemble compiler output into something that works, -@code{@value{AS}} occasionlly does strange things to @samp{.word} directives. +@code{@value{AS}} occasionally does strange things to @samp{.word} directives. Directives of the form @samp{.word sym1-sym2} are often emitted by compilers as part of jump tables. Therefore, when @code{@value{AS}} assembles a directive of the form @samp{.word sym1-sym2}, and the difference between @@ -4929,14 +5248,23 @@ subject, see the hardware manufacturer's manual. * ESA/390-Dependent:: IBM ESA/390 Dependent Features @end ifset @ifset I80386 -* i386-Dependent:: Intel 80386 Dependent Features +* i386-Dependent:: Intel 80386 and AMD x86-64 Dependent Features +@end ifset +@ifset I860 +* i860-Dependent:: Intel 80860 Dependent Features @end ifset @ifset I960 * i960-Dependent:: Intel 80960 Dependent Features @end ifset +@ifset M32R +* M32R-Dependent:: M32R Dependent Features +@end ifset @ifset M680X0 * M68K-Dependent:: M680x0 Dependent Features @end ifset +@ifset M68HC11 +* M68HC11-Dependent:: M68HC11 and 68HC12 Dependent Features +@end ifset @ifset MIPS * MIPS-Dependent:: MIPS Dependent Features @end ifset @@ -4949,6 +5277,9 @@ subject, see the hardware manufacturer's manual. @ifset SPARC * Sparc-Dependent:: SPARC Dependent Features @end ifset +@ifset TIC54X +* TIC54X-Dependent:: TI TMS320C54x Dependent Features +@end ifset @ifset V850 * V850-Dependent:: V850 Dependent Features @end ifset @@ -4972,80 +5303,7 @@ subject, see the hardware manufacturer's manual. @c in both conditional blocks. @ifset ARC -@ifset GENERIC -@page -@node ARC-Dependent -@chapter ARC Dependent Features -@end ifset -@ifclear GENERIC -@node Machine Dependencies -@chapter ARC Dependent Features -@end ifclear - -@cindex ARC support -@menu -* ARC-Opts:: Options -* ARC-Float:: Floating Point -* ARC-Directives:: Sparc Machine Directives -@end menu - -@node ARC-Opts -@section Options - -@cindex options for ARC -@cindex ARC options -@cindex architectures, ARC -@cindex ARC architectures -The ARC chip family includes several successive levels (or other -variants) of chip, using the same core instruction set, but including -a few additional instructions at each level. - -By default, @code{@value{AS}} assumes the core instruction set (ARC -base). The @code{.cpu} pseudo-op is intended to be used to select -the variant. - -@table @code -@cindex @code{-mbig-endian} option (ARC) -@cindex @code{-mlittle-endian} option (ARC) -@cindex ARC big-endian output -@cindex ARC little-endian output -@cindex big-endian output, ARC -@cindex little-endian output, ARC -@item -mbig-endian -@itemx -mlittle-endian -Any @sc{arc} configuration of @code{@value{AS}} can select big-endian or -little-endian output at run time (unlike most other @sc{gnu} development -tools, which must be configured for one or the other). Use -@samp{-mbig-endian} to select big-endian output, and @samp{-mlittle-endian} -for little-endian. -@end table - -@node ARC-Float -@section Floating Point - -@cindex floating point, ARC (@sc{ieee}) -@cindex ARC floating point (@sc{ieee}) -The ARC cpu family currently does not have hardware floating point -support. Software floating point support is provided by @code{GCC} -and uses @sc{ieee} floating-point numbers. - -@node ARC-Directives -@section ARC Machine Directives - -@cindex ARC machine directives -@cindex machine directives, ARC -The ARC version of @code{@value{AS}} supports the following additional -machine directives: - -@table @code -@item .cpu -@cindex @code{cpu} directive, SPARC -This must be followed by the desired cpu. -The ARC is intended to be customizable, @code{.cpu} is used to -select the desired variant [though currently there are none]. - -@end table - +@include c-arc.texi @end ifset @ifset A29K @@ -5103,15 +5361,26 @@ family. @include c-i386.texi @end ifset +@ifset I860 +@include c-i860.texi +@end ifset + @ifset I960 @include c-i960.texi @end ifset +@ifset M32R +@include c-m32r.texi +@end ifset @ifset M680X0 @include c-m68k.texi @end ifset +@ifset M68HC11 +@include c-m68hc11.texi +@end ifset + @ifset MIPS @include c-mips.texi @end ifset @@ -5132,6 +5401,10 @@ family. @include c-sparc.texi @end ifset +@ifset TIC54X +@include c-tic54x.texi +@end ifset + @ifset Z8000 @include c-z8k.texi @end ifset @@ -5212,7 +5485,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs distribution. In any event, we also recommend that you send bug reports for @code{@value{AS}} -to @samp{bug-gnu-utils@@gnu.org}. +to @samp{bug-binutils@@gnu.org}. The fundamental principle of reporting bugs usefully is this: @strong{report all the facts}. If you are not sure whether to state a @@ -5435,6 +5708,9 @@ Linas Vepstas added GAS support for the ESA/390 "IBM 370" architecture. Richard Henderson rewrote the Alpha assembler. Klaus Kaempf wrote GAS and BFD support for openVMS/Alpha. +Timothy Wall, Michael Hayes, and Greg Smart contributed to the various tic* +flavors. + Several engineers at Cygnus Support have also provided many small bug fixes and configuration enhancements. @@ -5443,6 +5719,369 @@ you have contributed significant work and are not mentioned on this list, and want to be, let us know. Some of the history has been lost; we are not intentionally leaving anyone out. +@node GNU Free Documentation License +@chapter GNU Free Documentation License + + GNU Free Documentation License + + Version 1.1, March 2000 + + Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". +@end smallexample + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + @node Index @unnumbered Index diff --git a/contrib/binutils/gas/doc/c-arm.texi b/contrib/binutils/gas/doc/c-arm.texi index e354982..d3de43b 100644 --- a/contrib/binutils/gas/doc/c-arm.texi +++ b/contrib/binutils/gas/doc/c-arm.texi @@ -32,15 +32,18 @@ @cindex @code{-marm} command line option, ARM @item -marm@code{[2|250|3|6|60|600|610|620|7|7m|7d|7dm|7di|7dmi|70|700|700i|710|710c|7100|7500|7500fe|7tdmi|8|810|9|9tdmi|920|strongarm|strongarm110|strongarm1100]} +@itemx -mxscale This option specifies the target processor. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target processor. @cindex @code{-marmv} command line option, ARM -@item -marmv@code{[2|2a|3|3m|4|4t|5|5t]} +@item -marmv@code{[2|2a|3|3m|4|4t|5|5t|5te]} This option specifies the target architecture. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target architecture. +The option @code{-marmv5te} specifies that v5t architecture should be +used with the El Segundo extensions enabled. @cindex @code{-mthumb} command line option, ARM @item -mthumb @@ -51,13 +54,13 @@ This option specifies that only Thumb instructions should be assembled. This option specifies that any Arm or Thumb instruction should be assembled. @cindex @code{-mfpa} command line option, ARM -@item -mfpa @var{[10|11]} +@item -mfpa @code{[10|11]} This option specifies the floating point architecture in use on the target processor. @cindex @code{-mfpe-old} command line option, ARM @item -mfpe-old -Do not allow the assemble of floating point multiple instructions. +Do not allow the assembly of floating point multiple instructions. @cindex @code{-mno-fpu} command line option, ARM @item -mno-fpu @@ -69,11 +72,19 @@ This option specifies that the output generated by the assembler should be marked as supporting interworking. @cindex @code{-mapcs} command line option, ARM -@item -mapcs @var{[26|32]} +@item -mapcs @code{[26|32]} This option specifies that the output generated by the assembler should be marked as supporting the indicated version of the Arm Procedure. Calling Standard. +@cindex @code{-matpcs} command line option, ARM +@item -matpcs +This option specifies that the output generated by the assembler should +be marked as supporting the Arm/Thumb Procedure Calling Standard. If +enabled this option will cause the assembler to create an empty +debugging section in the object file called .arm.atpcs. Debuggers can +use this to determine the ABI being used by. + @cindex @code{-mapcs-float} command line option, ARM @item -mapcs-float This indicates the the floating point variant of the APCS should be @@ -98,7 +109,8 @@ be marked as being encoded for a little-endian processor. @cindex @code{-k} command line option, ARM @cindex PIC code generation for ARM @item -k -This option enables the generation of PIC (position independent code). +This option specifies that the output of the assembler should be marked +as position-independent code (PIC). @cindex @code{-moabi} command line option, ARM @item -moabi @@ -129,8 +141,8 @@ the first character of a line, the whole line is treated as a comment. @cindex line separator, ARM @cindex statement separator, ARM @cindex ARM line separator -On ARM systems running the GNU/Linux operating system, @samp{;} can be -used instead of a newline to separate statements. +The @samp{;} character can be used instead of a newline to separate +statements. @cindex immediate character, ARM @cindex ARM immediate character @@ -180,7 +192,7 @@ example: @end smallexample @cindex @code{code} directive, ARM -@item .code @var{[16|32]} +@item .code @code{[16|32]} This directive selects the instruction set being generated. The value 16 selects Thumb, with the value 32 selecting ARM. @@ -203,7 +215,8 @@ This directive specifies that the following symbol is the name of a Thumb encoded function. This information is necessary in order to allow the assembler and linker to generate correct code for interworking between Arm and Thumb instructions and should be used even if -interworking is not going to be performed. +interworking is not going to be performed. The presence of this +directive also implies @code{.thumb} @cindex @code{thumb_set} directive, ARM @item .thumb_set @@ -277,7 +290,7 @@ will not make use of the literal pool. @end smallexample This instruction will load the address of @var{label} into the indicated -register. The instruction will evaluate to one or two a PC relative ADD +register. The instruction will evaluate to one or two PC relative ADD or SUB instructions depending upon where the label is located. If a second instruction is not needed a NOP instruction will be generated in its place, so that this instruction is always 8 bytes long. diff --git a/contrib/binutils/gas/doc/c-i386.texi b/contrib/binutils/gas/doc/c-i386.texi index 8a9c85a..110d560 100644 --- a/contrib/binutils/gas/doc/c-i386.texi +++ b/contrib/binutils/gas/doc/c-i386.texi @@ -13,6 +13,12 @@ @cindex i386 support @cindex i80306 support +@cindex x86-64 support + +The i386 version @code{@value{AS}} supports both the original Intel 386 +architecture in both 16 and 32-bit mode as well as AMD x86-64 architecture +extending the Intel architecture to 64-bits. + @menu * i386-Options:: Options * i386-Syntax:: AT&T Syntax versus Intel Syntax @@ -24,6 +30,7 @@ * i386-Float:: Floating Point * i386-SIMD:: Intel's MMX and AMD's 3DNow! SIMD Operations * i386-16bit:: Writing 16-bit Code +* i386-Arch:: Specifying an x86 CPU architecture * i386-Bugs:: AT&T Syntax bugs * i386-Notes:: Notes @end menu @@ -31,17 +38,52 @@ @node i386-Options @section Options -@cindex options for i386 (none) -@cindex i386 options (none) -The 80386 has no machine dependent options. +@cindex options for i386 +@cindex options for x86-64 +@cindex i386 options +@cindex x86-64 options + +The i386 version of @code{@value{AS}} has a few machine +dependent options: + +@table @code +@cindex @samp{--32} option, i386 +@cindex @samp{--32} option, x86-64 +@cindex @samp{--64} option, i386 +@cindex @samp{--64} option, x86-64 +@item --32 | --64 +Select the word size, either 32 bits or 64 bits. Selecting 32-bit +implies Intel i386 architecture, while 64-bit implies AMD x86-64 +architecture. + +These options are only available with the ELF object file format, and +require that the necessary BFD support has been included (on a 32-bit +platform you have to add --enable-64-bit-bfd to configure enable 64-bit +usage and use x86-64 as target platform). +@end table @node i386-Syntax @section AT&T Syntax versus Intel Syntax +@cindex i386 intel_syntax pseudo op +@cindex intel_syntax pseudo op, i386 +@cindex i386 att_syntax pseudo op +@cindex att_syntax pseudo op, i386 @cindex i386 syntax compatibility @cindex syntax compatibility, i386 -In order to maintain compatibility with the output of @code{@value{GCC}}, -@code{@value{AS}} supports AT&T System V/386 assembler syntax. This is quite +@cindex x86-64 intel_syntax pseudo op +@cindex intel_syntax pseudo op, x86-64 +@cindex x86-64 att_syntax pseudo op +@cindex att_syntax pseudo op, x86-64 +@cindex x86-64 syntax compatibility +@cindex syntax compatibility, x86-64 + +@code{@value{AS}} now supports assembly using Intel assembler syntax. +@code{.intel_syntax} selects Intel mode, and @code{.att_syntax} switches +back to the usual AT&T mode for compatibility with the output of +@code{@value{GCC}}. Either of these directives may have an optional +argument, @code{prefix}, or @code{noprefix} specifying whether registers +require a @samp{%} prefix. AT&T System V/386 assembler syntax is quite different from Intel syntax. We mention these differences because almost all 80386 documents use Intel syntax. Notable differences between the two syntaxes are: @@ -53,6 +95,14 @@ between the two syntaxes are: @cindex jump/call operands, i386 @cindex i386 jump/call operands @cindex operand delimiters, i386 + +@cindex immediate operands, x86-64 +@cindex x86-64 immediate operands +@cindex register operands, x86-64 +@cindex x86-64 register operands +@cindex jump/call operands, x86-64 +@cindex x86-64 jump/call operands +@cindex operand delimiters, x86-64 @itemize @bullet @item AT&T immediate operands are preceded by @samp{$}; Intel immediate @@ -63,6 +113,8 @@ operands are prefixed by @samp{*}; they are undelimited in Intel syntax. @cindex i386 source, destination operands @cindex source, destination operands; i386 +@cindex x86-64 source, destination operands +@cindex source, destination operands; x86-64 @item AT&T and Intel syntax use the opposite order for source and destination operands. Intel @samp{add eax, 4} is @samp{addl $4, %eax}. The @@ -74,17 +126,23 @@ reversed order. @ref{i386-Bugs}. @cindex mnemonic suffixes, i386 @cindex sizes operands, i386 @cindex i386 size suffixes +@cindex mnemonic suffixes, x86-64 +@cindex sizes operands, x86-64 +@cindex x86-64 size suffixes @item In AT&T syntax the size of memory operands is determined from the last character of the instruction mnemonic. Mnemonic suffixes of @samp{b}, -@samp{w}, and @samp{l} specify byte (8-bit), word (16-bit), and long -(32-bit) memory references. Intel syntax accomplishes this by prefixing -memory operands (@emph{not} the instruction mnemonics) with @samp{byte -ptr}, @samp{word ptr}, and @samp{dword ptr}. Thus, Intel @samp{mov al, -byte ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T syntax. +@samp{w}, @samp{l} and @samp{q} specify byte (8-bit), word (16-bit), long +(32-bit) and quadruple word (64-bit) memory references. Intel syntax accomplishes +this by prefixing memory operands (@emph{not} the instruction mnemonics) with +@samp{byte ptr}, @samp{word ptr}, @samp{dword ptr} and @samp{qword ptr}. Thus, +Intel @samp{mov al, byte ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T +syntax. @cindex return instructions, i386 @cindex i386 jump, call, return +@cindex return instructions, x86-64 +@cindex x86-64 jump, call, return @item Immediate form long jumps and calls are @samp{lcall/ljmp $@var{section}, $@var{offset}} in AT&T syntax; the @@ -96,6 +154,8 @@ is @samp{lret $@var{stack-adjust}} in AT&T syntax; Intel syntax is @cindex sections, i386 @cindex i386 sections +@cindex sections, x86-64 +@cindex x86-64 sections @item The AT&T assembler does not provide support for multiple section programs. Unix style systems expect all programs to be single sections. @@ -106,17 +166,20 @@ programs. Unix style systems expect all programs to be single sections. @cindex i386 instruction naming @cindex instruction naming, i386 +@cindex x86-64 instruction naming +@cindex instruction naming, x86-64 + Instruction mnemonics are suffixed with one character modifiers which -specify the size of operands. The letters @samp{b}, @samp{w}, and -@samp{l} specify byte, word, and long operands. If no suffix is -specified by an instruction then @code{@value{AS}} tries to fill in the -missing suffix based on the destination register operand (the last one -by convention). Thus, @samp{mov %ax, %bx} is equivalent to @samp{movw -%ax, %bx}; also, @samp{mov $1, %bx} is equivalent to @samp{movw $1, -%bx}. Note that this is incompatible with the AT&T Unix assembler which -assumes that a missing mnemonic suffix implies long operand size. (This -incompatibility does not affect compiler output since compilers always -explicitly specify the mnemonic suffix.) +specify the size of operands. The letters @samp{b}, @samp{w}, @samp{l} +and @samp{q} specify byte, word, long and quadruple word operands. If +no suffix is specified by an instruction then @code{@value{AS}} tries to +fill in the missing suffix based on the destination register operand +(the last one by convention). Thus, @samp{mov %ax, %bx} is equivalent +to @samp{movw %ax, %bx}; also, @samp{mov $1, %bx} is equivalent to +@samp{movw $1, bx}. Note that this is incompatible with the AT&T Unix +assembler which assumes that a missing mnemonic suffix implies long +operand size. (This incompatibility does not affect compiler output +since compilers always explicitly specify the mnemonic suffix.) Almost all instructions have the same names in AT&T and Intel format. There are a few exceptions. The sign extend and zero extend @@ -130,10 +193,14 @@ are tacked on to this base name, the @emph{from} suffix before the @emph{to} suffix. Thus, @samp{movsbl %al, %edx} is AT&T syntax for ``move sign extend @emph{from} %al @emph{to} %edx.'' Possible suffixes, thus, are @samp{bl} (from byte to long), @samp{bw} (from byte to word), -and @samp{wl} (from word to long). +@samp{wl} (from word to long), @samp{bq} (from byte to quadruple word), +@samp{wq} (from word to quadruple word), and @samp{lq} (from long to +quadruple word). @cindex conversion instructions, i386 @cindex i386 conversion instructions +@cindex conversion instructions, x86-64 +@cindex x86-64 conversion instructions The Intel-syntax conversion instructions @itemize @bullet @@ -148,14 +215,25 @@ The Intel-syntax conversion instructions @item @samp{cdq} --- sign-extend dword in @samp{%eax} to quad in @samp{%edx:%eax}, + +@item +@samp{cdqe} --- sign-extend dword in @samp{%eax} to quad in @samp{%rax} +(x86-64 only), + +@item +@samp{cdo} --- sign-extend quad in @samp{%rax} to octuple in +@samp{%rdx:%rax} (x86-64 only), @end itemize @noindent -are called @samp{cbtw}, @samp{cwtl}, @samp{cwtd}, and @samp{cltd} in -AT&T naming. @code{@value{AS}} accepts either naming for these instructions. +are called @samp{cbtw}, @samp{cwtl}, @samp{cwtd}, @samp{cltd}, @samp{cltq}, and +@samp{cqto} in AT&T naming. @code{@value{AS}} accepts either naming for these +instructions. @cindex jump instructions, i386 @cindex call instructions, i386 +@cindex jump instructions, x86-64 +@cindex call instructions, x86-64 Far call/jump instructions are @samp{lcall} and @samp{ljmp} in AT&T syntax, but are @samp{call far} and @samp{jump far} in Intel convention. @@ -165,6 +243,8 @@ convention. @cindex i386 registers @cindex registers, i386 +@cindex x86-64 registers +@cindex registers, x86-64 Register operands are always prefixed with @samp{%}. The 80386 registers consist of @@ -204,6 +284,44 @@ the 2 test registers @samp{%tr6} and @samp{%tr7}. the 8 floating point register stack @samp{%st} or equivalently @samp{%st(0)}, @samp{%st(1)}, @samp{%st(2)}, @samp{%st(3)}, @samp{%st(4)}, @samp{%st(5)}, @samp{%st(6)}, and @samp{%st(7)}. +These registers are overloaded by 8 MMX registers @samp{%mm0}, +@samp{%mm1}, @samp{%mm2}, @samp{%mm3}, @samp{%mm4}, @samp{%mm5}, +@samp{%mm6} and @samp{%mm7}. + +@item +the 8 SSE registers registers @samp{%xmm0}, @samp{%xmm1}, @samp{%xmm2}, +@samp{%xmm3}, @samp{%xmm4}, @samp{%xmm5}, @samp{%xmm6} and @samp{%xmm7}. +@end itemize + +The AMD x86-64 architecture extends the register set by: + +@itemize @bullet +@item +enhancing the 8 32-bit registers to 64-bit: @samp{%rax} (the +accumulator), @samp{%rbx}, @samp{%rcx}, @samp{%rdx}, @samp{%rdi}, +@samp{%rsi}, @samp{%rbp} (the frame pointer), @samp{%rsp} (the stack +pointer) + +@item +the 8 extended registers @samp{%r8}--@samp{%r15}. + +@item +the 8 32-bit low ends of the extended registers: @samp{%r8d}--@samp{%r15d} + +@item +the 8 16-bit low ends of the extended registers: @samp{%r8w}--@samp{%r15w} + +@item +the 8 8-bit low ends of the extended registers: @samp{%r8b}--@samp{%r15b} + +@item +the 4 8-bit registers: @samp{%sil}, @samp{%dil}, @samp{%bpl}, @samp{%spl}. + +@item +the 8 debug registers: @samp{%db8}--@samp{%db15}. + +@item +the 8 SSE registers: @samp{%xmm8}--@samp{%xmm15}. @end itemize @node i386-Prefixes @@ -270,6 +388,20 @@ complete the current instruction. This should never be needed for the The @samp{rep}, @samp{repe}, and @samp{repne} prefixes are added to string instructions to make them repeat @samp{%ecx} times (@samp{%cx} times if the current address size is 16-bits). +@cindex REX prefixes, i386 +@item +The @samp{rex} family of prefixes is used by x86-64 to encode +extensions to i386 instruction set. The @samp{rex} prefix has four +bits --- an operand size overwrite (@code{64}) used to change operand size +from 32-bit to 64-bit and X, Y and Z extensions bits used to extend the +register set. + +You may write the @samp{rex} prefixes directly. The @samp{rex64xyz} +instruction emits @samp{rex} prefix with all the bits set. By omitting +the @code{64}, @code{x}, @code{y} or @code{z} you may write other +prefixes as well. Normally, there is no need to write the prefixes +explicitly, since gas will automatically generate them based on the +instruction operands. @end itemize @node i386-Memory @@ -277,6 +409,8 @@ times if the current address size is 16-bits). @cindex i386 memory references @cindex memory references, i386 +@cindex x86-64 memory references +@cindex memory references, x86-64 An Intel syntax indirect memory reference of the form @smallexample @@ -333,14 +467,34 @@ prefixed with @samp{*}. If no @samp{*} is specified, @code{@value{AS}} always chooses PC relative addressing for jump/call labels. Any instruction that has a memory operand, but no register operand, -@emph{must} specify its size (byte, word, or long) with an instruction -mnemonic suffix (@samp{b}, @samp{w}, or @samp{l}, respectively). +@emph{must} specify its size (byte, word, long, or quadruple) with an +instruction mnemonic suffix (@samp{b}, @samp{w}, @samp{l} or @samp{q}, +respectively). + +The x86-64 architecture adds an RIP (instruction pointer relative) +addressing. This addressing mode is specified by using @samp{rip} as a +base register. Only constant offsets are valid. For example: + +@table @asis +@item AT&T: @samp{1234(%rip)}, Intel: @samp{[rip + 1234]} +Points to the address 1234 bytes past the end of the current +instruction. + +@item AT&T: @samp{symbol(%rip)}, Intel: @samp{[rip + symbol]} +Points to the @code{symbol} in RIP relative way, this is shorter than +the default absolute addressing. +@end table + +Other addressing modes remain unchanged in x86-64 architecture, except +registers used are 64-bit instead of 32-bit. @node i386-jumps @section Handling of Jump Instructions @cindex jump optimization, i386 @cindex i386 jump optimization +@cindex jump optimization, x86-64 +@cindex x86-64 jump optimization Jump instructions are always optimized to use the smallest possible displacements. This is accomplished by using byte (8-bit) displacement jumps whenever the target is sufficiently close. If a byte displacement @@ -369,6 +523,8 @@ cx_nonzero: @cindex i386 floating point @cindex floating point, i386 +@cindex x86-64 floating point +@cindex floating point, x86-64 All 80387 floating point types except packed BCD are supported. (BCD support may be added without much difficulty). These data types are 16-, 32-, and 64- bit integers, and single (32-bit), @@ -381,6 +537,10 @@ data type. Constructors build these data types into memory. @cindex @code{single} directive, i386 @cindex @code{double} directive, i386 @cindex @code{tfloat} directive, i386 +@cindex @code{float} directive, x86-64 +@cindex @code{single} directive, x86-64 +@cindex @code{double} directive, x86-64 +@cindex @code{tfloat} directive, x86-64 @itemize @bullet @item Floating point constructors are @samp{.float} or @samp{.single}, @@ -394,6 +554,10 @@ top) and @samp{fstpt} (store 80-bit real and pop stack) instructions. @cindex @code{long} directive, i386 @cindex @code{int} directive, i386 @cindex @code{quad} directive, i386 +@cindex @code{word} directive, x86-64 +@cindex @code{long} directive, x86-64 +@cindex @code{int} directive, x86-64 +@cindex @code{quad} directive, x86-64 @item Integer constructors are @samp{.word}, @samp{.long} or @samp{.int}, and @samp{.quad} for the 16-, 32-, and 64-bit integer formats. The @@ -417,6 +581,9 @@ then stores the result in the 4 byte location @samp{mem}) @cindex MMX, i386 @cindex 3DNow!, i386 @cindex SIMD, i386 +@cindex MMX, x86-64 +@cindex 3DNow!, x86-64 +@cindex SIMD, x86-64 @code{@value{AS}} supports Intel's MMX instruction set (SIMD instructions for integer data), available on Intel's Pentium MMX @@ -446,7 +613,10 @@ instructions is reversed from the Intel syntax. @cindex @code{code16gcc} directive, i386 @cindex @code{code16} directive, i386 @cindex @code{code32} directive, i386 -While @code{@value{AS}} normally writes only ``pure'' 32-bit i386 code, +@cindex @code{code64} directive, i386 +@cindex @code{code64} directive, x86-64 +While @code{@value{AS}} normally writes only ``pure'' 32-bit i386 code +or 64-bit x86-64 code depending on the default configuration, it also supports writing code to run in real mode or in 16-bit protected mode code segments. To do this, put a @samp{.code16} or @samp{.code16gcc} directive before the assembly language instructions to @@ -506,14 +676,44 @@ non-commutative arithmetic floating point operations with two register operands where the source register is @samp{%st} and the destination register is @samp{%st(i)}. +@node i386-Arch +@section Specifying CPU Architecture + +@cindex arch directive, i386 +@cindex i386 arch directive +@cindex arch directive, x86-64 +@cindex x86-64 arch directive + +@code{@value{AS}} may be told to assemble for a particular CPU +architecture with the @code{.arch @var{cpu_type}} directive. This +directive enables a warning when gas detects an instruction that is not +supported on the CPU specified. The choices for @var{cpu_type} are: + +@multitable @columnfractions .20 .20 .20 .20 +@item @samp{i8086} @tab @samp{i186} @tab @samp{i286} @tab @samp{i386} +@item @samp{i486} @tab @samp{i586} @tab @samp{i686} @tab @samp{pentium} +@item @samp{pentiumpro} @tab @samp{pentium4} @tab @samp{k6} @tab @samp{athlon} +@item @samp{sledgehammer} +@end multitable + +Apart from the warning, there is only one other effect on +@code{@value{AS}} operation; If you specify a CPU other than +@samp{i486}, then shift by one instructions such as @samp{sarl $1, %eax} +will automatically use a two byte opcode sequence. The larger three +byte opcode sequence is used on the 486 (and when no architecture is +specified) because it executes faster on the 486. Note that you can +explicitly request the two byte opcode by writing @samp{sarl %eax}. + @node i386-Notes @section Notes @cindex i386 @code{mul}, @code{imul} instructions @cindex @code{mul} instruction, i386 @cindex @code{imul} instruction, i386 +@cindex @code{mul} instruction, x86-64 +@cindex @code{imul} instruction, x86-64 There is some trickery concerning the @samp{mul} and @samp{imul} -instructions that deserves mention. The 16-, 32-, and 64-bit expanding +instructions that deserves mention. The 16-, 32-, 64- and 128-bit expanding multiplies (base opcode @samp{0xf6}; extension 4 for @samp{mul} and 5 for @samp{imul}) can be output only in the one operand form. Thus, @samp{imul %ebx, %eax} does @emph{not} select the expanding multiply; diff --git a/contrib/binutils/gas/doc/gasp.texi b/contrib/binutils/gas/doc/gasp.texi index 64cd6f4..e023edc 100644 --- a/contrib/binutils/gas/doc/gasp.texi +++ b/contrib/binutils/gas/doc/gasp.texi @@ -3,10 +3,14 @@ @c @c This file documents the assembly preprocessor "GASP" @c -@c Copyright (c) 1994 Free Software Foundation, Inc. +@c Copyright (c) 1994, 2000 Free Software Foundation, Inc. @c -@c This text may be freely distributed under the terms of the GNU -@c General Public License. +@c Permission is granted to copy, distribute and/or modify this document +@c under the terms of the GNU Free Documentation License, Version 1.1 +@c or any later version published by the Free Software Foundation; +@c with no Invariant Sections, with no Front-Cover Texts, and with no +@c Back-Cover Texts. A copy of the license is included in the +@c section entitled "GNU Free Documentation License". @ifinfo @format @@ -37,27 +41,19 @@ END-INFO-DIR-ENTRY @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1994, 1995 Free Software Foundation, Inc. +Copyright @copyright{} 1994, 1995, 2000 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with no Invariant Sections, with no Front-Cover Texts, and with no + Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end titlepage @ifinfo -Copyright @copyright{} 1994, 1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. +Copyright @copyright{} 1994, 1995, 2000 Free Software Foundation, Inc. @ignore Permission is granted to process this file through TeX and print the @@ -66,13 +62,13 @@ notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with no Invariant Sections, with no Front-Cover Texts, and with no + Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License". -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @node Top @top GASP @@ -87,6 +83,7 @@ Steve Chamberlain wrote GASP; Roland Pesch wrote this manual. * Overview:: What is GASP? * Invoking GASP:: Command line options. * Commands:: Preprocessor commands. +* GNU Free Documentation License:: GNU Free Documentation License * Index:: Index. @end menu @end ifinfo @@ -1077,6 +1074,369 @@ You can write @samp{%@var{expr}} to evaluate the expression @var{expr} and use the result as a string. @end table +@node GNU Free Documentation License +@chapter GNU Free Documentation License + + GNU Free Documentation License + + Version 1.1, March 2000 + + Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". +@end smallexample + +If you have no Invariant Sections, write "with no Invariant Sections" +instead of saying which ones are invariant. If you have no +Front-Cover Texts, write "no Front-Cover Texts" instead of +"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + @node Index @unnumbered Index diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi index 8453c48..a42bc0f 100644 --- a/contrib/binutils/gas/doc/internals.texi +++ b/contrib/binutils/gas/doc/internals.texi @@ -8,8 +8,7 @@ This chapter describes the internals of the assembler. It is incomplete, but it may help a bit. -This chapter was last modified on $Date: 2000/03/26 14:47:33 $. It is not updated regularly, and it -may be out of date. +This chapter is not updated regularly, and it may be out of date. @menu * GAS versions:: GAS versions @@ -464,7 +463,7 @@ the other fields; see the definition in @file{expr.h} for the possibilities. An @code{operatorT} value of @code{O_big} indicates either a floating point number, stored in the global variable @code{generic_floating_point_number}, or -an integer to large to store in an @code{offsetT} type, stored in the global +an integer too large to store in an @code{offsetT} type, stored in the global array @code{generic_bignum}. This rather inflexible approach makes it impossible to use floating point numbers or large expressions in complex expressions. @@ -645,7 +644,7 @@ The variable characters are to be repeated @code{fr_offset} times. If have this type. @item rs_leb128 -This state is used to implement the DWARF ``little endian base 128'' +This state is used to implement the DWARF ``little endian base 128'' variable length number format. The @code{fr_symbol} is always an expression symbol, as constant expressions are emitted directly. The @code{fr_offset} field is used during relaxation to hold the previous size of the number so @@ -774,6 +773,12 @@ variable. Normally the default value of @samp{generic} is fine. The configuration process will create a file named @file{targ-env.h} in the build directory which includes @file{te-@var{em}.h}. +There is a special case for COFF. For historical reason, the GNU COFF +assembler doesn't follow the documented behavior on certain debug symbols for +the compatibility with other COFF assemblers. A port can define +@code{STRICTCOFF} in the configure script to make the GNU COFF assembler +to follow the documented behavior. + Porting GAS to a new CPU requires writing the @file{tc-@var{CPU}} files. Porting GAS to a new object file format requires writing the @file{obj-@var{fmt}} files. There is sometimes some interaction between these @@ -884,7 +889,7 @@ pseudo-ops which are specific to the CPU. If this macro is defined, GAS will call it with a @code{pseudo_typeS} argument. It should return non-zero if the pseudo-op is a conditional which controls whether code is assembled, such as @samp{.if}. GAS knows about the normal -conditional pseudo-ops,and you should normally not have to define this macro. +conditional pseudo-ops, and you should normally not have to define this macro. @item comment_chars @cindex comment_chars @@ -913,7 +918,7 @@ comment when they appear at the start of a line. @item line_separator_chars @cindex line_separator_chars This is a null terminated @code{const char} array of characters which separate -lines (semicolon and newline are such characters by default, and need not be +lines (null and newline are such characters by default, and need not be listed in this array). Note that line_separator_chars do not separate lines if found in a comment, such as after a character in line_comment_chars or comment_chars. @@ -965,7 +970,7 @@ default value is @code{LEX_NAME | LEX_BEGIN_NAME}. @item NUMBERS_WITH_SUFFIX @cindex NUMBERS_WITH_SUFFIX When this macro is defined to be non-zero, the parser allows the radix of a -constant to be indicated with a suffix. Valid suffixes are binary (B), +constant to be indicated with a suffix. Valid suffixes are binary (B), octal (Q), and hexadecimal (H). Case is not significant. @item SINGLE_QUOTE_STRINGS @@ -992,6 +997,7 @@ If you define this macro, GAS will assume that any text at the start of a line is a label, even if it does not have a colon. @item TC_START_LABEL +@itemx TC_START_LABEL_WITHOUT_COLON @cindex TC_START_LABEL You may define this macro to control what GAS considers to be a label. The default definition is to accept any name followed by a colon character. @@ -999,7 +1005,7 @@ default definition is to accept any name followed by a colon character. @item TC_START_LABEL_WITHOUT_COLON @cindex TC_START_LABEL_WITHOUT_COLON Same as TC_START_LABEL, but should be used instead of TC_START_LABEL when -LABELS_WITHOUT_COLONS is defined. +LABELS_WITHOUT_COLONS is defined. @item NO_PSEUDO_DOT @cindex NO_PSEUDO_DOT @@ -1133,11 +1139,13 @@ relocation entry. @itemx md_long_jump_size @itemx md_create_short_jump @itemx md_create_long_jump +@itemx TC_CHECK_ADJUSTED_BROKEN_DOT_WORD @cindex WORKING_DOT_WORD @cindex md_short_jump_size @cindex md_long_jump_size @cindex md_create_short_jump @cindex md_create_long_jump +@cindex TC_CHECK_ADJUSTED_BROKEN_DOT_WORD If @code{WORKING_DOT_WORD} is defined, GAS will not do broken word processing (@pxref{Broken words}). Otherwise, you should set @code{md_short_jump_size} to the size of a short jump (a jump that is just long enough to jump around a @@ -1145,6 +1153,10 @@ number of long jumps) and @code{md_long_jump_size} to the size of a long jump (a jump that can go anywhere in the function). You should define @code{md_create_short_jump} to create a short jump around a number of long jumps, and define @code{md_create_long_jump} to create a long jump. +If defined, the macro TC_CHECK_ADJUSTED_BROKEN_DOT_WORD will be called for each +adjusted word just before the word is output. The macro takes two arguments, +an @code{addressT} with the adjusted word and a pointer to the current +@code{struct broken_word}. @item md_estimate_size_before_relax @cindex md_estimate_size_before_relax @@ -1177,6 +1189,15 @@ If you define this macro, and the global variable @samp{linkrelax} is set @samp{.align} directive will cause extra space to be allocated. The linker can then discard this space when relaxing the section. +@item TC_LINKRELAX_FIXUP (@var{segT}) +@cindex TC_LINKRELAX_FIXUP +If defined, this macro allows control over whether fixups for a +given section will be processed when the @var{linkrelax} variable is +set. The macro is given the N_TYPE bits for the section in its +@var{segT} argument. If the macro evaluates to a non-zero value +then the fixups will be converted into relocs, otherwise they will +be passed to @var{md_apply_fix3} as normal. + @item md_convert_frag @cindex md_convert_frag GAS will call this for each rs_machine_dependent fragment. @@ -1251,7 +1272,7 @@ size. @cindex md_macro_start If defined, GAS will call this macro when it starts to include a macro expansion. @code{macro_nest} indicates the current macro nesting level, which -includes the one being expanded. +includes the one being expanded. @item md_macro_info @cindex md_macro_info @@ -1263,7 +1284,7 @@ macro (macro_entry *), which includes expansion of the formal arguments. @item md_macro_end @cindex md_macro_end Complement to md_macro_start. If defined, it is called when finished -processing an inserted macro expansion, just before decrementing macro_nest. +processing an inserted macro expansion, just before decrementing macro_nest. @item DOUBLEBAR_PARALLEL @cindex DOUBLEBAR_PARALLEL @@ -1332,6 +1353,13 @@ source line. The default value is 4. @item LISTING_RHS_WIDTH The maximum number of characters to print from one line of the input file. The default value is 100. + +@item TC_COFF_SECTION_DEFAULT_ATTRIBUTES +@cindex TC_COFF_SECTION_DEFAULT_ATTRIBUTES +The COFF @code{.section} directive will use the value of this macro to set +a new section's attributes when a directive has no valid flags or when the +flag is @code{w}. The default value of the macro is @code{SEC_LOAD | SEC_DATA}. + @end table @node Object format backend @@ -1400,8 +1428,8 @@ generate a @code{.file} symbol if none was generated previously. @item SEPARATE_STAB_SECTIONS @cindex SEPARATE_STAB_SECTIONS -You may define this macro to indicate that stabs should be placed in separate -sections, as in ELF. +You may define this macro to a nonzero value to indicate that stabs should be +placed in separate sections, as in ELF. @item INIT_STAB_SECTION @cindex INIT_STAB_SECTION @@ -1573,6 +1601,16 @@ called to convert the frag to an @code{rs_fill} frag with no variant part. Sometimes changing addressing modes may also require rewriting the instruction. It can be accessed via @code{fr_opcode} or @code{fr_fix}. +If you generate frags separately for the basic insn opcode and any relaxable +operands, do not call @code{fix_new} thinking you can emit fixups for the +opcode field from the relaxable frag. It is not garanteed to be the same frag. +If you need to emit fixups for the opcode field from inspection of the +relaxable frag, then you need to generate a common frag for both the basic +opcode and relaxable fields, or you need to provide the frag for the opcode to +pass to @code{fix_new}. The latter can be done for example by defining +@code{TC_FRAG_TYPE} to include a pointer to it and defining @code{TC_FRAG_INIT} +to set the pointer. + Sometimes @code{fr_var} is increased instead, and @code{frag_wane} is not called. I'm not sure, but I think this is to keep @code{fr_fix} referring to an earlier byte, and @code{fr_subtype} set to @code{rs_machine_dependent} so diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c index b83175a..e44574d 100644 --- a/contrib/binutils/gas/dwarf2dbg.c +++ b/contrib/binutils/gas/dwarf2dbg.c @@ -28,8 +28,21 @@ FILENO is the filenumber. */ #include "ansidecl.h" - #include "as.h" + +#ifdef HAVE_LIMITS_H +#include <limits.h> +#else +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifndef INT_MAX +#define INT_MAX (int) (((unsigned) (-1)) >> 1) +#endif +#endif + +#ifdef BFD_ASSEMBLER + #include "dwarf2dbg.h" #include "subsegs.h" @@ -63,7 +76,7 @@ #ifndef DWARF2_LINE_MIN_INSN_LENGTH /* Define the architecture-dependent minimum instruction length (in bytes). This value should be rather too small than too big. */ -# define DWARF2_LINE_MIN_INSN_LENGTH 4 +# define DWARF2_LINE_MIN_INSN_LENGTH 1 #endif /* Flag that indicates the initial value of the is_stmt_start flag. @@ -72,12 +85,6 @@ is not made available by the GCC front-end. */ #define DWARF2_LINE_DEFAULT_IS_STMT 1 -/* Flag that indicates the initial value of the is_stmt_start flag. - In the present implementation, we do not mark any lines as - the beginning of a source statement, because that information - is not made available by the GCC front-end. */ -#define DWARF2_LINE_DEFAULT_IS_STMT 1 - /* Given a special op, return the line skip amount. */ #define SPECIAL_LINE(op) \ (((op) - DWARF2_LINE_OPCODE_BASE)%DWARF2_LINE_RANGE + DWARF2_LINE_BASE) @@ -89,682 +96,1213 @@ /* The maximum address skip amount that can be encoded with a special op. */ #define MAX_SPECIAL_ADDR_DELTA SPECIAL_ADDR(255) -#define INITIAL_STATE \ - /* Initialize as per DWARF2.0 standard. */ \ - 0, /* address */ \ - 1, /* file */ \ - 1, /* line */ \ - 0, /* column */ \ - DWARF2_LINE_DEFAULT_IS_STMT, /* is_stmt */ \ - 0, /* basic_block */ \ - 1 /* empty_sequence */ - -static struct - { - /* state machine state as per DWARF2 manual: */ - struct dwarf2_sm - { - addressT addr; - unsigned int filenum; - unsigned int line; - unsigned int column; - unsigned int - is_stmt : 1, - basic_block : 1, - empty_sequence : 1; /* current code sequence has no DWARF2 directives? */ - } - sm; - - unsigned int - any_dwarf2_directives : 1; /* did we emit any DWARF2 line debug directives? */ - - fragS * frag; /* frag that "addr" is relative to */ - segT text_seg; /* text segment "addr" is relative to */ - subsegT text_subseg; - segT line_seg; /* ".debug_line" segment */ - int last_filename; /* index of last filename that was used */ - int num_filenames; /* index of last filename in use */ - int filename_len; /* length of the filename array */ - struct - { - int dir; /* valid after gen_dir_list() only */ - char *name; /* full path before gen_dir_list(), filename afterwards */ - } - *file; +struct line_entry { + struct line_entry *next; + fragS *frag; + addressT frag_ofs; + struct dwarf2_line_info loc; +}; + +struct line_subseg { + struct line_subseg *next; + subsegT subseg; + struct line_entry *head; + struct line_entry **ptail; +}; + +struct line_seg { + struct line_seg *next; + segT seg; + struct line_subseg *head; + symbolS *text_start; + symbolS *text_end; +}; + +/* Collects data for all line table entries during assembly. */ +static struct line_seg *all_segs; + +struct file_entry { + char *filename; + unsigned int dir; +}; + +/* Table of files used by .debug_line. */ +static struct file_entry *files; +static unsigned int files_in_use; +static unsigned int files_allocated; + +/* True when we've seen a .loc directive recently. Used to avoid + doing work when there's nothing to do. */ +static boolean loc_directive_seen; + +/* Current location as indicated by the most recent .loc directive. */ +static struct dwarf2_line_info current; + +/* Fake label name. */ +static char const fake_label_name[] = ".L0\001"; + +/* The size of an address on the target. */ +static unsigned int sizeof_address; + +static struct line_subseg *get_line_subseg PARAMS ((segT, subsegT)); +static unsigned int get_filenum PARAMS ((const char *)); +static struct frag *first_frag_for_seg PARAMS ((segT)); +static struct frag *last_frag_for_seg PARAMS ((segT)); +static void out_byte PARAMS ((int)); +static void out_opcode PARAMS ((int)); +static void out_two PARAMS ((int)); +static void out_four PARAMS ((int)); +static void out_abbrev PARAMS ((int, int)); +static void out_uleb128 PARAMS ((addressT)); +static symbolS *symbol_new_now PARAMS ((void)); +static void set_symbol_value_now PARAMS ((symbolS *)); +static offsetT get_frag_fix PARAMS ((fragS *)); +static void out_set_addr PARAMS ((segT, fragS *, addressT)); +static int size_inc_line_addr PARAMS ((int, addressT)); +static void emit_inc_line_addr PARAMS ((int, addressT, char *, int)); +static void out_inc_line_addr PARAMS ((int, addressT)); +static void relax_inc_line_addr PARAMS ((int, segT, fragS *, addressT, + fragS *, addressT)); +static void process_entries PARAMS ((segT, struct line_entry *)); +static void out_file_list PARAMS ((void)); +static void out_debug_line PARAMS ((segT)); +static void out_debug_aranges PARAMS ((segT, segT)); +static void out_debug_abbrev PARAMS ((segT)); +static void out_debug_info PARAMS ((segT, segT, segT)); + +/* Find or create an entry for SEG+SUBSEG in ALL_SEGS. */ + +static struct line_subseg * +get_line_subseg (seg, subseg) + segT seg; + subsegT subseg; +{ + static segT last_seg; + static subsegT last_subseg; + static struct line_subseg *last_line_subseg; - struct dwarf2_line_info current; /* current source info: */ + struct line_seg *s; + struct line_subseg **pss, *ss; - /* counters for statistical purposes: */ - unsigned int num_line_entries; - unsigned int opcode_hist[256]; /* histogram of opcode frequencies */ - } -ls = - { - { - INITIAL_STATE - }, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - NULL, - { NULL, 0, 0, 0, 0 }, - 0, + if (seg == last_seg && subseg == last_subseg) + return last_line_subseg; + + for (s = all_segs; s; s = s->next) + if (s->seg == seg) + goto found_seg; + + s = (struct line_seg *) xmalloc (sizeof (*s)); + s->next = all_segs; + s->seg = seg; + s->head = NULL; + all_segs = s; + + found_seg: + for (pss = &s->head; (ss = *pss) != NULL ; pss = &ss->next) { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + if (ss->subseg == subseg) + goto found_subseg; + if (ss->subseg > subseg) + break; } - }; + ss = (struct line_subseg *) xmalloc (sizeof (*ss)); + ss->next = *pss; + ss->subseg = subseg; + ss->head = NULL; + ss->ptail = &ss->head; + *pss = ss; -/* Function prototypes: */ -static void out_uleb128 PARAMS ((addressT)); -static void out_sleb128 PARAMS ((offsetT)); -static void gen_addr_line PARAMS ((int, addressT)); -static void reset_state_machine PARAMS ((void)); -static void out_set_addr PARAMS ((addressT)); -static void out_end_sequence PARAMS ((void)); -static int get_filenum PARAMS ((int, char *)); -static void gen_dir_list PARAMS ((void)); -static void gen_file_list PARAMS ((void)); -static void print_stats PARAMS ((unsigned long)); + found_subseg: + last_seg = seg; + last_subseg = subseg; + last_line_subseg = ss; + return ss; +} -#define out_byte(byte) FRAG_APPEND_1_CHAR(byte) -#define out_opcode(opc) (out_byte ((opc)), ++ls.opcode_hist[(opc) & 0xff]) +/* Record an entry for LOC ocurring at OFS within the current fragment. */ -/* Output an unsigned "little-endian base 128" number. */ -static void -out_uleb128 (value) - addressT value; +void +dwarf2_gen_line_info (ofs, loc) + addressT ofs; + struct dwarf2_line_info *loc; { - unsigned char byte, more = 0x80; + struct line_subseg *ss; + struct line_entry *e; + + /* Early out for as-yet incomplete location information. */ + if (loc->filenum == 0 || loc->line == 0) + return; - do + e = (struct line_entry *) xmalloc (sizeof (*e)); + e->next = NULL; + e->frag = frag_now; + e->frag_ofs = ofs; + e->loc = *loc; + + ss = get_line_subseg (now_seg, now_subseg); + *ss->ptail = e; + ss->ptail = &e->next; +} + +void +dwarf2_where (line) + struct dwarf2_line_info *line; +{ + if (debug_type == DEBUG_DWARF2) { - byte = value & 0x7f; - value >>= 7; - if (value == 0) - more = 0; - out_byte (more | byte); + char *filename; + as_where (&filename, &line->line); + line->filenum = get_filenum (filename); + line->column = 0; + line->flags = DWARF2_FLAG_BEGIN_STMT; } - while (more); + else + *line = current; } -/* Output a signed "little-endian base 128" number. */ -static void -out_sleb128 (value) - offsetT value; +/* Called for each machine instruction, or relatively atomic group of + machine instructions (ie built-in macro). The instruction or group + is SIZE bytes in length. If dwarf2 line number generation is called + for, emit a line statement appropriately. */ + +void +dwarf2_emit_insn (size) + int size; { - unsigned char byte, more = 0x80; + struct dwarf2_line_info loc; + + if (debug_type != DEBUG_DWARF2 && ! loc_directive_seen) + return; + loc_directive_seen = false; + + dwarf2_where (&loc); + dwarf2_gen_line_info (frag_now_fix () - size, &loc); +} + +/* Get a .debug_line file number for FILENAME. */ - do +static unsigned int +get_filenum (filename) + const char *filename; +{ + static unsigned int last_used; + unsigned int i; + + if (last_used) + if (strcmp (filename, files[last_used].filename) == 0) + return last_used; + + for (i = 1; i < files_in_use; ++i) + if (strcmp (filename, files[i].filename) == 0) + return i; + + if (i >= files_allocated) { - byte = value & 0x7f; - value >>= 7; - if (((value == 0) && ((byte & 0x40) == 0)) - || ((value == -1) && ((byte & 0x40) != 0))) - more = 0; - out_byte (more | byte); + unsigned int old = files_allocated; + + files_allocated = i + 32; + files = (struct file_entry *) + xrealloc (files, (i + 32) * sizeof (struct file_entry)); + + memset (files + old, 0, (i + 32 - old) * sizeof (struct file_entry)); } - while (more); + + files[i].filename = xstrdup (filename); + files[i].dir = 0; + files_in_use = i + 1; + last_used = i; + + return i; } -/* Encode a pair of line and address skips as efficiently as possible. - Note that the line skip is signed, whereas the address skip is - unsigned. */ -static void -gen_addr_line (line_delta, addr_delta) - int line_delta; - addressT addr_delta; -{ - unsigned int tmp, opcode; +/* Handle the .file directive. */ - tmp = line_delta - DWARF2_LINE_BASE; +void +dwarf2_directive_file (dummy) + int dummy ATTRIBUTE_UNUSED; +{ + offsetT num; + const char *filename; + int filename_len; - if (tmp >= DWARF2_LINE_RANGE) + /* Continue to accept a bare string and pass it off. */ + SKIP_WHITESPACE (); + if (*input_line_pointer == '"') { - out_opcode (DW_LNS_advance_line); - out_sleb128 (line_delta); - tmp = 0 - DWARF2_LINE_BASE; - line_delta = 0; + s_app_file (0); + return; } - tmp += DWARF2_LINE_OPCODE_BASE; + num = get_absolute_expression (); + filename = demand_copy_C_string (&filename_len); + demand_empty_rest_of_line (); - /* try using a special opcode: */ - opcode = tmp + addr_delta*DWARF2_LINE_RANGE; - if (opcode <= 255) + if (num < 1) { - out_opcode (opcode); + as_bad (_("File number less than one")); return; } - /* try using DW_LNS_const_add_pc followed by special op: */ - opcode = tmp + (addr_delta - MAX_SPECIAL_ADDR_DELTA)*DWARF2_LINE_RANGE; - if (opcode <= 255) + if (num < files_in_use && files[num].filename != 0) { - out_opcode (DW_LNS_const_add_pc); - out_opcode (opcode); + as_bad (_("File number %d already allocated"), num); return; } - out_opcode (DW_LNS_advance_pc); - out_uleb128 (addr_delta); + if (num >= (int) files_allocated) + { + unsigned int old = files_allocated; - if (line_delta) - out_opcode (tmp); /* output line-delta */ - else - out_opcode (DW_LNS_copy); /* append new row with current info */ + files_allocated = num + 16; + files = (struct file_entry *) + xrealloc (files, (num + 16) * sizeof (struct file_entry)); + + /* Zero the new memory. */ + memset (files + old, 0, (num + 16 - old) * sizeof (struct file_entry)); + } + + files[num].filename = filename; + files[num].dir = 0; + files_in_use = num + 1; } -static void -reset_state_machine () +void +dwarf2_directive_loc (dummy) + int dummy ATTRIBUTE_UNUSED; { - static const struct dwarf2_sm initial_state = { INITIAL_STATE }; + offsetT filenum, line, column; + + filenum = get_absolute_expression (); + SKIP_WHITESPACE (); + line = get_absolute_expression (); + SKIP_WHITESPACE (); + column = get_absolute_expression (); + demand_empty_rest_of_line (); + + if (filenum < 1) + { + as_bad (_("File number less than one")); + return; + } + if (filenum >= (int) files_in_use || files[filenum].filename == 0) + { + as_bad (_("Unassigned file number %ld"), (long) filenum); + return; + } + + current.filenum = filenum; + current.line = line; + current.column = column; + current.flags = DWARF2_FLAG_BEGIN_STMT; - ls.sm = initial_state; + loc_directive_seen = true; + +#ifndef NO_LISTING + if (listing) + listing_source_line (line); +#endif } + +static struct frag * +first_frag_for_seg (seg) + segT seg; +{ + frchainS *f, *first = NULL; -/* Set an absolute address (may results in a relocation entry): */ -static void -out_set_addr (addr) - addressT addr; + for (f = frchain_root; f; f = f->frch_next) + if (f->frch_seg == seg + && (! first || first->frch_subseg > f->frch_subseg)) + first = f; + + return first ? first->frch_root : NULL; +} + +static struct frag * +last_frag_for_seg (seg) + segT seg; { - subsegT saved_subseg; - segT saved_seg; - expressionS expr; - symbolS *sym; - int bytes_per_address; + frchainS *f, *last = NULL; - saved_seg = now_seg; - saved_subseg = now_subseg; + for (f = frchain_root; f; f = f->frch_next) + if (f->frch_seg == seg + && (! last || last->frch_subseg < f->frch_subseg)) + last= f; - subseg_set (ls.text_seg, ls.text_subseg); - sym = symbol_new (".L0\001", now_seg, addr, frag_now); + return last ? last->frch_last : NULL; +} + +/* Emit a single byte into the current segment. */ - subseg_set (saved_seg, saved_subseg); +static inline void +out_byte (byte) + int byte; +{ + FRAG_APPEND_1_CHAR (byte); +} -#ifdef BFD_ASSEMBLER - bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8; -#else - /* FIXME. */ - bytes_per_address = 4; -#endif +/* Emit a statement program opcode into the current segment. */ - out_opcode (DW_LNS_extended_op); - out_uleb128 (bytes_per_address + 1); +static inline void +out_opcode (opc) + int opc; +{ + out_byte (opc); +} - out_opcode (DW_LNE_set_address); - expr.X_op = O_symbol; - expr.X_add_symbol = sym; - expr.X_add_number = 0; - emit_expr (&expr, bytes_per_address); +/* Emit a two-byte word into the current segment. */ + +static inline void +out_two (data) + int data; +{ + md_number_to_chars (frag_more (2), data, 2); } -/* Emit DW_LNS_end_sequence and reset state machine. Does not - preserve the current segment/sub-segment! */ +/* Emit a four byte word into the current segment. */ + +static inline void +out_four (data) + int data; +{ + md_number_to_chars (frag_more (4), data, 4); +} + +/* Emit an unsigned "little-endian base 128" number. */ + static void -out_end_sequence () +out_uleb128 (value) + addressT value; { - addressT addr, delta; - fragS *text_frag; + output_leb128 (frag_more (sizeof_leb128 (value, 0)), value, 0); +} - if (ls.text_seg) - { - subseg_set (ls.text_seg, ls.text_subseg); -#ifdef md_current_text_addr - addr = md_current_text_addr (); -#else - addr = frag_now_fix (); -#endif - text_frag = frag_now; - subseg_set (ls.line_seg, DL_BODY); - if (text_frag != ls.frag) - { - out_set_addr (addr); - ls.sm.addr = addr; - ls.frag = text_frag; - } - else - { - delta = (addr - ls.sm.addr) / DWARF2_LINE_MIN_INSN_LENGTH; - if (delta > 0) - { - /* Advance address without updating the line-debug - matrix---the end_sequence entry is used only to tell - the debugger the end of the sequence.*/ - out_opcode (DW_LNS_advance_pc); - out_uleb128 (delta); - } - } - } - else - subseg_set (ls.line_seg, DL_BODY); +/* Emit a tuple for .debug_abbrev. */ - out_opcode (DW_LNS_extended_op); - out_uleb128 (1); - out_byte (DW_LNE_end_sequence); +static inline void +out_abbrev (name, form) + int name, form; +{ + out_uleb128 (name); + out_uleb128 (form); +} - reset_state_machine (); +/* Create a new fake symbol whose value is the current position. */ + +static symbolS * +symbol_new_now () +{ + return symbol_new (fake_label_name, now_seg, frag_now_fix (), frag_now); } -/* Look up a filenumber either by filename or by filenumber. If both - a filenumber and a filename are specified, lookup by filename takes - precedence. If the filename cannot be found, it is added to the - filetable and the filenumber for the new entry is returned. */ -static int -get_filenum (filenum, file) - int filenum; - char *file; +/* Set the value of SYM to the current position in the current segment. */ + +static void +set_symbol_value_now (sym) + symbolS *sym; { - int i, last = filenum - 1; - char char0 = file[0]; + S_SET_SEGMENT (sym, now_seg); + S_SET_VALUE (sym, frag_now_fix ()); + symbol_set_frag (sym, frag_now); +} - /* If filenum is out of range of the filename table, then try using the - table entry returned from the previous call. */ - if (last >= ls.num_filenames || last < 0) - last = ls.last_filename; +/* Get the size of a fragment. */ - /* Do a quick check against the specified or previously used filenum. */ - if (ls.num_filenames > 0 && ls.file[last].name[0] == char0 - && strcmp (ls.file[last].name + 1, file + 1) == 0) - return last + 1; +static offsetT +get_frag_fix (frag) + fragS *frag; +{ + frchainS *fr; - /* no match, fall back to simple linear scan: */ - for (i = 0; i < ls.num_filenames; ++i) - { - if (ls.file[i].name[0] == char0 - && strcmp (ls.file[i].name + 1, file + 1) == 0) - { - ls.last_filename = i; - return i + 1; - } - } + if (frag->fr_next) + return frag->fr_fix; - /* no match: enter new filename */ - if (ls.num_filenames >= ls.filename_len) - { - ls.filename_len += 13; - ls.file = xrealloc (ls.file, ls.filename_len * sizeof (ls.file[0])); - } - ls.file[ls.num_filenames].dir = 0; - ls.file[ls.num_filenames].name = file; - ls.last_filename = ls.num_filenames; - return ++ls.num_filenames; + /* If a fragment is the last in the chain, special measures must be + taken to find its size before relaxation, since it may be pending + on some subsegment chain. */ + for (fr = frchain_root; fr; fr = fr->frch_next) + if (fr->frch_last == frag) + { + return ((char *) obstack_next_free (&fr->frch_obstack) + - frag->fr_literal); + } + + abort (); } -/* Emit an entry in the line number table if the address or line has changed. - ADDR is relative to the current frag in the text section. */ +/* Set an absolute address (may result in a relocation entry). */ -void -dwarf2_gen_line_info (addr, l) - addressT addr; - struct dwarf2_line_info *l; +static void +out_set_addr (seg, frag, ofs) + segT seg; + fragS *frag; + addressT ofs; { - unsigned int filenum = l->filenum; - unsigned int any_output = 0; - subsegT saved_subseg; - segT saved_seg; - fragS *saved_frag; + expressionS expr; + symbolS *sym; - if (flag_debug) - fprintf (stderr, "line: addr %lx file `%s' line %u col %u flags %x\n", - (unsigned long) addr, l->filename, l->line, l->column, l->flags); + sym = symbol_new (fake_label_name, seg, ofs, frag); - if (filenum > 0 && !l->filename) - { - if (filenum >= (unsigned int) ls.num_filenames) - { - as_warn ("Encountered bad file number in line number debug info!"); - return; - } - } - else if (l->filename) - filenum = get_filenum (filenum, l->filename); - else - return; /* no filename, no filnum => no play */ + out_opcode (DW_LNS_extended_op); + out_uleb128 (sizeof_address + 1); - /* Must save these before the subseg_new call, as that call will change - them. */ - saved_seg = now_seg; - saved_subseg = now_subseg; - saved_frag = frag_now; + out_opcode (DW_LNE_set_address); + expr.X_op = O_symbol; + expr.X_add_symbol = sym; + expr.X_add_number = 0; + emit_expr (&expr, sizeof_address); +} - if (!ls.line_seg) - { -#ifdef BFD_ASSEMBLER - symbolS *secsym; -#endif +/* Encode a pair of line and address skips as efficiently as possible. + Note that the line skip is signed, whereas the address skip is unsigned. - ls.line_seg = subseg_new (".debug_line", 0); + The following two routines *must* be kept in sync. This is + enforced by making emit_inc_line_addr abort if we do not emit + exactly the expected number of bytes. */ -#ifdef BFD_ASSEMBLER - bfd_set_section_flags (stdoutput, ls.line_seg, SEC_READONLY); +static int +size_inc_line_addr (line_delta, addr_delta) + int line_delta; + addressT addr_delta; +{ + unsigned int tmp, opcode; + int len = 0; - /* We're going to need this symbol. */ - secsym = symbol_find (".debug_line"); - if (secsym != NULL) - symbol_set_bfdsym (secsym, ls.line_seg->symbol); - else - symbol_table_insert (section_symbol (ls.line_seg)); + /* Scale the address delta by the minimum instruction length. */ +#if DWARF2_LINE_MIN_INSN_LENGTH > 1 + assert (addr_delta % DWARF2_LINE_MIN_INSN_LENGTH == 0); + addr_delta /= DWARF2_LINE_MIN_INSN_LENGTH; #endif - } - - subseg_set (ls.line_seg, DL_BODY); - if (ls.text_seg != saved_seg || ls.text_subseg != saved_subseg) + /* INT_MAX is a signal that this is actually a DW_LNE_end_sequence. + We cannot use special opcodes here, since we want the end_sequence + to emit the matrix entry. */ + if (line_delta == INT_MAX) { - if (!ls.sm.empty_sequence) - { - out_end_sequence (); /* terminate previous sequence */ - ls.sm.empty_sequence = 1; - } - any_output = 1; - ls.text_seg = saved_seg; - ls.text_subseg = saved_subseg; - out_set_addr (addr); - ls.sm.addr = addr; - ls.frag = saved_frag; + if (addr_delta == MAX_SPECIAL_ADDR_DELTA) + len = 1; + else + len = 1 + sizeof_leb128 (addr_delta, 0); + return len + 3; } - if (ls.sm.filenum != filenum) + /* Bias the line delta by the base. */ + tmp = line_delta - DWARF2_LINE_BASE; + + /* If the line increment is out of range of a special opcode, we + must encode it with DW_LNS_advance_line. */ + if (tmp >= DWARF2_LINE_RANGE) { - any_output = 1; - out_opcode (DW_LNS_set_file); - out_uleb128 (filenum); - ls.sm.filenum = filenum; + len = 1 + sizeof_leb128 (line_delta, 1); + line_delta = 0; + tmp = 0 - DWARF2_LINE_BASE; } - if (ls.sm.column != l->column) + /* Bias the opcode by the special opcode base. */ + tmp += DWARF2_LINE_OPCODE_BASE; + + /* Avoid overflow when addr_delta is large. */ + if (addr_delta < 256 + MAX_SPECIAL_ADDR_DELTA) { - any_output = 1; - out_opcode (DW_LNS_set_column); - out_uleb128 (l->column); - ls.sm.column = l->column; + /* Try using a special opcode. */ + opcode = tmp + addr_delta * DWARF2_LINE_RANGE; + if (opcode <= 255) + return len + 1; + + /* Try using DW_LNS_const_add_pc followed by special op. */ + opcode = tmp + (addr_delta - MAX_SPECIAL_ADDR_DELTA) * DWARF2_LINE_RANGE; + if (opcode <= 255) + return len + 2; } - if (((l->flags & DWARF2_FLAG_BEGIN_STMT) != 0) != ls.sm.is_stmt) + /* Otherwise use DW_LNS_advance_pc. */ + len += 1 + sizeof_leb128 (addr_delta, 0); + + /* DW_LNS_copy or special opcode. */ + len += 1; + + return len; +} + +static void +emit_inc_line_addr (line_delta, addr_delta, p, len) + int line_delta; + addressT addr_delta; + char *p; + int len; +{ + unsigned int tmp, opcode; + int need_copy = 0; + char *end = p + len; + +#if DWARF2_LINE_MIN_INSN_LENGTH > 1 + /* Scale the address delta by the minimum instruction length. */ + assert (addr_delta % DWARF2_LINE_MIN_INSN_LENGTH == 0); + addr_delta /= DWARF2_LINE_MIN_INSN_LENGTH; +#endif + /* INT_MAX is a signal that this is actually a DW_LNE_end_sequence. + We cannot use special opcodes here, since we want the end_sequence + to emit the matrix entry. */ + if (line_delta == INT_MAX) { - any_output = 1; - out_opcode (DW_LNS_negate_stmt); + if (addr_delta == MAX_SPECIAL_ADDR_DELTA) + *p++ = DW_LNS_const_add_pc; + else + { + *p++ = DW_LNS_advance_pc; + p += output_leb128 (p, addr_delta, 0); + } + + *p++ = DW_LNS_extended_op; + *p++ = 1; + *p++ = DW_LNE_end_sequence; + goto done; } - if (l->flags & DWARF2_FLAG_BEGIN_BLOCK) + /* Bias the line delta by the base. */ + tmp = line_delta - DWARF2_LINE_BASE; + + /* If the line increment is out of range of a special opcode, we + must encode it with DW_LNS_advance_line. */ + if (tmp >= DWARF2_LINE_RANGE) { - any_output = 1; - out_opcode (DW_LNS_set_basic_block); + *p++ = DW_LNS_advance_line; + p += output_leb128 (p, line_delta, 1); + + /* Prettier, I think, to use DW_LNS_copy instead of a + "line +0, addr +0" special opcode. */ + if (addr_delta == 0) + { + *p++ = DW_LNS_copy; + goto done; + } + + line_delta = 0; + tmp = 0 - DWARF2_LINE_BASE; + need_copy = 1; } - if (ls.sm.line != l->line) + /* Bias the opcode by the special opcode base. */ + tmp += DWARF2_LINE_OPCODE_BASE; + + /* Avoid overflow when addr_delta is large. */ + if (addr_delta < 256 + MAX_SPECIAL_ADDR_DELTA) { - any_output = 1; - if (saved_frag != ls.frag) + /* Try using a special opcode. */ + opcode = tmp + addr_delta * DWARF2_LINE_RANGE; + if (opcode <= 255) + { + *p++ = opcode; + goto done; + } + + /* Try using DW_LNS_const_add_pc followed by special op. */ + opcode = tmp + (addr_delta - MAX_SPECIAL_ADDR_DELTA) * DWARF2_LINE_RANGE; + if (opcode <= 255) { - /* If a new frag got allocated (for whatever reason), then - deal with it by generating a reference symbol. Note: no - end_sequence needs to be generated because the address did - not really decrease (only the reference point changed). */ - out_set_addr (addr); - ls.sm.addr = addr; - ls.frag = saved_frag; + *p++ = DW_LNS_const_add_pc; + *p++ = opcode; + goto done; } - gen_addr_line (l->line - ls.sm.line, - (addr - ls.sm.addr) / DWARF2_LINE_MIN_INSN_LENGTH); - ls.sm.basic_block = 0; - ls.sm.line = l->line; - ls.sm.addr = addr; } - subseg_set (saved_seg, saved_subseg); + /* Otherwise use DW_LNS_advance_pc. */ + *p++ = DW_LNS_advance_pc; + p += output_leb128 (p, addr_delta, 0); - ls.num_line_entries += any_output; - if (any_output) - ls.sm.empty_sequence = 0; + if (need_copy) + *p++ = DW_LNS_copy; + else + *p++ = tmp; + + done: + assert (p == end); } +/* Handy routine to combine calls to the above two routines. */ + static void -gen_dir_list () +out_inc_line_addr (line_delta, addr_delta) + int line_delta; + addressT addr_delta; { - char *str, *slash, *dir_list, *dp, *cp; - int i, j, num_dirs; + int len = size_inc_line_addr (line_delta, addr_delta); + emit_inc_line_addr (line_delta, addr_delta, frag_more (len), len); +} + +/* Generate a variant frag that we can use to relax address/line + increments between fragments of the target segment. */ + +static void +relax_inc_line_addr (line_delta, seg, to_frag, to_ofs, from_frag, from_ofs) + int line_delta; + segT seg; + fragS *to_frag, *from_frag; + addressT to_ofs, from_ofs; +{ + symbolS *to_sym, *from_sym; + expressionS expr; + int max_chars; + + to_sym = symbol_new (fake_label_name, seg, to_ofs, to_frag); + from_sym = symbol_new (fake_label_name, seg, from_ofs, from_frag); + + expr.X_op = O_subtract; + expr.X_add_symbol = to_sym; + expr.X_op_symbol = from_sym; + expr.X_add_number = 0; + + /* The maximum size of the frag is the line delta with a maximum + sized address delta. */ + max_chars = size_inc_line_addr (line_delta, -DWARF2_LINE_MIN_INSN_LENGTH); + + frag_var (rs_dwarf2dbg, max_chars, max_chars, 1, + make_expr_symbol (&expr), line_delta, NULL); +} - dir_list = frag_more (0); - num_dirs = 0; +/* The function estimates the size of a rs_dwarf2dbg variant frag + based on the current values of the symbols. It is called before + the relaxation loop. We set fr_subtype to the expected length. */ - for (i = 0; i < ls.num_filenames; ++i) +int +dwarf2dbg_estimate_size_before_relax (frag) + fragS *frag; +{ + offsetT addr_delta; + int size; + + addr_delta = resolve_symbol_value (frag->fr_symbol, 0); + size = size_inc_line_addr (frag->fr_offset, addr_delta); + + frag->fr_subtype = size; + + return size; +} + +/* This function relaxes a rs_dwarf2dbg variant frag based on the + current values of the symbols. fr_subtype is the current length + of the frag. This returns the change in frag length. */ + +int +dwarf2dbg_relax_frag (frag) + fragS *frag; +{ + int old_size, new_size; + + old_size = frag->fr_subtype; + new_size = dwarf2dbg_estimate_size_before_relax (frag); + + return new_size - old_size; +} + +/* This function converts a rs_dwarf2dbg variant frag into a normal + fill frag. This is called after all relaxation has been done. + fr_subtype will be the desired length of the frag. */ + +void +dwarf2dbg_convert_frag (frag) + fragS *frag; +{ + offsetT addr_diff; + + addr_diff = resolve_symbol_value (frag->fr_symbol, 1); + + /* fr_var carries the max_chars that we created the fragment with. + fr_subtype carries the current expected length. We must, of + course, have allocated enough memory earlier. */ + assert (frag->fr_var >= (int) frag->fr_subtype); + + emit_inc_line_addr (frag->fr_offset, addr_diff, + frag->fr_literal + frag->fr_fix, frag->fr_subtype); + + frag->fr_fix += frag->fr_subtype; + frag->fr_type = rs_fill; + frag->fr_var = 0; + frag->fr_offset = 0; +} + +/* Generate .debug_line content for the chain of line number entries + beginning at E, for segment SEG. */ + +static void +process_entries (seg, e) + segT seg; + struct line_entry *e; +{ + unsigned filenum = 1; + unsigned line = 1; + unsigned column = 0; + unsigned flags = DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_BEGIN_STMT : 0; + fragS *frag = NULL; + fragS *last_frag; + addressT frag_ofs = 0; + addressT last_frag_ofs; + struct line_entry *next; + + while (e) { - str = ls.file[i].name; - slash = strrchr (str, '/'); - if (slash) + int changed = 0; + + if (filenum != e->loc.filenum) { - *slash = '\0'; - for (j = 0, dp = dir_list; j < num_dirs; ++j) - { - if (strcmp (str, dp) == 0) - { - ls.file[i].dir = j + 1; - break; - } - dp += strlen (dp); - } - if (j >= num_dirs) + filenum = e->loc.filenum; + out_opcode (DW_LNS_set_file); + out_uleb128 (filenum); + changed = 1; + } + + if (column != e->loc.column) + { + column = e->loc.column; + out_opcode (DW_LNS_set_column); + out_uleb128 (column); + changed = 1; + } + + if ((e->loc.flags ^ flags) & DWARF2_FLAG_BEGIN_STMT) + { + flags = e->loc.flags; + out_opcode (DW_LNS_negate_stmt); + changed = 1; + } + + if (e->loc.flags & DWARF2_FLAG_BEGIN_BLOCK) + { + out_opcode (DW_LNS_set_basic_block); + changed = 1; + } + + if (line != e->loc.line || changed) + { + int line_delta = e->loc.line - line; + if (frag == NULL) { - /* didn't find this directory: append it to the list */ - size_t size = strlen (str) + 1; - cp = frag_more (size); - memcpy (cp, str, size); - ls.file[i].dir = ++num_dirs; + out_set_addr (seg, e->frag, e->frag_ofs); + out_inc_line_addr (line_delta, 0); } - *slash = '/'; - ls.file[i].name = slash + 1; + else if (frag == e->frag) + out_inc_line_addr (line_delta, e->frag_ofs - frag_ofs); + else + relax_inc_line_addr (line_delta, seg, e->frag, e->frag_ofs, + frag, frag_ofs); + + frag = e->frag; + frag_ofs = e->frag_ofs; + line = e->loc.line; + } + else if (frag == NULL) + { + out_set_addr (seg, e->frag, e->frag_ofs); + frag = e->frag; + frag_ofs = e->frag_ofs; } + + next = e->next; + free (e); + e = next; } - out_byte ('\0'); /* terminate directory list */ + + /* Emit a DW_LNE_end_sequence for the end of the section. */ + last_frag = last_frag_for_seg (seg); + last_frag_ofs = get_frag_fix (last_frag); + if (frag == last_frag) + out_inc_line_addr (INT_MAX, last_frag_ofs - frag_ofs); + else + relax_inc_line_addr (INT_MAX, seg, last_frag, last_frag_ofs, + frag, frag_ofs); } +/* Emit the directory and file tables for .debug_line. */ + static void -gen_file_list () +out_file_list () { size_t size; char *cp; - int i; + unsigned int i; + + /* Terminate directory list. */ + out_byte ('\0'); - for (i = 0; i < ls.num_filenames; ++i) + for (i = 1; i < files_in_use; ++i) { - size = strlen (ls.file[i].name) + 1; + if (files[i].filename == NULL) + { + as_bad (_("Unassigned file number %u"), i); + continue; + } + + size = strlen (files[i].filename) + 1; cp = frag_more (size); - memcpy (cp, ls.file[i].name, size); + memcpy (cp, files[i].filename, size); - out_uleb128 (ls.file[i].dir); /* directory number */ + out_uleb128 (files[i].dir); /* directory number */ out_uleb128 (0); /* last modification timestamp */ out_uleb128 (0); /* filesize */ } - out_byte (0); /* terminate filename list */ + + /* Terminate filename list. */ + out_byte (0); } +/* Emit the collected .debug_line data. */ + static void -print_stats (total_size) - unsigned long total_size; +out_debug_line (line_seg) + segT line_seg; { - static const char *opc_name[] = - { - "extended", "copy", "advance_pc", "advance_line", "set_file", - "set_column", "negate_stmt", "set_basic_block", "const_add_pc", - "fixed_advance_pc" - }; - size_t i; - int j; + expressionS expr; + symbolS *line_start; + symbolS *prologue_end; + symbolS *line_end; + struct line_seg *s; + + subseg_set (line_seg, 0); + + line_start = symbol_new_now (); + prologue_end = symbol_make (fake_label_name); + line_end = symbol_make (fake_label_name); + + /* Total length of the information for this compilation unit. */ + expr.X_op = O_subtract; + expr.X_add_symbol = line_end; + expr.X_op_symbol = line_start; + expr.X_add_number = -4; + emit_expr (&expr, 4); + + /* Version. */ + out_two (2); + + /* Length of the prologue following this length. */ + expr.X_op = O_subtract; + expr.X_add_symbol = prologue_end; + expr.X_op_symbol = line_start; + expr.X_add_number = - (4 + 2 + 4); + emit_expr (&expr, 4); + + /* Parameters of the state machine. */ + out_byte (DWARF2_LINE_MIN_INSN_LENGTH); + out_byte (DWARF2_LINE_DEFAULT_IS_STMT); + out_byte (DWARF2_LINE_BASE); + out_byte (DWARF2_LINE_RANGE); + out_byte (DWARF2_LINE_OPCODE_BASE); + + /* Standard opcode lengths. */ + out_byte (0); /* DW_LNS_copy */ + out_byte (1); /* DW_LNS_advance_pc */ + out_byte (1); /* DW_LNS_advance_line */ + out_byte (1); /* DW_LNS_set_file */ + out_byte (1); /* DW_LNS_set_column */ + out_byte (0); /* DW_LNS_negate_stmt */ + out_byte (0); /* DW_LNS_set_basic_block */ + out_byte (0); /* DW_LNS_const_add_pc */ + out_byte (1); /* DW_LNS_fixed_advance_pc */ + + out_file_list (); + + set_symbol_value_now (prologue_end); + + /* For each section, emit a statement program. */ + for (s = all_segs; s; s = s->next) + process_entries (s->seg, s->head->head); + + set_symbol_value_now (line_end); +} + +/* Emit data for .debug_aranges. */ + +static void +out_debug_aranges (aranges_seg, info_seg) + segT aranges_seg; + segT info_seg; +{ + unsigned int addr_size = sizeof_address; + addressT size, skip; + struct line_seg *s; + expressionS expr; + char *p; + + size = 4 + 2 + 4 + 1 + 1; + + skip = 2 * addr_size - (size & (2 * addr_size - 1)); + if (skip == 2 * addr_size) + skip = 0; + size += skip; + + for (s = all_segs; s; s = s->next) + size += 2 * addr_size; + + size += 2 * addr_size; - fprintf (stderr, "Average size: %g bytes/line\n", - total_size / (double) ls.num_line_entries); + subseg_set (aranges_seg, 0); - fprintf (stderr, "\nStandard opcode histogram:\n"); + /* Length of the compilation unit. */ + out_four (size - 4); - for (i = 0; i < sizeof (opc_name)/sizeof (opc_name[0]); ++i) + /* Version. */ + out_two (2); + + /* Offset to .debug_info. */ + expr.X_op = O_symbol; + expr.X_add_symbol = section_symbol (info_seg); + expr.X_add_number = 0; + emit_expr (&expr, 4); + + /* Size of an address (offset portion). */ + out_byte (addr_size); + + /* Size of a segment descriptor. */ + out_byte (0); + + /* Align the header. */ + if (skip) + frag_align (ffs (2 * addr_size) - 1, 0, 0); + + for (s = all_segs; s; s = s->next) { - fprintf (stderr, "%s", opc_name[i]); - for (j = strlen (opc_name[i]); j < 16; ++j) - fprintf (stderr, " "); - fprintf (stderr, ": %u\n", ls.opcode_hist[i]); + fragS *frag; + symbolS *beg, *end; + + frag = first_frag_for_seg (s->seg); + beg = symbol_new (fake_label_name, s->seg, 0, frag); + s->text_start = beg; + + frag = last_frag_for_seg (s->seg); + end = symbol_new (fake_label_name, s->seg, get_frag_fix (frag), frag); + s->text_end = end; + + expr.X_op = O_symbol; + expr.X_add_symbol = beg; + expr.X_add_number = 0; + emit_expr (&expr, addr_size); + + expr.X_op = O_subtract; + expr.X_add_symbol = end; + expr.X_op_symbol = beg; + expr.X_add_number = 0; + emit_expr (&expr, addr_size); } - fprintf (stderr, "\nSpecial opcodes:\naddr\t\t\t\tline skip\n"); + p = frag_more (2 * addr_size); + md_number_to_chars (p, 0, addr_size); + md_number_to_chars (p + addr_size, 0, addr_size); +} + +/* Emit data for .debug_abbrev. Note that this must be kept in + sync with out_debug_info below. */ - fprintf (stderr, "skip: "); - for (j = DWARF2_LINE_BASE; j < DWARF2_LINE_BASE + DWARF2_LINE_RANGE; ++j) - fprintf (stderr, "%3d", j); - fprintf (stderr, "\n-----"); +static void +out_debug_abbrev (abbrev_seg) + segT abbrev_seg; +{ + subseg_set (abbrev_seg, 0); - for (; i < 256; ++i) + out_uleb128 (1); + out_uleb128 (DW_TAG_compile_unit); + out_byte (DW_CHILDREN_no); + out_abbrev (DW_AT_stmt_list, DW_FORM_data4); + if (all_segs->next == NULL) { - j = SPECIAL_LINE (i); - if (j == DWARF2_LINE_BASE) - fprintf (stderr, "\n%4u: ", - ((unsigned int) - DWARF2_LINE_MIN_INSN_LENGTH * SPECIAL_ADDR (i))); - fprintf (stderr, " %2u", ls.opcode_hist[i]); + out_abbrev (DW_AT_low_pc, DW_FORM_addr); + out_abbrev (DW_AT_high_pc, DW_FORM_addr); } - fprintf (stderr, "\n"); + out_abbrev (DW_AT_comp_dir, DW_FORM_string); + out_abbrev (DW_AT_producer, DW_FORM_string); + out_abbrev (DW_AT_language, DW_FORM_data2); + out_abbrev (0, 0); + + /* Terminate the abbreviations for this compilation unit. */ + out_byte (0); } -void -dwarf2_finish () +/* Emit a description of this compilation unit for .debug_info. */ + +static void +out_debug_info (info_seg, abbrev_seg, line_seg) + segT info_seg; + segT abbrev_seg; + segT line_seg; { - addressT body_size, total_size, prolog_size; - subsegT saved_subseg; - segT saved_seg; - char *cp; + char producer[128]; + char *comp_dir; + expressionS expr; + symbolS *info_start; + symbolS *info_end; + char *p; + int len; - if (!ls.line_seg) - /* no .debug_line segment, no work to do... */ - return; + subseg_set (info_seg, 0); - saved_seg = now_seg; - saved_subseg = now_subseg; + info_start = symbol_new_now (); + info_end = symbol_make (fake_label_name); - if (!ls.sm.empty_sequence) - out_end_sequence (); - total_size = body_size = frag_now_fix (); + /* Compilation Unit length. */ + expr.X_op = O_subtract; + expr.X_add_symbol = info_end; + expr.X_op_symbol = info_start; + expr.X_add_number = -4; + emit_expr (&expr, 4); - /* now generate the directory and file lists: */ - subseg_set (ls.line_seg, DL_FILES); - gen_dir_list (); - gen_file_list (); - total_size += frag_now_fix (); + /* DWARF version. */ + out_two (2); - /* and now the header ("statement program prolog", in DWARF2 lingo...) */ - subseg_set (ls.line_seg, DL_PROLOG); + /* .debug_abbrev offset */ + expr.X_op = O_symbol; + expr.X_add_symbol = section_symbol (abbrev_seg); + expr.X_add_number = 0; + emit_expr (&expr, 4); - cp = frag_more (15 + DWARF2_LINE_OPCODE_BASE - 1); + /* Target address size. */ + out_byte (sizeof_address); - total_size += frag_now_fix (); - prolog_size = total_size - body_size - 10; + /* DW_TAG_compile_unit DIE abbrev */ + out_uleb128 (1); -# define STUFF(val,size) md_number_to_chars (cp, val, size); cp += size; - STUFF (total_size - 4, 4); /* length */ - STUFF (2, 2); /* version */ - STUFF (prolog_size, 4); /* prologue_length */ - STUFF (DWARF2_LINE_MIN_INSN_LENGTH, 1); - STUFF (DWARF2_LINE_DEFAULT_IS_STMT, 1); - STUFF (DWARF2_LINE_BASE, 1); - STUFF (DWARF2_LINE_RANGE, 1); - STUFF (DWARF2_LINE_OPCODE_BASE, 1); + /* DW_AT_stmt_list */ + expr.X_op = O_symbol; + expr.X_add_symbol = section_symbol (line_seg); + expr.X_add_number = 0; + emit_expr (&expr, 4); + + /* These two attributes may only be emitted if all of the code is + contiguous. Multiple sections are not that. */ + if (all_segs->next == NULL) + { + /* DW_AT_low_pc */ + expr.X_op = O_symbol; + expr.X_add_symbol = all_segs->text_start; + expr.X_add_number = 0; + emit_expr (&expr, sizeof_address); + + /* DW_AT_high_pc */ + expr.X_op = O_symbol; + expr.X_add_symbol = all_segs->text_end; + expr.X_add_number = 0; + emit_expr (&expr, sizeof_address); + } + + /* DW_AT_comp_dir */ + comp_dir = getpwd (); + len = strlen (comp_dir) + 1; + p = frag_more (len); + memcpy (p, comp_dir, len); - /* standard_opcode_lengths: */ - STUFF (0, 1); /* DW_LNS_copy */ - STUFF (1, 1); /* DW_LNS_advance_pc */ - STUFF (1, 1); /* DW_LNS_advance_line */ - STUFF (1, 1); /* DW_LNS_set_file */ - STUFF (1, 1); /* DW_LNS_set_column */ - STUFF (0, 1); /* DW_LNS_negate_stmt */ - STUFF (0, 1); /* DW_LNS_set_basic_block */ - STUFF (0, 1); /* DW_LNS_const_add_pc */ - STUFF (1, 1); /* DW_LNS_fixed_advance_pc */ + /* DW_AT_producer */ + sprintf (producer, "GNU AS %s", VERSION); + len = strlen (producer) + 1; + p = frag_more (len); + memcpy (p, producer, len); - subseg_set (saved_seg, saved_subseg); + /* DW_AT_language. Yes, this is probably not really MIPS, but the + dwarf2 draft has no standard code for assembler. */ + out_two (DW_LANG_Mips_Assembler); - if (flag_debug) - print_stats (total_size); + set_symbol_value_now (info_end); } void -dwarf2_directive_file (dummy) - int dummy ATTRIBUTE_UNUSED; +dwarf2_finish () { - int len; + segT line_seg; + struct line_seg *s; - /* Continue to accept a bare string and pass it off. */ - SKIP_WHITESPACE (); - if (*input_line_pointer == '"') + /* If no debug information was recorded, nothing to do. */ + if (all_segs == NULL) + return; + + /* Calculate the size of an address for the target machine. */ + sizeof_address = bfd_arch_bits_per_address (stdoutput) / 8; + + /* Create and switch to the line number section. */ + line_seg = subseg_new (".debug_line", 0); + bfd_set_section_flags (stdoutput, line_seg, SEC_READONLY); + + /* For each subsection, chain the debug entries together. */ + for (s = all_segs; s; s = s->next) { - s_app_file (0); - return; + struct line_subseg *ss = s->head; + struct line_entry **ptail = ss->ptail; + + while ((ss = ss->next) != NULL) + { + *ptail = ss->head; + ptail = ss->ptail; + } } - ls.any_dwarf2_directives = 1; + out_debug_line (line_seg); + + /* If this is assembler generated line info, we need .debug_info + and .debug_abbrev sections as well. */ + if (debug_type == DEBUG_DWARF2) + { + segT abbrev_seg; + segT info_seg; + segT aranges_seg; - if (debug_type == DEBUG_NONE) - /* Automatically turn on DWARF2 debug info unless something else - has been selected. */ - debug_type = DEBUG_DWARF2; + info_seg = subseg_new (".debug_info", 0); + abbrev_seg = subseg_new (".debug_abbrev", 0); + aranges_seg = subseg_new (".debug_aranges", 0); - ls.current.filenum = get_absolute_expression (); - ls.current.filename = demand_copy_C_string (&len); + bfd_set_section_flags (stdoutput, info_seg, SEC_READONLY); + bfd_set_section_flags (stdoutput, abbrev_seg, SEC_READONLY); + bfd_set_section_flags (stdoutput, aranges_seg, SEC_READONLY); - demand_empty_rest_of_line (); + record_alignment (aranges_seg, ffs (2 * sizeof_address) - 1); + + out_debug_aranges (aranges_seg, info_seg); + out_debug_abbrev (abbrev_seg); + out_debug_info (info_seg, abbrev_seg, line_seg); + } } +#else void -dwarf2_directive_loc (dummy) - int dummy ATTRIBUTE_UNUSED; +dwarf2_finish () +{ +} + +int +dwarf2dbg_estimate_size_before_relax (frag) + fragS *frag ATTRIBUTE_UNUSED; { - ls.any_dwarf2_directives = 1; + as_fatal (_("dwarf2 is not supported for this object file format")); + return 0; +} - ls.current.filenum = get_absolute_expression (); - SKIP_WHITESPACE (); - ls.current.line = get_absolute_expression (); - SKIP_WHITESPACE (); - ls.current.column = get_absolute_expression (); - demand_empty_rest_of_line (); +int +dwarf2dbg_relax_frag (frag) + fragS *frag ATTRIBUTE_UNUSED; +{ + as_fatal (_("dwarf2 is not supported for this object file format")); + return 0; +} - ls.current.flags = DWARF2_FLAG_BEGIN_STMT; +void +dwarf2dbg_convert_frag (frag) + fragS *frag ATTRIBUTE_UNUSED; +{ + as_fatal (_("dwarf2 is not supported for this object file format")); +} -#ifndef NO_LISTING - if (listing) - listing_source_line (ls.current.line); -#endif +void +dwarf2_emit_insn (size) + int size ATTRIBUTE_UNUSED; +{ } void -dwarf2_where (line) - struct dwarf2_line_info *line; +dwarf2_directive_file (dummy) + int dummy ATTRIBUTE_UNUSED; { - if (ls.any_dwarf2_directives) - *line = ls.current; - else - { - as_where (&line->filename, &line->line); - line->filenum = 0; - line->column = 0; - line->flags = DWARF2_FLAG_BEGIN_STMT; - } + as_fatal (_("dwarf2 is not supported for this object file format")); +} + +void +dwarf2_directive_loc (dummy) + int dummy ATTRIBUTE_UNUSED; +{ + as_fatal (_("dwarf2 is not supported for this object file format")); } +#endif /* BFD_ASSEMBLER */ diff --git a/contrib/binutils/gas/dwarf2dbg.h b/contrib/binutils/gas/dwarf2dbg.h index a3eec1c..cdb76ab 100644 --- a/contrib/binutils/gas/dwarf2dbg.h +++ b/contrib/binutils/gas/dwarf2dbg.h @@ -1,5 +1,5 @@ /* dwarf2dbg.h - DWARF2 debug support - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -26,14 +26,12 @@ #define DWARF2_FLAG_BEGIN_STMT (1 << 0) /* beginning of statement */ #define DWARF2_FLAG_BEGIN_BLOCK (1 << 1) /* beginning of basic block */ -struct dwarf2_line_info - { - char *filename; - unsigned int filenum; - unsigned int line; - unsigned int column; - unsigned int flags; - }; +struct dwarf2_line_info { + unsigned int filenum; + unsigned int line; + unsigned int column; + unsigned int flags; +}; /* Implements the .file FILENO "FILENAME" directive. FILENO can be 0 to indicate that no file number has been assigned. All real file @@ -58,12 +56,17 @@ extern void dwarf2_where PARAMS ((struct dwarf2_line_info *l)); source information passed in the arguments. ADDR should be the frag-relative offset of the instruction the information is for and L is the source information that should be associated with that - address. */ + address. */ extern void dwarf2_gen_line_info PARAMS ((addressT addr, struct dwarf2_line_info *l)); -/* Must be called after all other input is processed to finish up the - .debug_line section. */ +/* Must be called for each generated instruction. */ +extern void dwarf2_emit_insn PARAMS ((int)); + extern void dwarf2_finish PARAMS ((void)); +extern int dwarf2dbg_estimate_size_before_relax PARAMS ((fragS *)); +extern int dwarf2dbg_relax_frag PARAMS ((fragS *)); +extern void dwarf2dbg_convert_frag PARAMS ((fragS *)); + #endif /* AS_DWARF2DBG_H */ diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c index 436c8c4..f04e530 100644 --- a/contrib/binutils/gas/ecoff.c +++ b/contrib/binutils/gas/ecoff.c @@ -161,7 +161,6 @@ tqFar -- 8086 far pointers tqVol -- volatile - The dense number table is used in the front ends, and disappears by the time the .o is created. @@ -256,8 +255,6 @@ 5) index: pointer to a local symbol or aux. entry. - - For the following program: #include <stdio.h> @@ -727,9 +724,9 @@ typedef enum bt { /* States for whether to hash type or not. */ typedef enum hash_state { - hash_no = 0, /* don't hash type */ - hash_yes = 1, /* ok to hash type, or use previous hash */ - hash_record = 2 /* ok to record hash, but don't use prev. */ + hash_no = 0, /* Don't hash type */ + hash_yes = 1, /* OK to hash type, or use previous hash */ + hash_record = 2 /* OK to record hash, but don't use prev. */ } hash_state_t; /* Types of different sized allocation requests. */ @@ -770,7 +767,7 @@ enum aux_type { can't be represented (assuming there are strings > 4096 bytes). */ /* FIXME: Yes, there can be such strings while emitting C++ class debug - info. Templates are the offender here, the test case in question + info. Templates are the offender here, the test case in question having a mangled class name of t7rb_tree4Z4xkeyZt4pair2ZC4xkeyZt7xsocket1Z4UserZt9select1st2Zt4pair\ @@ -799,7 +796,6 @@ typedef struct vlinks { unsigned long start_index; /* starting index # of page */ } vlinks_t; - /* Virtual array header. */ typedef struct varray { vlinks_t *first; /* first page link */ @@ -825,11 +821,9 @@ typedef struct varray { OBJECTS_PER_PAGE (type), /* objects_last_page */ \ } - -/* Master type for indexes within the symbol table. */ +/* Master type for indexes within the symbol table. */ typedef unsigned long symint_t; - /* Linked list support for nested scopes (file, block, structure, etc.). */ typedef struct scope { struct scope *prev; /* previous scope level */ @@ -838,7 +832,6 @@ typedef struct scope { st_t type; /* type of the node */ } scope_t; - /* For a local symbol we store a gas symbol as well as the debugging information we generate. The gas symbol will be NULL if this is only a debugging symbol. */ @@ -855,7 +848,6 @@ typedef struct localsym { EXTR ecoff_sym; /* ECOFF debugging symbol */ } localsym_t; - /* For aux information we keep the type and the data. */ typedef struct ecoff_aux { enum aux_type type; /* aux type */ @@ -872,7 +864,6 @@ typedef struct ecoff_proc { /* Number of proc_t structures allocated. */ static unsigned long proc_cnt; - /* Forward reference list for tags referenced, but not yet defined. */ typedef struct forward { struct forward *next; /* next forward reference */ @@ -881,7 +872,6 @@ typedef struct forward { aux_t *index_ptr; /* pointer to store symbol index */ } forward_t; - /* Linked list support for tags. The first tag in the list is always the current tag for that block. */ typedef struct tag { @@ -895,7 +885,6 @@ typedef struct tag { localsym_t *sym; /* file's local symbols */ } tag_t; - /* Head of a block's linked list of tags. */ typedef struct thead { struct thead *prev; /* previous block */ @@ -903,7 +892,6 @@ typedef struct thead { struct tag *first_tag; /* first tag in block defined */ } thead_t; - /* Union containing pointers to each the small structures which are freed up. */ typedef union small_free { scope_t *f_scope; /* scope structure */ @@ -912,7 +900,6 @@ typedef union small_free { forward_t *f_forward; /* forward tag reference */ } small_free_t; - /* String hash table entry. */ typedef struct shash { @@ -925,7 +912,6 @@ typedef struct shash { proc_t *proc_ptr; /* procedure descriptor pointer */ } shash_t; - /* Type hash table support. The size of the hash table must fit within a page with the other extended file descriptor information. Because unique types which are hashed are fewer in number than @@ -943,7 +929,6 @@ typedef struct thash { symint_t indx; /* index within string table */ } thash_t; - /* Extended file descriptor that contains all of the support necessary to add things to each file separately. */ typedef struct efdr { @@ -967,8 +952,7 @@ typedef struct efdr { } efdr_t; /* Pre-initialized extended file structure. */ -static const efdr_t init_file = -{ +static const efdr_t init_file = { { /* FDR structure */ 0, /* adr: memory address of beginning of file */ 0, /* rss: file name (of source, if known) */ @@ -1015,11 +999,9 @@ static const efdr_t init_file = { 0 }, /* thash_head: type hash table */ }; - static efdr_t *first_file; /* first file descriptor */ static efdr_t **last_file_ptr = &first_file; /* file descriptor tail */ - /* Line number information is kept in a list until the assembly is finished. */ typedef struct lineno_list { @@ -1060,7 +1042,6 @@ typedef union page { lineno_list_t lineno [ PAGE_SIZE / sizeof (lineno_list_t) ]; } page_type; - /* Structure holding allocation information for small sized structures. */ typedef struct alloc_info { char *alloc_name; /* name of this allocation type (must be first) */ @@ -1072,7 +1053,6 @@ typedef struct alloc_info { int total_pages; /* total number of pages allocated */ } alloc_info_t; - /* Type information collected together. */ typedef struct type_info { bt_t basic_type; /* basic type */ @@ -1130,7 +1110,7 @@ static const type_info_t type_info_init = { /* Global hash table for the tags table and global table for file descriptors. */ -static varray_t file_desc = INIT_VARRAY (efdr_t); +static varray_t file_desc = INIT_VARRAY (efdr_t); static struct hash_control *tag_hash; @@ -1143,7 +1123,6 @@ static type_info_t void_type_info; static type_info_t last_func_type_info; static symbolS *last_func_sym_value; - /* Convert COFF basic type to ECOFF basic type. The T_NULL type really should use bt_Void, but this causes the current ecoff GDB to issue unsupported type messages, and the Ultrix 4.00 dbx (aka MIPS @@ -1399,9 +1378,8 @@ static const st_t map_coff_sym_type[] = { st_Nil, /* 106: C_HIDDEN ??? */ }; - /* Keep track of different sized allocation requests. */ -static alloc_info_t alloc_counts[ (int)alloc_type_last ]; +static alloc_info_t alloc_counts[(int) alloc_type_last]; /* Record whether we have seen any debugging information. */ int ecoff_debugging_seen = 0; @@ -1545,8 +1523,8 @@ add_varray_page (vp) #endif new_links->datum = allocate_page (); - alloc_counts[(int)alloc_type_varray].total_alloc++; - alloc_counts[(int)alloc_type_varray].total_pages++; + alloc_counts[(int) alloc_type_varray].total_alloc++; + alloc_counts[(int) alloc_type_varray].total_pages++; new_links->start_index = vp->num_allocated; vp->objects_last_page = 0; @@ -1582,11 +1560,11 @@ add_string (vp, hash_tbl, str, ret_hash) register const char *err; if (vp->objects_last_page + len >= PAGE_USIZE) - { - vp->num_allocated = - ((vp->num_allocated + PAGE_USIZE - 1) / PAGE_USIZE) * PAGE_USIZE; - add_varray_page (vp); - } + { + vp->num_allocated = + ((vp->num_allocated + PAGE_USIZE - 1) / PAGE_USIZE) * PAGE_USIZE; + add_varray_page (vp); + } hash_ptr = allocate_shash (); hash_ptr->indx = vp->num_allocated; @@ -1636,10 +1614,10 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx) vp = &cur_file_ptr->symbols; - if (vp->objects_last_page == vp->objects_per_page) + if (vp->objects_last_page == vp->objects_per_page) add_varray_page (vp); - psym = &vp->last->datum->sym[ vp->objects_last_page++ ]; + psym = &vp->last->datum->sym[vp->objects_last_page++]; if (str == (const char *) NULL && sym_value != (symbolS *) NULL) psym->name = S_GET_NAME (sym_value); @@ -1705,8 +1683,8 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx) scope_delta = 1; /* For every block type except file, struct, union, or - enumeration blocks, push a level on the tag stack. We omit - file types, so that tags can span file boundaries. */ + enumeration blocks, push a level on the tag stack. We omit + file types, so that tags can span file boundaries. */ if (type != st_File && storage != sc_Info) { ptag_head = allocate_thead (); @@ -1802,11 +1780,12 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx) value, depth, sc_str); if (str_start && str_end_p1 - str_start > 0) - fprintf (stderr, " st= %-11s name= %.*s\n", st_str, str_end_p1 - str_start, str_start); + fprintf (stderr, " st= %-11s name= %.*s\n", + st_str, str_end_p1 - str_start, str_start); else { unsigned long len = strlen (st_str); - fprintf (stderr, " st= %.*s\n", len-1, st_str); + fprintf (stderr, " st= %.*s\n", len - 1, st_str); } } #endif @@ -1839,7 +1818,6 @@ add_aux_sym_symint (aux_word) return vp->num_allocated++; } - /* Add an auxiliary symbol (passing a file/symbol index combo). */ static symint_t @@ -1899,9 +1877,8 @@ add_aux_sym_tir (t, state, hash_tbl) aux.ti.tq4 = (int) t->type_qualifiers[4]; aux.ti.tq5 = (int) t->type_qualifiers[5]; - /* For anything that adds additional information, we must not hash, - so check here, and reset our state. */ + so check here, and reset our state. */ if (state != hash_no && (t->type_qualifiers[0] == tq_Array @@ -1951,11 +1928,11 @@ add_aux_sym_tir (t, state, hash_tbl) } } - /* Everything is set up, add the aux symbol. */ + /* Everything is set up, add the aux symbol. */ if (vp->objects_last_page == vp->objects_per_page) add_varray_page (vp); - aux_ptr = &vp->last->datum->aux[ vp->objects_last_page++ ]; + aux_ptr = &vp->last->datum->aux[vp->objects_last_page++]; aux_ptr->type = aux_tir; aux_ptr->data = aux; @@ -1971,8 +1948,7 @@ add_aux_sym_tir (t, state, hash_tbl) for an enum bitfield. */ if (t->bitfield) - (void) add_aux_sym_symint ((symint_t)t->sizes[t->num_sizes-1]); - + (void) add_aux_sym_symint ((symint_t) t->sizes[t->num_sizes - 1]); /* Add tag information if needed. Structure, union, and enum references add 2 aux symbols: a [file index, symbol index] @@ -1983,7 +1959,7 @@ add_aux_sym_tir (t, state, hash_tbl) || t->basic_type == bt_Enum) { register symint_t file_index = t->tag_ptr->ifd; - register localsym_t *sym = t->tag_ptr->sym; + register localsym_t *sym = t->tag_ptr->sym; register forward_t *forward_ref = allocate_forward (); if (sym != (localsym_t *) NULL) @@ -1999,11 +1975,11 @@ add_aux_sym_tir (t, state, hash_tbl) (void) add_aux_sym_rndx (ST_RFDESCAPE, indexNil); forward_ref->index_ptr - = &vp->last->datum->aux[ vp->objects_last_page - 1]; + = &vp->last->datum->aux[vp->objects_last_page - 1]; (void) add_aux_sym_symint (file_index); forward_ref->ifd_ptr - = &vp->last->datum->aux[ vp->objects_last_page - 1]; + = &vp->last->datum->aux[vp->objects_last_page - 1]; } /* Add information about array bounds if they exist. */ @@ -2021,7 +1997,7 @@ add_aux_sym_tir (t, state, hash_tbl) }; /* NOTE: Mips documentation claims that the bitfield width goes here. - But it needs to be emitted earlier. */ + But it needs to be emitted earlier. */ return ret; } @@ -2045,16 +2021,16 @@ get_tag (tag, sym, basic_type) if (hash_ptr != (shash_t *) NULL && hash_ptr->tag_ptr != (tag_t *) NULL) - { - tag_ptr = hash_ptr->tag_ptr; - if (sym != (localsym_t *) NULL) - { - tag_ptr->basic_type = basic_type; - tag_ptr->ifd = cur_file_ptr->file_index; - tag_ptr->sym = sym; - } - return tag_ptr; - } + { + tag_ptr = hash_ptr->tag_ptr; + if (sym != (localsym_t *) NULL) + { + tag_ptr->basic_type = basic_type; + tag_ptr->ifd = cur_file_ptr->file_index; + tag_ptr->sym = sym; + } + return tag_ptr; + } if (hash_ptr == (shash_t *) NULL) { @@ -2091,7 +2067,7 @@ get_tag (tag, sym, basic_type) static void add_unknown_tag (ptag) - tag_t *ptag; /* pointer to tag information */ + tag_t *ptag; /* pointer to tag information */ { shash_t *hash_ptr = ptag->hash_ptr; char *name = hash_ptr->string; @@ -2101,7 +2077,7 @@ add_unknown_tag (ptag) #ifdef ECOFF_DEBUG if (debug > 1) { - char *agg_type = "{unknown aggregate type}"; + char *agg_type = "{unknown aggregate type}"; switch (ptag->basic_type) { case bt_Struct: agg_type = "struct"; break; @@ -2240,9 +2216,11 @@ add_file (file_name, indx, fake) this if we see a .file directive with a string, since that implies that some sort of debugging information is being provided. */ - if (! symbol_table_frozen && debug_type == DEBUG_NONE) + if (! symbol_table_frozen && debug_type == DEBUG_UNSPECIFIED) debug_type = DEBUG_ECOFF; } + else + debug_type = DEBUG_NONE; #ifndef NO_LISTING if (listing) @@ -2294,7 +2272,7 @@ add_file (file_name, indx, fake) } } - /* If this is a new file, create it. */ + /* If this is a new file, create it. */ if (fil_ptr == (efdr_t *) NULL) { if (file_desc.objects_last_page == file_desc.objects_per_page) @@ -2334,7 +2312,7 @@ add_file (file_name, indx, fake) last_file_ptr = &fil_ptr->next_file; /* Add void & int types to the file (void should be first to catch - errant 0's within the index fields). */ + errant 0's within the index fields). */ fil_ptr->void_type = add_aux_sym_tir (&void_type_info, hash_yes, &cur_file_ptr->thash_head[0]); @@ -2359,7 +2337,7 @@ ecoff_new_file (name) /* This is a hand coded assembler file, so automatically turn on debugging information. */ - if (debug_type == DEBUG_NONE) + if (debug_type == DEBUG_UNSPECIFIED) debug_type = DEBUG_ECOFF; } @@ -2368,10 +2346,10 @@ ecoff_new_file (name) /* Convert storage class to string. */ static char * -sc_to_string(storage_class) +sc_to_string (storage_class) sc_t storage_class; { - switch(storage_class) + switch (storage_class) { case sc_Nil: return "Nil,"; case sc_Text: return "Text,"; @@ -2409,10 +2387,10 @@ sc_to_string(storage_class) /* Convert symbol type to string. */ static char * -st_to_string(symbol_type) +st_to_string (symbol_type) st_t symbol_type; { - switch(symbol_type) + switch (symbol_type) { case st_Nil: return "Nil,"; case st_Global: return "Global,"; @@ -2734,13 +2712,13 @@ ecoff_directive_type (ignore) coff_type.basic_type = map_coff_types[coff_type.orig_type]; tq_ptr = &coff_type.type_qualifiers[N_TQ]; - while (val &~ N_BTMASK) + while (val & ~N_BTMASK) { if (tq_ptr == &coff_type.type_qualifiers[0]) { /* FIXME: We could handle this by setting the continued bit. - There would still be a limit: the .type argument can not - be infinite. */ + There would still be a limit: the .type argument can not + be infinite. */ as_warn (_("The type of %s is too complex; it will be simplified"), coff_sym_name); break; @@ -2764,11 +2742,11 @@ ecoff_directive_type (ignore) if (tq_shft != &coff_type.type_qualifiers[0] && tq_shft[-1] == tq_Proc) { /* If this is a function, ignore it, so that we don't get two - entries (one from the .ent, and one for the .def that - precedes it). Save the type information so that the end - block can properly add it after the begin block index. For - MIPS knows what reason, we must strip off the function type - at this point. */ + entries (one from the .ent, and one for the .def that + precedes it). Save the type information so that the end + block can properly add it after the begin block index. For + MIPS knows what reason, we must strip off the function type + at this point. */ coff_is_function = 1; tq_shft[-1] = tq_Nil; } @@ -2888,8 +2866,8 @@ ecoff_directive_endef (ignore) } /* If this is an array, make sure the same number of dimensions - and sizes were passed, creating extra sizes for multiply - dimensioned arrays if not passed. */ + and sizes were passed, creating extra sizes for multiply + dimensioned arrays if not passed. */ coff_type.extra_sizes = 0; if (diff) { @@ -2914,7 +2892,7 @@ ecoff_directive_endef (ignore) && coff_type.num_sizes - coff_type.extra_sizes == 1) { /* Is this a bitfield? This is indicated by a structure memeber - having a size field that isn't an array. */ + having a size field that isn't an array. */ coff_type.bitfield = 1; } @@ -2959,7 +2937,7 @@ ecoff_directive_endef (ignore) break; /* For the beginning of structs, unions, and enumerations, the - size info needs to be passed in the value field. */ + size info needs to be passed in the value field. */ case st_Block: if (coff_type.num_sizes - coff_type.num_dims - coff_type.extra_sizes != 1) @@ -2974,8 +2952,8 @@ ecoff_directive_endef (ignore) break; /* For the end of structs, unions, and enumerations, omit the - name which is always ".eos". This needs to be done last, so - that any error reporting above gives the correct name. */ + name which is always ".eos". This needs to be done last, so + that any error reporting above gives the correct name. */ case st_End: free (name); name = (char *) NULL; @@ -2984,10 +2962,10 @@ ecoff_directive_endef (ignore) break; /* Members of structures and unions that aren't bitfields, need - to adjust the value from a byte offset to a bit offset. - Members of enumerations do not have the value adjusted, and - can be distinguished by indx == indexNil. For enumerations, - update the maximum enumeration value. */ + to adjust the value from a byte offset to a bit offset. + Members of enumerations do not have the value adjusted, and + can be distinguished by indx == indexNil. For enumerations, + update the maximum enumeration value. */ case st_Member: if (! coff_type.bitfield && ! coff_inside_enumeration) coff_value *= 8; @@ -3245,9 +3223,10 @@ ecoff_directive_frame (ignore) cur_proc_ptr->pdr.pcreg = tc_get_register (0); -#if 0 /* Alpha-OSF1 adds "the offset of saved $a0 from $sp", according - to Sandro. I don't yet know where this value should be stored, if - anywhere. */ +#if 0 + /* Alpha-OSF1 adds "the offset of saved $a0 from $sp", according to + Sandro. I don't yet know where this value should be stored, if + anywhere. */ demand_empty_rest_of_line (); #else s_ignore (42); @@ -3388,7 +3367,7 @@ mark_stabs (ignore) { if (! stabs_seen) { - /* Add a dummy @stabs dymbol. */ + /* Add a dummy @stabs dymbol. */ stabs_seen = 1; (void) add_ecoff_symbol (stabs_symbol, stNil, scInfo, (symbolS *) NULL, @@ -3399,7 +3378,7 @@ mark_stabs (ignore) /* Parse .weakext directives. */ #ifndef TC_MIPS -/* For TC_MIPS use the version in tc-mips.c. */ +/* For TC_MIPS use the version in tc-mips.c. */ void ecoff_directive_weakext (ignore) int ignore; @@ -3434,7 +3413,7 @@ ecoff_directive_weakext (ignore) if (exp.X_op != O_symbol) { as_bad (_("bad .weakext directive")); - ignore_rest_of_line(); + ignore_rest_of_line (); return; } symbol_set_value_expression (symbolP, &exp); @@ -3646,7 +3625,7 @@ ecoff_frob_symbol (sym) static asymbol scom_symbol; /* We must construct a fake section similar to bfd_com_section - but with the name .scommon. */ + but with the name .scommon. */ if (scom_section.name == NULL) { scom_section = bfd_com_section; @@ -3761,7 +3740,7 @@ ecoff_build_lineno (backend, buf, bufend, offset, linecntptr) embedded PIC code, it will put strings in the .text section before the first procedure. We cope by inserting a dummy line if the address of the first procedure is not 0. Hopefully this - won't screw things up too badly. + won't screw things up too badly. Don't do this for ECOFF assembly source line numbers. They work without this extra attention. */ @@ -3789,8 +3768,8 @@ ecoff_build_lineno (backend, buf, bufend, offset, linecntptr) long delta; /* Get the offset to the memory address of the next line number - (in words). Do this first, so that we can skip ahead to the - next useful line number entry. */ + (in words). Do this first, so that we can skip ahead to the + next useful line number entry. */ if (l->next == (lineno_list_t *) NULL) { /* We want a count of zero, but it will be decremented @@ -4030,11 +4009,11 @@ ecoff_build_symbols (backend, buf, bufend, offset) symint_t indx; /* The value of a block start symbol is the - offset from the start of the procedure. For - other symbols we just use the gas value (but - we must offset it by the vma of the section, - just as BFD does, because BFD will not see - this value). */ + offset from the start of the procedure. For + other symbols we just use the gas value (but + we must offset it by the vma of the section, + just as BFD does, because BFD will not see + this value). */ if (sym_ptr->ecoff_sym.asym.st == (int) st_Block && sym_ptr->ecoff_sym.asym.sc == (int) sc_Text) { @@ -4066,8 +4045,8 @@ ecoff_build_symbols (backend, buf, bufend, offset) sym_ptr->ecoff_sym.asym.st = st_StaticProc; /* Get the type and storage class based on where - the symbol actually wound up. Traditionally, - N_LBRAC and N_RBRAC are *not* relocated. */ + the symbol actually wound up. Traditionally, + N_LBRAC and N_RBRAC are *not* relocated. */ indx = sym_ptr->ecoff_sym.asym.index; if (sym_ptr->ecoff_sym.asym.st == st_Nil && sym_ptr->ecoff_sym.asym.sc == sc_Nil @@ -4143,8 +4122,8 @@ ecoff_build_symbols (backend, buf, bufend, offset) else { /* This must be a user named section. - This is not possible in ECOFF, but it - is in ELF. */ + This is not possible in ECOFF, but it + is in ELF. */ sc = sc_Data; } @@ -4153,11 +4132,11 @@ ecoff_build_symbols (backend, buf, bufend, offset) } /* This is just an external symbol if it is - outside a procedure and it has a type. - FIXME: g++ will generate symbols which have - different names in the debugging information - than the actual symbol. Should we handle - them here? */ + outside a procedure and it has a type. + FIXME: g++ will generate symbols which have + different names in the debugging information + than the actual symbol. Should we handle + them here? */ if ((S_IS_EXTERNAL (as_sym) || S_IS_WEAK (as_sym) || ! S_IS_DEFINED (as_sym)) @@ -4167,14 +4146,14 @@ ecoff_build_symbols (backend, buf, bufend, offset) local = 0; /* This is just an external symbol if it is a - common symbol. */ + common symbol. */ if (S_IS_COMMON (as_sym)) local = 0; /* If an st_end symbol has an associated gas - symbol, then it is a local label created for - a .bend or .end directive. Stabs line - numbers will have \001 in the names. */ + symbol, then it is a local label created for + a .bend or .end directive. Stabs line + numbers will have \001 in the names. */ if (local && sym_ptr->ecoff_sym.asym.st != st_End && strchr (sym_ptr->name, '\001') == 0) @@ -4222,10 +4201,10 @@ ecoff_build_symbols (backend, buf, bufend, offset) } /* The value of the symbol marking the end of a - procedure is the size of the procedure. The - value of the symbol marking the end of a - block is the offset from the start of the - procedure to the block. */ + procedure is the size of the procedure. The + value of the symbol marking the end of a + block is the offset from the start of the + procedure to the block. */ if (begin_type == st_Proc || begin_type == st_StaticProc) { @@ -4239,7 +4218,7 @@ ecoff_build_symbols (backend, buf, bufend, offset) - S_GET_VALUE (begin_ptr->as_sym)); /* If the size is odd, this is probably a - mips16 function; force it to be even. */ + mips16 function; force it to be even. */ if ((sym_ptr->ecoff_sym.asym.value & 1) != 0) ++sym_ptr->ecoff_sym.asym.value; @@ -4305,7 +4284,7 @@ ecoff_build_symbols (backend, buf, bufend, offset) sym_ptr->ecoff_sym.ifd = fil_ptr->file_index; /* Don't try to merge an FDR which has an - external symbol attached to it. */ + external symbol attached to it. */ if (S_IS_EXTERNAL (as_sym) || S_IS_WEAK (as_sym)) fil_ptr->fdr.fMerge = 0; } @@ -4386,9 +4365,9 @@ ecoff_build_procs (backend, buf, bufend, offset) if (first) { /* This code used to force the adr of the very - first fdr to be 0. However, the native tools - don't do that, and I can't remember why it - used to work that way, so I took it out. */ + first fdr to be 0. However, the native tools + don't do that, and I can't remember why it + used to work that way, so I took it out. */ fil_ptr->fdr.adr = adr; first = 0; } @@ -4700,7 +4679,7 @@ ecoff_build_debug (hdr, bufp, backend) efdr_t *fil_ptr; int end_warning; efdr_t *hold_file_ptr; - proc_t * hold_proc_ptr; + proc_t *hold_proc_ptr; symbolS *sym; char *buf; char *bufend; @@ -4871,7 +4850,6 @@ allocate_cluster (npages) return value; } - static page_type *cluster_ptr = NULL; static unsigned long pages_left = 0; @@ -4893,7 +4871,7 @@ allocate_page () pages_left--; return cluster_ptr++; -#else /* MALLOC_CHECK */ +#else /* MALLOC_CHECK */ page_type *ptr; @@ -4901,7 +4879,7 @@ allocate_page () memset (ptr, 0, PAGE_USIZE); return ptr; -#endif /* MALLOC_CHECK */ +#endif /* MALLOC_CHECK */ } /* Allocate scoping information. */ @@ -4914,23 +4892,23 @@ allocate_scope () #ifndef MALLOC_CHECK - ptr = alloc_counts[(int)alloc_type_scope].free_list.f_scope; + ptr = alloc_counts[(int) alloc_type_scope].free_list.f_scope; if (ptr != (scope_t *) NULL) - alloc_counts[ (int)alloc_type_scope ].free_list.f_scope = ptr->free; + alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr->free; else { - register int unallocated = alloc_counts[(int)alloc_type_scope].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_scope].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_scope].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_scope].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (scope_t); - alloc_counts[(int)alloc_type_scope].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_scope].total_pages++; + alloc_counts[(int) alloc_type_scope].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_scope].total_pages++; } ptr = &cur_page->scope[--unallocated]; - alloc_counts[(int)alloc_type_scope].unallocated = unallocated; + alloc_counts[(int) alloc_type_scope].unallocated = unallocated; } #else @@ -4939,7 +4917,7 @@ allocate_scope () #endif - alloc_counts[(int)alloc_type_scope].total_alloc++; + alloc_counts[(int) alloc_type_scope].total_alloc++; *ptr = initial_scope; return ptr; } @@ -4950,11 +4928,11 @@ static void free_scope (ptr) scope_t *ptr; { - alloc_counts[(int)alloc_type_scope].total_free++; + alloc_counts[(int) alloc_type_scope].total_free++; #ifndef MALLOC_CHECK - ptr->free = alloc_counts[(int)alloc_type_scope].free_list.f_scope; - alloc_counts[(int)alloc_type_scope].free_list.f_scope = ptr; + ptr->free = alloc_counts[(int) alloc_type_scope].free_list.f_scope; + alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr; #else free ((PTR) ptr); #endif @@ -4970,18 +4948,18 @@ allocate_vlinks () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_vlinks].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_vlinks].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_vlinks].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_vlinks].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (vlinks_t); - alloc_counts[(int)alloc_type_vlinks].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_vlinks].total_pages++; + alloc_counts[(int) alloc_type_vlinks].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_vlinks].total_pages++; } ptr = &cur_page->vlinks[--unallocated]; - alloc_counts[(int)alloc_type_vlinks].unallocated = unallocated; + alloc_counts[(int) alloc_type_vlinks].unallocated = unallocated; #else @@ -4989,7 +4967,7 @@ allocate_vlinks () #endif - alloc_counts[(int)alloc_type_vlinks].total_alloc++; + alloc_counts[(int) alloc_type_vlinks].total_alloc++; *ptr = initial_vlinks; return ptr; } @@ -5004,18 +4982,18 @@ allocate_shash () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_shash].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_shash].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_shash].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_shash].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (shash_t); - alloc_counts[(int)alloc_type_shash].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_shash].total_pages++; + alloc_counts[(int) alloc_type_shash].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_shash].total_pages++; } ptr = &cur_page->shash[--unallocated]; - alloc_counts[(int)alloc_type_shash].unallocated = unallocated; + alloc_counts[(int) alloc_type_shash].unallocated = unallocated; #else @@ -5023,7 +5001,7 @@ allocate_shash () #endif - alloc_counts[(int)alloc_type_shash].total_alloc++; + alloc_counts[(int) alloc_type_shash].total_alloc++; *ptr = initial_shash; return ptr; } @@ -5038,18 +5016,18 @@ allocate_thash () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_thash].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_thash].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_thash].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_thash].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (thash_t); - alloc_counts[(int)alloc_type_thash].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_thash].total_pages++; + alloc_counts[(int) alloc_type_thash].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_thash].total_pages++; } ptr = &cur_page->thash[--unallocated]; - alloc_counts[(int)alloc_type_thash].unallocated = unallocated; + alloc_counts[(int) alloc_type_thash].unallocated = unallocated; #else @@ -5057,7 +5035,7 @@ allocate_thash () #endif - alloc_counts[(int)alloc_type_thash].total_alloc++; + alloc_counts[(int) alloc_type_thash].total_alloc++; *ptr = initial_thash; return ptr; } @@ -5072,23 +5050,23 @@ allocate_tag () #ifndef MALLOC_CHECK - ptr = alloc_counts[(int)alloc_type_tag].free_list.f_tag; + ptr = alloc_counts[(int) alloc_type_tag].free_list.f_tag; if (ptr != (tag_t *) NULL) - alloc_counts[(int)alloc_type_tag].free_list.f_tag = ptr->free; + alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr->free; else { - register int unallocated = alloc_counts[(int)alloc_type_tag].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_tag].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_tag].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_tag].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (tag_t); - alloc_counts[(int)alloc_type_tag].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_tag].total_pages++; + alloc_counts[(int) alloc_type_tag].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_tag].total_pages++; } ptr = &cur_page->tag[--unallocated]; - alloc_counts[(int)alloc_type_tag].unallocated = unallocated; + alloc_counts[(int) alloc_type_tag].unallocated = unallocated; } #else @@ -5097,7 +5075,7 @@ allocate_tag () #endif - alloc_counts[(int)alloc_type_tag].total_alloc++; + alloc_counts[(int) alloc_type_tag].total_alloc++; *ptr = initial_tag; return ptr; } @@ -5108,11 +5086,11 @@ static void free_tag (ptr) tag_t *ptr; { - alloc_counts[(int)alloc_type_tag].total_free++; + alloc_counts[(int) alloc_type_tag].total_free++; #ifndef MALLOC_CHECK - ptr->free = alloc_counts[(int)alloc_type_tag].free_list.f_tag; - alloc_counts[(int)alloc_type_tag].free_list.f_tag = ptr; + ptr->free = alloc_counts[(int) alloc_type_tag].free_list.f_tag; + alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr; #else free ((PTR_T) ptr); #endif @@ -5128,18 +5106,18 @@ allocate_forward () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_forward].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_forward].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_forward].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_forward].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (forward_t); - alloc_counts[(int)alloc_type_forward].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_forward].total_pages++; + alloc_counts[(int) alloc_type_forward].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_forward].total_pages++; } ptr = &cur_page->forward[--unallocated]; - alloc_counts[(int)alloc_type_forward].unallocated = unallocated; + alloc_counts[(int) alloc_type_forward].unallocated = unallocated; #else @@ -5147,7 +5125,7 @@ allocate_forward () #endif - alloc_counts[(int)alloc_type_forward].total_alloc++; + alloc_counts[(int) alloc_type_forward].total_alloc++; *ptr = initial_forward; return ptr; } @@ -5162,23 +5140,23 @@ allocate_thead () #ifndef MALLOC_CHECK - ptr = alloc_counts[(int)alloc_type_thead].free_list.f_thead; + ptr = alloc_counts[(int) alloc_type_thead].free_list.f_thead; if (ptr != (thead_t *) NULL) - alloc_counts[ (int)alloc_type_thead ].free_list.f_thead = ptr->free; + alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr->free; else { - register int unallocated = alloc_counts[(int)alloc_type_thead].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_thead].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_thead].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_thead].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (thead_t); - alloc_counts[(int)alloc_type_thead].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_thead].total_pages++; + alloc_counts[(int) alloc_type_thead].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_thead].total_pages++; } ptr = &cur_page->thead[--unallocated]; - alloc_counts[(int)alloc_type_thead].unallocated = unallocated; + alloc_counts[(int) alloc_type_thead].unallocated = unallocated; } #else @@ -5187,7 +5165,7 @@ allocate_thead () #endif - alloc_counts[(int)alloc_type_thead].total_alloc++; + alloc_counts[(int) alloc_type_thead].total_alloc++; *ptr = initial_thead; return ptr; } @@ -5198,11 +5176,11 @@ static void free_thead (ptr) thead_t *ptr; { - alloc_counts[(int)alloc_type_thead].total_free++; + alloc_counts[(int) alloc_type_thead].total_free++; #ifndef MALLOC_CHECK - ptr->free = (thead_t *) alloc_counts[(int)alloc_type_thead].free_list.f_thead; - alloc_counts[(int)alloc_type_thead].free_list.f_thead = ptr; + ptr->free = (thead_t *) alloc_counts[(int) alloc_type_thead].free_list.f_thead; + alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr; #else free ((PTR_T) ptr); #endif @@ -5216,18 +5194,18 @@ allocate_lineno_list () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_lineno].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_lineno].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_lineno].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_lineno].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (lineno_list_t); - alloc_counts[(int)alloc_type_lineno].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_lineno].total_pages++; + alloc_counts[(int) alloc_type_lineno].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_lineno].total_pages++; } ptr = &cur_page->lineno[--unallocated]; - alloc_counts[(int)alloc_type_lineno].unallocated = unallocated; + alloc_counts[(int) alloc_type_lineno].unallocated = unallocated; #else @@ -5235,7 +5213,7 @@ allocate_lineno_list () #endif - alloc_counts[(int)alloc_type_lineno].total_alloc++; + alloc_counts[(int) alloc_type_lineno].total_alloc++; *ptr = initial_lineno_list; return ptr; } @@ -5257,7 +5235,7 @@ ecoff_set_gp_prolog_size (sz) cur_proc_ptr->pdr.gp_used = 1; } -int +int ecoff_no_current_file () { return cur_file_ptr == (efdr_t *) NULL; @@ -5272,7 +5250,7 @@ ecoff_generate_asm_lineno () as_where (&filename, &lineno); - if (current_stabs_filename == (char *)NULL + if (current_stabs_filename == (char *) NULL || strcmp (current_stabs_filename, filename)) add_file (filename, 0, 1); @@ -5297,7 +5275,7 @@ ecoff_generate_asm_lineno () pl = &noproc_lineno; while (*pl != (lineno_list_t *) NULL) - pl = &(*pl)->next; + pl = &(*pl)->next; *pl = list; } else diff --git a/contrib/binutils/gas/ehopt.c b/contrib/binutils/gas/ehopt.c index a0a5f62..4131436 100644 --- a/contrib/binutils/gas/ehopt.c +++ b/contrib/binutils/gas/ehopt.c @@ -1,5 +1,5 @@ /* ehopt.c--optimize gcc exception frame information. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor <ian@cygnus.com>. This file is part of GAS, the GNU Assembler. @@ -17,7 +17,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +02111-1307, USA. */ #include "as.h" #include "subsegs.h" @@ -31,13 +31,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Try to optimize gcc 2.8 exception frame information. Exception frame information is emitted for every function in the - .eh_frame section. Simple information for a function with no - exceptions looks like this: + .eh_frame or .debug_frame sections. Simple information for a function + with no exceptions looks like this: __FRAME_BEGIN__: .4byte .LLCIE1 / Length of Common Information Entry .LSCIE1: +#if .eh_frame .4byte 0x0 / CIE Identifier Tag +#elif .debug_frame + .4byte 0xffffffff / CIE Identifier Tag +#endif .byte 0x1 / CIE Version .byte 0x0 / CIE Augmentation (none) .byte 0x1 / ULEB128 0x1 (CIE Code Alignment Factor) @@ -84,30 +88,33 @@ __FRAME_BEGIN__: not know this value, it always uses four bytes. We will know the value at the end of assembly, so we can do better. */ -static int eh_frame_code_alignment PARAMS ((void)); +static int eh_frame_code_alignment PARAMS ((int)); /* Get the code alignment factor from the CIE. */ static int -eh_frame_code_alignment () +eh_frame_code_alignment (in_seg) + int in_seg; { + /* ??? Assume .eh_frame and .debug_frame have the same alignment. */ static int code_alignment; - segT current_seg; - subsegT current_subseg; + fragS *f; fixS *fix; int offset; + char CIE_id; char augmentation[10]; int iaug; if (code_alignment != 0) return code_alignment; - /* We should find the CIE at the start of the .eh_frame section. */ + /* Can't find the alignment if we've changed sections. */ + if (! in_seg) + return -1; + + /* We should find the CIE at the start of the section. */ - current_seg = now_seg; - current_subseg = now_subseg; - subseg_new (".eh_frame", 0); #if defined (BFD_ASSEMBLER) || defined (MANY_SEGMENTS) f = seg_info (now_seg)->frchainP->frch_root; #else @@ -118,11 +125,15 @@ eh_frame_code_alignment () #else fix = *seg_fix_rootP; #endif - subseg_set (current_seg, current_subseg); /* Look through the frags of the section to find the code alignment. */ - /* First make sure that the CIE Identifier Tag is 0. */ + /* First make sure that the CIE Identifier Tag is 0/-1. */ + + if (strcmp (segment_name (now_seg), ".debug_frame") == 0) + CIE_id = (char)0xff; + else + CIE_id = 0; offset = 4; while (f != NULL && offset >= f->fr_fix) @@ -132,10 +143,10 @@ eh_frame_code_alignment () } if (f == NULL || f->fr_fix - offset < 4 - || f->fr_literal[offset] != 0 - || f->fr_literal[offset + 1] != 0 - || f->fr_literal[offset + 2] != 0 - || f->fr_literal[offset + 3] != 0) + || f->fr_literal[offset] != CIE_id + || f->fr_literal[offset + 1] != CIE_id + || f->fr_literal[offset + 2] != CIE_id + || f->fr_literal[offset + 3] != CIE_id) { code_alignment = -1; return -1; @@ -261,33 +272,42 @@ check_eh_frame (exp, pnbytes) expressionS *exp; unsigned int *pnbytes; { - static int saw_size; - static symbolS *size_end_sym; - static int saw_advance_loc4; - static fragS *loc4_frag; - static int loc4_fix; - - if (saw_size - && S_IS_DEFINED (size_end_sym)) + struct frame_data + { + symbolS *size_end_sym; + fragS *loc4_frag; + int saw_size; + int saw_advance_loc4; + int loc4_fix; + }; + + static struct frame_data eh_frame_data; + static struct frame_data debug_frame_data; + struct frame_data *d; + + /* Don't optimize. */ + if (flag_traditional_format) + return 0; + + /* Select the proper section data. */ + if (strcmp (segment_name (now_seg), ".eh_frame") == 0) + d = &eh_frame_data; + else if (strcmp (segment_name (now_seg), ".debug_frame") == 0) + d = &debug_frame_data; + else + return 0; + + if (d->saw_size && S_IS_DEFINED (d->size_end_sym)) { /* We have come to the end of the CIE or FDE. See below where we set saw_size. We must check this first because we may now be looking at the next size. */ - saw_size = 0; - saw_advance_loc4 = 0; + d->saw_size = 0; + d->saw_advance_loc4 = 0; } - if (flag_traditional_format) - { - /* Don't optimize. */ - } - else if (strcmp (segment_name (now_seg), ".eh_frame") != 0) - { - saw_size = 0; - saw_advance_loc4 = 0; - } - else if (! saw_size - && *pnbytes == 4) + if (! d->saw_size + && *pnbytes == 4) { /* This might be the size of the CIE or FDE. We want to know the size so that we don't accidentally optimize across an FDE @@ -301,23 +321,23 @@ check_eh_frame (exp, pnbytes) if ((exp->X_op == O_symbol || exp->X_op == O_subtract) && ! S_IS_DEFINED (exp->X_add_symbol)) { - saw_size = 1; - size_end_sym = exp->X_add_symbol; + d->saw_size = 1; + d->size_end_sym = exp->X_add_symbol; } } - else if (saw_size + else if (d->saw_size && *pnbytes == 1 && exp->X_op == O_constant && exp->X_add_number == DW_CFA_advance_loc4) { /* This might be a DW_CFA_advance_loc4. Record the frag and the position within the frag, so that we can change it later. */ - saw_advance_loc4 = 1; + d->saw_advance_loc4 = 1; frag_grow (1); - loc4_frag = frag_now; - loc4_fix = frag_now_fix (); + d->loc4_frag = frag_now; + d->loc4_fix = frag_now_fix (); } - else if (saw_advance_loc4 + else if (d->saw_advance_loc4 && *pnbytes == 4 && exp->X_op == O_constant) { @@ -328,9 +348,9 @@ check_eh_frame (exp, pnbytes) reduced to a constant. We can do the optimization entirely in this function. */ - saw_advance_loc4 = 0; + d->saw_advance_loc4 = 0; - ca = eh_frame_code_alignment (); + ca = eh_frame_code_alignment (1); if (ca < 0) { /* Don't optimize. */ @@ -338,41 +358,40 @@ check_eh_frame (exp, pnbytes) else if (exp->X_add_number % ca == 0 && exp->X_add_number / ca < 0x40) { - loc4_frag->fr_literal[loc4_fix] + d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc | (exp->X_add_number / ca); /* No more bytes needed. */ return 1; } else if (exp->X_add_number < 0x100) { - loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc1; + d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc1; *pnbytes = 1; } else if (exp->X_add_number < 0x10000) { - loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc2; + d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc2; *pnbytes = 2; } } - else if (saw_advance_loc4 + else if (d->saw_advance_loc4 && *pnbytes == 4 && exp->X_op == O_subtract) { - /* This is a case we can optimize. The expression was not reduced, so we can not finish the optimization until the end of the assembly. We set up a variant frag which we handle later. */ - saw_advance_loc4 = 0; + d->saw_advance_loc4 = 0; frag_var (rs_cfa, 4, 0, 0, make_expr_symbol (exp), - loc4_fix, (char *) loc4_frag); + d->loc4_fix, (char *) d->loc4_frag); return 1; } else - saw_advance_loc4 = 0; + d->saw_advance_loc4 = 0; return 0; } @@ -389,7 +408,7 @@ eh_frame_estimate_size_before_relax (frag) offsetT diff; int ret; - ca = eh_frame_code_alignment (); + ca = eh_frame_code_alignment (0); diff = resolve_symbol_value (frag->fr_symbol, 0); if (ca < 0) @@ -444,7 +463,7 @@ eh_frame_convert_frag (frag) { int ca; - ca = eh_frame_code_alignment (); + ca = eh_frame_code_alignment (0); assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40); loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca); } diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c index 7cca437..2df2f63 100644 --- a/contrib/binutils/gas/expr.c +++ b/contrib/binutils/gas/expr.c @@ -1,5 +1,5 @@ /* expr.c -operands, expressions- - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,14 +17,12 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ -/* - * This is really a branch office of as-read.c. I split it out to clearly - * distinguish the world of expressions from the world of statements. - * (It also gives smaller files to re-compile.) - * Here, "operand"s are of expressions, not instructions. - */ +/* This is really a branch office of as-read.c. I split it out to clearly + distinguish the world of expressions from the world of statements. + (It also gives smaller files to re-compile.) + Here, "operand"s are of expressions, not instructions. */ #include <ctype.h> #include <string.h> @@ -43,15 +41,14 @@ static void mri_char_constant PARAMS ((expressionS *)); static void current_location PARAMS ((expressionS *)); static void clean_up_expression PARAMS ((expressionS * expressionP)); static segT operand PARAMS ((expressionS *)); -static operatorT operator PARAMS ((void)); +static operatorT operator PARAMS ((int *)); extern const char EXP_CHARS[], FLT_CHARS[]; /* We keep a mapping of expression symbols to file positions, so that we can provide better error messages. */ -struct expr_symbol_line -{ +struct expr_symbol_line { struct expr_symbol_line *next; symbolS *sym; char *file; @@ -210,10 +207,8 @@ expr_build_dot () return make_expr_symbol (&e); } -/* - * Build any floating-point literal here. - * Also build any bignum literal here. - */ +/* Build any floating-point literal here. + Also build any bignum literal here. */ /* Seems atof_machine can backscan through generic_bignum and hit whatever happens to be loaded before it in memory. And its way too complicated @@ -221,23 +216,23 @@ expr_build_dot () and never write into the early words, thus they'll always be zero. I hate Dean's floating-point code. Bleh. */ LITTLENUM_TYPE generic_bignum[SIZE_OF_LARGE_NUMBER + 6]; -FLONUM_TYPE generic_floating_point_number = -{ - &generic_bignum[6], /* low (JF: Was 0) */ - &generic_bignum[SIZE_OF_LARGE_NUMBER + 6 - 1], /* high JF: (added +6) */ - 0, /* leader */ - 0, /* exponent */ - 0 /* sign */ + +FLONUM_TYPE generic_floating_point_number = { + &generic_bignum[6], /* low. (JF: Was 0) */ + &generic_bignum[SIZE_OF_LARGE_NUMBER + 6 - 1], /* high. JF: (added +6) */ + 0, /* leader. */ + 0, /* exponent. */ + 0 /* sign. */ }; -/* If nonzero, we've been asked to assemble nan, +inf or -inf */ + +/* If nonzero, we've been asked to assemble nan, +inf or -inf. */ int generic_floating_point_magic; static void floating_constant (expressionP) expressionS *expressionP; { - /* input_line_pointer->*/ - /* floating-point constant. */ + /* input_line_pointer -> floating-point constant. */ int error_code; error_code = atof_generic (&input_line_pointer, ".", EXP_CHARS, @@ -255,13 +250,13 @@ floating_constant (expressionP) } } expressionP->X_op = O_big; - /* input_line_pointer->just after constant, */ - /* which may point to whitespace. */ + /* input_line_pointer -> just after constant, which may point to + whitespace. */ expressionP->X_add_number = -1; } -static valueT -generic_bignum_to_int32 () +static valueT +generic_bignum_to_int32 () { valueT number = ((generic_bignum[1] & LITTLENUM_MASK) << LITTLENUM_NUMBER_OF_BITS) @@ -271,17 +266,17 @@ generic_bignum_to_int32 () } #ifdef BFD64 -static valueT -generic_bignum_to_int64 () +static valueT +generic_bignum_to_int64 () { - valueT number = - ((((((((valueT) generic_bignum[3] & LITTLENUM_MASK) - << LITTLENUM_NUMBER_OF_BITS) - | ((valueT) generic_bignum[2] & LITTLENUM_MASK)) - << LITTLENUM_NUMBER_OF_BITS) - | ((valueT) generic_bignum[1] & LITTLENUM_MASK)) - << LITTLENUM_NUMBER_OF_BITS) - | ((valueT) generic_bignum[0] & LITTLENUM_MASK)); + valueT number = + ((((((((valueT) generic_bignum[3] & LITTLENUM_MASK) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[2] & LITTLENUM_MASK)) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[1] & LITTLENUM_MASK)) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[0] & LITTLENUM_MASK)); return number; } #endif @@ -291,19 +286,19 @@ integer_constant (radix, expressionP) int radix; expressionS *expressionP; { - char *start; /* start of number. */ + char *start; /* Start of number. */ char *suffix = NULL; char c; - valueT number; /* offset or (absolute) value */ - short int digit; /* value of next digit in current radix */ - short int maxdig = 0;/* highest permitted digit value. */ - int too_many_digits = 0; /* if we see >= this number of */ - char *name; /* points to name of symbol */ - symbolS *symbolP; /* points to symbol */ + valueT number; /* Offset or (absolute) value. */ + short int digit; /* Value of next digit in current radix. */ + short int maxdig = 0; /* Highest permitted digit value. */ + int too_many_digits = 0; /* If we see >= this number of. */ + char *name; /* Points to name of symbol. */ + symbolS *symbolP; /* Points to symbol. */ - int small; /* true if fits in 32 bits. */ + int small; /* True if fits in 32 bits. */ - /* May be bignum, or may fit in 32 bits. */ + /* May be bignum, or may fit in 32 bits. */ /* Most numbers fit into 32 bits, and we want this case to be fast. so we pretend it will fit into 32 bits. If, after making up a 32 bit number, we realise that we have scanned more digits than @@ -316,7 +311,7 @@ integer_constant (radix, expressionP) 32 bits, and change it back to a 32-bit number if it fits. The number we are looking for is expected to be positive, but if it fits into 32 bits as an unsigned number, we let it be a 32-bit - number. The cavalier approach is for speed in ordinary cases. */ + number. The cavalier approach is for speed in ordinary cases. */ /* This has been extended for 64 bits. We blindly assume that if you're compiling in 64-bit mode, the target is a 64-bit machine. This should be cleaned up. */ @@ -389,7 +384,7 @@ integer_constant (radix, expressionP) break; case 10: maxdig = radix = 10; - too_many_digits = (valuesize + 11) / 4; /* very rough */ + too_many_digits = (valuesize + 11) / 4; /* Very rough. */ } #undef valuesize start = input_line_pointer; @@ -400,26 +395,26 @@ integer_constant (radix, expressionP) { number = number * radix + digit; } - /* c contains character after number. */ - /* input_line_pointer->char after c. */ + /* c contains character after number. */ + /* input_line_pointer->char after c. */ small = (input_line_pointer - start - 1) < too_many_digits; - if (radix == 16 && c == '_') + if (radix == 16 && c == '_') { /* This is literal of the form 0x333_0_12345678_1. This example is equivalent to 0x00000333000000001234567800000001. */ int num_little_digits = 0; int i; - input_line_pointer = start; /*->1st digit. */ + input_line_pointer = start; /* -> 1st digit. */ know (LITTLENUM_NUMBER_OF_BITS == 16); - for (c = '_'; c == '_'; num_little_digits+=2) + for (c = '_'; c == '_'; num_little_digits += 2) { - /* Convert one 64-bit word. */ - int ndigit = 0; + /* Convert one 64-bit word. */ + int ndigit = 0; number = 0; for (c = *input_line_pointer++; (digit = hex_value (c)) < maxdig; @@ -430,20 +425,23 @@ integer_constant (radix, expressionP) } /* Check for 8 digit per word max. */ - if (ndigit > 8) + if (ndigit > 8) as_bad (_("A bignum with underscores may not have more than 8 hex digits in any word.")); - /* Add this chunk to the bignum. Shift things down 2 little digits.*/ + /* Add this chunk to the bignum. + Shift things down 2 little digits. */ know (LITTLENUM_NUMBER_OF_BITS == 16); - for (i = min (num_little_digits + 1, SIZE_OF_LARGE_NUMBER - 1); i >= 2; i--) - generic_bignum[i] = generic_bignum[i-2]; + for (i = min (num_little_digits + 1, SIZE_OF_LARGE_NUMBER - 1); + i >= 2; + i--) + generic_bignum[i] = generic_bignum[i - 2]; - /* Add the new digits as the least significant new ones. */ + /* Add the new digits as the least significant new ones. */ generic_bignum[0] = number & 0xffffffff; generic_bignum[1] = number >> 16; } - /* Again, c is char after number, input_line_pointer->after c. */ + /* Again, c is char after number, input_line_pointer->after c. */ if (num_little_digits > SIZE_OF_LARGE_NUMBER - 1) num_little_digits = SIZE_OF_LARGE_NUMBER - 1; @@ -454,14 +452,14 @@ integer_constant (radix, expressionP) as_bad (_("A bignum with underscores must have exactly 4 words.")); /* We might have some leading zeros. These can be trimmed to give - * us a change to fit this constant into a small number. - */ - while (generic_bignum[num_little_digits-1] == 0 && num_little_digits > 1) + us a change to fit this constant into a small number. */ + while (generic_bignum[num_little_digits - 1] == 0 + && num_little_digits > 1) num_little_digits--; - + if (num_little_digits <= 2) { - /* will fit into 32 bits. */ + /* will fit into 32 bits. */ number = generic_bignum_to_int32 (); small = 1; } @@ -476,16 +474,16 @@ integer_constant (radix, expressionP) else { small = 0; - number = num_little_digits; /* number of littlenums in the bignum. */ + + /* Number of littlenums in the bignum. */ + number = num_little_digits; } } else if (!small) { - /* - * we saw a lot of digits. manufacture a bignum the hard way. - */ - LITTLENUM_TYPE *leader; /*->high order littlenum of the bignum. */ - LITTLENUM_TYPE *pointer; /*->littlenum we are frobbing now. */ + /* We saw a lot of digits. manufacture a bignum the hard way. */ + LITTLENUM_TYPE *leader; /* -> high order littlenum of the bignum. */ + LITTLENUM_TYPE *pointer; /* -> littlenum we are frobbing now. */ long carry; leader = generic_bignum; @@ -493,15 +491,11 @@ integer_constant (radix, expressionP) generic_bignum[1] = 0; generic_bignum[2] = 0; generic_bignum[3] = 0; - input_line_pointer = start; /*->1st digit. */ + input_line_pointer = start; /* -> 1st digit. */ c = *input_line_pointer++; - for (; - (carry = hex_value (c)) < maxdig; - c = *input_line_pointer++) + for (; (carry = hex_value (c)) < maxdig; c = *input_line_pointer++) { - for (pointer = generic_bignum; - pointer <= leader; - pointer++) + for (pointer = generic_bignum; pointer <= leader; pointer++) { long work; @@ -513,17 +507,17 @@ integer_constant (radix, expressionP) { if (leader < generic_bignum + SIZE_OF_LARGE_NUMBER - 1) { - /* room to grow a longer bignum. */ + /* Room to grow a longer bignum. */ *++leader = carry; } } } - /* again, c is char after number, */ - /* input_line_pointer->after c. */ + /* Again, c is char after number. */ + /* input_line_pointer -> after c. */ know (LITTLENUM_NUMBER_OF_BITS == 16); if (leader < generic_bignum + 2) { - /* will fit into 32 bits. */ + /* Will fit into 32 bits. */ number = generic_bignum_to_int32 (); small = 1; } @@ -537,39 +531,37 @@ integer_constant (radix, expressionP) #endif else { - number = leader - generic_bignum + 1; /* number of littlenums in the bignum. */ + /* Number of littlenums in the bignum. */ + number = leader - generic_bignum + 1; } } - if ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) - && suffix != NULL + if ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) + && suffix != NULL && input_line_pointer - 1 == suffix) c = *input_line_pointer++; if (small) { - /* - * here with number, in correct radix. c is the next char. - * note that unlike un*x, we allow "011f" "0x9f" to - * both mean the same as the (conventional) "9f". this is simply easier - * than checking for strict canonical form. syntax sux! - */ + /* Here with number, in correct radix. c is the next char. + Note that unlike un*x, we allow "011f" "0x9f" to both mean + the same as the (conventional) "9f". + This is simply easier than checking for strict canonical + form. Syntax sux! */ if (LOCAL_LABELS_FB && c == 'b') { - /* - * backward ref to local label. - * because it is backward, expect it to be defined. - */ + /* Backward ref to local label. + Because it is backward, expect it to be defined. */ /* Construct a local label. */ name = fb_label_name ((int) number, 0); - /* seen before, or symbol is defined: ok */ + /* Seen before, or symbol is defined: OK. */ symbolP = symbol_find (name); if ((symbolP != NULL) && (S_IS_DEFINED (symbolP))) { - /* local labels are never absolute. don't waste time - checking absoluteness. */ + /* Local labels are never absolute. Don't waste time + checking absoluteness. */ know (SEG_NORMAL (S_GET_SEGMENT (symbolP))); expressionP->X_op = O_symbol; @@ -577,7 +569,7 @@ integer_constant (radix, expressionP) } else { - /* either not seen or not defined. */ + /* Either not seen or not defined. */ /* @@ Should print out the original string instead of the parsed number. */ as_bad (_("backw. ref to unknown label \"%d:\", 0 assumed."), @@ -589,19 +581,18 @@ integer_constant (radix, expressionP) } /* case 'b' */ else if (LOCAL_LABELS_FB && c == 'f') { - /* - * forward reference. expect symbol to be undefined or - * unknown. undefined: seen it before. unknown: never seen - * it before. - * construct a local label name, then an undefined symbol. - * don't create a xseg frag for it: caller may do that. - * just return it as never seen before. - */ + /* Forward reference. Expect symbol to be undefined or + unknown. undefined: seen it before. unknown: never seen + it before. + + Construct a local label name, then an undefined symbol. + Don't create a xseg frag for it: caller may do that. + Just return it as never seen before. */ name = fb_label_name ((int) number, 1); symbolP = symbol_find_or_make (name); - /* we have no need to check symbol properties. */ + /* We have no need to check symbol properties. */ #ifndef many_segments - /* since "know" puts its arg into a "string", we + /* Since "know" puts its arg into a "string", we can't have newlines in the argument. */ know (S_GET_SEGMENT (symbolP) == undefined_section || S_GET_SEGMENT (symbolP) == text_section || S_GET_SEGMENT (symbolP) == data_section); #endif @@ -640,15 +631,15 @@ integer_constant (radix, expressionP) number |= (-(number >> (TARGET_WORD_SIZE - 1))) << (TARGET_WORD_SIZE - 1); #endif expressionP->X_add_number = number; - input_line_pointer--; /* restore following character. */ - } /* really just a number */ + input_line_pointer--; /* Restore following character. */ + } /* Really just a number. */ } else { - /* not a small number */ + /* Not a small number. */ expressionP->X_op = O_big; - expressionP->X_add_number = number; /* number of littlenums */ - input_line_pointer--; /*->char following number. */ + expressionP->X_add_number = number; /* Number of littlenums. */ + input_line_pointer--; /* -> char following number. */ } } @@ -766,24 +757,20 @@ current_location (expressionp) } } -/* - * Summary of operand(). - * - * in: Input_line_pointer points to 1st char of operand, which may - * be a space. - * - * out: A expressionS. - * The operand may have been empty: in this case X_op == O_absent. - * Input_line_pointer->(next non-blank) char after operand. - */ +/* In: Input_line_pointer points to 1st char of operand, which may + be a space. + + Out: A expressionS. + The operand may have been empty: in this case X_op == O_absent. + Input_line_pointer->(next non-blank) char after operand. */ static segT operand (expressionP) expressionS *expressionP; { char c; - symbolS *symbolP; /* points to symbol */ - char *name; /* points to name of symbol */ + symbolS *symbolP; /* Points to symbol. */ + char *name; /* Points to name of symbol. */ segT segment; /* All integers are regarded as unsigned unless they are negated. @@ -794,10 +781,13 @@ operand (expressionP) though it appears negative if valueT is 32 bits. */ expressionP->X_unsigned = 1; - /* digits, assume it is a bignum. */ + /* Digits, assume it is a bignum. */ + + SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */ + c = *input_line_pointer++; /* input_line_pointer -> past char in c. */ - SKIP_WHITESPACE (); /* leading whitespace is part of operand. */ - c = *input_line_pointer++; /* input_line_pointer->past char in c. */ + if (is_end_of_line[(unsigned char) c]) + goto eol; switch (c) { @@ -812,13 +802,25 @@ operand (expressionP) case '9': input_line_pointer--; - integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) - ? 0 : 10, + integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) + ? 0 : 10, expressionP); break; +#ifdef LITERAL_PREFIXDOLLAR_HEX + case '$': + integer_constant (16, expressionP); + break; +#endif + +#ifdef LITERAL_PREFIXPERCENT_BIN + case '%': + integer_constant (2, expressionP); + break; +#endif + case '0': - /* non-decimal radix */ + /* Non-decimal radix. */ if (NUMBERS_WITH_SUFFIX || flag_m68k_mri) { @@ -833,7 +835,7 @@ operand (expressionP) integer_constant (0, expressionP); break; } - } + } c = *input_line_pointer; switch (c) { @@ -860,7 +862,7 @@ operand (expressionP) } else { - /* The string was only zero */ + /* The string was only zero. */ expressionP->X_op = O_constant; expressionP->X_add_number = 0; } @@ -912,8 +914,8 @@ operand (expressionP) case '6': case '7': integer_constant ((flag_m68k_mri || NUMBERS_WITH_SUFFIX) - ? 0 : 8, - expressionP); + ? 0 : 8, + expressionP); break; case 'f': @@ -935,11 +937,11 @@ operand (expressionP) case 0: case ERROR_EXPONENT_OVERFLOW: if (*cp == 'f' || *cp == 'b') - /* looks like a difference expression */ + /* Looks like a difference expression. */ goto is_0f_label; else if (cp == input_line_pointer + 1) /* No characters has been accepted -- looks like - end of operand. */ + end of operand. */ goto is_0f_label; else goto is_0f_float; @@ -958,7 +960,7 @@ operand (expressionP) break; is_0f_float: - /* fall through */ + /* Fall through. */ ; } @@ -998,17 +1000,21 @@ operand (expressionP) #ifndef NEED_INDEX_OPERATOR case '[': #endif - /* didn't begin with digit & not a name */ + /* Didn't begin with digit & not a name. */ segment = expression (expressionP); - /* Expression() will pass trailing whitespace */ - if ((c == '(' && *input_line_pointer++ != ')') - || (c == '[' && *input_line_pointer++ != ']')) + /* expression () will pass trailing whitespace. */ + if ((c == '(' && *input_line_pointer != ')') + || (c == '[' && *input_line_pointer != ']')) { - as_bad (_("Missing ')' assumed")); - input_line_pointer--; +#ifdef RELAX_PAREN_GROUPING + if (c != '(') +#endif + as_bad (_("Missing '%c' assumed"), c == '(' ? ')' : ']'); } + else + input_line_pointer++; SKIP_WHITESPACE (); - /* here with input_line_pointer->char after "(...)" */ + /* Here with input_line_pointer -> char after "(...)". */ return segment; #ifdef TC_M68K @@ -1027,9 +1033,9 @@ operand (expressionP) if (! flag_m68k_mri) { /* Warning: to conform to other people's assemblers NO - ESCAPEMENT is permitted for a single quote. The next + ESCAPEMENT is permitted for a single quote. The next character, parity errors and all, is taken as the value - of the operand. VERY KINKY. */ + of the operand. VERY KINKY. */ expressionP->X_op = O_constant; expressionP->X_add_number = *input_line_pointer++; break; @@ -1050,7 +1056,7 @@ operand (expressionP) /* Fall through. */ #endif case '~': - /* ~ is permitted to start a label on the Delta. */ + /* '~' is permitted to start a label on the Delta. */ if (is_name_beginner (c)) goto isname; case '!': @@ -1059,12 +1065,13 @@ operand (expressionP) operand (expressionP); if (expressionP->X_op == O_constant) { - /* input_line_pointer -> char after operand */ + /* input_line_pointer -> char after operand. */ if (c == '-') { expressionP->X_add_number = - expressionP->X_add_number; - /* Notice: '-' may overflow: no warning is given. This is - compatible with other people's assemblers. Sigh. */ + /* Notice: '-' may overflow: no warning is given. + This is compatible with other people's + assemblers. Sigh. */ expressionP->X_unsigned = 0; } else if (c == '~' || c == '"') @@ -1092,15 +1099,15 @@ operand (expressionP) #if defined (DOLLAR_DOT) || defined (TC_M68K) case '$': - /* $ is the program counter when in MRI mode, or when DOLLAR_DOT - is defined. */ + /* '$' is the program counter when in MRI mode, or when + DOLLAR_DOT is defined. */ #ifndef DOLLAR_DOT if (! flag_m68k_mri) goto de_fault; #endif if (flag_m68k_mri && hex_p (*input_line_pointer)) { - /* In MRI mode, $ is also used as the prefix for a + /* In MRI mode, '$' is also used as the prefix for a hexadecimal constant. */ integer_constant (16, expressionP); break; @@ -1166,11 +1173,10 @@ operand (expressionP) { goto isname; } + case ',': - case '\n': - case '\0': eol: - /* can't imagine any other kind of operand */ + /* Can't imagine any other kind of operand. */ expressionP->X_op = O_absent; input_line_pointer--; break; @@ -1211,14 +1217,10 @@ operand (expressionP) #ifdef TC_M68K de_fault: #endif - if (is_end_of_line[(unsigned char) c]) - goto eol; - if (is_name_beginner (c)) /* here if did not begin with a digit */ + if (is_name_beginner (c)) /* Here if did not begin with a digit. */ { - /* - * Identifier begins here. - * This is kludged for speed, so code is repeated. - */ + /* Identifier begins here. + This is kludged for speed, so code is repeated. */ isname: name = --input_line_pointer; c = get_symbol_end (); @@ -1271,7 +1273,7 @@ operand (expressionP) SKIP_WHITESPACE (); break; - } + } #endif symbolP = symbol_find_or_make (name); @@ -1301,7 +1303,7 @@ operand (expressionP) { /* Let the target try to parse it. Success is indicated by changing the X_op field to something other than O_absent and pointing - input_line_pointer passed the expression. If it can't parse the + input_line_pointer past the expression. If it can't parse the expression, X_op and input_line_pointer should be unchanged. */ expressionP->X_op = O_absent; --input_line_pointer; @@ -1317,12 +1319,10 @@ operand (expressionP) break; } - /* - * It is more 'efficient' to clean up the expressionS when they are created. - * Doing it here saves lines of code. - */ + /* It is more 'efficient' to clean up the expressionS when they are + created. Doing it here saves lines of code. */ clean_up_expression (expressionP); - SKIP_WHITESPACE (); /*->1st char after operand. */ + SKIP_WHITESPACE (); /* -> 1st char after operand. */ know (*input_line_pointer != ' '); /* The PA port needs this information. */ @@ -1338,19 +1338,18 @@ operand (expressionP) case O_register: return reg_section; } -} /* operand() */ +} -/* Internal. Simplify a struct expression for use by expr() */ - -/* - * In: address of a expressionS. - * The X_op field of the expressionS may only take certain values. - * Elsewise we waste time special-case testing. Sigh. Ditto SEG_ABSENT. - * Out: expressionS may have been modified: - * 'foo-foo' symbol references cancelled to 0, - * which changes X_op from O_subtract to O_constant. - * Unused fields zeroed to help expr(). - */ +/* Internal. Simplify a struct expression for use by expr (). */ + +/* In: address of a expressionS. + The X_op field of the expressionS may only take certain values. + Elsewise we waste time special-case testing. Sigh. Ditto SEG_ABSENT. + + Out: expressionS may have been modified: + 'foo-foo' symbol references cancelled to 0, which changes X_op + from O_subtract to O_constant. + Unused fields zeroed to help expr (). */ static void clean_up_expression (expressionP) @@ -1394,35 +1393,32 @@ clean_up_expression (expressionP) } } -/* Expression parser. */ - -/* - * We allow an empty expression, and just assume (absolute,0) silently. - * Unary operators and parenthetical expressions are treated as operands. - * As usual, Q==quantity==operand, O==operator, X==expression mnemonics. - * - * We used to do a aho/ullman shift-reduce parser, but the logic got so - * warped that I flushed it and wrote a recursive-descent parser instead. - * Now things are stable, would anybody like to write a fast parser? - * Most expressions are either register (which does not even reach here) - * or 1 symbol. Then "symbol+constant" and "symbol-symbol" are common. - * So I guess it doesn't really matter how inefficient more complex expressions - * are parsed. - * - * After expr(RANK,resultP) input_line_pointer->operator of rank <= RANK. - * Also, we have consumed any leading or trailing spaces (operand does that) - * and done all intervening operators. - * - * This returns the segment of the result, which will be - * absolute_section or the segment of a symbol. - */ +/* Expression parser. */ + +/* We allow an empty expression, and just assume (absolute,0) silently. + Unary operators and parenthetical expressions are treated as operands. + As usual, Q==quantity==operand, O==operator, X==expression mnemonics. + + We used to do a aho/ullman shift-reduce parser, but the logic got so + warped that I flushed it and wrote a recursive-descent parser instead. + Now things are stable, would anybody like to write a fast parser? + Most expressions are either register (which does not even reach here) + or 1 symbol. Then "symbol+constant" and "symbol-symbol" are common. + So I guess it doesn't really matter how inefficient more complex expressions + are parsed. + + After expr(RANK,resultP) input_line_pointer->operator of rank <= RANK. + Also, we have consumed any leading or trailing spaces (operand does that) + and done all intervening operators. + + This returns the segment of the result, which will be + absolute_section or the segment of a symbol. */ #undef __ #define __ O_illegal -static const operatorT op_encoding[256] = -{ /* maps ASCII->operators */ - +/* Maps ASCII -> operators. */ +static const operatorT op_encoding[256] = { __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, @@ -1455,28 +1451,25 @@ static const operatorT op_encoding[256] = __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __ }; - -/* - * Rank Examples - * 0 operand, (expression) - * 1 || - * 2 && - * 3 = <> < <= >= > - * 4 + - - * 5 used for * / % in MRI mode - * 6 & ^ ! | - * 7 * / % << >> - * 8 unary - unary ~ - */ -static operator_rankT op_rank[] = -{ +/* Rank Examples + 0 operand, (expression) + 1 || + 2 && + 3 = <> < <= >= > + 4 + - + 5 used for * / % in MRI mode + 6 & ^ ! | + 7 * / % << >> + 8 unary - unary ~ +*/ +static operator_rankT op_rank[] = { 0, /* O_illegal */ 0, /* O_absent */ 0, /* O_constant */ 0, /* O_symbol */ 0, /* O_symbol_rva */ 0, /* O_register */ - 0, /* O_bit */ + 0, /* O_big */ 9, /* O_uminus */ 9, /* O_bit_not */ 9, /* O_logical_not */ @@ -1524,8 +1517,8 @@ static operator_rankT op_rank[] = mode. Also, MRI uses a different bit_not operator, and this fixes that as well. */ -#define STANDARD_MUL_PRECEDENCE (7) -#define MRI_MUL_PRECEDENCE (5) +#define STANDARD_MUL_PRECEDENCE 8 +#define MRI_MUL_PRECEDENCE 6 void expr_set_precedence () @@ -1559,17 +1552,22 @@ expr_begin () } } -/* Return the encoding for the operator at INPUT_LINE_POINTER. - Advance INPUT_LINE_POINTER to the last character in the operator - (i.e., don't change it for a single character operator). */ +/* Return the encoding for the operator at INPUT_LINE_POINTER, and + sets NUM_CHARS to the number of characters in the operator. + Does not advance INPUT_LINE_POINTER. */ static inline operatorT -operator () +operator (num_chars) + int *num_chars; { int c; operatorT ret; c = *input_line_pointer & 0xff; + *num_chars = 1; + + if (is_end_of_line[c]) + return O_illegal; switch (c) { @@ -1591,14 +1589,14 @@ operator () ret = O_le; break; } - ++input_line_pointer; + *num_chars = 2; return ret; case '=': if (input_line_pointer[1] != '=') return op_encoding[c]; - ++input_line_pointer; + *num_chars = 2; return O_eq; case '>': @@ -1613,7 +1611,7 @@ operator () ret = O_ge; break; } - ++input_line_pointer; + *num_chars = 2; return ret; case '!': @@ -1624,52 +1622,54 @@ operator () return O_bit_inclusive_or; return op_encoding[c]; } - ++input_line_pointer; + *num_chars = 2; return O_bit_exclusive_or; case '|': if (input_line_pointer[1] != '|') return op_encoding[c]; - ++input_line_pointer; + *num_chars = 2; return O_logical_or; case '&': if (input_line_pointer[1] != '&') return op_encoding[c]; - ++input_line_pointer; + *num_chars = 2; return O_logical_and; } - /*NOTREACHED*/ + /* NOTREACHED */ } /* Parse an expression. */ segT expr (rankarg, resultP) - int rankarg; /* Larger # is higher rank. */ - expressionS *resultP; /* Deliver result here. */ + int rankarg; /* Larger # is higher rank. */ + expressionS *resultP; /* Deliver result here. */ { operator_rankT rank = (operator_rankT) rankarg; segT retval; expressionS right; operatorT op_left; operatorT op_right; + int op_chars; know (rank >= 0); retval = operand (resultP); - know (*input_line_pointer != ' '); /* Operand() gobbles spaces. */ + /* operand () gobbles spaces. */ + know (*input_line_pointer != ' '); - op_left = operator (); + op_left = operator (&op_chars); while (op_left != O_illegal && op_rank[(int) op_left] > rank) { segT rightseg; - input_line_pointer++; /*->after 1st character of operator. */ + input_line_pointer += op_chars; /* -> after operator. */ rightseg = expr (op_rank[(int) op_left], &right); if (right.X_op == O_absent) @@ -1709,16 +1709,17 @@ expr (rankarg, resultP) ) as_bad (_("operation combines symbols in different segments")); - op_right = operator (); + op_right = operator (&op_chars); - know (op_right == O_illegal || op_rank[(int) op_right] <= op_rank[(int) op_left]); + know (op_right == O_illegal + || op_rank[(int) op_right] <= op_rank[(int) op_left]); know ((int) op_left >= (int) O_multiply && (int) op_left <= (int) O_logical_or); - /* input_line_pointer->after right-hand quantity. */ - /* left-hand quantity in resultP */ - /* right-hand quantity in right. */ - /* operator in op_left. */ + /* input_line_pointer->after right-hand quantity. */ + /* left-hand quantity in resultP. */ + /* right-hand quantity in right. */ + /* operator in op_left. */ if (resultP->X_op == O_big) { @@ -1744,6 +1745,14 @@ expr (rankarg, resultP) } /* Optimize common cases. */ +#ifdef md_optimize_expr + if (md_optimize_expr (resultP, op_left, &right)) + { + /* Skip. */ + ; + } + else +#endif if (op_left == O_add && right.X_op == O_constant) { /* X + constant. */ @@ -1864,7 +1873,7 @@ expr (rankarg, resultP) } op_left = op_right; - } /* While next operator is >= this rank. */ + } /* While next operator is >= this rank. */ /* The PA port needs this information. */ if (resultP->X_add_symbol) @@ -1873,21 +1882,18 @@ expr (rankarg, resultP) return resultP->X_op == O_constant ? absolute_section : retval; } -/* - * get_symbol_end() - * - * This lives here because it belongs equally in expr.c & read.c. - * Expr.c is just a branch office read.c anyway, and putting it - * here lessens the crowd at read.c. - * - * Assume input_line_pointer is at start of symbol name. - * Advance input_line_pointer past symbol name. - * Turn that character into a '\0', returning its former value. - * This allows a string compare (RMS wants symbol names to be strings) - * of the symbol name. - * There will always be a char following symbol name, because all good - * lines end in end-of-line. - */ +/* This lives here because it belongs equally in expr.c & read.c. + expr.c is just a branch office read.c anyway, and putting it + here lessens the crowd at read.c. + + Assume input_line_pointer is at start of symbol name. + Advance input_line_pointer past symbol name. + Turn that character into a '\0', returning its former value. + This allows a string compare (RMS wants symbol names to be strings) + of the symbol name. + There will always be a char following symbol name, because all good + lines end in end-of-line. */ + char get_symbol_end () { @@ -1907,14 +1913,10 @@ get_symbol_end () return (c); } - unsigned int get_single_number () { expressionS exp; operand (&exp); return exp.X_add_number; - } - -/* end of expr.c */ diff --git a/contrib/binutils/gas/expr.h b/contrib/binutils/gas/expr.h index 0ed6af6..d63ab7f 100644 --- a/contrib/binutils/gas/expr.h +++ b/contrib/binutils/gas/expr.h @@ -1,5 +1,5 @@ /* expr.h -> header file for expr.c - Copyright (C) 1987, 92-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 92-99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -39,8 +39,7 @@ NOTE: This enumeration must match the op_rank array in expr.c. */ -typedef enum -{ +typedef enum { /* An illegal expression. */ O_illegal, /* A nonexistent expression. */ @@ -111,8 +110,7 @@ typedef enum O_max } operatorT; -typedef struct expressionS -{ +typedef struct expressionS { /* The main symbol. */ symbolS *X_add_symbol; /* The second symbol, if needed. */ @@ -142,16 +140,16 @@ typedef struct expressionS unsigned short X_md; } expressionS; -/* "result" should be type (expressionS *). */ +/* "result" should be type (expressionS *). */ #define expression(result) expr (0, result) /* If an expression is O_big, look here for its value. These common - data may be clobbered whenever expr() is called. */ -/* Flonums returned here. Big enough to hold most precise flonum. */ + data may be clobbered whenever expr() is called. */ +/* Flonums returned here. Big enough to hold most precise flonum. */ extern FLONUM_TYPE generic_floating_point_number; -/* Bignums returned here. */ +/* Bignums returned here. */ extern LITTLENUM_TYPE generic_bignum[]; -/* Number of littlenums in above. */ +/* Number of littlenums in above. */ #define SIZE_OF_LARGE_NUMBER (20) typedef char operator_rankT; @@ -169,5 +167,3 @@ extern symbolS *expr_build_uconstant PARAMS ((offsetT)); extern symbolS *expr_build_unary PARAMS ((operatorT, symbolS *)); extern symbolS *expr_build_binary PARAMS ((operatorT, symbolS *, symbolS *)); extern symbolS *expr_build_dot PARAMS ((void)); - -/* end of expr.h */ diff --git a/contrib/binutils/gas/flonum-copy.c b/contrib/binutils/gas/flonum-copy.c index 5bcc5cc..79a34c0 100644 --- a/contrib/binutils/gas/flonum-copy.c +++ b/contrib/binutils/gas/flonum-copy.c @@ -1,5 +1,5 @@ /* flonum_copy.c - copy a flonum - Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -14,8 +14,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #include "as.h" @@ -24,8 +25,8 @@ flonum_copy (in, out) FLONUM_TYPE *in; FLONUM_TYPE *out; { - unsigned int in_length; /* 0 origin */ - unsigned int out_length; /* 0 origin */ + unsigned int in_length; /* 0 origin */ + unsigned int out_length; /* 0 origin */ out->sign = in->sign; in_length = in->leader - in->low; @@ -37,37 +38,35 @@ flonum_copy (in, out) else { out_length = out->high - out->low; - /* - * Assume no GAPS in packing of littlenums. - * I.e. sizeof(array) == sizeof(element) * number_of_elements. - */ + /* Assume no GAPS in packing of littlenums. + I.e. sizeof(array) == sizeof(element) * number_of_elements. */ if (in_length <= out_length) { { - /* - * For defensive programming, zero any high-order littlenums we don't need. - * This is destroying evidence and wasting time, so why bother??? - */ + /* For defensive programming, zero any high-order + littlenums we don't need. This is destroying evidence + and wasting time, so why bother??? */ if (in_length < out_length) { - memset ((char *) (out->low + in_length + 1), '\0', out_length - in_length); + memset ((char *) (out->low + in_length + 1), '\0', + out_length - in_length); } } - memcpy ((void *) (out->low), (void *) (in->low), ((in_length + 1) * sizeof (LITTLENUM_TYPE))); + memcpy ((void *) (out->low), (void *) (in->low), + ((in_length + 1) * sizeof (LITTLENUM_TYPE))); out->exponent = in->exponent; out->leader = in->leader - in->low + out->low; } else { - int shorten; /* 1-origin. Number of littlenums we drop. */ + int shorten; /* 1-origin. Number of littlenums we drop. */ shorten = in_length - out_length; /* Assume out_length >= 0 ! */ - memcpy ((void *) (out->low), (void *) (in->low + shorten), ((out_length + 1) * sizeof (LITTLENUM_TYPE))); + memcpy ((void *) (out->low), (void *) (in->low + shorten), + ((out_length + 1) * sizeof (LITTLENUM_TYPE))); out->leader = out->high; out->exponent = in->exponent + shorten; } } /* if any significant bits */ -} /* flonum_copy() */ - -/* end of flonum_copy.c */ +} diff --git a/contrib/binutils/gas/flonum-konst.c b/contrib/binutils/gas/flonum-konst.c index 22bba05..599ce5e 100644 --- a/contrib/binutils/gas/flonum-konst.c +++ b/contrib/binutils/gas/flonum-konst.c @@ -1,5 +1,5 @@ /* flonum_const.c - Useful Flonum constants - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 1996 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -23,13 +23,13 @@ #include "flonum.h" /* JF: I added the last entry to this table, and I'm not sure if its right or not. Could go either way. I wish - I really understood this stuff. */ - + I really understood this stuff. */ const int table_size_of_flonum_powers_of_ten = 13; -static const LITTLENUM_TYPE zero[] = -{1}; +static const LITTLENUM_TYPE zero[] = { + 1 +}; /***********************************************************************\ * * @@ -44,131 +44,149 @@ static const LITTLENUM_TYPE zero[] = \***********************************************************************/ /* JF: If this equals 6553/(2^16)+39321/(2^32)+... it approaches .1 */ -static const LITTLENUM_TYPE minus_1[] = -{ +static const LITTLENUM_TYPE minus_1[] = { 39322, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, - 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 6553}; -static const LITTLENUM_TYPE plus_1[] = -{10}; + 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 6553 +}; + +static const LITTLENUM_TYPE plus_1[] = { + 10 +}; /* JF: If this equals 655/(2^16) + 23592/(2^32) + ... it approaches .01 */ -static const LITTLENUM_TYPE minus_2[] = -{ +static const LITTLENUM_TYPE minus_2[] = { 10486, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 49807, - 10485, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 655}; -static const LITTLENUM_TYPE plus_2[] = -{100}; + 10485, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 655 +}; + +static const LITTLENUM_TYPE plus_2[] = { + 100 +}; /* This approaches .0001 */ -static const LITTLENUM_TYPE minus_3[] = -{ +static const LITTLENUM_TYPE minus_3[] = { 52534, 20027, 37329, 65116, 64067, 60397, 14784, 18979, 33659, 19503, - 2726, 9542, 629, 2202, 40475, 10590, 4299, 47815, 36280, 6}; -static const LITTLENUM_TYPE plus_3[] = -{10000}; + 2726, 9542, 629, 2202, 40475, 10590, 4299, 47815, 36280, 6 +}; + +static const LITTLENUM_TYPE plus_3[] = { + 10000 +}; /* JF: this approaches 1e-8 */ -static const LITTLENUM_TYPE minus_4[] = -{ +static const LITTLENUM_TYPE minus_4[] = { 22517, 49501, 54293, 19424, 60699, 6716, 24348, 22618, 23904, 21327, - 3919, 44703, 19149, 28803, 48959, 6259, 50273, 62237, 42}; + 3919, 44703, 19149, 28803, 48959, 6259, 50273, 62237, 42 +}; + /* This equals 1525 * 2^16 + 57600 */ -static const LITTLENUM_TYPE plus_4[] = -{57600, 1525}; +static const LITTLENUM_TYPE plus_4[] = { + 57600, 1525 +}; /* This approaches 1e-16 */ -static const LITTLENUM_TYPE minus_5[] = -{ +static const LITTLENUM_TYPE minus_5[] = { 22199, 45957, 17005, 26266, 10526, 16260, 55017, 35680, 40443, 19789, - 17356, 30195, 55905, 28426, 63010, 44197, 1844}; -static const LITTLENUM_TYPE plus_5[] = -{28609, 34546, 35}; + 17356, 30195, 55905, 28426, 63010, 44197, 1844 +}; -static const LITTLENUM_TYPE minus_6[] = -{ +static const LITTLENUM_TYPE plus_5[] = { + 28609, 34546, 35 +}; + +static const LITTLENUM_TYPE minus_6[] = { 30926, 26518, 13110, 43018, 54982, 48258, 24658, 15209, 63366, 11929, - 20069, 43857, 60487, 51}; -static const LITTLENUM_TYPE plus_6[] = -{61313, 34220, 16731, 11629, 1262}; + 20069, 43857, 60487, 51 +}; -static const LITTLENUM_TYPE minus_7[] = -{ - 29819, 14733, 21490, 40602, 31315, 65186, 2695}; -static const LITTLENUM_TYPE plus_7[] = -{ - 7937, 49002, 60772, 28216, 38893, 55975, 63988, 59711, 20227, 24}; +static const LITTLENUM_TYPE plus_6[] = { + 61313, 34220, 16731, 11629, 1262 +}; -static const LITTLENUM_TYPE minus_8[] = -{ +static const LITTLENUM_TYPE minus_7[] = { + 29819, 14733, 21490, 40602, 31315, 65186, 2695 +}; + +static const LITTLENUM_TYPE plus_7[] = { + 7937, 49002, 60772, 28216, 38893, 55975, 63988, 59711, 20227, 24 +}; + +static const LITTLENUM_TYPE minus_8[] = { 27579, 64807, 12543, 794, 13907, 61297, 12013, 64360, 15961, 20566, - 24178, 15922, 59427, 110}; -static const LITTLENUM_TYPE plus_8[] = -{ + 24178, 15922, 59427, 110 +}; + +static const LITTLENUM_TYPE plus_8[] = { 15873, 11925, 39177, 991, 14589, 3861, 58415, 9076, 62956, 54223, - 56328, 50180, 45274, 48333, 32537, 42547, 9731, 59679, 590}; + 56328, 50180, 45274, 48333, 32537, 42547, 9731, 59679, 590 +}; -static const LITTLENUM_TYPE minus_9[] = -{ +static const LITTLENUM_TYPE minus_9[] = { 11042, 8464, 58971, 63429, 6022, 63485, 5500, 53464, 47545, 50068, 56988, 22819, 49708, 54493, 9920, 47667, 40409, 35764, 10383, 54466, - 32702, 17493, 32420, 34382, 22750, 20681, 12300}; -static const LITTLENUM_TYPE plus_9[] = -{ + 32702, 17493, 32420, 34382, 22750, 20681, 12300 +}; + +static const LITTLENUM_TYPE plus_9[] = { 20678, 27614, 28272, 53066, 55311, 54677, 29038, 9906, 26288, 44486, 13860, 7445, 54106, 15426, 21518, 25599, 29632, 52309, 61207, 26105, - 10482, 21948, 51191, 32988, 60892, 62574, 61390, 24540, 21495, 5}; + 10482, 21948, 51191, 32988, 60892, 62574, 61390, 24540, 21495, 5 +}; -static const LITTLENUM_TYPE minus_10[] = -{ +static const LITTLENUM_TYPE minus_10[] = { 6214, 48771, 23471, 30163, 31763, 38013, 57001, 11770, 18263, 36366, 20742, 45086, 56969, 53231, 37856, 55814, 38057, 15692, 46761, 8713, - 6102, 20083, 8269, 11839, 11571, 50963, 15649, 11698, 40675, 2308}; -static const LITTLENUM_TYPE plus_10[] = -{ + 6102, 20083, 8269, 11839, 11571, 50963, 15649, 11698, 40675, 2308 +}; + +static const LITTLENUM_TYPE plus_10[] = { 63839, 36576, 45712, 44516, 37803, 29482, 4966, 30556, 37961, 23310, 27070, 44972, 29507, 48257, 45209, 7494, 17831, 38728, 41577, 29443, - 36016, 7955, 35339, 35479, 36011, 14553, 49618, 5588, 25396, 28}; + 36016, 7955, 35339, 35479, 36011, 14553, 49618, 5588, 25396, 28 +}; -static const LITTLENUM_TYPE minus_11[] = -{ +static const LITTLENUM_TYPE minus_11[] = { 16663, 56882, 61983, 7804, 36555, 32060, 34502, 1000, 14356, 21681, 6605, 34767, 51411, 59048, 53614, 39850, 30079, 6496, 6846, 26841, - 40778, 19578, 59899, 44085, 54016, 24259, 11232, 21229, 21313, 81}; -static const LITTLENUM_TYPE plus_11[] = -{ + 40778, 19578, 59899, 44085, 54016, 24259, 11232, 21229, 21313, 81 +}; + +static const LITTLENUM_TYPE plus_11[] = { 92, 9054, 62707, 17993, 7821, 56838, 13992, 21321, 29637, 48426, 42982, 38668, 49574, 28820, 18200, 18927, 53979, 16219, 37484, 2516, - 44642, 14665, 11587, 41926, 13556, 23956, 54320, 6661, 55766, 805}; + 44642, 14665, 11587, 41926, 13556, 23956, 54320, 6661, 55766, 805 +}; -static const LITTLENUM_TYPE minus_12[] = -{ +static const LITTLENUM_TYPE minus_12[] = { 33202, 45969, 58804, 56734, 16482, 26007, 44984, 49334, 31007, 32944, 44517, 63329, 47131, 15291, 59465, 2264, 23218, 11829, 59771, 38798, - 31051, 28748, 23129, 40541, 41562, 35108, 50620, 59014, 51817, 6613}; -static const LITTLENUM_TYPE plus_12[] = -{ + 31051, 28748, 23129, 40541, 41562, 35108, 50620, 59014, 51817, 6613 +}; + +static const LITTLENUM_TYPE plus_12[] = { 10098, 37922, 58070, 7432, 10470, 63465, 23718, 62190, 47420, 7009, 38443, 4587, 45596, 38472, 52129, 52779, 29012, 13559, 48688, 31678, - 41753, 58662, 10668, 36067, 29906, 56906, 21461, 46556, 59571, 9}; + 41753, 58662, 10668, 36067, 29906, 56906, 21461, 46556, 59571, 9 +}; -static const LITTLENUM_TYPE minus_13[] = -{ +static const LITTLENUM_TYPE minus_13[] = { 45309, 27592, 37144, 34637, 34328, 41671, 34620, 24135, 53401, 22112, 21576, 45147, 39310, 44051, 48572, 3676, 46544, 59768, 33350, 2323, - 49524, 61568, 3903, 36487, 36356, 30903, 14975, 9035, 29715, 667}; -static const LITTLENUM_TYPE plus_13[] = -{ + 49524, 61568, 3903, 36487, 36356, 30903, 14975, 9035, 29715, 667 +}; + +static const LITTLENUM_TYPE plus_13[] = { 18788, 16960, 6318, 45685, 55400, 46230, 35794, 25588, 7253, 55541, 49716, 59760, 63592, 8191, 63765, 58530, 44667, 13294, 10001, 55586, - 47887, 18738, 9509, 40896, 42506, 52580, 4171, 325, 12329, 98}; + 47887, 18738, 9509, 40896, 42506, 52580, 4171, 325, 12329, 98 +}; /* Shut up complaints about differing pointer types. They only differ in the const attribute, but there isn't any easy way to do this */ #define X (LITTLENUM_TYPE *) -const FLONUM_TYPE flonum_negative_powers_of_ten[] = -{ +const FLONUM_TYPE flonum_negative_powers_of_ten[] = { {X zero, X zero, X zero, 0, '+'}, {X minus_1, X minus_1 + 19, X minus_1 + 19, -20, '+'}, {X minus_2, X minus_2 + 19, X minus_2 + 19, -20, '+'}, @@ -185,8 +203,7 @@ const FLONUM_TYPE flonum_negative_powers_of_ten[] = {X minus_13, X minus_13 + 29, X minus_13 + 29, -880, '+'}, }; -const FLONUM_TYPE flonum_positive_powers_of_ten[] = -{ +const FLONUM_TYPE flonum_positive_powers_of_ten[] = { {X zero, X zero, X zero, 0, '+'}, {X plus_1, X plus_1 + 0, X plus_1 + 0, 0, '+'}, {X plus_2, X plus_2 + 0, X plus_2 + 0, 0, '+'}, @@ -204,6 +221,8 @@ const FLONUM_TYPE flonum_positive_powers_of_ten[] = }; #ifdef VMS -void dummy1 () { } +void +dummy1 () +{ +} #endif -/* end of flonum_const.c */ diff --git a/contrib/binutils/gas/flonum-mult.c b/contrib/binutils/gas/flonum-mult.c index 434a73b..9733724 100644 --- a/contrib/binutils/gas/flonum-mult.c +++ b/contrib/binutils/gas/flonum-mult.c @@ -1,5 +1,6 @@ /* flonum_mult.c - multiply two flonums - Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1990, 1991, 1992, 2000 + Free Software Foundation, Inc. This file is part of Gas, the GNU Assembler. @@ -22,25 +23,22 @@ #include "flonum.h" /* plan for a . b => p(roduct) - - + +-------+-------+-/ /-+-------+-------+ | a | a | ... | a | a | | A | A-1 | | 1 | 0 | +-------+-------+-/ /-+-------+-------+ - - + +-------+-------+-/ /-+-------+-------+ | b | b | ... | b | b | | B | B-1 | | 1 | 0 | +-------+-------+-/ /-+-------+-------+ - - + +-------+-------+-/ /-+-------+-/ /-+-------+-------+ | p | p | ... | p | ... | p | p | | A+B+1| A+B | | N | | 1 | 0 | +-------+-------+-/ /-+-------+-/ /-+-------+-------+ - + /^\ (carry) a .b ... | ... a .b a .b A B | 0 1 0 0 @@ -56,49 +54,48 @@ | \ +----- P = > a .b N /__ i j - + N = 0 ... A+B - + for all i,j where i+j=N [i,j integers > 0] - + a[], b[], p[] may not intersect. Zero length factors signify 0 significant bits: treat as 0.0. 0.0 factors do the right thing. Zero length product OK. - + I chose the ForTran accent "foo[bar]" instead of the C accent "*garply" because I felt the ForTran way was more intuitive. The C way would probably yield better code on most C compilers. Dean Elsner. - (C style also gives deeper insight [to me] ... oh well ...) - */ + (C style also gives deeper insight [to me] ... oh well ...) */ -void +void flonum_multip (a, b, product) const FLONUM_TYPE *a; const FLONUM_TYPE *b; FLONUM_TYPE *product; { - int size_of_a; /* 0 origin */ - int size_of_b; /* 0 origin */ - int size_of_product; /* 0 origin */ - int size_of_sum; /* 0 origin */ - int extra_product_positions; /* 1 origin */ + int size_of_a; /* 0 origin */ + int size_of_b; /* 0 origin */ + int size_of_product; /* 0 origin */ + int size_of_sum; /* 0 origin */ + int extra_product_positions; /* 1 origin */ unsigned long work; unsigned long carry; long exponent; LITTLENUM_TYPE *q; long significant; /* TRUE when we emit a non-0 littlenum */ - /* ForTran accent follows. */ - int P; /* Scan product low-order -> high. */ + /* ForTran accent follows. */ + int P; /* Scan product low-order -> high. */ int N; /* As in sum above. */ - int A; /* Which [] of a? */ - int B; /* Which [] of b? */ + int A; /* Which [] of a? */ + int B; /* Which [] of b? */ - if ((a->sign != '-' && a->sign != '+') || (b->sign != '-' && b->sign != '+')) + if ((a->sign != '-' && a->sign != '+') + || (b->sign != '-' && b->sign != '+')) { - /* ... - Got to fail somehow. Any suggestions? */ + /* Got to fail somehow. Any suggestions? */ product->sign = 0; return; } @@ -111,8 +108,8 @@ flonum_multip (a, b, product) extra_product_positions = size_of_product - size_of_sum; if (extra_product_positions < 0) { - P = extra_product_positions; /* P < 0 */ - exponent -= extra_product_positions; /* Increases exponent. */ + P = extra_product_positions; /* P < 0 */ + exponent -= extra_product_positions; /* Increases exponent. */ } else { @@ -130,7 +127,8 @@ flonum_multip (a, b, product) if (A <= size_of_a && B <= size_of_b && B >= 0) { #ifdef TRACE - printf ("a:low[%d.]=%04x b:low[%d.]=%04x work_before=%08x\n", A, a->low[A], B, b->low[B], work); + printf ("a:low[%d.]=%04x b:low[%d.]=%04x work_before=%08x\n", + A, a->low[A], B, b->low[B], work); #endif /* Watch out for sign extension! Without the casts, on the DEC Alpha, the multiplication result is *signed* @@ -162,23 +160,19 @@ flonum_multip (a, b, product) exponent++; } } - /* - * [P]-> position # size_of_sum + 1. - * This is where 'carry' should go. - */ + /* [P]-> position # size_of_sum + 1. + This is where 'carry' should go. */ #ifdef TRACE printf ("final carry =%04x\n", carry); #endif if (carry) { if (extra_product_positions > 0) - { - product->low[P] = carry; - } + product->low[P] = carry; else { - /* No room at high order for carry littlenum. */ - /* Shift right 1 to make room for most significant littlenum. */ + /* No room at high order for carry littlenum. */ + /* Shift right 1 to make room for most significant littlenum. */ exponent++; P--; for (q = product->low + P; q >= product->low; q--) @@ -190,11 +184,7 @@ flonum_multip (a, b, product) } } else - { - P--; - } + P--; product->leader = product->low + P; product->exponent = exponent; } - -/* end of flonum_mult.c */ diff --git a/contrib/binutils/gas/flonum.h b/contrib/binutils/gas/flonum.h index 6684f49..d1a5042 100644 --- a/contrib/binutils/gas/flonum.h +++ b/contrib/binutils/gas/flonum.h @@ -1,6 +1,6 @@ /* flonum.h - Floating point package - - Copyright (C) 1987, 90, 91, 92, 94, 95, 1996 Free Software Foundation, Inc. + Copyright (C) 1987, 90, 91, 92, 94, 95, 96, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -49,8 +49,7 @@ A sign value of 'P' means we've been asked to assemble +Inf A sign value of 'N' means we've been asked to assemble -Inf */ -struct FLONUM_STRUCT -{ +struct FLONUM_STRUCT { LITTLENUM_TYPE *low; /* low order littlenum of a bignum */ LITTLENUM_TYPE *high; /* high order littlenum of a bignum */ LITTLENUM_TYPE *leader; /* -> 1st non-zero littlenum */ @@ -61,7 +60,6 @@ struct FLONUM_STRUCT typedef struct FLONUM_STRUCT FLONUM_TYPE; - /***********************************************************************\ * * * Since we can (& do) meet with exponents like 10^5000, it * @@ -74,15 +72,11 @@ typedef struct FLONUM_STRUCT FLONUM_TYPE; * * \***********************************************************************/ - extern const FLONUM_TYPE flonum_positive_powers_of_ten[]; extern const FLONUM_TYPE flonum_negative_powers_of_ten[]; extern const int table_size_of_flonum_powers_of_ten; -/* Flonum_XXX_powers_of_ten[] table has */ -/* legal indices from 0 to */ -/* + this number inclusive. */ - - +/* Flonum_XXX_powers_of_ten[] table has legal indices from 0 to + + this number inclusive. */ /***********************************************************************\ * * @@ -106,5 +100,3 @@ void flonum_multip PARAMS ((const FLONUM_TYPE * a, const FLONUM_TYPE * b, \***********************************************************************/ #define ERROR_EXPONENT_OVERFLOW (2) - -/* end of flonum.h */ diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c index d184664..f2f8cfe 100644 --- a/contrib/binutils/gas/frags.c +++ b/contrib/binutils/gas/frags.c @@ -27,6 +27,7 @@ extern fragS zero_address_frag; extern fragS bss_address_frag; /* Initialization for frag routines. */ + void frag_init () { @@ -37,6 +38,7 @@ frag_init () /* Allocate a frag on the specified obstack. Call this routine from everywhere else, so that all the weird alignment hackery can be done in just one place. */ + fragS * frag_alloc (ob) struct obstack *ob; @@ -53,15 +55,12 @@ frag_alloc (ob) return ptr; } -/* - * frag_grow() - * - * Try to augment current frag by nchars chars. - * If there is no room, close of the current frag with a ".fill 0" - * and begin a new frag. Unless the new frag has nchars chars available - * do not return. Do not set up any fields of *now_frag. - */ -void +/* Try to augment current frag by nchars chars. + If there is no room, close of the current frag with a ".fill 0" + and begin a new frag. Unless the new frag has nchars chars available + do not return. Do not set up any fields of *now_frag. */ + +void frag_grow (nchars) unsigned int nchars; { @@ -74,41 +73,40 @@ frag_grow (nchars) frag_new (0); oldc = frchain_now->frch_obstack.chunk_size; frchain_now->frch_obstack.chunk_size = 2 * nchars + SIZEOF_STRUCT_FRAG; - while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars) - { - frag_wane (frag_now); - frag_new (0); - } + if (frchain_now->frch_obstack.chunk_size > 0) + while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars + && (unsigned long) frchain_now->frch_obstack.chunk_size > nchars) + { + frag_wane (frag_now); + frag_new (0); + } frchain_now->frch_obstack.chunk_size = oldc; } if (obstack_room (&frchain_now->frch_obstack) < nchars) as_fatal (_("Can't extend frag %d. chars"), nchars); } -/* - * frag_new() - * - * Call this to close off a completed frag, and start up a new (empty) - * frag, in the same subsegment as the old frag. - * [frchain_now remains the same but frag_now is updated.] - * Because this calculates the correct value of fr_fix by - * looking at the obstack 'frags', it needs to know how many - * characters at the end of the old frag belong to the maximal - * variable part; The rest must belong to fr_fix. - * It doesn't actually set up the old frag's fr_var. You may have - * set fr_var == 1, but allocated 10 chars to the end of the frag; - * In this case you pass old_frags_var_max_size == 10. - * In fact, you may use fr_var for something totally unrelated to the - * size of the variable part of the frag; None of the generic frag - * handling code makes use of fr_var. - * - * Make a new frag, initialising some components. Link new frag at end - * of frchain_now. - */ -void +/* Call this to close off a completed frag, and start up a new (empty) + frag, in the same subsegment as the old frag. + [frchain_now remains the same but frag_now is updated.] + Because this calculates the correct value of fr_fix by + looking at the obstack 'frags', it needs to know how many + characters at the end of the old frag belong to the maximal + variable part; The rest must belong to fr_fix. + It doesn't actually set up the old frag's fr_var. You may have + set fr_var == 1, but allocated 10 chars to the end of the frag; + In this case you pass old_frags_var_max_size == 10. + In fact, you may use fr_var for something totally unrelated to the + size of the variable part of the frag; None of the generic frag + handling code makes use of fr_var. + + Make a new frag, initialising some components. Link new frag at end + of frchain_now. */ + +void frag_new (old_frags_var_max_size) /* Number of chars (already allocated on obstack frags) in - variable_length part of frag. */ + variable_length part of frag. */ int old_frags_var_max_size; { fragS *former_last_fragP; @@ -122,7 +120,7 @@ frag_new (old_frags_var_max_size) assert (frag_now->fr_type != 0); /* This will align the obstack so the next struct we allocate on it - will begin at a correct boundary. */ + will begin at a correct boundary. */ obstack_finish (&frchain_now->frch_obstack); frchP = frchain_now; know (frchP); @@ -136,7 +134,7 @@ frag_new (old_frags_var_max_size) /* Generally, frag_now->points to an address rounded up to next alignment. However, characters will add to obstack frags IMMEDIATELY after the struct frag, even if they are not starting - at an alignment address. */ + at an alignment address. */ former_last_fragP->fr_next = frag_now; frchP->frch_last = frag_now; @@ -150,17 +148,13 @@ frag_new (old_frags_var_max_size) assert (frchain_now->frch_last == frag_now); frag_now->fr_next = NULL; -} /* frag_new() */ +} -/* - * frag_more() - * - * Start a new frag unless we have n more chars of room in the current frag. - * Close off the old frag with a .fill 0. - * - * Return the address of the 1st char to write into. Advance - * frag_now_growth past the new chars. - */ +/* Start a new frag unless we have n more chars of room in the current frag. + Close off the old frag with a .fill 0. + + Return the address of the 1st char to write into. Advance + frag_now_growth past the new chars. */ char * frag_more (nchars) @@ -184,18 +178,14 @@ frag_more (nchars) retval = obstack_next_free (&frchain_now->frch_obstack); obstack_blank_fast (&frchain_now->frch_obstack, nchars); return (retval); -} /* frag_more() */ +} -/* - * frag_var() - * - * Start a new frag unless we have max_chars more chars of room in the current frag. - * Close off the old frag with a .fill 0. - * - * Set up a machine_dependent relaxable frag, then start a new frag. - * Return the address of the 1st char of the var part of the old frag - * to write into. - */ +/* Start a new frag unless we have max_chars more chars of room in the + current frag. Close off the old frag with a .fill 0. + + Set up a machine_dependent relaxable frag, then start a new frag. + Return the address of the 1st char of the var part of the old frag + to write into. */ char * frag_var (type, max_chars, var, subtype, symbol, offset, opcode) @@ -231,13 +221,9 @@ frag_var (type, max_chars, var, subtype, symbol, offset, opcode) return (retval); } -/* - * frag_variant() - * - * OVE: This variant of frag_var assumes that space for the tail has been - * allocated by caller. - * No call to frag_grow is done. - */ +/* OVE: This variant of frag_var assumes that space for the tail has been + allocated by caller. + No call to frag_grow is done. */ char * frag_variant (type, max_chars, var, subtype, symbol, offset, opcode) @@ -269,14 +255,11 @@ frag_variant (type, max_chars, var, subtype, symbol, offset, opcode) as_where (&frag_now->fr_file, &frag_now->fr_line); frag_new (max_chars); return (retval); -} /* frag_variant() */ +} -/* - * frag_wane() - * - * Reduce the variable end of a frag to a harmless state. - */ -void +/* Reduce the variable end of a frag to a harmless state. */ + +void frag_wane (fragP) register fragS *fragP; { @@ -292,7 +275,7 @@ frag_wane (fragP) the maximum number of characters to skip when doing the alignment, or 0 if there is no maximum. */ -void +void frag_align (alignment, fill_character, max) int alignment; int fill_character; @@ -301,9 +284,10 @@ frag_align (alignment, fill_character, max) if (now_seg == absolute_section) { addressT new_off; + addressT mask; - new_off = ((abs_section_offset + alignment - 1) - &~ ((1 << alignment) - 1)); + mask = (~(addressT) 0) << alignment; + new_off = (abs_section_offset + ~mask) & mask; if (max == 0 || new_off - abs_section_offset <= (addressT) max) abs_section_offset = new_off; } @@ -324,7 +308,7 @@ frag_align (alignment, fill_character, max) FILL_PATTERN. MAX is the maximum number of characters to skip when doing the alignment, or 0 if there is no maximum. */ -void +void frag_align_pattern (alignment, fill_pattern, n_fill, max) int alignment; const char *fill_pattern; @@ -338,20 +322,53 @@ frag_align_pattern (alignment, fill_pattern, n_fill, max) memcpy (p, fill_pattern, n_fill); } +/* The NOP_OPCODE is for the alignment fill value. Fill it with a nop + instruction so that the disassembler does not choke on it. */ +#ifndef NOP_OPCODE +#define NOP_OPCODE 0x00 +#endif + +/* Use this to restrict the amount of memory allocated for representing + the alignment code. Needs to be large enough to hold any fixed sized + prologue plus the replicating portion. */ +#ifndef MAX_MEM_FOR_RS_ALIGN_CODE + /* Assume that if HANDLE_ALIGN is not defined then no special action + is required to code fill, which means that we get just repeat the + one NOP_OPCODE byte. */ +# ifndef HANDLE_ALIGN +# define MAX_MEM_FOR_RS_ALIGN_CODE 1 +# else +# define MAX_MEM_FOR_RS_ALIGN_CODE ((1 << alignment) - 1) +# endif +#endif + +void +frag_align_code (alignment, max) + int alignment; + int max; +{ + char *p; + + p = frag_var (rs_align_code, MAX_MEM_FOR_RS_ALIGN_CODE, 1, + (relax_substateT) max, (symbolS *) 0, + (offsetT) alignment, (char *) 0); + *p = NOP_OPCODE; +} + addressT frag_now_fix_octets () { if (now_seg == absolute_section) return abs_section_offset; - return ((char*) obstack_next_free (&frchain_now->frch_obstack) - - frag_now->fr_literal); + return ((char *) obstack_next_free (&frchain_now->frch_obstack) + - frag_now->fr_literal); } addressT frag_now_fix () { - return frag_now_fix_octets() / OCTETS_PER_BYTE; + return frag_now_fix_octets () / OCTETS_PER_BYTE; } void @@ -365,5 +382,3 @@ frag_append_1_char (datum) } obstack_1grow (&frchain_now->frch_obstack, datum); } - -/* end of frags.c */ diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h index dcd9a2f..c1c652b 100644 --- a/contrib/binutils/gas/frags.h +++ b/contrib/binutils/gas/frags.h @@ -26,37 +26,34 @@ struct obstack; #endif -/* - * A code fragment (frag) is some known number of chars, followed by some - * unknown number of chars. Typically the unknown number of chars is an - * instruction address whose size is yet unknown. We always know the greatest - * possible size the unknown number of chars may become, and reserve that - * much room at the end of the frag. - * Once created, frags do not change address during assembly. - * We chain the frags in (a) forward-linked list(s). The object-file address - * of the 1st char of a frag is generally not known until after relax(). - * Many things at assembly time describe an address by {object-file-address - * of a particular frag}+offset. - - BUG: it may be smarter to have a single pointer off to various different - notes for different frag kinds. See how code pans - */ - -struct frag -{ - /* Object file address (as an octet offset). */ +/* A code fragment (frag) is some known number of chars, followed by some + unknown number of chars. Typically the unknown number of chars is an + instruction address whose size is yet unknown. We always know the greatest + possible size the unknown number of chars may become, and reserve that + much room at the end of the frag. + Once created, frags do not change address during assembly. + We chain the frags in (a) forward-linked list(s). The object-file address + of the 1st char of a frag is generally not known until after relax(). + Many things at assembly time describe an address by {object-file-address + of a particular frag}+offset. + + BUG: it may be smarter to have a single pointer off to various different + notes for different frag kinds. See how code pans. */ + +struct frag { + /* Object file address (as an octet offset). */ addressT fr_address; - /* Chain forward; ascending address order. Rooted in frch_root. */ + /* Chain forward; ascending address order. Rooted in frch_root. */ struct frag *fr_next; - /* (Fixed) number of octets we know we have. May be 0. */ + /* (Fixed) number of octets we know we have. May be 0. */ offsetT fr_fix; /* May be used for (Variable) number of octets after above. The generic frag handling code no longer makes any use of fr_var. */ offsetT fr_var; - /* For variable-length tail. */ + /* For variable-length tail. */ symbolS *fr_symbol; - /* For variable-length tail. */ + /* For variable-length tail. */ offsetT fr_offset; /* Points to opcode low addr byte, for relaxation. */ char *fr_opcode; @@ -94,8 +91,8 @@ struct frag }; #define SIZEOF_STRUCT_FRAG \ -((char *)zero_address_frag.fr_literal-(char *)&zero_address_frag) -/* We want to say fr_literal[0] above. */ +((char *) zero_address_frag.fr_literal - (char *) &zero_address_frag) +/* We want to say fr_literal[0] above. */ /* Current frag we are building. This frag is incomplete. It is, however, included in frchain_now. The fr_fix field is bogus; @@ -104,31 +101,28 @@ COMMON fragS *frag_now; extern addressT frag_now_fix PARAMS ((void)); extern addressT frag_now_fix_octets PARAMS ((void)); -/* For foreign-segment symbol fixups. */ +/* For foreign-segment symbol fixups. */ COMMON fragS zero_address_frag; -/* For local common (N_BSS segment) fixups. */ +/* For local common (N_BSS segment) fixups. */ COMMON fragS bss_address_frag; #if 0 -/* - * A macro to speed up appending exactly 1 char - * to current frag. - */ -/* JF changed < 1 to <= 1 to avoid a race conditon */ -#define FRAG_APPEND_1_CHAR(datum) \ -{ \ - if (obstack_room( &frags ) <= 1) {\ - frag_wane (frag_now); \ - frag_new (0); \ - } \ - obstack_1grow( &frags, datum ); \ +/* A macro to speed up appending exactly 1 char to current frag. */ +/* JF changed < 1 to <= 1 to avoid a race conditon. */ +#define FRAG_APPEND_1_CHAR(datum) \ +{ \ + if (obstack_room (&frags) <= 1) \ + { \ + frag_wane (frag_now); \ + frag_new (0); \ + } \ + obstack_1grow (&frags, datum); \ } #else extern void frag_append_1_char PARAMS ((int)); #define FRAG_APPEND_1_CHAR(X) frag_append_1_char (X) #endif - void frag_init PARAMS ((void)); fragS *frag_alloc PARAMS ((struct obstack *)); void frag_grow PARAMS ((unsigned int nchars)); @@ -138,6 +132,7 @@ void frag_align_pattern PARAMS ((int alignment, const char *fill_pattern, int n_fill, int max)); +void frag_align_code PARAMS ((int alignment, int max)); void frag_new PARAMS ((int old_frags_var_max_size)); void frag_wane PARAMS ((fragS * fragP)); diff --git a/contrib/binutils/gas/gasp.c b/contrib/binutils/gas/gasp.c index a8f5619..b38bbf8 100644 --- a/contrib/binutils/gas/gasp.c +++ b/contrib/binutils/gas/gasp.c @@ -20,14 +20,12 @@ You should have received a copy of the GNU General Public License along with GASP; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ /* - This program translates the input macros and stuff into a form suitable for gas to consume. - gasp [-sdhau] [-c char] [-o <outfile>] <infile>* -s copy source to output @@ -43,10 +41,8 @@ suitable for gas to consume. Macro arg parameters subsituted by name, don't need the &. String can start with ' too. Strings can be surrounded by <..> - A %<exp> in a string evaluates the expression + A %<exp> in a string evaluates the expression Literal char in a string with ! - - */ #include "config.h" @@ -83,29 +79,28 @@ extern void as_abort PARAMS ((const char *, int, const char *)); is used by the hash table code used by macro.c. */ int chunksize = 0; -#define MAX_INCLUDES 30 /* Maximum include depth */ -#define MAX_REASONABLE 1000 /* Maximum number of expansions */ - -int unreasonable; /* -u on command line */ -int stats; /* -d on command line */ -int print_line_number; /* -p flag on command line */ -int copysource; /* -c flag on command line */ -int warnings; /* Number of WARNINGs generated so far. */ -int errors; /* Number of ERRORs generated so far. */ -int fatals; /* Number of fatal ERRORs generated so far (either 0 or 1). */ -int alternate = 0; /* -a on command line */ -int mri = 0; /* -M on command line */ +#define MAX_INCLUDES 30 /* Maximum include depth. */ +#define MAX_REASONABLE 1000 /* Maximum number of expansions. */ + +int unreasonable; /* -u on command line. */ +int stats; /* -d on command line. */ +int print_line_number; /* -p flag on command line. */ +int copysource; /* -c flag on command line. */ +int warnings; /* Number of WARNINGs generated so far. */ +int errors; /* Number of ERRORs generated so far. */ +int fatals; /* Number of fatal ERRORs generated so far (either 0 or 1). */ +int alternate = 0; /* -a on command line. */ +int mri = 0; /* -M on command line. */ char comment_char = '!'; -int radix = 10; /* Default radix */ +int radix = 10; /* Default radix. */ -int had_end; /* Seen .END */ +int had_end; /* Seen .END. */ -/* The output stream */ +/* The output stream. */ FILE *outfile; -/* the attributes of each character are stored as a bit pattern - chartype, which gives us quick tests. */ - +/* The attributes of each character are stored as a bit pattern + chartype, which gives us quick tests. */ #define FIRSTBIT 1 #define NEXTBIT 2 @@ -121,7 +116,6 @@ FILE *outfile; #define ISBASE(x) (chartype[(unsigned char)(x)] & BASEBIT) static char chartype[256]; - /* Conditional assembly uses the `ifstack'. Each aif pushes another entry onto the stack, and sets the on flag if it should. The aelse sets hadelse, and toggles on. An aend pops a level. We limit to @@ -130,118 +124,101 @@ static char chartype[256]; a bug in the user's macro structure. */ #define IFNESTING 100 -struct - { - int on; /* is the level being output */ - int hadelse; /* has an aelse been seen */ - } -ifstack[IFNESTING]; +struct { + int on; /* Is the level being output. */ + int hadelse; /* Has an aelse been seen. */ +} ifstack[IFNESTING]; + int ifi; /* The final and intermediate results of expression evaluation are kept in exp_t's. Note that a symbol is not an sb, but a pointer into the input - line. It must be coped somewhere safe before the next line is read in. */ - -typedef struct - { - char *name; - int len; - } -symbol; + line. It must be coped somewhere safe before the next line is read in. */ -typedef struct - { - int value; /* constant part */ - symbol add_symbol; /* name part */ - symbol sub_symbol; /* name part */ - } -exp_t; +typedef struct { + char *name; + int len; +} symbol; +typedef struct { + int value; /* Constant part. */ + symbol add_symbol; /* Name part. */ + symbol sub_symbol; /* Name part. */ +} exp_t; /* Hashing is done in a pretty standard way. A hash_table has a pointer to a vector of pointers to hash_entrys, and the size of the vector. A hash_entry contains a union of all the info we like to store in hash table. If there is a hash collision, hash_entries - with the same hash are kept in a chain. */ - -/* What the data in a hash_entry means */ -typedef enum - { - hash_integer, /* name->integer mapping */ - hash_string, /* name->string mapping */ - hash_macro, /* name is a macro */ - hash_formal /* name is a formal argument */ - } hash_type; - -typedef struct hs - { - sb key; /* symbol name */ - hash_type type; /* symbol meaning */ - union - { - sb s; - int i; - struct macro_struct *m; - struct formal_struct *f; - } value; - struct hs *next; /* next hash_entry with same hash key */ - } hash_entry; - -typedef struct - { - hash_entry **table; - int size; - } hash_table; - - -/* how we nest files and expand macros etc. - - we keep a stack of of include_stack structs. each include file - pushes a new level onto the stack. we keep an sb with a pushback + with the same hash are kept in a chain. */ + +/* What the data in a hash_entry means. */ +typedef enum { + hash_integer, /* Name->integer mapping. */ + hash_string, /* Name->string mapping. */ + hash_macro, /* Name is a macro. */ + hash_formal /* Name is a formal argument. */ +} hash_type; + +typedef struct hs { + sb key; /* Symbol name. */ + hash_type type; /* Symbol meaning. */ + union { + sb s; + int i; + struct macro_struct *m; + struct formal_struct *f; + } value; + struct hs *next; /* Next hash_entry with same hash key. */ +} hash_entry; + +typedef struct { + hash_entry **table; + int size; +} hash_table; + +/* How we nest files and expand macros etc. + + We keep a stack of of include_stack structs. Each include file + pushes a new level onto the stack. We keep an sb with a pushback too. unget chars are pushed onto the pushback sb, getchars first checks the pushback sb before reading from the input stream. - small things are expanded by adding the text of the item onto the - pushback sb. larger items are grown by pushing a new level and - allocating the entire pushback buf for the item. each time - something like a macro is expanded, the stack index is changed. we + Small things are expanded by adding the text of the item onto the + pushback sb. Larger items are grown by pushing a new level and + allocating the entire pushback buf for the item. Each time + something like a macro is expanded, the stack index is changed. We can then perform an exitm by popping all entries off the stack with - the same stack index. if we're being reasonable, we can detect - recusive expansion by checking the index is reasonably small. - */ - -typedef enum - { - include_file, include_repeat, include_while, include_macro - } include_type; - -struct include_stack - { - sb pushback; /* current pushback stream */ - int pushback_index; /* next char to read from stream */ - FILE *handle; /* open file */ - sb name; /* name of file */ - int linecount; /* number of lines read so far */ - include_type type; - int index; /* index of this layer */ - } -include_stack[MAX_INCLUDES]; + the same stack index. If we're being reasonable, we can detect + recusive expansion by checking the index is reasonably small. */ + +typedef enum { + include_file, include_repeat, include_while, include_macro +} include_type; + +struct include_stack { + sb pushback; /* Current pushback stream. */ + int pushback_index; /* Next char to read from stream. */ + FILE *handle; /* Open file. */ + sb name; /* Name of file. */ + int linecount; /* Number of lines read so far. */ + include_type type; + int index; /* Index of this layer. */ +} include_stack[MAX_INCLUDES]; struct include_stack *sp; #define isp (sp - include_stack) -/* Include file list */ +/* Include file list. */ -typedef struct include_path -{ +typedef struct include_path { struct include_path *next; sb path; -} include_path; +} include_path; include_path *paths_head; include_path *paths_tail; - static void quit PARAMS ((void)); static void hash_new_table PARAMS ((int, hash_table *)); static int hash PARAMS ((sb *)); @@ -334,16 +311,36 @@ static void do_define PARAMS ((const char *)); static void show_usage PARAMS ((FILE *, int)); static void show_help PARAMS ((void)); -#define FATAL(x) \ - do { include_print_where_line (stderr); fprintf x ; fatals++; quit(); } while(0) -#define ERROR(x) \ - do { include_print_where_line (stderr); fprintf x; errors++; } while(0) -#define WARNING(x) \ - do { include_print_where_line (stderr); fprintf x; warnings++;} while(0) - +#define FATAL(x) \ + do \ + { \ + include_print_where_line (stderr); \ + fprintf x; \ + fatals++; \ + quit (); \ + } \ + while (0) + +#define ERROR(x) \ + do \ + { \ + include_print_where_line (stderr); \ + fprintf x; \ + errors++; \ + } \ + while (0) + +#define WARNING(x) \ + do \ + { \ + include_print_where_line (stderr); \ + fprintf x; \ + warnings++; \ + } \ + while (0) + +/* Exit the program and return the right ERROR code. */ - -/* exit the program and return the right ERROR code. */ static void quit () { @@ -353,20 +350,22 @@ quit () else exitcode = 0; - if (stats) + if (stats) { int i; - for (i = 0; i < sb_max_power_two; i++) + for (i = 0; i < sb_max_power_two; i++) { - fprintf (stderr, "strings size %8d : %d\n", 1<<i, string_count[i]); + fprintf (stderr, "strings size %8d : %d\n", + 1 << i, string_count[i]); } } exit (exitcode); } -/* hash table maintenance. */ +/* Hash table maintenance. */ -/* build a new hash table with size buckets, and fill in the info at ptr. */ +/* Build a new hash table with size buckets + and fill in the info at ptr. */ static void hash_new_table (size, ptr) @@ -381,7 +380,7 @@ hash_new_table (size, ptr) ptr->table[i] = 0; } -/* calculate and return the hash value of the sb at key. */ +/* Calculate and return the hash value of the sb at key. */ static int hash (key) @@ -398,11 +397,10 @@ hash (key) return k & 0xf0fff; } -/* lookup key in hash_table tab, if present, then return it, otherwise - build a new one and fill it with hash_integer. */ +/* Look up key in hash_table tab. If present, then return it, + otherwise build a new one and fill it with hash_integer. */ -static -hash_entry * +static hash_entry * hash_create (tab, key) hash_table *tab; sb *key; @@ -433,11 +431,10 @@ hash_create (tab, key) } } -/* add sb name with key into hash_table tab. if replacing old value - and again, then ERROR. */ +/* Add sb name with key into hash_table tab. + If replacing old value and again, then ERROR. */ -static -void +static void hash_add_to_string_table (tab, key, name, again) hash_table *tab; sb *key; @@ -457,14 +454,13 @@ hash_add_to_string_table (tab, key, name, again) ptr->type = hash_string; sb_reset (&ptr->value.s); - + sb_add_sb (&ptr->value.s, name); } -/* add integer name to hash_table tab with sb key. */ +/* Add integer name to hash_table tab with sb key. */ -static -void +static void hash_add_to_int_table (tab, key, name) hash_table *tab; sb *key; @@ -474,11 +470,10 @@ hash_add_to_int_table (tab, key, name) ptr->value.i = name; } -/* lookup sb key in hash_table tab. if found return hash_entry result, - else 0. */ - -static -hash_entry * +/* Look up sb key in hash_table tab. + If found, return hash_entry result, else 0. */ + +static hash_entry * hash_lookup (tab, key) hash_table *tab; sb *key; @@ -496,7 +491,6 @@ hash_lookup (tab, key) return 0; } - /* expressions are handled in a really simple recursive decent way. each bit of @@ -511,14 +505,12 @@ hash_lookup (tab, key) + - & | ~ - */ +/* Make sure that the exp_t at term is constant. + If not the give the op ERROR. */ -/* make sure that the exp_t at term is constant, if not the give the op ERROR. */ - -static -void +static void checkconst (op, term) int op; exp_t *term; @@ -530,12 +522,10 @@ checkconst (op, term) } } -/* turn the number in string at idx into a number of base, - fill in ptr and return the index of the first character not in the - number. */ +/* Turn the number in string at idx into a number of base, fill in + ptr, and return the index of the first character not in the number. */ -static -int +static int sb_strtol (idx, string, base, ptr) int idx; sb *string; @@ -615,8 +605,6 @@ level_0 (idx, string, lhs) return sb_skip_white (idx, string); } - - static int level_1 (idx, string, lhs) int idx; @@ -695,7 +683,6 @@ level_2 (idx, string, lhs) return sb_skip_white (idx, string); } - static int level_3 (idx, string, lhs) int idx; @@ -720,7 +707,7 @@ level_3 (idx, string, lhs) { ERROR ((stderr, _("can't add two relocatable expressions\n"))); } - /* change nn+symbol to symbol + nn */ + /* Change nn+symbol to symbol + nn. */ if (rhs.add_symbol.name) { lhs->add_symbol = rhs.add_symbol; @@ -794,10 +781,9 @@ level_5 (idx, string, lhs) return sb_skip_white (idx, string); } - -/* parse the expression at offset idx into string, fill up res with - the result. return the index of the first char past the expression. - */ +/* Parse the expression at offset idx into string, fill up res with + the result. Return the index of the first char past the + expression. */ static int exp_parse (idx, string, res) @@ -808,9 +794,8 @@ exp_parse (idx, string, res) return level_5 (sb_skip_white (idx, string), string, res); } - -/* turn the expression at exp into text and glue it onto the end of - string. */ +/* Turn the expression at exp into text and glue it onto the end of + string. */ static void exp_string (exp, string) @@ -849,10 +834,9 @@ exp_string (exp, string) sb_add_char (string, '0'); } - -/* parse the expression at offset idx into sb in, return the value in val. - if the expression is not constant, give ERROR emsg. returns the index - of the first character past the end of the expression. */ +/* Parse the expression at offset idx into sb in. Return the value in + val. If the expression is not constant, give ERROR emsg. Return + the index of the first character past the end of the expression. */ static int exp_get_abs (emsg, idx, in, val) @@ -869,11 +853,17 @@ exp_get_abs (emsg, idx, in, val) return idx; } +/* Current label parsed from line. */ +sb label; + +/* Hash table for all assigned variables. */ +hash_table assign_hash_table; -sb label; /* current label parsed from line */ -hash_table assign_hash_table; /* hash table for all assigned variables */ -hash_table keyword_hash_table; /* hash table for keyword */ -hash_table vars; /* hash table for eq variables */ +/* Hash table for keyword. */ +hash_table keyword_hash_table; + +/* Hash table for eq variables. */ +hash_table vars; #define in_comment ';' @@ -886,7 +876,7 @@ strip_comments (out) int i = 0; for (i = 0; i < out->len; i++) { - if (ISCOMMENTCHAR(s[i])) + if (ISCOMMENTCHAR (s[i])) { out->len = i; return; @@ -895,7 +885,7 @@ strip_comments (out) } #endif -/* push back character ch so that it can be read again. */ +/* Push back character ch so that it can be read again. */ static void unget (ch) @@ -911,10 +901,10 @@ unget (ch) sb_add_char (&sp->pushback, ch); } -/* push the sb ptr onto the include stack, with the given name, type and index. */ +/* Push the sb ptr onto the include stack, with the given name, type + and index. */ -static -void +static void include_buf (name, ptr, type, index) sb *name; sb *ptr; @@ -935,10 +925,10 @@ include_buf (name, ptr, type, index) sb_add_sb (&sp->pushback, ptr); } +/* Used in ERROR messages, print info on where the include stack is + onto file. */ -/* used in ERROR messages, print info on where the include stack is onto file. */ -static -void +static void include_print_where_line (file) FILE *file; { @@ -951,7 +941,8 @@ include_print_where_line (file) } } -/* used in listings, print the line number onto file. */ +/* Used in listings, print the line number onto file. */ + static void include_print_line (file) FILE *file; @@ -973,8 +964,7 @@ include_print_line (file) } } - -/* read a line from the top of the include stack into sb in. */ +/* Read a line from the top of the include stack into sb in. */ static int get_line (in) @@ -1022,7 +1012,7 @@ get_line (in) online = 0; if (ch == '+') { - /* continued line */ + /* Continued line. */ if (copysource) { putc (comment_char, outfile); @@ -1047,7 +1037,7 @@ get_line (in) return more; } -/* find a label from sb in and put it in out. */ +/* Find a label from sb in and put it in out. */ static int grab_label (in, out) @@ -1060,9 +1050,9 @@ grab_label (in, out) { sb_add_char (out, in->ptr[i]); i++; - while ((ISNEXTCHAR (in->ptr[i]) + while ((ISNEXTCHAR (in->ptr[i]) || in->ptr[i] == '\\' - || in->ptr[i] == '&') + || in->ptr[i] == '&') && i < in->len) { sb_add_char (out, in->ptr[i]); @@ -1072,8 +1062,8 @@ grab_label (in, out) return i; } -/* find all strange base stuff and turn into decimal. also - find all the other numbers and convert them from the default radix */ +/* Find all strange base stuff and turn into decimal. Also + find all the other numbers and convert them from the default radix. */ static void change_base (idx, in, out) @@ -1133,7 +1123,7 @@ change_base (idx, in, out) } else if (ISFIRSTCHAR (in->ptr[idx])) { - /* copy entire names through quickly */ + /* Copy entire names through quickly. */ sb_add_char (out, in->ptr[idx]); idx++; while (idx < in->len && ISNEXTCHAR (in->ptr[idx])) @@ -1145,13 +1135,13 @@ change_base (idx, in, out) else if (isdigit ((unsigned char) in->ptr[idx])) { int value; - /* all numbers must start with a digit, let's chew it and - spit out decimal */ + /* All numbers must start with a digit, let's chew it and + spit out decimal. */ idx = sb_strtol (idx, in, radix, &value); sprintf (buffer, "%d", value); sb_add_string (out, buffer); - /* skip all undigsested letters */ + /* Skip all undigsested letters. */ while (idx < in->len && ISNEXTCHAR (in->ptr[idx])) { sb_add_char (out, in->ptr[idx]); @@ -1161,7 +1151,7 @@ change_base (idx, in, out) else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; - /* copy entire names through quickly */ + /* Copy entire names through quickly. */ sb_add_char (out, in->ptr[idx]); idx++; while (idx < in->len && in->ptr[idx] != tchar) @@ -1172,7 +1162,7 @@ change_base (idx, in, out) } else { - /* nothing special, just pass it through */ + /* Nothing special, just pass it through. */ sb_add_char (out, in->ptr[idx]); idx++; } @@ -1180,7 +1170,8 @@ change_base (idx, in, out) } -/* .end */ +/* .end */ + static void do_end (in) sb *in; @@ -1190,7 +1181,7 @@ do_end (in) fprintf (outfile, "%s\n", sb_name (in)); } -/* .assign */ +/* .assign */ static void do_assign (again, idx, in) @@ -1198,7 +1189,7 @@ do_assign (again, idx, in) int idx; sb *in; { - /* stick label in symbol table with following value */ + /* Stick label in symbol table with following value. */ exp_t e; sb acc; @@ -1209,11 +1200,9 @@ do_assign (again, idx, in) sb_kill (&acc); } +/* .radix [b|q|d|h] */ -/* .radix [b|q|d|h] */ - -static -void +static void do_radix (ptr) sb *ptr; { @@ -1241,8 +1230,7 @@ do_radix (ptr) } } - -/* Parse off a .b, .w or .l */ +/* Parse off a .b, .w or .l. */ static int get_opsize (idx, in, size) @@ -1281,13 +1269,13 @@ get_opsize (idx, in, size) return idx; } -static -int eol(idx, line) +static int +eol (idx, line) int idx; sb *line; { idx = sb_skip_white (idx, line); - if (idx < line->len + if (idx < line->len && ISCOMMENTCHAR(line->ptr[idx])) return 1; if (idx >= line->len) @@ -1295,8 +1283,8 @@ int eol(idx, line) return 0; } -/* .data [.b|.w|.l] <data>* - or d[bwl] <data>* */ +/* .data [.b|.w|.l] <data>* + or d[bwl] <data>* */ static void do_data (idx, in, size) @@ -1309,13 +1297,14 @@ do_data (idx, in, size) sb acc; sb_new (&acc); - if (!size) + if (!size) { idx = get_opsize (idx, in, &opsize); } - else { - opsize = size; - } + else + { + opsize = size; + } switch (opsize) { case 4: @@ -1329,13 +1318,12 @@ do_data (idx, in, size) break; } - fprintf (outfile, "%s\t", opname); - idx = sb_skip_white (idx, in); + idx = sb_skip_white (idx, in); - if (alternate - && idx < in->len + if (alternate + && idx < in->len && in->ptr[idx] == '"') { int i; @@ -1343,11 +1331,11 @@ do_data (idx, in, size) for (i = 0; i < acc.len; i++) { if (i) - fprintf(outfile,","); + fprintf (outfile, ","); fprintf (outfile, "%d", acc.ptr[i]); } } - else + else { while (!eol (idx, in)) { @@ -1368,7 +1356,7 @@ do_data (idx, in, size) fprintf (outfile, "\n"); } -/* .datab [.b|.w|.l] <repeat>,<fill> */ +/* .datab [.b|.w|.l] <repeat>,<fill> */ static void do_datab (idx, in) @@ -1388,7 +1376,7 @@ do_datab (idx, in) fprintf (outfile, ".fill\t%d,%d,%d\n", repeat, opsize, fill); } -/* .align <size> */ +/* .align <size> */ static void do_align (idx, in) @@ -1415,7 +1403,7 @@ do_align (idx, in) fprintf (outfile, "\n"); } -/* .res[.b|.w|.l] <size> */ +/* .res[.b|.w|.l] <size> */ static void do_res (idx, in, type) @@ -1427,7 +1415,7 @@ do_res (idx, in, type) int count = 0; idx = get_opsize (idx, in, &size); - while (!eol(idx, in)) + while (!eol (idx, in)) { idx = sb_skip_white (idx, in); if (in->ptr[idx] == ',') @@ -1441,8 +1429,7 @@ do_res (idx, in, type) } } - -/* .export */ +/* .export */ static void do_export (in) @@ -1451,7 +1438,7 @@ do_export (in) fprintf (outfile, ".global %s\n", sb_name (in)); } -/* .print [list] [nolist] */ +/* .print [list] [nolist] */ static void do_print (idx, in) @@ -1475,7 +1462,8 @@ do_print (idx, in) } } -/* .head */ +/* .head */ + static void do_heading (idx, in) int idx; @@ -1488,7 +1476,7 @@ do_heading (idx, in) sb_kill (&head); } -/* .page */ +/* .page */ static void do_page () @@ -1496,7 +1484,8 @@ do_page () fprintf (outfile, ".eject\n"); } -/* .form [lin=<value>] [col=<value>] */ +/* .form [lin=<value>] [col=<value>] */ + static void do_form (idx, in) int idx; @@ -1527,7 +1516,6 @@ do_form (idx, in) } - /* Fetch string from the input stream, rules: 'Bxyx<whitespace> -> return 'Bxyza @@ -1535,6 +1523,7 @@ do_form (idx, in) "<string>" -> return string xyx<whitespace> -> return xyz */ + static int get_any_string (idx, in, out, expand, pretend_quoted) int idx; @@ -1548,7 +1537,7 @@ get_any_string (idx, in, out, expand, pretend_quoted) if (idx < in->len) { - if (in->len > 2 && in->ptr[idx+1] == '\'' && ISBASE (in->ptr[idx])) + if (in->len > 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx])) { while (!ISSEP (in->ptr[idx])) sb_add_char (out, in->ptr[idx++]); @@ -1559,12 +1548,12 @@ get_any_string (idx, in, out, expand, pretend_quoted) { int val; char buf[20]; - /* Turns the next expression into a string */ + /* Turns the next expression into a string. */ idx = exp_get_abs (_("% operator needs absolute expression"), idx + 1, in, &val); - sprintf(buf, "%d", val); + sprintf (buf, "%d", val); sb_add_string (out, buf); } else if (in->ptr[idx] == '"' @@ -1573,35 +1562,36 @@ get_any_string (idx, in, out, expand, pretend_quoted) { if (alternate && expand) { - /* Keep the quotes */ - sb_add_char (out, '\"'); - - idx = getstring (idx, in, out); - sb_add_char (out, '\"'); + /* Keep the quotes. */ + sb_add_char (out, '\"'); + + idx = getstring (idx, in, out); + sb_add_char (out, '\"'); } - else { - idx = getstring (idx, in, out); - } + else + { + idx = getstring (idx, in, out); + } } - else + else { - while (idx < in->len + while (idx < in->len && (in->ptr[idx] == '"' || in->ptr[idx] == '\'' - || pretend_quoted + || pretend_quoted || !ISSEP (in->ptr[idx]))) { - if (in->ptr[idx] == '"' + if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; sb_add_char (out, in->ptr[idx++]); while (idx < in->len && in->ptr[idx] != tchar) - sb_add_char (out, in->ptr[idx++]); + sb_add_char (out, in->ptr[idx++]); if (idx == in->len) - return idx; + return idx; } sb_add_char (out, in->ptr[idx++]); } @@ -1611,9 +1601,8 @@ get_any_string (idx, in, out, expand, pretend_quoted) return idx; } - -/* skip along sb in starting at idx, suck off whitespace a ( and more - whitespace. return the idx of the next char */ +/* Skip along sb in starting at idx, suck off whitespace a ( and more + whitespace. Return the idx of the next char. */ static int skip_openp (idx, in) @@ -1627,8 +1616,8 @@ skip_openp (idx, in) return idx; } -/* skip along sb in starting at idx, suck off whitespace a ) and more - whitespace. return the idx of the next char */ +/* Skip along sb in starting at idx, suck off whitespace a ) and more + whitespace. Return the idx of the next char. */ static int skip_closep (idx, in) @@ -1642,7 +1631,7 @@ skip_closep (idx, in) return idx; } -/* .len */ +/* .len */ static int dolen (idx, in, out) @@ -1665,11 +1654,9 @@ dolen (idx, in, out) return idx; } +/* .instr */ -/* .instr */ - -static -int +static int doinstr (idx, in, out) int idx; sb *in; @@ -1714,7 +1701,6 @@ doinstr (idx, in, out) return idx; } - static int dosubstr (idx, in, out) int idx; @@ -1734,14 +1720,13 @@ dosubstr (idx, in, out) idx = exp_get_abs (_("need absolute length.\n"), idx, in, &len); idx = skip_closep (idx, in); - if (len < 0 || pos < 0 || pos > string.len || pos + len > string.len) { sb_add_string (out, " "); } - else + else { sb_add_char (out, '"'); while (len > 0) @@ -1751,11 +1736,12 @@ dosubstr (idx, in, out) } sb_add_char (out, '"'); } - sb_kill(&string); + sb_kill (&string); return idx; } -/* scan line, change tokens in the hash table to their replacements */ +/* Scan line, change tokens in the hash table to their replacements. */ + static void process_assigns (idx, in, buf) int idx; @@ -1813,7 +1799,7 @@ process_assigns (idx, in, buf) idx = dosubstr (idx + 7, in, buf); else if (ISFIRSTCHAR (in->ptr[idx])) { - /* may be a simple name subsitution, see if we have a word */ + /* May be a simple name subsitution, see if we have a word. */ sb acc; int cur = idx + 1; while (cur < in->len @@ -1825,12 +1811,12 @@ process_assigns (idx, in, buf) ptr = hash_lookup (&assign_hash_table, &acc); if (ptr) { - /* Found a definition for it */ + /* Found a definition for it. */ sb_add_sb (buf, &ptr->value.s); } else { - /* No definition, just copy the word */ + /* No definition, just copy the word. */ sb_add_sb (buf, &acc); } sb_kill (&acc); @@ -1857,8 +1843,7 @@ get_and_process (idx, in, out) return idx; } -static -void +static void process_file () { sb line; @@ -1870,13 +1855,13 @@ process_file () sb_new (&line); sb_new (&t1); sb_new (&t2); - sb_new(&acc); + sb_new (&acc); sb_new (&label_in); sb_reset (&line); more = get_line (&line); while (more) { - /* Find any label and pseudo op that we're intested in */ + /* Find any label and pseudo op that we're intested in. */ int l; if (line.len == 0) { @@ -1893,7 +1878,7 @@ process_file () else { l = grab_label (&line, &label_in); - sb_reset (&label); + sb_reset (&label); if (line.ptr[l] == ':') l++; @@ -1936,15 +1921,12 @@ process_file () if (process_pseudo_op (l, &line, &acc)) { - - } else if (condass_on ()) { if (macro_op (l, &line)) { - } else { @@ -1955,7 +1937,7 @@ process_file () } else fprintf (outfile, "\t"); - sb_reset(&t1); + sb_reset (&t1); process_assigns (l, &line, &t1); sb_reset (&t2); change_base (0, &t1, &t2); @@ -1964,13 +1946,14 @@ process_file () } } } - else { - /* Only a label on this line */ - if (label.len && condass_on()) - { - fprintf (outfile, "%s:\n", sb_name (&label)); - } - } + else + { + /* Only a label on this line. */ + if (label.len && condass_on ()) + { + fprintf (outfile, "%s:\n", sb_name (&label)); + } + } } if (had_end) @@ -1983,10 +1966,6 @@ process_file () WARNING ((stderr, _("END missing from end of file.\n"))); } - - - - static void free_old_entry (ptr) hash_entry *ptr; @@ -1994,11 +1973,11 @@ free_old_entry (ptr) if (ptr) { if (ptr->type == hash_string) - sb_kill(&ptr->value.s); + sb_kill (&ptr->value.s); } } -/* name: .ASSIGNA <value> */ +/* name: .ASSIGNA <value> */ static void do_assigna (idx, in) @@ -2026,7 +2005,7 @@ do_assigna (idx, in) sb_kill (&tmp); } -/* name: .ASSIGNC <string> */ +/* name: .ASSIGNC <string> */ static void do_assignc (idx, in) @@ -2052,15 +2031,14 @@ do_assignc (idx, in) sb_kill (&acc); } - -/* name: .REG (reg) */ +/* name: .REG (reg) */ static void do_reg (idx, in) int idx; sb *in; { - /* remove reg stuff from inside parens */ + /* Remove reg stuff from inside parens. */ sb what; if (!mri) idx = skip_openp (idx, in); @@ -2079,7 +2057,6 @@ do_reg (idx, in) sb_kill (&what); } - static int condass_lookup_name (inbuf, idx, out, warn) sb *inbuf; @@ -2101,14 +2078,13 @@ condass_lookup_name (inbuf, idx, out, warn) idx++; ptr = hash_lookup (&vars, &condass_acc); - if (!ptr) { - if (warn) + if (warn) { WARNING ((stderr, _("Can't find preprocessor variable %s.\n"), sb_name (&condass_acc))); } - else + else { sb_add_string (out, "0"); } @@ -2197,11 +2173,12 @@ istrue (idx, in) { int cond; int same; - /* This is a string comparision */ + /* This is a string comparision. */ idx = getstring (idx, in, &acc_a); idx = whatcond (idx, in, &cond); idx = getstring (idx, in, &acc_b); - same = acc_a.len == acc_b.len && (strncmp (acc_a.ptr, acc_b.ptr, acc_a.len) == 0); + same = acc_a.len == acc_b.len + && (strncmp (acc_a.ptr, acc_b.ptr, acc_a.len) == 0); if (cond != EQ && cond != NE) { @@ -2212,7 +2189,7 @@ istrue (idx, in) res = (cond != EQ) ^ same; } else - /* This is a numeric expression */ + /* This is a numeric expression. */ { int vala; int valb; @@ -2264,7 +2241,8 @@ istrue (idx, in) return res; } -/* .AIF */ +/* .AIF */ + static void do_aif (idx, in) int idx; @@ -2275,16 +2253,16 @@ do_aif (idx, in) FATAL ((stderr, _("AIF nesting unreasonable.\n"))); } ifi++; - ifstack[ifi].on = ifstack[ifi-1].on ? istrue (idx, in) : 0; + ifstack[ifi].on = ifstack[ifi - 1].on ? istrue (idx, in) : 0; ifstack[ifi].hadelse = 0; } +/* .AELSE */ -/* .AELSE */ static void do_aelse () { - ifstack[ifi].on = ifstack[ifi-1].on ? !ifstack[ifi].on : 0; + ifstack[ifi].on = ifstack[ifi - 1].on ? !ifstack[ifi].on : 0; if (ifstack[ifi].hadelse) { ERROR ((stderr, _("Multiple AELSEs in AIF.\n"))); @@ -2292,8 +2270,8 @@ do_aelse () ifstack[ifi].hadelse = 1; } +/* .AENDI */ -/* .AENDI */ static void do_aendi () { @@ -2343,7 +2321,7 @@ do_if (idx, in, cond) } ifi++; - ifstack[ifi].on = ifstack[ifi-1].on ? res: 0; + ifstack[ifi].on = ifstack[ifi - 1].on ? res : 0; ifstack[ifi].hadelse = 0; } @@ -2394,7 +2372,7 @@ get_mri_string (idx, in, val, terminator) return idx; } -/* MRI IFC, IFNC. */ +/* MRI IFC, IFNC */ static void do_ifc (idx, in, ifnc) @@ -2429,11 +2407,12 @@ do_ifc (idx, in, ifnc) res ^= ifnc; ifi++; - ifstack[ifi].on = ifstack[ifi-1].on ? res : 0; + ifstack[ifi].on = ifstack[ifi - 1].on ? res : 0; ifstack[ifi].hadelse = 0; } -/* .ENDR */ +/* .ENDR */ + static void do_aendr () { @@ -2443,10 +2422,9 @@ do_aendr () ERROR ((stderr, _("ENDR without a REPT.\n"))); } -/* .AWHILE */ +/* .AWHILE */ -static -void +static void do_awhile (idx, in) int idx; sb *in; @@ -2474,7 +2452,7 @@ do_awhile (idx, in) .AWHILE exp foo .ENDW - */ + */ if (doit) { @@ -2487,7 +2465,7 @@ do_awhile (idx, in) sb_add_string (©, "\n"); sb_add_sb (©, &sub); sb_add_string (©, "\t.AENDW\n"); - /* Push another WHILE */ + /* Push another WHILE. */ include_buf (&exp, ©, include_while, index); sb_kill (©); } @@ -2495,8 +2473,7 @@ do_awhile (idx, in) sb_kill (&sub); } - -/* .AENDW */ +/* .AENDW */ static void do_aendw () @@ -2504,10 +2481,9 @@ do_aendw () ERROR ((stderr, _("AENDW without a AENDW.\n"))); } - /* .EXITM - - Pop things off the include stack until the type and index changes */ + + Pop things off the include stack until the type and index changes. */ static void do_exitm () @@ -2527,7 +2503,7 @@ do_exitm () } } -/* .AREPEAT */ +/* .AREPEAT */ static void do_arepeat (idx, in) @@ -2535,9 +2511,9 @@ do_arepeat (idx, in) sb *in; { int line = linecount (); - sb exp; /* buffer with expression in it */ - sb copy; /* expanded repeat block */ - sb sub; /* contents of AREPEAT */ + sb exp; /* Buffer with expression in it. */ + sb copy; /* Expanded repeat block. */ + sb sub; /* Contents of AREPEAT. */ int rc; int ret; char buffer[30]; @@ -2565,7 +2541,7 @@ do_arepeat (idx, in) .AREPEAT 19 foo .AENDR - */ + */ int index = include_next_index (); sb_add_sb (©, &sub); if (rc > 1) @@ -2589,7 +2565,7 @@ do_arepeat (idx, in) sb_kill (©); } -/* .ENDM */ +/* .ENDM */ static void do_endm () @@ -2619,11 +2595,11 @@ do_irp (idx, in, irpc) sb_kill (&out); } -/* MACRO PROCESSING */ +/* Macro processing. */ + +/* Parse off LOCAL n1, n2,... Invent a label name for it. */ -/* Parse off LOCAL n1, n2,... Invent a label name for it */ -static -void +static void do_local (idx, line) int idx ATTRIBUTE_UNUSED; sb *line ATTRIBUTE_UNUSED; @@ -2674,7 +2650,7 @@ macro_op (idx, in) return 1; } -/* STRING HANDLING */ +/* String handling. */ static int getstring (idx, in, acc) @@ -2685,8 +2661,8 @@ getstring (idx, in, acc) idx = sb_skip_white (idx, in); while (idx < in->len - && (in->ptr[idx] == '"' - || in->ptr[idx] == '<' + && (in->ptr[idx] == '"' + || in->ptr[idx] == '<' || (in->ptr[idx] == '\'' && alternate))) { if (in->ptr[idx] == '<') @@ -2700,30 +2676,32 @@ getstring (idx, in, acc) { if (in->ptr[idx] == '!') { - idx++ ; + idx++; + sb_add_char (acc, in->ptr[idx++]); + } + else + { + if (in->ptr[idx] == '>') + nest--; + if (in->ptr[idx] == '<') + nest++; sb_add_char (acc, in->ptr[idx++]); } - else { - if (in->ptr[idx] == '>') - nest--; - if (in->ptr[idx] == '<') - nest++; - sb_add_char (acc, in->ptr[idx++]); - } } idx++; } - else { - int code; - idx++; - idx = exp_get_abs (_("Character code in string must be absolute expression.\n"), - idx, in, &code); - sb_add_char (acc, code); + else + { + int code; + idx++; + idx = exp_get_abs (_("Character code in string must be absolute expression.\n"), + idx, in, &code); + sb_add_char (acc, code); - if (in->ptr[idx] != '>') - ERROR ((stderr, _("Missing > for character code.\n"))); - idx++; - } + if (in->ptr[idx] != '>') + ERROR ((stderr, _("Missing > for character code.\n"))); + idx++; + } } else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { @@ -2733,30 +2711,30 @@ getstring (idx, in, acc) { if (alternate && in->ptr[idx] == '!') { - idx++ ; + idx++; sb_add_char (acc, in->ptr[idx++]); } - else { - if (in->ptr[idx] == tchar) - { - idx++; - if (idx >= in->len || in->ptr[idx] != tchar) - break; - } - sb_add_char (acc, in->ptr[idx]); - idx++; - } + else + { + if (in->ptr[idx] == tchar) + { + idx++; + if (idx >= in->len || in->ptr[idx] != tchar) + break; + } + sb_add_char (acc, in->ptr[idx]); + idx++; + } } } } - + return idx; } -/* .SDATA[C|Z] <string> */ +/* .SDATA[C|Z] <string> */ -static -void +static void do_sdata (idx, in, type) int idx; sb *in; @@ -2803,12 +2781,14 @@ do_sdata (idx, in, type) fprintf (outfile, "0"); } idx = sb_skip_comma (idx, in); - if (idx == pidx) break; + if (idx == pidx) + break; } if (!alternate && in->ptr[idx] != ',' && idx != in->len) { fprintf (outfile, "\n"); - ERROR ((stderr, _("illegal character in SDATA line (0x%x).\n"), in->ptr[idx])); + ERROR ((stderr, _("illegal character in SDATA line (0x%x).\n"), + in->ptr[idx])); break; } idx++; @@ -2817,7 +2797,7 @@ do_sdata (idx, in, type) fprintf (outfile, "\n"); } -/* .SDATAB <count> <string> */ +/* .SDATAB <count> <string> */ static void do_sdatab (idx, in) @@ -2933,7 +2913,7 @@ include_pop () /* Get the next character from the include stack. If there's anything in the pushback buffer, take that first. If we're at eof, pop from - the stack and try again. Keep the linecount up to date. */ + the stack and try again. Keep the linecount up to date. */ static int get () @@ -2943,7 +2923,7 @@ get () if (sp->pushback.len != sp->pushback_index) { r = (char) (sp->pushback.ptr[sp->pushback_index++]); - /* When they've all gone, reset the pointer */ + /* When they've all gone, reset the pointer. */ if (sp->pushback_index == sp->pushback.len) { sp->pushback.len = 0; @@ -2992,8 +2972,7 @@ include_next_index () return ++index; } - -/* Initialize the chartype vector. */ +/* Initialize the chartype vector. */ static void chartype_init () @@ -3019,7 +2998,7 @@ chartype_init () || x == 'h' || x == 'H' || x == 'd' || x == 'D') chartype [x] |= BASEBIT; - + if (x == ' ' || x == '\t') chartype[x] |= WHITEBIT; @@ -3028,11 +3007,9 @@ chartype_init () } } - - -/* What to do with all the keywords */ -#define PROCESS 0x1000 /* Run substitution over the line */ -#define LAB 0x2000 /* Spit out the label */ +/* What to do with all the keywords. */ +#define PROCESS 0x1000 /* Run substitution over the line. */ +#define LAB 0x2000 /* Spit out the label. */ #define K_EQU (PROCESS|1) #define K_ASSIGN (PROCESS|2) @@ -3089,16 +3066,13 @@ chartype_init () #define K_IRP (PROCESS|54) #define K_IRPC (PROCESS|55) - -struct keyword -{ +struct keyword { char *name; int code; int extra; }; -static struct keyword kinfo[] = -{ +static struct keyword kinfo[] = { { "EQU", K_EQU, 0 }, { "ALTERNATE", K_ALTERNATE, 0 }, { "ASSIGN", K_ASSIGN, 0 }, @@ -3149,8 +3123,7 @@ static struct keyword kinfo[] = handle them here as well, in case they are used in a recursive macro to end the recursion. */ -static struct keyword mrikinfo[] = -{ +static struct keyword mrikinfo[] = { { "IFEQ", K_IFEQ, 0 }, { "IFNE", K_IFNE, 0 }, { "IFLT", K_IFLT, 0 }, @@ -3170,7 +3143,7 @@ static struct keyword mrikinfo[] = }; /* Look for a pseudo op on the line. If one's there then call - its handler. */ + its handler. */ static int process_pseudo_op (idx, line, acc) @@ -3182,7 +3155,7 @@ process_pseudo_op (idx, line, acc) if (line->ptr[idx] == '.' || alternate || mri) { - /* Scan forward and find pseudo name */ + /* Scan forward and find pseudo name. */ char *in; hash_entry *ptr; @@ -3208,13 +3181,15 @@ process_pseudo_op (idx, line, acc) { #if 0 /* This one causes lots of pain when trying to preprocess - ordinary code */ - WARNING ((stderr, _("Unrecognised pseudo op `%s'.\n"), sb_name (acc))); + ordinary code. */ + WARNING ((stderr, _("Unrecognised pseudo op `%s'.\n"), + sb_name (acc))); #endif return 0; } if (ptr->value.i & LAB) - { /* output the label */ + { + /* Output the label. */ if (label.len) { fprintf (outfile, "%s:\t", sb_name (&label)); @@ -3235,13 +3210,13 @@ process_pseudo_op (idx, line, acc) if (ptr->value.i & PROCESS) { - /* Polish the rest of the line before handling the pseudo op */ + /* Polish the rest of the line before handling the pseudo op. */ #if 0 - strip_comments(line); + strip_comments (line); #endif sb_reset (acc); process_assigns (idx, line, acc); - sb_reset(line); + sb_reset (line); change_base (0, acc, line); idx = 0; } @@ -3427,8 +3402,6 @@ process_pseudo_op (idx, line, acc) return 0; } - - /* Add a keyword to the hash table. */ static void @@ -3450,10 +3423,10 @@ add_keyword (name, code) hash_add_to_int_table (&keyword_hash_table, &label, code); sb_kill (&label); -} +} /* Build the keyword hash table - put each keyword in the table twice, - once upper and once lower case.*/ + once upper and once lower case. */ static void process_init () @@ -3470,7 +3443,6 @@ process_init () } } - static void do_define (string) const char *string; @@ -3480,10 +3452,9 @@ do_define (string) hash_entry *ptr; sb_new (&label); - while (*string) { - if (*string == '=') + if (*string == '=') { sb value; sb_new (&value); @@ -3493,13 +3464,14 @@ do_define (string) sb_add_char (&value, *string); string++; } - exp_get_abs (_("Invalid expression on command line.\n"), 0, &value, &res); + exp_get_abs (_("Invalid expression on command line.\n"), + 0, &value, &res); sb_kill (&value); break; } sb_add_char (&label, *string); - string ++; + string++; } ptr = hash_create (&vars, &label); @@ -3508,6 +3480,7 @@ do_define (string) ptr->value.i = res; sb_kill (&label); } + char *program_name; /* The list of long options. */ @@ -3556,11 +3529,11 @@ Usage: %s \n\ } /* Display a help message and exit. */ + static void show_help () { - printf (_("%s: Gnu Assembler Macro Preprocessor\n"), - program_name); + printf (_("%s: Gnu Assembler Macro Preprocessor\n"), program_name); show_usage (stdout, 0); } @@ -3640,7 +3613,7 @@ main (argc, argv) break; case 'h': show_help (); - /*NOTREACHED*/ + /* NOTREACHED */ case 'v': /* This output is intended to follow the GNU standards document. */ printf (_("GNU assembler pre-processor %s\n"), program_version); @@ -3649,12 +3622,12 @@ main (argc, argv) This program is free software; you may redistribute it under the terms of\n\ the GNU General Public License. This program has absolutely no warranty.\n")); exit (0); - /*NOTREACHED*/ + /* NOTREACHED */ case 0: break; default: show_usage (stderr, 1); - /*NOTREACHED*/ + /* NOTREACHED */ } } @@ -3662,24 +3635,26 @@ the GNU General Public License. This program has absolutely no warranty.\n")); macro_init (alternate, mri, 0, exp_get_abs); - if (out_name) { - outfile = fopen (out_name, "w"); - if (!outfile) - { - fprintf (stderr, _("%s: Can't open output file `%s'.\n"), - program_name, out_name); - exit (1); - } - } - else { - outfile = stdout; - } + if (out_name) + { + outfile = fopen (out_name, "w"); + if (!outfile) + { + fprintf (stderr, _("%s: Can't open output file `%s'.\n"), + program_name, out_name); + exit (1); + } + } + else + { + outfile = stdout; + } chartype_init (); if (!outfile) outfile = stdout; - /* Process all the input files */ + /* Process all the input files. */ while (optind < argc) { diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c index 0f129fb..f2e98a6 100644 --- a/contrib/binutils/gas/hash.c +++ b/contrib/binutils/gas/hash.c @@ -1,5 +1,5 @@ /* hash.c -- gas hash table code - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 1999 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -37,8 +37,7 @@ /* An entry in a hash table. */ -struct hash_entry -{ +struct hash_entry { /* Next entry for this hash code. */ struct hash_entry *next; /* String being hashed. */ @@ -52,8 +51,7 @@ struct hash_entry /* A hash table. */ -struct hash_control -{ +struct hash_control { /* The hash array. */ struct hash_entry **table; /* The number of slots in the hash table. */ @@ -99,7 +97,7 @@ hash_new () ret->deletions = 0; #endif - return ret; + return ret; } /* Delete a hash table, freeing all allocated memory. */ @@ -222,7 +220,7 @@ hash_insert (table, key, value) ++table->insertions; #endif - p = obstack_alloc (&table->memory, sizeof *p); + p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p)); p->string = key; p->hash = hash; p->data = value; @@ -262,7 +260,7 @@ hash_jam (table, key, value) ++table->insertions; #endif - p = obstack_alloc (&table->memory, sizeof *p); + p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p)); p->string = key; p->hash = hash; p->data = value; @@ -415,14 +413,23 @@ hash_print_statistics (f, name, table) /* This test program is left over from the old hash table code. */ -#define TABLES (6) /* number of hash tables to maintain */ - /* (at once) in any testing */ -#define STATBUFSIZE (12) /* we can have 12 statistics */ +/* Number of hash tables to maintain (at once) in any testing. */ +#define TABLES (6) + +/* We can have 12 statistics. */ +#define STATBUFSIZE (12) + +/* Display statistics here. */ +int statbuf[STATBUFSIZE]; + +/* Human farts here. */ +char answer[100]; -int statbuf[STATBUFSIZE]; /* display statistics here */ -char answer[100]; /* human farts here */ -char *hashtable[TABLES]; /* we test many hash tables at once */ -char *h; /* points to curent hash_control */ +/* We test many hash tables at once. */ +char *hashtable[TABLES]; + +/* Points to curent hash_control. */ +char *h; char **pp; char *p; char *name; @@ -430,8 +437,9 @@ char *value; int size; int used; char command; -int number; /* number 0:TABLES-1 of current hashed */ - /* symbol table */ + +/* Number 0:TABLES-1 of current hashed symbol table. */ +int number; int main () @@ -450,7 +458,7 @@ main () gets (answer); command = answer[0]; if (isupper (command)) - command = tolower (command); /* ecch! */ + command = tolower (command); /* Ecch! */ switch (command) { case '#': @@ -460,8 +468,8 @@ main () case '?': for (pp = hashtable; pp < hashtable + TABLES; pp++) { - printf ("address of hash table #%d control block is %xx\n" - ,pp - hashtable, *pp); + printf ("address of hash table #%d control block is %xx\n", + pp - hashtable, *pp); } break; case 'a': @@ -542,7 +550,7 @@ what (description) printf (" %s : ", description); gets (answer); - /* will one day clean up answer here */ + /* Will one day clean up answer here. */ retval = malloc (strlen (answer) + 1); if (!retval) { @@ -561,7 +569,6 @@ destroy (string, value) free (value); } - void applicatee (string, value) char *string; @@ -570,11 +577,12 @@ applicatee (string, value) printf ("%.20s-%.20s\n", string, value); } +/* Determine number: what hash table to use. + Also determine h: points to hash_control. */ + void -whattable () /* determine number: what hash table to use */ - /* also determine h: points to hash_control */ +whattable () { - for (;;) { printf (" what hash table (%d:%d) ? ", 0, TABLES - 1); @@ -596,6 +604,4 @@ whattable () /* determine number: what hash table to use */ } } -#endif /* #ifdef TEST */ - -/* end of hash.c */ +#endif /* TEST */ diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c index 634f6f7..b390a8f 100644 --- a/contrib/binutils/gas/input-file.c +++ b/contrib/binutils/gas/input-file.c @@ -1,5 +1,5 @@ /* input_file.c - Deal with Input Files - - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 98, 1999 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -57,35 +57,34 @@ static FILE *f_in; static char *file_name; /* Struct for saving the state of this module for file includes. */ -struct saved_file - { - FILE *f_in; - char *file_name; - int preprocess; - char *app_save; - }; +struct saved_file { + FILE *f_in; + char *file_name; + int preprocess; + char *app_save; +}; -/* These hooks accomodate most operating systems. */ +/* These hooks accomodate most operating systems. */ -void +void input_file_begin () { f_in = (FILE *) 0; } -void +void input_file_end () { } -/* Return BUFFER_SIZE. */ -unsigned int +/* Return BUFFER_SIZE. */ +unsigned int input_file_buffer_size () { return (BUFFER_SIZE); } -int +int input_file_is_open () { return f_in != (FILE *) 0; @@ -130,7 +129,7 @@ input_file_pop (arg) void input_file_open (filename, pre) - char *filename; /* "" means use stdin. Must not be 0. */ + char *filename; /* "" means use stdin. Must not be 0. */ int pre; { int c; @@ -138,16 +137,16 @@ input_file_open (filename, pre) preprocess = pre; - assert (filename != 0); /* Filename may not be NULL. */ + assert (filename != 0); /* Filename may not be NULL. */ if (filename[0]) - { /* We have a file name. Suck it and see. */ + { /* We have a file name. Suck it and see. */ f_in = fopen (filename, "r"); file_name = filename; } else - { /* use stdin for the input file. */ + { /* use stdin for the input file. */ f_in = stdin; - file_name = _("{standard input}"); /* For error messages. */ + file_name = _("{standard input}"); /* For error messages. */ } if (f_in == (FILE *) 0) { @@ -180,7 +179,7 @@ input_file_open (filename, pre) } /* Close input file. */ -void +void input_file_close () { if (f_in != NULL) @@ -188,7 +187,7 @@ input_file_close () fclose (f_in); } /* don't close a null file pointer */ f_in = 0; -} /* input_file_close() */ +} /* This function is passed to do_scrub_chars. */ @@ -212,9 +211,9 @@ input_file_get (buf, buflen) char * input_file_give_next_buffer (where) - char *where; /* Where to place 1st character of new buffer. */ + char *where; /* Where to place 1st character of new buffer. */ { - char *return_value; /* -> Last char of what we read, + 1. */ + char *return_value; /* -> Last char of what we read, + 1. */ register int size; if (f_in == (FILE *) 0) @@ -245,5 +244,3 @@ input_file_give_next_buffer (where) } return (return_value); } - -/* end of input-file.c */ diff --git a/contrib/binutils/gas/input-file.h b/contrib/binutils/gas/input-file.h index 129bf28..14cb5e3 100644 --- a/contrib/binutils/gas/input-file.h +++ b/contrib/binutils/gas/input-file.h @@ -14,12 +14,12 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /*"input_file.c":Operating-system dependant functions to read source files.*/ - /* * No matter what the operating system, this module must provide the * following services to its callers. @@ -64,5 +64,3 @@ void input_file_close PARAMS ((void)); void input_file_end PARAMS ((void)); void input_file_open PARAMS ((char *filename, int pre)); void input_file_pop PARAMS ((char *arg)); - -/* end of input_file.h */ diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c index ecbdaef..73cf1ec 100644 --- a/contrib/binutils/gas/input-scrub.c +++ b/contrib/binutils/gas/input-scrub.c @@ -1,5 +1,5 @@ /* input_scrub.c - Break up input buffers into whole numbers of lines. - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #include <errno.h> /* Need this to make errno declaration right */ #include "as.h" @@ -52,21 +52,22 @@ */ #define BEFORE_STRING ("\n") -#define AFTER_STRING ("\0") /* memcpy of 0 chars might choke. */ +#define AFTER_STRING ("\0") /* memcpy of 0 chars might choke. */ #define BEFORE_SIZE (1) #define AFTER_SIZE (1) -static char *buffer_start; /*->1st char of full buffer area. */ -static char *partial_where; /*->after last full line in buffer. */ -static int partial_size; /* >=0. Number of chars in partial line in buffer. */ +static char *buffer_start; /*->1st char of full buffer area. */ +static char *partial_where; /*->after last full line in buffer. */ +static int partial_size; /* >=0. Number of chars in partial line in buffer. */ + +/* Because we need AFTER_STRING just after last full line, it clobbers + 1st part of partial line. So we preserve 1st part of partial line + here. */ static char save_source[AFTER_SIZE]; -/* Because we need AFTER_STRING just after last */ -/* full line, it clobbers 1st part of partial */ -/* line. So we preserve 1st part of partial */ -/* line here. */ -static unsigned int buffer_length; /* What is the largest size buffer that */ -/* input_file_give_next_buffer() could */ -/* return to us? */ + +/* What is the largest size buffer that input_file_give_next_buffer() + could return to us? */ +static unsigned int buffer_length; /* The index into an sb structure we are reading from. -1 if none. */ static int sb_index = -1; @@ -84,54 +85,54 @@ int macro_nest; but the latest one are saved off in a struct input_save. These files remain open, so we are limited by the number of open files allowed by the underlying OS. We may also sequentially read more than one source file in an - assembly. */ + assembly. */ /* We must track the physical file and line number for error messages. We also track a "logical" file and line number corresponding to (C?) compiler source line numbers. Whenever we open a file we must fill in - physical_input_file. So if it is NULL we have not opened any files yet. */ + physical_input_file. So if it is NULL we have not opened any files yet. */ static char *physical_input_file; static char *logical_input_file; -typedef unsigned int line_numberT; /* 1-origin line number in a source file. */ -/* A line ends in '\n' or eof. */ +typedef unsigned int line_numberT; /* 1-origin line number in a source file. */ +/* A line ends in '\n' or eof. */ static line_numberT physical_input_line; static int logical_input_line; /* Struct used to save the state of the input handler during include files */ -struct input_save - { - char *buffer_start; - char *partial_where; - int partial_size; - char save_source[AFTER_SIZE]; - unsigned int buffer_length; - char *physical_input_file; - char *logical_input_file; - line_numberT physical_input_line; - int logical_input_line; - int sb_index; - sb from_sb; - int from_sb_is_expansion; /* Should we do a conditional check? */ - struct input_save *next_saved_file; /* Chain of input_saves */ - char *input_file_save; /* Saved state of input routines */ - char *saved_position; /* Caller's saved position in buf */ - }; +struct input_save { + char * buffer_start; + char * partial_where; + int partial_size; + char save_source[AFTER_SIZE]; + unsigned int buffer_length; + char * physical_input_file; + char * logical_input_file; + line_numberT physical_input_line; + int logical_input_line; + int sb_index; + sb from_sb; + int from_sb_is_expansion; /* Should we do a conditional check? */ + struct input_save * next_saved_file; /* Chain of input_saves. */ + char * input_file_save; /* Saved state of input routines. */ + char * saved_position; /* Caller's saved position in buf. */ +}; static struct input_save *input_scrub_push PARAMS ((char *saved_position)); static char *input_scrub_pop PARAMS ((struct input_save *arg)); static void as_1_char PARAMS ((unsigned int c, FILE * stream)); /* Saved information about the file that .include'd this one. When we hit EOF, - we automatically pop to that file. */ + we automatically pop to that file. */ static struct input_save *next_saved_file; /* Push the state of input reading and scrubbing so that we can #include. The return value is a 'void *' (fudged for old compilers) to a save - area, which can be restored by passing it to input_scrub_pop(). */ + area, which can be restored by passing it to input_scrub_pop(). */ + static struct input_save * input_scrub_push (saved_position) char *saved_position; @@ -166,7 +167,7 @@ input_scrub_push (saved_position) memcpy (buffer_start, BEFORE_STRING, (int) BEFORE_SIZE); return saved; -} /* input_scrub_push() */ +} static char * input_scrub_pop (saved) @@ -196,12 +197,12 @@ input_scrub_pop (saved) return saved_position; } - void input_scrub_begin () { know (strlen (BEFORE_STRING) == BEFORE_SIZE); - know (strlen (AFTER_STRING) == AFTER_SIZE || (AFTER_STRING[0] == '\0' && AFTER_SIZE == 1)); + know (strlen (AFTER_STRING) == AFTER_SIZE + || (AFTER_STRING[0] == '\0' && AFTER_SIZE == 1)); input_file_begin (); @@ -210,10 +211,10 @@ input_scrub_begin () buffer_start = xmalloc ((BEFORE_SIZE + buffer_length + buffer_length + AFTER_SIZE)); memcpy (buffer_start, BEFORE_STRING, (int) BEFORE_SIZE); - /* Line number things. */ + /* Line number things. */ logical_input_line = -1; logical_input_file = (char *) NULL; - physical_input_file = NULL; /* No file read yet. */ + physical_input_file = NULL; /* No file read yet. */ next_saved_file = NULL; /* At EOF, don't pop to any other file */ do_scrub_begin (flag_m68k_mri); } @@ -229,9 +230,10 @@ input_scrub_end () } } -/* Start reading input from a new file. */ +/* Start reading input from a new file. + Return start of caller's part of buffer. */ -char * /* Return start of caller's part of buffer. */ +char * input_scrub_new_file (filename) char *filename; { @@ -243,10 +245,9 @@ input_scrub_new_file (filename) return (buffer_start + BEFORE_SIZE); } - /* Include a file from the current file. Save our state, cause it to be restored on EOF, and begin handling a new file. Same result as - input_scrub_new_file. */ + input_scrub_new_file. */ char * input_scrub_include_file (filename, position) @@ -267,7 +268,7 @@ input_scrub_include_sb (from, position, is_expansion) int is_expansion; { if (macro_nest > max_macro_nest) - as_fatal (_("buffers nested too deeply")); + as_fatal (_("macros nested too deeply")); ++macro_nest; #ifdef md_macro_start @@ -305,22 +306,24 @@ char * input_scrub_next_buffer (bufp) char **bufp; { - register char *limit; /*->just after last char of buffer. */ + register char *limit; /*->just after last char of buffer. */ if (sb_index >= 0) { if (sb_index >= from_sb.len) { sb_kill (&from_sb); - if (from_sb_is_expansion) - { - cond_finish_check (macro_nest); + if (from_sb_is_expansion + ) + { + cond_finish_check (macro_nest); #ifdef md_macro_end - /* allow the target to clean up per-macro expansion data */ - md_macro_end (); + /* Allow the target to clean up per-macro expansion + data. */ + md_macro_end (); #endif - } - --macro_nest; + } + --macro_nest; partial_where = NULL; if (next_saved_file != NULL) *bufp = input_scrub_pop (next_saved_file); @@ -347,7 +350,7 @@ input_scrub_next_buffer (bufp) + partial_size); if (limit) { - register char *p; /* Find last newline. */ + register char *p; /* Find last newline. */ for (p = limit - 1; *p != '\n'; --p) ; @@ -396,24 +399,21 @@ input_scrub_next_buffer (bufp) /* Tell the listing we've finished the file. */ LISTING_EOF (); - /* If we should pop to another file at EOF, do it. */ + /* If we should pop to another file at EOF, do it. */ if (next_saved_file) { *bufp = input_scrub_pop (next_saved_file); /* Pop state */ - /* partial_where is now correct to return, since we popped it. */ + /* partial_where is now correct to return, since we popped it. */ } } return (partial_where); -} /* input_scrub_next_buffer() */ +} -/* - * The remaining part of this file deals with line numbers, error - * messages and so on. - */ - +/* The remaining part of this file deals with line numbers, error + messages and so on. Return TRUE if we opened any file. */ int -seen_at_least_1_file () /* TRUE if we opened any file. */ +seen_at_least_1_file () { return (physical_input_file != NULL); } @@ -429,20 +429,17 @@ bump_line_counters () } } -/* - * new_logical_line() - * - * Tells us what the new logical line number and file are. - * If the line_number is -1, we don't change the current logical line - * number. If it is -2, we decrement the logical line number (this is - * to support the .appfile pseudo-op inserted into the stream by - * do_scrub_chars). - * If the fname is NULL, we don't change the current logical file name. - * Returns nonzero if the filename actually changes. - */ +/* Tells us what the new logical line number and file are. + If the line_number is -1, we don't change the current logical line + number. If it is -2, we decrement the logical line number (this is + to support the .appfile pseudo-op inserted into the stream by + do_scrub_chars). + If the fname is NULL, we don't change the current logical file name. + Returns nonzero if the filename actually changes. */ + int new_logical_line (fname, line_number) - char *fname; /* DON'T destroy it! We point to it! */ + char *fname; /* DON'T destroy it! We point to it! */ int line_number; { if (line_number >= 0) @@ -459,16 +456,13 @@ new_logical_line (fname, line_number) } else return 0; -} /* new_logical_line() */ +} -/* - * a s _ w h e r e () - * - * Return the current file name and line number. - * namep should be char * const *, but there are compilers which screw - * up declarations like that, and it's easier to avoid it. - */ -void +/* Return the current file name and line number. + namep should be char * const *, but there are compilers which screw + up declarations like that, and it's easier to avoid it. */ + +void as_where (namep, linep) char **namep; unsigned int *linep; @@ -492,37 +486,30 @@ as_where (namep, linep) if (linep != NULL) *linep = 0; } -} /* as_where() */ +} +/* Output to given stream how much of line we have scanned so far. + Assumes we have scanned up to and including input_line_pointer. + No free '\n' at end of line. */ - - -/* - * a s _ h o w m u c h () - * - * Output to given stream how much of line we have scanned so far. - * Assumes we have scanned up to and including input_line_pointer. - * No free '\n' at end of line. - */ void as_howmuch (stream) - FILE *stream; /* Opened for write please. */ + FILE *stream; /* Opened for write please. */ { - register char *p; /* Scan input line. */ - /* register char c; JF unused */ + register char *p; /* Scan input line. */ for (p = input_line_pointer - 1; *p != '\n'; --p) { } - ++p; /* p->1st char of line. */ + ++p; /* p->1st char of line. */ for (; p <= input_line_pointer; p++) { - /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */ + /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */ as_1_char ((unsigned char) *p, stream); } } -static void +static void as_1_char (c, stream) unsigned int c; FILE *stream; @@ -539,5 +526,3 @@ as_1_char (c, stream) } (void) putc (c, stream); } - -/* end of input_scrub.c */ diff --git a/contrib/binutils/gas/itbl-ops.c b/contrib/binutils/gas/itbl-ops.c index 27cca60..9a78219 100644 --- a/contrib/binutils/gas/itbl-ops.c +++ b/contrib/binutils/gas/itbl-ops.c @@ -114,45 +114,39 @@ int itbl_have_entries = 0; /*======================================================================*/ /* structures for keeping itbl format entries */ -struct itbl_range - { - int sbit; /* mask starting bit position */ - int ebit; /* mask ending bit position */ - }; - -struct itbl_field - { - e_type type; /* dreg/creg/greg/immed/symb */ - struct itbl_range range; /* field's bitfield range within instruction */ - unsigned long flags; /* field flags */ - struct itbl_field *next; /* next field in list */ - }; +struct itbl_range { + int sbit; /* mask starting bit position */ + int ebit; /* mask ending bit position */ +}; +struct itbl_field { + e_type type; /* dreg/creg/greg/immed/symb */ + struct itbl_range range; /* field's bitfield range within instruction */ + unsigned long flags; /* field flags */ + struct itbl_field *next; /* next field in list */ +}; /* These structures define the instructions and registers for a processor. * If the type is an instruction, the structure defines the format of an * instruction where the fields are the list of operands. * The flags field below uses the same values as those defined in the - * gnu assembler and are machine specific. */ -struct itbl_entry - { - e_processor processor; /* processor number */ - e_type type; /* dreg/creg/greg/insn */ - char *name; /* mnemionic name for insn/register */ - unsigned long value; /* opcode/instruction mask/register number */ - unsigned long flags; /* effects of the instruction */ - struct itbl_range range; /* bit range within instruction for value */ - struct itbl_field *fields; /* list of operand definitions (if any) */ - struct itbl_entry *next; /* next entry */ - }; - + * gnu assembler and are machine specific. */ +struct itbl_entry { + e_processor processor; /* processor number */ + e_type type; /* dreg/creg/greg/insn */ + char *name; /* mnemionic name for insn/register */ + unsigned long value; /* opcode/instruction mask/register number */ + unsigned long flags; /* effects of the instruction */ + struct itbl_range range; /* bit range within instruction for value */ + struct itbl_field *fields; /* list of operand definitions (if any) */ + struct itbl_entry *next; /* next entry */ +}; /* local data and structures */ static int itbl_num_opcodes = 0; /* Array of entries for each processor and entry type */ -static struct itbl_entry *entries[e_nprocs][e_ntypes] = -{ +static struct itbl_entry *entries[e_nprocs][e_ntypes] = { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, @@ -163,30 +157,28 @@ static struct itbl_entry *entries[e_nprocs][e_ntypes] = static unsigned long build_opcode PARAMS ((struct itbl_entry *e)); static e_type get_type PARAMS ((int yytype)); static e_processor get_processor PARAMS ((int yyproc)); -static struct itbl_entry **get_entries PARAMS ((e_processor processor, +static struct itbl_entry **get_entries PARAMS ((e_processor processor, e_type type)); -static struct itbl_entry *find_entry_byname PARAMS ((e_processor processor, +static struct itbl_entry *find_entry_byname PARAMS ((e_processor processor, e_type type, char *name)); -static struct itbl_entry *find_entry_byval PARAMS ((e_processor processor, +static struct itbl_entry *find_entry_byval PARAMS ((e_processor processor, e_type type, unsigned long val, struct itbl_range *r)); -static struct itbl_entry *alloc_entry PARAMS ((e_processor processor, +static struct itbl_entry *alloc_entry PARAMS ((e_processor processor, e_type type, char *name, unsigned long value)); -static unsigned long apply_range PARAMS ((unsigned long value, +static unsigned long apply_range PARAMS ((unsigned long value, struct itbl_range r)); -static unsigned long extract_range PARAMS ((unsigned long value, +static unsigned long extract_range PARAMS ((unsigned long value, struct itbl_range r)); -static struct itbl_field *alloc_field PARAMS ((e_type type, int sbit, +static struct itbl_field *alloc_field PARAMS ((e_type type, int sbit, int ebit, unsigned long flags)); - /*======================================================================*/ /* Interfaces to the parser */ - /* Open the table and use lex and yacc to parse the entries. * Return 1 for failure; 0 for success. */ -int +int itbl_parse (char *insntbl) { extern FILE *yyin; @@ -213,7 +205,7 @@ struct itbl_entry * itbl_add_reg (int yyprocessor, int yytype, char *regname, int regnum) { -#if 0 +#if 0 #include "as.h" #include "symbols.h" /* Since register names don't have a prefix, we put them in the symbol table so @@ -256,7 +248,7 @@ itbl_add_operand (struct itbl_entry *e, int yytype, int sbit, struct itbl_field *f, **last_f; if (!e) return 0; - /* Add to end of fields' list. */ + /* Add to end of fields' list. */ f = alloc_field (get_type (yytype), sbit, ebit, flags); if (f) { @@ -269,7 +261,6 @@ itbl_add_operand (struct itbl_entry *e, int yytype, int sbit, return f; } - /*======================================================================*/ /* Interfaces for assembler and disassembler */ @@ -278,8 +269,9 @@ itbl_add_operand (struct itbl_entry *e, int yytype, int sbit, #include "symbols.h" static void append_insns_as_macros (void); -/* initialize for gas */ -void +/* Initialize for gas. */ + +void itbl_init (void) { struct itbl_entry *e, **es; @@ -287,11 +279,11 @@ itbl_init (void) e_type type; if (!itbl_have_entries) - return; + return; /* Since register names don't have a prefix, put them in the symbol table so they can't be used as symbols. This simplifies argument parsing as - we can let gas parse registers for us. */ + we can let gas parse registers for us. */ /* Use symbol_create instead of symbol_new so we don't try to output registers into the object file's symbol table. */ @@ -302,22 +294,21 @@ itbl_init (void) for (e = *es; e; e = e->next) { symbol_table_insert (symbol_create (e->name, reg_section, - e->value, &zero_address_frag)); + e->value, &zero_address_frag)); } } append_insns_as_macros (); } - -/* Append insns to opcodes table and increase number of opcodes - * Structure of opcodes table: +/* Append insns to opcodes table and increase number of opcodes + * Structure of opcodes table: * struct itbl_opcode * { * const char *name; - * const char *args; - string describing the arguments. - * unsigned long match; - opcode, or ISA level if pinfo=INSN_MACRO - * unsigned long mask; - opcode mask, or macro id if pinfo=INSN_MACRO - * unsigned long pinfo; - insn flags, or INSN_MACRO + * const char *args; - string describing the arguments. + * unsigned long match; - opcode, or ISA level if pinfo=INSN_MACRO + * unsigned long mask; - opcode mask, or macro id if pinfo=INSN_MACRO + * unsigned long pinfo; - insn flags, or INSN_MACRO * }; * examples: * {"li", "t,i", 0x34000000, 0xffe00000, WR_t }, @@ -325,7 +316,7 @@ itbl_init (void) */ static char *form_args (struct itbl_entry *e); -static void +static void append_insns_as_macros (void) { struct ITBL_OPCODE_STRUCT *new_opcodes, *o; @@ -333,7 +324,7 @@ append_insns_as_macros (void) int n, id, size, new_size, new_num_opcodes; if (!itbl_have_entries) - return; + return; if (!itbl_num_opcodes) /* no new instructions to add! */ { @@ -352,7 +343,7 @@ append_insns_as_macros (void) ASSERT (new_size > size); /* FIXME since ITBL_OPCODES culd be a static table, - we can't realloc or delete the old memory. */ + we can't realloc or delete the old memory. */ new_opcodes = (struct ITBL_OPCODE_STRUCT *) malloc (new_size); if (!new_opcodes) { @@ -363,7 +354,7 @@ append_insns_as_macros (void) memcpy (new_opcodes, ITBL_OPCODES, size); /* FIXME! some NUMOPCODES are calculated expressions. - These need to be changed before itbls can be supported. */ + These need to be changed before itbls can be supported. */ id = ITBL_NUM_MACROS; /* begin the next macro id after the last */ o = &new_opcodes[ITBL_NUM_OPCODES]; /* append macro to opcodes list */ @@ -407,7 +398,7 @@ append_insns_as_macros (void) Don't free name though, since name is being used by the new opcodes table. - Eventually, we should also free the new opcodes table itself + Eventually, we should also free the new opcodes table itself on exit. */ } @@ -454,7 +445,6 @@ form_args (struct itbl_entry *e) } #endif /* !STAND_ALONE */ - /* Get processor's register name from val */ int @@ -501,13 +491,12 @@ itbl_get_val (e_processor processor, e_type type, char *name, return 1; } - /* Assemble instruction "name" with operands "s". * name - name of instruction * s - operands * returns - long word for assembled instruction */ -unsigned long +unsigned long itbl_assemble (char *name, char *s) { unsigned long opcode; @@ -527,11 +516,11 @@ itbl_assemble (char *name, char *s) break; } if (!e) - return 0; /* opcode not in table; invalid instrustion */ + return 0; /* opcode not in table; invalid instruction */ opcode = build_opcode (e); /* parse opcode's args (if any) */ - for (f = e->fields; f; f = f->next) /* for each arg, ... */ + for (f = e->fields; f; f = f->next) /* for each arg, ... */ { struct itbl_entry *r; unsigned long value; @@ -573,7 +562,7 @@ itbl_assemble (char *name, char *s) */ /* If not a symbol, fall thru to IMMED */ case e_immed: - if (*n == '0' && *(n + 1) == 'x') /* hex begins 0x... */ + if (*n == '0' && *(n + 1) == 'x') /* hex begins 0x... */ { n += 2; value = strtol (n, 0, 16); @@ -603,7 +592,7 @@ itbl_assemble (char *name, char *s) * returns - 1 if succeeded; 0 if failed */ -int +int itbl_disassemble (char *s, unsigned long insn) { e_processor processor; @@ -611,24 +600,24 @@ itbl_disassemble (char *s, unsigned long insn) struct itbl_field *f; if (!ITBL_IS_INSN (insn)) - return 0; /* error*/ + return 0; /* error */ processor = get_processor (ITBL_DECODE_PNUM (insn)); /* find entry in list */ e = find_entry_byval (processor, e_insn, insn, 0); if (!e) - return 0; /* opcode not in table; invalid instrustion */ + return 0; /* opcode not in table; invalid instruction */ strcpy (s, e->name); - /* parse insn's args (if any) */ - for (f = e->fields; f; f = f->next) /* for each arg, ... */ + /* Parse insn's args (if any). */ + for (f = e->fields; f; f = f->next) /* for each arg, ... */ { struct itbl_entry *r; unsigned long value; - if (f == e->fields) /* first operand is preceeded by tab */ + if (f == e->fields) /* First operand is preceeded by tab. */ strcat (s, "\t"); - else /* ','s separate following operands */ + else /* ','s separate following operands. */ strcat (s, ","); value = extract_range (insn, f->range); /* n should be in form $n or 0xhhh (are symbol names valid?? */ @@ -638,7 +627,7 @@ itbl_disassemble (char *s, unsigned long insn) case e_creg: case e_greg: /* Accept either a string name - * or '$' followed by the register number */ + or '$' followed by the register number. */ r = find_entry_byval (e->processor, f->type, value, &f->range); if (r) strcat (s, r->name); @@ -646,11 +635,9 @@ itbl_disassemble (char *s, unsigned long insn) sprintf (s, "%s$%lu", s, value); break; case e_addr: - /* use assembler's symbol table to find symbol */ - /* FIXME!! Do we need this? - * if so, what about relocs?? - */ - /* If not a symbol, fall thru to IMMED */ + /* Use assembler's symbol table to find symbol. */ + /* FIXME!! Do we need this? If so, what about relocs?? */ + /* If not a symbol, fall through to IMMED. */ case e_immed: sprintf (s, "%s0x%lx", s, value); break; @@ -658,7 +645,7 @@ itbl_disassemble (char *s, unsigned long insn) return 0; /* error; invalid field spec */ } } - return 1; /* done! */ + return 1; /* Done! */ } /*======================================================================*/ @@ -670,7 +657,7 @@ itbl_disassemble (char *s, unsigned long insn) /* Calculate instruction's opcode and function values from entry */ -static unsigned long +static unsigned long build_opcode (struct itbl_entry *e) { unsigned long opcode; @@ -691,7 +678,7 @@ build_opcode (struct itbl_entry *e) * mask: 0x01f00000. */ -static unsigned long +static unsigned long apply_range (unsigned long rval, struct itbl_range r) { unsigned long mask; @@ -715,7 +702,7 @@ apply_range (unsigned long rval, struct itbl_range r) /* Calculate relative value given the absolute value and bit position range * within the instruction. */ -static unsigned long +static unsigned long extract_range (unsigned long aval, struct itbl_range r) { unsigned long mask; @@ -772,7 +759,7 @@ find_entry_byname (e_processor processor, struct itbl_entry *e, **es; es = get_entries (processor, type); - for (e = *es; e; e = e->next) /* for each entry, ... */ + for (e = *es; e; e = e->next) /* for each entry, ... */ { if (!strcmp (e->name, n)) return e; @@ -794,7 +781,7 @@ find_entry_byval (e_processor processor, e_type type, unsigned long eval; es = get_entries (processor, type); - for (e = *es; e; e = e->next) /* for each entry, ... */ + for (e = *es; e; e = e->next) /* for each entry, ... */ { if (processor != e->processor) continue; @@ -804,7 +791,7 @@ find_entry_byval (e_processor processor, e_type type, * This could cause ambiguities. * For operands, we get an extracted value and a range. */ - /* if range is 0, mask val against the range of the compared entry. */ + /* if range is 0, mask val against the range of the compared entry. */ if (r == 0) /* if no range passed, must be whole 32-bits * so create 32-bit value from entry's range */ { @@ -825,7 +812,7 @@ find_entry_byval (e_processor processor, e_type type, return 0; } -/* Return a pointer to the list of entries for a given processor and type. */ +/* Return a pointer to the list of entries for a given processor and type. */ static struct itbl_entry ** get_entries (e_processor processor, e_type type) @@ -833,9 +820,9 @@ get_entries (e_processor processor, e_type type) return &entries[processor][type]; } -/* Return an integral value for the processor passed from yyparse. */ +/* Return an integral value for the processor passed from yyparse. */ -static e_processor +static e_processor get_processor (int yyproc) { /* translate from yacc's processor to enum */ @@ -844,9 +831,9 @@ get_processor (int yyproc) return e_invproc; /* error; invalid processor */ } -/* Return an integral value for the entry type passed from yyparse. */ +/* Return an integral value for the entry type passed from yyparse. */ -static e_type +static e_type get_type (int yytype) { switch (yytype) @@ -869,7 +856,6 @@ get_type (int yytype) } } - /* Allocate and initialize an entry */ static struct itbl_entry * diff --git a/contrib/binutils/gas/itbl-ops.h b/contrib/binutils/gas/itbl-ops.h index d69ea7f..3dfd6f0 100644 --- a/contrib/binutils/gas/itbl-ops.h +++ b/contrib/binutils/gas/itbl-ops.h @@ -1,5 +1,5 @@ /* itbl-ops.h - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -81,7 +81,7 @@ typedef enum e_invproc /* invalid processor */ } e_processor; -/* 0 means an instruction table was not specified. */ +/* 0 means an instruction table was not specified. */ extern int itbl_have_entries; /* These routines are visible to the main part of the assembler */ @@ -99,7 +99,7 @@ char *itbl_get_name PARAMS ((e_processor processor, e_type type, unsigned long val)); /* These routines are called by the table parser used to build the - dynamic list of new processor instructions and registers. */ + dynamic list of new processor instructions and registers. */ struct itbl_entry *itbl_add_reg PARAMS ((int yyproc, int yytype, char *regname, int regnum)); diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c index cecf245..8168ebe 100644 --- a/contrib/binutils/gas/listing.c +++ b/contrib/binutils/gas/listing.c @@ -1,5 +1,6 @@ /* listing.c - mainting assembly listings - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,12 +18,10 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +02111-1307, USA. */ /* - Contributed by Steve Chamberlain - sac@cygnus.com - + Contributed by Steve Chamberlain <sac@cygnus.com> A listing page looks like: @@ -57,7 +56,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA If the counter goes below zero, listing is suppressed. - Listings are a maintained by read calling various listing_<foo> functions. What happens most is that the macro NO_LISTING is not defined (from the Makefile), then the macro LISTING_NEWLINE expands @@ -121,56 +119,52 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define LISTING_LHS_CONT_LINES 4 #endif -/* This structure remembers which .s were used */ -typedef struct file_info_struct -{ +/* This structure remembers which .s were used. */ +typedef struct file_info_struct { struct file_info_struct * next; char * filename; long pos; unsigned int linenum; int at_end; -} -file_info_type; +} file_info_type; /* This structure rememebrs which line from which file goes into which - frag */ -struct list_info_struct -{ - /* Frag which this line of source is nearest to */ - fragS * frag; + frag. */ +struct list_info_struct { + /* Frag which this line of source is nearest to. */ + fragS *frag; - /* The actual line in the source file */ + /* The actual line in the source file. */ unsigned int line; /* Pointer to the file info struct for the file which this line - belongs to */ - file_info_type * file; + belongs to. */ + file_info_type *file; /* The expanded text of any macro that may have been executing. */ - char * line_contents; + char *line_contents; - /* Next in list */ - struct list_info_struct * next; + /* Next in list. */ + struct list_info_struct *next; /* Pointer to the file info struct for the high level language - source line that belongs here */ - file_info_type * hll_file; - /* High level language source line */ + source line that belongs here. */ + file_info_type *hll_file; + /* High level language source line. */ unsigned int hll_line; - /* Pointer to any error message associated with this line */ - char * message; + /* Pointer to any error message associated with this line. */ + char *message; - enum - { - EDICT_NONE, - EDICT_SBTTL, - EDICT_TITLE, - EDICT_NOLIST, - EDICT_LIST, - EDICT_NOLIST_NEXT, - EDICT_EJECT - } edict; - char * edict_arg; + enum { + EDICT_NONE, + EDICT_SBTTL, + EDICT_TITLE, + EDICT_NOLIST, + EDICT_LIST, + EDICT_NOLIST_NEXT, + EDICT_EJECT + } edict; + char *edict_arg; /* Nonzero if this line is to be omitted because it contains debugging information. This can become a flags field if we come @@ -180,7 +174,6 @@ struct list_info_struct typedef struct list_info_struct list_info_type; - int listing_lhs_width = LISTING_LHS_WIDTH; int listing_lhs_width_second = LISTING_LHS_WIDTH_SECOND; int listing_lhs_cont_lines = LISTING_LHS_CONT_LINES; @@ -198,7 +191,7 @@ static int paper_height = 60; extern int listing; /* File to output listings to. */ -static FILE * list_file; +static FILE *list_file; /* This static array is used to keep the text of data to be printed before the start of the line. */ @@ -209,13 +202,13 @@ static FILE * list_file; * listing_lhs_cont_lines) \ + 20) -static char * data_buffer; +static char *data_buffer; /* Prototypes. */ static void listing_message PARAMS ((const char *name, const char *message)); -static file_info_type * file_info PARAMS ((const char *file_name)); +static file_info_type *file_info PARAMS ((const char *file_name)); static void new_frag PARAMS ((void)); -static char * buffer_line PARAMS ((file_info_type *file, +static char *buffer_line PARAMS ((file_info_type *file, char *line, unsigned int size)); static void listing_page PARAMS ((list_info_type *list)); static unsigned int calc_hex PARAMS ((list_info_type *list)); @@ -229,18 +222,17 @@ static void print_source PARAMS ((file_info_type *current_file, static int debugging_pseudo PARAMS ((list_info_type *, const char *)); static void listing_listing PARAMS ((char *name)); - static void listing_message (name, message) const char *name; const char *message; { - unsigned int l = strlen (name) + strlen (message) + 1; - char *n = (char *) xmalloc (l); - strcpy (n, name); - strcat (n, message); if (listing_tail != (list_info_type *) NULL) { + unsigned int l = strlen (name) + strlen (message) + 1; + char *n = (char *) xmalloc (l); + strcpy (n, name); + strcat (n, message); listing_tail->message = n; } } @@ -263,7 +255,7 @@ static file_info_type * file_info (file_name) const char *file_name; { - /* Find an entry with this file name */ + /* Find an entry with this file name. */ file_info_type *p = file_info_head; while (p != (file_info_type *) NULL) @@ -273,7 +265,7 @@ file_info (file_name) p = p->next; } - /* Make new entry */ + /* Make new entry. */ p = (file_info_type *) xmalloc (sizeof (file_info_type)); p->next = file_info_head; @@ -287,7 +279,6 @@ file_info (file_name) return p; } - static void new_frag () { @@ -334,7 +325,8 @@ listing_newline (ps) as_where (&file, &line); if (ps == NULL) { - if (line == last_line && !(last_file && file && strcmp (file, last_file))) + if (line == last_line + && !(last_file && file && strcmp (file, last_file))) return; new = (list_info_type *) xmalloc (sizeof (list_info_type)); @@ -346,22 +338,22 @@ listing_newline (ps) same as the one used by input_scrub_new_file(), if that is not true, then this code will fail]. - If we are reading from stdin, then we need to save each input line - here (assuming of course that we actually have a line of input to read), - so that it can be displayed in the listing that is produced at the end - of the assembly. */ + If we are reading from stdin, then we need to save each input + line here (assuming of course that we actually have a line of + input to read), so that it can be displayed in the listing + that is produced at the end of the assembly. */ if (strcmp (file, _("{standard input}")) == 0 && input_line_pointer != NULL) { - char * copy; + char *copy; int len; int seen_quote = 0; for (copy = input_line_pointer - 1; - * copy && (seen_quote - || (! is_end_of_line [(unsigned char) * copy])); - copy ++) - if (* copy == '"' && copy[-1] != '\\') + *copy && (seen_quote + || (! is_end_of_line [(unsigned char) *copy])); + copy++) + if (*copy == '"' && copy[-1] != '\\') seen_quote = ! seen_quote; len = (copy - input_line_pointer) + 2; @@ -370,21 +362,21 @@ listing_newline (ps) if (copy != NULL) { - char * src = input_line_pointer - 1; - char * dest = copy; - + char *src = input_line_pointer - 1; + char *dest = copy; + while (--len) { - unsigned char c = * src ++; + unsigned char c = *src++; /* Omit control characters in the listing. */ if (isascii (c) && ! iscntrl (c)) - * dest ++ = c; + *dest++ = c; } - + *dest = 0; } - + new->line_contents = copy; } else @@ -398,14 +390,14 @@ listing_newline (ps) last_line = line; last_file = file; - + new_frag (); if (listing_tail) listing_tail->next = new; else head = new; - + listing_tail = new; new->frag = frag_now; @@ -417,7 +409,7 @@ listing_newline (ps) new->hll_file = (file_info_type *) NULL; new->hll_line = 0; new->debugging = 0; - + new_frag (); #ifdef OBJ_ELF @@ -464,15 +456,13 @@ listing_prev_line () new_frag (); } -/* - This function returns the next source line from the file supplied, - truncated to size. It appends a fake line to the end of each input - file to make -*/ +/* This function returns the next source line from the file supplied, + truncated to size. It appends a fake line to the end of each input + file to make. */ static char * buffer_line (file, line, size) - file_info_type * file; + file_info_type *file; char *line; unsigned int size; { @@ -481,7 +471,7 @@ buffer_line (file, line, size) char *p = line; - /* If we couldn't open the file, return an empty line */ + /* If we couldn't open the file, return an empty line. */ if (file->at_end) return ""; @@ -501,15 +491,16 @@ buffer_line (file, line, size) file->at_end = 1; return ""; } - + /* Seek to where we were last time this file was open. */ if (file->pos) - fseek(last_open_file, file->pos, SEEK_SET); + fseek (last_open_file, file->pos, SEEK_SET); } c = fgetc (last_open_file); - size -= 1; /* leave room for null */ + /* Leave room for null. */ + size -= 1; while (c != EOF && c != '\n') { @@ -532,23 +523,22 @@ buffer_line (file, line, size) return line; } - static const char *fn; static unsigned int eject; /* Eject pending */ static unsigned int page; /* Current page number */ -static char *title; /* current title */ -static char *subtitle; /* current subtitle */ -static unsigned int on_page; /* number of lines printed on current page */ - +static char *title; /* Current title */ +static char *subtitle; /* Current subtitle */ +static unsigned int on_page; /* Number of lines printed on current page */ static void listing_page (list) list_info_type *list; { /* Grope around, see if we can see a title or subtitle edict coming up - soon (we look down 10 lines of the page and see if it's there)*/ - if ((eject || (on_page >= (unsigned int) paper_height)) && paper_height != 0) + soon. (we look down 10 lines of the page and see if it's there) */ + if ((eject || (on_page >= (unsigned int) paper_height)) + && paper_height != 0) { unsigned int c = 10; int had_title = 0; @@ -572,7 +562,6 @@ listing_page (list) c--; } - if (page > 1) { fprintf (list_file, "\f"); @@ -586,19 +575,18 @@ listing_page (list) } } - static unsigned int calc_hex (list) - list_info_type * list; + list_info_type *list; { int data_buffer_size; list_info_type *first = list; - unsigned int address = ~ (unsigned int) 0; + unsigned int address = ~(unsigned int) 0; fragS *frag; fragS *frag_ptr; unsigned int octet_in_frag; - /* Find first frag which says it belongs to this line */ + /* Find first frag which says it belongs to this line. */ frag = list->frag; while (frag && frag->line != list) frag = frag->fr_next; @@ -607,15 +595,15 @@ calc_hex (list) data_buffer_size = 0; - /* Dump all the frags which belong to this line */ + /* Dump all the frags which belong to this line. */ while (frag_ptr != (fragS *) NULL && frag_ptr->line == first) { - /* Print as many bytes from the fixed part as is sensible */ + /* Print as many bytes from the fixed part as is sensible. */ octet_in_frag = 0; while ((offsetT) octet_in_frag < frag_ptr->fr_fix && data_buffer_size < MAX_BYTES - 3) { - if (address == ~ (unsigned int) 0) + if (address == ~(unsigned int) 0) { address = frag_ptr->fr_address / OCTETS_PER_BYTE; } @@ -626,16 +614,17 @@ calc_hex (list) data_buffer_size += 2; octet_in_frag++; } + if (frag_ptr->fr_type == rs_fill) { unsigned int var_rep_max = octet_in_frag; unsigned int var_rep_idx = octet_in_frag; - /* Print as many bytes from the variable part as is sensible */ + /* Print as many bytes from the variable part as is sensible. */ while (((offsetT) octet_in_frag < (frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset)) && data_buffer_size < MAX_BYTES - 3) { - if (address == ~ (unsigned int) 0) + if (address == ~(unsigned int) 0) { address = frag_ptr->fr_address / OCTETS_PER_BYTE; } @@ -662,11 +651,6 @@ calc_hex (list) return address; } - - - - - static void print_lines (list, lineno, string, address) list_info_type *list; @@ -681,21 +665,21 @@ print_lines (list, lineno, string, address) char *src = data_buffer; int cur; - /* Print the stuff on the first line */ + /* Print the stuff on the first line. */ listing_page (list); nchars = (LISTING_WORD_SIZE * 2 + 1) * listing_lhs_width; - - /* Print the hex for the first line */ - if (address == ~ (unsigned int) 0) + + /* Print the hex for the first line. */ + if (address == ~(unsigned int) 0) { fprintf (list_file, "% 4d ", lineno); for (idx = 0; idx < nchars; idx++) fprintf (list_file, " "); fprintf (list_file, "\t%s\n", string ? string : ""); - - on_page ++; - + + on_page++; + listing_page (0); return; @@ -706,62 +690,61 @@ print_lines (list, lineno, string, address) else fprintf (list_file, "% 4d %04x ", lineno, address); - /* And the data to go along with it */ + /* And the data to go along with it. */ idx = 0; cur = 0; while (src[cur] && idx < nchars) { int offset; offset = cur; - fprintf (list_file, "%c%c", src[offset], src[offset+1]); + fprintf (list_file, "%c%c", src[offset], src[offset + 1]); cur += 2; octet_in_word++; - + if (octet_in_word == LISTING_WORD_SIZE) { fprintf (list_file, " "); idx++; octet_in_word = 0; } - + idx += 2; } - + for (; idx < nchars; idx++) fprintf (list_file, " "); - + fprintf (list_file, "\t%s\n", string ? string : ""); on_page++; listing_page (list); - + if (list->message) { fprintf (list_file, "**** %s\n", list->message); listing_page (list); on_page++; } - + for (lines = 0; lines < (unsigned int) listing_lhs_cont_lines && src[cur]; - lines ++) + lines++) { - nchars = ((LISTING_WORD_SIZE * 2) + 1) - * listing_lhs_width_second - 1; + nchars = ((LISTING_WORD_SIZE * 2) + 1) * listing_lhs_width_second - 1; idx = 0; - - /* Print any more lines of data, but more compactly */ + + /* Print any more lines of data, but more compactly. */ fprintf (list_file, "% 4d ", lineno); - + while (src[cur] && idx < nchars) { - int offset; - offset = cur; - fprintf (list_file, "%c%c", src[offset], src[offset+1]); + int offset; + offset = cur; + fprintf (list_file, "%c%c", src[offset], src[offset + 1]); cur += 2; idx += 2; octet_in_word++; - + if (octet_in_word == LISTING_WORD_SIZE) { fprintf (list_file, " "); @@ -769,14 +752,13 @@ print_lines (list, lineno, string, address) octet_in_word = 0; } } - + fprintf (list_file, "\n"); - on_page ++; + on_page++; listing_page (list); } } - static void list_symbol_table () { @@ -841,7 +823,7 @@ list_symbol_table () buf, S_GET_NAME (ptr)); } - on_page ++; + on_page++; listing_page (0); } } @@ -1008,7 +990,6 @@ listing_listing (name) list = head->next; - while (list) { unsigned int list_line; @@ -1027,6 +1008,8 @@ listing_listing (name) show_listing--; break; case EDICT_NOLIST_NEXT: + if (show_listing == 0) + list_line--; break; case EDICT_EJECT: break; @@ -1049,7 +1032,8 @@ listing_listing (name) p = buffer_line (list->file, buffer, width); } - if (list->edict == EDICT_LIST) + if (list->edict == EDICT_LIST + || (list->edict == EDICT_NOLIST_NEXT && show_listing == 0)) { /* Enable listing for the single line that caused the enable. */ list_line++; @@ -1094,7 +1078,7 @@ listing_listing (name) p = buffer_line (list->file, buffer, width); if (list->file->linenum < list_line) - address = ~ (unsigned int) 0; + address = ~(unsigned int) 0; else address = calc_hex (list); @@ -1110,7 +1094,7 @@ listing_listing (name) } } - if (list->edict == EDICT_NOLIST_NEXT) + if (list->edict == EDICT_NOLIST_NEXT && show_listing == 1) --show_listing; list = list->next; @@ -1126,7 +1110,7 @@ listing_print (name) char *name; { int using_stdout; - + title = ""; subtitle = ""; @@ -1175,7 +1159,6 @@ listing_print (name) } } - void listing_file (name) const char *name; @@ -1235,7 +1218,6 @@ listing_list (on) } } - void listing_psize (width_only) int width_only; @@ -1324,8 +1306,6 @@ listing_title (depth) } } - - void listing_source_line (line) unsigned int line; @@ -1346,12 +1326,9 @@ listing_source_file (file) listing_tail->hll_file = file_info (file); } - - #else - -/* Dummy functions for when compiled without listing enabled */ +/* Dummy functions for when compiled without listing enabled. */ void listing_flags (ignore) @@ -1360,21 +1337,21 @@ listing_flags (ignore) s_ignore (0); } -void +void listing_list (on) int on; { s_ignore (0); } -void +void listing_eject (ignore) int ignore; { s_ignore (0); } -void +void listing_psize (ignore) int ignore; { @@ -1388,7 +1365,7 @@ listing_nopage (ignore) s_ignore (0); } -void +void listing_title (depth) int depth; { @@ -1402,20 +1379,21 @@ listing_file (name) } -void +void listing_newline (name) char *name; { } -void +void listing_source_line (n) unsigned int n; { } -void + +void listing_source_file (n) const char *n; { diff --git a/contrib/binutils/gas/literal.c b/contrib/binutils/gas/literal.c index a3f8fc4..f3ccce3 100644 --- a/contrib/binutils/gas/literal.c +++ b/contrib/binutils/gas/literal.c @@ -1,5 +1,5 @@ /* as.c - GAS literal pool management. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 2000 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com). This file is part of GAS, the GNU Assembler. @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This isn't quite a "constant" pool. Some of the values may get adjusted at run time, e.g., for symbolic relocations when shared diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c index 12a757e..74a17ff 100644 --- a/contrib/binutils/gas/macro.c +++ b/contrib/binutils/gas/macro.c @@ -1,5 +1,6 @@ /* macro.c - macro support for gas and gasp - Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com @@ -19,7 +20,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #include "config.h" @@ -172,7 +173,7 @@ buffer_and_nest (from, to, ptr, get_line) while (more) { - /* Try and find the first pseudo op on the line */ + /* Try and find the first pseudo op on the line. */ int i = line_start; if (! macro_alternate && ! macro_mri) @@ -180,26 +181,26 @@ buffer_and_nest (from, to, ptr, get_line) /* With normal syntax we can suck what we want till we get to the dot. With the alternate, labels have to start in the first column, since we cant tell what's a label and - whats a pseudoop */ + whats a pseudoop. */ - /* Skip leading whitespace */ + /* Skip leading whitespace. */ while (i < ptr->len && ISWHITE (ptr->ptr[i])) i++; - /* Skip over a label */ + /* Skip over a label. */ while (i < ptr->len && (isalnum ((unsigned char) ptr->ptr[i]) || ptr->ptr[i] == '_' || ptr->ptr[i] == '$')) i++; - /* And a colon */ + /* And a colon. */ if (i < ptr->len && ptr->ptr[i] == ':') i++; } - /* Skip trailing whitespace */ + /* Skip trailing whitespace. */ while (i < ptr->len && ISWHITE (ptr->ptr[i])) i++; @@ -208,24 +209,26 @@ buffer_and_nest (from, to, ptr, get_line) || macro_mri)) { if (ptr->ptr[i] == '.') - i++; + i++; if (strncasecmp (ptr->ptr + i, from, from_len) == 0 - && (ptr->len == (i + from_len) || ! isalnum (ptr->ptr[i + from_len]))) + && (ptr->len == (i + from_len) + || ! isalnum (ptr->ptr[i + from_len]))) depth++; if (strncasecmp (ptr->ptr + i, to, to_len) == 0 - && (ptr->len == (i + to_len) || ! isalnum (ptr->ptr[i + to_len]))) + && (ptr->len == (i + to_len) + || ! isalnum (ptr->ptr[i + to_len]))) { depth--; if (depth == 0) { - /* Reset the string to not include the ending rune */ + /* Reset the string to not include the ending rune. */ ptr->len = line_start; break; } } } - /* Add a CR to the end and keep running */ + /* Add a CR to the end and keep running. */ sb_add_char (ptr, '\n'); line_start = ptr->len; more = get_line (ptr); @@ -257,7 +260,7 @@ get_token (idx, in, name) sb_add_char (name, in->ptr[idx++]); } } - /* Ignore trailing & */ + /* Ignore trailing &. */ if (macro_alternate && idx < in->len && in->ptr[idx] == '&') idx++; return idx; @@ -274,7 +277,7 @@ getstring (idx, in, acc) idx = sb_skip_white (idx, in); while (idx < in->len - && (in->ptr[idx] == '"' + && (in->ptr[idx] == '"' || (in->ptr[idx] == '<' && (macro_alternate || macro_mri)) || (in->ptr[idx] == '\'' && macro_alternate))) { @@ -287,7 +290,7 @@ getstring (idx, in, acc) { if (in->ptr[idx] == '!') { - idx++ ; + idx++; sb_add_char (acc, in->ptr[idx++]); } else @@ -304,29 +307,47 @@ getstring (idx, in, acc) else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; + int escaped = 0; + idx++; + while (idx < in->len) { + if (in->ptr[idx - 1] == '\\') + escaped ^= 1; + else + escaped = 0; + if (macro_alternate && in->ptr[idx] == '!') { - idx++ ; - sb_add_char (acc, in->ptr[idx++]); + idx ++; + + sb_add_char (acc, in->ptr[idx]); + + idx ++; + } + else if (escaped && in->ptr[idx] == tchar) + { + sb_add_char (acc, tchar); + idx ++; } else { if (in->ptr[idx] == tchar) { - idx++; + idx ++; + if (idx >= in->len || in->ptr[idx] != tchar) break; } + sb_add_char (acc, in->ptr[idx]); - idx++; + idx ++; } } } } - + return idx; } @@ -351,7 +372,7 @@ get_any_string (idx, in, out, expand, pretend_quoted) if (idx < in->len) { - if (in->len > 2 && in->ptr[idx+1] == '\'' && ISBASE (in->ptr[idx])) + if (in->len > 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx])) { while (!ISSEP (in->ptr[idx])) sb_add_char (out, in->ptr[idx++]); @@ -362,7 +383,7 @@ get_any_string (idx, in, out, expand, pretend_quoted) { int val; char buf[20]; - /* Turns the next expression into a string */ + /* Turns the next expression into a string. */ idx = (*macro_expr) (_("% operator needs absolute expression"), idx + 1, in, @@ -378,39 +399,39 @@ get_any_string (idx, in, out, expand, pretend_quoted) && ! macro_strip_at && expand) { - /* Keep the quotes */ - sb_add_char (out, '\"'); + /* Keep the quotes. */ + sb_add_char (out, '\"'); idx = getstring (idx, in, out); - sb_add_char (out, '\"'); + sb_add_char (out, '\"'); } else { idx = getstring (idx, in, out); } } - else + else { - while (idx < in->len + while (idx < in->len && (in->ptr[idx] == '"' || in->ptr[idx] == '\'' - || pretend_quoted + || pretend_quoted || (in->ptr[idx] != ' ' && in->ptr[idx] != '\t' && in->ptr[idx] != ',' && (in->ptr[idx] != '<' || (! macro_alternate && ! macro_mri))))) { - if (in->ptr[idx] == '"' + if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; sb_add_char (out, in->ptr[idx++]); while (idx < in->len && in->ptr[idx] != tchar) - sb_add_char (out, in->ptr[idx++]); + sb_add_char (out, in->ptr[idx++]); if (idx == in->len) - return idx; + return idx; } sb_add_char (out, in->ptr[idx++]); } @@ -449,15 +470,15 @@ do_formals (macro, idx, in) idx = sb_skip_white (idx, in); if (formal->name.len) { - /* This is a formal */ + /* This is a formal. */ if (idx < in->len && in->ptr[idx] == '=') { - /* Got a default */ + /* Got a default. */ idx = get_any_string (idx + 1, in, &formal->def, 1, 0); } } - /* Add to macro's hash table */ + /* Add to macro's hash table. */ hash_jam (macro->formal_hash, sb_terminate (&formal->name), formal); formal->index = macro->formal_count; @@ -490,7 +511,7 @@ do_formals (macro, idx, in) sb_add_string (&formal->name, name); - /* Add to macro's hash table */ + /* Add to macro's hash table. */ hash_jam (macro->formal_hash, name, formal); formal->index = NARG_INDEX; @@ -532,14 +553,14 @@ define_macro (idx, in, label, get_line, namep) sb_add_sb (&name, label); if (idx < in->len && in->ptr[idx] == '(') { - /* It's the label: MACRO (formals,...) sort */ + /* It's the label: MACRO (formals,...) sort */ idx = do_formals (macro, idx + 1, in); if (in->ptr[idx] != ')') return _("missing ) after formals"); } else { - /* It's the label: MACRO formals,... sort */ + /* It's the label: MACRO formals,... sort */ idx = do_formals (macro, idx, in); } } @@ -550,7 +571,7 @@ define_macro (idx, in, label, get_line, namep) idx = do_formals (macro, idx, in); } - /* and stick it in the macro hash table */ + /* And stick it in the macro hash table. */ for (idx = 0; idx < name.len; idx++) if (isupper ((unsigned char) name.ptr[idx])) name.ptr[idx] = tolower (name.ptr[idx]); @@ -627,7 +648,7 @@ sub_actual (start, in, t, formal_hash, kind, out, copyifnotthere) { sb_add_sb (out, t); } - else + else { sb_add_char (out, '\\'); sb_add_sb (out, t); @@ -676,14 +697,14 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals) src++; if (in->ptr[src] == comment_char && comment_char != '\0') { - /* This is a comment, just drop the rest of the line */ + /* This is a comment, just drop the rest of the line. */ while (src < in->len && in->ptr[src] != '\n') src++; } else if (in->ptr[src] == '(') { - /* Sub in till the next ')' literally */ + /* Sub in till the next ')' literally. */ src++; while (src < in->len && in->ptr[src] != ')') { @@ -696,17 +717,17 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals) } else if (in->ptr[src] == '@') { - /* Sub in the macro invocation number */ + /* Sub in the macro invocation number. */ char buffer[10]; src++; - sprintf (buffer, "%05d", macro_number); + sprintf (buffer, "%d", macro_number); sb_add_string (out, buffer); } else if (in->ptr[src] == '&') { /* This is a preprocessor variable name, we don't do them - here */ + here. */ sb_add_char (out, '\\'); sb_add_char (out, '&'); src++; @@ -901,10 +922,10 @@ macro_expand (idx, in, m, out, comment_char) const char *err; sb_new (&t); - - /* Reset any old value the actuals may have */ + + /* Reset any old value the actuals may have. */ for (f = m->formals; f; f = f->next) - sb_reset (&f->actual); + sb_reset (&f->actual); f = m->formals; while (f != NULL && f->index < 0) f = f->next; @@ -930,13 +951,13 @@ macro_expand (idx, in, m, out, comment_char) } } - /* Peel off the actuals and store them away in the hash tables' actuals */ + /* Peel off the actuals and store them away in the hash tables' actuals. */ idx = sb_skip_white (idx, in); while (idx < in->len && in->ptr[idx] != comment_char) { int scan; - /* Look and see if it's a positional or keyword arg */ + /* Look and see if it's a positional or keyword arg. */ scan = idx; while (scan < in->len && !ISSEP (in->ptr[scan]) @@ -950,19 +971,19 @@ macro_expand (idx, in, m, out, comment_char) /* It's OK to go from positional to keyword. */ /* This is a keyword arg, fetch the formal name and - then the actual stuff */ + then the actual stuff. */ sb_reset (&t); idx = get_token (idx, in, &t); if (in->ptr[idx] != '=') return _("confusion in formal parameters"); - /* Lookup the formal in the macro's list */ + /* Lookup the formal in the macro's list. */ ptr = (formal_entry *) hash_find (m->formal_hash, sb_terminate (&t)); if (!ptr) return _("macro formal argument does not exist"); else { - /* Insert this value into the right place */ + /* Insert this value into the right place. */ sb_reset (&ptr->actual); idx = get_any_string (idx + 1, in, &ptr->actual, 0, 0); if (ptr->actual.len > 0) @@ -971,7 +992,7 @@ macro_expand (idx, in, m, out, comment_char) } else { - /* This is a positional arg */ + /* This is a positional arg. */ is_positional = 1; if (is_keyword) return _("can't mix positional and keyword arguments"); @@ -1118,7 +1139,7 @@ check_macro (line, expand, comment_char, error, info) sb_kill (&line_sb); - /* export the macro information if requested */ + /* Export the macro information if requested. */ if (info) *info = macro; @@ -1163,7 +1184,7 @@ expand_irp (irpc, idx, in, out, get_line, comment_char) sb_new (&sub); if (! buffer_and_nest (mn, "ENDR", &sub, get_line)) return _("unexpected end of file in irp or irpc"); - + sb_new (&f.name); sb_new (&f.def); sb_new (&f.actual); diff --git a/contrib/binutils/gas/macro.h b/contrib/binutils/gas/macro.h index 9c61acd..030fc91 100644 --- a/contrib/binutils/gas/macro.h +++ b/contrib/binutils/gas/macro.h @@ -1,5 +1,5 @@ /* macro.h - header file for macro support for gas and gasp - Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #ifndef MACRO_H @@ -28,41 +28,37 @@ #include "ansidecl.h" #include "sb.h" -/* Structures used to store macros. +/* Structures used to store macros. Each macro knows its name and included text. It gets built with a list of formal arguments, and also keeps a hash table which points into the list to speed up formal search. Each formal knows its name and its default value. Each time the macro is expanded, the - formals get the actual values attatched to them. */ + formals get the actual values attatched to them. */ /* describe the formal arguments to a macro */ -typedef struct formal_struct - { - struct formal_struct *next; /* next formal in list */ - sb name; /* name of the formal */ - sb def; /* the default value */ - sb actual; /* the actual argument (changed on each expansion) */ - int index; /* the index of the formal 0..formal_count-1 */ - } -formal_entry; +typedef struct formal_struct { + struct formal_struct *next; /* next formal in list */ + sb name; /* name of the formal */ + sb def; /* the default value */ + sb actual; /* the actual argument (changed on each expansion) */ + int index; /* the index of the formal 0..formal_count-1 */ +} formal_entry; /* Other values found in the index field of a formal_entry. */ #define QUAL_INDEX (-1) #define NARG_INDEX (-2) #define LOCAL_INDEX (-3) -/* describe the macro. */ +/* describe the macro. */ -typedef struct macro_struct - { - sb sub; /* substitution text. */ - int formal_count; /* number of formal args. */ - formal_entry *formals; /* pointer to list of formal_structs */ - struct hash_control *formal_hash; /* hash table of formals. */ - } -macro_entry; +typedef struct macro_struct { + sb sub; /* substitution text. */ + int formal_count; /* number of formal args. */ + formal_entry *formals; /* pointer to list of formal_structs */ + struct hash_control *formal_hash; /* hash table of formals. */ +} macro_entry; /* Whether any macros have been defined. */ @@ -81,7 +77,7 @@ extern void macro_mri_mode PARAMS ((int)); extern const char *define_macro PARAMS ((int idx, sb *in, sb *label, int (*get_line) PARAMS ((sb *)), const char **namep)); -extern int check_macro PARAMS ((const char *, sb *, int, const char **, +extern int check_macro PARAMS ((const char *, sb *, int, const char **, macro_entry **)); extern void delete_macro PARAMS ((const char *)); extern const char *expand_irp diff --git a/contrib/binutils/gas/messages.c b/contrib/binutils/gas/messages.c index e4b7ad0..e342673 100644 --- a/contrib/binutils/gas/messages.c +++ b/contrib/binutils/gas/messages.c @@ -1,5 +1,5 @@ /* messages.c - error reporter - - Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 1998 + Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #include "as.h" @@ -47,8 +47,7 @@ static void as_show_where PARAMS ((void)); static void as_warn_internal PARAMS ((char *, unsigned int, char *)); static void as_bad_internal PARAMS ((char *, unsigned int, char *)); -/* - * Despite the rest of the comments in this file, (FIXME-SOON), +/* Despite the rest of the comments in this file, (FIXME-SOON), * here is the current scheme for error messages etc: * * as_fatal() is used when gas is quite confused and @@ -105,26 +104,26 @@ identify (file) fprintf (stderr, _("Assembler messages:\n")); } -static int warning_count; /* Count of number of warnings issued */ +/* The number of warnings issued. */ +static int warning_count; -int +int had_warnings () { return (warning_count); } /* Nonzero if we've hit a 'bad error', and should not write an obj file, - and exit with a nonzero error code */ + and exit with a nonzero error code. */ static int error_count; -int +int had_errors () { return (error_count); } - /* Print the current location to stderr. */ static void @@ -139,15 +138,11 @@ as_show_where () fprintf (stderr, "%s:%u: ", file, line); } -/* - * a s _ p e r r o r - * - * Like perror(3), but with more info. - */ +/* Like perror(3), but with more info. */ -void +void as_perror (gripe, filename) - const char *gripe; /* Unpunctuated error theme. */ + const char *gripe; /* Unpunctuated error theme. */ const char *filename; { const char *errtxt; @@ -166,18 +161,15 @@ as_perror (gripe, filename) #endif } -/* - * a s _ t s k t s k () - * - * Send to stderr a string as a warning, and locate warning - * in input file(s). - * Please only use this for when we have some recovery action. - * Please explain in string (which may have '\n's) what recovery was done. - */ +/* Send to stderr a string as a warning, and locate warning + in input file(s). + Please only use this for when we have some recovery action. + Please explain in string (which may have '\n's) what recovery was + done. */ #ifdef USE_STDARG -void -as_tsktsk (const char *format,...) +void +as_tsktsk (const char *format, ...) { va_list args; @@ -186,9 +178,9 @@ as_tsktsk (const char *format,...) vfprintf (stderr, format, args); va_end (args); (void) putc ('\n', stderr); -} /* as_tsktsk() */ +} #else -void +void as_tsktsk (format, va_alist) const char *format; va_dcl @@ -200,7 +192,7 @@ as_tsktsk (format, va_alist) vfprintf (stderr, format, args); va_end (args); (void) putc ('\n', stderr); -} /* as_tsktsk() */ +} #endif /* not NO_STDARG */ /* The common portion of as_warn and as_warn_where. */ @@ -227,18 +219,15 @@ as_warn_internal (file, line, buffer) #endif } -/* - * a s _ w a r n () - * - * Send to stderr a string as a warning, and locate warning - * in input file(s). - * Please only use this for when we have some recovery action. - * Please explain in string (which may have '\n's) what recovery was done. - */ +/* Send to stderr a string as a warning, and locate warning + in input file(s). + Please only use this for when we have some recovery action. + Please explain in string (which may have '\n's) what recovery was + done. */ #ifdef USE_STDARG -void -as_warn (const char *format,...) +void +as_warn (const char *format, ...) { va_list args; char buffer[2000]; @@ -250,10 +239,9 @@ as_warn (const char *format,...) va_end (args); as_warn_internal ((char *) NULL, 0, buffer); } -} /* as_warn() */ +} #else -/*VARARGS1 */ -void +void as_warn (format, va_alist) const char *format; va_dcl @@ -268,16 +256,16 @@ as_warn (format, va_alist) va_end (args); as_warn_internal ((char *) NULL, 0, buffer); } -} /* as_warn() */ +} #endif /* not NO_STDARG */ -/* as_warn_where, like as_bad but the file name and line number are - passed in. Unfortunately, we have to repeat the function in order - to handle the varargs correctly and portably. */ +/* Like as_bad but the file name and line number are passed in. + Unfortunately, we have to repeat the function in order to handle + the varargs correctly and portably. */ #ifdef USE_STDARG -void -as_warn_where (char *file, unsigned int line, const char *format,...) +void +as_warn_where (char *file, unsigned int line, const char *format, ...) { va_list args; char buffer[2000]; @@ -289,10 +277,9 @@ as_warn_where (char *file, unsigned int line, const char *format,...) va_end (args); as_warn_internal (file, line, buffer); } -} /* as_warn() */ +} #else -/*VARARGS1 */ -void +void as_warn_where (file, line, format, va_alist) char *file; unsigned int line; @@ -309,7 +296,7 @@ as_warn_where (file, line, format, va_alist) va_end (args); as_warn_internal (file, line, buffer); } -} /* as_warn() */ +} #endif /* not NO_STDARG */ /* The common portion of as_bad and as_bad_where. */ @@ -336,18 +323,15 @@ as_bad_internal (file, line, buffer) #endif } -/* - * a s _ b a d () - * - * Send to stderr a string as a warning, and locate warning in input file(s). - * Please us when there is no recovery, but we want to continue processing - * but not produce an object file. - * Please explain in string (which may have '\n's) what recovery was done. - */ +/* Send to stderr a string as a warning, and locate warning in input + file(s). Please us when there is no recovery, but we want to + continue processing but not produce an object file. + Please explain in string (which may have '\n's) what recovery was + done. */ #ifdef USE_STDARG -void -as_bad (const char *format,...) +void +as_bad (const char *format, ...) { va_list args; char buffer[2000]; @@ -360,8 +344,7 @@ as_bad (const char *format,...) } #else -/*VARARGS1 */ -void +void as_bad (format, va_alist) const char *format; va_dcl @@ -377,13 +360,13 @@ as_bad (format, va_alist) } #endif /* not NO_STDARG */ -/* as_bad_where, like as_bad but the file name and line number are - passed in. Unfortunately, we have to repeat the function in order - to handle the varargs correctly and portably. */ +/* Like as_bad but the file name and line number are passed in. + Unfortunately, we have to repeat the function in order to handle + the varargs correctly and portably. */ #ifdef USE_STDARG -void -as_bad_where (char *file, unsigned int line, const char *format,...) +void +as_bad_where (char *file, unsigned int line, const char *format, ...) { va_list args; char buffer[2000]; @@ -396,8 +379,7 @@ as_bad_where (char *file, unsigned int line, const char *format,...) } #else -/*VARARGS1 */ -void +void as_bad_where (file, line, format, va_alist) char *file; unsigned int line; @@ -415,18 +397,14 @@ as_bad_where (file, line, format, va_alist) } #endif /* not NO_STDARG */ -/* - * a s _ f a t a l () - * - * Send to stderr a string as a fatal message, and print location of error in - * input file(s). - * Please only use this for when we DON'T have some recovery action. - * It xexit()s with a warning status. - */ +/* Send to stderr a string as a fatal message, and print location of + error in input file(s). + Please only use this for when we DON'T have some recovery action. + It xexit()s with a warning status. */ #ifdef USE_STDARG -void -as_fatal (const char *format,...) +void +as_fatal (const char *format, ...) { va_list args; @@ -436,11 +414,14 @@ as_fatal (const char *format,...) vfprintf (stderr, format, args); (void) putc ('\n', stderr); va_end (args); + /* Delete the output file, if it exists. This will prevent make from + thinking that a file was created and hence does not need rebuilding. */ + if (out_file_name != NULL) + unlink (out_file_name); xexit (EXIT_FAILURE); -} /* as_fatal() */ +} #else -/*VARARGS1*/ -void +void as_fatal (format, va_alist) char *format; va_dcl @@ -454,13 +435,11 @@ as_fatal (format, va_alist) (void) putc ('\n', stderr); va_end (args); xexit (EXIT_FAILURE); -} /* as_fatal() */ +} #endif /* not NO_STDARG */ -/* - * as_assert: Indicate assertion failure. - * Arguments: Filename, line number, optional function name. - */ +/* Indicate assertion failure. + Arguments: Filename, line number, optional function name. */ void as_assert (file, line, fn) @@ -480,6 +459,7 @@ as_assert (file, line, fn) /* as_abort: Print a friendly message saying how totally hosed we are, and exit without producing a core file. */ + void as_abort (file, line, fn) const char *file, *fn; @@ -537,5 +517,3 @@ sprint_value (buf, val) #endif abort (); } - -/* end of messages.c */ diff --git a/contrib/binutils/gas/obj.h b/contrib/binutils/gas/obj.h index 7fe5551..4c9759f 100644 --- a/contrib/binutils/gas/obj.h +++ b/contrib/binutils/gas/obj.h @@ -50,18 +50,27 @@ struct format_ops { int flavor; unsigned dfl_leading_underscore : 1; unsigned emit_section_symbols : 1; + void (*begin) PARAMS ((void)); + void (*app_file) PARAMS ((const char *)); void (*frob_symbol) PARAMS ((symbolS *, int *)); void (*frob_file) PARAMS ((void)); + void (*frob_file_before_adjust) PARAMS ((void)); void (*frob_file_after_relocs) PARAMS ((void)); bfd_vma (*s_get_size) PARAMS ((symbolS *)); void (*s_set_size) PARAMS ((symbolS *, bfd_vma)); bfd_vma (*s_get_align) PARAMS ((symbolS *)); void (*s_set_align) PARAMS ((symbolS *, bfd_vma)); int (*s_get_other) PARAMS ((symbolS *)); + void (*s_set_other) PARAMS ((symbolS *, int)); int (*s_get_desc) PARAMS ((symbolS *)); + void (*s_set_desc) PARAMS ((symbolS *, int)); + int (*s_get_type) PARAMS ((symbolS *)); + void (*s_set_type) PARAMS ((symbolS *, int)); void (*copy_symbol_attributes) PARAMS ((symbolS *, symbolS *)); void (*generate_asm_lineno) PARAMS ((void)); void (*process_stab) PARAMS ((segT, int, const char *, int, int, int)); + int (*separate_stab_sections) PARAMS ((void)); + void (*init_stab_section) PARAMS ((segT)); int (*sec_sym_ok_for_reloc) PARAMS ((asection *)); void (*pop_insert) PARAMS ((void)); /* For configurations using ECOFF_DEBUGGING, this callback is used. */ diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in index b4d0125..30dab30 100644 --- a/contrib/binutils/gas/po/POTFILES.in +++ b/contrib/binutils/gas/po/POTFILES.in @@ -13,6 +13,8 @@ bit_fix.h cgen.h cond.c cond.c +config/e-crisaout.c +config/e-criself.c config/e-i386aout.c config/e-i386coff.c config/e-i386elf.c @@ -46,6 +48,10 @@ config/tc-arc.c config/tc-arc.h config/tc-arm.c config/tc-arm.h +config/tc-avr.c +config/tc-avr.h +config/tc-cris.c +config/tc-cris.h config/tc-d10v.c config/tc-d10v.h config/tc-d30v.c @@ -66,8 +72,12 @@ config/tc-i860.c config/tc-i860.h config/tc-i960.c config/tc-i960.h +config/tc-ia64.c +config/tc-ia64.h config/tc-m32r.c config/tc-m32r.h +config/tc-m68hc11.c +config/tc-m68hc11.h config/tc-m68k.c config/tc-m68k.h config/tc-m88k.c @@ -94,6 +104,8 @@ config/tc-tahoe.c config/tc-tahoe.h config/tc-tic30.c config/tc-tic30.h +config/tc-tic54x.c +config/tc-tic54x.h config/tc-tic80.c config/tc-tic80.h config/tc-v850.c diff --git a/contrib/binutils/gas/po/gas.pot b/contrib/binutils/gas/po/gas.pot index 4a2cd86..4428b64 100644 --- a/contrib/binutils/gas/po/gas.pot +++ b/contrib/binutils/gas/po/gas.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-04-05 14:09+0930\n" +"POT-Creation-Date: 2001-01-11 12:04-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -14,76 +14,76 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" -#: app.c:466 app.c:480 +#: app.c:464 app.c:478 msgid "end of file in comment" msgstr "" -#: app.c:559 +#: app.c:557 msgid "end of file in string: inserted '\"'" msgstr "" -#: app.c:625 +#: app.c:623 #, c-format msgid "Unknown escape '\\%c' in string: Ignored" msgstr "" -#: app.c:634 +#: app.c:632 msgid "End of file in string: '\"' inserted" msgstr "" -#: app.c:754 +#: app.c:752 msgid "end of file not at end of a line; newline inserted" msgstr "" -#: app.c:911 +#: app.c:910 msgid "end of file in multiline comment" msgstr "" -#: app.c:960 +#: app.c:974 msgid "end of file after a one-character quote; \\0 inserted" msgstr "" -#: app.c:968 +#: app.c:982 msgid "end of file in escape character" msgstr "" -#: app.c:980 +#: app.c:994 msgid "Missing close quote: (assumed)" msgstr "" -#: app.c:1043 app.c:1097 app.c:1166 +#: app.c:1057 app.c:1111 app.c:1186 msgid "end of file in comment; newline inserted" msgstr "" -#: app.c:1107 +#: app.c:1121 msgid "EOF in Comment: Newline inserted" msgstr "" -#: as.c:148 +#: as.c:147 msgid "missing emulation mode name" msgstr "" -#: as.c:163 +#: as.c:162 #, c-format msgid "unrecognized emulation name `%s'" msgstr "" -#: as.c:210 +#: as.c:209 #, c-format msgid "GNU assembler version %s (%s) using BFD version %s" msgstr "" -#: as.c:213 +#: as.c:212 #, c-format msgid "GNU assembler version %s (%s)" msgstr "" -#: as.c:222 +#: as.c:221 #, c-format msgid "Usage: %s [option...] [asmfile...]\n" msgstr "" -#: as.c:224 +#: as.c:223 msgid "" "Options:\n" " -a[sub-option...]\t turn on listings\n" @@ -100,135 +100,139 @@ msgid "" " \t =FILE list to FILE (must be last sub-option)\n" msgstr "" -#: as.c:238 +#: as.c:237 msgid " -D produce assembler debugging messages\n" msgstr "" -#: as.c:240 +#: as.c:239 msgid " --defsym SYM=VAL define symbol SYM to given value\n" msgstr "" -#: as.c:256 +#: as.c:255 #, c-format msgid " emulate output (default %s)\n" msgstr "" -#: as.c:260 +#: as.c:259 msgid " -f skip whitespace and comment preprocessing\n" msgstr "" -#: as.c:262 +#: as.c:261 msgid " --gstabs generate stabs debugging information\n" msgstr "" -#: as.c:264 +#: as.c:263 msgid " --gdwarf2 generate DWARF2 debugging information\n" msgstr "" -#: as.c:266 +#: as.c:265 msgid " --help show this message and exit\n" msgstr "" -#: as.c:268 +#: as.c:267 +msgid " --target-help show target specific options\n" +msgstr "" + +#: as.c:269 msgid "" " -I DIR add DIR to search list for .include directives\n" msgstr "" -#: as.c:270 +#: as.c:271 msgid " -J don't warn about signed overflow\n" msgstr "" -#: as.c:272 +#: as.c:273 msgid "" " -K warn when differences altered for long " "displacements\n" msgstr "" -#: as.c:274 +#: as.c:275 msgid " -L,--keep-locals keep local symbols (e.g. starting with `L')\n" msgstr "" -#: as.c:276 +#: as.c:277 msgid " -M,--mri assemble in MRI compatibility mode\n" msgstr "" -#: as.c:278 +#: as.c:279 msgid "" " --MD FILE write dependency information in FILE (default " "none)\n" msgstr "" -#: as.c:280 +#: as.c:281 msgid " -nocpp ignored\n" msgstr "" -#: as.c:282 +#: as.c:283 msgid "" " -o OBJFILE name the object-file output OBJFILE (default " "a.out)\n" msgstr "" -#: as.c:284 +#: as.c:285 msgid " -R fold data section into text section\n" msgstr "" -#: as.c:286 +#: as.c:287 msgid "" " --statistics print various measured statistics from execution\n" msgstr "" -#: as.c:288 +#: as.c:289 msgid " --strip-local-absolute strip local absolute symbols\n" msgstr "" -#: as.c:290 +#: as.c:291 msgid "" " --traditional-format Use same format as native assembler when possible\n" msgstr "" -#: as.c:292 +#: as.c:293 msgid " --version print assembler version number and exit\n" msgstr "" -#: as.c:294 +#: as.c:295 msgid " -W --no-warn suppress warnings\n" msgstr "" -#: as.c:296 +#: as.c:297 msgid " --warn don't suppress warnings\n" msgstr "" -#: as.c:298 +#: as.c:299 msgid " --fatal-warnings treat warnings as errors\n" msgstr "" -#: as.c:300 +#: as.c:301 msgid "" " --itbl INSTTBL extend instruction set to include instructions\n" " matching the specifications defined in file " "INSTTBL\n" msgstr "" -#: as.c:303 +#: as.c:304 msgid " -w ignored\n" msgstr "" -#: as.c:305 +#: as.c:306 msgid " -X ignored\n" msgstr "" -#: as.c:307 +#: as.c:308 msgid " -Z generate object file even after errors\n" msgstr "" -#: as.c:309 +#: as.c:310 msgid "" " --listing-lhs-width set the width in words of the output data column " "of\n" " the listing\n" msgstr "" -#: as.c:312 +#: as.c:313 msgid "" " --listing-lhs-width2 set the width in words of the continuation lines\n" " of the output data column; ignored if smaller " @@ -236,398 +240,408 @@ msgid "" " the width of the first line\n" msgstr "" -#: as.c:316 +#: as.c:317 msgid "" " --listing-rhs-width set the max width in characters of the lines from\n" " the source file\n" msgstr "" -#: as.c:319 +#: as.c:320 msgid "" " --listing-cont-lines set the maximum number of continuation lines used\n" " for the output data column of the listing\n" msgstr "" -#: as.c:326 gasp.c:3554 +#: as.c:327 gasp.c:3527 #, c-format msgid "Report bugs to %s\n" msgstr "" #. This output is intended to follow the GNU standards document. -#: as.c:516 +#: as.c:527 #, c-format msgid "GNU assembler %s\n" msgstr "" -#: as.c:517 -msgid "Copyright 1997 Free Software Foundation, Inc.\n" +#: as.c:528 +msgid "Copyright 2000 Free Software Foundation, Inc.\n" msgstr "" -#: as.c:518 gasp.c:3648 +#: as.c:529 gasp.c:3621 msgid "" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty.\n" msgstr "" -#: as.c:521 +#: as.c:532 #, c-format msgid "This assembler was configured for a target of `%s'.\n" msgstr "" -#: as.c:528 +#: as.c:539 msgid "multiple emulation names specified" msgstr "" -#: as.c:530 +#: as.c:541 msgid "emulations not handled in this configuration" msgstr "" -#: as.c:535 +#: as.c:546 #, c-format msgid "alias = %s\n" msgstr "" -#: as.c:536 +#: as.c:547 #, c-format msgid "canonical = %s\n" msgstr "" -#: as.c:537 +#: as.c:548 #, c-format msgid "cpu-type = %s\n" msgstr "" -#: as.c:539 +#: as.c:550 #, c-format msgid "format = %s\n" msgstr "" -#: as.c:542 +#: as.c:553 #, c-format msgid "bfd-target = %s\n" msgstr "" -#: as.c:555 +#: as.c:566 msgid "bad defsym; format is --defsym name=value" msgstr "" -#: as.c:575 +#: as.c:590 msgid "No file name following -t option\n" msgstr "" -#: as.c:591 +#: as.c:606 #, c-format msgid "Failed to read instruction table %s\n" msgstr "" -#: as.c:705 +#: as.c:723 #, c-format msgid "invalid listing option `%c'" msgstr "" -#: as.c:899 +#: as.c:922 #, c-format msgid "%d warnings, treating warnings as errors" msgstr "" -#: as.c:930 +#: as.c:953 #, c-format msgid "%s: total time in assembly: %ld.%06ld\n" msgstr "" -#: as.c:933 +#: as.c:956 #, c-format msgid "%s: data size %ld\n" msgstr "" +#: as.h:225 +#, c-format +msgid "Case value %ld unexpected at line %d of file \"%s\"\n" +msgstr "" + #. #. * We have a GROSS internal error. #. * This should never happen. #. -#: atof-generic.c:438 config/tc-a29k.c:544 config/tc-i860.c:335 -#: config/tc-i860.c:708 config/tc-m68k.c:3124 config/tc-m68k.c:3153 -#: config/tc-sparc.c:2462 +#: atof-generic.c:437 config/tc-a29k.c:544 config/tc-i860.c:340 +#: config/tc-i860.c:832 config/tc-m68k.c:3176 config/tc-m68k.c:3205 +#: config/tc-sparc.c:2543 msgid "failed sanity check." msgstr "" -#: cond.c:75 +#: cond.c:77 msgid "invalid identifier for \".ifdef\"" msgstr "" -#: cond.c:128 +#: cond.c:131 msgid "non-constant expression in \".if\" statement" msgstr "" -#: cond.c:224 +#: cond.c:227 msgid "bad format for ifc or ifnc" msgstr "" -#: cond.c:258 +#: cond.c:261 msgid "\".elseif\" without matching \".if\" - ignored" msgstr "" -#: cond.c:263 +#: cond.c:266 msgid "\".elseif\" after \".else\" - ignored" msgstr "" -#: cond.c:266 cond.c:375 +#: cond.c:269 cond.c:378 msgid "here is the previous \"else\"" msgstr "" -#: cond.c:269 cond.c:378 +#: cond.c:272 cond.c:381 msgid "here is the previous \"if\"" msgstr "" -#: cond.c:302 +#: cond.c:305 msgid "non-constant expression in \".elseif\" statement" msgstr "" -#: cond.c:337 +#: cond.c:340 msgid "\".endif\" without \".if\"" msgstr "" -#: cond.c:367 +#: cond.c:370 msgid ".else without matching .if - ignored" msgstr "" -#: cond.c:372 +#: cond.c:375 msgid "duplicate \"else\" - ignored" msgstr "" -#: cond.c:423 +#: cond.c:426 msgid ".ifeqs syntax error" msgstr "" -#: cond.c:506 +#: cond.c:509 msgid "end of macro inside conditional" msgstr "" -#: cond.c:508 +#: cond.c:511 msgid "end of file inside conditional" msgstr "" -#: cond.c:511 +#: cond.c:514 msgid "here is the start of the unterminated conditional" msgstr "" -#: cond.c:515 +#: cond.c:518 msgid "here is the \"else\" of the unterminated conditional" msgstr "" -#: config/obj-aout.c:163 +#: config/obj-aout.c:162 #, c-format msgid "Attempt to put a common symbol into set %s" msgstr "" -#: config/obj-aout.c:167 +#: config/obj-aout.c:166 #, c-format msgid "Attempt to put an undefined symbol into set %s" msgstr "" -#: config/obj-aout.c:198 config/obj-coff.c:1204 config/obj-elf.c:1675 -#: ecoff.c:3668 +#: config/obj-aout.c:197 config/obj-coff.c:1246 config/obj-elf.c:1739 +#: ecoff.c:3647 #, c-format msgid "Symbol `%s' can not be both weak and common" msgstr "" -#: config/obj-aout.c:256 config/obj-coff.c:1916 +#: config/obj-aout.c:255 config/obj-coff.c:1982 msgid "unresolved relocation" msgstr "" -#: config/obj-aout.c:258 config/obj-coff.c:1918 +#: config/obj-aout.c:257 config/obj-coff.c:1984 #, c-format msgid "bad relocation: symbol `%s' not in symbol table" msgstr "" -#: config/obj-aout.c:345 +#: config/obj-aout.c:344 #, c-format msgid "%s: bad type for weak symbol" msgstr "" -#: config/obj-aout.c:462 config/obj-coff.c:2849 write.c:1805 +#: config/obj-aout.c:458 config/obj-coff.c:2913 write.c:1868 #, c-format msgid "%s: global symbols not supported in common sections" msgstr "" -#: config/obj-aout.c:529 +#: config/obj-aout.c:524 #, c-format msgid "Local symbol %s never defined." msgstr "" -#: config/obj-aout.c:617 +#: config/obj-aout.c:612 msgid "subsegment index too high" msgstr "" -#: config/obj-bout.c:313 config/obj-vms.c:566 +#: config/obj-bout.c:319 config/obj-vms.c:561 #, c-format msgid "Local symbol %s never defined" msgstr "" -#: config/obj-coff.c:149 +#: config/obj-coff.c:156 #, c-format msgid "Inserting \"%s\" into structure table failed: %s" msgstr "" #. Zero is used as an end marker in the file. -#: config/obj-coff.c:444 +#: config/obj-coff.c:451 msgid "Line numbers must be positive integers\n" msgstr "" -#: config/obj-coff.c:477 config/obj-coff.c:2263 +#: config/obj-coff.c:484 config/obj-coff.c:2328 msgid ".ln pseudo-op inside .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:520 ecoff.c:3304 +#: config/obj-coff.c:527 ecoff.c:3283 msgid ".loc outside of .text" msgstr "" -#: config/obj-coff.c:527 +#: config/obj-coff.c:534 msgid ".loc pseudo-op inside .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:615 config/obj-coff.c:2320 +#: config/obj-coff.c:622 config/obj-coff.c:2385 msgid ".def pseudo-op used inside of .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:661 config/obj-coff.c:2373 +#: config/obj-coff.c:668 config/obj-coff.c:2437 msgid ".endef pseudo-op used outside of .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:699 +#: config/obj-coff.c:706 #, c-format msgid "`%s' symbol without preceding function" msgstr "" -#: config/obj-coff.c:753 config/obj-coff.c:2448 +#: config/obj-coff.c:793 config/obj-coff.c:2512 #, c-format msgid "unexpected storage class %d" msgstr "" -#: config/obj-coff.c:866 config/obj-coff.c:2555 +#: config/obj-coff.c:906 config/obj-coff.c:2619 msgid ".dim pseudo-op used outside of .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:886 config/obj-coff.c:2575 +#: config/obj-coff.c:926 config/obj-coff.c:2639 msgid "badly formed .dim directive ignored" msgstr "" -#: config/obj-coff.c:937 config/obj-coff.c:2638 +#: config/obj-coff.c:977 config/obj-coff.c:2702 msgid ".size pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:953 config/obj-coff.c:2654 +#: config/obj-coff.c:993 config/obj-coff.c:2718 msgid ".scl pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:971 config/obj-coff.c:2672 +#: config/obj-coff.c:1011 config/obj-coff.c:2736 msgid ".tag pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:990 config/obj-coff.c:2690 +#: config/obj-coff.c:1030 config/obj-coff.c:2754 #, c-format msgid "tag not found for .tag %s" msgstr "" -#: config/obj-coff.c:1005 config/obj-coff.c:2705 +#: config/obj-coff.c:1045 config/obj-coff.c:2769 msgid ".type pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1027 config/obj-coff.c:2727 +#: config/obj-coff.c:1067 config/obj-coff.c:2791 msgid ".val pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1165 config/obj-coff.c:2922 +#: config/obj-coff.c:1207 config/obj-coff.c:2986 msgid "mismatched .eb" msgstr "" -#: config/obj-coff.c:1183 config/obj-coff.c:2962 +#: config/obj-coff.c:1225 config/obj-coff.c:3026 msgid "C_EFCN symbol out of scope" msgstr "" #. STYP_INFO #. STYP_LIB #. STYP_OVER -#: config/obj-coff.c:1405 +#: config/obj-coff.c:1447 #, c-format msgid "unsupported section attribute '%c'" msgstr "" -#: config/obj-coff.c:1410 config/obj-coff.c:3668 config/tc-ppc.c:3791 +#: config/obj-coff.c:1452 config/obj-coff.c:3726 config/tc-ppc.c:3925 #, c-format msgid "unknown section attribute '%c'" msgstr "" -#: config/obj-coff.c:1432 config/tc-ppc.c:3809 read.c:2504 +#: config/obj-coff.c:1482 config/tc-ppc.c:3943 read.c:2512 #, c-format msgid "error setting flags for \"%s\": %s" msgstr "" -#: config/obj-coff.c:1558 +#: config/obj-coff.c:1493 config/obj-elf.c:723 +#, c-format +msgid "Ignoring changed section attributes for %s" +msgstr "" + +#: config/obj-coff.c:1629 #, c-format msgid "0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n" msgstr "" -#: config/obj-coff.c:1743 config/obj-ieee.c:69 +#: config/obj-coff.c:1809 config/obj-ieee.c:69 msgid "Out of step\n" msgstr "" -#: config/obj-coff.c:2178 +#: config/obj-coff.c:2244 msgid "bfd_coff_swap_scnhdr_out failed" msgstr "" -#: config/obj-coff.c:2405 +#: config/obj-coff.c:2469 msgid "`.bf' symbol without preceding function\n" msgstr "" -#: config/obj-coff.c:3365 config/obj-ieee.c:522 output-file.c:52 +#: config/obj-coff.c:3422 config/obj-ieee.c:507 output-file.c:52 #: output-file.c:119 #, c-format msgid "FATAL: Can't create %s" msgstr "" -#: config/obj-coff.c:3542 +#: config/obj-coff.c:3600 #, c-format msgid "Can't close %s: %s" msgstr "" -#: config/obj-coff.c:3576 +#: config/obj-coff.c:3634 #, c-format msgid "Too many new sections; can't add \"%s\"" msgstr "" -#: config/obj-coff.c:3986 config/tc-m88k.c:1260 config/tc-sparc.c:3354 +#: config/obj-coff.c:4041 config/tc-m88k.c:1257 config/tc-sparc.c:3531 msgid "Expected comma after name" msgstr "" -#: config/obj-coff.c:3992 read.c:1967 +#: config/obj-coff.c:4047 read.c:1956 msgid "Missing size expression" msgstr "" -#: config/obj-coff.c:3998 +#: config/obj-coff.c:4053 #, c-format msgid "lcomm length (%d.) <0! Ignored." msgstr "" -#: config/obj-coff.c:4026 read.c:2188 +#: config/obj-coff.c:4081 read.c:2190 #, c-format msgid "Symbol %s already defined" msgstr "" -#: config/obj-coff.c:4120 config/tc-i960.c:3255 +#: config/obj-coff.c:4176 config/tc-i960.c:3215 #, c-format msgid "No 'bal' entry point for leafproc %s" msgstr "" -#: config/obj-coff.c:4199 write.c:2507 +#: config/obj-coff.c:4255 write.c:2575 #, c-format msgid "Negative of non-absolute symbol %s" msgstr "" -#: config/obj-coff.c:4220 write.c:2521 +#: config/obj-coff.c:4276 write.c:2589 msgid "callj to difference of 2 symbols" msgstr "" -#: config/obj-coff.c:4266 +#: config/obj-coff.c:4322 #, c-format msgid "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld." msgstr "" @@ -635,218 +649,221 @@ msgstr "" #. This is a COBR instruction. They have only a 13-bit #. displacement and are only to be used for local branches: #. flag as error, don't generate relocation. -#: config/obj-coff.c:4356 config/tc-i960.c:3275 write.c:2665 +#: config/obj-coff.c:4411 config/tc-i960.c:3235 write.c:2733 msgid "can't use COBR format with external label" msgstr "" -#: config/obj-coff.c:4436 +#: config/obj-coff.c:4490 #, c-format msgid "Value of %ld too large for field of %d bytes at 0x%lx" msgstr "" -#: config/obj-coff.c:4450 write.c:2764 +#: config/obj-coff.c:4504 write.c:2823 #, c-format msgid "Signed .word overflow; switch may be too large; %ld at 0x%lx" msgstr "" -#: config/obj-ecoff.c:240 +#: config/obj-ecoff.c:241 msgid "Can't set GP value" msgstr "" -#: config/obj-ecoff.c:247 +#: config/obj-ecoff.c:248 msgid "Can't set register masks" msgstr "" -#: config/obj-elf.c:299 config/tc-sparc.c:3495 config/tc-v850.c:263 +#: config/obj-elf.c:308 config/tc-sparc.c:3674 config/tc-v850.c:259 msgid "Expected comma after symbol-name" msgstr "" -#: config/obj-elf.c:306 config/tc-arc.c:779 config/tc-sparc.c:3502 +#: config/obj-elf.c:315 config/tc-sparc.c:3684 #, c-format msgid ".COMMon length (%d.) <0! Ignored." msgstr "" -#: config/obj-elf.c:316 config/tc-alpha.c:4320 config/tc-sparc.c:3512 -#: config/tc-v850.c:285 +#: config/obj-elf.c:325 config/tc-alpha.c:4335 config/tc-sparc.c:3694 +#: config/tc-v850.c:282 msgid "Ignoring attempt to re-define symbol" msgstr "" -#: config/obj-elf.c:324 config/tc-arc.c:797 config/tc-sparc.c:3520 -#: config/tc-v850.c:295 +#: config/obj-elf.c:333 config/tc-sparc.c:3702 config/tc-v850.c:292 #, c-format msgid "Length of .comm \"%s\" is already %ld. Not changed to %d." msgstr "" -#: config/obj-elf.c:347 config/tc-arc.c:816 config/tc-v850.c:322 +#: config/obj-elf.c:356 config/tc-v850.c:319 msgid "Common alignment negative; 0 assumed" msgstr "" -#: config/obj-elf.c:366 config/tc-m32r.c:1269 config/tc-ppc.c:1396 -#: config/tc-v850.c:385 +#: config/obj-elf.c:375 config/tc-m32r.c:1286 config/tc-ppc.c:1518 +#: config/tc-v850.c:382 msgid "Common alignment not a power of 2" msgstr "" -#: config/obj-elf.c:429 config/tc-arc.c:876 config/tc-sparc.c:3644 -#: config/tc-v850.c:563 +#: config/obj-elf.c:438 config/tc-sparc.c:3826 config/tc-v850.c:564 #, c-format msgid "bad .common segment %s" msgstr "" -#: config/obj-elf.c:658 +#: config/obj-elf.c:664 #, c-format msgid "Setting incorrect section type for %s" msgstr "" #: config/obj-elf.c:668 #, c-format +msgid "Ignoring incorrect section type for %s" +msgstr "" + +#: config/obj-elf.c:681 +#, c-format msgid "Setting incorrect section attributes for %s" msgstr "" -#: config/obj-elf.c:726 +#: config/obj-elf.c:753 msgid "Unrecognized .section attribute: want a,w,x" msgstr "" -#: config/obj-elf.c:766 +#: config/obj-elf.c:793 msgid "Unrecognized section attribute" msgstr "" -#: config/obj-elf.c:788 +#: config/obj-elf.c:815 msgid "Unrecognized section type" msgstr "" -#: config/obj-elf.c:839 +#: config/obj-elf.c:866 msgid "Missing section name" msgstr "" -#: config/obj-elf.c:905 +#: config/obj-elf.c:932 msgid "Bad .section directive - character following name is not '#'" msgstr "" -#: config/obj-elf.c:1006 +#: config/obj-elf.c:1033 msgid ".previous without corresponding .section; ignored" msgstr "" -#: config/obj-elf.c:1033 +#: config/obj-elf.c:1060 msgid ".popsection without corresponding .pushsection; ignored" msgstr "" -#: config/obj-elf.c:1085 -#, c-format -msgid "multiple .symver directives for symbol `%s'" -msgstr "" - -#: config/obj-elf.c:1094 +#: config/obj-elf.c:1113 msgid "expected comma after name in .symver" msgstr "" -#: config/obj-elf.c:1115 +#: config/obj-elf.c:1137 #, c-format msgid "missing version name in `%s' for symbol `%s'" msgstr "" -#: config/obj-elf.c:1324 config/obj-som.c:148 config/obj-som.c:193 +#: config/obj-elf.c:1148 +#, c-format +msgid "multiple versions [`%s'|`%s'] for symbol `%s'" +msgstr "" + +#: config/obj-elf.c:1361 config/obj-som.c:155 config/obj-som.c:201 msgid "Expected quoted string" msgstr "" -#: config/obj-elf.c:1345 +#: config/obj-elf.c:1382 #, c-format msgid "expected comma after name `%s' in .size directive" msgstr "" -#: config/obj-elf.c:1354 +#: config/obj-elf.c:1391 msgid "missing expression in .size directive" msgstr "" -#: config/obj-elf.c:1421 +#: config/obj-elf.c:1467 #, c-format msgid "ignoring unrecognized symbol type \"%s\"" msgstr "" -#: config/obj-elf.c:1599 +#: config/obj-elf.c:1648 msgid ".size expression too complicated to fix up" msgstr "" -#: config/obj-elf.c:1630 +#: config/obj-elf.c:1680 #, c-format msgid "" "invalid attempt to declare external version name as default in symbol `%s'" msgstr "" -#: config/obj-elf.c:1762 +#: config/obj-elf.c:1862 #, c-format msgid "Failed to set up debugging information: %s" msgstr "" -#: config/obj-elf.c:1782 +#: config/obj-elf.c:1882 #, c-format msgid "Can't start writing .mdebug section: %s" msgstr "" -#: config/obj-elf.c:1790 +#: config/obj-elf.c:1890 #, c-format msgid "Could not write .mdebug section: %s" msgstr "" -#: config/obj-ieee.c:460 +#: config/obj-ieee.c:455 msgid "too many sections" msgstr "" -#: config/obj-som.c:131 +#: config/obj-som.c:138 msgid "Only one .version pseudo-op per file!" msgstr "" -#: config/obj-som.c:157 +#: config/obj-som.c:164 #, c-format msgid "FATAL: Attaching version header %s" msgstr "" -#: config/obj-som.c:176 +#: config/obj-som.c:184 msgid "Only one .copyright pseudo-op per file!" msgstr "" -#: config/obj-som.c:202 +#: config/obj-som.c:210 #, c-format msgid "FATAL: Attaching copyright header %s" msgstr "" -#: config/obj-vms.c:464 +#: config/obj-vms.c:462 #, c-format msgid "compiler emitted zero-size common symbol `%s' already defined" msgstr "" -#: config/obj-vms.c:474 +#: config/obj-vms.c:472 #, c-format msgid "compiler redefined zero-size common symbol `%s'" msgstr "" -#: config/obj-vms.c:597 +#: config/obj-vms.c:591 #, c-format msgid "Couldn't create VMS object file \"%s\"" msgstr "" -#: config/obj-vms.c:623 +#: config/obj-vms.c:616 msgid "I/O error writing VMS object file (length prefix)" msgstr "" -#: config/obj-vms.c:637 +#: config/obj-vms.c:630 msgid "I/O error writing VMS object file" msgstr "" -#: config/obj-vms.c:1240 +#: config/obj-vms.c:1220 msgid "Couldn't find source file \"%s\", status=%%X%x" msgstr "" -#: config/obj-vms.c:1749 config/obj-vms.c:2937 +#: config/obj-vms.c:1718 config/obj-vms.c:2894 #, c-format msgid "debugger forward reference error, dbx type %d" msgstr "" -#: config/obj-vms.c:1825 +#: config/obj-vms.c:1793 #, c-format msgid "Variable descriptor %d too complicated. Defined as `void *'." msgstr "" -#: config/obj-vms.c:2144 +#: config/obj-vms.c:2107 msgid "" "***Warning - the assembly code generated by the compiler has placed \n" " global constant(s) in the text psect. These will not be available to \n" @@ -857,92 +874,92 @@ msgid "" " I didn't warn you! \n" msgstr "" -#: config/obj-vms.c:2463 +#: config/obj-vms.c:2421 #, c-format msgid "debugginer output: %d is an unknown untyped variable." msgstr "" -#: config/obj-vms.c:2681 +#: config/obj-vms.c:2639 #, c-format msgid "debugger output: structure element `%s' has undefined type" msgstr "" -#: config/obj-vms.c:2792 +#: config/obj-vms.c:2750 #, c-format msgid "debugger output: %d is an unknown type of variable." msgstr "" -#: config/obj-vms.c:2926 +#: config/obj-vms.c:2883 #, c-format msgid "debugger output: Unable to resolve %d circular references." msgstr "" -#: config/obj-vms.c:3131 +#: config/obj-vms.c:3085 #, c-format msgid "Module name truncated: %s\n" msgstr "" -#: config/obj-vms.c:3410 +#: config/obj-vms.c:3363 #, c-format msgid "Symbol %s replaced by %s\n" msgstr "" #. impossible -#: config/obj-vms.c:3694 +#: config/obj-vms.c:3646 #, c-format msgid "Unknown VMS psect type (%ld)" msgstr "" -#: config/obj-vms.c:3735 +#: config/obj-vms.c:3687 #, c-format msgid "Globalsymbol attribute for symbol %s was unexpected." msgstr "" -#: config/obj-vms.c:3885 +#: config/obj-vms.c:3836 msgid "Invalid data type for globalvalue" msgstr "" -#: config/obj-vms.c:3897 +#: config/obj-vms.c:3848 #, c-format msgid "Invalid globalvalue of %s" msgstr "" -#: config/obj-vms.c:4247 +#: config/obj-vms.c:4198 msgid "Couldn't find fixup fragment when checking for indirect reference" msgstr "" -#: config/obj-vms.c:4591 config/obj-vms.c:4733 +#: config/obj-vms.c:4541 config/obj-vms.c:4682 msgid "Fixup data addsy and subsy don't have the same type" msgstr "" -#: config/obj-vms.c:4595 config/obj-vms.c:4737 +#: config/obj-vms.c:4545 config/obj-vms.c:4686 msgid "Fixup data addsy and subsy don't have an appropriate type" msgstr "" -#: config/obj-vms.c:4598 config/obj-vms.c:4740 +#: config/obj-vms.c:4548 config/obj-vms.c:4689 msgid "Fixup data is erroneously \"pcrel\"" msgstr "" -#: config/obj-vms.c:4614 config/obj-vms.c:4759 +#: config/obj-vms.c:4564 config/obj-vms.c:4708 msgid "Fixup datum is not a longword" msgstr "" -#: config/obj-vms.c:4618 config/obj-vms.c:4763 +#: config/obj-vms.c:4568 config/obj-vms.c:4712 msgid "Fixup datum is not \"fixP->fx_addsy\"" msgstr "" -#: config/obj-vms.c:4834 +#: config/obj-vms.c:4783 #, c-format msgid "" "g++ wrote an extern reference to `%s' as a routine.\n" "I will fix it, but I hope that it was note really a routine." msgstr "" -#: config/obj-vms.c:4966 +#: config/obj-vms.c:4915 msgid "Can't handle global xtors symbols yet." msgstr "" -#: config/obj-vms.c:4969 +#: config/obj-vms.c:4918 #, c-format msgid "Unknown %s" msgstr "" @@ -950,31 +967,32 @@ msgstr "" #. #. * Error otherwise. #. -#: config/obj-vms.c:5054 +#: config/obj-vms.c:5003 #, c-format msgid "unhandled stab type %d" msgstr "" -#: config/tc-a29k.c:160 config/tc-sparc.c:3696 +#: config/tc-a29k.c:160 config/tc-sparc.c:3878 msgid "Unknown segment type" msgstr "" #. Probably a memory allocation problem? Give up now. -#: config/tc-a29k.c:330 config/tc-hppa.c:1387 config/tc-i860.c:202 -#: config/tc-mips.c:1062 config/tc-mips.c:1104 config/tc-sparc.c:789 +#: config/tc-a29k.c:330 config/tc-hppa.c:1412 config/tc-mips.c:1030 +#: config/tc-mips.c:1072 config/tc-sparc.c:846 msgid "Broken assembler. No assembly attempted." msgstr "" -#: config/tc-a29k.c:375 config/tc-arc.c:535 config/tc-d10v.c:507 -#: config/tc-d30v.c:553 config/tc-h8300.c:305 config/tc-h8500.c:297 -#: config/tc-mcore.c:656 config/tc-mn10200.c:935 config/tc-mn10300.c:1294 -#: config/tc-ppc.c:1852 config/tc-sh.c:632 config/tc-tic80.c:291 -#: config/tc-v850.c:2033 config/tc-w65.c:257 config/tc-z8k.c:341 +#: config/tc-a29k.c:375 config/tc-avr.c:1124 config/tc-d10v.c:532 +#: config/tc-d30v.c:552 config/tc-h8300.c:296 config/tc-h8500.c:294 +#: config/tc-mcore.c:655 config/tc-mn10200.c:954 config/tc-mn10300.c:1335 +#: config/tc-ppc.c:1974 config/tc-sh.c:838 config/tc-tic80.c:282 +#: config/tc-v850.c:2076 config/tc-w65.c:248 config/tc-z8k.c:336 msgid "missing operand" msgstr "" -#: config/tc-a29k.c:415 config/tc-hppa.c:1533 config/tc-i860.c:407 -#: config/tc-i860.c:423 config/tc-sparc.c:1352 config/tc-sparc.c:1358 +#: config/tc-a29k.c:415 config/tc-cris.c:913 config/tc-cris.c:921 +#: config/tc-hppa.c:1545 config/tc-i860.c:431 config/tc-i860.c:448 +#: config/tc-sparc.c:1408 config/tc-sparc.c:1414 #, c-format msgid "Unknown opcode: `%s'" msgstr "" @@ -994,64 +1012,64 @@ msgstr "" msgid "Immediate value of %ld is too large" msgstr "" -#: config/tc-a29k.c:892 config/tc-i860.c:940 +#: config/tc-a29k.c:890 #, c-format msgid "bad relocation type: 0x%02x" msgstr "" -#: config/tc-a29k.c:916 +#: config/tc-a29k.c:914 #, c-format msgid "need %o3\n" msgstr "" -#: config/tc-a29k.c:932 +#: config/tc-a29k.c:930 msgid "a29k_convert_frag\n" msgstr "" -#: config/tc-a29k.c:941 +#: config/tc-a29k.c:939 msgid "a29k_estimate_size_before_relax\n" msgstr "" -#: config/tc-a29k.c:1092 +#: config/tc-a29k.c:1090 #, c-format msgid "label \"$%d\" redefined" msgstr "" -#: config/tc-a29k.c:1165 +#: config/tc-a29k.c:1163 msgid "Invalid expression after %%%%\n" msgstr "" -#: config/tc-a29k.c:1176 +#: config/tc-a29k.c:1174 msgid "Invalid register in & expression" msgstr "" -#: config/tc-alpha.c:834 +#: config/tc-alpha.c:837 #, c-format msgid "internal error: can't hash opcode `%s': %s" msgstr "" -#: config/tc-alpha.c:868 +#: config/tc-alpha.c:871 #, c-format msgid "internal error: can't hash macro `%s': %s" msgstr "" -#: config/tc-alpha.c:951 config/tc-i960.c:2738 +#: config/tc-alpha.c:954 config/tc-i960.c:2700 msgid "syntax error" msgstr "" -#: config/tc-alpha.c:1025 config/tc-arm.c:5167 config/tc-h8300.c:1413 -#: config/tc-h8500.c:1222 config/tc-hppa.c:3904 config/tc-i860.c:813 -#: config/tc-m68k.c:4125 config/tc-m88k.c:1106 config/tc-ns32k.c:1589 -#: config/tc-sparc.c:2741 config/tc-z8k.c:1355 +#: config/tc-alpha.c:1028 config/tc-arm.c:6629 config/tc-h8300.c:1373 +#: config/tc-h8500.c:1197 config/tc-hppa.c:3939 config/tc-i860.c:931 +#: config/tc-m68hc11.c:478 config/tc-m68k.c:4179 config/tc-m88k.c:1105 +#: config/tc-ns32k.c:1663 config/tc-sparc.c:2830 config/tc-z8k.c:1324 msgid "Bad call to MD_ATOF()" msgstr "" -#: config/tc-alpha.c:1075 +#: config/tc-alpha.c:1078 #, c-format msgid "Unknown CPU identifier `%s'" msgstr "" -#: config/tc-alpha.c:1119 +#: config/tc-alpha.c:1122 msgid "" "Alpha options:\n" "-32addr\t\t\ttreat addresses as 32-bit values\n" @@ -1062,974 +1080,948 @@ msgid "" "\t\t\tthese variants include PALcode opcodes\n" msgstr "" -#: config/tc-alpha.c:1129 +#: config/tc-alpha.c:1132 msgid "" "VMS options:\n" "-+\t\t\thash encode (don't truncate) names longer than 64 characters\n" "-H\t\t\tshow new symbol after hash truncation\n" msgstr "" -#: config/tc-alpha.c:1298 +#: config/tc-alpha.c:1305 #, c-format msgid "unhandled relocation type %s" msgstr "" -#: config/tc-alpha.c:1311 +#: config/tc-alpha.c:1318 msgid "non-absolute expression in constant field" msgstr "" -#: config/tc-alpha.c:1325 +#: config/tc-alpha.c:1332 #, c-format msgid "type %d reloc done?\n" msgstr "" -#: config/tc-alpha.c:1376 config/tc-alpha.c:1383 config/tc-mips.c:7360 +#: config/tc-alpha.c:1383 config/tc-alpha.c:1390 config/tc-mips.c:7356 msgid "Used $at without \".set noat\"" msgstr "" -#: config/tc-alpha.c:1561 +#: config/tc-alpha.c:1572 #, c-format msgid "cannot represent `%s' relocation in object file" msgstr "" -#: config/tc-alpha.c:1568 +#: config/tc-alpha.c:1579 #, c-format msgid "internal error? cannot generate `%s' relocation" msgstr "" -#: config/tc-alpha.c:1622 +#: config/tc-alpha.c:1633 #, c-format msgid "frame reg expected, using $%d." msgstr "" -#: config/tc-alpha.c:1747 +#: config/tc-alpha.c:1758 #, c-format msgid "No !literal!%d was found" msgstr "" #. only support one relocation op per insn -#: config/tc-alpha.c:1935 +#: config/tc-alpha.c:1946 msgid "More than one relocation op per insn" msgstr "" -#: config/tc-alpha.c:1952 +#: config/tc-alpha.c:1963 msgid "No relocation operand" msgstr "" -#: config/tc-alpha.c:1958 +#: config/tc-alpha.c:1969 #, c-format msgid "No !sequence-number after !%s" msgstr "" -#: config/tc-alpha.c:1971 +#: config/tc-alpha.c:1982 #, c-format msgid "Unknown relocation operand: !%s" msgstr "" -#: config/tc-alpha.c:1984 +#: config/tc-alpha.c:1995 #, c-format msgid "Bad sequence number: !%s!%s" msgstr "" -#: config/tc-alpha.c:2335 +#: config/tc-alpha.c:2346 #, c-format msgid "operand out of range (%s not between %d and %d)" msgstr "" -#: config/tc-alpha.c:2434 config/tc-arc.c:548 config/tc-d10v.c:596 -#: config/tc-d30v.c:636 config/tc-mn10200.c:990 config/tc-mn10300.c:1365 -#: config/tc-ppc.c:1818 config/tc-ppc.c:1926 config/tc-ppc.c:1938 -#: config/tc-v850.c:1819 config/tc-v850.c:1842 config/tc-v850.c:2055 +#: config/tc-alpha.c:2445 config/tc-d10v.c:621 config/tc-d30v.c:640 +#: config/tc-mn10200.c:1009 config/tc-mn10300.c:1406 config/tc-ppc.c:1940 +#: config/tc-ppc.c:2048 config/tc-ppc.c:2060 config/tc-v850.c:1856 +#: config/tc-v850.c:1879 config/tc-v850.c:2099 msgid "too many fixups" msgstr "" -#: config/tc-alpha.c:2645 config/tc-alpha.c:2714 +#: config/tc-alpha.c:2660 config/tc-alpha.c:2729 #, c-format msgid "inappropriate arguments for opcode `%s'" msgstr "" -#: config/tc-alpha.c:2647 config/tc-alpha.c:2716 +#: config/tc-alpha.c:2662 config/tc-alpha.c:2731 #, c-format msgid "opcode `%s' not supported for target %s" msgstr "" -#: config/tc-alpha.c:2651 config/tc-alpha.c:2719 +#: config/tc-alpha.c:2666 config/tc-alpha.c:2734 config/tc-avr.c:1090 #, c-format msgid "unknown opcode `%s'" msgstr "" -#: config/tc-alpha.c:2691 config/tc-alpha.c:2758 config/tc-alpha.c:3269 -#: config/tc-alpha.c:3329 config/tc-alpha.c:3381 config/tc-alpha.c:3456 -#: config/tc-alpha.c:3541 config/tc-alpha.c:3667 config/tc-alpha.c:3844 -#: config/tc-alpha.c:3901 config/tc-alpha.c:4011 config/tc-alpha.c:4118 -#: config/tc-alpha.c:4195 +#: config/tc-alpha.c:2706 config/tc-alpha.c:2773 config/tc-alpha.c:3284 +#: config/tc-alpha.c:3344 config/tc-alpha.c:3396 config/tc-alpha.c:3471 +#: config/tc-alpha.c:3556 config/tc-alpha.c:3682 config/tc-alpha.c:3859 +#: config/tc-alpha.c:3916 config/tc-alpha.c:4026 config/tc-alpha.c:4133 +#: config/tc-alpha.c:4210 #, c-format msgid "Cannot use !%s!%d with %s" msgstr "" -#: config/tc-alpha.c:2779 +#: config/tc-alpha.c:2794 msgid "can not resolve expression" msgstr "" -#: config/tc-alpha.c:2921 config/tc-alpha.c:3113 +#: config/tc-alpha.c:2936 config/tc-alpha.c:3128 msgid "overflow in literal (.lita) table" msgstr "" -#: config/tc-alpha.c:2928 config/tc-alpha.c:2951 config/tc-alpha.c:3126 -#: config/tc-alpha.c:3470 config/tc-alpha.c:3548 config/tc-alpha.c:3596 -#: config/tc-alpha.c:3696 config/tc-alpha.c:3921 config/tc-alpha.c:4033 +#: config/tc-alpha.c:2943 config/tc-alpha.c:2966 config/tc-alpha.c:3141 +#: config/tc-alpha.c:3485 config/tc-alpha.c:3563 config/tc-alpha.c:3611 +#: config/tc-alpha.c:3711 config/tc-alpha.c:3936 config/tc-alpha.c:4048 msgid "macro requires $at register while noat in effect" msgstr "" -#: config/tc-alpha.c:2930 config/tc-alpha.c:2953 config/tc-alpha.c:3128 +#: config/tc-alpha.c:2945 config/tc-alpha.c:2968 config/tc-alpha.c:3143 msgid "macro requires $at while $at in use" msgstr "" -#: config/tc-alpha.c:3075 expr.c:86 read.c:3160 +#: config/tc-alpha.c:3090 expr.c:83 read.c:3164 msgid "bignum invalid; zero assumed" msgstr "" -#: config/tc-alpha.c:3077 expr.c:88 read.c:3162 read.c:3498 read.c:4396 +#: config/tc-alpha.c:3092 expr.c:85 read.c:3166 read.c:3499 read.c:4397 msgid "floating point number invalid; zero assumed" msgstr "" -#: config/tc-alpha.c:3082 +#: config/tc-alpha.c:3097 msgid "can't handle expression" msgstr "" -#: config/tc-alpha.c:3119 +#: config/tc-alpha.c:3134 msgid "overflow in literal (.lit8) table" msgstr "" -#: config/tc-alpha.c:3291 +#: config/tc-alpha.c:3306 #, c-format -msgid "bad instruction format for lda !%s!%d" +msgid "bad instruction format for lda !%s!%ld" msgstr "" -#: config/tc-alpha.c:4291 config/tc-ppc.c:1345 config/tc-ppc.c:3555 -#: read.c:1387 +#: config/tc-alpha.c:4306 config/tc-ppc.c:1467 config/tc-ppc.c:3689 +#: read.c:1369 #, c-format msgid ".COMMon length (%ld.) <0! Ignored." msgstr "" -#: config/tc-alpha.c:4329 config/tc-alpha.c:4338 config/tc-ppc.c:3592 -#: read.c:1408 +#: config/tc-alpha.c:4344 config/tc-alpha.c:4353 config/tc-ppc.c:3726 +#: read.c:1393 #, c-format msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld." msgstr "" -#: config/tc-alpha.c:4440 ecoff.c:3109 +#: config/tc-alpha.c:4455 ecoff.c:3087 msgid ".ent directive has no name" msgstr "" -#: config/tc-alpha.c:4448 +#: config/tc-alpha.c:4463 msgid "nested .ent directives" msgstr "" -#: config/tc-alpha.c:4484 ecoff.c:3057 +#: config/tc-alpha.c:4499 ecoff.c:3035 msgid ".end directive has no name" msgstr "" -#: config/tc-alpha.c:4493 +#: config/tc-alpha.c:4508 msgid ".end directive names different symbol than .ent" msgstr "" -#: config/tc-alpha.c:4568 +#: config/tc-alpha.c:4585 #, c-format msgid "Invalid argument %d to .prologue." msgstr "" -#: config/tc-alpha.c:4596 +#: config/tc-alpha.c:4677 msgid "ECOFF debugging is disabled." msgstr "" -#: config/tc-alpha.c:4617 +#: config/tc-alpha.c:4698 msgid "Unknown section directive" msgstr "" -#: config/tc-alpha.c:4654 +#: config/tc-alpha.c:4734 msgid ".ent directive has no symbol" msgstr "" -#: config/tc-alpha.c:4682 +#: config/tc-alpha.c:4761 msgid "Bad .frame directive 1./2. param" msgstr "" -#: config/tc-alpha.c:4694 +#: config/tc-alpha.c:4773 msgid "Bad .frame directive 3./4. param" msgstr "" -#: config/tc-alpha.c:4719 +#: config/tc-alpha.c:4798 msgid ".pdesc directive not in link (.link) section" msgstr "" -#: config/tc-alpha.c:4727 +#: config/tc-alpha.c:4806 msgid ".pdesc has no matching .ent" msgstr "" -#: config/tc-alpha.c:4738 +#: config/tc-alpha.c:4817 msgid ".pdesc directive has no entry symbol" msgstr "" -#: config/tc-alpha.c:4751 +#: config/tc-alpha.c:4830 msgid "No comma after .pdesc <entryname>" msgstr "" -#: config/tc-alpha.c:4774 +#: config/tc-alpha.c:4853 msgid "unknown procedure kind" msgstr "" -#: config/tc-alpha.c:4869 +#: config/tc-alpha.c:4947 msgid ".name directive not in link (.link) section" msgstr "" -#: config/tc-alpha.c:4877 +#: config/tc-alpha.c:4955 msgid ".name directive has no symbol" msgstr "" -#: config/tc-alpha.c:4912 +#: config/tc-alpha.c:4989 msgid "No symbol after .linkage" msgstr "" -#: config/tc-alpha.c:4941 +#: config/tc-alpha.c:5017 msgid "No symbol after .code_address" msgstr "" -#: config/tc-alpha.c:4976 ecoff.c:3274 +#: config/tc-alpha.c:5050 ecoff.c:3253 msgid "Bad .mask directive" msgstr "" -#: config/tc-alpha.c:4998 ecoff.c:3205 +#: config/tc-alpha.c:5071 ecoff.c:3183 msgid "Bad .fmask directive" msgstr "" -#: config/tc-alpha.c:5169 config/tc-arm.c:1325 read.c:2151 read.c:2731 -#: stabs.c:460 +#: config/tc-alpha.c:5241 config/tc-arm.c:1593 read.c:2150 read.c:2737 +#: stabs.c:464 #, c-format msgid "Expected comma after name \"%s\"" msgstr "" #. *symbol_get_obj (symbolP) = (signed char) temp; -#: config/tc-alpha.c:5180 +#: config/tc-alpha.c:5252 #, c-format msgid "unhandled: .proc %s,%d" msgstr "" -#: config/tc-alpha.c:5215 +#: config/tc-alpha.c:5287 #, c-format msgid "Tried to .set unrecognized mode `%s'" msgstr "" #. not fatal, but it might not work in the end -#: config/tc-alpha.c:5232 +#: config/tc-alpha.c:5304 msgid "File overrides no-base-register option." msgstr "" -#: config/tc-alpha.c:5249 +#: config/tc-alpha.c:5321 #, c-format msgid "Bad base register, using $%d." msgstr "" -#: config/tc-alpha.c:5271 +#: config/tc-alpha.c:5343 #, c-format msgid "Alignment too large: %d. assumed" msgstr "" -#: config/tc-alpha.c:5275 config/tc-d30v.c:2182 +#: config/tc-alpha.c:5347 config/tc-d30v.c:2219 msgid "Alignment negative: 0 assumed" msgstr "" -#: config/tc-alpha.c:5588 +#: config/tc-alpha.c:5662 #, c-format msgid "Chose GP value of %lx\n" msgstr "" -#: config/tc-arc.c:137 -msgid "" -"ARC options:\n" -"-EB\t\t\tgenerate big endian output\n" -"-EL\t\t\tgenerate little endian output\n" -msgstr "" - -#: config/tc-arc.c:155 config/tc-arc.c:178 config/tc-arc.c:922 -#: config/tc-hppa.c:1347 config/tc-hppa.c:6734 config/tc-hppa.c:6740 -#: config/tc-hppa.c:6746 config/tc-hppa.c:6752 config/tc-mn10300.c:883 -#: config/tc-mn10300.c:1993 -msgid "could not set architecture and machine" -msgstr "" - -#: config/tc-arc.c:175 -msgid "virtual memory exhausted" -msgstr "" - -#: config/tc-arc.c:254 config/tc-mn10200.c:1354 config/tc-mn10300.c:1904 -#: config/tc-ppc.c:1102 config/tc-v850.c:1618 -#, c-format -msgid "operand out of range (%s not between %ld and %ld)" -msgstr "" - -#: config/tc-arc.c:389 -#, c-format -msgid "unknown syntax format character `%c'" -msgstr "" - -#: config/tc-arc.c:488 -msgid "too many suffixes" -msgstr "" - -#: config/tc-arc.c:533 config/tc-d10v.c:505 config/tc-d30v.c:551 -#: config/tc-mn10200.c:932 config/tc-mn10300.c:1291 config/tc-ppc.c:1850 -#: config/tc-tic80.c:287 config/tc-v850.c:2030 -msgid "illegal operand" -msgstr "" - -#: config/tc-arc.c:620 config/tc-mn10200.c:1031 config/tc-mn10300.c:1435 -#: config/tc-ppc.c:1975 config/tc-v850.c:2108 -#, c-format -msgid "junk at end of line: `%s'" -msgstr "" - -#: config/tc-arc.c:660 -msgid "8 byte instruction in delay slot" -msgstr "" - -#: config/tc-arc.c:662 -msgid "8 byte jump instruction with delay slot" -msgstr "" - -#: config/tc-arc.c:670 -msgid "conditional branch follows set of flags" -msgstr "" - -#: config/tc-arc.c:749 config/tc-arm.c:6377 -#, c-format -msgid "bad instruction `%s'" -msgstr "" - -#: config/tc-arc.c:772 -msgid "expected comma after symbol-name" -msgstr "" - -#: config/tc-arc.c:789 -msgid "ignoring attempt to re-define symbol" -msgstr "" - -#: config/tc-arc.c:804 -msgid "expected comma after common length" -msgstr "" - -#: config/tc-arc.c:897 -msgid ".cpu command must appear before any instructions" -msgstr "" - -#: config/tc-arc.c:916 -msgid ".cpu conflicts with previous value" -msgstr "" - -#: config/tc-arc.c:927 -msgid "bad .cpu op" -msgstr "" - -#: config/tc-arc.c:951 config/tc-ppc.c:2623 -msgid "missing rename string" -msgstr "" - -#: config/tc-arc.c:963 -msgid "invalid symbol to rename to" +#: config/tc-arc.c:1618 config/tc-arm.c:7532 +msgid "md_estimate_size_before_relax\n" msgstr "" -#: config/tc-arc.c:1010 config/tc-d10v.c:284 config/tc-d30v.c:366 -#: config/tc-mips.c:8770 config/tc-mn10200.c:355 config/tc-pj.c:365 -#: config/tc-ppc.c:4384 config/tc-sh.c:1742 config/tc-v850.c:1276 -msgid "bad call to md_atof" +#: config/tc-arc.c:1630 +msgid "md_convert_frag\n" msgstr "" -#: config/tc-arc.c:1097 -#, c-format -msgid "missing ')' in %-op" +#: config/tc-arm.c:1156 +msgid "Bad arguments to instruction" msgstr "" -#: config/tc-arc.c:1131 -msgid "expression too complex for %%st" +#: config/tc-arm.c:1157 +msgid "r15 not allowed here" msgstr "" -#: config/tc-arc.c:1326 config/tc-arm.c:3142 config/tc-d10v.c:1475 -#: config/tc-d30v.c:1828 config/tc-mips.c:3250 config/tc-mips.c:4182 -#: config/tc-mips.c:4967 config/tc-mips.c:5513 config/tc-ppc.c:4720 -#: config/tc-v850.c:2338 -msgid "expression too complex" +#: config/tc-arm.c:1158 +msgid "Instruction should not have flags" msgstr "" -#: config/tc-arc.c:1392 config/tc-ppc.c:4823 config/tc-v850.c:2382 -msgid "unresolved expression that must be resolved" +#: config/tc-arm.c:1159 +msgid "Instruction is not conditional" msgstr "" -#: config/tc-arc.c:1457 config/tc-sparc.c:3203 -#, c-format -msgid "internal error: can't export reloc type %d (`%s')" +#: config/tc-arm.c:1160 +msgid "acc0 expected" msgstr "" -#: config/tc-arm.c:1023 +#: config/tc-arm.c:1289 msgid "Literal Pool Overflow" msgstr "" -#: config/tc-arm.c:1165 +#: config/tc-arm.c:1431 msgid "Invalid syntax for .req directive." msgstr "" -#: config/tc-arm.c:1237 config/tc-mips.c:9963 read.c:2040 +#: config/tc-arm.c:1506 config/tc-mips.c:9916 read.c:2035 #, c-format msgid "Alignment too large: %d. assumed." msgstr "" -#: config/tc-arm.c:1240 read.c:2045 +#: config/tc-arm.c:1509 read.c:2040 msgid "Alignment negative. 0 assumed." msgstr "" -#: config/tc-arm.c:1374 config/tc-m32r.c:418 read.c:2790 read.c:4867 +#: config/tc-arm.c:1643 config/tc-m32r.c:417 read.c:2795 read.c:4857 #, c-format msgid "symbol `%s' already defined" msgstr "" -#: config/tc-arm.c:1444 +#: config/tc-arm.c:1714 msgid "selected processor does not support THUMB opcodes" msgstr "" -#: config/tc-arm.c:1456 +#: config/tc-arm.c:1727 msgid "selected processor does not support ARM opcodes" msgstr "" -#: config/tc-arm.c:1465 +#: config/tc-arm.c:1739 #, c-format msgid "invalid instruction size selected (%d)" msgstr "" -#: config/tc-arm.c:1500 +#: config/tc-arm.c:1774 #, c-format msgid "invalid operand to .code directive (%d) (expecting 16 or 32)" msgstr "" -#: config/tc-arm.c:1511 +#: config/tc-arm.c:1785 msgid "Garbage following instruction" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:1560 +#: config/tc-arm.c:1835 #, c-format msgid "Register expected, not '%.100s'" msgstr "" -#. In the few cases where we might be able to accept something else -#. this error can be overridden. -#: config/tc-arm.c:1586 -msgid "<psr(f)> expected" +#. In the few cases where we might be able to accept +#. something else this error can be overridden. +#: config/tc-arm.c:1907 +msgid "flag for {c}psr instruction expected" msgstr "" -#: config/tc-arm.c:1616 +#: config/tc-arm.c:1937 msgid "Illegal co-processor number" msgstr "" -#: config/tc-arm.c:1623 +#: config/tc-arm.c:1944 msgid "Bad or missing co-processor number" msgstr "" -#: config/tc-arm.c:1647 +#: config/tc-arm.c:1968 config/tc-arm.c:3054 config/tc-arm.c:3246 msgid "bad or missing expression" msgstr "" -#: config/tc-arm.c:1653 +#: config/tc-arm.c:1974 msgid "immediate co-processor expression too large" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:1678 +#: config/tc-arm.c:1999 msgid "Co-processor register expected" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:1702 +#: config/tc-arm.c:2023 msgid "Floating point register expected" msgstr "" -#: config/tc-arm.c:1719 +#: config/tc-arm.c:2040 msgid "immediate expression expected" msgstr "" -#: config/tc-arm.c:1734 +#: config/tc-arm.c:2055 msgid "co-processor address must be word aligned" msgstr "" -#: config/tc-arm.c:1740 +#: config/tc-arm.c:2061 msgid "offset too large" msgstr "" -#: config/tc-arm.c:1788 +#: config/tc-arm.c:2109 msgid "pc may not be used in post-increment" msgstr "" -#: config/tc-arm.c:1804 config/tc-arm.c:2934 +#: config/tc-arm.c:2125 config/tc-arm.c:2578 config/tc-arm.c:3438 +#: config/tc-arm.c:4358 msgid "pre-indexed expression expected" msgstr "" -#: config/tc-arm.c:1817 config/tc-arm.c:2946 config/tc-arm.c:3288 +#: config/tc-arm.c:2138 config/tc-arm.c:2591 config/tc-arm.c:3449 +#: config/tc-arm.c:4370 config/tc-arm.c:4716 msgid "missing ]" msgstr "" -#: config/tc-arm.c:1827 +#: config/tc-arm.c:2148 msgid "pc may not be used with write-back" msgstr "" -#: config/tc-arm.c:1881 -msgid "<psr> expected" +#: config/tc-arm.c:2203 +msgid "comma expected after register name" msgstr "" -#: config/tc-arm.c:1942 config/tc-arm.c:2556 -msgid "Register or shift expression expected" +#: config/tc-arm.c:2222 +msgid "{C|S}PSR expected" msgstr "" -#: config/tc-arm.c:1956 config/tc-arm.c:2271 config/tc-arm.c:2523 -#: config/tc-arm.c:2543 -msgid "Invalid constant" +#: config/tc-arm.c:2250 +msgid "comma missing after psr flags" msgstr "" -#: config/tc-arm.c:1967 -msgid "Error: unrecognised syntax for second argument to msr instruction" +#: config/tc-arm.c:2267 config/tc-arm.c:2277 +msgid "only a register or immediate value can follow a psr flag" msgstr "" -#: config/tc-arm.c:2016 +#: config/tc-arm.c:2284 +msgid "immediate value cannot be used to set this field" +msgstr "" + +#: config/tc-arm.c:2301 config/tc-arm.c:3673 config/tc-arm.c:3939 +#: config/tc-arm.c:3959 +msgid "Invalid constant" +msgstr "" + +#: config/tc-arm.c:2351 msgid "rdhi, rdlo and rm must all be different" msgstr "" -#: config/tc-arm.c:2072 +#: config/tc-arm.c:2407 msgid "rd and rm should be different in mul" msgstr "" -#: config/tc-arm.c:2128 +#: config/tc-arm.c:2463 msgid "rd and rm should be different in mla" msgstr "" -#: config/tc-arm.c:2255 -msgid "bad_segment" +#: config/tc-arm.c:2512 +#, c-format +msgid "acc0 expected, not '%.100s'" msgstr "" -#: config/tc-arm.c:2301 config/tc-arm.c:2378 -msgid "Shift expression expected" +#: config/tc-arm.c:2695 +msgid "rdhi and rdlo must be different" msgstr "" -#: config/tc-arm.c:2342 -msgid "Invalid immediate shift" +#: config/tc-arm.c:2815 +msgid "Warning: Instruction unpredictable when using r15" +msgstr "" + +#: config/tc-arm.c:3063 config/tc-arm.c:3255 config/tc-arm.c:5503 +#: config/tc-arm.c:5536 config/tc-arm.c:5546 +msgid "immediate value out of range" +msgstr "" + +#: config/tc-arm.c:3403 +msgid "'[' expected after PLD mnemonic" +msgstr "" + +#: config/tc-arm.c:3428 config/tc-arm.c:3458 +msgid "writeback used in preload instruction" +msgstr "" + +#. Deny all knowledge. +#: config/tc-arm.c:3506 +#, c-format +msgid "bad instruction '%.100s'" +msgstr "" + +#: config/tc-arm.c:3530 +msgid "Destination register must be even" +msgstr "" + +#: config/tc-arm.c:3536 +msgid "r12 or r14 not allowed here" +msgstr "" + +#: config/tc-arm.c:3544 +msgid "pre/post-indexing used when modified address register is destination" +msgstr "" + +#: config/tc-arm.c:3657 +msgid "bad_segment" +msgstr "" + +#: config/tc-arm.c:3703 config/tc-arm.c:3714 +msgid "Shift expression expected" msgstr "" -#: config/tc-arm.c:2371 +#: config/tc-arm.c:3738 msgid "shift requires register or #expression" msgstr "" -#: config/tc-arm.c:2372 +#: config/tc-arm.c:3739 msgid "shift requires #expression" msgstr "" -#: config/tc-arm.c:2514 config/tc-arm.c:2975 +#: config/tc-arm.c:3769 +msgid "Shift of 0 ignored." +msgstr "" + +#: config/tc-arm.c:3775 +msgid "Invalid immediate shift" +msgstr "" + +#: config/tc-arm.c:3930 config/tc-arm.c:4400 msgid "Constant expression expected" msgstr "" -#: config/tc-arm.c:2609 +#: config/tc-arm.c:3972 +msgid "Register or shift expression expected" +msgstr "" + +#: config/tc-arm.c:4025 msgid "Invalid floating point immediate expression" msgstr "" -#: config/tc-arm.c:2612 +#: config/tc-arm.c:4029 msgid "Floating point register or immediate expression expected" msgstr "" -#: config/tc-arm.c:2781 +#: config/tc-arm.c:4198 msgid "address offset too large" msgstr "" -#: config/tc-arm.c:2853 +#: config/tc-arm.c:4275 msgid "Processor does not support halfwords or signed bytes" msgstr "" -#: config/tc-arm.c:2874 +#: config/tc-arm.c:4296 msgid "Address expected" msgstr "" -#: config/tc-arm.c:2904 config/tc-arm.c:2918 config/tc-arm.c:2955 +#: config/tc-arm.c:4326 config/tc-arm.c:4341 config/tc-arm.c:4379 #, c-format msgid "%s register same as write-back base" msgstr "" -#: config/tc-arm.c:2905 config/tc-arm.c:2919 config/tc-arm.c:2956 +#: config/tc-arm.c:4328 config/tc-arm.c:4343 config/tc-arm.c:4381 msgid "destination" msgstr "" -#: config/tc-arm.c:2905 config/tc-arm.c:2919 config/tc-arm.c:2956 +#: config/tc-arm.c:4328 config/tc-arm.c:4343 config/tc-arm.c:4381 msgid "source" msgstr "" -#: config/tc-arm.c:2995 +#: config/tc-arm.c:4420 msgid "literal pool insertion failed" msgstr "" -#: config/tc-arm.c:3033 +#: config/tc-arm.c:4459 msgid "Pre-increment instruction with translate" msgstr "" -#: config/tc-arm.c:3074 +#: config/tc-arm.c:4500 msgid "Bad range in register list" msgstr "" -#: config/tc-arm.c:3082 config/tc-arm.c:3091 config/tc-arm.c:3132 +#: config/tc-arm.c:4508 config/tc-arm.c:4517 config/tc-arm.c:4559 #, c-format msgid "Warning: Duplicated register (r%d) in register list" msgstr "" -#: config/tc-arm.c:3094 +#: config/tc-arm.c:4520 msgid "Warning: Register range not in ascending order" msgstr "" -#: config/tc-arm.c:3105 +#: config/tc-arm.c:4532 msgid "Missing `}'" msgstr "" -#: config/tc-arm.c:3121 +#: config/tc-arm.c:4548 msgid "invalid register mask" msgstr "" -#: config/tc-arm.c:3180 +#: config/tc-arm.c:4569 config/tc-avr.c:852 config/tc-cris.c:2733 +#: config/tc-d10v.c:1560 config/tc-d30v.c:1865 config/tc-mips.c:3230 +#: config/tc-mips.c:4162 config/tc-mips.c:4947 config/tc-mips.c:5493 +#: config/tc-ppc.c:4854 config/tc-v850.c:2385 +msgid "expression too complex" +msgstr "" + +#: config/tc-arm.c:4608 msgid "r15 not allowed as base register" msgstr "" -#: config/tc-arm.c:3248 config/tc-arm.c:3262 +#: config/tc-arm.c:4676 config/tc-arm.c:4690 msgid "r15 not allowed in swap" msgstr "" -#: config/tc-arm.c:3615 config/tc-v850.c:1921 config/tc-v850.c:1942 +#: config/tc-arm.c:4788 +msgid "Use of r15 in bx in ARM mode is not really useful" +msgstr "" + +#: config/tc-arm.c:5044 config/tc-v850.c:1959 config/tc-v850.c:1980 msgid "constant expression expected" msgstr "" -#: config/tc-arm.c:3621 +#: config/tc-arm.c:5050 msgid "Constant value required for number of registers" msgstr "" -#: config/tc-arm.c:3629 +#: config/tc-arm.c:5058 msgid "number of registers must be in the range [1:4]" msgstr "" -#: config/tc-arm.c:3689 +#: config/tc-arm.c:5119 msgid "R15 not allowed as base register with write-back" msgstr "" -#: config/tc-arm.c:3936 +#: config/tc-arm.c:5367 msgid "lo register required" msgstr "" -#: config/tc-arm.c:3944 +#: config/tc-arm.c:5375 msgid "hi register required" msgstr "" -#: config/tc-arm.c:4013 +#: config/tc-arm.c:5445 msgid "dest and source1 must be the same register" msgstr "" -#: config/tc-arm.c:4020 +#: config/tc-arm.c:5452 msgid "subtract valid only on lo regs" msgstr "" -#: config/tc-arm.c:4044 +#: config/tc-arm.c:5476 msgid "invalid Hi register with immediate" msgstr "" -#: config/tc-arm.c:4071 config/tc-arm.c:4104 config/tc-arm.c:4114 -msgid "immediate value out of range" -msgstr "" - -#: config/tc-arm.c:4082 +#: config/tc-arm.c:5514 msgid "invalid immediate value for stack adjust" msgstr "" -#: config/tc-arm.c:4093 +#: config/tc-arm.c:5525 msgid "invalid immediate for address calculation" msgstr "" -#: config/tc-arm.c:4180 +#: config/tc-arm.c:5612 msgid "source1 and dest must be same register" msgstr "" -#: config/tc-arm.c:4215 +#: config/tc-arm.c:5646 msgid "Invalid immediate for shift" msgstr "" -#: config/tc-arm.c:4294 +#: config/tc-arm.c:5725 msgid "only lo regs allowed with immediate" msgstr "" -#: config/tc-arm.c:4313 +#: config/tc-arm.c:5744 msgid "invalid immediate" msgstr "" -#: config/tc-arm.c:4367 +#: config/tc-arm.c:5798 msgid "expected ']'" msgstr "" -#: config/tc-arm.c:4433 +#: config/tc-arm.c:5865 msgid "byte or halfword not valid for base register" msgstr "" -#: config/tc-arm.c:4438 +#: config/tc-arm.c:5870 msgid "R15 based store not allowed" msgstr "" -#: config/tc-arm.c:4443 +#: config/tc-arm.c:5875 msgid "Invalid base register for register offset" msgstr "" -#: config/tc-arm.c:4461 +#: config/tc-arm.c:5893 msgid "invalid offset" msgstr "" -#: config/tc-arm.c:4472 +#: config/tc-arm.c:5904 msgid "invalid base register in load/store" msgstr "" -#: config/tc-arm.c:4496 +#: config/tc-arm.c:5928 msgid "Invalid offset" msgstr "" -#: config/tc-arm.c:4570 +#: config/tc-arm.c:6003 msgid "dest and source1 one must be the same register" msgstr "" -#: config/tc-arm.c:4578 +#: config/tc-arm.c:6011 msgid "Rs and Rd must be different in MUL" msgstr "" -#: config/tc-arm.c:4722 +#: config/tc-arm.c:6155 msgid "" "Inserted missing '!': load/store multiple always writes back base register" msgstr "" -#: config/tc-arm.c:4738 config/tc-arm.c:4838 +#: config/tc-arm.c:6171 config/tc-arm.c:6271 msgid "Expression too complex" msgstr "" -#: config/tc-arm.c:4744 +#: config/tc-arm.c:6177 msgid "only lo-regs valid in load/store multiple" msgstr "" -#: config/tc-arm.c:4790 +#: config/tc-arm.c:6223 msgid "Syntax: ldrs[b] Rd, [Rb, Ro]" msgstr "" -#: config/tc-arm.c:4854 +#: config/tc-arm.c:6287 msgid "invalid register list to push/pop instruction" msgstr "" -#: config/tc-arm.c:4996 +#: config/tc-arm.c:6429 config/tc-cris.c:664 msgid "Virtual memory exhausted" msgstr "" -#: config/tc-arm.c:5394 +#: config/tc-arm.c:6835 #, c-format msgid "invalid constant (%lx) after fixup" msgstr "" -#: config/tc-arm.c:5428 +#: config/tc-arm.c:6871 #, c-format -msgid "Unable to compute ADRL instructions for PC offset of 0x%x" +msgid "Unable to compute ADRL instructions for PC offset of 0x%lx" msgstr "" -#: config/tc-arm.c:5456 +#: config/tc-arm.c:6901 #, c-format msgid "bad immediate value for offset (%ld)" msgstr "" -#: config/tc-arm.c:5477 config/tc-arm.c:5499 +#: config/tc-arm.c:6923 config/tc-arm.c:6945 msgid "invalid literal constant: pool needs to be closer" msgstr "" -#: config/tc-arm.c:5479 +#: config/tc-arm.c:6925 #, c-format msgid "bad immediate value for half-word offset (%ld)" msgstr "" -#: config/tc-arm.c:5516 +#: config/tc-arm.c:6962 msgid "shift expression is too large" msgstr "" -#: config/tc-arm.c:5534 config/tc-arm.c:5543 +#: config/tc-arm.c:6981 config/tc-arm.c:6990 msgid "Invalid swi expression" msgstr "" -#: config/tc-arm.c:5553 +#: config/tc-arm.c:7000 msgid "Invalid expression in load/store multiple" msgstr "" -#: config/tc-arm.c:5605 +#: config/tc-arm.c:7053 msgid "gas can't handle same-section branch dest >= 0x04000000" msgstr "" -#: config/tc-arm.c:5614 +#: config/tc-arm.c:7062 msgid "out of range branch" msgstr "" -#: config/tc-arm.c:5631 config/tc-arm.c:5647 config/tc-mips.c:9790 +#: config/tc-arm.c:7095 config/tc-arm.c:7111 config/tc-mips.c:9743 msgid "Branch out of range" msgstr "" -#: config/tc-arm.c:5669 +#: config/tc-arm.c:7134 msgid "Branch with link out of range" msgstr "" -#: config/tc-arm.c:5736 +#: config/tc-arm.c:7201 msgid "Illegal value for co-processor offset" msgstr "" -#: config/tc-arm.c:5759 +#: config/tc-arm.c:7225 #, c-format msgid "Invalid offset, target not word aligned (0x%08X)" msgstr "" -#: config/tc-arm.c:5764 config/tc-arm.c:5773 config/tc-arm.c:5780 -#: config/tc-arm.c:5787 config/tc-arm.c:5794 +#: config/tc-arm.c:7231 config/tc-arm.c:7240 config/tc-arm.c:7247 +#: config/tc-arm.c:7254 config/tc-arm.c:7261 #, c-format -msgid "Invalid offset, value too big (0x%08X)" +msgid "Invalid offset, value too big (0x%08lX)" msgstr "" -#: config/tc-arm.c:5831 +#: config/tc-arm.c:7300 msgid "Invalid immediate for stack address calculation" msgstr "" -#: config/tc-arm.c:5840 +#: config/tc-arm.c:7309 #, c-format msgid "Invalid immediate for address calculation (value = 0x%08lX)" msgstr "" -#: config/tc-arm.c:5850 +#: config/tc-arm.c:7319 msgid "Invalid 8bit immediate" msgstr "" -#: config/tc-arm.c:5858 +#: config/tc-arm.c:7327 msgid "Invalid 3bit immediate" msgstr "" -#: config/tc-arm.c:5874 +#: config/tc-arm.c:7343 #, c-format msgid "Invalid immediate: %ld is too large" msgstr "" -#: config/tc-arm.c:5889 +#: config/tc-arm.c:7358 #, c-format msgid "Illegal Thumb shift value: %ld" msgstr "" -#: config/tc-arm.c:5903 +#: config/tc-arm.c:7372 config/tc-mn10300.c:1961 #, c-format msgid "Bad relocation fixup type (%d)" msgstr "" -#: config/tc-arm.c:5973 +#: config/tc-arm.c:7445 msgid "Literal referenced across section boundary (Implicit dump?)" msgstr "" -#: config/tc-arm.c:5986 +#: config/tc-arm.c:7458 #, c-format msgid "Internal_relocation (type %d) not fixed up (IMMEDIATE)" msgstr "" -#: config/tc-arm.c:5992 +#: config/tc-arm.c:7464 msgid "ADRL used for a symbol not defined in the same file" msgstr "" -#: config/tc-arm.c:5998 +#: config/tc-arm.c:7469 #, c-format msgid "Internal_relocation (type %d) not fixed up (OFFSET_IMM)" msgstr "" -#: config/tc-arm.c:6018 config/tc-mcore.c:2110 config/tc-ns32k.c:2283 +#: config/tc-arm.c:7490 config/tc-cris.c:2672 config/tc-mcore.c:2109 +#: config/tc-ns32k.c:2369 msgid "<unknown>" msgstr "" -#: config/tc-arm.c:6021 +#: config/tc-arm.c:7493 #, c-format -msgid "Can not represent %s relocation in this object file format (%d)" +msgid "Cannot represent %s relocation in this object file format" msgstr "" -#: config/tc-arm.c:6042 config/tc-mips.c:11281 config/tc-sh.c:2866 +#: config/tc-arm.c:7514 config/tc-mips.c:11261 config/tc-sh.c:3177 #, c-format msgid "Can not represent %s relocation in this object file format" msgstr "" -#: config/tc-arm.c:6060 -msgid "md_estimate_size_before_relax\n" -msgstr "" - -#: config/tc-arm.c:6135 +#: config/tc-arm.c:7611 #, c-format msgid "No operator -- statement `%s'\n" msgstr "" -#: config/tc-arm.c:6153 +#: config/tc-arm.c:7629 msgid "selected processor does not support this opcode" msgstr "" -#: config/tc-arm.c:6197 +#: config/tc-arm.c:7675 #, c-format msgid "Opcode `%s' must have suffix from list: <%s>" msgstr "" -#: config/tc-arm.c:6227 +#: config/tc-arm.c:7706 msgid "Warning: Use of the 'nv' conditional is deprecated\n" msgstr "" -#: config/tc-arm.c:6244 +#: config/tc-arm.c:7723 #, c-format msgid "Opcode `%s' is unconditional\n" msgstr "" -#: config/tc-arm.c:6269 +#: config/tc-arm.c:7747 #, c-format msgid "Opcode `%s' must have suffix from <%s>\n" msgstr "" -#: config/tc-arm.c:6355 +#: config/tc-arm.c:7838 #, c-format msgid "register '%s' does not exist\n" msgstr "" -#: config/tc-arm.c:6360 +#: config/tc-arm.c:7843 #, c-format msgid "ignoring redefinition of register alias '%s'" msgstr "" -#: config/tc-arm.c:6366 +#: config/tc-arm.c:7849 #, c-format msgid "" "ignoring redefinition of register alias '%s' to non-existant register '%s'" msgstr "" -#: config/tc-arm.c:6370 +#: config/tc-arm.c:7853 msgid "ignoring incomplete .req pseuso op" msgstr "" -#: config/tc-arm.c:6550 +#: config/tc-arm.c:7860 +#, c-format +msgid "bad instruction `%s'" +msgstr "" + +#: config/tc-arm.c:8035 #, c-format msgid "Unrecognised APCS switch -m%s" msgstr "" -#: config/tc-arm.c:6693 config/tc-arm.c:6706 config/tc-arm.c:6719 -#: config/tc-arm.c:6732 config/tc-arm.c:6738 +#: config/tc-arm.c:8192 config/tc-arm.c:8205 config/tc-arm.c:8218 +#: config/tc-arm.c:8231 config/tc-arm.c:8237 #, c-format msgid "Invalid architecture variant -m%s" msgstr "" -#: config/tc-arm.c:6745 +#: config/tc-arm.c:8244 #, c-format msgid "Invalid processor variant -m%s" msgstr "" -#: config/tc-arm.c:6768 +#: config/tc-arm.c:8267 msgid "" " ARM Specific Assembler Options:\n" " -m[arm][<processor name>] select processor variant\n" @@ -2045,134 +2037,477 @@ msgid "" " -k generate PIC code.\n" msgstr "" -#: config/tc-arm.c:6780 +#: config/tc-arm.c:8279 msgid "" " -mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to " "use\n" +" -matpcs use ARM/Thumb Procedure Calling Standard\n" " -mapcs-float floating point args are passed in FP regs\n" " -mapcs-reentrant the code is position independent/reentrant\n" msgstr "" -#: config/tc-arm.c:6786 +#: config/tc-arm.c:8286 msgid " -moabi support the old ELF ABI\n" msgstr "" -#: config/tc-arm.c:6790 +#: config/tc-arm.c:8290 msgid "" " -EB assemble code for a big endian cpu\n" " -EL assemble code for a little endian cpu\n" msgstr "" -#: config/tc-arm.c:6939 +#: config/tc-arm.c:8443 #, c-format msgid "%s: unexpected function type: %d" msgstr "" -#: config/tc-d10v.c:228 +#: config/tc-arm.h:98 +msgid "arm convert_frag\n" +msgstr "" + +#: config/tc-avr.c:185 +msgid "Known MCU names:" +msgstr "" + +#: config/tc-avr.c:254 +msgid "" +"AVR options:\n" +" -mmcu=[avr-name] select microcontroller variant\n" +" [avr-name] can be:\n" +" avr1 - AT90S1200, ATtiny1x, ATtiny28\n" +" avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n" +" avr3 - ATmega103, ATmega603\n" +" avr4 - ATmega83, ATmega85\n" +" avr5 - ATmega161, ATmega163, ATmega32, AT94K\n" +" or immediate microcontroller name.\n" +msgstr "" + +#: config/tc-avr.c:264 +msgid "" +" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n" +" -mno-skip-bug disable warnings for skipping two-word instructions\n" +" (default for avr4, avr5)\n" +" -mno-wrap reject rjmp/rcall instructions with 8K wrap-around\n" +" (default for avr3, avr5)\n" +msgstr "" + +#: config/tc-avr.c:312 +#, c-format +msgid "unknown MCU: %s\n" +msgstr "" + +#: config/tc-avr.c:321 +#, c-format +msgid "redefinition of mcu type `%s' to `%s'" +msgstr "" + +#: config/tc-avr.c:372 config/tc-d10v.c:313 config/tc-d30v.c:366 +#: config/tc-mips.c:8789 config/tc-mn10200.c:375 config/tc-pj.c:356 +#: config/tc-ppc.c:4518 config/tc-sh.c:2058 config/tc-v850.c:1291 +msgid "bad call to md_atof" +msgstr "" + +#: config/tc-avr.c:435 +msgid "constant value required" +msgstr "" + +#: config/tc-avr.c:438 +#, c-format +msgid "number must be less than %d" +msgstr "" + +#: config/tc-avr.c:490 +msgid "`,' required" +msgstr "" + +#: config/tc-avr.c:509 +msgid "undefined combination of operands" +msgstr "" + +#: config/tc-avr.c:518 +msgid "skipping two-word instruction" +msgstr "" + +#: config/tc-avr.c:580 +msgid "register r16-r23 required" +msgstr "" + +#: config/tc-avr.c:586 +msgid "register number above 15 required" +msgstr "" + +#: config/tc-avr.c:592 +msgid "even register number required" +msgstr "" + +#: config/tc-avr.c:598 +msgid "register r24, r26, r28 or r30 required" +msgstr "" + +#: config/tc-avr.c:604 +msgid "register name or number from 0 to 31 required" +msgstr "" + +#: config/tc-avr.c:622 +msgid "pointer register (X, Y or Z) required" +msgstr "" + +#: config/tc-avr.c:629 +msgid "cannot both predecrement and postincrement" +msgstr "" + +#: config/tc-avr.c:637 +msgid "addressing mode not supported" +msgstr "" + +#: config/tc-avr.c:643 +msgid "can't predecrement" +msgstr "" + +#: config/tc-avr.c:646 +msgid "pointer register Z required" +msgstr "" + +#: config/tc-avr.c:664 +msgid "pointer register (Y or Z) required" +msgstr "" + +#: config/tc-avr.c:769 +#, c-format +msgid "unknown constraint `%c'" +msgstr "" + +#: config/tc-avr.c:882 config/tc-avr.c:898 config/tc-avr.c:999 +#, c-format +msgid "odd address operand: %ld" +msgstr "" + +#: config/tc-avr.c:890 config/tc-avr.c:909 +#, c-format +msgid "operand out of range: %ld" +msgstr "" + +#: config/tc-avr.c:1008 config/tc-d10v.c:1631 config/tc-d30v.c:1990 +#, c-format +msgid "line %d: unknown relocation type: 0x%x" +msgstr "" + +#: config/tc-avr.c:1022 +msgid "only constant expression allowed" +msgstr "" + +#: config/tc-avr.c:1060 config/tc-d10v.c:1495 config/tc-d30v.c:1807 +#: config/tc-mn10200.c:1254 config/tc-mn10300.c:1810 config/tc-ppc.c:5161 +#: config/tc-v850.c:2301 +#, c-format +msgid "reloc %d not supported by object file format" +msgstr "" + +#: config/tc-avr.c:1084 config/tc-d10v.c:1102 config/tc-d10v.c:1116 +#: config/tc-h8300.c:1239 config/tc-h8500.c:1098 config/tc-mcore.c:988 +#: config/tc-pj.c:265 config/tc-sh.c:1640 config/tc-z8k.c:1195 +msgid "can't find opcode " +msgstr "" + +#: config/tc-avr.c:1101 +#, c-format +msgid "illegal opcode %s for mcu %s" +msgstr "" + +#: config/tc-avr.c:1109 +msgid "garbage at end of line" +msgstr "" + +#: config/tc-avr.c:1173 +msgid "illegal expression" +msgstr "" + +#: config/tc-avr.c:1199 config/tc-avr.c:1265 +msgid "`)' required" +msgstr "" + +#: config/tc-avr.c:1219 +#, c-format +msgid "constant out of 8-bit range: %d" +msgstr "" + +#: config/tc-avr.c:1222 +msgid "expression possibly out of 8-bit range" +msgstr "" + +#: config/tc-avr.c:1293 config/tc-avr.c:1300 +#, c-format +msgid "illegal %srelocation size: %d" +msgstr "" + +#: config/tc-cris.c:672 +#, c-format +msgid "Can't hash `%s': %s\n" +msgstr "" + +#: config/tc-cris.c:673 +msgid "(unknown reason)" +msgstr "" + +#: config/tc-cris.c:677 +#, c-format +msgid "Buggy opcode: `%s' \"%s\"\n" +msgstr "" + +#: config/tc-cris.c:1002 +#, c-format +msgid "Immediate value not in 5 bit unsigned range: %ld" +msgstr "" + +#: config/tc-cris.c:1018 +#, c-format +msgid "Immediate value not in 4 bit unsigned range: %ld" +msgstr "" + +#: config/tc-cris.c:1057 +#, c-format +msgid "Immediate value not in 6 bit range: %ld" +msgstr "" + +#: config/tc-cris.c:1072 +#, c-format +msgid "Immediate value not in 6 bit unsigned range: %ld" +msgstr "" + +#. Others have a generic warning. +#: config/tc-cris.c:1159 +#, c-format +msgid "Unimplemented register `%s' specified" +msgstr "" + +#. We've come to the end of instructions with this +#. opcode, so it must be an error. +#: config/tc-cris.c:1309 +msgid "Illegal operands" +msgstr "" + +#: config/tc-cris.c:1341 config/tc-cris.c:1372 +#, c-format +msgid "Immediate value not in 8 bit range: %ld" +msgstr "" + +#: config/tc-cris.c:1351 config/tc-cris.c:1379 +#, c-format +msgid "Immediate value not in 16 bit range: %ld" +msgstr "" + +#. FIXME: Find out and change to as_warn_where. Add testcase. +#: config/tc-cris.c:2316 +msgid "32-bit conditional branch generated" +msgstr "" + +#. FIXME: Is this function mentioned in the internals.texi manual? If +#. not, add it. +#: config/tc-cris.c:2395 +msgid "Bad call to md_atof () - floating point formats are not supported" +msgstr "" + +#: config/tc-cris.c:2456 +#, c-format +msgid "Value not in 16 bit range: %ld" +msgstr "" + +#: config/tc-cris.c:2466 +#, c-format +msgid "Value not in 8 bit range: %ld" +msgstr "" + +#: config/tc-cris.c:2473 +#, c-format +msgid "Value not in 4 bit unsigned range: %ld" +msgstr "" + +#: config/tc-cris.c:2480 +#, c-format +msgid "Value not in 5 bit unsigned range: %ld" +msgstr "" + +#: config/tc-cris.c:2487 +#, c-format +msgid "Value not in 6 bit range: %ld" +msgstr "" + +#: config/tc-cris.c:2494 +#, c-format +msgid "Value not in 6 bit unsigned range: %ld" +msgstr "" + +#: config/tc-cris.c:2542 +msgid "Please use --help to see usage and options for this assembler.\n" +msgstr "" + +#: config/tc-cris.c:2554 +msgid "--no-underscore is invalid with a.out format" +msgstr "" + +#: config/tc-cris.c:2619 +msgid "" +"Semantics error. This type of operand can not be relocated, it must be an " +"assembly-time constant" +msgstr "" + +#: config/tc-cris.c:2673 +#, c-format +msgid "Cannot generate relocation type for symbol %s, code %s" +msgstr "" + +#: config/tc-cris.c:2686 +msgid "CRIS-specific options:\n" +msgstr "" + +#: config/tc-cris.c:2688 +msgid "" +" -h, -H Don't execute, print this help text. Deprecated.\n" +msgstr "" + +#: config/tc-cris.c:2690 +msgid " -N Warn when branches are expanded to jumps.\n" +msgstr "" + +#: config/tc-cris.c:2692 +msgid "" +" --underscore User symbols are normally prepended with " +"underscore.\n" +msgstr "" + +#: config/tc-cris.c:2694 +msgid " Registers will not need any prefix.\n" +msgstr "" + +#: config/tc-cris.c:2696 +msgid " --no-underscore User symbols do not have any prefix.\n" +msgstr "" + +#: config/tc-cris.c:2698 +msgid " Registers will require a `$'-prefix.\n" +msgstr "" + +#: config/tc-cris.c:2718 +msgid "Invalid relocation" +msgstr "" + +#: config/tc-cris.c:2758 +msgid "Invalid pc-relative relocation" +msgstr "" + +#: config/tc-cris.c:2796 +#, c-format +msgid "Adjusted signed .word (%ld) overflows: `switch'-statement too large." +msgstr "" + +#: config/tc-cris.c:2870 +msgid "Unknown .syntax operand" +msgstr "" + +#: config/tc-d10v.c:246 msgid "" "D10V options:\n" -"-O optimize. Will do some operations in parallel.\n" +"-O Optimize. Will do some operations in parallel.\n" +"--gstabs-packing Pack adjacent short instructions together even\n" +" when --gstabs is specified. On by default.\n" +"--no-gstabs-packing If --gstabs is specified, do not pack adjacent\n" +" instructions together.\n" msgstr "" -#: config/tc-d10v.c:547 config/tc-d10v.c:629 config/tc-d30v.c:652 +#: config/tc-d10v.c:530 config/tc-d30v.c:550 config/tc-mn10200.c:951 +#: config/tc-mn10300.c:1332 config/tc-ppc.c:1972 config/tc-tic80.c:278 +#: config/tc-v850.c:2073 +msgid "illegal operand" +msgstr "" + +#: config/tc-d10v.c:573 config/tc-d10v.c:655 config/tc-d30v.c:656 #, c-format msgid "operand out of range: %d" msgstr "" -#: config/tc-d10v.c:690 +#: config/tc-d10v.c:716 msgid "Instruction must be executed in parallel with another instruction." msgstr "" -#: config/tc-d10v.c:742 +#: config/tc-d10v.c:772 msgid "Instruction must be executed in parallel" msgstr "" -#: config/tc-d10v.c:745 +#: config/tc-d10v.c:775 msgid "Long instructions may not be combined." msgstr "" -#: config/tc-d10v.c:785 +#: config/tc-d10v.c:817 msgid "One of these instructions may not be executed in parallel." msgstr "" -#: config/tc-d10v.c:790 config/tc-d30v.c:860 +#: config/tc-d10v.c:821 config/tc-d30v.c:877 msgid "Two IU instructions may not be executed in parallel" msgstr "" -#: config/tc-d10v.c:792 config/tc-d10v.c:800 config/tc-d10v.c:815 -#: config/tc-d10v.c:828 config/tc-d30v.c:861 config/tc-d30v.c:870 +#: config/tc-d10v.c:823 config/tc-d10v.c:831 config/tc-d10v.c:848 +#: config/tc-d10v.c:865 config/tc-d30v.c:878 config/tc-d30v.c:887 msgid "Swapping instruction order" msgstr "" -#: config/tc-d10v.c:798 config/tc-d30v.c:867 +#: config/tc-d10v.c:829 config/tc-d30v.c:884 msgid "Two MU instructions may not be executed in parallel" msgstr "" -#: config/tc-d10v.c:819 config/tc-d30v.c:886 +#: config/tc-d10v.c:852 config/tc-d30v.c:904 msgid "IU instruction may not be in the left container" msgstr "" -#: config/tc-d10v.c:832 config/tc-d30v.c:899 -msgid "MU instruction may not be in the right container" +#: config/tc-d10v.c:854 config/tc-d10v.c:871 +msgid "" +"Instruction in R container is squashed by flow control instruction in L " +"container." msgstr "" -#: config/tc-d10v.c:836 config/tc-d30v.c:907 -msgid "unknown execution type passed to write_2_short()" +#: config/tc-d10v.c:869 config/tc-d30v.c:915 +msgid "MU instruction may not be in the right container" msgstr "" -#: config/tc-d10v.c:1049 config/tc-d10v.c:1063 config/tc-h8300.c:1279 -#: config/tc-h8500.c:1122 config/tc-mcore.c:989 config/tc-pj.c:274 -#: config/tc-sh.c:1355 config/tc-z8k.c:1223 -msgid "can't find opcode " +#: config/tc-d10v.c:877 config/tc-d30v.c:927 +msgid "unknown execution type passed to write_2_short()" msgstr "" -#: config/tc-d10v.c:1076 config/tc-d10v.c:1094 config/tc-d30v.c:1385 +#: config/tc-d10v.c:1130 config/tc-d10v.c:1151 config/tc-d30v.c:1411 msgid "Unable to mix instructions as specified" msgstr "" -#: config/tc-d10v.c:1142 config/tc-d30v.c:1520 +#: config/tc-d10v.c:1198 config/tc-d30v.c:1548 #, c-format msgid "unknown opcode: %s" msgstr "" -#: config/tc-d10v.c:1223 config/tc-d10v.c:1369 config/tc-tic80.c:537 +#: config/tc-d10v.c:1280 config/tc-d10v.c:1451 config/tc-tic80.c:535 msgid "bad opcode or operands" msgstr "" -#: config/tc-d10v.c:1272 config/tc-m68k.c:4232 +#: config/tc-d10v.c:1353 config/tc-m68k.c:4286 msgid "value out of range" msgstr "" -#: config/tc-d10v.c:1344 +#: config/tc-d10v.c:1426 msgid "illegal operand - register name found where none expected" msgstr "" -#: config/tc-d10v.c:1380 config/tc-tic80.c:548 +#: config/tc-d10v.c:1462 config/tc-tic80.c:546 msgid "Register number must be EVEN" msgstr "" -#: config/tc-d10v.c:1412 config/tc-d30v.c:1772 config/tc-mn10200.c:1233 -#: config/tc-mn10300.c:1761 config/tc-ppc.c:5020 config/tc-v850.c:2255 -#, c-format -msgid "reloc %d not supported by object file format" -msgstr "" - -#: config/tc-d10v.c:1525 +#: config/tc-d10v.c:1611 #, c-format msgid "line %d: rep or repi must include at least 4 instructions" msgstr "" -#: config/tc-d10v.c:1544 config/tc-d30v.c:1953 -#, c-format -msgid "line %d: unknown relocation type: 0x%x" -msgstr "" - -#: config/tc-d30v.c:191 +#: config/tc-d30v.c:192 #, c-format msgid "Register name %s conflicts with symbol of the same name" msgstr "" -#: config/tc-d30v.c:289 +#: config/tc-d30v.c:288 msgid "" "\n" "D30V options:\n" @@ -2185,112 +2520,126 @@ msgid "" "-C Opposite of -C. -c is the default.\n" msgstr "" -#: config/tc-d30v.c:463 +#: config/tc-d30v.c:462 msgid "unexpected 12-bit reloc type" msgstr "" -#: config/tc-d30v.c:470 +#: config/tc-d30v.c:469 msgid "unexpected 18-bit reloc type" msgstr "" -#: config/tc-d30v.c:714 +#: config/tc-d30v.c:720 #, c-format msgid "%s NOP inserted" msgstr "" -#: config/tc-d30v.c:715 +#: config/tc-d30v.c:721 msgid "sequential" msgstr "" -#: config/tc-d30v.c:715 +#: config/tc-d30v.c:721 msgid "parallel" msgstr "" -#: config/tc-d30v.c:856 +#: config/tc-d30v.c:873 msgid "Instructions may not be executed in parallel" msgstr "" -#: config/tc-d30v.c:869 config/tc-d30v.c:876 config/tc-d30v.c:892 -#: config/tc-d30v.c:901 +#: config/tc-d30v.c:886 #, c-format msgid "Executing %s in IU may not work" msgstr "" -#: config/tc-d30v.c:888 +#: config/tc-d30v.c:893 +#, c-format +msgid "Executing %s in IU may not work in parallel execution" +msgstr "" + +#: config/tc-d30v.c:906 #, c-format msgid "special left instruction `%s' kills instruction `%s' in right container" msgstr "" -#: config/tc-d30v.c:1267 config/tc-d30v.c:1284 +#: config/tc-d30v.c:917 +#, c-format +msgid "Executing %s in reverse serial with %s may not work" +msgstr "" + +#: config/tc-d30v.c:920 +#, c-format +msgid "Executing %s in IU in reverse serial may not work" +msgstr "" + +#: config/tc-d30v.c:1290 config/tc-d30v.c:1307 msgid "Cannot assemble instruction" msgstr "" -#: config/tc-d30v.c:1269 +#: config/tc-d30v.c:1292 msgid "First opcode is long. Unable to mix instructions as specified." msgstr "" -#: config/tc-d30v.c:1337 +#: config/tc-d30v.c:1361 msgid "word of NOPs added between word multiply and load" msgstr "" -#: config/tc-d30v.c:1339 +#: config/tc-d30v.c:1363 msgid "word of NOPs added between word multiply and 16-bit multiply" msgstr "" -#: config/tc-d30v.c:1369 +#: config/tc-d30v.c:1395 msgid "Instruction uses long version, so it cannot be mixed as specified" msgstr "" -#: config/tc-d30v.c:1453 config/tc-d30v.c:1490 +#: config/tc-d30v.c:1478 config/tc-d30v.c:1516 #, c-format msgid "unknown condition code: %s" msgstr "" -#: config/tc-d30v.c:1483 +#: config/tc-d30v.c:1509 #, c-format msgid "cmpu doesn't support condition code %s" msgstr "" -#: config/tc-d30v.c:1531 +#: config/tc-d30v.c:1559 #, c-format msgid "operands for opcode `%s' do not match any valid format" msgstr "" -#: config/tc-d30v.c:1744 +#: config/tc-d30v.c:1777 msgid "Odd numbered register used as target of multi-register instruction" msgstr "" -#: config/tc-d30v.c:1842 +#: config/tc-d30v.c:1879 #, c-format msgid "line %d: unable to place address of symbol '%s' into a byte" msgstr "" -#: config/tc-d30v.c:1845 +#: config/tc-d30v.c:1882 #, c-format msgid "line %d: unable to place value %x into a byte" msgstr "" -#: config/tc-d30v.c:1853 +#: config/tc-d30v.c:1890 #, c-format msgid "line %d: unable to place address of symbol '%s' into a short" msgstr "" -#: config/tc-d30v.c:1856 +#: config/tc-d30v.c:1893 #, c-format msgid "line %d: unable to place value %x into a short" msgstr "" -#: config/tc-d30v.c:1864 +#: config/tc-d30v.c:1901 #, c-format msgid "line %d: unable to place address of symbol '%s' into a quad" msgstr "" -#: config/tc-d30v.c:2034 +#: config/tc-d30v.c:2072 #, c-format msgid "value too large to fit in %d bits" msgstr "" -#: config/tc-d30v.c:2178 +#: config/tc-d30v.c:2215 #, c-format msgid "Alignment too large: %d assumed" msgstr "" @@ -2304,984 +2653,1144 @@ msgstr "" msgid "Instruction %s not allowed in a delay slot." msgstr "" -#: config/tc-fr30.c:380 config/tc-m32r.c:1537 +#: config/tc-fr30.c:380 config/tc-m32r.c:1555 msgid "Addend to unresolved symbol not on word boundary." msgstr "" -#: config/tc-fr30.c:538 config/tc-i960.c:786 config/tc-m32r.c:1844 +#: config/tc-fr30.c:538 config/tc-i960.c:772 config/tc-m32r.c:1864 msgid "Bad call to md_atof()" msgstr "" -#: config/tc-h8300.c:254 config/tc-h8300.c:262 +#: config/tc-h8300.c:245 config/tc-h8300.c:253 msgid "Reg not valid for H8/300" msgstr "" -#: config/tc-h8300.c:423 config/tc-h8300.c:426 config/tc-h8300.c:429 -#: config/tc-h8300.c:433 +#: config/tc-h8300.c:413 config/tc-h8300.c:416 config/tc-h8300.c:419 +#: config/tc-h8300.c:423 msgid "Invalid register list for ldm/stm\n" msgstr "" -#: config/tc-h8300.c:490 config/tc-h8300.c:553 config/tc-h8300.c:560 +#: config/tc-h8300.c:475 config/tc-h8300.c:537 config/tc-h8300.c:544 msgid "Wrong size pointer register for architecture." msgstr "" -#: config/tc-h8300.c:518 config/tc-h8300.c:527 config/tc-h8300.c:537 +#: config/tc-h8300.c:502 config/tc-h8300.c:511 config/tc-h8300.c:521 msgid "expected @(exp, reg16)" msgstr "" -#: config/tc-h8300.c:617 +#: config/tc-h8300.c:600 msgid "expect :8 or :16 here" msgstr "" -#: config/tc-h8300.c:823 +#: config/tc-h8300.c:801 #, c-format msgid "operand %s0x%lx out of range." msgstr "" -#: config/tc-h8300.c:910 +#: config/tc-h8300.c:889 msgid "Can't work out size of operand.\n" msgstr "" -#: config/tc-h8300.c:964 +#: config/tc-h8300.c:937 #, c-format msgid "Opcode `%s' with these operand types not available in H8/300 mode" msgstr "" -#: config/tc-h8300.c:1016 config/tc-h8300.c:1036 +#: config/tc-h8300.c:988 config/tc-h8300.c:1008 msgid "Need #1 or #2 here" msgstr "" -#: config/tc-h8300.c:1031 +#: config/tc-h8300.c:1003 msgid "#4 not valid on H8/300." msgstr "" -#: config/tc-h8300.c:1112 config/tc-h8300.c:1150 +#: config/tc-h8300.c:1089 config/tc-h8300.c:1121 #, c-format msgid "branch operand has odd offset (%lx)\n" msgstr "" -#: config/tc-h8300.c:1191 +#: config/tc-h8300.c:1159 msgid "destination operand must be 16 bit register" msgstr "" -#: config/tc-h8300.c:1201 +#: config/tc-h8300.c:1168 msgid "source operand must be 8 bit register" msgstr "" -#: config/tc-h8300.c:1209 +#: config/tc-h8300.c:1176 msgid "destination operand must be 16bit absolute address" msgstr "" -#: config/tc-h8300.c:1216 +#: config/tc-h8300.c:1183 msgid "destination operand must be 8 bit register" msgstr "" -#: config/tc-h8300.c:1225 +#: config/tc-h8300.c:1191 msgid "source operand must be 16bit absolute address" msgstr "" -#: config/tc-h8300.c:1233 +#: config/tc-h8300.c:1199 msgid "invalid operands" msgstr "" -#: config/tc-h8300.c:1290 config/tc-h8500.c:1129 config/tc-mips.c:7966 -#: config/tc-sh.c:1584 config/tc-w65.c:759 config/tc-z8k.c:1235 +#: config/tc-h8300.c:1250 config/tc-h8500.c:1104 config/tc-mips.c:7984 +#: config/tc-sh.c:1877 config/tc-w65.c:740 config/tc-z8k.c:1205 msgid "unknown opcode" msgstr "" -#: config/tc-h8300.c:1336 +#: config/tc-h8300.c:1296 msgid "mismatch between opcode size and operand size" msgstr "" -#: config/tc-h8300.c:1348 config/tc-h8500.c:1157 config/tc-sh.c:1698 -#: config/tc-w65.c:791 config/tc-z8k.c:1290 +#: config/tc-h8300.c:1307 config/tc-h8500.c:1131 config/tc-sh.c:2013 +#: config/tc-w65.c:770 config/tc-z8k.c:1258 msgid "call to tc_crawl_symbol_chain \n" msgstr "" -#: config/tc-h8300.c:1362 config/tc-h8500.c:1171 config/tc-sh.c:1705 -#: config/tc-w65.c:805 config/tc-z8k.c:1304 +#: config/tc-h8300.c:1321 config/tc-h8500.c:1145 config/tc-sh.c:2020 +#: config/tc-w65.c:784 config/tc-z8k.c:1272 msgid "call to tc_headers_hook \n" msgstr "" -#: config/tc-h8300.c:1451 config/tc-h8500.c:1260 config/tc-z8k.c:1415 +#: config/tc-h8300.c:1412 config/tc-h8500.c:1235 config/tc-z8k.c:1386 msgid "call to tc_aout_fix_to_chars \n" msgstr "" -#: config/tc-h8300.c:1461 config/tc-z8k.c:1425 +#: config/tc-h8300.c:1422 config/tc-z8k.c:1396 msgid "call to md_convert_frag \n" msgstr "" -#: config/tc-h8300.c:1506 config/tc-z8k.c:1500 +#: config/tc-h8300.c:1467 config/tc-z8k.c:1477 msgid "call tomd_estimate_size_before_relax \n" msgstr "" -#: config/tc-h8500.c:337 +#: config/tc-h8500.c:333 msgid ":24 not valid for this opcode" msgstr "" -#: config/tc-h8500.c:344 +#: config/tc-h8500.c:340 msgid "expect :8,:16 or :24" msgstr "" -#: config/tc-h8500.c:401 +#: config/tc-h8500.c:397 msgid "syntax error in reg list" msgstr "" -#: config/tc-h8500.c:419 +#: config/tc-h8500.c:415 msgid "missing final register in range" msgstr "" -#: config/tc-h8500.c:506 config/tc-h8500.c:513 config/tc-h8500.c:519 +#: config/tc-h8500.c:502 config/tc-h8500.c:509 config/tc-h8500.c:515 msgid "expected @(exp, Rn)" msgstr "" -#: config/tc-h8500.c:535 +#: config/tc-h8500.c:531 msgid "@Rn+ needs word register" msgstr "" -#: config/tc-h8500.c:545 +#: config/tc-h8500.c:541 msgid "@Rn needs word register" msgstr "" -#: config/tc-h8500.c:845 config/tc-sh.c:1149 +#: config/tc-h8500.c:838 config/tc-sh.c:1357 #, c-format msgid "unhandled %d\n" msgstr "" -#: config/tc-h8500.c:873 config/tc-sh.c:1173 +#: config/tc-h8500.c:866 config/tc-sh.c:1382 #, c-format msgid "operand must be absolute in range %d..%d" msgstr "" -#: config/tc-h8500.c:963 config/tc-sh.c:1299 +#: config/tc-h8500.c:955 config/tc-sh.c:1580 #, c-format msgid "failed for %d\n" msgstr "" -#: config/tc-h8500.c:1145 config/tc-sh.c:1394 config/tc-sh.c:1632 -#: config/tc-w65.c:779 +#: config/tc-h8500.c:1120 config/tc-sh.c:1681 config/tc-sh.c:1926 +#: config/tc-w65.c:759 msgid "invalid operands for opcode" msgstr "" -#: config/tc-hppa.c:1140 +#. Simple range checking for FIELD againt HIGH and LOW bounds. +#. IGNORE is used to suppress the error message. +#: config/tc-hppa.c:1119 +#, c-format +msgid "Field out of range [%d..%d] (%d)." +msgstr "" + +#. Simple alignment checking for FIELD againt ALIGN (a power of two). +#. IGNORE is used to suppress the error message. +#: config/tc-hppa.c:1133 +#, c-format +msgid "Field not properly aligned [%d] (%d)." +msgstr "" + +#: config/tc-hppa.c:1162 msgid "Missing .exit\n" msgstr "" -#: config/tc-hppa.c:1143 +#: config/tc-hppa.c:1165 msgid "Missing .procend\n" msgstr "" -#: config/tc-hppa.c:1322 +#: config/tc-hppa.c:1345 msgid "Invalid field selector. Assuming F%%." msgstr "" -#: config/tc-hppa.c:1353 +#: config/tc-hppa.c:1372 config/tc-hppa.c:6839 config/tc-hppa.c:6845 +#: config/tc-hppa.c:6851 config/tc-hppa.c:6857 config/tc-mn10300.c:924 +#: config/tc-mn10300.c:2133 +msgid "could not set architecture and machine" +msgstr "" + +#: config/tc-hppa.c:1378 msgid "-R option not supported on this target." msgstr "" -#: config/tc-hppa.c:1369 config/tc-sparc.c:746 config/tc-sparc.c:781 +#: config/tc-hppa.c:1394 config/tc-sparc.c:802 config/tc-sparc.c:838 #, c-format msgid "Internal error: can't hash `%s': %s\n" msgstr "" -#: config/tc-hppa.c:1377 config/tc-i860.c:191 +#: config/tc-hppa.c:1402 config/tc-i860.c:190 #, c-format msgid "internal error: losing opcode: `%s' \"%s\"\n" msgstr "" -#: config/tc-hppa.c:1446 config/tc-hppa.c:6873 config/tc-hppa.c:6928 +#: config/tc-hppa.c:1471 config/tc-hppa.c:6978 config/tc-hppa.c:7033 msgid "Missing function name for .PROC (corrupted label chain)" msgstr "" -#: config/tc-hppa.c:1449 config/tc-hppa.c:6931 +#: config/tc-hppa.c:1474 config/tc-hppa.c:7036 msgid "Missing function name for .PROC" msgstr "" -#: config/tc-hppa.c:1570 config/tc-hppa.c:4715 +#: config/tc-hppa.c:1582 config/tc-hppa.c:4812 msgid "could not update architecture and machine" msgstr "" -#: config/tc-hppa.c:1783 +#: config/tc-hppa.c:1789 msgid "Invalid Indexed Load Completer." msgstr "" -#: config/tc-hppa.c:1788 +#: config/tc-hppa.c:1794 msgid "Invalid Indexed Load Completer Syntax." msgstr "" -#: config/tc-hppa.c:1824 +#: config/tc-hppa.c:1830 msgid "Invalid Short Load/Store Completer." msgstr "" -#: config/tc-hppa.c:1883 config/tc-hppa.c:1888 +#: config/tc-hppa.c:1889 config/tc-hppa.c:1894 msgid "Invalid Store Bytes Short Completer" msgstr "" -#: config/tc-hppa.c:2199 config/tc-hppa.c:2205 +#: config/tc-hppa.c:2205 config/tc-hppa.c:2211 msgid "Invalid left/right combination completer" msgstr "" -#: config/tc-hppa.c:2254 config/tc-hppa.c:2261 +#: config/tc-hppa.c:2260 config/tc-hppa.c:2267 msgid "Invalid permutation completer" msgstr "" -#: config/tc-hppa.c:2362 +#: config/tc-hppa.c:2368 #, c-format msgid "Invalid Add Condition: %s" msgstr "" -#: config/tc-hppa.c:2373 config/tc-hppa.c:2383 +#: config/tc-hppa.c:2379 config/tc-hppa.c:2389 #, c-format msgid "Invalid Add and Branch Condition: %c" msgstr "" -#: config/tc-hppa.c:2404 +#: config/tc-hppa.c:2410 msgid "Invalid Compare/Subtract Condition" msgstr "" -#: config/tc-hppa.c:2444 +#: config/tc-hppa.c:2450 #, c-format msgid "Invalid Bit Branch Condition: %c" msgstr "" -#: config/tc-hppa.c:2530 +#: config/tc-hppa.c:2536 #, c-format msgid "Invalid Compare/Subtract Condition: %s" msgstr "" -#: config/tc-hppa.c:2542 +#: config/tc-hppa.c:2548 #, c-format msgid "Invalid Compare/Subtract Condition: %c" msgstr "" -#: config/tc-hppa.c:2557 +#: config/tc-hppa.c:2563 msgid "Invalid Compare and Branch Condition." msgstr "" -#: config/tc-hppa.c:2655 +#: config/tc-hppa.c:2659 msgid "Invalid Logical Instruction Condition." msgstr "" -#: config/tc-hppa.c:2711 +#: config/tc-hppa.c:2714 msgid "Invalid Shift/Extract/Deposit Condition." msgstr "" -#: config/tc-hppa.c:2823 +#: config/tc-hppa.c:2826 msgid "Invalid Unit Instruction Condition." msgstr "" -#: config/tc-hppa.c:3096 config/tc-hppa.c:3129 config/tc-hppa.c:3166 -#: config/tc-hppa.c:3205 +#: config/tc-hppa.c:3174 config/tc-hppa.c:3205 config/tc-hppa.c:3238 +#: config/tc-hppa.c:3270 msgid "Branch to unaligned address" msgstr "" -#: config/tc-hppa.c:3389 +#: config/tc-hppa.c:3450 msgid "Invalid SFU identifier" msgstr "" -#: config/tc-hppa.c:3439 +#: config/tc-hppa.c:3500 msgid "Invalid COPR identifier" msgstr "" -#: config/tc-hppa.c:3568 +#: config/tc-hppa.c:3629 msgid "Invalid Floating Point Operand Format." msgstr "" -#: config/tc-hppa.c:3706 config/tc-hppa.c:3730 config/tc-hppa.c:3753 -#: config/tc-hppa.c:3776 config/tc-hppa.c:3799 +#: config/tc-hppa.c:3746 config/tc-hppa.c:3766 config/tc-hppa.c:3786 +#: config/tc-hppa.c:3806 config/tc-hppa.c:3826 msgid "Invalid register for single precision fmpyadd or fmpysub" msgstr "" -#: config/tc-hppa.c:3848 +#: config/tc-hppa.c:3883 #, c-format msgid "Invalid operands %s" msgstr "" -#: config/tc-hppa.c:4415 -msgid "Unknown relocation encountered in md_apply_fix." +#: config/tc-hppa.c:4001 +#, c-format +msgid "Cannot handle fixup at %s:%d" +msgstr "" + +#: config/tc-hppa.c:4296 +msgid " -Q ignored\n" +msgstr "" + +#: config/tc-hppa.c:4300 +msgid " -c print a warning if a comment is found\n" msgstr "" -#: config/tc-hppa.c:4425 +#: config/tc-hppa.c:4366 #, c-format -msgid "no hppa_fixup entry for this fixup (fixP = 0x%x, type = 0x%x)\n" +msgid "no hppa_fixup entry for fixup type 0x%x at %s:%d" msgstr "" -#: config/tc-hppa.c:4567 config/tc-hppa.c:4592 +#: config/tc-hppa.c:4533 +msgid "Unknown relocation encountered in md_apply_fix." +msgstr "" + +#: config/tc-hppa.c:4676 config/tc-hppa.c:4701 #, c-format msgid "Undefined register: '%s'." msgstr "" -#: config/tc-hppa.c:4630 +#: config/tc-hppa.c:4735 #, c-format msgid "Non-absolute symbol: '%s'." msgstr "" -#: config/tc-hppa.c:4645 +#: config/tc-hppa.c:4750 #, c-format msgid "Undefined absolute constant: '%s'." msgstr "" -#: config/tc-hppa.c:4754 +#: config/tc-hppa.c:4851 #, c-format msgid "Invalid FP Compare Condition: %s" msgstr "" -#: config/tc-hppa.c:4810 +#: config/tc-hppa.c:4907 #, c-format msgid "Invalid FTEST completer: %s" msgstr "" -#: config/tc-hppa.c:4877 config/tc-hppa.c:4915 +#: config/tc-hppa.c:4974 config/tc-hppa.c:5012 #, c-format msgid "Invalid FP Operand Format: %3s" msgstr "" -#: config/tc-hppa.c:4994 +#: config/tc-hppa.c:5091 msgid "Bad segment in expression." msgstr "" -#: config/tc-hppa.c:5053 +#: config/tc-hppa.c:5150 msgid "Bad segment (should be absolute)." msgstr "" -#: config/tc-hppa.c:5152 +#: config/tc-hppa.c:5193 #, c-format msgid "Invalid argument location: %s\n" msgstr "" -#: config/tc-hppa.c:5183 +#: config/tc-hppa.c:5224 #, c-format msgid "Invalid argument description: %d" msgstr "" -#: config/tc-hppa.c:5206 +#: config/tc-hppa.c:5247 #, c-format msgid "Invalid Nullification: (%c)" msgstr "" -#: config/tc-hppa.c:5950 +#: config/tc-hppa.c:5983 #, c-format msgid "Invalid .CALL argument: %s" msgstr "" -#: config/tc-hppa.c:6082 +#: config/tc-hppa.c:6114 msgid ".callinfo is not within a procedure definition" msgstr "" -#: config/tc-hppa.c:6102 +#: config/tc-hppa.c:6134 #, c-format msgid "FRAME parameter must be a multiple of 8: %d\n" msgstr "" -#: config/tc-hppa.c:6121 +#: config/tc-hppa.c:6153 msgid "Value for ENTRY_GR must be in the range 3..18\n" msgstr "" -#: config/tc-hppa.c:6133 +#: config/tc-hppa.c:6165 msgid "Value for ENTRY_FR must be in the range 12..21\n" msgstr "" -#: config/tc-hppa.c:6143 +#: config/tc-hppa.c:6175 msgid "Value for ENTRY_SR must be 3\n" msgstr "" -#: config/tc-hppa.c:6199 +#: config/tc-hppa.c:6231 #, c-format msgid "Invalid .CALLINFO argument: %s" msgstr "" -#: config/tc-hppa.c:6293 +#: config/tc-hppa.c:6342 msgid "The .ENTER pseudo-op is not supported" msgstr "" -#: config/tc-hppa.c:6309 +#: config/tc-hppa.c:6358 msgid "Misplaced .entry. Ignored." msgstr "" -#: config/tc-hppa.c:6313 +#: config/tc-hppa.c:6362 msgid "Missing .callinfo." msgstr "" -#: config/tc-hppa.c:6361 +#: config/tc-hppa.c:6426 +msgid ".REG expression must be a register" +msgstr "" + +#: config/tc-hppa.c:6442 read.c:4728 +msgid "bad or irreducible absolute expression; zero assumed" +msgstr "" + +#: config/tc-hppa.c:6453 msgid ".REG must use a label" msgstr "" -#: config/tc-hppa.c:6363 +#: config/tc-hppa.c:6455 msgid ".EQU must use a label" msgstr "" -#: config/tc-hppa.c:6416 +#: config/tc-hppa.c:6508 msgid ".EXIT must appear within a procedure" msgstr "" -#: config/tc-hppa.c:6420 +#: config/tc-hppa.c:6512 msgid "Missing .callinfo" msgstr "" -#: config/tc-hppa.c:6424 +#: config/tc-hppa.c:6516 msgid "No .ENTRY for this .EXIT" msgstr "" -#: config/tc-hppa.c:6451 +#: config/tc-hppa.c:6543 #, c-format msgid "Cannot define export symbol: %s\n" msgstr "" -#: config/tc-hppa.c:6504 +#: config/tc-hppa.c:6601 #, c-format msgid "Using ENTRY rather than CODE in export directive for %s" msgstr "" -#: config/tc-hppa.c:6613 +#: config/tc-hppa.c:6718 #, c-format msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s" msgstr "" -#: config/tc-hppa.c:6695 +#: config/tc-hppa.c:6800 msgid "Missing label name on .LABEL" msgstr "" -#: config/tc-hppa.c:6700 +#: config/tc-hppa.c:6805 msgid "extra .LABEL arguments ignored." msgstr "" -#: config/tc-hppa.c:6717 +#: config/tc-hppa.c:6822 msgid "The .LEAVE pseudo-op is not supported" msgstr "" -#: config/tc-hppa.c:6756 +#: config/tc-hppa.c:6861 msgid "Unrecognized .LEVEL argument\n" msgstr "" -#: config/tc-hppa.c:6792 +#: config/tc-hppa.c:6897 #, c-format msgid "Cannot define static symbol: %s\n" msgstr "" -#: config/tc-hppa.c:6827 +#: config/tc-hppa.c:6932 msgid "Nested procedures" msgstr "" -#: config/tc-hppa.c:6837 +#: config/tc-hppa.c:6942 msgid "Cannot allocate unwind descriptor\n" msgstr "" -#: config/tc-hppa.c:6935 +#: config/tc-hppa.c:7040 msgid "misplaced .procend" msgstr "" -#: config/tc-hppa.c:6938 +#: config/tc-hppa.c:7043 msgid "Missing .callinfo for this procedure" msgstr "" -#: config/tc-hppa.c:6941 +#: config/tc-hppa.c:7046 msgid "Missing .EXIT for a .ENTRY" msgstr "" -#: config/tc-hppa.c:6980 +#: config/tc-hppa.c:7084 msgid "Not in a space.\n" msgstr "" -#: config/tc-hppa.c:6983 +#: config/tc-hppa.c:7087 msgid "Not in a subspace.\n" msgstr "" -#: config/tc-hppa.c:7073 +#: config/tc-hppa.c:7178 msgid "Invalid .SPACE argument" msgstr "" -#: config/tc-hppa.c:7121 +#: config/tc-hppa.c:7225 msgid "Can't change spaces within a procedure definition. Ignored" msgstr "" -#: config/tc-hppa.c:7248 +#: config/tc-hppa.c:7354 #, c-format msgid "Undefined space: '%s' Assuming space number = 0." msgstr "" -#: config/tc-hppa.c:7272 +#: config/tc-hppa.c:7378 msgid "Must be in a space before changing or declaring subspaces.\n" msgstr "" -#: config/tc-hppa.c:7276 +#: config/tc-hppa.c:7382 msgid "Can't change subspaces within a procedure definition. Ignored" msgstr "" -#: config/tc-hppa.c:7311 +#: config/tc-hppa.c:7417 msgid "Parameters of an existing subspace can't be modified" msgstr "" -#: config/tc-hppa.c:7362 +#: config/tc-hppa.c:7468 msgid "Alignment must be a power of 2" msgstr "" -#: config/tc-hppa.c:7404 +#: config/tc-hppa.c:7510 msgid "FIRST not supported as a .SUBSPACE argument" msgstr "" -#: config/tc-hppa.c:7406 +#: config/tc-hppa.c:7512 msgid "Invalid .SUBSPACE argument" msgstr "" -#: config/tc-hppa.c:7589 +#: config/tc-hppa.c:7692 #, c-format msgid "Internal error: Unable to find containing space for %s." msgstr "" -#: config/tc-hppa.c:7630 +#: config/tc-hppa.c:7731 #, c-format msgid "Out of memory: could not allocate new space chain entry: %s\n" msgstr "" -#: config/tc-hppa.c:7716 +#: config/tc-hppa.c:7817 #, c-format msgid "Out of memory: could not allocate new subspace chain entry: %s\n" msgstr "" -#: config/tc-hppa.c:8383 +#: config/tc-hppa.c:8511 #, c-format msgid "Symbol '%s' could not be created." msgstr "" -#: config/tc-hppa.c:8387 +#: config/tc-hppa.c:8515 msgid "No memory for symbol name." msgstr "" -#: config/tc-i386.c:509 +#: config/tc-i386.c:581 +#, c-format +msgid "%s shortened to %s" +msgstr "" + +#: config/tc-i386.c:636 msgid "same type of prefix used twice" msgstr "" -#: config/tc-i386.c:552 +#: config/tc-i386.c:654 +msgid "64bit mode not supported on this CPU." +msgstr "" + +#: config/tc-i386.c:658 +msgid "32bit mode not supported on this CPU." +msgstr "" + +#: config/tc-i386.c:691 msgid "bad argument to syntax directive." msgstr "" -#: config/tc-i386.c:636 config/tc-m68k.c:3750 +#: config/tc-i386.c:734 +#, c-format +msgid "no such architecture: `%s'" +msgstr "" + +#: config/tc-i386.c:739 +msgid "missing cpu architecture" +msgstr "" + +#: config/tc-i386.c:812 config/tc-i386.c:835 config/tc-m68k.c:3802 #, c-format msgid "Internal Error: Can't hash %s: %s" msgstr "" -#: config/tc-i386.c:866 -msgid "Unknown" +#: config/tc-i386.c:1088 +msgid "There are no unsigned pc-relative relocations" msgstr "" -#: config/tc-i386.c:914 config/tc-i386.c:4407 +#: config/tc-i386.c:1095 config/tc-i386.c:4622 #, c-format msgid "can not do %d byte pc-relative relocation" msgstr "" -#: config/tc-i386.c:924 config/tc-i386.c:4421 +#: config/tc-i386.c:1112 #, c-format -msgid "can not do %d byte relocation" +msgid "can not do %s %d byte relocation" msgstr "" -#: config/tc-i386.c:1030 config/tc-i386.c:1113 +#: config/tc-i386.c:1221 config/tc-i386.c:1314 #, c-format -msgid "no such 386 instruction: `%s'" +msgid "no such instruction: `%s'" msgstr "" -#: config/tc-i386.c:1039 +#: config/tc-i386.c:1230 #, c-format msgid "invalid character %s in mnemonic" msgstr "" -#: config/tc-i386.c:1046 +#: config/tc-i386.c:1237 msgid "expecting prefix; got nothing" msgstr "" -#: config/tc-i386.c:1048 +#: config/tc-i386.c:1239 msgid "expecting mnemonic; got nothing" msgstr "" -#: config/tc-i386.c:1066 +#: config/tc-i386.c:1257 #, c-format msgid "redundant %s prefix" msgstr "" -#: config/tc-i386.c:1122 +#: config/tc-i386.c:1325 +#, c-format +msgid "`%s' is not supported on `%s'" +msgstr "" + +#: config/tc-i386.c:1330 +msgid "use .code16 to ensure correct addressing mode" +msgstr "" + +#: config/tc-i386.c:1338 #, c-format msgid "expecting string instruction after `%s'" msgstr "" -#: config/tc-i386.c:1145 +#: config/tc-i386.c:1359 #, c-format msgid "invalid character %s before operand %d" msgstr "" -#: config/tc-i386.c:1159 +#: config/tc-i386.c:1373 #, c-format msgid "unbalanced parenthesis in operand %d." msgstr "" -#: config/tc-i386.c:1162 +#: config/tc-i386.c:1376 #, c-format msgid "unbalanced brackets in operand %d." msgstr "" -#: config/tc-i386.c:1171 +#: config/tc-i386.c:1385 #, c-format msgid "invalid character %s in operand %d" msgstr "" -#: config/tc-i386.c:1198 +#: config/tc-i386.c:1412 #, c-format msgid "spurious operands; (%d operands/instruction max)" msgstr "" -#: config/tc-i386.c:1219 +#: config/tc-i386.c:1435 msgid "expecting operand after ','; got nothing" msgstr "" -#: config/tc-i386.c:1224 +#: config/tc-i386.c:1440 msgid "expecting operand before ','; got nothing" msgstr "" -#. we found no match -#: config/tc-i386.c:1464 +#. We found no match. +#: config/tc-i386.c:1782 #, c-format msgid "suffix or operands invalid for `%s'" msgstr "" -#: config/tc-i386.c:1472 +#: config/tc-i386.c:1793 #, c-format msgid "indirect %s without `*'" msgstr "" -#. Warn them that a data or address size prefix doesn't affect -#. assembly of the next line of code. -#: config/tc-i386.c:1479 +#. Warn them that a data or address size prefix doesn't +#. affect assembly of the next line of code. +#: config/tc-i386.c:1801 #, c-format msgid "stand-alone `%s' prefix" msgstr "" -#: config/tc-i386.c:1514 config/tc-i386.c:1529 +#: config/tc-i386.c:1837 config/tc-i386.c:1852 msgid "`%s' operand %d must use `%%es' segment" msgstr "" -#: config/tc-i386.c:1596 config/tc-i386.c:1637 config/tc-i386.c:1664 +#: config/tc-i386.c:1867 +msgid "Extended register `%%%s' available only in 64bit mode." +msgstr "" + +#. Prohibit these changes in the 64bit mode, since +#. the lowering is more complicated. +#: config/tc-i386.c:1938 config/tc-i386.c:1989 config/tc-i386.c:2004 +#: config/tc-i386.c:2032 config/tc-i386.c:2060 +msgid "Incorrect register `%%%s' used with`%c' suffix" +msgstr "" + +#: config/tc-i386.c:1944 config/tc-i386.c:1994 config/tc-i386.c:2065 msgid "using `%%%s' instead of `%%%s' due to `%c' suffix" msgstr "" -#: config/tc-i386.c:1609 config/tc-i386.c:1626 config/tc-i386.c:1653 +#: config/tc-i386.c:1957 config/tc-i386.c:1975 config/tc-i386.c:2019 +#: config/tc-i386.c:2046 msgid "`%%%s' not allowed with `%s%c'" msgstr "" -#: config/tc-i386.c:1697 config/tc-i386.c:1717 +#: config/tc-i386.c:2106 msgid "no instruction mnemonic suffix given; can't determine immediate size" msgstr "" -#: config/tc-i386.c:1742 +#: config/tc-i386.c:2132 +#, c-format +msgid "" +"no instruction mnemonic suffix given; can't determine immediate size %x %c" +msgstr "" + +#: config/tc-i386.c:2157 msgid "" "no instruction mnemonic suffix given and no register operands; can't size " "instruction" msgstr "" -#. reversed arguments on faddp, fsubp, etc. -#: config/tc-i386.c:1844 +#: config/tc-i386.c:2205 +msgid "64bit operations available only in 64bit modes." +msgstr "" + +#. Reversed arguments on faddp, fsubp, etc. +#: config/tc-i386.c:2273 msgid "translating to `%s %%%s,%%%s'" msgstr "" -#. extraneous `l' suffix on fp insn -#: config/tc-i386.c:1851 +#. Extraneous `l' suffix on fp insn. +#: config/tc-i386.c:2280 msgid "translating to `%s %%%s'" msgstr "" -#: config/tc-i386.c:2066 +#: config/tc-i386.c:2551 msgid "you can't `pop %%cs'" msgstr "" #. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. -#: config/tc-i386.c:2097 +#: config/tc-i386.c:2584 #, c-format msgid "translating to `%sp'" msgstr "" -#: config/tc-i386.c:2146 config/tc-i386.c:2208 config/tc-i386.c:2250 +#: config/tc-i386.c:2627 +msgid "" +"Can't encode registers '%%%s' in the instruction requiring REX prefix.\n" +msgstr "" + +#: config/tc-i386.c:2679 config/tc-i386.c:2751 config/tc-i386.c:2798 msgid "skipping prefixes on this instruction" msgstr "" -#: config/tc-i386.c:2265 +#: config/tc-i386.c:2819 msgid "16-bit jump out of range" msgstr "" -#: config/tc-i386.c:2274 +#: config/tc-i386.c:2828 #, c-format msgid "can't handle non absolute segment in `%s'" msgstr "" -#: config/tc-i386.c:2382 config/tc-i386.c:2432 -#, c-format -msgid "%ld shortened to %ld" -msgstr "" - -#: config/tc-i386.c:2502 +#: config/tc-i386.c:3085 msgid "only 1 or 2 immediate operands are allowed" msgstr "" -#: config/tc-i386.c:2534 config/tc-i386.c:2755 +#: config/tc-i386.c:3115 config/tc-i386.c:3353 msgid "GOT relocations not supported in 16 bit mode" msgstr "" -#: config/tc-i386.c:2555 config/tc-i386.c:2776 +#: config/tc-i386.c:3152 config/tc-i386.c:3389 msgid "bad reloc specifier in expression" msgstr "" -#: config/tc-i386.c:2573 config/tc-i386.c:2810 +#: config/tc-i386.c:3170 config/tc-i386.c:3424 #, c-format msgid "ignoring junk `%s' after expression" msgstr "" -#. missing or bad expr becomes absolute 0 -#: config/tc-i386.c:2580 +#. Missing or bad expr becomes absolute 0. +#: config/tc-i386.c:3177 #, c-format msgid "missing or invalid immediate expression `%s' taken as 0" msgstr "" -#: config/tc-i386.c:2607 config/tc-i386.c:2853 +#: config/tc-i386.c:3208 config/tc-i386.c:3454 #, c-format msgid "unimplemented segment %s in operand" msgstr "" -#: config/tc-i386.c:2609 config/tc-i386.c:2855 +#: config/tc-i386.c:3210 config/tc-i386.c:3456 #, c-format msgid "unimplemented segment type %d in operand" msgstr "" -#: config/tc-i386.c:2653 +#: config/tc-i386.c:3252 config/tc-i386.c:5392 #, c-format msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'" msgstr "" -#: config/tc-i386.c:2659 +#: config/tc-i386.c:3258 #, c-format msgid "scale factor of %d without an index register" msgstr "" -#. missing or bad expr becomes absolute 0 -#: config/tc-i386.c:2821 +#. Missing or bad expr becomes absolute 0. +#: config/tc-i386.c:3435 #, c-format msgid "missing or invalid displacement expression `%s' taken as 0" msgstr "" -#: config/tc-i386.c:3035 config/tc-i386.c:3041 config/tc-i386.c:3050 -#, c-format -msgid "bad segment name `%s'" -msgstr "" - -#: config/tc-i386.c:3108 +#: config/tc-i386.c:3541 #, c-format msgid "`%s' is not a valid base/index expression" msgstr "" -#: config/tc-i386.c:3112 +#: config/tc-i386.c:3545 #, c-format msgid "`%s' is not a valid %s bit base/index expression" msgstr "" -#: config/tc-i386.c:3133 config/tc-i386.c:3487 +#: config/tc-i386.c:3620 #, c-format -msgid "too many memory references for `%s'" +msgid "bad memory operand `%s'" msgstr "" -#: config/tc-i386.c:3219 config/tc-i386.c:3354 config/tc-i386.c:3457 -#: config/tc-i386.c:3572 config/tc-i386.c:3608 +#: config/tc-i386.c:3635 #, c-format -msgid "bad register name `%s'" +msgid "junk `%s' after register" msgstr "" -#: config/tc-i386.c:3433 +#: config/tc-i386.c:3644 config/tc-i386.c:3759 config/tc-i386.c:3795 #, c-format -msgid "bad memory operand `%s'" +msgid "bad register name `%s'" msgstr "" -#: config/tc-i386.c:3448 -#, c-format -msgid "junk `%s' after register" +#: config/tc-i386.c:3652 +msgid "immediate operand illegal with absolute jump" msgstr "" -#: config/tc-i386.c:3465 -msgid "immediate operand illegal with absolute jump" +#: config/tc-i386.c:3674 +#, c-format +msgid "too many memory references for `%s'" msgstr "" -#: config/tc-i386.c:3565 +#: config/tc-i386.c:3752 #, c-format msgid "expecting `,' or `)' after index register in `%s'" msgstr "" -#: config/tc-i386.c:3587 +#: config/tc-i386.c:3774 #, c-format msgid "expecting `)' after scale factor in `%s'" msgstr "" -#: config/tc-i386.c:3594 +#: config/tc-i386.c:3781 #, c-format msgid "expecting index register or scale factor after `,'; got '%c'" msgstr "" -#: config/tc-i386.c:3601 +#: config/tc-i386.c:3788 #, c-format msgid "expecting `,' or `)' after base register in `%s'" msgstr "" -#. it's not a memory operand; argh! -#: config/tc-i386.c:3641 +#. It's not a memory operand; argh! +#: config/tc-i386.c:3829 #, c-format msgid "invalid char %s beginning operand %d `%s'" msgstr "" -#: config/tc-i386.c:4099 +#: config/tc-i386.c:4267 msgid "Bad call to md_atof ()" msgstr "" -#: config/tc-i386.c:4250 -msgid " -m\t\t\t do long jump\n" +#: config/tc-i386.c:4431 config/tc-sparc.c:548 +#, c-format +msgid "No compiled in support for %d bit object file format" msgstr "" -#: config/tc-i386.c:4253 +#: config/tc-i386.c:4449 msgid "" -" -V\t\t\t print assembler version number\n" -" -k\t\t\t ignored\n" -" -Qy, -Qn\t\t ignored\n" -" -q\t\t\t ignored\n" -" -s\t\t\t ignored\n" +" -Q ignored\n" +" -V print assembler version number\n" +" -k ignored\n" +" -q quieten some warnings\n" +" -s ignored\n" msgstr "" -#: config/tc-i386.c:4307 +#: config/tc-i386.c:4456 +msgid " -q quieten some warnings\n" +msgstr "" + +#: config/tc-i386.c:4475 +msgid "Unknown architecture" +msgstr "" + +#: config/tc-i386.c:4515 msgid "GOT already in symbol table" msgstr "" -#: config/tc-i386.c:4456 +#: config/tc-i386.c:4636 #, c-format -msgid "cannot represent relocation type %s" +msgid "can not do %d byte relocation" msgstr "" -#: config/tc-i860.c:157 config/tc-i860.c:161 -msgid "Unknown temporary pseudo register" +#: config/tc-i386.c:4697 +#, c-format +msgid "cannot represent relocation type %s" msgstr "" -#: config/tc-i860.c:183 config/tc-mips.c:1059 +#: config/tc-i386.c:4994 #, c-format -msgid "internal error: can't hash `%s': %s\n" +msgid "too many memory references for '%s'" msgstr "" -#: config/tc-i860.c:341 +#: config/tc-i386.c:5157 #, c-format -msgid "Expanded opcode after delayed branch: `%s'" +msgid "Unknown operand modifier `%s'\n" msgstr "" -#: config/tc-i860.c:343 +#: config/tc-i386.c:5364 #, c-format -msgid "Expanded opcode in dual mode: `%s'" +msgid "`%s' is not a valid segment register" msgstr "" -#: config/tc-i860.c:580 -msgid "Fsr1 equals fdest with Pipelining" +#: config/tc-i386.c:5374 config/tc-i386.c:5495 +msgid "Register scaling only allowed in memory operands." msgstr "" -#: config/tc-i860.c:631 -msgid "5-bit immediate too large" +#: config/tc-i386.c:5405 +msgid "Too many register references in memory operand.\n" msgstr "" -#: config/tc-i860.c:725 -msgid "Illegal operands" +#: config/tc-i386.c:5474 +#, c-format +msgid "Syntax error. Expecting a constant. Got `%s'.\n" msgstr "" -#: config/tc-i860.c:749 config/tc-sparc.c:2644 -msgid "bad segment" +#: config/tc-i386.c:5544 +#, c-format +msgid "Unrecognized token '%s'" msgstr "" -#: config/tc-i860.c:878 +#: config/tc-i386.c:5561 #, c-format -msgid "26-bit branch w/o pc relative set: 0x%08x" +msgid "Unexpected token `%s'\n" msgstr "" -#. align pcrel offset, see manual -#. check for overflow -#: config/tc-i860.c:882 +#: config/tc-i386.c:5705 #, c-format -msgid "26-bit branch offset overflow: 0x%08x" +msgid "Unrecognized token `%s'\n" msgstr "" -#: config/tc-i860.c:891 config/tc-i860.c:922 -#, c-format -msgid "16-bit immediate 4-byte alignment error: 0x%08x" +#: config/tc-i860.c:154 config/tc-i860.c:158 +msgid "Unknown temporary pseudo register" msgstr "" -#: config/tc-i860.c:896 config/tc-i860.c:927 +#: config/tc-i860.c:181 config/tc-mips.c:1027 #, c-format -msgid "16-bit immediate 2-byte alignment error: 0x%08x" +msgid "internal error: can't hash `%s': %s\n" +msgstr "" + +#: config/tc-i860.c:201 +msgid "Defective assembler. No assembly attempted." msgstr "" -#: config/tc-i860.c:904 +#: config/tc-i860.c:347 #, c-format -msgid "16-bit branch offset overflow: 0x%08x" +msgid "Expanded opcode after delayed branch: `%s'" msgstr "" -#: config/tc-i860.c:912 +#: config/tc-i860.c:351 #, c-format -msgid "16-bit immediate 16-byte alignment error: 0x%08x" +msgid "Expanded opcode in dual mode: `%s'" msgstr "" -#: config/tc-i860.c:917 +#: config/tc-i860.c:355 #, c-format -msgid "16-bit immediate 8-byte alignment error: 0x%08x" +msgid "An instruction was expanded (%s)" +msgstr "" + +#: config/tc-i860.c:613 +msgid "Pipelined instruction: fsrc1 = fdest" msgstr "" -#: config/tc-i860.c:933 +#: config/tc-i860.c:776 config/tc-i860.c:783 config/tc-i860.c:790 +msgid "Assembler does not yet support PIC" +msgstr "" + +#: config/tc-i860.c:849 #, c-format -msgid "16-bit immediate overflow: 0x%08x" +msgid "Illegal operands for %s" +msgstr "" + +#: config/tc-i860.c:873 config/tc-sparc.c:2730 +msgid "bad segment" msgstr "" -#: config/tc-i860.c:951 +#: config/tc-i860.c:965 msgid "md_number_to_disp\n" msgstr "" -#: config/tc-i860.c:961 +#: config/tc-i860.c:975 msgid "i860_number_to_field\n" msgstr "" -#: config/tc-i860.c:1001 -msgid "i860_convert_frag\n" +#: config/tc-i860.c:984 +msgid "i860_estimate_size_before_relax\n" msgstr "" -#: config/tc-i860.c:1010 -msgid "i860_estimate_size_before_relax\n" +#: config/tc-i860.c:1075 +msgid "" +" -EL\t\t\t generate code for little endian mode (default)\n" +" -EB\t\t\t generate code for big endian mode\n" +" -mwarn-expand\t\t warn if pseudo operations are expanded\n" +msgstr "" + +#. SVR4 compatibility flags. +#: config/tc-i860.c:1081 +msgid "" +" -V\t\t\t print assembler version number\n" +" -Qy, -Qn\t\t ignored\n" +msgstr "" + +#: config/tc-i860.c:1150 +msgid "This immediate requires 0 MOD 2 alignment" +msgstr "" + +#: config/tc-i860.c:1153 +msgid "This immediate requires 0 MOD 4 alignment" +msgstr "" + +#: config/tc-i860.c:1156 +msgid "This immediate requires 0 MOD 8 alignment" +msgstr "" + +#: config/tc-i860.c:1159 +msgid "This immediate requires 0 MOD 16 alignment" msgstr "" -#: config/tc-i960.c:559 +#: config/tc-i860.c:1257 +msgid "5-bit immediate too large" +msgstr "" + +#: config/tc-i860.c:1260 +msgid "5-bit field must be absolute" +msgstr "" + +#: config/tc-i860.c:1306 config/tc-i860.c:1329 +msgid "A branch offset requires 0 MOD 4 alignment" +msgstr "" + +#: config/tc-i860.c:1350 +#, c-format +msgid "Unrecognized fix-up (0x%08x)" +msgstr "" + +#: config/tc-i860.h:82 +msgid "i860_convert_frag\n" +msgstr "" + +#: config/tc-i960.c:549 #, c-format msgid "Hashing returned \"%s\"." msgstr "" #. Offset of last character in opcode mnemonic -#: config/tc-i960.c:593 +#: config/tc-i960.c:583 msgid "branch prediction invalid on this opcode" msgstr "" -#: config/tc-i960.c:636 +#: config/tc-i960.c:623 #, c-format msgid "invalid opcode, \"%s\"." msgstr "" -#: config/tc-i960.c:641 +#: config/tc-i960.c:628 #, c-format msgid "improper number of operands. expecting %d, got %d" msgstr "" -#: config/tc-i960.c:876 +#: config/tc-i960.c:860 #, c-format msgid "Fixup of %ld too large for field width of %d" msgstr "" -#: config/tc-i960.c:994 +#: config/tc-i960.c:977 #, c-format msgid "invalid architecture %s" msgstr "" -#: config/tc-i960.c:1014 +#: config/tc-i960.c:997 msgid "I960 options:\n" msgstr "" -#: config/tc-i960.c:1017 +#: config/tc-i960.c:1000 msgid "" "\n" "\t\t\tspecify variant of 960 architecture\n" @@ -3292,636 +3801,1053 @@ msgid "" "\t\t\tlong displacements\n" msgstr "" -#: config/tc-i960.c:1425 +#: config/tc-i960.c:1403 msgid "too many operands" msgstr "" -#: config/tc-i960.c:1485 config/tc-i960.c:1715 +#: config/tc-i960.c:1462 config/tc-i960.c:1689 msgid "expression syntax error" msgstr "" -#: config/tc-i960.c:1523 +#: config/tc-i960.c:1500 msgid "attempt to branch into different segment" msgstr "" -#: config/tc-i960.c:1527 +#: config/tc-i960.c:1504 #, c-format msgid "target of %s instruction must be a label" msgstr "" -#: config/tc-i960.c:1567 +#: config/tc-i960.c:1543 msgid "unmatched '['" msgstr "" -#: config/tc-i960.c:1578 +#: config/tc-i960.c:1554 msgid "garbage after index spec ignored" msgstr "" #. We never moved: there was no opcode either! -#: config/tc-i960.c:1645 +#: config/tc-i960.c:1620 msgid "missing opcode" msgstr "" -#: config/tc-i960.c:1953 +#: config/tc-i960.c:1923 msgid "invalid constant" msgstr "" -#: config/tc-i960.c:2066 +#: config/tc-i960.c:2035 msgid "invalid index register" msgstr "" -#: config/tc-i960.c:2089 +#: config/tc-i960.c:2058 msgid "invalid scale factor" msgstr "" -#: config/tc-i960.c:2272 +#: config/tc-i960.c:2241 msgid "unaligned register" msgstr "" -#: config/tc-i960.c:2295 +#: config/tc-i960.c:2264 msgid "no such sfr in this architecture" msgstr "" -#: config/tc-i960.c:2333 +#: config/tc-i960.c:2302 msgid "illegal literal" msgstr "" #. Should not happen: see block comment above -#: config/tc-i960.c:2566 +#: config/tc-i960.c:2532 #, c-format msgid "Trying to 'bal' to %s" msgstr "" -#: config/tc-i960.c:2577 +#: config/tc-i960.c:2543 msgid "Looks like a proc, but can't tell what kind.\n" msgstr "" -#: config/tc-i960.c:2609 +#: config/tc-i960.c:2574 msgid "should have 1 or 2 operands" msgstr "" -#: config/tc-i960.c:2618 config/tc-i960.c:2637 +#: config/tc-i960.c:2583 config/tc-i960.c:2602 #, c-format msgid "Redefining leafproc %s" msgstr "" -#: config/tc-i960.c:2669 +#: config/tc-i960.c:2633 msgid "should have two operands" msgstr "" -#: config/tc-i960.c:2679 +#: config/tc-i960.c:2643 msgid "'entry_num' must be absolute number in [0,31]" msgstr "" -#: config/tc-i960.c:2688 +#: config/tc-i960.c:2652 #, c-format msgid "Redefining entrynum for sysproc %s" msgstr "" -#: config/tc-i960.c:2799 +#: config/tc-i960.c:2759 msgid "architecture of opcode conflicts with that of earlier instruction(s)" msgstr "" -#: config/tc-i960.c:2820 +#: config/tc-i960.c:2780 msgid "big endian mode is not supported" msgstr "" -#: config/tc-i960.c:2822 +#: config/tc-i960.c:2782 #, c-format msgid "ignoring unrecognized .endian type `%s'" msgstr "" -#: config/tc-i960.c:3104 +#: config/tc-i960.c:3064 #, c-format msgid "leafproc symbol '%s' undefined" msgstr "" -#: config/tc-i960.c:3114 +#: config/tc-i960.c:3074 #, c-format msgid "Warning: making leafproc entries %s and %s both global\n" msgstr "" -#: config/tc-i960.c:3223 +#: config/tc-i960.c:3183 msgid "option --link-relax is only supported in b.out format" msgstr "" -#: config/tc-i960.c:3266 +#: config/tc-i960.c:3226 msgid "callj to difference of two symbols" msgstr "" +#: config/tc-ia64.c:4077 +msgid "Register name expected" +msgstr "" + +#: config/tc-ia64.c:4082 config/tc-ia64.c:4368 +msgid "Comma expected" +msgstr "" + +#: config/tc-ia64.c:4090 +msgid "Register value annotation ignored" +msgstr "" + +#: config/tc-ia64.c:4114 +msgid "Directive invalid within a bundle" +msgstr "" + +#: config/tc-ia64.c:4181 +msgid "Missing predicate relation type" +msgstr "" + +#: config/tc-ia64.c:4197 +msgid "Unrecognized predicate relation type" +msgstr "" + +#: config/tc-ia64.c:4217 config/tc-ia64.c:4242 +msgid "Predicate register expected" +msgstr "" + +#: config/tc-ia64.c:4229 +msgid "Duplicate predicate register ignored" +msgstr "" + +#: config/tc-ia64.c:4251 +msgid "Bad register range" +msgstr "" + +#: config/tc-ia64.c:4279 +msgid "Predicate source and target required" +msgstr "" + +#: config/tc-ia64.c:4281 config/tc-ia64.c:4293 +msgid "Use of p0 is not valid in this context" +msgstr "" + +#: config/tc-ia64.c:4288 +msgid "At least two PR arguments expected" +msgstr "" + +#: config/tc-ia64.c:4302 +msgid "At least one PR argument expected" +msgstr "" + +#: config/tc-ia64.c:4338 +#, c-format +msgid "Inserting \"%s\" into entry hint table failed: %s" +msgstr "" + +#. FIXME -- need 62-bit relocation type +#: config/tc-ia64.c:4758 +msgid "62-bit relocation not yet implemented" +msgstr "" + +#: config/tc-ia64.c:4820 +msgid "lower 16 bits of mask ignored" +msgstr "" + +#: config/tc-ia64.c:5317 +msgid "Value truncated to 62 bits" +msgstr "" + +#: config/tc-ia64.c:5668 +msgid "" +"Additional NOP may be necessary to workaround Itanium processor A/B step " +"errata" +msgstr "" + +#: config/tc-ia64.c:5849 +#, c-format +msgid "Unrecognized option '-x%s'" +msgstr "" + +#: config/tc-ia64.c:5877 +msgid "" +"IA-64 options:\n" +" -milp32|-milp64|-mlp64|-mp64\tselect data model (default -mlp64)\n" +" -mle | -mbe\t\t select little- or big-endian byte order (default -mle)\n" +" -x | -xexplicit\t turn on dependency violation checking (default)\n" +" -xauto\t\t automagically remove dependency violations\n" +" -xdebug\t\t debug dependency violation checker\n" +msgstr "" + +#: config/tc-ia64.c:6147 config/tc-mips.c:1014 +msgid "Could not set architecture and machine" +msgstr "" + +#: config/tc-ia64.c:6223 +msgid "Explicit stops are ignored in auto mode" +msgstr "" + +#: config/tc-ia64.c:6273 +msgid "Found '{' after explicit switch to automatic mode" +msgstr "" + +#: config/tc-ia64.c:6686 +#, c-format +msgid "Unhandled dependency %s for %s (%s), note %d" +msgstr "" + +#: config/tc-ia64.c:7962 +#, c-format +msgid "Unrecognized dependency specifier %d\n" +msgstr "" + +#: config/tc-ia64.c:8753 +msgid "Only the first path encountering the conflict is reported" +msgstr "" + +#: config/tc-ia64.c:8756 +msgid "This is the location of the conflicting usage" +msgstr "" + #. Pretend that we do not recognise this option. -#: config/tc-m32r.c:223 +#: config/tc-m32r.c:231 msgid "Unrecognised option: -hidden" msgstr "" -#: config/tc-m32r.c:256 +#: config/tc-m32r.c:265 msgid " M32R specific command line options:\n" msgstr "" -#: config/tc-m32r.c:258 +#: config/tc-m32r.c:267 msgid "" " -m32r disable support for the m32rx instruction set\n" msgstr "" -#: config/tc-m32r.c:260 +#: config/tc-m32r.c:269 msgid " -m32rx support the extended m32rx instruction set\n" msgstr "" -#: config/tc-m32r.c:262 +#: config/tc-m32r.c:271 msgid " -O try to combine instructions in parallel\n" msgstr "" -#: config/tc-m32r.c:265 +#: config/tc-m32r.c:274 msgid "" " -warn-explicit-parallel-conflicts warn when parallel instructions\n" msgstr "" -#: config/tc-m32r.c:267 +#: config/tc-m32r.c:276 msgid " violate contraints\n" msgstr "" -#: config/tc-m32r.c:269 +#: config/tc-m32r.c:278 msgid " -no-warn-explicit-parallel-conflicts do not warn when parallel\n" msgstr "" -#: config/tc-m32r.c:271 +#: config/tc-m32r.c:280 msgid "" " instructions violate contraints\n" msgstr "" -#: config/tc-m32r.c:273 +#: config/tc-m32r.c:282 msgid "" " -Wp synonym for -warn-explicit-parallel-conflicts\n" msgstr "" -#: config/tc-m32r.c:275 +#: config/tc-m32r.c:284 msgid "" " -Wnp synonym for -no-warn-explicit-parallel-conflicts\n" msgstr "" -#: config/tc-m32r.c:278 +#: config/tc-m32r.c:287 msgid "" " -warn-unmatched-high warn when an (s)high reloc has no matching low " "reloc\n" msgstr "" -#: config/tc-m32r.c:280 +#: config/tc-m32r.c:289 msgid " -no-warn-unmatched-high do not warn about missing low relocs\n" msgstr "" -#: config/tc-m32r.c:282 +#: config/tc-m32r.c:291 msgid " -Wuh synonym for -warn-unmatched-high\n" msgstr "" -#: config/tc-m32r.c:284 +#: config/tc-m32r.c:293 msgid " -Wnuh synonym for -no-warn-unmatched-high\n" msgstr "" -#: config/tc-m32r.c:288 +#: config/tc-m32r.c:297 msgid " -relax create linker relaxable code\n" msgstr "" -#: config/tc-m32r.c:290 +#: config/tc-m32r.c:299 msgid " -cpu-desc provide runtime cpu description file\n" msgstr "" -#: config/tc-m32r.c:685 +#: config/tc-m32r.c:688 msgid "Instructions write to the same destination register." msgstr "" -#: config/tc-m32r.c:693 +#: config/tc-m32r.c:696 msgid "Instructions do not use parallel execution pipelines." msgstr "" -#: config/tc-m32r.c:700 +#: config/tc-m32r.c:703 msgid "Instructions share the same execution pipeline" msgstr "" -#: config/tc-m32r.c:769 config/tc-m32r.c:855 +#: config/tc-m32r.c:773 config/tc-m32r.c:870 #, c-format msgid "not a 16 bit instruction '%s'" msgstr "" -#: config/tc-m32r.c:776 config/tc-m32r.c:862 config/tc-m32r.c:1017 +#: config/tc-m32r.c:780 config/tc-m32r.c:877 config/tc-m32r.c:1033 #, c-format msgid "unknown instruction '%s'" msgstr "" -#: config/tc-m32r.c:784 config/tc-m32r.c:869 config/tc-m32r.c:1024 +#: config/tc-m32r.c:789 config/tc-m32r.c:884 config/tc-m32r.c:1040 #, c-format msgid "instruction '%s' is for the M32RX only" msgstr "" -#: config/tc-m32r.c:792 config/tc-m32r.c:877 +#: config/tc-m32r.c:798 config/tc-m32r.c:893 #, c-format msgid "instruction '%s' cannot be executed in parallel." msgstr "" -#: config/tc-m32r.c:839 config/tc-m32r.c:902 config/tc-m32r.c:1074 +#: config/tc-m32r.c:854 config/tc-m32r.c:918 config/tc-m32r.c:1090 msgid "internal error: lookup/get operands failed" msgstr "" -#: config/tc-m32r.c:887 +#: config/tc-m32r.c:903 #, c-format msgid "'%s': only the NOP instruction can be issued in parallel on the m32r" msgstr "" -#: config/tc-m32r.c:916 +#: config/tc-m32r.c:932 #, c-format msgid "" "%s: output of 1st instruction is the same as an input to 2nd instruction - " "is this intentional ?" msgstr "" -#: config/tc-m32r.c:920 +#: config/tc-m32r.c:936 #, c-format msgid "" "%s: output of 2nd instruction is the same as an input to 1st instruction - " "is this intentional ?" msgstr "" -#: config/tc-m32r.c:1235 config/tc-ppc.c:1337 config/tc-ppc.c:3547 read.c:1378 +#: config/tc-m32r.c:1250 config/tc-ppc.c:1459 config/tc-ppc.c:3681 read.c:1358 msgid "Expected comma after symbol-name: rest of line ignored." msgstr "" -#: config/tc-m32r.c:1244 +#: config/tc-m32r.c:1260 #, c-format msgid ".SCOMMon length (%ld.) <0! Ignored." msgstr "" -#: config/tc-m32r.c:1258 config/tc-ppc.c:1359 config/tc-ppc.c:2266 -#: config/tc-ppc.c:3571 +#: config/tc-m32r.c:1274 config/tc-ppc.c:1481 config/tc-ppc.c:2392 +#: config/tc-ppc.c:3705 msgid "ignoring bad alignment" msgstr "" -#: config/tc-m32r.c:1284 config/tc-ppc.c:1370 config/tc-ppc.c:3583 read.c:1398 -#: read.c:2111 +#: config/tc-m32r.c:1301 config/tc-ppc.c:1492 config/tc-ppc.c:3717 read.c:1382 +#: read.c:2108 #, c-format msgid "Ignoring attempt to re-define symbol `%s'." msgstr "" -#: config/tc-m32r.c:1293 +#: config/tc-m32r.c:1310 #, c-format msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld." msgstr "" -#: config/tc-m32r.c:1766 +#: config/tc-m32r.c:1786 msgid "Unmatched high/shigh reloc" msgstr "" -#: config/tc-m68k.c:646 +#: config/tc-m68hc11.c:305 +#, c-format +msgid "" +"Motorola 68HC11/68HC12 options:\n" +" -m68hc11 | -m68hc12 specify the processor [default %s]\n" +" --force-long-branchs always turn relative branchs into absolute ones\n" +" -S,--short-branchs do not turn relative branchs into absolute ones\n" +" when the offset is out of range\n" +" --strict-direct-mode do not turn the direct mode into extended mode\n" +" when the instruction does not support direct mode\n" +" --print-insn-syntax print the syntax of instruction in case of error\n" +" --print-opcodes print the list of instructions with syntax\n" +" --generate-example generate an example of each instruction\n" +" (used for testing)\n" +msgstr "" + +#: config/tc-m68hc11.c:346 +#, c-format +msgid "Default target `%s' is not supported." +msgstr "" + +#. Dump the opcode statistics table. +#: config/tc-m68hc11.c:365 +msgid "Name # Modes Min ops Max ops Modes mask # Used\n" +msgstr "" + +#: config/tc-m68hc11.c:415 +#, c-format +msgid "Option `%s' is not recognized." +msgstr "" + +#: config/tc-m68hc11.c:636 +msgid "#<imm8>" +msgstr "" + +#: config/tc-m68hc11.c:645 +msgid "#<imm16>" +msgstr "" + +#: config/tc-m68hc11.c:654 config/tc-m68hc11.c:663 +msgid "<imm8>,X" +msgstr "" + +#: config/tc-m68hc11.c:681 +msgid "*<abs8>" +msgstr "" + +#: config/tc-m68hc11.c:693 +msgid "#<mask>" +msgstr "" + +#: config/tc-m68hc11.c:703 +#, c-format +msgid "symbol%d" +msgstr "" + +#: config/tc-m68hc11.c:705 +msgid "<abs>" +msgstr "" + +#: config/tc-m68hc11.c:724 +msgid "<label>" +msgstr "" + +#: config/tc-m68hc11.c:740 +#, c-format +msgid "" +"# Example of `%s' instructions\n" +"\t.sect .text\n" +"_start:\n" +msgstr "" + +#: config/tc-m68hc11.c:788 +#, c-format +msgid "Instruction `%s' is not recognized." +msgstr "" + +#: config/tc-m68hc11.c:793 +#, c-format +msgid "Instruction formats for `%s':" +msgstr "" + +#: config/tc-m68hc11.c:926 +#, c-format +msgid "Immediate operand is not allowed for operand %d." +msgstr "" + +#: config/tc-m68hc11.c:952 +msgid "Indirect indexed addressing is not valid for 68HC11." +msgstr "" + +#: config/tc-m68hc11.c:972 +msgid "Spurious `,' or bad indirect register addressing mode." +msgstr "" + +#: config/tc-m68hc11.c:988 +msgid "Missing second register or offset for indexed-indirect mode." +msgstr "" + +#: config/tc-m68hc11.c:998 +msgid "Missing second register for indexed-indirect mode." +msgstr "" + +#: config/tc-m68hc11.c:1014 +msgid "Missing `]' to close indexed-indirect mode." +msgstr "" + +#: config/tc-m68hc11.c:1058 +msgid "Illegal operand." +msgstr "" + +#: config/tc-m68hc11.c:1063 +msgid "Missing operand." +msgstr "" + +#: config/tc-m68hc11.c:1115 +msgid "Pre-increment mode is not valid for 68HC11" +msgstr "" + +#: config/tc-m68hc11.c:1128 +msgid "Wrong register in register indirect mode." +msgstr "" + +#: config/tc-m68hc11.c:1136 +msgid "Missing `]' to close register indirect operand." +msgstr "" + +#: config/tc-m68hc11.c:1153 +msgid "Post-decrement mode is not valid for 68HC11." +msgstr "" + +#: config/tc-m68hc11.c:1161 +msgid "Post-increment mode is not valid for 68HC11." +msgstr "" + +#: config/tc-m68hc11.c:1178 +msgid "Invalid indexed indirect mode." +msgstr "" + +#: config/tc-m68hc11.c:1272 +#, c-format +msgid "Trap id `%ld' is out of range." +msgstr "" + +#: config/tc-m68hc11.c:1276 +msgid "Trap id must be within [0x30..0x39] or [0x40..0xff]." +msgstr "" + +#: config/tc-m68hc11.c:1283 +#, c-format +msgid "Operand out of 8-bit range: `%ld'." +msgstr "" + +#: config/tc-m68hc11.c:1290 +msgid "The trap id must be a constant." +msgstr "" + +#: config/tc-m68hc11.c:1315 +#, c-format +msgid "Operand `%x' not recognized in fixup8." +msgstr "" + +#: config/tc-m68hc11.c:1335 +#, c-format +msgid "Operand out of 16-bit range: `%ld'." +msgstr "" + +#: config/tc-m68hc11.c:1356 +#, c-format +msgid "Operand `%x' not recognized in fixup16." +msgstr "" + +#: config/tc-m68hc11.c:1374 +#, c-format +msgid "Unexpected branch conversion with `%x'" +msgstr "" + +#: config/tc-m68hc11.c:1463 config/tc-m68hc11.c:1592 +#, c-format +msgid "Operand out of range for a relative branch: `%ld'" +msgstr "" + +#: config/tc-m68hc11.c:1560 +msgid "Invalid register for dbcc/tbcc instruction." +msgstr "" + +#: config/tc-m68hc11.c:1651 +#, c-format +msgid "Increment/decrement value is out of range: `%ld'." +msgstr "" + +#: config/tc-m68hc11.c:1662 +msgid "Expecting a register." +msgstr "" + +#: config/tc-m68hc11.c:1677 +msgid "Invalid register for post/pre increment." +msgstr "" + +#: config/tc-m68hc11.c:1707 +msgid "Invalid register." +msgstr "" + +#: config/tc-m68hc11.c:1714 +#, c-format +msgid "Offset out of 16-bit range: %ld." +msgstr "" + +#: config/tc-m68hc11.c:1719 +#, c-format +msgid "Offset out of 5-bit range for movw/movb insn: %ld." +msgstr "" + +#: config/tc-m68hc11.c:1774 +msgid "Expecting register D for indexed indirect mode." +msgstr "" + +#: config/tc-m68hc11.c:1776 +msgid "Indexed indirect mode is not allowed for movb/movw." +msgstr "" + +#: config/tc-m68hc11.c:1793 +msgid "Invalid accumulator register." +msgstr "" + +#: config/tc-m68hc11.c:1818 +msgid "Invalid indexed register." +msgstr "" + +#: config/tc-m68hc11.c:1826 +msgid "Addressing mode not implemented yet." +msgstr "" + +#: config/tc-m68hc11.c:1841 +msgid "Invalid source register for this instruction, use 'tfr'." +msgstr "" + +#: config/tc-m68hc11.c:1843 +msgid "Invalid source register." +msgstr "" + +#: config/tc-m68hc11.c:1848 +msgid "Invalid destination register for this instruction, use 'tfr'." +msgstr "" + +#: config/tc-m68hc11.c:1850 +msgid "Invalid destination register." +msgstr "" + +#: config/tc-m68hc11.c:1939 +msgid "Invalid indexed register, expecting register X." +msgstr "" + +#: config/tc-m68hc11.c:1941 +msgid "Invalid indexed register, expecting register Y." +msgstr "" + +#: config/tc-m68hc11.c:2238 +msgid "No instruction or missing opcode." +msgstr "" + +#: config/tc-m68hc11.c:2303 +#, c-format +msgid "Opcode `%s' is not recognized." +msgstr "" + +#: config/tc-m68hc11.c:2325 +#, c-format +msgid "Garbage at end of instruction: `%s'." +msgstr "" + +#: config/tc-m68hc11.c:2348 +#, c-format +msgid "Invalid operand for `%s'" +msgstr "" + +#: config/tc-m68hc11.c:2405 +#, c-format +msgid "Relocation %d is not supported by object file format." +msgstr "" + +#: config/tc-m68hc11.c:2571 +msgid "bra or bsr with undefined symbol." +msgstr "" + +#: config/tc-m68hc11.c:2683 +#, c-format +msgid "Subtype %d is not recognized." +msgstr "" + +#: config/tc-m68hc11.c:2720 +msgid "Expression too complex." +msgstr "" + +#: config/tc-m68hc11.c:2749 +msgid "Value out of 16-bit range." +msgstr "" + +#: config/tc-m68hc11.c:2772 +#, c-format +msgid "Value %ld too large for 8-bit PC-relative branch." +msgstr "" + +#: config/tc-m68hc11.c:2779 +#, c-format +msgid "Auto increment/decrement offset '%ld' is out of range." +msgstr "" + +#: config/tc-m68hc11.c:2790 +#, c-format +msgid "Line %d: unknown relocation type: 0x%x." +msgstr "" + +#: config/tc-m68k.c:680 msgid "Unknown PC relative instruction" msgstr "" -#: config/tc-m68k.c:772 +#: config/tc-m68k.c:806 #, c-format msgid "Can not do %d byte pc-relative relocation" msgstr "" -#: config/tc-m68k.c:774 +#: config/tc-m68k.c:808 #, c-format msgid "Can not do %d byte pc-relative pic relocation" msgstr "" -#: config/tc-m68k.c:779 +#: config/tc-m68k.c:813 #, c-format msgid "Can not do %d byte relocation" msgstr "" -#: config/tc-m68k.c:781 +#: config/tc-m68k.c:815 #, c-format msgid "Can not do %d byte pic relocation" msgstr "" -#: config/tc-m68k.c:885 config/tc-mips.c:11262 +#: config/tc-m68k.c:919 config/tc-mips.c:11242 #, c-format msgid "Cannot make %s relocation PC relative" msgstr "" -#: config/tc-m68k.c:998 config/tc-tahoe.c:1505 config/tc-vax.c:1774 +#: config/tc-m68k.c:1032 config/tc-tahoe.c:1503 config/tc-vax.c:1766 msgid "No operator" msgstr "" -#: config/tc-m68k.c:1028 config/tc-tahoe.c:1522 config/tc-vax.c:1791 +#: config/tc-m68k.c:1062 config/tc-tahoe.c:1520 config/tc-vax.c:1783 msgid "Unknown operator" msgstr "" -#: config/tc-m68k.c:1803 +#: config/tc-m68k.c:1837 msgid "invalid instruction for this architecture; needs " msgstr "" -#: config/tc-m68k.c:1808 +#: config/tc-m68k.c:1842 msgid "fpu (68040, 68060 or 68881/68882)" msgstr "" -#: config/tc-m68k.c:1811 +#: config/tc-m68k.c:1845 msgid "mmu (68030 or 68851)" msgstr "" -#: config/tc-m68k.c:1814 +#: config/tc-m68k.c:1848 msgid "68020 or higher" msgstr "" -#: config/tc-m68k.c:1817 +#: config/tc-m68k.c:1851 msgid "68000 or higher" msgstr "" -#: config/tc-m68k.c:1820 +#: config/tc-m68k.c:1854 msgid "68010 or higher" msgstr "" -#: config/tc-m68k.c:1848 +#: config/tc-m68k.c:1883 msgid "operands mismatch" msgstr "" -#: config/tc-m68k.c:1905 config/tc-m68k.c:1911 config/tc-m68k.c:1917 +#: config/tc-m68k.c:1940 config/tc-m68k.c:1946 config/tc-m68k.c:1952 msgid "operand out of range" msgstr "" -#: config/tc-m68k.c:1974 +#: config/tc-m68k.c:2009 #, c-format msgid "Bignum too big for %c format; truncated" msgstr "" -#: config/tc-m68k.c:2042 +#: config/tc-m68k.c:2077 msgid "displacement too large for this architecture; needs 68020 or higher" msgstr "" -#: config/tc-m68k.c:2152 +#: config/tc-m68k.c:2187 msgid "" "scale factor invalid on this architecture; needs cpu32 or 68020 or higher" msgstr "" -#: config/tc-m68k.c:2157 +#: config/tc-m68k.c:2192 msgid "invalid index size for coldfire" msgstr "" -#: config/tc-m68k.c:2210 +#: config/tc-m68k.c:2245 msgid "Forcing byte displacement" msgstr "" -#: config/tc-m68k.c:2212 +#: config/tc-m68k.c:2247 msgid "byte displacement out of range" msgstr "" -#: config/tc-m68k.c:2259 config/tc-m68k.c:2297 +#: config/tc-m68k.c:2294 config/tc-m68k.c:2332 msgid "invalid operand mode for this architecture; needs 68020 or higher" msgstr "" -#: config/tc-m68k.c:2283 config/tc-m68k.c:2317 +#: config/tc-m68k.c:2318 config/tc-m68k.c:2352 msgid ":b not permitted; defaulting to :w" msgstr "" -#: config/tc-m68k.c:2399 +#: config/tc-m68k.c:2429 msgid "unsupported byte value; use a different suffix" msgstr "" -#: config/tc-m68k.c:2413 +#: config/tc-m68k.c:2443 msgid "unknown/incorrect operand" msgstr "" -#: config/tc-m68k.c:2446 config/tc-m68k.c:2454 config/tc-m68k.c:2461 -#: config/tc-m68k.c:2468 +#: config/tc-m68k.c:2476 config/tc-m68k.c:2484 config/tc-m68k.c:2491 +#: config/tc-m68k.c:2498 msgid "out of range" msgstr "" -#: config/tc-m68k.c:2518 +#: config/tc-m68k.c:2548 msgid "Can't use long branches on 68000/68010/5200" msgstr "" -#: config/tc-m68k.c:2606 +#: config/tc-m68k.c:2658 msgid "Expression out of range, using 0" msgstr "" -#: config/tc-m68k.c:2718 config/tc-m68k.c:2734 +#: config/tc-m68k.c:2770 config/tc-m68k.c:2786 msgid "Floating point register in register list" msgstr "" -#: config/tc-m68k.c:2724 +#: config/tc-m68k.c:2776 msgid "Wrong register in floating-point reglist" msgstr "" -#: config/tc-m68k.c:2740 +#: config/tc-m68k.c:2792 msgid "incorrect register in reglist" msgstr "" -#: config/tc-m68k.c:2746 +#: config/tc-m68k.c:2798 msgid "wrong register in floating-point reglist" msgstr "" -#: config/tc-m68k.c:2822 +#: config/tc-m68k.c:2874 msgid "failed sanity check" msgstr "" #. ERROR -#: config/tc-m68k.c:3187 +#: config/tc-m68k.c:3239 msgid "Extra )" msgstr "" #. ERROR -#: config/tc-m68k.c:3198 +#: config/tc-m68k.c:3250 msgid "Missing )" msgstr "" -#: config/tc-m68k.c:3215 +#: config/tc-m68k.c:3267 msgid "Missing operand" msgstr "" -#: config/tc-m68k.c:3547 +#: config/tc-m68k.c:3599 #, c-format msgid "%s -- statement `%s' ignored" msgstr "" -#: config/tc-m68k.c:3591 +#: config/tc-m68k.c:3643 #, c-format msgid "Don't know how to figure width of %c in md_assemble()" msgstr "" -#: config/tc-m68k.c:3759 config/tc-m68k.c:3795 +#: config/tc-m68k.c:3811 config/tc-m68k.c:3849 #, c-format msgid "Internal Error: Can't find %s in hash table" msgstr "" -#: config/tc-m68k.c:3762 config/tc-m68k.c:3798 +#: config/tc-m68k.c:3814 config/tc-m68k.c:3852 #, c-format msgid "Internal Error: Can't hash %s: %s" msgstr "" -#: config/tc-m68k.c:3926 +#: config/tc-m68k.c:3980 #, c-format msgid "unrecognized default cpu `%s' ???" msgstr "" -#: config/tc-m68k.c:3938 +#: config/tc-m68k.c:3992 msgid "68040 and 68851 specified; mmu instructions may assemble incorrectly" msgstr "" -#: config/tc-m68k.c:3958 +#: config/tc-m68k.c:4012 msgid "options for 68881 and no-68881 both given" msgstr "" -#: config/tc-m68k.c:3960 +#: config/tc-m68k.c:4014 msgid "options for 68851 and no-68851 both given" msgstr "" -#: config/tc-m68k.c:4031 +#: config/tc-m68k.c:4085 #, c-format msgid "text label `%s' aligned to odd boundary" msgstr "" -#: config/tc-m68k.c:4248 +#: config/tc-m68k.c:4302 msgid "invalid byte branch offset" msgstr "" -#: config/tc-m68k.c:4305 +#: config/tc-m68k.c:4360 msgid "short branch with zero offset: use :w" msgstr "" -#: config/tc-m68k.c:4351 -msgid "Long branch offset not supported." -msgstr "" - -#: config/tc-m68k.c:4412 -#, c-format -msgid "Internal error (long PC-relative operand) for insn 0x%04x at 0x%lx" -msgstr "" - -#: config/tc-m68k.c:4443 -msgid "displacement doesn't fit in one byte" -msgstr "" - -#: config/tc-m68k.c:4556 -msgid "Long branch offset to extern symbol not supported." -msgstr "" - -#: config/tc-m68k.c:4905 config/tc-m68k.c:4916 +#: config/tc-m68k.c:4896 config/tc-m68k.c:4907 msgid "expression out of range: defaulting to 1" msgstr "" -#: config/tc-m68k.c:4948 +#: config/tc-m68k.c:4939 msgid "expression out of range: defaulting to 0" msgstr "" -#: config/tc-m68k.c:4981 config/tc-m68k.c:4993 +#: config/tc-m68k.c:4972 config/tc-m68k.c:4984 #, c-format msgid "Can't deal with expression; defaulting to %ld" msgstr "" -#: config/tc-m68k.c:5007 +#: config/tc-m68k.c:4998 msgid "expression doesn't fit in BYTE" msgstr "" -#: config/tc-m68k.c:5011 +#: config/tc-m68k.c:5002 msgid "expression doesn't fit in WORD" msgstr "" -#: config/tc-m68k.c:5104 +#: config/tc-m68k.c:5095 #, c-format msgid "%s: unrecognized processor name" msgstr "" -#: config/tc-m68k.c:5169 +#: config/tc-m68k.c:5160 msgid "bad coprocessor id" msgstr "" -#: config/tc-m68k.c:5175 +#: config/tc-m68k.c:5166 msgid "unrecognized fopt option" msgstr "" -#: config/tc-m68k.c:5309 +#: config/tc-m68k.c:5300 #, c-format msgid "option `%s' may not be negated" msgstr "" -#: config/tc-m68k.c:5320 +#: config/tc-m68k.c:5311 #, c-format msgid "option `%s' not recognized" msgstr "" -#: config/tc-m68k.c:5353 +#: config/tc-m68k.c:5344 msgid "bad format of OPT NEST=depth" msgstr "" -#: config/tc-m68k.c:5416 +#: config/tc-m68k.c:5407 msgid "missing label" msgstr "" -#: config/tc-m68k.c:5440 config/tc-m68k.c:5469 +#: config/tc-m68k.c:5431 config/tc-m68k.c:5460 msgid "bad register list" msgstr "" -#: config/tc-m68k.c:5442 +#: config/tc-m68k.c:5433 #, c-format msgid "bad register list: %s" msgstr "" -#: config/tc-m68k.c:5540 +#: config/tc-m68k.c:5531 msgid "restore without save" msgstr "" -#: config/tc-m68k.c:5717 config/tc-m68k.c:6066 +#: config/tc-m68k.c:5708 config/tc-m68k.c:6057 msgid "syntax error in structured control directive" msgstr "" -#: config/tc-m68k.c:5768 +#: config/tc-m68k.c:5759 msgid "missing condition code in structured control directive" msgstr "" -#: config/tc-m68k.c:6100 +#: config/tc-m68k.c:6091 msgid "missing then" msgstr "" -#: config/tc-m68k.c:6182 +#: config/tc-m68k.c:6173 msgid "else without matching if" msgstr "" -#: config/tc-m68k.c:6216 +#: config/tc-m68k.c:6207 msgid "endi without matching if" msgstr "" -#: config/tc-m68k.c:6257 +#: config/tc-m68k.c:6248 msgid "break outside of structured loop" msgstr "" -#: config/tc-m68k.c:6296 +#: config/tc-m68k.c:6287 msgid "next outside of structured loop" msgstr "" -#: config/tc-m68k.c:6348 +#: config/tc-m68k.c:6339 msgid "missing =" msgstr "" -#: config/tc-m68k.c:6386 +#: config/tc-m68k.c:6377 msgid "missing to or downto" msgstr "" -#: config/tc-m68k.c:6422 config/tc-m68k.c:6456 config/tc-m68k.c:6666 +#: config/tc-m68k.c:6413 config/tc-m68k.c:6447 config/tc-m68k.c:6657 msgid "missing do" msgstr "" -#: config/tc-m68k.c:6559 +#: config/tc-m68k.c:6550 msgid "endf without for" msgstr "" -#: config/tc-m68k.c:6615 +#: config/tc-m68k.c:6606 msgid "until without repeat" msgstr "" -#: config/tc-m68k.c:6702 +#: config/tc-m68k.c:6693 msgid "endw without while" msgstr "" -#: config/tc-m68k.c:6818 +#: config/tc-m68k.c:6817 #, c-format msgid "unrecognized option `%s'" msgstr "" -#: config/tc-m68k.c:6863 +#: config/tc-m68k.c:6862 #, c-format msgid "unrecognized architecture specification `%s'" msgstr "" -#: config/tc-m68k.c:6933 +#: config/tc-m68k.c:6932 msgid "" "680X0 options:\n" "-l\t\t\tuse 1 word for refs to undefined symbols [default 2]\n" @@ -3934,13 +4860,14 @@ msgid "" "\t\t\t[default yes for 68020, 68030, and cpu32]\n" msgstr "" -#: config/tc-m68k.c:6943 +#: config/tc-m68k.c:6942 msgid "" "-m68851 | -mno-68851\n" "\t\t\ttarget has/lacks memory-management unit coprocessor\n" "\t\t\t[default yes for 68020 and up]\n" "-pic, -k\t\tgenerate position independent code\n" "-S\t\t\tturn jbsr into jsr\n" +"--pcrel never turn PC-relative branches into absolute jumps\n" "--register-prefix-optional\n" "\t\t\trecognize register names without prefix character\n" "--bitwise-or\t\tdo not treat `|' as a comment character\n" @@ -3964,230 +4891,234 @@ msgstr "" msgid "Opcode(%d.%s): " msgstr "" -#: config/tc-m88k.c:206 +#: config/tc-m88k.c:205 #, c-format msgid "Can't hash instruction '%s':%s" msgstr "" -#: config/tc-m88k.c:258 +#: config/tc-m88k.c:257 #, c-format msgid "Invalid mnemonic '%s'" msgstr "" -#: config/tc-m88k.c:278 +#: config/tc-m88k.c:277 msgid "Parameter syntax error" msgstr "" -#: config/tc-m88k.c:333 +#: config/tc-m88k.c:332 msgid "Unknown relocation type" msgstr "" #. Having this here repeats the warning somtimes. #. But can't we stand that? -#: config/tc-m88k.c:446 +#: config/tc-m88k.c:445 msgid "Use of obsolete instruction" msgstr "" -#: config/tc-m88k.c:563 +#: config/tc-m88k.c:562 msgid "Expression truncated to 16 bits" msgstr "" -#: config/tc-m88k.c:629 config/tc-m88k.c:651 +#: config/tc-m88k.c:628 config/tc-m88k.c:650 msgid "Expression truncated to 5 bits" msgstr "" -#: config/tc-m88k.c:873 +#: config/tc-m88k.c:872 msgid "Expression truncated to 9 bits" msgstr "" -#: config/tc-m88k.c:895 +#: config/tc-m88k.c:894 msgid "Removed lower 2 bits of expression" msgstr "" -#: config/tc-m88k.c:1034 +#: config/tc-m88k.c:1033 msgid "Bad relocation type" msgstr "" -#: config/tc-m88k.c:1047 +#: config/tc-m88k.c:1046 msgid "md_number_to_disp not defined" msgstr "" -#: config/tc-m88k.c:1057 +#: config/tc-m88k.c:1056 msgid "md_number_to_field not defined" msgstr "" -#: config/tc-m88k.c:1170 +#: config/tc-m88k.c:1169 msgid "Relaxation should never occur" msgstr "" -#: config/tc-m88k.c:1267 config/tc-sparc.c:3363 read.c:1973 +#: config/tc-m88k.c:1264 config/tc-sparc.c:3540 read.c:1962 #, c-format msgid "BSS length (%d.) <0! Ignored." msgstr "" -#: config/tc-m88k.c:1311 +#: config/tc-m88k.c:1308 #, c-format msgid "Ignoring attempt to re-define symbol %s." msgstr "" -#: config/tc-mcore.c:509 +#: config/tc-m88k.h:78 +msgid "m88k convert_frag\n" +msgstr "" + +#: config/tc-mcore.c:508 #, c-format msgid "register expected, but saw '%.6s'" msgstr "" -#: config/tc-mcore.c:593 +#: config/tc-mcore.c:592 #, c-format msgid "control register expected, but saw '%.6s'" msgstr "" -#: config/tc-mcore.c:631 +#: config/tc-mcore.c:630 msgid "bad/missing psr specifier" msgstr "" -#: config/tc-mcore.c:792 +#: config/tc-mcore.c:791 msgid "more than 65K literal pools" msgstr "" -#: config/tc-mcore.c:846 +#: config/tc-mcore.c:845 msgid "missing ']'" msgstr "" -#: config/tc-mcore.c:886 +#: config/tc-mcore.c:885 msgid "operand must be a constant" msgstr "" -#: config/tc-mcore.c:888 +#: config/tc-mcore.c:887 #, c-format msgid "operand must be absolute in range %d..%d, not %d" msgstr "" -#: config/tc-mcore.c:926 +#: config/tc-mcore.c:925 msgid "operand must be a multiple of 4" msgstr "" -#: config/tc-mcore.c:933 +#: config/tc-mcore.c:932 msgid "operand must be a multiple of 2" msgstr "" -#: config/tc-mcore.c:947 config/tc-mcore.c:1459 config/tc-mcore.c:1513 +#: config/tc-mcore.c:946 config/tc-mcore.c:1458 config/tc-mcore.c:1512 msgid "base register expected" msgstr "" -#: config/tc-mcore.c:996 +#: config/tc-mcore.c:995 #, c-format msgid "unknown opcode \"%s\"" msgstr "" -#: config/tc-mcore.c:1039 +#: config/tc-mcore.c:1038 msgid "invalid register: r15 illegal" msgstr "" -#: config/tc-mcore.c:1087 config/tc-mcore.c:1663 +#: config/tc-mcore.c:1086 config/tc-mcore.c:1662 msgid "M340 specific opcode used when assembling for M210" msgstr "" -#: config/tc-mcore.c:1105 config/tc-mcore.c:1144 config/tc-mcore.c:1163 -#: config/tc-mcore.c:1182 config/tc-mcore.c:1209 config/tc-mcore.c:1238 -#: config/tc-mcore.c:1275 config/tc-mcore.c:1310 config/tc-mcore.c:1329 -#: config/tc-mcore.c:1348 config/tc-mcore.c:1380 config/tc-mcore.c:1405 -#: config/tc-mcore.c:1462 config/tc-mcore.c:1516 config/tc-mcore.c:1552 -#: config/tc-mcore.c:1610 config/tc-mcore.c:1632 config/tc-mcore.c:1655 +#: config/tc-mcore.c:1104 config/tc-mcore.c:1143 config/tc-mcore.c:1162 +#: config/tc-mcore.c:1181 config/tc-mcore.c:1208 config/tc-mcore.c:1237 +#: config/tc-mcore.c:1274 config/tc-mcore.c:1309 config/tc-mcore.c:1328 +#: config/tc-mcore.c:1347 config/tc-mcore.c:1379 config/tc-mcore.c:1404 +#: config/tc-mcore.c:1461 config/tc-mcore.c:1515 config/tc-mcore.c:1551 +#: config/tc-mcore.c:1609 config/tc-mcore.c:1631 config/tc-mcore.c:1654 msgid "second operand missing" msgstr "" -#: config/tc-mcore.c:1120 +#: config/tc-mcore.c:1119 msgid "destination register must be r1" msgstr "" -#: config/tc-mcore.c:1141 +#: config/tc-mcore.c:1140 msgid "source register must be r1" msgstr "" -#: config/tc-mcore.c:1204 config/tc-mcore.c:1261 +#: config/tc-mcore.c:1203 config/tc-mcore.c:1260 msgid "immediate is not a power of two" msgstr "" -#: config/tc-mcore.c:1232 +#: config/tc-mcore.c:1231 msgid "translating bgeni to movi" msgstr "" -#: config/tc-mcore.c:1269 +#: config/tc-mcore.c:1268 msgid "translating mgeni to movi" msgstr "" -#: config/tc-mcore.c:1301 +#: config/tc-mcore.c:1300 msgid "translating bmaski to movi" msgstr "" -#: config/tc-mcore.c:1375 +#: config/tc-mcore.c:1374 #, c-format msgid "displacement too large (%d)" msgstr "" -#: config/tc-mcore.c:1389 +#: config/tc-mcore.c:1388 msgid "Invalid register: r0 and r15 illegal" msgstr "" -#: config/tc-mcore.c:1420 +#: config/tc-mcore.c:1419 msgid "bad starting register: r0 and r15 invalid" msgstr "" -#: config/tc-mcore.c:1433 +#: config/tc-mcore.c:1432 msgid "ending register must be r15" msgstr "" -#: config/tc-mcore.c:1453 +#: config/tc-mcore.c:1452 msgid "bad base register: must be r0" msgstr "" -#: config/tc-mcore.c:1471 +#: config/tc-mcore.c:1470 msgid "first register must be r4" msgstr "" -#: config/tc-mcore.c:1482 +#: config/tc-mcore.c:1481 msgid "last register must be r7" msgstr "" -#: config/tc-mcore.c:1519 +#: config/tc-mcore.c:1518 msgid "reg-reg expected" msgstr "" -#: config/tc-mcore.c:1629 +#: config/tc-mcore.c:1628 msgid "second operand must be 1" msgstr "" -#: config/tc-mcore.c:1650 +#: config/tc-mcore.c:1649 msgid "zero used as immediate value" msgstr "" -#: config/tc-mcore.c:1677 +#: config/tc-mcore.c:1676 msgid "duplicated psr bit specifier" msgstr "" -#: config/tc-mcore.c:1683 +#: config/tc-mcore.c:1682 msgid "`af' must appear alone" msgstr "" -#: config/tc-mcore.c:1690 +#: config/tc-mcore.c:1689 #, c-format msgid "unimplemented opcode \"%s\"" msgstr "" -#: config/tc-mcore.c:1699 +#: config/tc-mcore.c:1698 #, c-format msgid "ignoring operands: %s " msgstr "" -#: config/tc-mcore.c:1768 config/tc-w65.c:856 +#: config/tc-mcore.c:1767 config/tc-w65.c:836 msgid "Bad call to MD_NTOF()" msgstr "" -#: config/tc-mcore.c:1841 +#: config/tc-mcore.c:1840 #, c-format msgid "unrecognised cpu type '%s'" msgstr "" -#: config/tc-mcore.c:1860 +#: config/tc-mcore.c:1859 msgid "" "MCORE specific options:\n" " -{no-}jsri2bsr\t {dis}able jsri to bsr transformation (def: dis)\n" @@ -4197,244 +5128,254 @@ msgid "" " -EL assemble for a little endian system\n" msgstr "" -#: config/tc-mcore.c:1879 +#: config/tc-mcore.c:1878 msgid "failed sanity check: short_jump" msgstr "" -#: config/tc-mcore.c:1890 +#: config/tc-mcore.c:1889 msgid "failed sanity check: long_jump" msgstr "" -#: config/tc-mcore.c:1917 +#: config/tc-mcore.c:1916 #, c-format msgid "odd displacement at %x" msgstr "" -#: config/tc-mcore.c:2105 +#: config/tc-mcore.c:2104 msgid "unknown" msgstr "" -#: config/tc-mcore.c:2136 +#: config/tc-mcore.c:2135 #, c-format msgid "odd distance branch (0x%x bytes)" msgstr "" -#: config/tc-mcore.c:2140 +#: config/tc-mcore.c:2139 #, c-format msgid "pcrel for branch to %s too far (0x%x)" msgstr "" -#: config/tc-mcore.c:2159 +#: config/tc-mcore.c:2158 #, c-format msgid "pcrel for lrw/jmpi/jsri to %s too far (0x%x)" msgstr "" -#: config/tc-mcore.c:2170 +#: config/tc-mcore.c:2169 #, c-format msgid "pcrel for loopt too far (0x%x)" msgstr "" -#: config/tc-mcore.c:2402 +#: config/tc-mcore.c:2400 #, c-format msgid "Can not do %d byte %srelocation" msgstr "" -#: config/tc-mcore.c:2404 +#: config/tc-mcore.c:2402 msgid "pc-relative" msgstr "" -#: config/tc-mcore.c:2421 config/tc-pj.c:586 config/tc-sh.c:3005 +#: config/tc-mcore.c:2419 config/tc-pj.c:569 config/tc-sh.c:3326 #, c-format msgid "Cannot represent relocation type %s" msgstr "" -#: config/tc-mips.c:860 -msgid "-G not supported in this configuration." +#: config/tc-mips.c:642 +#, c-format +msgid "internal Error, line %d, %s" msgstr "" -#: config/tc-mips.c:1005 -msgid "trap exception not supported at ISA 1" +#: config/tc-mips.c:644 +msgid "MIPS internal Error" msgstr "" -#: config/tc-mips.c:1046 -msgid "Could not set architecture and machine" +#: config/tc-mips.c:927 +msgid "-G not supported in this configuration." +msgstr "" + +#: config/tc-mips.c:996 +msgid "trap exception not supported at ISA 1" msgstr "" -#: config/tc-mips.c:1085 +#: config/tc-mips.c:1053 #, c-format msgid "internal: can't hash `%s': %s" msgstr "" -#: config/tc-mips.c:1093 +#: config/tc-mips.c:1061 #, c-format msgid "internal error: bad mips16 opcode: %s %s\n" msgstr "" -#: config/tc-mips.c:1262 +#: config/tc-mips.c:1229 #, c-format msgid "returned from mips_ip(%s) insn_opcode = 0x%x\n" msgstr "" -#: config/tc-mips.c:1816 config/tc-mips.c:11394 +#: config/tc-mips.c:1782 config/tc-mips.c:11374 msgid "extended instruction in delay slot" msgstr "" -#: config/tc-mips.c:1838 config/tc-mips.c:1845 +#: config/tc-mips.c:1804 config/tc-mips.c:1811 #, c-format msgid "jump to misaligned address (0x%lx)" msgstr "" -#: config/tc-mips.c:2495 config/tc-mips.c:2836 +#: config/tc-mips.c:2460 config/tc-mips.c:2814 msgid "Macro instruction expanded into multiple instructions" msgstr "" -#: config/tc-mips.c:2889 +#: config/tc-mips.c:2867 msgid "unsupported large constant" msgstr "" -#: config/tc-mips.c:2891 +#: config/tc-mips.c:2869 #, c-format msgid "Instruction %s requires absolute expression" msgstr "" -#: config/tc-mips.c:3037 +#: config/tc-mips.c:3015 msgid "Number larger than 32 bits" msgstr "" -#: config/tc-mips.c:3058 +#: config/tc-mips.c:3036 msgid "Number larger than 64 bits" msgstr "" -#: config/tc-mips.c:3324 config/tc-mips.c:3396 config/tc-mips.c:5075 -#: config/tc-mips.c:5126 config/tc-mips.c:5662 config/tc-mips.c:5725 +#: config/tc-mips.c:3304 config/tc-mips.c:3376 config/tc-mips.c:5055 +#: config/tc-mips.c:5106 config/tc-mips.c:5642 config/tc-mips.c:5705 msgid "PIC code offset overflow (max 16 signed bits)" msgstr "" -#: config/tc-mips.c:3635 +#: config/tc-mips.c:3615 #, c-format msgid "Branch %s is always false (nop)" msgstr "" -#: config/tc-mips.c:3640 +#: config/tc-mips.c:3620 #, c-format msgid "Branch likely %s is always false" msgstr "" -#: config/tc-mips.c:3647 config/tc-mips.c:3721 config/tc-mips.c:3824 -#: config/tc-mips.c:3879 config/tc-mips.c:6762 config/tc-mips.c:6771 -#: config/tc-mips.c:6779 config/tc-mips.c:6888 +#: config/tc-mips.c:3627 config/tc-mips.c:3701 config/tc-mips.c:3804 +#: config/tc-mips.c:3859 config/tc-mips.c:6742 config/tc-mips.c:6751 +#: config/tc-mips.c:6759 config/tc-mips.c:6868 msgid "Unsupported large constant" msgstr "" #. result is always true -#: config/tc-mips.c:3683 +#: config/tc-mips.c:3663 #, c-format msgid "Branch %s is always true" msgstr "" -#: config/tc-mips.c:3955 config/tc-mips.c:4062 +#: config/tc-mips.c:3935 config/tc-mips.c:4042 msgid "Divide by zero." msgstr "" -#: config/tc-mips.c:4646 +#: config/tc-mips.c:4626 msgid "MIPS PIC call to register other than $25" msgstr "" -#: config/tc-mips.c:4651 config/tc-mips.c:4763 +#: config/tc-mips.c:4631 config/tc-mips.c:4743 msgid "No .cprestore pseudo-op used in PIC code" msgstr "" -#: config/tc-mips.c:4836 config/tc-mips.c:4925 config/tc-mips.c:5413 -#: config/tc-mips.c:5454 config/tc-mips.c:5472 config/tc-mips.c:6101 +#: config/tc-mips.c:4816 config/tc-mips.c:4905 config/tc-mips.c:5393 +#: config/tc-mips.c:5434 config/tc-mips.c:5452 config/tc-mips.c:6081 msgid "opcode not supported on this processor" msgstr "" -#: config/tc-mips.c:5932 config/tc-mips.c:6656 +#: config/tc-mips.c:5912 config/tc-mips.c:6636 msgid "Macro used $at after \".set noat\"" msgstr "" -#: config/tc-mips.c:6072 config/tc-mips.c:6090 +#: config/tc-mips.c:6052 config/tc-mips.c:6070 msgid "rotate count too large" msgstr "" -#: config/tc-mips.c:6141 +#: config/tc-mips.c:6121 #, c-format msgid "Instruction %s: result is always false" msgstr "" -#: config/tc-mips.c:6310 +#: config/tc-mips.c:6290 #, c-format msgid "Instruction %s: result is always true" msgstr "" -#: config/tc-mips.c:6449 config/tc-mips.c:6476 config/tc-mips.c:6548 -#: config/tc-mips.c:6573 +#: config/tc-mips.c:6429 config/tc-mips.c:6456 config/tc-mips.c:6528 +#: config/tc-mips.c:6553 msgid "operand overflow" msgstr "" #. FIXME: Check if this is one of the itbl macros, since they #. are added dynamically. -#: config/tc-mips.c:6652 +#: config/tc-mips.c:6632 #, c-format msgid "Macro %s not implemented yet" msgstr "" -#: config/tc-mips.c:6922 +#: config/tc-mips.c:6902 #, c-format msgid "internal: bad mips opcode (mask error): %s %s" msgstr "" -#: config/tc-mips.c:6974 +#: config/tc-mips.c:6958 #, c-format msgid "internal: bad mips opcode (unknown operand type `%c'): %s %s" msgstr "" -#: config/tc-mips.c:6981 +#: config/tc-mips.c:6965 #, c-format msgid "internal: bad mips opcode (bits 0x%lx undefined): %s %s" msgstr "" -#: config/tc-mips.c:7089 +#: config/tc-mips.c:7073 #, c-format -msgid "opcode not supported on this processor: %d (MIPS%d)" +msgid "opcode not supported on this processor: %s (%s)" msgstr "" -#: config/tc-mips.c:7159 +#: config/tc-mips.c:7144 #, c-format msgid "Improper shift amount (%ld)" msgstr "" -#: config/tc-mips.c:7186 config/tc-mips.c:8306 config/tc-mips.c:8421 +#: config/tc-mips.c:7170 config/tc-mips.c:8324 config/tc-mips.c:8439 #, c-format msgid "Invalid value for `%s' (%lu)" msgstr "" -#: config/tc-mips.c:7204 +#: config/tc-mips.c:7188 #, c-format msgid "Illegal break code (%ld)" msgstr "" -#: config/tc-mips.c:7218 +#: config/tc-mips.c:7202 #, c-format msgid "Illegal lower break code (%ld)" msgstr "" -#: config/tc-mips.c:7231 +#: config/tc-mips.c:7215 #, c-format -msgid "Illegal syscall code (%ld)" +msgid "Illegal 20-bit code (%ld)" msgstr "" -#: config/tc-mips.c:7243 +#: config/tc-mips.c:7227 #, c-format msgid "Coproccesor code > 25 bits (%ld)" msgstr "" -#: config/tc-mips.c:7257 +#: config/tc-mips.c:7240 +#, c-format +msgid "Illegal 19-bit code (%ld)" +msgstr "" + +#: config/tc-mips.c:7252 #, c-format msgid "Invalidate performance regster (%ld)" msgstr "" -#: config/tc-mips.c:7293 +#: config/tc-mips.c:7289 #, c-format msgid "Invalid register number (%d)" msgstr "" @@ -4449,11 +5390,11 @@ msgstr "" msgid "Float register should be even, was %d" msgstr "" -#: config/tc-mips.c:7515 config/tc-mips.c:7751 config/tc-mips.c:7790 +#: config/tc-mips.c:7514 msgid "absolute expression required" msgstr "" -#: config/tc-mips.c:7576 +#: config/tc-mips.c:7575 #, c-format msgid "Bad floating point constant: %s" msgstr "" @@ -4462,104 +5403,103 @@ msgstr "" msgid "Can't use floating point insn in this section" msgstr "" -#: config/tc-mips.c:7753 +#: config/tc-mips.c:7751 msgid "16 bit expression not in range 0..65535" msgstr "" -#: config/tc-mips.c:7792 +#: config/tc-mips.c:7788 msgid "16 bit expression not in range -32768..32767" msgstr "" -#: config/tc-mips.c:7863 +#: config/tc-mips.c:7859 msgid "lui expression not in range 0..65535" msgstr "" -#: config/tc-mips.c:7887 +#: config/tc-mips.c:7883 #, c-format msgid "invalid condition code register $fcc%d" msgstr "" -#: config/tc-mips.c:7895 +#: config/tc-mips.c:7908 +msgid "invalid coprocessor sub-selection value (0-7)" +msgstr "" + +#: config/tc-mips.c:7913 #, c-format msgid "bad char = '%c'\n" msgstr "" -#: config/tc-mips.c:7908 config/tc-mips.c:8446 +#: config/tc-mips.c:7926 config/tc-mips.c:8464 msgid "illegal operands" msgstr "" -#: config/tc-mips.c:7975 +#: config/tc-mips.c:7993 msgid "unrecognized opcode" msgstr "" -#: config/tc-mips.c:8084 +#: config/tc-mips.c:8102 #, c-format msgid "invalid register number (%d)" msgstr "" -#: config/tc-mips.c:8165 +#: config/tc-mips.c:8183 msgid "used $at without \".set noat\"" msgstr "" -#: config/tc-mips.c:8340 +#: config/tc-mips.c:8358 msgid "can't parse register list" msgstr "" -#: config/tc-mips.c:8374 config/tc-mips.c:8404 +#: config/tc-mips.c:8392 config/tc-mips.c:8422 msgid "invalid register list" msgstr "" -#: config/tc-mips.c:8571 +#: config/tc-mips.c:8590 msgid "extended operand requested but not required" msgstr "" -#: config/tc-mips.c:8573 +#: config/tc-mips.c:8592 msgid "invalid unextended operand value" msgstr "" -#: config/tc-mips.c:8601 +#: config/tc-mips.c:8620 msgid "operand value out of range for instruction" msgstr "" -#: config/tc-mips.c:9052 -#, c-format -msgid "ignoring invalid leading 'v' in -mcpu=%s switch" -msgstr "" - -#: config/tc-mips.c:9058 +#: config/tc-mips.c:9005 #, c-format msgid "invalid architecture -mcpu=%s" msgstr "" -#: config/tc-mips.c:9108 +#: config/tc-mips.c:9054 msgid "-G may not be used with embedded PIC code" msgstr "" -#: config/tc-mips.c:9120 +#: config/tc-mips.c:9066 msgid "-call_shared is supported only for ELF format" msgstr "" -#: config/tc-mips.c:9126 config/tc-mips.c:10205 config/tc-mips.c:10373 +#: config/tc-mips.c:9072 config/tc-mips.c:10158 config/tc-mips.c:10332 msgid "-G may not be used with SVR4 PIC code" msgstr "" -#: config/tc-mips.c:9135 +#: config/tc-mips.c:9081 msgid "-non_shared is supported only for ELF format" msgstr "" -#: config/tc-mips.c:9151 +#: config/tc-mips.c:9097 msgid "-G is not supported for this configuration" msgstr "" -#: config/tc-mips.c:9156 +#: config/tc-mips.c:9102 msgid "-G may not be used with SVR4 or embedded PIC code" msgstr "" -#: config/tc-mips.c:9180 +#: config/tc-mips.c:9126 msgid "No compiled in support for 64 bit object file format" msgstr "" -#: config/tc-mips.c:9270 +#: config/tc-mips.c:9218 msgid "" "MIPS options:\n" "-membedded-pic\t\tgenerate embedded position independent code\n" @@ -4570,37 +5510,41 @@ msgid "" "\t\t\timplicitly with the gp register [default 8]\n" msgstr "" -#: config/tc-mips.c:9278 +#: config/tc-mips.c:9226 msgid "" "-mips1\t\t\tgenerate MIPS ISA I instructions\n" "-mips2\t\t\tgenerate MIPS ISA II instructions\n" "-mips3\t\t\tgenerate MIPS ISA III instructions\n" "-mips4\t\t\tgenerate MIPS ISA IV instructions\n" +"-mips5 generate MIPS ISA V instructions\n" +"-mips32 generate MIPS32 ISA instructions\n" +"-mips64 generate MIPS64 ISA instructions\n" "-mcpu=CPU\t\tgenerate code for CPU, where CPU is one of:\n" msgstr "" -#: config/tc-mips.c:9304 +#: config/tc-mips.c:9257 msgid "" "-mCPU\t\t\tequivalent to -mcpu=CPU.\n" "-no-mCPU\t\tdon't generate code specific to CPU.\n" "\t\t\tFor -mCPU and -no-mCPU, CPU must be one of:\n" msgstr "" -#: config/tc-mips.c:9317 +#: config/tc-mips.c:9270 msgid "" "-mips16\t\t\tgenerate mips16 instructions\n" "-no-mips16\t\tdo not generate mips16 instructions\n" msgstr "" -#: config/tc-mips.c:9320 +#: config/tc-mips.c:9273 msgid "" "-O0\t\t\tremove unneeded NOPs, do not swap branches\n" "-O\t\t\tremove unneeded NOPs and swap branches\n" +"--[no-]construct-floats [dis]allow floating point values to be constructed\n" "--trap, --no-break\ttrap exception on div by 0 and mult overflow\n" "--break, --no-trap\tbreak exception on div by 0 and mult overflow\n" msgstr "" -#: config/tc-mips.c:9326 +#: config/tc-mips.c:9280 msgid "" "-KPIC, -call_shared\tgenerate SVR4 position independent code\n" "-non_shared\t\tdo not generate position independent code\n" @@ -4609,408 +5553,429 @@ msgid "" "-64\t\t\tcreate 64 bit object file\n" msgstr "" -#: config/tc-mips.c:9383 +#: config/tc-mips.c:9337 #, c-format msgid "Unsupported reloc size %d" msgstr "" -#: config/tc-mips.c:9486 +#: config/tc-mips.c:9440 msgid "Unmatched %%hi reloc" msgstr "" -#: config/tc-mips.c:9610 +#: config/tc-mips.c:9563 msgid "Invalid PC relative reloc" msgstr "" -#: config/tc-mips.c:9720 config/tc-sparc.c:2925 config/tc-sparc.c:2932 -#: config/tc-sparc.c:2939 config/tc-sparc.c:2946 config/tc-sparc.c:2953 -#: config/tc-sparc.c:2962 config/tc-sparc.c:2973 config/tc-sparc.c:2999 -#: config/tc-sparc.c:3027 write.c:971 write.c:1035 +#: config/tc-mips.c:9673 config/tc-sparc.c:3101 config/tc-sparc.c:3108 +#: config/tc-sparc.c:3115 config/tc-sparc.c:3122 config/tc-sparc.c:3129 +#: config/tc-sparc.c:3138 config/tc-sparc.c:3149 config/tc-sparc.c:3175 +#: config/tc-sparc.c:3203 write.c:992 write.c:1056 msgid "relocation overflow" msgstr "" -#: config/tc-mips.c:9736 +#: config/tc-mips.c:9689 #, c-format msgid "Branch to odd address (%lx)" msgstr "" -#: config/tc-mips.c:9900 +#: config/tc-mips.c:9853 #, c-format msgid "%08lx UNDEFINED\n" msgstr "" -#: config/tc-mips.c:9966 +#: config/tc-mips.c:9919 msgid "Alignment negative: 0 assumed." msgstr "" -#: config/tc-mips.c:10054 +#: config/tc-mips.c:10007 msgid "No read only data section in this object file format" msgstr "" -#: config/tc-mips.c:10077 +#: config/tc-mips.c:10030 msgid "Global pointers not supported; recompile -G 0" msgstr "" -#: config/tc-mips.c:10163 +#: config/tc-mips.c:10116 #, c-format msgid "%s: no such section" msgstr "" -#: config/tc-mips.c:10200 +#: config/tc-mips.c:10153 #, c-format msgid ".option pic%d not supported" msgstr "" -#: config/tc-mips.c:10211 +#: config/tc-mips.c:10164 #, c-format msgid "Unrecognized option \"%s\"" msgstr "" -#: config/tc-mips.c:10274 +#: config/tc-mips.c:10227 msgid "`noreorder' must be set before `nomacro'" msgstr "" -#: config/tc-mips.c:10309 +#: config/tc-mips.c:10269 msgid "unknown ISA level" msgstr "" -#: config/tc-mips.c:10332 +#: config/tc-mips.c:10291 msgid ".set pop with no .set push" msgstr "" -#: config/tc-mips.c:10356 +#: config/tc-mips.c:10315 #, c-format msgid "Tried to set unrecognized symbol: %s\n" msgstr "" -#: config/tc-mips.c:10406 +#: config/tc-mips.c:10365 msgid ".cpload not in noreorder section" msgstr "" -#: config/tc-mips.c:10488 +#: config/tc-mips.c:10447 msgid "Unsupported use of .gpword" msgstr "" -#: config/tc-mips.c:10625 +#: config/tc-mips.c:10584 msgid "expected `$'" msgstr "" -#: config/tc-mips.c:10633 +#: config/tc-mips.c:10592 msgid "Bad register number" msgstr "" -#: config/tc-mips.c:10649 +#: config/tc-mips.c:10608 msgid "Unrecognized register name" msgstr "" -#: config/tc-mips.c:10848 +#: config/tc-mips.c:10807 msgid "unsupported PC relative reference to different section" msgstr "" -#: config/tc-mips.c:10957 +#: config/tc-mips.c:10916 msgid "unsupported relocation" msgstr "" -#: config/tc-mips.c:11040 +#: config/tc-mips.c:11020 msgid "AT used after \".set noat\" or macro used after \".set nomacro\"" msgstr "" -#: config/tc-mips.c:11103 +#: config/tc-mips.c:11083 msgid "Double check fx_r_type in tc-mips.c:tc_gen_reloc" msgstr "" -#: config/tc-mips.c:11615 +#: config/tc-mips.c:11596 msgid "missing `.end' at end of assembly" msgstr "" -#: config/tc-mips.c:11630 +#: config/tc-mips.c:11611 msgid "Expected simple number." msgstr "" -#: config/tc-mips.c:11656 +#: config/tc-mips.c:11637 #, c-format msgid " *input_line_pointer == '%c' 0x%02x\n" msgstr "" -#: config/tc-mips.c:11658 +#: config/tc-mips.c:11639 msgid "Invalid number" msgstr "" -#: config/tc-mips.c:11713 +#: config/tc-mips.c:11693 msgid ".end not in text section" msgstr "" -#: config/tc-mips.c:11717 +#: config/tc-mips.c:11697 msgid ".end directive without a preceding .ent directive." msgstr "" -#: config/tc-mips.c:11726 +#: config/tc-mips.c:11706 msgid ".end symbol does not match .ent symbol." msgstr "" -#: config/tc-mips.c:11729 +#: config/tc-mips.c:11709 msgid ".end directive missing or unknown symbol" msgstr "" -#: config/tc-mips.c:11804 +#: config/tc-mips.c:11784 msgid ".ent or .aent not in text section." msgstr "" -#: config/tc-mips.c:11807 +#: config/tc-mips.c:11787 msgid "missing `.end'" msgstr "" -#: config/tc-mips.c:11840 ecoff.c:3227 +#: config/tc-mips.c:11820 ecoff.c:3205 msgid ".frame outside of .ent" msgstr "" -#: config/tc-mips.c:11851 ecoff.c:3238 +#: config/tc-mips.c:11831 ecoff.c:3216 msgid "Bad .frame directive" msgstr "" -#: config/tc-mips.c:11881 +#: config/tc-mips.c:11861 msgid ".mask/.fmask outside of .ent" msgstr "" -#: config/tc-mips.c:11888 +#: config/tc-mips.c:11868 msgid "Bad .mask/.fmask directive" msgstr "" -#: config/tc-mn10200.c:313 +#: config/tc-mn10200.c:333 msgid "" "MN10200 options:\n" "none yet\n" msgstr "" -#: config/tc-mn10200.c:788 config/tc-mn10300.c:912 config/tc-ppc.c:1614 -#: config/tc-v850.c:1691 +#: config/tc-mn10200.c:807 config/tc-mn10300.c:953 config/tc-ppc.c:1736 +#: config/tc-v850.c:1728 #, c-format msgid "Unrecognized opcode: `%s'" msgstr "" -#: config/tc-mn10300.c:495 +#: config/tc-mn10200.c:1050 config/tc-mn10300.c:1476 config/tc-ppc.c:2097 +#: config/tc-v850.c:2152 +#, c-format +msgid "junk at end of line: `%s'" +msgstr "" + +#: config/tc-mn10200.c:1374 config/tc-mn10300.c:2045 config/tc-ppc.c:1224 +#: config/tc-v850.c:1656 +#, c-format +msgid "operand out of range (%s not between %ld and %ld)" +msgstr "" + +#: config/tc-mn10300.c:542 msgid "" "MN10300 options:\n" "none yet\n" msgstr "" -#: config/tc-mn10300.c:930 +#: config/tc-mn10300.c:970 msgid "Invalid opcode/operands" msgstr "" -#: config/tc-mn10300.c:1406 +#: config/tc-mn10300.c:1447 msgid "Invalid register specification." msgstr "" -#: config/tc-ns32k.c:444 +#: config/tc-ns32k.c:446 msgid "Invalid syntax in PC-relative addressing mode" msgstr "" -#: config/tc-ns32k.c:468 +#: config/tc-ns32k.c:470 msgid "Invalid syntax in External addressing mode" msgstr "" -#: config/tc-ns32k.c:537 +#: config/tc-ns32k.c:550 msgid "Invalid syntax in Memory Relative addressing mode" msgstr "" -#: config/tc-ns32k.c:604 +#: config/tc-ns32k.c:617 msgid "Invalid scaled-indexed mode, use (b,w,d,q)" msgstr "" -#: config/tc-ns32k.c:609 +#: config/tc-ns32k.c:622 msgid "Syntax in scaled-indexed mode, use [Rn:m] where n=[0..7] m={b,w,d,q}" msgstr "" -#: config/tc-ns32k.c:615 +#: config/tc-ns32k.c:627 msgid "Scaled-indexed addressing mode combined with scaled-index" msgstr "" -#: config/tc-ns32k.c:624 +#: config/tc-ns32k.c:638 msgid "Invalid or illegal addressing mode combined with scaled-index" msgstr "" -#: config/tc-ns32k.c:731 +#: config/tc-ns32k.c:750 msgid "Premature end of suffix -- Defaulting to d" msgstr "" -#: config/tc-ns32k.c:744 +#: config/tc-ns32k.c:763 msgid "Bad suffix after ':' use {b|w|d} Defaulting to d" msgstr "" -#: config/tc-ns32k.c:785 +#: config/tc-ns32k.c:809 msgid "Very short instr to option, ie you can't do it on a NULLstr" msgstr "" -#: config/tc-ns32k.c:829 +#: config/tc-ns32k.c:860 msgid "No such entry in list. (cpu/mmu register)" msgstr "" -#: config/tc-ns32k.c:870 +#: config/tc-ns32k.c:901 msgid "Internal consistency error. check ns32k-opcode.h" msgstr "" -#: config/tc-ns32k.c:891 +#: config/tc-ns32k.c:925 msgid "Address of immediate operand" msgstr "" -#: config/tc-ns32k.c:892 +#: config/tc-ns32k.c:926 msgid "Invalid immediate write operand." msgstr "" -#: config/tc-ns32k.c:1019 +#: config/tc-ns32k.c:1056 msgid "Bad opcode-table-option, check in file ns32k-opcode.h" msgstr "" -#: config/tc-ns32k.c:1048 +#: config/tc-ns32k.c:1089 msgid "No such opcode" msgstr "" -#: config/tc-ns32k.c:1116 +#: config/tc-ns32k.c:1166 msgid "Bad suffix, defaulting to d" msgstr "" -#: config/tc-ns32k.c:1138 +#: config/tc-ns32k.c:1194 msgid "Too many operands passed to instruction" msgstr "" -#. check error in default -#: config/tc-ns32k.c:1149 +#. Check error in default. +#: config/tc-ns32k.c:1207 msgid "Wrong numbers of operands in default, check ns32k-opcodes.h" msgstr "" -#: config/tc-ns32k.c:1154 +#: config/tc-ns32k.c:1211 msgid "Wrong number of operands" msgstr "" -#: config/tc-ns32k.c:1273 +#: config/tc-ns32k.c:1332 msgid "iif convert internal pcrel/binary" msgstr "" -#: config/tc-ns32k.c:1289 +#: config/tc-ns32k.c:1349 msgid "Bignum too big for long" msgstr "" -#: config/tc-ns32k.c:1364 +#: config/tc-ns32k.c:1427 msgid "iif convert internal pcrel/pointer" msgstr "" -#: config/tc-ns32k.c:1369 +#: config/tc-ns32k.c:1432 msgid "Internal logic error in iif.iifP[n].type" msgstr "" -#. We cant relax this case -#: config/tc-ns32k.c:1403 +#. We cant relax this case. +#: config/tc-ns32k.c:1470 msgid "Can't relax difference" msgstr "" -#: config/tc-ns32k.c:1452 +#: config/tc-ns32k.c:1518 msgid "Displacement to large for :d" msgstr "" -#: config/tc-ns32k.c:1463 +#: config/tc-ns32k.c:1531 msgid "Internal logic error in iif.iifP[].type" msgstr "" -#: config/tc-ns32k.c:1518 +#: config/tc-ns32k.c:1591 #, c-format msgid "Can not do %d byte pc-relative relocation for storage type %d" msgstr "" -#: config/tc-ns32k.c:1521 +#: config/tc-ns32k.c:1594 #, c-format msgid "Can not do %d byte relocation for storage type %d" msgstr "" -#: config/tc-ns32k.c:1553 +#. Fatal. +#: config/tc-ns32k.c:1626 #, c-format msgid "Can't hash %s: %s" msgstr "" -#: config/tc-ns32k.c:1637 +#: config/tc-ns32k.c:1714 msgid "Byte displacement out of range. line number not valid" msgstr "" -#: config/tc-ns32k.c:1646 +#: config/tc-ns32k.c:1723 msgid "Word displacement out of range. line number not valid" msgstr "" -#: config/tc-ns32k.c:1660 +#: config/tc-ns32k.c:1737 msgid "Double word displacement out of range" msgstr "" -#: config/tc-ns32k.c:1680 +#: config/tc-ns32k.c:1757 #, c-format msgid "Internal logic error. line %s, file \"%s\"" msgstr "" -#: config/tc-ns32k.c:1728 +#: config/tc-ns32k.c:1805 #, c-format msgid "Internal logic error. line %s, file \"%s\"" msgstr "" -#: config/tc-ns32k.c:1839 +#: config/tc-ns32k.c:1909 msgid "Bit field out of range" msgstr "" -#: config/tc-ns32k.c:2088 +#: config/tc-ns32k.c:2176 #, c-format msgid "invalid architecture option -m%s" msgstr "" -#: config/tc-ns32k.c:2104 +#: config/tc-ns32k.c:2192 msgid "" "NS32K options:\n" "-m32032 | -m32532\tselect variant of NS32K architecture\n" msgstr "" -#: config/tc-ns32k.c:2284 +#: config/tc-ns32k.c:2370 #, c-format msgid "Cannot find relocation type for symbol %s, code %d" msgstr "" -#: config/tc-pj.c:70 config/tc-pj.c:78 +#: config/tc-pj.c:66 config/tc-pj.c:74 msgid "confusing relocation expressions" msgstr "" -#: config/tc-pj.c:172 +#: config/tc-pj.c:165 msgid "can't have relocation for ipush" msgstr "" -#: config/tc-pj.c:282 +#: config/tc-pj.c:272 #, c-format msgid "unknown opcode %s" msgstr "" -#: config/tc-pj.c:431 +#: config/tc-pj.c:421 msgid "" "PJ options:\n" "-little\t\t\tgenerate little endian code\n" "-big\t\t\tgenerate big endian code\n" msgstr "" -#: config/tc-pj.c:472 config/tc-sh.c:2577 config/tc-sh.c:2584 -#: config/tc-sh.c:2591 config/tc-sh.c:2598 +#: config/tc-pj.c:458 config/tc-sh.c:2899 config/tc-sh.c:2906 +#: config/tc-sh.c:2913 config/tc-sh.c:2920 msgid "pcrel too far" msgstr "" -#: config/tc-pj.c:541 config/tc-sh.c:2670 +#: config/tc-pj.c:526 config/tc-sh.c:3011 msgid "offset out of range" msgstr "" -#: config/tc-ppc.c:835 +#: config/tc-pj.h:38 +msgid "convert_frag\n" +msgstr "" + +#: config/tc-pj.h:39 +msgid "estimate size\n" +msgstr "" + +#: config/tc-ppc.c:926 #, c-format msgid "invalid switch -m%s" msgstr "" -#: config/tc-ppc.c:872 +#: config/tc-ppc.c:963 msgid "" "PowerPC options:\n" "-u\t\t\tignored\n" "-mpwrx, -mpwr2\t\tgenerate code for IBM POWER/2 (RIOS2)\n" "-mpwr\t\t\tgenerate code for IBM POWER (RIOS1)\n" "-m601\t\t\tgenerate code for Motorola PowerPC 601\n" -"-mppc, -mppc32, -m403, -m603, -m604\n" +"-mppc, -mppc32, -m403, -m405, -m603, -m604\n" "\t\t\tgenerate code for Motorola PowerPC 603/604\n" "-mppc64, -m620\t\tgenerate code for Motorola PowerPC 620\n" "-mppc64bridge\t\tgenerate code for PowerPC 64, including bridge insns\n" @@ -5020,7 +5985,7 @@ msgid "" "-mno-regnames\t\tDo not allow symbolic names for registers\n" msgstr "" -#: config/tc-ppc.c:887 +#: config/tc-ppc.c:978 msgid "" "-mrelocatable\t\tsupport for GCC's -mrelocatble option\n" "-mrelocatable-lib\tsupport for GCC's -mrelocatble-lib option\n" @@ -5034,305 +5999,313 @@ msgid "" "-Qy, -Qn\t\tignored\n" msgstr "" -#: config/tc-ppc.c:922 +#: config/tc-ppc.c:1013 #, c-format msgid "Unknown default cpu = %s, os = %s" msgstr "" -#: config/tc-ppc.c:947 +#: config/tc-ppc.c:1038 msgid "Neither Power nor PowerPC opcodes were selected." msgstr "" -#: config/tc-ppc.c:995 +#: config/tc-ppc.c:1117 #, c-format msgid "Internal assembler error for instruction %s" msgstr "" -#: config/tc-ppc.c:1014 +#: config/tc-ppc.c:1136 #, c-format msgid "Internal assembler error for macro %s" msgstr "" -#: config/tc-ppc.c:1224 +#: config/tc-ppc.c:1346 msgid "identifier+constant@got means identifier@got+constant" msgstr "" -#: config/tc-ppc.c:1278 +#: config/tc-ppc.c:1400 config/tc-sh.c:341 config/tc-sh.c:369 #, c-format msgid "%s relocations do not fit in %d bytes\n" msgstr "" -#: config/tc-ppc.c:1378 +#: config/tc-ppc.c:1500 #, c-format msgid "Length of .lcomm \"%s\" is already %ld. Not changed to %ld." msgstr "" -#: config/tc-ppc.c:1460 +#: config/tc-ppc.c:1582 msgid "Relocation cannot be done when using -mrelocatable" msgstr "" -#: config/tc-ppc.c:1541 +#: config/tc-ppc.c:1663 #, c-format msgid "syntax error: invalid toc specifier `%s'" msgstr "" -#: config/tc-ppc.c:1555 +#: config/tc-ppc.c:1677 #, c-format msgid "syntax error: expected `]', found `%c'" msgstr "" -#: config/tc-ppc.c:1790 +#: config/tc-ppc.c:1912 msgid "[tocv] symbol is not a toc symbol" msgstr "" -#: config/tc-ppc.c:1801 +#: config/tc-ppc.c:1923 msgid "Unimplemented toc32 expression modifier" msgstr "" -#: config/tc-ppc.c:1806 +#: config/tc-ppc.c:1928 msgid "Unimplemented toc64 expression modifier" msgstr "" -#: config/tc-ppc.c:1810 +#: config/tc-ppc.c:1932 #, c-format msgid "Unexpected return value [%d] from parse_toc_entry!\n" msgstr "" -#: config/tc-ppc.c:1963 +#: config/tc-ppc.c:2085 #, c-format msgid "syntax error; found `%c' but expected `%c'" msgstr "" -#: config/tc-ppc.c:2071 +#: config/tc-ppc.c:2197 msgid "wrong number of operands" msgstr "" -#: config/tc-ppc.c:2127 +#: config/tc-ppc.c:2253 msgid "Bad .section directive: want a,w,x,e in string" msgstr "" -#: config/tc-ppc.c:2241 +#: config/tc-ppc.c:2367 msgid "missing size" msgstr "" -#: config/tc-ppc.c:2250 +#: config/tc-ppc.c:2376 msgid "negative size" msgstr "" -#: config/tc-ppc.c:2291 +#: config/tc-ppc.c:2417 msgid "missing real symbol name" msgstr "" -#: config/tc-ppc.c:2312 +#: config/tc-ppc.c:2438 msgid "attempt to redefine symbol" msgstr "" -#: config/tc-ppc.c:2546 +#: config/tc-ppc.c:2672 msgid "The XCOFF file format does not support arbitrary sections" msgstr "" -#: config/tc-ppc.c:2654 config/tc-ppc.c:3171 read.c:2985 +#: config/tc-ppc.c:2749 +msgid "missing rename string" +msgstr "" + +#: config/tc-ppc.c:2780 config/tc-ppc.c:3305 read.c:2992 msgid "missing value" msgstr "" -#: config/tc-ppc.c:2672 +#: config/tc-ppc.c:2798 msgid "illegal .stabx expression; zero assumed" msgstr "" -#: config/tc-ppc.c:2704 +#: config/tc-ppc.c:2830 msgid "missing class" msgstr "" -#: config/tc-ppc.c:2713 +#: config/tc-ppc.c:2839 msgid "missing type" msgstr "" -#: config/tc-ppc.c:2774 +#: config/tc-ppc.c:2900 msgid "missing symbol name" msgstr "" -#: config/tc-ppc.c:2950 +#: config/tc-ppc.c:3076 msgid "nested .bs blocks" msgstr "" -#: config/tc-ppc.c:2983 +#: config/tc-ppc.c:3109 msgid ".es without preceding .bs" msgstr "" -#: config/tc-ppc.c:3163 +#: config/tc-ppc.c:3297 msgid "non-constant byte count" msgstr "" -#: config/tc-ppc.c:3208 +#: config/tc-ppc.c:3342 msgid ".tc not in .toc section" msgstr "" -#: config/tc-ppc.c:3227 +#: config/tc-ppc.c:3361 msgid ".tc with no label" msgstr "" -#: config/tc-ppc.c:3302 +#: config/tc-ppc.c:3436 msgid "No previous section to return to. Directive ignored." msgstr "" #. Section Contents #. unknown -#: config/tc-ppc.c:3721 +#: config/tc-ppc.c:3855 msgid "Unsupported section attribute -- 'a'" msgstr "" -#: config/tc-ppc.c:3911 +#: config/tc-ppc.c:4045 msgid "bad symbol suffix" msgstr "" -#: config/tc-ppc.c:4004 +#: config/tc-ppc.c:4138 msgid "Unrecognized symbol suffix" msgstr "" -#: config/tc-ppc.c:4086 +#: config/tc-ppc.c:4220 msgid "two .function pseudo-ops with no intervening .ef" msgstr "" -#: config/tc-ppc.c:4099 +#: config/tc-ppc.c:4233 msgid ".ef with no preceding .function" msgstr "" -#: config/tc-ppc.c:4227 +#: config/tc-ppc.c:4361 #, c-format msgid "warning: symbol %s has no csect" msgstr "" -#: config/tc-ppc.c:4528 +#: config/tc-ppc.c:4662 msgid "symbol in .toc does not match any .tc" msgstr "" -#: config/tc-ppc.c:4826 +#: config/tc-ppc.c:4956 config/tc-v850.c:2431 +msgid "unresolved expression that must be resolved" +msgstr "" + +#: config/tc-ppc.c:4959 msgid "unsupported relocation type" msgstr "" -#: config/tc-ppc.c:4880 +#: config/tc-ppc.c:5021 #, c-format msgid "cannot emit PC relative %s relocation against %s" msgstr "" -#: config/tc-ppc.c:4885 +#: config/tc-ppc.c:5026 #, c-format msgid "cannot emit PC relative %s relocation" msgstr "" -#: config/tc-ppc.c:4947 +#: config/tc-ppc.c:5088 msgid "must branch to an address a multiple of 4" msgstr "" -#: config/tc-ppc.c:4951 +#: config/tc-ppc.c:5092 #, c-format msgid "@local or @plt branch destination is too far away, %ld bytes" msgstr "" -#: config/tc-ppc.c:4975 +#: config/tc-ppc.c:5116 #, c-format msgid "Gas failure, reloc value %d\n" msgstr "" -#: config/tc-sh.c:675 +#: config/tc-sh.c:878 msgid "illegal register after @-" msgstr "" -#: config/tc-sh.c:691 +#: config/tc-sh.c:894 msgid "must be @(r0,...)" msgstr "" -#: config/tc-sh.c:707 +#: config/tc-sh.c:910 msgid "syntax error in @(r0,...)" msgstr "" -#: config/tc-sh.c:739 config/tc-sh.c:744 +#: config/tc-sh.c:943 config/tc-sh.c:948 msgid "syntax error in @(disp,[Rn, gbr, pc])" msgstr "" -#: config/tc-sh.c:749 +#: config/tc-sh.c:953 msgid "expecting )" msgstr "" -#: config/tc-sh.c:758 +#: config/tc-sh.c:962 msgid "illegal register after @" msgstr "" -#: config/tc-sh.c:1262 +#: config/tc-sh.c:1523 #, c-format msgid "Invalid register: 'r%d'" msgstr "" -#: config/tc-sh.c:1398 +#: config/tc-sh.c:1686 msgid "insn can't be combined with parallel processing insn" msgstr "" -#: config/tc-sh.c:1405 config/tc-sh.c:1416 +#: config/tc-sh.c:1693 config/tc-sh.c:1704 msgid "multiple movx specifications" msgstr "" -#: config/tc-sh.c:1410 config/tc-sh.c:1437 +#: config/tc-sh.c:1698 config/tc-sh.c:1725 msgid "multiple movy specifications" msgstr "" -#: config/tc-sh.c:1418 +#: config/tc-sh.c:1706 msgid "invalid movx address register" msgstr "" -#: config/tc-sh.c:1424 config/tc-sh.c:1429 +#: config/tc-sh.c:1712 config/tc-sh.c:1717 msgid "invalid movx dsp register" msgstr "" -#: config/tc-sh.c:1446 config/tc-sh.c:1451 +#: config/tc-sh.c:1734 config/tc-sh.c:1739 msgid "invalid movy dsp register" msgstr "" -#: config/tc-sh.c:1455 +#: config/tc-sh.c:1743 msgid "invalid movy address register" msgstr "" -#: config/tc-sh.c:1461 +#: config/tc-sh.c:1749 msgid "dsp immediate shift value not constant" msgstr "" -#: config/tc-sh.c:1468 config/tc-sh.c:1481 +#: config/tc-sh.c:1756 config/tc-sh.c:1769 msgid "multiple parallel processing specifications" msgstr "" -#: config/tc-sh.c:1474 +#: config/tc-sh.c:1762 msgid "multiple condition specifications" msgstr "" -#: config/tc-sh.c:1490 +#: config/tc-sh.c:1778 msgid "insn cannot be combined with pmuls" msgstr "" -#: config/tc-sh.c:1507 +#: config/tc-sh.c:1795 msgid "bad padd / psub pmuls output operand" msgstr "" -#: config/tc-sh.c:1517 +#: config/tc-sh.c:1805 msgid "condition not followed by conditionalizable insn" msgstr "" -#: config/tc-sh.c:1527 +#: config/tc-sh.c:1815 msgid "unrecognized characters at end of parallel processing insn" msgstr "" -#: config/tc-sh.c:1637 +#: config/tc-sh.c:1931 #, c-format msgid "excess operands: '%s'" msgstr "" -#: config/tc-sh.c:1783 +#: config/tc-sh.c:2099 msgid ".uses pseudo-op seen when not relaxing" msgstr "" -#: config/tc-sh.c:1789 +#: config/tc-sh.c:2105 msgid "bad .uses format" msgstr "" -#: config/tc-sh.c:1850 +#: config/tc-sh.c:2166 msgid "" "SH options:\n" "-little\t\t\tgenerate little endian code\n" @@ -5341,139 +6314,129 @@ msgid "" "-dsp\t\t\tenable sh-dsp insns, and disable sh3e / sh4 insns.\n" msgstr "" -#: config/tc-sh.c:1861 config/tc-w65.c:883 +#: config/tc-sh.c:2177 config/tc-w65.c:862 msgid "call to tc_Nout_fix_to_chars \n" msgstr "" -#: config/tc-sh.c:1947 +#: config/tc-sh.c:2261 msgid ".uses does not refer to a local symbol in the same section" msgstr "" -#: config/tc-sh.c:1966 +#: config/tc-sh.c:2280 msgid "can't find fixup pointed to by .uses" msgstr "" -#: config/tc-sh.c:1989 +#: config/tc-sh.c:2303 msgid ".uses target does not refer to a local symbol in the same section" msgstr "" -#: config/tc-sh.c:2086 -#, c-format -msgid "at 0x%lx, displacement overflows 12-bit field" +#: config/tc-sh.c:2401 +msgid "displacement overflows 12-bit field" msgstr "" -#: config/tc-sh.c:2089 +#: config/tc-sh.c:2404 #, c-format -msgid "at 0x%lx, displacement to defined symbol %s overflows 12-bit field" +msgid "displacement to defined symbol %s overflows 12-bit field" msgstr "" -#: config/tc-sh.c:2093 +#: config/tc-sh.c:2408 #, c-format -msgid "at 0x%lx, displacement to undefined symbol %s overflows 12-bit field" +msgid "displacement to undefined symbol %s overflows 12-bit field" msgstr "" -#: config/tc-sh.c:2209 -#, c-format -msgid "at 0x%lx, displacement overflows 8-bit field" +#: config/tc-sh.c:2486 +msgid "displacement overflows 8-bit field" msgstr "" -#: config/tc-sh.c:2212 +#: config/tc-sh.c:2489 #, c-format -msgid "at 0x%lx, displacement to defined symbol %s overflows 8-bit field " +msgid "displacement to defined symbol %s overflows 8-bit field" msgstr "" -#: config/tc-sh.c:2216 +#: config/tc-sh.c:2493 #, c-format -msgid "at 0x%lx, displacement to undefined symbol %s overflows 8-bit field " +msgid "displacement to undefined symbol %s overflows 8-bit field " msgstr "" -#: config/tc-sh.c:2269 +#: config/tc-sh.c:2506 #, c-format msgid "overflow in branch to %s; converted into longer instruction sequence" msgstr "" -#: config/tc-sh.c:2344 config/tc-sh.c:2372 config/tc-sparc.c:3902 -#: config/tc-sparc.c:3921 +#: config/tc-sh.c:2581 config/tc-sh.c:2629 config/tc-sparc.c:4084 +#: config/tc-sparc.c:4109 msgid "misaligned data" msgstr "" -#: config/tc-sh.c:2662 +#: config/tc-sh.c:3003 msgid "misaligned offset" msgstr "" -#: config/tc-sparc.c:268 +#: config/tc-sparc.c:280 msgid "Invalid default architecture, broken assembler." msgstr "" -#: config/tc-sparc.c:272 config/tc-sparc.c:465 +#: config/tc-sparc.c:284 config/tc-sparc.c:487 msgid "Bad opcode table, broken assembler." msgstr "" -#: config/tc-sparc.c:444 +#: config/tc-sparc.c:479 #, c-format msgid "invalid architecture -xarch=%s" msgstr "" -#: config/tc-sparc.c:459 +#: config/tc-sparc.c:481 #, c-format msgid "invalid architecture -A%s" msgstr "" -#: config/tc-sparc.c:526 -#, c-format -msgid "No compiled in support for %d bit object file format" -msgstr "" - -#: config/tc-sparc.c:563 +#: config/tc-sparc.c:585 msgid "Unrecognized option following -K" msgstr "" -#: config/tc-sparc.c:595 +#: config/tc-sparc.c:626 msgid "SPARC options:\n" msgstr "" -#: config/tc-sparc.c:603 +#: config/tc-sparc.c:655 msgid "" "\n" -"-xarch=v8plus | -xarch=v8plusa\n" -msgstr "" - -#: config/tc-sparc.c:604 -msgid "" "\t\t\tspecify variant of SPARC architecture\n" "-bump\t\t\twarn when assembler switches architectures\n" "-sparc\t\t\tignored\n" "--enforce-aligned-data\tforce .long, etc., to be aligned correctly\n" +"-relax\t\t\trelax jumps and branches (default)\n" +"-no-relax\t\tavoid changing any jumps and branches\n" msgstr "" -#: config/tc-sparc.c:610 +#: config/tc-sparc.c:663 msgid "-k\t\t\tgenerate PIC\n" msgstr "" -#: config/tc-sparc.c:614 +#: config/tc-sparc.c:667 msgid "" "-32\t\t\tcreate 32 bit object file\n" "-64\t\t\tcreate 64 bit object file\n" msgstr "" -#: config/tc-sparc.c:617 +#: config/tc-sparc.c:670 #, c-format msgid "\t\t\t[default is %d]\n" msgstr "" -#: config/tc-sparc.c:619 +#: config/tc-sparc.c:672 msgid "" "-TSO\t\t\tuse Total Store Ordering\n" "-PSO\t\t\tuse Partial Store Ordering\n" "-RMO\t\t\tuse Relaxed Memory Ordering\n" msgstr "" -#: config/tc-sparc.c:623 +#: config/tc-sparc.c:676 #, c-format msgid "\t\t\t[default is %s]\n" msgstr "" -#: config/tc-sparc.c:625 +#: config/tc-sparc.c:678 msgid "" "-KPIC\t\t\tgenerate PIC\n" "-V\t\t\tprint assembler version number\n" @@ -5486,7 +6449,7 @@ msgid "" "-s\t\t\tignored\n" msgstr "" -#: config/tc-sparc.c:637 +#: config/tc-sparc.c:690 msgid "" "-EL\t\t\tgenerate code for a little endian machine\n" "-EB\t\t\tgenerate code for a big endian machine\n" @@ -5494,249 +6457,275 @@ msgid "" " instructions and little endian data.\n" msgstr "" -#: config/tc-sparc.c:754 +#: config/tc-sparc.c:810 #, c-format msgid "Internal error: losing opcode: `%s' \"%s\"\n" msgstr "" -#: config/tc-sparc.c:772 +#: config/tc-sparc.c:829 #, c-format msgid "Internal error: can't find opcode `%s' for `%s'\n" msgstr "" -#: config/tc-sparc.c:921 +#: config/tc-sparc.c:975 msgid "Support for 64-bit arithmetic not compiled in." msgstr "" -#: config/tc-sparc.c:967 +#: config/tc-sparc.c:1022 msgid "set: number not in 0..4294967295 range" msgstr "" -#: config/tc-sparc.c:974 +#: config/tc-sparc.c:1029 msgid "set: number not in -2147483648..4294967295 range" msgstr "" -#: config/tc-sparc.c:1034 +#: config/tc-sparc.c:1089 msgid "setsw: number not in -2147483648..4294967295 range" msgstr "" -#: config/tc-sparc.c:1082 +#: config/tc-sparc.c:1138 msgid "setx: temporary register same as destination register" msgstr "" -#: config/tc-sparc.c:1152 +#: config/tc-sparc.c:1209 msgid "setx: illegal temporary register g0" msgstr "" -#: config/tc-sparc.c:1249 +#: config/tc-sparc.c:1306 msgid "FP branch in delay slot" msgstr "" -#: config/tc-sparc.c:1265 +#: config/tc-sparc.c:1322 msgid "FP branch preceded by FP instruction; NOP inserted" msgstr "" -#: config/tc-sparc.c:1305 +#: config/tc-sparc.c:1362 msgid "failed special case insn sanity check" msgstr "" -#: config/tc-sparc.c:1396 +#: config/tc-sparc.c:1450 msgid ": invalid membar mask name" msgstr "" -#: config/tc-sparc.c:1410 +#: config/tc-sparc.c:1466 msgid ": invalid membar mask expression" msgstr "" -#: config/tc-sparc.c:1415 +#: config/tc-sparc.c:1471 msgid ": invalid membar mask number" msgstr "" -#: config/tc-sparc.c:1433 +#: config/tc-sparc.c:1486 +msgid ": invalid siam mode expression" +msgstr "" + +#: config/tc-sparc.c:1491 +msgid ": invalid siam mode number" +msgstr "" + +#: config/tc-sparc.c:1507 msgid ": invalid prefetch function name" msgstr "" -#: config/tc-sparc.c:1441 +#: config/tc-sparc.c:1515 msgid ": invalid prefetch function expression" msgstr "" -#: config/tc-sparc.c:1446 +#: config/tc-sparc.c:1520 msgid ": invalid prefetch function number" msgstr "" -#: config/tc-sparc.c:1474 config/tc-sparc.c:1486 +#: config/tc-sparc.c:1548 config/tc-sparc.c:1560 msgid ": unrecognizable privileged register" msgstr "" -#: config/tc-sparc.c:1510 config/tc-sparc.c:1527 -msgid ": unrecognizable v9a ancillary state register" +#: config/tc-sparc.c:1584 config/tc-sparc.c:1609 +msgid ": unrecognizable v9a or v9b ancillary state register" msgstr "" -#: config/tc-sparc.c:1515 +#: config/tc-sparc.c:1589 msgid ": rd on write only ancillary state register" msgstr "" -#: config/tc-sparc.c:1551 +#. %sys_tick and %sys_tick_cmpr are v9bnotv9a +#: config/tc-sparc.c:1597 +msgid ": unrecognizable v9a ancillary state register" +msgstr "" + +#: config/tc-sparc.c:1633 msgid ": asr number must be between 16 and 31" msgstr "" -#: config/tc-sparc.c:1559 +#: config/tc-sparc.c:1641 msgid ": asr number must be between 0 and 31" msgstr "" -#: config/tc-sparc.c:1569 +#: config/tc-sparc.c:1651 msgid ": expecting %asrN" msgstr "" -#: config/tc-sparc.c:1897 +#: config/tc-sparc.c:1979 msgid "detected global register use not covered by .register pseudo-op" msgstr "" -#: config/tc-sparc.c:1969 +#: config/tc-sparc.c:2050 msgid ": There are only 64 f registers; [0-63]" msgstr "" -#: config/tc-sparc.c:1971 config/tc-sparc.c:1983 +#: config/tc-sparc.c:2052 config/tc-sparc.c:2064 msgid ": There are only 32 f registers; [0-31]" msgstr "" -#: config/tc-sparc.c:2102 config/tc-sparc.c:2138 +#: config/tc-sparc.c:2182 config/tc-sparc.c:2218 msgid "Illegal operands: %%%s requires arguments in ()" msgstr "" -#: config/tc-sparc.c:2150 +#: config/tc-sparc.c:2230 msgid "" "Illegal operands: Can't do arithmetics other than + and - involving %%%s()" msgstr "" -#: config/tc-sparc.c:2259 +#: config/tc-sparc.c:2340 msgid "Illegal operands: Can't add non-constant expression to %%%s()" msgstr "" -#: config/tc-sparc.c:2269 +#: config/tc-sparc.c:2350 msgid "" "Illegal operands: Can't do arithmetics involving %%%s() of a relocatable " "symbol" msgstr "" -#: config/tc-sparc.c:2287 +#: config/tc-sparc.c:2368 msgid ": PC-relative operand can't be a constant" msgstr "" -#: config/tc-sparc.c:2320 +#: config/tc-sparc.c:2401 msgid ": invalid ASI name" msgstr "" -#: config/tc-sparc.c:2328 +#: config/tc-sparc.c:2409 msgid ": invalid ASI expression" msgstr "" -#: config/tc-sparc.c:2333 +#: config/tc-sparc.c:2414 msgid ": invalid ASI number" msgstr "" -#: config/tc-sparc.c:2430 +#: config/tc-sparc.c:2511 msgid "OPF immediate operand out of range (0-0x1ff)" msgstr "" -#: config/tc-sparc.c:2435 +#: config/tc-sparc.c:2516 msgid "non-immediate OPF operand, ignored" msgstr "" -#: config/tc-sparc.c:2454 +#: config/tc-sparc.c:2535 msgid ": invalid cpreg name" msgstr "" -#: config/tc-sparc.c:2483 +#: config/tc-sparc.c:2564 #, c-format msgid "Illegal operands%s" msgstr "" -#: config/tc-sparc.c:2512 +#: config/tc-sparc.c:2598 #, c-format msgid "architecture bumped from \"%s\" to \"%s\" on \"%s\"" msgstr "" -#: config/tc-sparc.c:2548 +#: config/tc-sparc.c:2634 #, c-format msgid "Architecture mismatch on \"%s\"." msgstr "" -#: config/tc-sparc.c:2549 +#: config/tc-sparc.c:2635 #, c-format msgid " (Requires %s; requested architecture is %s.)" msgstr "" -#: config/tc-sparc.c:3073 +#: config/tc-sparc.c:3249 #, c-format msgid "bad or unhandled relocation type: 0x%02x" msgstr "" -#: config/tc-sparc.c:3375 +#: config/tc-sparc.c:3380 +#, c-format +msgid "internal error: can't export reloc type %d (`%s')" +msgstr "" + +#: config/tc-sparc.c:3552 msgid "bad .reserve segment -- expected BSS segment" msgstr "" -#: config/tc-sparc.c:3392 +#: config/tc-sparc.c:3569 msgid "missing alignment" msgstr "" -#: config/tc-sparc.c:3403 config/tc-sparc.c:3548 +#: config/tc-sparc.c:3580 config/tc-sparc.c:3730 #, c-format msgid "alignment too large; assuming %d" msgstr "" -#: config/tc-sparc.c:3409 config/tc-sparc.c:3554 +#: config/tc-sparc.c:3586 config/tc-sparc.c:3736 msgid "negative alignment" msgstr "" -#: config/tc-sparc.c:3419 config/tc-sparc.c:3577 +#: config/tc-sparc.c:3596 config/tc-sparc.c:3759 msgid "alignment not a power of 2" msgstr "" -#: config/tc-sparc.c:3534 +#: config/tc-sparc.c:3716 msgid "Expected comma after common length" msgstr "" -#: config/tc-sparc.c:3769 config/tc-sparc.c:3779 +#: config/tc-sparc.c:3951 config/tc-sparc.c:3961 msgid "register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}" msgstr "" -#: config/tc-sparc.c:3797 +#: config/tc-sparc.c:3979 msgid "redefinition of global register" msgstr "" -#: config/tc-sparc.c:3808 +#: config/tc-sparc.c:3990 #, c-format msgid "Register symbol %s already defined." msgstr "" -#: config/tc-tahoe.c:387 +#: config/tc-sparc.h:54 +msgid "sparc convert_frag\n" +msgstr "" + +#: config/tc-sparc.h:56 +msgid "estimate_size_before_relax called" +msgstr "" + +#: config/tc-tahoe.c:386 msgid "The -a option doesn't exist. (Despite what the man page says!" msgstr "" -#: config/tc-tahoe.c:391 config/tc-vax.c:3141 +#: config/tc-tahoe.c:390 config/tc-vax.c:3132 #, c-format msgid "Displacement length %s ignored!" msgstr "" -#: config/tc-tahoe.c:395 config/tc-vax.c:3133 +#: config/tc-tahoe.c:394 config/tc-vax.c:3124 msgid "SYMBOL TABLE not implemented" msgstr "" -#: config/tc-tahoe.c:399 config/tc-vax.c:3137 +#: config/tc-tahoe.c:398 config/tc-vax.c:3128 msgid "TOKEN TRACE not implemented" msgstr "" -#: config/tc-tahoe.c:403 config/tc-vax.c:3145 +#: config/tc-tahoe.c:402 config/tc-vax.c:3136 #, c-format msgid "I don't need or use temp. file \"%s\"." msgstr "" -#: config/tc-tahoe.c:407 config/tc-vax.c:3149 +#: config/tc-tahoe.c:406 config/tc-vax.c:3140 msgid "I don't use an interpass file! -V ignored" msgstr "" -#: config/tc-tahoe.c:421 +#: config/tc-tahoe.c:420 msgid "" "Tahoe options:\n" "-a\t\t\tignored\n" @@ -5748,207 +6737,672 @@ msgid "" "-V\t\t\tignored\n" msgstr "" -#: config/tc-tahoe.c:1075 +#: config/tc-tahoe.c:1074 msgid "Casting a branch displacement is bad form, and is ignored." msgstr "" -#: config/tc-tahoe.c:1131 +#: config/tc-tahoe.c:1130 msgid "Couldn't parse the [index] in this operand." msgstr "" -#: config/tc-tahoe.c:1137 +#: config/tc-tahoe.c:1136 msgid "Couldn't find the opening '[' for the index of this operand." msgstr "" -#: config/tc-tahoe.c:1177 +#: config/tc-tahoe.c:1176 msgid "Couldn't find the opening '(' for the deref of this operand." msgstr "" -#: config/tc-tahoe.c:1187 +#: config/tc-tahoe.c:1186 msgid "Operand can't be both pre-inc and post-dec." msgstr "" -#: config/tc-tahoe.c:1217 +#: config/tc-tahoe.c:1216 msgid "I parsed 2 registers in this operand." msgstr "" -#: config/tc-tahoe.c:1267 +#: config/tc-tahoe.c:1266 msgid "Can't relocate expression error." msgstr "" #. This is an error. Tahoe doesn't allow any expressions #. bigger that a 32 bit long word. Any bigger has to be referenced #. by address. -#: config/tc-tahoe.c:1274 +#: config/tc-tahoe.c:1273 msgid "Expression is too large for a 32 bits." msgstr "" -#: config/tc-tahoe.c:1279 +#: config/tc-tahoe.c:1278 msgid "Junk at end of expression." msgstr "" -#: config/tc-tahoe.c:1319 +#: config/tc-tahoe.c:1317 msgid "Syntax error in direct register mode." msgstr "" -#: config/tc-tahoe.c:1321 +#: config/tc-tahoe.c:1319 msgid "You can't index a register in direct register mode." msgstr "" -#: config/tc-tahoe.c:1324 +#: config/tc-tahoe.c:1322 msgid "SP can't be the source operand with direct register addressing." msgstr "" -#: config/tc-tahoe.c:1326 +#: config/tc-tahoe.c:1324 msgid "Can't take the address of a register." msgstr "" -#: config/tc-tahoe.c:1328 +#: config/tc-tahoe.c:1326 msgid "Direct Register can't be used in a branch." msgstr "" -#: config/tc-tahoe.c:1330 +#: config/tc-tahoe.c:1328 msgid "For quad access, the register must be even and < 14." msgstr "" -#: config/tc-tahoe.c:1332 +#: config/tc-tahoe.c:1330 msgid "You can't cast a direct register." msgstr "" -#: config/tc-tahoe.c:1338 +#: config/tc-tahoe.c:1336 msgid "Using reg 14 for quadwords can tromp the FP register." msgstr "" -#: config/tc-tahoe.c:1350 +#: config/tc-tahoe.c:1348 msgid "Syntax error in auto-dec mode." msgstr "" -#: config/tc-tahoe.c:1352 +#: config/tc-tahoe.c:1350 msgid "You can't have an index auto dec mode." msgstr "" -#: config/tc-tahoe.c:1354 +#: config/tc-tahoe.c:1352 msgid "Auto dec mode cant be used for reading." msgstr "" -#: config/tc-tahoe.c:1356 +#: config/tc-tahoe.c:1354 msgid "Auto dec only works of the SP register." msgstr "" -#: config/tc-tahoe.c:1358 +#: config/tc-tahoe.c:1356 msgid "Auto dec can't be used in a branch." msgstr "" -#: config/tc-tahoe.c:1360 +#: config/tc-tahoe.c:1358 msgid "Auto dec won't work with quadwords." msgstr "" -#: config/tc-tahoe.c:1367 +#: config/tc-tahoe.c:1365 msgid "Syntax error in one of the auto-inc modes." msgstr "" -#: config/tc-tahoe.c:1373 +#: config/tc-tahoe.c:1371 msgid "Auto inc deferred only works of the SP register." msgstr "" -#: config/tc-tahoe.c:1375 +#: config/tc-tahoe.c:1373 msgid "You can't have an index auto inc deferred mode." msgstr "" -#: config/tc-tahoe.c:1377 config/tc-tahoe.c:1388 +#: config/tc-tahoe.c:1375 config/tc-tahoe.c:1386 msgid "Auto inc can't be used in a branch." msgstr "" -#: config/tc-tahoe.c:1384 +#: config/tc-tahoe.c:1382 msgid "You can't write to an auto inc register." msgstr "" -#: config/tc-tahoe.c:1386 +#: config/tc-tahoe.c:1384 msgid "Auto inc only works of the SP register." msgstr "" -#: config/tc-tahoe.c:1390 +#: config/tc-tahoe.c:1388 msgid "Auto inc won't work with quadwords." msgstr "" -#: config/tc-tahoe.c:1392 +#: config/tc-tahoe.c:1390 msgid "You can't have an index in auto inc mode." msgstr "" -#: config/tc-tahoe.c:1400 +#: config/tc-tahoe.c:1398 msgid "You can't index the sp register." msgstr "" -#: config/tc-tahoe.c:1406 +#: config/tc-tahoe.c:1404 msgid "Syntax error in register displaced mode." msgstr "" -#: config/tc-tahoe.c:1425 +#: config/tc-tahoe.c:1423 msgid "An offest is needed for this operand." msgstr "" -#: config/tc-tahoe.c:1437 +#: config/tc-tahoe.c:1435 msgid "You can't index a register in immediate mode." msgstr "" -#: config/tc-tahoe.c:1439 +#: config/tc-tahoe.c:1437 msgid "Immediate access can't be used as an address." msgstr "" -#: config/tc-tahoe.c:1550 +#: config/tc-tahoe.c:1548 #, c-format msgid "Compiler bug: ODD number of bytes in arg structure %s." msgstr "" -#: config/tc-tahoe.c:1577 config/tc-vax.c:1847 +#: config/tc-tahoe.c:1575 config/tc-vax.c:1839 msgid "Not enough operands" msgstr "" -#: config/tc-tahoe.c:1587 config/tc-vax.c:1854 +#: config/tc-tahoe.c:1585 config/tc-vax.c:1846 msgid "Too many operands" msgstr "" -#: config/tc-tahoe.c:1638 config/tc-vax.c:368 +#: config/tc-tahoe.c:1636 config/tc-vax.c:364 #, c-format msgid "Ignoring statement due to \"%s\"" msgstr "" -#: config/tc-tahoe.c:1733 +#: config/tc-tahoe.c:1731 #, c-format msgid "Compliler bug: Got a case (%d) I wasn't expecting." msgstr "" -#: config/tc-tahoe.c:1827 +#: config/tc-tahoe.c:1825 msgid "Real branch displacements must be expressions." msgstr "" -#: config/tc-tahoe.c:1830 +#: config/tc-tahoe.c:1828 #, c-format msgid "Complier error: I got an unknown synthetic branch :%c" msgstr "" -#: config/tc-tahoe.c:1971 +#: config/tc-tahoe.c:1969 #, c-format msgid "Barf, bad mode %x\n" msgstr "" +#. Only word (et al.), align, or conditionals are allowed within +#. .struct/.union. +#: config/tc-tic54x.c:75 +msgid "pseudo-op illegal within .struct/.union" +msgstr "" + +#: config/tc-tic54x.c:84 +msgid "C54x-specific command line options:\n" +msgstr "" + +#: config/tc-tic54x.c:85 +msgid "-mfar-mode | -mf Use extended addressing\n" +msgstr "" + +#: config/tc-tic54x.c:86 +msgid "-mcpu=<CPU version> Specify the CPU version\n" +msgstr "" + +#: config/tc-tic54x.c:88 +msgid "-mcoff-version={0|1|2} Select COFF version\n" +msgstr "" + +#: config/tc-tic54x.c:90 +msgid "-merrors-to-file <filename>\n" +msgstr "" + +#: config/tc-tic54x.c:91 +msgid "-me <filename> Redirect errors to a file\n" +msgstr "" + +#: config/tc-tic54x.c:351 +msgid "Comma and symbol expected for '.asg STRING, SYMBOL'" +msgstr "" + +#: config/tc-tic54x.c:405 +msgid "Unterminated string after absolute expression" +msgstr "" + +#: config/tc-tic54x.c:413 +msgid "Comma and symbol expected for '.eval EXPR, SYMBOL'" +msgstr "" + +#: config/tc-tic54x.c:425 +msgid "symbols assigned with .eval must begin with a letter" +msgstr "" + +#: config/tc-tic54x.c:682 +msgid "Offset on nested structures is ignored" +msgstr "" + +#: config/tc-tic54x.c:732 +#, c-format +msgid ".end%s without preceding .%s" +msgstr "" + +#: config/tc-tic54x.c:799 +#, c-format +msgid "Unrecognized struct/union tag '%s'" +msgstr "" + +#: config/tc-tic54x.c:801 +msgid ".tag requires a structure tag" +msgstr "" + +#: config/tc-tic54x.c:807 +msgid "Label required for .tag" +msgstr "" + +#: config/tc-tic54x.c:825 +#, c-format +msgid ".tag target '%s' undefined" +msgstr "" + +#: config/tc-tic54x.c:887 +#, c-format +msgid ".field count '%d' out of range (1 <= X <= 32)" +msgstr "" + +#: config/tc-tic54x.c:917 +#, c-format +msgid "Unrecognized field type '%c'" +msgstr "" + +#. Disallow .byte with a non constant expression that will +#. require relocation. +#: config/tc-tic54x.c:1052 +msgid "Relocatable values require at least WORD storage" +msgstr "" + +#: config/tc-tic54x.c:1114 +msgid "Use of .def/.ref is deprecated. Use .global instead" +msgstr "" + +#: config/tc-tic54x.c:1305 +msgid ".space/.bes repeat count is negative, ignored" +msgstr "" + +#: config/tc-tic54x.c:1310 +msgid ".space/.bes repeat count is zero, ignored" +msgstr "" + +#: config/tc-tic54x.c:1388 +msgid "Missing size argument" +msgstr "" + +#: config/tc-tic54x.c:1525 +msgid "CPU version has already been set" +msgstr "" + +#: config/tc-tic54x.c:1529 +#, c-format +msgid "Unrecognized version '%s'" +msgstr "" + +#: config/tc-tic54x.c:1535 +msgid "Changing of CPU version on the fly not supported" +msgstr "" + +#: config/tc-tic54x.c:1670 +msgid "p2align not supported on this target" +msgstr "" + +#: config/tc-tic54x.c:1683 +msgid "Argument to .even ignored" +msgstr "" + +#: config/tc-tic54x.c:1730 +msgid "Invalid field size, must be from 1 to 32" +msgstr "" + +#: config/tc-tic54x.c:1743 +msgid "field size must be 16 when value is relocatable" +msgstr "" + +#: config/tc-tic54x.c:1757 +msgid "field value truncated" +msgstr "" + +#: config/tc-tic54x.c:1863 config/tc-tic54x.c:2175 +#, c-format +msgid "Unrecognized section '%s'" +msgstr "" + +#: config/tc-tic54x.c:1872 +msgid "Current section is unitialized, section name required for .clink" +msgstr "" + +#: config/tc-tic54x.c:2084 +msgid "ENDLOOP without corresponding LOOP" +msgstr "" + +#: config/tc-tic54x.c:2127 +msgid "Mixing of normal and extended addressing not supported" +msgstr "" + +#: config/tc-tic54x.c:2133 +msgid "Extended addressing not supported on the specified CPU" +msgstr "" + +#: config/tc-tic54x.c:2181 +msgid ".sblock may be used for initialized sections only" +msgstr "" + +#: config/tc-tic54x.c:2212 +msgid "Symbol missing for .set/.equ" +msgstr "" + +#: config/tc-tic54x.c:2269 +msgid ".var may only be used within a macro definition" +msgstr "" + +#: config/tc-tic54x.c:2277 +msgid "Substitution symbols must begin with a letter" +msgstr "" + +#: config/tc-tic54x.c:2368 +#, c-format +msgid "Can't open macro library file '%s' for reading." +msgstr "" + +#: config/tc-tic54x.c:2375 +#, c-format +msgid "File '%s' not in macro archive format" +msgstr "" + +#: config/tc-tic54x.c:2532 +#, c-format +msgid "Bad COFF version '%s'" +msgstr "" + +#: config/tc-tic54x.c:2541 +#, c-format +msgid "Bad CPU version '%s'" +msgstr "" + +#: config/tc-tic54x.c:2553 config/tc-tic54x.c:2556 +#, c-format +msgid "Can't redirect stderr to the file '%s'" +msgstr "" + +#: config/tc-tic54x.c:2702 +#, c-format +msgid "Undefined substitution symbol '%s'" +msgstr "" + +#: config/tc-tic54x.c:3390 +msgid "Badly formed address expression" +msgstr "" + +#: config/tc-tic54x.c:3655 +#, c-format +msgid "Invalid dmad syntax '%s'" +msgstr "" + +#: config/tc-tic54x.c:3771 +msgid "Address mode *+ARx is write-only. Results of reading are undefined." +msgstr "" + +#: config/tc-tic54x.c:3791 +#, c-format +msgid "Unrecognized indirect address format \"%s\"" +msgstr "" + +#: config/tc-tic54x.c:3828 +#, c-format +msgid "Operand '%s' out of range (%d <= x <= %d)" +msgstr "" + +#: config/tc-tic54x.c:3848 +msgid "Error in relocation handling" +msgstr "" + +#: config/tc-tic54x.c:3869 config/tc-tic54x.c:3933 config/tc-tic54x.c:3963 +#, c-format +msgid "Unrecognized condition code \"%s\"" +msgstr "" + +#: config/tc-tic54x.c:3886 +#, c-format +msgid "Condition \"%s\" does not match preceding group" +msgstr "" + +#: config/tc-tic54x.c:3894 +#, c-format +msgid "" +"Condition \"%s\" uses a different accumulator from a preceding condition" +msgstr "" + +#: config/tc-tic54x.c:3901 +msgid "Only one comparison conditional allowed" +msgstr "" + +#: config/tc-tic54x.c:3906 +msgid "Only one overflow conditional allowed" +msgstr "" + +#: config/tc-tic54x.c:3914 +#, c-format +msgid "Duplicate %s conditional" +msgstr "" + +#: config/tc-tic54x.c:3948 +msgid "Invalid auxiliary register (use AR0-AR7)" +msgstr "" + +#: config/tc-tic54x.c:3983 +msgid "lk addressing modes are invalid for memory-mapped register addressing" +msgstr "" + +#: config/tc-tic54x.c:3991 +msgid "" +"Address mode *+ARx is not allowed in memory-mapped register addressing. " +"Resulting behavior is undefined." +msgstr "" + +#: config/tc-tic54x.c:4017 +msgid "" +"Destination accumulator for each part of this parallel instruction must be " +"different" +msgstr "" + +#: config/tc-tic54x.c:4066 +#, c-format +msgid "Memory mapped register \"%s\" out of range" +msgstr "" + +#: config/tc-tic54x.c:4105 +msgid "Invalid operand (use 1, 2, or 3)" +msgstr "" + +#: config/tc-tic54x.c:4130 +msgid "A status register or status bit name is required" +msgstr "" + +#: config/tc-tic54x.c:4140 +#, c-format +msgid "Unrecognized status bit \"%s\"" +msgstr "" + +#: config/tc-tic54x.c:4163 +#, c-format +msgid "Invalid status register \"%s\"" +msgstr "" + +#: config/tc-tic54x.c:4175 +#, c-format +msgid "Operand \"%s\" out of range (use 1 or 2)" +msgstr "" + +#: config/tc-tic54x.c:4375 +#, c-format +msgid "Unrecognized instruction \"%s\"" +msgstr "" + +#: config/tc-tic54x.c:4404 +#, c-format +msgid "Unrecognized operand list '%s' for instruction '%s'" +msgstr "" + +#: config/tc-tic54x.c:4436 +#, c-format +msgid "Unrecognized parallel instruction \"%s\"" +msgstr "" + +#: config/tc-tic54x.c:4488 +#, c-format +msgid "Invalid operand (s) for parallel instruction \"%s\"" +msgstr "" + +#: config/tc-tic54x.c:4491 +#, c-format +msgid "Unrecognized parallel instruction combination \"%s || %s\"" +msgstr "" + +#: config/tc-tic54x.c:4723 +#, c-format +msgid "%s symbol recursion stopped at second appearance of '%s'" +msgstr "" + +#: config/tc-tic54x.c:4762 +msgid "Unrecognized substitution symbol function" +msgstr "" + +#: config/tc-tic54x.c:4767 +msgid "Missing '(' after substitution symbol function" +msgstr "" + +#: config/tc-tic54x.c:4781 +msgid "Expecting second argument" +msgstr "" + +#: config/tc-tic54x.c:4794 config/tc-tic54x.c:4843 +msgid "Extra junk in function call, expecting ')'" +msgstr "" + +#: config/tc-tic54x.c:4819 +msgid "Function expects two arguments" +msgstr "" + +#: config/tc-tic54x.c:4832 +msgid "Expecting character constant argument" +msgstr "" + +#: config/tc-tic54x.c:4838 +msgid "Both arguments must be substitution symbols" +msgstr "" + +#: config/tc-tic54x.c:4891 +#, c-format +msgid "Invalid subscript (use 1 to %d)" +msgstr "" + +#: config/tc-tic54x.c:4901 +#, c-format +msgid "Invalid length (use 0 to %d" +msgstr "" + +#: config/tc-tic54x.c:4911 +msgid "Missing ')' in subscripted substitution symbol expression" +msgstr "" + +#: config/tc-tic54x.c:4931 +msgid "Missing forced substitution terminator ':'" +msgstr "" + +#: config/tc-tic54x.c:5104 +#, c-format +msgid "" +"Instruction does not fit in available delay slots (%d-word insn, %d slots " +"left)" +msgstr "" + +#: config/tc-tic54x.c:5145 +#, c-format +msgid "Unrecognized parallel instruction '%s'" +msgstr "" + +#: config/tc-tic54x.c:5157 +#, c-format +msgid "Instruction '%s' requires an LP cpu version" +msgstr "" + +#: config/tc-tic54x.c:5164 +#, c-format +msgid "Instruction '%s' requires far mode addressing" +msgstr "" + +#: config/tc-tic54x.c:5176 +#, c-format +msgid "" +"Instruction does not fit in available delay slots (%d-word insn, %d slots " +"left). Resulting behavior is undefined." +msgstr "" + +#: config/tc-tic54x.c:5186 +msgid "" +"Instructions which cause PC discontinuity are not allowed in a delay slot. " +"Resulting behavior is undefined." +msgstr "" + +#: config/tc-tic54x.c:5197 +#, c-format +msgid "'%s' is not repeatable. Resulting behavior is undefined." +msgstr "" + +#: config/tc-tic54x.c:5201 +msgid "" +"Instructions using long offset modifiers or absolute addresses are not " +"repeatable. Resulting behavior is undefined." +msgstr "" + +#: config/tc-tic54x.c:5392 +#, c-format +msgid "Unsupported relocation size %d" +msgstr "" + +#: config/tc-tic54x.c:5544 +msgid "non-absolute value used with .space/.bes" +msgstr "" + +#: config/tc-tic54x.c:5548 +#, c-format +msgid "negative value ignored in %s" +msgstr "" + +#: config/tc-tic54x.c:5635 +#, c-format +msgid "attempt to .space/.bes backwards? (%ld)" +msgstr "" + +#: config/tc-tic54x.c:5668 +#, c-format +msgid "Invalid label '%s'" +msgstr "" + +#: config/tc-tic80.c:25 +#, c-format +msgid "internal error:%s:%d: %s\n" +msgstr "" + +#: config/tc-tic80.c:28 +#, c-format +msgid "internal error:%s:%d: %s %d\n" +msgstr "" + #: config/tc-tic80.c:90 msgid "Relaxation is a luxury we can't afford" msgstr "" -#: config/tc-tic80.c:141 +#: config/tc-tic80.c:140 msgid "bad call to md_atof ()" msgstr "" -#: config/tc-tic80.c:245 +#: config/tc-tic80.c:238 msgid "':' not followed by 'm' or 's'" msgstr "" -#: config/tc-tic80.c:259 +#: config/tc-tic80.c:251 msgid "paren nesting" msgstr "" -#: config/tc-tic80.c:274 +#: config/tc-tic80.c:265 msgid "mismatched parenthesis" msgstr "" @@ -5956,374 +7410,374 @@ msgstr "" msgid "unhandled expression type" msgstr "" -#: config/tc-tic80.c:682 +#: config/tc-tic80.c:681 msgid "symbol reloc that is not PC relative or 32 bits" msgstr "" -#: config/tc-tic80.c:705 +#: config/tc-tic80.c:710 msgid "unhandled operand modifier" msgstr "" -#: config/tc-tic80.c:746 +#: config/tc-tic80.c:752 msgid "unhandled expression" msgstr "" -#: config/tc-tic80.c:797 +#: config/tc-tic80.c:801 #, c-format msgid "Invalid mnemonic: '%s'" msgstr "" -#: config/tc-tic80.c:813 +#: config/tc-tic80.c:814 #, c-format msgid "Invalid operands: '%s'" msgstr "" -#: config/tc-tic80.c:890 +#: config/tc-tic80.c:892 msgid "unhandled predefined symbol bits" msgstr "" -#: config/tc-tic80.c:986 +#: config/tc-tic80.c:984 #, c-format msgid "PC offset 0x%lx outside range 0x%lx-0x%lx" msgstr "" -#: config/tc-tic80.c:1001 +#: config/tc-tic80.c:999 msgid "unhandled relocation type in fixup" msgstr "" -#: config/tc-tic80.c:1038 +#: config/tc-tic80.c:1035 msgid "md_convert_frag() not implemented yet" msgstr "" -#: config/tc-v850.c:273 +#: config/tc-v850.c:270 #, c-format msgid ".COMMon length (%d.) < 0! Ignored." msgstr "" -#: config/tc-v850.c:1000 +#: config/tc-v850.c:1013 #, c-format msgid "unknown operand shift: %x\n" msgstr "" -#: config/tc-v850.c:1001 +#: config/tc-v850.c:1014 msgid "internal failure in parse_register_list" msgstr "" -#: config/tc-v850.c:1019 +#: config/tc-v850.c:1031 msgid "constant expression or register list expected" msgstr "" -#: config/tc-v850.c:1024 config/tc-v850.c:1037 config/tc-v850.c:1056 +#: config/tc-v850.c:1036 config/tc-v850.c:1049 config/tc-v850.c:1068 msgid "high bits set in register list expression" msgstr "" -#: config/tc-v850.c:1096 config/tc-v850.c:1160 +#: config/tc-v850.c:1108 config/tc-v850.c:1172 msgid "illegal register included in list" msgstr "" -#: config/tc-v850.c:1103 +#: config/tc-v850.c:1115 msgid "system registers cannot be included in list" msgstr "" -#: config/tc-v850.c:1108 +#: config/tc-v850.c:1120 msgid "PSW cannot be included in list" msgstr "" -#: config/tc-v850.c:1115 +#: config/tc-v850.c:1127 msgid "High value system registers cannot be included in list" msgstr "" -#: config/tc-v850.c:1139 +#: config/tc-v850.c:1151 msgid "second register should follow dash in register list" msgstr "" -#: config/tc-v850.c:1187 +#: config/tc-v850.c:1198 msgid " V850 options:\n" msgstr "" -#: config/tc-v850.c:1188 +#: config/tc-v850.c:1199 msgid " -mwarn-signed-overflow Warn if signed immediate values overflow\n" msgstr "" -#: config/tc-v850.c:1189 +#: config/tc-v850.c:1200 msgid "" " -mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n" msgstr "" -#: config/tc-v850.c:1190 +#: config/tc-v850.c:1201 msgid " -mv850 The code is targeted at the v850\n" msgstr "" -#: config/tc-v850.c:1191 +#: config/tc-v850.c:1202 msgid " -mv850e The code is targeted at the v850e\n" msgstr "" -#: config/tc-v850.c:1192 +#: config/tc-v850.c:1203 msgid " -mv850ea The code is targeted at the v850ea\n" msgstr "" -#: config/tc-v850.c:1193 +#: config/tc-v850.c:1204 msgid "" " -mv850any The code is generic, despite any processor " "specific instructions\n" msgstr "" -#: config/tc-v850.c:1204 config/tc-v850.c:1239 +#: config/tc-v850.c:1216 config/tc-v850.c:1254 #, c-format msgid "unknown command line option: -%c%s\n" msgstr "" -#: config/tc-v850.c:1393 +#: config/tc-v850.c:1407 #, c-format msgid "Unable to determine default target processor from string: %s" msgstr "" -#: config/tc-v850.c:1442 +#: config/tc-v850.c:1455 msgid "ctoff() relocation used on an instruction which does not support it" msgstr "" -#: config/tc-v850.c:1459 +#: config/tc-v850.c:1477 msgid "sdaoff() relocation used on an instruction which does not support it" msgstr "" -#: config/tc-v850.c:1476 +#: config/tc-v850.c:1499 msgid "zdaoff() relocation used on an instruction which does not support it" msgstr "" -#: config/tc-v850.c:1494 +#: config/tc-v850.c:1532 msgid "tdaoff() relocation used on an instruction which does not support it" msgstr "" -#: config/tc-v850.c:1712 +#: config/tc-v850.c:1749 msgid "Target processor does not support this instruction." msgstr "" -#: config/tc-v850.c:1802 config/tc-v850.c:1832 config/tc-v850.c:2018 +#: config/tc-v850.c:1839 config/tc-v850.c:1869 config/tc-v850.c:2057 msgid "immediate operand is too large" msgstr "" -#: config/tc-v850.c:1814 +#: config/tc-v850.c:1851 msgid "AAARG -> unhandled constant reloc" msgstr "" -#: config/tc-v850.c:1858 +#: config/tc-v850.c:1895 msgid "invalid register name" msgstr "" -#: config/tc-v850.c:1863 +#: config/tc-v850.c:1900 msgid "register r0 cannot be used here" msgstr "" -#: config/tc-v850.c:1875 +#: config/tc-v850.c:1912 msgid "invalid system register name" msgstr "" -#: config/tc-v850.c:1888 +#: config/tc-v850.c:1925 msgid "expected EP register" msgstr "" -#: config/tc-v850.c:1904 +#: config/tc-v850.c:1942 msgid "invalid condition code name" msgstr "" -#: config/tc-v850.c:1925 config/tc-v850.c:1929 +#: config/tc-v850.c:1963 config/tc-v850.c:1967 msgid "constant too big to fit into instruction" msgstr "" -#: config/tc-v850.c:1981 +#: config/tc-v850.c:2020 msgid "syntax error: value is missing before the register name" msgstr "" -#: config/tc-v850.c:1983 +#: config/tc-v850.c:2022 msgid "syntax error: register not expected" msgstr "" -#: config/tc-v850.c:1997 +#: config/tc-v850.c:2036 msgid "syntax error: system register not expected" msgstr "" -#: config/tc-v850.c:2002 +#: config/tc-v850.c:2041 msgid "syntax error: condition code not expected" msgstr "" -#: config/tc-v850.c:2038 +#: config/tc-v850.c:2082 msgid "invalid operand" msgstr "" -#: config/tc-vax.c:263 +#: config/tc-vax.c:259 #, c-format msgid "VIP_BEGIN error:%s" msgstr "" -#: config/tc-vax.c:387 +#: config/tc-vax.c:383 #, c-format msgid "Ignoring statement because \"%s\"" msgstr "" -#: config/tc-vax.c:434 +#: config/tc-vax.c:430 msgid "Can't relocate expression" msgstr "" -#: config/tc-vax.c:537 +#: config/tc-vax.c:533 msgid "Bignum not permitted in short literal. Immediate mode assumed." msgstr "" -#: config/tc-vax.c:546 +#: config/tc-vax.c:542 msgid "Can't do flonum short literal: immediate mode used." msgstr "" -#: config/tc-vax.c:591 +#: config/tc-vax.c:587 #, c-format msgid "A bignum/flonum may not be a displacement: 0x%lx used" msgstr "" -#: config/tc-vax.c:913 +#: config/tc-vax.c:908 #, c-format msgid "Short literal overflow(%ld.), immediate mode assumed." msgstr "" -#: config/tc-vax.c:922 +#: config/tc-vax.c:917 #, c-format msgid "Forced short literal to immediate mode. now_seg=%s to_seg=%s" msgstr "" -#: config/tc-vax.c:981 +#: config/tc-vax.c:976 msgid "Length specification ignored. Address mode 9F used" msgstr "" -#: config/tc-vax.c:1030 +#: config/tc-vax.c:1025 msgid "Invalid operand: immediate value used as base address." msgstr "" -#: config/tc-vax.c:1032 +#: config/tc-vax.c:1027 msgid "Invalid operand: immediate value used as address." msgstr "" -#: config/tc-vax.c:1826 +#: config/tc-vax.c:1818 msgid "odd number of bytes in operand description" msgstr "" -#: config/tc-vax.c:1842 +#: config/tc-vax.c:1834 msgid "Bad operand" msgstr "" -#: config/tc-vax.c:2399 +#: config/tc-vax.c:2390 msgid "no '[' to match ']'" msgstr "" -#: config/tc-vax.c:2417 +#: config/tc-vax.c:2408 msgid "bad register in []" msgstr "" -#: config/tc-vax.c:2419 +#: config/tc-vax.c:2410 msgid "[PC] index banned" msgstr "" -#: config/tc-vax.c:2454 +#: config/tc-vax.c:2445 msgid "no '(' to match ')'" msgstr "" -#: config/tc-vax.c:2589 +#: config/tc-vax.c:2580 msgid "invalid branch operand" msgstr "" -#: config/tc-vax.c:2618 +#: config/tc-vax.c:2609 msgid "address prohibits @" msgstr "" -#: config/tc-vax.c:2620 +#: config/tc-vax.c:2611 msgid "address prohibits #" msgstr "" -#: config/tc-vax.c:2624 +#: config/tc-vax.c:2615 msgid "address prohibits -()" msgstr "" -#: config/tc-vax.c:2626 +#: config/tc-vax.c:2617 msgid "address prohibits ()+" msgstr "" -#: config/tc-vax.c:2629 +#: config/tc-vax.c:2620 msgid "address prohibits ()" msgstr "" -#: config/tc-vax.c:2631 +#: config/tc-vax.c:2622 msgid "address prohibits []" msgstr "" -#: config/tc-vax.c:2633 +#: config/tc-vax.c:2624 msgid "address prohibits register" msgstr "" -#: config/tc-vax.c:2635 +#: config/tc-vax.c:2626 msgid "address prohibits displacement length specifier" msgstr "" -#: config/tc-vax.c:2665 +#: config/tc-vax.c:2656 msgid "invalid operand of S^#" msgstr "" -#: config/tc-vax.c:2682 +#: config/tc-vax.c:2673 msgid "S^# needs expression" msgstr "" -#: config/tc-vax.c:2689 +#: config/tc-vax.c:2680 msgid "S^# may only read-access" msgstr "" -#: config/tc-vax.c:2714 +#: config/tc-vax.c:2705 msgid "invalid operand of -()" msgstr "" -#: config/tc-vax.c:2720 +#: config/tc-vax.c:2711 msgid "-(PC) unpredictable" msgstr "" -#: config/tc-vax.c:2722 +#: config/tc-vax.c:2713 msgid "[]index same as -()register: unpredictable" msgstr "" -#: config/tc-vax.c:2758 +#: config/tc-vax.c:2749 msgid "invalid operand of ()+" msgstr "" -#: config/tc-vax.c:2764 +#: config/tc-vax.c:2755 msgid "(PC)+ unpredictable" msgstr "" -#: config/tc-vax.c:2766 +#: config/tc-vax.c:2757 msgid "[]index same as ()+register: unpredictable" msgstr "" -#: config/tc-vax.c:2791 +#: config/tc-vax.c:2782 msgid "# conflicts length" msgstr "" -#: config/tc-vax.c:2793 +#: config/tc-vax.c:2784 msgid "# bars register" msgstr "" -#: config/tc-vax.c:2815 +#: config/tc-vax.c:2806 msgid "writing or modifying # is unpredictable" msgstr "" -#: config/tc-vax.c:2845 +#: config/tc-vax.c:2836 msgid "length not needed" msgstr "" -#: config/tc-vax.c:2852 +#: config/tc-vax.c:2843 msgid "can't []index a register, because it has no address" msgstr "" -#: config/tc-vax.c:2854 +#: config/tc-vax.c:2845 msgid "a register has no address" msgstr "" -#: config/tc-vax.c:2865 +#: config/tc-vax.c:2856 msgid "PC part of operand unpredictable" msgstr "" -#: config/tc-vax.c:3194 +#: config/tc-vax.c:3185 msgid "" "VAX options:\n" "-d LENGTH\t\tignored\n" @@ -6334,7 +7788,7 @@ msgid "" "-V\t\t\tignored\n" msgstr "" -#: config/tc-vax.c:3203 +#: config/tc-vax.c:3194 msgid "" "VMS options:\n" "-+\t\t\thash encode names longer than 31 characters\n" @@ -6345,678 +7799,693 @@ msgid "" "-v\"VERSION\"\t\tcode being assembled was produced by compiler \"VERSION\"\n" msgstr "" -#: config/tc-w65.c:136 +#: config/tc-w65.c:127 msgid "need on or off." msgstr "" -#: config/tc-w65.c:321 config/tc-w65.c:364 +#: config/tc-w65.c:311 config/tc-w65.c:354 msgid "syntax error after <exp" msgstr "" -#: config/tc-z8k.c:290 +#: config/tc-z8k.c:286 #, c-format msgid "register rr%d, out of range." msgstr "" -#: config/tc-z8k.c:298 +#: config/tc-z8k.c:294 #, c-format msgid "register rh%d, out of range." msgstr "" -#: config/tc-z8k.c:306 +#: config/tc-z8k.c:302 #, c-format msgid "register rl%d, out of range." msgstr "" -#: config/tc-z8k.c:315 +#: config/tc-z8k.c:311 #, c-format msgid "register rq%d, out of range." msgstr "" -#: config/tc-z8k.c:323 +#: config/tc-z8k.c:319 #, c-format msgid "register r%d, out of range." msgstr "" -#: config/tc-z8k.c:374 +#: config/tc-z8k.c:364 #, c-format msgid "expected %c" msgstr "" -#: config/tc-z8k.c:390 +#: config/tc-z8k.c:381 #, c-format msgid "register is wrong size for a word %s" msgstr "" -#: config/tc-z8k.c:405 +#: config/tc-z8k.c:397 #, c-format msgid "register is wrong size for address %s" msgstr "" -#: config/tc-z8k.c:680 +#: config/tc-z8k.c:665 msgid "Missing ) in ra(rb)" msgstr "" -#: config/tc-z8k.c:947 +#: config/tc-z8k.c:932 #, c-format msgid "operand %s0x%x out of range." msgstr "" -#: config/tc-z8k.c:1086 +#: config/tc-z8k.c:1070 msgid "immediate must be 1 or 2" msgstr "" -#: config/tc-z8k.c:1091 +#: config/tc-z8k.c:1073 msgid "immediate 1 or 2 expected" msgstr "" -#: config/tc-z8k.c:1119 +#: config/tc-z8k.c:1099 msgid "can't use R0 here" msgstr "" -#: config/tc-z8k.c:1278 +#: config/tc-z8k.c:1246 msgid "Can't find opcode to match operands" msgstr "" -#: config/tc-z8k.c:1390 +#: config/tc-z8k.c:1361 #, c-format msgid "invalid architecture -z%s" msgstr "" -#: config/tc-z8k.c:1406 +#: config/tc-z8k.c:1377 msgid "" "Z8K options:\n" "-z8001\t\t\tgenerate segmented code\n" "-z8002\t\t\tgenerate unsegmented code\n" msgstr "" -#: config/tc-z8k.c:1543 +#: config/tc-z8k.c:1521 #, c-format msgid "Can't subtract symbols in different sections %s %s" msgstr "" -#: depend.c:195 +#: depend.c:196 #, c-format msgid "Can't open `%s' for writing" msgstr "" -#: depend.c:207 +#: depend.c:208 #, c-format msgid "Can't close `%s'" msgstr "" -#: ecoff.c:1577 +#: dwarf2dbg.c:345 dwarf2dbg.c:379 +msgid "File number less than zero" +msgstr "" + +#: dwarf2dbg.c:385 +#, c-format +msgid "Unassigned file number %ld" +msgstr "" + +#: dwarf2dbg.c:1255 dwarf2dbg.c:1263 dwarf2dbg.c:1271 dwarf2dbg.c:1284 +#: dwarf2dbg.c:1291 +msgid "dwarf2 is not supported for this object file format" +msgstr "" + +#: ecoff.c:1555 #, c-format msgid "String too big (%lu bytes)" msgstr "" -#: ecoff.c:1603 +#: ecoff.c:1581 #, c-format msgid "Inserting \"%s\" into string hash table: %s" msgstr "" -#: ecoff.c:1635 ecoff.c:1828 ecoff.c:1854 ecoff.c:1886 ecoff.c:2042 -#: ecoff.c:2156 +#: ecoff.c:1613 ecoff.c:1807 ecoff.c:1832 ecoff.c:1864 ecoff.c:2018 +#: ecoff.c:2132 msgid "no current file pointer" msgstr "" -#: ecoff.c:1722 +#: ecoff.c:1700 msgid "too many st_End's" msgstr "" -#: ecoff.c:2068 +#: ecoff.c:2044 #, c-format msgid "Inserting \"%s\" into tag hash table: %s" msgstr "" -#: ecoff.c:2234 +#: ecoff.c:2210 msgid "fake .file after real one" msgstr "" -#: ecoff.c:2322 +#: ecoff.c:2300 msgid "Filename goes over one page boundary." msgstr "" -#: ecoff.c:2457 +#: ecoff.c:2435 msgid ".begin directive without a preceding .file directive" msgstr "" -#: ecoff.c:2464 +#: ecoff.c:2442 msgid ".begin directive without a preceding .ent directive" msgstr "" -#: ecoff.c:2496 +#: ecoff.c:2474 msgid ".bend directive without a preceding .file directive" msgstr "" -#: ecoff.c:2503 +#: ecoff.c:2481 msgid ".bend directive without a preceding .ent directive" msgstr "" -#: ecoff.c:2516 +#: ecoff.c:2494 msgid ".bend directive names unknown symbol" msgstr "" -#: ecoff.c:2560 +#: ecoff.c:2538 msgid ".def pseudo-op used inside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2562 +#: ecoff.c:2540 msgid "Empty symbol name in .def; ignored" msgstr "" -#: ecoff.c:2600 +#: ecoff.c:2578 msgid ".dim pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2615 +#: ecoff.c:2593 msgid "Badly formed .dim directive" msgstr "" -#: ecoff.c:2628 +#: ecoff.c:2606 msgid "Too many .dim entries" msgstr "" -#: ecoff.c:2649 +#: ecoff.c:2627 msgid ".scl pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2675 +#: ecoff.c:2653 msgid ".size pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2690 +#: ecoff.c:2668 msgid "Badly formed .size directive" msgstr "" -#: ecoff.c:2703 +#: ecoff.c:2681 msgid "Too many .size entries" msgstr "" -#: ecoff.c:2726 +#: ecoff.c:2704 msgid ".type pseudo-op used outside of .def/.endef; ignored" msgstr "" #. FIXME: We could handle this by setting the continued bit. #. There would still be a limit: the .type argument can not #. be infinite. -#: ecoff.c:2744 +#: ecoff.c:2722 #, c-format msgid "The type of %s is too complex; it will be simplified" msgstr "" -#: ecoff.c:2755 +#: ecoff.c:2733 msgid "Unrecognized .type argument" msgstr "" -#: ecoff.c:2794 +#: ecoff.c:2772 msgid ".tag pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2821 +#: ecoff.c:2799 msgid ".val pseudo-op used outside of .def/.endef; ignored" msgstr "" -#: ecoff.c:2829 +#: ecoff.c:2807 msgid ".val expression is too copmlex" msgstr "" -#: ecoff.c:2860 +#: ecoff.c:2838 msgid ".endef pseudo-op used before .def; ignored" msgstr "" -#: ecoff.c:2886 +#: ecoff.c:2864 msgid "Bad COFF debugging info" msgstr "" -#: ecoff.c:2935 +#: ecoff.c:2913 #, c-format msgid "No tag specified for %s" msgstr "" -#: ecoff.c:2967 +#: ecoff.c:2945 msgid "Bad COFF debugging information" msgstr "" -#: ecoff.c:3039 +#: ecoff.c:3017 msgid ".end directive without a preceding .file directive" msgstr "" -#: ecoff.c:3046 +#: ecoff.c:3024 msgid ".end directive without a preceding .ent directive" msgstr "" -#: ecoff.c:3069 +#: ecoff.c:3047 msgid ".end directive names unknown symbol" msgstr "" -#: ecoff.c:3098 +#: ecoff.c:3076 msgid "second .ent directive found before .end directive" msgstr "" -#: ecoff.c:3173 +#: ecoff.c:3151 msgid "No way to handle .file within .ent/.end section" msgstr "" -#: ecoff.c:3198 +#: ecoff.c:3176 msgid ".fmask outside of .ent" msgstr "" -#: ecoff.c:3267 +#: ecoff.c:3246 msgid ".mask outside of .ent" msgstr "" -#: ecoff.c:3297 +#: ecoff.c:3276 msgid ".loc before .file" msgstr "" -#: ecoff.c:3423 +#: ecoff.c:3402 #, c-format msgid "Ignoring attempt to redefine symbol `%s'." msgstr "" -#: ecoff.c:3436 +#: ecoff.c:3415 msgid "bad .weakext directive" msgstr "" -#: ecoff.c:3505 +#: ecoff.c:3484 #, c-format msgid ".stab%c is not supported" msgstr "" -#: ecoff.c:3515 +#: ecoff.c:3494 #, c-format msgid ".stab%c: ignoring non-zero other field" msgstr "" -#: ecoff.c:3549 +#: ecoff.c:3528 #, c-format msgid "" "Line number (%d) for .stab%c directive cannot fit in index field (20 bits)" msgstr "" -#: ecoff.c:3585 +#: ecoff.c:3564 #, c-format msgid "Illegal .stab%c directive, bad character" msgstr "" -#: ecoff.c:4047 ecoff.c:4236 ecoff.c:4261 +#: ecoff.c:4026 ecoff.c:4215 ecoff.c:4240 msgid ".begin/.bend in different segments" msgstr "" -#: ecoff.c:4762 +#: ecoff.c:4741 msgid "Missing .end or .bend at end of file" msgstr "" -#: ecoff.c:5253 +#: ecoff.c:5231 msgid "GP prologue size exceeds field size, using 0 instead" msgstr "" -#: expr.c:250 +#: expr.c:245 msgid "" "bad floating-point constant: exponent overflow, probably assembling junk" msgstr "" -#: expr.c:254 +#: expr.c:249 #, c-format msgid "bad floating-point constant: unknown error code=%d." msgstr "" -#: expr.c:434 +#: expr.c:429 msgid "" "A bignum with underscores may not have more than 8 hex digits in any word." msgstr "" -#: expr.c:454 +#: expr.c:452 msgid "A bignum with underscores must have exactly 4 words." msgstr "" -#. either not seen or not defined. +#. Either not seen or not defined. #. @@ Should print out the original string instead of #. the parsed number. -#: expr.c:583 +#: expr.c:575 #, c-format msgid "backw. ref to unknown label \"%d:\", 0 assumed." msgstr "" -#: expr.c:707 +#: expr.c:698 msgid "Character constant too large" msgstr "" -#: expr.c:947 +#: expr.c:949 #, c-format msgid "expr.c(operand): bad atof_generic return val %d" msgstr "" -#: expr.c:1007 -msgid "Missing ')' assumed" +#: expr.c:1012 +#, c-format +msgid "Missing '%c' assumed" msgstr "" -#: expr.c:1018 read.c:3866 +#: expr.c:1024 read.c:3869 msgid "EBCDIC constants are not supported" msgstr "" -#: expr.c:1088 +#: expr.c:1095 #, c-format msgid "Unary operator %c ignored because bad operand follows" msgstr "" -#: expr.c:1134 expr.c:1159 +#: expr.c:1141 expr.c:1166 msgid "syntax error in .startof. or .sizeof." msgstr "" -#: expr.c:1312 +#: expr.c:1314 msgid "Bad expression" msgstr "" -#: expr.c:1677 +#: expr.c:1674 msgid "missing operand; zero assumed" msgstr "" -#: expr.c:1710 +#: expr.c:1707 msgid "operation combines symbols in different segments" msgstr "" -#: expr.c:1726 +#: expr.c:1724 msgid "left operand is a bignum; integer 0 assumed" msgstr "" -#: expr.c:1728 +#: expr.c:1726 msgid "left operand is a float; integer 0 assumed" msgstr "" -#: expr.c:1737 +#: expr.c:1735 msgid "right operand is a bignum; integer 0 assumed" msgstr "" -#: expr.c:1739 +#: expr.c:1737 msgid "right operand is a float; integer 0 assumed" msgstr "" -#: expr.c:1787 symbols.c:1109 +#: expr.c:1793 symbols.c:1089 msgid "division by zero" msgstr "" -#: frags.c:85 +#: frags.c:86 #, c-format msgid "Can't extend frag %d. chars" msgstr "" -#: frags.c:170 +#: frags.c:167 msgid "attempt to allocate data in absolute section" msgstr "" -#: frags.c:176 +#: frags.c:173 msgid "attempt to allocate data in common section" msgstr "" -#: gasp.c:455 +#: gasp.c:452 msgid "redefinition not allowed\n" msgstr "" -#: gasp.c:529 +#: gasp.c:521 #, c-format msgid "the %c operator cannot take non-absolute arguments.\n" msgstr "" -#: gasp.c:606 +#: gasp.c:596 msgid "string where expression expected.\n" msgstr "" -#: gasp.c:612 +#: gasp.c:602 msgid "can't find primary in expression.\n" msgstr "" -#: gasp.c:652 +#: gasp.c:640 msgid "misplaced closing parens.\n" msgstr "" -#: gasp.c:689 +#: gasp.c:677 msgid "attempt to divide by zero.\n" msgstr "" -#: gasp.c:721 +#: gasp.c:708 msgid "can't add two relocatable expressions\n" msgstr "" -#: gasp.c:926 +#: gasp.c:916 msgid "unreasonable nesting.\n" msgstr "" -#: gasp.c:1004 +#: gasp.c:994 msgid "End of file not at start of line.\n" msgstr "" -#: gasp.c:1125 +#: gasp.c:1115 #, c-format msgid "Illegal base character %c.\n" msgstr "" -#: gasp.c:1240 +#: gasp.c:1229 #, c-format msgid "radix is %c must be one of b, q, d or h" msgstr "" -#: gasp.c:1276 +#: gasp.c:1264 #, c-format msgid "size must be one of b, w or l, is %c.\n" msgstr "" -#: gasp.c:1384 +#: gasp.c:1372 msgid "datab repeat must be constant.\n" msgstr "" -#: gasp.c:1386 +#: gasp.c:1374 msgid "datab data must be absolute.\n" msgstr "" -#: gasp.c:1400 +#: gasp.c:1388 msgid "align needs absolute expression.\n" msgstr "" -#: gasp.c:1407 +#: gasp.c:1395 msgid ".align needs absolute fill value.\n" msgstr "" -#: gasp.c:1435 +#: gasp.c:1423 msgid "res needs absolute expression for fill count.\n" msgstr "" -#: gasp.c:1515 +#: gasp.c:1504 msgid "form LIN= needs absolute expresssion.\n" msgstr "" -#: gasp.c:1518 +#: gasp.c:1507 msgid "COL=" msgstr "" -#: gasp.c:1521 +#: gasp.c:1510 msgid "form COL= needs absolute expresssion.\n" msgstr "" -#. Turns the next expression into a string -#: gasp.c:1563 macro.c:366 +#. Turns the next expression into a string. +#: gasp.c:1552 macro.c:387 #, c-format msgid "% operator needs absolute expression" msgstr "" -#: gasp.c:1625 +#: gasp.c:1614 msgid "misplaced ( .\n" msgstr "" -#: gasp.c:1640 +#: gasp.c:1629 msgid "misplaced ).\n" msgstr "" -#: gasp.c:1694 +#: gasp.c:1681 msgid ".instr needs absolute expresson.\n" msgstr "" -#: gasp.c:1732 +#: gasp.c:1718 msgid "need absolute position.\n" msgstr "" -#: gasp.c:1734 +#: gasp.c:1720 msgid "need absolute length.\n" msgstr "" -#: gasp.c:1983 +#: gasp.c:1966 msgid "END missing from end of file.\n" msgstr "" -#: gasp.c:2013 +#: gasp.c:1992 msgid ".ASSIGNA needs constant expression argument.\n" msgstr "" -#: gasp.c:2017 +#: gasp.c:1996 msgid ".ASSIGNA without label.\n" msgstr "" -#: gasp.c:2042 +#: gasp.c:2021 msgid ".ASSIGNS without label.\n" msgstr "" -#: gasp.c:2109 +#: gasp.c:2085 #, c-format msgid "Can't find preprocessor variable %s.\n" msgstr "" -#: gasp.c:2174 +#: gasp.c:2150 msgid "Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n" msgstr "" -#: gasp.c:2208 +#: gasp.c:2185 msgid "Comparison operator for strings must be EQ or NE\n" msgstr "" -#: gasp.c:2220 gasp.c:2230 gasp.c:2332 +#: gasp.c:2197 gasp.c:2207 gasp.c:2310 msgid "Conditional operator must have absolute operands.\n" msgstr "" -#: gasp.c:2225 +#: gasp.c:2202 msgid "String compared against expression.\n" msgstr "" -#: gasp.c:2275 +#: gasp.c:2253 msgid "AIF nesting unreasonable.\n" msgstr "" -#: gasp.c:2290 +#: gasp.c:2268 msgid "Multiple AELSEs in AIF.\n" msgstr "" -#: gasp.c:2306 +#: gasp.c:2284 msgid "AENDI without AIF.\n" msgstr "" -#: gasp.c:2329 gasp.c:2411 +#: gasp.c:2307 gasp.c:2389 msgid "IF nesting unreasonable.\n" msgstr "" -#: gasp.c:2421 +#: gasp.c:2399 msgid "Bad format for IF or IFNC.\n" msgstr "" -#: gasp.c:2441 +#: gasp.c:2420 msgid "AENDR without a AREPEAT.\n" msgstr "" -#: gasp.c:2443 +#: gasp.c:2422 msgid "ENDR without a REPT.\n" msgstr "" -#: gasp.c:2466 +#: gasp.c:2444 #, c-format msgid "AWHILE without a AENDW at %d.\n" msgstr "" -#: gasp.c:2504 +#: gasp.c:2481 msgid "AENDW without a AENDW.\n" msgstr "" -#: gasp.c:2549 +#: gasp.c:2525 msgid "AREPEAT must have absolute operand.\n" msgstr "" -#: gasp.c:2555 +#: gasp.c:2531 #, c-format msgid "AREPEAT without a AENDR at %d.\n" msgstr "" -#: gasp.c:2597 +#: gasp.c:2573 msgid ".ENDM without a matching .MACRO.\n" msgstr "" -#: gasp.c:2631 +#: gasp.c:2607 msgid "LOCAL outside of MACRO" msgstr "" -#: gasp.c:2644 +#: gasp.c:2620 #, c-format msgid "macro at line %d: %s\n" msgstr "" -#: gasp.c:2667 +#: gasp.c:2643 msgid "macro expansion" msgstr "" -#: gasp.c:2719 +#: gasp.c:2697 msgid "Character code in string must be absolute expression.\n" msgstr "" -#: gasp.c:2724 +#: gasp.c:2702 msgid "Missing > for character code.\n" msgstr "" -#: gasp.c:2783 +#: gasp.c:2761 #, c-format msgid "string for SDATAC longer than 255 characters (%d).\n" msgstr "" -#: gasp.c:2811 +#: gasp.c:2790 #, c-format msgid "illegal character in SDATA line (0x%x).\n" msgstr "" -#: gasp.c:2832 +#: gasp.c:2812 msgid "Must have absolute SDATAB repeat count.\n" msgstr "" -#: gasp.c:2835 +#: gasp.c:2815 #, c-format msgid "Must have positive SDATAB repeat count (%d).\n" msgstr "" -#: gasp.c:2863 +#: gasp.c:2843 #, c-format msgid "Unreasonable include depth (%ld).\n" msgstr "" -#: gasp.c:2917 +#: gasp.c:2897 #, c-format msgid "Can't open include file `%s'.\n" msgstr "" -#: gasp.c:2991 +#: gasp.c:2971 msgid "Unreasonable expansion (-u turns off check).\n" msgstr "" #. This one causes lots of pain when trying to preprocess -#. ordinary code -#: gasp.c:3212 +#. ordinary code. +#: gasp.c:3185 #, c-format msgid "Unrecognised pseudo op `%s'.\n" msgstr "" -#: gasp.c:3279 +#: gasp.c:3254 msgid "ORG command not allowed.\n" msgstr "" -#: gasp.c:3496 +#: gasp.c:3467 msgid "Invalid expression on command line.\n" msgstr "" -#: gasp.c:3537 +#: gasp.c:3510 #, c-format msgid "" "Usage: %s \n" @@ -7029,7 +8498,7 @@ msgid "" " [-p] [--print] print line numbers\n" msgstr "" -#: gasp.c:3546 +#: gasp.c:3519 msgid "" " [-s] [--copysource] copy source through as comments \n" " [-u] [--unreasonable] allow unreasonable nesting\n" @@ -7040,37 +8509,37 @@ msgid "" " [in-file]\n" msgstr "" -#: gasp.c:3562 +#: gasp.c:3536 #, c-format msgid "%s: Gnu Assembler Macro Preprocessor\n" msgstr "" #. This output is intended to follow the GNU standards document. -#: gasp.c:3646 +#: gasp.c:3619 #, c-format msgid "GNU assembler pre-processor %s\n" msgstr "" -#: gasp.c:3647 +#: gasp.c:3620 msgid "Copyright 1996 Free Software Foundation, Inc.\n" msgstr "" -#: gasp.c:3669 +#: gasp.c:3643 #, c-format msgid "%s: Can't open output file `%s'.\n" msgstr "" -#: gasp.c:3692 +#: gasp.c:3667 #, c-format msgid "%s: Can't open input file `%s'.\n" msgstr "" -#: gasp.c:3711 +#: gasp.c:3686 #, c-format msgid "Internal error, aborting at %s line %d" msgstr "" -#: gasp.c:3714 +#: gasp.c:3689 msgid "" "\n" "Please report this bug.\n" @@ -7083,147 +8552,147 @@ msgstr "" #. same as the one used by input_scrub_new_file(), if that is #. not true, then this code will fail]. #. -#. If we are reading from stdin, then we need to save each input line -#. here (assuming of course that we actually have a line of input to read), -#. so that it can be displayed in the listing that is produced at the end -#. of the assembly. -#: input-file.c:150 input-scrub.c:239 listing.c:353 +#. If we are reading from stdin, then we need to save each input +#. line here (assuming of course that we actually have a line of +#. input to read), so that it can be displayed in the listing +#. that is produced at the end of the assembly. +#: input-file.c:149 input-scrub.c:241 listing.c:344 msgid "{standard input}" msgstr "" -#: input-file.c:154 +#: input-file.c:153 #, c-format msgid "Can't open %s for reading." msgstr "" -#: input-file.c:205 input-file.c:234 +#: input-file.c:204 input-file.c:233 #, c-format msgid "Can't read from %s" msgstr "" -#: input-file.c:242 +#: input-file.c:241 #, c-format msgid "Can't close %s" msgstr "" -#: input-scrub.c:270 -msgid "buffers nested too deeply" +#: input-scrub.c:271 +msgid "macros nested too deeply" msgstr "" -#: input-scrub.c:371 +#: input-scrub.c:374 msgid "partial line at end of file ignored" msgstr "" -#: input-scrub.c:393 +#: input-scrub.c:396 msgid "Partial line at end of file ignored" msgstr "" -#: itbl-ops.c:359 +#: itbl-ops.c:350 msgid "Unable to allocate memory for new instructions\n" msgstr "" -#: listing.c:252 +#: listing.c:243 msgid "Warning:" msgstr "" -#: listing.c:259 +#: listing.c:250 msgid "Error:" msgstr "" -#: listing.c:1145 +#: listing.c:1125 #, c-format msgid "can't open list file: %s" msgstr "" -#: listing.c:1169 +#: listing.c:1149 #, c-format msgid "error closing list file: %s" msgstr "" -#: listing.c:1250 +#: listing.c:1228 msgid "strange paper height, set to no form" msgstr "" -#: listing.c:1316 +#: listing.c:1294 msgid "New line in title" msgstr "" -#: macro.c:529 +#: macro.c:550 msgid "unexpected end of file in macro definition" msgstr "" -#: macro.c:538 +#: macro.c:559 msgid "missing ) after formals" msgstr "" -#: macro.c:695 +#: macro.c:716 msgid "missplaced )" msgstr "" -#: macro.c:957 +#: macro.c:978 msgid "confusion in formal parameters" msgstr "" -#: macro.c:962 +#: macro.c:983 msgid "macro formal argument does not exist" msgstr "" -#: macro.c:977 +#: macro.c:998 msgid "can't mix positional and keyword arguments" msgstr "" -#: macro.c:985 +#: macro.c:1006 msgid "too many positional arguments" msgstr "" -#: macro.c:1165 +#: macro.c:1186 msgid "unexpected end of file in irp or irpc" msgstr "" -#: macro.c:1173 +#: macro.c:1194 msgid "missing model parameter" msgstr "" -#: messages.c:105 +#: messages.c:104 msgid "Assembler messages:\n" msgstr "" -#: messages.c:222 +#: messages.c:214 msgid "Warning: " msgstr "" -#: messages.c:331 +#: messages.c:318 msgid "Error: " msgstr "" -#: messages.c:435 messages.c:452 +#: messages.c:413 messages.c:429 msgid "Fatal error: " msgstr "" -#: messages.c:471 +#: messages.c:446 msgid "Internal error!\n" msgstr "" -#: messages.c:473 +#: messages.c:448 #, c-format msgid "Assertion failure in %s at %s line %d.\n" msgstr "" -#: messages.c:476 +#: messages.c:451 #, c-format msgid "Assertion failure at %s line %d.\n" msgstr "" -#: messages.c:477 messages.c:495 +#: messages.c:452 messages.c:471 msgid "Please report this bug.\n" msgstr "" -#: messages.c:490 +#: messages.c:466 #, c-format msgid "Internal error, aborting at %s line %d in %s\n" msgstr "" -#: messages.c:493 +#: messages.c:469 #, c-format msgid "Internal error, aborting at %s line %d\n" msgstr "" @@ -7251,472 +8720,468 @@ msgstr "" msgid "Can't continue" msgstr "" -#: read.c:454 +#: read.c:445 #, c-format msgid "error constructing %s pseudo-op table: %s" msgstr "" -#: read.c:819 +#: read.c:802 #, c-format msgid "Unknown pseudo-op: `%s'" msgstr "" -#: read.c:952 +#: read.c:934 #, c-format msgid "label \"%d$\" redefined" msgstr "" -#: read.c:1169 +#: read.c:1152 msgid ".abort detected. Abandoning ship." msgstr "" -#: read.c:1260 read.c:2033 +#: read.c:1238 read.c:2027 msgid "Alignment not a power of 2" msgstr "" -#: read.c:1268 +#: read.c:1247 #, c-format msgid "Alignment too large: %u assumed" msgstr "" -#: read.c:1300 +#: read.c:1279 msgid "expected fill pattern missing" msgstr "" -#: read.c:1497 +#: read.c:1483 #, c-format msgid "attempt to re-define symbol `%s'" msgstr "" #. Some of the back ends can't deal with non-positive line numbers. #. Besides, it's silly. -#: read.c:1621 +#: read.c:1607 #, c-format msgid "Line numbers must be positive; line number %d rejected." msgstr "" -#: read.c:1648 +#: read.c:1635 msgid "start address not supported" msgstr "" -#: read.c:1658 +#: read.c:1645 msgid ".err encountered" msgstr "" -#: read.c:1677 read.c:1679 +#: read.c:1664 read.c:1666 #, c-format msgid ".fail %ld encountered" msgstr "" -#: read.c:1716 +#: read.c:1703 #, c-format msgid ".fill size clamped to %d." msgstr "" -#: read.c:1721 +#: read.c:1708 msgid "Size negative: .fill ignored." msgstr "" -#: read.c:1727 +#: read.c:1714 msgid "Repeat < 0, .fill ignored" msgstr "" -#: read.c:1885 +#: read.c:1874 #, c-format msgid "unrecognized .linkonce type `%s'" msgstr "" -#: read.c:1898 read.c:1924 +#: read.c:1887 read.c:1913 msgid ".linkonce is not supported for this object file format" msgstr "" -#: read.c:1920 +#: read.c:1909 #, c-format msgid "bfd_set_section_flags: %s" msgstr "" -#: read.c:1989 +#: read.c:1978 #, c-format msgid "error setting flags for \".sbss\": %s" msgstr "" -#: read.c:2011 +#: read.c:2001 msgid "Expected comma after size" msgstr "" -#: read.c:2019 +#: read.c:2011 msgid "Missing alignment" msgstr "" -#: read.c:2161 +#: read.c:2162 msgid "bad expression" msgstr "" -#: read.c:2292 +#: read.c:2299 #, c-format msgid "attempt to redefine pseudo-op `%s' ignored" msgstr "" -#: read.c:2358 +#: read.c:2365 #, c-format msgid "invalid segment \"%s\"; segment \"%s\" assumed" msgstr "" -#: read.c:2364 +#: read.c:2371 msgid "ignoring fill value in absolute section" msgstr "" -#: read.c:2367 +#: read.c:2374 msgid "only constant offsets supported in absolute section" msgstr "" -#: read.c:2399 +#: read.c:2406 msgid "MRI style ORG pseudo-op not supported" msgstr "" -#: read.c:2487 +#: read.c:2495 msgid "unrecognized section type" msgstr "" -#: read.c:2555 +#: read.c:2563 #, c-format msgid "unrecognized section type `%s'" msgstr "" -#: read.c:2569 +#: read.c:2577 msgid "absolute sections are not supported" msgstr "" -#: read.c:2584 +#: read.c:2592 #, c-format msgid "unrecognized section command `%s'" msgstr "" -#: read.c:2672 +#: read.c:2680 #, c-format msgid "%s without %s" msgstr "" -#: read.c:2876 +#: read.c:2881 msgid "Unsupported variable size or fill value" msgstr "" -#: read.c:2901 +#: read.c:2906 msgid ".space repeat count is zero, ignored" msgstr "" -#: read.c:2903 +#: read.c:2908 msgid ".space repeat count is negative, ignored" msgstr "" -#: read.c:2932 +#: read.c:2937 msgid "space allocation too complex in absolute section" msgstr "" -#: read.c:2937 +#: read.c:2943 msgid "space allocation too complex in common section" msgstr "" -#: read.c:3024 read.c:4113 +#: read.c:3031 read.c:4114 #, c-format msgid "Bad floating literal: %s" msgstr "" -#: read.c:3100 +#: read.c:3104 #, c-format msgid "Rest of line ignored. First ignored character is `%c'." msgstr "" -#: read.c:3103 +#: read.c:3107 #, c-format msgid "Rest of line ignored. First ignored character valued 0x%x." msgstr "" -#: read.c:3154 +#: read.c:3158 msgid "illegal expression; zero assumed" msgstr "" -#: read.c:3156 +#: read.c:3160 msgid "missing expression; zero assumed" msgstr "" -#: read.c:3329 +#: read.c:3331 msgid "rva without symbol" msgstr "" -#: read.c:3454 +#: read.c:3455 msgid "attempt to store value in absolute section" msgstr "" -#: read.c:3492 read.c:4390 +#: read.c:3493 read.c:4391 msgid "zero assumed for missing expression" msgstr "" -#: read.c:3504 read.c:4402 +#: read.c:3505 read.c:4403 msgid "register value used as expression" msgstr "" #. Leading bits contain both 0s & 1s. -#: read.c:3594 +#: read.c:3595 #, c-format msgid "Value 0x%lx truncated to 0x%lx." msgstr "" -#: read.c:3610 +#: read.c:3611 #, c-format msgid "Bignum truncated to %d bytes" msgstr "" -#: read.c:3687 +#: read.c:3688 #, c-format msgid "unsupported BFD relocation size %u" msgstr "" -#: read.c:3776 +#: read.c:3778 msgid "using a bit field width of zero" msgstr "" -#: read.c:3784 +#: read.c:3786 #, c-format msgid "field width \"%s\" too complex for a bitfield" msgstr "" -#: read.c:3792 +#: read.c:3794 #, c-format msgid "field width %lu too big to fit in %d bytes: truncated to %d bits" msgstr "" -#: read.c:3813 +#: read.c:3816 #, c-format msgid "field value \"%s\" too complex for a bitfield" msgstr "" -#: read.c:3937 +#: read.c:3942 msgid "Unresolvable or nonpositive repeat count; using 1" msgstr "" -#: read.c:3988 +#: read.c:3993 #, c-format msgid "Unknown floating type type '%c'" msgstr "" -#: read.c:4010 +#: read.c:4015 msgid "Floating point constant too large" msgstr "" -#: read.c:4135 +#: read.c:4136 msgid "unresolvable or nonpositive repeat count; using 1" msgstr "" -#: read.c:4539 +#: read.c:4534 msgid "Expected <nn>" msgstr "" #. To be compatible with BSD 4.2 as: give the luser a linefeed!! -#: read.c:4572 read.c:4655 +#: read.c:4567 read.c:4653 msgid "Unterminated string: Newline inserted." msgstr "" -#: read.c:4663 +#: read.c:4661 msgid "Bad escaped character in string, '?' assumed" msgstr "" -#: read.c:4689 +#: read.c:4687 msgid "expected address expression; zero assumed" msgstr "" -#: read.c:4709 +#: read.c:4707 #, c-format msgid "symbol \"%s\" undefined; zero assumed" msgstr "" -#: read.c:4712 +#: read.c:4710 msgid "some symbol undefined; zero assumed" msgstr "" -#: read.c:4730 -msgid "bad or irreducible absolute expression; zero assumed" -msgstr "" - -#: read.c:4768 +#: read.c:4763 msgid "This string may not contain '\\0'" msgstr "" -#: read.c:4807 +#: read.c:4800 msgid "Missing string" msgstr "" -#: read.c:5036 +#: read.c:5022 msgid "missing .func" msgstr "" -#: read.c:5053 +#: read.c:5039 msgid ".endfunc missing for previous .func" msgstr "" -#: stabs.c:209 +#: stabs.c:213 msgid ".stabs: Missing comma" msgstr "" -#: stabs.c:217 stabs.c:225 stabs.c:236 +#: stabs.c:221 stabs.c:229 stabs.c:240 #, c-format msgid ".stab%c: Missing comma" msgstr "" -#: stabs.c:415 +#: stabs.c:419 msgid "comma missing in .xstabs" msgstr "" -#: subsegs.c:379 +#: subsegs.c:376 #, c-format msgid "Attempt to switch to nonexistent segment \"%s\"" msgstr "" -#: symbols.c:365 symbols.c:467 +#: symbols.c:357 symbols.c:456 #, c-format msgid "Symbol %s already defined." msgstr "" -#: symbols.c:453 +#: symbols.c:442 #, c-format msgid "Symbol \"%s\" is already defined as \"%s\"/%s%ld." msgstr "" -#: symbols.c:536 symbols.c:543 +#: symbols.c:519 symbols.c:526 #, c-format msgid "Inserting \"%s\" into symbol table failed: %s" msgstr "" -#: symbols.c:894 +#: symbols.c:872 #, c-format msgid "Symbol definition loop encountered at %s" msgstr "" -#: symbols.c:1071 symbols.c:1075 +#: symbols.c:1050 symbols.c:1054 #, c-format msgid "undefined symbol %s in operation" msgstr "" -#: symbols.c:1079 +#: symbols.c:1059 msgid "invalid section for operation" msgstr "" -#: symbols.c:1084 symbols.c:1088 +#: symbols.c:1064 symbols.c:1068 #, c-format msgid "undefined symbol %s in operation setting %s" msgstr "" -#: symbols.c:1093 +#: symbols.c:1073 #, c-format msgid "invalid section for operation setting %s" msgstr "" -#: symbols.c:1111 +#: symbols.c:1091 #, c-format msgid "division by zero when setting %s" msgstr "" -#: symbols.c:1183 write.c:1881 +#: symbols.c:1163 write.c:1945 #, c-format msgid "can't resolve value for symbol \"%s\"" msgstr "" -#: symbols.c:1556 +#: symbols.c:1533 #, c-format msgid "\"%d\" (instance number %d of a %s label)" msgstr "" -#: symbols.c:1606 +#: symbols.c:1589 #, c-format msgid "Attempt to get value of unresolved symbol %s" msgstr "" -#: write.c:169 +#: write.c:172 #, c-format msgid "field fx_size too small to hold %d" msgstr "" -#: write.c:306 +#: write.c:309 msgid "rva not supported" msgstr "" -#: write.c:502 +#: write.c:517 #, c-format msgid "attempt to .org/.space backwards? (%ld)" msgstr "" -#: write.c:974 +#: write.c:995 msgid "relocation out of range" msgstr "" -#: write.c:977 +#: write.c:998 #, c-format msgid "%s:%u: bad return from bfd_install_relocation: %x" msgstr "" -#: write.c:1022 +#: write.c:1043 msgid "internal error: fixup not contained within frag" msgstr "" -#: write.c:1038 +#: write.c:1059 #, c-format msgid "%s:%u: bad return from bfd_install_relocation" msgstr "" -#: write.c:1125 write.c:1149 +#: write.c:1146 write.c:1170 #, c-format msgid "FATAL: Can't write %s" msgstr "" -#: write.c:1180 +#: write.c:1202 msgid "Cannot write to output file." msgstr "" -#: write.c:1412 +#: write.c:1451 #, c-format msgid "%d error%s, %d warning%s, generating bad object file.\n" msgstr "" -#: write.c:1419 +#: write.c:1458 #, c-format msgid "%d error%s, %d warning%s, no object file generated.\n" msgstr "" -#: write.c:1818 +#: write.c:1882 #, c-format msgid "local label %s is not defined" msgstr "" -#: write.c:2123 +#: write.c:2187 #, c-format msgid "alignment padding (%lu bytes) not a multiple of %ld" msgstr "" -#: write.c:2229 +#: write.c:2297 #, c-format msgid ".word %s-%s+%s didn't fit" msgstr "" -#: write.c:2309 +#: write.c:2378 msgid "attempt to .org backwards ignored" msgstr "" -#: write.c:2332 +#: write.c:2402 msgid ".space specifies non-absolute value" msgstr "" -#: write.c:2336 +#: write.c:2406 msgid ".space or .fill with negative value, ignored" msgstr "" -#: write.c:2587 +#: write.c:2657 #, c-format msgid "" "Subtraction of two symbols in different sections \"%s\" {%s section} - " "\"%s\" {%s section} at file address %s." msgstr "" -#: write.c:2752 +#: write.c:2811 #, c-format msgid "Value of %s too large for field of %d bytes at %s" msgstr "" diff --git a/contrib/binutils/gas/read.c b/contrib/binutils/gas/read.c index 1522842..1086bf0 100644 --- a/contrib/binutils/gas/read.c +++ b/contrib/binutils/gas/read.c @@ -17,28 +17,25 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +02111-1307, USA. */ #if 0 -#define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will - change this a bit. But then, GNU isn't - spozed to run on your machine anyway. - (RMS is so shortsighted sometimes.) - */ +/* If your chars aren't 8 bits, you will change this a bit. + But then, GNU isn't spozed to run on your machine anyway. + (RMS is so shortsighted sometimes.) */ +#define MASK_CHAR (0xFF) #else -#define MASK_CHAR ((int)(unsigned char)-1) +#define MASK_CHAR ((int)(unsigned char) -1) #endif - /* This is the largest known floating point format (for now). It will - grow when we do 4361 style flonums. */ - + grow when we do 4361 style flonums. */ #define MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT (16) /* Routines that read assembler source text to build spagetti in memory. Another group of these functions is in the expr.c module. */ -/* for isdigit() */ +/* For isdigit (). */ #include <ctype.h> #include "as.h" @@ -55,28 +52,22 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Set by the object-format or the target. */ #ifndef TC_IMPLICIT_LCOMM_ALIGNMENT -#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) \ - do { \ - if ((SIZE) >= 8) \ - (P2VAR) = 3; \ - else if ((SIZE) >= 4) \ - (P2VAR) = 2; \ - else if ((SIZE) >= 2) \ - (P2VAR) = 1; \ - else \ - (P2VAR) = 0; \ - } while (0) -#endif - -/* The NOP_OPCODE is for the alignment fill value. - * fill it a nop instruction so that the disassembler does not choke - * on it - */ -#ifndef NOP_OPCODE -#define NOP_OPCODE 0x00 +#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) \ + do \ + { \ + if ((SIZE) >= 8) \ + (P2VAR) = 3; \ + else if ((SIZE) >= 4) \ + (P2VAR) = 2; \ + else if ((SIZE) >= 2) \ + (P2VAR) = 1; \ + else \ + (P2VAR) = 0; \ + } \ + while (0) #endif -char *input_line_pointer; /*->next char of source file to parse. */ +char *input_line_pointer; /*->next char of source file to parse. */ #if BITS_PER_CHAR != 8 /* The following table is indexed by[(char)] and will break if @@ -105,6 +96,8 @@ die horribly; #endif #ifndef LEX_HASH +/* The IA-64 assembler uses # as a suffix designating a symbol. We include + it in the symbol and strip it out in tc_canonicalize_symbol_name. */ #define LEX_HASH 0 #endif @@ -118,9 +111,8 @@ die horribly; #define LEX_TILDE 0 #endif -/* used by is_... macros. our ctype[] */ -char lex_type[256] = -{ +/* Used by is_... macros. our ctype[]. */ +char lex_type[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ABCDEFGHIJKLMNO */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ[\]^_ */ 0, 0, 0, LEX_HASH, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */ @@ -128,7 +120,7 @@ char lex_type[256] = LEX_AT, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* @ABCDEFGHIJKLMNO */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, 0, 3, /* PQRSTUVWXYZ[\]^_ */ 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* `abcdefghijklmno */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, LEX_TILDE, 0, /* pqrstuvwxyz{|}~. */ + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, LEX_BR, 0, LEX_BR, LEX_TILDE, 0, /* pqrstuvwxyz{|}~. */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, @@ -139,58 +131,59 @@ char lex_type[256] = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }; - -/* - * In: a character. - * Out: 1 if this character ends a line. - */ -#define Z_ (0) -char is_end_of_line[256] = -{ +/* In: a character. + Out: 1 if this character ends a line. */ +char is_end_of_line[256] = { #ifdef CR_EOL - 99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, 99, Z_, Z_, /* @abcdefghijklmno */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, /* @abcdefghijklmno */ #else - 99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, Z_, Z_, Z_, /* @abcdefghijklmno */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* @abcdefghijklmno */ #endif - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ -#ifdef TC_HPPA - Z_,99, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* _!"#$%&'()*+,-./ */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* 0123456789:;<=>? */ -#else - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, 99, Z_, Z_, Z_, Z_, /* 0123456789:;<=>? */ -#endif - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ - Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, Z_, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* _!"#$%&'()*+,-./ */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0123456789:;<=>? */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* */ }; -#undef Z_ -/* Functions private to this file. */ +#ifdef IGNORE_OPCODE_CASE +char original_case_string[128]; +#endif + +/* Functions private to this file. */ -static char *buffer; /* 1st char of each buffer of lines is here. */ -static char *buffer_limit; /*->1 + last char in buffer. */ +static char *buffer; /* 1st char of each buffer of lines is here. */ +static char *buffer_limit; /*->1 + last char in buffer. */ -/* TARGET_BYTES_BIG_ENDIAN is required to be defined to either 0 or 1 in the - tc-<CPU>.h file. See the "Porting GAS" section of the internals manual. */ +/* TARGET_BYTES_BIG_ENDIAN is required to be defined to either 0 or 1 + in the tc-<CPU>.h file. See the "Porting GAS" section of the + internals manual. */ int target_big_endian = TARGET_BYTES_BIG_ENDIAN; -static char *old_buffer; /* JF a hack */ +static char *old_buffer; /* JF a hack. */ static char *old_input; static char *old_limit; -/* Variables for handling include file directory table. */ +/* Variables for handling include file directory table. */ + +/* Table of pointers to directories to search for .include's. */ +char **include_dirs; -char **include_dirs; /* Table of pointers to directories to - search for .include's */ -int include_dir_count; /* How many are in the table */ -int include_dir_maxlen = 1;/* Length of longest in table */ +/* How many are in the table. */ +int include_dir_count; + +/* Length of longest in table. */ +int include_dir_maxlen = 1; #ifndef WORKING_DOT_WORD struct broken_word *broken_words; @@ -247,7 +240,6 @@ static void pobegin PARAMS ((void)); static int get_line_sb PARAMS ((sb *)); static void generate_file_debug PARAMS ((void)); - void read_begin () { @@ -261,21 +253,20 @@ read_begin () obstack_begin (¬es, chunksize); obstack_begin (&cond_obstack, chunksize); - /* Use machine dependent syntax */ + /* Use machine dependent syntax. */ for (p = line_separator_chars; *p; p++) is_end_of_line[(unsigned char) *p] = 1; - /* Use more. FIXME-SOMEDAY. */ + /* Use more. FIXME-SOMEDAY. */ if (flag_mri) lex_type['?'] = 3; } -/* set up pseudo-op tables */ +/* Set up pseudo-op tables. */ static struct hash_control *po_hash; -static const pseudo_typeS potable[] = -{ +static const pseudo_typeS potable[] = { {"abort", s_abort, 0}, {"align", s_align_ptwo, 0}, {"ascii", stringer, 0}, @@ -283,7 +274,7 @@ static const pseudo_typeS potable[] = {"balign", s_align_bytes, 0}, {"balignw", s_align_bytes, -2}, {"balignl", s_align_bytes, -4}, -/* block */ +/* block */ {"byte", cons, 1}, {"comm", s_comm, 0}, {"common", s_mri_common, 0}, @@ -315,10 +306,10 @@ static const pseudo_typeS potable[] = #ifdef S_SET_DESC {"desc", s_desc, 0}, #endif -/* dim */ +/* dim */ {"double", float_cons, 'd'}, -/* dsect */ - {"eject", listing_eject, 0}, /* Formfeed listing */ +/* dsect */ + {"eject", listing_eject, 0}, /* Formfeed listing. */ {"else", s_else, 0}, {"elsec", s_else, 0}, {"elseif", s_elseif, (int) O_ne}, @@ -326,13 +317,13 @@ static const pseudo_typeS potable[] = {"endc", s_endif, 0}, {"endfunc", s_func, 1}, {"endif", s_endif, 0}, -/* endef */ +/* endef */ {"equ", s_set, 0}, {"equiv", s_set, 1}, {"err", s_err, 0}, {"exitm", s_mexit, 0}, -/* extend */ - {"extern", s_ignore, 0}, /* We treat all undef as ext */ +/* extend */ + {"extern", s_ignore, 0}, /* We treat all undef as ext. */ {"appfile", s_app_file, 1}, {"appline", s_app_line, 0}, {"fail", s_fail, 0}, @@ -365,9 +356,9 @@ static const pseudo_typeS potable[] = {"irpc", s_irp, 1}, {"irepc", s_irp, 1}, {"lcomm", s_lcomm, 0}, - {"lflags", listing_flags, 0}, /* Listing flags */ + {"lflags", listing_flags, 0}, /* Listing flags. */ {"linkonce", s_linkonce, 0}, - {"list", listing_list, 1}, /* Turn listing on */ + {"list", listing_list, 1}, /* Turn listing on. */ {"llen", listing_psize, 1}, {"long", cons, 4}, {"lsym", s_lsym, 0}, @@ -377,7 +368,7 @@ static const pseudo_typeS potable[] = {".mri", s_mri, 0}, /* Special case so .mri works in MRI mode. */ {"name", s_ignore, 0}, {"noformat", s_ignore, 0}, - {"nolist", listing_list, 0}, /* Turn listing off */ + {"nolist", listing_list, 0}, /* Turn listing off. */ {"nopage", listing_nopage, 0}, {"octa", cons, 16}, {"offset", s_struct, 0}, @@ -388,19 +379,19 @@ static const pseudo_typeS potable[] = {"page", listing_eject, 0}, {"plen", listing_psize, 0}, {"print", s_print, 0}, - {"psize", listing_psize, 0}, /* set paper size */ + {"psize", listing_psize, 0}, /* Set paper size. */ {"purgem", s_purgem, 0}, {"quad", cons, 8}, {"rep", s_rept, 0}, {"rept", s_rept, 0}, {"rva", s_rva, 4}, - {"sbttl", listing_title, 1}, /* Subtitle of listing */ -/* scl */ -/* sect */ + {"sbttl", listing_title, 1}, /* Subtitle of listing. */ +/* scl */ +/* sect */ {"set", s_set, 0}, {"short", cons, 2}, {"single", float_cons, 'f'}, -/* size */ +/* size */ {"space", s_space, 0}, {"skip", s_space, 0}, {"sleb128", s_leb128, 1}, @@ -410,7 +401,7 @@ static const pseudo_typeS potable[] = {"stabs", s_stab, 's'}, {"string", stringer, 1}, {"struct", s_struct, 0}, -/* tag */ +/* tag */ {"text", s_text, 0}, /* This is for gcc to use. It's only just been added (2/94), so gcc @@ -423,19 +414,19 @@ static const pseudo_typeS potable[] = this one. Match it either way... */ {"this_gcc_requires_the_gnu_assembler", s_ignore, 0}, - {"title", listing_title, 0}, /* Listing title */ + {"title", listing_title, 0}, /* Listing title. */ {"ttl", listing_title, 0}, -/* type */ +/* type */ {"uleb128", s_leb128, 0}, -/* use */ -/* val */ +/* use */ +/* val */ {"xcom", s_comm, 0}, {"xdef", s_globl, 0}, {"xref", s_ignore, 0}, {"xstabs", s_xstab, 's'}, {"word", cons, 2}, {"zero", s_space, 0}, - {NULL, NULL, 0} /* end sentinel */ + {NULL, NULL, 0} /* End sentinel. */ }; static int pop_override_ok = 0; @@ -464,21 +455,21 @@ pop_insert (table) #define obj_pop_insert() pop_insert(obj_pseudo_table) #endif -static void +static void pobegin () { po_hash = hash_new (); - /* Do the target-specific pseudo ops. */ + /* Do the target-specific pseudo ops. */ pop_table_name = "md"; md_pop_insert (); - /* Now object specific. Skip any that were in the target table. */ + /* Now object specific. Skip any that were in the target table. */ pop_table_name = "obj"; pop_override_ok = 1; obj_pop_insert (); - /* Now portable ones. Skip any that we've seen already. */ + /* Now portable ones. Skip any that we've seen already. */ pop_table_name = "standard"; pop_insert (potable); } @@ -486,13 +477,12 @@ pobegin () #define HANDLE_CONDITIONAL_ASSEMBLY() \ if (ignore_input ()) \ { \ - while (! is_end_of_line[(unsigned char) *input_line_pointer++]) \ + while (!is_end_of_line[(unsigned char) *input_line_pointer++]) \ if (input_line_pointer == buffer_limit) \ break; \ continue; \ } - /* This function is used when scrubbing the characters between #APP and #NO_APP. */ @@ -514,20 +504,21 @@ scrub_from_string (buf, buflen) return copy; } -/* read_a_source_file() - * - * We read the file, putting things into a web that - * represents what we have been reading. - */ -void +/* We read the file, putting things into a web that represents what we + have been reading. */ +void read_a_source_file (name) char *name; { register char c; - register char *s; /* string of symbol, '\0' appended */ + register char *s; /* String of symbol, '\0' appended. */ register int temp; pseudo_typeS *pop; +#ifdef WARN_COMMENTS + found_comment = 0; +#endif + buffer = input_scrub_new_file (name); listing_file (name); @@ -540,26 +531,23 @@ read_a_source_file (name) generate_file_debug (); while ((buffer_limit = input_scrub_next_buffer (&input_line_pointer)) != 0) - { /* We have another line to parse. */ - know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */ + { /* We have another line to parse. */ + know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */ contin: /* JF this goto is my fault I admit it. Someone brave please re-write the whole input section here? Pleeze??? */ while (input_line_pointer < buffer_limit) { - /* We have more of this buffer to parse. */ + /* We have more of this buffer to parse. */ - /* - * We now have input_line_pointer->1st char of next line. - * If input_line_pointer [-1] == '\n' then we just - * scanned another line: so bump line counters. - */ + /* We now have input_line_pointer->1st char of next line. + If input_line_pointer [-1] == '\n' then we just + scanned another line: so bump line counters. */ if (is_end_of_line[(unsigned char) input_line_pointer[-1]]) { #ifdef md_start_line_hook md_start_line_hook (); #endif - if (input_line_pointer[-1] == '\n') bump_line_counters (); @@ -610,12 +598,12 @@ read_a_source_file (name) /* In MRI mode, we need to handle the MACRO pseudo-op specially: we don't want to put the symbol in the symbol table. */ - if (! mri_line_macro + if (!mri_line_macro #ifdef TC_START_LABEL_WITHOUT_COLON - && TC_START_LABEL_WITHOUT_COLON(c, - input_line_pointer) + && TC_START_LABEL_WITHOUT_COLON(c, + input_line_pointer) #endif - ) + ) line_label = colon (line_start); else line_label = symbol_create (line_start, @@ -630,28 +618,25 @@ read_a_source_file (name) } } - /* - * We are at the begining of a line, or similar place. - * We expect a well-formed assembler statement. - * A "symbol-name:" is a statement. - * - * Depending on what compiler is used, the order of these tests - * may vary to catch most common case 1st. - * Each test is independent of all other tests at the (top) level. - * PLEASE make a compiler that doesn't use this assembler. - * It is crufty to waste a compiler's time encoding things for this - * assembler, which then wastes more time decoding it. - * (And communicating via (linear) files is silly! - * If you must pass stuff, please pass a tree!) - */ + /* We are at the begining of a line, or similar place. + We expect a well-formed assembler statement. + A "symbol-name:" is a statement. + + Depending on what compiler is used, the order of these tests + may vary to catch most common case 1st. + Each test is independent of all other tests at the (top) level. + PLEASE make a compiler that doesn't use this assembler. + It is crufty to waste a compiler's time encoding things for this + assembler, which then wastes more time decoding it. + (And communicating via (linear) files is silly! + If you must pass stuff, please pass a tree!) */ if ((c = *input_line_pointer++) == '\t' || c == ' ' || c == '\f' || c == 0) - { - c = *input_line_pointer++; - } - know (c != ' '); /* No further leading whitespace. */ + c = *input_line_pointer++; + + know (c != ' '); /* No further leading whitespace. */ #ifndef NO_LISTING /* If listing is on, and we are expanding a macro, then give @@ -664,18 +649,18 @@ read_a_source_file (name) int len; /* Find the end of the current expanded macro line. */ - for (s = input_line_pointer-1; *s ; ++s) + for (s = input_line_pointer - 1; *s; ++s) if (is_end_of_line[(unsigned char) *s]) break; /* Copy it for safe keeping. Also give an indication of how much macro nesting is involved at this point. */ - len = s - (input_line_pointer-1); + len = s - (input_line_pointer - 1); copy = (char *) xmalloc (len + macro_nest + 2); memset (copy, '>', macro_nest); copy[macro_nest] = ' '; - memcpy (copy + macro_nest + 1, input_line_pointer-1, len); - copy[macro_nest+1+len] = '\0'; + memcpy (copy + macro_nest + 1, input_line_pointer - 1, len); + copy[macro_nest + 1 + len] = '\0'; /* Install the line with the listing facility. */ listing_newline (copy); @@ -684,37 +669,34 @@ read_a_source_file (name) listing_newline (NULL); } #endif - - /* - * C is the 1st significant character. - * Input_line_pointer points after that character. - */ + /* C is the 1st significant character. + Input_line_pointer points after that character. */ if (is_name_beginner (c)) { - /* want user-defined label or pseudo/opcode */ + /* Want user-defined label or pseudo/opcode. */ HANDLE_CONDITIONAL_ASSEMBLY (); s = --input_line_pointer; - c = get_symbol_end (); /* name's delimiter */ - /* - * C is character after symbol. - * That character's place in the input line is now '\0'. - * S points to the beginning of the symbol. - * [In case of pseudo-op, s->'.'.] - * Input_line_pointer->'\0' where c was. - */ - if (TC_START_LABEL(c, input_line_pointer)) + c = get_symbol_end (); /* name's delimiter. */ + + /* C is character after symbol. + That character's place in the input line is now '\0'. + S points to the beginning of the symbol. + [In case of pseudo-op, s->'.'.] + Input_line_pointer->'\0' where c was. */ + if (TC_START_LABEL (c, input_line_pointer)) { if (flag_m68k_mri) { char *rest = input_line_pointer + 1; /* In MRI mode, \tsym: set 0 is permitted. */ - if (*rest == ':') ++rest; + if (*rest == ' ' || *rest == '\t') ++rest; + if ((strncasecmp (rest, "EQU", 3) == 0 || strncasecmp (rest, "SET", 3) == 0) && (rest[3] == ' ' || rest[3] == '\t')) @@ -725,18 +707,17 @@ read_a_source_file (name) } } - line_label = colon (s); /* user-defined label */ - *input_line_pointer++ = ':'; /* Put ':' back for error messages' sake. */ - /* Input_line_pointer->after ':'. */ + line_label = colon (s); /* User-defined label. */ + /* Put ':' back for error messages' sake. */ + *input_line_pointer++ = ':'; + /* Input_line_pointer->after ':'. */ SKIP_WHITESPACE (); - - } else if (c == '=' || ((c == ' ' || c == '\t') && input_line_pointer[1] == '=' #ifdef TC_EQUAL_IN_INSN - && ! TC_EQUAL_IN_INSN (c, input_line_pointer) + && !TC_EQUAL_IN_INSN (c, input_line_pointer) #endif )) { @@ -744,13 +725,17 @@ read_a_source_file (name) demand_empty_rest_of_line (); } else - { /* expect pseudo-op or machine instruction */ + { + /* Expect pseudo-op or machine instruction. */ pop = NULL; -#define IGNORE_OPCODE_CASE #ifdef IGNORE_OPCODE_CASE { char *s2 = s; + + strncpy (original_case_string, s2, sizeof (original_case_string)); + original_case_string[sizeof (original_case_string) - 1] = 0; + while (*s2) { if (isupper ((unsigned char) *s2)) @@ -759,7 +744,6 @@ read_a_source_file (name) } } #endif - if (NO_PSEUDO_DOT || flag_m68k_mri) { /* The MRI assembler and the m88k use pseudo-ops @@ -770,15 +754,13 @@ read_a_source_file (name) } if (pop != NULL - || (! flag_m68k_mri && *s == '.')) + || (!flag_m68k_mri && *s == '.')) { - /* - * PSEUDO - OP. - * - * WARNING: c has next char, which may be end-of-line. - * We lookup the pseudo-op table with s+1 because we - * already know that the pseudo-op begins with a '.'. - */ + /* PSEUDO - OP. + + WARNING: c has next char, which may be end-of-line. + We lookup the pseudo-op table with s+1 because we + already know that the pseudo-op begins with a '.'. */ if (pop == NULL) pop = (pseudo_typeS *) hash_find (po_hash, s + 1); @@ -788,24 +770,25 @@ read_a_source_file (name) this is. */ if (mri_pending_align && (pop == NULL - || ! ((pop->poc_handler == cons - && pop->poc_val == 1) - || (pop->poc_handler == s_space - && pop->poc_val == 1) + || !((pop->poc_handler == cons + && pop->poc_val == 1) + || (pop->poc_handler == s_space + && pop->poc_val == 1) #ifdef tc_conditional_pseudoop - || tc_conditional_pseudoop (pop) + || tc_conditional_pseudoop (pop) #endif - || pop->poc_handler == s_if - || pop->poc_handler == s_ifdef - || pop->poc_handler == s_ifc - || pop->poc_handler == s_ifeqs - || pop->poc_handler == s_else - || pop->poc_handler == s_endif - || pop->poc_handler == s_globl - || pop->poc_handler == s_ignore))) + || pop->poc_handler == s_if + || pop->poc_handler == s_ifdef + || pop->poc_handler == s_ifc + || pop->poc_handler == s_ifeqs + || pop->poc_handler == s_else + || pop->poc_handler == s_endif + || pop->poc_handler == s_globl + || pop->poc_handler == s_ignore))) { do_align (1, (char *) NULL, 0, 0); mri_pending_align = 0; + if (line_label != NULL) { symbol_set_frag (line_label, frag_now); @@ -813,7 +796,7 @@ read_a_source_file (name) } } - /* Print the error msg now, while we still can */ + /* Print the error msg now, while we still can. */ if (pop == NULL) { as_bad (_("Unknown pseudo-op: `%s'"), s); @@ -822,18 +805,17 @@ read_a_source_file (name) continue; } - /* Put it back for error messages etc. */ + /* Put it back for error messages etc. */ *input_line_pointer = c; /* The following skip of whitespace is compulsory. A well shaped space is sometimes all that separates - keyword from operands. */ + keyword from operands. */ if (c == ' ' || c == '\t') input_line_pointer++; - /* - * Input_line is restored. - * Input_line_pointer->1st non-blank char - * after pseudo-operation. - */ + + /* Input_line is restored. + Input_line_pointer->1st non-blank char + after pseudo-operation. */ (*pop->poc_handler) (pop->poc_val); /* If that was .end, just get out now. */ @@ -847,8 +829,8 @@ read_a_source_file (name) int inescape = 0; #endif - /* WARNING: c has char, which may be end-of-line. */ - /* Also: input_line_pointer->`\0` where c was. */ + /* WARNING: c has char, which may be end-of-line. */ + /* Also: input_line_pointer->`\0` where c was. */ *input_line_pointer = c; while (!is_end_of_line[(unsigned char) *input_line_pointer] || inquote @@ -858,12 +840,12 @@ read_a_source_file (name) ) { if (flag_m68k_mri && *input_line_pointer == '\'') - inquote = ! inquote; + inquote = !inquote; #ifdef QUOTES_IN_INSN if (inescape) inescape = 0; else if (*input_line_pointer == '"') - inquote = ! inquote; + inquote = !inquote; else if (*input_line_pointer == '\\') inescape = 1; #endif @@ -879,7 +861,7 @@ read_a_source_file (name) { sb out; const char *err; - macro_entry *macro; + macro_entry *macro; if (check_macro (s, &out, '\0', &err, ¯o)) { @@ -892,7 +874,7 @@ read_a_source_file (name) buffer_limit = input_scrub_next_buffer (&input_line_pointer); #ifdef md_macro_info - md_macro_info (macro); + md_macro_info (macro); #endif continue; } @@ -909,17 +891,16 @@ read_a_source_file (name) } } - md_assemble (s); /* Assemble 1 instruction. */ + md_assemble (s); /* Assemble 1 instruction. */ *input_line_pointer++ = c; /* We resume loop AFTER the end-of-line from - this instruction. */ - } /* if (*s=='.') */ - } /* if c==':' */ + this instruction. */ + } + } continue; - } /* if (is_name_beginner(c) */ - + } /* Empty statement? */ if (is_end_of_line[(unsigned char) c]) @@ -928,18 +909,19 @@ read_a_source_file (name) if ((LOCAL_LABELS_DOLLAR || LOCAL_LABELS_FB) && isdigit ((unsigned char) c)) { - /* local label ("4:") */ + /* local label ("4:") */ char *backup = input_line_pointer; HANDLE_CONDITIONAL_ASSEMBLY (); temp = c - '0'; + /* Read the whole number. */ while (isdigit ((unsigned char) *input_line_pointer)) { temp = (temp * 10) + *input_line_pointer - '0'; ++input_line_pointer; - } /* read the whole number */ + } if (LOCAL_LABELS_DOLLAR && *input_line_pointer == '$' @@ -969,7 +951,7 @@ read_a_source_file (name) } /* local label ("4:") */ if (c && strchr (line_comment_chars, c)) - { /* Its a comment. Better say APP or NO_APP */ + { /* Its a comment. Better say APP or NO_APP. */ char *ends; char *new_buf; char *new_tmp; @@ -992,7 +974,7 @@ read_a_source_file (name) /* The end of the #APP wasn't in this buffer. We keep reading in buffers until we find the #NO_APP that goes with this #APP There is one. The specs - guarentee it. . . */ + guarentee it... */ tmp_len = buffer_limit - s; tmp_buf = xmalloc (tmp_len + 1); memcpy (tmp_buf, s, tmp_len); @@ -1060,6 +1042,7 @@ read_a_source_file (name) buffer = new_buf; input_line_pointer = new_buf; buffer_limit = new_tmp; + continue; } @@ -1069,11 +1052,10 @@ read_a_source_file (name) if (tc_unrecognized_line (c)) continue; #endif - - /* as_warn("Junk character %d.",c); Now done by ignore_rest */ - input_line_pointer--; /* Report unknown char as ignored. */ + /* as_warn (_("Junk character %d."),c); Now done by ignore_rest. */ + input_line_pointer--; /* Report unknown char as ignored. */ ignore_rest_of_line (); - } /* while (input_line_pointer<buffer_limit) */ + } #ifdef md_after_pass_hook md_after_pass_hook (); @@ -1092,14 +1074,22 @@ read_a_source_file (name) goto contin; } } - } /* while (more buffers to scan) */ + } quit: #ifdef md_cleanup - md_cleanup(); + md_cleanup (); +#endif + /* Close the input file. */ + input_scrub_close (); +#ifdef WARN_COMMENTS + { + if (warn_comment && found_comment) + as_warn_where (found_comment_file, found_comment, + "first comment found here"); + } #endif - input_scrub_close (); /* Close the input file */ } /* For most MRI pseudo-ops, the line actually ends at the first @@ -1114,37 +1104,30 @@ char * mri_comment_field (stopcp) char *stopcp; { -#ifdef TC_M68K - char *s; +#ifdef TC_M68K int inquote = 0; know (flag_m68k_mri); for (s = input_line_pointer; - ((! is_end_of_line[(unsigned char) *s] && *s != ' ' && *s != '\t') + ((!is_end_of_line[(unsigned char) *s] && *s != ' ' && *s != '\t') || inquote); s++) { if (*s == '\'') - inquote = ! inquote; + inquote = !inquote; } - *stopcp = *s; - *s = '\0'; - return s; - #else - - char *s; - - for (s = input_line_pointer; ! is_end_of_line[(unsigned char) *s]; s++) + for (s = input_line_pointer; + !is_end_of_line[(unsigned char) *s]; + s++) ; +#endif *stopcp = *s; *s = '\0'; - return s; - -#endif + return s; } /* Skip to the end of an MRI comment field. */ @@ -1158,11 +1141,11 @@ mri_comment_end (stop, stopc) input_line_pointer = stop; *stop = stopc; - while (! is_end_of_line[(unsigned char) *input_line_pointer]) + while (!is_end_of_line[(unsigned char) *input_line_pointer]) ++input_line_pointer; } -void +void s_abort (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -1175,33 +1158,28 @@ s_abort (ignore) the maximum number of characters to skip when doing the alignment, or 0 if there is no maximum. */ -static void +static void do_align (n, fill, len, max) int n; char *fill; int len; int max; { - char default_fill; - #ifdef md_do_align md_do_align (n, fill, len, max, just_record_alignment); #endif - if (fill == NULL) - { - if (subseg_text_p (now_seg)) - default_fill = NOP_OPCODE; - else - default_fill = 0; - fill = &default_fill; - len = 1; - } - - /* Only make a frag if we HAVE to. . . */ + /* Only make a frag if we HAVE to... */ if (n != 0 && !need_pass_2) { - if (len <= 1) + if (fill == NULL) + { + if (subseg_text_p (now_seg)) + frag_align_code (n, max); + else + frag_align (n, 0, max); + } + else if (len <= 1) frag_align (n, *fill, max); else frag_align_pattern (n, fill, len, max); @@ -1239,7 +1217,7 @@ s_align (arg, bytes_p) if (arg < 0) align = 0; else - align = arg; /* Default value from pseudo-op table */ + align = arg; /* Default value from pseudo-op table. */ } else { @@ -1258,6 +1236,7 @@ s_align (arg, bytes_p) ; if (align != 1) as_bad (_("Alignment not a power of 2")); + align = i; } } @@ -1294,7 +1273,7 @@ s_align (arg, bytes_p) } } - if (! fill_p) + if (!fill_p) { if (arg < 0) as_warn (_("expected fill pattern missing")); @@ -1307,7 +1286,7 @@ s_align (arg, bytes_p) if (arg >= 0) fill_len = 1; else - fill_len = - arg; + fill_len = -arg; if (fill_len <= 1) { char fill_char; @@ -1335,7 +1314,7 @@ s_align (arg, bytes_p) /* Handle the .align pseudo-op on machines where ".align 4" means align to a 4 byte boundary. */ -void +void s_align_bytes (arg) int arg; { @@ -1345,14 +1324,14 @@ s_align_bytes (arg) /* Handle the .align pseudo-op on machines where ".align 4" means align to a 2**4 boundary. */ -void +void s_align_ptwo (arg) int arg; { s_align (arg, 0); } -void +void s_comm (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -1369,10 +1348,11 @@ s_comm (ignore) name = input_line_pointer; c = get_symbol_end (); - /* just after name is now '\0' */ + /* Just after name is now '\0'. */ p = input_line_pointer; *p = c; SKIP_WHITESPACE (); + if (*input_line_pointer != ',') { as_bad (_("Expected comma after symbol-name: rest of line ignored.")); @@ -1381,7 +1361,9 @@ s_comm (ignore) mri_comment_end (stop, stopc); return; } + input_line_pointer++; /* skip ',' */ + if ((temp = get_absolute_expression ()) < 0) { as_warn (_(".COMMon length (%ld.) <0! Ignored."), (long) temp); @@ -1390,10 +1372,12 @@ s_comm (ignore) mri_comment_end (stop, stopc); return; } + *p = 0; symbolP = symbol_find_or_make (name); *p = c; - if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP)) + + if (S_IS_DEFINED (symbolP) && !S_IS_COMMON (symbolP)) { as_bad (_("Ignoring attempt to re-define symbol `%s'."), S_GET_NAME (symbolP)); @@ -1402,6 +1386,7 @@ s_comm (ignore) mri_comment_end (stop, stopc); return; } + if (S_GET_VALUE (symbolP)) { if (S_GET_VALUE (symbolP) != (valueT) temp) @@ -1418,7 +1403,7 @@ s_comm (ignore) #ifdef OBJ_VMS { extern int flag_one; - if ( (!temp) || !flag_one) + if (!temp || !flag_one) S_GET_OTHER(symbolP) = const_flag; } #endif /* not OBJ_VMS */ @@ -1446,7 +1431,7 @@ s_mri_common (small) char *stop = NULL; char stopc; - if (! flag_mri) + if (!flag_mri) { s_comm (0); return; @@ -1457,7 +1442,7 @@ s_mri_common (small) SKIP_WHITESPACE (); name = input_line_pointer; - if (! isdigit ((unsigned char) *name)) + if (!isdigit ((unsigned char) *name)) c = get_symbol_end (); else { @@ -1466,6 +1451,7 @@ s_mri_common (small) ++input_line_pointer; } while (isdigit ((unsigned char) *input_line_pointer)); + c = *input_line_pointer; *input_line_pointer = '\0'; @@ -1492,7 +1478,7 @@ s_mri_common (small) align = get_absolute_expression (); } - if (S_IS_DEFINED (sym) && ! S_IS_COMMON (sym)) + if (S_IS_DEFINED (sym) && !S_IS_COMMON (sym)) { as_bad (_("attempt to re-define symbol `%s'"), S_GET_NAME (sym)); ignore_rest_of_line (); @@ -1564,21 +1550,21 @@ s_data (ignore) definition for .file; the APPFILE argument is 1 for .appfile, 0 for .file. */ -void +void s_app_file (appfile) int appfile; { register char *s; int length; - /* Some assemblers tolerate immediately following '"' */ + /* Some assemblers tolerate immediately following '"'. */ if ((s = demand_copy_string (&length)) != 0) { /* If this is a fake .appfile, a fake newline was inserted into the buffer. Passing -2 to new_logical_line tells it to account for it. */ int may_omit - = (! new_logical_line (s, appfile ? -2 : -1) && appfile); + = (!new_logical_line (s, appfile ? -2 : -1) && appfile); /* In MRI mode, the preprocessor may have inserted an extraneous backquote. */ @@ -1588,7 +1574,7 @@ s_app_file (appfile) ++input_line_pointer; demand_empty_rest_of_line (); - if (! may_omit) + if (!may_omit) { #ifdef LISTING if (listing) @@ -1618,7 +1604,8 @@ s_app_line (ignore) if (l < 0) /* Some of the back ends can't deal with non-positive line numbers. Besides, it's silly. */ - as_warn (_("Line numbers must be positive; line number %d rejected."), l+1); + as_warn (_("Line numbers must be positive; line number %d rejected."), + l + 1); else { new_logical_line ((char *) NULL, l); @@ -1642,7 +1629,7 @@ s_end (ignore) /* The MRI assembler permits the start symbol to follow .end, but we don't support that. */ SKIP_WHITESPACE (); - if (! is_end_of_line[(unsigned char) *input_line_pointer] + if (!is_end_of_line[(unsigned char) *input_line_pointer] && *input_line_pointer != '*' && *input_line_pointer != '!') as_warn (_("start address not supported")); @@ -1684,7 +1671,7 @@ s_fail (ignore) mri_comment_end (stop, stopc); } -void +void s_fill (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -1762,26 +1749,28 @@ s_fill (ignore) p = frag_var (rs_space, (int) size, (int) size, (relax_substateT) 0, rep_sym, (offsetT) 0, (char *) 0); } + memset (p, 0, (unsigned int) size); + /* The magic number BSD_FILL_SIZE_CROCK_4 is from BSD 4.2 VAX - * flavoured AS. The following bizzare behaviour is to be - * compatible with above. I guess they tried to take up to 8 - * bytes from a 4-byte expression and they forgot to sign - * extend. Un*x Sux. */ + flavoured AS. The following bizzare behaviour is to be + compatible with above. I guess they tried to take up to 8 + bytes from a 4-byte expression and they forgot to sign + extend. Un*x Sux. */ #define BSD_FILL_SIZE_CROCK_4 (4) md_number_to_chars (p, (valueT) fill, (size > BSD_FILL_SIZE_CROCK_4 ? BSD_FILL_SIZE_CROCK_4 : (int) size)); /* Note: .fill (),0 emits no frag (since we are asked to .fill 0 bytes) - * but emits no error message because it seems a legal thing to do. - * It is a degenerate case of .fill but could be emitted by a compiler. - */ + but emits no error message because it seems a legal thing to do. + It is a degenerate case of .fill but could be emitted by a + compiler. */ } demand_empty_rest_of_line (); } -void +void s_globl (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -1835,7 +1824,7 @@ s_irp (irpc) as_where (&file, &line); sb_new (&s); - while (! is_end_of_line[(unsigned char) *input_line_pointer]) + while (!is_end_of_line[(unsigned char) *input_line_pointer]) sb_add_char (&s, *input_line_pointer++); sb_new (&out); @@ -1866,7 +1855,7 @@ s_linkonce (ignore) type = LINKONCE_DISCARD; - if (! is_end_of_line[(unsigned char) *input_line_pointer]) + if (!is_end_of_line[(unsigned char) *input_line_pointer]) { char *s; char c; @@ -1916,7 +1905,7 @@ s_linkonce (ignore) flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS; break; } - if (! bfd_set_section_flags (stdoutput, now_seg, flags)) + if (!bfd_set_section_flags (stdoutput, now_seg, flags)) as_bad (_("bfd_set_section_flags: %s"), bfd_errmsg (bfd_get_error ())); } @@ -1928,13 +1917,13 @@ s_linkonce (ignore) demand_empty_rest_of_line (); } -static void +static void s_lcomm_internal (needs_align, bytes_p) /* 1 if this was a ".bss" directive, which may require a 3rd argument - (alignment); 0 if it was an ".lcomm" (2 args only) */ + (alignment); 0 if it was an ".lcomm" (2 args only). */ int needs_align; /* 1 if the alignment value should be interpreted as the byte boundary, - rather than the power of 2. */ + rather than the power of 2. */ int bytes_p; { register char *name; @@ -1985,7 +1974,7 @@ s_lcomm_internal (needs_align, bytes_p) bss_seg = subseg_new (".sbss", 1); seg_info (bss_seg)->bss = 1; #ifdef BFD_ASSEMBLER - if (! bfd_set_section_flags (stdoutput, bss_seg, SEC_ALLOC)) + if (!bfd_set_section_flags (stdoutput, bss_seg, SEC_ALLOC)) as_warn (_("error setting flags for \".sbss\": %s"), bfd_errmsg (bfd_get_error ())); #endif @@ -1993,33 +1982,38 @@ s_lcomm_internal (needs_align, bytes_p) } #endif - if (!needs_align) - { - TC_IMPLICIT_LCOMM_ALIGNMENT (temp, align); + if (!needs_align) + { + TC_IMPLICIT_LCOMM_ALIGNMENT (temp, align); - /* Still zero unless TC_IMPLICIT_LCOMM_ALIGNMENT set it. */ - if (align) - record_alignment(bss_seg, align); - } + /* Still zero unless TC_IMPLICIT_LCOMM_ALIGNMENT set it. */ + if (align) + record_alignment (bss_seg, align); + } if (needs_align) { align = 0; SKIP_WHITESPACE (); + if (*input_line_pointer != ',') { as_bad (_("Expected comma after size")); ignore_rest_of_line (); return; } + input_line_pointer++; SKIP_WHITESPACE (); + if (*input_line_pointer == '\n') { as_bad (_("Missing alignment")); return; } + align = get_absolute_expression (); + if (bytes_p) { /* Convert to a power of 2. */ @@ -2034,6 +2028,7 @@ s_lcomm_internal (needs_align, bytes_p) align = i; } } + if (align > max_alignment) { align = max_alignment; @@ -2044,8 +2039,9 @@ s_lcomm_internal (needs_align, bytes_p) align = 0; as_warn (_("Alignment negative. 0 assumed.")); } + record_alignment (bss_seg, align); - } /* if needs align */ + } else { /* Assume some objects may require alignment on some systems. */ @@ -2082,12 +2078,13 @@ s_lcomm_internal (needs_align, bytes_p) if (align) frag_align (align, 0, 0); - /* detach from old frag */ + + /* Detach from old frag. */ if (S_GET_SEGMENT (symbolP) == bss_seg) symbol_get_frag (symbolP)->fr_symbol = NULL; symbol_set_frag (symbolP, frag_now); - pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP, + pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, (offsetT) temp, (char *) 0); *pfrag = 0; @@ -2096,7 +2093,7 @@ s_lcomm_internal (needs_align, bytes_p) #ifdef OBJ_COFF /* The symbol may already have been created with a preceding ".globl" directive -- be careful not to step on storage class - in that case. Otherwise, set it to static. */ + in that case. Otherwise, set it to static. */ if (S_GET_STORAGE_CLASS (symbolP) != C_EXT) { S_SET_STORAGE_CLASS (symbolP, C_STAT); @@ -2114,7 +2111,7 @@ s_lcomm_internal (needs_align, bytes_p) subseg_set (current_seg, current_subseg); demand_empty_rest_of_line (); -} /* s_lcomm_internal() */ +} void s_lcomm (needs_align) @@ -2123,13 +2120,14 @@ s_lcomm (needs_align) s_lcomm_internal (needs_align, 0); } -void s_lcomm_bytes (needs_align) +void +s_lcomm_bytes (needs_align) int needs_align; { s_lcomm_internal (needs_align, 1); } -void +void s_lsym (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -2139,12 +2137,13 @@ s_lsym (ignore) expressionS exp; register symbolS *symbolP; - /* we permit ANY defined expression: BSD4.2 demands constants */ + /* We permit ANY defined expression: BSD4.2 demands constants. */ name = input_line_pointer; c = get_symbol_end (); p = input_line_pointer; *p = c; SKIP_WHITESPACE (); + if (*input_line_pointer != ',') { *p = 0; @@ -2153,8 +2152,10 @@ s_lsym (ignore) ignore_rest_of_line (); return; } + input_line_pointer++; expression (&exp); + if (exp.X_op != O_constant && exp.X_op != O_register) { @@ -2162,6 +2163,7 @@ s_lsym (ignore) ignore_rest_of_line (); return; } + *p = 0; symbolP = symbol_find_or_make (name); @@ -2170,13 +2172,13 @@ s_lsym (ignore) those fields, and I can't see when they'd ever be tripped. I don't think I understand why they were here so I may have introduced a bug. As recently as 1.37 didn't have this test - anyway. xoxorich. */ + anyway. xoxorich. */ if (S_GET_SEGMENT (symbolP) == undefined_section && S_GET_VALUE (symbolP) == 0) { /* The name might be an undefined .global symbol; be sure to - keep the "external" bit. */ + keep the "external" bit. */ S_SET_SEGMENT (symbolP, (exp.X_op == O_constant ? absolute_section @@ -2187,9 +2189,10 @@ s_lsym (ignore) { as_bad (_("Symbol %s already defined"), name); } + *p = c; demand_empty_rest_of_line (); -} /* s_lsym() */ +} /* Read a line into an sb. */ @@ -2211,7 +2214,7 @@ get_line_sb (line) /* If app.c sets any other characters to LEX_IS_STRINGQUOTE, this code needs to be changed. */ - if (! flag_m68k_mri) + if (!flag_m68k_mri) quote1 = '"'; else quote1 = '\0'; @@ -2224,7 +2227,8 @@ get_line_sb (line) #endif inquote = '\0'; - while (! is_end_of_line[(unsigned char) *input_line_pointer] + + while (!is_end_of_line[(unsigned char) *input_line_pointer] || (inquote != '\0' && *input_line_pointer != '\n')) { if (inquote == *input_line_pointer) @@ -2236,8 +2240,10 @@ get_line_sb (line) else if (*input_line_pointer == quote2) inquote = quote2; } + sb_add_char (line, *input_line_pointer++); } + while (input_line_pointer < buffer_limit && is_end_of_line[(unsigned char) *input_line_pointer]) { @@ -2245,6 +2251,7 @@ get_line_sb (line) bump_line_counters (); ++input_line_pointer; } + return 1; } @@ -2265,7 +2272,7 @@ s_macro (ignore) as_where (&file, &line); sb_new (&s); - while (! is_end_of_line[(unsigned char) *input_line_pointer]) + while (!is_end_of_line[(unsigned char) *input_line_pointer]) sb_add_char (&s, *input_line_pointer++); sb_new (&label); @@ -2286,7 +2293,7 @@ s_macro (ignore) if (((NO_PSEUDO_DOT || flag_m68k_mri) && hash_find (po_hash, name) != NULL) - || (! flag_m68k_mri + || (!flag_m68k_mri && *name == '.' && hash_find (po_hash, name + 1) != NULL)) as_warn (_("attempt to redefine pseudo-op `%s' ignored"), @@ -2379,7 +2386,7 @@ do_org (segment, exp, fill) } } -void +void s_org (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -2426,7 +2433,7 @@ s_org (ignore) do_org (segment, &exp, temp_fill); demand_empty_rest_of_line (); -} /* s_org() */ +} /* Handle parsing for the MRI SECT/SECTION pseudo-op. This should be called by the obj-format routine which handles section changing @@ -2446,9 +2453,9 @@ s_mri_sect (type) segT seg; SKIP_WHITESPACE (); - + name = input_line_pointer; - if (! isdigit ((unsigned char) *name)) + if (!isdigit ((unsigned char) *name)) c = get_symbol_end (); else { @@ -2457,6 +2464,7 @@ s_mri_sect (type) ++input_line_pointer; } while (isdigit ((unsigned char) *input_line_pointer)); + c = *input_line_pointer; *input_line_pointer = '\0'; } @@ -2500,7 +2508,7 @@ s_mri_sect (type) flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_READONLY | SEC_ROM; if (flags != SEC_NO_FLAGS) { - if (! bfd_set_section_flags (stdoutput, seg, flags)) + if (!bfd_set_section_flags (stdoutput, seg, flags)) as_warn (_("error setting flags for \"%s\": %s"), bfd_section_name (stdoutput, seg), bfd_errmsg (bfd_get_error ())); @@ -2586,7 +2594,7 @@ s_mri_sect (type) } } - demand_empty_rest_of_line (); + demand_empty_rest_of_line (); #else /* ! TC_I960 */ /* The MRI assembler seems to use different forms of .sect for @@ -2651,23 +2659,23 @@ s_rept (ignore) count = get_absolute_expression (); - do_repeat(count, "REPT", "ENDR"); + do_repeat (count, "REPT", "ENDR"); } /* This function provides a generic repeat block implementation. It allows - different directives to be used as the start/end keys. */ + different directives to be used as the start/end keys. */ void do_repeat (count, start, end) - int count; - const char *start; - const char *end; + int count; + const char *start; + const char *end; { sb one; sb many; sb_new (&one); - if (! buffer_and_nest (start, end, &one, get_line_sb)) + if (!buffer_and_nest (start, end, &one, get_line_sb)) { as_bad (_("%s without %s"), start, end); return; @@ -2686,15 +2694,15 @@ do_repeat (count, start, end) /* Skip to end of current repeat loop; EXTRA indicates how many additional input buffers to skip. Assumes that conditionals preceding the loop end - are properly nested. + are properly nested. This function makes it easier to implement a premature "break" out of the loop. The EXTRA arg accounts for other buffers we might have inserted, - such as line substitutions. */ + such as line substitutions. */ void end_repeat (extra) - int extra; + int extra; { cond_exit_macro (macro_nest); while (extra-- >= 0) @@ -2705,7 +2713,7 @@ end_repeat (extra) this is .equiv, and it is an error if the symbol is already defined. */ -void +void s_set (equiv) int equiv; { @@ -2714,11 +2722,9 @@ s_set (equiv) register char *end_name; register symbolS *symbolP; - /* - * Especial apologies for the random logic: - * this just grew, and could be parsed much more simply! - * Dean in haste. - */ + /* Especial apologies for the random logic: + this just grew, and could be parsed much more simply! + Dean in haste. */ name = input_line_pointer; delim = get_symbol_end (); end_name = input_line_pointer; @@ -2739,7 +2745,7 @@ s_set (equiv) if (name[0] == '.' && name[1] == '\0') { - /* Turn '. = mumble' into a .org mumble */ + /* Turn '. = mumble' into a .org mumble. */ register segT segment; expressionS exp; @@ -2762,8 +2768,8 @@ s_set (equiv) if (listing & LISTING_SYMBOLS) { extern struct list_info_struct *listing_tail; - fragS *dummy_frag = (fragS *) xmalloc (sizeof(fragS)); - memset (dummy_frag, 0, sizeof(fragS)); + fragS *dummy_frag = (fragS *) xmalloc (sizeof (fragS)); + memset (dummy_frag, 0, sizeof (fragS)); dummy_frag->fr_type = rs_fill; dummy_frag->line = listing_tail; symbolP = symbol_new (name, undefined_section, 0, dummy_frag); @@ -2771,14 +2777,13 @@ s_set (equiv) } else #endif - symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag); - + symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag); + #ifdef OBJ_COFF - /* "set" symbols are local unless otherwise specified. */ + /* "set" symbols are local unless otherwise specified. */ SF_SET_LOCAL (symbolP); #endif /* OBJ_COFF */ - - } /* make a new symbol */ + } symbol_table_insert (symbolP); @@ -2791,9 +2796,9 @@ s_set (equiv) pseudo_set (symbolP); demand_empty_rest_of_line (); -} /* s_set() */ +} -void +void s_space (mult) int mult; { @@ -2897,7 +2902,7 @@ s_space (mult) bytes = repeat; if (repeat <= 0) { - if (! flag_mri) + if (!flag_mri) as_warn (_(".space repeat count is zero, ignored")); else if (repeat < 0) as_warn (_(".space repeat count is negative, ignored")); @@ -2932,11 +2937,13 @@ s_space (mult) as_bad (_("space allocation too complex in absolute section")); subseg_set (text_section, 0); } + if (mri_common_symbol != NULL) { as_bad (_("space allocation too complex in common section")); mri_common_symbol = NULL; } + if (!need_pass_2) p = frag_var (rs_space, 1, 1, (relax_substateT) 0, make_expr_symbol (&exp), (offsetT) 0, (char *) 0); @@ -3073,27 +3080,24 @@ s_text (ignore) #ifdef OBJ_VMS const_flag &= ~IN_DEFAULT_SECTION; #endif -} /* s_text() */ +} - -void +void demand_empty_rest_of_line () { SKIP_WHITESPACE (); if (is_end_of_line[(unsigned char) *input_line_pointer]) - { - input_line_pointer++; - } + input_line_pointer++; else - { - ignore_rest_of_line (); - } - /* Return having already swallowed end-of-line. */ -} /* Return pointing just after end-of-line. */ + ignore_rest_of_line (); + + /* Return having already swallowed end-of-line. */ +} void -ignore_rest_of_line () /* For suspect lines: gives warning. */ +ignore_rest_of_line () { + /* For suspect lines: gives warning. */ if (!is_end_of_line[(unsigned char) *input_line_pointer]) { if (isprint ((unsigned char) *input_line_pointer)) @@ -3102,13 +3106,15 @@ ignore_rest_of_line () /* For suspect lines: gives warning. */ else as_bad (_("Rest of line ignored. First ignored character valued 0x%x."), *input_line_pointer); + while (input_line_pointer < buffer_limit && !is_end_of_line[(unsigned char) *input_line_pointer]) - { - input_line_pointer++; - } + input_line_pointer++; } - input_line_pointer++; /* Return pointing just after end-of-line. */ + + input_line_pointer++; + + /* Return pointing just after end-of-line. */ know (is_end_of_line[(unsigned char) input_line_pointer[-1]]); } @@ -3116,24 +3122,22 @@ void discard_rest_of_line () { while (input_line_pointer < buffer_limit - && !is_end_of_line[(unsigned char) *input_line_pointer]) - { - input_line_pointer++; - } - input_line_pointer++; /* Return pointing just after end-of-line. */ + && !is_end_of_line[(unsigned char) *input_line_pointer]) + input_line_pointer++; + + input_line_pointer++; + + /* Return pointing just after end-of-line. */ know (is_end_of_line[(unsigned char) input_line_pointer[-1]]); } -/* - * pseudo_set() - * - * In: Pointer to a symbol. - * Input_line_pointer->expression. - * - * Out: Input_line_pointer->just after any whitespace after expression. - * Tried to set symbol to value of expression. - * Will change symbols type, value, and frag; - */ +/* In: Pointer to a symbol. + Input_line_pointer->expression. + + Out: Input_line_pointer->just after any whitespace after expression. + Tried to set symbol to value of expression. + Will change symbols type, value, and frag; */ + void pseudo_set (symbolP) symbolS *symbolP; @@ -3143,7 +3147,7 @@ pseudo_set (symbolP) int ext; #endif /* OBJ_AOUT or OBJ_BOUT */ - know (symbolP); /* NULL pointer is logic error. */ + know (symbolP); /* NULL pointer is logic error. */ #if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER) ext = S_IS_EXTERNAL (symbolP); #endif /* OBJ_AOUT or OBJ_BOUT */ @@ -3190,7 +3194,7 @@ pseudo_set (symbolP) #endif /* OBJ_AOUT or OBJ_BOUT */ S_SET_VALUE (symbolP, (valueT) exp.X_add_number); if (exp.X_op != O_constant) - symbol_set_frag (symbolP, &zero_address_frag); + symbol_set_frag (symbolP, &zero_address_frag); break; case O_register: @@ -3231,20 +3235,18 @@ pseudo_set (symbolP) } } -/* - * cons() - * - * CONStruct more frag of .bytes, or .words etc. - * Should need_pass_2 be 1 then emit no frag(s). - * This understands EXPRESSIONS. - * - * Bug (?) - * - * This has a split personality. We use expression() to read the - * value. We can detect if the value won't fit in a byte or word. - * But we can't detect if expression() discarded significant digits - * in the case of a long. Not worth the crocks required to fix it. - */ +/* cons() + + CONStruct more frag of .bytes, or .words etc. + Should need_pass_2 be 1 then emit no frag(s). + This understands EXPRESSIONS. + + Bug (?) + + This has a split personality. We use expression() to read the + value. We can detect if the value won't fit in a byte or word. + But we can't detect if expression() discarded significant digits + in the case of a long. Not worth the crocks required to fix it. */ /* Select a parser for cons expressions. */ @@ -3264,7 +3266,7 @@ parse_mri_cons PARAMS ((expressionS *exp, unsigned int nbytes)); #ifndef TC_PARSE_CONS_EXPRESSION #ifdef BITFIELD_CONS_EXPRESSIONS #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_bitfield_cons (EXP, NBYTES) -static void +static void parse_bitfield_cons PARAMS ((expressionS *exp, unsigned int nbytes)); #endif #ifdef REPEAT_CONS_EXPRESSIONS @@ -3279,12 +3281,12 @@ parse_repeat_cons PARAMS ((expressionS *exp, unsigned int nbytes)); #endif #endif -/* worker to do .byte etc statements */ -/* clobbers input_line_pointer, checks */ -/* end-of-line. */ -static void +/* Worker to do .byte etc statements. + Clobbers input_line_pointer and checks end-of-line. */ + +static void cons_worker (nbytes, rva) - register int nbytes; /* 1=.byte, 2=.word, 4=.long */ + register int nbytes; /* 1=.byte, 2=.word, 4=.long. */ int rva; { int c; @@ -3339,7 +3341,7 @@ cons_worker (nbytes, rva) if (flag_mri && nbytes == 1 && (c & 1) != 0) mri_pending_align = 1; - input_line_pointer--; /* Put terminator back into stream. */ + input_line_pointer--; /* Put terminator back into stream. */ demand_empty_rest_of_line (); @@ -3347,7 +3349,6 @@ cons_worker (nbytes, rva) mri_comment_end (stop, stopc); } - void cons (size) int size; @@ -3355,7 +3356,7 @@ cons (size) cons_worker (size, 0); } -void +void s_rva (size) int size; { @@ -3473,7 +3474,7 @@ emit_expr (exp, nbytes) { unsigned long next; - next = (((~ (generic_bignum[i] & LITTLENUM_MASK)) + next = (((~(generic_bignum[i] & LITTLENUM_MASK)) & LITTLENUM_MASK) + carry); generic_bignum[i] = next & LITTLENUM_MASK; @@ -3538,7 +3539,7 @@ emit_expr (exp, nbytes) valueT val; int gencnt; - if (! exp->X_unsigned && exp->X_add_number < 0) + if (!exp->X_unsigned && exp->X_add_number < 0) extra_digit = (valueT) -1; val = (valueT) exp->X_add_number; gencnt = 0; @@ -3562,7 +3563,7 @@ emit_expr (exp, nbytes) register valueT unmask; /* JF << of >= number of bits in the object is undefined. In - particular SPARC (Sun 4) has problems */ + particular SPARC (Sun 4) has problems. */ if (nbytes >= sizeof (valueT)) { mask = 0; @@ -3573,16 +3574,16 @@ emit_expr (exp, nbytes) } else { - /* Don't store these bits. */ + /* Don't store these bits. */ mask = ~(valueT) 0 << (BITS_PER_CHAR * nbytes); hibit = (valueT) 1 << (nbytes * BITS_PER_CHAR - 1); } - unmask = ~mask; /* Do store these bits. */ + unmask = ~mask; /* Do store these bits. */ #ifdef NEVER "Do this mod if you want every overflow check to assume SIGNED 2's complement data."; - mask = ~(unmask >> 1); /* Includes sign bit now. */ + mask = ~(unmask >> 1); /* Includes sign bit now. */ #endif get = exp->X_add_number; @@ -3590,11 +3591,11 @@ emit_expr (exp, nbytes) if ((get & mask) != 0 && ((get & mask) != mask || (get & hibit) == 0)) - { /* Leading bits contain both 0s & 1s. */ + { /* Leading bits contain both 0s & 1s. */ as_warn (_("Value 0x%lx truncated to 0x%lx."), (unsigned long) get, (unsigned long) use); } - /* put bytes in right order. */ + /* Put bytes in right order. */ md_number_to_chars (p, use, (int) nbytes); } else if (op == O_big) @@ -3729,7 +3730,7 @@ emit_expr (exp, nbytes) To use this function the tc-XXX.h file should define BITFIELD_CONS_EXPRESSIONS. */ -static void +static void parse_bitfield_cons (exp, nbytes) expressionS *exp; unsigned int nbytes; @@ -3740,7 +3741,8 @@ parse_bitfield_cons (exp, nbytes) (void) expression (exp); if (*input_line_pointer == ':') - { /* bitfields */ + { + /* Bitfields. */ long value = 0; for (;;) @@ -3751,7 +3753,7 @@ parse_bitfield_cons (exp, nbytes) { input_line_pointer = hold; break; - } /* next piece is not a bitfield */ + } /* Next piece is not a bitfield. */ /* In the general case, we can't allow full expressions with symbol @@ -3769,14 +3771,14 @@ parse_bitfield_cons (exp, nbytes) backends. I'm lazy. I'll take any SEG_ABSOLUTE. I think that means that you can use a previous .set or - .equ type symbol. xoxorich. */ + .equ type symbol. xoxorich. */ if (exp->X_op == O_absent) { as_warn (_("using a bit field width of zero")); exp->X_add_number = 0; exp->X_op = O_constant; - } /* implied zero width bitfield */ + } /* Implied zero width bitfield. */ if (exp->X_op != O_constant) { @@ -3785,14 +3787,14 @@ parse_bitfield_cons (exp, nbytes) *input_line_pointer = ':'; demand_empty_rest_of_line (); return; - } /* too complex */ + } /* Too complex. */ if ((width = exp->X_add_number) > (BITS_PER_CHAR * nbytes)) { as_warn (_("field width %lu too big to fit in %d bytes: truncated to %d bits"), width, nbytes, (BITS_PER_CHAR * nbytes)); width = BITS_PER_CHAR * nbytes; - } /* too big */ + } /* Too big. */ if (width > bits_available) { @@ -3800,9 +3802,10 @@ parse_bitfield_cons (exp, nbytes) input_line_pointer = hold; exp->X_add_number = value; break; - } /* won't fit */ + } /* Won't fit. */ - hold = ++input_line_pointer; /* skip ':' */ + /* Skip ':'. */ + hold = ++input_line_pointer; (void) expression (exp); if (exp->X_op != O_constant) @@ -3814,7 +3817,7 @@ parse_bitfield_cons (exp, nbytes) *input_line_pointer = cache; demand_empty_rest_of_line (); return; - } /* too complex */ + } /* Too complex. */ value |= ((~(-1 << width) & exp->X_add_number) << ((BITS_PER_CHAR * nbytes) - bits_available)); @@ -3824,17 +3827,17 @@ parse_bitfield_cons (exp, nbytes) || *input_line_pointer != ',') { break; - } /* all the bitfields we're gonna get */ + } /* All the bitfields we're gonna get. */ hold = ++input_line_pointer; (void) expression (exp); - } /* forever loop */ + } exp->X_add_number = value; exp->X_op = O_constant; exp->X_unsigned = 1; - } /* if looks like a bitfield */ -} /* parse_bitfield_cons() */ + } +} #endif /* BITFIELD_CONS_EXPRESSIONS */ @@ -3882,16 +3885,18 @@ parse_mri_cons (exp, nbytes) result = (result << 8) | (*input_line_pointer++); } - /* Left justify */ + /* Left justify. */ while (scan < nbytes) { result <<= 8; scan++; } - /* Create correct expression */ + + /* Create correct expression. */ exp->X_op = O_constant; exp->X_add_number = result; - /* Fake it so that we can read the next char too */ + + /* Fake it so that we can read the next char too. */ if (input_line_pointer[0] != '\'' || (input_line_pointer[0] == '\'' && input_line_pointer[1] == '\'')) { @@ -3998,7 +4003,7 @@ hex_float (float_type, bytes) int d; /* The MRI assembler accepts arbitrary underscores strewn about - through the hex constant, so we ignore them as well. */ + through the hex constant, so we ignore them as well. */ if (*input_line_pointer == '_') { ++input_line_pointer; @@ -4037,34 +4042,31 @@ hex_float (float_type, bytes) return length; } -/* - * float_cons() - * - * CONStruct some more frag chars of .floats .ffloats etc. - * Makes 0 or more new frags. - * If need_pass_2 == 1, no frags are emitted. - * This understands only floating literals, not expressions. Sorry. - * - * A floating constant is defined by atof_generic(), except it is preceded - * by 0d 0f 0g or 0h. After observing the STRANGE way my BSD AS does its - * reading, I decided to be incompatible. This always tries to give you - * rounded bits to the precision of the pseudo-op. Former AS did premature - * truncatation, restored noisy bits instead of trailing 0s AND gave you - * a choice of 2 flavours of noise according to which of 2 floating-point - * scanners you directed AS to use. - * - * In: input_line_pointer->whitespace before, or '0' of flonum. - * - */ +/* float_cons() + + CONStruct some more frag chars of .floats .ffloats etc. + Makes 0 or more new frags. + If need_pass_2 == 1, no frags are emitted. + This understands only floating literals, not expressions. Sorry. + + A floating constant is defined by atof_generic(), except it is preceded + by 0d 0f 0g or 0h. After observing the STRANGE way my BSD AS does its + reading, I decided to be incompatible. This always tries to give you + rounded bits to the precision of the pseudo-op. Former AS did premature + truncatation, restored noisy bits instead of trailing 0s AND gave you + a choice of 2 flavours of noise according to which of 2 floating-point + scanners you directed AS to use. + + In: input_line_pointer->whitespace before, or '0' of flonum. */ void float_cons (float_type) - /* Clobbers input_line-pointer, checks end-of-line. */ - register int float_type; /* 'f':.ffloat ... 'F':.float ... */ + /* Clobbers input_line-pointer, checks end-of-line. */ + register int float_type; /* 'f':.ffloat ... 'F':.float ... */ { register char *p; - int length; /* Number of chars in an object. */ - register char *err; /* Error from scanning floating literal. */ + int length; /* Number of chars in an object. */ + register char *err; /* Error from scanning floating literal. */ char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT]; if (is_it_end_of_statement ()) @@ -4079,14 +4081,13 @@ float_cons (float_type) do { - /* input_line_pointer->1st char of a flonum (we hope!). */ + /* input_line_pointer->1st char of a flonum (we hope!). */ SKIP_WHITESPACE (); /* Skip any 0{letter} that may be present. Don't even check if the - * letter is legal. Someone may invent a "z" format and this routine - * has no use for such information. Lusers beware: you get - * diagnostics if your input is ill-conditioned. - */ + letter is legal. Someone may invent a "z" format and this routine + has no use for such information. Lusers beware: you get + diagnostics if your input is ill-conditioned. */ if (input_line_pointer[0] == '0' && isalpha ((unsigned char) input_line_pointer[1])) input_line_pointer += 2; @@ -4129,11 +4130,10 @@ float_cons (float_type) ++input_line_pointer; expression (&count_exp); + if (count_exp.X_op != O_constant || count_exp.X_add_number <= 0) - { - as_warn (_("unresolvable or nonpositive repeat count; using 1")); - } + as_warn (_("unresolvable or nonpositive repeat count; using 1")); else count = count_exp.X_add_number; } @@ -4149,11 +4149,12 @@ float_cons (float_type) } while (*input_line_pointer++ == ','); - --input_line_pointer; /* Put terminator back into stream. */ + /* Put terminator back into stream. */ + --input_line_pointer; demand_empty_rest_of_line (); -} /* float_cons() */ +} -/* Return the size of a LEB128 value */ +/* Return the size of a LEB128 value. */ static inline int sizeof_sleb128 (value) @@ -4287,7 +4288,7 @@ output_big_sleb128 (p, bignum, size) unsigned byte; /* Strip leading sign extensions off the bignum. */ - while (size > 0 && bignum[size-1] == (LITTLENUM_TYPE)-1) + while (size > 0 && bignum[size - 1] == (LITTLENUM_TYPE) -1) size--; do @@ -4307,7 +4308,7 @@ output_big_sleb128 (p, bignum, size) if (size == 0) { if ((val == 0 && (byte & 0x40) == 0) - || (~(val | ~(((valueT)1 << loaded) - 1)) == 0 + || (~(val | ~(((valueT) 1 << loaded) - 1)) == 0 && (byte & 0x40) != 0)) byte |= 0x80; } @@ -4334,7 +4335,7 @@ output_big_uleb128 (p, bignum, size) /* Strip leading zeros off the bignum. */ /* XXX: Is this needed? */ - while (size > 0 && bignum[size-1] == 0) + while (size > 0 && bignum[size - 1] == 0) size--; do @@ -4379,7 +4380,7 @@ output_big_leb128 (p, bignum, size, sign) leb128 value. */ void -emit_leb128_expr(exp, sign) +emit_leb128_expr (exp, sign) expressionS *exp; int sign; { @@ -4428,10 +4429,10 @@ emit_leb128_expr(exp, sign) } else { - /* Otherwise, we have to create a variable sized fragment and + /* Otherwise, we have to create a variable sized fragment and resolve things later. */ - frag_var (rs_leb128, sizeof_uleb128 (~(valueT)0), 0, sign, + frag_var (rs_leb128, sizeof_uleb128 (~(valueT) 0), 0, sign, make_expr_symbol (exp), 0, (char *) NULL); } } @@ -4444,28 +4445,25 @@ s_leb128 (sign) { expressionS exp; - do { - expression (&exp); - emit_leb128_expr (&exp, sign); - } while (*input_line_pointer++ == ','); + do + { + expression (&exp); + emit_leb128_expr (&exp, sign); + } + while (*input_line_pointer++ == ','); input_line_pointer--; demand_empty_rest_of_line (); } -/* - * stringer() - * - * We read 0 or more ',' separated, double-quoted strings. - * - * Caller should have checked need_pass_2 is FALSE because we don't check it. - */ - - -void -stringer (append_zero) /* Worker to do .ascii etc statements. */ - /* Checks end-of-line. */ - register int append_zero; /* 0: don't append '\0', else 1 */ +/* We read 0 or more ',' separated, double-quoted strings. + Caller should have checked need_pass_2 is FALSE because we don't + check it. */ + +void +stringer (append_zero) /* Worker to do .ascii etc statements. */ + /* Checks end-of-line. */ + register int append_zero; /* 0: don't append '\0', else 1. */ { register unsigned int c; char *start; @@ -4474,22 +4472,19 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */ md_flush_pending_output (); #endif - /* - * The following awkward logic is to parse ZERO or more strings, - * comma separated. Recall a string expression includes spaces - * before the opening '\"' and spaces after the closing '\"'. - * We fake a leading ',' if there is (supposed to be) - * a 1st, expression. We keep demanding expressions for each - * ','. - */ + /* The following awkward logic is to parse ZERO or more strings, + comma separated. Recall a string expression includes spaces + before the opening '\"' and spaces after the closing '\"'. + We fake a leading ',' if there is (supposed to be) + a 1st, expression. We keep demanding expressions for each ','. */ if (is_it_end_of_statement ()) { - c = 0; /* Skip loop. */ - ++input_line_pointer; /* Compensate for end of loop. */ + c = 0; /* Skip loop. */ + ++input_line_pointer; /* Compensate for end of loop. */ } else { - c = ','; /* Do loop. */ + c = ','; /* Do loop. */ } while (c == ',' || c == '<' || c == '"') { @@ -4497,7 +4492,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */ switch (*input_line_pointer) { case '\"': - ++input_line_pointer; /*->1st char of string. */ + ++input_line_pointer; /*->1st char of string. */ start = input_line_pointer; while (is_a_char (c = next_char_of_string ())) { @@ -4554,9 +4549,9 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */ /* FIXME-SOMEDAY: I had trouble here on characters with the high bits set. We'll probably also have trouble with multibyte chars, wide chars, etc. Also be careful about - returning values bigger than 1 byte. xoxorich. */ + returning values bigger than 1 byte. xoxorich. */ -unsigned int +unsigned int next_char_of_string () { register unsigned int c; @@ -4603,7 +4598,7 @@ next_char_of_string () case '\\': case '"': - break; /* As itself. */ + break; /* As itself. */ case '0': case '1': @@ -4619,10 +4614,13 @@ next_char_of_string () long number; int i; - for (i = 0, number = 0; isdigit (c) && i < 3; c = *input_line_pointer++, i++) + for (i = 0, number = 0; + isdigit (c) && i < 3; + c = *input_line_pointer++, i++) { number = number * 8 + c - '0'; } + c = number & 0xff; } --input_line_pointer; @@ -4651,7 +4649,7 @@ next_char_of_string () break; case '\n': - /* To be compatible with BSD 4.2 as: give the luser a linefeed!! */ + /* To be compatible with BSD 4.2 as: give the luser a linefeed!! */ as_warn (_("Unterminated string: Newline inserted.")); c = '\n'; bump_line_counters (); @@ -4665,15 +4663,15 @@ next_char_of_string () #endif /* ONLY_STANDARD_ESCAPES */ break; - } /* switch on escaped char */ + } break; #endif /* ! defined (NO_STRING_ESCAPES) */ default: break; - } /* switch on char */ + } return (c); -} /* next_char_of_string() */ +} static segT get_segmented_expression (expP) @@ -4694,7 +4692,7 @@ get_segmented_expression (expP) return retval; } -static segT +static segT get_known_segmented_expression (expP) register expressionS *expP; { @@ -4716,7 +4714,7 @@ get_known_segmented_expression (expP) } know (retval == absolute_section || SEG_NORMAL (retval)); return (retval); -} /* get_known_segmented_expression() */ +} offsetT get_absolute_expression () @@ -4733,21 +4731,18 @@ get_absolute_expression () return exp.X_add_number; } -char /* return terminator */ +char /* Return terminator. */ get_absolute_expression_and_terminator (val_pointer) - long *val_pointer; /* return value of expression */ + long *val_pointer; /* Return value of expression. */ { /* FIXME: val_pointer should probably be offsetT *. */ *val_pointer = (long) get_absolute_expression (); return (*input_line_pointer++); } -/* - * demand_copy_C_string() - * - * Like demand_copy_string, but return NULL if the string contains any '\0's. - * Give a warning if that happens. - */ +/* Like demand_copy_string, but return NULL if the string contains any '\0's. + Give a warning if that happens. */ + char * demand_copy_C_string (len_pointer) int *len_pointer; @@ -4769,15 +4764,13 @@ demand_copy_C_string (len_pointer) } } } + return s; } -/* - * demand_copy_string() - * - * Demand string, but return a safe (=private) copy of the string. - * Return NULL if we can't read a string here. - */ +/* Demand string, but return a safe (=private) copy of the string. + Return NULL if we can't read a string here. */ + char * demand_copy_string (lenP) int *lenP; @@ -4790,7 +4783,7 @@ demand_copy_string (lenP) SKIP_WHITESPACE (); if (*input_line_pointer == '\"') { - input_line_pointer++; /* Skip opening quote. */ + input_line_pointer++; /* Skip opening quote. */ while (is_a_char (c = next_char_of_string ())) { @@ -4798,7 +4791,7 @@ demand_copy_string (lenP) len++; } /* JF this next line is so demand_copy_C_string will return a - null terminated string. */ + null terminated string. */ obstack_1grow (¬es, '\0'); retval = obstack_finish (¬es); } @@ -4810,30 +4803,27 @@ demand_copy_string (lenP) } *lenP = len; return (retval); -} /* demand_copy_string() */ +} -/* - * is_it_end_of_statement() - * - * In: Input_line_pointer->next character. - * - * Do: Skip input_line_pointer over all whitespace. - * - * Out: 1 if input_line_pointer->end-of-line. -*/ -int +/* In: Input_line_pointer->next character. + + Do: Skip input_line_pointer over all whitespace. + + Out: 1 if input_line_pointer->end-of-line. */ + +int is_it_end_of_statement () { SKIP_WHITESPACE (); return (is_end_of_line[(unsigned char) *input_line_pointer]); -} /* is_it_end_of_statement() */ +} -void +void equals (sym_name, reassign) char *sym_name; int reassign; { - register symbolS *symbolP; /* symbol we are working with */ + register symbolS *symbolP; /* Symbol we are working with. */ char *stop = NULL; char stopc; @@ -4849,7 +4839,7 @@ equals (sym_name, reassign) if (sym_name[0] == '.' && sym_name[1] == '\0') { - /* Turn '. = mumble' into a .org mumble */ + /* Turn '. = mumble' into a .org mumble. */ register segT segment; expressionS exp; @@ -4861,7 +4851,7 @@ equals (sym_name, reassign) { symbolP = symbol_find_or_make (sym_name); /* Permit register names to be redefined. */ - if (! reassign + if (!reassign && S_IS_DEFINED (symbolP) && S_GET_SEGMENT (symbolP) != reg_section) as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP)); @@ -4869,16 +4859,16 @@ equals (sym_name, reassign) } if (flag_mri) - { - ignore_rest_of_line (); /* check garbage after the expression */ - mri_comment_end (stop, stopc); - } -} /* equals() */ + { + /* Check garbage after the expression. */ + ignore_rest_of_line (); + mri_comment_end (stop, stopc); + } +} -/* .include -- include a file at this point. */ +/* .include -- include a file at this point. */ -/* ARGSUSED */ -void +void s_include (arg) int arg ATTRIBUTE_UNUSED; { @@ -4887,7 +4877,7 @@ s_include (arg) FILE *try; char *path; - if (! flag_m68k_mri) + if (!flag_m68k_mri) { filename = demand_copy_string (&i); if (filename == NULL) @@ -4901,7 +4891,7 @@ s_include (arg) { SKIP_WHITESPACE (); i = 0; - while (! is_end_of_line[(unsigned char) *input_line_pointer] + while (!is_end_of_line[(unsigned char) *input_line_pointer] && *input_line_pointer != ' ' && *input_line_pointer != '\t') { @@ -4909,13 +4899,16 @@ s_include (arg) ++input_line_pointer; ++i; } + obstack_1grow (¬es, '\0'); filename = obstack_finish (¬es); - while (! is_end_of_line[(unsigned char) *input_line_pointer]) + while (!is_end_of_line[(unsigned char) *input_line_pointer]) ++input_line_pointer; } + demand_empty_rest_of_line (); path = xmalloc ((unsigned long) i + include_dir_maxlen + 5 /* slop */ ); + for (i = 0; i < include_dir_count; i++) { strcpy (path, include_dirs[i]); @@ -4927,15 +4920,16 @@ s_include (arg) goto gotit; } } + free (path); path = filename; gotit: - /* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */ + /* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */ register_dependency (path); input_scrub_insert_file (path); -} /* s_include() */ +} -void +void add_include_dir (path) char *path; { @@ -4944,22 +4938,23 @@ add_include_dir (path) if (include_dir_count == 0) { include_dirs = (char **) xmalloc (2 * sizeof (*include_dirs)); - include_dirs[0] = "."; /* Current dir */ + include_dirs[0] = "."; /* Current dir. */ include_dir_count = 2; } else { include_dir_count++; - include_dirs = (char **) realloc (include_dirs, - include_dir_count * sizeof (*include_dirs)); + include_dirs = + (char **) realloc (include_dirs, + include_dir_count * sizeof (*include_dirs)); } - include_dirs[include_dir_count - 1] = path; /* New one */ + include_dirs[include_dir_count - 1] = path; /* New one. */ i = strlen (path); if (i > include_dir_maxlen) include_dir_maxlen = i; -} /* add_include_dir() */ +} /* Output debugging information to denote the source file. */ @@ -4975,22 +4970,11 @@ generate_file_debug () void generate_lineno_debug () { -#ifdef ECOFF_DEBUGGING - /* ECOFF assemblers automatically generate debugging information. - FIXME: This should probably be handled elsewhere. */ - if (debug_type == DEBUG_UNSPECIFIED) - { - if (ECOFF_DEBUGGING && ecoff_no_current_file ()) - debug_type = DEBUG_ECOFF; - else - debug_type = DEBUG_NONE; - } -#endif - switch (debug_type) { case DEBUG_UNSPECIFIED: case DEBUG_NONE: + case DEBUG_DWARF: break; case DEBUG_STABS: stabs_generate_asm_lineno (); @@ -4998,9 +4982,11 @@ generate_lineno_debug () case DEBUG_ECOFF: ecoff_generate_asm_lineno (); break; - case DEBUG_DWARF: case DEBUG_DWARF2: - /* FIXME. */ + /* ??? We could here indicate to dwarf2dbg.c that something + has changed. However, since there is additional backend + support that is required (calling dwarf2_emit_insn), we + let dwarf2dbg.c call as_where on its own. */ break; } } @@ -5045,8 +5031,8 @@ do_s_func (end_p, default_prefix) } else /* ! end_p */ { - char *name,*label; - char delim1,delim2; + char *name, *label; + char delim1, delim2; if (current_name != NULL) { @@ -5098,7 +5084,7 @@ do_s_func (end_p, default_prefix) demand_empty_rest_of_line (); } -void +void s_ignore (arg) int arg ATTRIBUTE_UNUSED; { @@ -5109,7 +5095,6 @@ s_ignore (arg) ++input_line_pointer; } - void read_print_statistics (file) FILE *file; @@ -5117,8 +5102,8 @@ read_print_statistics (file) hash_print_statistics (file, "pseudo-op table", po_hash); } -/* Inserts the given line into the input stream. - +/* Inserts the given line into the input stream. + This call avoids macro/conditionals nesting checking, since the contents of the line are assumed to replace the contents of a line already scanned. @@ -5128,7 +5113,7 @@ read_print_statistics (file) void input_scrub_insert_line (line) - const char *line; + const char *line; { sb newline; sb_new (&newline); @@ -5139,14 +5124,12 @@ input_scrub_insert_line (line) } /* Insert a file into the input stream; the path must resolve to an actual - file; no include path searching or dependency registering is performed. */ + file; no include path searching or dependency registering is performed. */ void input_scrub_insert_file (path) - char *path; + char *path; { input_scrub_include_file (path, input_line_pointer); buffer_limit = input_scrub_next_buffer (&input_line_pointer); } - -/* end of read.c */ diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h index 571b59b5..b6929c8 100644 --- a/contrib/binutils/gas/read.h +++ b/contrib/binutils/gas/read.h @@ -1,5 +1,5 @@ /* read.h - of read.c - Copyright (C) 1986, 90, 92, 93, 94, 95, 96, 1997 + Copyright (C) 1986, 90, 92, 93, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,24 +15,28 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ -extern char *input_line_pointer;/* -> char we are parsing now. */ +extern char *input_line_pointer; /* -> char we are parsing now. */ -#define PERMIT_WHITESPACE /* Define to make whitespace be allowed in */ -/* many syntactically unnecessary places. */ -/* Normally undefined. For compatibility */ -/* with ancient GNU cc. */ +/* Define to make whitespace be allowed in many syntactically + unnecessary places. Normally undefined. For compatibility with + ancient GNU cc. */ /* #undef PERMIT_WHITESPACE */ +#define PERMIT_WHITESPACE #ifdef PERMIT_WHITESPACE -#define SKIP_WHITESPACE() {if (* input_line_pointer == ' ') ++ input_line_pointer;} +#define SKIP_WHITESPACE() \ + { \ + if (* input_line_pointer == ' ') \ + ++ input_line_pointer; \ + } #else #define SKIP_WHITESPACE() know(*input_line_pointer != ' ' ) #endif - #define LEX_NAME (1) /* may continue a name */ #define LEX_BEGIN_NAME (2) /* may begin a name */ #define LEX_END_NAME (4) /* ends a name */ @@ -47,7 +51,7 @@ extern char *input_line_pointer;/* -> char we are parsing now. */ #ifndef is_a_char #define CHAR_MASK (0xff) #define NOT_A_CHAR (CHAR_MASK+1) -#define is_a_char(c) (((unsigned)(c)) <= CHAR_MASK) +#define is_a_char(c) (((unsigned) (c)) <= CHAR_MASK) #endif /* is_a_char() */ extern char lex_type[]; @@ -76,9 +80,11 @@ extern symbolS *line_label; /* This is used to support MRI common sections. */ extern symbolS *mri_common_symbol; +/* True if a stabs line debug statement is currently being emitted. */ +extern int outputting_stabs_line_debug; + /* Possible arguments to .linkonce. */ -enum linkonce_type -{ +enum linkonce_type { LINKONCE_UNSET = 0, LINKONCE_DISCARD, LINKONCE_ONE_ONLY, @@ -86,9 +92,15 @@ enum linkonce_type LINKONCE_SAME_CONTENTS }; +#define IGNORE_OPCODE_CASE +#ifdef IGNORE_OPCODE_CASE +extern char original_case_string[]; +#endif + extern void pop_insert PARAMS ((const pseudo_typeS *)); extern unsigned int get_stab_string_offset PARAMS ((const char *string, const char *stabstr_secname)); +extern void aout_process_stab PARAMS ((int, const char *, int, int, int)); extern char *demand_copy_C_string PARAMS ((int *len_pointer)); extern char get_absolute_expression_and_terminator PARAMS ((long *val_pointer)); @@ -121,7 +133,7 @@ extern void end_repeat PARAMS((int)); extern void generate_lineno_debug PARAMS ((void)); -extern void s_abort PARAMS ((int)); +extern void s_abort PARAMS ((int)) ATTRIBUTE_NORETURN; extern void s_align_bytes PARAMS ((int arg)); extern void s_align_ptwo PARAMS ((int)); extern void s_app_file PARAMS ((int)); @@ -168,5 +180,3 @@ extern void s_text PARAMS ((int)); extern void stringer PARAMS ((int append_zero)); extern void s_xstab PARAMS ((int what)); extern void s_rva PARAMS ((int)); - -/* end of read.h */ diff --git a/contrib/binutils/gas/sb.c b/contrib/binutils/gas/sb.c index 6ec23fc..6328716 100644 --- a/contrib/binutils/gas/sb.c +++ b/contrib/binutils/gas/sb.c @@ -1,5 +1,5 @@ /* sb.c - string buffer manipulation routines - Copyright (C) 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 2000 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com @@ -19,10 +19,13 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #include "config.h" #include <stdio.h> +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif #ifdef HAVE_STRING_H #include <string.h> #else @@ -59,7 +62,7 @@ int string_count[sb_max_power_two]; static sb_list_vector free_list; -/* initializes an sb. */ +/* initializes an sb. */ void sb_build (ptr, size) @@ -94,7 +97,6 @@ sb_build (ptr, size) ptr->item = e; } - void sb_new (ptr) sb *ptr; @@ -126,7 +128,7 @@ sb_add_sb (ptr, s) } /* make sure that the sb at ptr has room for another len characters, - and grow it if it doesn't. */ + and grow it if it doesn't. */ static void sb_check (ptr, len) @@ -155,7 +157,7 @@ sb_reset (ptr) ptr->len = 0; } -/* add character c to the end of the sb at ptr. */ +/* add character c to the end of the sb at ptr. */ void sb_add_char (ptr, c) @@ -166,7 +168,7 @@ sb_add_char (ptr, c) ptr->ptr[ptr->len++] = c; } -/* add null terminated string s to the end of sb at ptr. */ +/* add null terminated string s to the end of sb at ptr. */ void sb_add_string (ptr, s) @@ -213,7 +215,7 @@ sb_print (outfile, ptr) } } -void +void sb_print_at (outfile, idx, ptr) FILE *outfile; int idx; @@ -225,7 +227,7 @@ sb_print_at (outfile, idx, ptr) } /* put a null at the end of the sb at in and return the start of the - string, so that it can be used as an arg to printf %s. */ + string, so that it can be used as an arg to printf %s. */ char * sb_name (in) @@ -264,7 +266,7 @@ sb_skip_white (idx, ptr) /* start at the index idx into the sb at ptr. skips whitespace, a comma and any following whitespace. returnes the index of the - next character. */ + next character. */ int sb_skip_comma (idx, ptr) diff --git a/contrib/binutils/gas/sb.h b/contrib/binutils/gas/sb.h index 7eaed25..e73e0de 100644 --- a/contrib/binutils/gas/sb.h +++ b/contrib/binutils/gas/sb.h @@ -1,5 +1,5 @@ /* sb.h - header file for string buffer manipulation routines - Copyright (C) 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 2000 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ #ifndef SB_H @@ -54,8 +54,8 @@ /* structure of an sb */ typedef struct sb { - char *ptr; /* points to the current block. */ - int len; /* how much is used. */ + char *ptr; /* points to the current block. */ + int len; /* how much is used. */ int pot; /* the maximum length is 1<<pot */ struct le *item; } diff --git a/contrib/binutils/gas/stabs.c b/contrib/binutils/gas/stabs.c index 7c13c2f..faf3a9c 100644 --- a/contrib/binutils/gas/stabs.c +++ b/contrib/binutils/gas/stabs.c @@ -1,5 +1,5 @@ /* Generic stabs parsing for gas. - Copyright (C) 1989, 90, 91, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1989, 90, 91, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,7 +17,7 @@ the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ +02111-1307, USA. */ #include "as.h" #include "obstack.h" @@ -25,10 +25,15 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ecoff.h" /* We need this, despite the apparent object format dependency, since - it defines stab types, which all object formats can use now. */ + it defines stab types, which all object formats can use now. */ #include "aout/stab_gnu.h" +/* Holds whether the assembler is generating stabs line debugging + information or not. Potentially used by md_cleanup function. */ + +int outputting_stabs_line_debug = 0; + static void s_stab_generic PARAMS ((int, char *, char *)); static void generate_asm_file PARAMS ((int, char *)); @@ -112,7 +117,7 @@ get_stab_string_offset (string, stabstr_secname) } if (length > 0) - { /* Ordinary case. */ + { /* Ordinary case. */ p = frag_more (length + 1); strcpy (p, string); @@ -131,9 +136,8 @@ get_stab_string_offset (string, stabstr_secname) #define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) aout_process_stab(W,S,T,O,D) #endif -static void aout_process_stab PARAMS ((int, const char *, int, int, int)); - -static void +/* Here instead of obj-aout.c because other formats use it too. */ +void aout_process_stab (what, string, type, other, desc) int what; const char *string; @@ -172,9 +176,9 @@ aout_process_stab (what, string, type, other, desc) #endif /* This can handle different kinds of stabs (s,n,d) and different - kinds of stab sections. */ + kinds of stab sections. */ -static void +static void s_stab_generic (what, stab_secname, stabstr_secname) int what; char *stab_secname; @@ -384,7 +388,7 @@ s_stab_generic (what, stab_secname, stabstr_secname) demand_empty_rest_of_line (); } -/* Regular stab directive. */ +/* Regular stab directive. */ void s_stab (what) @@ -393,7 +397,7 @@ s_stab (what) s_stab_generic (what, STAB_SECTION_NAME, STAB_STRING_SECTION_NAME); } -/* "Extended stabs", used in Solaris only now. */ +/* "Extended stabs", used in Solaris only now. */ void s_xstab (what) @@ -439,9 +443,9 @@ s_xstab (what) /* Frob invented at RMS' request. Set the n_desc of a symbol. */ -void +void s_desc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char c; @@ -498,52 +502,62 @@ generate_asm_file (type, file) static char *last_file; static int label_count; char *hold; - char *buf = xmalloc (2 * strlen (file) + 10); char sym[30]; + char *buf; + char *tmp = file; + char *endp = file + strlen (file); + char *bufp = buf; + + if (last_file != NULL + && strcmp (last_file, file) == 0) + return; /* Rather than try to do this in some efficient fashion, we just generate a string and then parse it again. That lets us use the existing stabs hook, which expect to see a string, rather than inventing new ones. */ - hold = input_line_pointer; - if (last_file == NULL - || strcmp (last_file, file) != 0) + sprintf (sym, "%sF%d", FAKE_LABEL_NAME, label_count); + ++label_count; + + /* Allocate enough space for the file name (possibly extended with + doubled up backslashes), the symbol name, and the other characters + that make up a stabs file directive. */ + bufp = buf = xmalloc (2 * strlen (file) + strlen (sym) + 12); + + *bufp++ = '"'; + + while (tmp < endp) { - char *tmp = file; - char *endp = file + strlen(file); - char *bufp = buf; - - sprintf (sym, "%sF%d", FAKE_LABEL_NAME, label_count); - ++label_count; - - *bufp++ = '"'; - while (tmp < endp) - { - char *bslash = strchr (tmp, '\\'); - int len = (bslash ? (bslash - tmp + 1) : strlen (tmp)); - /* double all backslashes, since demand_copy_C_string (used by - s_stab to extract the part in quotes) will try to replace them as - escape sequences. backslash may appear in a filespec. */ - strncpy (bufp, tmp, len); - tmp += len; - bufp += len; - if (bslash != NULL) - *bufp++ = '\\'; - } - sprintf (bufp, "\",%d,0,0,%s\n", type, sym); - input_line_pointer = buf; - s_stab ('s'); - colon (sym); + char *bslash = strchr (tmp, '\\'); + int len = (bslash ? (bslash - tmp + 1) : strlen (tmp)); + + /* Double all backslashes, since demand_copy_C_string (used by + s_stab to extract the part in quotes) will try to replace them as + escape sequences. backslash may appear in a filespec. */ + strncpy (bufp, tmp, len); - if (last_file != NULL) - free (last_file); - last_file = xstrdup (file); + tmp += len; + bufp += len; + + if (bslash != NULL) + *bufp++ = '\\'; } - input_line_pointer = hold; + sprintf (bufp, "\",%d,0,0,%s\n", type, sym); + + input_line_pointer = buf; + s_stab ('s'); + colon (sym); + + if (last_file != NULL) + free (last_file); + last_file = xstrdup (file); + free (buf); + + input_line_pointer = hold; } /* Generate stabs debugging information for the current line. This is @@ -559,6 +573,10 @@ stabs_generate_asm_lineno () char *buf; char sym[30]; + /* Let the world know that we are in the middle of generating a + piece of stabs line debugging information. */ + outputting_stabs_line_debug = 1; + /* Rather than try to do this in some efficient fashion, we just generate a string and then parse it again. That lets us use the existing stabs hook, which expect to see a string, rather than @@ -589,6 +607,7 @@ stabs_generate_asm_lineno () colon (sym); input_line_pointer = hold; + outputting_stabs_line_debug = 0; } /* Emit a function stab. diff --git a/contrib/binutils/gas/struc-symbol.h b/contrib/binutils/gas/struc-symbol.h index 7573566..485ba5a 100644 --- a/contrib/binutils/gas/struc-symbol.h +++ b/contrib/binutils/gas/struc-symbol.h @@ -1,5 +1,6 @@ /* struct_symbol.h - Internal symbol structure - Copyright (C) 1987, 92, 93, 94, 95, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 92, 93, 94, 95, 98, 99, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -21,6 +22,12 @@ #ifndef __struc_symbol_h__ #define __struc_symbol_h__ +#ifdef BFD_ASSEMBLER +/* The BFD code wants to walk the list in both directions. */ +#undef SYMBOLS_NEED_BACKPOINTERS +#define SYMBOLS_NEED_BACKPOINTERS +#endif + /* The information we keep for a symbol. Note that the symbol table holds pointers both to this and to local_symbol structures. See below. */ @@ -34,13 +41,13 @@ struct symbol /* The (4-origin) position of sy_name in the symbol table of the object file. This will be 0 for (nameless) .stabd symbols. - Not used until write_object_file() time. */ + Not used until write_object_file() time. */ unsigned long sy_name_offset; /* What we write in .o file (if permitted). */ obj_symbol_type sy_symbol; - /* The 24 bit symbol number. Symbol numbers start at 0 and are unsigned. */ + /* The 24 bit symbol number. Symbol numbers start at 0 and are unsigned. */ long sy_number; #endif @@ -69,7 +76,7 @@ struct symbol are local and would otherwise not be. */ unsigned int sy_used_in_reloc : 1; - /* Whether the symbol is used as an operand or in an expression. + /* Whether the symbol is used as an operand or in an expression. NOTE: Not all the backends keep this information accurate; backends which use this bit are responsible for setting it when a symbol is used in backend routines. */ @@ -88,6 +95,10 @@ struct symbol #ifdef TC_SYMFIELD_TYPE TC_SYMFIELD_TYPE sy_tc; #endif + +#ifdef TARGET_SYMBOL_FIELDS + TARGET_SYMBOL_FIELDS +#endif }; #ifdef BFD_ASSEMBLER @@ -142,5 +153,3 @@ struct local_symbol #endif /* BFD_ASSEMBLER */ #endif /* __struc_symbol_h__ */ - -/* end of struc-symbol.h */ diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c index b2bf70d..1d29bba 100644 --- a/contrib/binutils/gas/subsegs.c +++ b/contrib/binutils/gas/subsegs.c @@ -1,5 +1,5 @@ /* subsegs.c - subsegments - - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -19,9 +19,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - * Segments & sub-segments. - */ +/* Segments & sub-segments. */ #include "as.h" @@ -37,12 +35,11 @@ static struct obstack frchains; segment_info_type segment_info[SEG_MAXIMUM_ORDINAL]; #else -/* Commented in "subsegs.h". */ +/* Commented in "subsegs.h". */ frchainS *data0_frchainP, *bss0_frchainP; #endif /* MANY_SEGMENTS */ -char const *const seg_name[] = -{ +char const *const seg_name[] = { "absolute", #ifdef MANY_SEGMENTS "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", @@ -62,7 +59,7 @@ char const *const seg_name[] = "transfert vector postload", "register", "", -}; /* Used by error reporters, dumpers etc. */ +}; /* Used by error reporters, dumpers etc. */ #else /* BFD_ASSEMBLER */ /* Gas segment information for bfd_abs_section_ptr and @@ -103,12 +100,12 @@ subsegs_begin () #endif frchain_root = NULL; - frchain_now = NULL; /* Warn new_subseg() that we are booting. */ + frchain_now = NULL; /* Warn new_subseg() that we are booting. */ frag_now = &dummy_frag; #ifndef BFD_ASSEMBLER - now_subseg = 42; /* Lie for 1st call to subseg_new. */ + now_subseg = 42; /* Lie for 1st call to subseg_new. */ #ifdef MANY_SEGMENTS { int i; @@ -275,7 +272,7 @@ subseg_set_rest (seg, subseg) */ if (!frcP || (frcP->frch_seg > seg - || frcP->frch_subseg > subseg)) /* Kinky logic only works with 2 segments. */ + || frcP->frch_subseg > subseg)) /* Kinky logic only works with 2 segments. */ { /* * This should be the only code that creates a frchainS. @@ -307,7 +304,7 @@ subseg_set_rest (seg, subseg) seginfo->frchainP = newP; } #endif - + frcP = newP; } /* @@ -567,8 +564,7 @@ section_symbol (sec) /* Return whether the specified segment is thought to hold text. */ #ifndef BFD_ASSEMBLER -const char * const nontext_section_names[] = -{ +const char * const nontext_section_names[] = { ".eh_frame", ".gcc_except_table", #ifdef OBJ_COFF diff --git a/contrib/binutils/gas/subsegs.h b/contrib/binutils/gas/subsegs.h index 4840d5b..504b6df 100644 --- a/contrib/binutils/gas/subsegs.h +++ b/contrib/binutils/gas/subsegs.h @@ -1,5 +1,6 @@ /* subsegs.h -> subsegs.c - Copyright (C) 1987, 92, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. + Copyright (C) 1987, 92, 93, 94, 95, 96, 98, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -44,7 +45,7 @@ struct frchain /* control building of a frag chain */ struct frag *frch_root; /* 1st struct frag in chain, or NULL */ struct frag *frch_last; /* last struct frag in chain, or NULL */ struct frchain *frch_next; /* next in chain of struct frchain-s */ - segT frch_seg; /* SEG_TEXT or SEG_DATA. */ + segT frch_seg; /* SEG_TEXT or SEG_DATA. */ subsegT frch_subseg; /* subsegment number of this chain */ #ifdef BFD_ASSEMBLER fixS *fix_root; /* Root of fixups for this subsegment. */ @@ -60,12 +61,10 @@ typedef struct frchain frchainS; extern frchainS *frchain_root; /* Frchain we are assembling into now. That is, the current segment's - frag chain, even if it contains no (complete) frags. */ + frag chain, even if it contains no (complete) frags. */ extern frchainS *frchain_now; - -typedef struct segment_info_struct -{ +typedef struct segment_info_struct { frchainS *frchainP; unsigned int hadone : 1; @@ -103,13 +102,12 @@ typedef struct segment_info_struct symbolS *sym; #endif - union - { - /* Current size of section holding stabs strings. */ - unsigned long stab_string_size; - /* Initial frag for ELF. */ - char *p; - } + union { + /* Current size of section holding stabs strings. */ + unsigned long stab_string_size; + /* Initial frag for ELF. */ + char *p; + } stabu; #ifdef NEED_LITERAL_POOL @@ -155,5 +153,3 @@ struct seg_info_trash { #endif /* ! BFD_ASSEMBLER */ extern void subsegs_print_statistics PARAMS ((FILE *)); - -/* end of subsegs.h */ diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c index b54a2fd..fba40cf 100644 --- a/contrib/binutils/gas/symbols.c +++ b/contrib/binutils/gas/symbols.c @@ -19,7 +19,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* #define DEBUG_SYMS / * to debug symbol list maintenance */ +/* #define DEBUG_SYMS / * to debug symbol list maintenance. */ #include <ctype.h> @@ -44,7 +44,7 @@ static struct hash_control *sy_hash; /* Table of local symbols. */ static struct hash_control *local_hash; -/* Below are commented in "symbols.h". */ +/* Below are commented in "symbols.h". */ symbolS *symbol_rootP; symbolS *symbol_lastP; symbolS abs_symbol; @@ -55,6 +55,9 @@ symbolS abs_symbol; #define debug_verify_symchain(root, last) ((void) 0) #endif +#define DOLLAR_LABEL_CHAR '\001' +#define LOCAL_LABEL_CHAR '\002' + struct obstack notes; static void fb_label_init PARAMS ((void)); @@ -63,12 +66,10 @@ static long fb_label_instance PARAMS ((long)); static void print_binary PARAMS ((FILE *, const char *, expressionS *)); -/* symbol_new() - - Return a pointer to a new symbol. Die if we can't make a new +/* Return a pointer to a new symbol. Die if we can't make a new symbol. Fill in the symbol's values. Add symbol to end of symbol chain. - + This function should be called in the general case of creating a symbol. However, if the output file symbol table has already been set, and you are certain that this symbol won't be wanted in the @@ -83,9 +84,7 @@ symbol_new (name, segment, valu, frag) { symbolS *symbolP = symbol_create (name, segment, valu, frag); - /* - * Link to end of symbol chain. - */ + /* Link to end of symbol chain. */ #ifdef BFD_ASSEMBLER { extern int symbol_table_frozen; @@ -108,7 +107,7 @@ save_symbol_name (name) unsigned int name_length; char *ret; - name_length = strlen (name) + 1; /* +1 for \0 */ + name_length = strlen (name) + 1; /* +1 for \0. */ obstack_grow (¬es, name, name_length); ret = obstack_finish (¬es); @@ -135,10 +134,10 @@ save_symbol_name (name) symbolS * symbol_create (name, segment, valu, frag) - const char *name; /* It is copied, the caller can destroy/modify */ - segT segment; /* Segment identifier (SEG_<something>) */ - valueT valu; /* Symbol value */ - fragS *frag; /* Associated fragment */ + const char *name; /* It is copied, the caller can destroy/modify. */ + segT segment; /* Segment identifier (SEG_<something>). */ + valueT valu; /* Symbol value. */ + fragS *frag; /* Associated fragment. */ { char *preserved_copy_of_name; symbolS *symbolP; @@ -147,7 +146,7 @@ symbol_create (name, segment, valu, frag) symbolP = (symbolS *) obstack_alloc (¬es, sizeof (symbolS)); - /* symbol must be born in some fixed state. This seems as good as any. */ + /* symbol must be born in some fixed state. This seems as good as any. */ memset (symbolP, 0, sizeof (symbolS)); #ifdef BFD_ASSEMBLER @@ -272,22 +271,17 @@ local_symbol_convert (locsym) #endif /* ! BFD_ASSEMBLER */ +/* We have just seen "<name>:". + Creates a struct symbol unless it already exists. + + Gripes if we are redefining a symbol incompatibly (and ignores it). */ -/* - * colon() - * - * We have just seen "<name>:". - * Creates a struct symbol unless it already exists. - * - * Gripes if we are redefining a symbol incompatibly (and ignores it). - * - */ symbolS * -colon (sym_name) /* just seen "x:" - rattle symbols & frags */ - const char *sym_name; /* symbol name, as a cannonical string */ - /* We copy this string: OK to alter later. */ +colon (sym_name) /* Just seen "x:" - rattle symbols & frags. */ + const char *sym_name; /* Symbol name, as a cannonical string. */ + /* We copy this string: OK to alter later. */ { - register symbolS *symbolP; /* symbol we are working with */ + register symbolS *symbolP; /* Symbol we are working with. */ /* Sun local labels go out of scope whenever a non-local symbol is defined. */ @@ -327,9 +321,9 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ (offsetT) 0, NULL); - /* We want to store the pointer to where to insert the jump table in the - fr_opcode of the rs_broken_word frag. This requires a little - hackery. */ + /* We want to store the pointer to where to insert the jump + table in the fr_opcode of the rs_broken_word frag. This + requires a little hackery. */ while (frag_tmp && (frag_tmp->fr_type != rs_broken_word || frag_tmp->fr_opcode)) @@ -349,9 +343,7 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ if (RESOLVE_SYMBOL_REDEFINITION (symbolP)) return symbolP; #endif - /* - * Now check for undefined symbols - */ + /* Now check for undefined symbols. */ if (LOCAL_SYMBOL_CHECK (symbolP)) { #ifdef BFD_ASSEMBLER @@ -377,27 +369,27 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ { symbolP->sy_frag = frag_now; #ifdef OBJ_VMS - S_SET_OTHER(symbolP, const_flag); + S_SET_OTHER (symbolP, const_flag); #endif S_SET_VALUE (symbolP, (valueT) frag_now_fix ()); S_SET_SEGMENT (symbolP, now_seg); #ifdef N_UNDF know (N_UNDF == 0); -#endif /* if we have one, it better be zero. */ +#endif /* if we have one, it better be zero. */ } else { - /* - * There are still several cases to check: - * A .comm/.lcomm symbol being redefined as - * initialized data is OK - * A .comm/.lcomm symbol being redefined with - * a larger size is also OK - * - * This only used to be allowed on VMS gas, but Sun cc - * on the sparc also depends on it. - */ + /* There are still several cases to check: + + A .comm/.lcomm symbol being redefined as initialized + data is OK + + A .comm/.lcomm symbol being redefined with a larger + size is also OK + + This only used to be allowed on VMS gas, but Sun cc + on the sparc also depends on it. */ if (((!S_IS_DEBUG (symbolP) && (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP)) @@ -406,17 +398,14 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ && (now_seg == data_section || now_seg == S_GET_SEGMENT (symbolP))) { - /* - * Select which of the 2 cases this is - */ + /* Select which of the 2 cases this is. */ if (now_seg != data_section) { - /* - * New .comm for prev .comm symbol. - * If the new size is larger we just - * change its value. If the new size - * is smaller, we ignore this symbol - */ + /* New .comm for prev .comm symbol. + + If the new size is larger we just change its + value. If the new size is smaller, we ignore + this symbol. */ if (S_GET_VALUE (symbolP) < ((unsigned) frag_now_fix ())) { @@ -429,10 +418,10 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ data. */ symbolP->sy_frag = frag_now; #ifdef OBJ_VMS - S_SET_OTHER(symbolP, const_flag); + S_SET_OTHER (symbolP, const_flag); #endif S_SET_VALUE (symbolP, (valueT) frag_now_fix ()); - S_SET_SEGMENT (symbolP, now_seg); /* keep N_EXT bit */ + S_SET_SEGMENT (symbolP, now_seg); /* Keep N_EXT bit. */ } } else @@ -450,22 +439,22 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ S_GET_OTHER (symbolP), S_GET_DESC (symbolP)); #endif - as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."), + as_bad (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."), sym_name, segment_name (S_GET_SEGMENT (symbolP)), od_buf, (long) S_GET_VALUE (symbolP)); } - } /* if the undefined symbol has no value */ + } /* if the undefined symbol has no value */ } else { - /* Don't blow up if the definition is the same */ + /* Don't blow up if the definition is the same. */ if (!(frag_now == symbolP->sy_frag && S_GET_VALUE (symbolP) == frag_now_fix () && S_GET_SEGMENT (symbolP) == now_seg)) - as_fatal (_("Symbol %s already defined."), sym_name); - } /* if this symbol is not yet defined */ + as_bad (_("Symbol %s already defined."), sym_name); + } } #ifdef BFD_ASSEMBLER @@ -485,7 +474,7 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ #endif /* OBJ_VMS */ symbol_table_insert (symbolP); - } /* if we have seen this symbol before */ + } if (mri_common_symbol != NULL) { @@ -511,15 +500,9 @@ colon (sym_name) /* just seen "x:" - rattle symbols & frags */ return symbolP; } +/* Die if we can't insert the symbol. */ -/* - * symbol_table_insert() - * - * Die if we can't insert the symbol. - * - */ - -void +void symbol_table_insert (symbolP) symbolS *symbolP; { @@ -542,15 +525,12 @@ symbol_table_insert (symbolP) { as_fatal (_("Inserting \"%s\" into symbol table failed: %s"), S_GET_NAME (symbolP), error_string); - } /* on error */ -} /* symbol_table_insert() */ + } /* on error */ +} -/* - * symbol_find_or_make() - * - * If a symbol name does not exist, create it as undefined, and insert - * it into the symbol table. Return a pointer to it. - */ +/* If a symbol name does not exist, create it as undefined, and insert + it into the symbol table. Return a pointer to it. */ + symbolS * symbol_find_or_make (name) const char *name; @@ -581,7 +561,7 @@ symbol_find_or_make (name) } /* if symbol wasn't found */ return (symbolP); -} /* symbol_find_or_make() */ +} symbolS * symbol_make (name) @@ -589,23 +569,19 @@ symbol_make (name) { symbolS *symbolP; - /* Let the machine description default it, e.g. for register names. */ + /* Let the machine description default it, e.g. for register names. */ symbolP = md_undefined_symbol ((char *) name); if (!symbolP) symbolP = symbol_new (name, undefined_section, (valueT) 0, &zero_address_frag); return (symbolP); -} /* symbol_make() */ +} -/* - * symbol_find() - * - * Implement symbol table lookup. - * In: A symbol's name as a string: '\0' can't be part of a symbol name. - * Out: NULL if the name was not in the symbol table, else the address - * of a struct symbol associated with that name. - */ +/* Implement symbol table lookup. + In: A symbol's name as a string: '\0' can't be part of a symbol name. + Out: NULL if the name was not in the symbol table, else the address + of a struct symbol associated with that name. */ symbolS * symbol_find (name) @@ -616,7 +592,7 @@ symbol_find (name) #else /* STRIP_UNDERSCORE */ return (symbol_find_base (name, 0)); #endif /* STRIP_UNDERSCORE */ -} /* symbol_find() */ +} symbolS * symbol_find_base (name, strip_underscore) @@ -668,16 +644,15 @@ symbol_find_base (name, strip_underscore) return ((symbolS *) hash_find (sy_hash, name)); } -/* - * Once upon a time, symbols were kept in a singly linked list. At - * least coff needs to be able to rearrange them from time to time, for - * which a doubly linked list is much more convenient. Loic did these - * as macros which seemed dangerous to me so they're now functions. - * xoxorich. - */ +/* Once upon a time, symbols were kept in a singly linked list. At + least coff needs to be able to rearrange them from time to time, for + which a doubly linked list is much more convenient. Loic did these + as macros which seemed dangerous to me so they're now functions. + xoxorich. */ -/* Link symbol ADDME after symbol TARGET in the chain. */ -void +/* Link symbol ADDME after symbol TARGET in the chain. */ + +void symbol_append (addme, target, rootPP, lastPP) symbolS *addme; symbolS *target; @@ -700,7 +675,7 @@ symbol_append (addme, target, rootPP, lastPP) *rootPP = addme; *lastPP = addme; return; - } /* if the list is empty */ + } /* if the list is empty */ if (target->sy_next != NULL) { @@ -712,7 +687,7 @@ symbol_append (addme, target, rootPP, lastPP) { know (*lastPP == target); *lastPP = addme; - } /* if we have a next */ + } /* if we have a next */ addme->sy_next = target->sy_next; target->sy_next = addme; @@ -724,8 +699,9 @@ symbol_append (addme, target, rootPP, lastPP) debug_verify_symchain (symbol_rootP, symbol_lastP); } -/* Set the chain pointers of SYMBOL to null. */ -void +/* Set the chain pointers of SYMBOL to null. */ + +void symbol_clear_list_pointers (symbolP) symbolS *symbolP; { @@ -738,8 +714,9 @@ symbol_clear_list_pointers (symbolP) } #ifdef SYMBOLS_NEED_BACKPOINTERS -/* Remove SYMBOLP from the list. */ -void +/* Remove SYMBOLP from the list. */ + +void symbol_remove (symbolP, rootPP, lastPP) symbolS *symbolP; symbolS **rootPP; @@ -751,28 +728,29 @@ symbol_remove (symbolP, rootPP, lastPP) if (symbolP == *rootPP) { *rootPP = symbolP->sy_next; - } /* if it was the root */ + } /* if it was the root */ if (symbolP == *lastPP) { *lastPP = symbolP->sy_previous; - } /* if it was the tail */ + } /* if it was the tail */ if (symbolP->sy_next != NULL) { symbolP->sy_next->sy_previous = symbolP->sy_previous; - } /* if not last */ + } /* if not last */ if (symbolP->sy_previous != NULL) { symbolP->sy_previous->sy_next = symbolP->sy_next; - } /* if not first */ + } /* if not first */ debug_verify_symchain (*rootPP, *lastPP); } -/* Link symbol ADDME before symbol TARGET in the chain. */ -void +/* Link symbol ADDME before symbol TARGET in the chain. */ + +void symbol_insert (addme, target, rootPP, lastPP) symbolS *addme; symbolS *target; @@ -792,7 +770,7 @@ symbol_insert (addme, target, rootPP, lastPP) { know (*rootPP == target); *rootPP = addme; - } /* if not first */ + } /* if not first */ addme->sy_previous = target->sy_previous; target->sy_previous = addme; @@ -803,7 +781,7 @@ symbol_insert (addme, target, rootPP, lastPP) #endif /* SYMBOLS_NEED_BACKPOINTERS */ -void +void verify_symbol_chain (rootP, lastP) symbolS *rootP; symbolS *lastP; @@ -862,10 +840,10 @@ resolve_symbol_value (symp, finalize) struct local_symbol *locsym = (struct local_symbol *) symp; if (local_symbol_resolved_p (locsym)) - return locsym->lsy_offset / OCTETS_PER_BYTE; + return locsym->lsy_offset / bfd_octets_per_byte (stdoutput); final_val = (local_symbol_get_frag (locsym)->fr_address - + locsym->lsy_offset) / OCTETS_PER_BYTE; + + locsym->lsy_offset) / bfd_octets_per_byte (stdoutput); if (finalize) { @@ -891,7 +869,8 @@ resolve_symbol_value (symp, finalize) if (symp->sy_resolving) { if (finalize) - as_bad (_("Symbol definition loop encountered at %s"), S_GET_NAME (symp)); + as_bad (_("Symbol definition loop encountered at %s"), + S_GET_NAME (symp)); final_val = 0; resolved = 1; } @@ -1076,7 +1055,8 @@ resolve_symbol_value (symp, finalize) S_GET_NAME (symp->sy_value.X_op_symbol)); if (seg_left != undefined_section && seg_right != undefined_section) - as_bad_where (file, line, _("invalid section for operation")); + as_bad_where (file, line, + _("invalid section for operation")); } else { @@ -1144,7 +1124,7 @@ resolve_symbol_value (symp, finalize) final_seg = absolute_section; resolved = (symbol_resolved_p (add_symbol) && symbol_resolved_p (op_symbol)); - break; + break; case O_register: case O_big: @@ -1180,7 +1160,8 @@ exit_dont_set_value: symp->sy_resolved = 1; else if (S_GET_SEGMENT (symp) != expr_section) { - as_bad (_("can't resolve value for symbol \"%s\""), S_GET_NAME (symp)); + as_bad (_("can't resolve value for symbol \"%s\""), + S_GET_NAME (symp)); symp->sy_resolved = 1; } } @@ -1228,7 +1209,7 @@ static char *dollar_label_defines; static unsigned long dollar_label_count; static unsigned long dollar_label_max; -int +int dollar_label_defined (label) long label; { @@ -1240,9 +1221,9 @@ dollar_label_defined (label) if (*i == label) return dollar_label_defines[i - dollar_labels]; - /* if we get here, label isn't defined */ + /* If we get here, label isn't defined. */ return 0; -} /* dollar_label_defined() */ +} static long dollar_label_instance (label) @@ -1256,12 +1237,12 @@ dollar_label_instance (label) if (*i == label) return (dollar_label_instances[i - dollar_labels]); - /* If we get here, we haven't seen the label before, therefore its instance - count is zero. */ + /* If we get here, we haven't seen the label before. + Therefore its instance count is zero. */ return 0; } -void +void dollar_label_clear () { memset (dollar_label_defines, '\0', (unsigned int) dollar_label_count); @@ -1269,7 +1250,7 @@ dollar_label_clear () #define DOLLAR_LABEL_BUMP_BY 10 -void +void define_dollar_label (label) long label; { @@ -1283,7 +1264,7 @@ define_dollar_label (label) return; } - /* if we get to here, we don't have label listed yet. */ + /* If we get to here, we don't have label listed yet. */ if (dollar_labels == NULL) { @@ -1301,7 +1282,7 @@ define_dollar_label (label) dollar_label_instances = (long *) xrealloc ((char *) dollar_label_instances, dollar_label_max * sizeof (long)); dollar_label_defines = xrealloc (dollar_label_defines, dollar_label_max); - } /* if we needed to grow */ + } /* if we needed to grow */ dollar_labels[dollar_label_count] = label; dollar_label_instances[dollar_label_count] = 1; @@ -1309,31 +1290,28 @@ define_dollar_label (label) ++dollar_label_count; } -/* - * dollar_label_name() - * - * Caller must copy returned name: we re-use the area for the next name. - * - * The mth occurence of label n: is turned into the symbol "Ln^Am" - * where n is the label number and m is the instance number. "L" makes - * it a label discarded unless debugging and "^A"('\1') ensures no - * ordinary symbol SHOULD get the same name as a local label - * symbol. The first "4:" is "L4^A1" - the m numbers begin at 1. - * - * fb labels get the same treatment, except that ^B is used in place of ^A. - */ - -char * /* Return local label name. */ +/* Caller must copy returned name: we re-use the area for the next name. + + The mth occurence of label n: is turned into the symbol "Ln^Am" + where n is the label number and m is the instance number. "L" makes + it a label discarded unless debugging and "^A"('\1') ensures no + ordinary symbol SHOULD get the same name as a local label + symbol. The first "4:" is "L4^A1" - the m numbers begin at 1. + + fb labels get the same treatment, except that ^B is used in place + of ^A. */ + +char * /* Return local label name. */ dollar_label_name (n, augend) - register long n; /* we just saw "n$:" : n a number */ - register int augend; /* 0 for current instance, 1 for new instance */ + register long n; /* we just saw "n$:" : n a number. */ + register int augend; /* 0 for current instance, 1 for new instance. */ { long i; - /* Returned to caller, then copied. used for created names ("4f") */ + /* Returned to caller, then copied. Used for created names ("4f"). */ static char symbol_name_build[24]; register char *p; register char *q; - char symbol_name_temporary[20]; /* build up a number, BACKWARDS */ + char symbol_name_temporary[20]; /* Build up a number, BACKWARDS. */ know (n >= 0); know (augend == 0 || augend == 1); @@ -1343,8 +1321,8 @@ dollar_label_name (n, augend) #endif *p++ = 'L'; - /* Next code just does sprintf( {}, "%d", n); */ - /* label number */ + /* Next code just does sprintf( {}, "%d", n); */ + /* Label number. */ q = symbol_name_temporary; for (*q++ = 0, i = n; i; ++q) { @@ -1354,9 +1332,9 @@ dollar_label_name (n, augend) while ((*p = *--q) != '\0') ++p; - *p++ = 1; /* ^A */ + *p++ = DOLLAR_LABEL_CHAR; /* ^A */ - /* instance number */ + /* Instance number. */ q = symbol_name_temporary; for (*q++ = 0, i = dollar_label_instance (n) + augend; i; ++q) { @@ -1365,27 +1343,26 @@ dollar_label_name (n, augend) } while ((*p++ = *--q) != '\0');; - /* The label, as a '\0' ended string, starts at symbol_name_build. */ + /* The label, as a '\0' ended string, starts at symbol_name_build. */ return symbol_name_build; } -/* - * Sombody else's idea of local labels. They are made by "n:" where n - * is any decimal digit. Refer to them with - * "nb" for previous (backward) n: - * or "nf" for next (forward) n:. - * - * We do a little better and let n be any number, not just a single digit, but - * since the other guy's assembler only does ten, we treat the first ten - * specially. - * - * Like someone else's assembler, we have one set of local label counters for - * entire assembly, not one set per (sub)segment like in most assemblers. This - * implies that one can refer to a label in another segment, and indeed some - * crufty compilers have done just that. - * - * Since there could be a LOT of these things, treat them as a sparse array. - */ +/* Sombody else's idea of local labels. They are made by "n:" where n + is any decimal digit. Refer to them with + "nb" for previous (backward) n: + or "nf" for next (forward) n:. + + We do a little better and let n be any number, not just a single digit, but + since the other guy's assembler only does ten, we treat the first ten + specially. + + Like someone else's assembler, we have one set of local label counters for + entire assembly, not one set per (sub)segment like in most assemblers. This + implies that one can refer to a label in another segment, and indeed some + crufty compilers have done just that. + + Since there could be a LOT of these things, treat them as a sparse + array. */ #define FB_LABEL_SPECIAL (10) @@ -1395,17 +1372,18 @@ static long *fb_label_instances; static long fb_label_count; static long fb_label_max; -/* this must be more than FB_LABEL_SPECIAL */ +/* This must be more than FB_LABEL_SPECIAL. */ #define FB_LABEL_BUMP_BY (FB_LABEL_SPECIAL + 6) -static void +static void fb_label_init () { memset ((void *) fb_low_counter, '\0', sizeof (fb_low_counter)); -} /* fb_label_init() */ +} -/* add one to the instance number of this fb label */ -void +/* Add one to the instance number of this fb label. */ + +void fb_label_instance_inc (label) long label; { @@ -1426,11 +1404,11 @@ fb_label_instance_inc (label) { ++fb_label_instances[i - fb_labels]; return; - } /* if we find it */ - } /* for each existing label */ + } /* if we find it */ + } /* for each existing label */ } - /* if we get to here, we don't have label listed yet. */ + /* If we get to here, we don't have label listed yet. */ if (fb_labels == NULL) { @@ -1447,14 +1425,14 @@ fb_label_instance_inc (label) fb_label_max * sizeof (long)); fb_label_instances = (long *) xrealloc ((char *) fb_label_instances, fb_label_max * sizeof (long)); - } /* if we needed to grow */ + } /* if we needed to grow */ fb_labels[fb_label_count] = label; fb_label_instances[fb_label_count] = 1; ++fb_label_count; } -static long +static long fb_label_instance (label) long label; { @@ -1473,8 +1451,8 @@ fb_label_instance (label) if (*i == label) { return (fb_label_instances[i - fb_labels]); - } /* if we find it */ - } /* for each existing label */ + } /* if we find it */ + } /* for each existing label */ } /* We didn't find the label, so this must be a reference to the @@ -1482,38 +1460,39 @@ fb_label_instance (label) return 0; } -/* - * fb_label_name() - * - * Caller must copy returned name: we re-use the area for the next name. - * - * The mth occurence of label n: is turned into the symbol "Ln^Bm" - * where n is the label number and m is the instance number. "L" makes - * it a label discarded unless debugging and "^B"('\2') ensures no - * ordinary symbol SHOULD get the same name as a local label - * symbol. The first "4:" is "L4^B1" - the m numbers begin at 1. - * - * dollar labels get the same treatment, except that ^A is used in place of ^B. */ - -char * /* Return local label name. */ +/* Caller must copy returned name: we re-use the area for the next name. + + The mth occurence of label n: is turned into the symbol "Ln^Bm" + where n is the label number and m is the instance number. "L" makes + it a label discarded unless debugging and "^B"('\2') ensures no + ordinary symbol SHOULD get the same name as a local label + symbol. The first "4:" is "L4^B1" - the m numbers begin at 1. + + dollar labels get the same treatment, except that ^A is used in + place of ^B. */ + +char * /* Return local label name. */ fb_label_name (n, augend) - long n; /* we just saw "n:", "nf" or "nb" : n a number */ - long augend; /* 0 for nb, 1 for n:, nf */ + long n; /* We just saw "n:", "nf" or "nb" : n a number. */ + long augend; /* 0 for nb, 1 for n:, nf. */ { long i; - /* Returned to caller, then copied. used for created names ("4f") */ + /* Returned to caller, then copied. Used for created names ("4f"). */ static char symbol_name_build[24]; register char *p; register char *q; - char symbol_name_temporary[20]; /* build up a number, BACKWARDS */ + char symbol_name_temporary[20]; /* Build up a number, BACKWARDS. */ know (n >= 0); know (augend == 0 || augend == 1); p = symbol_name_build; +#ifdef LOCAL_LABEL_PREFIX + *p++ = LOCAL_LABEL_PREFIX; +#endif *p++ = 'L'; - /* Next code just does sprintf( {}, "%d", n); */ - /* label number */ + /* Next code just does sprintf( {}, "%d", n); */ + /* Label number. */ q = symbol_name_temporary; for (*q++ = 0, i = n; i; ++q) { @@ -1523,9 +1502,9 @@ fb_label_name (n, augend) while ((*p = *--q) != '\0') ++p; - *p++ = 2; /* ^B */ + *p++ = LOCAL_LABEL_CHAR; /* ^B */ - /* instance number */ + /* Instance number. */ q = symbol_name_temporary; for (*q++ = 0, i = fb_label_instance (n) + augend; i; ++q) { @@ -1534,15 +1513,13 @@ fb_label_name (n, augend) } while ((*p++ = *--q) != '\0');; - /* The label, as a '\0' ended string, starts at symbol_name_build. */ + /* The label, as a '\0' ended string, starts at symbol_name_build. */ return (symbol_name_build); -} /* fb_label_name() */ +} -/* - * decode name that may have been generated by foo_label_name() above. If - * the name wasn't generated by foo_label_name(), then return it unaltered. - * This is used for error messages. - */ +/* Decode name that may have been generated by foo_label_name() above. + If the name wasn't generated by foo_label_name(), then return it + unaltered. This is used for error messages. */ char * decode_local_label_name (s) @@ -1554,16 +1531,22 @@ decode_local_label_name (s) int instance_number; char *type; const char *message_format = _("\"%d\" (instance number %d of a %s label)"); + int index = 0; - if (s[0] != 'L') +#ifdef LOCAL_LABEL_PREFIX + if (s[index] == LOCAL_LABEL_PREFIX) + ++index; +#endif + + if (s[index] != 'L') return s; - for (label_number = 0, p = s + 1; isdigit ((unsigned char) *p); ++p) + for (label_number = 0, p = s + index + 1; isdigit ((unsigned char) *p); ++p) label_number = (10 * label_number) + *p - '0'; - if (*p == 1) + if (*p == DOLLAR_LABEL_CHAR) type = "dollar"; - else if (*p == 2) + else if (*p == LOCAL_LABEL_CHAR) type = "fb"; else return s; @@ -1678,7 +1661,7 @@ S_IS_EXTERNAL (s) flags = s->bsym->flags; - /* sanity check */ + /* Sanity check. */ if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL)) abort (); @@ -1735,7 +1718,7 @@ S_IS_LOCAL (s) flags = s->bsym->flags; - /* sanity check */ + /* Sanity check. */ if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL)) abort (); @@ -1750,8 +1733,8 @@ S_IS_LOCAL (s) name = S_GET_NAME (s); return (name != NULL && ! S_IS_DEBUG (s) - && (strchr (name, '\001') - || strchr (name, '\002') + && (strchr (name, DOLLAR_LABEL_CHAR) + || strchr (name, LOCAL_LABEL_CHAR) || (! flag_keep_locals && (bfd_is_local_label (stdoutput, s->bsym) || (flag_mri @@ -1814,7 +1797,7 @@ S_SET_SEGMENT (s, seg) if (s->bsym->flags & BSF_SECTION_SYM) { if (s->bsym->section != seg) - abort(); + abort (); } else s->bsym->section = seg; @@ -1832,7 +1815,7 @@ S_SET_EXTERNAL (s) return; } s->bsym->flags |= BSF_GLOBAL; - s->bsym->flags &= ~(BSF_LOCAL|BSF_WEAK); + s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK); } void @@ -1847,7 +1830,7 @@ S_CLEAR_EXTERNAL (s) return; } s->bsym->flags |= BSF_LOCAL; - s->bsym->flags &= ~(BSF_GLOBAL|BSF_WEAK); + s->bsym->flags &= ~(BSF_GLOBAL | BSF_WEAK); } void @@ -1857,7 +1840,7 @@ S_SET_WEAK (s) if (LOCAL_SYMBOL_CHECK (s)) s = local_symbol_convert ((struct local_symbol *) s); s->bsym->flags |= BSF_WEAK; - s->bsym->flags &= ~(BSF_GLOBAL|BSF_LOCAL); + s->bsym->flags &= ~(BSF_GLOBAL | BSF_LOCAL); } void @@ -2125,7 +2108,7 @@ symbol_section_p (s) #ifdef BFD_ASSEMBLER return (s->bsym->flags & BSF_SECTION_SYM) != 0; #else - /* FIXME */ + /* FIXME. */ return 0; #endif } @@ -2237,7 +2220,7 @@ void symbol_begin () { symbol_lastP = NULL; - symbol_rootP = NULL; /* In case we have 0 symbols (!!) */ + symbol_rootP = NULL; /* In case we have 0 symbols (!!) */ sy_hash = hash_new (); #ifdef BFD_ASSEMBLER local_hash = hash_new (); @@ -2249,7 +2232,7 @@ symbol_begin () abs_symbol.bsym = bfd_abs_section.symbol; #endif #else - /* Can't initialise a union. Sigh. */ + /* Can't initialise a union. Sigh. */ S_SET_SEGMENT (&abs_symbol, absolute_section); #endif abs_symbol.sy_value.X_op = O_constant; @@ -2258,8 +2241,6 @@ symbol_begin () if (LOCAL_LABELS_FB) fb_label_init (); } - - int indent_level; @@ -2361,7 +2342,7 @@ print_symbol_value (sym) static void print_binary (file, name, exp) FILE *file; - const char * name; + const char *name; expressionS *exp; { indent_level++; @@ -2506,5 +2487,3 @@ symbol_print_statistics (file) local_symbol_count, local_symbol_conversion_count); #endif } - -/* end of symbols.c */ diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h index f3b73af..87c473c 100644 --- a/contrib/binutils/gas/symbols.h +++ b/contrib/binutils/gas/symbols.h @@ -1,5 +1,5 @@ /* symbols.h - - Copyright (C) 1987, 90, 92, 93, 94, 95, 97, 1999 + Copyright (C) 1987, 90, 92, 93, 94, 95, 97, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -31,7 +31,7 @@ #include "struc-symbol.h" #endif -extern struct obstack notes; /* eg FixS live here. */ +extern struct obstack notes; /* eg FixS live here. */ extern struct obstack cond_obstack; /* this is where we track .ifdef/.endif (if we do that at all). */ @@ -201,5 +201,3 @@ void symbol_set_obj PARAMS ((symbolS *, OBJ_SYMFIELD_TYPE *)); TC_SYMFIELD_TYPE *symbol_get_tc PARAMS ((symbolS *)); void symbol_set_tc PARAMS ((symbolS *, TC_SYMFIELD_TYPE *)); #endif - -/* end of symbols.h */ diff --git a/contrib/binutils/gas/tc.h b/contrib/binutils/gas/tc.h index 4e4046c..07817be 100644 --- a/contrib/binutils/gas/tc.h +++ b/contrib/binutils/gas/tc.h @@ -24,19 +24,19 @@ extern const pseudo_typeS md_pseudo_table[]; /* JF moved this here from as.h under the theory that nobody except MACHINE.c - and write.c care about it anyway. */ + and write.c care about it anyway. */ struct relax_type { - /* Forward reach. Signed number. > 0. */ + /* Forward reach. Signed number. > 0. */ long rlx_forward; - /* Backward reach. Signed number. < 0. */ + /* Backward reach. Signed number. < 0. */ long rlx_backward; - /* Bytes length of this address. */ + /* Bytes length of this address. */ unsigned char rlx_length; - /* Next longer relax-state. 0 means there is no 'next' relax-state. */ + /* Next longer relax-state. 0 means there is no 'next' relax-state. */ relax_substateT rlx_more; }; diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c index e386ece..9ef356f 100644 --- a/contrib/binutils/gas/write.c +++ b/contrib/binutils/gas/write.c @@ -1,5 +1,5 @@ /* write.c - emit .o file - Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -19,23 +19,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* This thing should be set up to do byteordering correctly. But... */ +/* This thing should be set up to do byteordering correctly. But... */ #include "as.h" #include "subsegs.h" #include "obstack.h" #include "output-file.h" +#include "dwarf2dbg.h" /* This looks like a good idea. Let's try turning it on always, for now. */ #undef BFD_FAST_SECTION_FILL #define BFD_FAST_SECTION_FILL -/* The NOP_OPCODE is for the alignment fill value. Fill it with a nop - instruction so that the disassembler does not choke on it. */ -#ifndef NOP_OPCODE -#define NOP_OPCODE 0x00 -#endif - #ifndef TC_ADJUST_RELOC_COUNT #define TC_ADJUST_RELOC_COUNT(FIXP,COUNT) #endif @@ -48,6 +43,14 @@ #define TC_FORCE_RELOCATION_SECTION(FIXP,SEG) TC_FORCE_RELOCATION(FIXP) #endif +#ifndef TC_LINKRELAX_FIXUP +#define TC_LINKRELAX_FIXUP(SEG) 1 +#endif + +#ifndef TC_FIX_ADJUSTABLE +#define TC_FIX_ADJUSTABLE(fix) 1 +#endif + #ifndef MD_PCREL_FROM_SECTION #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from(FIXP) #endif @@ -77,9 +80,9 @@ struct frag *text_frag_root; struct frag *data_frag_root; struct frag *bss_frag_root; -struct frag *text_last_frag; /* Last frag in segment. */ -struct frag *data_last_frag; /* Last frag in segment. */ -static struct frag *bss_last_frag; /* Last frag in segment. */ +struct frag *text_last_frag; /* Last frag in segment. */ +struct frag *data_last_frag; /* Last frag in segment. */ +static struct frag *bss_last_frag; /* Last frag in segment. */ #endif #ifndef BFD @@ -87,13 +90,13 @@ static object_headers headers; #endif long string_byte_count; -char *next_object_file_charP; /* Tracks object file bytes. */ +char *next_object_file_charP; /* Tracks object file bytes. */ #ifndef OBJ_VMS int magic_number_for_object_file = DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE; #endif -#endif /* BFD_ASSEMBLER */ +#endif /* BFD_ASSEMBLER */ static int n_fixups; @@ -118,7 +121,8 @@ static fragS *chain_frchains_together_1 PARAMS ((segT, struct frchain *)); #ifdef BFD_ASSEMBLER static void chain_frchains_together PARAMS ((bfd *, segT, PTR)); static void cvt_frag_to_fill PARAMS ((segT, fragS *)); -static void relax_and_size_seg PARAMS ((bfd *, asection *, PTR)); +static void relax_seg PARAMS ((bfd *, asection *, PTR)); +static void size_seg PARAMS ((bfd *, asection *, PTR)); static void adjust_reloc_syms PARAMS ((bfd *, asection *, PTR)); static void write_relocs PARAMS ((bfd *, asection *, PTR)); static void write_contents PARAMS ((bfd *, asection *, PTR)); @@ -132,26 +136,26 @@ static void cvt_frag_to_fill PARAMS ((object_headers *, segT, fragS *)); static void remove_subsegs PARAMS ((frchainS *, int, fragS **, fragS **)); static void relax_and_size_all_segments PARAMS ((void)); #endif +#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32) +static void set_segment_vma PARAMS ((bfd *, asection *, PTR)); +#endif + +/* Create a fixS in obstack 'notes'. */ -/* - * fix_new() - * - * Create a fixS in obstack 'notes'. - */ static fixS * fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel, r_type) - fragS *frag; /* Which frag? */ - int where; /* Where in that frag? */ - int size; /* 1, 2, or 4 usually. */ - symbolS *add_symbol; /* X_add_symbol. */ - symbolS *sub_symbol; /* X_op_symbol. */ - offsetT offset; /* X_add_number. */ - int pcrel; /* TRUE if PC-relative relocation. */ + fragS *frag; /* Which frag? */ + int where; /* Where in that frag? */ + int size; /* 1, 2, or 4 usually. */ + symbolS *add_symbol; /* X_add_symbol. */ + symbolS *sub_symbol; /* X_op_symbol. */ + offsetT offset; /* X_add_number. */ + int pcrel; /* TRUE if PC-relative relocation. */ #ifdef BFD_ASSEMBLER - bfd_reloc_code_real_type r_type; /* Relocation type */ + bfd_reloc_code_real_type r_type; /* Relocation type. */ #else - int r_type; /* Relocation type */ + int r_type; /* Relocation type. */ #endif { fixS *fixP; @@ -192,7 +196,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel, #endif #ifdef TC_FIX_TYPE - TC_INIT_FIX_DATA(fixP); + TC_INIT_FIX_DATA (fixP); #endif as_where (&fixP->fx_file, &fixP->fx_line); @@ -200,8 +204,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel, /* Usually, we want relocs sorted numerically, but while comparing to older versions of gas that have relocs reverse sorted, it is convenient to have this compile - time option. xoxorich. */ - + time option. xoxorich. */ { #ifdef BFD_ASSEMBLER @@ -218,7 +221,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel, fixP->fx_next = *seg_fix_rootP; *seg_fix_rootP = fixP; -#else /* REVERSE_SORT_RELOCS */ +#else /* REVERSE_SORT_RELOCS */ fixP->fx_next = NULL; @@ -228,8 +231,7 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel, *seg_fix_rootP = fixP; *seg_fix_tailP = fixP; -#endif /* REVERSE_SORT_RELOCS */ - +#endif /* REVERSE_SORT_RELOCS */ } return fixP; @@ -239,16 +241,16 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel, fixS * fix_new (frag, where, size, add_symbol, offset, pcrel, r_type) - fragS *frag; /* Which frag? */ - int where; /* Where in that frag? */ - int size; /* 1, 2, or 4 usually. */ - symbolS *add_symbol; /* X_add_symbol. */ - offsetT offset; /* X_add_number. */ - int pcrel; /* TRUE if PC-relative relocation. */ + fragS *frag; /* Which frag? */ + int where; /* Where in that frag? */ + int size; /* 1, 2, or 4 usually. */ + symbolS *add_symbol; /* X_add_symbol. */ + offsetT offset; /* X_add_number. */ + int pcrel; /* TRUE if PC-relative relocation. */ #ifdef BFD_ASSEMBLER - bfd_reloc_code_real_type r_type; /* Relocation type */ + bfd_reloc_code_real_type r_type; /* Relocation type. */ #else - int r_type; /* Relocation type */ + int r_type; /* Relocation type. */ #endif { return fix_new_internal (frag, where, size, add_symbol, @@ -261,15 +263,15 @@ fix_new (frag, where, size, add_symbol, offset, pcrel, r_type) fixS * fix_new_exp (frag, where, size, exp, pcrel, r_type) - fragS *frag; /* Which frag? */ - int where; /* Where in that frag? */ - int size; /* 1, 2, or 4 usually. */ + fragS *frag; /* Which frag? */ + int where; /* Where in that frag? */ + int size; /* 1, 2, or 4 usually. */ expressionS *exp; /* Expression. */ - int pcrel; /* TRUE if PC-relative relocation. */ + int pcrel; /* TRUE if PC-relative relocation. */ #ifdef BFD_ASSEMBLER - bfd_reloc_code_real_type r_type; /* Relocation type */ + bfd_reloc_code_real_type r_type; /* Relocation type. */ #else - int r_type; /* Relocation type */ + int r_type; /* Relocation type. */ #endif { symbolS *add = NULL; @@ -286,10 +288,12 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type) the difference expression cannot immediately be reduced. */ { symbolS *stmp = make_expr_symbol (exp); + exp->X_op = O_symbol; exp->X_op_symbol = 0; exp->X_add_symbol = stmp; exp->X_add_number = 0; + return fix_new_exp (frag, where, size, exp, pcrel, r_type); } @@ -303,7 +307,7 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type) #if defined(TC_RVA_RELOC) r_type = TC_RVA_RELOC; #else - as_fatal(_("rva not supported")); + as_fatal (_("rva not supported")); #endif #endif break; @@ -318,7 +322,7 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type) /* Fall through. */ case O_symbol: add = exp->X_add_symbol; - /* Fall through. */ + /* Fall through. */ case O_constant: off = exp->X_add_number; break; @@ -328,8 +332,7 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type) break; } - return fix_new_internal (frag, where, size, add, sub, off, - pcrel, r_type); + return fix_new_internal (frag, where, size, add, sub, off, pcrel, r_type); } /* Append a string onto another string, bumping the pointer along. */ @@ -339,7 +342,7 @@ append (charPP, fromP, length) char *fromP; unsigned long length; { - /* Don't trust memcpy() of 0 chars. */ + /* Don't trust memcpy() of 0 chars. */ if (length == 0) return; @@ -351,15 +354,14 @@ append (charPP, fromP, length) int section_alignment[SEG_MAXIMUM_ORDINAL]; #endif -/* - * This routine records the largest alignment seen for each segment. - * If the beginning of the segment is aligned on the worst-case - * boundary, all of the other alignments within it will work. At - * least one object format really uses this info. - */ +/* This routine records the largest alignment seen for each segment. + If the beginning of the segment is aligned on the worst-case + boundary, all of the other alignments within it will work. At + least one object format really uses this info. */ + void record_alignment (seg, align) - /* Segment to which alignment pertains */ + /* Segment to which alignment pertains. */ segT seg; /* Alignment, as a power of 2 (e.g., 1 => 2-byte boundary, 2 => 4-byte boundary, etc.) */ @@ -376,6 +378,19 @@ record_alignment (seg, align) #endif } +int +get_recorded_alignment (seg) + segT seg; +{ + if (seg == absolute_section) + return 0; +#ifdef BFD_ASSEMBLER + return bfd_get_section_alignment (stdoutput, seg); +#else + return section_alignment[(int) seg]; +#endif +} + #ifdef BFD_ASSEMBLER /* Reset the section indices after removing the gas created sections. */ @@ -392,7 +407,7 @@ renumber_sections (abfd, sec, countparg) ++*countp; } -#endif /* defined (BFD_ASSEMBLER) */ +#endif /* defined (BFD_ASSEMBLER) */ #if defined (BFD_ASSEMBLER) || ! defined (BFD) @@ -443,8 +458,8 @@ chain_frchains_together (abfd, section, xxx) subseg_new, so it is possible that seg_info is NULL. */ info = seg_info (section); if (info != (segment_info_type *) NULL) - info->frchainP->frch_last - = chain_frchains_together_1 (section, info->frchainP); + info->frchainP->frch_last + = chain_frchains_together_1 (section, info->frchainP); /* Now that we've chained the frags together, we must add new fixups to the segment, not to the frag chain. */ @@ -466,14 +481,14 @@ remove_subsegs (head, seg, root, last) *last = chain_frchains_together_1 (seg, head); } -#endif /* BFD */ +#endif /* BFD */ #if defined (BFD_ASSEMBLER) || !defined (BFD) #ifdef BFD_ASSEMBLER static void cvt_frag_to_fill (sec, fragP) - segT sec; + segT sec ATTRIBUTE_UNUSED; fragS *fragP; #else static void @@ -487,6 +502,7 @@ cvt_frag_to_fill (headersP, sec, fragP) { case rs_align: case rs_align_code: + case rs_align_test: case rs_org: case rs_space: #ifdef HANDLE_ALIGN @@ -528,6 +544,10 @@ cvt_frag_to_fill (headersP, sec, fragP) eh_frame_convert_frag (fragP); break; + case rs_dwarf2dbg: + dwarf2dbg_convert_frag (fragP); + break; + case rs_machine_dependent: #ifdef BFD_ASSEMBLER md_convert_frag (stdoutput, sec, fragP); @@ -539,11 +559,9 @@ cvt_frag_to_fill (headersP, sec, fragP) || ((offsetT) (fragP->fr_next->fr_address - fragP->fr_address) == fragP->fr_fix)); - /* - * After md_convert_frag, we make the frag into a ".space 0". - * Md_convert_frag() should set up any fixSs and constants - * required. - */ + /* After md_convert_frag, we make the frag into a ".space 0". + md_convert_frag() should set up any fixSs and constants + required. */ frag_wane (fragP); break; @@ -572,11 +590,25 @@ cvt_frag_to_fill (headersP, sec, fragP) } } -#endif /* defined (BFD_ASSEMBLER) || !defined (BFD) */ +#endif /* defined (BFD_ASSEMBLER) || !defined (BFD) */ #ifdef BFD_ASSEMBLER static void -relax_and_size_seg (abfd, sec, xxx) +relax_seg (abfd, sec, do_code) + bfd *abfd; + asection *sec; + PTR do_code; +{ + flagword flags = bfd_get_section_flags (abfd, sec); + segment_info_type *seginfo = seg_info (sec); + + if (!(flags & SEC_CODE) == !do_code + && seginfo && seginfo->frchainP) + relax_segment (seginfo->frchainP->frch_root, sec); +} + +static void +size_seg (abfd, sec, xxx) bfd *abfd; asection *sec; PTR xxx ATTRIBUTE_UNUSED; @@ -589,23 +621,23 @@ relax_and_size_seg (abfd, sec, xxx) subseg_change (sec, 0); - flags = bfd_get_section_flags (abfd, sec); - seginfo = seg_info (sec); if (seginfo && seginfo->frchainP) { - relax_segment (seginfo->frchainP->frch_root, sec); for (fragp = seginfo->frchainP->frch_root; fragp; fragp = fragp->fr_next) cvt_frag_to_fill (sec, fragp); for (fragp = seginfo->frchainP->frch_root; fragp->fr_next; fragp = fragp->fr_next) - /* walk to last elt */; + /* Walk to last elt. */ + ; size = fragp->fr_address + fragp->fr_fix; } else size = 0; + flags = bfd_get_section_flags (abfd, sec); + if (size > 0 && ! seginfo->bss) flags |= SEC_HAS_CONTENTS; @@ -697,7 +729,8 @@ adjust_reloc_syms (abfd, sec, xxx) for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next) if (fixp->fx_done) - /* ignore it */; + /* Ignore it. */ + ; else if (fixp->fx_addsy) { symbolS *sym; @@ -716,7 +749,7 @@ adjust_reloc_syms (abfd, sec, xxx) table. */ if (sym != NULL) resolve_symbol_value (sym, 1); - + if (fixp->fx_subsy != NULL) resolve_symbol_value (fixp->fx_subsy, 1); @@ -740,7 +773,7 @@ adjust_reloc_syms (abfd, sec, xxx) if (symsec == NULL) abort (); - + if (bfd_is_abs_section (symsec)) { /* The fixup_segment routine will not use this symbol in a @@ -856,7 +889,7 @@ adjust_reloc_syms (abfd, sec, xxx) We refetch the segment when calling section_symbol, rather than using symsec, because S_GET_VALUE may wind up changing - the section when it calls resolve_symbol_value. */ + the section when it calls resolve_symbol_value. */ fixp->fx_offset += S_GET_VALUE (sym); fixp->fx_addsy = section_symbol (S_GET_SEGMENT (sym)); symbol_mark_used_in_reloc (fixp->fx_addsy); @@ -868,7 +901,7 @@ adjust_reloc_syms (abfd, sec, xxx) done: ; } -#if 1/*def RELOC_REQUIRES_SYMBOL*/ +#if 1 /* def RELOC_REQUIRES_SYMBOL */ else { /* There was no symbol required by this relocation. However, @@ -877,7 +910,9 @@ adjust_reloc_syms (abfd, sec, xxx) a local symbol in the absolute section. */ fixp->fx_addsy = section_symbol (absolute_section); -/* fixp->fx_addsy->sy_used_in_reloc = 1; */ +#if 0 + fixp->fx_addsy->sy_used_in_reloc = 1; +#endif } #endif @@ -891,7 +926,7 @@ write_relocs (abfd, sec, xxx) PTR xxx ATTRIBUTE_UNUSED; { segment_info_type *seginfo = seg_info (sec); - int i; + unsigned int i; unsigned int n; arelent **relocs; fixS *fixp; @@ -911,7 +946,7 @@ write_relocs (abfd, sec, xxx) #ifndef RELOC_EXPANSION_POSSIBLE /* Set up reloc information as well. */ relocs = (arelent **) xmalloc (n * sizeof (arelent *)); - memset ((char*)relocs, 0, n * sizeof (arelent*)); + memset ((char *) relocs, 0, n * sizeof (arelent *)); i = 0; for (fixp = seginfo->fix_root; fixp != (fixS *) NULL; fixp = fixp->fx_next) @@ -1000,7 +1035,7 @@ write_relocs (abfd, sec, xxx) } /* If this is an undefined symbol which was equated to another - symbol, then use generate the reloc against the latter symbol + symbol, then generate the reloc against the latter symbol rather than the former. */ sym = fixp->fx_addsy; while (symbol_equated_p (sym) @@ -1012,8 +1047,8 @@ write_relocs (abfd, sec, xxx) for (j = 0; reloc[j]; j++) { - relocs[i++] = reloc[j]; - assert(i <= n); + relocs[i++] = reloc[j]; + assert (i <= n); } data = fixp->fx_frag->fr_literal + fixp->fx_where; if (fixp->fx_where + fixp->fx_size @@ -1021,12 +1056,12 @@ write_relocs (abfd, sec, xxx) as_bad_where (fixp->fx_file, fixp->fx_line, _("internal error: fixup not contained within frag")); for (j = 0; reloc[j]; j++) - { + { s = bfd_install_relocation (stdoutput, reloc[j], fixp->fx_frag->fr_literal, fixp->fx_frag->fr_address, sec, &err); - switch (s) + switch (s) { case bfd_reloc_ok: break; @@ -1038,7 +1073,7 @@ write_relocs (abfd, sec, xxx) as_fatal (_("%s:%u: bad return from bfd_install_relocation"), fixp->fx_file, fixp->fx_line); } - } + } } n = i; #endif @@ -1101,7 +1136,7 @@ write_contents (abfd, sec, xxx) /* Write out the frags. */ if (seginfo == NULL - || ! (bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS)) + || !(bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS)) return; for (f = seginfo->frchainP->frch_root; @@ -1134,9 +1169,9 @@ write_contents (abfd, sec, xxx) if (fill_size && count) { char buf[256]; - if (fill_size > sizeof(buf)) + if (fill_size > sizeof (buf)) { - /* Do it the old way. Can this ever happen? */ + /* Do it the old way. Can this ever happen? */ while (count--) { x = bfd_set_section_contents (stdoutput, sec, @@ -1146,7 +1181,8 @@ write_contents (abfd, sec, xxx) if (x == false) { bfd_perror (stdoutput->filename); - as_perror (_("FATAL: Can't write %s"), stdoutput->filename); + as_perror (_("FATAL: Can't write %s"), + stdoutput->filename); exit (EXIT_FAILURE); } offset += fill_size; @@ -1166,16 +1202,16 @@ write_contents (abfd, sec, xxx) else { char *bufp; - n_per_buf = sizeof(buf)/fill_size; + n_per_buf = sizeof (buf) / fill_size; for (i = n_per_buf, bufp = buf; i; i--, bufp += fill_size) - memcpy(bufp, fill_literal, fill_size); + memcpy (bufp, fill_literal, fill_size); } for (; count > 0; count -= n_per_buf) { n_per_buf = n_per_buf > count ? count : n_per_buf; - x = bfd_set_section_contents (stdoutput, sec, - buf, (file_ptr) offset, - (bfd_size_type) n_per_buf * fill_size); + x = bfd_set_section_contents + (stdoutput, sec, buf, (file_ptr) offset, + (bfd_size_type) n_per_buf * fill_size); if (x != true) as_fatal (_("Cannot write to output file.")); offset += n_per_buf * fill_size; @@ -1214,7 +1250,7 @@ merge_data_into_text () data_fix_root = NULL; #endif } -#endif /* BFD_ASSEMBLER || (! BFD && ! OBJ_AOUT) */ +#endif /* BFD_ASSEMBLER || (! BFD && ! OBJ_AOUT) */ #if !defined (BFD_ASSEMBLER) && !defined (BFD) static void @@ -1225,30 +1261,27 @@ relax_and_size_all_segments () relax_segment (text_frag_root, SEG_TEXT); relax_segment (data_frag_root, SEG_DATA); relax_segment (bss_frag_root, SEG_BSS); - /* - * Now the addresses of frags are correct within the segment. - */ + /* Now the addresses of frags are correct within the segment. */ know (text_last_frag->fr_type == rs_fill && text_last_frag->fr_offset == 0); H_SET_TEXT_SIZE (&headers, text_last_frag->fr_address); text_last_frag->fr_address = H_GET_TEXT_SIZE (&headers); - /* - * Join the 2 segments into 1 huge segment. - * To do this, re-compute every rn_address in the SEG_DATA frags. - * Then join the data frags after the text frags. - * - * Determine a_data [length of data segment]. - */ + /* Join the 2 segments into 1 huge segment. + To do this, re-compute every rn_address in the SEG_DATA frags. + Then join the data frags after the text frags. + + Determine a_data [length of data segment]. */ if (data_frag_root) { register relax_addressT slide; - know ((text_last_frag->fr_type == rs_fill) && (text_last_frag->fr_offset == 0)); + know ((text_last_frag->fr_type == rs_fill) + && (text_last_frag->fr_offset == 0)); H_SET_DATA_SIZE (&headers, data_last_frag->fr_address); data_last_frag->fr_address = H_GET_DATA_SIZE (&headers); - slide = H_GET_TEXT_SIZE (&headers); /* & in file of the data segment. */ + slide = H_GET_TEXT_SIZE (&headers); /* & in file of the data segment. */ #ifdef OBJ_BOUT #define RoundUp(N,S) (((N)+(S)-1)&-(S)) /* For b.out: If the data section has a strict alignment @@ -1260,9 +1293,7 @@ relax_and_size_all_segments () #endif for (fragP = data_frag_root; fragP; fragP = fragP->fr_next) - { - fragP->fr_address += slide; - } /* for each data frag */ + fragP->fr_address += slide; know (text_last_frag != 0); text_last_frag->fr_next = data_frag_root; @@ -1283,21 +1314,19 @@ relax_and_size_all_segments () bss_vma = RoundUp (bss_vma, 1 << section_alignment[SEG_BSS]); bss_address_frag.fr_address = bss_vma; } -#else /* ! OBJ_BOUT */ +#else /* ! OBJ_BOUT */ bss_address_frag.fr_address = (H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers)); -#endif /* ! OBJ_BOUT */ +#endif /* ! OBJ_BOUT */ - /* Slide all the frags */ + /* Slide all the frags. */ if (bss_frag_root) { relax_addressT slide = bss_address_frag.fr_address; for (fragP = bss_frag_root; fragP; fragP = fragP->fr_next) - { - fragP->fr_address += slide; - } /* for each bss frag */ + fragP->fr_address += slide; } if (bss_last_frag) @@ -1306,7 +1335,7 @@ relax_and_size_all_segments () else H_SET_BSS_SIZE (&headers, 0); } -#endif /* ! BFD_ASSEMBLER && ! BFD */ +#endif /* ! BFD_ASSEMBLER && ! BFD */ #if defined (BFD_ASSEMBLER) || !defined (BFD) @@ -1348,6 +1377,20 @@ set_symtab () } #endif +#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32) +static void +set_segment_vma (abfd, sec, xxx) + bfd *abfd; + asection *sec; + PTR xxx ATTRIBUTE_UNUSED; +{ + static bfd_vma addr = 0; + + bfd_set_section_vma (abfd, sec, addr); + addr += bfd_section_size (abfd, sec); +} +#endif /* BFD_ASSEMBLER && OBJ_COFF && !TE_PE */ + /* Finish the subsegments. After every sub-segment, we fake an ".align ...". This conforms to BSD4.2 brane-damage. We then fake ".fill 0" because that is the kind of frag that requires least @@ -1369,21 +1412,31 @@ subsegs_finish () for (frchainP = frchain_root; frchainP; frchainP = frchainP->frch_next) { + int alignment; + subseg_set (frchainP->frch_seg, frchainP->frch_subseg); /* This now gets called even if we had errors. In that case, any alignment is meaningless, and, moreover, will look weird if we are generating a listing. */ - frag_align (had_errors () ? 0 : SUB_SEGMENT_ALIGN (now_seg), - subseg_text_p (now_seg) ? NOP_OPCODE : 0, - 0); + alignment = had_errors () ? 0 : SUB_SEGMENT_ALIGN (now_seg); + + /* The last subsegment gets an aligment corresponding to the + alignment of the section. This allows proper nop-filling + at the end of code-bearing sections. */ + if (!frchainP->frch_next || frchainP->frch_next->frch_seg != now_seg) + alignment = get_recorded_alignment (now_seg); + + if (subseg_text_p (now_seg)) + frag_align_code (alignment, 0); + else + frag_align (alignment, 0, 0); /* frag_align will have left a new frag. Use this last frag for an empty ".fill". For this segment ... Create a last frag. Do not leave a "being filled in frag". */ - frag_wane (frag_now); frag_now->fr_fix = 0; know (frag_now->fr_next == NULL); @@ -1396,7 +1449,7 @@ void write_object_file () { #if ! defined (BFD_ASSEMBLER) || ! defined (WORKING_DOT_WORD) - fragS *fragP; /* Track along all frags. */ + fragS *fragP; /* Track along all frags. */ #endif /* Do we really want to write it? */ @@ -1425,9 +1478,9 @@ write_object_file () #ifdef OBJ_VMS /* Under VMS we try to be compatible with VAX-11 "C". Thus, we call a routine to check for the definition of the procedure "_main", - and if so -- fix it up so that it can be program entry point. */ + and if so -- fix it up so that it can be program entry point. */ vms_check_for_main (); -#endif /* OBJ_VMS */ +#endif /* OBJ_VMS */ /* From now on, we don't care about sub-segments. Build one frag chain for each segment. Linked thru fr_next. */ @@ -1475,33 +1528,39 @@ write_object_file () #endif #ifdef BFD_ASSEMBLER - bfd_map_over_sections (stdoutput, relax_and_size_seg, (char *) 0); + bfd_map_over_sections (stdoutput, relax_seg, (char *) 1); + bfd_map_over_sections (stdoutput, relax_seg, (char *) 0); + bfd_map_over_sections (stdoutput, size_seg, (char *) 0); #else relax_and_size_all_segments (); -#endif /* BFD_ASSEMBLER */ +#endif /* BFD_ASSEMBLER */ + +#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32) + /* Now that the segments have their final sizes, run through the + sections and set their vma and lma. !BFD gas sets them, and BFD gas + should too. Currently, only DJGPP uses this code, but other + COFF targets may need to execute this too. */ + bfd_map_over_sections (stdoutput, set_segment_vma, (char *) 0); +#endif #ifndef BFD_ASSEMBLER - /* - * - * Crawl the symbol chain. - * - * For each symbol whose value depends on a frag, take the address of - * that frag and subsume it into the value of the symbol. - * After this, there is just one way to lookup a symbol value. - * Values are left in their final state for object file emission. - * We adjust the values of 'L' local symbols, even if we do - * not intend to emit them to the object file, because their values - * are needed for fix-ups. - * - * Unless we saw a -L flag, remove all symbols that begin with 'L' - * from the symbol chain. (They are still pointed to by the fixes.) - * - * Count the remaining symbols. - * Assign a symbol number to each symbol. - * Count the number of string-table chars we will emit. - * Put this info into the headers as appropriate. - * - */ + /* Crawl the symbol chain. + + For each symbol whose value depends on a frag, take the address of + that frag and subsume it into the value of the symbol. + After this, there is just one way to lookup a symbol value. + Values are left in their final state for object file emission. + We adjust the values of 'L' local symbols, even if we do + not intend to emit them to the object file, because their values + are needed for fix-ups. + + Unless we saw a -L flag, remove all symbols that begin with 'L' + from the symbol chain. (They are still pointed to by the fixes.) + + Count the remaining symbols. + Assign a symbol number to each symbol. + Count the number of string-table chars we will emit. + Put this info into the headers as appropriate. */ know (zero_address_frag.fr_address == 0); string_byte_count = sizeof (string_byte_count); @@ -1512,12 +1571,10 @@ write_object_file () H_SET_STRING_SIZE (&headers, string_byte_count); - /* - * Addresses of frags now reflect addresses we use in the object file. - * Symbol values are correct. - * Scan the frags, converting any ".org"s and ".align"s to ".fill"s. - * Also converting any machine-dependent frags using md_convert_frag(); - */ + /* Addresses of frags now reflect addresses we use in the object file. + Symbol values are correct. + Scan the frags, converting any ".org"s and ".align"s to ".fill"s. + Also converting any machine-dependent frags using md_convert_frag(); */ subseg_change (SEG_TEXT, 0); for (fragP = text_frag_root; fragP; fragP = fragP->fr_next) @@ -1542,7 +1599,7 @@ write_object_file () abort (); #endif } -#endif /* ! BFD_ASSEMBLER */ +#endif /* ! BFD_ASSEMBLER */ #ifndef WORKING_DOT_WORD { @@ -1563,8 +1620,8 @@ write_object_file () #ifdef BFD_ASSEMBLER #ifdef TC_CONS_FIX_NEW TC_CONS_FIX_NEW (lie->frag, - lie->word_goes_here - lie->frag->fr_literal, - 2, &exp); + lie->word_goes_here - lie->frag->fr_literal, + 2, &exp); #else fix_new_exp (lie->frag, lie->word_goes_here - lie->frag->fr_literal, @@ -1584,9 +1641,9 @@ write_object_file () fix_new_exp (lie->frag, lie->word_goes_here - lie->frag->fr_literal, 2, &exp, 0, 0); -#endif /* TC_NS32K */ -#endif /* TC_SPARC|TC_A29K|NEED_FX_R_TYPE */ -#endif /* BFD_ASSEMBLER */ +#endif /* TC_NS32K */ +#endif /* TC_SPARC|TC_A29K|NEED_FX_R_TYPE */ +#endif /* BFD_ASSEMBLER */ *prevP = lie->next_broken_word; } else @@ -1605,61 +1662,71 @@ write_object_file () /* Find out how many broken_words go here. */ n = 0; - for (untruth = lie; untruth && untruth->dispfrag == fragP; untruth = untruth->next_broken_word) + for (untruth = lie; + untruth && untruth->dispfrag == fragP; + untruth = untruth->next_broken_word) if (untruth->added == 1) n++; table_ptr = lie->dispfrag->fr_opcode; - table_addr = lie->dispfrag->fr_address + (table_ptr - lie->dispfrag->fr_literal); + table_addr = (lie->dispfrag->fr_address + + (table_ptr - lie->dispfrag->fr_literal)); /* Create the jump around the long jumps. This is a short jump from table_ptr+0 to table_ptr+n*long_jump_size. */ from_addr = table_addr; to_addr = table_addr + md_short_jump_size + n * md_long_jump_size; - md_create_short_jump (table_ptr, from_addr, to_addr, lie->dispfrag, lie->add); + md_create_short_jump (table_ptr, from_addr, to_addr, lie->dispfrag, + lie->add); table_ptr += md_short_jump_size; table_addr += md_short_jump_size; - for (m = 0; lie && lie->dispfrag == fragP; m++, lie = lie->next_broken_word) + for (m = 0; + lie && lie->dispfrag == fragP; + m++, lie = lie->next_broken_word) { if (lie->added == 2) continue; - /* Patch the jump table */ - /* This is the offset from ??? to table_ptr+0 */ + /* Patch the jump table. */ + /* This is the offset from ??? to table_ptr+0. */ to_addr = table_addr - S_GET_VALUE (lie->sub); #ifdef BFD_ASSEMBLER to_addr -= symbol_get_frag (lie->sub)->fr_address; #endif +#ifdef TC_CHECK_ADJUSTED_BROKEN_DOT_WORD + TC_CHECK_ADJUSTED_BROKEN_DOT_WORD (to_addr, lie); +#endif md_number_to_chars (lie->word_goes_here, to_addr, 2); - for (untruth = lie->next_broken_word; untruth && untruth->dispfrag == fragP; untruth = untruth->next_broken_word) + for (untruth = lie->next_broken_word; + untruth && untruth->dispfrag == fragP; + untruth = untruth->next_broken_word) { if (untruth->use_jump == lie) md_number_to_chars (untruth->word_goes_here, to_addr, 2); } - /* Install the long jump */ - /* this is a long jump from table_ptr+0 to the final target */ + /* Install the long jump. */ + /* This is a long jump from table_ptr+0 to the final target. */ from_addr = table_addr; to_addr = S_GET_VALUE (lie->add) + lie->addnum; #ifdef BFD_ASSEMBLER to_addr += symbol_get_frag (lie->add)->fr_address; #endif - md_create_long_jump (table_ptr, from_addr, to_addr, lie->dispfrag, lie->add); + md_create_long_jump (table_ptr, from_addr, to_addr, lie->dispfrag, + lie->add); table_ptr += md_long_jump_size; table_addr += md_long_jump_size; } } } -#endif /* not WORKING_DOT_WORD */ +#endif /* not WORKING_DOT_WORD */ #ifndef BFD_ASSEMBLER #ifndef OBJ_VMS - { /* not vms */ + { /* not vms */ char *the_object_file; long object_file_size; - /* - * Scan every FixS performing fixups. We had to wait until now to do - * this because md_convert_frag() may have made some fixSs. - */ + /* Scan every FixS performing fixups. We had to wait until now to + do this because md_convert_frag() may have made some fixSs. */ int trsize, drsize; subseg_change (SEG_TEXT, 0); @@ -1668,11 +1735,11 @@ write_object_file () drsize = md_reloc_size * fixup_segment (data_fix_root, SEG_DATA); H_SET_RELOCATION_SIZE (&headers, trsize, drsize); - /* FIXME move this stuff into the pre-write-hook */ + /* FIXME: Move this stuff into the pre-write-hook. */ H_SET_MAGIC_NUMBER (&headers, magic_number_for_object_file); H_SET_ENTRY_POINT (&headers, 0); - obj_pre_write_hook (&headers); /* extra coff stuff */ + obj_pre_write_hook (&headers); /* Extra coff stuff. */ object_file_size = H_GET_FILE_SIZE (&headers); next_object_file_charP = the_object_file = xmalloc (object_file_size); @@ -1681,11 +1748,10 @@ write_object_file () obj_header_append (&next_object_file_charP, &headers); - know ((next_object_file_charP - the_object_file) == H_GET_HEADER_SIZE (&headers)); + know ((next_object_file_charP - the_object_file) + == H_GET_HEADER_SIZE (&headers)); - /* - * Emit code. - */ + /* Emit code. */ for (fragP = text_frag_root; fragP; fragP = fragP->fr_next) { register long count; @@ -1694,78 +1760,91 @@ write_object_file () PROGRESS (1); know (fragP->fr_type == rs_fill); - append (&next_object_file_charP, fragP->fr_literal, (unsigned long) fragP->fr_fix); + append (&next_object_file_charP, fragP->fr_literal, + (unsigned long) fragP->fr_fix); fill_literal = fragP->fr_literal + fragP->fr_fix; fill_size = fragP->fr_var; know (fragP->fr_offset >= 0); for (count = fragP->fr_offset; count; count--) - { - append (&next_object_file_charP, fill_literal, (unsigned long) fill_size); - } /* for each */ - - } /* for each code frag. */ - - know ((next_object_file_charP - the_object_file) == (H_GET_HEADER_SIZE (&headers) + H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers))); + append (&next_object_file_charP, fill_literal, + (unsigned long) fill_size); + } - /* - * Emit relocations. - */ - obj_emit_relocations (&next_object_file_charP, text_fix_root, (relax_addressT) 0); - know ((next_object_file_charP - the_object_file) == (H_GET_HEADER_SIZE (&headers) + H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers) + H_GET_TEXT_RELOCATION_SIZE (&headers))); + know ((next_object_file_charP - the_object_file) + == (H_GET_HEADER_SIZE (&headers) + + H_GET_TEXT_SIZE (&headers) + + H_GET_DATA_SIZE (&headers))); + + /* Emit relocations. */ + obj_emit_relocations (&next_object_file_charP, text_fix_root, + (relax_addressT) 0); + know ((next_object_file_charP - the_object_file) + == (H_GET_HEADER_SIZE (&headers) + + H_GET_TEXT_SIZE (&headers) + + H_GET_DATA_SIZE (&headers) + + H_GET_TEXT_RELOCATION_SIZE (&headers))); #ifdef TC_I960 /* Make addresses in data relocation directives relative to beginning of - * first data fragment, not end of last text fragment: alignment of the - * start of the data segment may place a gap between the segments. - */ - obj_emit_relocations (&next_object_file_charP, data_fix_root, data0_frchainP->frch_root->fr_address); -#else /* TC_I960 */ - obj_emit_relocations (&next_object_file_charP, data_fix_root, text_last_frag->fr_address); -#endif /* TC_I960 */ - - know ((next_object_file_charP - the_object_file) == (H_GET_HEADER_SIZE (&headers) + H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers) + H_GET_TEXT_RELOCATION_SIZE (&headers) + H_GET_DATA_RELOCATION_SIZE (&headers))); - - /* - * Emit line number entries. - */ + first data fragment, not end of last text fragment: alignment of the + start of the data segment may place a gap between the segments. */ + obj_emit_relocations (&next_object_file_charP, data_fix_root, + data0_frchainP->frch_root->fr_address); +#else /* TC_I960 */ + obj_emit_relocations (&next_object_file_charP, data_fix_root, + text_last_frag->fr_address); +#endif /* TC_I960 */ + + know ((next_object_file_charP - the_object_file) + == (H_GET_HEADER_SIZE (&headers) + + H_GET_TEXT_SIZE (&headers) + + H_GET_DATA_SIZE (&headers) + + H_GET_TEXT_RELOCATION_SIZE (&headers) + + H_GET_DATA_RELOCATION_SIZE (&headers))); + + /* Emit line number entries. */ OBJ_EMIT_LINENO (&next_object_file_charP, lineno_rootP, the_object_file); - know ((next_object_file_charP - the_object_file) == (H_GET_HEADER_SIZE (&headers) + H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers) + H_GET_TEXT_RELOCATION_SIZE (&headers) + H_GET_DATA_RELOCATION_SIZE (&headers) + H_GET_LINENO_SIZE (&headers))); - - /* - * Emit symbols. - */ + know ((next_object_file_charP - the_object_file) + == (H_GET_HEADER_SIZE (&headers) + + H_GET_TEXT_SIZE (&headers) + + H_GET_DATA_SIZE (&headers) + + H_GET_TEXT_RELOCATION_SIZE (&headers) + + H_GET_DATA_RELOCATION_SIZE (&headers) + + H_GET_LINENO_SIZE (&headers))); + + /* Emit symbols. */ obj_emit_symbols (&next_object_file_charP, symbol_rootP); - know ((next_object_file_charP - the_object_file) == (H_GET_HEADER_SIZE (&headers) + H_GET_TEXT_SIZE (&headers) + H_GET_DATA_SIZE (&headers) + H_GET_TEXT_RELOCATION_SIZE (&headers) + H_GET_DATA_RELOCATION_SIZE (&headers) + H_GET_LINENO_SIZE (&headers) + H_GET_SYMBOL_TABLE_SIZE (&headers))); - - /* - * Emit strings. - */ - + know ((next_object_file_charP - the_object_file) + == (H_GET_HEADER_SIZE (&headers) + + H_GET_TEXT_SIZE (&headers) + + H_GET_DATA_SIZE (&headers) + + H_GET_TEXT_RELOCATION_SIZE (&headers) + + H_GET_DATA_RELOCATION_SIZE (&headers) + + H_GET_LINENO_SIZE (&headers) + + H_GET_SYMBOL_TABLE_SIZE (&headers))); + + /* Emit strings. */ if (string_byte_count > 0) - { - obj_emit_strings (&next_object_file_charP); - } /* only if we have a string table */ + obj_emit_strings (&next_object_file_charP); #ifdef BFD_HEADERS bfd_seek (stdoutput, 0, 0); bfd_write (the_object_file, 1, object_file_size, stdoutput); #else - /* Write the data to the file */ + /* Write the data to the file. */ output_file_append (the_object_file, object_file_size, out_file_name); free (the_object_file); #endif - } /* non vms output */ -#else /* OBJ_VMS */ - /* - * Now do the VMS-dependent part of writing the object file - */ + } +#else /* OBJ_VMS */ + /* Now do the VMS-dependent part of writing the object file. */ vms_write_object_file (H_GET_TEXT_SIZE (&headers), H_GET_DATA_SIZE (&headers), H_GET_BSS_SIZE (&headers), text_frag_root, data_frag_root); -#endif /* OBJ_VMS */ -#else /* BFD_ASSEMBLER */ +#endif /* OBJ_VMS */ +#else /* BFD_ASSEMBLER */ /* Resolve symbol values. This needs to be done before processing the relocations. */ @@ -1787,7 +1866,7 @@ write_object_file () obj_frob_file_before_adjust (); #endif - bfd_map_over_sections (stdoutput, adjust_reloc_syms, (char *)0); + bfd_map_over_sections (stdoutput, adjust_reloc_syms, (char *) 0); /* Set up symbol table, and write it out. */ if (symbol_rootP) @@ -1811,7 +1890,8 @@ write_object_file () name = S_GET_NAME (symp); if (name) { - const char *name2 = decode_local_label_name ((char *)S_GET_NAME (symp)); + const char *name2 = + decode_local_label_name ((char *) S_GET_NAME (symp)); /* They only differ if `name' is a fb or dollar local label name. */ if (name2 != name && ! S_IS_DEFINED (symp)) @@ -1868,10 +1948,10 @@ write_object_file () && ! symbol_used_in_reloc_p (symp))) { symbol_remove (symp, &symbol_rootP, &symbol_lastP); + /* After symbol_remove, symbol_next(symp) still returns the one that came after it in the chain. So we don't need to do any extra cleanup work here. */ - continue; } @@ -1925,22 +2005,9 @@ write_object_file () #endif bfd_map_over_sections (stdoutput, write_contents, (char *) 0); -#endif /* BFD_ASSEMBLER */ +#endif /* BFD_ASSEMBLER */ } -#endif /* ! BFD */ - -/* - * relax_segment() - * - * Now we have a segment, not a crowd of sub-segments, we can make fr_address - * values. - * - * Relax the frags. - * - * After this, all frags in this segment have addresses that are correct - * within the segment. Since segments live in different file addresses, - * these frag addresses may not be the same as final object-file addresses. - */ +#endif /* ! BFD */ #ifdef TC_GENERIC_RELAX_TABLE @@ -1994,7 +2061,7 @@ relax_frag (fragP, stretch) #endif know (!(S_GET_SEGMENT (symbolP) == absolute_section) || symbolP->sy_frag == &zero_address_frag); - target += S_GET_VALUE (symbolP) + symbol_get_frag (symbolP)->fr_address; + target += S_GET_VALUE (symbolP) + symbol_get_frag (symbolP)->fr_address; /* If frag has yet to be reached on this pass, assume it will move by STRETCH just as we did. @@ -2014,26 +2081,28 @@ relax_frag (fragP, stretch) aim = target - address - fragP->fr_fix; #ifdef TC_PCREL_ADJUST - /* Currently only the ns32k family needs this */ - aim += TC_PCREL_ADJUST(fragP); -/*#else*/ + /* Currently only the ns32k family needs this. */ + aim += TC_PCREL_ADJUST (fragP); +/* #else */ /* This machine doesn't want to use pcrel_adjust. In that case, pcrel_adjust should be zero. */ -/* assert (fragP->fr_targ.ns32k.pcrel_adjust == 0);*/ +#if 0 + assert (fragP->fr_targ.ns32k.pcrel_adjust == 0); +#endif #endif -#ifdef md_prepare_relax_scan /* formerly called M68K_AIM_KLUDGE */ +#ifdef md_prepare_relax_scan /* formerly called M68K_AIM_KLUDGE */ md_prepare_relax_scan (fragP, address, aim, this_state, this_type); #endif if (aim < 0) { - /* Look backwards. */ + /* Look backwards. */ for (next_state = this_type->rlx_more; next_state;) if (aim >= this_type->rlx_backward) next_state = 0; else { - /* Grow to next state. */ + /* Grow to next state. */ this_state = next_state; this_type = table + this_state; next_state = this_type->rlx_more; @@ -2041,13 +2110,13 @@ relax_frag (fragP, stretch) } else { - /* Look forwards. */ + /* Look forwards. */ for (next_state = this_type->rlx_more; next_state;) if (aim <= this_type->rlx_forward) next_state = 0; else { - /* Grow to next state. */ + /* Grow to next state. */ this_state = next_state; this_type = table + this_state; next_state = this_type->rlx_more; @@ -2060,14 +2129,14 @@ relax_frag (fragP, stretch) return growth; } -#endif /* defined (TC_GENERIC_RELAX_TABLE) */ +#endif /* defined (TC_GENERIC_RELAX_TABLE) */ /* Relax_align. Advance location counter to next address that has 'alignment' lowest order bits all 0s, return size of adjustment made. */ static relax_addressT relax_align (address, alignment) - register relax_addressT address; /* Address now. */ - register int alignment; /* Alignment (binary). */ + register relax_addressT address; /* Address now. */ + register int alignment; /* Alignment (binary). */ { relax_addressT mask; relax_addressT new_address; @@ -2083,6 +2152,16 @@ relax_align (address, alignment) return (new_address - address); } +/* Now we have a segment, not a crowd of sub-segments, we can make + fr_address values. + + Relax the frags. + + After this, all frags in this segment have addresses that are correct + within the segment. Since segments live in different file addresses, + these frag addresses may not be the same as final object-file + addresses. */ + void relax_segment (segment_frag_root, segment) struct frag *segment_frag_root; @@ -2093,7 +2172,7 @@ relax_segment (segment_frag_root, segment) #if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER) know (segment == SEG_DATA || segment == SEG_TEXT || segment == SEG_BSS); #endif - /* In case md_estimate_size_before_relax() wants to make fixSs. */ + /* In case md_estimate_size_before_relax() wants to make fixSs. */ subseg_change (segment, 0); /* For each frag in segment: count and store (a 1st guess of) @@ -2112,6 +2191,7 @@ relax_segment (segment_frag_root, segment) case rs_align: case rs_align_code: + case rs_align_test: { addressT offset = relax_align (address, (int) fragP->fr_offset); @@ -2139,13 +2219,13 @@ relax_segment (segment_frag_root, segment) break; #ifndef WORKING_DOT_WORD - /* Broken words don't concern us yet */ + /* Broken words don't concern us yet. */ case rs_broken_word: break; #endif case rs_leb128: - /* Initial guess is always 1; doing otherwise can result in + /* Initial guess is always 1; doing otherwise can result in stable solutions that are larger than the minimum. */ address += fragP->fr_offset = 1; break; @@ -2154,19 +2234,22 @@ relax_segment (segment_frag_root, segment) address += eh_frame_estimate_size_before_relax (fragP); break; + case rs_dwarf2dbg: + address += dwarf2dbg_estimate_size_before_relax (fragP); + break; + default: BAD_CASE (fragP->fr_type); break; - } /* switch(fr_type) */ - } /* for each frag in the segment */ + } + } /* Do relax(). */ { - long stretch; /* May be any size, 0 or negative. */ - /* Cumulative number of addresses we have */ - /* relaxed this pass. */ - /* We may have relaxed more than one address. */ - long stretched; /* Have we stretched on this pass? */ + long stretch; /* May be any size, 0 or negative. */ + /* Cumulative number of addresses we have relaxed this pass. + We may have relaxed more than one address. */ + long stretched; /* Have we stretched on this pass? */ /* This is 'cuz stretch may be zero, when, in fact some piece of code grew, and another shrank. If a branch instruction doesn't fit anymore, we could be scrod. */ @@ -2174,6 +2257,7 @@ relax_segment (segment_frag_root, segment) do { stretch = stretched = 0; + for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next) { long growth = 0; @@ -2188,7 +2272,7 @@ relax_segment (segment_frag_root, segment) switch (fragP->fr_type) { - case rs_fill: /* .fill never relaxes. */ + case rs_fill: /* .fill never relaxes. */ growth = 0; break; @@ -2253,10 +2337,11 @@ relax_segment (segment_frag_root, segment) } break; - } /* case rs_broken_word */ + } /* case rs_broken_word */ #endif case rs_align: case rs_align_code: + case rs_align_test: { addressT oldoff, newoff; @@ -2295,7 +2380,7 @@ relax_segment (segment_frag_root, segment) #endif target += (S_GET_VALUE (symbolP) + symbol_get_frag (symbolP)->fr_address); - } /* if we have a symbol */ + } /* if we have a symbol */ know (fragP->fr_next); after = fragP->fr_next->fr_address; @@ -2304,7 +2389,7 @@ relax_segment (segment_frag_root, segment) { /* Growth may be negative, but variable part of frag cannot have fewer than 0 chars. That is, we can't - .org backwards. */ + .org backwards. */ as_bad_where (fragP->fr_file, fragP->fr_line, _("attempt to .org backwards ignored")); @@ -2317,7 +2402,8 @@ relax_segment (segment_frag_root, segment) growth = stretch; } - growth -= stretch; /* This is an absolute growth factor */ + /* This is an absolute growth factor */ + growth -= stretch; break; } @@ -2349,7 +2435,7 @@ relax_segment (segment_frag_root, segment) /* The default way to relax a frag is to look through TC_GENERIC_RELAX_TABLE. */ growth = relax_frag (fragP, stretch); -#endif /* TC_GENERIC_RELAX_TABLE */ +#endif /* TC_GENERIC_RELAX_TABLE */ #endif break; @@ -2369,6 +2455,10 @@ relax_segment (segment_frag_root, segment) growth = eh_frame_relax_frag (fragP); break; + case rs_dwarf2dbg: + growth = dwarf2dbg_relax_frag (fragP); + break; + default: BAD_CASE (fragP->fr_type); break; @@ -2378,20 +2468,16 @@ relax_segment (segment_frag_root, segment) stretch += growth; stretched++; } - } /* For each frag in the segment. */ + } /* For each frag in the segment. */ } - while (stretched); /* Until nothing further to relax. */ - } /* do_relax */ + while (stretched); /* Until nothing further to relax. */ + } /* do_relax */ - /* - * We now have valid fr_address'es for each frag. - */ + /* We now have valid fr_address'es for each frag. */ - /* - * All fr_address's are correct, relative to their own segment. - * We have made all the fixS we will ever make. - */ -} /* relax_segment() */ + /* All fr_address's are correct, relative to their own segment. + We have made all the fixS we will ever make. */ +} #if defined (BFD_ASSEMBLER) || (!defined (BFD) && !defined (OBJ_VMS)) @@ -2413,7 +2499,7 @@ relax_segment (segment_frag_root, segment) static long fixup_segment (fixP, this_segment_type) register fixS *fixP; - segT this_segment_type; /* N_TYPE bits for segment. */ + segT this_segment_type; /* N_TYPE bits for segment. */ { long seg_reloc_count = 0; symbolS *add_symbolP; @@ -2433,7 +2519,7 @@ fixup_segment (fixP, this_segment_type) i960 (the only machine for which we've got a relaxing linker right now), we might be able to turn callx/callj into bal anyways in cases where we know the maximum displacement. */ - if (linkrelax) + if (linkrelax && TC_LINKRELAX_FIXUP (this_segment_type)) { for (; fixP; fixP = fixP->fx_next) seg_reloc_count++; @@ -2443,13 +2529,11 @@ fixup_segment (fixP, this_segment_type) for (; fixP; fixP = fixP->fx_next) { - #ifdef DEBUG5 fprintf (stderr, "\nprocessing fixup:\n"); print_fixup (fixP); #endif - fragP = fixP->fx_frag; know (fragP); where = fixP->fx_where; @@ -2489,7 +2573,7 @@ fixup_segment (fixP, this_segment_type) fixP->fx_addsy = NULL; } - /* It's just -sym */ + /* It's just -sym. */ if (S_GET_SEGMENT (sub_symbolP) == absolute_section) { add_number -= S_GET_VALUE (sub_symbolP); @@ -2512,19 +2596,19 @@ fixup_segment (fixP, this_segment_type) { /* Difference of 2 symbols from same segment. Can't make difference of 2 undefineds: 'value' means - something different for N_UNDF. */ + something different for N_UNDF. */ #ifdef TC_I960 /* Makes no sense to use the difference of 2 arbitrary symbols as the target of a call instruction. */ if (fixP->fx_tcbit) as_bad_where (fixP->fx_file, fixP->fx_line, _("callj to difference of 2 symbols")); -#endif /* TC_I960 */ +#endif /* TC_I960 */ add_number += S_GET_VALUE (add_symbolP) - S_GET_VALUE (sub_symbolP); add_symbolP = NULL; - pcrel = 0; /* No further pcrel processing. */ + pcrel = 0; /* No further pcrel processing. */ /* Let the target machine make the final determination as to whether or not a relocation will be needed to @@ -2538,7 +2622,7 @@ fixup_segment (fixP, this_segment_type) } else { - /* Different segments in subtraction. */ + /* Different segments in subtraction. */ know (!(S_IS_EXTERNAL (sub_symbolP) && (S_GET_SEGMENT (sub_symbolP) == absolute_section))); @@ -2547,9 +2631,11 @@ fixup_segment (fixP, this_segment_type) #ifdef DIFF_EXPR_OK else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type -#if 0 /* Do this even if it's already described as pc-relative. For example, - on the m68k, an operand of "pc@(foo-.-2)" should address "foo" in a - pc-relative mode. */ +#if 0 + /* Do this even if it's already described as + pc-relative. For example, on the m68k, an + operand of "pc@(foo-.-2)" should address + "foo" in a pc-relative mode. */ && pcrel #endif ) @@ -2599,23 +2685,22 @@ fixup_segment (fixP, this_segment_type) if (add_symbol_segment == this_segment_type && pcrel && !plt && TC_RELOC_RTSYM_LOC_FIXUP (fixP)) { - /* - * This fixup was made when the symbol's segment was - * SEG_UNKNOWN, but it is now in the local segment. - * So we know how to do the address without relocation. - */ + /* This fixup was made when the symbol's segment was + SEG_UNKNOWN, but it is now in the local segment. + So we know how to do the address without relocation. */ #ifdef TC_I960 /* reloc_callj() may replace a 'call' with a 'calls' or a 'bal', in which cases it modifies *fixP as appropriate. In the case of a 'calls', no further work is required, and *fixP has been set up to make the rest of the code - below a no-op. */ + below a no-op. */ reloc_callj (fixP); -#endif /* TC_I960 */ +#endif /* TC_I960 */ add_number += S_GET_VALUE (add_symbolP); add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment_type); - pcrel = 0; /* Lie. Don't want further pcrel processing. */ + /* Lie. Don't want further pcrel processing. */ + pcrel = 0; /* Let the target machine make the final determination as to whether or not a relocation will be needed to @@ -2634,7 +2719,7 @@ fixup_segment (fixP, this_segment_type) #ifdef TC_I960 /* See comment about reloc_callj() above. */ reloc_callj (fixP); -#endif /* TC_I960 */ +#endif /* TC_I960 */ add_number += S_GET_VALUE (add_symbolP); /* Let the target machine make the final determination @@ -2657,40 +2742,30 @@ fixup_segment (fixP, this_segment_type) if ((int) fixP->fx_bit_fixP == 13) { /* This is a COBR instruction. They have only a - * 13-bit displacement and are only to be used - * for local branches: flag as error, don't generate - * relocation. - */ + 13-bit displacement and are only to be used + for local branches: flag as error, don't generate + relocation. */ as_bad_where (fixP->fx_file, fixP->fx_line, _("can't use COBR format with external label")); fixP->fx_addsy = NULL; fixP->fx_done = 1; continue; - } /* COBR */ -#endif /* TC_I960 */ + } /* COBR. */ +#endif /* TC_I960 */ #ifdef OBJ_COFF #ifdef TE_I386AIX if (S_IS_COMMON (add_symbolP)) add_number += S_GET_VALUE (add_symbolP); -#endif /* TE_I386AIX */ -#endif /* OBJ_COFF */ +#endif /* TE_I386AIX */ +#endif /* OBJ_COFF */ ++seg_reloc_count; } else { seg_reloc_count++; -#if !(defined (TC_V850) && defined (OBJ_ELF)) -#if !(defined (TC_M68K) && defined (OBJ_ELF)) -#if !(defined (TC_ARM) && defined (OBJ_ELF)) -#if !(defined (TC_I960) && defined (OBJ_ELF)) -#if !defined (TC_I386) || !(defined (OBJ_ELF) || defined (OBJ_COFF)) || defined (TE_PE) - add_number += S_GET_VALUE (add_symbolP); -#endif -#endif -#endif -#endif -#endif + if (TC_FIX_ADJUSTABLE (fixP)) + add_number += S_GET_VALUE (add_symbolP); } } } @@ -2738,7 +2813,7 @@ fixup_segment (fixP, this_segment_type) valueT mask; mask = 0; - mask--; /* set all bits to one */ + mask--; /* Set all bits to one. */ mask <<= size * 8 - (fixP->fx_signed ? 1 : 0); if ((add_number & mask) != 0 && (add_number & mask) != mask) { @@ -2751,7 +2826,7 @@ fixup_segment (fixP, this_segment_type) as_bad_where (fixP->fx_file, fixP->fx_line, _("Value of %s too large for field of %d bytes at %s"), buf2, size, buf); - } /* generic error checking */ + } /* Generic error checking. */ } #ifdef WARN_SIGNED_OVERFLOW_WORD /* Warn if a .word value is too large when treated as a signed @@ -2765,7 +2840,7 @@ fixup_segment (fixP, this_segment_type) (long) add_number, (unsigned long) (fragP->fr_address + where)); #endif - } /* not a bit fix */ + } /* Not a bit fix. */ #ifdef TC_VALIDATE_FIX skip: ATTRIBUTE_UNUSED_LABEL @@ -2775,7 +2850,7 @@ fixup_segment (fixP, this_segment_type) fprintf (stderr, "result:\n"); print_fixup (fixP); #endif - } /* For each fixS in this segment. */ + } /* For each fixS in this segment. */ TC_ADJUST_RELOC_COUNT (fixP, seg_reloc_count); return seg_reloc_count; @@ -2820,7 +2895,7 @@ write_print_statistics (file) fprintf (file, "fixups: %d\n", n_fixups); } -/* for debugging */ +/* For debugging. */ extern int indent_level; void @@ -2873,5 +2948,3 @@ print_fixup (fixp) TC_FIX_DATA_PRINT (stderr, fixp); #endif } - -/* end of write.c */ diff --git a/contrib/binutils/gas/write.h b/contrib/binutils/gas/write.h index 186d2ad..9872e9d 100644 --- a/contrib/binutils/gas/write.h +++ b/contrib/binutils/gas/write.h @@ -1,5 +1,6 @@ /* write.h - Copyright (C) 1987, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -95,13 +96,13 @@ struct fix /* Where is the first byte to fix up? */ long fx_where; - /* NULL or Symbol whose value we add in. */ + /* NULL or Symbol whose value we add in. */ symbolS *fx_addsy; - /* NULL or Symbol whose value we subtract. */ + /* NULL or Symbol whose value we subtract. */ symbolS *fx_subsy; - /* Absolute number we add in. */ + /* Absolute number we add in. */ valueT fx_offset; /* Next fixS in linked list, or NULL. */ @@ -160,13 +161,13 @@ typedef struct fix fixS; extern char *next_object_file_charP; #ifndef MANY_SEGMENTS -COMMON fixS *text_fix_root, *text_fix_tail; /* Chains fixSs. */ -COMMON fixS *data_fix_root, *data_fix_tail; /* Chains fixSs. */ -COMMON fixS *bss_fix_root, *bss_fix_tail; /* Chains fixSs. */ -extern struct frag *text_last_frag; /* Last frag in segment. */ -extern struct frag *data_last_frag; /* Last frag in segment. */ +COMMON fixS *text_fix_root, *text_fix_tail; /* Chains fixSs. */ +COMMON fixS *data_fix_root, *data_fix_tail; /* Chains fixSs. */ +COMMON fixS *bss_fix_root, *bss_fix_tail; /* Chains fixSs. */ +extern struct frag *text_last_frag; /* Last frag in segment. */ +extern struct frag *data_last_frag; /* Last frag in segment. */ #endif -COMMON fixS **seg_fix_rootP, **seg_fix_tailP; /* -> one of above. */ +COMMON fixS **seg_fix_rootP, **seg_fix_tailP; /* -> one of above. */ #endif extern long string_byte_count; @@ -177,6 +178,7 @@ extern bit_fixS *bit_fix_new long max, long add)); extern void append PARAMS ((char **charPP, char *fromP, unsigned long length)); extern void record_alignment PARAMS ((segT seg, int align)); +extern int get_recorded_alignment PARAMS ((segT seg)); extern void subsegs_finish PARAMS ((void)); extern void write_object_file PARAMS ((void)); extern long relax_frag PARAMS ((fragS *, long)); @@ -205,4 +207,3 @@ extern fixS *fix_new_exp extern void write_print_statistics PARAMS ((FILE *)); #endif /* __write_h__ */ -/* end of write.h */ |