summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/gas
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-09-06 22:57:45 +0000
committerjdp <jdp@FreeBSD.org>1998-09-06 22:57:45 +0000
commiteffee09f856ecc81feb91290459a2cda49d20287 (patch)
tree5c46ac1ee102130859f788aeb927e8086985cfe7 /contrib/binutils/gas
parent31cb88078db5bdc51eb451c5a61e31a426fb8ae6 (diff)
downloadFreeBSD-src-effee09f856ecc81feb91290459a2cda49d20287.zip
FreeBSD-src-effee09f856ecc81feb91290459a2cda49d20287.tar.gz
Import GNU binutils-2.9.1. This will break things for a few minutes
until I've made the commits to resolve the conflicts. Submitted by: Doug Rabson <dfr>
Diffstat (limited to 'contrib/binutils/gas')
-rw-r--r--contrib/binutils/gas/CONTRIBUTORS26
-rw-r--r--contrib/binutils/gas/ChangeLog2183
-rw-r--r--contrib/binutils/gas/Makefile.am1549
-rw-r--r--contrib/binutils/gas/Makefile.in1688
-rw-r--r--contrib/binutils/gas/NEWS16
-rw-r--r--contrib/binutils/gas/README11
-rw-r--r--contrib/binutils/gas/acconfig.h24
-rw-r--r--contrib/binutils/gas/acinclude.m458
-rw-r--r--contrib/binutils/gas/aclocal.m4459
-rw-r--r--contrib/binutils/gas/app.c76
-rw-r--r--contrib/binutils/gas/as.c116
-rw-r--r--contrib/binutils/gas/as.h180
-rw-r--r--contrib/binutils/gas/atof-generic.c18
-rw-r--r--contrib/binutils/gas/cgen.c291
-rw-r--r--contrib/binutils/gas/cond.c16
-rw-r--r--contrib/binutils/gas/config.in145
-rw-r--r--contrib/binutils/gas/config/atof-ieee.c21
-rw-r--r--contrib/binutils/gas/config/obj-aout.c2
-rw-r--r--contrib/binutils/gas/config/obj-aout.h22
-rw-r--r--contrib/binutils/gas/config/obj-coff.c74
-rw-r--r--contrib/binutils/gas/config/obj-coff.h38
-rw-r--r--contrib/binutils/gas/config/obj-elf.c58
-rw-r--r--contrib/binutils/gas/config/obj-elf.h25
-rw-r--r--contrib/binutils/gas/config/obj-multi.h2
-rw-r--r--contrib/binutils/gas/config/tc-alpha.c332
-rw-r--r--contrib/binutils/gas/config/tc-alpha.h8
-rw-r--r--contrib/binutils/gas/config/tc-arc.c1481
-rw-r--r--contrib/binutils/gas/config/tc-arc.h71
-rw-r--r--contrib/binutils/gas/config/tc-i386.c323
-rw-r--r--contrib/binutils/gas/config/tc-i386.h15
-rw-r--r--contrib/binutils/gas/config/tc-sh.c233
-rw-r--r--contrib/binutils/gas/config/tc-sh.h9
-rw-r--r--contrib/binutils/gas/config/tc-tic30.c1909
-rw-r--r--contrib/binutils/gas/config/tc-tic30.h53
-rw-r--r--contrib/binutils/gas/config/tc-v850.c1902
-rw-r--r--contrib/binutils/gas/config/tc-v850.h80
-rw-r--r--contrib/binutils/gas/config/te-nbsd.h8
-rwxr-xr-xcontrib/binutils/gas/configure1619
-rw-r--r--contrib/binutils/gas/configure.in391
-rw-r--r--contrib/binutils/gas/depend.c208
-rw-r--r--contrib/binutils/gas/doc/Makefile.am43
-rw-r--r--contrib/binutils/gas/doc/Makefile.in475
-rw-r--r--contrib/binutils/gas/doc/all.texi4
-rw-r--r--contrib/binutils/gas/doc/as.111
-rw-r--r--contrib/binutils/gas/doc/as.texinfo260
-rw-r--r--contrib/binutils/gas/doc/c-i386.texi13
-rw-r--r--contrib/binutils/gas/doc/c-sh.texi19
-rw-r--r--contrib/binutils/gas/doc/c-v850.texi308
-rw-r--r--contrib/binutils/gas/doc/internals.texi42
-rw-r--r--contrib/binutils/gas/ecoff.c254
-rw-r--r--contrib/binutils/gas/ecoff.h6
-rw-r--r--contrib/binutils/gas/ehopt.c434
-rw-r--r--contrib/binutils/gas/expr.c200
-rw-r--r--contrib/binutils/gas/expr.h7
-rw-r--r--contrib/binutils/gas/frags.c24
-rw-r--r--contrib/binutils/gas/frags.h85
-rw-r--r--contrib/binutils/gas/gasp.c23
-rw-r--r--contrib/binutils/gas/hash.c6
-rw-r--r--contrib/binutils/gas/input-scrub.c25
-rw-r--r--contrib/binutils/gas/itbl-lex.l2
-rw-r--r--contrib/binutils/gas/listing.c352
-rw-r--r--contrib/binutils/gas/listing.h10
-rw-r--r--contrib/binutils/gas/macro.c113
-rw-r--r--contrib/binutils/gas/messages.c18
-rw-r--r--contrib/binutils/gas/output-file.c4
-rw-r--r--contrib/binutils/gas/read.c672
-rw-r--r--contrib/binutils/gas/read.h18
-rw-r--r--contrib/binutils/gas/stabs.c103
-rw-r--r--contrib/binutils/gas/stamp-h.in1
-rw-r--r--contrib/binutils/gas/subsegs.c2
-rw-r--r--contrib/binutils/gas/symbols.c322
-rw-r--r--contrib/binutils/gas/symbols.h2
-rw-r--r--contrib/binutils/gas/write.c153
-rw-r--r--contrib/binutils/gas/write.h3
74 files changed, 16965 insertions, 2789 deletions
diff --git a/contrib/binutils/gas/CONTRIBUTORS b/contrib/binutils/gas/CONTRIBUTORS
index 14ef05c..96d8775 100644
--- a/contrib/binutils/gas/CONTRIBUTORS
+++ b/contrib/binutils/gas/CONTRIBUTORS
@@ -52,9 +52,10 @@ code to support a.out format.
Support for the Zilog Z8k and Hitachi H8/300, H8/500 and SH processors
(tc-z8k, tc-h8300, tc-h8500, tc-sh), and IEEE 695 object file format
-(obj-ieee), was written by Steve Chamberlain of Cygnus Support. Steve
-also modified the COFF back end (obj-coffbfd) to use BFD for some
-low-level operations, for use with the Hitachi, 29k and Zilog targets.
+(obj-ieee), was written by Steve Chamberlain of Cygnus Solutions.
+Steve also modified the COFF back end (obj-coffbfd) to use BFD for
+some low-level operations, for use with the Hitachi, 29k and Zilog
+targets.
John Gilmore built the AMD 29000 support, added .include support, and
simplified the configuration of which versions accept which
@@ -64,7 +65,7 @@ synthetic instructions remained shrinkable (jbsr). John fixed many
bugs, including true tested cross-compilation support, and one bug in
relaxation that took a week and required the proverbial one-bit fix.
-Ian Lance Taylor of Cygnus Support merged the Motorola and MIT
+Ian Lance Taylor of Cygnus Solutions merged the Motorola and MIT
syntaxes for the 68k, completed support for some COFF targets (68k,
i386 SVR3, and SCO Unix), wrote the ECOFF support based on Michael
Meissner's mips-tfile program, wrote the PowerPC and RS/6000 support,
@@ -77,23 +78,26 @@ Steve Chamberlain made gas able to generate listings.
Support for the HP9000/300 was contributed by Glenn Engel of HP.
Support for ELF format files has been worked on by Mark Eichin of
-Cygnus Support (original, incomplete implementation), Pete Hoogenboom
-at the University of Utah (HPPA mainly), Michael Meissner of the Open
-Software Foundation (i386 mainly), and Ken Raeburn of Cygnus Support
-(sparc, initial 64-bit support).
+Cygnus Solutions (original, incomplete implementation), Pete
+Hoogenboom at the University of Utah (HPPA mainly), Michael Meissner
+of the Open Software Foundation (i386 mainly), and Ken Raeburn of
+Cygnus Solutions (sparc, initial 64-bit support).
-Several engineers at Cygnus Support have also provided many small bug
-fixes and configuration enhancements.
+Several engineers at Cygnus Solutions have also provided many small
+bug fixes and configuration enhancements.
The initial Alpha support was contributed by Carnegie-Mellon
University. Additional work was done by Ken Raeburn of Cygnus
-Support. Richard Henderson then rewrote much of the Alpha support.
+Solutions. Richard Henderson then rewrote much of the Alpha support.
Ian Dall updated the support code for the National Semiconductor 32000
series, and added support for Mach 3 and NetBSD running on the PC532.
Klaus Kaempf ported the assembler and the binutils to openVMS/Alpha.
+Steve Haworth contributed the support for the Texas Instruction c30
+(tms320c30).
+
Many others have contributed large or small bugfixes and enhancements. If
you've 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 aren't
diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog
index d513e07..a7e46aa 100644
--- a/contrib/binutils/gas/ChangeLog
+++ b/contrib/binutils/gas/ChangeLog
@@ -1,11 +1,1957 @@
+Mon Apr 27 13:45:04 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Set version number to 2.9.1.
+ * configure: Rebuild.
+
+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.
+
+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.
+
+Tue Apr 21 16:18:12 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/Makefile.am (as.dvi): New target.
+ * doc/Makefile.in: Rebuild.
+
+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>.
+
+Wed Apr 1 14:41:31 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 16:12:34 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.h, config/tc-i386.c: Revert March 24
+ LinearAddress patch.
+
+ * configure.in: Set version number to 2.9.
+ * configure: Rebuild.
+
+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.
+
+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 (PR15358). 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.
+
+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.
+
+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.
+
+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
+ for PR 14720.
+
+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.
+
+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: Fix PRs 14721, 14722, 14723, tidying 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 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.
+
+Wed Dec 31 12:29:47 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_relax_table): Correct branch ranges.
+
+Mon Dec 22 13:06:05 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.in (i386*-go32-rtems*): Fix to be the same as
+ i[3456]86-go32.
+ * configure: Rebuild.
+
+Mon Dec 22 12:54:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (macro): The 4650 doesn't permit M_LDC1_AB,
+ M_SDC1_AB, M_L_DOB, M_L_DAB, M_S_DAB, or M_S_DOB.
+ (mips_ip): Always check for FP_D, not just for instructions that
+ are not part of the regular ISA.
+
+Thu Dec 18 16:49:28 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-d10v.c (build_insn): Make `number' a long for 64-bit hosts.
+
+Thu Dec 18 16:42:57 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.c (cpu_types): 21164pc/pca56 does not have CIX.
+
+Wed Dec 17 21:23:07 1997 Jeffrey A Law (law@cygnus.com)
+
+ * expr.c (integer_constant 32bit bignum): Mask off bits outside
+ the range we care about.
+
+Tue Dec 16 09:20:43 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c: Prevent use of interworking support for
+ non-COFF targets.
+
+Mon Dec 15 15:20:32 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/all.texi: Add M32R cpu.
+
+ * doc/as.texinfo: Add documentation of m32r processor.
+
+ * 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
+ the instruction.
+
+Fri Dec 12 10:35:01 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-arm.texi (ARM Options): Document support for new ARM
+ processor names.
+
+ * config/tc-arm.c (md_parse_option): Add support for new ARM
+ processor names.
+
+Thu Dec 11 17:46:50 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Don't overwrite opcode table data.
+ (insop, m68k_ip): Make `opcode' const so it doesn't happen again.
+
+Fri Dec 5 11:23:59 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Fix BFD_RELOC_32 against a
+ symbol + offset.
+
+ * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Use
+ SHT_V850_{S|T|Z}COMMON to mark special common sections.
+
+Tue Dec 2 17:05:13 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c: Brought up to date with the branch.
+
+Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-sh.c (SWITCH_TABLE_CONS): Handle (fix)->fx_size == 1.
+ (SWITCH_TABLE): Handle BFD_RELOC_8.
+ (md_apply_fix): #ifndef BFD_ASSEMBLER code: Handle fixP->fx_size == 1.
+ (coff_reloc_map): Add BFD_RELOC_8_PCREL entry.
+ (sh_coff_reloc_mangle): SWITCH_TABLE case: Handle BFD_RELOC_8.
+
+Sat Nov 22 16:19:22 1997 Richard Henderson <rth@cygnus.com>
+
+ * tc-alpha.c (range_signed_16, range_signed_32): Work around an
+ apparent bug in gcc's long long support crossing from x86.
+
+Sat Nov 22 14:26:09 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c: Brought up to date with latest changes on arm
+ branch.
+
+Sat Nov 22 15:50:09 1997 Klaus Kaempf <kkaempf@progis.de>
+
+ * config-gas.com: Get version info from configure.in.
+
+ * makefile.vms: include depend.obj in OBJS.
+
+ * config/tc-alpha.c (s_alpha_section): Remove ".lcomm" handling.
+
+ * config/tc-alpha.c (alpha_basereg_clobbered): Remove variable and
+ all corresponding code.
+
+Thu Nov 20 15:06:08 1997 Richard Earnshaw <rearnsha@arm.com>
+
+ * config/tc-arm.h (TARGET_FORMAT for generic a.out targets): Allow
+ run-time endian selection.
+
+Wed Nov 19 17:44:42 1997 Richard Henderson <rth@cygnus.com>
+
+ * tc-sh.c (parse_reg): Properly quote for fv4.
+
+Wed Nov 19 23:46:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (resolve_symbol_value): Add missing breaks in case on
+ symbol value operator.
+
+Tue Nov 18 18:45:14 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-d10v.c (parallel_ok, find_opcode):
+ Split OPERAND_FLAG into OPERAND_FFLAG and OPERAND_CFLAG.
+
+Sun Nov 16 10:05:07 1997 Fred Fish <fnf@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Cast second arg of
+ md_apply_fix3 call to type "valueT *".
+
+Thu Nov 13 13:53:10 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (emulations): Make FreeBSD an aout / i386bsd
+ variant.
+ * configure: Re-generate.
+
+Thu Nov 13 11:07:14 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c (macro_build): Use the membership field
+ for INSN_MACRO's.
+ (mips_ip): Same.
+
+Thu Nov 13 02:04:55 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-d10v.c (find_opcode): For OPCODE_FAKE, add check for
+ first argument if it's supposed to be a register.
+
+Tue Nov 11 19:25:05 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * app.c (do_scrub_chars): If d10v, re-insert a space before
+ a '#' when in state 10.
+
+Tue Nov 11 13:33:15 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-h8300.c: Include "subsegs.h".
+ (tc_reloc_mangle): Handle references to symbols which are not
+ being output, so that references to `.' work.
+
+Mon Nov 10 13:43:33 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Call add_fix when needed for '_'
+ case.
+
+ * macro.c (sub_actual): If we don't find a parameter for an &,
+ just substitute &.
+
+Fri Nov 7 21:29:32 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-mips.c (mips_ip): In default case, call as_bad
+ instead of fprintf, to get "assembler messages:" message output
+ before instead of after.
+
+Fri Nov 7 10:36:22 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * frags.h: Handle multiple inclusion.
+
+Wed Nov 5 10:51:49 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ Based on a patch from Ian.Dall@dsto.defence.gov.au.
+ * as.h (struct frag, frag support): Moved from here.
+ * frags.h: To here.
+ (struct frag, member tc_frag_data): New member if TC_FRAG_TYPE
+ is defined.
+ (struct frag, member fr_cgen): Renamed from fr_targ.cgen.
+ * cgen.c (cgen_asm_finish_insn): Update.
+ * config/tc-m32r.c (md_estimate_size_before_relax): Update.
+ * config/tc-m32r.h (TC_FRAG_INIT): Renamed from md_init_frag.
+ (md_convert_frag): Ditto.
+ * config/tc-ns32k.h (TC_FRAG_TYPE): Define.
+ (frag_opcode_frag,frag_opcode_offset,frag_bsr): Update.
+ (TC_FRAG_INIT): Update.
+
+Tue Nov 4 16:35:57 1997 Ian Dall <Ian.Dall@dsto.defence.gov.au>
+
+ * write.c (print_fixup): Use TC_FIX_DATA_PRINT (if defined) to
+ print out MD fields of fix.
+ * frags.c (frag_var, frag_variant): Use TC_FRAG_INIT macro (if
+ defined) to initialize MD fields in frag.
+ * as.h (struct frag, ns32k support): Rename ns32k to fr_ns32k.
+ Delete pcrel_adjust. Add fr_opcode_fragP, fr_opcode_offset.
+ * config/tc-ns32k.h: Add comments. Remove obsolete
+ BFD_FAST_SECTION_FILL definition, change prototypes for
+ fix_new_ns32k and fix_new_ns32k_exp to add new arguments
+ opcode_frag and opcode_offset and remove pcrel_adjust.
+ (TC_FIX_TYPE): add opcode_fragP and opcode_offset fields.
+ (TC_FIX_DATA_PRINT): new macro to print out TC_FIX_TYPE.
+ (TC_FRAG_INIT): new macro to initialize machine dependent field in
+ frags.
+ (frag_opcode_frag, frag_opcode_offset, frag_bsr): macros to access
+ MD fields in frag structure.
+ (fix_im_disp, fix_bit_fixP, fix_opcode_frag, fix_opcode_offset,
+ fix_bsr): macros to access MD fields in fix structure.
+ * config/tc-ns32k.c: Avoid overlength lines. Align comments. Don't
+ use struct opcode_location as these fields are now in the frag
+ structure.
+ (convert_iif): Call frag_more as it is needed instead
+ of trying to allocate for the whole insn. Avoid call of frag_more
+ with negative argument.
+ (md_pcrel_adjust, md_fix_pcrel_adjust, md_apply_fix,
+ md_estimate_size_before_relax, md_pcrel_from,
+ tc_aout_fix_to_chars): use accessor macros to get md fields in fix
+ and frag structures.
+ (fix_new_ns32k, fix_new_ns32k_exp): add new arguments opcode_frag and
+ opcode_offset and remove pcrel_adjust.
+ (convert_iif, cons_fix_new_ns32k): call fix_new_ns32k,
+ fix_new_ns32k_exp with changed arguments.
+
+Mon Nov 3 13:30:17 1997 Gavin Koch <gavin@cygnus.com>
+
+ * tc-mips.c (md_begin): Reorganize setting of default values so
+ that mips_cpu depends on TARGET_CPU, and mips_opts.isa depends on
+ mips_cpu.
+ (md_parse_option): Remove all code that sets defaults; md_begin
+ handles all of this now.
+
+Sun Nov 2 14:46:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (STAGESTUFF): Change bin_PROGRAMS to
+ noinst_PROGRAMS.
+ (bootstrap, bootstrap2, bootstrap3): Likewise.
+ * Makefile.in: Rebuild.
+
+ * config/tc-ppc.c (ppc_fix_adjustable): Don't adjust relocs in the
+ TOC section to be against the csect.
+
+Fri Oct 31 18:19:55 1997 Ken Raeburn <raeburn@cygnus.com>
+
+ * config/tc-mips.c (validate_mips_insn): New function, checks
+ match versus mask bits, and also verifies that all bits to be
+ output are actually specified somewhere.
+ (md_begin): Call it for 32-bit instructions, instead of doing
+ match/mask check here. In case of failure, print a message, but
+ check the rest of the opcode table before exiting.
+
+Thu Oct 30 13:46:20 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_apply_fix3): Fix thumb ADR pseudo op. Patch
+ from Tony Thompson at ARM: athompso@arm.com
+
+Fri Oct 24 15:56:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (md_assemble): When handling @l, always sign
+ extend if the operand expects a signed value.
+
+ * config/tc-mips.h (LOCAL_LABELS_DOLLAR): Don't define; use
+ default which is to permit dollar labels.
+
+Fri Oct 24 11:19:22 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
+
+ * config/tc-sparc.c (sparc_memory_model): New variable.
+ (md_longopts): Add -TSO/-PSO/-RMO options.
+ (md_parse_options): Handle them.
+ (sparc_elf_final_processing): For 64 ELF, set required
+ memory ordering in e_flags. Default to RMO and let the user
+ override it through command line.
+
+ * config/tc-sparc.h (elf_tc_final_processing): Add.
+
+Wed Oct 22 17:42:12 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-sparc.c (v9a_asr_table): New variable.
+ (sparc_ip): Handle v9a asr's.
+ Patch from David Miller <davem@vger.rutgers.edu>.
+
+Wed Oct 22 17:22:59 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-sparc.h (md_do_align): New macro.
+ * config/tc-sparc.c (sparc_handle_align): Handle rs_align_code.
+ Patch from Jakub Jelinek <jj@sunsite.mff.cuni.cz>.
+
+Wed Oct 22 12:51:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (sh_small): New variable.
+ (OPTION_SMALL): Define.
+ (md_longopts): Add "small".
+ (md_parse_option): Handle OPTION_SMALL.
+ (md_show_usage): Mention -small.
+ * config/tc-sh.h (sh_small): Declare.
+ (SUB_SEGMENT_ALIGN): Handle sh_small.
+ * config/obj-coff.h (TARGET_FORMAT): Check sh_small in TC_SH
+ case.
+
+ * config/tc-mips.c (macro): Correct handling of constant in M_LI_D
+ case in little endian mode.
+
+Tue Oct 21 10:20:11 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * config/tc-sparc.c (md_apply_fix3, cases ..._H44, ..._HIX22): Leave
+ overflow signalling to linker.
+
+Mon Oct 20 14:54:06 1997 Klaus K"ampf <kkaempf@progis.de>
+
+ * makefile.vms: Fix for dec c.
+
+ * config-gas.com: Give explanation for dec c setup in error
+ message.
+
+ * config/tc-alpha.c (s_alpha_comm): Make .comm symbols separate
+ sections on openvms/alpha.
+
+ * config/obj-evax.c: support .weak pseudo-op
+
+Mon Oct 20 10:13:32 1997 Doug Evans <devans@canuck.cygnus.com>
+
+ * config/tc-sparc.c (default_arch_size): New static local.
+ (struct sparc_arch): Rename arch_size to default_arch_size.
+ New member user_option_p.
+ (sparc_arch_table): Always include v9, v9a. New entry v9-64.
+ (init_default_arch): Check whether default arch is valid.
+ Set default_arch_size in addition to sparc_arch_size.
+ (OPTION_32,OPTION_64): Define.
+ (md_longopts): New entries for -32, -64.
+ (md_parse_option): Handle them.
+ (md_show_usage): Print them. Ensure init_default_arch called.
+ * configure.in (sparc64): Set arch to v9-64.
+ * configure: Regenerated.
+
+Sun Oct 19 13:50:50 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (subsegs_finish): New function, broken out of
+ write_object_file.
+ (write_object_file): Some code moves into subsegs_finish.
+ * write.c (subsegs_finish): Declare.
+ * as.c (main): Call subsegs_finish.
+
+ * read.c (s_include): Check for error return from
+ demand_copy_string.
+
+Tue Oct 14 20:50:58 1997 Richard Henderson <rth@cygnus.com>
+
+ * read.c (get_line_sb): Accept any eol marker while scanning macros.
+
+Tue Oct 14 19:12:45 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.h (DIFF_EXPR_OK): Define.
+ * config/tc-i386.h (DIFF_EXPR_OK): Define.
+ * config/tc-alpha.c (md_apply_fix): Notice fx_pcrel and substitute
+ the correct relocation when it exists.
+ * config/tc-i386.c (md_apply_fix3): Likewise.
+
+ * config/tc-ppc.h: Correct typo in comment.
+ * config/tc-v850.h: Likewise.
+
+Fri Oct 10 16:09:35 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Allow parallel instruction issue
+ when second instruction is writing to first instructions inputs.
+
+Mon Oct 13 15:27:17 1997 Richard Henderson <rth@cygnus.com>
+
+ * ecoff.c (PAGE_SIZE): Double to 8k as a hack to allow some C++
+ templated programs to build with -g.
+
+Fri Oct 10 17:48:29 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_relax_table): Add support for relaxing
+ unconditional branches. This patch is courtesy of Jim Wilson.
+ (md_convert_frag): Fix relaxing of branches. This patch is
+ courtesy of Jim Wilson.
+ (md_assemble): Create different fixups for conditional and
+ unconditional branches. This patch is courtesy of Jim Wilson.
+ (md_estimate_size_before_relax): Estimate size of variable part of
+ fixup based on whether it is for a conditional or an unconditional
+ branch. This patch is courtesy of Jim Wilson.
+ (v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
+ v850_zbss, v850_rosdata, v850_rozdata, v850_bss): Add call to
+ obj_elf_section_change_hook().
+ (v850_comm): New function.
+ (md_pseudo_table): Add new pseudo ops .zcomm, .scomm and .tcomm.
+ (md_begin): Add bss flag to seg_info of bss sections.
+
+ Add support for .scommon, .tcommon and .zcommon sections.
+
+ * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Add .scommon,
+ .zcommon, .tbss, .call_table_data and .call_table_text.
+
+Fri Oct 10 15:01:14 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (sparc): Set DEFAULT_ARCH from correct target.
+ * configure: Regenerated.
+
+Fri Oct 10 11:22:45 1997 Martin M. Hunt <hunt@cygnus.com>
+
+ * config/tc-d10v.c: Fixes to make sure the AT_WORD
+ expression is not confused with -1.
+
+Fri Oct 10 11:54:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Flag SP as modified for @-sp
+ operand - OPERAND_ATMINUS.
+
+Fri Oct 10 00:47:44 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-d10v.c (parallel_ok): Note that auto increment and
+ decrement modify the index register.
+
+Thu Oct 9 15:17:50 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Robin Kirkham <Robin.Kirkham@mlb.dmt.csiro.au>:
+ * config/tc-m68k.c (archs): Add 68306, 68307, 68322, 68356, 68334,
+ 68336, 68341, 68349.
+ * doc/c-m68k.texi (M68K-Opts): Add -m68ec000 -m68hc000 -m68hc001
+ -m68306, -m68307, -m68322, -m68356, -m68ec020, -m68ec030,
+ -m68ec040, -m68ec060, -m68330, -m68334, -m68336, -m68341,
+ -m68349.
+
+ * doc/Makefile.am (CPU_DOCS): Define.
+ (as.info): Depend upon $(CPU_DOCS).
+ * doc/Makefile.in: Rebuild.
+
+ * configure.in: Remove AM_PROG_INSTALL; it's called by
+ AM_INIT_AUTOMAKE.
+ * configure: Rebuild.
+
+Thu Oct 9 01:44:36 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * tc-d10v.h (TC_START_LABEL): Don't define.
+ (tc_frob_label): Define.
+
+Thu Oct 9 00:07:23 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-d10v.c (write_2_short): Fix bug that wouldn't allow
+ to pair a branch and link with anything but an exe instruction.
+
+Wed Oct 8 16:28:53 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.c (load_expression): Disable the sym+const .got
+ optimization to reduce the alignment surprises for gcc.
+
+Wed Oct 8 16:11:15 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/obj-coff.h (TC_SPARC): Don't define TARGET_FORMAT.
+ * config/tc-sparc.c (sparc_target_format): Handle coff here.
+ (sparc_ip): Add %hix,%lox.
+ (md_apply_fix3): Call as_bad_where, not as_bad.
+ Add support for BFD_RELOC_SPARC_{HIX22,LOX10}.
+ (tc_gen_reloc): Add support for BFD_RELOC_SPARC_{HIX22,LOX10}.
+
+Wed Oct 8 12:33:32 1997 Richard Henderson <rth@cygnus.com>
+
+ * configure.in: Change alpha-*-* to alpha*-*-*; config.guess now
+ recognizes alphaev5 etc.
+ * configure: Rebuild.
+
+Wed Oct 8 00:04:05 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c (md_begin): Replace the TARGET_CPU value
+ of mipsr3900 with mipstx39.
+
+ * config/tc-mips.c (mips_ip): Don't print the 'opcode requires
+ -mipsXX message' if the insn isn't an ISA insn.
+
+Tue Oct 7 12:48:30 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.h (TARGET_FORMAT support): Moved to tc-sparc.c.
+ Redefine TARGET_FORMAT to call sparc_target_format.
+ * config/tc-sparc.c (in_unsigned_range): New function.
+ (sparc_arch_size): Make static.
+ (sparc_target_format): New function.
+ (sparc_ip): Delete variable immediate_max. Rewrite %hi/etc reloc
+ handling. Add support for %hh,%hm,%lm,%h44,%m44,%l44.
+ (output_insn): Set `fx_no_overflow'.
+ (md_apply_fix3): Handle BFD_RELOC_SPARC_{7,H44,M44,L44}.
+ (tc_gen_reloc): Likewise.
+
+Mon Oct 6 14:04:50 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_section): Remove.
+
+ * config/obj-elf.c (obj_elf_section): Enhance error message.
+
+Fri Oct 3 15:40:38 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c: Undef OBJ_COPY_SYMBOL_ATTRIBUTES before
+ including obj-elf.h in OBJ_MAYBE_ELF case.
+ (mips_target_format): Return NULL after abort to avoid warning.
+
+ * ecoff.c (generate_ecoff_stab): Remove unused static function.
+
+ * expr.c (operator): Accept ==. From Anders Blomdell
+ <anders.blomdell@control.lth.se>.
+
+ * config/atof-ieee.c (gen_to_words): When generating a denormal
+ number, handle an overflow into the smallest normalized number.
+
+Mon Sep 29 15:24:52 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * as.h, input-scrub.c (new_logical_line): New return value.
+ * read.c (s_app_file): Don't note the same file several times
+ in a row.
+
+Thu Sep 25 13:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Remove ` operand specifier.
+
+Wed Sep 24 16:54:40 1997 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.in (sh*-*-rtems*): New target, like sh-*-elf*.
+ * configure: Rebuild.
+
+Wed Sep 24 11:30:25 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Handle q and v operand specifiers.
+
+ * doc/c-i386.texi (i386-Float): Remove incorrect assertion that
+ fn* instructions do not insert implicit fwait. This was changed
+ Jan 29, 1996.
+
+ * config/m68k-parse.y (yylex): Permit an expression to be used for
+ the scale factor.
+
+ * Makefile.am (EXTRA_as_new_SOURCES): Set to config/m68k-parse.y,
+ not m68k-parse.y.
+ * Makefile.in: Rebuild.
+
+ * aclocal.m4: Rebuild with new libtool.
+ * configure: Rebuild.
+
+Tue Sep 23 17:48:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * app.c (do_scrub_chars): Clear mri_state at end of .mri
+ pseudo-op.
+
+ * config/tc-mips.c (hilo_interlocks): Change from a static
+ variable to a macro, so that it varies with the variables upon
+ which it depends.
+ (gpr_interlocks, cop_interlocks): Likewise.
+ (md_begin): Don't initialize them.
+
+Fri Sep 19 17:08:41 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Use strcasecomp instead
+ of strcmp where appropriate.
+
+Thu Sep 18 14:11:56 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Cope with a zero data area
+ relocation with a constant offset.
+ (md_assemble): Produce error message when special data area
+ relocations are used on instructions which do not support them.
+ (md_assemble): Reset processor mask if defined by command line
+ switch.
+
+Thu Sep 18 11:24:01 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.c: Reorganize file.
+ (parse_keyword_arg): Allow numbers in reg names.
+ (SPECIAL_CASE_NONE): New macro.
+ (md_assemble): Use it.
+ (lookup_arch,init_default_arch): New functions.
+ (default_arch,default_init_p,sparc_arch_table): New static locals.
+ (sparc_arch_size): New static local.
+ (max_architecture): Initialize in init_default_arch.
+ (md_parse_options): Call init_default_arch if necessary.
+ Rewrite -xarch/-A processing.
+ (md_show_usage): Print -A values from sparc_arch_table.
+ (md_begin): Call init_default_arch if necessary.
+ (sparc_md_end): Handle both 32 and 64 bit environments.
+ * config/tc-sparc.h (TARGET_FORMAT): Likewise.
+ * acconfig.h (SPARC_V9,SPARC_ARCH64): Delete.
+ (DEFAULT_ARCH): Add.
+ * config.in: Regenerate.
+ * configure.in (sparc): Default DEFAULT_ARCH based on target cpu.
+ (SPARC_V9,SPARC_ARCH64): Delete.
+ * configure: Regenerate.
+ * config/vms-conf.h (SPARC_V9,SPARC_ARCH64): Delete.
+
+Wed Sep 17 16:54:20 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_reloc_prefix): Recoded to use CHECK_ ()
+ macro.
+ (handle_tdaoff, handle_zdaoff, handle_sdaoff): New functions.
+
+Tue Sep 16 14:18:22 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_reloc_prefix): Add support for a 16 bit
+ displacement from the tiny data area pointer.
+
+Mon Sep 15 21:28:09 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (fix_new_hppa): Make declaration match
+ definition.
+
+Mon Sep 15 18:33:06 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (processor_mask): New variable.
+ (set_machine, md_parse_option): Set processor_mask.
+ (md_assemble): Check that instruction is available to target
+ processor.
+
+ * config/tc-v850.h (TARGET_PROCESSOR): New constant.
+
+Wed Sep 10 10:07:08 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (emulations): Add v850 emulation.
+
+Tue Sep 9 17:14:33 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.am (CPU_TYPES): Add arc.
+ (TARGET_CPU_CFILES): Add tc-arc.c.
+ (TARGET_CPU_HFILES): Add tc-arc.h.
+ (dependencies): Rebuild.
+ * Makefile.in: Rebuild.
+ * configure.in: Recognize arc-*-elf*.
+ * configure: Regenerated.
+ * config/tc-arc.[ch]: New files.
+
+Tue Sep 9 10:19:37 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-v850.texi (V850 Opcodes): Document hi0() reloc prefix.
+ Correct description of hi() reloc prefix.
+
+
+ * doc/c-v850.texi: Document new pseudo ops and command line
+ options.
+
+ * config/tc-v850.c (set_machine): New function.
+ * config/tc-v850.c (.v850): New pseudo op.
+
+
+Mon Sep 8 23:08:04 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Support -alh and -ald for DWARF 1:
+ * listing.c (struct list_info_struct): Add debugging field.
+ (listing_newline): Initialize the debugging field. If ELF, if the
+ section starts with .debug or .line, set the debugging field in
+ the listing structure.
+ (debugging_pseudo): Add list parameter. Change all callers. If
+ the debugging field is set, consider it to be a debugging pseudo.
+ If ELF, skip blank lines between debugging lines.
+ * read.c (emit_expr): If ELF, look for line numbers.
+ (stringer): If ELF, look for file names.
+
+Mon Sep 8 12:33:40 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_insert_operand): Only test for overflow
+ if there is no insert function.
+
+ * config/tc-v850.h (TARGET_MACHINE): New constant.
+
+ * config/tc-v850.c (v850_insert_operand): Add
+ -mwarn_unsigned_overflow.
+ (md_begin): Set BFD machine number based on machine variable.
+ (md_parse_option): Add -mv850, -mv850e and -mv850ea options.
+
+Mon Sep 8 11:20:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * as.h: Don't declare alloca if it is a macro.
+ * macro.c: Likewise.
+
+Sun Sep 7 00:30:19 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.c (md_parse_option): Move m[] out to top level and
+ rename to cpu_types[].
+ (s_alpha_arch): New function.
+ (md_pseudo_table): Add "arch".
+
+ * config/tc-alpha.c (md_begin): Merge the two loops through the
+ opcode table.
+ (s_alpha_proc): Add initial SKIP_WHITESPACE.
+ (s_alpha_set): Likewise. Use get_symbol_end instead local while loop.
+
+Sat Sep 6 19:38:12 1997 Fred Fish <fnf@cygnus.com>
+
+ * read.h (s_lcomm_bytes): Add prototype (for real this time).
+
+Thu Sep 4 12:10:01 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-elf.c (elf_frob_symbol): Only set BSF_OBJECT for
+ symbols on Irix.
+
+Wed Sep 3 11:21:33 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c: Remove BFD_RELOC_V850_16_PCREL.
+
+Tue Sep 2 18:32:30 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_convert_frag): PC relative instructions arex
+ relative to the next instruction, not the current instruction.
+ (md_assemble): Similarly.
+
+Tue Sep 2 15:58:52 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-v850.texi: Explanations of offsets in SDA/ZDA areas
+ correcetd.
+
+ * config/tc-v850.c: Add support for SDA/TDA/ZDA sections.
+ (v850_reloc_prefix): Duplicate code eliminated. Add code to
+ recognise special instructions.
+ (md_assemble): Calculation of the size of a fixups corrected.
+
+ * config/tc-v850.h (ELF_TC_SPECIAL_SECTIONS): Add SDA/TDA/ZDA
+ sections.
+
+Tue Sep 2 15:40:56 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Use opcode->name instead of
+ opcode->opcode as the sentinal. Zero is a valid opcode.
+
+Tue Aug 26 16:51:14 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/as.texinfo (Machine Dependencies): Add v850 to menu.
+ * doc/c-v850.texi: Change node name to match other chapter nodes.
+
+Tue Aug 26 09:46:22 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-v850.texi (V850 Opcodes): Correct name for tiny data area
+ pointer.
+
+Tue Aug 26 12:23:25 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * expr.c (integer_constant): If BFD64, don't make a bignum if the
+ number will fit in 64 bits.
+
+ * config/tc-alpha.c (load_expression): Check explicitly for O_big,
+ rather than calling abort.
+
+ * as.h: Don't define alloca if __GNUC__. Just declare it.
+ * macro.c: Copy alloca handling from as.h.
+
+ * config/tc-i386.c (i386_align_code): Correct 16 bit noops. From
+ Gabriel Paubert <paubert@iram.es>.
+
+ * config/tc-i386.c (md_assemble): In JumpByte case, when looking
+ for a WORD_PREFIX_OPCODE, change it to ADDR_PREFIX_OPCODE if this
+ is jcxz or a loop instruction.
+
+Mon Aug 25 16:04:14 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (pre_defined_registers): Add 'hp' as alias for
+ r2.
+ (md_begin): Set up machine architecture and type.
+
+Mon Aug 25 14:25:48 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (resolve_symbol_value): Store the value back into the
+ symbol expression, to handle add or subtract simplification
+ correctly. Handle O_symbol_rva. Add default case.
+
+ * config/tc-ppc.c (ppc_change_csect): Temporarily lower the
+ chunksize while creating the new subsection.
+ * as.c (chunksize): Initialize to zero.
+ * subsegs.c (subseg_set_rest): Change 5000 to chunksize when
+ calling obstack_begin.
+
+Mon Aug 25 11:21:48 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_assemble): Restore input_line_pointer upon
+ exit.
+
+
+Mon Aug 25 10:19:34 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-v850.texi: Change the major node to v850 Machine
+ Dependencies.
+
+Fri Aug 22 11:16:14 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/as.texinfo: Add inclusion of c-v850.texi
+
+ * doc/c-v850.texi: New file.
+
+ * read.c (is_end_of_line): Make NUL character be considered to be
+ a line terminator.
+
+Fri Aug 22 10:45:33 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (parse_register_list): Add support for curly
+ brace syntax.
+ (cc_names): Add "e" and "ne" conditions.
+
+Thu Aug 21 11:00:36 1997 Nick Clifton <nickc@cygnus.com>
+
+ * app.c (do_scrub_chars): Support a double dash as starting a
+ comment that extends to end of line.
+
+Thu Aug 21 10:54:27 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (v850_section, v850_bss, v850_offset): New
+ functions.
+ (md_pseudo_table): New pseudo ops: .bss, .offset, .section
+
+Thu Aug 21 00:59:53 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-m32r.c (md_estimate_size_before_relax): Update recorded
+ insn when changing to a different instruction.
+
+Wed Aug 20 00:45:20 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * tc-sh.c (parse_reg, get_specific, build_Mytes): Add SH4
+ floating point extensions.
+ (parse_reg): parse sgr and dbr.
+
+Tue Aug 19 17:07:34 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (system_register_name): Support numbers for
+ system register IDs.
+
+Tue Aug 19 08:59:12 1997 Fred Fish <fnf@cygnus.com>
+
+ * read.c (s_lcomm_internal): Renamed from s_lcomm, added arg to
+ flag when alignment is in bytes instead of power of 2, and code to
+ use that flag to convert alignment to bytes.
+ (s_lcomm, s_lcomm_bytes): New helpers that call s_lcomm_internal.
+ * read.h (s_lcomm_bytes): Add prototype.
+ * config/obj-coff.c (write_object_file): If ALIGNMENT_IN_S_FLAGS is
+ defined, write alignment to alignment bits in section header s_flags
+ rather than the s_align field.
+
+Mon Aug 18 20:42:23 1997 Richard Henderson <rth@cygnus.com>
+
+ * macro.c (check_macro): use alloca instead of xmalloc to plug leak.
+
+Mon Aug 18 20:33:06 1997 Richard Henderson <rth@cygnus.com>
+
+ * as.c (show_usage): Add -am.
+ * input-scrub.c (input_scrub_include_sb): Don't add leading \n
+ if we've already got one.
+ * listing.c (struct list_info_struct): Add line_contents.
+ (listing_newline): Put unused argument to work: if non-null, save it...
+ (listing_listing): ... and regurgitate during listing instead of line
+ from file.
+ * listing.h (LISTING_MACEXP): New define.
+ (LISTING_NEWLINE): Argument is NULL.
+ * read.c (read_a_source_file): If expanding macros, break up input
+ lines and pass them to listing_newline.
+ * doc/as.texinfo: Document -ac and -am.
+
+ * cond.c (s_ifc): Add missing demand_empty_rest_of_line.
+
+Mon Aug 18 11:26:36 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-v850.c (md_apply_fix3): Add support for new 16 bit PC
+ relative reloc.
+
+
+Fri Aug 15 14:00:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (check-DEJAGNU): Don't cd into testsuite until after
+ setting EXPECT and TCL_LIBRARY.
+ * Makefile.in: Rebuild.
+
+ * as.h (enum debug_info_type): Define.
+ (debug_type): Declare.
+ * as.c (debug_type): New global variable.
+ (show_usage): Add --gstabs.
+ (parse_args): Handle --gstabs.
+ * read.c (generate_asm_lineno): Remove.
+ (read_a_source_file): Output stabs debugging if appropriate.
+ Change checks of generate_asm_lineno to check debug_type. Only
+ generate ECOFF debugging if ECOFF_DEBUGGING is defined.
+ * read.h (generate_asm_lineno): Don't declare.
+ (stabs_generate_asm_lineno): Declare.
+ * stabs.c (stabs_generate_asm_lineno): New function.
+ * ecoff.c (add_file): Use debug_type, not generate_asm_lineno.
+ Don't turn off debugging.
+ (add_file): Remove old #if 0 code.
+ (ecoff_new_file): Set debug_type, not generate_asm_lineno.
+ (ecoff_directive_end): Don't generate stabs line symbols.
+ (ecoff_generate_asm_lineno): Don't check stabs_seen. Don't set
+ generate_asm_lineno.
+ (line_label_cnt): Remove.
+ (ecoff_generate_asm_line_stab): Remove.
+ * ecoff.h (ecoff_generate_asm_line_stab): Don't declare.
+ * doc/as.texinfo, doc/as.1: Document --gstabs.
+
+Wed Aug 13 18:58:56 1997 Nick Clifton <nickc@cygnus.com>
+
+
+ * config/tc-v850.c (md_assemble): Fix error recovery to reload
+ text of entire opcode.
+
+Tue Aug 12 10:27:34 1997 Richard Henderson <rth@cygnus.com>
+
+ * doc/internals.texi: Document rs_leb128.
+
+Tue Aug 12 12:17:03 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (m68k_ip): Give an error message for SIZE_BYTE
+ in ABSL case, rather than calling abort.
+
+Mon Aug 11 21:48:00 1997 Richard Henderson <rth@cygnus.com>
+
+ * as.h (enum _relax_state): Add rs_leb128.
+ * read.c (potable): Add sleb128 and uleb128.
+ (sizeof_*leb128, output_*leb128, emit_leb128_expr, s_leb128): New
+ functions.
+ * read.h: Update prototypes.
+ * symbols.c (resolve_symbol_value): Streamline quite a bit. Return
+ the symbol value, add a second FINALIZE argument that prevents
+ changes from being comitted. Update all callers.
+ * write.c (cvt_frag_to_fill, relax_segment): Handle rs_leb128.
+ * doc/as.texinfo: Document the new pseudos.
+
+Sun Aug 10 14:51:49 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (MOSTLYCLEANFILES): Add site.bak, site.exp, stage,
+ stage1, and stage2.
+ (DISTCLEANFILES): Define.
+ * doc/Makefile.am (DISTCLEANFILES): Define.
+ * Makefile.in, doc/Makefile.in: Rebuild.
+
+Wed Aug 6 00:30:30 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Define TARGET_BYTES_BIG_ENDIAN if endian is set.
+ Don't set targ or gas_target. Define SCO_ELF and
+ TARGET_SOLARIS_COMMENT when appropriate. Don't substitute for
+ target_frag.
+ * Makefile.am: Remove @target_frag@.
+ (INCLUDES): Remove $(INTERNAL_CFLAGS), $(CROSS), $(HDEFINES), and
+ $(TDEFINES).
+ (dep-am): Mark as phony.
+ * acconfig.h: Add TARGET_BYTES_BIG_ENDIAN, TARGET_SOLARIS_COMMENT,
+ and SCO_ELF.
+ * config/arm-big.mt, config/arm-lit.mt: Remove.
+ * config/mips-big.mt, config/mips-lit.mt: Remove.
+ * config/ppc-big.mt, config/ppc-lit.mt: Remove.
+ * config/ppc-sol.mt: Remove.
+ * config/i386coff.mt, config/m68kcoff.mt: Remove.
+ * config/m88kcoff.mt: Remove.
+ * config/sco5.mt: Remove.
+ * configure, config.in, Makefile.in: Rebuild.
+
+ * Makefile.am ($(srcdir)/config/m68k-parse.h): New target, to
+ further try to circumvent the .y.h rule.
+ * Makefile.in: Rebuild.
+
+Tue Aug 5 12:32:07 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am: New file, based on old Makefile.in.
+ * acinclude.m4: New file, from old aclocal.m4.
+ * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove
+ shared library handling; now handled by libtool. Replace
+ AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC,
+ AC_PROG_LEX, and AC_DECL_YYTEXT. Call AM_MAINTAINER_MODE,
+ AM_CYGWIN32, and AM_EXEEXT. Don't call CY_CYGWIN32 or CY_EXEEXT.
+ * config.in: New file, created by autoheader.
+ * conf.in: Remove.
+ * acconfig.h: Mention PACKAGE, VERSION, and USING_CGEN.
+ * stamp-h.in: New file.
+ * as.c (print_version_id): Change GAS_VERSION to VERSION.
+ (parse_args): Likewise.
+ * config/obj-vms.c: (Write_VMS_MHD_Records): Likewise.
+ * doc/Makefile.am: New file, based on old doc/Makefile.in.
+ * Makefile.in, doc/Makefile.in: Now built with automake.
+ * aclocal.m4: Now built with aclocal.
+ * configure: Rebuild.
+
+ * cond.c (s_else): If not listing false conditionals, turn listing
+ off in the false branch of the else.
+
+Mon Aug 4 11:28:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (macro): Fix handling of a double load from a
+ symbol plus an offset.
+
+ * ecoff.c (ecoff_build_symbols): Set fMerge to 0 for an FDR which
+ has an associated external symbol.
+
+Sun Aug 3 23:23:59 1997 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-alpha.c (s_alpha_ucons): New function.
+ (md_pseudo_table): Add unaligned data pseudos for DWARF.
+
+Thu Jul 31 15:13:43 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Ignore the rest of the current
+ line if we encounter an error.
+
+ * config/tc-v850.c (md_assemble): Sign extend constants value
+ for hi and hi0 expressions.
+ (v850_insert_operand): Enable range checking for generic 16bit
+ operands.
+
+Tue Jul 29 14:20:43 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Turn on fx_no_overflow for
+ LO16, HI16 and HI16_S relocs.
+
+Mon Jul 28 18:41:41 1997 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
+ win32 dependencies.
+ * configure: Regenerated with autoconf 2.12.
+ * Makefile.in: Add $(EXEEXT) to all executables.
+
+Fri Jul 25 10:54:43 1997 Jeffrey A Law (law@cygnus.com)
+
+ * tc-hppa.c (md_apply_fix): Improve warnings for out of range
+ unconditional branches.
+ (hppa_fix_adjustable): Don't adjust anything with a RR% or LR%
+ field selector.
+
+Thu Jul 24 15:21:49 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * tc-sparc.c (md_begin): Cast sparc_opcodes to PTR for hash_insert.
+
+Thu Jul 24 17:51:29 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * macro.c (define_macro): Make sure the index is in range before
+ checking for '('.
+
+Tue Jul 22 18:38:56 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
+
+ * config/te-go32.h (USE_ALIGN_PTWO): Define.
+ * config/tc-i386.c (md_pseudo_table): If USE_ALIGN_PTWO is
+ defined, use s_align_ptwo for .align.
+ * configure.in (i386-*-msdosdjgpp*): New target.
+ (i386-*-go32*): Set em to go32 and targ to coffgo32.
+ * configure: Rebuild.
+
+Tue Jul 22 12:41:40 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/tc-sparc.c (last_opcode): New static local.
+ (md_assemble): Don't issue "FP branch in delay slot" warning if
+ the delay slot has been annulled.
+
+Tue Jul 22 13:25:13 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-m68k.c (md_apply_fix_2): Check for PC relative reloc
+ code if BFD_ASSEMBLER.
+
+Mon Jul 21 08:57:17 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (system_registers): Fix ordering of registers.
+
+Mon Jul 14 23:10:58 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (macro_build): Restore check of fmt argument.
+ (mips_ip): Fix ISA checks.
+
+Sun Jul 13 20:43:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (check_absolute_expr): Change warning to
+ error.
+
+Fri Jul 11 10:18:47 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mips.c (macro_build): Refine code to check if an
+ instruction is available on a particular cpu variant.
+ (mips_ip): Likewise.
+
+Mon Jul 7 22:53:08 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Change ifndef
+ OBJ_AOUT to ifdef OBJ_ELF.
+ (md_apply_fix3): When mangling 32 bit PC relative reloc for
+ BFD_ASSEMBLER, handle one ELF case for COFF as well, and add a PE
+ case.
+ * write.c (fixup_segment): Change special case for i386-coff to
+ not apply for i386-pe.
+ * config/obj-coff.c (coff_adjust_section_syms): Only count fixups
+ which were not done.
+ (coff_frob_file_after_relocs): Rename from coff_frob_file.
+ (coff_format_ops): Initialize frob_file_after_relocs field rather
+ than frob_file field.
+ * config/obj-coff.h (coff_frob_file): Don't declare.
+ (coff_frob_file_after_relocs): Declare.
+ (obj_frob_file): Don't define.
+ (obj_frob_file_after_relocs): Define.
+ * configure.in: Set bfd_gas to yes for i386-*-cygwin32.
+ * configure: Rebuild.
+
+Wed Jul 2 12:05:00 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Never subtract section
+ address from PC relative reloc which will be fully resolved.
+
+Tue Jul 1 15:23:07 1997 Jeffrey A Law (law@cygnus.com)
+
+ * ecoff.c (page_type): Renamed from page_t to avoid conflict
+ with hpux10 header files.
+
+Mon Jun 30 12:27:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ From Jason Merrill <jason@cygnus.com>:
+ * read.c (do_align): If BFD_ASSEMBLER, only use NOP_OPCODE if
+ SEC_CODE is set.
+ * config/tc-i386.h (md_maybe_text): Define.
+ (md_do_align): Use md_maybe_text.
+
+Fri Jun 27 19:15:27 1997 Michael Meissner <meissner@cygnus.com>
+
+ * config/tc-ppc.h (tc_fix_adjustable): Only check for GOT type
+ relocations, don't check for symbol being external, weak, etc.
+
+Mon Jun 16 19:12:51 1997 Geoff Keating <geoffk@ozemail.com.au>
+
+ * config/tc-ppc.h (tc_fix_adjustable): Don't let the assembler
+ calculate relocations to any external symbol, because we might be
+ linking a shared object and the symbol might be overriden or moved
+ (for instance, moved into a static executable's .bss section).
+ (GLOBAL_OFFSET_TABLE_NAME): Delete. This is an i386 wierdness.
+
+ * config/tc-ppc.h (tc_fix_adjustable): GOT-based relocations can't
+ be calculated by the assembler.
+
+ * config/tc-ppc.c (md_apply_fix3): Handle @plt or @local branch
+ whose destination lies in the same file, by ignoring the @plt or
+ @local and aiming the branch at its destination.
+
+Mon Jun 16 13:59:18 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * symbols.c (copy_symbol_attributes): Copy BSF_OBJECT flag.
+ * config/obj-elf.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Copy size
+ expression.
+
+ * config/obj-multi.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Define instead
+ of obj_copy_symbol_attributes.
+
+Mon Jun 16 12:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_insert_operand): In 32 bit mode, with a
+ signed operand, sign extend a 32 bit value to the host size.
+
+ * Makefile.in (CFLAGS): Subsitute from configure script. From
+ Jeff Makey <jeff@cts.com>.
+
+ * config/tc-i386.c (i386_operand): Use alloca rather than a fixed
+ buffer size to make a copy of the symbol.
+
+ * Makefile.in (OBJS): Put @extra_objects@ on the same line as
+ macro.o.
+
+Thu Jun 12 12:16:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * write.c (write_object_file): In non BFD_ASSEMBLER code, as we
+ step through the frags calling cvt_frag_to_fill, switch to
+ SEG_DATA when we reach data_frag_root.
+
+Tue Jun 10 17:08:34 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_assemble): Allow an empty register
+ list for instructions which use register lists.
+
+Tue Jun 10 11:18:09 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * config/tc-arm.c (md_apply_fix3): Make temp unsigned long.
+
+ * config/tc-arm.c (arm_adjust_symtab): Only set storage classes if
+ OBJ_COFF.
+
+ * config/tc-arm.c: Add prototypes for many static functions.
+ (struct asm_opcode ): Add prototypes for parms field.
+ (struct thumb_opcode ): Likewise.
+ (fp_op2): Remove unused flags parameter.
+ (output_inst): Make static.
+ (arm_after_pass_hook): Remove unused ignore parameter.
+ * config/tc-arm.h (arm_after_pass_hook): Declare.
+ (arm_start_line_hook): Declare.
+ (arm_frob_label): Declare.
+
+Mon Jun 9 12:55:45 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
+
+ * depend.c (wrap_output): new prototype.
+
+Mon Jun 9 12:52:44 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.c (md_apply_fix): Check for overflow.
+
+ * config/tc-m68k.c (md_section_align): If a.out and BFD, force
+ section size to be aligned.
+
+Fri Jun 6 17:15:55 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-sh.h (md_cons_align): Define.
+ (sh_cons_align): Declare.
+ * config/tc-sh.c (md_pseudo_table): Add .uaword and .ualong.
+ (sh_no_align_cons): New static variable.
+ (s_uacons): New static function.
+ (sh_cons_align): New function.
+ (sh_handle_align): Warn about misaligned data.
+ * doc/c-sh.texi: Document .uaword and .ualong.
+
+Thu Jun 5 15:38:17 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * macro.c (macro_expand): In MRI mode, treat single quote as a
+ separator character when checking for a positional argument.
+
+Tue Jun 3 16:15:13 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_parse_option): Merge in changes from
+ armT-970328-branch.
+
+ * config/tc-arm.h: Merge in changes from armT-970328-branch.
+
+ * configure.in (emulations): Add Thumb architecture support from
+ armT-9703-28-branch.
+
+Mon Jun 2 16:25:07 1997 Nick Clifton <nickc@cygnus.com>
+
+ * doc/all.texi: Add enabling of ARM documentation.
+
+ * doc/as.texinfo: Add ARM documentation from armT-970328-branch.
+
+Mon Jun 2 11:55:12 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c: Added r3900 support.
+
+Thu May 29 12:58:26 1997 Ben Pfaff <pfaffben@pilot.msu.edu>
+
+ * as.c: (parse_args) `-t' option requires an argument.
+
+Wed May 28 15:45:07 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_begin): Change call to
+ coff_arm_bfd_set_private_flags() to a call to
+ bfd_set_private_flags().
+
+Wed May 28 16:17:34 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Rebuild dependencies.
+
+ * config/tc-i386.c (tc_gen_reloc): Don't try to convert the type
+ of a BFD_RELOC_RVA reloc.
+
+Wed May 28 10:48:14 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-hppa.c (tc_fix_adjustable): Reject absolute calls/jumps.
+ (hppa_force_relocation): Force a relocation for an absolute
+ call/jump.
+
Mon May 26 13:24:25 1997 Ian Lance Taylor <ian@cygnus.com>
* doc/as.texinfo: Don't use @value in section names or index
entries; it confuses texinfo.tex.
-Tue May 13 10:42:20 1997 Ian Lance Taylor <ian@cygnus.com>
+Fri May 23 00:09:35 1997 Tom Tromey <tromey@cygnus.com>
- * Makefile.in (VERSION): Set to 2.8.1.
+ * doc/as.texinfo: Updated for -MD option.
+ * Makefile.in (CFILES): Added depend.c.
+ (OBJS): Added depend.o.
+ * as.h (start_dependencies, register_dependency,
+ print_dependencies): New declarations.
+ * depend.c: New file.
+ * as.c (parse_args): Added -MD option.
+ (main): Call print_dependencies.
+ (show_usage): Added help for -MD.
+ * read.c (s_app_file): Call register_dependency.
+ (s_include): Call register_dependency when file is found.
+ (read_a_source_file): Call register_dependency.
+
+Wed May 21 17:39:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (symbol_to_chars): If TE_PE, don't add the
+ section address to the symbol value.
+
+Tue May 20 11:23:31 1997 Gavin Koch <gavin@cygnus.com>
+
+ * config/tc-mips.c (macro_build,mips_ip): Move the INSN_ISA field
+ into the new membership field.
+
+Thu May 15 10:00:53 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_begin): If no cpu type is specified on the
+ command line then the ARM7 is now chosen by default when setting
+ the BFD machine and architecture.
+
+Wed May 14 09:54:53 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (global variables): Added 'uses_apcs_26' flag to
+ hold APCS selection.
+ (md_begin): Added code to generate flags to be set into the COFF
+ header and the calls to the BFD functions to do this.
+ (md_parse_option, md_show_usage): Added new command line
+ options -mapcs-32, -mapcs-26, -marmv2, -marmv2a, -marmv3,
+ -marmv3m, -marmv4, -marmv4t.
+
+ * tc-arm.h (LOCAL_LABEL): Removed the definition of this macro
+ as it is never used.
+
+Tue May 13 22:26:14 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10200.c (md_convert_frag): Prefix temporary
+ label name with ".".
+ * config/tc-mn10300.c (md_convert_frag): Likewise.
+
+Tue May 13 14:44:39 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-mips.c (set_at): Check for bignum.
+ (check_absolute_expr, macro, mips16_macro): Likewise.
Mon May 12 13:33:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
@@ -21,6 +1967,12 @@ Wed May 7 15:39:48 1997 Ian Lance Taylor <ian@cygnus.com>
* config/obj-coff.c (write_object_file): Just pass NULL to
md_do_align, not the address of a char holding NOP_OPCODE.
+ * config/tc-mips.c (macro): Handle constants for M_LI_D and
+ M_LI_DD.
+ (mips_ip): For 'F', 'L', 'f', and 'l', generate a constant rather
+ than an address if the floating point value looks sufficiently
+ simple.
+
Tue May 6 12:18:09 1997 Ian Lance Taylor <ian@cygnus.com>
* config/tc-i386.c (md_section_align): If a.out and BFD, force
@@ -57,6 +2009,11 @@ Tue Apr 29 20:23:10 1997 Jim Wilson <wilson@cygnus.com>
(load_address, macro, md_estimate_size_before_relax): Fix all
callers.
+Tue Apr 29 19:54:36 1997 Richard Henderson <rth@tamu.edu>
+
+ * config/obj-elf.c (elf_pseudo_table): Add "subsection".
+ (obj_elf_subsection): New static function.
+
Tue Apr 29 19:52:47 1997 Ian Lance Taylor <ian@cygnus.com>
* config/obj-coff.c (coff_header_append): Don't reset string_size
@@ -72,6 +2029,16 @@ Fri Apr 25 12:03:15 1997 Ian Lance Taylor <ian@cygnus.com>
current configure handling of targ-cpu.h, et. al.
(CPU backend): Document listing macros.
+ * listing.c (data_buffer): Set size based on other listing macros,
+ rather than always using 100.
+ (data_buffer_size): Remove static variable.
+ (calc_hex): Make data_buffer_size a local variable. Don't leave
+ any slop when filling data_buffer.
+
+Mon Apr 21 15:33:19 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * doc/c-mips.texi: Document .set autoextend.
+
Sat Apr 19 23:09:25 1997 Niklas Hallqvist <niklas@petra.appli.se>
* configure.in (i386-*-openbsd*, m68k-*-openbsd*,
@@ -84,6 +2051,11 @@ Sat Apr 19 22:52:03 1997 Jim Wilson <wilson@cygnus.com>
* config/obj-elf.c (elf_frob_symbol): If TC_MIPS, set BSF_OBJECT
for all undefined symbols.
+Fri Apr 18 13:37:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-ppc.c (ppc_fix_adjustable): Handle zero length csects
+ correctly.
+
Fri Apr 18 11:51:35 1997 Niklas Hallqvist <niklas@appli.se>
* configure.in (alpha*-*-openbsd*): New target.
@@ -98,8 +2070,30 @@ Tue Apr 15 18:11:44 1997 Gavin Koch <gavin@cygnus.com>
* config/tc-mips.c (insn_uses_reg): Correct test for fpr pairs.
+Tue Apr 15 13:04:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (srcroot): Remove.
+ (INSTALL): Set to @INSTALL@.
+ (INSTALL_XFORM, INSTALL_XFORM1): Remove.
+ (all, dvi): Don't set srcroot.
+ (install): Depend upon as.new, gasp.new, and installdirs. Use
+ $(program_transform_name) directly, rather than using
+ $(INSTALL_XFORM) and $(INSTALL_XFORM1).
+ (installdirs): New target.
+ * doc/Makefile.in (INSTALL_XFORM1): Remove.
+ (install): Depend upon installdirs. Use $(program_transform_name)
+ directly, rather than using $(INSTALL_XFORM) and
+ $(INSTALL_XFORM1).
+ (installdirs): New target.
+ (install-info-as): Run mkinstalldirs.
+ (install-info-gasp): Likewise.
+
Mon Apr 14 11:59:08 1997 Ian Lance Taylor <ian@cygnus.com>
+ * Makefile.in (INSTALL): Change install.sh to install-sh.
+
+ * symbols.c (resolve_symbol_value): Check for division by zero.
+
From Thomas Graichen <graichen@rzpd.de>:
* Makefile.in: Always use $(SHELL) when running move-if-change.
* configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
@@ -118,6 +2112,11 @@ Wed Apr 9 11:49:41 1997 Ian Lance Taylor <ian@cygnus.com>
* config/tc-m68k.c (m68k_ip): Handle #j.
+Tue Apr 8 16:37:57 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.c (md_convert_frag): Create fixup at the
+ right address for call label:32,regs,imm.
+
Mon Apr 7 14:58:22 1997 Jeffrey A Law (law@cygnus.com)
* config/tc-hppa.c (pa_subspace_start): If OBJ_ELF, then always return
@@ -176,14 +2175,19 @@ Fri Apr 4 13:26:10 1997 Ian Lance Taylor <ian@cygnus.com>
* config/tc-hppa.h (TC_EOL_IN_INSN): Check explicitly for '!',
rather than for any end of line character.
+ * config/tc-hppa.c (tc_gen_reloc): If hppa_ren_reloc_type fails,
+ call abort (i.e., as_abort) rather than crashing.
+
* config/tc-mips.c: Protect uses of STO_MIPS16 with an ifdef of
OBJ_ELF, rather than of S_GET_OTHER.
* Makefile.in (DISTCLEAN_HERE): Add site.exp and site.bak.
-Thu Apr 3 18:52:39 1997 Ian Lance Taylor <ian@cygnus.com>
+Thu Apr 3 13:16:18 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (VERSION): Set to 2.8.1.
- * Makefile.in (VERSION): Set to 2.8.
+ * Branched binutils 2.8.
Wed Apr 2 12:24:10 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -826,7 +2830,7 @@ Wed Feb 19 00:53:28 1997 Ian Lance Taylor <ian@cygnus.com>
* read.c (get_line_sb): Don't end the line on a semicolon inside a
string.
-Sun Feb 16 17:47:29 1997 Fred Fish <fnf@toadfish.ninemoons.com>
+Sun Feb 16 17:47:29 1997 Fred Fish <fnf@cygnus.com>
* config/tc-alpha.h (md_operand): Define with a null expansion,
like all the other targets.
@@ -881,7 +2885,7 @@ Fri Feb 14 15:56:06 1997 Gavin Koch <gavin@cygnus.com>
Thu Feb 13 20:02:16 1997 Fred Fish <fnf@cygnus.com>
- * config/{tc-alpha.h, tc-arc.h, tc-d10v.h, tc-generic.h, tc-i960.h,
+ * config/{tc-alpha.h, tc-d10v.h, tc-generic.h, tc-i960.h,
tc-mn10200.h, tc-mn10300.h, tc-sh.h, tc-vax.h, tc-w65.h}:
Add default definition of zero for TARGET_BYTES_BIG_ENDIAN.
* config/{tc-arm.h, tc-hppa.h, tc-i386.h, tc-mips.h, tc-ns32k.h,
@@ -1355,6 +3359,12 @@ Thu Jan 2 13:37:29 1997 Ian Lance Taylor <ian@cygnus.com>
(mips_elf_final_processing): Likewise.
(ELF_TC_SPECIAL_SECTIONS): Likewise.
+Tue Dec 31 15:12:35 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/tc-v850.c (md_assemble): If this is sst.{h,w} or
+ sld.{h,w} and the operand is relocatable, adjust the adend by
+ shifting it right one bit.
+
Tue Dec 31 12:56:41 1996 Ian Lance Taylor <ian@cygnus.com>
* read.c (read_a_source_file): Check mri_pending_align after
@@ -1809,6 +3819,32 @@ Wed Oct 30 20:15:35 1996 Ian Lance Taylor <ian@cygnus.com>
* doc/internals.texi: Rewrite, and add a lot of documentation.
* doc/Makefile.in (internals.info): New target.
+Wed Oct 30 14:55:57 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.h (tc_fix_adjustable): Don't adjust relocs
+ against weak symbols.
+
+Tue Oct 29 12:28:16 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Don't lose for relaxable
+ addresses like .+6.
+
+ * config/tc-v850.c (md_convert_frag): Make sure we insert the
+ fixup at the right address within the frag.
+
+ * config/tc-v850.c (md_convert_frag): Don't set fragP->fr_fix
+ to an absolute value, instead increment it as needed.
+
+ * config/tc-v850.h (TC_GENERIC_RELAX_TABLE): Define.
+ * config/tc-v850.c: Fix some indention problems.
+ (md_relax_table): Define for D9->D99 branch displacement
+ relaxing.
+ (md_convert_frag): Do something useful instead of aborting.
+ (md_estimate_size_before_relax): Likewise.
+ (md_assemble): Note if the matching instruction has a relaxable
+ operand. If it does, allocate frag with frag_var and don't
+ do any fixups.
+
Mon Oct 28 10:48:40 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.h (md_cleanup): New function. This is needed to
@@ -1823,11 +3859,40 @@ Fri Oct 25 00:01:00 1996 Ian Lance Taylor <ian@cygnus.com>
* write.c (fix_new_exp): Use make_expr_symbol to build an
expression symbol for a complex fixup.
+Thu Oct 24 14:31:04 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (v850_reloc_prefix): Several disgusting
+ hacks to improve parsing of complex hi, lo, zda, etc
+ expressions.
+ (md_assemble): Don't demand and eat a trailing ')' after finding
+ a v850 relocation prefix. Sign extend the constant in a
+ BFD_RELOC_LO16 expression. Do eat a trailing ')' after a complete
+ operand.
+ (parse_cons_expression_v850): Don't eat a trailing ')' after
+ finding a v850 relocation prefix.
+
+ * config/tc-v850.h (TC_PARSE_CONS_EXPRESSION): Define.
+ (TC_CONS_FIX_NEW): Likewise.
+ * config/tc-v850.c (parse_cons_expression_v850): New function.
+ (cons_fix_new_v850): Likewise.
+
+ * config/tc-v850.h (tc_fix_adjustable): Don't adjust TDA relocs.
+
Wed Oct 23 18:20:29 1996 Ian Lance Taylor <ian@cygnus.com>
* config/tc-ppc.c (md_apply_fix3): Give a better warning message
for an unknown relocation type.
+Wed Oct 23 16:21:28 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_pseudo_table): Add .word; allocates
+ 4 bytes of space.
+
+Tue Oct 22 22:01:25 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Handle TDAOFF relocs
+ differently for movea & sst/sld insns.
+
Tue Oct 22 17:09:32 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* config/tc-d10v.c (parallel_ok): Don't allow illegal combinations
@@ -1870,6 +3935,26 @@ Thu Oct 17 17:55:17 1996 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in ($(OBJS)): Depend upon libiberty.h.
+Wed Oct 16 11:28:31 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (v850_reloc_prefix): Recognize zdaoff, tdaoff
+ and sdaoff expressions.
+
+ * write.c (fixup_segment): Don't add symbol value to addend if
+ TC_V850 and OBJ_ELF.
+ * config/tc-v850.h (tc_fix_adjustable): Don't adjust any
+ pc-relative fixups.
+
+ * config/tc-v850.c (md_pcrel_from): Undo yesterday's changes.
+ (md_pcrel_from_section): Likewise.
+ * config/tc-v850.h (MD_PCREL_FROM_SECTION): Likewise.
+
+Tue Oct 15 23:19:00 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_pcrel_from): Delete unused function.
+ (md_pcrel_from_section): New function.
+ * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define.
+
Mon Oct 14 13:59:12 1996 Ian Lance Taylor <ian@cygnus.com>
* config/tc-mips.c (load_register): Add cast to offsetT when using
@@ -2022,6 +4107,11 @@ Tue Oct 1 12:37:48 1996 Ian Lance Taylor <ian@cygnus.com>
(alpha_macros): Move to top of file. Make static.
(alpha_num_macros): Move to top of file.
+Tue Oct 1 09:36:19 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * tc-v850.h: Define LOCAL_LABEL to recognise _.L_* symbols
+ generated by DWARF.
+
Sat Sep 28 03:38:08 1996 Ian Lance Taylor <ian@cygnus.com>
* listing.c (list_symbol_table): Remove bogus code in BFD64 case,
@@ -2159,6 +4249,42 @@ Tue Sep 3 13:52:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Added changes to support function
pointers and "@word" syntax.
+Tue Sep 3 11:57:18 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c: Remove commented out and #if 0'd code.
+ (v850_reloc_prefix): Provide prototype.
+ (postfix, get_reloc, build_insn): Remove prototypes for nonexistant
+ functions.
+ (md_begin, md_assemble, md_apply_fix3): Remove unused variables.
+ (md_assemble): Add default to case statement.
+
+Sat Aug 31 16:03:00 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Compute size of the instrction
+ from the opcode.
+
+ * config/tc-v850.c (md_apply_fix3): Do simple byte, short and
+ word fixups too.
+
+Fri Aug 30 23:50:08 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_apply_fix3): Use little endian get/put
+ routines to fetch/store the updated instruction from/to memory.
+ (v850_insert_operand): If the operand has a specialized insert
+ routine, call it.
+
+Fri Aug 30 18:35:26 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * config/tc-v850.c (reg_name_search): Align calling convention to
+ be like identical function found in tc-ppc.c.
+ (get_reloc): Removed.
+ (v850_reloc_prefix): New function, parse lo(), hi() and hi0().
+ (md_assemble): emit fixups.
+ (md_pcrel_from): renamed from md_pcrel_from_section, emit proper
+ displacement.
+ (md_apply_fix3): handle fixups/relocs.
+ * config/tc-v850.h (MD_PCREL_FROM_SECTION): Removed definition.
+
Fri Aug 30 18:12:00 1996 Ian Lance Taylor <ian@cygnus.com>
Add SH ELF support.
@@ -2212,6 +4338,16 @@ Fri Aug 30 14:47:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (find_opcode): Fix problem with calculating
branch sizes in across sections.
+Fri Aug 30 00:44:13 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-850.c (md_assemble): Handle hi() correctly. Handle
+ hi0() too.
+
+Wed Aug 28 23:11:08 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_begin): Deal with end of opcode
+ table marker.
+
Wed Aug 28 19:20:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (find_opcode): Fix a bug which could generate
@@ -2261,6 +4397,34 @@ Fri Aug 23 11:40:47 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: Fix typo.
+Fri Aug 23 10:41:32 1996 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-v850.c (md_assemble): Correct bit masking for
+ hi and lo expressions.
+
+ * config/tc-v850.c (md_assemble): Rough cut at demanding
+ "ep" or "r30" in sst and sld instructions.
+ (md_apply_fix3): Don't abort. Just warn that we don't
+ have relocs yet.
+
+ * config/tc-v850.c (CC_NAME_CNT): Define.
+ (cc_name): New function.
+ (md_assemble): Handle V850_OPERAND_CC correctly.
+
+ * config/tc-v850.c (md_assemble): Don't forget to initialize
+ "insn"!
+
+ * config/tc-v850.c (reg_name_search): Generalize to search
+ any given register table.
+ (register_name): Pass appropriate table and size to reg_name_search.
+ (system_register_name): New function.
+ (SYSREG_NAME_CNT): Define.
+ (md_assemble): Handle operands which are system registers.
+
+ * config/tc-v850.c (md_assemble): If we find a register, but the
+ opcode doesn't want a register, then we don't have a match.
+ (md_assemble): Get size of the instruction from the opcode table.
+
Thu Aug 22 10:20:30 1996 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Set and substitute HLDENV.
@@ -2276,6 +4440,13 @@ Thu Aug 22 10:50:00 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fix a reloc bug caused by my last change.
* doc/c-d10v.texi: Cleanup.
+Tue Aug 20 15:15:16 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * config/tc-v850.c: New file.
+ * config/tc-v850.h: New file.
+ * configure (v850-*-elf): New target.
+ * configure.in (v850-*-elf): New target.
+
Wed Aug 21 15:50:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: New file.
diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am
new file mode 100644
index 0000000..e645c2c
--- /dev/null
+++ b/contrib/binutils/gas/Makefile.am
@@ -0,0 +1,1549 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus dejagnu
+
+SUBDIRS = doc
+
+tooldir = $(exec_prefix)/$(target_alias)
+
+YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
+
+DEP = mkdep
+
+TARG_CPU = @target_cpu_type@
+TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
+TARG_CPU_O = tc-@target_cpu_type@.o
+TARG_CPU_H = $(srcdir)/config/tc-@target_cpu_type@.h
+OBJ_FORMAT_C = $(srcdir)/config/obj-@obj_format@.c
+OBJ_FORMAT_O = obj-@obj_format@.o
+OBJ_FORMAT_H = $(srcdir)/config/obj-@obj_format@.h
+TARG_ENV_H = $(srcdir)/config/te-@te_file@.h
+ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
+ATOF_TARG_O = atof-@atof@.o
+
+# use @target_cpu_type@ for refering to configured target name
+IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
+IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
+IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
+IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
+
+# CPU types. This is only used for dependency information.
+
+CPU_TYPES = \
+ a29k \
+ alpha \
+ arc \
+ arm \
+ d10v \
+ h8300 \
+ h8500 \
+ hppa \
+ i386 \
+ i860 \
+ i960 \
+ m32r \
+ m68k \
+ m88k \
+ mips \
+ mn10200 \
+ mn10300 \
+ ns32k \
+ ppc \
+ sh \
+ sparc \
+ tahoe \
+ tic30 \
+ vax \
+ w65 \
+ v850 \
+ z8k
+
+# Object format types. This is only used for dependency information.
+# We deliberately omit som, since it does not work as a cross assembler.
+
+OBJ_FORMATS = \
+ aout \
+ bout \
+ coff \
+ ecoff \
+ elf \
+ evax \
+ hp300 \
+ ieee \
+ vms
+
+# This is an sh case which sets valid according to whether the CPU
+# type in the shell variable c and the OS type in the shell variable o
+# are supported. This helps cuts down on the amount of dependency
+# information.
+
+CPU_OBJ_VALID = \
+ valid= ; \
+ case $$o in \
+ aout) \
+ case $$c in \
+ a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \
+ valid=yes ;; \
+ esac ;; \
+ bout) \
+ case $$c in \
+ i960) valid=yes ;; \
+ esac ;; \
+ coff) valid=yes ;; \
+ ecoff) \
+ case $$c in \
+ mips | alpha) valid=yes ;; \
+ esac ;; \
+ elf) valid=yes ;; \
+ evax) \
+ case $$c in \
+ alpha) valid=yes ;; \
+ esac ;; \
+ hp300) \
+ case $$c in \
+ m68k) valid=yes ;; \
+ esac ;; \
+ vms) \
+ case $$c in \
+ vax) valid=yes ;; \
+ esac ;; \
+ esac;
+
+# This is like CPU_OBJ_VALID, for the obj=multi case.
+
+CPU_MULTI_VALID = \
+ valid= ; \
+ case $$c in \
+ i386 | mips) valid=yes ;; \
+ esac;
+
+# Regular source files.
+
+GAS_CFILES = \
+ app.c \
+ as.c \
+ atof-generic.c \
+ bignum-copy.c \
+ cond.c \
+ depend.c \
+ ecoff.c \
+ ehopt.c \
+ expr.c \
+ flonum-copy.c \
+ flonum-konst.c \
+ flonum-mult.c \
+ frags.c \
+ hash.c \
+ input-file.c \
+ input-scrub.c \
+ listing.c \
+ literal.c \
+ macro.c \
+ messages.c \
+ output-file.c \
+ read.c \
+ sb.c \
+ stabs.c \
+ subsegs.c \
+ symbols.c \
+ write.c
+
+CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
+
+HFILES = \
+ as.h \
+ bignum.h \
+ bit_fix.h \
+ ecoff.h \
+ emul-target.h \
+ emul.h \
+ expr.h \
+ flonum.h \
+ frags.h \
+ hash.h \
+ input-file.h \
+ itbl-ops.h \
+ listing.h \
+ macro.h \
+ obj.h \
+ output-file.h \
+ read.h \
+ sb.h \
+ struc-symbol.h \
+ subsegs.h \
+ symbols.h \
+ tc.h \
+ write.h
+
+# CPU files in config.
+
+TARGET_CPU_CFILES = \
+ config/tc-a29k.c \
+ config/tc-alpha.c \
+ config/tc-arc.c \
+ config/tc-arm.c \
+ config/tc-d10v.c \
+ config/tc-h8300.c \
+ config/tc-h8500.c \
+ config/tc-hppa.c \
+ config/tc-i386.c \
+ config/tc-i860.c \
+ config/tc-i960.c \
+ config/tc-m32r.c \
+ config/tc-m68k.c \
+ config/tc-m88k.c \
+ config/tc-mips.c \
+ config/tc-mn10200.c \
+ config/tc-mn10300.c \
+ config/tc-ns32k.c \
+ config/tc-ppc.c \
+ config/tc-sh.c \
+ config/tc-sparc.c \
+ config/tc-tahoe.c \
+ config/tc-tic30.c \
+ config/tc-vax.c \
+ config/tc-w65.c \
+ config/tc-v850.c \
+ config/tc-z8k.c
+
+TARGET_CPU_HFILES = \
+ config/tc-a29k.h \
+ config/tc-alpha.h \
+ config/tc-arc.h \
+ config/tc-arm.h \
+ config/tc-d10v.h \
+ config/tc-h8300.h \
+ config/tc-h8500.h \
+ config/tc-hppa.h \
+ config/tc-i386.h \
+ config/tc-i860.h \
+ config/tc-i960.h \
+ config/tc-m32r.h \
+ config/tc-m68k.h \
+ config/tc-m88k.h \
+ config/tc-mips.h \
+ config/tc-mn10200.h \
+ config/tc-mn10300.h \
+ config/tc-ns32k.h \
+ config/tc-ppc.h \
+ config/tc-sh.h \
+ config/tc-sparc.h \
+ config/tc-tahoe.h \
+ config/tc-tic30.h \
+ config/tc-vax.h \
+ config/tc-w65.h \
+ config/tc-v850.h \
+ config/tc-z8k.h
+
+# OBJ files in config
+
+OBJ_FORMAT_CFILES = \
+ config/obj-aout.c \
+ config/obj-bout.c \
+ config/obj-coff.c \
+ config/obj-ecoff.c \
+ config/obj-elf.c \
+ config/obj-evax.c \
+ config/obj-hp300.c \
+ config/obj-ieee.c \
+ config/obj-som.c \
+ config/obj-vms.c
+
+OBJ_FORMAT_HFILES = \
+ config/obj-aout.h \
+ config/obj-bout.h \
+ config/obj-coff.h \
+ config/obj-ecoff.h \
+ config/obj-elf.h \
+ config/obj-evax.h \
+ config/obj-hp300.h \
+ config/obj-ieee.h \
+ config/obj-som.h \
+ config/obj-vms.h
+
+# Emulation header files in config
+
+TARG_ENV_HFILES = \
+ config/te-386bsd.h \
+ config/te-aux.h \
+ config/te-delta.h \
+ config/te-delt88.h \
+ config/te-dpx2.h \
+ config/te-dynix.h \
+ config/te-generic.h \
+ config/te-go32.h \
+ config/te-hp300.h \
+ config/te-hppa.h \
+ config/te-i386aix.h \
+ config/te-ic960.h \
+ config/te-linux.h \
+ config/te-lnews.h \
+ 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 \
+ config/te-pe.h \
+ config/te-ppcnw.h \
+ config/te-psos.h \
+ config/te-riscix.h \
+ config/te-sparcaout.h \
+ config/te-sun3.h \
+ config/te-svr4.h \
+ config/te-sysv32.h
+
+# Multi files in config
+
+MULTI_CFILES = \
+ config/e-i386coff.c \
+ config/e-i386elf.c \
+ config/e-mipsecoff.c \
+ config/e-mipself.c
+
+CONFIG_OBJS = \
+ $(TARG_CPU_O) \
+ $(OBJ_FORMAT_O) \
+ $(ATOF_TARG_O) \
+ $(extra_objects)
+
+GENERIC_OBJS = \
+ app.o \
+ as.o \
+ atof-generic.o \
+ bignum-copy.o \
+ cond.o \
+ depend.o \
+ ehopt.o \
+ expr.o \
+ flonum-konst.o \
+ flonum-copy.o \
+ flonum-mult.o \
+ frags.o \
+ hash.o \
+ input-file.o \
+ input-scrub.o \
+ literal.o \
+ messages.o \
+ output-file.o \
+ read.o \
+ subsegs.o \
+ symbols.o \
+ write.o \
+ listing.o \
+ ecoff.o \
+ stabs.o \
+ sb.o \
+ macro.o
+
+OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
+
+noinst_PROGRAMS = as-new gasp-new
+noinst_SCRIPTS = .gdbinit
+
+$(srcdir)/make-gas.com: stamp-mk.com
+stamp-mk.com: vmsconf.sh Makefile
+ sh $(srcdir)/vmsconf.sh $(GENERIC_OBJS) > new-make.com
+ $(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
+ touch stamp-mk.com
+
+EXTRA_DIST = make-gas.com
+
+DISTSTUFF = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
+diststuff: $(DISTSTUFF) info
+
+DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-opc.h
+
+# Now figure out from those variables how to compile and link.
+
+BASEDIR = $(srcdir)/..
+BFDDIR = $(BASEDIR)/bfd
+INCDIR = $(BASEDIR)/include
+
+# This is the variable actually used when we compile.
+# Specify the directories to be searched for header files.
+# Both . and srcdir are used, in that order,
+# so that tm.h and config.h will be found in the compilation
+# subdirectory rather than in the source directory.
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR)
+
+# This should be parallel to INCLUDES, but should replace $(srcdir)
+# with $${srcdir}, and should work in a subdirectory. This is used
+# when building dependencies, because the dependency building is done
+# in a subdirectory.
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd
+
+# How to link with both our special library facilities
+# and the system's installed libraries.
+
+GASLIBS = @OPCODES_LIB@ @BFDLIB@ ../libiberty/libiberty.a
+
+# Files to be copied away after each stage in building.
+STAGESTUFF = *.o $(noinst_PROGRAMS)
+
+$(OBJS): @ALL_OBJ_DEPS@
+
+as_new_SOURCES = $(GAS_CFILES)
+as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
+ $(extra_objects) $(GASLIBS)
+as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
+ $(extra_objects) $(GASLIBS)
+
+# 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 struc-symbol.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
+
+gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
+gasp_new_LDADD = ../libiberty/libiberty.a
+
+EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
+ echo $${rootme}/../expect/expect ; \
+ else echo expect ; fi`
+
+RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
+ echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
+ fi`
+RUNTESTFLAGS=
+
+check-DEJAGNU: site.exp
+ if [ -d testsuite ]; then \
+ true; \
+ else \
+ mkdir testsuite; \
+ fi
+ rm -f testsuite/site.exp
+ cp site.exp testsuite/site.exp
+ rootme=`pwd`; export rootme; \
+ srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
+ EXPECT=${EXPECT} ; export EXPECT ; \
+ if [ -f $(top_builddir)/../expect/expect ]; then \
+ TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
+ export TCL_LIBRARY; \
+ fi; \
+ runtest=$(RUNTEST); \
+ cd testsuite; \
+ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
+ $(RUNTESTFLAGS); \
+ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+ fi
+
+# 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@)
+ $(COMPILE) -c $(TARG_CPU_C)
+$(ATOF_TARG_O): $(ATOF_TARG_C)
+ $(COMPILE) -c $(ATOF_TARG_C)
+
+# ecoff.c only has full dependencies when ECOFF_DEBUGGING is defined,
+# so the automatic dependency stuff doesn't work.
+ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/aout/stab_gnu.h
+
+# We need all these explicit rules for the multi stuff. Because of
+# these rules, we don't need one for OBJ_FORMAT_O.
+
+obj-aout.o : $(srcdir)/config/obj-aout.c
+ $(COMPILE) -c $(srcdir)/config/obj-aout.c
+obj-bout.o : $(srcdir)/config/obj-bout.c
+ $(COMPILE) -c $(srcdir)/config/obj-bout.c
+obj-coff.o: $(srcdir)/config/obj-coff.c
+ $(COMPILE) -c $(srcdir)/config/obj-coff.c
+obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
+ $(COMPILE) -c $(srcdir)/config/obj-ecoff.c
+obj-elf.o : $(srcdir)/config/obj-elf.c
+ $(COMPILE) -c $(srcdir)/config/obj-elf.c
+obj-evax.o : $(srcdir)/config/obj-evax.c
+ $(COMPILE) -c $(srcdir)/config/obj-evax.c
+obj-hp300.o : $(srcdir)/config/obj-hp300.c
+ $(COMPILE) -c $(srcdir)/config/obj-hp300.c
+obj-ieee.o : $(srcdir)/config/obj-ieee.c
+ $(COMPILE) -c $(srcdir)/config/obj-ieee.c
+obj-multi.o : $(srcdir)/config/obj-multi.c
+ $(COMPILE) -c $(srcdir)/config/obj-multi.c
+obj-som.o : $(srcdir)/config/obj-som.c
+ $(COMPILE) -c $(srcdir)/config/obj-som.c
+obj-vms.o : $(srcdir)/config/obj-vms.c
+ $(COMPILE) -c $(srcdir)/config/obj-vms.c
+
+e-mipself.o : $(srcdir)/config/e-mipself.c
+ $(COMPILE) -c $(srcdir)/config/e-mipself.c
+e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
+ $(COMPILE) -c $(srcdir)/config/e-mipsecoff.c
+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
+
+# The m68k operand parser.
+
+EXTRA_as_new_SOURCES = config/m68k-parse.y
+
+m68k-parse.c: $(srcdir)/config/m68k-parse.y
+ $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/config/m68k-parse.y y.tab.c m68k-parse.c --
+m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
+
+# Don't let the .y.h rule clobber m68k-parse.h.
+m68k-parse.h: ; @true
+$(srcdir)/config/m68k-parse.h: ; @true
+
+# The instruction table specification lexical analyzer and parser.
+
+itbl-lex.c: $(srcdir)/itbl-lex.l
+itbl-lex.o: itbl-lex.c itbl-parse.h
+
+itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h
+
+itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
+
+itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
+ $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- -d
+
+# stand-alone itbl assembler & disassembler
+
+EXTRA_PROGRAMS = itbl-test
+itbl_test_SOURCES = itbl-parse.y itbl-lex.l
+itbl_test_LDADD = itbl-test-ops.o itbl-test.o $(GASLIBS) @LEXLIB@
+
+itbl-test-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
+ $(COMPILE) -o itbl-test-ops.o -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
+
+itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
+ $(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
+
+# CGEN interface.
+
+cgen.o: cgen.c cgen-opc.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/$(TARG_CPU)-opc.h
+
+# Remake the info files.
+
+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 .tcdep .objdep .dep2 .dep1 .depa .dep .depdir
+
+.PHONY: install-exec-local install-data-local
+
+install-exec-local: $(noinst_PROGRAMS)
+ $(mkinstalldirs) $(bindir) $(tooldir)/bin
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ else :; fi; \
+ done
+ rm -f $(tooldir)/bin/as$(EXEEXT)
+ n=`echo as | sed '$(transform)'`; \
+ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
+ ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
+ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \
+ fi
+
+# These exist for maintenance purposes.
+
+.PHONY: bootstrap bootstrap2 bootstrap3 stage1 stage2 stage3 comparison
+
+bootstrap: as-new
+ $(MAKE) stage1
+ rm -f stage && ln -s stage1 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) stage2
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) comparison against=stage2
+
+bootstrap2:
+ rm -f stage && ln -s stage1 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) stage2
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) comparison against=stage2
+
+bootstrap3:
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) comparison against=stage2
+
+# Copy the object files from a particular stage into a subdirectory.
+stage1:
+ -mkdir stage1
+ -mv $(STAGESTUFF) stage1
+ if [ -f stage1/as-new$(EXEEXT) -a ! -f stage1/as$(EXEEXT) ] ; then (cd stage1 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
+
+stage2:
+ -mkdir stage2
+ -mv $(STAGESTUFF) stage2
+ if [ -f stage2/as-new$(EXEEXT) -a ! -f stage2/as$(EXEEXT) ] ; then (cd stage2 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
+
+stage3:
+ -mkdir stage3
+ -mv $(STAGESTUFF) stage3
+ if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
+
+against=stage2
+
+# This rule is derived from corresponding code in the Makefile.in for gcc.
+# The "tail +16c" is to bypass headers which may include timestamps or
+# temporary assembly file names.
+comparison:
+ x=0 ; \
+ for file in *.o ; do \
+ tail +16c ./$$file > tmp-foo1; \
+ if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
+ if cmp tmp-foo1 tmp-foo2 ; then \
+ true ; \
+ else \
+ echo $$file differs ; \
+ x=1 ; \
+ fi ; \
+ else true; fi ; \
+ done ; \
+ exit $$x
+ -rm -f tmp-foo*
+
+.PHONY: de-stage1 de-stage2 de-stage3
+
+de-stage1:
+ - (cd stage1 ; rm -f as$(EXEEXT) ; mv -f * ..)
+ - rmdir stage1
+
+de-stage2:
+ - (cd stage2 ; rm -f as$(EXEEXT) ; mv -f * ..)
+ - rmdir stage2
+
+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)
+
+.dep: dep.sed $(DEP_FILE_DEPS) .tcdep .objdep .dep2
+ rm -f .dep1
+ srcdir=`cd $(srcdir); pwd`; \
+ $(MAKE) DEP=$(DEP) srcdir=$${srcdir} VPATH=$${srcdir} .dep1
+ rm -rf .depdir
+ sed -f dep.sed < .dep1 > .depa
+ sed -f dep.sed < .tcdep >> .depa
+ sed -f dep.sed < .objdep >> .depa
+ sed -f dep.sed < .dep2 >> .depa
+ echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> .depa
+ echo '$$(TARG_CPU_O): $$(TCDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
+ echo '$$(OBJ_FORMAT_O): $$(OBJDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> .depa
+ $(SHELL) $(srcdir)/../move-if-change .depa .dep
+
+# This rule needs a mkdep that runs "gcc -MM".
+.dep1: $(CFILES) $(MULTI_CFILES)
+ if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ srcdir=`cd $(srcdir); pwd`; \
+ cd .depdir; \
+ echo '' > targ-cpu.h; \
+ echo '' > obj-format.h; \
+ echo '' > targ-env.h; \
+ echo '' > itbl-cpu.h; \
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
+ $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $?
+ sed -e '/IF YOU PUT ANYTHING/,$$d' < .depdir/.dep > .dep1
+ rm -f .depdir/.dep
+
+# Work out the special dependencies for the tc-*.c files.
+.tcdep: $(TARGET_CPU_CFILES)
+ rm -f .tcdepa
+ if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ srcdir=`cd $(srcdir); pwd`; \
+ cd .depdir; \
+ for c in $(CPU_TYPES); do \
+ for o in $(OBJ_FORMATS); do \
+ $(CPU_OBJ_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
+ echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
+ echo '#include "te-generic.h"' > targ-env.h; \
+ echo '' > itbl-cpu.h; \
+ echo '#include "opcodes/'"$${c}"'-opc.h"' > cgen-opc.h; \
+ rm -f dummy.c; \
+ cp $${srcdir}/config/tc-$${c}.c dummy.c; \
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
+ $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
+ sed -e "s/dummy.o: dummy.c/TCDEP_$${c}_$${o} =/" \
+ -e '1,/DO NOT PUT ANYTHING AFTER/d' \
+ -e '/IF YOU PUT ANYTHING/,$$d' \
+ -e '/^$$/d' < .dep >> ../.tcdepa; \
+ rm -f dummy.c; \
+ else true; fi; \
+ done; \
+ done
+ echo 'TCDEP_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
+ echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .tcdepa
+ echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> .tcdepa
+ # We don't try to handle all multi cases.
+ for c in $(CPU_TYPES); do \
+ $(CPU_MULTI_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ o=ecoff; \
+ $(CPU_OBJ_VALID) \
+ echo 'TCDEP_'"$${c}"'_multi = \' >> .tcdepa; \
+ echo '$$(TCDEP_'"$${c}"'_coff) \' >> .tcdepa; \
+ if [ x$${valid} = xyes ]; then \
+ echo '$$(TCDEP_'"$${c}"'_ecoff) \' >> .tcdepa; \
+ else true; fi; \
+ echo '$$(TCDEP_'"$${c}"'_elf)' >> .tcdepa; \
+ else true; fi; \
+ done
+ mv -f .tcdepa .tcdep
+
+# Work out the special dependencies for the obj-*.c files.
+.objdep: $(OBJ_FORMAT_CFILES)
+ rm -f .objdepa
+ if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ srcdir=`cd $(srcdir); pwd`; \
+ cd .depdir; \
+ for c in $(CPU_TYPES); do \
+ for o in $(OBJ_FORMATS); do \
+ $(CPU_OBJ_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
+ echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
+ echo '#include "te-generic.h"' > targ-env.h; \
+ echo '' > itbl-cpu.h; \
+ rm -f dummy.c; \
+ cp $${srcdir}/config/obj-$${o}.c dummy.c; \
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
+ $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
+ sed -e "s/dummy.o: dummy.c/OBJDEP_$${c}_$${o} =/" \
+ -e '1,/DO NOT PUT ANYTHING AFTER/d' \
+ -e '/IF YOU PUT ANYTHING/,$$d' \
+ -e '/^$$/d' < .dep >> ../.objdepa; \
+ rm -f dummy.c; \
+ else true; fi; \
+ done; \
+ done
+ echo 'OBJDEP_hppa_som = $$(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
+ echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .objdepa
+ echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> .objdepa
+ echo ' $$(INCDIR)/aout/stab.def' >> .objdepa
+ # We don't try to handle all multi cases.
+ for c in $(CPU_TYPES); do \
+ $(CPU_MULTI_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ o=ecoff; \
+ $(CPU_OBJ_VALID) \
+ echo 'OBJDEP_'"$${c}"'_multi = \' >> .objdepa; \
+ echo '$$(OBJDEP_'"$${c}"'_coff) \' >> .objdepa; \
+ if [ x$${valid} = xyes ]; then \
+ echo '$$(OBJDEP_'"$${c}"'_ecoff) \' >> .objdepa; \
+ else true; fi; \
+ echo '$$(OBJDEP_'"$${c}"'_elf)' >> .objdepa; \
+ else true; fi; \
+ done
+ mv -f .objdepa .objdep
+
+# 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
+ if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ srcdir=`cd $(srcdir); pwd`; \
+ cd .depdir; \
+ for c in $(CPU_TYPES); do \
+ for o in $(OBJ_FORMATS); do \
+ $(CPU_OBJ_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
+ echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
+ $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
+ sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" \
+ -e '1,/DO NOT PUT ANYTHING AFTER/d' \
+ -e '/IF YOU PUT ANYTHING/,$$d' \
+ -e '/^$$/d' < .dep >> ../.dep2a; \
+ else true; fi; \
+ done; \
+ done
+ echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> .dep2a
+ # We don't try to handle all multi cases.
+ for c in $(CPU_TYPES); do \
+ $(CPU_MULTI_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ o=ecoff; \
+ $(CPU_OBJ_VALID) \
+ echo 'DEP_'"$${c}"'_multi = \' >> .dep2a; \
+ echo '$$(DEP_'"$${c}"'_coff) \' >> .dep2a; \
+ if [ x$${valid} = xyes ]; then \
+ echo '$$(DEP_'"$${c}"'_ecoff) \' >> .dep2a; \
+ else true; fi; \
+ echo '$$(DEP_'"$${c}"'_elf)' >> .dep2a; \
+ else true; fi; \
+ done
+ mv -f .dep2a .dep2
+
+dep.sed: dep-in.sed config.status
+ srcdir=`cd $(srcdir); pwd`; \
+ sed <$(srcdir)/dep-in.sed >dep.sed \
+ -e "s!@INCDIR@!$${srcdir}/../include!" \
+ -e "s!@BFDDIR@!$${srcdir}/../bfd!" \
+ -e "s!@SRCDIR@!$${srcdir}!"
+
+dep: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$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
+ 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
+ cat .dep >> tmp-Makefile.am
+ $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
+
+.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
+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
+ecoff.o: ecoff.c
+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
+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
+write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
+gasp.o: gasp.c sb.h macro.h
+e-i386coff.o: $(srcdir)/config/e-i386coff.c emul.h \
+ emul-target.h
+e-i386elf.o: $(srcdir)/config/e-i386elf.c emul.h emul-target.h
+e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul.h \
+ emul-target.h
+e-mipself.o: $(srcdir)/config/e-mipself.c emul.h emul-target.h
+
+TCDEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
+TCDEP_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
+TCDEP_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
+TCDEP_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 $(INCDIR)/opcode/alpha.h \
+ $(srcdir)/config/atof-vax.c
+TCDEP_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
+ $(srcdir)/config/atof-vax.c
+TCDEP_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 $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \
+ $(srcdir)/config/atof-vax.c
+TCDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
+ $(srcdir)/config/atof-vax.c
+TCDEP_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
+TCDEP_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
+TCDEP_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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 $(BFDDIR)/libbfd.h \
+ $(INCDIR)/opcode/hppa.h
+TCDEP_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 subsegs.h \
+ $(INCDIR)/obstack.h $(BFDDIR)/libbfd.h $(INCDIR)/opcode/hppa.h
+TCDEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/i386.h
+TCDEP_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 $(INCDIR)/opcode/i386.h
+TCDEP_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)/opcode/i386.h
+TCDEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/i860.h
+TCDEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/opcode/i860.h
+TCDEP_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 $(INCDIR)/opcode/i860.h
+TCDEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+TCDEP_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
+TCDEP_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
+TCDEP_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 cgen-opc.h \
+ $(srcdir)/../opcodes/m32r-opc.h $(INCDIR)/opcode/cgen.h
+TCDEP_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 cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
+ $(INCDIR)/opcode/cgen.h
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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 ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h
+TCDEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
+ itbl-ops.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
+TCDEP_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
+TCDEP_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 ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_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
+TCDEP_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \
+ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \
+ $(BFDDIR)/som.h
+TCDEP_i386_multi = $(TCDEP_i386_coff) $(TCDEP_i386_elf)
+TCDEP_mips_multi = $(TCDEP_mips_coff) $(TCDEP_mips_ecoff) \
+ $(TCDEP_mips_elf)
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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)/aout/aout64.h
+OBJDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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 subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
+OBJDEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
+OBJDEP_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
+OBJDEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
+ $(INCDIR)/obstack.h
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-hp300.h \
+ $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/obstack.h subsegs.h
+OBJDEP_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
+OBJDEP_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)/aout/aout64.h
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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)/aout/aout64.h
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_i386_multi = $(OBJDEP_i386_coff) $(OBJDEP_i386_elf)
+OBJDEP_mips_multi = $(OBJDEP_mips_coff) $(OBJDEP_mips_ecoff) \
+ $(OBJDEP_mips_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 \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_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
+DEP_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
+DEP_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
+DEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
+DEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_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
+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 \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h
+DEP_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
+DEP_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
+DEP_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
+DEP_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
+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
+DEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_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
+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
+DEP_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h
+DEP_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
+DEP_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
+DEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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_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 \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_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
+DEP_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_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
+DEP_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
+DEP_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
+DEP_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_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
+DEP_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
+DEP_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
+DEP_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
+DEP_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_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
+DEP_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_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
+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_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+DEP_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
+DEP_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
+DEP_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
+DEP_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
+DEP_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
+DEP_hppa_som = $(BFDDIR)/som.h
+DEP_i386_multi = $(DEP_i386_coff) $(DEP_i386_elf)
+DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \
+ $(DEP_mips_elf)
+$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
+$(TARG_CPU_O): $(TCDEP_@target_cpu_type@_@obj_format@)
+$(OBJ_FORMAT_O): $(OBJDEP_@target_cpu_type@_@obj_format@)
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in
index f381c3f..51eb930 100644
--- a/contrib/binutils/gas/Makefile.in
+++ b/contrib/binutils/gas/Makefile.in
@@ -1,115 +1,96 @@
-# Makefile for GNU Assembler
-# Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 1997
-# Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.2e from Makefile.am
-# This file is part of GNU GAS.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# GNU 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.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-# GNU 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 GNU GAS; see the file COPYING. If not, write to the Free
-# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+SHELL = @SHELL@
-# The targets for external use include:
-# all, doc, proto, install, uninstall, includes, TAGS,
-# clean, mostlyclean, distclean, realclean, stage1, stage2, stage3, stage4.
-
-# Variables that exist for you to override.
-# See below for how to change them for certain systems.
-
-VPATH = @srcdir@
srcdir = @srcdir@
-srcroot = $(srcdir)/..
-
-target_alias = @target_alias@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
prefix = @prefix@
-
-program_transform_name = @program_transform_name@
exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
datadir = @datadir@
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
infodir = @infodir@
+mandir = @mandir@
includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
-VERSION=2.8.1
+top_builddir = .
-SHELL = /bin/sh
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-INSTALL = $${srcroot}/install.sh -c
+INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
-INSTALL_XFORM1= $(INSTALL_XFORM) -b=.1
-
-DISTSTUFF= make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
-
-AR = ar
-AR_FLAGS = qv
-BISON = bison -y
-BISONFLAGS =
-LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
-LEXFLAGS =
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-RANLIB = ranlib
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+ALL_OBJ_DEPS = @ALL_OBJ_DEPS@
+BFDLIB = @BFDLIB@
CC = @CC@
-HLDFLAGS = @HLDFLAGS@
-HLDENV = @HLDENV@
-RPATH_ENVVAR = @RPATH_ENVVAR@
-CFLAGS = -g
-LDFLAGS =
-DEP = mkdep
-
-MAKEOVERRIDES=
+EXEEXT = @EXEEXT@
+LD = @LD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NM = @NM@
+OPCODES_LIB = @OPCODES_LIB@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+atof = @atof@
+extra_objects = @extra_objects@
+obj_format = @obj_format@
+target_cpu_type = @target_cpu_type@
+te_file = @te_file@
+
+AUTOMAKE_OPTIONS = cygnus dejagnu
+
+SUBDIRS = doc
-EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
- echo $${rootme}/../expect/expect ; \
- else echo expect ; fi`
+tooldir = $(exec_prefix)/$(target_alias)
-FLAGS_TO_PASS = \
- "prefix=$(prefix)" \
- "exec_prefix=$(exec_prefix)" \
- "tooldir=$(tooldir)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CFLAGS=$(CFLAGS)" \
- "RANLIB=$(RANLIB)" \
- "LOADLIBES=$(LOADLIBES)" \
- "LDFLAGS=$(LDFLAGS)" \
- "BISON=$(BISON)" \
- "LEX=$(LEX)" \
- "MAKEINFO=$(MAKEINFO)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
+YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo bison -y ; fi`
+LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
-RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
- echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
- fi`
-RUNTESTFLAGS=
+DEP = mkdep
TARG_CPU = @target_cpu_type@
TARG_CPU_C = $(srcdir)/config/tc-@target_cpu_type@.c
@@ -133,6 +114,7 @@ IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
CPU_TYPES = \
a29k \
alpha \
+ arc \
arm \
d10v \
h8300 \
@@ -152,8 +134,10 @@ CPU_TYPES = \
sh \
sparc \
tahoe \
+ tic30 \
vax \
w65 \
+ v850 \
z8k
# Object format types. This is only used for dependency information.
@@ -180,7 +164,7 @@ CPU_OBJ_VALID = \
case $$o in \
aout) \
case $$c in \
- a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | vax) \
+ a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \
valid=yes ;; \
esac ;; \
bout) \
@@ -217,23 +201,23 @@ CPU_MULTI_VALID = \
# Regular source files.
-CFILES = \
+GAS_CFILES = \
app.c \
as.c \
atof-generic.c \
bignum-copy.c \
cond.c \
+ depend.c \
ecoff.c \
+ ehopt.c \
expr.c \
flonum-copy.c \
flonum-konst.c \
flonum-mult.c \
frags.c \
- gasp.c \
hash.c \
input-file.c \
input-scrub.c \
- itbl-ops.c \
listing.c \
literal.c \
macro.c \
@@ -246,6 +230,8 @@ CFILES = \
symbols.c \
write.c
+CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
+
HFILES = \
as.h \
bignum.h \
@@ -276,6 +262,7 @@ HFILES = \
TARGET_CPU_CFILES = \
config/tc-a29k.c \
config/tc-alpha.c \
+ config/tc-arc.c \
config/tc-arm.c \
config/tc-d10v.c \
config/tc-h8300.c \
@@ -295,13 +282,16 @@ TARGET_CPU_CFILES = \
config/tc-sh.c \
config/tc-sparc.c \
config/tc-tahoe.c \
+ config/tc-tic30.c \
config/tc-vax.c \
config/tc-w65.c \
+ config/tc-v850.c \
config/tc-z8k.c
TARGET_CPU_HFILES = \
config/tc-a29k.h \
config/tc-alpha.h \
+ config/tc-arc.h \
config/tc-arm.h \
config/tc-d10v.h \
config/tc-h8300.h \
@@ -321,8 +311,10 @@ TARGET_CPU_HFILES = \
config/tc-sh.h \
config/tc-sparc.h \
config/tc-tahoe.h \
+ config/tc-tic30.h \
config/tc-vax.h \
config/tc-w65.h \
+ config/tc-v850.h \
config/tc-z8k.h
# OBJ files in config
@@ -392,17 +384,20 @@ MULTI_CFILES = \
config/e-mipsecoff.c \
config/e-mipself.c
-# @target_frag@
-
-OBJS = \
+CONFIG_OBJS = \
$(TARG_CPU_O) \
$(OBJ_FORMAT_O) \
$(ATOF_TARG_O) \
+ $(extra_objects)
+
+GENERIC_OBJS = \
app.o \
as.o \
atof-generic.o \
bignum-copy.o \
cond.o \
+ depend.o \
+ ehopt.o \
expr.o \
flonum-konst.o \
flonum-copy.o \
@@ -422,379 +417,84 @@ OBJS = \
ecoff.o \
stabs.o \
sb.o \
- macro.o \
- @extra_objects@
+ macro.o
-GASPOBJS = \
- gasp.o \
- macro.o \
- sb.o \
- hash.o
+OBJS = $(CONFIG_OBJS) $(GENERIC_OBJS)
-all: .gdbinit as.new gasp.new
- @srcroot=`cd $(srcroot); pwd`; export srcroot; \
- (cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
+noinst_PROGRAMS = as-new gasp-new
+noinst_SCRIPTS = .gdbinit
-dvi info install-info clean-info:
- @srcroot=`cd $(srcroot); pwd`; export srcroot; \
- (cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
+EXTRA_DIST = make-gas.com
-make-gas.com: stamp-mk.com
-stamp-mk.com: vmsconf.sh Makefile
- sh $(srcdir)/vmsconf.sh $(OBJS) > new-make.com
- $(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
- touch stamp-mk.com
+DISTSTUFF = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
-# Now figure out from those variables how to compile and link.
-
-# This is the variable actually used when we compile.
-ALL_CFLAGS = -D_GNU_SOURCE $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES)
-
-# How to link with both our special library facilities
-# and the system's installed libraries.
+DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-opc.h
-LIBDEPS = @OPCODES_DEP@ @BFDDEP@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
-LIBS = @OPCODES_LIB@ @BFDLIB@ $(LOCAL_LOADLIBES) ../libiberty/libiberty.a
+# Now figure out from those variables how to compile and link.
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
+# This is the variable actually used when we compile.
# Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR)
-
-# Always use -I$(srcdir)/config when compiling.
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR)
-# This tells GNU make version 3 not to export all the variables
-# defined in this file into the environment.
-.NOEXPORT:
+# This should be parallel to INCLUDES, but should replace $(srcdir)
+# with $${srcdir}, and should work in a subdirectory. This is used
+# when building dependencies, because the dependency building is done
+# in a subdirectory.
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd
-# Files to be copied away after each stage in building.
-STAGESTUFF = *.o as.new gasp.new
-
-$(OBJS): @ALL_OBJ_DEPS@
-
-as.new: $(OBJS) $(LIBDEPS)
- $(HLDENV) $(CC) $(HLDFLAGS) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
-
-# 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 struc-symbol.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
-
-gasp.new: $(GASPOBJS) ../libiberty/libiberty.a
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new $(GASPOBJS) ../libiberty/libiberty.a $(LOADLIBES)
-
-installcheck:
- @echo No installcheck target is available yet for the GNU assembler.
+# How to link with both our special library facilities
+# and the system's installed libraries.
-site.exp: ./Makefile
- @echo "Making a new config file..."
- -@rm -f ./tmp?
- @touch site.exp
- -@mv site.exp site.bak
- @echo "## these variables are automatically generated by make ##" > ./tmp0
- @echo "# Do not edit here. If you wish to override these values," >> ./tmp0
- @echo "# do so in the last section." >> ./tmp0
- @echo set host_os @host_os@ >> ./tmp0
- @echo set host_alias @host_alias@ >> ./tmp0
- @echo set host_cpu @host_cpu@ >> ./tmp0
- @echo set host_vendor @host_vendor@ >> ./tmp0
- @echo set target_os @target_os@ >> ./tmp0
- @echo set target_alias @target_alias@ >> ./tmp0
- @echo set target_cpu @target_cpu@ >> ./tmp0
- @echo set target_vendor @target_vendor@ >> ./tmp0
- @echo set host_triplet @host@ >> ./tmp0
- @echo set target_triplet @target@ >> ./tmp0
- @echo set target_canonical @target@ >> ./tmp0
- @echo set srcdir ${srcdir}/testsuite >> ./tmp0
- @echo set exec_prefix ${exec_prefix} >> ./tmp0
- @echo set objdir `pwd` >> ./tmp0
- @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
- @sed -e '1,/^## All variables above are.*##/ d' < site.bak >> ./tmp0
- @mv -f ./tmp0 site.exp
-
-check: site.exp
- if [ -d testsuite ]; then \
- true; \
- else \
- mkdir testsuite; \
- fi
- rm -f testsuite/site.exp
- cp site.exp testsuite/site.exp
- rootme=`pwd`; export rootme; \
- srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
- $(RPATH_ENVVAR)=$$rootme/../bfd:$$rootme/../opcodes:$$$(RPATH_ENVVAR); \
- export $(RPATH_ENVVAR); \
- cd testsuite; \
- EXPECT=${EXPECT} ; export EXPECT ; \
- if [ -f $${rootme}/../expect/expect ] ; then \
- TCL_LIBRARY=$${srcdir}/../tcl/library ; \
- export TCL_LIBRARY ; fi ; \
- $(RUNTEST) --tool gas --srcdir $${srcdir}/testsuite $(RUNTESTFLAGS)
-
-config.status: configure
- $(SHELL) config.status --recheck
-
-config.h: config-stamp ; @true
-config-stamp: Makefile conf
- -rm -f config.new config-stamp
- echo '/* config.h. Generated automatically by make. */' > config.new
- echo '#ifndef GAS_VERSION' >> config.new
- echo '#define GAS_VERSION "$(VERSION)"' >> config.new
- echo '' >> config.new
- cat conf >> config.new
- echo '#endif /* GAS_VERSION */' >> config.new
- $(SHELL) $(srcdir)/../move-if-change config.new config.h
- touch config-stamp
+GASLIBS = @OPCODES_LIB@ @BFDLIB@ ../libiberty/libiberty.a
-# 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@)
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(TARG_CPU_C)
-$(ATOF_TARG_O): $(ATOF_TARG_C)
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(ATOF_TARG_C)
+# Files to be copied away after each stage in building.
+STAGESTUFF = *.o $(noinst_PROGRAMS)
-# ecoff.c only has full dependencies when ECOFF_DEBUGGING is defined,
-# so the automatic dependency stuff doesn't work.
-ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/aout/stab_gnu.h
+as_new_SOURCES = $(GAS_CFILES)
+as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
+ $(extra_objects) $(GASLIBS)
+as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
+ $(extra_objects) $(GASLIBS)
-# We need all these explicit rules for the multi stuff. Because of
-# these rules, we don't need one for OBJ_FORMAT_O.
+gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
+gasp_new_LDADD = ../libiberty/libiberty.a
-obj-aout.o : $(srcdir)/config/obj-aout.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-aout.c
-obj-bout.o : $(srcdir)/config/obj-bout.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-bout.c
-obj-coff.o: $(srcdir)/config/obj-coff.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-coff.c
-obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ecoff.c
-obj-elf.o : $(srcdir)/config/obj-elf.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-elf.c
-obj-evax.o : $(srcdir)/config/obj-evax.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-evax.c
-obj-hp300.o : $(srcdir)/config/obj-hp300.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-hp300.c
-obj-ieee.o : $(srcdir)/config/obj-ieee.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ieee.c
-obj-multi.o : $(srcdir)/config/obj-multi.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-multi.c
-obj-som.o : $(srcdir)/config/obj-som.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-som.c
-obj-vms.o : $(srcdir)/config/obj-vms.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-vms.c
+EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
+ echo $${rootme}/../expect/expect ; \
+ else echo expect ; fi`
-e-mipself.o : $(srcdir)/config/e-mipself.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipself.c
-e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipsecoff.c
-e-i386coff.o: $(srcdir)/config/e-i386coff.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386coff.c
-e-i386elf.o: $(srcdir)/config/e-i386elf.c
- $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386elf.c
+RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
+ echo $${srcdir}/../dejagnu/runtest ; else echo runtest; \
+ fi`
+RUNTESTFLAGS=
# The m68k operand parser.
-# Depend upon itbl-parse.c to serialize a parallel make.
-m68k-parse.c: $(srcdir)/config/m68k-parse.y itbl-parse.c
- $(BISON) $(BISONFLAGS) $(srcdir)/config/m68k-parse.y
- mv -f y.tab.c m68k-parse.c
-m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
-
-# The instruction table specification lexical analyzer and parser.
-
-itbl-lex.c: $(srcdir)/itbl-lex.l
- $(LEX) $(LEXFLAGS) $(srcdir)/itbl-lex.l
- mv -f lex.yy.c itbl-lex.c
-
-itbl-lex.o: itbl-lex.c itbl-parse.h
-
-itbl-parse.c: $(srcdir)/itbl-parse.y
- $(BISON) -d $(BISONFLAGS) $(srcdir)/itbl-parse.y
- mv -f y.tab.c itbl-parse.c
- mv -f y.tab.h itbl-parse.h
-
-itbl-parse.h: itbl-parse.c
-
-itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h
-
-itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
+EXTRA_as_new_SOURCES = config/m68k-parse.y
# stand-alone itbl assembler & disassembler
-itbl-test-ops.o: $(srcdir)/itbl-ops.c \
- $(srcdir)/itbl-ops.h itbl-parse.h
- $(CC) -o itbl-test-ops.o -DSTAND_ALONE -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/itbl-ops.c
-itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
- $(CC) -c -DSTAND_ALONE $(ALL_CFLAGS) $(INCLUDES)\
- $(srcdir)/testsuite/gas/all/itbl-test.c
-
-IT_TEST_OBJS= itbl-parse.o itbl-lex.o itbl-test-ops.o
-itbl-test: $(IT_TEST_OBJS) itbl-test.o $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o itbl-test itbl-test.o $(IT_TEST_OBJS) $(LIBS)
-
-# CGEN interface.
-
-cgen.o: cgen.c cgen-opc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/$(TARG_CPU)-opc.h
+EXTRA_PROGRAMS = itbl-test
+itbl_test_SOURCES = itbl-parse.y itbl-lex.l
+itbl_test_LDADD = itbl-test-ops.o itbl-test.o $(GASLIBS) @LEXLIB@
# Remake the info files.
-doc: $(srcdir)/as.info
-
-$(srcdir)/as.info: $(srcdir)/doc/as.texinfo
- @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)
-
-diststuff: $(DISTSTUFF) info
-
-clean-here:
- -rm -f $(STAGESTUFF) core stamp-mk.com
- -rm -f testsuite/*.o testsuite/*.out \
- testsuite/gas.log testsuite/gas.sum testsuite/site.exp
- -rm -rf dep.sed .tcdep .objdep .dep2 .dep1 .depa .dep .depdir
-
-clean mostlyclean: clean-here
- @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
-
-# Like clean but also delete the links made to configure gas.
-
-DISTCLEAN_HERE = config.status Makefile targ-env.h targ-cpu.h obj-format.h \
- TAGS itbl-cpu.h cgen-opc.h site.exp site.bak \
- config-stamp config.h conf config.log config.cache .gdbinit \
- testsuite/Makefile testsuite/config.status
-
-distclean: clean-here
- @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
- -rm -f $(DISTCLEAN_HERE)
-
-maintainer-clean realclean: clean-here
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- @cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@
- -rm -rf $(DISTCLEAN_HERE) $(DISTSTUFF)
-
-# Entry points `install', `includes' and `uninstall'.
-
-# Copy the files into directories where they will be run.
-install:
- srcroot=`cd $(srcroot); pwd`; export srcroot; \
- $(INSTALL_XFORM) as.new $(bindir)/as; \
- $(INSTALL_XFORM1) $(srcdir)/doc/as.1 $(man1dir)/as.1; \
- test -d $(tooldir) || mkdir $(tooldir); \
- test -d $(tooldir)/bin || mkdir $(tooldir)/bin; \
- n=`echo as | sed '$(program_transform_name)'`; \
- rm -f $(tooldir)/bin/as; \
- ln $(bindir)/$$n $(tooldir)/bin/as >/dev/null 2>/dev/null \
- || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as
- srcroot=`cd $(srcroot); pwd`; export srcroot; \
- $(INSTALL_XFORM) gasp.new $(bindir)/gasp
-
-# Cancel installation by deleting the installed files.
-uninstall:
- -n=`t='$(program_transform_name)'; echo as | sed $$t`; \
- rm -f $(bindir)/$$n; \
- rm -f $(mandir)/$$n.1
- -n=`t='$(program_transform_name)'; echo gasp | sed $$t`; \
- rm -f $(bindir)/$$n; \
-
-# These exist for maintenance purposes.
-
-tags TAGS: force
- etags $(HFILES) $(CFILES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
-
-bootstrap: as.new force
- $(MAKE) stage1
- rm -f stage && ln -s stage1 stage
- $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
- $(MAKE) stage2
- rm -f stage && ln -s stage2 stage
- $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
- $(MAKE) comparison against=stage2
-
-bootstrap2: force
- rm -f stage && ln -s stage1 stage
- $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
- $(MAKE) stage2
- rm -f stage && ln -s stage2 stage
- $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
- $(MAKE) comparison against=stage2
+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
-bootstrap3: force
- rm -f stage && ln -s stage2 stage
- $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new gasp.new
- $(MAKE) comparison against=stage2
-
-# Copy the object files from a particular stage into a subdirectory.
-stage1: force
- -mkdir stage1
- -mv $(STAGESTUFF) stage1
- if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
-
-stage2: force
- -mkdir stage2
- -mv $(STAGESTUFF) stage2
- if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
-
-stage3: force
- -mkdir stage3
- -mv $(STAGESTUFF) stage3
- if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
+CLEANFILES = dep.sed .tcdep .objdep .dep2 .dep1 .depa .dep .depdir
against=stage2
-# This rule is derived from corresponding code in the Makefile.in for gcc.
-# The "tail +16c" is to bypass headers which may include timestamps or
-# temporary assembly file names.
-comparison: force
- x=0 ; \
- for file in *.o ; do \
- tail +16c ./$$file > tmp-foo1; \
- if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
- if cmp tmp-foo1 tmp-foo2 ; then \
- true ; \
- else \
- echo $$file differs ; \
- x=1 ; \
- fi ; \
- else true; fi ; \
- done ; \
- exit $$x
- -rm -f tmp-foo*
-
-de-stage1: force
- - (cd stage1 ; rm -f as ; mv -f * ..)
- - rmdir stage1
-
-de-stage2: force
- - (cd stage2 ; rm -f as ; mv -f * ..)
- - rmdir stage2
-
-de-stage3: force
- - (cd stage3 ; rm -f as ; mv -f * ..)
- - rmdir stage3
-
-#In GNU Make, ignore whether `stage*' exists.
-.PHONY: stage1 stage2 stage3 stage4 clean mostlyclean realclean distclean
-.PHONY: TAGS bootstrap
-
-force:
-
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
- $(srcdir)/configure.in config.status conf.in
- $(SHELL) ./config.status
-.gdbinit: $(srcdir)/gdbinit.in config.status
- $(SHELL) ./config.status
-
# 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.
@@ -802,221 +502,6 @@ Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
$(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES)
-.dep: dep.sed $(DEP_FILE_DEPS) .tcdep .objdep .dep2
- rm -f .dep1
- $(MAKE) DEP=$(DEP) .dep1
- rm -rf .depdir
- sed -f dep.sed < .dep1 > .depa
- sed -f dep.sed < .tcdep >> .depa
- sed -f dep.sed < .objdep >> .depa
- sed -f dep.sed < .dep2 >> .depa
- echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '$$(TARG_CPU_O): $$(TCDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '$$(OBJ_FORMAT_O): $$(OBJDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
- echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> .depa
- $(SHELL) $(srcdir)/../move-if-change .depa .dep
-
-# This rule needs a mkdep that runs "gcc -MM".
-# FIXME: This only works correctly if $(srcdir) is an absolute path.
-.dep1: $(CFILES) $(MULTI_CFILES)
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
- cd .depdir; \
- echo '' > targ-cpu.h; \
- echo '' > obj-format.h; \
- echo '' > targ-env.h; \
- echo '' > itbl-cpu.h; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$(srcdir) -I../../bfd $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $?
- mv -f .depdir/.dep .dep1
-
-# Work out the special dependencies for the tc-*.c files.
-.tcdep: $(TARGET_CPU_CFILES)
- rm -f .tcdepa
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
- cd .depdir; \
- for c in $(CPU_TYPES); do \
- for o in $(OBJ_FORMATS); do \
- $(CPU_OBJ_VALID) \
- if [ x$${valid} = xyes ]; then \
- echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
- echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
- echo '#include "te-generic.h"' > targ-env.h; \
- echo '' > itbl-cpu.h; \
- echo '#include "opcodes/'"$${c}"'-opc.h"' > cgen-opc.h; \
- rm -f dummy.c; \
- cp $(srcdir)/config/tc-$${c}.c dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$(srcdir) -I../../bfd $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/TCDEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.tcdepa; \
- rm -f dummy.c; \
- else true; fi; \
- done; \
- done
- echo 'TCDEP_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
- echo ' $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h \' >> .tcdepa
- echo ' $(INCDIR)/opcode/hppa.h $(BFDDIR)/som.h' >> .tcdepa
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'TCDEP_'"$${c}"'_multi = \' >> .tcdepa; \
- echo '$$(TCDEP_'"$${c}"'_coff) \' >> .tcdepa; \
- if [ x$${valid} = xyes ]; then \
- echo '$$(TCDEP_'"$${c}"'_ecoff) \' >> .tcdepa; \
- else true; fi; \
- echo '$$(TCDEP_'"$${c}"'_elf)' >> .tcdepa; \
- else true; fi; \
- done
- mv -f .tcdepa .tcdep
-
-# Work out the special dependencies for the obj-*.c files.
-.objdep: $(OBJ_FORMAT_CFILES)
- rm -f .objdepa
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
- cd .depdir; \
- for c in $(CPU_TYPES); do \
- for o in $(OBJ_FORMATS); do \
- $(CPU_OBJ_VALID) \
- if [ x$${valid} = xyes ]; then \
- echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
- echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
- echo '#include "te-generic.h"' > targ-env.h; \
- echo '' > itbl-cpu.h; \
- rm -f dummy.c; \
- cp $(srcdir)/config/obj-$${o}.c dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$(srcdir) -I../../bfd $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/OBJDEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.objdepa; \
- rm -f dummy.c; \
- else true; fi; \
- done; \
- done
- echo 'OBJDEP_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
- echo ' $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h \' >> .objdepa
- echo ' $(BFDDIR)/som.h $(INCDIR)/aout/stab_gnu.h \' >> .objdepa
- echo ' $(INCDIR)/aout/stab.def' >> .objdepa
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'OBJDEP_'"$${c}"'_multi = \' >> .objdepa; \
- echo '$$(OBJDEP_'"$${c}"'_coff) \' >> .objdepa; \
- if [ x$${valid} = xyes ]; then \
- echo '$$(OBJDEP_'"$${c}"'_ecoff) \' >> .objdepa; \
- else true; fi; \
- echo '$$(OBJDEP_'"$${c}"'_elf)' >> .objdepa; \
- else true; fi; \
- done
- mv -f .objdepa .objdep
-
-# Work out the dependencies for each CPU/OBJ combination.
-# Note that SOM is a special case, because it only works native.
-# FIXME: This only works correctly if $(srcdir) is an absolute path.
-.dep2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES)
- rm -f .dep2a
- if [ -d .depdir ]; then true; else mkdir .depdir; fi
- cd .depdir; \
- for c in $(CPU_TYPES); do \
- for o in $(OBJ_FORMATS); do \
- $(CPU_OBJ_VALID) \
- if [ x$${valid} = xyes ]; then \
- echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
- echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
- echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
- $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$(srcdir) -I../../bfd $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) dummy.c; \
- sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" \
- -e '1,/DO NOT PUT ANYTHING AFTER/d' \
- -e '/IF YOU PUT ANYTHING/,$$d' \
- -e '/^$$/d' < .dep >> ../.dep2a; \
- else true; fi; \
- done; \
- done
- echo 'DEP_hppa_som = $(srcdir)/../bfd/som.h' >> .dep2a
- # We don't try to handle all multi cases.
- for c in $(CPU_TYPES); do \
- $(CPU_MULTI_VALID) \
- if [ x$${valid} = xyes ]; then \
- o=ecoff; \
- $(CPU_OBJ_VALID) \
- echo 'DEP_'"$${c}"'_multi = \' >> .dep2a; \
- echo '$$(DEP_'"$${c}"'_coff) \' >> .dep2a; \
- if [ x$${valid} = xyes ]; then \
- echo '$$(DEP_'"$${c}"'_ecoff) \' >> .dep2a; \
- else true; fi; \
- echo '$$(DEP_'"$${c}"'_elf)' >> .dep2a; \
- else true; fi; \
- done
- mv -f .dep2a .dep2
-
-dep.sed: dep-in.sed config.status
- sed <$(srcdir)/dep-in.sed >dep.sed \
- -e 's!@INCDIR@!$(INCDIR)!' \
- -e 's!@BFDDIR@!$(BFDDIR)!' \
- -e 's!@SRCDIR@!$(srcdir)!'
-
-dep: .dep
- sed -e '/^..DO NOT DELETE THIS LINE/,$$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
- cat .dep >> tmp-Makefile.in
- $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
-
-.PHONY: dep dep-in
-
-
-# DO NOT DELETE THIS LINE -- mkdep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-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 $(INCDIR)/obstack.h
-ecoff.o: ecoff.c
-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
-gasp.o: gasp.c sb.h macro.h
-hash.o: hash.c
-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
-write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
-e-i386coff.o: $(srcdir)/config/e-i386coff.c emul.h \
- emul-target.h
-e-i386elf.o: $(srcdir)/config/e-i386elf.c emul.h emul-target.h
-e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul.h \
- emul-target.h
-e-mipself.o: $(srcdir)/config/e-mipself.c emul.h emul-target.h
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
TCDEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
TCDEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
@@ -1041,6 +526,14 @@ TCDEP_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
TCDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/alpha.h \
$(srcdir)/config/atof-vax.c
+TCDEP_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
+TCDEP_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
TCDEP_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
TCDEP_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
@@ -1060,10 +553,11 @@ TCDEP_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h
TCDEP_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)/opcode/h8300.h
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
TCDEP_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 $(INCDIR)/opcode/h8300.h
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
TCDEP_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
@@ -1109,12 +603,12 @@ TCDEP_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/opcode/i960.h
TCDEP_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 cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
- $(INCDIR)/opcode/cgen.h
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h \
+ $(srcdir)/../opcodes/m32r-opc.h $(INCDIR)/opcode/cgen.h
TCDEP_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 cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
+ $(INCDIR)/obstack.h $(INCDIR)/symcat.h cgen-opc.h $(srcdir)/../opcodes/m32r-opc.h \
$(INCDIR)/opcode/cgen.h
TCDEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
@@ -1202,7 +696,7 @@ TCDEP_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
TCDEP_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)/obstack.h $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h
TCDEP_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
@@ -1213,6 +707,14 @@ TCDEP_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
+TCDEP_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
+TCDEP_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
+TCDEP_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
TCDEP_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
@@ -1233,6 +735,13 @@ TCDEP_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
+TCDEP_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
+TCDEP_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
TCDEP_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
@@ -1266,8 +775,15 @@ OBJDEP_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)/aout/aout64.h
+ $(INCDIR)/elf/alpha.h $(INCDIR)/aout/aout64.h
OBJDEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
+OBJDEP_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
+OBJDEP_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
OBJDEP_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
@@ -1437,6 +953,16 @@ OBJDEP_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
+OBJDEP_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
+OBJDEP_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
+OBJDEP_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
OBJDEP_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
@@ -1457,6 +983,13 @@ OBJDEP_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
+OBJDEP_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
+OBJDEP_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
OBJDEP_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
@@ -1486,6 +1019,11 @@ DEP_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
DEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
+DEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
DEP_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
@@ -1613,6 +1151,14 @@ DEP_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
DEP_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
+DEP_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_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
+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_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
@@ -1628,6 +1174,11 @@ DEP_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
DEP_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
+DEP_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_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
DEP_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
@@ -1638,7 +1189,830 @@ DEP_hppa_som = $(BFDDIR)/som.h
DEP_i386_multi = $(DEP_i386_coff) $(DEP_i386_elf)
DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \
$(DEP_mips_elf)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = .gdbinit
+noinst_PROGRAMS = as-new$(EXEEXT) gasp-new$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I.
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+itbl_test_OBJECTS = itbl-parse.o itbl-lex.o
+itbl_test_DEPENDENCIES = itbl-test-ops.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 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_LDFLAGS =
+gasp_new_OBJECTS = gasp.o macro.o sb.o hash.o
+gasp_new_DEPENDENCIES = ../libiberty/libiberty.a
+gasp_new_LDFLAGS =
+SCRIPTS = $(noinst_SCRIPTS)
+
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LEXLIB = @LEXLIB@
+YLWRAP = $(top_srcdir)/../ylwrap
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON = README COPYING ChangeLog Makefile.am Makefile.in NEWS \
+acconfig.h acinclude.m4 aclocal.m4 config.in config/m68k-parse.c \
+configure configure.in gdbinit.in itbl-lex.c itbl-parse.c stamp-h.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP = --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)
+
+default: all
+
+.SUFFIXES:
+.SUFFIXES: .S .c .l .lo .o .s .y
+$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINT@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @:
+stamp-h: $(srcdir)/config.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h:config.in \
+ $(SHELL) ./config.status
+ @echo timestamp > stamp-h
+$(srcdir)/config.in: @MAINT@$(srcdir)/stamp-h.in
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @echo timestamp > $(srcdir)/stamp-h.in
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+.gdbinit: $(top_builddir)/config.status gdbinit.in
+ cd $(top_builddir) && CONFIG_FILES=$@:gdbinit.in CONFIG_HEADERS= ./config.status
+
+mostlyclean-noinstPROGRAMS:
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+distclean-noinstPROGRAMS:
+
+maintainer-clean-noinstPROGRAMS:
+
+.c.o:
+ $(COMPILE) -c $<
+
+.s.o:
+ $(COMPILE) -c $<
+
+.S.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+itbl-test$(EXEEXT): $(itbl_test_OBJECTS) $(itbl_test_DEPENDENCIES)
+ @rm -f itbl-test$(EXEEXT)
+ $(LINK) $(itbl_test_LDFLAGS) $(itbl_test_OBJECTS) $(itbl_test_LDADD) $(LIBS)
+
+as-new$(EXEEXT): $(as_new_OBJECTS) $(as_new_DEPENDENCIES)
+ @rm -f as-new$(EXEEXT)
+ $(LINK) $(as_new_LDFLAGS) $(as_new_OBJECTS) $(as_new_LDADD) $(LIBS)
+
+gasp-new$(EXEEXT): $(gasp_new_OBJECTS) $(gasp_new_DEPENDENCIES)
+ @rm -f gasp-new$(EXEEXT)
+ $(LINK) $(gasp_new_LDFLAGS) $(gasp_new_OBJECTS) $(gasp_new_LDADD) $(LIBS)
+.y.c:
+ $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS)
+config/m68k-parse.h: config/m68k-parse.c
+itbl-parse.h: itbl-parse.c
+
+.l.c:
+ $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ target=`echo $@ | sed s/-recursive//`; \
+ echo "Making $$target in $$subdir"; \
+ (cd $$subdir && $(MAKE) $$target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ done; \
+ for subdir in $$rev; do \
+ target=`echo $@ | sed s/-recursive//`; \
+ echo "Making $$target in $$subdir"; \
+ (cd $$subdir && $(MAKE) $$target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ (cd $$subdir && $(MAKE) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ awk ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) \
+ && $(MAKE) dvi \
+ && $(MAKE) check \
+ && $(MAKE) install \
+ && $(MAKE) installcheck \
+ && $(MAKE) dist
+ -rm -rf $(distdir)
+ @echo "========================"; \
+ echo "$(distdir).tar.gz is ready for distribution"; \
+ echo "========================"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done
+ for subdir in $(SUBDIRS); do \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ done
+
+DEJATOOL = $(PACKAGE)
+
+RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+site.exp: Makefile
+ @echo 'Making a new site.exp file...'
+ -@rm -f site.bak
+ @echo '## these variables are automatically generated by make ##' > $@-t
+ @echo '# Do not edit here. If you wish to override these values' >> $@-t
+ @echo '# edit the last section' >> $@-t
+ @echo 'set tool $(DEJATOOL)' >> $@-t
+ @echo 'set srcdir $(srcdir)' >> $@-t
+ @echo 'set objdir' `pwd` >> $@-t
+ @echo 'set host_alias $(host_alias)' >> $@-t
+ @echo 'set host_triplet $(host_triplet)' >> $@-t
+ @echo 'set target_alias $(target_alias)' >> $@-t
+ @echo 'set target_triplet $(target_triplet)' >> $@-t
+ @echo 'set build_alias $(build_alias)' >> $@-t
+ @echo 'set build_triplet $(build_triplet)' >> $@-t
+ @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
+ -@sed '1,/^## All variables above are.*##/ d' site.bak >> $@-t
+ -@mv site.exp site.bak
+ @mv $@-t site.exp
+info: info-recursive
+dvi: dvi-recursive
+check:
+ $(MAKE) check-recursive check-DEJAGNU
+installcheck: installcheck-recursive
+install-info: install-info-recursive
+all-recursive-am: config.h
+ $(MAKE) all-recursive
+
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h
+
+install-exec-am: install-exec-local
+
+install-exec: install-exec-recursive install-exec-am
+ @$(NORMAL_INSTALL)
+
+install-data: install-data-recursive
+ @$(NORMAL_INSTALL)
+
+install: install-recursive install-exec-am
+ @:
+
+uninstall: uninstall-recursive
+
+all: all-recursive-am all-am
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs: installdirs-recursive
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
+ mostlyclean-compile mostlyclean-libtool \
+ mostlyclean-tags mostlyclean-generic
+
+clean-am: clean-hdr clean-noinstPROGRAMS clean-compile clean-libtool \
+ clean-tags clean-generic mostlyclean-am
+
+distclean-am: distclean-hdr distclean-noinstPROGRAMS distclean-compile \
+ distclean-libtool distclean-tags distclean-generic \
+ clean-am
+
+maintainer-clean-am: maintainer-clean-hdr \
+ maintainer-clean-noinstPROGRAMS \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+
+mostlyclean: mostlyclean-recursive mostlyclean-am
+
+clean: clean-recursive clean-am
+
+distclean: distclean-recursive distclean-am
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-recursive maintainer-clean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f config.status
+
+.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
+maintainer-clean-hdr mostlyclean-noinstPROGRAMS \
+distclean-noinstPROGRAMS clean-noinstPROGRAMS \
+maintainer-clean-noinstPROGRAMS mostlyclean-compile distclean-compile \
+clean-compile maintainer-clean-compile mostlyclean-libtool \
+distclean-libtool clean-libtool maintainer-clean-libtool \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \
+info dvi installcheck install-info all-recursive-am all-am \
+install-exec-am install-exec install-data install uninstall all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+$(srcdir)/make-gas.com: stamp-mk.com
+stamp-mk.com: vmsconf.sh Makefile
+ sh $(srcdir)/vmsconf.sh $(GENERIC_OBJS) > new-make.com
+ $(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
+ touch stamp-mk.com
+diststuff: $(DISTSTUFF) info
+
+$(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 struc-symbol.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
+
+check-DEJAGNU: site.exp
+ if [ -d testsuite ]; then \
+ true; \
+ else \
+ mkdir testsuite; \
+ fi
+ rm -f testsuite/site.exp
+ cp site.exp testsuite/site.exp
+ rootme=`pwd`; export rootme; \
+ srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
+ EXPECT=${EXPECT} ; export EXPECT ; \
+ if [ -f $(top_builddir)/../expect/expect ]; then \
+ TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
+ export TCL_LIBRARY; \
+ fi; \
+ runtest=$(RUNTEST); \
+ cd testsuite; \
+ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
+ $(RUNTESTFLAGS); \
+ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+ fi
+
+# 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@)
+ $(COMPILE) -c $(TARG_CPU_C)
+$(ATOF_TARG_O): $(ATOF_TARG_C)
+ $(COMPILE) -c $(ATOF_TARG_C)
+
+# ecoff.c only has full dependencies when ECOFF_DEBUGGING is defined,
+# so the automatic dependency stuff doesn't work.
+ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/aout/stab_gnu.h
+
+# We need all these explicit rules for the multi stuff. Because of
+# these rules, we don't need one for OBJ_FORMAT_O.
+
+obj-aout.o : $(srcdir)/config/obj-aout.c
+ $(COMPILE) -c $(srcdir)/config/obj-aout.c
+obj-bout.o : $(srcdir)/config/obj-bout.c
+ $(COMPILE) -c $(srcdir)/config/obj-bout.c
+obj-coff.o: $(srcdir)/config/obj-coff.c
+ $(COMPILE) -c $(srcdir)/config/obj-coff.c
+obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
+ $(COMPILE) -c $(srcdir)/config/obj-ecoff.c
+obj-elf.o : $(srcdir)/config/obj-elf.c
+ $(COMPILE) -c $(srcdir)/config/obj-elf.c
+obj-evax.o : $(srcdir)/config/obj-evax.c
+ $(COMPILE) -c $(srcdir)/config/obj-evax.c
+obj-hp300.o : $(srcdir)/config/obj-hp300.c
+ $(COMPILE) -c $(srcdir)/config/obj-hp300.c
+obj-ieee.o : $(srcdir)/config/obj-ieee.c
+ $(COMPILE) -c $(srcdir)/config/obj-ieee.c
+obj-multi.o : $(srcdir)/config/obj-multi.c
+ $(COMPILE) -c $(srcdir)/config/obj-multi.c
+obj-som.o : $(srcdir)/config/obj-som.c
+ $(COMPILE) -c $(srcdir)/config/obj-som.c
+obj-vms.o : $(srcdir)/config/obj-vms.c
+ $(COMPILE) -c $(srcdir)/config/obj-vms.c
+
+e-mipself.o : $(srcdir)/config/e-mipself.c
+ $(COMPILE) -c $(srcdir)/config/e-mipself.c
+e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c
+ $(COMPILE) -c $(srcdir)/config/e-mipsecoff.c
+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
+
+m68k-parse.c: $(srcdir)/config/m68k-parse.y
+ $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/config/m68k-parse.y y.tab.c m68k-parse.c --
+m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
+
+# Don't let the .y.h rule clobber m68k-parse.h.
+m68k-parse.h: ; @true
+$(srcdir)/config/m68k-parse.h: ; @true
+
+# The instruction table specification lexical analyzer and parser.
+
+itbl-lex.c: $(srcdir)/itbl-lex.l
+itbl-lex.o: itbl-lex.c itbl-parse.h
+
+itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h
+
+itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
+
+itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
+ $(SHELL) $(YLWRAP) "$(YACC)" $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- -d
+
+itbl-test-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h
+ $(COMPILE) -o itbl-test-ops.o -DSTAND_ALONE -c $(srcdir)/itbl-ops.c
+
+itbl-test.o: $(srcdir)/testsuite/gas/all/itbl-test.c $(srcdir)/itbl-ops.h
+ $(COMPILE) -c -DSTAND_ALONE $(srcdir)/testsuite/gas/all/itbl-test.c
+
+# CGEN interface.
+
+cgen.o: cgen.c cgen-opc.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/$(TARG_CPU)-opc.h
+
+.PHONY: install-exec-local install-data-local
+
+install-exec-local: $(noinst_PROGRAMS)
+ $(mkinstalldirs) $(bindir) $(tooldir)/bin
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/-new//'|sed '$(transform)'`; \
+ else :; fi; \
+ done
+ rm -f $(tooldir)/bin/as$(EXEEXT)
+ n=`echo as | sed '$(transform)'`; \
+ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
+ ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
+ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \
+ fi
+
+# These exist for maintenance purposes.
+
+.PHONY: bootstrap bootstrap2 bootstrap3 stage1 stage2 stage3 comparison
+
+bootstrap: as-new
+ $(MAKE) stage1
+ rm -f stage && ln -s stage1 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) stage2
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) comparison against=stage2
+
+bootstrap2:
+ rm -f stage && ln -s stage1 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) stage2
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) comparison against=stage2
+
+bootstrap3:
+ rm -f stage && ln -s stage2 stage
+ $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage/ $(CFLAGS)" libdir=$(libdir) ALLOCA= $(noinst_PROGRAMS)
+ $(MAKE) comparison against=stage2
+
+# Copy the object files from a particular stage into a subdirectory.
+stage1:
+ -mkdir stage1
+ -mv $(STAGESTUFF) stage1
+ if [ -f stage1/as-new$(EXEEXT) -a ! -f stage1/as$(EXEEXT) ] ; then (cd stage1 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
+
+stage2:
+ -mkdir stage2
+ -mv $(STAGESTUFF) stage2
+ if [ -f stage2/as-new$(EXEEXT) -a ! -f stage2/as$(EXEEXT) ] ; then (cd stage2 ; ln -s as-new$(EXEEXT) as$(EXEEXT)) ; fi
+
+stage3:
+ -mkdir stage3
+ -mv $(STAGESTUFF) stage3
+ if [ -f stage3/as-new$(EXEEXT) -a ! -f stage3/as$(EXEEXT) ] ; then (cd stage3 ; ln -s as-new as$(EXEEXT)) ; fi
+
+# This rule is derived from corresponding code in the Makefile.in for gcc.
+# The "tail +16c" is to bypass headers which may include timestamps or
+# temporary assembly file names.
+comparison:
+ x=0 ; \
+ for file in *.o ; do \
+ tail +16c ./$$file > tmp-foo1; \
+ if tail +16c ${against}/$$file > tmp-foo2 2>/dev/null ; then \
+ if cmp tmp-foo1 tmp-foo2 ; then \
+ true ; \
+ else \
+ echo $$file differs ; \
+ x=1 ; \
+ fi ; \
+ else true; fi ; \
+ done ; \
+ exit $$x
+ -rm -f tmp-foo*
+
+.PHONY: de-stage1 de-stage2 de-stage3
+
+de-stage1:
+ - (cd stage1 ; rm -f as$(EXEEXT) ; mv -f * ..)
+ - rmdir stage1
+
+de-stage2:
+ - (cd stage2 ; rm -f as$(EXEEXT) ; mv -f * ..)
+ - rmdir stage2
+
+de-stage3:
+ - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..)
+ - rmdir stage3
+
+.dep: dep.sed $(DEP_FILE_DEPS) .tcdep .objdep .dep2
+ rm -f .dep1
+ srcdir=`cd $(srcdir); pwd`; \
+ $(MAKE) DEP=$(DEP) srcdir=$${srcdir} VPATH=$${srcdir} .dep1
+ rm -rf .depdir
+ sed -f dep.sed < .dep1 > .depa
+ sed -f dep.sed < .tcdep >> .depa
+ sed -f dep.sed < .objdep >> .depa
+ sed -f dep.sed < .dep2 >> .depa
+ echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> .depa
+ echo '$$(TARG_CPU_O): $$(TCDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
+ echo '$$(OBJ_FORMAT_O): $$(OBJDEP_@target''_cpu_type@_@obj''_format@)' >> .depa
+ echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> .depa
+ $(SHELL) $(srcdir)/../move-if-change .depa .dep
+
+# This rule needs a mkdep that runs "gcc -MM".
+.dep1: $(CFILES) $(MULTI_CFILES)
+ if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ srcdir=`cd $(srcdir); pwd`; \
+ cd .depdir; \
+ echo '' > targ-cpu.h; \
+ echo '' > obj-format.h; \
+ echo '' > targ-env.h; \
+ echo '' > itbl-cpu.h; \
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
+ $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $?
+ sed -e '/IF YOU PUT ANYTHING/,$$d' < .depdir/.dep > .dep1
+ rm -f .depdir/.dep
+
+# Work out the special dependencies for the tc-*.c files.
+.tcdep: $(TARGET_CPU_CFILES)
+ rm -f .tcdepa
+ if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ srcdir=`cd $(srcdir); pwd`; \
+ cd .depdir; \
+ for c in $(CPU_TYPES); do \
+ for o in $(OBJ_FORMATS); do \
+ $(CPU_OBJ_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
+ echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
+ echo '#include "te-generic.h"' > targ-env.h; \
+ echo '' > itbl-cpu.h; \
+ echo '#include "opcodes/'"$${c}"'-opc.h"' > cgen-opc.h; \
+ rm -f dummy.c; \
+ cp $${srcdir}/config/tc-$${c}.c dummy.c; \
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
+ $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
+ sed -e "s/dummy.o: dummy.c/TCDEP_$${c}_$${o} =/" \
+ -e '1,/DO NOT PUT ANYTHING AFTER/d' \
+ -e '/IF YOU PUT ANYTHING/,$$d' \
+ -e '/^$$/d' < .dep >> ../.tcdepa; \
+ rm -f dummy.c; \
+ else true; fi; \
+ done; \
+ done
+ echo 'TCDEP_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> .tcdepa
+ echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .tcdepa
+ echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> .tcdepa
+ # We don't try to handle all multi cases.
+ for c in $(CPU_TYPES); do \
+ $(CPU_MULTI_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ o=ecoff; \
+ $(CPU_OBJ_VALID) \
+ echo 'TCDEP_'"$${c}"'_multi = \' >> .tcdepa; \
+ echo '$$(TCDEP_'"$${c}"'_coff) \' >> .tcdepa; \
+ if [ x$${valid} = xyes ]; then \
+ echo '$$(TCDEP_'"$${c}"'_ecoff) \' >> .tcdepa; \
+ else true; fi; \
+ echo '$$(TCDEP_'"$${c}"'_elf)' >> .tcdepa; \
+ else true; fi; \
+ done
+ mv -f .tcdepa .tcdep
+
+# Work out the special dependencies for the obj-*.c files.
+.objdep: $(OBJ_FORMAT_CFILES)
+ rm -f .objdepa
+ if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ srcdir=`cd $(srcdir); pwd`; \
+ cd .depdir; \
+ for c in $(CPU_TYPES); do \
+ for o in $(OBJ_FORMATS); do \
+ $(CPU_OBJ_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
+ echo '#include "obj-'"$${o}"'.h"' > obj-format.h; \
+ echo '#include "te-generic.h"' > targ-env.h; \
+ echo '' > itbl-cpu.h; \
+ rm -f dummy.c; \
+ cp $${srcdir}/config/obj-$${o}.c dummy.c; \
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
+ $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
+ sed -e "s/dummy.o: dummy.c/OBJDEP_$${c}_$${o} =/" \
+ -e '1,/DO NOT PUT ANYTHING AFTER/d' \
+ -e '/IF YOU PUT ANYTHING/,$$d' \
+ -e '/^$$/d' < .dep >> ../.objdepa; \
+ rm -f dummy.c; \
+ else true; fi; \
+ done; \
+ done
+ echo 'OBJDEP_hppa_som = $$(srcdir)/config/obj-som.h subsegs.h \' >> .objdepa
+ echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> .objdepa
+ echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> .objdepa
+ echo ' $$(INCDIR)/aout/stab.def' >> .objdepa
+ # We don't try to handle all multi cases.
+ for c in $(CPU_TYPES); do \
+ $(CPU_MULTI_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ o=ecoff; \
+ $(CPU_OBJ_VALID) \
+ echo 'OBJDEP_'"$${c}"'_multi = \' >> .objdepa; \
+ echo '$$(OBJDEP_'"$${c}"'_coff) \' >> .objdepa; \
+ if [ x$${valid} = xyes ]; then \
+ echo '$$(OBJDEP_'"$${c}"'_ecoff) \' >> .objdepa; \
+ else true; fi; \
+ echo '$$(OBJDEP_'"$${c}"'_elf)' >> .objdepa; \
+ else true; fi; \
+ done
+ mv -f .objdepa .objdep
+
+# 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
+ if [ -d .depdir ]; then true; else mkdir .depdir; fi
+ srcdir=`cd $(srcdir); pwd`; \
+ cd .depdir; \
+ for c in $(CPU_TYPES); do \
+ for o in $(OBJ_FORMATS); do \
+ $(CPU_OBJ_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
+ echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
+ echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep; \
+ $(DEP) -f .dep -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c; \
+ sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" \
+ -e '1,/DO NOT PUT ANYTHING AFTER/d' \
+ -e '/IF YOU PUT ANYTHING/,$$d' \
+ -e '/^$$/d' < .dep >> ../.dep2a; \
+ else true; fi; \
+ done; \
+ done
+ echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> .dep2a
+ # We don't try to handle all multi cases.
+ for c in $(CPU_TYPES); do \
+ $(CPU_MULTI_VALID) \
+ if [ x$${valid} = xyes ]; then \
+ o=ecoff; \
+ $(CPU_OBJ_VALID) \
+ echo 'DEP_'"$${c}"'_multi = \' >> .dep2a; \
+ echo '$$(DEP_'"$${c}"'_coff) \' >> .dep2a; \
+ if [ x$${valid} = xyes ]; then \
+ echo '$$(DEP_'"$${c}"'_ecoff) \' >> .dep2a; \
+ else true; fi; \
+ echo '$$(DEP_'"$${c}"'_elf)' >> .dep2a; \
+ else true; fi; \
+ done
+ mv -f .dep2a .dep2
+
+dep.sed: dep-in.sed config.status
+ srcdir=`cd $(srcdir); pwd`; \
+ sed <$(srcdir)/dep-in.sed >dep.sed \
+ -e "s!@INCDIR@!$${srcdir}/../include!" \
+ -e "s!@BFDDIR@!$${srcdir}/../bfd!" \
+ -e "s!@SRCDIR@!$${srcdir}!"
+
+dep: .dep
+ sed -e '/^..DO NOT DELETE THIS LINE/,$$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
+ 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
+ cat .dep >> tmp-Makefile.am
+ $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
+
+.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
+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
+ecoff.o: ecoff.c
+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
+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
+write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
+gasp.o: gasp.c sb.h macro.h
+e-i386coff.o: $(srcdir)/config/e-i386coff.c emul.h \
+ emul-target.h
+e-i386elf.o: $(srcdir)/config/e-i386elf.c emul.h emul-target.h
+e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul.h \
+ emul-target.h
+e-mipself.o: $(srcdir)/config/e-mipself.c emul.h emul-target.h
$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
$(TARG_CPU_O): $(TCDEP_@target_cpu_type@_@obj_format@)
$(OBJ_FORMAT_O): $(OBJDEP_@target_cpu_type@_@obj_format@)
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
+
+# 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.
+.NOEXPORT:
diff --git a/contrib/binutils/gas/NEWS b/contrib/binutils/gas/NEWS
index c60c8b8..de21098 100644
--- a/contrib/binutils/gas/NEWS
+++ b/contrib/binutils/gas/NEWS
@@ -1,5 +1,19 @@
-*- text -*-
+Changes in 2.9:
+
+Texas Instruction c30 (tms320c30) support added.
+
+The assembler now optimizes the exception frame information generated by egcs
+and gcc 2.8. The new --traditional-format disables this optimization.
+
+Added --gstabs option to generate stabs debugging information.
+
+The -a option takes a new suboption, m (e.g., -alm) to expand macros in a
+listing.
+
+Added -MD option to print dependencies.
+
Changes in 2.8:
BeOS support added.
@@ -46,7 +60,7 @@ default is to build COFF-only support. To get a set of tools that generate ELF
(they'll understand both COFF and ELF), you must configure with
target=i386-unknown-sco3.2v5elf.
-m88k-motorola-sysv* support added.
+m88k-motorola-sysv3* support added.
Changes in 2.6:
diff --git a/contrib/binutils/gas/README b/contrib/binutils/gas/README
index 418b8bd..c7f3226 100644
--- a/contrib/binutils/gas/README
+++ b/contrib/binutils/gas/README
@@ -171,6 +171,7 @@ Native assembling should work on:
sco 3.2v4.2
sco openserver 5.0 (a.k.a. 3.2v5.0 )
sparc solaris
+ ns32k (netbsd, lites)
I believe that gas as a cross-assembler can currently be targetted for
most of the above hosts, plus
@@ -199,7 +200,7 @@ run gcc on it. Or run "gcc -xassembler-with-cpp foo.s".
Support for ELF should work now for sparc, hppa, i386, alpha, m68k,
MIPS, powerpc.
-Support for ns32k, tahoe, i860, m88k may be suffering from bitrot.
+Support for sequent (ns32k), tahoe, i860, m88k may be suffering from bitrot.
If you try out gas on some host or target not listed above, please let me know
the results, so I can update the list.
@@ -226,10 +227,10 @@ warning message when this happens.
REPORTING BUGS IN GAS
=====================
-Bugs in gas should be reported to bug-gnu-utils@prep.ai.mit.edu. 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.
+Bugs in gas should be reported to bug-gnu-utils@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.
If you report a bug in GAS, please remember to include:
diff --git a/contrib/binutils/gas/acconfig.h b/contrib/binutils/gas/acconfig.h
index d2ca454..c9c6002 100644
--- a/contrib/binutils/gas/acconfig.h
+++ b/contrib/binutils/gas/acconfig.h
@@ -1,3 +1,9 @@
+/* Name of package. */
+#undef PACKAGE
+
+/* Version of package. */
+#undef VERSION
+
/* Should gas use high-level BFD interfaces? */
#undef BFD_ASSEMBLER
@@ -34,9 +40,9 @@
#undef MANY_SEGMENTS
-/* Needed only for sparc configuration. */
-#undef SPARC_V9
-#undef SPARC_ARCH64
+/* The configure script defines this for some targets based on the
+ target name used. It is not always defined. */
+#undef TARGET_BYTES_BIG_ENDIAN
/* Needed only for some configurations that can produce multiple output
formats. */
@@ -59,3 +65,15 @@
#undef I386COFF
#undef M68KCOFF
#undef M88KCOFF
+
+/* Using cgen code? */
+#undef USING_CGEN
+
+/* Needed only for sparc configuration. */
+#undef DEFAULT_ARCH
+
+/* Needed only for PowerPC Solaris. */
+#undef TARGET_SOLARIS_COMMENT
+
+/* Needed only for SCO 5. */
+#undef SCO_ELF
diff --git a/contrib/binutils/gas/acinclude.m4 b/contrib/binutils/gas/acinclude.m4
new file mode 100644
index 0000000..60f54e9
--- /dev/null
+++ b/contrib/binutils/gas/acinclude.m4
@@ -0,0 +1,58 @@
+dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
+AC_DEFUN(GAS_CHECK_DECL_NEEDED,[
+AC_MSG_CHECKING(whether declaration is required for $1)
+AC_CACHE_VAL(gas_cv_decl_needed_$1,
+AC_TRY_LINK([$4],
+[
+typedef $3;
+$2 x;
+x = ($2) $1;
+], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
+AC_MSG_RESULT($gas_cv_decl_needed_$1)
+test $gas_cv_decl_needed_$1 = no || {
+ ifelse(index($1,[$]),-1,
+ [AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]))],
+ [gas_decl_name_upcase=`echo $1 | tr '[a-z]' '[A-Z]'`
+ AC_DEFINE_UNQUOTED(NEED_DECLARATION_$gas_decl_name_upcase)])
+}
+])dnl
+dnl
+dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
+dnl enough, but on some of those systems, the assert macro relies on requoting
+dnl working properly!
+dnl GAS_WORKING_ASSERT
+AC_DEFUN(GAS_WORKING_ASSERT,
+[AC_MSG_CHECKING([for working assert macro])
+AC_CACHE_VAL(gas_cv_assert_ok,
+AC_TRY_LINK([#include <assert.h>
+#include <stdio.h>], [
+/* check for requoting problems */
+static int a, b, c, d;
+static char *s;
+assert (!strcmp(s, "foo bar baz quux"));
+/* check for newline handling */
+assert (a == b
+ || c == d);
+], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
+AC_MSG_RESULT($gas_cv_assert_ok)
+test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT)
+])dnl
+dnl
+dnl Since many Bourne shell implementations lack subroutines, use this
+dnl hack to simplify the code in configure.in.
+dnl GAS_UNIQ(listvar)
+AC_DEFUN(GAS_UNIQ,
+[_gas_uniq_list="[$]$1"
+_gas_uniq_newlist=""
+dnl Protect against empty input list.
+for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
+ case [$]_gas_uniq_i in
+ _gas_uniq_dummy) ;;
+ *) case " [$]_gas_uniq_newlist " in
+ *" [$]_gas_uniq_i "*) ;;
+ *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
+ esac ;;
+ esac
+done
+$1=[$]_gas_uniq_newlist
+])dnl
diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4
index 60f54e9..c60bd9f 100644
--- a/contrib/binutils/gas/aclocal.m4
+++ b/contrib/binutils/gas/aclocal.m4
@@ -1,3 +1,15 @@
+dnl aclocal.m4 generated automatically by aclocal 1.2e
+
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
AC_DEFUN(GAS_CHECK_DECL_NEEDED,[
AC_MSG_CHECKING(whether declaration is required for $1)
@@ -56,3 +68,450 @@ for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
done
$1=[$]_gas_uniq_newlist
])dnl
+
+# 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.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AM_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+
+# serial 1
+
+AC_DEFUN(AM_PROG_INSTALL,
+[AC_REQUIRE([AC_PROG_INSTALL])
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+AC_SUBST(INSTALL_SCRIPT)dnl
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# 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.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+
+# serial 24 AM_PROG_LIBTOOL
+AC_DEFUN(AM_PROG_LIBTOOL,
+[AC_REQUIRE([AM_ENABLE_SHARED])dnl
+AC_REQUIRE([AM_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AM_PROG_LD])dnl
+AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags=
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$host" 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.
+ CFLAGS="$CFLAGS -belf"
+ ;;
+esac
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| AC_MSG_ERROR([libtool configure failed])
+])
+
+# AM_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AM_ENABLE_SHARED,
+[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+changequote([, ])dnl
+[ --enable-shared=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list],
+[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=AM_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AM_DISABLE_SHARED,
+[AM_ENABLE_SHARED(no)])
+
+# AM_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AM_DISABLE_STATIC,
+[AM_ENABLE_STATIC(no)])
+
+# AM_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AM_ENABLE_STATIC,
+[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+changequote([, ])dnl
+[ --enable-static=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list],
+[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=AM_ENABLE_STATIC_DEFAULT)dnl
+])
+
+
+# AM_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AM_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])
+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]:\\*)
+changequote([,])dnl
+ 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}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; 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_SUBST(LD)
+AM_PROG_LD_GNU
+])
+
+AC_DEFUN(AM_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])
+])
+
+# AM_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AM_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[case "$NM" in
+changequote(,)dnl
+/* | [A-Za-z]:\\*)
+changequote([,])dnl
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; 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"
+ 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"
+ else
+ ac_cv_path_NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ ;;
+esac])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+AC_SUBST(NM)
+])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN(AM_MAINTAINER_MODE,
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINT=
+ else
+ MAINT='#M#'
+ fi
+ AC_SUBST(MAINT)dnl
+]
+)
+
+# Check to see if we're running under Cygwin32, without using
+# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
+# Otherwise set it to "no".
+
+dnl AM_CYGWIN32()
+AC_DEFUN(AM_CYGWIN32,
+[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
+[AC_TRY_COMPILE(,[return __CYGWIN32__;],
+am_cv_cygwin32=yes, am_cv_cygwin32=no)
+rm -f conftest*])
+CYGWIN32=
+test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
+
+# Check to see if we're running under Win32, without using
+# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
+# Otherwise set it to "".
+
+dnl AM_EXEEXT()
+dnl This knows we add .exe if we're building in the Cygwin32
+dnl environment. But if we're not, then it compiles a test program
+dnl to see if there is a suffix for executables.
+AC_DEFUN(AM_EXEEXT,
+[AC_REQUIRE([AM_CYGWIN32])
+AC_REQUIRE([AM_MINGW32])
+AC_MSG_CHECKING([for executable suffix])
+AC_CACHE_VAL(am_cv_exeext,
+[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
+am_cv_exeext=.exe
+else
+cat > am_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
+am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
+rm -f am_c_test*])
+test x"${am_cv_exeext}" = x && am_cv_exeext=no
+fi
+EXEEXT=""
+test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
+AC_MSG_RESULT(${am_cv_exeext})
+AC_SUBST(EXEEXT)])
+
+# Check to see if we're running under Mingw, without using
+# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
+# Otherwise set it to "no".
+
+dnl AM_MINGW32()
+AC_DEFUN(AM_MINGW32,
+[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
+[AC_TRY_COMPILE(,[return __MINGW32__;],
+am_cv_mingw32=yes, am_cv_mingw32=no)
+rm -f conftest*])
+MINGW32=
+test "$am_cv_mingw32" = yes && MINGW32=yes])
+
diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c
index a2551c6..b58f705 100644
--- a/contrib/binutils/gas/app.c
+++ b/contrib/binutils/gas/app.c
@@ -57,6 +57,12 @@ static const char symbol_chars[] =
#define LEX_IS_COLON 9
#define LEX_IS_NEWLINE 10
#define LEX_IS_ONECHAR_QUOTE 11
+#ifdef TC_V850
+#define LEX_IS_DOUBLEDASH_1ST 12
+#endif
+#ifdef TC_M32R
+#define LEX_IS_DOUBLEBAR_1ST 13
+#endif
#define IS_SYMBOL_COMPONENT(c) (lex[c] == LEX_IS_SYMBOL_COMPONENT)
#define IS_WHITESPACE(c) (lex[c] == LEX_IS_WHITESPACE)
#define IS_LINE_SEPARATOR(c) (lex[c] == LEX_IS_LINE_SEPARATOR)
@@ -80,6 +86,7 @@ do_scrub_begin (m68k_mri)
lex[' '] = LEX_IS_WHITESPACE;
lex['\t'] = LEX_IS_WHITESPACE;
+ lex['\r'] = LEX_IS_WHITESPACE;
lex['\n'] = LEX_IS_NEWLINE;
lex[';'] = LEX_IS_LINE_SEPARATOR;
lex[':'] = LEX_IS_COLON;
@@ -142,6 +149,13 @@ do_scrub_begin (m68k_mri)
then it can't be used in an expression. */
lex['!'] = LEX_IS_LINE_COMMENT_START;
}
+
+#ifdef TC_V850
+ lex['-'] = LEX_IS_DOUBLEDASH_1ST;
+#endif
+#ifdef TC_M32R
+ lex['|'] = LEX_IS_DOUBLEBAR_1ST;
+#endif
} /* do_scrub_begin() */
/* Saved state of the scrubber */
@@ -285,6 +299,12 @@ do_scrub_chars (get, tostart, tolen)
11: After seeing a symbol character in state 0 (eg a label definition)
-1: output string in out_string and go to the state in old_state
-2: flush text until a '*' '/' is seen, then go to state old_state
+#ifdef TC_V850
+ 12: After seeing a dash, looking for a second dash as a start of comment.
+#endif
+#ifdef TC_M32R
+ 13: After seeing a vertical bar, looking for a second vertical bar as a parallel expression seperator.
+#endif
*/
/* I added states 9 and 10 because the MIPS ECOFF assembler uses
@@ -295,7 +315,11 @@ do_scrub_chars (get, tostart, tolen)
I added state 11 so that something like "Lfoo add %r25,%r26,%r27" works
correctly on the PA (and any other target where colons are optional).
- Jeff Law, law@cs.utah.edu. */
+ Jeff Law, law@cs.utah.edu.
+
+ I added state 13 so that something like "cmp r1, r2 || trap #1" does not
+ get squashed into "cmp r1,r2||trap#1", with the all important space
+ between the 'trap' and the '#1' being eliminated. nickc@cygnus.com */
/* This macro gets the next input character. */
@@ -620,6 +644,7 @@ do_scrub_chars (get, tostart, tolen)
either '0' or '1' indicating whether to enter or
leave MRI mode. */
do_scrub_begin (mri_last_ch == '1');
+ mri_state = NULL;
/* We continue handling the character as usual. The
main gas reader must also handle the .mri pseudo-op
@@ -890,6 +915,43 @@ do_scrub_chars (get, tostart, tolen)
PUT (ch);
break;
+#ifdef TC_V850
+ case LEX_IS_DOUBLEDASH_1ST:
+ ch2 = GET();
+ if (ch2 != '-')
+ {
+ UNGET (ch2);
+ goto de_fault;
+ }
+ /* read and skip to end of line */
+ do
+ {
+ ch = GET ();
+ }
+ while (ch != EOF && ch != '\n');
+ if (ch == EOF)
+ {
+ as_warn ("end of file in comment; newline inserted");
+ }
+ state = 0;
+ PUT ('\n');
+ break;
+#endif
+#ifdef TC_M32R
+ case LEX_IS_DOUBLEBAR_1ST:
+ ch2 = GET();
+ if (ch2 != '|')
+ {
+ UNGET (ch2);
+ goto de_fault;
+ }
+ /* Reset back to state 1 and pretend that we are parsing a line from
+ just after the first white space. */
+ state = 1;
+ PUT ('|');
+ PUT ('|');
+ break;
+#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
@@ -950,6 +1012,18 @@ do_scrub_chars (get, tostart, tolen)
break;
}
+#ifdef TC_D10V
+ /* All insns end in a char for which LEX_IS_SYMBOL_COMPONENT is true.
+ 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. */
+ /* 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 (' ');
+#endif
/* We have a line comment character which is not at the
start of a line. If this is also a normal comment
character, fall through. Otherwise treat it as a default
diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c
index e1929e6..d7ed4b8 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, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -64,6 +64,10 @@ int listing; /* true if a listing is wanted */
static char *listing_filename = NULL; /* Name of listing file. */
+/* Type of debugging to generate. */
+
+enum debug_info_type debug_type = DEBUG_NONE;
+
/* Maximum level of macro nesting. */
int max_macro_nest = 100;
@@ -74,7 +78,9 @@ segT reg_section, expr_section;
segT text_section, data_section, bss_section;
#endif
-int chunksize = 5000;
+/* The default obstack chunk size. If we set this to zero, the
+ obstack code will use whatever will fit in a 4096 byte block. */
+int chunksize = 0;
/* To monitor memory allocation more effectively, make this non-zero.
Then the chunk sizes for gas and bfd will be reduced. */
@@ -110,7 +116,7 @@ print_version_id ()
return;
printed = 1;
- fprintf (stderr, "GNU assembler version %s (%s)", GAS_VERSION, TARGET_ALIAS);
+ fprintf (stderr, "GNU assembler version %s (%s)", VERSION, TARGET_ALIAS);
#ifdef BFD_ASSEMBLER
fprintf (stderr, ", using BFD version %s", BFD_VERSION);
#endif
@@ -131,6 +137,7 @@ Options:\n\
d omit debugging directives\n\
h include high-level source\n\
l include assembly\n\
+ m include macro expansions\n\
n omit forms processing\n\
s include symbols\n\
=file set listing file name (must be last sub-option)\n");
@@ -138,17 +145,21 @@ Options:\n\
-D produce assembler debugging messages\n\
--defsym SYM=VAL define symbol SYM to given value\n\
-f skip whitespace and comment preprocessing\n\
+--gstabs generate stabs debugging information\n\
--help show this message and exit\n\
-I DIR add DIR to search list for .include directives\n\
-J don't warn about signed overflow\n\
-K warn when differences altered for long displacements\n\
--L keep local symbols (starting with `L')\n");
+-L,--keep-locals keep local symbols (e.g. starting with `L')\n");
fprintf (stream, "\
-M,--mri assemble in MRI compatibility mode\n\
+--MD FILE write dependency information in FILE (default none)\n\
-nocpp ignored\n\
-o OBJFILE name the object-file output OBJFILE (default a.out)\n\
-R fold data section into text section\n\
--statistics print various measured statistics from execution\n\
+--strip-local-absolute strip local absolute symbols\n\
+--traditional-format Use same format as native assembler when possible\n\
--version print assembler version number and exit\n\
-W suppress warnings\n\
--itbl INSTTBL extend instruction set to include instructions\n\
@@ -156,10 +167,20 @@ Options:\n\
-w ignored\n\
-X ignored\n\
-Z generate object file even after errors\n");
+ fprintf (stream, "\
+--listing-lhs-width set the width in words of the output data column of\n\
+ the listing\n\
+--listing-lhs-width2 set the width in words of the continuation lines\n\
+ of the output data column; ignored if smaller than\n\
+ the width of the first line\n\
+--listing-rhs-width set the max width in characters of the lines from\n\
+ the source file\n\
+--listing-cont-lines set the maximum number of continuation lines used\n\
+ for the output data column of the listing\n");
md_show_usage (stream);
- fprintf (stream, "\nReport bugs to bug-gnu-utils@prep.ai.mit.edu\n");
+ fprintf (stream, "\nReport bugs to bug-gnu-utils@gnu.org\n");
}
#ifdef USE_EMULATIONS
@@ -290,7 +311,7 @@ parse_args (pargc, pargv)
#endif
'w', 'X',
/* New option for extending instruction set (see also --itbl below) */
- 't',
+ 't', ':',
'\0'
};
struct option *longopts;
@@ -299,6 +320,7 @@ parse_args (pargc, pargv)
static const struct option std_longopts[] = {
#define OPTION_HELP (OPTION_STD_BASE)
{"help", no_argument, NULL, OPTION_HELP},
+ {"keep-locals", no_argument, NULL, 'L'},
{"mri", no_argument, NULL, 'M'},
#define OPTION_NOCPP (OPTION_STD_BASE + 1)
{"nocpp", no_argument, NULL, OPTION_NOCPP},
@@ -321,7 +343,23 @@ parse_args (pargc, pargv)
list of instruction formats. The additional opcodes and their
formats are added to the built-in set of instructions, and
mnemonics for new registers may also be defined. */
- {"itbl", required_argument, NULL, OPTION_INSTTBL}
+ {"itbl", required_argument, NULL, OPTION_INSTTBL},
+#define OPTION_LISTING_LHS_WIDTH (OPTION_STD_BASE + 9)
+ {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH},
+#define OPTION_LISTING_LHS_WIDTH2 (OPTION_STD_BASE + 10)
+ {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2},
+#define OPTION_LISTING_RHS_WIDTH (OPTION_STD_BASE + 11)
+ {"listing-rhs-width", required_argument, NULL, OPTION_LISTING_RHS_WIDTH},
+#define OPTION_LISTING_CONT_LINES (OPTION_STD_BASE + 12)
+ {"listing-cont-lines", required_argument, NULL, OPTION_LISTING_CONT_LINES},
+#define OPTION_DEPFILE (OPTION_STD_BASE + 13)
+ {"MD", required_argument, NULL, OPTION_DEPFILE},
+#define OPTION_GSTABS (OPTION_STD_BASE + 14)
+ {"gstabs", no_argument, NULL, OPTION_GSTABS},
+#define OPTION_STRIP_LOCAL_ABSOLUTE (OPTION_STD_BASE + 15)
+ {"strip-local-absolute", no_argument, NULL, OPTION_STRIP_LOCAL_ABSOLUTE},
+#define OPTION_TRADITIONAL_FORMAT (OPTION_STD_BASE + 16)
+ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT}
};
/* Construct the option lists from the standard list and the
@@ -402,9 +440,17 @@ parse_args (pargc, pargv)
flag_print_statistics = 1;
break;
+ case OPTION_STRIP_LOCAL_ABSOLUTE:
+ flag_strip_local_absolute = 1;
+ break;
+
+ case OPTION_TRADITIONAL_FORMAT:
+ flag_traditional_format = 1;
+ break;
+
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
- printf ("GNU assembler %s\n", GAS_VERSION);
+ printf ("GNU assembler %s\n", VERSION);
printf ("Copyright 1997 Free Software Foundation, Inc.\n");
printf ("\
This program is free software; you may redistribute it under the terms of\n\
@@ -461,6 +507,12 @@ the GNU General Public License. This program has absolutely no warranty.\n");
formats, opcodes, register names, etc. */
struct itbl_file_list *n;
+ if (optarg == NULL)
+ {
+ 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;
@@ -480,6 +532,14 @@ the GNU General Public License. This program has absolutely no warranty.\n");
}
break;
+ case OPTION_DEPFILE:
+ start_dependencies (optarg);
+ break;
+
+ case OPTION_GSTABS:
+ debug_type = DEBUG_STABS;
+ break;
+
case 'J':
flag_signed_overflow_ok = 1;
break;
@@ -494,6 +554,25 @@ the GNU General Public License. This program has absolutely no warranty.\n");
flag_keep_locals = 1;
break;
+ case OPTION_LISTING_LHS_WIDTH:
+ 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);
+ if (tmp > listing_lhs_width)
+ listing_lhs_width_second = tmp;
+ }
+ break;
+ case OPTION_LISTING_RHS_WIDTH:
+ listing_rhs_width = atoi(optarg);
+ break;
+ case OPTION_LISTING_CONT_LINES:
+ listing_lhs_cont_lines = atoi(optarg);
+ break;
+
case 'M':
flag_mri = 1;
#ifdef TC_M68K
@@ -532,6 +611,9 @@ the GNU General Public License. This program has absolutely no warranty.\n");
case 'l':
listing |= LISTING_LISTING;
break;
+ case 'm':
+ listing |= LISTING_MACEXP;
+ break;
case 'n':
listing |= LISTING_NOFORM;
break;
@@ -709,6 +791,14 @@ main (argc, argv)
else
keep_it = 0;
+#if defined (BFD_ASSEMBLER) || !defined (BFD)
+ /* This used to be done at the start of write_object_file in
+ write.c, but that caused problems when doing listings when
+ keep_it was zero. This could probably be moved above md_end, but
+ I didn't want to risk the change. */
+ subsegs_finish ();
+#endif
+
if (keep_it)
write_object_file ();
@@ -737,6 +827,10 @@ main (argc, argv)
may not place the same interpretation on the value given. */
if (had_errors () > 0)
xexit (EXIT_FAILURE);
+
+ /* Only generate dependency file if assembler was successful. */
+ print_dependencies ();
+
xexit (EXIT_SUCCESS);
}
@@ -827,9 +921,9 @@ perform_an_assembly_pass (argc, argv)
#else /* BFD_ASSEMBLER */
/* Create the standard sections, and those the assembler uses
internally. */
- text_section = subseg_new (".text", 0);
- data_section = subseg_new (".data", 0);
- bss_section = subseg_new (".bss", 0);
+ text_section = subseg_new (TEXT_SECTION_NAME, 0);
+ 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. */
applicable = bfd_applicable_section_flags (stdoutput);
diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h
index 60fccaa..3f457e9 100644
--- a/contrib/binutils/gas/as.h
+++ b/contrib/binutils/gas/as.h
@@ -1,5 +1,5 @@
/* as.h - global header file
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -52,8 +52,13 @@
/* AIX requires this to be the first thing in the file. */
#ifdef __GNUC__
-# undef alloca
-# define alloca __builtin_alloca
+# ifndef alloca
+# ifdef __STDC__
+extern void *alloca ();
+# else
+extern char *alloca ();
+# endif
+# endif
#else
# if HAVE_ALLOCA_H
# include <alloca.h>
@@ -63,9 +68,9 @@
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
# if !defined (__STDC__) && !defined (__hpux)
-char *alloca ();
+extern char *alloca ();
# else
-void *alloca ();
+extern void *alloca ();
# endif /* __STDC__, __hpux */
# endif /* alloca */
# endif /* _AIX */
@@ -163,8 +168,8 @@ extern void free ();
extern int errno;
#endif
-/* This is needed for VMS with DEC C. */
-#if ! defined (__GNUC__) && ! defined (HAVE_UNLINK) && defined (HAVE_REMOVE)
+/* This is needed for VMS. */
+#if ! defined (HAVE_UNLINK) && defined (HAVE_REMOVE)
#define unlink remove
#endif
@@ -372,7 +377,14 @@ enum _relax_state
later. Similar to rs_org, but different.
fr_symbol: operand
1 variable char: fill character */
- rs_space
+ rs_space,
+
+ /* 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
};
typedef enum _relax_state relax_stateT;
@@ -385,92 +397,6 @@ typedef unsigned int relax_substateT;
Could be a problem, cross-assembling for 64-bit machines. */
typedef addressT relax_addressT;
-
-/* frags.c */
-
-/*
- * 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. */
- addressT fr_address;
- /* Chain forward; ascending address order. Rooted in frch_root. */
- struct frag *fr_next;
-
- /* (Fixed) number of chars we know we have. May be 0. */
- offsetT fr_fix;
- /* (Variable) number of chars after above. May be 0. */
- offsetT fr_var;
- /* For variable-length tail. */
- struct symbol *fr_symbol;
- /* For variable-length tail. */
- offsetT fr_offset;
- /* Points to opcode low addr byte, for relaxation. */
- char *fr_opcode;
-
-#ifndef NO_LISTING
- struct list_info_struct *line;
-#endif
-
- /* What state is my tail in? */
- relax_stateT fr_type;
- relax_substateT fr_subtype;
-
- union {
- /* These are needed only on the NS32K machines. But since we don't
- include targ-cpu.h until after this structure has been defined,
- we can't really conditionalize it. This code should be
- rearranged a bit to make that possible. */
- struct {
- char pcrel_adjust, bsr;
- } ns32k;
-#ifdef USING_CGEN
- /* Don't include this unless using CGEN to keep frag size down. */
- struct {
- const struct cgen_insn *insn;
- unsigned char opindex, opinfo;
- } cgen;
-#endif
- } fr_targ;
-
- /* Where the frag was created, or where it became a variant frag. */
- char *fr_file;
- unsigned int fr_line;
-
- /* Data begins here. */
- char fr_literal[1];
-};
-
-#define SIZEOF_STRUCT_FRAG \
-((char *)zero_address_frag.fr_literal-(char *)&zero_address_frag)
-/* We want to say fr_literal[0] above. */
-
-typedef struct frag fragS;
-
-/* Current frag we are building. This frag is incomplete. It is, however,
- included in frchain_now. The fr_fix field is bogus; instead, use:
- obstack_next_free(&frags)-frag_now->fr_literal. */
-COMMON fragS *frag_now;
-extern int frag_now_fix PARAMS ((void));
-
-/* For foreign-segment symbol fixups. */
-COMMON fragS zero_address_frag;
-/* For local common (N_BSS segment) fixups. */
-COMMON fragS bss_address_frag;
-
/* main program "as.c" (command arguments etc) */
COMMON unsigned char flag_no_comments; /* -f */
@@ -501,9 +427,14 @@ COMMON int flag_no_warnings; /* -W */
COMMON unsigned char flag_always_generate_output; /* -Z */
/* 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. */
+COMMON int flag_strip_local_absolute;
+
+/* True if we should generate a traditional format object file. */
+COMMON int flag_traditional_format;
+
/* name of emitted object file */
COMMON char *out_file_name;
@@ -520,6 +451,13 @@ COMMON int linkrelax;
/* TRUE if we should produce a listing. */
extern int listing;
+/* Type of debugging information we should generate. We currently
+ only support stabs and ECOFF. */
+
+enum debug_info_type { DEBUG_NONE, DEBUG_STABS, DEBUG_ECOFF };
+
+extern enum debug_info_type debug_type;
+
/* Maximum level of macro nesting. */
extern int max_macro_nest;
@@ -555,21 +493,36 @@ typedef struct _pseudo_type pseudo_typeS;
#ifdef USE_STDARG
#if (__GNUC__ >= 2) && !defined(VMS)
/* for use with -Wformat */
-#define PRINTF_LIKE(FCN) void FCN (const char *format, ...) \
- __attribute__ ((format (printf, 1, 2)))
-#define PRINTF_WHERE_LIKE(FCN) void FCN (char *file, unsigned int line, \
- const char *format, ...) \
- __attribute__ ((format (printf, 3, 4)))
-#else /* ANSI C with stdarg, but not GNU C */
+
+#if __GNUC_MINOR__ < 6
+/* Support for double underscores in attribute names was added in gcc
+ 2.6, so avoid them if we are using an earlier version. */
+#define __printf__ printf
+#define __format__ format
+#endif
+
+#define PRINTF_LIKE(FCN) \
+ void FCN (const char *format, ...) \
+ __attribute__ ((__format__ (__printf__, 1, 2)))
+#define PRINTF_WHERE_LIKE(FCN) \
+ void FCN (char *file, unsigned int line, const char *format, ...) \
+ __attribute__ ((__format__ (__printf__, 3, 4)))
+
+#else /* __GNUC__ < 2 || defined(VMS) */
+
#define PRINTF_LIKE(FCN) void FCN PARAMS ((const char *format, ...))
#define PRINTF_WHERE_LIKE(FCN) void FCN PARAMS ((char *file, \
unsigned int line, \
const char *format, ...))
-#endif
-#else /* not using stdarg */
+
+#endif /* __GNUC__ < 2 || defined(VMS) */
+
+#else /* ! USE_STDARG */
+
#define PRINTF_LIKE(FCN) void FCN ()
#define PRINTF_WHERE_LIKE(FCN) void FCN ()
-#endif
+
+#endif /* ! USE_STDARG */
PRINTF_LIKE (as_bad);
PRINTF_LIKE (as_fatal);
@@ -577,6 +530,7 @@ PRINTF_LIKE (as_tsktsk);
PRINTF_LIKE (as_warn);
PRINTF_WHERE_LIKE (as_bad_where);
PRINTF_WHERE_LIKE (as_warn_where);
+
void as_assert PARAMS ((const char *, int, const char *));
void as_abort PARAMS ((const char *, int, const char *));
@@ -609,7 +563,7 @@ void do_scrub_begin PARAMS ((int));
void input_scrub_begin PARAMS ((void));
void input_scrub_close PARAMS ((void));
void input_scrub_end PARAMS ((void));
-void new_logical_line PARAMS ((char *fname, int line_number));
+int new_logical_line PARAMS ((char *fname, int line_number));
void subsegs_begin PARAMS ((void));
void subseg_change PARAMS ((segT seg, int subseg));
segT subseg_new PARAMS ((const char *name, subsegT subseg));
@@ -619,16 +573,26 @@ void subseg_set PARAMS ((segT seg, subsegT subseg));
segT subseg_get PARAMS ((const char *, int));
#endif
+void start_dependencies PARAMS ((char *));
+void register_dependency PARAMS ((char *));
+void print_dependencies PARAMS ((void));
+
struct expressionS;
struct fix;
struct symbol;
struct relax_type;
+typedef struct frag fragS;
#ifdef BFD_ASSEMBLER
/* literal.c */
valueT add_to_literal_pool PARAMS ((struct symbol *, valueT, segT, int));
#endif
+int check_eh_frame PARAMS ((struct expressionS *, unsigned int *));
+int eh_frame_estimate_size_before_relax PARAMS ((fragS *));
+int eh_frame_relax_frag PARAMS ((fragS *));
+void eh_frame_convert_frag PARAMS ((fragS *));
+
#include "expr.h" /* Before targ-*.h */
/* this one starts the chain of target dependant headers */
@@ -657,6 +621,12 @@ valueT add_to_literal_pool PARAMS ((struct symbol *, valueT, segT, int));
#define LOCAL_LABELS_FB 0
#endif
+#ifndef TEXT_SECTION_NAME
+#define TEXT_SECTION_NAME ".text"
+#define DATA_SECTION_NAME ".data"
+#define BSS_SECTION_NAME ".bss"
+#endif
+
#endif /* GAS */
/* end of as.h */
diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c
index 9a00f04..e3ae2e1 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, 1996
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -87,10 +87,10 @@ atof_generic (address_of_string_pointer,
{
int return_value; /* 0 means OK. */
char *first_digit;
- int number_of_digits_before_decimal;
- int number_of_digits_after_decimal;
+ unsigned int number_of_digits_before_decimal;
+ unsigned int number_of_digits_after_decimal;
long decimal_exponent;
- int number_of_digits_available;
+ unsigned int number_of_digits_available;
char digits_sign_char;
/*
@@ -170,7 +170,7 @@ atof_generic (address_of_string_pointer,
&& (!c || !strchr (string_of_decimal_exponent_marks, c)));
p++)
{
- if (isdigit (c))
+ if (isdigit ((unsigned char) c))
{
if (seen_significant_digit || c > '0')
{
@@ -197,9 +197,9 @@ atof_generic (address_of_string_pointer,
*/
if (c && IS_DECIMAL_MARK (c))
{
- int zeros = 0; /* Length of current string of zeros */
+ unsigned int zeros = 0; /* Length of current string of zeros */
- for (p++; (c = *p) && isdigit (c); p++)
+ for (p++; (c = *p) && isdigit ((unsigned char) c); p++)
{
if (c == '0')
{
@@ -274,7 +274,7 @@ atof_generic (address_of_string_pointer,
for (; (c); c = *++p)
{
- if (isdigit (c))
+ if (isdigit ((unsigned char) c))
{
decimal_exponent = decimal_exponent * 10 + c - '0';
/*
@@ -401,7 +401,7 @@ atof_generic (address_of_string_pointer,
for (p = first_digit, count = number_of_digits_to_use; count; p++, --count)
{
c = *p;
- if (isdigit (c))
+ if (isdigit ((unsigned char) c))
{
/*
* Multiply by 10. Assume can never overflow.
diff --git a/contrib/binutils/gas/cgen.c b/contrib/binutils/gas/cgen.c
index e9024e4..2c541ef 100644
--- a/contrib/binutils/gas/cgen.c
+++ b/contrib/binutils/gas/cgen.c
@@ -1,5 +1,5 @@
/* GAS interface for targets using CGEN: Cpu tools GENerator.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -17,8 +17,10 @@ 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. */
+#include <setjmp.h>
#include "ansidecl.h"
#include "bfd.h"
+#include "symcat.h"
#include "cgen-opc.h"
#include "as.h"
#include "subsegs.h"
@@ -29,13 +31,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
void
cgen_asm_record_register (name, number)
- char *name;
- int number;
+ char * name;
+ int number;
{
/* Use symbol_create here instead of symbol_new so we don't try to
output registers into the object file's symbol table. */
symbol_table_insert (symbol_create (name, reg_section,
- number, &zero_address_frag));
+ number, & zero_address_frag));
}
/* We need to keep a list of fixups. We can't simply generate them as
@@ -51,15 +53,15 @@ cgen_asm_record_register (name, number)
struct fixup
{
- int opindex;
- int opinfo;
+ int opindex;
+ int opinfo;
expressionS exp;
};
#define MAX_FIXUPS 5
-static struct fixup fixups[MAX_FIXUPS];
-static int num_fixups;
+static struct fixup fixups [MAX_FIXUPS];
+static int num_fixups;
/* Prepare to parse an instruction.
??? May wish to make this static and delete calls in md_assemble. */
@@ -72,18 +74,74 @@ cgen_asm_init_parse ()
/* Queue a fixup. */
-void
+static void
cgen_queue_fixup (opindex, opinfo, expP)
- int opindex;
- expressionS *expP;
+ int opindex;
+ expressionS * expP;
{
/* We need to generate a fixup for this expression. */
if (num_fixups >= MAX_FIXUPS)
as_fatal ("too many fixups");
- fixups[num_fixups].exp = *expP;
+ fixups[num_fixups].exp = * expP;
fixups[num_fixups].opindex = opindex;
- fixups[num_fixups].opinfo = opinfo;
- ++num_fixups;
+ fixups[num_fixups].opinfo = opinfo;
+ ++ num_fixups;
+}
+
+/* The following three functions allow a backup of the fixup chain to be made,
+ and to have this backup be swapped with the current chain. This allows
+ certain ports, eg the m32r, to swap two instructions and swap their fixups
+ at the same time. */
+static struct fixup saved_fixups [MAX_FIXUPS];
+static int saved_num_fixups;
+
+void
+cgen_save_fixups ()
+{
+ saved_num_fixups = num_fixups;
+
+ memcpy (saved_fixups, fixups, sizeof (fixups[0]) * num_fixups);
+
+ num_fixups = 0;
+}
+
+void
+cgen_restore_fixups ()
+{
+ num_fixups = saved_num_fixups;
+
+ memcpy (fixups, saved_fixups, sizeof (fixups[0]) * num_fixups);
+
+ saved_num_fixups = 0;
+}
+
+void
+cgen_swap_fixups ()
+{
+ int tmp;
+ struct fixup tmp_fixup;
+
+ if (num_fixups == 0)
+ {
+ cgen_restore_fixups ();
+ }
+ else if (saved_num_fixups == 0)
+ {
+ cgen_save_fixups ();
+ }
+ else
+ {
+ tmp = saved_num_fixups;
+ saved_num_fixups = num_fixups;
+ num_fixups = tmp;
+
+ for (tmp = MAX_FIXUPS; tmp--;)
+ {
+ tmp_fixup = saved_fixups [tmp];
+ saved_fixups [tmp] = fixups [tmp];
+ fixups [tmp] = tmp_fixup;
+ }
+ }
}
/* Default routine to record a fixup.
@@ -101,16 +159,16 @@ cgen_queue_fixup (opindex, opinfo, expP)
fixS *
cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
- fragS *frag;
- int where;
- const struct cgen_insn *insn;
- int length;
- const struct cgen_operand *operand;
- int opinfo;
- symbolS *symbol;
- offsetT offset;
+ fragS * frag;
+ int where;
+ const CGEN_INSN * insn;
+ int length;
+ const CGEN_OPERAND * operand;
+ int opinfo;
+ symbolS * symbol;
+ offsetT offset;
{
- fixS *fixP;
+ fixS * fixP;
/* It may seem strange to use operand->attrs and not insn->attrs here,
but it is the operand that has a pc relative relocation. */
@@ -118,7 +176,7 @@ cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
fixP = fix_new (frag, where, length / 8, symbol, offset,
CGEN_OPERAND_ATTR (operand, CGEN_OPERAND_PCREL_ADDR) != 0,
(bfd_reloc_code_real_type) ((int) BFD_RELOC_UNUSED + CGEN_OPERAND_INDEX (operand)));
- fixP->tc_fix_data.insn = (PTR) insn;
+ fixP->tc_fix_data.insn = (PTR) insn;
fixP->tc_fix_data.opinfo = opinfo;
return fixP;
@@ -139,15 +197,15 @@ cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
fixS *
cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
- fragS *frag;
- int where;
- const struct cgen_insn *insn;
- int length;
- const struct cgen_operand *operand;
- int opinfo;
- expressionS *exp;
+ fragS * frag;
+ int where;
+ const CGEN_INSN * insn;
+ int length;
+ const CGEN_OPERAND * operand;
+ int opinfo;
+ expressionS * exp;
{
- fixS *fixP;
+ fixS * fixP;
/* It may seem strange to use operand->attrs and not insn->attrs here,
but it is the operand that has a pc relative relocation. */
@@ -161,6 +219,9 @@ cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
return fixP;
}
+/* Used for communication between the next two procedures. */
+static jmp_buf expr_jmp_buf;
+
/* Callback for cgen interface. Parse the expression at *STRP.
The result is an error message or NULL for success (in which case
*STRP is advanced past the parsed text).
@@ -174,16 +235,23 @@ cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
const char *
cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
- enum cgen_parse_operand_type want;
- const char **strP;
- int opindex;
- int opinfo;
- enum cgen_parse_operand_result *resultP;
- bfd_vma *valueP;
+ enum cgen_parse_operand_type want;
+ const char ** strP;
+ int opindex;
+ int opinfo;
+ enum cgen_parse_operand_result * resultP;
+ bfd_vma * valueP;
{
- char *hold;
- const char *errmsg = NULL;
- expressionS exp;
+#ifdef __STDC__
+ /* These is volatile to survive the setjmp. */
+ char * volatile hold;
+ enum cgen_parse_operand_result * volatile resultP_1;
+#else
+ static char * hold;
+ static enum cgen_parse_operand_result * resultP_1;
+#endif
+ const char * errmsg = NULL;
+ expressionS exp;
if (want == CGEN_PARSE_OPERAND_INIT)
{
@@ -191,10 +259,22 @@ cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
return NULL;
}
+ resultP_1 = resultP;
hold = input_line_pointer;
- input_line_pointer = (char *) *strP;
- expression (&exp);
- *strP = input_line_pointer;
+ input_line_pointer = (char *) * strP;
+
+ /* We rely on md_operand to longjmp back to us.
+ This is done via cgen_md_operand. */
+ if (setjmp (expr_jmp_buf) != 0)
+ {
+ input_line_pointer = (char *) hold;
+ * resultP_1 = CGEN_PARSE_OPERAND_RESULT_ERROR;
+ return "illegal operand";
+ }
+
+ expression (& exp);
+
+ * strP = input_line_pointer;
input_line_pointer = hold;
/* FIXME: Need to check `want'. */
@@ -203,48 +283,63 @@ cgen_parse_operand (want, strP, opindex, opinfo, resultP, valueP)
{
case O_illegal :
errmsg = "illegal operand";
- *resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
+ * resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
break;
case O_absent :
errmsg = "missing operand";
- *resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
+ * resultP = CGEN_PARSE_OPERAND_RESULT_ERROR;
break;
case O_constant :
- *valueP = exp.X_add_number;
- *resultP = CGEN_PARSE_OPERAND_RESULT_NUMBER;
+ * valueP = exp.X_add_number;
+ * resultP = CGEN_PARSE_OPERAND_RESULT_NUMBER;
break;
case O_register :
- *valueP = exp.X_add_number;
- *resultP = CGEN_PARSE_OPERAND_RESULT_REGISTER;
+ * valueP = exp.X_add_number;
+ * resultP = CGEN_PARSE_OPERAND_RESULT_REGISTER;
break;
default :
- cgen_queue_fixup (opindex, opinfo, &exp);
- *valueP = 0;
- *resultP = CGEN_PARSE_OPERAND_RESULT_QUEUED;
+ cgen_queue_fixup (opindex, opinfo, & exp);
+ * valueP = 0;
+ * resultP = CGEN_PARSE_OPERAND_RESULT_QUEUED;
break;
}
return errmsg;
}
+/* md_operand handler to catch unrecognized expressions and halt the
+ parsing process so the next entry can be tried.
+
+ ??? This could be done differently by adding code to `expression'. */
+
+void
+cgen_md_operand (expressionP)
+ expressionS * expressionP;
+{
+ longjmp (expr_jmp_buf, 1);
+}
+
/* Finish assembling instruction INSN.
BUF contains what we've built up so far.
- LENGTH is the size of the insn in bits. */
+ LENGTH is the size of the insn in bits.
+ Returns the address of the buffer containing the assembled instruction,
+ in case the caller needs to modify it for some reason. */
-void
+char *
cgen_asm_finish_insn (insn, buf, length)
- const struct cgen_insn *insn;
- cgen_insn_t *buf;
- unsigned int length;
+ const CGEN_INSN * insn;
+ cgen_insn_t * buf;
+ unsigned int length;
{
- int i, relax_operand;
- char *f;
+ int i;
+ int relax_operand;
+ char * f;
unsigned int byte_len = length / 8;
/* ??? Target foo issues various warnings here, so one might want to provide
a hook here. However, our caller is defined in tc-foo.c so there
shouldn't be a need for a hook. */
-
+
/* Write out the instruction.
It is important to fetch enough space in one call to `frag_more'.
We use (f - frag_now->fr_literal) to compute where we are and we
@@ -264,7 +359,7 @@ cgen_asm_finish_insn (insn, buf, length)
/* Scan the fixups for the operand affected by relaxing
(i.e. the branch address). */
- for (i = 0; i < num_fixups; ++i)
+ for (i = 0; i < num_fixups; ++ i)
{
if (CGEN_OPERAND_ATTR (& CGEN_SYM (operand_table) [fixups[i].opindex],
CGEN_OPERAND_RELAX) != 0)
@@ -277,8 +372,8 @@ cgen_asm_finish_insn (insn, buf, length)
if (relax_operand != -1)
{
- int max_len;
- fragS *old_frag;
+ int max_len;
+ fragS * old_frag;
#ifdef TC_CGEN_MAX_RELAX
max_len = TC_CGEN_MAX_RELAX (insn, byte_len);
@@ -288,10 +383,13 @@ cgen_asm_finish_insn (insn, buf, length)
/* Ensure variable part and fixed part are in same fragment. */
/* FIXME: Having to do this seems like a hack. */
frag_grow (max_len);
+
/* Allocate space for the fixed part. */
f = frag_more (byte_len);
+
/* Create a relaxable fragment for this instruction. */
old_frag = frag_now;
+
frag_var (rs_machine_dependent,
max_len - byte_len /* max chars */,
0 /* variable part already allocated */,
@@ -301,14 +399,12 @@ cgen_asm_finish_insn (insn, buf, length)
fixups[relax_operand].exp.X_add_symbol,
fixups[relax_operand].exp.X_add_number,
f);
+
/* Record the operand number with the fragment so md_convert_frag
can use cgen_md_record_fixup to record the appropriate reloc. */
- /* FIXME: fr_targ.cgen is used pending deciding whether to
- allow a target to add members to fragS. For more info
- see the comment above fr_targ in as.h. */
- old_frag->fr_targ.cgen.insn = insn;
- old_frag->fr_targ.cgen.opindex = fixups[relax_operand].opindex;
- old_frag->fr_targ.cgen.opinfo = fixups[relax_operand].opinfo;
+ old_frag->fr_cgen.insn = insn;
+ old_frag->fr_cgen.opindex = fixups[relax_operand].opindex;
+ old_frag->fr_cgen.opinfo = fixups[relax_operand].opinfo;
}
else
f = frag_more (byte_len);
@@ -320,15 +416,15 @@ cgen_asm_finish_insn (insn, buf, length)
{
case 16:
if (cgen_big_endian_p)
- bfd_putb16 ((bfd_vma) *buf, f);
+ bfd_putb16 ((bfd_vma) * buf, f);
else
- bfd_putl16 ((bfd_vma) *buf, f);
+ bfd_putl16 ((bfd_vma) * buf, f);
break;
case 32:
if (cgen_big_endian_p)
- bfd_putb32 ((bfd_vma) *buf, f);
+ bfd_putb32 ((bfd_vma) * buf, f);
else
- bfd_putl32 ((bfd_vma) *buf, f);
+ bfd_putl32 ((bfd_vma) * buf, f);
break;
default:
abort ();
@@ -356,8 +452,10 @@ cgen_asm_finish_insn (insn, buf, length)
insn, length,
& CGEN_SYM (operand_table) [fixups[i].opindex],
fixups[i].opinfo,
- &fixups[i].exp);
+ & fixups[i].exp);
}
+
+ return f;
}
/* Apply a fixup to the object code. This is called for all the
@@ -374,11 +472,11 @@ cgen_asm_finish_insn (insn, buf, length)
int
cgen_md_apply_fix3 (fixP, valueP, seg)
- fixS *fixP;
- valueT *valueP;
- segT seg;
+ fixS * fixP;
+ valueT * valueP;
+ segT seg;
{
- char *where = fixP->fx_frag->fr_literal + fixP->fx_where;
+ char * where = fixP->fx_frag->fr_literal + fixP->fx_where;
valueT value;
/* FIXME FIXME FIXME: The value we are passed in *valuep includes
@@ -394,11 +492,11 @@ cgen_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;
@@ -417,12 +515,12 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
{
- int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
- const struct cgen_operand *operand = & CGEN_SYM (operand_table) [opindex];
- const char *errmsg;
+ int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ const CGEN_OPERAND * operand = & CGEN_SYM (operand_table) [opindex];
+ const char * errmsg;
bfd_reloc_code_real_type reloc_type;
- struct cgen_fields fields;
- const struct cgen_insn *insn = (struct cgen_insn *) fixP->tc_fix_data.insn;
+ CGEN_FIELDS fields;
+ const CGEN_INSN * insn = (CGEN_INSN *) fixP->tc_fix_data.insn;
/* If the reloc has been fully resolved finish the operand here. */
/* FIXME: This duplicates the capabilities of code in BFD. */
@@ -431,14 +529,11 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
finish the job. Testing for pcrel is a temporary hack. */
|| fixP->fx_pcrel)
{
- /* This may seem like overkill, and using bfd_install_relocation or
- some such may be preferable, but this is simple. */
- CGEN_FIELDS_BITSIZE (&fields) = CGEN_INSN_BITSIZE (insn);
- CGEN_SYM (set_operand) (opindex, &value, &fields);
- errmsg = CGEN_SYM (validate_operand) (opindex, &fields);
+ CGEN_FIELDS_BITSIZE (& fields) = CGEN_INSN_BITSIZE (insn);
+ CGEN_SYM (set_operand) (opindex, & value, & fields);
+ errmsg = CGEN_SYM (insert_operand) (opindex, & fields, where);
if (errmsg)
as_warn_where (fixP->fx_file, fixP->fx_line, "%s\n", errmsg);
- CGEN_SYM (insert_operand) (opindex, &fields, where);
}
if (fixP->fx_done)
@@ -501,10 +596,10 @@ cgen_md_apply_fix3 (fixP, valueP, seg)
arelent *
cgen_tc_gen_reloc (section, fixP)
- asection *section;
- fixS *fixP;
+ asection * section;
+ fixS * fixP;
{
- arelent *reloc;
+ arelent * reloc;
reloc = (arelent *) bfd_alloc (stdoutput, sizeof (arelent));
@@ -519,9 +614,9 @@ cgen_tc_gen_reloc (section, fixP)
assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
- reloc->sym_ptr_ptr = &fixP->fx_addsy->bsym;
- reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
- reloc->addend = fixP->fx_addnumber;
+ reloc->sym_ptr_ptr = & fixP->fx_addsy->bsym;
+ reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
+ reloc->addend = fixP->fx_addnumber;
return reloc;
}
diff --git a/contrib/binutils/gas/cond.c b/contrib/binutils/gas/cond.c
index 855848c..eef4747 100644
--- a/contrib/binutils/gas/cond.c
+++ b/contrib/binutils/gas/cond.c
@@ -1,5 +1,6 @@
/* cond.c - conditional assembly pseudo-ops, and .include
- Copyright (C) 1990, 91, 92, 93, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -137,6 +138,7 @@ s_if (arg)
case O_gt: t = operand.X_add_number > 0; break;
default:
abort ();
+ return;
}
/* If the above error is signaled, this will dispatch
@@ -240,6 +242,8 @@ s_ifc (arg)
if (flag_mri)
mri_comment_end (stop, stopc);
+
+ demand_empty_rest_of_line ();
}
void
@@ -301,9 +305,13 @@ s_else (arg)
if (!current_cframe->dead_tree)
{
current_cframe->ignoring = !current_cframe->ignoring;
- if (LISTING_SKIP_COND ()
- && ! current_cframe->ignoring)
- listing_list (1);
+ if (LISTING_SKIP_COND ())
+ {
+ if (! current_cframe->ignoring)
+ listing_list (1);
+ else
+ listing_list (2);
+ }
} /* if not a dead tree */
current_cframe->else_seen = 1;
diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in
new file mode 100644
index 0000000..d737a21
--- /dev/null
+++ b/contrib/binutils/gas/config.in
@@ -0,0 +1,145 @@
+/* config.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if using alloca.c. */
+#undef C_ALLOCA
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if lex declares yytext as a char * by default, not a char[]. */
+#undef YYTEXT_POINTER
+
+/* Name of package. */
+#undef PACKAGE
+
+/* Version of package. */
+#undef VERSION
+
+/* Should gas use high-level BFD interfaces? */
+#undef BFD_ASSEMBLER
+
+/* Some assert/preprocessor combinations are incapable of handling
+ certain kinds of constructs in the argument of assert. For example,
+ quoted strings (if requoting isn't done right) or newlines. */
+#undef BROKEN_ASSERT
+
+/* If we aren't doing cross-assembling, some operations can be optimized,
+ since byte orders and value sizes don't need to be adjusted. */
+#undef CROSS_COMPILE
+
+/* Some gas code wants to know these parameters. */
+#undef TARGET_ALIAS
+#undef TARGET_CPU
+#undef TARGET_CANONICAL
+#undef TARGET_OS
+#undef TARGET_VENDOR
+
+/* Sometimes the system header files don't declare strstr. */
+#undef NEED_DECLARATION_STRSTR
+
+/* Sometimes the system header files don't declare malloc and realloc. */
+#undef NEED_DECLARATION_MALLOC
+
+/* Sometimes the system header files don't declare free. */
+#undef NEED_DECLARATION_FREE
+
+/* Sometimes the system header files don't declare sbrk. */
+#undef NEED_DECLARATION_SBRK
+
+/* Sometimes errno.h doesn't declare errno itself. */
+#undef NEED_DECLARATION_ERRNO
+
+#undef MANY_SEGMENTS
+
+/* The configure script defines this for some targets based on the
+ target name used. It is not always defined. */
+#undef TARGET_BYTES_BIG_ENDIAN
+
+/* Needed only for some configurations that can produce multiple output
+ formats. */
+#undef DEFAULT_EMULATION
+#undef EMULATIONS
+#undef USE_EMULATIONS
+#undef OBJ_MAYBE_AOUT
+#undef OBJ_MAYBE_BOUT
+#undef OBJ_MAYBE_COFF
+#undef OBJ_MAYBE_ECOFF
+#undef OBJ_MAYBE_ELF
+#undef OBJ_MAYBE_GENERIC
+#undef OBJ_MAYBE_HP300
+#undef OBJ_MAYBE_IEEE
+#undef OBJ_MAYBE_SOM
+#undef OBJ_MAYBE_VMS
+
+/* Used for some of the COFF configurations, when the COFF code needs
+ to select something based on the CPU type before it knows it... */
+#undef I386COFF
+#undef M68KCOFF
+#undef M88KCOFF
+
+/* Using cgen code? */
+#undef USING_CGEN
+
+/* Needed only for sparc configuration. */
+#undef DEFAULT_ARCH
+
+/* Needed only for PowerPC Solaris. */
+#undef TARGET_SOLARIS_COMMENT
+
+/* Needed only for SCO 5. */
+#undef SCO_ELF
+
+/* Define if you have the remove function. */
+#undef HAVE_REMOVE
+
+/* Define if you have the sbrk function. */
+#undef HAVE_SBRK
+
+/* Define if you have the unlink function. */
+#undef HAVE_UNLINK
+
+/* Define if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the <varargs.h> header file. */
+#undef HAVE_VARARGS_H
diff --git a/contrib/binutils/gas/config/atof-ieee.c b/contrib/binutils/gas/config/atof-ieee.c
index e0726b7..3ac1f01 100644
--- a/contrib/binutils/gas/config/atof-ieee.c
+++ b/contrib/binutils/gas/config/atof-ieee.c
@@ -1,5 +1,6 @@
/* atof_ieee.c - turn a Flonum into an IEEE floating point number
- Copyright (C) 1987, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -525,6 +526,22 @@ gen_to_words (words, precision, exponent_bits)
carry >>= LITTLENUM_NUMBER_OF_BITS;
}
}
+ else
+ {
+ /* This is an overflow of the denormal numbers. We
+ need to forget what we have produced, and instead
+ generate the smallest normalized number. */
+ lp = words;
+ word1 = ((generic_floating_point_number.sign == '+')
+ ? 0
+ : (1 << (LITTLENUM_NUMBER_OF_BITS - 1)));
+ word1 |= (1
+ << ((LITTLENUM_NUMBER_OF_BITS - 1)
+ - exponent_bits));
+ *lp++ = word1;
+ while (lp < words_end)
+ *lp++ = 0;
+ }
}
else if ((*lp & mask[prec_bits]) != mask[prec_bits])
*lp += 1;
@@ -532,7 +549,7 @@ gen_to_words (words, precision, exponent_bits)
return return_value;
}
- else if (exponent_4 >= mask[exponent_bits])
+ else if ((unsigned long) exponent_4 >= mask[exponent_bits])
{
/*
* Exponent overflow. Lose immediately.
diff --git a/contrib/binutils/gas/config/obj-aout.c b/contrib/binutils/gas/config/obj-aout.c
index bb566e1..7dc8946 100644
--- a/contrib/binutils/gas/config/obj-aout.c
+++ b/contrib/binutils/gas/config/obj-aout.c
@@ -461,7 +461,7 @@ obj_crawl_symbol_chain (headers)
S_SET_SEGMENT (symbolP, SEG_TEXT);
} /* if pusing data into text */
- resolve_symbol_value (symbolP);
+ resolve_symbol_value (symbolP, 1);
/* Skip symbols which were equated to undefined or common
symbols. */
diff --git a/contrib/binutils/gas/config/obj-aout.h b/contrib/binutils/gas/config/obj-aout.h
index ab47ab6..339070e 100644
--- a/contrib/binutils/gas/config/obj-aout.h
+++ b/contrib/binutils/gas/config/obj-aout.h
@@ -1,5 +1,5 @@
/* obj-aout.h, a.out object file format for gas, the assembler.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 1996
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -14,9 +14,10 @@
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. */
+ 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. */
/* Tag to validate a.out object file format processing */
#define OBJ_AOUT 1
@@ -102,11 +103,14 @@ extern void obj_aout_frob_file PARAMS ((void));
#define S_IS_DEBUG(s) ((s)->sy_symbol.n_type & N_STAB)
/* True if a symbol is local symbol name */
#define S_IS_LOCAL(s) \
- (S_GET_NAME (s) \
- && !S_IS_DEBUG (s) \
- && (strchr (S_GET_NAME (s), '\001') != NULL \
- || strchr (S_GET_NAME (s), '\002') != NULL \
- || (S_LOCAL_NAME(s) && !flag_keep_locals)))
+ ((S_GET_NAME (s) \
+ && !S_IS_DEBUG (s) \
+ && (strchr (S_GET_NAME (s), '\001') != NULL \
+ || strchr (S_GET_NAME (s), '\002') != NULL \
+ || (S_LOCAL_NAME(s) && !flag_keep_locals))) \
+ || (flag_strip_local_absolute \
+ && ! S_IS_EXTERNAL(s) \
+ && S_GET_SEGMENT (s) == absolute_section))
/* True if a symbol is not defined in this file */
#define S_IS_EXTERN(s) ((s)->sy_symbol.n_type & N_EXT)
/* True if the symbol has been generated because of a .stabd directive */
diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c
index 2fe0cb8..a6421bf 100644
--- a/contrib/binutils/gas/config/obj-coff.c
+++ b/contrib/binutils/gas/config/obj-coff.c
@@ -1,5 +1,5 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS.
@@ -30,6 +30,7 @@
#define KEEP_RELOC_INFO
#endif
+static void obj_coff_bss PARAMS ((int));
const char *s_get_name PARAMS ((symbolS * s));
static symbolS *def_symbol_in_progress;
@@ -165,7 +166,18 @@ tag_find_or_make (name)
return symbolP;
}
+/* We accept the .bss directive to set the section for backward
+ compatibility with earlier versions of gas. */
+static void
+obj_coff_bss (ignore)
+ int ignore;
+{
+ if (*input_line_pointer == '\n')
+ subseg_new (".bss", get_absolute_expression ());
+ else
+ s_lcomm (0);
+}
#ifdef BFD_ASSEMBLER
@@ -1088,8 +1100,9 @@ coff_adjust_section_syms (abfd, sec, x)
fixS *fixp = seginfo->fix_root;
while (fixp)
{
+ if (! fixp->fx_done)
+ nrelocs++;
fixp = fixp->fx_next;
- nrelocs++;
}
}
if (bfd_get_section_size_before_reloc (sec) == 0
@@ -1105,7 +1118,7 @@ coff_adjust_section_syms (abfd, sec, x)
}
void
-coff_frob_file ()
+coff_frob_file_after_relocs ()
{
bfd_map_over_sections (stdoutput, coff_adjust_section_syms, (char*) 0);
}
@@ -1433,7 +1446,6 @@ static void adjust_stab_section PARAMS ((bfd *abfd, segT seg));
static void obj_coff_lcomm PARAMS ((int));
static void obj_coff_text PARAMS ((int));
static void obj_coff_data PARAMS ((int));
-static void obj_coff_bss PARAMS ((int));
static void obj_coff_ident PARAMS ((int));
void obj_coff_section PARAMS ((int));
@@ -1684,7 +1696,7 @@ do_relocs_for (abfd, h, file_cursor)
/* Turn the segment of the symbol into an offset. */
if (symbol_ptr)
{
- resolve_symbol_value (symbol_ptr);
+ resolve_symbol_value (symbol_ptr, 1);
if (! symbol_ptr->sy_resolved)
{
char *file;
@@ -1978,8 +1990,12 @@ symbol_to_chars (abfd, where, symbolP)
}
/* At the same time, relocate all symbols to their output value */
+#ifndef TE_PE
val = (segment_info[S_GET_SEGMENT (symbolP)].scnhdr.s_paddr
+ S_GET_VALUE (symbolP));
+#else
+ val = S_GET_VALUE (symbolP);
+#endif
S_SET_VALUE (symbolP, val);
@@ -2656,7 +2672,7 @@ yank_symbols ()
S_SET_SEGMENT (symbolP, SEG_E0);
} /* push data into text */
- resolve_symbol_value (symbolP);
+ resolve_symbol_value (symbolP, 1);
if (S_GET_STORAGE_CLASS (symbolP) == C_NULL)
{
@@ -3200,7 +3216,11 @@ write_object_file ()
/* I think the section alignment is only used on the i960; the
i960 needs it, and it should do no harm on other targets. */
+#ifdef ALIGNMENT_IN_S_FLAGS
+ segment_info[i].scnhdr.s_flags |= (section_alignment[i] & 0xF) << 8;
+#else
segment_info[i].scnhdr.s_align = 1 << section_alignment[i];
+#endif
if (i == SEG_E0)
H_SET_TEXT_SIZE (&headers, size);
@@ -3456,16 +3476,6 @@ obj_coff_data (ignore)
}
static void
-obj_coff_bss (ignore)
- int ignore;
-{
- if (*input_line_pointer == '\n') /* .bss */
- subseg_new(".bss", get_absolute_expression());
- else /* .bss id,expr */
- obj_coff_lcomm(0);
-}
-
-static void
obj_coff_ident (ignore)
int ignore;
{
@@ -3885,7 +3895,7 @@ fixup_segment (segP, this_segment_type)
/* Make sure the symbols have been resolved; this may not have
happened if these are expression symbols. */
if (add_symbolP != NULL && ! add_symbolP->sy_resolved)
- resolve_symbol_value (add_symbolP);
+ resolve_symbol_value (add_symbolP, 1);
if (add_symbolP != NULL)
{
@@ -3915,7 +3925,7 @@ fixup_segment (segP, this_segment_type)
}
if (sub_symbolP != NULL && ! sub_symbolP->sy_resolved)
- resolve_symbol_value (sub_symbolP);
+ resolve_symbol_value (sub_symbolP, 1);
if (add_symbolP != NULL
&& add_symbolP->sy_mri_common)
@@ -4048,11 +4058,21 @@ fixup_segment (segP, this_segment_type)
add_number += S_GET_VALUE (add_symbolP);
add_number -= md_pcrel_from (fixP);
-#if defined (TC_I386) || defined (TE_LYNX)
- /* On the 386 we must adjust by the segment vaddr as
- well. Ian Taylor. */
- add_number -= segP->scnhdr.s_vaddr;
-#endif
+
+ /* We used to do
+ add_number -= segP->scnhdr.s_vaddr;
+ if defined (TC_I386) || defined (TE_LYNX). I now
+ think that was an error propagated from the case when
+ we are going to emit the relocation. If we are not
+ going to emit the relocation, then we just want to
+ set add_number to the difference between the symbols.
+ This is a case that would only arise when there is a
+ PC relative reference from a section other than .text
+ to a symbol defined in the same section, and the
+ reference is not relaxed. Since jump instructions on
+ the i386 are relaxed, this could only arise with a
+ call instruction. */
+
pcrel = 0; /* Lie. Don't want further pcrel processing. */
if (!TC_FORCE_RELOCATION (fixP))
{
@@ -4196,7 +4216,7 @@ fixup_segment (segP, this_segment_type)
/* Once this fix has been applied, we don't have to output
anything nothing more need be done. */
#ifdef MD_APPLY_FIX3
- md_apply_fix3 (fixP, &add_number, this_segment_type);
+ md_apply_fix3 (fixP, (valueT *) &add_number, this_segment_type);
#else
md_apply_fix (fixP, add_number);
#endif
@@ -4300,11 +4320,13 @@ const pseudo_typeS obj_pseudo_table[] =
/* FIXME: We ignore the MRI short attribute. */
{"section.s", obj_coff_section, 0},
{"sect.s", obj_coff_section, 0},
+ /* We accept the .bss directive for backward compatibility with
+ earlier versions of gas. */
+ {"bss", obj_coff_bss, 0},
#ifndef BFD_ASSEMBLER
{"use", obj_coff_section, 0},
{"text", obj_coff_text, 0},
{"data", obj_coff_data, 0},
- {"bss", obj_coff_bss, 0},
{"lcomm", obj_coff_lcomm, 0},
{"ident", obj_coff_ident, 0},
#else
@@ -4349,8 +4371,8 @@ const struct format_ops coff_format_ops =
0,
1,
coff_frob_symbol,
- coff_frob_file,
no_func,
+ coff_frob_file_after_relocs,
0, 0,
0, 0,
0,
diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h
index 1cc5d2d..f796461 100644
--- a/contrib/binutils/gas/config/obj-coff.h
+++ b/contrib/binutils/gas/config/obj-coff.h
@@ -1,5 +1,5 @@
/* coff object file format
- Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 1997
+ Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS.
@@ -63,11 +63,6 @@
#ifdef TC_SPARC
#include "coff/sparc.h"
-#ifdef TE_LYNX
-#define TARGET_FORMAT "coff-sparc-lynx"
-#else
-#define TARGET_FORMAT "coff-sparc"
-#endif
#endif
#ifdef TC_I386
@@ -116,7 +111,10 @@
#ifdef TC_SH
#include "coff/sh.h"
-#define TARGET_FORMAT (shl ? "coff-shl" : "coff-sh")
+#define TARGET_FORMAT \
+ (shl \
+ ? (sh_small ? "coff-shl-small" : "coff-shl") \
+ : (sh_small ? "coff-sh-small" : "coff-sh"))
#endif
#ifdef TC_M88K
@@ -129,6 +127,11 @@
#define TARGET_FORMAT "coff-w65"
#endif
+#ifdef TC_TIC30
+#include "coff/tic30.h"
+#define TARGET_FORMAT "coff-tic30"
+#endif
+
/* Targets may also set this. Also, if BFD_ASSEMBLER is defined, this
will already have been defined. */
@@ -340,11 +343,11 @@ extern void coff_frob_symbol PARAMS ((struct symbol *, int *));
extern void coff_adjust_symtab PARAMS ((void));
extern void coff_frob_section PARAMS ((segT));
extern void coff_adjust_section_syms PARAMS ((bfd *, asection *, PTR));
-extern void coff_frob_file PARAMS ((void));
+extern void coff_frob_file_after_relocs PARAMS ((void));
#define obj_frob_symbol(S,P) coff_frob_symbol(S,&P)
#define obj_adjust_symtab() coff_adjust_symtab()
#define obj_frob_section(S) coff_frob_section (S)
-#define obj_frob_file() coff_frob_file ()
+#define obj_frob_file_after_relocs() coff_frob_file_after_relocs ()
extern struct symbol *coff_last_function;
@@ -449,7 +452,10 @@ typedef struct
((s)->sy_symbol.ost_entry.n_scnum == C_REGISTER_SECTION \
|| (S_LOCAL_NAME(s) && ! flag_keep_locals && ! S_IS_DEBUG (s)) \
|| strchr (S_GET_NAME (s), '\001') != NULL \
- || strchr (S_GET_NAME (s), '\002') != NULL)
+ || strchr (S_GET_NAME (s), '\002') != NULL \
+ || (flag_strip_local_absolute \
+ && !S_IS_EXTERNAL(s) \
+ && (s)->sy_symbol.ost_entry.n_scnum == C_ABS_SECTION))
/* True if a symbol is not defined in this file */
#define S_IS_EXTERN(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \
&& S_GET_VALUE (s) == 0)
@@ -787,6 +793,18 @@ extern void obj_coff_pe_handle_link_once ();
#endif /* not BFD_ASSEMBLER */
+/* In COFF, if a symbol is defined using .def/.val SYM/.endef, it's OK
+ to redefine the symbol later on. This can happen if C symbols use
+ a prefix, and a symbol is defined both with and without the prefix,
+ as in start/_start/__start in gcc/libgcc1-test.c. */
+#define RESOLVE_SYMBOL_REDEFINITION(sym) \
+(SF_GET_GET_SEGMENT (sym) \
+ ? (sym->sy_frag = frag_now, \
+ S_SET_VALUE (sym, frag_now_fix ()), \
+ S_SET_SEGMENT (sym, now_seg), \
+ 0) \
+ : 0)
+
/* Stabs in a coff file go into their own section. */
#define SEPARATE_STAB_SECTIONS 1
diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c
index c861d54..b8201f5 100644
--- a/contrib/binutils/gas/config/obj-elf.c
+++ b/contrib/binutils/gas/config/obj-elf.c
@@ -33,6 +33,10 @@
#include "ecoff.h"
#endif
+#ifdef TC_ALPHA
+#include "elf/alpha.h"
+#endif
+
#ifdef TC_MIPS
#include "elf/mips.h"
#endif
@@ -65,6 +69,7 @@ static void obj_elf_common PARAMS ((int));
static void obj_elf_symver PARAMS ((int));
static void obj_elf_data PARAMS ((int));
static void obj_elf_text PARAMS ((int));
+static void obj_elf_subsection PARAMS ((int));
static const pseudo_typeS elf_pseudo_table[] =
{
@@ -87,6 +92,9 @@ static const pseudo_typeS elf_pseudo_table[] =
/* This is a GNU extension to handle symbol versions. */
{"symver", obj_elf_symver, 0},
+ /* A GNU extension to change subsection only. */
+ {"subsection", obj_elf_subsection, 0},
+
/* These are used for dwarf. */
{"2byte", cons, 2},
{"4byte", cons, 4},
@@ -155,11 +163,11 @@ elf_begin ()
{
/* Add symbols for the known sections to the symbol table. */
symbol_table_insert (section_symbol (bfd_get_section_by_name (stdoutput,
- ".text")));
+ TEXT_SECTION_NAME)));
symbol_table_insert (section_symbol (bfd_get_section_by_name (stdoutput,
- ".data")));
+ DATA_SECTION_NAME)));
symbol_table_insert (section_symbol (bfd_get_section_by_name (stdoutput,
- ".bss")));
+ BSS_SECTION_NAME)));
}
void
@@ -617,6 +625,7 @@ obj_elf_section (xxx)
++input_line_pointer;
SKIP_WHITESPACE ();
+
if (*input_line_pointer == '"')
{
/* Pick up a string with a combination of a, w, x. */
@@ -699,7 +708,7 @@ obj_elf_section (xxx)
SKIP_WHITESPACE ();
if (*input_line_pointer != '#')
{
- as_warn ("Bad .section directive");
+ as_warn ("Bad .section directive - character following name is not '#'");
ignore_rest_of_line ();
return;
}
@@ -791,6 +800,10 @@ obj_elf_section (xxx)
#endif
}
+ /* Prevent SEC_HAS_CONTENTS from being inadvertently set. */
+ if (type == SHT_NOBITS)
+ seg_info (sec)->bss = 1;
+
bfd_set_section_flags (stdoutput, sec, flags);
/* Add a symbol for this section to the symbol table. */
@@ -845,6 +858,28 @@ obj_elf_text (i)
#endif
}
+static void
+obj_elf_subsection (ignore)
+ int ignore;
+{
+ register int temp;
+
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
+ previous_section = now_seg;
+ previous_subsection = now_subseg;
+
+ temp = get_absolute_expression ();
+ subseg_set (now_seg, (subsegT) temp);
+ demand_empty_rest_of_line ();
+
+#ifdef md_elf_section_change_hook
+ md_elf_section_change_hook ();
+#endif
+}
+
/* This can be called from the processor backends if they change
sections. */
@@ -1373,10 +1408,17 @@ elf_frob_symbol (symp, puntp)
#ifdef TC_MIPS
/* The Irix 5 and 6 assemblers set the type of any common symbol and
- any undefined non-function symbol to STT_OBJECT. We try to be compatible,
- since newer Irix 5 and 6 linkers care. */
- if (S_IS_COMMON (symp)
- || (! S_IS_DEFINED (symp) && ((symp->bsym->flags & BSF_FUNCTION) == 0)))
+ any undefined non-function symbol to STT_OBJECT. We try to be
+ compatible, since newer Irix 5 and 6 linkers care. However, we
+ only set undefined symbols to be STT_OBJECT if we are on Irix,
+ because that is the only time gcc will generate the necessary
+ .global directives to mark functions. */
+
+ if (S_IS_COMMON (symp))
+ symp->bsym->flags |= BSF_OBJECT;
+
+ if (strstr (TARGET_OS, "irix") != NULL
+ && (! S_IS_DEFINED (symp) && ((symp->bsym->flags & BSF_FUNCTION) == 0)))
symp->bsym->flags |= BSF_OBJECT;
#endif
diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h
index 973f938..ff65790 100644
--- a/contrib/binutils/gas/config/obj-elf.h
+++ b/contrib/binutils/gas/config/obj-elf.h
@@ -107,12 +107,25 @@ extern void obj_elf_version PARAMS ((int));
/* When setting one symbol equal to another, by default we probably
want them to have the same "size", whatever it means in the current
context. */
-#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \
-do \
- { \
- S_SET_SIZE ((DEST), S_GET_SIZE (SRC)); \
- S_SET_OTHER ((DEST), S_GET_OTHER (SRC)); \
- } \
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \
+do \
+ { \
+ if ((SRC)->sy_obj.size) \
+ { \
+ if ((DEST)->sy_obj.size == NULL) \
+ (DEST)->sy_obj.size = \
+ (expressionS *) xmalloc (sizeof (expressionS)); \
+ *(DEST)->sy_obj.size = *(SRC)->sy_obj.size; \
+ } \
+ else \
+ { \
+ if ((DEST)->sy_obj.size != NULL) \
+ free ((DEST)->sy_obj.size); \
+ (DEST)->sy_obj.size = NULL; \
+ } \
+ S_SET_SIZE ((DEST), S_GET_SIZE (SRC)); \
+ S_SET_OTHER ((DEST), S_GET_OTHER (SRC)); \
+ } \
while (0)
/* Stabs go in a separate section. */
diff --git a/contrib/binutils/gas/config/obj-multi.h b/contrib/binutils/gas/config/obj-multi.h
index 526b82e..fe8d98d 100644
--- a/contrib/binutils/gas/config/obj-multi.h
+++ b/contrib/binutils/gas/config/obj-multi.h
@@ -16,7 +16,7 @@
#define S_SET_SIZE (this_format->s_set_size)
#define S_GET_ALIGN (this_format->s_get_align)
#define S_SET_ALIGN (this_format->s_set_align)
-#define obj_copy_symbol_attributes (this_format->copy_symbol_attributes)
+#define OBJ_COPY_SYMBOL_ATTRIBUTES (this_format->copy_symbol_attributes)
#define OBJ_PROCESS_STAB (this_format->process_stab)
#if defined (OBJ_MAYBE_ECOFF) || (defined (OBJ_MAYBE_ELF) && defined (TC_MIPS))
diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c
index a47191e..4c4da6c 100644
--- a/contrib/binutils/gas/config/tc-alpha.c
+++ b/contrib/binutils/gas/config/tc-alpha.c
@@ -110,11 +110,20 @@ struct alpha_macro
#define note_fpreg(R) (alpha_fprmask |= (1 << (R)))
/* Predicates for 16- and 32-bit ranges */
+/* XXX: The non-shift version appears to trigger a compiler bug when
+ cross-assembling from x86 w/ gcc 2.7.2. */
+#if 1
+#define range_signed_16(x) \
+ (((offsetT)(x) >> 15) == 0 || ((offsetT)(x) >> 15) == -1)
+#define range_signed_32(x) \
+ (((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)
+#endif
/* Macros for sign extending from 16- and 32-bits. */
/* XXX: The cast macros will work on all the systems that I care about,
@@ -220,7 +229,7 @@ static void create_literal_section PARAMS ((const char *, segT *, symbolS **));
#ifndef OBJ_ELF
static void select_gp_value PARAMS ((void));
#endif
-static void alpha_align PARAMS ((int, char *, symbolS *));
+static void alpha_align PARAMS ((int, char *, symbolS *, int));
/* Generic assembler global variables which must be defined by all
@@ -255,14 +264,16 @@ char FLT_CHARS[] = "rRsSfFdDxXpP";
#endif
#ifdef OBJ_EVAX
-const char *md_shortopts = "Fm:g+1h:H";
+const char *md_shortopts = "Fm:g+1h:HG:";
#else
-const char *md_shortopts = "Fm:g";
+const char *md_shortopts = "Fm:gG:";
#endif
struct option md_longopts[] = {
#define OPTION_32ADDR (OPTION_MD_BASE)
{ "32addr", no_argument, NULL, OPTION_32ADDR },
+#define OPTION_RELAX (OPTION_32ADDR+1)
+ { "relax", no_argument, NULL, OPTION_RELAX },
{ NULL, no_argument, NULL, 0 }
};
@@ -375,6 +386,12 @@ unsigned long alpha_gprmask, alpha_fprmask;
/* Whether the debugging option was seen. */
static int alpha_debug;
+/* Don't fully resolve relocations, allowing code movement in the linker. */
+static int alpha_flag_relax;
+
+/* What value to give to bfd_set_gp_size. */
+static int g_switch_value = 8;
+
#ifdef OBJ_EVAX
/* Collect information about current procedure here. */
static struct {
@@ -398,9 +415,47 @@ static int alpha_flag_show_after_trunc = 0; /* -H */
* longer than 64 characters, else longer symbol names are truncated.
*/
-static int alpha_basereg_clobbered;
#endif
+/* A table of CPU names and opcode sets. */
+
+static const struct cpu_type
+{
+ const char *name;
+ unsigned flags;
+} 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
+ usage in MILO that does -m21064. Probably something more
+ specific like -m21064-pal should be used, but oh well. */
+
+ { "21064", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
+ { "21064a", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
+ { "21066", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
+ { "21068", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
+ { "21164", AXP_OPCODE_BASE|AXP_OPCODE_EV5 },
+ /* Do we have CIX extension here? */
+ { "21164a", AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX },
+ /* Still same PALcodes? */
+ { "21164pc", (AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX
+ |AXP_OPCODE_MAX) },
+ /* All new PALcodes? Extras? */
+ { "21264", (AXP_OPCODE_BASE|AXP_OPCODE_BWX
+ |AXP_OPCODE_CIX|AXP_OPCODE_MAX) },
+
+ { "ev4", AXP_OPCODE_BASE },
+ { "ev45", AXP_OPCODE_BASE },
+ { "lca45", AXP_OPCODE_BASE },
+ { "ev5", AXP_OPCODE_BASE },
+ { "ev56", AXP_OPCODE_BASE|AXP_OPCODE_BWX },
+ { "pca56", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_MAX },
+ { "ev6", AXP_OPCODE_BASE|AXP_OPCODE_BWX|AXP_OPCODE_CIX|AXP_OPCODE_MAX },
+
+ { "all", AXP_OPCODE_BASE },
+ { 0 }
+};
+
/* The macro table */
static const struct alpha_macro alpha_macros[] = {
@@ -639,38 +694,30 @@ static const int alpha_num_macros
void
md_begin ()
{
- unsigned int i = 0;
+ unsigned int i;
/* Create the opcode hash table */
alpha_opcode_hash = hash_new ();
for (i = 0; i < alpha_num_opcodes; )
{
- const char *name, *retval;
+ const char *name, *retval, *slash;
name = alpha_opcodes[i].name;
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);
- while (++i < alpha_num_opcodes
- && (alpha_opcodes[i].name == name
- || !strcmp (alpha_opcodes[i].name, name)))
- continue;
- }
+ /* Some opcodes include modifiers of various sorts with a "/mod"
+ syntax, like the architecture manual suggests. However, for
+ use with gcc at least, we also need access to those same opcodes
+ without the "/". */
- /* Some opcodes include modifiers of various sorts with a "/mod" syntax,
- like the architecture manual suggests. However, for use with gcc at
- least, we also need access to those same opcodes without the "/". */
- for (i = 0; i < alpha_num_opcodes; )
- {
- const char *name, *slash;
- name = alpha_opcodes[i].name;
- if ((slash = strchr(name, '/')) != NULL)
+ if ((slash = strchr (name, '/')) != NULL)
{
char *p = xmalloc (strlen (name));
- memcpy(p, name, slash-name);
- strcpy(p+(slash-name), slash+1);
+ memcpy (p, name, slash - name);
+ strcpy (p + (slash - name), slash + 1);
(void)hash_insert(alpha_opcode_hash, p, (PTR)&alpha_opcodes[i]);
/* Ignore failures -- the opcode table does duplicate some
@@ -721,7 +768,7 @@ md_begin ()
/* Create the special symbols and sections we'll be using */
/* So .sbss will get used for tiny objects. */
- bfd_set_gp_size (stdoutput, 8);
+ bfd_set_gp_size (stdoutput, g_switch_value);
#ifdef OBJ_ECOFF
create_literal_section (".lita", &alpha_lita_section, &alpha_lita_symbol);
@@ -890,43 +937,14 @@ md_parse_option (c, arg)
alpha_debug = 1;
break;
+ case 'G':
+ g_switch_value = atoi(arg);
+ break;
+
case 'm':
{
- static const struct machine
- {
- const char *name;
- unsigned flags;
- } *p, m[] =
- {
- { "21064", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
- { "21064a", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
- { "21066", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
- { "21068", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
- { "21164", AXP_OPCODE_BASE|AXP_OPCODE_EV5 },
- /* Do we have CIX extension here? */
- { "21164a", AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX },
- /* Still same PALcodes? */
- { "21164pc", (AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX
- |AXP_OPCODE_CIX|AXP_OPCODE_MAX) },
- /* All new PALcodes? Extras? */
- { "21264", (AXP_OPCODE_BASE|AXP_OPCODE_BWX
- |AXP_OPCODE_CIX|AXP_OPCODE_MAX) },
-
- { "ev4", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
- { "ev45", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
- { "lca45", AXP_OPCODE_BASE|AXP_OPCODE_EV4 },
- { "ev5", AXP_OPCODE_BASE|AXP_OPCODE_EV5 },
- { "ev56", AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX },
- { "pca56", (AXP_OPCODE_BASE|AXP_OPCODE_EV5|AXP_OPCODE_BWX
- |AXP_OPCODE_CIX|AXP_OPCODE_MAX) },
- { "ev6", (AXP_OPCODE_BASE|AXP_OPCODE_BWX
- |AXP_OPCODE_CIX|AXP_OPCODE_MAX) },
-
- { "all", AXP_OPCODE_BASE },
- { 0 }
- };
-
- for (p = m; p->name; ++p)
+ const struct cpu_type *p;
+ for (p = cpu_types; p->name; ++p)
if (strcmp(arg, p->name) == 0)
{
alpha_target_name = p->name, alpha_target = p->flags;
@@ -950,6 +968,10 @@ md_parse_option (c, arg)
break;
#endif
+ case OPTION_RELAX:
+ alpha_flag_relax = 1;
+ break;
+
default:
return 0;
}
@@ -1052,12 +1074,18 @@ md_apply_fix (fixP, valueP)
break;
case BFD_RELOC_16:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_16_PCREL;
size = 2;
goto do_reloc_xx;
case BFD_RELOC_32:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_32_PCREL;
size = 4;
goto do_reloc_xx;
case BFD_RELOC_64:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_64_PCREL;
size = 8;
do_reloc_xx:
if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
@@ -1257,6 +1285,9 @@ int
alpha_force_relocation (f)
fixS *f;
{
+ if (alpha_flag_relax)
+ return 1;
+
switch (f->fx_r_type)
{
case BFD_RELOC_ALPHA_GPDISP_HI16:
@@ -1864,7 +1895,7 @@ emit_insn (insn)
/* Take care of alignment duties */
if (alpha_auto_align_on && alpha_current_align < 2)
- alpha_align (2, (char *) NULL, alpha_insn_label);
+ alpha_align (2, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > 2)
alpha_current_align = 2;
alpha_insn_label = NULL;
@@ -1954,7 +1985,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);
@@ -2012,7 +2043,7 @@ assemble_tokens (opname, tok, ntok, local_macros_on)
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);
}
@@ -2241,7 +2272,10 @@ load_expression (targreg, exp, pbasereg, poffset)
else
set_tok_reg (newtok[0], targreg);
- if (!range_signed_32 (addend)
+ /* 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))
{
newtok[1] = *exp;
@@ -2262,16 +2296,6 @@ load_expression (targreg, exp, pbasereg, poffset)
#ifdef OBJ_EVAX
offsetT link;
- if (alpha_basereg_clobbered)
- {
- /* no basereg, reload basreg from 0(FP). */
- set_tok_reg (newtok[0], targreg);
- set_tok_const (newtok[1], 0);
- set_tok_preg (newtok[2], AXP_REG_FP);
- basereg = targreg;
- assemble_tokens ("ldq", newtok, 3, 0);
- }
-
/* Find symbol or symbol pointer in link section. */
if (exp->X_add_symbol == alpha_evax_proc.symbol)
@@ -2347,6 +2371,12 @@ load_expression (targreg, exp, pbasereg, poffset)
set_tok_const (*poffset, 0);
return 0;
+ case O_big:
+ as_bad ("%s number invalid; zero assumed",
+ exp->X_add_number > 0 ? "bignum" : "floating point");
+ addend = 0;
+ break;
+
default:
abort();
}
@@ -2589,15 +2619,6 @@ emit_ir_load (tok, ntok, opname)
}
emit_insn (&insn);
-#ifdef OBJ_EVAX
- /* special hack. If the basereg is clobbered for a call
- all lda's before the call don't have a basereg. */
- if ((tok[0].X_op == O_register)
- && (tok[0].X_add_number == alpha_gp_register))
- {
- alpha_basereg_clobbered = 1;
- }
-#endif
}
/* Handle fp register loads, and both integer and fp register stores.
@@ -3236,19 +3257,6 @@ emit_jsrjmp (tok, ntok, vopname)
}
emit_insn (&insn);
-
-#ifdef OBJ_EVAX
- alpha_basereg_clobbered = 0;
-
- /* reload PV from 0(FP) if it is our current base register. */
- if (alpha_gp_register == AXP_REG_PV)
- {
- set_tok_reg (newtok[0], AXP_REG_PV);
- set_tok_const (newtok[1], 0);
- set_tok_preg (newtok[2], AXP_REG_FP);
- assemble_tokens ("ldq", newtok, 3, 0);
- }
-#endif
}
/* The ret and jcr instructions differ from their instruction
@@ -3316,9 +3324,10 @@ s_alpha_data (i)
alpha_current_align = 0;
}
-#ifdef OBJ_ECOFF
+#if defined (OBJ_ECOFF) || defined (OBJ_EVAX)
-/* Handle the OSF/1 .comm pseudo quirks. */
+/* Handle the OSF/1 and openVMS .comm pseudo quirks.
+ openVMS constructs a section for every common symbol. */
static void
s_alpha_comm (ignore)
@@ -3330,6 +3339,12 @@ s_alpha_comm (ignore)
offsetT temp;
register symbolS *symbolP;
+#ifdef OBJ_EVAX
+ segT current_section = now_seg;
+ int current_subsec = now_subseg;
+ segT new_seg;
+#endif
+
name = input_line_pointer;
c = get_symbol_end ();
@@ -3356,6 +3371,11 @@ s_alpha_comm (ignore)
symbolP = symbol_find_or_make (name);
*p = c;
+#ifdef OBJ_EVAX
+ /* Make a section for the common symbol. */
+ new_seg = subseg_new (xstrdup (name), 0);
+#endif
+
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
as_bad ("Ignoring attempt to re-define symbol");
@@ -3363,6 +3383,16 @@ s_alpha_comm (ignore)
return;
}
+#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),
+ (long) bfd_section_size (stdoutput, new_seg),
+ (long) temp);
+ }
+#else
if (S_GET_VALUE (symbolP))
{
if (S_GET_VALUE (symbolP) != (valueT) temp)
@@ -3371,12 +3401,25 @@ s_alpha_comm (ignore)
(long) S_GET_VALUE (symbolP),
(long) temp);
}
+#endif
else
{
+#ifdef OBJ_EVAX
+ subseg_set (new_seg, 0);
+ p = frag_more (temp);
+ new_seg->flags |= SEC_IS_COMMON;
+ if (! S_IS_DEFINED (symbolP))
+ symbolP->bsym->section = new_seg;
+#else
S_SET_VALUE (symbolP, (valueT) temp);
+#endif
S_SET_EXTERNAL (symbolP);
}
+#ifdef OBJ_EVAX
+ subseg_set (current_section, current_subsec);
+#endif
+
know (symbolP->sy_frag == &zero_address_frag);
demand_empty_rest_of_line ();
@@ -3452,9 +3495,9 @@ s_alpha_section (secid)
int secid;
{
int temp;
-#define EVAX_SECTION_COUNT 6
+#define EVAX_SECTION_COUNT 5
static char *section_name[EVAX_SECTION_COUNT+1] =
- { "NULL", ".rdata", ".comm", ".link", ".ctors", ".dtors", ".lcomm" };
+ { "NULL", ".rdata", ".comm", ".link", ".ctors", ".dtors" };
if ((secid <= 0) || (secid > EVAX_SECTION_COUNT))
{
@@ -3477,7 +3520,6 @@ static void
s_alpha_prologue (ignore)
int ignore;
{
- alpha_basereg_clobbered = 0;
demand_empty_rest_of_line ();
return;
@@ -3873,7 +3915,6 @@ s_alpha_end (ignore)
*input_line_pointer = c;
demand_empty_rest_of_line ();
alpha_evax_proc.symbol = 0;
- alpha_basereg_clobbered = 0;
return;
}
@@ -3946,7 +3987,7 @@ s_alpha_gprel32 (ignore)
#endif
if (alpha_auto_align_on && alpha_current_align < 2)
- alpha_align (2, (char *) NULL, alpha_insn_label);
+ alpha_align (2, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > 2)
alpha_current_align = 2;
alpha_insn_label = NULL;
@@ -3990,7 +4031,7 @@ s_alpha_float_cons (type)
}
if (alpha_auto_align_on && alpha_current_align < log_size)
- alpha_align (log_size, (char *) NULL, alpha_insn_label);
+ alpha_align (log_size, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > log_size)
alpha_current_align = log_size;
alpha_insn_label = NULL;
@@ -4012,6 +4053,7 @@ s_alpha_proc (is_static)
int temp;
/* Takes ".proc name,nargs" */
+ SKIP_WHITESPACE ();
name = input_line_pointer;
c = get_symbol_end ();
p = input_line_pointer;
@@ -4043,13 +4085,12 @@ static void
s_alpha_set (x)
int x;
{
- char *name = input_line_pointer, ch, *s;
+ char *name, ch, *s;
int yesno = 1;
- while (!is_end_of_line[(unsigned char) *input_line_pointer])
- input_line_pointer++;
- ch = *input_line_pointer;
- *input_line_pointer = '\0';
+ SKIP_WHITESPACE ();
+ name = input_line_pointer;
+ ch = get_symbol_end ();
s = name;
if (s[0] == 'n' && s[1] == 'o')
@@ -4144,7 +4185,7 @@ s_alpha_align (ignore)
if (align != 0)
{
alpha_auto_align_on = 1;
- alpha_align (align, pfill, alpha_insn_label);
+ alpha_align (align, pfill, alpha_insn_label, 1);
}
else
{
@@ -4189,11 +4230,51 @@ alpha_cons_align (size)
++log_size;
if (alpha_auto_align_on && alpha_current_align < log_size)
- alpha_align (log_size, (char *) NULL, alpha_insn_label);
+ alpha_align (log_size, (char *) NULL, alpha_insn_label, 0);
if (alpha_current_align > log_size)
alpha_current_align = log_size;
alpha_insn_label = NULL;
}
+
+/* Here come the .uword, .ulong, and .uquad explicitly unaligned
+ pseudos. We just turn off auto-alignment and call down to cons. */
+
+static void
+s_alpha_ucons (bytes)
+ int bytes;
+{
+ int hold = alpha_auto_align_on;
+ alpha_auto_align_on = 0;
+ cons (bytes);
+ alpha_auto_align_on = hold;
+}
+
+/* Switch the working cpu type. */
+
+static void
+s_alpha_arch (ignored)
+ int ignored;
+{
+ char *name, ch;
+ const struct cpu_type *p;
+
+ SKIP_WHITESPACE ();
+ name = input_line_pointer;
+ ch = get_symbol_end ();
+
+ for (p = cpu_types; p->name; ++p)
+ if (strcmp(name, p->name) == 0)
+ {
+ alpha_target_name = p->name, alpha_target = p->flags;
+ goto found;
+ }
+ as_warn("Unknown CPU identifier `%s'", name);
+
+found:
+ *input_line_pointer = ch;
+ demand_empty_rest_of_line ();
+}
+
#ifdef DEBUG1
@@ -4230,7 +4311,6 @@ alpha_print_token(f, exp)
const pseudo_typeS md_pseudo_table[] =
{
- {"common", s_comm, 0}, /* is this used? */
#ifdef OBJ_ECOFF
{"comm", s_alpha_comm, 0}, /* osf1 compiler does this */
{"rdata", s_alpha_rdata, 0},
@@ -4259,11 +4339,10 @@ const pseudo_typeS md_pseudo_table[] =
{ "end", s_alpha_end, 0},
{ "file", s_alpha_file, 0},
{ "rdata", s_alpha_section, 1},
- { "comm", s_alpha_section, 2},
+ { "comm", s_alpha_comm, 0},
{ "link", s_alpha_section, 3},
{ "ctors", s_alpha_section, 4},
{ "dtors", s_alpha_section, 5},
- { "lcomm", s_alpha_section, 6},
#endif
{"gprel32", s_alpha_gprel32, 0},
{"t_floating", s_alpha_float_cons, 'd'},
@@ -4295,10 +4374,24 @@ const pseudo_typeS md_pseudo_table[] =
{"skip", s_alpha_space, 0},
{"zero", s_alpha_space, 0},
+/* Unaligned data pseudos. */
+ {"uword", s_alpha_ucons, 2},
+ {"ulong", s_alpha_ucons, 4},
+ {"uquad", s_alpha_ucons, 8},
+
+#ifdef OBJ_ELF
+/* Dwarf wants these versions of unaligned. */
+ {"2byte", s_alpha_ucons, 2},
+ {"4byte", s_alpha_ucons, 4},
+ {"8byte", s_alpha_ucons, 8},
+#endif
+
/* We don't do any optimizing, so we can safely ignore these. */
{"noalias", s_ignore, 0},
{"alias", s_ignore, 0},
+ {"arch", s_alpha_arch, 0},
+
{NULL, 0, 0},
};
@@ -4379,10 +4472,11 @@ select_gp_value ()
feature wrt labels. */
static void
-alpha_align (n, pfill, label)
+alpha_align (n, pfill, label, force)
int n;
char *pfill;
symbolS *label;
+ int force;
{
if (alpha_current_align >= n)
return;
@@ -4392,7 +4486,11 @@ alpha_align (n, pfill, label)
if (n > 2
&& (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
{
- static char const nop[4] = { 0x1f, 0x04, 0xff, 0x47 };
+ 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
@@ -4401,7 +4499,10 @@ alpha_align (n, pfill, label)
with proper alignment. */
if (alpha_current_align < 2)
frag_align (2, 0, 0);
- frag_align_pattern (n, nop, sizeof nop, 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);
}
else
frag_align (n, 0, 0);
@@ -4419,6 +4520,9 @@ alpha_align (n, pfill, label)
}
record_alignment(now_seg, n);
+
+ /* ??? if alpha_flag_relax && force && elf, record the requested alignment
+ in a reloc for the linker to see. */
}
/* The Alpha has support for some VAX floating point types, as well as for
diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h
index af2ded6..bdc8ec1 100644
--- a/contrib/binutils/gas/config/tc-alpha.h
+++ b/contrib/binutils/gas/config/tc-alpha.h
@@ -82,3 +82,11 @@ extern void alpha_cons_align PARAMS ((int));
#define tc_frob_file_before_adjust() alpha_frob_file_before_adjust ()
extern void alpha_frob_file_before_adjust PARAMS ((void));
#endif
+
+#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
+
+#ifdef OBJ_ELF
+#define ELF_TC_SPECIAL_SECTIONS \
+ { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, \
+ { ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+#endif
diff --git a/contrib/binutils/gas/config/tc-arc.c b/contrib/binutils/gas/config/tc-arc.c
new file mode 100644
index 0000000..6fed5c6
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-arc.c
@@ -0,0 +1,1481 @@
+/* tc-arc.c -- Assembler for the ARC
+ Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Contributed by Doug Evans (dje@cygnus.com).
+
+ 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. */
+
+#include <stdio.h>
+#include <ctype.h>
+#include "as.h"
+#include "subsegs.h"
+#include "opcode/arc.h"
+#include "elf/arc.h"
+
+extern int arc_get_mach PARAMS ((char *));
+
+static arc_insn arc_insert_operand PARAMS ((arc_insn,
+ const struct arc_operand *, int,
+ const struct arc_operand_value *,
+ offsetT, char *, unsigned int));
+static void arc_common PARAMS ((int));
+static void arc_cpu PARAMS ((int));
+/*static void arc_rename PARAMS ((int));*/
+static int get_arc_exp_reloc_type PARAMS ((int, int, expressionS *,
+ expressionS *));
+
+const pseudo_typeS md_pseudo_table[] =
+{
+ { "align", s_align_bytes, 0 }, /* Defaulting is invalid (0) */
+ { "common", arc_common, 0 },
+/*{ "hword", cons, 2 }, - already exists */
+ { "word", cons, 4 },
+/*{ "xword", cons, 8 },*/
+ { "cpu", arc_cpu, 0 },
+/*{ "rename", arc_rename, 0 },*/
+ { NULL, 0, 0 },
+};
+
+/* 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[] = "#;";
+
+/* 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
+ 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 '/' isn't otherwise defined. */
+const char line_comment_chars[] = "#";
+
+const char line_separator_chars[] = "";
+
+/* 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 */
+const char FLT_CHARS[] = "rRsSfFdD";
+
+/* Byte order. */
+extern int target_big_endian;
+const char *arc_target_format = DEFAULT_TARGET_FORMAT;
+static int byte_order = DEFAULT_BYTE_ORDER;
+
+/* One of bfd_mach_arc_xxx. */
+static int arc_mach_type = bfd_mach_arc_base;
+
+/* Non-zero if the cpu type has been explicitly specified. */
+static int mach_type_specified_p = 0;
+
+/* Non-zero if opcode tables have been initialized.
+ A .cpu command must appear before any instructions. */
+static int cpu_tables_init_p = 0;
+
+static struct hash_control *arc_suffix_hash = NULL;
+
+const char *md_shortopts = "";
+struct option md_longopts[] =
+{
+#define OPTION_EB (OPTION_MD_BASE + 0)
+ {"EB", no_argument, NULL, OPTION_EB},
+#define OPTION_EL (OPTION_MD_BASE + 1)
+ {"EL", no_argument, NULL, OPTION_EL},
+ { NULL, no_argument, NULL, 0 }
+};
+size_t md_longopts_size = sizeof (md_longopts);
+
+/*
+ * md_parse_option
+ *
+ * Invocation line includes a switch not recognized by the base assembler.
+ * See if it's a processor-specific option.
+ */
+
+int
+md_parse_option (c, arg)
+ int c;
+ char *arg;
+{
+ switch (c)
+ {
+ case OPTION_EB:
+ byte_order = BIG_ENDIAN;
+ arc_target_format = "elf32-bigarc";
+ break;
+ case OPTION_EL:
+ byte_order = LITTLE_ENDIAN;
+ arc_target_format = "elf32-littlearc";
+ break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
+void
+md_show_usage (stream)
+ FILE *stream;
+{
+ fprintf (stream, "\
+ARC options:\n\
+-EB generate big endian output\n\
+-EL generate little endian output\n");
+}
+
+/* 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.
+ Opcode selection is defered until later because we might see a .cpu
+ command. */
+
+void
+md_begin ()
+{
+ /* The endianness can be chosen "at the factory". */
+ target_big_endian = byte_order == BIG_ENDIAN;
+
+ if (!bfd_set_arch_mach (stdoutput, bfd_arch_arc, arc_mach_type))
+ as_warn ("could not set architecture and machine");
+
+ /* Assume the base cpu. This call is necessary because we need to
+ initialize `arc_operand_map' which may be needed before we see the
+ first insn. */
+ arc_opcode_init_tables (arc_get_opcode_mach (bfd_mach_arc_base,
+ target_big_endian));
+}
+
+/* Initialize the various opcode and operand tables.
+ MACH is one of bfd_mach_arc_xxx. */
+
+static void
+init_opcode_tables (mach)
+ int mach;
+{
+ register unsigned int i;
+ char *last;
+
+ if ((arc_suffix_hash = hash_new ()) == NULL)
+ as_fatal ("virtual memory exhausted");
+
+ if (!bfd_set_arch_mach (stdoutput, bfd_arch_arc, mach))
+ as_warn ("could not set architecture and machine");
+
+ /* This initializes a few things in arc-opc.c that we need.
+ This must be called before the various arc_xxx_supported fns. */
+ arc_opcode_init_tables (arc_get_opcode_mach (mach, target_big_endian));
+
+ /* Only put the first entry of each equivalently named suffix in the
+ table. */
+ last = "";
+ for (i = 0; i < arc_suffixes_count; i++)
+ {
+ if (! arc_opval_supported (&arc_suffixes[i]))
+ continue;
+ if (strcmp (arc_suffixes[i].name, last) != 0)
+ hash_insert (arc_suffix_hash, arc_suffixes[i].name, (PTR) (arc_suffixes + i));
+ last = arc_suffixes[i].name;
+ }
+
+ /* Since registers don't have a prefix, we put them in the symbol table so
+ they can't be used as symbols. This also simplifies argument parsing as
+ we can let gas parse registers for us. The recorded register number is
+ the index in `arc_reg_names'. */
+ for (i = 0; i < arc_reg_names_count; i++)
+ {
+ if (! arc_opval_supported (&arc_reg_names[i]))
+ continue;
+ /* Use symbol_create here instead of symbol_new so we don't try to
+ output registers into the object file's symbol table. */
+ symbol_table_insert (symbol_create (arc_reg_names[i].name, reg_section,
+ i, &zero_address_frag));
+ }
+
+ /* Tell `s_cpu' it's too late. */
+ cpu_tables_init_p = 1;
+}
+
+/* Insert an operand value into an instruction.
+ If REG is non-NULL, it is a register number and ignore VAL. */
+
+static arc_insn
+arc_insert_operand (insn, operand, mods, reg, val, file, line)
+ arc_insn insn;
+ const struct arc_operand *operand;
+ int mods;
+ const struct arc_operand_value *reg;
+ offsetT val;
+ char *file;
+ unsigned int line;
+{
+ if (operand->bits != 32)
+ {
+ long min, max;
+ offsetT test;
+
+ if ((operand->flags & ARC_OPERAND_SIGNED) != 0)
+ {
+ if ((operand->flags & ARC_OPERAND_SIGNOPT) != 0)
+ max = (1 << operand->bits) - 1;
+ else
+ max = (1 << (operand->bits - 1)) - 1;
+ min = - (1 << (operand->bits - 1));
+ }
+ else
+ {
+ max = (1 << operand->bits) - 1;
+ min = 0;
+ }
+
+ if ((operand->flags & ARC_OPERAND_NEGATIVE) != 0)
+ test = - val;
+ else
+ test = val;
+
+ if (test < (offsetT) min || test > (offsetT) max)
+ {
+ const char *err =
+ "operand out of range (%s not between %ld and %ld)";
+ char buf[100];
+
+ sprint_value (buf, test);
+ if (file == (char *) NULL)
+ as_warn (err, buf, min, max);
+ else
+ as_warn_where (file, line, err, buf, min, max);
+ }
+ }
+
+ if (operand->insert)
+ {
+ const char *errmsg;
+
+ errmsg = NULL;
+ insn = (*operand->insert) (insn, operand, mods, reg, (long) val, &errmsg);
+ if (errmsg != (const char *) NULL)
+ as_warn (errmsg);
+ }
+ else
+ insn |= (((long) val & ((1 << operand->bits) - 1))
+ << operand->shift);
+
+ return insn;
+}
+
+/* We need to keep a list of fixups. We can't simply generate them as
+ we go, because that would require us to first create the frag, and
+ that would screw up references to ``.''. */
+
+struct arc_fixup
+{
+ /* index into `arc_operands' */
+ int opindex;
+ expressionS exp;
+};
+
+#define MAX_FIXUPS 5
+
+#define MAX_SUFFIXES 5
+
+/* This routine is called for each instruction to be assembled. */
+
+void
+md_assemble (str)
+ char *str;
+{
+ const struct arc_opcode *opcode;
+ char *start;
+ arc_insn insn;
+ static int init_tables_p = 0;
+
+ /* Opcode table initialization is deferred until here because we have to
+ wait for a possible .cpu command. */
+ if (!init_tables_p)
+ {
+ init_opcode_tables (arc_mach_type);
+ init_tables_p = 1;
+ }
+
+ /* Skip leading white space. */
+ while (isspace (*str))
+ str++;
+
+ /* The instructions are stored in lists hashed by the first letter (though
+ we needn't care how they're hashed). Get the first in the list. */
+
+ opcode = arc_opcode_lookup_asm (str);
+
+ /* Keep looking until we find a match. */
+
+ start = str;
+ for ( ; opcode != NULL; opcode = ARC_OPCODE_NEXT_ASM (opcode))
+ {
+ int past_opcode_p, fc, num_suffixes;
+ char *syn;
+ struct arc_fixup fixups[MAX_FIXUPS];
+ /* Used as a sanity check. If we need a limm reloc, make sure we ask
+ for an extra 4 bytes from frag_more. */
+ int limm_reloc_p;
+ const struct arc_operand_value *insn_suffixes[MAX_SUFFIXES];
+
+ /* Is this opcode supported by the selected cpu? */
+ if (! arc_opcode_supported (opcode))
+ continue;
+
+ /* Scan the syntax string. If it doesn't match, try the next one. */
+
+ arc_opcode_init_insert ();
+ insn = opcode->value;
+ fc = 0;
+ past_opcode_p = 0;
+ num_suffixes = 0;
+ limm_reloc_p = 0;
+
+ /* We don't check for (*str != '\0') here because we want to parse
+ any trailing fake arguments in the syntax string. */
+ for (str = start, syn = opcode->syntax; *syn != '\0'; )
+ {
+ int mods;
+ const struct arc_operand *operand;
+
+ /* Non operand chars must match exactly. */
+ if (*syn != '%' || *++syn == '%')
+ {
+ /* Handle '+' specially as we want to allow "ld r0,[sp-4]". */
+ /* ??? The syntax has changed to [sp,-4]. */
+ if (0 && *syn == '+' && *str == '-')
+ {
+ /* Skip over syn's +, but leave str's - alone.
+ That makes the case identical to "ld r0,[sp+-4]". */
+ ++syn;
+ }
+ else if (*str == *syn)
+ {
+ if (*syn == ' ')
+ past_opcode_p = 1;
+ ++syn;
+ ++str;
+ }
+ else
+ break;
+ continue;
+ }
+
+ /* We have an operand. Pick out any modifiers. */
+ mods = 0;
+ while (ARC_MOD_P (arc_operands[arc_operand_map[*syn]].flags))
+ {
+ mods |= arc_operands[arc_operand_map[*syn]].flags & ARC_MOD_BITS;
+ ++syn;
+ }
+ operand = arc_operands + arc_operand_map[*syn];
+ if (operand->fmt == 0)
+ as_fatal ("unknown syntax format character `%c'", *syn);
+
+ if (operand->flags & ARC_OPERAND_FAKE)
+ {
+ const char *errmsg = NULL;
+ if (operand->insert)
+ {
+ insn = (*operand->insert) (insn, operand, mods, NULL, 0, &errmsg);
+ /* If we get an error, go on to try the next insn. */
+ if (errmsg)
+ break;
+ }
+ ++syn;
+ }
+ /* Are we finished with suffixes? */
+ else if (!past_opcode_p)
+ {
+ int found;
+ char c;
+ char *s,*t;
+ const struct arc_operand_value *suf,*suffix,*suffix_end;
+
+ if (!(operand->flags & ARC_OPERAND_SUFFIX))
+ abort ();
+
+ /* If we're at a space in the input string, we want to skip the
+ remaining suffixes. There may be some fake ones though, so
+ just go on to try the next one. */
+ if (*str == ' ')
+ {
+ ++syn;
+ continue;
+ }
+
+ s = str;
+ if (mods & ARC_MOD_DOT)
+ {
+ if (*s != '.')
+ break;
+ ++s;
+ }
+ else
+ {
+ /* This can happen in "b.nd foo" and we're currently looking
+ for "%q" (ie: a condition code suffix). */
+ if (*s == '.')
+ {
+ ++syn;
+ continue;
+ }
+ }
+
+ /* Pick the suffix out and look it up via the hash table. */
+ for (t = s; *t && isalpha (*t); ++t)
+ continue;
+ c = *t;
+ *t = '\0';
+ suf = hash_find (arc_suffix_hash, s);
+ *t = c;
+ if (!suf)
+ {
+ /* This can happen in "blle foo" and we're currently using
+ the template "b%q%.n %j". The "bl" insn occurs later in
+ the table so "lle" isn't an illegal suffix. */
+ break;
+ }
+
+ /* Is it the right type? Note that the same character is used
+ several times, so we have to examine all of them. This is
+ relatively efficient as equivalent entries are kept
+ together. If it's not the right type, don't increment `str'
+ so we try the next one in the series. */
+ found = 0;
+ suffix_end = arc_suffixes + arc_suffixes_count;
+ for (suffix = suf;
+ suffix < suffix_end && strcmp (suffix->name, suf->name) == 0;
+ ++suffix)
+ {
+ if (arc_operands[suffix->type].fmt == *syn)
+ {
+ /* Insert the suffix's value into the insn. */
+ if (operand->insert)
+ insn = (*operand->insert) (insn, operand,
+ mods, NULL, suffix->value,
+ NULL);
+ else
+ insn |= suffix->value << operand->shift;
+
+ str = t;
+ found = 1;
+ break;
+ }
+ }
+ ++syn;
+ if (!found)
+ ; /* Wrong type. Just go on to try next insn entry. */
+ else
+ {
+ if (num_suffixes == MAX_SUFFIXES)
+ as_bad ("too many suffixes");
+ else
+ insn_suffixes[num_suffixes++] = suffix;
+ }
+ }
+ else
+ /* This is either a register or an expression of some kind. */
+ {
+ char c;
+ char *hold;
+ const struct arc_operand_value *reg = NULL;
+ long value = 0;
+ expressionS exp;
+
+ if (operand->flags & ARC_OPERAND_SUFFIX)
+ abort ();
+
+ /* Is there anything left to parse?
+ We don't check for this at the top because we want to parse
+ any trailing fake arguments in the syntax string. */
+ if (*str == '\0')
+ break;
+#if 0
+ /* Is this a syntax character? Eg: is there a '[' present when
+ there shouldn't be? */
+ if (!isalnum (*str)
+ /* '.' as in ".LLC0" */
+ && *str != '.'
+ /* '_' as in "_print" */
+ && *str != '_'
+ /* '-' as in "[fp,-4]" */
+ && *str != '-'
+ /* '%' as in "%ia(_func)" */
+ && *str != '%')
+ break;
+#endif
+
+ /* Parse the operand. */
+ hold = input_line_pointer;
+ input_line_pointer = str;
+ expression (&exp);
+ str = input_line_pointer;
+ input_line_pointer = hold;
+
+ if (exp.X_op == O_illegal)
+ as_bad ("illegal operand");
+ else if (exp.X_op == O_absent)
+ as_bad ("missing operand");
+ else if (exp.X_op == O_constant)
+ {
+ value = exp.X_add_number;
+ }
+ else if (exp.X_op == O_register)
+ {
+ reg = arc_reg_names + exp.X_add_number;
+ }
+ else
+ {
+ /* We need to generate a fixup for this expression. */
+ if (fc >= MAX_FIXUPS)
+ as_fatal ("too many fixups");
+ fixups[fc].exp = exp;
+
+ /* If this is a register constant (IE: one whose
+ register value gets stored as 61-63) then this
+ must be a limm. We don't support shimm relocs. */
+ /* ??? This bit could use some cleaning up.
+ Referencing the format chars like this goes
+ against style. */
+#define IS_REG_OPERAND(o) ((o) == 'a' || (o) == 'b' || (o) == 'c')
+ if (IS_REG_OPERAND (*syn))
+ {
+ const char *junk;
+
+ fixups[fc].opindex = arc_operand_map['L'];
+ limm_reloc_p = 1;
+ /* Tell insert_reg we need a limm. This is
+ needed because the value at this point is
+ zero, a shimm. */
+ /* ??? We need a cleaner interface than this. */
+ (*arc_operands[arc_operand_map['Q']].insert)
+ (insn, operand, mods, reg, 0L, &junk);
+ }
+ else
+ fixups[fc].opindex = arc_operand_map[*syn];
+ ++fc;
+ value = 0;
+ }
+
+ /* Insert the register or expression into the instruction. */
+ if (operand->insert)
+ {
+ const char *errmsg = NULL;
+ insn = (*operand->insert) (insn, operand, mods,
+ reg, (long) value, &errmsg);
+#if 0
+ if (errmsg != (const char *) NULL)
+ as_warn (errmsg);
+#endif
+ /* FIXME: We want to try shimm insns for limm ones. But if
+ the constant won't fit, we must go on to try the next
+ possibility. Where do we issue warnings for constants
+ that are too big then? At present, we'll flag the insn
+ as unrecognizable! Maybe have the "bad instruction"
+ error message include our `errmsg'? */
+ if (errmsg != (const char *) NULL)
+ break;
+ }
+ else
+ insn |= (value & ((1 << operand->bits) - 1)) << operand->shift;
+
+ ++syn;
+ }
+ }
+
+ /* If we're at the end of the syntax string, we're done. */
+ /* FIXME: try to move this to a separate function. */
+ if (*syn == '\0')
+ {
+ int i;
+ char *f;
+ long limm, limm_p;
+
+ /* For the moment we assume a valid `str' can only contain blanks
+ now. IE: We needn't try again with a longer version of the
+ insn and it is assumed that longer versions of insns appear
+ before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
+
+ while (isspace (*str))
+ ++str;
+
+ if (*str != '\0')
+ as_bad ("junk at end of line: `%s'", str);
+
+ /* Is there a limm value? */
+ limm_p = arc_opcode_limm_p (&limm);
+
+ /* Perform various error and warning tests. */
+
+ {
+ static int in_delay_slot_p = 0;
+ static int prev_insn_needs_cc_nop_p = 0;
+ /* delay slot type seen */
+ int delay_slot_type = ARC_DELAY_NONE;
+ /* conditional execution flag seen */
+ int conditional = 0;
+ /* 1 if condition codes are being set */
+ int cc_set_p = 0;
+ /* 1 if conditional branch, including `b' "branch always" */
+ int cond_branch_p = opcode->flags & ARC_OPCODE_COND_BRANCH;
+ int need_cc_nop_p = 0;
+
+ for (i = 0; i < num_suffixes; ++i)
+ {
+ switch (arc_operands[insn_suffixes[i]->type].fmt)
+ {
+ case 'n' :
+ delay_slot_type = insn_suffixes[i]->value;
+ break;
+ case 'q' :
+ conditional = insn_suffixes[i]->value;
+ break;
+ case 'f' :
+ cc_set_p = 1;
+ break;
+ }
+ }
+
+ /* Putting an insn with a limm value in a delay slot is supposed to
+ be legal, but let's warn the user anyway. Ditto for 8 byte
+ jumps with delay slots. */
+ if (in_delay_slot_p && limm_p)
+ as_warn ("8 byte instruction in delay slot");
+ if (delay_slot_type != ARC_DELAY_NONE && limm_p)
+ as_warn ("8 byte jump instruction with delay slot");
+ in_delay_slot_p = (delay_slot_type != ARC_DELAY_NONE) && !limm_p;
+
+ /* Warn when a conditional branch immediately follows a set of
+ the condition codes. Note that this needn't be done if the
+ insn that sets the condition codes uses a limm. */
+ if (cond_branch_p && conditional != 0 /* 0 = "always" */
+ && prev_insn_needs_cc_nop_p)
+ as_warn ("conditional branch follows set of flags");
+ prev_insn_needs_cc_nop_p = cc_set_p && !limm_p;
+ }
+
+ /* Write out the instruction.
+ It is important to fetch enough space in one call to `frag_more'.
+ We use (f - frag_now->fr_literal) to compute where we are and we
+ don't want frag_now to change between calls. */
+ if (limm_p)
+ {
+ f = frag_more (8);
+ md_number_to_chars (f, insn, 4);
+ md_number_to_chars (f + 4, limm, 4);
+ }
+ else if (limm_reloc_p)
+ {
+ /* We need a limm reloc, but the tables think we don't. */
+ abort ();
+ }
+ else
+ {
+ f = frag_more (4);
+ md_number_to_chars (f, insn, 4);
+ }
+
+ /* Create any fixups. */
+ for (i = 0; i < fc; ++i)
+ {
+ int op_type, reloc_type;
+ expressionS exptmp;
+ const struct arc_operand *operand;
+
+ /* Create a fixup for this operand.
+ At this point we do not use a bfd_reloc_code_real_type for
+ operands residing in the insn, but instead just use 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.
+
+ Limm values (4 byte immediate "constants") must be treated
+ normally because they're not part of the actual insn word
+ and thus the insertion routines don't handle them. */
+
+ if (arc_operands[fixups[i].opindex].flags & ARC_OPERAND_LIMM)
+ {
+ op_type = fixups[i].opindex;
+ /* FIXME: can we add this data to the operand table? */
+ if (op_type == arc_operand_map['L'])
+ reloc_type = BFD_RELOC_32;
+ else if (op_type == arc_operand_map['J'])
+ reloc_type = BFD_RELOC_ARC_B26;
+ else
+ abort ();
+ reloc_type = get_arc_exp_reloc_type (1, reloc_type,
+ &fixups[i].exp,
+ &exptmp);
+ }
+ else
+ {
+ op_type = get_arc_exp_reloc_type (0, fixups[i].opindex,
+ &fixups[i].exp, &exptmp);
+ reloc_type = op_type + (int) BFD_RELOC_UNUSED;
+ }
+ operand = &arc_operands[op_type];
+ fix_new_exp (frag_now,
+ ((f - frag_now->fr_literal)
+ + (operand->flags & ARC_OPERAND_LIMM ? 4 : 0)), 4,
+ &exptmp,
+ (operand->flags & ARC_OPERAND_RELATIVE_BRANCH) != 0,
+ (bfd_reloc_code_real_type) reloc_type);
+ }
+
+ /* All done. */
+ return;
+ }
+
+ /* Try the next entry. */
+ }
+
+ as_bad ("bad instruction `%s'", start);
+}
+
+/* ??? This was copied from tc-sparc.c, I think. Is it necessary? */
+
+static void
+arc_common (ignore)
+ int ignore;
+{
+ char *name;
+ char c;
+ char *p;
+ int temp, size;
+ symbolS *symbolP;
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ /* 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 ',' */
+ if ((temp = get_absolute_expression ()) < 0)
+ {
+ 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)
+ {
+ as_warn ("Length of .comm \"%s\" is already %ld. Not changed to %d.",
+ S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
+ }
+ }
+ assert (symbolP->sy_frag == &zero_address_frag);
+ if (*input_line_pointer != ',')
+ {
+ as_bad ("expected comma after common length");
+ ignore_rest_of_line ();
+ return;
+ }
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != '"')
+ {
+ temp = get_absolute_expression ();
+ if (temp < 0)
+ {
+ temp = 0;
+ as_warn ("Common alignment negative; 0 assumed");
+ }
+ if (symbolP->local)
+ {
+ segT old_sec;
+ int old_subsec;
+ char *p;
+ int align;
+
+ allocate_bss:
+ old_sec = now_seg;
+ old_subsec = now_subseg;
+ align = temp;
+ record_alignment (bss_section, align);
+ subseg_set (bss_section, 0);
+ if (align)
+ frag_align (align, 0, 0);
+ if (S_GET_SEGMENT (symbolP) == bss_section)
+ symbolP->sy_frag->fr_symbol = 0;
+ symbolP->sy_frag = frag_now;
+ p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
+ (offsetT) size, (char *) 0);
+ *p = 0;
+ S_SET_SEGMENT (symbolP, bss_section);
+ S_CLEAR_EXTERNAL (symbolP);
+ subseg_set (old_sec, old_subsec);
+ }
+ else
+ {
+ allocate_common:
+ S_SET_VALUE (symbolP, (valueT) size);
+ S_SET_ALIGN (symbolP, temp);
+ S_SET_EXTERNAL (symbolP);
+ S_SET_SEGMENT (symbolP, bfd_com_section_ptr);
+ }
+ }
+ else
+ {
+ input_line_pointer++;
+ /* ??? Some say data, some say bss. */
+ if (strncmp (input_line_pointer, ".bss\"", 5)
+ && strncmp (input_line_pointer, ".data\"", 6))
+ {
+ input_line_pointer--;
+ goto bad_common_segment;
+ }
+ while (*input_line_pointer++ != '"')
+ ;
+ goto allocate_common;
+ }
+ demand_empty_rest_of_line ();
+ return;
+
+ {
+ bad_common_segment:
+ p = input_line_pointer;
+ while (*p && *p != '\n')
+ p++;
+ c = *p;
+ *p = '\0';
+ as_bad ("bad .common segment %s", input_line_pointer + 1);
+ *p = c;
+ input_line_pointer = p;
+ ignore_rest_of_line ();
+ return;
+ }
+}
+
+/* Select the cpu we're assembling for. */
+
+static void
+arc_cpu (ignore)
+ int ignore;
+{
+ int mach;
+ char c;
+ char *cpu;
+
+ /* If an instruction has already been seen, it's too late. */
+ if (cpu_tables_init_p)
+ {
+ as_bad (".cpu command must appear before any instructions");
+ ignore_rest_of_line ();
+ return;
+ }
+
+ cpu = input_line_pointer;
+ c = get_symbol_end ();
+ mach = arc_get_mach (cpu);
+ *input_line_pointer = c;
+ if (mach == -1)
+ goto bad_cpu;
+
+ demand_empty_rest_of_line ();
+
+ /* The cpu may have been selected on the command line.
+ The choices must match. */
+ /* ??? This was a command line option early on. It's gone now, but
+ leave this in. */
+ if (mach_type_specified_p && mach != arc_mach_type)
+ as_bad (".cpu conflicts with previous value");
+ else
+ {
+ arc_mach_type = mach;
+ mach_type_specified_p = 1;
+ if (!bfd_set_arch_mach (stdoutput, bfd_arch_arc, mach))
+ as_warn ("could not set architecture and machine");
+ }
+ return;
+
+ bad_cpu:
+ as_bad ("bad .cpu op");
+ ignore_rest_of_line ();
+}
+
+#if 0
+/* The .rename pseudo-op. This is used by gcc to implement
+ -mmangle-cpu-libgcc. */
+
+static void
+arc_rename (ignore)
+ int ignore;
+{
+ char *name,*new;
+ char c;
+ symbolS *sym;
+ int len;
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ sym = symbol_find_or_make (name);
+ *input_line_pointer = c;
+
+ if (*input_line_pointer != ',')
+ {
+ as_bad ("missing rename string");
+ ignore_rest_of_line ();
+ return;
+ }
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ if (*name == '\0')
+ {
+ *input_line_pointer = c;
+ as_bad ("invalid symbol to rename to");
+ ignore_rest_of_line ();
+ return;
+ }
+ new = (char *) xmalloc (strlen (name) + 1);
+ strcpy (new, name);
+ *input_line_pointer = c;
+ sym->sy_tc.real_name = new;
+
+ demand_empty_rest_of_line ();
+}
+#endif
+
+/* 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 */
+#define MAX_LITTLENUMS 6
+
+char *
+md_atof (type, litP, sizeP)
+ char type;
+ char *litP;
+ int *sizeP;
+{
+ int prec;
+ LITTLENUM_TYPE words[MAX_LITTLENUMS];
+ LITTLENUM_TYPE *wordP;
+ char *t;
+ char *atof_ieee ();
+
+ switch (type)
+ {
+ case 'f':
+ case 'F':
+ prec = 2;
+ break;
+
+ case 'd':
+ case 'D':
+ prec = 4;
+ break;
+
+ default:
+ *sizeP = 0;
+ return "bad call to md_atof";
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+ *sizeP = prec * sizeof (LITTLENUM_TYPE);
+ for (wordP = words; prec--;)
+ {
+ md_number_to_chars (litP, (valueT) (*wordP++), sizeof (LITTLENUM_TYPE));
+ litP += sizeof (LITTLENUM_TYPE);
+ }
+
+ return NULL;
+}
+
+/* Write a value out to the object file, using the appropriate
+ endianness. */
+
+void
+md_number_to_chars (buf, val, n)
+ char *buf;
+ valueT val;
+ int n;
+{
+ if (target_big_endian)
+ number_to_chars_bigendian (buf, val, n);
+ else
+ number_to_chars_littleendian (buf, val, n);
+}
+
+/* Round up a section size to the appropriate boundary. */
+
+valueT
+md_section_align (segment, size)
+ segT segment;
+ valueT size;
+{
+ int align = bfd_get_section_alignment (stdoutput, segment);
+
+ return ((size + (1 << align) - 1) & (-1 << align));
+}
+
+/* We don't have any form of relaxing. */
+
+int
+md_estimate_size_before_relax (fragp, seg)
+ fragS *fragp;
+ asection *seg;
+{
+ abort ();
+}
+
+/* Convert a machine dependent frag. We never generate these. */
+
+void
+md_convert_frag (abfd, sec, fragp)
+ bfd *abfd;
+ asection *sec;
+ fragS *fragp;
+{
+ abort ();
+}
+
+/* Parse an operand that is machine-specific.
+
+ The ARC has a special %-op to adjust addresses so they're usable in
+ branches. The "st" is short for the STatus register.
+ ??? Later expand this to take a flags value too.
+
+ ??? We can't create new expression types so we map the %-op's onto the
+ existing syntax. This means that the user could use the chosen syntax
+ to achieve the same effect. Perhaps put a special cookie in X_add_number
+ to mark the expression as special. */
+
+void
+md_operand (expressionP)
+ expressionS *expressionP;
+{
+ char *p = input_line_pointer;
+
+ if (*p == '%' && strncmp (p, "%st(", 4) == 0)
+ {
+ input_line_pointer += 4;
+ expression (expressionP);
+ if (*input_line_pointer != ')')
+ {
+ as_bad ("missing ')' in %-op");
+ return;
+ }
+ ++input_line_pointer;
+ if (expressionP->X_op == O_symbol
+ && expressionP->X_add_number == 0
+ /* I think this test is unnecessary but just as a sanity check... */
+ && expressionP->X_op_symbol == NULL)
+ {
+ expressionS two;
+
+ expressionP->X_op = O_right_shift;
+ two.X_op = O_constant;
+ two.X_add_symbol = two.X_op_symbol = NULL;
+ two.X_add_number = 2;
+ expressionP->X_op_symbol = make_expr_symbol (&two);
+ }
+ /* allow %st(sym1-sym2) */
+ else if (expressionP->X_op == O_subtract
+ && expressionP->X_add_symbol != NULL
+ && expressionP->X_op_symbol != NULL
+ && expressionP->X_add_number == 0)
+ {
+ expressionS two;
+
+ expressionP->X_add_symbol = make_expr_symbol (expressionP);
+ expressionP->X_op = O_right_shift;
+ two.X_op = O_constant;
+ two.X_add_symbol = two.X_op_symbol = NULL;
+ two.X_add_number = 2;
+ expressionP->X_op_symbol = make_expr_symbol (&two);
+ }
+ else
+ {
+ as_bad ("expression too complex for %%st");
+ return;
+ }
+ }
+}
+
+/* We have no need to default values of symbols.
+ We could catch register names here, but that is handled by inserting
+ them all in the symbol table to begin with. */
+
+symbolS *
+md_undefined_symbol (name)
+ char *name;
+{
+ return 0;
+}
+
+/* Functions concerning expressions. */
+
+/* Parse a .byte, .word, etc. expression.
+
+ Values for the status register are specified with %st(label).
+ `label' will be right shifted by 2. */
+
+void
+arc_parse_cons_expression (exp, nbytes)
+ expressionS *exp;
+ int nbytes;
+{
+ expr (0, exp);
+}
+
+/* Record a fixup for a cons expression. */
+
+void
+arc_cons_fix_new (frag, where, nbytes, exp)
+ fragS *frag;
+ int where;
+ int nbytes;
+ expressionS *exp;
+{
+ if (nbytes == 4)
+ {
+ int reloc_type;
+ expressionS exptmp;
+
+ /* This may be a special ARC reloc (eg: %st()). */
+ reloc_type = get_arc_exp_reloc_type (1, BFD_RELOC_32, exp, &exptmp);
+ fix_new_exp (frag, where, nbytes, &exptmp, 0, reloc_type);
+ }
+ else
+ {
+ fix_new_exp (frag, where, nbytes, exp, 0,
+ nbytes == 2 ? BFD_RELOC_16
+ : nbytes == 8 ? BFD_RELOC_64
+ : BFD_RELOC_32);
+ }
+}
+
+/* Functions concerning relocs. */
+
+/* The location from which a PC relative jump should be calculated,
+ given a PC relative reloc. */
+
+long
+md_pcrel_from (fixP)
+ fixS *fixP;
+{
+ if (fixP->fx_addsy != (symbolS *) NULL
+ && ! S_IS_DEFINED (fixP->fx_addsy))
+ {
+ /* The symbol is undefined. Let the linker figure it out. */
+ return 0;
+ }
+
+ /* Return the address of the delay slot. */
+ return fixP->fx_frag->fr_address + fixP->fx_where + fixP->fx_size;
+}
+
+/* Compute the reloc type of an expression.
+ The possibly modified expression is stored in EXPNEW.
+
+ This is used to convert the expressions generated by the %-op's into
+ the appropriate operand type. It is called for both data in instructions
+ (operands) and data outside instructions (variables, debugging info, etc.).
+
+ Currently supported %-ops:
+
+ %st(symbol): represented as "symbol >> 2"
+ "st" is short for STatus as in the status register (pc)
+
+ DEFAULT_TYPE is the type to use if no special processing is required.
+
+ DATA_P is non-zero for data or limm values, zero for insn operands.
+ Remember that the opcode "insertion fns" cannot be used on data, they're
+ only for inserting operands into insns. They also can't be used for limm
+ values as the insertion routines don't handle limm values. When called for
+ insns we return fudged reloc types (real_value - BFD_RELOC_UNUSED). When
+ called for data or limm values we use real reloc types. */
+
+static int
+get_arc_exp_reloc_type (data_p, default_type, exp, expnew)
+ int data_p;
+ int default_type;
+ expressionS *exp;
+ expressionS *expnew;
+{
+ /* If the expression is "symbol >> 2" we must change it to just "symbol",
+ as fix_new_exp can't handle it. Similarily for (symbol - symbol) >> 2.
+ That's ok though. What's really going on here is that we're using
+ ">> 2" as a special syntax for specifying BFD_RELOC_ARC_B26. */
+
+ if (exp->X_op == O_right_shift
+ && exp->X_op_symbol != NULL
+ && exp->X_op_symbol->sy_value.X_op == O_constant
+ && exp->X_op_symbol->sy_value.X_add_number == 2
+ && exp->X_add_number == 0)
+ {
+ if (exp->X_add_symbol != NULL
+ && (exp->X_add_symbol->sy_value.X_op == O_constant
+ || exp->X_add_symbol->sy_value.X_op == O_symbol))
+ {
+ *expnew = *exp;
+ expnew->X_op = O_symbol;
+ expnew->X_op_symbol = NULL;
+ return data_p ? BFD_RELOC_ARC_B26 : arc_operand_map['J'];
+ }
+ else if (exp->X_add_symbol != NULL
+ && exp->X_add_symbol->sy_value.X_op == O_subtract)
+ {
+ *expnew = exp->X_add_symbol->sy_value;
+ return data_p ? BFD_RELOC_ARC_B26 : arc_operand_map['J'];
+ }
+ }
+
+ *expnew = *exp;
+ return default_type;
+}
+
+/* Apply a fixup to the object code. This is called for all the
+ fixups we generated by the call to fix_new_exp, above. In the call
+ above we used a reloc code which was the largest legal reloc code
+ plus the operand index. Here we undo that to recover the operand
+ index. At this point all symbol values should be fully resolved,
+ and we attempt to completely resolve the reloc. If we can not do
+ that, we determine the correct reloc code and put it back in the fixup. */
+
+int
+md_apply_fix3 (fixP, valueP, seg)
+ fixS *fixP;
+ valueT *valueP;
+ segT seg;
+{
+ /*char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;*/
+ valueT value;
+
+ /* FIXME FIXME FIXME: The value we are passed in *valueP includes
+ the symbol values. Since we are using BFD_ASSEMBLER, if we are
+ doing this relocation the code in write.c is going to call
+ bfd_perform_relocation, which is also going to use the symbol
+ value. That means that if the reloc is fully resolved we want to
+ use *valueP since bfd_perform_relocation is not being used.
+ However, if the reloc is not fully resolved we do not want to use
+ *valueP, and must use fx_offset instead. However, if the reloc
+ is PC relative, we do want to use *valueP since it includes the
+ result of md_pcrel_from. This is confusing. */
+
+ if (fixP->fx_addsy == (symbolS *) NULL)
+ {
+ value = *valueP;
+ fixP->fx_done = 1;
+ }
+ else if (fixP->fx_pcrel)
+ {
+ value = *valueP;
+ /* ELF relocations are against symbols.
+ If this symbol is in a different section then we need to leave it for
+ the linker to deal with. Unfortunately, md_pcrel_from can't tell,
+ so we have to undo it's effects here. */
+ if (S_IS_DEFINED (fixP->fx_addsy)
+ && S_GET_SEGMENT (fixP->fx_addsy) != seg)
+ value += md_pcrel_from (fixP);
+ }
+ else
+ {
+ value = fixP->fx_offset;
+ if (fixP->fx_subsy != (symbolS *) NULL)
+ {
+ if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section)
+ value -= S_GET_VALUE (fixP->fx_subsy);
+ else
+ {
+ /* We can't actually support subtracting a symbol. */
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ "expression too complex");
+ }
+ }
+ }
+
+ if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ {
+ int opindex;
+ const struct arc_operand *operand;
+ char *where;
+ arc_insn insn;
+
+ opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+
+ operand = &arc_operands[opindex];
+
+ /* Fetch the instruction, insert the fully resolved operand
+ value, and stuff the instruction back again. */
+ where = fixP->fx_frag->fr_literal + fixP->fx_where;
+ if (target_big_endian)
+ insn = bfd_getb32 ((unsigned char *) where);
+ else
+ insn = bfd_getl32 ((unsigned char *) where);
+ insn = arc_insert_operand (insn, operand, -1, NULL, (offsetT) value,
+ fixP->fx_file, fixP->fx_line);
+ if (target_big_endian)
+ bfd_putb32 ((bfd_vma) insn, (unsigned char *) where);
+ else
+ bfd_putl32 ((bfd_vma) insn, (unsigned char *) where);
+
+ if (fixP->fx_done)
+ {
+ /* 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.
+ !!! Note that we can't handle limm values here. Since we're using
+ implicit addends the addend must be inserted into the instruction,
+ however, the opcode insertion routines currently do nothing with
+ limm values. */
+ if (operand->fmt == 'B')
+ {
+ assert ((operand->flags & ARC_OPERAND_RELATIVE_BRANCH) != 0
+ && operand->bits == 20
+ && operand->shift == 7);
+ fixP->fx_r_type = BFD_RELOC_ARC_B22_PCREL;
+ }
+ else if (0 && operand->fmt == 'J')
+ {
+ assert ((operand->flags & ARC_OPERAND_ABSOLUTE_BRANCH) != 0
+ && operand->bits == 24
+ && operand->shift == 32);
+ fixP->fx_r_type = BFD_RELOC_ARC_B26;
+ }
+ else if (0 && operand->fmt == 'L')
+ {
+ assert ((operand->flags & ARC_OPERAND_LIMM) != 0
+ && operand->bits == 32
+ && operand->shift == 32);
+ fixP->fx_r_type = BFD_RELOC_32;
+ }
+ else
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ "unresolved expression that must be resolved");
+ fixP->fx_done = 1;
+ return 1;
+ }
+ }
+ else
+ {
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_8:
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ value, 1);
+ break;
+ case BFD_RELOC_16:
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ value, 2);
+ break;
+ case BFD_RELOC_32:
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ value, 4);
+ break;
+#if 0
+ case BFD_RELOC_64:
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ value, 8);
+ break;
+#endif
+ case BFD_RELOC_ARC_B26:
+ /* If !fixP->fx_done then `value' is an implicit addend.
+ We must shift it right by 2 in this case as well because the
+ linker performs the relocation and then adds this in (as opposed
+ to adding this in and then shifting right by 2). */
+ value >>= 2;
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ value, 4);
+ break;
+ default:
+ abort ();
+ }
+ }
+
+ fixP->fx_addnumber = value;
+
+ return 1;
+}
+
+/* Translate internal representation of relocation info to BFD target
+ format. */
+
+arelent *
+tc_gen_reloc (section, fixP)
+ asection *section;
+ fixS *fixP;
+{
+ arelent *reloc;
+
+ reloc = (arelent *) xmalloc (sizeof (arelent));
+
+ reloc->sym_ptr_ptr = &fixP->fx_addsy->bsym;
+ 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,
+ "internal error: can't export reloc type %d (`%s')",
+ fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type));
+ return NULL;
+ }
+
+ assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+
+ reloc->addend = fixP->fx_addnumber;
+
+ return reloc;
+}
+
+/* Frobbers. */
+
+#if 0
+/* Set the real name if the .rename pseudo-op was used.
+ Return 1 if the symbol should not be included in the symbol table. */
+
+int
+arc_frob_symbol (sym)
+ symbolS *sym;
+{
+ if (sym->sy_tc.real_name != (char *) NULL)
+ S_SET_NAME (sym, sym->sy_tc.real_name);
+
+ return 0;
+}
+#endif
diff --git a/contrib/binutils/gas/config/tc-arc.h b/contrib/binutils/gas/config/tc-arc.h
new file mode 100644
index 0000000..6a95ff4
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-arc.h
@@ -0,0 +1,71 @@
+/* tc-arc.h - Macros and type defines for the ARC.
+ Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Contributed by Doug Evans (dje@cygnus.com).
+
+ 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. */
+
+#define TC_ARC 1
+
+#define TARGET_BYTES_BIG_ENDIAN 0
+
+#define LOCAL_LABELS_FB 1
+
+#define TARGET_ARCH bfd_arch_arc
+
+#define LITTLE_ENDIAN 1234
+#define BIG_ENDIAN 4321
+
+/* The endianness of the target format may change based on command
+ line arguments. */
+extern const char *arc_target_format;
+#define DEFAULT_TARGET_FORMAT "elf32-littlearc"
+#define TARGET_FORMAT arc_target_format
+#define DEFAULT_BYTE_ORDER LITTLE_ENDIAN
+
+#define WORKING_DOT_WORD
+
+#define LISTING_HEADER "ARC GAS "
+
+#define TC_HANDLES_FX_DONE
+
+#define MD_APPLY_FIX3
+
+/* The ARC needs to parse reloc specifiers in .word. */
+
+extern void arc_parse_cons_expression ();
+#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) \
+arc_parse_cons_expression (EXP, NBYTES)
+
+extern void arc_cons_fix_new ();
+#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
+arc_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
+
+#if 0
+/* Extra stuff that we need to keep track of for each symbol. */
+struct arc_tc_sy
+{
+ /* The real name, if the symbol was renamed. */
+ char *real_name;
+};
+
+#define TC_SYMFIELD_TYPE struct arc_tc_sy
+
+/* Finish up the symbol. */
+extern int arc_frob_symbol PARAMS ((struct symbol *));
+#define tc_frob_symbol(sym, punt) punt = arc_frob_symbol (sym)
+#endif
diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c
index 3981a2d..cc173ec 100644
--- a/contrib/binutils/gas/config/tc-i386.c
+++ b/contrib/binutils/gas/config/tc-i386.c
@@ -1,5 +1,6 @@
/* i386.c -- Assemble code for the Intel 80386
- Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation.
+ Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -105,7 +106,7 @@ struct _i386_insn
unsigned char prefix[MAX_PREFIXES];
unsigned int prefixes;
- /* RM and IB are the modrm byte and the base index byte where the
+ /* RM and BI are the modrm byte and the base index byte where the
addressing modes of this insn are encoded. */
modrm_byte rm;
@@ -302,18 +303,18 @@ i386_align_code (fragP, count)
{0xeb,0x0d,0x90,0x90,0x90,0x90,0x90, /* jmp .+15; lotsa nops */
0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90};
static const char f16_4[] =
- {0x8d,0xb6,0x00,0x00}; /* lea 0w(%si),%si */
+ {0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */
static const char f16_5[] =
{0x90, /* nop */
- 0x8d,0xb6,0x00,0x00}; /* lea 0w(%si),%si */
+ 0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */
static const char f16_6[] =
{0x89,0xf6, /* mov %si,%si */
0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
static const char f16_7[] =
- {0x8d,0x76,0x00, /* lea 0(%si),%si */
+ {0x8d,0x74,0x00, /* lea 0(%si),%si */
0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
static const char f16_8[] =
- {0x8d,0xb6,0x00,0x00, /* lea 0w(%si),%si */
+ {0x8d,0xb4,0x00,0x00, /* lea 0w(%si),%si */
0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
static const char *const f32_patt[] = {
f32_1, f32_2, f32_3, f32_4, f32_5, f32_6, f32_7, f32_8,
@@ -433,7 +434,7 @@ const pseudo_typeS md_pseudo_table[] =
#ifndef I386COFF
{"bss", s_bss, 0},
#endif
-#ifndef OBJ_AOUT
+#if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO)
{"align", s_align_bytes, 0},
#else
{"align", s_align_ptwo, 0},
@@ -802,7 +803,7 @@ int
tc_i386_fix_adjustable(fixP)
fixS * fixP;
{
-#ifndef OBJ_AOUT
+#ifdef OBJ_ELF
/* Prevent all adjustments to global symbols. */
if (S_IS_EXTERN (fixP->fx_addsy))
return 0;
@@ -833,8 +834,8 @@ void
md_assemble (line)
char *line;
{
- /* Holds template once we've found it. */
- template *t;
+ /* Points to template once we've found it. */
+ const template *t;
/* Count the size of the instruction generated. */
int insn_size = 0;
@@ -844,6 +845,11 @@ md_assemble (line)
int j;
+ /* Wait prefix needs to come before any other prefixes, so handle it
+ specially. wait_prefix will hold the opcode modifier flag FWait
+ if a wait prefix is given. */
+ int wait_prefix = 0;
+
/* Initialize globals. */
memset (&i, '\0', sizeof (i));
for (j = 0; j < MAX_OPERANDS; j++)
@@ -852,7 +858,7 @@ md_assemble (line)
memset (im_expressions, '\0', sizeof (im_expressions));
save_stack_p = save_stack; /* reset stack pointer */
- /* Fist parse an opcode & call i386_operand for the operands.
+ /* First parse an opcode & 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) opcode. */
{
@@ -904,14 +910,27 @@ md_assemble (line)
as_bad ("same prefix used twice; you don't really want this!");
return;
}
- if (i.prefixes == MAX_PREFIXES)
+ if (prefix->prefix_code == FWAIT_OPCODE)
{
- as_bad ("too many opcode prefixes");
- return;
+ if (wait_prefix != 0)
+ {
+ as_bad ("same prefix used twice; you don't really want this!");
+ return;
+ }
+ wait_prefix = FWait;
+ }
+ else
+ {
+ if (i.prefixes == MAX_PREFIXES)
+ {
+ as_bad ("too many opcode prefixes");
+ return;
+ }
+ i.prefix[i.prefixes++] = prefix->prefix_code;
+ if (prefix->prefix_code == REPE
+ || prefix->prefix_code == REPNE)
+ expecting_string_instruction = 1;
}
- i.prefix[i.prefixes++] = prefix->prefix_code;
- if (prefix->prefix_code == REPE || prefix->prefix_code == REPNE)
- expecting_string_instruction = 1;
/* skip past PREFIX_SEPERATOR and reset token_start */
token_start = ++l;
}
@@ -1131,8 +1150,8 @@ md_assemble (line)
if (!MATCH (overlap0, i.types[0]) ||
!MATCH (overlap1, i.types[1]) ||
!CONSISTENT_REGISTER_MATCH (overlap0, overlap1,
- t->operand_types[0],
- t->operand_types[1]))
+ t->operand_types[1],
+ t->operand_types[0]))
{
/* does not match either direction */
continue;
@@ -1165,20 +1184,26 @@ md_assemble (line)
return;
}
- /* Copy the template we found (we may change it!). */
+ /* Copy the template we found. */
i.tm = *t;
- t = &i.tm; /* alter new copy of template */
+ i.tm.opcode_modifier |= wait_prefix;
+
+ if (found_reverse_match)
+ {
+ i.tm.operand_types[0] = t->operand_types[1];
+ i.tm.operand_types[1] = t->operand_types[0];
+ }
/* If the matched instruction specifies an explicit opcode suffix,
use it - and make sure none has already been specified. */
- if (t->opcode_modifier & (Data16|Data32))
+ if (i.tm.opcode_modifier & (Data16|Data32))
{
if (i.suffix)
{
as_bad ("extraneous opcode suffix given");
return;
}
- if (t->opcode_modifier & Data16)
+ if (i.tm.opcode_modifier & Data16)
i.suffix = WORD_OPCODE_SUFFIX;
else
i.suffix = DWORD_OPCODE_SUFFIX;
@@ -1275,19 +1300,11 @@ md_assemble (line)
if (overlap0 & Imm1)
i.imm_operands = 0; /* kludge for shift insns */
- if (found_reverse_match)
- {
- unsigned int save;
- save = t->operand_types[0];
- t->operand_types[0] = t->operand_types[1];
- t->operand_types[1] = save;
- }
-
/* Finalize opcode. First, we change the opcode based on the operand
size given by i.suffix: we never have to change things for byte insns,
or when no opcode suffix is need to size the operands. */
- if (!i.suffix && (t->opcode_modifier & W))
+ if (!i.suffix && (i.tm.opcode_modifier & W))
{
as_bad ("no opcode suffix given and no register operands; can't size instruction");
return;
@@ -1296,15 +1313,15 @@ md_assemble (line)
if (i.suffix && i.suffix != BYTE_OPCODE_SUFFIX)
{
/* Select between byte and word/dword operations. */
- if (t->opcode_modifier & W)
- t->base_opcode |= W;
+ if (i.tm.opcode_modifier & W)
+ i.tm.base_opcode |= W;
/* Now select between word & dword operations via the
operand size prefix. */
if ((i.suffix == WORD_OPCODE_SUFFIX) ^ flag_16bit_code)
{
if (i.prefixes == MAX_PREFIXES)
{
- as_bad ("%d prefixes given and 'w' opcode suffix gives too many prefixes",
+ as_bad ("%d prefixes given and data size prefix gives too many prefixes",
MAX_PREFIXES);
return;
}
@@ -1331,12 +1348,12 @@ md_assemble (line)
if (found_reverse_match)
{
- t->base_opcode |= found_reverse_match;
+ i.tm.base_opcode |= found_reverse_match;
}
/* The imul $imm, %reg instruction is converted into
imul $imm, %reg, %reg. */
- if (t->opcode_modifier & imulKludge)
+ if (i.tm.opcode_modifier & imulKludge)
{
/* Pretend we saw the 3 operand case. */
i.regs[2] = i.regs[1];
@@ -1344,7 +1361,7 @@ md_assemble (line)
}
/* The clr %reg instruction is converted into xor %reg, %reg. */
- if (t->opcode_modifier & iclrKludge)
+ if (i.tm.opcode_modifier & iclrKludge)
{
i.regs[1] = i.regs[0];
i.reg_operands = 2;
@@ -1355,7 +1372,7 @@ md_assemble (line)
instructions, if the source operand is a register, we must reverse
the i.rm.reg and i.rm.regmem fields. We accomplish this by faking
that the two register operands were given in the reverse order. */
- if ((t->opcode_modifier & ReverseRegRegmem) && i.reg_operands == 2)
+ if ((i.tm.opcode_modifier & ReverseRegRegmem) && i.reg_operands == 2)
{
unsigned int first_reg_operand = (i.types[0] & Reg) ? 0 : 1;
unsigned int second_reg_operand = first_reg_operand + 1;
@@ -1364,40 +1381,40 @@ md_assemble (line)
i.regs[second_reg_operand] = tmp;
}
- if (t->opcode_modifier & ShortForm)
+ if (i.tm.opcode_modifier & ShortForm)
{
/* 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. */
- t->base_opcode |= i.regs[op]->reg_num;
+ i.tm.base_opcode |= i.regs[op]->reg_num;
}
- else if (t->opcode_modifier & ShortFormW)
+ else if (i.tm.opcode_modifier & ShortFormW)
{
/* Short form with 0x8 width bit. Register is always dest. operand */
- t->base_opcode |= i.regs[1]->reg_num;
+ i.tm.base_opcode |= i.regs[1]->reg_num;
if (i.suffix == WORD_OPCODE_SUFFIX ||
i.suffix == DWORD_OPCODE_SUFFIX)
- t->base_opcode |= 0x8;
+ i.tm.base_opcode |= 0x8;
}
- else if (t->opcode_modifier & Seg2ShortForm)
+ else if (i.tm.opcode_modifier & Seg2ShortForm)
{
- if (t->base_opcode == POP_SEG_SHORT && i.regs[0]->reg_num == 1)
+ if (i.tm.base_opcode == POP_SEG_SHORT && i.regs[0]->reg_num == 1)
{
as_bad ("you can't 'pop cs' on the 386.");
return;
}
- t->base_opcode |= (i.regs[0]->reg_num << 3);
+ i.tm.base_opcode |= (i.regs[0]->reg_num << 3);
}
- else if (t->opcode_modifier & Seg3ShortForm)
+ else if (i.tm.opcode_modifier & Seg3ShortForm)
{
/* 'push %fs' is 0x0fa0; 'pop %fs' is 0x0fa1.
'push %gs' is 0x0fa8; 'pop %fs' is 0x0fa9.
So, only if i.regs[0]->reg_num == 5 (%gs) do we need
to change the opcode. */
if (i.regs[0]->reg_num == 5)
- t->base_opcode |= 0x08;
+ i.tm.base_opcode |= 0x08;
}
- else if ((t->base_opcode & ~DW) == MOV_AX_DISP32)
+ else if ((i.tm.base_opcode & ~DW) == MOV_AX_DISP32)
{
/* This is a special non-modrm instruction
that addresses memory with a 32-bit displacement mode anyway,
@@ -1405,12 +1422,12 @@ md_assemble (line)
uses_mem_addrmode = 1;
default_seg = &ds;
}
- else if (t->opcode_modifier & Modrm)
+ else if (i.tm.opcode_modifier & Modrm)
{
- /* The opcode is completed (modulo t->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. */
+ /* 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. */
/* i.reg_operands MUST be the number of real register operands;
implicit registers do not count. */
@@ -1562,10 +1579,10 @@ md_assemble (line)
}
/* Fill in i.rm.reg or i.rm.regmem field with register
- operand (if any) based on
- t->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. */
+ 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. */
if (i.reg_operands)
{
unsigned int op =
@@ -1580,7 +1597,7 @@ md_assemble (line)
: 2));
/* If there is an extension opcode to put here, the
register number must be put into the regmem field. */
- if (t->extension_opcode != None)
+ if (i.tm.extension_opcode != None)
i.rm.regmem = i.regs[op]->reg_num;
else
i.rm.reg = i.regs[op]->reg_num;
@@ -1593,8 +1610,8 @@ md_assemble (line)
}
/* Fill in i.rm.reg field with extension opcode (if any). */
- if (t->extension_opcode != None)
- i.rm.reg = t->extension_opcode;
+ if (i.tm.extension_opcode != None)
+ i.rm.reg = i.tm.extension_opcode;
}
if (i.rm.mode != 3)
@@ -1635,9 +1652,9 @@ md_assemble (line)
}
/* Handle conversion of 'int $3' --> special int3 insn. */
- if (t->base_opcode == INT_OPCODE && i.imms[0]->X_add_number == 3)
+ if (i.tm.base_opcode == INT_OPCODE && i.imms[0]->X_add_number == 3)
{
- t->base_opcode = INT3_OPCODE;
+ i.tm.base_opcode = INT3_OPCODE;
i.imm_operands = 0;
}
@@ -1646,7 +1663,7 @@ md_assemble (line)
register char *p;
/* Output jumps. */
- if (t->opcode_modifier & Jump)
+ if (i.tm.opcode_modifier & Jump)
{
unsigned long n = i.disps[0]->X_add_number;
@@ -1656,7 +1673,7 @@ md_assemble (line)
{
p = frag_more (2);
insn_size += 2;
- p[0] = t->base_opcode;
+ p[0] = i.tm.base_opcode;
p[1] = n;
}
else
@@ -1673,7 +1690,7 @@ md_assemble (line)
return;
}
- if (t->base_opcode == JUMP_PC_RELATIVE)
+ if (i.tm.base_opcode == JUMP_PC_RELATIVE)
{ /* pace */
/* unconditional jump */
p = frag_more (1 + jmp_size);
@@ -1687,7 +1704,7 @@ md_assemble (line)
p = frag_more (2 + jmp_size);
insn_size += 2 + jmp_size;
p[0] = TWO_BYTE_OPCODE_ESCAPE;
- p[1] = t->base_opcode + 0x10;
+ p[1] = i.tm.base_opcode + 0x10;
md_number_to_chars (&p[2], (valueT) n, jmp_size);
}
}
@@ -1706,7 +1723,7 @@ md_assemble (line)
frag_grow (7);
p = frag_more (1);
insn_size += 1;
- p[0] = t->base_opcode;
+ p[0] = i.tm.base_opcode;
frag_var (rs_machine_dependent,
6, /* 2 opcode/prefix + 4 displacement */
1,
@@ -1717,9 +1734,9 @@ md_assemble (line)
(offsetT) n, p);
}
}
- else if (t->opcode_modifier & (JumpByte | JumpDword))
+ else if (i.tm.opcode_modifier & (JumpByte | JumpDword))
{
- int size = (t->opcode_modifier & JumpByte) ? 1 : 4;
+ int size = (i.tm.opcode_modifier & JumpByte) ? 1 : 4;
unsigned long n = i.disps[0]->X_add_number;
unsigned char *q;
@@ -1728,7 +1745,29 @@ md_assemble (line)
{
if (*q == WORD_PREFIX_OPCODE)
{
- FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);
+ /* The jcxz/jecxz instructions are marked with Data16
+ and Data32, which means that they may get
+ WORD_PREFIX_OPCODE added to the list of prefixes.
+ However, the are correctly distinguished using
+ ADDR_PREFIX_OPCODE. Here we look for
+ WORD_PREFIX_OPCODE, and actually emit
+ ADDR_PREFIX_OPCODE. This is a hack, but, then, so
+ is the instruction itself.
+
+ If an explicit suffix is used for the loop
+ instruction, that actually controls whether we use
+ cx vs. ecx. This is also controlled by
+ ADDR_PREFIX_OPCODE.
+
+ I don't know if there is any valid case in which we
+ want to emit WORD_PREFIX_OPCODE, but I am keeping
+ the old behaviour for safety. */
+
+ if (IS_JUMP_ON_CX_ZERO (i.tm.base_opcode)
+ || IS_LOOP_ECX_TIMES (i.tm.base_opcode))
+ FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE);
+ else
+ FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);
insn_size += 1;
break;
}
@@ -1740,9 +1779,9 @@ md_assemble (line)
insn_size += 1;
}
- if (fits_in_unsigned_byte (t->base_opcode))
+ if (fits_in_unsigned_byte (i.tm.base_opcode))
{
- FRAG_APPEND_1_CHAR (t->base_opcode);
+ FRAG_APPEND_1_CHAR (i.tm.base_opcode);
insn_size += 1;
}
else
@@ -1750,8 +1789,8 @@ md_assemble (line)
p = frag_more (2); /* opcode can be at most two bytes */
insn_size += 2;
/* put out high byte first: can't use md_number_to_chars! */
- *p++ = (t->base_opcode >> 8) & 0xff;
- *p = t->base_opcode & 0xff;
+ *p++ = (i.tm.base_opcode >> 8) & 0xff;
+ *p = i.tm.base_opcode & 0xff;
}
p = frag_more (size);
@@ -1772,7 +1811,7 @@ md_assemble (line)
}
}
- else if (t->opcode_modifier & JumpInterSegment)
+ else if (i.tm.opcode_modifier & JumpInterSegment)
{
if (flag_16bit_code)
{
@@ -1782,7 +1821,7 @@ md_assemble (line)
p = frag_more (1 + 2 + 4); /* 1 opcode; 2 segment; 4 offset */
insn_size += 1 + 2 + 4;
- p[0] = t->base_opcode;
+ p[0] = i.tm.base_opcode;
if (i.imms[1]->X_op == O_constant)
md_number_to_chars (p + 1, (valueT) i.imms[1]->X_add_number, 4);
else
@@ -1797,7 +1836,16 @@ md_assemble (line)
/* Output normal instructions here. */
unsigned char *q;
- /* First the prefix bytes. */
+ /* Hack for fwait. It must come before any prefixes, as it
+ really is an instruction rather than a prefix. */
+ if ((i.tm.opcode_modifier & FWait) != 0)
+ {
+ p = frag_more (1);
+ insn_size += 1;
+ md_number_to_chars (p, (valueT) FWAIT_OPCODE, 1);
+ }
+
+ /* The prefix bytes. */
for (q = i.prefix; q < i.prefix + i.prefixes; q++)
{
p = frag_more (1);
@@ -1806,39 +1854,39 @@ md_assemble (line)
}
/* Now the opcode; be careful about word order here! */
- if (fits_in_unsigned_byte (t->base_opcode))
+ if (fits_in_unsigned_byte (i.tm.base_opcode))
{
- FRAG_APPEND_1_CHAR (t->base_opcode);
+ FRAG_APPEND_1_CHAR (i.tm.base_opcode);
insn_size += 1;
}
- else if (fits_in_unsigned_word (t->base_opcode))
+ else if (fits_in_unsigned_word (i.tm.base_opcode))
{
p = frag_more (2);
insn_size += 2;
/* put out high byte first: can't use md_number_to_chars! */
- *p++ = (t->base_opcode >> 8) & 0xff;
- *p = t->base_opcode & 0xff;
+ *p++ = (i.tm.base_opcode >> 8) & 0xff;
+ *p = i.tm.base_opcode & 0xff;
}
else
{ /* opcode is either 3 or 4 bytes */
- if (t->base_opcode & 0xff000000)
+ if (i.tm.base_opcode & 0xff000000)
{
p = frag_more (4);
insn_size += 4;
- *p++ = (t->base_opcode >> 24) & 0xff;
+ *p++ = (i.tm.base_opcode >> 24) & 0xff;
}
else
{
p = frag_more (3);
insn_size += 3;
}
- *p++ = (t->base_opcode >> 16) & 0xff;
- *p++ = (t->base_opcode >> 8) & 0xff;
- *p = (t->base_opcode) & 0xff;
+ *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 base index byte (if present). */
- if (t->opcode_modifier & Modrm)
+ if (i.tm.opcode_modifier & Modrm)
{
p = frag_more (1);
insn_size += 1;
@@ -2090,6 +2138,16 @@ i386_operand (operand_string)
input_line_pointer = ++op_string; /* must advance op_string! */
SKIP_WHITESPACE ();
exp_seg = expression (exp);
+ if (*input_line_pointer != '\0')
+ {
+ /* This should be as_bad, but some versions of gcc, up to
+ about 2.8 and egcs 1.01, generate a bogus @GOTOFF(%ebx)
+ in certain cases. Oddly, the code in question turns out
+ to work correctly anyhow, so we make this just a warning
+ until those versions of gcc are obsolete. */
+ as_warn ("warning: unrecognized characters `%s' in expression",
+ input_line_pointer);
+ }
input_line_pointer = save_input_line_pointer;
if (exp->X_op == O_absent)
@@ -2159,7 +2217,7 @@ i386_operand (operand_string)
i.mem_operands++;
/* Determine type of memory operand from opcode_suffix;
- no opcode suffix implies general memory references. */
+ no opcode suffix implies general memory references. */
switch (i.suffix)
{
case BYTE_OPCODE_SUFFIX:
@@ -2330,6 +2388,7 @@ i386_operand (operand_string)
save_input_line_pointer = input_line_pointer;
input_line_pointer = displacement_string_start;
END_STRING_AND_SAVE (displacement_string_end);
+
#ifndef LEX_AT
{
/*
@@ -2339,36 +2398,49 @@ i386_operand (operand_string)
* into a temporary buffer...
*/
register char *cp;
- if ((cp = strchr (input_line_pointer,'@')) != NULL) {
- char tmpbuf[BUFSIZ];
-
- if(!GOT_symbol)
- GOT_symbol = symbol_find_or_make(GLOBAL_OFFSET_TABLE_NAME);
-
- if (strncmp(cp+1, "PLT", 3) == 0) {
- i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
- *cp = '\0';
- strcpy(tmpbuf, input_line_pointer);
- strcat(tmpbuf, cp+1+3);
- *cp = '@';
- } else if (strncmp(cp+1, "GOTOFF", 6) == 0) {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
- *cp = '\0';
- strcpy(tmpbuf, input_line_pointer);
- strcat(tmpbuf, cp+1+6);
- *cp = '@';
- } else if (strncmp(cp+1, "GOT", 3) == 0) {
- i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
- *cp = '\0';
- strcpy(tmpbuf, input_line_pointer);
- strcat(tmpbuf, cp+1+3);
- *cp = '@';
- } else
- as_bad("Bad reloc specifier '%s' in expression", cp+1);
- input_line_pointer = tmpbuf;
- }
+
+ cp = strchr (input_line_pointer, '@');
+ if (cp != NULL)
+ {
+ char *tmpbuf;
+
+ if (GOT_symbol == NULL)
+ GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
+
+ tmpbuf = (char *) alloca ((cp - input_line_pointer) + 20);
+
+ if (strncmp (cp + 1, "PLT", 3) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
+ *cp = '\0';
+ strcpy (tmpbuf, input_line_pointer);
+ strcat (tmpbuf, cp + 1 + 3);
+ *cp = '@';
+ }
+ else if (strncmp (cp + 1, "GOTOFF", 6) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
+ *cp = '\0';
+ strcpy (tmpbuf, input_line_pointer);
+ strcat (tmpbuf, cp + 1 + 6);
+ *cp = '@';
+ }
+ else if (strncmp (cp + 1, "GOT", 3) == 0)
+ {
+ i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
+ *cp = '\0';
+ strcpy (tmpbuf, input_line_pointer);
+ strcat (tmpbuf, cp + 1 + 3);
+ *cp = '@';
+ }
+ else
+ as_bad ("Bad reloc specifier '%s' in expression", cp + 1);
+
+ input_line_pointer = tmpbuf;
+ }
}
#endif
+
exp_seg = expression (exp);
#ifdef BFD_ASSEMBLER
@@ -2683,6 +2755,9 @@ md_apply_fix3 (fixP, valp, seg)
register char *p = fixP->fx_where + fixP->fx_frag->fr_literal;
valueT value = *valp;
+ if (fixP->fx_r_type == BFD_RELOC_32 && fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_32_PCREL;
+
#if defined (BFD_ASSEMBLER) && !defined (TE_Mach)
/*
* This is a hack. There should be a better way to
@@ -2691,7 +2766,8 @@ md_apply_fix3 (fixP, valp, seg)
if (fixP->fx_r_type == BFD_RELOC_32_PCREL && fixP->fx_addsy)
{
#ifndef OBJ_AOUT
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
+ if (OUTPUT_FLAVOR == bfd_target_elf_flavour
+ || OUTPUT_FLAVOR == bfd_target_coff_flavour)
value += fixP->fx_where + fixP->fx_frag->fr_address;
#endif
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
@@ -2706,6 +2782,12 @@ md_apply_fix3 (fixP, valp, seg)
value += fixP->fx_where + fixP->fx_frag->fr_address;
}
#endif
+#if defined (OBJ_COFF) && defined (TE_PE)
+ /* For some reason, the PE format does not store a section
+ address offset for a PC relative symbol. */
+ if (S_GET_SEGMENT (fixP->fx_addsy) != seg)
+ value += md_pcrel_from (fixP);
+#endif
}
/* Fix a few things - the dynamic linker expects certain values here,
@@ -3055,6 +3137,7 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_386_GOT32:
case BFD_RELOC_386_GOTOFF:
case BFD_RELOC_386_GOTPC:
+ case BFD_RELOC_RVA:
code = fixp->fx_r_type;
break;
default:
diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h
index 8205f53..5142642 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, 1997 Free Software Foundation.
+ Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation.
This file is part of GAS, the GNU Assembler.
@@ -297,6 +297,7 @@ typedef struct
#define Data16 0x20000 /* needs data prefix if in 32-bit mode */
#define Data32 0x40000 /* needs data prefix if in 16-bit mode */
#define iclrKludge 0x80000 /* used to convert clr to xor */
+#define FWait 0x100000 /* instruction needs FWAIT */
/* (opcode_modifier & COMES_IN_ALL_SIZES) is true if the
instuction comes in byte, word, and dword sizes and is encoded into
@@ -398,10 +399,18 @@ extern const struct relax_type md_relax_table[];
extern int flag_16bit_code;
+#ifdef BFD_ASSEMBLER
+#define md_maybe_text() \
+ ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
+#else
+#define md_maybe_text() \
+ (now_seg != data_section && now_seg != bss_section)
+#endif
+
#define md_do_align(n, fill, len, max, around) \
if ((n) && !need_pass_2 \
&& (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1)) \
- && now_seg != data_section && now_seg != bss_section) \
+ && md_maybe_text ()) \
{ \
char *p; \
p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \
@@ -431,4 +440,6 @@ void i386_print_statistics PARAMS ((FILE *));
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-sh.c b/contrib/binutils/gas/config/tc-sh.c
index 0c0bf4b..eaa6146 100644
--- a/contrib/binutils/gas/config/tc-sh.c
+++ b/contrib/binutils/gas/config/tc-sh.c
@@ -48,6 +48,7 @@ static void sh_frob_section PARAMS ((bfd *, segT, PTR));
void cons ();
void s_align_bytes ();
+static void s_uacons PARAMS ((int));
int shl = 0;
@@ -70,6 +71,8 @@ const pseudo_typeS md_pseudo_table[] =
{"page", listing_eject, 0},
{"program", s_ignore, 0},
{"uses", s_uses, 0},
+ {"uaword", s_uacons, 2},
+ {"ualong", s_uacons, 4},
{0, 0, 0}
};
@@ -77,6 +80,10 @@ const pseudo_typeS md_pseudo_table[] =
int sh_relax; /* set if -relax seen */
+/* Whether -small was seen. */
+
+int sh_small;
+
const char EXP_CHARS[] = "eE";
/* Chars that mean this number is a floating point constant */
@@ -259,6 +266,18 @@ parse_reg (src, mode, reg)
return 3;
}
+ if (src[0] == 's' && src[1] == 'g' && src[2] == 'r' && ! isalnum (src[3]))
+ {
+ *mode = A_SGR;
+ return 3;
+ }
+
+ if (src[0] == 'd' && src[1] == 'b' && src[2] == 'r' && ! isalnum (src[3]))
+ {
+ *mode = A_DBR;
+ return 3;
+ }
+
if (src[0] == 's' && src[1] == 'r' && ! isalnum (src[2]))
{
*mode = A_SR;
@@ -324,6 +343,61 @@ parse_reg (src, mode, reg)
return 3;
}
}
+ if (src[0] == 'd' && src[1] == 'r')
+ {
+ if (src[2] == '1')
+ {
+ if (src[3] >= '0' && src[3] <= '4' && ! ((src[3] - '0') & 1)
+ && ! isalnum (src[4]))
+ {
+ *mode = D_REG_N;
+ *reg = 10 + src[3] - '0';
+ return 4;
+ }
+ }
+ if (src[2] >= '0' && src[2] <= '8' && ! ((src[2] - '0') & 1)
+ && ! isalnum (src[3]))
+ {
+ *mode = D_REG_N;
+ *reg = (src[2] - '0');
+ return 3;
+ }
+ }
+ if (src[0] == 'x' && src[1] == 'd')
+ {
+ if (src[2] == '1')
+ {
+ if (src[3] >= '0' && src[3] <= '4' && ! ((src[3] - '0') & 1)
+ && ! isalnum (src[4]))
+ {
+ *mode = X_REG_N;
+ *reg = 11 + src[3] - '0';
+ return 4;
+ }
+ }
+ if (src[2] >= '0' && src[2] <= '8' && ! ((src[2] - '0') & 1)
+ && ! isalnum (src[3]))
+ {
+ *mode = X_REG_N;
+ *reg = (src[2] - '0') + 1;
+ return 3;
+ }
+ }
+ if (src[0] == 'f' && src[1] == 'v')
+ {
+ if (src[2] == '1'&& src[3] == '2' && ! isalnum (src[4]))
+ {
+ *mode = V_REG_N;
+ *reg = 12;
+ return 4;
+ }
+ if ((src[2] == '0' || src[2] == '4' || src[2] == '8') && ! isalnum (src[3]))
+ {
+ *mode = V_REG_N;
+ *reg = (src[2] - '0');
+ return 3;
+ }
+ }
if (src[0] == 'f' && src[1] == 'p' && src[2] == 'u' && src[3] == 'l'
&& ! isalnum (src[4]))
{
@@ -338,6 +412,13 @@ parse_reg (src, mode, reg)
return 5;
}
+ if (src[0] == 'x' && src[1] == 'm' && src[2] == 't' && src[3] == 'r'
+ && src[4] == 'x' && ! isalnum (src[5]))
+ {
+ *mode = XMTRX_M4;
+ return 5;
+ }
+
return 0;
}
@@ -662,6 +743,9 @@ get_specific (opcode, operands)
case A_IND_R0_REG_N:
case A_DISP_REG_N:
case F_REG_N:
+ case D_REG_N:
+ case X_REG_N:
+ case V_REG_N:
case FPUL_N:
case FPSCR_N:
/* Opcode needs rn */
@@ -669,11 +753,23 @@ get_specific (opcode, operands)
goto fail;
reg_n = user->reg;
break;
+ case FD_REG_N:
+ if (user->type != F_REG_N && user->type != D_REG_N)
+ goto fail;
+ reg_n = user->reg;
+ break;
+ case DX_REG_N:
+ if (user->type != D_REG_N && user->type != X_REG_N)
+ goto fail;
+ reg_n = user->reg;
+ break;
case A_GBR:
case A_SR:
case A_VBR:
case A_SSR:
case A_SPC:
+ case A_SGR:
+ case A_DBR:
if (user->type != arg)
goto fail;
break;
@@ -697,6 +793,9 @@ get_specific (opcode, operands)
break;
case F_REG_M:
+ case D_REG_M:
+ case X_REG_M:
+ case V_REG_M:
case FPUL_M:
case FPSCR_M:
/* Opcode needs rn */
@@ -704,6 +803,16 @@ get_specific (opcode, operands)
goto fail;
reg_m = user->reg;
break;
+ case DX_REG_M:
+ if (user->type != D_REG_N && user->type != X_REG_N)
+ goto fail;
+ reg_m = user->reg;
+ break;
+ case XMTRX_M4:
+ if (user->type != XMTRX_M4)
+ goto fail;
+ reg_m = 4;
+ break;
default:
printf ("unhandled %d\n", arg);
@@ -813,6 +922,9 @@ build_Mytes (opcode, operand)
case REG_M:
nbuf[index] = reg_m;
break;
+ case REG_NM:
+ nbuf[index] = reg_n | (reg_m >> 2);
+ break;
case REG_B:
nbuf[index] = reg_b | 0x08;
break;
@@ -1099,10 +1211,12 @@ CONST char *md_shortopts = "";
struct option md_longopts[] = {
#define OPTION_RELAX (OPTION_MD_BASE)
-#define OPTION_LITTLE (OPTION_MD_BASE+1)
+#define OPTION_LITTLE (OPTION_MD_BASE + 1)
+#define OPTION_SMALL (OPTION_LITTLE + 1)
{"relax", no_argument, NULL, OPTION_RELAX},
{"little", no_argument, NULL, OPTION_LITTLE},
+ {"small", no_argument, NULL, OPTION_SMALL},
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof(md_longopts);
@@ -1117,11 +1231,16 @@ md_parse_option (c, arg)
case OPTION_RELAX:
sh_relax = 1;
break;
+
case OPTION_LITTLE:
shl = 1;
target_big_endian = 0;
break;
+ case OPTION_SMALL:
+ sh_small = 1;
+ break;
+
default:
return 0;
}
@@ -1136,7 +1255,8 @@ md_show_usage (stream)
fprintf(stream, "\
SH options:\n\
-little generate little endian code\n\
--relax alter jump instructions for long displacements\n");
+-relax alter jump instructions for long displacements\n\
+-small align sections to 4 byte boundaries, not 16\n");
}
int md_short_jump_size;
@@ -1560,8 +1680,70 @@ DEFUN (md_section_align, (seg, size),
#endif /* ! BFD_ASSEMBLER */
}
+/* This static variable is set by s_uacons to tell sh_cons_align that
+ the expession does not need to be aligned. */
+
+static int sh_no_align_cons = 0;
+
+/* This handles the unaligned space allocation pseudo-ops, such as
+ .uaword. .uaword is just like .word, but the value does not need
+ to be aligned. */
+
+static void
+s_uacons (bytes)
+ int bytes;
+{
+ /* Tell sh_cons_align not to align this value. */
+ sh_no_align_cons = 1;
+ cons (bytes);
+}
+
+/* If a .word, et. al., pseud-op is seen, warn if the value is not
+ aligned correctly. Note that this can cause warnings to be issued
+ when assembling initialized structured which were declared with the
+ packed attribute. FIXME: Perhaps we should require an option to
+ enable this warning? */
+
+void
+sh_cons_align (nbytes)
+ int nbytes;
+{
+ int nalign;
+ char *p;
+
+ if (sh_no_align_cons)
+ {
+ /* This is an unaligned pseudo-op. */
+ sh_no_align_cons = 0;
+ return;
+ }
+
+ nalign = 0;
+ while ((nbytes & 1) == 0)
+ {
+ ++nalign;
+ nbytes >>= 1;
+ }
+
+ if (nalign == 0)
+ return;
+
+ if (now_seg == absolute_section)
+ {
+ if ((abs_section_offset & ((1 << nalign) - 1)) != 0)
+ as_warn ("misaligned data");
+ return;
+ }
+
+ p = frag_var (rs_align_code, 1, 1, (relax_substateT) 0,
+ (symbolS *) NULL, (offsetT) nalign, (char *) NULL);
+
+ record_alignment (now_seg, nalign);
+}
+
/* When relaxing, we need to output a reloc for any .align directive
- that requests alignment to a four byte boundary or larger. */
+ that requests alignment to a four byte boundary or larger. This is
+ also where we check for misaligned data. */
void
sh_handle_align (frag)
@@ -1574,6 +1756,10 @@ sh_handle_align (frag)
&& now_seg != bss_section)
fix_new (frag, frag->fr_fix, 2, &abs_symbol, frag->fr_offset, 0,
BFD_RELOC_SH_ALIGN);
+
+ if (frag->fr_type == rs_align_code
+ && frag->fr_next->fr_address - frag->fr_address - frag->fr_fix != 0)
+ as_warn_where (frag->fr_file, frag->fr_line, "misaligned data");
}
/* This macro decides whether a particular reloc is an entry in a
@@ -1587,6 +1773,7 @@ sh_handle_align (frag)
#define SWITCH_TABLE_CONS(fix) \
((fix)->fx_r_type == 0 \
&& ((fix)->fx_size == 2 \
+ || (fix)->fx_size == 1 \
|| (fix)->fx_size == 4))
#endif
@@ -1597,6 +1784,7 @@ sh_handle_align (frag)
&& S_GET_SEGMENT ((fix)->fx_subsy) == text_section \
&& ((fix)->fx_r_type == BFD_RELOC_32 \
|| (fix)->fx_r_type == BFD_RELOC_16 \
+ || (fix)->fx_r_type == BFD_RELOC_8 \
|| SWITCH_TABLE_CONS (fix)))
/* See whether we need to force a relocation into the output file.
@@ -1639,6 +1827,8 @@ md_apply_fix (fixP, val)
#ifdef BFD_ASSEMBLER
long val = *valp;
#endif
+ long max, min;
+ int shift;
#ifndef BFD_ASSEMBLER
if (fixP->fx_r_type == 0)
@@ -1648,36 +1838,53 @@ md_apply_fix (fixP, val)
else if (fixP->fx_size == 4)
fixP->fx_r_type = BFD_RELOC_32;
else if (fixP->fx_size == 1)
- fixP->fx_r_type = BFD_RELOC_SH_IMM8;
+ fixP->fx_r_type = BFD_RELOC_8;
else
abort ();
}
#endif
+ max = min = 0;
+ shift = 0;
switch (fixP->fx_r_type)
{
case BFD_RELOC_SH_IMM4:
+ max = 0xf;
*buf = (*buf & 0xf0) | (val & 0xf);
break;
case BFD_RELOC_SH_IMM4BY2:
+ max = 0xf;
+ shift = 1;
*buf = (*buf & 0xf0) | ((val >> 1) & 0xf);
break;
case BFD_RELOC_SH_IMM4BY4:
+ max = 0xf;
+ shift = 2;
*buf = (*buf & 0xf0) | ((val >> 2) & 0xf);
break;
case BFD_RELOC_SH_IMM8BY2:
+ max = 0xff;
+ shift = 1;
*buf = val >> 1;
break;
case BFD_RELOC_SH_IMM8BY4:
+ max = 0xff;
+ shift = 2;
*buf = val >> 2;
break;
case BFD_RELOC_8:
case BFD_RELOC_SH_IMM8:
+ /* Sometimes the 8 bit value is sign extended (e.g., add) and
+ sometimes it is not (e.g., and). We permit any 8 bit value.
+ Note that adding further restrictions may invalidate
+ reasonable looking assembly code, such as ``and -0x1,r0''. */
+ max = 0xff;
+ min = - 0xff;
*buf++ = val;
break;
@@ -1770,6 +1977,19 @@ md_apply_fix (fixP, val)
abort ();
}
+ if (shift != 0)
+ {
+ if ((val & ((1 << shift) - 1)) != 0)
+ as_bad_where (fixP->fx_file, fixP->fx_line, "misaligned offset");
+ if (val >= 0)
+ val >>= shift;
+ else
+ val = ((val >> shift)
+ | ((long) -1 & ~ ((long) -1 >> shift)));
+ }
+ if (max != 0 && (val < min || val > max))
+ as_bad_where (fixP->fx_file, fixP->fx_line, "offset out of range");
+
#ifdef BFD_ASSEMBLER
return 0;
#endif
@@ -1931,6 +2151,7 @@ static const struct reloc_map coff_reloc_map[] =
{ BFD_RELOC_SH_IMM8BY4, R_SH_IMM8BY4 },
{ BFD_RELOC_SH_PCRELIMM8BY2, R_SH_PCRELIMM8BY2 },
{ BFD_RELOC_SH_PCRELIMM8BY4, R_SH_PCRELIMM8BY4 },
+ { BFD_RELOC_8_PCREL, R_SH_SWITCH8 },
{ BFD_RELOC_SH_SWITCH16, R_SH_SWITCH16 },
{ BFD_RELOC_SH_SWITCH32, R_SH_SWITCH32 },
{ BFD_RELOC_SH_USES, R_SH_USES },
@@ -1977,6 +2198,8 @@ sh_coff_reloc_mangle (seg, fix, intr, paddr)
if (fix->fx_r_type == BFD_RELOC_16)
intr->r_type = R_SH_SWITCH16;
+ else if (fix->fx_r_type == BFD_RELOC_8)
+ intr->r_type = R_SH_SWITCH8;
else if (fix->fx_r_type == BFD_RELOC_32)
intr->r_type = R_SH_SWITCH32;
else
@@ -2077,6 +2300,8 @@ tc_gen_reloc (section, fixp)
rel->addend = rel->address - S_GET_VALUE (fixp->fx_subsy);
if (r_type == BFD_RELOC_16)
r_type = BFD_RELOC_SH_SWITCH16;
+ else if (r_type == BFD_RELOC_8)
+ r_type = BFD_RELOC_8_PCREL;
else if (r_type == BFD_RELOC_32)
r_type = BFD_RELOC_SH_SWITCH32;
else
diff --git a/contrib/binutils/gas/config/tc-sh.h b/contrib/binutils/gas/config/tc-sh.h
index fb5c9ef..a18029b 100644
--- a/contrib/binutils/gas/config/tc-sh.h
+++ b/contrib/binutils/gas/config/tc-sh.h
@@ -30,9 +30,16 @@ extern int shl;
/* Whether -relax was used. */
extern int sh_relax;
+/* Whether -small was used. */
+extern int sh_small;
+
/* Don't try to break words. */
#define WORKING_DOT_WORD
+/* We require .long, et. al., to be aligned correctly. */
+#define md_cons_align(nbytes) sh_cons_align (nbytes)
+extern void sh_cons_align PARAMS ((int));
+
/* When relaxing, we need to generate relocations for alignment
directives. */
#define HANDLE_ALIGN(frag) sh_handle_align (frag)
@@ -117,7 +124,7 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *));
|| strcmp (obj_segment_name (SEG), ".ctors") == 0 \
|| strcmp (obj_segment_name (SEG), ".dtors") == 0) \
? 2 \
- : 4))
+ : (sh_small ? 2 : 4)))
#endif /* OBJ_COFF */
diff --git a/contrib/binutils/gas/config/tc-tic30.c b/contrib/binutils/gas/config/tc-tic30.c
new file mode 100644
index 0000000..f78c6f8
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-tic30.c
@@ -0,0 +1,1909 @@
+/* tc-c30.c -- Assembly code for the Texas Instruments TMS320C30
+ Copyright (C) 1998 Free Software Foundation.
+ Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
+
+ 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. */
+
+/*
+ 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.
+ */
+
+#include "as.h"
+#include "opcode/tic30.h"
+
+/* 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"};
+
+const int md_reloc_size = 0;
+int md_long_jump_size = 0;
+int md_short_jump_size = 0;
+
+const char comment_chars[] = ";";
+const char line_comment_chars[] = "*";
+const char line_separator_chars[] = "";
+
+const char *md_shortopts = "";
+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 */
+/* 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 */
+const char EXP_CHARS[] = "eE";
+
+/* tables for lexical analysis */
+static char opcode_chars[256];
+static char register_chars[256];
+static char operand_chars[256];
+static char space_chars[256];
+static char identifier_chars[256];
+static char digit_chars[256];
+
+/* lexical macros */
+#define is_opcode_char(x) (opcode_chars[(unsigned char) x])
+#define is_operand_char(x) (operand_chars[(unsigned char) x])
+#define is_register_char(x) (register_chars[(unsigned char) x])
+#define is_space_char(x) (space_chars[(unsigned char) x])
+#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[] =
+{
+ {0, 0, 0}
+};
+
+#undef USE_STDOUT
+#define USE_STDOUT 1
+
+#ifdef USE_STDARG
+
+#include <stdarg.h>
+
+int
+debug (const char *string,...)
+{
+ if (flag_debug)
+ {
+ va_list argptr;
+ char str[100];
+
+ va_start (argptr, string);
+ vsprintf (str, string, argptr);
+ if (str[0] == '\0')
+ return (0);
+ va_end (argptr);
+ fputs (str, USE_STDOUT ? stdout : stderr);
+ return strlen (str);
+ }
+ else
+ return 0;
+}
+#else
+int
+debug (string, va_alist)
+ const char *string;
+ va_dcl
+{
+ if (flag_debug)
+ {
+ va_list argptr;
+ char str[100];
+ int cnt;
+
+ va_start (argptr, string);
+ cnt = vsprintf (str, string, argptr);
+ if (str[0] == NULL)
+ return (0);
+ va_end (argptr);
+ fputs (str, USE_STDOUT ? stdout : stderr);
+ return (cnt);
+ }
+ else
+ return 0;
+}
+#endif
+
+/* hash table for opcode lookup */
+static struct hash_control *op_hash;
+/* hash table for parallel opcode lookup */
+static struct hash_control *parop_hash;
+/* hash table for register lookup */
+static struct hash_control *reg_hash;
+/* hash table for indirect addressing lookup */
+static struct hash_control *ind_hash;
+
+void
+md_begin ()
+{
+ const char *hash_err;
+ debug ("In md_begin()\n");
+ op_hash = hash_new ();
+ {
+ const template *current_optab = tic30_optab;
+ for (; current_optab < tic30_optab_end; current_optab++)
+ {
+ hash_err = hash_insert (op_hash, current_optab->name, (char *) current_optab);
+ if (hash_err)
+ as_fatal ("Internal Error: Can't Hash %s: %s", current_optab->name, hash_err);
+ }
+ }
+ parop_hash = hash_new ();
+ {
+ const partemplate *current_parop = tic30_paroptab;
+ for (; current_parop < tic30_paroptab_end; current_parop++)
+ {
+ hash_err = hash_insert (parop_hash, current_parop->name, (char *) current_parop);
+ if (hash_err)
+ as_fatal ("Internal Error: Can't Hash %s: %s", current_parop->name, hash_err);
+ }
+ }
+ reg_hash = hash_new ();
+ {
+ const reg *current_reg = tic30_regtab;
+ for (; current_reg < tic30_regtab_end; current_reg++)
+ {
+ hash_err = hash_insert (reg_hash, current_reg->name, (char *) current_reg);
+ if (hash_err)
+ as_fatal ("Internal Error: Can't Hash %s: %s", current_reg->name, hash_err);
+ }
+ }
+ ind_hash = hash_new ();
+ {
+ const ind_addr_type *current_ind = tic30_indaddr_tab;
+ for (; current_ind < tic30_indaddrtab_end; current_ind++)
+ {
+ hash_err = hash_insert (ind_hash, current_ind->syntax, (char *) current_ind);
+ if (hash_err)
+ as_fatal ("Internal Error: Can't Hash %s: %s", current_ind->syntax, hash_err);
+ }
+ }
+ /* fill in lexical tables: opcode_chars, operand_chars, space_chars */
+ {
+ register int c;
+ register char *p;
+
+ for (c = 0; c < 256; c++)
+ {
+ if (islower (c) || isdigit (c))
+ {
+ opcode_chars[c] = c;
+ register_chars[c] = c;
+ }
+ else if (isupper (c))
+ {
+ opcode_chars[c] = tolower (c);
+ register_chars[c] = opcode_chars[c];
+ }
+ else if (c == ')' || c == '(')
+ {
+ register_chars[c] = c;
+ }
+ if (isupper (c) || islower (c) || isdigit (c))
+ operand_chars[c] = c;
+ if (isdigit (c) || c == '-')
+ digit_chars[c] = c;
+ if (isalpha (c) || c == '_' || c == '.' || isdigit (c))
+ identifier_chars[c] = c;
+ if (c == ' ' || c == '\t')
+ space_chars[c] = c;
+ if (c == '_')
+ opcode_chars[c] = c;
+ }
+ for (p = operand_special_chars; *p != '\0'; p++)
+ operand_chars[(unsigned char) *p] = *p;
+ }
+}
+
+/* Address Mode OR values */
+#define AM_Register 0x00000000
+#define AM_Direct 0x00200000
+#define AM_Indirect 0x00400000
+#define AM_Immediate 0x00600000
+#define AM_NotReq 0xFFFFFFFF
+
+/* PC Relative OR values */
+#define PC_Register 0x00000000
+#define PC_Relative 0x02000000
+
+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;
+
+int tic30_parallel_insn PARAMS ((char *));
+operand *tic30_operand PARAMS ((char *));
+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 insn;
+static int found_parallel_insn;
+
+void
+md_assemble (line)
+ char *line;
+{
+ template *opcode;
+ char *current_posn;
+ char *token_start;
+ char save_char;
+ int count;
+
+ debug ("In md_assemble() with argument %s\n", line);
+ memset (&insn, '\0', sizeof (insn));
+ if (found_parallel_insn)
+ {
+ debug ("Line is second part of parallel instruction\n\n");
+ found_parallel_insn = 0;
+ return;
+ }
+ if ((current_posn = tic30_find_parallel_insn (line, input_line_pointer + 1)) == NULL)
+ current_posn = line;
+ else
+ found_parallel_insn = 1;
+ while (is_space_char (*current_posn))
+ current_posn++;
+ token_start = current_posn;
+ if (!is_opcode_char (*current_posn))
+ {
+ as_bad ("Invalid character %s in opcode", output_invalid (*current_posn));
+ return;
+ }
+ /* Check if instruction is a parallel instruction by seeing if the first
+ character is a q. */
+ if (*token_start == 'q')
+ {
+ if (tic30_parallel_insn (token_start))
+ {
+ if (found_parallel_insn)
+ free (token_start);
+ return;
+ }
+ }
+ while (is_opcode_char (*current_posn))
+ current_posn++;
+ { /* Find instruction */
+ save_char = *current_posn;
+ *current_posn = '\0';
+ opcode = (template *) hash_find (op_hash, token_start);
+ if (opcode)
+ {
+ debug ("Found instruction %s\n", opcode->name);
+ insn.tm = opcode;
+ }
+ else
+ {
+ debug ("Didn't find insn\n");
+ as_bad ("Unknown TMS320C30 instruction: %s", token_start);
+ return;
+ }
+ *current_posn = save_char;
+ }
+ if (*current_posn != END_OF_INSN)
+ { /* Find operands */
+ int paren_not_balanced;
+ int expecting_operand = 0;
+ int this_operand;
+ do
+ {
+ /* skip optional white space before operand */
+ while (!is_operand_char (*current_posn) && *current_posn != END_OF_INSN)
+ {
+ if (!is_space_char (*current_posn))
+ {
+ as_bad ("Invalid character %s before %s operand",
+ output_invalid (*current_posn),
+ ordinal_names[insn.operands]);
+ return;
+ }
+ current_posn++;
+ }
+ token_start = current_posn; /* after white space */
+ paren_not_balanced = 0;
+ while (paren_not_balanced || *current_posn != ',')
+ {
+ if (*current_posn == END_OF_INSN)
+ {
+ if (paren_not_balanced)
+ {
+ as_bad ("Unbalanced parenthesis in %s operand.",
+ ordinal_names[insn.operands]);
+ return;
+ }
+ else
+ break; /* we are done */
+ }
+ else if (!is_operand_char (*current_posn) && !is_space_char (*current_posn))
+ {
+ as_bad ("Invalid character %s in %s operand",
+ output_invalid (*current_posn),
+ ordinal_names[insn.operands]);
+ return;
+ }
+ if (*current_posn == '(')
+ ++paren_not_balanced;
+ if (*current_posn == ')')
+ --paren_not_balanced;
+ current_posn++;
+ }
+ if (current_posn != token_start)
+ { /* yes, we've read in another operand */
+ this_operand = insn.operands++;
+ if (insn.operands > MAX_OPERANDS)
+ {
+ as_bad ("Spurious operands; (%d operands/instruction max)",
+ MAX_OPERANDS);
+ return;
+ }
+ /* now parse operand adding info to 'insn' as we go along */
+ save_char = *current_posn;
+ *current_posn = '\0';
+ insn.operand_type[this_operand] = tic30_operand (token_start);
+ *current_posn = save_char;
+ if (insn.operand_type[this_operand] == NULL)
+ return;
+ }
+ else
+ {
+ if (expecting_operand)
+ {
+ as_bad ("Expecting operand after ','; got nothing");
+ return;
+ }
+ if (*current_posn == ',')
+ {
+ as_bad ("Expecting operand before ','; got nothing");
+ return;
+ }
+ }
+ /* now *current_posn must be either ',' or END_OF_INSN */
+ if (*current_posn == ',')
+ {
+ if (*++current_posn == END_OF_INSN)
+ { /* just skip it, if it's \n complain */
+ as_bad ("Expecting operand after ','; got nothing");
+ return;
+ }
+ expecting_operand = 1;
+ }
+ }
+ while (*current_posn != END_OF_INSN); /* until we get end of insn */
+ }
+ debug ("Number of operands found: %d\n", insn.operands);
+ /* Check that number of operands is correct */
+ if (insn.operands != insn.tm->operands)
+ {
+ int i;
+ 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. */
+ for (i = 0; i < insn.tm->operands; i++)
+ if (insn.tm->operand_types[i] & NotReq)
+ numops--;
+ if (insn.operands != numops)
+ {
+ as_bad ("Incorrect number of operands given");
+ return;
+ }
+ }
+ insn.addressing_mode = AM_NotReq;
+ for (count = 0; count < insn.operands; count++)
+ {
+ if (insn.operand_type[count]->op_type & insn.tm->operand_types[count])
+ {
+ debug ("Operand %d matches\n", count + 1);
+ /* If instruction has two operands and has an AddressMode modifier then set
+ addressing mode type for instruction */
+ if (insn.tm->opcode_modifier == AddressMode)
+ {
+ int addr_insn = 0;
+ /* 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))
+ insn.addressing_mode = AM_Register;
+ else if (insn.operand_type[addr_insn]->op_type & Direct)
+ insn.addressing_mode = AM_Direct;
+ else if (insn.operand_type[addr_insn]->op_type & Indirect)
+ insn.addressing_mode = AM_Indirect;
+ else
+ insn.addressing_mode = AM_Immediate;
+ }
+ }
+ else
+ {
+ as_bad ("The %s operand doesn't match", ordinal_names[count]);
+ return;
+ }
+ }
+ /* 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. */
+ char *p;
+ switch (insn.operand_type[0]->op_type)
+ {
+ case Rn:
+ case ARn:
+ case DPReg:
+ case OtherReg:
+ if (insn.operand_type[1]->op_type & (AllReg))
+ insn.addressing_mode = AM_Register;
+ else if (insn.operand_type[1]->op_type & Indirect)
+ insn.addressing_mode = AM_Direct;
+ else
+ {
+ /* Shouldn't make it to this stage */
+ as_bad ("Incompatible first and second operands in instruction");
+ return;
+ }
+ break;
+ case Indirect:
+ if (insn.operand_type[1]->op_type & (AllReg))
+ insn.addressing_mode = AM_Indirect;
+ else if (insn.operand_type[1]->op_type & Indirect)
+ insn.addressing_mode = AM_Immediate;
+ else
+ {
+ /* Shouldn't make it to this stage */
+ as_bad ("Incompatible first and second operands in instruction");
+ return;
+ }
+ break;
+ }
+ /* 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. */
+ insn.opcode = insn.tm->base_opcode;
+ if (insn.operand_type[0]->op_type & Indirect)
+ {
+ insn.opcode |= (insn.operand_type[0]->indirect.ARnum);
+ insn.opcode |= (insn.operand_type[0]->indirect.mod << 3);
+ }
+ else
+ insn.opcode |= (insn.operand_type[0]->reg.opcode);
+ if (insn.operand_type[1]->op_type & Indirect)
+ {
+ insn.opcode |= (insn.operand_type[1]->indirect.ARnum << 8);
+ insn.opcode |= (insn.operand_type[1]->indirect.mod << 11);
+ }
+ else
+ insn.opcode |= (insn.operand_type[1]->reg.opcode << 8);
+ if (insn.operands == 3)
+ insn.opcode |= (insn.operand_type[2]->reg.opcode << 16);
+ insn.opcode |= insn.addressing_mode;
+ p = frag_more (INSN_SIZE);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else
+ { /* Not a three operand instruction */
+ char *p;
+ int am_insn = -1;
+ insn.opcode = insn.tm->base_opcode;
+ /* Create frag for instruction - all instructions are 4 bytes long. */
+ p = frag_more (INSN_SIZE);
+ if ((insn.operands > 0) && (insn.tm->opcode_modifier == AddressMode))
+ {
+ insn.opcode |= insn.addressing_mode;
+ if (insn.addressing_mode == AM_Indirect)
+ {
+ /* Determine which operand gives the addressing mode */
+ if (insn.operand_type[0]->op_type & Indirect)
+ am_insn = 0;
+ if ((insn.operands > 1) && (insn.operand_type[1]->op_type & Indirect))
+ am_insn = 1;
+ insn.opcode |= (insn.operand_type[am_insn]->indirect.disp);
+ insn.opcode |= (insn.operand_type[am_insn]->indirect.ARnum << 8);
+ insn.opcode |= (insn.operand_type[am_insn]->indirect.mod << 11);
+ if (insn.operands > 1)
+ insn.opcode |= (insn.operand_type[!am_insn]->reg.opcode << 16);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else if (insn.addressing_mode == AM_Register)
+ {
+ insn.opcode |= (insn.operand_type[0]->reg.opcode);
+ if (insn.operands > 1)
+ insn.opcode |= (insn.operand_type[1]->reg.opcode << 16);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else if (insn.addressing_mode == AM_Direct)
+ {
+ if (insn.operand_type[0]->op_type & Direct)
+ am_insn = 0;
+ if ((insn.operands > 1) && (insn.operand_type[1]->op_type & Direct))
+ am_insn = 1;
+ if (insn.operands > 1)
+ insn.opcode |= (insn.operand_type[!am_insn]->reg.opcode << 16);
+ if (insn.operand_type[am_insn]->direct.resolved == 1)
+ {
+ /* Resolved values can be placed straight into instruction word, and output */
+ insn.opcode |= (insn.operand_type[am_insn]->direct.address & 0x0000FFFF);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else
+ { /* Unresolved direct addressing mode instruction */
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ fix_new_exp (frag_now, p + 2 - (frag_now->fr_literal), 2, &insn.operand_type[am_insn]->direct.direct_expr, 0, 0);
+ }
+ }
+ else if (insn.addressing_mode == AM_Immediate)
+ {
+ if (insn.operand_type[0]->immediate.resolved == 1)
+ {
+ char *keeploc;
+ int size;
+ if (insn.operands > 1)
+ insn.opcode |= (insn.operand_type[1]->reg.opcode << 16);
+ switch (insn.tm->imm_arg_type)
+ {
+ case Imm_Float:
+ debug ("Floating point first operand\n");
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ keeploc = input_line_pointer;
+ input_line_pointer = insn.operand_type[0]->immediate.label;
+ if (md_atof ('f', p + 2, &size) != 0)
+ {
+ as_bad ("invalid short form floating point immediate operand");
+ return;
+ }
+ input_line_pointer = keeploc;
+ break;
+ case Imm_UInt:
+ debug ("Unsigned int first operand\n");
+ if (insn.operand_type[0]->immediate.decimal_found)
+ as_warn ("rounding down first operand float to unsigned int");
+ if (insn.operand_type[0]->immediate.u_number > 0xFFFF)
+ as_warn ("only lower 16-bits of first operand are used");
+ insn.opcode |= (insn.operand_type[0]->immediate.u_number & 0x0000FFFFL);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ break;
+ case Imm_SInt:
+ debug ("Int first operand\n");
+ if (insn.operand_type[0]->immediate.decimal_found)
+ as_warn ("rounding down first operand float to signed int");
+ if (insn.operand_type[0]->immediate.s_number < -32768 ||
+ insn.operand_type[0]->immediate.s_number > 32767)
+ {
+ as_bad ("first operand is too large for 16-bit signed int");
+ return;
+ }
+ insn.opcode |= (insn.operand_type[0]->immediate.s_number & 0x0000FFFFL);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ break;
+ }
+ }
+ else
+ { /* Unresolved immediate label */
+ if (insn.operands > 1)
+ insn.opcode |= (insn.operand_type[1]->reg.opcode << 16);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ fix_new_exp (frag_now, p + 2 - (frag_now->fr_literal), 2, &insn.operand_type[0]->immediate.imm_expr, 0, 0);
+ }
+ }
+ }
+ else if (insn.tm->opcode_modifier == PCRel)
+ {
+ /* Conditional Branch and Call instructions */
+ if ((insn.tm->operand_types[0] & (AllReg | Disp)) == (AllReg | Disp))
+ {
+ if (insn.operand_type[0]->op_type & (AllReg))
+ {
+ insn.opcode |= (insn.operand_type[0]->reg.opcode);
+ insn.opcode |= PC_Register;
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else
+ {
+ insn.opcode |= PC_Relative;
+ if (insn.operand_type[0]->immediate.resolved == 1)
+ {
+ insn.opcode |= (insn.operand_type[0]->immediate.s_number & 0x0000FFFF);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else
+ {
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ fix_new_exp (frag_now, p + 2 - (frag_now->fr_literal), 2, &insn.operand_type[0]->immediate.imm_expr, 1, 0);
+ }
+ }
+ }
+ else if ((insn.tm->operand_types[0] & ARn) == ARn)
+ {
+ /* Decrement and Branch instructions */
+ insn.opcode |= ((insn.operand_type[0]->reg.opcode - 0x08) << 22);
+ if (insn.operand_type[1]->op_type & (AllReg))
+ {
+ insn.opcode |= (insn.operand_type[1]->reg.opcode);
+ insn.opcode |= PC_Register;
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else if (insn.operand_type[1]->immediate.resolved == 1)
+ {
+ if (insn.operand_type[0]->immediate.decimal_found)
+ {
+ as_bad ("first operand is floating point");
+ return;
+ }
+ if (insn.operand_type[0]->immediate.s_number < -32768 ||
+ insn.operand_type[0]->immediate.s_number > 32767)
+ {
+ as_bad ("first operand is too large for 16-bit signed int");
+ return;
+ }
+ insn.opcode |= (insn.operand_type[1]->immediate.s_number);
+ insn.opcode |= PC_Relative;
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else
+ {
+ insn.opcode |= PC_Relative;
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ fix_new_exp (frag_now, p + 2 - frag_now->fr_literal, 2, &insn.operand_type[1]->immediate.imm_expr, 1, 0);
+ }
+ }
+ }
+ else if (insn.tm->operand_types[0] == IVector)
+ {
+ /* Trap instructions */
+ if (insn.operand_type[0]->op_type & IVector)
+ insn.opcode |= (insn.operand_type[0]->immediate.u_number);
+ else
+ { /* Shouldn't get here */
+ as_bad ("interrupt vector for trap instruction out of range");
+ return;
+ }
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else if (insn.tm->opcode_modifier == StackOp || insn.tm->opcode_modifier == Rotate)
+ {
+ /* Push, Pop and Rotate instructions */
+ insn.opcode |= (insn.operand_type[0]->reg.opcode << 16);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else if ((insn.tm->operand_types[0] & (Abs24 | Direct)) == (Abs24 | Direct))
+ {
+ /* LDP Instruction needs to be tested for before the next section */
+ if (insn.operand_type[0]->op_type & Direct)
+ {
+ if (insn.operand_type[0]->direct.resolved == 1)
+ {
+ /* Direct addressing uses lower 8 bits of direct address */
+ insn.opcode |= (insn.operand_type[0]->direct.address & 0x00FF0000) >> 16;
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else
+ {
+ fixS *fix;
+ 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. */
+ fix->fx_no_overflow = 1;
+ }
+ }
+ else
+ {
+ if (insn.operand_type[0]->immediate.resolved == 1)
+ {
+ /* Immediate addressing uses upper 8 bits of address */
+ if (insn.operand_type[0]->immediate.u_number > 0x00FFFFFF)
+ {
+ as_bad ("LDP instruction needs a 24-bit operand");
+ return;
+ }
+ insn.opcode |= ((insn.operand_type[0]->immediate.u_number & 0x00FF0000) >> 16);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else
+ {
+ fixS *fix;
+ 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]->immediate.imm_expr, 0, 0);
+ fix->fx_no_overflow = 1;
+ }
+ }
+ }
+ else if (insn.tm->operand_types[0] & (Imm24))
+ {
+ /* Unconditional Branch and Call instructions */
+ if (insn.operand_type[0]->immediate.resolved == 1)
+ {
+ if (insn.operand_type[0]->immediate.u_number > 0x00FFFFFF)
+ as_warn ("first operand is too large for a 24-bit displacement");
+ insn.opcode |= (insn.operand_type[0]->immediate.u_number & 0x00FFFFFF);
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ else
+ {
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ fix_new_exp (frag_now, p + 1 - (frag_now->fr_literal), 3, &insn.operand_type[0]->immediate.imm_expr, 0, 0);
+ }
+ }
+ else if (insn.tm->operand_types[0] & NotReq)
+ {
+ /* 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. */
+ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE);
+ }
+ }
+ debug ("Addressing mode: %08X\n", insn.addressing_mode);
+ {
+ int i;
+ for (i = 0; i < insn.operands; i++)
+ {
+ if (insn.operand_type[i]->immediate.label)
+ free (insn.operand_type[i]->immediate.label);
+ free (insn.operand_type[i]);
+ }
+ }
+ debug ("Final opcode: %08X\n", insn.opcode);
+ debug ("\n");
+}
+
+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. */
+ unsigned p_field; /* Value of p field in multiply add/sub instructions */
+ unsigned opcode; /* Final opcode */
+};
+
+struct tic30_par_insn p_insn;
+
+int
+tic30_parallel_insn (char *token)
+{
+ static partemplate *p_opcode;
+ char *current_posn = token;
+ char *token_start;
+ char save_char;
+
+ debug ("In tic30_parallel_insn with %s\n", token);
+ memset (&p_insn, '\0', sizeof (p_insn));
+ while (is_opcode_char (*current_posn))
+ current_posn++;
+ { /* Find instruction */
+ save_char = *current_posn;
+ *current_posn = '\0';
+ p_opcode = (partemplate *) hash_find (parop_hash, token);
+ if (p_opcode)
+ {
+ debug ("Found instruction %s\n", p_opcode->name);
+ p_insn.tm = p_opcode;
+ }
+ else
+ {
+ char first_opcode[6] =
+ {0};
+ char second_opcode[6] =
+ {0};
+ int i;
+ int current_opcode = -1;
+ int char_ptr = 0;
+
+ for (i = 0; i < strlen (token); i++)
+ {
+ char ch = *(token + i);
+ if (ch == '_' && current_opcode == -1)
+ {
+ current_opcode = 0;
+ continue;
+ }
+ if (ch == '_' && current_opcode == 0)
+ {
+ current_opcode = 1;
+ char_ptr = 0;
+ continue;
+ }
+ switch (current_opcode)
+ {
+ case 0:
+ first_opcode[char_ptr++] = ch;
+ break;
+ case 1:
+ second_opcode[char_ptr++] = ch;
+ break;
+ }
+ }
+ debug ("first_opcode = %s\n", first_opcode);
+ debug ("second_opcode = %s\n", second_opcode);
+ sprintf (token, "q_%s_%s", second_opcode, first_opcode);
+ p_opcode = (partemplate *) hash_find (parop_hash, token);
+ if (p_opcode)
+ {
+ debug ("Found instruction %s\n", p_opcode->name);
+ p_insn.tm = p_opcode;
+ p_insn.swap_operands = 1;
+ }
+ else
+ return 0;
+ }
+ *current_posn = save_char;
+ }
+ { /* Find operands */
+ int paren_not_balanced;
+ int expecting_operand = 0;
+ int found_separator = 0;
+ do
+ {
+ /* skip optional white space before operand */
+ while (!is_operand_char (*current_posn) && *current_posn != END_OF_INSN)
+ {
+ if (!is_space_char (*current_posn) && *current_posn != PARALLEL_SEPARATOR)
+ {
+ as_bad ("Invalid character %s before %s operand",
+ output_invalid (*current_posn),
+ ordinal_names[insn.operands]);
+ return 1;
+ }
+ if (*current_posn == PARALLEL_SEPARATOR)
+ found_separator = 1;
+ current_posn++;
+ }
+ token_start = current_posn; /* after white space */
+ paren_not_balanced = 0;
+ while (paren_not_balanced || *current_posn != ',')
+ {
+ if (*current_posn == END_OF_INSN)
+ {
+ if (paren_not_balanced)
+ {
+ as_bad ("Unbalanced parenthesis in %s operand.",
+ ordinal_names[insn.operands]);
+ return 1;
+ }
+ else
+ break; /* we are done */
+ }
+ else if (*current_posn == PARALLEL_SEPARATOR)
+ {
+ while (is_space_char (*(current_posn - 1)))
+ current_posn--;
+ break;
+ }
+ else if (!is_operand_char (*current_posn) && !is_space_char (*current_posn))
+ {
+ as_bad ("Invalid character %s in %s operand",
+ output_invalid (*current_posn),
+ ordinal_names[insn.operands]);
+ return 1;
+ }
+ if (*current_posn == '(')
+ ++paren_not_balanced;
+ if (*current_posn == ')')
+ --paren_not_balanced;
+ current_posn++;
+ }
+ if (current_posn != token_start)
+ { /* yes, we've read in another operand */
+ p_insn.operands[found_separator]++;
+ if (p_insn.operands[found_separator] > MAX_OPERANDS)
+ {
+ as_bad ("Spurious operands; (%d operands/instruction max)",
+ MAX_OPERANDS);
+ return 1;
+ }
+ /* now parse operand adding info to 'insn' as we go along */
+ save_char = *current_posn;
+ *current_posn = '\0';
+ p_insn.operand_type[found_separator][p_insn.operands[found_separator] - 1] =
+ tic30_operand (token_start);
+ *current_posn = save_char;
+ if (!p_insn.operand_type[found_separator][p_insn.operands[found_separator] - 1])
+ return 1;
+ }
+ else
+ {
+ if (expecting_operand)
+ {
+ as_bad ("Expecting operand after ','; got nothing");
+ return 1;
+ }
+ if (*current_posn == ',')
+ {
+ as_bad ("Expecting operand before ','; got nothing");
+ return 1;
+ }
+ }
+ /* now *current_posn must be either ',' or END_OF_INSN */
+ if (*current_posn == ',')
+ {
+ if (*++current_posn == END_OF_INSN)
+ { /* just skip it, if it's \n complain */
+ as_bad ("Expecting operand after ','; got nothing");
+ return 1;
+ }
+ expecting_operand = 1;
+ }
+ }
+ while (*current_posn != END_OF_INSN); /* until we get end of insn */
+ }
+ if (p_insn.swap_operands)
+ {
+ int temp_num, i;
+ operand *temp_op;
+
+ temp_num = p_insn.operands[0];
+ p_insn.operands[0] = p_insn.operands[1];
+ p_insn.operands[1] = temp_num;
+ for (i = 0; i < MAX_OPERANDS; i++)
+ {
+ temp_op = p_insn.operand_type[0][i];
+ p_insn.operand_type[0][i] = p_insn.operand_type[1][i];
+ p_insn.operand_type[1][i] = temp_op;
+ }
+ }
+ if (p_insn.operands[0] != p_insn.tm->operands_1)
+ {
+ as_bad ("incorrect number of operands given in the first instruction");
+ return 1;
+ }
+ if (p_insn.operands[1] != p_insn.tm->operands_2)
+ {
+ as_bad ("incorrect number of operands given in the second instruction");
+ return 1;
+ }
+ debug ("Number of operands in first insn: %d\n", p_insn.operands[0]);
+ debug ("Number of operands in second insn: %d\n", p_insn.operands[1]);
+ { /* Now check if operands are correct */
+ int count;
+ int num_rn = 0;
+ int num_ind = 0;
+ for (count = 0; count < 2; count++)
+ {
+ int i;
+ for (i = 0; i < p_insn.operands[count]; i++)
+ {
+ if ((p_insn.operand_type[count][i]->op_type &
+ p_insn.tm->operand_types[count][i]) == 0)
+ {
+ as_bad ("%s instruction, operand %d doesn't match", ordinal_names[count], i + 1);
+ return 1;
+ }
+ /* 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. */
+ 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)
+ num_ind++;
+ }
+ }
+ if ((p_insn.tm->operand_types[0][0] & (Indirect | Rn)) == (Indirect | Rn))
+ {
+ /* Check for the multiply instructions */
+ if (num_rn != 2)
+ {
+ as_bad ("incorrect format for multiply parallel instruction");
+ return 1;
+ }
+ if (num_ind != 2)
+ { /* Shouldn't get here */
+ as_bad ("incorrect format for multiply parallel instruction");
+ return 1;
+ }
+ if ((p_insn.operand_type[0][2]->reg.opcode != 0x00) &&
+ (p_insn.operand_type[0][2]->reg.opcode != 0x01))
+ {
+ as_bad ("destination for multiply can only be R0 or R1");
+ return 1;
+ }
+ if ((p_insn.operand_type[1][2]->reg.opcode != 0x02) &&
+ (p_insn.operand_type[1][2]->reg.opcode != 0x03))
+ {
+ as_bad ("destination for add/subtract can only be R2 or R3");
+ return 1;
+ }
+ /* Now determine the P field for the instruction */
+ if (p_insn.operand_type[0][0]->op_type & Indirect)
+ {
+ if (p_insn.operand_type[0][1]->op_type & Indirect)
+ p_insn.p_field = 0x00000000; /* Ind * Ind, Rn +/- Rn */
+ else if (p_insn.operand_type[1][0]->op_type & Indirect)
+ p_insn.p_field = 0x01000000; /* Ind * Rn, Ind +/- Rn */
+ else
+ p_insn.p_field = 0x03000000; /* Ind * Rn, Rn +/- Ind */
+ }
+ else
+ {
+ if (p_insn.operand_type[0][1]->op_type & Rn)
+ p_insn.p_field = 0x02000000; /* Rn * Rn, Ind +/- Ind */
+ else if (p_insn.operand_type[1][0]->op_type & Indirect)
+ {
+ operand *temp;
+ p_insn.p_field = 0x01000000; /* Rn * Ind, Ind +/- Rn */
+ /* Need to swap the two multiply operands around so that everything is in
+ its place for the opcode makeup ie so Ind * Rn, Ind +/- Rn */
+ temp = p_insn.operand_type[0][0];
+ p_insn.operand_type[0][0] = p_insn.operand_type[0][1];
+ p_insn.operand_type[0][1] = temp;
+ }
+ else
+ {
+ operand *temp;
+ p_insn.p_field = 0x03000000; /* Rn * Ind, Rn +/- Ind */
+ temp = p_insn.operand_type[0][0];
+ p_insn.operand_type[0][0] = p_insn.operand_type[0][1];
+ p_insn.operand_type[0][1] = temp;
+ }
+ }
+ }
+ }
+ 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. */
+ {
+ p_insn.opcode = p_insn.tm->base_opcode;
+ switch (p_insn.tm->oporder)
+ {
+ case OO_4op1:
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 22);
+ break;
+ case OO_4op2:
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->reg.opcode << 19);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 22);
+ if (p_insn.operand_type[1][1]->reg.opcode == p_insn.operand_type[0][1]->reg.opcode)
+ as_warn ("loading the same register in parallel operation");
+ break;
+ case OO_4op3:
+ p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->reg.opcode << 22);
+ break;
+ case OO_5op1:
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 19);
+ p_insn.opcode |= (p_insn.operand_type[0][2]->reg.opcode << 22);
+ break;
+ case OO_5op2:
+ p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->reg.opcode << 19);
+ p_insn.opcode |= (p_insn.operand_type[0][2]->reg.opcode << 22);
+ break;
+ case OO_PField:
+ p_insn.opcode |= p_insn.p_field;
+ if (p_insn.operand_type[0][2]->reg.opcode == 0x01)
+ p_insn.opcode |= 0x00800000;
+ if (p_insn.operand_type[1][2]->reg.opcode == 0x03)
+ p_insn.opcode |= 0x00400000;
+ switch (p_insn.p_field)
+ {
+ case 0x00000000:
+ p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->reg.opcode << 16);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 19);
+ break;
+ case 0x01000000:
+ p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->reg.opcode << 16);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 19);
+ break;
+ case 0x02000000:
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 16);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->reg.opcode << 19);
+ break;
+ case 0x03000000:
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.ARnum);
+ p_insn.opcode |= (p_insn.operand_type[1][1]->indirect.mod << 3);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.ARnum << 8);
+ p_insn.opcode |= (p_insn.operand_type[0][0]->indirect.mod << 11);
+ p_insn.opcode |= (p_insn.operand_type[1][0]->reg.opcode << 16);
+ p_insn.opcode |= (p_insn.operand_type[0][1]->reg.opcode << 19);
+ break;
+ }
+ break;
+ }
+ } /* Opcode is finalised at this point for all parallel instructions. */
+ { /* Output opcode */
+ char *p;
+ p = frag_more (INSN_SIZE);
+ md_number_to_chars (p, (valueT) p_insn.opcode, INSN_SIZE);
+ }
+ {
+ int i, j;
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < p_insn.operands[i]; j++)
+ free (p_insn.operand_type[i][j]);
+ }
+ debug ("Final opcode: %08X\n", p_insn.opcode);
+ debug ("\n");
+ return 1;
+}
+
+operand *
+tic30_operand (token)
+ char *token;
+{
+ int count;
+ char ind_buffer[strlen (token)];
+ operand *current_op;
+
+ debug ("In tic30_operand with %s\n", token);
+ current_op = (operand *) malloc (sizeof (operand));
+ memset (current_op, '\0', sizeof (operand));
+ if (*token == DIRECT_REFERENCE)
+ {
+ char *token_posn = token + 1;
+ int direct_label = 0;
+ debug ("Found direct reference\n");
+ while (*token_posn)
+ {
+ if (!is_digit_char (*token_posn))
+ direct_label = 1;
+ token_posn++;
+ }
+ if (direct_label)
+ {
+ char *save_input_line_pointer;
+ segT retval;
+ debug ("Direct reference is a label\n");
+ current_op->direct.label = token + 1;
+ save_input_line_pointer = input_line_pointer;
+ input_line_pointer = token + 1;
+ debug ("Current input_line_pointer: %s\n", input_line_pointer);
+ retval = expression (&current_op->direct.direct_expr);
+ debug ("Expression type: %d\n", current_op->direct.direct_expr.X_op);
+ debug ("Expression addnum: %d\n", current_op->direct.direct_expr.X_add_number);
+ debug ("Segment: %d\n", retval);
+ input_line_pointer = save_input_line_pointer;
+ if (current_op->direct.direct_expr.X_op == O_constant)
+ {
+ current_op->direct.address = current_op->direct.direct_expr.X_add_number;
+ current_op->direct.resolved = 1;
+ }
+ }
+ else
+ {
+ debug ("Direct reference is a number\n");
+ current_op->direct.address = atoi (token + 1);
+ current_op->direct.resolved = 1;
+ }
+ current_op->op_type = Direct;
+ }
+ else if (*token == INDIRECT_REFERENCE)
+ { /* Indirect reference operand */
+ int found_ar = 0;
+ int found_disp = 0;
+ int ar_number = -1;
+ int disp_number = 0;
+ int buffer_posn = 1;
+ ind_addr_type *ind_addr_op;
+ debug ("Found indirect reference\n");
+ ind_buffer[0] = *token;
+ for (count = 1; count < strlen (token); count++)
+ { /* Strip operand */
+ ind_buffer[buffer_posn] = tolower (*(token + count));
+ if ((*(token + count - 1) == 'a' || *(token + count - 1) == 'A') &&
+ (*(token + count) == 'r' || *(token + count) == 'R'))
+ {
+ /* AR reference is found, so get its number and remove it from the buffer
+ so it can pass through hash_find() */
+ if (found_ar)
+ {
+ as_bad ("More than one AR register found in indirect reference");
+ return NULL;
+ }
+ if (*(token + count + 1) < '0' || *(token + count + 1) > '7')
+ {
+ as_bad ("Illegal AR register in indirect reference");
+ return NULL;
+ }
+ ar_number = *(token + count + 1) - '0';
+ found_ar = 1;
+ count++;
+ }
+ if (*(token + count) == '(')
+ {
+ /* Parenthesis found, so check if a displacement value is inside. If so, get
+ the value and remove it from the buffer. */
+ if (is_digit_char (*(token + count + 1)))
+ {
+ char disp[10];
+ int disp_posn = 0;
+
+ if (found_disp)
+ {
+ as_bad ("More than one displacement found in indirect reference");
+ return NULL;
+ }
+ count++;
+ while (*(token + count) != ')')
+ {
+ if (!is_digit_char (*(token + count)))
+ {
+ as_bad ("Invalid displacement in indirect reference");
+ return NULL;
+ }
+ disp[disp_posn++] = *(token + (count++));
+ }
+ disp[disp_posn] = '\0';
+ disp_number = atoi (disp);
+ count--;
+ found_disp = 1;
+ }
+ }
+ buffer_posn++;
+ }
+ ind_buffer[buffer_posn] = '\0';
+ if (!found_ar)
+ {
+ as_bad ("AR register not found in indirect reference");
+ return NULL;
+ }
+ ind_addr_op = (ind_addr_type *) hash_find (ind_hash, ind_buffer);
+ if (ind_addr_op)
+ {
+ debug ("Found indirect reference: %s\n", ind_addr_op->syntax);
+ if (ind_addr_op->displacement == IMPLIED_DISP)
+ {
+ found_disp = 1;
+ disp_number = 1;
+ }
+ else if ((ind_addr_op->displacement == DISP_REQUIRED) && !found_disp)
+ {
+ /* Maybe an implied displacement of 1 again */
+ as_bad ("required displacement wasn't given in indirect reference");
+ return 0;
+ }
+ }
+ else
+ {
+ as_bad ("illegal indirect reference");
+ return NULL;
+ }
+ if (found_disp && (disp_number < 0 || disp_number > 255))
+ {
+ as_bad ("displacement must be an unsigned 8-bit number");
+ return NULL;
+ }
+ current_op->indirect.mod = ind_addr_op->modfield;
+ current_op->indirect.disp = disp_number;
+ current_op->indirect.ARnum = ar_number;
+ current_op->op_type = Indirect;
+ }
+ else
+ {
+ reg *regop = (reg *) hash_find (reg_hash, token);
+ if (regop)
+ {
+ debug ("Found register operand: %s\n", regop->name);
+ if (regop->regtype == REG_ARn)
+ current_op->op_type = ARn;
+ else if (regop->regtype == REG_Rn)
+ current_op->op_type = Rn;
+ else if (regop->regtype == REG_DP)
+ current_op->op_type = DPReg;
+ else
+ current_op->op_type = OtherReg;
+ current_op->reg.opcode = regop->opcode;
+ }
+ else
+ {
+ if (!is_digit_char (*token) || *(token + 1) == 'x' || strchr (token, 'h'))
+ {
+ char *save_input_line_pointer;
+ segT retval;
+ debug ("Probably a label: %s\n", token);
+ current_op->immediate.label = (char *) malloc (strlen (token) + 1);
+ strcpy (current_op->immediate.label, token);
+ current_op->immediate.label[strlen (token)] = '\0';
+ save_input_line_pointer = input_line_pointer;
+ input_line_pointer = token;
+ debug ("Current input_line_pointer: %s\n", input_line_pointer);
+ retval = expression (&current_op->immediate.imm_expr);
+ debug ("Expression type: %d\n", current_op->immediate.imm_expr.X_op);
+ debug ("Expression addnum: %d\n", current_op->immediate.imm_expr.X_add_number);
+ debug ("Segment: %d\n", retval);
+ input_line_pointer = save_input_line_pointer;
+ if (current_op->immediate.imm_expr.X_op == O_constant)
+ {
+ current_op->immediate.s_number = current_op->immediate.imm_expr.X_add_number;
+ current_op->immediate.u_number = (unsigned int) current_op->immediate.imm_expr.X_add_number;
+ current_op->immediate.resolved = 1;
+ }
+ }
+ else
+ {
+ unsigned count;
+ debug ("Found a number or displacement\n");
+ for (count = 0; count < strlen (token); count++)
+ if (*(token + count) == '.')
+ current_op->immediate.decimal_found = 1;
+ current_op->immediate.label = (char *) malloc (strlen (token) + 1);
+ strcpy (current_op->immediate.label, token);
+ current_op->immediate.label[strlen (token)] = '\0';
+ current_op->immediate.f_number = (float) atof (token);
+ current_op->immediate.s_number = (int) atoi (token);
+ current_op->immediate.u_number = (unsigned int) atoi (token);
+ current_op->immediate.resolved = 1;
+ }
+ current_op->op_type = Disp | Abs24 | Imm16 | Imm24;
+ if (current_op->immediate.u_number >= 0 && current_op->immediate.u_number <= 31)
+ current_op->op_type |= IVector;
+ }
+ }
+ return current_op;
+}
+
+/* next_line points to the next line after the current instruction (current_line).
+ Search for the parallel bars, and if found, merge two lines into internal syntax
+ for a parallel instruction:
+ q_[INSN1]_[INSN2] [OPERANDS1] | [OPERANDS2]
+ By this stage, all comments are scrubbed, and only the bare lines are given.
+ */
+
+#define NONE 0
+#define START_OPCODE 1
+#define END_OPCODE 2
+#define START_OPERANDS 3
+#define END_OPERANDS 4
+
+char *
+tic30_find_parallel_insn (current_line, next_line)
+ char *current_line;
+ char *next_line;
+{
+ int found_parallel = 0;
+ char first_opcode[256];
+ char second_opcode[256];
+ char first_operands[256];
+ char second_operands[256];
+ char *parallel_insn;
+
+ debug ("In tic30_find_parallel_insn()\n");
+ while (!is_end_of_line[(int) *next_line])
+ {
+ if (*next_line == PARALLEL_SEPARATOR && *(next_line + 1) == PARALLEL_SEPARATOR)
+ {
+ found_parallel = 1;
+ next_line++;
+ break;
+ }
+ next_line++;
+ }
+ if (!found_parallel)
+ return NULL;
+ debug ("Found a parallel instruction\n");
+ {
+ int i;
+ char *opcode, *operands, *line;
+
+ for (i = 0; i < 2; i++)
+ {
+ if (i == 0)
+ {
+ opcode = &first_opcode[0];
+ operands = &first_operands[0];
+ line = current_line;
+ }
+ else
+ {
+ opcode = &second_opcode[0];
+ operands = &second_operands[0];
+ line = next_line;
+ }
+ {
+ int search_status = NONE;
+ int char_ptr = 0;
+ char c;
+
+ while (!is_end_of_line[(int) (c = *line)] && *line)
+ {
+ if (is_opcode_char (c) && search_status == NONE)
+ {
+ opcode[char_ptr++] = tolower (c);
+ search_status = START_OPCODE;
+ }
+ else if (is_opcode_char (c) && search_status == START_OPCODE)
+ {
+ opcode[char_ptr++] = tolower (c);
+ }
+ else if (!is_opcode_char (c) && search_status == START_OPCODE)
+ {
+ opcode[char_ptr] = '\0';
+ char_ptr = 0;
+ search_status = END_OPCODE;
+ }
+ else if (is_operand_char (c) && search_status == START_OPERANDS)
+ {
+ operands[char_ptr++] = c;
+ }
+ if (is_operand_char (c) && search_status == END_OPCODE)
+ {
+ operands[char_ptr++] = c;
+ search_status = START_OPERANDS;
+ }
+ line++;
+ }
+ if (search_status != START_OPERANDS)
+ return NULL;
+ operands[char_ptr] = '\0';
+ }
+ }
+ }
+ parallel_insn = (char *) malloc (strlen (first_opcode) + strlen (first_operands) +
+ strlen (second_opcode) + strlen (second_operands) + 8);
+ sprintf (parallel_insn, "q_%s_%s %s | %s", first_opcode, second_opcode, first_operands, second_operands);
+ debug ("parallel insn = %s\n", parallel_insn);
+ return parallel_insn;
+}
+
+#undef NONE
+#undef START_OPCODE
+#undef END_OPCODE
+#undef START_OPERANDS
+#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. */
+
+int
+tic30_unrecognized_line (c)
+ int c;
+{
+ debug ("In tc_unrecognized_line\n");
+ return (c == PARALLEL_SEPARATOR);
+}
+
+int
+md_estimate_size_before_relax (fragP, segment)
+ fragS *fragP;
+ segT segment;
+{
+ debug ("In md_estimate_size_before_relax()\n");
+ return 0;
+}
+
+void
+md_convert_frag (abfd, sec, fragP)
+ bfd *abfd;
+ segT sec;
+ register fragS *fragP;
+{
+ debug ("In md_convert_frag()\n");
+}
+
+void
+md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
+ char *ptr;
+ addressT from_addr, to_addr;
+ fragS *frag;
+ symbolS *to_symbol;
+{
+ debug ("In md_create_short_jump()\n");
+}
+
+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;
+{
+ debug ("In md_create_long_jump()\n");
+}
+
+int
+md_apply_fix (fixP, valP)
+ fixS *fixP;
+ valueT *valP;
+{
+ valueT value = *valP;
+
+ debug ("In md_apply_fix() with value = %ld\n", (long) value);
+ debug ("Values in fixP\n");
+ debug ("fx_size = %d\n", fixP->fx_size);
+ debug ("fx_pcrel = %d\n", fixP->fx_pcrel);
+ debug ("fx_where = %d\n", fixP->fx_where);
+ debug ("fx_offset = %d\n", (int) fixP->fx_offset);
+ {
+ char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
+ value /= INSN_SIZE;
+ if (fixP->fx_size == 1)
+ { /* Special fix for LDP instruction. */
+ value = (value & 0x00FF0000) >> 16;
+ }
+ debug ("new value = %ld\n", (long) value);
+ md_number_to_chars (buf, value, fixP->fx_size);
+ }
+ return 1;
+}
+
+int
+md_parse_option (c, arg)
+ int c;
+ char *arg;
+{
+ int i;
+
+ debug ("In md_parse_option()\n");
+ for (i = 0; i < c; i++)
+ {
+ printf ("%c\n", arg[c]);
+ }
+ return 0;
+}
+
+void
+md_show_usage (stream)
+ FILE *stream;
+{
+ debug ("In md_show_usage()\n");
+}
+
+symbolS *
+md_undefined_symbol (name)
+ char *name;
+{
+ debug ("In md_undefined_symbol()\n");
+ return (symbolS *) 0;
+}
+
+valueT
+md_section_align (segment, size)
+ segT segment;
+ valueT size;
+{
+ debug ("In md_section_align() segment = %d and size = %d\n", segment, size);
+ size = (size + 3) / 4;
+ size *= 4;
+ debug ("New size value = %d\n", size);
+ return size;
+}
+
+long
+md_pcrel_from (fixP)
+ fixS *fixP;
+{
+ int offset;
+
+ debug ("In md_pcrel_from()\n");
+ debug ("fx_where = %d\n", fixP->fx_where);
+ 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. */
+ if (fixP->fx_frag->fr_literal[fixP->fx_where - fixP->fx_size + 1] & 0x20)
+ offset = 3;
+ else
+ offset = 1;
+ debug ("offset = %d\n", offset);
+ /* PC Relative instructions have a format:
+ displacement = Label - (PC + offset)
+ This function returns PC + offset where:
+ fx_where - fx_size = PC
+ INSN_SIZE * offset = offset number of instructions
+ */
+ return fixP->fx_where - fixP->fx_size + (INSN_SIZE * offset);
+}
+
+char *
+md_atof (what_statement_type, literalP, sizeP)
+ int what_statement_type;
+ char *literalP;
+ int *sizeP;
+{
+ int prec;
+ char *token;
+ char keepval;
+ unsigned long value;
+ /* char *atof_ieee (); */
+ float float_value;
+ debug ("In md_atof()\n");
+ debug ("precision = %c\n", what_statement_type);
+ 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 != ','))
+ {
+ debug ("%c", *input_line_pointer);
+ input_line_pointer++;
+ }
+ keepval = *input_line_pointer;
+ *input_line_pointer = '\0';
+ debug ("\n");
+ float_value = (float) atof (token);
+ *input_line_pointer = keepval;
+ debug ("float_value = %f\n", float_value);
+ switch (what_statement_type)
+ {
+ case 'f':
+ case 'F':
+ case 's':
+ case 'S':
+ prec = 2;
+ break;
+
+ case 'd':
+ case 'D':
+ case 'r':
+ case 'R':
+ prec = 4;
+ break;
+
+ default:
+ *sizeP = 0;
+ return "Bad call to MD_ATOF()";
+ }
+ if (float_value == 0.0)
+ {
+ value = (prec == 2) ? 0x00008000L : 0x80000000L;
+ }
+ else
+ {
+ unsigned long exp, sign, mant, tmsfloat;
+ tmsfloat = *((long *) &float_value);
+ sign = tmsfloat & 0x80000000;
+ mant = tmsfloat & 0x007FFFFF;
+ exp = tmsfloat & 0x7F800000;
+ exp <<= 1;
+ if (exp == 0xFF000000)
+ {
+ if (mant == 0)
+ value = 0x7F7FFFFF;
+ else if (sign == 0)
+ value = 0x7F7FFFFF;
+ else
+ value = 0x7F800000;
+ }
+ else
+ {
+ exp -= 0x7F000000;
+ if (sign)
+ {
+ mant = mant & 0x007FFFFF;
+ mant = -mant;
+ mant = mant & 0x00FFFFFF;
+ if (mant == 0)
+ {
+ mant |= 0x00800000;
+ exp = (long) exp - 0x01000000;
+ }
+ }
+ tmsfloat = exp | mant;
+ value = tmsfloat;
+ }
+ if (prec == 2)
+ {
+ long exp, mant;
+
+ if (tmsfloat == 0x80000000)
+ {
+ value = 0x8000;
+ }
+ else
+ {
+ value = 0;
+ exp = (tmsfloat & 0xFF000000);
+ exp >>= 24;
+ mant = tmsfloat & 0x007FFFFF;
+ if (tmsfloat & 0x00800000)
+ {
+ mant |= 0xFF000000;
+ mant += 0x00000800;
+ mant >>= 12;
+ mant |= 0x00000800;
+ mant &= 0x0FFF;
+ if (exp > 7)
+ value = 0x7800;
+ }
+ else
+ {
+ mant |= 0x00800000;
+ mant += 0x00000800;
+ exp += (mant >> 24);
+ mant >>= 12;
+ mant &= 0x07FF;
+ if (exp > 7)
+ value = 0x77FF;
+ }
+ if (exp < -8)
+ value = 0x8000;
+ if (value == 0)
+ {
+ mant = (exp << 12) | mant;
+ value = mant & 0xFFFF;
+ }
+ }
+ }
+ }
+ md_number_to_chars (literalP, value, prec);
+ *sizeP = prec;
+ return 0;
+}
+
+void
+md_number_to_chars (buf, val, n)
+ char *buf;
+ valueT val;
+ int n;
+{
+ debug ("In md_number_to_chars()\n");
+ number_to_chars_bigendian (buf, val, n);
+ /* number_to_chars_littleendian(buf,val,n); */
+}
+
+#define F(SZ,PCREL) (((SZ) << 1) + (PCREL))
+#define MAP(SZ,PCREL,TYPE) case F(SZ,PCREL): code = (TYPE); break
+
+arelent *
+tc_gen_reloc (section, fixP)
+ asection *section;
+ fixS *fixP;
+{
+ arelent *rel;
+ bfd_reloc_code_real_type code = 0;
+
+ debug ("In tc_gen_reloc()\n");
+ debug ("fixP.size = %d\n", fixP->fx_size);
+ debug ("fixP.pcrel = %d\n", fixP->fx_pcrel);
+ debug ("addsy.name = %s\n", S_GET_NAME (fixP->fx_addsy));
+ switch (F (fixP->fx_size, fixP->fx_pcrel))
+ {
+ MAP (1, 0, BFD_RELOC_TIC30_LDP);
+ MAP (2, 0, BFD_RELOC_16);
+ MAP (3, 0, BFD_RELOC_24);
+ MAP (2, 1, BFD_RELOC_16_PCREL);
+ MAP (4, 0, BFD_RELOC_32);
+ default:
+ as_bad ("Can not do %d byte %srelocation", fixP->fx_size,
+ fixP->fx_pcrel ? "pc-relative " : "");
+ }
+#undef MAP
+#undef F
+
+ rel = (arelent *) xmalloc (sizeof (arelent));
+ assert (rel != 0);
+ rel->sym_ptr_ptr = &fixP->fx_addsy->bsym;
+ rel->address = fixP->fx_frag->fr_address + fixP->fx_where;
+ if (fixP->fx_pcrel)
+ rel->addend = fixP->fx_addnumber;
+ else
+ rel->addend = 0;
+ rel->howto = bfd_reloc_type_lookup (stdoutput, code);
+ if (!rel->howto)
+ {
+ const char *name;
+ name = S_GET_NAME (fixP->fx_addsy);
+ if (name == NULL)
+ name = "<unknown>";
+ as_fatal ("Cannot generate relocation type for symbol %s, code %s", name, bfd_get_reloc_code_name (code));
+ }
+ return rel;
+}
+
+void
+tc_aout_pre_write_hook ()
+{
+ debug ("In tc_aout_pre_write_hook()\n");
+}
+
+void
+md_operand (expressionP)
+ expressionS *expressionP;
+{
+ debug ("In md_operand()\n");
+}
+
+char output_invalid_buf[8];
+
+char *
+output_invalid (c)
+ char c;
+{
+ if (isprint (c))
+ sprintf (output_invalid_buf, "'%c'", c);
+ else
+ sprintf (output_invalid_buf, "(0x%x)", (unsigned) c);
+ return output_invalid_buf;
+}
diff --git a/contrib/binutils/gas/config/tc-tic30.h b/contrib/binutils/gas/config/tc-tic30.h
new file mode 100644
index 0000000..2fb9cb6
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-tic30.h
@@ -0,0 +1,53 @@
+/* tc-tic30.h -- Header file for tc-tic30.c
+ Copyright (C) 1998 Free Software Foundation.
+ Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
+
+ 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. */
+
+#ifndef _TC_TIC30_H_
+#define _TC_TIC30_H_
+
+#define TC_TIC30 1
+
+#ifdef OBJ_AOUT
+#define TARGET_FORMAT "a.out-tic30"
+#endif
+
+#define TARGET_ARCH bfd_arch_tic30
+#define TARGET_BYTES_BIG_ENDIAN 1
+
+char *output_invalid PARAMS ((int c));
+
+#define END_OF_INSN '\0'
+#define MAX_OPERANDS 6
+#define DIRECT_REFERENCE '@'
+#define INDIRECT_REFERENCE '*'
+#define PARALLEL_SEPARATOR '|'
+#define INSN_SIZE 4
+
+/* 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. */
+#define USE_STDOUT 0
+
+#define tc_unrecognized_line tic30_unrecognized_line
+
+extern int tic30_unrecognized_line PARAMS ((int));
+
+#endif
diff --git a/contrib/binutils/gas/config/tc-v850.c b/contrib/binutils/gas/config/tc-v850.c
new file mode 100644
index 0000000..18ec114
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-v850.c
@@ -0,0 +1,1902 @@
+/* tc-v850.c -- Assembler code for the NEC V850
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation.
+
+ 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. */
+
+#include <stdio.h>
+#include <ctype.h>
+#include "as.h"
+#include "subsegs.h"
+#include "opcode/v850.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)
+
+/* Temporarily holds the reloc in a cons expression. */
+static bfd_reloc_code_real_type hold_cons_reloc;
+
+/* 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;
+
+/* Indicates the target processor(s) for the assemble. */
+static unsigned int processor_mask = -1;
+
+
+/* Structure to hold information about predefined registers. */
+struct reg_name
+{
+ const char * name;
+ int value;
+};
+
+/* Generic assembler global variables which must be defined by all targets. */
+
+/* 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
+ single line. */
+const char line_separator_chars[] = ";";
+
+/* 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,
+ as in 0d1.0. */
+const char FLT_CHARS[] = "dD";
+
+
+const relax_typeS md_relax_table[] =
+{
+ /* Conditional branches. */
+ {0xff, -0x100, 2, 1},
+ {0x1fffff, -0x200000, 6, 0},
+ /* Unconditional branches. */
+ {0xff, -0x100, 2, 3},
+ {0x1fffff, -0x200000, 4, 0},
+};
+
+
+static segT sdata_section = NULL;
+static segT tdata_section = NULL;
+static segT zdata_section = NULL;
+static segT sbss_section = NULL;
+static segT tbss_section = NULL;
+static segT zbss_section = NULL;
+static segT rosdata_section = NULL;
+static segT rozdata_section = NULL;
+static segT scommon_section = NULL;
+static segT tcommon_section = NULL;
+static segT zcommon_section = NULL;
+
+/* fixups */
+#define MAX_INSN_FIXUPS (5)
+struct v850_fixup
+{
+ expressionS exp;
+ int opindex;
+ bfd_reloc_code_real_type reloc;
+};
+
+struct v850_fixup fixups [MAX_INSN_FIXUPS];
+static int fc;
+
+
+void
+v850_sdata (int ignore)
+{
+ obj_elf_section_change_hook();
+
+ subseg_set (sdata_section, (subsegT) get_absolute_expression ());
+
+ demand_empty_rest_of_line ();
+}
+
+void
+v850_tdata (int ignore)
+{
+ obj_elf_section_change_hook();
+
+ subseg_set (tdata_section, (subsegT) get_absolute_expression ());
+
+ demand_empty_rest_of_line ();
+}
+
+void
+v850_zdata (int ignore)
+{
+ obj_elf_section_change_hook();
+
+ subseg_set (zdata_section, (subsegT) get_absolute_expression ());
+
+ demand_empty_rest_of_line ();
+}
+
+void
+v850_sbss (int ignore)
+{
+ obj_elf_section_change_hook();
+
+ subseg_set (sbss_section, (subsegT) get_absolute_expression ());
+
+ demand_empty_rest_of_line ();
+}
+
+void
+v850_tbss (int ignore)
+{
+ obj_elf_section_change_hook();
+
+ subseg_set (tbss_section, (subsegT) get_absolute_expression ());
+
+ demand_empty_rest_of_line ();
+}
+
+void
+v850_zbss (int ignore)
+{
+ obj_elf_section_change_hook();
+
+ subseg_set (zbss_section, (subsegT) get_absolute_expression ());
+
+ demand_empty_rest_of_line ();
+}
+
+void
+v850_rosdata (int ignore)
+{
+ obj_elf_section_change_hook();
+
+ subseg_set (rosdata_section, (subsegT) get_absolute_expression ());
+
+ demand_empty_rest_of_line ();
+}
+
+void
+v850_rozdata (int ignore)
+{
+ obj_elf_section_change_hook();
+
+ subseg_set (rozdata_section, (subsegT) get_absolute_expression ());
+
+ demand_empty_rest_of_line ();
+}
+
+
+void
+v850_bss (int ignore)
+{
+ register int temp = get_absolute_expression ();
+
+ obj_elf_section_change_hook();
+
+ subseg_set (bss_section, (subsegT) temp);
+
+ demand_empty_rest_of_line ();
+}
+
+void
+v850_offset (int ignore)
+{
+ int temp = get_absolute_expression ();
+
+ 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 */
+static void
+v850_comm (area)
+ int area;
+{
+ char * name;
+ char c;
+ char * p;
+ int temp;
+ int size;
+ symbolS * symbolP;
+ int have_align;
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ /* 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 ',' */
+ if ((temp = get_absolute_expression ()) < 0)
+ {
+ 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)
+ {
+ as_warn ("Length of .comm \"%s\" is already %ld. Not changed to %d.",
+ S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
+ }
+ }
+ know (symbolP->sy_frag == &zero_address_frag);
+ if (*input_line_pointer != ',')
+ have_align = 0;
+ else
+ {
+ have_align = 1;
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+ }
+ if (! have_align || *input_line_pointer != '"')
+ {
+ if (! have_align)
+ temp = 0;
+ else
+ {
+ temp = get_absolute_expression ();
+ if (temp < 0)
+ {
+ temp = 0;
+ as_warn ("Common alignment negative; 0 assumed");
+ }
+ }
+ if (symbolP->local)
+ {
+ segT old_sec;
+ int old_subsec;
+ char * pfrag;
+ int align;
+
+ /* allocate_bss: */
+ old_sec = now_seg;
+ old_subsec = now_subseg;
+ if (temp)
+ {
+ /* 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");
+ ignore_rest_of_line ();
+ return;
+ }
+ }
+ else
+ align = 0;
+ switch (area)
+ {
+ case AREA_SDA:
+ record_alignment (sbss_section, align);
+ obj_elf_section_change_hook();
+ subseg_set (sbss_section, 0);
+ break;
+
+ case AREA_ZDA:
+ record_alignment (zbss_section, align);
+ obj_elf_section_change_hook();
+ subseg_set (zbss_section, 0);
+ break;
+
+ case AREA_TDA:
+ record_alignment (tbss_section, align);
+ obj_elf_section_change_hook();
+ subseg_set (tbss_section, 0);
+ break;
+
+ default:
+ abort();
+ }
+
+ if (align)
+ frag_align (align, 0, 0);
+
+ switch (area)
+ {
+ case AREA_SDA:
+ if (S_GET_SEGMENT (symbolP) == sbss_section)
+ symbolP->sy_frag->fr_symbol = 0;
+ break;
+
+ case AREA_ZDA:
+ if (S_GET_SEGMENT (symbolP) == zbss_section)
+ symbolP->sy_frag->fr_symbol = 0;
+ break;
+
+ case AREA_TDA:
+ if (S_GET_SEGMENT (symbolP) == tbss_section)
+ symbolP->sy_frag->fr_symbol = 0;
+ break;
+
+ default:
+ abort();
+ }
+
+ symbolP->sy_frag = 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();
+ }
+
+ S_CLEAR_EXTERNAL (symbolP);
+ obj_elf_section_change_hook();
+ subseg_set (old_sec, old_subsec);
+ }
+ else
+ {
+ allocate_common:
+ S_SET_VALUE (symbolP, (valueT) size);
+ S_SET_ALIGN (symbolP, temp);
+ S_SET_EXTERNAL (symbolP);
+
+ switch (area)
+ {
+ case AREA_SDA: S_SET_SEGMENT (symbolP, scommon_section); break;
+ case AREA_ZDA: S_SET_SEGMENT (symbolP, zcommon_section); break;
+ case AREA_TDA: S_SET_SEGMENT (symbolP, tcommon_section); break;
+ default:
+ 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))
+ {
+ while (*--input_line_pointer != '"')
+ ;
+ input_line_pointer--;
+ goto bad_common_segment;
+ }
+ while (*input_line_pointer++ != '"')
+ ;
+ goto allocate_common;
+ }
+
+ symbolP->bsym->flags |= BSF_OBJECT;
+
+ demand_empty_rest_of_line ();
+ return;
+
+ {
+ bad_common_segment:
+ p = input_line_pointer;
+ while (*p && *p != '\n')
+ p++;
+ c = *p;
+ *p = '\0';
+ as_bad ("bad .common segment %s", input_line_pointer + 1);
+ *p = c;
+ input_line_pointer = p;
+ ignore_rest_of_line ();
+ return;
+ }
+}
+
+void
+set_machine (int number)
+{
+ machine = number;
+ bfd_set_arch_mach (stdoutput, TARGET_ARCH, machine);
+
+ switch (machine)
+ {
+ case 0: processor_mask = PROCESSOR_V850; break;
+ }
+}
+
+/* The target specific pseudo-ops which we support. */
+const pseudo_typeS md_pseudo_table[] =
+{
+ {"sdata", v850_sdata, 0},
+ {"tdata", v850_tdata, 0},
+ {"zdata", v850_zdata, 0},
+ {"sbss", v850_sbss, 0},
+ {"tbss", v850_tbss, 0},
+ {"zbss", v850_zbss, 0},
+ {"rosdata", v850_rosdata, 0},
+ {"rozdata", v850_rozdata, 0},
+ {"bss", v850_bss, 0},
+ {"offset", v850_offset, 0},
+ {"word", cons, 4},
+ {"zcomm", v850_comm, AREA_ZDA},
+ {"scomm", v850_comm, AREA_SDA},
+ {"tcomm", v850_comm, AREA_TDA},
+ {"v850", set_machine, 0},
+ { 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[] =
+{
+ { "ep", 30 }, /* ep - element ptr */
+ { "gp", 4 }, /* gp - global ptr */
+ { "hp", 2 }, /* hp - handler stack ptr */
+ { "lp", 31 }, /* lp - link ptr */
+ { "r0", 0 },
+ { "r1", 1 },
+ { "r10", 10 },
+ { "r11", 11 },
+ { "r12", 12 },
+ { "r13", 13 },
+ { "r14", 14 },
+ { "r15", 15 },
+ { "r16", 16 },
+ { "r17", 17 },
+ { "r18", 18 },
+ { "r19", 19 },
+ { "r2", 2 },
+ { "r20", 20 },
+ { "r21", 21 },
+ { "r22", 22 },
+ { "r23", 23 },
+ { "r24", 24 },
+ { "r25", 25 },
+ { "r26", 26 },
+ { "r27", 27 },
+ { "r28", 28 },
+ { "r29", 29 },
+ { "r3", 3 },
+ { "r30", 30 },
+ { "r31", 31 },
+ { "r4", 4 },
+ { "r5", 5 },
+ { "r6", 6 },
+ { "r7", 7 },
+ { "r8", 8 },
+ { "r9", 9 },
+ { "sp", 3 }, /* sp - stack ptr */
+ { "tp", 5 }, /* tp - text ptr */
+ { "zero", 0 },
+};
+#define REG_NAME_CNT (sizeof (pre_defined_registers) / sizeof (struct reg_name))
+
+
+static const struct reg_name system_registers[] =
+{
+ { "ecr", 4 },
+ { "eipc", 0 },
+ { "eipsw", 1 },
+ { "fepc", 2 },
+ { "fepsw", 3 },
+ { "psw", 5 },
+};
+#define SYSREG_NAME_CNT (sizeof (system_registers) / sizeof (struct reg_name))
+
+
+static const struct reg_name cc_names[] =
+{
+ { "c", 0x1 },
+ { "e", 0x2 },
+ { "ge", 0xe },
+ { "gt", 0xf },
+ { "h", 0xb },
+ { "l", 0x1 },
+ { "le", 0x7 },
+ { "lt", 0x6 },
+ { "n", 0x4 },
+ { "nc", 0x9 },
+ { "ne", 0xa },
+ { "nh", 0x3 },
+ { "nl", 0x9 },
+ { "ns", 0xc },
+ { "nv", 0x8 },
+ { "nz", 0xa },
+ { "p", 0xc },
+ { "s", 0x4 },
+ { "sa", 0xd },
+ { "t", 0x5 },
+ { "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. */
+
+static int
+reg_name_search (regs, regcount, name, accept_numbers)
+ const struct reg_name * regs;
+ int regcount;
+ const char * name;
+ boolean accept_numbers;
+{
+ int middle, low, high;
+ int cmp;
+ symbolS * symbolP;
+
+ /* If the register name is a symbol, then evaluate it. */
+ if ((symbolP = symbol_find (name)) != NULL)
+ {
+ /* If the symbol is an alias for another name then use that.
+ If the symbol is an alias for a number, then return the number. */
+ if (symbolP->sy_value.X_op == O_symbol)
+ {
+ name = S_GET_NAME (symbolP->sy_value.X_add_symbol);
+ }
+ else if (accept_numbers)
+ {
+ int reg = S_GET_VALUE (symbolP);
+
+ if (reg >= 0 && reg <= 31)
+ return reg;
+ }
+ }
+
+ low = 0;
+ high = regcount - 1;
+
+ do
+ {
+ middle = (low + high) / 2;
+ cmp = strcasecmp (name, regs[middle].name);
+ if (cmp < 0)
+ high = middle - 1;
+ else if (cmp > 0)
+ low = middle + 1;
+ else
+ return regs[middle].value;
+ }
+ while (low <= high);
+ return -1;
+}
+
+
+/* Summary of register_name().
+ *
+ * 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.
+ */
+static boolean
+register_name (expressionP)
+ expressionS * expressionP;
+{
+ int reg_number;
+ char * name;
+ char * start;
+ char c;
+
+ /* Find the spelling of the operand */
+ start = name = input_line_pointer;
+
+ c = get_symbol_end ();
+
+ 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)
+ {
+ 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;
+
+ return true;
+ }
+ else
+ {
+ /* 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.
+ *
+ * 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.
+ */
+static boolean
+system_register_name (expressionP, accept_numbers
+ )
+ expressionS * expressionP;
+ boolean accept_numbers;
+{
+ int reg_number;
+ char * name;
+ char * start;
+ char c;
+
+ /* 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 */
+
+ if (reg_number < 0
+ && accept_numbers)
+ {
+ input_line_pointer = start; /* reset 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 = -1;
+ }
+ }
+ }
+
+ /* 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 */
+ expressionP->X_add_symbol = NULL;
+ expressionP->X_op_symbol = NULL;
+
+ return true;
+ }
+ else
+ {
+ /* 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.
+ *
+ * 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.
+ */
+static boolean
+cc_name (expressionP)
+ expressionS * expressionP;
+{
+ int reg_number;
+ char * name;
+ char * start;
+ char c;
+
+ /* 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)
+ {
+ expressionP->X_op = O_constant;
+ expressionP->X_add_number = reg_number;
+
+ /* 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 */
+ input_line_pointer = start;
+
+ return false;
+ }
+}
+
+static void
+skip_white_space (void)
+{
+ while ( * input_line_pointer == ' '
+ || * input_line_pointer == '\t')
+ ++ input_line_pointer;
+}
+
+
+CONST char * md_shortopts = "m:";
+
+struct option md_longopts[] =
+{
+ {NULL, no_argument, NULL, 0}
+};
+size_t md_longopts_size = sizeof md_longopts;
+
+
+void
+md_show_usage (stream)
+ FILE * stream;
+{
+ fprintf (stream, "V850 options:\n");
+ fprintf (stream, "\t-mwarn-signed-overflow Warn if signed immediate values overflow\n");
+ fprintf (stream, "\t-mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n");
+ fprintf (stream, "\t-mv850 The code is targeted at the v850\n");
+}
+
+int
+md_parse_option (c, arg)
+ int c;
+ char * arg;
+{
+ if (c != 'm')
+ {
+ fprintf (stderr, "unknown command line option: -%c%s\n", c, arg);
+ return 0;
+ }
+
+ if (strcmp (arg, "warn-signed-overflow") == 0)
+ {
+ warn_signed_overflows = TRUE;
+ }
+ else if (strcmp (arg, "warn-unsigned-overflow") == 0)
+ {
+ warn_unsigned_overflows = TRUE;
+ }
+ else if (strcmp (arg, "v850") == 0)
+ {
+ machine = 0;
+ processor_mask = PROCESSOR_V850;
+ }
+ else
+ {
+ fprintf (stderr, "unknown command line option: -%c%s\n", c, arg);
+ return 0;
+ }
+
+ return 1;
+}
+
+symbolS *
+md_undefined_symbol (name)
+ char * name;
+{
+ return 0;
+}
+
+char *
+md_atof (type, litp, sizep)
+ int type;
+ char * litp;
+ int * sizep;
+{
+ int prec;
+ LITTLENUM_TYPE words[4];
+ char * t;
+ int i;
+
+ switch (type)
+ {
+ case 'f':
+ prec = 2;
+ break;
+
+ case 'd':
+ prec = 4;
+ break;
+
+ default:
+ *sizep = 0;
+ return "bad call to md_atof";
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+
+ *sizep = prec * 2;
+
+ for (i = prec - 1; i >= 0; i--)
+ {
+ md_number_to_chars (litp, (valueT) words[i], 2);
+ litp += 2;
+ }
+
+ return NULL;
+}
+
+
+/* Very gross. */
+void
+md_convert_frag (abfd, sec, fragP)
+ bfd * abfd;
+ asection * sec;
+ fragS * fragP;
+{
+ subseg_change (sec, 0);
+
+ /* In range conditional or unconditional branch. */
+ if (fragP->fr_subtype == 0 || fragP->fr_subtype == 2)
+ {
+ fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol,
+ fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int)fragP->fr_opcode);
+ fragP->fr_var = 0;
+ fragP->fr_fix += 2;
+ }
+ /* Out of range conditional branch. Emit a branch around a jump. */
+ else if (fragP->fr_subtype == 1)
+ {
+ unsigned char *buffer =
+ (unsigned char *) (fragP->fr_fix + fragP->fr_literal);
+
+ /* Reverse the condition of the first branch. */
+ buffer[0] ^= 0x08;
+ /* Mask off all the displacement bits. */
+ buffer[0] &= 0x8f;
+ buffer[1] &= 0x07;
+ /* Now set the displacement bits so that we branch
+ around the unconditional branch. */
+ buffer[0] |= 0x30;
+
+ /* Now create the unconditional branch + fixup to the final
+ target. */
+ md_number_to_chars (buffer + 2, 0x00000780, 4);
+ fix_new (fragP, fragP->fr_fix + 2, 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int) fragP->fr_opcode
+ + 1);
+ fragP->fr_var = 0;
+ fragP->fr_fix += 6;
+ }
+ /* Out of range unconditional branch. Emit a jump. */
+ else if (fragP->fr_subtype == 3)
+ {
+ md_number_to_chars (fragP->fr_fix + fragP->fr_literal, 0x00000780, 4);
+ fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol,
+ fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int) fragP->fr_opcode
+ + 1);
+ fragP->fr_var = 0;
+ fragP->fr_fix += 4;
+ }
+ else
+ abort ();
+}
+
+valueT
+md_section_align (seg, addr)
+ asection * seg;
+ valueT addr;
+{
+ int align = bfd_get_section_alignment (stdoutput, seg);
+ return ((addr + (1 << align) - 1) & (-1 << align));
+}
+
+void
+md_begin ()
+{
+ char * prev_name = "";
+ register const struct v850_opcode * op;
+ flagword applicable;
+
+ if (strncmp (TARGET_CPU, "v850", 4) == 0)
+ {
+ if (machine == -1)
+ machine = 0;
+
+ if (processor_mask == -1)
+ processor_mask = PROCESSOR_V850;
+ }
+ else
+ as_bad ("Unable to determine default target processor from string: %s",
+ TARGET_CPU);
+
+ v850_hash = hash_new();
+
+ /* Insert unique names into hash table. The V850 instruction set
+ has many identical opcode names that have different opcodes based
+ on the operands. This hash table then provides a quick index to
+ the first opcode with a particular name in the opcode table. */
+
+ op = v850_opcodes;
+ while (op->name)
+ {
+ if (strcmp (prev_name, op->name))
+ {
+ prev_name = (char *) op->name;
+ hash_insert (v850_hash, op->name, (char *) op);
+ }
+ op++;
+ }
+
+ bfd_set_arch_mach (stdoutput, TARGET_ARCH, machine);
+
+ applicable = bfd_applicable_section_flags (stdoutput);
+
+ sdata_section = subseg_new (".sdata", 0);
+ bfd_set_section_flags (stdoutput, sdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS));
+
+ tdata_section = subseg_new (".tdata", 0);
+ bfd_set_section_flags (stdoutput, tdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS));
+
+ zdata_section = subseg_new (".zdata", 0);
+ bfd_set_section_flags (stdoutput, zdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS));
+
+ sbss_section = subseg_new (".sbss", 0);
+ bfd_set_section_flags (stdoutput, sbss_section, applicable & SEC_ALLOC);
+ seg_info (sbss_section)->bss = 1;
+
+ tbss_section = subseg_new (".tbss", 0);
+ bfd_set_section_flags (stdoutput, tbss_section, applicable & SEC_ALLOC);
+ seg_info (tbss_section)->bss = 1;
+
+ zbss_section = subseg_new (".zbss", 0);
+ bfd_set_section_flags (stdoutput, zbss_section, applicable & SEC_ALLOC);
+ seg_info (zbss_section)->bss = 1;
+
+ rosdata_section = subseg_new (".rosdata", 0);
+ bfd_set_section_flags (stdoutput, rosdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY));
+
+ rozdata_section = subseg_new (".rozdata", 0);
+ bfd_set_section_flags (stdoutput, rozdata_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY));
+
+ scommon_section = subseg_new (".scommon", 0);
+ bfd_set_section_flags (stdoutput, scommon_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS | SEC_IS_COMMON));
+
+ zcommon_section = subseg_new (".zcommon", 0);
+ bfd_set_section_flags (stdoutput, zcommon_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS | SEC_IS_COMMON));
+
+ 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));
+
+}
+
+
+
+static bfd_reloc_code_real_type
+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 != 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)
+{
+ 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
+ || 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. */
+ }
+
+ return BFD_RELOC_V850_ZDA_16_16_OFFSET;
+}
+
+static bfd_reloc_code_real_type
+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 == 16 && operand->shift == 16) return BFD_RELOC_V850_TDA_16_16_OFFSET; /* set1 & chums, operands: D16 */
+
+ 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. */
+ }
+
+ 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 */
+}
+
+/* Warning: The code in this function relies upon the definitions
+ in the v850_operands[] array (defined in opcodes/v850-opc.c)
+ matching the hard coded values contained herein. */
+
+static bfd_reloc_code_real_type
+v850_reloc_prefix (const struct v850_operand * operand)
+{
+ boolean paren_skipped = false;
+
+
+ /* Skip leading opening parenthesis. */
+ if (* input_line_pointer == '(')
+ {
+ ++ input_line_pointer;
+ paren_skipped = true;
+ }
+
+#define CHECK_(name, reloc) \
+ if (strncmp (input_line_pointer, name##"(", strlen (name) + 1) == 0) \
+ { \
+ input_line_pointer += strlen (name); \
+ return reloc; \
+ }
+
+ 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));
+
+
+ /* Restore skipped parenthesis. */
+ if (paren_skipped)
+ -- input_line_pointer;
+
+ return BFD_RELOC_UNUSED;
+}
+
+/* Insert an operand value into an instruction. */
+
+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;
+{
+ if (operand->insert)
+ {
+ 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... */
+ }
+ else if ((operand->flags & V850_OPERAND_SIGNED) == 0
+ && ! warn_unsigned_overflows
+ && strstr (message, "out of range") != NULL)
+ {
+ /* skip warning... */
+ }
+ else if (str)
+ {
+ if (file == (char *) NULL)
+ as_warn ("%s: %s", str, message);
+ else
+ as_warn_where (file, line, "%s: %s", str, message);
+ }
+ else
+ {
+ if (file == (char *) NULL)
+ as_warn (message);
+ else
+ as_warn_where (file, line, message);
+ }
+ }
+ }
+ else
+ {
+ if (operand->bits != 32)
+ {
+ long min, max;
+ offsetT test;
+
+ if ((operand->flags & V850_OPERAND_SIGNED) != 0)
+ {
+ if (! warn_signed_overflows)
+ max = (1 << operand->bits) - 1;
+ else
+ max = (1 << (operand->bits - 1)) - 1;
+
+ min = - (1 << (operand->bits - 1));
+ }
+ else
+ {
+ max = (1 << operand->bits) - 1;
+
+ if (! warn_unsigned_overflows)
+ min = - (1 << (operand->bits - 1));
+ else
+ min = 0;
+ }
+
+ if (val < (offsetT) min || val > (offsetT) max)
+ {
+ 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)
+ max = (1 << (operand->bits - 1)) - 1;
+
+ if (! (operand->flags & V850_OPERAND_SIGNED)
+ && ! warn_unsigned_overflows)
+ min = 0;
+
+ 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
+ as_warn_where (file, line, err, buf, min, max);
+ }
+ }
+
+ insn |= (((long) val & ((1 << operand->bits) - 1)) << operand->shift);
+ }
+
+ return insn;
+}
+
+
+static char copy_of_instruction [128];
+
+void
+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;
+
+
+ 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 */
+ opcode = (struct v850_opcode *) hash_find (v850_hash, str);
+ if (opcode == NULL)
+ {
+ as_bad ("Unrecognized opcode: `%s'", str);
+ ignore_rest_of_line ();
+ return;
+ }
+
+ str = s;
+ while (isspace (* str))
+ ++ str;
+
+ start_of_operands = str;
+
+ saved_input_line_pointer = input_line_pointer;
+
+ for (;;)
+ {
+ 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;
+ insn = opcode->opcode;
+ extra_data_after_insn = false;
+
+ input_line_pointer = str = start_of_operands;
+
+ 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;
+
+ if (next_opindex == 0)
+ {
+ operand = & v850_operands[ * opindex_ptr ];
+ }
+ else
+ {
+ operand = & v850_operands[ next_opindex ];
+ next_opindex = 0;
+ }
+
+ errmsg = NULL;
+
+ while (*str == ' ' || *str == ',' || *str == '[' || *str == ']')
+ ++ str;
+
+ if (operand->flags & V850_OPERAND_RELAX)
+ relaxable = 1;
+
+ /* Gather the operand. */
+ hold = input_line_pointer;
+ input_line_pointer = str;
+
+ /* lo(), hi(), hi0(), etc... */
+ if ((reloc = v850_reloc_prefix (operand)) != BFD_RELOC_UNUSED)
+ {
+ /* This is a fake reloc, used to indicate an error condition. */
+ if (reloc == BFD_RELOC_64)
+ {
+ match = 1;
+ goto error;
+ }
+
+ expression (& ex);
+
+ if (ex.X_op == O_constant)
+ {
+ switch (reloc)
+ {
+ case BFD_RELOC_V850_ZDA_16_16_OFFSET:
+ /* To cope with "not1 7, zdaoff(0xfffff006)[r0]"
+ and the like. */
+ /* Fall through. */
+
+ case BFD_RELOC_LO16:
+ {
+ /* Truncate, then sign extend the value. */
+ ex.X_add_number = SEXT16 (ex.X_add_number);
+ break;
+ }
+
+ case BFD_RELOC_HI16:
+ {
+ /* Truncate, then sign extend the value. */
+ ex.X_add_number = SEXT16 (ex.X_add_number >> 16);
+ break;
+ }
+
+ case BFD_RELOC_HI16_S:
+ {
+ /* Truncate, then sign extend the value. */
+ int temp = (ex.X_add_number >> 16) & 0xffff;
+
+ temp += (ex.X_add_number >> 15) & 1;
+
+ ex.X_add_number = SEXT16 (temp);
+ break;
+ }
+
+
+ default:
+ fprintf (stderr, "reloc: %d\n", reloc);
+ as_bad ("AAARG -> unhandled constant reloc");
+ break;
+ }
+
+ insn = v850_insert_operand (insn, operand, ex.X_add_number,
+ (char *) NULL, 0,
+ copy_of_instruction);
+ }
+ else
+ {
+
+ if (fc > MAX_INSN_FIXUPS)
+ as_fatal ("too many fixups");
+
+ 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 (!register_name (& ex))
+ {
+ errmsg = "invalid register name";
+ }
+ else if ((operand->flags & V850_NOT_R0)
+ && 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)
+ {
+ if (!system_register_name (& ex, true
+ ))
+ {
+ errmsg = "invalid system register name";
+ }
+ }
+ else if ((operand->flags & V850_OPERAND_EP) != 0)
+ {
+ 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. */
+ *input_line_pointer = c;
+ input_line_pointer = start;
+ errmsg = "expected EP register";
+ goto error;
+ }
+
+ *input_line_pointer = c;
+ str = input_line_pointer;
+ input_line_pointer = hold;
+
+ while ( *str == ' ' || *str == ',' || *str == '['
+ || *str == ']')
+ ++ str;
+ continue;
+ }
+ else if ((operand->flags & V850_OPERAND_CC) != 0)
+ {
+ if (!cc_name (& ex))
+ {
+ errmsg = "invalid condition code name";
+ }
+ }
+ else if (register_name (& ex)
+ && (operand->flags & V850_OPERAND_REG) == 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
+ the register name "zero". Attempt to reparse the
+ field as an expression, and only complain if we
+ cannot generate a constant. */
+
+ input_line_pointer = str;
+
+ expression (& ex);
+
+ if (ex.X_op != O_constant)
+ {
+ /* If this register is actually occuring too early on
+ 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))
+ errmsg = "syntax error: value is missing before the register name";
+ else
+ errmsg = "syntax error: register not expected";
+ }
+ }
+ else if (system_register_name (& ex, false
+ )
+ && (operand->flags & V850_OPERAND_SRG) == 0)
+ {
+ errmsg = "syntax error: system register not expected";
+ }
+ else if (cc_name (&ex)
+ && (operand->flags & V850_OPERAND_CC) == 0)
+ {
+ errmsg = "syntax error: condition code not expected";
+ }
+ else
+ {
+ expression (& ex);
+ }
+
+ 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)
+ {
+ case O_illegal:
+ errmsg = "illegal operand";
+ goto error;
+ case O_absent:
+ errmsg = "missing operand";
+ goto error;
+ case O_register:
+ if ((operand->flags & (V850_OPERAND_REG | V850_OPERAND_SRG)) == 0)
+ {
+ errmsg = "invalid operand";
+ goto error;
+ }
+ insn = v850_insert_operand (insn, operand, ex.X_add_number,
+ (char *) NULL, 0,
+ copy_of_instruction);
+ break;
+
+ case O_constant:
+ insn = v850_insert_operand (insn, operand, ex.X_add_number,
+ (char *) NULL, 0,
+ copy_of_instruction);
+ break;
+
+ default:
+ /* We need to generate a fixup for this expression. */
+ 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;
+ ++fc;
+ break;
+ }
+ }
+
+ str = input_line_pointer;
+ input_line_pointer = hold;
+
+ while (*str == ' ' || *str == ',' || *str == '[' || *str == ']'
+ || *str == ')')
+ ++str;
+ }
+ match = 1;
+
+ error:
+ if (match == 0)
+ {
+ next_opcode = opcode + 1;
+ if (next_opcode->name != NULL
+ && strcmp (next_opcode->name, opcode->name) == 0)
+ {
+ opcode = next_opcode;
+
+ /* Skip versions that are not supported by the target
+ 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;
+
+ ignore_rest_of_line ();
+ input_line_pointer = saved_input_line_pointer;
+ return;
+ }
+ break;
+ }
+
+ while (isspace (*str))
+ ++str;
+
+ if (*str != '\0')
+ as_bad ("junk at end of line: `%s'", str);
+
+ input_line_pointer = str;
+
+ /* Write out the instruction. */
+
+ if (relaxable && fc > 0)
+ {
+ insn_size = 2;
+ fc = 0;
+
+ if (!strcmp (opcode->name, "br"))
+ {
+ 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);
+ md_number_to_chars (f, insn, insn_size);
+ md_number_to_chars (f + 2, 0, 2);
+ }
+ else
+ {
+ 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);
+ md_number_to_chars (f, insn, insn_size);
+ md_number_to_chars (f + 2, 0, 4);
+ }
+ }
+ else
+ {
+ /* Four byte insns have an opcode with the two high bits on. */
+ if ((insn & 0x0600) == 0x0600)
+ insn_size = 4;
+ else
+ insn_size = 2;
+
+
+ f = frag_more (insn_size);
+
+ md_number_to_chars (f, insn, insn_size);
+
+ if (extra_data_after_insn)
+ {
+ f = frag_more (extra_data_len);
+
+ md_number_to_chars (f, extra_data, extra_data_len);
+
+ extra_data_after_insn = false;
+ }
+ }
+
+ /* 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
+ 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. */
+ for (i = 0; i < fc; i++)
+ {
+ 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;
+
+ if (!reloc_howto)
+ 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)
+ abort();
+
+ address = (f - frag_now->fr_literal) + insn_size - size;
+
+ if (reloc == BFD_RELOC_32)
+ {
+ address += 2;
+ }
+
+ fixP = fix_new_exp (frag_now, address, size,
+ & fixups[i].exp,
+ reloc_howto->pc_relative,
+ reloc);
+
+ switch (reloc)
+ {
+ case BFD_RELOC_LO16:
+ case BFD_RELOC_HI16:
+ case BFD_RELOC_HI16_S:
+ fixP->fx_no_overflow = 1;
+ break;
+ }
+ }
+ else
+ {
+ fix_new_exp (
+ frag_now,
+ f - frag_now->fr_literal, 4,
+ & fixups[i].exp,
+ 1 /* FIXME: V850_OPERAND_RELATIVE ??? */,
+ (bfd_reloc_code_real_type) (fixups[i].opindex
+ + (int) BFD_RELOC_UNUSED)
+ );
+ }
+ }
+
+ input_line_pointer = saved_input_line_pointer;
+}
+
+
+/* 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;
+{
+ arelent * reloc;
+
+ reloc = (arelent *) xmalloc (sizeof (arelent));
+ reloc->sym_ptr_ptr = & fixp->fx_addsy->bsym;
+ 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,
+ "reloc %d not supported by object file format",
+ (int)fixp->fx_r_type);
+
+ xfree (reloc);
+
+ return NULL;
+ }
+
+ 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;
+{
+ if (fragp->fr_subtype == 0)
+ fragp->fr_var = 4;
+ else if (fragp->fr_subtype == 2)
+ fragp->fr_var = 2;
+ else
+ abort ();
+ return 2;
+}
+
+long
+md_pcrel_from (fixp)
+ fixS * fixp;
+{
+ /* If the symbol is undefined, or in a section other than our own,
+ then let the linker figure it out. */
+ if (fixp->fx_addsy != (symbolS *) NULL && ! S_IS_DEFINED (fixp->fx_addsy))
+ {
+ /* The symbol is undefined. Let the linker figure it out. */
+ return 0;
+ }
+ return fixp->fx_frag->fr_address + fixp->fx_where;
+}
+
+int
+md_apply_fix3 (fixp, valuep, seg)
+ fixS * fixp;
+ valueT * valuep;
+ segT seg;
+{
+ valueT value;
+ char * where;
+
+ if (fixp->fx_addsy == (symbolS *) NULL)
+ {
+ value = * valuep;
+ fixp->fx_done = 1;
+ }
+ else if (fixp->fx_pcrel)
+ value = * valuep;
+ else
+ {
+ value = fixp->fx_offset;
+ if (fixp->fx_subsy != (symbolS *) NULL)
+ {
+ if (S_GET_SEGMENT (fixp->fx_subsy) == absolute_section)
+ value -= S_GET_VALUE (fixp->fx_subsy);
+ else
+ {
+ /* We don't actually support subtracting a symbol. */
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ "expression too complex");
+ }
+ }
+ }
+
+ if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ {
+ int opindex;
+ const struct v850_operand * operand;
+ unsigned long insn;
+
+ opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED;
+ operand = & v850_operands[ opindex ];
+
+ /* Fetch the instruction, insert the fully resolved operand
+ value, and stuff the instruction back again.
+
+ Note the instruction has been stored in little endian
+ format! */
+ where = fixp->fx_frag->fr_literal + fixp->fx_where;
+
+ insn = bfd_getl32 ((unsigned char *) where);
+ insn = v850_insert_operand (insn, operand, (offsetT) value,
+ fixp->fx_file, fixp->fx_line, NULL);
+ bfd_putl32 ((bfd_vma) insn, (unsigned char *) where);
+
+ if (fixp->fx_done)
+ {
+ /* 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. */
+
+ if (operand->bits == 22)
+ fixp->fx_r_type = BFD_RELOC_V850_22_PCREL;
+ else if (operand->bits == 9)
+ fixp->fx_r_type = BFD_RELOC_V850_9_PCREL;
+ else
+ {
+ /* fprintf (stderr, "bits: %d, insn: %x\n", operand->bits, insn); */
+
+ as_bad_where(fixp->fx_file, fixp->fx_line,
+ "unresolved expression that must be resolved");
+ fixp->fx_done = 1;
+ return 1;
+ }
+ }
+ else if (fixp->fx_done)
+ {
+ /* We still have to insert the value into memory! */
+ where = fixp->fx_frag->fr_literal + fixp->fx_where;
+
+ if (fixp->fx_size == 1)
+ *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;
+{
+ /* See if there's a reloc prefix like hi() we have to handle. */
+ hold_cons_reloc = v850_reloc_prefix (NULL);
+
+ /* Do normal expression parsing. */
+ expression (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;
+ int where;
+ int size;
+ expressionS *exp;
+{
+ if (hold_cons_reloc == BFD_RELOC_UNUSED)
+ {
+ if (size == 4)
+ hold_cons_reloc = BFD_RELOC_32;
+ if (size == 2)
+ hold_cons_reloc = BFD_RELOC_16;
+ if (size == 1)
+ hold_cons_reloc = BFD_RELOC_8;
+ }
+
+ if (exp != NULL)
+ fix_new_exp (frag, where, size, exp, 0, hold_cons_reloc);
+ else
+ fix_new (frag, where, size, NULL, 0, 0, hold_cons_reloc);
+}
diff --git a/contrib/binutils/gas/config/tc-v850.h b/contrib/binutils/gas/config/tc-v850.h
new file mode 100644
index 0000000..f031366
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-v850.h
@@ -0,0 +1,80 @@
+/* tc-v850.h -- Header file for tc-v850.c.
+ Copyright (C) 1996, 1997 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. */
+
+#define TC_V850
+
+#include <elf/v850.h>
+
+#define TARGET_BYTES_BIG_ENDIAN 0
+
+#ifndef BFD_ASSEMBLER
+ #error V850 support requires BFD_ASSEMBLER
+#endif
+
+/* The target BFD architecture. */
+#define TARGET_ARCH bfd_arch_v850
+
+/* The target BFD format. */
+#define TARGET_FORMAT "elf32-v850"
+
+
+#define MD_APPLY_FIX3
+#define md_operand(x)
+
+/* Permit temporary numeric labels. */
+#define LOCAL_LABELS_FB 1
+
+#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
+
+/* We don't need to handle .word strangely. */
+#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)
+#define TC_CONS_FIX_NEW cons_fix_new_v850
+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). */
+#define SHF_V850_EPREL 0x20000000
+/* This section must be in the zero data area (pointed to by R0). */
+#define SHF_V850_R0REL 0x40000000
+
+#define ELF_TC_SPECIAL_SECTIONS \
+ { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL }, \
+ { ".rosdata", SHT_PROGBITS, SHF_ALLOC + SHF_V850_GPREL }, \
+ { ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL }, \
+ { ".scommon", SHT_V850_SCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL }, \
+ { ".tdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL }, \
+ { ".tbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL }, \
+ { ".tcommon", SHT_V850_TCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL }, \
+ { ".zdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL }, \
+ { ".rozdata", SHT_PROGBITS, SHF_ALLOC + SHF_V850_R0REL }, \
+ { ".zbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL }, \
+ { ".zcommon", SHT_V850_ZCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL }, \
+ { ".call_table_data", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \
+ { ".call_table_text", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_EXECINSTR },
+
diff --git a/contrib/binutils/gas/config/te-nbsd.h b/contrib/binutils/gas/config/te-nbsd.h
index 2291ba5..cee4600 100644
--- a/contrib/binutils/gas/config/te-nbsd.h
+++ b/contrib/binutils/gas/config/te-nbsd.h
@@ -1,5 +1,5 @@
/* te-nbsd.h -- NetBSD target environment declarations.
- Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1987, 90, 91, 92, 94, 95, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -14,8 +14,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. */
+ 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 TE_NetBSD 1
+#define LOCAL_LABELS_FB 1
#include "obj-format.h"
diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure
index b188f4f..937b289 100755
--- a/contrib/binutils/gas/configure
+++ b/contrib/binutils/gas/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12
+# Generated automatically using autoconf version 2.12.1
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -12,13 +12,24 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
+ --enable-shared build shared libraries [default=yes]
+ --enable-shared=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list"
+ac_help="$ac_help
+ --enable-static build static libraries [default=yes]
+ --enable-static=PKGS only build shared libraries if the current package
+ appears as an element in the PKGS list"
+ac_help="$ac_help
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
+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-shared build shared BFD library"
-ac_help="$ac_help
--enable-commonbfdlib build shared BFD/opcodes/libiberty library"
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -57,6 +68,7 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
@@ -340,7 +352,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12"
+ echo "configure generated by autoconf version 2.12.1"
exit 0 ;;
-with-* | --with-*)
@@ -525,54 +537,10 @@ else
ac_n= ac_c='\c' ac_t=
fi
-user_bfd_gas=
-# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
-if test "${enable_bfd_assembler+set}" = set; then
- enableval="$enable_bfd_assembler"
- case "${enableval}" in
- yes) need_bfd=yes user_bfd_gas=yes ;;
- no) user_bfd_gas=no ;;
- *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
-esac
-fi
-# Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- case "${enableval}" in
- yes) shared=true shared_bfd=true shared_opcodes=true ;;
- no) shared=false ;;
- *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
- *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
- *bfd*) shared=true shared_bfd=true ;;
- *opcodes*) shared=true shared_opcodes=true ;;
- *) shared=false ;;
-esac
-fi
-# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
-if test "${enable_commonbfdlib+set}" = set; then
- enableval="$enable_commonbfdlib"
- case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
-esac
-fi
-
-# Generate a header file -- gets more post-processing by Makefile later.
ac_aux_dir=
-for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -584,7 +552,7 @@ for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
@@ -613,33 +581,33 @@ esac
# Make sure we can run config.sub.
-if $ac_config_sub sun4 >/dev/null 2>&1; then :
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
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:622: checking host system type" >&5
+echo "configure:590: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
- if host_alias=`$ac_config_guess`; then :
+ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
-host=`$ac_config_sub $host_alias`
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
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:643: checking target system type" >&5
+echo "configure:611: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -650,14 +618,14 @@ NONE)
esac ;;
esac
-target=`$ac_config_sub $target_alias`
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
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:661: checking build system type" >&5
+echo "configure:629: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -668,7 +636,7 @@ NONE)
esac ;;
esac
-build=`$ac_config_sub $build_alias`
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
@@ -679,6 +647,110 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
+
+# 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:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# 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:664: 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
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:718: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
if test "$program_transform_name" = s,x,x,; then
program_transform_name=
else
@@ -698,6 +770,588 @@ test "$program_suffix" != NONE &&
# sed with no file args requires a program.
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:775: 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
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=gas
+
+VERSION=2.9.1
+
+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; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:821: 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.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:834: 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.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:847: 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.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:860: 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.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:873: 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.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ 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
+else
+ enable_shared=yes
+fi
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+ 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
+else
+ enable_static=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:936: 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="${IFS}:"
+ for ac_dir in $PATH; 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:965: 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
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+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:994: 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
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ ac_prog_rejected=no
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1042: 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.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 1052 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+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:1076: 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:1081: 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
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1090: \"$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
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ 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:1105: 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
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+
+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:1145: checking for ld used by GCC" >&5
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+ /* | [A-Za-z]:\\*)
+ 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
+ echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1163: checking for GNU ld" >&5
+else
+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1166: 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
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog"; 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
+fi
+
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+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:1202: 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
+ # 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
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1218: 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
+ case "$NM" in
+/* | [A-Za-z]:\\*)
+ ac_cv_path_NM="$NM" # Let the user override the test with a path.
+ ;;
+*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm; 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"
+ 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"
+ else
+ ac_cv_path_NM="$ac_dir/nm"
+ fi
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ ;;
+esac
+fi
+
+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:1255: 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
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags=
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+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"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$host" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 1291 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; 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.
+ CFLAGS="$CFLAGS -belf"
+ ;;
+esac
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+
+user_bfd_gas=
+# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
+if test "${enable_bfd_assembler+set}" = set; then
+ enableval="$enable_bfd_assembler"
+ case "${enableval}" in
+ yes) need_bfd=yes user_bfd_gas=yes ;;
+ no) user_bfd_gas=no ;;
+ *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
+esac
+fi
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi
+# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+if test "${enable_commonbfdlib+set}" = set; then
+ enableval="$enable_commonbfdlib"
+ case "${enableval}" in
+ yes) commonbfdlib=true ;;
+ no) commonbfdlib=false ;;
+ *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
+esac
+fi
+
+# Generate a header file
+
+
+
te_file=generic
@@ -734,9 +1388,13 @@ for this_target in $target $canon_targets ; do
eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
# check for architecture variants
+ arch=
+ endian=
case ${cpu} in
+ alpha*) cpu_type=alpha ;;
armeb) cpu_type=arm endian=big ;;
arm*) cpu_type=arm endian=little ;;
+ thumb*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
i[456]86) cpu_type=i386 ;;
m680[012346]0) cpu_type=m68k ;;
@@ -748,18 +1406,31 @@ for this_target in $target $canon_targets ; do
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
- sparc64) cpu_type=sparc want_sparc_v9=true ;;
- sparc*) cpu_type=sparc ;;
+ sparclite*) cpu_type=sparc arch=sparclite ;;
+ sparclet*) cpu_type=sparc arch=sparclet ;;
+ sparc64*) cpu_type=sparc arch=v9-64 ;;
+ sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
+ v850*) cpu_type=v850 ;;
*) cpu_type=${cpu} ;;
esac
if test ${this_target} = $target ; then
target_cpu_type=${cpu_type}
+ if test x${endian} = xbig; then
+ cat >> confdefs.h <<\EOF
+#define TARGET_BYTES_BIG_ENDIAN 1
+EOF
+
+ elif test x${endian} = xlittle; then
+ cat >> confdefs.h <<\EOF
+#define TARGET_BYTES_BIG_ENDIAN 0
+EOF
+
+ fi
elif test ${target_cpu_type} != ${cpu_type} ; then
continue
fi
- targ=${cpu_type}
generic_target=${cpu_type}-$vendor-$os
dev=no
bfd_gas=no
@@ -767,30 +1438,27 @@ for this_target in $target $canon_targets ; do
# assign object format
case ${generic_target} in
- a29k-*-coff) fmt=coff targ=ebmon29k ;;
- a29k-amd-udi) fmt=coff targ=ebmon29k ;;
- a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
- a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
+ a29k-*-coff) fmt=coff ;;
+ a29k-amd-udi) fmt=coff ;;
+ a29k-amd-ebmon) fmt=coff ;;
+ a29k-nyu-sym1) fmt=coff ;;
a29k-*-vxworks*) fmt=coff ;;
- alpha-*-*vms*) fmt=evax ;;
- alpha-*-netware*) fmt=ecoff ;;
- alpha-*-openbsd*) fmt=ecoff ;;
- alpha-*-osf*) fmt=ecoff ;;
- alpha-*-linuxecoff*) fmt=ecoff ;;
- alpha-*-linux*) fmt=elf em=linux ;;
+ alpha*-*-*vms*) fmt=evax ;;
+ alpha*-*-netware*) fmt=ecoff ;;
+ alpha*-*-openbsd*) fmt=ecoff ;;
+ alpha*-*-osf*) fmt=ecoff ;;
+ alpha*-*-linuxecoff*) fmt=ecoff ;;
+ alpha*-*-linux-gnu*) fmt=elf em=linux ;;
+ alpha*-*-netbsd*) fmt=elf em=nbsd ;;
+ arc-*-elf*) fmt=elf bfd_gas=yes ;;
- arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;;
- arm-*-aout) fmt=aout
- case "$endian" in
- big) targ=arm-big ;;
- *) targ=arm-lit ;;
- esac
- ;;
- arm-*-coff) fmt=coff ;;
+ arm-*-riscix*) fmt=aout em=riscix ;;
+ arm-*-aout) fmt=aout ;;
+ arm-*-coff | thumb-*-coff) fmt=coff ;;
arm-*-riscix*) fmt=aout ;;
- arm-*-pe) fmt=coff targ=armcoff em=pe ;;
+ arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
d10v-*-*) fmt=elf bfd_gas=yes ;;
@@ -804,140 +1472,128 @@ for this_target in $target $canon_targets ; do
h8300-*-coff) fmt=coff ;;
- i386-ibm-aix*) fmt=coff targ=i386coff
- em=i386aix ;;
+ i386-ibm-aix*) fmt=coff em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
- i386-*-linux*coff*) fmt=coff em=linux
- targ=i386coff ;;
- i386-*-linux*) fmt=elf em=linux ;;
- i386-*-lynxos*) fmt=coff targ=i386coff
- em=lynx ;;
- i386-*-sysv4* | i386-*-solaris* | i386-*-elf | i386-*-freebsdelf*)
+ i386-*-linux*coff*) fmt=coff em=linux ;;
+ i386-*-linux-gnu*) fmt=elf em=linux ;;
+ i386-*-lynxos*) fmt=coff em=lynx ;;
+ i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
fmt=elf ;;
- i386-*-sco*elf*) fmt=elf targ=sco5 ;;
- i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
- fmt=coff targ=i386coff ;;
+ i386-*-freebsdelf*) fmt=elf ;;
+ i386-*-freebsd*) fmt=aout em=386bsd ;;
+ i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
+ fmt=coff ;;
+ i386-*-sco3.2v5*) fmt=elf
+ if test ${this_target} = $target; then
+ cat >> confdefs.h <<\EOF
+#define SCO_ELF 1
+EOF
+
+ fi
+ ;;
+ i386-*-sco3.2*) fmt=coff ;;
i386-*-vsta) fmt=aout ;;
- i386-*-go32) fmt=coff targ=i386coff ;;
- i386-*-rtems*) fmt=coff targ=i386coff ;;
+ i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
+ fmt=coff em=go32;;
+ 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 targ=i386coff em=pe ;;
- i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
- i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
+ i386-*-pe) fmt=coff em=pe ;;
+ i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;;
+ i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
+ i386-*-*nt*) fmt=coff em=pe ;;
i960-*-bout) fmt=bout ;;
- i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
- i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;;
+ i960-*-coff) fmt=coff em=ic960 ;;
+ i960-*-rtems*) fmt=coff em=ic960 ;;
i960-*-nindy*) fmt=bout ;;
i960-*-vxworks4*) fmt=bout ;;
i960-*-vxworks5.0) fmt=bout ;;
- i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
+ i960-*-vxworks5.*) fmt=coff em=ic960 ;;
i960-*-vxworks*) fmt=bout ;;
m32r-*-*) fmt=elf bfd_gas=yes ;;
m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
fmt=aout em=sun3 ;;
- m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
- m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
- m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
+ m68k-motorola-sysv*) fmt=coff em=delta ;;
+ m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
+ m68k-apollo-*) fmt=coff em=apollo ;;
m68k-*-sysv4*) # must be before -sysv*
fmt=elf em=svr4 ;;
m68k-*-elf*) fmt=elf ;;
m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
- fmt=coff targ=m68kcoff ;;
+ fmt=coff ;;
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux*) fmt=elf em=linux ;;
- m68k-*-lynxos*) fmt=coff targ=m68kcoff
- em=lynx ;;
+ m68k-*-linux-gnu*) fmt=elf em=linux ;;
+ m68k-*-lynxos*) fmt=coff em=lynx ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
+ m68k-apple-aux*) fmt=coff em=aux ;;
m68k-*-psos*) fmt=elf em=psos;;
- m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
- m88k-*-coff*) fmt=coff targ=m88kcoff ;;
+ m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
+ m88k-*-coff*) fmt=coff ;;
# don't change em like *-*-bsd does
- mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
- mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;;
- mips-dec-bsd*) fmt=aout targ=mips-lit ;;
- mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
+ mips-dec-netbsd*) fmt=elf endian=little ;;
+ mips-dec-openbsd*) fmt=elf endian=little ;;
+ mips-dec-bsd*) fmt=aout ;;
+ mips-sony-bsd*) fmt=ecoff ;;
mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
- mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
- mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;;
- mips-*-ecoff*) fmt=ecoff
- case "$endian" in
- big) targ=mips-big ;;
- *) targ=mips-lit ;;
- esac
- ;;
- mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
- mips-*-irix6*) fmt=elf targ=mips-big ;;
- mips-*-irix5*) fmt=elf targ=mips-big ;;
- mips-*-irix*) fmt=ecoff targ=mips-big ;;
- mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
- mips-*-riscos*) fmt=ecoff targ=mips-big ;;
- mips-*-sysv*) fmt=ecoff targ=mips-big ;;
- mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*)
- fmt=elf
- case "$endian" in
- big) targ=mips-big ;;
- *) targ=mips-lit ;;
- esac
- ;;
+ mips-*-ultrix*) fmt=ecoff endian=little ;;
+ mips-*-osf*) fmt=ecoff endian=little ;;
+ mips-*-ecoff*) fmt=ecoff ;;
+ mips-*-ecoff*) fmt=ecoff ;;
+ mips-*-irix6*) fmt=elf ;;
+ mips-*-irix5*) fmt=elf ;;
+ mips-*-irix*) fmt=ecoff ;;
+ mips-*-lnews*) fmt=ecoff em=lnews ;;
+ mips-*-riscos*) fmt=ecoff ;;
+ mips-*-sysv*) fmt=ecoff ;;
+ mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
+ fmt=elf ;;
mn10200-*-*) fmt=elf bfd_gas=yes ;;
mn10300-*-*) fmt=elf bfd_gas=yes ;;
ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
- fmt=coff em=pe
- case "$endian" in
- big) targ=ppc-big ;;
- *) targ=ppc-lit ;;
- esac
- ;;
+ fmt=coff em=pe ;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
- fmt=elf
- case "$endian" in
- big) targ=ppc-big ;;
- *) targ=ppc-lit ;;
- esac
- ;;
- ppc-*-linux*) fmt=elf
+ fmt=elf ;;
+ ppc-*-linux-gnu*) fmt=elf
case "$endian" in
- big) targ=ppc-big ;;
- *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;;
+ big) ;;
+ *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
esac
;;
ppc-*-solaris*) fmt=elf
- case "$endian" in
- big) { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } ;;
- *) targ=ppc-sol ;;
- esac
- ;;
- ppc-*-rtems*)
- fmt=elf
- case "$endian" in
- big) targ=ppc-big ;;
- *) targ=ppc-lit ;;
- esac
+ if test ${this_target} = $target; then
+ cat >> confdefs.h <<\EOF
+#define TARGET_SOLARIS_COMMENT 1
+EOF
+
+ fi
+ if test x${endian} = xbig; then
+ { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
+ fi
;;
+ ppc-*-rtems*) fmt=elf ;;
ppc-*-macos* | ppc-*-mpw*)
fmt=coff em=macos ;;
ppc-*-netware*) fmt=elf em=ppcnw ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) 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 ;;
@@ -949,7 +1605,7 @@ for this_target in $target $canon_targets ; do
fmt=aout em=sparcaout ;;
sparc-*-coff) fmt=coff ;;
sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux*) fmt=elf em=linux ;;
+ sparc-*-linux-gnu*) fmt=elf em=linux ;;
sparc-*-lynxos*) fmt=coff em=lynx ;;
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
@@ -957,6 +1613,12 @@ for this_target in $target $canon_targets ; do
sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
+ tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
+ tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
+
+
+ v850-*-*) fmt=elf bfd_gas=yes ;;
+
vax-*-bsd* | vax-*-ultrix*)
fmt=aout ;;
vax-*-vms) fmt=vms ;;
@@ -983,7 +1645,7 @@ for this_target in $target $canon_targets ; do
esac
case ${cpu_type}-${fmt} in
- alpha-*) bfd_gas=yes ;;
+ alpha*-*) bfd_gas=yes ;;
arm-*) bfd_gas=yes ;;
# not yet
# i386-aout) bfd_gas=preferred ;;
@@ -1001,10 +1663,16 @@ for this_target in $target $canon_targets ; do
# do we need the opcodes library?
case ${cpu_type} in
- vax | i386)
+ vax | i386 | tic30)
;;
*)
need_opcodes=yes
+
+ case "${enable_shared}" in
+ yes) shared_opcodes=true ;;
+ *opcodes*) shared_opcodes=true ;;
+ *) shared_opcodes=false ;;
+ esac
if test "${shared_opcodes}" = "true"; then
# A shared libopcodes must be linked against libbfd.
need_bfd=yes
@@ -1012,18 +1680,6 @@ for this_target in $target $canon_targets ; do
;;
esac
- test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF
-#define SPARC_V9 1
-EOF
-
-
- case ${cpu}-${vendor}-${os} in
- sparc64-*-elf*) cat >> confdefs.h <<\EOF
-#define SPARC_ARCH64 1
-EOF
- ;;
- esac
-
case ${cpu_type} in
m32r)
case ${extra_objects} in
@@ -1061,6 +1717,15 @@ EOF
fi
;;
+ sparc)
+ if test $this_target = $target ; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_ARCH "${arch}"
+EOF
+
+ fi
+ ;;
+
*)
;;
esac
@@ -1070,7 +1735,6 @@ EOF
if test $this_target = $target ; then
primary_bfd_gas=$bfd_gas
obj_format=$fmt
- gas_target=$targ
te_file=$em
if test $bfd_gas = no ; then
@@ -1086,7 +1750,7 @@ EOF
case ${generic_target}-${fmt} in
mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
- mips-*-linux*-*) case "$endian" in
+ mips-*-linux-gnu*-*) case "$endian" in
big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
*) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
esac ;;
@@ -1130,14 +1794,6 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
{ echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
fi
-# and target makefile frag
-
-target_frag=${srcdir}/config/${gas_target}.mt
-if test ! -r ${target_frag}; then
- target_frag=/dev/null # ick! but subst_file can't be conditionalized
-fi
-
-
case ${user_bfd_gas}-${primary_bfd_gas} in
yes-yes | no-no)
# We didn't override user's choice.
@@ -1349,68 +2005,14 @@ esac
# do we need the opcodes library?
case "${need_opcodes}" in
yes)
- OPCODES_DEP=../opcodes/libopcodes.a
- OPCODES_LIB='-L../opcodes -lopcodes'
-
- # We need to handle some special cases for shared libraries.
- case "${host}" in
- *-*-sunos*)
- # On SunOS, we must link against the name we are going to install,
- # not -lbfd, since SunOS does not support SONAME.
- if test "${shared_opcodes}" = "true"; then
- OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
- fi
- ;;
- alpha*-*-osf*)
- # On Alpha OSF/1, the native linker searches all the -L
- # directories for any LIB.so files, and only then searches for any
- # LIB.a files. That means that if there is an installed
- # libbfd.so, but this build is not done with --enable-shared, the
- # link will wind up being against the install libbfd.so rather
- # than the newly built libbfd. To avoid this, we must explicitly
- # link against libbfd.a when --enable-shared is not used.
- if test "${shared_opcodes}" != "true"; then
- OPCODES_LIB='../opcodes/libopcodes.a'
- fi
- ;;
- esac
+ OPCODES_LIB=../opcodes/libopcodes.la
;;
esac
case "${need_bfd}" in
yes)
- BFDDEP=../bfd/libbfd.a
- BFDLIB='-L../bfd -lbfd'
+ BFDLIB=../bfd/libbfd.la
ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
-
- # We need to handle some special cases for shared libraries
- case "${host}" in
- *-*-sunos*)
- # On SunOS, we must link against the name we are going to install,
- # not -lbfd, since SunOS does not support SONAME.
- if test "${shared_bfd}" = "true"; then
- BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
- fi
- ;;
- alpha*-*-osf*)
- # On Alpha OSF/1, the native linker searches all the -L
- # directories for any LIB.so files, and only then searches for any
- # LIB.a files. That means that if there is an installed
- # libbfd.so, but this build is not done with --enable-shared, the
- # link will wind up being against the install libbfd.so rather
- # than the newly built libbfd. To avoid this, we must explicitly
- # link against libbfd.a when --enable-shared is not used.
- if test "${shared_bfd}" != "true"; then
- BFDLIB='../bfd/libbfd.a'
- fi
- ;;
- esac
-
- if test "${commonbfdlib}" = "true"; then
- # when a shared libbfd is built with --enable-commonbfdlib,
- # all of libopcodes is available in libbfd.so
- OPCODES_LIB=
- fi
;;
esac
@@ -1419,8 +2021,6 @@ esac
-
-
cat >> confdefs.h <<EOF
#define TARGET_ALIAS "${target_alias}"
EOF
@@ -1445,7 +2045,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:1449: checking for $ac_word" >&5
+echo "configure:2049: 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
@@ -1474,7 +2074,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:1478: checking for $ac_word" >&5
+echo "configure:2078: 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
@@ -1522,7 +2122,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1526: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2126: 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.
@@ -1532,11 +2132,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1536 "configure"
+#line 2136 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
@@ -1556,12 +2156,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:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2160: 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:1565: checking whether we are using GNU C" >&5
+echo "configure:2165: 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
@@ -1570,7 +2170,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1574: \"$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:2174: \"$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
@@ -1585,7 +2185,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1589: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2189: 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
@@ -1612,69 +2212,120 @@ else
test "${CFLAGS+set}" = set || CFLAGS="-g"
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:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# 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:1627: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+
+for ac_prog in 'bison -y' byacc
+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:2222: 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
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- for ac_prog in ginstall installbsd scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- # OSF/1 installbsd also uses dspmsg, but is usable.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_YACC="$ac_prog"
+ break
+ fi
done
- IFS="$ac_save_IFS"
+ IFS="$ac_save_ifs"
+fi
+fi
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+ echo "$ac_t""$YACC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+# 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:2254: 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
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LEX="flex"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+ echo "$ac_t""$LEX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+if test -z "$LEXLIB"
+then
+ case "$LEX" in
+ flex*) ac_lib=fl ;;
+ *) ac_lib=l ;;
+ esac
+ echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
+echo "configure:2287: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-l$ac_lib $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2295 "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 yywrap();
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+int main() {
+yywrap()
+; return 0; }
+EOF
+if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
+ LEXLIB="-l$ac_lib"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1678: checking how to run the C preprocessor" >&5
+echo "configure:2329: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1689,13 +2340,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 1693 "configure"
+#line 2344 "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:1699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1706,13 +2357,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1710 "configure"
+#line 2361 "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:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1734,21 +2385,187 @@ else
fi
echo "$ac_t""$CPP" 1>&6
+echo $ac_n "checking lex output file root""... $ac_c" 1>&6
+echo "configure:2390: 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
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+echo '%%
+%%' | $LEX
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
+else
+ { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
+fi
+fi
+
+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:2411: 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
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS="$LIBS"
+LIBS="$LIBS $LEXLIB"
+cat > conftest.$ac_ext <<EOF
+#line 2423 "configure"
+#include "confdefs.h"
+`cat $LEX_OUTPUT_ROOT.c`
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ ac_cv_prog_lex_yytext_pointer=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+
+echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+ cat >> confdefs.h <<\EOF
+#define YYTEXT_POINTER 1
+EOF
+
+fi
+
+
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:2453: 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"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINT=
+ else
+ MAINT='#M#'
+ fi
+
+
+echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
+echo "configure:2471: checking for Cygwin32 environment" >&5
+if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2476 "configure"
+#include "confdefs.h"
+
+int main() {
+return __CYGWIN32__;
+; return 0; }
+EOF
+if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_cygwin32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_cygwin32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_cygwin32" 1>&6
+CYGWIN32=
+test "$am_cv_cygwin32" = yes && CYGWIN32=yes
+echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
+echo "configure:2500: checking for Mingw32 environment" >&5
+if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2505 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:2512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_mingw32=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ am_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_mingw32" 1>&6
+MINGW32=
+test "$am_cv_mingw32" = yes && MINGW32=yes
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:2531: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
+am_cv_exeext=.exe
+else
+cat > am_c_test.c << 'EOF'
+int main() {
+/* Nothing needed here */
+}
+EOF
+${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
+am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
+rm -f am_c_test*
+fi
+
+test x"${am_cv_exeext}" = x && am_cv_exeext=no
+fi
+EXEEXT=""
+test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
+echo "$ac_t""${am_cv_exeext}" 1>&6
+
+
for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1742: checking for $ac_hdr" >&5
+echo "configure:2559: 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 1747 "configure"
+#line 2564 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1778,7 +2595,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:1782: checking whether compiling a cross-assembler" >&5
+echo "configure:2599: checking whether compiling a cross-assembler" >&5
if test "${host}" = "${target}"; then
cross_gas=no
else
@@ -1793,19 +2610,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:1797: checking for working alloca.h" >&5
+echo "configure:2614: 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 1802 "configure"
+#line 2619 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -1826,12 +2643,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1830: checking for alloca" >&5
+echo "configure:2647: 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 1835 "configure"
+#line 2652 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1854,7 +2671,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -1886,12 +2703,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1890: checking whether alloca needs Cray hooks" >&5
+echo "configure:2707: 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 1895 "configure"
+#line 2712 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1916,12 +2733,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:1920: checking for $ac_func" >&5
+echo "configure:2737: 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 1925 "configure"
+#line 2742 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1944,7 +2761,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1971,7 +2788,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1975: checking stack direction for C alloca" >&5
+echo "configure:2792: 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
@@ -1979,7 +2796,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1983 "configure"
+#line 2800 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1998,7 +2815,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2020,21 +2837,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2024: checking for inline" >&5
+echo "configure:2841: 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 2031 "configure"
+#line 2848 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2064,12 +2881,12 @@ esac
for ac_func in unlink remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2068: checking for $ac_func" >&5
+echo "configure:2885: 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 2073 "configure"
+#line 2890 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2092,7 +2909,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2121,12 +2938,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2125: checking for $ac_func" >&5
+echo "configure:2942: 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 2130 "configure"
+#line 2947 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2149,7 +2966,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2178,12 +2995,12 @@ done
# 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:2182: checking for working assert macro" >&5
+echo "configure:2999: 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 2187 "configure"
+#line 3004 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@@ -2199,7 +3016,7 @@ assert (a == b
; return 0; }
EOF
-if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_assert_ok=yes
else
@@ -2240,12 +3057,12 @@ gas_test_headers="
"
echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
-echo "configure:2244: checking whether declaration is required for strstr" >&5
+echo "configure:3061: 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 2249 "configure"
+#line 3066 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -2256,7 +3073,7 @@ x = (f) strstr;
; return 0; }
EOF
-if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_strstr=no
else
@@ -2277,12 +3094,12 @@ EOF
echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
-echo "configure:2281: checking whether declaration is required for malloc" >&5
+echo "configure:3098: 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 2286 "configure"
+#line 3103 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -2293,7 +3110,7 @@ x = (f) malloc;
; return 0; }
EOF
-if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_malloc=no
else
@@ -2314,12 +3131,12 @@ EOF
echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
-echo "configure:2318: checking whether declaration is required for free" >&5
+echo "configure:3135: 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 2323 "configure"
+#line 3140 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -2330,7 +3147,7 @@ x = (f) free;
; return 0; }
EOF
-if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_free=no
else
@@ -2351,12 +3168,12 @@ EOF
echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
-echo "configure:2355: checking whether declaration is required for sbrk" >&5
+echo "configure:3172: 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 2360 "configure"
+#line 3177 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -2367,7 +3184,7 @@ x = (f) sbrk;
; return 0; }
EOF
-if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_sbrk=no
else
@@ -2391,12 +3208,12 @@ EOF
# for it?
echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
-echo "configure:2395: checking whether declaration is required for errno" >&5
+echo "configure:3212: 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 2400 "configure"
+#line 3217 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
@@ -2411,7 +3228,7 @@ x = (f) errno;
; return 0; }
EOF
-if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
gas_cv_decl_needed_errno=no
else
@@ -2431,58 +3248,6 @@ EOF
}
-HLDFLAGS=
-HLDENV=
-RPATH_ENVVAR=LD_LIBRARY_PATH
-# If we have shared libraries, try to set rpath reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- HLDFLAGS='-Wl,+s,+b,$(libdir)'
- RPATH_ENVVAR=SHLIB_PATH
- ;;
- *-*-irix5* | *-*-irix6*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-linux*aout*)
- ;;
- *-*-linux*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-solaris*)
- HLDFLAGS='-R $(libdir)'
- ;;
- *-*-sysv4*)
- HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
- ;;
- esac
-fi
-
-# On SunOS, if the linker supports the -rpath option, use it to
-# prevent ../bfd and ../opcodes from being included in the run time
-# search path.
-case "${host}" in
- *-*-sunos*)
- echo 'main () { }' > conftest.c
- ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
- if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'No such file' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
- :
- elif test "${shared}" = "true"; then
- HLDFLAGS='-Wl,-rpath=$(libdir)'
- else
- HLDFLAGS='-Wl,-rpath='
- fi
- rm -f conftest.t conftest.c conftest
- ;;
-esac
-
-
-
-
trap '' 1 2 15
@@ -2508,7 +3273,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1` in
+ case `(ac_space=' '; set) 2>&1 | grep ac_space` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -2575,7 +3340,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12"
+ echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -2586,7 +3351,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2595,6 +3360,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
+s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
@@ -2631,26 +3397,39 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-/@target_frag@/r $target_frag
-s%@target_frag@%%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+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%@LD@%$LD%g
+s%@NM@%$NM%g
+s%@LN_S@%$LN_S%g
+s%@LIBTOOL@%$LIBTOOL%g
s%@extra_objects@%$extra_objects%g
s%@target_cpu_type@%$target_cpu_type%g
s%@obj_format@%$obj_format%g
s%@te_file@%$te_file%g
s%@atof@%$atof%g
-s%@BFDDEP@%$BFDDEP%g
s%@BFDLIB@%$BFDLIB%g
-s%@OPCODES_DEP@%$OPCODES_DEP%g
s%@OPCODES_LIB@%$OPCODES_LIB%g
s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
-s%@CC@%$CC%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@YACC@%$YACC%g
+s%@LEX@%$LEX%g
+s%@LEXLIB@%$LEXLIB%g
s%@CPP@%$CPP%g
+s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
+s%@MAINT@%$MAINT%g
+s%@EXEEXT@%$EXEEXT%g
s%@ALLOCA@%$ALLOCA%g
-s%@HLDFLAGS@%$HLDFLAGS%g
-s%@HLDENV@%$HLDENV%g
-s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
CEOF
EOF
@@ -2773,7 +3552,7 @@ ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="conf"
+ CONFIG_HEADERS="config.h:config.in"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
@@ -2860,11 +3639,13 @@ fi; done
EOF
cat >> $CONFIG_STATUS <<EOF
+
target_cpu_type=${target_cpu_type}
obj_format=${obj_format}
te_file=${te_file}
EOF
cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in
index 81e1209..ebb6202 100644
--- a/contrib/binutils/gas/configure.in
+++ b/contrib/binutils/gas/configure.in
@@ -4,9 +4,16 @@ dnl And be careful when changing it! If you must add tests with square
dnl brackets, be sure changequote invocations surround it.
dnl
dnl
-AC_PREREQ(2.5)dnl v2.5 needed for --bindir et al
-AC_INIT(as.h)dnl
-dnl
+dnl v2.5 needed for --bindir et al
+AC_PREREQ(2.5)
+AC_INIT(as.h)
+
+AC_CANONICAL_SYSTEM
+
+AM_INIT_AUTOMAKE(gas, 2.9.1)
+
+AM_PROG_LIBTOOL
+
user_bfd_gas=
AC_ARG_ENABLE(bfd-assembler,
[ --enable-bfd-assembler use BFD back end for writing object files],
@@ -23,17 +30,6 @@ AC_ARG_ENABLE(targets,
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
-AC_ARG_ENABLE(shared,
-[ --enable-shared build shared BFD library],
-[case "${enableval}" in
- yes) shared=true shared_bfd=true shared_opcodes=true ;;
- no) shared=false ;;
- *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
- *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
- *bfd*) shared=true shared_bfd=true ;;
- *opcodes*) shared=true shared_opcodes=true ;;
- *) shared=false ;;
-esac])dnl
AC_ARG_ENABLE(commonbfdlib,
[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
[case "${enableval}" in
@@ -42,13 +38,8 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
-# Generate a header file -- gets more post-processing by Makefile later.
-AC_CONFIG_HEADER(conf)
-
-dnl For recursion to work right, this must be an absolute pathname.
-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
+# Generate a header file
+AM_CONFIG_HEADER(config.h:config.in)
te_file=generic
@@ -75,9 +66,13 @@ changequote(,)dnl
changequote([,])dnl
# check for architecture variants
+ arch=
+ endian=
case ${cpu} in
+ alpha*) cpu_type=alpha ;;
armeb) cpu_type=arm endian=big ;;
arm*) cpu_type=arm endian=little ;;
+ thumb*) cpu_type=arm endian=little ;;
hppa*) cpu_type=hppa ;;
changequote(,)dnl
i[456]86) cpu_type=i386 ;;
@@ -91,18 +86,25 @@ changequote([,])dnl
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
- sparc64) cpu_type=sparc want_sparc_v9=true ;;
- sparc*) cpu_type=sparc ;;
+ sparclite*) cpu_type=sparc arch=sparclite ;;
+ sparclet*) cpu_type=sparc arch=sparclet ;;
+ sparc64*) cpu_type=sparc arch=v9-64 ;;
+ sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
+ v850*) cpu_type=v850 ;;
*) cpu_type=${cpu} ;;
esac
if test ${this_target} = $target ; then
target_cpu_type=${cpu_type}
+ if test x${endian} = xbig; then
+ AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 1)
+ elif test x${endian} = xlittle; then
+ AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 0)
+ fi
elif test ${target_cpu_type} != ${cpu_type} ; then
continue
fi
- targ=${cpu_type}
generic_target=${cpu_type}-$vendor-$os
dev=no
bfd_gas=no
@@ -110,30 +112,27 @@ changequote([,])dnl
# assign object format
case ${generic_target} in
- a29k-*-coff) fmt=coff targ=ebmon29k ;;
- a29k-amd-udi) fmt=coff targ=ebmon29k ;;
- a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
- a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
+ a29k-*-coff) fmt=coff ;;
+ a29k-amd-udi) fmt=coff ;;
+ a29k-amd-ebmon) fmt=coff ;;
+ a29k-nyu-sym1) fmt=coff ;;
a29k-*-vxworks*) fmt=coff ;;
- alpha-*-*vms*) fmt=evax ;;
- alpha-*-netware*) fmt=ecoff ;;
- alpha-*-openbsd*) fmt=ecoff ;;
- alpha-*-osf*) fmt=ecoff ;;
- alpha-*-linuxecoff*) fmt=ecoff ;;
- alpha-*-linux*) fmt=elf em=linux ;;
+ alpha*-*-*vms*) fmt=evax ;;
+ alpha*-*-netware*) fmt=ecoff ;;
+ alpha*-*-openbsd*) fmt=ecoff ;;
+ alpha*-*-osf*) fmt=ecoff ;;
+ alpha*-*-linuxecoff*) fmt=ecoff ;;
+ alpha*-*-linux-gnu*) fmt=elf em=linux ;;
+ alpha*-*-netbsd*) fmt=elf em=nbsd ;;
+ arc-*-elf*) fmt=elf bfd_gas=yes ;;
- arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;;
- arm-*-aout) fmt=aout
- case "$endian" in
- big) targ=arm-big ;;
- *) targ=arm-lit ;;
- esac
- ;;
- arm-*-coff) fmt=coff ;;
+ arm-*-riscix*) fmt=aout em=riscix ;;
+ arm-*-aout) fmt=aout ;;
+ arm-*-coff | thumb-*-coff) fmt=coff ;;
arm-*-riscix*) fmt=aout ;;
- arm-*-pe) fmt=coff targ=armcoff em=pe ;;
+ arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
d10v-*-*) fmt=elf bfd_gas=yes ;;
@@ -147,140 +146,122 @@ changequote([,])dnl
h8300-*-coff) fmt=coff ;;
- i386-ibm-aix*) fmt=coff targ=i386coff
- em=i386aix ;;
+ i386-ibm-aix*) fmt=coff em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
- i386-*-linux*coff*) fmt=coff em=linux
- targ=i386coff ;;
- i386-*-linux*) fmt=elf em=linux ;;
- i386-*-lynxos*) fmt=coff targ=i386coff
- em=lynx ;;
- i386-*-sysv4* | i386-*-solaris* | i386-*-elf | i386-*-freebsdelf*)
+ i386-*-linux*coff*) fmt=coff em=linux ;;
+ i386-*-linux-gnu*) fmt=elf em=linux ;;
+ i386-*-lynxos*) fmt=coff em=lynx ;;
+ i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
fmt=elf ;;
- i386-*-sco*elf*) fmt=elf targ=sco5 ;;
- i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
- fmt=coff targ=i386coff ;;
+ i386-*-freebsdelf*) fmt=elf ;;
+ i386-*-freebsd*) fmt=aout em=386bsd ;;
+ i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
+ fmt=coff ;;
+ i386-*-sco3.2v5*) fmt=elf
+ if test ${this_target} = $target; then
+ AC_DEFINE(SCO_ELF)
+ fi
+ ;;
+ i386-*-sco3.2*) fmt=coff ;;
i386-*-vsta) fmt=aout ;;
- i386-*-go32) fmt=coff targ=i386coff ;;
- i386-*-rtems*) fmt=coff targ=i386coff ;;
+ i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
+ fmt=coff em=go32;;
+ 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 targ=i386coff em=pe ;;
- i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
- i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
+ i386-*-pe) fmt=coff em=pe ;;
+ i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;;
+ i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
+ i386-*-*nt*) fmt=coff em=pe ;;
i960-*-bout) fmt=bout ;;
- i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
- i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;;
+ i960-*-coff) fmt=coff em=ic960 ;;
+ i960-*-rtems*) fmt=coff em=ic960 ;;
i960-*-nindy*) fmt=bout ;;
i960-*-vxworks4*) fmt=bout ;;
i960-*-vxworks5.0) fmt=bout ;;
- i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
+ i960-*-vxworks5.*) fmt=coff em=ic960 ;;
i960-*-vxworks*) fmt=bout ;;
m32r-*-*) fmt=elf bfd_gas=yes ;;
m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
fmt=aout em=sun3 ;;
- m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
- m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
- m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
+ m68k-motorola-sysv*) fmt=coff em=delta ;;
+ m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
+ m68k-apollo-*) fmt=coff em=apollo ;;
m68k-*-sysv4*) # must be before -sysv*
fmt=elf em=svr4 ;;
m68k-*-elf*) fmt=elf ;;
m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
- fmt=coff targ=m68kcoff ;;
+ fmt=coff ;;
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
- m68k-*-linux*) fmt=elf em=linux ;;
- m68k-*-lynxos*) fmt=coff targ=m68kcoff
- em=lynx ;;
+ m68k-*-linux-gnu*) fmt=elf em=linux ;;
+ m68k-*-lynxos*) fmt=coff em=lynx ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
- m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
+ m68k-apple-aux*) fmt=coff em=aux ;;
m68k-*-psos*) fmt=elf em=psos;;
- m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
- m88k-*-coff*) fmt=coff targ=m88kcoff ;;
+ m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
+ m88k-*-coff*) fmt=coff ;;
# don't change em like *-*-bsd does
- mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
- mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;;
- mips-dec-bsd*) fmt=aout targ=mips-lit ;;
- mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
+ mips-dec-netbsd*) fmt=elf endian=little ;;
+ mips-dec-openbsd*) fmt=elf endian=little ;;
+ mips-dec-bsd*) fmt=aout ;;
+ mips-sony-bsd*) fmt=ecoff ;;
mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;;
- mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
- mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;;
- mips-*-ecoff*) fmt=ecoff
- case "$endian" in
- big) targ=mips-big ;;
- *) targ=mips-lit ;;
- esac
- ;;
- mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
- mips-*-irix6*) fmt=elf targ=mips-big ;;
- mips-*-irix5*) fmt=elf targ=mips-big ;;
- mips-*-irix*) fmt=ecoff targ=mips-big ;;
- mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
- mips-*-riscos*) fmt=ecoff targ=mips-big ;;
- mips-*-sysv*) fmt=ecoff targ=mips-big ;;
- mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*)
- fmt=elf
- case "$endian" in
- big) targ=mips-big ;;
- *) targ=mips-lit ;;
- esac
- ;;
+ mips-*-ultrix*) fmt=ecoff endian=little ;;
+ mips-*-osf*) fmt=ecoff endian=little ;;
+ mips-*-ecoff*) fmt=ecoff ;;
+ mips-*-ecoff*) fmt=ecoff ;;
+ mips-*-irix6*) fmt=elf ;;
+ mips-*-irix5*) fmt=elf ;;
+ mips-*-irix*) fmt=ecoff ;;
+ mips-*-lnews*) fmt=ecoff em=lnews ;;
+ mips-*-riscos*) fmt=ecoff ;;
+ mips-*-sysv*) fmt=ecoff ;;
+ mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
+ fmt=elf ;;
mn10200-*-*) fmt=elf bfd_gas=yes ;;
mn10300-*-*) fmt=elf bfd_gas=yes ;;
ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
- fmt=coff em=pe
- case "$endian" in
- big) targ=ppc-big ;;
- *) targ=ppc-lit ;;
- esac
- ;;
+ fmt=coff em=pe ;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
- fmt=elf
- case "$endian" in
- big) targ=ppc-big ;;
- *) targ=ppc-lit ;;
- esac
- ;;
- ppc-*-linux*) fmt=elf
+ fmt=elf ;;
+ ppc-*-linux-gnu*) fmt=elf
case "$endian" in
- big) targ=ppc-big ;;
- *) AC_MSG_ERROR(Linux must be configured big endian) ;;
+ big) ;;
+ *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
esac
;;
ppc-*-solaris*) fmt=elf
- case "$endian" in
- big) AC_MSG_ERROR(Solaris must be configured little endian) ;;
- *) targ=ppc-sol ;;
- esac
- ;;
- ppc-*-rtems*)
- fmt=elf
- case "$endian" in
- big) targ=ppc-big ;;
- *) targ=ppc-lit ;;
- esac
+ if test ${this_target} = $target; then
+ AC_DEFINE(TARGET_SOLARIS_COMMENT)
+ fi
+ if test x${endian} = xbig; then
+ AC_MSG_ERROR(Solaris must be configured little endian)
+ fi
;;
+ ppc-*-rtems*) fmt=elf ;;
ppc-*-macos* | ppc-*-mpw*)
fmt=coff em=macos ;;
ppc-*-netware*) fmt=elf em=ppcnw ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) 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 ;;
@@ -292,7 +273,7 @@ changequote([,])dnl
fmt=aout em=sparcaout ;;
sparc-*-coff) fmt=coff ;;
sparc-*-linux*aout*) fmt=aout em=linux ;;
- sparc-*-linux*) fmt=elf em=linux ;;
+ sparc-*-linux-gnu*) fmt=elf em=linux ;;
sparc-*-lynxos*) fmt=coff em=lynx ;;
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
@@ -300,6 +281,12 @@ changequote([,])dnl
sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
+ tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
+ tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
+
+
+ v850-*-*) fmt=elf bfd_gas=yes ;;
+
vax-*-bsd* | vax-*-ultrix*)
fmt=aout ;;
vax-*-vms) fmt=vms ;;
@@ -326,7 +313,7 @@ changequote([,])dnl
esac
case ${cpu_type}-${fmt} in
- alpha-*) bfd_gas=yes ;;
+ alpha*-*) bfd_gas=yes ;;
arm-*) bfd_gas=yes ;;
# not yet
# i386-aout) bfd_gas=preferred ;;
@@ -344,10 +331,16 @@ changequote([,])dnl
# do we need the opcodes library?
case ${cpu_type} in
- vax | i386)
+ vax | i386 | tic30)
;;
*)
need_opcodes=yes
+
+ case "${enable_shared}" in
+ yes) shared_opcodes=true ;;
+ *opcodes*) shared_opcodes=true ;;
+ *) shared_opcodes=false ;;
+ esac
if test "${shared_opcodes}" = "true"; then
# A shared libopcodes must be linked against libbfd.
need_bfd=yes
@@ -355,12 +348,6 @@ changequote([,])dnl
;;
esac
- test -n "$want_sparc_v9" && AC_DEFINE(SPARC_V9)
-
- case ${cpu}-${vendor}-${os} in
- sparc64-*-elf*) AC_DEFINE(SPARC_ARCH64) ;;
- esac
-
case ${cpu_type} in
m32r)
case ${extra_objects} in
@@ -395,6 +382,12 @@ changequote([,])dnl
fi
;;
+ sparc)
+ if test $this_target = $target ; then
+ AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}")
+ fi
+ ;;
+
*)
;;
esac
@@ -404,7 +397,6 @@ changequote([,])dnl
if test $this_target = $target ; then
primary_bfd_gas=$bfd_gas
obj_format=$fmt
- gas_target=$targ
te_file=$em
if test $bfd_gas = no ; then
@@ -420,7 +412,7 @@ changequote([,])dnl
case ${generic_target}-${fmt} in
mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
- mips-*-linux*-*) case "$endian" in
+ mips-*-linux-gnu*-*) case "$endian" in
big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
*) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
esac ;;
@@ -467,14 +459,6 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
AC_MSG_ERROR(GAS does not have support for object file format ${obj_format})
fi
-# and target makefile frag
-
-target_frag=${srcdir}/config/${gas_target}.mt
-if test ! -r ${target_frag}; then
- target_frag=/dev/null # ick! but subst_file can't be conditionalized
-fi
-AC_SUBST_FILE(target_frag)
-
case ${user_bfd_gas}-${primary_bfd_gas} in
yes-yes | no-no)
# We didn't override user's choice.
@@ -597,74 +581,18 @@ esac
# do we need the opcodes library?
case "${need_opcodes}" in
yes)
- OPCODES_DEP=../opcodes/libopcodes.a
- OPCODES_LIB='-L../opcodes -lopcodes'
-
- # We need to handle some special cases for shared libraries.
- case "${host}" in
- *-*-sunos*)
- # On SunOS, we must link against the name we are going to install,
- # not -lbfd, since SunOS does not support SONAME.
- if test "${shared_opcodes}" = "true"; then
- OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
- fi
- ;;
- alpha*-*-osf*)
- # On Alpha OSF/1, the native linker searches all the -L
- # directories for any LIB.so files, and only then searches for any
- # LIB.a files. That means that if there is an installed
- # libbfd.so, but this build is not done with --enable-shared, the
- # link will wind up being against the install libbfd.so rather
- # than the newly built libbfd. To avoid this, we must explicitly
- # link against libbfd.a when --enable-shared is not used.
- if test "${shared_opcodes}" != "true"; then
- OPCODES_LIB='../opcodes/libopcodes.a'
- fi
- ;;
- esac
+ OPCODES_LIB=../opcodes/libopcodes.la
;;
esac
case "${need_bfd}" in
yes)
- BFDDEP=../bfd/libbfd.a
- BFDLIB='-L../bfd -lbfd'
+ BFDLIB=../bfd/libbfd.la
ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
-
- # We need to handle some special cases for shared libraries
- case "${host}" in
- *-*-sunos*)
- # On SunOS, we must link against the name we are going to install,
- # not -lbfd, since SunOS does not support SONAME.
- if test "${shared_bfd}" = "true"; then
- BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
- fi
- ;;
- alpha*-*-osf*)
- # On Alpha OSF/1, the native linker searches all the -L
- # directories for any LIB.so files, and only then searches for any
- # LIB.a files. That means that if there is an installed
- # libbfd.so, but this build is not done with --enable-shared, the
- # link will wind up being against the install libbfd.so rather
- # than the newly built libbfd. To avoid this, we must explicitly
- # link against libbfd.a when --enable-shared is not used.
- if test "${shared_bfd}" != "true"; then
- BFDLIB='../bfd/libbfd.a'
- fi
- ;;
- esac
-
- if test "${commonbfdlib}" = "true"; then
- # when a shared libbfd is built with --enable-commonbfdlib,
- # all of libopcodes is available in libbfd.so
- OPCODES_LIB=
- fi
;;
esac
-AC_SUBST(BFDDEP)
AC_SUBST(BFDLIB)
-AC_SUBST(OPCODES_DEP)
AC_SUBST(OPCODES_LIB)
AC_SUBST(ALL_OBJ_DEPS)
@@ -676,7 +604,14 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}")
AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}")
AC_PROG_CC
-AC_PROG_INSTALL
+
+AC_PROG_YACC
+AC_PROG_LEX
+AC_DECL_YYTEXT
+
+AM_MAINTAINER_MODE
+AM_CYGWIN32
+AM_EXEEXT
AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
@@ -741,58 +676,6 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [
#endif
])
-HLDFLAGS=
-HLDENV=
-RPATH_ENVVAR=LD_LIBRARY_PATH
-# If we have shared libraries, try to set rpath reasonably.
-if test "${shared}" = "true"; then
- case "${host}" in
- *-*-hpux*)
- HLDFLAGS='-Wl,+s,+b,$(libdir)'
- RPATH_ENVVAR=SHLIB_PATH
- ;;
- *-*-irix5* | *-*-irix6*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-linux*aout*)
- ;;
- *-*-linux*)
- HLDFLAGS='-Wl,-rpath,$(libdir)'
- ;;
- *-*-solaris*)
- HLDFLAGS='-R $(libdir)'
- ;;
- *-*-sysv4*)
- HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
- ;;
- esac
-fi
-
-# On SunOS, if the linker supports the -rpath option, use it to
-# prevent ../bfd and ../opcodes from being included in the run time
-# search path.
-case "${host}" in
- *-*-sunos*)
- echo 'main () { }' > conftest.c
- ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
- if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'No such file' conftest.t >/dev/null 2>&1; then
- :
- elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
- :
- elif test "${shared}" = "true"; then
- HLDFLAGS='-Wl,-rpath=$(libdir)'
- else
- HLDFLAGS='-Wl,-rpath='
- fi
- rm -f conftest.t conftest.c conftest
- ;;
-esac
-AC_SUBST(HLDFLAGS)
-AC_SUBST(HLDENV)
-AC_SUBST(RPATH_ENVVAR)
-
dnl This must come last.
dnl We used to make symlinks to files in the source directory, but now
diff --git a/contrib/binutils/gas/depend.c b/contrib/binutils/gas/depend.c
new file mode 100644
index 0000000..8cb3267
--- /dev/null
+++ b/contrib/binutils/gas/depend.c
@@ -0,0 +1,208 @@
+/* depend.c - Handle dependency tracking.
+ Copyright (C) 1997, 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
+ 02111-1307, USA. */
+
+#include "as.h"
+
+/* The file to write to, or NULL if no dependencies being kept. */
+static char *dep_file = NULL;
+
+struct dependency
+{
+ char *file;
+ struct dependency *next;
+};
+
+/* All the files we depend on. */
+static struct dependency *dep_chain = NULL;
+
+/* Current column in output file. */
+static int column = 0;
+
+static int quote_string_for_make PARAMS ((FILE *, char *));
+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. */
+
+void
+start_dependencies (filename)
+ char *filename;
+{
+ dep_file = filename;
+}
+
+/* Noticed a new filename, so try to register it. */
+
+void
+register_dependency (filename)
+ char *filename;
+{
+ struct dependency *dep;
+
+ if (dep_file == NULL)
+ return;
+
+ for (dep = dep_chain; dep != NULL; dep = dep->next)
+ {
+ if (! strcmp (filename, dep->file))
+ return;
+ }
+
+ dep = (struct dependency *) xmalloc (sizeof (struct dependency));
+ dep->file = xstrdup (filename);
+ dep->next = dep_chain;
+ dep_chain = dep;
+}
+
+/* Quote a file name the way `make' wants it, and print it to FILE.
+ If FILE is NULL, do no printing, but return the length of the
+ quoted string.
+
+ This code is taken from gcc with only minor changes. */
+
+static int
+quote_string_for_make (file, src)
+ FILE *file;
+ char *src;
+{
+ char *p = src;
+ int i = 0;
+ for (;;)
+ {
+ char c = *p++;
+ switch (c)
+ {
+ case '\0':
+ case ' ':
+ case '\t':
+ {
+ /* GNU make uses a weird quoting scheme for white space.
+ A space or tab preceded by 2N+1 backslashes represents
+ N backslashes followed by space; a space or tab
+ preceded by 2N backslashes represents N backslashes at
+ 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--)
+ {
+ if (file)
+ putc ('\\', file);
+ i++;
+ }
+ }
+ if (!c)
+ return i;
+ if (file)
+ putc ('\\', file);
+ i++;
+ goto ordinary_char;
+
+ case '$':
+ if (file)
+ putc (c, file);
+ i++;
+ /* Fall through. This can mishandle things like "$(" but
+ there's no easy fix. */
+ default:
+ ordinary_char:
+ /* This can mishandle characters in the string "\0\n%*?[\\~";
+ exactly which chars are mishandled depends on the `make' version.
+ We know of no portable solution for this;
+ even GNU make 3.76.1 doesn't solve the problem entirely.
+ (Also, '\0' is mishandled due to our calling conventions.) */
+ if (file)
+ putc (c, file);
+ i++;
+ break;
+ }
+ }
+}
+
+/* Append some output to the file, keeping track of columns and doing
+ wrapping as necessary. */
+
+static void
+wrap_output (f, string, spacer)
+ FILE *f;
+ char *string;
+ int spacer;
+{
+ int len = quote_string_for_make (NULL, string);
+
+ if (len == 0)
+ return;
+
+ if (column && MAX_COLUMNS - 1 /*spacer*/ - 2 /*` \'*/ < column + len)
+ {
+ fprintf (f, " \\\n ");
+ column = 0;
+ if (spacer == ' ')
+ spacer = '\0';
+ }
+
+ if (spacer == ' ')
+ {
+ putc (spacer, f);
+ ++column;
+ }
+
+ quote_string_for_make (f, string);
+ column += len;
+
+ if (spacer == ':')
+ {
+ putc (spacer, f);
+ ++column;
+ }
+}
+
+/* Print dependency file. */
+
+void
+print_dependencies ()
+{
+ FILE *f;
+ struct dependency *dep;
+
+ if (dep_file == NULL)
+ return;
+
+ f = fopen (dep_file, "w");
+ if (f == NULL)
+ {
+ as_warn ("Can't open `%s' for writing", dep_file);
+ return;
+ }
+
+ column = 0;
+ wrap_output (f, out_file_name, ':');
+ for (dep = dep_chain; dep != NULL; dep = dep->next)
+ wrap_output (f, dep->file, ' ');
+
+ putc ('\n', f);
+
+ if (fclose (f))
+ as_warn ("Can't close %s", dep_file);
+}
diff --git a/contrib/binutils/gas/doc/Makefile.am b/contrib/binutils/gas/doc/Makefile.am
new file mode 100644
index 0000000..8949476
--- /dev/null
+++ b/contrib/binutils/gas/doc/Makefile.am
@@ -0,0 +1,43 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+# What version of the manual you want; "all" includes everything
+CONFIG=all
+
+man_MANS = as.1
+
+info_TEXINFOS = as.texinfo gasp.texi
+
+asconfig.texi: $(CONFIG).texi
+ rm -f asconfig.texi
+ ln -s $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
+ || ln $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
+ || cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
+
+CPU_DOCS = \
+ c-a29k.texi \
+ c-arm.texi \
+ c-d10v.texi \
+ c-h8300.texi \
+ c-h8500.texi \
+ c-hppa.texi \
+ c-i386.texi \
+ c-i960.texi \
+ c-m68k.texi \
+ c-mips.texi \
+ c-ns32k.texi \
+ c-sh.texi \
+ c-sparc.texi \
+ c-vax.texi \
+ c-v850.texi \
+ c-z8k.texi
+
+as.info: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
+as.dvi: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
+
+# This one isn't ready for prime time yet. Not even a little bit.
+
+noinst_TEXINFOS = internals.texi
+
+DISTCLEANFILES = asconfig.texi
diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in
index 3749cbc..d9ee2b2 100644
--- a/contrib/binutils/gas/doc/Makefile.in
+++ b/contrib/binutils/gas/doc/Makefile.in
@@ -1,193 +1,350 @@
-# Makefile for GNU Assembler documentation
-# Copyright (C) 1987-1993 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.2e from Makefile.am
-#This file is part of GNU GAS.
+# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-#GNU 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.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-#GNU 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 GNU GAS; see the file COPYING. If not, write to
-#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# The targets for external use include:
-# all, doc, proto, install, uninstall, includes, TAGS,
-# clean, cleanconfig, realclean, stage1, stage2, stage3, stage4.
-
-# Variables that exist for you to override.
+SHELL = @SHELL@
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
-
prefix = @prefix@
-
-program_transform_name = @program_transform_name@
exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
datadir = @datadir@
-mandir = @mandir@
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
infodir = @infodir@
+mandir = @mandir@
includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
-SHELL = /bin/sh
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-INSTALL_XFORM1 = $(INSTALL) -b $(program_transform_name) .1
-
-AR = ar
-AR_FLAGS = qv
-BISON = bison
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-DVIPS = dvips
-RANLIB = ranlib
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+ALL_OBJ_DEPS = @ALL_OBJ_DEPS@
+BFDLIB = @BFDLIB@
+CC = @CC@
+EXEEXT = @EXEEXT@
+LD = @LD@
+LEX = @LEX@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NM = @NM@
+OPCODES_LIB = @OPCODES_LIB@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+VERSION = @VERSION@
+YACC = @YACC@
+atof = @atof@
+extra_objects = @extra_objects@
+obj_format = @obj_format@
+target_cpu_type = @target_cpu_type@
+te_file = @te_file@
+
+AUTOMAKE_OPTIONS = cygnus
# What version of the manual you want; "all" includes everything
CONFIG=all
-# Where to find texinfo.tex to format docn with TeX
-TEXIDIR = $(srcdir)/../../texinfo
+man_MANS = as.1
+
+info_TEXINFOS = as.texinfo gasp.texi
+
+CPU_DOCS = \
+ c-a29k.texi \
+ c-arm.texi \
+ c-d10v.texi \
+ c-h8300.texi \
+ c-h8500.texi \
+ c-hppa.texi \
+ c-i386.texi \
+ c-i960.texi \
+ c-m68k.texi \
+ c-mips.texi \
+ c-ns32k.texi \
+ c-sh.texi \
+ c-sparc.texi \
+ c-vax.texi \
+ c-v850.texi \
+ c-z8k.texi
-##
+# This one isn't ready for prime time yet. Not even a little bit.
-all:
-install:
- $(INSTALL_XFORM1) $(srcdir)/as.1 $(man1dir)/as.1
+noinst_TEXINFOS = internals.texi
-info: as.info gasp.info
-dvi: as.dvi gasp.dvi
-ps: as.ps gasp.ps
+DISTCLEANFILES = asconfig.texi
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi`
+TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
+INFO_DEPS = as.info gasp.info
+DVIS = as.dvi gasp.dvi
+TEXINFOS = as.texinfo gasp.texi
+MANS = as.1
-asconfig.texi: $(CONFIG).texi
- rm -f asconfig.texi
- ln -s $(srcdir)/$(CONFIG).texi ./asconfig.texi || \
- ln $(srcdir)/$(CONFIG).texi ./asconfig.texi || \
- cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
-
-as.info: $(srcdir)/as.texinfo asconfig.texi
- $(MAKEINFO) -I$(TEXIDIR) -I$(srcdir) -o as.info $(srcdir)/as.texinfo
-
-gasp.info: $(srcdir)/gasp.texi
- $(MAKEINFO) -o gasp.info $(srcdir)/gasp.texi
-
-install-info: install-info-as install-info-gasp
-install-info-as: as.info
- if [ -r as.info ]; then \
- dir=. ; \
- else \
- dir=$(srcdir) ; \
- fi ; \
- for i in `cd $$dir ; echo as.info*` ; do \
- $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
+NROFF = nroff
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP = --best
+default: all
+
+.SUFFIXES:
+.SUFFIXES: .dvi .info .ps .texi .texinfo
+$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+as.info: as.texinfo
+as.dvi: as.texinfo
+
+
+gasp.info: gasp.texi
+gasp.dvi: gasp.texi
+
+
+DVIPS = dvips
+
+.texi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+.dvi.ps:
+ $(DVIPS) $< -o $@
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(infodir)
+ @for file in $(INFO_DEPS); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+ if test -f $$d/$$ifile; then \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
+ else : ; fi; \
+ done; \
+ done
+ @$(POST_INSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ for file in $(INFO_DEPS); do \
+ echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
+ install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
+ done; \
+ else : ; fi
+
+uninstall-info:
+ $(PRE_UNINSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ ii=yes; \
+ else ii=; fi; \
+ for file in $(INFO_DEPS); do \
+ test -z "$ii" \
+ || install-info --info-dir=$(infodir) --remove $$file; \
done
-install-info-gasp: gasp.info
- if [ -r gasp.info ]; then \
- dir=. ; \
- else \
- dir=$(srcdir) ; \
- fi ; \
- for i in `cd $$dir ; echo gasp.info*` ; do \
- $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
+ $(NORMAL_UNINSTALL)
+ for file in $(INFO_DEPS); do \
+ (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
-as.dvi: $(srcdir)/as.texinfo asconfig.texi
- TEXINPUTS=$(srcdir):$(TEXIDIR):$$TEXINPUTS MAKEINFO='$(MAKEINFO) -I$(srcdir)' \
- $(TEXI2DVI) $(srcdir)/as.texinfo
+dist-info: $(INFO_DEPS)
+ for base in $(INFO_DEPS); do \
+ if test -f $$base; then d=.; else d=$(srcdir); fi; \
+ for file in `cd $$d && eval echo $$base*`; do \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done; \
+ done
-as.ps: as.dvi
- $(DVIPS) -o $@ $?
+mostlyclean-aminfo:
+ -rm -f as.aux as.cp as.cps as.dvi as.fn as.fns as.ky as.kys as.ps \
+ as.log as.pg as.toc as.tp as.tps as.vr as.vrs as.op as.tr \
+ as.cv as.cn gasp.aux gasp.cp gasp.cps gasp.dvi gasp.fn \
+ gasp.fns gasp.ky gasp.kys gasp.ps gasp.log gasp.pg gasp.toc \
+ gasp.tp gasp.tps gasp.vr gasp.vrs gasp.op gasp.tr gasp.cv \
+ gasp.cn
-gasp.dvi: $(srcdir)/gasp.texi
- TEXINPUTS=$(srcdir):$(TEXIDIR):$$TEXINPUTS MAKEINFO='$(MAKEINFO) -I$(srcdir)' \
- $(TEXI2DVI) $(srcdir)/gasp.texi
+clean-aminfo:
-gasp.ps: gasp.dvi
- $(DVIPS) -o $@ $?
+distclean-aminfo:
-# This one isn't ready for prime time yet. Not even a little bit.
+maintainer-clean-aminfo:
+ for i in $(INFO_DEPS); do \
+ rm -f $$i; \
+ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
+ rm -f $$i-[0-9]*; \
+ fi; \
+ done
+clean-info: mostlyclean-aminfo
+install-man: $(MANS)
+ $(NORMAL_INSTALL)
+ $(mkinstalldirs) $(mandir)/man1
+ @sect=1; \
+ inst=`echo "as" | sed '$(transform)'`.1; \
+ if test -f $(srcdir)/as.1; then file=$(srcdir)/as.1; \
+ else file=as.1; fi; \
+ echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
+ $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
+
+uninstall-man:
+ $(NORMAL_UNINSTALL)
+ -inst=`echo "as" | sed '$(transform)'`.1; \
+ rm -f $(mandir)/man1/$$inst
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = doc
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done
+ $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
+info: $(INFO_DEPS)
+dvi: $(DVIS)
+check:
+ $(MAKE)
+installcheck:
+install-info: install-info-am
+install-exec:
+ @$(NORMAL_INSTALL)
+
+install-data: install-man
+ @$(NORMAL_INSTALL)
+
+install: install-exec install-data all
+ @:
+
+uninstall: uninstall-man
+
+all: Makefile $(MANS)
+
+install-strip:
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
+installdirs:
+ $(mkinstalldirs) $(mandir)/man1
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(DISTCLEANFILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean: mostlyclean-aminfo mostlyclean-generic
+
+clean: clean-aminfo clean-generic mostlyclean
+
+distclean: distclean-aminfo distclean-generic clean
+ -rm -f config.status
+ -rm -f libtool
+
+maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \
+ distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \
+distclean-aminfo clean-aminfo maintainer-clean-aminfo install-man \
+uninstall-man tags distdir info dvi installcheck install-info \
+install-exec install-data install uninstall all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+asconfig.texi: $(CONFIG).texi
+ rm -f asconfig.texi
+ ln -s $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
+ || ln $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
+ || cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
+
+as.info: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
+as.dvi: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
-internals.info: $(srcdir)/internals.texi
- $(MAKEINFO) -o $@ $?
-
-internals.dvi: $(srcdir)/internals.texi
- TEXINPUTS=$(srcdir):$(TEXIDIR):$$TEXINPUTS MAKEINFO='$(MAKEINFO) -I$(srcdir)' \
- $(TEXI2DVI) $(srcdir)/internals.texi
-
-internals.ps: internals.dvi
- $(DVIPS) -o $@ $?
-
-internals.ps4: internals.ps
- psnup -4 <$? >$@
-
-# ROFF doc targets as.ms, as.mm, as.me
-# (we don't use a variable because we don't trust all makes to handle
-# a var in the target name right).
-# roff output (-ms)
-# THESE ARE PROBABLY BROKEN until texi2roff extended for Texinfo conditionals
-as.ms: $(srcdir)/as.texinfo asconfig.texi
- sed -e '/\\input texinfo/d' \
- -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
- -e 's/{.*,,/{/' \
- $(srcdir)/as.texinfo | \
- texi2roff -ms >as.ms
-
-# roff output (-mm)
-as.mm: $(srcdir)/as.texinfo asconfig.texi
- sed -e '/\\input texinfo/d' \
- -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
- -e 's/{.*,,/{/' \
- -e '/@noindent/d' \
- $(srcdir)/as.texinfo | \
- texi2roff -mm | \
- sed -e 's/---/\\(em/g' \
- >as.mm
-
-# roff output (-me)
-as.me: $(srcdir)/as.texinfo asconfig.texi
- sed -e '/\\input texinfo/d' \
- -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
- -e 's/{.*,,/{/' \
- $(srcdir)/as.texinfo | \
- texi2roff -me >as.me
-
-clean mostlyclean: clean-dvi clean-info
- rm -f asconfig.texi core *~
-
-distclean:
- rm -f Makefile config.status asconfig.texi \
- as.?? as.??s as.aux as.log as.toc \
- internals.?? internals.??s internals.aux internals.log internals.toc \
- gasp.?? gasp.??s gasp.aux gasp.log gasp.toc
-
-clean-dvi:
- rm -f as.?? as.??? gasp.?? gasp.??? internals.?? internals.???
-
-clean-info:
- rm -f as.info* gasp.info*
-
-maintainer-clean realclean: clean-info distclean
-
-force:
-
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
- (cd .. ; $(SHELL) ./config.status)
+# 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.
+.NOEXPORT:
diff --git a/contrib/binutils/gas/doc/all.texi b/contrib/binutils/gas/doc/all.texi
index 8476921..2638dbc 100644
--- a/contrib/binutils/gas/doc/all.texi
+++ b/contrib/binutils/gas/doc/all.texi
@@ -26,6 +26,8 @@
@c CPUs of interest
@c ================
@set A29K
+@set ARC
+@set ARM
@set D10V
@set H8/300
@set H8/500
@@ -33,12 +35,14 @@
@set I80386
@set I960
@set MIPS
+@set M32R
@set M680X0
@set Z8000
@set SPARC
@set VAX
@set VXWORKS
@set HPPA
+@set V850
@c Does this version of the assembler use the difference-table kluge?
@set DIFF-TBL-KLUGE
diff --git a/contrib/binutils/gas/doc/as.1 b/contrib/binutils/gas/doc/as.1
index 1ff0d0b..adf2886 100644
--- a/contrib/binutils/gas/doc/as.1
+++ b/contrib/binutils/gas/doc/as.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1991, 1992, 1996 Free Software Foundation
+.\" Copyright (c) 1991, 1992, 1996, 1997, 1998 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.TH as 1 "29 March 1996" "cygnus support" "GNU Development Tools"
@@ -15,6 +15,7 @@ GNU as \- the portable GNU assembler.
.RB "[\|" \-D "\|]"
.RB "[\|" \-\-defsym\ SYM=VAL "\|]"
.RB "[\|" \-f "\|]"
+.RB "[\|" \-\-gstabs "\|]"
.RB "[\|" \-I
.I path\c
\&\|]
@@ -25,6 +26,7 @@ GNU as \- the portable GNU assembler.
.I objfile\c
\&\|]
.RB "[\|" \-R "\|]"
+.RB "[\|" \-\-traditional\-format "\|]"
.RB "[\|" \-v "\|]"
.RB "[\|" \-w "\|]"
.RB "[\|" \-\^\- "\ |\ " \c
@@ -163,6 +165,10 @@ to the search list for
.B .include
directives.
.TP
+.B \-\-gstabs
+Generate stabs debugging information for each assembler line. This
+may help debugging assembler code, if the debugger can handle it.
+.TP
.B \-K
Issue warnings when difference tables altered for long displacements.
.TP
@@ -181,6 +187,9 @@ Name the object-file output from \c
.B \-R
Fold data section into text section
.TP
+.B \-\-traditional\-format
+Use same format as native assembler, when possible.
+.TP
.B \-v
Announce \c
.B as\c
diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo
index c6ad48f..7bfdc08 100644
--- a/contrib/binutils/gas/doc/as.texinfo
+++ b/contrib/binutils/gas/doc/as.texinfo
@@ -1,5 +1,6 @@
\input texinfo @c -*-Texinfo-*-
-@c Copyright (c) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998
+@c Free Software Foundation, Inc.
@c UPDATE!! On future updates--
@c (1) check for new machine-dep cmdline options in
@c md_parse_option definitions in config/tc-*.c
@@ -20,6 +21,9 @@
@ifset AOUT
@set aout-bout
@end ifset
+@ifset ARM/Thumb
+@set ARM
+@end ifset
@ifset BOUT
@set aout-bout
@end ifset
@@ -82,7 +86,7 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the GNU Assembler "@value{AS}".
-Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -137,7 +141,7 @@ done.
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -196,16 +200,26 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
@c to be limited to one line for the header.
@smallexample
@value{AS} [ -a[cdhlns][=file] ] [ -D ] [ --defsym @var{sym}=@var{val} ]
- [ -f ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ]
- [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ] [ -version ]
- [ --version ] [ -W ] [ -w ] [ -x ] [ -Z ]
+ [ -f ] [ --gstabs ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ]
+ [ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ]
+ [ -version ] [ --version ] [ -W ] [ -w ] [ -x ] [ -Z ]
@ifset A29K
@c am29k has no machine-dependent assembler options
@end ifset
+@ifset ARC
+ [ -mbig-endian | -mlittle-endian ]
+@end ifset
+@ifset ARM
+ [ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]7[t][[d]m[i]] ]
+ [ -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t ]
+ [ -mthumb | -mall ]
+ [ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ]
+ [ -EB | -EL ]
+ [ -mapcs-32 | -mapcs-26 ]
+@end ifset
@ifset D10V
[ -O ]
@end ifset
-
@ifset H8
@c Hitachi family chips have no machine-dependent assembler options
@end ifset
@@ -214,8 +228,9 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
@end ifset
@ifset SPARC
@c The order here is important. See c-sparc.texi.
- [ -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite | -Av9 | -Av9a ]
- [ -xarch=v8plus | -xarch=v8plusa ] [ -bump ]
+ [ -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite
+ -Av8plus | -Av8plusa | -Av9 | -Av9a ]
+ [ -xarch=v8plus | -xarch=v8plusa ] [ -bump ] [ -32 | -64 ]
@end ifset
@ifset Z8000
@c Z8000 has no machine-dependent assembler options
@@ -238,10 +253,13 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
@end smallexample
@table @code
-@item -a[dhlns]
+@item -a[cdhlmns]
Turn on listings, in any of a variety of ways:
@table @code
+@item -ac
+omit false conditionals
+
@item -ad
omit debugging directives
@@ -251,6 +269,9 @@ include high-level source
@item -al
include assembly
+@item -am
+include macro expansions
+
@item -an
omit forms processing
@@ -263,8 +284,7 @@ set the name of the listing file
You may combine these options; for example, use @samp{-aln} for assembly
listing without forms processing. The @samp{=file} option, if used, must be
-the last one. By itself, @samp{-a} defaults to @samp{-ahls}---that is, all
-listings turned on.
+the last one. By itself, @samp{-a} defaults to @samp{-ahls}.
@item -D
Ignored. This option is accepted for script compatibility with calls to
@@ -279,6 +299,10 @@ indicates a hexadecimal value, and a leading @samp{0} indicates an octal value.
``fast''---skip whitespace and comment preprocessing (assume source is
compiler output).
+@item --gstabs
+Generate stabs debugging information for each assembler line. This
+may help debugging assembler code, if the debugger can handle it.
+
@item --help
Print a summary of the command line options and exit.
@@ -297,7 +321,10 @@ Issue warnings when difference tables altered for long displacements.
@end ifset
@item -L
-Keep (in the symbol table) local symbols, starting with @samp{L}.
+@itemx --keep-locals
+Keep (in the symbol table) local symbols. On traditional a.out systems
+these start with @samp{L}, but different systems have different local
+label prefixes.
@item -o @var{objfile}
Name the object-file output from @code{@value{AS}} @var{objfile}.
@@ -309,6 +336,9 @@ Fold the data section into the text section.
Print the maximum space (in bytes) and total time (in seconds) used by
assembly.
+@item --strip-local-absolute
+Remove local absolute symbols from the outgoing symbol table.
+
@item -v
@itemx -version
Print the @code{as} version.
@@ -352,6 +382,24 @@ Generate ``little endian'' format output.
@end table
@end ifset
+@ifset ARM
+The following options are available when @value{AS} is configured for the ARM
+processor family.
+
+@table @code
+@item -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]7[t][[d]m] | -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t
+Specify which variant of the ARM architecture is 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.
+@item -mapcs-32 | -mapcs-26
+Select which procedure calling convention is in use.
+@item -EB | -EL
+Select either big-endian (-EB) or little-endian (-EL) output.
+@end table
+@end ifset
+
@ifset D10V
The following options are available when @value{AS} is configured for
a D10V processor.
@@ -363,6 +411,7 @@ Optimize output by parallelizing instructions.
@end table
@end ifset
+
@ifset I960
The following options are available when @value{AS} is configured for the
Intel 80960 processor.
@@ -381,6 +430,7 @@ error if necessary.
@end table
@end ifset
+
@ifset M680X0
The following options are available when @value{AS} is configured for the
Motorola 68000 series.
@@ -414,12 +464,19 @@ The following options are available when @code{@value{AS}} is configured
for the SPARC architecture:
@table @code
-@item -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite | -Av9 | -Av9a
+@item -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite
+@itemx -Av8plus | -Av8plusa | -Av9 | -Av9a
Explicitly select a variant of the SPARC architecture.
+@samp{-Av8plus} and @samp{-Av8plusa} select a 32 bit environment.
+@samp{-Av9} and @samp{-Av9a} select a 64 bit environment.
+
+@samp{-Av8plusa} and @samp{-Av9a} enable the SPARC V9 instruction set with
+UltraSPARC extensions.
+
@item -xarch=v8plus | -xarch=v8plusa
For compatibility with the Solaris v9 assembler. These options are
-equivalent to -Av9 and -Av9a, respectively.
+equivalent to -Av8plus and -Av8plusa, respectively.
@item -bump
Warn when the assembler switches to another architecture.
@@ -456,7 +513,7 @@ Generate code for a particular MIPS Instruction Set Architecture level.
processor.
@item -m4650
-@item -no-m4650
+@itemx -no-m4650
Generate code for the MIPS @sc{r4650} chip. This tells the assembler to accept
the @samp{mad} and @samp{madu} instruction, and to not schedule @samp{nop}
instructions around accesses to the @samp{HI} and @samp{LO} registers.
@@ -468,7 +525,7 @@ assembler, but it is passed by @code{@value{GCC}}.
@cindex emulation
@item --emulation=@var{name}
-This option causes @code{@value{AS}} to emulated @code{@value{AS}} configured
+This option causes @code{@value{AS}} to emulate @code{@value{AS}} configured
for some other target, in all respects, including output format (choosing
between ELF and ECOFF only), handling of pseudo-opcodes which may generate
debugging information or store symbol table information, and default
@@ -870,9 +927,11 @@ assembler.)
* L:: -L to retain local labels
* M:: -M or --mri to assemble in MRI compatibility mode
+* MD:: --MD for dependency tracking
* o:: -o to name the object file
* R:: -R to join data and text sections
* statistics:: --statistics to see statistics about assembly
+* traditional-format:: --traditional-format for compatible output
* v:: -v to announce version
* W:: -W to suppress warnings
* Z:: -Z to make object file even after errors
@@ -1004,6 +1063,9 @@ target is allowed to redefine the local label prefix.
@ifset HPPA
On the HPPA local labels begin with @samp{L$}.
@end ifset
+@ifset ARM
+@samp{;} for the ARM family;
+@end ifset
@node M
@section Assemble in MRI Compatibility Mode: @code{-M}
@@ -1136,6 +1198,21 @@ The i960 @code{.setreal} pseudo-op is not supported.
@end itemize
+@node MD
+@section Dependency tracking: @code{--MD}
+
+@kindex --MD
+@cindex dependency tracking
+@cindex make rules
+
+@code{@value{AS}} can generate a dependency file for the file it creates. This
+file consists of a single rule suitable for @code{make} describing the
+dependencies of the main source file.
+
+The rule is written to the file named in its argument.
+
+This feature is used in the automatic updating of makefiles.
+
@node o
@section Name the Object File: @code{-o}
@@ -1209,6 +1286,17 @@ Use @samp{--statistics} to display two statistics about the resources used by
(in bytes), and the total execution time taken for the assembly (in @sc{cpu}
seconds).
+@node traditional-format
+@section Compatible output: @code{--traditional-format}
+
+@kindex --traditional-format
+For some targets, the output of @code{@value{AS}} is different in some ways
+from the output of some existing assembler. This switch requests
+@code{@value{AS}} to use the traditional format instead.
+
+For example, it disables the exception frame optimizations which
+@code{@value{AS}} normally does by default on @code{@value{GCC}} output.
+
@node v
@section Announce Version: @code{-v}
@@ -1352,6 +1440,9 @@ is considered a comment and is ignored. The line comment character is
@ifset A29K
@samp{;} for the AMD 29K family;
@end ifset
+@ifset ARC
+@samp{;} on the ARC;
+@end ifset
@ifset H8/300
@samp{;} for the H8/300 family;
@end ifset
@@ -1370,6 +1461,9 @@ is considered a comment and is ignored. The line comment character is
@ifset SPARC
@samp{!} on the SPARC;
@end ifset
+@ifset M32R
+@samp{#} on the m32r;
+@end ifset
@ifset M680X0
@samp{|} on the 680x0;
@end ifset
@@ -1379,6 +1473,9 @@ is considered a comment and is ignored. The line comment character is
@ifset Z8000
@samp{!} for the Z8000;
@end ifset
+@ifset V850
+@samp{#} on the V850;
+@end ifset
see @ref{Machine Dependencies}. @refill
@c FIXME What about i386, m88k, i860?
@@ -1388,6 +1485,13 @@ character only begins a comment if it is the first non-whitespace character on
a line, while the other always begins a comment.
@end ifset
+@ifset V850
+The V850 assembler also supports a double dash as starting a comment that
+extends to the end of the line.
+
+@samp{--};
+@end ifset
+
@kindex #
@cindex lines starting with @code{#}
@cindex logical line numbers
@@ -1811,6 +1915,8 @@ Hitachi SH,
and AMD 29K architectures, the letter must be
one of the letters @samp{DFPRSX} (in upper or lower case).
+On the ARC, the letter must be one of the letters @samp{DFRS}
+(in upper or lower case).
On the Intel 960 architecture, the letter must be
one of the letters @samp{DFT} (in upper or lower case).
@@ -1821,6 +1927,9 @@ On the HPPA architecture, the letter must be @samp{E} (upper case only).
@ifset A29K
One of the letters @samp{DFPRSX} (in upper or lower case).
@end ifset
+@ifset ARC
+One of the letters @samp{DFRS} (in upper or lower case).
+@end ifset
@ifset H8
One of the letters @samp{DFPRSX} (in upper or lower case).
@end ifset
@@ -2943,8 +3052,6 @@ Some machine configurations provide additional directives.
* Sbttl:: @code{.sbttl "@var{subheading}"}
@ifset COFF
* Scl:: @code{.scl @var{class}}
-@end ifset
-@ifset COFF
* Section:: @code{.section @var{name}, @var{subsection}}
@end ifset
@@ -2956,6 +3063,7 @@ Some machine configurations provide additional directives.
@end ifset
* Skip:: @code{.skip @var{size} , @var{fill}}
+* Sleb128:: @code{.sleb128 @var{expressions}}
* Space:: @code{.space @var{size} , @var{fill}}
@ifset have-stabs
* Stab:: @code{.stabd, .stabn, .stabs}
@@ -2976,6 +3084,7 @@ Some machine configurations provide additional directives.
* Val:: @code{.val @var{addr}}
@end ifset
+* Uleb128:: @code{.uleb128 @var{expressions}}
* Word:: @code{.word @var{expressions}}
* Deprecated:: Deprecated Directives
@end menu
@@ -4206,6 +4315,14 @@ ignores it.
@end ifset
@end ifset
+@node Sleb128
+@section @code{.sleb128 @var{expressions}}
+
+@cindex @code{sleb128} directive
+@var{sleb128} stands for ``signed little endian base 128.'' This is a
+compact, variable length representation of numbers used by the DWARF
+symbolic debugging format. @xref{Uleb128,@code{.uleb128}}.
+
@ifclear no-space-dir
@node Skip
@section @code{.skip @var{size} , @var{fill}}
@@ -4436,6 +4553,14 @@ 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}}.
+
@node Word
@section @code{.word @var{expressions}}
@@ -4536,6 +4661,12 @@ subject, see the hardware manufacturer's manual.
@ifset A29K
* AMD29K-Dependent:: AMD 29K Dependent Features
@end ifset
+@ifset ARC
+* ARC-Dependent:: ARC Dependent Features
+@end ifset
+@ifset ARM
+* ARM-Dependent:: ARM Dependent Features
+@end ifset
@ifset D10V
* D10V-Dependent:: D10V Dependent Features
@end ifset
@@ -4566,6 +4697,9 @@ subject, see the hardware manufacturer's manual.
@ifset SPARC
* Sparc-Dependent:: SPARC Dependent Features
@end ifset
+@ifset V850
+* V850-Dependent:: V850 Dependent Features
+@end ifset
@ifset Z8000
* Z8000-Dependent:: Z8000 Dependent Features
@end ifset
@@ -4585,11 +4719,91 @@ subject, see the hardware manufacturer's manual.
@c node and sectioning commands; hence the repetition of @chapter BLAH
@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
+
+@end ifset
@ifset A29K
@include c-a29k.texi
@end ifset
+@ifset ARM
+@include c-arm.texi
+@end ifset
+
@ifset Hitachi-all
@ifclear GENERIC
@node Machine Dependencies
@@ -4613,6 +4827,7 @@ family.
@include c-d10v.texi
@end ifset
+
@ifset H8/300
@include c-h8300.texi
@end ifset
@@ -4633,6 +4848,7 @@ family.
@include c-i960.texi
@end ifset
+
@ifset M680X0
@include c-m68k.texi
@end ifset
@@ -4661,6 +4877,10 @@ family.
@include c-vax.texi
@end ifset
+@ifset V850
+@include c-v850.texi
+@end ifset
+
@ifset GENERIC
@c reverse effect of @down at top of generic Machine-Dep chapter
@raisesections
@@ -4729,7 +4949,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@@prep.ai.mit.edu}.
+to @samp{bug-gnu-utils@@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
diff --git a/contrib/binutils/gas/doc/c-i386.texi b/contrib/binutils/gas/doc/c-i386.texi
index 9cd3d4c..bb51be3 100644
--- a/contrib/binutils/gas/doc/c-i386.texi
+++ b/contrib/binutils/gas/doc/c-i386.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@ifset GENERIC
@@ -388,17 +388,6 @@ only present in the @samp{fildq} (load quad integer to stack top) and
Register to register operations do not require opcode suffixes,
so that @samp{fst %st, %st(1)} is equivalent to @samp{fstl %st, %st(1)}.
-@cindex i386 @code{fwait} instruction
-@cindex @code{fwait instruction}, i386
-Since the 80387 automatically synchronizes with the 80386 @samp{fwait}
-instructions are almost never needed (this is not the case for the
-80286/80287 and 8086/8087 combinations). Therefore, @code{@value{AS}} suppresses
-the @samp{fwait} instruction whenever it is implicitly selected by one
-of the @samp{fn@dots{}} instructions. For example, @samp{fsave} and
-@samp{fnsave} are treated identically. In general, all the @samp{fn@dots{}}
-instructions are made equivalent to @samp{f@dots{}} instructions. If
-@samp{fwait} is desired it must be explicitly coded.
-
@node i386-16bit
@section Writing 16-bit Code
diff --git a/contrib/binutils/gas/doc/c-sh.texi b/contrib/binutils/gas/doc/c-sh.texi
index d7b410b..e20f554 100644
--- a/contrib/binutils/gas/doc/c-sh.texi
+++ b/contrib/binutils/gas/doc/c-sh.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+@c Copyright (C) 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@page
@@ -137,11 +137,18 @@ with other development tools.
@node SH Directives
@section SH Machine Directives
-@cindex SH machine directives (none)
-@cindex machine directives, SH (none)
-@cindex @code{word} directive, SH
-@cindex @code{int} directive, SH
-@code{@value{AS}} has no machine-dependent directives for the SH.
+@cindex SH machine directives
+@cindex machine directives, SH
+@cindex @code{uaword} directive, SH
+@cindex @code{ualong} directive, SH
+
+@table @code
+@item uaword
+@itemx ualong
+@code{@value{AS}} will issue a warning when a misaligned @code{.word} or
+@code{.long} directive is used. You may use @code{.uaword} or
+@code{.ualong} to indicate that the value is intentionally misaligned.
+@end table
@node SH Opcodes
@section Opcodes
diff --git a/contrib/binutils/gas/doc/c-v850.texi b/contrib/binutils/gas/doc/c-v850.texi
new file mode 100644
index 0000000..a7608f4
--- /dev/null
+++ b/contrib/binutils/gas/doc/c-v850.texi
@@ -0,0 +1,308 @@
+@c Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+@c This is part of the GAS manual.
+@c For copying conditions, see the file as.texinfo.
+
+@node V850-Dependent
+@chapter v850 Dependent Features
+
+@cindex V850 support
+@menu
+* V850 Options:: Options
+* V850 Syntax:: Syntax
+* V850 Floating Point:: Floating Point
+* V850 Directives:: V850 Machine Directives
+* V850 Opcodes:: Opcodes
+@end menu
+
+@node V850 Options
+@section Options
+@cindex V850 options (none)
+@cindex options for V850 (none)
+@code{@value{AS}} supports the following additional command-line options
+for the V850 processor family:
+
+@cindex command line options, V850
+@cindex V850 command line options
+@table @code
+
+@cindex @code{-wsigned_overflow} command line option, V850
+@item -wsigned_overflow
+Causes warnings to be produced when signed immediate values overflow the
+space available for then within their opcodes. By default this option
+is disabled as it is possible to receive spurious warnings due to using
+exact bit patterns as immediate constants.
+
+@cindex @code{-wunsigned_overflow} command line option, V850
+@item -wunsigned_overflow
+Causes warnings to be produced when unsigned immediate values overflow
+the space available for then within their opcodes. By default this
+option is disabled as it is possible to receive spurious warnings due to
+using exact bit patterns as immediate constants.
+
+@cindex @code{-mv850} command line option, V850
+@item -mv850
+Specifies that the assembled code should be marked as being targeted at
+the V850 processor. This allows the linker to detect attempts to link
+such code with code assembled for other processors.
+
+
+
+@end table
+
+
+@node V850 Syntax
+@section Syntax
+@menu
+* V850-Chars:: Special Characters
+* V850-Regs:: Register Names
+@end menu
+
+@node V850-Chars
+@subsection Special Characters
+
+@cindex line comment character, V850
+@cindex V850 line comment character
+@samp{#} is the line comment character.
+@node V850-Regs
+@subsection Register Names
+
+@cindex V850 register names
+@cindex register names, V850
+@code{@value{AS}} supports the following names for registers:
+@table @code
+@cindex @code{zero} register, V850
+@item general register 0
+r0, zero
+@item general register 1
+r1
+@item general register 2
+r2, hp
+@cindex @code{sp} register, V850
+@item general register 3
+r3, sp
+@cindex @code{gp} register, V850
+@item general register 4
+r4, gp
+@cindex @code{tp} register, V850
+@item general register 5
+r5, tp
+@item general register 6
+r6
+@item general register 7
+r7
+@item general register 8
+r8
+@item general register 9
+r9
+@item general register 10
+r10
+@item general register 11
+r11
+@item general register 12
+r12
+@item general register 13
+r13
+@item general register 14
+r14
+@item general register 15
+r15
+@item general register 16
+r16
+@item general register 17
+r17
+@item general register 18
+r18
+@item general register 19
+r19
+@item general register 20
+r20
+@item general register 21
+r21
+@item general register 22
+r22
+@item general register 23
+r23
+@item general register 24
+r24
+@item general register 25
+r25
+@item general register 26
+r26
+@item general register 27
+r27
+@item general register 28
+r28
+@item general register 29
+r29
+@cindex @code{ep} register, V850
+@item general register 30
+r30, ep
+@cindex @code{lp} register, V850
+@item general register 31
+r31, lp
+@cindex @code{eipc} register, V850
+@item system register 0
+eipc
+@cindex @code{eipsw} register, V850
+@item system register 1
+eipsw
+@cindex @code{fepc} register, V850
+@item system register 2
+fepc
+@cindex @code{fepsw} register, V850
+@item system register 3
+fepsw
+@cindex @code{ecr} register, V850
+@item system register 4
+ecr
+@cindex @code{psw} register, V850
+@item system register 5
+psw
+@end table
+
+@node V850 Floating Point
+@section Floating Point
+
+@cindex floating point, V850 (@sc{ieee})
+@cindex V850 floating point (@sc{ieee})
+The V850 family uses @sc{ieee} floating-point numbers.
+
+@node V850 Directives
+@section V850 Machine Directives
+
+@cindex machine directives, V850
+@cindex V850 machine directives
+@table @code
+@cindex @code{offset} directive, V850
+@item .offset @var{<expression>}
+Moves the offset into the current section to the specified amount.
+
+@cindex @code{section} directive, V850
+@item .section "name", <type>
+This is an extension to the standard .section directive. It sets the
+current section to be <type> and creates an alias for this section
+called "name".
+
+@cindex @code{.v850} directive, V850
+@item .v850
+Specifies that the assembled code should be marked as being targeted at
+the V850 processor. This allows the linker to detect attempts to link
+such code with code assembled for other processors.
+
+
+
+@end table
+
+@node V850 Opcodes
+@section Opcodes
+
+@cindex V850 opcodes
+@cindex opcodes for V850
+@code{@value{AS}} implements all the standard V850 opcodes.
+
+@code{@value{AS}} also implements the following pseudo ops:
+
+@table @code
+
+@cindex @code{hi0} pseudo-op, V850
+@item hi0()
+Computes the higher 16 bits of the given expression and stores it into
+the immediate operand field of the given instruction. For example:
+
+ @samp{mulhi hi0(here - there), r5, r6}
+
+computes the difference between the address of labels 'here' and
+'there', takes the upper 16 bits of this difference, shifts it down 16
+bits and then mutliplies it by the lower 16 bits in register 5, putting
+the result into register 6.
+
+@cindex @code{lo} pseudo-op, V850
+@item lo()
+Computes the lower 16 bits of the given expression and stores it into
+the immediate operand field of the given instruction. For example:
+
+ @samp{addi lo(here - there), r5, r6}
+
+computes the difference between the address of labels 'here' and
+'there', takes the lower 16 bits of this difference and adds it to
+register 5, putting the result into register 6.
+
+@cindex @code{hi} pseudo-op, V850
+@item hi()
+Computes the higher 16 bits of the given expression and then adds the
+value of the most significant bit of the lower 16 bits of the expression
+and stores the result into the immediate operand field of the given
+instruction. For example the following code can be used to compute the
+address of the label 'here' and store it into register 6:
+
+ @samp{movhi hi(here), r0, r6}
+ @samp{movea lo(here), r6, r6}
+
+The reason for this special behaviour is that movea performs a sign
+extention on its immediate operand. So for example if the address of
+'here' was 0xFFFFFFFF then without the special behaviour of the hi()
+pseudo-op the movhi instruction would put 0xFFFF0000 into r6, then the
+movea instruction would takes its immediate operand, 0xFFFF, sign extend
+it to 32 bits, 0xFFFFFFFF, and then add it into r6 giving 0xFFFEFFFF
+which is wrong (the fifth nibble is E). With the hi() pseudo op adding
+in the top bit of the lo() pseudo op, the movhi instruction actually
+stores 0 into r6 (0xFFFF + 1 = 0x0000), so that the movea instruction
+stores 0xFFFFFFFF into r6 - the right value.
+
+
+@cindex @code{sdaoff} pseudo-op, V850
+@item sdaoff()
+Computes the offset of the named variable from the start of the Small
+Data Area (whoes address is held in register 4, the GP register) and
+stores the result as a 16 bit signed value in the immediate operand
+field of the given instruction. For example:
+
+ @samp{ld.w sdaoff(_a_variable)[gp],r6}
+
+loads the contents of the location pointed to by the label '_a_variable'
+into register 6, provided that the label is located somewhere within +/-
+32K of the address held in the GP register. [Note the linker assumes
+that the GP register contains a fixed address set to the address of the
+label called '__gp'. This can either be set up automatically by the
+linker, or specifically set by using the @samp{--defsym __gp=<value>}
+command line option].
+
+@cindex @code{tdaoff} pseudo-op, V850
+@item tdaoff()
+Computes the offset of the named variable from the start of the Tiny
+Data Area (whoes address is held in register 30, the EP register) and
+stores the result as a
+7 or 8 bit unsigned value in the immediate
+operand field of the given instruction. For example:
+
+ @samp{sld.w tdaoff(_a_variable)[ep],r6}
+
+loads the contents of the location pointed to by the label '_a_variable'
+into register 6, provided that the label is located somewhere within +256
+bytes of the address held in the EP register. [Note the linker assumes
+that the EP register contains a fixed address set to the address of the
+label called '__ep'. This can either be set up automatically by the
+linker, or specifically set by using the @samp{--defsym __ep=<value>}
+command line option].
+
+@cindex @code{zdaoff} pseudo-op, V850
+@item zdaoff()
+Computes the offset of the named variable from address 0 and stores the
+result as a 16 bit signed value in the immediate operand field of the
+given instruction. For example:
+
+ @samp{movea zdaoff(_a_variable),zero,r6}
+
+puts the address of the label '_a_variable' into register 6, assuming
+that the label is somewhere within the first 32K of memory. (Strictly
+speaking it also possible to access the last 32K of memory as well, as
+the offsets are signed).
+
+
+@end table
+
+
+For information on the V850 instruction set, see @cite{V850
+Family 32-/16-Bit single-Chip Microcontroller Architecture Manual} from NEC.
+Ltd.
+
diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi
index ad57afd..eb9f44b 100644
--- a/contrib/binutils/gas/doc/internals.texi
+++ b/contrib/binutils/gas/doc/internals.texi
@@ -8,7 +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: 1997/04/25 18:20:48 $. It is not updated regularly, and it
+This chapter was last modified on $Date: 1998/02/06 03:42:57 $. It is not updated regularly, and it
may be out of date.
@menu
@@ -469,11 +469,9 @@ This normally indicates the symbol to use when relaxing the frag according to
@item fr_opcode
Points to the lowest-addressed byte of the opcode, for use in relaxation.
-@item fr_pcrel_adjust
-@itemx fr_bsr
-These fields are only used in the NS32k configuration. But since @code{struct
-frag} is defined before the CPU-specific header files are included, they must
-unconditionally be defined.
+@item tc_frag_data
+Target specific fragment data of type TC_FRAG_TYPE.
+Only present if @code{TC_FRAG_TYPE} is defined.
@item fr_file
@itemx fr_line
@@ -506,11 +504,26 @@ This indicates that ``broken word'' processing should be done (@pxref{Broken
words}). If broken word processing is not necessary on the target machine,
this enumerator value will not be defined.
+@item rs_cfa
+This state is used to implement exception frame optimizations. The
+@code{fr_symbol} is an expression symbol for the subtraction which may be
+relaxed. The @code{fr_opcode} field holds the frag for the preceding command
+byte. The @code{fr_offset} field holds the offset within that frag. The
+@code{fr_subtype} field is used during relaxation to hold the current size of
+the frag.
+
@item rs_fill
The variable characters are to be repeated @code{fr_offset} times. If
@code{fr_offset} is 0, this frag has a length of @code{fr_fix}. Most frags
have this type.
+@item rs_leb128
+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
+that we can determine if the fragment changed size.
+
@item rs_machine_dependent
Displacement relaxation is to be done on this frag. The target is indicated by
@code{fr_symbol} and @code{fr_offset}, and @code{fr_subtype} indicates the
@@ -923,6 +936,21 @@ pseudo-op.
@cindex TC_CONS_FIX_NEW
You may define this macro to generate a fixup for a data allocation pseudo-op.
+@item TC_INIT_FIX_DATA (@var{fixp})
+@cindex TC_INIT_FIX_DATA
+A C statement to initialize the target specific fields of fixup @var{fixp}.
+These fields are defined with the @code{TC_FIX_TYPE} macro.
+
+@item TC_FIX_DATA_PRINT (@var{stream}, @var{fixp})
+@cindex TC_FIX_DATA_PRINT
+A C statement to output target specific debugging information for
+fixup @var{fixp} to @var{stream}. This macro is called by @code{print_fixup}.
+
+@item TC_FRAG_INIT (@var{fragp})
+@cindex TC_FRAG_INIT
+A C statement to initialize the target specific fields of frag @var{fragp}.
+These fields are defined with the @code{TC_FRAG_TYPE} macro.
+
@item md_number_to_chars
@cindex md_number_to_chars
This should just call either @code{number_to_chars_bigendian} or
@@ -1255,7 +1283,7 @@ the value to be stored is outside the range accessible by the current
addressing mode. The @code{fr_symbol} field of the frag indicates what symbol
is to be accessed; the @code{fr_offset} field is added in.
-If the @code{fr_pcrel_adjust} field is set, which currently should only happen
+If the @code{TC_PCREL_ADJUST} macro is defined, which currently should only happen
for the NS32k family, the @code{TC_PCREL_ADJUST} macro is called on the frag to
compute an adjustment to be made to the displacement.
diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c
index 60e111f..0cb4d50 100644
--- a/contrib/binutils/gas/ecoff.c
+++ b/contrib/binutils/gas/ecoff.c
@@ -1,5 +1,5 @@
/* ECOFF debugging support.
- Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
good deal of it comes directly from mips-tfile.c, by Michael
@@ -768,13 +768,24 @@ enum aux_type {
If PAGE_SIZE is > 4096, the string length in the shash_t structure
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
+ having a mangled class name of
+
+ t7rb_tree4Z4xkeyZt4pair2ZC4xkeyZt7xsocket1Z4UserZt9select1st2Zt4pair\
+ 2ZC4xkeyZt7xsocket1Z4UserZ4xkeyZt4less1Z4xkey
+
+ Repeat that a couple dozen times while listing the class members and
+ you've got strings over 4k. Hack around this for now by increasing
+ the page size. A proper solution would abandon this structure scheme
+ certainly for very large strings, and possibly entirely. */
+
#ifndef PAGE_SIZE
-#define PAGE_SIZE 4096 /* size of varray pages */
+#define PAGE_SIZE (8*1024) /* size of varray pages */
#endif
#define PAGE_USIZE ((unsigned long) PAGE_SIZE)
-
#ifndef MAX_CLUSTER_PAGES /* # pages to get from system */
#define MAX_CLUSTER_PAGES 63
#endif
@@ -1046,13 +1057,13 @@ typedef union page {
forward_t forward [ PAGE_SIZE / sizeof (forward_t) ];
thead_t thead [ PAGE_SIZE / sizeof (thead_t) ];
lineno_list_t lineno [ PAGE_SIZE / sizeof (lineno_list_t) ];
-} page_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) */
- page_t *cur_page; /* current page being allocated from */
+ page_type *cur_page; /* current page being allocated from */
small_free_t free_list; /* current free list if any */
int unallocated; /* number of elements unallocated on page */
int total_alloc; /* total number of allocations */
@@ -1469,8 +1480,8 @@ static unsigned long ecoff_build_fdr
PARAMS ((const struct ecoff_debug_swap *backend, char **buf, char **bufend,
unsigned long offset));
static void ecoff_setup_ext PARAMS ((void));
-static page_t *allocate_cluster PARAMS ((unsigned long npages));
-static page_t *allocate_page PARAMS ((void));
+static page_type *allocate_cluster PARAMS ((unsigned long npages));
+static page_type *allocate_page PARAMS ((void));
static scope_t *allocate_scope PARAMS ((void));
static void free_scope PARAMS ((scope_t *ptr));
static vlinks_t *allocate_vlinks PARAMS ((void));
@@ -1482,7 +1493,6 @@ static forward_t *allocate_forward PARAMS ((void));
static thead_t *allocate_thead PARAMS ((void));
static void free_thead PARAMS ((thead_t *ptr));
static lineno_list_t *allocate_lineno_list PARAMS ((void));
-static void generate_ecoff_stab PARAMS ((int, const char *, int, int, int));
/* This function should be called when the assembler starts up. */
@@ -1526,7 +1536,7 @@ add_varray_page (vp)
#ifdef MALLOC_CHECK
if (vp->object_size > 1)
- new_links->datum = (page_t *) xcalloc (1, vp->object_size);
+ new_links->datum = (page_type *) xcalloc (1, vp->object_size);
else
#endif
new_links->datum = allocate_page ();
@@ -2215,11 +2225,14 @@ add_file (file_name, indx, fake)
as_where (&file, (unsigned int *) NULL);
file_name = (const char *) file;
- if (! symbol_table_frozen)
- generate_asm_lineno = 1;
+ /* Automatically generate ECOFF debugging information, since I
+ think that's what other ECOFF assemblers do. We don't do
+ 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)
+ debug_type = DEBUG_ECOFF;
}
- else
- generate_asm_lineno = 0;
#ifndef NO_LISTING
if (listing)
@@ -2319,23 +2332,6 @@ add_file (file_name, indx, fake)
fil_ptr->int_type = add_aux_sym_tir (&int_type_info,
hash_yes,
&cur_file_ptr->thash_head[0]);
- /* gas used to have a bug that if the file does not have any
- symbol, it either will abort or will not build the file,
- the following is to get around that problem. ---kung*/
-#if 0
- if (generate_asm_lineno)
- {
- mark_stabs (0);
- (void) add_ecoff_symbol (file_name, st_Nil, sc_Nil,
- symbol_new ("L0\001", now_seg,
- (valueT) frag_now_fix (),
- frag_now),
- (bfd_vma) 0, 0, ECOFF_MARK_STAB (N_SO));
- (void) add_ecoff_symbol ("void:t1=1", st_Nil, sc_Nil,
- (symbolS *) NULL, (bfd_vma) 0, 0,
- ECOFF_MARK_STAB (N_LSYM));
- }
-#endif
}
}
@@ -2350,7 +2346,11 @@ ecoff_new_file (name)
if (cur_file_ptr != NULL && strcmp (cur_file_ptr->name, name) == 0)
return;
add_file (name, 0, 0);
- generate_asm_lineno = 1;
+
+ /* This is a hand coded assembler file, so automatically turn on
+ debugging information. */
+ if (debug_type == DEBUG_NONE)
+ debug_type = DEBUG_ECOFF;
}
#ifdef ECOFF_DEBUG
@@ -3058,25 +3058,11 @@ ecoff_directive_end (ignore)
if (ent == (symbolS *) NULL)
as_warn (".end directive names unknown symbol");
else
- {
- (void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text,
- symbol_new ("L0\001", now_seg,
- (valueT) frag_now_fix (),
- frag_now),
- (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
-
- if (stabs_seen && generate_asm_lineno)
- {
- char *n;
-
- n = xmalloc (strlen (name) + 4);
- strcpy (n, name);
- strcat (n, ":F1");
- (void) add_ecoff_symbol ((const char *) n, stGlobal, scText,
- ent, (bfd_vma) 0, 0,
- ECOFF_MARK_STAB (N_FUN));
- }
- }
+ (void) add_ecoff_symbol ((const char *) NULL, st_End, sc_Text,
+ symbol_new ("L0\001", now_seg,
+ (valueT) frag_now_fix (),
+ frag_now),
+ (bfd_vma) 0, (symint_t) 0, (symint_t) 0);
cur_proc_ptr = (proc_t *) NULL;
@@ -4297,6 +4283,11 @@ ecoff_build_symbols (backend, buf, bufend, offset)
&& local)
sym_ptr->ecoff_sym.asym.index = isym - ifilesym - 1;
sym_ptr->ecoff_sym.ifd = fil_ptr->file_index;
+
+ /* Don't try to merge an FDR which has an
+ external symbol attached to it. */
+ if (S_IS_EXTERNAL (as_sym) || S_IS_WEAK (as_sym))
+ fil_ptr->fdr.fMerge = 0;
}
}
}
@@ -4841,11 +4832,11 @@ ecoff_build_debug (hdr, bufp, backend)
#ifndef MALLOC_CHECK
-static page_t *
+static page_type *
allocate_cluster (npages)
unsigned long npages;
{
- register page_t *value = (page_t *) xmalloc (npages * PAGE_USIZE);
+ register page_type *value = (page_type *) xmalloc (npages * PAGE_USIZE);
#ifdef ECOFF_DEBUG
if (debug > 3)
@@ -4858,14 +4849,14 @@ allocate_cluster (npages)
}
-static page_t *cluster_ptr = NULL;
+static page_type *cluster_ptr = NULL;
static unsigned long pages_left = 0;
#endif /* MALLOC_CHECK */
/* Allocate one page (which is initialized to 0). */
-static page_t *
+static page_type *
allocate_page ()
{
#ifndef MALLOC_CHECK
@@ -4881,7 +4872,7 @@ allocate_page ()
#else /* MALLOC_CHECK */
- page_t *ptr;
+ page_type *ptr;
ptr = xmalloc (PAGE_USIZE);
memset (ptr, 0, PAGE_USIZE);
@@ -4906,7 +4897,7 @@ allocate_scope ()
else
{
register int unallocated = alloc_counts[(int)alloc_type_scope].unallocated;
- register page_t *cur_page = alloc_counts[(int)alloc_type_scope].cur_page;
+ register page_type *cur_page = alloc_counts[(int)alloc_type_scope].cur_page;
if (unallocated == 0)
{
@@ -4957,7 +4948,7 @@ allocate_vlinks ()
#ifndef MALLOC_CHECK
register int unallocated = alloc_counts[(int)alloc_type_vlinks].unallocated;
- register page_t *cur_page = alloc_counts[(int)alloc_type_vlinks].cur_page;
+ register page_type *cur_page = alloc_counts[(int)alloc_type_vlinks].cur_page;
if (unallocated == 0)
{
@@ -4991,7 +4982,7 @@ allocate_shash ()
#ifndef MALLOC_CHECK
register int unallocated = alloc_counts[(int)alloc_type_shash].unallocated;
- register page_t *cur_page = alloc_counts[(int)alloc_type_shash].cur_page;
+ register page_type *cur_page = alloc_counts[(int)alloc_type_shash].cur_page;
if (unallocated == 0)
{
@@ -5025,7 +5016,7 @@ allocate_thash ()
#ifndef MALLOC_CHECK
register int unallocated = alloc_counts[(int)alloc_type_thash].unallocated;
- register page_t *cur_page = alloc_counts[(int)alloc_type_thash].cur_page;
+ register page_type *cur_page = alloc_counts[(int)alloc_type_thash].cur_page;
if (unallocated == 0)
{
@@ -5064,7 +5055,7 @@ allocate_tag ()
else
{
register int unallocated = alloc_counts[(int)alloc_type_tag].unallocated;
- register page_t *cur_page = alloc_counts[(int)alloc_type_tag].cur_page;
+ register page_type *cur_page = alloc_counts[(int)alloc_type_tag].cur_page;
if (unallocated == 0)
{
@@ -5115,7 +5106,7 @@ allocate_forward ()
#ifndef MALLOC_CHECK
register int unallocated = alloc_counts[(int)alloc_type_forward].unallocated;
- register page_t *cur_page = alloc_counts[(int)alloc_type_forward].cur_page;
+ register page_type *cur_page = alloc_counts[(int)alloc_type_forward].cur_page;
if (unallocated == 0)
{
@@ -5154,7 +5145,7 @@ allocate_thead ()
else
{
register int unallocated = alloc_counts[(int)alloc_type_thead].unallocated;
- register page_t *cur_page = alloc_counts[(int)alloc_type_thead].cur_page;
+ register page_type *cur_page = alloc_counts[(int)alloc_type_thead].cur_page;
if (unallocated == 0)
{
@@ -5203,7 +5194,7 @@ allocate_lineno_list ()
#ifndef MALLOC_CHECK
register int unallocated = alloc_counts[(int)alloc_type_lineno].unallocated;
- register page_t *cur_page = alloc_counts[(int)alloc_type_lineno].cur_page;
+ register page_type *cur_page = alloc_counts[(int)alloc_type_lineno].cur_page;
if (unallocated == 0)
{
@@ -5243,103 +5234,6 @@ ecoff_set_gp_prolog_size (sz)
cur_proc_ptr->pdr.gp_used = 1;
}
-static void
-generate_ecoff_stab (what, string, type, other, desc)
- int what;
- const char *string;
- int type;
- int other;
- int desc;
-{
- efdr_t *save_file_ptr = cur_file_ptr;
- symbolS *sym;
- symint_t value;
- st_t st;
- sc_t sc;
- symint_t indx;
- localsym_t *hold = NULL;
-
- /* We don't handle .stabd. */
- if (what != 's' && what != 'n')
- {
- as_bad (".stab%c is not supported", what);
- return;
- }
-
- /* We ignore the other field. */
- if (other != 0)
- as_warn (".stab%c: ignoring non-zero other field", what);
-
- /* Make sure we have a current file. */
- if (cur_file_ptr == (efdr_t *) NULL)
- {
- add_file ((const char *) NULL, 0, 1);
- save_file_ptr = cur_file_ptr;
- }
-
- /* For stabs in ECOFF, the first symbol must be @stabs. This is a
- signal to gdb. */
- if (stabs_seen == 0)
- mark_stabs (0);
-
- /* Line number stabs are handled differently, since they have two
- values, the line number and the address of the label. We use the
- index field (aka desc) to hold the line number, and the value
- field to hold the address. The symbol type is st_Label, which
- should be different from the other stabs, so that gdb can
- recognize it. */
- if (type == N_SLINE)
- {
- SYMR dummy_symr;
-
-#ifndef NO_LISTING
- if (listing)
- listing_source_line ((unsigned int) desc);
-#endif
-
- dummy_symr.index = desc;
- if (dummy_symr.index != desc)
- {
- as_warn ("Line number (%d) for .stab%c directive cannot fit in index field (20 bits)",
- desc, what);
- return;
- }
-
- sym = symbol_find_or_make ((char *)string);
- value = 0;
- st = st_Label;
- sc = sc_Text;
- indx = desc;
- }
- else
- {
-#ifndef NO_LISTING
- if (listing && (type == N_SO || type == N_SOL))
- listing_source_file (string);
-#endif
-
- sym = symbol_find_or_make ((char *)string);
- sc = sc_Nil;
- st = st_Nil;
- value = 0;
- indx = ECOFF_MARK_STAB (type);
- }
-
- /* Don't store the stabs symbol we are creating as the type of the
- ECOFF symbol. We want to compute the type of the ECOFF symbol
- independently. */
- if (sym != (symbolS *) NULL)
- hold = sym->ecoff_symbol;
-
- (void) add_ecoff_symbol (string, st, sc, sym, (bfd_vma) 0, value, indx);
-
- if (sym != (symbolS *) NULL)
- sym->ecoff_symbol = hold;
-
- /* Restore normal file type. */
- cur_file_ptr = save_file_ptr;
-}
-
int
ecoff_no_current_file ()
{
@@ -5353,18 +5247,9 @@ ecoff_generate_asm_lineno (filename, lineno)
{
lineno_list_t *list;
- /* this potential can cause problem, when we start to see stab half the
- way thru the file */
-/*
- if (stabs_seen)
- ecoff_generate_asm_line_stab(filename, lineno);
-*/
-
- if (current_stabs_filename == (char *)NULL || strcmp (current_stabs_filename, filename))
- {
- add_file (filename, 0, 1);
- generate_asm_lineno = 1;
- }
+ if (current_stabs_filename == (char *)NULL
+ || strcmp (current_stabs_filename, filename))
+ add_file (filename, 0, 1);
list = allocate_lineno_list ();
@@ -5398,29 +5283,4 @@ ecoff_generate_asm_lineno (filename, lineno)
}
}
-static int line_label_cnt = 0;
-void
-ecoff_generate_asm_line_stab (filename, lineno)
- char *filename;
- int lineno;
-{
- char *ll;
-
- if (strcmp (current_stabs_filename, filename))
- {
- add_file (filename, 0, 1);
- generate_asm_lineno = 1;
- }
-
- line_label_cnt++;
- /* generate local label $LMnn */
- ll = xmalloc(10);
- sprintf(ll, "$LM%d", line_label_cnt);
- colon (ll);
-
- /* generate stab for the line */
- generate_ecoff_stab ('n', ll, N_SLINE, 0, lineno);
-
-}
-
#endif /* ECOFF_DEBUGGING */
diff --git a/contrib/binutils/gas/ecoff.h b/contrib/binutils/gas/ecoff.h
index a835477..68f2b03 100644
--- a/contrib/binutils/gas/ecoff.h
+++ b/contrib/binutils/gas/ecoff.h
@@ -1,5 +1,5 @@
/* ecoff.h -- header file for ECOFF debugging support
- Copyright (C) 1993, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Put together by Ian Lance Taylor <ian@cygnus.com>.
@@ -103,9 +103,5 @@ extern int ecoff_no_current_file PARAMS ((void));
file. */
extern void ecoff_generate_asm_lineno PARAMS ((const char *, int));
-/* This routine is called from read.c to generate line number stabs
- for .s file. */
-extern void ecoff_generate_asm_line_stab PARAMS ((char *, int));
-
#endif /* ! GAS_ECOFF_H */
#endif /* ECOFF_DEBUGGING */
diff --git a/contrib/binutils/gas/ehopt.c b/contrib/binutils/gas/ehopt.c
new file mode 100644
index 0000000..068e824
--- /dev/null
+++ b/contrib/binutils/gas/ehopt.c
@@ -0,0 +1,434 @@
+/* ehopt.c--optimize gcc exception frame information.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor <ian@cygnus.com>.
+
+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. */
+
+#include "as.h"
+#include "subsegs.h"
+
+/* We include this ELF file, even though we may not be assembling for
+ ELF, since the exception frame information is always in a format
+ derived from DWARF. */
+
+#include "elf/dwarf2.h"
+
+/* 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:
+
+__FRAME_BEGIN__:
+ .4byte .LLCIE1 / Length of Common Information Entry
+.LSCIE1:
+ .4byte 0x0 / CIE Identifier Tag
+ .byte 0x1 / CIE Version
+ .byte 0x0 / CIE Augmentation (none)
+ .byte 0x1 / ULEB128 0x1 (CIE Code Alignment Factor)
+ .byte 0x7c / SLEB128 -4 (CIE Data Alignment Factor)
+ .byte 0x8 / CIE RA Column
+ .byte 0xc / DW_CFA_def_cfa
+ .byte 0x4 / ULEB128 0x4
+ .byte 0x4 / ULEB128 0x4
+ .byte 0x88 / DW_CFA_offset, column 0x8
+ .byte 0x1 / ULEB128 0x1
+ .align 4
+.LECIE1:
+ .set .LLCIE1,.LECIE1-.LSCIE1 / CIE Length Symbol
+ .4byte .LLFDE1 / FDE Length
+.LSFDE1:
+ .4byte .LSFDE1-__FRAME_BEGIN__ / FDE CIE offset
+ .4byte .LFB1 / FDE initial location
+ .4byte .LFE1-.LFB1 / FDE address range
+ .byte 0x4 / DW_CFA_advance_loc4
+ .4byte .LCFI0-.LFB1
+ .byte 0xe / DW_CFA_def_cfa_offset
+ .byte 0x8 / ULEB128 0x8
+ .byte 0x85 / DW_CFA_offset, column 0x5
+ .byte 0x2 / ULEB128 0x2
+ .byte 0x4 / DW_CFA_advance_loc4
+ .4byte .LCFI1-.LCFI0
+ .byte 0xd / DW_CFA_def_cfa_register
+ .byte 0x5 / ULEB128 0x5
+ .byte 0x4 / DW_CFA_advance_loc4
+ .4byte .LCFI2-.LCFI1
+ .byte 0x2e / DW_CFA_GNU_args_size
+ .byte 0x4 / ULEB128 0x4
+ .byte 0x4 / DW_CFA_advance_loc4
+ .4byte .LCFI3-.LCFI2
+ .byte 0x2e / DW_CFA_GNU_args_size
+ .byte 0x0 / ULEB128 0x0
+ .align 4
+.LEFDE1:
+ .set .LLFDE1,.LEFDE1-.LSFDE1 / FDE Length Symbol
+
+ The immediate issue we can address in the assembler is the
+ DW_CFA_advance_loc4 followed by a four byte value. The value is
+ the difference of two addresses in the function. Since gcc does
+ 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));
+
+/* Get the code alignment factor from the CIE. */
+
+static int
+eh_frame_code_alignment ()
+{
+ static int code_alignment;
+ segT current_seg;
+ subsegT current_subseg;
+ fragS *f;
+ fixS *fix;
+ int offset;
+ 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. */
+
+ 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
+ f = frchain_now->frch_root;
+#endif
+#ifdef BFD_ASSEMBLER
+ fix = seg_info (now_seg)->frchainP->fix_root;
+#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. */
+
+ offset = 4;
+ while (f != NULL && offset >= f->fr_fix)
+ {
+ offset -= f->fr_fix;
+ f = f->fr_next;
+ }
+ 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)
+ {
+ code_alignment = -1;
+ return -1;
+ }
+
+ /* Next make sure the CIE version number is 1. */
+
+ offset += 4;
+ while (f != NULL && offset >= f->fr_fix)
+ {
+ offset -= f->fr_fix;
+ f = f->fr_next;
+ }
+ if (f == NULL
+ || f->fr_fix - offset < 1
+ || f->fr_literal[offset] != 1)
+ {
+ code_alignment = -1;
+ return -1;
+ }
+
+ /* Skip the augmentation (a null terminated string). */
+
+ iaug = 0;
+ ++offset;
+ while (1)
+ {
+ while (f != NULL && offset >= f->fr_fix)
+ {
+ offset -= f->fr_fix;
+ f = f->fr_next;
+ }
+ if (f == NULL)
+ {
+ code_alignment = -1;
+ return -1;
+ }
+ while (offset < f->fr_fix && f->fr_literal[offset] != '\0')
+ {
+ if ((size_t) iaug < (sizeof augmentation) - 1)
+ {
+ augmentation[iaug] = f->fr_literal[offset];
+ ++iaug;
+ }
+ ++offset;
+ }
+ if (offset < f->fr_fix)
+ break;
+ }
+ ++offset;
+ while (f != NULL && offset >= f->fr_fix)
+ {
+ offset -= f->fr_fix;
+ f = f->fr_next;
+ }
+ if (f == NULL)
+ {
+ code_alignment = -1;
+ return -1;
+ }
+
+ augmentation[iaug] = '\0';
+ if (augmentation[0] == '\0')
+ {
+ /* No augmentation. */
+ }
+ else if (strcmp (augmentation, "eh") == 0)
+ {
+ /* We have to skip a pointer. Unfortunately, we don't know how
+ large it is. We find out by looking for a matching fixup. */
+ while (fix != NULL
+ && (fix->fx_frag != f || fix->fx_where != offset))
+ fix = fix->fx_next;
+ if (fix == NULL)
+ offset += 4;
+ else
+ offset += fix->fx_size;
+ while (f != NULL && offset >= f->fr_fix)
+ {
+ offset -= f->fr_fix;
+ f = f->fr_next;
+ }
+ if (f == NULL)
+ {
+ code_alignment = -1;
+ return -1;
+ }
+ }
+ else
+ {
+ code_alignment = -1;
+ return -1;
+ }
+
+ /* We're now at the code alignment factor, which is a ULEB128. If
+ it isn't a single byte, forget it. */
+
+ code_alignment = f->fr_literal[offset] & 0xff;
+ if ((code_alignment & 0x80) != 0 || code_alignment == 0)
+ {
+ code_alignment = -1;
+ return -1;
+ }
+
+ return code_alignment;
+}
+
+/* This function is called from emit_expr. It looks for cases which
+ we can optimize.
+
+ Rather than try to parse all this information as we read it, we
+ look for a single byte DW_CFA_advance_loc4 followed by a 4 byte
+ difference. We turn that into a rs_cfa_advance frag, and handle
+ those frags at the end of the assembly. If the gcc output changes
+ somewhat, this optimization may stop working.
+
+ This function returns non-zero if it handled the expression and
+ emit_expr should not do anything, or zero otherwise. It can also
+ change *EXP and *PNBYTES. */
+
+int
+check_eh_frame (exp, pnbytes)
+ expressionS *exp;
+ unsigned int *pnbytes;
+{
+ static int saw_advance_loc4;
+ static fragS *loc4_frag;
+ static int loc4_fix;
+
+ if (flag_traditional_format)
+ {
+ /* Don't optimize. */
+ }
+ else if (strcmp (segment_name (now_seg), ".eh_frame") != 0)
+ saw_advance_loc4 = 0;
+ else if (*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;
+ frag_grow (1);
+ loc4_frag = frag_now;
+ loc4_fix = frag_now_fix ();
+ }
+ else if (saw_advance_loc4
+ && *pnbytes == 4
+ && exp->X_op == O_constant)
+ {
+ int ca;
+
+ /* This is a case which we can optimize. The two symbols being
+ subtracted were in the same frag and the expression was
+ reduced to a constant. We can do the optimization entirely
+ in this function. */
+
+ saw_advance_loc4 = 0;
+
+ ca = eh_frame_code_alignment ();
+ if (ca < 0)
+ {
+ /* Don't optimize. */
+ }
+ else if (exp->X_add_number % ca == 0
+ && exp->X_add_number / ca < 0x40)
+ {
+ loc4_frag->fr_literal[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;
+ *pnbytes = 1;
+ }
+ else if (exp->X_add_number < 0x10000)
+ {
+ loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc2;
+ *pnbytes = 2;
+ }
+ }
+ else if (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;
+
+ frag_var (rs_cfa, 4, 0, 0, make_expr_symbol (exp),
+ loc4_fix, (char *) loc4_frag);
+
+ return 1;
+ }
+ else
+ saw_advance_loc4 = 0;
+
+ return 0;
+}
+
+/* The function estimates the size of a rs_cfa 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. */
+
+int
+eh_frame_estimate_size_before_relax (frag)
+ fragS *frag;
+{
+ int ca;
+ offsetT diff;
+ int ret;
+
+ ca = eh_frame_code_alignment ();
+ diff = resolve_symbol_value (frag->fr_symbol, 0);
+
+ if (ca < 0)
+ ret = 4;
+ else if (diff % ca == 0 && diff / ca < 0x40)
+ ret = 0;
+ else if (diff < 0x100)
+ ret = 1;
+ else if (diff < 0x10000)
+ ret = 2;
+ else
+ ret = 4;
+
+ frag->fr_subtype = ret;
+
+ return ret;
+}
+
+/* This function relaxes a rs_cfa 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
+eh_frame_relax_frag (frag)
+ fragS *frag;
+{
+ int oldsize, newsize;
+
+ oldsize = frag->fr_subtype;
+ newsize = eh_frame_estimate_size_before_relax (frag);
+ return newsize - oldsize;
+}
+
+/* This function converts a rs_cfa 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
+eh_frame_convert_frag (frag)
+ fragS *frag;
+{
+ offsetT diff;
+ fragS *loc4_frag;
+ int loc4_fix;
+
+ loc4_frag = (fragS *) frag->fr_opcode;
+ loc4_fix = (int) frag->fr_offset;
+
+ diff = resolve_symbol_value (frag->fr_symbol, 1);
+
+ if (frag->fr_subtype == 0)
+ {
+ int ca;
+
+ ca = eh_frame_code_alignment ();
+ assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40);
+ loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca);
+ }
+ else if (frag->fr_subtype == 1)
+ {
+ assert (diff < 0x100);
+ loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc1;
+ frag->fr_literal[frag->fr_fix] = diff;
+ }
+ else if (frag->fr_subtype == 2)
+ {
+ assert (diff < 0x10000);
+ loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc2;
+ md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 2);
+ }
+ else
+ md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 4);
+
+ frag->fr_fix += frag->fr_subtype;
+ frag->fr_type = rs_fill;
+ frag->fr_offset = 0;
+}
diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c
index d69f65a..47e6933 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, 1997
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -28,6 +28,7 @@
#include <ctype.h>
#include <string.h>
+#define min(a, b) ((a) < (b) ? (a) : (b))
#include "as.h"
#include "obstack.h"
@@ -85,7 +86,7 @@ make_expr_symbol (expressionP)
symbolP->sy_value = *expressionP;
if (expressionP->X_op == O_constant)
- resolve_symbol_value (symbolP);
+ resolve_symbol_value (symbolP, 1);
n = (struct expr_symbol_line *) xmalloc (sizeof *n);
n->sym = symbolP;
@@ -121,6 +122,62 @@ expr_symbol_where (sym, pfile, pline)
return 0;
}
+/* Utilities for building expressions.
+ Since complex expressions are recorded as symbols for use in other
+ expressions these return a symbolS * and not an expressionS *.
+ These explicitly do not take an "add_number" argument. */
+/* ??? For completeness' sake one might want expr_build_symbol.
+ It would just return its argument. */
+
+/* Build an expression for an unsigned constant.
+ The corresponding one for signed constants is missing because
+ there's currently no need for it. One could add an unsigned_p flag
+ but that seems more clumsy. */
+
+symbolS *
+expr_build_uconstant (value)
+ offsetT value;
+{
+ expressionS e;
+
+ e.X_op = O_constant;
+ e.X_add_number = value;
+ e.X_unsigned = 1;
+ return make_expr_symbol (&e);
+}
+
+/* Build an expression for OP s1. */
+
+symbolS *
+expr_build_unary (op, s1)
+ operatorT op;
+ symbolS *s1;
+{
+ expressionS e;
+
+ e.X_op = op;
+ e.X_add_symbol = s1;
+ e.X_add_number = 0;
+ return make_expr_symbol (&e);
+}
+
+/* Build an expression for s1 OP s2. */
+
+symbolS *
+expr_build_binary (op, s1, s2)
+ operatorT op;
+ symbolS *s1;
+ symbolS *s2;
+{
+ expressionS e;
+
+ e.X_op = op;
+ e.X_add_symbol = s1;
+ e.X_op_symbol = s2;
+ e.X_add_number = 0;
+ return make_expr_symbol (&e);
+}
+
/*
* Build any floating-point literal here.
* Also build any bignum literal here.
@@ -171,6 +228,32 @@ floating_constant (expressionP)
expressionP->X_add_number = -1;
}
+static valueT
+generic_bignum_to_int32 ()
+{
+ valueT number =
+ ((generic_bignum[1] & LITTLENUM_MASK) << LITTLENUM_NUMBER_OF_BITS)
+ | (generic_bignum[0] & LITTLENUM_MASK);
+ number &= 0xffffffff;
+ return number;
+}
+
+#ifdef BFD64
+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));
+ return number;
+}
+#endif
+
static void
integer_constant (radix, expressionP)
int radix;
@@ -219,7 +302,9 @@ integer_constant (radix, expressionP)
/* In MRI mode, the number may have a suffix indicating the
radix. For that matter, it might actually be a floating
point constant. */
- for (suffix = input_line_pointer; isalnum (*suffix); suffix++)
+ for (suffix = input_line_pointer;
+ isalnum ((unsigned char) *suffix);
+ suffix++)
{
if (*suffix == 'e' || *suffix == 'E')
flt = 1;
@@ -233,7 +318,7 @@ integer_constant (radix, expressionP)
else
{
c = *--suffix;
- if (islower (c))
+ if (islower ((unsigned char) c))
c = toupper (c);
if (c == 'B')
radix = 2;
@@ -286,7 +371,83 @@ integer_constant (radix, expressionP)
/* c contains character after number. */
/* input_line_pointer->char after c. */
small = (input_line_pointer - start - 1) < too_many_digits;
- if (!small)
+
+ 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. */
+
+ know (LITTLENUM_NUMBER_OF_BITS == 16);
+
+ for (c = '_'; c == '_'; num_little_digits+=2)
+ {
+
+ /* Convert one 64-bit word. */
+ int ndigit = 0;
+ number = 0;
+ for (c = *input_line_pointer++;
+ (digit = hex_value (c)) < maxdig;
+ c = *(input_line_pointer++))
+ {
+ number = number * radix + digit;
+ ndigit++;
+ }
+
+ /* Check for 8 digit per word max. */
+ if (ndigit > 8)
+ as_bad ("An 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.*/
+ 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];
+
+ /* 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. */
+
+ if (num_little_digits > SIZE_OF_LARGE_NUMBER - 1)
+ num_little_digits = SIZE_OF_LARGE_NUMBER - 1;
+
+ assert (num_little_digits >= 4);
+
+ if (num_little_digits != 8)
+ 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)
+ num_little_digits--;
+
+ if (num_little_digits <= 2)
+ {
+ /* will fit into 32 bits. */
+ number = generic_bignum_to_int32 ();
+ small = 1;
+ }
+#ifdef BFD64
+ else if (num_little_digits <= 4)
+ {
+ /* Will fit into 64 bits. */
+ number = generic_bignum_to_int64 ();
+ small = 1;
+ }
+#endif
+ else
+ {
+ small = 0;
+ number = num_little_digits; /* number of littlenums in the bignum. */
+ }
+ }
+ else if (!small)
{
/*
* we saw a lot of digits. manufacture a bignum the hard way.
@@ -298,6 +459,8 @@ integer_constant (radix, expressionP)
leader = generic_bignum;
generic_bignum[0] = 0;
generic_bignum[1] = 0;
+ generic_bignum[2] = 0;
+ generic_bignum[3] = 0;
input_line_pointer = start; /*->1st digit. */
c = *input_line_pointer++;
for (;
@@ -329,11 +492,17 @@ integer_constant (radix, expressionP)
if (leader < generic_bignum + 2)
{
/* will fit into 32 bits. */
- number =
- ((generic_bignum[1] & LITTLENUM_MASK) << LITTLENUM_NUMBER_OF_BITS)
- | (generic_bignum[0] & LITTLENUM_MASK);
+ number = generic_bignum_to_int32 ();
small = 1;
}
+#ifdef BFD64
+ else if (leader < generic_bignum + 4)
+ {
+ /* Will fit into 64 bits. */
+ number = generic_bignum_to_int64 ();
+ small = 1;
+ }
+#endif
else
{
number = leader - generic_bignum + 1; /* number of littlenums in the bignum. */
@@ -651,7 +820,8 @@ operand (expressionP)
{
input_line_pointer++;
floating_constant (expressionP);
- expressionP->X_add_number = -(isupper (c) ? tolower (c) : c);
+ expressionP->X_add_number =
+ - (isupper ((unsigned char) c) ? tolower (c) : c);
}
else
{
@@ -766,7 +936,8 @@ operand (expressionP)
case 'G':
input_line_pointer++;
floating_constant (expressionP);
- expressionP->X_add_number = -(isupper (c) ? tolower (c) : c);
+ expressionP->X_add_number =
+ - (isupper ((unsigned char) c) ? tolower (c) : c);
break;
case '$':
@@ -1328,6 +1499,13 @@ operator ()
++input_line_pointer;
return ret;
+ case '=':
+ if (input_line_pointer[1] != '=')
+ return op_encoding[c];
+
+ ++input_line_pointer;
+ return O_eq;
+
case '>':
switch (input_line_pointer[1])
{
@@ -1370,7 +1548,7 @@ operator ()
}
/*NOTREACHED*/
-}
+}
/* Parse an expression. */
diff --git a/contrib/binutils/gas/expr.h b/contrib/binutils/gas/expr.h
index 5002556..a963148 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, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -152,4 +152,9 @@ extern struct symbol *make_expr_symbol PARAMS ((expressionS * expressionP));
extern int expr_symbol_where
PARAMS ((struct symbol *, char **, unsigned int *));
+extern struct symbol * expr_build_uconstant PARAMS ((offsetT));
+extern struct symbol * expr_build_unary PARAMS ((operatorT, struct symbol *));
+extern struct symbol * expr_build_binary
+ PARAMS ((operatorT, struct symbol *, struct symbol *));
+
/* end of expr.h */
diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c
index 0418b40..aa22f35 100644
--- a/contrib/binutils/gas/frags.c
+++ b/contrib/binutils/gas/frags.c
@@ -1,5 +1,5 @@
/* frags.c - manage frags -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -218,10 +218,9 @@ frag_var (type, max_chars, var, subtype, symbol, offset, opcode)
frag_now->fr_symbol = symbol;
frag_now->fr_offset = offset;
frag_now->fr_opcode = opcode;
- /* Default these to zero. Only the ns32k uses these but they can't be
- conditionally included in `struct frag'. See as.h. */
- frag_now->fr_targ.ns32k.pcrel_adjust = 0;
- frag_now->fr_targ.ns32k.bsr = 0;
+#ifdef TC_FRAG_INIT
+ TC_FRAG_INIT (frag_now);
+#endif
as_where (&frag_now->fr_file, &frag_now->fr_line);
frag_new (max_chars);
return (retval);
@@ -254,10 +253,9 @@ frag_variant (type, max_chars, var, subtype, symbol, offset, opcode)
frag_now->fr_symbol = symbol;
frag_now->fr_offset = offset;
frag_now->fr_opcode = opcode;
- /* Default these to zero. Only the ns32k uses these but they can't be
- conditionally included in `struct frag'. See as.h. */
- frag_now->fr_targ.ns32k.pcrel_adjust = 0;
- frag_now->fr_targ.ns32k.bsr = 0;
+#ifdef TC_FRAG_INIT
+ TC_FRAG_INIT (frag_now);
+#endif
as_where (&frag_now->fr_file, &frag_now->fr_line);
frag_new (max_chars);
return (retval);
@@ -296,7 +294,7 @@ frag_align (alignment, fill_character, max)
new_off = ((abs_section_offset + alignment - 1)
&~ ((1 << alignment) - 1));
- if (max == 0 || new_off - abs_section_offset <= max)
+ if (max == 0 || new_off - abs_section_offset <= (addressT) max)
abs_section_offset = new_off;
}
else
@@ -330,13 +328,13 @@ frag_align_pattern (alignment, fill_pattern, n_fill, max)
memcpy (p, fill_pattern, n_fill);
}
-int
+addressT
frag_now_fix ()
{
if (now_seg == absolute_section)
return abs_section_offset;
- return ((char*)obstack_next_free (&frchain_now->frch_obstack)
- - frag_now->fr_literal);
+ return (addressT) ((char*) obstack_next_free (&frchain_now->frch_obstack)
+ - frag_now->fr_literal);
}
void
diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h
index 53877a9..fa834ee 100644
--- a/contrib/binutils/gas/frags.h
+++ b/contrib/binutils/gas/frags.h
@@ -1,5 +1,6 @@
/* frags.h - Header file for the frag concept.
- Copyright (C) 1987, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 92, 93, 94, 95, 97, 1998
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -18,10 +19,90 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
+#ifndef FRAGS_H
+#define FRAGS_H
+
#ifdef ANSI_PROTOTYPES
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. */
+ addressT fr_address;
+ /* Chain forward; ascending address order. Rooted in frch_root. */
+ struct frag *fr_next;
+
+ /* (Fixed) number of chars we know we have. May be 0. */
+ offsetT fr_fix;
+ /* (Variable) number of chars after above. May be 0. */
+ offsetT fr_var;
+ /* For variable-length tail. */
+ struct symbol *fr_symbol;
+ /* For variable-length tail. */
+ offsetT fr_offset;
+ /* Points to opcode low addr byte, for relaxation. */
+ char *fr_opcode;
+
+#ifndef NO_LISTING
+ struct list_info_struct *line;
+#endif
+
+ /* What state is my tail in? */
+ relax_stateT fr_type;
+ relax_substateT fr_subtype;
+
+#ifdef USING_CGEN
+ /* Don't include this unless using CGEN to keep frag size down. */
+ struct {
+ const struct cgen_insn *insn;
+ unsigned char opindex, opinfo;
+ } fr_cgen;
+#endif
+
+#ifdef TC_FRAG_TYPE
+ TC_FRAG_TYPE tc_frag_data;
+#endif
+
+ /* Where the frag was created, or where it became a variant frag. */
+ char *fr_file;
+ unsigned int fr_line;
+
+ /* Data begins here. */
+ char fr_literal[1];
+};
+
+#define SIZEOF_STRUCT_FRAG \
+((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;
+ instead, use frag_now_fix (). */
+COMMON fragS *frag_now;
+extern addressT frag_now_fix PARAMS ((void));
+
+/* For foreign-segment symbol fixups. */
+COMMON fragS zero_address_frag;
+/* For local common (N_BSS segment) fixups. */
+COMMON fragS bss_address_frag;
+
#if 0
/*
* A macro to speed up appending exactly 1 char
@@ -70,4 +151,4 @@ char *frag_var PARAMS ((relax_stateT type,
offsetT offset,
char *opcode));
-/* end of frags.h */
+#endif /* FRAGS_H */
diff --git a/contrib/binutils/gas/gasp.c b/contrib/binutils/gas/gasp.c
index 3fb51b8..d64c242 100644
--- a/contrib/binutils/gas/gasp.c
+++ b/contrib/binutils/gas/gasp.c
@@ -1,5 +1,5 @@
/* gasp.c - Gnu assembler preprocessor main program.
- Copyright (C) 1994, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -105,12 +105,12 @@ FILE *outfile;
#define WHITEBIT 8
#define COMMENTBIT 16
#define BASEBIT 32
-#define ISCOMMENTCHAR(x) (chartype[(unsigned)(x)] & COMMENTBIT)
-#define ISFIRSTCHAR(x) (chartype[(unsigned)(x)] & FIRSTBIT)
-#define ISNEXTCHAR(x) (chartype[(unsigned)(x)] & NEXTBIT)
-#define ISSEP(x) (chartype[(unsigned)(x)] & SEPBIT)
-#define ISWHITE(x) (chartype[(unsigned)(x)] & WHITEBIT)
-#define ISBASE(x) (chartype[(unsigned)(x)] & BASEBIT)
+#define ISCOMMENTCHAR(x) (chartype[(unsigned char)(x)] & COMMENTBIT)
+#define ISFIRSTCHAR(x) (chartype[(unsigned char)(x)] & FIRSTBIT)
+#define ISNEXTCHAR(x) (chartype[(unsigned char)(x)] & NEXTBIT)
+#define ISSEP(x) (chartype[(unsigned char)(x)] & SEPBIT)
+#define ISWHITE(x) (chartype[(unsigned char)(x)] & WHITEBIT)
+#define ISBASE(x) (chartype[(unsigned char)(x)] & BASEBIT)
static char chartype[256];
@@ -607,7 +607,7 @@ level_0 (idx, string, lhs)
lhs->value = 0;
- if (isdigit (string->ptr[idx]))
+ if (isdigit ((unsigned char) string->ptr[idx]))
{
idx = sb_strtol (idx, string, 10, &lhs->value);
}
@@ -1165,7 +1165,7 @@ change_base (idx, in, out)
idx++;
}
}
- else if (isdigit (in->ptr[idx]))
+ else if (isdigit ((unsigned char) in->ptr[idx]))
{
int value;
/* all numbers must start with a digit, let's chew it and
@@ -1717,7 +1717,7 @@ doinstr (idx, in, out)
idx = sb_skip_comma (idx, in);
idx = get_and_process (idx, in, &search);
idx = sb_skip_comma (idx, in);
- if (isdigit (in->ptr[idx]))
+ if (isdigit ((unsigned char) in->ptr[idx]))
{
idx = exp_get_abs (".instr needs absolute expresson.\n", idx, in, &start);
}
@@ -3579,7 +3579,7 @@ Usage: %s \n\
[-Ipath] add to include path list\n\
[in-file]\n");
if (status == 0)
- printf ("\nReport bugs to bug-gnu-utils@prep.ai.mit.edu\n");
+ printf ("\nReport bugs to bug-gnu-utils@gnu.org\n");
exit (status);
}
@@ -3630,6 +3630,7 @@ main (argc, argv)
case 'I':
{
include_path *p = (include_path *) xmalloc (sizeof (include_path));
+ p->next = NULL;
sb_new (&p->path);
sb_add_string (&p->path, optarg);
if (paths_tail)
diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c
index 51a3d84..dccd660 100644
--- a/contrib/binutils/gas/hash.c
+++ b/contrib/binutils/gas/hash.c
@@ -1,5 +1,5 @@
/* hash.c - hash table lookup strings -
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 1996
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -705,7 +705,7 @@ hash_ask (handle, string, access_type)
hash_found = TRUE;
break;
}
- if (slot->h == hcode)
+ if (slot->h == (unsigned long) hcode)
{
if (!strcmp (string, s))
{
@@ -735,7 +735,7 @@ hash_ask (handle, string, access_type)
hash_found = TRUE;
break;
}
- if (slot->h == hcode)
+ if (slot->h == (unsigned long) hcode)
{
if (!strcmp (string, s))
{
diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c
index 5271065..fee00f3 100644
--- a/contrib/binutils/gas/input-scrub.c
+++ b/contrib/binutils/gas/input-scrub.c
@@ -265,8 +265,11 @@ input_scrub_include_sb (from, position)
next_saved_file = input_scrub_push (position);
sb_new (&from_sb);
- /* Add the sentinel required by read.c. */
- sb_add_char (&from_sb, '\n');
+ if (from->len >= 1 && from->ptr[0] != '\n')
+ {
+ /* Add the sentinel required by read.c. */
+ sb_add_char (&from_sb, '\n');
+ }
sb_add_sb (&from_sb, from);
sb_index = 1;
@@ -408,21 +411,27 @@ bump_line_counters ()
* 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.
*/
-void
+int
new_logical_line (fname, line_number)
char *fname; /* DON'T destroy it! We point to it! */
int line_number;
{
- if (fname)
- {
- logical_input_file = fname;
- } /* if we have a file name */
-
if (line_number >= 0)
logical_input_line = line_number;
else if (line_number == -2 && logical_input_line > 0)
--logical_input_line;
+
+ if (fname
+ && (logical_input_file == NULL
+ || strcmp (logical_input_file, fname)))
+ {
+ logical_input_file = fname;
+ return 1;
+ }
+ else
+ return 0;
} /* new_logical_line() */
/*
diff --git a/contrib/binutils/gas/itbl-lex.l b/contrib/binutils/gas/itbl-lex.l
index 1703eda..a905ddd 100644
--- a/contrib/binutils/gas/itbl-lex.l
+++ b/contrib/binutils/gas/itbl-lex.l
@@ -105,8 +105,10 @@ HEX [0-9A-Fa-f]
}
%%
+#ifndef yywrap
int
yywrap ()
{
return 1;
}
+#endif
diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c
index f0c2295..2fa8ae9 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, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 1998
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -100,6 +101,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "subsegs.h"
#ifndef NO_LISTING
+
#ifndef LISTING_HEADER
#define LISTING_HEADER "GAS LISTING"
#endif
@@ -119,45 +121,42 @@ 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
{
- char *filename;
- int linenum;
- FILE *file;
struct file_info_struct *next;
+ char *filename;
+ long pos;
+ unsigned int linenum;
int at_end;
}
-
file_info_type;
/* this structure rememebrs which line from which file goes into which
frag */
-typedef struct list_info_struct
+struct list_info_struct
{
/* Frag which this line of source is nearest to */
fragS *frag;
+
/* 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;
+ /* The expanded text of any macro that may have been executing. */
+ char *line_contents;
+
/* 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 */
- int hll_line;
-
+ unsigned int hll_line;
/* Pointer to any error message associated with this line */
char *message;
@@ -174,10 +173,13 @@ typedef struct list_info_struct
} edict;
char *edict_arg;
-}
-
-list_info_type;
+ /* Nonzero if this line is to be omitted because it contains
+ debugging information. This can become a flags field if we come
+ up with more information to store here. */
+ int debugging;
+};
+typedef struct list_info_struct list_info_type;
static struct list_info_struct *head;
struct list_info_struct *listing_tail;
@@ -189,15 +191,16 @@ static int paper_height = 60;
/* File to output listings to. */
static FILE *list_file;
-/* this static array is used to keep the text of data to be printed
- before the start of the line.
- It is stored so we can give a bit more info on the next line. To much, and large
- initialized arrays will use up lots of paper.
- */
+/* This static array is used to keep the text of data to be printed
+ before the start of the line. */
-static char data_buffer[100];
-static unsigned int data_buffer_size;
+#define MAX_BYTES \
+ (((LISTING_WORD_SIZE * 2) + 1) * listing_lhs_width \
+ + ((((LISTING_WORD_SIZE * 2) + 1) * listing_lhs_width_second) \
+ * listing_lhs_cont_lines) \
+ + 20)
+static char *data_buffer;
/* Prototypes. */
static void listing_message PARAMS ((const char *name, const char *message));
@@ -214,7 +217,7 @@ static void print_source PARAMS ((file_info_type *current_file,
list_info_type *list,
char *buffer,
unsigned int width));
-static int debugging_pseudo PARAMS ((char *line));
+static int debugging_pseudo PARAMS ((list_info_type *, const char *));
static void listing_listing PARAMS ((char *name));
@@ -248,9 +251,15 @@ listing_error (message)
}
+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;
+int listing_rhs_width = LISTING_RHS_WIDTH;
static file_info_type *file_info_head;
+static file_info_type *last_open_file_info;
+static FILE *last_open_file;
static file_info_type *
file_info (file_name)
@@ -273,13 +282,10 @@ file_info (file_name)
file_info_head = p;
p->filename = xmalloc ((unsigned long) strlen (file_name) + 1);
strcpy (p->filename, file_name);
+ p->pos = 0;
p->linenum = 0;
p->at_end = 0;
- p->file = fopen (p->filename, "r");
- if (p->file)
- fgetc (p->file);
-
return p;
}
@@ -301,7 +307,7 @@ listing_newline (ps)
unsigned int line;
static unsigned int last_line = 0xffff;
static char *last_file = NULL;
- list_info_type *new;
+ list_info_type *new = NULL;
if (listing == 0)
return;
@@ -309,34 +315,77 @@ listing_newline (ps)
if (now_seg == absolute_section)
return;
+#ifdef OBJ_ELF
+ /* In ELF, anything in a section beginning with .debug or .line is
+ considered to be debugging information. This includes the
+ statement which switches us into the debugging section, which we
+ can only set after we are already in the debugging section. */
+ if ((listing & LISTING_NODEBUG) != 0
+ && listing_tail != NULL
+ && ! listing_tail->debugging)
+ {
+ const char *segname;
+
+ segname = segment_name (now_seg);
+ if (strncmp (segname, ".debug", sizeof ".debug" - 1) == 0
+ || strncmp (segname, ".line", sizeof ".line" - 1) == 0)
+ listing_tail->debugging = 1;
+ }
+#endif
+
as_where (&file, &line);
- if (line != last_line || (last_file && file && strcmp(file, last_file)))
+ if (ps == NULL)
{
- last_line = line;
- last_file = file;
- new_frag ();
+ if (line == last_line && !(last_file && file && strcmp(file, last_file)))
+ return;
new = (list_info_type *) xmalloc (sizeof (list_info_type));
- new->frag = frag_now;
- new->line = line;
- new->file = file_info (file);
+ new->line_contents = NULL;
+ }
+ else
+ {
+ new = (list_info_type *) xmalloc (sizeof (list_info_type));
+ new->line_contents = ps;
+ }
- if (listing_tail)
- {
- listing_tail->next = new;
- }
- else
- {
- head = new;
- }
- listing_tail = new;
- new->next = (list_info_type *) NULL;
- new->message = (char *) NULL;
- new->edict = EDICT_NONE;
- new->hll_file = (file_info_type *) NULL;
- new->hll_line = 0;
- new_frag ();
+ 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;
+ new->line = line;
+ new->file = file_info (file);
+ new->next = (list_info_type *) NULL;
+ new->message = (char *) NULL;
+ new->edict = EDICT_NONE;
+ new->hll_file = (file_info_type *) NULL;
+ new->hll_line = 0;
+ new->debugging = 0;
+ new_frag ();
+
+#ifdef OBJ_ELF
+ /* In ELF, anything in a section beginning with .debug or .line is
+ considered to be debugging information. */
+ if ((listing & LISTING_NODEBUG) != 0)
+ {
+ const char *segname;
+
+ segname = segment_name (now_seg);
+ if (strncmp (segname, ".debug", sizeof ".debug" - 1) == 0
+ || strncmp (segname, ".line", sizeof ".line" - 1) == 0)
+ new->debugging = 1;
+ }
+#endif
}
/* Attach all current frags to the previous line instead of the
@@ -386,15 +435,32 @@ buffer_line (file, line, size)
char *p = line;
/* If we couldn't open the file, return an empty line */
- if (file->file == (FILE *) NULL || file->at_end)
+ if (file->at_end)
+ return "";
+
+ /* Check the cache and see if we last used this file. */
+ if (!last_open_file_info || file != last_open_file_info)
{
- return "";
- }
+ if (last_open_file)
+ {
+ last_open_file_info->pos = ftell (last_open_file);
+ fclose (last_open_file);
+ }
- if (file->linenum == 0)
- rewind (file->file);
+ last_open_file_info = file;
+ last_open_file = fopen (file->filename, "r");
+ if (last_open_file == NULL)
+ {
+ file->at_end = 1;
+ return "";
+ }
- c = fgetc (file->file);
+ /* Seek to where we were last time this file was open. */
+ if (file->pos)
+ fseek(last_open_file, file->pos, SEEK_SET);
+ }
+
+ c = fgetc (last_open_file);
size -= 1; /* leave room for null */
@@ -404,7 +470,7 @@ buffer_line (file, line, size)
*p++ = c;
count++;
- c = fgetc (file->file);
+ c = fgetc (last_open_file);
}
if (c == EOF)
@@ -435,7 +501,7 @@ listing_page (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 >= paper_height)) && paper_height != 0)
+ if ((eject || (on_page >= (unsigned int) paper_height)) && paper_height != 0)
{
unsigned int c = 10;
int had_title = 0;
@@ -478,15 +544,13 @@ static unsigned int
calc_hex (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 byte_in_frag;
-
/* Find first frag which says it belongs to this line */
frag = list->frag;
while (frag && frag->line != list)
@@ -501,9 +565,10 @@ calc_hex (list)
{
/* Print as many bytes from the fixed part as is sensible */
byte_in_frag = 0;
- while (byte_in_frag < frag_ptr->fr_fix && data_buffer_size < sizeof (data_buffer) - 10)
+ while ((offsetT) byte_in_frag < frag_ptr->fr_fix
+ && data_buffer_size < MAX_BYTES - 3)
{
- if (address == ~0)
+ if (address == ~ (unsigned int) 0)
{
address = frag_ptr->fr_address;
}
@@ -519,11 +584,11 @@ calc_hex (list)
unsigned int var_rep_idx = byte_in_frag;
/* Print as many bytes from the variable part as is sensible */
- while ((byte_in_frag
+ while (((offsetT) byte_in_frag
< frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset)
- && data_buffer_size < sizeof (data_buffer) - 10)
+ && data_buffer_size < MAX_BYTES - 3)
{
- if (address == ~0)
+ if (address == ~ (unsigned int) 0)
{
address = frag_ptr->fr_address;
}
@@ -539,14 +604,14 @@ calc_hex (list)
var_rep_idx++;
byte_in_frag++;
- if (var_rep_idx >= frag_ptr->fr_fix + frag_ptr->fr_var)
+ if ((offsetT) var_rep_idx >= frag_ptr->fr_fix + frag_ptr->fr_var)
var_rep_idx = var_rep_max;
}
}
frag_ptr = frag_ptr->fr_next;
}
- data_buffer[data_buffer_size++] = 0;
+ data_buffer[data_buffer_size] = '\0';
return address;
}
@@ -570,9 +635,9 @@ print_lines (list, lineno, string, address)
/* Print the stuff on the first line */
listing_page (list);
- nchars = (LISTING_WORD_SIZE * 2 + 1) * LISTING_LHS_WIDTH;
+ nchars = (LISTING_WORD_SIZE * 2 + 1) * listing_lhs_width;
/* Print the hex for the first line */
- if (address == ~0)
+ if (address == ~ (unsigned int) 0)
{
fprintf (list_file, "% 4d ", lineno);
for (idx = 0; idx < nchars; idx++)
@@ -625,11 +690,11 @@ print_lines (list, lineno, string, address)
}
for (lines = 0;
- lines < LISTING_LHS_CONT_LINES
- && *src;
+ lines < (unsigned int) listing_lhs_cont_lines && *src;
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 */
fprintf (list_file, "% 4d ", lineno);
@@ -671,8 +736,14 @@ list_symbol_table ()
for (ptr = symbol_rootP; ptr != (symbolS *) NULL; ptr = symbol_next (ptr))
{
- if (ptr->sy_frag->line)
+ if (SEG_NORMAL (S_GET_SEGMENT (ptr))
+ || S_GET_SEGMENT (ptr) == absolute_section)
{
+#ifdef BFD_ASSEMBLER
+ /* Don't report section symbols. They are not interesting. */
+ if (ptr->bsym->flags & BSF_SECTION_SYM)
+ continue;
+#endif
if (S_GET_NAME (ptr))
{
char buf[30], fmt[8];
@@ -702,11 +773,20 @@ list_symbol_table ()
got_some = 1;
}
- fprintf (list_file, "%20s:%-5d %s:%s %s\n",
- ptr->sy_frag->line->file->filename,
- ptr->sy_frag->line->line,
- segment_name (S_GET_SEGMENT (ptr)),
- buf, S_GET_NAME (ptr));
+ if (ptr->sy_frag && ptr->sy_frag->line)
+ {
+ fprintf (list_file, "%20s:%-5d %s:%s %s\n",
+ ptr->sy_frag->line->file->filename,
+ ptr->sy_frag->line->line,
+ segment_name (S_GET_SEGMENT (ptr)),
+ buf, S_GET_NAME (ptr));
+ }
+ else
+ {
+ fprintf (list_file, "%33s:%s %s\n",
+ segment_name (S_GET_SEGMENT (ptr)),
+ buf, S_GET_NAME (ptr));
+ }
on_page++;
listing_page (0);
@@ -729,11 +809,7 @@ list_symbol_table ()
{
if (S_GET_NAME (ptr) && strlen (S_GET_NAME (ptr)) != 0)
{
- if (ptr->sy_frag->line == 0
-#ifdef S_IS_REGISTER
- && !S_IS_REGISTER (ptr)
-#endif
- && S_GET_SEGMENT (ptr) != reg_section)
+ if (S_GET_SEGMENT (ptr) == undefined_section)
{
if (!got_some)
{
@@ -763,13 +839,13 @@ print_source (current_file, list, buffer, width)
char *buffer;
unsigned int width;
{
- if (current_file->file)
+ if (!current_file->at_end)
{
while (current_file->linenum < list->hll_line
&& !current_file->at_end)
{
char *p = buffer_line (current_file, buffer, width);
- fprintf (list_file, "%4d:%-13s **** %s\n", current_file->linenum,
+ fprintf (list_file, "%4u:%-13s **** %s\n", current_file->linenum,
current_file->filename, p);
on_page++;
listing_page (list);
@@ -778,17 +854,48 @@ print_source (current_file, list, buffer, width)
}
/* Sometimes the user doesn't want to be bothered by the debugging
- records inserted by the compiler, see if the line is suspicious */
+ records inserted by the compiler, see if the line is suspicious. */
static int
-debugging_pseudo (line)
- char *line;
+debugging_pseudo (list, line)
+ list_info_type *list;
+ const char *line;
{
- while (isspace (*line))
+ static int in_debug;
+ int was_debug;
+
+ if (list->debugging)
+ {
+ in_debug = 1;
+ return 1;
+ }
+
+ was_debug = in_debug;
+ in_debug = 0;
+
+ while (isspace ((unsigned char) *line))
line++;
if (*line != '.')
- return 0;
+ {
+#ifdef OBJ_ELF
+ /* The ELF compiler sometimes emits blank lines after switching
+ out of a debugging section. If the next line drops us back
+ into debugging information, then don't print the blank line.
+ This is a hack for a particular compiler behaviour, not a
+ general case. */
+ if (was_debug
+ && *line == '\0'
+ && list->next != NULL
+ && list->next->debugging)
+ {
+ in_debug = 1;
+ return 1;
+ }
+#endif
+
+ return 0;
+ }
line++;
@@ -819,7 +926,6 @@ debugging_pseudo (line)
return 1;
return 0;
-
}
static void
@@ -834,7 +940,8 @@ listing_listing (name)
int show_listing = 1;
unsigned int width;
- buffer = xmalloc (LISTING_RHS_WIDTH);
+ buffer = xmalloc (listing_rhs_width);
+ data_buffer = xmalloc (MAX_BYTES);
eject = 1;
list = head;
@@ -851,8 +958,8 @@ listing_listing (name)
while (list)
{
- width = LISTING_RHS_WIDTH > paper_width ? paper_width :
- LISTING_RHS_WIDTH;
+ width = listing_rhs_width > paper_width ? paper_width :
+ listing_rhs_width;
switch (list->edict)
{
@@ -889,26 +996,38 @@ listing_listing (name)
current_hll_file = list->hll_file;
}
- if (current_hll_file && list->hll_line && listing & LISTING_HLL)
+ if (current_hll_file && list->hll_line && (listing & LISTING_HLL))
{
print_source (current_hll_file, list, buffer, width);
}
- while (list->file->file
- && list->file->linenum < list->line
- && !list->file->at_end)
+ if (list->line_contents)
{
- unsigned int address;
+ if (!((listing & LISTING_NODEBUG)
+ && debugging_pseudo (list, list->line_contents)))
+ {
+ print_lines (list, list->file->linenum,
+ list->line_contents, calc_hex (list));
+ }
+ }
+ else
+ {
+ while (list->file->linenum < list->line
+ && !list->file->at_end)
+ {
+ unsigned int address;
- p = buffer_line (list->file, buffer, width);
+ p = buffer_line (list->file, buffer, width);
- if (list->file->linenum < list->line)
- address = ~ (unsigned int) 0;
- else
- address = calc_hex (list);
+ if (list->file->linenum < list->line)
+ address = ~ (unsigned int) 0;
+ else
+ address = calc_hex (list);
- if (!((listing & LISTING_NODEBUG) && debugging_pseudo (p)))
- print_lines (list, list->file->linenum, p, address);
+ if (!((listing & LISTING_NODEBUG)
+ && debugging_pseudo (list, p)))
+ print_lines (list, list->file->linenum, p, address);
+ }
}
if (list->edict == EDICT_EJECT)
@@ -918,8 +1037,7 @@ listing_listing (name)
}
else
{
- while (list->file->file
- && list->file->linenum < list->line
+ while (list->file->linenum < list->line
&& !list->file->at_end)
p = buffer_line (list->file, buffer, width);
}
@@ -929,7 +1047,10 @@ listing_listing (name)
list = list->next;
}
+
free (buffer);
+ free (data_buffer);
+ data_buffer = NULL;
}
void
@@ -937,7 +1058,6 @@ listing_print (name)
char *name;
{
int using_stdout;
- file_info_type *fi;
title = "";
subtitle = "";
@@ -981,13 +1101,9 @@ listing_print (name)
as_perror ("error closing list file: %s", name);
}
- for (fi = file_info_head; fi != NULL; fi = fi->next)
+ if (last_open_file)
{
- if (fi->file != NULL)
- {
- fclose (fi->file);
- fi->file = NULL;
- }
+ fclose (last_open_file);
}
}
diff --git a/contrib/binutils/gas/listing.h b/contrib/binutils/gas/listing.h
index 8e36b64..6f64b09 100644
--- a/contrib/binutils/gas/listing.h
+++ b/contrib/binutils/gas/listing.h
@@ -28,11 +28,12 @@
#define LISTING_HLL 8
#define LISTING_NODEBUG 16
#define LISTING_NOCOND 32
+#define LISTING_MACEXP 64
-#define LISTING_DEFAULT (LISTING_LISTING | LISTING_HLL | LISTING_SYMBOLS)
+#define LISTING_DEFAULT (LISTING_LISTING | LISTING_HLL | LISTING_SYMBOLS)
#ifndef NO_LISTING
-#define LISTING_NEWLINE() { if (listing) listing_newline(input_line_pointer); }
+#define LISTING_NEWLINE() { if (listing) listing_newline(NULL); }
#else
#define LISTING_NEWLINE() {;}
#endif
@@ -55,6 +56,11 @@ void listing_title PARAMS ((int depth));
void listing_warning PARAMS ((const char *message));
void listing_width PARAMS ((unsigned int x));
+extern int listing_lhs_width;
+extern int listing_lhs_width_second;
+extern int listing_lhs_cont_lines;
+extern int listing_rhs_width;
+
#endif /* __listing_h__ */
/* end of listing.h */
diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c
index e2f1ff9..1737414 100644
--- a/contrib/binutils/gas/macro.c
+++ b/contrib/binutils/gas/macro.c
@@ -1,5 +1,5 @@
/* macro.c - macro support for gas and gasp
- Copyright (C) 1994, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -22,6 +22,34 @@
02111-1307, USA. */
#include "config.h"
+
+/* AIX requires this to be the first thing in the file. */
+#ifdef __GNUC__
+# ifndef alloca
+# ifdef __STDC__
+extern void *alloca ();
+# else
+extern char *alloca ();
+# endif
+# endif
+#else
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+# if !defined (__STDC__) && !defined (__hpux)
+extern char *alloca ();
+# else
+extern void *alloca ();
+# endif /* __STDC__, __hpux */
+# endif /* alloca */
+# endif /* _AIX */
+# endif /* HAVE_ALLOCA_H */
+#endif
+
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
@@ -93,7 +121,8 @@ static const char *macro_expand PARAMS ((int, sb *, macro_entry *, sb *, int));
#define ISSEP(x) \
((x) == ' ' || (x) == '\t' || (x) == ',' || (x) == '"' || (x) == ';' \
- || (x) == '<' || (x) == '>' || (x) == ')' || (x) == '(')
+ || (x) == ')' || (x) == '(' \
+ || ((macro_alternate || macro_mri) && ((x) == '<' || (x) == '>')))
#define ISBASE(x) \
((x) == 'b' || (x) == 'B' \
@@ -269,49 +298,31 @@ getstring (idx, in, acc)
while (idx < in->len
&& (in->ptr[idx] == '"'
- || in->ptr[idx] == '<'
+ || (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
|| (in->ptr[idx] == '\'' && macro_alternate)))
{
if (in->ptr[idx] == '<')
{
- if (macro_alternate || macro_mri)
+ int nest = 0;
+ idx++;
+ while ((in->ptr[idx] != '>' || nest)
+ && idx < in->len)
{
- int nest = 0;
- idx++;
- while ((in->ptr[idx] != '>' || nest)
- && idx < in->len)
+ if (in->ptr[idx] == '!')
{
- if (in->ptr[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++]);
- }
+ 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++]);
}
- idx++;
- }
- else
- {
- int code;
- idx++;
- idx = ((*macro_expr)
- ("character code in string must be absolute expression",
- idx, in, &code));
- sb_add_char (acc, code);
-
-#if 0
- if (in->ptr[idx] != '>')
- ERROR ((stderr, "Missing > for character code.\n"));
-#endif
- idx++;
}
+ idx++;
}
else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'')
{
@@ -383,7 +394,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
sb_add_string (out, buf);
}
else if (in->ptr[idx] == '"'
- || in->ptr[idx] == '<'
+ || (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
|| (macro_alternate && in->ptr[idx] == '\''))
{
if (macro_alternate
@@ -410,7 +421,8 @@ get_any_string (idx, in, out, expand, pretend_quoted)
|| (in->ptr[idx] != ' '
&& in->ptr[idx] != '\t'
&& in->ptr[idx] != ','
- && in->ptr[idx] != '<')))
+ && (in->ptr[idx] != '<'
+ || (! macro_alternate && ! macro_mri)))))
{
if (in->ptr[idx] == '"'
|| in->ptr[idx] == '\'')
@@ -541,7 +553,7 @@ define_macro (idx, in, label, get_line, namep)
if (label != NULL && label->len != 0)
{
sb_add_sb (&name, label);
- if (in->ptr[idx] == '(')
+ if (idx < in->len && in->ptr[idx] == '(')
{
/* It's the label: MACRO (formals,...) sort */
idx = do_formals (macro, idx + 1, in);
@@ -563,7 +575,7 @@ define_macro (idx, in, label, get_line, namep)
/* and stick it in the macro hash table */
for (idx = 0; idx < name.len; idx++)
- if (isupper (name.ptr[idx]))
+ if (isupper ((unsigned char) name.ptr[idx]))
name.ptr[idx] = tolower (name.ptr[idx]);
namestr = sb_terminate (&name);
hash_jam (macro_hash, namestr, (PTR) macro);
@@ -629,6 +641,11 @@ sub_actual (start, in, t, formal_hash, kind, out, copyifnotthere)
sb_add_sb (out, &ptr->def);
}
}
+ else if (kind == '&')
+ {
+ /* Doing this permits people to use & in macro bodies. */
+ sb_add_char (out, '&');
+ }
else if (copyifnotthere)
{
sb_add_sb (out, t);
@@ -673,8 +690,7 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
}
else
{
- /* FIXME: Why do we do this? It prevents people from
- using the & operator in a macro. */
+ /* FIXME: Why do we do this? */
src = sub_actual (src + 1, in, &t, formal_hash, '&', out, 0);
}
}
@@ -705,7 +721,7 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
{
/* Sub in the macro invocation number */
- char buffer[6];
+ char buffer[10];
src++;
sprintf (buffer, "%05d", macro_number);
sb_add_string (out, buffer);
@@ -945,13 +961,14 @@ macro_expand (idx, in, m, out, comment_char)
scan = idx;
while (scan < in->len
&& !ISSEP (in->ptr[scan])
+ && !(macro_mri && in->ptr[scan] == '\'')
&& (!macro_alternate && in->ptr[scan] != '='))
scan++;
if (scan < in->len && !macro_alternate && in->ptr[scan] == '=')
{
is_keyword = 1;
- if (is_positional)
- return "can't mix positional and keyword arguments";
+
+ /* It's OK to go from positional to keyword. */
/* This is a keyword arg, fetch the formal name and
then the actual stuff */
@@ -1099,11 +1116,11 @@ check_macro (line, expand, comment_char, error)
|| *s == '$')
++s;
- copy = (char *) xmalloc (s - line + 1);
+ copy = (char *) alloca (s - line + 1);
memcpy (copy, line, s - line);
copy[s - line] = '\0';
for (cs = copy; *cs != '\0'; cs++)
- if (isupper (*cs))
+ if (isupper ((unsigned char) *cs))
*cs = tolower (*cs);
macro = (macro_entry *) hash_find (macro_hash, copy);
diff --git a/contrib/binutils/gas/messages.c b/contrib/binutils/gas/messages.c
index 1e06232..7dc399d 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, 1997
+ Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -241,7 +241,7 @@ void
as_warn (const char *format,...)
{
va_list args;
- char buffer[200];
+ char buffer[2000];
if (!flag_no_warnings)
{
@@ -259,7 +259,7 @@ as_warn (format, va_alist)
va_dcl
{
va_list args;
- char buffer[200];
+ char buffer[2000];
if (!flag_no_warnings)
{
@@ -280,7 +280,7 @@ void
as_warn_where (char *file, unsigned int line, const char *format,...)
{
va_list args;
- char buffer[200];
+ char buffer[2000];
if (!flag_no_warnings)
{
@@ -300,7 +300,7 @@ as_warn_where (file, line, format, va_alist)
va_dcl
{
va_list args;
- char buffer[200];
+ char buffer[2000];
if (!flag_no_warnings)
{
@@ -350,7 +350,7 @@ void
as_bad (const char *format,...)
{
va_list args;
- char buffer[200];
+ char buffer[2000];
va_start (args, format);
vsprintf (buffer, format, args);
@@ -367,7 +367,7 @@ as_bad (format, va_alist)
va_dcl
{
va_list args;
- char buffer[200];
+ char buffer[2000];
va_start (args);
vsprintf (buffer, format, args);
@@ -386,7 +386,7 @@ void
as_bad_where (char *file, unsigned int line, const char *format,...)
{
va_list args;
- char buffer[200];
+ char buffer[2000];
va_start (args, format);
vsprintf (buffer, format, args);
@@ -405,7 +405,7 @@ as_bad_where (file, line, format, va_alist)
va_dcl
{
va_list args;
- char buffer[200];
+ char buffer[2000];
va_start (args);
vsprintf (buffer, format, args);
diff --git a/contrib/binutils/gas/output-file.c b/contrib/binutils/gas/output-file.c
index c53281b..552aac1 100644
--- a/contrib/binutils/gas/output-file.c
+++ b/contrib/binutils/gas/output-file.c
@@ -1,5 +1,5 @@
/* output-file.c - Deal with the output file
- Copyright (C) 1987, 90, 91, 93, 92, 94, 95, 1996
+ Copyright (C) 1987, 90, 91, 93, 92, 94, 95, 96, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -56,6 +56,8 @@ output_file_create (name)
#ifdef BFD_ASSEMBLER
bfd_set_arch_mach (stdoutput, TARGET_ARCH, TARGET_MACH);
#endif
+ if (flag_traditional_format)
+ stdoutput->flags |= BFD_TRADITIONAL_FORMAT;
}
void
diff --git a/contrib/binutils/gas/read.c b/contrib/binutils/gas/read.c
index 85d221d..cde61bb 100644
--- a/contrib/binutils/gas/read.c
+++ b/contrib/binutils/gas/read.c
@@ -1,5 +1,5 @@
/* read.c - read a source file -
- Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -63,8 +63,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
char *input_line_pointer; /*->next char of source file to parse. */
-int generate_asm_lineno = 0; /* flag to generate line stab for .s file */
-
#if BITS_PER_CHAR != 8
/* The following table is indexed by[(char)] and will break if
a char does not have exactly 256 states (hopefully 0:255!)! */
@@ -130,9 +128,9 @@ char lex_type[256] =
char is_end_of_line[256] =
{
#ifdef CR_EOL
- _, _, _, _, _, _, _, _, _, _, 99, _, _, 99, _, _, /* @abcdefghijklmno */
+ 99, _, _, _, _, _, _, _, _, _, 99, _, _, 99, _, _, /* @abcdefghijklmno */
#else
- _, _, _, _, _, _, _, _, _, _, 99, _, _, _, _, _, /* @abcdefghijklmno */
+ 99, _, _, _, _, _, _, _, _, _, 99, _, _, _, _, _, /* @abcdefghijklmno */
#endif
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, /* */
#ifdef TC_HPPA
@@ -167,12 +165,12 @@ static char *old_buffer; /* JF a hack */
static char *old_input;
static char *old_limit;
-/* Variables for handling include file directory list. */
+/* Variables for handling include file directory table. */
-char **include_dirs; /* List of pointers to directories to
+char **include_dirs; /* Table of pointers to directories to
search for .include's */
-int include_dir_count; /* How many are in the list */
-int include_dir_maxlen = 1;/* Length of longest in list */
+int include_dir_count; /* How many are in the table */
+int include_dir_maxlen = 1;/* Length of longest in table */
#ifndef WORKING_DOT_WORD
struct broken_word *broken_words;
@@ -199,6 +197,15 @@ symbolS *mri_common_symbol;
may be needed. */
static int mri_pending_align;
+#ifndef NO_LISTING
+#ifdef OBJ_ELF
+/* This variable is set to be non-zero if the next string we see might
+ be the name of the source file in DWARF debugging information. See
+ the comment in emit_expr for the format we look for. */
+static int dwarf_file_string;
+#endif
+#endif
+
static void cons_worker PARAMS ((int, int));
static int scrub_from_string PARAMS ((char **));
static void do_align PARAMS ((int, char *, int, int));
@@ -364,6 +371,7 @@ static const pseudo_typeS potable[] =
/* size */
{"space", s_space, 0},
{"skip", s_space, 0},
+ {"sleb128", s_leb128, 1},
{"spc", s_ignore, 0},
{"stabd", s_stab, 'd'},
{"stabn", s_stab, 'n'},
@@ -386,6 +394,7 @@ static const pseudo_typeS potable[] =
{"title", listing_title, 0}, /* Listing title */
{"ttl", listing_title, 0},
/* type */
+ {"uleb128", s_leb128, 0},
/* use */
/* val */
{"xcom", s_comm, 0},
@@ -487,7 +496,8 @@ read_a_source_file (name)
buffer = input_scrub_new_file (name);
listing_file (name);
- listing_newline ("");
+ listing_newline (NULL);
+ register_dependency (name);
while ((buffer_limit = input_scrub_next_buffer (&input_line_pointer)) != 0)
{ /* We have another line to parse. */
@@ -601,7 +611,39 @@ read_a_source_file (name)
c = *input_line_pointer++;
}
know (c != ' '); /* No further leading whitespace. */
- LISTING_NEWLINE ();
+
+#ifndef NO_LISTING
+ /* If listing is on, and we are expanding a macro, then give
+ the listing code the contents of the expanded line. */
+ if (listing)
+ {
+ if ((listing & LISTING_MACEXP) && macro_nest > 0)
+ {
+ char *copy;
+ int len;
+
+ /* Find the end of the current expanded macro line. */
+ 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);
+ 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';
+
+ /* Install the line with the listing facility. */
+ listing_newline (copy);
+ }
+ else
+ listing_newline (NULL);
+ }
+#endif
+
/*
* C is the 1st significant character.
* Input_line_pointer points after that character.
@@ -670,7 +712,7 @@ read_a_source_file (name)
char *s2 = s;
while (*s2)
{
- if (isupper (*s2))
+ if (isupper ((unsigned char) *s2))
*s2 = tolower (*s2);
s2++;
}
@@ -783,20 +825,29 @@ read_a_source_file (name)
c = *input_line_pointer;
*input_line_pointer = '\0';
+ if (debug_type == DEBUG_STABS)
+ stabs_generate_asm_lineno ();
+
#ifdef OBJ_GENERATE_ASM_LINENO
- if (generate_asm_lineno == 0)
+#ifdef ECOFF_DEBUGGING
+ /* ECOFF assemblers automatically generate
+ debugging information. FIXME: This should
+ probably be handled elsewhere. */
+ if (debug_type == DEBUG_NONE)
{
- if (ecoff_no_current_file ())
- generate_asm_lineno = 1;
+ if (ecoff_no_current_file ())
+ debug_type = DEBUG_ECOFF;
}
- if (generate_asm_lineno == 1)
+
+ if (debug_type == DEBUG_ECOFF)
{
unsigned int lineno;
char *s;
as_where (&s, &lineno);
OBJ_GENERATE_ASM_LINENO (s, lineno);
- }
+ }
+#endif
#endif
if (macro_defined)
@@ -846,7 +897,7 @@ read_a_source_file (name)
continue;
if ((LOCAL_LABELS_DOLLAR || LOCAL_LABELS_FB)
- && isdigit (c))
+ && isdigit ((unsigned char) c))
{
/* local label ("4:") */
char *backup = input_line_pointer;
@@ -855,7 +906,7 @@ read_a_source_file (name)
temp = c - '0';
- while (isdigit (*input_line_pointer))
+ while (isdigit ((unsigned char) *input_line_pointer))
{
temp = (temp * 10) + *input_line_pointer - '0';
++input_line_pointer;
@@ -1110,8 +1161,21 @@ do_align (n, fill, len, max)
if (fill == NULL)
{
- /* FIXME: Fix this right for BFD! */
+ int maybe_text;
+
+#ifdef BFD_ASSEMBLER
+ if ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
+ maybe_text = 1;
+ else
+ maybe_text = 0;
+#else
if (now_seg != data_section && now_seg != bss_section)
+ maybe_text = 1;
+ else
+ maybe_text = 0;
+#endif
+
+ if (maybe_text)
default_fill = NOP_OPCODE;
else
default_fill = 0;
@@ -1240,7 +1304,7 @@ s_align (arg, bytes_p)
{
char ab[16];
- if (fill_len > sizeof ab)
+ if ((size_t) fill_len > sizeof ab)
abort ();
md_number_to_chars (ab, fill, fill_len);
do_align (align, ab, fill_len, max);
@@ -1263,7 +1327,7 @@ s_align_bytes (arg)
s_align (arg, 1);
}
-/* Handle the .align pseud-op on machines where ".align 4" means align
+/* Handle the .align pseudo-op on machines where ".align 4" means align
to a 2**4 boundary. */
void
@@ -1496,7 +1560,8 @@ s_app_file (appfile)
/* 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. */
- new_logical_line (s, appfile ? -2 : -1);
+ int may_omit
+ = (! new_logical_line (s, appfile ? -2 : -1) && appfile);
/* In MRI mode, the preprocessor may have inserted an extraneous
backquote. */
@@ -1506,14 +1571,18 @@ s_app_file (appfile)
++input_line_pointer;
demand_empty_rest_of_line ();
+ if (! may_omit)
+ {
#ifdef LISTING
- if (listing)
- listing_source_file (s);
+ if (listing)
+ listing_source_file (s);
#endif
- }
+ register_dependency (s);
#ifdef obj_app_file
- obj_app_file (s);
+ obj_app_file (s);
#endif
+ }
+ }
}
/* Handle the .appline pseudo-op. This is automatically generated by
@@ -1602,61 +1671,91 @@ void
s_fill (ignore)
int ignore;
{
- long temp_repeat = 0;
- long temp_size = 1;
- register long temp_fill = 0;
+ expressionS rep_exp;
+ long size = 1;
+ register long fill = 0;
char *p;
#ifdef md_flush_pending_output
md_flush_pending_output ();
#endif
- temp_repeat = get_absolute_expression ();
+ get_known_segmented_expression (&rep_exp);
if (*input_line_pointer == ',')
{
input_line_pointer++;
- temp_size = get_absolute_expression ();
+ size = get_absolute_expression ();
if (*input_line_pointer == ',')
{
input_line_pointer++;
- temp_fill = get_absolute_expression ();
+ fill = get_absolute_expression ();
}
}
+
/* This is to be compatible with BSD 4.2 AS, not for any rational reason. */
#define BSD_FILL_SIZE_CROCK_8 (8)
- if (temp_size > BSD_FILL_SIZE_CROCK_8)
+ if (size > BSD_FILL_SIZE_CROCK_8)
{
as_warn (".fill size clamped to %d.", BSD_FILL_SIZE_CROCK_8);
- temp_size = BSD_FILL_SIZE_CROCK_8;
+ size = BSD_FILL_SIZE_CROCK_8;
}
- if (temp_size < 0)
+ if (size < 0)
{
as_warn ("Size negative: .fill ignored.");
- temp_size = 0;
+ size = 0;
}
- else if (temp_repeat <= 0)
+ else if (rep_exp.X_op == O_constant && rep_exp.X_add_number <= 0)
{
- if (temp_repeat < 0)
+ if (rep_exp.X_add_number < 0)
as_warn ("Repeat < 0, .fill ignored");
- temp_size = 0;
+ size = 0;
}
- if (temp_size && !need_pass_2)
+ if (size && !need_pass_2)
{
- p = frag_var (rs_fill, (int) temp_size, (int) temp_size,
- (relax_substateT) 0, (symbolS *) 0, (offsetT) temp_repeat,
- (char *) 0);
- memset (p, 0, (unsigned int) temp_size);
+ if (rep_exp.X_op == O_constant)
+ {
+ p = frag_var (rs_fill, (int) size, (int) size,
+ (relax_substateT) 0, (symbolS *) 0,
+ (offsetT) rep_exp.X_add_number,
+ (char *) 0);
+ }
+ else
+ {
+ /* We don't have a constant repeat count, so we can't use
+ rs_fill. We can get the same results out of rs_space,
+ but its argument is in bytes, so we must multiply the
+ repeat count by size. */
+
+ symbolS *rep_sym;
+ rep_sym = make_expr_symbol (&rep_exp);
+ if (size != 1)
+ {
+ expressionS size_exp;
+ size_exp.X_op = O_constant;
+ size_exp.X_add_number = size;
+
+ rep_exp.X_op = O_multiply;
+ rep_exp.X_add_symbol = rep_sym;
+ rep_exp.X_op_symbol = make_expr_symbol (&size_exp);
+ rep_exp.X_add_number = 0;
+ rep_sym = make_expr_symbol (&rep_exp);
+ }
+
+ 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. */
#define BSD_FILL_SIZE_CROCK_4 (4)
- md_number_to_chars (p, (valueT) temp_fill,
- (temp_size > BSD_FILL_SIZE_CROCK_4
+ md_number_to_chars (p, (valueT) fill,
+ (size > BSD_FILL_SIZE_CROCK_4
? BSD_FILL_SIZE_CROCK_4
- : (int) temp_size));
+ : (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.
@@ -1810,11 +1909,14 @@ s_linkonce (ignore)
demand_empty_rest_of_line ();
}
-void
-s_lcomm (needs_align)
+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) */
int needs_align;
+ /* 1 if the alignment value should be interpreted as the byte boundary,
+ rather than the power of 2. */
+ int bytes_p;
{
register char *name;
register char c;
@@ -1909,6 +2011,20 @@ s_lcomm (needs_align)
return;
}
align = get_absolute_expression ();
+ if (bytes_p)
+ {
+ /* Convert to a power of 2. */
+ if (align != 0)
+ {
+ unsigned int i;
+
+ for (i = 0; (align & 1) == 0; align >>= 1, ++i)
+ ;
+ if (align != 1)
+ as_bad ("Alignment not a power of 2");
+ align = i;
+ }
+ }
if (align > max_alignment)
{
align = max_alignment;
@@ -1984,7 +2100,20 @@ s_lcomm (needs_align)
subseg_set (current_seg, current_subseg);
demand_empty_rest_of_line ();
-} /* s_lcomm() */
+} /* s_lcomm_internal() */
+
+void
+s_lcomm (needs_align)
+ int needs_align;
+{
+ s_lcomm_internal (needs_align, 0);
+}
+
+void s_lcomm_bytes (needs_align)
+ int needs_align;
+{
+ s_lcomm_internal (needs_align, 1);
+}
void
s_lsym (ignore)
@@ -2095,7 +2224,8 @@ get_line_sb (line)
}
sb_add_char (line, *input_line_pointer++);
}
- while (input_line_pointer < buffer_limit && *input_line_pointer == '\n')
+ while (input_line_pointer < buffer_limit
+ && is_end_of_line[(unsigned char) *input_line_pointer])
{
if (input_line_pointer[-1] == '\n')
bump_line_counters ();
@@ -2572,7 +2702,24 @@ s_set (equiv)
if ((symbolP = symbol_find (name)) == NULL
&& (symbolP = md_undefined_symbol (name)) == NULL)
{
- symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+#ifndef NO_LISTING
+ /* When doing symbol listings, play games with dummy fragments living
+ outside the normal fragment chain to record the file and line info
+ for this symbol. */
+ if (listing & LISTING_SYMBOLS)
+ {
+ extern struct list_info_struct *listing_tail;
+ 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);
+ dummy_frag->fr_symbol = symbolP;
+ }
+ else
+#endif
+ symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag);
+
#ifdef OBJ_COFF
/* "set" symbols are local unless otherwise specified. */
SF_SET_LOCAL (symbolP);
@@ -2791,7 +2938,8 @@ s_float_space (float_type)
/* Skip any 0{letter} that may be present. Don't even check if the
* letter is legal. */
- if (input_line_pointer[0] == '0' && isalpha (input_line_pointer[1]))
+ if (input_line_pointer[0] == '0'
+ && isalpha ((unsigned char) input_line_pointer[1]))
input_line_pointer += 2;
/* Accept :xxxx, where the x's are hex digits, for a floating point
@@ -2891,7 +3039,7 @@ ignore_rest_of_line () /* For suspect lines: gives warning. */
{
if (!is_end_of_line[(unsigned char) *input_line_pointer])
{
- if (isprint (*input_line_pointer))
+ if (isprint ((unsigned char) *input_line_pointer))
as_bad ("Rest of line ignored. First ignored character is `%c'.",
*input_line_pointer);
else
@@ -2967,7 +3115,8 @@ pseudo_set (symbolP)
S_CLEAR_EXTERNAL (symbolP);
#endif /* OBJ_AOUT or OBJ_BOUT */
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
- symbolP->sy_frag = &zero_address_frag;
+ if (exp.X_op != O_constant)
+ symbolP->sy_frag = &zero_address_frag;
break;
case O_register:
@@ -3133,7 +3282,6 @@ s_rva (size)
cons_worker (size, 1);
}
-
/* Put the contents of expression EXP into the object file using
NBYTES bytes. If need_pass_2 is 1, this does nothing. */
@@ -3150,6 +3298,73 @@ emit_expr (exp, nbytes)
if (need_pass_2)
return;
+#ifndef NO_LISTING
+#ifdef OBJ_ELF
+ /* When gcc emits DWARF 1 debugging pseudo-ops, a line number will
+ appear as a four byte positive constant in the .line section,
+ followed by a 2 byte 0xffff. Look for that case here. */
+ {
+ static int dwarf_line = -1;
+
+ if (strcmp (segment_name (now_seg), ".line") != 0)
+ dwarf_line = -1;
+ else if (dwarf_line >= 0
+ && nbytes == 2
+ && exp->X_op == O_constant
+ && (exp->X_add_number == -1 || exp->X_add_number == 0xffff))
+ listing_source_line ((unsigned int) dwarf_line);
+ else if (nbytes == 4
+ && exp->X_op == O_constant
+ && exp->X_add_number >= 0)
+ dwarf_line = exp->X_add_number;
+ else
+ dwarf_line = -1;
+ }
+
+ /* When gcc emits DWARF 1 debugging pseudo-ops, a file name will
+ appear as a 2 byte TAG_compile_unit (0x11) followed by a 2 byte
+ AT_sibling (0x12) followed by a four byte address of the sibling
+ followed by a 2 byte AT_name (0x38) followed by the name of the
+ file. We look for that case here. */
+ {
+ static int dwarf_file = 0;
+
+ if (strcmp (segment_name (now_seg), ".debug") != 0)
+ dwarf_file = 0;
+ else if (dwarf_file == 0
+ && nbytes == 2
+ && exp->X_op == O_constant
+ && exp->X_add_number == 0x11)
+ dwarf_file = 1;
+ else if (dwarf_file == 1
+ && nbytes == 2
+ && exp->X_op == O_constant
+ && exp->X_add_number == 0x12)
+ dwarf_file = 2;
+ else if (dwarf_file == 2
+ && nbytes == 4)
+ dwarf_file = 3;
+ else if (dwarf_file == 3
+ && nbytes == 2
+ && exp->X_op == O_constant
+ && exp->X_add_number == 0x38)
+ dwarf_file = 4;
+ else
+ dwarf_file = 0;
+
+ /* The variable dwarf_file_string tells stringer that the string
+ may be the name of the source file. */
+ if (dwarf_file == 4)
+ dwarf_file_string = 1;
+ else
+ dwarf_file_string = 0;
+ }
+#endif
+#endif
+
+ if (check_eh_frame (exp, &nbytes))
+ return;
+
op = exp->X_op;
/* Allow `.word 0' in the absolute section. */
@@ -3302,7 +3517,7 @@ emit_expr (exp, nbytes)
}
else if (op == O_big)
{
- int size;
+ unsigned int size;
LITTLENUM_TYPE *nums;
know (nbytes % CHARS_PER_LITTLENUM == 0);
@@ -3555,7 +3770,7 @@ parse_mri_cons (exp, nbytes)
TC_PARSE_CONS_EXPRESSION (exp, nbytes);
else
{
- int scan = 0;
+ unsigned int scan;
unsigned int result = 0;
/* An MRI style string. Cut into as many bytes as will fit into
@@ -3788,7 +4003,8 @@ float_cons (float_type)
* has no use for such information. Lusers beware: you get
* diagnostics if your input is ill-conditioned.
*/
- if (input_line_pointer[0] == '0' && isalpha (input_line_pointer[1]))
+ if (input_line_pointer[0] == '0'
+ && isalpha ((unsigned char) input_line_pointer[1]))
input_line_pointer += 2;
/* Accept :xxxx, where the x's are hex digits, for a floating
@@ -3853,6 +4069,306 @@ float_cons (float_type)
demand_empty_rest_of_line ();
} /* float_cons() */
+/* Return the size of a LEB128 value */
+
+static inline int
+sizeof_sleb128 (value)
+ offsetT value;
+{
+ register int size = 0;
+ register unsigned byte;
+
+ do
+ {
+ byte = (value & 0x7f);
+ /* Sadly, we cannot rely on typical arithmetic right shift behaviour.
+ Fortunately, we can structure things so that the extra work reduces
+ to a noop on systems that do things "properly". */
+ value = (value >> 7) | ~(-(offsetT)1 >> 7);
+ size += 1;
+ }
+ while (!(((value == 0) && ((byte & 0x40) == 0))
+ || ((value == -1) && ((byte & 0x40) != 0))));
+
+ return size;
+}
+
+static inline int
+sizeof_uleb128 (value)
+ valueT value;
+{
+ register int size = 0;
+ register unsigned byte;
+
+ do
+ {
+ byte = (value & 0x7f);
+ value >>= 7;
+ size += 1;
+ }
+ while (value != 0);
+
+ return size;
+}
+
+inline int
+sizeof_leb128 (value, sign)
+ valueT value;
+ int sign;
+{
+ if (sign)
+ return sizeof_sleb128 ((offsetT) value);
+ else
+ return sizeof_uleb128 (value);
+}
+
+/* Output a LEB128 value. */
+
+static inline int
+output_sleb128 (p, value)
+ char *p;
+ offsetT value;
+{
+ register char *orig = p;
+ register int more;
+
+ do
+ {
+ unsigned byte = (value & 0x7f);
+
+ /* Sadly, we cannot rely on typical arithmetic right shift behaviour.
+ Fortunately, we can structure things so that the extra work reduces
+ to a noop on systems that do things "properly". */
+ value = (value >> 7) | ~(-(offsetT)1 >> 7);
+
+ more = !((((value == 0) && ((byte & 0x40) == 0))
+ || ((value == -1) && ((byte & 0x40) != 0))));
+ if (more)
+ byte |= 0x80;
+
+ *p++ = byte;
+ }
+ while (more);
+
+ return p - orig;
+}
+
+static inline int
+output_uleb128 (p, value)
+ char *p;
+ valueT value;
+{
+ char *orig = p;
+
+ do
+ {
+ unsigned byte = (value & 0x7f);
+ value >>= 7;
+ if (value != 0)
+ /* More bytes to follow. */
+ byte |= 0x80;
+
+ *p++ = byte;
+ }
+ while (value != 0);
+
+ return p - orig;
+}
+
+inline int
+output_leb128 (p, value, sign)
+ char *p;
+ valueT value;
+ int sign;
+{
+ if (sign)
+ return output_sleb128 (p, (offsetT) value);
+ else
+ return output_uleb128 (p, value);
+}
+
+/* Do the same for bignums. We combine sizeof with output here in that
+ we don't output for NULL values of P. It isn't really as critical as
+ for "normal" values that this be streamlined. */
+
+static int
+output_big_sleb128 (p, bignum, size)
+ char *p;
+ LITTLENUM_TYPE *bignum;
+ int size;
+{
+ char *orig = p;
+ valueT val = 0;
+ int loaded = 0;
+ unsigned byte;
+
+ /* Strip leading sign extensions off the bignum. */
+ while (size > 0 && bignum[size-1] == (LITTLENUM_TYPE)-1)
+ size--;
+
+ do
+ {
+ if (loaded < 7 && size > 0)
+ {
+ val |= (*bignum << loaded);
+ loaded += 8 * CHARS_PER_LITTLENUM;
+ size--;
+ bignum++;
+ }
+
+ byte = val & 0x7f;
+ loaded -= 7;
+ val >>= 7;
+
+ if (size == 0)
+ {
+ if ((val == 0 && (byte & 0x40) == 0)
+ || (~(val | ~(((valueT)1 << loaded) - 1)) == 0
+ && (byte & 0x40) != 0))
+ byte |= 0x80;
+ }
+
+ if (orig)
+ *p = byte;
+ p++;
+ }
+ while (byte & 0x80);
+
+ return p - orig;
+}
+
+static int
+output_big_uleb128 (p, bignum, size)
+ char *p;
+ LITTLENUM_TYPE *bignum;
+ int size;
+{
+ char *orig = p;
+ valueT val = 0;
+ int loaded = 0;
+ unsigned byte;
+
+ /* Strip leading zeros off the bignum. */
+ /* XXX: Is this needed? */
+ while (size > 0 && bignum[size-1] == 0)
+ size--;
+
+ do
+ {
+ if (loaded < 7 && size > 0)
+ {
+ val |= (*bignum << loaded);
+ loaded += 8 * CHARS_PER_LITTLENUM;
+ size--;
+ bignum++;
+ }
+
+ byte = val & 0x7f;
+ loaded -= 7;
+ val >>= 7;
+
+ if (size > 0 || val)
+ byte |= 0x80;
+
+ if (orig)
+ *p = byte;
+ p++;
+ }
+ while (byte & 0x80);
+
+ return p - orig;
+}
+
+static inline int
+output_big_leb128 (p, bignum, size, sign)
+ char *p;
+ LITTLENUM_TYPE *bignum;
+ int size, sign;
+{
+ if (sign)
+ return output_big_sleb128 (p, bignum, size);
+ else
+ return output_big_uleb128 (p, bignum, size);
+}
+
+/* Generate the appropriate fragments for a given expression to emit a
+ leb128 value. */
+
+void
+emit_leb128_expr(exp, sign)
+ expressionS *exp;
+ int sign;
+{
+ operatorT op = exp->X_op;
+
+ if (op == O_absent || op == O_illegal)
+ {
+ as_warn ("zero assumed for missing expression");
+ exp->X_add_number = 0;
+ op = O_constant;
+ }
+ else if (op == O_big && exp->X_add_number <= 0)
+ {
+ as_bad ("floating point number invalid; zero assumed");
+ exp->X_add_number = 0;
+ op = O_constant;
+ }
+ else if (op == O_register)
+ {
+ as_warn ("register value used as expression");
+ op = O_constant;
+ }
+
+ if (op == O_constant)
+ {
+ /* If we've got a constant, emit the thing directly right now. */
+
+ valueT value = exp->X_add_number;
+ int size;
+ char *p;
+
+ size = sizeof_leb128 (value, sign);
+ p = frag_more (size);
+ output_leb128 (p, value, sign);
+ }
+ else if (op == O_big)
+ {
+ /* O_big is a different sort of constant. */
+
+ int size;
+ char *p;
+
+ size = output_big_leb128 (NULL, generic_bignum, exp->X_add_number, sign);
+ p = frag_more (size);
+ output_big_leb128 (p, generic_bignum, exp->X_add_number, sign);
+ }
+ else
+ {
+ /* Otherwise, we have to create a variable sized fragment and
+ resolve things later. */
+
+ frag_var (rs_leb128, sizeof_uleb128 (~(valueT)0), 0, sign,
+ make_expr_symbol (exp), 0, (char *) NULL);
+ }
+}
+
+/* Parse the .sleb128 and .uleb128 pseudos. */
+
+void
+s_leb128 (sign)
+ int sign;
+{
+ expressionS exp;
+
+ do {
+ expression (&exp);
+ emit_leb128_expr (&exp, sign);
+ } while (*input_line_pointer++ == ',');
+
+ input_line_pointer--;
+ demand_empty_rest_of_line ();
+}
+
/*
* stringer()
*
@@ -3868,6 +4384,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
register int append_zero; /* 0: don't append '\0', else 1 */
{
register unsigned int c;
+ char *start;
#ifdef md_flush_pending_output
md_flush_pending_output ();
@@ -3897,6 +4414,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
{
case '\"':
++input_line_pointer; /*->1st char of string. */
+ start = input_line_pointer;
while (is_a_char (c = next_char_of_string ()))
{
FRAG_APPEND_1_CHAR (c);
@@ -3906,6 +4424,27 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
FRAG_APPEND_1_CHAR (0);
}
know (input_line_pointer[-1] == '\"');
+
+#ifndef NO_LISTING
+#ifdef OBJ_ELF
+ /* In ELF, when gcc is emitting DWARF 1 debugging output, it
+ will emit .string with a filename in the .debug section
+ after a sequence of constants. See the comment in
+ emit_expr for the sequence. emit_expr will set
+ dwarf_file_string to non-zero if this string might be a
+ source file name. */
+ if (strcmp (segment_name (now_seg), ".debug") != 0)
+ dwarf_file_string = 0;
+ else if (dwarf_file_string)
+ {
+ c = input_line_pointer[-1];
+ input_line_pointer[-1] = '\0';
+ listing_source_file (start);
+ input_line_pointer[-1] = c;
+ }
+#endif
+#endif
+
break;
case '<':
input_line_pointer++;
@@ -4211,7 +4750,7 @@ equals (sym_name, reassign)
int reassign;
{
register symbolS *symbolP; /* symbol we are working with */
- char *stop;
+ char *stop = NULL;
char stopc;
input_line_pointer++;
@@ -4263,7 +4802,15 @@ s_include (arg)
char *path;
if (! flag_m68k_mri)
- filename = demand_copy_string (&i);
+ {
+ filename = demand_copy_string (&i);
+ if (filename == NULL)
+ {
+ /* demand_copy_string has already printed an error and
+ called ignore_rest_of_line. */
+ return;
+ }
+ }
else
{
SKIP_WHITESPACE ();
@@ -4298,6 +4845,7 @@ s_include (arg)
path = filename;
gotit:
/* malloc Storage leak when file is found on path. FIXME-SOMEDAY. */
+ register_dependency (path);
newbuf = input_scrub_include_file (path, input_line_pointer);
buffer_limit = input_scrub_next_buffer (&input_line_pointer);
} /* s_include() */
diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h
index bd0aa78..4e1e226 100644
--- a/contrib/binutils/gas/read.h
+++ b/contrib/binutils/gas/read.h
@@ -1,5 +1,6 @@
/* read.h - of read.c
- Copyright (C) 1986, 90, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1986, 90, 92, 93, 94, 95, 96, 1997
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -58,8 +59,10 @@ extern const char comment_chars[];
extern const char line_comment_chars[];
extern const char line_separator_chars[];
-/* This flag whether to generate line info for asm file */
-extern int generate_asm_lineno;
+/* Table of -I directories. */
+extern char **include_dirs;
+extern int include_dir_count;
+extern int include_dir_maxlen;
/* The offset in the absolute section. */
extern addressT abs_section_offset;
@@ -95,12 +98,18 @@ extern void add_include_dir PARAMS ((char *path));
extern void cons PARAMS ((int nbytes));
extern void demand_empty_rest_of_line PARAMS ((void));
extern void emit_expr PARAMS ((expressionS *exp, unsigned int nbytes));
+extern void emit_leb128_expr PARAMS ((expressionS *, int));
extern void equals PARAMS ((char *sym_name, int reassign));
extern void float_cons PARAMS ((int float_type));
extern void ignore_rest_of_line PARAMS ((void));
+extern int output_leb128 PARAMS ((char *, valueT, int sign));
extern void pseudo_set PARAMS ((symbolS * symbolP));
extern void read_a_source_file PARAMS ((char *name));
extern void read_begin PARAMS ((void));
+extern void read_print_statistics PARAMS ((FILE *));
+extern int sizeof_leb128 PARAMS ((valueT, int sign));
+extern void stabs_generate_asm_lineno PARAMS ((void));
+
extern void s_abort PARAMS ((int));
extern void s_align_bytes PARAMS ((int arg));
extern void s_align_ptwo PARAMS ((int));
@@ -125,6 +134,8 @@ extern void s_ignore PARAMS ((int arg));
extern void s_include PARAMS ((int arg));
extern void s_irp PARAMS ((int arg));
extern void s_lcomm PARAMS ((int needs_align));
+extern void s_lcomm_bytes PARAMS ((int needs_align));
+extern void s_leb128 PARAMS ((int sign));
extern void s_linkonce PARAMS ((int));
extern void s_lsym PARAMS ((int));
extern void s_macro PARAMS ((int));
@@ -143,6 +154,5 @@ 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));
-extern void read_print_statistics PARAMS ((FILE *));
/* end of read.h */
diff --git a/contrib/binutils/gas/stabs.c b/contrib/binutils/gas/stabs.c
index def437b..e58e6ff 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, 1997
+ Copyright (C) 1989, 90, 91, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -71,46 +71,47 @@ get_stab_string_offset (string, stabstr_secname)
{
unsigned int length;
unsigned int retval;
+ segT save_seg;
+ subsegT save_subseg;
+ segT seg;
+ char *p;
if (! SEPARATE_STAB_SECTIONS)
abort ();
- retval = 0;
length = strlen (string);
- if (length > 0)
- { /* Ordinary case. */
- segT save_seg;
- subsegT save_subseg;
- segT seg;
- char *p;
- save_seg = now_seg;
- save_subseg = now_subseg;
+ save_seg = now_seg;
+ save_subseg = now_subseg;
- /* Create the stab string section. */
- seg = subseg_new (stabstr_secname, 0);
+ /* Create the stab string section. */
+ seg = subseg_new (stabstr_secname, 0);
- retval = seg_info (seg)->stabu.stab_string_size;
- if (retval <= 0)
- {
- /* Make sure the first string is empty. */
- p = frag_more (1);
- *p = 0;
- retval = seg_info (seg)->stabu.stab_string_size = 1;
+ retval = seg_info (seg)->stabu.stab_string_size;
+ if (retval <= 0)
+ {
+ /* Make sure the first string is empty. */
+ p = frag_more (1);
+ *p = 0;
+ retval = seg_info (seg)->stabu.stab_string_size = 1;
#ifdef BFD_ASSEMBLER
- bfd_set_section_flags (stdoutput, seg, SEC_READONLY | SEC_DEBUGGING);
- if (seg->name == stabstr_secname)
- seg->name = xstrdup (stabstr_secname);
+ bfd_set_section_flags (stdoutput, seg, SEC_READONLY | SEC_DEBUGGING);
+ if (seg->name == stabstr_secname)
+ seg->name = xstrdup (stabstr_secname);
#endif
- }
+ }
+ if (length > 0)
+ { /* Ordinary case. */
p = frag_more (length + 1);
strcpy (p, string);
seg_info (seg)->stabu.stab_string_size += length + 1;
-
- subseg_set (save_seg, save_subseg);
}
+ else
+ retval = 0;
+
+ subseg_set (save_seg, save_subseg);
return retval;
}
@@ -459,3 +460,55 @@ s_desc (ignore)
} /* s_desc() */
#endif /* defined (S_SET_DESC) */
+
+/* Generate stabs debugging information for the current line. This is
+ used to produce debugging information for an assembler file. */
+
+void
+stabs_generate_asm_lineno ()
+{
+ static char *last_file;
+ static int lineno_count;
+ char *hold;
+ char *file;
+ unsigned int lineno;
+ char buf[100];
+ char sym[30];
+
+ /* 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;
+
+ as_where (&file, &lineno);
+
+ if (last_file == NULL
+ || strcmp (last_file, file) != 0)
+ {
+ sprintf (sym, "%sF%d", FAKE_LABEL_NAME, lineno_count);
+ ++lineno_count;
+
+ sprintf (buf, "\"%s\",%d,0,0,%s\n", file,
+ last_file == NULL ? N_SO : N_SOL,
+ sym);
+ input_line_pointer = buf;
+ s_stab ('s');
+ colon (sym);
+
+ if (last_file != NULL)
+ free (last_file);
+ last_file = xstrdup (file);
+ }
+
+ sprintf (sym, "%sL%d", FAKE_LABEL_NAME, lineno_count);
+ ++lineno_count;
+
+ sprintf (buf, "%d,0,%d,%s\n", N_SLINE, lineno, sym);
+ input_line_pointer = buf;
+ s_stab ('n');
+ colon (sym);
+
+ input_line_pointer = hold;
+}
diff --git a/contrib/binutils/gas/stamp-h.in b/contrib/binutils/gas/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/contrib/binutils/gas/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c
index 2d5b1f7..28986d6 100644
--- a/contrib/binutils/gas/subsegs.c
+++ b/contrib/binutils/gas/subsegs.c
@@ -287,7 +287,7 @@ subseg_set_rest (seg, subseg)
newP->fix_root = NULL;
newP->fix_tail = NULL;
#endif
- obstack_begin (&newP->frch_obstack, 5000);
+ obstack_begin (&newP->frch_obstack, chunksize);
#if __GNUC__ >= 2
obstack_alignment_mask (&newP->frch_obstack) = __alignof__ (fragS) - 1;
#endif
diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c
index e1c30d6..8bb601f 100644
--- a/contrib/binutils/gas/symbols.c
+++ b/contrib/binutils/gas/symbols.c
@@ -1,5 +1,5 @@
/* symbols.c -symbol table-
- Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -636,87 +636,81 @@ verify_symbol_chain_2 (sym)
pass over the symbol table to resolve any symbols with complex
values. */
-void
-resolve_symbol_value (symp)
+valueT
+resolve_symbol_value (symp, finalize)
symbolS *symp;
+ int finalize;
{
int resolved;
+ valueT final_val;
+ segT final_seg;
if (symp->sy_resolved)
- return;
+ {
+ if (symp->sy_value.X_op == O_constant)
+ return (valueT) symp->sy_value.X_add_number;
+ else
+ return 0;
+ }
resolved = 0;
+ final_seg = S_GET_SEGMENT (symp);
if (symp->sy_resolving)
{
- as_bad ("Symbol definition loop encountered at %s",
- S_GET_NAME (symp));
- S_SET_VALUE (symp, (valueT) 0);
+ if (finalize)
+ as_bad ("Symbol definition loop encountered at %s", S_GET_NAME (symp));
+ final_val = 0;
resolved = 1;
}
else
{
- offsetT left, right, val;
+ symbolS *add_symbol, *op_symbol;
+ offsetT left, right;
segT seg_left, seg_right;
+ operatorT op;
symp->sy_resolving = 1;
- /* Simplify addition or subtraction of a constant by folding the
- constant into X_add_number. */
- if (symp->sy_value.X_op == O_add
- || symp->sy_value.X_op == O_subtract)
- {
- resolve_symbol_value (symp->sy_value.X_add_symbol);
- resolve_symbol_value (symp->sy_value.X_op_symbol);
- if (S_GET_SEGMENT (symp->sy_value.X_op_symbol) == absolute_section)
- {
- right = S_GET_VALUE (symp->sy_value.X_op_symbol);
- if (symp->sy_value.X_op == O_add)
- symp->sy_value.X_add_number += right;
- else
- symp->sy_value.X_add_number -= right;
- symp->sy_value.X_op = O_symbol;
- symp->sy_value.X_op_symbol = NULL;
- }
- else if ((S_GET_SEGMENT (symp->sy_value.X_add_symbol)
- == absolute_section)
- && symp->sy_value.X_op == O_add)
- {
- left = S_GET_VALUE (symp->sy_value.X_add_symbol);
- symp->sy_value.X_add_symbol = symp->sy_value.X_op_symbol;
- symp->sy_value.X_add_number += left;
- symp->sy_value.X_op = O_symbol;
- symp->sy_value.X_op_symbol = NULL;
- }
- }
+ /* Help out with CSE. */
+ add_symbol = symp->sy_value.X_add_symbol;
+ op_symbol = symp->sy_value.X_op_symbol;
+ final_val = symp->sy_value.X_add_number;
+ op = symp->sy_value.X_op;
- switch (symp->sy_value.X_op)
+ switch (op)
{
+ default:
+ BAD_CASE (op);
+ break;
+
case O_absent:
- S_SET_VALUE (symp, 0);
+ final_val = 0;
/* Fall through. */
+
case O_constant:
- S_SET_VALUE (symp, S_GET_VALUE (symp) + symp->sy_frag->fr_address);
- if (S_GET_SEGMENT (symp) == expr_section)
- S_SET_SEGMENT (symp, absolute_section);
+ final_val += symp->sy_frag->fr_address;
+ if (final_seg == expr_section)
+ final_seg = absolute_section;
resolved = 1;
break;
case O_symbol:
- resolve_symbol_value (symp->sy_value.X_add_symbol);
+ case O_symbol_rva:
+ left = resolve_symbol_value (add_symbol, finalize);
+ do_symbol:
if (symp->sy_mri_common)
{
/* This is a symbol inside an MRI common section. The
relocation routines are going to handle it specially.
Don't change the value. */
- S_SET_VALUE (symp, symp->sy_value.X_add_number);
- resolved = symp->sy_value.X_add_symbol->sy_resolved;
+ resolved = add_symbol->sy_resolved;
break;
}
- if (symp->sy_value.X_add_number == 0)
- copy_symbol_attributes (symp, symp->sy_value.X_add_symbol);
+ if (finalize && final_val == 0)
+ copy_symbol_attributes (symp, add_symbol);
/* If we have equated this symbol to an undefined symbol, we
keep X_op set to O_symbol, and we don't change
@@ -724,46 +718,45 @@ resolve_symbol_value (symp)
relocation to detect this case, and convert the
relocation to be against the symbol to which this symbol
is equated. */
- if (! S_IS_DEFINED (symp->sy_value.X_add_symbol)
- || S_IS_COMMON (symp->sy_value.X_add_symbol))
+ if (! S_IS_DEFINED (add_symbol) || S_IS_COMMON (add_symbol))
{
- symp->sy_value.X_op = O_symbol;
- S_SET_SEGMENT (symp,
- S_GET_SEGMENT (symp->sy_value.X_add_symbol));
+ if (finalize)
+ {
+ symp->sy_value.X_op = O_symbol;
+ S_SET_SEGMENT (symp, S_GET_SEGMENT (add_symbol));
+ symp->sy_value.X_add_number = final_val;
+ }
+ final_val = 0;
+ resolved = add_symbol->sy_resolved;
+ goto exit_dont_set_value;
}
else
{
- S_SET_VALUE (symp,
- (symp->sy_value.X_add_number
- + symp->sy_frag->fr_address
- + S_GET_VALUE (symp->sy_value.X_add_symbol)));
- if (S_GET_SEGMENT (symp) == expr_section
- || S_GET_SEGMENT (symp) == undefined_section)
- S_SET_SEGMENT (symp,
- S_GET_SEGMENT (symp->sy_value.X_add_symbol));
+ final_val += symp->sy_frag->fr_address + left;
+ if (final_seg == expr_section || final_seg == undefined_section)
+ final_seg = S_GET_SEGMENT (add_symbol);
}
- resolved = symp->sy_value.X_add_symbol->sy_resolved;
+ resolved = add_symbol->sy_resolved;
break;
case O_uminus:
case O_bit_not:
case O_logical_not:
- resolve_symbol_value (symp->sy_value.X_add_symbol);
- if (symp->sy_value.X_op == O_uminus)
- val = - S_GET_VALUE (symp->sy_value.X_add_symbol);
- else if (symp->sy_value.X_op == O_logical_not)
- val = ! S_GET_VALUE (symp->sy_value.X_add_symbol);
+ left = resolve_symbol_value (add_symbol, finalize);
+
+ if (op == O_uminus)
+ left = -left;
+ else if (op == O_logical_not)
+ left = !left;
else
- val = ~ S_GET_VALUE (symp->sy_value.X_add_symbol);
- S_SET_VALUE (symp,
- (val
- + symp->sy_value.X_add_number
- + symp->sy_frag->fr_address));
- if (S_GET_SEGMENT (symp) == expr_section
- || S_GET_SEGMENT (symp) == undefined_section)
- S_SET_SEGMENT (symp, absolute_section);
- resolved = symp->sy_value.X_add_symbol->sy_resolved;
+ left = ~left;
+
+ final_val += left + symp->sy_frag->fr_address;
+ if (final_seg == expr_section || final_seg == undefined_section)
+ final_seg = absolute_section;
+
+ resolved = add_symbol->sy_resolved;
break;
case O_multiply:
@@ -785,12 +778,35 @@ resolve_symbol_value (symp)
case O_gt:
case O_logical_and:
case O_logical_or:
- resolve_symbol_value (symp->sy_value.X_add_symbol);
- resolve_symbol_value (symp->sy_value.X_op_symbol);
- seg_left = S_GET_SEGMENT (symp->sy_value.X_add_symbol);
- seg_right = S_GET_SEGMENT (symp->sy_value.X_op_symbol);
- left = S_GET_VALUE (symp->sy_value.X_add_symbol);
- right = S_GET_VALUE (symp->sy_value.X_op_symbol);
+ left = resolve_symbol_value (add_symbol, finalize);
+ right = resolve_symbol_value (op_symbol, finalize);
+ seg_left = S_GET_SEGMENT (add_symbol);
+ seg_right = S_GET_SEGMENT (op_symbol);
+
+ /* Simplify addition or subtraction of a constant by folding the
+ constant into X_add_number. */
+ if (op == O_add || op == O_subtract)
+ {
+ if (seg_right == absolute_section)
+ {
+ if (op == O_add)
+ final_val += right;
+ else
+ final_val -= right;
+ op = O_symbol;
+ op_symbol = NULL;
+ goto do_symbol;
+ }
+ else if (seg_left == absolute_section && op == O_add)
+ {
+ op = O_symbol;
+ final_val += left;
+ add_symbol = op_symbol;
+ left = right;
+ op_symbol = NULL;
+ goto do_symbol;
+ }
+ }
/* Subtraction is permitted if both operands are in the same
section. Otherwise, both operands must be absolute. We
@@ -798,10 +814,11 @@ resolve_symbol_value (symp)
constant above. This will probably need to be changed
for an object file format which supports arbitrary
expressions, such as IEEE-695. */
- if ((seg_left != absolute_section
- || seg_right != absolute_section)
- && (symp->sy_value.X_op != O_subtract
- || seg_left != seg_right))
+ /* Don't emit messages unless we're finalizing the symbol value,
+ otherwise we may get the same message multiple times. */
+ if ((seg_left != absolute_section || seg_right != absolute_section)
+ && (op != O_subtract || seg_left != seg_right)
+ && finalize)
{
char *file;
unsigned int line;
@@ -837,38 +854,54 @@ resolve_symbol_value (symp)
}
}
+ /* Check for division by zero. */
+ if ((op == O_divide || op == O_modulus) && right == 0)
+ {
+ /* If seg_right is not absolute_section, then we've
+ already issued a warning about using a bad symbol. */
+ if (seg_right == absolute_section && finalize)
+ {
+ char *file;
+ unsigned int line;
+
+ if (expr_symbol_where (symp, &file, &line))
+ as_bad_where (file, line, "division by zero");
+ else
+ as_bad ("division by zero when setting %s",
+ S_GET_NAME (symp));
+ }
+
+ right = 1;
+ }
+
switch (symp->sy_value.X_op)
{
- case O_multiply: val = left * right; break;
- case O_divide: val = left / right; break;
- case O_modulus: val = left % right; break;
- case O_left_shift: val = left << right; break;
- case O_right_shift: val = left >> right; break;
- case O_bit_inclusive_or: val = left | right; break;
- case O_bit_or_not: val = left |~ right; break;
- case O_bit_exclusive_or: val = left ^ right; break;
- case O_bit_and: val = left & right; break;
- case O_add: val = left + right; break;
- case O_subtract: val = left - right; break;
- case O_eq: val = left == right ? ~ (offsetT) 0 : 0;
- case O_ne: val = left != right ? ~ (offsetT) 0 : 0;
- case O_lt: val = left < right ? ~ (offsetT) 0 : 0;
- case O_le: val = left <= right ? ~ (offsetT) 0 : 0;
- case O_ge: val = left >= right ? ~ (offsetT) 0 : 0;
- case O_gt: val = left > right ? ~ (offsetT) 0 : 0;
- case O_logical_and: val = left && right; break;
- case O_logical_or: val = left || right; break;
- default: abort ();
+ case O_multiply: left *= right; break;
+ case O_divide: left /= right; break;
+ case O_modulus: left %= right; break;
+ case O_left_shift: left <<= right; break;
+ case O_right_shift: left >>= right; break;
+ case O_bit_inclusive_or: left |= right; break;
+ case O_bit_or_not: left |= ~right; break;
+ case O_bit_exclusive_or: left ^= right; break;
+ case O_bit_and: left &= right; break;
+ case O_add: left += right; break;
+ case O_subtract: left -= right; break;
+ case O_eq: left = left == right ? ~ (offsetT) 0 : 0; break;
+ case O_ne: left = left != right ? ~ (offsetT) 0 : 0; break;
+ case O_lt: left = left < right ? ~ (offsetT) 0 : 0; break;
+ case O_le: left = left <= right ? ~ (offsetT) 0 : 0; break;
+ case O_ge: left = left >= right ? ~ (offsetT) 0 : 0; break;
+ case O_gt: left = left > right ? ~ (offsetT) 0 : 0; break;
+ case O_logical_and: left = left && right; break;
+ case O_logical_or: left = left || right; break;
+ default: abort ();
}
- S_SET_VALUE (symp,
- (symp->sy_value.X_add_number
- + symp->sy_frag->fr_address
- + val));
- if (S_GET_SEGMENT (symp) == expr_section
- || S_GET_SEGMENT (symp) == undefined_section)
- S_SET_SEGMENT (symp, absolute_section);
- resolved = (symp->sy_value.X_add_symbol->sy_resolved
- && symp->sy_value.X_op_symbol->sy_resolved);
+
+ final_val += symp->sy_frag->fr_address + left;
+ if (final_seg == expr_section || final_seg == undefined_section)
+ final_seg = absolute_section;
+ resolved = (add_symbol->sy_resolved && op_symbol->sy_resolved);
break;
case O_register:
@@ -881,16 +914,36 @@ resolve_symbol_value (symp)
anything. */
break;
}
+
+ symp->sy_resolving = 0;
+ }
+
+ if (finalize)
+ {
+ S_SET_VALUE (symp, final_val);
+
+#if defined (OBJ_AOUT) && ! defined (BFD_ASSEMBLER)
+ /* The old a.out backend does not handle S_SET_SEGMENT correctly
+ for a stab symbol, so we use this bad hack. */
+ if (final_seg != S_GET_SEGMENT (symp))
+#endif
+ S_SET_SEGMENT (symp, final_seg);
}
+exit_dont_set_value:
/* Don't worry if we can't resolve an expr_section symbol. */
- if (resolved)
- symp->sy_resolved = 1;
- else if (S_GET_SEGMENT (symp) != expr_section)
+ if (finalize)
{
- as_bad ("can't resolve value for symbol \"%s\"", S_GET_NAME (symp));
- symp->sy_resolved = 1;
+ if (resolved)
+ 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));
+ symp->sy_resolved = 1;
+ }
}
+
+ return final_val;
}
/* Dollar labels look like a number followed by a dollar sign. Eg, "42$".
@@ -903,7 +956,7 @@ resolve_symbol_value (symp)
static long *dollar_labels;
static long *dollar_label_instances;
static char *dollar_label_defines;
-static long dollar_label_count;
+static unsigned long dollar_label_count;
static unsigned long dollar_label_max;
int
@@ -1233,7 +1286,7 @@ decode_local_label_name (s)
if (s[0] != 'L')
return s;
- for (label_number = 0, p = s + 1; isdigit (*p); ++p)
+ for (label_number = 0, p = s + 1; isdigit ((unsigned char) *p); ++p)
label_number = (10 * label_number) + *p - '0';
if (*p == 1)
@@ -1243,7 +1296,7 @@ decode_local_label_name (s)
else
return s;
- for (instance_number = 0, p++; isdigit (*p); ++p)
+ for (instance_number = 0, p++; isdigit ((unsigned char) *p); ++p)
instance_number = (10 * instance_number) + *p - '0';
symbol_decode = obstack_alloc (&notes, strlen (message_format) + 30);
@@ -1258,8 +1311,8 @@ valueT
S_GET_VALUE (s)
symbolS *s;
{
- if (!s->sy_resolved && !s->sy_resolving && s->sy_value.X_op != O_constant)
- resolve_symbol_value (s);
+ if (!s->sy_resolved && s->sy_value.X_op != O_constant)
+ resolve_symbol_value (s, 1);
if (s->sy_value.X_op != O_constant)
{
static symbolS *recur;
@@ -1299,7 +1352,7 @@ copy_symbol_attributes (dest, src)
#ifdef BFD_ASSEMBLER
/* In an expression, transfer the settings of these flags.
The user can override later, of course. */
-#define COPIED_SYMFLAGS (BSF_FUNCTION)
+#define COPIED_SYMFLAGS (BSF_FUNCTION | BSF_OBJECT)
dest->bsym->flags |= src->bsym->flags & COPIED_SYMFLAGS;
#endif
@@ -1317,7 +1370,7 @@ S_IS_EXTERNAL (s)
flagword flags = s->bsym->flags;
/* sanity check */
- if (flags & BSF_LOCAL && flags & BSF_GLOBAL)
+ if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL))
abort ();
return (flags & BSF_GLOBAL) != 0;
@@ -1361,12 +1414,17 @@ S_IS_LOCAL (s)
const char *name;
/* sanity check */
- if (flags & BSF_LOCAL && flags & BSF_GLOBAL)
+ if ((flags & BSF_LOCAL) && (flags & BSF_GLOBAL))
abort ();
if (bfd_get_section (s->bsym) == reg_section)
return 1;
+ if (flag_strip_local_absolute
+ && (flags & BSF_GLOBAL) == 0
+ && bfd_get_section (s->bsym) == absolute_section)
+ return 1;
+
name = S_GET_NAME (s);
return (name != NULL
&& ! S_IS_DEBUG (s)
@@ -1412,7 +1470,17 @@ S_SET_SEGMENT (s, seg)
symbolS *s;
segT seg;
{
- s->bsym->section = seg;
+ /* Don't reassign section symbols. The direct reason is to prevent seg
+ faults assigning back to const global symbols such as *ABS*, but it
+ shouldn't happen anyway. */
+
+ if (s->bsym->flags & BSF_SECTION_SYM)
+ {
+ if (s->bsym->section != seg)
+ abort();
+ }
+ else
+ s->bsym->section = seg;
}
void
diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h
index e643881..c6efbdb 100644
--- a/contrib/binutils/gas/symbols.h
+++ b/contrib/binutils/gas/symbols.h
@@ -48,7 +48,7 @@ void local_colon PARAMS ((int n));
void symbol_begin PARAMS ((void));
void symbol_print_statistics PARAMS ((FILE *));
void symbol_table_insert PARAMS ((symbolS * symbolP));
-void resolve_symbol_value PARAMS ((symbolS *));
+valueT resolve_symbol_value PARAMS ((symbolS *, int));
void print_symbol_value PARAMS ((symbolS *));
void print_expr PARAMS ((expressionS *));
diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c
index 549dab7..e59ddb7 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, 1997
+ Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 1998
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -363,7 +363,7 @@ record_alignment (seg, align)
if (seg == absolute_section)
return;
#ifdef BFD_ASSEMBLER
- if (align > bfd_get_section_alignment (stdoutput, seg))
+ if ((unsigned int) align > bfd_get_section_alignment (stdoutput, seg))
bfd_set_section_alignment (stdoutput, seg, align);
#else
if (align > section_alignment[(int) seg])
@@ -502,6 +502,26 @@ cvt_frag_to_fill (headersP, sec, fragP)
case rs_fill:
break;
+ case rs_leb128:
+ {
+ valueT value = S_GET_VALUE (fragP->fr_symbol);
+ int size;
+
+ size = output_leb128 (fragP->fr_literal + fragP->fr_fix, value,
+ fragP->fr_subtype);
+
+ fragP->fr_fix += size;
+ fragP->fr_type = rs_fill;
+ fragP->fr_var = 0;
+ fragP->fr_offset = 0;
+ fragP->fr_symbol = NULL;
+ }
+ break;
+
+ case rs_cfa:
+ eh_frame_convert_frag (fragP);
+ break;
+
case rs_machine_dependent:
#ifdef BFD_ASSEMBLER
md_convert_frag (stdoutput, sec, fragP);
@@ -509,7 +529,9 @@ cvt_frag_to_fill (headersP, sec, fragP)
md_convert_frag (headersP, sec, fragP);
#endif
- assert (fragP->fr_next == NULL || (fragP->fr_next->fr_address - fragP->fr_address == fragP->fr_fix));
+ assert (fragP->fr_next == NULL
+ || ((offsetT) (fragP->fr_next->fr_address - fragP->fr_address)
+ == fragP->fr_fix));
/*
* After md_convert_frag, we make the frag into a ".space 0".
@@ -681,8 +703,6 @@ adjust_reloc_syms (abfd, sec, xxx)
symbolS *sym;
asection *symsec;
- reduce_fixup:
-
#ifdef DEBUG5
fprintf (stderr, "\n\nadjusting fixup:\n");
print_fixup (fixp);
@@ -695,9 +715,9 @@ adjust_reloc_syms (abfd, sec, xxx)
symbols, though, since they are not in the regular symbol
table. */
if (sym != NULL && ! sym->sy_resolved)
- resolve_symbol_value (sym);
+ resolve_symbol_value (sym, 1);
if (fixp->fx_subsy != NULL && ! fixp->fx_subsy->sy_resolved)
- resolve_symbol_value (fixp->fx_subsy);
+ resolve_symbol_value (fixp->fx_subsy, 1);
/* If this symbol is equated to an undefined symbol, convert
the fixup to being against that symbol. */
@@ -1301,10 +1321,47 @@ set_symtab ()
}
#endif
+/* 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
+ thought. ".align" frags like to have a following frag since that
+ makes calculating their intended length trivial. */
+
+#ifndef SUB_SEGMENT_ALIGN
+#ifdef BFD_ASSEMBLER
+#define SUB_SEGMENT_ALIGN(SEG) (0)
+#else
+#define SUB_SEGMENT_ALIGN(SEG) (2)
+#endif
+#endif
+
+void
+subsegs_finish ()
+{
+ struct frchain *frchainP;
+
+ for (frchainP = frchain_root; frchainP; frchainP = frchainP->frch_next)
+ {
+ subseg_set (frchainP->frch_seg, frchainP->frch_subseg);
+ frag_align (SUB_SEGMENT_ALIGN (now_seg), NOP_OPCODE, 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);
+ }
+}
+
+/* Write the object file. */
+
void
write_object_file ()
{
- struct frchain *frchainP; /* Track along all frchains. */
#if ! defined (BFD_ASSEMBLER) || ! defined (WORKING_DOT_WORD)
fragS *fragP; /* Track along all frags. */
#endif
@@ -1339,34 +1396,6 @@ write_object_file ()
vms_check_for_main ();
#endif /* OBJ_VMS */
- /* 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 thought. ".align" frags like to have a
- following frag since that makes calculating their intended length
- trivial.
-
- @@ Is this really necessary?? */
-#ifndef SUB_SEGMENT_ALIGN
-#ifdef BFD_ASSEMBLER
-#define SUB_SEGMENT_ALIGN(SEG) (0)
-#else
-#define SUB_SEGMENT_ALIGN(SEG) (2)
-#endif
-#endif
- for (frchainP = frchain_root; frchainP; frchainP = frchainP->frch_next)
- {
- subseg_set (frchainP->frch_seg, frchainP->frch_subseg);
- frag_align (SUB_SEGMENT_ALIGN (now_seg), NOP_OPCODE, 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);
- }
-
/* From now on, we don't care about sub-segments. Build one frag chain
for each segment. Linked thru fr_next. */
@@ -1460,6 +1489,13 @@ write_object_file ()
for (fragP = text_frag_root; fragP; fragP = fragP->fr_next)
{
+ /* At this point we have linked all the frags into a single
+ chain. However, cvt_frag_to_fill may call md_convert_frag
+ which may call fix_new. We need to ensure that fix_new adds
+ the fixup to the right section. */
+ if (fragP == data_frag_root)
+ subseg_change (SEG_DATA, 0);
+
cvt_frag_to_fill (&headers, SEG_TEXT, fragP);
/* Some assert macros don't work with # directives mixed in. */
@@ -1704,7 +1740,7 @@ write_object_file ()
for (symp = symbol_rootP; symp; symp = symbol_next (symp))
if (!symp->sy_resolved)
- resolve_symbol_value (symp);
+ resolve_symbol_value (symp, 1);
}
PROGRESS (1);
@@ -1761,7 +1797,7 @@ write_object_file ()
symp->sy_resolved = 1;
}
else
- resolve_symbol_value (symp);
+ resolve_symbol_value (symp, 1);
}
/* Skip symbols which were equated to undefined or common
@@ -2087,6 +2123,16 @@ relax_segment (segment_frag_root, segment)
break;
#endif
+ case rs_leb128:
+ /* Initial guess is always 1; doing otherwise can result in
+ stable solutions that are larger than the minimum. */
+ address += fragP->fr_offset = 1;
+ break;
+
+ case rs_cfa:
+ address += eh_frame_estimate_size_before_relax (fragP);
+ break;
+
default:
BAD_CASE (fragP->fr_type);
break;
@@ -2276,6 +2322,22 @@ relax_segment (segment_frag_root, segment)
#endif
break;
+ case rs_leb128:
+ {
+ valueT value;
+ int size;
+
+ value = resolve_symbol_value (fragP->fr_symbol, 0);
+ size = sizeof_leb128 (value, fragP->fr_subtype);
+ growth = size - fragP->fr_offset;
+ fragP->fr_offset = size;
+ }
+ break;
+
+ case rs_cfa:
+ growth = eh_frame_relax_frag (fragP);
+ break;
+
default:
BAD_CASE (fragP->fr_type);
break;
@@ -2383,7 +2445,7 @@ fixup_segment (fixP, this_segment_type)
if (sub_symbolP)
{
- resolve_symbol_value (sub_symbolP);
+ resolve_symbol_value (sub_symbolP, 1);
if (add_symbolP == NULL || add_symbol_segment == absolute_section)
{
if (add_symbolP != NULL)
@@ -2581,11 +2643,13 @@ fixup_segment (fixP, this_segment_type)
else
{
seg_reloc_count++;
+#if !(defined (TC_V850) && defined (OBJ_ELF))
#if !(defined (TC_M68K) && defined (OBJ_ELF))
-#if !defined (TC_I386) || !(defined (OBJ_ELF) || defined (OBJ_COFF))
+#if !defined (TC_I386) || !(defined (OBJ_ELF) || defined (OBJ_COFF)) || defined (TE_PE)
add_number += S_GET_VALUE (add_symbolP);
#endif
#endif
+#endif
}
}
}
@@ -2607,7 +2671,7 @@ fixup_segment (fixP, this_segment_type)
if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && size > 0)
{
- if (size < sizeof (valueT))
+ if ((size_t) size < sizeof (valueT))
{
valueT mask, hibit;
@@ -2694,7 +2758,7 @@ number_to_chars_bigendian (buf, val, n)
valueT val;
int n;
{
- if (n > sizeof (val)|| n <= 0)
+ if ((size_t) n > sizeof (val) || n <= 0)
abort ();
while (n--)
{
@@ -2709,7 +2773,7 @@ number_to_chars_littleendian (buf, val, n)
valueT val;
int n;
{
- if (n > sizeof (val) || n <= 0)
+ if ((size_t) n > sizeof (val) || n <= 0)
abort ();
while (n--)
{
@@ -2774,6 +2838,9 @@ print_fixup (fixp)
fprintf (stderr, ">");
}
fprintf (stderr, "\n");
+#ifdef TC_FIX_DATA_PRINT
+ 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 67372e4..8fd1411 100644
--- a/contrib/binutils/gas/write.h
+++ b/contrib/binutils/gas/write.h
@@ -49,7 +49,7 @@ struct fix
/* These small fields are grouped together for compactness of
this structure, and efficiency of access on some architectures. */
- /* pc-relative offset adjust */
+ /* pc-relative offset adjust (only used by m68k) */
char fx_pcrel_adjust;
/* How many bytes are involved? */
@@ -165,6 +165,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 void subsegs_finish PARAMS ((void));
extern void write_object_file PARAMS ((void));
extern long relax_frag PARAMS ((fragS *, long));
extern void relax_segment
OpenPOWER on IntegriCloud