summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-09-17 21:29:00 +0000
committerDavid Carlton <carlton@bactrian.org>2003-09-17 21:29:00 +0000
commitadb3b4a1c5294f756cd93fc1f778d751ffcb85b1 (patch)
treebc5f2d7fe6ea9d7fc740f364a90e311c0667f711
parent19ee1c79d3d115d9296b9ad6ecc07d7658673bc9 (diff)
downloadbinutils-redhat-adb3b4a1c5294f756cd93fc1f778d751ffcb85b1.tar.gz
2003-09-17 David Carlton <carlton@kealia.com>
* Merge with mainline; tag is carlton_dictionary-20030917-merge.
-rw-r--r--ChangeLog76
-rw-r--r--MAINTAINERS14
-rw-r--r--bfd/ChangeLog342
-rw-r--r--bfd/Makefile.am16
-rw-r--r--bfd/Makefile.in20
-rw-r--r--bfd/archures.c14
-rw-r--r--bfd/bfd-in.h13
-rw-r--r--bfd/bfd-in2.h31
-rw-r--r--bfd/bfd.c5
-rw-r--r--bfd/coff-i860.c311
-rw-r--r--bfd/cofflink.c559
-rw-r--r--bfd/config.bfd12
-rw-r--r--bfd/config.in3
-rwxr-xr-xbfd/configure309
-rw-r--r--bfd/configure.in24
-rw-r--r--bfd/cpu-frv.c7
-rw-r--r--bfd/cpu-hppa.c12
-rw-r--r--bfd/cpu-msp430.c40
-rw-r--r--bfd/cpu-v850.c4
-rw-r--r--bfd/dep-in.sed1
-rw-r--r--bfd/doc/Makefile.in1
-rw-r--r--bfd/elf-bfd.h635
-rw-r--r--bfd/elf-eh-frame.c137
-rw-r--r--bfd/elf-hppa.h228
-rw-r--r--bfd/elf-m10300.c98
-rw-r--r--bfd/elf-strtab.c102
-rw-r--r--bfd/elf.c55
-rw-r--r--bfd/elf32-arm.h102
-rw-r--r--bfd/elf32-cris.c111
-rw-r--r--bfd/elf32-frv.c4
-rw-r--r--bfd/elf32-hppa.c759
-rw-r--r--bfd/elf32-hppa.h19
-rw-r--r--bfd/elf32-i386.c39
-rw-r--r--bfd/elf32-i860.c246
-rw-r--r--bfd/elf32-ip2k.c27
-rw-r--r--bfd/elf32-iq2000.c46
-rw-r--r--bfd/elf32-m68hc11.c4
-rw-r--r--bfd/elf32-m68hc12.c20
-rw-r--r--bfd/elf32-m68hc1x.c79
-rw-r--r--bfd/elf32-m68hc1x.h1
-rw-r--r--bfd/elf32-m68k.c38
-rw-r--r--bfd/elf32-msp430.c68
-rw-r--r--bfd/elf32-ppc.c101
-rw-r--r--bfd/elf32-s390.c47
-rw-r--r--bfd/elf32-sh.c23
-rw-r--r--bfd/elf32-sh64.c2
-rw-r--r--bfd/elf32-sparc.c44
-rw-r--r--bfd/elf32-v850.c25
-rw-r--r--bfd/elf32-vax.c49
-rw-r--r--bfd/elf32-xtensa.c55
-rw-r--r--bfd/elf64-alpha.c57
-rw-r--r--bfd/elf64-hppa.c22
-rw-r--r--bfd/elf64-mips.c4
-rw-r--r--bfd/elf64-ppc.c185
-rw-r--r--bfd/elf64-s390.c47
-rw-r--r--bfd/elf64-sh64.c10
-rw-r--r--bfd/elf64-sparc.c42
-rw-r--r--bfd/elf64-x86-64.c45
-rw-r--r--bfd/elfcode.h12
-rw-r--r--bfd/elfcore.h6
-rw-r--r--bfd/elflink.c28
-rw-r--r--bfd/elflink.h64
-rw-r--r--bfd/elfxx-ia64.c65
-rw-r--r--bfd/elfxx-mips.c21
-rw-r--r--bfd/elfxx-mips.h2
-rw-r--r--bfd/elfxx-target.h4
-rw-r--r--bfd/libbfd.h2
-rw-r--r--bfd/libhppa.h121
-rw-r--r--bfd/libpei.h4
-rw-r--r--bfd/merge.c111
-rw-r--r--bfd/po/fr.po6
-rw-r--r--bfd/po/sv.po6
-rw-r--r--bfd/reloc.c7
-rw-r--r--bfd/simple.c38
-rw-r--r--bfd/targets.c2
-rw-r--r--bfd/version.h2
-rw-r--r--config-ml.in28
-rwxr-xr-xconfig.sub4
-rw-r--r--config/no-executables.m461
-rwxr-xr-xconfigure135
-rw-r--r--configure.in69
-rw-r--r--include/ChangeLog34
-rw-r--r--include/bfdlink.h113
-rw-r--r--include/coff/ChangeLog15
-rw-r--r--include/coff/i860.h33
-rw-r--r--include/coff/ti.h36
-rw-r--r--include/dis-asm.h227
-rw-r--r--include/elf/ChangeLog28
-rw-r--r--include/elf/dwarf2.h69
-rw-r--r--include/elf/msp430.h7
-rw-r--r--include/elf/reloc-macros.h23
-rw-r--r--include/elf/v850.h5
-rw-r--r--include/floatformat.h19
-rw-r--r--include/nlm/ChangeLog4
-rw-r--r--include/nlm/internal.h4
-rw-r--r--include/opcode/ChangeLog39
-rw-r--r--include/opcode/alpha.h7
-rw-r--r--include/opcode/arc.h52
-rw-r--r--include/opcode/cgen.h177
-rw-r--r--include/opcode/d10v.h5
-rw-r--r--include/opcode/d30v.h4
-rw-r--r--include/opcode/i370.h8
-rw-r--r--include/opcode/i860.h6
-rw-r--r--include/opcode/or32.h130
-rw-r--r--include/opcode/pj.h4
-rw-r--r--include/opcode/ppc.h57
-rw-r--r--include/opcode/sparc.h23
-rw-r--r--include/opcode/tic80.h25
-rw-r--r--include/opcode/v850.h9
-rwxr-xr-xinstall-sh167
-rw-r--r--libiberty/ChangeLog38
-rw-r--r--libiberty/aclocal.m495
-rwxr-xr-xlibiberty/configure7932
-rw-r--r--libiberty/configure.in36
-rw-r--r--libiberty/cp-demangle.c4
-rw-r--r--libiberty/fibheap.c2
-rw-r--r--libiberty/floatformat.c49
-rwxr-xr-xmissing166
-rw-r--r--opcodes/ChangeLog215
-rw-r--r--opcodes/Makefile.am44
-rw-r--r--opcodes/Makefile.in52
-rw-r--r--opcodes/arm-dis.c20
-rw-r--r--opcodes/cgen-asm.c90
-rw-r--r--opcodes/cgen-asm.in29
-rw-r--r--opcodes/cgen-dis.c58
-rw-r--r--opcodes/cgen-dis.in104
-rw-r--r--opcodes/cgen-ibld.in136
-rw-r--r--opcodes/cgen-opc.c129
-rw-r--r--opcodes/cgen.sh21
-rw-r--r--opcodes/dep-in.sed1
-rw-r--r--opcodes/dis-init.c41
-rw-r--r--opcodes/fr30-asm.c29
-rw-r--r--opcodes/fr30-dis.c104
-rw-r--r--opcodes/fr30-ibld.c136
-rw-r--r--opcodes/frv-asm.c85
-rw-r--r--opcodes/frv-desc.c556
-rw-r--r--opcodes/frv-desc.h24
-rw-r--r--opcodes/frv-dis.c111
-rw-r--r--opcodes/frv-ibld.c166
-rw-r--r--opcodes/frv-opc.c90
-rw-r--r--opcodes/frv-opc.h7
-rw-r--r--opcodes/i370-dis.c7
-rw-r--r--opcodes/i370-opc.c122
-rw-r--r--opcodes/i386-dis.c281
-rw-r--r--opcodes/i960-dis.c105
-rw-r--r--opcodes/ia64-opc.c88
-rw-r--r--opcodes/ip2k-asm.c29
-rw-r--r--opcodes/ip2k-dis.c104
-rw-r--r--opcodes/ip2k-ibld.c136
-rw-r--r--opcodes/iq2000-asm.c29
-rw-r--r--opcodes/iq2000-dis.c104
-rw-r--r--opcodes/iq2000-ibld.c136
-rw-r--r--opcodes/m32r-asm.c29
-rw-r--r--opcodes/m32r-dis.c104
-rw-r--r--opcodes/m32r-ibld.c136
-rw-r--r--opcodes/openrisc-asm.c29
-rw-r--r--opcodes/openrisc-dis.c104
-rw-r--r--opcodes/openrisc-ibld.c136
-rw-r--r--opcodes/po/fr.po38
-rw-r--r--opcodes/ppc-dis.c107
-rw-r--r--opcodes/ppc-opc.c650
-rw-r--r--opcodes/v850-dis.c28
-rw-r--r--opcodes/v850-opc.c134
-rw-r--r--opcodes/xstormy16-asm.c29
-rw-r--r--opcodes/xstormy16-dis.c104
-rw-r--r--opcodes/xstormy16-ibld.c136
-rwxr-xr-xsymlink-tree25
167 files changed, 12847 insertions, 8171 deletions
diff --git a/ChangeLog b/ChangeLog
index ec71cb3a8b..6bd77ff454 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,79 @@
+2003-09-12 Michael Chastain <mec@shout.net>
+
+ Fix PR gdb/857.
+ * src-release (do-proto-topleve): Remove junk files
+ intl/config.cache, intl/config.status,
+ intl/config.h, intl/stamp-h.
+
+2003-09-14 Andrew Cagney <cagney@redhat.com>
+
+ * src-release (dejagnu.tar): New target.
+ (dejagnu.tar.bz2): Recursively call "gdb-taz" rule.
+ (do-djunpack): Use $(PACKAGE) for the package name.
+
+2003-09-04 DJ Delorie <dj@redhat.com>
+
+ * configure: Regenerate.
+
+2003-09-04 Robert Millan <robertmh@gnu.org>
+
+ * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
+
+2003-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in: Ensure arguments to sed are properly spaced.
+ * configure: Regenerate.
+
+2003-08-28 Daniel Jacobowitz <drow@mvista.com>
+
+ Merge from gcc:
+ 2003-07-20 Phil Edwards <pme@gcc.gnu.org>
+ * install-sh: Update to newer upstream versions (associated with
+ aclocal 1.7).
+ * missing: Likewise, plus $1Help2man -> $1 typo fix.
+
+2003-08-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * configure.in: Set RAW_CXX_FOR_TARGET if unset.
+ * configure: Regenerated.
+
+2003-08-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/no-executables.m4: New file.
+
+2003-08-23 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.in: Use newline instead of semicolon when assuming
+ shell arguments in a for loop.
+ * configure: Regenerated.
+
+2003-08-20 Geoffrey Keating <geoffk@apple.com>
+
+ PR 8180
+ * configure.in: When testing with_libs and with_headers, treat
+ 'no' as unset. Based on a patch by Dan Kegel <dank@kegel.com>.
+ * configure: Regenerate.
+
+ * configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS): Quote properly for
+ make, shell, etc.
+ (baseargs): Likewise.
+ * configure: Regenerate.
+
+2003-08-19 Geoffrey Keating <geoffk@apple.com>
+
+ * configure.in: Disable libgcj for darwin not on powerpc.
+ * configure: Rebuild.
+
+2003-08-15 Michael Chastain <mec@shout.net>
+
+ * src-release (do-proto-toplev): Remove junk files
+ dejagnu/example/calc/config.status,
+ dejagnu/example/calc/config.log.
+
+2003-08-14 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * config-ml.in, symlink-tree: Add license.
+
2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
Merge from gcc:
diff --git a/MAINTAINERS b/MAINTAINERS
index 718d374100..c9ad6b30f8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4,7 +4,7 @@ Please do not make ChangeLog entries.
COPYING, COPYING.LIB, README
http://gnu.org.
-Makefile.in; configure; configure.in
+Makefile.in; configure; configure.in; src-release
Please notify the following of any committed patches.
binutils@sources.redhat.com
gdb-patches@sources.redhat.com
@@ -34,12 +34,12 @@ readline/support/config.sub; readline/support/config.guess
gdb-patches@sources.redhat.com
dejagnu/
- Send all patches to:
- http://www.gnu.org/software/dejagnu/
- mail:bug-dejagnu@gnu.org
- For changes to the local repostory, send them to
- gdb-patches@sources.redhat.com when generic; and sid@,
- binutils@, gcc@, etc. for sub-components.
+ dejagnu: http://www.gnu.org/software/dejagnu/
+ Patches to bug-dejagnu@gnu.org
+ Avoid making changes to the local repository; please send
+ patches upstream. Important and approved patches can be
+ checked into the src repository, otheriwse patches will be
+ imported from the next release.
gdb/; mmalloc/; readline/; sim/; GDB's part of include/ & dejagnu/
gdb: http://sources.redhat.com/gdb/
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e4c4f92d6e..a2f8f86e2c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,6 +1,346 @@
+2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
+ started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
+
+2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
+ Randolph Chung <randolph@tausq.org>
+
+ * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
+ hppa_link_hash_newfunc, hppa_build_one_stub,
+ elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
+ allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
+ elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
+ for generating import stubs for calls to statically linked PIC
+ functions.
+ (hppa_type_of_stub): Don't generate an import stub for calls to
+ statically linked pic functions. Generate import stubs for calls
+ in a shared object, to functions not in a regular file, and to
+ defined weak functions. Add new argument INFO.
+ (hppa_build_one_stub): Don't undef ADDIL_DP.
+ (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
+ (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
+ (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
+ non-shared link. Convert instructions that use the the linkage table
+ pointer, or a facsimile thereof, to use the global data pointer when
+ the reloc has been changed.
+
+2003-09-08 Joel Brobecker <brobecker@gnat.com>
+
+ * archures.c: Add new machine names for hppa.
+ * bfd-in2.h: Regenerate.
+ * cpu-hppa.c: Use the new machine names.
+
+2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
+
+ * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
+ all_local_syms member.
+ * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
+ to get the local symbols.
+
+2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
+
+ * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
+ (elf_backend_special_sections): Define.a
+
+ PR savannah/4950:
+ * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
+ section is read-only.
+
+2003-09-04 Nick Clifton <nickc@redhat.com>
+
+ * archures.c (bfd_mach_v850e1): Define.
+ * bfd-in2.h: Regenerate.
+ * cpu-v850.h (scan): Accept bfd_mach_v850e1.
+ (arch_info_struct): Include an entry for bfd_mach_v850e1.
+ * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
+ (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
+ (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
+ (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
+ linked with v850e binaries. Mark the output as v850e.
+
+2003-09-03 Nick Clifton <nickc@redhat.com>
+
+ * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
+ symbols that are used in relocs.
+
+2003-08-30 Robert Millan <robertmh@gnu.org>
+
+ * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
+ * config.bfd: Likewise.
+ * configure: Regenerate.
+
+2003-08-31 Christian Groessler <chris@groessler.org>
+
+ * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
+ instead of returning bfd_reloc_continue.
+
+2003-08-31 Andreas Jaeger <aj@suse.de>
+
+ * merge.c: Update to ISO C90.
+
+2003-08-27 Ian Lance Taylor <ian@airs.com>
+
+ * configure.in: Check for strtoull.
+ * bfd.c (bfd_scan_vma): Use strtoull when available.
+ * configure, config.in: Regenerate.
+
+ * configure.in: Define and substitute BFD_HOST_LONG_LONG.
+ * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
+ __GNUC__ when deciding whether to use long long for
+ BFD_HOST_64_BIT.
+ * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
+
+2003-08-27 Christian Groessler <chris@groessler.org>
+
+ * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
+ i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
+ functions.
+ (elf32_i860_howto_table): Insert the new functions as
+ 'special_function's in the proper reloc type entries.
+
+2003-08-27 Richard Sandiford <rsandifo@redhat.com>
+
+ * elf32-frv.c (elf32_frv_relocate_section): Use
+ _bfd_elf_rela_local_sym.
+
+2003-08-26 Michael Snyder <msnyder@redhat.com>
+
+ * cpu-frv.c: Remove unused enum.
+
+2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * reloc.c: Fix documentation for MIPS ELF relocations.
+ libbfd.h: Regenerate.
+ bfd-in2.h: Regenerate.
+
+2003-08-24 Jason Eckhardt <jle@rice.edu>
+
+ * coff-i860.c (CALC_ADDEND): Define to be a no-op.
+
+2003-08-24 Jason Eckhardt <jle@rice.edu>
+
+ * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
+ shift by 2 before storing the relocated value.
+
+2003-08-23 Jason Eckhardt <jle@rice.edu>
+
+ * coff-i860.c (coff_i860_reloc_nyi): New function.
+ (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
+ LOWn, SPLITn, and BRADDR.
+ (RTYPE2HOWTO): Check that the r_type is within the howto_table
+ before trying to access the entry.
+ (coff_i860_rtype_to_howto): Likewise.
+ (coff_i860_reloc_type_lookup): New function.
+ (i860_reloc_processing): New function.
+ (coff_bfd_reloc_type_lookup): Define macro.
+ (RELOC_PROCESSING): Define macro.
+ Minor formatting adjustments.
+
+2003-08-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
+
+2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
+ .got section at 8 bytes.
+
+2003-08-21 Nick Clifton <nickc@redhat.com>
+
+ * cofflink.c: Update to ISO C90 and tidy up formatting.
+
+2003-08-21 Randolph Chung <tausq@debian.org>
+
+ * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
+ can have OSABI=Linux or OSABI=SysV. Check for both.
+ * elf64-hppa.c (elf64_hppa_object_p): Likewise.
+
+2003-08-21 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+
+2003-08-20 Richard Sandiford <rsandifo@redhat.com>
+
+ * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
+
+2003-08-20 Nick Clifton <nickc@redhat.com>
+
+ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
+ replace some duplicated code in most elfxx-xxxx.c files. This
+ version uses the new fields in bfd_link_info.
+
+ * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
+ * elf32-arm.h (elf32_arm_relocate_section): Likewise.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+ * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf32-vax.c (elf_vax_relocate_section): Likewise.
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+
+ * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
+ elf_hppa_remark_useless_dynamic_symbols,
+ elf_hppa_relocate_section): Use the new fields in
+ bfd_link_info structure.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
+ * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
+ * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
+
+ * elflink.h (elf_link_output_extsym): Fix test for reporting
+ undefined symbols in shared libraries. Remove redundant test
+ of shlib_undefined when reporting references to forced local
+ symbols.
+
+2003-08-18 Andreas Schwab <schwab@suse.de>
+
+ * libpei.h (bfd_pe_executable_p): Also recognize efi-app
+ executables.
+
+2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * simple.c (bfd_simple_get_relocated_section_contents): Move
+ reloc_done hack to before first bfd_section_size call. Change all
+ returns to use new wrapper macro RETURN, restoring sec->reloc_done.
+
+2003-08-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c: Don't include elf/ppc.h.
+
+2003-08-14 Richard Sandiford <rsandifo@redhat.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
+ code to work with 64-bit bfds.
+
+2003-08-14 Alan Modra <amodra@bigpond.net.au>
+
+ * dep-in.sed: Remove libintl.h.
+ * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
+ (POTFILES.in): Remove target.
+ * Makefile.in: Regenerate.
+
+2003-08-12 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
+ (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
+ use the function sym from the previous reloc.
+
+2003-08-11 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
+ fatal if -pie.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
+ on undefined symbols if -pie.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+
+2003-08-11 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
+ branch to __libc_start_main.
+
+2003-08-08 Dmitry Diky <diwil@mail.ru>
+
+ * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
+ gcc order.
+ * cpu-msp430.c: Likewise.
+ * elf32-msp430.c: Likewise.
+ * bfd-in2.h: Regenerate.
+
+2003-08-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elfxx-target.h: Remove PTR cast.
+ * targets.c (bfd_target): Make backend_data const void *.
+ * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
+ * elf-m10300.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-m68hc1x.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-sh64.c: Likewise.
+ * elf32-sparc.c: Likewise.
+ * elf32-xtensa.c: Likewise.
+ * elf64-mips.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elfcode.h: Likewise.
+ * elfcore.h: Likewise.
+ * elflink.c: Likewise.
+ * elflink.h: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * elfxx-mips.h: Likewise.
+ * elf.c (prep_headers): Remove useless check for null backend_data.
+ * bfd-in2.h: Regenerate.
+
+ * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
+ (NAME): Use ## rather than CONCAT4 macro.
+ * elfcode.h: Remove one remaining PARAMS macro.
+ * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
+ * elf-strtab.c: Likewise.
+ * elf-hppa.h: Likewise.
+ * elf32-hppa.h: Likewise.
+ * elf32-hppa.c: Likewise.
+ (elf32_hppa_add_symbol_hook): Delete.
+ (elf_backend_add_symbol_hook): Don't define.
+ * libhppa.h: Convert to C90. Replace INLINE with inline.
+
+2003-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
+ (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
+ function descriptors, but warn.
+ (ppc_build_one_stub): Remove a couple of vars. Move code creating
+ stub syms so that we can avoid a stub sym if we already have a
+ plt sym. Do not redefine an existing symbol.
+ (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
+ glink.
+
+2003-08-06 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+
+2003-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
+ SEC_LINKER_CREATED.
+
+2003-08-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
+ (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
+
2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
- * coffcode.h: (coff_slurp_line_table) Return with a warning
+ * coffcode.h (coff_slurp_line_table): Return with a warning
message if the line number table could not be read.
2003-08-04 Nick Clifton <nickc@redhat.com>
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index eaec975636..d27c873e90 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -606,23 +606,15 @@ SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
- for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp.src \
+ for file in $(SRC_POTFILES); do echo $$file; done \
+ | LC_COLLATE= sort > tmp.src \
&& mv tmp.src $(srcdir)/po/SRC-POTFILES.in
po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
- for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp.bld \
+ for file in $(BLD_POTFILES); do echo $$file; done \
+ | LC_COLLATE= sort > tmp.bld \
&& mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
-# The following target is retained for upgrade purposes.
-# This target used to exist in older versions of this makefile, and was
-# referenced by <builddir>/po/Makefile (which is created from <srcdir>/po/Make-in)
-# So old versions of <builddir>/po/Makefile will try to regenerate themselves
-# when make is next run, but that dependency cannot be completed without a build
-# of po/POTFILES.in. Hence the presence of this rule. This rule will be deleted
-# once it is no longer needed - probably in the fall of 2001.
-po/POTFILES.in:
-
-
diststuff: info
# Various kinds of .o files to put in libbfd.a:
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 38ecfab33a..5ca774a112 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -68,6 +68,7 @@ AS = @AS@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
+BFD_HOST_LONG_LONG = @BFD_HOST_LONG_LONG@
BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
@@ -811,7 +812,7 @@ configure.in version.h
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
@@ -1177,22 +1178,15 @@ mostlyclean distclean maintainer-clean
po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
- for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp.src \
+ for file in $(SRC_POTFILES); do echo $$file; done \
+ | LC_COLLATE= sort > tmp.src \
&& mv tmp.src $(srcdir)/po/SRC-POTFILES.in
po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
- for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp.bld \
+ for file in $(BLD_POTFILES); do echo $$file; done \
+ | LC_COLLATE= sort > tmp.bld \
&& mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
-# The following target is retained for upgrade purposes.
-# This target used to exist in older versions of this makefile, and was
-# referenced by <builddir>/po/Makefile (which is created from <srcdir>/po/Make-in)
-# So old versions of <builddir>/po/Makefile will try to regenerate themselves
-# when make is next run, but that dependency cannot be completed without a build
-# of po/POTFILES.in. Hence the presence of this rule. This rule will be deleted
-# once it is no longer needed - probably in the fall of 2001.
-po/POTFILES.in:
-
diststuff: info
stamp-ofiles: Makefile
diff --git a/bfd/archures.c b/bfd/archures.c
index 77f6a9e6e1..9033f2826d 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -199,6 +199,10 @@ DESCRIPTION
.#define bfd_mach_rs6k_rsc 6003
.#define bfd_mach_rs6k_rs2 6002
. bfd_arch_hppa, {* HP PA RISC *}
+.#define bfd_mach_hppa10 10
+.#define bfd_mach_hppa11 11
+.#define bfd_mach_hppa20 20
+.#define bfd_mach_hppa20w 25
. bfd_arch_d10v, {* Mitsubishi D10V *}
.#define bfd_mach_d10v 1
.#define bfd_mach_d10v_ts2 2
@@ -253,6 +257,7 @@ DESCRIPTION
. bfd_arch_v850, {* NEC V850 *}
.#define bfd_mach_v850 1
.#define bfd_mach_v850e 'E'
+.#define bfd_mach_v850e1 '1'
. bfd_arch_arc, {* ARC Cores *}
.#define bfd_mach_arc_5 5
.#define bfd_mach_arc_6 6
@@ -301,19 +306,20 @@ DESCRIPTION
. bfd_arch_xstormy16,
.#define bfd_mach_xstormy16 1
. bfd_arch_msp430, {* Texas Instruments MSP430 architecture. *}
-.#define bfd_mach_msp110 110
.#define bfd_mach_msp11 11
+.#define bfd_mach_msp110 110
.#define bfd_mach_msp12 12
.#define bfd_mach_msp13 13
.#define bfd_mach_msp14 14
-.#define bfd_mach_msp41 41
+.#define bfd_mach_msp15 15
+.#define bfd_mach_msp16 16
.#define bfd_mach_msp31 31
.#define bfd_mach_msp32 32
.#define bfd_mach_msp33 33
+.#define bfd_mach_msp41 41
+.#define bfd_mach_msp42 42
.#define bfd_mach_msp43 43
.#define bfd_mach_msp44 44
-.#define bfd_mach_msp15 15
-.#define bfd_mach_msp16 16
. bfd_arch_xtensa, {* Tensilica's Xtensa cores. *}
.#define bfd_mach_xtensa 1
. bfd_arch_last
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 63c86f7f91..49ebee7237 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -51,6 +51,7 @@ extern "C" {
#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
+#define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@
#if @BFD_HOST_64_BIT_DEFINED@
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
@@ -96,21 +97,19 @@ typedef int bfd_boolean;
/* Support for different sizes of target format ints and addresses.
If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
- set to 1 above. Otherwise, if gcc is being used, this code will
- use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be
- defined above. */
+ set to 1 above. Otherwise, if the host compiler used during
+ configuration supports long long, this code will use it.
+ Otherwise, BFD_HOST_64_BIT must be defined above. */
#ifndef BFD_HOST_64_BIT
# if BFD_HOST_64BIT_LONG
# define BFD_HOST_64_BIT long
# define BFD_HOST_U_64_BIT unsigned long
# else
-# ifdef __GNUC__
-# if __GNUC__ >= 2
+# if BFD_HOST_LONG_LONG
# define BFD_HOST_64_BIT long long
# define BFD_HOST_U_64_BIT unsigned long long
-# endif /* __GNUC__ >= 2 */
-# endif /* ! defined (__GNUC__) */
+# endif /* ! BFD_HOST_LONG_LONG */
# endif /* ! BFD_HOST_64BIT_LONG */
#endif /* ! defined (BFD_HOST_64_BIT) */
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 11d4e90e34..a7cca3e26c 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -58,6 +58,7 @@ extern "C" {
#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
+#define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@
#if @BFD_HOST_64_BIT_DEFINED@
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
@@ -103,21 +104,19 @@ typedef int bfd_boolean;
/* Support for different sizes of target format ints and addresses.
If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
- set to 1 above. Otherwise, if gcc is being used, this code will
- use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be
- defined above. */
+ set to 1 above. Otherwise, if the host compiler used during
+ configuration supports long long, this code will use it.
+ Otherwise, BFD_HOST_64_BIT must be defined above. */
#ifndef BFD_HOST_64_BIT
# if BFD_HOST_64BIT_LONG
# define BFD_HOST_64_BIT long
# define BFD_HOST_U_64_BIT unsigned long
# else
-# ifdef __GNUC__
-# if __GNUC__ >= 2
+# if BFD_HOST_LONG_LONG
# define BFD_HOST_64_BIT long long
# define BFD_HOST_U_64_BIT unsigned long long
-# endif /* __GNUC__ >= 2 */
-# endif /* ! defined (__GNUC__) */
+# endif /* ! BFD_HOST_LONG_LONG */
# endif /* ! BFD_HOST_64BIT_LONG */
#endif /* ! defined (BFD_HOST_64_BIT) */
@@ -1629,6 +1628,10 @@ enum bfd_architecture
#define bfd_mach_rs6k_rsc 6003
#define bfd_mach_rs6k_rs2 6002
bfd_arch_hppa, /* HP PA RISC */
+#define bfd_mach_hppa10 10
+#define bfd_mach_hppa11 11
+#define bfd_mach_hppa20 20
+#define bfd_mach_hppa20w 25
bfd_arch_d10v, /* Mitsubishi D10V */
#define bfd_mach_d10v 1
#define bfd_mach_d10v_ts2 2
@@ -1683,6 +1686,7 @@ enum bfd_architecture
bfd_arch_v850, /* NEC V850 */
#define bfd_mach_v850 1
#define bfd_mach_v850e 'E'
+#define bfd_mach_v850e1 '1'
bfd_arch_arc, /* ARC Cores */
#define bfd_mach_arc_5 5
#define bfd_mach_arc_6 6
@@ -1731,19 +1735,20 @@ enum bfd_architecture
bfd_arch_xstormy16,
#define bfd_mach_xstormy16 1
bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
-#define bfd_mach_msp110 110
#define bfd_mach_msp11 11
+#define bfd_mach_msp110 110
#define bfd_mach_msp12 12
#define bfd_mach_msp13 13
#define bfd_mach_msp14 14
-#define bfd_mach_msp41 41
+#define bfd_mach_msp15 15
+#define bfd_mach_msp16 16
#define bfd_mach_msp31 31
#define bfd_mach_msp32 32
#define bfd_mach_msp33 33
+#define bfd_mach_msp41 41
+#define bfd_mach_msp42 42
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
-#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
bfd_arch_last
@@ -2323,6 +2328,7 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MIPS_RELGOT,
BFD_RELOC_MIPS_JALR,
+
/* Fujitsu Frv Relocations. */
BFD_RELOC_FRV_LABEL16,
BFD_RELOC_FRV_LABEL24,
@@ -2334,6 +2340,7 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_FRV_GPRELHI,
BFD_RELOC_FRV_GPRELLO,
+
/* This is a 24bit GOT-relative reloc for the mn10300. */
BFD_RELOC_MN10300_GOTOFF24,
@@ -4339,7 +4346,7 @@ typedef struct bfd_target
/* Data for use by back-end routines, which isn't
generic enough to belong in this structure. */
- void *backend_data;
+ const void *backend_data;
} bfd_target;
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 472d0ed9fb..2957747654 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -920,6 +920,11 @@ bfd_scan_vma (const char *string, const char **end, int base)
if (sizeof (bfd_vma) <= sizeof (unsigned long))
return strtoul (string, (char **) end, base);
+#ifdef HAVE_STRTOULL
+ if (sizeof (bfd_vma) <= sizeof (unsigned long long))
+ return strtoull (string, (char **) end, base);
+#endif
+
if (base == 0)
{
if (string[0] == '0')
diff --git a/bfd/coff-i860.c b/bfd/coff-i860.c
index 1906615bee..74b599c91d 100644
--- a/bfd/coff-i860.c
+++ b/bfd/coff-i860.c
@@ -1,4 +1,4 @@
-/* BFD back-end for Intel 860 COFF files.
+/* BFD back-end for Intel i860 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Created mostly by substituting "860" for "386" in coff-i386.c
@@ -126,6 +126,22 @@ coff_i860_reloc (bfd *abfd,
return bfd_reloc_continue;
}
+/* This is just a temporary measure until we teach bfd to generate
+ these relocations. */
+
+static bfd_reloc_status_type
+coff_i860_reloc_nyi (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void *data ATTRIBUTE_UNUSED,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ reloc_howto_type *howto = reloc_entry->howto;
+ fprintf (stderr, _("Relocation `%s' not yet implemented\n"), howto->name);
+}
+
#ifndef PCRELOFFSET
#define PCRELOFFSET FALSE
#endif
@@ -249,17 +265,184 @@ static reloc_howto_type howto_table[] =
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- PCRELOFFSET) /* pcrel_offset */
+ PCRELOFFSET), /* pcrel_offset */
+ EMPTY_HOWTO (0x15),
+ EMPTY_HOWTO (0x16),
+ EMPTY_HOWTO (0x17),
+ EMPTY_HOWTO (0x18),
+ EMPTY_HOWTO (0x19),
+ EMPTY_HOWTO (0x1a),
+ EMPTY_HOWTO (0x1b),
+ HOWTO (COFF860_R_PAIR, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc_nyi, /* special_function */
+ "PAIR", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ EMPTY_HOWTO (0x1d),
+ HOWTO (COFF860_R_HIGH, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc, /* special_function */
+ "HIGH", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_LOW0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc, /* special_function */
+ "LOW0", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_LOW1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc, /* special_function */
+ "LOW1", /* name */
+ FALSE, /* partial_inplace */
+ 0xfffe, /* src_mask */
+ 0xfffe, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_LOW2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc, /* special_function */
+ "LOW2", /* name */
+ FALSE, /* partial_inplace */
+ 0xfffc, /* src_mask */
+ 0xfffc, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_LOW3, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc, /* special_function */
+ "LOW3", /* name */
+ FALSE, /* partial_inplace */
+ 0xfff8, /* src_mask */
+ 0xfff8, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_LOW4, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc, /* special_function */
+ "LOW4", /* name */
+ FALSE, /* partial_inplace */
+ 0xfff0, /* src_mask */
+ 0xfff0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_SPLIT0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc_nyi, /* special_function */
+ "SPLIT0", /* name */
+ FALSE, /* partial_inplace */
+ 0x1f07ff, /* src_mask */
+ 0x1f07ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_SPLIT1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc_nyi, /* special_function */
+ "SPLIT1", /* name */
+ FALSE, /* partial_inplace */
+ 0x1f07fe, /* src_mask */
+ 0x1f07fe, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_SPLIT2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc_nyi, /* special_function */
+ "SPLIT2", /* name */
+ FALSE, /* partial_inplace */
+ 0x1f07fc, /* src_mask */
+ 0x1f07fc, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_HIGHADJ, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ coff_i860_reloc_nyi, /* special_function */
+ "HIGHADJ", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ HOWTO (COFF860_R_BRADDR, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ coff_i860_reloc_nyi, /* special_function */
+ "BRADDR", /* name */
+ FALSE, /* partial_inplace */
+ 0x3ffffff, /* src_mask */
+ 0x3ffffff, /* dst_mask */
+ TRUE) /* pcrel_offset */
};
-/* Turn a howto into a reloc nunmber */
+/* Turn a howto into a reloc number. */
#define SELECT_RELOC(x,howto) { x.r_type = howto->type; }
#define BADMAG(x) I860BADMAG(x)
#define I860 1 /* Customize coffcode.h */
-#define RTYPE2HOWTO(cache_ptr, dst) \
- (cache_ptr)->howto = howto_table + (dst)->r_type;
+#define RTYPE2HOWTO(cache_ptr, dst) \
+ ((cache_ptr)->howto = \
+ ((dst)->r_type < sizeof (howto_table) / sizeof (howto_table[0]) \
+ ? howto_table + (dst)->r_type \
+ : NULL))
/* For 860 COFF a STYP_NOLOAD | STYP_BSS section is part of a shared
library. On some other COFF targets STYP_BSS is normally
@@ -279,6 +462,9 @@ static reloc_howto_type howto_table[] =
FIXME: This macro refers to symbols and asect; these are from the
calling function, not the macro arguments. */
+/* FIXME: This was copied from the i386 version originally but
+ appears to be wrong for i860. For now we'll do nothing. */
+#if 0
#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
{ \
coff_symbol_type *coffsym = (coff_symbol_type *) NULL; \
@@ -298,6 +484,9 @@ static reloc_howto_type howto_table[] =
if (ptr && howto_table[reloc.r_type].pc_relative) \
cache_ptr->addend += asect->vma; \
}
+#else
+#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr)
+#endif
/* We use the special COFF backend linker. */
#define coff_relocate_section _bfd_coff_generic_relocate_section
@@ -313,6 +502,12 @@ coff_i860_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
reloc_howto_type *howto;
+ if (rel->r_type > sizeof (howto_table) / sizeof (howto_table[0]))
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+ }
+
howto = howto_table + rel->r_type;
if (howto->pc_relative)
@@ -346,7 +541,111 @@ coff_i860_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
return howto;
}
-#define coff_rtype_to_howto coff_i860_rtype_to_howto
+static reloc_howto_type *
+coff_i860_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
+{
+ switch (code)
+ {
+ case BFD_RELOC_32:
+ return howto_table + R_DIR32;
+ case BFD_RELOC_860_PC26:
+ return howto_table + COFF860_R_BRADDR;
+ case BFD_RELOC_860_PC16:
+ /* ??? How to handle PC16 for COFF? SPLIT0 is close for now. */
+ return howto_table + COFF860_R_SPLIT0;
+ case BFD_RELOC_860_LOW0:
+ return howto_table + COFF860_R_LOW0;
+ case BFD_RELOC_860_SPLIT0:
+ return howto_table + COFF860_R_SPLIT0;
+ case BFD_RELOC_860_LOW1:
+ return howto_table + COFF860_R_LOW1;
+ case BFD_RELOC_860_SPLIT1:
+ return howto_table + COFF860_R_SPLIT1;
+ case BFD_RELOC_860_LOW2:
+ return howto_table + COFF860_R_LOW2;
+ case BFD_RELOC_860_SPLIT2:
+ return howto_table + COFF860_R_SPLIT2;
+ case BFD_RELOC_860_LOW3:
+ return howto_table + COFF860_R_LOW3;
+ case BFD_RELOC_860_HIGHADJ:
+ return howto_table + COFF860_R_HIGHADJ;
+ case BFD_RELOC_860_HIGH:
+ return howto_table + COFF860_R_HIGH;
+ default:
+ BFD_FAIL ();
+ return 0;
+ }
+}
+
+/* This is called from coff_slurp_reloc_table for each relocation
+ entry. This special handling is due to the `PAIR' relocation
+ which has a different meaning for the `r_symndx' field. */
+
+static void
+i860_reloc_processing (arelent *cache_ptr, struct internal_reloc *dst,
+ asymbol **symbols, bfd *abfd, asection *asect)
+{
+ if (dst->r_type == COFF860_R_PAIR)
+ {
+ /* Handle the PAIR relocation specially. */
+ cache_ptr->howto = howto_table + dst->r_type;
+ cache_ptr->address = dst->r_vaddr;
+ cache_ptr->addend = dst->r_symndx;
+ cache_ptr->sym_ptr_ptr= bfd_abs_section_ptr->symbol_ptr_ptr;
+ }
+ else
+ {
+ /* For every other relocation, do exactly what coff_slurp_reloc_table
+ would do (which this code is taken directly from). */
+ asymbol *ptr = NULL;
+ cache_ptr->address = dst->r_vaddr;
+
+ if (dst->r_symndx != -1)
+ {
+ if (dst->r_symndx < 0 || dst->r_symndx >= obj_conv_table_size (abfd))
+ {
+ (*_bfd_error_handler)
+ (_("%s: warning: illegal symbol index %ld in relocs"),
+ bfd_archive_filename (abfd), dst->r_symndx);
+ cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
+ ptr = NULL;
+ }
+ else
+ {
+ cache_ptr->sym_ptr_ptr = (symbols
+ + obj_convert (abfd)[dst->r_symndx]);
+ ptr = *(cache_ptr->sym_ptr_ptr);
+ }
+ }
+ else
+ {
+ cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
+ ptr = NULL;
+ }
+
+ /* The symbols definitions that we have read in have been
+ relocated as if their sections started at 0. But the offsets
+ refering to the symbols in the raw data have not been
+ modified, so we have to have a negative addend to compensate.
+
+ Note that symbols which used to be common must be left alone. */
+
+ /* Calculate any reloc addend by looking at the symbol. */
+ CALC_ADDEND (abfd, ptr, (*dst), cache_ptr);
+
+ cache_ptr->address -= asect->vma;
+
+ /* Fill in the cache_ptr->howto field from dst->r_type. */
+ RTYPE2HOWTO (cache_ptr, dst);
+ }
+}
+
+#define coff_rtype_to_howto coff_i860_rtype_to_howto
+#define coff_bfd_reloc_type_lookup coff_i860_reloc_type_lookup
+
+#define RELOC_PROCESSING(relent, reloc, symbols, abfd, section) \
+ i860_reloc_processing (relent, reloc, symbols, abfd, section)
#include "coffcode.h"
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 59b32ed1f6..c1eee1b232 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -3,21 +3,21 @@
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program 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 of the License, or
-(at your option) any later version.
+ This program 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 of the License, or
+ (at your option) any later version.
-This program 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.
+ This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This file contains the COFF backend linker code. */
@@ -28,22 +28,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/internal.h"
#include "libcoff.h"
-static bfd_boolean coff_link_add_object_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean coff_link_check_archive_element
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean coff_link_check_ar_symbols
- PARAMS ((bfd *, struct bfd_link_info *, bfd_boolean *));
-static bfd_boolean coff_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
-static char *dores_com
- PARAMS ((char *, bfd *, int));
-static char *get_name
- PARAMS ((char *, char **));
-static int process_embedded_commands
- PARAMS ((bfd *, struct bfd_link_info *, bfd *));
-static void mark_relocs
- PARAMS ((struct coff_final_link_info *, bfd *));
+static bfd_boolean coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info);
+static bfd_boolean coff_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, bfd_boolean *pneeded);
+static bfd_boolean coff_link_add_symbols (bfd *abfd, struct bfd_link_info *info);
/* Return TRUE if SYM is a weak, external symbol. */
#define IS_WEAK_EXTERNAL(abfd, sym) \
@@ -67,10 +54,9 @@ static void mark_relocs
/* Create an entry in a COFF linker hash table. */
struct bfd_hash_entry *
-_bfd_coff_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+_bfd_coff_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct coff_link_hash_entry *ret = (struct coff_link_hash_entry *) entry;
@@ -103,12 +89,11 @@ _bfd_coff_link_hash_newfunc (entry, table, string)
/* Initialize a COFF linker hash table. */
bfd_boolean
-_bfd_coff_link_hash_table_init (table, abfd, newfunc)
- struct coff_link_hash_table *table;
- bfd *abfd;
- struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *));
+_bfd_coff_link_hash_table_init (struct coff_link_hash_table *table,
+ bfd *abfd,
+ struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *))
{
table->stab_info = NULL;
return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
@@ -117,15 +102,15 @@ _bfd_coff_link_hash_table_init (table, abfd, newfunc)
/* Create a COFF linker hash table. */
struct bfd_link_hash_table *
-_bfd_coff_link_hash_table_create (abfd)
- bfd *abfd;
+_bfd_coff_link_hash_table_create (bfd *abfd)
{
struct coff_link_hash_table *ret;
bfd_size_type amt = sizeof (struct coff_link_hash_table);
- ret = (struct coff_link_hash_table *) bfd_malloc (amt);
+ ret = bfd_malloc (amt);
if (ret == NULL)
return NULL;
+
if (! _bfd_coff_link_hash_table_init (ret, abfd,
_bfd_coff_link_hash_newfunc))
{
@@ -138,10 +123,9 @@ _bfd_coff_link_hash_table_create (abfd)
/* Create an entry in a COFF debug merge hash table. */
struct bfd_hash_entry *
-_bfd_coff_debug_merge_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+_bfd_coff_debug_merge_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
struct coff_debug_merge_hash_entry *ret =
(struct coff_debug_merge_hash_entry *) entry;
@@ -171,17 +155,15 @@ _bfd_coff_debug_merge_hash_newfunc (entry, table, string)
appropriate. */
bfd_boolean
-_bfd_coff_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+_bfd_coff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
switch (bfd_get_format (abfd))
{
case bfd_object:
return coff_link_add_object_symbols (abfd, info);
case bfd_archive:
- return (_bfd_generic_link_add_archive_symbols
- (abfd, info, coff_link_check_archive_element));
+ return _bfd_generic_link_add_archive_symbols
+ (abfd, info, coff_link_check_archive_element);
default:
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -191,52 +173,17 @@ _bfd_coff_link_add_symbols (abfd, info)
/* Add symbols from a COFF object file. */
static bfd_boolean
-coff_link_add_object_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
{
if (! _bfd_coff_get_external_symbols (abfd))
return FALSE;
if (! coff_link_add_symbols (abfd, info))
return FALSE;
- if (! info->keep_memory)
- {
- if (! _bfd_coff_free_symbols (abfd))
- return FALSE;
- }
- return TRUE;
-}
-
-/* Check a single archive element to see if we need to include it in
- the link. *PNEEDED is set according to whether this element is
- needed in the link or not. This is called via
- _bfd_generic_link_add_archive_symbols. */
-
-static bfd_boolean
-coff_link_check_archive_element (abfd, info, pneeded)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean *pneeded;
-{
- if (! _bfd_coff_get_external_symbols (abfd))
- return FALSE;
-
- if (! coff_link_check_ar_symbols (abfd, info, pneeded))
+ if (! info->keep_memory
+ && ! _bfd_coff_free_symbols (abfd))
return FALSE;
- if (*pneeded)
- {
- if (! coff_link_add_symbols (abfd, info))
- return FALSE;
- }
-
- if (! info->keep_memory || ! *pneeded)
- {
- if (! _bfd_coff_free_symbols (abfd))
- return FALSE;
- }
-
return TRUE;
}
@@ -244,10 +191,9 @@ coff_link_check_archive_element (abfd, info, pneeded)
included in the link. */
static bfd_boolean
-coff_link_check_ar_symbols (abfd, info, pneeded)
- bfd *abfd;
- struct bfd_link_info *info;
- bfd_boolean *pneeded;
+coff_link_check_ar_symbols (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean *pneeded)
{
bfd_size_type symesz;
bfd_byte *esym;
@@ -263,7 +209,7 @@ coff_link_check_ar_symbols (abfd, info, pneeded)
struct internal_syment sym;
enum coff_symbol_classification classification;
- bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
+ bfd_coff_swap_sym_in (abfd, esym, &sym);
classification = bfd_coff_classify_symbol (abfd, &sym);
if (classification == COFF_SYMBOL_GLOBAL
@@ -275,22 +221,17 @@ coff_link_check_ar_symbols (abfd, info, pneeded)
/* This symbol is externally visible, and is defined by this
object file. */
-
name = _bfd_coff_internal_syment_name (abfd, &sym, buf);
if (name == NULL)
return FALSE;
h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE);
- /* auto import */
- if (!h && info->pei386_auto_import)
- {
- if (!strncmp (name,"__imp_", 6))
- {
- h =
- bfd_link_hash_lookup (info->hash, name + 6, FALSE, FALSE,
- TRUE);
- }
- }
+ /* Auto import. */
+ if (!h
+ && info->pei386_auto_import
+ && !strncmp (name,"__imp_", 6))
+ h = bfd_link_hash_lookup (info->hash, name + 6, FALSE, FALSE, TRUE);
+
/* We are only interested in symbols that are currently
undefined. If a symbol is currently known to be common,
COFF linkers do not bring in an object file which defines
@@ -312,12 +253,38 @@ coff_link_check_ar_symbols (abfd, info, pneeded)
return TRUE;
}
+/* Check a single archive element to see if we need to include it in
+ the link. *PNEEDED is set according to whether this element is
+ needed in the link or not. This is called via
+ _bfd_generic_link_add_archive_symbols. */
+
+static bfd_boolean
+coff_link_check_archive_element (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean *pneeded)
+{
+ if (! _bfd_coff_get_external_symbols (abfd))
+ return FALSE;
+
+ if (! coff_link_check_ar_symbols (abfd, info, pneeded))
+ return FALSE;
+
+ if (*pneeded
+ && ! coff_link_add_symbols (abfd, info))
+ return FALSE;
+
+ if ((! info->keep_memory || ! *pneeded)
+ && ! _bfd_coff_free_symbols (abfd))
+ return FALSE;
+
+ return TRUE;
+}
+
/* Add all the symbols from an object file to the hash table. */
static bfd_boolean
-coff_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+coff_link_add_symbols (bfd *abfd,
+ struct bfd_link_info *info)
{
unsigned int n_tmask = coff_data (abfd)->local_n_tmask;
unsigned int n_btshft = coff_data (abfd)->local_n_btshft;
@@ -346,7 +313,7 @@ coff_link_add_symbols (abfd, info)
/* We keep a list of the linker hash table entries that correspond
to particular symbols. */
amt = symcount * sizeof (struct coff_link_hash_entry *);
- sym_hash = (struct coff_link_hash_entry **) bfd_zalloc (abfd, amt);
+ sym_hash = bfd_zalloc (abfd, amt);
if (sym_hash == NULL && symcount != 0)
goto error_return;
obj_coff_sym_hashes (abfd) = sym_hash;
@@ -361,7 +328,7 @@ coff_link_add_symbols (abfd, info)
enum coff_symbol_classification classification;
bfd_boolean copy;
- bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &sym);
+ bfd_coff_swap_sym_in (abfd, esym, &sym);
classification = bfd_coff_classify_symbol (abfd, &sym);
if (classification != COFF_SYMBOL_LOCAL)
@@ -564,9 +531,9 @@ coff_link_add_symbols (abfd, info)
for (i = 0, eaux = esym + symesz, iaux = alloc;
i < sym.n_numaux;
i++, eaux += symesz, iaux++)
- bfd_coff_swap_aux_in (abfd, (PTR) eaux, sym.n_type,
+ bfd_coff_swap_aux_in (abfd, eaux, sym.n_type,
sym.n_sclass, (int) i,
- sym.n_numaux, (PTR) iaux);
+ sym.n_numaux, iaux);
(*sym_hash)->aux = alloc;
}
}
@@ -582,7 +549,6 @@ coff_link_add_symbols (abfd, info)
FIXME: This is not at all the right place to do this.
For example, it won't help objdump. This needs to be
done when we swap in the section header. */
-
BFD_ASSERT ((*sym_hash)->numaux == 1);
if (section->_raw_size == 0)
section->_raw_size = (*sym_hash)->aux[0].x_scn.x_scnlen;
@@ -620,7 +586,7 @@ coff_link_add_symbols (abfd, info)
if (secdata == NULL)
{
amt = sizeof (struct coff_section_tdata);
- stab->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
+ stab->used_by_bfd = bfd_zalloc (abfd, amt);
if (stab->used_by_bfd == NULL)
goto error_return;
secdata = coff_section_data (abfd, stab);
@@ -648,9 +614,8 @@ coff_link_add_symbols (abfd, info)
/* Do the final link step. */
bfd_boolean
-_bfd_coff_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+_bfd_coff_final_link (bfd *abfd,
+ struct bfd_link_info *info)
{
bfd_size_type symesz;
struct coff_final_link_info finfo;
@@ -792,7 +757,7 @@ _bfd_coff_final_link (abfd, info)
the target_index fields are 1 based. */
amt = abfd->section_count + 1;
amt *= sizeof (struct coff_link_section_info);
- finfo.section_info = (struct coff_link_section_info *) bfd_malloc (amt);
+ finfo.section_info = bfd_malloc (amt);
if (finfo.section_info == NULL)
goto error_return;
for (i = 0; i <= abfd->section_count; i++)
@@ -835,12 +800,10 @@ _bfd_coff_final_link (abfd, info)
BFD_ASSERT (info->relocatable);
amt = o->reloc_count;
amt *= sizeof (struct internal_reloc);
- finfo.section_info[o->target_index].relocs =
- (struct internal_reloc *) bfd_malloc (amt);
+ finfo.section_info[o->target_index].relocs = bfd_malloc (amt);
amt = o->reloc_count;
amt *= sizeof (struct coff_link_hash_entry *);
- finfo.section_info[o->target_index].rel_hashes =
- (struct coff_link_hash_entry **) bfd_malloc (amt);
+ finfo.section_info[o->target_index].rel_hashes = bfd_malloc (amt);
if (finfo.section_info[o->target_index].relocs == NULL
|| finfo.section_info[o->target_index].rel_hashes == NULL)
goto error_return;
@@ -873,21 +836,21 @@ _bfd_coff_final_link (abfd, info)
/* Allocate some buffers used while linking. */
amt = max_sym_count * sizeof (struct internal_syment);
- finfo.internal_syms = (struct internal_syment *) bfd_malloc (amt);
+ finfo.internal_syms = bfd_malloc (amt);
amt = max_sym_count * sizeof (asection *);
- finfo.sec_ptrs = (asection **) bfd_malloc (amt);
+ finfo.sec_ptrs = bfd_malloc (amt);
amt = max_sym_count * sizeof (long);
- finfo.sym_indices = (long *) bfd_malloc (amt);
- finfo.outsyms = (bfd_byte *) bfd_malloc ((max_sym_count + 1) * symesz);
+ finfo.sym_indices = bfd_malloc (amt);
+ finfo.outsyms = bfd_malloc ((max_sym_count + 1) * symesz);
amt = max_lineno_count * bfd_coff_linesz (abfd);
- finfo.linenos = (bfd_byte *) bfd_malloc (amt);
- finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
+ finfo.linenos = bfd_malloc (amt);
+ finfo.contents = bfd_malloc (max_contents_size);
amt = max_reloc_count * relsz;
- finfo.external_relocs = (bfd_byte *) bfd_malloc (amt);
+ finfo.external_relocs = bfd_malloc (amt);
if (! info->relocatable)
{
amt = max_reloc_count * sizeof (struct internal_reloc);
- finfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
+ finfo.internal_relocs = bfd_malloc (amt);
}
if ((finfo.internal_syms == NULL && max_sym_count > 0)
|| (finfo.sec_ptrs == NULL && max_sym_count > 0)
@@ -996,8 +959,8 @@ _bfd_coff_final_link (abfd, info)
file_ptr pos;
finfo.last_file.n_value = obj_raw_syment_count (abfd);
- bfd_coff_swap_sym_out (abfd, (PTR) &finfo.last_file,
- (PTR) finfo.outsyms);
+ bfd_coff_swap_sym_out (abfd, &finfo.last_file,
+ finfo.outsyms);
pos = obj_sym_filepos (abfd) + finfo.last_file_index * symesz;
if (bfd_seek (abfd, pos, SEEK_SET) != 0
@@ -1012,8 +975,7 @@ _bfd_coff_final_link (abfd, info)
{
finfo.failed = FALSE;
coff_link_hash_traverse (coff_hash_table (info),
- _bfd_coff_write_task_globals,
- (PTR) &finfo);
+ _bfd_coff_write_task_globals, &finfo);
if (finfo.failed)
goto error_return;
}
@@ -1021,8 +983,7 @@ _bfd_coff_final_link (abfd, info)
/* Write out the global symbols. */
finfo.failed = FALSE;
coff_link_hash_traverse (coff_hash_table (info),
- _bfd_coff_write_global_sym,
- (PTR) &finfo);
+ _bfd_coff_write_global_sym, &finfo);
if (finfo.failed)
goto error_return;
@@ -1039,7 +1000,7 @@ _bfd_coff_final_link (abfd, info)
the symbol indices to use for relocs against them, and we can
finally write out the relocs. */
amt = max_output_reloc_count * relsz;
- external_relocs = (bfd_byte *) bfd_malloc (amt);
+ external_relocs = bfd_malloc (amt);
if (external_relocs == NULL)
goto error_return;
@@ -1064,11 +1025,11 @@ _bfd_coff_final_link (abfd, info)
BFD_ASSERT ((*rel_hash)->indx >= 0);
irel->r_symndx = (*rel_hash)->indx;
}
- bfd_coff_swap_reloc_out (abfd, (PTR) irel, (PTR) erel);
+ bfd_coff_swap_reloc_out (abfd, irel, erel);
}
if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0
- || (bfd_bwrite ((PTR) external_relocs,
+ || (bfd_bwrite (external_relocs,
(bfd_size_type) relsz * o->reloc_count, abfd)
!= (bfd_size_type) relsz * o->reloc_count))
goto error_return;
@@ -1175,17 +1136,15 @@ _bfd_coff_final_link (abfd, info)
return FALSE;
}
-/* parse out a -heap <reserved>,<commit> line */
+/* Parse out a -heap <reserved>,<commit> line. */
static char *
-dores_com (ptr, output_bfd, heap)
- char *ptr;
- bfd *output_bfd;
- int heap;
+dores_com (char *ptr, bfd *output_bfd, int heap)
{
if (coff_data(output_bfd)->pe)
{
int val = strtoul (ptr, &ptr, 0);
+
if (heap)
pe_data(output_bfd)->pe_opthdr.SizeOfHeapReserve = val;
else
@@ -1203,9 +1162,8 @@ dores_com (ptr, output_bfd, heap)
return ptr;
}
-static char *get_name(ptr, dst)
-char *ptr;
-char **dst;
+static char *
+get_name (char *ptr, char **dst)
{
while (*ptr == ' ')
ptr++;
@@ -1216,85 +1174,89 @@ char **dst;
return ptr+1;
}
-/* Process any magic embedded commands in a section called .drectve */
+/* Process any magic embedded commands in a section called .drectve. */
static int
-process_embedded_commands (output_bfd, info, abfd)
- bfd *output_bfd;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *abfd;
+process_embedded_commands (bfd *output_bfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ bfd *abfd)
{
asection *sec = bfd_get_section_by_name (abfd, ".drectve");
char *s;
char *e;
char *copy;
+
if (!sec)
return 1;
copy = bfd_malloc (sec->_raw_size);
if (!copy)
return 0;
- if (! bfd_get_section_contents(abfd, sec, copy, (bfd_vma) 0, sec->_raw_size))
+
+ if (! bfd_get_section_contents (abfd, sec, copy, (bfd_vma) 0, sec->_raw_size))
{
free (copy);
return 0;
}
e = copy + sec->_raw_size;
+
for (s = copy; s < e ; )
{
- if (s[0]!= '-') {
- s++;
- continue;
- }
+ if (s[0]!= '-')
+ {
+ s++;
+ continue;
+ }
if (strncmp (s,"-attr", 5) == 0)
{
char *name;
char *attribs;
asection *asec;
-
int loop = 1;
int had_write = 0;
int had_read = 0;
int had_exec= 0;
int had_shared= 0;
+
s += 5;
- s = get_name(s, &name);
- s = get_name(s, &attribs);
- while (loop) {
- switch (*attribs++)
- {
- case 'W':
- had_write = 1;
- break;
- case 'R':
- had_read = 1;
- break;
- case 'S':
- had_shared = 1;
- break;
- case 'X':
- had_exec = 1;
- break;
- default:
- loop = 0;
- }
- }
+ s = get_name (s, &name);
+ s = get_name (s, &attribs);
+
+ while (loop)
+ {
+ switch (*attribs++)
+ {
+ case 'W':
+ had_write = 1;
+ break;
+ case 'R':
+ had_read = 1;
+ break;
+ case 'S':
+ had_shared = 1;
+ break;
+ case 'X':
+ had_exec = 1;
+ break;
+ default:
+ loop = 0;
+ }
+ }
asec = bfd_get_section_by_name (abfd, name);
- if (asec) {
- if (had_exec)
- asec->flags |= SEC_CODE;
- if (!had_write)
- asec->flags |= SEC_READONLY;
- }
+ if (asec)
+ {
+ if (had_exec)
+ asec->flags |= SEC_CODE;
+ if (!had_write)
+ asec->flags |= SEC_READONLY;
+ }
}
else if (strncmp (s,"-heap", 5) == 0)
- {
- s = dores_com (s+5, output_bfd, 1);
- }
+ s = dores_com (s+5, output_bfd, 1);
+
else if (strncmp (s,"-stack", 6) == 0)
- {
- s = dores_com (s+6, output_bfd, 0);
- }
+ s = dores_com (s+6, output_bfd, 0);
+
else
s++;
}
@@ -1305,13 +1267,10 @@ process_embedded_commands (output_bfd, info, abfd)
/* Place a marker against all symbols which are used by relocations.
This marker can be picked up by the 'do we skip this symbol ?'
loop in _bfd_coff_link_input_bfd() and used to prevent skipping
- that symbol.
- */
+ that symbol. */
static void
-mark_relocs (finfo, input_bfd)
- struct coff_final_link_info * finfo;
- bfd * input_bfd;
+mark_relocs (struct coff_final_link_info *finfo, bfd *input_bfd)
{
asection * a;
@@ -1349,12 +1308,9 @@ mark_relocs (finfo, input_bfd)
/* Place a mark in the sym_indices array (whose entries have
been initialised to 0) for all of the symbols that are used
in the relocation table. This will then be picked up in the
- skip/don't pass */
-
+ skip/don't-skip pass. */
for (; irel < irelend; irel++)
- {
- finfo->sym_indices[ irel->r_symndx ] = -1;
- }
+ finfo->sym_indices[ irel->r_symndx ] = -1;
}
}
@@ -1362,9 +1318,7 @@ mark_relocs (finfo, input_bfd)
handles all the sections and relocations of the input file at once. */
bfd_boolean
-_bfd_coff_link_input_bfd (finfo, input_bfd)
- struct coff_final_link_info *finfo;
- bfd *input_bfd;
+_bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
{
unsigned int n_tmask = coff_data (input_bfd)->local_n_tmask;
unsigned int n_btshft = coff_data (input_bfd)->local_n_btshft;
@@ -1372,8 +1326,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
unsigned int n_btmask = coff_data (input_bfd)->local_n_btmask;
#endif
bfd_boolean (*adjust_symndx)
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- struct internal_reloc *, bfd_boolean *));
+ (bfd *, struct bfd_link_info *, bfd *, asection *,
+ struct internal_reloc *, bfd_boolean *);
bfd *output_bfd;
const char *strings;
bfd_size_type syment_base;
@@ -1419,20 +1373,18 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
output_index = syment_base;
outsym = finfo->outsyms;
- if (coff_data (output_bfd)->pe)
- {
- if (! process_embedded_commands (output_bfd, finfo->info, input_bfd))
- return FALSE;
- }
+ if (coff_data (output_bfd)->pe
+ && ! process_embedded_commands (output_bfd, finfo->info, input_bfd))
+ return FALSE;
- /* If we are going to perform relocations and also strip/discard some symbols
- then we must make sure that we do not strip/discard those symbols that are
- going to be involved in the relocations */
+ /* If we are going to perform relocations and also strip/discard some
+ symbols then we must make sure that we do not strip/discard those
+ symbols that are going to be involved in the relocations. */
if (( finfo->info->strip != strip_none
|| finfo->info->discard != discard_none)
&& finfo->info->relocatable)
{
- /* mark the symbol array as 'not-used' */
+ /* Mark the symbol array as 'not-used'. */
memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp);
mark_relocs (finfo, input_bfd);
@@ -1447,7 +1399,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
bfd_boolean dont_skip_symbol;
int add;
- bfd_coff_swap_sym_in (input_bfd, (PTR) esym, (PTR) isymp);
+ bfd_coff_swap_sym_in (input_bfd, esym, isymp);
/* Make a copy of *isymp so that the relocate_section function
always sees the original values. This is more reliable than
@@ -1529,13 +1481,12 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
/* Skip section symbols for sections which are not going to be
emitted. */
if (!skip
+ && dont_skip_symbol == 0
&& isym.n_sclass == C_STAT
&& isym.n_type == T_NULL
- && isym.n_numaux > 0)
- {
- if ((*secpp)->output_section == bfd_abs_section_ptr)
- skip = TRUE;
- }
+ && isym.n_numaux > 0
+ && (*secpp)->output_section == bfd_abs_section_ptr)
+ skip = TRUE;
#endif
/* If we stripping debugging symbols, and this is a debugging
@@ -1620,16 +1571,16 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
out to be a duplicate, we pass this address to
bfd_release. */
amt = sizeof (struct coff_debug_merge_type);
- mt = (struct coff_debug_merge_type *) bfd_alloc (input_bfd, amt);
+ mt = bfd_alloc (input_bfd, amt);
if (mt == NULL)
return FALSE;
mt->class = isym.n_sclass;
/* Pick up the aux entry, which points to the end of the tag
entries. */
- bfd_coff_swap_aux_in (input_bfd, (PTR) (esym + isymesz),
+ bfd_coff_swap_aux_in (input_bfd, (esym + isymesz),
isym.n_type, isym.n_sclass, 0, isym.n_numaux,
- (PTR) &aux);
+ &aux);
/* Gather the elements. */
epp = &mt->elements;
@@ -1644,11 +1595,10 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
char elebuf[SYMNMLEN + 1];
char *name_copy;
- bfd_coff_swap_sym_in (input_bfd, (PTR) esl, (PTR) islp);
+ bfd_coff_swap_sym_in (input_bfd, esl, islp);
amt = sizeof (struct coff_debug_merge_element);
- *epp = ((struct coff_debug_merge_element *)
- bfd_alloc (input_bfd, amt));
+ *epp = bfd_alloc (input_bfd, amt);
if (*epp == NULL)
return FALSE;
@@ -1658,7 +1608,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
return FALSE;
amt = strlen (elename) + 1;
- name_copy = (char *) bfd_alloc (input_bfd, amt);
+ name_copy = bfd_alloc (input_bfd, amt);
if (name_copy == NULL)
return FALSE;
strcpy (name_copy, elename);
@@ -1673,16 +1623,15 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
union internal_auxent eleaux;
long indx;
- bfd_coff_swap_aux_in (input_bfd, (PTR) (esl + isymesz),
+ bfd_coff_swap_aux_in (input_bfd, (esl + isymesz),
islp->n_type, islp->n_sclass, 0,
- islp->n_numaux, (PTR) &eleaux);
+ islp->n_numaux, &eleaux);
indx = eleaux.x_sym.x_tagndx.l;
/* FIXME: If this tagndx entry refers to a symbol
defined later in this file, we just ignore it.
Handling this correctly would be tedious, and may
not be required. */
-
if (indx > 0
&& (indx
< ((esym -
@@ -1705,7 +1654,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
type. We always output the type if it has no elements,
for simplicity. */
if (mt->elements == NULL)
- bfd_release (input_bfd, (PTR) mt);
+ bfd_release (input_bfd, mt);
else
{
struct coff_debug_merge_type *mtl;
@@ -1741,7 +1690,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
else
{
/* This is a redefinition which can be merged. */
- bfd_release (input_bfd, (PTR) mt);
+ bfd_release (input_bfd, mt);
*indexp = mtl->indx;
add = (eslend - esym) / isymesz;
skip = TRUE;
@@ -1765,8 +1714,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
bfd_coff_symname_in_debug. That is only true for
XCOFF, and XCOFF requires different linking code
anyhow. */
- name = _bfd_coff_internal_syment_name (input_bfd, &isym,
- (char *) NULL);
+ name = _bfd_coff_internal_syment_name (input_bfd, &isym, NULL);
if (name == NULL)
return FALSE;
indx = _bfd_stringtab_add (finfo->strtab, name, hash, copy);
@@ -1839,7 +1787,6 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
it). We try to get this right, below, just before we
write the symbols out, but in the general case we may
have to write the symbol out twice. */
-
if (finfo->last_file_index != -1
&& finfo->last_file.n_value != (bfd_vma) output_index)
{
@@ -1850,11 +1797,11 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
{
/* The last C_FILE symbol is in this input file. */
bfd_coff_swap_sym_out (output_bfd,
- (PTR) &finfo->last_file,
- (PTR) (finfo->outsyms
- + ((finfo->last_file_index
- - syment_base)
- * osymesz)));
+ &finfo->last_file,
+ (finfo->outsyms
+ + ((finfo->last_file_index
+ - syment_base)
+ * osymesz)));
}
else
{
@@ -1864,8 +1811,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
symbol. We need to write it out again. We
borrow *outsym temporarily. */
bfd_coff_swap_sym_out (output_bfd,
- (PTR) &finfo->last_file,
- (PTR) outsym);
+ &finfo->last_file, outsym);
pos = obj_sym_filepos (output_bfd);
pos += finfo->last_file_index * osymesz;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
@@ -1885,8 +1831,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
isym.n_sclass = C_STAT;
/* Output the symbol. */
-
- bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) outsym);
+ bfd_coff_swap_sym_out (output_bfd, &isym, outsym);
*indexp = output_index;
@@ -1926,13 +1871,13 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
/* Fix up the aux entries. This must be done in a separate pass,
because we don't know the correct symbol indices until we have
already decided which symbols we are going to keep. */
-
esym = (bfd_byte *) obj_coff_external_syms (input_bfd);
esym_end = esym + obj_raw_syment_count (input_bfd) * isymesz;
isymp = finfo->internal_syms;
indexp = finfo->sym_indices;
sym_hash = obj_coff_sym_hashes (input_bfd);
outsym = finfo->outsyms;
+
while (esym < esym_end)
{
int add;
@@ -1977,9 +1922,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
auxp = h->aux + i;
else
{
- bfd_coff_swap_aux_in (input_bfd, (PTR) esym, isymp->n_type,
- isymp->n_sclass, i, isymp->n_numaux,
- (PTR) &aux);
+ bfd_coff_swap_aux_in (input_bfd, esym, isymp->n_type,
+ isymp->n_sclass, i, isymp->n_numaux, &aux);
auxp = &aux;
}
@@ -2072,18 +2016,19 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if ((bfd_size_type) finfo->last_bf_index
>= syment_base)
{
- PTR auxout;
+ void *auxout;
/* The last .bf symbol is in this input
file. This will only happen if the
assembler did not set up the .bf
endndx symbols correctly. */
- auxout = (PTR) (finfo->outsyms
- + ((finfo->last_bf_index
- - syment_base)
- * osymesz));
+ auxout = (finfo->outsyms
+ + ((finfo->last_bf_index
+ - syment_base)
+ * osymesz));
+
bfd_coff_swap_aux_out (output_bfd,
- (PTR) &finfo->last_bf,
+ &finfo->last_bf,
isymp->n_type,
isymp->n_sclass,
0, isymp->n_numaux,
@@ -2099,11 +2044,11 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
temporarily. FIXME: This case should
be made faster. */
bfd_coff_swap_aux_out (output_bfd,
- (PTR) &finfo->last_bf,
+ &finfo->last_bf,
isymp->n_type,
isymp->n_sclass,
0, isymp->n_numaux,
- (PTR) outsym);
+ outsym);
pos = obj_sym_filepos (output_bfd);
pos += finfo->last_bf_index * osymesz;
if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
@@ -2130,9 +2075,9 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (h == NULL)
{
- bfd_coff_swap_aux_out (output_bfd, (PTR) auxp, isymp->n_type,
+ bfd_coff_swap_aux_out (output_bfd, auxp, isymp->n_type,
isymp->n_sclass, i, isymp->n_numaux,
- (PTR) outsym);
+ outsym);
outsym += osymesz;
}
@@ -2186,7 +2131,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
{
struct internal_lineno iline;
- bfd_coff_swap_lineno_in (input_bfd, (PTR) eline, (PTR) &iline);
+ bfd_coff_swap_lineno_in (input_bfd, eline, &iline);
if (iline.l_lnno != 0)
iline.l_addr.l_paddr += offset;
@@ -2222,27 +2167,26 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
of the line numbers rather than an absolute
file index. */
bfd_coff_swap_sym_in (output_bfd,
- (PTR) (finfo->outsyms
- + ((indx - syment_base)
- * osymesz)),
- (PTR) &is);
+ (finfo->outsyms
+ + ((indx - syment_base)
+ * osymesz)), &is);
if ((ISFCN (is.n_type)
|| is.n_sclass == C_BLOCK)
&& is.n_numaux >= 1)
{
- PTR auxptr;
+ void *auxptr;
- auxptr = (PTR) (finfo->outsyms
- + ((indx - syment_base + 1)
- * osymesz));
+ auxptr = (finfo->outsyms
+ + ((indx - syment_base + 1)
+ * osymesz));
bfd_coff_swap_aux_in (output_bfd, auxptr,
is.n_type, is.n_sclass,
- 0, is.n_numaux, (PTR) &ia);
+ 0, is.n_numaux, &ia);
ia.x_sym.x_fcnary.x_fcn.x_lnnoptr =
(o->output_section->line_filepos
+ o->output_section->lineno_count * linesz
+ eline - finfo->linenos);
- bfd_coff_swap_aux_out (output_bfd, (PTR) &ia,
+ bfd_coff_swap_aux_out (output_bfd, &ia,
is.n_type, is.n_sclass, 0,
is.n_numaux, auxptr);
}
@@ -2255,8 +2199,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (!skipping)
{
- bfd_coff_swap_lineno_out (output_bfd, (PTR) &iline,
- (PTR) oeline);
+ bfd_coff_swap_lineno_out (output_bfd, &iline, oeline);
oeline += linesz;
}
}
@@ -2280,10 +2223,10 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
&& (bfd_size_type) finfo->last_file_index >= syment_base)
{
finfo->last_file.n_value = output_index;
- bfd_coff_swap_sym_out (output_bfd, (PTR) &finfo->last_file,
- (PTR) (finfo->outsyms
- + ((finfo->last_file_index - syment_base)
- * osymesz)));
+ bfd_coff_swap_sym_out (output_bfd, &finfo->last_file,
+ (finfo->outsyms
+ + ((finfo->last_file_index - syment_base)
+ * osymesz)));
}
/* Write the modified symbols to the output file. */
@@ -2313,10 +2256,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
struct coff_section_tdata *secdata;
if (! o->linker_mark)
- {
- /* This section was omitted from the link. */
- continue;
- }
+ /* This section was omitted from the link. */
+ continue;
if ((o->flags & SEC_HAS_CONTENTS) == 0
|| (o->_raw_size == 0 && (o->flags & SEC_RELOC) == 0))
@@ -2393,7 +2334,6 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
*rel_hash = NULL;
/* Adjust the reloc address and symbol index. */
-
irel->r_vaddr += offset;
if (irel->r_symndx == -1)
@@ -2444,7 +2384,6 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
stripping. This should have been handled
by the 'dont_skip_symbol' code in the while
loop at the top of this function. */
-
is = finfo->internal_syms + irel->r_symndx;
name = (_bfd_coff_internal_syment_name
@@ -2483,11 +2422,9 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
}
}
- if (! finfo->info->keep_memory)
- {
- if (! _bfd_coff_free_symbols (input_bfd))
- return FALSE;
- }
+ if (! finfo->info->keep_memory
+ && ! _bfd_coff_free_symbols (input_bfd))
+ return FALSE;
return TRUE;
}
@@ -2495,9 +2432,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
/* Write out a global symbol. Called via coff_link_hash_traverse. */
bfd_boolean
-_bfd_coff_write_global_sym (h, data)
- struct coff_link_hash_entry *h;
- PTR data;
+_bfd_coff_write_global_sym (struct coff_link_hash_entry *h, void *data)
{
struct coff_final_link_info *finfo = (struct coff_final_link_info *) data;
bfd *output_bfd;
@@ -2616,7 +2551,7 @@ _bfd_coff_write_global_sym (h, data)
isym.n_numaux = h->numaux;
- bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) finfo->outsyms);
+ bfd_coff_swap_sym_out (output_bfd, &isym, finfo->outsyms);
symesz = bfd_coff_symesz (output_bfd);
@@ -2663,7 +2598,6 @@ _bfd_coff_write_global_sym (h, data)
/* For PE, an overflow on the final link reportedly does
not matter. FIXME: Why not? */
-
if (sec->reloc_count > 0xffff
&& (! obj_pe (output_bfd)
|| finfo->info->relocatable))
@@ -2690,9 +2624,9 @@ _bfd_coff_write_global_sym (h, data)
}
}
- bfd_coff_swap_aux_out (output_bfd, (PTR) auxp, isym.n_type,
+ bfd_coff_swap_aux_out (output_bfd, auxp, isym.n_type,
isym.n_sclass, (int) i, isym.n_numaux,
- (PTR) finfo->outsyms);
+ finfo->outsyms);
if (bfd_bwrite (finfo->outsyms, symesz, output_bfd) != symesz)
{
finfo->failed = TRUE;
@@ -2709,9 +2643,7 @@ _bfd_coff_write_global_sym (h, data)
the dirty work, if the symbol we are processing needs conversion. */
bfd_boolean
-_bfd_coff_write_task_globals (h, data)
- struct coff_link_hash_entry *h;
- PTR data;
+_bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data)
{
struct coff_final_link_info *finfo = (struct coff_final_link_info *) data;
bfd_boolean rtnval = TRUE;
@@ -2741,11 +2673,10 @@ _bfd_coff_write_task_globals (h, data)
/* Handle a link order which is supposed to generate a reloc. */
bfd_boolean
-_bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
- bfd *output_bfd;
- struct coff_final_link_info *finfo;
- asection *output_section;
- struct bfd_link_order *link_order;
+_bfd_coff_reloc_link_order (bfd *output_bfd,
+ struct coff_final_link_info *finfo,
+ asection *output_section,
+ struct bfd_link_order *link_order)
{
reloc_howto_type *howto;
struct internal_reloc *irel;
@@ -2767,7 +2698,7 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
file_ptr loc;
size = bfd_get_reloc_size (howto);
- buf = (bfd_byte *) bfd_zmalloc (size);
+ buf = bfd_zmalloc (size);
if (buf == NULL)
return FALSE;
@@ -2797,7 +2728,7 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
break;
}
loc = link_order->offset * bfd_octets_per_byte (output_bfd);
- ok = bfd_set_section_contents (output_bfd, output_section, (PTR) buf,
+ ok = bfd_set_section_contents (output_bfd, output_section, buf,
loc, size);
free (buf);
if (! ok)
@@ -2806,7 +2737,6 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
/* Store the reloc information in the right place. It will get
swapped and written out at the end of the final_link routine. */
-
irel = (finfo->section_info[output_section->target_index].relocs
+ output_section->reloc_count);
rel_hash_ptr = (finfo->section_info[output_section->target_index].rel_hashes
@@ -2865,7 +2795,6 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
routines anyhow. r_extern is only used for ECOFF. */
/* FIXME: What is the right value for r_offset? Is zero OK? */
-
++output_section->reloc_count;
return TRUE;
@@ -2875,17 +2804,14 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
simple relocs. */
bfd_boolean
-_bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
- input_section, contents, relocs, syms,
- sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- struct internal_reloc *relocs;
- struct internal_syment *syms;
- asection **sections;
+_bfd_coff_generic_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ struct internal_reloc *relocs,
+ struct internal_syment *syms,
+ asection **sections)
{
struct internal_reloc *rel;
struct internal_reloc *relend;
@@ -2927,7 +2853,6 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
size of the symbol is included in the section contents, or it
is not. We assume that the size is not included, and force
the rtype_to_howto function to adjust the addend as needed. */
-
if (sym != NULL && sym->n_scnum != 0)
addend = - sym->n_value;
else
diff --git a/bfd/config.bfd b/bfd/config.bfd
index a14967541d..b047c646ea 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -100,7 +100,7 @@ case "${targ}" in
# START OF targmatch.h
#ifdef BFD64
- alpha*-*-freebsd*)
+ alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_alpha_freebsd_vec
targ_selvecs=ecoffalpha_little_vec
# FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
@@ -131,7 +131,7 @@ case "${targ}" in
alpha*-*-*)
targ_defvec=ecoffalpha_little_vec
;;
- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf*)
+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_ia64_little_vec
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
;;
@@ -139,7 +139,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_ia64_hpux_big_vec
targ_selvecs="bfd_elf64_ia64_hpux_big_vec"
;;
- sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-openbsd*)
+ sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-openbsd* | sparc64-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
;;
@@ -222,7 +222,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*)
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
@@ -452,7 +452,7 @@ case "${targ}" in
targ_selvecs=i386bsd_vec
targ_underscore=yes
;;
- i[3-7]86-*-freebsd*)
+ i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
targ_defvec=bfd_elf32_i386_freebsd_vec
targ_selvecs=i386coff_vec
# FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
@@ -494,7 +494,7 @@ case "${targ}" in
targ64_selvecs=bfd_elf64_x86_64_vec
;;
#ifdef BFD64
- x86_64-*-freebsd*)
+ x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386coff_vec bfd_efi_app_ia32_vec"
;;
diff --git a/bfd/config.in b/bfd/config.in
index 9a73c73025..ab273c8be1 100644
--- a/bfd/config.in
+++ b/bfd/config.in
@@ -103,6 +103,9 @@
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
+/* Define if you have the strtoull function. */
+#undef HAVE_STRTOULL
+
/* Define if you have the sysconf function. */
#undef HAVE_SYSCONF
diff --git a/bfd/configure b/bfd/configure
index 80225237b7..0d62a863bd 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -4497,6 +4497,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
BFD_HOST_64BIT_LONG=0
+BFD_HOST_LONG_LONG=0
BFD_HOST_64_BIT_DEFINED=0
BFD_HOST_64_BIT=
BFD_HOST_U_64_BIT=
@@ -4508,6 +4509,38 @@ elif test "x${HOST_64BIT_TYPE}" != "x"; then
BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
fi
+echo $ac_n "checking for long long""... $ac_c" 1>&6
+echo "configure:4514: checking for long long" >&5
+if eval "test \"`echo '$''{'bfd_cv_has_long_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4519 "configure"
+#include "confdefs.h"
+
+int main() {
+unsigned long long ll = 18446744073709551615ULL;
+; return 0; }
+EOF
+if { (eval echo configure:4526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_has_long_long=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bfd_cv_has_long_long=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bfd_cv_has_long_long" 1>&6
+if test $bfd_cv_has_long_long = yes; then
+ BFD_HOST_LONG_LONG=1
+fi
+
+
+
@@ -4526,7 +4559,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4530: checking for build system executable suffix" >&5
+echo "configure:4563: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4554,17 +4587,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4558: checking for $ac_hdr" >&5
+echo "configure:4591: 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 4563 "configure"
+#line 4596 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4594,17 +4627,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4598: checking for $ac_hdr" >&5
+echo "configure:4631: 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 4603 "configure"
+#line 4636 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4631,12 +4664,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4635: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4668: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4640 "configure"
+#line 4673 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -4645,7 +4678,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -4670,12 +4703,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4674: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4707: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4679 "configure"
+#line 4712 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4683,7 +4716,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4708,7 +4741,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4712: checking for opendir in -ldir" >&5
+echo "configure:4745: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4716,7 +4749,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4720 "configure"
+#line 4753 "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
@@ -4727,7 +4760,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4749,7 +4782,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4753: checking for opendir in -lx" >&5
+echo "configure:4786: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4757,7 +4790,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4761 "configure"
+#line 4794 "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
@@ -4768,7 +4801,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4793,12 +4826,67 @@ fi
for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4797: checking for $ac_func" >&5
+echo "configure:4830: 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 4835 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in strtoull
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4885: 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 4802 "configure"
+#line 4890 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4821,7 +4909,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4856,12 +4944,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4860: checking whether strstr must be declared" >&5
+echo "configure:4948: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4865 "configure"
+#line 4953 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4882,7 +4970,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4903,12 +4991,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4907: checking whether malloc must be declared" >&5
+echo "configure:4995: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4912 "configure"
+#line 5000 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4929,7 +5017,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:4933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -4950,12 +5038,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4954: checking whether realloc must be declared" >&5
+echo "configure:5042: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4959 "configure"
+#line 5047 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4976,7 +5064,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -4997,12 +5085,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:5001: checking whether free must be declared" >&5
+echo "configure:5089: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5006 "configure"
+#line 5094 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5023,7 +5111,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -5044,12 +5132,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5048: checking whether getenv must be declared" >&5
+echo "configure:5136: checking whether getenv must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5053 "configure"
+#line 5141 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5070,7 +5158,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:5074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -5097,7 +5185,7 @@ COREFLAG=
TRAD_HEADER=
if test "${target}" = "${host}"; then
case "${host}" in
- alpha*-*-freebsd*)
+ alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
COREFILE=''
;;
alpha*-*-linux-gnu*)
@@ -5108,7 +5196,8 @@ if test "${target}" = "${host}"; then
COREFILE=netbsd-core.lo
;;
alpha*-*-*) COREFILE=osf-core.lo ;;
- arm-*-freebsd*) COREFILE='' ;;
+ arm-*-freebsd* | arm-*-kfreebsd*-gnu)
+ COREFILE='' ;;
arm-*-netbsd*) COREFILE=netbsd-core.lo ;;
arm-*-riscix) COREFILE=trad-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
@@ -5137,7 +5226,7 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
;;
- i[3-7]86-*-freebsd*)
+ i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
COREFILE=''
TRAD_HEADER='"hosts/i386bsd.h"'
;;
@@ -5257,16 +5346,16 @@ if test "${target}" = "${host}"; then
# Not all versions of AIX with -DAIX_CORE_DUMPX_CORE
# have c_impl as a member of struct core_dumpx
echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
-echo "configure:5261: checking for c_impl in struct core_dumpx" >&5
+echo "configure:5350: checking for c_impl in struct core_dumpx" >&5
cat > conftest.$ac_ext <<EOF
-#line 5263 "configure"
+#line 5352 "configure"
#include "confdefs.h"
#include <core.h>
int main() {
struct core_dumpx c; c.c_impl = 0;
; return 0; }
EOF
-if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_ST_C_IMPL 1
@@ -5286,7 +5375,8 @@ rm -f conftest*
powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
powerpc-*-beos*) ;;
- powerpc-*-freebsd*) COREFILE='' ;;
+ powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
+ COREFILE='' ;;
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
s390*-*-*) COREFILE=trad-core.lo ;;
@@ -5336,17 +5426,17 @@ rm -f conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5340: checking for $ac_hdr" >&5
+echo "configure:5430: 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 5345 "configure"
+#line 5435 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5374,12 +5464,12 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5378: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5468: checking for prstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5383 "configure"
+#line 5473 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5388,7 +5478,7 @@ int main() {
prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
@@ -5410,12 +5500,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5414: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5504: checking for prstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5419 "configure"
+#line 5509 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5424,7 +5514,7 @@ int main() {
prstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
@@ -5446,12 +5536,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5450: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5540: checking for prstatus_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5455 "configure"
+#line 5545 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5460,7 +5550,7 @@ int main() {
prstatus_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
@@ -5482,12 +5572,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5486: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5576: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5491 "configure"
+#line 5581 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5496,7 +5586,7 @@ int main() {
prstatus32_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
@@ -5518,12 +5608,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5522: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5612: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5527 "configure"
+#line 5617 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5532,7 +5622,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5554,12 +5644,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5558: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5648: checking for pxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5563 "configure"
+#line 5653 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5568,7 +5658,7 @@ int main() {
pxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
@@ -5590,12 +5680,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5594: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5684: checking for pstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5599 "configure"
+#line 5689 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5604,7 +5694,7 @@ int main() {
pstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
@@ -5626,12 +5716,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5630: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5720: checking for prpsinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5635 "configure"
+#line 5725 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5640,7 +5730,7 @@ int main() {
prpsinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
@@ -5662,12 +5752,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5666: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5756: checking for prpsinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5671 "configure"
+#line 5761 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5676,7 +5766,7 @@ int main() {
prpsinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
@@ -5698,12 +5788,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5702: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5792: checking for psinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5707 "configure"
+#line 5797 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5712,7 +5802,7 @@ int main() {
psinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
@@ -5734,12 +5824,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5738: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5828: checking for psinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5743 "configure"
+#line 5833 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5748,7 +5838,7 @@ int main() {
psinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
@@ -5770,12 +5860,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5774: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5864: checking for lwpstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5779 "configure"
+#line 5869 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5784,7 +5874,7 @@ int main() {
lwpstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
@@ -5806,12 +5896,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5810: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:5900: checking for lwpxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5815 "configure"
+#line 5905 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5820,7 +5910,7 @@ int main() {
lwpxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
@@ -5842,12 +5932,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5846: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:5936: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5851 "configure"
+#line 5941 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5856,7 +5946,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
; return 0; }
EOF
-if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
@@ -5878,12 +5968,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5882: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:5972: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5887 "configure"
+#line 5977 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5892,7 +5982,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
; return 0; }
EOF
-if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
@@ -5914,12 +6004,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5918: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:6008: checking for win32_pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5923 "configure"
+#line 6013 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5928,7 +6018,7 @@ int main() {
win32_pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
@@ -6397,10 +6487,10 @@ case ${host64}-${target64}-${want64} in
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6401: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6491: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
-#line 6404 "configure"
+#line 6494 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6446,17 +6536,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6450: checking for $ac_hdr" >&5
+echo "configure:6540: 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 6455 "configure"
+#line 6545 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6485,12 +6575,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6489: checking for $ac_func" >&5
+echo "configure:6579: 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 6494 "configure"
+#line 6584 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6513,7 +6603,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6538,7 +6628,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6542: checking for working mmap" >&5
+echo "configure:6632: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6546,7 +6636,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6550 "configure"
+#line 6640 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6686,7 +6776,7 @@ main()
}
EOF
-if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -6711,12 +6801,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6715: checking for $ac_func" >&5
+echo "configure:6805: 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 6720 "configure"
+#line 6810 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6739,7 +6829,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6972,6 +7062,7 @@ s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@l@%$l%g
s%@HDEFINES@%$HDEFINES%g
s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
+s%@BFD_HOST_LONG_LONG@%$BFD_HOST_LONG_LONG%g
s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
diff --git a/bfd/configure.in b/bfd/configure.in
index 04ccf0ae6e..b3a6e68bbc 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -113,6 +113,7 @@ AC_SUBST(HDEFINES)
AC_PROG_INSTALL
BFD_HOST_64BIT_LONG=0
+BFD_HOST_LONG_LONG=0
BFD_HOST_64_BIT_DEFINED=0
BFD_HOST_64_BIT=
BFD_HOST_U_64_BIT=
@@ -123,7 +124,19 @@ elif test "x${HOST_64BIT_TYPE}" != "x"; then
BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
fi
+
+AC_MSG_CHECKING([for long long])
+AC_CACHE_VAL(bfd_cv_has_long_long,
+[AC_TRY_COMPILE(,
+[unsigned long long ll = 18446744073709551615ULL;],
+bfd_cv_has_long_long=yes, bfd_cv_has_long_long=no)])
+AC_MSG_RESULT($bfd_cv_has_long_long)
+if test $bfd_cv_has_long_long = yes; then
+ BFD_HOST_LONG_LONG=1
+fi
+
AC_SUBST(BFD_HOST_64BIT_LONG)
+AC_SUBST(BFD_HOST_LONG_LONG)
AC_SUBST(BFD_HOST_64_BIT_DEFINED)
AC_SUBST(BFD_HOST_64_BIT)
AC_SUBST(BFD_HOST_U_64_BIT)
@@ -135,6 +148,7 @@ AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
+AC_CHECK_FUNCS(strtoull)
BFD_BINARY_FOPEN
@@ -150,7 +164,7 @@ COREFLAG=
TRAD_HEADER=
if test "${target}" = "${host}"; then
case "${host}" in
- alpha*-*-freebsd*)
+ alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
COREFILE=''
;;
alpha*-*-linux-gnu*)
@@ -161,7 +175,8 @@ if test "${target}" = "${host}"; then
COREFILE=netbsd-core.lo
;;
alpha*-*-*) COREFILE=osf-core.lo ;;
- arm-*-freebsd*) COREFILE='' ;;
+ arm-*-freebsd* | arm-*-kfreebsd*-gnu)
+ COREFILE='' ;;
arm-*-netbsd*) COREFILE=netbsd-core.lo ;;
arm-*-riscix) COREFILE=trad-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
@@ -199,7 +214,7 @@ changequote([,])dnl
TRAD_HEADER='"hosts/i386bsd.h"'
;;
changequote(,)dnl
- i[3-7]86-*-freebsd*)
+ i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
changequote([,])dnl
COREFILE=''
TRAD_HEADER='"hosts/i386bsd.h"'
@@ -347,7 +362,8 @@ changequote([,])dnl
powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
powerpc-*-beos*) ;;
- powerpc-*-freebsd*) COREFILE='' ;;
+ powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
+ COREFILE='' ;;
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
s390*-*-*) COREFILE=trad-core.lo ;;
diff --git a/bfd/cpu-frv.c b/bfd/cpu-frv.c
index e87289aec0..858914470b 100644
--- a/bfd/cpu-frv.c
+++ b/bfd/cpu-frv.c
@@ -21,13 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
-enum {
- I_frv_generic,
- I_frv_simple,
- I_frv_500,
- I_frv_300,
-};
-
#define FRV_ARCH(MACHINE, NAME, DEFAULT, NEXT) \
{ \
32, /* 32 bits in a word */ \
diff --git a/bfd/cpu-hppa.c b/bfd/cpu-hppa.c
index 5757e49fe6..250c630cd1 100644
--- a/bfd/cpu-hppa.c
+++ b/bfd/cpu-hppa.c
@@ -28,7 +28,7 @@ static const bfd_arch_info_type bfd_hppa10_arch =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_hppa,
- 10, /* By convention PA1.0 = 10 */
+ bfd_mach_hppa10, /* By convention PA1.0 = 10 */
"hppa",
"hppa1.0",
3,
@@ -45,7 +45,7 @@ static const bfd_arch_info_type bfd_hppa20_arch =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_hppa,
- 20, /* By convention PA1.0 = 10 */
+ bfd_mach_hppa20, /* By convention PA2.0 = 20 */
"hppa",
"hppa2.0",
3,
@@ -58,11 +58,11 @@ static const bfd_arch_info_type bfd_hppa20_arch =
/* PA2.0 in wide mode */
static const bfd_arch_info_type bfd_hppa20w_arch =
{
- 64, /* 32 bits in a word */
- 64, /* 32 bits in an address */
+ 64, /* 64 bits in a word */
+ 64, /* 64 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_hppa,
- 25, /* ??? How best to describe wide mode here? */
+ bfd_mach_hppa20w, /* ??? How best to describe wide mode here? */
"hppa",
"hppa2.0w",
3,
@@ -78,7 +78,7 @@ const bfd_arch_info_type bfd_hppa_arch =
32, /* 32 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_hppa,
- 11, /* By convention PA1.1 = 11 */
+ bfd_mach_hppa11, /* By convention PA1.1 = 11 */
"hppa",
"hppa1.1",
3,
diff --git a/bfd/cpu-msp430.c b/bfd/cpu-msp430.c
index c7d283b63b..54ed649a34 100644
--- a/bfd/cpu-msp430.c
+++ b/bfd/cpu-msp430.c
@@ -46,42 +46,44 @@ static const bfd_arch_info_type arch_info_struct[] =
/* msp430x11x. */
N (16, bfd_mach_msp11, "msp:11", FALSE, & arch_info_struct[1]),
+ /* msp430x11x1. */
+ N (16, bfd_mach_msp110, "msp:110", FALSE, & arch_info_struct[2]),
+
/* msp430x12x. */
- N (16, bfd_mach_msp12, "msp:12", FALSE, & arch_info_struct[2]),
+ N (16, bfd_mach_msp12, "msp:12", FALSE, & arch_info_struct[3]),
/* msp430x13x. */
- N (16, bfd_mach_msp13, "msp:13", FALSE, & arch_info_struct[3]),
+ N (16, bfd_mach_msp13, "msp:13", FALSE, & arch_info_struct[4]),
/* msp430x14x. */
- N (16, bfd_mach_msp14, "msp:14", FALSE, & arch_info_struct[4]),
+ N (16, bfd_mach_msp14, "msp:14", FALSE, & arch_info_struct[5]),
+
+ /* msp430x15x. */
+ N (16, bfd_mach_msp15, "msp:15", FALSE, & arch_info_struct[6]),
+
+ /* msp430x16x. */
+ N (16, bfd_mach_msp16, "msp:16", FALSE, & arch_info_struct[7]),
/* msp430x31x. */
- N (16, bfd_mach_msp31, "msp:31", FALSE, & arch_info_struct[5]),
+ N (16, bfd_mach_msp31, "msp:31", FALSE, & arch_info_struct[8]),
/* msp430x32x. */
- N (16, bfd_mach_msp32, "msp:32", FALSE, & arch_info_struct[6]),
+ N (16, bfd_mach_msp32, "msp:32", FALSE, & arch_info_struct[9]),
/* msp430x33x. */
- N (16, bfd_mach_msp33, "msp:33", FALSE, & arch_info_struct[7]),
+ N (16, bfd_mach_msp33, "msp:33", FALSE, & arch_info_struct[10]),
/* msp430x41x. */
- N (16, bfd_mach_msp41, "msp:41", FALSE, & arch_info_struct[8]),
+ N (16, bfd_mach_msp41, "msp:41", FALSE, & arch_info_struct[11]),
+
+ /* msp430x42x. */
+ N (16, bfd_mach_msp42, "msp:42", FALSE, & arch_info_struct[12]),
/* msp430x43x. */
- N (16, bfd_mach_msp43, "msp:43", FALSE, & arch_info_struct[9]),
+ N (16, bfd_mach_msp43, "msp:43", FALSE, & arch_info_struct[13]),
/* msp430x44x. */
- N (16, bfd_mach_msp43, "msp:44", FALSE, & arch_info_struct[10]),
-
- /* msp430x15x. */
- N (16, bfd_mach_msp15, "msp:15", FALSE, & arch_info_struct[11]),
-
- /* msp430x16x. */
- N (16, bfd_mach_msp16, "msp:16", FALSE, & arch_info_struct[12]),
-
- /* msp430x11x1. */
- N (16, bfd_mach_msp110, "msp:110", FALSE, NULL)
-
+ N (16, bfd_mach_msp43, "msp:44", FALSE, NULL)
};
const bfd_arch_info_type bfd_msp430_arch =
diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c
index fe96656765..1ff1cb3af5 100644
--- a/bfd/cpu-v850.c
+++ b/bfd/cpu-v850.c
@@ -1,5 +1,6 @@
/* BFD support for the NEC V850 processor
- Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -30,6 +31,7 @@
static const bfd_arch_info_type arch_info_struct[] =
{
+ N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[1]),
N (bfd_mach_v850e, "v850e", FALSE, NULL)
};
diff --git a/bfd/dep-in.sed b/bfd/dep-in.sed
index ce8b79b054..90a2e6a7f0 100644
--- a/bfd/dep-in.sed
+++ b/bfd/dep-in.sed
@@ -18,6 +18,7 @@ s! config.h!!g
s! \$(INCDIR)/fopen-[^ ]*\.h!!g
s! \$(INCDIR)/ansidecl\.h!!g
s! \$(INCDIR)/symcat\.h!!g
+s! \.\./intl/libintl\.h!!g
s/\\\n */ /g
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 667d6589db..81db77e9b3 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -68,6 +68,7 @@ AS = @AS@
BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@
BFD_HOST_64_BIT = @BFD_HOST_64_BIT@
BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@
+BFD_HOST_LONG_LONG = @BFD_HOST_LONG_LONG@
BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index d297a77318..abbe377e49 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -33,20 +33,17 @@
#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize)
/* If size isn't specified as 64 or 32, NAME macro should fail. */
-/* Do not "beautify" the CONCAT* macro args. Traditional C will not
- remove whitespace added here, and thus will fail to concatenate
- the tokens. */
#ifndef NAME
-#if ARCH_SIZE==64
-#define NAME(x,y) CONCAT4 (x,64,_,y)
+#if ARCH_SIZE == 64
+#define NAME(x, y) x ## 64 ## _ ## y
#endif
-#if ARCH_SIZE==32
-#define NAME(x,y) CONCAT4 (x,32,_,y)
+#if ARCH_SIZE == 32
+#define NAME(x, y) x ## 32 ## _ ## y
#endif
#endif
#ifndef NAME
-#define NAME(x,y) CONCAT4 (x,NOSIZE,_,y)
+#define NAME(x, y) x ## NOSIZE ## _ ## y
#endif
#define ElfNAME(X) NAME(Elf,X)
@@ -67,8 +64,8 @@ typedef struct
union
{
unsigned int hppa_arg_reloc;
- PTR mips_extr;
- PTR any;
+ void *mips_extr;
+ void *any;
}
tc_data;
@@ -365,10 +362,10 @@ struct elf_link_hash_table
struct elf_link_hash_entry *hgot;
/* A pointer to information used to link stabs in sections. */
- PTR stab_info;
+ void *stab_info;
/* A pointer to information used to merge SEC_MERGE sections. */
- PTR merge_info;
+ void *merge_info;
/* Used by eh_frame code when editing .eh_frame. */
struct eh_frame_hdr_info eh_info;
@@ -399,7 +396,7 @@ struct elf_link_hash_table
#define elf_link_hash_traverse(table, func, info) \
(bfd_link_hash_traverse \
(&(table)->root, \
- (bfd_boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \
(info)))
/* Get the ELF linker hash table from a link_info structure. */
@@ -439,43 +436,43 @@ struct elf_size_info {
unsigned char arch_size, log_file_align;
unsigned char elfclass, ev_current;
int (*write_out_phdrs)
- PARAMS ((bfd *, const Elf_Internal_Phdr *, unsigned int));
- bfd_boolean (*write_shdrs_and_ehdr)
- PARAMS ((bfd *));
+ (bfd *, const Elf_Internal_Phdr *, unsigned int);
+ bfd_boolean
+ (*write_shdrs_and_ehdr) (bfd *);
void (*write_relocs)
- PARAMS ((bfd *, asection *, PTR));
+ (bfd *, asection *, void *);
void (*swap_symbol_in)
- PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
+ (bfd *, const void *, const void *, Elf_Internal_Sym *);
void (*swap_symbol_out)
- PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
+ (bfd *, const Elf_Internal_Sym *, void *, void *);
bfd_boolean (*slurp_reloc_table)
- PARAMS ((bfd *, asection *, asymbol **, bfd_boolean));
+ (bfd *, asection *, asymbol **, bfd_boolean);
long (*slurp_symbol_table)
- PARAMS ((bfd *, asymbol **, bfd_boolean));
+ (bfd *, asymbol **, bfd_boolean);
void (*swap_dyn_in)
- PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
+ (bfd *, const void *, Elf_Internal_Dyn *);
void (*swap_dyn_out)
- PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR));
+ (bfd *, const Elf_Internal_Dyn *, void *);
/* This function is called to swap in a REL relocation. If an
external relocation corresponds to more than one internal
relocation, then all relocations are swapped in at once. */
void (*swap_reloc_in)
- PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+ (bfd *, const bfd_byte *, Elf_Internal_Rela *);
/* This function is called to swap out a REL relocation. */
void (*swap_reloc_out)
- PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+ (bfd *, const Elf_Internal_Rela *, bfd_byte *);
/* This function is called to swap in a RELA relocation. If an
external relocation corresponds to more than one internal
relocation, then all relocations are swapped in at once. */
void (*swap_reloca_in)
- PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+ (bfd *, const bfd_byte *, Elf_Internal_Rela *);
/* This function is called to swap out a RELA relocation. */
void (*swap_reloca_out)
- PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+ (bfd *, const Elf_Internal_Rela *, bfd_byte *);
};
#define elf_symbol_from(ABFD,S) \
@@ -535,12 +532,12 @@ struct elf_backend_data
/* A function to translate an ELF RELA relocation to a BFD arelent
structure. */
void (*elf_info_to_howto)
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
/* A function to translate an ELF REL relocation to a BFD arelent
structure. */
void (*elf_info_to_howto_rel)
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
/* A function to determine whether a symbol is global when
partitioning the symbol table into local and global symbols.
@@ -548,7 +545,7 @@ struct elf_backend_data
thing will be done. MIPS ELF, at least on the Irix 5, has
special requirements. */
bfd_boolean (*elf_backend_sym_is_global)
- PARAMS ((bfd *, asymbol *));
+ (bfd *, asymbol *);
/* The remaining functions are hooks which are called only if they
are not NULL. */
@@ -560,58 +557,58 @@ struct elf_backend_data
used with caution. If this returns FALSE, the check_format
routine will return a bfd_error_wrong_format error. */
bfd_boolean (*elf_backend_object_p)
- PARAMS ((bfd *));
+ (bfd *);
/* A function to do additional symbol processing when reading the
ELF symbol table. This is where any processor-specific special
section indices are handled. */
void (*elf_backend_symbol_processing)
- PARAMS ((bfd *, asymbol *));
+ (bfd *, asymbol *);
/* A function to do additional symbol processing after reading the
entire ELF symbol table. */
bfd_boolean (*elf_backend_symbol_table_processing)
- PARAMS ((bfd *, elf_symbol_type *, unsigned int));
+ (bfd *, elf_symbol_type *, unsigned int);
/* A function to set the type of the info field. Processor-specific
types should be handled here. */
int (*elf_backend_get_symbol_type)
- PARAMS (( Elf_Internal_Sym *, int));
+ (Elf_Internal_Sym *, int);
/* A function to do additional processing on the ELF section header
just before writing it out. This is used to set the flags and
type fields for some sections, or to actually write out data for
unusual sections. */
bfd_boolean (*elf_backend_section_processing)
- PARAMS ((bfd *, Elf_Internal_Shdr *));
+ (bfd *, Elf_Internal_Shdr *);
/* A function to handle unusual section types when creating BFD
sections from ELF sections. */
bfd_boolean (*elf_backend_section_from_shdr)
- PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
+ (bfd *, Elf_Internal_Shdr *, const char *);
/* A function to convert machine dependent section header flags to
BFD internal section header flags. */
bfd_boolean (*elf_backend_section_flags)
- PARAMS ((flagword *, Elf_Internal_Shdr *));
+ (flagword *, Elf_Internal_Shdr *);
/* A function to handle unusual program segment types when creating BFD
sections from ELF program segments. */
bfd_boolean (*elf_backend_section_from_phdr)
- PARAMS ((bfd *, Elf_Internal_Phdr *, int));
+ (bfd *, Elf_Internal_Phdr *, int);
/* A function to set up the ELF section header for a BFD section in
preparation for writing it out. This is where the flags and type
fields are set for unusual sections. */
bfd_boolean (*elf_backend_fake_sections)
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
+ (bfd *, Elf_Internal_Shdr *, asection *);
/* A function to get the ELF section index for a BFD section. If
this returns TRUE, the section was found. If it is a normal ELF
section, *RETVAL should be left unchanged. If it is not a normal
ELF section *RETVAL should be set to the SHN_xxxx index. */
bfd_boolean (*elf_backend_section_from_bfd_section)
- PARAMS ((bfd *, asection *, int *retval));
+ (bfd *, asection *, int *retval);
/* If this field is not NULL, it is called by the add_symbols phase
of a link just before adding a symbol to the global linker hash
@@ -622,15 +619,14 @@ struct elf_backend_data
indices, and must set at least *FLAGS and *SEC for each processor
dependent case; failure to do so will cause a link error. */
bfd_boolean (*elf_add_symbol_hook)
- PARAMS ((bfd *abfd, struct bfd_link_info *info,
- const Elf_Internal_Sym *, const char **name,
- flagword *flags, asection **sec, bfd_vma *value));
+ (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Sym *,
+ const char **name, flagword *flags, asection **sec, bfd_vma *value);
/* If this field is not NULL, it is called by the elf_link_output_sym
phase of a link for each symbol which will appear in the object file. */
bfd_boolean (*elf_backend_link_output_symbol_hook)
- PARAMS ((bfd *, struct bfd_link_info *info, const char *,
- Elf_Internal_Sym *, asection *));
+ (bfd *, struct bfd_link_info *info, const char *, Elf_Internal_Sym *,
+ asection *);
/* The CREATE_DYNAMIC_SECTIONS function is called by the ELF backend
linker the first time it encounters a dynamic object in the link.
@@ -641,7 +637,7 @@ struct elf_backend_data
desired. This function will normally create the .got and .plt
sections, but different backends have different requirements. */
bfd_boolean (*elf_backend_create_dynamic_sections)
- PARAMS ((bfd *abfd, struct bfd_link_info *info));
+ (bfd *abfd, struct bfd_link_info *info);
/* The CHECK_RELOCS function is called by the add_symbols phase of
the ELF backend linker. It is called once for each section with
@@ -654,8 +650,8 @@ struct elf_backend_data
actually uses Rel structures, the r_addend field will always be
zero. */
bfd_boolean (*check_relocs)
- PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o,
- const Elf_Internal_Rela *relocs));
+ (bfd *abfd, struct bfd_link_info *info, asection *o,
+ const Elf_Internal_Rela *relocs);
/* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend
linker for every symbol which is defined by a dynamic object and
@@ -670,14 +666,14 @@ struct elf_backend_data
entry to the .plt or .got or some such section, and setting the
symbol to point to that. */
bfd_boolean (*elf_backend_adjust_dynamic_symbol)
- PARAMS ((struct bfd_link_info *info, struct elf_link_hash_entry *h));
+ (struct bfd_link_info *info, struct elf_link_hash_entry *h);
/* The ALWAYS_SIZE_SECTIONS function is called by the backend linker
after all the linker input files have been seen but before the
section sizes have been set. This is called after
ADJUST_DYNAMIC_SYMBOL, but before SIZE_DYNAMIC_SECTIONS. */
bfd_boolean (*elf_backend_always_size_sections)
- PARAMS ((bfd *output_bfd, struct bfd_link_info *info));
+ (bfd *output_bfd, struct bfd_link_info *info);
/* The SIZE_DYNAMIC_SECTIONS function is called by the ELF backend
linker after all the linker input files have been seen but before
@@ -690,7 +686,7 @@ struct elf_backend_data
.interp section and any sections created by the
CREATE_DYNAMIC_SECTIONS entry point. */
bfd_boolean (*elf_backend_size_dynamic_sections)
- PARAMS ((bfd *output_bfd, struct bfd_link_info *info));
+ (bfd *output_bfd, struct bfd_link_info *info);
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
@@ -721,10 +717,9 @@ struct elf_backend_data
section, which means that the addend must be adjusted
accordingly. */
bfd_boolean (*elf_backend_relocate_section)
- PARAMS ((bfd *output_bfd, struct bfd_link_info *info,
- bfd *input_bfd, asection *input_section, bfd_byte *contents,
- Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms,
- asection **local_sections));
+ (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd,
+ asection *input_section, bfd_byte *contents, Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms, asection **local_sections);
/* The FINISH_DYNAMIC_SYMBOL function is called by the ELF backend
linker just before it writes a symbol out to the .dynsym section.
@@ -734,70 +729,70 @@ struct elf_backend_data
all .dynsym symbols, while ADJUST_DYNAMIC_SYMBOL is only called
on those symbols which are defined by a dynamic object. */
bfd_boolean (*elf_backend_finish_dynamic_symbol)
- PARAMS ((bfd *output_bfd, struct bfd_link_info *info,
- struct elf_link_hash_entry *h, Elf_Internal_Sym *sym));
+ (bfd *output_bfd, struct bfd_link_info *info,
+ struct elf_link_hash_entry *h, Elf_Internal_Sym *sym);
/* The FINISH_DYNAMIC_SECTIONS function is called by the ELF backend
linker just before it writes all the dynamic sections out to the
output file. The FINISH_DYNAMIC_SYMBOL will have been called on
all dynamic symbols. */
bfd_boolean (*elf_backend_finish_dynamic_sections)
- PARAMS ((bfd *output_bfd, struct bfd_link_info *info));
+ (bfd *output_bfd, struct bfd_link_info *info);
/* A function to do any beginning processing needed for the ELF file
before building the ELF headers and computing file positions. */
void (*elf_backend_begin_write_processing)
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
/* A function to do any final processing needed for the ELF file
before writing it out. The LINKER argument is TRUE if this BFD
was created by the ELF backend linker. */
void (*elf_backend_final_write_processing)
- PARAMS ((bfd *, bfd_boolean linker));
+ (bfd *, bfd_boolean linker);
/* This function is called by get_program_header_size. It should
return the number of additional program segments which this BFD
will need. It should return -1 on error. */
int (*elf_backend_additional_program_headers)
- PARAMS ((bfd *));
+ (bfd *);
/* This function is called to modify an existing segment map in a
backend specific fashion. */
bfd_boolean (*elf_backend_modify_segment_map)
- PARAMS ((bfd *));
+ (bfd *);
/* This function is called during section gc to discover the section a
particular relocation refers to. */
asection * (*gc_mark_hook)
- PARAMS ((asection *sec, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *h, Elf_Internal_Sym *));
+ (asection *sec, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *h, Elf_Internal_Sym *);
/* This function, if defined, is called during the sweep phase of gc
in order that a backend might update any data structures it might
be maintaining. */
bfd_boolean (*gc_sweep_hook)
- PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *o,
- const Elf_Internal_Rela *relocs));
+ (bfd *abfd, struct bfd_link_info *info, asection *o,
+ const Elf_Internal_Rela *relocs);
/* This function, if defined, is called after the ELF headers have
been created. This allows for things like the OS and ABI versions
to be changed. */
void (*elf_backend_post_process_headers)
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
/* This function, if defined, prints a symbol to file and returns the
name of the symbol to be printed. It should return NULL to fall
back to default symbol printing. */
const char *(*elf_backend_print_symbol_all)
- PARAMS ((bfd *, PTR, asymbol *));
+ (bfd *, void *, asymbol *);
/* This function, if defined, is called after all local symbols and
global symbols converted to locals are emited into the symtab
section. It allows the backend to emit special global symbols
not handled in the hash table. */
bfd_boolean (*elf_backend_output_arch_syms)
- PARAMS ((bfd *, struct bfd_link_info *, PTR,
- bfd_boolean (*) (PTR, const char *, Elf_Internal_Sym *, asection *)));
+ (bfd *, struct bfd_link_info *, void *,
+ bfd_boolean (*) (void *, const char *, Elf_Internal_Sym *, asection *));
/* Copy any information related to dynamic linking from a pre-existing
symbol to a newly created symbol. Also called to copy flags and
@@ -805,66 +800,66 @@ struct elf_backend_data
newly created and plt/got refcounts and dynamic indices should not
be copied. */
void (*elf_backend_copy_indirect_symbol)
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
- struct elf_link_hash_entry *));
+ (const struct elf_backend_data *, struct elf_link_hash_entry *,
+ struct elf_link_hash_entry *);
/* Modify any information related to dynamic linking such that the
symbol is not exported. */
void (*elf_backend_hide_symbol)
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
+ (struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
/* Emit relocations. Overrides default routine for emitting relocs,
except during a relocatable link, or if all relocs are being emitted. */
bfd_boolean (*elf_backend_emit_relocs)
- PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *));
+ (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *);
/* Count relocations. Not called for relocatable links
or if all relocs are being preserved in the output. */
unsigned int (*elf_backend_count_relocs)
- PARAMS ((asection *, Elf_Internal_Rela *));
+ (asection *, Elf_Internal_Rela *);
/* This function, if defined, is called when an NT_PRSTATUS note is found
in a core file. */
bfd_boolean (*elf_backend_grok_prstatus)
- PARAMS ((bfd *, Elf_Internal_Note *));
+ (bfd *, Elf_Internal_Note *);
/* This function, if defined, is called when an NT_PSINFO or NT_PRPSINFO
note is found in a core file. */
bfd_boolean (*elf_backend_grok_psinfo)
- PARAMS ((bfd *, Elf_Internal_Note *));
+ (bfd *, Elf_Internal_Note *);
/* Functions to print VMAs. Special code to handle 64 bit ELF files. */
void (* elf_backend_sprintf_vma)
- PARAMS ((bfd *, char *, bfd_vma));
+ (bfd *, char *, bfd_vma);
void (* elf_backend_fprintf_vma)
- PARAMS ((bfd *, PTR, bfd_vma));
+ (bfd *, void *, bfd_vma);
/* This function returns class of a reloc type. */
enum elf_reloc_type_class (*elf_backend_reloc_type_class)
- PARAMS ((const Elf_Internal_Rela *));
+ (const Elf_Internal_Rela *);
/* This function, if defined, removes information about discarded functions
from other sections which mention them. */
bfd_boolean (*elf_backend_discard_info)
- PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *));
+ (bfd *, struct elf_reloc_cookie *, struct bfd_link_info *);
/* This function, if defined, signals that the function above has removed
the discarded relocations for this section. */
bfd_boolean (*elf_backend_ignore_discarded_relocs)
- PARAMS ((asection *));
+ (asection *);
/* This function, if defined, may write out the given section.
Returns TRUE if it did so and FALSE if the caller should. */
bfd_boolean (*elf_backend_write_section)
- PARAMS ((bfd *, asection *, bfd_byte *));
+ (bfd *, asection *, bfd_byte *);
/* The level of IRIX compatibility we're striving for.
MIPS ELF specific function. */
irix_compat_t (*elf_backend_mips_irix_compat)
- PARAMS ((bfd *));
+ (bfd *);
reloc_howto_type *(*elf_backend_mips_rtype_to_howto)
- PARAMS ((unsigned int, bfd_boolean));
+ (unsigned int, bfd_boolean);
/* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */
@@ -873,8 +868,8 @@ struct elf_backend_data
/* This function implements `bfd_elf_bfd_from_remote_memory';
see elf.c, elfcode.h. */
bfd *(*elf_backend_bfd_from_remote_memory)
- PARAMS ((bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma vma, char *myaddr, int len)));
+ (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
+ int (*target_read_memory) (bfd_vma vma, char *myaddr, int len));
/* Alternate EM_xxxx machine codes for this backend. */
int elf_machine_alt1;
@@ -998,7 +993,7 @@ struct bfd_elf_section_data
/* A pointer to a linked list tracking dynamic relocs copied for
local symbols. */
- PTR local_dynrel;
+ void *local_dynrel;
/* A pointer to the bfd section used for dynamic relocs. */
asection *sreloc;
@@ -1016,7 +1011,7 @@ struct bfd_elf_section_data
asection *next_in_group;
/* A pointer used for various section optimizations. */
- PTR sec_info;
+ void *sec_info;
};
#define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd)
@@ -1034,7 +1029,7 @@ struct bfd_elf_section_data
&& sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
#define get_elf_backend_data(abfd) \
- ((struct elf_backend_data *) (abfd)->xvec->backend_data)
+ ((const struct elf_backend_data *) (abfd)->xvec->backend_data)
/* This struct is used to pass information to routines called via
elf_link_hash_traverse which must return failure. */
@@ -1166,7 +1161,7 @@ struct elf_obj_tdata
bfd_size_type program_header_size;
/* Used by find_nearest_line entry point. */
- PTR line_info;
+ void *line_info;
/* Used by MIPS ELF find_nearest_line entry point. The structure
could be included directly in this one, but there's no point to
@@ -1178,7 +1173,7 @@ struct elf_obj_tdata
struct dwarf1_debug *dwarf1_find_line_info;
/* A place to stash dwarf2 info for this bfd. */
- PTR dwarf2_find_line_info;
+ void *dwarf2_find_line_info;
/* An array of stub sections indexed by symbol number, used by the
MIPS ELF linker. FIXME: We should figure out some way to only
@@ -1244,377 +1239,375 @@ struct elf_obj_tdata
#define elf_flags_init(bfd) (elf_tdata(bfd) -> flags_init)
extern void _bfd_elf_swap_verdef_in
- PARAMS ((bfd *, const Elf_External_Verdef *, Elf_Internal_Verdef *));
+ (bfd *, const Elf_External_Verdef *, Elf_Internal_Verdef *);
extern void _bfd_elf_swap_verdef_out
- PARAMS ((bfd *, const Elf_Internal_Verdef *, Elf_External_Verdef *));
+ (bfd *, const Elf_Internal_Verdef *, Elf_External_Verdef *);
extern void _bfd_elf_swap_verdaux_in
- PARAMS ((bfd *, const Elf_External_Verdaux *, Elf_Internal_Verdaux *));
+ (bfd *, const Elf_External_Verdaux *, Elf_Internal_Verdaux *);
extern void _bfd_elf_swap_verdaux_out
- PARAMS ((bfd *, const Elf_Internal_Verdaux *, Elf_External_Verdaux *));
+ (bfd *, const Elf_Internal_Verdaux *, Elf_External_Verdaux *);
extern void _bfd_elf_swap_verneed_in
- PARAMS ((bfd *, const Elf_External_Verneed *, Elf_Internal_Verneed *));
+ (bfd *, const Elf_External_Verneed *, Elf_Internal_Verneed *);
extern void _bfd_elf_swap_verneed_out
- PARAMS ((bfd *, const Elf_Internal_Verneed *, Elf_External_Verneed *));
+ (bfd *, const Elf_Internal_Verneed *, Elf_External_Verneed *);
extern void _bfd_elf_swap_vernaux_in
- PARAMS ((bfd *, const Elf_External_Vernaux *, Elf_Internal_Vernaux *));
+ (bfd *, const Elf_External_Vernaux *, Elf_Internal_Vernaux *);
extern void _bfd_elf_swap_vernaux_out
- PARAMS ((bfd *, const Elf_Internal_Vernaux *, Elf_External_Vernaux *));
+ (bfd *, const Elf_Internal_Vernaux *, Elf_External_Vernaux *);
extern void _bfd_elf_swap_versym_in
- PARAMS ((bfd *, const Elf_External_Versym *, Elf_Internal_Versym *));
+ (bfd *, const Elf_External_Versym *, Elf_Internal_Versym *);
extern void _bfd_elf_swap_versym_out
- PARAMS ((bfd *, const Elf_Internal_Versym *, Elf_External_Versym *));
+ (bfd *, const Elf_Internal_Versym *, Elf_External_Versym *);
extern int _bfd_elf_section_from_bfd_section
- PARAMS ((bfd *, asection *));
+ (bfd *, asection *);
extern char *bfd_elf_string_from_elf_section
- PARAMS ((bfd *, unsigned, unsigned));
+ (bfd *, unsigned, unsigned);
extern char *bfd_elf_get_str_section
- PARAMS ((bfd *, unsigned));
+ (bfd *, unsigned);
extern Elf_Internal_Sym *bfd_elf_get_elf_syms
- PARAMS ((bfd *, Elf_Internal_Shdr *, size_t, size_t,
- Elf_Internal_Sym *, PTR, Elf_External_Sym_Shndx *));
+ (bfd *, Elf_Internal_Shdr *, size_t, size_t, Elf_Internal_Sym *, void *,
+ Elf_External_Sym_Shndx *);
extern const char *bfd_elf_local_sym_name
- PARAMS ((bfd *, Elf_Internal_Sym *));
+ (bfd *, Elf_Internal_Sym *);
extern bfd_boolean _bfd_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
extern bfd_boolean _bfd_elf_print_private_bfd_data
- PARAMS ((bfd *, PTR));
+ (bfd *, void *);
extern void bfd_elf_print_symbol
- PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
+ (bfd *, void *, asymbol *, bfd_print_symbol_type);
#define elf_string_from_elf_strtab(abfd, strindex) \
- bfd_elf_string_from_elf_section(abfd, elf_elfheader(abfd)->e_shstrndx, \
- strindex)
+ bfd_elf_string_from_elf_section (abfd, elf_elfheader(abfd)->e_shstrndx, \
+ strindex)
#define bfd_elf32_print_symbol bfd_elf_print_symbol
#define bfd_elf64_print_symbol bfd_elf_print_symbol
extern void _bfd_elf_sprintf_vma
- PARAMS ((bfd *, char *, bfd_vma));
+ (bfd *, char *, bfd_vma);
extern void _bfd_elf_fprintf_vma
- PARAMS ((bfd *, PTR, bfd_vma));
+ (bfd *, void *, bfd_vma);
extern enum elf_reloc_type_class _bfd_elf_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
+ (const Elf_Internal_Rela *);
extern bfd_vma _bfd_elf_rela_local_sym
- PARAMS ((bfd *, Elf_Internal_Sym *, asection *, Elf_Internal_Rela *));
+ (bfd *, Elf_Internal_Sym *, asection *, Elf_Internal_Rela *);
extern bfd_vma _bfd_elf_rel_local_sym
- PARAMS ((bfd *, Elf_Internal_Sym *, asection **, bfd_vma));
+ (bfd *, Elf_Internal_Sym *, asection **, bfd_vma);
extern bfd_vma _bfd_elf_section_offset
- PARAMS ((bfd *, struct bfd_link_info *, asection *, bfd_vma));
+ (bfd *, struct bfd_link_info *, asection *, bfd_vma);
extern unsigned long bfd_elf_hash
- PARAMS ((const char *));
+ (const char *);
extern bfd_reloc_status_type bfd_elf_generic_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
extern bfd_boolean bfd_elf_mkobject
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean bfd_elf_mkcorefile
- PARAMS ((bfd *));
+ (bfd *);
extern Elf_Internal_Shdr *bfd_elf_find_section
- PARAMS ((bfd *, char *));
+ (bfd *, char *);
extern bfd_boolean _bfd_elf_make_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
+ (bfd *, Elf_Internal_Shdr *, const char *);
extern bfd_boolean _bfd_elf_make_section_from_phdr
- PARAMS ((bfd *, Elf_Internal_Phdr *, int, const char *));
+ (bfd *, Elf_Internal_Phdr *, int, const char *);
extern struct bfd_hash_entry *_bfd_elf_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create
- PARAMS ((bfd *));
+ (bfd *);
extern void _bfd_elf_link_hash_copy_indirect
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
- struct elf_link_hash_entry *));
+ (const struct elf_backend_data *, struct elf_link_hash_entry *,
+ struct elf_link_hash_entry *);
extern void _bfd_elf_link_hash_hide_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
+ (struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
extern bfd_boolean _bfd_elf_link_hash_table_init
- PARAMS ((struct elf_link_hash_table *, bfd *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *)));
+ (struct elf_link_hash_table *, bfd *,
+ struct bfd_hash_entry *(*)
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
extern bfd_boolean _bfd_elf_slurp_version_tables
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean _bfd_elf_merge_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_discard_group
- PARAMS ((bfd *, struct sec *));
+ (bfd *, struct sec *);
extern void bfd_elf_set_group_contents
- PARAMS ((bfd *, asection *, PTR));
+ (bfd *, asection *, void *);
extern void _bfd_elf_link_just_syms
- PARAMS ((asection *, struct bfd_link_info *));
+ (asection *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_copy_private_symbol_data
- PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
+ (bfd *, asymbol *, bfd *, asymbol *);
extern bfd_boolean _bfd_elf_copy_private_section_data
- PARAMS ((bfd *, asection *, bfd *, asection *));
+ (bfd *, asection *, bfd *, asection *);
extern bfd_boolean _bfd_elf_write_object_contents
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean _bfd_elf_write_corefile_contents
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean _bfd_elf_set_section_contents
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
extern long _bfd_elf_get_symtab_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long _bfd_elf_get_symtab
- PARAMS ((bfd *, asymbol **));
+ (bfd *, asymbol **);
extern long _bfd_elf_get_dynamic_symtab_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long _bfd_elf_canonicalize_dynamic_symtab
- PARAMS ((bfd *, asymbol **));
+ (bfd *, asymbol **);
extern long _bfd_elf_get_reloc_upper_bound
- PARAMS ((bfd *, sec_ptr));
+ (bfd *, sec_ptr);
extern long _bfd_elf_canonicalize_reloc
- PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
+ (bfd *, sec_ptr, arelent **, asymbol **);
extern long _bfd_elf_get_dynamic_reloc_upper_bound
- PARAMS ((bfd *));
+ (bfd *);
extern long _bfd_elf_canonicalize_dynamic_reloc
- PARAMS ((bfd *, arelent **, asymbol **));
+ (bfd *, arelent **, asymbol **);
extern asymbol *_bfd_elf_make_empty_symbol
- PARAMS ((bfd *));
+ (bfd *);
extern void _bfd_elf_get_symbol_info
- PARAMS ((bfd *, asymbol *, symbol_info *));
+ (bfd *, asymbol *, symbol_info *);
extern bfd_boolean _bfd_elf_is_local_label_name
- PARAMS ((bfd *, const char *));
+ (bfd *, const char *);
extern alent *_bfd_elf_get_lineno
- PARAMS ((bfd *, asymbol *));
+ (bfd *, asymbol *);
extern bfd_boolean _bfd_elf_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
+ (bfd *, enum bfd_architecture, unsigned long);
extern bfd_boolean _bfd_elf_find_nearest_line
- PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
- const char **, unsigned int *));
+ (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **,
+ unsigned int *);
#define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
extern int _bfd_elf_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ (bfd *, bfd_boolean);
extern bfd_boolean _bfd_elf_new_section_hook
- PARAMS ((bfd *, asection *));
+ (bfd *, asection *);
extern bfd_boolean _bfd_elf_init_reloc_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *, bfd_boolean));
-extern bfd_boolean _bfd_elf_get_sec_type_attr (bfd *, const char *,
- int *, int *);
+ (bfd *, Elf_Internal_Shdr *, asection *, bfd_boolean);
+extern bfd_boolean _bfd_elf_get_sec_type_attr
+ (bfd *, const char *, int *, int *);
/* If the target doesn't have reloc handling written yet: */
extern void _bfd_elf_no_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
extern bfd_boolean bfd_section_from_shdr
- PARAMS ((bfd *, unsigned int shindex));
+ (bfd *, unsigned int shindex);
extern bfd_boolean bfd_section_from_phdr
- PARAMS ((bfd *, Elf_Internal_Phdr *, int));
+ (bfd *, Elf_Internal_Phdr *, int);
extern int _bfd_elf_symbol_from_bfd_symbol
- PARAMS ((bfd *, asymbol **));
+ (bfd *, asymbol **);
extern asection *bfd_section_from_r_symndx
- PARAMS ((bfd *, struct sym_sec_cache *, asection *, unsigned long));
+ (bfd *, struct sym_sec_cache *, asection *, unsigned long);
extern asection *bfd_section_from_elf_index
- PARAMS ((bfd *, unsigned int));
+ (bfd *, unsigned int);
extern struct bfd_strtab_hash *_bfd_elf_stringtab_init
- PARAMS ((void));
+ (void);
extern struct elf_strtab_hash * _bfd_elf_strtab_init
- PARAMS ((void));
+ (void);
extern void _bfd_elf_strtab_free
- PARAMS ((struct elf_strtab_hash *));
+ (struct elf_strtab_hash *);
extern bfd_size_type _bfd_elf_strtab_add
- PARAMS ((struct elf_strtab_hash *, const char *, bfd_boolean));
+ (struct elf_strtab_hash *, const char *, bfd_boolean);
extern void _bfd_elf_strtab_addref
- PARAMS ((struct elf_strtab_hash *, bfd_size_type));
+ (struct elf_strtab_hash *, bfd_size_type);
extern void _bfd_elf_strtab_delref
- PARAMS ((struct elf_strtab_hash *, bfd_size_type));
+ (struct elf_strtab_hash *, bfd_size_type);
extern void _bfd_elf_strtab_clear_all_refs
- PARAMS ((struct elf_strtab_hash *));
+ (struct elf_strtab_hash *);
extern bfd_size_type _bfd_elf_strtab_size
- PARAMS ((struct elf_strtab_hash *));
+ (struct elf_strtab_hash *);
extern bfd_size_type _bfd_elf_strtab_offset
- PARAMS ((struct elf_strtab_hash *, bfd_size_type));
+ (struct elf_strtab_hash *, bfd_size_type);
extern bfd_boolean _bfd_elf_strtab_emit
- PARAMS ((bfd *, struct elf_strtab_hash *));
+ (bfd *, struct elf_strtab_hash *);
extern void _bfd_elf_strtab_finalize
- PARAMS ((struct elf_strtab_hash *));
+ (struct elf_strtab_hash *);
extern bfd_boolean _bfd_elf_discard_section_eh_frame
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- bfd_boolean (*) (bfd_vma, PTR), struct elf_reloc_cookie *));
+ (bfd *, struct bfd_link_info *, asection *,
+ bfd_boolean (*) (bfd_vma, void *), struct elf_reloc_cookie *);
extern bfd_boolean _bfd_elf_discard_section_eh_frame_hdr
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_vma _bfd_elf_eh_frame_section_offset
- PARAMS ((bfd *, asection *, bfd_vma));
+ (bfd *, asection *, bfd_vma);
extern bfd_boolean _bfd_elf_write_section_eh_frame
- PARAMS ((bfd *, struct bfd_link_info *, asection *, bfd_byte *));
+ (bfd *, struct bfd_link_info *, asection *, bfd_byte *);
extern bfd_boolean _bfd_elf_write_section_eh_frame_hdr
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_maybe_strip_eh_frame_hdr
- PARAMS ((struct bfd_link_info *));
+ (struct bfd_link_info *);
extern bfd_boolean _bfd_elf_merge_symbol
- PARAMS ((bfd *, struct bfd_link_info *, const char *,
- Elf_Internal_Sym *, asection **, bfd_vma *,
- struct elf_link_hash_entry **, bfd_boolean *, bfd_boolean *,
- bfd_boolean *, bfd_boolean *, bfd_boolean));
+ (bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *,
+ asection **, bfd_vma *, struct elf_link_hash_entry **, bfd_boolean *,
+ bfd_boolean *, bfd_boolean *, bfd_boolean *, bfd_boolean);
extern bfd_boolean _bfd_elf_add_default_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- const char *, Elf_Internal_Sym *, asection **, bfd_vma *,
- bfd_boolean *, bfd_boolean, bfd_boolean));
+ (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ const char *, Elf_Internal_Sym *, asection **, bfd_vma *,
+ bfd_boolean *, bfd_boolean, bfd_boolean);
extern bfd_boolean _bfd_elf_export_symbol
- PARAMS ((struct elf_link_hash_entry *, PTR));
+ (struct elf_link_hash_entry *, void *);
extern bfd_boolean _bfd_elf_link_find_version_dependencies
- PARAMS ((struct elf_link_hash_entry *, PTR));
+ (struct elf_link_hash_entry *, void *);
extern bfd_boolean _bfd_elf_link_assign_sym_version
- PARAMS ((struct elf_link_hash_entry *, PTR));
+ (struct elf_link_hash_entry *, void *);
extern bfd_boolean _bfd_elf_link_record_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+ (struct bfd_link_info *, struct elf_link_hash_entry *);
extern long _bfd_elf_link_lookup_local_dynindx
- PARAMS ((struct bfd_link_info *, bfd *, long));
+ (struct bfd_link_info *, bfd *, long);
extern bfd_boolean _bfd_elf_compute_section_file_positions
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern void _bfd_elf_assign_file_positions_for_relocs
- PARAMS ((bfd *));
+ (bfd *);
extern file_ptr _bfd_elf_assign_file_position_for_section
- PARAMS ((Elf_Internal_Shdr *, file_ptr, bfd_boolean));
+ (Elf_Internal_Shdr *, file_ptr, bfd_boolean);
extern bfd_boolean _bfd_elf_validate_reloc
- PARAMS ((bfd *, arelent *));
+ (bfd *, arelent *);
extern bfd_boolean _bfd_elf_link_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_create_got_section
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern unsigned long _bfd_elf_link_renumber_dynsyms
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elfcore_make_pseudosection
- PARAMS ((bfd *, char *, size_t, ufile_ptr));
+ (bfd *, char *, size_t, ufile_ptr);
extern char *_bfd_elfcore_strndup
- PARAMS ((bfd *, char *, size_t));
+ (bfd *, char *, size_t);
extern Elf_Internal_Rela *_bfd_elf_link_read_relocs
- PARAMS ((bfd *, asection *, PTR, Elf_Internal_Rela *, bfd_boolean));
+ (bfd *, asection *, void *, Elf_Internal_Rela *, bfd_boolean);
extern bfd_boolean _bfd_elf_link_size_reloc_section
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
+ (bfd *, Elf_Internal_Shdr *, asection *);
extern bfd_boolean _bfd_elf_link_output_relocs
- PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *));
+ (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *);
extern bfd_boolean _bfd_elf_fix_symbol_flags
- PARAMS ((struct elf_link_hash_entry *, struct elf_info_failed *));
+ (struct elf_link_hash_entry *, struct elf_info_failed *);
extern bfd_boolean _bfd_elf_adjust_dynamic_symbol
- PARAMS ((struct elf_link_hash_entry *, PTR));
+ (struct elf_link_hash_entry *, void *);
extern bfd_boolean _bfd_elf_link_sec_merge_syms
- PARAMS ((struct elf_link_hash_entry *, PTR));
+ (struct elf_link_hash_entry *, void *);
extern bfd_boolean _bfd_elf_dynamic_symbol_p
- PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean));
+ (struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean);
extern bfd_boolean _bfd_elf_symbol_refs_local_p
- PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean));
+ (struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean);
extern const bfd_target *bfd_elf32_object_p
- PARAMS ((bfd *));
+ (bfd *);
extern const bfd_target *bfd_elf32_core_file_p
- PARAMS ((bfd *));
+ (bfd *);
extern char *bfd_elf32_core_file_failing_command
- PARAMS ((bfd *));
+ (bfd *);
extern int bfd_elf32_core_file_failing_signal
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean bfd_elf32_core_file_matches_executable_p
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
extern bfd_boolean bfd_elf32_bfd_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf32_bfd_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern void bfd_elf32_swap_symbol_in
- PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
+ (bfd *, const void *, const void *, Elf_Internal_Sym *);
extern void bfd_elf32_swap_symbol_out
- PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
+ (bfd *, const Elf_Internal_Sym *, void *, void *);
extern void bfd_elf32_swap_reloc_in
- PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+ (bfd *, const bfd_byte *, Elf_Internal_Rela *);
extern void bfd_elf32_swap_reloc_out
- PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+ (bfd *, const Elf_Internal_Rela *, bfd_byte *);
extern void bfd_elf32_swap_reloca_in
- PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+ (bfd *, const bfd_byte *, Elf_Internal_Rela *);
extern void bfd_elf32_swap_reloca_out
- PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+ (bfd *, const Elf_Internal_Rela *, bfd_byte *);
extern void bfd_elf32_swap_phdr_in
- PARAMS ((bfd *, const Elf32_External_Phdr *, Elf_Internal_Phdr *));
+ (bfd *, const Elf32_External_Phdr *, Elf_Internal_Phdr *);
extern void bfd_elf32_swap_phdr_out
- PARAMS ((bfd *, const Elf_Internal_Phdr *, Elf32_External_Phdr *));
+ (bfd *, const Elf_Internal_Phdr *, Elf32_External_Phdr *);
extern void bfd_elf32_swap_dyn_in
- PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
+ (bfd *, const void *, Elf_Internal_Dyn *);
extern void bfd_elf32_swap_dyn_out
- PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR));
+ (bfd *, const Elf_Internal_Dyn *, void *);
extern long bfd_elf32_slurp_symbol_table
- PARAMS ((bfd *, asymbol **, bfd_boolean));
+ (bfd *, asymbol **, bfd_boolean);
extern bfd_boolean bfd_elf32_write_shdrs_and_ehdr
- PARAMS ((bfd *));
+ (bfd *);
extern int bfd_elf32_write_out_phdrs
- PARAMS ((bfd *, const Elf_Internal_Phdr *, unsigned int));
+ (bfd *, const Elf_Internal_Phdr *, unsigned int);
extern void bfd_elf32_write_relocs
- PARAMS ((bfd *, asection *, PTR));
+ (bfd *, asection *, void *);
extern bfd_boolean bfd_elf32_slurp_reloc_table
- PARAMS ((bfd *, asection *, asymbol **, bfd_boolean));
+ (bfd *, asection *, asymbol **, bfd_boolean);
extern bfd_boolean bfd_elf32_add_dynamic_entry
- PARAMS ((struct bfd_link_info *, bfd_vma, bfd_vma));
+ (struct bfd_link_info *, bfd_vma, bfd_vma);
extern const bfd_target *bfd_elf64_object_p
- PARAMS ((bfd *));
+ (bfd *);
extern const bfd_target *bfd_elf64_core_file_p
- PARAMS ((bfd *));
+ (bfd *);
extern char *bfd_elf64_core_file_failing_command
- PARAMS ((bfd *));
+ (bfd *);
extern int bfd_elf64_core_file_failing_signal
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_boolean bfd_elf64_core_file_matches_executable_p
- PARAMS ((bfd *, bfd *));
+ (bfd *, bfd *);
extern bfd_boolean bfd_elf64_bfd_link_add_symbols
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf64_bfd_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern void bfd_elf64_swap_symbol_in
- PARAMS ((bfd *, const PTR, const PTR, Elf_Internal_Sym *));
+ (bfd *, const void *, const void *, Elf_Internal_Sym *);
extern void bfd_elf64_swap_symbol_out
- PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
+ (bfd *, const Elf_Internal_Sym *, void *, void *);
extern void bfd_elf64_swap_reloc_in
- PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+ (bfd *, const bfd_byte *, Elf_Internal_Rela *);
extern void bfd_elf64_swap_reloc_out
- PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+ (bfd *, const Elf_Internal_Rela *, bfd_byte *);
extern void bfd_elf64_swap_reloca_in
- PARAMS ((bfd *, const bfd_byte *, Elf_Internal_Rela *));
+ (bfd *, const bfd_byte *, Elf_Internal_Rela *);
extern void bfd_elf64_swap_reloca_out
- PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+ (bfd *, const Elf_Internal_Rela *, bfd_byte *);
extern void bfd_elf64_swap_phdr_in
- PARAMS ((bfd *, const Elf64_External_Phdr *, Elf_Internal_Phdr *));
+ (bfd *, const Elf64_External_Phdr *, Elf_Internal_Phdr *);
extern void bfd_elf64_swap_phdr_out
- PARAMS ((bfd *, const Elf_Internal_Phdr *, Elf64_External_Phdr *));
+ (bfd *, const Elf_Internal_Phdr *, Elf64_External_Phdr *);
extern void bfd_elf64_swap_dyn_in
- PARAMS ((bfd *, const PTR, Elf_Internal_Dyn *));
+ (bfd *, const void *, Elf_Internal_Dyn *);
extern void bfd_elf64_swap_dyn_out
- PARAMS ((bfd *, const Elf_Internal_Dyn *, PTR));
+ (bfd *, const Elf_Internal_Dyn *, void *);
extern long bfd_elf64_slurp_symbol_table
- PARAMS ((bfd *, asymbol **, bfd_boolean));
+ (bfd *, asymbol **, bfd_boolean);
extern bfd_boolean bfd_elf64_write_shdrs_and_ehdr
- PARAMS ((bfd *));
+ (bfd *);
extern int bfd_elf64_write_out_phdrs
- PARAMS ((bfd *, const Elf_Internal_Phdr *, unsigned int));
+ (bfd *, const Elf_Internal_Phdr *, unsigned int);
extern void bfd_elf64_write_relocs
- PARAMS ((bfd *, asection *, PTR));
+ (bfd *, asection *, void *);
extern bfd_boolean bfd_elf64_slurp_reloc_table
- PARAMS ((bfd *, asection *, asymbol **, bfd_boolean));
+ (bfd *, asection *, asymbol **, bfd_boolean);
extern bfd_boolean bfd_elf64_add_dynamic_entry
- PARAMS ((struct bfd_link_info *, bfd_vma, bfd_vma));
+ (struct bfd_link_info *, bfd_vma, bfd_vma);
#define bfd_elf32_link_record_dynamic_symbol \
_bfd_elf_link_record_dynamic_symbol
@@ -1622,71 +1615,127 @@ extern bfd_boolean bfd_elf64_add_dynamic_entry
_bfd_elf_link_record_dynamic_symbol
extern int elf_link_record_local_dynamic_symbol
- PARAMS ((struct bfd_link_info *, bfd *, long));
+ (struct bfd_link_info *, bfd *, long);
#define _bfd_elf32_link_record_local_dynamic_symbol \
elf_link_record_local_dynamic_symbol
#define _bfd_elf64_link_record_local_dynamic_symbol \
elf_link_record_local_dynamic_symbol
extern bfd_boolean _bfd_elf_close_and_cleanup
- PARAMS ((bfd *));
+ (bfd *);
extern bfd_reloc_status_type _bfd_elf_rel_vtable_reloc_fn
- PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR,
- asection *, bfd *, char **));
+ (bfd *, arelent *, struct symbol_cache_entry *, void *,
+ asection *, bfd *, char **);
extern bfd_boolean _bfd_elf32_gc_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf32_gc_common_finalize_got_offsets
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf32_gc_common_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf32_gc_record_vtinherit
- PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
+ (bfd *, asection *, struct elf_link_hash_entry *, bfd_vma);
extern bfd_boolean _bfd_elf32_gc_record_vtentry
- PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
+ (bfd *, asection *, struct elf_link_hash_entry *, bfd_vma);
extern bfd_boolean _bfd_elf64_gc_sections
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf64_gc_common_finalize_got_offsets
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf64_gc_common_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf64_gc_record_vtinherit
- PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
+ (bfd *, asection *, struct elf_link_hash_entry *, bfd_vma);
extern bfd_boolean _bfd_elf64_gc_record_vtentry
- PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
+ (bfd *, asection *, struct elf_link_hash_entry *, bfd_vma);
extern bfd_boolean _bfd_elf32_reloc_symbol_deleted_p
- PARAMS ((bfd_vma, PTR));
+ (bfd_vma, void *);
extern bfd_boolean _bfd_elf64_reloc_symbol_deleted_p
- PARAMS ((bfd_vma, PTR));
+ (bfd_vma, void *);
/* Exported interface for writing elf corefile notes. */
extern char *elfcore_write_note
- PARAMS ((bfd *, char *, int *, const char *, int, const PTR, int));
+ (bfd *, char *, int *, const char *, int, const void *, int);
extern char *elfcore_write_prpsinfo
- PARAMS ((bfd *, char *, int *, const char *, const char *));
+ (bfd *, char *, int *, const char *, const char *);
extern char *elfcore_write_prstatus
- PARAMS ((bfd *, char *, int *, long, int, const PTR));
+ (bfd *, char *, int *, long, int, const void *);
extern char * elfcore_write_pstatus
- PARAMS ((bfd *, char *, int *, long, int, const PTR));
+ (bfd *, char *, int *, long, int, const void *);
extern char *elfcore_write_prfpreg
- PARAMS ((bfd *, char *, int *, const PTR, int));
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_prxfpreg
- PARAMS ((bfd *, char *, int *, const PTR, int));
+ (bfd *, char *, int *, const void *, int);
extern char *elfcore_write_lwpstatus
- PARAMS ((bfd *, char *, int *, long, int, const PTR));
+ (bfd *, char *, int *, long, int, const void *);
extern bfd *_bfd_elf32_bfd_from_remote_memory
- PARAMS ((bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, char *, int)));
+ (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
+ int (*target_read_memory) (bfd_vma, char *, int));
extern bfd *_bfd_elf64_bfd_from_remote_memory
- PARAMS ((bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
- int (*target_read_memory) (bfd_vma, char *, int)));
+ (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
+ int (*target_read_memory) (bfd_vma, char *, int));
/* SH ELF specific routine. */
extern bfd_boolean _sh_elf_set_mach_from_flags
- PARAMS ((bfd *));
+ (bfd *);
+
+/* This macro is to avoid lots of duplicated code in the body
+ of xxx_relocate_section() in the various elfxx-xxxx.c files. */
+#define RELOC_FOR_GLOBAL_SYMBOL(h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned) \
+ do \
+ { \
+ /* It seems this can happen with erroneous or unsupported \
+ input (mixing a.out and elf in an archive, for example.) */ \
+ if (sym_hashes == NULL) \
+ return FALSE; \
+ \
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; \
+ \
+ while (h->root.type == bfd_link_hash_indirect \
+ || h->root.type == bfd_link_hash_warning) \
+ h = (struct elf_link_hash_entry *) h->root.u.i.link; \
+ \
+ warned = FALSE; \
+ unresolved_reloc = FALSE; \
+ relocation = 0; \
+ if (h->root.type == bfd_link_hash_defined \
+ || h->root.type == bfd_link_hash_defweak) \
+ { \
+ sec = h->root.u.def.section; \
+ if (sec == NULL \
+ || sec->output_section == NULL) \
+ /* Set a flag that will be cleared later if we find a \
+ relocation value for this symbol. output_section \
+ is typically NULL for symbols satisfied by a shared \
+ library. */ \
+ unresolved_reloc = TRUE; \
+ else \
+ relocation = (h->root.u.def.value \
+ + sec->output_section->vma \
+ + sec->output_offset); \
+ } \
+ else if (h->root.type == bfd_link_hash_undefweak) \
+ ; \
+ else if (!info->executable \
+ && info->unresolved_syms_in_objects == RM_IGNORE \
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \
+ ; \
+ else \
+ { \
+ if (! info->callbacks->undefined_symbol \
+ (info, h->root.root.string, input_bfd, \
+ input_section, rel->r_offset, \
+ ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR) \
+ || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR) \
+ || ELF_ST_VISIBILITY (h->other)) \
+ )) \
+ return FALSE; \
+ warned = TRUE; \
+ } \
+ } \
+ while (0)
#endif /* _LIBELF_H_ */
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index e422aa96a5..c71129e694 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -26,61 +26,44 @@
#define EH_FRAME_HDR_SIZE 8
-static bfd_vma read_unsigned_leb128
- PARAMS ((bfd *, char *, unsigned int *));
-static bfd_signed_vma read_signed_leb128
- PARAMS ((bfd *, char *, unsigned int *));
-static int get_DW_EH_PE_width
- PARAMS ((int, int));
-static bfd_vma read_value
- PARAMS ((bfd *, bfd_byte *, int, int));
-static void write_value
- PARAMS ((bfd *, bfd_byte *, bfd_vma, int));
-static int cie_compare
- PARAMS ((struct cie *, struct cie *));
-static int vma_compare
- PARAMS ((const PTR, const PTR));
-
/* Helper function for reading uleb128 encoded data. */
static bfd_vma
-read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
- bfd *abfd ATTRIBUTE_UNUSED;
- char *buf;
- unsigned int *bytes_read_ptr;
+read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
+ char *buf,
+ unsigned int *bytes_read_ptr)
{
- bfd_vma result;
- unsigned int num_read;
- int shift;
+ bfd_vma result;
+ unsigned int num_read;
+ int shift;
unsigned char byte;
- result = 0;
- shift = 0;
+ result = 0;
+ shift = 0;
num_read = 0;
do
{
byte = bfd_get_8 (abfd, (bfd_byte *) buf);
- buf ++;
- num_read ++;
+ buf++;
+ num_read++;
result |= (((bfd_vma) byte & 0x7f) << shift);
shift += 7;
}
while (byte & 0x80);
- * bytes_read_ptr = num_read;
+ *bytes_read_ptr = num_read;
return result;
}
/* Helper function for reading sleb128 encoded data. */
static bfd_signed_vma
-read_signed_leb128 (abfd, buf, bytes_read_ptr)
- bfd *abfd ATTRIBUTE_UNUSED;
- char *buf;
- unsigned int * bytes_read_ptr;
+read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED,
+ char *buf,
+ unsigned int * bytes_read_ptr)
{
- bfd_vma result;
- int shift;
- int num_read;
+ bfd_vma result;
+ int shift;
+ int num_read;
unsigned char byte;
result = 0;
@@ -97,7 +80,7 @@ read_signed_leb128 (abfd, buf, bytes_read_ptr)
while (byte & 0x80);
if (byte & 0x40)
result |= (((bfd_vma) -1) << (shift - 7)) << 7;
- * bytes_read_ptr = num_read;
+ *bytes_read_ptr = num_read;
return result;
}
@@ -120,8 +103,7 @@ while (0)
/* Return 0 if either encoding is variable width, or not yet known to bfd. */
static
-int get_DW_EH_PE_width (encoding, ptr_size)
- int encoding, ptr_size;
+int get_DW_EH_PE_width (int encoding, int ptr_size)
{
/* DW_EH_PE_ values of 0x60 and 0x70 weren't defined at the time .eh_frame
was added to bfd. */
@@ -146,11 +128,7 @@ int get_DW_EH_PE_width (encoding, ptr_size)
/* Read a width sized value from memory. */
static bfd_vma
-read_value (abfd, buf, width, is_signed)
- bfd *abfd;
- bfd_byte *buf;
- int width;
- int is_signed;
+read_value (bfd *abfd, bfd_byte *buf, int width, int is_signed)
{
bfd_vma value;
@@ -185,11 +163,7 @@ read_value (abfd, buf, width, is_signed)
/* Store a width sized value to memory. */
static void
-write_value (abfd, buf, value, width)
- bfd *abfd;
- bfd_byte *buf;
- bfd_vma value;
- int width;
+write_value (bfd *abfd, bfd_byte *buf, bfd_vma value, int width)
{
switch (width)
{
@@ -203,8 +177,7 @@ write_value (abfd, buf, value, width)
/* Return zero if C1 and C2 CIEs can be merged. */
static
-int cie_compare (c1, c2)
- struct cie *c1, *c2;
+int cie_compare (struct cie *c1, struct cie *c2)
{
if (c1->hdr.length == c2->hdr.length
&& c1->version == c2->version
@@ -218,8 +191,7 @@ int cie_compare (c1, c2)
&& c1->per_encoding == c2->per_encoding
&& c1->lsda_encoding == c2->lsda_encoding
&& c1->fde_encoding == c2->fde_encoding
- && (c1->initial_insn_length
- == c2->initial_insn_length)
+ && c1->initial_insn_length == c2->initial_insn_length
&& memcmp (c1->initial_instructions,
c2->initial_instructions,
c1->initial_insn_length) == 0)
@@ -234,13 +206,10 @@ int cie_compare (c1, c2)
deleted. */
bfd_boolean
-_bfd_elf_discard_section_eh_frame (abfd, info, sec,
- reloc_symbol_deleted_p, cookie)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- bfd_boolean (*reloc_symbol_deleted_p) PARAMS ((bfd_vma, PTR));
- struct elf_reloc_cookie *cookie;
+_bfd_elf_discard_section_eh_frame
+ (bfd *abfd, struct bfd_link_info *info, asection *sec,
+ bfd_boolean (*reloc_symbol_deleted_p) (bfd_vma, void *),
+ struct elf_reloc_cookie *cookie)
{
bfd_byte *ehbuf = NULL, *buf;
bfd_byte *last_cie, *last_fde;
@@ -274,12 +243,11 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec,
/* Read the frame unwind information from abfd. */
- ehbuf = (bfd_byte *) bfd_malloc (sec->_raw_size);
+ ehbuf = bfd_malloc (sec->_raw_size);
if (ehbuf == NULL)
goto free_no_table;
- if (! bfd_get_section_contents (abfd, sec, ehbuf, (bfd_vma) 0,
- sec->_raw_size))
+ if (! bfd_get_section_contents (abfd, sec, ehbuf, 0, sec->_raw_size))
goto free_no_table;
if (sec->_raw_size >= 4
@@ -693,9 +661,7 @@ free_no_table:
input sections. It finalizes the size of .eh_frame_hdr section. */
bfd_boolean
-_bfd_elf_discard_section_eh_frame_hdr (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+_bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
{
struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
@@ -723,8 +689,7 @@ _bfd_elf_discard_section_eh_frame_hdr (abfd, info)
since dynamic symbol table has been sized. */
bfd_boolean
-_bfd_elf_maybe_strip_eh_frame_hdr (info)
- struct bfd_link_info *info;
+_bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info)
{
asection *o;
bfd *abfd;
@@ -770,18 +735,16 @@ _bfd_elf_maybe_strip_eh_frame_hdr (info)
or to offset with dynamic relocation which is no longer needed. */
bfd_vma
-_bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- asection *sec;
- bfd_vma offset;
+_bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ bfd_vma offset)
{
struct eh_frame_sec_info *sec_info;
unsigned int lo, hi, mid;
if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
return offset;
- sec_info = (struct eh_frame_sec_info *)
- elf_section_data (sec)->sec_info;
+ sec_info = elf_section_data (sec)->sec_info;
if (offset >= sec->_raw_size)
return offset - (sec->_cooked_size - sec->_raw_size);
@@ -830,11 +793,10 @@ _bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
contents. */
bfd_boolean
-_bfd_elf_write_section_eh_frame (abfd, info, sec, contents)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- bfd_byte *contents;
+_bfd_elf_write_section_eh_frame (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ bfd_byte *contents)
{
struct eh_frame_sec_info *sec_info;
struct elf_link_hash_table *htab;
@@ -849,12 +811,9 @@ _bfd_elf_write_section_eh_frame (abfd, info, sec, contents)
== ELFCLASS64) ? 8 : 4;
if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
- return bfd_set_section_contents (abfd, sec->output_section,
- contents,
- (file_ptr) sec->output_offset,
- sec->_raw_size);
- sec_info = (struct eh_frame_sec_info *)
- elf_section_data (sec)->sec_info;
+ return bfd_set_section_contents (abfd, sec->output_section, contents,
+ sec->output_offset, sec->_raw_size);
+ sec_info = elf_section_data (sec)->sec_info;
htab = elf_hash_table (info);
hdr_info = &htab->eh_info;
if (hdr_info->table && hdr_info->array == NULL)
@@ -1079,12 +1038,10 @@ _bfd_elf_write_section_eh_frame (abfd, info, sec, contents)
VMA of FDE initial location. */
static int
-vma_compare (a, b)
- const PTR a;
- const PTR b;
+vma_compare (const void *a, const void *b)
{
- struct eh_frame_array_ent *p = (struct eh_frame_array_ent *) a;
- struct eh_frame_array_ent *q = (struct eh_frame_array_ent *) b;
+ const struct eh_frame_array_ent *p = a;
+ const struct eh_frame_array_ent *q = b;
if (p->initial_loc > q->initial_loc)
return 1;
if (p->initial_loc < q->initial_loc)
@@ -1115,9 +1072,7 @@ vma_compare (a, b)
sorted by increasing initial_loc). */
bfd_boolean
-_bfd_elf_write_section_eh_frame_hdr (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+_bfd_elf_write_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
{
struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 90f648289f..bdd7a7471e 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -44,62 +44,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_hppa_final_link elf32_hppa_final_link
#endif
-static void elf_hppa_info_to_howto
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static void elf_hppa_info_to_howto_rel
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-
-static reloc_howto_type * elf_hppa_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-
-static bfd_boolean elf_hppa_is_local_label_name
- PARAMS ((bfd *, const char *));
-
-static bfd_boolean elf_hppa_fake_sections
- PARAMS ((bfd *abfd, Elf_Internal_Shdr *, asection *));
-
-static void elf_hppa_final_write_processing
- PARAMS ((bfd *, bfd_boolean));
-
-static int hppa_unwind_entry_compare
- PARAMS ((const PTR, const PTR));
-
-static bfd_boolean elf_hppa_sort_unwind
- PARAMS ((bfd *));
-
#if ARCH_SIZE == 64
-static bfd_boolean elf_hppa_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
-
-static bfd_boolean elf_hppa_unmark_useless_dynamic_symbols
- PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean elf_hppa_remark_useless_dynamic_symbols
- PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean elf_hppa_is_dynamic_loader_symbol
- PARAMS ((const char *));
-
-static void elf_hppa_record_segment_addrs
- PARAMS ((bfd *, asection *, PTR));
-
-static bfd_boolean elf_hppa_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static bfd_boolean elf_hppa_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-
static bfd_reloc_status_type elf_hppa_final_link_relocate
- PARAMS ((Elf_Internal_Rela *, bfd *, bfd *, asection *,
- bfd_byte *, bfd_vma, struct bfd_link_info *,
- asection *, struct elf_link_hash_entry *,
- struct elf64_hppa_dyn_hash_entry *));
+ (Elf_Internal_Rela *, bfd *, bfd *, asection *, bfd_byte *, bfd_vma,
+ struct bfd_link_info *, asection *, struct elf_link_hash_entry *,
+ struct elf64_hppa_dyn_hash_entry *);
static int elf_hppa_relocate_insn
- PARAMS ((int, int, unsigned int));
+ (int, int, unsigned int);
#endif
/* ELF/PA relocation howto entries. */
@@ -615,11 +567,10 @@ static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] =
format, and field selector. */
elf_hppa_reloc_type
-elf_hppa_reloc_final_type (abfd, base_type, format, field)
- bfd *abfd;
- elf_hppa_reloc_type base_type;
- int format;
- unsigned int field;
+elf_hppa_reloc_final_type (bfd *abfd,
+ elf_hppa_reloc_type base_type,
+ int format,
+ unsigned int field)
{
elf_hppa_reloc_type final_type = base_type;
@@ -884,26 +835,25 @@ elf_hppa_reloc_final_type (abfd, base_type, format, field)
relocation with modifications based on format and field. */
elf_hppa_reloc_type **
-_bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym)
- bfd *abfd;
- elf_hppa_reloc_type base_type;
- int format;
- unsigned int field;
- int ignore ATTRIBUTE_UNUSED;
- asymbol *sym ATTRIBUTE_UNUSED;
+_bfd_elf_hppa_gen_reloc_type (bfd *abfd,
+ elf_hppa_reloc_type base_type,
+ int format,
+ unsigned int field,
+ int ignore ATTRIBUTE_UNUSED,
+ asymbol *sym ATTRIBUTE_UNUSED)
{
elf_hppa_reloc_type *finaltype;
elf_hppa_reloc_type **final_types;
bfd_size_type amt = sizeof (elf_hppa_reloc_type *) * 2;
/* Allocate slots for the BFD relocation. */
- final_types = (elf_hppa_reloc_type **) bfd_alloc (abfd, amt);
+ final_types = bfd_alloc (abfd, amt);
if (final_types == NULL)
return NULL;
/* Allocate space for the relocation itself. */
amt = sizeof (elf_hppa_reloc_type);
- finaltype = (elf_hppa_reloc_type *) bfd_alloc (abfd, amt);
+ finaltype = bfd_alloc (abfd, amt);
if (finaltype == NULL)
return NULL;
@@ -919,12 +869,11 @@ _bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym)
/* Translate from an elf into field into a howto relocation pointer. */
static void
-elf_hppa_info_to_howto (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc;
+elf_hppa_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc)
{
- BFD_ASSERT (ELF_R_TYPE(elf_reloc->r_info)
+ BFD_ASSERT (ELF_R_TYPE (elf_reloc->r_info)
< (unsigned int) R_PARISC_UNIMPLEMENTED);
bfd_reloc->howto = &elf_hppa_howto_table[ELF_R_TYPE (elf_reloc->r_info)];
}
@@ -932,10 +881,9 @@ elf_hppa_info_to_howto (abfd, bfd_reloc, elf_reloc)
/* Translate from an elf into field into a howto relocation pointer. */
static void
-elf_hppa_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *bfd_reloc;
- Elf_Internal_Rela *elf_reloc;
+elf_hppa_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc)
{
BFD_ASSERT (ELF_R_TYPE(elf_reloc->r_info)
< (unsigned int) R_PARISC_UNIMPLEMENTED);
@@ -946,9 +894,8 @@ elf_hppa_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
relocation for an ARCH machine. */
static reloc_howto_type *
-elf_hppa_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+elf_hppa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
if ((int) code < (int) R_PARISC_UNIMPLEMENTED)
{
@@ -961,9 +908,7 @@ elf_hppa_reloc_type_lookup (abfd, code)
/* Return TRUE if SYM represents a local label symbol. */
static bfd_boolean
-elf_hppa_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
+elf_hppa_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name)
{
if (name[0] == 'L' && name[1] == '$')
return 1;
@@ -974,12 +919,9 @@ elf_hppa_is_local_label_name (abfd, name)
section name, which is a hack, but ought to work. */
static bfd_boolean
-elf_hppa_fake_sections (abfd, hdr, sec)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
- asection *sec;
+elf_hppa_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
{
- register const char *name;
+ const char *name;
name = bfd_get_section_name (abfd, sec);
@@ -1017,9 +959,8 @@ elf_hppa_fake_sections (abfd, hdr, sec)
}
static void
-elf_hppa_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+elf_hppa_final_write_processing (bfd *abfd,
+ bfd_boolean linker ATTRIBUTE_UNUSED)
{
int mach = bfd_get_mach (abfd);
@@ -1048,20 +989,18 @@ elf_hppa_final_write_processing (abfd, linker)
final link. */
static int
-hppa_unwind_entry_compare (a, b)
- const PTR a;
- const PTR b;
+hppa_unwind_entry_compare (const void *a, const void *b)
{
const bfd_byte *ap, *bp;
unsigned long av, bv;
- ap = (const bfd_byte *) a;
+ ap = a;
av = (unsigned long) ap[0] << 24;
av |= (unsigned long) ap[1] << 16;
av |= (unsigned long) ap[2] << 8;
av |= (unsigned long) ap[3];
- bp = (const bfd_byte *) b;
+ bp = b;
bv = (unsigned long) bp[0] << 24;
bv |= (unsigned long) bp[1] << 16;
bv |= (unsigned long) bp[2] << 8;
@@ -1070,8 +1009,7 @@ hppa_unwind_entry_compare (a, b)
return av < bv ? -1 : av > bv ? 1 : 0;
}
-static bfd_boolean elf_hppa_sort_unwind (abfd)
- bfd *abfd;
+static bfd_boolean elf_hppa_sort_unwind (bfd *abfd)
{
asection *s;
@@ -1108,14 +1046,13 @@ static bfd_boolean elf_hppa_sort_unwind (abfd)
indices, which we have to handle. */
static bfd_boolean
-elf_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- const Elf_Internal_Sym *sym;
- const char **namep ATTRIBUTE_UNUSED;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp;
- bfd_vma *valp;
+elf_hppa_add_symbol_hook (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const Elf_Internal_Sym *sym,
+ const char **namep ATTRIBUTE_UNUSED,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp,
+ bfd_vma *valp)
{
int index = sym->st_shndx;
@@ -1138,11 +1075,10 @@ elf_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
}
static bfd_boolean
-elf_hppa_unmark_useless_dynamic_symbols (h, data)
- struct elf_link_hash_entry *h;
- PTR data;
+elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
+ void *data)
{
- struct bfd_link_info *info = (struct bfd_link_info *)data;
+ struct bfd_link_info *info = data;
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -1161,7 +1097,7 @@ elf_hppa_unmark_useless_dynamic_symbols (h, data)
linker code. */
if (! info->relocatable
&& ! (info->shared
- && !info->no_undefined)
+ && info->unresolved_syms_in_shared_libs == RM_IGNORE)
&& h->root.type == bfd_link_hash_undefined
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
@@ -1174,11 +1110,10 @@ elf_hppa_unmark_useless_dynamic_symbols (h, data)
}
static bfd_boolean
-elf_hppa_remark_useless_dynamic_symbols (h, data)
- struct elf_link_hash_entry *h;
- PTR data;
+elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h,
+ void *data)
{
- struct bfd_link_info *info = (struct bfd_link_info *)data;
+ struct bfd_link_info *info = data;
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -1197,7 +1132,7 @@ elf_hppa_remark_useless_dynamic_symbols (h, data)
linker code. */
if (! info->relocatable
&& ! (info->shared
- && !info->no_undefined)
+ && info->unresolved_syms_in_shared_libs == RM_IGNORE)
&& h->root.type == bfd_link_hash_undefined
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
@@ -1211,8 +1146,7 @@ elf_hppa_remark_useless_dynamic_symbols (h, data)
}
static bfd_boolean
-elf_hppa_is_dynamic_loader_symbol (name)
- const char * name;
+elf_hppa_is_dynamic_loader_symbol (const char *name)
{
return (! strcmp (name, "__CPU_REVISION")
|| ! strcmp (name, "__CPU_KEYBITS_1")
@@ -1229,15 +1163,14 @@ elf_hppa_is_dynamic_loader_symbol (name)
/* Record the lowest address for the data and text segments. */
static void
-elf_hppa_record_segment_addrs (abfd, section, data)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section;
- PTR data;
+elf_hppa_record_segment_addrs (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section,
+ void *data)
{
struct elf64_hppa_link_hash_table *hppa_info;
bfd_vma value;
- hppa_info = (struct elf64_hppa_link_hash_table *)data;
+ hppa_info = data;
value = section->vma - section->filepos;
@@ -1258,9 +1191,7 @@ elf_hppa_record_segment_addrs (abfd, section, data)
fall back to the generic ELF final link routine. */
static bfd_boolean
-elf_hppa_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
{
bfd_boolean retval;
struct elf64_hppa_link_hash_table *hppa_info = elf64_hppa_hash_table (info);
@@ -1360,16 +1291,14 @@ elf_hppa_final_link (abfd, info)
/* Relocate an HPPA ELF section. */
static bfd_boolean
-elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+elf_hppa_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *rel;
@@ -1470,7 +1399,8 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = 0;
}
/* Allow undefined symbols in shared libraries. */
- else if (info->shared && !info->no_undefined
+ else if (info->shared
+ && info->unresolved_syms_in_shared_libs == RM_IGNORE
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
{
if (info->symbolic)
@@ -1578,19 +1508,16 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
function. */
static bfd_reloc_status_type
-elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
- input_section, contents, value,
- info, sym_sec, h, dyn_h)
- Elf_Internal_Rela *rel;
- bfd *input_bfd;
- bfd *output_bfd;
- asection *input_section;
- bfd_byte *contents;
- bfd_vma value;
- struct bfd_link_info *info;
- asection *sym_sec;
- struct elf_link_hash_entry *h ATTRIBUTE_UNUSED;
- struct elf64_hppa_dyn_hash_entry *dyn_h;
+elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
+ bfd *input_bfd,
+ bfd *output_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ bfd_vma value,
+ struct bfd_link_info *info,
+ asection *sym_sec,
+ struct elf_link_hash_entry *h ATTRIBUTE_UNUSED,
+ struct elf64_hppa_dyn_hash_entry *dyn_h)
{
int insn;
bfd_vma offset = rel->r_offset;
@@ -2136,10 +2063,7 @@ elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
to insert the relocation into the given instruction. */
static int
-elf_hppa_relocate_insn (insn, sym_value, r_type)
- int insn;
- int sym_value;
- unsigned int r_type;
+elf_hppa_relocate_insn (int insn, int sym_value, unsigned int r_type)
{
switch (r_type)
{
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 0d68fe5119..dc25c38aff 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -562,7 +562,7 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
flagword pltflags;
asection * s;
struct elf_link_hash_entry * h;
- struct elf_backend_data * bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data * bed = get_elf_backend_data (abfd);
int ptralign;
/* This function may be called more than once. */
@@ -1158,9 +1158,8 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
}
bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- (((Elf32_External_Rela *)
- sreloc->contents)
- + sreloc->reloc_count));
+ (bfd_byte *) (((Elf32_External_Rela *) sreloc->contents)
+ + sreloc->reloc_count));
++sreloc->reloc_count;
/* If this reloc is against an external symbol, we do
@@ -1295,9 +1294,9 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
}
bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- (((Elf32_External_Rela *)
- sreloc->contents)
- + sreloc->reloc_count));
+ (bfd_byte *) (((Elf32_External_Rela *)
+ sreloc->contents)
+ + sreloc->reloc_count));
++sreloc->reloc_count;
return bfd_reloc_ok;
@@ -1480,9 +1479,9 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
outrel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE);
outrel.r_addend = value;
bfd_elf32_swap_reloca_out (output_bfd, &outrel,
- (((Elf32_External_Rela *)
- srelgot->contents)
- + srelgot->reloc_count));
+ (bfd_byte *) (((Elf32_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count));
++ srelgot->reloc_count;
}
@@ -1579,15 +1578,20 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct elf32_mn10300_link_hash_entry *) h->root.root.u.i.link;
- if (h->root.root.type == bfd_link_hash_defined
+ bfd_boolean unresolved_reloc;
+ bfd_boolean warned;
+ struct elf_link_hash_entry *hh;
+
+ RELOC_FOR_GLOBAL_SYMBOL (hh, (struct elf_link_hash_entry *) sym_hashes,
+ r_symndx, symtab_hdr, relocation,
+ sec, unresolved_reloc, info,
+ warned);
+
+ h = (struct elf32_mn10300_link_hash_entry *) hh;
+
+ if ((h->root.root.type == bfd_link_hash_defined
|| h->root.root.type == bfd_link_hash_defweak)
- {
- sec = h->root.root.u.def.section;
- if ( r_type == R_MN10300_GOTPC32
+ && ( r_type == R_MN10300_GOTPC32
|| r_type == R_MN10300_GOTPC16
|| (( r_type == R_MN10300_PLT32
|| r_type == R_MN10300_PLT16)
@@ -1615,41 +1619,17 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
do anything with them here. */
|| ((input_section->flags & SEC_DEBUGGING) != 0
&& (h->root.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
- {
- /* In these cases, we don't need the relocation
- value. We check specially because in some
- obscure cases sec->output_section will be NULL. */
- relocation = 0;
- }
- else if (sec->output_section == NULL)
- {
- (*_bfd_error_handler)
- (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- bfd_get_filename (input_bfd), h->root.root.root.string,
- bfd_get_section_name (input_bfd, input_section));
- relocation = 0;
- }
- else
- relocation = (h->root.root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.root.type == bfd_link_hash_undefweak)
- relocation = 0;
- else if (info->shared && !info->symbolic && !info->no_undefined
- && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))))
+ /* In these cases, we don't need the relocation
+ value. We check specially because in some
+ obscure cases sec->output_section will be NULL. */
relocation = 0;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->root.other)))))
- return FALSE;
- relocation = 0;
- }
+
+ else if (unresolved_reloc)
+ (*_bfd_error_handler)
+ (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
+ bfd_get_filename (input_bfd), h->root.root.root.string,
+ bfd_get_section_name (input_bfd, input_section));
}
r = mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
@@ -4049,7 +4029,7 @@ _bfd_mn10300_elf_create_dynamic_sections (abfd, info)
{
flagword flags;
asection * s;
- struct elf_backend_data * bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data * bed = get_elf_backend_data (abfd);
int ptralign = 0;
switch (bed->s->arch_size)
@@ -4626,8 +4606,8 @@ _bfd_mn10300_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_JMP_SLOT);
rel.r_addend = 0;
bfd_elf32_swap_reloca_out (output_bfd, &rel,
- ((Elf32_External_Rela *) srel->contents
- + plt_index));
+ (bfd_byte *) ((Elf32_External_Rela *) srel->contents
+ + plt_index));
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
/* Mark the symbol as undefined, rather than as defined in
@@ -4673,8 +4653,8 @@ _bfd_mn10300_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
bfd_elf32_swap_reloca_out (output_bfd, &rel,
- ((Elf32_External_Rela *) srel->contents
- + srel->reloc_count));
+ (bfd_byte *) ((Elf32_External_Rela *) srel->contents
+ + srel->reloc_count));
++ srel->reloc_count;
}
@@ -4698,8 +4678,8 @@ _bfd_mn10300_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
rel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_COPY);
rel.r_addend = 0;
bfd_elf32_swap_reloca_out (output_bfd, &rel,
- ((Elf32_External_Rela *) s->contents
- + s->reloc_count));
+ (bfd_byte *) ((Elf32_External_Rela *) s->contents
+ + s->reloc_count));
++ s->reloc_count;
}
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c
index 3bd5531a81..764ab54423 100644
--- a/bfd/elf-strtab.c
+++ b/bfd/elf-strtab.c
@@ -57,53 +57,46 @@ struct elf_strtab_hash
struct elf_strtab_hash_entry **array;
};
-static struct bfd_hash_entry *elf_strtab_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static int cmplengthentry PARAMS ((const PTR, const PTR));
-static int last4_eq PARAMS ((const PTR, const PTR));
-
/* Routine to create an entry in a section merge hashtab. */
static struct bfd_hash_entry *
-elf_strtab_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+elf_strtab_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
- struct elf_strtab_hash_entry *ret = (struct elf_strtab_hash_entry *) entry;
-
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct elf_strtab_hash_entry *) NULL)
- ret = ((struct elf_strtab_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct elf_strtab_hash_entry)));
- if (ret == (struct elf_strtab_hash_entry *) NULL)
+ if (entry == NULL)
+ entry = bfd_hash_allocate (table, sizeof (struct elf_strtab_hash_entry));
+ if (entry == NULL)
return NULL;
/* Call the allocation method of the superclass. */
- ret = ((struct elf_strtab_hash_entry *)
- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
+ entry = bfd_hash_newfunc (entry, table, string);
- if (ret)
+ if (entry)
{
/* Initialize the local fields. */
+ struct elf_strtab_hash_entry *ret;
+
+ ret = (struct elf_strtab_hash_entry *) entry;
ret->u.index = -1;
ret->refcount = 0;
ret->len = 0;
}
- return (struct bfd_hash_entry *)ret;
+ return entry;
}
/* Create a new hash table. */
struct elf_strtab_hash *
-_bfd_elf_strtab_init ()
+_bfd_elf_strtab_init (void)
{
struct elf_strtab_hash *table;
bfd_size_type amt = sizeof (struct elf_strtab_hash);
- table = (struct elf_strtab_hash *) bfd_malloc (amt);
+ table = bfd_malloc (amt);
if (table == NULL)
return NULL;
@@ -117,8 +110,7 @@ _bfd_elf_strtab_init ()
table->size = 1;
table->alloced = 64;
amt = sizeof (struct elf_strtab_hasn_entry *);
- table->array = (struct elf_strtab_hash_entry **)
- bfd_malloc (table->alloced * amt);
+ table->array = bfd_malloc (table->alloced * amt);
if (table->array == NULL)
{
free (table);
@@ -133,8 +125,7 @@ _bfd_elf_strtab_init ()
/* Free a strtab. */
void
-_bfd_elf_strtab_free (tab)
- struct elf_strtab_hash *tab;
+_bfd_elf_strtab_free (struct elf_strtab_hash *tab)
{
bfd_hash_table_free (&tab->table);
free (tab->array);
@@ -145,10 +136,9 @@ _bfd_elf_strtab_free (tab)
already present. */
bfd_size_type
-_bfd_elf_strtab_add (tab, str, copy)
- struct elf_strtab_hash *tab;
- const char *str;
- bfd_boolean copy;
+_bfd_elf_strtab_add (struct elf_strtab_hash *tab,
+ const char *str,
+ bfd_boolean copy)
{
register struct elf_strtab_hash_entry *entry;
@@ -172,8 +162,7 @@ _bfd_elf_strtab_add (tab, str, copy)
{
bfd_size_type amt = sizeof (struct elf_strtab_hash_entry *);
tab->alloced *= 2;
- tab->array = (struct elf_strtab_hash_entry **)
- bfd_realloc (tab->array, tab->alloced * amt);
+ tab->array = bfd_realloc (tab->array, tab->alloced * amt);
if (tab->array == NULL)
return (bfd_size_type) -1;
}
@@ -185,9 +174,7 @@ _bfd_elf_strtab_add (tab, str, copy)
}
void
-_bfd_elf_strtab_addref (tab, idx)
- struct elf_strtab_hash *tab;
- bfd_size_type idx;
+_bfd_elf_strtab_addref (struct elf_strtab_hash *tab, bfd_size_type idx)
{
if (idx == 0 || idx == (bfd_size_type) -1)
return;
@@ -197,9 +184,7 @@ _bfd_elf_strtab_addref (tab, idx)
}
void
-_bfd_elf_strtab_delref (tab, idx)
- struct elf_strtab_hash *tab;
- bfd_size_type idx;
+_bfd_elf_strtab_delref (struct elf_strtab_hash *tab, bfd_size_type idx)
{
if (idx == 0 || idx == (bfd_size_type) -1)
return;
@@ -210,8 +195,7 @@ _bfd_elf_strtab_delref (tab, idx)
}
void
-_bfd_elf_strtab_clear_all_refs (tab)
- struct elf_strtab_hash *tab;
+_bfd_elf_strtab_clear_all_refs (struct elf_strtab_hash *tab)
{
bfd_size_type idx;
@@ -220,16 +204,13 @@ _bfd_elf_strtab_clear_all_refs (tab)
}
bfd_size_type
-_bfd_elf_strtab_size (tab)
- struct elf_strtab_hash *tab;
+_bfd_elf_strtab_size (struct elf_strtab_hash *tab)
{
return tab->sec_size ? tab->sec_size : tab->size;
}
bfd_size_type
-_bfd_elf_strtab_offset (tab, idx)
- struct elf_strtab_hash *tab;
- bfd_size_type idx;
+_bfd_elf_strtab_offset (struct elf_strtab_hash *tab, bfd_size_type idx)
{
struct elf_strtab_hash_entry *entry;
@@ -244,9 +225,7 @@ _bfd_elf_strtab_offset (tab, idx)
}
bfd_boolean
-_bfd_elf_strtab_emit (abfd, tab)
- register bfd *abfd;
- struct elf_strtab_hash *tab;
+_bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab)
{
bfd_size_type off = 1, i;
@@ -264,7 +243,7 @@ _bfd_elf_strtab_emit (abfd, tab)
if (len == 0)
continue;
- if (bfd_bwrite ((PTR) str, (bfd_size_type) len, abfd) != len)
+ if (bfd_bwrite (str, len, abfd) != len)
return FALSE;
off += len;
@@ -277,12 +256,10 @@ _bfd_elf_strtab_emit (abfd, tab)
/* Compare two elf_strtab_hash_entry structures. This is called via qsort. */
static int
-cmplengthentry (a, b)
- const PTR a;
- const PTR b;
+cmplengthentry (const void *a, const void *b)
{
- struct elf_strtab_hash_entry * A = *(struct elf_strtab_hash_entry **) a;
- struct elf_strtab_hash_entry * B = *(struct elf_strtab_hash_entry **) b;
+ struct elf_strtab_hash_entry *A = *(struct elf_strtab_hash_entry **) a;
+ struct elf_strtab_hash_entry *B = *(struct elf_strtab_hash_entry **) b;
if (A->len < B->len)
return 1;
@@ -293,12 +270,10 @@ cmplengthentry (a, b)
}
static int
-last4_eq (a, b)
- const PTR a;
- const PTR b;
+last4_eq (const void *a, const void *b)
{
- struct elf_strtab_hash_entry * A = (struct elf_strtab_hash_entry *) a;
- struct elf_strtab_hash_entry * B = (struct elf_strtab_hash_entry *) b;
+ const struct elf_strtab_hash_entry *A = a;
+ const struct elf_strtab_hash_entry *B = b;
if (memcmp (A->root.string + A->len - 5, B->root.string + B->len - 5, 4)
!= 0)
@@ -318,8 +293,7 @@ last4_eq (a, b)
merging strings matching suffixes of longer strings if possible. */
void
-_bfd_elf_strtab_finalize (tab)
- struct elf_strtab_hash *tab;
+_bfd_elf_strtab_finalize (struct elf_strtab_hash *tab)
{
struct elf_strtab_hash_entry **array, **a, **end, *e;
htab_t last4tab = NULL;
@@ -335,7 +309,7 @@ _bfd_elf_strtab_finalize (tab)
/* Now sort the strings by length, longest first. */
array = NULL;
amt = tab->size * sizeof (struct elf_strtab_hash_entry *);
- array = (struct elf_strtab_hash_entry **) bfd_malloc (amt);
+ array = bfd_malloc (amt);
if (array == NULL)
goto alloc_failure;
@@ -365,7 +339,7 @@ _bfd_elf_strtab_finalize (tab)
unsigned int c;
unsigned int j;
const unsigned char *s;
- PTR *p;
+ void **p;
e = *a;
if (e->len > 4)
@@ -385,13 +359,13 @@ _bfd_elf_strtab_finalize (tab)
{
struct elf_strtab_hash_entry *ent;
- ent = (struct elf_strtab_hash_entry *) *p;
+ ent = *p;
e->u.suffix = ent;
e->len = 0;
continue;
}
else
- *p = (PTR) e;
+ *p = e;
}
else
{
diff --git a/bfd/elf.c b/bfd/elf.c
index 33848a2b4d..3868cff6a1 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -325,7 +325,7 @@ bfd_elf_get_elf_syms (bfd *ibfd,
Elf_External_Sym_Shndx *shndx;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
size_t extsym_size;
bfd_size_type amt;
file_ptr pos;
@@ -638,7 +638,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
{
asection *newsect;
flagword flags;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (hdr->bfd_section != NULL)
{
@@ -1193,7 +1193,7 @@ bfd_elf_print_symbol (bfd *abfd,
{
const char *section_name;
const char *name = NULL;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
unsigned char st_other;
bfd_vma val;
@@ -1344,7 +1344,7 @@ _bfd_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
old indirect symbol. Also used for copying flags to a weakdef. */
void
-_bfd_elf_link_hash_copy_indirect (struct elf_backend_data *bed,
+_bfd_elf_link_hash_copy_indirect (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
@@ -1649,7 +1649,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
{
Elf_Internal_Shdr *hdr = elf_elfsections (abfd)[shindex];
Elf_Internal_Ehdr *ehdr = elf_elfheader (abfd);
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
const char *name;
name = elf_string_from_elf_strtab (abfd, hdr->sh_name);
@@ -2123,13 +2123,13 @@ bfd_boolean
_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name, int *type, int *attr)
{
bfd_boolean found = FALSE;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
/* See if this is one of the special sections. */
if (name)
{
const struct bfd_elf_special_section *ssect = NULL;
- unsigned int rela = get_elf_backend_data (abfd)->default_use_rela_p;
+ unsigned int rela = bed->default_use_rela_p;
if (bed->special_sections)
ssect = get_special_section (name, bed->special_sections, rela);
@@ -2274,7 +2274,7 @@ _bfd_elf_make_section_from_phdr (bfd *abfd,
bfd_boolean
bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
switch (hdr->p_type)
{
@@ -2332,7 +2332,7 @@ _bfd_elf_init_reloc_shdr (bfd *abfd,
bfd_boolean use_rela_p)
{
char *name;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_size_type amt = sizeof ".rela" + strlen (asect->name);
name = bfd_alloc (abfd, amt);
@@ -2362,7 +2362,7 @@ _bfd_elf_init_reloc_shdr (bfd *abfd,
static void
elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_boolean *failedptr = failedptrarg;
Elf_Internal_Shdr *this_hdr;
@@ -2872,7 +2872,7 @@ static int
sym_is_global (bfd *abfd, asymbol *sym)
{
/* If the backend has a special mapping, use it. */
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (bed->elf_backend_sym_is_global)
return (*bed->elf_backend_sym_is_global) (abfd, sym);
@@ -3066,7 +3066,7 @@ bfd_boolean
_bfd_elf_compute_section_file_positions (bfd *abfd,
struct bfd_link_info *link_info)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_boolean failed;
struct bfd_strtab_hash *strtab;
Elf_Internal_Shdr *shstrtab_hdr;
@@ -4059,7 +4059,7 @@ get_program_header_size (bfd *abfd)
{
size_t segs;
asection *s;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
/* We can't return a different result each time we're called. */
if (elf_tdata (abfd)->program_header_size != 0)
@@ -4162,7 +4162,7 @@ assign_file_positions_except_relocs (bfd *abfd)
Elf_Internal_Shdr ** const i_shdrpp = elf_elfsections (abfd);
unsigned int num_sec = elf_numsections (abfd);
file_ptr off;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0
&& bfd_get_format (abfd) != bfd_core)
@@ -4269,7 +4269,7 @@ prep_headers (bfd *abfd)
Elf_Internal_Phdr *i_phdrp = 0; /* Program header table, internal form */
Elf_Internal_Shdr **i_shdrp; /* Section header table, internal form */
struct elf_strtab_hash *shstrtab;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
i_ehdrp = elf_elfheader (abfd);
i_shdrp = elf_elfsections (abfd);
@@ -4314,11 +4314,8 @@ prep_headers (bfd *abfd)
Such need can generally be supplied by replacing the tests for
e_machine with the conditions used to determine it. */
default:
- if (get_elf_backend_data (abfd) != NULL)
- i_ehdrp->e_machine = get_elf_backend_data (abfd)->elf_machine_code;
- else
- i_ehdrp->e_machine = EM_NONE;
- }
+ i_ehdrp->e_machine = bed->elf_machine_code;
+ }
i_ehdrp->e_version = bed->s->ev_current;
i_ehdrp->e_ehsize = bed->s->sizeof_ehdr;
@@ -4396,7 +4393,7 @@ _bfd_elf_assign_file_positions_for_relocs (bfd *abfd)
bfd_boolean
_bfd_elf_write_object_contents (bfd *abfd)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
Elf_Internal_Ehdr *i_ehdrp;
Elf_Internal_Shdr **i_shdrp;
bfd_boolean failed;
@@ -4458,7 +4455,7 @@ _bfd_elf_write_corefile_contents (bfd *abfd)
int
_bfd_elf_section_from_bfd_section (bfd *abfd, struct sec *asect)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
int index;
if (elf_section_data (asect) != NULL
@@ -4574,7 +4571,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
bfd_vma maxpagesize;
struct elf_segment_map *phdr_adjust_seg = NULL;
unsigned int phdr_adjust_num = 0;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -5269,7 +5266,7 @@ swap_out_syms (bfd *abfd,
struct bfd_strtab_hash **sttp,
int relocatable_p)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
int symcount;
asymbol **syms;
struct bfd_strtab_hash *stt;
@@ -5601,7 +5598,7 @@ _bfd_elf_canonicalize_reloc (bfd *abfd,
{
arelent *tblptr;
unsigned int i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! bed->s->slurp_reloc_table (abfd, section, symbols, FALSE))
return -1;
@@ -5618,7 +5615,7 @@ _bfd_elf_canonicalize_reloc (bfd *abfd,
long
_bfd_elf_get_symtab (bfd *abfd, asymbol **allocation)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
long symcount = bed->s->slurp_symbol_table (abfd, allocation, FALSE);
if (symcount >= 0)
@@ -5630,7 +5627,7 @@ long
_bfd_elf_canonicalize_dynamic_symtab (bfd *abfd,
asymbol **allocation)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
long symcount = bed->s->slurp_symbol_table (abfd, allocation, TRUE);
if (symcount >= 0)
@@ -6758,7 +6755,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
static bfd_boolean
elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
switch (note->type)
{
@@ -7062,7 +7059,7 @@ elfcore_write_note (bfd *abfd,
pad = 0;
if (name != NULL)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
namesz = strlen (name) + 1;
bed = get_elf_backend_data (abfd);
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index f073e7a1a6..a28c558f1d 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -1038,6 +1038,18 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
return TRUE;
}
+/* This is the condition under which elf32_arm_finish_dynamic_symbol
+ will be called from elflink.h. If elflink.h doesn't call our
+ finish_dynamic_symbol routine, we'll need to do something about
+ initializing any .plt and .got entries in elf32_arm_relocate_section
+ and elf32_arm_final_link_relocate. */
+#define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, SHARED, H) \
+ ((DYN) \
+ && ((SHARED) \
+ || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) \
+ && ((H)->dynindx != -1 \
+ || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0))
+
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
@@ -1605,13 +1617,16 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
if (h != NULL)
{
bfd_vma off;
+ bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created;
off = h->got.offset;
BFD_ASSERT (off != (bfd_vma) -1);
- if (!elf_hash_table (info)->dynamic_sections_created ||
- (info->shared && (info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ || (info->shared
+ && (info->symbolic || h->dynindx == -1
+ || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
{
/* This is actually a static link, or it is a -Bsymbolic link
and the symbol is defined locally. We must initialize this
@@ -1948,19 +1963,16 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- while ( h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- if ( h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
+ bfd_boolean warned;
+ bfd_boolean unresolved_reloc;
+
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation,
+ sec, unresolved_reloc, info,
+ warned);
+
+ if (unresolved_reloc || relocation != 0)
{
- int relocation_needed = 1;
-
- sec = h->root.u.def.section;
-
/* In these cases, we don't need the relocation value.
We check specially because in some obscure cases
sec->output_section will be NULL. */
@@ -1983,63 +1995,39 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_DYNAMIC) != 0))
)
- relocation_needed = 0;
+ relocation = 0;
break;
case R_ARM_GOTPC:
- relocation_needed = 0;
+ relocation = 0;
break;
case R_ARM_GOT32:
- if (elf_hash_table(info)->dynamic_sections_created
- && (!info->shared
+ if ((WILL_CALL_FINISH_DYNAMIC_SYMBOL
+ (elf_hash_table (info)->dynamic_sections_created,
+ info->shared, h))
+ && (!info->shared
|| (!info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
- )
- )
- relocation_needed = 0;
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ relocation = 0;
break;
case R_ARM_PLT32:
if (h->plt.offset != (bfd_vma)-1)
- relocation_needed = 0;
+ relocation = 0;
break;
default:
- if (sec->output_section == NULL)
- {
- (*_bfd_error_handler)
- (_("%s: warning: unresolvable relocation %d against symbol `%s' from %s section"),
- bfd_archive_filename (input_bfd),
- r_type,
- h->root.root.string,
- bfd_get_section_name (input_bfd, input_section));
- relocation_needed = 0;
- }
+ if (unresolved_reloc)
+ _bfd_error_handler
+ (_("%s: warning: unresolvable relocation %d against symbol `%s' from %s section"),
+ bfd_archive_filename (input_bfd),
+ r_type,
+ h->root.root.string,
+ bfd_get_section_name (input_bfd, input_section));
+ break;
}
-
- if (relocation_needed)
- relocation = h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset;
- else
- relocation = 0;
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
- else if (info->shared && !info->symbolic
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- relocation = 0;
- else
- {
- if (!((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- relocation = 0;
}
}
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 4618a8f283..d630a2a84c 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -856,24 +856,12 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- /* It seems this can happen with erroneous or unsupported input
- (mixing a.out and elf in an archive, for example.) */
- if (sym_hashes == NULL)
- return FALSE;
-
- h = sym_hashes [r_symndx - symtab_hdr->sh_info];
-
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean warned;
+ bfd_boolean unresolved_reloc;
- symname = h->root.root.string;
-
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
+ if (unresolved_reloc
/* Perhaps we should detect the cases that
sec->output_section is expected to be NULL like i386 and
m68k, but apparently (and according to elfxx-ia64.c) all
@@ -888,46 +876,45 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
is *not* dynamically linked against. Thus this will
automatically remind us so we can see if there are other
valid cases we need to revisit. */
- if ((sec->output_section == NULL
- && (sec->owner->flags & DYNAMIC) != 0)
-
- /* Here follow the cases where the relocation value must
- be zero (or when further handling is simplified when
- zero). I can't claim to understand the various
- conditions and they weren't described in the files
- where I copied them from (elf32-m68k.c and
- elf32-i386.c), but let's mention examples of where
- they happen. FIXME: Perhaps define and use a
- dynamic_symbol_p function like ia64.
-
- - When creating a shared library, we can have an
- ordinary relocation for a symbol defined in a shared
- library (perhaps the one we create). We then make
- the relocation value zero, as the value seen now will
- be added into the relocation addend in this shared
- library, but must be handled only at dynamic-link
- time. FIXME: Not sure this example covers the
- h->elf_link_hash_flags test, though it's there in
- other targets. */
- || (info->shared
- && ((! info->symbolic && h->dynindx != -1)
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0)
- && (input_section->flags & SEC_ALLOC) != 0
- && (r_type == R_CRIS_8
- || r_type == R_CRIS_16
- || r_type == R_CRIS_32
- || r_type == R_CRIS_8_PCREL
- || r_type == R_CRIS_16_PCREL
- || r_type == R_CRIS_32_PCREL)))
+ && (sec->owner->flags & DYNAMIC) != 0)
+ relocation = 0;
+
+ else if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ /* Here follow the cases where the relocation value must
+ be zero (or when further handling is simplified when
+ zero). I can't claim to understand the various
+ conditions and they weren't described in the files
+ where I copied them from (elf32-m68k.c and
+ elf32-i386.c), but let's mention examples of where
+ they happen. FIXME: Perhaps define and use a
+ dynamic_symbol_p function like ia64.
+
+ - When creating a shared library, we can have an
+ ordinary relocation for a symbol defined in a shared
+ library (perhaps the one we create). We then make
+ the relocation value zero, as the value seen now will
+ be added into the relocation addend in this shared
+ library, but must be handled only at dynamic-link
+ time. FIXME: Not sure this example covers the
+ h->elf_link_hash_flags test, though it's there in
+ other targets. */
+ if (info->shared
+ && ((! info->symbolic && h->dynindx != -1)
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && (input_section->flags & SEC_ALLOC) != 0
+ && (r_type == R_CRIS_8
+ || r_type == R_CRIS_16
+ || r_type == R_CRIS_32
+ || r_type == R_CRIS_8_PCREL
+ || r_type == R_CRIS_16_PCREL
+ || r_type == R_CRIS_32_PCREL))
relocation = 0;
- else if (sec->output_section != NULL)
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- else
+ else if (unresolved_reloc)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%s: unresolvable relocation %s against symbol `%s' from %s section"),
bfd_archive_filename (input_bfd),
cris_elf_howto_table[r_type].name,
@@ -937,22 +924,6 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
return FALSE;
}
}
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
- else if (info->shared
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- relocation = 0;
- else
- {
- if (!(info->callbacks->undefined_symbol
- (info, symname, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- relocation = 0;
- }
}
switch (r_type)
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 19fb324576..faa1401a53 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -724,9 +724,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = (sec->output_section->vma
- + sec->output_offset
- + sym->st_value);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index ca3e8e12c9..be0727f46b 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -203,10 +203,6 @@ struct elf32_hppa_link_hash_entry {
#endif
} *dyn_relocs;
- /* Set if the only reason we need a .plt entry is for a non-PIC to
- PIC function call. */
- unsigned int pic_call:1;
-
/* Set if this symbol is used by a plabel reloc. */
unsigned int plabel:1;
};
@@ -223,8 +219,8 @@ struct elf32_hppa_link_hash_table {
bfd *stub_bfd;
/* Linker call-backs. */
- asection * (*add_stub_section) PARAMS ((const char *, asection *));
- void (*layout_sections_again) PARAMS ((void));
+ asection * (*add_stub_section) (const char *, asection *);
+ void (*layout_sections_again) (void);
/* Array to keep track of which stub sections have been created, and
information on stub grouping. */
@@ -279,139 +275,14 @@ struct elf32_hppa_link_hash_table {
((struct elf32_hppa_stub_hash_entry *) \
bfd_hash_lookup ((table), (string), (create), (copy)))
-static struct bfd_hash_entry *stub_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-
-static struct bfd_hash_entry *hppa_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-
-static struct bfd_link_hash_table *elf32_hppa_link_hash_table_create
- PARAMS ((bfd *));
-
-static void elf32_hppa_link_hash_table_free
- PARAMS ((struct bfd_link_hash_table *));
-
-/* Stub handling functions. */
-static char *hppa_stub_name
- PARAMS ((const asection *, const asection *,
- const struct elf32_hppa_link_hash_entry *,
- const Elf_Internal_Rela *));
-
-static struct elf32_hppa_stub_hash_entry *hppa_get_stub_entry
- PARAMS ((const asection *, const asection *,
- struct elf32_hppa_link_hash_entry *,
- const Elf_Internal_Rela *,
- struct elf32_hppa_link_hash_table *));
-
-static struct elf32_hppa_stub_hash_entry *hppa_add_stub
- PARAMS ((const char *, asection *, struct elf32_hppa_link_hash_table *));
-
-static enum elf32_hppa_stub_type hppa_type_of_stub
- PARAMS ((asection *, const Elf_Internal_Rela *,
- struct elf32_hppa_link_hash_entry *, bfd_vma));
-
-static bfd_boolean hppa_build_one_stub
- PARAMS ((struct bfd_hash_entry *, PTR));
-
-static bfd_boolean hppa_size_one_stub
- PARAMS ((struct bfd_hash_entry *, PTR));
-
-/* BFD and elf backend functions. */
-static bfd_boolean elf32_hppa_object_p PARAMS ((bfd *));
-
-static bfd_boolean elf32_hppa_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
-
-static bfd_boolean elf32_hppa_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static void elf32_hppa_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
- struct elf_link_hash_entry *));
-
-static bfd_boolean elf32_hppa_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *,
- asection *, const Elf_Internal_Rela *));
-
-static asection *elf32_hppa_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-
-static bfd_boolean elf32_hppa_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *,
- asection *, const Elf_Internal_Rela *));
-
-static void elf32_hppa_hide_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
-
-static bfd_boolean elf32_hppa_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-
-static bfd_boolean mark_PIC_calls
- PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean allocate_plt_static
- PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean readonly_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-
-static bfd_boolean clobber_millicode_symbols
- PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *));
-
-static bfd_boolean elf32_hppa_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static void group_sections
- PARAMS ((struct elf32_hppa_link_hash_table *, bfd_size_type, bfd_boolean));
-
-static int get_local_syms
- PARAMS ((bfd *, bfd *, struct bfd_link_info *));
-
-static bfd_boolean elf32_hppa_final_link
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static void hppa_record_segment_addr
- PARAMS ((bfd *, asection *, PTR));
-
-static bfd_reloc_status_type final_link_relocate
- PARAMS ((asection *, bfd_byte *, const Elf_Internal_Rela *,
- bfd_vma, struct elf32_hppa_link_hash_table *, asection *,
- struct elf32_hppa_link_hash_entry *));
-
-static bfd_boolean elf32_hppa_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-
-static bfd_boolean elf32_hppa_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-
-static enum elf_reloc_type_class elf32_hppa_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-
-static bfd_boolean elf32_hppa_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static void elf32_hppa_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-
-static int elf32_hppa_elf_get_symbol_type
- PARAMS ((Elf_Internal_Sym *, int));
-
/* Assorted hash table functions. */
/* Initialize an entry in the stub hash table. */
static struct bfd_hash_entry *
-stub_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+stub_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
@@ -446,10 +317,9 @@ stub_hash_newfunc (entry, table, string)
/* Initialize an entry in the link hash table. */
static struct bfd_hash_entry *
-hppa_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+hppa_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
@@ -471,7 +341,6 @@ hppa_link_hash_newfunc (entry, table, string)
eh = (struct elf32_hppa_link_hash_entry *) entry;
eh->stub_cache = NULL;
eh->dyn_relocs = NULL;
- eh->pic_call = 0;
eh->plabel = 0;
}
@@ -483,13 +352,12 @@ hppa_link_hash_newfunc (entry, table, string)
using static variables). */
static struct bfd_link_hash_table *
-elf32_hppa_link_hash_table_create (abfd)
- bfd *abfd;
+elf32_hppa_link_hash_table_create (bfd *abfd)
{
struct elf32_hppa_link_hash_table *ret;
bfd_size_type amt = sizeof (*ret);
- ret = (struct elf32_hppa_link_hash_table *) bfd_malloc (amt);
+ ret = bfd_malloc (amt);
if (ret == NULL)
return NULL;
@@ -528,8 +396,7 @@ elf32_hppa_link_hash_table_create (abfd)
/* Free the derived linker hash table. */
static void
-elf32_hppa_link_hash_table_free (hash)
- struct bfd_link_hash_table *hash;
+elf32_hppa_link_hash_table_free (struct bfd_link_hash_table *hash)
{
struct elf32_hppa_link_hash_table *ret
= (struct elf32_hppa_link_hash_table *) hash;
@@ -541,11 +408,10 @@ elf32_hppa_link_hash_table_free (hash)
/* Build a name for an entry in the stub hash table. */
static char *
-hppa_stub_name (input_section, sym_sec, hash, rel)
- const asection *input_section;
- const asection *sym_sec;
- const struct elf32_hppa_link_hash_entry *hash;
- const Elf_Internal_Rela *rel;
+hppa_stub_name (const asection *input_section,
+ const asection *sym_sec,
+ const struct elf32_hppa_link_hash_entry *hash,
+ const Elf_Internal_Rela *rel)
{
char *stub_name;
bfd_size_type len;
@@ -582,12 +448,11 @@ hppa_stub_name (input_section, sym_sec, hash, rel)
creating the stub name takes a bit of time. */
static struct elf32_hppa_stub_hash_entry *
-hppa_get_stub_entry (input_section, sym_sec, hash, rel, htab)
- const asection *input_section;
- const asection *sym_sec;
- struct elf32_hppa_link_hash_entry *hash;
- const Elf_Internal_Rela *rel;
- struct elf32_hppa_link_hash_table *htab;
+hppa_get_stub_entry (const asection *input_section,
+ const asection *sym_sec,
+ struct elf32_hppa_link_hash_entry *hash,
+ const Elf_Internal_Rela *rel,
+ struct elf32_hppa_link_hash_table *htab)
{
struct elf32_hppa_stub_hash_entry *stub_entry;
const asection *id_sec;
@@ -628,10 +493,9 @@ hppa_get_stub_entry (input_section, sym_sec, hash, rel, htab)
stub entry are initialised. */
static struct elf32_hppa_stub_hash_entry *
-hppa_add_stub (stub_name, section, htab)
- const char *stub_name;
- asection *section;
- struct elf32_hppa_link_hash_table *htab;
+hppa_add_stub (const char *stub_name,
+ asection *section,
+ struct elf32_hppa_link_hash_table *htab)
{
asection *link_sec;
asection *stub_sec;
@@ -684,11 +548,11 @@ hppa_add_stub (stub_name, section, htab)
/* Determine the type of stub needed, if any, for a call. */
static enum elf32_hppa_stub_type
-hppa_type_of_stub (input_sec, rel, hash, destination)
- asection *input_sec;
- const Elf_Internal_Rela *rel;
- struct elf32_hppa_link_hash_entry *hash;
- bfd_vma destination;
+hppa_type_of_stub (asection *input_sec,
+ const Elf_Internal_Rela *rel,
+ struct elf32_hppa_link_hash_entry *hash,
+ bfd_vma destination,
+ struct bfd_link_info *info)
{
bfd_vma location;
bfd_vma branch_offset;
@@ -697,8 +561,11 @@ hppa_type_of_stub (input_sec, rel, hash, destination)
if (hash != NULL
&& hash->elf.plt.offset != (bfd_vma) -1
- && (hash->elf.dynindx != -1 || hash->pic_call)
- && !hash->plabel)
+ && hash->elf.dynindx != -1
+ && !hash->plabel
+ && (info->shared
+ || !(hash->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+ || hash->elf.root.type == bfd_link_hash_defweak))
{
/* We need an import stub. Decide between hppa_stub_import
and hppa_stub_import_shared later. */
@@ -777,9 +644,7 @@ hppa_type_of_stub (input_sec, rel, hash, destination)
#endif
static bfd_boolean
-hppa_build_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg;
+hppa_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
struct elf32_hppa_stub_hash_entry *stub_entry;
struct bfd_link_info *info;
@@ -795,7 +660,7 @@ hppa_build_one_stub (gen_entry, in_arg)
/* Massage our args to the form they really have. */
stub_entry = (struct elf32_hppa_stub_hash_entry *) gen_entry;
- info = (struct bfd_link_info *) in_arg;
+ info = in_arg;
htab = hppa_link_hash_table (info);
stub_sec = stub_entry->stub_sec;
@@ -817,11 +682,11 @@ hppa_build_one_stub (gen_entry, in_arg)
+ stub_entry->target_section->output_offset
+ stub_entry->target_section->output_section->vma);
- val = hppa_field_adjust (sym_value, (bfd_signed_vma) 0, e_lrsel);
+ val = hppa_field_adjust (sym_value, 0, e_lrsel);
insn = hppa_rebuild_insn ((int) LDIL_R1, val, 21);
bfd_put_32 (stub_bfd, insn, loc);
- val = hppa_field_adjust (sym_value, (bfd_signed_vma) 0, e_rrsel) >> 2;
+ val = hppa_field_adjust (sym_value, 0, e_rrsel) >> 2;
insn = hppa_rebuild_insn ((int) BE_SR4_R1, val, 17);
bfd_put_32 (stub_bfd, insn, loc + 4);
@@ -867,7 +732,7 @@ hppa_build_one_stub (gen_entry, in_arg)
if (stub_entry->stub_type == hppa_stub_import_shared)
insn = ADDIL_R19;
#endif
- val = hppa_field_adjust (sym_value, (bfd_signed_vma) 0, e_lrsel),
+ val = hppa_field_adjust (sym_value, 0, e_lrsel),
insn = hppa_rebuild_insn ((int) insn, val, 21);
bfd_put_32 (stub_bfd, insn, loc);
@@ -876,7 +741,7 @@ hppa_build_one_stub (gen_entry, in_arg)
lsel/rsel then with unfortunate sym_values we will round
sym_value+4 up to the next 2k block leading to a mis-match
between the lsel and rsel value. */
- val = hppa_field_adjust (sym_value, (bfd_signed_vma) 0, e_rrsel);
+ val = hppa_field_adjust (sym_value, 0, e_rrsel);
insn = hppa_rebuild_insn ((int) LDW_R1_R21, val, 14);
bfd_put_32 (stub_bfd, insn, loc + 4);
@@ -903,39 +768,6 @@ hppa_build_one_stub (gen_entry, in_arg)
size = 16;
}
- if (!info->shared
- && stub_entry->h != NULL
- && stub_entry->h->pic_call)
- {
- /* Build the .plt entry needed to call a PIC function from
- statically linked code. We don't need any relocs. */
- bfd *dynobj;
- struct elf32_hppa_link_hash_entry *eh;
- bfd_vma value;
-
- dynobj = htab->elf.dynobj;
- eh = (struct elf32_hppa_link_hash_entry *) stub_entry->h;
-
- if (eh->elf.root.type != bfd_link_hash_defined
- && eh->elf.root.type != bfd_link_hash_defweak)
- abort ();
-
- value = (eh->elf.root.u.def.value
- + eh->elf.root.u.def.section->output_offset
- + eh->elf.root.u.def.section->output_section->vma);
-
- /* Fill in the entry in the procedure linkage table.
-
- The format of a plt entry is
- <funcaddr>
- <__gp>. */
-
- bfd_put_32 (htab->splt->owner, value,
- htab->splt->contents + off);
- value = elf_gp (htab->splt->output_section->owner);
- bfd_put_32 (htab->splt->owner, value,
- htab->splt->contents + off + 4);
- }
break;
case hppa_stub_export:
@@ -997,7 +829,6 @@ hppa_build_one_stub (gen_entry, in_arg)
#undef BL_R1
#undef ADDIL_R1
#undef DEPI_R1
-#undef ADDIL_DP
#undef LDW_R1_R21
#undef LDW_R1_DLT
#undef LDW_R1_R19
@@ -1018,9 +849,7 @@ hppa_build_one_stub (gen_entry, in_arg)
we know stub section sizes. */
static bfd_boolean
-hppa_size_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg;
+hppa_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
struct elf32_hppa_stub_hash_entry *stub_entry;
struct elf32_hppa_link_hash_table *htab;
@@ -1028,7 +857,7 @@ hppa_size_one_stub (gen_entry, in_arg)
/* Massage our args to the form they really have. */
stub_entry = (struct elf32_hppa_stub_hash_entry *) gen_entry;
- htab = (struct elf32_hppa_link_hash_table *) in_arg;
+ htab = in_arg;
if (stub_entry->stub_type == hppa_stub_long_branch)
size = 8;
@@ -1052,8 +881,7 @@ hppa_size_one_stub (gen_entry, in_arg)
Additionally we set the default architecture and machine. */
static bfd_boolean
-elf32_hppa_object_p (abfd)
- bfd *abfd;
+elf32_hppa_object_p (bfd *abfd)
{
Elf_Internal_Ehdr * i_ehdrp;
unsigned int flags;
@@ -1061,7 +889,10 @@ elf32_hppa_object_p (abfd)
i_ehdrp = elf_elfheader (abfd);
if (strcmp (bfd_get_target (abfd), "elf32-hppa-linux") == 0)
{
- if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX)
+ /* GCC on hppa-linux produces binaries with OSABI=Linux,
+ but the kernel produces corefiles with OSABI=SysV. */
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX &&
+ i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
return FALSE;
}
else
@@ -1085,30 +916,11 @@ elf32_hppa_object_p (abfd)
return TRUE;
}
-/* Undo the generic ELF code's subtraction of section->vma from the
- value of each external symbol. */
-
-static bfd_boolean
-elf32_hppa_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- const Elf_Internal_Sym *sym ATTRIBUTE_UNUSED;
- const char **namep ATTRIBUTE_UNUSED;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp;
- bfd_vma *valp;
-{
- *valp += (*secp)->vma;
- return TRUE;
-}
-
/* Create the .plt and .got sections, and set up our hash table
short-cuts to various dynamic sections. */
static bfd_boolean
-elf32_hppa_create_dynamic_sections (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+elf32_hppa_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
struct elf32_hppa_link_hash_table *htab;
@@ -1146,9 +958,9 @@ elf32_hppa_create_dynamic_sections (abfd, info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf32_hppa_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
- struct elf_link_hash_entry *dir, *ind;
+elf32_hppa_copy_indirect_symbol (const struct elf_backend_data *bed,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
struct elf32_hppa_link_hash_entry *edir, *eind;
@@ -1200,11 +1012,10 @@ elf32_hppa_copy_indirect_symbol (bed, dir, ind)
necessarily read all the input files. */
static bfd_boolean
-elf32_hppa_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf32_hppa_check_relocs (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -1254,9 +1065,6 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
case R_PARISC_DLTIND21L:
/* This symbol requires a global offset table entry. */
need_entry = NEED_GOT;
-
- /* Mark this section as containing PIC code. */
- sec->flags |= SEC_HAS_GOT_REF;
break;
case R_PARISC_PLABEL14R: /* "Official" procedure labels. */
@@ -1422,8 +1230,7 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
pointer. */
size = symtab_hdr->sh_info;
size *= 2 * sizeof (bfd_signed_vma);
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
+ local_got_refcounts = bfd_zalloc (abfd, size);
if (local_got_refcounts == NULL)
return FALSE;
elf_local_got_refcounts (abfd) = local_got_refcounts;
@@ -1469,8 +1276,7 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
plt offsets. */
size = symtab_hdr->sh_info;
size *= 2 * sizeof (bfd_signed_vma);
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
+ local_got_refcounts = bfd_zalloc (abfd, size);
if (local_got_refcounts == NULL)
return FALSE;
elf_local_got_refcounts (abfd) = local_got_refcounts;
@@ -1604,9 +1410,7 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
p = *head;
if (p == NULL || p->sec != sec)
{
- p = ((struct elf32_hppa_dyn_reloc_entry *)
- bfd_alloc (htab->elf.dynobj,
- (bfd_size_type) sizeof *p));
+ p = bfd_alloc (htab->elf.dynobj, sizeof *p);
if (p == NULL)
return FALSE;
p->next = *head;
@@ -1634,12 +1438,11 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
for a given relocation. */
static asection *
-elf32_hppa_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf32_hppa_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
if (h != NULL)
{
@@ -1674,11 +1477,10 @@ elf32_hppa_gc_mark_hook (sec, info, rel, h, sym)
removed. */
static bfd_boolean
-elf32_hppa_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf32_hppa_gc_sweep_hook (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -1777,10 +1579,9 @@ elf32_hppa_gc_sweep_hook (abfd, info, sec, relocs)
plabels. */
static void
-elf32_hppa_hide_symbol (info, h, force_local)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- bfd_boolean force_local;
+elf32_hppa_hide_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ bfd_boolean force_local)
{
if (force_local)
{
@@ -1818,9 +1619,8 @@ elf32_hppa_hide_symbol (info, h, force_local)
understand. */
static bfd_boolean
-elf32_hppa_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
+elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
struct elf32_hppa_link_hash_table *htab;
struct elf32_hppa_link_hash_entry *eh;
@@ -1847,18 +1647,8 @@ elf32_hppa_adjust_dynamic_symbol (info, h)
used by a plabel relocation. Either this object is the
application or we are doing a shared symbolic link. */
- /* As a special sop to the hppa ABI, we keep a .plt entry
- for functions in sections containing PIC code. */
- if (!info->shared
- && h->plt.refcount > 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- && (h->root.u.def.section->flags & SEC_HAS_GOT_REF) != 0)
- ((struct elf32_hppa_link_hash_entry *) h)->pic_call = 1;
- else
- {
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- }
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
}
return TRUE;
@@ -1958,41 +1748,11 @@ elf32_hppa_adjust_dynamic_symbol (info, h)
return TRUE;
}
-/* Called via elf_link_hash_traverse to create .plt entries for an
- application that uses statically linked PIC functions. Similar to
- the first part of elf32_hppa_adjust_dynamic_symbol. */
-
-static bfd_boolean
-mark_PIC_calls (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf ATTRIBUTE_UNUSED;
-{
- if (h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- if (! (h->plt.refcount > 0
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && (h->root.u.def.section->flags & SEC_HAS_GOT_REF) != 0))
- {
- h->plt.offset = (bfd_vma) -1;
- h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- return TRUE;
- }
-
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- ((struct elf32_hppa_link_hash_entry *) h)->pic_call = 1;
-
- return TRUE;
-}
-
/* Allocate space in the .plt for entries that won't have relocations.
- ie. pic_call and plabel entries. */
+ ie. plabel entries. */
static bfd_boolean
-allocate_plt_static (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+allocate_plt_static (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct elf32_hppa_link_hash_table *htab;
@@ -2004,18 +1764,9 @@ allocate_plt_static (h, inf)
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- info = (struct bfd_link_info *) inf;
+ info = inf;
htab = hppa_link_hash_table (info);
- if (((struct elf32_hppa_link_hash_entry *) h)->pic_call)
- {
- /* Make an entry in the .plt section for non-pic code that is
- calling pic code. */
- ((struct elf32_hppa_link_hash_entry *) h)->plabel = 0;
- s = htab->splt;
- h->plt.offset = s->_raw_size;
- s->_raw_size += PLT_ENTRY_SIZE;
- }
- else if (htab->elf.dynamic_sections_created
+ if (htab->elf.dynamic_sections_created
&& h->plt.refcount > 0)
{
/* Make sure this symbol is output as a dynamic symbol.
@@ -2064,9 +1815,7 @@ allocate_plt_static (h, inf)
global syms. */
static bfd_boolean
-allocate_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct elf32_hppa_link_hash_table *htab;
@@ -2080,11 +1829,10 @@ allocate_dynrelocs (h, inf)
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- info = (struct bfd_link_info *) inf;
+ info = inf;
htab = hppa_link_hash_table (info);
if (htab->elf.dynamic_sections_created
&& h->plt.offset != (bfd_vma) -1
- && !((struct elf32_hppa_link_hash_entry *) h)->pic_call
&& !((struct elf32_hppa_link_hash_entry *) h)->plabel)
{
/* Make an entry in the .plt section. */
@@ -2205,9 +1953,8 @@ allocate_dynrelocs (h, inf)
elf_adjust_dynamic_symbol. */
static bfd_boolean
-clobber_millicode_symbols (h, info)
- struct elf_link_hash_entry *h;
- struct bfd_link_info *info;
+clobber_millicode_symbols (struct elf_link_hash_entry *h,
+ struct bfd_link_info *info)
{
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
@@ -2223,9 +1970,7 @@ clobber_millicode_symbols (h, info)
/* Find any dynamic relocs that apply to read-only sections. */
static bfd_boolean
-readonly_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct elf32_hppa_link_hash_entry *eh;
struct elf32_hppa_dyn_reloc_entry *p;
@@ -2240,7 +1985,7 @@ readonly_dynrelocs (h, inf)
if (s != NULL && (s->flags & SEC_READONLY) != 0)
{
- struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ struct bfd_link_info *info = inf;
info->flags |= DF_TEXTREL;
@@ -2254,9 +1999,8 @@ readonly_dynrelocs (h, inf)
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-elf32_hppa_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
struct elf32_hppa_link_hash_table *htab;
bfd *dynobj;
@@ -2286,14 +2030,6 @@ elf32_hppa_size_dynamic_sections (output_bfd, info)
clobber_millicode_symbols,
info);
}
- else
- {
- /* Run through the function symbols, looking for any that are
- PIC, and mark them as needing .plt entries so that %r19 will
- be set up. */
- if (! info->shared)
- elf_link_hash_traverse (&htab->elf, mark_PIC_calls, (PTR) info);
- }
/* Set up .got and .plt offsets for local syms, and space for local
dynamic relocs. */
@@ -2389,11 +2125,11 @@ elf32_hppa_size_dynamic_sections (output_bfd, info)
/* Do all the .plt entries without relocs first. The dynamic linker
uses the last .plt reloc to find the end of the .plt (and hence
the start of the .got) for lazy linking. */
- elf_link_hash_traverse (&htab->elf, allocate_plt_static, (PTR) info);
+ elf_link_hash_traverse (&htab->elf, allocate_plt_static, info);
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
- elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
@@ -2460,7 +2196,7 @@ elf32_hppa_size_dynamic_sections (output_bfd, info)
/* Allocate memory for the section contents. Zero it, because
we may not fill in all the reloc sections. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
return FALSE;
}
@@ -2506,8 +2242,7 @@ elf32_hppa_size_dynamic_sections (output_bfd, info)
/* If any dynamic relocs apply to a read-only section,
then we need a DT_TEXTREL entry. */
if ((info->flags & DF_TEXTREL) == 0)
- elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
- (PTR) info);
+ elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
if ((info->flags & DF_TEXTREL) != 0)
{
@@ -2528,9 +2263,7 @@ elf32_hppa_size_dynamic_sections (output_bfd, info)
0 when no stubs will be needed, and 1 on success. */
int
-elf32_hppa_setup_section_lists (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+elf32_hppa_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
{
bfd *input_bfd;
unsigned int bfd_count;
@@ -2560,7 +2293,7 @@ elf32_hppa_setup_section_lists (output_bfd, info)
htab->bfd_count = bfd_count;
amt = sizeof (struct map_stub) * (top_id + 1);
- htab->stub_group = (struct map_stub *) bfd_zmalloc (amt);
+ htab->stub_group = bfd_zmalloc (amt);
if (htab->stub_group == NULL)
return -1;
@@ -2577,7 +2310,7 @@ elf32_hppa_setup_section_lists (output_bfd, info)
htab->top_index = top_index;
amt = sizeof (asection *) * (top_index + 1);
- input_list = (asection **) bfd_malloc (amt);
+ input_list = bfd_malloc (amt);
htab->input_list = input_list;
if (input_list == NULL)
return -1;
@@ -2606,9 +2339,7 @@ elf32_hppa_setup_section_lists (output_bfd, info)
we may insert linker stubs. */
void
-elf32_hppa_next_input_section (info, isec)
- struct bfd_link_info *info;
- asection *isec;
+elf32_hppa_next_input_section (struct bfd_link_info *info, asection *isec)
{
struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
@@ -2635,10 +2366,9 @@ elf32_hppa_next_input_section (info, isec)
the middle of a function is not a good idea. */
static void
-group_sections (htab, stub_group_size, stubs_always_before_branch)
- struct elf32_hppa_link_hash_table *htab;
- bfd_size_type stub_group_size;
- bfd_boolean stubs_always_before_branch;
+group_sections (struct elf32_hppa_link_hash_table *htab,
+ bfd_size_type stub_group_size,
+ bfd_boolean stubs_always_before_branch)
{
asection **list = htab->input_list + htab->top_index;
do
@@ -2716,10 +2446,7 @@ group_sections (htab, stub_group_size, stubs_always_before_branch)
Returns -1 on error, 1 if export stubs created, 0 otherwise. */
static int
-get_local_syms (output_bfd, input_bfd, info)
- bfd *output_bfd;
- bfd *input_bfd;
- struct bfd_link_info *info;
+get_local_syms (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info)
{
unsigned int bfd_indx;
Elf_Internal_Sym *local_syms, **all_local_syms;
@@ -2730,7 +2457,7 @@ get_local_syms (output_bfd, input_bfd, info)
we need to read in the local symbols in parallel and save them for
later use; so hold pointers to the local symbols in an array. */
bfd_size_type amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
- all_local_syms = (Elf_Internal_Sym **) bfd_zmalloc (amt);
+ all_local_syms = bfd_zmalloc (amt);
htab->all_local_syms = all_local_syms;
if (all_local_syms == NULL)
return -1;
@@ -2844,15 +2571,11 @@ get_local_syms (output_bfd, input_bfd, info)
instruction. */
bfd_boolean
-elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
- add_stub_section, layout_sections_again)
- bfd *output_bfd;
- bfd *stub_bfd;
- struct bfd_link_info *info;
- bfd_boolean multi_subspace;
- bfd_signed_vma group_size;
- asection * (*add_stub_section) PARAMS ((const char *, asection *));
- void (*layout_sections_again) PARAMS ((void));
+elf32_hppa_size_stubs
+ (bfd *output_bfd, bfd *stub_bfd, struct bfd_link_info *info,
+ bfd_boolean multi_subspace, bfd_signed_vma group_size,
+ asection * (*add_stub_section) (const char *, asection *),
+ void (*layout_sections_again) (void))
{
bfd_size_type stub_group_size;
bfd_boolean stubs_always_before_branch;
@@ -2950,8 +2673,7 @@ elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
/* Get the relocs. */
internal_relocs
- = _bfd_elf_link_read_relocs (input_bfd, section, NULL,
- (Elf_Internal_Rela *) NULL,
+ = _bfd_elf_link_read_relocs (input_bfd, section, NULL, NULL,
info->keep_memory);
if (internal_relocs == NULL)
goto error_ret_free_local;
@@ -3042,7 +2764,7 @@ elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
else if (hash->elf.root.type == bfd_link_hash_undefined)
{
if (! (info->shared
- && !info->no_undefined
+ && info->unresolved_syms_in_objects == RM_IGNORE
&& (ELF_ST_VISIBILITY (hash->elf.other)
== STV_DEFAULT)
&& hash->elf.type != STT_PARISC_MILLI))
@@ -3057,7 +2779,7 @@ elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
/* Determine what (if any) linker stub is needed. */
stub_type = hppa_type_of_stub (section, irela, hash,
- destination);
+ destination, info);
if (stub_type == hppa_stub_none)
continue;
@@ -3138,9 +2860,7 @@ elf32_hppa_size_stubs (output_bfd, stub_bfd, info, multi_subspace, group_size,
stubs to provide a value for __gp. */
bfd_boolean
-elf32_hppa_set_gp (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info)
{
struct bfd_link_hash_entry *h;
asection *sec = NULL;
@@ -3234,8 +2954,7 @@ elf32_hppa_set_gp (abfd, info)
linker. */
bfd_boolean
-elf32_hppa_build_stubs (info)
- struct bfd_link_info *info;
+elf32_hppa_build_stubs (struct bfd_link_info *info)
{
asection *stub_sec;
struct bfd_hash_table *table;
@@ -3251,7 +2970,7 @@ elf32_hppa_build_stubs (info)
/* Allocate memory to hold the linker stubs. */
size = stub_sec->_raw_size;
- stub_sec->contents = (unsigned char *) bfd_zalloc (htab->stub_bfd, size);
+ stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
if (stub_sec->contents == NULL && size != 0)
return FALSE;
stub_sec->_raw_size = 0;
@@ -3267,9 +2986,7 @@ elf32_hppa_build_stubs (info)
/* Perform a final link. */
static bfd_boolean
-elf32_hppa_final_link (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+elf32_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
{
/* Invoke the regular ELF linker to do all the work. */
if (!bfd_elf32_bfd_final_link (abfd, info))
@@ -3283,10 +3000,9 @@ elf32_hppa_final_link (abfd, info)
/* Record the lowest address for the data and text segments. */
static void
-hppa_record_segment_addr (abfd, section, data)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *section;
- PTR data;
+hppa_record_segment_addr (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section,
+ void *data)
{
struct elf32_hppa_link_hash_table *htab;
@@ -3312,17 +3028,18 @@ hppa_record_segment_addr (abfd, section, data)
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
-final_link_relocate (input_section, contents, rel, value, htab, sym_sec, h)
- asection *input_section;
- bfd_byte *contents;
- const Elf_Internal_Rela *rel;
- bfd_vma value;
- struct elf32_hppa_link_hash_table *htab;
- asection *sym_sec;
- struct elf32_hppa_link_hash_entry *h;
+final_link_relocate (asection *input_section,
+ bfd_byte *contents,
+ const Elf_Internal_Rela *rel,
+ bfd_vma value,
+ struct elf32_hppa_link_hash_table *htab,
+ asection *sym_sec,
+ struct elf32_hppa_link_hash_entry *h,
+ struct bfd_link_info *info)
{
int insn;
unsigned int r_type = ELF32_R_TYPE (rel->r_info);
+ unsigned int orig_r_type = r_type;
reloc_howto_type *howto = elf_hppa_howto_table + r_type;
int r_format = howto->bitsize;
enum hppa_reloc_field_selector_type_alt r_field;
@@ -3345,6 +3062,26 @@ final_link_relocate (input_section, contents, rel, value, htab, sym_sec, h)
input_section->output_offset +
input_section->output_section->vma);
+ /* If we are not building a shared library, convert DLTIND relocs to
+ DPREL relocs. */
+ if (!info->shared)
+ {
+ switch (r_type)
+ {
+ case R_PARISC_DLTIND21L:
+ r_type = R_PARISC_DPREL21L;
+ break;
+
+ case R_PARISC_DLTIND14R:
+ r_type = R_PARISC_DPREL14R;
+ break;
+
+ case R_PARISC_DLTIND14F:
+ r_type = R_PARISC_DPREL14F;
+ break;
+ }
+ }
+
switch (r_type)
{
case R_PARISC_PCREL12F:
@@ -3356,8 +3093,11 @@ final_link_relocate (input_section, contents, rel, value, htab, sym_sec, h)
|| sym_sec->output_section == NULL
|| (h != NULL
&& h->elf.plt.offset != (bfd_vma) -1
- && (h->elf.dynindx != -1 || h->pic_call)
- && !h->plabel))
+ && h->elf.dynindx != -1
+ && !h->plabel
+ && (info->shared
+ || !(h->elf.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
+ || h->elf.root.type == bfd_link_hash_defweak)))
{
stub_entry = hppa_get_stub_entry (input_section, sym_sec,
h, rel, htab);
@@ -3397,6 +3137,38 @@ final_link_relocate (input_section, contents, rel, value, htab, sym_sec, h)
case R_PARISC_DPREL21L:
case R_PARISC_DPREL14R:
case R_PARISC_DPREL14F:
+ /* Convert instructions that use the linkage table pointer (r19) to
+ instructions that use the global data pointer (dp). This is the
+ most efficient way of using PIC code in an incomplete executable,
+ but the user must follow the standard runtime conventions for
+ accessing data for this to work. */
+ if (orig_r_type == R_PARISC_DLTIND21L)
+ {
+ /* Convert addil instructions if the original reloc was a
+ DLTIND21L. GCC sometimes uses a register other than r19 for
+ the operation, so we must convert any addil instruction
+ that uses this relocation. */
+ if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26))
+ insn = ADDIL_DP;
+ else
+ /* We must have a ldil instruction. It's too hard to find
+ and convert the associated add instruction, so issue an
+ error. */
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
+ bfd_archive_filename (input_bfd),
+ input_section->name,
+ (long) rel->r_offset,
+ howto->name,
+ insn);
+ }
+ else if (orig_r_type == R_PARISC_DLTIND14F)
+ {
+ /* This must be a format 1 load/store. Change the base
+ register to dp. */
+ insn = (insn & 0xfc1ffff) | (27 << 21);
+ }
+
/* For all the DP relative relocations, we need to examine the symbol's
section. If it has no section or if it's a code section, then
"data pointer relative" makes no sense. In that case we don't
@@ -3576,16 +3348,14 @@ final_link_relocate (input_section, contents, rel, value, htab, sym_sec, h)
/* Relocate an HPPA ELF section. */
static bfd_boolean
-elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+elf32_hppa_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
{
bfd_vma *local_got_offsets;
struct elf32_hppa_link_hash_table *htab;
@@ -3642,43 +3412,33 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- int indx;
-
- /* It's a global; Find its entry in the link hash. */
- indx = r_symndx - symtab_hdr->sh_info;
- h = ((struct elf32_hppa_link_hash_entry *)
- elf_sym_hashes (input_bfd)[indx]);
- while (h->elf.root.type == bfd_link_hash_indirect
- || h->elf.root.type == bfd_link_hash_warning)
- h = (struct elf32_hppa_link_hash_entry *) h->elf.root.u.i.link;
-
- relocation = 0;
- if (h->elf.root.type == bfd_link_hash_defined
- || h->elf.root.type == bfd_link_hash_defweak)
- {
- sym_sec = h->elf.root.u.def.section;
- /* If sym_sec->output_section is NULL, then it's a
- symbol defined in a shared library. */
- if (sym_sec->output_section != NULL)
- relocation = (h->elf.root.u.def.value
- + sym_sec->output_offset
- + sym_sec->output_section->vma);
- }
- else if (h->elf.root.type == bfd_link_hash_undefweak)
- ;
- else if (info->shared
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
- && h->elf.type != STT_PARISC_MILLI)
- ;
- else
- {
- if (!((*info->callbacks->undefined_symbol)
- (info, h->elf.root.root.string, input_bfd,
- input_section, rel->r_offset, TRUE)))
- return FALSE;
- warned_undef = TRUE;
+ struct elf_link_hash_entry *hh;
+ bfd_boolean unresolved_reloc;
+
+ RELOC_FOR_GLOBAL_SYMBOL (hh, elf_sym_hashes (input_bfd), r_symndx, symtab_hdr,
+ relocation, sym_sec, unresolved_reloc, info,
+ warned_undef);
+
+ if (relocation == 0
+ && hh->root.type != bfd_link_hash_defined
+ && hh->root.type != bfd_link_hash_defweak
+ && hh->root.type != bfd_link_hash_undefweak)
+ {
+ if (!info->executable
+ && info->unresolved_syms_in_objects == RM_IGNORE
+ && ELF_ST_VISIBILITY (hh->other) == STV_DEFAULT
+ && hh->type == STT_PARISC_MILLI)
+ {
+ if (! info->callbacks->undefined_symbol
+ (info, hh->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)
+ || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR))))
+ return FALSE;
+ warned_undef = TRUE;
+ }
}
+ h = (struct elf32_hppa_link_hash_entry *) hh;
}
/* Do any required modifications to the relocation value, and
@@ -4011,7 +3771,7 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
}
r = final_link_relocate (input_section, contents, rel, relocation,
- htab, sym_sec, h);
+ htab, sym_sec, h, info);
if (r == bfd_reloc_ok)
continue;
@@ -4049,8 +3809,8 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
if (!((*info->callbacks->reloc_overflow)
- (info, sym_name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, sym_name, howto->name, 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
}
@@ -4062,13 +3822,14 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
dynamic sections here. */
static bfd_boolean
-elf32_hppa_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf32_hppa_finish_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
struct elf32_hppa_link_hash_table *htab;
+ Elf_Internal_Rela rel;
+ bfd_byte *loc;
htab = hppa_link_hash_table (info);
@@ -4096,43 +3857,27 @@ elf32_hppa_finish_dynamic_symbol (output_bfd, info, h, sym)
+ h->root.u.def.section->output_section->vma);
}
- if (! ((struct elf32_hppa_link_hash_entry *) h)->pic_call)
+ /* Create a dynamic IPLT relocation for this entry. */
+ rel.r_offset = (h->plt.offset
+ + htab->splt->output_offset
+ + htab->splt->output_section->vma);
+ if (h->dynindx != -1)
{
- Elf_Internal_Rela rel;
- bfd_byte *loc;
-
- /* Create a dynamic IPLT relocation for this entry. */
- rel.r_offset = (h->plt.offset
- + htab->splt->output_offset
- + htab->splt->output_section->vma);
- if (h->dynindx != -1)
- {
- rel.r_info = ELF32_R_INFO (h->dynindx, R_PARISC_IPLT);
- rel.r_addend = 0;
- }
- else
- {
- /* This symbol has been marked to become local, and is
- used by a plabel so must be kept in the .plt. */
- rel.r_info = ELF32_R_INFO (0, R_PARISC_IPLT);
- rel.r_addend = value;
- }
-
- loc = htab->srelplt->contents;
- loc += htab->srelplt->reloc_count++ * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (htab->splt->output_section->owner,
- &rel, loc);
+ rel.r_info = ELF32_R_INFO (h->dynindx, R_PARISC_IPLT);
+ rel.r_addend = 0;
}
else
{
- bfd_put_32 (htab->splt->owner,
- value,
- htab->splt->contents + h->plt.offset);
- bfd_put_32 (htab->splt->owner,
- elf_gp (htab->splt->output_section->owner),
- htab->splt->contents + h->plt.offset + 4);
+ /* This symbol has been marked to become local, and is
+ used by a plabel so must be kept in the .plt. */
+ rel.r_info = ELF32_R_INFO (0, R_PARISC_IPLT);
+ rel.r_addend = value;
}
+ loc = htab->srelplt->contents;
+ loc += htab->srelplt->reloc_count++ * sizeof (Elf32_External_Rela);
+ bfd_elf32_swap_reloca_out (htab->splt->output_section->owner, &rel, loc);
+
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
/* Mark the symbol as undefined, rather than as defined in
@@ -4143,9 +3888,6 @@ elf32_hppa_finish_dynamic_symbol (output_bfd, info, h, sym)
if (h->got.offset != (bfd_vma) -1)
{
- Elf_Internal_Rela rel;
- bfd_byte *loc;
-
/* This symbol has an entry in the global offset table. Set it
up. */
@@ -4171,8 +3913,7 @@ elf32_hppa_finish_dynamic_symbol (output_bfd, info, h, sym)
{
if ((h->got.offset & 1) != 0)
abort ();
- bfd_put_32 (output_bfd, (bfd_vma) 0,
- htab->sgot->contents + h->got.offset);
+ bfd_put_32 (output_bfd, 0, htab->sgot->contents + h->got.offset);
rel.r_info = ELF32_R_INFO (h->dynindx, R_PARISC_DIR32);
rel.r_addend = 0;
}
@@ -4185,8 +3926,6 @@ elf32_hppa_finish_dynamic_symbol (output_bfd, info, h, sym)
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
{
asection *s;
- Elf_Internal_Rela rel;
- bfd_byte *loc;
/* This symbol needs a copy reloc. Set it up. */
@@ -4221,8 +3960,7 @@ elf32_hppa_finish_dynamic_symbol (output_bfd, info, h, sym)
dynamic linker, before writing them out. */
static enum elf_reloc_type_class
-elf32_hppa_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+elf32_hppa_reloc_type_class (const Elf_Internal_Rela *rela)
{
if (ELF32_R_SYM (rela->r_info) == 0)
return reloc_class_relative;
@@ -4241,9 +3979,8 @@ elf32_hppa_reloc_type_class (rela)
/* Finish up the dynamic sections. */
static bfd_boolean
-elf32_hppa_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
bfd *dynobj;
struct elf32_hppa_link_hash_table *htab;
@@ -4321,9 +4058,7 @@ elf32_hppa_finish_dynamic_sections (output_bfd, info)
/* Fill in the first entry in the global offset table.
We use it to point to our dynamic section, if we have one. */
bfd_put_32 (output_bfd,
- (sdyn != NULL
- ? sdyn->output_section->vma + sdyn->output_offset
- : (bfd_vma) 0),
+ sdyn ? sdyn->output_section->vma + sdyn->output_offset : 0,
htab->sgot->contents);
/* The second entry is reserved for use by the dynamic linker. */
@@ -4366,9 +4101,8 @@ elf32_hppa_finish_dynamic_sections (output_bfd, info)
/* Tweak the OSABI field of the elf header. */
static void
-elf32_hppa_post_process_headers (abfd, link_info)
- bfd *abfd;
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+elf32_hppa_post_process_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
Elf_Internal_Ehdr * i_ehdrp;
@@ -4387,9 +4121,7 @@ elf32_hppa_post_process_headers (abfd, link_info)
/* Called when writing out an object file to decide the type of a
symbol. */
static int
-elf32_hppa_elf_get_symbol_type (elf_sym, type)
- Elf_Internal_Sym *elf_sym;
- int type;
+elf32_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
{
if (ELF_ST_TYPE (elf_sym->st_info) == STT_PARISC_MILLI)
return STT_PARISC_MILLI;
@@ -4407,7 +4139,6 @@ elf32_hppa_elf_get_symbol_type (elf_sym, type)
#define bfd_elf32_bfd_final_link elf32_hppa_final_link
#define bfd_elf32_bfd_link_hash_table_create elf32_hppa_link_hash_table_create
#define bfd_elf32_bfd_link_hash_table_free elf32_hppa_link_hash_table_free
-#define elf_backend_add_symbol_hook elf32_hppa_add_symbol_hook
#define elf_backend_adjust_dynamic_symbol elf32_hppa_adjust_dynamic_symbol
#define elf_backend_copy_indirect_symbol elf32_hppa_copy_indirect_symbol
#define elf_backend_check_relocs elf32_hppa_check_relocs
diff --git a/bfd/elf32-hppa.h b/bfd/elf32-hppa.h
index 7c8c687c49..000602eb43 100644
--- a/bfd/elf32-hppa.h
+++ b/bfd/elf32-hppa.h
@@ -5,7 +5,7 @@
February 1994.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
Written by:
@@ -37,27 +37,26 @@
#include "elf/hppa.h"
int elf32_hppa_setup_section_lists
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
void elf32_hppa_next_input_section
- PARAMS ((struct bfd_link_info *, asection *));
+ (struct bfd_link_info *, asection *);
bfd_boolean elf32_hppa_size_stubs
- PARAMS ((bfd *, bfd *, struct bfd_link_info *, bfd_boolean, bfd_signed_vma,
- asection * (*) PARAMS ((const char *, asection *)),
- void (*) PARAMS ((void))));
+ (bfd *, bfd *, struct bfd_link_info *, bfd_boolean, bfd_signed_vma,
+ asection * (*) (const char *, asection *), void (*) (void));
bfd_boolean elf32_hppa_set_gp
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
bfd_boolean elf32_hppa_build_stubs
- PARAMS ((struct bfd_link_info *));
+ (struct bfd_link_info *);
elf_hppa_reloc_type elf32_hppa_reloc_final_type
- PARAMS ((bfd *, elf_hppa_reloc_type, int, unsigned int));
+ (bfd *, elf_hppa_reloc_type, int, unsigned int);
extern elf_hppa_reloc_type ** _bfd_elf32_hppa_gen_reloc_type
- PARAMS ((bfd *, elf_hppa_reloc_type, int, unsigned int, int, asymbol *));
+ (bfd *, elf_hppa_reloc_type, int, unsigned int, int, asymbol *);
/* Define groups of basic relocations. FIXME: These should
be the only basic relocations created by GAS. The rest
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 60bccb8078..11fadabc99 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -711,7 +711,7 @@ elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf_i386_copy_indirect_symbol (struct elf_backend_data *bed,
+elf_i386_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
@@ -2154,42 +2154,9 @@ elf_i386_relocate_section (bfd *output_bfd,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean warned;
- relocation = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- ;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- }
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
}
switch (r_type)
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index fd68dc6336..209cbe6554 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -26,6 +26,237 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf-bfd.h"
#include "elf/i860.h"
+/* special_function for R_860_PC26 relocation. */
+static bfd_reloc_status_type
+i860_howto_pc26_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void *data ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma insn;
+ bfd_vma relocation;
+ bfd_byte *addr;
+
+ if (output_bfd != NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (! reloc_entry->howto->partial_inplace
+ || reloc_entry->addend == 0))
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ /* Used elf32-mips.c as an example. */
+ if (bfd_is_und_section (symbol->section)
+ && output_bfd == (bfd *) NULL)
+ return bfd_reloc_undefined;
+
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+
+ if (reloc_entry->address > input_section->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ /* Adjust for PC-relative relocation. */
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + reloc_entry->address
+ + 4);
+
+ /* Check for target out of range. */
+ if ((bfd_signed_vma)relocation > (0x3ffffff << 2)
+ || (bfd_signed_vma)relocation < (-0x4000000 << 2))
+ return bfd_reloc_outofrange;
+
+ addr = (bfd_byte *) data + reloc_entry->address;
+ insn = bfd_get_32 (abfd, addr);
+
+ relocation >>= reloc_entry->howto->rightshift;
+ insn = (insn & ~reloc_entry->howto->dst_mask)
+ | (relocation & reloc_entry->howto->dst_mask);
+
+ bfd_put_32 (abfd, (bfd_vma) insn, addr);
+
+ return bfd_reloc_ok;
+}
+
+/* special_function for R_860_PC16 relocation. */
+static bfd_reloc_status_type
+i860_howto_pc16_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void *data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma insn;
+ bfd_vma relocation;
+ bfd_byte *addr;
+
+ if (output_bfd != NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (! reloc_entry->howto->partial_inplace
+ || reloc_entry->addend == 0))
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ /* Used elf32-mips.c as an example. */
+ if (bfd_is_und_section (symbol->section)
+ && output_bfd == (bfd *) NULL)
+ return bfd_reloc_undefined;
+
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+
+ if (reloc_entry->address > input_section->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ /* Adjust for PC-relative relocation. */
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + reloc_entry->address
+ + 4);
+
+ /* Check for target out of range. */
+ if ((bfd_signed_vma)relocation > (0x7fff << 2)
+ || (bfd_signed_vma)relocation < (-0x8000 << 2))
+ return bfd_reloc_outofrange;
+
+ addr = (bfd_byte *) data + reloc_entry->address;
+ insn = bfd_get_32 (abfd, addr);
+
+ relocation >>= reloc_entry->howto->rightshift;
+ relocation = (((relocation & 0xf800) << 5) | (relocation & 0x7ff))
+ & reloc_entry->howto->dst_mask;
+ insn = (insn & ~reloc_entry->howto->dst_mask) | relocation;
+
+ bfd_put_32 (abfd, (bfd_vma) insn, addr);
+
+ return bfd_reloc_ok;
+}
+
+/* special_function for R_860_HIGHADJ relocation. */
+static bfd_reloc_status_type
+i860_howto_highadj_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void *data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma insn;
+ bfd_vma relocation;
+ bfd_byte *addr;
+
+ if (output_bfd != NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (! reloc_entry->howto->partial_inplace
+ || reloc_entry->addend == 0))
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ /* Used elf32-mips.c as an example. */
+ if (bfd_is_und_section (symbol->section)
+ && output_bfd == (bfd *) NULL)
+ return bfd_reloc_undefined;
+
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+ relocation += 0x8000;
+
+ if (reloc_entry->address > input_section->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ addr = (bfd_byte *) data + reloc_entry->address;
+ insn = bfd_get_32 (abfd, addr);
+
+ relocation = ((relocation >> 16) & 0xffff);
+
+ insn = (insn & 0xffff0000) | relocation;
+
+ bfd_put_32 (abfd, (bfd_vma) insn, addr);
+
+ return bfd_reloc_ok;
+}
+
+/* special_function for R_860_SPLITn relocations. */
+static bfd_reloc_status_type
+i860_howto_splitn_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void *data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma insn;
+ bfd_vma relocation;
+ bfd_byte *addr;
+
+ if (output_bfd != NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (! reloc_entry->howto->partial_inplace
+ || reloc_entry->addend == 0))
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ /* Used elf32-mips.c as an example. */
+ if (bfd_is_und_section (symbol->section)
+ && output_bfd == (bfd *) NULL)
+ return bfd_reloc_undefined;
+
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ relocation += reloc_entry->addend;
+
+ if (reloc_entry->address > input_section->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ addr = (bfd_byte *) data + reloc_entry->address;
+ insn = bfd_get_32 (abfd, addr);
+
+ relocation = (((relocation & 0xf800) << 5) | (relocation & 0x7ff))
+ & reloc_entry->howto->dst_mask;
+ insn = (insn & ~reloc_entry->howto->dst_mask) | relocation;
+
+ bfd_put_32 (abfd, (bfd_vma) insn, addr);
+
+ return bfd_reloc_ok;
+}
/* This howto table is preliminary. */
static reloc_howto_type elf32_i860_howto_table [] =
@@ -124,7 +355,7 @@ static reloc_howto_type elf32_i860_howto_table [] =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ i860_howto_pc26_reloc, /* special_function */
"R_860_PC26", /* name */
FALSE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -153,7 +384,7 @@ static reloc_howto_type elf32_i860_howto_table [] =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ i860_howto_pc16_reloc, /* special_function */
"R_860_PC16", /* name */
FALSE, /* partial_inplace */
0x1f07ff, /* src_mask */
@@ -181,7 +412,7 @@ static reloc_howto_type elf32_i860_howto_table [] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ i860_howto_splitn_reloc, /* special_function */
"R_860_SPLIT0", /* name */
FALSE, /* partial_inplace */
0x1f07ff, /* src_mask */
@@ -209,7 +440,7 @@ static reloc_howto_type elf32_i860_howto_table [] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ i860_howto_splitn_reloc, /* special_function */
"R_860_SPLIT1", /* name */
FALSE, /* partial_inplace */
0x1f07fe, /* src_mask */
@@ -237,7 +468,7 @@ static reloc_howto_type elf32_i860_howto_table [] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ i860_howto_splitn_reloc, /* special_function */
"R_860_SPLIT2", /* name */
FALSE, /* partial_inplace */
0x1f07fc, /* src_mask */
@@ -419,7 +650,7 @@ static reloc_howto_type elf32_i860_howto_table [] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ i860_howto_highadj_reloc, /* special_function */
"R_860_HIGHADJ", /* name */
FALSE, /* partial_inplace */
0xffff, /* src_mask */
@@ -712,7 +943,8 @@ elf32_i860_relocate_pc16 (bfd *input_bfd,
/* Relocate. */
value += rello->r_addend;
- /* Separate the fields and insert. */
+ /* Adjust the value by 4, then separate the fields and insert. */
+ value = (value - 4) >> howto->rightshift;
value = (((value & 0xf800) << 5) | (value & 0x7ff)) & howto->dst_mask;
insn = (insn & ~howto->dst_mask) | value;
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 4cb28bb31b..e8cb177188 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1532,33 +1532,12 @@ ip2k_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes [r_symndx - symtab_hdr->sh_info];
+ bfd_boolean warned;
+ bfd_boolean unresolved_reloc;
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
name = h->root.root.string;
-
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- relocation = h->root.u.def.value + BASEADDR (sec);
- }
-
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
-
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (! info->shared || info->no_undefined))))
- return FALSE;
- relocation = 0;
- }
}
/* Finally, the sole IP2K-specific part. */
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index e2a3b17aee..f85ffac843 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -618,48 +618,14 @@ iq2000_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes [r_symndx];
-
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean unresolved_reloc;
+ bfd_boolean warned;
+
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation,
+ sec, unresolved_reloc, info, warned);
name = h->root.root.string;
-
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
-#ifdef DEBUG
- fprintf (stderr,
- "defined: sec: %s, name: %s, value: %x + %x + %x gives: %x\n",
- sec->name, name, h->root.u.def.value,
- sec->output_section->vma, sec->output_offset, relocation);
-#endif
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- {
-#ifdef DEBUG
- fprintf (stderr, "undefined: sec: %s, name: %s\n",
- sec->name, name);
-#endif
- relocation = 0;
- }
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined))))
- return FALSE;
-#ifdef DEBUG
- fprintf (stderr, "unknown: name: %s\n", name);
-#endif
- relocation = 0;
- }
}
switch (r_type)
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index b9d9bfc312..2844b487a4 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -1285,7 +1285,7 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
- The .page0 is a data section that is mapped in [0x0000..0x00FF].
Page0 accesses are faster on the M68HC11. Soft registers used by GCC-m6811
are located in .page0.
- - The .vectors is the data section that represents the interrupt
+ - The .vectors is the section that represents the interrupt
vectors. */
static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]=
{
@@ -1296,7 +1296,7 @@ static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]=
{ ".page0", 0, NULL, 0,
SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
{ ".vectors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ SHT_PROGBITS, SHF_ALLOC },
{ NULL, 0, NULL, 0,
0, 0 }
};
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index 54fdca2827..3074935cc8 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -538,6 +538,25 @@ m68hc12_elf_set_mach_from_flags (abfd)
return TRUE;
}
+/* Specific sections:
+ - The .page0 is a data section that is mapped in [0x0000..0x00FF].
+ Page0 accesses are faster on the M68HC12.
+ - The .vectors is the section that represents the interrupt
+ vectors. */
+static struct bfd_elf_special_section const elf32_m68hc12_special_sections[]=
+{
+ { ".eeprom", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".softregs", 0, NULL, 0,
+ SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".page0", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".vectors", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, NULL, 0,
+ 0, 0 }
+};
+
#define ELF_ARCH bfd_arch_m68hc12
#define ELF_MACHINE_CODE EM_68HC12
#define ELF_MAXPAGESIZE 0x1000
@@ -554,6 +573,7 @@ m68hc12_elf_set_mach_from_flags (abfd)
#define elf_backend_object_p m68hc12_elf_set_mach_from_flags
#define elf_backend_final_write_processing 0
#define elf_backend_can_gc_sections 1
+#define elf_backend_special_sections elf32_m68hc12_special_sections
#define elf_backend_post_process_headers elf32_m68hc11_post_process_headers
#define elf_backend_add_symbol_hook elf32_m68hc11_add_symbol_hook
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 7733f05f1f..8d71cb659e 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -367,76 +367,29 @@ elf32_m68hc11_size_stubs (output_bfd, stub_bfd, info, add_stub_section)
input_bfd = input_bfd->link_next, bfd_indx++)
{
Elf_Internal_Shdr *symtab_hdr;
- Elf_Internal_Shdr *shndx_hdr;
- Elf_Internal_Sym *isym;
- Elf32_External_Sym *extsyms, *esym, *end_sy;
- Elf_External_Sym_Shndx *shndx_buf, *shndx;
- bfd_size_type sec_size;
/* We'll need the symbol table in a second. */
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
if (symtab_hdr->sh_info == 0)
continue;
- /* We need an array of the local symbols attached to the input bfd.
- Unfortunately, we're going to have to read & swap them in. */
- sec_size = symtab_hdr->sh_info;
- sec_size *= sizeof (Elf_Internal_Sym);
- local_syms = (Elf_Internal_Sym *) bfd_malloc (sec_size);
+ /* We need an array of the local symbols attached to the input bfd. */
+ local_syms = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (local_syms == NULL)
+ {
+ local_syms = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ /* Cache them for elf_link_input_bfd. */
+ symtab_hdr->contents = (unsigned char *) local_syms;
+ }
if (local_syms == NULL)
- goto error_ret_free_local;
-
- all_local_syms[bfd_indx] = local_syms;
- sec_size = symtab_hdr->sh_info;
- sec_size *= sizeof (Elf32_External_Sym);
-
- /* Get the cached copy. */
- if (symtab_hdr->contents != NULL)
- extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
- else
- {
- /* Go get them off disk. */
- bfd_size_type amt = symtab_hdr->sh_size;
- extsyms = (Elf32_External_Sym *) bfd_malloc (amt);
- if (extsyms == NULL)
- goto error_ret_free_local;
-
- if (bfd_seek (input_bfd, symtab_hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread ((PTR) extsyms, amt, input_bfd) != amt)
- {
- error_ret_free_ext_syms:
- free (extsyms);
- goto error_ret_free_local;
- }
- }
- shndx_buf = NULL;
- shndx_hdr = &elf_tdata (input_bfd)->symtab_shndx_hdr;
- if (shndx_hdr->sh_size != 0)
{
- bfd_size_type amt;
-
- amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
- shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
- if (shndx_buf == NULL)
- goto error_ret_free_ext_syms;
- if (bfd_seek (input_bfd, shndx_hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread ((PTR) shndx_buf, amt, input_bfd) != amt)
- {
- free (shndx_buf);
- goto error_ret_free_ext_syms;
- }
- shndx_hdr->contents = (PTR) shndx_buf;
+ free (all_local_syms);
+ return FALSE;
}
- /* Swap the local symbols in. */
- for (esym = extsyms, end_sy = esym + symtab_hdr->sh_info,
- isym = local_syms, shndx = shndx_buf;
- esym < end_sy;
- esym++, isym++, shndx = (shndx ? shndx + 1 : NULL))
- bfd_elf32_swap_symbol_in (input_bfd, esym, shndx, isym);
-
- /* Now we can free the external symbols. */
- free (shndx_buf);
+ all_local_syms[bfd_indx] = local_syms;
}
for (input_bfd = info->input_bfds, bfd_indx = 0;
@@ -608,11 +561,11 @@ elf32_m68hc11_size_stubs (output_bfd, stub_bfd, info, add_stub_section)
bfd_hash_traverse (htab->stub_hash_table, htab->size_one_stub, htab);
}
- free (htab->all_local_syms);
+ free (all_local_syms);
return TRUE;
error_ret_free_local:
- free (htab->all_local_syms);
+ free (all_local_syms);
return FALSE;
}
@@ -1119,7 +1072,7 @@ elf32_m68hc11_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel, *relend;
const char *name;
struct m68hc11_page_info *pinfo;
- struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd);
+ const struct elf_backend_data * const ebd = get_elf_backend_data (input_bfd);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
diff --git a/bfd/elf32-m68hc1x.h b/bfd/elf32-m68hc1x.h
index e70c172c37..c5e937282b 100644
--- a/bfd/elf32-m68hc1x.h
+++ b/bfd/elf32-m68hc1x.h
@@ -118,7 +118,6 @@ struct m68hc11_elf_link_hash_table
unsigned int bfd_count;
int top_index;
asection **input_list;
- Elf_Internal_Sym **all_local_syms;
/* Small local sym to section mapping cache. */
struct sym_sec_cache sym_sec;
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 1320429cf1..7688bfd9fc 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1398,6 +1398,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
sym = NULL;
sec = NULL;
unresolved_reloc = FALSE;
+
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
@@ -1406,42 +1407,9 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean warned;
- relocation = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- ;
- else if (info->shared
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (!(info->callbacks->undefined_symbol
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- }
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
}
switch (r_type)
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index 23f5069cb1..b09ef873cb 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -550,10 +550,6 @@ bfd_elf_msp430_final_write_processing (abfd, linker)
switch (bfd_get_mach (abfd))
{
default:
- case bfd_mach_msp12:
- val = E_MSP430_MACH_MSP430x12;
- break;
-
case bfd_mach_msp110:
val = E_MSP430_MACH_MSP430x11x1;
break;
@@ -562,6 +558,10 @@ bfd_elf_msp430_final_write_processing (abfd, linker)
val = E_MSP430_MACH_MSP430x11;
break;
+ case bfd_mach_msp12:
+ val = E_MSP430_MACH_MSP430x12;
+ break;
+
case bfd_mach_msp13:
val = E_MSP430_MACH_MSP430x13;
break;
@@ -570,16 +570,12 @@ bfd_elf_msp430_final_write_processing (abfd, linker)
val = E_MSP430_MACH_MSP430x14;
break;
- case bfd_mach_msp41:
- val = E_MSP430_MACH_MSP430x41;
- break;
-
- case bfd_mach_msp43:
- val = E_MSP430_MACH_MSP430x43;
+ case bfd_mach_msp15:
+ val = E_MSP430_MACH_MSP430x15;
break;
- case bfd_mach_msp44:
- val = E_MSP430_MACH_MSP430x44;
+ case bfd_mach_msp16:
+ val = E_MSP430_MACH_MSP430x16;
break;
case bfd_mach_msp31:
@@ -594,12 +590,20 @@ bfd_elf_msp430_final_write_processing (abfd, linker)
val = E_MSP430_MACH_MSP430x33;
break;
- case bfd_mach_msp15:
- val = E_MSP430_MACH_MSP430x15;
+ case bfd_mach_msp41:
+ val = E_MSP430_MACH_MSP430x41;
break;
- case bfd_mach_msp16:
- val = E_MSP430_MACH_MSP430x16;
+ case bfd_mach_msp42:
+ val = E_MSP430_MACH_MSP430x42;
+ break;
+
+ case bfd_mach_msp43:
+ val = E_MSP430_MACH_MSP430x43;
+ break;
+
+ case bfd_mach_msp44:
+ val = E_MSP430_MACH_MSP430x44;
break;
}
@@ -624,10 +628,6 @@ elf32_msp430_object_p (abfd)
switch (e_mach)
{
default:
- case E_MSP430_MACH_MSP430x12:
- e_set = bfd_mach_msp12;
- break;
-
case E_MSP430_MACH_MSP430x11:
e_set = bfd_mach_msp11;
break;
@@ -636,6 +636,10 @@ elf32_msp430_object_p (abfd)
e_set = bfd_mach_msp110;
break;
+ case E_MSP430_MACH_MSP430x12:
+ e_set = bfd_mach_msp12;
+ break;
+
case E_MSP430_MACH_MSP430x13:
e_set = bfd_mach_msp13;
break;
@@ -644,8 +648,12 @@ elf32_msp430_object_p (abfd)
e_set = bfd_mach_msp14;
break;
- case E_MSP430_MACH_MSP430x41:
- e_set = bfd_mach_msp41;
+ case E_MSP430_MACH_MSP430x15:
+ e_set = bfd_mach_msp15;
+ break;
+
+ case E_MSP430_MACH_MSP430x16:
+ e_set = bfd_mach_msp16;
break;
case E_MSP430_MACH_MSP430x31:
@@ -660,20 +668,20 @@ elf32_msp430_object_p (abfd)
e_set = bfd_mach_msp33;
break;
- case E_MSP430_MACH_MSP430x43:
- e_set = bfd_mach_msp43;
+ case E_MSP430_MACH_MSP430x41:
+ e_set = bfd_mach_msp41;
break;
- case E_MSP430_MACH_MSP430x44:
- e_set = bfd_mach_msp44;
+ case E_MSP430_MACH_MSP430x42:
+ e_set = bfd_mach_msp42;
break;
- case E_MSP430_MACH_MSP430x15:
- e_set = bfd_mach_msp15;
+ case E_MSP430_MACH_MSP430x43:
+ e_set = bfd_mach_msp43;
break;
- case E_MSP430_MACH_MSP430x16:
- e_set = bfd_mach_msp16;
+ case E_MSP430_MACH_MSP430x44:
+ e_set = bfd_mach_msp44;
break;
}
}
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index dff4126e15..3bffc70c78 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -285,7 +285,7 @@ ppc_elf_link_hash_table_create (bfd *abfd)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-ppc_elf_copy_indirect_symbol (struct elf_backend_data *bed,
+ppc_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
@@ -2581,11 +2581,12 @@ elf_finish_pointer_linker_section (bfd *output_bfd,
asection *srel = lsect->rel_section;
Elf_Internal_Rela outrel[MAX_INT_RELS_PER_EXT_REL];
bfd_byte *erel;
- struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+ const struct elf_backend_data *bed;
unsigned int i;
BFD_ASSERT (srel != NULL);
+ bed = get_elf_backend_data (output_bfd);
for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
{
outrel[i].r_offset = (lsect->section->output_section->vma
@@ -4717,6 +4718,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
unresolved_reloc = FALSE;
warned = FALSE;
r_symndx = ELF32_R_SYM (rel->r_info);
+
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
@@ -4727,44 +4729,12 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
+
sym_name = h->root.root.string;
-
- relocation = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- if (sec->output_section == NULL)
- unresolved_reloc = TRUE;
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- ;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_offset, (!info->shared
- || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- warned = TRUE;
- }
}
/* TLS optimizations. Replace instruction sequences and relocs
@@ -5499,49 +5469,16 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
else
{
- long indx;
-
- indx = r_symndx - symtab_hdr->sh_info;
- h = elf_sym_hashes (input_bfd)[indx];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- value = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sym_sec = h->root.u.def.section;
-
- /* Detect the cases that sym_sec->output_section is
- expected to be NULL -- all cases in which the symbol
- is defined in another shared module. This includes
- PLT relocs for which we've created a PLT entry and
- other relocs for which we're prepared to create
- dynamic relocations. */
- /* ??? Just accept it NULL and continue. */
-
- if (sym_sec->output_section != NULL)
- {
- value = (h->root.u.def.value
- + sym_sec->output_section->vma
- + sym_sec->output_offset);
- }
- }
- else if (info->shared
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- continue;
- }
+ bfd_boolean warned;
+ bfd_boolean unresolved_reloc;
+
+ RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd),
+ r_symndx, symtab_hdr,
+ value, sym_sec,
+ unresolved_reloc, info,
+ warned);
+ if (warned)
+ continue;
}
hit_addr = contents + rel->r_offset;
value += rel->r_addend;
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 1ce327f96d..5b07ab0db7 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -40,7 +40,7 @@ static bfd_boolean create_got_section
static bfd_boolean elf_s390_create_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static void elf_s390_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -856,7 +856,7 @@ elf_s390_create_dynamic_sections (dynobj, info)
static void
elf_s390_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct elf_s390_link_hash_entry *edir, *eind;
@@ -2331,45 +2331,12 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean warned ATTRIBUTE_UNUSED;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- {
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- relocation = 0;
- }
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- relocation = 0;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- relocation = 0;
- }
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
}
switch (r_type)
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 541786581d..368bbca37a 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -57,7 +57,7 @@ static bfd_byte *sh_elf_get_relocated_section_contents
(bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
bfd_boolean, asymbol **);
static void sh_elf_copy_indirect_symbol
- (struct elf_backend_data *, struct elf_link_hash_entry *,
+ (const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *);
static int sh_elf_optimized_tls_reloc
(struct bfd_link_info *, int, int);
@@ -3692,7 +3692,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
struct elf_sh_link_hash_table *htab;
flagword flags, pltflags;
register asection *s;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign = 0;
switch (bed->s->arch_size)
@@ -4663,6 +4663,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
else
{
+ /* FIXME: Ought to make use of the RELOC_FOR_GLOBAL_SYMBOL macro. */
+
/* Section symbol are never (?) placed in the hash table, so
we can just ignore hash relocations when creating a
relocatable object file. */
@@ -4764,17 +4766,18 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared
- && ! info->no_undefined
+ else if (! info->executable
+ && info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
else
{
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
+ if (! info->callbacks->undefined_symbol
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)
+ || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+ || ELF_ST_VISIBILITY (h->other))))
return FALSE;
relocation = 0;
}
@@ -6011,7 +6014,7 @@ sh_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-sh_elf_copy_indirect_symbol (struct elf_backend_data *bed,
+sh_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index 267854867a..396fedfad4 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -410,7 +410,7 @@ sh64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
{
/* No previous datalabel symbol. Make one. */
struct bfd_link_hash_entry *bh = NULL;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
flags, *secp, *valp,
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index c18edda663..50d968e673 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -68,7 +68,7 @@ static bfd_boolean create_got_section
static bfd_boolean elf32_sparc_create_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
static void elf32_sparc_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static int elf32_sparc_tls_transition
PARAMS ((struct bfd_link_info *, bfd *, int, int));
@@ -750,7 +750,7 @@ elf32_sparc_create_dynamic_sections (dynobj, info)
static void
elf32_sparc_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct elf32_sparc_link_hash_entry *edir, *eind;
@@ -2186,42 +2186,12 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean warned ATTRIBUTE_UNUSED;
- relocation = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- ;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- }
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
}
switch (r_type)
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 8437c3ddec..0dc6542b2d 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1877,6 +1877,9 @@ v850_elf_object_p (abfd)
case E_V850E_ARCH:
bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850e);
break;
+ case E_V850E1_ARCH:
+ bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850e1);
+ break;
}
return TRUE;
}
@@ -1895,6 +1898,7 @@ v850_elf_final_write_processing (abfd, linker)
default:
case bfd_mach_v850: val = E_V850_ARCH; break;
case bfd_mach_v850e: val = E_V850E_ARCH; break;
+ case bfd_mach_v850e1: val = E_V850E1_ARCH; break;
}
elf_elfheader (abfd)->e_flags &=~ EF_V850_ARCH;
@@ -1960,8 +1964,24 @@ v850_elf_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_V850_ARCH) != (out_flags & EF_V850_ARCH)
&& (in_flags & EF_V850_ARCH) != E_V850_ARCH)
- _bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
- bfd_archive_filename (ibfd));
+ {
+ /* Allow v850e1 binaries to be linked with v850e binaries.
+ Set the output binary to v850e. */
+ if ((in_flags & EF_V850_ARCH) == E_V850E1_ARCH
+ && (out_flags & EF_V850_ARCH) == E_V850E_ARCH)
+ return TRUE;
+
+ if ((in_flags & EF_V850_ARCH) == E_V850E_ARCH
+ && (out_flags & EF_V850_ARCH) == E_V850E1_ARCH)
+ {
+ elf_elfheader (obfd)->e_flags =
+ ((out_flags & ~ EF_V850_ARCH) | E_V850E_ARCH);
+ return TRUE;
+ }
+
+ _bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
+ bfd_archive_filename (ibfd));
+ }
return TRUE;
}
@@ -1987,6 +2007,7 @@ v850_elf_print_private_bfd_data (abfd, ptr)
default:
case E_V850_ARCH: fprintf (file, _("v850 architecture")); break;
case E_V850E_ARCH: fprintf (file, _("v850e architecture")); break;
+ case E_V850E1_ARCH: fprintf (file, _("v850e1 architecture")); break;
}
fputc ('\n', file);
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 3ad9747885..7d78e0ff3b 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1487,15 +1487,17 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (h->root.type == bfd_link_hash_defined
+ bfd_boolean unresolved_reloc;
+ bfd_boolean warned;
+
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
+
+ if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if ((r_type == R_VAX_PLT32
+ && ((r_type == R_VAX_PLT32
&& h->plt.offset != (bfd_vma) -1
&& elf_hash_table (info)->dynamic_sections_created)
|| (r_type == R_VAX_GOT32
@@ -1524,34 +1526,11 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_VAX_32
|| r_type == R_VAX_PC8
|| r_type == R_VAX_PC16
- || r_type == R_VAX_PC32)))
- {
- /* In these cases, we don't need the relocation
- value. We check specially because in some
- obscure cases sec->output_section will be NULL. */
- relocation = 0;
- }
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
+ || r_type == R_VAX_PC32))))
+ /* In these cases, we don't need the relocation
+ value. We check specially because in some
+ obscure cases sec->output_section will be NULL. */
relocation = 0;
- else if (info->shared
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- relocation = 0;
- else
- {
- if (!(info->callbacks->undefined_symbol
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- relocation = 0;
- }
}
switch (r_type)
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 3322c9efd6..251c332395 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -48,7 +48,7 @@ static bfd_boolean elf_xtensa_check_relocs
static void elf_xtensa_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
static void elf_xtensa_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static asection *elf_xtensa_gc_mark_hook
PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
@@ -799,7 +799,7 @@ elf_xtensa_hide_symbol (info, h, force_local)
static void
elf_xtensa_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
@@ -2009,45 +2009,15 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- relocation = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
-
- if (sec->output_section == NULL)
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
+
+ if (relocation == 0
+ && !unresolved_reloc
+ && h->root.type == bfd_link_hash_undefweak)
is_weak_undef = TRUE;
- else if (info->shared
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- warned = TRUE;
- }
}
if (relaxing_section)
@@ -3575,6 +3545,7 @@ hash_literal_value (src)
const literal_value *src;
{
unsigned hash_val;
+
if (r_reloc_is_const (&src->r_rel))
return hash_bfd_vma (src->value);
@@ -3583,9 +3554,9 @@ hash_literal_value (src)
/* Now check for the same section and the same elf_hash. */
if (r_reloc_is_defined (&src->r_rel))
- hash_val += hash_bfd_vma ((bfd_vma) r_reloc_get_section (&src->r_rel));
+ hash_val += hash_bfd_vma ((bfd_vma) (unsigned) r_reloc_get_section (&src->r_rel));
else
- hash_val += hash_bfd_vma ((bfd_vma) r_reloc_get_hash_entry (&src->r_rel));
+ hash_val += hash_bfd_vma ((bfd_vma) (unsigned) r_reloc_get_hash_entry (&src->r_rel));
return hash_val;
}
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 1d35a6d5d0..0b64bd310f 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -3074,7 +3074,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
this may help reduce memory usage and processing time later. */
maybe_dynamic = FALSE;
if (h && ((info->shared
- && (!info->symbolic || info->allow_shlib_undefined))
+ && (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| ! (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
|| h->root.root.type == bfd_link_hash_defweak))
maybe_dynamic = TRUE;
@@ -4445,48 +4445,25 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = alpha_elf_sym_hashes (input_bfd)[r_symndx - symtab_hdr->sh_info];
-
- while (h->root.root.type == bfd_link_hash_indirect
- || h->root.root.type == bfd_link_hash_warning)
- h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
+ bfd_boolean warned;
+ bfd_boolean unresolved_reloc;
+ struct elf_link_hash_entry *hh;
+
+ RELOC_FOR_GLOBAL_SYMBOL (hh,
+ (struct elf_link_hash_entry *) alpha_elf_sym_hashes (input_bfd),
+ r_symndx, symtab_hdr, value,
+ sec, unresolved_reloc, info,
+ warned);
+
+ if (warned)
+ continue;
- value = 0;
- if (h->root.root.type == bfd_link_hash_defined
- || h->root.root.type == bfd_link_hash_defweak)
- {
- sec = h->root.root.u.def.section;
-
- /* Detect the cases that sym_sec->output_section is
- expected to be NULL -- all cases in which the symbol
- is defined in another shared module. This includes
- PLT relocs for which we've created a PLT entry and
- other relocs for which we're prepared to create
- dynamic relocations. */
- /* ??? Just accept it NULL and continue. */
-
- if (sec->output_section != NULL)
- value = (h->root.root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.root.type == bfd_link_hash_undefweak)
+ if (value == 0
+ && ! unresolved_reloc
+ && hh->root.type == bfd_link_hash_undefweak)
undef_weak_ref = TRUE;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
- ;
- else
- {
- if (!((*info->callbacks->undefined_symbol)
- (info, h->root.root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->root.other)))))
- return FALSE;
- continue;
- }
+ h = (struct alpha_elf_link_hash_entry *) hh;
dynamic_symbol_p = alpha_elf_dynamic_symbol_p (&h->root, info);
gotent = h->got_entries;
}
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index f3398c1503..88403f5221 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -380,7 +380,10 @@ elf64_hppa_object_p (abfd)
i_ehdrp = elf_elfheader (abfd);
if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0)
{
- if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX)
+ /* GCC on hppa-linux produces binaries with OSABI=Linux,
+ but the kernel produces corefiles with OSABI=SysV. */
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX &&
+ i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
return FALSE;
}
else
@@ -710,13 +713,14 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs)
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; ++rel)
{
- enum {
- NEED_DLT = 1,
- NEED_PLT = 2,
- NEED_STUB = 4,
- NEED_OPD = 8,
- NEED_DYNREL = 16,
- };
+ enum
+ {
+ NEED_DLT = 1,
+ NEED_PLT = 2,
+ NEED_STUB = 4,
+ NEED_OPD = 8,
+ NEED_DYNREL = 16,
+ };
struct elf_link_hash_entry *h = NULL;
unsigned long r_symndx = ELF64_R_SYM (rel->r_info);
@@ -746,7 +750,7 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs)
this may help reduce memory usage and processing time later. */
maybe_dynamic = FALSE;
if (h && ((info->shared
- && (!info->symbolic || info->allow_shlib_undefined) )
+ && (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
|| h->root.type == bfd_link_hash_defweak))
maybe_dynamic = TRUE;
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index bec1acaa1c..3a874d898e 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -2100,7 +2100,7 @@ mips_elf64_canonicalize_reloc (abfd, section, relptr, symbols)
{
arelent *tblptr;
unsigned int i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! bed->s->slurp_reloc_table (abfd, section, symbols, FALSE))
return -1;
@@ -2899,6 +2899,8 @@ const struct elf_size_info mips_elf64_size_info =
#define elf_backend_modify_segment_map _bfd_mips_elf_modify_segment_map
#define elf_backend_gc_mark_hook _bfd_mips_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook _bfd_mips_elf_gc_sweep_hook
+#define elf_backend_copy_indirect_symbol \
+ _bfd_mips_elf_copy_indirect_symbol
#define elf_backend_hide_symbol _bfd_mips_elf_hide_symbol
#define elf_backend_ignore_discarded_relocs \
_bfd_mips_elf_ignore_discarded_relocs
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 50cb5d878a..2042e6ae32 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -28,7 +28,6 @@
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
-#include "elf/ppc.h"
#include "elf/ppc64.h"
#include "elf64-ppc.h"
@@ -3036,7 +3035,7 @@ ppc_stub_name (const asection *input_section,
stub_name = bfd_malloc (len);
if (stub_name != NULL)
{
- sprintf (stub_name, "%08x_%s+%x",
+ sprintf (stub_name, "%08x.%s+%x",
input_section->id & 0xffffffff,
h->elf.root.root.string,
(int) rel->r_addend & 0xffffffff);
@@ -3048,7 +3047,7 @@ ppc_stub_name (const asection *input_section,
stub_name = bfd_malloc (len);
if (stub_name != NULL)
{
- sprintf (stub_name, "%08x_%x:%x+%x",
+ sprintf (stub_name, "%08x.%x:%x+%x",
input_section->id & 0xffffffff,
sym_sec->id & 0xffffffff,
(int) ELF64_R_SYM (rel->r_info) & 0xffffffff,
@@ -3277,9 +3276,10 @@ ppc64_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-ppc64_elf_copy_indirect_symbol (struct elf_backend_data *bed ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *dir,
- struct elf_link_hash_entry *ind)
+ppc64_elf_copy_indirect_symbol
+ (const struct elf_backend_data *bed ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
struct ppc_link_hash_entry *edir, *eind;
flagword mask;
@@ -4583,7 +4583,17 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
}
if (h->plt.plist != NULL)
- return TRUE;
+ {
+ /* We should never get here, but unfortunately there are versions
+ of gcc out there that improperly (for this ABI) put initialized
+ function pointers, vtable refs and suchlike in read-only
+ sections. Allow them to proceed, but warn that this might
+ break at runtime. */
+ (*_bfd_error_handler)
+ (_("copy reloc against `%s' requires lazy plt linking; "
+ "avoid setting LD_BIND_NOW=1 or upgrade gcc"),
+ h->root.root.string);
+ }
/* This is a reference to a symbol defined by a dynamic object which
is not a function. */
@@ -6096,8 +6106,6 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
struct ppc_branch_hash_entry *br_entry;
struct bfd_link_info *info;
struct ppc_link_hash_table *htab;
- asection *stub_sec;
- bfd *stub_bfd;
bfd_byte *loc;
bfd_byte *p;
unsigned int indx;
@@ -6110,29 +6118,10 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
info = in_arg;
htab = ppc_hash_table (info);
- stub_sec = stub_entry->stub_sec;
/* Make a note of the offset within the stubs for this entry. */
- stub_entry->stub_offset = stub_sec->_cooked_size;
- loc = stub_sec->contents + stub_entry->stub_offset;
-
- if (htab->emit_stub_syms)
- {
- struct elf_link_hash_entry *h;
- h = elf_link_hash_lookup (&htab->elf, stub_entry->root.string,
- TRUE, FALSE, FALSE);
- if (h == NULL)
- return FALSE;
- h->root.type = bfd_link_hash_defined;
- h->root.u.def.section = stub_entry->stub_sec;
- h->root.u.def.value = stub_entry->stub_offset;
- h->elf_link_hash_flags = (ELF_LINK_HASH_REF_REGULAR
- | ELF_LINK_HASH_DEF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR_NONWEAK
- | ELF_LINK_FORCED_LOCAL);
- }
-
- stub_bfd = stub_sec->owner;
+ stub_entry->stub_offset = stub_entry->stub_sec->_cooked_size;
+ loc = stub_entry->stub_sec->contents + stub_entry->stub_offset;
htab->stub_count[stub_entry->stub_type - 1] += 1;
switch (stub_entry->stub_type)
@@ -6146,8 +6135,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
/* And this is where we are coming from. */
off -= (stub_entry->stub_offset
- + stub_sec->output_offset
- + stub_sec->output_section->vma);
+ + stub_entry->stub_sec->output_offset
+ + stub_entry->stub_sec->output_section->vma);
if (stub_entry->stub_type != ppc_stub_long_branch_r2off)
size = 4;
@@ -6157,16 +6146,16 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
- htab->stub_group[stub_entry->id_sec->id].toc_off);
- bfd_put_32 (stub_bfd, STD_R2_40R1, loc);
+ bfd_put_32 (htab->stub_bfd, STD_R2_40R1, loc);
loc += 4;
- bfd_put_32 (stub_bfd, ADDIS_R2_R2 | PPC_HA (r2off), loc);
+ bfd_put_32 (htab->stub_bfd, ADDIS_R2_R2 | PPC_HA (r2off), loc);
loc += 4;
- bfd_put_32 (stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
+ bfd_put_32 (htab->stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
loc += 4;
off -= 12;
size = 16;
}
- bfd_put_32 (stub_bfd, B_DOT | (off & 0x3fffffc), loc);
+ bfd_put_32 (htab->stub_bfd, B_DOT | (off & 0x3fffffc), loc);
BFD_ASSERT (off + (1 << 25) < (bfd_vma) (1 << 26));
break;
@@ -6227,9 +6216,9 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
indx = off;
if (stub_entry->stub_type != ppc_stub_plt_branch_r2off)
{
- bfd_put_32 (stub_bfd, ADDIS_R12_R2 | PPC_HA (indx), loc);
+ bfd_put_32 (htab->stub_bfd, ADDIS_R12_R2 | PPC_HA (indx), loc);
loc += 4;
- bfd_put_32 (stub_bfd, LD_R11_0R12 | PPC_LO (indx), loc);
+ bfd_put_32 (htab->stub_bfd, LD_R11_0R12 | PPC_LO (indx), loc);
size = 16;
}
else
@@ -6238,21 +6227,21 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
- htab->stub_group[stub_entry->id_sec->id].toc_off);
- bfd_put_32 (stub_bfd, STD_R2_40R1, loc);
+ bfd_put_32 (htab->stub_bfd, STD_R2_40R1, loc);
loc += 4;
- bfd_put_32 (stub_bfd, ADDIS_R12_R2 | PPC_HA (indx), loc);
+ bfd_put_32 (htab->stub_bfd, ADDIS_R12_R2 | PPC_HA (indx), loc);
loc += 4;
- bfd_put_32 (stub_bfd, LD_R11_0R12 | PPC_LO (indx), loc);
+ bfd_put_32 (htab->stub_bfd, LD_R11_0R12 | PPC_LO (indx), loc);
loc += 4;
- bfd_put_32 (stub_bfd, ADDIS_R2_R2 | PPC_HA (r2off), loc);
+ bfd_put_32 (htab->stub_bfd, ADDIS_R2_R2 | PPC_HA (r2off), loc);
loc += 4;
- bfd_put_32 (stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
+ bfd_put_32 (htab->stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
size = 28;
}
loc += 4;
- bfd_put_32 (stub_bfd, MTCTR_R11, loc);
+ bfd_put_32 (htab->stub_bfd, MTCTR_R11, loc);
loc += 4;
- bfd_put_32 (stub_bfd, BCTR, loc);
+ bfd_put_32 (htab->stub_bfd, BCTR, loc);
break;
case ppc_stub_plt_call:
@@ -6299,7 +6288,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
return FALSE;
}
- p = build_plt_stub (stub_bfd, loc, off);
+ p = build_plt_stub (htab->stub_bfd, loc, off);
size = p - loc;
break;
@@ -6308,7 +6297,31 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
return FALSE;
}
- stub_sec->_cooked_size += size;
+ stub_entry->stub_sec->_cooked_size += size;
+
+ if (htab->emit_stub_syms
+ && !(stub_entry->stub_type == ppc_stub_plt_call
+ && stub_entry->h->oh->root.type == bfd_link_hash_defined
+ && stub_entry->h->oh->root.u.def.section == stub_entry->stub_sec
+ && stub_entry->h->oh->root.u.def.value == stub_entry->stub_offset))
+ {
+ struct elf_link_hash_entry *h;
+ h = elf_link_hash_lookup (&htab->elf, stub_entry->root.string,
+ TRUE, FALSE, FALSE);
+ if (h == NULL)
+ return FALSE;
+ if (h->root.type == bfd_link_hash_new)
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = stub_entry->stub_sec;
+ h->root.u.def.value = stub_entry->stub_offset;
+ h->elf_link_hash_flags = (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_DEF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_FORCED_LOCAL);
+ }
+ }
+
return TRUE;
}
@@ -6594,7 +6607,8 @@ ppc64_elf_next_input_section (struct bfd_link_info *info, asection *isec)
/* If a code section has a function that uses the TOC then we need
to use the right TOC (obviously). Also, make sure that .opd gets
- the correct TOC value. */
+ the correct TOC value for R_PPC64_TOC relocs that don't have or
+ can't find their function symbol (shouldn't ever happen now). */
if (isec->has_gp_reloc || (isec->flags & SEC_CODE) == 0)
{
if (elf_gp (isec->owner) != 0)
@@ -7094,6 +7108,23 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
return FALSE;
}
+ if (htab->emit_stub_syms)
+ {
+ struct elf_link_hash_entry *h;
+ h = elf_link_hash_lookup (&htab->elf, "__glink", TRUE, FALSE, FALSE);
+ if (h == NULL)
+ return FALSE;
+ if (h->root.type == bfd_link_hash_new)
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = htab->glink;
+ h->root.u.def.value = 0;
+ h->elf_link_hash_flags = (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_DEF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_FORCED_LOCAL);
+ }
+ }
p = htab->glink->contents;
bfd_put_32 (htab->glink->owner, MFCTR_R12, p);
p += 4;
@@ -7296,6 +7327,16 @@ ppc64_elf_relocate_section (bfd *output_bfd,
r_type = ELF64_R_TYPE (rel->r_info);
r_symndx = ELF64_R_SYM (rel->r_info);
+
+ /* For old style R_PPC64_TOC relocs with a zero symbol, use the
+ symbol of the previous ADDR64 reloc. The symbol gives us the
+ proper TOC base to use. */
+ if (rel->r_info == ELF64_R_INFO (0, R_PPC64_TOC)
+ && rel != relocs
+ && ELF64_R_TYPE (rel[-1].r_info) == R_PPC64_ADDR64
+ && is_opd)
+ r_symndx = ELF64_R_SYM (rel[-1].r_info);
+
sym = NULL;
sec = NULL;
h = NULL;
@@ -7321,44 +7362,11 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
else
{
- /* It's a global symbol. */
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
sym_name = h->root.root.string;
- relocation = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- ;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd, input_section,
- rel->r_offset, (!info->shared
- || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- warned = TRUE;
- }
}
/* TLS optimizations. Replace instruction sequences and relocs
@@ -7757,6 +7765,13 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if ((insn & 1) == 0)
can_plt_call = 1;
}
+ else if (h != NULL
+ && strcmp (h->root.root.string,
+ ".__libc_start_main") == 0)
+ {
+ /* Allow crt1 branch to go via a toc adjusting stub. */
+ can_plt_call = 1;
+ }
else
{
if (strcmp (input_section->output_section->name,
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 62ef221392..de712f77e3 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -40,7 +40,7 @@ static bfd_boolean create_got_section
static bfd_boolean elf_s390_create_dynamic_sections
PARAMS((bfd *, struct bfd_link_info *));
static void elf_s390_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -809,7 +809,7 @@ elf_s390_create_dynamic_sections (dynobj, info)
static void
elf_s390_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct elf_s390_link_hash_entry *edir, *eind;
@@ -2301,45 +2301,12 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean warned ATTRIBUTE_UNUSED;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- {
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- relocation = 0;
- }
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- relocation = 0;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- relocation = 0;
- }
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
}
switch (r_type)
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index 905caddb29..e0bc8df7e5 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -1610,6 +1610,8 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else
{
+ /* ??? Could we use the RELOC_FOR_GLOBAL_SYMBOL macro here ? */
+
/* Section symbols are never (?) placed in the hash table, so
we can just ignore hash relocations when creating a
relocatable object file. */
@@ -1699,7 +1701,9 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic && !info->no_undefined)
+ else if (info->shared
+ && !info->symbolic
+ && info->unresolved_syms_in_objects == RM_IGNORE)
relocation = 0;
else
{
@@ -2917,7 +2921,7 @@ sh64_elf64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
{
/* No previous datalabel symbol. Make one. */
struct bfd_link_hash_entry *bh = NULL;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
flags, *secp, *valp,
@@ -3238,7 +3242,7 @@ sh64_elf64_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
flagword flags, pltflags;
register asection *s;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign = 0;
switch (bed->s->arch_size)
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 13f6a5501a..a74a7f339c 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -518,7 +518,7 @@ sparc64_elf_canonicalize_reloc (abfd, section, relptr, symbols)
{
arelent *tblptr;
unsigned int i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (! bed->s->slurp_reloc_table (abfd, section, symbols, FALSE))
return -1;
@@ -2074,42 +2074,14 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean warned;
- relocation = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
+ if (warned)
{
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- ;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
-
/* To avoid generating warning messages about truncated
relocations, set the relocation's address to be the same as
the start of this section. */
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 09a072b5b8..8aed498233 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -501,7 +501,7 @@ elf64_x86_64_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf64_x86_64_copy_indirect_symbol (struct elf_backend_data *bed,
+elf64_x86_64_copy_indirect_symbol (const struct elf_backend_data *bed,
struct elf_link_hash_entry *dir,
struct elf_link_hash_entry *ind)
{
@@ -1827,45 +1827,12 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
else
{
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ bfd_boolean warned;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sec = h->root.u.def.section;
- if (sec->output_section == NULL)
- {
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- relocation = 0;
- }
- else
- relocation = (h->root.u.def.value
- + sec->output_section->vma
- + sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_undefweak)
- relocation = 0;
- else if (!info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- relocation = 0;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- relocation = 0;
- }
+ RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
+ symtab_hdr, relocation, sec,
+ unresolved_reloc, info,
+ warned);
}
/* When generating a shared object, the relocations handled here are
copied into the output file to be resolved at run time. */
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 601d208d9c..a627e4854f 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -492,7 +492,7 @@ elf_object_p (bfd *abfd)
Elf_Internal_Shdr *i_shdrp; /* Section header table, internal form */
unsigned int shindex;
char *shstrtab; /* Internal copy of section header stringtab */
- struct elf_backend_data *ebd;
+ const struct elf_backend_data *ebd;
struct bfd_preserve preserve;
asection *s;
bfd_size_type amt;
@@ -591,11 +591,11 @@ elf_object_p (bfd *abfd)
for which we do not have a specific backend. */
for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++)
{
- struct elf_backend_data *back;
+ const struct elf_backend_data *back;
if ((*target_ptr)->flavour != bfd_target_elf_flavour)
continue;
- back = (struct elf_backend_data *) (*target_ptr)->backend_data;
+ back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
if (back->elf_machine_code == i_ehdrp->e_machine
|| (back->elf_machine_alt1 != 0
&& back->elf_machine_alt1 == i_ehdrp->e_machine)
@@ -818,7 +818,7 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data)
bfd_boolean *failedp = data;
Elf_Internal_Shdr *rela_hdr;
bfd_vma addr_offset;
- void (*swap_out) PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
+ void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
size_t extsize;
bfd_byte *dst_rela;
unsigned int idx;
@@ -1008,7 +1008,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
Elf_Internal_Sym *isymbuf = NULL;
Elf_External_Versym *xver;
Elf_External_Versym *xverbuf = NULL;
- struct elf_backend_data *ebd;
+ const struct elf_backend_data *ebd;
bfd_size_type amt;
/* Read each raw ELF symbol, converting from external ELF form to
@@ -1238,7 +1238,7 @@ elf_slurp_reloc_table_from_section (bfd *abfd,
asymbol **symbols,
bfd_boolean dynamic)
{
- struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
+ const struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
void *allocated = NULL;
bfd_byte *native_relocs;
arelent *relent;
diff --git a/bfd/elfcore.h b/bfd/elfcore.h
index 865edcd065..81c4cff113 100644
--- a/bfd/elfcore.h
+++ b/bfd/elfcore.h
@@ -76,7 +76,7 @@ elf_core_file_p (bfd *abfd)
Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form. */
Elf_Internal_Phdr *i_phdrp; /* Elf program header, internal form. */
unsigned int phindex;
- struct elf_backend_data *ebd;
+ const struct elf_backend_data *ebd;
struct bfd_preserve preserve;
bfd_size_type amt;
@@ -153,11 +153,11 @@ elf_core_file_p (bfd *abfd)
for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++)
{
- struct elf_backend_data *back;
+ const struct elf_backend_data *back;
if ((*target_ptr)->flavour != bfd_target_elf_flavour)
continue;
- back = (struct elf_backend_data *) (*target_ptr)->backend_data;
+ back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
if (back->elf_machine_code == i_ehdrp->e_machine
|| (back->elf_machine_alt1 != 0
&& i_ehdrp->e_machine == back->elf_machine_alt1)
diff --git a/bfd/elflink.c b/bfd/elflink.c
index cb6b0b2ba1..d53571d448 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -32,7 +32,7 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
asection *s;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign;
/* This function may be called more than once. */
@@ -115,7 +115,7 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
register asection *s;
struct elf_link_hash_entry *h;
struct bfd_link_hash_entry *bh;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (! is_elf_hash_table (info))
return FALSE;
@@ -248,7 +248,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
flagword flags, pltflags;
asection *s;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
.rel[a].bss sections. */
@@ -309,7 +309,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
section into the .bss section of the final image. */
s = bfd_make_section (abfd, ".dynbss");
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
+ || ! bfd_set_section_flags (abfd, s, SEC_ALLOC | SEC_LINKER_CREATED))
return FALSE;
/* The .rel[a].bss section holds copy relocs. This section is not
@@ -1164,7 +1164,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
/* Handle the case where we had a versioned symbol in a dynamic
library and now find a definition in a normal object. In this
case, we make the versioned symbol point to the normal one. */
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
flip->root.type = h->root.type;
h->root.type = bfd_link_hash_indirect;
h->root.u.i.link = (struct bfd_link_hash_entry *) flip;
@@ -1247,7 +1247,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
char *shortname;
struct elf_link_hash_entry *hi;
struct bfd_link_hash_entry *bh;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd_boolean collect;
bfd_boolean dynamic;
char *p;
@@ -1621,7 +1621,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
{
struct elf_assign_sym_version_info *sinfo;
struct bfd_link_info *info;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_info_failed eif;
char *p;
bfd_size_type amt;
@@ -1879,7 +1879,7 @@ elf_link_read_relocs_from_section (bfd *abfd,
void *external_relocs,
Elf_Internal_Rela *internal_relocs)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
const bfd_byte *erela;
const bfd_byte *erelaend;
@@ -1943,7 +1943,7 @@ _bfd_elf_link_read_relocs (bfd *abfd,
Elf_Internal_Shdr *rel_hdr;
void *alloc1 = NULL;
Elf_Internal_Rela *alloc2 = NULL;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (elf_section_data (o)->relocs != NULL)
return elf_section_data (o)->relocs;
@@ -2076,7 +2076,7 @@ _bfd_elf_link_output_relocs (bfd *output_bfd,
Elf_Internal_Shdr *output_rel_hdr;
asection *output_section;
unsigned int *rel_countp = NULL;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
output_section = input_section->output_section;
@@ -2223,7 +2223,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
|| ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd_boolean force_local;
bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
@@ -2238,7 +2238,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
&& h->root.type == bfd_link_hash_undefweak)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
(*bed->elf_backend_hide_symbol) (eif->info, h, TRUE);
}
@@ -2267,7 +2267,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
h->weakdef = NULL;
else
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
(*bed->elf_backend_copy_indirect_symbol) (bed, weakdef, h);
@@ -2286,7 +2286,7 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
{
struct elf_info_failed *eif = data;
bfd *dynobj;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (! is_elf_hash_table (eif->info))
return FALSE;
diff --git a/bfd/elflink.h b/bfd/elflink.h
index c0b2468b7d..48b86cf36f 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -415,7 +415,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
Elf_Internal_Sym *isymbuf = NULL;
Elf_Internal_Sym *isym;
Elf_Internal_Sym *isymend;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd_boolean dt_needed;
struct elf_link_hash_table * hash_table;
bfd_size_type amt;
@@ -1186,7 +1186,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
bfd *common_bfd;
symbol_align = ffs (h->root.u.def.value) - 1;
- if ((h->root.u.def.section->owner->flags & DYNAMIC) == 0)
+ if (h->root.u.def.section->owner != NULL
+ && (h->root.u.def.section->owner->flags & DYNAMIC) == 0)
{
normal_align = h->root.u.def.section->alignment_power;
if (normal_align > symbol_align)
@@ -1888,7 +1889,7 @@ NAME(bfd_elf,size_dynamic_sections) (bfd *output_bfd,
{
bfd_size_type soname_indx;
bfd *dynobj;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_assign_sym_version_info asvinfo;
*sinterpptr = NULL;
@@ -2859,7 +2860,7 @@ elf_link_adjust_relocs (bfd *abfd,
struct elf_link_hash_entry **rel_hash)
{
unsigned int i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_byte *erela;
void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
@@ -2964,7 +2965,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
size_t i, ret, sort_elt, ext_size;
bfd_byte *sort, *s_non_relative, *p;
struct elf_link_sort_rela *sq;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
int i2e = bed->s->int_rels_per_ext_rel;
void (*swap_in) (bfd *, const bfd_byte *, Elf_Internal_Rela *);
void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
@@ -3096,7 +3097,7 @@ elf_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Shdr *symtab_shndx_hdr;
Elf_Internal_Shdr *symstrtab_hdr;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
struct elf_outext_info eoinfo;
bfd_boolean merged;
size_t relativecount = 0;
@@ -4363,24 +4364,19 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
return TRUE;
}
- /* If we are not creating a shared library, and this symbol is
- referenced by a shared library but is not defined anywhere, then
- warn that it is undefined. If we do not do this, the runtime
- linker will complain that the symbol is undefined when the
- program is run. We don't have to worry about symbols that are
- referenced by regular files, because we will already have issued
- warnings for them. */
- if (! finfo->info->relocatable
- && (finfo->info->executable
- || ! finfo->info->allow_shlib_undefined)
- && h->root.type == bfd_link_hash_undefined
+ /* If we have an undefined symbol reference here then it must have
+ come from a shared library that is being linked in. (Undefined
+ references in regular files have already been handled). If we
+ are reporting errors for this situation then do so now. */
+ if (h->root.type == bfd_link_hash_undefined
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
- && ! elf_link_check_versioned_symbol (finfo->info, h))
+ && ! elf_link_check_versioned_symbol (finfo->info, h)
+ && finfo->info->unresolved_syms_in_shared_libs != RM_IGNORE)
{
if (! ((*finfo->info->callbacks->undefined_symbol)
(finfo->info, h->root.root.string, h->root.u.undef.abfd,
- NULL, 0, TRUE)))
+ NULL, 0, finfo->info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)))
{
eoinfo->failed = TRUE;
return FALSE;
@@ -4390,10 +4386,9 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
/* We should also warn if a forced local symbol is referenced from
shared libraries. */
if (! finfo->info->relocatable
- && (! finfo->info->shared || ! finfo->info->allow_shlib_undefined)
+ && (! finfo->info->shared)
&& (h->elf_link_hash_flags
- & (ELF_LINK_FORCED_LOCAL | ELF_LINK_HASH_REF_DYNAMIC
- | ELF_LINK_DYNAMIC_DEF | ELF_LINK_DYNAMIC_WEAK))
+ & (ELF_LINK_FORCED_LOCAL | ELF_LINK_HASH_REF_DYNAMIC | ELF_LINK_DYNAMIC_DEF | ELF_LINK_DYNAMIC_WEAK))
== (ELF_LINK_FORCED_LOCAL | ELF_LINK_HASH_REF_DYNAMIC)
&& ! elf_link_check_versioned_symbol (finfo->info, h))
{
@@ -4541,7 +4536,7 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
|| (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
&& elf_hash_table (finfo->info)->dynamic_sections_created)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bed = get_elf_backend_data (finfo->output_bfd);
if (! ((*bed->elf_backend_finish_dynamic_symbol)
@@ -4687,7 +4682,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
long *pindex;
asection **ppsection;
asection *o;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd_boolean emit_relocs;
struct elf_link_hash_entry **sym_hashes;
@@ -5321,7 +5316,7 @@ elf_reloc_link_order (bfd *output_bfd,
bfd_vma addend;
struct elf_link_hash_entry **rel_hash_ptr;
Elf_Internal_Shdr *rel_hdr;
- struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
Elf_Internal_Rela irel[MAX_INT_RELS_PER_EXT_REL];
bfd_byte *erel;
unsigned int i;
@@ -5509,7 +5504,7 @@ elf_gc_mark (struct bfd_link_info *info,
size_t nlocsyms;
size_t extsymoff;
bfd *input_bfd = sec->owner;
- struct elf_backend_data *bed = get_elf_backend_data (input_bfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (input_bfd);
Elf_Internal_Sym *isym = NULL;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -5727,10 +5722,11 @@ elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp)
pu = h->vtable_parent->vtable_entries_used;
if (pu != NULL)
{
- asection *sec = h->root.u.def.section;
- struct elf_backend_data *bed = get_elf_backend_data (sec->owner);
- unsigned int log_file_align = bed->s->log_file_align;
+ const struct elf_backend_data *bed;
+ unsigned int log_file_align;
+ bed = get_elf_backend_data (h->root.u.def.section->owner);
+ log_file_align = bed->s->log_file_align;
n = h->vtable_parent->vtable_entries_size >> log_file_align;
while (n--)
{
@@ -5751,7 +5747,7 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp)
asection *sec;
bfd_vma hstart, hend;
Elf_Internal_Rela *relstart, *relend, *rel;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
unsigned int log_file_align;
if (h->root.type == bfd_link_hash_warning)
@@ -5914,7 +5910,7 @@ elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED,
struct elf_link_hash_entry *h,
bfd_vma addend)
{
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
unsigned int log_file_align = bed->s->log_file_align;
if (addend >= h->vtable_entries_size)
@@ -5980,7 +5976,7 @@ elf_gc_common_finalize_got_offsets (bfd *abfd,
struct bfd_link_info *info)
{
bfd *i;
- struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_vma gotoff;
/* The GOT offset is relative to the .got section, but the GOT header is
@@ -6183,7 +6179,7 @@ elf_bfd_discard_info (bfd *output_bfd, struct bfd_link_info *info)
struct elf_reloc_cookie cookie;
asection *stab, *eh;
Elf_Internal_Shdr *symtab_hdr;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bfd *abfd;
unsigned int count;
bfd_boolean ret = FALSE;
@@ -6316,7 +6312,7 @@ elf_bfd_discard_info (bfd *output_bfd, struct bfd_link_info *info)
static bfd_boolean
elf_section_ignore_discarded_relocs (asection *sec)
{
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
switch (sec->sec_info_type)
{
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 27ffdddeae..47f457594d 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -211,7 +211,7 @@ static struct bfd_hash_entry *elfNN_ia64_new_elf_hash_entry
PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
const char *string));
static void elfNN_ia64_hash_copy_indirect
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
static void elfNN_ia64_hash_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
@@ -1589,7 +1589,7 @@ elfNN_ia64_new_elf_hash_entry (entry, table, string)
static void
elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
- struct elf_backend_data *bed ATTRIBUTE_UNUSED;
+ const struct elf_backend_data *bed ATTRIBUTE_UNUSED;
struct elf_link_hash_entry *xdir, *xind;
{
struct elfNN_ia64_link_hash_entry *dir, *ind;
@@ -1781,6 +1781,8 @@ elfNN_ia64_create_dynamic_sections (abfd, info)
{
flagword flags = bfd_get_section_flags (abfd, ia64_info->got_sec);
bfd_set_section_flags (abfd, ia64_info->got_sec, SEC_SMALL_DATA | flags);
+ /* The .got section is always aligned at 8 bytes. */
+ bfd_set_section_alignment (abfd, ia64_info->got_sec, 3);
}
if (!get_pltoff (abfd, info, ia64_info))
@@ -2162,7 +2164,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
this may help reduce memory usage and processing time later. */
maybe_dynamic = FALSE;
if (h && ((!info->executable
- && (!info->symbolic || info->allow_shlib_undefined))
+ && (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
|| h->root.type == bfd_link_hash_defweak))
maybe_dynamic = TRUE;
@@ -3852,52 +3854,19 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- long indx;
+ bfd_boolean unresolved_reloc;
+ bfd_boolean warned;
- /* Reloc against global symbol. */
- indx = r_symndx - symtab_hdr->sh_info;
- h = elf_sym_hashes (input_bfd)[indx];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- value = 0;
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- sym_sec = h->root.u.def.section;
-
- /* Detect the cases that sym_sec->output_section is
- expected to be NULL -- all cases in which the symbol
- is defined in another shared module. This includes
- PLT relocs for which we've created a PLT entry and
- other relocs for which we're prepared to create
- dynamic relocations. */
- /* ??? Just accept it NULL and continue. */
+ RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd),
+ r_symndx,
+ symtab_hdr, value, sym_sec,
+ unresolved_reloc, info,
+ warned);
- if (sym_sec->output_section != NULL)
- {
- value = (h->root.u.def.value
- + sym_sec->output_section->vma
- + sym_sec->output_offset);
- }
- }
- else if (h->root.type == bfd_link_hash_undefweak)
+ if (h->root.type == bfd_link_hash_undefweak)
undef_weak_ref = TRUE;
- else if (! info->executable
- && !info->no_undefined
- && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
- ;
- else
- {
- if (! ((*info->callbacks->undefined_symbol)
- (info, h->root.root.string, input_bfd,
- input_section, rel->r_offset,
- (!info->shared || info->no_undefined
- || ELF_ST_VISIBILITY (h->other)))))
- return FALSE;
- continue;
- }
+ else if (warned)
+ continue;
}
hit_addr = contents + rel->r_offset;
@@ -4779,9 +4748,9 @@ elfNN_ia64_reloc_type_class (rela)
static struct bfd_elf_special_section const elfNN_ia64_special_sections[]=
{
- { ".sbss", 0, NULL, 0,
+ { ".sbss", 5, NULL, 0,
SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { ".sdata", 0, NULL, 0,
+ { ".sdata", 6, NULL, 0,
SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
{ NULL, 0, NULL, 0,
0, 0 }
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 4c5496516a..919593d187 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -3008,6 +3008,8 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
}
else
{
+ /* ??? Could we use RELOC_FOR_GLOBAL_SYMBOL here ? */
+
/* For global symbols we look up the symbol in the hash-table. */
h = ((struct mips_elf_link_hash_entry *)
elf_sym_hashes (input_bfd) [r_symndx - extsymoff]);
@@ -3021,7 +3023,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
/* See if this is the special _gp_disp symbol. Note that such a
symbol must always be a global symbol. */
- if (strcmp (h->root.root.root.string, "_gp_disp") == 0
+ if (strcmp (*namep, "_gp_disp") == 0
&& ! NEWABI_P (input_bfd))
{
/* Relocations against _gp_disp are permitted only with
@@ -3054,11 +3056,11 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
addresses. */
symbol = 0;
else if (info->shared
- && !info->no_undefined
+ && info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
symbol = 0;
- else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0 ||
- strcmp (h->root.root.root.string, "_DYNAMIC_LINKING") == 0)
+ else if (strcmp (*namep, "_DYNAMIC_LINK") == 0 ||
+ strcmp (*namep, "_DYNAMIC_LINKING") == 0)
{
/* If this is a dynamic link, we should have created a
_DYNAMIC_LINK symbol or _DYNAMIC_LINKING(for normal mips) symbol
@@ -3075,7 +3077,8 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.root.string, input_bfd,
input_section, relocation->r_offset,
- (!info->shared || info->no_undefined
+ ((info->shared && info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)
+ || (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
|| ELF_ST_VISIBILITY (h->root.other)))))
return bfd_reloc_undefined;
symbol = 0;
@@ -4985,7 +4988,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel_end;
asection *sgot;
asection *sreloc;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
if (info->relocatable)
return TRUE;
@@ -6171,7 +6174,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
const Elf_Internal_Rela *relend;
bfd_vma addend = 0;
bfd_boolean use_saved_addend_p = FALSE;
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
bed = get_elf_backend_data (output_bfd);
relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
@@ -7474,7 +7477,7 @@ _bfd_mips_elf_modify_segment_map (abfd)
unsigned int i, c;
struct elf_segment_map *n;
- low = 0xffffffff;
+ low = ~(bfd_vma) 0;
high = 0;
for (i = 0; i < sizeof sec_names / sizeof sec_names[0]; i++)
{
@@ -7626,7 +7629,7 @@ _bfd_mips_elf_gc_sweep_hook (abfd, info, sec, relocs)
void
_bfd_mips_elf_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
+ const struct elf_backend_data *bed;
struct elf_link_hash_entry *dir, *ind;
{
struct mips_elf_link_hash_entry *dirmips, *indmips;
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index f6459a5de2..71cdc07e79 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -70,7 +70,7 @@ extern bfd_boolean _bfd_mips_elf_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
extern void _bfd_mips_elf_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
+ PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
struct elf_link_hash_entry *));
extern void _bfd_mips_elf_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 9329b2b960..544f8f3647 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -621,7 +621,7 @@ const bfd_target TARGET_BIG_SYM =
#endif
/* backend_data: */
- (PTR) &elfNN_bed
+ &elfNN_bed
};
#endif
@@ -717,6 +717,6 @@ const bfd_target TARGET_LITTLE_SYM =
#endif
/* backend_data: */
- (PTR) &elfNN_bed
+ &elfNN_bed
};
#endif
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 61c8e65771..a428c660c8 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -854,6 +854,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_REL16",
"BFD_RELOC_MIPS_RELGOT",
"BFD_RELOC_MIPS_JALR",
+
"BFD_RELOC_FRV_LABEL16",
"BFD_RELOC_FRV_LABEL24",
"BFD_RELOC_FRV_LO16",
@@ -863,6 +864,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_FRV_GPREL32",
"BFD_RELOC_FRV_GPRELHI",
"BFD_RELOC_FRV_GPRELLO",
+
"BFD_RELOC_MN10300_GOTOFF24",
"BFD_RELOC_MN10300_GOT32",
"BFD_RELOC_MN10300_GOT24",
diff --git a/bfd/libhppa.h b/bfd/libhppa.h
index 52ebf51f61..f6aa23456d 100644
--- a/bfd/libhppa.h
+++ b/bfd/libhppa.h
@@ -1,6 +1,6 @@
/* HP PA-RISC SOM object file format: definitions internal to BFD.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
+ 2003 Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -27,14 +27,6 @@
#define BYTES_IN_WORD 4
#define PA_PAGESIZE 0x1000
-#ifndef INLINE
-#ifdef __GNUC__
-#define INLINE inline
-#else
-#define INLINE
-#endif /* GNU C? */
-#endif /* INLINE */
-
/* The PA instruction set variants. */
enum pa_arch {pa10 = 10, pa11 = 11, pa20 = 20, pa20w = 25};
@@ -164,40 +156,38 @@ enum hppa_reloc_expr_type_alt
/* Some functions to manipulate PA instructions. */
/* Declare the functions with the unused attribute to avoid warnings. */
-static INLINE int sign_extend PARAMS ((int, int)) ATTRIBUTE_UNUSED;
-static INLINE int low_sign_extend PARAMS ((int, int)) ATTRIBUTE_UNUSED;
-static INLINE int sign_unext PARAMS ((int, int)) ATTRIBUTE_UNUSED;
-static INLINE int low_sign_unext PARAMS ((int, int)) ATTRIBUTE_UNUSED;
-static INLINE int re_assemble_3 PARAMS ((int)) ATTRIBUTE_UNUSED;
-static INLINE int re_assemble_12 PARAMS ((int)) ATTRIBUTE_UNUSED;
-static INLINE int re_assemble_14 PARAMS ((int)) ATTRIBUTE_UNUSED;
-static INLINE int re_assemble_16 PARAMS ((int)) ATTRIBUTE_UNUSED;
-static INLINE int re_assemble_17 PARAMS ((int)) ATTRIBUTE_UNUSED;
-static INLINE int re_assemble_21 PARAMS ((int)) ATTRIBUTE_UNUSED;
-static INLINE int re_assemble_22 PARAMS ((int)) ATTRIBUTE_UNUSED;
-static INLINE bfd_signed_vma hppa_field_adjust
- PARAMS ((bfd_vma, bfd_signed_vma,
- enum hppa_reloc_field_selector_type_alt)) ATTRIBUTE_UNUSED;
-static INLINE int bfd_hppa_insn2fmt PARAMS ((bfd *, int)) ATTRIBUTE_UNUSED;
-static INLINE int hppa_rebuild_insn PARAMS ((int, int, int)) ATTRIBUTE_UNUSED;
+static inline int sign_extend (int, int) ATTRIBUTE_UNUSED;
+static inline int low_sign_extend (int, int) ATTRIBUTE_UNUSED;
+static inline int sign_unext (int, int) ATTRIBUTE_UNUSED;
+static inline int low_sign_unext (int, int) ATTRIBUTE_UNUSED;
+static inline int re_assemble_3 (int) ATTRIBUTE_UNUSED;
+static inline int re_assemble_12 (int) ATTRIBUTE_UNUSED;
+static inline int re_assemble_14 (int) ATTRIBUTE_UNUSED;
+static inline int re_assemble_16 (int) ATTRIBUTE_UNUSED;
+static inline int re_assemble_17 (int) ATTRIBUTE_UNUSED;
+static inline int re_assemble_21 (int) ATTRIBUTE_UNUSED;
+static inline int re_assemble_22 (int) ATTRIBUTE_UNUSED;
+static inline bfd_signed_vma hppa_field_adjust
+ (bfd_vma, bfd_signed_vma, enum hppa_reloc_field_selector_type_alt)
+ ATTRIBUTE_UNUSED;
+static inline int bfd_hppa_insn2fmt (bfd *, int) ATTRIBUTE_UNUSED;
+static inline int hppa_rebuild_insn (int, int, int) ATTRIBUTE_UNUSED;
/* The *sign_extend functions are used to assemble various bitfields
taken from an instruction and return the resulting immediate
value. */
-static INLINE int
-sign_extend (x, len)
- int x, len;
+static inline int
+sign_extend (int x, int len)
{
int signbit = (1 << (len - 1));
int mask = (signbit << 1) - 1;
return ((x & mask) ^ signbit) - signbit;
}
-static INLINE int
-low_sign_extend (x, len)
- int x, len;
+static inline int
+low_sign_extend (int x, int len)
{
return (x >> 1) - ((x & 1) << (len - 1));
}
@@ -207,9 +197,8 @@ low_sign_extend (x, len)
insertion into an opcode. pa-risc uses all sorts of weird bitfields
in the instruction to hold the value. */
-static INLINE int
-sign_unext (x, len)
- int x, len;
+static inline int
+sign_unext (int x, int len)
{
int len_ones;
@@ -218,9 +207,8 @@ sign_unext (x, len)
return x & len_ones;
}
-static INLINE int
-low_sign_unext (x, len)
- int x, len;
+static inline int
+low_sign_unext (int x, int len)
{
int temp;
int sign;
@@ -232,34 +220,30 @@ low_sign_unext (x, len)
return (temp << 1) | sign;
}
-static INLINE int
-re_assemble_3 (as3)
- int as3;
+static inline int
+re_assemble_3 (int as3)
{
return (( (as3 & 4) << (13-2))
| ((as3 & 3) << (13+1)));
}
-static INLINE int
-re_assemble_12 (as12)
- int as12;
+static inline int
+re_assemble_12 (int as12)
{
return (( (as12 & 0x800) >> 11)
| ((as12 & 0x400) >> (10 - 2))
| ((as12 & 0x3ff) << (1 + 2)));
}
-static INLINE int
-re_assemble_14 (as14)
- int as14;
+static inline int
+re_assemble_14 (int as14)
{
return (( (as14 & 0x1fff) << 1)
| ((as14 & 0x2000) >> 13));
}
-static INLINE int
-re_assemble_16 (as16)
- int as16;
+static inline int
+re_assemble_16 (int as16)
{
int s, t;
@@ -269,9 +253,8 @@ re_assemble_16 (as16)
return (t ^ s ^ (s >> 1)) | (s >> 15);
}
-static INLINE int
-re_assemble_17 (as17)
- int as17;
+static inline int
+re_assemble_17 (int as17)
{
return (( (as17 & 0x10000) >> 16)
| ((as17 & 0x0f800) << (16 - 11))
@@ -279,9 +262,8 @@ re_assemble_17 (as17)
| ((as17 & 0x003ff) << (1 + 2)));
}
-static INLINE int
-re_assemble_21 (as21)
- int as21;
+static inline int
+re_assemble_21 (int as21)
{
return (( (as21 & 0x100000) >> 20)
| ((as21 & 0x0ffe00) >> 8)
@@ -290,9 +272,8 @@ re_assemble_21 (as21)
| ((as21 & 0x000003) << 12));
}
-static INLINE int
-re_assemble_22 (as22)
- int as22;
+static inline int
+re_assemble_22 (int as22)
{
return (( (as22 & 0x200000) >> 21)
| ((as22 & 0x1f0000) << (21 - 16))
@@ -312,11 +293,10 @@ re_assemble_22 (as22)
This function returns sign extended values in all cases.
*/
-static INLINE bfd_signed_vma
-hppa_field_adjust (sym_val, addend, r_field)
- bfd_vma sym_val;
- bfd_signed_vma addend;
- enum hppa_reloc_field_selector_type_alt r_field;
+static inline bfd_signed_vma
+hppa_field_adjust (bfd_vma sym_val,
+ bfd_signed_vma addend,
+ enum hppa_reloc_field_selector_type_alt r_field)
{
bfd_signed_vma value;
@@ -479,10 +459,8 @@ enum hppa_opcode_type
/* Given a machine instruction, return its format. */
-static INLINE int
-bfd_hppa_insn2fmt (abfd, insn)
- bfd *abfd;
- int insn;
+static inline int
+bfd_hppa_insn2fmt (bfd *abfd, int insn)
{
enum hppa_opcode_type op = get_opcode (insn);
@@ -563,11 +541,8 @@ bfd_hppa_insn2fmt (abfd, insn)
/* Insert VALUE into INSN using R_FORMAT to determine exactly what
bits to change. */
-static INLINE int
-hppa_rebuild_insn (insn, value, r_format)
- int insn;
- int value;
- int r_format;
+static inline int
+hppa_rebuild_insn (int insn, int value, int r_format)
{
switch (r_format)
{
diff --git a/bfd/libpei.h b/bfd/libpei.h
index 72fa7b5f72..9ed9c1224e 100644
--- a/bfd/libpei.h
+++ b/bfd/libpei.h
@@ -332,4 +332,6 @@ bfd_boolean _bfd_XX_bfd_copy_private_section_data
PARAMS ((bfd *, asection *, bfd *, asection *));
/* Macro: Returns true if the bfd is a PE executable as opposed to a PE object file. */
-#define bfd_pe_executable_p(abfd) (strncmp ((abfd)->xvec->name, "pei-", 4) == 0)
+#define bfd_pe_executable_p(abfd) \
+ (strncmp ((abfd)->xvec->name, "pei-", 4) == 0 \
+ || strncmp ((abfd)->xvec->name, "efi-app-", 8) == 0)
diff --git a/bfd/merge.c b/bfd/merge.c
index ec75a7be7e..aa8b334cf1 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -1,5 +1,5 @@
/* SEC_MERGE support.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -88,7 +88,7 @@ struct sec_merge_sec_info
/* The corresponding section. */
asection *sec;
/* Pointer to merge_info pointing to us. */
- PTR *psecinfo;
+ void **psecinfo;
/* A hash table used to hold section content. */
struct sec_merge_hash *htab;
/* First string in this section. */
@@ -97,35 +97,12 @@ struct sec_merge_sec_info
unsigned char contents[1];
};
-static struct bfd_hash_entry *sec_merge_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct sec_merge_hash_entry *sec_merge_hash_lookup
- PARAMS ((struct sec_merge_hash *, const char *, unsigned int, bfd_boolean));
-static struct sec_merge_hash *sec_merge_init
- PARAMS ((unsigned int, bfd_boolean));
-static struct sec_merge_hash_entry *sec_merge_add
- PARAMS ((struct sec_merge_hash *, const char *, unsigned int,
- struct sec_merge_sec_info *));
-static bfd_boolean sec_merge_emit
- PARAMS ((bfd *, struct sec_merge_hash_entry *));
-static int cmplengthentry
- PARAMS ((const PTR, const PTR));
-static int last4_eq
- PARAMS ((const PTR, const PTR));
-static int last_eq
- PARAMS ((const PTR, const PTR));
-static bfd_boolean record_section
- PARAMS ((struct sec_merge_info *, struct sec_merge_sec_info *));
-static void merge_strings
- PARAMS ((struct sec_merge_info *));
/* Routine to create an entry in a section merge hashtab. */
static struct bfd_hash_entry *
-sec_merge_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+sec_merge_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table, const char *string)
{
struct sec_merge_hash_entry *ret = (struct sec_merge_hash_entry *) entry;
@@ -156,11 +133,8 @@ sec_merge_hash_newfunc (entry, table, string)
/* Look up an entry in a section merge hash table. */
static struct sec_merge_hash_entry *
-sec_merge_hash_lookup (table, string, alignment, create)
- struct sec_merge_hash *table;
- const char *string;
- unsigned int alignment;
- bfd_boolean create;
+sec_merge_hash_lookup (struct sec_merge_hash *table, const char *string,
+ unsigned int alignment, bfd_boolean create)
{
register const unsigned char *s;
register unsigned long hash;
@@ -261,9 +235,7 @@ sec_merge_hash_lookup (table, string, alignment, create)
/* Create a new hash table. */
static struct sec_merge_hash *
-sec_merge_init (entsize, strings)
- unsigned int entsize;
- bfd_boolean strings;
+sec_merge_init (unsigned int entsize, bfd_boolean strings)
{
struct sec_merge_hash *table;
bfd_size_type amt = sizeof (struct sec_merge_hash);
@@ -291,11 +263,8 @@ sec_merge_init (entsize, strings)
already present. */
static struct sec_merge_hash_entry *
-sec_merge_add (tab, str, alignment, secinfo)
- struct sec_merge_hash *tab;
- const char *str;
- unsigned int alignment;
- struct sec_merge_sec_info *secinfo;
+sec_merge_add (struct sec_merge_hash *tab, const char *str,
+ unsigned int alignment, struct sec_merge_sec_info *secinfo)
{
register struct sec_merge_hash_entry *entry;
@@ -318,9 +287,7 @@ sec_merge_add (tab, str, alignment, secinfo)
}
static bfd_boolean
-sec_merge_emit (abfd, entry)
- register bfd *abfd;
- struct sec_merge_hash_entry *entry;
+sec_merge_emit (register bfd *abfd, struct sec_merge_hash_entry *entry)
{
struct sec_merge_sec_info *secinfo = entry->secinfo;
asection *sec = secinfo->sec;
@@ -340,7 +307,7 @@ sec_merge_emit (abfd, entry)
if (len)
{
len = entry->alignment - len;
- if (bfd_bwrite ((PTR) pad, (bfd_size_type) len, abfd) != len)
+ if (bfd_bwrite (pad, (bfd_size_type) len, abfd) != len)
break;
off += len;
}
@@ -348,7 +315,7 @@ sec_merge_emit (abfd, entry)
str = entry->root.string;
len = entry->len;
- if (bfd_bwrite ((PTR) str, (bfd_size_type) len, abfd) != len)
+ if (bfd_bwrite (str, (bfd_size_type) len, abfd) != len)
break;
off += len;
@@ -364,11 +331,7 @@ sec_merge_emit (abfd, entry)
pass of the linker. */
bfd_boolean
-_bfd_merge_section (abfd, psinfo, sec, psecinfo)
- bfd *abfd;
- PTR *psinfo;
- asection *sec;
- PTR *psecinfo;
+_bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
{
struct sec_merge_info *sinfo;
struct sec_merge_sec_info *secinfo;
@@ -419,7 +382,7 @@ _bfd_merge_section (abfd, psinfo, sec, psecinfo)
goto error_return;
sinfo->next = (struct sec_merge_info *) *psinfo;
sinfo->chain = NULL;
- *psinfo = (PTR) sinfo;
+ *psinfo = sinfo;
sinfo->htab = sec_merge_init (sec->entsize, (sec->flags & SEC_STRINGS));
if (sinfo->htab == NULL)
goto error_return;
@@ -460,9 +423,7 @@ _bfd_merge_section (abfd, psinfo, sec, psecinfo)
/* Compare two sec_merge_hash_entry structures. This is called via qsort. */
static int
-cmplengthentry (a, b)
- const PTR a;
- const PTR b;
+cmplengthentry (const void *a, const void *b)
{
struct sec_merge_hash_entry * A = *(struct sec_merge_hash_entry **) a;
struct sec_merge_hash_entry * B = *(struct sec_merge_hash_entry **) b;
@@ -476,9 +437,7 @@ cmplengthentry (a, b)
}
static int
-last4_eq (a, b)
- const PTR a;
- const PTR b;
+last4_eq (const void *a, const void *b)
{
struct sec_merge_hash_entry * A = (struct sec_merge_hash_entry *) a;
struct sec_merge_hash_entry * B = (struct sec_merge_hash_entry *) b;
@@ -504,9 +463,7 @@ last4_eq (a, b)
}
static int
-last_eq (a, b)
- const PTR a;
- const PTR b;
+last_eq (const void *a, const void *b)
{
struct sec_merge_hash_entry * A = (struct sec_merge_hash_entry *) a;
struct sec_merge_hash_entry * B = (struct sec_merge_hash_entry *) b;
@@ -538,9 +495,8 @@ last_eq (a, b)
/* Record one section into the hash table. */
static bfd_boolean
-record_section (sinfo, secinfo)
- struct sec_merge_info *sinfo;
- struct sec_merge_sec_info *secinfo;
+record_section (struct sec_merge_info *sinfo,
+ struct sec_merge_sec_info *secinfo)
{
asection *sec = secinfo->sec;
struct sec_merge_hash_entry *entry;
@@ -623,8 +579,7 @@ error_return:
/* This is a helper function for _bfd_merge_sections. It attempts to
merge strings matching suffixes of longer strings. */
static void
-merge_strings (sinfo)
- struct sec_merge_info *sinfo;
+merge_strings (struct sec_merge_info *sinfo)
{
struct sec_merge_hash_entry **array, **a, **end, *e;
struct sec_merge_sec_info *secinfo;
@@ -663,7 +618,7 @@ merge_strings (sinfo)
unsigned int c;
unsigned int i;
const unsigned char *s;
- PTR *p;
+ void **p;
e = *a;
e->u.entsize = sinfo->htab->entsize;
@@ -692,7 +647,7 @@ merge_strings (sinfo)
continue;
}
else
- *p = (PTR) e;
+ *p = e;
}
s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
hash = 0;
@@ -714,7 +669,7 @@ merge_strings (sinfo)
e->alignment = 0;
}
else
- *p = (PTR) e;
+ *p = e;
}
alloc_failure:
@@ -770,10 +725,8 @@ alloc_failure:
with _bfd_merge_section. */
bfd_boolean
-_bfd_merge_sections (abfd, xsinfo, remove_hook)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR xsinfo;
- void (*remove_hook) PARAMS((bfd *, asection *));
+_bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo,
+ void (*remove_hook) (bfd *, asection *))
{
struct sec_merge_info *sinfo;
@@ -837,7 +790,7 @@ _bfd_merge_sections (abfd, xsinfo, remove_hook)
/* Finally shrink all input sections which have not made it into
the hash table at all. */
for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
- if (secinfo->first == NULL)
+ if (secinfo->first == NULL)
secinfo->sec->_cooked_size = 0;
}
@@ -847,10 +800,7 @@ _bfd_merge_sections (abfd, xsinfo, remove_hook)
/* Write out the merged section. */
bfd_boolean
-_bfd_write_merged_section (output_bfd, sec, psecinfo)
- bfd *output_bfd;
- asection *sec;
- PTR psecinfo;
+_bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo)
{
struct sec_merge_sec_info *secinfo;
file_ptr pos;
@@ -875,11 +825,8 @@ _bfd_write_merged_section (output_bfd, sec, psecinfo)
section and writes the new section back into *PSEC. */
bfd_vma
-_bfd_merged_section_offset (output_bfd, psec, psecinfo, offset, addend)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- asection **psec;
- PTR psecinfo;
- bfd_vma offset, addend;
+_bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
+ void *psecinfo, bfd_vma offset, bfd_vma addend)
{
struct sec_merge_sec_info *secinfo;
struct sec_merge_hash_entry *entry;
diff --git a/bfd/po/fr.po b/bfd/po/fr.po
index 805904bce0..831daffae3 100644
--- a/bfd/po/fr.po
+++ b/bfd/po/fr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GNU bfd 2.14rel030712\n"
"POT-Creation-Date: 2003-07-11 13:53+0930\n"
-"PO-Revision-Date: 2003-07-22 08:00-0500\n"
+"PO-Revision-Date: 2003-08-05 08:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
@@ -598,7 +598,7 @@ msgstr "%s: AVERTISSEMENT: relocalisation sans solution vers le symbole « %s » d
#: elf32-openrisc.c:436 elf32-v850.c:1777 elf32-xstormy16.c:976
#: elf64-mmix.c:1332
msgid "internal error: out of range error"
-msgstr "erreur interne: hors gamme"
+msgstr "erreur interne: hors limite"
#: elf-m10200.c:446 elf-m10300.c:1699 elf32-arm.h:2092 elf32-avr.c:816
#: elf32-cris.c:1394 elf32-d10v.c:574 elf32-fr30.c:638 elf32-frv.c:819
@@ -2059,7 +2059,7 @@ msgstr "%s: longuer erronée de section dans ihex_read_section"
#: ihex.c:872
#, c-format
msgid "%s: address 0x%s out of range for Intel Hex file"
-msgstr "%s: adresse 0x%s hors gamme pour le fichier Intel hexadécimal"
+msgstr "%s: adresse 0x%s hors limite pour le fichier Intel hexadécimal"
#: libbfd.c:861
#, c-format
diff --git a/bfd/po/sv.po b/bfd/po/sv.po
index f63790bd22..e0b667cb4b 100644
--- a/bfd/po/sv.po
+++ b/bfd/po/sv.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: bfd 2.14rel030712\n"
"POT-Creation-Date: 2003-07-11 13:53+0930\n"
-"PO-Revision-Date: 2003-07-17 22:55+0200\n"
+"PO-Revision-Date: 2003-08-14 22:40+0200\n"
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
@@ -1750,7 +1750,7 @@ msgstr "%s: odefinierat symbolnamn med version %s"
#: elflink.c:2142
#, c-format
msgid "%s: relocation size mismatch in %s section %s"
-msgstr "%s: omlokaliseringsstorleken stämmer inte överens i sektionen %s %s"
+msgstr "%s: omlokaliseringsstorleken stämmer inte överens i %s, sektion %s"
#: elflink.c:2434
#, c-format
@@ -1851,7 +1851,7 @@ msgstr "%s: ogiltigt sektionsnamn \"%s\""
#: elfxx-mips.c:9025
#, c-format
msgid "%s: endianness incompatible with that of the selected emulation"
-msgstr "%s: endianess inkompatibel med den för den valda emuleringen"
+msgstr "%s: endianness inkompatibel med den för den valda emuleringen"
#: elfxx-mips.c:9037
#, c-format
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 58c9c51714..6318190cc3 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -2116,7 +2116,10 @@ ENUMX
BFD_RELOC_MIPS_RELGOT
ENUMX
BFD_RELOC_MIPS_JALR
+ENUMDOC
+ MIPS ELF relocations.
COMMENT
+
ENUM
BFD_RELOC_FRV_LABEL16
ENUMX
@@ -2138,11 +2141,7 @@ ENUMX
ENUMDOC
Fujitsu Frv Relocations.
COMMENT
-COMMENT
-ENUMDOC
- MIPS ELF relocations.
-COMMENT
ENUM
BFD_RELOC_MN10300_GOTOFF24
ENUMDOC
diff --git a/bfd/simple.c b/bfd/simple.c
index 256fd913b8..c2a741c6f9 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -140,6 +140,28 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
bfd_byte *contents, *data;
int storage_needed;
void *saved_offsets;
+ bfd_boolean saved_reloc_done = sec->reloc_done;
+
+#undef RETURN
+#define RETURN(x) \
+ do \
+ { \
+ sec->reloc_done = saved_reloc_done; \
+ return (x); \
+ } \
+ while (0)
+
+ /* Foul hack to prevent bfd_section_size aborts. The reloc_done flag
+ only controls that macro (and the related size macros), selecting
+ between _raw_size and _cooked_size. We may be called with relocation
+ done or not, so we need to save the done-flag and mark the section as
+ not relocated.
+
+ Debug sections won't change size while we're only relocating. There
+ may be trouble here someday if it tries to run relaxation
+ unexpectedly, so make sure. */
+ BFD_ASSERT (sec->_raw_size == sec->_cooked_size);
+ sec->reloc_done = 0;
if (! (sec->flags & SEC_RELOC))
{
@@ -153,7 +175,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
if (contents)
bfd_get_section_contents (abfd, sec, contents, 0, size);
- return contents;
+ RETURN (contents);
}
/* In order to use bfd_get_relocated_section_contents, we need
@@ -183,7 +205,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
{
data = bfd_malloc (bfd_section_size (abfd, sec));
if (data == NULL)
- return NULL;
+ RETURN (NULL);
outbuf = data;
}
@@ -202,7 +224,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
{
if (data)
free (data);
- return NULL;
+ RETURN (NULL);
}
bfd_map_over_sections (abfd, simple_save_output_info, saved_offsets);
@@ -243,15 +265,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
bfd_map_over_sections (abfd, simple_restore_output_info, saved_offsets);
free (saved_offsets);
- /* Foul hack to prevent bfd_section_size aborts. This flag only controls
- that macro (and the related size macros), selecting between _raw_size
- and _cooked_size. Debug sections won't change size while we're only
- relocating. There may be trouble here someday if it tries to run
- relaxation unexpectedly, so make sure. */
- BFD_ASSERT (sec->_raw_size == sec->_cooked_size);
- sec->reloc_done = 0;
-
bfd_link_hash_table_free (abfd, link_info.hash);
- return contents;
+ RETURN (contents);
}
diff --git a/bfd/targets.c b/bfd/targets.c
index 0ce77a935b..c3212a9564 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -477,7 +477,7 @@ to find an alternative output format that is suitable.
. {* Data for use by back-end routines, which isn't
. generic enough to belong in this structure. *}
-. void *backend_data;
+. const void *backend_data;
.
.} bfd_target;
.
diff --git a/bfd/version.h b/bfd/version.h
index 20f1686ec5..445ac0fa99 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030805
+#define BFD_VERSION_DATE 20030917
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/config-ml.in b/config-ml.in
index 0a2f103d3f..865275ce3d 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -1,6 +1,32 @@
# Configure fragment invoked in the post-target section for subdirs
# wanting multilib support.
#
+# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+#
+# This file 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 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# Please report bugs to <gcc-bugs@gnu.org>
+# and send patches to <gcc-patches@gnu.org>.
+
# It is advisable to support a few --enable/--disable options to let the
# user select which libraries s/he really wants.
#
@@ -740,7 +766,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
fi
# find compiler flag corresponding to ${ml_dir}
- for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
+ for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
dir=`echo $i | sed -e 's/;.*$//'`
if [ "${dir}" = "${ml_dir}" ]; then
flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`
diff --git a/config.sub b/config.sub
index 725707f709..dfeed485c2 100755
--- a/config.sub
+++ b/config.sub
@@ -234,7 +234,7 @@ case $basic_machine in
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
- | ip2k \
+ | iq2000 | ip2k \
| m32r | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
@@ -304,7 +304,7 @@ case $basic_machine in
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* \
+ | iq2000-* | ip2k-* \
| m32r-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
diff --git a/config/no-executables.m4 b/config/no-executables.m4
new file mode 100644
index 0000000000..ca26b7112c
--- /dev/null
+++ b/config/no-executables.m4
@@ -0,0 +1,61 @@
+# GCC_NO_EXECUTABLES
+# -----------------
+# FIXME: The GCC team has specific needs which the current Autoconf
+# framework cannot solve elegantly. This macro implements a dirty
+# hack until Autoconf is able to provide the services its users
+# need.
+#
+# Several of the support libraries that are often built with GCC can't
+# assume the tool-chain is already capable of linking a program: the
+# compiler often expects to be able to link with some of such
+# libraries.
+#
+# In several of these libraries, workarounds have been introduced to
+# avoid the AC_PROG_CC_WORKS test, that would just abort their
+# configuration. The introduction of AC_EXEEXT, enabled either by
+# libtool or by CVS autoconf, have just made matters worse.
+#
+# Unlike the previous AC_NO_EXECUTABLES, this test does not
+# disable link tests at autoconf time, but at configure time.
+# This allows AC_NO_EXECUTABLES to be invoked conditionally.
+AC_DEFUN_ONCE([GCC_NO_EXECUTABLES],
+[m4_divert_push([KILL])
+
+AC_BEFORE([$0], [_AC_COMPILER_EXEEXT])
+AC_BEFORE([$0], [AC_LINK_IFELSE])
+
+m4_define([_AC_COMPILER_EXEEXT],
+AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
+# FIXME: Cleanup?
+AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes])
+if test x$gcc_no_link = xyes; then
+ # Setting cross_compile will disable run tests; it will
+ # also disable AC_CHECK_FILE but that's generally
+ # correct if we can't link.
+ cross_compiling=yes
+ EXEEXT=
+else
+ m4_defn([_AC_COMPILER_EXEEXT])dnl
+fi
+)
+
+m4_define([AC_LINK_IFELSE],
+if test x$gcc_no_link = xyes; then
+ AC_MSG_ERROR([Link tests are not allowed after [[$0]].])
+fi
+m4_defn([AC_LINK_IFELSE]))
+
+dnl This is a shame. We have to provide a default for some link tests,
+dnl similar to the default for run tests.
+m4_define([AC_FUNC_MMAP],
+if test x$gcc_no_link = xyes; then
+ if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
+ ac_cv_func_mmap_fixed_mapped=no
+ fi
+fi
+if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
+ m4_defn([AC_FUNC_MMAP])
+fi)
+
+m4_divert_pop()dnl
+])# GCC_NO_EXECUTABLES
diff --git a/configure b/configure
index 55d562a706..b204110f11 100755
--- a/configure
+++ b/configure
@@ -794,8 +794,20 @@ progname=$0
# if PWD already has a value, it is probably wrong.
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
-# Export original configure arguments for use by sub-configures.
-TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
+# Export original configure arguments for use by sub-configures. These
+# will be expanded once by make, and once by the shell, so they need to
+# have '$' quoted for make, and then each argument quoted for the shell.
+# What's more, the 'echo' below might expand backslashes.
+cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+tmp="'$progname'"
+for ac_arg
+do
+ tmp="$tmp '"`echo "$ac_arg" | sed -f conftestsed`
+done
+rm -f conftestsed
+TOPLEVEL_CONFIGURE_ARGUMENTS="$tmp"
moveifchange=${srcdir}/move-if-change
@@ -991,7 +1003,8 @@ esac
# If both --with-headers and --with-libs are specified, default to
# --without-newlib.
-if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
+if test x"${with_headers}" != x && test x"${with_headers} != xno \
+ && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
if test x"${with_newlib}" = x ; then
with_newlib=no
fi
@@ -1068,10 +1081,14 @@ case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- *-*-darwin*)
+ powerpc-*-darwin*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
noconfigdirs="$noconfigdirs target-libobjc"
;;
+ *-*-darwin*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
+ noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
+ ;;
*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
@@ -1123,7 +1140,7 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
- alpha*-*-freebsd*)
+ alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
alpha*-*-*)
@@ -1244,7 +1261,7 @@ case "${target}" in
i[3456789]86-*-coff | i[3456789]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- i[3456789]86-*-freebsd*)
+ i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
i[3456789]86-*-linux*)
@@ -1671,7 +1688,7 @@ copy_dirs=
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
-if test x"${with_headers}" != x ; then
+if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
if test x${is_cross_compiler} = xno ; then
echo 1>&2 '***' --with-headers is only supported when cross compiling
exit 1
@@ -1688,7 +1705,7 @@ fi
# Handle --with-libs=XXX. If the value is not "yes", the contents of
# the name directories are copied to $(tooldir)/lib. Multiple directories
# are permitted.
-if test x"${with_libs}" != x ; then
+if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
if test x${is_cross_compiler} = xno ; then
echo 1>&2 '***' --with-libs is only supported when cross compiling
exit 1
@@ -2500,20 +2517,24 @@ serialization_dependencies=serdep.tmp
# Base args. Strip norecursion, cache-file, srcdir, host, build,
# target and nonopt. These are the ones we might not want to pass
# down to subconfigures.
-baseargs=`echo " ${ac_configure_args} " | \
- sed -e 's/ --no[^ ]* / /' \
- -e 's/ --c[a-z-]*[= ][^ ]* / /' \
- -e 's/ --sr[a-z-]*[= ][^ ]* / /' \
- -e 's/ --ho[a-z-]*[= ][^ ]* / /' \
- -e 's/ --bu[a-z-]*[= ][^ ]* / /' \
- -e 's/ --t[a-z-]*[= ][^ ]* / /' \
- -e 's/ -cache-file[= ][^ ]* / /' \
- -e 's/ -srcdir[= ][^ ]* / /' \
- -e 's/ -host[= ][^ ]* / /' \
- -e 's/ -build[= ][^ ]* / /' \
- -e 's/ -target[= ][^ ]* / /' \
- -e "s/ [^' -][^ ]* / /" \
- -e 's/^ *//;s/ *$//'`
+cat <<\EOF_SED > conftestsed
+s/ --no[^ ]* / /
+s/ --c[a-z-]*[= ][^ ]* / /
+s/ --sr[a-z-]*[= ][^ ]* / /
+s/ --ho[a-z-]*[= ][^ ]* / /
+s/ --bu[a-z-]*[= ][^ ]* / /
+s/ --t[a-z-]*[= ][^ ]* / /
+s/ -cache-file[= ][^ ]* / /
+s/ -srcdir[= ][^ ]* / /
+s/ -host[= ][^ ]* / /
+s/ -build[= ][^ ]* / /
+s/ -target[= ][^ ]* / /
+s/ [^' -][^ ]* / /
+s/^ *//;s/ *$//
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+baseargs=`echo " ${ac_configure_args} " | sed -f conftestsed`
+rm -f conftestsed
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
@@ -2668,7 +2689,9 @@ libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_
raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
if test "x${CXX_FOR_TARGET+set}" = xset; then
- :
+ if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then
+ RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
+ fi
elif test -d ${srcdir}/gcc; then
# We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
# of g++ for linking C++ or Java, because g++ has -shared-libgcc by
@@ -2762,7 +2785,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2766: checking for $ac_word" >&5
+echo "configure:2789: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2795,7 +2818,7 @@ if test -z "$ac_cv_prog_AR" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2799: checking for $ac_word" >&5
+echo "configure:2822: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2834,7 +2857,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2838: checking for $ac_word" >&5
+echo "configure:2861: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2867,7 +2890,7 @@ if test -z "$ac_cv_prog_AS" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2871: checking for $ac_word" >&5
+echo "configure:2894: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2906,7 +2929,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2910: checking for $ac_word" >&5
+echo "configure:2933: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2939,7 +2962,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2943: checking for $ac_word" >&5
+echo "configure:2966: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2978,7 +3001,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2982: checking for $ac_word" >&5
+echo "configure:3005: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3011,7 +3034,7 @@ if test -z "$ac_cv_prog_LD" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3015: checking for $ac_word" >&5
+echo "configure:3038: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3050,7 +3073,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3054: checking for $ac_word" >&5
+echo "configure:3077: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3083,7 +3106,7 @@ if test -z "$ac_cv_prog_NM" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3087: checking for $ac_word" >&5
+echo "configure:3110: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3122,7 +3145,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3126: checking for $ac_word" >&5
+echo "configure:3149: 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
@@ -3155,7 +3178,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3159: checking for $ac_word" >&5
+echo "configure:3182: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3194,7 +3217,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3198: checking for $ac_word" >&5
+echo "configure:3221: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3227,7 +3250,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3231: checking for $ac_word" >&5
+echo "configure:3254: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3266,7 +3289,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3270: checking for $ac_word" >&5
+echo "configure:3293: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3299,7 +3322,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3303: checking for $ac_word" >&5
+echo "configure:3326: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3338,7 +3361,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3342: checking for $ac_word" >&5
+echo "configure:3365: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3371,7 +3394,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3375: checking for $ac_word" >&5
+echo "configure:3398: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3419,7 +3442,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3423: checking for $ac_word" >&5
+echo "configure:3446: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3452,7 +3475,7 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3456: checking for $ac_word" >&5
+echo "configure:3479: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3491,7 +3514,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3495: checking for $ac_word" >&5
+echo "configure:3518: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3524,7 +3547,7 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3528: checking for $ac_word" >&5
+echo "configure:3551: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3563,7 +3586,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3567: checking for $ac_word" >&5
+echo "configure:3590: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3596,7 +3619,7 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3600: checking for $ac_word" >&5
+echo "configure:3623: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3635,7 +3658,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3639: checking for $ac_word" >&5
+echo "configure:3662: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3668,7 +3691,7 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3672: checking for $ac_word" >&5
+echo "configure:3695: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3707,7 +3730,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3711: checking for $ac_word" >&5
+echo "configure:3734: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3740,7 +3763,7 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3744: checking for $ac_word" >&5
+echo "configure:3767: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3779,7 +3802,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3783: checking for $ac_word" >&5
+echo "configure:3806: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3812,7 +3835,7 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3816: checking for $ac_word" >&5
+echo "configure:3839: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3851,7 +3874,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3855: checking for $ac_word" >&5
+echo "configure:3878: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3884,7 +3907,7 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3888: checking for $ac_word" >&5
+echo "configure:3911: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3951,7 +3974,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:3955: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:3978: 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"
diff --git a/configure.in b/configure.in
index d1a2e1ac02..ae3ff2ae8c 100644
--- a/configure.in
+++ b/configure.in
@@ -66,8 +66,20 @@ progname=$0
# if PWD already has a value, it is probably wrong.
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
-# Export original configure arguments for use by sub-configures.
-TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
+# Export original configure arguments for use by sub-configures. These
+# will be expanded once by make, and once by the shell, so they need to
+# have '$' quoted for make, and then each argument quoted for the shell.
+# What's more, the 'echo' below might expand backslashes.
+cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+tmp="'$progname'"
+for ac_arg
+do
+ tmp="$tmp '"`echo "$ac_arg" | sed -f conftestsed`
+done
+rm -f conftestsed
+TOPLEVEL_CONFIGURE_ARGUMENTS="$tmp"
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
moveifchange=${srcdir}/move-if-change
@@ -242,7 +254,8 @@ esac
# If both --with-headers and --with-libs are specified, default to
# --without-newlib.
-if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
+if test x"${with_headers}" != x && test x"${with_headers} != xno \
+ && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
if test x"${with_newlib}" = x ; then
with_newlib=no
fi
@@ -319,10 +332,14 @@ case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- *-*-darwin*)
+ powerpc-*-darwin*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
noconfigdirs="$noconfigdirs target-libobjc"
;;
+ *-*-darwin*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
+ noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
+ ;;
*-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
@@ -374,7 +391,7 @@ case "${target}" in
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
- alpha*-*-freebsd*)
+ alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
alpha*-*-*)
@@ -495,7 +512,7 @@ case "${target}" in
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
- i[[3456789]]86-*-freebsd*)
+ i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
i[[3456789]]86-*-linux*)
@@ -922,7 +939,7 @@ copy_dirs=
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
-if test x"${with_headers}" != x ; then
+if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
if test x${is_cross_compiler} = xno ; then
echo 1>&2 '***' --with-headers is only supported when cross compiling
exit 1
@@ -939,7 +956,7 @@ fi
# Handle --with-libs=XXX. If the value is not "yes", the contents of
# the name directories are copied to $(tooldir)/lib. Multiple directories
# are permitted.
-if test x"${with_libs}" != x ; then
+if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
if test x${is_cross_compiler} = xno ; then
echo 1>&2 '***' --with-libs is only supported when cross compiling
exit 1
@@ -1750,20 +1767,24 @@ AC_SUBST_FILE(serialization_dependencies)
# Base args. Strip norecursion, cache-file, srcdir, host, build,
# target and nonopt. These are the ones we might not want to pass
# down to subconfigures.
-baseargs=`echo " ${ac_configure_args} " | \
- sed -e 's/ --no[[^ ]]* / /' \
- -e 's/ --c[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ --sr[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ --ho[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ --bu[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ --t[[a-z-]]*[[= ]][[^ ]]* / /' \
- -e 's/ -cache-file[[= ]][[^ ]]* / /' \
- -e 's/ -srcdir[[= ]][[^ ]]* / /' \
- -e 's/ -host[[= ]][[^ ]]* / /' \
- -e 's/ -build[[= ]][[^ ]]* / /' \
- -e 's/ -target[[= ]][[^ ]]* / /' \
- -e "s/ [[^' -][^ ]*] / /" \
- -e 's/^ *//;s/ *$//'`
+cat <<\EOF_SED > conftestsed
+s/ --no[[^ ]]* / /
+s/ --c[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --sr[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --ho[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --bu[[a-z-]]*[[= ]][[^ ]]* / /
+s/ --t[[a-z-]]*[[= ]][[^ ]]* / /
+s/ -cache-file[[= ]][[^ ]]* / /
+s/ -srcdir[[= ]][[^ ]]* / /
+s/ -host[[= ]][[^ ]]* / /
+s/ -build[[= ]][[^ ]]* / /
+s/ -target[[= ]][[^ ]]* / /
+s/ [[^' -][^ ]*] / /
+s/^ *//;s/ *$//
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+baseargs=`echo " ${ac_configure_args} " | sed -f conftestsed`
+rm -f conftestsed
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
@@ -1918,7 +1939,9 @@ libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_
raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
if test "x${CXX_FOR_TARGET+set}" = xset; then
- :
+ if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then
+ RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
+ fi
elif test -d ${srcdir}/gcc; then
# We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
# of g++ for linking C++ or Java, because g++ has -shared-libgcc by
diff --git a/include/ChangeLog b/include/ChangeLog
index 5145a48ab8..331aef1e90 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,37 @@
+2003-09-15 Andrew Cagney <cagney@redhat.com>
+
+ * floatformat.h (floatformat_to_double): Make input buffer constant.
+ (floatformat_from_double, floatformat_is_valid): Ditto.
+
+2003-09-15 Andrew Cagney <cagney@redhat.com>
+
+ * floatformat.h (struct floatformat): Make "exp_bias" signed.
+
+2003-09-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * floatformat.h (floatformat_is_valid): Add prototype.
+
+2003-08-27 Andrew Cagney <cagney@redhat.com>
+
+ * dis-asm.h (init_disassemble_info): Declare.
+ (INIT_DISASSEMBLE_INFO): Redefine as a call to
+ init_disassemble_info.
+ (INIT_DISASSEMBLE_INFO_NO_ARCH): Ditto.
+
+2003-08-20 Nick Clifton <nickc@redhat.com>
+
+ * bfdlink.h (enum report_method): New enum. Describes how to
+ report something.
+ (struct bfd_link_info): Delete fields 'no_undefined' and
+ 'allow_shlib_undefined'. Replace with
+ 'unresolved_symbols_in_objects' and
+ 'unresolved_symbols_in_shared_libs'.
+
+2003-08-07 Alan Modra <amodra@bigpond.net.au>
+
+ * bfdlink.h: Remove PARAMS macro. Replace PTR with void *.
+ * dis-asm.h: Likewise.
+
2003-07-09 Bob Wilson <bob.wilson@acm.org>
* xtensa-config.h: Undef all macros before defining them.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 10746ee98e..c174dcdc69 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -171,26 +171,26 @@ struct bfd_link_hash_table
follows bfd_link_hash_indirect and bfd_link_hash_warning links to
the real symbol. */
extern struct bfd_link_hash_entry *bfd_link_hash_lookup
- PARAMS ((struct bfd_link_hash_table *, const char *, bfd_boolean create,
- bfd_boolean copy, bfd_boolean follow));
+ (struct bfd_link_hash_table *, const char *, bfd_boolean create,
+ bfd_boolean copy, bfd_boolean follow);
/* Look up an entry in the main linker hash table if the symbol might
be wrapped. This should only be used for references to an
undefined symbol, not for definitions of a symbol. */
extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
- PARAMS ((bfd *, struct bfd_link_info *, const char *, bfd_boolean,
- bfd_boolean, bfd_boolean));
+ (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
+ bfd_boolean, bfd_boolean);
/* Traverse a link hash table. */
extern void bfd_link_hash_traverse
- PARAMS ((struct bfd_link_hash_table *,
- bfd_boolean (*) (struct bfd_link_hash_entry *, PTR),
- PTR));
+ (struct bfd_link_hash_table *,
+ bfd_boolean (*) (struct bfd_link_hash_entry *, void *),
+ void *);
/* Add an entry to the undefs list. */
extern void bfd_link_add_undef
- PARAMS ((struct bfd_link_hash_table *, struct bfd_link_hash_entry *));
+ (struct bfd_link_hash_table *, struct bfd_link_hash_entry *);
struct bfd_sym_chain
{
@@ -198,6 +198,19 @@ struct bfd_sym_chain
const char *name;
};
+/* How to handle unresolved symbols.
+ There are four possibilities which are enumerated below: */
+enum report_method
+{
+ /* This is the initial value when then link_info structure is created.
+ It allows the various stages of the linker to determine whether they
+ allowed to set the value. */
+ RM_NOT_YET_SET = 0,
+ RM_IGNORE,
+ RM_GENERATE_WARNING,
+ RM_GENERATE_ERROR
+};
+
/* This structure holds all the information needed to communicate
between BFD and the linker when doing a link. */
@@ -238,24 +251,6 @@ struct bfd_link_info
need much more time and therefore must be explicitly selected. */
unsigned int optimize: 1;
- /* TRUE if BFD should generate errors for undefined symbols
- even if generating a shared object. */
- unsigned int no_undefined: 1;
-
- /* TRUE if BFD should allow undefined symbols in shared objects even
- when no_undefined is set to disallow undefined symbols. The net
- result will be that undefined symbols in regular objects will
- still trigger an error, but undefined symbols in shared objects
- will be ignored. The implementation of no_undefined makes the
- assumption that the runtime linker will choke on undefined
- symbols. However there is at least one system (BeOS) where
- undefined symbols in shared libraries is normal since the kernel
- patches them at load time to select which function is most
- appropriate for the current architecture. I.E. dynamically
- select an appropriate memset function. Apparently it is also
- normal for HPPA shared libraries to have undefined symbols. */
- unsigned int allow_shlib_undefined: 1;
-
/* TRUE if ok to have multiple definition. */
unsigned int allow_multiple_definition: 1;
@@ -305,6 +300,17 @@ struct bfd_link_info
flags. */
unsigned int noexecstack: 1;
+ /* What to do with unresolved symbols in an object file.
+ When producing static binaries the default is GENERATE_ERROR.
+ When producing dynamic binaries the default is IGNORE. The
+ assumption with dynamic binaries is that the reference will be
+ resolved at load/execution time. */
+ enum report_method unresolved_syms_in_objects;
+
+ /* What to do with unresolved symbols in a shared library.
+ The same defaults apply. */
+ enum report_method unresolved_syms_in_shared_libs;
+
/* Which symbols to strip. */
enum bfd_link_strip strip;
@@ -350,7 +356,7 @@ struct bfd_link_info
struct bfd_sym_chain *gc_sym_list;
/* If a base output file is wanted, then this points to it */
- PTR base_file;
+ void *base_file;
/* The function to call when the executable or shared object is
loaded. */
@@ -399,7 +405,7 @@ struct bfd_link_callbacks
name of the symbol which caused the archive element to be pulled
in. */
bfd_boolean (*add_archive_element)
- PARAMS ((struct bfd_link_info *, bfd *abfd, const char *name));
+ (struct bfd_link_info *, bfd *abfd, const char *name);
/* A function which is called when a symbol is found with multiple
definitions. NAME is the symbol which is defined multiple times.
OBFD is the old BFD, OSEC is the old section, OVAL is the old
@@ -407,9 +413,9 @@ struct bfd_link_callbacks
the new value. OBFD may be NULL. OSEC and NSEC may be
bfd_com_section or bfd_ind_section. */
bfd_boolean (*multiple_definition)
- PARAMS ((struct bfd_link_info *, const char *name,
- bfd *obfd, asection *osec, bfd_vma oval,
- bfd *nbfd, asection *nsec, bfd_vma nval));
+ (struct bfd_link_info *, const char *name,
+ bfd *obfd, asection *osec, bfd_vma oval,
+ bfd *nbfd, asection *nsec, bfd_vma nval);
/* A function which is called when a common symbol is defined
multiple times. NAME is the symbol appearing multiple times.
OBFD is the BFD of the existing symbol; it may be NULL if this is
@@ -422,9 +428,9 @@ struct bfd_link_callbacks
bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE
is the size of the new symbol. */
bfd_boolean (*multiple_common)
- PARAMS ((struct bfd_link_info *, const char *name,
- bfd *obfd, enum bfd_link_hash_type otype, bfd_vma osize,
- bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize));
+ (struct bfd_link_info *, const char *name,
+ bfd *obfd, enum bfd_link_hash_type otype, bfd_vma osize,
+ bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize);
/* A function which is called to add a symbol to a set. ENTRY is
the link hash table entry for the set itself (e.g.,
__CTOR_LIST__). RELOC is the relocation to use for an entry in
@@ -432,9 +438,8 @@ struct bfd_link_callbacks
get the size of the entry when generating an executable file.
ABFD, SEC and VALUE identify the value to add to the set. */
bfd_boolean (*add_to_set)
- PARAMS ((struct bfd_link_info *, struct bfd_link_hash_entry *entry,
- bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec,
- bfd_vma value));
+ (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
+ bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec, bfd_vma value);
/* A function which is called when the name of a g++ constructor or
destructor is found. This is only called by some object file
formats. CONSTRUCTOR is TRUE for a constructor, FALSE for a
@@ -442,8 +447,8 @@ struct bfd_link_callbacks
relocatable file. NAME is the name of the symbol found. ABFD,
SECTION and VALUE are the value of the symbol. */
bfd_boolean (*constructor)
- PARAMS ((struct bfd_link_info *, bfd_boolean constructor,
- const char *name, bfd *abfd, asection *sec, bfd_vma value));
+ (struct bfd_link_info *, bfd_boolean constructor, const char *name,
+ bfd *abfd, asection *sec, bfd_vma value);
/* A function which is called to issue a linker warning. For
example, this is called when there is a reference to a warning
symbol. WARNING is the warning to be issued. SYMBOL is the name
@@ -452,16 +457,16 @@ struct bfd_link_callbacks
which trigerred the warning; either ABFD or SECTION or both may
be NULL if the location is not known. */
bfd_boolean (*warning)
- PARAMS ((struct bfd_link_info *, const char *warning, const char *symbol,
- bfd *abfd, asection *section, bfd_vma address));
+ (struct bfd_link_info *, const char *warning, const char *symbol,
+ bfd *abfd, asection *section, bfd_vma address);
/* A function which is called when a relocation is attempted against
an undefined symbol. NAME is the symbol which is undefined.
ABFD, SECTION and ADDRESS identify the location from which the
reference is made. FATAL indicates whether an undefined symbol is
a fatal error or not. In some cases SECTION may be NULL. */
bfd_boolean (*undefined_symbol)
- PARAMS ((struct bfd_link_info *, const char *name, bfd *abfd,
- asection *section, bfd_vma address, bfd_boolean fatal));
+ (struct bfd_link_info *, const char *name, bfd *abfd,
+ asection *section, bfd_vma address, bfd_boolean fatal);
/* A function which is called when a reloc overflow occurs. NAME is
the name of the symbol or section the reloc is against,
RELOC_NAME is the name of the relocation, and ADDEND is any
@@ -470,8 +475,8 @@ struct bfd_link_callbacks
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
ABFD will be NULL. */
bfd_boolean (*reloc_overflow)
- PARAMS ((struct bfd_link_info *, const char *name, const char *reloc_name,
- bfd_vma addend, bfd *abfd, asection *section, bfd_vma address));
+ (struct bfd_link_info *, const char *name, const char *reloc_name,
+ bfd_vma addend, bfd *abfd, asection *section, bfd_vma address);
/* A function which is called when a dangerous reloc is performed.
The canonical example is an a29k IHCONST reloc which does not
follow an IHIHALF reloc. MESSAGE is an appropriate message.
@@ -480,8 +485,8 @@ struct bfd_link_callbacks
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
ABFD will be NULL. */
bfd_boolean (*reloc_dangerous)
- PARAMS ((struct bfd_link_info *, const char *message,
- bfd *abfd, asection *section, bfd_vma address));
+ (struct bfd_link_info *, const char *message,
+ bfd *abfd, asection *section, bfd_vma address);
/* A function which is called when a reloc is found to be attached
to a symbol which is not being written out. NAME is the name of
the symbol. ABFD, SECTION and ADDRESS identify the location of
@@ -489,20 +494,20 @@ struct bfd_link_callbacks
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
ABFD will be NULL. */
bfd_boolean (*unattached_reloc)
- PARAMS ((struct bfd_link_info *, const char *name,
- bfd *abfd, asection *section, bfd_vma address));
+ (struct bfd_link_info *, const char *name,
+ bfd *abfd, asection *section, bfd_vma address);
/* A function which is called when a symbol in notice_hash is
defined or referenced. NAME is the symbol. ABFD, SECTION and
ADDRESS are the value of the symbol. If SECTION is
bfd_und_section, this is a reference. */
bfd_boolean (*notice)
- PARAMS ((struct bfd_link_info *, const char *name,
- bfd *abfd, asection *section, bfd_vma address));
+ (struct bfd_link_info *, const char *name,
+ bfd *abfd, asection *section, bfd_vma address);
/* A function which is called for reporting a linker error. ID is the
error identifier. The remaining input is the same as einfo () in
ld. */
bfd_boolean (*error_handler)
- PARAMS ((int id, const char * fmt, ...));
+ (int id, const char *fmt, ...);
/* Identifiers of linker error messages used by error_handler. */
#define LD_DEFINITION_IN_DISCARDED_SECTION 1
@@ -605,7 +610,7 @@ struct bfd_link_order_reloc
};
/* Allocate a new link_order for a section. */
-extern struct bfd_link_order *bfd_new_link_order PARAMS ((bfd *, asection *));
+extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
/* These structures are used to describe version information for the
ELF linker. These structures could be manipulated entirely inside
@@ -621,7 +626,7 @@ struct bfd_elf_version_expr
/* Regular expression. */
const char *pattern;
/* Matching function. */
- int (*match) PARAMS ((struct bfd_elf_version_expr *, const char *));
+ int (*match) (struct bfd_elf_version_expr *, const char *);
/* Defined by ".symver". */
unsigned int symver: 1;
/* Defined by version script. */
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index f9e1fea87c..75a7ff818f 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,18 @@
+2003-08-23 Jason Eckhardt <jle@rice.edu>
+
+ * coff/i860.h (COFF860_R_PAIR, COFF860_R_LOW0, COFF860_R_LOW1,
+ COFF860_R_LOW2, COFF860_R_LOW3, COFF860_R_LOW4, COFF860_R_SPLIT0,
+ COFF860_R_SPLIT1, COFF860_R_SPLIT2, COFF860_R_HIGHADJ,
+ COFF860_R_BRADDR): Define new relocation constants and document.
+ Minor formatting adjustments.
+
+2003-08-07 Alan Modra <amodra@bigpond.net.au>
+
+ * ti.h (GET_SCNHDR_NRELOC): Rename PTR param to LOC.
+ (PUT_SCNHDR_NRELOC, GET_SCNHDR_NLNNO, PUT_SCNHDR_NLNNO): Likewise.
+ (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Likewise.
+ (GET_SCNHDR_PAGE, PUT_SCNHDR_PAGE): Likewise.
+
2003-07-17 Jeff Muizelaar <muizelaar@rogers.com>
* pe.h: (IMAGE_FILE_NET_RUN_FROM_SWAP): Define.
diff --git a/include/coff/i860.h b/include/coff/i860.h
index 95d0c1a271..c7072b26b2 100644
--- a/include/coff/i860.h
+++ b/include/coff/i860.h
@@ -1,6 +1,6 @@
-/* coff information for Intel 860.
+/* COFF information for the Intel i860.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,3 +55,32 @@ struct external_reloc
#define RELOC struct external_reloc
#define RELSZ 10
+
+/* The relocation directory entry types.
+ PAIR : The low half that follows relates to the preceeding HIGH[ADJ].
+ HIGH : The high half of a 32-bit constant.
+ LOWn : The low half, insn bits 15..(n-1), 2^n-byte aligned.
+ SPLITn : The low half, insn bits 20..16 and 10..(n-1), 2^n-byte aligned.
+ HIGHADJ: Similar to HIGH, but with adjustment.
+ BRADDR : 26-bit branch displacement.
+
+ Note: The Intel assembler manual lists LOW4 as one of the
+ relocation types, but it appears to be useless for the i860.
+ We will recognize it anyway, just in case it actually appears in
+ any object files. */
+
+enum {
+ COFF860_R_PAIR = 0x1c,
+ COFF860_R_HIGH = 0x1e,
+ COFF860_R_LOW0 = 0x1f,
+ COFF860_R_LOW1 = 0x20,
+ COFF860_R_LOW2 = 0x21,
+ COFF860_R_LOW3 = 0x22,
+ COFF860_R_LOW4 = 0x23,
+ COFF860_R_SPLIT0 = 0x24,
+ COFF860_R_SPLIT1 = 0x25,
+ COFF860_R_SPLIT2 = 0x26,
+ COFF860_R_HIGHADJ = 0x27,
+ COFF860_R_BRADDR = 0x28
+};
+
diff --git a/include/coff/ti.h b/include/coff/ti.h
index 8df15223c8..a15fe717ab 100644
--- a/include/coff/ti.h
+++ b/include/coff/ti.h
@@ -2,7 +2,7 @@
customized in a target-specific file, and then this file included (see
tic54x.h for an example).
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -215,25 +215,25 @@ struct external_scnhdr {
Assume we're dealing with the COFF2 scnhdr structure, and adjust
accordingly
*/
-#define GET_SCNHDR_NRELOC(ABFD, PTR) \
- (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, PTR))
-#define PUT_SCNHDR_NRELOC(ABFD, VAL, PTR) \
- (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, PTR))
-#define GET_SCNHDR_NLNNO(ABFD, PTR) \
- (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -2))
-#define PUT_SCNHDR_NLNNO(ABFD, VAL, PTR) \
- (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -2))
-#define GET_SCNHDR_FLAGS(ABFD, PTR) \
- (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -4))
-#define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \
- (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))
-#define GET_SCNHDR_PAGE(ABFD, PTR) \
- (COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : (unsigned) H_GET_8 (ABFD, (PTR) -7))
+#define GET_SCNHDR_NRELOC(ABFD, LOC) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, LOC))
+#define PUT_SCNHDR_NRELOC(ABFD, VAL, LOC) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, LOC))
+#define GET_SCNHDR_NLNNO(ABFD, LOC) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 2))
+#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 2))
+#define GET_SCNHDR_FLAGS(ABFD, LOC) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 4))
+#define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 4))
+#define GET_SCNHDR_PAGE(ABFD, LOC) \
+ (COFF2_P (ABFD) ? H_GET_16 (ABFD, LOC) : (unsigned) H_GET_8 (ABFD, (LOC) - 7))
/* on output, make sure that the "reserved" field is zero */
-#define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \
+#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \
(COFF2_P (ABFD) \
- ? H_PUT_16 (ABFD, VAL, PTR) \
- : H_PUT_8 (ABFD, VAL, (PTR) -7), H_PUT_8 (ABFD, 0, (PTR) -8))
+ ? H_PUT_16 (ABFD, VAL, LOC) \
+ : H_PUT_8 (ABFD, VAL, (LOC) - 7), H_PUT_8 (ABFD, 0, (LOC) - 8))
/* TI COFF stores section size as number of bytes (address units, not octets),
so adjust to be number of octets, which is what BFD expects */
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 392cbf9b46..6bdd7517de 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -1,6 +1,6 @@
/* Interface between the opcode library and its callers.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ extern "C" {
#include <stdio.h>
#include "bfd.h"
-typedef int (*fprintf_ftype) PARAMS((PTR, const char*, ...));
+typedef int (*fprintf_ftype) (void *, const char*, ...);
enum dis_insn_type {
dis_noninsn, /* Not a valid instruction */
@@ -59,8 +59,8 @@ enum dis_insn_type {
typedef struct disassemble_info {
fprintf_ftype fprintf_func;
- PTR stream;
- PTR application_data;
+ void *stream;
+ void *application_data;
/* Target description. We could replace this with a pointer to the bfd,
but that would require one. There currently isn't any such requirement
@@ -98,7 +98,7 @@ typedef struct disassemble_info {
The bottom 16 bits are for the internal use of the disassembler. */
unsigned long flags;
#define INSN_HAS_RELOC 0x80000000
- PTR private_data;
+ void *private_data;
/* Function used to get bytes to disassemble. MEMADDR is the
address of the stuff to be disassembled, MYADDR is the address to
@@ -106,19 +106,19 @@ typedef struct disassemble_info {
INFO is a pointer to this struct.
Returns an errno value or 0 for success. */
int (*read_memory_func)
- PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
- struct disassemble_info *info));
+ (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
+ struct disassemble_info *info);
/* Function which should be called if we get an error that we can't
recover from. STATUS is the errno value from read_memory_func and
MEMADDR is the address that we were trying to read. INFO is a
pointer to this struct. */
void (*memory_error_func)
- PARAMS ((int status, bfd_vma memaddr, struct disassemble_info *info));
+ (int status, bfd_vma memaddr, struct disassemble_info *info);
/* Function called to print ADDR. */
void (*print_address_func)
- PARAMS ((bfd_vma addr, struct disassemble_info *info));
+ (bfd_vma addr, struct disassemble_info *info);
/* Function called to determine if there is a symbol at the given ADDR.
If there is, the function returns 1, otherwise it returns 0.
@@ -128,7 +128,7 @@ typedef struct disassemble_info {
address, (normally because there is a symbol associated with
that address), but sometimes we want to mask out the overlay bits. */
int (* symbol_at_address_func)
- PARAMS ((bfd_vma addr, struct disassemble_info * info));
+ (bfd_vma addr, struct disassemble_info * info);
/* These are for buffer_read_memory. */
bfd_byte *buffer;
@@ -177,88 +177,88 @@ typedef struct disassemble_info {
/* Standard disassemblers. Disassemble one instruction at the given
target address. Return number of octets processed. */
-typedef int (*disassembler_ftype)
- PARAMS((bfd_vma, disassemble_info *));
-
-extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i386 PARAMS ((bfd_vma, disassemble_info *));
-extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_ia64 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i370 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m68hc11 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m68hc12 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8300s PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_dlx PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_fr30 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i860 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_ip2k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m32r PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_m88k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mcore PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mmix PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mn10200 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_mn10300 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_msp430 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_openrisc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_or32 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_or32 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_pdp11 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_tic4x PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_tic54x PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_xtensa PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_sh64 PARAMS ((bfd_vma, disassemble_info *));
-extern int print_insn_sh64x_media PARAMS ((bfd_vma, disassemble_info *));
-extern int print_insn_frv PARAMS ((bfd_vma, disassemble_info *));
-extern int print_insn_iq2000 PARAMS ((bfd_vma, disassemble_info *));
-
-extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
-extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
-
-extern void print_mips_disassembler_options PARAMS ((FILE *));
-extern void print_ppc_disassembler_options PARAMS ((FILE *));
-extern void print_arm_disassembler_options PARAMS ((FILE *));
-extern void parse_arm_disassembler_option PARAMS ((char *));
-extern int get_arm_regname_num_options PARAMS ((void));
-extern int set_arm_regname_option PARAMS ((int));
-extern int get_arm_regnames PARAMS ((int, const char **, const char **, const char ***));
+typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
+
+extern int print_insn_big_mips (bfd_vma, disassemble_info *);
+extern int print_insn_little_mips (bfd_vma, disassemble_info *);
+extern int print_insn_i386 (bfd_vma, disassemble_info *);
+extern int print_insn_i386_att (bfd_vma, disassemble_info *);
+extern int print_insn_i386_intel (bfd_vma, disassemble_info *);
+extern int print_insn_ia64 (bfd_vma, disassemble_info *);
+extern int print_insn_i370 (bfd_vma, disassemble_info *);
+extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
+extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
+extern int print_insn_m68k (bfd_vma, disassemble_info *);
+extern int print_insn_z8001 (bfd_vma, disassemble_info *);
+extern int print_insn_z8002 (bfd_vma, disassemble_info *);
+extern int print_insn_h8300 (bfd_vma, disassemble_info *);
+extern int print_insn_h8300h (bfd_vma, disassemble_info *);
+extern int print_insn_h8300s (bfd_vma, disassemble_info *);
+extern int print_insn_h8500 (bfd_vma, disassemble_info *);
+extern int print_insn_alpha (bfd_vma, disassemble_info *);
+extern int print_insn_big_arm (bfd_vma, disassemble_info *);
+extern int print_insn_little_arm (bfd_vma, disassemble_info *);
+extern int print_insn_sparc (bfd_vma, disassemble_info *);
+extern int print_insn_big_a29k (bfd_vma, disassemble_info *);
+extern int print_insn_little_a29k (bfd_vma, disassemble_info *);
+extern int print_insn_avr (bfd_vma, disassemble_info *);
+extern int print_insn_d10v (bfd_vma, disassemble_info *);
+extern int print_insn_d30v (bfd_vma, disassemble_info *);
+extern int print_insn_dlx (bfd_vma, disassemble_info *);
+extern int print_insn_fr30 (bfd_vma, disassemble_info *);
+extern int print_insn_hppa (bfd_vma, disassemble_info *);
+extern int print_insn_i860 (bfd_vma, disassemble_info *);
+extern int print_insn_i960 (bfd_vma, disassemble_info *);
+extern int print_insn_ip2k (bfd_vma, disassemble_info *);
+extern int print_insn_m32r (bfd_vma, disassemble_info *);
+extern int print_insn_m88k (bfd_vma, disassemble_info *);
+extern int print_insn_mcore (bfd_vma, disassemble_info *);
+extern int print_insn_mmix (bfd_vma, disassemble_info *);
+extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
+extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
+extern int print_insn_msp430 (bfd_vma, disassemble_info *);
+extern int print_insn_ns32k (bfd_vma, disassemble_info *);
+extern int print_insn_openrisc (bfd_vma, disassemble_info *);
+extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
+extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
+extern int print_insn_pdp11 (bfd_vma, disassemble_info *);
+extern int print_insn_pj (bfd_vma, disassemble_info *);
+extern int print_insn_big_powerpc (bfd_vma, disassemble_info *);
+extern int print_insn_little_powerpc (bfd_vma, disassemble_info *);
+extern int print_insn_rs6000 (bfd_vma, disassemble_info *);
+extern int print_insn_s390 (bfd_vma, disassemble_info *);
+extern int print_insn_sh (bfd_vma, disassemble_info *);
+extern int print_insn_tic30 (bfd_vma, disassemble_info *);
+extern int print_insn_tic4x (bfd_vma, disassemble_info *);
+extern int print_insn_tic54x (bfd_vma, disassemble_info *);
+extern int print_insn_tic80 (bfd_vma, disassemble_info *);
+extern int print_insn_v850 (bfd_vma, disassemble_info *);
+extern int print_insn_vax (bfd_vma, disassemble_info *);
+extern int print_insn_w65 (bfd_vma, disassemble_info *);
+extern int print_insn_xstormy16 (bfd_vma, disassemble_info *);
+extern int print_insn_xtensa (bfd_vma, disassemble_info *);
+extern int print_insn_sh64 (bfd_vma, disassemble_info *);
+extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
+extern int print_insn_frv (bfd_vma, disassemble_info *);
+extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
+
+extern disassembler_ftype arc_get_disassembler (void *);
+extern disassembler_ftype cris_get_disassembler (bfd *);
+
+extern void print_mips_disassembler_options (FILE *);
+extern void print_ppc_disassembler_options (FILE *);
+extern void print_arm_disassembler_options (FILE *);
+extern void parse_arm_disassembler_option (char *);
+extern int get_arm_regname_num_options (void);
+extern int set_arm_regname_option (int);
+extern int get_arm_regnames
+ (int, const char **, const char **, const char ***);
/* Fetch the disassembler for a given BFD, if that support is available. */
-extern disassembler_ftype disassembler PARAMS ((bfd *));
+extern disassembler_ftype disassembler (bfd *);
/* Document any target specific options available from the disassembler. */
-extern void disassembler_usage PARAMS ((FILE *));
+extern void disassembler_usage (FILE *);
/* This block of definitions is for particular callers who read instructions
@@ -267,59 +267,34 @@ extern void disassembler_usage PARAMS ((FILE *));
/* Here is a function which callers may wish to use for read_memory_func.
It gets bytes from a buffer. */
extern int buffer_read_memory
- PARAMS ((bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *));
+ (bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *);
/* This function goes with buffer_read_memory.
It prints a message using info->fprintf_func and info->stream. */
-extern void perror_memory PARAMS ((int, bfd_vma, struct disassemble_info *));
+extern void perror_memory (int, bfd_vma, struct disassemble_info *);
/* Just print the address in hex. This is included for completeness even
though both GDB and objdump provide their own (to print symbolic
addresses). */
extern void generic_print_address
- PARAMS ((bfd_vma, struct disassemble_info *));
+ (bfd_vma, struct disassemble_info *);
/* Always true. */
extern int generic_symbol_at_address
- PARAMS ((bfd_vma, struct disassemble_info *));
+ (bfd_vma, struct disassemble_info *);
-/* Macro to initialize a disassemble_info struct. This should be called
- by all applications creating such a struct. */
-#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
- (INFO).flavour = bfd_target_unknown_flavour, \
- (INFO).arch = bfd_arch_unknown, \
- (INFO).mach = 0, \
- (INFO).insn_sets = 0, \
- (INFO).endian = BFD_ENDIAN_UNKNOWN, \
- (INFO).octets_per_byte = 1, \
- INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC)
-
-/* Call this macro to initialize only the internal variables for the
- disassembler. Architecture dependent things such as byte order, or machine
- variant are not touched by this macro. This makes things much easier for
- GDB which must initialize these things separately. */
+/* Method to initialize a disassemble_info struct. This should be
+ called by all applications creating such a struct. */
+extern void init_disassemble_info (struct disassemble_info *info, void *stream,
+ fprintf_ftype fprintf_func);
+/* For compatibility with existing code. */
+#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
+ init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
- (INFO).fprintf_func = (fprintf_ftype)(FPRINTF_FUNC), \
- (INFO).stream = (PTR)(STREAM), \
- (INFO).section = NULL, \
- (INFO).symbols = NULL, \
- (INFO).num_symbols = 0, \
- (INFO).private_data = NULL, \
- (INFO).buffer = NULL, \
- (INFO).buffer_vma = 0, \
- (INFO).buffer_length = 0, \
- (INFO).read_memory_func = buffer_read_memory, \
- (INFO).memory_error_func = perror_memory, \
- (INFO).print_address_func = generic_print_address, \
- (INFO).symbol_at_address_func = generic_symbol_at_address, \
- (INFO).flags = 0, \
- (INFO).bytes_per_line = 0, \
- (INFO).bytes_per_chunk = 0, \
- (INFO).display_endian = BFD_ENDIAN_UNKNOWN, \
- (INFO).disassembler_options = NULL, \
- (INFO).insn_info_valid = 0
+ init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
+
#ifdef __cplusplus
}
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 6b0a8c57a3..02f20528d3 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,27 @@
+2003-09-11 James Cownie <jcownie@etnus.com>
+
+ * dwarf2.h: Add HP dwarf extensions from their hacked gdb
+ header files (ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz).
+
+2003-09-04 Nick Clifton <nickc@redhat.com>
+
+ * v850.h (E_V850E1_ARCH): Define.
+
+2003-08-21 James Cownie <jcownie@etnus.com>
+
+ * dwarf2.h: Add PGI dwarf extensions.
+
+2003-08-08 Dmitry Diky <diwil@mail.ru>
+
+ * msp430.h: Add xW42 and xE42 parts. Sort MPU list according to
+ gcc order.
+
+2003-08-07 Alan Modra <amodra@bigpond.net.au>
+
+ * reloc-macros.h (START_RELOC_NUMBERS) : Remove PARAMS macro. Use
+ C90 function definition. Formatting.
+ (RELOC_NUMBER): Remove !__STDC__ code.
+
2003-07-28 Eric Christopher <echristo@redhat.com>
* ppc.h (R_PPC_RELAX32): New. Fake relocation.
@@ -38,10 +62,6 @@
* mmix.h: Convert to ISO C90 prototypes.
* mips.h: Likewise.
- * reloc-macros.h (START_RELOC_NUMBERS): Convert to ISO C90
- prototype.
- (RELOC_NUMBER): Remove !__STDC__ code.
-
2003-06-13 Robert Millan <zeratul2@wanadoo.es>
* common.h (GNU_ABI_TAG_NETBSD): New tag.
diff --git a/include/elf/dwarf2.h b/include/elf/dwarf2.h
index 9c8ce4e006..bede7e297a 100644
--- a/include/elf/dwarf2.h
+++ b/include/elf/dwarf2.h
@@ -1,7 +1,7 @@
/* Declarations and definitions of codes relating to the DWARF2 symbolic
debugging information format.
- Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
Office (AJPO), Florida State Unviversity and Silicon Graphics Inc.
@@ -189,6 +189,8 @@ enum dwarf_tag
DW_TAG_imported_unit = 0x3d,
/* SGI/MIPS Extensions. */
DW_TAG_MIPS_loop = 0x4081,
+ /* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */
+ DW_TAG_HP_array_descriptor = 0x4090,
/* GNU extensions. */
DW_TAG_format_label = 0x4101, /* For FORTRAN 77 and Fortran 90. */
DW_TAG_function_template = 0x4102, /* For C++. */
@@ -198,7 +200,10 @@ enum dwarf_tag
/* Extensions for UPC. See: http://upc.gwu.edu/~upc. */
DW_TAG_upc_shared_type = 0x8765,
DW_TAG_upc_strict_type = 0x8766,
- DW_TAG_upc_relaxed_type = 0x8767
+ DW_TAG_upc_relaxed_type = 0x8767,
+ /* PGI (STMicroelectronics) extensions. No documentation available. */
+ DW_TAG_PGI_kanji_type = 0xA000,
+ DW_TAG_PGI_interface_block = 0xA020
};
#define DW_TAG_lo_user 0x4080
@@ -235,7 +240,6 @@ enum dwarf_form
};
/* Attribute names and codes. */
-
enum dwarf_attribute
{
DW_AT_sibling = 0x01,
@@ -325,6 +329,21 @@ enum dwarf_attribute
DW_AT_MIPS_abstract_name = 0x2009,
DW_AT_MIPS_clone_origin = 0x200a,
DW_AT_MIPS_has_inlines = 0x200b,
+ /* HP extensions. */
+ DW_AT_HP_block_index = 0x2000,
+ DW_AT_HP_unmodifiable = 0x2001, /* Same as DW_AT_MIPS_fde. */
+ DW_AT_HP_actuals_stmt_list = 0x2010,
+ DW_AT_HP_proc_per_section = 0x2011,
+ DW_AT_HP_raw_data_ptr = 0x2012,
+ DW_AT_HP_pass_by_reference = 0x2013,
+ DW_AT_HP_opt_level = 0x2014,
+ DW_AT_HP_prof_version_id = 0x2015,
+ DW_AT_HP_opt_flags = 0x2016,
+ DW_AT_HP_cold_region_low_pc = 0x2017,
+ DW_AT_HP_cold_region_high_pc = 0x2018,
+ DW_AT_HP_all_variables_modifiable = 0x2019,
+ DW_AT_HP_linkage_name = 0x201a,
+ DW_AT_HP_prof_flags = 0x201b, /* In comp unit of procs_info for -g. */
/* GNU extensions. */
DW_AT_sf_names = 0x2101,
DW_AT_src_info = 0x2102,
@@ -336,7 +355,11 @@ enum dwarf_attribute
/* VMS extensions. */
DW_AT_VMS_rtnbeg_pd_address = 0x2201,
/* UPC extension. */
- DW_AT_upc_threads_scaled = 0x3210
+ DW_AT_upc_threads_scaled = 0x3210,
+ /* PGI (STMicroelectronics) extensions. */
+ DW_AT_PGI_lbase = 0x3a00,
+ DW_AT_PGI_soffset = 0x3a01,
+ DW_AT_PGI_lstride = 0x3a02
};
#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */
@@ -496,7 +519,15 @@ enum dwarf_location_atom
DW_OP_call4 = 0x99,
DW_OP_call_ref = 0x9a,
/* GNU extensions. */
- DW_OP_GNU_push_tls_address = 0xe0
+ DW_OP_GNU_push_tls_address = 0xe0,
+ /* HP extensions. */
+ DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. */
+ DW_OP_HP_is_value = 0xe1,
+ DW_OP_HP_fltconst4 = 0xe2,
+ DW_OP_HP_fltconst8 = 0xe3,
+ DW_OP_HP_mod_range = 0xe4,
+ DW_OP_HP_unmod_range = 0xe5,
+ DW_OP_HP_tls = 0xe6
};
#define DW_OP_lo_user 0xe0 /* Implementation-defined range start. */
@@ -515,7 +546,15 @@ enum dwarf_type
DW_ATE_unsigned = 0x7,
DW_ATE_unsigned_char = 0x8,
/* DWARF 3. */
- DW_ATE_imaginary_float = 0x9
+ DW_ATE_imaginary_float = 0x9,
+ /* HP extensions. */
+ DW_ATE_HP_float80 = 0x80, /* Floating-point (80 bit). */
+ DW_ATE_HP_complex_float80 = 0x81, /* Complex floating-point (80 bit). */
+ DW_ATE_HP_float128 = 0x82, /* Floating-point (128 bit). */
+ DW_ATE_HP_complex_float128 = 0x83, /* Complex floating-point (128 bit). */
+ DW_ATE_HP_floathpintel = 0x84, /* Floating-point (82 bit IA64). */
+ DW_ATE_HP_imaginary_float80 = 0x85,
+ DW_ATE_HP_imaginary_float128 = 0x86
};
#define DW_ATE_lo_user 0x80
@@ -612,7 +651,18 @@ enum dwarf_line_number_x_ops
{
DW_LNE_end_sequence = 1,
DW_LNE_set_address = 2,
- DW_LNE_define_file = 3
+ DW_LNE_define_file = 3,
+ /* HP extensions. */
+ DW_LNE_HP_negate_is_UV_update = 0x11,
+ DW_LNE_HP_push_context = 0x12,
+ DW_LNE_HP_pop_context = 0x13,
+ DW_LNE_HP_set_file_line_column = 0x14,
+ DW_LNE_HP_set_routine_name = 0x15,
+ DW_LNE_HP_set_sequence = 0x16,
+ DW_LNE_HP_negate_post_semantics = 0x17,
+ DW_LNE_HP_negate_function_exit = 0x18,
+ DW_LNE_HP_negate_front_end_logical = 0x19,
+ DW_LNE_HP_define_proc = 0x20
};
/* Call frame information. */
@@ -636,17 +686,14 @@ enum dwarf_call_frame_info
DW_CFA_def_cfa = 0x0c,
DW_CFA_def_cfa_register = 0x0d,
DW_CFA_def_cfa_offset = 0x0e,
-
/* DWARF 3. */
DW_CFA_def_cfa_expression = 0x0f,
DW_CFA_expression = 0x10,
DW_CFA_offset_extended_sf = 0x11,
DW_CFA_def_cfa_sf = 0x12,
DW_CFA_def_cfa_offset_sf = 0x13,
-
/* SGI/MIPS specific. */
DW_CFA_MIPS_advance_loc8 = 0x1d,
-
/* GNU extensions. */
DW_CFA_GNU_window_save = 0x2d,
DW_CFA_GNU_args_size = 0x2e,
diff --git a/include/elf/msp430.h b/include/elf/msp430.h
index cb3f241dea..912ded7685 100644
--- a/include/elf/msp430.h
+++ b/include/elf/msp430.h
@@ -26,19 +26,20 @@
/* Processor specific flags for the ELF header e_flags field. */
#define EF_MSP430_MACH 0xff
-#define E_MSP430_MACH_MSP430x11x1 110
#define E_MSP430_MACH_MSP430x11 11
+#define E_MSP430_MACH_MSP430x11x1 110
#define E_MSP430_MACH_MSP430x12 12
#define E_MSP430_MACH_MSP430x13 13
#define E_MSP430_MACH_MSP430x14 14
+#define E_MSP430_MACH_MSP430x15 15
+#define E_MSP430_MACH_MSP430x16 16
#define E_MSP430_MACH_MSP430x31 31
#define E_MSP430_MACH_MSP430x32 32
#define E_MSP430_MACH_MSP430x33 33
#define E_MSP430_MACH_MSP430x41 41
+#define E_MSP430_MACH_MSP430x42 42
#define E_MSP430_MACH_MSP430x43 43
#define E_MSP430_MACH_MSP430x44 44
-#define E_MSP430_MACH_MSP430x15 15
-#define E_MSP430_MACH_MSP430x16 16
/* Relocations. */
START_RELOC_NUMBERS (elf_msp430_reloc_type)
diff --git a/include/elf/reloc-macros.h b/include/elf/reloc-macros.h
index 9ad346c9f3..4a3a60f7ef 100644
--- a/include/elf/reloc-macros.h
+++ b/include/elf/reloc-macros.h
@@ -1,5 +1,5 @@
/* Generic relocation support for BFD.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -46,10 +46,9 @@
If RELOC_MACROS_GEN_FUNC *is* defined, then instead the
following function will be generated:
- static const char * foo PARAMS ((unsigned long rtype));
+ static const char *foo (unsigned long rtype);
static const char *
- foo (rtype)
- unsigned long rtype;
+ foo (unsigned long rtype)
{
switch (rtype)
{
@@ -70,26 +69,22 @@
the relocation is not recognised, NULL is returned. */
#define START_RELOC_NUMBERS(name) \
-static const char * name PARAMS ((unsigned long rtype)); \
+static const char *name (unsigned long rtype); \
static const char * \
-name (rtype) \
- unsigned long rtype; \
+name (unsigned long rtype) \
{ \
switch (rtype) \
- {
+ {
-#if defined (__STDC__) || defined (ALMOST_STDC)
-#define RELOC_NUMBER(name, number) case number : return #name ;
-#else
-#define RELOC_NUMBER(name, number) case number : return "name" ;
-#endif
+#define RELOC_NUMBER(name, number) \
+ case number: return #name;
#define FAKE_RELOC(name, number)
#define EMPTY_RELOC(name)
#define END_RELOC_NUMBERS(name) \
default: return NULL; \
- } \
+ } \
}
diff --git a/include/elf/v850.h b/include/elf/v850.h
index db5b2d9fd1..7d5110b334 100644
--- a/include/elf/v850.h
+++ b/include/elf/v850.h
@@ -1,5 +1,5 @@
/* V850 ELF support for BFD.
- Copyright 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -35,6 +35,9 @@
/* v850e code. */
#define E_V850E_ARCH 0x10000000
+/* v850e1 code. */
+#define E_V850E1_ARCH 0x20000000
+
/* Flags for the st_other field. */
#define V850_OTHER_SDA 0x01 /* Symbol had SDA relocations. */
diff --git a/include/floatformat.h b/include/floatformat.h
index 53ead3eee6..3d0fd7a87a 100644
--- a/include/floatformat.h
+++ b/include/floatformat.h
@@ -1,5 +1,5 @@
/* IEEE floating point support declarations, for GDB, the GNU Debugger.
- Copyright 1991, 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
+ Copyright 1991, 1994, 1995, 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -61,8 +61,12 @@ struct floatformat
unsigned int exp_start;
unsigned int exp_len;
- /* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */
- unsigned int exp_bias;
+ /* Bias added to a "true" exponent to form the biased exponent. It
+ is intentionally signed as, otherwize, -exp_bias can turn into a
+ very large number (e.g., given the exp_bias of 0x3fff and a 64
+ bit long, the equation (long)(1 - exp_bias) evaluates to
+ 4294950914) instead of -16382). */
+ int exp_bias;
/* Exponent value which indicates NaN. This is the actual value stored in
the float, not adjusted by the exp_bias. This usually consists of all
one bits. */
@@ -109,13 +113,18 @@ extern const struct floatformat floatformat_ia64_quad_little;
Store the double in *TO. */
extern void
-floatformat_to_double PARAMS ((const struct floatformat *, char *, double *));
+floatformat_to_double PARAMS ((const struct floatformat *, const char *, double *));
/* The converse: convert the double *FROM to FMT
and store where TO points. */
extern void
floatformat_from_double PARAMS ((const struct floatformat *,
- double *, char *));
+ const double *, char *));
+
+/* Return non-zero iff the data at FROM is a valid number in format FMT. */
+
+extern int
+floatformat_is_valid PARAMS ((const struct floatformat *fmt, const char *from));
#endif /* defined (FLOATFORMAT_H) */
diff --git a/include/nlm/ChangeLog b/include/nlm/ChangeLog
index 979b162125..b3c9529b80 100644
--- a/include/nlm/ChangeLog
+++ b/include/nlm/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-07 Alan Modra <amodra@bigpond.net.au>
+
+ * internal.h (Nlm_Internal_Custom_Header): Replace PTR with void *.
+
2001-10-02 Alan Modra <amodra@bigpond.net.au>
* common.h (NLM_CAT, NLM_CAT3): Don't define.
diff --git a/include/nlm/internal.h b/include/nlm/internal.h
index cae93f80b2..f61c42db8e 100644
--- a/include/nlm/internal.h
+++ b/include/nlm/internal.h
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) support for BFD.
- Copyright 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2003 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support.
@@ -282,7 +282,7 @@ typedef struct nlm_internal_custom_header
file_ptr dataOffset;
bfd_size_type dataLength;
char dataStamp[8];
- PTR hdr;
+ void *hdr;
} Nlm_Internal_Custom_Header;
#define nlm32_internal_custom_header nlm_internal_custom_header
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 5b2706091a..aaea21428e 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,42 @@
+2003-09-04 Nick Clifton <nickc@redhat.com>
+
+ * v850.h (PROCESSOR_V850E1): Define.
+
+2003-08-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (PPC_OPCODE_440): Define. Formatting. Use hex for other
+ PPC_OPCODE_* defines.
+
+2003-08-16 Jason Eckhardt <jle@rice.edu>
+
+ * i860.h (fmov.ds): Expand as famov.ds.
+ (fmov.sd): Expand as famov.sd.
+ (pfmov.ds): Expand as pfamov.ds.
+
+2003-08-07 Michael Meissner <gnu@the-meissners.org>
+
+ * cgen.h: Remove PARAM macro usage in all prototypes.
+ (CGEN_EXTRACT_INFO): Use void * instead of PTR.
+ (cgen_print_fn): Ditto.
+ (CGEN_HW_ENTRY): Ditto.
+ (CGEN_MAYBE_MULTI_IFLD): Ditto.
+ (struct cgen_insn): Ditto.
+ (CGEN_CPU_TABLE): Ditto.
+
+2003-08-07 Alan Modra <amodra@bigpond.net.au>
+
+ * alpha.h: Remove PARAMS macro.
+ * arc.h: Likewise.
+ * d10v.h: Likewise.
+ * d30v.h: Likewise.
+ * i370.h: Likewise.
+ * or32.h: Likewise.
+ * pj.h: Likewise.
+ * ppc.h: Likewise.
+ * sparc.h: Likewise.
+ * tic80.h: Likewise.
+ * v850.h: Likewise.
+
2003-07-18 Michael Snyder <msnyder@redhat.com>
* include/opcode/h8sx.h (DO_MOVA1, DO_MOVA2): Reformatting.
diff --git a/include/opcode/alpha.h b/include/opcode/alpha.h
index 487b69605a..efe16260ea 100644
--- a/include/opcode/alpha.h
+++ b/include/opcode/alpha.h
@@ -1,5 +1,5 @@
/* alpha.h -- Header file for Alpha opcode table
- Copyright 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1996, 1999, 2001, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>,
patterned after the PPC opcode table written by Ian Lance Taylor.
@@ -108,8 +108,7 @@ struct alpha_operand
string (the operand will be inserted in any case). If the
operand value is legal, *ERRMSG will be unchanged (most operands
can accept any value). */
- unsigned (*insert) PARAMS ((unsigned instruction, int op,
- const char **errmsg));
+ unsigned (*insert) (unsigned instruction, int op, const char **errmsg);
/* Extraction function. This is used by the disassembler. To
extract this operand type from an instruction, check this field.
@@ -128,7 +127,7 @@ struct alpha_operand
non-zero if this operand type can not actually be extracted from
this operand (i.e., the instruction does not match). If the
operand is valid, *INVALID will not be changed. */
- int (*extract) PARAMS ((unsigned instruction, int *invalid));
+ int (*extract) (unsigned instruction, int *invalid);
};
/* Elements in the table are retrieved by indexing with values from
diff --git a/include/opcode/arc.h b/include/opcode/arc.h
index 3da68ec80f..629979d54a 100644
--- a/include/opcode/arc.h
+++ b/include/opcode/arc.h
@@ -1,5 +1,6 @@
/* Opcode table for the ARC.
- Copyright 1994, 1995, 1997, 2001 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
@@ -17,7 +18,8 @@
You should have received a copy of the GNU General Public License
along with GAS or GDB; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
/* List of the various cpu types.
@@ -226,10 +228,9 @@ struct arc_operand {
REG is non-NULL when inserting a register value. */
- arc_insn (*insert) PARAMS ((arc_insn insn,
- const struct arc_operand *operand, int mods,
- const struct arc_operand_value *reg, long value,
- const char **errmsg));
+ arc_insn (*insert)
+ (arc_insn insn, const struct arc_operand *operand, int mods,
+ const struct arc_operand_value *reg, long value, const char **errmsg);
/* Extraction function. This is used by the disassembler. To
extract this operand type from an instruction, check this field.
@@ -255,10 +256,9 @@ struct arc_operand {
Operands that have a printable form like registers and suffixes have
their struct arc_operand_value pointer stored in OPVAL. */
- long (*extract) PARAMS ((arc_insn *insn,
- const struct arc_operand *operand,
- int mods, const struct arc_operand_value **opval,
- int *invalid));
+ long (*extract)
+ (arc_insn *insn, const struct arc_operand *operand, int mods,
+ const struct arc_operand_value **opval, int *invalid);
};
/* Bits that say what version of cpu we have. These should be passed to
@@ -302,22 +302,22 @@ extern const int arc_reg_names_count;
extern unsigned char arc_operand_map[];
/* Utility fns in arc-opc.c. */
-int arc_get_opcode_mach PARAMS ((int, int));
+int arc_get_opcode_mach (int, int);
/* `arc_opcode_init_tables' must be called before `arc_xxx_supported'. */
-void arc_opcode_init_tables PARAMS ((int));
-void arc_opcode_init_insert PARAMS ((void));
-void arc_opcode_init_extract PARAMS ((void));
-const struct arc_opcode *arc_opcode_lookup_asm PARAMS ((const char *));
-const struct arc_opcode *arc_opcode_lookup_dis PARAMS ((unsigned int));
-int arc_opcode_limm_p PARAMS ((long *));
+void arc_opcode_init_tables (int);
+void arc_opcode_init_insert (void);
+void arc_opcode_init_extract (void);
+const struct arc_opcode *arc_opcode_lookup_asm (const char *);
+const struct arc_opcode *arc_opcode_lookup_dis (unsigned int);
+int arc_opcode_limm_p (long *);
const struct arc_operand_value *arc_opcode_lookup_suffix
- PARAMS ((const struct arc_operand *type, int value));
-int arc_opcode_supported PARAMS ((const struct arc_opcode *));
-int arc_opval_supported PARAMS ((const struct arc_operand_value *));
-int arc_limm_fixup_adjust PARAMS ((arc_insn));
-int arc_insn_is_j PARAMS ((arc_insn));
-int arc_insn_not_jl PARAMS ((arc_insn));
-int arc_operand_type PARAMS ((int));
-struct arc_operand_value *get_ext_suffix PARAMS ((char *));
-int arc_get_noshortcut_flag PARAMS ((void));
+ (const struct arc_operand *type, int value);
+int arc_opcode_supported (const struct arc_opcode *);
+int arc_opval_supported (const struct arc_operand_value *);
+int arc_limm_fixup_adjust (arc_insn);
+int arc_insn_is_j (arc_insn);
+int arc_insn_not_jl (arc_insn);
+int arc_operand_type (int);
+struct arc_operand_value *get_ext_suffix (char *);
+int arc_get_noshortcut_flag (void);
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h
index 76a0af47b5..16366fd0d7 100644
--- a/include/opcode/cgen.h
+++ b/include/opcode/cgen.h
@@ -242,9 +242,9 @@ typedef struct cgen_fields CGEN_FIELDS;
typedef struct {
/* A pointer to the disassemble_info struct.
- We don't require dis-asm.h so we use PTR for the type here.
+ We don't require dis-asm.h so we use void * for the type here.
If NULL, BYTES is full of valid data (VALID == -1). */
- PTR dis_info;
+ void *dis_info;
/* Points to a working buffer of sufficient size. */
unsigned char *insn_bytes;
/* Mask of bytes that are valid in INSN_BYTES. */
@@ -265,8 +265,8 @@ typedef struct {
If not it is left alone.
The result is NULL if success or an error message. */
typedef const char * (cgen_parse_fn)
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
- const char **strp_, CGEN_FIELDS *fields_));
+ (CGEN_CPU_DESC, const CGEN_INSN *insn_,
+ const char **strp_, CGEN_FIELDS *fields_);
/* Insert handler.
CD is a cpu table descriptor.
@@ -279,9 +279,9 @@ typedef const char * (cgen_parse_fn)
#ifdef __BFD_H_SEEN__
typedef const char * (cgen_insert_fn)
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
- CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
- bfd_vma pc_));
+ (CGEN_CPU_DESC, const CGEN_INSN *insn_,
+ CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
+ bfd_vma pc_);
#else
typedef const char * (cgen_insert_fn) ();
#endif
@@ -300,9 +300,9 @@ typedef const char * (cgen_insert_fn) ();
#ifdef __BFD_H_SEEN__
typedef int (cgen_extract_fn)
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
- CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
- CGEN_FIELDS *fields_, bfd_vma pc_));
+ (CGEN_CPU_DESC, const CGEN_INSN *insn_,
+ CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
+ CGEN_FIELDS *fields_, bfd_vma pc_);
#else
typedef int (cgen_extract_fn) ();
#endif
@@ -319,8 +319,8 @@ typedef int (cgen_extract_fn) ();
#ifdef __BFD_H_SEEN__
typedef void (cgen_print_fn)
- PARAMS ((CGEN_CPU_DESC, PTR info_, const CGEN_INSN *insn_,
- CGEN_FIELDS *fields_, bfd_vma pc_, int len_));
+ (CGEN_CPU_DESC, void * info_, const CGEN_INSN *insn_,
+ CGEN_FIELDS *fields_, bfd_vma pc_, int len_);
#else
typedef void (cgen_print_fn) ();
#endif
@@ -384,9 +384,9 @@ enum cgen_parse_operand_result
#ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily. */
typedef const char * (cgen_parse_operand_fn)
- PARAMS ((CGEN_CPU_DESC,
- enum cgen_parse_operand_type, const char **, int, int,
- enum cgen_parse_operand_result *, bfd_vma *));
+ (CGEN_CPU_DESC,
+ enum cgen_parse_operand_type, const char **, int, int,
+ enum cgen_parse_operand_result *, bfd_vma *);
#else
typedef const char * (cgen_parse_operand_fn) ();
#endif
@@ -394,11 +394,11 @@ typedef const char * (cgen_parse_operand_fn) ();
/* Set the cgen_parse_operand_fn callback. */
extern void cgen_set_parse_operand_fn
- PARAMS ((CGEN_CPU_DESC, cgen_parse_operand_fn));
+ (CGEN_CPU_DESC, cgen_parse_operand_fn);
/* Called before trying to match a table entry with the insn. */
-extern void cgen_init_parse_operand PARAMS ((CGEN_CPU_DESC));
+extern void cgen_init_parse_operand (CGEN_CPU_DESC);
/* Operand values (keywords, integers, symbols, etc.) */
@@ -422,7 +422,7 @@ typedef struct
/* There is currently no example where both index specs and value specs
are required, so for now both are clumped under "asm_data". */
enum cgen_asm_type asm_type;
- PTR asm_data;
+ void *asm_data;
#ifndef CGEN_HW_NBOOL_ATTRS
#define CGEN_HW_NBOOL_ATTRS 1
#endif
@@ -453,9 +453,9 @@ typedef struct {
} CGEN_HW_TABLE;
extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_name
- PARAMS ((CGEN_CPU_DESC, const char *));
+ (CGEN_CPU_DESC, const char *);
extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_num
- PARAMS ((CGEN_CPU_DESC, unsigned int));
+ (CGEN_CPU_DESC, unsigned int);
/* This struct is used to describe things like register names, etc. */
@@ -543,41 +543,41 @@ typedef struct
/* Lookup a keyword from its name. */
const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_name
- PARAMS ((CGEN_KEYWORD *, const char *));
+ (CGEN_KEYWORD *, const char *);
/* Lookup a keyword from its value. */
const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_value
- PARAMS ((CGEN_KEYWORD *, int));
+ (CGEN_KEYWORD *, int);
/* Add a keyword. */
-void cgen_keyword_add PARAMS ((CGEN_KEYWORD *, CGEN_KEYWORD_ENTRY *));
+void cgen_keyword_add (CGEN_KEYWORD *, CGEN_KEYWORD_ENTRY *);
/* Keyword searching.
This can be used to retrieve every keyword, or a subset. */
CGEN_KEYWORD_SEARCH cgen_keyword_search_init
- PARAMS ((CGEN_KEYWORD *, const char *));
+ (CGEN_KEYWORD *, const char *);
const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
- PARAMS ((CGEN_KEYWORD_SEARCH *));
+ (CGEN_KEYWORD_SEARCH *);
/* Operand value support routines. */
extern const char *cgen_parse_keyword
- PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
+ (CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *);
#ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily. */
extern const char *cgen_parse_signed_integer
- PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+ (CGEN_CPU_DESC, const char **, int, long *);
extern const char *cgen_parse_unsigned_integer
- PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+ (CGEN_CPU_DESC, const char **, int, unsigned long *);
extern const char *cgen_parse_address
- PARAMS ((CGEN_CPU_DESC, const char **, int, int,
- enum cgen_parse_operand_result *, bfd_vma *));
+ (CGEN_CPU_DESC, const char **, int, int,
+ enum cgen_parse_operand_result *, bfd_vma *);
extern const char *cgen_validate_signed_integer
- PARAMS ((long, long, long));
+ (long, long, long);
extern const char *cgen_validate_unsigned_integer
- PARAMS ((unsigned long, unsigned long, unsigned long));
+ (unsigned long, unsigned long, unsigned long);
#endif
/* Operand modes. */
@@ -621,7 +621,7 @@ typedef struct cgen_maybe_multi_ifield
n: indexed by array of more cgen_maybe_multi_ifields. */
union
{
- const PTR p;
+ const void *p;
const struct cgen_maybe_multi_ifield * multi;
const struct cgen_ifld * leaf;
} val;
@@ -705,9 +705,9 @@ typedef struct {
} CGEN_OPERAND_TABLE;
extern const CGEN_OPERAND * cgen_operand_lookup_by_name
- PARAMS ((CGEN_CPU_DESC, const char *));
+ (CGEN_CPU_DESC, const char *);
extern const CGEN_OPERAND * cgen_operand_lookup_by_num
- PARAMS ((CGEN_CPU_DESC, int));
+ (CGEN_CPU_DESC, int);
/* Instruction operand instances.
@@ -1061,8 +1061,8 @@ typedef struct
/* Return number of instructions. This includes any added at run-time. */
-extern int cgen_insn_count PARAMS ((CGEN_CPU_DESC));
-extern int cgen_macro_insn_count PARAMS ((CGEN_CPU_DESC));
+extern int cgen_insn_count (CGEN_CPU_DESC);
+extern int cgen_macro_insn_count (CGEN_CPU_DESC);
/* Macros to access the other insn elements not recorded in CGEN_IBASE. */
@@ -1126,9 +1126,10 @@ typedef struct cgen_minsn_expansion {
If the expansion fails (e.g. "no match") NULL is returned.
Space for the expansion is obtained with malloc.
It is up to the caller to free it. */
- const char * (* fn) PARAMS ((const struct cgen_minsn_expansion *,
- const char *, const char **, int *,
- CGEN_OPERAND **));
+ const char * (* fn)
+ (const struct cgen_minsn_expansion *,
+ const char *, const char **, int *,
+ CGEN_OPERAND **);
#define CGEN_MIEXPN_FN(ex) ((ex)->fn)
/* Instruction(s) the macro expands to.
@@ -1146,15 +1147,15 @@ typedef struct cgen_minsn_expansion {
may contain further macro invocations. */
extern const char * cgen_expand_macro_insn
- PARAMS ((CGEN_CPU_DESC, const struct cgen_minsn_expansion *,
- const char *, const char **, int *, CGEN_OPERAND **));
+ (CGEN_CPU_DESC, const struct cgen_minsn_expansion *,
+ const char *, const char **, int *, CGEN_OPERAND **);
/* The assembler insn table is hashed based on some function of the mnemonic
(the actually hashing done is up to the target, but we provide a few
examples like the first letter or a function of the entire mnemonic). */
extern CGEN_INSN_LIST * cgen_asm_lookup_insn
- PARAMS ((CGEN_CPU_DESC, const char *));
+ (CGEN_CPU_DESC, const char *);
#define CGEN_ASM_LOOKUP_INSN(cd, string) cgen_asm_lookup_insn ((cd), (string))
#define CGEN_ASM_NEXT_INSN(insn) ((insn)->next)
@@ -1162,7 +1163,7 @@ extern CGEN_INSN_LIST * cgen_asm_lookup_insn
instruction (the actually hashing done is up to the target). */
extern CGEN_INSN_LIST * cgen_dis_lookup_insn
- PARAMS ((CGEN_CPU_DESC, const char *, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, const char *, CGEN_INSN_INT);
/* FIXME: delete these two */
#define CGEN_DIS_LOOKUP_INSN(cd, buf, value) cgen_dis_lookup_insn ((cd), (buf), (value))
#define CGEN_DIS_NEXT_INSN(insn) ((insn)->next)
@@ -1246,25 +1247,24 @@ typedef struct cgen_cpu_desc
int int_insn_p;
/* Called to rebuild the tables after something has changed. */
- void (*rebuild_tables) PARAMS ((CGEN_CPU_DESC));
+ void (*rebuild_tables) (CGEN_CPU_DESC);
/* Operand parser callback. */
cgen_parse_operand_fn * parse_operand_fn;
/* Parse/insert/extract/print cover fns for operands. */
const char * (*parse_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, const char **,
- CGEN_FIELDS *fields_));
+ (CGEN_CPU_DESC, int opindex_, const char **, CGEN_FIELDS *fields_);
#ifdef __BFD_H_SEEN__
const char * (*insert_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
- CGEN_INSN_BYTES_PTR, bfd_vma pc_));
+ (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
+ CGEN_INSN_BYTES_PTR, bfd_vma pc_);
int (*extract_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- CGEN_FIELDS *fields_, bfd_vma pc_));
+ (CGEN_CPU_DESC, int opindex_, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ CGEN_FIELDS *fields_, bfd_vma pc_);
void (*print_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, PTR info_, CGEN_FIELDS * fields_,
- void const *attrs_, bfd_vma pc_, int length_));
+ (CGEN_CPU_DESC, int opindex_, void * info_, CGEN_FIELDS * fields_,
+ void const *attrs_, bfd_vma pc_, int length_);
#else
const char * (*insert_operand) ();
int (*extract_operand) ();
@@ -1280,19 +1280,19 @@ typedef struct cgen_cpu_desc
#define CGEN_CPU_SIZEOF_FIELDS(cd) ((cd)->sizeof_fields)
/* Set the bitsize field. */
- void (*set_fields_bitsize) PARAMS ((CGEN_FIELDS *fields_, int size_));
+ void (*set_fields_bitsize) (CGEN_FIELDS *fields_, int size_);
#define CGEN_CPU_SET_FIELDS_BITSIZE(cd) ((cd)->set_fields_bitsize)
/* CGEN_FIELDS accessors. */
int (*get_int_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
+ (CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_);
void (*set_int_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_));
+ (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_);
#ifdef __BFD_H_SEEN__
bfd_vma (*get_vma_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_));
+ (CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_);
void (*set_vma_operand)
- PARAMS ((CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, bfd_vma value_));
+ (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, bfd_vma value_);
#else
long (*get_vma_operand) ();
void (*set_vma_operand) ();
@@ -1314,19 +1314,19 @@ typedef struct cgen_cpu_desc
#define CGEN_PRINT_FN(cd, insn) (cd->print_handlers[(insn)->opcode->handlers.print])
/* Return non-zero if insn should be added to hash table. */
- int (* asm_hash_p) PARAMS ((const CGEN_INSN *));
+ int (* asm_hash_p) (const CGEN_INSN *);
/* Assembler hash function. */
- unsigned int (* asm_hash) PARAMS ((const char *));
+ unsigned int (* asm_hash) (const char *);
/* Number of entries in assembler hash table. */
unsigned int asm_hash_size;
/* Return non-zero if insn should be added to hash table. */
- int (* dis_hash_p) PARAMS ((const CGEN_INSN *));
+ int (* dis_hash_p) (const CGEN_INSN *);
/* Disassembler hash function. */
- unsigned int (* dis_hash) PARAMS ((const char *, CGEN_INSN_INT));
+ unsigned int (* dis_hash) (const char *, CGEN_INSN_INT);
/* Number of entries in disassembler hash table. */
unsigned int dis_hash_size;
@@ -1381,81 +1381,80 @@ extern CGEN_CPU_DESC CGEN_SYM (cpu_open) (enum cgen_cpu_open_arg, ...);
/* Cover fn to handle simple case. */
-extern CGEN_CPU_DESC CGEN_SYM (cpu_open_1) PARAMS ((const char *mach_name_,
- enum cgen_endian endian_));
+extern CGEN_CPU_DESC CGEN_SYM (cpu_open_1)
+ (const char *mach_name_, enum cgen_endian endian_);
/* Close it. */
-extern void CGEN_SYM (cpu_close) PARAMS ((CGEN_CPU_DESC));
+extern void CGEN_SYM (cpu_close) (CGEN_CPU_DESC);
/* Initialize the opcode table for use.
Called by init_asm/init_dis. */
-extern void CGEN_SYM (init_opcode_table) PARAMS ((CGEN_CPU_DESC cd_));
+extern void CGEN_SYM (init_opcode_table) (CGEN_CPU_DESC cd_);
/* build the insn selection regex.
called by init_opcode_table */
-extern char * CGEN_SYM(build_insn_regex) PARAMS ((CGEN_INSN *insn_));
+extern char * CGEN_SYM(build_insn_regex) (CGEN_INSN *insn_);
/* Initialize the ibld table for use.
Called by init_asm/init_dis. */
-extern void CGEN_SYM (init_ibld_table) PARAMS ((CGEN_CPU_DESC cd_));
+extern void CGEN_SYM (init_ibld_table) (CGEN_CPU_DESC cd_);
/* Initialize an cpu table for assembler or disassembler use.
These must be called immediately after cpu_open. */
-extern void CGEN_SYM (init_asm) PARAMS ((CGEN_CPU_DESC));
-extern void CGEN_SYM (init_dis) PARAMS ((CGEN_CPU_DESC));
+extern void CGEN_SYM (init_asm) (CGEN_CPU_DESC);
+extern void CGEN_SYM (init_dis) (CGEN_CPU_DESC);
/* Initialize the operand instance table for use. */
-extern void CGEN_SYM (init_opinst_table) PARAMS ((CGEN_CPU_DESC cd_));
+extern void CGEN_SYM (init_opinst_table) (CGEN_CPU_DESC cd_);
/* Assemble an instruction. */
extern const CGEN_INSN * CGEN_SYM (assemble_insn)
- PARAMS ((CGEN_CPU_DESC, const char *, CGEN_FIELDS *,
- CGEN_INSN_BYTES_PTR, char **));
+ (CGEN_CPU_DESC, const char *, CGEN_FIELDS *,
+ CGEN_INSN_BYTES_PTR, char **);
extern const CGEN_KEYWORD CGEN_SYM (operand_mach);
-extern int CGEN_SYM (get_mach) PARAMS ((const char *));
+extern int CGEN_SYM (get_mach) (const char *);
/* Operand index computation. */
extern const CGEN_INSN * cgen_lookup_insn
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN * insn_,
- CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
- int length_, CGEN_FIELDS *fields_, int alias_p_));
+ (CGEN_CPU_DESC, const CGEN_INSN * insn_,
+ CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
+ int length_, CGEN_FIELDS *fields_, int alias_p_);
extern void cgen_get_insn_operands
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN * insn_,
- const CGEN_FIELDS *fields_, int *indices_));
+ (CGEN_CPU_DESC, const CGEN_INSN * insn_,
+ const CGEN_FIELDS *fields_, int *indices_);
extern const CGEN_INSN * cgen_lookup_get_insn_operands
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *insn_,
- CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
- int length_, int *indices_, CGEN_FIELDS *fields_));
+ (CGEN_CPU_DESC, const CGEN_INSN *insn_,
+ CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
+ int length_, int *indices_, CGEN_FIELDS *fields_);
/* Cover fns to bfd_get/set. */
extern CGEN_INSN_INT cgen_get_insn_value
- PARAMS ((CGEN_CPU_DESC, unsigned char *, int));
+ (CGEN_CPU_DESC, unsigned char *, int);
extern void cgen_put_insn_value
- PARAMS ((CGEN_CPU_DESC, unsigned char *, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, unsigned char *, int, CGEN_INSN_INT);
/* Read in a cpu description file.
??? For future concerns, including adding instructions to the assembler/
disassembler at run-time. */
-extern const char * cgen_read_cpu_file
- PARAMS ((CGEN_CPU_DESC, const char * filename_));
+extern const char * cgen_read_cpu_file (CGEN_CPU_DESC, const char * filename_);
/* Allow signed overflow of instruction fields. */
-extern void cgen_set_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
+extern void cgen_set_signed_overflow_ok (CGEN_CPU_DESC);
/* Generate an error message if a signed field in an instruction overflows. */
-extern void cgen_clear_signed_overflow_ok PARAMS ((CGEN_CPU_DESC));
+extern void cgen_clear_signed_overflow_ok (CGEN_CPU_DESC);
/* Will an error message be generated if a signed field in an instruction overflows ? */
-extern unsigned int cgen_signed_overflow_ok_p PARAMS ((CGEN_CPU_DESC));
+extern unsigned int cgen_signed_overflow_ok_p (CGEN_CPU_DESC);
#endif /* CGEN_H */
diff --git a/include/opcode/d10v.h b/include/opcode/d10v.h
index cc27850b03..74d9006f17 100644
--- a/include/opcode/d10v.h
+++ b/include/opcode/d10v.h
@@ -1,5 +1,6 @@
/* d10v.h -- Header file for D10V opcode table
- Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
Written by Martin Hunt (hunt@cygnus.com), Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -198,7 +199,7 @@ struct pd_reg
};
extern const struct pd_reg d10v_predefined_registers[];
-int d10v_reg_name_cnt PARAMS ((void));
+int d10v_reg_name_cnt (void);
/* an expressionS only has one register type, so we fake it */
/* by setting high bits to indicate type */
diff --git a/include/opcode/d30v.h b/include/opcode/d30v.h
index c18874b66b..809bdeb7db 100644
--- a/include/opcode/d30v.h
+++ b/include/opcode/d30v.h
@@ -1,5 +1,5 @@
/* d30v.h -- Header file for D30V opcode table
- Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
Written by Martin Hunt (hunt@cygnus.com), Cygnus Solutions
This file is part of GDB, GAS, and the GNU binutils.
@@ -32,7 +32,7 @@ struct pd_reg
};
extern const struct pd_reg pre_defined_registers[];
-int reg_name_cnt PARAMS ((void));
+int reg_name_cnt (void);
/* the number of control registers */
#define MAX_CONTROL_REG 64
diff --git a/include/opcode/i370.h b/include/opcode/i370.h
index 155a3cf866..e317f23642 100644
--- a/include/opcode/i370.h
+++ b/include/opcode/i370.h
@@ -1,5 +1,5 @@
/* i370.h -- Header file for S/390 opcode table
- Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
PowerPC version written by Ian Lance Taylor, Cygnus Support
Rewritten for i370 ESA/390 support, Linas Vepstas <linas@linas.org>
@@ -159,8 +159,8 @@ struct i370_operand
string (the operand will be inserted in any case). If the
operand value is legal, *ERRMSG will be unchanged (most operands
can accept any value). */
- i370_insn_t (*insert) PARAMS ((i370_insn_t instruction, long op,
- const char **errmsg));
+ i370_insn_t (*insert)
+ (i370_insn_t instruction, long op, const char **errmsg);
/* Extraction function. This is used by the disassembler. To
extract this operand type from an instruction, check this field.
@@ -179,7 +179,7 @@ struct i370_operand
non-zero if this operand type can not actually be extracted from
this operand (i.e., the instruction does not match). If the
operand is valid, *INVALID will not be changed. */
- long (*extract) PARAMS ((i370_insn_t instruction, int *invalid));
+ long (*extract) (i370_insn_t instruction, int *invalid);
/* One bit syntax flags. */
unsigned long flags;
diff --git a/include/opcode/i860.h b/include/opcode/i860.h
index 6e2a683a49..b46a5e5a4e 100644
--- a/include/opcode/i860.h
+++ b/include/opcode/i860.h
@@ -494,9 +494,9 @@ static const struct i860_opcode i860_opcodes[] =
/* Floating point pseudo-instructions. */
{ "fmov.ss", 0x48000049, 0xb7e005b6, "e,g", 0 }, /* fiadd.ss fsrc1,f0,fdest */
{ "fmov.dd", 0x480001c9, 0xb7e00436, "e,g", 0 }, /* fiadd.dd fsrc1,f0,fdest */
-{ "fmov.sd", 0x480000b0, 0xb7e0054f, "e,g", 0 }, /* fadd.sd fsrc1,f0,fdest */
-{ "fmov.ds", 0x48000130, 0xb7e004cf, "e,g", 0 }, /* fadd.ds fsrc1,f0,fdest */
-{ "pfmov.ds", 0x48000530, 0xb73000cf, "e,g", 0 }, /* pfadd.ds fsrc1,f0,fdest */
+{ "fmov.sd", 0x480000b3, 0xb400054c, "e,g", 0 }, /* famov.sd fsrc1,fdest */
+{ "fmov.ds", 0x48000133, 0xb40004cc, "e,g", 0 }, /* famov.ds fsrc1,fdest */
+{ "pfmov.ds", 0x48000533, 0xb40000cc, "e,g", 0 }, /* pfamov.ds fsrc1,fdest */
{ "pfmov.dd", 0x480005c9, 0xb7e00036, "e,g", 0 }, /* pfiadd.dd fsrc1,f0,fdest */
{ 0, 0, 0, 0, 0 },
diff --git a/include/opcode/or32.h b/include/opcode/or32.h
index 4609a48db5..d72b9bda35 100644
--- a/include/opcode/or32.h
+++ b/include/opcode/or32.h
@@ -1,5 +1,5 @@
/* Table of opcodes for the OpenRISC 1000 ISA.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Damjan Lampret (lampret@opencores.org).
This file is part of or1k_gen_isa, or1ksim, GDB and GAS.
@@ -27,10 +27,6 @@
#define NUM_UNSIGNED (0)
#define NUM_SIGNED (1)
-#ifndef PARAMS
-#define PARAMS(x) x
-#endif
-
#define MAX_GPRS 32
#define PAGE_SIZE 4096
#undef __HALF_WORD_INSN__
@@ -71,7 +67,7 @@ struct or32_opcode
/* Opcode and operand encoding. */
char *encoding;
- void (*exec) PARAMS ((void));
+ void (*exec) (void);
unsigned int flags;
};
@@ -93,59 +89,59 @@ extern struct insn_op_struct
} **op_start;
#ifdef HAS_EXECUTION
-extern void l_invalid PARAMS ((void));
-extern void l_sfne PARAMS ((void));
-extern void l_bf PARAMS ((void));
-extern void l_add PARAMS ((void));
-extern void l_sw PARAMS ((void));
-extern void l_sb PARAMS ((void));
-extern void l_sh PARAMS ((void));
-extern void l_lwz PARAMS ((void));
-extern void l_lbs PARAMS ((void));
-extern void l_lbz PARAMS ((void));
-extern void l_lhs PARAMS ((void));
-extern void l_lhz PARAMS ((void));
-extern void l_movhi PARAMS ((void));
-extern void l_and PARAMS ((void));
-extern void l_or PARAMS ((void));
-extern void l_xor PARAMS ((void));
-extern void l_sub PARAMS ((void));
-extern void l_mul PARAMS ((void));
-extern void l_div PARAMS ((void));
-extern void l_divu PARAMS ((void));
-extern void l_sll PARAMS ((void));
-extern void l_sra PARAMS ((void));
-extern void l_srl PARAMS ((void));
-extern void l_j PARAMS ((void));
-extern void l_jal PARAMS ((void));
-extern void l_jalr PARAMS ((void));
-extern void l_jr PARAMS ((void));
-extern void l_rfe PARAMS ((void));
-extern void l_nop PARAMS ((void));
-extern void l_bnf PARAMS ((void));
-extern void l_sfeq PARAMS ((void));
-extern void l_sfgts PARAMS ((void));
-extern void l_sfges PARAMS ((void));
-extern void l_sflts PARAMS ((void));
-extern void l_sfles PARAMS ((void));
-extern void l_sfgtu PARAMS ((void));
-extern void l_sfgeu PARAMS ((void));
-extern void l_sfltu PARAMS ((void));
-extern void l_sfleu PARAMS ((void));
-extern void l_mtspr PARAMS ((void));
-extern void l_mfspr PARAMS ((void));
-extern void l_sys PARAMS ((void));
-extern void l_trap PARAMS ((void)); /* CZ 21/06/01. */
-extern void l_macrc PARAMS ((void));
-extern void l_mac PARAMS ((void));
-extern void l_msb PARAMS ((void));
-extern void l_invalid PARAMS ((void));
-extern void l_cust1 PARAMS ((void));
-extern void l_cust2 PARAMS ((void));
-extern void l_cust3 PARAMS ((void));
-extern void l_cust4 PARAMS ((void));
+extern void l_invalid (void);
+extern void l_sfne (void);
+extern void l_bf (void);
+extern void l_add (void);
+extern void l_sw (void);
+extern void l_sb (void);
+extern void l_sh (void);
+extern void l_lwz (void);
+extern void l_lbs (void);
+extern void l_lbz (void);
+extern void l_lhs (void);
+extern void l_lhz (void);
+extern void l_movhi (void);
+extern void l_and (void);
+extern void l_or (void);
+extern void l_xor (void);
+extern void l_sub (void);
+extern void l_mul (void);
+extern void l_div (void);
+extern void l_divu (void);
+extern void l_sll (void);
+extern void l_sra (void);
+extern void l_srl (void);
+extern void l_j (void);
+extern void l_jal (void);
+extern void l_jalr (void);
+extern void l_jr (void);
+extern void l_rfe (void);
+extern void l_nop (void);
+extern void l_bnf (void);
+extern void l_sfeq (void);
+extern void l_sfgts (void);
+extern void l_sfges (void);
+extern void l_sflts (void);
+extern void l_sfles (void);
+extern void l_sfgtu (void);
+extern void l_sfgeu (void);
+extern void l_sfltu (void);
+extern void l_sfleu (void);
+extern void l_mtspr (void);
+extern void l_mfspr (void);
+extern void l_sys (void);
+extern void l_trap (void); /* CZ 21/06/01. */
+extern void l_macrc (void);
+extern void l_mac (void);
+extern void l_msb (void);
+extern void l_invalid (void);
+extern void l_cust1 (void);
+extern void l_cust2 (void);
+extern void l_cust3 (void);
+extern void l_cust4 (void);
#endif
-extern void l_none PARAMS ((void));
+extern void l_none (void);
extern const struct or32_letter or32_letters[];
@@ -154,31 +150,31 @@ extern const struct or32_opcode or32_opcodes[];
extern const unsigned int or32_num_opcodes;
/* Calculates instruction length in bytes. Always 4 for OR32. */
-extern int insn_len PARAMS ((int));
+extern int insn_len (int);
/* Is individual insn's operand signed or unsigned? */
-extern int letter_signed PARAMS ((char));
+extern int letter_signed (char);
/* Number of letters in the individual lettered operand. */
-extern int letter_range PARAMS ((char));
+extern int letter_range (char);
/* MM: Returns index of given instruction name. */
-extern int insn_index PARAMS ((char *));
+extern int insn_index (char *);
/* MM: Returns instruction name from index. */
-extern const char *insn_name PARAMS ((int));
+extern const char *insn_name (int);
/* MM: Constructs new FSM, based on or32_opcodes. */
-extern void build_automata PARAMS ((void));
+extern void build_automata (void);
/* MM: Destructs FSM. */
-extern void destruct_automata PARAMS ((void));
+extern void destruct_automata (void);
/* MM: Decodes instruction using FSM. Call build_automata first. */
-extern int insn_decode PARAMS ((unsigned int));
+extern int insn_decode (unsigned int);
/* Disassemble one instruction from insn to disassemble.
Return the size of the instruction. */
-int disassemble_insn PARAMS ((unsigned long));
+int disassemble_insn (unsigned long);
#endif
diff --git a/include/opcode/pj.h b/include/opcode/pj.h
index 5779507be8..f9e44dbef1 100644
--- a/include/opcode/pj.h
+++ b/include/opcode/pj.h
@@ -1,5 +1,5 @@
/* Definitions for decoding the picoJava opcode table.
- Copyright 1999 Free Software Foundation, Inc.
+ Copyright 1999, 2002, 2003 Free Software Foundation, Inc.
Contributed by Steve Chamberlain of Transmeta (sac@pobox.com).
This program is free software; you can redistribute it and/or modify
@@ -44,6 +44,6 @@ typedef struct pj_opc_info_t
unsigned char arg[2];
union {
const char *name;
- void (*func) PARAMS ((struct pj_opc_info_t *, char *));
+ void (*func) (struct pj_opc_info_t *, char *);
} u;
} pj_opc_info_t;
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index c4adf712b7..342237e8dd 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -59,77 +59,80 @@ extern const int powerpc_num_opcodes;
/* Values defined for the flags field of a struct powerpc_opcode. */
/* Opcode is defined for the PowerPC architecture. */
-#define PPC_OPCODE_PPC (01)
+#define PPC_OPCODE_PPC 1
/* Opcode is defined for the POWER (RS/6000) architecture. */
-#define PPC_OPCODE_POWER (02)
+#define PPC_OPCODE_POWER 2
/* Opcode is defined for the POWER2 (Rios 2) architecture. */
-#define PPC_OPCODE_POWER2 (04)
+#define PPC_OPCODE_POWER2 4
/* Opcode is only defined on 32 bit architectures. */
-#define PPC_OPCODE_32 (010)
+#define PPC_OPCODE_32 8
/* Opcode is only defined on 64 bit architectures. */
-#define PPC_OPCODE_64 (020)
+#define PPC_OPCODE_64 0x10
/* Opcode is supported by the Motorola PowerPC 601 processor. The 601
is assumed to support all PowerPC (PPC_OPCODE_PPC) instructions,
but it also supports many additional POWER instructions. */
-#define PPC_OPCODE_601 (040)
+#define PPC_OPCODE_601 0x20
/* Opcode is supported in both the Power and PowerPC architectures
(ie, compiler's -mcpu=common or assembler's -mcom). */
-#define PPC_OPCODE_COMMON (0100)
+#define PPC_OPCODE_COMMON 0x40
/* Opcode is supported for any Power or PowerPC platform (this is
for the assembler's -many option, and it eliminates duplicates). */
-#define PPC_OPCODE_ANY (0200)
+#define PPC_OPCODE_ANY 0x80
/* Opcode is supported as part of the 64-bit bridge. */
-#define PPC_OPCODE_64_BRIDGE (0400)
+#define PPC_OPCODE_64_BRIDGE 0x100
/* Opcode is supported by Altivec Vector Unit */
-#define PPC_OPCODE_ALTIVEC (01000)
+#define PPC_OPCODE_ALTIVEC 0x200
/* Opcode is supported by PowerPC 403 processor. */
-#define PPC_OPCODE_403 (02000)
+#define PPC_OPCODE_403 0x400
/* Opcode is supported by PowerPC BookE processor. */
-#define PPC_OPCODE_BOOKE (04000)
+#define PPC_OPCODE_BOOKE 0x800
/* Opcode is only supported by 64-bit PowerPC BookE processor. */
-#define PPC_OPCODE_BOOKE64 (010000)
+#define PPC_OPCODE_BOOKE64 0x1000
+
+/* Opcode is supported by PowerPC 440 processor. */
+#define PPC_OPCODE_440 0x2000
/* Opcode is only supported by Power4 architecture. */
-#define PPC_OPCODE_POWER4 (020000)
+#define PPC_OPCODE_POWER4 0x4000
/* Opcode isn't supported by Power4 architecture. */
-#define PPC_OPCODE_NOPOWER4 (040000)
+#define PPC_OPCODE_NOPOWER4 0x8000
/* Opcode is only supported by POWERPC Classic architecture. */
-#define PPC_OPCODE_CLASSIC (0100000)
+#define PPC_OPCODE_CLASSIC 0x10000
/* Opcode is only supported by e500x2 Core. */
-#define PPC_OPCODE_SPE (0200000)
+#define PPC_OPCODE_SPE 0x20000
/* Opcode is supported by e500x2 Integer select APU. */
-#define PPC_OPCODE_ISEL (0400000)
+#define PPC_OPCODE_ISEL 0x40000
/* Opcode is an e500 SPE floating point instruction. */
-#define PPC_OPCODE_EFS (01000000)
+#define PPC_OPCODE_EFS 0x80000
/* Opcode is supported by branch locking APU. */
-#define PPC_OPCODE_BRLOCK (02000000)
+#define PPC_OPCODE_BRLOCK 0x100000
/* Opcode is supported by performance monitor APU. */
-#define PPC_OPCODE_PMR (04000000)
+#define PPC_OPCODE_PMR 0x200000
/* Opcode is supported by cache locking APU. */
-#define PPC_OPCODE_CACHELCK (010000000)
+#define PPC_OPCODE_CACHELCK 0x400000
/* Opcode is supported by machine check APU. */
-#define PPC_OPCODE_RFMCI (020000000)
+#define PPC_OPCODE_RFMCI 0x800000
/* A macro to extract the major opcode from an instruction. */
#define PPC_OP(i) (((i) >> 26) & 0x3f)
@@ -160,9 +163,8 @@ struct powerpc_operand
string (the operand will be inserted in any case). If the
operand value is legal, *ERRMSG will be unchanged (most operands
can accept any value). */
- unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
- int dialect,
- const char **errmsg));
+ unsigned long (*insert)
+ (unsigned long instruction, long op, int dialect, const char **errmsg);
/* Extraction function. This is used by the disassembler. To
extract this operand type from an instruction, check this field.
@@ -181,8 +183,7 @@ struct powerpc_operand
non-zero if this operand type can not actually be extracted from
this operand (i.e., the instruction does not match). If the
operand is valid, *INVALID will not be changed. */
- long (*extract) PARAMS ((unsigned long instruction, int dialect,
- int *invalid));
+ long (*extract) (unsigned long instruction, int dialect, int *invalid);
/* One bit syntax flags. */
unsigned long flags;
diff --git a/include/opcode/sparc.h b/include/opcode/sparc.h
index c41292364b..c3364933a6 100644
--- a/include/opcode/sparc.h
+++ b/include/opcode/sparc.h
@@ -1,6 +1,6 @@
/* Definitions for opcode table for the sparc.
- Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2002
- Free Software Foundation, Inc.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2002,
+ 2003 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
the GNU Binutils.
@@ -74,8 +74,7 @@ struct sparc_opcode_arch {
extern const struct sparc_opcode_arch sparc_opcode_archs[];
/* Given architecture name, look up it's sparc_opcode_arch_val value. */
-extern enum sparc_opcode_arch_val sparc_opcode_lookup_arch
- PARAMS ((const char *));
+extern enum sparc_opcode_arch_val sparc_opcode_lookup_arch (const char *);
/* Return the bitmask of supported architectures for ARCH. */
#define SPARC_OPCODE_SUPPORTED(ARCH) (sparc_opcode_archs[ARCH].supported)
@@ -223,14 +222,14 @@ The following chars are unused: (note: ,[] are used as punctuation)
extern const struct sparc_opcode sparc_opcodes[];
extern const int sparc_num_opcodes;
-extern int sparc_encode_asi PARAMS ((const char *));
-extern const char *sparc_decode_asi PARAMS ((int));
-extern int sparc_encode_membar PARAMS ((const char *));
-extern const char *sparc_decode_membar PARAMS ((int));
-extern int sparc_encode_prefetch PARAMS ((const char *));
-extern const char *sparc_decode_prefetch PARAMS ((int));
-extern int sparc_encode_sparclet_cpreg PARAMS ((const char *));
-extern const char *sparc_decode_sparclet_cpreg PARAMS ((int));
+extern int sparc_encode_asi (const char *);
+extern const char *sparc_decode_asi (int);
+extern int sparc_encode_membar (const char *);
+extern const char *sparc_decode_membar (int);
+extern int sparc_encode_prefetch (const char *);
+extern const char *sparc_decode_prefetch (int);
+extern int sparc_encode_sparclet_cpreg (const char *);
+extern const char *sparc_decode_sparclet_cpreg (int);
/*
* Local Variables:
diff --git a/include/opcode/tic80.h b/include/opcode/tic80.h
index 01159e46b1..c6a79df286 100644
--- a/include/opcode/tic80.h
+++ b/include/opcode/tic80.h
@@ -1,5 +1,5 @@
/* tic80.h -- Header file for TI TMS320C80 (MV) opcode table
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2003 Free Software Foundation, Inc.
Written by Fred Fish (fnf@cygnus.com), Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -90,8 +90,8 @@ struct tic80_operand
operand value is legal, *ERRMSG will be unchanged (most operands
can accept any value). */
- unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
- const char **errmsg));
+ unsigned long (*insert)
+ (unsigned long instruction, long op, const char **errmsg);
/* Extraction function. This is used by the disassembler. To
extract this operand type from an instruction, check this field.
@@ -111,7 +111,7 @@ struct tic80_operand
this operand (i.e., the instruction does not match). If the
operand is valid, *INVALID will not be changed. */
- long (*extract) PARAMS ((unsigned long instruction, int *invalid));
+ long (*extract) (unsigned long instruction, int *invalid);
/* One bit syntax flags. */
@@ -265,13 +265,18 @@ struct predefined_symbol
#define PDS_NAME(pdsp) ((pdsp) -> name)
#define PDS_VALUE(pdsp) ((pdsp) -> value)
-extern const struct predefined_symbol tic80_predefined_symbols[]; /* Translation array */
-extern const int tic80_num_predefined_symbols; /* How many members in the array */
+/* Translation array. */
+extern const struct predefined_symbol tic80_predefined_symbols[];
+/* How many members in the array. */
+extern const int tic80_num_predefined_symbols;
-const char *tic80_value_to_symbol PARAMS ((int val, int class)); /* Translate value to symbolic name */
-int tic80_symbol_to_value PARAMS ((char *name, int class)); /* Translate symbolic name to value */
+/* Translate value to symbolic name. */
+const char *tic80_value_to_symbol (int val, int class);
-const struct predefined_symbol *
-tic80_next_predefined_symbol PARAMS ((const struct predefined_symbol *));
+/* Translate symbolic name to value. */
+int tic80_symbol_to_value (char *name, int class);
+
+const struct predefined_symbol *tic80_next_predefined_symbol
+ (const struct predefined_symbol *);
#endif /* TIC80_H */
diff --git a/include/opcode/v850.h b/include/opcode/v850.h
index 2183bc8586..75689bff67 100644
--- a/include/opcode/v850.h
+++ b/include/opcode/v850.h
@@ -1,5 +1,5 @@
/* v850.h -- Header file for NEC V850 opcode table
- Copyright 1996, 1997, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2001, 2003 Free Software Foundation, Inc.
Written by J.T. Conklin, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -59,6 +59,7 @@ struct v850_opcode
#define PROCESSOR_V850E (1 << 1) /* Just the V850E. */
#define PROCESSOR_NOT_V850 (~ PROCESSOR_V850) /* Any processor except the V850. */
#define PROCESSOR_V850EA (1 << 2) /* Just the V850EA. */
+#define PROCESSOR_V850E1 (1 << 3) /* Just the V850E1. */
/* The table itself is sorted by major opcode number, and is otherwise
in the order in which the disassembler should consider
@@ -95,8 +96,8 @@ struct v850_operand
string (the operand will be inserted in any case). If the
operand value is legal, *ERRMSG will be unchanged (most operands
can accept any value). */
- unsigned long (* insert) PARAMS ((unsigned long instruction, long op,
- const char ** errmsg));
+ unsigned long (* insert)
+ (unsigned long instruction, long op, const char ** errmsg);
/* Extraction function. This is used by the disassembler. To
extract this operand type from an instruction, check this field.
@@ -114,7 +115,7 @@ struct v850_operand
non-zero if this operand type can not actually be extracted from
this operand (i.e., the instruction does not match). If the
operand is valid, *INVALID will not be changed. */
- unsigned long (* extract) PARAMS ((unsigned long instruction, int * invalid));
+ unsigned long (* extract) (unsigned long instruction, int * invalid);
/* One bit syntax flags. */
int flags;
diff --git a/install-sh b/install-sh
index e9de23842d..0ec27bcd48 100755
--- a/install-sh
+++ b/install-sh
@@ -1,19 +1,37 @@
#!/bin/sh
#
# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
#
-# Copyright 1991 by the Massachusetts Institute of Technology
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -56,7 +74,7 @@ dir_arg=""
while [ x"$1" != x ]; do
case $1 in
- -c) instcmd="$cpprog"
+ -c) instcmd=$cpprog
shift
continue;;
@@ -79,7 +97,7 @@ while [ x"$1" != x ]; do
shift
continue;;
- -s) stripcmd="$stripprog"
+ -s) stripcmd=$stripprog
shift
continue;;
@@ -106,128 +124,132 @@ done
if [ x"$src" = x ]
then
- echo "install: no input file specified"
+ echo "$0: no input file specified" >&2
exit 1
else
- true
+ :
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
-
- if [ -d $dst ]; then
+
+ if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
- instcmd=mkdir
+ instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
+# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
- if [ -f $src -o -d $src ]
+ if [ -f "$src" ] || [ -d "$src" ]
then
- true
+ :
else
- echo "install: $src does not exist"
+ echo "$0: $src does not exist" >&2
exit 1
fi
-
+
if [ x"$dst" = x ]
then
- echo "install: no destination specified"
+ echo "$0: no destination specified" >&2
exit 1
else
- true
+ :
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
- if [ -d $dst ]
+ if [ -d "$dst" ]
then
- dst="$dst"/`basename $src`
+ dst=$dst/`basename "$src"`
else
- true
+ :
fi
fi
## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
+defaultIFS='
+ '
+IFS="${IFS-$defaultIFS}"
-oIFS="${IFS}"
+oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
+ pathcomp=$pathcomp$1
shift
- if [ ! -d "${pathcomp}" ] ;
+ if [ ! -d "$pathcomp" ] ;
then
- $mkdirprog "${pathcomp}"
+ $mkdirprog "$pathcomp"
else
- true
+ :
fi
- pathcomp="${pathcomp}/"
+ pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
- $doit $instcmd $dst &&
+ $doit $instcmd "$dst" &&
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
- if [ x"$transformarg" = x ]
+ if [ x"$transformarg" = x ]
then
- dstfile=`basename $dst`
+ dstfile=`basename "$dst"`
else
- dstfile=`basename $dst $transformbasename |
+ dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
- if [ x"$dstfile" = x ]
+ if [ x"$dstfile" = x ]
then
- dstfile=`basename $dst`
+ dstfile=`basename "$dst"`
else
- true
+ :
fi
-# Make a temp file name in the proper directory.
+# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
+ rmtmp=$dstdir/#rm.$$#
-# Move or copy the file name to the temp name
+# Trap to clean up temp files at exit.
- $doit $instcmd $src $dsttmp &&
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
- trap "rm -f ${dsttmp}" 0 &&
+# Move or copy the file name to the temp name
+
+ $doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
@@ -235,17 +257,38 @@ else
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# Now remove or move aside any old file at destination location. We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons. In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+ if [ -f "$dstdir/$dstfile" ]
+ then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+ {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+} &&
# Now rename the file to the real destination.
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
+# The final little trick to "correctly" pass the exit status to the exit trap.
-exit 0
+{
+ (exit 0); exit
+}
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index f26593fc08..5c4175bbd4 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,41 @@
+2003-09-15 Andrew Cagney <cagney@redhat.com>
+
+ * floatformat.c (get_field): Make "data" constant.
+ (floatformat_is_valid, floatformat_to_double): Make "from"
+ constant, fix casts.
+ (floatformat_from_double): Make "from" constant.
+
+2003-09-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * floatformat.c (floatformat_is_valid): New function.
+ (get_field, put_field): Correct comments.
+
+2003-09-06 Josef Zlomek <zlomekj@suse.cz>
+
+ * fibheap.c (fibheap_replace_key_data): Change type of OKEY to
+ FIBHEAPKEY_T.
+
+2003-09-02 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR bootstrap/12100
+ * aclocal.m4 (AC_LANG_FUNC_LINK_TRY): Define.
+ * configure: Rebuilt.
+
+2003-08-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * aclocal.m4: Include acx.m4 and no-executables.m4.
+ (libiberty_AC_FUNC_STRNCMP): Use AC_LIBOBJ.
+ (LIB_AC_PROG_CC): Remove.
+ * configure.in: Update AC_PREREQ to 2.57. Use GCC_NO_EXECUTABLES.
+ Use AC_PROG_CC and set ac_libiberty_warn_cflags instead of using
+ LIB_AC_PROG_CC. Use AC_LIBOBJ. Call AC_ISC_POSIX later, only if
+ performing link tests.
+ * configure: Regenerated.
+
+2003-08-12 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * cp-demangle.c: Clarify what package(s) this is part of.
+
2003-07-05 Danny Smith <dannysmith@users.sourceforge.net>
* pex-win32.c (pexecute): Mark parameters this_pname and
diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4
index a3349f3b08..f33e0c6218 100644
--- a/libiberty/aclocal.m4
+++ b/libiberty/aclocal.m4
@@ -1,4 +1,6 @@
sinclude(../config/accross.m4)
+sinclude(../config/acx.m4)
+sinclude(../config/no-executables.m4)
dnl See whether strncmp reads past the end of its string parameters.
dnl On some versions of SunOS4 at least, strncmp reads a word at a time
@@ -71,7 +73,7 @@ main ()
ac_cv_func_strncmp_works=no)
rm -f core core.* *.core])
if test $ac_cv_func_strncmp_works = no ; then
- LIBOBJS="$LIBOBJS strncmp.o"
+ AC_LIBOBJ([strncmp])
fi
])
@@ -118,48 +120,6 @@ if test $libiberty_cv_decl_needed_$1 = yes; then
fi
])dnl
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_PROVIDE([AC_PROG_CC])
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- 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=
- ac_libiberty_warn_cflags=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-AC_SUBST(ac_libiberty_warn_cflags)
-])
-
# Work around a bug in autoheader. This can go away when we switch to
# autoconf >2.50. The use of define instead of AC_DEFUN is
# deliberate.
@@ -220,3 +180,52 @@ AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction,
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown])
])
+
+# AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
+# ----------------------------------
+# Don't include <ctype.h> because on OSF/1 3.0 it includes
+# <sys/types.h> which includes <sys/select.h> which contains a
+# prototype for select. Similarly for bzero.
+#
+# This test used to merely assign f=$1 in main(), but that was
+# optimized away by HP unbundled cc A.05.36 for ia64 under +O3,
+# presumably on the basis that there's no need to do that store if the
+# program is about to exit. Conversely, the AIX linker optimizes an
+# unused external declaration that initializes f=$1. So this test
+# program has both an external initialization of f, and a use of f in
+# main that affects the exit status.
+#
+m4_define([AC_LANG_FUNC_LINK_TRY(C)],
+[AC_LANG_PROGRAM(
+[/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $1 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $1 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$1) || defined (__stub___$1)
+choke me
+#else
+char (*f) () = $1;
+#endif
+#ifdef __cplusplus
+}
+#endif
+], [return f != $1;])])
+
diff --git a/libiberty/configure b/libiberty/configure
index 77d5170a87..98a641e8ab 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -1,40 +1,324 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.57.
#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
-# Defaults:
-ac_help=
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --with-target-subdir=SUBDIR Configuring in a subdirectory for target"
-ac_help="$ac_help
- --with-build-subdir=SUBDIR Configuring in a subdirectory for build"
-ac_help="$ac_help
- --with-cross-host=HOST Configuring with a cross compiler"
-ac_help="$ac_help
- --with-newlib Configuring with newlib"
-ac_help="$ac_help
- --enable-maintainer-mode
- enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-install-libiberty Install headers for end users"
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="xmalloc.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST LTLIBOBJS'
+ac_subst_files='host_makefile_frag'
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -43,10 +327,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -60,17 +349,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
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
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -78,59 +359,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -139,95 +420,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -236,19 +469,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -262,26 +495,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -298,7 +531,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -308,7 +541,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -319,58 +552,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -381,99 +613,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=xmalloc.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -483,13 +726,442 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --enable-install-libiberty Install headers for end users
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-target-subdir=SUBDIR Configuring in a subdirectory for target
+ --with-build-subdir=SUBDIR Configuring in a subdirectory for build
+ --with-cross-host=HOST Configuring with a cross compiler
+ --with-newlib Configuring with newlib
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -500,39 +1172,103 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -542,30 +1278,30 @@ fi
# exported. We don't use libtool yet, but some day we might, so...
ORIGINAL_LD_FOR_MULTILIBS=$LD
+
# Check whether --with-target-subdir or --without-target-subdir was given.
if test "${with_target_subdir+set}" = set; then
withval="$with_target_subdir"
- :
-fi
+
+fi;
# Check whether --with-build-subdir or --without-build-subdir was given.
if test "${with_build_subdir+set}" = set; then
withval="$with_build_subdir"
- :
-fi
+
+fi;
# Check whether --with-cross-host or --without-cross-host was given.
if test "${with_cross_host+set}" = set; then
withval="$with_cross_host"
- :
-fi
+
+fi;
# Check whether --with-newlib or --without-newlib was given.
if test "${with_newlib+set}" = set; then
withval="$with_newlib"
- :
-fi
+fi;
if test "${srcdir}" = "."; then
if test -n "${with_build_subdir}"; then
@@ -594,29 +1330,35 @@ for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" >&2;}
+ { (exit 1); exit 1; }; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:610: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
maintainer_mode=$enableval
else
maintainer_mode=no
-fi
+fi;
-
-echo "$ac_t""$maintainer_mode" 1>&6
+echo "$as_me:$LINENO: result: $maintainer_mode" >&5
+echo "${ECHO_T}$maintainer_mode" >&6
if test "$maintainer_mode" = "yes"; then
MAINT=''
@@ -630,31 +1372,37 @@ fi
# rely on it - libiberty is built before texinfo.
# Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:635: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEINFO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$MAKEINFO"; then
ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_MAKEINFO="makeinfo"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MAKEINFO="makeinfo"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-MAKEINFO="$ac_cv_prog_MAKEINFO"
+MAKEINFO=$ac_cv_prog_MAKEINFO
if test -n "$MAKEINFO"; then
- echo "$ac_t""$MAKEINFO" 1>&6
+ echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+echo "${ECHO_T}$MAKEINFO" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test "x$MAKEINFO" = "x"; then
@@ -666,8 +1414,10 @@ else
x*\ [1-3].* )
MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
BUILD_INFO=
- echo "configure: warning:
-*** Makeinfo is too old. Info documentation will not be built." 1>&2
+ { echo "$as_me:$LINENO: WARNING:
+*** Makeinfo is too old. Info documentation will not be built." >&5
+echo "$as_me: WARNING:
+*** Makeinfo is too old. Info documentation will not be built." >&2;}
;;
esac
fi
@@ -676,31 +1426,37 @@ fi
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:681: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PERL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$PERL"; then
ac_cv_prog_PERL="$PERL" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_PERL="perl"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PERL="perl"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-PERL="$ac_cv_prog_PERL"
+PERL=$ac_cv_prog_PERL
if test -n "$PERL"; then
- echo "$ac_t""$PERL" 1>&6
+ echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
if test x"$PERL" = x""; then
@@ -710,324 +1466,1195 @@ else
fi
-
# Make sure we can run config.sub.
-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:721: checking host system type" >&5
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- 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
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
-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
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:744: checking build system type" >&5
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-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/'`
-echo "$ac_t""$build" 1>&6
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:770: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AR="$ac_cv_prog_AR"
+AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:802: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_RANLIB=$RANLIB
# 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:834: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ RANLIB=$ac_ct_RANLIB
else
- RANLIB=":"
-fi
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-# Extract the first word of "gcc", so it can be a program name with args.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # 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:871: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+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:901: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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=":"
ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; 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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
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
+ if test $# != 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="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:950: 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
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
else
- ac_cv_prog_gcc=no
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# FIXME: Cleanup?
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ gcc_no_link=no
+else
+ gcc_no_link=yes
+fi
+
+if test x$gcc_no_link = xyes; then
+ # Setting cross_compile will disable run tests; it will
+ # also disable AC_CHECK_FILE but that's generally
+ # correct if we can't link.
+ cross_compiling=yes
+ EXEEXT=
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
- 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:975: 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
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+fi
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
else
- ac_cv_prog_cc_g=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -f conftest*
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-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
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
CFLAGS="-O2"
+ else
+ CFLAGS=
fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
else
- GCC=
- ac_libiberty_warn_cflags=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test x$GCC = xyes; then
+ ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
+fi
if test "x$CC" != xcc; then
- echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1007: checking whether $CC and cc understand -c and -o together" >&5
+ echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
else
- echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1010: checking whether cc understands -c and -o together" >&5
+ echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
fi
-set dummy $CC; ac_cc="`echo $2 |
- sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
-if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+set dummy $CC; ac_cc=`echo $2 |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo 'foo(){}' > conftest.c
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
-ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
- ac_try='cc -c conftest.c -o conftest.o 1>&5'
- if { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+ if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
then
# cc works too.
:
@@ -1044,12 +2671,15 @@ rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<\EOF
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
#define NO_MINUS_C_MINUS_O 1
-EOF
+_ACEOF
fi
@@ -1062,198 +2692,260 @@ fi
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1067: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
- echo "$ac_t""yes" 1>&6
- ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
- ISC=
-fi
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1088: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1093 "configure"
-#include "confdefs.h"
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
-int main() {
-
-/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this. */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this. */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in an arm
- of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
+ ;
+ return 0;
}
-{ /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_const=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_const=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
- cat >> confdefs.h <<\EOF
-#define const
-EOF
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
fi
-echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1163: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 1170 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
-int main() {
-} $ac_kw foo() {
-; return 0; }
-EOF
-if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
+ no)
+cat >>confdefs.h <<\_ACEOF
+#define inline
+_ACEOF
;;
- *) cat >> confdefs.h <<EOF
+ *) cat >>confdefs.h <<_ACEOF
#define inline $ac_cv_c_inline
-EOF
+_ACEOF
;;
esac
-echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1203: checking whether byte ordering is bigendian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 1210 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
-int main() {
+int
+main ()
+{
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif
-; return 0; }
-EOF
-if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
# It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 1225 "configure"
-#include "confdefs.h"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
#include <sys/param.h>
-int main() {
+int
+main ()
+{
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif
-; return 0; }
-EOF
-if { (eval echo configure:1236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_bigendian=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_bigendian=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
- echo $ac_n "cross-compiling... " 2>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1256 "configure"
-#include "confdefs.h"
+ echo $ac_n "cross-compiling... " 2>&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
main () {
/* Are we little or big endian? From Harbison&Steele. */
union
@@ -1264,26 +2956,36 @@ main () {
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}
-EOF
-if { (eval echo configure:1269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_bigendian=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_bigendian=yes
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
if test $ac_cv_c_bigendian = unknown; then
-echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
-echo "configure:1287: checking to probe for byte ordering" >&5
+echo "$as_me:$LINENO: checking to probe for byte ordering" >&5
+echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6
cat >conftest.c <<EOF
short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
@@ -1311,32 +3013,39 @@ EOF
echo $ac_n 'guessing bigendian ... ' >&6
fi
fi
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
fi
if test $ac_cv_c_bigendian = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define WORDS_BIGENDIAN 1
-EOF
+_ACEOF
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HOST_WORDS_BIG_ENDIAN 1
-EOF
+_ACEOF
BYTEORDER=4321
else
BYTEORDER=1234
fi
-cat >> confdefs.h <<EOF
+
+cat >>confdefs.h <<_ACEOF
#define BYTEORDER $BYTEORDER
-EOF
+_ACEOF
if test $ac_cv_c_bigendian = unknown; then
- { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5
+echo "$as_me: error: unknown endianess - sorry" >&2;}
+ { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; }
fi
+ ac_config_headers="$ac_config_headers config.h:config.in"
@@ -1347,60 +3056,73 @@ fi
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# 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:1356: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
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=":"
- 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
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /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
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ 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"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&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_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
@@ -1412,278 +3134,318 @@ host_makefile_frag=${frag}
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1417: checking how to run the C preprocessor" >&5
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1432 "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:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1449 "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:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
:
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1466 "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:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ac_cpp_err=yes
fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
else
- ac_cv_prog_CPP="$CPP"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
-echo "$ac_t""$CPP" 1>&6
+rm -f conftest.err conftest.$ac_ext
-for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1500: 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 1505 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
fi
-rm -f conftest*
+
+ done
+ ac_cv_prog_CPP=$CPP
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
+ CPP=$ac_cv_prog_CPP
else
- echo "$ac_t""no" 1>&6
+ ac_cv_prog_CPP=$CPP
fi
-done
-
-echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1537: checking for sys/wait.h that is POSIX.1 compatible" >&5
-if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1542 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
#endif
-int main() {
-int s;
-wait (&s);
-s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-; return 0; }
-EOF
-if { (eval echo configure:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_sys_wait_h=yes
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_sys_wait_h=no
+ ac_cpp_err=yes
fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
-if test $ac_cv_header_sys_wait_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SYS_WAIT_H 1
-EOF
-
-fi
-
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1579: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test -z "$ac_cpp_err"; then
+ :
else
- cat > conftest.$ac_ext <<EOF
-#line 1584 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_time=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
+ ac_cpp_err=yes
fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
fi
+rm -f conftest.err conftest.$ac_ext
-
-echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
-echo "configure:1615: checking whether errno must be declared" >&5
-if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1620 "configure"
-#include "confdefs.h"
-#include <errno.h>
-int main() {
-int x = errno;
-; return 0; }
-EOF
-if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- libiberty_cv_declare_errno=no
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- libiberty_cv_declare_errno=yes
-fi
-rm -f conftest*
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
fi
-echo "$ac_t""$libiberty_cv_declare_errno" 1>&6
-if test $libiberty_cv_declare_errno = yes
-then cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_ERRNO 1
-EOF
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1649: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 1654 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1679 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
+ $EGREP "memchr" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -1692,16 +3454,20 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1697 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
-EOF
+
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
+ $EGREP "free" >/dev/null 2>&1; then
:
else
- rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
@@ -1710,115 +3476,592 @@ fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
+ if test "$cross_compiling" = yes; then
:
else
- cat > conftest.$ac_ext <<EOF
-#line 1718 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
-EOF
-if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
:
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
-EOF
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
fi
-echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
-echo "configure:1753: checking for uintptr_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 1758 "configure"
-#include "confdefs.h"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])uintptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_uintptr_t=yes
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+ int s;
+ wait (&s);
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_sys_wait_h=yes
else
- rm -rf conftest*
- ac_cv_type_uintptr_t=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_wait_h=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+if test $ac_cv_header_sys_wait_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_uintptr_t" 1>&6
-if test $ac_cv_type_uintptr_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether errno must be declared" >&5
+echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
+if test "${libiberty_cv_declare_errno+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+int x = errno;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ libiberty_cv_declare_errno=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+libiberty_cv_declare_errno=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
+echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
+if test $libiberty_cv_declare_errno = yes
+then
+cat >>confdefs.h <<\_ACEOF
+#define NEED_DECLARATION_ERRNO 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for uintptr_t" >&5
+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
+if test "${ac_cv_type_uintptr_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((uintptr_t *) 0)
+ return 0;
+if (sizeof (uintptr_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_uintptr_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uintptr_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
+if test $ac_cv_type_uintptr_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define uintptr_t unsigned long
-EOF
+_ACEOF
fi
# Given the above check, we always have uintptr_t or a fallback
# definition. So define HAVE_UINTPTR_T in case any imported code
# relies on it.
-cat >> confdefs.h <<\EOF
-#define HAVE_UINTPTR_T 1
-EOF
-
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1794: checking for pid_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1799 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UINTPTR_T 1
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+if test "${ac_cv_type_pid_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((pid_t *) 0)
+ return 0;
+if (sizeof (pid_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_pid_t=yes
else
- rm -rf conftest*
- ac_cv_type_pid_t=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_type_pid_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
- cat >> confdefs.h <<\EOF
+echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6
+if test $ac_cv_type_pid_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
#define pid_t int
-EOF
+_ACEOF
fi
@@ -1884,7 +4127,70 @@ checkfuncs="$checkfuncs getsysinfo table sysctl"
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
if test "x" = "y"; then
- for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
getcwd getpagesize index insque mkstemps memchr memcmp memcpy \
memmove mempcpy memset putenv random rename rindex sigsetmask \
strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
@@ -1894,70 +4200,108 @@ if test "x" = "y"; then
pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
realpath canonicalize_file_name
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1899: 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 1904 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_ERRLIST 1
-EOF
+_ACEOF
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_NERR 1
-EOF
+_ACEOF
+
- cat >> confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_SIGLIST 1
-EOF
+_ACEOF
fi
@@ -1979,7 +4323,12 @@ if test -n "${with_target_subdir}"; then
# newlib provide and which ones we will be expected to provide.
if test "x${with_newlib}" = "xyes"; then
- LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o"
+ LIBOBJS="$LIBOBJS asprintf.$ac_objext"
+ LIBOBJS="$LIBOBJS basename.$ac_objext"
+ LIBOBJS="$LIBOBJS insque.$ac_objext"
+ LIBOBJS="$LIBOBJS random.$ac_objext"
+ LIBOBJS="$LIBOBJS strdup.$ac_objext"
+ LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
for f in $funcs; do
case "$f" in
@@ -1987,9 +4336,9 @@ if test -n "${with_target_subdir}"; then
;;
*)
n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $n 1
-EOF
+_ACEOF
;;
esac
@@ -2015,17 +4364,16 @@ if test "${enable_install_libiberty+set}" = set; then
enable_install_libiberty=$enableval
else
enable_install_libiberty=no
-fi
-
+fi;
# Option parsed, now set things appropriately.
case x"$enable_install_libiberty" in
xyes|x)
target_header_dir=libiberty
;;
- xno)
+ xno)
target_header_dir=
;;
- *)
+ *)
# This could be sanity-checked in various ways...
target_header_dir="${enable_install_libiberty}"
;;
@@ -2062,8 +4410,16 @@ if test -z "${setobjs}"; then
# Handle VxWorks configuration specially, since on VxWorks the
# libraries are actually on the target board, not in the file
# system.
- LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o"
- LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o"
+ LIBOBJS="$LIBOBJS basename.$ac_objext"
+ LIBOBJS="$LIBOBJS getpagesize.$ac_objext"
+ LIBOBJS="$LIBOBJS insque.$ac_objext"
+ LIBOBJS="$LIBOBJS random.$ac_objext"
+ LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
+ LIBOBJS="$LIBOBJS strncasecmp.$ac_objext"
+ LIBOBJS="$LIBOBJS strdup.$ac_objext"
+ LIBOBJS="$LIBOBJS vfork.$ac_objext"
+ LIBOBJS="$LIBOBJS waitpid.$ac_objext"
+ LIBOBJS="$LIBOBJS vasprintf.$ac_objext"
for f in $funcs; do
case "$f" in
basename | getpagesize | insque | random | strcasecmp)
@@ -2072,9 +4428,9 @@ if test -z "${setobjs}"; then
;;
*)
n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $n 1
-EOF
+_ACEOF
;;
esac
@@ -2112,11 +4468,11 @@ if test -z "${setobjs}"; then
# missing.
# DJ - only if we're *building* cygwin, not just building *with* cygwin
-
+
if test -n "${with_target_subdir}"
then
funcs="`echo $funcs | sed -e 's/random//'`"
- LIBOBJS="$LIBOBJS random.o"
+ LIBOBJS="$LIBOBJS random.$ac_objext"
vars="`echo $vars | sed -e 's/sys_siglist//'`"
checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
fi
@@ -2130,19 +4486,19 @@ if test -z "${setobjs}"; then
;;
*-*-uwin*)
- # Under some versions of uwin, vfork is notoriously buggy and the test
+ # Under some versions of uwin, vfork is notoriously buggy and the test
# can hang configure; on other versions, vfork exists just as a stub.
# FIXME: This should be removed once vfork in uwin's runtime is fixed.
ac_cv_func_vfork_works=no
# Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
- # macros (actually, these are imported from a DLL, but the end effect
+ # macros (actually, these are imported from a DLL, but the end effect
# is the same), so the test below won't find them.
libiberty_cv_var_sys_nerr=yes
libiberty_cv_var_sys_errlist=yes
;;
*-*-*vms*)
- # Under VMS, vfork works very different than on Unix. The standard test
+ # Under VMS, vfork works very different than on Unix. The standard test
# won't work, and it isn't easily adaptable. It makes more sense to
# just force it.
ac_cv_func_vfork_works=yes
@@ -2152,205 +4508,354 @@ if test -z "${setobjs}"; then
# We haven't set the list of objects yet. Use the standard autoconf
# tests. This will only work if the compiler works.
- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2157: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
+ echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-#line 2168 "configure"
-#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-main(){return(0);}
-EOF
-if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- 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
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
-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:2199: 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
- for ac_func in $funcs
+
+for ac_func in $funcs
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2206: 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 2211 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
fi
done
- echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2261: 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
+ echo "$as_me:$LINENO: checking whether alloca needs Cray hooks" >&5
+echo $ECHO_N "checking whether alloca needs Cray hooks... $ECHO_C" >&6
+if test "${ac_cv_os_cray+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2266 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
-EOF
+_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
+ $EGREP "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
- rm -rf conftest*
ac_cv_os_cray=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+echo "${ECHO_T}$ac_cv_os_cray" >&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:2291: 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 2296 "configure"
-#include "confdefs.h"
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
-EOF
+_ACEOF
break
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2345: 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
+echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_c_stack_direction=0
else
- cat > conftest.$ac_ext <<EOF
-#line 2353 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
find_stack_direction ()
{
static char *addr = 0;
@@ -2367,142 +4872,377 @@ main ()
{
exit (find_stack_direction() < 0);
}
-EOF
-if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_c_stack_direction=1
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
+echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+_ACEOF
+
- ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2394: checking for vfork.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+for ac_header in unistd.h vfork.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
else
- cat > conftest.$ac_ext <<EOF
-#line 2399 "configure"
-#include "confdefs.h"
-#include <vfork.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_VFORK_H 1
-EOF
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-else
- echo "$ac_t""no" 1>&6
fi
-echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2429: checking for working vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2435: checking for vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2440 "configure"
-#include "confdefs.h"
+done
+
+
+
+for ac_func in fork vfork
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char vfork(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char vfork();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_vfork) || defined (__stub___vfork)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-vfork();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_vfork=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_vfork=no"
-fi
-rm -f conftest*
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
-if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
+if test "x$ac_cv_func_fork" = xyes; then
+ echo "$as_me:$LINENO: checking for working fork" >&5
+echo $ECHO_N "checking for working fork... $ECHO_C" >&6
+if test "${ac_cv_func_fork_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$ac_t""no" 1>&6
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_fork_works=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* By Ruediger Kuhlmann. */
+ #include <sys/types.h>
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+ /* Some systems only have a dummy stub for fork() */
+ int main ()
+ {
+ if (fork() < 0)
+ exit (1);
+ exit (0);
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fork_works=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_fork_works=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
+echo "${ECHO_T}$ac_cv_func_fork_works" >&6
+
+else
+ ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fi
-
ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ echo "$as_me:$LINENO: checking for working vfork" >&5
+echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
+if test "${ac_cv_func_vfork_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2485 "configure"
-#include "confdefs.h"
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_vfork_works=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#include <sys/wait.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
#endif
-#ifdef HAVE_VFORK_H
-#include <vfork.h>
+#if HAVE_VFORK_H
+# include <vfork.h>
#endif
/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent.
- The compiler is told about this with #include <vfork.h>,
- but some compilers (e.g. gcc -O) don't grok <vfork.h>.
- Test for this by using a static variable whose address
- is put into a register that is clobbered by the vfork. */
-static
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static void
#ifdef __cplusplus
sparc_address_test (int arg)
-#else
+# else
sparc_address_test (arg) int arg;
#endif
{
@@ -2520,25 +5260,27 @@ sparc_address_test (arg) int arg;
}
}
}
-main() {
+
+int
+main ()
+{
pid_t parent = getpid ();
pid_t child;
- sparc_address_test ();
+ sparc_address_test (0);
child = vfork ();
if (child == 0) {
- /* Here is another test for sparc vfork register problems.
- This test uses lots of local variables, at least
- as many local variables as main has allocated so far
- including compiler temporaries. 4 locals are enough for
- gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
- A buggy compiler should reuse the register of parent
- for one of the local variables, since it will think that
- parent can't possibly be used any more in this routine.
- Assigning to the local variable will thus munge parent
- in the parent process. */
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
pid_t
p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
@@ -2548,11 +5290,10 @@ main() {
|| p != p5 || p != p6 || p != p7)
_exit(1);
- /* On some systems (e.g. IRIX 3.3),
- vfork doesn't separate parent from child file descriptors.
- If the child closes a descriptor before it execs or exits,
- this munges the parent's descriptor as well.
- Test for this by closing stdout in the child. */
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
_exit(close(fileno(stdout)) != 0);
} else {
int status;
@@ -2575,279 +5316,470 @@ main() {
);
}
}
-EOF
-if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_vfork_works=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_vfork_works=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_vfork_works=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
+echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=ac_cv_func_vfork
+ { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fi
-echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
-if test $ac_cv_func_vfork_works = no; then
- cat >> confdefs.h <<\EOF
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_VFORK 1
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
#define vfork fork
-EOF
+_ACEOF
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_FORK 1
+_ACEOF
fi
if test $ac_cv_func_vfork_works = no; then
- LIBOBJS="$LIBOBJS vfork.o"
+ LIBOBJS="$LIBOBJS vfork.$ac_objext"
fi
# We only need _doprnt if we might use it to implement v*printf.
if test $ac_cv_func_vprintf != yes \
|| test $ac_cv_func_vfprintf != yes \
|| test $ac_cv_func_vsprintf != yes; then
- for ac_func in _doprnt
+
+for ac_func in _doprnt
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2612: 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 2617 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
fi
done
else
- for ac_func in _doprnt
+
+for ac_func in _doprnt
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2670: 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 2675 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
fi
for v in $vars; do
- echo $ac_n "checking for $v""... $ac_c" 1>&6
-echo "configure:2726: checking for $v" >&5
- if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2731 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for $v" >&5
+echo $ECHO_N "checking for $v... $ECHO_C" >&6
+ if eval "test \"\${libiberty_cv_var_$v+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int *p;
-int main() {
+int
+main ()
+{
extern int $v []; p = $v;
-; return 0; }
-EOF
-if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
eval "libiberty_cv_var_$v=yes"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "libiberty_cv_var_$v=no"
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "libiberty_cv_var_$v=no"
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
+ cat >>confdefs.h <<_ACEOF
#define $n 1
-EOF
+_ACEOF
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
# special check for _system_configuration because AIX <4.3.2 do not
# contain the `physmem' member.
- echo $ac_n "checking for external symbol _system_configuration""... $ac_c" 1>&6
-echo "configure:2765: checking for external symbol _system_configuration" >&5
- cat > conftest.$ac_ext <<EOF
-#line 2767 "configure"
-#include "confdefs.h"
+ echo "$as_me:$LINENO: checking for external symbol _system_configuration" >&5
+echo $ECHO_N "checking for external symbol _system_configuration... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <sys/systemcfg.h>
-int main() {
+int
+main ()
+{
double x = _system_configuration.physmem;
-; return 0; }
-EOF
-if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE__SYSTEM_CONFIGURATION 1
-EOF
+_ACEOF
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
+
- for ac_func in $checkfuncs
+for ac_func in $checkfuncs
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2792: 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 2797 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
- echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:2845: checking whether canonicalize_file_name must be declared" >&5
-if eval "test \"`echo '$''{'libiberty_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
+echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
+if test "${libiberty_cv_decl_needed_canonicalize_file_name+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat > conftest.$ac_ext <<EOF
-#line 2850 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include "confdefs.h"
#include <stdio.h>
@@ -2864,27 +5796,43 @@ else
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-int main() {
+int
+main ()
+{
char *(*pfn) = (char *(*)) canonicalize_file_name
-; return 0; }
-EOF
-if { (eval echo configure:2872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
libiberty_cv_decl_needed_canonicalize_file_name=no
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- libiberty_cv_decl_needed_canonicalize_file_name=yes
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+libiberty_cv_decl_needed_canonicalize_file_name=yes
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$ac_t""$libiberty_cv_decl_needed_canonicalize_file_name" 1>&6
+echo "$as_me:$LINENO: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5
+echo "${ECHO_T}$libiberty_cv_decl_needed_canonicalize_file_name" >&6
if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
-EOF
+_ACEOF
fi
@@ -2900,112 +5848,264 @@ case "${host}" in
esac
-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
+if test x$gcc_no_link = xyes; then
+ if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
+ ac_cv_func_mmap_fixed_mapped=no
+ fi
+fi
+if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
+
+
+for ac_header in stdlib.h unistd.h
do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2908: 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 2913 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
fi
-rm -f conftest*
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
fi
+
done
+
for ac_func in getpagesize
do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2947: 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 2952 "configure"
-#include "confdefs.h"
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. Under hpux,
+ including <limits.h> includes <sys/time.h> and causes problems
+ checking for functions defined therein. */
+#if defined (__STDC__) && !defined (_HPUX_SOURCE)
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-$ac_func();
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
-; return 0; }
-EOF
-if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
fi
done
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3000: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for working mmap" >&5
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_mmap_fixed_mapped=no
else
- cat > conftest.$ac_ext <<EOF
-#line 3008 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
/* Thanks to Mike Haertel and Jim Avera for this test.
Here is a matrix of mmap possibilities:
@@ -3019,47 +6119,34 @@ else
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the filesystem buffer cache
+ VM page cache was not coherent with the file system buffer cache
like early versions of FreeBSD and possibly contemporary NetBSD.)
For shared mappings, we should conversely verify that changes get
- propogated back to all the places they're supposed to be.
+ propagated back to all the places they're supposed to be.
Grep wants private fixed already mapped.
The main things grep needs to know about mmap are:
* does it exist and is it safe to write into the mmap'd area
* how to use it (BSD variants) */
-#include <sys/types.h>
+
#include <fcntl.h>
#include <sys/mman.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
+#if !STDC_HEADERS && !HAVE_STDLIB_H
+char *malloc ();
#endif
/* This mess was copied from the GNU getpagesize.h. */
-#ifndef HAVE_GETPAGESIZE
-
+#if !HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
+# if !HAVE_SYS_PARAM_H
# define HAVE_SYS_PARAM_H 1
# endif
# ifdef _SC_PAGESIZE
# define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
-# ifdef HAVE_SYS_PARAM_H
+# if HAVE_SYS_PARAM_H
# include <sys/param.h>
# ifdef EXEC_PAGESIZE
# define getpagesize() EXEC_PAGESIZE
@@ -3086,111 +6173,114 @@ else
#endif /* no HAVE_GETPAGESIZE */
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
-#else
-char *malloc();
-#endif
-
int
-main()
+main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = malloc(pagesize);
- if (!data)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand();
- umask(0);
- fd = creat("conftestmmap", 0600);
- if (fd < 0)
- exit(1);
- if (write(fd, data, pagesize) != pagesize)
- exit(1);
- close(fd);
-
- /*
- * Next, try to mmap the file at a fixed address which
- * already has something else allocated at it. If we can,
- * also make sure that we see the same garbage.
- */
- fd = open("conftestmmap", O_RDWR);
- if (fd < 0)
- exit(1);
- data2 = malloc(2 * pagesize);
- if (!data2)
- exit(1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit(1);
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
- if (!data3)
- exit(1);
- if (read(fd, data3, pagesize) != pagesize)
- exit(1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit(1);
- close(fd);
- unlink("conftestmmap");
- exit(0);
-}
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
-EOF
-if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+ pagesize = getpagesize ();
+
+ /* First, make a file with some known garbage in it. */
+ data = (char *) malloc (pagesize);
+ if (!data)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand ();
+ umask (0);
+ fd = creat ("conftest.mmap", 0600);
+ if (fd < 0)
+ exit (1);
+ if (write (fd, data, pagesize) != pagesize)
+ exit (1);
+ close (fd);
+
+ /* Next, try to mmap the file at a fixed address which already has
+ something else allocated at it. If we can, also make sure that
+ we see the same garbage. */
+ fd = open ("conftest.mmap", O_RDWR);
+ if (fd < 0)
+ exit (1);
+ data2 = (char *) malloc (2 * pagesize);
+ if (!data2)
+ exit (1);
+ data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ exit (1);
+
+ /* Finally, make sure that changes to the mapped area do not
+ percolate back to the file as seen by read(). (This is a bug on
+ some variants of i386 svr4.0.) */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = (char *) malloc (pagesize);
+ if (!data3)
+ exit (1);
+ if (read (fd, data3, pagesize) != pagesize)
+ exit (1);
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ exit (1);
+ close (fd);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_mmap_fixed_mapped=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_mmap_fixed_mapped=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
fi
-
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
- cat >> confdefs.h <<\EOF
+
+cat >>confdefs.h <<\_ACEOF
#define HAVE_MMAP 1
-EOF
+_ACEOF
fi
+rm -f conftest.mmap
+fi
-echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
-echo "configure:3185: checking for working strncmp" >&5
-if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for working strncmp" >&5
+echo $ECHO_N "checking for working strncmp... $ECHO_C" >&6
+if test "${ac_cv_func_strncmp_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_func_strncmp_works=no
else
- cat > conftest.$ac_ext <<EOF
-#line 3193 "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */
@@ -3230,7 +6320,7 @@ main ()
dev_zero = open ("/dev/zero", O_RDONLY);
if (dev_zero < 0)
exit (1);
-
+
p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, dev_zero, 0);
if (p == (char *)-1)
@@ -3252,25 +6342,35 @@ main ()
exit (0);
}
-EOF
-if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_func_strncmp_works=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_strncmp_works=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_strncmp_works=no
fi
-rm -fr conftest*
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core core.* *.core
fi
-
-echo "$ac_t""$ac_cv_func_strncmp_works" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_func_strncmp_works" >&5
+echo "${ECHO_T}$ac_cv_func_strncmp_works" >&6
if test $ac_cv_func_strncmp_works = no ; then
- LIBOBJS="$LIBOBJS strncmp.o"
+ LIBOBJS="$LIBOBJS strncmp.$ac_objext"
fi
@@ -3284,396 +6384,1167 @@ fi
# We need multilib support, but only if configuring for the target.
-trap '' 1 2 15
-cat > confcache <<\EOF
+ ac_config_files="$ac_config_files Makefile testsuite/Makefile"
+ ac_config_commands="$ac_config_commands default"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# 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 | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
DEFS=-DHAVE_CONFIG_H
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- 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.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
-trap 'rm -fr `echo "Makefile testsuite/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
-# Protect against being on the right side of a sed subst in config.status.
-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
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@libiberty_topdir@%$libiberty_topdir%g
-s%@MAINT@%$MAINT%g
-s%@NOTMAINT@%$NOTMAINT%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@BUILD_INFO@%$BUILD_INFO%g
-s%@PERL@%$PERL%g
-s%@HAVE_PERL@%$HAVE_PERL%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@CC@%$CC%g
-s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g
-s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g
-s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-/@host_makefile_frag@/r $host_makefile_frag
-s%@host_makefile_frag@%%g
-s%@CPP@%$CPP%g
-s%@CHECK@%$CHECK%g
-s%@target_header_dir@%$target_header_dir%g
-s%@LIBOBJS@%$LIBOBJS%g
-s%@pexecute@%$pexecute%g
-s%@INSTALL_DEST@%$INSTALL_DEST%g
-CEOF
-EOF
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.57,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
-CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+srcdir=${srcdir}
+host=${host}
+target=${target}
+with_target_subdir=${with_target_subdir}
+with_build_subdir=${with_build_subdir}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="--enable-multilib ${ac_configure_args}"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
+libiberty_topdir=${libiberty_topdir}
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
+done
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@libiberty_topdir@,$libiberty_topdir,;t t
+s,@MAINT@,$MAINT,;t t
+s,@NOTMAINT@,$NOTMAINT,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@BUILD_INFO@,$BUILD_INFO,;t t
+s,@PERL@,$PERL,;t t
+s,@HAVE_PERL@,$HAVE_PERL,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
+s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
+s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@CHECK@,$CHECK,;t t
+s,@target_header_dir@,$target_header_dir,;t t
+s,@pexecute@,$pexecute,;t t
+s,@INSTALL_DEST@,$INSTALL_DEST,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+/@host_makefile_frag@/r $host_makefile_frag
+s,@host_makefile_frag@,,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
+fi # test -n "$CONFIG_FILES"
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h:config.in"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
rm -f conftest.tail
-while :
+while grep . conftest.undefs >/dev/null
do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
fi
-fi; done
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
-EOF
-cat >> $CONFIG_STATUS <<EOF
-srcdir=${srcdir}
-host=${host}
-target=${target}
-with_target_subdir=${with_target_subdir}
-with_build_subdir=${with_build_subdir}
-with_multisubdir=${with_multisubdir}
-ac_configure_args="--enable-multilib ${ac_configure_args}"
-CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
-libiberty_topdir=${libiberty_topdir}
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ default ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
@@ -3681,10 +7552,37 @@ if test -n "$CONFIG_FILES"; then
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
. ${libiberty_topdir}/config-ml.in
fi
-fi
-exit 0
-EOF
+fi ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/libiberty/configure.in b/libiberty/configure.in
index 5dca13ed6f..56e8a19832 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script
-AC_PREREQ(2.13)
+AC_PREREQ(2.57)
AC_INIT(xmalloc.c)
# This works around the fact that libtool configuration may change LD
@@ -99,7 +99,13 @@ dnl to call AC_CHECK_PROG.
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
-LIB_AC_PROG_CC
+GCC_NO_EXECUTABLES
+AC_PROG_CC
+
+if test x$GCC = xyes; then
+ ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
+fi
+AC_SUBST(ac_libiberty_warn_cflags)
AC_PROG_CC_C_O
# autoconf is lame and doesn't give us any substitution variable for this.
@@ -111,7 +117,6 @@ fi
AC_SUBST(NO_MINUS_C_MINUS_O)
AC_SUBST(OUTPUT_OPTION)
-AC_ISC_POSIX
AC_C_CONST
AC_C_INLINE
AC_C_BIGENDIAN_CROSS
@@ -250,7 +255,12 @@ if test -n "${with_target_subdir}"; then
# newlib provide and which ones we will be expected to provide.
if test "x${with_newlib}" = "xyes"; then
- LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o"
+ AC_LIBOBJ([asprintf])
+ AC_LIBOBJ([basename])
+ AC_LIBOBJ([insque])
+ AC_LIBOBJ([random])
+ AC_LIBOBJ([strdup])
+ AC_LIBOBJ([vasprintf])
for f in $funcs; do
case "$f" in
@@ -318,8 +328,16 @@ if test -z "${setobjs}"; then
# Handle VxWorks configuration specially, since on VxWorks the
# libraries are actually on the target board, not in the file
# system.
- LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o"
- LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o"
+ AC_LIBOBJ([basename])
+ AC_LIBOBJ([getpagesize])
+ AC_LIBOBJ([insque])
+ AC_LIBOBJ([random])
+ AC_LIBOBJ([strcasecmp])
+ AC_LIBOBJ([strncasecmp])
+ AC_LIBOBJ([strdup])
+ AC_LIBOBJ([vfork])
+ AC_LIBOBJ([waitpid])
+ AC_LIBOBJ([vasprintf])
for f in $funcs; do
case "$f" in
basename | getpagesize | insque | random | strcasecmp)
@@ -366,7 +384,7 @@ if test -z "${setobjs}"; then
if test -n "${with_target_subdir}"
then
funcs="`echo $funcs | sed -e 's/random//'`"
- LIBOBJS="$LIBOBJS random.o"
+ AC_LIBOBJ([random])
vars="`echo $vars | sed -e 's/sys_siglist//'`"
checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
fi
@@ -402,12 +420,12 @@ if test -z "${setobjs}"; then
# We haven't set the list of objects yet. Use the standard autoconf
# tests. This will only work if the compiler works.
- AC_PROG_CC_WORKS
+ AC_ISC_POSIX
AC_REPLACE_FUNCS($funcs)
libiberty_AC_FUNC_C_ALLOCA
AC_FUNC_VFORK
if test $ac_cv_func_vfork_works = no; then
- LIBOBJS="$LIBOBJS vfork.o"
+ AC_LIBOBJ([vfork])
fi
# We only need _doprnt if we might use it to implement v*printf.
if test $ac_cv_func_vprintf != yes \
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 5dcce5560e..bd4882239f 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -2,9 +2,9 @@
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Alex Samuel <samuel@codesourcery.com>.
- This file is part of GNU CC.
+ This file is part of the libiberty library, which is part of GCC.
- This program is free software; you can redistribute it and/or modify
+ This file 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 of the License, or
(at your option) any later version.
diff --git a/libiberty/fibheap.c b/libiberty/fibheap.c
index 36062d451a..bcecf80251 100644
--- a/libiberty/fibheap.c
+++ b/libiberty/fibheap.c
@@ -218,7 +218,7 @@ fibheap_replace_key_data (heap, node, key, data)
void *data;
{
void *odata;
- int okey;
+ fibheapkey_t okey;
fibnode_t y;
/* If we wanted to, we could actually do a real increase by redeleting and
diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c
index d69024f739..ee87e27341 100644
--- a/libiberty/floatformat.c
+++ b/libiberty/floatformat.c
@@ -1,5 +1,5 @@
/* IEEE floating point support routines, for GDB, the GNU Debugger.
- Copyright (C) 1991, 1994, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -143,17 +143,17 @@ const struct floatformat floatformat_ia64_quad_little =
"floatformat_ia64_quad_little"
};
-static unsigned long get_field PARAMS ((unsigned char *,
+static unsigned long get_field PARAMS ((const unsigned char *,
enum floatformat_byteorders,
unsigned int,
unsigned int,
unsigned int));
-/* Extract a field which starts at START and is LEN bytes long. DATA and
+/* Extract a field which starts at START and is LEN bits long. DATA and
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static unsigned long
get_field (data, order, total_len, start, len)
- unsigned char *data;
+ const unsigned char *data;
enum floatformat_byteorders order;
unsigned int total_len;
unsigned int start;
@@ -207,10 +207,10 @@ get_field (data, order, total_len, start, len)
void
floatformat_to_double (fmt, from, to)
const struct floatformat *fmt;
- char *from;
+ const char *from;
double *to;
{
- unsigned char *ufrom = (unsigned char *)from;
+ const unsigned char *ufrom = (const unsigned char *)from;
double dto;
long exponent;
unsigned long mant;
@@ -273,7 +273,7 @@ static void put_field PARAMS ((unsigned char *, enum floatformat_byteorders,
unsigned int,
unsigned long));
-/* Set a field which starts at START and is LEN bytes long. DATA and
+/* Set a field which starts at START and is LEN bits long. DATA and
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static void
put_field (data, order, total_len, start, len, stuff_to_put)
@@ -331,7 +331,7 @@ put_field (data, order, total_len, start, len, stuff_to_put)
void
floatformat_from_double (fmt, from, to)
const struct floatformat *fmt;
- double *from;
+ const double *from;
char *to;
{
double dfrom;
@@ -404,6 +404,39 @@ floatformat_from_double (fmt, from, to)
}
}
+/* Return non-zero iff the data at FROM is a valid number in format FMT. */
+
+int
+floatformat_is_valid (fmt, from)
+ const struct floatformat *fmt;
+ const char *from;
+{
+ if (fmt == &floatformat_i387_ext)
+ {
+ /* In the i387 double-extended format, if the exponent is all
+ ones, then the integer bit must be set. If the exponent
+ is neither 0 nor ~0, the intbit must also be set. Only
+ if the exponent is zero can it be zero, and then it must
+ be zero. */
+ unsigned long exponent, int_bit;
+ const unsigned char *ufrom = (const unsigned char *) from;
+
+ exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize,
+ fmt->exp_start, fmt->exp_len);
+ int_bit = get_field (ufrom, fmt->byteorder, fmt->totalsize,
+ fmt->man_start, 1);
+
+ if ((exponent == 0) != (int_bit == 0))
+ return 0;
+ else
+ return 1;
+ }
+
+ /* Other formats with invalid representations should be added
+ here. */
+ return 1;
+}
+
#ifdef IEEE_DEBUG
diff --git a/missing b/missing
index 7789652e87..25c96676de 100755
--- a/missing
+++ b/missing
@@ -1,7 +1,7 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,11 +18,37 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
@@ -35,6 +61,7 @@ error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
@@ -43,13 +70,15 @@ Supported PROGRAM values:
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing - GNU libit 0.0"
+ echo "missing 0.4 - GNU automake"
;;
-*)
@@ -58,31 +87,46 @@ Supported PROGRAM values:
exit 1
;;
- aclocal)
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acinclude.m4' or \`configure.in'. You might want
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`configure.in'. You might want to install the
+ you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acconfig.h' or \`configure.in'. You might want
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
@@ -95,10 +139,15 @@ WARNING: \`$1' is missing on your system. You should only need it if
touch $touch_files
;;
- automake)
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
@@ -106,6 +155,34 @@ WARNING: \`$1' is missing on your system. You should only need it if
while read f; do touch "$f"; done
;;
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
@@ -159,7 +236,37 @@ WARNING: \`$1' is missing on your system. You should only need it if
fi
;;
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -175,6 +282,45 @@ WARNING: \`$1' is missing on your system. You should only need it if
touch $file
;;
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 7c8edbd5db..9b109a6e3b 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,212 @@
+2003-09-14 Andreas Jaeger <aj@suse.de>
+
+ * i386-dis.c: Convert to ISO C90 prototypes.
+ * i370-dis.c: Likewise.
+ * i370-opc.c: Likewiwse.
+ * i960-dis.c: Likewise.
+ * ia64-opc.c: Likewise.
+
+2003-09-09 Dave Brolley <brolley@redhat.com>
+
+ * frv-desc.c: Regenerated.
+
+2003-09-08 Dave Brolley <brolley@redhat.com>
+
+ On behalf of Doug Evans <dje@sebabeach.org>
+ * Makefile.am (run-cgen): Pass new args archfile and opcfile
+ to cgen.sh.
+ (stamp-ip2k,stamp-m32r,stamp-fr30,stamp-frv,stamp-openrisc,
+ stamp-iq2000,stamp-xstormy16): Pass paths of .cpu and .opc files
+ to cgen.sh.
+ (stamp-frv): Delete hardcoded path spec workaround.
+ * Makefile.in: Regenerate.
+ * cgen.sh: New args archfile and opcfile. Pass on to cgen.
+
+2003-09-04 Nick Clifton <nickc@redhat.com>
+
+ * v850-dis.c (disassemble): Accept bfd_mach_v850e1.
+ * v850-opc.c (v850_opcodes): Add DBTRAP and DBRET instructions.
+
+2003-09-04 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-dis.c (struct dis_private): New.
+ (powerpc_dialect): Make static. Accept -Many in addition to existing
+ options. Save dialect in dis_private.
+ (print_insn_big_powerpc): Retrieve dialect from dis_private.
+ (print_insn_little_powerpc): Likewise.
+ (print_insn_powerpc): Call powpc_dialect here. Remove unnecessary
+ efs/altivec check. Try harder to disassemble if given -Many.
+ * ppc-opc.c (insert_fxm): Expand comment.
+ (PPC, PPCCOM, PPC32, PPC64, PPCVEC): Remove PPC_OPCODE_ANY.
+ (POWER, POWER2, PPCPWR2, POWER32, COM, COM32, M601, PWRCOM): Likewise.
+ (POWER4): Remove PPCCOM.
+ (PPCONLY): Don't define. Update all occurrences to PPC.
+
+2003-09-03 Andrew Cagney <cagney@redhat.com>
+
+ * dis-init.c (init_disassemble_info): New file and function.
+ * Makefile.am (CFILES): Add "dis-init.c".
+ (libopcodes_la_SOURCES): Add "dis-init.c".
+ (dis-init.lo): Specify dependencies.
+ * Makefile.in: Regenerate.
+
+2003-09-03 Dave Brolley <brolley@redhat.com>
+
+ * frv-*: Regenerated.
+
+2003-09-02 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (powerpc_opcodes): Combine identical PPC403/BOOKE entries.
+ Move duplicate mnemonic entries together. Use RS instead of RT on
+ all mt*.
+ * ppc-dis.c: Convert to ISO C.
+
+2003-08-29 Dave Brolley <brolley@redhat.com>
+
+ * Makefile.am (stamp-frv): Copy frv.cpu and frv.opc from
+ $(srcdir)/../cpu temporarily when regenerating source files.
+ * Makefile.in: Regenerated.
+
+2003-08-19 Nick Clifton <nickc@redhat.com>
+
+ * arm-dis.c (print_insn_arm: case 'A'): Add code to
+ disassemble unindexed form of Addressing Mode 5.
+
+2003-08-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (PPC440): Define.
+ (powerpc_opcodes): Allow mac*, mul*, nmac*, dccci, dcread, iccci,
+ icread instructions when PPC440. Add dlmzb instruction.
+
+2003-08-14 Alan Modra <amodra@bigpond.net.au>
+
+ * dep-in.sed: Remove libintl.h.
+ * Makefile.am (POTFILES.in): Unset LC_COLLATE.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2003-08-07 Michael Meissner <gnu@the-meissners.org>
+
+ * cgen-asm.c (hash_insn_array): Remove PARAMS macro.
+ (hash_insn_list): Ditto.
+ (build_asm_hash_table): Ditto.
+ (cgen_set_parse_operand_fn): Prototype definition.
+ (cgen_init_parse_operand): Ditto.
+ (hash_insn_array): Ditto.
+ (hash_insn_list): Ditto.
+ (build_asm_hash_table): Ditto.
+ (cgen_asm_lookup_insn): Ditto.
+ (cgen_parse_keyword): Ditto.
+ (cgen_parse_signed_integer): Ditto.
+ (cgen_parse_unsigned_integer): Ditto.
+ (cgen_parse_address): Ditto.
+ (cgen_validate_signed_integer): Ditto.
+ (cgen_validate_unsigned_integer): Ditto.
+
+ * cgen-opc.c (hash_keyword_name): Remove PARAMS macro.
+ (hash_keyword_value): Ditto.
+ (build_keyword_hash_tables): Ditto.
+ (cgen_keyword_lookup_name): Prototype definition.
+ (cgen_keyword_lookup_value): Ditto.
+ (cgen_keyword_add): Ditto.
+ (cgen_keyword_search_init): Ditto.
+ (cgen_keyword_search_next): Ditto.
+ (hash_keyword_name): Ditto.
+ (hash_keyword_value): Ditto.
+ (build_keyword_hash_tables): Ditto.
+ (cgen_hw_lookup_by_name): Ditto.
+ (cgen_hw_lookup_by_num): Ditto.
+ (cgen_operand_lookup_by_name): Ditto.
+ (cgen_operand_lookup_by_num): Ditto.
+ (cgen_insn_count): Ditto.
+ (cgen_macro_insn_count): Ditto.
+ (cgen_get_insn_value): Ditto.
+ (cgen_put_insn_value): Ditto.
+ (cgen_lookup_insn): Ditto.
+ (cgen_get_insn_operands): Ditto.
+ (cgen_lookup_get_insn_operands): Ditto.
+ (cgen_set_signed_overflow_ok): Ditto.
+ (cgen_clear_signed_overflow_ok): Ditto.
+ (cgen_signed_overflow_ok_p): Ditto.
+
+ * cgen-dis.c (hash_insn_array): Remove PARAMS macro.
+ (hash_insn_list): Ditto.
+ (build_dis_hash_table): Ditto.
+ (count_decodable_bits): Ditto.
+ (add_insn_to_hash_chain): Ditto.
+ (count_decodable_bits): Prototype definition.
+ (add_insn_to_hash_chain): Ditto.
+ (hash_insn_array): Ditto.
+ (hash_insn_list): Ditto.
+ (build_dis_hash_table): Ditto.
+ (cgen_dis_lookup_insn): Ditto.
+
+ * cgen-asm.in (parse_insn_normal): Remove PARAMS macro.
+ (@arch@_cgen_build_insn_regex): Prototype definition.
+ (parse_insn_normal): Ditto.
+ (@arch@_cgen_assemble_insn): Ditto.
+ (@arch@_cgen_asm_hash_keywords): Ditto.
+
+ * cgen-dis.in (print_normal): Remove PARAMS macro. Use void *
+ instead of PTR.
+ (print_address): Ditto.
+ (print_keyword): Ditto.
+ (print_insn_normal): Ditto.
+ (print_insn): Ditto.
+ (default_print_insn): Ditto.
+ (read_insn): Ditto.
+ (print_normal): Prototype definition. Use void * instead of PTR.
+ (print_address): Ditto.
+ (print_keyword): Ditto.
+ (print_insn_normal): Ditto.
+ (read_insn): Ditto.
+ (print_insn): Ditto.
+ (default_print_insn): Ditto.
+ (print_insn_@arch@): Ditto.
+
+ * cgen-ibld.in (insert_normal): Remove PARAMS macro.
+ (insn_insn_normal): Ditto.
+ (extract_normal): Ditto.
+ (extract_insn_normal): Ditto.
+ (put_insn_int_value): Ditto.
+ (insert_1): Ditto.
+ (fill_cache): Ditto.
+ (extract_1): Ditto.
+ (insert_1): Prototype definition.
+ (insert_normal): Ditto.
+ (insert_insn_normal): Ditto.
+ (put_insn_int_value): Ditto.
+ (fill_cache): Ditto.
+ (extract_1): Ditto.
+ (extract_normal): Ditto.
+ (extract_insn_normal): Ditto.
+
+ * fr30-asm.c: Regenerate.
+ * fr30-dis.c: Ditto.
+ * fr30-ibld.c: Ditto.
+ * frv-asm.c: Ditto.
+ * frv-dis.c: Ditto.
+ * frv-ibld.c: Ditto.
+ * ip2k-asm.c: Ditto.
+ * ip2k-dis.c: Ditto.
+ * ip2k-ibld.c: Ditto.
+ * iq2000-asm.c: Ditto.
+ * iq2000-dis.c: Ditto.
+ * iq2000-ibld.c: Ditto.
+ * m32r-asm.c: Ditto.
+ * m32r-dis.c: Ditto.
+ * m32r-ibld.c: Ditto.
+ * openrisc-asm.c: Ditto.
+ * openrisc-dis.c: Ditto.
+ * openrisc-ibld.c: Ditto.
+ * xstormy16-asm.c: Ditto.
+ * xstormy16-dis.c: Ditto.
+ * xstormy16-ibld.c: Ditto.
+
+2003-08-06 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+
2003-08-05 Nick Clifton <nickc@redhat.com>
* configure.in (ALL_LINGUAS): Add nl.
@@ -6,7 +215,7 @@
2003-07-30 Jason Eckhardt <jle@rice.edu>
- * i860-dis.c: Convert to ISO C90. Remove superflous prototypes.
+ * i860-dis.c: Convert to ISO C90. Remove superflous prototypes.
2003-07-30 Nick Clifton <nickc@redhat.com>
@@ -24,8 +233,8 @@
* arm-dis.c (parse_arm_disassembler_option): Do not expect
option string to be NUL terminated.
- (parse_disassembler_options): Allow options to be space or
- comma separated.
+ (parse_disassembler_options): Allow options to be space or
+ comma separated.
2003-07-17 Nick Clifton <nickc@redhat.com>
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 7097be0f8d..6859a9d4c9 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -63,6 +63,7 @@ CFILES = \
d30v-opc.c \
dlx-dis.c \
dis-buf.c \
+ dis-init.c \
disassemble.c \
fr30-asm.c \
fr30-desc.c \
@@ -281,7 +282,7 @@ INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFI
disassemble.lo: disassemble.c $(INCDIR)/dis-asm.h
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $(srcdir)/disassemble.c
-libopcodes_la_SOURCES = dis-buf.c disassemble.c
+libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
libopcodes_la_DEPENDENCIES = $(OFILES) ../bfd/libbfd.la
libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ ../bfd/libbfd.la
libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
@@ -306,7 +307,7 @@ libopcodes.a: stamp-lib ; @true
POTFILES = $(HFILES) $(CFILES)
po/POTFILES.in: @MAINT@ Makefile
- for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
# We should reconfigure whenever bfd/configure.in changes, because
@@ -378,8 +379,8 @@ endif
run-cgen:
$(SHELL) $(srcdir)/cgen.sh opcodes $(srcdir) $(CGEN) \
- $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) \
- "$(options)" $(extrafiles)
+ $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) $(archfile) $(opcfile) \
+ "$(options)" "$(extrafiles)"
touch stamp-${prefix}
.PHONY: run-cgen
@@ -395,38 +396,47 @@ run-cgen-all:
$(srcdir)/ip2k-desc.h $(srcdir)/ip2k-desc.c $(srcdir)/ip2k-opc.h $(srcdir)/ip2k-opc.c $(srcdir)/ip2k-ibld.c $(srcdir)/ip2k-asm.c $(srcdir)/ip2k-dis.c: $(IP2K_DEPS)
@true
stamp-ip2k: $(CGENDEPS) $(CPUDIR)/ip2k.cpu $(CPUDIR)/ip2k.opc
- $(MAKE) run-cgen arch=ip2k prefix=ip2k options= extrafiles=
+ $(MAKE) run-cgen arch=ip2k prefix=ip2k options= \
+ archfile=$(CPUDIR)/ip2k.cpu opcfile=$(CPUDIR)/ip2k.opc extrafiles=
$(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
@true
stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
- $(MAKE) run-cgen arch=m32r prefix=m32r options=opinst extrafiles=opinst
+ $(MAKE) run-cgen arch=m32r prefix=m32r options=opinst \
+ archfile=$(CPUDIR)/m32r.cpu opcfile=$(CPUDIR)/m32r.opc extrafiles=opinst
$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
@true
stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
- $(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles=
+ $(MAKE) run-cgen arch=fr30 prefix=fr30 options= \
+ archfile=$(CPUDIR)/fr30.cpu opcfile=$(CPUDIR)/fr30.opc extrafiles=
$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS)
@true
-stamp-frv: $(CGENDEPS) $(CPUDIR)/frv.cpu $(CPUDIR)/frv.opc
- $(MAKE) run-cgen arch=frv prefix=frv options= extrafiles=
+# .cpu and .opc files for frv are kept in a different directory, but cgen has no switch to specify that location, so
+# copy those file to the regular place.
+stamp-frv: $(CGENDEPS) $(srcdir)/../cpu/frv.cpu $(srcdir)/../cpu/frv.opc
+ $(MAKE) run-cgen arch=frv prefix=frv options= \
+ archfile=$(srcdir)/../cpu/frv.cpu opcfile=$(srcdir)/../cpu/frv.opc extrafiles=
$(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS)
@true
stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
- $(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles=
+ $(MAKE) run-cgen arch=openrisc prefix=openrisc options= \
+ archfile=$(CPUDIR)/openrisc.cpu opcfile=$(CPUDIR)/openrisc.opc extrafiles=
$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
@true
stamp-iq2000: $(CGENDEPS) $(CPUDIR)/iq2000.cpu $(CPUDIR)/iq2000.opc \
$(CPUDIR)/iq2000m.cpu $(CPUDIR)/iq10.cpu
- $(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= extrafiles=
+ $(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= \
+ archfile=$(CPUDIR)/iq2000.cpu opcfile=$(CPUDIR)/iq2000.opc extrafiles=
$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
@true
stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
- $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= extrafiles=
+ $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= \
+ archfile=$(CPUDIR)/xstormy16.cpu opcfile=$(CPUDIR)/xstormy16.opc extrafiles=
ia64-gen: ia64-gen.o
$(LINK) ia64-gen.o $(LIBIBERTY)
@@ -515,9 +525,9 @@ arc-ext.lo: arc-ext.c sysdep.h config.h $(INCDIR)/ansidecl.h \
arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h arm-opc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/arm.h \
- $(INCDIR)/elf/reloc-macros.h
+ opintl.h $(INCDIR)/safe-ctype.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h
avr-dis.lo: avr-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \
$(INCDIR)/libiberty.h $(INCDIR)/opcode/avr.h
@@ -547,6 +557,8 @@ dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
+dis-init.lo: dis-init.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -624,7 +636,7 @@ ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
- ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c ../intl/libintl.h
+ ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index a9875a1e5a..57aee2dcbb 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 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.
@@ -174,6 +174,7 @@ CFILES = \
d30v-opc.c \
dlx-dis.c \
dis-buf.c \
+ dis-init.c \
disassemble.c \
fr30-asm.c \
fr30-desc.c \
@@ -391,7 +392,7 @@ OFILES = @BFD_MACHINES@
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl
-libopcodes_la_SOURCES = dis-buf.c disassemble.c
+libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
libopcodes_la_DEPENDENCIES = $(OFILES) ../bfd/libbfd.la
libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ ../bfd/libbfd.la
libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
@@ -455,7 +456,7 @@ libopcodes_a_SOURCES = libopcodes.a.c
libopcodes_a_OBJECTS = libopcodes.a.$(OBJEXT)
LTLIBRARIES = $(bfdlib_LTLIBRARIES)
-libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo
+libopcodes_la_OBJECTS = dis-buf.lo disassemble.lo dis-init.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -616,7 +617,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
+ test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@@ -840,7 +841,7 @@ stamp-lib: libopcodes.la
libopcodes.a: stamp-lib ; @true
po/POTFILES.in: @MAINT@ Makefile
- for file in $(POTFILES); do echo $$file; done | sort > tmp \
+ for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
&& mv tmp $(srcdir)/po/POTFILES.in
# We should reconfigure whenever bfd/configure.in changes, because
@@ -874,8 +875,8 @@ uninstall_libopcodes:
run-cgen:
$(SHELL) $(srcdir)/cgen.sh opcodes $(srcdir) $(CGEN) \
- $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) \
- "$(options)" $(extrafiles)
+ $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) $(archfile) $(opcfile) \
+ "$(options)" "$(extrafiles)"
touch stamp-${prefix}
.PHONY: run-cgen
@@ -891,38 +892,47 @@ run-cgen-all:
$(srcdir)/ip2k-desc.h $(srcdir)/ip2k-desc.c $(srcdir)/ip2k-opc.h $(srcdir)/ip2k-opc.c $(srcdir)/ip2k-ibld.c $(srcdir)/ip2k-asm.c $(srcdir)/ip2k-dis.c: $(IP2K_DEPS)
@true
stamp-ip2k: $(CGENDEPS) $(CPUDIR)/ip2k.cpu $(CPUDIR)/ip2k.opc
- $(MAKE) run-cgen arch=ip2k prefix=ip2k options= extrafiles=
+ $(MAKE) run-cgen arch=ip2k prefix=ip2k options= \
+ archfile=$(CPUDIR)/ip2k.cpu opcfile=$(CPUDIR)/ip2k.opc extrafiles=
$(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
@true
stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
- $(MAKE) run-cgen arch=m32r prefix=m32r options=opinst extrafiles=opinst
+ $(MAKE) run-cgen arch=m32r prefix=m32r options=opinst \
+ archfile=$(CPUDIR)/m32r.cpu opcfile=$(CPUDIR)/m32r.opc extrafiles=opinst
$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
@true
stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
- $(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles=
+ $(MAKE) run-cgen arch=fr30 prefix=fr30 options= \
+ archfile=$(CPUDIR)/fr30.cpu opcfile=$(CPUDIR)/fr30.opc extrafiles=
$(srcdir)/frv-desc.h $(srcdir)/frv-desc.c $(srcdir)/frv-opc.h $(srcdir)/frv-opc.c $(srcdir)/frv-ibld.c $(srcdir)/frv-asm.c $(srcdir)/frv-dis.c: $(FRV_DEPS)
@true
-stamp-frv: $(CGENDEPS) $(CPUDIR)/frv.cpu $(CPUDIR)/frv.opc
- $(MAKE) run-cgen arch=frv prefix=frv options= extrafiles=
+# .cpu and .opc files for frv are kept in a different directory, but cgen has no switch to specify that location, so
+# copy those file to the regular place.
+stamp-frv: $(CGENDEPS) $(srcdir)/../cpu/frv.cpu $(srcdir)/../cpu/frv.opc
+ $(MAKE) run-cgen arch=frv prefix=frv options= \
+ archfile=$(srcdir)/../cpu/frv.cpu opcfile=$(srcdir)/../cpu/frv.opc extrafiles=
$(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS)
@true
stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
- $(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles=
+ $(MAKE) run-cgen arch=openrisc prefix=openrisc options= \
+ archfile=$(CPUDIR)/openrisc.cpu opcfile=$(CPUDIR)/openrisc.opc extrafiles=
$(srcdir)/iq2000-desc.h $(srcdir)/iq2000-desc.c $(srcdir)/iq2000-opc.h $(srcdir)/iq2000-opc.c $(srcdir)/iq2000-ibld.c $(srcdir)/iq2000-asm.c $(srcdir)/iq2000-dis.c: $(IQ2000_DEPS)
@true
stamp-iq2000: $(CGENDEPS) $(CPUDIR)/iq2000.cpu $(CPUDIR)/iq2000.opc \
$(CPUDIR)/iq2000m.cpu $(CPUDIR)/iq10.cpu
- $(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= extrafiles=
+ $(MAKE) run-cgen arch=iq2000 prefix=iq2000 options= \
+ archfile=$(CPUDIR)/iq2000.cpu opcfile=$(CPUDIR)/iq2000.opc extrafiles=
$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
@true
stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
- $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= extrafiles=
+ $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= \
+ archfile=$(CPUDIR)/xstormy16.cpu opcfile=$(CPUDIR)/xstormy16.opc extrafiles=
ia64-gen: ia64-gen.o
$(LINK) ia64-gen.o $(LIBIBERTY)
@@ -1011,9 +1021,9 @@ arc-ext.lo: arc-ext.c sysdep.h config.h $(INCDIR)/ansidecl.h \
arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h arm-opc.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/arm.h \
- $(INCDIR)/elf/reloc-macros.h
+ opintl.h $(INCDIR)/safe-ctype.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h
avr-dis.lo: avr-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \
$(INCDIR)/libiberty.h $(INCDIR)/opcode/avr.h
@@ -1043,6 +1053,8 @@ dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
+dis-init.lo: dis-init.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
@@ -1120,7 +1132,7 @@ ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
- ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c ../intl/libintl.h
+ ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 97ec842348..ac36e88006 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -445,9 +445,11 @@ print_insn_arm (pc, info, given)
case 'A':
func (stream, "[%s", arm_regnames [(given >> 16) & 0xf]);
- if ((given & 0x01000000) != 0)
+
+ if ((given & (1 << 24)) != 0)
{
int offset = given & 0xff;
+
if (offset)
func (stream, ", %s#%d]%s",
((given & 0x00800000) == 0 ? "-" : ""),
@@ -459,12 +461,18 @@ print_insn_arm (pc, info, given)
else
{
int offset = given & 0xff;
- if (offset)
- func (stream, "], %s#%d",
- ((given & 0x00800000) == 0 ? "-" : ""),
- offset * 4);
+
+ func (stream, "]");
+
+ if (given & (1 << 21))
+ {
+ if (offset)
+ func (stream, ", %s#%d",
+ ((given & 0x00800000) == 0 ? "-" : ""),
+ offset * 4);
+ }
else
- func (stream, "]");
+ func (stream, ", {%d}", offset);
}
break;
diff --git a/opcodes/cgen-asm.c b/opcodes/cgen-asm.c
index c71c70de08..7231e2d7ae 100644
--- a/opcodes/cgen-asm.c
+++ b/opcodes/cgen-asm.c
@@ -28,16 +28,14 @@
#include "opcode/cgen.h"
#include "opintl.h"
-static CGEN_INSN_LIST * hash_insn_array PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
-static CGEN_INSN_LIST * hash_insn_list PARAMS ((CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
-static void build_asm_hash_table PARAMS ((CGEN_CPU_DESC));
+static CGEN_INSN_LIST * hash_insn_array (CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *);
+static CGEN_INSN_LIST * hash_insn_list (CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *);
+static void build_asm_hash_table (CGEN_CPU_DESC);
/* Set the cgen_parse_operand_fn callback. */
void
-cgen_set_parse_operand_fn (cd, fn)
- CGEN_CPU_DESC cd;
- cgen_parse_operand_fn fn;
+cgen_set_parse_operand_fn (CGEN_CPU_DESC cd, cgen_parse_operand_fn fn)
{
cd->parse_operand_fn = fn;
}
@@ -45,8 +43,7 @@ cgen_set_parse_operand_fn (cd, fn)
/* Called whenever starting to parse an insn. */
void
-cgen_init_parse_operand (cd)
- CGEN_CPU_DESC cd;
+cgen_init_parse_operand (CGEN_CPU_DESC cd)
{
/* This tells the callback to re-initialize. */
(void) (* cd->parse_operand_fn)
@@ -66,13 +63,12 @@ cgen_init_parse_operand (cd)
list and we want earlier ones to be prefered. */
static CGEN_INSN_LIST *
-hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insns;
- int count;
- int entsize ATTRIBUTE_UNUSED;
- CGEN_INSN_LIST **htable;
- CGEN_INSN_LIST *hentbuf;
+hash_insn_array (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insns,
+ int count,
+ int entsize ATTRIBUTE_UNUSED,
+ CGEN_INSN_LIST **htable,
+ CGEN_INSN_LIST *hentbuf)
{
int i;
@@ -97,11 +93,10 @@ hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
in a list. */
static CGEN_INSN_LIST *
-hash_insn_list (cd, insns, htable, hentbuf)
- CGEN_CPU_DESC cd;
- const CGEN_INSN_LIST *insns;
- CGEN_INSN_LIST **htable;
- CGEN_INSN_LIST *hentbuf;
+hash_insn_list (CGEN_CPU_DESC cd,
+ const CGEN_INSN_LIST *insns,
+ CGEN_INSN_LIST **htable,
+ CGEN_INSN_LIST *hentbuf)
{
const CGEN_INSN_LIST *ilist;
@@ -123,8 +118,7 @@ hash_insn_list (cd, insns, htable, hentbuf)
/* Build the assembler instruction hash table. */
static void
-build_asm_hash_table (cd)
- CGEN_CPU_DESC cd;
+build_asm_hash_table (CGEN_CPU_DESC cd)
{
int count = cgen_insn_count (cd) + cgen_macro_insn_count (cd);
CGEN_INSN_TABLE *insn_table = &cd->insn_table;
@@ -179,9 +173,7 @@ build_asm_hash_table (cd)
/* Return the first entry in the hash list for INSN. */
CGEN_INSN_LIST *
-cgen_asm_lookup_insn (cd, insn)
- CGEN_CPU_DESC cd;
- const char *insn;
+cgen_asm_lookup_insn (CGEN_CPU_DESC cd, const char *insn)
{
unsigned int hash;
@@ -201,11 +193,10 @@ cgen_asm_lookup_insn (cd, insn)
recording something in the keyword table]. */
const char *
-cgen_parse_keyword (cd, strp, keyword_table, valuep)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- const char **strp;
- CGEN_KEYWORD *keyword_table;
- long *valuep;
+cgen_parse_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ const char **strp,
+ CGEN_KEYWORD *keyword_table,
+ long *valuep)
{
const CGEN_KEYWORD_ENTRY *ke;
char buf[256];
@@ -262,11 +253,10 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
cgen_parse_address. */
const char *
-cgen_parse_signed_integer (cd, strp, opindex, valuep)
- CGEN_CPU_DESC cd;
- const char **strp;
- int opindex;
- long *valuep;
+cgen_parse_signed_integer (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ long *valuep)
{
bfd_vma value;
enum cgen_parse_operand_result result;
@@ -287,11 +277,10 @@ cgen_parse_signed_integer (cd, strp, opindex, valuep)
cgen_parse_address. */
const char *
-cgen_parse_unsigned_integer (cd, strp, opindex, valuep)
- CGEN_CPU_DESC cd;
- const char **strp;
- int opindex;
- unsigned long *valuep;
+cgen_parse_unsigned_integer (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ unsigned long *valuep)
{
bfd_vma value;
enum cgen_parse_operand_result result;
@@ -309,13 +298,12 @@ cgen_parse_unsigned_integer (cd, strp, opindex, valuep)
/* Address parser. */
const char *
-cgen_parse_address (cd, strp, opindex, opinfo, resultp, valuep)
- CGEN_CPU_DESC cd;
- const char **strp;
- int opindex;
- int opinfo;
- enum cgen_parse_operand_result *resultp;
- bfd_vma *valuep;
+cgen_parse_address (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ int opinfo,
+ enum cgen_parse_operand_result *resultp,
+ bfd_vma *valuep)
{
bfd_vma value;
enum cgen_parse_operand_result result_type;
@@ -337,8 +325,7 @@ cgen_parse_address (cd, strp, opindex, opinfo, resultp, valuep)
/* Signed integer validation routine. */
const char *
-cgen_validate_signed_integer (value, min, max)
- long value, min, max;
+cgen_validate_signed_integer (long value, long min, long max)
{
if (value < min || value > max)
{
@@ -358,8 +345,9 @@ cgen_validate_signed_integer (value, min, max)
cases where min != 0 (and max > LONG_MAX). */
const char *
-cgen_validate_unsigned_integer (value, min, max)
- unsigned long value, min, max;
+cgen_validate_unsigned_integer (unsigned long value,
+ unsigned long min,
+ unsigned long max)
{
if (value < min || value > max)
{
diff --git a/opcodes/cgen-asm.in b/opcodes/cgen-asm.in
index 1ea076809b..420f640ec3 100644
--- a/opcodes/cgen-asm.in
+++ b/opcodes/cgen-asm.in
@@ -43,7 +43,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
/* -- assembler routines inserted here. */
@@ -60,8 +60,7 @@ static const char * parse_insn_normal
Returns NULL for success, an error message for failure. */
char *
-@arch@_cgen_build_insn_regex (insn)
- CGEN_INSN *insn;
+@arch@_cgen_build_insn_regex (CGEN_INSN *insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
@@ -184,11 +183,10 @@ char *
Returns NULL for success, an error message for failure. */
static const char *
-parse_insn_normal (cd, insn, strp, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const char **strp;
- CGEN_FIELDS *fields;
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
{
/* ??? Runtime added insns not handled yet. */
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
@@ -326,12 +324,11 @@ parse_insn_normal (cd, insn, strp, fields)
mind helps keep the design clean. */
const CGEN_INSN *
-@arch@_cgen_assemble_insn (cd, str, fields, buf, errmsg)
- CGEN_CPU_DESC cd;
- const char *str;
- CGEN_FIELDS *fields;
- CGEN_INSN_BYTES_PTR buf;
- char **errmsg;
+@arch@_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
{
const char *start;
CGEN_INSN_LIST *ilist;
@@ -435,9 +432,7 @@ const CGEN_INSN *
FIXME: Not currently used. */
void
-@arch@_cgen_asm_hash_keywords (cd, opvals)
- CGEN_CPU_DESC cd;
- CGEN_KEYWORD *opvals;
+@arch@_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
{
CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
const CGEN_KEYWORD_ENTRY * ke;
diff --git a/opcodes/cgen-dis.c b/opcodes/cgen-dis.c
index 881ee1470f..ca621dec2d 100644
--- a/opcodes/cgen-dis.c
+++ b/opcodes/cgen-dis.c
@@ -27,19 +27,18 @@
#include "symcat.h"
#include "opcode/cgen.h"
-static CGEN_INSN_LIST * hash_insn_array PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
-static CGEN_INSN_LIST * hash_insn_list PARAMS ((CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
-static void build_dis_hash_table PARAMS ((CGEN_CPU_DESC));
-static int count_decodable_bits PARAMS ((const CGEN_INSN *));
-static void add_insn_to_hash_chain PARAMS ((CGEN_INSN_LIST *,
- const CGEN_INSN *,
- CGEN_INSN_LIST **,
- unsigned int));
+static CGEN_INSN_LIST * hash_insn_array (CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *);
+static CGEN_INSN_LIST * hash_insn_list (CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *);
+static void build_dis_hash_table (CGEN_CPU_DESC);
+static int count_decodable_bits (const CGEN_INSN *);
+static void add_insn_to_hash_chain (CGEN_INSN_LIST *,
+ const CGEN_INSN *,
+ CGEN_INSN_LIST **,
+ unsigned int);
/* Return the number of decodable bits in this insn. */
static int
-count_decodable_bits (insn)
- const CGEN_INSN *insn;
+count_decodable_bits (const CGEN_INSN *insn)
{
unsigned mask = CGEN_INSN_BASE_MASK (insn);
int bits = 0;
@@ -54,11 +53,10 @@ count_decodable_bits (insn)
/* Add an instruction to the hash chain. */
static void
-add_insn_to_hash_chain (hentbuf, insn, htable, hash)
- CGEN_INSN_LIST *hentbuf;
- const CGEN_INSN *insn;
- CGEN_INSN_LIST **htable;
- unsigned int hash;
+add_insn_to_hash_chain (CGEN_INSN_LIST *hentbuf,
+ const CGEN_INSN *insn,
+ CGEN_INSN_LIST **htable,
+ unsigned int hash)
{
CGEN_INSN_LIST *current_buf;
CGEN_INSN_LIST *previous_buf;
@@ -100,13 +98,12 @@ add_insn_to_hash_chain (hentbuf, insn, htable, hash)
list and we want earlier ones to be prefered. */
static CGEN_INSN_LIST *
-hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insns;
- int count;
- int entsize ATTRIBUTE_UNUSED;
- CGEN_INSN_LIST ** htable;
- CGEN_INSN_LIST * hentbuf;
+hash_insn_array (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insns,
+ int count,
+ int entsize ATTRIBUTE_UNUSED,
+ CGEN_INSN_LIST ** htable,
+ CGEN_INSN_LIST * hentbuf)
{
int big_p = CGEN_CPU_ENDIAN (cd) == CGEN_ENDIAN_BIG;
int i;
@@ -141,11 +138,10 @@ hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
in a list. */
static CGEN_INSN_LIST *
-hash_insn_list (cd, insns, htable, hentbuf)
- CGEN_CPU_DESC cd;
- const CGEN_INSN_LIST *insns;
- CGEN_INSN_LIST **htable;
- CGEN_INSN_LIST *hentbuf;
+hash_insn_list (CGEN_CPU_DESC cd,
+ const CGEN_INSN_LIST *insns,
+ CGEN_INSN_LIST **htable,
+ CGEN_INSN_LIST *hentbuf)
{
int big_p = CGEN_CPU_ENDIAN (cd) == CGEN_ENDIAN_BIG;
const CGEN_INSN_LIST *ilist;
@@ -177,8 +173,7 @@ hash_insn_list (cd, insns, htable, hentbuf)
/* Build the disassembler instruction hash table. */
static void
-build_dis_hash_table (cd)
- CGEN_CPU_DESC cd;
+build_dis_hash_table (CGEN_CPU_DESC cd)
{
int count = cgen_insn_count (cd) + cgen_macro_insn_count (cd);
CGEN_INSN_TABLE *insn_table = & cd->insn_table;
@@ -233,10 +228,7 @@ build_dis_hash_table (cd)
/* Return the first entry in the hash list for INSN. */
CGEN_INSN_LIST *
-cgen_dis_lookup_insn (cd, buf, value)
- CGEN_CPU_DESC cd;
- const char * buf;
- CGEN_INSN_INT value;
+cgen_dis_lookup_insn (CGEN_CPU_DESC cd, const char * buf, CGEN_INSN_INT value)
{
unsigned int hash;
diff --git a/opcodes/cgen-dis.in b/opcodes/cgen-dis.in
index 9203b71d02..1a3c0fa59d 100644
--- a/opcodes/cgen-dis.in
+++ b/opcodes/cgen-dis.in
@@ -41,34 +41,32 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define UNKNOWN_INSN_MSG _("*unknown*")
static void print_normal
- PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
static void print_address
- PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
static void print_keyword
- PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
static void print_insn_normal
- PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
- bfd_vma, int));
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
static int print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned);
static int default_print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
static int read_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
- CGEN_EXTRACT_INFO *, unsigned long *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
/* -- disassembler routines inserted here */
/* Default print handler. */
static void
-print_normal (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- long value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -88,13 +86,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
/* Default address handler. */
static void
-print_address (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- bfd_vma value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -118,12 +115,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
/* Keyword print handler. */
static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- CGEN_KEYWORD *keyword_table;
- long value;
- unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
const CGEN_KEYWORD_ENTRY *ke;
@@ -137,17 +133,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
/* Default insn printer.
- DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
about disassemble_info. */
static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
- CGEN_CPU_DESC cd;
- PTR dis_info;
- const CGEN_INSN *insn;
- CGEN_FIELDS *fields;
- bfd_vma pc;
- int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
disassemble_info *info = (disassemble_info *) dis_info;
@@ -179,14 +174,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- int buflen;
- CGEN_EXTRACT_INFO *ex_info;
- unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
{
int status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
@@ -210,12 +204,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
been called). */
static int
-print_insn (cd, pc, info, buf, buflen)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ unsigned int buflen)
{
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
@@ -320,10 +313,7 @@ print_insn (cd, pc, info, buf, buflen)
#endif
static int
-default_print_insn (cd, pc, info)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
char buf[CGEN_MAX_INSN_SIZE];
int buflen;
@@ -362,9 +352,7 @@ typedef struct cpu_desc_list {
} cpu_desc_list;
int
-print_insn_@arch@ (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_@arch@ (bfd_vma pc, disassemble_info *info)
{
static cpu_desc_list *cd_list = 0;
cpu_desc_list *cl = 0;
diff --git a/opcodes/cgen-ibld.in b/opcodes/cgen-ibld.in
index d2bfd02a91..316f183c41 100644
--- a/opcodes/cgen-ibld.in
+++ b/opcodes/cgen-ibld.in
@@ -44,30 +44,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define FLD(f) (fields->f)
static const char * insert_normal
- PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
static const char * insert_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
static int extract_normal
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- unsigned int, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, bfd_vma, long *));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
static int extract_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
#if CGEN_INT_INSN_P
static void put_insn_int_value
- PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
#endif
#if ! CGEN_INT_INSN_P
static CGEN_INLINE void insert_1
- PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
static CGEN_INLINE int fill_cache
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
static CGEN_INLINE long extract_1
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
- unsigned char *, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
#endif
/* Operand insertion. */
@@ -77,11 +76,12 @@ static CGEN_INLINE long extract_1
/* Subroutine of insert_normal. */
static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
- CGEN_CPU_DESC cd;
- unsigned long value;
- int start,length,word_length;
- unsigned char *bufp;
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
{
unsigned long x,mask;
int shift;
@@ -118,13 +118,15 @@ insert_1 (cd, value, start, length, word_length, bufp)
necessary. */
static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
- total_length, buffer)
- CGEN_CPU_DESC cd;
- long value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
- CGEN_INSN_BYTES_PTR buffer;
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
{
static char errbuf[100];
/* Written this way to avoid undefined behaviour. */
@@ -232,12 +234,11 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
The result is an error message or NULL if success. */
static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insn;
- CGEN_FIELDS * fields;
- CGEN_INSN_BYTES_PTR buffer;
- bfd_vma pc;
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
unsigned long value;
@@ -288,12 +289,11 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
-put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_INSN_BYTES_PTR buf;
- int length;
- int insn_length;
- CGEN_INSN_INT value;
+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
{
/* For architectures with insns smaller than the base-insn-bitsize,
length may be too big. */
@@ -320,11 +320,11 @@ put_insn_int_value (cd, buf, length, insn_length, value)
Returns 1 for success, 0 for failure. */
static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_EXTRACT_INFO *ex_info;
- int offset, bytes;
- bfd_vma pc;
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
@@ -364,12 +364,13 @@ fill_cache (cd, ex_info, offset, bytes, pc)
/* Subroutine of extract_normal. */
static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
- CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
- int start,length,word_length;
- unsigned char *bufp;
- bfd_vma pc ATTRIBUTE_UNUSED;
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
{
unsigned long x;
int shift;
@@ -408,23 +409,25 @@ extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
necessary. */
static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
- word_length, total_length, pc, valuep)
- CGEN_CPU_DESC cd;
+extract_normal (CGEN_CPU_DESC cd,
#if ! CGEN_INT_INSN_P
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info,
#else
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
#endif
- CGEN_INSN_INT insn_value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
#if ! CGEN_INT_INSN_P
- bfd_vma pc;
+ bfd_vma pc,
#else
- bfd_vma pc ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED,
#endif
- long *valuep;
+ long *valuep)
{
long value, mask;
@@ -505,13 +508,12 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
been called). */
static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_EXTRACT_INFO *ex_info;
- CGEN_INSN_INT insn_value;
- CGEN_FIELDS *fields;
- bfd_vma pc;
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
const CGEN_SYNTAX_CHAR_TYPE *syn;
diff --git a/opcodes/cgen-opc.c b/opcodes/cgen-opc.c
index 06544ca057..882b34898b 100644
--- a/opcodes/cgen-opc.c
+++ b/opcodes/cgen-opc.c
@@ -33,11 +33,11 @@
#endif
static unsigned int hash_keyword_name
- PARAMS ((const CGEN_KEYWORD *, const char *, int));
+ (const CGEN_KEYWORD *, const char *, int);
static unsigned int hash_keyword_value
- PARAMS ((const CGEN_KEYWORD *, unsigned int));
+ (const CGEN_KEYWORD *, unsigned int);
static void build_keyword_hash_tables
- PARAMS ((CGEN_KEYWORD *));
+ (CGEN_KEYWORD *);
/* Return number of hash table entries to use for N elements. */
#define KEYWORD_HASH_SIZE(n) ((n) <= 31 ? 17 : 31)
@@ -46,9 +46,7 @@ static void build_keyword_hash_tables
The result is the keyword entry or NULL if not found. */
const CGEN_KEYWORD_ENTRY *
-cgen_keyword_lookup_name (kt, name)
- CGEN_KEYWORD *kt;
- const char *name;
+cgen_keyword_lookup_name (CGEN_KEYWORD *kt, const char *name)
{
const CGEN_KEYWORD_ENTRY *ke;
const char *p,*n;
@@ -87,9 +85,7 @@ cgen_keyword_lookup_name (kt, name)
The result is the keyword entry or NULL if not found. */
const CGEN_KEYWORD_ENTRY *
-cgen_keyword_lookup_value (kt, value)
- CGEN_KEYWORD *kt;
- int value;
+cgen_keyword_lookup_value (CGEN_KEYWORD *kt, int value)
{
const CGEN_KEYWORD_ENTRY *ke;
@@ -111,9 +107,7 @@ cgen_keyword_lookup_value (kt, value)
/* Add an entry to a keyword table. */
void
-cgen_keyword_add (kt, ke)
- CGEN_KEYWORD *kt;
- CGEN_KEYWORD_ENTRY *ke;
+cgen_keyword_add (CGEN_KEYWORD *kt, CGEN_KEYWORD_ENTRY *ke)
{
unsigned int hash;
size_t i;
@@ -159,9 +153,7 @@ cgen_keyword_add (kt, ke)
It is passed to each call to cgen_keyword_search_next. */
CGEN_KEYWORD_SEARCH
-cgen_keyword_search_init (kt, spec)
- CGEN_KEYWORD *kt;
- const char *spec;
+cgen_keyword_search_init (CGEN_KEYWORD *kt, const char *spec)
{
CGEN_KEYWORD_SEARCH search;
@@ -183,8 +175,7 @@ cgen_keyword_search_init (kt, spec)
The result is the next entry or NULL if there are no more. */
const CGEN_KEYWORD_ENTRY *
-cgen_keyword_search_next (search)
- CGEN_KEYWORD_SEARCH *search;
+cgen_keyword_search_next (CGEN_KEYWORD_SEARCH *search)
{
/* Has search finished? */
if (search->current_hash == search->table->hash_table_size)
@@ -218,10 +209,9 @@ cgen_keyword_search_next (search)
If CASE_SENSITIVE_P is non-zero, return a case sensitive hash. */
static unsigned int
-hash_keyword_name (kt, name, case_sensitive_p)
- const CGEN_KEYWORD *kt;
- const char *name;
- int case_sensitive_p;
+hash_keyword_name (const CGEN_KEYWORD *kt,
+ const char *name,
+ int case_sensitive_p)
{
unsigned int hash;
@@ -237,9 +227,7 @@ hash_keyword_name (kt, name, case_sensitive_p)
/* Return first entry in hash chain for VALUE. */
static unsigned int
-hash_keyword_value (kt, value)
- const CGEN_KEYWORD *kt;
- unsigned int value;
+hash_keyword_value (const CGEN_KEYWORD *kt, unsigned int value)
{
return value % kt->hash_table_size;
}
@@ -249,8 +237,7 @@ hash_keyword_value (kt, value)
we're using the disassembler, but we keep things simple. */
static void
-build_keyword_hash_tables (kt)
- CGEN_KEYWORD *kt;
+build_keyword_hash_tables (CGEN_KEYWORD *kt)
{
int i;
/* Use the number of compiled in entries as an estimate for the
@@ -278,9 +265,7 @@ build_keyword_hash_tables (kt)
mach/isa. */
const CGEN_HW_ENTRY *
-cgen_hw_lookup_by_name (cd, name)
- CGEN_CPU_DESC cd;
- const char *name;
+cgen_hw_lookup_by_name (CGEN_CPU_DESC cd, const char *name)
{
unsigned int i;
const CGEN_HW_ENTRY **hw = cd->hw_table.entries;
@@ -298,9 +283,7 @@ cgen_hw_lookup_by_name (cd, name)
Returns NULL if HWNUM is not supported by the currently selected mach. */
const CGEN_HW_ENTRY *
-cgen_hw_lookup_by_num (cd, hwnum)
- CGEN_CPU_DESC cd;
- unsigned int hwnum;
+cgen_hw_lookup_by_num (CGEN_CPU_DESC cd, unsigned int hwnum)
{
unsigned int i;
const CGEN_HW_ENTRY **hw = cd->hw_table.entries;
@@ -320,9 +303,7 @@ cgen_hw_lookup_by_num (cd, hwnum)
mach/isa. */
const CGEN_OPERAND *
-cgen_operand_lookup_by_name (cd, name)
- CGEN_CPU_DESC cd;
- const char *name;
+cgen_operand_lookup_by_name (CGEN_CPU_DESC cd, const char *name)
{
unsigned int i;
const CGEN_OPERAND **op = cd->operand_table.entries;
@@ -341,9 +322,7 @@ cgen_operand_lookup_by_name (cd, name)
mach/isa. */
const CGEN_OPERAND *
-cgen_operand_lookup_by_num (cd, opnum)
- CGEN_CPU_DESC cd;
- int opnum;
+cgen_operand_lookup_by_num (CGEN_CPU_DESC cd, int opnum)
{
return cd->operand_table.entries[opnum];
}
@@ -353,8 +332,7 @@ cgen_operand_lookup_by_num (cd, opnum)
/* Return number of instructions. This includes any added at runtime. */
int
-cgen_insn_count (cd)
- CGEN_CPU_DESC cd;
+cgen_insn_count (CGEN_CPU_DESC cd)
{
int count = cd->insn_table.num_init_entries;
CGEN_INSN_LIST *rt_insns = cd->insn_table.new_entries;
@@ -369,8 +347,7 @@ cgen_insn_count (cd)
This includes any added at runtime. */
int
-cgen_macro_insn_count (cd)
- CGEN_CPU_DESC cd;
+cgen_macro_insn_count (CGEN_CPU_DESC cd)
{
int count = cd->macro_insn_table.num_init_entries;
CGEN_INSN_LIST *rt_insns = cd->macro_insn_table.new_entries;
@@ -384,10 +361,7 @@ cgen_macro_insn_count (cd)
/* Cover function to read and properly byteswap an insn value. */
CGEN_INSN_INT
-cgen_get_insn_value (cd, buf, length)
- CGEN_CPU_DESC cd;
- unsigned char *buf;
- int length;
+cgen_get_insn_value (CGEN_CPU_DESC cd, unsigned char *buf, int length)
{
int big_p = (cd->insn_endian == CGEN_ENDIAN_BIG);
int insn_chunk_bitsize = cd->insn_chunk_bitsize;
@@ -423,11 +397,10 @@ cgen_get_insn_value (cd, buf, length)
/* Cover function to store an insn value properly byteswapped. */
void
-cgen_put_insn_value (cd, buf, length, value)
- CGEN_CPU_DESC cd;
- unsigned char *buf;
- int length;
- CGEN_INSN_INT value;
+cgen_put_insn_value (CGEN_CPU_DESC cd,
+ unsigned char *buf,
+ int length,
+ CGEN_INSN_INT value)
{
int big_p = (cd->insn_endian == CGEN_ENDIAN_BIG);
int insn_chunk_bitsize = cd->insn_chunk_bitsize;
@@ -472,16 +445,14 @@ cgen_put_insn_value (cd, buf, length, value)
/* ??? Will need to be revisited for VLIW architectures. */
const CGEN_INSN *
-cgen_lookup_insn (cd, insn, insn_int_value, insn_bytes_value, length, fields,
- alias_p)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_INSN_INT insn_int_value;
- /* ??? CGEN_INSN_BYTES would be a nice type name to use here. */
- unsigned char *insn_bytes_value;
- int length;
- CGEN_FIELDS *fields;
- int alias_p;
+cgen_lookup_insn (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_INSN_INT insn_int_value,
+ /* ??? CGEN_INSN_BYTES would be a nice type name to use here. */
+ unsigned char *insn_bytes_value,
+ int length,
+ CGEN_FIELDS *fields,
+ int alias_p)
{
unsigned char *buf;
CGEN_INSN_INT base_insn;
@@ -571,11 +542,10 @@ cgen_lookup_insn (cd, insn, insn_int_value, insn_bytes_value, length, fields,
in. */
void
-cgen_get_insn_operands (cd, insn, fields, indices)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const CGEN_FIELDS *fields;
- int *indices;
+cgen_get_insn_operands (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const CGEN_FIELDS *fields,
+ int *indices)
{
const CGEN_OPINST *opinst;
int i;
@@ -603,16 +573,14 @@ cgen_get_insn_operands (cd, insn, fields, indices)
recognized. */
const CGEN_INSN *
-cgen_lookup_get_insn_operands (cd, insn, insn_int_value, insn_bytes_value,
- length, indices, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_INSN_INT insn_int_value;
- /* ??? CGEN_INSN_BYTES would be a nice type name to use here. */
- unsigned char *insn_bytes_value;
- int length;
- int *indices;
- CGEN_FIELDS *fields;
+cgen_lookup_get_insn_operands (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_INSN_INT insn_int_value,
+ /* ??? CGEN_INSN_BYTES would be a nice type name to use here. */
+ unsigned char *insn_bytes_value,
+ int length,
+ int *indices,
+ CGEN_FIELDS *fields)
{
/* Pass non-zero for ALIAS_P only if INSN != NULL.
If INSN == NULL, we want a real insn. */
@@ -627,24 +595,21 @@ cgen_lookup_get_insn_operands (cd, insn, insn_int_value, insn_bytes_value,
/* Allow signed overflow of instruction fields. */
void
-cgen_set_signed_overflow_ok (cd)
- CGEN_CPU_DESC cd;
+cgen_set_signed_overflow_ok (CGEN_CPU_DESC cd)
{
cd->signed_overflow_ok_p = 1;
}
/* Generate an error message if a signed field in an instruction overflows. */
void
-cgen_clear_signed_overflow_ok (cd)
- CGEN_CPU_DESC cd;
+cgen_clear_signed_overflow_ok (CGEN_CPU_DESC cd)
{
cd->signed_overflow_ok_p = 0;
}
/* Will an error message be generated if a signed field in an instruction overflows ? */
unsigned int
-cgen_signed_overflow_ok_p (cd)
- CGEN_CPU_DESC cd;
+cgen_signed_overflow_ok_p (CGEN_CPU_DESC cd)
{
return cd->signed_overflow_ok_p;
}
diff --git a/opcodes/cgen.sh b/opcodes/cgen.sh
index a9483bdb97..5a340b6e52 100644
--- a/opcodes/cgen.sh
+++ b/opcodes/cgen.sh
@@ -23,11 +23,19 @@
# arch-asm.c, arch-dis.c, arch-opinst.c, arch-ibld.[ch].
#
# Usage:
-# cgen.sh action srcdir cgen cgendir cgenflags arch prefix options
+# cgen.sh action srcdir cgen cgendir cgenflags arch prefix \
+# arch-file opc-file options [extrafiles]
#
# ACTION is currently always "opcodes". It exists to be consistent with the
# simulator.
-# OPTIONS is comma separated list of options:
+# ARCH is the name of the architecture.
+# It is substituted into @arch@ and @ARCH@ in the generated files.
+# PREFIX is both the generated file prefix and is substituted into
+# @prefix@ in the generated files.
+# ARCH-FILE is the name of the .cpu file (including path).
+# OPC-FILE is the name of the .opc file (including path).
+# OPTIONS is comma separated list of options (???).
+# EXTRAFILES is a space separated list (1 arg still) of extra files to build:
# - opinst - arch-opinst.c is being made, causes semantic analysis
#
# We store the generated files in the source directory until we decide to
@@ -44,11 +52,13 @@ cgendir=$4
cgenflags=$5
arch=$6
prefix=$7
-options=$8
+archfile=$8
+opcfile=$9
+shift ; options=$9
# List of extra files to build.
# Values: opinst (only 1 extra file at present)
-extrafiles=$9
+shift ; extrafiles=$9
rootdir=${srcdir}/..
@@ -88,7 +98,8 @@ opcodes)
${cgenflags} \
-f "${options}" \
-m all \
- -a ${arch} \
+ -a ${archfile} \
+ -OPC ${opcfile} \
-H tmp-desc.h1 \
-C tmp-desc.c1 \
-O tmp-opc.h1 \
diff --git a/opcodes/dep-in.sed b/opcodes/dep-in.sed
index e373d4ca84..94da2adc34 100644
--- a/opcodes/dep-in.sed
+++ b/opcodes/dep-in.sed
@@ -10,6 +10,7 @@ s!@TOPDIR@/include!$(INCDIR)!g
s!@BFDDIR@!$(BFDDIR)!g
s!@TOPDIR@/bfd!$(BFDDIR)!g
s!@SRCDIR@/!!g
+s! \.\./intl/libintl\.h!!g
s/\\\n */ /g
diff --git a/opcodes/dis-init.c b/opcodes/dis-init.c
new file mode 100644
index 0000000000..4c3e36e6e8
--- /dev/null
+++ b/opcodes/dis-init.c
@@ -0,0 +1,41 @@
+/* Initialize "struct disassemble_info".
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ This program 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 of the
+ License, or (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "sysdep.h"
+#include "dis-asm.h"
+#include "bfd.h"
+
+void
+init_disassemble_info (struct disassemble_info *info, void *stream,
+ fprintf_ftype fprintf_func)
+{
+ memset (info, 0, sizeof (*info));
+ info->flavour = bfd_target_unknown_flavour;
+ info->arch = bfd_arch_unknown;
+ info->endian = BFD_ENDIAN_UNKNOWN;
+ info->octets_per_byte = 1;
+ info->fprintf_func = fprintf_func;
+ info->stream = stream;
+ info->read_memory_func = buffer_read_memory;
+ info->memory_error_func = perror_memory;
+ info->print_address_func = generic_print_address;
+ info->symbol_at_address_func = generic_symbol_at_address;
+ info->display_endian = BFD_ENDIAN_UNKNOWN;
+}
+
diff --git a/opcodes/fr30-asm.c b/opcodes/fr30-asm.c
index 8e7c7b8097..f1c18a16bd 100644
--- a/opcodes/fr30-asm.c
+++ b/opcodes/fr30-asm.c
@@ -43,7 +43,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
/* -- assembler routines inserted here. */
@@ -356,8 +356,7 @@ fr30_cgen_init_asm (cd)
Returns NULL for success, an error message for failure. */
char *
-fr30_cgen_build_insn_regex (insn)
- CGEN_INSN *insn;
+fr30_cgen_build_insn_regex (CGEN_INSN *insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
@@ -480,11 +479,10 @@ fr30_cgen_build_insn_regex (insn)
Returns NULL for success, an error message for failure. */
static const char *
-parse_insn_normal (cd, insn, strp, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const char **strp;
- CGEN_FIELDS *fields;
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
{
/* ??? Runtime added insns not handled yet. */
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
@@ -622,12 +620,11 @@ parse_insn_normal (cd, insn, strp, fields)
mind helps keep the design clean. */
const CGEN_INSN *
-fr30_cgen_assemble_insn (cd, str, fields, buf, errmsg)
- CGEN_CPU_DESC cd;
- const char *str;
- CGEN_FIELDS *fields;
- CGEN_INSN_BYTES_PTR buf;
- char **errmsg;
+fr30_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
{
const char *start;
CGEN_INSN_LIST *ilist;
@@ -731,9 +728,7 @@ fr30_cgen_assemble_insn (cd, str, fields, buf, errmsg)
FIXME: Not currently used. */
void
-fr30_cgen_asm_hash_keywords (cd, opvals)
- CGEN_CPU_DESC cd;
- CGEN_KEYWORD *opvals;
+fr30_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
{
CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
const CGEN_KEYWORD_ENTRY * ke;
diff --git a/opcodes/fr30-dis.c b/opcodes/fr30-dis.c
index ef7b37a5a2..0b99a4af39 100644
--- a/opcodes/fr30-dis.c
+++ b/opcodes/fr30-dis.c
@@ -41,21 +41,20 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define UNKNOWN_INSN_MSG _("*unknown*")
static void print_normal
- PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
static void print_address
- PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
static void print_keyword
- PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
static void print_insn_normal
- PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
- bfd_vma, int));
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
static int print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned);
static int default_print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
static int read_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
- CGEN_EXTRACT_INFO *, unsigned long *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
/* -- disassembler routines inserted here */
@@ -343,13 +342,12 @@ fr30_cgen_init_dis (cd)
/* Default print handler. */
static void
-print_normal (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- long value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -369,13 +367,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
/* Default address handler. */
static void
-print_address (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- bfd_vma value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -399,12 +396,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
/* Keyword print handler. */
static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- CGEN_KEYWORD *keyword_table;
- long value;
- unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
const CGEN_KEYWORD_ENTRY *ke;
@@ -418,17 +414,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
/* Default insn printer.
- DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
about disassemble_info. */
static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
- CGEN_CPU_DESC cd;
- PTR dis_info;
- const CGEN_INSN *insn;
- CGEN_FIELDS *fields;
- bfd_vma pc;
- int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
disassemble_info *info = (disassemble_info *) dis_info;
@@ -460,14 +455,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- int buflen;
- CGEN_EXTRACT_INFO *ex_info;
- unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
{
int status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
@@ -491,12 +485,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
been called). */
static int
-print_insn (cd, pc, info, buf, buflen)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ unsigned int buflen)
{
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
@@ -601,10 +594,7 @@ print_insn (cd, pc, info, buf, buflen)
#endif
static int
-default_print_insn (cd, pc, info)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
char buf[CGEN_MAX_INSN_SIZE];
int buflen;
@@ -643,9 +633,7 @@ typedef struct cpu_desc_list {
} cpu_desc_list;
int
-print_insn_fr30 (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_fr30 (bfd_vma pc, disassemble_info *info)
{
static cpu_desc_list *cd_list = 0;
cpu_desc_list *cl = 0;
diff --git a/opcodes/fr30-ibld.c b/opcodes/fr30-ibld.c
index 96374619e6..b01e483e32 100644
--- a/opcodes/fr30-ibld.c
+++ b/opcodes/fr30-ibld.c
@@ -44,30 +44,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define FLD(f) (fields->f)
static const char * insert_normal
- PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
static const char * insert_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
static int extract_normal
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- unsigned int, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, bfd_vma, long *));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
static int extract_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
#if CGEN_INT_INSN_P
static void put_insn_int_value
- PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
#endif
#if ! CGEN_INT_INSN_P
static CGEN_INLINE void insert_1
- PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
static CGEN_INLINE int fill_cache
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
static CGEN_INLINE long extract_1
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
- unsigned char *, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
#endif
/* Operand insertion. */
@@ -77,11 +76,12 @@ static CGEN_INLINE long extract_1
/* Subroutine of insert_normal. */
static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
- CGEN_CPU_DESC cd;
- unsigned long value;
- int start,length,word_length;
- unsigned char *bufp;
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
{
unsigned long x,mask;
int shift;
@@ -118,13 +118,15 @@ insert_1 (cd, value, start, length, word_length, bufp)
necessary. */
static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
- total_length, buffer)
- CGEN_CPU_DESC cd;
- long value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
- CGEN_INSN_BYTES_PTR buffer;
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
{
static char errbuf[100];
/* Written this way to avoid undefined behaviour. */
@@ -232,12 +234,11 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
The result is an error message or NULL if success. */
static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insn;
- CGEN_FIELDS * fields;
- CGEN_INSN_BYTES_PTR buffer;
- bfd_vma pc;
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
unsigned long value;
@@ -288,12 +289,11 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
-put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_INSN_BYTES_PTR buf;
- int length;
- int insn_length;
- CGEN_INSN_INT value;
+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
{
/* For architectures with insns smaller than the base-insn-bitsize,
length may be too big. */
@@ -320,11 +320,11 @@ put_insn_int_value (cd, buf, length, insn_length, value)
Returns 1 for success, 0 for failure. */
static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_EXTRACT_INFO *ex_info;
- int offset, bytes;
- bfd_vma pc;
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
@@ -364,12 +364,13 @@ fill_cache (cd, ex_info, offset, bytes, pc)
/* Subroutine of extract_normal. */
static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
- CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
- int start,length,word_length;
- unsigned char *bufp;
- bfd_vma pc ATTRIBUTE_UNUSED;
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
{
unsigned long x;
int shift;
@@ -408,23 +409,25 @@ extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
necessary. */
static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
- word_length, total_length, pc, valuep)
- CGEN_CPU_DESC cd;
+extract_normal (CGEN_CPU_DESC cd,
#if ! CGEN_INT_INSN_P
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info,
#else
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
#endif
- CGEN_INSN_INT insn_value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
#if ! CGEN_INT_INSN_P
- bfd_vma pc;
+ bfd_vma pc,
#else
- bfd_vma pc ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED,
#endif
- long *valuep;
+ long *valuep)
{
long value, mask;
@@ -505,13 +508,12 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
been called). */
static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_EXTRACT_INFO *ex_info;
- CGEN_INSN_INT insn_value;
- CGEN_FIELDS *fields;
- bfd_vma pc;
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
const CGEN_SYNTAX_CHAR_TYPE *syn;
diff --git a/opcodes/frv-asm.c b/opcodes/frv-asm.c
index 0e3d8ddf66..1d24b28d40 100644
--- a/opcodes/frv-asm.c
+++ b/opcodes/frv-asm.c
@@ -43,7 +43,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
/* -- assembler routines inserted here. */
@@ -66,6 +66,12 @@ static const char * parse_u12
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
static const char * parse_even_register
PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
+static const char * parse_A0
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_A1
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_A
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *, long));
static const char *
parse_ulo16 (cd, strp, opindex, valuep)
@@ -349,6 +355,49 @@ parse_u12 (cd, strp, opindex, valuep)
}
static const char *
+parse_A (cd, strp, opindex, valuep, A)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+ long A;
+{
+ const char *errmsg;
+
+ if (**strp == '#')
+ ++*strp;
+
+ errmsg = cgen_parse_unsigned_integer (cd, strp, opindex, valuep);
+ if (errmsg)
+ return errmsg;
+
+ if (*valuep != A)
+ return "Value of A operand must be 0 or 1";
+
+ return NULL;
+}
+
+static const char *
+parse_A0 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ return parse_A (cd, strp, opindex, valuep, 0);
+}
+
+static const char *
+parse_A1 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ return parse_A (cd, strp, opindex, valuep, 1);
+}
+
+static const char *
parse_even_register (cd, strP, tableP, valueP)
CGEN_CPU_DESC cd;
const char ** strP;
@@ -399,8 +448,11 @@ frv_cgen_parse_operand (cd, opindex, strp, fields)
switch (opindex)
{
- case FRV_OPERAND_A :
- errmsg = cgen_parse_unsigned_integer (cd, strp, FRV_OPERAND_A, &fields->f_A);
+ case FRV_OPERAND_A0 :
+ errmsg = parse_A0 (cd, strp, FRV_OPERAND_A0, &fields->f_A);
+ break;
+ case FRV_OPERAND_A1 :
+ errmsg = parse_A1 (cd, strp, FRV_OPERAND_A1, &fields->f_A);
break;
case FRV_OPERAND_ACC40SI :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_acc_names, & fields->f_ACC40Si);
@@ -659,8 +711,7 @@ frv_cgen_init_asm (cd)
Returns NULL for success, an error message for failure. */
char *
-frv_cgen_build_insn_regex (insn)
- CGEN_INSN *insn;
+frv_cgen_build_insn_regex (CGEN_INSN *insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
@@ -783,11 +834,10 @@ frv_cgen_build_insn_regex (insn)
Returns NULL for success, an error message for failure. */
static const char *
-parse_insn_normal (cd, insn, strp, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const char **strp;
- CGEN_FIELDS *fields;
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
{
/* ??? Runtime added insns not handled yet. */
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
@@ -925,12 +975,11 @@ parse_insn_normal (cd, insn, strp, fields)
mind helps keep the design clean. */
const CGEN_INSN *
-frv_cgen_assemble_insn (cd, str, fields, buf, errmsg)
- CGEN_CPU_DESC cd;
- const char *str;
- CGEN_FIELDS *fields;
- CGEN_INSN_BYTES_PTR buf;
- char **errmsg;
+frv_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
{
const char *start;
CGEN_INSN_LIST *ilist;
@@ -1034,9 +1083,7 @@ frv_cgen_assemble_insn (cd, str, fields, buf, errmsg)
FIXME: Not currently used. */
void
-frv_cgen_asm_hash_keywords (cd, opvals)
- CGEN_CPU_DESC cd;
- CGEN_KEYWORD *opvals;
+frv_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
{
CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
const CGEN_KEYWORD_ENTRY * ke;
diff --git a/opcodes/frv-desc.c b/opcodes/frv-desc.c
index 97d49b3077..1e660261c8 100644
--- a/opcodes/frv-desc.c
+++ b/opcodes/frv-desc.c
@@ -68,15 +68,23 @@ static const CGEN_ATTR_ENTRY UNIT_attr[] =
{ "I0", UNIT_I0 },
{ "I1", UNIT_I1 },
{ "I01", UNIT_I01 },
+ { "IALL", UNIT_IALL },
{ "FM0", UNIT_FM0 },
{ "FM1", UNIT_FM1 },
{ "FM01", UNIT_FM01 },
+ { "FMALL", UNIT_FMALL },
+ { "FMLOW", UNIT_FMLOW },
{ "B0", UNIT_B0 },
{ "B1", UNIT_B1 },
{ "B01", UNIT_B01 },
{ "C", UNIT_C },
{ "MULT_DIV", UNIT_MULT_DIV },
{ "LOAD", UNIT_LOAD },
+ { "STORE", UNIT_STORE },
+ { "SCAN", UNIT_SCAN },
+ { "DCPL", UNIT_DCPL },
+ { "MDUALACC", UNIT_MDUALACC },
+ { "MCLRACC_1", UNIT_MCLRACC_1 },
{ "NUM_UNITS", UNIT_NUM_UNITS },
{ 0, 0 }
};
@@ -2157,10 +2165,6 @@ const CGEN_OPERAND frv_cgen_operand_table[] =
{ "debug", FRV_OPERAND_DEBUG, HW_H_UINT, 25, 1,
{ 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_DEBUG] } },
{ 0|A(HASH_PREFIX), { (1<<MACH_BASE) } } },
-/* A: all accumulator indicator */
- { "A", FRV_OPERAND_A, HW_H_UINT, 17, 1,
- { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_A] } },
- { 0|A(HASH_PREFIX), { (1<<MACH_BASE) } } },
/* ae: all entries indicator */
{ "ae", FRV_OPERAND_AE, HW_H_UINT, 25, 1,
{ 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_AE] } },
@@ -2173,6 +2177,14 @@ const CGEN_OPERAND frv_cgen_operand_table[] =
{ "label24", FRV_OPERAND_LABEL24, HW_H_IADDR, 17, 24,
{ 2, { (const PTR) &FRV_F_LABEL24_MULTI_IFIELD[0] } },
{ 0|A(PCREL_ADDR)|A(VIRTUAL), { (1<<MACH_BASE) } } },
+/* A0: A==0 operand of mclracc */
+ { "A0", FRV_OPERAND_A0, HW_H_UINT, 17, 1,
+ { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_A] } },
+ { 0, { (1<<MACH_BASE) } } },
+/* A1: A==1 operand of mclracc */
+ { "A1", FRV_OPERAND_A1, HW_H_UINT, 17, 1,
+ { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_A] } },
+ { 0, { (1<<MACH_BASE) } } },
/* FRintieven: (even) source register 1 */
{ "FRintieven", FRV_OPERAND_FRINTIEVEN, HW_H_FR_INT, 17, 6,
{ 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_FRI] } },
@@ -2272,32 +2284,32 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* add$pack $GRi,$GRj,$GRk */
{
FRV_INSN_ADD, "add", "add", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* sub$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SUB, "sub", "sub", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* and$pack $GRi,$GRj,$GRk */
{
FRV_INSN_AND, "and", "and", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* or$pack $GRi,$GRj,$GRk */
{
FRV_INSN_OR, "or", "or", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* xor$pack $GRi,$GRj,$GRk */
{
FRV_INSN_XOR, "xor", "xor", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* not$pack $GRj,$GRk */
{
FRV_INSN_NOT, "not", "not", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* sdiv$pack $GRi,$GRj,$GRk */
{
@@ -2332,52 +2344,52 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* sll$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SLL, "sll", "sll", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* srl$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SRL, "srl", "srl", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* sra$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SRA, "sra", "sra", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* scan$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SCAN, "scan", "scan", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cadd$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CADD, "cadd", "cadd", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csub$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSUB, "csub", "csub", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cand$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CAND, "cand", "cand", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cor$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_COR, "cor", "cor", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cxor$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CXOR, "cxor", "cxor", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cnot$pack $GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CNOT, "cnot", "cnot", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csmul$pack $GRi,$GRj,$GRdoublek,$CCi,$cond */
{
@@ -2397,62 +2409,62 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* csll$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSLL, "csll", "csll", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csrl$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSRL, "csrl", "csrl", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csra$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSRA, "csra", "csra", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cscan$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSCAN, "cscan", "cscan", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* addcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ADDCC, "addcc", "addcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* subcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SUBCC, "subcc", "subcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* andcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ANDCC, "andcc", "andcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* orcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ORCC, "orcc", "orcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* xorcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_XORCC, "xorcc", "xorcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* sllcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SLLCC, "sllcc", "sllcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* srlcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SRLCC, "srlcc", "srlcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* sracc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SRACC, "sracc", "sracc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* smulcc$pack $GRi,$GRj,$GRdoublek,$ICCi_1 */
{
@@ -2467,12 +2479,12 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* caddcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CADDCC, "caddcc", "caddcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csubcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSUBCC, "csubcc", "csubcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csmulcc$pack $GRi,$GRj,$GRdoublek,$CCi,$cond */
{
@@ -2482,77 +2494,77 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* candcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CANDCC, "candcc", "candcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* corcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CORCC, "corcc", "corcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cxorcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CXORCC, "cxorcc", "cxorcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csllcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSLLCC, "csllcc", "csllcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csrlcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSRLCC, "csrlcc", "csrlcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* csracc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSRACC, "csracc", "csracc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* addx$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ADDX, "addx", "addx", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* subx$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SUBX, "subx", "subx", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* addxcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ADDXCC, "addxcc", "addxcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* subxcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SUBXCC, "subxcc", "subxcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* addi$pack $GRi,$s12,$GRk */
{
FRV_INSN_ADDI, "addi", "addi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* subi$pack $GRi,$s12,$GRk */
{
FRV_INSN_SUBI, "subi", "subi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* andi$pack $GRi,$s12,$GRk */
{
FRV_INSN_ANDI, "andi", "andi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* ori$pack $GRi,$s12,$GRk */
{
FRV_INSN_ORI, "ori", "ori", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* xori$pack $GRi,$s12,$GRk */
{
FRV_INSN_XORI, "xori", "xori", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* sdivi$pack $GRi,$s12,$GRk */
{
@@ -2587,47 +2599,47 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* slli$pack $GRi,$s12,$GRk */
{
FRV_INSN_SLLI, "slli", "slli", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* srli$pack $GRi,$s12,$GRk */
{
FRV_INSN_SRLI, "srli", "srli", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* srai$pack $GRi,$s12,$GRk */
{
FRV_INSN_SRAI, "srai", "srai", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* scani$pack $GRi,$s12,$GRk */
{
FRV_INSN_SCANI, "scani", "scani", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* addicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ADDICC, "addicc", "addicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* subicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SUBICC, "subicc", "subicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* andicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ANDICC, "andicc", "andicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* oricc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ORICC, "oricc", "oricc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* xoricc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_XORICC, "xoricc", "xoricc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* smulicc$pack $GRi,$s10,$GRdoublek,$ICCi_1 */
{
@@ -2642,62 +2654,62 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* sllicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SLLICC, "sllicc", "sllicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* srlicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SRLICC, "srlicc", "srlicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* sraicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SRAICC, "sraicc", "sraicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* addxi$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ADDXI, "addxi", "addxi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* subxi$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SUBXI, "subxi", "subxi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* addxicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ADDXICC, "addxicc", "addxicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* subxicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SUBXICC, "subxicc", "subxicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cmpb$pack $GRi,$GRj,$ICCi_1 */
{
FRV_INSN_CMPB, "cmpb", "cmpb", 32,
- { 0, { (1<<MACH_FR400), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE } }
},
/* cmpba$pack $GRi,$GRj,$ICCi_1 */
{
FRV_INSN_CMPBA, "cmpba", "cmpba", 32,
- { 0, { (1<<MACH_FR400), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE } }
},
/* setlo$pack $ulo16,$GRklo */
{
FRV_INSN_SETLO, "setlo", "setlo", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* sethi$pack $uhi16,$GRkhi */
{
FRV_INSN_SETHI, "sethi", "sethi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* setlos$pack $slo16,$GRk */
{
FRV_INSN_SETLOS, "setlos", "setlos", 32,
- { 0, { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* ldsb$pack @($GRi,$GRj),$GRk */
{
@@ -3092,182 +3104,182 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* stb$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STB, "stb", "stb", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* sth$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STH, "sth", "sth", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* st$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_ST, "st", "st", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stbf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STBF, "stbf", "stbf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* sthf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STHF, "sthf", "sthf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STF, "stf", "stf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stc$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STC, "stc", "stc", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* rstb$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RSTB, "rstb", "rstb", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* rsth$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RSTH, "rsth", "rsth", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* rst$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RST, "rst", "rst", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* rstbf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_RSTBF, "rstbf", "rstbf", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* rsthf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_RSTHF, "rsthf", "rsthf", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* rstf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_RSTF, "rstf", "rstf", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* std$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STD, "std", "std", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stdf$pack $FRk,@($GRi,$GRj) */
{
FRV_INSN_STDF, "stdf", "stdf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stdc$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STDC, "stdc", "stdc", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* rstd$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RSTD, "rstd", "rstd", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* rstdf$pack $FRk,@($GRi,$GRj) */
{
FRV_INSN_RSTDF, "rstdf", "rstdf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* stq$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STQ, "stq", "stq", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* stqf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STQF, "stqf", "stqf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* stqc$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STQC, "stqc", "stqc", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* rstq$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RSTQ, "rstq", "rstq", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* rstqf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_RSTQF, "rstqf", "rstqf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* stbu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STBU, "stbu", "stbu", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* sthu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STHU, "sthu", "sthu", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STU, "stu", "stu", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stbfu$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STBFU, "stbfu", "stbfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* sthfu$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STHFU, "sthfu", "sthfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stfu$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STFU, "stfu", "stfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stcu$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STCU, "stcu", "stcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stdu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STDU, "stdu", "stdu", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stdfu$pack $FRk,@($GRi,$GRj) */
{
FRV_INSN_STDFU, "stdfu", "stdfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stdcu$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STDCU, "stdcu", "stdcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stqu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STQU, "stqu", "stqu", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* stqfu$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STQFU, "stqfu", "stqfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* stqcu$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STQCU, "stqcu", "stqcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* cldsb$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
@@ -3382,137 +3394,137 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* cstb$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTB, "cstb", "cstb", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* csth$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTH, "csth", "csth", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cst$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CST, "cst", "cst", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstbf$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTBF, "cstbf", "cstbf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* csthf$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTHF, "csthf", "csthf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstf$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTF, "cstf", "cstf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstd$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTD, "cstd", "cstd", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstdf$pack $FRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTDF, "cstdf", "cstdf", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstq$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTQ, "cstq", "cstq", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* cstbu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTBU, "cstbu", "cstbu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* csthu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTHU, "csthu", "csthu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTU, "cstu", "cstu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstbfu$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTBFU, "cstbfu", "cstbfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* csthfu$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTHFU, "csthfu", "csthfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstfu$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTFU, "cstfu", "cstfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstdu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTDU, "cstdu", "cstdu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* cstdfu$pack $FRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTDFU, "cstdfu", "cstdfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stbi$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STBI, "stbi", "stbi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* sthi$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STHI, "sthi", "sthi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* sti$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STI, "sti", "sti", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stbfi$pack $FRintk,@($GRi,$d12) */
{
FRV_INSN_STBFI, "stbfi", "stbfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* sthfi$pack $FRintk,@($GRi,$d12) */
{
FRV_INSN_STHFI, "sthfi", "sthfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stfi$pack $FRintk,@($GRi,$d12) */
{
FRV_INSN_STFI, "stfi", "stfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stdi$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STDI, "stdi", "stdi", 32,
- { 0, { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stdfi$pack $FRk,@($GRi,$d12) */
{
FRV_INSN_STDFI, "stdfi", "stdfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
},
/* stqi$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STQI, "stqi", "stqi", 32,
- { 0, { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* stqfi$pack $FRintk,@($GRi,$d12) */
{
FRV_INSN_STQFI, "stqfi", "stqfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
},
/* swap$pack @($GRi,$GRj),$GRk */
{
@@ -4877,7 +4889,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* dcpl$pack $GRi,$GRj,$lock */
{
FRV_INSN_DCPL, "dcpl", "dcpl", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_DCPL, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
},
/* icul$pack $GRi */
{
@@ -4952,62 +4964,62 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* fitos$pack $FRintj,$FRk */
{
FRV_INSN_FITOS, "fitos", "fitos", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fstoi$pack $FRj,$FRintk */
{
FRV_INSN_FSTOI, "fstoi", "fstoi", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fitod$pack $FRintj,$FRdoublek */
{
FRV_INSN_FITOD, "fitod", "fitod", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fdtoi$pack $FRdoublej,$FRintk */
{
FRV_INSN_FDTOI, "fdtoi", "fdtoi", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fditos$pack $FRintj,$FRk */
{
FRV_INSN_FDITOS, "fditos", "fditos", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fdstoi$pack $FRj,$FRintk */
{
FRV_INSN_FDSTOI, "fdstoi", "fdstoi", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* nfditos$pack $FRintj,$FRk */
{
FRV_INSN_NFDITOS, "nfditos", "nfditos", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* nfdstoi$pack $FRj,$FRintk */
{
FRV_INSN_NFDSTOI, "nfdstoi", "nfdstoi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* cfitos$pack $FRintj,$FRk,$CCi,$cond */
{
FRV_INSN_CFITOS, "cfitos", "cfitos", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* cfstoi$pack $FRj,$FRintk,$CCi,$cond */
{
FRV_INSN_CFSTOI, "cfstoi", "cfstoi", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* nfitos$pack $FRintj,$FRk */
{
FRV_INSN_NFITOS, "nfitos", "nfitos", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* nfstoi$pack $FRj,$FRintk */
{
FRV_INSN_NFSTOI, "nfstoi", "nfstoi", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fmovs$pack $FRj,$FRk */
{
@@ -5022,7 +5034,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* fdmovs$pack $FRj,$FRk */
{
FRV_INSN_FDMOVS, "fdmovs", "fdmovs", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* cfmovs$pack $FRj,$FRk,$CCi,$cond */
{
@@ -5032,42 +5044,42 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* fnegs$pack $FRj,$FRk */
{
FRV_INSN_FNEGS, "fnegs", "fnegs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fnegd$pack $FRdoublej,$FRdoublek */
{
FRV_INSN_FNEGD, "fnegd", "fnegd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fdnegs$pack $FRj,$FRk */
{
FRV_INSN_FDNEGS, "fdnegs", "fdnegs", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* cfnegs$pack $FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFNEGS, "cfnegs", "cfnegs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fabss$pack $FRj,$FRk */
{
FRV_INSN_FABSS, "fabss", "fabss", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fabsd$pack $FRdoublej,$FRdoublek */
{
FRV_INSN_FABSD, "fabsd", "fabsd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fdabss$pack $FRj,$FRk */
{
FRV_INSN_FDABSS, "fdabss", "fdabss", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* cfabss$pack $FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFABSS, "cfabss", "cfabss", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
},
/* fsqrts$pack $FRj,$FRk */
{
@@ -5102,12 +5114,12 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* fadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FADDS, "fadds", "fadds", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* fsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FSUBS, "fsubs", "fsubs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* fmuls$pack $FRi,$FRj,$FRk */
{
@@ -5122,32 +5134,32 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* faddd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FADDD, "faddd", "faddd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* fsubd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FSUBD, "fsubd", "fsubd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* fmuld$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FMULD, "fmuld", "fmuld", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_3 } }
},
/* fdivd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FDIVD, "fdivd", "fdivd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
},
/* cfadds$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFADDS, "cfadds", "cfadds", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* cfsubs$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFSUBS, "cfsubs", "cfsubs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* cfmuls$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
@@ -5162,12 +5174,12 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* nfadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFADDS, "nfadds", "nfadds", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* nfsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFSUBS, "nfsubs", "nfsubs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* nfmuls$pack $FRi,$FRj,$FRk */
{
@@ -5182,72 +5194,72 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* fcmps$pack $FRi,$FRj,$FCCi_2 */
{
FRV_INSN_FCMPS, "fcmps", "fcmps", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* fcmpd$pack $FRdoublei,$FRdoublej,$FCCi_2 */
{
FRV_INSN_FCMPD, "fcmpd", "fcmpd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* cfcmps$pack $FRi,$FRj,$FCCi_2,$CCi,$cond */
{
FRV_INSN_CFCMPS, "cfcmps", "cfcmps", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
},
/* fdcmps$pack $FRi,$FRj,$FCCi_2 */
{
FRV_INSN_FDCMPS, "fdcmps", "fdcmps", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
},
/* fmadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMADDS, "fmadds", "fmadds", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* fmsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMSUBS, "fmsubs", "fmsubs", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* fmaddd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FMADDD, "fmaddd", "fmaddd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* fmsubd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FMSUBD, "fmsubd", "fmsubd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* fdmadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDMADDS, "fdmadds", "fdmadds", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* nfdmadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDMADDS, "nfdmadds", "nfdmadds", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* cfmadds$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFMADDS, "cfmadds", "cfmadds", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* cfmsubs$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFMSUBS, "cfmsubs", "cfmsubs", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* nfmadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFMADDS, "nfmadds", "nfmadds", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* nfmsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFMSUBS, "nfmsubs", "nfmsubs", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
},
/* fmas$pack $FRi,$FRj,$FRk */
{
@@ -5377,72 +5389,72 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* mhsetlos$pack $u12,$FRklo */
{
FRV_INSN_MHSETLOS, "mhsetlos", "mhsetlos", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* mhsethis$pack $u12,$FRkhi */
{
FRV_INSN_MHSETHIS, "mhsethis", "mhsethis", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* mhdsets$pack $u12,$FRintk */
{
FRV_INSN_MHDSETS, "mhdsets", "mhdsets", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* mhsetloh$pack $s5,$FRklo */
{
FRV_INSN_MHSETLOH, "mhsetloh", "mhsetloh", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* mhsethih$pack $s5,$FRkhi */
{
FRV_INSN_MHSETHIH, "mhsethih", "mhsethih", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* mhdseth$pack $s5,$FRintk */
{
FRV_INSN_MHDSETH, "mhdseth", "mhdseth", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* mand$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MAND, "mand", "mand", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mor$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MOR, "mor", "mor", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mxor$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MXOR, "mxor", "mxor", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* cmand$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMAND, "cmand", "cmand", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* cmor$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMOR, "cmor", "cmor", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* cmxor$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMXOR, "cmxor", "cmxor", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mnot$pack $FRintj,$FRintk */
{
FRV_INSN_MNOT, "mnot", "mnot", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* cmnot$pack $FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMNOT, "cmnot", "cmnot", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mrotli$pack $FRinti,$u6,$FRintk */
{
@@ -5487,12 +5499,12 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* mdcutssi$pack $ACC40Si,$s6,$FRintkeven */
{
FRV_INSN_MDCUTSSI, "mdcutssi", "mdcutssi", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* maveh$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MAVEH, "maveh", "maveh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* msllhi$pack $FRinti,$u6,$FRintk */
{
@@ -5512,342 +5524,342 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* mdrotli$pack $FRintieven,$s6,$FRintkeven */
{
FRV_INSN_MDROTLI, "mdrotli", "mdrotli", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* mcplhi$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MCPLHI, "mcplhi", "mcplhi", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* mcpli$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MCPLI, "mcpli", "mcpli", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* msaths$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MSATHS, "msaths", "msaths", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSATHS, "mqsaths", "mqsaths", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* msathu$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MSATHU, "msathu", "msathu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mcmpsh$pack $FRinti,$FRintj,$FCCk */
{
FRV_INSN_MCMPSH, "mcmpsh", "mcmpsh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mcmpuh$pack $FRinti,$FRintj,$FCCk */
{
FRV_INSN_MCMPUH, "mcmpuh", "mcmpuh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mabshs$pack $FRintj,$FRintk */
{
FRV_INSN_MABSHS, "mabshs", "mabshs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* maddhss$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MADDHSS, "maddhss", "maddhss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* maddhus$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MADDHUS, "maddhus", "maddhus", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* msubhss$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MSUBHSS, "msubhss", "msubhss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* msubhus$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MSUBHUS, "msubhus", "msubhus", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* cmaddhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMADDHSS, "cmaddhss", "cmaddhss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* cmaddhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMADDHUS, "cmaddhus", "cmaddhus", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* cmsubhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMSUBHSS, "cmsubhss", "cmsubhss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* cmsubhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMSUBHUS, "cmsubhus", "cmsubhus", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
/* mqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQADDHSS, "mqaddhss", "mqaddhss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
/* mqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQADDHUS, "mqaddhus", "mqaddhus", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
/* mqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSUBHSS, "mqsubhss", "mqsubhss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
/* mqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSUBHUS, "mqsubhus", "mqsubhus", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
/* cmqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQADDHSS, "cmqaddhss", "cmqaddhss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
/* cmqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQADDHUS, "cmqaddhus", "cmqaddhus", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
/* cmqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQSUBHSS, "cmqsubhss", "cmqsubhss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
/* cmqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQSUBHUS, "cmqsubhus", "cmqsubhus", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
/* maddaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MADDACCS, "maddaccs", "maddaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* msubaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MSUBACCS, "msubaccs", "msubaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* mdaddaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MDADDACCS, "mdaddaccs", "mdaddaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* mdsubaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MDSUBACCS, "mdsubaccs", "mdsubaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* masaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MASACCS, "masaccs", "masaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
},
/* mdasaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MDASACCS, "mdasaccs", "mdasaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* mmulhs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMULHS, "mmulhs", "mmulhs", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mmulhu$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMULHU, "mmulhu", "mmulhu", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mmulxhs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMULXHS, "mmulxhs", "mmulxhs", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mmulxhu$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMULXHU, "mmulxhu", "mmulxhu", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* cmmulhs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMMULHS, "cmmulhs", "cmmulhs", 32,
- { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* cmmulhu$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMMULHU, "cmmulhu", "cmmulhu", 32,
- { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULHS, "mqmulhs", "mqmulhs", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULHU, "mqmulhu", "mqmulhu", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mqmulxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULXHS, "mqmulxhs", "mqmulxhs", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mqmulxhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULXHU, "mqmulxhu", "mqmulxhu", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* cmqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMULHS, "cmqmulhs", "cmqmulhs", 32,
- { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* cmqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMULHU, "cmqmulhu", "cmqmulhu", 32,
- { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mmachs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMACHS, "mmachs", "mmachs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mmachu$pack $FRinti,$FRintj,$ACC40Uk */
{
FRV_INSN_MMACHU, "mmachu", "mmachu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mmrdhs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMRDHS, "mmrdhs", "mmrdhs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mmrdhu$pack $FRinti,$FRintj,$ACC40Uk */
{
FRV_INSN_MMRDHU, "mmrdhu", "mmrdhu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* cmmachs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMMACHS, "cmmachs", "cmmachs", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* cmmachu$pack $FRinti,$FRintj,$ACC40Uk,$CCi,$cond */
{
FRV_INSN_CMMACHU, "cmmachu", "cmmachu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMACHS, "mqmachs", "mqmachs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk */
{
FRV_INSN_MQMACHU, "mqmachu", "mqmachu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* cmqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMACHS, "cmqmachs", "cmqmachs", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* cmqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk,$CCi,$cond */
{
FRV_INSN_CMQMACHU, "cmqmachu", "cmqmachu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mqxmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQXMACHS, "mqxmachs", "mqxmachs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* mqxmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQXMACXHS, "mqxmacxhs", "mqxmacxhs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* mqmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMACXHS, "mqmacxhs", "mqmacxhs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
/* mcpxrs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MCPXRS, "mcpxrs", "mcpxrs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mcpxru$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MCPXRU, "mcpxru", "mcpxru", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mcpxis$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MCPXIS, "mcpxis", "mcpxis", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mcpxiu$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MCPXIU, "mcpxiu", "mcpxiu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* cmcpxrs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMCPXRS, "cmcpxrs", "cmcpxrs", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* cmcpxru$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMCPXRU, "cmcpxru", "cmcpxru", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* cmcpxis$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMCPXIS, "cmcpxis", "cmcpxis", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* cmcpxiu$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMCPXIU, "cmcpxiu", "cmcpxiu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
/* mqcpxrs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXRS, "mqcpxrs", "mqcpxrs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mqcpxru$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXRU, "mqcpxru", "mqcpxru", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mqcpxis$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXIS, "mqcpxis", "mqcpxis", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mqcpxiu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXIU, "mqcpxiu", "mqcpxiu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
/* mexpdhw$pack $FRinti,$u6,$FRintk */
{
@@ -5919,10 +5931,20 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMBTOHE, "cmbtohe", "cmbtohe", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7 } }
},
-/* mclracc$pack $ACC40Sk,$A */
+/* mnop$pack */
+ {
+ FRV_INSN_MNOP, "mnop", "mnop", 32,
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ },
+/* mclracc$pack $ACC40Sk,$A0 */
+ {
+ FRV_INSN_MCLRACC_0, "mclracc-0", "mclracc", 32,
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_3 } }
+ },
+/* mclracc$pack $ACC40Sk,$A1 */
{
- FRV_INSN_MCLRACC, "mclracc", "mclracc", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_3 } }
+ FRV_INSN_MCLRACC_1, "mclracc-1", "mclracc", 32,
+ { 0, { (1<<MACH_BASE), UNIT_MCLRACC_1, FR400_MAJOR_M_2, FR500_MAJOR_M_6 } }
},
/* mrdacc$pack $ACC40Si,$FRintk */
{
@@ -5957,7 +5979,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* fnop$pack */
{
FRV_INSN_FNOP, "fnop", "fnop", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_8 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_8 } }
},
};
diff --git a/opcodes/frv-desc.h b/opcodes/frv-desc.h
index a169e7a609..5e6b061d41 100644
--- a/opcodes/frv-desc.h
+++ b/opcodes/frv-desc.h
@@ -541,9 +541,11 @@ typedef enum isa_attr {
/* Enum declaration for parallel execution pipeline selection. */
typedef enum unit_attr {
UNIT_NIL, UNIT_I0, UNIT_I1, UNIT_I01
- , UNIT_FM0, UNIT_FM1, UNIT_FM01, UNIT_B0
- , UNIT_B1, UNIT_B01, UNIT_C, UNIT_MULT_DIV
- , UNIT_LOAD, UNIT_NUM_UNITS
+ , UNIT_IALL, UNIT_FM0, UNIT_FM1, UNIT_FM01
+ , UNIT_FMALL, UNIT_FMLOW, UNIT_B0, UNIT_B1
+ , UNIT_B01, UNIT_C, UNIT_MULT_DIV, UNIT_LOAD
+ , UNIT_STORE, UNIT_SCAN, UNIT_DCPL, UNIT_MDUALACC
+ , UNIT_MCLRACC_1, UNIT_NUM_UNITS
} UNIT_ATTR;
/* Enum declaration for fr400 major insn categories. */
@@ -676,17 +678,17 @@ typedef enum cgen_operand_type {
, FRV_OPERAND_U16, FRV_OPERAND_S16, FRV_OPERAND_S6, FRV_OPERAND_S6_1
, FRV_OPERAND_U6, FRV_OPERAND_S5, FRV_OPERAND_COND, FRV_OPERAND_CCOND
, FRV_OPERAND_HINT, FRV_OPERAND_HINT_TAKEN, FRV_OPERAND_HINT_NOT_TAKEN, FRV_OPERAND_LI
- , FRV_OPERAND_LOCK, FRV_OPERAND_DEBUG, FRV_OPERAND_A, FRV_OPERAND_AE
- , FRV_OPERAND_LABEL16, FRV_OPERAND_LABEL24, FRV_OPERAND_FRINTIEVEN, FRV_OPERAND_FRINTJEVEN
- , FRV_OPERAND_FRINTKEVEN, FRV_OPERAND_D12, FRV_OPERAND_S12, FRV_OPERAND_U12
- , FRV_OPERAND_SPR, FRV_OPERAND_ULO16, FRV_OPERAND_SLO16, FRV_OPERAND_UHI16
- , FRV_OPERAND_PSR_ESR, FRV_OPERAND_PSR_S, FRV_OPERAND_PSR_PS, FRV_OPERAND_PSR_ET
- , FRV_OPERAND_BPSR_BS, FRV_OPERAND_BPSR_BET, FRV_OPERAND_TBR_TBA, FRV_OPERAND_TBR_TT
- , FRV_OPERAND_MAX
+ , FRV_OPERAND_LOCK, FRV_OPERAND_DEBUG, FRV_OPERAND_AE, FRV_OPERAND_LABEL16
+ , FRV_OPERAND_LABEL24, FRV_OPERAND_A0, FRV_OPERAND_A1, FRV_OPERAND_FRINTIEVEN
+ , FRV_OPERAND_FRINTJEVEN, FRV_OPERAND_FRINTKEVEN, FRV_OPERAND_D12, FRV_OPERAND_S12
+ , FRV_OPERAND_U12, FRV_OPERAND_SPR, FRV_OPERAND_ULO16, FRV_OPERAND_SLO16
+ , FRV_OPERAND_UHI16, FRV_OPERAND_PSR_ESR, FRV_OPERAND_PSR_S, FRV_OPERAND_PSR_PS
+ , FRV_OPERAND_PSR_ET, FRV_OPERAND_BPSR_BS, FRV_OPERAND_BPSR_BET, FRV_OPERAND_TBR_TBA
+ , FRV_OPERAND_TBR_TT, FRV_OPERAND_MAX
} CGEN_OPERAND_TYPE;
/* Number of operands types. */
-#define MAX_OPERANDS 80
+#define MAX_OPERANDS 81
/* Maximum number of operands referenced by any insn. */
#define MAX_OPERAND_INSTANCES 8
diff --git a/opcodes/frv-dis.c b/opcodes/frv-dis.c
index dfe053d5c1..b0f51bce0a 100644
--- a/opcodes/frv-dis.c
+++ b/opcodes/frv-dis.c
@@ -41,21 +41,20 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define UNKNOWN_INSN_MSG _("*unknown*")
static void print_normal
- PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
static void print_address
- PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
static void print_keyword
- PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
static void print_insn_normal
- PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
- bfd_vma, int));
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
static int print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned);
static int default_print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
static int read_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
- CGEN_EXTRACT_INFO *, unsigned long *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
/* -- disassembler routines inserted here */
@@ -152,8 +151,11 @@ frv_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
switch (opindex)
{
- case FRV_OPERAND_A :
- print_normal (cd, info, fields->f_A, 0|(1<<CGEN_OPERAND_HASH_PREFIX), pc, length);
+ case FRV_OPERAND_A0 :
+ print_normal (cd, info, fields->f_A, 0, pc, length);
+ break;
+ case FRV_OPERAND_A1 :
+ print_normal (cd, info, fields->f_A, 0, pc, length);
break;
case FRV_OPERAND_ACC40SI :
print_keyword (cd, info, & frv_cgen_opval_acc_names, fields->f_ACC40Si, 0);
@@ -394,13 +396,12 @@ frv_cgen_init_dis (cd)
/* Default print handler. */
static void
-print_normal (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- long value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -420,13 +421,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
/* Default address handler. */
static void
-print_address (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- bfd_vma value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -450,12 +450,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
/* Keyword print handler. */
static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- CGEN_KEYWORD *keyword_table;
- long value;
- unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
const CGEN_KEYWORD_ENTRY *ke;
@@ -469,17 +468,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
/* Default insn printer.
- DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
about disassemble_info. */
static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
- CGEN_CPU_DESC cd;
- PTR dis_info;
- const CGEN_INSN *insn;
- CGEN_FIELDS *fields;
- bfd_vma pc;
- int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
disassemble_info *info = (disassemble_info *) dis_info;
@@ -511,14 +509,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- int buflen;
- CGEN_EXTRACT_INFO *ex_info;
- unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
{
int status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
@@ -542,12 +539,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
been called). */
static int
-print_insn (cd, pc, info, buf, buflen)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ unsigned int buflen)
{
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
@@ -652,10 +648,7 @@ print_insn (cd, pc, info, buf, buflen)
#endif
static int
-default_print_insn (cd, pc, info)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
char buf[CGEN_MAX_INSN_SIZE];
int buflen;
@@ -694,9 +687,7 @@ typedef struct cpu_desc_list {
} cpu_desc_list;
int
-print_insn_frv (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_frv (bfd_vma pc, disassemble_info *info)
{
static cpu_desc_list *cd_list = 0;
cpu_desc_list *cl = 0;
diff --git a/opcodes/frv-ibld.c b/opcodes/frv-ibld.c
index bac1837e1b..565f4f49a0 100644
--- a/opcodes/frv-ibld.c
+++ b/opcodes/frv-ibld.c
@@ -44,30 +44,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define FLD(f) (fields->f)
static const char * insert_normal
- PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
static const char * insert_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
static int extract_normal
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- unsigned int, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, bfd_vma, long *));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
static int extract_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
#if CGEN_INT_INSN_P
static void put_insn_int_value
- PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
#endif
#if ! CGEN_INT_INSN_P
static CGEN_INLINE void insert_1
- PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
static CGEN_INLINE int fill_cache
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
static CGEN_INLINE long extract_1
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
- unsigned char *, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
#endif
/* Operand insertion. */
@@ -77,11 +76,12 @@ static CGEN_INLINE long extract_1
/* Subroutine of insert_normal. */
static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
- CGEN_CPU_DESC cd;
- unsigned long value;
- int start,length,word_length;
- unsigned char *bufp;
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
{
unsigned long x,mask;
int shift;
@@ -118,13 +118,15 @@ insert_1 (cd, value, start, length, word_length, bufp)
necessary. */
static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
- total_length, buffer)
- CGEN_CPU_DESC cd;
- long value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
- CGEN_INSN_BYTES_PTR buffer;
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
{
static char errbuf[100];
/* Written this way to avoid undefined behaviour. */
@@ -232,12 +234,11 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
The result is an error message or NULL if success. */
static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insn;
- CGEN_FIELDS * fields;
- CGEN_INSN_BYTES_PTR buffer;
- bfd_vma pc;
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
unsigned long value;
@@ -288,12 +289,11 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
-put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_INSN_BYTES_PTR buf;
- int length;
- int insn_length;
- CGEN_INSN_INT value;
+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
{
/* For architectures with insns smaller than the base-insn-bitsize,
length may be too big. */
@@ -320,11 +320,11 @@ put_insn_int_value (cd, buf, length, insn_length, value)
Returns 1 for success, 0 for failure. */
static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_EXTRACT_INFO *ex_info;
- int offset, bytes;
- bfd_vma pc;
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
@@ -364,12 +364,13 @@ fill_cache (cd, ex_info, offset, bytes, pc)
/* Subroutine of extract_normal. */
static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
- CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
- int start,length,word_length;
- unsigned char *bufp;
- bfd_vma pc ATTRIBUTE_UNUSED;
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
{
unsigned long x;
int shift;
@@ -408,23 +409,25 @@ extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
necessary. */
static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
- word_length, total_length, pc, valuep)
- CGEN_CPU_DESC cd;
+extract_normal (CGEN_CPU_DESC cd,
#if ! CGEN_INT_INSN_P
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info,
#else
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
#endif
- CGEN_INSN_INT insn_value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
#if ! CGEN_INT_INSN_P
- bfd_vma pc;
+ bfd_vma pc,
#else
- bfd_vma pc ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED,
#endif
- long *valuep;
+ long *valuep)
{
long value, mask;
@@ -505,13 +508,12 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
been called). */
static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_EXTRACT_INFO *ex_info;
- CGEN_INSN_INT insn_value;
- CGEN_FIELDS *fields;
- bfd_vma pc;
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
const CGEN_SYNTAX_CHAR_TYPE *syn;
@@ -569,7 +571,10 @@ frv_cgen_insert_operand (cd, opindex, fields, buffer, pc)
switch (opindex)
{
- case FRV_OPERAND_A :
+ case FRV_OPERAND_A0 :
+ errmsg = insert_normal (cd, fields->f_A, 0, 0, 17, 1, 32, total_length, buffer);
+ break;
+ case FRV_OPERAND_A1 :
errmsg = insert_normal (cd, fields->f_A, 0, 0, 17, 1, 32, total_length, buffer);
break;
case FRV_OPERAND_ACC40SI :
@@ -868,7 +873,10 @@ frv_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
switch (opindex)
{
- case FRV_OPERAND_A :
+ case FRV_OPERAND_A0 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_A);
+ break;
+ case FRV_OPERAND_A1 :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_A);
break;
case FRV_OPERAND_ACC40SI :
@@ -1156,7 +1164,10 @@ frv_cgen_get_int_operand (cd, opindex, fields)
switch (opindex)
{
- case FRV_OPERAND_A :
+ case FRV_OPERAND_A0 :
+ value = fields->f_A;
+ break;
+ case FRV_OPERAND_A1 :
value = fields->f_A;
break;
case FRV_OPERAND_ACC40SI :
@@ -1390,7 +1401,10 @@ frv_cgen_get_vma_operand (cd, opindex, fields)
switch (opindex)
{
- case FRV_OPERAND_A :
+ case FRV_OPERAND_A0 :
+ value = fields->f_A;
+ break;
+ case FRV_OPERAND_A1 :
value = fields->f_A;
break;
case FRV_OPERAND_ACC40SI :
@@ -1633,7 +1647,10 @@ frv_cgen_set_int_operand (cd, opindex, fields, value)
{
switch (opindex)
{
- case FRV_OPERAND_A :
+ case FRV_OPERAND_A0 :
+ fields->f_A = value;
+ break;
+ case FRV_OPERAND_A1 :
fields->f_A = value;
break;
case FRV_OPERAND_ACC40SI :
@@ -1864,7 +1881,10 @@ frv_cgen_set_vma_operand (cd, opindex, fields, value)
{
switch (opindex)
{
- case FRV_OPERAND_A :
+ case FRV_OPERAND_A0 :
+ fields->f_A = value;
+ break;
+ case FRV_OPERAND_A1 :
fields->f_A = value;
break;
case FRV_OPERAND_ACC40SI :
diff --git a/opcodes/frv-opc.c b/opcodes/frv-opc.c
index de27a43f5a..7143a0e7c0 100644
--- a/opcodes/frv-opc.c
+++ b/opcodes/frv-opc.c
@@ -141,7 +141,7 @@ frv_is_media_insn (const CGEN_INSN *insn)
/* This table represents the allowable packing for vliw insns for the fr400.
The fr400 has only 2 vliw slots. Represent this by not allowing any insns
- in slots 2 and 3.
+ in the extra slots.
Subsets of any given row are also allowed. */
static VLIW_COMBO fr400_allowed_vliw[] =
{
@@ -184,15 +184,23 @@ static CGEN_ATTR_VALUE_TYPE fr400_unit_mapping[] =
/* I0 */ UNIT_I0,
/* I1 */ UNIT_I1,
/* I01 */ UNIT_I01,
+/* IALL */ UNIT_I01, /* only I0 and I1 units */
/* FM0 */ UNIT_FM0,
/* FM1 */ UNIT_FM1,
/* FM01 */ UNIT_FM01,
+/* FMALL */ UNIT_FM01,/* Only F0,F1,M0,M1 units */
+/* FMLOW */ UNIT_FM0, /* Only F0,M0 units */
/* B0 */ UNIT_B0, /* branches only in B0 unit. */
/* B1 */ UNIT_B0,
/* B01 */ UNIT_B0,
/* C */ UNIT_C,
-/* MULT-DIV */ UNIT_I0, /* multiply and divide only in I0 unit. */
-/* LOAD */ UNIT_I0 /* load only in I0 unit. */
+/* MULT-DIV */ UNIT_I0, /* multiply and divide only in I0 unit. */
+/* LOAD */ UNIT_I0, /* load only in I0 unit. */
+/* STORE */ UNIT_I0, /* store only in I0 unit. */
+/* SCAN */ UNIT_I0, /* scan only in I0 unit. */
+/* DCPL */ UNIT_C, /* dcpl only in C unit. */
+/* MDUALACC */ UNIT_FM0, /* media dual acc insn only in FM0 unit. */
+/* MCLRACC-1*/ UNIT_FM0 /* mclracc,A==1 insn only in FM0 unit. */
};
static CGEN_ATTR_VALUE_TYPE fr500_unit_mapping[] =
@@ -202,15 +210,23 @@ static CGEN_ATTR_VALUE_TYPE fr500_unit_mapping[] =
/* I0 */ UNIT_I0,
/* I1 */ UNIT_I1,
/* I01 */ UNIT_I01,
+/* IALL */ UNIT_I01, /* only I0 and I1 units */
/* FM0 */ UNIT_FM0,
/* FM1 */ UNIT_FM1,
/* FM01 */ UNIT_FM01,
+/* FMALL */ UNIT_FM01,/* Only F0,F1,M0,M1 units */
+/* FMLOW */ UNIT_FM0, /* Only F0,M0 units */
/* B0 */ UNIT_B0,
/* B1 */ UNIT_B1,
/* B01 */ UNIT_B01,
/* C */ UNIT_C,
/* MULT-DIV */ UNIT_I01, /* multiply and divide in I0 or I1 unit. */
-/* LOAD */ UNIT_I01 /* load in I0 or I1 unit. */
+/* LOAD */ UNIT_I01, /* load in I0 or I1 unit. */
+/* STORE */ UNIT_I0, /* store only in I0 unit. */
+/* SCAN */ UNIT_I01, /* scan in I0 or I1 unit. */
+/* DCPL */ UNIT_C, /* dcpl only in C unit. */
+/* MDUALACC */ UNIT_FM0, /* media dual acc insn only in FM0 unit. */
+/* MCLRACC-1*/ UNIT_FM01 /* mclracc,A==1 in FM0 or FM1 unit. */
};
void
@@ -493,10 +509,15 @@ frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn)
if (unit == UNIT_NIL)
abort (); /* no UNIT specified for this insn in frv.cpu */
- if (vliw->mach == bfd_mach_fr400)
- major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR);
- else
- major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR);
+ switch (vliw->mach)
+ {
+ case bfd_mach_fr400:
+ major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR);
+ break;
+ default:
+ major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR);
+ break;
+ }
if (index <= 0)
{
@@ -1133,8 +1154,12 @@ static const CGEN_IFMT ifmt_cmbtohe = {
32, 32, 0x1fff0c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
};
-static const CGEN_IFMT ifmt_mclracc = {
- 32, 32, 0x1fdffff, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_A) }, { F (F_MISC_NULL_10) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
+static const CGEN_IFMT ifmt_mnop = {
+ 32, 32, 0x7fffffff, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_A) }, { F (F_MISC_NULL_10) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mclracc_0 = {
+ 32, 32, 0x1ffffff, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_A) }, { F (F_MISC_NULL_10) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
};
static const CGEN_IFMT ifmt_mrdacc = {
@@ -5560,11 +5585,23 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmbtohe, { 0x1dc0080 }
},
-/* mclracc$pack $ACC40Sk,$A */
+/* mnop$pack */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), 0 } },
+ & ifmt_mnop, { 0x7fee0ec0 }
+ },
+/* mclracc$pack $ACC40Sk,$A0 */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (ACC40SK), ',', OP (A), 0 } },
- & ifmt_mclracc, { 0x1ec0ec0 }
+ { { MNEM, OP (PACK), ' ', OP (ACC40SK), ',', OP (A0), 0 } },
+ & ifmt_mclracc_0, { 0x1ec0ec0 }
+ },
+/* mclracc$pack $ACC40Sk,$A1 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), ' ', OP (ACC40SK), ',', OP (A1), 0 } },
+ & ifmt_mclracc_0, { 0x1ee0ec0 }
},
/* mrdacc$pack $ACC40Si,$FRintk */
{
@@ -5626,10 +5663,6 @@ static const CGEN_IFMT ifmt_nop = {
32, 32, 0x7fffffff, { { F (F_PACK) }, { F (F_GRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_D12) }, { 0 } }
};
-static const CGEN_IFMT ifmt_mnop = {
- 32, 32, 0x7fffffff, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_A) }, { F (F_MISC_NULL_10) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
-};
-
static const CGEN_IFMT ifmt_ret = {
32, 32, 0x7fffffff, { { F (F_PACK) }, { F (F_INT_CC) }, { F (F_ICCI_2_NULL) }, { F (F_OP) }, { F (F_HINT) }, { F (F_OPE3) }, { F (F_CCOND_NULL) }, { F (F_S12_NULL) }, { 0 } }
};
@@ -5678,12 +5711,7 @@ static const CGEN_IBASE frv_cgen_macro_insn_table[] =
/* nop$pack */
{
-1, "nop", "nop", 32,
- { 0|A(ALIAS), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
- },
-/* mnop$pack */
- {
- -1, "mnop", "mnop", 32,
- { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_3 } }
+ { 0|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* ret$pack */
{
@@ -5693,27 +5721,27 @@ static const CGEN_IBASE frv_cgen_macro_insn_table[] =
/* cmp$pack $GRi,$GRj,$ICCi_1 */
{
-1, "cmp", "cmp", 32,
- { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cmpi$pack $GRi,$s10,$ICCi_1 */
{
-1, "cmpi", "cmpi", 32,
- { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* ccmp$pack $GRi,$GRj,$CCi,$cond */
{
-1, "ccmp", "ccmp", 32,
- { 0|A(CONDITIONAL)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* mov$pack $GRi,$GRk */
{
-1, "mov", "mov", 32,
- { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
/* cmov$pack $GRi,$GRk,$CCi,$cond */
{
-1, "cmov", "cmov", 32,
- { 0|A(CONDITIONAL)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_I01, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
},
};
@@ -5727,12 +5755,6 @@ static const CGEN_OPCODE frv_cgen_macro_insn_opcode_table[] =
{ { MNEM, OP (PACK), 0 } },
& ifmt_nop, { 0x880000 }
},
-/* mnop$pack */
- {
- { 0, 0, 0, 0 },
- { { MNEM, OP (PACK), 0 } },
- & ifmt_mnop, { 0x7fee0ec0 }
- },
/* ret$pack */
{
{ 0, 0, 0, 0 },
diff --git a/opcodes/frv-opc.h b/opcodes/frv-opc.h
index 5d23cf9104..eb0b9022b5 100644
--- a/opcodes/frv-opc.h
+++ b/opcodes/frv-opc.h
@@ -244,9 +244,10 @@ typedef enum cgen_insn_type {
, FRV_INSN_MQCPXIU, FRV_INSN_MEXPDHW, FRV_INSN_CMEXPDHW, FRV_INSN_MEXPDHD
, FRV_INSN_CMEXPDHD, FRV_INSN_MPACKH, FRV_INSN_MDPACKH, FRV_INSN_MUNPACKH
, FRV_INSN_MDUNPACKH, FRV_INSN_MBTOH, FRV_INSN_CMBTOH, FRV_INSN_MHTOB
- , FRV_INSN_CMHTOB, FRV_INSN_MBTOHE, FRV_INSN_CMBTOHE, FRV_INSN_MCLRACC
- , FRV_INSN_MRDACC, FRV_INSN_MRDACCG, FRV_INSN_MWTACC, FRV_INSN_MWTACCG
- , FRV_INSN_MCOP1, FRV_INSN_MCOP2, FRV_INSN_FNOP
+ , FRV_INSN_CMHTOB, FRV_INSN_MBTOHE, FRV_INSN_CMBTOHE, FRV_INSN_MNOP
+ , FRV_INSN_MCLRACC_0, FRV_INSN_MCLRACC_1, FRV_INSN_MRDACC, FRV_INSN_MRDACCG
+ , FRV_INSN_MWTACC, FRV_INSN_MWTACCG, FRV_INSN_MCOP1, FRV_INSN_MCOP2
+ , FRV_INSN_FNOP
} CGEN_INSN_TYPE;
/* Index of `invalid' insn place holder. */
diff --git a/opcodes/i370-dis.c b/opcodes/i370-dis.c
index 51c0ff1dd3..0f04f27f6b 100644
--- a/opcodes/i370-dis.c
+++ b/opcodes/i370-dis.c
@@ -1,6 +1,5 @@
-
/* i370-dis.c -- Disassemble Instruction 370 (ESA/390) instructions
- Copyright 1994, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 2000, 2003 Free Software Foundation, Inc.
PowerPC version written by Ian Lance Taylor, Cygnus Support
Rewritten for i370 ESA/390 support by Linas Vepstas <linas@linas.org>
@@ -30,9 +29,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
*/
int
-print_insn_i370 (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
+print_insn_i370 (bfd_vma memaddr, struct disassemble_info *info)
{
bfd_byte buffer[8];
int status;
diff --git a/opcodes/i370-opc.c b/opcodes/i370-opc.c
index 376dd0eaac..4ce7994eea 100644
--- a/opcodes/i370-opc.c
+++ b/opcodes/i370-opc.c
@@ -1,5 +1,5 @@
/* i370-opc.c -- Instruction 370 (ESA/390) architecture opcode list
- Copyright 1994, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1994, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
PowerPC version written by Ian Lance Taylor, Cygnus Support
Rewritten for i370 ESA/390 support by Linas Vepstas <linas@linas.org> 1998, 1999
@@ -36,12 +36,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
file. */
/* Local insertion and extraction functions. */
-static i370_insn_t insert_ss_b2 PARAMS (( i370_insn_t, long, const char **));
-static i370_insn_t insert_ss_d2 PARAMS (( i370_insn_t, long, const char **));
-static i370_insn_t insert_rxf_r3 PARAMS (( i370_insn_t, long, const char **));
-static long extract_ss_b2 PARAMS (( i370_insn_t, int *));
-static long extract_ss_d2 PARAMS (( i370_insn_t, int *));
-static long extract_rxf_r3 PARAMS (( i370_insn_t, int *));
+static i370_insn_t insert_ss_b2 (i370_insn_t, long, const char **);
+static i370_insn_t insert_ss_d2 (i370_insn_t, long, const char **);
+static i370_insn_t insert_rxf_r3 (i370_insn_t, long, const char **);
+static long extract_ss_b2 (i370_insn_t, int *);
+static long extract_ss_d2 (i370_insn_t, int *);
+static long extract_rxf_r3 (i370_insn_t, int *);
/* The operands table.
@@ -231,55 +231,43 @@ const struct i370_operand i370_operands[] =
/*ARGSUSED*/
static i370_insn_t
-insert_ss_b2 (insn, value, errmsg)
- i370_insn_t insn;
- long value;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_ss_b2 (i370_insn_t insn, long value,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
insn.i[1] |= (value & 0xf) << 28;
return insn;
}
static i370_insn_t
-insert_ss_d2 (insn, value, errmsg)
- i370_insn_t insn;
- long value;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_ss_d2 (i370_insn_t insn, long value,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
insn.i[1] |= (value & 0xfff) << 16;
return insn;
}
static i370_insn_t
-insert_rxf_r3 (insn, value, errmsg)
- i370_insn_t insn;
- long value;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_rxf_r3 (i370_insn_t insn, long value,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
insn.i[1] |= (value & 0xf) << 28;
return insn;
}
static long
-extract_ss_b2 (insn, invalid)
- i370_insn_t insn;
- int *invalid ATTRIBUTE_UNUSED;
+extract_ss_b2 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED)
{
return (insn.i[1] >>28) & 0xf;
}
static long
-extract_ss_d2 (insn, invalid)
- i370_insn_t insn;
- int *invalid ATTRIBUTE_UNUSED;
+extract_ss_d2 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED)
{
return (insn.i[1] >>16) & 0xfff;
}
static long
-extract_rxf_r3 (insn, invalid)
- i370_insn_t insn;
- int *invalid ATTRIBUTE_UNUSED;
+extract_rxf_r3 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED)
{
return (insn.i[1] >>28) & 0xf;
}
@@ -831,45 +819,45 @@ const struct i370_opcode i370_opcodes[] = {
{ "xi", 4, {{SI(0x97,0,0,0), 0}}, {{SI_MASK, 0}}, I370, {SI_D1, SI_B1, SI_I2} },
/* S form instructions */
-{ "cfc", 4, {{S(0xb21a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "csch", 4, {{S(0xb230,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
-{ "hsch", 4, {{S(0xb231,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
-{ "ipk", 4, {{S(0xb20b,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
-{ "lfpc", 4, {{S(0xb29d,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} },
-{ "lpsw", 4, {{S(0x8200,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
-{ "msch", 4, {{S(0xb232,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "pc", 4, {{S(0xb218,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "pcf", 4, {{S(0xb218,0,0), 0}}, {{S_MASK, 0}}, IPC, {S_D2, S_B2} },
-{ "ptlb", 4, {{S(0xb20d,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
-{ "rchp", 4, {{S(0xb23b,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
-{ "rp", 4, {{S(0xb277,0,0), 0}}, {{S_MASK, 0}}, IRP, {0} },
-{ "rsch", 4, {{S(0xb238,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
-{ "sac", 4, {{S(0xb219,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "sacf", 4, {{S(0xb279,0,0), 0}}, {{S_MASK, 0}}, ISA, {S_D2, S_B2} },
-{ "sal", 4, {{S(0xb237,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
-{ "schm", 4, {{S(0xb23c,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
-{ "sck", 4, {{S(0xb204,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
-{ "sckc", 4, {{S(0xb206,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "spka", 4, {{S(0xb20a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "spt", 4, {{S(0xb208,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "spx", 4, {{S(0xb210,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "srnm", 4, {{S(0xb299,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} },
-{ "ssch", 4, {{S(0xb233,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "ssm", 4, {{S(0x8000,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
-{ "stap", 4, {{S(0xb212,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "stck", 4, {{S(0xb205,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "stckc", 4, {{S(0xb207,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
-{ "stcps", 4, {{S(0xb23a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "stcrw", 4, {{S(0xb239,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "stfpc", 4, {{S(0xb29c,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} },
-{ "stidp", 4, {{S(0xb202,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
-{ "stpt", 4, {{S(0xb209,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "stpx", 4, {{S(0xb211,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "stsch", 4, {{S(0xb234,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "tpi", 4, {{S(0xb236,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
-{ "trap4", 4, {{S(0xb2ff,0,0), 0}}, {{S_MASK, 0}}, ITR, {S_D2, S_B2} },
-{ "ts", 4, {{S(0x9300,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
-{ "tsch", 4, {{S(0xb235,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "cfc", 4, {{S(0xb21a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "csch", 4, {{S(0xb230,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
+{ "hsch", 4, {{S(0xb231,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
+{ "ipk", 4, {{S(0xb20b,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
+{ "lfpc", 4, {{S(0xb29d,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} },
+{ "lpsw", 4, {{S(0x8200,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
+{ "msch", 4, {{S(0xb232,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "pc", 4, {{S(0xb218,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "pcf", 4, {{S(0xb218,0,0), 0}}, {{S_MASK, 0}}, IPC, {S_D2, S_B2} },
+{ "ptlb", 4, {{S(0xb20d,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
+{ "rchp", 4, {{S(0xb23b,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
+{ "rp", 4, {{S(0xb277,0,0), 0}}, {{S_MASK, 0}}, IRP, {0} },
+{ "rsch", 4, {{S(0xb238,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
+{ "sac", 4, {{S(0xb219,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "sacf", 4, {{S(0xb279,0,0), 0}}, {{S_MASK, 0}}, ISA, {S_D2, S_B2} },
+{ "sal", 4, {{S(0xb237,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
+{ "schm", 4, {{S(0xb23c,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} },
+{ "sck", 4, {{S(0xb204,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
+{ "sckc", 4, {{S(0xb206,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "spka", 4, {{S(0xb20a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "spt", 4, {{S(0xb208,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "spx", 4, {{S(0xb210,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "srnm", 4, {{S(0xb299,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} },
+{ "ssch", 4, {{S(0xb233,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "ssm", 4, {{S(0x8000,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
+{ "stap", 4, {{S(0xb212,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "stck", 4, {{S(0xb205,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "stckc", 4, {{S(0xb207,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
+{ "stcps", 4, {{S(0xb23a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "stcrw", 4, {{S(0xb239,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "stfpc", 4, {{S(0xb29c,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} },
+{ "stidp", 4, {{S(0xb202,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
+{ "stpt", 4, {{S(0xb209,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "stpx", 4, {{S(0xb211,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "stsch", 4, {{S(0xb234,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "tpi", 4, {{S(0xb236,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
+{ "trap4", 4, {{S(0xb2ff,0,0), 0}}, {{S_MASK, 0}}, ITR, {S_D2, S_B2} },
+{ "ts", 4, {{S(0x9300,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} },
+{ "tsch", 4, {{S(0xb235,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} },
/* SS form instructions */
{ "ap", 6, {{SSH(0xfa,0,0,0), 0}}, {{SS_MASK, 0}}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} },
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 7c03205a19..0ef57efb93 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -48,53 +48,53 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define UNIXWARE_COMPAT 1
#endif
-static int fetch_data PARAMS ((struct disassemble_info *, bfd_byte *));
-static void ckprefix PARAMS ((void));
-static const char *prefix_name PARAMS ((int, int));
-static int print_insn PARAMS ((bfd_vma, disassemble_info *));
-static void dofloat PARAMS ((int));
-static void OP_ST PARAMS ((int, int));
-static void OP_STi PARAMS ((int, int));
-static int putop PARAMS ((const char *, int));
-static void oappend PARAMS ((const char *));
-static void append_seg PARAMS ((void));
-static void OP_indirE PARAMS ((int, int));
-static void print_operand_value PARAMS ((char *, int, bfd_vma));
-static void OP_E PARAMS ((int, int));
-static void OP_G PARAMS ((int, int));
-static bfd_vma get64 PARAMS ((void));
-static bfd_signed_vma get32 PARAMS ((void));
-static bfd_signed_vma get32s PARAMS ((void));
-static int get16 PARAMS ((void));
-static void set_op PARAMS ((bfd_vma, int));
-static void OP_REG PARAMS ((int, int));
-static void OP_IMREG PARAMS ((int, int));
-static void OP_I PARAMS ((int, int));
-static void OP_I64 PARAMS ((int, int));
-static void OP_sI PARAMS ((int, int));
-static void OP_J PARAMS ((int, int));
-static void OP_SEG PARAMS ((int, int));
-static void OP_DIR PARAMS ((int, int));
-static void OP_OFF PARAMS ((int, int));
-static void OP_OFF64 PARAMS ((int, int));
-static void ptr_reg PARAMS ((int, int));
-static void OP_ESreg PARAMS ((int, int));
-static void OP_DSreg PARAMS ((int, int));
-static void OP_C PARAMS ((int, int));
-static void OP_D PARAMS ((int, int));
-static void OP_T PARAMS ((int, int));
-static void OP_Rd PARAMS ((int, int));
-static void OP_MMX PARAMS ((int, int));
-static void OP_XMM PARAMS ((int, int));
-static void OP_EM PARAMS ((int, int));
-static void OP_EX PARAMS ((int, int));
-static void OP_MS PARAMS ((int, int));
-static void OP_XS PARAMS ((int, int));
-static void OP_3DNowSuffix PARAMS ((int, int));
-static void OP_SIMD_Suffix PARAMS ((int, int));
-static void SIMD_Fixup PARAMS ((int, int));
-static void PNI_Fixup PARAMS ((int, int));
-static void BadOp PARAMS ((void));
+static int fetch_data (struct disassemble_info *, bfd_byte *);
+static void ckprefix (void);
+static const char *prefix_name (int, int);
+static int print_insn (bfd_vma, disassemble_info *);
+static void dofloat (int);
+static void OP_ST (int, int);
+static void OP_STi (int, int);
+static int putop (const char *, int);
+static void oappend (const char *);
+static void append_seg (void);
+static void OP_indirE (int, int);
+static void print_operand_value (char *, int, bfd_vma);
+static void OP_E (int, int);
+static void OP_G (int, int);
+static bfd_vma get64 (void);
+static bfd_signed_vma get32 (void);
+static bfd_signed_vma get32s (void);
+static int get16 (void);
+static void set_op (bfd_vma, int);
+static void OP_REG (int, int);
+static void OP_IMREG (int, int);
+static void OP_I (int, int);
+static void OP_I64 (int, int);
+static void OP_sI (int, int);
+static void OP_J (int, int);
+static void OP_SEG (int, int);
+static void OP_DIR (int, int);
+static void OP_OFF (int, int);
+static void OP_OFF64 (int, int);
+static void ptr_reg (int, int);
+static void OP_ESreg (int, int);
+static void OP_DSreg (int, int);
+static void OP_C (int, int);
+static void OP_D (int, int);
+static void OP_T (int, int);
+static void OP_Rd (int, int);
+static void OP_MMX (int, int);
+static void OP_XMM (int, int);
+static void OP_EM (int, int);
+static void OP_EX (int, int);
+static void OP_MS (int, int);
+static void OP_XS (int, int);
+static void OP_3DNowSuffix (int, int);
+static void OP_SIMD_Suffix (int, int);
+static void SIMD_Fixup (int, int);
+static void PNI_Fixup (int, int);
+static void BadOp (void);
struct dis_private {
/* Points to first byte not fetched. */
@@ -161,9 +161,7 @@ static int used_prefixes;
? 1 : fetch_data ((info), (addr)))
static int
-fetch_data (info, addr)
- struct disassemble_info *info;
- bfd_byte *addr;
+fetch_data (struct disassemble_info *info, bfd_byte *addr)
{
int status;
struct dis_private *priv = (struct dis_private *) info->private_data;
@@ -427,7 +425,7 @@ fetch_data (info, addr)
#define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0
-typedef void (*op_rtn) PARAMS ((int bytemode, int sizeflag));
+typedef void (*op_rtn) (int bytemode, int sizeflag);
struct dis386 {
const char *name;
@@ -1699,7 +1697,7 @@ static const struct dis386 x86_64_table[][2] = {
#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
static void
-ckprefix ()
+ckprefix (void)
{
int newrex;
rex = 0;
@@ -1797,9 +1795,7 @@ ckprefix ()
prefix byte. */
static const char *
-prefix_name (pref, sizeflag)
- int pref;
- int sizeflag;
+prefix_name (int pref, int sizeflag)
{
switch (pref)
{
@@ -1893,9 +1889,7 @@ static char scale_char;
print_insn_i386_att and print_insn_i386_intel these functions can
disappear, and print_insn_i386 be merged into print_insn. */
int
-print_insn_i386_att (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_i386_att (bfd_vma pc, disassemble_info *info)
{
intel_syntax = 0;
@@ -1903,9 +1897,7 @@ print_insn_i386_att (pc, info)
}
int
-print_insn_i386_intel (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_i386_intel (bfd_vma pc, disassemble_info *info)
{
intel_syntax = 1;
@@ -1913,9 +1905,7 @@ print_insn_i386_intel (pc, info)
}
int
-print_insn_i386 (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_i386 (bfd_vma pc, disassemble_info *info)
{
intel_syntax = -1;
@@ -1923,9 +1913,7 @@ print_insn_i386 (pc, info)
}
static int
-print_insn (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn (bfd_vma pc, disassemble_info *info)
{
const struct dis386 *dp;
int i;
@@ -2034,7 +2022,7 @@ print_insn (pc, info)
puts most long word instructions on a single line. */
info->bytes_per_line = 7;
- info->private_data = (PTR) &priv;
+ info->private_data = &priv;
priv.max_fetched = priv.the_buffer;
priv.insn_start = pc;
@@ -2555,8 +2543,7 @@ static char *fgrps[][8] = {
};
static void
-dofloat (sizeflag)
- int sizeflag;
+dofloat (int sizeflag)
{
const struct dis386 *dp;
unsigned char floatop;
@@ -2602,17 +2589,13 @@ dofloat (sizeflag)
}
static void
-OP_ST (bytemode, sizeflag)
- int bytemode ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
oappend ("%st");
}
static void
-OP_STi (bytemode, sizeflag)
- int bytemode ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
sprintf (scratchbuf, "%%st(%d)", rm);
oappend (scratchbuf + intel_syntax);
@@ -2620,9 +2603,7 @@ OP_STi (bytemode, sizeflag)
/* Capital letters in template are macros. */
static int
-putop (template, sizeflag)
- const char *template;
- int sizeflag;
+putop (const char *template, int sizeflag)
{
const char *p;
int alt;
@@ -2895,15 +2876,14 @@ putop (template, sizeflag)
}
static void
-oappend (s)
- const char *s;
+oappend (const char *s)
{
strcpy (obufp, s);
obufp += strlen (s);
}
static void
-append_seg ()
+append_seg (void)
{
if (prefixes & PREFIX_CS)
{
@@ -2938,9 +2918,7 @@ append_seg ()
}
static void
-OP_indirE (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_indirE (int bytemode, int sizeflag)
{
if (!intel_syntax)
oappend ("*");
@@ -2948,10 +2926,7 @@ OP_indirE (bytemode, sizeflag)
}
static void
-print_operand_value (buf, hex, disp)
- char *buf;
- int hex;
- bfd_vma disp;
+print_operand_value (char *buf, int hex, bfd_vma disp)
{
if (mode_64bit)
{
@@ -3008,9 +2983,7 @@ print_operand_value (buf, hex, disp)
}
static void
-OP_E (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_E (int bytemode, int sizeflag)
{
bfd_vma disp;
int add = 0;
@@ -3293,9 +3266,7 @@ OP_E (bytemode, sizeflag)
}
static void
-OP_G (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_G (int bytemode, int sizeflag)
{
int add = 0;
USED_REX (REX_EXTX);
@@ -3336,7 +3307,7 @@ OP_G (bytemode, sizeflag)
}
static bfd_vma
-get64 ()
+get64 (void)
{
bfd_vma x;
#ifdef BFD64
@@ -3361,7 +3332,7 @@ get64 ()
}
static bfd_signed_vma
-get32 ()
+get32 (void)
{
bfd_signed_vma x = 0;
@@ -3374,7 +3345,7 @@ get32 ()
}
static bfd_signed_vma
-get32s ()
+get32s (void)
{
bfd_signed_vma x = 0;
@@ -3390,7 +3361,7 @@ get32s ()
}
static int
-get16 ()
+get16 (void)
{
int x = 0;
@@ -3401,9 +3372,7 @@ get16 ()
}
static void
-set_op (op, riprel)
- bfd_vma op;
- int riprel;
+set_op (bfd_vma op, int riprel)
{
op_index[op_ad] = op_ad;
if (mode_64bit)
@@ -3420,9 +3389,7 @@ set_op (op, riprel)
}
static void
-OP_REG (code, sizeflag)
- int code;
- int sizeflag;
+OP_REG (int code, int sizeflag)
{
const char *s;
int add = 0;
@@ -3482,9 +3449,7 @@ OP_REG (code, sizeflag)
}
static void
-OP_IMREG (code, sizeflag)
- int code;
- int sizeflag;
+OP_IMREG (int code, int sizeflag)
{
const char *s;
@@ -3531,9 +3496,7 @@ OP_IMREG (code, sizeflag)
}
static void
-OP_I (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_I (int bytemode, int sizeflag)
{
bfd_signed_vma op;
bfd_signed_vma mask = -1;
@@ -3585,9 +3548,7 @@ OP_I (bytemode, sizeflag)
}
static void
-OP_I64 (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_I64 (int bytemode, int sizeflag)
{
bfd_signed_vma op;
bfd_signed_vma mask = -1;
@@ -3638,9 +3599,7 @@ OP_I64 (bytemode, sizeflag)
}
static void
-OP_sI (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_sI (int bytemode, int sizeflag)
{
bfd_signed_vma op;
bfd_signed_vma mask = -1;
@@ -3689,9 +3648,7 @@ OP_sI (bytemode, sizeflag)
}
static void
-OP_J (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_J (int bytemode, int sizeflag)
{
bfd_vma disp;
bfd_vma mask = -1;
@@ -3727,17 +3684,13 @@ OP_J (bytemode, sizeflag)
}
static void
-OP_SEG (dummy, sizeflag)
- int dummy ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_SEG (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
oappend (names_seg[reg]);
}
static void
-OP_DIR (dummy, sizeflag)
- int dummy ATTRIBUTE_UNUSED;
- int sizeflag;
+OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag)
{
int seg, offset;
@@ -3760,9 +3713,7 @@ OP_DIR (dummy, sizeflag)
}
static void
-OP_OFF (bytemode, sizeflag)
- int bytemode ATTRIBUTE_UNUSED;
- int sizeflag;
+OP_OFF (int bytemode ATTRIBUTE_UNUSED, int sizeflag)
{
bfd_vma off;
@@ -3787,9 +3738,7 @@ OP_OFF (bytemode, sizeflag)
}
static void
-OP_OFF64 (bytemode, sizeflag)
- int bytemode ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_OFF64 (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
bfd_vma off;
@@ -3817,9 +3766,7 @@ OP_OFF64 (bytemode, sizeflag)
}
static void
-ptr_reg (code, sizeflag)
- int code;
- int sizeflag;
+ptr_reg (int code, int sizeflag)
{
const char *s;
if (intel_syntax)
@@ -3847,18 +3794,14 @@ ptr_reg (code, sizeflag)
}
static void
-OP_ESreg (code, sizeflag)
- int code;
- int sizeflag;
+OP_ESreg (int code, int sizeflag)
{
oappend ("%es:" + intel_syntax);
ptr_reg (code, sizeflag);
}
static void
-OP_DSreg (code, sizeflag)
- int code;
- int sizeflag;
+OP_DSreg (int code, int sizeflag)
{
if ((prefixes
& (PREFIX_CS
@@ -3873,9 +3816,7 @@ OP_DSreg (code, sizeflag)
}
static void
-OP_C (dummy, sizeflag)
- int dummy ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
USED_REX (REX_EXTX);
@@ -3886,9 +3827,7 @@ OP_C (dummy, sizeflag)
}
static void
-OP_D (dummy, sizeflag)
- int dummy ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
USED_REX (REX_EXTX);
@@ -3902,18 +3841,14 @@ OP_D (dummy, sizeflag)
}
static void
-OP_T (dummy, sizeflag)
- int dummy ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
sprintf (scratchbuf, "%%tr%d", reg);
oappend (scratchbuf + intel_syntax);
}
static void
-OP_Rd (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_Rd (int bytemode, int sizeflag)
{
if (mod == 3)
OP_E (bytemode, sizeflag);
@@ -3922,9 +3857,7 @@ OP_Rd (bytemode, sizeflag)
}
static void
-OP_MMX (bytemode, sizeflag)
- int bytemode ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
USED_REX (REX_EXTX);
@@ -3939,9 +3872,7 @@ OP_MMX (bytemode, sizeflag)
}
static void
-OP_XMM (bytemode, sizeflag)
- int bytemode ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_XMM (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
USED_REX (REX_EXTX);
@@ -3952,9 +3883,7 @@ OP_XMM (bytemode, sizeflag)
}
static void
-OP_EM (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_EM (int bytemode, int sizeflag)
{
int add = 0;
if (mod != 3)
@@ -3978,9 +3907,7 @@ OP_EM (bytemode, sizeflag)
}
static void
-OP_EX (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_EX (int bytemode, int sizeflag)
{
int add = 0;
if (mod != 3)
@@ -4000,9 +3927,7 @@ OP_EX (bytemode, sizeflag)
}
static void
-OP_MS (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_MS (int bytemode, int sizeflag)
{
if (mod == 3)
OP_EM (bytemode, sizeflag);
@@ -4011,9 +3936,7 @@ OP_MS (bytemode, sizeflag)
}
static void
-OP_XS (bytemode, sizeflag)
- int bytemode;
- int sizeflag;
+OP_XS (int bytemode, int sizeflag)
{
if (mod == 3)
OP_EX (bytemode, sizeflag);
@@ -4089,9 +4012,7 @@ static const char *const Suffix3DNow[] = {
};
static void
-OP_3DNowSuffix (bytemode, sizeflag)
- int bytemode ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
const char *mnemonic;
@@ -4127,9 +4048,7 @@ static const char *simd_cmp_op[] = {
};
static void
-OP_SIMD_Suffix (bytemode, sizeflag)
- int bytemode ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+OP_SIMD_Suffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
unsigned int cmp_type;
@@ -4169,9 +4088,7 @@ OP_SIMD_Suffix (bytemode, sizeflag)
}
static void
-SIMD_Fixup (extrachar, sizeflag)
- int extrachar;
- int sizeflag ATTRIBUTE_UNUSED;
+SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED)
{
/* Change movlps/movhps to movhlps/movlhps for 2 register operand
forms of these instructions. */
@@ -4187,9 +4104,7 @@ SIMD_Fixup (extrachar, sizeflag)
}
static void
-PNI_Fixup (extrachar, sizeflag)
- int extrachar ATTRIBUTE_UNUSED;
- int sizeflag ATTRIBUTE_UNUSED;
+PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
if (mod == 3 && reg == 1)
{
diff --git a/opcodes/i960-dis.c b/opcodes/i960-dis.c
index 9210d02d80..fa6f188278 100644
--- a/opcodes/i960-dis.c
+++ b/opcodes/i960-dis.c
@@ -1,5 +1,5 @@
/* Disassemble i80960 instructions.
- Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+ Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -31,26 +31,24 @@ static const char *const reg_names[] = {
static FILE *stream; /* Output goes here */
static struct disassemble_info *info;
-static void print_addr PARAMS ((bfd_vma));
-static void ctrl PARAMS ((bfd_vma, unsigned long, unsigned long));
-static void cobr PARAMS ((bfd_vma, unsigned long, unsigned long));
-static void reg PARAMS ((unsigned long));
-static int mem PARAMS ((bfd_vma, unsigned long, unsigned long, int));
-static void ea PARAMS ((bfd_vma, int, const char *, const char *, int, unsigned int));
-static void dstop PARAMS ((int, int, int));
-static void regop PARAMS ((int, int, int, int));
-static void invalid PARAMS ((int));
-static int pinsn PARAMS ((bfd_vma, unsigned long, unsigned long));
-static void put_abs PARAMS ((unsigned long, unsigned long));
+static void print_addr (bfd_vma);
+static void ctrl (bfd_vma, unsigned long, unsigned long);
+static void cobr (bfd_vma, unsigned long, unsigned long);
+static void reg (unsigned long);
+static int mem (bfd_vma, unsigned long, unsigned long, int);
+static void ea (bfd_vma, int, const char *, const char *, int, unsigned int);
+static void dstop (int, int, int);
+static void regop (int, int, int, int);
+static void invalid (int);
+static int pinsn (bfd_vma, unsigned long, unsigned long);
+static void put_abs (unsigned long, unsigned long);
/* Print the i960 instruction at address 'memaddr' in debugged memory,
on INFO->STREAM. Returns length of the instruction, in bytes. */
int
-print_insn_i960 (memaddr, info_arg)
- bfd_vma memaddr;
- struct disassemble_info *info_arg;
+print_insn_i960 (bfd_vma memaddr, struct disassemble_info *info_arg)
{
unsigned int word1, word2 = 0xdeadbeef;
bfd_byte buffer[8];
@@ -118,12 +116,10 @@ struct sparse_tabent {
};
static int
-pinsn (memaddr, word1, word2)
- bfd_vma memaddr;
- unsigned long word1, word2;
+pinsn (bfd_vma memaddr, unsigned long word1, unsigned long word2)
{
int instr_len;
-
+
instr_len = 4;
put_abs (word1, word2);
@@ -161,10 +157,7 @@ pinsn (memaddr, word1, word2)
/* CTRL format.. */
static void
-ctrl (memaddr, word1, word2)
- bfd_vma memaddr;
- unsigned long word1;
- unsigned long word2 ATTRIBUTE_UNUSED;
+ctrl (bfd_vma memaddr, unsigned long word1, unsigned long word2 ATTRIBUTE_UNUSED)
{
int i;
static const struct tabent ctrl_tab[] = {
@@ -233,15 +226,12 @@ ctrl (memaddr, word1, word2)
/* COBR format. */
static void
-cobr (memaddr, word1, word2)
- bfd_vma memaddr;
- unsigned long word1;
- unsigned long word2 ATTRIBUTE_UNUSED;
+cobr (bfd_vma memaddr, unsigned long word1, unsigned long word2 ATTRIBUTE_UNUSED)
{
int src1;
int src2;
int i;
-
+
static const struct tabent cobr_tab[] = {
{ "testno", 1, }, /* 0x20 */
{ "testg", 1, }, /* 0x21 */
@@ -324,18 +314,14 @@ cobr (memaddr, word1, word2)
/* Returns instruction length: 4 or 8. */
static int
-mem (memaddr, word1, word2, noprint)
- bfd_vma memaddr;
- unsigned long word1, word2;
- int noprint; /* If TRUE, return instruction length, but
- don't output any text. */
+mem (bfd_vma memaddr, unsigned long word1, unsigned long word2, int noprint)
{
int i, j;
int len;
int mode;
int offset;
const char *reg1, *reg2, *reg3;
-
+
/* This lookup table is too sparse to make it worth typing in, but not
so large as to make a sparse array necessary. We create the table
at runtime. */
@@ -395,7 +381,7 @@ mem (memaddr, word1, word2, noprint)
&& ((mode == 5) || (mode >= 12)))
/* With 32-bit displacement. */
len = 8;
- else
+ else
len = 4;
if (noprint)
@@ -426,7 +412,7 @@ mem (memaddr, word1, word2, noprint)
{ /* MEMA FORMAT */
(*info->fprintf_func) (stream, "0x%x", (unsigned) offset);
- if (mode & 8)
+ if (mode & 8)
(*info->fprintf_func) (stream, "(%s)", reg2);
(*info->fprintf_func)(stream, ",%s", reg1);
@@ -445,7 +431,7 @@ mem (memaddr, word1, word2, noprint)
/* MEMA FORMAT */
(*info->fprintf_func) (stream, "%s,0x%x", reg1, (unsigned) offset);
- if (mode & 8)
+ if (mode & 8)
(*info->fprintf_func) (stream, "(%s)", reg2);
}
break;
@@ -472,8 +458,7 @@ mem (memaddr, word1, word2, noprint)
/* REG format. */
static void
-reg (word1)
- unsigned long word1;
+reg (unsigned long word1)
{
int i, j;
int opcode;
@@ -488,14 +473,14 @@ reg (word1)
at runtime. */
/* NOTE: In this table, the meaning of 'numops' is:
- 1: single operand, which is NOT a destination.
- -1: single operand, which IS a destination.
- 2: 2 operands, the 2nd of which is NOT a destination.
- -2: 2 operands, the 2nd of which IS a destination.
- 3: 3 operands
-
- If an opcode mnemonic begins with "F", it is a floating-point
- opcode (the "F" is not printed). */
+ 1: single operand, which is NOT a destination.
+ -1: single operand, which IS a destination.
+ 2: 2 operands, the 2nd of which is NOT a destination.
+ -2: 2 operands, the 2nd of which IS a destination.
+ 3: 3 operands
+
+ If an opcode mnemonic begins with "F", it is a floating-point
+ opcode (the "F" is not printed). */
static struct tabent *reg_tab;
static const struct sparse_tabent reg_init[] =
@@ -777,13 +762,8 @@ reg (word1)
/* Print out effective address for memb instructions. */
static void
-ea (memaddr, mode, reg2, reg3, word1, word2)
- bfd_vma memaddr;
- int mode;
- const char *reg2;
- const char *reg3;
- int word1;
- unsigned int word2;
+ea (bfd_vma memaddr, int mode, const char *reg2, const char *reg3, int word1,
+ unsigned int word2)
{
int scale;
static const int scale_tab[] = { 1, 2, 4, 8, 16 };
@@ -842,8 +822,7 @@ ea (memaddr, mode, reg2, reg3, word1, word2)
/* Register Instruction Operand. */
static void
-regop (mode, spec, reg, fp)
- int mode, spec, reg, fp;
+regop (int mode, int spec, int reg, int fp)
{
if (fp)
{
@@ -897,8 +876,7 @@ regop (mode, spec, reg, fp)
/* Register Instruction Destination Operand. */
static void
-dstop (mode, reg, fp)
- int mode, reg, fp;
+dstop (int mode, int reg, int fp)
{
/* 'dst' operand can't be a literal. On non-FP instructions, register
mode is assumed and "m3" acts as if were "s3"; on FP-instructions,
@@ -910,23 +888,20 @@ dstop (mode, reg, fp)
}
static void
-invalid (word1)
- int word1;
+invalid (int word1)
{
(*info->fprintf_func) (stream, ".word\t0x%08x", (unsigned) word1);
}
static void
-print_addr (a)
- bfd_vma a;
+print_addr (bfd_vma a)
{
(*info->print_address_func) (a, info);
}
static void
-put_abs (word1, word2)
- unsigned long word1 ATTRIBUTE_UNUSED;
- unsigned long word2 ATTRIBUTE_UNUSED;
+put_abs (unsigned long word1 ATTRIBUTE_UNUSED,
+ unsigned long word2 ATTRIBUTE_UNUSED)
{
#ifdef IN_GDB
return;
diff --git a/opcodes/ia64-opc.c b/opcodes/ia64-opc.c
index 9726381dd6..fc90213a6b 100644
--- a/opcodes/ia64-opc.c
+++ b/opcodes/ia64-opc.c
@@ -1,5 +1,5 @@
/* ia64-opc.c -- Functions to access the compacted opcode table
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
Written by Bob Manson of Cygnus Solutions, <manson@cygnus.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -25,19 +25,19 @@
#include "ia64-asmtab.h"
#include "ia64-asmtab.c"
-static void get_opc_prefix PARAMS ((const char **, char *));
-static short int find_string_ent PARAMS ((const char *));
-static short int find_main_ent PARAMS ((short int));
-static short int find_completer PARAMS ((short int, short int, const char *));
-static ia64_insn apply_completer PARAMS ((ia64_insn, int));
-static int extract_op_bits PARAMS ((int, int, int));
-static int extract_op PARAMS ((int, int *, unsigned int *));
-static int opcode_verify PARAMS ((ia64_insn, int, enum ia64_insn_type));
-static int locate_opcode_ent PARAMS ((ia64_insn, enum ia64_insn_type));
+static void get_opc_prefix (const char **, char *);
+static short int find_string_ent (const char *);
+static short int find_main_ent (short int);
+static short int find_completer (short int, short int, const char *);
+static ia64_insn apply_completer (ia64_insn, int);
+static int extract_op_bits (int, int, int);
+static int extract_op (int, int *, unsigned int *);
+static int opcode_verify (ia64_insn, int, enum ia64_insn_type);
+static int locate_opcode_ent (ia64_insn, enum ia64_insn_type);
static struct ia64_opcode *make_ia64_opcode
- PARAMS ((ia64_insn, const char *, int, int));
+ (ia64_insn, const char *, int, int);
static struct ia64_opcode *ia64_find_matching_opcode
- PARAMS ((const char *, short int));
+ (const char *, short int);
const struct ia64_templ_desc ia64_templ_desc[16] =
{
@@ -65,9 +65,7 @@ const struct ia64_templ_desc ia64_templ_desc[16] =
of the opcode, or at the NUL character. */
static void
-get_opc_prefix (ptr, dest)
- const char **ptr;
- char *dest;
+get_opc_prefix (const char **ptr, char *dest)
{
char *c = strchr (*ptr, '.');
if (c != NULL)
@@ -89,8 +87,7 @@ get_opc_prefix (ptr, dest)
STR; return -1 if one does not exist. */
static short
-find_string_ent (str)
- const char *str;
+find_string_ent (const char *str)
{
short start = 0;
short end = sizeof (ia64_strings) / sizeof (const char *);
@@ -124,8 +121,7 @@ find_string_ent (str)
return -1 if one does not exist. */
static short
-find_main_ent (nameindex)
- short nameindex;
+find_main_ent (short nameindex)
{
short start = 0;
short end = sizeof (main_table) / sizeof (struct ia64_main_table);
@@ -164,10 +160,7 @@ find_main_ent (nameindex)
return -1 if one does not exist. */
static short
-find_completer (main_ent, prev_completer, name)
- short main_ent;
- short prev_completer;
- const char *name;
+find_completer (short main_ent, short prev_completer, const char *name)
{
short name_index = find_string_ent (name);
@@ -200,9 +193,7 @@ find_completer (main_ent, prev_completer, name)
return the result. */
static ia64_insn
-apply_completer (opcode, completer_index)
- ia64_insn opcode;
- int completer_index;
+apply_completer (ia64_insn opcode, int completer_index)
{
ia64_insn mask = completer_table[completer_index].mask;
ia64_insn bits = completer_table[completer_index].bits;
@@ -220,10 +211,7 @@ apply_completer (opcode, completer_index)
first byte in OP_POINTER.) */
static int
-extract_op_bits (op_pointer, bitoffset, bits)
- int op_pointer;
- int bitoffset;
- int bits;
+extract_op_bits (int op_pointer, int bitoffset, int bits)
{
int res = 0;
@@ -259,10 +247,7 @@ extract_op_bits (op_pointer, bitoffset, bits)
state entry in bits is returned. */
static int
-extract_op (op_pointer, opval, op)
- int op_pointer;
- int *opval;
- unsigned int *op;
+extract_op (int op_pointer, int *opval, unsigned int *op)
{
int oplen = 5;
@@ -317,10 +302,7 @@ extract_op (op_pointer, opval, op)
PLACE matches OPCODE and is of type TYPE. */
static int
-opcode_verify (opcode, place, type)
- ia64_insn opcode;
- int place;
- enum ia64_insn_type type;
+opcode_verify (ia64_insn opcode, int place, enum ia64_insn_type type)
{
if (main_table[place].opcode_type != type)
{
@@ -364,9 +346,7 @@ opcode_verify (opcode, place, type)
priority. */
static int
-locate_opcode_ent (opcode, type)
- ia64_insn opcode;
- enum ia64_insn_type type;
+locate_opcode_ent (ia64_insn opcode, enum ia64_insn_type type)
{
int currtest[41];
int bitpos[41];
@@ -545,11 +525,7 @@ locate_opcode_ent (opcode, type)
/* Construct an ia64_opcode entry based on OPCODE, NAME and PLACE. */
static struct ia64_opcode *
-make_ia64_opcode (opcode, name, place, depind)
- ia64_insn opcode;
- const char *name;
- int place;
- int depind;
+make_ia64_opcode (ia64_insn opcode, const char *name, int place, int depind)
{
struct ia64_opcode *res =
(struct ia64_opcode *) xmalloc (sizeof (struct ia64_opcode));
@@ -572,9 +548,7 @@ make_ia64_opcode (opcode, name, place, depind)
/* Determine the ia64_opcode entry for the opcode specified by INSN
and TYPE. If a valid entry is not found, return NULL. */
struct ia64_opcode *
-ia64_dis_opcode (insn, type)
- ia64_insn insn;
- enum ia64_insn_type type;
+ia64_dis_opcode (ia64_insn insn, enum ia64_insn_type type)
{
int disent = locate_opcode_ent (insn, type);
@@ -633,9 +607,7 @@ ia64_dis_opcode (insn, type)
matches NAME. Return NULL if one is not found. */
static struct ia64_opcode *
-ia64_find_matching_opcode (name, place)
- const char *name;
- short place;
+ia64_find_matching_opcode (const char *name, short place)
{
char op[129];
const char *suffix;
@@ -696,8 +668,7 @@ ia64_find_matching_opcode (name, place)
release any resources used by the returned entry. */
struct ia64_opcode *
-ia64_find_next_opcode (prev_ent)
- struct ia64_opcode *prev_ent;
+ia64_find_next_opcode (struct ia64_opcode *prev_ent)
{
return ia64_find_matching_opcode (prev_ent->name,
prev_ent->ent_index + 1);
@@ -710,8 +681,7 @@ ia64_find_next_opcode (prev_ent)
release any resources used by the returned entry. */
struct ia64_opcode *
-ia64_find_opcode (name)
- const char *name;
+ia64_find_opcode (const char *name)
{
char op[129];
const char *suffix;
@@ -741,16 +711,14 @@ ia64_find_opcode (name)
/* Free any resources used by ENT. */
void
-ia64_free_opcode (ent)
- struct ia64_opcode *ent;
+ia64_free_opcode (struct ia64_opcode *ent)
{
free ((void *)ent->name);
free (ent);
}
const struct ia64_dependency *
-ia64_find_dependency (index)
- int index;
+ia64_find_dependency (int index)
{
index = DEP(index);
diff --git a/opcodes/ip2k-asm.c b/opcodes/ip2k-asm.c
index 524f256a53..593db9db03 100644
--- a/opcodes/ip2k-asm.c
+++ b/opcodes/ip2k-asm.c
@@ -43,7 +43,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
/* -- assembler routines inserted here. */
@@ -607,8 +607,7 @@ ip2k_cgen_init_asm (cd)
Returns NULL for success, an error message for failure. */
char *
-ip2k_cgen_build_insn_regex (insn)
- CGEN_INSN *insn;
+ip2k_cgen_build_insn_regex (CGEN_INSN *insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
@@ -731,11 +730,10 @@ ip2k_cgen_build_insn_regex (insn)
Returns NULL for success, an error message for failure. */
static const char *
-parse_insn_normal (cd, insn, strp, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const char **strp;
- CGEN_FIELDS *fields;
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
{
/* ??? Runtime added insns not handled yet. */
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
@@ -873,12 +871,11 @@ parse_insn_normal (cd, insn, strp, fields)
mind helps keep the design clean. */
const CGEN_INSN *
-ip2k_cgen_assemble_insn (cd, str, fields, buf, errmsg)
- CGEN_CPU_DESC cd;
- const char *str;
- CGEN_FIELDS *fields;
- CGEN_INSN_BYTES_PTR buf;
- char **errmsg;
+ip2k_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
{
const char *start;
CGEN_INSN_LIST *ilist;
@@ -982,9 +979,7 @@ ip2k_cgen_assemble_insn (cd, str, fields, buf, errmsg)
FIXME: Not currently used. */
void
-ip2k_cgen_asm_hash_keywords (cd, opvals)
- CGEN_CPU_DESC cd;
- CGEN_KEYWORD *opvals;
+ip2k_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
{
CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
const CGEN_KEYWORD_ENTRY * ke;
diff --git a/opcodes/ip2k-dis.c b/opcodes/ip2k-dis.c
index f33fcc05ff..00e764ccce 100644
--- a/opcodes/ip2k-dis.c
+++ b/opcodes/ip2k-dis.c
@@ -41,21 +41,20 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define UNKNOWN_INSN_MSG _("*unknown*")
static void print_normal
- PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
static void print_address
- PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
static void print_keyword
- PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
static void print_insn_normal
- PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
- bfd_vma, int));
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
static int print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned);
static int default_print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
static int read_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
- CGEN_EXTRACT_INFO *, unsigned long *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
/* -- disassembler routines inserted here */
@@ -352,13 +351,12 @@ ip2k_cgen_init_dis (cd)
/* Default print handler. */
static void
-print_normal (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- long value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -378,13 +376,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
/* Default address handler. */
static void
-print_address (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- bfd_vma value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -408,12 +405,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
/* Keyword print handler. */
static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- CGEN_KEYWORD *keyword_table;
- long value;
- unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
const CGEN_KEYWORD_ENTRY *ke;
@@ -427,17 +423,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
/* Default insn printer.
- DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
about disassemble_info. */
static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
- CGEN_CPU_DESC cd;
- PTR dis_info;
- const CGEN_INSN *insn;
- CGEN_FIELDS *fields;
- bfd_vma pc;
- int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
disassemble_info *info = (disassemble_info *) dis_info;
@@ -469,14 +464,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- int buflen;
- CGEN_EXTRACT_INFO *ex_info;
- unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
{
int status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
@@ -500,12 +494,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
been called). */
static int
-print_insn (cd, pc, info, buf, buflen)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ unsigned int buflen)
{
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
@@ -610,10 +603,7 @@ print_insn (cd, pc, info, buf, buflen)
#endif
static int
-default_print_insn (cd, pc, info)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
char buf[CGEN_MAX_INSN_SIZE];
int buflen;
@@ -652,9 +642,7 @@ typedef struct cpu_desc_list {
} cpu_desc_list;
int
-print_insn_ip2k (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_ip2k (bfd_vma pc, disassemble_info *info)
{
static cpu_desc_list *cd_list = 0;
cpu_desc_list *cl = 0;
diff --git a/opcodes/ip2k-ibld.c b/opcodes/ip2k-ibld.c
index 22e2d8dea6..e0c5309051 100644
--- a/opcodes/ip2k-ibld.c
+++ b/opcodes/ip2k-ibld.c
@@ -44,30 +44,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define FLD(f) (fields->f)
static const char * insert_normal
- PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
static const char * insert_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
static int extract_normal
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- unsigned int, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, bfd_vma, long *));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
static int extract_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
#if CGEN_INT_INSN_P
static void put_insn_int_value
- PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
#endif
#if ! CGEN_INT_INSN_P
static CGEN_INLINE void insert_1
- PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
static CGEN_INLINE int fill_cache
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
static CGEN_INLINE long extract_1
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
- unsigned char *, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
#endif
/* Operand insertion. */
@@ -77,11 +76,12 @@ static CGEN_INLINE long extract_1
/* Subroutine of insert_normal. */
static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
- CGEN_CPU_DESC cd;
- unsigned long value;
- int start,length,word_length;
- unsigned char *bufp;
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
{
unsigned long x,mask;
int shift;
@@ -118,13 +118,15 @@ insert_1 (cd, value, start, length, word_length, bufp)
necessary. */
static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
- total_length, buffer)
- CGEN_CPU_DESC cd;
- long value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
- CGEN_INSN_BYTES_PTR buffer;
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
{
static char errbuf[100];
/* Written this way to avoid undefined behaviour. */
@@ -232,12 +234,11 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
The result is an error message or NULL if success. */
static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insn;
- CGEN_FIELDS * fields;
- CGEN_INSN_BYTES_PTR buffer;
- bfd_vma pc;
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
unsigned long value;
@@ -288,12 +289,11 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
-put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_INSN_BYTES_PTR buf;
- int length;
- int insn_length;
- CGEN_INSN_INT value;
+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
{
/* For architectures with insns smaller than the base-insn-bitsize,
length may be too big. */
@@ -320,11 +320,11 @@ put_insn_int_value (cd, buf, length, insn_length, value)
Returns 1 for success, 0 for failure. */
static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_EXTRACT_INFO *ex_info;
- int offset, bytes;
- bfd_vma pc;
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
@@ -364,12 +364,13 @@ fill_cache (cd, ex_info, offset, bytes, pc)
/* Subroutine of extract_normal. */
static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
- CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
- int start,length,word_length;
- unsigned char *bufp;
- bfd_vma pc ATTRIBUTE_UNUSED;
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
{
unsigned long x;
int shift;
@@ -408,23 +409,25 @@ extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
necessary. */
static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
- word_length, total_length, pc, valuep)
- CGEN_CPU_DESC cd;
+extract_normal (CGEN_CPU_DESC cd,
#if ! CGEN_INT_INSN_P
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info,
#else
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
#endif
- CGEN_INSN_INT insn_value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
#if ! CGEN_INT_INSN_P
- bfd_vma pc;
+ bfd_vma pc,
#else
- bfd_vma pc ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED,
#endif
- long *valuep;
+ long *valuep)
{
long value, mask;
@@ -505,13 +508,12 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
been called). */
static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_EXTRACT_INFO *ex_info;
- CGEN_INSN_INT insn_value;
- CGEN_FIELDS *fields;
- bfd_vma pc;
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
const CGEN_SYNTAX_CHAR_TYPE *syn;
diff --git a/opcodes/iq2000-asm.c b/opcodes/iq2000-asm.c
index 7fb795eb15..62d03f857a 100644
--- a/opcodes/iq2000-asm.c
+++ b/opcodes/iq2000-asm.c
@@ -43,7 +43,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
/* -- assembler routines inserted here. */
@@ -493,8 +493,7 @@ iq2000_cgen_init_asm (cd)
Returns NULL for success, an error message for failure. */
char *
-iq2000_cgen_build_insn_regex (insn)
- CGEN_INSN *insn;
+iq2000_cgen_build_insn_regex (CGEN_INSN *insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
@@ -617,11 +616,10 @@ iq2000_cgen_build_insn_regex (insn)
Returns NULL for success, an error message for failure. */
static const char *
-parse_insn_normal (cd, insn, strp, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const char **strp;
- CGEN_FIELDS *fields;
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
{
/* ??? Runtime added insns not handled yet. */
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
@@ -759,12 +757,11 @@ parse_insn_normal (cd, insn, strp, fields)
mind helps keep the design clean. */
const CGEN_INSN *
-iq2000_cgen_assemble_insn (cd, str, fields, buf, errmsg)
- CGEN_CPU_DESC cd;
- const char *str;
- CGEN_FIELDS *fields;
- CGEN_INSN_BYTES_PTR buf;
- char **errmsg;
+iq2000_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
{
const char *start;
CGEN_INSN_LIST *ilist;
@@ -868,9 +865,7 @@ iq2000_cgen_assemble_insn (cd, str, fields, buf, errmsg)
FIXME: Not currently used. */
void
-iq2000_cgen_asm_hash_keywords (cd, opvals)
- CGEN_CPU_DESC cd;
- CGEN_KEYWORD *opvals;
+iq2000_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
{
CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
const CGEN_KEYWORD_ENTRY * ke;
diff --git a/opcodes/iq2000-dis.c b/opcodes/iq2000-dis.c
index b1bfa0ef4b..c20e978851 100644
--- a/opcodes/iq2000-dis.c
+++ b/opcodes/iq2000-dis.c
@@ -41,21 +41,20 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define UNKNOWN_INSN_MSG _("*unknown*")
static void print_normal
- PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
static void print_address
- PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
static void print_keyword
- PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
static void print_insn_normal
- PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
- bfd_vma, int));
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
static int print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned);
static int default_print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
static int read_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
- CGEN_EXTRACT_INFO *, unsigned long *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
/* -- disassembler routines inserted here */
@@ -215,13 +214,12 @@ iq2000_cgen_init_dis (cd)
/* Default print handler. */
static void
-print_normal (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- long value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -241,13 +239,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
/* Default address handler. */
static void
-print_address (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- bfd_vma value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -271,12 +268,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
/* Keyword print handler. */
static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- CGEN_KEYWORD *keyword_table;
- long value;
- unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
const CGEN_KEYWORD_ENTRY *ke;
@@ -290,17 +286,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
/* Default insn printer.
- DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
about disassemble_info. */
static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
- CGEN_CPU_DESC cd;
- PTR dis_info;
- const CGEN_INSN *insn;
- CGEN_FIELDS *fields;
- bfd_vma pc;
- int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
disassemble_info *info = (disassemble_info *) dis_info;
@@ -332,14 +327,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- int buflen;
- CGEN_EXTRACT_INFO *ex_info;
- unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
{
int status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
@@ -363,12 +357,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
been called). */
static int
-print_insn (cd, pc, info, buf, buflen)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ unsigned int buflen)
{
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
@@ -473,10 +466,7 @@ print_insn (cd, pc, info, buf, buflen)
#endif
static int
-default_print_insn (cd, pc, info)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
char buf[CGEN_MAX_INSN_SIZE];
int buflen;
@@ -515,9 +505,7 @@ typedef struct cpu_desc_list {
} cpu_desc_list;
int
-print_insn_iq2000 (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_iq2000 (bfd_vma pc, disassemble_info *info)
{
static cpu_desc_list *cd_list = 0;
cpu_desc_list *cl = 0;
diff --git a/opcodes/iq2000-ibld.c b/opcodes/iq2000-ibld.c
index 4917d9fa3d..f0640f0774 100644
--- a/opcodes/iq2000-ibld.c
+++ b/opcodes/iq2000-ibld.c
@@ -44,30 +44,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define FLD(f) (fields->f)
static const char * insert_normal
- PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
static const char * insert_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
static int extract_normal
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- unsigned int, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, bfd_vma, long *));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
static int extract_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
#if CGEN_INT_INSN_P
static void put_insn_int_value
- PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
#endif
#if ! CGEN_INT_INSN_P
static CGEN_INLINE void insert_1
- PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
static CGEN_INLINE int fill_cache
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
static CGEN_INLINE long extract_1
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
- unsigned char *, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
#endif
/* Operand insertion. */
@@ -77,11 +76,12 @@ static CGEN_INLINE long extract_1
/* Subroutine of insert_normal. */
static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
- CGEN_CPU_DESC cd;
- unsigned long value;
- int start,length,word_length;
- unsigned char *bufp;
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
{
unsigned long x,mask;
int shift;
@@ -118,13 +118,15 @@ insert_1 (cd, value, start, length, word_length, bufp)
necessary. */
static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
- total_length, buffer)
- CGEN_CPU_DESC cd;
- long value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
- CGEN_INSN_BYTES_PTR buffer;
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
{
static char errbuf[100];
/* Written this way to avoid undefined behaviour. */
@@ -232,12 +234,11 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
The result is an error message or NULL if success. */
static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insn;
- CGEN_FIELDS * fields;
- CGEN_INSN_BYTES_PTR buffer;
- bfd_vma pc;
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
unsigned long value;
@@ -288,12 +289,11 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
-put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_INSN_BYTES_PTR buf;
- int length;
- int insn_length;
- CGEN_INSN_INT value;
+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
{
/* For architectures with insns smaller than the base-insn-bitsize,
length may be too big. */
@@ -320,11 +320,11 @@ put_insn_int_value (cd, buf, length, insn_length, value)
Returns 1 for success, 0 for failure. */
static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_EXTRACT_INFO *ex_info;
- int offset, bytes;
- bfd_vma pc;
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
@@ -364,12 +364,13 @@ fill_cache (cd, ex_info, offset, bytes, pc)
/* Subroutine of extract_normal. */
static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
- CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
- int start,length,word_length;
- unsigned char *bufp;
- bfd_vma pc ATTRIBUTE_UNUSED;
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
{
unsigned long x;
int shift;
@@ -408,23 +409,25 @@ extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
necessary. */
static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
- word_length, total_length, pc, valuep)
- CGEN_CPU_DESC cd;
+extract_normal (CGEN_CPU_DESC cd,
#if ! CGEN_INT_INSN_P
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info,
#else
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
#endif
- CGEN_INSN_INT insn_value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
#if ! CGEN_INT_INSN_P
- bfd_vma pc;
+ bfd_vma pc,
#else
- bfd_vma pc ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED,
#endif
- long *valuep;
+ long *valuep)
{
long value, mask;
@@ -505,13 +508,12 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
been called). */
static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_EXTRACT_INFO *ex_info;
- CGEN_INSN_INT insn_value;
- CGEN_FIELDS *fields;
- bfd_vma pc;
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
const CGEN_SYNTAX_CHAR_TYPE *syn;
diff --git a/opcodes/m32r-asm.c b/opcodes/m32r-asm.c
index 2bd751af6d..a8c9485f20 100644
--- a/opcodes/m32r-asm.c
+++ b/opcodes/m32r-asm.c
@@ -43,7 +43,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
/* -- assembler routines inserted here. */
@@ -358,8 +358,7 @@ m32r_cgen_init_asm (cd)
Returns NULL for success, an error message for failure. */
char *
-m32r_cgen_build_insn_regex (insn)
- CGEN_INSN *insn;
+m32r_cgen_build_insn_regex (CGEN_INSN *insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
@@ -482,11 +481,10 @@ m32r_cgen_build_insn_regex (insn)
Returns NULL for success, an error message for failure. */
static const char *
-parse_insn_normal (cd, insn, strp, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const char **strp;
- CGEN_FIELDS *fields;
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
{
/* ??? Runtime added insns not handled yet. */
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
@@ -624,12 +622,11 @@ parse_insn_normal (cd, insn, strp, fields)
mind helps keep the design clean. */
const CGEN_INSN *
-m32r_cgen_assemble_insn (cd, str, fields, buf, errmsg)
- CGEN_CPU_DESC cd;
- const char *str;
- CGEN_FIELDS *fields;
- CGEN_INSN_BYTES_PTR buf;
- char **errmsg;
+m32r_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
{
const char *start;
CGEN_INSN_LIST *ilist;
@@ -733,9 +730,7 @@ m32r_cgen_assemble_insn (cd, str, fields, buf, errmsg)
FIXME: Not currently used. */
void
-m32r_cgen_asm_hash_keywords (cd, opvals)
- CGEN_CPU_DESC cd;
- CGEN_KEYWORD *opvals;
+m32r_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
{
CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
const CGEN_KEYWORD_ENTRY * ke;
diff --git a/opcodes/m32r-dis.c b/opcodes/m32r-dis.c
index 5688049ef1..e8abbc6134 100644
--- a/opcodes/m32r-dis.c
+++ b/opcodes/m32r-dis.c
@@ -41,21 +41,20 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define UNKNOWN_INSN_MSG _("*unknown*")
static void print_normal
- PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
static void print_address
- PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
static void print_keyword
- PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
static void print_insn_normal
- PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
- bfd_vma, int));
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
static int print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned);
static int default_print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
static int read_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
- CGEN_EXTRACT_INFO *, unsigned long *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
/* -- disassembler routines inserted here */
@@ -274,13 +273,12 @@ m32r_cgen_init_dis (cd)
/* Default print handler. */
static void
-print_normal (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- long value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -300,13 +298,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
/* Default address handler. */
static void
-print_address (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- bfd_vma value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -330,12 +327,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
/* Keyword print handler. */
static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- CGEN_KEYWORD *keyword_table;
- long value;
- unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
const CGEN_KEYWORD_ENTRY *ke;
@@ -349,17 +345,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
/* Default insn printer.
- DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
about disassemble_info. */
static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
- CGEN_CPU_DESC cd;
- PTR dis_info;
- const CGEN_INSN *insn;
- CGEN_FIELDS *fields;
- bfd_vma pc;
- int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
disassemble_info *info = (disassemble_info *) dis_info;
@@ -391,14 +386,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- int buflen;
- CGEN_EXTRACT_INFO *ex_info;
- unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
{
int status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
@@ -422,12 +416,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
been called). */
static int
-print_insn (cd, pc, info, buf, buflen)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ unsigned int buflen)
{
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
@@ -532,10 +525,7 @@ print_insn (cd, pc, info, buf, buflen)
#endif
static int
-default_print_insn (cd, pc, info)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
char buf[CGEN_MAX_INSN_SIZE];
int buflen;
@@ -574,9 +564,7 @@ typedef struct cpu_desc_list {
} cpu_desc_list;
int
-print_insn_m32r (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_m32r (bfd_vma pc, disassemble_info *info)
{
static cpu_desc_list *cd_list = 0;
cpu_desc_list *cl = 0;
diff --git a/opcodes/m32r-ibld.c b/opcodes/m32r-ibld.c
index ef1ee0e012..2a8d104e3f 100644
--- a/opcodes/m32r-ibld.c
+++ b/opcodes/m32r-ibld.c
@@ -44,30 +44,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define FLD(f) (fields->f)
static const char * insert_normal
- PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
static const char * insert_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
static int extract_normal
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- unsigned int, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, bfd_vma, long *));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
static int extract_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
#if CGEN_INT_INSN_P
static void put_insn_int_value
- PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
#endif
#if ! CGEN_INT_INSN_P
static CGEN_INLINE void insert_1
- PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
static CGEN_INLINE int fill_cache
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
static CGEN_INLINE long extract_1
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
- unsigned char *, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
#endif
/* Operand insertion. */
@@ -77,11 +76,12 @@ static CGEN_INLINE long extract_1
/* Subroutine of insert_normal. */
static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
- CGEN_CPU_DESC cd;
- unsigned long value;
- int start,length,word_length;
- unsigned char *bufp;
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
{
unsigned long x,mask;
int shift;
@@ -118,13 +118,15 @@ insert_1 (cd, value, start, length, word_length, bufp)
necessary. */
static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
- total_length, buffer)
- CGEN_CPU_DESC cd;
- long value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
- CGEN_INSN_BYTES_PTR buffer;
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
{
static char errbuf[100];
/* Written this way to avoid undefined behaviour. */
@@ -232,12 +234,11 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
The result is an error message or NULL if success. */
static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insn;
- CGEN_FIELDS * fields;
- CGEN_INSN_BYTES_PTR buffer;
- bfd_vma pc;
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
unsigned long value;
@@ -288,12 +289,11 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
-put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_INSN_BYTES_PTR buf;
- int length;
- int insn_length;
- CGEN_INSN_INT value;
+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
{
/* For architectures with insns smaller than the base-insn-bitsize,
length may be too big. */
@@ -320,11 +320,11 @@ put_insn_int_value (cd, buf, length, insn_length, value)
Returns 1 for success, 0 for failure. */
static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_EXTRACT_INFO *ex_info;
- int offset, bytes;
- bfd_vma pc;
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
@@ -364,12 +364,13 @@ fill_cache (cd, ex_info, offset, bytes, pc)
/* Subroutine of extract_normal. */
static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
- CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
- int start,length,word_length;
- unsigned char *bufp;
- bfd_vma pc ATTRIBUTE_UNUSED;
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
{
unsigned long x;
int shift;
@@ -408,23 +409,25 @@ extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
necessary. */
static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
- word_length, total_length, pc, valuep)
- CGEN_CPU_DESC cd;
+extract_normal (CGEN_CPU_DESC cd,
#if ! CGEN_INT_INSN_P
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info,
#else
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
#endif
- CGEN_INSN_INT insn_value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
#if ! CGEN_INT_INSN_P
- bfd_vma pc;
+ bfd_vma pc,
#else
- bfd_vma pc ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED,
#endif
- long *valuep;
+ long *valuep)
{
long value, mask;
@@ -505,13 +508,12 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
been called). */
static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_EXTRACT_INFO *ex_info;
- CGEN_INSN_INT insn_value;
- CGEN_FIELDS *fields;
- bfd_vma pc;
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
const CGEN_SYNTAX_CHAR_TYPE *syn;
diff --git a/opcodes/openrisc-asm.c b/opcodes/openrisc-asm.c
index 26b2625957..9f6ee32588 100644
--- a/opcodes/openrisc-asm.c
+++ b/opcodes/openrisc-asm.c
@@ -43,7 +43,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
/* -- assembler routines inserted here. */
@@ -277,8 +277,7 @@ openrisc_cgen_init_asm (cd)
Returns NULL for success, an error message for failure. */
char *
-openrisc_cgen_build_insn_regex (insn)
- CGEN_INSN *insn;
+openrisc_cgen_build_insn_regex (CGEN_INSN *insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
@@ -401,11 +400,10 @@ openrisc_cgen_build_insn_regex (insn)
Returns NULL for success, an error message for failure. */
static const char *
-parse_insn_normal (cd, insn, strp, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const char **strp;
- CGEN_FIELDS *fields;
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
{
/* ??? Runtime added insns not handled yet. */
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
@@ -543,12 +541,11 @@ parse_insn_normal (cd, insn, strp, fields)
mind helps keep the design clean. */
const CGEN_INSN *
-openrisc_cgen_assemble_insn (cd, str, fields, buf, errmsg)
- CGEN_CPU_DESC cd;
- const char *str;
- CGEN_FIELDS *fields;
- CGEN_INSN_BYTES_PTR buf;
- char **errmsg;
+openrisc_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
{
const char *start;
CGEN_INSN_LIST *ilist;
@@ -652,9 +649,7 @@ openrisc_cgen_assemble_insn (cd, str, fields, buf, errmsg)
FIXME: Not currently used. */
void
-openrisc_cgen_asm_hash_keywords (cd, opvals)
- CGEN_CPU_DESC cd;
- CGEN_KEYWORD *opvals;
+openrisc_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
{
CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
const CGEN_KEYWORD_ENTRY * ke;
diff --git a/opcodes/openrisc-dis.c b/opcodes/openrisc-dis.c
index 5c4da5f3e9..6b721e213f 100644
--- a/opcodes/openrisc-dis.c
+++ b/opcodes/openrisc-dis.c
@@ -41,21 +41,20 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define UNKNOWN_INSN_MSG _("*unknown*")
static void print_normal
- PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
static void print_address
- PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
static void print_keyword
- PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
static void print_insn_normal
- PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
- bfd_vma, int));
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
static int print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned);
static int default_print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
static int read_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
- CGEN_EXTRACT_INFO *, unsigned long *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
/* -- disassembler routines inserted here */
@@ -161,13 +160,12 @@ openrisc_cgen_init_dis (cd)
/* Default print handler. */
static void
-print_normal (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- long value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -187,13 +185,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
/* Default address handler. */
static void
-print_address (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- bfd_vma value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -217,12 +214,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
/* Keyword print handler. */
static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- CGEN_KEYWORD *keyword_table;
- long value;
- unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
const CGEN_KEYWORD_ENTRY *ke;
@@ -236,17 +232,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
/* Default insn printer.
- DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
about disassemble_info. */
static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
- CGEN_CPU_DESC cd;
- PTR dis_info;
- const CGEN_INSN *insn;
- CGEN_FIELDS *fields;
- bfd_vma pc;
- int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
disassemble_info *info = (disassemble_info *) dis_info;
@@ -278,14 +273,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- int buflen;
- CGEN_EXTRACT_INFO *ex_info;
- unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
{
int status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
@@ -309,12 +303,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
been called). */
static int
-print_insn (cd, pc, info, buf, buflen)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ unsigned int buflen)
{
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
@@ -419,10 +412,7 @@ print_insn (cd, pc, info, buf, buflen)
#endif
static int
-default_print_insn (cd, pc, info)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
char buf[CGEN_MAX_INSN_SIZE];
int buflen;
@@ -461,9 +451,7 @@ typedef struct cpu_desc_list {
} cpu_desc_list;
int
-print_insn_openrisc (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_openrisc (bfd_vma pc, disassemble_info *info)
{
static cpu_desc_list *cd_list = 0;
cpu_desc_list *cl = 0;
diff --git a/opcodes/openrisc-ibld.c b/opcodes/openrisc-ibld.c
index c2e5156e8d..751ac07c3c 100644
--- a/opcodes/openrisc-ibld.c
+++ b/opcodes/openrisc-ibld.c
@@ -44,30 +44,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define FLD(f) (fields->f)
static const char * insert_normal
- PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
static const char * insert_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
static int extract_normal
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- unsigned int, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, bfd_vma, long *));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
static int extract_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
#if CGEN_INT_INSN_P
static void put_insn_int_value
- PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
#endif
#if ! CGEN_INT_INSN_P
static CGEN_INLINE void insert_1
- PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
static CGEN_INLINE int fill_cache
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
static CGEN_INLINE long extract_1
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
- unsigned char *, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
#endif
/* Operand insertion. */
@@ -77,11 +76,12 @@ static CGEN_INLINE long extract_1
/* Subroutine of insert_normal. */
static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
- CGEN_CPU_DESC cd;
- unsigned long value;
- int start,length,word_length;
- unsigned char *bufp;
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
{
unsigned long x,mask;
int shift;
@@ -118,13 +118,15 @@ insert_1 (cd, value, start, length, word_length, bufp)
necessary. */
static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
- total_length, buffer)
- CGEN_CPU_DESC cd;
- long value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
- CGEN_INSN_BYTES_PTR buffer;
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
{
static char errbuf[100];
/* Written this way to avoid undefined behaviour. */
@@ -232,12 +234,11 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
The result is an error message or NULL if success. */
static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insn;
- CGEN_FIELDS * fields;
- CGEN_INSN_BYTES_PTR buffer;
- bfd_vma pc;
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
unsigned long value;
@@ -288,12 +289,11 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
-put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_INSN_BYTES_PTR buf;
- int length;
- int insn_length;
- CGEN_INSN_INT value;
+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
{
/* For architectures with insns smaller than the base-insn-bitsize,
length may be too big. */
@@ -320,11 +320,11 @@ put_insn_int_value (cd, buf, length, insn_length, value)
Returns 1 for success, 0 for failure. */
static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_EXTRACT_INFO *ex_info;
- int offset, bytes;
- bfd_vma pc;
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
@@ -364,12 +364,13 @@ fill_cache (cd, ex_info, offset, bytes, pc)
/* Subroutine of extract_normal. */
static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
- CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
- int start,length,word_length;
- unsigned char *bufp;
- bfd_vma pc ATTRIBUTE_UNUSED;
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
{
unsigned long x;
int shift;
@@ -408,23 +409,25 @@ extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
necessary. */
static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
- word_length, total_length, pc, valuep)
- CGEN_CPU_DESC cd;
+extract_normal (CGEN_CPU_DESC cd,
#if ! CGEN_INT_INSN_P
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info,
#else
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
#endif
- CGEN_INSN_INT insn_value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
#if ! CGEN_INT_INSN_P
- bfd_vma pc;
+ bfd_vma pc,
#else
- bfd_vma pc ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED,
#endif
- long *valuep;
+ long *valuep)
{
long value, mask;
@@ -505,13 +508,12 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
been called). */
static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_EXTRACT_INFO *ex_info;
- CGEN_INSN_INT insn_value;
- CGEN_FIELDS *fields;
- bfd_vma pc;
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
const CGEN_SYNTAX_CHAR_TYPE *syn;
diff --git a/opcodes/po/fr.po b/opcodes/po/fr.po
index 08ae66193a..7ec06af190 100644
--- a/opcodes/po/fr.po
+++ b/opcodes/po/fr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: opcodes 2.14rel030712\n"
"POT-Creation-Date: 2003-07-11 13:56+0930\n"
-"PO-Revision-Date: 2003-07-22 08:00-0500\n"
+"PO-Revision-Date: 2003-08-05 08:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
@@ -66,12 +66,12 @@ msgstr "contrainte inconnue « %c »"
#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
-msgstr "opérande hors gamme (%ld n'est pas entre %ld et %ld)"
+msgstr "opérande hors limite (%ld n'est pas entre %ld et %ld)"
#: cgen-asm.c:369
#, c-format
msgid "operand out of range (%lu not between %lu and %lu)"
-msgstr "opérande hors gamme (%lu n'est pas entre %lu et %lu)"
+msgstr "opérande hors limite (%lu n'est pas entre %lu et %lu)"
#: d30v-dis.c:312
#, c-format
@@ -87,7 +87,7 @@ msgstr "Erreur inconnue %d\n"
#: dis-buf.c:62
#, c-format
msgid "Address 0x%x is out of bounds.\n"
-msgstr "Adresse 0x%x est hors gamme.\n"
+msgstr "Adresse 0x%x est hors limite.\n"
#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
#: openrisc-asm.c:261 xstormy16-asm.c:284
@@ -161,13 +161,13 @@ msgstr "Champ non reconnu %d lors de l'impression insn.\n"
#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
-msgstr "opérande hors gamme (%ld n'est pas entre %ld et %lu)"
+msgstr "opérande hors limite (%ld n'est pas entre %ld et %lu)"
#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
-msgstr "opérande hors gamme (%lu n'est pas entre 0 et %lu)"
+msgstr "opérande hors limite (%lu n'est pas entre 0 et %lu)"
#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
@@ -358,13 +358,13 @@ msgstr "décalage(IP) n'a pas un format valide"
#. of range.
#: ip2k-asm.c:175
msgid "(DP) offset out of range."
-msgstr "décalage (DP) est hors gamme."
+msgstr "décalage (DP) est hors limite."
#. Found something there in front of (SP) but it's out
#. of range.
#: ip2k-asm.c:221
msgid "(SP) offset out of range."
-msgstr "décalage (SP) est hors gamme."
+msgstr "décalage (SP) est hors limite."
#: ip2k-asm.c:241
msgid "illegal use of parentheses"
@@ -372,7 +372,7 @@ msgstr "usage illégal des parenthèses"
#: ip2k-asm.c:248
msgid "operand out of range (not between 1 and 255)"
-msgstr "opérande hors gamme (n'est pas entre 1 et 255)"
+msgstr "opérande hors limite (n'est pas entre 1 et 255)"
#. Something is very wrong. opindex has to be one of the above.
#: ip2k-asm.c:273
@@ -402,11 +402,11 @@ msgstr "valeur immédiate doit être un registre"
#: iq2000-asm.c:120 iq2000-asm.c:151
msgid "immediate value out of range"
-msgstr "valeur immédiate est hors gamme"
+msgstr "valeur immédiate est hors limite"
#: iq2000-asm.c:180
msgid "21-bit offset out of range"
-msgstr "décalage de 21 bits est hors gamme"
+msgstr "décalage de 21 bits est hors limite"
#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
#: openrisc-asm.c:96 openrisc-asm.c:155
@@ -647,7 +647,7 @@ msgstr "masque de bits illégal"
#: ppc-opc.c:1192
msgid "value out of range"
-msgstr "valeur hors gamme"
+msgstr "valeur hors limite"
#: ppc-opc.c:1262
msgid "index register in load range"
@@ -706,11 +706,11 @@ msgstr "registre de pile inconnu: %d\n"
#. specific command line option is given to GAS.
#: v850-opc.c:68
msgid "displacement value is not in range and is not aligned"
-msgstr "La valeur de déplacement est hors gamme et n'est pas alignée."
+msgstr "La valeur de déplacement est hors limite et n'est pas alignée."
#: v850-opc.c:69
msgid "displacement value is out of range"
-msgstr "valeur de déplacement est hors gamme"
+msgstr "valeur de déplacement est hors limite"
#: v850-opc.c:70
msgid "displacement value is not aligned"
@@ -718,15 +718,15 @@ msgstr "valeur de déplacement n'est pas alignée"
#: v850-opc.c:72
msgid "immediate value is out of range"
-msgstr "valeur immédiate est hors gamme"
+msgstr "valeur immédiate est hors limite"
#: v850-opc.c:83
msgid "branch value not in range and to odd offset"
-msgstr "valeur de branchement est hors gamme et a un décalage impair"
+msgstr "valeur de branchement est hors limite et a un décalage impair"
#: v850-opc.c:85 v850-opc.c:117
msgid "branch value out of range"
-msgstr "valeur de branchement hors gamme"
+msgstr "valeur de branchement hors limite"
#: v850-opc.c:88 v850-opc.c:120
msgid "branch to odd offset"
@@ -734,7 +734,7 @@ msgstr "Branchement avec un décalage impair"
#: v850-opc.c:115
msgid "branch value not in range and to an odd offset"
-msgstr "valeur de branchement est hors gamme et a un décalage impair"
+msgstr "valeur de branchement est hors limite et a un décalage impair"
#: v850-opc.c:346
msgid "invalid register for stack adjustment"
@@ -742,7 +742,7 @@ msgstr "registre invalide pour un ajustement de la pile"
#: v850-opc.c:370
msgid "immediate value not in range and not even"
-msgstr "valeur immédiate est hors gamme et est impaire"
+msgstr "valeur immédiate est hors limite et est impaire"
#: v850-opc.c:375
msgid "immediate value must be even"
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index b8b8b1ad59..76af4e7af1 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -30,18 +30,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
in both big and little endian mode and also for the POWER (RS/6000)
chip. */
-static int print_insn_powerpc PARAMS ((bfd_vma, struct disassemble_info *,
- int bigendian, int dialect));
+static int print_insn_powerpc (bfd_vma, struct disassemble_info *, int, int);
-static int powerpc_dialect PARAMS ((struct disassemble_info *));
+struct dis_private {
+ /* Stash the result of parsing disassembler_options here. */
+ int dialect;
+};
/* Determine which set of machines to disassemble for. PPC403/601 or
BookE. For convenience, also disassemble instructions supported
by the AltiVec vector unit. */
-int
-powerpc_dialect(info)
- struct disassemble_info *info;
+static int
+powerpc_dialect (struct disassemble_info *info)
{
int dialect = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
@@ -49,40 +50,39 @@ powerpc_dialect(info)
dialect |= PPC_OPCODE_64;
if (info->disassembler_options
- && (strcmp (info->disassembler_options, "booke") == 0
- || strcmp (info->disassembler_options, "booke32") == 0
- || strcmp (info->disassembler_options, "booke64") == 0))
+ && strstr (info->disassembler_options, "booke") != NULL)
dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_BOOKE64;
- else
- if ((info->mach == bfd_mach_ppc_e500)
- || (info->disassembler_options
- && ( strcmp (info->disassembler_options, "e500") == 0
- || strcmp (info->disassembler_options, "e500x2") == 0)))
- {
- dialect |= PPC_OPCODE_BOOKE
- | PPC_OPCODE_SPE | PPC_OPCODE_ISEL
- | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
- | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK
- | PPC_OPCODE_RFMCI;
- /* efs* and AltiVec conflict. */
- dialect &= ~PPC_OPCODE_ALTIVEC;
- }
- else
- if (info->disassembler_options
- && (strcmp (info->disassembler_options, "efs") == 0))
- {
- dialect |= PPC_OPCODE_EFS;
- /* efs* and AltiVec conflict. */
- dialect &= ~PPC_OPCODE_ALTIVEC;
- }
+ else if ((info->mach == bfd_mach_ppc_e500)
+ || (info->disassembler_options
+ && strstr (info->disassembler_options, "e500") != NULL))
+ {
+ dialect |= PPC_OPCODE_BOOKE
+ | PPC_OPCODE_SPE | PPC_OPCODE_ISEL
+ | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK
+ | PPC_OPCODE_RFMCI;
+ /* efs* and AltiVec conflict. */
+ dialect &= ~PPC_OPCODE_ALTIVEC;
+ }
+ else if (info->disassembler_options
+ && strstr (info->disassembler_options, "efs") != NULL)
+ {
+ dialect |= PPC_OPCODE_EFS;
+ /* efs* and AltiVec conflict. */
+ dialect &= ~PPC_OPCODE_ALTIVEC;
+ }
else
dialect |= (PPC_OPCODE_403 | PPC_OPCODE_601 | PPC_OPCODE_CLASSIC
| PPC_OPCODE_COMMON);
if (info->disassembler_options
- && strcmp (info->disassembler_options, "power4") == 0)
+ && strstr (info->disassembler_options, "power4") != NULL)
dialect |= PPC_OPCODE_POWER4;
+ if (info->disassembler_options
+ && strstr (info->disassembler_options, "any") != NULL)
+ dialect |= PPC_OPCODE_ANY;
+
if (info->disassembler_options)
{
if (strstr (info->disassembler_options, "32") != NULL)
@@ -91,35 +91,32 @@ powerpc_dialect(info)
dialect |= PPC_OPCODE_64;
}
+ ((struct dis_private *) &info->private_data)->dialect = dialect;
return dialect;
}
/* Print a big endian PowerPC instruction. */
int
-print_insn_big_powerpc (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
+print_insn_big_powerpc (bfd_vma memaddr, struct disassemble_info *info)
{
- return print_insn_powerpc (memaddr, info, 1, powerpc_dialect(info));
+ int dialect = ((struct dis_private *) &info->private_data)->dialect;
+ return print_insn_powerpc (memaddr, info, 1, dialect);
}
/* Print a little endian PowerPC instruction. */
int
-print_insn_little_powerpc (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
+print_insn_little_powerpc (bfd_vma memaddr, struct disassemble_info *info)
{
- return print_insn_powerpc (memaddr, info, 0, powerpc_dialect(info));
+ int dialect = ((struct dis_private *) &info->private_data)->dialect;
+ return print_insn_powerpc (memaddr, info, 0, dialect);
}
/* Print a POWER (RS/6000) instruction. */
int
-print_insn_rs6000 (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
+print_insn_rs6000 (bfd_vma memaddr, struct disassemble_info *info)
{
return print_insn_powerpc (memaddr, info, 1, PPC_OPCODE_POWER);
}
@@ -127,11 +124,10 @@ print_insn_rs6000 (memaddr, info)
/* Print a PowerPC or POWER instruction. */
static int
-print_insn_powerpc (memaddr, info, bigendian, dialect)
- bfd_vma memaddr;
- struct disassemble_info *info;
- int bigendian;
- int dialect;
+print_insn_powerpc (bfd_vma memaddr,
+ struct disassemble_info *info,
+ int bigendian,
+ int dialect)
{
bfd_byte buffer[4];
int status;
@@ -140,6 +136,9 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
const struct powerpc_opcode *opcode_end;
unsigned long op;
+ if (dialect == 0)
+ dialect = powerpc_dialect (info);
+
status = (*info->read_memory_func) (memaddr, buffer, 4, info);
if (status != 0)
{
@@ -158,6 +157,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
/* Find the first match in the opcode table. We could speed this up
a bit by doing a binary search on the major opcode. */
opcode_end = powerpc_opcodes + powerpc_num_opcodes;
+ again:
for (opcode = powerpc_opcodes; opcode < opcode_end; opcode++)
{
unsigned long table_op;
@@ -177,9 +177,6 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
|| (opcode->flags & dialect) == 0)
continue;
- if ((dialect & PPC_OPCODE_EFS) && (opcode->flags & PPC_OPCODE_ALTIVEC))
- continue;
-
/* Make two passes over the operands. First see if any of them
have extraction functions, and, if they do, make sure the
instruction is valid. */
@@ -288,6 +285,12 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
return 4;
}
+ if ((dialect & PPC_OPCODE_ANY) != 0)
+ {
+ dialect = ~PPC_OPCODE_ANY;
+ goto again;
+ }
+
/* We could not find a match. */
(*info->fprintf_func) (info->stream, ".long 0x%lx", insn);
@@ -295,7 +298,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
}
void
-print_ppc_disassembler_options (FILE * stream)
+print_ppc_disassembler_options (FILE *stream)
{
fprintf (stream, "\n\
The following PPC specific disassembler options are supported for use with\n\
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 0f04cfb846..c37943bd14 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -1001,7 +1001,8 @@ insert_fxm (unsigned long insn,
;
/* If only one bit of the FXM field is set, we can use the new form
- of the instruction, which is faster. */
+ of the instruction, which is faster. Unlike the Power4 branch hint
+ encoding, this is not backward compatible. */
else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
insn |= 1 << 20;
@@ -1762,26 +1763,26 @@ extract_tbr (unsigned long insn,
/* Smaller names for the flags so each entry in the opcodes table will
fit on a single line. */
#undef PPC
-#define PPC PPC_OPCODE_PPC | PPC_OPCODE_ANY
-#define PPCCOM PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
+#define PPC PPC_OPCODE_PPC
+#define PPCCOM PPC_OPCODE_PPC | PPC_OPCODE_COMMON
#define NOPOWER4 PPC_OPCODE_NOPOWER4 | PPCCOM
-#define POWER4 PPC_OPCODE_POWER4 | PPCCOM
-#define PPC32 PPC_OPCODE_32 | PPC_OPCODE_PPC | PPC_OPCODE_ANY
-#define PPC64 PPC_OPCODE_64 | PPC_OPCODE_PPC | PPC_OPCODE_ANY
-#define PPCONLY PPC_OPCODE_PPC
+#define POWER4 PPC_OPCODE_POWER4
+#define PPC32 PPC_OPCODE_32 | PPC_OPCODE_PPC
+#define PPC64 PPC_OPCODE_64 | PPC_OPCODE_PPC
#define PPC403 PPC_OPCODE_403
#define PPC405 PPC403
+#define PPC440 PPC_OPCODE_440
#define PPC750 PPC
#define PPC860 PPC
-#define PPCVEC PPC_OPCODE_ALTIVEC | PPC_OPCODE_ANY | PPC_OPCODE_PPC
-#define POWER PPC_OPCODE_POWER | PPC_OPCODE_ANY
-#define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_ANY
-#define PPCPWR2 PPC_OPCODE_PPC | PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_ANY
-#define POWER32 PPC_OPCODE_POWER | PPC_OPCODE_ANY | PPC_OPCODE_32
-#define COM PPC_OPCODE_POWER | PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
-#define COM32 PPC_OPCODE_POWER | PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY | PPC_OPCODE_32
-#define M601 PPC_OPCODE_POWER | PPC_OPCODE_601 | PPC_OPCODE_ANY
-#define PWRCOM PPC_OPCODE_POWER | PPC_OPCODE_601 | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
+#define PPCVEC PPC_OPCODE_ALTIVEC | PPC_OPCODE_PPC
+#define POWER PPC_OPCODE_POWER
+#define POWER2 PPC_OPCODE_POWER | PPC_OPCODE_POWER2
+#define PPCPWR2 PPC_OPCODE_PPC | PPC_OPCODE_POWER | PPC_OPCODE_POWER2
+#define POWER32 PPC_OPCODE_POWER | PPC_OPCODE_32
+#define COM PPC_OPCODE_POWER | PPC_OPCODE_PPC | PPC_OPCODE_COMMON
+#define COM32 PPC_OPCODE_POWER | PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_32
+#define M601 PPC_OPCODE_POWER | PPC_OPCODE_601
+#define PWRCOM PPC_OPCODE_POWER | PPC_OPCODE_601 | PPC_OPCODE_COMMON
#define MFDEC1 PPC_OPCODE_POWER
#define MFDEC2 PPC_OPCODE_PPC | PPC_OPCODE_601 | PPC_OPCODE_BOOKE
#define BOOKE PPC_OPCODE_BOOKE
@@ -1863,90 +1864,90 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "twi", OP(3), OP_MASK, PPCCOM, { TO, RA, SI } },
{ "ti", OP(3), OP_MASK, PWRCOM, { TO, RA, SI } },
-{ "macchw", XO(4,172,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchw.", XO(4,172,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwo", XO(4,172,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwo.", XO(4,172,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchws", XO(4,236,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchws.", XO(4,236,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwso", XO(4,236,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwso.", XO(4,236,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwsu", XO(4,204,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwsu.", XO(4,204,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwsuo", XO(4,204,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwsuo.", XO(4,204,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwu", XO(4,140,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwu.", XO(4,140,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwuo", XO(4,140,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "macchwuo.", XO(4,140,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhw", XO(4,44,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhw.", XO(4,44,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwo", XO(4,44,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwo.", XO(4,44,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhws", XO(4,108,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhws.", XO(4,108,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwso", XO(4,108,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwso.", XO(4,108,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwsu", XO(4,76,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwsu.", XO(4,76,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwsuo", XO(4,76,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwsuo.", XO(4,76,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwu", XO(4,12,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwu.", XO(4,12,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwuo", XO(4,12,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "machhwuo.", XO(4,12,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhw", XO(4,428,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhw.", XO(4,428,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwo", XO(4,428,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwo.", XO(4,428,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhws", XO(4,492,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhws.", XO(4,492,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwso", XO(4,492,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwso.", XO(4,492,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwsu", XO(4,460,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwsu.", XO(4,460,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwsuo", XO(4,460,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwsuo.", XO(4,460,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwu", XO(4,396,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwu.", XO(4,396,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwuo", XO(4,396,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "maclhwuo.", XO(4,396,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "mulchw", XRC(4,168,0), X_MASK, PPC405, { RT, RA, RB } },
-{ "mulchw.", XRC(4,168,1), X_MASK, PPC405, { RT, RA, RB } },
-{ "mulchwu", XRC(4,136,0), X_MASK, PPC405, { RT, RA, RB } },
-{ "mulchwu.", XRC(4,136,1), X_MASK, PPC405, { RT, RA, RB } },
-{ "mulhhw", XRC(4,40,0), X_MASK, PPC405, { RT, RA, RB } },
-{ "mulhhw.", XRC(4,40,1), X_MASK, PPC405, { RT, RA, RB } },
-{ "mulhhwu", XRC(4,8,0), X_MASK, PPC405, { RT, RA, RB } },
-{ "mulhhwu.", XRC(4,8,1), X_MASK, PPC405, { RT, RA, RB } },
-{ "mullhw", XRC(4,424,0), X_MASK, PPC405, { RT, RA, RB } },
-{ "mullhw.", XRC(4,424,1), X_MASK, PPC405, { RT, RA, RB } },
-{ "mullhwu", XRC(4,392,0), X_MASK, PPC405, { RT, RA, RB } },
-{ "mullhwu.", XRC(4,392,1), X_MASK, PPC405, { RT, RA, RB } },
-{ "nmacchw", XO(4,174,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmacchw.", XO(4,174,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmacchwo", XO(4,174,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmacchwo.", XO(4,174,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmacchws", XO(4,238,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmacchws.", XO(4,238,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmacchwso", XO(4,238,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmacchwso.", XO(4,238,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmachhw", XO(4,46,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmachhw.", XO(4,46,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmachhwo", XO(4,46,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmachhwo.", XO(4,46,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmachhws", XO(4,110,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmachhws.", XO(4,110,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmachhwso", XO(4,110,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmachhwso.", XO(4,110,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmaclhw", XO(4,430,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmaclhw.", XO(4,430,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmaclhwo", XO(4,430,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmaclhwo.", XO(4,430,1,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmaclhws", XO(4,494,0,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmaclhws.", XO(4,494,0,1), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmaclhwso", XO(4,494,1,0), XO_MASK, PPC405, { RT, RA, RB } },
-{ "nmaclhwso.", XO(4,494,1,1), XO_MASK, PPC405, { RT, RA, RB } },
+{ "macchw", XO(4,172,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchw.", XO(4,172,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwo", XO(4,172,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwo.", XO(4,172,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchws", XO(4,236,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchws.", XO(4,236,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwso", XO(4,236,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwso.", XO(4,236,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwsu", XO(4,204,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwsu.", XO(4,204,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwsuo", XO(4,204,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwsuo.", XO(4,204,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwu", XO(4,140,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwu.", XO(4,140,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwuo", XO(4,140,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "macchwuo.", XO(4,140,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhw", XO(4,44,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhw.", XO(4,44,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwo", XO(4,44,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwo.", XO(4,44,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhws", XO(4,108,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhws.", XO(4,108,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwso", XO(4,108,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwso.", XO(4,108,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwsu", XO(4,76,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwsu.", XO(4,76,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwsuo", XO(4,76,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwsuo.", XO(4,76,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwu", XO(4,12,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwu.", XO(4,12,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwuo", XO(4,12,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "machhwuo.", XO(4,12,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhw", XO(4,428,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhw.", XO(4,428,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwo", XO(4,428,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwo.", XO(4,428,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhws", XO(4,492,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhws.", XO(4,492,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwso", XO(4,492,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwso.", XO(4,492,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwsu", XO(4,460,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwsu.", XO(4,460,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwsuo", XO(4,460,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwsuo.", XO(4,460,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwu", XO(4,396,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwu.", XO(4,396,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwuo", XO(4,396,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "maclhwuo.", XO(4,396,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mulchw", XRC(4,168,0), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mulchw.", XRC(4,168,1), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mulchwu", XRC(4,136,0), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mulchwu.", XRC(4,136,1), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mulhhw", XRC(4,40,0), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mulhhw.", XRC(4,40,1), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mulhhwu", XRC(4,8,0), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mulhhwu.", XRC(4,8,1), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mullhw", XRC(4,424,0), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mullhw.", XRC(4,424,1), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mullhwu", XRC(4,392,0), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "mullhwu.", XRC(4,392,1), X_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmacchw", XO(4,174,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmacchw.", XO(4,174,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmacchwo", XO(4,174,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmacchwo.", XO(4,174,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmacchws", XO(4,238,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmacchws.", XO(4,238,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmacchwso", XO(4,238,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmacchwso.", XO(4,238,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmachhw", XO(4,46,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmachhw.", XO(4,46,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmachhwo", XO(4,46,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmachhwo.", XO(4,46,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmachhws", XO(4,110,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmachhws.", XO(4,110,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmachhwso", XO(4,110,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmachhwso.", XO(4,110,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmaclhw", XO(4,430,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmaclhw.", XO(4,430,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmaclhwo", XO(4,430,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmaclhwo.", XO(4,430,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmaclhws", XO(4,494,0,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmaclhws.", XO(4,494,0,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmaclhwso", XO(4,494,1,0), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
+{ "nmaclhwso.", XO(4,494,1,1), XO_MASK, PPC405|PPC440, { RT, RA, RB } },
{ "mfvscr", VX(4, 1540), VX_MASK, PPCVEC, { VD } },
{ "mtvscr", VX(4, 1604), VX_MASK, PPCVEC, { VB } },
{ "vaddcuw", VX(4, 384), VX_MASK, PPCVEC, { VD, VA, VB } },
@@ -2368,12 +2369,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "cmplwi", OPL(10,0), OPL_MASK, PPCCOM, { OBF, RA, UI } },
{ "cmpldi", OPL(10,1), OPL_MASK, PPC64, { OBF, RA, UI } },
-{ "cmpli", OP(10), OP_MASK, PPCONLY, { BF, L, RA, UI } },
+{ "cmpli", OP(10), OP_MASK, PPC, { BF, L, RA, UI } },
{ "cmpli", OP(10), OP_MASK, PWRCOM, { BF, RA, UI } },
{ "cmpwi", OPL(11,0), OPL_MASK, PPCCOM, { OBF, RA, SI } },
{ "cmpdi", OPL(11,1), OPL_MASK, PPC64, { OBF, RA, SI } },
-{ "cmpi", OP(11), OP_MASK, PPCONLY, { BF, L, RA, SI } },
+{ "cmpi", OP(11), OP_MASK, PPC, { BF, L, RA, SI } },
{ "cmpi", OP(11), OP_MASK, PWRCOM, { BF, RA, SI } },
{ "addic", OP(12), OP_MASK, PPCCOM, { RT, RA, SI } },
@@ -2681,186 +2682,186 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "brl", XLO(19,BOU,16,1), XLBOBIBB_MASK, PWRCOM, { 0 } },
{ "bdnzlr", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "bdnzlr-", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, NOPOWER4, { 0 } },
-{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, NOPOWER4, { 0 } },
{ "bdnzlr-", XLO(19,BODNZM4,16,0), XLBOBIBB_MASK, POWER4, { 0 } },
+{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, NOPOWER4, { 0 } },
{ "bdnzlr+", XLO(19,BODNZP4,16,0), XLBOBIBB_MASK, POWER4, { 0 } },
{ "bdnzlrl", XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "bdnzlrl-",XLO(19,BODNZ,16,1), XLBOBIBB_MASK, NOPOWER4, { 0 } },
-{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, NOPOWER4, { 0 } },
{ "bdnzlrl-",XLO(19,BODNZM4,16,1), XLBOBIBB_MASK, POWER4, { 0 } },
+{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, NOPOWER4, { 0 } },
{ "bdnzlrl+",XLO(19,BODNZP4,16,1), XLBOBIBB_MASK, POWER4, { 0 } },
{ "bdzlr", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "bdzlr-", XLO(19,BODZ,16,0), XLBOBIBB_MASK, NOPOWER4, { 0 } },
-{ "bdzlr+", XLO(19,BODZP,16,0), XLBOBIBB_MASK, NOPOWER4, { 0 } },
{ "bdzlr-", XLO(19,BODZM4,16,0), XLBOBIBB_MASK, POWER4, { 0 } },
+{ "bdzlr+", XLO(19,BODZP,16,0), XLBOBIBB_MASK, NOPOWER4, { 0 } },
{ "bdzlr+", XLO(19,BODZP4,16,0), XLBOBIBB_MASK, POWER4, { 0 } },
{ "bdzlrl", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
{ "bdzlrl-", XLO(19,BODZ,16,1), XLBOBIBB_MASK, NOPOWER4, { 0 } },
-{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, NOPOWER4, { 0 } },
{ "bdzlrl-", XLO(19,BODZM4,16,1), XLBOBIBB_MASK, POWER4, { 0 } },
+{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, NOPOWER4, { 0 } },
{ "bdzlrl+", XLO(19,BODZP4,16,1), XLBOBIBB_MASK, POWER4, { 0 } },
{ "bltlr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bltlr-", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bltlr+", XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bltlr-", XLOCB(19,BOTM4,CBLT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bltlr+", XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bltlr+", XLOCB(19,BOTP4,CBLT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bltr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bltlrl", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bltlrl-", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bltlrl-", XLOCB(19,BOTM4,CBLT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bltlrl+", XLOCB(19,BOTP4,CBLT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bltrl", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bgtlr", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgtlr-", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bgtlr+", XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgtlr-", XLOCB(19,BOTM4,CBGT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bgtlr+", XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgtlr+", XLOCB(19,BOTP4,CBGT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bgtr", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bgtlrl", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgtlrl-", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgtlrl-", XLOCB(19,BOTM4,CBGT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgtlrl+", XLOCB(19,BOTP4,CBGT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bgtrl", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "beqlr", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "beqlr-", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "beqlr+", XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "beqlr-", XLOCB(19,BOTM4,CBEQ,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "beqlr+", XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "beqlr+", XLOCB(19,BOTP4,CBEQ,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "beqr", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "beqlrl", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "beqlrl-", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "beqlrl-", XLOCB(19,BOTM4,CBEQ,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "beqlrl+", XLOCB(19,BOTP4,CBEQ,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "beqrl", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bsolr", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bsolr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bsolr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bsolr-", XLOCB(19,BOTM4,CBSO,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bsolr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bsolr+", XLOCB(19,BOTP4,CBSO,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bsor", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bsolrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bsolrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bsolrl-", XLOCB(19,BOTM4,CBSO,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bsolrl+", XLOCB(19,BOTP4,CBSO,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bsorl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bunlr", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bunlr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bunlr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bunlr-", XLOCB(19,BOTM4,CBSO,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bunlr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bunlr+", XLOCB(19,BOTP4,CBSO,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bunlrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bunlrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bunlrl-", XLOCB(19,BOTM4,CBSO,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bunlrl+", XLOCB(19,BOTP4,CBSO,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bgelr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgelr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bgelr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgelr-", XLOCB(19,BOFM4,CBLT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bgelr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgelr+", XLOCB(19,BOFP4,CBLT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bger", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bgelrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgelrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgelrl-", XLOCB(19,BOFM4,CBLT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgelrl+", XLOCB(19,BOFP4,CBLT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bgerl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnllr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnllr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnllr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnllr-", XLOCB(19,BOFM4,CBLT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnllr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnllr+", XLOCB(19,BOFP4,CBLT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnlr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnllrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnllrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnllrl-", XLOCB(19,BOFM4,CBLT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnllrl+", XLOCB(19,BOFP4,CBLT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnlrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "blelr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "blelr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "blelr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "blelr-", XLOCB(19,BOFM4,CBGT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "blelr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "blelr+", XLOCB(19,BOFP4,CBGT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bler", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "blelrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "blelrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "blelrl-", XLOCB(19,BOFM4,CBGT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "blelrl+", XLOCB(19,BOFP4,CBGT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "blerl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnglr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnglr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnglr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnglr-", XLOCB(19,BOFM4,CBGT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnglr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnglr+", XLOCB(19,BOFP4,CBGT,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bngr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnglrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnglrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnglrl-", XLOCB(19,BOFM4,CBGT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnglrl+", XLOCB(19,BOFP4,CBGT,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bngrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnelr", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnelr-", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnelr+", XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnelr-", XLOCB(19,BOFM4,CBEQ,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnelr+", XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnelr+", XLOCB(19,BOFP4,CBEQ,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bner", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnelrl", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnelrl-", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnelrl-", XLOCB(19,BOFM4,CBEQ,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnelrl+", XLOCB(19,BOFP4,CBEQ,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnerl", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnslr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnslr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnslr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnslr-", XLOCB(19,BOFM4,CBSO,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnslr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnslr+", XLOCB(19,BOFP4,CBSO,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnsr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnslrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnslrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnslrl-", XLOCB(19,BOFM4,CBSO,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnslrl+", XLOCB(19,BOFP4,CBSO,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnsrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
{ "bnulr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnulr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnulr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnulr-", XLOCB(19,BOFM4,CBSO,16,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnulr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnulr+", XLOCB(19,BOFP4,CBSO,16,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnulrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnulrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnulrl-", XLOCB(19,BOFM4,CBSO,16,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnulrl+", XLOCB(19,BOFP4,CBSO,16,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "btlr", XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "btlr-", XLO(19,BOT,16,0), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "btlr+", XLO(19,BOTP,16,0), XLBOBB_MASK, NOPOWER4, { BI } },
{ "btlr-", XLO(19,BOTM4,16,0), XLBOBB_MASK, POWER4, { BI } },
+{ "btlr+", XLO(19,BOTP,16,0), XLBOBB_MASK, NOPOWER4, { BI } },
{ "btlr+", XLO(19,BOTP4,16,0), XLBOBB_MASK, POWER4, { BI } },
{ "bbtr", XLO(19,BOT,16,0), XLBOBB_MASK, PWRCOM, { BI } },
{ "btlrl", XLO(19,BOT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "btlrl-", XLO(19,BOT,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "btlrl+", XLO(19,BOTP,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "btlrl-", XLO(19,BOTM4,16,1), XLBOBB_MASK, POWER4, { BI } },
+{ "btlrl+", XLO(19,BOTP,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "btlrl+", XLO(19,BOTP4,16,1), XLBOBB_MASK, POWER4, { BI } },
{ "bbtrl", XLO(19,BOT,16,1), XLBOBB_MASK, PWRCOM, { BI } },
{ "bflr", XLO(19,BOF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bflr-", XLO(19,BOF,16,0), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "bflr+", XLO(19,BOFP,16,0), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bflr-", XLO(19,BOFM4,16,0), XLBOBB_MASK, POWER4, { BI } },
+{ "bflr+", XLO(19,BOFP,16,0), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bflr+", XLO(19,BOFP4,16,0), XLBOBB_MASK, POWER4, { BI } },
{ "bbfr", XLO(19,BOF,16,0), XLBOBB_MASK, PWRCOM, { BI } },
{ "bflrl", XLO(19,BOF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bflrl-", XLO(19,BOF,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "bflrl+", XLO(19,BOFP,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bflrl-", XLO(19,BOFM4,16,1), XLBOBB_MASK, POWER4, { BI } },
+{ "bflrl+", XLO(19,BOFP,16,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bflrl+", XLO(19,BOFP4,16,1), XLBOBB_MASK, POWER4, { BI } },
{ "bbfrl", XLO(19,BOF,16,1), XLBOBB_MASK, PWRCOM, { BI } },
{ "bdnztlr", XLO(19,BODNZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
@@ -2905,8 +2906,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "rfmci", X(19,38), 0xffffffff, PPCRFMCI, { 0 } },
{ "rfi", XL(19,50), 0xffffffff, COM, { 0 } },
-{ "rfci", XL(19,51), 0xffffffff, PPC403, { 0 } },
-{ "rfci", XL(19,51), 0xffffffff, BOOKE, { 0 } },
+{ "rfci", XL(19,51), 0xffffffff, PPC403 | BOOKE, { 0 } },
{ "rfsvc", XL(19,82), 0xffffffff, POWER, { 0 } },
@@ -2934,143 +2934,143 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bctrl", XLO(19,BOU,528,1), XLBOBIBB_MASK, COM, { 0 } },
{ "bltctr", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bltctr-", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bltctr-", XLOCB(19,BOTM4,CBLT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bltctr+", XLOCB(19,BOTP4,CBLT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bltctrl", XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bltctrl-",XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bltctrl-",XLOCB(19,BOTM4,CBLT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bltctrl+",XLOCB(19,BOTP4,CBLT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bgtctr", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgtctr-", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgtctr-", XLOCB(19,BOTM4,CBGT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgtctr+", XLOCB(19,BOTP4,CBGT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bgtctrl", XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgtctrl-",XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgtctrl-",XLOCB(19,BOTM4,CBGT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgtctrl+",XLOCB(19,BOTP4,CBGT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "beqctr", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "beqctr-", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "beqctr-", XLOCB(19,BOTM4,CBEQ,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "beqctr+", XLOCB(19,BOTP4,CBEQ,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "beqctrl", XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "beqctrl-",XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "beqctrl-",XLOCB(19,BOTM4,CBEQ,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "beqctrl+",XLOCB(19,BOTP4,CBEQ,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bsoctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bsoctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bsoctr-", XLOCB(19,BOTM4,CBSO,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bsoctr+", XLOCB(19,BOTP4,CBSO,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bsoctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bsoctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bsoctrl-",XLOCB(19,BOTM4,CBSO,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bsoctrl+",XLOCB(19,BOTP4,CBSO,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bunctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bunctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bunctr-", XLOCB(19,BOTM4,CBSO,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bunctr+", XLOCB(19,BOTP4,CBSO,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bunctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bunctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bunctrl-",XLOCB(19,BOTM4,CBSO,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bunctrl+",XLOCB(19,BOTP4,CBSO,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bgectr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgectr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgectr-", XLOCB(19,BOFM4,CBLT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgectr+", XLOCB(19,BOFP4,CBLT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bgectrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bgectrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgectrl-",XLOCB(19,BOFM4,CBLT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bgectrl+",XLOCB(19,BOFP4,CBLT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnlctr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnlctr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnlctr-", XLOCB(19,BOFM4,CBLT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnlctr+", XLOCB(19,BOFP4,CBLT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnlctrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnlctrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnlctrl-",XLOCB(19,BOFM4,CBLT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnlctrl+",XLOCB(19,BOFP4,CBLT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "blectr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "blectr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "blectr-", XLOCB(19,BOFM4,CBGT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "blectr+", XLOCB(19,BOFP4,CBGT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "blectrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "blectrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "blectrl-",XLOCB(19,BOFM4,CBGT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "blectrl+",XLOCB(19,BOFP4,CBGT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bngctr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bngctr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bngctr-", XLOCB(19,BOFM4,CBGT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bngctr+", XLOCB(19,BOFP4,CBGT,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bngctrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bngctrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bngctrl-",XLOCB(19,BOFM4,CBGT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bngctrl+",XLOCB(19,BOFP4,CBGT,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnectr", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnectr-", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnectr-", XLOCB(19,BOFM4,CBEQ,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnectr+", XLOCB(19,BOFP4,CBEQ,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnectrl", XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnectrl-",XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnectrl-",XLOCB(19,BOFM4,CBEQ,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnectrl+",XLOCB(19,BOFP4,CBEQ,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnsctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnsctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnsctr-", XLOCB(19,BOFM4,CBSO,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnsctr+", XLOCB(19,BOFP4,CBSO,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnsctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnsctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnsctrl-",XLOCB(19,BOFM4,CBSO,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnsctrl+",XLOCB(19,BOFP4,CBSO,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnuctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnuctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnuctr-", XLOCB(19,BOFM4,CBSO,528,0), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnuctr+", XLOCB(19,BOFP4,CBSO,528,0), XLBOCBBB_MASK, POWER4, { CR } },
{ "bnuctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
{ "bnuctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
-{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnuctrl-",XLOCB(19,BOFM4,CBSO,528,1), XLBOCBBB_MASK, POWER4, { CR } },
+{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, NOPOWER4, { CR } },
{ "bnuctrl+",XLOCB(19,BOFP4,CBSO,528,1), XLBOCBBB_MASK, POWER4, { CR } },
{ "btctr", XLO(19,BOT,528,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "btctr-", XLO(19,BOT,528,0), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "btctr+", XLO(19,BOTP,528,0), XLBOBB_MASK, NOPOWER4, { BI } },
{ "btctr-", XLO(19,BOTM4,528,0), XLBOBB_MASK, POWER4, { BI } },
+{ "btctr+", XLO(19,BOTP,528,0), XLBOBB_MASK, NOPOWER4, { BI } },
{ "btctr+", XLO(19,BOTP4,528,0), XLBOBB_MASK, POWER4, { BI } },
{ "btctrl", XLO(19,BOT,528,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "btctrl-", XLO(19,BOT,528,1), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "btctrl-", XLO(19,BOTM4,528,1), XLBOBB_MASK, POWER4, { BI } },
+{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "btctrl+", XLO(19,BOTP4,528,1), XLBOBB_MASK, POWER4, { BI } },
{ "bfctr", XLO(19,BOF,528,0), XLBOBB_MASK, PPCCOM, { BI } },
{ "bfctr-", XLO(19,BOF,528,0), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "bfctr+", XLO(19,BOFP,528,0), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bfctr-", XLO(19,BOFM4,528,0), XLBOBB_MASK, POWER4, { BI } },
+{ "bfctr+", XLO(19,BOFP,528,0), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bfctr+", XLO(19,BOFP4,528,0), XLBOBB_MASK, POWER4, { BI } },
{ "bfctrl", XLO(19,BOF,528,1), XLBOBB_MASK, PPCCOM, { BI } },
{ "bfctrl-", XLO(19,BOF,528,1), XLBOBB_MASK, NOPOWER4, { BI } },
-{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bfctrl-", XLO(19,BOFM4,528,1), XLBOBB_MASK, POWER4, { BI } },
+{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, NOPOWER4, { BI } },
{ "bfctrl+", XLO(19,BOFP4,528,1), XLBOBB_MASK, POWER4, { BI } },
{ "bcctr", XLLK(19,528,0), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bcctr-", XLYLK(19,528,0,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
@@ -3158,7 +3158,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "cmpw", XCMPL(31,0,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
{ "cmpd", XCMPL(31,0,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
-{ "cmp", X(31,0), XCMP_MASK, PPCONLY, { BF, L, RA, RB } },
+{ "cmp", X(31,0), XCMP_MASK, PPC, { BF, L, RA, RB } },
{ "cmp", X(31,0), XCMPL_MASK, PWRCOM, { BF, RA, RB } },
{ "twlgt", XTO(31,4,TOLGT), XTO_MASK, PPCCOM, { RA, RB } },
@@ -3234,6 +3234,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "ldx", X(31,21), X_MASK, PPC64, { RT, RA, RB } },
{ "icbt", X(31,22), X_MASK, BOOKE, { CT, RA, RB } },
+{ "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } },
{ "lwzx", X(31,23), X_MASK, PPCCOM, { RT, RA, RB } },
{ "lx", X(31,23), X_MASK, PWRCOM, { RT, RA, RB } },
@@ -3263,7 +3264,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "cmplw", XCMPL(31,32,0), XCMPL_MASK, PPCCOM, { OBF, RA, RB } },
{ "cmpld", XCMPL(31,32,1), XCMPL_MASK, PPC64, { OBF, RA, RB } },
-{ "cmpl", X(31,32), XCMP_MASK, PPCONLY, { BF, L, RA, RB } },
+{ "cmpl", X(31,32), XCMP_MASK, PPC, { BF, L, RA, RB } },
{ "cmpl", X(31,32), XCMPL_MASK, PWRCOM, { BF, RA, RB } },
{ "subf", XO(31,40,0,0), XO_MASK, PPC, { RT, RA, RB } },
@@ -3314,6 +3315,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mulhw", XO(31,75,0,0), XO_MASK, PPC, { RT, RA, RB } },
{ "mulhw.", XO(31,75,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "dlmzb", XRC(31,78,0), X_MASK, PPC403|PPC440, { RA, RS, RB } },
+{ "dlmzb.", XRC(31,78,1), X_MASK, PPC403|PPC440, { RA, RS, RB } },
+
{ "mtsrd", X(31,82), XRB_MASK|(1<<20), PPC64, { SR, RS } },
{ "mfmsr", X(31,83), XRARB_MASK, COM, { RT } },
@@ -3353,8 +3357,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lbzuxe", X(31,127), X_MASK, BOOKE64, { RT, RAL, RB } },
-{ "wrtee", X(31,131), XRARB_MASK, PPC403, { RS } },
-{ "wrtee", X(31,131), XRARB_MASK, BOOKE, { RS } },
+{ "wrtee", X(31,131), XRARB_MASK, PPC403 | BOOKE, { RS } },
{ "dcbtstls",X(31,134), X_MASK, PPCCHLK, { CT, RA, RB }},
@@ -3400,8 +3403,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sle", XRC(31,153,0), X_MASK, M601, { RA, RS, RB } },
{ "sle.", XRC(31,153,1), X_MASK, M601, { RA, RS, RB } },
-{ "wrteei", X(31,163), XE_MASK, PPC403, { E } },
-{ "wrteei", X(31,163), XE_MASK, BOOKE, { E } },
+{ "wrteei", X(31,163), XE_MASK, PPC403 | BOOKE, { E } },
{ "dcbtls", X(31,166), X_MASK, PPCCHLK, { CT, RA, RB }},
{ "dcbtlse", X(31,174), X_MASK, PPCCHLK64, { CT, RA, RB }},
@@ -3501,8 +3503,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfdcrx", X(31,259), X_MASK, BOOKE, { RS, RA } },
-{ "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } },
-
{ "doz", XO(31,264,0,0), XO_MASK, M601, { RT, RA, RB } },
{ "doz.", XO(31,264,0,1), XO_MASK, M601, { RT, RA, RB } },
{ "dozo", XO(31,264,1,0), XO_MASK, M601, { RT, RA, RB } },
@@ -3581,8 +3581,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfdmasa3", XSPR(31,323,219), XSPR_MASK, PPC403, { RT } },
{ "mfdmacc3", XSPR(31,323,220), XSPR_MASK, PPC403, { RT } },
{ "mfdmasr", XSPR(31,323,224), XSPR_MASK, PPC403, { RT } },
-{ "mfdcr", X(31,323), X_MASK, PPC403, { RT, SPR } },
-{ "mfdcr", X(31,323), X_MASK, BOOKE, { RT, SPR } },
+{ "mfdcr", X(31,323), X_MASK, PPC403 | BOOKE, { RT, SPR } },
{ "div", XO(31,331,0,0), XO_MASK, M601, { RT, RA, RB } },
{ "div.", XO(31,331,0,1), XO_MASK, M601, { RT, RA, RB } },
@@ -3596,21 +3595,24 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfrtcu", XSPR(31,339,4), XSPR_MASK, COM, { RT } },
{ "mfrtcl", XSPR(31,339,5), XSPR_MASK, COM, { RT } },
{ "mfdec", XSPR(31,339,6), XSPR_MASK, MFDEC1, { RT } },
+{ "mfdec", XSPR(31,339,22), XSPR_MASK, MFDEC2, { RT } },
{ "mflr", XSPR(31,339,8), XSPR_MASK, COM, { RT } },
{ "mfctr", XSPR(31,339,9), XSPR_MASK, COM, { RT } },
{ "mftid", XSPR(31,339,17), XSPR_MASK, POWER, { RT } },
{ "mfdsisr", XSPR(31,339,18), XSPR_MASK, COM, { RT } },
{ "mfdar", XSPR(31,339,19), XSPR_MASK, COM, { RT } },
-{ "mfdec", XSPR(31,339,22), XSPR_MASK, MFDEC2, { RT } },
{ "mfsdr0", XSPR(31,339,24), XSPR_MASK, POWER, { RT } },
{ "mfsdr1", XSPR(31,339,25), XSPR_MASK, COM, { RT } },
{ "mfsrr0", XSPR(31,339,26), XSPR_MASK, COM, { RT } },
{ "mfsrr1", XSPR(31,339,27), XSPR_MASK, COM, { RT } },
{ "mfpid", XSPR(31,339,48), XSPR_MASK, BOOKE, { RT } },
+{ "mfpid", XSPR(31,339,945), XSPR_MASK, PPC403, { RT } },
{ "mfcsrr0", XSPR(31,339,58), XSPR_MASK, BOOKE, { RT } },
{ "mfcsrr1", XSPR(31,339,59), XSPR_MASK, BOOKE, { RT } },
{ "mfdear", XSPR(31,339,61), XSPR_MASK, BOOKE, { RT } },
+{ "mfdear", XSPR(31,339,981), XSPR_MASK, PPC403, { RT } },
{ "mfesr", XSPR(31,339,62), XSPR_MASK, BOOKE, { RT } },
+{ "mfesr", XSPR(31,339,980), XSPR_MASK, PPC403, { RT } },
{ "mfivpr", XSPR(31,339,63), XSPR_MASK, BOOKE, { RT } },
{ "mfcmpa", XSPR(31,339,144), XSPR_MASK, PPC860, { RT } },
{ "mfcmpb", XSPR(31,339,145), XSPR_MASK, PPC860, { RT } },
@@ -3634,8 +3636,11 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfsprg5", XSPR(31,339,261), XSPR_MASK, PPC405, { RT } },
{ "mfsprg6", XSPR(31,339,262), XSPR_MASK, PPC405, { RT } },
{ "mfsprg7", XSPR(31,339,263), XSPR_MASK, PPC405, { RT } },
+{ "mftb", X(31,371), X_MASK, CLASSIC, { RT, TBR } },
{ "mftb", XSPR(31,339,268), XSPR_MASK, BOOKE, { RT } },
+{ "mftbl", XSPR(31,371,268), XSPR_MASK, CLASSIC, { RT } },
{ "mftbl", XSPR(31,339,268), XSPR_MASK, BOOKE, { RT } },
+{ "mftbu", XSPR(31,371,269), XSPR_MASK, CLASSIC, { RT } },
{ "mftbu", XSPR(31,339,269), XSPR_MASK, BOOKE, { RT } },
{ "mfsprg", XSPR(31,339,272), XSPRG_MASK, PPC, { RT, SPRG } },
{ "mfsprg0", XSPR(31,339,272), XSPR_MASK, PPC, { RT } },
@@ -3647,19 +3652,32 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfpir", XSPR(31,339,286), XSPR_MASK, BOOKE, { RT } },
{ "mfpvr", XSPR(31,339,287), XSPR_MASK, PPC, { RT } },
{ "mfdbsr", XSPR(31,339,304), XSPR_MASK, BOOKE, { RT } },
+{ "mfdbsr", XSPR(31,339,1008), XSPR_MASK, PPC403, { RT } },
{ "mfdbcr0", XSPR(31,339,308), XSPR_MASK, BOOKE, { RT } },
+{ "mfdbcr0", XSPR(31,339,1010), XSPR_MASK, PPC405, { RT } },
{ "mfdbcr1", XSPR(31,339,309), XSPR_MASK, BOOKE, { RT } },
+{ "mfdbcr1", XSPR(31,339,957), XSPR_MASK, PPC405, { RT } },
{ "mfdbcr2", XSPR(31,339,310), XSPR_MASK, BOOKE, { RT } },
{ "mfiac1", XSPR(31,339,312), XSPR_MASK, BOOKE, { RT } },
+{ "mfiac1", XSPR(31,339,1012), XSPR_MASK, PPC403, { RT } },
{ "mfiac2", XSPR(31,339,313), XSPR_MASK, BOOKE, { RT } },
+{ "mfiac2", XSPR(31,339,1013), XSPR_MASK, PPC403, { RT } },
{ "mfiac3", XSPR(31,339,314), XSPR_MASK, BOOKE, { RT } },
+{ "mfiac3", XSPR(31,339,948), XSPR_MASK, PPC405, { RT } },
{ "mfiac4", XSPR(31,339,315), XSPR_MASK, BOOKE, { RT } },
+{ "mfiac4", XSPR(31,339,949), XSPR_MASK, PPC405, { RT } },
{ "mfdac1", XSPR(31,339,316), XSPR_MASK, BOOKE, { RT } },
+{ "mfdac1", XSPR(31,339,1014), XSPR_MASK, PPC403, { RT } },
{ "mfdac2", XSPR(31,339,317), XSPR_MASK, BOOKE, { RT } },
+{ "mfdac2", XSPR(31,339,1015), XSPR_MASK, PPC403, { RT } },
{ "mfdvc1", XSPR(31,339,318), XSPR_MASK, BOOKE, { RT } },
+{ "mfdvc1", XSPR(31,339,950), XSPR_MASK, PPC405, { RT } },
{ "mfdvc2", XSPR(31,339,319), XSPR_MASK, BOOKE, { RT } },
+{ "mfdvc2", XSPR(31,339,951), XSPR_MASK, PPC405, { RT } },
{ "mftsr", XSPR(31,339,336), XSPR_MASK, BOOKE, { RT } },
+{ "mftsr", XSPR(31,339,984), XSPR_MASK, PPC403, { RT } },
{ "mftcr", XSPR(31,339,340), XSPR_MASK, BOOKE, { RT } },
+{ "mftcr", XSPR(31,339,986), XSPR_MASK, PPC403, { RT } },
{ "mfivor0", XSPR(31,339,400), XSPR_MASK, BOOKE, { RT } },
{ "mfivor1", XSPR(31,339,401), XSPR_MASK, BOOKE, { RT } },
{ "mfivor2", XSPR(31,339,402), XSPR_MASK, BOOKE, { RT } },
@@ -3722,12 +3740,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfupmc3", XSPR(31,339,941), XSPR_MASK, PPC750, { RT } },
{ "mfupmc4", XSPR(31,339,942), XSPR_MASK, PPC750, { RT } },
{ "mfzpr", XSPR(31,339,944), XSPR_MASK, PPC403, { RT } },
-{ "mfpid", XSPR(31,339,945), XSPR_MASK, PPC403, { RT } },
{ "mfccr0", XSPR(31,339,947), XSPR_MASK, PPC405, { RT } },
-{ "mfiac3", XSPR(31,339,948), XSPR_MASK, PPC405, { RT } },
-{ "mfiac4", XSPR(31,339,949), XSPR_MASK, PPC405, { RT } },
-{ "mfdvc1", XSPR(31,339,950), XSPR_MASK, PPC405, { RT } },
-{ "mfdvc2", XSPR(31,339,951), XSPR_MASK, PPC405, { RT } },
{ "mfmmcr0", XSPR(31,339,952), XSPR_MASK, PPC750, { RT } },
{ "mfpmc1", XSPR(31,339,953), XSPR_MASK, PPC750, { RT } },
{ "mfsgr", XSPR(31,339,953), XSPR_MASK, PPC403, { RT } },
@@ -3738,26 +3751,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfmmcr1", XSPR(31,339,956), XSPR_MASK, PPC750, { RT } },
{ "mfsu0r", XSPR(31,339,956), XSPR_MASK, PPC405, { RT } },
{ "mfpmc3", XSPR(31,339,957), XSPR_MASK, PPC750, { RT } },
-{ "mfdbcr1", XSPR(31,339,957), XSPR_MASK, PPC405, { RT } },
{ "mfpmc4", XSPR(31,339,958), XSPR_MASK, PPC750, { RT } },
{ "mficdbdr", XSPR(31,339,979), XSPR_MASK, PPC403, { RT } },
-{ "mfesr", XSPR(31,339,980), XSPR_MASK, PPC403, { RT } },
-{ "mfdear", XSPR(31,339,981), XSPR_MASK, PPC403, { RT } },
{ "mfevpr", XSPR(31,339,982), XSPR_MASK, PPC403, { RT } },
{ "mfcdbcr", XSPR(31,339,983), XSPR_MASK, PPC403, { RT } },
-{ "mftsr", XSPR(31,339,984), XSPR_MASK, PPC403, { RT } },
-{ "mftcr", XSPR(31,339,986), XSPR_MASK, PPC403, { RT } },
{ "mfpit", XSPR(31,339,987), XSPR_MASK, PPC403, { RT } },
{ "mftbhi", XSPR(31,339,988), XSPR_MASK, PPC403, { RT } },
{ "mftblo", XSPR(31,339,989), XSPR_MASK, PPC403, { RT } },
{ "mfsrr2", XSPR(31,339,990), XSPR_MASK, PPC403, { RT } },
{ "mfsrr3", XSPR(31,339,991), XSPR_MASK, PPC403, { RT } },
-{ "mfdbsr", XSPR(31,339,1008), XSPR_MASK, PPC403, { RT } },
-{ "mfdbcr0", XSPR(31,339,1010), XSPR_MASK, PPC405, { RT } },
-{ "mfiac1", XSPR(31,339,1012), XSPR_MASK, PPC403, { RT } },
-{ "mfiac2", XSPR(31,339,1013), XSPR_MASK, PPC403, { RT } },
-{ "mfdac1", XSPR(31,339,1014), XSPR_MASK, PPC403, { RT } },
-{ "mfdac2", XSPR(31,339,1015), XSPR_MASK, PPC403, { RT } },
{ "mfl2cr", XSPR(31,339,1017), XSPR_MASK, PPC750, { RT } },
{ "mfdccr", XSPR(31,339,1018), XSPR_MASK, PPC403, { RT } },
{ "mficcr", XSPR(31,339,1019), XSPR_MASK, PPC403, { RT } },
@@ -3783,7 +3785,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "dstst", XDSS(31,374,0), XDSS_MASK, PPCVEC, { RA, RB, STRM } },
{ "dststt", XDSS(31,374,1), XDSS_MASK, PPCVEC, { RA, RB, STRM } },
-{ "dccci", X(31,454), XRT_MASK, PPC403, { RA, RB } },
+{ "dccci", X(31,454), XRT_MASK, PPC403|PPC440, { RA, RB } },
{ "abs", XO(31,360,0,0), XORB_MASK, M601, { RT, RA } },
{ "abs.", XO(31,360,0,1), XORB_MASK, M601, { RT, RA } },
@@ -3797,10 +3799,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbia", X(31,370), 0xffffffff, PPC, { 0 } },
-{ "mftbl", XSPR(31,371,268), XSPR_MASK, CLASSIC, { RT } },
-{ "mftbu", XSPR(31,371,269), XSPR_MASK, CLASSIC, { RT } },
-{ "mftb", X(31,371), X_MASK, CLASSIC, { RT, TBR } },
-
{ "lwaux", X(31,373), X_MASK, PPC64, { RT, RAL, RB } },
{ "lhaux", X(31,375), X_MASK, COM, { RT, RAL, RB } },
@@ -3852,42 +3850,41 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mr.", XRC(31,444,1), X_MASK, COM, { RA, RS, RBS } },
{ "or.", XRC(31,444,1), X_MASK, COM, { RA, RS, RB } },
-{ "mtexisr", XSPR(31,451,64), XSPR_MASK, PPC403, { RT } },
-{ "mtexier", XSPR(31,451,66), XSPR_MASK, PPC403, { RT } },
-{ "mtbr0", XSPR(31,451,128), XSPR_MASK, PPC403, { RT } },
-{ "mtbr1", XSPR(31,451,129), XSPR_MASK, PPC403, { RT } },
-{ "mtbr2", XSPR(31,451,130), XSPR_MASK, PPC403, { RT } },
-{ "mtbr3", XSPR(31,451,131), XSPR_MASK, PPC403, { RT } },
-{ "mtbr4", XSPR(31,451,132), XSPR_MASK, PPC403, { RT } },
-{ "mtbr5", XSPR(31,451,133), XSPR_MASK, PPC403, { RT } },
-{ "mtbr6", XSPR(31,451,134), XSPR_MASK, PPC403, { RT } },
-{ "mtbr7", XSPR(31,451,135), XSPR_MASK, PPC403, { RT } },
-{ "mtbear", XSPR(31,451,144), XSPR_MASK, PPC403, { RT } },
-{ "mtbesr", XSPR(31,451,145), XSPR_MASK, PPC403, { RT } },
-{ "mtiocr", XSPR(31,451,160), XSPR_MASK, PPC403, { RT } },
-{ "mtdmacr0", XSPR(31,451,192), XSPR_MASK, PPC403, { RT } },
-{ "mtdmact0", XSPR(31,451,193), XSPR_MASK, PPC403, { RT } },
-{ "mtdmada0", XSPR(31,451,194), XSPR_MASK, PPC403, { RT } },
-{ "mtdmasa0", XSPR(31,451,195), XSPR_MASK, PPC403, { RT } },
-{ "mtdmacc0", XSPR(31,451,196), XSPR_MASK, PPC403, { RT } },
-{ "mtdmacr1", XSPR(31,451,200), XSPR_MASK, PPC403, { RT } },
-{ "mtdmact1", XSPR(31,451,201), XSPR_MASK, PPC403, { RT } },
-{ "mtdmada1", XSPR(31,451,202), XSPR_MASK, PPC403, { RT } },
-{ "mtdmasa1", XSPR(31,451,203), XSPR_MASK, PPC403, { RT } },
-{ "mtdmacc1", XSPR(31,451,204), XSPR_MASK, PPC403, { RT } },
-{ "mtdmacr2", XSPR(31,451,208), XSPR_MASK, PPC403, { RT } },
-{ "mtdmact2", XSPR(31,451,209), XSPR_MASK, PPC403, { RT } },
-{ "mtdmada2", XSPR(31,451,210), XSPR_MASK, PPC403, { RT } },
-{ "mtdmasa2", XSPR(31,451,211), XSPR_MASK, PPC403, { RT } },
-{ "mtdmacc2", XSPR(31,451,212), XSPR_MASK, PPC403, { RT } },
-{ "mtdmacr3", XSPR(31,451,216), XSPR_MASK, PPC403, { RT } },
-{ "mtdmact3", XSPR(31,451,217), XSPR_MASK, PPC403, { RT } },
-{ "mtdmada3", XSPR(31,451,218), XSPR_MASK, PPC403, { RT } },
-{ "mtdmasa3", XSPR(31,451,219), XSPR_MASK, PPC403, { RT } },
-{ "mtdmacc3", XSPR(31,451,220), XSPR_MASK, PPC403, { RT } },
-{ "mtdmasr", XSPR(31,451,224), XSPR_MASK, PPC403, { RT } },
-{ "mtdcr", X(31,451), X_MASK, PPC403, { SPR, RS } },
-{ "mtdcr", X(31,451), X_MASK, BOOKE, { SPR, RS } },
+{ "mtexisr", XSPR(31,451,64), XSPR_MASK, PPC403, { RS } },
+{ "mtexier", XSPR(31,451,66), XSPR_MASK, PPC403, { RS } },
+{ "mtbr0", XSPR(31,451,128), XSPR_MASK, PPC403, { RS } },
+{ "mtbr1", XSPR(31,451,129), XSPR_MASK, PPC403, { RS } },
+{ "mtbr2", XSPR(31,451,130), XSPR_MASK, PPC403, { RS } },
+{ "mtbr3", XSPR(31,451,131), XSPR_MASK, PPC403, { RS } },
+{ "mtbr4", XSPR(31,451,132), XSPR_MASK, PPC403, { RS } },
+{ "mtbr5", XSPR(31,451,133), XSPR_MASK, PPC403, { RS } },
+{ "mtbr6", XSPR(31,451,134), XSPR_MASK, PPC403, { RS } },
+{ "mtbr7", XSPR(31,451,135), XSPR_MASK, PPC403, { RS } },
+{ "mtbear", XSPR(31,451,144), XSPR_MASK, PPC403, { RS } },
+{ "mtbesr", XSPR(31,451,145), XSPR_MASK, PPC403, { RS } },
+{ "mtiocr", XSPR(31,451,160), XSPR_MASK, PPC403, { RS } },
+{ "mtdmacr0", XSPR(31,451,192), XSPR_MASK, PPC403, { RS } },
+{ "mtdmact0", XSPR(31,451,193), XSPR_MASK, PPC403, { RS } },
+{ "mtdmada0", XSPR(31,451,194), XSPR_MASK, PPC403, { RS } },
+{ "mtdmasa0", XSPR(31,451,195), XSPR_MASK, PPC403, { RS } },
+{ "mtdmacc0", XSPR(31,451,196), XSPR_MASK, PPC403, { RS } },
+{ "mtdmacr1", XSPR(31,451,200), XSPR_MASK, PPC403, { RS } },
+{ "mtdmact1", XSPR(31,451,201), XSPR_MASK, PPC403, { RS } },
+{ "mtdmada1", XSPR(31,451,202), XSPR_MASK, PPC403, { RS } },
+{ "mtdmasa1", XSPR(31,451,203), XSPR_MASK, PPC403, { RS } },
+{ "mtdmacc1", XSPR(31,451,204), XSPR_MASK, PPC403, { RS } },
+{ "mtdmacr2", XSPR(31,451,208), XSPR_MASK, PPC403, { RS } },
+{ "mtdmact2", XSPR(31,451,209), XSPR_MASK, PPC403, { RS } },
+{ "mtdmada2", XSPR(31,451,210), XSPR_MASK, PPC403, { RS } },
+{ "mtdmasa2", XSPR(31,451,211), XSPR_MASK, PPC403, { RS } },
+{ "mtdmacc2", XSPR(31,451,212), XSPR_MASK, PPC403, { RS } },
+{ "mtdmacr3", XSPR(31,451,216), XSPR_MASK, PPC403, { RS } },
+{ "mtdmact3", XSPR(31,451,217), XSPR_MASK, PPC403, { RS } },
+{ "mtdmada3", XSPR(31,451,218), XSPR_MASK, PPC403, { RS } },
+{ "mtdmasa3", XSPR(31,451,219), XSPR_MASK, PPC403, { RS } },
+{ "mtdmacc3", XSPR(31,451,220), XSPR_MASK, PPC403, { RS } },
+{ "mtdmasr", XSPR(31,451,224), XSPR_MASK, PPC403, { RS } },
+{ "mtdcr", X(31,451), X_MASK, PPC403 | BOOKE, { SPR, RS } },
{ "subfze64",XO(31,456,0,0), XORB_MASK, BOOKE64, { RT, RA } },
{ "subfze64o",XO(31,456,1,0), XORB_MASK, BOOKE64, { RT, RA } },
@@ -3920,61 +3917,73 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtsrr0", XSPR(31,467,26), XSPR_MASK, COM, { RS } },
{ "mtsrr1", XSPR(31,467,27), XSPR_MASK, COM, { RS } },
{ "mtpid", XSPR(31,467,48), XSPR_MASK, BOOKE, { RS } },
+{ "mtpid", XSPR(31,467,945), XSPR_MASK, PPC403, { RS } },
{ "mtdecar", XSPR(31,467,54), XSPR_MASK, BOOKE, { RS } },
{ "mtcsrr0", XSPR(31,467,58), XSPR_MASK, BOOKE, { RS } },
{ "mtcsrr1", XSPR(31,467,59), XSPR_MASK, BOOKE, { RS } },
{ "mtdear", XSPR(31,467,61), XSPR_MASK, BOOKE, { RS } },
+{ "mtdear", XSPR(31,467,981), XSPR_MASK, PPC403, { RS } },
{ "mtesr", XSPR(31,467,62), XSPR_MASK, BOOKE, { RS } },
+{ "mtesr", XSPR(31,467,980), XSPR_MASK, PPC403, { RS } },
{ "mtivpr", XSPR(31,467,63), XSPR_MASK, BOOKE, { RS } },
-{ "mtcmpa", XSPR(31,467,144), XSPR_MASK, PPC860, { RT } },
-{ "mtcmpb", XSPR(31,467,145), XSPR_MASK, PPC860, { RT } },
-{ "mtcmpc", XSPR(31,467,146), XSPR_MASK, PPC860, { RT } },
-{ "mtcmpd", XSPR(31,467,147), XSPR_MASK, PPC860, { RT } },
-{ "mticr", XSPR(31,467,148), XSPR_MASK, PPC860, { RT } },
-{ "mtder", XSPR(31,467,149), XSPR_MASK, PPC860, { RT } },
-{ "mtcounta", XSPR(31,467,150), XSPR_MASK, PPC860, { RT } },
-{ "mtcountb", XSPR(31,467,151), XSPR_MASK, PPC860, { RT } },
-{ "mtcmpe", XSPR(31,467,152), XSPR_MASK, PPC860, { RT } },
-{ "mtcmpf", XSPR(31,467,153), XSPR_MASK, PPC860, { RT } },
-{ "mtcmpg", XSPR(31,467,154), XSPR_MASK, PPC860, { RT } },
-{ "mtcmph", XSPR(31,467,155), XSPR_MASK, PPC860, { RT } },
-{ "mtlctrl1", XSPR(31,467,156), XSPR_MASK, PPC860, { RT } },
-{ "mtlctrl2", XSPR(31,467,157), XSPR_MASK, PPC860, { RT } },
-{ "mtictrl", XSPR(31,467,158), XSPR_MASK, PPC860, { RT } },
-{ "mtbar", XSPR(31,467,159), XSPR_MASK, PPC860, { RT } },
-{ "mtvrsave", XSPR(31,467,256), XSPR_MASK, PPCVEC, { RT } },
+{ "mtcmpa", XSPR(31,467,144), XSPR_MASK, PPC860, { RS } },
+{ "mtcmpb", XSPR(31,467,145), XSPR_MASK, PPC860, { RS } },
+{ "mtcmpc", XSPR(31,467,146), XSPR_MASK, PPC860, { RS } },
+{ "mtcmpd", XSPR(31,467,147), XSPR_MASK, PPC860, { RS } },
+{ "mticr", XSPR(31,467,148), XSPR_MASK, PPC860, { RS } },
+{ "mtder", XSPR(31,467,149), XSPR_MASK, PPC860, { RS } },
+{ "mtcounta", XSPR(31,467,150), XSPR_MASK, PPC860, { RS } },
+{ "mtcountb", XSPR(31,467,151), XSPR_MASK, PPC860, { RS } },
+{ "mtcmpe", XSPR(31,467,152), XSPR_MASK, PPC860, { RS } },
+{ "mtcmpf", XSPR(31,467,153), XSPR_MASK, PPC860, { RS } },
+{ "mtcmpg", XSPR(31,467,154), XSPR_MASK, PPC860, { RS } },
+{ "mtcmph", XSPR(31,467,155), XSPR_MASK, PPC860, { RS } },
+{ "mtlctrl1", XSPR(31,467,156), XSPR_MASK, PPC860, { RS } },
+{ "mtlctrl2", XSPR(31,467,157), XSPR_MASK, PPC860, { RS } },
+{ "mtictrl", XSPR(31,467,158), XSPR_MASK, PPC860, { RS } },
+{ "mtbar", XSPR(31,467,159), XSPR_MASK, PPC860, { RS } },
+{ "mtvrsave", XSPR(31,467,256), XSPR_MASK, PPCVEC, { RS } },
{ "mtusprg0", XSPR(31,467,256), XSPR_MASK, BOOKE, { RS } },
{ "mtsprg", XSPR(31,467,272), XSPRG_MASK,PPC, { SPRG, RS } },
-{ "mtsprg0", XSPR(31,467,272), XSPR_MASK, PPC, { RT } },
-{ "mtsprg1", XSPR(31,467,273), XSPR_MASK, PPC, { RT } },
-{ "mtsprg2", XSPR(31,467,274), XSPR_MASK, PPC, { RT } },
-{ "mtsprg3", XSPR(31,467,275), XSPR_MASK, PPC, { RT } },
-{ "mtsprg4", XSPR(31,467,276), XSPR_MASK, PPC405, { RT } },
-{ "mtsprg4", XSPR(31,467,276), XSPR_MASK, BOOKE, { RS } },
-{ "mtsprg5", XSPR(31,467,277), XSPR_MASK, PPC405, { RT } },
-{ "mtsprg5", XSPR(31,467,277), XSPR_MASK, BOOKE, { RS } },
-{ "mtsprg6", XSPR(31,467,278), XSPR_MASK, PPC405, { RT } },
-{ "mtsprg6", XSPR(31,467,278), XSPR_MASK, BOOKE, { RS } },
-{ "mtsprg7", XSPR(31,467,279), XSPR_MASK, PPC405, { RT } },
-{ "mtsprg7", XSPR(31,467,279), XSPR_MASK, BOOKE, { RS } },
+{ "mtsprg0", XSPR(31,467,272), XSPR_MASK, PPC, { RS } },
+{ "mtsprg1", XSPR(31,467,273), XSPR_MASK, PPC, { RS } },
+{ "mtsprg2", XSPR(31,467,274), XSPR_MASK, PPC, { RS } },
+{ "mtsprg3", XSPR(31,467,275), XSPR_MASK, PPC, { RS } },
+{ "mtsprg4", XSPR(31,467,276), XSPR_MASK, PPC405 | BOOKE, { RS } },
+{ "mtsprg5", XSPR(31,467,277), XSPR_MASK, PPC405 | BOOKE, { RS } },
+{ "mtsprg6", XSPR(31,467,278), XSPR_MASK, PPC405 | BOOKE, { RS } },
+{ "mtsprg7", XSPR(31,467,279), XSPR_MASK, PPC405 | BOOKE, { RS } },
{ "mtasr", XSPR(31,467,280), XSPR_MASK, PPC64, { RS } },
{ "mtear", XSPR(31,467,282), XSPR_MASK, PPC, { RS } },
{ "mttbl", XSPR(31,467,284), XSPR_MASK, PPC, { RS } },
{ "mttbu", XSPR(31,467,285), XSPR_MASK, PPC, { RS } },
{ "mtdbsr", XSPR(31,467,304), XSPR_MASK, BOOKE, { RS } },
+{ "mtdbsr", XSPR(31,467,1008), XSPR_MASK, PPC403, { RS } },
{ "mtdbcr0", XSPR(31,467,308), XSPR_MASK, BOOKE, { RS } },
+{ "mtdbcr0", XSPR(31,467,1010), XSPR_MASK, PPC405, { RS } },
{ "mtdbcr1", XSPR(31,467,309), XSPR_MASK, BOOKE, { RS } },
+{ "mtdbcr1", XSPR(31,467,957), XSPR_MASK, PPC405, { RS } },
{ "mtdbcr2", XSPR(31,467,310), XSPR_MASK, BOOKE, { RS } },
{ "mtiac1", XSPR(31,467,312), XSPR_MASK, BOOKE, { RS } },
+{ "mtiac1", XSPR(31,467,1012), XSPR_MASK, PPC403, { RS } },
{ "mtiac2", XSPR(31,467,313), XSPR_MASK, BOOKE, { RS } },
+{ "mtiac2", XSPR(31,467,1013), XSPR_MASK, PPC403, { RS } },
{ "mtiac3", XSPR(31,467,314), XSPR_MASK, BOOKE, { RS } },
+{ "mtiac3", XSPR(31,467,948), XSPR_MASK, PPC405, { RS } },
{ "mtiac4", XSPR(31,467,315), XSPR_MASK, BOOKE, { RS } },
+{ "mtiac4", XSPR(31,467,949), XSPR_MASK, PPC405, { RS } },
{ "mtdac1", XSPR(31,467,316), XSPR_MASK, BOOKE, { RS } },
+{ "mtdac1", XSPR(31,467,1014), XSPR_MASK, PPC403, { RS } },
{ "mtdac2", XSPR(31,467,317), XSPR_MASK, BOOKE, { RS } },
+{ "mtdac2", XSPR(31,467,1015), XSPR_MASK, PPC403, { RS } },
{ "mtdvc1", XSPR(31,467,318), XSPR_MASK, BOOKE, { RS } },
+{ "mtdvc1", XSPR(31,467,950), XSPR_MASK, PPC405, { RS } },
{ "mtdvc2", XSPR(31,467,319), XSPR_MASK, BOOKE, { RS } },
+{ "mtdvc2", XSPR(31,467,951), XSPR_MASK, PPC405, { RS } },
{ "mttsr", XSPR(31,467,336), XSPR_MASK, BOOKE, { RS } },
+{ "mttsr", XSPR(31,467,984), XSPR_MASK, PPC403, { RS } },
{ "mttcr", XSPR(31,467,340), XSPR_MASK, BOOKE, { RS } },
+{ "mttcr", XSPR(31,467,986), XSPR_MASK, PPC403, { RS } },
{ "mtivor0", XSPR(31,467,400), XSPR_MASK, BOOKE, { RS } },
{ "mtivor1", XSPR(31,467,401), XSPR_MASK, BOOKE, { RS } },
{ "mtivor2", XSPR(31,467,402), XSPR_MASK, BOOKE, { RS } },
@@ -4001,61 +4010,45 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtmcsrr0", XSPR(31,467,570), XSPR_MASK, PPCRFMCI, { RS } },
{ "mtmcsrr1", XSPR(31,467,571), XSPR_MASK, PPCRFMCI, { RS } },
{ "mtmcsr", XSPR(31,467,572), XSPR_MASK, PPCRFMCI, { RS } },
-{ "mtummcr0", XSPR(31,467,936), XSPR_MASK, PPC750, { RT } },
-{ "mtupmc1", XSPR(31,467,937), XSPR_MASK, PPC750, { RT } },
-{ "mtupmc2", XSPR(31,467,938), XSPR_MASK, PPC750, { RT } },
-{ "mtusia", XSPR(31,467,939), XSPR_MASK, PPC750, { RT } },
-{ "mtummcr1", XSPR(31,467,940), XSPR_MASK, PPC750, { RT } },
-{ "mtupmc3", XSPR(31,467,941), XSPR_MASK, PPC750, { RT } },
-{ "mtupmc4", XSPR(31,467,942), XSPR_MASK, PPC750, { RT } },
-{ "mtzpr", XSPR(31,467,944), XSPR_MASK, PPC403, { RT } },
-{ "mtpid", XSPR(31,467,945), XSPR_MASK, PPC403, { RT } },
-{ "mtccr0", XSPR(31,467,947), XSPR_MASK, PPC405, { RT } },
-{ "mtiac3", XSPR(31,467,948), XSPR_MASK, PPC405, { RT } },
-{ "mtiac4", XSPR(31,467,949), XSPR_MASK, PPC405, { RT } },
-{ "mtdvc1", XSPR(31,467,950), XSPR_MASK, PPC405, { RT } },
-{ "mtdvc2", XSPR(31,467,951), XSPR_MASK, PPC405, { RT } },
-{ "mtmmcr0", XSPR(31,467,952), XSPR_MASK, PPC750, { RT } },
-{ "mtsgr", XSPR(31,467,953), XSPR_MASK, PPC403, { RT } },
-{ "mtpmc1", XSPR(31,467,953), XSPR_MASK, PPC750, { RT } },
-{ "mtdcwr", XSPR(31,467,954), XSPR_MASK, PPC403, { RT } },
-{ "mtpmc2", XSPR(31,467,954), XSPR_MASK, PPC750, { RT } },
-{ "mtsler", XSPR(31,467,955), XSPR_MASK, PPC405, { RT } },
-{ "mtsia", XSPR(31,467,955), XSPR_MASK, PPC750, { RT } },
-{ "mtsu0r", XSPR(31,467,956), XSPR_MASK, PPC405, { RT } },
-{ "mtmmcr1", XSPR(31,467,956), XSPR_MASK, PPC750, { RT } },
-{ "mtdbcr1", XSPR(31,467,957), XSPR_MASK, PPC405, { RT } },
-{ "mtpmc3", XSPR(31,467,957), XSPR_MASK, PPC750, { RT } },
-{ "mtpmc4", XSPR(31,467,958), XSPR_MASK, PPC750, { RT } },
-{ "mticdbdr", XSPR(31,467,979), XSPR_MASK, PPC403, { RT } },
-{ "mtesr", XSPR(31,467,980), XSPR_MASK, PPC403, { RT } },
-{ "mtdear", XSPR(31,467,981), XSPR_MASK, PPC403, { RT } },
-{ "mtevpr", XSPR(31,467,982), XSPR_MASK, PPC403, { RT } },
-{ "mtcdbcr", XSPR(31,467,983), XSPR_MASK, PPC403, { RT } },
-{ "mttsr", XSPR(31,467,984), XSPR_MASK, PPC403, { RT } },
-{ "mttcr", XSPR(31,467,986), XSPR_MASK, PPC403, { RT } },
-{ "mtpit", XSPR(31,467,987), XSPR_MASK, PPC403, { RT } },
-{ "mttbhi", XSPR(31,467,988), XSPR_MASK, PPC403, { RT } },
-{ "mttblo", XSPR(31,467,989), XSPR_MASK, PPC403, { RT } },
-{ "mtsrr2", XSPR(31,467,990), XSPR_MASK, PPC403, { RT } },
-{ "mtsrr3", XSPR(31,467,991), XSPR_MASK, PPC403, { RT } },
-{ "mtdbsr", XSPR(31,467,1008), XSPR_MASK, PPC403, { RT } },
-{ "mtdbcr0", XSPR(31,467,1010), XSPR_MASK, PPC405, { RT } },
-{ "mtiac1", XSPR(31,467,1012), XSPR_MASK, PPC403, { RT } },
-{ "mtiac2", XSPR(31,467,1013), XSPR_MASK, PPC403, { RT } },
-{ "mtdac1", XSPR(31,467,1014), XSPR_MASK, PPC403, { RT } },
-{ "mtdac2", XSPR(31,467,1015), XSPR_MASK, PPC403, { RT } },
-{ "mtl2cr", XSPR(31,467,1017), XSPR_MASK, PPC750, { RT } },
-{ "mtdccr", XSPR(31,467,1018), XSPR_MASK, PPC403, { RT } },
-{ "mticcr", XSPR(31,467,1019), XSPR_MASK, PPC403, { RT } },
-{ "mtictc", XSPR(31,467,1019), XSPR_MASK, PPC750, { RT } },
-{ "mtpbl1", XSPR(31,467,1020), XSPR_MASK, PPC403, { RT } },
-{ "mtthrm1", XSPR(31,467,1020), XSPR_MASK, PPC750, { RT } },
-{ "mtpbu1", XSPR(31,467,1021), XSPR_MASK, PPC403, { RT } },
-{ "mtthrm2", XSPR(31,467,1021), XSPR_MASK, PPC750, { RT } },
-{ "mtpbl2", XSPR(31,467,1022), XSPR_MASK, PPC403, { RT } },
-{ "mtthrm3", XSPR(31,467,1022), XSPR_MASK, PPC750, { RT } },
-{ "mtpbu2", XSPR(31,467,1023), XSPR_MASK, PPC403, { RT } },
+{ "mtummcr0", XSPR(31,467,936), XSPR_MASK, PPC750, { RS } },
+{ "mtupmc1", XSPR(31,467,937), XSPR_MASK, PPC750, { RS } },
+{ "mtupmc2", XSPR(31,467,938), XSPR_MASK, PPC750, { RS } },
+{ "mtusia", XSPR(31,467,939), XSPR_MASK, PPC750, { RS } },
+{ "mtummcr1", XSPR(31,467,940), XSPR_MASK, PPC750, { RS } },
+{ "mtupmc3", XSPR(31,467,941), XSPR_MASK, PPC750, { RS } },
+{ "mtupmc4", XSPR(31,467,942), XSPR_MASK, PPC750, { RS } },
+{ "mtzpr", XSPR(31,467,944), XSPR_MASK, PPC403, { RS } },
+{ "mtccr0", XSPR(31,467,947), XSPR_MASK, PPC405, { RS } },
+{ "mtmmcr0", XSPR(31,467,952), XSPR_MASK, PPC750, { RS } },
+{ "mtsgr", XSPR(31,467,953), XSPR_MASK, PPC403, { RS } },
+{ "mtpmc1", XSPR(31,467,953), XSPR_MASK, PPC750, { RS } },
+{ "mtdcwr", XSPR(31,467,954), XSPR_MASK, PPC403, { RS } },
+{ "mtpmc2", XSPR(31,467,954), XSPR_MASK, PPC750, { RS } },
+{ "mtsler", XSPR(31,467,955), XSPR_MASK, PPC405, { RS } },
+{ "mtsia", XSPR(31,467,955), XSPR_MASK, PPC750, { RS } },
+{ "mtsu0r", XSPR(31,467,956), XSPR_MASK, PPC405, { RS } },
+{ "mtmmcr1", XSPR(31,467,956), XSPR_MASK, PPC750, { RS } },
+{ "mtpmc3", XSPR(31,467,957), XSPR_MASK, PPC750, { RS } },
+{ "mtpmc4", XSPR(31,467,958), XSPR_MASK, PPC750, { RS } },
+{ "mticdbdr", XSPR(31,467,979), XSPR_MASK, PPC403, { RS } },
+{ "mtevpr", XSPR(31,467,982), XSPR_MASK, PPC403, { RS } },
+{ "mtcdbcr", XSPR(31,467,983), XSPR_MASK, PPC403, { RS } },
+{ "mtpit", XSPR(31,467,987), XSPR_MASK, PPC403, { RS } },
+{ "mttbhi", XSPR(31,467,988), XSPR_MASK, PPC403, { RS } },
+{ "mttblo", XSPR(31,467,989), XSPR_MASK, PPC403, { RS } },
+{ "mtsrr2", XSPR(31,467,990), XSPR_MASK, PPC403, { RS } },
+{ "mtsrr3", XSPR(31,467,991), XSPR_MASK, PPC403, { RS } },
+{ "mtl2cr", XSPR(31,467,1017), XSPR_MASK, PPC750, { RS } },
+{ "mtdccr", XSPR(31,467,1018), XSPR_MASK, PPC403, { RS } },
+{ "mticcr", XSPR(31,467,1019), XSPR_MASK, PPC403, { RS } },
+{ "mtictc", XSPR(31,467,1019), XSPR_MASK, PPC750, { RS } },
+{ "mtpbl1", XSPR(31,467,1020), XSPR_MASK, PPC403, { RS } },
+{ "mtthrm1", XSPR(31,467,1020), XSPR_MASK, PPC750, { RS } },
+{ "mtpbu1", XSPR(31,467,1021), XSPR_MASK, PPC403, { RS } },
+{ "mtthrm2", XSPR(31,467,1021), XSPR_MASK, PPC750, { RS } },
+{ "mtpbl2", XSPR(31,467,1022), XSPR_MASK, PPC403, { RS } },
+{ "mtthrm3", XSPR(31,467,1022), XSPR_MASK, PPC750, { RS } },
+{ "mtpbu2", XSPR(31,467,1023), XSPR_MASK, PPC403, { RS } },
{ "mtspr", X(31,467), X_MASK, COM, { SPR, RS } },
{ "dcbi", X(31,470), XRT_MASK, PPC, { RA, RB } },
@@ -4065,7 +4058,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "dcbie", X(31,478), XRT_MASK, BOOKE64, { RA, RB } },
-{ "dcread", X(31,486), X_MASK, PPC403, { RT, RA, RB }},
+{ "dcread", X(31,486), X_MASK, PPC403|PPC440, { RT, RA, RB }},
{ "mtpmr", X(31,462), X_MASK, PPCPMR, { PMR, RS }},
@@ -4144,7 +4137,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lswi", X(31,597), X_MASK, PPCCOM, { RT, RA, NB } },
{ "lsi", X(31,597), X_MASK, PWRCOM, { RT, RA, NB } },
-{ "lwsync", XSYNC(31,598,1), 0xffffffff, PPCONLY, { 0 } },
+{ "lwsync", XSYNC(31,598,1), 0xffffffff, PPC, { 0 } },
{ "ptesync", XSYNC(31,598,2), 0xffffffff, PPC64, { 0 } },
{ "msync", X(31,598), 0xffffffff, BOOKE, { 0 } },
{ "sync", X(31,598), XSYNC_MASK, PPCCOM, { LS } },
@@ -4202,8 +4195,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stfdxe", X(31,735), X_MASK, BOOKE64, { FRS, RA, RB } },
-{ "dcba", X(31,758), XRT_MASK, PPC405, { RA, RB } },
-{ "dcba", X(31,758), XRT_MASK, BOOKE, { RA, RB } },
+{ "dcba", X(31,758), XRT_MASK, PPC405 | BOOKE, { RA, RB } },
{ "stfdux", X(31,759), X_MASK, COM, { FRS, RAS, RB } },
@@ -4247,11 +4239,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mbar", X(31,854), X_MASK, BOOKE, { MO } },
{ "eieio", X(31,854), 0xffffffff, PPC, { 0 } },
-{ "tlbsx", XRC(31,914,0), X_MASK, PPC403, { RT, RA, RB } },
-{ "tlbsx.", XRC(31,914,1), X_MASK, PPC403, { RT, RA, RB } },
-
{ "tlbsx", XRC(31,914,0), X_MASK, BOOKE, { RA, RB } },
+{ "tlbsx", XRC(31,914,0), X_MASK, PPC403, { RT, RA, RB } },
{ "tlbsx.", XRC(31,914,1), X_MASK, BOOKE, { RA, RB } },
+{ "tlbsx.", XRC(31,914,1), X_MASK, PPC403, { RT, RA, RB } },
{ "tlbsxe", XRC(31,915,0), X_MASK, BOOKE64, { RA, RB } },
{ "tlbsxe.", XRC(31,915,1), X_MASK, BOOKE64, { RA, RB } },
@@ -4274,10 +4265,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stdxe", X(31,927), X_MASK, BOOKE64, { RS, RA, RB } },
-{ "tlbre", X(31,946), X_MASK, BOOKE, { 0 } },
-
{ "tlbrehi", XTLB(31,946,0), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } },
+{ "tlbre", X(31,946), X_MASK, BOOKE, { 0 } },
{ "tlbre", X(31,946), X_MASK, PPC403, { RS, RA, SH } },
{ "sraiq", XRC(31,952,0), X_MASK, M601, { RA, RS, SH } },
@@ -4288,15 +4278,13 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stduxe", X(31,959), X_MASK, BOOKE64, { RS, RAS, RB } },
-{ "iccci", X(31,966), XRT_MASK, PPC403, { RA, RB } },
-
-{ "tlbwe", X(31,978), X_MASK, BOOKE, { 0 } },
-
-{ "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } },
+{ "iccci", X(31,966), XRT_MASK, PPC403|PPC440, { RA, RB } },
{ "tlbwehi", XTLB(31,978,0), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbwelo", XTLB(31,978,1), XTLB_MASK, PPC403, { RT, RA } },
+{ "tlbwe", X(31,978), X_MASK, BOOKE, { 0 } },
{ "tlbwe", X(31,978), X_MASK, PPC403, { RS, RA, SH } },
+{ "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } },
{ "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } },
@@ -4305,7 +4293,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "extsw", XRC(31,986,0), XRB_MASK, PPC64 | BOOKE64,{ RA, RS } },
{ "extsw.", XRC(31,986,1), XRB_MASK, PPC64, { RA, RS } },
-{ "icread", X(31,998), XRT_MASK, PPC403, { RA, RB } },
+{ "icread", X(31,998), XRT_MASK, PPC403|PPC440, { RA, RB } },
{ "icbie", X(31,990), XRT_MASK, BOOKE64, { RA, RB } },
{ "stfiwxe", X(31,991), X_MASK, BOOKE64, { FRS, RA, RB } },
diff --git a/opcodes/v850-dis.c b/opcodes/v850-dis.c
index 7c449f67ad..b5022cd42d 100644
--- a/opcodes/v850-dis.c
+++ b/opcodes/v850-dis.c
@@ -1,20 +1,20 @@
/* Disassemble V850 instructions.
- Copyright 1996, 1997, 1998, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
-This program 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 of the License, or
-(at your option) any later version.
+ This program 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 of the License, or
+ (at your option) any later version.
-This program 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.
+ This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdio.h>
@@ -78,6 +78,10 @@ disassemble (memaddr, info, insn)
case bfd_mach_v850e:
target_processor = PROCESSOR_V850E;
break;
+
+ case bfd_mach_v850e1:
+ target_processor = PROCESSOR_V850E1;
+ break;
}
/* Find the opcode. */
diff --git a/opcodes/v850-opc.c b/opcodes/v850-opc.c
index 94969ac48f..2249d16803 100644
--- a/opcodes/v850-opc.c
+++ b/opcodes/v850-opc.c
@@ -1,37 +1,37 @@
/* Assemble V850 instructions.
- Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
-This program 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 of the License, or
-(at your option) any later version.
+ This program 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 of the License, or
+ (at your option) any later version.
-This program 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.
+ This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "opcode/v850.h"
#include <stdio.h>
#include "opintl.h"
-/* regular opcode */
+/* Regular opcodes. */
#define OP(x) ((x & 0x3f) << 5)
#define OP_MASK OP (0x3f)
-/* conditional branch opcode */
+/* Conditional branch opcodes. */
#define BOP(x) ((0x0b << 7) | (x & 0x0f))
#define BOP_MASK ((0x0f << 7) | 0x0f)
-/* one-word opcodes */
+/* One-word opcodes. */
#define one(x) ((unsigned int) (x))
-/* two-word opcodes */
+/* Two-word opcodes. */
#define two(x,y) ((unsigned int) (x) | ((unsigned int) (y) << 16))
static long unsigned insert_d9 PARAMS ((long unsigned, long, const char **));
@@ -402,15 +402,15 @@ const struct v850_operand v850_operands[] =
#define UNUSED 0
{ 0, 0, NULL, NULL, 0 },
-/* The R1 field in a format 1, 6, 7, or 9 insn. */
+/* The R1 field in a format 1, 6, 7, or 9 insn. */
#define R1 (UNUSED + 1)
{ 5, 0, NULL, NULL, V850_OPERAND_REG },
/* As above, but register 0 is not allowed. */
#define R1_NOTR0 (R1 + 1)
- { 5, 0, NULL, NULL, V850_OPERAND_REG | V850_NOT_R0 },
+ { 5, 0, NULL, NULL, V850_OPERAND_REG | V850_NOT_R0 },
-/* The R2 field in a format 1, 2, 4, 5, 6, 7, 9 insn. */
+/* The R2 field in a format 1, 2, 4, 5, 6, 7, 9 insn. */
#define R2 (R1_NOTR0 + 1)
{ 5, 11, NULL, NULL, V850_OPERAND_REG },
@@ -418,23 +418,23 @@ const struct v850_operand v850_operands[] =
#define R2_NOTR0 (R2 + 1)
{ 5, 11, NULL, NULL, V850_OPERAND_REG | V850_NOT_R0 },
-/* The imm5 field in a format 2 insn. */
+/* The imm5 field in a format 2 insn. */
#define I5 (R2_NOTR0 + 1)
{ 5, 0, NULL, NULL, V850_OPERAND_SIGNED },
-/* The unsigned imm5 field in a format 2 insn. */
+/* The unsigned imm5 field in a format 2 insn. */
#define I5U (I5 + 1)
{ 5, 0, NULL, NULL, 0 },
-/* The imm16 field in a format 6 insn. */
+/* The imm16 field in a format 6 insn. */
#define I16 (I5U + 1)
{ 16, 16, NULL, NULL, V850_OPERAND_SIGNED },
-/* The signed disp7 field in a format 4 insn. */
+/* The signed disp7 field in a format 4 insn. */
#define D7 (I16 + 1)
{ 7, 0, NULL, NULL, 0},
-/* The disp16 field in a format 6 insn. */
+/* The disp16 field in a format 6 insn. */
#define D16_15 (D7 + 1)
{ 15, 17, insert_d16_15, extract_d16_15, V850_OPERAND_SIGNED },
@@ -446,11 +446,11 @@ const struct v850_operand v850_operands[] =
#define CCCC (B3 + 1)
{ 4, 0, NULL, NULL, V850_OPERAND_CC },
-/* The unsigned DISP8 field in a format 4 insn. */
+/* The unsigned DISP8 field in a format 4 insn. */
#define D8_7 (CCCC + 1)
{ 7, 0, insert_d8_7, extract_d8_7, 0 },
-/* The unsigned DISP8 field in a format 4 insn. */
+/* The unsigned DISP8 field in a format 4 insn. */
#define D8_6 (D8_7 + 1)
{ 6, 1, insert_d8_6, extract_d8_6, 0 },
@@ -462,7 +462,7 @@ const struct v850_operand v850_operands[] =
#define EP (SR1 + 1)
{ 0, 0, NULL, NULL, V850_OPERAND_EP },
-/* The imm16 field (unsigned) in a format 6 insn. */
+/* The imm16 field (unsigned) in a format 6 insn. */
#define I16U (EP + 1)
{ 16, 16, NULL, NULL, 0},
@@ -470,11 +470,11 @@ const struct v850_operand v850_operands[] =
#define SR2 (I16U + 1)
{ 5, 11, NULL, NULL, V850_OPERAND_SRG },
-/* The disp16 field in a format 8 insn. */
+/* The disp16 field in a format 8 insn. */
#define D16 (SR2 + 1)
{ 16, 16, NULL, NULL, V850_OPERAND_SIGNED },
-/* The DISP9 field in a format 3 insn, relaxable. */
+/* The DISP9 field in a format 3 insn, relaxable. */
#define D9_RELAX (D16 + 1)
{ 9, 0, insert_d9, extract_d9, V850_OPERAND_RELAX | V850_OPERAND_SIGNED | V850_OPERAND_DISP },
@@ -484,19 +484,19 @@ const struct v850_operand v850_operands[] =
#define D22 (D9_RELAX + 1)
{ 22, 0, insert_d22, extract_d22, V850_OPERAND_SIGNED | V850_OPERAND_DISP },
-/* The signed disp4 field in a format 4 insn. */
+/* The signed disp4 field in a format 4 insn. */
#define D4 (D22 + 1)
{ 4, 0, NULL, NULL, 0},
-/* The unsigned disp5 field in a format 4 insn. */
+/* The unsigned disp5 field in a format 4 insn. */
#define D5_4 (D4 + 1)
{ 4, 0, insert_d5_4, extract_d5_4, 0 },
-/* The disp16 field in an format 7 unsigned byte load insn. */
+/* The disp16 field in an format 7 unsigned byte load insn. */
#define D16_16 (D5_4 + 1)
{ -1, 0xfffe0020, insert_d16_16, extract_d16_16, 0 },
-/* Third register in conditional moves. */
+/* Third register in conditional moves. */
#define R3 (D16_16 + 1)
{ 5, 27, NULL, NULL, V850_OPERAND_REG },
@@ -504,11 +504,11 @@ const struct v850_operand v850_operands[] =
#define MOVCC (R3 + 1)
{ 4, 17, NULL, NULL, V850_OPERAND_CC },
-/* The imm9 field in a multiply word. */
+/* The imm9 field in a multiply word. */
#define I9 (MOVCC + 1)
{ 9, 0, insert_i9, extract_i9, V850_OPERAND_SIGNED },
-/* The unsigned imm9 field in a multiply word. */
+/* The unsigned imm9 field in a multiply word. */
#define U9 (I9 + 1)
{ 9, 0, insert_u9, extract_u9, 0 },
@@ -516,7 +516,7 @@ const struct v850_operand v850_operands[] =
#define LIST12 (U9 + 1)
{ -1, 0xffe00001, NULL, NULL, V850E_PUSH_POP },
-/* The IMM6 field in a call instruction. */
+/* The IMM6 field in a call instruction. */
#define I6 (LIST12 + 1)
{ 6, 0, NULL, NULL, 0 },
@@ -528,19 +528,19 @@ const struct v850_operand v850_operands[] =
#define IMM32 (IMM16 + 1)
{ 0, 0, NULL, NULL, V850E_IMMEDIATE32 },
-/* The imm5 field in a push/pop instruction. */
+/* The imm5 field in a push/pop instruction. */
#define IMM5 (IMM32 + 1)
{ 5, 1, NULL, NULL, 0 },
-/* Reg2 in dispose instruction. */
+/* Reg2 in dispose instruction. */
#define R2DISPOSE (IMM5 + 1)
{ 5, 16, NULL, NULL, V850_OPERAND_REG | V850_NOT_R0 },
-/* Stack pointer in prepare instruction. */
+/* Stack pointer in prepare instruction. */
#define SP (R2DISPOSE + 1)
{ 2, 19, insert_spe, extract_spe, V850_OPERAND_REG },
-/* The IMM5 field in a divide N step instruction. */
+/* The IMM5 field in a divide N step instruction. */
#define I5DIV (SP + 1)
{ 9, 0, insert_i5div, extract_i5div, V850_OPERAND_SIGNED },
@@ -550,23 +550,24 @@ const struct v850_operand v850_operands[] =
/* The list of registers in a PUSHML/POPML instruction. */
#define LIST18_L (LIST18_H + 1)
- { -1, 0xfff8001f, NULL, NULL, V850E_PUSH_POP }, /* The setting of the 4th bit is a flag to disassmble() in v850-dis.c */
+ /* The setting of the 4th bit is a flag to disassmble() in v850-dis.c. */
+ { -1, 0xfff8001f, NULL, NULL, V850E_PUSH_POP },
} ;
-/* reg-reg instruction format (Format I) */
+/* Reg - Reg instruction format (Format I). */
#define IF1 {R1, R2}
-/* imm-reg instruction format (Format II) */
+/* Imm - Reg instruction format (Format II). */
#define IF2 {I5, R2}
-/* conditional branch instruction format (Format III) */
+/* Conditional branch instruction format (Format III). */
#define IF3 {D9_RELAX}
-/* 3 operand instruction (Format VI) */
+/* 3 operand instruction (Format VI). */
#define IF6 {I16, R1, R2}
-/* 3 operand instruction (Format VI) */
+/* 3 operand instruction (Format VI). */
#define IF6U {I16U, R1, R2}
@@ -604,17 +605,22 @@ const struct v850_operand v850_operands[] =
const struct v850_opcode v850_opcodes[] =
{
{ "breakpoint", 0xffff, 0xffff, {UNUSED}, 0, PROCESSOR_ALL },
+{ "dbtrap", one (0xf840), one (0xffff), {UNUSED}, 0, PROCESSOR_V850E1 },
{ "jmp", one (0x0060), one (0xffe0), {R1}, 1, PROCESSOR_ALL },
-/* load/store instructions */
+/* Load/store instructions. */
+{ "sld.bu", one (0x0060), one (0x07f0), {D4, EP, R2_NOTR0}, 1, PROCESSOR_V850E1 },
{ "sld.bu", one (0x0060), one (0x07f0), {D4, EP, R2_NOTR0}, 1, PROCESSOR_V850E },
+{ "sld.hu", one (0x0070), one (0x07f0), {D5_4, EP, R2_NOTR0}, 1, PROCESSOR_V850E1 },
{ "sld.hu", one (0x0070), one (0x07f0), {D5_4, EP, R2_NOTR0}, 1, PROCESSOR_V850E },
+{ "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850E1 },
{ "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850E },
{ "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850 },
+{ "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850E1 },
{ "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850E },
{ "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850 },
{ "sld.w", one (0x0500), one (0x0781), {D8_6, EP, R2}, 1, PROCESSOR_ALL },
@@ -639,7 +645,7 @@ const struct v850_opcode v850_opcodes[] =
{ "st.h", two (0x0760, 0x0000), two (0x07e0, 0x0001), {R2, D16_15, R1}, 2, PROCESSOR_ALL },
{ "st.w", two (0x0760, 0x0001), two (0x07e0, 0x0001), {R2, D16_15, R1}, 2, PROCESSOR_ALL },
-/* byte swap/extend instructions */
+/* Byte swap/extend instructions. */
{ "zxb", one (0x0080), one (0xffe0), {R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
{ "zxh", one (0x00c0), one (0xffe0), {R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
{ "sxb", one (0x00a0), one (0xffe0), {R1_NOTR0}, 0, PROCESSOR_NOT_V850 },
@@ -648,12 +654,12 @@ const struct v850_opcode v850_opcodes[] =
{ "bsw", two (0x07e0, 0x0340), two (0x07ff, 0x07ff), {R2, R3}, 0, PROCESSOR_NOT_V850 },
{ "hsw", two (0x07e0, 0x0344), two (0x07ff, 0x07ff), {R2, R3}, 0, PROCESSOR_NOT_V850 },
-/* jump table instructions */
+/* Jump table instructions. */
{ "switch", one (0x0040), one (0xffe0), {R1}, 1, PROCESSOR_NOT_V850 },
{ "callt", one (0x0200), one (0xffc0), {I6}, 0, PROCESSOR_NOT_V850 },
{ "ctret", two (0x07e0, 0x0144), two (0xffff, 0xffff), {0}, 0, PROCESSOR_NOT_V850 },
-/* arithmetic operation instructions */
+/* Arithmetic operation instructions. */
{ "setf", two (0x07e0, 0x0000), two (0x07f0, 0xffff), {CCCC, R2}, 0, PROCESSOR_ALL },
{ "cmov", two (0x07e0, 0x0320), two (0x07e0, 0x07e1), {MOVCC, R1, R2, R3}, 0, PROCESSOR_NOT_V850 },
{ "cmov", two (0x07e0, 0x0300), two (0x07e0, 0x07e1), {MOVCC, I5, R2, R3}, 0, PROCESSOR_NOT_V850 },
@@ -686,14 +692,14 @@ const struct v850_opcode v850_opcodes[] =
{ "cmp", OP (0x0f), OP_MASK, IF1, 0, PROCESSOR_ALL },
{ "cmp", OP (0x13), OP_MASK, IF2, 0, PROCESSOR_ALL },
-/* saturated operation instructions */
+/* Saturated operation instructions. */
{ "satadd", OP (0x11), OP_MASK, {I5, R2_NOTR0}, 0, PROCESSOR_ALL },
{ "satadd", OP (0x06), OP_MASK, {R1, R2_NOTR0}, 0, PROCESSOR_ALL },
{ "satsub", OP (0x05), OP_MASK, {R1, R2_NOTR0}, 0, PROCESSOR_ALL },
{ "satsubi", OP (0x33), OP_MASK, {I16, R1, R2_NOTR0}, 0, PROCESSOR_ALL },
{ "satsubr", OP (0x04), OP_MASK, {R1, R2_NOTR0}, 0, PROCESSOR_ALL },
-/* logical operation instructions */
+/* Logical operation instructions. */
{ "tst", OP (0x0b), OP_MASK, IF1, 0, PROCESSOR_ALL },
{ "or", OP (0x08), OP_MASK, IF1, 0, PROCESSOR_ALL },
{ "ori", OP (0x34), OP_MASK, IF6U, 0, PROCESSOR_ALL },
@@ -710,21 +716,21 @@ const struct v850_opcode v850_opcodes[] =
{ "shr", two (0x07e0, 0x0080), two (0x07e0, 0xffff), {R1, R2}, 0, PROCESSOR_ALL },
{ "sasf", two (0x07e0, 0x0200), two (0x07f0, 0xffff), {CCCC, R2}, 0, PROCESSOR_NOT_V850 },
-/* branch instructions */
- /* signed integer */
+/* Branch instructions. */
+ /* Signed integer. */
{ "bgt", BOP (0xf), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "bge", BOP (0xe), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "blt", BOP (0x6), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "ble", BOP (0x7), BOP_MASK, IF3, 0, PROCESSOR_ALL },
- /* unsigned integer */
+ /* Unsigned integer. */
{ "bh", BOP (0xb), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "bnh", BOP (0x3), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "bl", BOP (0x1), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "bnl", BOP (0x9), BOP_MASK, IF3, 0, PROCESSOR_ALL },
- /* common */
+ /* Common. */
{ "be", BOP (0x2), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "bne", BOP (0xa), BOP_MASK, IF3, 0, PROCESSOR_ALL },
- /* others */
+ /* Others. */
{ "bv", BOP (0x0), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "bnv", BOP (0x8), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "bn", BOP (0x4), BOP_MASK, IF3, 0, PROCESSOR_ALL },
@@ -741,20 +747,20 @@ const struct v850_opcode v850_opcodes[] =
We use the short form in the opcode/mask fields. The assembler
will twiddle bits as necessary if the long form is needed. */
- /* signed integer */
+ /* Signed integer. */
{ "jgt", BOP (0xf), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jge", BOP (0xe), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jlt", BOP (0x6), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jle", BOP (0x7), BOP_MASK, IF3, 0, PROCESSOR_ALL },
- /* unsigned integer */
+ /* Unsigned integer. */
{ "jh", BOP (0xb), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jnh", BOP (0x3), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jl", BOP (0x1), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jnl", BOP (0x9), BOP_MASK, IF3, 0, PROCESSOR_ALL },
- /* common */
+ /* Common. */
{ "je", BOP (0x2), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jne", BOP (0xa), BOP_MASK, IF3, 0, PROCESSOR_ALL },
- /* others */
+ /* Others. */
{ "jv", BOP (0x0), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jnv", BOP (0x8), BOP_MASK, IF3, 0, PROCESSOR_ALL },
{ "jn", BOP (0x4), BOP_MASK, IF3, 0, PROCESSOR_ALL },
@@ -769,7 +775,7 @@ const struct v850_opcode v850_opcodes[] =
{ "jr", one (0x0780), two (0xffc0, 0x0001), {D22}, 0, PROCESSOR_ALL },
{ "jarl", one (0x0780), two (0x07c0, 0x0001), {D22, R2}, 0, PROCESSOR_ALL},
-/* bit manipulation instructions */
+/* Bit manipulation instructions. */
{ "set1", two (0x07c0, 0x0000), two (0xc7e0, 0x0000), {B3, D16, R1}, 2, PROCESSOR_ALL },
{ "set1", two (0x07e0, 0x00e0), two (0x07e0, 0xffff), {R2, R1}, 2, PROCESSOR_NOT_V850 },
{ "not1", two (0x47c0, 0x0000), two (0xc7e0, 0x0000), {B3, D16, R1}, 2, PROCESSOR_ALL },
@@ -779,7 +785,7 @@ const struct v850_opcode v850_opcodes[] =
{ "tst1", two (0xc7c0, 0x0000), two (0xc7e0, 0x0000), {B3, D16, R1}, 2, PROCESSOR_ALL },
{ "tst1", two (0x07e0, 0x00e6), two (0x07e0, 0xffff), {R2, R1}, 2, PROCESSOR_NOT_V850 },
-/* special instructions */
+/* Special instructions. */
{ "di", two (0x07e0, 0x0160), two (0xffff, 0xffff), {0}, 0, PROCESSOR_ALL },
{ "ei", two (0x87e0, 0x0160), two (0xffff, 0xffff), {0}, 0, PROCESSOR_ALL },
{ "halt", two (0x07e0, 0x0120), two (0xffff, 0xffff), {0}, 0, PROCESSOR_ALL },
@@ -787,10 +793,10 @@ const struct v850_opcode v850_opcodes[] =
{ "trap", two (0x07e0, 0x0100), two (0xffe0, 0xffff), {I5U}, 0, PROCESSOR_ALL },
{ "ldsr", two (0x07e0, 0x0020), two (0x07e0, 0xffff), {R1, SR2}, 0, PROCESSOR_ALL },
{ "stsr", two (0x07e0, 0x0040), two (0x07e0, 0xffff), {SR1, R2}, 0, PROCESSOR_ALL },
+{ "dbret", two (0x07e0, 0x0146), two (0xffff, 0xffff), {UNUSED}, 0, PROCESSOR_V850E1 },
{ 0, 0, 0, {0}, 0, 0 },
} ;
const int v850_num_opcodes =
sizeof (v850_opcodes) / sizeof (v850_opcodes[0]);
-
diff --git a/opcodes/xstormy16-asm.c b/opcodes/xstormy16-asm.c
index 810938c4a9..618e33b2f0 100644
--- a/opcodes/xstormy16-asm.c
+++ b/opcodes/xstormy16-asm.c
@@ -43,7 +43,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
/* -- assembler routines inserted here. */
@@ -317,8 +317,7 @@ xstormy16_cgen_init_asm (cd)
Returns NULL for success, an error message for failure. */
char *
-xstormy16_cgen_build_insn_regex (insn)
- CGEN_INSN *insn;
+xstormy16_cgen_build_insn_regex (CGEN_INSN *insn)
{
CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
const char *mnem = CGEN_INSN_MNEMONIC (insn);
@@ -441,11 +440,10 @@ xstormy16_cgen_build_insn_regex (insn)
Returns NULL for success, an error message for failure. */
static const char *
-parse_insn_normal (cd, insn, strp, fields)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- const char **strp;
- CGEN_FIELDS *fields;
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
{
/* ??? Runtime added insns not handled yet. */
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
@@ -583,12 +581,11 @@ parse_insn_normal (cd, insn, strp, fields)
mind helps keep the design clean. */
const CGEN_INSN *
-xstormy16_cgen_assemble_insn (cd, str, fields, buf, errmsg)
- CGEN_CPU_DESC cd;
- const char *str;
- CGEN_FIELDS *fields;
- CGEN_INSN_BYTES_PTR buf;
- char **errmsg;
+xstormy16_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
{
const char *start;
CGEN_INSN_LIST *ilist;
@@ -692,9 +689,7 @@ xstormy16_cgen_assemble_insn (cd, str, fields, buf, errmsg)
FIXME: Not currently used. */
void
-xstormy16_cgen_asm_hash_keywords (cd, opvals)
- CGEN_CPU_DESC cd;
- CGEN_KEYWORD *opvals;
+xstormy16_cgen_asm_hash_keywords (CGEN_CPU_DESC cd, CGEN_KEYWORD *opvals)
{
CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL);
const CGEN_KEYWORD_ENTRY * ke;
diff --git a/opcodes/xstormy16-dis.c b/opcodes/xstormy16-dis.c
index 17c54a68a1..54af2571ab 100644
--- a/opcodes/xstormy16-dis.c
+++ b/opcodes/xstormy16-dis.c
@@ -41,21 +41,20 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define UNKNOWN_INSN_MSG _("*unknown*")
static void print_normal
- PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
static void print_address
- PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int));
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int);
static void print_keyword
- PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int));
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int);
static void print_insn_normal
- PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
- bfd_vma, int));
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
static int print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned);
static int default_print_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *);
static int read_insn
- PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
- CGEN_EXTRACT_INFO *, unsigned long *));
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
/* -- disassembler routines inserted here */
@@ -194,13 +193,12 @@ xstormy16_cgen_init_dis (cd)
/* Default print handler. */
static void
-print_normal (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- long value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -220,13 +218,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
/* Default address handler. */
static void
-print_address (cd, dis_info, value, attrs, pc, length)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- bfd_vma value;
- unsigned int attrs;
- bfd_vma pc ATTRIBUTE_UNUSED;
- int length ATTRIBUTE_UNUSED;
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -250,12 +247,11 @@ print_address (cd, dis_info, value, attrs, pc, length)
/* Keyword print handler. */
static void
-print_keyword (cd, dis_info, keyword_table, value, attrs)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- PTR dis_info;
- CGEN_KEYWORD *keyword_table;
- long value;
- unsigned int attrs ATTRIBUTE_UNUSED;
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
{
disassemble_info *info = (disassemble_info *) dis_info;
const CGEN_KEYWORD_ENTRY *ke;
@@ -269,17 +265,16 @@ print_keyword (cd, dis_info, keyword_table, value, attrs)
/* Default insn printer.
- DIS_INFO is defined as `PTR' so the disassembler needn't know anything
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
about disassemble_info. */
static void
-print_insn_normal (cd, dis_info, insn, fields, pc, length)
- CGEN_CPU_DESC cd;
- PTR dis_info;
- const CGEN_INSN *insn;
- CGEN_FIELDS *fields;
- bfd_vma pc;
- int length;
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
disassemble_info *info = (disassemble_info *) dis_info;
@@ -311,14 +306,13 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
Returns 0 if all is well, non-zero otherwise. */
static int
-read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- int buflen;
- CGEN_EXTRACT_INFO *ex_info;
- unsigned long *insn_value;
+read_insn (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
{
int status = (*info->read_memory_func) (pc, buf, buflen, info);
if (status != 0)
@@ -342,12 +336,11 @@ read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
been called). */
static int
-print_insn (cd, pc, info, buf, buflen)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
- char *buf;
- unsigned int buflen;
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ char *buf,
+ unsigned int buflen)
{
CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
@@ -452,10 +445,7 @@ print_insn (cd, pc, info, buf, buflen)
#endif
static int
-default_print_insn (cd, pc, info)
- CGEN_CPU_DESC cd;
- bfd_vma pc;
- disassemble_info *info;
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
{
char buf[CGEN_MAX_INSN_SIZE];
int buflen;
@@ -494,9 +484,7 @@ typedef struct cpu_desc_list {
} cpu_desc_list;
int
-print_insn_xstormy16 (pc, info)
- bfd_vma pc;
- disassemble_info *info;
+print_insn_xstormy16 (bfd_vma pc, disassemble_info *info)
{
static cpu_desc_list *cd_list = 0;
cpu_desc_list *cl = 0;
diff --git a/opcodes/xstormy16-ibld.c b/opcodes/xstormy16-ibld.c
index 0e4876a6f4..13433e0ea6 100644
--- a/opcodes/xstormy16-ibld.c
+++ b/opcodes/xstormy16-ibld.c
@@ -44,30 +44,29 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#define FLD(f) (fields->f)
static const char * insert_normal
- PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR));
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
static const char * insert_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
- CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
static int extract_normal
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- unsigned int, unsigned int, unsigned int, unsigned int,
- unsigned int, unsigned int, bfd_vma, long *));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
static int extract_insn_normal
- PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
- CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+ (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
+ CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
#if CGEN_INT_INSN_P
static void put_insn_int_value
- PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
#endif
#if ! CGEN_INT_INSN_P
static CGEN_INLINE void insert_1
- PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
static CGEN_INLINE int fill_cache
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
static CGEN_INLINE long extract_1
- PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
- unsigned char *, bfd_vma));
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
#endif
/* Operand insertion. */
@@ -77,11 +76,12 @@ static CGEN_INLINE long extract_1
/* Subroutine of insert_normal. */
static CGEN_INLINE void
-insert_1 (cd, value, start, length, word_length, bufp)
- CGEN_CPU_DESC cd;
- unsigned long value;
- int start,length,word_length;
- unsigned char *bufp;
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
{
unsigned long x,mask;
int shift;
@@ -118,13 +118,15 @@ insert_1 (cd, value, start, length, word_length, bufp)
necessary. */
static const char *
-insert_normal (cd, value, attrs, word_offset, start, length, word_length,
- total_length, buffer)
- CGEN_CPU_DESC cd;
- long value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
- CGEN_INSN_BYTES_PTR buffer;
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
{
static char errbuf[100];
/* Written this way to avoid undefined behaviour. */
@@ -232,12 +234,11 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
The result is an error message or NULL if success. */
static const char *
-insert_insn_normal (cd, insn, fields, buffer, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN * insn;
- CGEN_FIELDS * fields;
- CGEN_INSN_BYTES_PTR buffer;
- bfd_vma pc;
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
unsigned long value;
@@ -288,12 +289,11 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
-put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_INSN_BYTES_PTR buf;
- int length;
- int insn_length;
- CGEN_INSN_INT value;
+put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
{
/* For architectures with insns smaller than the base-insn-bitsize,
length may be too big. */
@@ -320,11 +320,11 @@ put_insn_int_value (cd, buf, length, insn_length, value)
Returns 1 for success, 0 for failure. */
static CGEN_INLINE int
-fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- CGEN_EXTRACT_INFO *ex_info;
- int offset, bytes;
- bfd_vma pc;
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
@@ -364,12 +364,13 @@ fill_cache (cd, ex_info, offset, bytes, pc)
/* Subroutine of extract_normal. */
static CGEN_INLINE long
-extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
- CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
- int start,length,word_length;
- unsigned char *bufp;
- bfd_vma pc ATTRIBUTE_UNUSED;
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
{
unsigned long x;
int shift;
@@ -408,23 +409,25 @@ extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
necessary. */
static int
-extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
- word_length, total_length, pc, valuep)
- CGEN_CPU_DESC cd;
+extract_normal (CGEN_CPU_DESC cd,
#if ! CGEN_INT_INSN_P
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info,
#else
- CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
#endif
- CGEN_INSN_INT insn_value;
- unsigned int attrs;
- unsigned int word_offset, start, length, word_length, total_length;
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
#if ! CGEN_INT_INSN_P
- bfd_vma pc;
+ bfd_vma pc,
#else
- bfd_vma pc ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED,
#endif
- long *valuep;
+ long *valuep)
{
long value, mask;
@@ -505,13 +508,12 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
been called). */
static int
-extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insn;
- CGEN_EXTRACT_INFO *ex_info;
- CGEN_INSN_INT insn_value;
- CGEN_FIELDS *fields;
- bfd_vma pc;
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
{
const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
const CGEN_SYNTAX_CHAR_TYPE *syn;
diff --git a/symlink-tree b/symlink-tree
index 5b18cab923..22132c76af 100755
--- a/symlink-tree
+++ b/symlink-tree
@@ -1,6 +1,31 @@
#!/bin/sh
# Create a symlink tree.
#
+# Copyright (C) 1995, 2000, 2003 Free Software Foundation, Inc.
+#
+# This file 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 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# Please report bugs to <gcc-bugs@gnu.org>
+# and send patches to <gcc-patches@gnu.org>.
+
# Syntax: symlink-tree srcdir "ignore1 ignore2 ..."
#
# where srcdir is the directory to create a symlink tree to,